summaryrefslogtreecommitdiffstats
path: root/compat/getopt.in
Commit message (Collapse)AuthorAgeFilesLines
* compat/getopt: Allow non-digit parameter embedded in short optionJean Delvare2018-10-091-9/+4
| | | | | | | | | | | | | | | | | | | The compatibility getopt script allows only digit parameters to be embedded in short options. Util-linux's getopt implementation does not have such a restriction and allows any parameter to be embedded in short options. As a consequence, using the compatibility getopt script would choke for example on "-pab", which is a legal option of the "quilt refresh" command. Remove the limitation on digits so that the compatibility getopt script allows what util-linux allows. This fixes the second half of bug #54772: https://savannah.nongnu.org/bugs/index.php?54772 As a side note, this feature of the compatibility script was broken anyway, as it would output the digits in reverse order. Signed-off-by: Jean Delvare <jdelvare@suse.de>
* compat/getopt: Handle a second separatorJean Delvare2018-10-091-3/+10
| | | | | | | | | | | | | | | | | | getopt can be passed 2 '--' separators. The first one tells that getopt options are over and target program options start. The second one tells that the target program's options are over and following arguments should be treated as non-options even if they look like options. This second separator was not handled, causing the compatibility getopt script to treat the following arguments as options, eventually failing one way or another. Properly detect and handle the second separator. This fixes the first half of bug #54772: https://savannah.nongnu.org/bugs/index.php?54772 Signed-off-by: Jean Delvare <jdelvare@suse.de>
* Tree-wide white-space cleanupsJean Delvare2014-01-201-1/+0
| | | | | | | * Delete blank lines at end of files. * Delete white space at end of lines. * Delete spaces before tab. * Replace 8 spaces by a tab where it makes sense.
* compat/getopt.in: Add support of options with optional parametersJean Delvare2011-03-151-3/+17
| | | | | Both short and long options are supported. This is required to pass the test suite, if nothing else.
* compat/getopt.in: Fix quoting and spacingJean Delvare2011-03-151-8/+15
| | | | | | This way the output matches exactly the output of getopt from util-linux, and spaces and other special characters in filenames are properly supported.
* - compat/getopt.in: Ignore option -q, rather than failing on it.Jean Delvare2006-04-191-1/+2
| | | | | This prevents the test suite from failing on patch-wrapper when --without-getopt is used. Reported by Markus Oberhumer.
* - compat/getopt.in: Remove duplicate test.Jean Delvare2006-04-151-1/+0
|
* - Properly handle spaces in arguments to getopt.Andreas Gruenbacher2006-01-301-8/+24
|
* - Forgot to add new files to the repository.Andreas Gruenbacher2005-09-181-0/+98