Status Message

You must write the StatusMsg functions.

The purpose of the status message functions is to provide a convenient and standard set of user-input functions. You must have the scrnio.c functions in place and working, as these functions will use them.

The Status Message functions perform basic user-input on the bottom line of the screen. For standardization, and simplification, they will use hard-coded colors, though it is suggested that these colors be made global variables. The strongly suggested setup for these colors, is to add the following to your statmsg.c file, as global variables:

int StatColor=0x1F, StatEditColor=0x0F;

Your status message functions should then pay attention to these globals, for color requirements.

You are to write the following, and place them into statmsg.c. These file should be added to your project (backup your work first). Note: The StatusYN function is the largest function I have, with 10 lines of code.

void StatusMsg( char *Str );
Clears out the entire bottom line of the display (ClearRect) with StatColor, and then displays the string Str (if it's not NULL).

void StatusMsgWait( char *Str );
Clears out the entire bottom line of the display (ClearRect) with StatColor, and then displays the string Str (if it's not NULL). Then waits for the user to press any key.

int StatusYN( char *Str );
Clears out the entire bottom line of the display (ClearRect) with StatColor, and then displays the string Str (if it's not NULL). Then waits for the user to press either the 'Y' or 'N' key. Will not return until the user presses 'Y' or 'N'. Returns the key the user pressed.

int StatusStr( char *Str, char *Dest, int Len ); Clears out the entire bottom line of the display (ClearRect) with StatColor, and then displays the string Str (if it's not NULL). Then calls GetStr to input a string, upto Len characters long, storing it at Dest. Returns the key the user entered to end input ( ESC or ENTER).

Note: The StatusStr function will not be used in your project, and may be left out.

Changes to myio.h

Add the following to myio.h, at the end:

/*** STATMSG.C ***/
void StatusMsg( char *Str );
void StatusMsgWait( char *Str );
int StatusYN( char *Str );
int StatusStr( char *Str, char *Dest, int Len );