]> granicus.if.org Git - flex/commitdiff
fixed to declare malloc() and free() by hand if __GNUC__
authorVern Paxson <vern@ee.lbl.gov>
Thu, 2 Aug 1990 00:30:43 +0000 (00:30 +0000)
committerVern Paxson <vern@ee.lbl.gov>
Thu, 2 Aug 1990 00:30:43 +0000 (00:30 +0000)
flex.skl
flexdef.h

index 4c24006a222e94acc74560907b72e1872e09f8bd..dcffffee66fecf6b8e193214f8358b63ef16a18e 100644 (file)
--- a/flex.skl
+++ b/flex.skl
 
 #ifdef __STDC__
 
-#ifndef DONT_HAVE_STDLIB_H
-#include <stdlib.h>
-#else
+#ifdef __GNUC__
 void *malloc( unsigned );
 void free( void* );
+#else
+#include <stdlib.h>
 #endif
 
 #define YY_USE_PROTOS
index f30b5387b53c4376df3350fcc8db4ee2fa018975..35fb16fd52adc1d3452fb4e762c038fded9f9925 100644 (file)
--- a/flexdef.h
+++ b/flexdef.h
@@ -91,13 +91,15 @@ char *memset();
 #endif
 
 #ifdef __STDC__
-#ifndef DONT_HAVE_STDLIB_H
-#include <stdlib.h>
-#else
+
+#ifdef __GNUC__
 void *malloc( unsigned );
 void free( void* );
-#endif
 #else
+#include <stdlib.h>
+#endif
+
+#else  /* ! __STDC__ */
 char *malloc(), *realloc();
 #endif
 
@@ -524,7 +526,13 @@ extern int num_xlations;
  * scxclu - true if start condition is exclusive
  * sceof - true if start condition has EOF rule
  * scname - start condition name
- * actvsc - stack of active start conditions for the current rule
+ * actvsc - stack of active start conditions for the current rule;
+ *          a negative entry means that the start condition is *not*
+ *          active for the current rule.  Start conditions may appear
+ *          multiple times on the stack; the entry for it closest
+ *          to the top of the stack (i.e., actvsc[actvp]) is the
+ *          one to use.  Others are present from "<sc>{" scoping
+ *          constructs.
  */
 
 extern int lastsc, current_max_scs, *scset, *scbol, *scxclu, *sceof, *actvsc;
@@ -830,6 +838,7 @@ extern void cclinstal PROTO ((Char [], int));
 extern int ccllookup PROTO((Char []));
 
 extern void ndinstal PROTO((char[], Char[]));  /* install a name definition */
+extern void scextend PROTO(());                /* increase maximum number of SC's */
 extern void scinstal PROTO((char[], int));     /* make a start condition */
 
 /* lookup the number associated with a start condition */