diff options
Diffstat (limited to 'util/miscutil.c')
-rw-r--r-- | util/miscutil.c | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/util/miscutil.c b/util/miscutil.c index 698e80691..01241bc23 100644 --- a/util/miscutil.c +++ b/util/miscutil.c @@ -453,28 +453,3 @@ match_multistr(const char *multistr,const char *match) return 0; } - -int -hextobyte( const char *s ) -{ - int c; - - if( *s >= '0' && *s <= '9' ) - c = 16 * (*s - '0'); - else if( *s >= 'A' && *s <= 'F' ) - c = 16 * (10 + *s - 'A'); - else if( *s >= 'a' && *s <= 'f' ) - c = 16 * (10 + *s - 'a'); - else - return -1; - s++; - if( *s >= '0' && *s <= '9' ) - c += *s - '0'; - else if( *s >= 'A' && *s <= 'F' ) - c += 10 + *s - 'A'; - else if( *s >= 'a' && *s <= 'f' ) - c += 10 + *s - 'a'; - else - return -1; - return c; -} |