Usr get_last_path_component() name basename()
authorEric Andersen <andersen@codepoet.org>
Tue, 20 Nov 2001 00:23:48 +0000 (00:23 -0000)
committerEric Andersen <andersen@codepoet.org>
Tue, 20 Nov 2001 00:23:48 +0000 (00:23 -0000)
findutils/grep.c

index d39dac1405cb21c905a227031a9062238edfb182..0fe898c777f4b1f87f46cab5b3b06b5bfc8dd94a 100644 (file)
@@ -244,7 +244,8 @@ extern int grep_main(int argc, char **argv)
 #endif
 
 #ifdef CONFIG_FEATURE_GREP_EGREP_ALIAS
-       if (strcmp (basename (argv[0]), "egrep") == 0)
+       junk = get_last_path_component(argv[0]);
+       if (junk && strcmp(junk, "egrep") == 0)
                reflags |= REG_EXTENDED;
 #endif