home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Professional
/
OS2PRO194.ISO
/
os2
/
prgramer
/
rcs
/
sources
/
fgrep.pat
< prev
next >
Wrap
Text File
|
1992-01-19
|
3KB
|
90 lines
diff -cb orig/fgrep.c fgrep/fgrep.c
*** orig/fgrep.c Wed Mar 07 09:33:52 1990
--- fgrep/fgrep.c Sun Jan 19 20:11:50 1992
***************
*** 444,456 ****
static const char version[] = "GNU fgrep, version 1.1";
- #define USAGE \
- "usage: %s [-[[AB] ]<num>] [-[CVchilnsvwx]] [-[ef]] <expr> [<files...>]\n"
-
static void
usage()
{
! fprintf(stderr, USAGE, prog);
exit(2);
}
--- 444,473 ----
static const char version[] = "GNU fgrep, version 1.1";
static void
usage()
{
! printf("\n%s\n", version);
! printf("\nUsage: %s [-[[AB]]<num>] [-[CVchilnsvwx]] [-[ef]] <expr> [<files...>]\n", prog);
!
! printf("\n -A <num> print <num> lines of context after every matching line"
! "\n -B <num> print <num> lines of context before every matching line"
! "\n -C print 2 lines of context on each side of every match"
! "\n -<num> print <num> lines of context on each side"
! "\n -V print the version number on stderr");
! printf("\n -b print every match preceded by its byte offset"
! "\n -c print a total count of matching lines only"
! "\n -e <expr> search for <expr>; useful if <expr> begins with -"
! "\n -f <file> take <expr> from the given <file>"
! "\n -h don't display filenames on matches");
! printf("\n -i ignore case difference when comparing strings"
! "\n -l list files containing matches only"
! "\n -n print each match preceded by its line number"
! "\n -s run silently producing no output except error messages"
! "\n -v print only lines that contain no matches for the <expr>"
! "\n -w print only lines where the match is a complete word"
! "\n -x print only lines where the match is a whole line\n");
!
exit(2);
}
diff -cb orig/std.h fgrep/std.h
*** orig/std.h Wed Nov 08 18:32:28 1989
--- fgrep/std.h Sun Jan 19 20:06:34 1992
***************
*** 88,94 ****
#endif
/* Declaring this here should be safe. Some losing <errno.h>'s don't. */
! extern int errno;
/* Adapt variable arguments to new implementations (with <stdarg.h>)
or old (which are assumed to have <varargs.h>). */
--- 88,94 ----
#endif
/* Declaring this here should be safe. Some losing <errno.h>'s don't. */
! /* extern int errno; */
/* Adapt variable arguments to new implementations (with <stdarg.h>)
or old (which are assumed to have <varargs.h>). */
diff -cb orig/unix.h fgrep/unix.h
*** orig/unix.h Wed Nov 08 18:32:28 1989
--- fgrep/unix.h Sun Jan 19 20:06:52 1992
***************
*** 50,56 ****
extern void EXFUN(pause, (void));
extern int EXFUN(pipe, (int *));
extern int EXFUN(read, (int, char *, size_t));
! extern int EXFUN(stat, (const char *, struct stat *));
extern int EXFUN(fstat, (int, struct stat *));
extern int EXFUN(umask, (int));
extern int EXFUN(unlink, (const char *));
--- 50,56 ----
extern void EXFUN(pause, (void));
extern int EXFUN(pipe, (int *));
extern int EXFUN(read, (int, char *, size_t));
! extern int EXFUN(stat, (char *, struct stat *));
extern int EXFUN(fstat, (int, struct stat *));
extern int EXFUN(umask, (int));
extern int EXFUN(unlink, (const char *));