#include "ded.h" #include "char.h" /************************************************************************ * * * copyright Richard Bornat 1981 * * * ************************************************************************/ /* print a message on the editrow, remembering where it starts so that * it may disappear when the editrow is altered. */ int x_col; char x_row[ENOUGH]; x_dump(c) { x_row[x_col] = c; if (x_collastc) virt_c.col = lastc; if (edit_c.col>lastc) edit_c.col = lastc; dedprintf(x_dump, (int *)par); x_dump(0); redraw(EDITROW, lastc+1, x_row+lastc+1); ttyflush(); diag_printed = true; } } /* VARARGS1 */ diag(str) char *str; { x_diag(&str); } /* remove diagnostic message */ diag_clear() { int i=editright; editright = RIGHTCOL-1; /* last column is always inaccessible */ redraw(EDITROW, i, ""); diag_printed = false; } /************************************************************************ * * * procedures to produce diagnostic messages * * * ************************************************************************/ extern int do_command(); /* print message, then return false as result of command */ /* VARARGS1 */ fdiag(str) char *str; { x_cdiag(&str); leave_command(NOT_OK); } /* print message, then return true as result of command */ /* VARARGS1 */ tdiag(str) char *str; { x_cdiag(&str); leave_command(OK); } /* just print message and moan */ x_cdiag(par) char **par; { x_diag(par); complain(); } /* VARARGS1 */ cdiag(str) char *str; { x_cdiag(&str); } /* draw a blob to show that we are doing something */ blobit() { diag("%c",c_BLOB); } /* ring the bell */ complain() { if (ringing) ttyout(c_BELL); /* ttyflush(); */ }