Fossil

Check-in [df654bd9]
Login

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

Overview
Comment:Add a blank entry to the end of the Setting array so that loops can be terminated by checking for a null zName pointer.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:df654bd9938d9dca655c635da522c78345045f37f82bd7d5954f95bf8348bdb3
User & Date: drh 2017-10-30 13:20:52
Context
2017-10-30
13:22
Fix a typo that prevented the diff-binary setting from being picked up by the mkindex.c comment scanner. check-in: 2eea7584 user: drh tags: trunk
13:20
Add a blank entry to the end of the Setting array so that loops can be terminated by checking for a null zName pointer. check-in: df654bd9 user: drh tags: trunk
2017-10-29
23:59
Update the 2.4 change log. check-in: 266a311b user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/dispatch.c.

655
656
657
658
659
660
661
662
663
664
/*
** Return a pointer to the setting information array.
**
** This routine provides access to the aSetting2[] array which is created
** by the mkindex utility program and included with <page_index.h>.
*/
const Setting *setting_info(int *pnCount){
  if( pnCount ) *pnCount = (int)(sizeof(aSetting)/sizeof(aSetting[0]));
  return aSetting;
}







|


655
656
657
658
659
660
661
662
663
664
/*
** Return a pointer to the setting information array.
**
** This routine provides access to the aSetting2[] array which is created
** by the mkindex utility program and included with <page_index.h>.
*/
const Setting *setting_info(int *pnCount){
  if( pnCount ) *pnCount = (int)(sizeof(aSetting)/sizeof(aSetting[0])) - 1;
  return aSetting;
}

Changes to src/mkindex.c.

478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
      (aEntry[i].eType & CMDFLAG_BLOCKTEXT)!=0,
      zDef, (int)(10-strlen(zDef)), ""
    );
    if( aEntry[i].zIf ){
      printf("#endif\n");
    }
  }
  printf("};\n");

}

/*
** Process a single file of input
*/
void process_file(void){







|







478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
      (aEntry[i].eType & CMDFLAG_BLOCKTEXT)!=0,
      zDef, (int)(10-strlen(zDef)), ""
    );
    if( aEntry[i].zIf ){
      printf("#endif\n");
    }
  }
  printf("{0,0,0,0,0,0}};\n");

}

/*
** Process a single file of input
*/
void process_file(void){