CHRARG
Section: C Library Functions (3)
Updated: 12/5/79
Index
Return to Main Contents
NAME
chrarg - parse character argument or ask user
SYNOPSIS
int chrarg (ptr,brk,prompt,legals,defalt);
char **ptr,*brk,*prompt,*legals,defalt;
DESCRIPTION
Chrarg
attemps 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 begins with a character which is present in the
string
legals
of legal character responses, then the index of that
character within
legals
is returned.
If there is no argument, or if it does
not begin with a legal character, then the parameters
prompt, legals,
and
defalt
are passed to the
getchr(3)
routine, whose value is then returned by
chrarg.
Chrarg
is especially useful for parsing character values
from argument lists in programs using the command interpreter,
ci(3).
SEE ALSO
nxtarg(3),
getchr(3),
ci(3)
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- SEE ALSO
-
This document was created by
man2html,
using the manual pages.
Time: 10:32:23 GMT, May 26, 2025