From: Vern Paxson Date: Fri, 17 Dec 1993 10:31:10 +0000 (+0000) Subject: prototypes for alloc/string routines X-Git-Tag: flex-2-5-5b~236 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a4a405374e3154d43b2f3e4db916ce439a7b87fb;p=flex prototypes for alloc/string routines --- diff --git a/flex.skl b/flex.skl index cd2bf8d..2126c08 100644 --- a/flex.skl +++ b/flex.skl @@ -283,7 +283,9 @@ static void yy_fatal_error YY_PROTO(( const char msg[] )); YY_MALLOC_DECL #else #if __STDC__ +#ifndef __cplusplus #include +#endif #else /* Just try to get by without declaring the routines. This will fail * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) @@ -1168,9 +1170,13 @@ void yyFlexLexer::LexerError( const char msg[] ) /* Internal utility routines. */ #ifdef yytext_ptr +#ifdef YY_USE_PROTOS +static void yy_flex_strcpy( char *s1, const char *s2 ) +#else static void yy_flex_strcpy( s1, s2 ) char *s1; const char *s2; +#endif { while ( (*(s1++) = *(s2++)) ) ; @@ -1178,21 +1184,33 @@ const char *s2; #endif +#ifdef YY_USE_PROTOS +static void *yy_flex_alloc( unsigned int size ) +#else static void *yy_flex_alloc( size ) unsigned int size; +#endif { return (void *) malloc( size ); } +#ifdef YY_USE_PROTOS +static void *yy_flex_realloc( void *ptr, unsigned int size ) +#else static void *yy_flex_realloc( ptr, size ) void *ptr; unsigned int size; +#endif { return (void *) realloc( ptr, size ); } +#ifdef YY_USE_PROTOS +static void yy_flex_free( void *ptr ) +#else static void yy_flex_free( ptr ) void *ptr; +#endif { free( ptr ); }