]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Change lemon to use <stdarg.h> instead of <varargs.h> because GCC no longer
authordrh <drh@noemail.net>
Tue, 15 Apr 2003 01:49:48 +0000 (01:49 +0000)
committerdrh <drh@noemail.net>
Tue, 15 Apr 2003 01:49:48 +0000 (01:49 +0000)
supports varargs.h.  Tickets #288 and #280.  Ironically, lemon originally
used varargs.h because stdarg.h was not supported by the compiler I was
using in 1989 (which was gcc if I recall correctly.) (CVS 905)

FossilOrigin-Name: 7902e4778ec86e25ad949ae7a6d55b63ac0e85f3

manifest
manifest.uuid
tool/lemon.c

index 6d758ea353705746535e3fe164b7fcb0ff328fad..c4dde5e15041e1b10a50e9a9fde5e04ed3624b67 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Change\ssome\svariable\snames\sand\scomments\sin\sthe\snew\sin-memory\sdatabase\sfile\nimplementation.\s\sPartial\s(non-working)\simplementation\sof\sthe\sVACUUM\scommand.\s(CVS\s904)
-D 2003-04-15T01:19:48
+C Change\slemon\sto\suse\s<stdarg.h>\sinstead\sof\s<varargs.h>\sbecause\sGCC\sno\slonger\nsupports\svarargs.h.\s\sTickets\s#288\sand\s#280.\s\sIronically,\slemon\soriginally\nused\svarargs.h\sbecause\sstdarg.h\swas\snot\ssupported\sby\sthe\scompiler\sI\swas\nusing\sin\s1989\s(which\swas\sgcc\sif\sI\srecall\scorrectly.)\s(CVS\s905)
+D 2003-04-15T01:49:49
 F Makefile.in df3a4db41a7450468b5fe934d9dd8f723b631249
 F Makefile.linux-gcc b86a99c493a5bfb402d1d9178dcdc4bd4b32f906
 F README f1de682fbbd94899d50aca13d387d1b3fd3be2dd
@@ -127,7 +127,7 @@ F test/version.test 605fd0d7e7d571370c32b12dbf395b58953de246
 F test/view.test c64fa39ea57f3c2066c854290f032ad13b23b83d
 F test/where.test ffaa91611edb8961d887d02492aa13f82782ff66
 F tool/diffdb.c 7524b1b5df217c20cd0431f6789851a4e0cb191b
-F tool/lemon.c 022adc2830c2705828f744d2c59798bd462eb465
+F tool/lemon.c 14fedcde9cf70aa6040b89de164cf8f56f92a4b9
 F tool/lempar.c 73a991cc3017fb34804250fa901488b5147b3717
 F tool/memleak.awk 16ef9493dcd36146f806e75148f4bb0201a123ec
 F tool/opcodeDoc.awk b3a2a3d5d3075b8bd90b7afe24283efdd586659c
@@ -161,7 +161,7 @@ F www/speed.tcl cb4c10a722614aea76d2c51f32ee43400d5951be
 F www/sqlite.tcl ae3dcfb077e53833b59d4fcc94d8a12c50a44098
 F www/tclsqlite.tcl 1db15abeb446aad0caf0b95b8b9579720e4ea331
 F www/vdbe.tcl 2013852c27a02a091d39a766bc87cff329f21218
-P 96336bffde6c441af197a521ee9e56fdfd7efff8
-R 502f917ded2eef9644690cdab0eeb915
+P e76787f877c456abdc8bc88bfefc50eaeed68744
+R 2082ff273f79da67ec128510ffa08236
 U drh
-Z 288074bf98169396dec5124561acfdbb
+Z 21cc95134a25d7c9da7271d70e2e3747
index 4daf83b66ccaf538f20b621f11134a8fb4a57504..f4a03070cecaa8f2051c01453ac89a7b4ba75dd8 100644 (file)
@@ -1 +1 @@
-e76787f877c456abdc8bc88bfefc50eaeed68744
\ No newline at end of file
+7902e4778ec86e25ad949ae7a6d55b63ac0e85f3
\ No newline at end of file
index bdd668d02d01ab2beb487a0eb8db8a77ef3c95c0..ad4be199bfc9c2b0da2f7ef0ed8f44533921c89e 100644 (file)
@@ -7,7 +7,7 @@
 ** The author of this program disclaims copyright.
 */
 #include <stdio.h>
-#include <varargs.h>
+#include <stdarg.h>
 #include <string.h>
 #include <ctype.h>
 
@@ -70,7 +70,7 @@ void Configlist_eat(/* struct config * */);
 void Configlist_reset(/* void */);
 
 /********* From the file "error.h" ***************************************/
-void ErrorMsg( /* char *, int, char *, ... */ );
+void ErrorMsg(const char *, int,const char *, ...);
 
 /****** From the file "option.h" ******************************************/
 struct s_options {
@@ -1102,12 +1102,7 @@ int max;
 #define ERRMSGSIZE  10000 /* Hope this is big enough.  No way to error check */
 #define LINEWIDTH      79 /* Max width of any output line */
 #define PREFIXLIMIT    30 /* Max width of the prefix on each line */
-void ErrorMsg(va_alist)
-va_dcl
-{
-  char *filename;
-  int lineno;
-  char *format;
+void ErrorMsg(const char *filename, int lineno, const char *format, ...){
   char errmsg[ERRMSGSIZE];
   char prefix[PREFIXLIMIT+10];
   int errmsgsize;
@@ -1116,10 +1111,7 @@ va_dcl
   va_list ap;
   int end, restart, base;
 
-  va_start(ap);
-  filename = va_arg(ap,char*);
-  lineno = va_arg(ap,int);
-  format = va_arg(ap,char*);
+  va_start(ap, format);
   /* Prepare a prefix to be prepended to every output line */
   if( lineno>0 ){
     sprintf(prefix,"%.*s:%d: ",PREFIXLIMIT-10,filename,lineno);