when using a signed character pointer.
if (strncmp(line, con->appName, nameLength)) return;
line += nameLength;
if (strncmp(line, con->appName, nameLength)) return;
line += nameLength;
- if (*line == '\0' || !isspace(*line)) return;
+ if (*line == '\0' || !isSpace(line)) return;
- while (*line != '\0' && isspace(*line)) line++;
+ while (*line != '\0' && isSpace(line)) line++;
- while (*line == '\0' || !isspace(*line)) line++;
+ while (*line == '\0' || !isSpace(line)) line++;
- while (*line != '\0' && isspace(*line)) line++;
+ while (*line != '\0' && isSpace(line)) line++;
if (*line == '\0') return;
opt = line;
if (*line == '\0') return;
opt = line;
- while (*line == '\0' || !isspace(*line)) line++;
+ while (*line == '\0' || !isSpace(line)) line++;
- while (*line != '\0' && isspace(*line)) line++;
+ while (*line != '\0' && isSpace(line)) line++;
if (*line == '\0') return;
/*@-temptrans@*/ /* FIX: line alias is saved */
if (*line == '\0') return;
/*@-temptrans@*/ /* FIX: line alias is saved */
case '\n':
*dst = '\0';
dst = buf;
case '\n':
*dst = '\0';
dst = buf;
- while (*dst && isspace(*dst)) dst++;
+ while (*dst && isSpace(dst)) dst++;
if (*dst && *dst != '#')
configLine(con, dst);
chptr++;
if (*dst && *dst != '#')
configLine(con, dst);
chptr++;
char format[16];
ch = help + lineLength - 1;
char format[16];
ch = help + lineLength - 1;
- while (ch > help && !isspace(*ch)) ch--;
+ while (ch > help && !isSpace(ch)) ch--;
if (ch == help) break; /* give up */
if (ch == help) break; /* give up */
- while (ch > (help + 1) && isspace(*ch)) ch--;
+ while (ch > (help + 1) && isSpace(ch)) ch--;
ch++;
snprintf(format, sizeof format, "%%.%ds\n%%%ds", (int) (ch - help), (int) indentLength);
ch++;
snprintf(format, sizeof format, "%%.%ds\n%%%ds", (int) (ch - help), (int) indentLength);
fprintf(fp, format, help, " ");
/*@=formatconst@*/
help = ch;
fprintf(fp, format, help, " ");
/*@=formatconst@*/
help = ch;
- while (isspace(*help) && *help) help++;
+ while (isSpace(help) && *help) help++;
helpLength = strlen(help);
}
/*@=boundsread@*/
helpLength = strlen(help);
}
/*@=boundsread@*/
+static inline int
+isSpace(const char *ptr)
+{
+ return isspace(*(unsigned char *)ptr);
+}
+
/* Bit mask macros. */
/*@-exporttype -redef @*/
typedef unsigned int __pbm_bits;
/* Bit mask macros. */
/*@-exporttype -redef @*/
typedef unsigned int __pbm_bits;
#define POPT_ARGV_ARRAY_GROW_DELTA 5
/*@-boundswrite@*/
#define POPT_ARGV_ARRAY_GROW_DELTA 5
/*@-boundswrite@*/
if (*src != quote) *buf++ = '\\';
}
*buf++ = *src;
if (*src != quote) *buf++ = '\\';
}
*buf++ = *src;
- } else if (isspace(*src)) {
+ } else if (isSpace(src)) {
if (*argv[argc] != '\0') {
buf++, argc++;
if (argc == argvAlloced) {
if (*argv[argc] != '\0') {
buf++, argc++;
if (argc == argvAlloced) {
p = line;
/* loop until first non-space char or EOL */
p = line;
/* loop until first non-space char or EOL */
- while( *p != '\0' && isspace(*p) )
+ while( *p != '\0' && isSpace(p) )
p++;
linelen = strlen(p);
p++;
linelen = strlen(p);
- while (*q != '\0' && (!isspace(*q)) && *q != '=')
+ while (*q != '\0' && (!isSpace(q)) && *q != '=')
/* a space after the name, find next non space */
*q++='\0';
/* a space after the name, find next non space */
*q++='\0';
- while( *q != '\0' && isspace((int)*q) ) q++;
+ while( *q != '\0' && isSpace(q) ) q++;
}
if (*q == '\0') {
/* single command line option (ie, no name=val, just name) */
}
if (*q == '\0') {
/* single command line option (ie, no name=val, just name) */
*q++ = '\0';
/* find next non-space letter of value */
*q++ = '\0';
/* find next non-space letter of value */
- while (*q != '\0' && isspace(*q))
+ while (*q != '\0' && isSpace(q))
q++;
if (*q == '\0')
continue; /* XXX silently ignore missing value */
/* now, loop and strip all ending whitespace */
x = p + linelen;
q++;
if (*q == '\0')
continue; /* XXX silently ignore missing value */
/* now, loop and strip all ending whitespace */
x = p + linelen;
*x = 0; /* null out last char if space (including fgets() NL) */
/* rest of line accept */
*x = 0; /* null out last char if space (including fgets() NL) */
/* rest of line accept */