diff options
author | drh <> | 2024-06-27 14:54:15 +0000 |
---|---|---|
committer | drh <> | 2024-06-27 14:54:15 +0000 |
commit | c96e47c80e67d3a21c591ccb3432f3c18153f8aa (patch) | |
tree | 2b1d1087e7a55cb08e9fe8dfe4d5aad3d674dc31 /tool/lemon.c | |
parent | 620a00ee32c64944289bc8ff8c37b23bb4e220a1 (diff) | |
parent | 105c20648e1b05839fd0638686b95f2e3998abcb (diff) | |
download | sqlite-c96e47c80e67d3a21c591ccb3432f3c18153f8aa.tar.gz sqlite-c96e47c80e67d3a21c591ccb3432f3c18153f8aa.zip |
Merge the latest trunk enhancements into the exists-to-join branch.
FossilOrigin-Name: fc643f8a12e9b7448136b281f798e18dfebe0a3df5115d930b965c8a33933e2d
Diffstat (limited to 'tool/lemon.c')
-rw-r--r-- | tool/lemon.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tool/lemon.c b/tool/lemon.c index 06b9109a1..d92df2a1a 100644 --- a/tool/lemon.c +++ b/tool/lemon.c @@ -1709,6 +1709,15 @@ static void stats_line(const char *zLabel, int iValue){ iValue); } +/* +** Comparison function used by qsort() to sort the azDefine[] array. +*/ +static int defineCmp(const void *pA, const void *pB){ + const char *zA = *(const char**)pA; + const char *zB = *(const char**)pB; + return strcmp(zA,zB); +} + /* The main program. Parse the command line and do it... */ int main(int argc, char **argv){ static int version = 0; @@ -1764,6 +1773,7 @@ int main(int argc, char **argv){ } memset(&lem, 0, sizeof(lem)); lem.errorcnt = 0; + qsort(azDefine, nDefine, sizeof(azDefine[0]), defineCmp); /* Initialize the machine */ Strsafe_init(); |