X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=contrib%2Fweb_ldap%2Futil.c;h=b6aa34a2736a1da2366a56376cafc8166036fabd;hb=ef3b182380156c1f85b00982afd6f799e1475047;hp=f120efbba70c723a3f53b8ce0b0f5733e07873fc;hpb=b063f5e83b5eb499f1b7293dd096ae71f153d0cf;p=openldap diff --git a/contrib/web_ldap/util.c b/contrib/web_ldap/util.c index f120efbba7..b6aa34a273 100644 --- a/contrib/web_ldap/util.c +++ b/contrib/web_ldap/util.c @@ -12,14 +12,17 @@ * time/date functions added - R. Scott Guthrie */ +#include "portable.h" + #include -#include -#include -#include -#include -#include -#include -#include + +#include +#include + +#include +#include +#include + #include "process_form.h" /*--------------*/ @@ -279,7 +282,7 @@ char* lower_case_string(char* inputbuf) while(inputbuf[pos]) { - inputbuf[pos] = (char)tolower(inputbuf[pos]); + inputbuf[pos] = (char)tolower((unsigned char) inputbuf[pos]); pos++; } return(inputbuf); @@ -295,7 +298,7 @@ char* upper_case_string(char* inputbuf) while(inputbuf[pos]) { - inputbuf[pos] = (char)toupper(inputbuf[pos]); + inputbuf[pos] = (char)toupper((unsigned char) inputbuf[pos]); pos++; } return(inputbuf); @@ -420,7 +423,7 @@ long unformat_cost(char* cost) { 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 */ @@ -440,7 +443,7 @@ int digits_only(char* str) pos = str; while(*pos) { - if(!isdigit(*pos)) + if(!isdigit((unsigned char) *pos)) return(0); /* non-digit found */ pos++; }