These functions require their arguments to be in the range of `unsigned char'.
!= NULL ) {
for ( i = 0; vals[i]; i++ ) {
last = strlen( vals[i] ) - 1;
- if ( isdigit( vals[i][last] ) ) {
+ if ( isdigit((unsigned char) vals[i][last]) ) {
rdn = strdup( vals[i] );
break;
}
for ( i = 0; vals[0][i] != '\0'; i++ ) {
if ( vals[0][i] == '$' ) {
fprintf( fp, "\n%*s ", namelen, " " );
- while ( isspace( vals[0][i+1] ) )
+ while ( isspace((unsigned char) vals[0][i+1]) )
i++;
} else {
fprintf( fp, "%c", vals[0][i] );
if ( (vals = ldap_get_values( ld, e, "cn" )) != NULL ) {
for ( i = 0; vals[i]; i++ ) {
last = strlen( vals[i] ) - 1;
- if ( isdigit( vals[i][last] ) ) {
+ if ( isdigit((unsigned char) vals[i][last]) ) {
rdn = strdup( vals[i] );
break;
}
cn = ldap_get_values( ld, e, "cn" );
for ( i = 0; cn[i] != NULL; i++ ) {
last = strlen( cn[i] ) - 1;
- if ( isdigit( cn[i][last] ) ) {
+ if ( isdigit((unsigned char) cn[i][last]) ) {
rdn = strdup( cn[i] );
break;
}
p = buf;
}
- for ( ; *p && isspace( *p ); p++ )
+ for ( ; *p && isspace( (unsigned char) *p ); p++ )
; /* NULL */
do_search( ld, p );
cn = ldap_get_values( ld, e, "cn" );
for ( i = 0; cn[i] != NULL; i++ ) {
last = strlen( cn[i] ) - 1;
- if ( isdigit( cn[i][last] ) ) {
+ if (isdigit((unsigned char) cn[i][last])) {
rdn = strdup( cn[i] );
break;
}
query = buf;
/* strip off leading white space */
- while ( isspace( *query )) {
+ while ( isspace( (unsigned char) *query )) {
++query;
--len;
}
query = buf;
/* strip off leading white space */
- while ( isspace( *query )) {
+ while ( isspace( (unsigned char) *query )) {
++query;
--len;
}
!= NULL ) {
for ( i = 0; vals[i]; i++ ) {
last = strlen( vals[i] ) - 1;
- if ( isdigit( vals[i][last] ) ) {
+ if ( isdigit((unsigned char) vals[i][last]) ) {
rdn = strdup( vals[i] );
break;
}
for ( i = 0; vals[0][i] != '\0'; i++ ) {
if ( vals[0][i] == '$' ) {
fprintf( fp, "\n%*s ", namelen, " " );
- while ( isspace( vals[0][i+1] ) )
+ while ( isspace((unsigned char) vals[0][i+1]) )
i++;
} else {
fprintf( fp, "%c", vals[0][i] );
if ( (vals = ldap_get_values( ld, e, "cn" )) != NULL ) {
for ( i = 0; vals[i]; i++ ) {
last = strlen( vals[i] ) - 1;
- if ( isdigit( vals[i][last] ) ) {
+ if (isdigit((unsigned char) vals[i][last])) {
rdn = strdup( vals[i] );
break;
}
{
char *hdr;
- for ( hdr = buf + offset; isspace( *hdr ); ++hdr ) {
+ for ( hdr = buf + offset; isspace( (unsigned char) *hdr ); ++hdr ) {
;
}
if (( hdr = strdup( hdr )) == NULL ) {
while ( 1 ) {
*linep = fgets( buf, MAXSIZE, fp );
buf[ strlen( buf ) - 1 ] = '\0'; /* remove trailing newline */
- if ( *linep == NULL || !isspace( **linep )) {
+ if ( *linep == NULL || !isspace( (unsigned char) **linep )) {
break;
}
if (( hdr = realloc( hdr, strlen( hdr ) +
p = text;
for ( s = argbuf; *p != '\0'; ++p ) {
- *s++ = TOLOWER( *p );
+ *s++ = TOLOWER( (unsigned char) *p );
}
*s = '\0';
for ( i = 0; cmds[ i ].cmd_text != NULL; ++i ) {
if (( s = strstr( argbuf, cmds[ i ].cmd_text )) != NULL
- && isspace( *(s + strlen( cmds[ i ].cmd_text )))) {
+ && isspace( (unsigned char) s[ strlen( cmds[ i ].cmd_text ) ] )) {
strcpy( argbuf, text + (s - argbuf) + strlen( cmds[ i ].cmd_text ));
*argp = argbuf;
- while ( isspace( **argp )) {
+ while ( isspace( (unsigned char) **argp )) {
++(*argp);
}
return( i );
if (( cn = ldap_get_values( ldp, e, "cn" )) != NULL ) {
for ( i = 0; cn[i] != NULL; i++ ) {
- if ( isdigit( *( cn[i] + strlen( cn[i] ) - 1 ))) {
+ if ( isdigit((unsigned char) cn[i][strlen( cn[i] ) - 1])) {
rdn = strdup( cn[i] );
free_rdn = 1;
break;
{
char *p = s + strlen( s ) - 1;
- while ( isspace( *p ) && p > s ) {
+ while ( isspace( (unsigned char) *p ) && p > s ) {
--p;
}
*(++p) = '\0';
if ( !use_ldif && ( q = strchr( rbuf, '\n' )) != NULL ) {
for ( p = rbuf; p < q; ++p ) {
- if ( !isdigit( *p )) {
+ if ( !isdigit( (unsigned char) *p )) {
break;
}
}
value = p;
}
- for ( attr = line; *attr != '\0' && isspace( *attr ); ++attr ) {
+ for ( attr = line;
+ *attr != '\0' && isspace( (unsigned char) *attr ); ++attr ) {
; /* skip attribute leading white space */
}
- for ( q = p - 1; q > attr && isspace( *q ); --q ) {
+ for ( q = p - 1; q > attr && isspace( (unsigned char) *q ); --q ) {
*q = '\0'; /* remove attribute trailing white space */
}
if ( value != NULL ) {
- while ( isspace( *value )) {
+ while ( isspace( (unsigned char) *value )) {
++value; /* skip value leading white space */
}
for ( q = value + strlen( value ) - 1; q > value &&
- isspace( *q ); --q ) {
+ isspace( (unsigned char) *q ); --q ) {
*q = '\0'; /* remove value trailing white space */
}
if ( *value == '\0' ) {
char *p;
for ( p = s; *p != '\0'; ++p ) {
- *p = TOUPPER( *p );
+ *p = TOUPPER( (unsigned char) *p );
}
}
#ifdef HAVE_AFS_KERBEROS
strcpy( lcrealm, realm );
for ( p = lcrealm; *p != '\0'; ++p ) {
- *p = TOLOWER( *p );
+ *p = TOLOWER( (unsigned char) *p );
}
ka_StringToKey( passwd, lcrealm, key );
cp = line;
if (*cp == '#')
continue;
- if (isspace(*cp)) { /* value */
- while (isspace(*cp))
+ if (isspace((unsigned char)*cp)) { /* value */
+ while (isspace((unsigned char)*cp))
cp++;
values[number_of_values++] = strdup(cp);
if ( number_of_values >= MAX_VALUES ) {
continue;
}
/* attribute */
- while (isspace(*cp))
+ while (isspace((unsigned char)*cp))
cp++;
/*
* If the number of values is greater than zero, then we
char *cp;
if (strchr(s, '<') == NULL) {
for (cp = s; *cp != '@'; cp++)
- if (isspace(*cp))
+ if (isspace((unsigned char)*cp))
*cp = '.';
}
new_value = s;
putchar('\n');
continue;
}
- while (isspace(*cp))
+ while (isspace((unsigned char)*cp))
cp++;
ap = cmd;
if (memset(cmd, '\0', sizeof(cmd)) == NULL)
fatal("memset");
- while (!isspace(*cp) && (*cp != '\0'))
+ while (!isspace((unsigned char)*cp) && (*cp != '\0'))
*ap++ = *cp++;
if (iscom("status"))
status();
else if (iscom("stop") || iscom("quit"))
break;
else if (iscom("cb") || iscom("cd") || iscom("moveto")) {
- while (isspace(*cp) && (*cp != '\0'))
+ while (isspace((unsigned char)*cp) && (*cp != '\0'))
cp++;
if (!strncasecmp(cp, "base", 4))
cp += 4;
*
* sequence now that 'cp' is pointing to the '='.
*/
- while(!isspace(*cp))
+ while(!isspace((unsigned char)*cp))
cp--;
cp++;
/*
if (server != NULL)
continue;
cp = buffer + 6;
- while (isspace(*cp))
+ while (isspace((unsigned char)*cp))
cp++;
if ((*cp == '\0') || (*cp == '\n'))
continue;
if (server != NULL)
continue;
cp = buffer + 4;
- while (isspace(*cp))
+ while (isspace((unsigned char)*cp))
cp++;
if ((*cp == '\0') || (*cp == '\n'))
continue;
}
else if (!strncasecmp(buffer, "base", 4)) {
cp = buffer + 4;
- while (isspace(*cp))
+ while (isspace((unsigned char)*cp))
cp++;
if ((*cp == '\0') || (*cp == '\n'))
continue;
}
else if (!strncasecmp(buffer, "groupbase", 9)) {
cp = buffer + 9;
- while (isspace(*cp))
+ while (isspace((unsigned char)*cp))
cp++;
if ((*cp == '\0') || (*cp == '\n'))
continue;
printf(" Please enter Y for yes, N for no, or RETURN to cancel: ");
fflush(stdout);
(void) fetch_buffer(response, sizeof(response), stdin);
- for (s = response; isspace(*s); s++)
+ for (s = response; isspace((unsigned char)*s); s++)
;
if ((*s == 'y') || (*s == 'Y')) {
if (ldap_modify_s(ld, who, mods)) {
printf("\n Change this setting [no]? ");
fflush(stdout);
(void) fetch_buffer(response, sizeof(response), stdin);
- for (s = response; isspace(*s); s++)
+ for (s = response; isspace((unsigned char)*s); s++)
;
if ((*s == 'y') || (*s == 'Y')) {
if (!strcmp(cp, "TRUE"))
register char *cp;
for (cp = url; *cp != '\n' && *cp != '\0'; cp++) {
- if (isspace(*cp))
+ if (isspace((unsigned char)*cp))
return(-1);
/*NOTREACHED*/
}
putchar('\n');
for (k = lead; k > 0; k--)
putchar(' ');
- while (isspace(*(cp + 1)))
+ while (isspace((unsigned char) cp[1]))
cp++;
}
else
register int i;
char c, *cp, *url;
- for (cp = s; !isspace(*cp) && (*cp != '\0'); cp++)
+ for (cp = s; !isspace((unsigned char)*cp) && (*cp != '\0'); cp++)
;
c = *cp;
*cp = '\0';
url = strdup(s);
*cp = c;
if (*cp != '\0') {
- for (cp++; isspace(*cp); cp++)
+ for (cp++; isspace((unsigned char)*cp); cp++)
;
}
else
}
for ( p = ldtimestr; p - ldtimestr < 12; ++p ) {
- if ( !isdigit( *p )) {
+ if ( !isdigit( (unsigned char) *p )) {
return( fmterr );
}
}
* parsing names.
*/
#define MAX_NAME_COMPS 8
-#define isnamesepartor(x) (isspace(x))
+#define isnamesepartor(x) (isspace((unsigned char) (x)))
#define isignorechar(x) (((x) == '.') || ((x) == '_'))
/*
errno = 0; /* so fatal() doesn't bitch */
fatal("fgets");
}
- for (i = strlen(buffer) - 1; i >= 0 && !isprint(buffer[i]); i--)
+ for (i = strlen(buffer) - 1;
+ i >= 0 && !isprint((unsigned char) buffer[i]); i--)
buffer[i] = '\0';
p = buffer;
while ( *p != '\0' ) {
- if ( isprint( *p )) {
+ if ( isprint( (unsigned char) *p )) {
++p;
} else {
SAFEMEMCPY( p, p + 1, strlen( p + 1 ) + 1 );
/*NOTREACHED*/
}
cp = s + width - lead;
- while (!isspace(*cp) && (cp != s))
+ while (!isspace((unsigned char)*cp) && (cp != s))
cp--;
*cp = '\0';
- while (isspace(*s))
+ while (isspace((unsigned char)*s))
s++;
printf("%s%s\n", leader, s);
s = cp + 1;
* back it up to the first space character.
*/
cp = s + width - first_indent - strlen(first_tag);
- while (!isspace(*cp) && (cp != s))
+ while (!isspace((unsigned char)*cp) && (cp != s))
cp--;
/*
* as well. We should gobble up all of these since we don't want
* unexpected leading blanks.
*/
- for (s = cp + 1; isspace(*s); s++)
+ for (s = cp + 1; isspace((unsigned char)*s); s++)
;
/* now do all of the other lines */
/*NOTREACHED*/
}
cp = s + width - indent - strlen(tag);
- while (!isspace(*cp) && (cp != s))
+ while (!isspace((unsigned char)*cp) && (cp != s))
cp--;
c = *cp;
*cp = '\0';
if ((i < 3) || (i > 8)) /* uniqnames are 3-8 chars */
return(FALSE);
- if (!isalpha(*s)) /* uniqnames begin with a letter */
+ if (!isalpha((unsigned char)*s)) /* uniqnames begin with a letter */
return(FALSE);
for ( ; *s != '\0'; s++) /* uniqnames are alphanumeric */
- if (!isalnum(*s))
+ if (!isalnum((unsigned char)*s))
return(FALSE);
return(TRUE);
}
char *
nextstr( char *s )
{
- while (isspace(*s) && (*s != '\0'))
+ while (isspace((unsigned char) *s) && (*s != '\0'))
s++;
if (s == NULL)
return(NULL);
if (!s)
return 1;
- while (*s && isspace(*s))
+ while (*s && isspace((unsigned char) *s))
++s;
return !*s;
if (!s)
return s;
- while (*s && !isspace(*s))
+ while (*s && !isspace((unsigned char) *s))
++s;
return s;
if (!s)
return s;
- while (*s && isspace(*s))
+ while (*s && isspace((unsigned char) *s))
++s;
return s;
while(inputbuf[pos])
{
- inputbuf[pos] = (char)tolower(inputbuf[pos]);
+ inputbuf[pos] = (char)tolower((unsigned char) inputbuf[pos]);
pos++;
}
return(inputbuf);
while(inputbuf[pos])
{
- inputbuf[pos] = (char)toupper(inputbuf[pos]);
+ inputbuf[pos] = (char)toupper((unsigned char) inputbuf[pos]);
pos++;
}
return(inputbuf);
{
if(*spos == '.')
break;
- if(isdigit(*spos))
+ if(isdigit((unsigned char) *spos))
*dpos++ = *spos;
spos++;
if(buf_siz++ == 98) /* make sure we don't overrun buf */
pos = str;
while(*pos)
{
- if(!isdigit(*pos))
+ if(!isdigit((unsigned char) *pos))
return(0); /* non-digit found */
pos++;
}
char *uparray) {
int i;
for (i=0; i < strlen(array); i++) {
- uparray[i] = toupper(array[i]);
+ uparray[i] = toupper((unsigned char) array[i]);
uparray[i + 1] = 0;
}
return;
if ( log )
syslog( LOG_INFO, "Whois++ Query: %s", buffer );
}
- while ( buffer[idx] != '\0' && isspace( buffer[idx] ) )
+ while ( buffer[idx] != '\0' && isspace( (unsigned char) buffer[idx] ) )
idx++;
token[0] = buffer[idx++];
token[1] = '\0';
token[i++] = buffer[idx++];
else
token[i++] = ch;
- } while ( ch != '\0' && !isspace( ch ) && !isspecial( ch ) );
+ } while ( ch != '\0' &&
+ !isspace( (unsigned char) ch ) && !isspecial( ch ) );
token[--i] = '\0';
idx--;
/**/ /*
} else {
if ( ( s = strchr( buffer, ',' ) ) != NULL ) {
*s++ = '\0';
- while ( *s && isspace( *s ) )
+ while ( *s && isspace( (unsigned char) *s ) )
s++;
sprintf( query, "(sn%s%s)",
(soundex)?"~=":"=", buffer );
/* let's just make sure there is no title */
if ( ( t = strrchr( s, ',' ) ) != NULL ) {
*t++ = '\0';
- while ( *t && isspace( *t ) )
+ while ( *t && isspace( (unsigned char) *t ) )
t++;
sprintf( query, "(personalTitle%s%s)",
(soundex)?"~=":"=", t );
ufn = ldap_dn2ufn( dn );
if ( ( s = index( ufn, ',' ) ) != NULL ) {
*s++ = '\0';
- while ( *s != '\0' && isspace( *s ) )
+ while ( *s != '\0' && isspace( (unsigned char) *s ) )
s++;
department = s;
while ( s != NULL && *s != '\0' && !EQ( s, organisation ) )
if ( ( s = index( s, ',' ) ) != NULL ) {
s++;
- while ( *s != '\0' && isspace( *s ) )
+ while ( *s && isspace( (unsigned char) *s ) )
s++;
}
if ( s != NULL )
if ( s != department ) {
- while ( isspace( *--s ) )
+ while ( isspace( (unsigned char) *--s ) )
;
*s = '\0';
} else
char *s;
for ( s = string; s != NULL && *s != '\0'; s++ )
- if ( isupper( *s ) )
- *s = tolower( *s );
+ if ( isupper( (unsigned char) *s ) )
+ *s = tolower( (unsigned char) *s );
return string;
}
p = *sp;
- while ( isspace( *p )) { /* skip leading white space */
+ while ( isspace( (unsigned char) *p )) { /* skip leading white space */
++p;
}
t = tokstart = p;
for ( ;; ) {
- if ( *p == '\0' || ( isspace( *p ) && !in_quote )) {
+ if ( *p == '\0' || ( isspace( (unsigned char) *p ) && !in_quote )) {
if ( *p != '\0' ) {
++p;
}
char *rsave = r;
*r-- = '\0';
- while ( !isspace( *r ) && *r != ';'
- && *r != ',' && r > ufn )
+ while ( !isspace( (unsigned char) *r )
+ && *r != ';' && *r != ',' && r > ufn )
r--;
r++;
if ( *q >= 3 && strncasecmp( q + 1, "dx:", 3 ) == 0 ) {
txt_len = *q - 3;
r = q + 4;
- while ( isspace( *r )) {
+ while ( isspace( (unsigned char) *r )) {
++r;
--txt_len;
}
pref = 0;
- while ( isdigit( *r )) {
+ while ( isdigit( (unsigned char) *r )) {
pref *= 10;
pref += ( *r - '0' );
++r;
if ( dx_count < MAX_TO_SORT - 1 ) {
dx_pref[ dx_count ] = pref;
}
- while ( isspace( *r )) {
+ while ( isspace( (unsigned char) *r )) {
++r;
--txt_len;
}
if ( *p == '%' ) {
++p;
if ( *p == 'v' ) {
- if ( isdigit( *(p+1))) {
+ if ( isdigit( (unsigned char) p[1] )) {
++p;
wordnum = *p - '1';
if ( *(p+1) == '-' ) {
++p;
- if ( isdigit( *(p+1))) {
+ if ( isdigit( (unsigned char) p[1] )) {
++p;
endwordnum = *p - '1'; /* e.g., "%v2-4" */
if ( endwordnum > wordcount - 1 ) {
if(*start == '#') continue;
/* trim leading white space */
- while((*start != '\0') && isspace(*start)) start++;
+ while((*start != '\0') && isspace((unsigned char) *start))
+ start++;
/* anything left? */
if(*start == '\0') continue;
/* trim trailing white space */
end = &start[strlen(start)-1];
- while(isspace(*end)) end--;
+ while(isspace((unsigned char)*end)) end--;
end[1] = '\0';
/* anything left? */
/* parse the command */
cmd=start;
- while((*start != '\0') && !isspace(*start)) {
+ while((*start != '\0') && !isspace((unsigned char)*start)) {
start++;
}
if(*start == '\0') {
*start++ = '\0';
/* we must have some non-whitespace to skip */
- while(isspace(*start)) start++;
+ while(isspace((unsigned char)*start)) start++;
opt = start;
for(i=0; attrs[i].type != ATTR_NONE; i++) {
Debug( LDAP_DEBUG_TRACE, "put_filter_list \"%s\"\n", str, 0, 0 );
while ( *str ) {
- while ( *str && isspace( *str ) )
+ while ( *str && isspace( (unsigned char) *str ) )
str++;
if ( *str == '\0' )
break;
freevals = 1;
}
- *attr = TOUPPER( *attr );
+ *attr = TOUPPER( (unsigned char) *attr );
err = do_vals2text( ld, buf, vals, attr, labelwidth,
LDAP_SYN_CASEIGNORESTR, writeproc, writeparm, eol,
if ( show && LDAP_GET_SYN_TYPE( colp->ti_syntaxid )
== LDAP_SYN_TYPE_BOOLEAN && LDAP_IS_TMPLITEM_OPTION_SET(
colp, LDAP_DITEM_OPT_HIDEIFFALSE ) &&
- TOUPPER( vals[ 0 ][ 0 ] ) != 'T' ) {
+ TOUPPER( (unsigned char) vals[ 0 ][ 0 ] ) != 'T' ) {
show = 0;
}
if ( colp->ti_syntaxid == LDAP_SYN_SEARCHACTION ) {
if (( opts & LDAP_DISP_OPT_DOSEARCHACTIONS ) != 0 ) {
if ( colp->ti_attrname == NULL || ( show &&
- TOUPPER( vals[ 0 ][ 0 ] ) == 'T' )) {
+ TOUPPER( (unsigned char) vals[ 0 ][ 0 ] ) == 'T' )) {
err = searchaction( ld, buf, base, entry, dn, colp,
labelwidth, rdncount, writeproc,
writeparm, eol, urlprefix );
p = s = outval;
while (( s = strchr( s, '$' )) != NULL ) {
*s++ = '\0';
- while ( isspace( *s )) {
+ while ( isspace( (unsigned char) *s )) {
++s;
}
if ( html ) {
break;
case LDAP_SYN_BOOLEAN:
- outval = TOUPPER( outval[ 0 ] ) == 'T' ? "TRUE" : "FALSE";
+ outval = TOUPPER((unsigned char) outval[0]) == 'T' ? "TRUE" : "FALSE";
++writeoutval;
break;
case LDAP_SYN_LABELEDURL:
if ( !notascii && ( p = strchr( outval, '$' )) != NULL ) {
*p++ = '\0';
- while ( isspace( *p )) {
+ while ( isspace( (unsigned char) *p )) {
++p;
}
s = outval;
} else if ( !notascii && ( s = strchr( outval, ' ' )) != NULL ) {
*s++ = '\0';
- while ( isspace( *s )) {
+ while ( isspace( (unsigned char) *s )) {
++s;
}
p = outval;
return( fmterr );
}
- for ( ndigits=0; isdigit(ldtimestr[ndigits]); ndigits++) {
+ for ( ndigits=0; isdigit((unsigned char) ldtimestr[ndigits]); ndigits++) {
; /* EMPTY */
}
int i, b64;
/* skip any leading space */
- while ( isspace( *line ) ) {
+ while ( isspace( (unsigned char) *line ) ) {
line++;
}
*type = line;
}
/* trim any space between type and : */
- for ( p = s - 1; p > line && isspace( *p ); p-- ) {
+ for ( p = s - 1; p > line && isspace( (unsigned char) *p ); p-- ) {
*p = '\0';
}
*s++ = '\0';
}
/* skip space between : and value */
- while ( isspace( *s ) ) {
+ while ( isspace( (unsigned char) *s ) ) {
s++;
}
char *
ldif_getline( char **next )
{
- char *l;
- char c;
+ char *l;
if ( *next == NULL || **next == '\n' || **next == '\0' ) {
return( NULL );
l = *next;
while ( (*next = strchr( *next, '\n' )) != NULL ) {
- c = *(*next + 1);
+ unsigned char c = *(*next + 1);
if ( isspace( c ) && c != '\n' ) {
**next = CONTINUED_LINE_MARKER;
*(*next+1) = CONTINUED_LINE_MARKER;
if ( x == NULL ) {
x = "?";
- } else if ( isdigit ( *x ) ) {
+ } else if ( isdigit ( (unsigned char) *x ) ) {
sprintf ( key, "OID.%s", x );
return;
} else if (strcasecmp(x,"commonName")==0) {
de_t61( char *s, int t61mark )
{
char *next = s;
- int c, hex;
+ unsigned char c;
+ unsigned int hex;
while ( *s ) {
switch ( *s ) {
/* normalize the domain */
for ( s = b->a_domainpat; *s; s++ ) {
- *s = TOLOWER( *s );
+ *s = TOLOWER( (unsigned char) *s );
}
} else if ( strcasecmp( left, "addr" ) == 0 ) {
regtest(fname, lineno, right);
char *save;
for ( save = s; *s; s++ ) {
- *s = TOLOWER( *s );
+ *s = TOLOWER( (unsigned char) *s );
}
return( save );
if ( (p = strchr( buf, '\n' )) != NULL ) {
*p = '\0';
}
- if ( ! isspace( buf[0] ) ) {
+ if ( ! isspace( (unsigned char) buf[0] ) ) {
return( line );
}
/* normalize the domain */
for ( s = client_name; *s; s++ ) {
- *s = TOLOWER( *s );
+ *s = TOLOWER( (unsigned char) *s );
}
} else {
/* normalize case */
for ( s = dn; *s; s++ ) {
- *s = TOUPPER( *s );
+ *s = TOUPPER( (unsigned char) *s );
}
return( dn );
/* normalize case */
for ( s = dn; *s; s++ ) {
- *s = TOUPPER( *s );
+ *s = TOUPPER( (unsigned char) *s );
}
return( dn );
/* check to see if there's an id included */
next = s;
- if ( isdigit( *s ) ) {
+ if ( isdigit( (unsigned char) *s ) ) {
id = atoi( s );
if ( (s = ldif_getline( &next )) == NULL ) {
Debug( LDAP_DEBUG_TRACE,
}
adjacent = '0';
- phoneme[0] = TOUPPER(*p);
+ phoneme[0] = TOUPPER((unsigned char)*p);
phoneme[1] = '\0';
for ( i = 0; i < 99 && (! iswordbreak(*p)); p++ ) {
- ch = TOUPPER (*p);
+ ch = TOUPPER ((unsigned char)*p);
code = '0';
for (n = ntrans + 4, n_end = ntrans + 35; !iswordbreak( *Word ) &&
n < n_end; Word++) {
- if (isalpha(*Word))
- *n++ = TOUPPER(*Word);
+ if (isalpha((unsigned char)*Word))
+ *n++ = TOUPPER((unsigned char)*Word);
}
Metaph = buf;
*Metaph = '\0';
tmp = entry2str( e, &len, 0 );
while ( (tmp = strchr( tmp, '\n' )) != NULL ) {
tmp++;
- if ( ! isspace( *tmp ) )
+ if ( ! isspace( (unsigned char) *tmp ) )
break;
}
fprintf( fp, "%s", tmp );
while ( args != NULL ) {
if (( p = strchr( args, ' ' )) != NULL ) {
*p++ = '\0';
- while ( isspace( *p )) {
+ while ( isspace( (unsigned char) *p )) {
++p;
}
}
for ( i = 0; ips[ i ].ip_type != 0; ++i ) {
if ( strncasecmp( *linep, ips[ i ].ip_tag, p - *linep ) == 0 ) {
- while ( isspace( *(++p) )) {
+ while ( isspace( (unsigned char) *(++p) )) {
;
}
*linep = p;
fp = &f->f_list;
while ( *str ) {
- while ( *str && isspace( *str ) )
+ while ( *str && isspace( (unsigned char) *str ) )
str++;
if ( *str == '\0' )
break;
de_t61(char *s, int t61mark)
{
char *next = s;
- int c, hex;
+ unsigned char c;
+ unsigned int hex;
while ( *s ) {
switch ( *s ) {
/* See if we've got a line continuation to deal with */
nbuflen = strlen( nbuf );
if ( state == ST_CONCAT ) {
- for ( p = nbuf; isspace( *p ); p++, nbuflen-- ); /* skip space */
+ for ( p = nbuf; isspace( (unsigned char) *p ); p++, nbuflen-- )
+ ; /* skip space */
buf = realloc( buf, buflen + nbuflen + 1 );
strcat( buf, p );
buflen += ( nbuflen );
}
*filename++ = '\0';
- while ( isspace( *filename )) { /* strip leading whitespace */
+ while ( isspace((unsigned char) *filename) ) { /* strip leading whitespace */
++filename;
}
}
p = filename + strlen( filename ) - 1;
- while ( isspace( *p )) { /* strip trailing whitespace */
+ while ( isspace((unsigned char) *p) ) { /* strip trailing whitespace */
*p-- = '\0';
}
rdn = line;
- while ( isspace( *rdn )) { /* strip leading whitespace */
+ while ( isspace((unsigned char) *rdn)) { /* strip leading whitespace */
++rdn;
}
}
p = rdn + strlen( rdn ) - 1;
- while ( isspace( *p )) { /* strip trailing whitespace */
+ while ( isspace((unsigned char) *p)) { /* strip trailing whitespace */
*p-- = '\0';
}
int t61mark;
{
char *next = s;
- int c, hex;
+ unsigned char c;
+ unsigned int hex;
while ( *s ) {
switch ( *s ) {
if (( s = data.dptr ) != NULL ) {
- if ( !printid && isdigit( *s )) {
+ if ( !printid && isdigit( (unsigned char) *s )) {
if (( s = strchr( s, '\n' )) != NULL ) {
++s;
}
printf( "%d IDs entered. Max number of ids? [%d] ", i,
i );
if ( fgets( buf, sizeof(buf), fp ) != NULL &&
- isdigit( buf[0] ) ) {
+ isdigit( (unsigned char) buf[0] ) ) {
nmax = atol( buf );
}
} else {
}
if ( line[0] == '\n' || stop && buf && *buf ) {
if ( *buf != '\n' ) {
- if (isdigit(*buf)) {
+ if (isdigit((unsigned char) *buf)) {
id = atol(buf);
} else {
id++;
}
if ( line[0] == '\n' || stop && buf && *buf ) {
if ( *buf != '\n' ) {
- if (isdigit(*buf)) {
+ if (isdigit((unsigned char) *buf)) {
id = atol(buf);
} else {
id++;
len = strlen( line );
if ( buf == NULL || *buf == '\0' ) {
- if (!isdigit(line[0])) {
+ if (!isdigit((unsigned char) line[0])) {
sprintf( idbuf, "%d\n", id + 1 );
idlen = strlen( idbuf );
} else {
len = strlen( line );
if ( buf == NULL || *buf == '\0' ) {
- if (!isdigit(line[0])) {
+ if (!isdigit((unsigned char) line[0])) {
sprintf( idbuf, "%d\n", id + 1 );
idlen = strlen( idbuf );
} else {
}
if ( line[0] == '\n' || stop && buf && *buf ) {
if ( *buf != '\n' ) {
- if (isdigit(*buf)) {
+ if (isdigit((unsigned char) *buf)) {
id = atol(buf);
} else {
id++;
}
if ( line[0] == '\n' || stop && buf && *buf ) {
if ( *buf != '\n' ) {
- if (isdigit(*buf)) {
+ if (isdigit((unsigned char) *buf)) {
id = atol(buf);
} else {
id++;
if ( (syntax & SYNTAX_TEL) && (*s == ' ' || *s == '-') ) {
continue;
}
- *d++ = TOUPPER( *s );
+ *d++ = TOUPPER( (unsigned char) *s );
}
*d = '\0';
}