should be) (yeah!).
SCCS-vsn: usr.bin/tn3270/sys_curses/terminal.h 1.5
SCCS-vsn: usr.bin/tn3270/sys_curses/termout.c 1.15
#define INCLUDED_TERMINAL
#define INCLUDED_TERMINAL
-#if defined(SLOWSCREEN)
-
/*
* In the situation where we have a copy of the terminal screen in front
* of us, here are some macros to deal with them.
/*
* In the situation where we have a copy of the terminal screen in front
* of us, here are some macros to deal with them.
((c != GetTerminal(p)) || NeedToRedisplayFieldsAttr(p,a))
#define NeedToRedisplay(c,p) NeedToRedisplayAttr(c,p,FieldAttributes(p))
((c != GetTerminal(p)) || NeedToRedisplayFieldsAttr(p,a))
#define NeedToRedisplay(c,p) NeedToRedisplayAttr(c,p,FieldAttributes(p))
-#endif /* defined(SLOWSCREEN) */
#define GetTerminal(i) GetGeneric(i, Terminal)
#define GetTerminalPointer(p) GetGenericPointer(p)
#define GetTerminal(i) GetGeneric(i, Terminal)
#define GetTerminalPointer(p) GetGenericPointer(p)
static int terminalCursorAddress; /* where the cursor is on term */
static int screenInitd; /* the screen has been initialized */
static int screenStopped; /* the screen has been stopped */
static int terminalCursorAddress; /* where the cursor is on term */
static int screenInitd; /* the screen has been initialized */
static int screenStopped; /* the screen has been stopped */
static int max_changes_before_poll; /* how many characters before looking */
/* at terminal and net again */
static int max_changes_before_poll; /* how many characters before looking */
/* at terminal and net again */
-#endif /* defined(SLOWSCREEN) */
static int needToRing; /* need to ring terinal bell */
static char *bellSequence = "\07"; /* bell sequence (may be replaced by
static int needToRing; /* need to ring terinal bell */
static char *bellSequence = "\07"; /* bell sequence (may be replaced by
#endif /* defined(unix) */
#endif /* defined(unix) */
static int inHighlightMode = 0;
ScreenImage Terminal[MAXSCREENSIZE];
static int inHighlightMode = 0;
ScreenImage Terminal[MAXSCREENSIZE];
-#endif /* defined(SLOWSCREEN) */
/* Variables for transparent mode */
#if defined(unix)
/* Variables for transparent mode */
#if defined(unix)
init_screen()
{
bellwinup = 0;
init_screen()
{
bellwinup = 0;
inHighlightMode = 0;
ClearArray(Terminal);
inHighlightMode = 0;
ClearArray(Terminal);
-#endif /* defined(SLOWSCREEN) */
/* What is the screen address of the attribute byte for the terminal */
static int
/* What is the screen address of the attribute byte for the terminal */
static int
return(LowestScreen()); /* unformatted screen... */
}
return(LowestScreen()); /* unformatted screen... */
}
-#endif /* defined(SLOWSCREEN) */
\f
/*
* There are two algorithms for updating the screen.
\f
/*
* There are two algorithms for updating the screen.
#if defined(NOT43)
static int
#else /* defined(NOT43) */
#if defined(NOT43)
static int
#else /* defined(NOT43) */
EmptyTerminal(); /* move data along */
return;
}
EmptyTerminal(); /* move data along */
return;
}
-#endif /* defined(SLOWSCREEN) */
\f
#if defined(NOT43)
static int
\f
#if defined(NOT43)
static int
extern char *tgetstr();
#endif /* defined(unix) */
extern char *tgetstr();
#endif /* defined(unix) */
-#endif /* defined(SLOWSCREEN) */
terminalCursorAddress = SetBufferAddress(0,0);
#if defined(unix)
signal(SIGHUP, abort);
#endif
TryToSend = FastScreen;
terminalCursorAddress = SetBufferAddress(0,0);
#if defined(unix)
signal(SIGHUP, abort);
#endif
TryToSend = FastScreen;
-#if defined(unix) && defined(SLOWSCREEN)
ioctl(1, TIOCGETP, (char *) &ourttyb);
if ((ourttyb.sg_ospeed < 0) || (ourttyb.sg_ospeed > B9600)) {
max_changes_before_poll = 1920;
ioctl(1, TIOCGETP, (char *) &ourttyb);
if ((ourttyb.sg_ospeed < 0) || (ourttyb.sg_ospeed > B9600)) {
max_changes_before_poll = 1920;
TryToSend = SlowScreen;
HaveInput = 1; /* get signals going */
}
TryToSend = SlowScreen;
HaveInput = 1; /* get signals going */
}
-#endif /* defined(unix) && defined(SLOWSCREEN) */
+#endif /* defined(unix) */
setcommandmode();
/*
* By now, initscr() (in curses) has been called (from telnet.c),
setcommandmode();
/*
* By now, initscr() (in curses) has been called (from telnet.c),
if (screenInitd && !screenStopped) {
move(NumberLines-1, 1);
standend();
if (screenInitd && !screenStopped) {
move(NumberLines-1, 1);
standend();
-#endif /* defined(SLOWSCREEN) */
DoARefresh();
setcommandmode();
endwin();
DoARefresh();
setcommandmode();
endwin();
{
outputPurge(); /* flush all data to terminal */
clear(); /* clear in curses */
{
outputPurge(); /* flush all data to terminal */
clear(); /* clear in curses */
-#endif /* defined(SLOWSCREEN) */
Clear3270();
Lowest = HighestScreen()+1; /* everything in sync... */
Highest = LowestScreen()+1;
Clear3270();
Lowest = HighestScreen()+1; /* everything in sync... */
Highest = LowestScreen()+1;
bellwinup = 0;
Lowest = MIN(Lowest, LINES/2);
Highest = MAX(Highest, (LINES/2)+3);
bellwinup = 0;
Lowest = MIN(Lowest, LINES/2);
Highest = MAX(Highest, (LINES/2)+3);
memset((char *)(Terminal+LINES/2), 0, (sizeof Terminal[0])*(3*COLS));
memset((char *)(Terminal+LINES/2), 0, (sizeof Terminal[0])*(3*COLS));
-#endif /* defined(SLOWSCREEN) */
touchwin(stdscr);
DoARefresh();
}
touchwin(stdscr);
DoARefresh();
}