diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2001-02-13 00:02:36 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2001-02-13 00:02:36 +0000 |
commit | f7a839bc2ba3f15d48006fe931499d4d9cfb314f (patch) | |
tree | 94bed4f73922d577c2466149fe703f94d6f77722 /src/include/regex/regex2.h | |
parent | f4e4c7291ea691e558285fafbd6648ba85af5f26 (diff) | |
download | postgresql-f7a839bc2ba3f15d48006fe931499d4d9cfb314f.tar.gz postgresql-f7a839bc2ba3f15d48006fe931499d4d9cfb314f.zip |
Clean up portability problems in regexp package: change all routine
definitions from K&R to ANSI C style, and fix broken assumption that
int and long are the same datatype. This repairs problems observed
on Alpha with regexps having between 32 and 63 states.
Diffstat (limited to 'src/include/regex/regex2.h')
-rw-r--r-- | src/include/regex/regex2.h | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/src/include/regex/regex2.h b/src/include/regex/regex2.h index b885ff43182..8bcdddb65ab 100644 --- a/src/include/regex/regex2.h +++ b/src/include/regex/regex2.h @@ -40,22 +40,6 @@ #include <limits.h> /* - * First, the stuff that ends up in the outside-world include file -*/ -/* - typedef off_t regoff_t; - typedef struct { - int re_magic; - size_t re_nsub; // number of parenthesized subexpressions - const char *re_endp; // end pointer for REG_PEND - struct re_guts *re_g; // none of your business :-) - } regex_t; - typedef struct { - regoff_t rm_so; // start of match - regoff_t rm_eo; // end of match - } regmatch_t; -*/ -/* * internals of regex_t */ #define MAGIC1 ((('r'^0200)<<8) | 'e') @@ -82,8 +66,8 @@ typedef unsigned long sop; /* strip operator */ typedef long sopno; -#define OPRMASK 0xf8000000 -#define OPDMASK 0x07ffffff +#define OPRMASK ((sop) 0xf8000000) +#define OPDMASK ((sop) 0x07ffffff) #define OPSHIFT ((unsigned)27) #define OP(n) ((n)&OPRMASK) #define OPND(n) ((n)&OPDMASK) |