[hackers] [sbase] Change paste(1) a bit to prepare libutf changes || FRIGN

From: <git_AT_suckless.org>
Date: Thu, 10 Mar 2016 09:48:19 +0100 (CET)

commit 5b7df455f8be5efdb16c44338ad411259367b274
Author: FRIGN <dev_AT_frign.de>
AuthorDate: Thu Mar 10 07:02:38 2016 +0100
Commit: sin <sin_AT_2f30.org>
CommitDate: Thu Mar 10 08:48:09 2016 +0000

    Change paste(1) a bit to prepare libutf changes

diff --git a/paste.c b/paste.c
index 35f7543..8a8ae3e 100644
--- a/paste.c
+++ b/paste.c
_AT_@ -87,7 +87,7 @@ main(int argc, char *argv[])
 {
         struct fdescr *dsc;
         Rune *delim;
- size_t i, len;
+ size_t delimlen, i, len;
         int seq = 0, ret = 0;
         char *adelim = "\t";
 
_AT_@ -106,10 +106,10 @@ main(int argc, char *argv[])
                 usage();
 
         /* populate delimiters */
+ /* TODO: fix libutf to accept sizes */
         unescape(adelim);
         delim = ereallocarray(NULL, utflen(adelim) + 1, sizeof(*delim));
- len = utftorunestr(adelim, delim);
- if (!len)
+ if (!(delimlen = utftorunestr(adelim, delim)))
                 usage();
 
         /* populate file list */
Received on Thu Mar 10 2016 - 09:48:19 CET

This archive was generated by hypermail 2.3.0 : Thu Mar 10 2016 - 10:01:07 CET