[hackers] [sbase] Refactor cut.1 and cut.c || FRIGN

From: <git_AT_suckless.org>
Date: Tue, 24 Mar 2015 23:53:15 +0100 (CET)

commit c369844ae248279b3c2e2edec568311e476ccfb2
Author: FRIGN <dev_AT_frign.de>
Date: Sat Jan 24 22:53:37 2015 +0100

    Refactor cut.1 and cut.c
    
    and reflect recent changes to the role of "delim".

diff --git a/cut.1 b/cut.1
index bd242a0..0ef177d 100644
--- a/cut.1
+++ b/cut.1
_AT_@ -53,9 +53,9 @@ delimiters are passed through, unless
 .Fl s
 is specified.
 .It Fl d Ar delim
-Use first byte of
+Use
 .Ar delim
-as field delimiter. Default is \et.
+as field delimiter, which can be an arbitrary string. Default is '\et'.
 .It Fl s
 Suppress lines not containing field delimiters.
 .El
diff --git a/cut.c b/cut.c
index cd43703..a477f3f 100644
--- a/cut.c
+++ b/cut.c
_AT_@ -158,8 +158,11 @@ resolveescapes(char *s, size_t len)
                 case 'r': s[i] = '\r'; off++; break;
                 case 't': s[i] = '\t'; off++; break;
                 case 'v': s[i] = '\v'; off++; break;
- case '\0': eprintf("cut: null escape sequence in delimiter\n");
- default: eprintf("cut: invalid escape sequence '\\%c' in delimiter\n", s[i + 1]);
+ case '\0':
+ eprintf("cut: null escape sequence in delimiter\n");
+ default:
+ eprintf("cut: invalid escape sequence '\\%c' in"
+ "delimiter\n", s[i + 1]);
                 }
 
                 for (m = i + 1; m <= len - off; m++)
Received on Tue Mar 24 2015 - 23:53:15 CET

This archive was generated by hypermail 2.3.0 : Wed Mar 25 2015 - 00:02:46 CET