summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLieuwe Rooijakkers <lieuwerooijakkers@gmail.com>2024-08-07 23:08:45 +0200
committerLieuwe Rooijakkers <lieuwerooijakkers@gmail.com>2024-08-07 23:08:45 +0200
commitd7b93a6a7465f1eca44afee7d6684d350e223507 (patch)
treed1c62f753411133dcd2357213ddee70c85ad36c1
parentbceb61b88979dc8fa0d4468354ce55cca833fc49 (diff)
grijp: -E
-rw-r--r--src/grijp.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/grijp.c b/src/grijp.c
index 898852c..8e9dba6 100644
--- a/src/grijp.c
+++ b/src/grijp.c
@@ -17,7 +17,9 @@
char *gpats;
-bool fixed, extended, icase;
+bool fixed = false;
+bool extended = false;
+bool icase = false;
static void usage(FILE *f) {
fprintf(f,
@@ -32,7 +34,7 @@ static void usage(FILE *f) {
// Returns pointer to argument array containing patterns and then the file names
static char** parse_options(int argc, char **argv) {
int opt;
- while ((opt = getopt(argc, argv, "FihV")) != -1) {
+ while ((opt = getopt(argc, argv, "FiEhV")) != -1) {
switch (opt) {
case 'F':
fixed = true;
@@ -40,6 +42,9 @@ static char** parse_options(int argc, char **argv) {
case 'i':
icase = true;
break;
+ case 'E':
+ extended = true;
+ break;
case 'h':
usage(stdout);