Print this page
remove support for non-ANSI compilation

@@ -19,21 +19,20 @@
  * CDDL HEADER END
  */
 /*      Copyright (c) 1988 AT&T */
 /*        All Rights Reserved   */
 
-
 /*
+ * Copyright 2014 Garrett D'Amore <garrett@damore.org>
+ *
  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
 #ifndef _REGEXP_H
 #define _REGEXP_H
 
-#pragma ident   "%Z%%M% %I%     %E% SMI"        /* SVr4.0 1.9   */
-
 #include <string.h>
 
 #ifdef  __cplusplus
 extern "C" {
 #endif

@@ -68,27 +67,15 @@
 static int      low;
 static int      size;
 
 static unsigned char    bittab[] = { 1, 2, 4, 8, 16, 32, 64, 128 };
 
-#ifdef  __STDC__
 int advance(const char *lp, const char *ep);
 static void getrnge(const char *str);
-#else
-int advance();
-static void getrnge();
-#endif
 
 char *
-#ifdef  __STDC__
 compile(char *instring, char *ep, const char *endbuf, int seof)
-#else
-compile(instring, ep, endbuf, seof)
-register char *ep;
-char *instring, *endbuf;
-int seof;
-#endif
 {
         INIT    /* Dependent declarations and initializations */
         register int c;
         register int eof = seof;
         char *lastep;

@@ -313,18 +300,12 @@
                 }
         }
         /*NOTREACHED*/
 }
 
-#ifdef  __STDC__
 int
 step(const char *p1, const char *p2)
-#else
-int
-step(p1, p2)
-register char *p1, *p2;
-#endif
 {
         char c;
 
 
         if (circf) {

@@ -353,22 +334,13 @@
         } while (*p1++);
         return (0);
 }
 
 int
-#ifdef  __STDC__
 advance(const char *lp, const char *ep)
-#else
-advance(lp, ep)
-register char *lp, *ep;
-#endif
 {
-#ifdef  __STDC__
         const char *curlp;
-#else
-        register char *curlp;
-#endif
         int c;
         char *bbeg;
         register char neg;
         size_t ct;
 

@@ -578,16 +550,11 @@
         }
         /*NOTREACHED*/
 }
 
 static void
-#ifdef  __STDC__
 getrnge(const char *str)
-#else
-getrnge(str)
-register char *str;
-#endif
 {
         low = *str++ & 0377;
         size = ((*str & 0377) == 255)? 20000: (*str &0377) - low;
 }