GNU bug report logs -
#13525
8.20 - [seq 1 3 1] treated as [seq 1 3]
Previous Next
Reported by: "Marcel Böhme" <hawkie <at> web.de>
Date: Tue, 22 Jan 2013 10:45:02 UTC
Severity: normal
Found in version 8.20
Done: Pádraig Brady <P <at> draigBrady.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your bug report
#13525: 8.20 - [seq 1 3 1] treated as [seq 1 3]
which was filed against the coreutils package, has been closed.
The explanation is attached below, along with your original report.
If you require more details, please reply to 13525 <at> debbugs.gnu.org.
--
13525: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13525
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
[Message part 3 (text/plain, inline)]
On 01/22/2013 10:43 AM, Marcel Böhme wrote:
>
> Dear all,
>
> There is another bug that sneaked into the speed patch of seq on 13.09.12:
>
> 560 if (all_digits_p (argv[optind])
> 561 && (n_args == 1 || all_digits_p (argv[optind + 1]))
> 562 && (n_args < 3 || STREQ ("1", argv[optind + 2]))
> 563 && !equal_width && !format_str && strlen (separator) == 1)
>
> That should probably be:
> 560 if (all_digits_p (argv[optind])
> 561 && (n_args == 1 || all_digits_p (argv[optind + 1]))
> 562 && (n_args < 3 || STREQ ("1", argv[optind + 1]))
> 563 && !equal_width && !format_str && strlen (separator) == 1)
Sigh we really messed up seq in that release :(
The attached should fix it:
I also notice another regression,
which I'll fix in a moment.
$ seq 0 1 0
0
1
thanks,
Pádraig.
[seq-ignored-step.diff (text/x-patch, attachment)]
[Message part 5 (message/rfc822, inline)]
Dear all,
There is another bug that sneaked into the speed patch of seq on 13.09.12:
560 if (all_digits_p (argv[optind])
561 && (n_args == 1 || all_digits_p (argv[optind + 1]))
562 && (n_args < 3 || STREQ ("1", argv[optind + 2]))
563 && !equal_width && !format_str && strlen (separator) == 1)
That should probably be:
560 if (all_digits_p (argv[optind])
561 && (n_args == 1 || all_digits_p (argv[optind + 1]))
562 && (n_args < 3 || STREQ ("1", argv[optind + 1]))
563 && !equal_width && !format_str && strlen (separator) == 1)
Best regards,
Marcel
This bug report was last modified 12 years and 179 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.