w3m

Unnamed repository; edit this file to name it for gitweb.
git clone https://logand.com/git/w3m.git/
Log | Files | Refs | README

regex.h (828B)


      1 /* $Id$ */
      2 #define REGEX_MAX	64
      3 #define STORAGE_MAX	256
      4 
      5 typedef struct {
      6     char type;
      7 #ifdef USE_M17N
      8     wc_wchar_t wch;
      9 #endif
     10     unsigned char ch;
     11 } longchar;
     12 
     13 typedef struct regexchar {
     14     union {
     15 	longchar *pattern;
     16 	struct regex *sub;
     17     } p;
     18     unsigned char mode;
     19 } regexchar;
     20 
     21 
     22 typedef struct regex {
     23     regexchar re[REGEX_MAX];
     24     longchar storage[STORAGE_MAX];
     25     char *position;
     26     char *lposition;
     27     struct regex *alt_regex;
     28 } Regex;
     29 
     30 
     31 Regex *newRegex(char *ex, int igncase, Regex *regex, char **error_msg);
     32 
     33 int RegexMatch(Regex *re, char *str, int len, int firstp);
     34 
     35 void MatchedPosition(Regex *re, char **first, char **last);
     36 
     37 
     38 /* backward compatibility */
     39 char *regexCompile(char *ex, int igncase);
     40 
     41 int regexMatch(char *str, int len, int firstp);
     42 
     43 void matchedPosition(char **first, char **last);