1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
|
/*
** Return true if the string zVal represents "true" (or "false").
*/
int is_truth(const char *zVal){
static const char *azOn[] = { "on", "yes", "true", "1" };
int i;
for(i=0; i<sizeof(azOn)/sizeof(azOn[0]); i++){
if( fossil_strcmp(zVal,azOn[i])==0 ) return 1;
}
return 0;
}
int is_false(const char *zVal){
static const char *azOff[] = { "off", "no", "false", "0" };
int i;
for(i=0; i<sizeof(azOff)/sizeof(azOff[0]); i++){
if( fossil_strcmp(zVal,azOff[i])==0 ) return 1;
}
return 0;
}
/*
** Swap the g.db and g.dbConfig connections so that the various db_* routines
** work on the ~/.fossil database instead of on the repository database.
|
|
|
|
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
|
/*
** Return true if the string zVal represents "true" (or "false").
*/
int is_truth(const char *zVal){
static const char *azOn[] = { "on", "yes", "true", "1" };
int i;
for(i=0; i<sizeof(azOn)/sizeof(azOn[0]); i++){
if( fossil_stricmp(zVal,azOn[i])==0 ) return 1;
}
return 0;
}
int is_false(const char *zVal){
static const char *azOff[] = { "off", "no", "false", "0" };
int i;
for(i=0; i<sizeof(azOff)/sizeof(azOff[0]); i++){
if( fossil_stricmp(zVal,azOff[i])==0 ) return 1;
}
return 0;
}
/*
** Swap the g.db and g.dbConfig connections so that the various db_* routines
** work on the ~/.fossil database instead of on the repository database.
|
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
|
#endif /* INTERFACE */
struct stControlSettings const ctrlSettings[] = {
{ "access-log", 0, 0, "off" },
{ "auto-captcha", "autocaptcha", 0, "on" },
{ "auto-shun", 0, 0, "on" },
{ "autosync", 0, 0, "on" },
{ "binary-glob", 0, 32, "" },
{ "clearsign", 0, 0, "off" },
{ "crnl-glob", 0, 16, "" },
{ "default-perms", 0, 16, "u" },
{ "diff-command", 0, 16, "" },
{ "dont-push", 0, 0, "off" },
{ "editor", 0, 16, "" },
{ "gdiff-command", 0, 16, "gdiff" },
|
>
|
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
|
#endif /* INTERFACE */
struct stControlSettings const ctrlSettings[] = {
{ "access-log", 0, 0, "off" },
{ "auto-captcha", "autocaptcha", 0, "on" },
{ "auto-shun", 0, 0, "on" },
{ "autosync", 0, 0, "on" },
{ "binary-glob", 0, 32, "" },
{ "case-sensitive",0, 0, "on" },
{ "clearsign", 0, 0, "off" },
{ "crnl-glob", 0, 16, "" },
{ "default-perms", 0, 16, "u" },
{ "diff-command", 0, 16, "" },
{ "dont-push", 0, 0, "off" },
{ "editor", 0, 16, "" },
{ "gdiff-command", 0, 16, "gdiff" },
|