Re: [PATCH] better diagnostics for seq

2008-02-19 Thread Jim Meyering
Steven Schubiger [EMAIL PROTECTED] wrote: Jim Meyering [EMAIL PROTECTED] wrote: Thanks for working on that. Attached is a revised patch that should take appropriately care of your suggestions. I ran make check and all tests passed. Furthermore, I checked coreutils.texi, but there seems to be

[PATCH] better diagnostics for seq

2008-02-18 Thread Steven Schubiger
Attached is a patch that enhances seq's diagnostics. If you agree that this is the right way to go, I'll amend other files (ChangeLog, etc.) as needed. Steven Schubiger diff --git a/src/seq.c b/src/seq.c index 261a44b..4a6f96e 100644 --- a/src/seq.c +++ b/src/seq.c @@ -185,12 +185,38 @@ scan_arg

Re: [PATCH] better diagnostics for seq

2008-02-18 Thread Jim Meyering
Pádraig Brady [EMAIL PROTECTED] wrote: Steven Schubiger wrote: Attached is a patch that enhances seq's diagnostics. If you agree that this is the right way to go, I'll amend other files (ChangeLog, etc.) as needed. Seems sensible. This is what I get on a reasonably recent tree: $ ./seq

Re: [PATCH] better diagnostics for seq

2008-02-18 Thread Steven Schubiger
Pádraig Brady [EMAIL PROTECTED] wrote: Seems sensible. This is what I get on a reasonably recent tree: $ ./seq -f% 1 ./seq: memory exhausted Note however that on gutsy I get the expected: $ seq -f% 1 seq: invalid format string: `%' Try `seq --help' for more information. So perhaps

Re: [PATCH] better diagnostics for seq

2008-02-18 Thread Pádraig Brady
Steven Schubiger wrote: Attached is a patch that enhances seq's diagnostics. If you agree that this is the right way to go, I'll amend other files (ChangeLog, etc.) as needed. Seems sensible. This is what I get on a reasonably recent tree: $ ./seq -f% 1 ./seq: memory exhausted Note however

Re: [PATCH] better diagnostics for seq

2008-02-18 Thread Jim Meyering
Steven Schubiger [EMAIL PROTECTED] wrote: Attached is a patch that enhances seq's diagnostics. If you agree that this is the right way to go, I'll amend other files (ChangeLog, etc.) as needed. Thanks for working on that. diff --git a/src/seq.c b/src/seq.c index 261a44b..4a6f96e 100644 ---

Re: [PATCH] better diagnostics for seq

2008-02-18 Thread Jim Meyering
Steven Schubiger [EMAIL PROTECTED] wrote: ... Should we be additionally calling usage (EXIT_FAILURE); where now error() with first argument as EXIT_FAILURE is being invoked? On one hand, I'm tempted to say if the user uses -f with a format string containing no % directive at all, then maybe

Re: [PATCH] better diagnostics for seq

2008-02-18 Thread Jim Meyering
Pádraig Brady [EMAIL PROTECTED] wrote: Steven Schubiger wrote: Attached is a patch that enhances seq's diagnostics. If you agree that this is the right way to go, I'll amend other files (ChangeLog, etc.) as needed. Seems sensible. This is what I get on a reasonably recent tree: $ ./seq -f%

Re: [PATCH] better diagnostics for seq

2008-02-18 Thread Steven Schubiger
Jim Meyering [EMAIL PROTECTED] wrote: Thanks for working on that. Attached is a revised patch that should take appropriately care of your suggestions. I ran make check and all tests passed. Furthermore, I checked coreutils.texi, but there seems to be no relevant documentation for seq with regard

Re: [PATCH] better diagnostics for seq

2008-02-18 Thread Jim Meyering
f0e9eb150c4f97211de4ebd609091e2cef88898e Mon Sep 17 00:00:00 2001 From: Steven Schubiger [EMAIL PROTECTED] Date: Mon, 18 Feb 2008 22:39:22 +0100 Subject: [PATCH] seq: give better diagnostics for invalid formats. * src/seq.c: (validate_format): New function. (main): Use it. * tests/misc/seq (fmt-d, fmt-e): Test