OCTARG
Section: C Library Functions (3)
Updated: 12/5/79
Index
Return to Main Contents
NAME
octarg, hexarg - parse octal or hexadecimal argument or ask user
SYNOPSIS
unsigned int octarg (ptr,brk,prompt,min,max,defalt);
unsigned int hexarg (ptr,brk,prompt,min,max,defalt);
char **ptr,*brk,*prompt;
unsigned int min,max,defalt;
DESCRIPTION
octarg
and
hexarg
attemp to parse an argument from a string, passing the
string pointer
ptr
and the break character set
brk
to the
nxtarg(3)
routine.
If there is an argument parsed, and it is a legal
octal or hexadecimal value between
min
and
max,
then this value is returned by
octarg
or
hexarg.
If there is no argument, or it is not a legal value, then
an error message is printed and the remaining parameters
are passed into
getoct(3)
or
gethex(3),
whose value will be returned by
octarg
or
hexarg.
A legal octal value is a sequence of octal digits.
A legal hexadecimal
value is a sequence of digits "0" through "9", "a" through "f", or
"A" through "F", and optionally preceded by the (ignored) prefix
"0x" or "0X".
octarg
and
hexarg
are especially useful for parsing octal and hexadecimal values from
argument lists in programs using the command interpreter,
ci(3).
SEE ALSO
nxtarg(3),
getoct(3),
gethex(3),
atoo(3),
atoh(3),
ci(3)
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- SEE ALSO
-
This document was created by
man2html,
using the manual pages.
Time: 16:58:17 GMT, September 23, 2024