diff options
Diffstat (limited to 'gnu/lib/libregex/test/fileregex.c')
-rw-r--r-- | gnu/lib/libregex/test/fileregex.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gnu/lib/libregex/test/fileregex.c b/gnu/lib/libregex/test/fileregex.c index 2c27a0f..ba81062 100644 --- a/gnu/lib/libregex/test/fileregex.c +++ b/gnu/lib/libregex/test/fileregex.c @@ -21,7 +21,7 @@ main (argc, argv) const char *compile_ret; unsigned lineno = 1; unsigned nfound = 0; - + /* Actually, it might be useful to allow the data file to be standard input, and to specify the pattern on the command line. */ if (argc != 2) @@ -29,7 +29,7 @@ main (argc, argv) fprintf (stderr, "Usage: %s <filename>.\n", argv[0]); exit (1); } - + filename = argv[1]; f = fopen (filename, "r"); if (f == NULL) @@ -41,7 +41,7 @@ main (argc, argv) printf ("Pattern = ", pat); gets (pat); - + if (feof (stdin)) { putchar ('\n'); @@ -61,13 +61,13 @@ main (argc, argv) struct re_registers regs; int search_ret = re_search_2 (&buf, NULL, 0, line, len, 0, len, ®s, len); - + if (search_ret == -2) { fprintf (stderr, "%s:%d: re_search failed.\n", filename, lineno); exit (1); } - + nfound += search_ret != -1; lineno++; } |