Skip to content

Commit

Permalink
Make all the lempar.c functions static (we #include it from a .c file…
Browse files Browse the repository at this point in the history
…...)
  • Loading branch information
icculus committed Feb 28, 2009
1 parent ac8b1b8 commit 5e5c7be
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions misc/lempar.c
Expand Up @@ -2,7 +2,9 @@
* My changes over the original lempar.c from SQLite are encased in
* #if __MOJOSHADER__ blocks. --ryan.
*/
#ifndef __MOJOSHADER__
#define __MOJOSHADER__ 1
#endif

/* Driver template for the LEMON parser generator.
** The author disclaims copyright to this source code.
Expand Down Expand Up @@ -200,6 +202,9 @@ static char *yyTracePrompt = 0;
** Outputs:
** None.
*/
#if __MOJOSHADER__
static
#endif
void ParseTrace(FILE *TraceFILE, char *zTracePrompt){
yyTraceFILE = TraceFILE;
yyTracePrompt = zTracePrompt;
Expand Down Expand Up @@ -261,7 +266,7 @@ static void yyGrowStack(yyParser *p){
** to Parse and ParseFree.
*/
#if __MOJOSHADER__
void *ParseAlloc(void *(*mallocProc)(size_t,void *), void *malloc_data){
static void *ParseAlloc(void *(*mallocProc)(size_t,void *), void *malloc_data){
yyParser *pParser;
pParser = (yyParser*)(*mallocProc)( (size_t)sizeof(yyParser), malloc_data );
#else
Expand Down Expand Up @@ -348,6 +353,9 @@ static int yy_pop_parser_stack(yyParser *pParser){
** from malloc.
** </ul>
*/
#if __MOJOSHADER__
static
#endif
void ParseFree(
void *p, /* The parser to be deleted */
#if __MOJOSHADER__
Expand All @@ -374,7 +382,7 @@ void ParseFree(
** Return the peak depth of the stack for a parser.
*/
#ifdef YYTRACKMAXSTACKDEPTH
int ParseStackPeak(void *p){
static int ParseStackPeak(void *p){
yyParser *pParser = (yyParser*)p;
return pParser->yyidxMax;
}
Expand Down Expand Up @@ -697,6 +705,9 @@ static void yy_accept(
** Outputs:
** None.
*/
#if __MOJOSHADER__
static
#endif
void Parse(
void *yyp, /* The parser */
int yymajor, /* The major token code number */
Expand Down

0 comments on commit 5e5c7be

Please sign in to comment.