Make all the lempar.c functions static (we #include it from a .c file...)
authorRyan C. Gordon <icculus@icculus.org>
Sat, 28 Feb 2009 15:35:58 -0500
changeset 715 817d02ae5c4b
parent 714 e8ed66bfff18
child 716 94a804b54078
Make all the lempar.c functions static (we #include it from a .c file...)
misc/lempar.c
--- a/misc/lempar.c	Sat Feb 28 15:31:46 2009 -0500
+++ b/misc/lempar.c	Sat Feb 28 15:35:58 2009 -0500
@@ -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.
@@ -200,6 +202,9 @@
 ** Outputs:
 ** None.
 */
+#if __MOJOSHADER__
+static
+#endif
 void ParseTrace(FILE *TraceFILE, char *zTracePrompt){
   yyTraceFILE = TraceFILE;
   yyTracePrompt = zTracePrompt;
@@ -261,7 +266,7 @@
 ** 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
@@ -348,6 +353,9 @@
 **       from malloc.
 ** </ul>
 */
+#if __MOJOSHADER__
+static
+#endif
 void ParseFree(
   void *p,                    /* The parser to be deleted */
 #if __MOJOSHADER__
@@ -374,7 +382,7 @@
 ** 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;
 }
@@ -697,6 +705,9 @@
 ** Outputs:
 ** None.
 */
+#if __MOJOSHADER__
+static
+#endif
 void Parse(
   void *yyp,                   /* The parser */
   int yymajor,                 /* The major token code number */