if (!addr || !*addr) return 0;
- if (!isdigit(tok[0])) return 0;
+ if (!isdigit(* (unsigned char *) tok)) return 0;
p = strchr(tok,'/');
if (p) *p = 0;
if (am_root) {
p = lp_uid(i);
if (!name_to_uid(p, &uid)) {
- if (!isdigit(*p)) {
+ if (!isdigit(* (unsigned char *) p)) {
rprintf(FERROR,"Invalid uid %s\n", p);
io_printf(fd,"@ERROR: invalid uid %s\n", p);
return -1;
p = lp_gid(i);
if (!name_to_gid(p, &gid)) {
- if (!isdigit(*p)) {
+ if (!isdigit(* (unsigned char *) p)) {
rprintf(FERROR,"Invalid gid %s\n", p);
io_printf(fd,"@ERROR: invalid gid %s\n", p);
return -1;
return(NULL);
/* Skip over any initial spaces */
- while(isspace((int) *s))
+ while (isspace(* (unsigned char *) s))
s++;
/* Are we at the end of the string? */
s+=2;
/* Skip to the next space or the end of the string */
- while(!isspace((int) *s) && *s != '\0')
+ while (!isspace(* (unsigned char *) s) && *s != '\0')
s++;
} else {
t=NULL;
/* sync the strings on first non-whitespace */
while (1)
{
- while (isspace((int) *psz1))
+ while (isspace(* (unsigned char *) psz1))
psz1++;
- while (isspace((int) *psz2))
+ while (isspace(* (unsigned char *) psz2))
psz2++;
- if (toupper((int) *psz1) != toupper((int) *psz2)
+ if (toupper(* (unsigned char *) psz1) != toupper(* (unsigned char *) psz2)
|| *psz1 == '\0' || *psz2 == '\0')
break;
psz1++;
*/
{
pos--;
- while( (pos >= 0) && isspace((int) line[pos]) )
+ while( (pos >= 0) && isspace(((unsigned char *)line)[pos]) )
pos--;
return( ((pos >= 0) && ('\\' == line[pos])) ? pos : -1 );
c = 0;
else
{
- for( end = i; (end >= 0) && isspace((int) bufr[end]); end-- )
+ for( end = i; (end >= 0) && isspace(((unsigned char *) bufr)[end]); end-- )
;
c = getc( InFile );
}
buffer);
return -1;
}
- for (cp = &buffer[5]; isdigit((int) *cp) || (*cp == '.'); cp++)
+ for (cp = &buffer[5]; isdigit(* (unsigned char *) cp) || (*cp == '.'); cp++)
;
while (*cp == ' ')
cp++;
void strlower(char *s)
{
while (*s) {
- if (isupper((int) *s))
- *s = tolower((int) *s);
+ if (isupper(* (unsigned char *) s))
+ *s = tolower(* (unsigned char *) s);
s++;
}
}