NAME
ReadItem - reads a single argument/name from command line (V36)
SYNOPSIS
value = ReadItem(buffer, maxchars, input)
D0 D1 D2 D3
LONG ReadItem( STRPTR, LONG, struct CSource *)
FUNCTION
Reads a "word" from either Input() (buffered), or via CSource, if it
is non-NULL (see < sc:include/dos/rdargs.h> for more information). Handles
quoting and some '*' substitutions (*e and *n) inside quotes (only).
See sc:include/dos/dos.h for a listing of values returned by ReadItem()
(ITEM_XXXX). A "word" is delimited by whitespace, quotes, '=', or
an EOF.
ReadItem always unreads the last thing read ( UnGetC(fh,-1)) so the
caller can find out what the terminator was.
INPUTS
buffer - buffer to store word in.
maxchars - size of the buffer
input - CSource input or NULL (uses FGetC( Input()))
RESULT
value - See < sc:include/dos/dos.h> for return values.
BUGS
Doesn't actually unread the terminator.
SEE ALSO
ReadArgs(), FindArg(), UnGetC(), FGetC(), Input(), < sc:include/dos/dos.h>,
< sc:include/dos/rdargs.h>, FreeArgs()
converted with guide2html by Kochtopf