summaryrefslogtreecommitdiffstats
path: root/usr.bin/grep
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/grep')
-rw-r--r--usr.bin/grep/Makefile8
-rw-r--r--usr.bin/grep/grep.12
-rw-r--r--usr.bin/grep/grep.c2
-rw-r--r--usr.bin/grep/grep.h54
-rw-r--r--usr.bin/grep/regex/tre-fastmatch.c2
5 files changed, 34 insertions, 34 deletions
diff --git a/usr.bin/grep/Makefile b/usr.bin/grep/Makefile
index 8b2fa0c..abc2f44 100644
--- a/usr.bin/grep/Makefile
+++ b/usr.bin/grep/Makefile
@@ -43,7 +43,7 @@ MLINKS= grep.1 egrep.1 \
LDADD= -lz
DPADD= ${LIBZ}
-.if !defined(WITHOUT_LZMA_SUPPORT)
+.if ${MK_LZMA_SUPPORT} != "no"
LDADD+= -llzma
DPADD+= ${LIBLZMA}
@@ -57,7 +57,7 @@ LINKS+= ${BINDIR}/${PROG} ${BINDIR}/xzgrep \
CFLAGS+= -DWITHOUT_LZMA
.endif
-.if !defined(WITHOUT_BZIP2_SUPPORT)
+.if ${MK_BZIP2_SUPPORT} != "no"
LDADD+= -lbz2
DPADD+= ${LIBBZ2}
@@ -73,13 +73,13 @@ MLINKS+= grep.1 bzgrep.1 \
CFLAGS+= -DWITHOUT_BZIP2
.endif
-.if !defined(WITHOUT_GNU_COMPAT)
+.if ${MK_GNU_GREP_COMPAT} != "no"
CFLAGS+= -I${DESTDIR}/usr/include/gnu
LDADD+= -lgnuregex
DPADD+= ${LIBGNUREGEX}
.endif
-.if !defined(WITHOUT_NLS)
+.if ${MK_NLS} != "no"
.include "${.CURDIR}/nls/Makefile.inc"
.else
CFLAGS+= -DWITHOUT_NLS
diff --git a/usr.bin/grep/grep.1 b/usr.bin/grep/grep.1
index b3ba21a..9e8633f 100644
--- a/usr.bin/grep/grep.1
+++ b/usr.bin/grep/grep.1
@@ -398,8 +398,8 @@ The default is 2.
Force output to be line buffered.
By default, output is line buffered when standard output is a terminal
and block buffered otherwise.
-.Pp
.El
+.Pp
If no file arguments are specified, the standard input is used.
.Sh EXIT STATUS
The
diff --git a/usr.bin/grep/grep.c b/usr.bin/grep/grep.c
index 117a5a9..74446b6 100644
--- a/usr.bin/grep/grep.c
+++ b/usr.bin/grep/grep.c
@@ -311,7 +311,7 @@ read_patterns(const char *fn)
fclose(f);
return;
}
- while ((line = fgetln(f, &len)) != NULL)
+ while ((line = fgetln(f, &len)) != NULL)
add_pattern(line, line[0] == '\n' ? 0 : len);
if (ferror(f))
err(2, "%s", fn);
diff --git a/usr.bin/grep/grep.h b/usr.bin/grep/grep.h
index 4ee348e..5613d39 100644
--- a/usr.bin/grep/grep.h
+++ b/usr.bin/grep/grep.h
@@ -39,48 +39,48 @@
#include "fastmatch.h"
#ifdef WITHOUT_NLS
-#define getstr(n) errstr[n]
+#define getstr(n) errstr[n]
#else
#include <nl_types.h>
extern nl_catd catalog;
-#define getstr(n) catgets(catalog, 1, n, errstr[n])
+#define getstr(n) catgets(catalog, 1, n, errstr[n])
#endif
extern const char *errstr[];
-#define VERSION "2.5.1-FreeBSD"
+#define VERSION "2.5.1-FreeBSD"
-#define GREP_FIXED 0
-#define GREP_BASIC 1
-#define GREP_EXTENDED 2
+#define GREP_FIXED 0
+#define GREP_BASIC 1
+#define GREP_EXTENDED 2
-#define BINFILE_BIN 0
-#define BINFILE_SKIP 1
-#define BINFILE_TEXT 2
+#define BINFILE_BIN 0
+#define BINFILE_SKIP 1
+#define BINFILE_TEXT 2
-#define FILE_STDIO 0
-#define FILE_MMAP 1
-#define FILE_GZIP 2
-#define FILE_BZIP 3
-#define FILE_XZ 4
-#define FILE_LZMA 5
+#define FILE_STDIO 0
+#define FILE_MMAP 1
+#define FILE_GZIP 2
+#define FILE_BZIP 3
+#define FILE_XZ 4
+#define FILE_LZMA 5
-#define DIR_READ 0
-#define DIR_SKIP 1
-#define DIR_RECURSE 2
+#define DIR_READ 0
+#define DIR_SKIP 1
+#define DIR_RECURSE 2
-#define DEV_READ 0
-#define DEV_SKIP 1
+#define DEV_READ 0
+#define DEV_SKIP 1
-#define LINK_READ 0
-#define LINK_EXPLICIT 1
-#define LINK_SKIP 2
+#define LINK_READ 0
+#define LINK_EXPLICIT 1
+#define LINK_SKIP 2
-#define EXCL_PAT 0
-#define INCL_PAT 1
+#define EXCL_PAT 0
+#define INCL_PAT 1
-#define MAX_LINE_MATCHES 32
+#define MAX_LINE_MATCHES 32
struct file {
int fd;
@@ -129,7 +129,7 @@ extern regex_t *er_pattern, *r_pattern;
extern fastmatch_t *fg_pattern;
/* For regex errors */
-#define RE_ERROR_BUF 512
+#define RE_ERROR_BUF 512
extern char re_error[RE_ERROR_BUF + 1]; /* Seems big enough */
/* util.c */
diff --git a/usr.bin/grep/regex/tre-fastmatch.c b/usr.bin/grep/regex/tre-fastmatch.c
index 4b58900..eddab26 100644
--- a/usr.bin/grep/regex/tre-fastmatch.c
+++ b/usr.bin/grep/regex/tre-fastmatch.c
@@ -444,7 +444,7 @@ static int fastcmp(const fastmatch_t *fg, const void *data,
}
/*
- * Copies the pattern pat having lenght n to p and stores
+ * Copies the pattern pat having length n to p and stores
* the size in l.
*/
#define SAVE_PATTERN(src, srclen, dst, dstlen) \
OpenPOWER on IntegriCloud