Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Apr 2014 20:46:52 +0000 (UTC)
From:      "Pedro F. Giffuni" <pfg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r265161 - in stable/9/usr.bin: grep grep/regex printf
Message-ID:  <201404302046.s3UKkqGX043307@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pfg
Date: Wed Apr 30 20:46:52 2014
New Revision: 265161
URL: http://svnweb.freebsd.org/changeset/base/265161

Log:
  MFC	r264581, r264744 (partial):
  
  Various style(9) fixes and typos in printf and grep.
  
  #define should be followed by a tab.

Modified:
  stable/9/usr.bin/grep/grep.c
  stable/9/usr.bin/grep/grep.h
  stable/9/usr.bin/grep/regex/tre-fastmatch.c
  stable/9/usr.bin/printf/printf.c
Directory Properties:
  stable/9/   (props changed)
  stable/9/usr.bin/   (props changed)
  stable/9/usr.bin/grep/   (props changed)
  stable/9/usr.bin/printf/   (props changed)

Modified: stable/9/usr.bin/grep/grep.c
==============================================================================
--- stable/9/usr.bin/grep/grep.c	Wed Apr 30 20:39:08 2014	(r265160)
+++ stable/9/usr.bin/grep/grep.c	Wed Apr 30 20:46:52 2014	(r265161)
@@ -310,7 +310,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);

Modified: stable/9/usr.bin/grep/grep.h
==============================================================================
--- stable/9/usr.bin/grep/grep.h	Wed Apr 30 20:39:08 2014	(r265160)
+++ stable/9/usr.bin/grep/grep.h	Wed Apr 30 20:46:52 2014	(r265161)
@@ -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 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 DIR_READ	0
-#define DIR_SKIP	1
-#define DIR_RECURSE	2
-
-#define DEV_READ	0
-#define DEV_SKIP	1
-
-#define LINK_READ	0
-#define LINK_EXPLICIT	1
-#define LINK_SKIP	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	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	DEV_READ	0
+#define	DEV_SKIP	1
+
+#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 */

Modified: stable/9/usr.bin/grep/regex/tre-fastmatch.c
==============================================================================
--- stable/9/usr.bin/grep/regex/tre-fastmatch.c	Wed Apr 30 20:39:08 2014	(r265160)
+++ stable/9/usr.bin/grep/regex/tre-fastmatch.c	Wed Apr 30 20:46:52 2014	(r265161)
@@ -444,7 +444,7 @@ static int	fastcmp(const fastmatch_t *fg
   }
 
 /*
- * 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)				\

Modified: stable/9/usr.bin/printf/printf.c
==============================================================================
--- stable/9/usr.bin/printf/printf.c	Wed Apr 30 20:39:08 2014	(r265160)
+++ stable/9/usr.bin/printf/printf.c	Wed Apr 30 20:46:52 2014	(r265161)
@@ -61,12 +61,12 @@ static const char rcsid[] =
 #include <wchar.h>
 
 #ifdef SHELL
-#define main printfcmd
+#define	main printfcmd
 #include "bltin/bltin.h"
 #include "error.h"
 #endif
 
-#define PF(f, func) do {						\
+#define	PF(f, func) do {						\
 	char *b = NULL;							\
 	if (havewidth)							\
 		if (haveprec)						\



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201404302046.s3UKkqGX043307>