--- chpasswd.c 2005-05-09 10:05:08.000000000 -0300 +++ new/chpasswd.c 2005-11-29 13:54:50.000000000 -0200 @@ -159,6 +159,27 @@ } +static int +htoi(s) + unsigned char *s; +{ + int value; + char c; + + c = s[0]; + if (isupper(c)) + c = tolower(c); + value = (c >= '0' && c <= '9' ? c - '0' : c - 'a' + 10) * 16; + + c = s[1]; + if (isupper(c)) + c = tolower(c); + value += c >= '0' && c <= '9' ? c - '0' : c - 'a' + 10; + + return (value); +} + + void Herror(char *msg) { @@ -282,27 +303,6 @@ } -static int -htoi(s) - unsigned char *s; -{ - int value; - char c; - - c = s[0]; - if (isupper(c)) - c = tolower(c); - value = (c >= '0' && c <= '9' ? c - '0' : c - 'a' + 10) * 16; - - c = s[1]; - if (isupper(c)) - c = tolower(c); - value += c >= '0' && c <= '9' ? c - '0' : c - 'a' + 10; - - return (value); -} - - void rulefail(char *minchar, char *minnum, char *minspec) {