MCPcopy Create free account
hub / github.com/apple/foundationdb / booleanValue

Function booleanValue

contrib/sqlite/shell.c:1451–1463  ·  view source on GitHub ↗

** Interpret zArg as a boolean value. Return either 0 or 1. */

Source from the content-addressed store, hash-verified

1449** Interpret zArg as a boolean value. Return either 0 or 1.
1450*/
1451static int booleanValue(char* zArg) {
1452 int val = atoi(zArg);
1453 int j;
1454 for (j = 0; zArg[j]; j++) {
1455 zArg[j] = (char)tolower(zArg[j]);
1456 }
1457 if (strcmp(zArg, "on") == 0) {
1458 val = 1;
1459 } else if (strcmp(zArg, "yes") == 0) {
1460 val = 1;
1461 }
1462 return val;
1463}
1464
1465/*
1466** If an input line begins with "." then invoke this routine to

Callers 1

do_meta_commandFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected