329
330
331
332
333
334
335
336
337
338
339
340
341
342
|
const char *find_option(const char *zLong, const char *zShort, int hasArg){
int i;
int nLong;
const char *zReturn = 0;
assert( hasArg==0 || hasArg==1 );
nLong = strlen(zLong);
for(i=2; i<g.argc; i++){
char *z = g.argv[i];
if( z[0]!='-' ) continue;
z++;
if( z[0]=='-' ){
if( z[1]==0 ){
remove_from_argv(i, 1);
break;
|
>
|
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
|
const char *find_option(const char *zLong, const char *zShort, int hasArg){
int i;
int nLong;
const char *zReturn = 0;
assert( hasArg==0 || hasArg==1 );
nLong = strlen(zLong);
for(i=2; i<g.argc; i++){
if (i+hasArg >= g.argc) break;
char *z = g.argv[i];
if( z[0]!='-' ) continue;
z++;
if( z[0]=='-' ){
if( z[1]==0 ){
remove_from_argv(i, 1);
break;
|
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
|
** Any remaining command-line argument begins with "-" print
** an error message and quit.
*/
void verify_all_options(void){
int i;
for(i=1; i<g.argc; i++){
if( g.argv[i][0]=='-' ){
fossil_fatal("unrecognized command-line option: %s", g.argv[i]);
}
}
}
/*
** Print a list of words in multiple columns.
*/
|
|
|
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
|
** Any remaining command-line argument begins with "-" print
** an error message and quit.
*/
void verify_all_options(void){
int i;
for(i=1; i<g.argc; i++){
if( g.argv[i][0]=='-' ){
fossil_fatal("unrecognized command-line option, or missing argument: %s", g.argv[i]);
}
}
}
/*
** Print a list of words in multiple columns.
*/
|