home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 22 gnu / 22-gnu.zip / grep20.zip / grep.h < prev    next >
C/C++ Source or Header  |  1992-09-28  |  1KB  |  54 lines

  1. /* grep.h - interface to grep driver for searching subroutines.
  2.    Copyright (C) 1992 Free Software Foundation, Inc.
  3.  
  4.    This program is free software; you can redistribute it and/or modify
  5.    it under the terms of the GNU General Public License as published by
  6.    the Free Software Foundation; either version 2, or (at your option)
  7.    any later version.
  8.  
  9.    This program is distributed in the hope that it will be useful,
  10.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  11.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12.    GNU General Public License for more details.
  13.  
  14.    You should have received a copy of the GNU General Public License
  15.    along with this program; if not, write to the Free Software
  16.    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
  17.  
  18. #if __STDC__
  19.  
  20. extern void fatal(const char *, int);
  21.  
  22. /* Grep.c expects the matchers vector to be terminated
  23.    by an entry with a NULL name, and to contain at least
  24.    an entry named "default". */
  25.  
  26. extern struct matcher
  27. {
  28.   char *name;
  29.   void (*compile)(char *, size_t);
  30.   char *(*execute)(char *, size_t, char **);
  31. } matchers[];
  32.  
  33. #else
  34.  
  35. extern void fatal();
  36.  
  37. extern struct matcher
  38. {
  39.   char *name;
  40.   void (*compile)();
  41.   char *(*execute)();
  42. } matchers[];
  43.  
  44. #endif
  45.  
  46. /* Exported from grep.c. */
  47. extern char *matcher;
  48.  
  49. /* The following flags are exported from grep for the matchers
  50.    to look at. */
  51. extern int match_icase;        /* -i */
  52. extern int match_words;        /* -w */
  53. extern int match_lines;        /* -x */
  54.