Tekproc.c:#define TekColormap DefaultColormap( screen->display, \
Tekproc.c:				    DefaultScreen(screen->display) )
Tekproc.c:#define DefaultGCID DefaultGC(screen->display, DefaultScreen(screen->display))->gid
Tekproc.c:#define	TEKHOME		((TekChar[screen->page.fontsize].nlines - 1)\
Tekproc.c:			 * TekChar[screen->page.fontsize].vsize)
Tekproc.c:#define	TekMove(x,y)	screen->cur_X = x; screen->cur_Y = y
Tekproc.c:			if(screen->TekGIN) {
Tekproc.c:				if(screen->margin == MARGIN2)
Tekproc.c:				TekEnq(c, screen->cur_X, screen->cur_Y);
Tekproc.c:			if(screen->logging) {
Tekproc.c:				screen->logstart = buffer;
Tekproc.c:			if(screen->TekGIN)
Tekproc.c:			screen->TekGIN = &TekRecord->ptr[-1];
Tekproc.c:			    screen->mousecolor,
Tekproc.c:				    screen->display,
Tekproc.c:			if(screen->TekGIN)
Tekproc.c:			if(screen->TekGIN)
Tekproc.c:			if(screen->TekGIN)
Tekproc.c:			if(screen->TekGIN)
Tekproc.c:				screen->pen = PENDOWN;
Tekproc.c:				screen->pen = PENUP;
Tekproc.c:			if(screen->TekGIN)
Tekproc.c:			if(screen->TekGIN)
Tekproc.c:			if(screen->TekGIN)
Tekproc.c:			if(screen->TekGIN)
Tekproc.c:			if(screen->TekGIN)
Tekproc.c:			if(screen->TekGIN)
Tekproc.c:		        TekSetGCFont (screen->cur.fontsize = (c & 03));
Tekproc.c:			if((c &= LINEMASK) != screen->cur.linetype) {
Tekproc.c:				screen->cur.linetype = c;
Tekproc.c:			screen->pen = PENUP;
Tekproc.c:			screen->pen = PENDOWN;
Tekproc.c:			x = screen->cur_X;
Tekproc.c:			y = screen->cur_Y;
Tekproc.c:			if(screen->pen == PENDOWN)
Tekproc.c:				if(screen->pen == PENDOWN)
Tekproc.c:					TekDraw(screen->cur.x, screen->cur.y);
Tekproc.c:					TekMove(screen->cur.x, screen->cur.y);
Tekproc.c:				screen->pen = PENDOWN;
Tekproc.c:				TekMove(screen->cur.x, screen->cur.y);
Tekproc.c:				TekDraw(screen->cur.x, screen->cur.y);
Tekproc.c:				TekMove(screen->cur.x, screen->cur.y);
Tekproc.c:				TekDraw(screen->cur.x, screen->cur.y);
Tekproc.c:			if(screen->TekGIN)
Tekproc.c:			screen->cur_X = screen->margin == MARGIN1 ? 0 :
Tekproc.c:			if(screen->TekGIN)
Tekproc.c:			if(!TekRefresh && (screen->display->qlen > 0 ||
Tekproc.c:			 (ioctl(screen->display->fd, FIONREAD, (char *)&arg), arg) > 0))
Tekproc.c:			c = screen->cur.fontsize;
Tekproc.c:			    screen->display,
Tekproc.c:			    screen->TnormalGC,
Tekproc.c:			    (int)(screen->cur_X * TekScale(screen)) + screen->border,
Tekproc.c:			    (int)((TEKHEIGHT + TEKTOPPAD - screen->cur_Y) * TekScale(screen)) + screen->border,
Tekproc.c:    Font fid = screen->Tfont[size]->fid;
Tekproc.c:       XCopyGC (screen->display,
Tekproc.c:	  DefaultGC(screen->display, DefaultScreen(screen->display)),
Tekproc.c:	  GCFont, screen->TnormalGC);
Tekproc.c:       XSetFont (screen->display, screen->TnormalGC, fid);
Tekproc.c:				if(screen->logging)
Tekproc.c:				if((Tbcnt = read(screen->respond,
Tekproc.c:			if(QLength(screen->display))
Tekproc.c:				XFlush(screen->display);
Tekproc.c:    register int border = 2 * screen->border;
Tekproc.c:    XClearWindow(screen->display, TWindow(screen));
Tekproc.c:	screen->cur_X = 0;
Tekproc.c:	screen->cur_Y = TEKHOME;
Tekproc.c:	screen->cur = screen->page;
Tekproc.c:        TekSetGCFont (screen->cur.fontsize);
Tekproc.c:	screen->margin = MARGIN1;
Tekproc.c:	if(screen->TekGIN) {
Tekproc.c:		screen->TekGIN = NULL;
Tekproc.c:	if(!screen->waitrefresh)
Tekproc.c:            wait_cursor = make_wait(screen->mousecolor, term->core.background_pixel);
Tekproc.c:        XDefineCursor(screen->display, TShellWindow, wait_cursor);
Tekproc.c:	XFlush(screen->display);
Tekproc.c:	XDefineCursor(screen->display, TShellWindow,
Tekproc.c:	 (screen->TekGIN && GINcursor) ? GINcursor : screen->arrow);
Tekproc.c:	XClearWindow(screen->display, TWindow(screen));
Tekproc.c:	screen->cur_X = 0;
Tekproc.c:	screen->cur_Y = TEKHOME;
Tekproc.c:	screen->margin = MARGIN1;
Tekproc.c:	screen->page = screen->cur;
Tekproc.c:	if(screen->TekGIN)
Tekproc.c:	x = screen->cur.x;
Tekproc.c:	y = screen->cur.y;
Tekproc.c:			screen->cur.x = x;
Tekproc.c:			screen->cur.y = y;
Tekproc.c:	x = ( screen->cur_X -=
Tekproc.c:		(t = &TekChar[screen->cur.fontsize])->hsize
Tekproc.c:	if(screen->margin == MARGIN1 && x < 0 || screen->margin == MARGIN2
Tekproc.c:		if((l = (screen->cur_Y + (t->vsize - 1)) / t->vsize + 1) >=
Tekproc.c:			screen->margin = !screen->margin;
Tekproc.c:		screen->cur_Y = l * t->vsize;
Tekproc.c:		screen->cur_X = (t->charsperline - 1) * t->hsize;
Tekproc.c:	if( ( screen->cur_X +=
Tekproc.c:		( t = &TekChar[screen->cur.fontsize])->hsize
Tekproc.c:		if((l = screen->cur_Y / t->vsize - 1) < 0) {
Tekproc.c:			screen->margin = !screen->margin;
Tekproc.c:		screen->cur_Y = l * t->vsize;
Tekproc.c:		screen->cur_X = screen->margin == MARGIN1 ? 0 : TEKWIDTH / 2;
Tekproc.c:	t = &TekChar[screen->cur.fontsize];
Tekproc.c:	if((l = (screen->cur_Y + (t->vsize - 1)) / t->vsize + 1) >= t->nlines) {
Tekproc.c:		if((screen->margin = !screen->margin) != MARGIN1) {
Tekproc.c:			if(screen->cur_X < TEKWIDTH / 2)
Tekproc.c:				screen->cur_X += TEKWIDTH / 2;
Tekproc.c:		} else if(screen->cur_X >= TEKWIDTH / 2)
Tekproc.c:			screen->cur_X -= TEKWIDTH / 2;
Tekproc.c:	screen->cur_Y = l * t->vsize;
Tekproc.c:	t = &TekChar[screen->cur.fontsize];
Tekproc.c:	if((l = screen->cur_Y / t->vsize - 1) < 0) {
Tekproc.c:		if((screen->margin = !screen->margin) != MARGIN1) {
Tekproc.c:			if(screen->cur_X < TEKWIDTH / 2)
Tekproc.c:				screen->cur_X += TEKWIDTH / 2;
Tekproc.c:		} else if(screen->cur_X >= TEKWIDTH / 2)
Tekproc.c:			screen->cur_X -= TEKWIDTH / 2;
Tekproc.c:	screen->cur_Y = l * t->vsize;
Tekproc.c:	if(nplot == 0 || T_lastx != screen->cur_X || T_lasty != screen->cur_Y) {
Tekproc.c:		if(nplot > 0 && screen->cur.linetype != SOLIDLINE)
Tekproc.c:	AddToDraw(screen->cur_X, screen->cur_Y, x, y);
Tekproc.c:	T_lastx = screen->cur_X = x;
Tekproc.c:	T_lasty = screen->cur_Y = y;
Tekproc.c:	lp->x1 = x1 = x1 * TekScale(screen) + screen->border;
Tekproc.c:	 screen->border;
Tekproc.c:	lp->x2 = x2 = x2 * TekScale(screen) + screen->border;
Tekproc.c:	 screen->border;
Tekproc.c:	XDrawSegments(screen->display, TWindow(screen), 
Tekproc.c:		((screen->cur.linetype == SOLIDLINE)?  screen->TnormalGC :
Tekproc.c:		 screen->linepat[screen->cur.linetype - 1]),
Tekproc.c:	XDefineCursor(screen->display, TShellWindow, screen->arrow);
Tekproc.c:		XFreeCursor(screen->display, GINcursor);
Tekproc.c:	if(screen->TekGIN) {
Tekproc.c:		*screen->TekGIN = CANCEL;	/* modify recording */
Tekproc.c:		screen->TekGIN = NULL;
Tekproc.c:	    screen->display, TWindow(screen), 
Tekproc.c:	if((mousex = (mousex - screen->border) / TekScale(screen)) < 0)
Tekproc.c:	if((mousey = TEKHEIGHT + TEKTOPPAD - (mousey - screen->border) /
Tekproc.c:	int pty = screen->respond;
Tekproc.c:			screen->TekEmu = FALSE;
Tekproc.c:	if(!screen->Tshow) {
Tekproc.c:	if(screen->select)
Tekproc.c:		XWarpPointer (screen->display, None, TWindow(screen),
Tekproc.c:	screen->TekEmu = FALSE;
Tekproc.c:    register int border = 2 * screen->border;
Tekproc.c:    if (!(screen->Tfont[SMALLFONT] = XLoadQueryFont (screen->display,
Tekproc.c:	screen->Tfont[SMALLFONT] = XQueryFont (screen->display, DefaultGCID);
Tekproc.c:    screen->xorplane = 1;
Tekproc.c:    screen->Tbackground = tw->core.background_pixel;
Tekproc.c:    screen->Tforeground = screen->foreground;
Tekproc.c:    screen->Tcursorcolor = screen->foreground;
Tekproc.c:	if (DisplayCells(screen->display, DefaultScreen(screen->display)) > 2
Tekproc.c:		    XParseColor(screen->display, TekColormap, curs_color, &cdef)) {
Tekproc.c:			    screen->display,
Tekproc.c:			    &screen->xorplane, 1,
Tekproc.c:				screen->cellsused = TRUE;
Tekproc.c:				screen->colorcells[2] = cdef;
Tekproc.c:				screen->Tbackground = pixels[0];
Tekproc.c:				screen->Tforeground = pixels[1];
Tekproc.c:				screen->Tcursorcolor = screen->Tbackground |
Tekproc.c:				 screen->xorplane;
Tekproc.c:				screen->planeused = TRUE;
Tekproc.c:		    screen->display,
Tekproc.c:		    &screen->xorplane, 1, &screen->Tbackground, 1)) {
Tekproc.c:			screen->Tforeground = screen->Tbackground |
Tekproc.c:			 screen->xorplane;
Tekproc.c:			screen->Tcursorcolor = screen->Tforeground;
Tekproc.c:			screen->planeused = TRUE;
Tekproc.c:		if (screen->Tbackground != XtDefaultBGPixel) {
Tekproc.c:				!XParseColor(screen->display,
Tekproc.c:				XQueryColor(screen->display, TekColormap, &cdef);
Tekproc.c:			cdef.pixel = screen->Tbackground;
Tekproc.c:			XStoreColor(screen->display, TekColormap, &cdef);
Tekproc.c:			if(screen->cellsused) {
Tekproc.c:				screen->colorcells[0] = cdef;
Tekproc.c:				cdef.pixel = screen->Tforeground |
Tekproc.c:					screen->xorplane;
Tekproc.c:				XStoreColor(screen->display, TekColormap,&cdef);
Tekproc.c:				!XParseColor(screen->display,
Tekproc.c:				XQueryColor(screen->display, TekColormap, &cdef);
Tekproc.c:			cdef.pixel = screen->Tforeground;
Tekproc.c:			XStoreColor(screen->display, TekColormap, &cdef);
Tekproc.c:			if(screen->cellsused) {
Tekproc.c:				screen->colorcells[1] = cdef;
Tekproc.c:				cdef.pixel = screen->Tcursorcolor;
Tekproc.c:				XStoreColor(screen->display, TekColormap, &cdef);
Tekproc.c:      winX += DisplayWidth(screen->display, DefaultScreen(screen->display))
Tekproc.c:      winY += DisplayHeight(screen->display, DefaultScreen(screen->display))
Tekproc.c:    values->background_pixel = screen->Tbackground;
Tekproc.c:	XCreateWindow (screen->display,
Tekproc.c:	XFreeFont(screen->display, screen->Tfont[SMALLFONT]);
Tekproc.c:    screen->Tbox = T_box;
Tekproc.c:    screen->tobaseline[SMALLFONT] = screen->Tfont[SMALLFONT]->ascent;
Tekproc.c:    if (!(screen->Tfont[THREEFONT] = XLoadQueryFont(screen->display,
Tekproc.c:      screen->Tfont[THREEFONT] = screen->Tfont[SMALLFONT];
Tekproc.c:    screen->tobaseline[THREEFONT] = screen->Tfont[THREEFONT]->ascent;
Tekproc.c:    if (!(screen->Tfont[TWOFONT] = XLoadQueryFont(screen->display,
Tekproc.c:      screen->Tfont[TWOFONT] = screen->Tfont[THREEFONT];
Tekproc.c:    screen->tobaseline[TWOFONT] = screen->Tfont[TWOFONT]->ascent;
Tekproc.c:    if (!(screen->Tfont[LARGEFONT] = XLoadQueryFont(screen->display,
Tekproc.c:      screen->Tfont[LARGEFONT] = screen->Tfont[TWOFONT];
Tekproc.c:    screen->tobaseline[LARGEFONT] = screen->Tfont[LARGEFONT]->ascent;
Tekproc.c:    screen->cur.fontsize = LARGEFONT;	/* set large font	*/
Tekproc.c:    gcv.font = screen->Tfont[screen->cur.fontsize]->fid;
Tekproc.c:    gcv.foreground = screen->Tforeground;
Tekproc.c:    gcv.background = screen->Tbackground;
Tekproc.c:    screen->TnormalGC = XCreateGC (screen->display, TWindow(screen), 
Tekproc.c:    gcv.plane_mask = screen->xorplane = (screen->Tbackground ^
Tekproc.c:					 screen->Tcursorcolor);
Tekproc.c:    screen->TcursorGC = XCreateGC (screen->display, TWindow(screen), 
Tekproc.c:    gcv.foreground = screen->Tforeground;
Tekproc.c:	screen->linepat[i] = XCreateGC (screen->display, TWindow(screen),
Tekproc.c:	XSetDashes (screen->display, screen->linepat[i], 0,
Tekproc.c:    screen->margin = MARGIN1;		/* Margin 1		*/
Tekproc.c:    screen->TekGIN = FALSE;			/* GIN off		*/
Tekproc.c:    XDefineCursor(screen->display, TShellWindow, screen->curs);
Tekproc.c:    screen->cur_X = 0;
Tekproc.c:    screen->cur_Y = TEKHOME;
Tekproc.c:	i = screen->Tbackground;
Tekproc.c:	screen->Tbackground = screen->Tforeground;
Tekproc.c:	screen->Tforeground = i;
Tekproc.c:	XSetForeground(screen->display, screen->TnormalGC, 
Tekproc.c:	 screen->Tforeground);
Tekproc.c:	XSetBackground(screen->display, screen->TnormalGC, 
Tekproc.c:	 screen->Tbackground);
Tekproc.c:	    if (tekWidget->core.border_pixel == screen->Tbackground) {
Tekproc.c:		tekWidget->core.border_pixel = screen->Tforeground;
Tekproc.c:		  screen->Tforeground;
Tekproc.c:		  XSetWindowBorder (screen->display,
Tekproc.c:		XSetForeground(screen->display, screen->linepat[i], 
Tekproc.c:		 screen->Tforeground);
Tekproc.c:	if(screen->cellsused) {
Tekproc.c:		screen->Tcursorcolor = screen->Tbackground | screen->xorplane;
Tekproc.c:		i = screen->select ? 2 : !flag;
Tekproc.c:		screen->colorcells[i].pixel = screen->Tcursorcolor;
Tekproc.c:		XStoreColor(screen->display, TekColormap, &screen->colorcells[i]);
Tekproc.c:		screen->colorcells[flag].pixel = screen->Tforeground |
Tekproc.c:		 screen->xorplane;
Tekproc.c:		XStoreColor(screen->display, TekColormap, &screen->colorcells[flag]);
Tekproc.c:		screen->Tcursorcolor = screen->Tforeground;
Tekproc.c:	gcv.plane_mask = screen->xorplane = (screen->Tbackground ^
Tekproc.c:					     screen->Tcursorcolor);
Tekproc.c:	XChangeGC (screen->display, screen->TcursorGC, GCPlaneMask, &gcv);
Tekproc.c:		XSetWindowBackground(screen->display, TWindow(screen), 
Tekproc.c:		 screen->Tbackground);
Tekproc.c:	if (!screen->Tshow) return;
Tekproc.c:	c = screen->cur.fontsize;
Tekproc.c:	x = (screen->cur_X * TekScale(screen)) + screen->border;
Tekproc.c:	y = ((TEKHEIGHT + TEKTOPPAD - screen->cur_Y) * TekScale(screen)) +
Tekproc.c:	 screen->border - screen->tobaseline[c];
Tekproc.c:	   if (screen->select) 
Tekproc.c:		    screen->display, TWindow(screen), screen->TcursorGC,
Tekproc.c:		  screen->Tbox[c]->x = x;
Tekproc.c:		  screen->Tbox[c]->y = y ;
Tekproc.c:		  XDrawLines(screen->display, TWindow(screen), 
Tekproc.c:		    screen->TcursorGC,
Tekproc.c:		    screen->Tbox[c], NBOX, CoordModePrevious);
Tekproc.c:	   if (screen->select) 
Tekproc.c:		XClearArea(screen->display, TWindow(screen), x, y,
Tekproc.c:		  screen->Tbox[c]->x = x;
Tekproc.c:		  screen->Tbox[c]->y = y ;
Tekproc.c:		  XDrawLines(screen->display, TWindow(screen), 
Tekproc.c:		    screen->TcursorGC,
Tekproc.c:		    screen->Tbox[c], NBOX, CoordModePrevious);
Tekproc.c:	  XSetWindowBorder (screen->display, TShellWindow,
Tekproc.c:	  XSetWindowBorderPixmap (screen->display, TShellWindow,
Tekproc.c:				  screen->graybordertile);
Tekproc.c:	chown(buf, screen->uid, screen->gid);
Tekproc.c:	sprintf(buf, "\033%c\033%c", screen->page.fontsize + '8',
Tekproc.c:	 screen->page.linetype + '`');
Tekproc.c:	register int size = screen->cur.fontsize;
Tekproc.c:	curmodes = screen->cur;
Tekproc.c:		if(vshow = screen->Vshow)
Tekproc.c:	if(vshow != screen->Vshow) {
Tekproc.c:		SetItemCheck(*menu, TMENU_VTWIN, (vshow = screen->Vshow));
Tekproc.c:		screen->cur = curmodes;
Tekproc.c:		screen->cur_X = 0;
Tekproc.c:		screen->cur_Y = TEKHOME;
Tekproc.c:		if (!screen->Vshow) {
Tekproc.c:		    if (!screen->TekEmu && TekRefresh) dorefresh ();
button.c:	if (screen->incopy)
button.c:	textfunc[screen->send_mouse_pos][shift][0][button](event);
button.c:			textfunc[screen->send_mouse_pos][shift][1][button]
button.c:	if (screen->incopy)
button.c:	line = XFetchBytes(screen->display,&nbytes);
button.c:	lastValidRow  = screen->max_row;
button.c:	if (screen->cursor_state)
button.c:				v_write(screen->respond, line, 5);
button.c:				v_write(screen->respond, line, 9);
button.c:	lastValidRow  = screen->max_row;
button.c:	row = (y - screen->border) / FontHeight(screen);
button.c:	col = (x - screen->border - screen->scrollbar) / FontWidth(screen);
button.c:	else if(col > screen->max_col+1) {
button.c:		col = screen->max_col+1;
button.c:	for(i = screen->max_col,
button.c:	 ch = screen->buf[2 * (row + screen->topline)] + i ;
button.c:				ptr = screen->buf[2*(startSRow+screen->topline)]
button.c:				ptr = screen->buf[2*(endSRow+screen->topline)]
button.c:	if (trow > screen->max_row+1) {
button.c:		trow = screen->max_row+1;
button.c:		tempgc = screen->normalGC;
button.c:		screen->normalGC = screen->reverseGC;
button.c:		screen->reverseGC = tempgc;
button.c:		tempgc = screen->normalboldGC;
button.c:		screen->normalboldGC = screen->reverseboldGC;
button.c:		screen->reverseboldGC = tempgc;
button.c:		i = screen->foreground;
button.c:		screen->foreground = term->core.background_pixel;
button.c:		XSetWindowBackground(screen->display,VWindow(screen),term->core.background_pixel);
button.c:		if((i = screen->max_col - fcol + 1) > 0) {	/* first row */
button.c:			    screen->display,
button.c:			    (int) frow * FontHeight(screen) + screen->border,
button.c:			j = screen->max_col + 1;
button.c:			    screen->display,
button.c:			    (int) screen->border + screen->scrollbar,
button.c:			    (int) (frow+1)*FontHeight(screen) + screen->border,
button.c:		if(tcol > 0 && trow <= screen->max_row) {	/* last row */
button.c:			    screen->display,
button.c:			    (int) screen->border + screen->scrollbar,
button.c:			    (int) trow * FontHeight(screen) + screen->border,
button.c:		    screen->display,
button.c:		    (int) frow * FontHeight(screen) + screen->border,
button.c:		tempgc = screen->normalGC;
button.c:		screen->normalGC = screen->reverseGC;
button.c:		screen->reverseGC = tempgc;
button.c:		tempgc = screen->normalboldGC;
button.c:		screen->normalboldGC = screen->reverseboldGC;
button.c:		screen->reverseboldGC = tempgc;
button.c:		i = screen->foreground;
button.c:		screen->foreground = term->core.background_pixel;
button.c:		XSetWindowBackground(screen->display,VWindow(screen),term->core.background_pixel);
button.c:   (may have row = screen->max_row+1, col = 0) */
button.c:		j += Length(screen, crow, ccol, screen->max_col) + 1;
button.c:			j += Length(screen, i, 0, screen->max_col) + 1;
button.c:		lp = SaveText(screen, crow, ccol, screen->max_col, lp);
button.c:			lp = SaveText(screen, i, 0, screen->max_col, lp);
button.c:	XStoreBytes(screen->display,line, j);
button.c:	ch = screen->buf[2 * (row + screen->topline)];
button.c:	register char *ch = screen->buf[2 * (row + screen->topline)];
button.c:	int pty = screen->respond;
button.c:	row = (event->y - screen->border) 
button.c:	col = (event->x - screen->border - screen->scrollbar)
button.c:	if (screen->send_mouse_pos == 1) {
button.c:		Gray_Tile = make_gray(BlackPixel(screen->display,
button.c:					         DefaultScreen(screen->display)), 
button.c:		 WhitePixel(screen->display, DefaultScreen(screen->display)), 1);
button.c:		Menu_DefaultCursor = screen->arrow;
button.c:			Menu_DefaultFontInfo = screen->fnt_norm;
button.c:		screen->waitrefresh = TRUE;
button.c:	screen->waitrefresh = FALSE;
button.c:	XSync(screen->display, 0);
button.c:	if (QLength(screen->display) > 0)
button.c:		if(xbell = screen->visualbell)
button.c:		if(xlog = screen->logging)
button.c:		if((screen->inhibit & I_LOG) ||
button.c:		if(screen->inhibit & I_SIGNAL)
button.c:	if (!(L_flag && !checklogin()) && !(screen->inhibit & I_LOG))
button.c:	if (xbell != screen->visualbell)
button.c:		 screen->visualbell));
button.c:	if (xlog != screen->logging)
button.c:		SetItemCheck(*menu, XMENU_LOG, (xlog = screen->logging));
button.c:		screen->visualbell = !screen->visualbell;
button.c:		if(screen->logging)
button.c:		if(screen->pid > 1)
button.c:			killpg(getpgrp(screen->pid), SIGCONT);
button.c:		if(screen->pid > 1)
button.c:			killpg(getpgrp(screen->pid), SIGTSTP);
button.c:		if(screen->pid > 1)
button.c:			killpg(getpgrp(screen->pid), SIGINT);
button.c:		if(screen->pid > 1)
button.c:			killpg(getpgrp(screen->pid), SIGHUP);
button.c:		if(screen->pid > 1)
button.c:			killpg(getpgrp(screen->pid), SIGTERM);
button.c:		if(screen->pid > 1)
button.c:			killpg(getpgrp(screen->pid), SIGKILL);
button.c:			XDefineCursor(screen->display, (*menu)->menuWindow, 
button.c:	if(screen->TekGIN) {
charproc.c:			if(screen->display->qlen > 0 ||
charproc.c:			 (ioctl(screen->display->fd, FIONREAD, (char *) &arg), arg) > 0)
charproc.c:			screen->cur_col = TabNext(term->tabs, screen->cur_col);
charproc.c:			if (screen->cur_col > screen->max_col)
charproc.c:				screen->cur_col = screen->max_col;
charproc.c:			screen->curgl = 0;
charproc.c:			screen->curgl = 1;
charproc.c:				unparseseq(&reply, screen->respond);
charproc.c:				TabClear(term->tabs, screen->cur_col);
charproc.c:				unparseseq(&reply, screen->respond);
charproc.c:				reply.a_param[0] = screen->cur_row+1;
charproc.c:				reply.a_param[1] = screen->cur_col+1;
charproc.c:				unparseseq(&reply, screen->respond);
charproc.c:			   || bot > screen->max_row + 1
charproc.c:				bot = screen->max_row+1;
charproc.c:				if(screen->scroll_amt)
charproc.c:				screen->top_marg = top-1;
charproc.c:				screen->bot_marg = bot-1;
charproc.c:				unparseseq(&reply, screen->respond);
charproc.c:			if(screen->TekEmu)
charproc.c:			if(screen->cursor_state)
charproc.c:			for(row = screen->max_row ; row >= 0 ; row--) {
charproc.c:				bzero(screen->buf[2 * row + 1],
charproc.c:				 col = screen->max_col + 1);
charproc.c:				for(cp = screen->buf[2 * row] ; col > 0 ; col--)
charproc.c:			ScrnRefresh(screen, 0, 0, screen->max_row + 1,
charproc.c:			 screen->max_col + 1);
charproc.c:			screen->gsets[scstype] = c;
charproc.c:			CursorSave(term, &screen->sc);
charproc.c:			CursorRestore(term, &screen->sc);
charproc.c:			if(screen->display->qlen > 0 ||
charproc.c:			 (ioctl(screen->display->fd, FIONREAD, (char *)&arg), arg) > 0)
charproc.c:			if(screen->display->qlen > 0 ||
charproc.c:			 (ioctl(screen->display->fd, FIONREAD, (char *)&arg), arg) > 0)
charproc.c:			TabSet(term->tabs, screen->cur_col);
charproc.c:			screen->curss = 2;
charproc.c:			screen->curss = 3;
charproc.c:			screen->curgl = 2;
charproc.c:			screen->curgl = 3;
charproc.c:			screen->curgr = 3;
charproc.c:			screen->curgr = 2;
charproc.c:			screen->curgr = 1;
charproc.c:			if(screen->curss) {
charproc.c:				 screen->gsets[screen->curss], bptr, bptr + 1);
charproc.c:				screen->curss = 0;
charproc.c:				 screen->gsets[screen->curgl], bptr, cp);
charproc.c:			if(screen->logging)
charproc.c:			if((bcnt = read(screen->respond, bptr = buffer,
charproc.c:				if(screen->scrollWidget && screen->scrollinput &&
charproc.c:				 screen->topline < 0)
charproc.c:		if(screen->scroll_amt)
charproc.c:		if(screen->cursor_set && (screen->cursor_col != screen->cur_col
charproc.c:		 || screen->cursor_row != screen->cur_row)) {
charproc.c:			if(screen->cursor_state)
charproc.c:		} else if(screen->cursor_set != screen->cursor_state) {
charproc.c:			if(screen->cursor_set)
charproc.c:		} else if (QLength(screen->display))
charproc.c:			XFlush(screen->display);
charproc.c:			v_write(screen->respond, 0, 0);	/* flush buffer */
charproc.c:		n = screen->max_col-screen->cur_col+1;
charproc.c:			if (screen->do_wrap && (flags&WRAPAROUND)) {
charproc.c:				screen->cur_col = 0;
charproc.c:				screen->do_wrap = 0;
charproc.c:				n = screen->max_col+1;
charproc.c:		next_col = screen->cur_col + n;
charproc.c:		 * the call to WriteText updates screen->cur_col.
charproc.c:		 * If screen->cur_col != next_col, we must have
charproc.c:		screen->do_wrap = (screen->cur_col < next_col);
charproc.c:   if(screen->cur_row - screen->topline <= screen->max_row) {
charproc.c:	if(screen->cur_row == screen->cursor_row && screen->cur_col <=
charproc.c:	 screen->cursor_col && screen->cursor_col <= screen->cur_col + len - 1)
charproc.c:		screen->cursor_state = OFF;
charproc.c:	if(screen->cursor_state)
charproc.c:			currentGC = screen->reverseboldGC;
charproc.c:		else	currentGC = screen->normalboldGC;
charproc.c:			currentGC = screen->reverseGC;
charproc.c:		else	currentGC = screen->normalGC;
charproc.c:		if(screen->scroll_amt)
charproc.c:	cx = CursorX(screen, screen->cur_col);
charproc.c:	cy = CursorY(screen, screen->cur_row)+screen->fnt_norm->max_bounds.ascent;
charproc.c: 	XDrawImageString(screen->display, TextWindow(screen), currentGC,
charproc.c:	if((fgs & BOLD) && screen->enbolden) 
charproc.c:		if (currentGC == screen->normalGC || screen->reverseGC)
charproc.c:			XDrawString(screen->display, TextWindow(screen),
charproc.c:		XDrawLine(screen->display, TextWindow(screen), currentGC,
charproc.c:			if(screen->c132) {
charproc.c:				 j != screen->max_col + 1) {
charproc.c:					        + 2*screen->border
charproc.c:						+ screen->scrollbar,
charproc.c:						* (screen->max_row + 1)
charproc.c:						+ 2 * screen->border,
charproc.c:					XSync(screen->display, FALSE);
charproc.c:					if(QLength(screen->display) > 0)
charproc.c:				screen->jumpscroll = 0;
charproc.c:				if (screen->scroll_amt)
charproc.c:				screen->jumpscroll = 1;
charproc.c:					XAutoRepeatOn(screen->display);
charproc.c:					XAutoRepeatOff(screen->display);
charproc.c:				screen->send_mouse_pos = 1;
charproc.c:				screen->send_mouse_pos = 0;
charproc.c:			if(func == bitset & !(screen->inhibit & I_TEK)) {
charproc.c:				if(screen->logging) {
charproc.c:					screen->logstart = Tbuffer;
charproc.c:				screen->TekEmu = TRUE;
charproc.c:			(*func)(&screen->c132, 1);
charproc.c:			(*func)(&screen->curses, 1);
charproc.c:			(*func)(&screen->marginbell, 1);
charproc.c:			if(!screen->marginbell)
charproc.c:				screen->bellarmed = -1;
charproc.c:				screen->send_mouse_pos = 2;
charproc.c:				screen->send_mouse_pos = 0;
charproc.c:				screen->send_mouse_pos = 3;
charproc.c:				screen->send_mouse_pos = 0;
charproc.c:			screen->save_modes[0] = term->keyboard.flags &
charproc.c:			if(screen->c132)
charproc.c:				screen->save_modes[1] = term->flags &
charproc.c:			screen->save_modes[2] = term->flags & SMOOTHSCROLL;
charproc.c:			screen->save_modes[3] = term->flags & REVERSE_VIDEO;
charproc.c:			screen->save_modes[4] = term->flags & ORIGIN;
charproc.c:			screen->save_modes[5] = term->flags & WRAPAROUND;
charproc.c:			screen->save_modes[6] = term->flags & AUTOREPEAT;
charproc.c:			screen->save_modes[7] = screen->send_mouse_pos;
charproc.c:			screen->save_modes[8] = screen->c132;
charproc.c:			screen->save_modes[9] = screen->curses;
charproc.c:			screen->save_modes[12] = screen->marginbell;
charproc.c:			screen->save_modes[13] = term->flags & REVERSEWRAP;
charproc.c:			screen->save_modes[14] = screen->logging;
charproc.c:			screen->save_modes[15] = screen->alternate;
charproc.c:			screen->save_modes[7] = screen->send_mouse_pos;
charproc.c:			term->keyboard.flags |= screen->save_modes[0] &
charproc.c:			if(screen->c132) {
charproc.c:				if((j = (screen->save_modes[1] & IN132COLUMNS)
charproc.c:				 ? 132 : 80) || j != screen->max_col + 1) {
charproc.c:						+ 2*screen->border
charproc.c:						+ screen->scrollbar,
charproc.c:						* (screen->max_row + 1)
charproc.c:						+ 2*screen->border,
charproc.c:					XSync(screen->display, FALSE);	/* synchronize */
charproc.c:					if(QLength(screen->display) > 0)
charproc.c:				term->flags |= screen->save_modes[1] &
charproc.c:			if (screen->save_modes[2] & SMOOTHSCROLL) {
charproc.c:				screen->jumpscroll = 0;
charproc.c:				if (screen->scroll_amt)
charproc.c:				screen->jumpscroll = 1;
charproc.c:			term->flags |= screen->save_modes[2] & SMOOTHSCROLL;
charproc.c:			if((screen->save_modes[3] ^ term->flags) &
charproc.c:				term->flags |= screen->save_modes[3] &
charproc.c:			term->flags |= screen->save_modes[4] & ORIGIN;
charproc.c:			term->flags |= screen->save_modes[5] & WRAPAROUND;
charproc.c:			if((screen->save_modes[6] ^ term->flags) & AUTOREPEAT) {
charproc.c:				term->flags |= screen->save_modes[6] &
charproc.c:					XAutoRepeatOn(screen->display);
charproc.c:					XAutoRepeatOff(screen->display);
charproc.c:			screen->send_mouse_pos = screen->save_modes[7];
charproc.c:			screen->c132 = screen->save_modes[8];
charproc.c:			screen->curses = screen->save_modes[9];
charproc.c:			if(!(screen->marginbell = screen->save_modes[12]))
charproc.c:				screen->bellarmed = -1;
charproc.c:			term->flags |= screen->save_modes[13] & REVERSEWRAP;
charproc.c:			if(screen->save_modes[14])
charproc.c:			if(screen->save_modes[15])
charproc.c:			screen->send_mouse_pos = screen->save_modes[7];
charproc.c:	if(screen->alternate)
charproc.c:	if(!screen->altbuf)
charproc.c:		screen->altbuf = Allocate(screen->max_row + 1, screen->max_col
charproc.c:	screen->alternate = TRUE;
charproc.c:	if(!screen->alternate)
charproc.c:	screen->alternate = FALSE;
charproc.c:	if(screen->cursor_state)
charproc.c:	rows = screen->max_row + 1;
charproc.c:	bcopy((char *)screen->buf, (char *)save, 2 * sizeof(char *) * rows);
charproc.c:	bcopy((char *)screen->altbuf, (char *)screen->buf, 2 * sizeof(char *) *
charproc.c:	bcopy((char *)save, (char *)screen->altbuf, 2 * sizeof(char *) * rows);
charproc.c:	if((top = -screen->topline) <= screen->max_row) {
charproc.c:		if(screen->scroll_amt)
charproc.c:			XClearWindow(screen->display, TextWindow(screen));
charproc.c:			    screen->display,
charproc.c:			    (int) screen->border + screen->scrollbar,
charproc.c:			    (int) top * FontHeight(screen) + screen->border,
charproc.c:			    (unsigned) (screen->max_row - top + 1)
charproc.c:	ScrnRefresh(screen, 0, 0, rows, screen->max_col + 1);
charproc.c:	if (!screen->Vshow) {
charproc.c:	if (screen->allbuf == NULL) VTallocbuf ();
charproc.c:	screen->cursor_state = OFF;
charproc.c:	screen->cursor_set = ON;
charproc.c:	if(screen->select)
charproc.c:		XWarpPointer (screen->display, None, VWindow(screen),
charproc.c:	screen->cursor_set = OFF;
charproc.c:	if (screen->incopy <= 0) {
charproc.c:		screen->incopy = 1;
charproc.c:		if (screen->scrolls > 0)
charproc.c:			screen->scrolls--;
charproc.c:		screen->cursor_state = OFF;
charproc.c:		if (screen->incopy <= 0 && screen->scrolls > 0)
charproc.c:			screen->scrolls--;
charproc.c:		if (screen->scrolls)
charproc.c:			screen->incopy = -1;
charproc.c:			screen->incopy = 0;
charproc.c:    if (screen->allbuf == NULL) VTallocbuf ();
charproc.c:    int nrows = screen->max_row + 1;
charproc.c:    if (screen->scrollWidget)
charproc.c:      nrows += screen->savelines;
charproc.c:    screen->allbuf = (ScrnBuf) Allocate (nrows, screen->max_col + 1);
charproc.c:    if (screen->scrollWidget)
charproc.c:      screen->buf = &screen->allbuf[2 * screen->savelines];
charproc.c:      screen->buf = screen->allbuf;
charproc.c:   new->screen.display = new->core.screen->display;
charproc.c:	screen->fnt_norm = screen->fnt_bold = NULL;
charproc.c:	if ((screen->fnt_norm = XLoadQueryFont(screen->display, term->misc.f_n)) == NULL) {
charproc.c:	    screen->fnt_norm =
charproc.c:		  XQueryFont(screen->display,
charproc.c:			     DefaultGC(screen->display,
charproc.c:				       DefaultScreen(screen->display)
charproc.c:	    || !(screen->fnt_bold = XLoadQueryFont(screen->display, term->misc.f_b))) {
charproc.c:		screen->fnt_bold = screen->fnt_norm;
charproc.c:		screen->enbolden = TRUE;  /*no bold font */
charproc.c:	screen->fullVwin.f_width = screen->fnt_norm->max_bounds.width;
charproc.c:	screen->fullVwin.f_height = screen->fnt_norm->max_bounds.ascent +
charproc.c:				    screen->fnt_norm->max_bounds.descent;
charproc.c:	    if (screen->mousecolor == term->core.background_pixel) {
charproc.c:		fg = screen->foreground;
charproc.c:		fg = screen->mousecolor;
charproc.c:		screen->curs = make_arrow (fg, bg);
charproc.c:		screen->curs = make_xterm (fg, bg);
charproc.c:	i = 2 * screen->border + screen->scrollbar;
charproc.c:	j = 2 * screen->border;
charproc.c:	screen->max_col = width;
charproc.c:	screen->max_row = height;
charproc.c:	width = width * screen->fullVwin.f_width + i;
charproc.c:	height = height * screen->fullVwin.f_height + j;
charproc.c:	  xpos += DisplayWidth(screen->display, DefaultScreen(screen->display)) 
charproc.c:	  ypos += DisplayHeight(screen->display, DefaultScreen(screen->display)) 
charproc.c:	sizehints.min_width = 2 * screen->border + screen->scrollbar;
charproc.c:	sizehints.min_height = 2 * screen->border;
charproc.c:        screen->fullVwin.fullwidth = width;
charproc.c:        screen->fullVwin.fullheight = height;
charproc.c:        screen->fullVwin.width = width - i;
charproc.c:        screen->fullVwin.height = height - j;
charproc.c:	xgcv.font = screen->fnt_norm->fid;
charproc.c:	xgcv.foreground = screen->foreground;
charproc.c:	screen->normalGC = XtGetGC((Widget)term, mask, &xgcv);
charproc.c:	if (screen->enbolden) { /* there is no bold font */
charproc.c:		xgcv.font = screen->fnt_norm->fid;
charproc.c:		screen->normalboldGC = screen->normalGC;
charproc.c:		xgcv.font = screen->fnt_bold->fid;
charproc.c:		screen->normalboldGC = XtGetGC((Widget)term, mask, &xgcv);
charproc.c:	xgcv.font = screen->fnt_norm->fid;
charproc.c:	xgcv.background = screen->foreground;
charproc.c:	screen->reverseGC = XtGetGC((Widget)term, mask, &xgcv);
charproc.c:	if (screen->enbolden) /* there is no bold font */
charproc.c:		xgcv.font = screen->fnt_norm->fid;
charproc.c:		xgcv.font = screen->fnt_bold->fid;
charproc.c:	screen->reverseboldGC = XtGetGC((Widget)term, mask, &xgcv);
charproc.c:	xgcv.font = screen->fnt_norm->fid;
charproc.c:	    unsigned long cc = screen->cursorcolor;
charproc.c:	    unsigned long fg = screen->foreground;
charproc.c:		screen->cursorGC = XtGetGC ((Widget) term, mask, &xgcv);
charproc.c:		screen->reversecursorGC = XtGetGC ((Widget) term, mask, &xgcv);
charproc.c:		screen->cursorGC = (GC) 0;
charproc.c:		screen->reversecursorGC = (GC) 0;
charproc.c:	screen->gsets[0] = 'B';			/* ASCII_G		*/
charproc.c:	screen->gsets[1] = 'B';
charproc.c:	screen->gsets[2] = 'B';			/* DEC supplemental.	*/
charproc.c:	screen->gsets[3] = 'B';
charproc.c:	screen->curgl = 0;			/* G0 => GL.		*/
charproc.c:	screen->curgr = 2;			/* G2 => GR.		*/
charproc.c:	screen->curss = 0;			/* No single shift.	*/
charproc.c:	XDefineCursor(screen->display, VShellWindow, screen->curs );
charproc.c:        screen->cur_col = screen->cur_row = 0;
charproc.c:	screen->max_col = Width(screen)  / screen->fullVwin.f_width - 1;
charproc.c:	screen->top_marg = 0;
charproc.c:	screen->bot_marg = screen->max_row = Height(screen) /
charproc.c:				screen->fullVwin.f_height - 1;
charproc.c:	screen->sc.row = screen->sc.col = screen->sc.flags = NULL;
charproc.c:	  screen->buf = screen->allbuf = NULL;
charproc.c:	screen->do_wrap = NULL;
charproc.c:	screen->scrolls = screen->incopy = 0;
charproc.c:	screen->box = VTbox;
charproc.c:	screen->savedlines = 0;
charproc.c:	if(screen->scrollbar) {
charproc.c:		screen->scrollbar = 0;
charproc.c:	CursorSave (term, &screen->sc);
charproc.c:	if (screen->cur_row - screen->topline > screen->max_row)
charproc.c:	c = screen->buf[y = 2 * (screen->cursor_row = screen->cur_row)]
charproc.c:	 [x = screen->cursor_col = screen->cur_col];
charproc.c:	flags = screen->buf[y + 1][x];
charproc.c:	if(screen->select) {
charproc.c:		    if (screen->cursorGC) {
charproc.c:			currentGC = screen->cursorGC;
charproc.c:				currentGC = screen->normalboldGC;
charproc.c:				currentGC = screen->normalGC;
charproc.c:		    if (screen->reversecursorGC) {
charproc.c:			currentGC = screen->reversecursorGC;
charproc.c:				currentGC = screen->reverseboldGC;
charproc.c:				currentGC = screen->reverseGC;
charproc.c:			currentGC = screen->reverseGC;
charproc.c:			currentGC = screen->normalGC;
charproc.c:	x = CursorX (screen, screen->cur_col);
charproc.c:	y = CursorY(screen, screen->cur_row) + 
charproc.c:	  screen->fnt_norm->max_bounds.ascent;
charproc.c:	XDrawImageString(screen->display, TextWindow(screen), currentGC,
charproc.c:	if((flags & BOLD) && screen->enbolden) /* no bold font */
charproc.c:		XDrawString(screen->display, TextWindow(screen), currentGC,
charproc.c:		XDrawLine(screen->display, TextWindow(screen), currentGC,
charproc.c:	if (!screen->select) {
charproc.c:		screen->box->x = x + screen->fnt_norm->max_bounds.lbearing;
charproc.c:		screen->box->y = y - screen->fnt_norm->max_bounds.ascent;
charproc.c:		XDrawLines(screen->display, TextWindow(screen), currentGC,
charproc.c:			screen->box, NBOX, CoordModePrevious);
charproc.c:	screen->cursor_state = ON;
charproc.c:	if(screen->cursor_row - screen->topline > screen->max_row)
charproc.c:	c = screen->buf[y = 2 * screen->cursor_row][x = screen->cursor_col];
charproc.c:	flags = screen->buf[y + 1][x];
charproc.c:			currentGC = screen->reverseboldGC;
charproc.c:			currentGC = screen->reverseGC;
charproc.c:			currentGC = screen->normalboldGC;
charproc.c:			currentGC = screen->normalGC;
charproc.c:	x = CursorX (screen, screen->cursor_col);
charproc.c:	y = (((screen->cursor_row - screen->topline) * FontHeight(screen))) +
charproc.c:	 screen->border;
charproc.c:	y = y+screen->fnt_norm->max_bounds.ascent;
charproc.c:	XDrawImageString(screen->display, TextWindow(screen), currentGC,
charproc.c:	if((flags & BOLD) && screen->enbolden)
charproc.c:		XDrawString(screen->display, TextWindow(screen), currentGC,
charproc.c:		XDrawLine(screen->display, TextWindow(screen), currentGC,
charproc.c:	screen->cursor_state = OFF;
charproc.c:	  XSetWindowBorder (screen->display, VShellWindow,
charproc.c:	  XSetWindowBorderPixmap (screen->display, VShellWindow,
charproc.c:				  screen->graybordertile);
charproc.c:	screen->top_marg = 0;
charproc.c:	screen->bot_marg = screen->max_row;
charproc.c:		screen->gsets[0] = 'B';
charproc.c:		screen->gsets[1] = 'B';
charproc.c:		screen->gsets[2] = 'B';
charproc.c:		screen->gsets[3] = 'B';
charproc.c:		screen->curgl = 0;
charproc.c:		screen->curgr = 2;
charproc.c:		screen->curss = 0;
charproc.c:		screen->cursor_state = OFF;
charproc.c:			XAutoRepeatOn(screen->display);
charproc.c:		if(screen->c132 && (term->flags & IN132COLUMNS)) {
charproc.c:				+ 2 * screen->border + screen->scrollbar,
charproc.c:			        * (screen->max_row + 1) + 2 * screen->border,
charproc.c:			XSync(screen->display, FALSE);	/* synchronize */
charproc.c:			if(QLength(screen->display) > 0)
charproc.c:		if(tscrollbar = (screen->scrollbar > 0)) {
charproc.c:			if(tscrollkey = screen->scrollkey)
charproc.c:			if(tscrollinput = screen->scrollinput)
charproc.c:		if(t132 = screen->c132)
charproc.c:		if(tcurses = screen->curses)
charproc.c:		if(tmarginbell = screen->marginbell)
charproc.c:		if(tshow = screen->Tshow)
charproc.c:		if(taltern = screen->alternate) {
charproc.c:		if(screen->inhibit & I_TEK) {
charproc.c:	if(tscrollbar != (screen->scrollbar > 0)) {
charproc.c:		 (screen->scrollbar > 0)));
charproc.c:		 tscrollkey = (tscrollbar && screen->scrollkey));
charproc.c:		 tscrollinput = (tscrollbar && screen->scrollinput));
charproc.c:		if (tscrollkey != screen->scrollkey)
charproc.c:			 tscrollkey = screen->scrollkey);
charproc.c:		if (tscrollinput != screen->scrollinput)
charproc.c:			 tscrollinput = screen->scrollinput);
charproc.c:	if(t132 != screen->c132)
charproc.c:		SetItemCheck(*menu, MMENU_C132, (t132 = screen->c132));
charproc.c:	if(tcurses != screen->curses)
charproc.c:		SetItemCheck(*menu, MMENU_CURSES, (tcurses = screen->curses));
charproc.c:	if(tmarginbell != screen->marginbell)
charproc.c:		screen->marginbell));
charproc.c:	if(tshow != screen->Tshow) {
charproc.c:		SetItemCheck(*menu, MMENU_TEKWIN, (tshow = screen->Tshow));
charproc.c:	if(taltern != screen->alternate) {
charproc.c:		 screen->alternate));
charproc.c:			screen->jumpscroll = FALSE;
charproc.c:			if (screen->scroll_amt)
charproc.c:			screen->jumpscroll = TRUE;
charproc.c:			XAutoRepeatOn(screen->display);
charproc.c:			XAutoRepeatOff(screen->display);
charproc.c:		if(screen->scrollbar)
charproc.c:		screen->scrollkey = !screen->scrollkey;
charproc.c:		screen->scrollinput = !screen->scrollinput;
charproc.c:		screen->c132 = !screen->c132;
charproc.c:		if(!(screen->marginbell = !screen->marginbell))
charproc.c:			screen->bellarmed = -1;
charproc.c:		screen->curses = !screen->curses;
charproc.c:		if (!screen->Tshow) {
cursor.c:	screen->cur_col = (col <= screen->max_col ? col : screen->max_col);
cursor.c:	maxr = screen->max_row;
cursor.c:		row += screen->top_marg;
cursor.c:		maxr = screen->bot_marg;
cursor.c:	screen->cur_row = (row <= maxr ? row : maxr);
cursor.c:	screen->do_wrap = 0;
cursor.c:	 (REVERSEWRAP | WRAPAROUND)) && screen->do_wrap)
cursor.c:	if ((screen->cur_col -= n) < 0) {
cursor.c:			if((i = (j = screen->max_col + 1) * screen->cur_row +
cursor.c:			 screen->cur_col) < 0) {
cursor.c:				k = j * (screen->max_row + 1);
cursor.c:			screen->cur_row = i / j;
cursor.c:			screen->cur_col = i % j;
cursor.c:			screen->cur_col = 0;
cursor.c:	screen->do_wrap = 0;
cursor.c:	screen->cur_col += n;
cursor.c:	if (screen->cur_col > screen->max_col)
cursor.c:		screen->cur_col = screen->max_col;
cursor.c:	screen->do_wrap = 0;
cursor.c:	max = (screen->cur_row > screen->bot_marg ?
cursor.c:		screen->max_row : screen->bot_marg);
cursor.c:	screen->cur_row += n;
cursor.c:	if (screen->cur_row > max)
cursor.c:		screen->cur_row = max;
cursor.c:	screen->do_wrap = 0;
cursor.c:	min = (screen->cur_row < screen->top_marg ?
cursor.c:		0 : screen->top_marg);
cursor.c:	screen->cur_row -= n;
cursor.c:	if (screen->cur_row < min)
cursor.c:		screen->cur_row = min;
cursor.c:	screen->do_wrap = 0;
cursor.c:	if (screen->cur_row > screen->bot_marg
cursor.c:	 || screen->cur_row + amount <= screen->bot_marg) {
cursor.c:	CursorDown(screen, j = screen->bot_marg - screen->cur_row);
cursor.c:	if (screen->cur_row < screen->top_marg
cursor.c:	 || screen->cur_row-amount >= screen->top_marg) {
cursor.c:	RevScroll(screen, amount - (screen->cur_row - screen->top_marg));
cursor.c:	CursorUp(screen, screen->cur_row - screen->top_marg);
cursor.c:	screen->cur_col = 0;
cursor.c:	screen->do_wrap = 0;
cursor.c:	sc->row = screen->cur_row;
cursor.c:	sc->col = screen->cur_col;
cursor.c:	sc->curgl = screen->curgl;
cursor.c:	sc->curgr = screen->curgr;
cursor.c:	bcopy(screen->gsets, sc->gsets, sizeof(screen->gsets));
cursor.c:	bcopy(sc->gsets, screen->gsets, sizeof(screen->gsets));
cursor.c:	screen->curgl = sc->curgl;
cursor.c:	screen->curgr = sc->curgr;
input.c:	int	pty	= screen->respond;
input.c:		if(screen->TekGIN) {
input.c:	if(key && !screen->TekEmu) {
input.c:		if(screen->scrollkey && screen->topline != 0)
input.c:		if(screen->marginbell) {
input.c:			col = screen->max_col - screen->nmarginbell;
input.c:			if(screen->bellarmed >= 0) {
input.c:				if(screen->bellarmed == screen->cur_row) {
input.c:					if(screen->cur_col >= col) {
input.c:						if(screen->cur_col == col)
input.c:						screen->bellarmed = -1;
input.c:					screen->bellarmed = screen->cur_col <
input.c:					 col ? screen->cur_row : -1;
input.c:			} else if(screen->cur_col < col)
input.c:				screen->bellarmed = screen->cur_row;
main.c:	if (!screen->jumpscroll)	term->flags |= SMOOTHSCROLL;
main.c:	if (term->misc.scrollbar)			screen->scrollbar = SCROLLBARWIDTH;
main.c:		screen->TekEmu = FALSE;
main.c:	if(screen->TekEmu && !TekInit())
main.c:	Xsocket = screen->display->fd;
main.c:	pty = screen->respond;
main.c:	    write(pty, screen->TekEmu ? (char *)&TWindow(screen) :
main.c:	screen->inhibit = inhibit;
main.c:		if(screen->TekEmu) {
main.c:	screen->graybordertile = make_gray(term->core.border_pixel,
main.c:		DefaultDepth(screen->display, DefaultScreen(screen->display)));
main.c:	    fg = screen->mousecolor;
main.c:	    bg = (screen->mousecolor == term->core.background_pixel) ?
main.c:		screen->foreground : term->core.background_pixel;
main.c:	    screen->arrow = make_arrow (fg, bg);
main.c:	XAutoRepeatOn(screen->display);
main.c:	int Xsocket = screen->display->fd;
main.c:	screen->uid = getuid();
main.c:	screen->gid = getgid();
main.c:		screen->respond = loginpty;
main.c:		screen->respond = am_slave;
main.c:		setgid (screen->gid);
main.c:		setuid (screen->uid);
main.c:		get_pty (&screen->respond, &tty);
main.c:		if (screen->respond != Xsocket + 1) {
main.c:			dup2 (screen->respond, Xsocket + 1);
main.c:			close (screen->respond);
main.c:			screen->respond = Xsocket + 1;
main.c:		chown (ttydev, screen->uid, screen->gid);
main.c:		if(pw = getpwuid(screen->uid)) {
main.c:		if((pw = getpwuid(screen->uid)) &&
main.c:				      XDisplayString (screen->display));
main.c:        XtRealizeWidget (screen->TekEmu ? tekWidget->core.parent :
main.c:	if(screen->TekEmu) {
main.c:			if(!screen->TekEmu)
main.c:	if(screen->TekEmu) {
main.c:		ts.ts_lines = screen->max_row + 1;
main.c:		ts.ts_cols = screen->max_col + 1;
main.c:	ioctl  (screen->respond, TIOCSSIZE, &ts);
main.c:	if(screen->TekEmu) {
main.c:		ws.ws_row = screen->max_row + 1;
main.c:		ws.ws_col = screen->max_col + 1;
main.c:	ioctl (screen->respond, TIOCSWINSZ, (char *)&ws);
main.c:	    if ((screen->pid = fork ()) == -1)
main.c:	    if (screen->pid == 0) {
main.c:		close (screen->respond);
main.c:		sprintf (numbuf, "%d", screen->max_col + 1);
main.c:		sprintf (numbuf, "%d", screen->max_row + 1);
main.c:		sprintf(buf, "%d", screen->TekEmu ? (int)TWindow(screen) :
main.c:		Setenv ("DISPLAY=", XDisplayString (screen->display));
main.c:		setgid (screen->gid);
main.c:		setuid (screen->uid);
main.c:		 ((pw == NULL && (pw = getpwuid(screen->uid)) == NULL) ||
main.c:		 ((pw = getpwuid(screen->uid)) == NULL ||
main.c:	if(screen->logging)
main.c:	sprintf (newtc, "%d", li_first ? screen->max_row + 1 :
main.c:	 screen->max_col + 1);
main.c:	sprintf (newtc, "%d", li_first ? screen->max_col + 1 :
main.c:	 screen->max_row + 1);
misc.c:	if(screen->scroll_amt)
misc.c:	XPending (screen->display);
misc.c:		XNextEvent (screen->display, &event);
misc.c:	} while (QLength(screen->display) > 0);
misc.c:	register Display *dpy = screen->display;
misc.c:    if (w == (screen->TekEmu ? (Widget)tekWidget : (Widget)term))
misc.c:    if (w == XtParent(screen->TekEmu ? (Widget)tekWidget : (Widget)term)) 
misc.c:	  !(screen->select & FOCUS))
misc.c:    if (w == XtParent(screen->TekEmu ? (Widget)tekWidget : (Widget)term)) 
misc.c:	  !(screen->select & FOCUS))
misc.c:	if(screen->TekEmu) {
misc.c:		screen->select |= flag;
misc.c:		if(screen->cellsused) {
misc.c:			screen->colorcells[2].pixel =
misc.c:			 screen->Tcursorcolor;
misc.c:			XStoreColor(screen->display, 
misc.c:			 DefaultColormap(screen->display,
misc.c:				DefaultScreen(screen->display)),
misc.c:			 &screen->colorcells[2]);
misc.c:		if(screen->cursor_state &&
misc.c:		   (screen->cursor_col != screen->cur_col ||
misc.c:		    screen->cursor_row != screen->cur_row))
misc.c:		screen->select |= flag;
misc.c:		if(screen->cursor_state)
misc.c:    if(screen->TekEmu) {
misc.c:	screen->select &= ~flag;
misc.c:			if(screen->cellsused) {
misc.c:				screen->colorcells[i].pixel =
misc.c:				 screen->Tcursorcolor;
misc.c:				XStoreColor(screen->display, 
misc.c:			         DefaultColormap(screen->display,
misc.c:					       DefaultScreen(screen->display)),
misc.c:				 &screen->colorcells[i]);
misc.c:	screen->select &= ~flag;
misc.c:	if(screen->cursor_state &&
misc.c:	   (screen->cursor_col != screen->cur_col ||
misc.c:	    screen->cursor_row != screen->cur_row))
misc.c:	if(screen->cursor_state)
misc.c:	    screen->display, 
misc.c:	    DefaultRootWindow(screen->display), 
misc.c:        pix = (Pixmap)XCreatePixmap(screen->display, 
misc.c:	  DefaultRootWindow(screen->display), width, height, depth);
misc.c:	gc = XCreateGC(screen->display, (Drawable) pix, 
misc.c:        XPutImage(screen->display, pix, gc, &tileimage, 0, 0, 0, 0, width, height);
misc.c:        XFreeGC (screen->display, gc);
misc.c:	register Display *dpy = screen->display;
misc.c:	    screen->display, 
misc.c:	    DefaultRootWindow(screen->display), 
misc.c:		if(!XFetchName(screen->display, *cp, &wname) || wname == NULL)
misc.c:	register Pixel xorPixel = screen->foreground ^ term->core.background_pixel;
misc.c:	if(screen->visualbell) {
misc.c:		if(screen->TekEmu) {
misc.c:			    screen->display,
misc.c:			XFlush(screen->display);
misc.c:			    screen->display,
misc.c:			    screen->display,
misc.c:			XFlush(screen->display);
misc.c:			    screen->display,
misc.c:		XBell(screen->display, 0);
misc.c:	event.display = screen->display;
misc.c:		if(screen->scrollbar) 
misc.c:			(*screen->scrollWidget->core.widget_class->core_class.expose)(screen->scrollWidget, &event, NULL);
misc.c:	if(TWindow(screen) && screen->Tshow) {
misc.c:		XWindowEvent(screen->display, win, mask, rep);
misc.c:	if(screen->logging || (screen->inhibit & I_LOG))
misc.c:	if(screen->logfile == NULL || *screen->logfile == 0) {
misc.c:		if(screen->logfile)
misc.c:			free(screen->logfile);
misc.c:		if((screen->logfile = malloc((unsigned)strlen(log_default) + 1)) == NULL)
misc.c:		strcpy(screen->logfile, log_default);
misc.c:	if(*screen->logfile == '|') {	/* exec command */
misc.c:			close(screen->display->fd);
misc.c:			close(screen->respond);
misc.c:				 && ((pw = getpwuid(screen->uid)) == NULL ||
misc.c:			setgid(screen->gid);
misc.c:			setuid(screen->uid);
misc.c:			execl(shell, shell, "-c", &screen->logfile[1], 0);
misc.c:			 &screen->logfile[1]);
misc.c:		screen->logfd = p[1];
misc.c:		if(access(screen->logfile, F_OK) == 0) {
misc.c:			if(access(screen->logfile, W_OK) < 0)
misc.c:		} else if(cp = rindex(screen->logfile, '/')) {
misc.c:			i = access(screen->logfile, W_OK);
misc.c:		if((screen->logfd = open(screen->logfile, O_WRONLY | O_APPEND |
misc.c:		chown(screen->logfile, screen->uid, screen->gid);
misc.c:	screen->logstart = screen->TekEmu ? Tbptr : bptr;
misc.c:	screen->logging = TRUE;
misc.c:	if(!screen->logging || (screen->inhibit & I_LOG))
misc.c:	close(screen->logfd);
misc.c:	screen->logging = FALSE;
misc.c:	cp = screen->TekEmu ? Tbptr : bptr;
misc.c:	if((i = cp - screen->logstart) > 0)
misc.c:		write(screen->logfd, screen->logstart, i);
misc.c:	screen->logstart = screen->TekEmu ? Tbuffer : buffer;
misc.c:	if(screen->logging)
misc.c:		if(screen->logfile)
misc.c:			free(screen->logfile);
misc.c:		screen->logfile = cp;
misc.c:	if (screen->pid > 1)
misc.c:		killpg(getpgrp(screen->pid), SIGHUP);
misc.c:	if (!screen->Vshow && term) {
misc.c:	    screen->Vshow = TRUE;
misc.c:	if (screen->Vshow && term) {
misc.c:	    screen->Vshow = FALSE;
misc.c:	if (!screen->Tshow && (tekWidget || TekInit())) {
misc.c:	    screen->Tshow = TRUE;
misc.c:	if (screen->Tshow && tekWidget) {
misc.c:	    screen->Tshow = FALSE;
misc.c:    if (screen->TekEmu) {
misc.c:	if (screen->logging) {
misc.c:	    screen->logstart = buffer;
misc.c:    if (!screen->TekEmu) {
misc.c:	if(screen->logging) {
misc.c:	    screen->logstart = Tbuffer;
misc.c:	screen->TekEmu = TRUE;
screen.c:	register int avail  = screen->max_col - screen->cur_col + 1;
screen.c:	col = screen->buf[avail = 2 * screen->cur_row] + screen->cur_col;
screen.c:	att = screen->buf[avail + 1] + screen->cur_col;
screen.c:	int y = toprow * FontHeight(screen) + screen->border +
screen.c:		screen->fnt_norm->max_bounds.ascent;
screen.c:	register int topline = screen->topline;
screen.c:	int scrollamt = screen->scroll_amt;
screen.c:	int max = screen->max_row;
screen.c:	if(screen->cursor_col >= leftcol && screen->cursor_col <=
screen.c:	 (leftcol + ncols - 1) && screen->cursor_row >= toprow + topline &&
screen.c:	 screen->cursor_row <= maxrow + topline)
screen.c:		screen->cursor_state = OFF;
screen.c:	   chars = screen->buf [2 * (lastind + topline)];
screen.c:	   att = screen->buf [2 * (lastind + topline) + 1];
screen.c:	       if (flags & BOLD) gc = screen->reverseboldGC;
screen.c:	       else gc = screen->reverseGC;
screen.c:	       if (flags & BOLD) gc = screen->normalboldGC;
screen.c:	       else gc = screen->normalGC;
screen.c:		   XDrawImageString(screen->display, TextWindow(screen), 
screen.c:		   if((flags & BOLD) && screen->enbolden)
screen.c:		 	XDrawString(screen->display, TextWindow(screen), 
screen.c:			XDrawLine(screen->display, TextWindow(screen), 
screen.c:	       		if (flags & BOLD) gc = screen->reverseboldGC;
screen.c:	       		else gc = screen->reverseGC;
screen.c:	      		 if (flags & BOLD) gc = screen->normalboldGC;
screen.c:	      		 else gc = screen->normalGC;
screen.c:	       if (flags & BOLD) gc = screen->reverseboldGC;
screen.c:	       else gc = screen->reverseGC;
screen.c:	       if (flags & BOLD) gc = screen->normalboldGC;
screen.c:	       else gc = screen->normalGC;
screen.c:	   XDrawImageString(screen->display, TextWindow(screen), gc, 
screen.c:	   if((flags & BOLD) && screen->enbolden)
screen.c:		XDrawString(screen->display, TextWindow(screen), gc,
screen.c:		XDrawLine(screen->display, TextWindow(screen), gc, 
screen.c:   Requires first <= last; first, last are rows of screen->buf.
screen.c:		bzero (screen->buf [first++], (screen->max_col + 1));
screen.c:   2. Enlarges screen->buf if necessary.  New space is appended to the bottom
screen.c:   3. Reduces  screen->buf if necessary.  Old space is removed from the bottom
screen.c:   5. Sets screen->max_row and screen->max_col to reflect new size
screen.c:	register ScrnBuf sb = screen->allbuf;
screen.c:	register ScrnBuf ab = screen->altbuf;
screen.c:	register int border = 2 * screen->border;
screen.c:	cols = (width + FontWidth(screen) / 2 - border - screen->scrollbar) /
screen.c:	if (screen->max_row != rows - 1 || screen->max_col != cols - 1) {
screen.c:		if(screen->cursor_state)
screen.c:		savelines = screen->scrollWidget ? screen->savelines : 0;
screen.c:		j = screen->max_col + 1;
screen.c:		k = screen->max_row;
screen.c:			 screen->max_row; x += 2, index++) {
screen.c:		for (index = rows, x = 2 * k; index <= screen->max_row;
screen.c:		    screen->altbuf = ab;
screen.c:		screen->allbuf = sb;
screen.c:		screen->buf = &sb[2 * savelines];
screen.c:			for (index = screen->max_row + 1, x = 2 * index ;
screen.c:		for (index = screen->max_row + 1, x = 2 * (index + savelines) ;
screen.c:		screen->max_row = rows - 1;
screen.c:		screen->max_col = cols - 1;
screen.c:		screen->top_marg = 0;
screen.c:		screen->bot_marg = screen->max_row;
screen.c:		if (screen->cur_row > screen->max_row)
screen.c:			screen->cur_row = screen->max_row;
screen.c:		if (screen->cur_col > screen->max_col)
screen.c:			screen->cur_col = screen->max_col;
screen.c:		screen->fullVwin.height = height - border;
screen.c:		screen->fullVwin.width = width - border - screen->scrollbar;
screen.c:	if(screen->scrollWidget)
screen.c:		ResizeScrollBar(screen->scrollWidget, -1, -1, height);
screen.c:	screen->fullVwin.fullheight = height;
screen.c:	screen->fullVwin.fullwidth = width;
screen.c:	ioctl (screen->respond, TIOCSSIZE, &ts);
screen.c:	if(screen->pid > 1)
screen.c:		killpg(getpgrp(screen->pid), SIGWINCH);
screen.c:	ioctl (screen->respond, TIOCSWINSZ, (char *)&ws);
screen.c:	if(screen->pid > 1)
screen.c:		killpg(getpgrp((int)screen->pid), SIGWINCH);
scrollbar.c:	XGrabServer(screen->display);
scrollbar.c:	if (!XGetSizeHints(screen->display, XtWindow(xw->core.parent),
scrollbar.c:	sizehints.width =  (screen->max_col + 1) * FontWidth(screen)
scrollbar.c:	sizehints.height = FontHeight(screen) * (screen->max_row + 1)
scrollbar.c:	XSetSizeHints(screen->display,
scrollbar.c:	XUngrabServer(screen->display);
scrollbar.c:	XGetWindowAttributes( screen->display, TextWindow(screen),
scrollbar.c:	XChangeWindowAttributes( screen->display, TextWindow(screen),
scrollbar.c:	    (unsigned) (screen->max_col + 1) * FontWidth(screen) + min_width,
scrollbar.c:	    (unsigned) FontHeight(screen) * (screen->max_row + 1) + min_height,
scrollbar.c:	XIfEvent( screen->display, &event, IsEventType, ConfigureNotify );
scrollbar.c:	XChangeWindowAttributes( screen->display, TextWindow(screen),
scrollbar.c:	XChangeWindowAttributes(screen->display, XtWindow(scrollWidget), 
scrollbar.c:	thumbTop    = screen->topline + screen->savedlines;
scrollbar.c:	thumbHeight = screen->max_row + 1;
scrollbar.c:	totalHeight = thumbHeight + screen->savedlines;
scrollbar.c:	if (top < -screen->savedlines)
scrollbar.c:		top = -screen->savedlines;
scrollbar.c:	if((i = screen->topline - top) == 0) {
scrollbar.c:		ScrollBarDrawThumb(screen->scrollWidget);
scrollbar.c:	if(screen->cursor_state)
scrollbar.c:	if(lines > screen->max_row + 1)
scrollbar.c:		lines = screen->max_row + 1;
scrollbar.c:	scrollheight = screen->max_row - lines + 1;
scrollbar.c:	x = screen->scrollbar +	screen->border;
scrollbar.c:		if (screen->multiscroll && scrollheight == 1 &&
scrollbar.c:		 screen->topline == 0 && screen->top_marg == 0 &&
scrollbar.c:		 screen->bot_marg == screen->max_row) {
scrollbar.c:			if (screen->incopy < 0 && screen->scrolls == 0)
scrollbar.c:			screen->scrolls++;
scrollbar.c:			if (screen->incopy)
scrollbar.c:			screen->incopy = -1;
scrollbar.c:		    screen->display, 
scrollbar.c:		    screen->normalGC,
scrollbar.c:		    (int) scrolltop * FontHeight(screen) + screen->border, 
scrollbar.c:			+ screen->border);
scrollbar.c:	screen->topline = top;
scrollbar.c:	    screen->display,
scrollbar.c:	    (int) refreshtop * FontHeight(screen) + screen->border, 
scrollbar.c:	ScrnRefresh(screen, refreshtop, 0, lines, screen->max_col + 1);
scrollbar.c:	ScrollBarDrawThumb(screen->scrollWidget);
scrollbar.c:	register int border = 2 * screen->border;
scrollbar.c:	if(screen->scrollbar)
scrollbar.c:	if(!screen->scrollWidget) {
scrollbar.c:		if((screen->scrollWidget = CreateScrollBar(term,
scrollbar.c:		if (screen->allbuf) {
scrollbar.c:		    if((screen->allbuf = (ScrnBuf) realloc((char *) screen->buf,
scrollbar.c:			(unsigned) 2*(screen->max_row + 2 + screen->savelines) * sizeof(char *)))
scrollbar.c:		    screen->buf = &screen->allbuf[2 * screen->savelines];
scrollbar.c:		    bcopy ((char *)screen->allbuf, (char *)screen->buf,
scrollbar.c:			   2 * (screen->max_row + 2) * sizeof (char *));
scrollbar.c:		    for(i = 2 * screen->savelines - 1 ; i >= 0 ; i--)
scrollbar.c:			if((screen->allbuf[i] =
scrollbar.c:			 calloc((unsigned) screen->max_col + 1, sizeof(char))) == NULL)
scrollbar.c:	screen->scrollbar = SCROLLBARWIDTH;
scrollbar.c:	ScrollBarDrawThumb(screen->scrollWidget);
scrollbar.c:	XMapWindow(screen->display, XtWindow(screen->scrollWidget));
scrollbar.c:	register int border = 2 * screen->border;
scrollbar.c:	if(!screen->scrollbar)
scrollbar.c:	screen->scrollbar = 0;
scrollbar.c:	XUnmapWindow(screen->display, XtWindow(screen->scrollWidget));
scrollbar.c:   screen->savedlines : Number of offscreen text lines,
scrollbar.c:   screen->maxrow + 1 : Number of onscreen  text lines,
scrollbar.c:   screen->topline    : -Number of lines above the last screen->max_row+1 lines
scrollbar.c:	thumbTop = topPercent * (screen->savedlines + screen->max_row+1);
scrollbar.c:	newTopLine = thumbTop - screen->savedlines;
scrollbar.c:	newTopLine = screen->topline + rowOnScreen;
tabs.c:	if(screen->curses && screen->do_wrap && (term->flags & WRAPAROUND)) {
tabs.c:		col = screen->cur_col = screen->do_wrap = 0;
util.c:	register int shift = -screen->topline;
util.c:	register int bot = screen->max_row - shift;
util.c:	if(screen->cursor_state)
util.c:	if(screen->scroll_amt > 0) {
util.c:		refreshheight = screen->refresh_amt;
util.c:		scrollheight = screen->bot_marg - screen->top_marg -
util.c:		if((refreshtop = screen->bot_marg - refreshheight + 1 + shift) >
util.c:		 (i = screen->max_row - screen->scroll_amt + 1))
util.c:		if(screen->scrollWidget && !screen->alternate
util.c:		 && screen->top_marg == 0) {
util.c:			if((i = screen->bot_marg - bot) > 0 &&
util.c:			 (refreshheight -= i) < screen->scroll_amt)
util.c:				refreshheight = screen->scroll_amt;
util.c:			if((i = screen->savedlines) < screen->savelines) {
util.c:				if((i += screen->scroll_amt) >
util.c:				  screen->savelines)
util.c:					i = screen->savelines;
util.c:				screen->savedlines = i;
util.c:				ScrollBarDrawThumb(screen->scrollWidget);
util.c:			scrolltop = screen->top_marg + shift;
util.c:			if((i = bot - (screen->bot_marg - screen->refresh_amt +
util.c:			 screen->scroll_amt)) > 0) {
util.c:				if(bot < screen->bot_marg)
util.c:					refreshheight = screen->scroll_amt + i;
util.c:				refreshheight = screen->scroll_amt;
util.c:				if((i = screen->top_marg + screen->scroll_amt -
util.c:		refreshheight = -screen->refresh_amt;
util.c:		scrollheight = screen->bot_marg - screen->top_marg -
util.c:		refreshtop = screen->top_marg + shift;
util.c:		if((i = screen->bot_marg - bot) > 0)
util.c:		if((i = screen->top_marg + refreshheight - 1 - bot) > 0)
util.c:		if (screen->multiscroll && scrollheight == 1 &&
util.c:		 screen->topline == 0 && screen->top_marg == 0 &&
util.c:		 screen->bot_marg == screen->max_row) {
util.c:			if (screen->incopy < 0 && screen->scrolls == 0)
util.c:			screen->scrolls++;
util.c:			if (screen->incopy)
util.c:			screen->incopy = -1;
util.c:		    screen->display, 
util.c:		    screen->normalGC,
util.c:		    (int) screen->border + screen->scrollbar,
util.c:		    (int) (scrolltop + screen->scroll_amt) * FontHeight(screen)
util.c:			+ screen->border, 
util.c:		    (int) screen->border + screen->scrollbar, 
util.c:		    (int) scrolltop*FontHeight(screen) + screen->border);
util.c:	screen->scroll_amt = 0;
util.c:	screen->refresh_amt = 0;
util.c:		    screen->display,
util.c:		    (int) screen->border + screen->scrollbar,
util.c:		    (int) refreshtop * FontHeight(screen) + screen->border,
util.c:		 screen->max_col + 1);
util.c:	register int amount = screen->refresh_amt;
util.c:	register int row = screen->cur_row;
util.c:		if(row == (bottom = screen->bot_marg) - amount) {
util.c:			screen->refresh_amt++;
util.c:		if(row == (top = screen->top_marg) + amount) {
util.c:			screen->refresh_amt--;
util.c:	register int i = screen->bot_marg - screen->top_marg + 1;
util.c:	if(screen->cursor_state)
util.c:    if(screen->jumpscroll) {
util.c:	if(screen->scroll_amt > 0) {
util.c:		if(screen->refresh_amt + amount > i)
util.c:		screen->scroll_amt += amount;
util.c:		screen->refresh_amt += amount;
util.c:		if(screen->scroll_amt < 0)
util.c:		screen->scroll_amt = amount;
util.c:		screen->refresh_amt = amount;
util.c:	shift = -screen->topline;
util.c:	bot = screen->max_row - shift;
util.c:	if((refreshtop = screen->bot_marg - refreshheight + 1 + shift) >
util.c:	 (i = screen->max_row - refreshheight + 1))
util.c:	if(screen->scrollWidget && !screen->alternate
util.c:	 && screen->top_marg == 0) {
util.c:		if((i = screen->savedlines) < screen->savelines) {
util.c:			if((i += amount) > screen->savelines)
util.c:				i = screen->savelines;
util.c:			screen->savedlines = i;
util.c:			ScrollBarDrawThumb(screen->scrollWidget);
util.c:		scrolltop = screen->top_marg + shift;
util.c:		if((i = screen->bot_marg - bot) > 0) {
util.c:			if((i = screen->top_marg + amount - 1 - bot) >= 0) {
util.c:		if (screen->multiscroll
util.c:		&& amount==1 && screen->topline == 0
util.c:		&& screen->top_marg==0
util.c:		&& screen->bot_marg==screen->max_row) {
util.c:			if (screen->incopy<0 && screen->scrolls==0)
util.c:			screen->scrolls++;
util.c:			if (screen->incopy)
util.c:			screen->incopy = -1;
util.c:		    screen->display, 
util.c:		    screen->normalGC,
util.c:		    (int) screen->border + screen->scrollbar,
util.c:		    (int) (scrolltop+amount) * FontHeight(screen) + screen->border, 
util.c:		    (int) screen->border + screen->scrollbar,
util.c:		    (int) scrolltop * FontHeight(screen) + screen->border);
util.c:		   screen->display,
util.c:		   (int) screen->border + screen->scrollbar,
util.c:		   (int) refreshtop * FontHeight(screen) + screen->border,
util.c:	if(screen->scrollWidget && !screen->alternate && screen->top_marg == 0)
util.c:		ScrnDeleteLine(screen->allbuf, screen->bot_marg +
util.c:		 screen->savelines, 0, amount, screen->max_col + 1);
util.c:		ScrnDeleteLine(screen->buf, screen->bot_marg, screen->top_marg,
util.c:		 amount, screen->max_col + 1);
util.c:		 screen->max_col + 1);
util.c:	register int i = screen->bot_marg - screen->top_marg + 1;
util.c:	if(screen->cursor_state)
util.c:    if(screen->jumpscroll) {
util.c:	if(screen->scroll_amt < 0) {
util.c:		if(-screen->refresh_amt + amount > i)
util.c:		screen->scroll_amt -= amount;
util.c:		screen->refresh_amt -= amount;
util.c:		if(screen->scroll_amt > 0)
util.c:		screen->scroll_amt = -amount;
util.c:		screen->refresh_amt = -amount;
util.c:	shift = -screen->topline;
util.c:	bot = screen->max_row - shift;
util.c:	scrollheight = screen->bot_marg - screen->top_marg -
util.c:	refreshtop = screen->top_marg + shift;
util.c:	if((i = screen->bot_marg - bot) > 0)
util.c:	if((i = screen->top_marg + refreshheight - 1 - bot) > 0)
util.c:		if (screen->multiscroll
util.c:		&& amount==1 && screen->topline == 0
util.c:		&& screen->top_marg==0
util.c:		&& screen->bot_marg==screen->max_row) {
util.c:			if (screen->incopy<0 && screen->scrolls==0)
util.c:			screen->scrolls++;
util.c:			if (screen->incopy)
util.c:			screen->incopy = -1;
util.c:		    screen->display,
util.c:		    screen->normalGC,
util.c:		    (int) screen->border + screen->scrollbar, 
util.c:		    (int) (scrolltop-amount) * FontHeight(screen) + screen->border, 
util.c:		    (int) screen->border + screen->scrollbar,
util.c:		    (int) scrolltop * FontHeight(screen) + screen->border);
util.c:		    screen->display,
util.c:		    (int) screen->border + screen->scrollbar,
util.c:		    (int) refreshtop * FontHeight(screen) + screen->border,
util.c:	ScrnInsertLine (screen->buf, screen->bot_marg, screen->top_marg,
util.c:			amount, screen->max_col + 1);
util.c:	if (screen->cur_row < screen->top_marg ||
util.c:	 screen->cur_row > screen->bot_marg)
util.c:	if(screen->cursor_state)
util.c:	screen->do_wrap = 0;
util.c:	if (n > (i = screen->bot_marg - screen->cur_row + 1))
util.c:    if(screen->jumpscroll) {
util.c:	if(screen->scroll_amt <= 0 &&
util.c:	 screen->cur_row <= -screen->refresh_amt) {
util.c:		if(-screen->refresh_amt + n > screen->max_row + 1)
util.c:		screen->scroll_amt -= n;
util.c:		screen->refresh_amt -= n;
util.c:	} else if(screen->scroll_amt)
util.c:    if(!screen->scroll_amt) {
util.c:	shift = -screen->topline;
util.c:	bot = screen->max_row - shift;
util.c:	scrollheight = screen->bot_marg - screen->cur_row - refreshheight + 1;
util.c:	refreshtop = screen->cur_row + shift;
util.c:	if((i = screen->bot_marg - bot) > 0)
util.c:	if((i = screen->cur_row + refreshheight - 1 - bot) > 0)
util.c:		if (screen->incopy)
util.c:		screen->incopy = -1;
util.c:		    screen->display, 
util.c:		    screen->normalGC,
util.c:		    (int) screen->border + screen->scrollbar,
util.c:		    (int) (scrolltop - n) * FontHeight(screen) + screen->border, 
util.c:		    (int) screen->border + screen->scrollbar,
util.c:		    (int) scrolltop * FontHeight(screen) + screen->border);
util.c:		    screen->display,
util.c:		    (int) screen->border + screen->scrollbar,
util.c:		    (int) refreshtop * FontHeight(screen) + screen->border,
util.c:	/* adjust screen->buf */
util.c:	ScrnInsertLine(screen->buf, screen->bot_marg, screen->cur_row, n,
util.c:			screen->max_col + 1);
util.c:	if (screen->cur_row < screen->top_marg ||
util.c:	 screen->cur_row > screen->bot_marg)
util.c:	if(screen->cursor_state)
util.c:	screen->do_wrap = 0;
util.c:	if (n > (i = screen->bot_marg - screen->cur_row + 1))
util.c:    if(screen->jumpscroll) {
util.c:	if(screen->scroll_amt >= 0 && screen->cur_row == screen->top_marg) {
util.c:		if(screen->refresh_amt + n > screen->max_row + 1)
util.c:		screen->scroll_amt += n;
util.c:		screen->refresh_amt += n;
util.c:	} else if(screen->scroll_amt)
util.c:    if(!screen->scroll_amt) {
util.c:	shift = -screen->topline;
util.c:	bot = screen->max_row - shift;
util.c:	if((refreshtop = screen->bot_marg - refreshheight + 1 + shift) >
util.c:	 (i = screen->max_row - refreshheight + 1))
util.c:	if(screen->scrollWidget && !screen->alternate && screen->cur_row == 0) {
util.c:		if((i = screen->savedlines) < screen->savelines) {
util.c:			if((i += n) > screen->savelines)
util.c:				i = screen->savelines;
util.c:			screen->savedlines = i;
util.c:			ScrollBarDrawThumb(screen->scrollWidget);
util.c:		scrolltop = screen->cur_row + shift;
util.c:		if((i = screen->bot_marg - bot) > 0) {
util.c:			if((i = screen->cur_row + n - 1 - bot) >= 0) {
util.c:		if (screen->incopy)
util.c:		screen->incopy = -1;
util.c:		    screen->display,
util.c:		    screen->normalGC,
util.c:		    (int) screen->border + screen->scrollbar,
util.c:		    (int) (scrolltop + n) * FontHeight(screen) + screen->border, 
util.c:		    (int) screen->border + screen->scrollbar,
util.c:		    (int) scrolltop * FontHeight(screen) + screen->border);
util.c:		    screen->display,
util.c:		    (int) screen->border + screen->scrollbar,
util.c:		    (int) refreshtop * FontHeight(screen) + screen->border,
util.c:	/* adjust screen->buf */
util.c:	if(screen->scrollWidget && !screen->alternate && screen->cur_row == 0)
util.c:		ScrnDeleteLine(screen->allbuf, screen->bot_marg +
util.c:		 screen->savelines, 0, n, screen->max_col + 1);
util.c:		ScrnDeleteLine(screen->buf, screen->bot_marg, screen->cur_row,
util.c:		 n, screen->max_col + 1);
util.c:	if(screen->cursor_state)
util.c:	screen->do_wrap = 0;
util.c:	if(screen->cur_row - screen->topline <= screen->max_row) {
util.c:		if(screen->scroll_amt)
util.c:		if (screen->incopy)
util.c:		screen->incopy = -1;
util.c:		cx = CursorX (screen, screen->cur_col);
util.c:		cy = CursorY (screen, screen->cur_row);
util.c:		    screen->display,
util.c:		    screen->normalGC,
util.c:		        - (screen->cur_col + n) * FontWidth(screen),
util.c:		    screen->display,
util.c:		    screen->reverseGC,
util.c:	/* adjust screen->buf */
util.c:	ScrnInsertChar(screen->buf, screen->cur_row, screen->cur_col, n,
util.c:			screen->max_col + 1);
util.c:	if(screen->cursor_state)
util.c:	screen->do_wrap = 0;
util.c:	if (n > (width = screen->max_col + 1 - screen->cur_col))
util.c:	if(screen->cur_row - screen->topline <= screen->max_row) {
util.c:		if(screen->scroll_amt)
util.c:		if (screen->incopy)
util.c:		screen->incopy = -1;
util.c:		cx = CursorX (screen, screen->cur_col);
util.c:		cy = CursorY (screen, screen->cur_row);
util.c:		XCopyArea(screen->display,
util.c:		     screen->normalGC, 
util.c:		     Width(screen) - (screen->cur_col + n) * FontWidth(screen),
util.c:		XFillRectangle (screen->display, TextWindow(screen),
util.c:		     screen->reverseGC,
util.c:		     screen->border + screen->scrollbar + Width(screen) - width,
util.c:	/* adjust screen->buf */
util.c:	ScrnDeleteChar (screen->buf, screen->cur_row, screen->cur_col, n,
util.c:			screen->max_col + 1);
util.c:	if(screen->cursor_state)
util.c:	if((top = -screen->topline) <= screen->max_row) {
util.c:		if(screen->scroll_amt)
util.c:		if((height = screen->cur_row + top) > screen->max_row)
util.c:			height = screen->max_row;
util.c:			XClearArea(screen->display, TextWindow(screen),
util.c:			 screen->border + screen->scrollbar, top *
util.c:			 FontHeight(screen) + screen->border,
util.c:		if(screen->cur_row - screen->topline <= screen->max_row)
util.c:	ClearBufRows(screen, 0, screen->cur_row - 1);
util.c:	if((top = screen->cur_row - screen->topline) <= screen->max_row) {
util.c:		if(screen->scroll_amt)
util.c:		if(++top <= screen->max_row)
util.c:			XClearArea(screen->display, TextWindow(screen),
util.c:			 screen->border + screen->scrollbar, top *
util.c:			 FontHeight(screen) + screen->border,
util.c:			 Width(screen), (screen->max_row - top + 1) *
util.c:	ClearBufRows(screen, screen->cur_row + 1, screen->max_row);
util.c:	if(screen->cursor_state)
util.c:	screen->do_wrap = 0;
util.c:	if(screen->cur_row - screen->topline <= screen->max_row) {
util.c:	if(screen->scroll_amt)
util.c:		XFillRectangle(screen->display, TextWindow(screen),
util.c:		  screen->reverseGC,
util.c:		 CursorX(screen, screen->cur_col),
util.c:		 CursorY(screen, screen->cur_row),
util.c:		 Width(screen) - screen->cur_col * FontWidth(screen),
util.c:	bzero(screen->buf [2 * screen->cur_row] + screen->cur_col,
util.c:	       (screen->max_col - screen->cur_col + 1));
util.c:	bzero(screen->buf [2 * screen->cur_row + 1] + screen->cur_col,
util.c:	       (screen->max_col - screen->cur_col + 1));
util.c:	if(screen->cursor_state)
util.c:	screen->do_wrap = 0;
util.c:	if(screen->cur_row - screen->topline <= screen->max_row) {
util.c:		if(screen->scroll_amt)
util.c:		XFillRectangle (screen->display, TextWindow(screen),
util.c:		     screen->reverseGC,
util.c:		     screen->border + screen->scrollbar,
util.c:		      CursorY (screen, screen->cur_row),
util.c:		     (screen->cur_col + 1) * FontWidth(screen),
util.c:	bzero (screen->buf [2 * screen->cur_row], (screen->cur_col + 1));
util.c:	bzero (screen->buf [2 * screen->cur_row + 1], (screen->cur_col + 1));
util.c:	if(screen->cursor_state)
util.c:	screen->do_wrap = 0;
util.c:	if(screen->cur_row - screen->topline <= screen->max_row) {
util.c:		if(screen->scroll_amt)
util.c:		XFillRectangle (screen->display, TextWindow(screen), 
util.c:		     screen->reverseGC,
util.c:		     screen->border + screen->scrollbar,
util.c:		      CursorY (screen, screen->cur_row),
util.c:	bzero (screen->buf [2 * screen->cur_row], (screen->max_col + 1));
util.c:	bzero (screen->buf [2 * screen->cur_row + 1], (screen->max_col + 1));
util.c:	if(screen->cursor_state)
util.c:	screen->do_wrap = 0;
util.c:	if((top = -screen->topline) <= screen->max_row) {
util.c:		if(screen->scroll_amt)
util.c:			XClearWindow(screen->display, TextWindow(screen));
util.c:			XClearArea(screen->display, TextWindow(screen),
util.c:			 screen->border + screen->scrollbar, 
util.c:			 top * FontHeight(screen) + screen->border,	
util.c:		 	 Width(screen), (screen->max_row - top + 1) *
util.c:	ClearBufRows (screen, 0, screen->max_row);
util.c:		XWindowEvent (screen->display, VWindow(screen), 
util.c:			if (screen->incopy <= 0) {
util.c:				screen->incopy = 1;
util.c:				if (screen->scrolls > 0)
util.c:					screen->scrolls--;
util.c:			    if (screen->incopy <= 0 && screen->scrolls > 0)
util.c:				screen->scrolls--;
util.c:			    if (screen->scrolls == 0) {
util.c:				screen->incopy = 0;
util.c:			    screen->incopy = -1;
util.c:	if((toprow = (reply->y - screen->border) /
util.c:	if((leftcol = (reply->x - screen->border - screen->scrollbar)
util.c:	nrows = (reply->y + reply->height - 1 - screen->border) / 
util.c:	 (reply->x + reply->width - 1 - screen->border - screen->scrollbar) /
util.c:	toprow -= screen->scrolls;
util.c:	if (toprow + nrows - 1 > screen->max_row)
util.c:		nrows = screen->max_row - toprow + 1;
util.c:	if (leftcol + ncols - 1 > screen->max_col)
util.c:		ncols = screen->max_col - leftcol + 1;
util.c:		if (screen->cur_row >= toprow &&
util.c:		    screen->cur_row < toprow + nrows &&
util.c:		    screen->cur_col >= leftcol &&
util.c:		    screen->cur_col < leftcol + ncols)
util.c:	if(screen->cursorcolor == screen->foreground)
util.c:		screen->cursorcolor = tmp;
util.c:	if(screen->mousecolor == screen->foreground)
util.c:		screen->mousecolor = tmp;
util.c:	term->core.background_pixel = screen->foreground;
util.c:	screen->foreground = tmp;
util.c:	tmpGC = screen->normalGC;
util.c:	screen->normalGC = screen->reverseGC;
util.c:	screen->reverseGC = tmpGC;
util.c:	tmpGC = screen->normalboldGC;
util.c:	screen->normalboldGC = screen->reverseboldGC;
util.c:	screen->reverseboldGC = tmpGC;
util.c:	XFreeCursor(screen->display, screen->curs);
util.c:	XFreeCursor(screen->display, screen->arrow);
util.c:	    if (screen->mousecolor == term->core.background_pixel) {
util.c:		fg = screen->foreground;
util.c:		fg = screen->mousecolor;
util.c:		screen->curs = make_arrow (fg, bg);
util.c:		screen->curs = make_xterm (fg, bg);
util.c:	    screen->arrow = make_arrow (fg, bg);
util.c:	XDefineCursor(screen->display, TextWindow(screen), screen->curs);
util.c:		XDefineCursor(screen->display, tek, screen->arrow);
util.c:	MenuNewCursor(screen->arrow);
util.c:		term->core.border_pixel = screen->foreground;
util.c:		term->core.parent->core.border_pixel = screen->foreground;
util.c:		  XSetWindowBorder (screen->display,
util.c:	if(screen->scrollWidget)
util.c:		ScrollBarReverseVideo(screen->scrollWidget);
util.c:	XSetWindowBackground(screen->display, TextWindow(screen), term->core.background_pixel);
util.c:	XClearWindow(screen->display, TextWindow(screen));
util.c:	ScrnRefresh (screen, 0, 0, screen->max_row + 1,
util.c:	 screen->max_col + 1);
util.c:	if(screen->Tshow) {
util.c:	    XClearWindow(screen->display, tek);
vif.c:	if (write(screen->respond, buf, i) != i)
vif.c:	i = 2 * screen->border + screen->scrollbar;
vif.c:	j = 2 * screen->border;
vif.c:		write(screen->respond,st,strlen(st));
vif.c:	lastValidRow = screen->max_row;
vif.c:		dr = r-screen->cur_row;
vif.c:		dc = c-screen->cur_col;
vif.c:			write(screen->respond, cpt, 3);
vif.c:			write(screen->respond, rpt, 3);
