This a modified copy of Henry Spencer's regex library, it was originally
snarfed from http://arglist.com/regex/. The following changes were made:

REGCOMP.C line 1438 changed to

 assert(value < 1L<<OPSHIFT);

REGEX.H before line 9 inserted

 #ifdef __TURBOC__
  typedef long off_t;
 #endif

REGEX2.H line 49-68 changed to

 #define OEND (1L<<OPSHIFT) /* endmarker -   */
 #define OCHAR (2L<<OPSHIFT) /* character unsigned char  */
 #define OBOL (3L<<OPSHIFT) /* left anchor -   */
 #define OEOL (4L<<OPSHIFT) /* right anchor -   */
 #define OANY (5L<<OPSHIFT) /* .  -   */
 #define OANYOF (6L<<OPSHIFT) /* [...] set number  */
 #define OBACK_ (7L<<OPSHIFT) /* begin \d paren number  */
 #define O_BACK (8L<<OPSHIFT) /* end \d paren number  */
 #define OPLUS_ (9L<<OPSHIFT) /* + prefix fwd to suffix  */
 #define O_PLUS (10L<<OPSHIFT) /* + suffix back to prefix  */
 #define OQUEST_ (11L<<OPSHIFT) /* ? prefix fwd to suffix  */
 #define O_QUEST (12L<<OPSHIFT) /* ? suffix back to prefix  */
 #define OLPAREN (13L<<OPSHIFT) /* (  fwd to )  */
 #define ORPAREN (14L<<OPSHIFT) /* )  back to (  */
 #define OCH_ (15L<<OPSHIFT) /* begin choice fwd to OOR2  */
 #define OOR1 (16L<<OPSHIFT) /* | pt. 1 back to OOR1 or OCH_ */
 #define OOR2 (17L<<OPSHIFT) /* | pt. 2 fwd to OOR2 or O_CH */
 #define O_CH (18L<<OPSHIFT) /* end choice back to OOR1  */
 #define OBOW (19L<<OPSHIFT) /* begin word -   */
 #define OEOW (20L<<OPSHIFT) /* end word -   */

