Annotation of researchv10no/cmd/odist/pax/include/re.h, revision 1.1.1.1

1.1       root        1: /*
                      2:  * G. S. Fowler
                      3:  * AT&T Bell Laboratories
                      4:  *
                      5:  * regular expression library definitions
                      6:  */
                      7: 
                      8: #ifndef RE_ALL
                      9: 
                     10: #define RE_ALL         (1<<0)  /* substitute all occurrences           */
                     11: #define RE_EDSTYLE     (1<<1)  /* ed(1) style magic characters         */
                     12: #define RE_LOWER       (1<<2)  /* substitute to lower case             */
                     13: #define RE_MATCH       (1<<3)  /* record matches in reprogram.match    */
                     14: #define RE_UPPER       (1<<4)  /* substitute to upper case             */
                     15: #define RE_EXTERNAL    8       /* first external flag bit              */
                     16: 
                     17: #define RE_NMATCH      ('9'-'0'+1)
                     18: 
                     19: typedef struct                 /* sub-expression match                 */
                     20: {
                     21:        char*   sp;             /* start in source string               */
                     22:        char*   ep;             /* end in source string                 */
                     23: } rematch;
                     24: 
                     25: /*
                     26:  * NOTE: reprogram is a pun for the interface routines
                     27:  *      allowing the library to change without forcing
                     28:  *      users to recompile
                     29:  */
                     30: 
                     31: typedef struct                 /* compiled regular expression program  */
                     32: {
                     33:        rematch match[RE_NMATCH+1];/* sub-expression match table        */
                     34: } reprogram;
                     35: 
                     36: /*
                     37:  * interface routines
                     38:  */
                     39: 
                     40: #if __STDC__ || __cplusplus || c_plusplus
                     41: #if __cplusplus
                     42: extern "C" {
                     43: #endif
                     44: extern reprogram*      recomp(const char*, int);
                     45: extern int             reexec(reprogram*, const char*);
                     46: extern void            refree(reprogram*);
                     47: extern void            reerror(const char*);
                     48: extern char*           resub(reprogram*, const char*, const char*, char*, int);
                     49: #if __cplusplus
                     50: }
                     51: #endif
                     52: #else
                     53: extern reprogram*      recomp();
                     54: extern int             reexec();
                     55: extern void            refree();
                     56: extern void            reerror();
                     57: extern char*           resub();
                     58: #endif
                     59: 
                     60: #endif

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.