1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
|
** an error message and quit.
**
** Exception: if "--" is encountered, it is consumed from the argument
** list and this function immediately returns. The effect is to treat
** all arguments after "--" as non-flags (conventionally used to
** enable passing-in of filenames which start with a dash).
**
** This function must only be called one time per app invokation.
** Calling it more than once results in undefined behaviour.
*/
void verify_all_options(void){
int i;
for(i=1; i<g.argc; i++){
const char * arg = g.argv[i];
if( arg[0]=='-' ){
if( arg[1]=='-' && arg[2]==0 ){
|
|
|
>
>
>
>
|
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
|
** an error message and quit.
**
** Exception: if "--" is encountered, it is consumed from the argument
** list and this function immediately returns. The effect is to treat
** all arguments after "--" as non-flags (conventionally used to
** enable passing-in of filenames which start with a dash).
**
** This function must normally only be called one time per app
** invokation. The exception is commands which process their
** arguments, call this to confirm that there are no extraneous flags,
** then modify the arguments list for forwarding to another
** (sub)command (which itself will call this to confirm its own
** arguments).
*/
void verify_all_options(void){
int i;
for(i=1; i<g.argc; i++){
const char * arg = g.argv[i];
if( arg[0]=='-' ){
if( arg[1]=='-' && arg[2]==0 ){
|