CMDParseColour

Synopsis

extern "C" CMDAPIIMPORT int CMDParseColour ( const char * arg, const char * & end, unsigned short & colour, int delim ) ;

Description

This function parses a colour specification to produce a standard CGA-style attribute value. It returns non-zero if a colour specification was correctly parsed, and zero otherwise.

The arg parameter points to the start of the colour specification. Words are broken at whitespace, as well as by the delimiter character specified by the delim parameter if it does not have the value -1. On success, the attribute value is returned via the colour parameter and a pointer to the first character that was not parsed is returned via the end parameter.


The 32-bit Command Interpreter is © Copyright Jonathan de Boyne Pollard. "Moral" rights are asserted.