NAME
chrarg - parse character argument or ask user

SYNOPSIS
int chrarg (ptr,brk,prompt,legals,defalt);
char **ptr,*brk,*prompt,*legals,defalt;

DESCRIPTION
Chrarg attempts 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)