From f7a839bc2ba3f15d48006fe931499d4d9cfb314f Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Tue, 13 Feb 2001 00:02:36 +0000 Subject: 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. --- src/include/regex/regex2.h | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) (limited to 'src/include/regex/regex2.h') 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 @@ -39,22 +39,6 @@ #include -/* - * 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 */ @@ -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) -- cgit v1.2.3