|
From: | GNU bug Tracking System |
Subject: | [debbugs-tracker] bug#12966: closed (cut: Problems with overlapping, open-ended ranges) |
Date: | Sun, 25 Nov 2012 15:53:02 +0000 |
Your message dated Sun, 25 Nov 2012 16:50:35 +0100 with message-id <address@hidden> and subject line Re: bug#12966: cut: Problems with overlapping, open-ended ranges has caused the debbugs.gnu.org bug report #12966, regarding cut: Problems with overlapping, open-ended ranges to be marked as done. (If you believe you have received this mail in error, please contact address@hidden) -- 12966: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=12966 GNU Bug Tracking System Contact address@hidden with problems
--- Begin Message ---Subject: cut: Problems with overlapping, open-ended ranges Date: Fri, 23 Nov 2012 09:11:46 +0100 (CET) Hi,I found two (semantically related) bugs. One seems to originate in the first version. For research purposes, I would appreciate if you could confirm that the second was introduced with Coreutils 5.3.0.1) The following bug seems to exists "since the beginning".$echo 1234567890 | ./cut -b 2-,3,4-4,5,9-
3590
$echo 1234567890 | ./cut -b 2-,3,4-4,5,9-10
234567890$echo 1234567890 | ./cut -b 2-10,3,4-4,5,9-
2345678902) Can you kindly confirm that the following bug has been introduced with Coreutils 5.3.0, particularly commit http://git.savannah.gnu.org/gitweb/?p=coreutils.git;a=commit;h=7380cf792aa35b9328519c5f374036d5260704cb ?$echo 1234567890 | ./cut -b 2-,3,4-4,5 --output-delimiter="."
2.34.567890$echo 1234567890 | ./cut -b 2-10,3,4-4,5 --output-delimiter="."
234567890
Best regards,Marcel
--- End Message ---
--- Begin Message ---Subject: Re: bug#12966: cut: Problems with overlapping, open-ended ranges Date: Sun, 25 Nov 2012 16:50:35 +0100 Pádraig Brady wrote: > On 11/24/2012 07:40 PM, Jim Meyering wrote: > >> diff --git a/src/cut.c b/src/cut.c >> index b464840..4219d24 100644 >> --- a/src/cut.c >> +++ b/src/cut.c >> @@ -514,17 +514,18 @@ set_fields (const char *fieldstr) >> /* Set the array entries corresponding to integers in the ranges of RP. >> */ >> for (i = 0; i < n_rp; i++) >> { >> - size_t j; >> - size_t rsi_candidate; >> + /* Ignore any range that is subsumed by the to-EOL range. */ >> + if (eol_range_start && eol_range_start <= rp[i].lo) >> + continue; > > looks good. Pushed (and marked "done"). Thanks for the review.
--- End Message ---
[Prev in Thread] | Current Thread | [Next in Thread] |