MCPcopy Create free account
hub / github.com/GaijinEntertainment/daScript / arProcessSwitch

Function arProcessSwitch

modules/dasSQLITE/sqlite/shell.c:21994–22030  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21992#define AR_SWITCH_GLOB 13
21993
21994static int arProcessSwitch(ArCommand *pAr, int eSwitch, const char *zArg){
21995 switch( eSwitch ){
21996 case AR_CMD_CREATE:
21997 case AR_CMD_EXTRACT:
21998 case AR_CMD_LIST:
21999 case AR_CMD_REMOVE:
22000 case AR_CMD_UPDATE:
22001 case AR_CMD_INSERT:
22002 case AR_CMD_HELP:
22003 if( pAr->eCmd ){
22004 return arErrorMsg(pAr, "multiple command options");
22005 }
22006 pAr->eCmd = eSwitch;
22007 break;
22008
22009 case AR_SWITCH_DRYRUN:
22010 pAr->bDryRun = 1;
22011 break;
22012 case AR_SWITCH_GLOB:
22013 pAr->bGlob = 1;
22014 break;
22015 case AR_SWITCH_VERBOSE:
22016 pAr->bVerbose = 1;
22017 break;
22018 case AR_SWITCH_APPEND:
22019 pAr->bAppend = 1;
22020 deliberate_fall_through;
22021 case AR_SWITCH_FILE:
22022 pAr->zFile = zArg;
22023 break;
22024 case AR_SWITCH_DIRECTORY:
22025 pAr->zDir = zArg;
22026 break;
22027 }
22028
22029 return SQLITE_OK;
22030}
22031
22032/*
22033** Parse the command line for an ".ar" command. The results are written into

Callers 1

arParseCommandFunction · 0.85

Calls 1

arErrorMsgFunction · 0.85

Tested by

no test coverage detected