diff options
author | Vern Paxson <vern@ee.lbl.gov> | 1993-12-01 11:58:18 +0000 |
---|---|---|
committer | Vern Paxson <vern@ee.lbl.gov> | 1993-12-01 11:58:18 +0000 |
commit | 555e2640d7eefc00f02d372ccf60d66534620527 (patch) | |
tree | eba1bc33ec6a5043ecd3301300df616a91080d4d | |
parent | e11471bb404a63a99c275ea7252a8a5a7f8adc44 (diff) |
yy_flex_xmalloc() moved to misc.c
-rw-r--r-- | flexdef.h | 3 | ||||
-rw-r--r-- | misc.c | 15 |
2 files changed, 18 insertions, 0 deletions
@@ -767,6 +767,9 @@ extern void skelout PROTO((void)); /* Output a yy_trans_info structure. */ extern void transition_struct_out PROTO((int, int)); +/* Only needed when using certain broken versions of bison to build parse.c. */ +extern void *yy_flex_xmalloc PROTO(( int )); + /* Set a region of memory to 0. */ extern void zero_out PROTO((char *, int)); @@ -740,6 +740,21 @@ int element_v, element_n; } +/* The following is only needed when building flex's parser using certain + * broken versions of bison. + */ +void *yy_flex_xmalloc( size ) +int size; + { + void *result = yy_flex_alloc( size ); + + if ( ! result ) + flexfatal( "memory allocation failed in yy_flex_xmalloc()" ); + + return result; + } + + /* zero_out - set a region of memory to 0 * * Sets region_ptr[0] through region_ptr[size_in_bytes - 1] to zero. |