#pragma ident "@(#) errmsg.c 1.0.1 2009.09.07,06:29"
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
#include <curses.h>
#include <locale.h>

int main(int argc,char *argv[])
{
	int i;
	int ch;
	char buff[512];
	WINDOW *pvs;

	setlocale(LC_ALL,"");

	if(argc == 2)
		sprintf(buff,"%s",argv[1]);
	else
		sprintf(buff,"何かキーに触って下さい");
	initscr();
	echo();

	pvs = newwin(5,64,LINES/2,8);
	box(pvs,'|','-');

	wattron(pvs,A_REVERSE);
	mvwprintw(pvs,0,1,"----------------------CMS-Error-Message-----------------------");
	wattroff(pvs,A_REVERSE);
	mvwprintw(pvs,0,0,"+");
	mvwprintw(pvs,0,63,"+");
	mvwprintw(pvs,4,0,"+");
	mvwprintw(pvs,4,63,"+");

	mvwprintw(pvs,2,4,"%s",buff);
	wrefresh(pvs);
	wgetch(pvs);
	box(pvs,' ',' ');
	wclear(pvs);
	wrefresh(pvs);
	delwin(pvs);
	endwin();
	exit(0);
}


