/ Check-in [84d760bf]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Pull the latest Lemon updates from the lemon-update-2010 branch into the trunk.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:84d760bfc1d219fda99901061bb5db2cafe9eb1d
User & Date: drh 2010-03-03 22:43:38
Context
2010-03-04
00:53
Increase the maximum length of an sqlite3_log() result string. Provide more details on the statement abort log message. check-in: 5322d1df user: drh tags: trunk
2010-03-03
22:43
Pull the latest Lemon updates from the lemon-update-2010 branch into the trunk. check-in: 84d760bf user: drh tags: trunk
22:25
Modify the sqlite3_log() interface and implementation so that it never uses dynamic memory allocation - to avoid deadlocking when called while holding the memory allocator mutex. check-in: 28d1bc98 user: drh tags: trunk
17:09
Fixed compiler warning on Visual Studio. check-in: 83495128 user: icculus tags: lemon-update-2010
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to tool/lemon.c.

41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
...
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
....
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
{
    /* if we failed, delete (most) files we made, to unconfuse build tools. */
    int i;
    for (i = 0; i < made_files_count; i++) {
        if (!successful_exit) {
            remove(made_files[i]);
        }
        free((void *) made_files[i]);
    }
    free(made_files);
    made_files_count = 0;
    made_files = NULL;
}

static char *msort(char*,char**,int(*)(const char*,const char*));
................................................................................
  if( rc==0 ){
    rc = (int)ap1->type - (int)ap2->type;
  }
  if( rc==0 && ap1->type==REDUCE ){
    rc = ap1->x.rp->index - ap2->x.rp->index;
  }
  if( rc==0 ){
    rc = ap2 - ap1;
  }
  return rc;
}

/* Sort parser actions */
static struct action *Action_sort(
  struct action *ap
................................................................................
  ** is to keep makefiles from getting confused. We don't include .out files,
  ** though: this is debug information, and you don't want it deleted if there
  ** was an error you need to track down.
  */
  if(( *mode=='w' ) && (strcmp(suffix, ".out") != 0)){
    const char **ptr = (const char **)
        realloc(made_files, sizeof (const char **) * (made_files_count + 1));
    char *fname = strdup(lemp->outname);
    if ((ptr == NULL) || (fname == NULL)) {
        free(ptr);
        free(fname);
        memory_error();
    }
    made_files = ptr;
    made_files[made_files_count++] = fname;
  }
  return fp;
}







<







 







|







 







|


<







41
42
43
44
45
46
47

48
49
50
51
52
53
54
...
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
....
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763

2764
2765
2766
2767
2768
2769
2770
{
    /* if we failed, delete (most) files we made, to unconfuse build tools. */
    int i;
    for (i = 0; i < made_files_count; i++) {
        if (!successful_exit) {
            remove(made_files[i]);
        }

    }
    free(made_files);
    made_files_count = 0;
    made_files = NULL;
}

static char *msort(char*,char**,int(*)(const char*,const char*));
................................................................................
  if( rc==0 ){
    rc = (int)ap1->type - (int)ap2->type;
  }
  if( rc==0 && ap1->type==REDUCE ){
    rc = ap1->x.rp->index - ap2->x.rp->index;
  }
  if( rc==0 ){
    rc = (int) (ap2 - ap1);
  }
  return rc;
}

/* Sort parser actions */
static struct action *Action_sort(
  struct action *ap
................................................................................
  ** is to keep makefiles from getting confused. We don't include .out files,
  ** though: this is debug information, and you don't want it deleted if there
  ** was an error you need to track down.
  */
  if(( *mode=='w' ) && (strcmp(suffix, ".out") != 0)){
    const char **ptr = (const char **)
        realloc(made_files, sizeof (const char **) * (made_files_count + 1));
    const char *fname = Strsafe(lemp->outname);
    if ((ptr == NULL) || (fname == NULL)) {
        free(ptr);

        memory_error();
    }
    made_files = ptr;
    made_files[made_files_count++] = fname;
  }
  return fp;
}