]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Changes to lemon.c so that it compiles on OpenWatcom 1.3. Ticket #665. (CVS 1307)
authordrh <drh@noemail.net>
Sat, 24 Apr 2004 12:59:13 +0000 (12:59 +0000)
committerdrh <drh@noemail.net>
Sat, 24 Apr 2004 12:59:13 +0000 (12:59 +0000)
FossilOrigin-Name: b8b8ce5c81ef614d488e0f79df8935ef609dc4f2

manifest
manifest.uuid
tool/lemon.c

index 2c5054591e179ff6356236f0087b75479dc698bf..7860e340d8a2ef569c021c87b59e942bfec5f0aa 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Add\ssome\sextra\sdebugging\slogic\sto\slemon.c.\s\sTicket\s#692.\s(CVS\s1304)
-D 2004-04-23T23:37:56
+C Changes\sto\slemon.c\sso\sthat\sit\scompiles\son\sOpenWatcom\s1.3.\s\sTicket\s#665.\s(CVS\s1307)
+D 2004-04-24T12:59:13
 F Makefile.in ab7b0d5118e2da97bac66be8684a1034e3500f5a
 F Makefile.linux-gcc b86a99c493a5bfb402d1d9178dcdc4bd4b32f906
 F README f1de682fbbd94899d50aca13d387d1b3fd3be2dd
@@ -149,7 +149,7 @@ F test/version.test 92adee5d98cf6e3eb0d1cf5186952e8114931bf6
 F test/view.test 1ee12c6f8f4791a2c0655120d5562a49400cfe53
 F test/where.test cb3a2ed062ce4b5f08aff2d08027c6a46d68c47b
 F tool/diffdb.c 7524b1b5df217c20cd0431f6789851a4e0cb191b
-F tool/lemon.c f4fb7226c930435e994441a470ed60a7c540f518
+F tool/lemon.c db6a3bfaf3388c0f7aea3adb5e05acddcd427016
 F tool/lempar.c 0b5e7a58634e0d448929b8e85f7981c2aa708d57
 F tool/memleak.awk b744b6109566206c746d826f6ecdba34662216bc
 F tool/memleak2.awk 9cc20c8e8f3c675efac71ea0721ee6874a1566e8
@@ -188,7 +188,7 @@ F www/sqlite.tcl 3c83b08cf9f18aa2d69453ff441a36c40e431604
 F www/tclsqlite.tcl b9271d44dcf147a93c98f8ecf28c927307abd6da
 F www/vdbe.tcl 9b9095d4495f37697fd1935d10e14c6015e80aa1
 F www/whentouse.tcl a8335bce47cc2fddb07f19052cb0cb4d9129a8e4
-P 7ace576215367101904677bd69951755ee9cb1a1
-R eb6a5ce75ec5baacf07db0d5bec863ef
+P 635f674d20ca3e0b534eba54313004e859de16e9
+R 9c976d5c8583c7ac8ea10461b8760357
 U drh
-Z f469603e31280e1ead5f1c241181c12f
+Z 6726be1b9326ca3188d590be44166ddf
index 388cf2be5af04e949d37d14bb7441f04ba96993a..a35a050c38ae755c1bbecf8dc4f319bbe5a907b6 100644 (file)
@@ -1 +1 @@
-635f674d20ca3e0b534eba54313004e859de16e9
\ No newline at end of file
+b8b8ce5c81ef614d488e0f79df8935ef609dc4f2
\ No newline at end of file
index 45f010d2323b06db5834f4a4a6f6fd6c2818e7c3..5940950f8351d7c31a3db12c6701b86d8f271c93 100644 (file)
 #include <ctype.h>
 #include <stdlib.h>
 
-extern void qsort();
-extern double strtod();
-extern long strtol();
-extern void free();
-extern int access();
-extern int atoi();
-
 #ifndef __WIN32__
 #   if defined(_WIN32) || defined(WIN32)
 #      define __WIN32__
@@ -40,7 +33,6 @@ extern void *malloc();
 /******** From the file "action.h" *************************************/
 struct action *Action_new();
 struct action *Action_sort();
-void Action_add();
 
 /********* From the file "assert.h" ************************************/
 void myassert();
@@ -374,7 +366,7 @@ struct action *ap2;
 struct action *Action_sort(ap)
 struct action *ap;
 {
-  ap = (struct action *)msort(ap,&ap->next,actioncmp);
+  ap = (struct action *)msort((char *)ap,(char **)&ap->next,actioncmp);
   return ap;
 }
 
@@ -811,7 +803,7 @@ struct state *stp;     /* The state from which successors are computed */
 
     /* The state "newstp" is reached from the state "stp" by a shift action
     ** on the symbol "sp" */
-    Action_add(&stp->ap,SHIFT,sp,newstp);
+    Action_add(&stp->ap,SHIFT,sp,(char *)newstp);
   }
 }
 
@@ -912,7 +904,7 @@ struct lemon *lemp;
           if( SetFind(cfp->fws,j) ){
             /* Add a reduce action to the state "stp" which will reduce by the
             ** rule "cfp->rp" if the lookahead symbol is "lemp->symbols[j]" */
-            Action_add(&stp->ap,REDUCE,lemp->symbols[j],cfp->rp);
+            Action_add(&stp->ap,REDUCE,lemp->symbols[j],(char *)cfp->rp);
           }
        }
       }
@@ -1188,14 +1180,14 @@ struct lemon *lemp;
 
 /* Sort the configuration list */
 void Configlist_sort(){
-  current = (struct config *)msort(current,&(current->next),Configcmp);
+  current = (struct config *)msort((char *)current,(char **)&(current->next),Configcmp);
   currentend = 0;
   return;
 }
 
 /* Sort the basis configuration list */
 void Configlist_sortbasis(){
-  basis = (struct config *)msort(current,&(current->bp),Configcmp);
+  basis = (struct config *)msort((char *)current,(char **)&(current->bp),Configcmp);
   basisend = 0;
   return;
 }
@@ -1447,6 +1439,7 @@ char **argv;
     fprintf(stderr,"%d parsing conflicts.\n",lem.nconflict);
   }
   exit(lem.errorcnt + lem.nconflict);
+  return (lem.errorcnt + lem.nconflict);
 }
 /******************** From the file "msort.c" *******************************/
 /*