diff options
Diffstat (limited to 'usr.bin/grep/grep.c')
-rw-r--r-- | usr.bin/grep/grep.c | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/usr.bin/grep/grep.c b/usr.bin/grep/grep.c index bad2a73..4fb4b1b 100644 --- a/usr.bin/grep/grep.c +++ b/usr.bin/grep/grep.c @@ -29,13 +29,6 @@ * SUCH DAMAGE. */ -#if HAVE_NBTOOL_CONFIG_H -#include "nbtool_config.h" -#endif - -#include <sys/cdefs.h> -__RCSID("$NetBSD: grep.c,v 1.15 2018/08/12 09:03:21 christos Exp $"); - #include <sys/stat.h> #include <sys/types.h> @@ -54,11 +47,6 @@ __RCSID("$NetBSD: grep.c,v 1.15 2018/08/12 09:03:21 christos Exp $"); #include "grep.h" -#ifndef WITHOUT_NLS -#include <nl_types.h> -nl_catd catalog; -#endif - /* * Default messags to use when NLS is disabled or no catalogue * is found. @@ -78,7 +66,7 @@ const char *errstr[] = { /* Flags passed to regcomp() and regexec() */ int cflags = 0; -int eflags = REG_STARTEND; +int eflags = REG_NOTBOL | REG_NOTEOL; /* Searching patterns */ unsigned int patterns, pattern_sz; @@ -154,7 +142,7 @@ extern char *__progname; /* * Prints usage information and returns 2. */ -__dead static void +static void usage(void) { fprintf(stderr, getstr(4), __progname); @@ -325,10 +313,6 @@ main(int argc, char *argv[]) setlocale(LC_ALL, ""); -#ifndef WITHOUT_NLS - catalog = catopen("grep", NL_CAT_LOCALE); -#endif - /* Check what is the program name of the binary. In this way we can have all the funcionalities in one binary without the need of scripting and using ugly hacks. */ @@ -712,10 +696,6 @@ main(int argc, char *argv[]) c+= procfile(*aargv); } -#ifndef WITHOUT_NLS - catclose(catalog); -#endif - /* Find out the correct return value according to the results and the command line option. */ exit(c ? (notfound ? (qflag ? 0 : 2) : 0) : (notfound ? 2 : 1)); |