GNU logs - #14913, boring messages


Message sent to bug-coreutils@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#14913: [PATCH] :2013-07-19    Jeremy Wright   <jwright@HIDDEN>
Resent-From: Jeremy Wright <JWright@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-coreutils@HIDDEN
Resent-Date: Fri, 19 Jul 2013 20:04:01 +0000
Resent-Message-ID: <handler.14913.B.137426420827061 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 14913
X-GNU-PR-Package: coreutils
X-GNU-PR-Keywords: patch
To: 14913 <at> debbugs.gnu.org
X-Debbugs-Original-To: "bug-coreutils@HIDDEN" <bug-coreutils@HIDDEN>
Received: via spool by submit <at> debbugs.gnu.org id=B.137426420827061
          (code B ref -1); Fri, 19 Jul 2013 20:04:01 +0000
Received: (at submit) by debbugs.gnu.org; 19 Jul 2013 20:03:28 +0000
Received: from localhost ([127.0.0.1]:38092 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1V0Gti-00072N-7N
	for submit <at> debbugs.gnu.org; Fri, 19 Jul 2013 16:03:27 -0400
Received: from eggs.gnu.org ([208.118.235.92]:58224)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <JWright@HIDDEN>) id 1V0GnZ-0006gd-NQ
 for submit <at> debbugs.gnu.org; Fri, 19 Jul 2013 15:57:07 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <JWright@HIDDEN>) id 1V0GnR-0001wb-PF
 for submit <at> debbugs.gnu.org; Fri, 19 Jul 2013 15:57:00 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled
 version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:35032)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <JWright@HIDDEN>) id 1V0GnR-0001wM-Ll
 for submit <at> debbugs.gnu.org; Fri, 19 Jul 2013 15:56:57 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:59896)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <JWright@HIDDEN>) id 1V0GnN-00015K-QW
 for bug-coreutils@HIDDEN; Fri, 19 Jul 2013 15:56:57 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <JWright@HIDDEN>) id 1V0GnL-0001tu-5p
 for bug-coreutils@HIDDEN; Fri, 19 Jul 2013 15:56:53 -0400
Received: from exprod7og123.obsmtp.com ([64.18.2.24]:44093)
 by eggs.gnu.org with smtp (Exim 4.71)
 (envelope-from <JWright@HIDDEN>) id 1V0GnK-0001tS-Up
 for bug-coreutils@HIDDEN; Fri, 19 Jul 2013 15:56:51 -0400
Received: from mail.agjunction.com ([208.77.56.102]) by
 exprod7ob123.postini.com ([64.18.6.12]) with SMTP
 ID DSNKUemaAFPbc4wwKF9QHp68GJwGpZgVuU+X@HIDDEN;
 Fri, 19 Jul 2013 12:56:50 PDT
Received: from CORMS1.hemi.corp.local ([fe80::9972:a72e:aa93:d4d0]) by
 COROW1.hemi.corp.local ([fe80::dd41:c533:e8df:fe9b%10]) with mapi id
 14.02.0283.003; Fri, 19 Jul 2013 12:56:48 -0700
From: Jeremy Wright <JWright@HIDDEN>
Thread-Topic: [PATCH] :2013-07-19    Jeremy Wright   <jwright@HIDDEN>
Thread-Index: Ac6EuhqO4QdwX/ETTxG+exlsi49JHg==
Date: Fri, 19 Jul 2013 19:56:48 +0000
Message-ID: <64D7AB922143DC4390461C102DFDD5F220383DD8@HIDDEN>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-originating-ip: [172.17.29.83]
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -2.4 (--)
X-Mailman-Approved-At: Fri, 19 Jul 2013 16:03:24 -0400
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.4 (--)

* src/csplit.c (make_filename): Added initial value (-i) option
to start output file counter at a specific given value.
---
 src/csplit.c | 20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)

diff --git a/src/csplit.c b/src/csplit.c
index 7a36e67..c97790e 100644
--- a/src/csplit.c
+++ b/src/csplit.c
@@ -169,6 +169,10 @@ static bool elide_empty_files;
 /* If true, suppress the lines that match the PATTERN */
 static bool suppress_matched;
=20
+/* Number to start output file name count */
+static unsigned int initial_file_number =3D 0;
+
+
 /* The compiled pattern arguments, which determine how to split
    the input file. */
 static struct control *controls;
@@ -195,6 +199,7 @@ static struct option const longopts[] =3D
   {"elide-empty-files", no_argument, NULL, 'z'},
   {"prefix", required_argument, NULL, 'f'},
   {"suffix-format", required_argument, NULL, 'b'},
+  {"initial-value", required_argument, NULL, 'i'},
   {"suppress-matched", no_argument, NULL, SUPPRESS_MATCHED_OPTION},
   {GETOPT_HELP_OPTION_DECL},
   {GETOPT_VERSION_OPTION_DECL},
@@ -930,9 +935,9 @@ make_filename (unsigned int num)
 {
   strcpy (filename_space, prefix);
   if (suffix)
-    sprintf (filename_space + strlen (prefix), suffix, num);
+    sprintf (filename_space + strlen (prefix), suffix, num+initial_file_nu=
mber);
   else
-    sprintf (filename_space + strlen (prefix), "%0*u", digits, num);
+    sprintf (filename_space + strlen (prefix), "%0*u", digits, num+initial=
_file_number);
   return filename_space;
 }
=20
@@ -1349,7 +1354,7 @@ main (int argc, char **argv)
   suppress_matched =3D false;
   prefix =3D DEFAULT_PREFIX;
=20
-  while ((optc =3D getopt_long (argc, argv, "f:b:kn:sqz", longopts, NULL))=
 !=3D -1)
+  while ((optc =3D getopt_long (argc, argv, "f:b:kni:sqz", longopts, NULL)=
) !=3D -1)
     switch (optc)
       {
       case 'f':
@@ -1379,9 +1384,11 @@ main (int argc, char **argv)
       case 'z':
         elide_empty_files =3D true;
         break;
-
-      case SUPPRESS_MATCHED_OPTION:
-        suppress_matched =3D true;
+      case 'i':
+        if (xstrtoul (optarg, NULL, 10, &val, "") !=3D LONGINT_OK
+            || MIN (INT_MAX, SIZE_MAX) < val)
+          error (EXIT_FAILURE, 0, _("%s: invalid number"), optarg);
+        initial_file_number =3D val;
         break;
=20
       case_GETOPT_HELP_CHAR;
@@ -1498,6 +1505,7 @@ and output byte counts of each piece to standard outp=
ut.\n\
   -n, --digits=3DDIGITS        use specified number of digits instead of 2=
\n\
   -s, --quiet, --silent      do not print counts of output file sizes\n\
   -z, --elide-empty-files    remove empty output files\n\
+  -i, --initial-value        starting value for the output files\n\
 "), stdout);
       fputs (HELP_OPTION_DESCRIPTION, stdout);
       fputs (VERSION_OPTION_DESCRIPTION, stdout);
--=20
1.8.1.2




Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.503 (Entity 5.503)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: Jeremy Wright <JWright@HIDDEN>
Subject: bug#14913: Acknowledgement ([PATCH] :2013-07-19    Jeremy Wright 
  <jwright@HIDDEN>)
Message-ID: <handler.14913.B.137426420827061.ack <at> debbugs.gnu.org>
References: <64D7AB922143DC4390461C102DFDD5F220383DD8@HIDDEN>
X-Gnu-PR-Message: ack 14913
X-Gnu-PR-Package: coreutils
X-Gnu-PR-Keywords: patch
Reply-To: 14913 <at> debbugs.gnu.org
Date: Fri, 19 Jul 2013 20:04:02 +0000

Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):
 bug-coreutils@HIDDEN

If you wish to submit further information on this problem, please
send it to 14913 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
14913: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D14913
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems


Message sent to bug-coreutils@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#14913: [PATCH] :2013-07-19    Jeremy Wright   <jwright@HIDDEN>
Resent-From: Casey Kelso <CKelso@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-coreutils@HIDDEN
Resent-Date: Fri, 19 Jul 2013 21:23:01 +0000
Resent-Message-ID: <handler.14913.B.13742689745713 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 14913
X-GNU-PR-Package: coreutils
X-GNU-PR-Keywords: patch
To: JWright@HIDDEN, 14913 <at> debbugs.gnu.org
X-Debbugs-Original-To: Jeremy Wright <JWright@HIDDEN>, "bug-coreutils@HIDDEN" <bug-coreutils@HIDDEN>
Received: via spool by submit <at> debbugs.gnu.org id=B.13742689745713
          (code B ref -1); Fri, 19 Jul 2013 21:23:01 +0000
Received: (at submit) by debbugs.gnu.org; 19 Jul 2013 21:22:54 +0000
Received: from localhost ([127.0.0.1]:38255 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1V0I8Z-0001Tx-HF
	for submit <at> debbugs.gnu.org; Fri, 19 Jul 2013 17:22:54 -0400
Received: from eggs.gnu.org ([208.118.235.92]:40002)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <CKelso@HIDDEN>) id 1V0HN1-0008Cs-Ua
 for submit <at> debbugs.gnu.org; Fri, 19 Jul 2013 16:33:45 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <CKelso@HIDDEN>) id 1V0HMt-0004my-SK
 for submit <at> debbugs.gnu.org; Fri, 19 Jul 2013 16:33:38 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled
 version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:54787)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <CKelso@HIDDEN>) id 1V0HMt-0004mu-QN
 for submit <at> debbugs.gnu.org; Fri, 19 Jul 2013 16:33:35 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:41705)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <CKelso@HIDDEN>) id 1V0HMr-0000yk-54
 for bug-coreutils@HIDDEN; Fri, 19 Jul 2013 16:33:35 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <CKelso@HIDDEN>) id 1V0HMo-0004ko-ER
 for bug-coreutils@HIDDEN; Fri, 19 Jul 2013 16:33:33 -0400
Received: from exprod7og101.obsmtp.com ([64.18.2.155]:36955)
 by eggs.gnu.org with smtp (Exim 4.71)
 (envelope-from <CKelso@HIDDEN>) id 1V0HMn-0004kA-QZ
 for bug-coreutils@HIDDEN; Fri, 19 Jul 2013 16:33:30 -0400
Received: from mail.agjunction.com ([208.77.56.102]) by
 exprod7ob101.postini.com ([64.18.6.12]) with SMTP
 ID DSNKUemil/dyApNwdcxFHNulTOomdvrvvpWj@HIDDEN;
 Fri, 19 Jul 2013 13:33:29 PDT
Received: from CORMS1.hemi.corp.local ([fe80::9972:a72e:aa93:d4d0]) by
 COROW1.hemi.corp.local ([fe80::dd41:c533:e8df:fe9b%10]) with mapi id
 14.02.0283.003; Fri, 19 Jul 2013 13:33:27 -0700
From: Casey Kelso <CKelso@HIDDEN>
Thread-Topic: [PATCH] :2013-07-19    Jeremy Wright   <jwright@HIDDEN>
Thread-Index: Ac6EuhqO4QdwX/ETTxG+exlsi49JHgABRfIJ
Date: Fri, 19 Jul 2013 20:33:27 +0000
Message-ID: <741D96C5C962E5469A6F6FCFA3FF4A8E20560068@HIDDEN>
References: <64D7AB922143DC4390461C102DFDD5F220383DD8@HIDDEN>
In-Reply-To: <64D7AB922143DC4390461C102DFDD5F220383DD8@HIDDEN>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-originating-ip: [172.17.29.87]
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -2.4 (--)
X-Mailman-Approved-At: Fri, 19 Jul 2013 17:22:48 -0400
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.4 (--)

Cool. Where do you store the initial seed value between boots?=0A=
=0A=
Casey Kelso=0A=
Software Manager | Ag Junction=0A=
480-348-6310 | ckelso@HIDDEN | http://www.agjunction.com=0A=
=0A=
=0A=
________________________________________=0A=
From: Jeremy Wright=0A=
Sent: Friday, July 19, 2013 12:56 PM=0A=
To: bug-coreutils@HIDDEN=0A=
Subject: [PATCH] :2013-07-19    Jeremy Wright   <jwright@HIDDEN>=0A=
=0A=
* src/csplit.c (make_filename): Added initial value (-i) option=0A=
to start output file counter at a specific given value.=0A=
---=0A=
 src/csplit.c | 20 ++++++++++++++------=0A=
 1 file changed, 14 insertions(+), 6 deletions(-)=0A=
=0A=
diff --git a/src/csplit.c b/src/csplit.c=0A=
index 7a36e67..c97790e 100644=0A=
--- a/src/csplit.c=0A=
+++ b/src/csplit.c=0A=
@@ -169,6 +169,10 @@ static bool elide_empty_files;=0A=
 /* If true, suppress the lines that match the PATTERN */=0A=
 static bool suppress_matched;=0A=
=0A=
+/* Number to start output file name count */=0A=
+static unsigned int initial_file_number =3D 0;=0A=
+=0A=
+=0A=
 /* The compiled pattern arguments, which determine how to split=0A=
    the input file. */=0A=
 static struct control *controls;=0A=
@@ -195,6 +199,7 @@ static struct option const longopts[] =3D=0A=
   {"elide-empty-files", no_argument, NULL, 'z'},=0A=
   {"prefix", required_argument, NULL, 'f'},=0A=
   {"suffix-format", required_argument, NULL, 'b'},=0A=
+  {"initial-value", required_argument, NULL, 'i'},=0A=
   {"suppress-matched", no_argument, NULL, SUPPRESS_MATCHED_OPTION},=0A=
   {GETOPT_HELP_OPTION_DECL},=0A=
   {GETOPT_VERSION_OPTION_DECL},=0A=
@@ -930,9 +935,9 @@ make_filename (unsigned int num)=0A=
 {=0A=
   strcpy (filename_space, prefix);=0A=
   if (suffix)=0A=
-    sprintf (filename_space + strlen (prefix), suffix, num);=0A=
+    sprintf (filename_space + strlen (prefix), suffix, num+initial_file_nu=
mber);=0A=
   else=0A=
-    sprintf (filename_space + strlen (prefix), "%0*u", digits, num);=0A=
+    sprintf (filename_space + strlen (prefix), "%0*u", digits, num+initial=
_file_number);=0A=
   return filename_space;=0A=
 }=0A=
=0A=
@@ -1349,7 +1354,7 @@ main (int argc, char **argv)=0A=
   suppress_matched =3D false;=0A=
   prefix =3D DEFAULT_PREFIX;=0A=
=0A=
-  while ((optc =3D getopt_long (argc, argv, "f:b:kn:sqz", longopts, NULL))=
 !=3D -1)=0A=
+  while ((optc =3D getopt_long (argc, argv, "f:b:kni:sqz", longopts, NULL)=
) !=3D -1)=0A=
     switch (optc)=0A=
       {=0A=
       case 'f':=0A=
@@ -1379,9 +1384,11 @@ main (int argc, char **argv)=0A=
       case 'z':=0A=
         elide_empty_files =3D true;=0A=
         break;=0A=
-=0A=
-      case SUPPRESS_MATCHED_OPTION:=0A=
-        suppress_matched =3D true;=0A=
+      case 'i':=0A=
+        if (xstrtoul (optarg, NULL, 10, &val, "") !=3D LONGINT_OK=0A=
+            || MIN (INT_MAX, SIZE_MAX) < val)=0A=
+          error (EXIT_FAILURE, 0, _("%s: invalid number"), optarg);=0A=
+        initial_file_number =3D val;=0A=
         break;=0A=
=0A=
       case_GETOPT_HELP_CHAR;=0A=
@@ -1498,6 +1505,7 @@ and output byte counts of each piece to standard outp=
ut.\n\=0A=
   -n, --digits=3DDIGITS        use specified number of digits instead of 2=
\n\=0A=
   -s, --quiet, --silent      do not print counts of output file sizes\n\=
=0A=
   -z, --elide-empty-files    remove empty output files\n\=0A=
+  -i, --initial-value        starting value for the output files\n\=0A=
 "), stdout);=0A=
       fputs (HELP_OPTION_DESCRIPTION, stdout);=0A=
       fputs (VERSION_OPTION_DESCRIPTION, stdout);=0A=
--=0A=
1.8.1.2=0A=




Message sent to bug-coreutils@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#14913: [PATCH] :2013-07-19 Jeremy Wright <jwright@HIDDEN>
Resent-From: =?UTF-8?Q?P=C3=A1draig?= Brady <P@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-coreutils@HIDDEN
Resent-Date: Sat, 20 Jul 2013 09:27:01 +0000
Resent-Message-ID: <handler.14913.B14913.137431239728878 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 14913
X-GNU-PR-Package: coreutils
X-GNU-PR-Keywords: patch
To: Jeremy Wright <JWright@HIDDEN>
Cc: 14913 <at> debbugs.gnu.org
Received: via spool by 14913-submit <at> debbugs.gnu.org id=B14913.137431239728878
          (code B ref 14913); Sat, 20 Jul 2013 09:27:01 +0000
Received: (at 14913) by debbugs.gnu.org; 20 Jul 2013 09:26:37 +0000
Received: from localhost ([127.0.0.1]:39030 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1V0TQy-0007Vh-NA
	for submit <at> debbugs.gnu.org; Sat, 20 Jul 2013 05:26:37 -0400
Received: from mail1.vodafone.ie ([213.233.128.43]:54611)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <P@HIDDEN>) id 1V0TQw-0007VP-P9
 for 14913 <at> debbugs.gnu.org; Sat, 20 Jul 2013 05:26:35 -0400
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: AiUPAIdW6lFtTTi4/2dsb2JhbAABDE2DO8EcAwGBKIMYAQEBBDIBRhALDQEKCRYPCQMCAQIBRQYNAQUCAQGIGKRWkiWPMCwzB4N+A54jjho
Received: from unknown (HELO [192.168.1.79]) ([109.77.56.184])
 by mail1.vodafone.ie with ESMTP; 20 Jul 2013 10:26:28 +0100
Message-ID: <51EA57C4.3040306@HIDDEN>
Date: Sat, 20 Jul 2013 10:26:28 +0100
From: =?UTF-8?Q?P=C3=A1draig?= Brady <P@HIDDEN>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
 rv:17.0) Gecko/20130110 Thunderbird/17.0.2
MIME-Version: 1.0
References: <64D7AB922143DC4390461C102DFDD5F220383DD8@HIDDEN>
In-Reply-To: <64D7AB922143DC4390461C102DFDD5F220383DD8@HIDDEN>
X-Enigmail-Version: 1.5.1
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.0 (/)

On 07/19/2013 08:56 PM, Jeremy Wright wrote:
> * src/csplit.c (make_filename): Added initial value (-i) option
> to start output file counter at a specific given value.
> ---
>  src/csplit.c | 20 ++++++++++++++------
>  1 file changed, 14 insertions(+), 6 deletions(-)
> 
> diff --git a/src/csplit.c b/src/csplit.c
> index 7a36e67..c97790e 100644
> --- a/src/csplit.c
> +++ b/src/csplit.c
> @@ -169,6 +169,10 @@ static bool elide_empty_files;
>  /* If true, suppress the lines that match the PATTERN */
>  static bool suppress_matched;
>  
> +/* Number to start output file name count */
> +static unsigned int initial_file_number = 0;
> +
> +
>  /* The compiled pattern arguments, which determine how to split
>     the input file. */
>  static struct control *controls;
> @@ -195,6 +199,7 @@ static struct option const longopts[] =
>    {"elide-empty-files", no_argument, NULL, 'z'},
>    {"prefix", required_argument, NULL, 'f'},
>    {"suffix-format", required_argument, NULL, 'b'},
> +  {"initial-value", required_argument, NULL, 'i'},
>    {"suppress-matched", no_argument, NULL, SUPPRESS_MATCHED_OPTION},
>    {GETOPT_HELP_OPTION_DECL},
>    {GETOPT_VERSION_OPTION_DECL},
> @@ -930,9 +935,9 @@ make_filename (unsigned int num)
>  {
>    strcpy (filename_space, prefix);
>    if (suffix)
> -    sprintf (filename_space + strlen (prefix), suffix, num);
> +    sprintf (filename_space + strlen (prefix), suffix, num+initial_file_number);
>    else
> -    sprintf (filename_space + strlen (prefix), "%0*u", digits, num);
> +    sprintf (filename_space + strlen (prefix), "%0*u", digits, num+initial_file_number);
>    return filename_space;
>  }
>  
> @@ -1349,7 +1354,7 @@ main (int argc, char **argv)
>    suppress_matched = false;
>    prefix = DEFAULT_PREFIX;
>  
> -  while ((optc = getopt_long (argc, argv, "f:b:kn:sqz", longopts, NULL)) != -1)
> +  while ((optc = getopt_long (argc, argv, "f:b:kni:sqz", longopts, NULL)) != -1)
>      switch (optc)
>        {
>        case 'f':
> @@ -1379,9 +1384,11 @@ main (int argc, char **argv)
>        case 'z':
>          elide_empty_files = true;
>          break;
> -
> -      case SUPPRESS_MATCHED_OPTION:
> -        suppress_matched = true;
> +      case 'i':
> +        if (xstrtoul (optarg, NULL, 10, &val, "") != LONGINT_OK
> +            || MIN (INT_MAX, SIZE_MAX) < val)
> +          error (EXIT_FAILURE, 0, _("%s: invalid number"), optarg);
> +        initial_file_number = val;
>          break;
>  
>        case_GETOPT_HELP_CHAR;
> @@ -1498,6 +1505,7 @@ and output byte counts of each piece to standard output.\n\
>    -n, --digits=DIGITS        use specified number of digits instead of 2\n\
>    -s, --quiet, --silent      do not print counts of output file sizes\n\
>    -z, --elide-empty-files    remove empty output files\n\
> +  -i, --initial-value        starting value for the output files\n\
>  "), stdout);
>        fputs (HELP_OPTION_DESCRIPTION, stdout);
>        fputs (VERSION_OPTION_DESCRIPTION, stdout);
> 

I like this, and it mirrors a recent addition to split(1):
http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commit;h=d55d3dd5
Could you detail your use case for this.

thanks,
Pádraig.





Message received at control <at> debbugs.gnu.org:


Received: (at control) by debbugs.gnu.org; 9 Oct 2018 21:47:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Oct 09 17:47:29 2018
Received: from localhost ([127.0.0.1]:42670 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1g9zqj-0007km-1G
	for submit <at> debbugs.gnu.org; Tue, 09 Oct 2018 17:47:29 -0400
Received: from mail-it1-f182.google.com ([209.85.166.182]:54955)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <assafgordon@HIDDEN>) id 1g9zqg-0007ex-Qw
 for control <at> debbugs.gnu.org; Tue, 09 Oct 2018 17:47:27 -0400
Received: by mail-it1-f182.google.com with SMTP id l191-v6so5063669ita.4
 for <control <at> debbugs.gnu.org>; Tue, 09 Oct 2018 14:47:26 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=to:from:message-id:date:user-agent:mime-version:content-language
 :content-transfer-encoding;
 bh=Y+8bvKUoSVr+C6cO6aOxJMJc655IKp2N17wHtKyvNcE=;
 b=vWpoeqTTJtSMwqDoV2a7C6SkdS3Enkjt2ws/uekiKW/3k5F7uayfv9ccl+FIErdVbA
 aNXf7VCI7E8DmrK7Z3gtrxK0i5LCcSwv1Aj1851H0geY0luABvj7yrq5RKBAloWp+sZ2
 v8/qfRAkPSzosvdJV8Zo+AMEdtYiuEws74sII7ttlpDditipYmPh/kMTS2tnk39zFfQU
 eXpKQrfkNqfvyItNbbSSu5091yzRO0dwT3xMJ3Mc4H6j97xzkkfaPp6uLJ4MjkEMbYIj
 ULo3FVM5Yo0xEQtK8jLTB0H5feiQLEQN/nrQ9v36LPH9WXBLBfi8v1+X/WhX4jLRIO+n
 S6RA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:to:from:message-id:date:user-agent:mime-version
 :content-language:content-transfer-encoding;
 bh=Y+8bvKUoSVr+C6cO6aOxJMJc655IKp2N17wHtKyvNcE=;
 b=H6EAGNyWXNq+KNguzn1n5EBxxM6F2hBYDyoH/42YmSzSHi4uWjgv+c+Q86Be/tWBQ6
 HKO+asFc2uKdxkKSVmTxwxZwglu2v+7dm5fkD5oxZAfk1/I09JZEL6flnwm1/IpA4PmK
 czK8pKZWOkdbW01FRm0MmqJZ9fu01TAYsK4pb7EUnkER87uYlV7YFNkadH4e43THye6h
 Vn3SeuYApX7CBS3AJE8zPvEhciMckphE0oLKL36F+i4RewzaSgzIoFPzBwgqZGF0SOyj
 ZxC/i/xk6nK5paVebHAr8PwKuKd+Q6UUgvw+CD0uZd1aO5vwT/oYvRCbO5sfl6Hr8Jes
 fbVQ==
X-Gm-Message-State: ABuFfoiehcPnvF2hCys0DwpbAd2TsfB/5pL+tD8L6CJWtXlh9/S0oocr
 Hm44W0n05Rvqj/pY+cnavHcAbwZ+FXY=
X-Google-Smtp-Source: ACcGV63YSkJ7KVJoEf4J3cCqoU+sfXZHcUvqR3bQNTzxmeO2sRrqduAzYMhiMfy7t/7ovXk8QL/v4A==
X-Received: by 2002:a24:37d6:: with SMTP id
 r205-v6mr3582691itr.65.1539121640821; 
 Tue, 09 Oct 2018 14:47:20 -0700 (PDT)
Received: from tomato.housegordon.com (moose.housegordon.com. [184.68.105.38])
 by smtp.googlemail.com with ESMTPSA id
 z11-v6sm12130447itz.26.2018.10.09.14.47.19
 for <control <at> debbugs.gnu.org>
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Tue, 09 Oct 2018 14:47:19 -0700 (PDT)
To: control <at> debbugs.gnu.org
From: Assaf Gordon <assafgordon@HIDDEN>
Message-ID: <fa77be65-c78d-1ff1-7860-1d9ec44607d6@HIDDEN>
Date: Tue, 9 Oct 2018 15:47:17 -0600
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
 Thunderbird/52.9.1
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: 2.0 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  retitle 14913 csplit: add -i/--initial-value=N option stop
 [...] Content analysis details:   (2.0 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider
 (assafgordon[at]gmail.com)
 -0.0 SPF_PASS               SPF: sender matches SPF record
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at http://www.dnswl.org/, no
 trust [209.85.166.182 listed in list.dnswl.org]
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
 [209.85.166.182 listed in wl.mailspike.net]
 1.8 MISSING_SUBJECT        Missing Subject: header
 0.2 NO_SUBJECT             Extra score for no subject
X-Debbugs-Envelope-To: control
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.0 (+)

retitle 14913 csplit: add -i/--initial-value=N option
stop




Message received at control <at> debbugs.gnu.org:


Received: (at control) by debbugs.gnu.org; 19 Oct 2018 00:48:50 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Oct 18 20:48:50 2018
Received: from localhost ([127.0.0.1]:57804 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gDIy9-00043U-Tl
	for submit <at> debbugs.gnu.org; Thu, 18 Oct 2018 20:48:50 -0400
Received: from mail-pl1-f177.google.com ([209.85.214.177]:44996)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <assafgordon@HIDDEN>) id 1gDIy8-00043B-1D
 for control <at> debbugs.gnu.org; Thu, 18 Oct 2018 20:48:48 -0400
Received: by mail-pl1-f177.google.com with SMTP id d23-v6so1633643pls.11
 for <control <at> debbugs.gnu.org>; Thu, 18 Oct 2018 17:48:47 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=to:from:message-id:date:user-agent:mime-version:content-language
 :content-transfer-encoding;
 bh=hWcerk+l9bSHZzQILRk8ryU1X7uY4BHeRLVmlUPuCIE=;
 b=eqG3vIRv+utvLlDTBbP88Qh9CvMqIkgXG9LvDHMjm4r6PvxlKRi6CyRL3fIYdwPFc9
 pGG8H985KouKxQEGee8z08v2TWaXQR91ttrg3PeLnjZT2hNzcuhR1lS8qzEaYzBfnDd4
 dwfJcMWlVe3bO8vLoQXUQQ6ccGadzCuOtFt2P65w2XdmueKKGhP4v00vtnOoDOueX9Iv
 ufW0tY9WBWgRb5qKv7hyzosqs1GOLZ1QzzddbWLUbgs6xHm/FM3qq+0fX4aLurNnJ8fa
 jH+i+BU7U9vAcV4djhunaf2tk91g8I/3zctlYJYSRhRegOg76amrRRnfTeyaR1lYeGtE
 nUfw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:to:from:message-id:date:user-agent:mime-version
 :content-language:content-transfer-encoding;
 bh=hWcerk+l9bSHZzQILRk8ryU1X7uY4BHeRLVmlUPuCIE=;
 b=qjHF/EL3Rl1drr7F5Yt3h/AJl01cjvY/93xTMcPqNE8cfXJrFZUqDuvv7KBWPQcUtx
 yUTd1JyhSbP8+oI6FXdMfyivRHBrwD9Aqc1cmr468REeYCbJLviep4utXjtP4AVjk/fL
 gZzVM/IVWKnZUeGoA0BFmZWA2udszNFbV4p4GkG6uPR3lS5WtKNbWVeq6tU1oiKlO/5z
 MpwPHBRCTB27K2TSLKO16KuER160a+wuj5ANaHXJQOV2cK6NXcXXLgJaY3wwdHtTdxge
 iqTB532C+hwsejxw+9qlaYlYR+idTchFm/8H4LPjYqMiHJQrOLurCCO2jrbPxdbgGegm
 wDyg==
X-Gm-Message-State: ABuFfojPcvoTA1AdkSF7HJqKgDMz0ys+LcId7vwB9vbAbvS2VsO7+SV+
 YZO/N18ILj9NOjZp1ArfYbdp0UVogGI=
X-Google-Smtp-Source: ACcGV61h09BcjU+aAwK2ncAUPGfaWHLWh4RXckwzm+T3LlWAXofjKMwLtZkT+gmGGhdunGdT6j9BgQ==
X-Received: by 2002:a17:902:4c85:: with SMTP id
 b5-v6mr22367043ple.126.1539910121281; 
 Thu, 18 Oct 2018 17:48:41 -0700 (PDT)
Received: from tomato.housegordon.com (moose.housegordon.com. [184.68.105.38])
 by smtp.googlemail.com with ESMTPSA id
 i17-v6sm6168683pgm.36.2018.10.18.17.48.39
 for <control <at> debbugs.gnu.org>
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Thu, 18 Oct 2018 17:48:40 -0700 (PDT)
To: control <at> debbugs.gnu.org
From: Assaf Gordon <assafgordon@HIDDEN>
Message-ID: <12b07961-bb9b-932a-4a0a-cce4b1e032ca@HIDDEN>
Date: Thu, 18 Oct 2018 18:48:39 -0600
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
 Thunderbird/52.9.1
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: 2.0 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  severity 14913 wishlist [...] 
 Content analysis details:   (2.0 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider
 (assafgordon[at]gmail.com)
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at http://www.dnswl.org/, no
 trust [209.85.214.177 listed in list.dnswl.org]
 -0.0 SPF_PASS               SPF: sender matches SPF record
 1.8 MISSING_SUBJECT        Missing Subject: header
 0.2 NO_SUBJECT             Extra score for no subject
X-Debbugs-Envelope-To: control
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.0 (+)

severity 14913 wishlist





Last modified: Mon, 25 Nov 2019 12:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.