svn commit: r226561 - user/gabor/tre-integration/tools/test/regex/sgrep

Gabor Kovesdan gabor at FreeBSD.org
Thu Oct 20 09:53:20 UTC 2011


Author: gabor
Date: Thu Oct 20 09:53:20 2011
New Revision: 226561
URL: http://svn.freebsd.org/changeset/base/226561

Log:
  - Add -N for REG_NEWLINE
  - style(9)

Modified:
  user/gabor/tre-integration/tools/test/regex/sgrep/sgrep.c

Modified: user/gabor/tre-integration/tools/test/regex/sgrep/sgrep.c
==============================================================================
--- user/gabor/tre-integration/tools/test/regex/sgrep/sgrep.c	Thu Oct 20 09:46:47 2011	(r226560)
+++ user/gabor/tre-integration/tools/test/regex/sgrep/sgrep.c	Thu Oct 20 09:53:20 2011	(r226561)
@@ -100,11 +100,8 @@ grep_tree(char **argv)
 	while ((p = fts_read(fts)) != NULL)
 		switch (p->fts_info) {
 		case FTS_DNR:
-			/* FALLTHROUGH */
 		case FTS_ERR:
-			/* FALLTHROUGH */
 		case FTS_D:
-			/* FALLTHROUGH */
 		case FTS_DP:
 			/* FALLTHROUGH */
 		case FTS_DC:
@@ -158,7 +155,7 @@ main(int argc, char *argv[])
 	cflags = REG_NEWLINE;
 	eflags = REG_STARTEND;
 
-	while (((c = getopt(argc, argv, "e:EFr")) != -1))
+	while (((c = getopt(argc, argv, "e:EFNr")) != -1))
 		switch (c) {
 		case 'e':
 			pat = strdup(optarg);
@@ -170,6 +167,9 @@ main(int argc, char *argv[])
 		case 'F':
 			cflags |= REG_NOSPEC;
 			break;
+		case 'N':
+			cflags |= REG_NEWLINE;
+			break;
 		case 'r':
 			dir = true;
 		}


More information about the svn-src-user mailing list