diff --git a/curspriv.h b/curspriv.h index a9feac43..9048d85f 100644 --- a/curspriv.h +++ b/curspriv.h @@ -15,7 +15,7 @@ * See the file maintain.er for details of the current maintainer. * ************************************************************************/ -/* $Id: curspriv.h,v 1.115 2006/08/12 20:11:36 wmcbrine Exp $ */ +/* $Id: curspriv.h,v 1.116 2006/08/12 20:28:59 wmcbrine Exp $ */ /* CURSPRIV.H @@ -32,7 +32,6 @@ #define _PAD 0x10 /* X/Open Pad. */ #define _SUBPAD 0x20 /* X/Open subpad. */ - /*----------------------------------------------------------------------*/ /* Miscellaneous */ @@ -44,20 +43,9 @@ #define _DLCHAR 0x15 /* Delete Line char (^U) */ #define NUNGETCH 256 /* max # chars to ungetch() */ - -/* Setmode stuff */ -struct cttyset -{ - bool been_set; - SCREEN saved; -}; - -extern struct cttyset *ctty; - /* tracing flag */ extern bool trace_on; - /* Monitor (terminal) type information */ enum { diff --git a/pdcurses/initscr.c b/pdcurses/initscr.c index 347d305a..f9a1e2e2 100644 --- a/pdcurses/initscr.c +++ b/pdcurses/initscr.c @@ -38,7 +38,7 @@ # undef wnoutrefresh #endif -RCSID("$Id: initscr.c,v 1.69 2006/08/11 20:59:44 wmcbrine Exp $"); +RCSID("$Id: initscr.c,v 1.70 2006/08/12 20:28:59 wmcbrine Exp $"); const char *_curses_notice = "PDCurses 3.0 - Public Domain 2006"; @@ -59,10 +59,6 @@ int c_gindex = 1; /* getter index */ int c_ungind = 0; /* wungetch() push index */ int c_ungch[NUNGETCH]; /* array of ungotten chars */ -/* Global definitions for setmode routines */ - -struct cttyset *ctty; - #ifdef PDC_WIDE cchar_t _wacs_map[] = { ACS_ULCORNER, ACS_LLCORNER, ACS_URCORNER, ACS_LRCORNER, @@ -173,12 +169,6 @@ WINDOW *Xinitscr(int argc, char *argv[]) exit(8); } - if (!(ctty = calloc(3, sizeof(struct cttyset)))) - { - fprintf(stderr, "initscr(): Unable to allocate ctty\n"); - exit(9); - } - SP->autocr = TRUE; /* cr -> lf by default */ SP->raw_out = FALSE; /* tty I/O modes */ SP->raw_inp = FALSE; /* tty I/O modes */ @@ -332,9 +322,6 @@ void delscreen(SCREEN *sp) SP->alive = FALSE; - free(ctty); - ctty = NULL; - PDC_scr_exit(); SP = (SCREEN *)NULL; diff --git a/pdcurses/kernel.c b/pdcurses/kernel.c index f3b7e8c6..ed4d935a 100644 --- a/pdcurses/kernel.c +++ b/pdcurses/kernel.c @@ -36,11 +36,17 @@ # undef wmove #endif -RCSID("$Id: kernel.c,v 1.59 2006/08/12 20:11:36 wmcbrine Exp $"); +RCSID("$Id: kernel.c,v 1.60 2006/08/12 20:28:59 wmcbrine Exp $"); RIPPEDOFFLINE linesripped[5]; char linesrippedoff = 0; +static struct cttyset +{ + bool been_set; + SCREEN saved; +} ctty[3]; + enum { PDC_SH_TTY, PDC_PR_TTY, PDC_SAVE_TTY }; /*man-start**************************************************************