| 16236 | #define AR_SWITCH_DRYRUN 11 |
| 16237 | |
| 16238 | static int arProcessSwitch(ArCommand *pAr, int eSwitch, const char *zArg){ |
| 16239 | switch( eSwitch ){ |
| 16240 | case AR_CMD_CREATE: |
| 16241 | case AR_CMD_EXTRACT: |
| 16242 | case AR_CMD_LIST: |
| 16243 | case AR_CMD_UPDATE: |
| 16244 | case AR_CMD_INSERT: |
| 16245 | case AR_CMD_HELP: |
| 16246 | if( pAr->eCmd ){ |
| 16247 | return arErrorMsg(pAr, "multiple command options"); |
| 16248 | } |
| 16249 | pAr->eCmd = eSwitch; |
| 16250 | break; |
| 16251 | |
| 16252 | case AR_SWITCH_DRYRUN: |
| 16253 | pAr->bDryRun = 1; |
| 16254 | break; |
| 16255 | case AR_SWITCH_VERBOSE: |
| 16256 | pAr->bVerbose = 1; |
| 16257 | break; |
| 16258 | case AR_SWITCH_APPEND: |
| 16259 | pAr->bAppend = 1; |
| 16260 | /* Fall thru into --file */ |
| 16261 | case AR_SWITCH_FILE: |
| 16262 | pAr->zFile = zArg; |
| 16263 | break; |
| 16264 | case AR_SWITCH_DIRECTORY: |
| 16265 | pAr->zDir = zArg; |
| 16266 | break; |
| 16267 | } |
| 16268 | |
| 16269 | return SQLITE_OK; |
| 16270 | } |
| 16271 | |
| 16272 | /* |
| 16273 | ** Parse the command line for an ".ar" command. The results are written into |
no test coverage detected