mirror of https://github.com/sqlite/sqlite
Fix some left-over K&R-C constructs in lemon.c. No changes to the core.
FossilOrigin-Name: a53799059d4ece246610b6c877ab7088ded3548cbca7149a03deea8ac0e27e68
This commit is contained in:
parent
1a17b44231
commit
14d8855b8f
13
manifest
13
manifest
|
@ -1,5 +1,5 @@
|
|||
C When\sdoing\sa\sDISTINCT\squery\susing\san\sindex,\stry\sto\suse\sthe\sindex\sto\sskip\sahead\nto\sthe\snext\sdistinct\selement,\srather\sthan\sdoing\sa\sfull\sscan\sof\sthe\sindex.\n(This\sis\sthe\s"skip-ahead-distinct"\soptimization.)
|
||||
D 2017-04-14T17:30:43.741
|
||||
C Fix\ssome\sleft-over\sK&R-C\sconstructs\sin\slemon.c.\s\sNo\schanges\sto\sthe\score.
|
||||
D 2017-04-14T19:44:15.729
|
||||
F Makefile.in 1cc758ce3374a32425e4d130c2fe7b026b20de5b8843243de75f087c0a2661fb
|
||||
F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
|
||||
F Makefile.msc 6a8c838220f7c00820e1fc0ac1bccaaa8e5676067e1dbfa1bafa7a4ffecf8ae6
|
||||
|
@ -1498,7 +1498,7 @@ F tool/genfkey.README cf68fddd4643bbe3ff8e31b8b6d8b0a1b85e20f4
|
|||
F tool/genfkey.test 4196a8928b78f51d54ef58e99e99401ab2f0a7e5
|
||||
F tool/getlock.c f4c39b651370156cae979501a7b156bdba50e7ce
|
||||
F tool/kvtest-speed.sh 4761a9c4b3530907562314d7757995787f7aef8f
|
||||
F tool/lemon.c 5ccba178a8e8a4b21e1c9232944d23973da38ad7
|
||||
F tool/lemon.c c02a8dffa053950c460cc27e524e24a06cbd1c06125ae9d619be0811528cb9bb
|
||||
F tool/lempar.c db1bdb4821f2d8fbd76e577cf3ab18642c8d08d1
|
||||
F tool/libvers.c caafc3b689638a1d88d44bc5f526c2278760d9b9
|
||||
F tool/loadfts.c c3c64e4d5e90e8ba41159232c2189dba4be7b862
|
||||
|
@ -1572,8 +1572,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
|
|||
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
|
||||
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
|
||||
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
|
||||
P 6bf673767b8e5cedef1acff795cbe524fab8db2525c06424db4e038934a33936 1aa0ea8db7580aff8bed2f78117ed50019e5545cef48cab782f512a2599fd0c5
|
||||
R 23e98d199cf27acff0cc1d4208755e74
|
||||
T +closed 1aa0ea8db7580aff8bed2f78117ed50019e5545cef48cab782f512a2599fd0c5
|
||||
P f489b5bb6b35665befdd411c2c55df5258e83cba265d8c4427ba22529cf882a4
|
||||
R 09cedb0a1e3f12dd43403c176a722752
|
||||
U drh
|
||||
Z 6edb0fabfc88ce2a863c335cf5598131
|
||||
Z 8d14d0c30102a27bc4df09a1b38d16b8
|
||||
|
|
|
@ -1 +1 @@
|
|||
f489b5bb6b35665befdd411c2c55df5258e83cba265d8c4427ba22529cf882a4
|
||||
a53799059d4ece246610b6c877ab7088ded3548cbca7149a03deea8ac0e27e68
|
48
tool/lemon.c
48
tool/lemon.c
|
@ -168,12 +168,12 @@ static struct action *Action_new(void);
|
|||
static struct action *Action_sort(struct action *);
|
||||
|
||||
/********** From the file "build.h" ************************************/
|
||||
void FindRulePrecedences();
|
||||
void FindFirstSets();
|
||||
void FindStates();
|
||||
void FindLinks();
|
||||
void FindFollowSets();
|
||||
void FindActions();
|
||||
void FindRulePrecedences(struct lemon*);
|
||||
void FindFirstSets(struct lemon*);
|
||||
void FindStates(struct lemon*);
|
||||
void FindLinks(struct lemon*);
|
||||
void FindFollowSets(struct lemon*);
|
||||
void FindActions(struct lemon*);
|
||||
|
||||
/********* From the file "configlist.h" *********************************/
|
||||
void Configlist_init(void);
|
||||
|
@ -457,7 +457,7 @@ struct state *State_new(void);
|
|||
void State_init(void);
|
||||
int State_insert(struct state *, struct config *);
|
||||
struct state *State_find(struct config *);
|
||||
struct state **State_arrayof(/* */);
|
||||
struct state **State_arrayof(void);
|
||||
|
||||
/* Routines used for efficiency in Configlist_add */
|
||||
|
||||
|
@ -1251,7 +1251,7 @@ static struct config *basis = 0; /* Top of list of basis configs */
|
|||
static struct config **basisend = 0; /* End of list of basis configs */
|
||||
|
||||
/* Return a pointer to a new configuration */
|
||||
PRIVATE struct config *newconfig(){
|
||||
PRIVATE struct config *newconfig(void){
|
||||
struct config *newcfg;
|
||||
if( freelist==0 ){
|
||||
int i;
|
||||
|
@ -1277,7 +1277,7 @@ PRIVATE void deleteconfig(struct config *old)
|
|||
}
|
||||
|
||||
/* Initialized the configuration list builder */
|
||||
void Configlist_init(){
|
||||
void Configlist_init(void){
|
||||
current = 0;
|
||||
currentend = ¤t;
|
||||
basis = 0;
|
||||
|
@ -1287,7 +1287,7 @@ void Configlist_init(){
|
|||
}
|
||||
|
||||
/* Initialized the configuration list builder */
|
||||
void Configlist_reset(){
|
||||
void Configlist_reset(void){
|
||||
current = 0;
|
||||
currentend = ¤t;
|
||||
basis = 0;
|
||||
|
@ -1397,7 +1397,7 @@ void Configlist_closure(struct lemon *lemp)
|
|||
}
|
||||
|
||||
/* Sort the configuration list */
|
||||
void Configlist_sort(){
|
||||
void Configlist_sort(void){
|
||||
current = (struct config*)msort((char*)current,(char**)&(current->next),
|
||||
Configcmp);
|
||||
currentend = 0;
|
||||
|
@ -1405,7 +1405,7 @@ void Configlist_sort(){
|
|||
}
|
||||
|
||||
/* Sort the basis configuration list */
|
||||
void Configlist_sortbasis(){
|
||||
void Configlist_sortbasis(void){
|
||||
basis = (struct config*)msort((char*)current,(char**)&(current->bp),
|
||||
Configcmp);
|
||||
basisend = 0;
|
||||
|
@ -1414,7 +1414,7 @@ void Configlist_sortbasis(){
|
|||
|
||||
/* Return a pointer to the head of the configuration list and
|
||||
** reset the list */
|
||||
struct config *Configlist_return(){
|
||||
struct config *Configlist_return(void){
|
||||
struct config *old;
|
||||
old = current;
|
||||
current = 0;
|
||||
|
@ -1424,7 +1424,7 @@ struct config *Configlist_return(){
|
|||
|
||||
/* Return a pointer to the head of the configuration list and
|
||||
** reset the list */
|
||||
struct config *Configlist_basis(){
|
||||
struct config *Configlist_basis(void){
|
||||
struct config *old;
|
||||
old = basis;
|
||||
basis = 0;
|
||||
|
@ -1466,7 +1466,7 @@ void ErrorMsg(const char *filename, int lineno, const char *format, ...){
|
|||
/* Report an out-of-memory condition and abort. This function
|
||||
** is used mostly by the "MemoryCheck" macro in struct.h
|
||||
*/
|
||||
void memory_error(){
|
||||
void memory_error(void){
|
||||
fprintf(stderr,"Out of memory. Aborting...\n");
|
||||
exit(1);
|
||||
}
|
||||
|
@ -2051,7 +2051,7 @@ int OptInit(char **a, struct s_options *o, FILE *err)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int OptNArgs(){
|
||||
int OptNArgs(void){
|
||||
int cnt = 0;
|
||||
int dashdash = 0;
|
||||
int i;
|
||||
|
@ -2078,7 +2078,7 @@ void OptErr(int n)
|
|||
if( i>=0 ) errline(i,0,errstream);
|
||||
}
|
||||
|
||||
void OptPrint(){
|
||||
void OptPrint(void){
|
||||
int i;
|
||||
int max, len;
|
||||
max = 0;
|
||||
|
@ -2896,7 +2896,7 @@ void Parse(struct lemon *gp)
|
|||
static struct plink *plink_freelist = 0;
|
||||
|
||||
/* Allocate a new plink */
|
||||
struct plink *Plink_new(){
|
||||
struct plink *Plink_new(void){
|
||||
struct plink *newlink;
|
||||
|
||||
if( plink_freelist==0 ){
|
||||
|
@ -4724,7 +4724,7 @@ void SetSize(int n)
|
|||
}
|
||||
|
||||
/* Allocate a new set */
|
||||
char *SetNew(){
|
||||
char *SetNew(void){
|
||||
char *s;
|
||||
s = (char*)calloc( size, 1);
|
||||
if( s==0 ){
|
||||
|
@ -4830,7 +4830,7 @@ typedef struct s_x1node {
|
|||
static struct s_x1 *x1a;
|
||||
|
||||
/* Allocate a new associative array */
|
||||
void Strsafe_init(){
|
||||
void Strsafe_init(void){
|
||||
if( x1a ) return;
|
||||
x1a = (struct s_x1*)malloc( sizeof(struct s_x1) );
|
||||
if( x1a ){
|
||||
|
@ -4997,7 +4997,7 @@ typedef struct s_x2node {
|
|||
static struct s_x2 *x2a;
|
||||
|
||||
/* Allocate a new associative array */
|
||||
void Symbol_init(){
|
||||
void Symbol_init(void){
|
||||
if( x2a ) return;
|
||||
x2a = (struct s_x2*)malloc( sizeof(struct s_x2) );
|
||||
if( x2a ){
|
||||
|
@ -5194,7 +5194,7 @@ typedef struct s_x3node {
|
|||
static struct s_x3 *x3a;
|
||||
|
||||
/* Allocate a new associative array */
|
||||
void State_init(){
|
||||
void State_init(void){
|
||||
if( x3a ) return;
|
||||
x3a = (struct s_x3*)malloc( sizeof(struct s_x3) );
|
||||
if( x3a ){
|
||||
|
@ -5288,7 +5288,7 @@ struct state *State_find(struct config *key)
|
|||
/* Return an array of pointers to all data in the table.
|
||||
** The array is obtained from malloc. Return NULL if memory allocation
|
||||
** problems, or if the array is empty. */
|
||||
struct state **State_arrayof()
|
||||
struct state **State_arrayof(void)
|
||||
{
|
||||
struct state **array;
|
||||
int i,arrSize;
|
||||
|
@ -5334,7 +5334,7 @@ typedef struct s_x4node {
|
|||
static struct s_x4 *x4a;
|
||||
|
||||
/* Allocate a new associative array */
|
||||
void Configtable_init(){
|
||||
void Configtable_init(void){
|
||||
if( x4a ) return;
|
||||
x4a = (struct s_x4*)malloc( sizeof(struct s_x4) );
|
||||
if( x4a ){
|
||||
|
|
Loading…
Reference in New Issue