home *** CD-ROM | disk | FTP | other *** search
/ Atari FTP / ATARI_FTP_0693.zip / ATARI_FTP_0693 / Mint / Editors / mjovesrc.zoo / re.h < prev    next >
C/C++ Source or Header  |  1991-06-16  |  2KB  |  54 lines

  1. /***************************************************************************
  2.  * This program is Copyright (C) 1986, 1987, 1988 by Jonathan Payne.  JOVE *
  3.  * is provided to you without charge, and with no warranty.  You may give  *
  4.  * away copies of JOVE, including sources, provided that this notice is    *
  5.  * included in all the files.                                              *
  6.  ***************************************************************************/
  7.  
  8. #define NALTS        16    /* number of alternate search strings */
  9. #define COMPSIZE    256
  10.  
  11. /* kinds of regular expression compiles */
  12. #define NORM    0    /* nothing special */
  13. #define OKAY_RE    1    /* allow regular expressions */
  14. #define IN_CB    2    /* in curly brace; implies OKAY_RE */
  15.  
  16. struct RE_block {
  17.     char    r_compbuf[COMPSIZE],
  18.         *r_alternates[NALTS],
  19.         r_lbuf[LBSIZE];
  20.     int    r_nparens,
  21.         r_firstc,
  22.         r_anchored;
  23. };
  24.  
  25. extern char    rep_search[128],    /* replace search string */
  26.         rep_str[128];        /* contains replacement string */
  27.  
  28. extern int    REbom,        /* beginning and end columns of match */
  29.         REeom,
  30.         REdelta;    /* increase in line length due to last re_dosub */
  31.  
  32. extern bool    okay_wrap;    /* Do a wrap search ... not when we're
  33.                    parsing errors ... */
  34. extern char
  35.     *getsearch proto((void));
  36.  
  37. extern bool
  38.     re_lindex proto((struct line *line, int offset, int dir,
  39.         struct RE_block *re_blk, int lbuf_okay, int crater)),
  40.     LookingAt proto((char *pattern,char *buf,int offset)),
  41.     look_at proto((char *expr));
  42.  
  43. extern Bufpos
  44.     *docompiled proto((int dir, struct RE_block *re_blk)),
  45.     *dosearch proto((char *pattern, int dir, bool re));
  46.  
  47. extern void
  48.     REcompile proto((char *pattern, bool re, struct RE_block *re_blk)),
  49.     find_tag proto((char *tag,int localp)),
  50.     putmatch proto((int which,char *buf,size_t size)),
  51.     re_dosub proto((struct RE_block *re_blk, char *tobuf, int delp)),
  52.     setsearch proto((char *str)),
  53.     RErecur proto((void));
  54.