]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Fix over-length source code lines in Lemon.
authordrh <drh@noemail.net>
Fri, 4 Sep 2015 18:03:45 +0000 (18:03 +0000)
committerdrh <drh@noemail.net>
Fri, 4 Sep 2015 18:03:45 +0000 (18:03 +0000)
FossilOrigin-Name: 1efece95ff8777b89558be59277732ba2a68d5ab

manifest
manifest.uuid
tool/lemon.c

index 2fb27499211c2b40a6073803aff8ae793a303e7e..a7ab65d3efd61e2f2298baf67002747fc0efa44c 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Add\ssupport\sfor\sCREATE\sINDEX\sstatements\sthat\suse\sdeterministic\sexpressions\nrather\sthan\sonly\scolumn\snames.
-D 2015-09-04T17:32:19.351
+C Fix\sover-length\ssource\scode\slines\sin\sLemon.
+D 2015-09-04T18:03:45.061
 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
 F Makefile.in f85066ce844a28b671aaeeff320921cd0ce36239
 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@@ -1338,7 +1338,7 @@ F tool/fuzzershell.c f2fc86dd22df654b28851b85019d3bd007361751
 F tool/genfkey.README cf68fddd4643bbe3ff8e31b8b6d8b0a1b85e20f4
 F tool/genfkey.test 4196a8928b78f51d54ef58e99e99401ab2f0a7e5
 F tool/getlock.c f4c39b651370156cae979501a7b156bdba50e7ce
-F tool/lemon.c b9109f59b57e7b6f101c4fe644c8361ba6dee969
+F tool/lemon.c b12cb605725dabfa3a8607ec6bd9e978973c7af9
 F tool/lempar.c 01ca97f87610d1dac6d8cd96ab109ab1130e76dc
 F tool/loadfts.c c3c64e4d5e90e8ba41159232c2189dba4be7b862
 F tool/logest.c eef612f8adf4d0993dafed0416064cf50d5d33c6
@@ -1383,8 +1383,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1
 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
 F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b
 F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P 3d3df79bfaf9dbc7aa711c08a19d2f6dbe744b32 5ff855293865c244ac632c630e8e7e8d7c05a5f6
-R 46fafd1e16150312779d43bb23b81793
-T +closed 5ff855293865c244ac632c630e8e7e8d7c05a5f6
+P 2131a5ca53f0e9b0b98a9dd9a20e495d54d146a7
+R c504fcfc7ca364ef5b7aec55028c181c
 U drh
-Z 4941f6208637da2261b21635bf7704d1
+Z 31da7673766f0dcc42d3887f78dbee2d
index 8d3663c4f365080d70b2ac78f6f45799793a42a0..6ca3648ba2d60a29733935ae0773bdb0ea9a4522 100644 (file)
@@ -1 +1 @@
-2131a5ca53f0e9b0b98a9dd9a20e495d54d146a7
\ No newline at end of file
+1efece95ff8777b89558be59277732ba2a68d5ab
\ No newline at end of file
index 89d992c37ec8075da5a7b6983d8a0bcda2200b48..59678850217b5074ef89e595e7d077499bc73e77 100644 (file)
@@ -55,7 +55,7 @@ static char *msort(char*,char**,int(*)(const char*,const char*));
 ** saying they are unsafe.  So we define our own versions of those routines too.
 **
 ** There are three routines here:  lemon_sprintf(), lemon_vsprintf(), and
-** lemon_addtext().  The first two are replacements for sprintf() and vsprintf().
+** lemon_addtext(). The first two are replacements for sprintf() and vsprintf().
 ** The third is a helper routine for vsnprintf() that adds texts to the end of a
 ** buffer, making sure the buffer is always zero-terminated.
 **
@@ -1375,14 +1375,16 @@ void Configlist_closure(struct lemon *lemp)
 
 /* Sort the configuration list */
 void Configlist_sort(){
-  current = (struct config *)msort((char *)current,(char **)&(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((char *)current,(char **)&(current->bp),Configcmp);
+  basis = (struct config*)msort((char*)current,(char**)&(current->bp),
+                                Configcmp);
   basisend = 0;
   return;
 }
@@ -1613,7 +1615,8 @@ int main(int argc, char **argv)
   if( statistics ){
     printf("Parser statistics: %d terminals, %d nonterminals, %d rules\n",
       lem.nterminal, lem.nsymbol - lem.nterminal, lem.nrule);
-    printf("                   %d states, %d parser table entries, %d conflicts\n",
+    printf("                   %d states, %d parser table entries,"
+                                                        " %d conflicts\n",
       lem.nstate, lem.tablesize, lem.nconflict);
   }
   if( lem.nconflict > 0 ){
@@ -1873,7 +1876,8 @@ static int handleswitch(int i, FILE *err)
         dv = strtod(cp,&end);
         if( *end ){
           if( err ){
-            fprintf(err,"%sillegal character in floating-point argument.\n",emsg);
+            fprintf(err,
+               "%sillegal character in floating-point argument.\n",emsg);
             errline(i,(int)((char*)end-(char*)argv[i]),err);
           }
           errcnt++;
@@ -3228,7 +3232,8 @@ PRIVATE FILE *tplt_open(struct lemon *lemp)
     }
     in = fopen(user_templatename,"rb");
     if( in==0 ){
-      fprintf(stderr,"Can't open the template file \"%s\".\n",user_templatename);
+      fprintf(stderr,"Can't open the template file \"%s\".\n",
+              user_templatename);
       lemp->errorcnt++;
       return 0;
     }
@@ -3313,7 +3318,10 @@ void emit_destructor_code(
  }else if( sp->destructor ){
    cp = sp->destructor;
    fprintf(out,"{\n"); (*lineno)++;
-   if (!lemp->nolinenosflag) { (*lineno)++; tplt_linedir(out,sp->destLineno,lemp->filename); }
+   if( !lemp->nolinenosflag ){
+     (*lineno)++;
+     tplt_linedir(out,sp->destLineno,lemp->filename);
+   }
  }else if( lemp->vardest ){
    cp = lemp->vardest;
    if( cp==0 ) return;
@@ -3510,13 +3518,19 @@ PRIVATE void emit_code(
 
  /* Generate code to do the reduce action */
  if( rp->code ){
-   if (!lemp->nolinenosflag) { (*lineno)++; tplt_linedir(out,rp->line,lemp->filename); }
+   if( !lemp->nolinenosflag ){
+     (*lineno)++;
+     tplt_linedir(out,rp->line,lemp->filename);
+   }
    fprintf(out,"{%s",rp->code);
    for(cp=rp->code; *cp; cp++){
      if( *cp=='\n' ) (*lineno)++;
    } /* End loop */
    fprintf(out,"}\n"); (*lineno)++;
-   if (!lemp->nolinenosflag) { (*lineno)++; tplt_linedir(out,*lineno,lemp->outname); }
+   if( !lemp->nolinenosflag ){
+     (*lineno)++;
+     tplt_linedir(out,*lineno,lemp->outname);
+   }
  } /* End if( rp->code ) */
 
  return;