summaryrefslogtreecommitdiff
path: root/src/parse.c
diff options
context:
space:
mode:
authorAlan Coopersmith <Alan.Coopersmith@sun.com>2005-10-09 18:59:28 +0000
committerAlan Coopersmith <Alan.Coopersmith@sun.com>2005-10-09 18:59:28 +0000
commite2c423a32d8ba724e19e6db5b315ef9011d89488 (patch)
treea13389bf9b8a2bd8b96a53a01aa5822ef8a85564 /src/parse.c
parentea03b6bcd1045dfc0d6947e4858de8994d61170b (diff)
Bug #3755 <https://bugs.freedesktop.org/show_bug.cgi?id=3755> twm can't
handle 8-bit characters in .twmrc (Tomohiro KUBOITA)
Diffstat (limited to 'src/parse.c')
-rw-r--r--src/parse.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/parse.c b/src/parse.c
index 3f8d801..88b0b08 100644
--- a/src/parse.c
+++ b/src/parse.c
@@ -1,3 +1,4 @@
+/* $XdotOrg: $ */
/* $XFree86: xc/programs/twm/parse.c,v 1.15 2002/09/24 21:00:28 tsi Exp $ */
/*****************************************************************************/
/*
@@ -81,10 +82,10 @@ in this Software without prior written authorization from The Open Group.
static FILE *twmrc;
static int ptr = 0;
static int len = 0;
-static char buff[BUF_LEN+1];
+static unsigned char buff[BUF_LEN+1];
static unsigned char overflowbuff[20]; /* really only need one */
static int overflowlen;
-static char **stringListSource, *currentString;
+static unsigned char **stringListSource, *currentString;
static int doparse ( int (*ifunc)(void), char *srctypename, char *srcname );
static int twmFileInput ( void );
@@ -224,7 +225,7 @@ int ParseTwmrc (char *filename)
}
}
-int ParseStringList (char **sl)
+int ParseStringList (unsigned char **sl)
{
stringListSource = sl;
currentString = *sl;
@@ -243,11 +244,11 @@ static int twmFileInput()
while (ptr == len)
{
- if (fgets(buff, BUF_LEN, twmrc) == NULL)
+ if (fgets((char *) buff, BUF_LEN, twmrc) == NULL)
return 0;
ptr = 0;
- len = strlen(buff);
+ len = strlen((char *) buff);
}
return ((int)buff[ptr++]);
}