~mdw
/
sgt
/
tweak
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Patch from Richard Boulton for large-file support. Works by using
[sgt/tweak]
/
rcfile.c
diff --git
a/rcfile.c
b/rcfile.c
index
6f5de8f
..
707fc5a
100644
(file)
--- a/
rcfile.c
+++ b/
rcfile.c
@@
-1,10
+1,10
@@
+#include "tweak.h"
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
-#include "tweak.h"
-
#if defined(unix) && !defined(GO32)
#define RCNAME ".tweakrc"
#elif defined(MSDOS)
#if defined(unix) && !defined(GO32)
#define RCNAME ".tweakrc"
#elif defined(MSDOS)
@@
-207,14
+207,14
@@
void read_rc (void) {
* really come from. Process it.
*/
q = rcbuffer;
* really come from. Process it.
*/
q = rcbuffer;
- while (*q && isspace(*q))
+ while (*q && isspace(
(unsigned char)
*q))
q++;
if (!*q || *q == '#')
continue; /* comment or blank line */
r = q;
q++;
if (!*q || *q == '#')
continue; /* comment or blank line */
r = q;
- while (*r && !isspace(*r))
+ while (*r && !isspace(
(unsigned char)
*r))
r++;
if (*r)
*r++ = '\0';
r++;
if (*r)
*r++ = '\0';
@@
-231,11
+231,11
@@
void read_rc (void) {
*/
keyact action;
*/
keyact action;
- while (*r && isspace(*r))
+ while (*r && isspace(
(unsigned char)
*r))
r++;
q = r;
r++;
q = r;
- while (*q && !isspace(*q))
+ while (*q && !isspace(
(unsigned char)
*q))
q++;
if (*q)
*q++ = '\0';
q++;
if (*q)
*q++ = '\0';
@@
-268,7
+268,8
@@
void read_rc (void) {
errors_here = TRUE;
} else if (*q == '\\' || *q == '^') {
*s++ = *q++;
errors_here = TRUE;
} else if (*q == '\\' || *q == '^') {
*s++ = *q++;
- } else if (isxdigit(*q) && q[1] && isxdigit(q[1])) {
+ } else if (isxdigit((unsigned char)*q) &&
+ q[1] && isxdigit((unsigned char)q[1])) {
char buf[3];
buf[0] = *q++;
buf[1] = *q++;
char buf[3];
buf[0] = *q++;
buf[1] = *q++;