/* -*- Mode:Text -*- */ /* * term.c - deal with termcap, and unix terminal mode settings * * Pace Willisson, 1983 */ #include #ifdef unix # include #endif #include #include "ispell.h" #ifdef AMIGA char PC = '\000'; /* padding character */ char *BC = "\033[D"; /* backspace if not ^H */ char *cd = "\033[J"; /* clear to end of display */ char *cl = "\033[H\033[J"; /* clear display */ char *cm = "\033[%i%2;%2H"; /* cursor movement */ char *ho = "\033[H"; /* home */ char *so = "\033[7;30;31m"; /* standout */ char *se = "\033[0;30;31m"; /* standout end */ int li=22; /* lines */ #else char PC; /* padding character */ char *BC; /* backspace if not ^H */ char *cd; /* clear to end of display */ char *cl; /* clear display */ char *cm; /* cursor movement */ char *ho; /* home */ char *so; /* standout */ char *se; /* standout end */ int li; /* lines */ #endif char termcap[1024]; char termstr[1024]; /* for string values */ char *termptr; int erasechar; int killchar; char tempfile[200]; extern int putch(); erase () { if (cl) tputs(cl, li, putch); else { if (ho) tputs(ho, 100, putch); else if (cm) tputs(tgoto(cm, 0, 0), 100, putch); tputs(cd, li, putch); } } move (row, col) { tputs (tgoto (cm, col, row), 100, putch); } inverse () { tputs (so, 10, putch); } normal () { tputs (se, 10, putch); } backup () { if (BC) tputs (BC, 1, putch); else putchar ('\b'); } putch (c) { putchar (c); } #ifdef unix struct sgttyb sbuf, osbuf; #endif static termchanged = 0; terminit () { int done(); int tpgrp; int onstop(); extern short ospeed; retry: #ifdef unix sigsetmask(1<