ATOH(3) — UNIX Programmer’s Manual
NAME
atoh, atoo − convert ASCII to hexadecimal or octal
SYNOPSIS
unsigned int atoh (ap)
char ∗ap; unsigned int atoo (ap)
char ∗ap;
DESCRIPTION
Atoh converts the string pointed to by ap, representing an hexadecimal number, to an unsigned integer. The string may contain leading blanks and tabs, and a string of hexadecimal digits. Conversion stops at the first character which is not a valid hexadecimal digit. The digits themselves include the characters "0" through "9", "a" through "f", and "A" through "F". Atoo converts the string pointed to by ap, representing an octal number, to an unsigned integer. The string may contain leading blanks and tabs, and a string of octal digits. Conversion stops at the first character which is not a valid octal digit.
SEE ALSO
BUGS
There is no provision for overflow. Unary + is not accepted. (Unary - is not accepted, due to the interpretation of the numbers as unsigned.)
HISTORY
13-Nov-86 Andi Swimmer (andi) at Carnegie-Mellon University
Revised for 4.3.
05-Dec-79 Steven Shafer (sas) at Carnegie-Mellon University
Created.
7th Edition — 12/5/79