/*
* mask to clear the bits required to be 0 in the handle state passed to
* DOSSETFHSTATE.
*/
#define FHSTATEMASK 0xffd07888
/*
* declaration for console handle
*/
extern int _coninpfh;
/***
*char *_cgets(string) - read string from console
*
*Purpose:
* Reads a string from the console via ReadConsole on a cooked console
* handle. string[0] must contain the maximum length of the
* string. Returns pointer to str[2].
*
* NOTE: _cgets() does NOT check the pushback character buffer (i.e.,
* _chbuf). Thus, _cgets() will not return any character that is
* pushed back by the _ungetch() call.
*
*Entry:
* char *string - place to store read string, str[0] = max length.
*
*Exit:
* returns pointer to str[2], where the string starts.
* returns NULL if error occurs
*
*Exceptions:
*
*******************************************************************************/