Fossil

Check-in [6edf8bcd]
Login

Check-in [6edf8bcd]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Clarified a falsehood in the new verify_all_options() docs.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | double-dash-flag2
Files: files | file ages | folders
SHA3-256: 6edf8bcd9ab0784a48081be82f77cc50a4b49a57dab76682b777d7d4655cb637
User & Date: stephan 2019-10-03 15:19:42
Context
2019-10-10
05:49
Merged in trunk. ... (Closed-Leaf check-in: 22150aba user: stephan tags: double-dash-flag2)
2019-10-03
15:19
Clarified a falsehood in the new verify_all_options() docs. ... (check-in: 6edf8bcd user: stephan tags: double-dash-flag2)
2019-10-02
16:14
Removed a debugging-only function. ... (check-in: 05cde4f8 user: stephan tags: double-dash-flag2)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/main.c.
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 ){