/*
- * "$Id: lpd.c,v 1.28.2.29 2004/02/24 21:51:36 mike Exp $"
+ * "$Id: lpd.c,v 1.28.2.30 2004/02/25 20:01:36 mike Exp $"
*
* Line Printer Daemon backend for the Common UNIX Printing System (CUPS).
*
*/
for (ptr = title; *ptr; ptr ++)
- if (!isalnum(*ptr) && !isspace(*ptr))
+ if (!isalnum(*ptr & 255) && !isspace(*ptr & 255))
*ptr = '_';
}
/*
- * End of "$Id: lpd.c,v 1.28.2.29 2004/02/24 21:51:36 mike Exp $".
+ * End of "$Id: lpd.c,v 1.28.2.30 2004/02/25 20:01:36 mike Exp $".
*/
/*
- * "$Id: admin.c,v 1.22.2.25 2003/09/30 15:14:17 mike Exp $"
+ * "$Id: admin.c,v 1.22.2.26 2004/02/25 20:01:37 mike Exp $"
*
* Administration CGI for the Common UNIX Printing System (CUPS).
*
strlcpy(keyword, line + 8, sizeof(keyword));
for (keyptr = keyword; *keyptr; keyptr ++)
- if (*keyptr == ':' || isspace(*keyptr))
+ if (*keyptr == ':' || isspace(*keyptr & 255))
break;
*keyptr = '\0';
/*
- * End of "$Id: admin.c,v 1.22.2.25 2003/09/30 15:14:17 mike Exp $".
+ * End of "$Id: admin.c,v 1.22.2.26 2004/02/25 20:01:37 mike Exp $".
*/
/*
- * "$Id: ipp-var.c,v 1.23.2.18 2004/02/24 16:38:17 mike Exp $"
+ * "$Id: ipp-var.c,v 1.23.2.19 2004/02/25 20:01:37 mike Exp $"
*
* IPP variable routines for the Common UNIX Printing System (CUPS).
*
if (lang != NULL)
{
for (i = 0; lang[i] && i < 15; i ++)
- if (isalnum(lang[i]))
+ if (isalnum(lang[i] & 255))
locale[i] = tolower(lang[i]);
else
locale[i] = '_';
/*
- * End of "$Id: ipp-var.c,v 1.23.2.18 2004/02/24 16:38:17 mike Exp $".
+ * End of "$Id: ipp-var.c,v 1.23.2.19 2004/02/25 20:01:37 mike Exp $".
*/
/*
- * "$Id: template.c,v 1.22.2.5 2003/07/20 15:41:18 mike Exp $"
+ * "$Id: template.c,v 1.22.2.6 2004/02/25 20:01:37 mike Exp $"
*
* CGI template function.
*
if (lang != NULL)
{
for (i = 0; lang[i] && i < 15; i ++)
- if (isalnum(lang[i]))
+ if (isalnum(lang[i] & 255))
locale[i] = tolower(lang[i]);
else
locale[i] = '_';
*s = '\0';
- if (s == name && isspace(ch))
+ if (s == name && isspace(ch & 255))
{
if (out)
{
* Insert value only if it exists...
*/
- if ((nameptr = strrchr(name, '-')) != NULL && isdigit(nameptr[1]))
+ if ((nameptr = strrchr(name, '-')) != NULL && isdigit(nameptr[1] & 255))
{
*nameptr++ = '\0';
int count; /* Number of elements */
- if (isdigit(name[1]))
+ if (isdigit(name[1] & 255))
count = atoi(name + 1);
else
count = cgiGetSize(name + 1);
* Insert variable or variable name (if element is NULL)...
*/
- if ((nameptr = strrchr(name, '-')) != NULL && isdigit(nameptr[1]))
+ if ((nameptr = strrchr(name, '-')) != NULL && isdigit(nameptr[1] & 255))
{
*nameptr++ = '\0';
if ((value = cgiGetArray(name, atoi(nameptr) - 1)) == NULL)
if (innername[0] == '#')
sprintf(s, "%d", cgiGetSize(innername + 1));
else if ((innerptr = strrchr(innername, '-')) != NULL &&
- isdigit(innerptr[1]))
+ isdigit(innerptr[1] & 255))
{
*innerptr++ = '\0';
if ((innerval = cgiGetArray(innername, atoi(innerptr) - 1)) == NULL)
/*
- * End of "$Id: template.c,v 1.22.2.5 2003/07/20 15:41:18 mike Exp $".
+ * End of "$Id: template.c,v 1.22.2.6 2004/02/25 20:01:37 mike Exp $".
*/
/*
- * "$Id: var.c,v 1.20.2.3 2003/01/07 18:26:20 mike Exp $"
+ * "$Id: var.c,v 1.20.2.4 2004/02/25 20:01:37 mike Exp $"
*
* CGI form variable and array functions.
*
* Add the string to the variable "database"...
*/
- if ((s = strrchr(name, '-')) != NULL && isdigit(s[1]))
+ if ((s = strrchr(name, '-')) != NULL && isdigit(s[1] & 255))
{
*s++ = '\0';
if (value[0])
/*
- * End of "$Id: var.c,v 1.20.2.3 2003/01/07 18:26:20 mike Exp $".
+ * End of "$Id: var.c,v 1.20.2.4 2004/02/25 20:01:37 mike Exp $".
*/
/*
- * "$Id: form-tree.c,v 1.4.2.3 2003/01/07 18:26:51 mike Exp $"
+ * "$Id: form-tree.c,v 1.4.2.4 2004/02/25 20:01:37 mike Exp $"
*
* CUPS form document tree routines for the Common UNIX Printing
* System (CUPS).
if (p == NULL || !p->preformatted)
{
- while (isspace(ch))
+ while (isspace(ch & 255))
{
have_whitespace = 1;
ch = getc(fp);
for (glyphptr = glyph;
(ch = getc(fp)) != EOF && (glyphptr - glyph) < 15;
glyphptr ++)
- if (!isalnum(ch))
+ if (!isalnum(ch & 255))
break;
else
*glyphptr = ch;
if (have_whitespace)
*ptr++ = ' ';
- while (!isspace(ch) && ch != '<' && ch != EOF && ptr < (s + sizeof(s) - 1))
+ while (!isspace(ch & 255) && ch != '<' && ch != EOF && ptr < (s + sizeof(s) - 1))
{
if (ch == '&')
{
for (glyphptr = glyph;
(ch = getc(fp)) != EOF && (glyphptr - glyph) < 15;
glyphptr ++)
- if (!isalnum(ch))
+ if (!isalnum(ch & 255))
break;
else
*glyphptr = ch;
ch = getc(fp);
}
- if (isspace(ch))
+ if (isspace(ch & 255))
*ptr++ = ' ';
*ptr = '\0';
ptr = name;
while ((ch = getc(fp)) != EOF)
- if (isalnum(ch))
+ if (isalnum(ch & 255))
{
if (ptr < (name + sizeof(name) - 1))
*ptr++ = ch;
*ptr = '\0';
- while (isspace(ch) || ch == '\r')
+ while (isspace(ch & 255) || ch == '\r')
ch = getc(fp);
switch (ch)
ptr = value;
ch = getc(fp);
- while (isspace(ch) || ch == '\r')
+ while (isspace(ch & 255) || ch == '\r')
ch = getc(fp);
if (ch == EOF)
{
*ptr++ = ch;
while ((ch = getc(fp)) != EOF)
- if (isspace(ch) || ch == '>' || ch == '/' || ch == '\r')
+ if (isspace(ch & 255) || ch == '>' || ch == '/' || ch == '\r')
break;
else if (ptr < (value + sizeof(value) - 1))
*ptr++ = ch;
eptr = element;
while ((ch = getc(fp)) != EOF && eptr < (element + sizeof(element) - 1))
- if (ch == '>' || ch == '/' || isspace(ch))
+ if (ch == '>' || ch == '/' || isspace(ch & 255))
break;
else
*eptr++ = ch;
{
while (ch != EOF && ch != '>' && ch != '/')
{
- if (!isspace(ch))
+ if (!isspace(ch & 255))
{
ungetc(ch, fp);
parse_variable(t, fp);
/*
- * End of "$Id: form-tree.c,v 1.4.2.3 2003/01/07 18:26:51 mike Exp $".
+ * End of "$Id: form-tree.c,v 1.4.2.4 2004/02/25 20:01:37 mike Exp $".
*/
/*
- * "$Id: hpgl-input.c,v 1.10.2.4 2003/11/07 21:43:36 mike Exp $"
+ * "$Id: hpgl-input.c,v 1.10.2.5 2004/02/25 20:01:37 mike Exp $"
*
* HP-GL/2 input processing for the Common UNIX Printing System (CUPS).
*
}
default : /* HP RTL/PCL control */
- while ((i = getc(fp)) != EOF && !isupper(i));
+ while ((i = getc(fp)) != EOF && !isupper(i & 255));
break;
}
} while (ch < ' ');
/*
- * End of "$Id: hpgl-input.c,v 1.10.2.4 2003/11/07 21:43:36 mike Exp $".
+ * End of "$Id: hpgl-input.c,v 1.10.2.5 2004/02/25 20:01:37 mike Exp $".
*/
/*
- * "$Id: image-pnm.c,v 1.7.2.5 2003/01/07 18:26:54 mike Exp $"
+ * "$Id: image-pnm.c,v 1.7.2.6 2004/02/25 20:01:37 mike Exp $"
*
* Portable Any Map file routines for the Common UNIX Printing System (CUPS).
*
lineptr ++;
format = atoi(lineptr);
- while (isdigit(*lineptr))
+ while (isdigit(*lineptr & 255))
lineptr ++;
while (lineptr != NULL && img->xsize == 0)
{
if (*lineptr == '\0' || *lineptr == '#')
lineptr = fgets(line, sizeof(line), fp);
- else if (isdigit(*lineptr))
+ else if (isdigit(*lineptr & 255))
{
img->xsize = atoi(lineptr);
- while (isdigit(*lineptr))
+ while (isdigit(*lineptr & 255))
lineptr ++;
}
else
{
if (*lineptr == '\0' || *lineptr == '#')
lineptr = fgets(line, sizeof(line), fp);
- else if (isdigit(*lineptr))
+ else if (isdigit(*lineptr & 255))
{
img->ysize = atoi(lineptr);
- while (isdigit(*lineptr))
+ while (isdigit(*lineptr & 255))
lineptr ++;
}
else
{
if (*lineptr == '\0' || *lineptr == '#')
lineptr = fgets(line, sizeof(line), fp);
- else if (isdigit(*lineptr))
+ else if (isdigit(*lineptr & 255))
{
maxval = atoi(lineptr);
- while (isdigit(*lineptr))
+ while (isdigit(*lineptr & 255))
lineptr ++;
}
else
/*
- * End of "$Id: image-pnm.c,v 1.7.2.5 2003/01/07 18:26:54 mike Exp $".
+ * End of "$Id: image-pnm.c,v 1.7.2.6 2004/02/25 20:01:37 mike Exp $".
*/
/*
- * "$Id: image.c,v 1.28.2.4 2003/01/07 18:26:56 mike Exp $"
+ * "$Id: image.c,v 1.28.2.5 2004/02/25 20:01:37 mike Exp $"
*
* Base image support for the Common UNIX Printing System (CUPS).
*
max_size *= 4 * TILE_SIZE * TILE_SIZE;
break;
case 2 :
- if (tolower(cache_units[0]) == 'g')
+ if (tolower(cache_units[0] & 255) == 'g')
max_size *= 1024 * 1024 * 1024;
- else if (tolower(cache_units[0]) == 'm')
+ else if (tolower(cache_units[0] & 255) == 'm')
max_size *= 1024 * 1024;
- else if (tolower(cache_units[0]) == 'k')
+ else if (tolower(cache_units[0] & 255) == 'k')
max_size *= 1024;
- else if (tolower(cache_units[0]) == 't')
+ else if (tolower(cache_units[0] & 255) == 't')
max_size *= 4 * TILE_SIZE * TILE_SIZE;
break;
}
/*
- * End of "$Id: image.c,v 1.28.2.4 2003/01/07 18:26:56 mike Exp $".
+ * End of "$Id: image.c,v 1.28.2.5 2004/02/25 20:01:37 mike Exp $".
*/
/*
- * "$Id: imagetoraster.c,v 1.56.2.16 2003/07/28 17:32:38 mike Exp $"
+ * "$Id: imagetoraster.c,v 1.56.2.17 2004/02/25 20:01:37 mike Exp $"
*
* Image file to raster filter for the Common UNIX Printing System (CUPS).
*
*/
code ++;
- for (ptr = name; isalnum(*code) && (ptr - name) < (sizeof(name) - 1);)
+ for (ptr = name; isalnum(*code & 255) && (ptr - name) < (sizeof(name) - 1);)
*ptr++ = *code++;
*ptr = '\0';
* The parse the value as needed...
*/
- while (isspace(*code))
+ while (isspace(*code & 255))
code ++;
if (*code == '\0')
if (*code == '\\')
{
code ++;
- if (isdigit(*code))
+ if (isdigit(*code & 255))
*ptr++ = (char)strtol(code, (char **)&code, 8);
else
*ptr++ = *code++;
*ptr = '\0';
}
- else if (isdigit(*code) || *code == '-')
+ else if (isdigit(*code & 255) || *code == '-')
{
/*
* Read single number...
*/
for (ptr = value;
- (isdigit(*code) || *code == '-') &&
+ (isdigit(*code & 255) || *code == '-') &&
(ptr - value) < (sizeof(value) - 1);)
*ptr++ = *code++;
*ptr = '\0';
*/
for (ptr = value;
- (isalnum(*code) || *code == '_') &&
+ (isalnum(*code & 255) || *code == '_') &&
(ptr - value) < (sizeof(value) - 1);)
*ptr++ = *code++;
*ptr = '\0';
/*
- * End of "$Id: imagetoraster.c,v 1.56.2.16 2003/07/28 17:32:38 mike Exp $".
+ * End of "$Id: imagetoraster.c,v 1.56.2.17 2004/02/25 20:01:37 mike Exp $".
*/
/*
- * "$Id: pstops.c,v 1.54.2.47 2004/02/24 20:16:42 mike Exp $"
+ * "$Id: pstops.c,v 1.54.2.48 2004/02/25 20:01:37 mike Exp $"
*
* PostScript filter for the Common UNIX Printing System (CUPS).
*
if (*range == '-')
{
range ++;
- if (!isdigit(*range))
+ if (!isdigit(*range & 255))
upper = 65535;
else
upper = strtol(range, (char **)&range, 10);
/*
- * End of "$Id: pstops.c,v 1.54.2.47 2004/02/24 20:16:42 mike Exp $".
+ * End of "$Id: pstops.c,v 1.54.2.48 2004/02/25 20:01:37 mike Exp $".
*/
/*
- * "$Id: textcommon.c,v 1.16.2.13 2003/08/28 14:36:54 mike Exp $"
+ * "$Id: textcommon.c,v 1.16.2.14 2004/02/25 20:01:37 mike Exp $"
*
* Common text filter routines for the Common UNIX Printing System (CUPS).
*
attr &= ~ATTR_BOLD;
}
- else if (!(isalnum(ch) || ch == '_') && keyptr > keyword)
+ else if (!(isalnum(ch & 255) || ch == '_') && keyptr > keyword)
{
/*
* Look for a keyword...
}
}
}
- else if ((isalnum(ch) || ch == '_') && !ccomment && !cstring)
+ else if ((isalnum(ch & 255) || ch == '_') && !ccomment && !cstring)
{
/*
* Add characters to the current keyword (if they'll fit).
/*
- * End of "$Id: textcommon.c,v 1.16.2.13 2003/08/28 14:36:54 mike Exp $".
+ * End of "$Id: textcommon.c,v 1.16.2.14 2004/02/25 20:01:37 mike Exp $".
*/
/*
- * "$Id: texttops.c,v 1.34.2.12 2003/01/07 18:27:01 mike Exp $"
+ * "$Id: texttops.c,v 1.34.2.13 2004/02/25 20:01:37 mike Exp $"
*
* Text to PostScript filter for the Common UNIX Printing System (CUPS).
*
*/
line[strlen(line) - 1] = '\0'; /* Drop \n */
- for (lineptr = line + 7; isspace(*lineptr); lineptr ++); /* Skip whitespace */
+ for (lineptr = line + 7; isspace(*lineptr & 255); lineptr ++); /* Skip whitespace */
if (strcmp(lineptr, "8bit") == 0)
{
start = strtol(lineptr, &lineptr, 16);
end = strtol(lineptr, &lineptr, 16);
- while (isspace(*lineptr))
+ while (isspace(*lineptr & 255))
lineptr ++;
if (!*lineptr)
valptr = lineptr;
- while (!isspace(*lineptr) && *lineptr)
+ while (!isspace(*lineptr & 255) && *lineptr)
lineptr ++;
if (!*lineptr)
* Got the direction, now get the width...
*/
- while (isspace(*lineptr))
+ while (isspace(*lineptr & 255))
lineptr ++;
valptr = lineptr;
- while (!isspace(*lineptr) && *lineptr)
+ while (!isspace(*lineptr & 255) && *lineptr)
lineptr ++;
if (!*lineptr)
for (i = 0; *lineptr && i < 4; i ++)
{
- while (isspace(*lineptr))
+ while (isspace(*lineptr & 255))
lineptr ++;
valptr = lineptr;
- while (!isspace(*lineptr) && *lineptr)
+ while (!isspace(*lineptr & 255) && *lineptr)
lineptr ++;
if (*lineptr)
start = strtol(lineptr, &lineptr, 16);
end = strtol(lineptr, &lineptr, 16);
- while (isspace(*lineptr))
+ while (isspace(*lineptr & 255))
lineptr ++;
valptr = lineptr;
- while (!isspace(*lineptr) && *lineptr)
+ while (!isspace(*lineptr & 255) && *lineptr)
lineptr ++;
if (!*lineptr)
* Got the direction, now get the width...
*/
- while (isspace(*lineptr))
+ while (isspace(*lineptr & 255))
lineptr ++;
valptr = lineptr;
- while (!isspace(*lineptr) && *lineptr)
+ while (!isspace(*lineptr & 255) && *lineptr)
lineptr ++;
if (!*lineptr)
for (i = 0; *lineptr && i < 4; i ++)
{
- while (isspace(*lineptr))
+ while (isspace(*lineptr & 255))
lineptr ++;
valptr = lineptr;
- while (!isspace(*lineptr) && *lineptr)
+ while (!isspace(*lineptr & 255) && *lineptr)
lineptr ++;
if (*lineptr)
while (col < SizeColumns && line->ch != 0 && attr == line->attr)
{
if (Directions[Chars[line->ch] / 256] > 0 &&
- !ispunct(line->ch) && !isspace(line->ch))
+ !ispunct(line->ch & 255) && !isspace(line->ch & 255))
break;
col ++;
}
for (i = 1; start < line; i ++, start ++)
- if (!isspace(start->ch))
+ if (!isspace(start->ch & 255))
write_string(col - i, row, 1, start);
}
}
/*
- * End of "$Id: texttops.c,v 1.34.2.12 2003/01/07 18:27:01 mike Exp $".
+ * End of "$Id: texttops.c,v 1.34.2.13 2004/02/25 20:01:37 mike Exp $".
*/
GBool isInt(char *s) {
if (*s == '-' || *s == '+')
++s;
- while (isdigit(*s))
+ while (isdigit(*s & 255))
++s;
if (*s)
return gFalse;
if (*s == '-' || *s == '+')
++s;
n = 0;
- while (isdigit(*s)) {
+ while (isdigit(*s & 255)) {
++s;
++n;
}
if (*s == '.')
++s;
- while (isdigit(*s)) {
+ while (isdigit(*s & 255)) {
++s;
++n;
}
if (*s == '-' || *s == '+')
++s;
n = 0;
- if (!isdigit(*s))
+ if (!isdigit(*s & 255))
return gFalse;
do {
++s;
- } while (isdigit(*s));
+ } while (isdigit(*s & 255));
}
if (*s)
return gFalse;
/*
- * "$Id: classes.c,v 1.34.2.17 2003/09/15 20:11:07 mike Exp $"
+ * "$Id: classes.c,v 1.34.2.18 2004/02/25 20:01:37 mike Exp $"
*
* Printer class routines for the Common UNIX Printing System (CUPS).
*
len = strlen(line);
- while (len > 0 && isspace(line[len - 1]))
+ while (len > 0 && isspace(line[len - 1] & 255))
{
len --;
line[len] = '\0';
* Extract the name from the beginning of the line...
*/
- for (value = line; isspace(*value); value ++);
+ for (value = line; isspace(*value & 255); value ++);
- for (nameptr = name; *value != '\0' && !isspace(*value) &&
+ for (nameptr = name; *value != '\0' && !isspace(*value & 255) &&
nameptr < (name + sizeof(name) - 1);)
*nameptr++ = *value++;
*nameptr = '\0';
- while (isspace(*value))
+ while (isspace(*value & 255))
value ++;
if (name[0] == '\0')
* Set the initial queue state message...
*/
- while (isspace(*value))
+ while (isspace(*value & 255))
value ++;
strlcpy(p->state_message, value, sizeof(p->state_message));
* Set the initial job sheets...
*/
- for (valueptr = value; *valueptr && !isspace(*valueptr); valueptr ++);
+ for (valueptr = value; *valueptr && !isspace(*valueptr & 255); valueptr ++);
if (*valueptr)
*valueptr++ = '\0';
SetString(&p->job_sheets[0], value);
- while (isspace(*valueptr))
+ while (isspace(*valueptr & 255))
valueptr ++;
if (*valueptr)
{
- for (value = valueptr; *valueptr && !isspace(*valueptr); valueptr ++);
+ for (value = valueptr; *valueptr && !isspace(*valueptr & 255); valueptr ++);
if (*valueptr)
*valueptr++ = '\0';
/*
- * End of "$Id: classes.c,v 1.34.2.17 2003/09/15 20:11:07 mike Exp $".
+ * End of "$Id: classes.c,v 1.34.2.18 2004/02/25 20:01:37 mike Exp $".
*/
/*
- * "$Id: client.c,v 1.91.2.76 2004/02/25 16:22:01 mike Exp $"
+ * "$Id: client.c,v 1.91.2.77 2004/02/25 20:01:37 mike Exp $"
*
* Client routines for the Common UNIX Printing System (CUPS) scheduler.
*
commptr --;
}
- else if (*commptr == '%')
+ else if (*commptr == '%' && isxdigit(commptr[1] & 255) &&
+ isxdigit(commptr[2] & 255))
{
if (commptr[1] >= '0' && commptr[1] <= '9')
*commptr = (commptr[1] - '0') << 4;
/*
- * End of "$Id: client.c,v 1.91.2.76 2004/02/25 16:22:01 mike Exp $".
+ * End of "$Id: client.c,v 1.91.2.77 2004/02/25 20:01:37 mike Exp $".
*/
/*
- * "$Id: conf.c,v 1.77.2.48 2004/02/24 21:36:59 mike Exp $"
+ * "$Id: conf.c,v 1.77.2.49 2004/02/25 20:01:37 mike Exp $"
*
* Configuration routines for the Common UNIX Printing System (CUPS).
*
if (units && *units)
{
- if (tolower(units[0]) == 'g')
+ if (tolower(units[0] & 255) == 'g')
n *= 1024 * 1024 * 1024;
- else if (tolower(units[0]) == 'm')
+ else if (tolower(units[0] & 255) == 'm')
n *= 1024 * 1024;
- else if (tolower(units[0]) == 'k')
+ else if (tolower(units[0] & 255) == 'k')
n *= 1024;
- else if (tolower(units[0]) == 't')
+ else if (tolower(units[0] & 255) == 't')
n *= 262144;
}
len = strlen(line);
- while (len > 0 && isspace(line[len - 1]))
+ while (len > 0 && isspace(line[len - 1] & 255))
{
len --;
line[len] = '\0';
* Extract the name from the beginning of the line...
*/
- for (value = line; isspace(*value); value ++);
+ for (value = line; isspace(*value & 255); value ++);
- for (nameptr = name; *value != '\0' && !isspace(*value) &&
+ for (nameptr = name; *value != '\0' && !isspace(*value & 255) &&
nameptr < (name + sizeof(name) - 1);)
*nameptr++ = *value++;
*nameptr = '\0';
- while (isspace(*value))
+ while (isspace(*value & 255))
value ++;
if (name[0] == '\0')
while (*value)
{
for (valptr = value;
- !isspace(*valptr) && *valptr != '>' && *valptr;
+ !isspace(*valptr & 255) && *valptr != '>' && *valptr;
valptr ++);
if (*valptr)
LogMessage(L_WARN, "Unknown request type %s on line %d!", value,
linenum);
- for (value = valptr; isspace(*value) || *value == '>'; value ++);
+ for (value = valptr; isspace(*value & 255) || *value == '>'; value ++);
}
if (strcasecmp(name, "<LimitExcept") == 0)
value += 4;
- while (isspace(*value))
+ while (isspace(*value & 255))
value ++;
}
else
DenyIP(loc, ones, zeros);
}
- else if (value[0] == '*' || value[0] == '.' || !isdigit(value[0]))
+ else if (value[0] == '*' || value[0] == '.' || !isdigit(value[0] & 255))
{
/*
* Host or domain name...
*/
for (valptr = value;
- !isspace(*valptr) && *valptr != '>' && *valptr;
+ !isspace(*valptr & 255) && *valptr != '>' && *valptr;
valptr ++);
if (*valptr)
for (value = valptr; *value;)
{
- for (valptr = value; !isspace(*valptr) && *valptr; valptr ++);
+ for (valptr = value; !isspace(*valptr & 255) && *valptr; valptr ++);
if (*valptr)
*valptr++ = '\0';
AddName(loc, value);
- for (value = valptr; isspace(*value); value ++);
+ for (value = valptr; isspace(*value & 255); value ++);
}
}
else if (strcasecmp(name, "Satisfy") == 0)
if (portname[0] != '\0')
{
- if (isdigit(portname[0]))
+ if (isdigit(portname[0] & 255))
{
#ifdef AF_INET6
if (address->addr.sa_family == AF_INET6)
/*
- * End of "$Id: conf.c,v 1.77.2.48 2004/02/24 21:36:59 mike Exp $".
+ * End of "$Id: conf.c,v 1.77.2.49 2004/02/25 20:01:37 mike Exp $".
*/
/*
- * "$Id: cups-lpd.c,v 1.24.2.15 2004/02/17 21:32:58 mike Exp $"
+ * "$Id: cups-lpd.c,v 1.24.2.16 2004/02/25 20:01:37 mike Exp $"
*
* Line Printer Daemon interface for the Common UNIX Printing System (CUPS).
*
command = line[0];
dest = line + 1;
- for (list = dest + 1; *list && !isspace(*list); list ++);
+ for (list = dest + 1; *list && !isspace(*list & 255); list ++);
- while (isspace(*list))
+ while (isspace(*list & 255))
*list++ = '\0';
/*
agent = list;
- for (; *list && !isspace(*list); list ++);
- while (isspace(*list))
+ for (; *list && !isspace(*list & 255); list ++);
+ while (isspace(*list & 255))
*list++ = '\0';
syslog(LOG_INFO, "Remove jobs %s on %s by %s", list, dest, agent);
command = line[0];
count = line + 1;
- for (name = count + 1; *name && !isspace(*name); name ++);
- while (isspace(*name))
+ for (name = count + 1; *name && !isspace(*name & 255); name ++);
+ while (isspace(*name & 255))
*name++ = '\0';
switch (command)
* Skip job ID in list...
*/
- while (isdigit(*list))
+ while (isdigit(*list & 255))
list ++;
- while (isspace(*list))
+ while (isspace(*list & 255))
list ++;
/*
/*
- * End of "$Id: cups-lpd.c,v 1.24.2.15 2004/02/17 21:32:58 mike Exp $".
+ * End of "$Id: cups-lpd.c,v 1.24.2.16 2004/02/25 20:01:37 mike Exp $".
*/
/*
- * "$Id: devices.c,v 1.14.2.4 2003/01/07 18:27:19 mike Exp $"
+ * "$Id: devices.c,v 1.14.2.5 2004/02/25 20:01:37 mike Exp $"
*
* Device scanning routines for the Common UNIX Printing System (CUPS).
*
*
* Contents:
*
- * LoadDevices() - Load all available devices.
+ * LoadDevices() - Load all available devices.
+ * compare_devs() - Compare PPD file make and model names for sorting.
+ * sigalrm_handler() - Handle alarm signals for backends that get hung
*/
/*
/*
- * 'compare_devs()' - Compare PPD file make and model names for sorting.
+ * 'compare_devs()' - Compare device names for sorting.
*/
static int /* O - Result of comparison */
-compare_devs(const dev_info_t *d0, /* I - First PPD file */
- const dev_info_t *d1) /* I - Second PPD file */
+compare_devs(const dev_info_t *d0, /* I - First device */
+ const dev_info_t *d1) /* I - Second device */
{
const char *s, /* First name */
*t; /* Second name */
while (*s && *t)
{
- if (isdigit(*s) && isdigit(*t))
+ if (isdigit(*s & 255) && isdigit(*t & 255))
{
/*
* Got a number; start by skipping leading 0's...
* Skip equal digits...
*/
- while (isdigit(*s) && *s == *t)
+ while (isdigit(*s & 255) && *s == *t)
{
s ++;
t ++;
* Bounce out if *s and *t aren't both digits...
*/
- if (isdigit(*s) && !isdigit(*t))
+ if (isdigit(*s & 255) && !isdigit(*t & 255))
return (1);
- else if (!isdigit(*s) && isdigit(*t))
+ else if (!isdigit(*s & 255) && isdigit(*t & 255))
return (-1);
- else if (!isdigit(*s) || !isdigit(*t))
+ else if (!isdigit(*s & 255) || !isdigit(*t & 255))
continue;
if (*s < *t)
s ++;
t ++;
- while (isdigit(*s))
+ while (isdigit(*s & 255))
{
digits ++;
s ++;
}
- while (isdigit(*t))
+ while (isdigit(*t & 255))
{
digits --;
t ++;
/*
- * End of "$Id: devices.c,v 1.14.2.4 2003/01/07 18:27:19 mike Exp $".
+ * End of "$Id: devices.c,v 1.14.2.5 2004/02/25 20:01:37 mike Exp $".
*/
/*
- * "$Id: dirsvc.c,v 1.73.2.45 2004/02/24 19:04:05 mike Exp $"
+ * "$Id: dirsvc.c,v 1.73.2.46 2004/02/25 20:01:37 mike Exp $"
*
* Directory services routines for the Common UNIX Printing System (CUPS).
*
if (*pptr == '\"')
pptr ++;
- while (*pptr && isspace(*pptr))
+ while (*pptr && isspace(*pptr & 255))
pptr ++;
if (*pptr == '\"')
if (*pptr == '\"')
pptr ++;
- while (*pptr && isspace(*pptr))
+ while (*pptr && isspace(*pptr & 255))
pptr ++;
if (*pptr == '\"')
/*
- * End of "$Id: dirsvc.c,v 1.73.2.45 2004/02/24 19:04:05 mike Exp $".
+ * End of "$Id: dirsvc.c,v 1.73.2.46 2004/02/25 20:01:37 mike Exp $".
*/
/*
- * "$Id: ipp.c,v 1.127.2.78 2004/02/17 21:32:58 mike Exp $"
+ * "$Id: ipp.c,v 1.127.2.79 2004/02/25 20:01:37 mike Exp $"
*
* IPP routines for the Common UNIX Printing System (CUPS) scheduler.
*
*/
for (s = attrname; (ch = cupsFileGetChar(in)) != EOF;)
- if (!isalpha(ch) && ch != '-' && ch != '?')
+ if (!isalpha(ch & 255) && ch != '-' && ch != '?')
break;
else if (s < (attrname + sizeof(attrname) - 1))
*s++ = ch;
*/
strlcpy(system_paper, paper_result, sizeof(system_paper));
- system_paper[0] = toupper(system_paper[0]);
+ system_paper[0] = toupper(system_paper[0] & 255);
num_defaults = ppd_add_default("PageSize", system_paper,
num_defaults, &defaults);
* Read the option name...
*/
- for (line += 8, olen --; isalnum(*line); line ++)
+ for (line += 8, olen --; isalnum(*line & 255); line ++)
if (olen > 0)
{
*option++ = *line;
* Now grab the option choice, skipping leading whitespace...
*/
- while (isspace(*line))
+ while (isspace(*line & 255))
line ++;
- for (clen --; isalnum(*line); line ++)
+ for (clen --; isalnum(*line & 255); line ++)
if (clen > 0)
{
*choice++ = *line;
/*
- * End of "$Id: ipp.c,v 1.127.2.78 2004/02/17 21:32:58 mike Exp $".
+ * End of "$Id: ipp.c,v 1.127.2.79 2004/02/25 20:01:37 mike Exp $".
*/
/*
- * "$Id: job.c,v 1.124.2.83 2004/02/03 12:56:07 mike Exp $"
+ * "$Id: job.c,v 1.124.2.84 2004/02/25 20:01:37 mike Exp $"
*
* Job management routines for the Common UNIX Printing System (CUPS).
*
snprintf(language, sizeof(language), "LANG=%c%c_%c%c",
attr->values[0].string.text[0],
attr->values[0].string.text[1],
- toupper(attr->values[0].string.text[3]),
- toupper(attr->values[0].string.text[4]));
+ toupper(attr->values[0].string.text[3] & 255),
+ toupper(attr->values[0].string.text[4] & 255));
break;
}
* Skip leading whitespace in the message...
*/
- while (isspace(*message))
+ while (isspace(*message & 255))
message ++;
/*
/*
- * End of "$Id: job.c,v 1.124.2.83 2004/02/03 12:56:07 mike Exp $".
+ * End of "$Id: job.c,v 1.124.2.84 2004/02/25 20:01:37 mike Exp $".
*/
/*
- * "$Id: mime.c,v 1.7.2.10 2003/03/28 22:29:49 mike Exp $"
+ * "$Id: mime.c,v 1.7.2.11 2004/02/25 20:01:37 mike Exp $"
*
* MIME database file routines for the Common UNIX Printing System (CUPS).
*
while (*lineptr != '/' && *lineptr != '\n' && *lineptr != '\0' &&
(temp - super + 1) < MIME_MAX_SUPER)
- *temp++ = tolower(*lineptr++);
+ *temp++ = tolower(*lineptr++ & 255);
*temp = '\0';
while (*lineptr != ' ' && *lineptr != '\t' && *lineptr != '\n' &&
*lineptr != '\0' && (temp - type + 1) < MIME_MAX_TYPE)
- *temp++ = tolower(*lineptr++);
+ *temp++ = tolower(*lineptr++ & 255);
*temp = '\0';
*/
for (lineptr = line + strlen(line) - 1;
- lineptr >= line && isspace(*lineptr);
+ lineptr >= line && isspace(*lineptr & 255);
lineptr --)
*lineptr = '\0';
while (*lineptr != '/' && *lineptr != '\n' && *lineptr != '\0' &&
(temp - super + 1) < MIME_MAX_SUPER)
- *temp++ = tolower(*lineptr++);
+ *temp++ = tolower(*lineptr++ & 255);
*temp = '\0';
while (*lineptr != ' ' && *lineptr != '\t' && *lineptr != '\n' &&
*lineptr != '\0' && (temp - type + 1) < MIME_MAX_TYPE)
- *temp++ = tolower(*lineptr++);
+ *temp++ = tolower(*lineptr++ & 255);
*temp = '\0';
while (*lineptr != '/' && *lineptr != '\n' && *lineptr != '\0' &&
(temp - super + 1) < MIME_MAX_SUPER)
- *temp++ = tolower(*lineptr++);
+ *temp++ = tolower(*lineptr++ & 255);
*temp = '\0';
while (*lineptr != ' ' && *lineptr != '\t' && *lineptr != '\n' &&
*lineptr != '\0' && (temp - type + 1) < MIME_MAX_TYPE)
- *temp++ = tolower(*lineptr++);
+ *temp++ = tolower(*lineptr++ & 255);
*temp = '\0';
/*
- * End of "$Id: mime.c,v 1.7.2.10 2003/03/28 22:29:49 mike Exp $".
+ * End of "$Id: mime.c,v 1.7.2.11 2004/02/25 20:01:37 mike Exp $".
*/
/*
- * "$Id: ppds.c,v 1.14.2.12 2003/09/04 14:48:14 mike Exp $"
+ * "$Id: ppds.c,v 1.14.2.13 2004/02/25 20:01:37 mike Exp $"
*
* PPD scanning routines for the Common UNIX Printing System (CUPS).
*
while (*s && *t)
{
- if (isdigit(*s) && isdigit(*t))
+ if (isdigit(*s & 255) && isdigit(*t & 255))
{
/*
* Got a number; start by skipping leading 0's...
* Skip equal digits...
*/
- while (isdigit(*s) && *s == *t)
+ while (isdigit(*s & 255) && *s == *t)
{
s ++;
t ++;
* Bounce out if *s and *t aren't both digits...
*/
- if (isdigit(*s) && !isdigit(*t))
+ if (isdigit(*s & 255) && !isdigit(*t & 255))
return (1);
- else if (!isdigit(*s) && isdigit(*t))
+ else if (!isdigit(*s & 255) && isdigit(*t & 255))
return (-1);
- else if (!isdigit(*s) || !isdigit(*t))
+ else if (!isdigit(*s & 255) || !isdigit(*t & 255))
continue;
if (*s < *t)
s ++;
t ++;
- while (isdigit(*s))
+ while (isdigit(*s & 255))
{
digits ++;
s ++;
}
- while (isdigit(*t))
+ while (isdigit(*t & 255))
{
digits --;
t ++;
else if (diff)
return (diff);
}
- else if (tolower(*s) < tolower(*t))
+ else if (tolower(*s & 255) < tolower(*t & 255))
return (-1);
- else if (tolower(*s) > tolower(*t))
+ else if (tolower(*s & 255) > tolower(*t & 255))
return (1);
else
{
else
strcpy(make_model, model_name);
- while (isspace(make_model[0]))
+ while (isspace(make_model[0] & 255))
cups_strcpy(make_model, make_model + 1);
if (!make_model[0])
* See if we got a manufacturer...
*/
- while (isspace(manufacturer[0]))
+ while (isspace(manufacturer[0] & 255))
cups_strcpy(manufacturer, manufacturer + 1);
if (!manufacturer[0] || strcmp(manufacturer, "ESP") == 0)
/*
- * End of "$Id: ppds.c,v 1.14.2.12 2003/09/04 14:48:14 mike Exp $".
+ * End of "$Id: ppds.c,v 1.14.2.13 2004/02/25 20:01:37 mike Exp $".
*/
/*
- * "$Id: printers.c,v 1.93.2.55 2004/02/24 21:36:59 mike Exp $"
+ * "$Id: printers.c,v 1.93.2.56 2004/02/25 20:01:37 mike Exp $"
*
* Printer routines for the Common UNIX Printing System (CUPS).
*
len = strlen(line);
- while (len > 0 && isspace(line[len - 1]))
+ while (len > 0 && isspace(line[len - 1] & 255))
{
len --;
line[len] = '\0';
* Extract the name from the beginning of the line...
*/
- for (value = line; isspace(*value); value ++);
+ for (value = line; isspace(*value & 255); value ++);
- for (nameptr = name; *value != '\0' && !isspace(*value) &&
+ for (nameptr = name; *value != '\0' && !isspace(*value & 255) &&
nameptr < (name + sizeof(name) - 1);)
*nameptr++ = *value++;
*nameptr = '\0';
- while (isspace(*value))
+ while (isspace(*value & 255))
value ++;
if (name[0] == '\0')
* Set the initial queue state message...
*/
- while (isspace(*value))
+ while (isspace(*value & 255))
value ++;
strlcpy(p->state_message, value, sizeof(p->state_message));
* Set the initial job sheets...
*/
- for (valueptr = value; *valueptr && !isspace(*valueptr); valueptr ++);
+ for (valueptr = value; *valueptr && !isspace(*valueptr & 255); valueptr ++);
if (*valueptr)
*valueptr++ = '\0';
SetString(&p->job_sheets[0], value);
- while (isspace(*valueptr))
+ while (isspace(*valueptr & 255))
valueptr ++;
if (*valueptr)
{
- for (value = valueptr; *valueptr && !isspace(*valueptr); valueptr ++);
+ for (value = valueptr; *valueptr && !isspace(*valueptr & 255); valueptr ++);
if (*valueptr)
*valueptr++ = '\0';
* Skip leading whitespace and commas...
*/
- while (isspace(*sptr) || *sptr == ',')
+ while (isspace(*sptr & 255) || *sptr == ',')
sptr ++;
- for (rptr = reason; *sptr && !isspace(*sptr) && *sptr != ','; sptr ++)
+ for (rptr = reason; *sptr && !isspace(*sptr & 255) && *sptr != ','; sptr ++)
if (rptr < (reason + sizeof(reason) - 1))
*rptr++ = *sptr;
/*
- * End of "$Id: printers.c,v 1.93.2.55 2004/02/24 21:36:59 mike Exp $".
+ * End of "$Id: printers.c,v 1.93.2.56 2004/02/25 20:01:37 mike Exp $".
*/
/*
- * "$Id: type.c,v 1.11.2.11 2003/04/07 18:03:48 mike Exp $"
+ * "$Id: type.c,v 1.11.2.12 2004/02/25 20:01:37 mike Exp $"
*
* MIME typing routines for the Common UNIX Printing System (CUPS).
*
while (*rule != '\0')
{
- while (isspace(*rule))
+ while (isspace(*rule & 255))
rule ++;
if (*rule == '(')
invert = 1;
rule ++;
}
- else if (isalnum(*rule))
+ else if (isalnum(*rule & 255))
{
/*
* Read an extension name or a function...
*/
- for (ptr = name; isalnum(*rule) && (ptr - name) < (sizeof(name) - 1);)
+ for (ptr = name; isalnum(*rule & 255) && (ptr - name) < (sizeof(name) - 1);)
*ptr++ = *rule++;
*ptr = '\0';
while ((ptr - value[num_values]) < (sizeof(value[0]) - 1) &&
*rule != '\0' && *rule != ',' && *rule != ')')
{
- if (isspace(*rule))
+ if (isspace(*rule & 255))
{
/*
* Ignore whitespace...
while (*rule != '>' && *rule != '\0' &&
(ptr - value[num_values]) < (sizeof(value[0]) - 1))
{
- if (isxdigit(rule[0]) && isxdigit(rule[1]))
+ if (isxdigit(rule[0] & 255) && isxdigit(rule[1] & 255))
{
if (isdigit(*rule))
*ptr = (*rule++ - '0') << 4;
/*
- * End of "$Id: type.c,v 1.11.2.11 2003/04/07 18:03:48 mike Exp $".
+ * End of "$Id: type.c,v 1.11.2.12 2004/02/25 20:01:37 mike Exp $".
*/
/*
- * "$Id: cupstestppd.c,v 1.1.2.27 2004/02/17 21:32:58 mike Exp $"
+ * "$Id: cupstestppd.c,v 1.1.2.28 2004/02/25 20:01:37 mike Exp $"
*
* PPD test program for the Common UNIX Printing System (CUPS).
*
if (ppd->modelname != NULL)
{
for (ptr = ppd->modelname; *ptr; ptr ++)
- if (!isalnum(*ptr) && !strchr(" ./-+", *ptr))
+ if (!isalnum(*ptr & 255) && !strchr(" ./-+", *ptr))
break;
if (*ptr)
/*
- * End of "$Id: cupstestppd.c,v 1.1.2.27 2004/02/17 21:32:58 mike Exp $".
+ * End of "$Id: cupstestppd.c,v 1.1.2.28 2004/02/25 20:01:37 mike Exp $".
*/