Category : C Source Code
Archive   : ADVGRAPH.ZIP
Filename : MESSAGE.C

 
Output of file : MESSAGE.C contained in archive : ADVGRAPH.ZIP


/* MESSAGE.C displays a message and waits for a string.
*/

#include
#include "graphiq.h"
#include "screen.h"

extern int reading_cmd;
extern int main_select;
extern char command[];
extern FILE *cmd_stream;


message(mess, row, col, color, inchar)
char *mess[];
int row, col, color, inchar;
{

switch (inchar)
{
case ESC:
if (reading_cmd)
if (fread(command, 80, cmd_stream) == 0)
{
fclose(cmd_stream);
reading_cmd = FALSE;
}
else command[strlen(command)-1] = NULLCHAR;

if (!reading_cmd)
{
/* XOR message onto background */
write_array(mess, row, col, color);
get_str(command, color); /* get the command */
/* XOR message off of background */
write_array(mess, row, col, color);
}

if (strlen(command) && !reading_cmd)
{
write_str("_", row, col+strlen(mess[0])-1, color);
write_str(command, row, col+strlen(mess[0])-1, WHITE);
write_str("_", row,
col+strlen(mess[0])-1+strlen(command), color);
}
break;
case ENTER:
main_menu(color);
switch(main_select)
{
case 1:
strcpy(command, "HELP");
break;
case 2:
strcpy(command, "GRID");
break;
case 3:
strcpy(command, "SNAP");
break;
case 4:
strcpy(command, "LOCATOR");
break;
case 5:
strcpy(command, "STYLE");
break;
case 6:
strcpy(command, "COLOR");
break;
case 7:
strcpy(command, "MOVE");
break;
case 8:
strcpy(command, "LINE");
break;
case 9:
strcpy(command, "BOX");
break;
case 10:
strcpy(command, "FILL");
break;
case 11:
strcpy(command, "CIRCLE");
break;
case 12:
strcpy(command, "TEXT");
break;
case 13:
strcpy(command, "ROTATION");
break;
case 14:
strcpy(command, "RESET");
break;
case 15:
strcpy(command, "SYSORIGIN");
break;
case 16:
strcpy(command, "SCALE");
break;
case 17:
strcpy(command, "PLAYBACK");
break;
case 18:
strcpy(command, "PRINT");
break;
case 19:
strcpy(command, "FILES");
break;
case 20:
strcpy(command, "COMMAND FILE");
break;
case 21:
strcpy(command, "CLEAR DISPLAY");
break;
case 22:
strcpy(command, "QUIT");
break;
case 23:
strcpy(command, "EXIT");
break;
}
break;
}
}



  3 Responses to “Category : C Source Code
Archive   : ADVGRAPH.ZIP
Filename : MESSAGE.C

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/