GNU bug report logs -
#13080
[PATHC] improve error reporting
Previous Next
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
From 8ecd92b3c11abc5cde184f0c511cd469190511af Mon Sep 17 00:00:00 2001
From: Cojocaru Alexandru <xojoc <at> gmx.com>
Date: Tue, 4 Dec 2012 16:08:42 +0100
Subject: [PATCH] cut: improve error reporting
* src/cut.c (main): Report error on `-d '' -b1'
* src/cut.c (set_fields): Change the error message when
the given list is invalid.
---
src/cut.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/cut.c b/src/cut.c
index 4219d24..d55da51 100644
--- a/src/cut.c
+++ b/src/cut.c
@@ -365,7 +365,7 @@ set_fields (const char *fieldstr)
in_digits = false;
/* Starting a range. */
if (dash_found)
- FATAL_ERROR (_("invalid byte or field list"));
+ FATAL_ERROR (_("invalid byte, character or field list"));
dash_found = true;
fieldstr++;
@@ -491,7 +491,7 @@ set_fields (const char *fieldstr)
fieldstr++;
}
else
- FATAL_ERROR (_("invalid byte or field list"));
+ FATAL_ERROR (_("invalid byte, character or field list"));
}
max_range_endpoint = 0;
@@ -781,7 +781,7 @@ main (int argc, char **argv)
/* By default, all non-delimited lines are printed. */
suppress_non_delimited = false;
- delim = '\0';
+ delim = 0x7F + 1;
have_read_stdin = false;
while ((optc = getopt_long (argc, argv, "b:c:d:f:ns", longopts, NULL)) != -1)
@@ -846,7 +846,7 @@ main (int argc, char **argv)
if (operating_mode == undefined_mode)
FATAL_ERROR (_("you must specify a list of bytes, characters, or fields"));
- if (delim != '\0' && operating_mode != field_mode)
+ if (delim != 0x7F + 1 && operating_mode != field_mode)
FATAL_ERROR (_("an input delimiter may be specified only\
when operating on fields"));
--
1.8.0.1
This bug report was last modified 12 years and 230 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.