home *** CD-ROM | disk | FTP | other *** search
- /*--------------------------------------*/
- /* */
- /* CDISPLAY(X,X,X,X) */
- /* */
- /* Displays a string on the screen */
- /* specified by the first two arguments */
- /* which are the cursor coordinates. */
- /* The third argument is the string. If*/
- /* the second argument is negative, then*/
- /* the string passed is to be centered. */
- /* If the first argument is negative, */
- /* then the screen is to be cleared */
- /* before displaying the string. The */
- /* fourth argument is the color of the */
- /* output. */
- /* */
- /*--------------------------------------*/
- # include "conio.h"
- void cdisplay(color,a,b,string)
- int a,b,color;
- char string[];
- {
- int x,y,d;
- d=strlen(string);
- if (b<0)
- y=(80-d)/2;
- else
- y=b;
- if (a>=0)
- x=a;
- else{
- x=a*-1;
- clrscr();
- }
- scr_curs(x,y);
- textcolor(color);
- cprintf(string);
- }