xref: /csrg-svn/old/lib2648/dispmsg.c (revision 18807)
111467Sralph /*
2*18807Sdist  * Copyright (c) 1980 Regents of the University of California.
3*18807Sdist  * All rights reserved.  The Berkeley software License Agreement
4*18807Sdist  * specifies the terms and conditions for redistribution.
5*18807Sdist  */
6*18807Sdist 
7*18807Sdist #ifndef lint
8*18807Sdist static char sccsid[] = "@(#)dispmsg.c	5.1 (Berkeley) 04/26/85";
9*18807Sdist #endif not lint
10*18807Sdist 
11*18807Sdist /*
1211467Sralph  * display a message, str, starting at (x, y).
1311467Sralph  */
1411467Sralph 
1511467Sralph #include "2648.h"
1611467Sralph 
dispmsg(str,x,y,maxlen)1711467Sralph dispmsg(str, x, y, maxlen)
1811467Sralph char *str;
1911467Sralph int x, y;
2011467Sralph {
2111467Sralph 	int oldx, oldy;
2211467Sralph 	int oldcuron;
2311467Sralph 	int oldquiet;
2411467Sralph 	extern int QUIET;
2511467Sralph 
2611467Sralph 	oldx = _curx; oldy = _cury;
2711467Sralph 	oldcuron = _cursoron;
2811467Sralph 	zoomout();
2911467Sralph 	areaclear(y, x, y+8, x+6*maxlen);
3011467Sralph 	setset();
3111467Sralph 	curon();
3211467Sralph 	movecurs(x, y);
3311467Sralph 	texton();
3411467Sralph 	oldquiet = QUIET;
3511467Sralph 	QUIET = 0;
3611467Sralph 	outstr(str);
3711467Sralph 	if (oldquiet)
3811467Sralph 		outstr("\r\n");
3911467Sralph 	QUIET = oldquiet;
4011467Sralph 	textoff();
4111467Sralph 	movecurs(oldx, oldy);
4211467Sralph 	if (oldcuron == 0)
4311467Sralph 		curoff();
4411467Sralph }
45