- {
- args = strtok (args, ",");
- while (args)
- {
- int value = 0;
- int *save_flags = flags;
- int no = STRPREFIX_LIT ("no-", args) ? 3 : 0;
- int err = STRPREFIX_LIT ("error", args + no) ? 5 : 0;
-
- if (err)
- flags = &errors_flag;
- if (!err || args[no + err++] != '\0')
- value = XARGMATCH (option, args + no + err, keys, values);
-
- if (!value)
- {
- /* With a simpler 'if (no)' version, -Werror means -Werror=all
- (or rather, -Werror=no-none, but that syntax is invalid).
- The difference is:
- - Werror activates all errors, but not the warnings
- - Werror=all activates errors, and all warnings */
- if (no ? !err : err)
- *flags |= all;
- else
- *flags &= ~all;
- }
- else
- {
- if (no)
- *flags &= ~value;
- else
- {
- if (err)
- warnings_flag |= value;
- *flags |= value;
- }
- }
- flags = save_flags;
- args = strtok (NULL, ",");
- }
- }
+ for (args = strtok (args, ","); args; args = strtok (NULL, ","))
+ {
+ size_t no = STRPREFIX_LIT ("no-", args) ? 3 : 0;
+ flag_argmatch (option, keys,
+ values, all, flags, args, no);
+ }