home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / unix / volume23 / trn / part14 / search.h < prev    next >
C/C++ Source or Header  |  1991-08-22  |  1KB  |  41 lines

  1. /* $Header: search.h,v 4.3.3.1 91/01/16 03:37:37 davison Trn $
  2.  *
  3.  * $Log:    search.h,v $
  4.  * Revision 4.3.3.1  91/01/16  03:37:37  davison
  5.  * Added optional prototyping.
  6.  * 
  7.  * Revision 4.3  85/05/01  11:50:46  lwall
  8.  * Baseline for release with 4.3bsd.
  9.  * 
  10.  */
  11.  
  12. #ifndef NBRA
  13. #define    NBRA    10        /* the maximum number of meta-brackets in an
  14.                    RE -- \( \) */
  15. #define NALTS    10        /* the maximum number of \|'s */
  16.  
  17. typedef struct {    
  18.     char *expbuf;        /* The compiled search string */
  19.     int eblen;            /* Length of above buffer */
  20.     char *alternatives[NALTS];    /* The list of \| seperated alternatives */
  21.     char *braslist[NBRA];    /* RE meta-bracket start list */
  22.     char *braelist[NBRA];    /* RE meta-bracket end list */
  23.     char *brastr;        /* saved match string after execute() */
  24.     char nbra;            /* The number of meta-brackets int the most
  25.                    recenlty compiled RE */
  26.     bool do_folding;        /* fold upper and lower case? */
  27. } COMPEX;
  28.  
  29. void    search_init ANSI((void));
  30. void    init_compex ANSI((COMPEX *));
  31. void    free_compex ANSI((COMPEX *));
  32. char    *getbracket ANSI((COMPEX *,int));
  33. void    case_fold ANSI((int));
  34. char    *compile ANSI((COMPEX *,char *,int,int)); 
  35. void    grow_eb ANSI((COMPEX *));
  36. char    *execute ANSI((COMPEX *,char *)); 
  37. bool    advance ANSI((COMPEX *,char *,char *));
  38. bool    backref ANSI((COMPEX *,int,char *)); 
  39. bool    cclass ANSI((char *,int,int));
  40. #endif
  41.