Fossil SCM
Clarified a falsehood in the new verify_all_options() docs.
Commit
6edf8bcd9ab0784a48081be82f77cc50a4b49a57dab76682b777d7d4655cb637
Parent
05cde4f8eb04e98…
1 file changed
+6
-2
+6
-2
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -1041,12 +1041,16 @@ | ||
| 1041 | 1041 | ** Exception: if "--" is encountered, it is consumed from the argument |
| 1042 | 1042 | ** list and this function immediately returns. The effect is to treat |
| 1043 | 1043 | ** all arguments after "--" as non-flags (conventionally used to |
| 1044 | 1044 | ** enable passing-in of filenames which start with a dash). |
| 1045 | 1045 | ** |
| 1046 | -** This function must only be called one time per app invokation. | |
| 1047 | -** Calling it more than once results in undefined behaviour. | |
| 1046 | +** This function must normally only be called one time per app | |
| 1047 | +** invokation. The exception is commands which process their | |
| 1048 | +** arguments, call this to confirm that there are no extraneous flags, | |
| 1049 | +** then modify the arguments list for forwarding to another | |
| 1050 | +** (sub)command (which itself will call this to confirm its own | |
| 1051 | +** arguments). | |
| 1048 | 1052 | */ |
| 1049 | 1053 | void verify_all_options(void){ |
| 1050 | 1054 | int i; |
| 1051 | 1055 | for(i=1; i<g.argc; i++){ |
| 1052 | 1056 | const char * arg = g.argv[i]; |
| 1053 | 1057 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -1041,12 +1041,16 @@ | |
| 1041 | ** Exception: if "--" is encountered, it is consumed from the argument |
| 1042 | ** list and this function immediately returns. The effect is to treat |
| 1043 | ** all arguments after "--" as non-flags (conventionally used to |
| 1044 | ** enable passing-in of filenames which start with a dash). |
| 1045 | ** |
| 1046 | ** This function must only be called one time per app invokation. |
| 1047 | ** Calling it more than once results in undefined behaviour. |
| 1048 | */ |
| 1049 | void verify_all_options(void){ |
| 1050 | int i; |
| 1051 | for(i=1; i<g.argc; i++){ |
| 1052 | const char * arg = g.argv[i]; |
| 1053 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -1041,12 +1041,16 @@ | |
| 1041 | ** Exception: if "--" is encountered, it is consumed from the argument |
| 1042 | ** list and this function immediately returns. The effect is to treat |
| 1043 | ** all arguments after "--" as non-flags (conventionally used to |
| 1044 | ** enable passing-in of filenames which start with a dash). |
| 1045 | ** |
| 1046 | ** This function must normally only be called one time per app |
| 1047 | ** invokation. The exception is commands which process their |
| 1048 | ** arguments, call this to confirm that there are no extraneous flags, |
| 1049 | ** then modify the arguments list for forwarding to another |
| 1050 | ** (sub)command (which itself will call this to confirm its own |
| 1051 | ** arguments). |
| 1052 | */ |
| 1053 | void verify_all_options(void){ |
| 1054 | int i; |
| 1055 | for(i=1; i<g.argc; i++){ |
| 1056 | const char * arg = g.argv[i]; |
| 1057 |