/*

        message display for 16 color graphic screen

                      1993.6.27 v1.0
                      copyright Y.Ouchi

			in		id : display message id

*/

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "egb.h"
#include "bb.h"

extern	void	linedsp(int, int, char *);
extern	char	egbwork[1536];

void mesout(int id)
{
	char	*errormes[10]={	"log file nothing !",
							"memory get failed !",
							"text too much !",
							"title too much !",
							"log text nothing !",
							"","","","",""};
	char	*paraerr={"message out parameter error"};
	char	*keyinmes={"hit any key"};
	int		i;

	EGB_writePage(egbwork,0);
	EGB_color(egbwork, 0, ALARM_MES_COL);
	if ( id<0 || id>9 || strlen(errormes[id])==0 ) {
		linedsp(50,100,paraerr);
	}
	else{
		linedsp(50,100,errormes[id]);
	}
	linedsp(120,130,keyinmes);
	i = INKEY() ;
	while( i == INKEY() ) ;  
	EGB_color(egbwork, 0, TEXT_COL);
	return;
}

