diff options
author | pfg <pfg@FreeBSD.org> | 2014-04-30 20:39:08 +0000 |
---|---|---|
committer | pfg <pfg@FreeBSD.org> | 2014-04-30 20:39:08 +0000 |
commit | 2372623c9c03f071c3c235fceb736421d940c993 (patch) | |
tree | 33c4fc724ead781b44a9d065302cf36bcd8395a1 /usr.bin/grep | |
parent | e6ff96679cf00be340be4fc5e7ccde495f96938d (diff) | |
download | FreeBSD-src-2372623c9c03f071c3c235fceb736421d940c993.zip FreeBSD-src-2372623c9c03f071c3c235fceb736421d940c993.tar.gz |
MFC r264581, r264744:
Various style(9) fixes and typos in printf, grep, sort and patch.
#define should be followed by a tab.
Diffstat (limited to 'usr.bin/grep')
-rw-r--r-- | usr.bin/grep/grep.c | 2 | ||||
-rw-r--r-- | usr.bin/grep/grep.h | 54 | ||||
-rw-r--r-- | usr.bin/grep/regex/tre-fastmatch.c | 2 |
3 files changed, 29 insertions, 29 deletions
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) \ |