From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 09 12:48:42 2012 Received: (at submit) by debbugs.gnu.org; 9 Mar 2012 17:48:42 +0000 Received: from localhost ([127.0.0.1]:40815 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S63vl-0001EK-QT for submit@debbugs.gnu.org; Fri, 09 Mar 2012 12:48:42 -0500 Received: from eggs.gnu.org ([208.118.235.92]:39373) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S63vj-0001ED-HX for submit@debbugs.gnu.org; Fri, 09 Mar 2012 12:48:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S63uk-0001AR-Q0 for submit@debbugs.gnu.org; Fri, 09 Mar 2012 12:47:42 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:47065) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S63uk-0001AM-NC for submit@debbugs.gnu.org; Fri, 09 Mar 2012 12:47:38 -0500 Received: from eggs.gnu.org ([208.118.235.92]:50744) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S63ue-00048T-NF for bug-coreutils@gnu.org; Fri, 09 Mar 2012 12:47:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S63ud-00019S-07 for bug-coreutils@gnu.org; Fri, 09 Mar 2012 12:47:32 -0500 Received: from mx.meyering.net ([88.168.87.75]:34959) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S63uc-00019G-PD for bug-coreutils@gnu.org; Fri, 09 Mar 2012 12:47:30 -0500 Received: from rho.meyering.net (localhost.localdomain [127.0.0.1]) by rho.meyering.net (Acme Bit-Twister) with ESMTP id 4312E60019 for ; Fri, 9 Mar 2012 18:47:29 +0100 (CET) From: Jim Meyering To: bug-coreutils@gnu.org Subject: ready for a release? Date: Fri, 09 Mar 2012 18:47:29 +0100 Message-ID: <87y5r9is3y.fsf@rho.meyering.net> Lines: 4 MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) There are more than enough new features to justify a release, not to mention the three bug fixes. Anything worth waiting for? From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 09 12:51:26 2012 Received: (at control) by debbugs.gnu.org; 9 Mar 2012 17:51:26 +0000 Received: from localhost ([127.0.0.1]:40821 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S63yP-0001Iv-LJ for submit@debbugs.gnu.org; Fri, 09 Mar 2012 12:51:26 -0500 Received: from mx.meyering.net ([88.168.87.75]:51259) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S63yN-0001Io-BU for control@debbugs.gnu.org; Fri, 09 Mar 2012 12:51:24 -0500 Received: from rho.meyering.net (localhost.localdomain [127.0.0.1]) by rho.meyering.net (Acme Bit-Twister) with ESMTP id 9AF7C60019 for ; Fri, 9 Mar 2012 18:50:25 +0100 (CET) From: Jim Meyering To: control@debbugs.gnu.org Subject: notabug Date: Fri, 09 Mar 2012 18:50:25 +0100 Message-ID: <87sjhhirz2.fsf@rho.meyering.net> Lines: 1 MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) tags 10983 notabug From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 09 13:19:21 2012 Received: (at 10983-done) by debbugs.gnu.org; 9 Mar 2012 18:19:21 +0000 Received: from localhost ([127.0.0.1]:40887 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S64PQ-0002lo-Jg for submit@debbugs.gnu.org; Fri, 09 Mar 2012 13:19:21 -0500 Received: from mail2.vodafone.ie ([213.233.128.44]:56650) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S64PO-0002lg-CR for 10983-done@debbugs.gnu.org; Fri, 09 Mar 2012 13:19:19 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgUEADpIWk9tTGxd/2dsb2JhbAAMNrI8gXcDhBsBAQEEMgFGEAsNCwkWDwkDAgECAUUGAQwBBwEBvzOLM4VFBJtRihSCYw Received: from unknown (HELO [192.168.1.79]) ([109.76.108.93]) by mail2.vodafone.ie with ESMTP; 09 Mar 2012 18:18:21 +0000 Message-ID: <4F5A496B.8090000@draigBrady.com> Date: Fri, 09 Mar 2012 18:18:19 +0000 From: =?ISO-8859-1?Q?P=E1draig_Brady?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0) Gecko/20110816 Thunderbird/6.0 MIME-Version: 1.0 To: Jim Meyering , Coreutils Subject: Re: bug#10983: ready for a release? References: <87y5r9is3y.fsf@rho.meyering.net> In-Reply-To: <87y5r9is3y.fsf@rho.meyering.net> X-Enigmail-Version: 1.3.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 10983-done Cc: 10983-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) tag 10983 notabug On 03/09/2012 05:47 PM, Jim Meyering wrote: > There are more than enough new features to justify a release, > not to mention the three bug fixes. > > Anything worth waiting for? Well the dirname multi argument processing to complement the basename seems simple and worth waiting for. Also adding back the functionality to allow split to create an arbitrary amount of files is done and also seems unlikely to cause issues. Also there is a gnulib tweak to support building timeout as a static binary. I hope to push these this evening. cheers, Pádraig. From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 09 16:13:13 2012 Received: (at submit) by debbugs.gnu.org; 9 Mar 2012 21:13:13 +0000 Received: from localhost ([127.0.0.1]:41130 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S677f-0000oo-Kt for submit@debbugs.gnu.org; Fri, 09 Mar 2012 16:13:13 -0500 Received: from eggs.gnu.org ([208.118.235.92]:49095) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S677T-0000oH-Ip for submit@debbugs.gnu.org; Fri, 09 Mar 2012 16:13:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S676W-0000hu-Jy for submit@debbugs.gnu.org; Fri, 09 Mar 2012 16:12:01 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:36201) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S676W-0000hl-Gk for submit@debbugs.gnu.org; Fri, 09 Mar 2012 16:12:00 -0500 Received: from eggs.gnu.org ([208.118.235.92]:52240) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S676V-0005k1-0a for bug-coreutils@gnu.org; Fri, 09 Mar 2012 16:12:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S676B-0000eQ-2w for bug-coreutils@gnu.org; Fri, 09 Mar 2012 16:11:58 -0500 Received: from smtp.cs.ucla.edu ([131.179.128.62]:38326) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S676A-0000df-TJ for bug-coreutils@gnu.org; Fri, 09 Mar 2012 16:11:39 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id C554FA60005 for ; Fri, 9 Mar 2012 13:11:36 -0800 (PST) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wIRKoGlF1eAU for ; Fri, 9 Mar 2012 13:11:36 -0800 (PST) Received: from penguin.cs.ucla.edu (Penguin.CS.UCLA.EDU [131.179.64.200]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 6B876A60003 for ; Fri, 9 Mar 2012 13:11:36 -0800 (PST) Message-ID: <4F5A7207.2010508@cs.ucla.edu> Date: Fri, 09 Mar 2012 13:11:35 -0800 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.1) Gecko/20120209 Thunderbird/10.0.1 MIME-Version: 1.0 To: bug-coreutils@gnu.org Subject: Re: bug#10983: ready for a release? References: <87y5r9is3y.fsf@rho.meyering.net> In-Reply-To: <87y5r9is3y.fsf@rho.meyering.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -6.2 (------) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.2 (------) On 03/09/2012 09:47 AM, Jim Meyering wrote: > Anything worth waiting for? That reminds me. I've got a 2x performance improvement in GNU sort, for some common use cases. It's a student-written patch; they've signed papers. The patch is about 1000 lines (I'll need to rebase it). Are you game for reviewing this before the release? From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 09 16:47:05 2012 Received: (at 10983) by debbugs.gnu.org; 9 Mar 2012 21:47:06 +0000 Received: from localhost ([127.0.0.1]:41162 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S67eR-0001dn-IN for submit@debbugs.gnu.org; Fri, 09 Mar 2012 16:47:05 -0500 Received: from mail2.vodafone.ie ([213.233.128.44]:49824) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S67eO-0001dK-IN for 10983@debbugs.gnu.org; Fri, 09 Mar 2012 16:47:02 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmgDALl5Wk9daxnU/2dsb2JhbAAMNw6yIYF3A4QbAQEBBDIBRhALDQsJFg8JAwIBAgFFBg0BBwEBww+LM4VFBJtRihSCLDc Received: from unknown (HELO [192.168.1.79]) ([93.107.25.212]) by mail2.vodafone.ie with ESMTP; 09 Mar 2012 21:46:01 +0000 Message-ID: <4F5A7A18.4090704@draigBrady.com> Date: Fri, 09 Mar 2012 21:46:00 +0000 From: =?ISO-8859-1?Q?P=E1draig_Brady?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0) Gecko/20110816 Thunderbird/6.0 MIME-Version: 1.0 To: Paul Eggert Subject: Re: bug#10983: ready for a release? References: <87y5r9is3y.fsf@rho.meyering.net> <4F5A7207.2010508@cs.ucla.edu> In-Reply-To: <4F5A7207.2010508@cs.ucla.edu> X-Enigmail-Version: 1.3.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 10983 Cc: 10983@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) On 03/09/2012 09:11 PM, Paul Eggert wrote: > On 03/09/2012 09:47 AM, Jim Meyering wrote: >> Anything worth waiting for? > > That reminds me. I've got a 2x performance improvement in > GNU sort, for some common use cases. It's a student-written > patch; they've signed papers. The patch is about 1000 lines > (I'll need to rebase it). Are you game for reviewing > this before the release? Intriguing. I'd be on for reviewing it sometime tomorrow. Also there is the `ln -s --relative` patch from Harald Hoyer, which needs a bit of refactoring at least, but are still some questions in my mind over the interface, so I'm not sure I'll get to it this weekend. cheers, Pádraig. From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 09 18:10:02 2012 Received: (at 10983) by debbugs.gnu.org; 9 Mar 2012 23:10:02 +0000 Received: from localhost ([127.0.0.1]:41280 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S68wj-0003fw-QW for submit@debbugs.gnu.org; Fri, 09 Mar 2012 18:10:02 -0500 Received: from mail2.vodafone.ie ([213.233.128.44]:9783) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S68wg-0003fo-EO for 10983@debbugs.gnu.org; Fri, 09 Mar 2012 18:10:00 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsUDAHCMWk9daxnU/2dsb2JhbAAMNqgsjAgBAoQbAQEBBCdiCw0EAwECAQkWDwkDAgECAQ8uCBMGAgEBFr8PiTyBdwyFOQSOWYx4hRyEeIJj Received: from unknown (HELO [192.168.1.79]) ([93.107.25.212]) by mail2.vodafone.ie with ESMTP; 09 Mar 2012 23:08:59 +0000 Message-ID: <4F5A8D8B.2090509@draigBrady.com> Date: Fri, 09 Mar 2012 23:08:59 +0000 From: =?ISO-8859-1?Q?P=E1draig_Brady?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0) Gecko/20110816 Thunderbird/6.0 MIME-Version: 1.0 To: 10983@debbugs.gnu.org Subject: Re: bug#10983: ready for a release? References: <87y5r9is3y.fsf@rho.meyering.net> <4F5A496B.8090000@draigBrady.com> In-Reply-To: <4F5A496B.8090000@draigBrady.com> X-Enigmail-Version: 1.3.2 Content-Type: multipart/mixed; boundary="------------000904060703020604000508" X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 10983 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) This is a multi-part message in MIME format. --------------000904060703020604000508 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit On 03/09/2012 06:18 PM, Pádraig Brady wrote: > tag 10983 notabug > > On 03/09/2012 05:47 PM, Jim Meyering wrote: >> There are more than enough new features to justify a release, >> not to mention the three bug fixes. >> >> Anything worth waiting for? > > Well the dirname multi argument processing to > complement the basename seems simple and > worth waiting for. Attached. cheers, Pádraig. --------------000904060703020604000508 Content-Type: text/x-patch; name="0001-dirname-support-more-than-one-argument.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0001-dirname-support-more-than-one-argument.patch" >From 28134d1e9a949ccd30710a533528a6a5dbfcf13f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Compostella?= Date: Fri, 9 Mar 2012 19:21:42 +0100 Subject: [PATCH] dirname: support more than one argument * src/dirname.c (main): Handle new -z option and manage more than one argument. * doc/coreutils.texi (dirname invocation): Mention it. * NEWS (New features): Mention it. * tests/misc/dirname: Add a two arguments test. --- NEWS | 3 ++ doc/coreutils.texi | 26 +++++++++++++----- src/dirname.c | 77 +++++++++++++++++++++++++++++++++------------------ tests/misc/dirname | 3 +- 4 files changed, 73 insertions(+), 36 deletions(-) diff --git a/NEWS b/NEWS index 7f36dc6..829d626 100644 --- a/NEWS +++ b/NEWS @@ -35,6 +35,9 @@ GNU coreutils NEWS -*- outline -*- of more than one argument at a time. Also the complementary -z option was added to delimit output items with the NUL character. + dirname now supports more than one argument. Also the complementary + -z option was added to delimit output items with the NUL character. + ** Bug fixes du --one-file-system (-x) would ignore any non-directory specified on diff --git a/doc/coreutils.texi b/doc/coreutils.texi index cce9432..49f2141 100644 --- a/doc/coreutils.texi +++ b/doc/coreutils.texi @@ -12501,13 +12501,13 @@ basename -a -s .h include/stdio.h include/stdlib.h @cindex stripping non-directory suffix @cindex non-directory suffix, stripping -@command{dirname} prints all but the final slash-delimited component of -@var{name}. Slashes on either side of the final component are also -removed. If the string contains no slash, @command{dirname} prints -@samp{.} (meaning the current directory). Synopsis: +@command{dirname} prints all but the final slash-delimited component +of each @var{name}. Slashes on either side of the final component are +also removed. If the string contains no slash, @command{dirname} +prints @samp{.} (meaning the current directory). Synopsis: @example -dirname @var{name} +dirname [@var{option}] @var{name}... @end example @var{name} need not be a file name, but if it is, this operation @@ -12521,8 +12521,17 @@ including the case when the final component is itself a directory. result is @samp{//} on platforms where @var{//} is distinct from @var{/}, and @samp{/} on platforms where there is no difference. -The only options are @option{--help} and @option{--version}. @xref{Common -options}. +The program accepts the following option. Also see @ref{Common options}. + +@table @samp + +@item -z +@itemx --zero +@opindex -z +@opindex --zero +Separate output items with @sc{nul} characters. + +@end table @exitstatus @@ -12533,6 +12542,9 @@ Examples: dirname /usr/bin/sort dirname /usr/bin//.// +# Output "dir1" followed by "dir2" +dirname dir1/str dir2/str + # Output ".". dirname stdio.h @end smallexample diff --git a/src/dirname.c b/src/dirname.c index 3637a04..ac218d5 100644 --- a/src/dirname.c +++ b/src/dirname.c @@ -23,9 +23,7 @@ #include #include "system.h" -#include "long-options.h" #include "error.h" -#include "quote.h" /* The official name of this program (e.g., no 'g' prefix). */ #define PROGRAM_NAME "dirname" @@ -34,6 +32,14 @@ proper_name ("David MacKenzie"), \ proper_name ("Jim Meyering") +static struct option const longopts[] = +{ + {"zero", no_argument, NULL, 'z'}, + {GETOPT_HELP_OPTION_DECL}, + {GETOPT_VERSION_OPTION_DECL}, + {NULL, 0, NULL, 0} +}; + void usage (int status) { @@ -42,24 +48,27 @@ usage (int status) else { printf (_("\ -Usage: %s NAME\n\ - or: %s OPTION\n\ +Usage: %s [OPTION] NAME...\n\ "), - program_name, program_name); + program_name); fputs (_("\ -Output NAME with its last non-slash component and trailing slashes removed;\n\ -if NAME contains no /'s, output '.' (meaning the current directory).\n\ +Output each NAME with its last non-slash component and trailing slashes\n\ +removed; if NAME contains no /'s, output '.' (meaning the current directory).\n\ \n\ "), stdout); + fputs (_("\ + -z, --zero separate output with NUL rather than newline\n\ +"), stdout); fputs (HELP_OPTION_DESCRIPTION, stdout); fputs (VERSION_OPTION_DESCRIPTION, stdout); printf (_("\ \n\ Examples:\n\ - %s /usr/bin/ Output \"/usr\".\n\ - %s stdio.h Output \".\".\n\ + %s /usr/bin/ -> \"/usr\"\n\ + %s dir1/str dir2/str -> \"dir1\" followed by \"dir2\"\n\ + %s stdio.h -> \".\"\n\ "), - program_name, program_name); + program_name, program_name, program_name); emit_ancillary_info (); } exit (status); @@ -69,6 +78,7 @@ int main (int argc, char **argv) { static char const dot = '.'; + bool use_nuls = false; char const *result; size_t len; @@ -80,10 +90,26 @@ main (int argc, char **argv) atexit (close_stdout); - parse_long_options (argc, argv, PROGRAM_NAME, PACKAGE_NAME, Version, - usage, AUTHORS, (char const *) NULL); - if (getopt_long (argc, argv, "+", NULL, NULL) != -1) - usage (EXIT_FAILURE); + while (true) + { + int c = getopt_long (argc, argv, "z", longopts, NULL); + + if (c == -1) + break; + + switch (c) + { + case 'z': + use_nuls = true; + break; + + case_GETOPT_HELP_CHAR; + case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS); + + default: + usage (EXIT_FAILURE); + } + } if (argc < optind + 1) { @@ -91,23 +117,20 @@ main (int argc, char **argv) usage (EXIT_FAILURE); } - if (optind + 1 < argc) + for (; optind < argc; optind++) { - error (0, 0, _("extra operand %s"), quote (argv[optind + 1])); - usage (EXIT_FAILURE); - } + result = argv[optind]; + len = dir_len (result); - result = argv[optind]; - len = dir_len (result); + if (! len) + { + result = ˙ + len = 1; + } - if (! len) - { - result = ˙ - len = 1; + fwrite (result, 1, len, stdout); + putchar (use_nuls ? '\0' :'\n'); } - fwrite (result, 1, len, stdout); - putchar ('\n'); - exit (EXIT_SUCCESS); } diff --git a/tests/misc/dirname b/tests/misc/dirname index 37cf7cf..0021836 100755 --- a/tests/misc/dirname +++ b/tests/misc/dirname @@ -35,8 +35,6 @@ my @Tests = ( ['fail-1', {ERR => "$prog: missing operand\n" . "Try '$prog --help' for more information.\n"}, {EXIT => '1'}], - ['fail-2', qw(a b), {ERR => "$prog: extra operand 'b'\n" - . "Try '$prog --help' for more information.\n"}, {EXIT => '1'}], ['a', qw(d/f), {OUT => 'd'}], ['b', qw(/d/f), {OUT => '/d'}], @@ -51,6 +49,7 @@ my @Tests = ['k', qw(///a///b), {OUT => '///a'}], ['l', qw(///a//b/), {OUT => '///a'}], ['m', qw(''), {OUT => '.'}], + ['n', qw(a/b c/d), {OUT => "a\nc"}], ); # Append a newline to end of each expected 'OUT' string. -- 1.7.6.4 --------------000904060703020604000508-- From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 10 02:52:20 2012 Received: (at submit) by debbugs.gnu.org; 10 Mar 2012 07:52:20 +0000 Received: from localhost ([127.0.0.1]:41806 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S6H6C-00033B-5o for submit@debbugs.gnu.org; Sat, 10 Mar 2012 02:52:20 -0500 Received: from eggs.gnu.org ([208.118.235.92]:40333) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S6H69-000333-9y for submit@debbugs.gnu.org; Sat, 10 Mar 2012 02:52:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S6GdS-0001X8-2n for submit@debbugs.gnu.org; Sat, 10 Mar 2012 02:22:39 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:51406) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S6GdR-0001X4-Vb for submit@debbugs.gnu.org; Sat, 10 Mar 2012 02:22:37 -0500 Received: from eggs.gnu.org ([208.118.235.92]:38583) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S6GdQ-0002Q8-Ef for bug-coreutils@gnu.org; Sat, 10 Mar 2012 02:22:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S6GdO-0001Wj-RX for bug-coreutils@gnu.org; Sat, 10 Mar 2012 02:22:35 -0500 Received: from smtp.cs.ucla.edu ([131.179.128.62]:37923) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S6GdO-0001Uo-LP for bug-coreutils@gnu.org; Sat, 10 Mar 2012 02:22:34 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 051DDA60004 for ; Fri, 9 Mar 2012 23:22:25 -0800 (PST) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CogzcBKj5G8b for ; Fri, 9 Mar 2012 23:22:24 -0800 (PST) Received: from [192.168.1.10] (pool-71-189-109-235.lsanca.fios.verizon.net [71.189.109.235]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 432F9A60003 for ; Fri, 9 Mar 2012 23:22:24 -0800 (PST) Message-ID: <4F5B0132.7070600@cs.ucla.edu> Date: Fri, 09 Mar 2012 23:22:26 -0800 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; Linux i686; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 To: bug-coreutils@gnu.org Subject: Re: bug#10983: ready for a release? References: <87y5r9is3y.fsf@rho.meyering.net> <4F5A7207.2010508@cs.ucla.edu> <4F5A7A18.4090704@draigBrady.com> In-Reply-To: <4F5A7A18.4090704@draigBrady.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -6.2 (------) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.2 (------) On 03/09/2012 01:46 PM, P=C3=A1draig Brady wrote: > Intriguing. I'd be on for reviewing it sometime tomorrow. I'm afraid I'm not quite *that* fast... If you want to release really quickly perhaps the performance improvement can wait until next week. (I'm currently trying to get a 'grep' patch out the door, to get 'grep -r' to use fts and to give recursive greps a way to not follow symlinks....) From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 10 03:43:29 2012 Received: (at 10983) by debbugs.gnu.org; 10 Mar 2012 08:43:29 +0000 Received: from localhost ([127.0.0.1]:41856 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S6Htf-00052o-S4 for submit@debbugs.gnu.org; Sat, 10 Mar 2012 03:43:29 -0500 Received: from mx.meyering.net ([88.168.87.75]:53430) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S6Htc-00052f-TS for 10983@debbugs.gnu.org; Sat, 10 Mar 2012 03:43:26 -0500 Received: from rho.meyering.net (localhost.localdomain [127.0.0.1]) by rho.meyering.net (Acme Bit-Twister) with ESMTP id 8A5D86040B; Sat, 10 Mar 2012 09:13:45 +0100 (CET) From: Jim Meyering To: Paul Eggert Subject: Re: bug#10983: ready for a release? In-Reply-To: <4F5B0132.7070600@cs.ucla.edu> (Paul Eggert's message of "Fri, 09 Mar 2012 23:22:26 -0800") References: <87y5r9is3y.fsf@rho.meyering.net> <4F5A7207.2010508@cs.ucla.edu> <4F5A7A18.4090704@draigBrady.com> <4F5B0132.7070600@cs.ucla.edu> Date: Sat, 10 Mar 2012 09:13:45 +0100 Message-ID: <87399gj2km.fsf@rho.meyering.net> Lines: 18 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 10983 Cc: 10983@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) Paul Eggert wrote: > On 03/09/2012 01:46 PM, P=E1draig Brady wrote: >> Intriguing. I'd be on for reviewing it sometime tomorrow. > > I'm afraid I'm not quite *that* fast... > If you want to release really quickly perhaps the > performance improvement can wait until next week. 1000 lines. That sounds like it is a large enough patch (and to sensitive enough code) that I would prefer to defer it until after 8.16 in any case. > (I'm currently trying to get a 'grep' patch out the door, > to get 'grep -r' to use fts and to give recursive greps > a way to not follow symlinks....) Great. That will be most welcome. I'll be glad to be rid of grep's mongrel lib/safedir.c. From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 10 05:20:57 2012 Received: (at 10983) by debbugs.gnu.org; 10 Mar 2012 10:20:57 +0000 Received: from localhost ([127.0.0.1]:41987 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S6JQ0-00023T-W8 for submit@debbugs.gnu.org; Sat, 10 Mar 2012 05:20:57 -0500 Received: from mail2.vodafone.ie ([213.233.128.44]:15867) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S6JPp-000231-8v for 10983@debbugs.gnu.org; Sat, 10 Mar 2012 05:20:55 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsADAPoiW09daxnU/2dsb2JhbAAMNg6FNq0GgXcDhBkBAQEEIw8BRhALDQsCAgUWCwICCQMCAQIBRQYNAQcBAbUHigGBL4oNhC+BFgSbV4oYgiw3 Received: from unknown (HELO [192.168.1.79]) ([93.107.25.212]) by mail2.vodafone.ie with ESMTP; 10 Mar 2012 09:51:05 +0000 Message-ID: <4F5B2408.6070404@draigBrady.com> Date: Sat, 10 Mar 2012 09:51:04 +0000 From: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0) Gecko/20110816 Thunderbird/6.0 MIME-Version: 1.0 To: Paul Eggert Subject: Re: bug#10983: ready for a release? References: <87y5r9is3y.fsf@rho.meyering.net> <4F5A7207.2010508@cs.ucla.edu> <4F5A7A18.4090704@draigBrady.com> <4F5B0132.7070600@cs.ucla.edu> In-Reply-To: <4F5B0132.7070600@cs.ucla.edu> X-Enigmail-Version: 1.3.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 10983 Cc: 10983@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) On 03/10/2012 07:22 AM, Paul Eggert wrote: > On 03/09/2012 01:46 PM, Pádraig Brady wrote: >> Intriguing. I'd be on for reviewing it sometime tomorrow. > > I'm afraid I'm not quite *that* fast... > If you want to release really quickly perhaps the > performance improvement can wait until next week. Oh sorry I thought it was mostly done. Not something to rush... > (I'm currently trying to get a 'grep' patch out the door, > to get 'grep -r' to use fts and to give recursive greps > a way to not follow symlinks....) ...or get distracted with. Probably a candidate for the next release so. cheers, Pádraig. From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 10 05:32:15 2012 Received: (at 10983-done) by debbugs.gnu.org; 10 Mar 2012 10:32:15 +0000 Received: from localhost ([127.0.0.1]:42011 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S6Jau-00037u-Tx for submit@debbugs.gnu.org; Sat, 10 Mar 2012 05:32:15 -0500 Received: from mx.meyering.net ([88.168.87.75]:53704) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S6Jaj-00037L-7C for 10983-done@debbugs.gnu.org; Sat, 10 Mar 2012 05:32:11 -0500 Received: from rho.meyering.net (localhost.localdomain [127.0.0.1]) by rho.meyering.net (Acme Bit-Twister) with ESMTP id F1E2A60061; Sat, 10 Mar 2012 11:02:21 +0100 (CET) From: Jim Meyering To: =?iso-8859-1?Q?P=E1draig?= Brady Subject: Re: bug#10983: ready for a release? In-Reply-To: <4F5A496B.8090000@draigBrady.com> (=?iso-8859-1?Q?=22P=E1drai?= =?iso-8859-1?Q?g?= Brady"'s message of "Fri, 09 Mar 2012 18:18:19 +0000") References: <87y5r9is3y.fsf@rho.meyering.net> <4F5A496B.8090000@draigBrady.com> Date: Sat, 10 Mar 2012 11:02:21 +0100 Message-ID: <87d38khiz6.fsf@rho.meyering.net> Lines: 26 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 10983-done Cc: 10983-done@debbugs.gnu.org, Coreutils X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) P=E1draig Brady wrote: > tag 10983 notabug > > On 03/09/2012 05:47 PM, Jim Meyering wrote: >> There are more than enough new features to justify a release, >> not to mention the three bug fixes. >> >> Anything worth waiting for? > > Well the dirname multi argument processing to > complement the basename seems simple and > worth waiting for. > > Also adding back the functionality to > allow split to create an arbitrary amount > of files is done and also seems unlikely > to cause issues. > > Also there is a gnulib tweak to support > building timeout as a static binary. > > I hope to push these this evening. Thanks. Those all sound fine for 8.16, but there's no great hurry. Monday or Tuesday, maybe... From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 12 12:36:44 2012 Received: (at 10983) by debbugs.gnu.org; 12 Mar 2012 16:36:44 +0000 Received: from localhost ([127.0.0.1]:47038 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S78El-00049j-Hq for submit@debbugs.gnu.org; Mon, 12 Mar 2012 12:36:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:16982) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S78Ei-00049a-A6 for 10983@debbugs.gnu.org; Mon, 12 Mar 2012 12:36:42 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q2CG6mEX019203 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 12 Mar 2012 12:06:48 -0400 Received: from [10.3.113.33] (ovpn-113-33.phx2.redhat.com [10.3.113.33]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q2CG6lGS030207; Mon, 12 Mar 2012 12:06:47 -0400 Message-ID: <4F5E1F17.4020102@redhat.com> Date: Mon, 12 Mar 2012 10:06:47 -0600 From: Eric Blake Organization: Red Hat User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.1) Gecko/20120216 Thunderbird/10.0.1 MIME-Version: 1.0 To: Jim Meyering Subject: Re: bug#10983: ready for a release? References: <87y5r9is3y.fsf@rho.meyering.net> In-Reply-To: <87y5r9is3y.fsf@rho.meyering.net> X-Enigmail-Version: 1.3.5 OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig783CA301421A30D7DA518B21" X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: 10983 Cc: 10983@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig783CA301421A30D7DA518B21 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 03/09/2012 10:47 AM, Jim Meyering wrote: > There are more than enough new features to justify a release, > not to mention the three bug fixes. >=20 > Anything worth waiting for? I should revive my efforts on getting //path handling under realpath working for cygwin. Expect a resent email later today. --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enig783CA301421A30D7DA518B21 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJPXh8XAAoJEKeha0olJ0NqEf0H/RYN5W6nUu0SxnY38h49dClo RxvLMkiWeqHpScnNj34qYfXpATZH24UPmfCR8DvngXPaj+kSduB8JIgqhWM/8e1Y R/8NlxOrkqX2NeOI6+7VS43d8aNSQESvHSj6xgeeP5YtGNrRMJr/+ksU5k0C5aKb ky7ws5JRsHMp5hyJ8jETxwzwLpAD4ip0ZR8WTn7cHgLQvT06aFLdvkr0/+3q2cKs GKqkZAeHDVTTeU640rxB36A57rcr/kFuKFWD2db7tWwEoLw1BS3TNW1epXgxPgny JhR2YBhmP/Xw+FGxZo84RCad+wKMa9TgJISZGd9+9jLL/x0sQ12E07HYuadDM4U= =zYJs -----END PGP SIGNATURE----- --------------enig783CA301421A30D7DA518B21-- From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 12 12:44:09 2012 Received: (at 10983) by debbugs.gnu.org; 12 Mar 2012 16:44:09 +0000 Received: from localhost ([127.0.0.1]:47047 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S78Lw-0004Ka-EL for submit@debbugs.gnu.org; Mon, 12 Mar 2012 12:44:08 -0400 Received: from mx.meyering.net ([88.168.87.75]:33279) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S78Lt-0004KS-Iq for 10983@debbugs.gnu.org; Mon, 12 Mar 2012 12:44:06 -0400 Received: from rho.meyering.net (localhost.localdomain [127.0.0.1]) by rho.meyering.net (Acme Bit-Twister) with ESMTP id 71F2660065; Mon, 12 Mar 2012 17:14:13 +0100 (CET) From: Jim Meyering To: Eric Blake Subject: Re: bug#10983: ready for a release? In-Reply-To: <4F5E1F17.4020102@redhat.com> (Eric Blake's message of "Mon, 12 Mar 2012 10:06:47 -0600") References: <87y5r9is3y.fsf@rho.meyering.net> <4F5E1F17.4020102@redhat.com> Date: Mon, 12 Mar 2012 17:14:13 +0100 Message-ID: <877gypbxuy.fsf@rho.meyering.net> Lines: 14 MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 10983 Cc: 10983@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) Eric Blake wrote: > On 03/09/2012 10:47 AM, Jim Meyering wrote: >> There are more than enough new features to justify a release, >> not to mention the three bug fixes. >> >> Anything worth waiting for? > > I should revive my efforts on getting //path handling under realpath > working for cygwin. Expect a resent email later today. Sounds good. I have barely looked at coreutils for the last few days, so now I'm aiming for a release on Wednesday or later. From unknown Sun Jun 15 08:37:59 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 10 Apr 2012 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator