Change paste(1) a bit to prepare libutf changes
This commit is contained in:
parent
e537186ba4
commit
5b7df455f8
6
paste.c
6
paste.c
|
@ -87,7 +87,7 @@ main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
struct fdescr *dsc;
|
struct fdescr *dsc;
|
||||||
Rune *delim;
|
Rune *delim;
|
||||||
size_t i, len;
|
size_t delimlen, i, len;
|
||||||
int seq = 0, ret = 0;
|
int seq = 0, ret = 0;
|
||||||
char *adelim = "\t";
|
char *adelim = "\t";
|
||||||
|
|
||||||
|
@ -106,10 +106,10 @@ main(int argc, char *argv[])
|
||||||
usage();
|
usage();
|
||||||
|
|
||||||
/* populate delimiters */
|
/* populate delimiters */
|
||||||
|
/* TODO: fix libutf to accept sizes */
|
||||||
unescape(adelim);
|
unescape(adelim);
|
||||||
delim = ereallocarray(NULL, utflen(adelim) + 1, sizeof(*delim));
|
delim = ereallocarray(NULL, utflen(adelim) + 1, sizeof(*delim));
|
||||||
len = utftorunestr(adelim, delim);
|
if (!(delimlen = utftorunestr(adelim, delim)))
|
||||||
if (!len)
|
|
||||||
usage();
|
usage();
|
||||||
|
|
||||||
/* populate file list */
|
/* populate file list */
|
||||||
|
|
Loading…
Reference in New Issue
Block a user