From 1bf084e1ed4cd931b08e233a3f5c30cc9de05dfc Mon Sep 17 00:00:00 2001 From: Eduardo Chappa Date: Fri, 27 Dec 2013 12:20:58 -0700 Subject: * new address alpine-count@patches.freeiz.com for counting users of Alpine. * When writing the .pinerc file, lines could not be longer than 10,000 characters, or else this caused corruption in the .pinerc data. Now they are allowed to be of any size. * Fix a problem that made Alpine remove files before they were open by the viewer. It requires that the user has an equivalent to a command such as "ps auxww" to list the list of processes. The default is "/bin/ps auxww", but it can be changed at compile time with the option --with-ps-cmd. * Remove -lregex from linker flags when building --with-supplied-regex. * Fix _INIT_ token for reply quote string to include support for 8-bit in personal names. --- pith/reply.c | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) (limited to 'pith/reply.c') diff --git a/pith/reply.c b/pith/reply.c index 3445097f..249089ec 100644 --- a/pith/reply.c +++ b/pith/reply.c @@ -767,24 +767,35 @@ reply_quote_initials(char *name) { char *s = name, *w = name; - + int i, j; + CBUF_S cbuf; + UCS ucs; + + cbuf.cbuf[i = 0] = '\0'; + cbuf.cbufp = cbuf.cbuf; + cbuf.cbufend = cbuf.cbuf; + /* while there are still characters to look at */ while(s && *s){ /* skip to next initial */ - while(*s && isspace((unsigned char) *s)) + while(*s && (unsigned char) *s == ' ') s++; - /* skip over cruft like single quotes */ - while(*s && !isalnum((unsigned char) *s)) - s++; + if(!utf8_to_ucs4_oneatatime((unsigned char) *s++ & 0xff, &cbuf, &ucs, NULL)){ + i++; + continue; + } - /* copy initial */ - if(*s) - *w++ = *s++; + /* copy cbuf */ + for(j = 0; j <= i; j++) *w++ = cbuf.cbuf[j]; /* skip to end of this piece of name */ - while(*s && !isspace((unsigned char) *s)) + while(*s && (unsigned char) *s != ' ') s++; + + cbuf.cbuf[i = 0] = '\0'; + cbuf.cbufp = cbuf.cbuf; + cbuf.cbufend = cbuf.cbuf; } if(w) -- cgit v1.2.3-54-g00ecf