mirror of
https://git.savannah.gnu.org/git/tar.git
synced 2026-04-21 17:10:39 +00:00
Using such options as -f, -z, etc. is senseless in the file list file and bypasses the option consistency checks in decode_options. Therefore, only options related to file selection (a.k.a position-sensitive options) are allowed in files. * doc/tar.texi: Document changes. * src/common.h (tar_args): Move from tar.c (TAR_ARGS_INITIALIZER): New macro. * src/names.c: Declare option group identifiers as an enum. (names_parse_opt): Special handling for ARGP_KEY_ERROR. (names_argp): Remove static qualifier. (names_argp_children): Remove. * src/tar.c: Declare option group identifiers as an enum. (parse_opt): Special handling for ARGP_KEY_INIT. (argp_children): New static variable. (args): Remove static variable. (more_options): Allow only options from names_argp. (parse_default_options): Take a pointer to struct tar_args as argument. Replace the loc member during the call to argp_parse and restore it afterwards. (decode_options): Use automatic variable for args.