summaryrefslogtreecommitdiff
path: root/pith/reply.c
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2013-12-27 12:20:58 -0700
committerEduardo Chappa <chappa@washington.edu>2013-12-27 12:20:58 -0700
commit1bf084e1ed4cd931b08e233a3f5c30cc9de05dfc (patch)
tree5b25afa90c9ea9dbf7c8589040ee12f24b5363ad /pith/reply.c
parent186a23ef94452e15aeadf60224300ca16acd4182 (diff)
downloadalpine-1bf084e1ed4cd931b08e233a3f5c30cc9de05dfc.tar.xz
* 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.
Diffstat (limited to 'pith/reply.c')
-rw-r--r--pith/reply.c29
1 files changed, 20 insertions, 9 deletions
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)