home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional / OS2PRO194.ISO / os2 / prgramer / rcs / sources / fgrep.pat < prev    next >
Text File  |  1992-01-19  |  3KB  |  90 lines

  1. diff -cb orig/fgrep.c fgrep/fgrep.c
  2. *** orig/fgrep.c    Wed Mar 07 09:33:52 1990
  3. --- fgrep/fgrep.c    Sun Jan 19 20:11:50 1992
  4. ***************
  5. *** 444,456 ****
  6.   
  7.   static const char version[] = "GNU fgrep, version 1.1";
  8.   
  9. - #define USAGE \
  10. -   "usage: %s [-[[AB] ]<num>] [-[CVchilnsvwx]] [-[ef]] <expr> [<files...>]\n"
  11.   static void
  12.   usage()
  13.   {
  14. !   fprintf(stderr, USAGE, prog);
  15.     exit(2);
  16.   }
  17.   
  18. --- 444,473 ----
  19.   
  20.   static const char version[] = "GNU fgrep, version 1.1";
  21.   
  22.   static void
  23.   usage()
  24.   {
  25. !   printf("\n%s\n", version);
  26. !   printf("\nUsage: %s [-[[AB]]<num>] [-[CVchilnsvwx]] [-[ef]] <expr> [<files...>]\n", prog);
  27. !   
  28. !   printf("\n  -A <num>  print <num> lines of context after every matching line"
  29. !          "\n  -B <num>  print <num> lines of context before every matching line"
  30. !          "\n  -C        print 2 lines of context on each side of every match"
  31. !          "\n  -<num>    print <num> lines of context on each side"
  32. !          "\n  -V        print the version number on stderr");
  33. !   printf("\n  -b        print every match preceded by its byte offset"
  34. !          "\n  -c        print a total count of matching lines only"
  35. !          "\n  -e <expr> search for <expr>; useful if <expr> begins with -"
  36. !          "\n  -f <file> take <expr> from the given <file>"
  37. !          "\n  -h        don't display filenames on matches");
  38. !   printf("\n  -i        ignore case difference when comparing strings"
  39. !          "\n  -l        list files containing matches only"
  40. !          "\n  -n        print each match preceded by its line number"
  41. !          "\n  -s        run silently producing no output except error messages"
  42. !          "\n  -v        print only lines that contain no matches for the <expr>"
  43. !          "\n  -w        print only lines where the match is a complete word"
  44. !          "\n  -x        print only lines where the match is a whole line\n");
  45. !   
  46.     exit(2);
  47.   }
  48.   
  49. diff -cb orig/std.h fgrep/std.h
  50. *** orig/std.h    Wed Nov 08 18:32:28 1989
  51. --- fgrep/std.h    Sun Jan 19 20:06:34 1992
  52. ***************
  53. *** 88,94 ****
  54.   #endif
  55.   
  56.   /* Declaring this here should be safe.  Some losing <errno.h>'s don't. */
  57. ! extern int errno;
  58.   
  59.   /* Adapt variable arguments to new implementations (with <stdarg.h>)
  60.      or old (which are assumed to have <varargs.h>). */
  61. --- 88,94 ----
  62.   #endif
  63.   
  64.   /* Declaring this here should be safe.  Some losing <errno.h>'s don't. */
  65. ! /* extern int errno; */
  66.   
  67.   /* Adapt variable arguments to new implementations (with <stdarg.h>)
  68.      or old (which are assumed to have <varargs.h>). */
  69. diff -cb orig/unix.h fgrep/unix.h
  70. *** orig/unix.h    Wed Nov 08 18:32:28 1989
  71. --- fgrep/unix.h    Sun Jan 19 20:06:52 1992
  72. ***************
  73. *** 50,56 ****
  74.   extern void EXFUN(pause, (void));
  75.   extern int EXFUN(pipe, (int *));
  76.   extern int EXFUN(read, (int, char *, size_t));
  77. ! extern int EXFUN(stat, (const char *, struct stat *));
  78.   extern int EXFUN(fstat, (int, struct stat *));
  79.   extern int EXFUN(umask, (int));
  80.   extern int EXFUN(unlink, (const char *));
  81. --- 50,56 ----
  82.   extern void EXFUN(pause, (void));
  83.   extern int EXFUN(pipe, (int *));
  84.   extern int EXFUN(read, (int, char *, size_t));
  85. ! extern int EXFUN(stat, (char *, struct stat *));
  86.   extern int EXFUN(fstat, (int, struct stat *));
  87.   extern int EXFUN(umask, (int));
  88.   extern int EXFUN(unlink, (const char *));
  89.