XFree86 3.9Ah - xterm patch #77 - 1998/5/26 - T.Dickey <dickey@clark.net>
Most of the bulk of this patch is to convert the extended C (K&R functions
with prototypes) to ANSI. I verified that on Linux by comparing object
files, to ensure that I did not, for example, interchange parameters in
the function declarations.
The rest of the patch fixes several minor bugs, and adds a few features:
+ back-out my use of ncurses "captoinfo -f" option (if/then/else/endif)
formatting, since ncurses did not correctly filter embedded newlines
in terminfo capability strings until _after_ ncurses 4.1, thus
corrupting setf/setb/sgr strings (reported by Darren Hiebert and
others).
+ document SGR 8, 28 (invisible/visible), add corresponding
capabilities to terminfo description.
I would also add the 'prot protected capability, but the control
sequences for that would not be recognized or properly ignored by the
older xterm programs.
+ modify ChangeGroup to not suppress a null-resource, but treat it as an
empty string (recommended by Stefan Dalibor).
+ add printerAutoClose resource to control whether printer is closed
when going offline. More than one person reports problems (on
Solaris 2.6 and Digital Unix 4.0) getting the printer to proceed
unless xterm exits; I think that it is a problem flushing the pipe.
Closing it ought to flush it.
+ adapt TOG fix-3 to in HandleKeymapChange and VTInitI18N (but adapt
XtStackAlloc/XtStackFree for clarity, as well as fixing memory leak).
+ change calls on FillCurBackground to ClearCurBackground, in effect
using XClearArea rather than XFillRectangle when clearing as a
side-effect of scrolling and insertion (patch by Alexander V
Lukyanov)
+ correct some places where insert/delete did not _move_ the color
attributes, using memmove (patch by Alexander V Lukyanov
<lav@long.yar.ru>)
+ add ifdef's for __CYGWIN32__, for port to cygnus version B19.1
(patch by Andrew Sumner <andrew_sumner@hotmail.com>).
+ remove #define for hpux that turned on USE_SYSV_ENVVARS, since this
causes some applications (such as 'less') to get incorrect $LINES and
$COLUMNS values (reported by Clint Olsen).
+ modify behavior for HP-UX, to set the "reserved" process group
controls to _POSIX_VDISABLE so the TIOCSLTC ioctl does not produce an
error (patch by Ben Yoshino <ben@wiliki.eng.hawaii.edu>).
+ correct length of underlining, reducing it by one pixel to avoid
leaving a dot when the application does not clear the whole screen
(patch by (Sergei Laskavy <Laskavy@cs.msu.su>).
I noticed this only recently myself (and other people as well); it
depends on the font chosen. A 6x10 font shows it, but the other
fonts (from XTerm.ad) do not. I also see a similar problem with the
emulation of bold fonts.
+ add include for Xos.h to xterm.h, to ensure proper definitions
(reported by Holger Veit).
+ update config.guess to recognize Unixware 2.1 and 7 (patch by
Mike Hopkirk <hops@sco.com>).
# ------------------------------------------------------------------------------
# Tekproc.c | 127 +++-----
# aclocal.m4 | 2
# button.c | 389 +++++++++++++-------------
# charproc.c | 164 ++++++-----
# config.guess | 19 +
# ctlseqs.ms | 2
# cursor.c | 53 ---
# doublechr.c | 12
# error.h | 1
# input.c | 31 --
# main.c | 109 ++++---
# menu.c | 799 ++++++++++++++++++++++++++++---------------------------
# menu.h | 2
# misc.c | 57 +--
# os2main.c | 148 +++-------
# print.c | 71 ++--
# ptyx.h | 10
# resize.c | 46 +--
# screen.c | 95 ++++--
# scrollbar.c | 86 ++---
# tabs.c | 26 -
# terminfo | 207 +-------------
# trace.c | 21 -
# trace.h | 4
# util.c | 80 ++---
# version.h | 2
# xterm.h | 338 +++++++++++------------
# xterm.log.html | 71 ++++
# xterm.man | 19 -
# 29 files changed, 1441 insertions, 1550 deletions
# ------------------------------------------------------------------------------
Index: Tekproc.c
--- xterm-76+/Tekproc.c Fri May 8 20:33:15 1998
+++ xterm-77/Tekproc.c Mon May 25 21:40:12 1998
@@ -281,23 +281,20 @@
XtRString, GIN_TERM_NONE_STR},
};
-static TekWidget CreateTekWidget PROTO((void));
-static int Tinput PROTO((void));
-static int getpoint PROTO((void));
-static void AddToDraw PROTO((int x1, int y1, int x2, int y2));
-static void TCursorBack PROTO((void));
-static void TCursorDown PROTO((void));
-static void TCursorForward PROTO((void));
-static void TCursorUp PROTO((void));
-static void TekBackground PROTO((TScreen *screen));
-static void TekConfigure PROTO((Widget w));
-static void TekDraw PROTO((int x, int y));
-static void TekEnq PROTO((int status, int x, int y));
-static void TekFlush PROTO((void));
-static void TekInitialize PROTO((Widget request, Widget new, ArgList args, Cardinal *num_args));
-static void TekPage PROTO((void));
-static void TekRealize PROTO((Widget gw, XtValueMask *valuemaskp, XSetWindowAttributes *values));
-static void Tekparse PROTO((void));
+static int Tinput (void);
+static int getpoint (void);
+static void TCursorBack (void);
+static void TCursorDown (void);
+static void TCursorForward (void);
+static void TCursorUp (void);
+static void TekBackground (TScreen *screen);
+static void TekConfigure (Widget w);
+static void TekDraw (int x, int y);
+static void TekEnq (int status, int x, int y);
+static void TekFlush (void);
+static void TekInitialize (Widget request, Widget new, ArgList args, Cardinal *num_args);
+static void TekPage (void);
+static void TekRealize (Widget gw, XtValueMask *valuemaskp, XSetWindowAttributes *values);
static WidgetClassRec tekClassRec = {
{
@@ -342,7 +339,7 @@
static Widget tekshellwidget;
-static TekWidget CreateTekWidget ()
+static TekWidget CreateTekWidget (void)
{
/* this causes the Initialize method to be called */
tekshellwidget = XtCreatePopupShell ("tektronix", topLevelShellWidgetClass,
@@ -357,7 +354,7 @@
}
-int TekInit ()
+int TekInit (void)
{
if (Tfailed) return (0);
if (tekWidget) return (1);
@@ -367,7 +364,7 @@
return (0);
}
-static void Tekparse()
+static void Tekparse(void)
{
register TScreen *screen = &term->screen;
register int c, x, y;
@@ -686,7 +683,7 @@
static char *rptr;
static fd_set Tselect_mask;
-static int Tinput()
+static int Tinput(void)
{
register TScreen *screen = &term->screen;
register int i;
@@ -831,8 +828,7 @@
}
/* this should become the Tek Widget's Resize proc */
-static void TekConfigure(w)
- Widget w;
+static void TekConfigure(Widget w)
{
register TScreen *screen = &term->screen;
register int border = 2 * screen->border;
@@ -851,10 +847,10 @@
/*ARGSUSED*/
void
-TekExpose(w, event, region)
- Widget w GCC_UNUSED;
- XEvent *event GCC_UNUSED;
- Region region GCC_UNUSED;
+TekExpose(
+ Widget w GCC_UNUSED,
+ XEvent *event GCC_UNUSED,
+ Region region GCC_UNUSED)
{
register TScreen *screen = &term->screen;
@@ -885,7 +881,7 @@
}
void
-dorefresh()
+dorefresh(void)
{
register TScreen *screen = &term->screen;
static Cursor wait_cursor = None;
@@ -902,7 +898,7 @@
}
static void
-TekPage()
+TekPage(void)
{
register TScreen *screen = &term->screen;
register TekLink *tek;
@@ -941,7 +937,7 @@
#define TWOBITS 03
static int
-getpoint()
+getpoint(void)
{
register int c, x, y, e, lo_y = 0;
register TScreen *screen = &term->screen;
@@ -986,7 +982,7 @@
}
static void
-TCursorBack()
+TCursorBack(void)
{
register TScreen *screen = &term->screen;
register struct Tek_Char *t;
@@ -1009,7 +1005,7 @@
}
static void
-TCursorForward()
+TCursorForward(void)
{
register TScreen *screen = &term->screen;
register struct Tek_Char *t;
@@ -1029,7 +1025,7 @@
}
static void
-TCursorUp()
+TCursorUp(void)
{
register TScreen *screen = &term->screen;
register struct Tek_Char *t;
@@ -1049,7 +1045,7 @@
}
static void
-TCursorDown()
+TCursorDown(void)
{
register TScreen *screen = &term->screen;
register struct Tek_Char *t;
@@ -1069,8 +1065,7 @@
}
static void
-AddToDraw(x1, y1, x2, y2)
- int x1, y1, x2, y2;
+AddToDraw(int x1, int y1, int x2, int y2)
{
register TScreen *screen = &term->screen;
register XSegment *lp;
@@ -1089,8 +1084,7 @@
}
static void
-TekDraw (x, y)
- int x, y;
+TekDraw (int x, int y)
{
register TScreen *screen = &term->screen;
@@ -1109,7 +1103,7 @@
}
static void
-TekFlush ()
+TekFlush (void)
{
register TScreen *screen = &term->screen;
@@ -1122,7 +1116,7 @@
}
void
-TekGINoff()
+TekGINoff(void)
{
register TScreen *screen = &term->screen;
@@ -1136,8 +1130,7 @@
}
void
-TekEnqMouse(c)
- int c; /* character pressed */
+TekEnqMouse(int c) /* character pressed */
{
register TScreen *screen = &term->screen;
int mousex, mousey, rootx, rooty;
@@ -1162,9 +1155,10 @@
TekEnq(c, mousex, mousey);
}
-static void TekEnq (status, x, y)
- int status;
- register int x, y;
+static void TekEnq (
+ int status,
+ register int x,
+ register int y)
{
register TScreen *screen = &term->screen;
int pty = screen->respond;
@@ -1190,7 +1184,7 @@
}
void
-TekRun()
+TekRun(void)
{
register TScreen *screen = &term->screen;
register int i;
@@ -1255,11 +1249,11 @@
* The following is called the create the tekWidget
*/
-static void TekInitialize(request, new, args, num_args)
- Widget request GCC_UNUSED;
- Widget new GCC_UNUSED;
- ArgList args GCC_UNUSED;
- Cardinal *num_args GCC_UNUSED;
+static void TekInitialize(
+ Widget request GCC_UNUSED,
+ Widget new GCC_UNUSED,
+ ArgList args GCC_UNUSED,
+ Cardinal *num_args GCC_UNUSED)
{
/* look for focus related events on the shell, because we need
* to care about the shell's border being part of our focus.
@@ -1275,10 +1269,10 @@
}
-static void TekRealize (gw, valuemaskp, values)
- Widget gw;
- XtValueMask *valuemaskp;
- XSetWindowAttributes *values;
+static void TekRealize (
+ Widget gw,
+ XtValueMask *valuemaskp,
+ XSetWindowAttributes *values)
{
TekWidget tw = (TekWidget) gw;
register TScreen *screen = &term->screen;
@@ -1522,8 +1516,7 @@
return;
}
-void TekSetFontSize (newitem)
- int newitem;
+void TekSetFontSize (int newitem)
{
register TScreen *screen = &term->screen;
int oldsize = screen->cur.fontsize;
@@ -1551,9 +1544,7 @@
}
void
-ChangeTekColors(screen,pNew)
-register TScreen *screen;
-ScrnColors *pNew;
+ChangeTekColors(register TScreen *screen, ScrnColors *pNew)
{
register int i;
XGCValues gcv;
@@ -1598,8 +1589,7 @@
}
void
-TekReverseVideo(screen)
-register TScreen *screen;
+TekReverseVideo(register TScreen *screen)
{
register int i;
XGCValues gcv;
@@ -1640,8 +1630,7 @@
}
static void
-TekBackground(screen)
-register TScreen *screen;
+TekBackground(register TScreen *screen)
{
if(TWindow(screen))
XSetWindowBackground(screen->display, TWindow(screen),
@@ -1652,8 +1641,7 @@
* Toggles cursor on or off at cursor position in screen.
*/
void
-TCursorToggle(toggle)
- int toggle; /* TOGGLE or CLEAR */
+TCursorToggle(int toggle) /* TOGGLE or CLEAR */
{
register TScreen *screen = &term->screen;
register int c, x, y;
@@ -1692,8 +1680,7 @@
}
}
-void TekSimulatePageButton (reset)
- Bool reset;
+void TekSimulatePageButton (Bool reset)
{
register TScreen *screen = &term->screen;
@@ -1713,7 +1700,7 @@
/* write copy of screen to a file */
void
-TekCopy()
+TekCopy(void)
{
register TScreen *screen = &term->screen;
register struct tm *tp;
@@ -1722,7 +1709,7 @@
int pid;
#ifndef HAVE_WAITPID
int waited;
- SIGNAL_T (*chldfunc) PROTO((int));
+ SIGNAL_T (*chldfunc) (int);
chldfunc = signal(SIGCHLD, SIG_DFL);
#endif
Index: aclocal.m4
--- xterm-76+/aclocal.m4 Fri May 8 18:57:39 1998
+++ xterm-77/aclocal.m4 Tue May 26 06:10:03 1998
@@ -109,7 +109,7 @@
dnl Derive the system name, as a check for reusing the autoconf cache.
dnl
dnl If we've packaged config.guess and config.sub, run that (since it does a
-dnl better job than uname).
+dnl better job than uname).
AC_DEFUN([CF_CHECK_CACHE],
[
if test -f $srcdir/config.guess ; then
Index: button.c
--- xterm-76+/button.c Tue Apr 28 15:01:01 1998
+++ xterm-77/button.c Mon May 25 21:34:51 1998
@@ -104,33 +104,22 @@
/* Send emacs escape code when done selecting or extending? */
static int replyToEmacs;
-static Boolean ConvertSelection PROTO_XT_CVT_SELECT_ARGS;
-static SelectUnit EvalSelectUnit PROTO((Time buttonDownTime, SelectUnit defaultUnit));
-static char *SaveText PROTO((TScreen *screen, int row, int scol, int ecol, char *lp, int *eol));
-static int LastTextCol PROTO((int row));
-static int Length PROTO((TScreen *screen, int row, int scol, int ecol));
-static void ComputeSelect PROTO((int startRow, int startCol, int endRow, int endCol, Bool extend));
-static void EditorButton PROTO((XButtonEvent *event));
-static void EndExtend PROTO((Widget w, XEvent *event, String *params, Cardinal num_params, Bool use_cursor_loc));
-static void ExtendExtend PROTO((int row, int col));
-static void LoseSelection PROTO((Widget w, Atom *selection));
-static void PointToRowCol PROTO((int y, int x, int *r, int *c));
-static void ReHiliteText PROTO((int frow, int fcol, int trow, int tcol));
-static void SaltTextAway PROTO((int crow, int ccol, int row, int col, String *params, Cardinal num_params));
-static void SelectSet PROTO((Widget w, XEvent *event, String *params, Cardinal num_params));
-static void SelectionDone PROTO((Widget w, Atom *selection, Atom *target));
+static char *SaveText (TScreen *screen, int row, int scol, int ecol, char *lp, int *eol);
+static int Length (TScreen *screen, int row, int scol, int ecol);
+static void ComputeSelect (int startRow, int startCol, int endRow, int endCol, Bool extend);
+static void EditorButton (XButtonEvent *event);
+static void EndExtend (Widget w, XEvent *event, String *params, Cardinal num_params, Bool use_cursor_loc);
+static void ExtendExtend (int row, int col);
+static void PointToRowCol (int y, int x, int *r, int *c);
+static void ReHiliteText (int frow, int fcol, int trow, int tcol);
+static void SaltTextAway (int crow, int ccol, int row, int col, String *params, Cardinal num_params);
+static void SelectSet (Widget w, XEvent *event, String *params, Cardinal num_params);
static void SelectionReceived PROTO_XT_SEL_CB_ARGS;
-static void StartSelect PROTO((int startrow, int startcol));
-static void TrackDown PROTO((XButtonEvent *event));
-static void _GetSelection PROTO((Widget w, Time ev_time, String *params, Cardinal num_params));
-static void _OwnSelection PROTO((XtermWidget termw, String *selections, Cardinal count));
-static void do_select_end PROTO((Widget w, XEvent *event, String *params, Cardinal *num_params, Bool use_cursor_loc));
-static void do_select_start PROTO((Widget w, XEvent *event, int startrow, int startcol));
-static void do_start_extend PROTO((Widget w, XEvent *event, String *params, Cardinal *num_params, Bool use_cursor_loc));
-
-Boolean SendMousePosition(w, event)
-Widget w;
-XEvent* event;
+static void StartSelect (int startrow, int startcol);
+static void TrackDown (XButtonEvent *event);
+static void _OwnSelection (XtermWidget termw, String *selections, Cardinal count);
+
+Boolean SendMousePosition(Widget w, XEvent* event)
{
register TScreen *screen;
@@ -190,11 +179,11 @@
}
void
-DiredButton(w, event, params, num_params)
-Widget w GCC_UNUSED;
-XEvent *event; /* must be XButtonEvent */
-String *params GCC_UNUSED; /* selections */
-Cardinal *num_params GCC_UNUSED;
+DiredButton(
+ Widget w GCC_UNUSED,
+ XEvent *event, /* must be XButtonEvent */
+ String *params GCC_UNUSED, /* selections */
+ Cardinal *num_params GCC_UNUSED)
{ /* ^XM-G<line+' '><col+' '> */
register TScreen *screen = &term->screen;
int pty = screen->respond;
@@ -213,11 +202,11 @@
}
void
-ViButton(w, event, params, num_params)
-Widget w GCC_UNUSED;
-XEvent *event; /* must be XButtonEvent */
-String *params GCC_UNUSED; /* selections */
-Cardinal *num_params GCC_UNUSED;
+ViButton(
+ Widget w GCC_UNUSED,
+ XEvent *event, /* must be XButtonEvent */
+ String *params GCC_UNUSED, /* selections */
+ Cardinal *num_params GCC_UNUSED)
{ /* ^XM-G<line+' '><col+' '> */
register TScreen *screen = &term->screen;
int pty = screen->respond;
@@ -246,11 +235,11 @@
/*ARGSUSED*/
-void HandleSelectExtend(w, event, params, num_params)
-Widget w;
-XEvent *event; /* must be XMotionEvent */
-String *params GCC_UNUSED;
-Cardinal *num_params GCC_UNUSED;
+void HandleSelectExtend(
+ Widget w,
+ XEvent *event, /* must be XMotionEvent */
+ String *params GCC_UNUSED,
+ Cardinal *num_params GCC_UNUSED)
{
register TScreen *screen;
int row, col;
@@ -273,12 +262,12 @@
}
}
-static void do_select_end (w, event, params, num_params, use_cursor_loc)
-Widget w;
-XEvent *event; /* must be XButtonEvent */
-String *params; /* selections */
-Cardinal *num_params;
-Bool use_cursor_loc;
+static void do_select_end (
+ Widget w,
+ XEvent *event, /* must be XButtonEvent */
+ String *params, /* selections */
+ Cardinal *num_params,
+ Bool use_cursor_loc)
{
if (!IsXtermWidget(w))
return;
@@ -296,21 +285,21 @@
}
-void HandleSelectEnd(w, event, params, num_params)
-Widget w;
-XEvent *event; /* must be XButtonEvent */
-String *params; /* selections */
-Cardinal *num_params;
+void HandleSelectEnd(
+ Widget w,
+ XEvent *event, /* must be XButtonEvent */
+ String *params, /* selections */
+ Cardinal *num_params)
{
do_select_end (w, event, params, num_params, False);
}
-void HandleKeyboardSelectEnd(w, event, params, num_params)
-Widget w;
-XEvent *event; /* must be XButtonEvent */
-String *params; /* selections */
-Cardinal *num_params;
+void HandleKeyboardSelectEnd(
+ Widget w,
+ XEvent *event, /* must be XButtonEvent */
+ String *params, /* selections */
+ Cardinal *num_params)
{
do_select_end (w, event, params, num_params, True);
}
@@ -325,11 +314,11 @@
};
-static void _GetSelection(w, ev_time, params, num_params)
-Widget w;
-Time ev_time;
-String *params; /* selections in precedence order */
-Cardinal num_params;
+static void _GetSelection(
+ Widget w,
+ Time ev_time,
+ String *params, /* selections in precedence order */
+ Cardinal num_params)
{
Atom selection;
int cutbuffer;
@@ -374,14 +363,14 @@
/* SelectionReceived: stuff received selection text into pty */
/* ARGSUSED */
-static void SelectionReceived(w, client_data, selection, type,
- value, length, format)
-Widget w;
-XtPointer client_data;
-Atom *selection GCC_UNUSED, *type;
-XtPointer value;
-unsigned long *length;
-int *format GCC_UNUSED;
+static void SelectionReceived(
+ Widget w,
+ XtPointer client_data,
+ Atom *selection GCC_UNUSED,
+ Atom *type,
+ XtPointer value,
+ unsigned long *length,
+ int *format GCC_UNUSED)
{
int pty;
register char *lag, *cp, *end;
@@ -423,11 +412,11 @@
void
-HandleInsertSelection(w, event, params, num_params)
-Widget w;
-XEvent *event; /* assumed to be XButtonEvent* */
-String *params; /* selections in precedence order */
-Cardinal *num_params;
+HandleInsertSelection(
+ Widget w,
+ XEvent *event, /* assumed to be XButtonEvent* */
+ String *params, /* selections in precedence order */
+ Cardinal *num_params)
{
if (SendMousePosition(w, event)) return;
_GetSelection(w, event->xbutton.time, params, *num_params);
@@ -435,9 +424,7 @@
static SelectUnit
-EvalSelectUnit(buttonDownTime, defaultUnit)
- Time buttonDownTime;
- SelectUnit defaultUnit;
+EvalSelectUnit(Time buttonDownTime, SelectUnit defaultUnit)
{
int delta;
@@ -457,10 +444,11 @@
}
}
-static void do_select_start (w, event, startrow, startcol)
-Widget w;
-XEvent *event; /* must be XButtonEvent* */
-int startrow, startcol;
+static void do_select_start (
+ Widget w,
+ XEvent *event, /* must be XButtonEvent* */
+ int startrow,
+ int startcol)
{
if (SendMousePosition(w, event)) return;
selectUnit = EvalSelectUnit(event->xbutton.time, SELECTCHAR);
@@ -470,11 +458,11 @@
/* ARGSUSED */
void
-HandleSelectStart(w, event, params, num_params)
-Widget w;
-XEvent *event; /* must be XButtonEvent* */
-String *params GCC_UNUSED;
-Cardinal *num_params GCC_UNUSED;
+HandleSelectStart(
+ Widget w,
+ XEvent *event, /* must be XButtonEvent* */
+ String *params GCC_UNUSED,
+ Cardinal *num_params GCC_UNUSED)
{
register TScreen *screen;
int startrow, startcol;
@@ -492,11 +480,11 @@
/* ARGSUSED */
void
-HandleKeyboardSelectStart(w, event, params, num_params)
-Widget w;
-XEvent *event; /* must be XButtonEvent* */
-String *params GCC_UNUSED;
-Cardinal *num_params GCC_UNUSED;
+HandleKeyboardSelectStart(
+ Widget w,
+ XEvent *event, /* must be XButtonEvent* */
+ String *params GCC_UNUSED,
+ Cardinal *num_params GCC_UNUSED)
{
register TScreen *screen;
@@ -509,8 +497,7 @@
static void
-TrackDown(event)
- register XButtonEvent *event;
+TrackDown(register XButtonEvent *event)
{
int startrow, startcol;
@@ -532,8 +519,7 @@
x = screen->max_row;
void
-TrackMouse(func, startrow, startcol, firstrow, lastrow)
- int func, startrow, startcol, firstrow, lastrow;
+TrackMouse(int func, int startrow, int startcol, int firstrow, int lastrow)
{
TScreen *screen = &term->screen;
@@ -552,8 +538,7 @@
}
static void
-StartSelect(startrow, startcol)
- int startrow, startcol;
+StartSelect(int startrow, int startcol)
{
TScreen *screen = &term->screen;
@@ -585,12 +570,12 @@
}
static void
-EndExtend(w, event, params, num_params, use_cursor_loc)
- Widget w;
- XEvent *event; /* must be XButtonEvent */
- String *params; /* selections */
- Cardinal num_params;
- Bool use_cursor_loc;
+EndExtend(
+ Widget w,
+ XEvent *event, /* must be XButtonEvent */
+ String *params, /* selections */
+ Cardinal num_params,
+ Bool use_cursor_loc)
{
int row, col, count;
TScreen *screen = &term->screen;
@@ -638,22 +623,22 @@
}
void
-HandleSelectSet(w, event, params, num_params)
- Widget w;
- XEvent *event;
- String *params;
- Cardinal *num_params;
+HandleSelectSet(
+ Widget w,
+ XEvent *event,
+ String *params,
+ Cardinal *num_params)
{
SelectSet (w, event, params, *num_params);
}
/* ARGSUSED */
static void
-SelectSet (w, event, params, num_params)
- Widget w GCC_UNUSED;
- XEvent *event GCC_UNUSED;
- String *params;
- Cardinal num_params;
+SelectSet (
+ Widget w GCC_UNUSED,
+ XEvent *event GCC_UNUSED,
+ String *params,
+ Cardinal num_params)
{
/* Only do select stuff if non-null select */
if (startSRow != endSRow || startSCol != endSCol) {
@@ -666,12 +651,12 @@
#define Abs(x) ((x) < 0 ? -(x) : (x))
/* ARGSUSED */
-static void do_start_extend (w, event, params, num_params, use_cursor_loc)
-Widget w;
-XEvent *event; /* must be XButtonEvent* */
-String *params GCC_UNUSED;
-Cardinal *num_params GCC_UNUSED;
-Bool use_cursor_loc;
+static void do_start_extend (
+ Widget w,
+ XEvent *event, /* must be XButtonEvent* */
+ String *params GCC_UNUSED,
+ Cardinal *num_params GCC_UNUSED,
+ Bool use_cursor_loc)
{
TScreen *screen;
int row, col, coord;
@@ -726,8 +711,7 @@
}
static void
-ExtendExtend (row, col)
- int row, col;
+ExtendExtend (int row, int col)
{
int coord = Coordinate(row, col);
@@ -756,28 +740,26 @@
}
-void HandleStartExtend(w, event, params, num_params)
-Widget w;
-XEvent *event; /* must be XButtonEvent* */
-String *params; /* unused */
-Cardinal *num_params; /* unused */
+void HandleStartExtend(
+ Widget w,
+ XEvent *event, /* must be XButtonEvent* */
+ String *params, /* unused */
+ Cardinal *num_params) /* unused */
{
do_start_extend (w, event, params, num_params, False);
}
-void HandleKeyboardStartExtend(w, event, params, num_params)
-Widget w;
-XEvent *event; /* must be XButtonEvent* */
-String *params; /* unused */
-Cardinal *num_params; /* unused */
+void HandleKeyboardStartExtend(
+ Widget w,
+ XEvent *event, /* must be XButtonEvent* */
+ String *params, /* unused */
+ Cardinal *num_params) /* unused */
{
do_start_extend (w, event, params, num_params, True);
}
void
-ScrollSelection(screen, amount)
-register TScreen* screen;
-register int amount;
+ScrollSelection(register TScreen* screen, register int amount)
{
register int minrow = -screen->savedlines - screen->topline;
register int maxrow = screen->max_row - screen->topline;
@@ -811,9 +793,7 @@
/*ARGSUSED*/
void
-ResizeSelection (screen, rows, cols)
- TScreen *screen GCC_UNUSED;
- int rows, cols;
+ResizeSelection (TScreen *screen GCC_UNUSED, int rows, int cols)
{
rows--; /* decr to get 0-max */
cols--;
@@ -832,9 +812,11 @@
}
static void
-PointToRowCol(y, x, r, c)
- register int y, x;
- int *r, *c;
+PointToRowCol(
+ register int y,
+ register int x,
+ int *r,
+ int *c)
/* Convert pixel coordinates to character coordinates.
Rows are clipped between firstValidRow and lastValidRow.
Columns are clipped between to be 0 or greater, but are not clipped to some
@@ -859,8 +841,7 @@
}
static int
-LastTextCol(row)
- register int row;
+LastTextCol(register int row)
{
register TScreen *screen = &term->screen;
register int i;
@@ -950,9 +931,10 @@
/* o/ u` u' u^ u: y' P y: */
48, 48, 48, 48, 48, 48, 48, 48};
-int SetCharacterClassRange (low, high, value)
- register int low, high; /* in range of [0..255] */
- register int value; /* arbitrary */
+int SetCharacterClassRange (
+ register int low, /* in range of [0..255] */
+ register int high,
+ register int value) /* arbitrary */
{
if (low < 0 || high > 255 || high < low) return (-1);
@@ -968,9 +950,12 @@
*/
static void
-ComputeSelect(startRow, startCol, endRow, endCol, extend)
- int startRow, startCol, endRow, endCol;
- Bool extend;
+ComputeSelect(
+ int startRow,
+ int startCol,
+ int endRow,
+ int endCol,
+ Bool extend)
{
register TScreen *screen = &term->screen;
register Char *ptr;
@@ -1059,8 +1044,11 @@
}
void
-TrackText(frow, fcol, trow, tcol)
- register int frow, fcol, trow, tcol;
+TrackText(
+ register int frow,
+ register int fcol,
+ register int trow,
+ register int tcol)
/* Guaranteed (frow, fcol) <= (trow, tcol) */
{
register int from, to;
@@ -1104,8 +1092,11 @@
}
static void
-ReHiliteText(frow, fcol, trow, tcol)
- register int frow, fcol, trow, tcol;
+ReHiliteText(
+ register int frow,
+ register int fcol,
+ register int trow,
+ register int tcol)
/* Guaranteed that (frow, fcol) <= (trow, tcol) */
{
register TScreen *screen = &term->screen;
@@ -1141,10 +1132,10 @@
}
static void
-SaltTextAway(crow, ccol, row, col, params, num_params)
- /*register*/ int crow, ccol, row, col;
- String *params; /* selections */
- Cardinal num_params;
+SaltTextAway(
+ int crow, int ccol, int row, int col,
+ String *params, /* selections */
+ Cardinal num_params)
/* Guaranteed that (crow, ccol) <= (row, col), and that both points are valid
(may have row = screen->max_row+1, col = 0) */
{
@@ -1204,13 +1195,15 @@
_OwnSelection(term, params, num_params);
}
-static Boolean ConvertSelection(w, selection, target,
- type, value, length, format)
-Widget w;
-Atom *selection, *target, *type;
-XtPointer *value;
-unsigned long *length;
-int *format;
+static Boolean
+ConvertSelection(
+ Widget w,
+ Atom *selection,
+ Atom *target,
+ Atom *type,
+ XtPointer *value,
+ unsigned long *length,
+ int *format)
{
Display* d = XtDisplay(w);
TScreen *screen;
@@ -1302,9 +1295,8 @@
}
-static void LoseSelection(w, selection)
- Widget w;
- Atom *selection;
+static void
+LoseSelection(Widget w, Atom *selection)
{
register TScreen* screen;
register Atom* atomP;
@@ -1349,18 +1341,20 @@
/* ARGSUSED */
-static void SelectionDone(w, selection, target)
-Widget w GCC_UNUSED;
-Atom *selection GCC_UNUSED, *target GCC_UNUSED;
+static void SelectionDone(
+ Widget w GCC_UNUSED,
+ Atom *selection GCC_UNUSED,
+ Atom *target GCC_UNUSED)
{
/* empty proc so Intrinsics know we want to keep storage */
}
-static void _OwnSelection(termw, selections, count)
- register XtermWidget termw;
- String *selections;
- Cardinal count;
+static void
+_OwnSelection(
+ register XtermWidget termw,
+ String *selections,
+ Cardinal count)
{
Atom* atoms = termw->screen.selection_atoms;
Cardinal i;
@@ -1411,8 +1405,7 @@
}
void
-DisownSelection(termw)
- register XtermWidget termw;
+DisownSelection(register XtermWidget termw)
{
Atom* atoms = termw->screen.selection_atoms;
Cardinal count = termw->screen.selection_count;
@@ -1444,9 +1437,11 @@
/* returns number of chars in line from scol to ecol out */
/* ARGSUSED */
static int
-Length(screen, row, scol, ecol)
- register int row, scol, ecol;
- register TScreen *screen GCC_UNUSED;
+Length(
+ register TScreen *screen GCC_UNUSED,
+ register int row,
+ register int scol,
+ register int ecol)
{
register int lastcol = LastTextCol(row);
@@ -1457,12 +1452,13 @@
/* copies text into line, preallocated */
static char *
-SaveText(screen, row, scol, ecol, lp, eol)
- int row;
- int scol, ecol;
- TScreen *screen;
- register char *lp; /* pointer to where to put the text */
- int *eol;
+SaveText(
+ TScreen *screen,
+ int row,
+ int scol,
+ int ecol,
+ register char *lp, /* pointer to where to put the text */
+ int *eol)
{
register int i = 0;
register Char *ch = SCRN_BUF_CHARS(screen, row + screen->topline);
@@ -1494,8 +1490,7 @@
}
static void
-EditorButton(event)
- register XButtonEvent *event;
+EditorButton(register XButtonEvent *event)
{
register TScreen *screen = &term->screen;
int pty = screen->respond;
@@ -1528,11 +1523,11 @@
/*ARGSUSED*/
#if OPT_TEK4014
-void HandleGINInput (w, event, param_list, nparamsp)
- Widget w GCC_UNUSED;
- XEvent *event GCC_UNUSED;
- String *param_list;
- Cardinal *nparamsp;
+void HandleGINInput (
+ Widget w GCC_UNUSED,
+ XEvent *event GCC_UNUSED,
+ String *param_list,
+ Cardinal *nparamsp)
{
if (term->screen.TekGIN && *nparamsp == 1) {
int c = param_list[0][0];
@@ -1554,11 +1549,11 @@
/* ARGSUSED */
-void HandleSecure(w, event, params, param_count)
- Widget w GCC_UNUSED;
- XEvent *event; /* unused */
- String *params GCC_UNUSED; /* [0] = volume */
- Cardinal *param_count GCC_UNUSED; /* 0 or 1 */
+void HandleSecure(
+ Widget w GCC_UNUSED,
+ XEvent *event, /* unused */
+ String *params GCC_UNUSED, /* [0] = volume */
+ Cardinal *param_count GCC_UNUSED) /* 0 or 1 */
{
Time ev_time = CurrentTime;
Index: charproc.c
--- xterm-76+/charproc.c Fri May 8 20:33:42 1998
+++ xterm-77/charproc.c Mon May 25 20:52:22 1998
@@ -115,45 +115,45 @@
extern Widget toplevel;
extern char *ProgramName;
-static int LoadNewFont PROTO((TScreen *screen, char *nfontname, char *bfontname, Bool doresize, int fontnum));
-static int in_put PROTO((void));
-static int set_character_class PROTO((char *s));
+static int LoadNewFont (TScreen *screen, char *nfontname, char *bfontname, Bool doresize, int fontnum);
+static int in_put (void);
+static int set_character_class (char *s);
static void DoSetSelectedFont PROTO_XT_SEL_CB_ARGS;
-static void FromAlternate PROTO((TScreen *screen));
-static void RequestResize PROTO((XtermWidget termw, int rows, int cols, int text));
-static void SwitchBufs PROTO((TScreen *screen));
-static void ToAlternate PROTO((TScreen *screen));
-static void VTGraphicsOrNoExpose PROTO((XEvent *event));
+static void FromAlternate (TScreen *screen);
+static void RequestResize (XtermWidget termw, int rows, int cols, int text);
+static void SwitchBufs (TScreen *screen);
+static void ToAlternate (TScreen *screen);
+static void VTGraphicsOrNoExpose (XEvent *event);
static void VTNonMaskableEvent PROTO_XT_EV_HANDLER_ARGS;
-static void VTallocbuf PROTO((void));
-static void VTparse PROTO((void));
-static void WriteText PROTO((TScreen *screen, Char *str, int len));
-static void ansi_modes PROTO((XtermWidget termw, void (*func)(unsigned *p, unsigned mask)));
-static void bitclr PROTO((unsigned *p, unsigned mask));
-static void bitcpy PROTO((unsigned *p, unsigned q, unsigned mask));
-static void bitset PROTO((unsigned *p, unsigned mask));
-static void dpmodes PROTO((XtermWidget termw, void (*func)(unsigned *p, unsigned mask)));
-static void report_win_label PROTO((TScreen *screen, int code, XTextProperty *text, Status ok));
-static void restoremodes PROTO((XtermWidget termw));
-static void savemodes PROTO((XtermWidget termw));
-static void set_vt_box PROTO((TScreen *screen));
-static void unparseputn PROTO((unsigned int n, int fd));
-static void update_font_info PROTO((TScreen *screen, Bool doresize));
-static void window_ops PROTO((XtermWidget termw));
+static void VTallocbuf (void);
+static void VTparse (void);
+static void WriteText (TScreen *screen, Char *str, int len);
+static void ansi_modes (XtermWidget termw, void (*func)(unsigned *p, unsigned mask));
+static void bitclr (unsigned *p, unsigned mask);
+static void bitcpy (unsigned *p, unsigned q, unsigned mask);
+static void bitset (unsigned *p, unsigned mask);
+static void dpmodes (XtermWidget termw, void (*func)(unsigned *p, unsigned mask));
+static void report_win_label (TScreen *screen, int code, XTextProperty *text, Status ok);
+static void restoremodes (XtermWidget termw);
+static void savemodes (XtermWidget termw);
+static void set_vt_box (TScreen *screen);
+static void unparseputn (unsigned int n, int fd);
+static void update_font_info (TScreen *screen, Bool doresize);
+static void window_ops (XtermWidget termw);
#if OPT_BLINK_CURS
-static void BlinkCursor PROTO(( XtPointer closure, XtIntervalId* id));
-static void StartBlinking PROTO((TScreen *screen));
-static void StopBlinking PROTO((TScreen *screen));
+static void BlinkCursor ( XtPointer closure, XtIntervalId* id);
+static void StartBlinking (TScreen *screen);
+static void StopBlinking (TScreen *screen);
#else
#define StartBlinking(screen) /* nothing */
#define StopBlinking(screen) /* nothing */
#endif
#if OPT_ISO_COLORS
-static void setExtendedFG PROTO((void));
-static void reset_SGR_Colors PROTO((void));
-static void reset_SGR_Foreground PROTO((void));
+static void setExtendedFG (void);
+static void reset_SGR_Colors (void);
+static void reset_SGR_Foreground (void);
#endif
#define DEFAULT -1
@@ -221,6 +221,7 @@
#define XtNpointerColorBackground "pointerColorBackground"
#define XtNpointerShape "pointerShape"
#define XtNprintAttributes "printAttributes"
+#define XtNprinterAutoClose "printerAutoClose"
#define XtNprinterCommand "printerCommand"
#define XtNprinterControlMode "printerControlMode"
#define XtNprinterExtent "printerExtent"
@@ -291,6 +292,7 @@
#define XtCMultiClickTime "MultiClickTime"
#define XtCMultiScroll "MultiScroll"
#define XtCPrintAttributes "PrintAttributes"
+#define XtCPrinterAutoClose "PrinterAutoClose"
#define XtCPrinterCommand "PrinterCommand"
#define XtCPrinterControlMode "PrinterControlMode"
#define XtCPrinterExtent "PrinterExtent"
@@ -601,6 +603,9 @@
XtOffsetOf(XtermWidgetRec, screen.print_attributes),
XtRInt, (XtPointer) &defaultONE},
#endif
+{XtNprinterAutoClose,XtCPrinterAutoClose, XtRBoolean, sizeof(Boolean),
+ XtOffsetOf(XtermWidgetRec, screen.printer_autoclose),
+ XtRBoolean, (XtPointer) &defaultFALSE},
{XtNprinterControlMode, XtCPrinterControlMode, XtRInt, sizeof(int),
XtOffsetOf(XtermWidgetRec, screen.printer_controlmode),
XtRInt, (XtPointer) &defaultZERO},
@@ -816,16 +821,16 @@
#endif /* NO_ACTIVE_ICON */
};
-static void VTClassInit PROTO((void));
-static void VTInitialize PROTO((Widget wrequest, Widget wnew, ArgList args, Cardinal *num_args));
-static void VTRealize PROTO((Widget w, XtValueMask *valuemask, XSetWindowAttributes *values));
-static void VTExpose PROTO((Widget w, XEvent *event, Region region));
-static void VTResize PROTO((Widget w));
-static void VTDestroy PROTO((Widget w));
-static Boolean VTSetValues PROTO((Widget cur, Widget request, Widget new, ArgList args, Cardinal *num_args));
+static void VTClassInit (void);
+static void VTInitialize (Widget wrequest, Widget wnew, ArgList args, Cardinal *num_args);
+static void VTRealize (Widget w, XtValueMask *valuemask, XSetWindowAttributes *values);
+static void VTExpose (Widget w, XEvent *event, Region region);
+static void VTResize (Widget w);
+static void VTDestroy (Widget w);
+static Boolean VTSetValues (Widget cur, Widget request, Widget new, ArgList args, Cardinal *num_args);
#if OPT_I18N_SUPPORT && OPT_INPUT_METHOD
-static void VTInitI18N PROTO((void));
+static void VTInitI18N (void);
#endif
static WidgetClassRec xtermClassRec = {
@@ -2672,7 +2677,7 @@
static void
ansi_modes(termw, func)
XtermWidget termw;
- void (*func) PROTO((unsigned *p, unsigned mask));
+ void (*func) (unsigned *p, unsigned mask);
{
register int i;
@@ -2704,7 +2709,7 @@
static void
dpmodes(termw, func)
XtermWidget termw;
- void (*func) PROTO((unsigned *p, unsigned mask));
+ void (*func) (unsigned *p, unsigned mask);
{
register TScreen *screen = &termw->screen;
register int i, j;
@@ -3723,6 +3728,7 @@
new->screen.pointer_cursor = request->screen.pointer_cursor;
new->screen.printer_command = request->screen.printer_command;
+ new->screen.printer_autoclose = request->screen.printer_autoclose;
new->screen.printer_extent = request->screen.printer_extent;
new->screen.printer_formfeed = request->screen.printer_formfeed;
new->screen.printer_controlmode = request->screen.printer_controlmode;
@@ -4108,9 +4114,10 @@
#if OPT_I18N_SUPPORT && OPT_INPUT_METHOD
static void VTInitI18N()
{
- int i;
+ unsigned i;
char *p,
*s,
+ *t,
*ns,
*end,
buf[32];
@@ -4127,24 +4134,31 @@
if ((p = XSetLocaleModifiers("@im=none")) != NULL && *p)
xim = XOpenIM(XtDisplay(term), NULL, NULL, NULL);
} else {
- for(ns=s=term->misc.input_method; ns && *s;) {
+ s = term->misc.input_method;
+ i = 5 + strlen(s);
+ t = MyStackAlloc(i, buf);
+ if (t == NULL)
+ SysError(ERROR_VINIT);
+
+ for(ns = s; ns && *s;) {
while (*s && isspace(*s)) s++;
if (!*s) break;
if ((ns = end = strchr(s, ',')) == 0)
end = s + strlen(s);
- while (isspace(*end)) end--;
-
- strcpy(buf, "@im=");
- if (end - (s + (sizeof(buf) - 5)) > 0)
- end = s + (sizeof(buf) - 5);
- strncat(buf, s, end - s);
+ while ((end != s) && isspace(end[-1])) end--;
- if ((p = XSetLocaleModifiers(buf)) != NULL && *p
- && (xim = XOpenIM(XtDisplay(term), NULL, NULL, NULL)) != NULL)
- break;
+ if (end != s) {
+ strcpy(t, "@im=");
+ strncat(t, s, end - s);
+
+ if ((p = XSetLocaleModifiers(t)) != 0 && *p
+ && (xim = XOpenIM(XtDisplay(term), NULL, NULL, NULL)) != 0)
+ break;
+ }
s = ns + 1;
}
+ MyStackFree(t, buf);
}
if (xim == NULL && (p = XSetLocaleModifiers("@im=none")) != NULL && *p)
@@ -4170,20 +4184,23 @@
ns++;
else
end = s + strlen(s);
- while (isspace(*end)) end--;
+ while ((end != s) && isspace(end[-1])) end--;
- if (!strncmp(s, "OverTheSpot", end - s)) {
- input_style = (XIMPreeditPosition | XIMStatusArea);
- } else if (!strncmp(s, "OffTheSpot", end - s)) {
- input_style = (XIMPreeditArea | XIMStatusArea);
- } else if (!strncmp(s, "Root", end - s)) {
- input_style = (XIMPreeditNothing | XIMStatusNothing);
- }
- for (i = 0; (unsigned short)i < xim_styles->count_styles; i++)
- if (input_style == xim_styles->supported_styles[i]) {
- found = True;
- break;
+ if (end != s) { /* just in case we have a spurious comma */
+ if (!strncmp(s, "OverTheSpot", end - s)) {
+ input_style = (XIMPreeditPosition | XIMStatusArea);
+ } else if (!strncmp(s, "OffTheSpot", end - s)) {
+ input_style = (XIMPreeditArea | XIMStatusArea);
+ } else if (!strncmp(s, "Root", end - s)) {
+ input_style = (XIMPreeditNothing | XIMStatusNothing);
}
+ for (i = 0; (unsigned short)i < xim_styles->count_styles; i++) {
+ if (input_style == xim_styles->supported_styles[i]) {
+ found = True;
+ break;
+ }
+ }
+ }
s = ns;
}
@@ -4718,6 +4735,9 @@
};
char mapName[1000];
char mapClass[1000];
+ char* pmapName;
+ char* pmapClass;
+ size_t len;
if (*param_count != 1) return;
@@ -4727,13 +4747,25 @@
XtOverrideTranslations(w, original);
return;
}
- (void) sprintf( mapName, "%.*sKeymap", (int)sizeof(mapName) - 10, params[0] );
- (void) strcpy( mapClass, mapName );
- if (islower(mapClass[0])) mapClass[0] = toupper(mapClass[0]);
- XtGetSubresources( w, (XtPointer)&keymap, mapName, mapClass,
+
+ len = strlen (params[0]) + 7;
+
+ pmapName = MyStackAlloc(len, mapName);
+ pmapClass = MyStackAlloc(len, mapClass);
+ if (pmapName == NULL
+ || pmapClass == NULL)
+ SysError(ERROR_KMMALLOC1);
+
+ (void) sprintf( pmapName, "%sKeymap", params[0] );
+ (void) strcpy( pmapClass, pmapName );
+ if (islower(pmapClass[0])) pmapClass[0] = toupper(pmapClass[0]);
+ XtGetSubresources( w, (XtPointer)&keymap, pmapName, pmapClass,
key_resources, (Cardinal)1, NULL, (Cardinal)0 );
if (keymap != NULL)
XtOverrideTranslations(w, keymap);
+
+ MyStackFree(pmapName, mapName);
+ MyStackFree(pmapClass, mapClass);
}
Index: config.guess
--- xterm-76+/config.guess Fri Sep 19 13:58:52 1997
+++ xterm-77/config.guess Sat May 23 18:22:14 1998
@@ -1,7 +1,4 @@
#! /bin/sh
-#
-# $XFree86: xc/programs/xterm/config.guess,v 1.2 1997/09/19 11:24:41 hohndel Exp $
-#
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 93, 94, 95, 1996 Free Software Foundation, Inc.
#
@@ -455,9 +452,23 @@
i?86:DYNIX/ptx:4*:*)
echo i386-sequent-sysv4
exit 0 ;;
+ # SysVr5/Unixware7
+ i?86:*:5*:* | i?86:SYSTEM_V:5*:*)
+ if uname -a | grep SCO >/dev/null 2>/dev/null ; then
+ (/bin/uname -s|egrep UnixWare >/dev/null) && UNAME_VER=uw${UNAME_VERSION}
+ if /bin/uname -X 2>/dev/null >/dev/null ; then
+ (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
+ (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
+ && UNAME_MACHINE=i586
+ fi
+ echo ${UNAME_MACHINE}-sco-sysv${UNAME_RELEASE}${UNAME_VER}
+ else
+ echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}
+ fi
+ exit 0 ;;
i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*)
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
- echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE}
+ echo ${UNAME_MACHINE}-univel-sysv4.2uw${UNAME_VERSION}
else
echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
fi
Index: ctlseqs.ms
--- xterm-76+/ctlseqs.ms Sun Apr 5 23:48:23 1998
+++ xterm-77/ctlseqs.ms Mon May 25 13:14:00 1998
@@ -632,10 +632,12 @@
\*(Ps = \*4 \(-> Underlined
\*(Ps = \*5 \(-> Blink (appears as Bold)
\*(Ps = \*7 \(-> Inverse
+ \*(Ps = \*8 \(-> Invisible (hidden)
\*(Ps = \*2\*2 \(-> Normal (neither bold nor faint)
\*(Ps = \*2\*4 \(-> Not underlined
\*(Ps = \*2\*5 \(-> Steady (not blinking)
\*(Ps = \*2\*7 \(-> Positive (not inverse)
+ \*(Ps = \*2\*8 \(-> Visible (not hidden)
\*(Ps = \*3\*0 \(-> Set foreground color to Black
\*(Ps = \*3\*1 \(-> Set foreground color to Red
\*(Ps = \*3\*2 \(-> Set foreground color to Green
Index: cursor.c
--- xterm-76+/cursor.c Sat Mar 28 07:19:24 1998
+++ xterm-77/cursor.c Mon May 25 21:06:47 1998
@@ -37,10 +37,7 @@
#include "data.h"
#include "xterm.h"
-static void _CheckSelection PROTO((TScreen *screen));
-
-static void _CheckSelection(screen)
-register TScreen *screen;
+static void _CheckSelection (register TScreen *screen)
{
if (screen->cur_row > screen->endHRow ||
(screen->cur_row == screen->endHRow &&
@@ -58,10 +55,7 @@
* The origin is considered to be 0, 0 for this procedure.
*/
void
-CursorSet(screen, row, col, flags)
-register TScreen *screen;
-register int row, col;
-unsigned flags;
+CursorSet(register TScreen *screen, register int row, register int col, unsigned flags)
{
register int maxr;
@@ -82,9 +76,7 @@
* moves the cursor left n, no wrap around
*/
void
-CursorBack(screen, n)
-register TScreen *screen;
-int n;
+CursorBack(register TScreen *screen, int n)
{
register int i, j, k, rev;
@@ -112,9 +104,7 @@
* moves the cursor forward n, no wraparound
*/
void
-CursorForward(screen, n)
-register TScreen *screen;
-int n;
+CursorForward(register TScreen *screen, int n)
{
screen->cur_col += n;
if (screen->cur_col > screen->max_col)
@@ -128,9 +118,7 @@
* Won't pass bottom margin or bottom of screen.
*/
void
-CursorDown(screen, n)
-register TScreen *screen;
-int n;
+CursorDown(register TScreen *screen, int n)
{
register int max;
@@ -149,9 +137,7 @@
* Won't pass top margin or top of screen.
*/
void
-CursorUp(screen, n)
-register TScreen *screen;
-int n;
+CursorUp(register TScreen *screen, int n)
{
register int min;
@@ -170,9 +156,7 @@
* Won't leave scrolling region. No carriage return.
*/
void
-Index(screen, amount)
-register TScreen *screen;
-register int amount;
+Index(register TScreen *screen, register int amount)
{
register int j;
@@ -195,9 +179,7 @@
* Won't leave scrolling region. No carriage return.
*/
void
-RevIndex(screen, amount)
-register TScreen *screen;
-register int amount;
+RevIndex(register TScreen *screen, register int amount)
{
/*
* reverse indexing when above scrolling region is cursor up.
@@ -218,8 +200,7 @@
* (Note: xterm doesn't implement SLH, SLL which would affect use of this)
*/
void
-CarriageReturn(screen)
-register TScreen *screen;
+CarriageReturn(register TScreen *screen)
{
screen->cur_col = 0;
screen->do_wrap = 0;
@@ -230,9 +211,7 @@
* Save Cursor and Attributes
*/
void
-CursorSave(tw, sc)
-register XtermWidget tw;
-register SavedCursor *sc;
+CursorSave(register XtermWidget tw, register SavedCursor *sc)
{
register TScreen *screen = &tw->screen;
@@ -260,9 +239,7 @@
* Restore Cursor and Attributes
*/
void
-CursorRestore(tw, sc)
-register XtermWidget tw;
-register SavedCursor *sc;
+CursorRestore(register XtermWidget tw, register SavedCursor *sc)
{
register TScreen *screen = &tw->screen;
@@ -296,9 +273,7 @@
* Move the cursor to the first column of the n-th next line.
*/
void
-CursorNextLine(screen, count)
- TScreen *screen;
- int count;
+CursorNextLine(TScreen *screen, int count)
{
CursorDown(screen, count < 1 ? 1 : count);
CarriageReturn(screen);
@@ -309,9 +284,7 @@
* Move the cursor to the first column of the n-th previous line.
*/
void
-CursorPrevLine(screen, count)
- TScreen *screen;
- int count;
+CursorPrevLine(TScreen *screen, int count)
{
CursorUp(screen, count < 1 ? 1 : count);
CarriageReturn(screen);
Index: doublechr.c
--- xterm-76+/doublechr.c Tue Jul 29 15:13:30 1997
+++ xterm-77/doublechr.c Mon May 25 21:04:10 1998
@@ -50,11 +50,8 @@
#define curChrSet SCRN_BUF_CSETS(screen, screen->cur_row)[0]
#if OPT_DEC_CHRSET
-static void repaint_line PROTO((unsigned set));
-
static void
-repaint_line(newChrSet)
- unsigned newChrSet;
+repaint_line(unsigned newChrSet)
{
register TScreen *screen = &term->screen;
int curcol = screen->cur_col;
@@ -86,8 +83,7 @@
* we'll be using it for the top (true) or bottom (false) of the line.
*/
void
-xterm_DECDHL(top)
- Bool top;
+xterm_DECDHL(Bool top)
{
#if OPT_DEC_CHRSET
repaint_line(top ? CSET_DHL_TOP : CSET_DHL_BOT);
@@ -98,7 +94,7 @@
* Set the line to single-width characters (the normal state).
*/
void
-xterm_DECSWL()
+xterm_DECSWL(void)
{
#if OPT_DEC_CHRSET
repaint_line(CSET_SWL);
@@ -109,7 +105,7 @@
* Set the line to double-width characters
*/
void
-xterm_DECDWL()
+xterm_DECDWL(void)
{
#if OPT_DEC_CHRSET
repaint_line(CSET_DWL);
Index: error.h
--- xterm-76+/error.h Sat Dec 6 10:24:45 1997
+++ xterm-77/error.h Mon May 25 17:49:20 1998
@@ -70,6 +70,7 @@
#define ERROR_VINIT 54 /* VTInit: can't initialize window */
#define ERROR_CNMALLOC1 55 /* Changename: malloc failed */
#define ERROR_CNMALLOC2 56 /* Changename: malloc failed */
+#define ERROR_KMMALLOC1 57 /* HandleKeymapChange: malloc failed */
/* Tekproc.c */
#define ERROR_TSELECT 60 /* Tinput: select() failed */
#define ERROR_TINIT 64 /* TekInit: can't initialize window */
Index: input.c
--- xterm-76+/input.c Tue Apr 28 15:01:01 1998
+++ xterm-77/input.c Mon May 25 21:18:13 1998
@@ -49,13 +49,11 @@
static char *kypd_apl = " ABCDEFGHIJKLMNOPQRSTUVWXYZ??????abcdefghijklmnopqrstuvwxyzXXX";
static char *cur = "HDACB FE";
-static int decfuncvalue PROTO((KeySym keycode));
-static int sunfuncvalue PROTO((KeySym keycode));
-static void AdjustAfterInput PROTO((TScreen *screen));
+static int decfuncvalue (KeySym keycode);
+static int sunfuncvalue (KeySym keycode);
static void
-AdjustAfterInput (screen)
-register TScreen *screen;
+AdjustAfterInput (register TScreen *screen)
{
if(screen->scrollkey && screen->topline != 0)
WindowScroll(screen, 0);
@@ -76,11 +74,11 @@
}
void
-Input (keyboard, screen, event, eightbit)
- register TKeyboard *keyboard;
- register TScreen *screen;
- register XKeyEvent *event;
- Bool eightbit;
+Input (
+ register TKeyboard *keyboard,
+ register TScreen *screen,
+ register XKeyEvent *event,
+ Bool eightbit)
{
#define STRBUFSIZE 500
@@ -280,10 +278,7 @@
}
void
-StringInput (screen, string, nbytes)
- register TScreen *screen;
- register char *string;
- size_t nbytes;
+StringInput ( register TScreen *screen, register char *string, size_t nbytes)
{
int pty = screen->respond;
@@ -301,8 +296,8 @@
}
/* These definitions are DEC-style (e.g., vt320) */
-static int decfuncvalue (keycode)
- KeySym keycode;
+static int
+decfuncvalue (KeySym keycode)
{
switch (keycode) {
case XK_F1: return(11);
@@ -346,8 +341,8 @@
}
-static int sunfuncvalue (keycode)
- KeySym keycode;
+static int
+sunfuncvalue (KeySym keycode)
{
switch (keycode) {
case XK_F1: return(224);
Index: main.c
--- xterm-76+/main.c Fri May 8 20:27:45 1998
+++ xterm-77/main.c Mon May 25 20:54:38 1998
@@ -179,6 +179,14 @@
#define WTMP
#endif
+#ifdef __CYGWIN32__
+#define SYSV
+#define SVR4
+#define LASTLOG
+#define WTMP
+#define ATT
+#endif
+
#ifdef Lynx
#define USE_SYSV_TERMIO
#undef TIOCSLTC
@@ -193,7 +201,10 @@
#define _SVID3
#endif
+#ifndef __CYGWIN32__
#include <sys/ioctl.h>
+#endif
+
#include <sys/stat.h>
#ifdef Lynx
@@ -255,7 +266,7 @@
#define USE_SYSV_TERMIO
#define USE_SYSV_SIGNALS
#define USE_SYSV_PGRP
-#if defined(__hpux) || !defined(TIOCSWINSZ)
+#if !defined(TIOCSWINSZ)
#define USE_SYSV_ENVVARS /* COLUMNS/LINES vs. TERMCAP */
#endif
/*
@@ -283,13 +294,13 @@
#define USE_POSIX_WAIT
#define HAS_UTMP_UT_HOST
#endif /* SCO */
-#ifdef __hpux
+#ifdef __hpux
#define HAS_BSD_GROUPS
#define USE_SYSV_UTMP
#define HAS_UTMP_UT_HOST
#define USE_POSIX_WAIT
#include <sys/ptyio.h>
-#endif /* __hpux */
+#endif /* __hpux */
#ifdef __sgi
#define HAS_BSD_GROUPS
#include <sys/sysmacros.h>
@@ -355,9 +366,9 @@
#include <time.h>
#endif
-#ifdef __hpux
+#ifdef __hpux
#include <sys/utsname.h>
-#endif /* __hpux */
+#endif /* __hpux */
#if defined(apollo) && OSMAJORVERSION == 10 && OSMINORVERSION < 4
#define ttyslot() 1
@@ -367,7 +378,7 @@
#include <sys/filio.h>
#endif
-#if defined(SVR4) || defined(SCO325)
+#if (defined(SVR4) || defined(SCO325)) && !defined(__CYGWIN32__)
#include <utmpx.h>
#define setutent setutxent
#define getutent getutxent
@@ -451,7 +462,7 @@
#ifdef SIGTSTP
#include <sys/wait.h>
-#ifdef __hpux
+#ifdef __hpux
#include <sys/bsdtty.h>
#endif
#endif
@@ -472,21 +483,21 @@
int switchfb[] = {0, 2, 1, 3};
-extern int tgetent PROTO((char *ptr, char *name));
+extern int tgetent (char *ptr, char *name);
-static SIGNAL_T reapchild PROTO((int n));
-static char *base_name PROTO((char *name));
-static int pty_search PROTO((int *pty));
-static int remove_termcap_entry PROTO((char *buf, char *str));
-static int spawn PROTO((void));
+static SIGNAL_T reapchild (int n);
+static char *base_name (char *name);
+static int pty_search (int *pty);
+static int remove_termcap_entry (char *buf, char *str);
+static int spawn (void);
static void DeleteWindow PROTO_XT_ACTIONS_ARGS;
-static void Help PROTO((void));
-static void HsSysError PROTO((int pf, int error));
+static void Help (void);
+static void HsSysError (int pf, int error);
static void KeyboardMapping PROTO_XT_ACTIONS_ARGS;
-static void Syntax PROTO((char *badOption));
-static void Version PROTO((void));
-static void get_terminal PROTO((void));
-static void resize PROTO((TScreen *s, char *oldtc, char *newtc));
+static void Syntax (char *badOption);
+static void Version (void);
+static void get_terminal (void);
+static void resize (TScreen *s, char *oldtc, char *newtc);
static Bool added_utmp_entry = False;
@@ -628,7 +639,7 @@
{ NULL, 0, 0, '\0' }, /* end of data */
};
-static int parse_tty_modes PROTO((char *s, struct _xttymodes *modelist));
+static int parse_tty_modes (char *s, struct _xttymodes *modelist);
#ifdef USE_SYSV_UTMP
#if defined(X_NOT_STDC_ENV) || (defined(AIXV3) && OSMAJORVERSION < 4)
@@ -673,8 +684,8 @@
static char passedPty[2]; /* name if pty if slave */
#ifndef AMOEBA
-static int get_pty PROTO((int *pty));
-static SIGNAL_T hungtty PROTO((int i));
+static int get_pty (int *pty);
+static SIGNAL_T hungtty (int i);
#endif
#if defined(TIOCCONS) || defined(SRIOCSREDIR)
@@ -1223,7 +1234,9 @@
d_tio.c_cc[VEOF] = CEOF;
d_tio.c_cc[VEOL] = CNUL;
d_tio.c_cc[VEOL2] = CNUL;
+#ifdef VSWTCH
d_tio.c_cc[VSWTCH] = CNUL;
+#endif
#if defined(USE_TERMIOS) || defined(USE_POSIX_TERMIOS) /* { */
d_tio.c_cc[VSUSP] = CSUSP;
@@ -1651,7 +1664,7 @@
unsigned char *old_bufend;
old_bufend = (unsigned char *) _bufend(stderr);
-#ifdef __hpux
+#ifdef __hpux
stderr->__fileH = (i >> 8);
stderr->__fileL = i;
#else
@@ -1897,12 +1910,12 @@
/*
* Use the clone device if it works, otherwise use pty_search logic.
*/
- if ((*pty = open("/dev/ptym/clone", O_RDWR)) >= 0) {
- strcpy(ttydev, ptsname(*pty));
- return(0);
- }
-#endif
-
+ if ((*pty = open("/dev/ptym/clone", O_RDWR)) >= 0) {
+ strcpy(ttydev, ptsname(*pty));
+ return(0);
+ }
+#endif
+
return pty_search(pty);
#endif /* __sgi or umips else */
@@ -2181,7 +2194,7 @@
#endif /* sun */
struct passwd *pw = NULL;
#ifdef UTMP
-#if defined(SVR4) || defined(SCO325)
+#if (defined(SVR4) || defined(SCO325)) && !defined(__CYGWIN32__)
struct utmpx utmp;
#else
struct utmp utmp;
@@ -2808,6 +2821,12 @@
#undef TMODE
#ifdef TIOCSLTC
+#ifdef __hpux
+ /* ioctl chokes when the "reserved" process group controls
+ * are not set to _POSIX_VDISABLE */
+ ltc.t_rprntc = ltc.t_rprntc = ltc.t_flushc =
+ ltc.t_werasc = ltc.t_lnextc = _POSIX_VDISABLE;
+#endif /* __hpux */
if (ioctl (tty, TIOCSLTC, <c) == -1)
HsSysError(cp_pipe[1], ERROR_TIOCSETC);
#endif /* TIOCSLTC */
@@ -2922,9 +2941,9 @@
#ifdef UTMP
envsize += 2; /* HOME, SHELL */
#endif /* UTMP */
-#ifdef OWN_TERMINFO_DIR
- envsize += 1; /* TERMINFO */
-#endif
+#ifdef OWN_TERMINFO_DIR
+ envsize += 1; /* TERMINFO */
+#endif
#else /* USE_SYSV_ENVVARS */
envsize += 1; /* TERMCAP */
#endif /* USE_SYSV_ENVVARS */
@@ -3270,9 +3289,9 @@
Setenv("SHELL=", pw->pw_shell);
}
#endif /* UTMP */
-#ifdef OWN_TERMINFO_DIR
- Setenv("TERMINFO=", OWN_TERMINFO_DIR);
-#endif
+#ifdef OWN_TERMINFO_DIR
+ Setenv("TERMINFO=", OWN_TERMINFO_DIR);
+#endif
#else /* USE_SYSV_ENVVARS */
if(!TEK4014_ACTIVE(screen) && *newtc) {
strcpy (termcap, newtc);
@@ -3444,7 +3463,7 @@
/* hung sh problem? */
signal (SIGHUP, SIG_DFL);
#else
- signal (SIGHUP,SIG_IGN);
+ signal (SIGHUP, SIG_IGN);
#endif
/*
@@ -3914,7 +3933,7 @@
updwtmpx(WTMPX_FILE, &utmp);
#else
#if defined(linux) && __GLIBC__ >= 2
- strncpy (utmp.ut_line, utptr->ut_line, sizeof (utmp.ut_line));
+ strncpy (utmp.ut_line, utptr->ut_line, sizeof (utmp.ut_line));
if (term->misc.login_shell)
updwtmp(etc_wtmp, &utmp);
#else
@@ -3967,13 +3986,13 @@
if (!am_slave) {
/* restore ownership of tty and pty */
chown (ttydev, 0, 0);
-#if (!defined(__sgi) && !defined(__osf__) && !defined(__hpux))
+#if (!defined(__sgi) && !defined(__osf__) && !defined(__hpux))
chown (ptydev, 0, 0);
#endif
/* restore modes of tty and pty */
chmod (ttydev, 0666);
-#if (!defined(__sgi) && !defined(__osf__) && !defined(__hpux))
+#if (!defined(__sgi) && !defined(__osf__) && !defined(__hpux))
chmod (ptydev, 0666);
#endif
}
@@ -4187,6 +4206,16 @@
long arg;
ioctl (fd, FIONREAD, (char *) &arg);
return (int) arg;
+#elif defined(__CYGWIN32__)
+ fd_set set;
+ struct timeval timeout = {0, 0};
+
+ FD_ZERO (&set);
+ FD_SET (fd, &set);
+ if (select (fd+1, &set, NULL, NULL, &timeout) > 0)
+ return 1;
+ else
+ return 0;
#else
#ifdef MINIX
/* The answer doesn't have to correct. Calling nbio_isinprogress is
Index: menu.c
--- xterm-76+/menu.c Fri May 8 18:57:40 1998
+++ xterm-77/menu.c Mon May 25 22:09:46 1998
@@ -110,8 +110,8 @@
static void do_vtmode PROTO_XT_CALLBACK_ARGS;
static void do_vtonoff PROTO_XT_CALLBACK_ARGS;
static void do_vtshow PROTO_XT_CALLBACK_ARGS;
-static void handle_tekshow PROTO((Widget gw, Bool allowswitch));
-static void handle_vtshow PROTO((Widget gw, Bool allowswitch));
+static void handle_tekshow (Widget gw, Bool allowswitch);
+static void handle_vtshow (Widget gw, Bool allowswitch);
#endif
/*
@@ -199,28 +199,23 @@
{ "tekhide", do_tekhide, NULL }}; /* 11 */
#endif
-static Bool domenu
- PROTO((Widget w,
- XEvent *event,
- String *params,
- Cardinal *param_count));
-
-static Widget create_menu
- PROTO((XtermWidget xtw,
+static Widget create_menu (
+ XtermWidget xtw,
Widget toplevelw,
char *name,
struct _MenuEntry *entries,
- int nentries));
+ int nentries);
-static void handle_send_signal PROTO(( Widget gw, int sig));
+static void handle_send_signal (Widget gw, int sig);
-static void handle_toggle
- PROTO((void (*proc)PROTO_XT_CALLBACK_ARGS,
+static void handle_toggle (
+ void (*proc)PROTO_XT_CALLBACK_ARGS,
int var,
String *params,
Cardinal nparams,
Widget w,
- XtPointer closure, XtPointer data));
+ XtPointer closure,
+ XtPointer data);
extern Widget toplevel;
@@ -241,11 +236,11 @@
*/
/* ARGSUSED */
-static Bool domenu (w, event, params, param_count)
- Widget w GCC_UNUSED;
- XEvent *event GCC_UNUSED;
- String *params; /* mainMenu, vtMenu, or tekMenu */
- Cardinal *param_count; /* 0 or 1 */
+static Bool domenu (
+ Widget w GCC_UNUSED,
+ XEvent *event GCC_UNUSED,
+ String *params, /* mainMenu, vtMenu, or tekMenu */
+ Cardinal *param_count) /* 0 or 1 */
{
TScreen *screen = &term->screen;
@@ -353,20 +348,20 @@
return True;
}
-void HandleCreateMenu (w, event, params, param_count)
- Widget w;
- XEvent *event; /* unused */
- String *params; /* mainMenu, vtMenu, or tekMenu */
- Cardinal *param_count; /* 0 or 1 */
+void HandleCreateMenu (
+ Widget w,
+ XEvent *event, /* unused */
+ String *params, /* mainMenu, vtMenu, or tekMenu */
+ Cardinal *param_count) /* 0 or 1 */
{
(void) domenu (w, event, params, param_count);
}
-void HandlePopupMenu (w, event, params, param_count)
- Widget w;
- XEvent *event; /* unused */
- String *params; /* mainMenu, vtMenu, or tekMenu */
- Cardinal *param_count; /* 0 or 1 */
+void HandlePopupMenu (
+ Widget w,
+ XEvent *event, /* unused */
+ String *params, /* mainMenu, vtMenu, or tekMenu */
+ Cardinal *param_count) /* 0 or 1 */
{
if (domenu (w, event, params, param_count)) {
XtCallActionProc (w, "XawPositionSimpleMenu", event, params, 1);
@@ -383,12 +378,13 @@
* create_menu - create a popup shell and stuff the menu into it.
*/
-static Widget create_menu (xtw, toplevelw, name, entries, nentries)
- XtermWidget xtw;
- Widget toplevelw;
- char *name;
- struct _MenuEntry *entries;
- int nentries;
+static Widget
+create_menu (
+ XtermWidget xtw,
+ Widget toplevelw,
+ char *name,
+ struct _MenuEntry *entries,
+ int nentries)
{
Widget m;
TScreen *screen = &xtw->screen;
@@ -419,9 +415,7 @@
}
/* ARGSUSED */
-static void handle_send_signal (gw, sig)
- Widget gw GCC_UNUSED;
- int sig;
+static void handle_send_signal (Widget gw GCC_UNUSED, int sig)
{
register TScreen *screen = &term->screen;
@@ -434,15 +428,15 @@
*/
/* ARGSUSED */
-void DoSecureKeyboard (tp)
- Time tp GCC_UNUSED;
+void DoSecureKeyboard (Time tp GCC_UNUSED)
{
do_securekbd (term->screen.mainMenu, (XtPointer)0, (XtPointer)0);
}
-static void do_securekbd (gw, closure, data)
- Widget gw GCC_UNUSED;
- XtPointer closure GCC_UNUSED, data GCC_UNUSED;
+static void do_securekbd (
+ Widget gw GCC_UNUSED,
+ XtPointer closure GCC_UNUSED,
+ XtPointer data GCC_UNUSED)
{
register TScreen *screen = &term->screen;
Time now = CurrentTime; /* XXX - wrong */
@@ -465,9 +459,10 @@
}
-static void do_allowsends (gw, closure, data)
- Widget gw GCC_UNUSED;
- XtPointer closure GCC_UNUSED, data GCC_UNUSED;
+static void do_allowsends (
+ Widget gw GCC_UNUSED,
+ XtPointer closure GCC_UNUSED,
+ XtPointer data GCC_UNUSED)
{
register TScreen *screen = &term->screen;
@@ -475,9 +470,10 @@
update_allowsends ();
}
-static void do_visualbell (gw, closure, data)
- Widget gw GCC_UNUSED;
- XtPointer closure GCC_UNUSED, data GCC_UNUSED;
+static void do_visualbell (
+ Widget gw GCC_UNUSED,
+ XtPointer closure GCC_UNUSED,
+ XtPointer data GCC_UNUSED)
{
register TScreen *screen = &term->screen;
@@ -486,10 +482,10 @@
}
#ifdef ALLOWLOGGING
-static void do_logging (gw, closure, data)
- Widget gw GCC_UNUSED;
- XtPointer closure GCC_UNUSED;
- XtPointer data GCC_UNUSED;
+static void do_logging (
+ Widget gw GCC_UNUSED,
+ XtPointer closure GCC_UNUSED,
+ XtPointer data GCC_UNUSED)
{
register TScreen *screen = &term->screen;
@@ -502,24 +498,25 @@
}
#endif
-static void do_print (gw, closure, data)
- Widget gw GCC_UNUSED;
- XtPointer closure GCC_UNUSED, data GCC_UNUSED;
+static void do_print (
+ Widget gw GCC_UNUSED,
+ XtPointer closure GCC_UNUSED,
+ XtPointer data GCC_UNUSED)
{
xtermPrintScreen ();
}
-static void do_redraw (gw, closure, data)
- Widget gw GCC_UNUSED;
- XtPointer closure GCC_UNUSED, data GCC_UNUSED;
+static void do_redraw (
+ Widget gw GCC_UNUSED,
+ XtPointer closure GCC_UNUSED,
+ XtPointer data GCC_UNUSED)
{
Redraw ();
}
-void show_8bit_control (value)
- Bool value;
+void show_8bit_control (Bool value)
{
if (term->screen.control_eight_bits != value) {
term->screen.control_eight_bits = value;
@@ -527,24 +524,27 @@
}
}
-static void do_8bit_control (gw, closure, data)
- Widget gw GCC_UNUSED;
- XtPointer closure GCC_UNUSED, data GCC_UNUSED;
+static void do_8bit_control (
+ Widget gw GCC_UNUSED,
+ XtPointer closure GCC_UNUSED,
+ XtPointer data GCC_UNUSED)
{
show_8bit_control(! term->screen.control_eight_bits);
}
-static void do_backarrow (gw, closure, data)
- Widget gw GCC_UNUSED;
- XtPointer closure GCC_UNUSED, data GCC_UNUSED;
+static void do_backarrow (
+ Widget gw GCC_UNUSED,
+ XtPointer closure GCC_UNUSED,
+ XtPointer data GCC_UNUSED)
{
term->keyboard.flags ^= MODE_DECBKM;
update_decbkm();
}
-static void do_sun_fkeys (gw, closure, data)
- Widget gw GCC_UNUSED;
- XtPointer closure GCC_UNUSED, data GCC_UNUSED;
+static void do_sun_fkeys (
+ Widget gw GCC_UNUSED,
+ XtPointer closure GCC_UNUSED,
+ XtPointer data GCC_UNUSED)
{
sunFunctionKeys = ! sunFunctionKeys;
update_sun_fkeys();
@@ -552,9 +552,10 @@
#if OPT_SUNPC_KBD
-static void do_sun_kbd (gw, closure, data)
- Widget gw GCC_UNUSED;
- XtPointer closure GCC_UNUSED, data GCC_UNUSED;
+static void do_sun_kbd (
+ Widget gw GCC_UNUSED,
+ XtPointer closure GCC_UNUSED,
+ XtPointer data GCC_UNUSED)
{
sunKeyboard = ! sunKeyboard;
update_sun_kbd();
@@ -569,9 +570,10 @@
/* ARGSUSED */
-static void do_suspend (gw, closure, data)
- Widget gw;
- XtPointer closure GCC_UNUSED, data GCC_UNUSED;
+static void do_suspend (
+ Widget gw,
+ XtPointer closure GCC_UNUSED,
+ XtPointer data GCC_UNUSED)
{
#if defined(SIGTSTP) && !defined(AMOEBA)
handle_send_signal (gw, SIGTSTP);
@@ -579,9 +581,10 @@
}
/* ARGSUSED */
-static void do_continue (gw, closure, data)
- Widget gw;
- XtPointer closure GCC_UNUSED, data GCC_UNUSED;
+static void do_continue (
+ Widget gw,
+ XtPointer closure GCC_UNUSED,
+ XtPointer data GCC_UNUSED)
{
#if defined(SIGCONT) && !defined(AMOEBA)
handle_send_signal (gw, SIGCONT);
@@ -589,40 +592,45 @@
}
/* ARGSUSED */
-static void do_interrupt (gw, closure, data)
- Widget gw;
- XtPointer closure GCC_UNUSED, data GCC_UNUSED;
+static void do_interrupt (
+ Widget gw,
+ XtPointer closure GCC_UNUSED,
+ XtPointer data GCC_UNUSED)
{
handle_send_signal (gw, SIGINT);
}
/* ARGSUSED */
-void do_hangup (gw, closure, data)
- Widget gw;
- XtPointer closure GCC_UNUSED, data GCC_UNUSED;
+void do_hangup (
+ Widget gw,
+ XtPointer closure GCC_UNUSED,
+ XtPointer data GCC_UNUSED)
{
handle_send_signal (gw, SIGHUP);
}
/* ARGSUSED */
-static void do_terminate (gw, closure, data)
- Widget gw;
- XtPointer closure GCC_UNUSED, data GCC_UNUSED;
+static void do_terminate (
+ Widget gw,
+ XtPointer closure GCC_UNUSED,
+ XtPointer data GCC_UNUSED)
{
handle_send_signal (gw, SIGTERM);
}
/* ARGSUSED */
-static void do_kill (gw, closure, data)
- Widget gw;
- XtPointer closure GCC_UNUSED, data GCC_UNUSED;
+static void do_kill (
+ Widget gw,
+ XtPointer closure GCC_UNUSED,
+ XtPointer data GCC_UNUSED)
{
handle_send_signal (gw, SIGKILL);
}
-static void do_quit (gw, closure, data)
- Widget gw GCC_UNUSED;
- XtPointer closure GCC_UNUSED, data GCC_UNUSED;
+static void do_quit (
+ Widget gw GCC_UNUSED,
+ XtPointer closure GCC_UNUSED,
+ XtPointer data GCC_UNUSED)
{
Cleanup (0);
}
@@ -633,9 +641,10 @@
* vt menu callbacks
*/
-static void do_scrollbar (gw, closure, data)
- Widget gw GCC_UNUSED;
- XtPointer closure GCC_UNUSED, data GCC_UNUSED;
+static void do_scrollbar (
+ Widget gw GCC_UNUSED,
+ XtPointer closure GCC_UNUSED,
+ XtPointer data GCC_UNUSED)
{
register TScreen *screen = &term->screen;
@@ -648,9 +657,10 @@
}
-static void do_jumpscroll (gw, closure, data)
- Widget gw GCC_UNUSED;
- XtPointer closure GCC_UNUSED, data GCC_UNUSED;
+static void do_jumpscroll (
+ Widget gw GCC_UNUSED,
+ XtPointer closure GCC_UNUSED,
+ XtPointer data GCC_UNUSED)
{
register TScreen *screen = &term->screen;
@@ -665,9 +675,10 @@
}
-static void do_reversevideo (gw, closure, data)
- Widget gw GCC_UNUSED;
- XtPointer closure GCC_UNUSED, data GCC_UNUSED;
+static void do_reversevideo (
+ Widget gw GCC_UNUSED,
+ XtPointer closure GCC_UNUSED,
+ XtPointer data GCC_UNUSED)
{
term->flags ^= REVERSE_VIDEO;
ReverseVideo (term);
@@ -675,54 +686,60 @@
}
-static void do_autowrap (gw, closure, data)
- Widget gw GCC_UNUSED;
- XtPointer closure GCC_UNUSED, data GCC_UNUSED;
+static void do_autowrap (
+ Widget gw GCC_UNUSED,
+ XtPointer closure GCC_UNUSED,
+ XtPointer data GCC_UNUSED)
{
term->flags ^= WRAPAROUND;
update_autowrap();
}
-static void do_reversewrap (gw, closure, data)
- Widget gw GCC_UNUSED;
- XtPointer closure GCC_UNUSED, data GCC_UNUSED;
+static void do_reversewrap (
+ Widget gw GCC_UNUSED,
+ XtPointer closure GCC_UNUSED,
+ XtPointer data GCC_UNUSED)
{
term->flags ^= REVERSEWRAP;
update_reversewrap();
}
-static void do_autolinefeed (gw, closure, data)
- Widget gw GCC_UNUSED;
- XtPointer closure GCC_UNUSED, data GCC_UNUSED;
+static void do_autolinefeed (
+ Widget gw GCC_UNUSED,
+ XtPointer closure GCC_UNUSED,
+ XtPointer data GCC_UNUSED)
{
term->flags ^= LINEFEED;
update_autolinefeed();
}
-static void do_appcursor (gw, closure, data)
- Widget gw GCC_UNUSED;
- XtPointer closure GCC_UNUSED, data GCC_UNUSED;
+static void do_appcursor (
+ Widget gw GCC_UNUSED,
+ XtPointer closure GCC_UNUSED,
+ XtPointer data GCC_UNUSED)
{
term->keyboard.flags ^= MODE_DECCKM;
update_appcursor();
}
-static void do_appkeypad (gw, closure, data)
- Widget gw GCC_UNUSED;
- XtPointer closure GCC_UNUSED, data GCC_UNUSED;
+static void do_appkeypad (
+ Widget gw GCC_UNUSED,
+ XtPointer closure GCC_UNUSED,
+ XtPointer data GCC_UNUSED)
{
term->keyboard.flags ^= MODE_DECKPAM;
update_appkeypad();
}
-static void do_scrollkey (gw, closure, data)
- Widget gw GCC_UNUSED;
- XtPointer closure GCC_UNUSED, data GCC_UNUSED;
+static void do_scrollkey (
+ Widget gw GCC_UNUSED,
+ XtPointer closure GCC_UNUSED,
+ XtPointer data GCC_UNUSED)
{
register TScreen *screen = &term->screen;
@@ -731,9 +748,10 @@
}
-static void do_scrollttyoutput (gw, closure, data)
- Widget gw GCC_UNUSED;
- XtPointer closure GCC_UNUSED, data GCC_UNUSED;
+static void do_scrollttyoutput (
+ Widget gw GCC_UNUSED,
+ XtPointer closure GCC_UNUSED,
+ XtPointer data GCC_UNUSED)
{
register TScreen *screen = &term->screen;
@@ -742,9 +760,10 @@
}
-static void do_allow132 (gw, closure, data)
- Widget gw GCC_UNUSED;
- XtPointer closure GCC_UNUSED, data GCC_UNUSED;
+static void do_allow132 (
+ Widget gw GCC_UNUSED,
+ XtPointer closure GCC_UNUSED,
+ XtPointer data GCC_UNUSED)
{
register TScreen *screen = &term->screen;
@@ -753,9 +772,10 @@
}
-static void do_cursesemul (gw, closure, data)
- Widget gw GCC_UNUSED;
- XtPointer closure GCC_UNUSED, data GCC_UNUSED;
+static void do_cursesemul (
+ Widget gw GCC_UNUSED,
+ XtPointer closure GCC_UNUSED,
+ XtPointer data GCC_UNUSED)
{
register TScreen *screen = &term->screen;
@@ -764,9 +784,10 @@
}
-static void do_marginbell (gw, closure, data)
- Widget gw GCC_UNUSED;
- XtPointer closure GCC_UNUSED, data GCC_UNUSED;
+static void do_marginbell (
+ Widget gw GCC_UNUSED,
+ XtPointer closure GCC_UNUSED,
+ XtPointer data GCC_UNUSED)
{
register TScreen *screen = &term->screen;
@@ -776,9 +797,7 @@
#if OPT_TEK4014
-static void handle_tekshow (gw, allowswitch)
- Widget gw GCC_UNUSED;
- Bool allowswitch;
+static void handle_tekshow (Widget gw GCC_UNUSED, Bool allowswitch)
{
register TScreen *screen = &term->screen;
@@ -792,26 +811,29 @@
}
/* ARGSUSED */
-static void do_tekshow (gw, closure, data)
- Widget gw;
- XtPointer closure GCC_UNUSED, data GCC_UNUSED;
+static void do_tekshow (
+ Widget gw,
+ XtPointer closure GCC_UNUSED,
+ XtPointer data GCC_UNUSED)
{
handle_tekshow (gw, True);
}
/* ARGSUSED */
-static void do_tekonoff (gw, closure, data)
- Widget gw;
- XtPointer closure GCC_UNUSED, data GCC_UNUSED;
+static void do_tekonoff (
+ Widget gw,
+ XtPointer closure GCC_UNUSED,
+ XtPointer data GCC_UNUSED)
{
handle_tekshow (gw, False);
}
#endif /* OPT_TEK4014 */
/* ARGSUSED */
-static void do_altscreen (gw, closure, data)
- Widget gw GCC_UNUSED;
- XtPointer closure GCC_UNUSED, data GCC_UNUSED;
+static void do_altscreen (
+ Widget gw GCC_UNUSED,
+ XtPointer closure GCC_UNUSED,
+ XtPointer data GCC_UNUSED)
{
TScreen *screen = &term->screen;
ToggleAlternate(screen);
@@ -819,9 +841,10 @@
#ifndef NO_ACTIVE_ICON
/* ARGSUSED */
-static void do_activeicon (gw, closure, data)
- Widget gw GCC_UNUSED;
- XtPointer closure GCC_UNUSED, data GCC_UNUSED;
+static void do_activeicon (
+ Widget gw GCC_UNUSED,
+ XtPointer closure GCC_UNUSED,
+ XtPointer data GCC_UNUSED)
{
TScreen *screen = &term->screen;
@@ -836,34 +859,38 @@
}
#endif /* NO_ACTIVE_ICON */
-static void do_softreset (gw, closure, data)
- Widget gw GCC_UNUSED;
- XtPointer closure GCC_UNUSED, data GCC_UNUSED;
+static void do_softreset (
+ Widget gw GCC_UNUSED,
+ XtPointer closure GCC_UNUSED,
+ XtPointer data GCC_UNUSED)
{
VTReset (FALSE, FALSE);
}
-static void do_hardreset (gw, closure, data)
- Widget gw GCC_UNUSED;
- XtPointer closure GCC_UNUSED, data GCC_UNUSED;
+static void do_hardreset (
+ Widget gw GCC_UNUSED,
+ XtPointer closure GCC_UNUSED,
+ XtPointer data GCC_UNUSED)
{
VTReset (TRUE, FALSE);
}
-static void do_clearsavedlines (gw, closure, data)
- Widget gw GCC_UNUSED;
- XtPointer closure GCC_UNUSED, data GCC_UNUSED;
+static void do_clearsavedlines (
+ Widget gw GCC_UNUSED,
+ XtPointer closure GCC_UNUSED,
+ XtPointer data GCC_UNUSED)
{
VTReset (TRUE, TRUE);
}
#if OPT_TEK4014
-static void do_tekmode (gw, closure, data)
- Widget gw GCC_UNUSED;
- XtPointer closure GCC_UNUSED, data GCC_UNUSED;
+static void do_tekmode (
+ Widget gw GCC_UNUSED,
+ XtPointer closure GCC_UNUSED,
+ XtPointer data GCC_UNUSED)
{
register TScreen *screen = &term->screen;
@@ -871,9 +898,10 @@
}
/* ARGSUSED */
-static void do_vthide (gw, closure, data)
- Widget gw GCC_UNUSED;
- XtPointer closure GCC_UNUSED, data GCC_UNUSED;
+static void do_vthide (
+ Widget gw GCC_UNUSED,
+ XtPointer closure GCC_UNUSED,
+ XtPointer data GCC_UNUSED)
{
hide_vt_window();
}
@@ -884,9 +912,10 @@
* vtfont menu
*/
-static void do_vtfont (gw, closure, data)
- Widget gw GCC_UNUSED;
- XtPointer closure GCC_UNUSED, data GCC_UNUSED;
+static void do_vtfont (
+ Widget gw GCC_UNUSED,
+ XtPointer closure GCC_UNUSED,
+ XtPointer data GCC_UNUSED)
{
char *entryname = (char *) closure;
int i;
@@ -906,66 +935,71 @@
*/
#if OPT_TEK4014
-static void do_tektextlarge (gw, closure, data)
- Widget gw GCC_UNUSED;
- XtPointer closure GCC_UNUSED, data GCC_UNUSED;
+static void do_tektextlarge (
+ Widget gw GCC_UNUSED,
+ XtPointer closure GCC_UNUSED,
+ XtPointer data GCC_UNUSED)
{
TekSetFontSize (tekMenu_tektextlarge);
}
-static void do_tektext2 (gw, closure, data)
- Widget gw GCC_UNUSED;
- XtPointer closure GCC_UNUSED, data GCC_UNUSED;
+static void do_tektext2 (
+ Widget gw GCC_UNUSED,
+ XtPointer closure GCC_UNUSED,
+ XtPointer data GCC_UNUSED)
{
TekSetFontSize (tekMenu_tektext2);
}
-static void do_tektext3 (gw, closure, data)
- Widget gw GCC_UNUSED;
- XtPointer closure GCC_UNUSED, data GCC_UNUSED;
+static void do_tektext3 (
+ Widget gw GCC_UNUSED,
+ XtPointer closure GCC_UNUSED,
+ XtPointer data GCC_UNUSED)
{
TekSetFontSize (tekMenu_tektext3);
}
-static void do_tektextsmall (gw, closure, data)
- Widget gw GCC_UNUSED;
- XtPointer closure GCC_UNUSED, data GCC_UNUSED;
+static void do_tektextsmall (
+ Widget gw GCC_UNUSED,
+ XtPointer closure GCC_UNUSED,
+ XtPointer data GCC_UNUSED)
{
TekSetFontSize (tekMenu_tektextsmall);
}
-static void do_tekpage (gw, closure, data)
- Widget gw GCC_UNUSED;
- XtPointer closure GCC_UNUSED, data GCC_UNUSED;
+static void do_tekpage (
+ Widget gw GCC_UNUSED,
+ XtPointer closure GCC_UNUSED,
+ XtPointer data GCC_UNUSED)
{
TekSimulatePageButton (False);
}
-static void do_tekreset (gw, closure, data)
- Widget gw GCC_UNUSED;
- XtPointer closure GCC_UNUSED, data GCC_UNUSED;
+static void do_tekreset (
+ Widget gw GCC_UNUSED,
+ XtPointer closure GCC_UNUSED,
+ XtPointer data GCC_UNUSED)
{
TekSimulatePageButton (True);
}
-static void do_tekcopy (gw, closure, data)
- Widget gw GCC_UNUSED;
- XtPointer closure GCC_UNUSED, data GCC_UNUSED;
+static void do_tekcopy (
+ Widget gw GCC_UNUSED,
+ XtPointer closure GCC_UNUSED,
+ XtPointer data GCC_UNUSED)
{
TekCopy ();
}
-static void handle_vtshow (gw, allowswitch)
- Widget gw GCC_UNUSED;
- Bool allowswitch;
+static void handle_vtshow (Widget gw GCC_UNUSED, Bool allowswitch)
{
register TScreen *screen = &term->screen;
@@ -979,23 +1013,26 @@
Bell(XkbBI_MinorError, 0);
}
-static void do_vtshow (gw, closure, data)
- Widget gw;
- XtPointer closure GCC_UNUSED, data GCC_UNUSED;
+static void do_vtshow (
+ Widget gw,
+ XtPointer closure GCC_UNUSED,
+ XtPointer data GCC_UNUSED)
{
handle_vtshow (gw, True);
}
-static void do_vtonoff (gw, closure, data)
- Widget gw;
- XtPointer closure GCC_UNUSED, data GCC_UNUSED;
+static void do_vtonoff (
+ Widget gw,
+ XtPointer closure GCC_UNUSED,
+ XtPointer data GCC_UNUSED)
{
handle_vtshow (gw, False);
}
-static void do_vtmode (gw, closure, data)
- Widget gw GCC_UNUSED;
- XtPointer closure GCC_UNUSED, data GCC_UNUSED;
+static void do_vtmode (
+ Widget gw GCC_UNUSED,
+ XtPointer closure GCC_UNUSED,
+ XtPointer data GCC_UNUSED)
{
register TScreen *screen = &term->screen;
@@ -1004,9 +1041,10 @@
/* ARGSUSED */
-static void do_tekhide (gw, closure, data)
- Widget gw GCC_UNUSED;
- XtPointer closure GCC_UNUSED, data GCC_UNUSED;
+static void do_tekhide (
+ Widget gw GCC_UNUSED,
+ XtPointer closure GCC_UNUSED,
+ XtPointer data GCC_UNUSED)
{
hide_tek_window();
}
@@ -1018,13 +1056,14 @@
* public handler routines
*/
-static void handle_toggle (proc, var, params, nparams, w, closure, data)
- void (*proc)PROTO_XT_CALLBACK_ARGS;
- int var;
- String *params;
- Cardinal nparams;
- Widget w;
- XtPointer closure, data;
+static void handle_toggle (
+ void (*proc)PROTO_XT_CALLBACK_ARGS,
+ int var,
+ String *params,
+ Cardinal nparams,
+ Widget w,
+ XtPointer closure,
+ XtPointer data)
{
int dir = -2;
@@ -1061,32 +1100,32 @@
return;
}
-void HandleAllowSends(w, event, params, param_count)
- Widget w;
- XEvent *event GCC_UNUSED;
- String *params;
- Cardinal *param_count;
+void HandleAllowSends(
+ Widget w,
+ XEvent *event GCC_UNUSED,
+ String *params,
+ Cardinal *param_count)
{
handle_toggle (do_allowsends, (int) term->screen.allowSendEvents,
params, *param_count, w, (XtPointer)0, (XtPointer)0);
}
-void HandleSetVisualBell(w, event, params, param_count)
- Widget w;
- XEvent *event GCC_UNUSED;
- String *params;
- Cardinal *param_count;
+void HandleSetVisualBell(
+ Widget w,
+ XEvent *event GCC_UNUSED,
+ String *params,
+ Cardinal *param_count)
{
handle_toggle (do_visualbell, (int) term->screen.visualbell,
params, *param_count, w, (XtPointer)0, (XtPointer)0);
}
#ifdef ALLOWLOGGING
-void HandleLogging(w, event, params, param_count)
- Widget w;
- XEvent *event GCC_UNUSED;
- String *params;
- Cardinal *param_count;
+void HandleLogging(
+ Widget w,
+ XEvent *event GCC_UNUSED,
+ String *params,
+ Cardinal *param_count)
{
handle_toggle (do_logging, (int) term->screen.logging,
params, *param_count, w, (XtPointer)0, (XtPointer)0);
@@ -1094,31 +1133,31 @@
#endif
/* ARGSUSED */
-void HandlePrint(w, event, params, param_count)
- Widget w;
- XEvent *event GCC_UNUSED;
- String *params GCC_UNUSED;
- Cardinal *param_count GCC_UNUSED;
+void HandlePrint(
+ Widget w,
+ XEvent *event GCC_UNUSED,
+ String *params GCC_UNUSED,
+ Cardinal *param_count GCC_UNUSED)
{
do_print(w, (XtPointer)0, (XtPointer)0);
}
/* ARGSUSED */
-void HandleRedraw(w, event, params, param_count)
- Widget w;
- XEvent *event GCC_UNUSED;
- String *params GCC_UNUSED;
- Cardinal *param_count GCC_UNUSED;
+void HandleRedraw(
+ Widget w,
+ XEvent *event GCC_UNUSED,
+ String *params GCC_UNUSED,
+ Cardinal *param_count GCC_UNUSED)
{
do_redraw(w, (XtPointer)0, (XtPointer)0);
}
/* ARGSUSED */
-void HandleSendSignal(w, event, params, param_count)
- Widget w;
- XEvent *event GCC_UNUSED;
- String *params;
- Cardinal *param_count;
+void HandleSendSignal(
+ Widget w,
+ XEvent *event GCC_UNUSED,
+ String *params,
+ Cardinal *param_count)
{
static struct sigtab {
char *name;
@@ -1157,192 +1196,192 @@
}
/* ARGSUSED */
-void HandleQuit(w, event, params, param_count)
- Widget w;
- XEvent *event GCC_UNUSED;
- String *params GCC_UNUSED;
- Cardinal *param_count GCC_UNUSED;
+void HandleQuit(
+ Widget w,
+ XEvent *event GCC_UNUSED,
+ String *params GCC_UNUSED,
+ Cardinal *param_count GCC_UNUSED)
{
do_quit(w, (XtPointer)0, (XtPointer)0);
}
-void Handle8BitControl(w, event, params, param_count)
- Widget w;
- XEvent *event GCC_UNUSED;
- String *params;
- Cardinal *param_count;
+void Handle8BitControl(
+ Widget w,
+ XEvent *event GCC_UNUSED,
+ String *params,
+ Cardinal *param_count)
{
handle_toggle (do_8bit_control, (int) term->screen.control_eight_bits,
params, *param_count, w, (XtPointer)0, (XtPointer)0);
}
-void HandleBackarrow(w, event, params, param_count)
- Widget w;
- XEvent *event GCC_UNUSED;
- String *params;
- Cardinal *param_count;
+void HandleBackarrow(
+ Widget w,
+ XEvent *event GCC_UNUSED,
+ String *params,
+ Cardinal *param_count)
{
handle_toggle (do_backarrow, (int) term->keyboard.flags & MODE_DECBKM,
params, *param_count, w, (XtPointer)0, (XtPointer)0);
}
-void HandleSunFunctionKeys(w, event, params, param_count)
- Widget w;
- XEvent *event GCC_UNUSED;
- String *params;
- Cardinal *param_count;
+void HandleSunFunctionKeys(
+ Widget w,
+ XEvent *event GCC_UNUSED,
+ String *params,
+ Cardinal *param_count)
{
handle_toggle (do_sun_fkeys, (int) sunFunctionKeys,
params, *param_count, w, (XtPointer)0, (XtPointer)0);
}
#if OPT_SUNPC_KBD
-void HandleSunKeyboard(w, event, params, param_count)
- Widget w;
- XEvent *event GCC_UNUSED;
- String *params;
- Cardinal *param_count;
+void HandleSunKeyboard(
+ Widget w,
+ XEvent *event GCC_UNUSED,
+ String *params,
+ Cardinal *param_count)
{
handle_toggle (do_sun_kbd, (int) sunKeyboard,
params, *param_count, w, (XtPointer)0, (XtPointer)0);
}
#endif
-void HandleScrollbar(w, event, params, param_count)
- Widget w;
- XEvent *event GCC_UNUSED;
- String *params;
- Cardinal *param_count;
+void HandleScrollbar(
+ Widget w,
+ XEvent *event GCC_UNUSED,
+ String *params,
+ Cardinal *param_count)
{
handle_toggle (do_scrollbar, (int) term->screen.fullVwin.scrollbar,
params, *param_count, w, (XtPointer)0, (XtPointer)0);
}
-void HandleJumpscroll(w, event, params, param_count)
- Widget w;
- XEvent *event GCC_UNUSED;
- String *params;
- Cardinal *param_count;
+void HandleJumpscroll(
+ Widget w,
+ XEvent *event GCC_UNUSED,
+ String *params,
+ Cardinal *param_count)
{
handle_toggle (do_jumpscroll, (int) term->screen.jumpscroll,
params, *param_count, w, (XtPointer)0, (XtPointer)0);
}
-void HandleReverseVideo(w, event, params, param_count)
- Widget w;
- XEvent *event GCC_UNUSED;
- String *params;
- Cardinal *param_count;
+void HandleReverseVideo(
+ Widget w,
+ XEvent *event GCC_UNUSED,
+ String *params,
+ Cardinal *param_count)
{
handle_toggle (do_reversevideo, (int) (term->flags & REVERSE_VIDEO),
params, *param_count, w, (XtPointer)0, (XtPointer)0);
}
-void HandleAutoWrap(w, event, params, param_count)
- Widget w;
- XEvent *event GCC_UNUSED;
- String *params;
- Cardinal *param_count;
+void HandleAutoWrap(
+ Widget w,
+ XEvent *event GCC_UNUSED,
+ String *params,
+ Cardinal *param_count)
{
handle_toggle (do_autowrap, (int) (term->flags & WRAPAROUND),
params, *param_count, w, (XtPointer)0, (XtPointer)0);
}
-void HandleReverseWrap(w, event, params, param_count)
- Widget w;
- XEvent *event GCC_UNUSED;
- String *params;
- Cardinal *param_count;
+void HandleReverseWrap(
+ Widget w,
+ XEvent *event GCC_UNUSED,
+ String *params,
+ Cardinal *param_count)
{
handle_toggle (do_reversewrap, (int) (term->flags & REVERSEWRAP),
params, *param_count, w, (XtPointer)0, (XtPointer)0);
}
-void HandleAutoLineFeed(w, event, params, param_count)
- Widget w;
- XEvent *event GCC_UNUSED;
- String *params;
- Cardinal *param_count;
+void HandleAutoLineFeed(
+ Widget w,
+ XEvent *event GCC_UNUSED,
+ String *params,
+ Cardinal *param_count)
{
handle_toggle (do_autolinefeed, (int) (term->flags & LINEFEED),
params, *param_count, w, (XtPointer)0, (XtPointer)0);
}
-void HandleAppCursor(w, event, params, param_count)
- Widget w;
- XEvent *event GCC_UNUSED;
- String *params;
- Cardinal *param_count;
+void HandleAppCursor(
+ Widget w,
+ XEvent *event GCC_UNUSED,
+ String *params,
+ Cardinal *param_count)
{
handle_toggle (do_appcursor, (int) (term->keyboard.flags & MODE_DECCKM),
params, *param_count, w, (XtPointer)0, (XtPointer)0);
}
-void HandleAppKeypad(w, event, params, param_count)
- Widget w;
- XEvent *event GCC_UNUSED;
- String *params;
- Cardinal *param_count;
+void HandleAppKeypad(
+ Widget w,
+ XEvent *event GCC_UNUSED,
+ String *params,
+ Cardinal *param_count)
{
handle_toggle (do_appkeypad, (int) (term->keyboard.flags & MODE_DECKPAM),
params, *param_count, w, (XtPointer)0, (XtPointer)0);
}
-void HandleScrollKey(w, event, params, param_count)
- Widget w;
- XEvent *event GCC_UNUSED;
- String *params;
- Cardinal *param_count;
+void HandleScrollKey(
+ Widget w,
+ XEvent *event GCC_UNUSED,
+ String *params,
+ Cardinal *param_count)
{
handle_toggle (do_scrollkey, (int) term->screen.scrollkey,
params, *param_count, w, (XtPointer)0, (XtPointer)0);
}
-void HandleScrollTtyOutput(w, event, params, param_count)
- Widget w;
- XEvent *event GCC_UNUSED;
- String *params;
- Cardinal *param_count;
+void HandleScrollTtyOutput(
+ Widget w,
+ XEvent *event GCC_UNUSED,
+ String *params,
+ Cardinal *param_count)
{
handle_toggle (do_scrollttyoutput, (int) term->screen.scrollttyoutput,
params, *param_count, w, (XtPointer)0, (XtPointer)0);
}
-void HandleAllow132(w, event, params, param_count)
- Widget w;
- XEvent *event GCC_UNUSED;
- String *params;
- Cardinal *param_count;
+void HandleAllow132(
+ Widget w,
+ XEvent *event GCC_UNUSED,
+ String *params,
+ Cardinal *param_count)
{
handle_toggle (do_allow132, (int) term->screen.c132,
params, *param_count, w, (XtPointer)0, (XtPointer)0);
}
-void HandleCursesEmul(w, event, params, param_count)
- Widget w;
- XEvent *event GCC_UNUSED;
- String *params;
- Cardinal *param_count;
+void HandleCursesEmul(
+ Widget w,
+ XEvent *event GCC_UNUSED,
+ String *params,
+ Cardinal *param_count)
{
handle_toggle (do_cursesemul, (int) term->screen.curses,
params, *param_count, w, (XtPointer)0, (XtPointer)0);
}
-void HandleMarginBell(w, event, params, param_count)
- Widget w;
- XEvent *event GCC_UNUSED;
- String *params;
- Cardinal *param_count;
+void HandleMarginBell(
+ Widget w,
+ XEvent *event GCC_UNUSED,
+ String *params,
+ Cardinal *param_count)
{
handle_toggle (do_marginbell, (int) term->screen.marginbell,
params, *param_count, w, (XtPointer)0, (XtPointer)0);
}
-void HandleAltScreen(w, event, params, param_count)
- Widget w;
- XEvent *event GCC_UNUSED;
- String *params;
- Cardinal *param_count;
+void HandleAltScreen(
+ Widget w,
+ XEvent *event GCC_UNUSED,
+ String *params,
+ Cardinal *param_count)
{
/* eventually want to see if sensitive or not */
handle_toggle (do_altscreen, (int) term->screen.alternate,
@@ -1350,41 +1389,41 @@
}
/* ARGSUSED */
-void HandleSoftReset(w, event, params, param_count)
- Widget w;
- XEvent *event GCC_UNUSED;
- String *params GCC_UNUSED;
- Cardinal *param_count GCC_UNUSED;
+void HandleSoftReset(
+ Widget w,
+ XEvent *event GCC_UNUSED,
+ String *params GCC_UNUSED,
+ Cardinal *param_count GCC_UNUSED)
{
do_softreset(w, (XtPointer)0, (XtPointer)0);
}
/* ARGSUSED */
-void HandleHardReset(w, event, params, param_count)
- Widget w;
- XEvent *event GCC_UNUSED;
- String *params GCC_UNUSED;
- Cardinal *param_count GCC_UNUSED;
+void HandleHardReset(
+ Widget w,
+ XEvent *event GCC_UNUSED,
+ String *params GCC_UNUSED,
+ Cardinal *param_count GCC_UNUSED)
{
do_hardreset(w, (XtPointer)0, (XtPointer)0);
}
/* ARGSUSED */
-void HandleClearSavedLines(w, event, params, param_count)
- Widget w;
- XEvent *event GCC_UNUSED;
- String *params GCC_UNUSED;
- Cardinal *param_count GCC_UNUSED;
+void HandleClearSavedLines(
+ Widget w,
+ XEvent *event GCC_UNUSED,
+ String *params GCC_UNUSED,
+ Cardinal *param_count GCC_UNUSED)
{
do_clearsavedlines(w, (XtPointer)0, (XtPointer)0);
}
#if OPT_TEK4014
-void HandleSetTerminalType(w, event, params, param_count)
- Widget w;
- XEvent *event GCC_UNUSED;
- String *params;
- Cardinal *param_count;
+void HandleSetTerminalType(
+ Widget w,
+ XEvent *event GCC_UNUSED,
+ String *params,
+ Cardinal *param_count)
{
if (*param_count == 1) {
switch (params[0][0]) {
@@ -1402,11 +1441,11 @@
}
}
-void HandleVisibility(w, event, params, param_count)
- Widget w;
- XEvent *event GCC_UNUSED;
- String *params;
- Cardinal *param_count;
+void HandleVisibility(
+ Widget w,
+ XEvent *event GCC_UNUSED,
+ String *params,
+ Cardinal *param_count)
{
if (*param_count == 2) {
switch (params[0][0]) {
@@ -1427,11 +1466,11 @@
}
/* ARGSUSED */
-void HandleSetTekText(w, event, params, param_count)
- Widget w;
- XEvent *event GCC_UNUSED;
- String *params;
- Cardinal *param_count;
+void HandleSetTekText(
+ Widget w,
+ XEvent *event GCC_UNUSED,
+ String *params,
+ Cardinal *param_count)
{
void (*proc)PROTO_XT_CALLBACK_ARGS = 0;
@@ -1453,31 +1492,31 @@
}
/* ARGSUSED */
-void HandleTekPage(w, event, params, param_count)
- Widget w;
- XEvent *event GCC_UNUSED;
- String *params GCC_UNUSED;
- Cardinal *param_count GCC_UNUSED;
+void HandleTekPage(
+ Widget w,
+ XEvent *event GCC_UNUSED,
+ String *params GCC_UNUSED,
+ Cardinal *param_count GCC_UNUSED)
{
do_tekpage(w, (XtPointer)0, (XtPointer)0);
}
/* ARGSUSED */
-void HandleTekReset(w, event, params, param_count)
- Widget w;
- XEvent *event GCC_UNUSED;
- String *params GCC_UNUSED;
- Cardinal *param_count GCC_UNUSED;
+void HandleTekReset(
+ Widget w,
+ XEvent *event GCC_UNUSED,
+ String *params GCC_UNUSED,
+ Cardinal *param_count GCC_UNUSED)
{
do_tekreset(w, (XtPointer)0, (XtPointer)0);
}
/* ARGSUSED */
-void HandleTekCopy(w, event, params, param_count)
- Widget w;
- XEvent *event GCC_UNUSED;
- String *params GCC_UNUSED;
- Cardinal *param_count GCC_UNUSED;
+void HandleTekCopy(
+ Widget w,
+ XEvent *event GCC_UNUSED,
+ String *params GCC_UNUSED,
+ Cardinal *param_count GCC_UNUSED)
{
do_tekcopy(w, (XtPointer)0, (XtPointer)0);
}
Index: menu.h
--- xterm-76+/menu.h Tue Apr 28 15:01:01 1998
+++ xterm-77/menu.h Mon May 25 20:56:15 1998
@@ -86,7 +86,7 @@
extern void HandleTekReset PROTO_XT_ACTIONS_ARGS;
extern void HandleVisibility PROTO_XT_ACTIONS_ARGS;
-extern void DoSecureKeyboard PROTO((Time tp));
+extern void DoSecureKeyboard (Time tp);
/*
* The following definitions MUST match the order of entries given in
Index: misc.c
--- xterm-76+/misc.c Fri May 8 20:34:13 1998
+++ xterm-77/misc.c Mon May 25 22:10:49 1998
@@ -88,19 +88,19 @@
(event.xcrossing.window == XtWindow(XtParent(term))))
#endif
-static Boolean AllocateColor PROTO((XtermWidget pTerm, ScrnColors *pNew, int ndx, char *name));
-static Boolean ChangeColorsRequest PROTO((XtermWidget pTerm, int start, char *names));
-static Boolean GetOldColors PROTO(( XtermWidget pTerm));
-static Boolean UpdateOldColors PROTO((XtermWidget pTerm, ScrnColors *pNew));
-static int hexvalue PROTO((int c));
-static void ChangeGroup PROTO((String attribute, XtArgVal value));
-static void DoSpecialEnterNotify PROTO((XEnterWindowEvent *ev));
-static void DoSpecialLeaveNotify PROTO((XEnterWindowEvent *ev));
-static void selectwindow PROTO((TScreen *screen, int flag));
-static void unselectwindow PROTO((TScreen *screen, int flag));
+static Boolean AllocateColor (XtermWidget pTerm, ScrnColors *pNew, int ndx, char *name);
+static Boolean ChangeColorsRequest (XtermWidget pTerm, int start, char *names);
+static Boolean GetOldColors ( XtermWidget pTerm);
+static Boolean UpdateOldColors (XtermWidget pTerm, ScrnColors *pNew);
+static int hexvalue (int c);
+static void ChangeGroup (String attribute, XtArgVal value);
+static void DoSpecialEnterNotify (XEnterWindowEvent *ev);
+static void DoSpecialLeaveNotify (XEnterWindowEvent *ev);
+static void selectwindow (TScreen *screen, int flag);
+static void unselectwindow (TScreen *screen, int flag);
#if OPT_TEK4014
-static void withdraw_window PROTO((Display *dpy, Window w, int scr));
+static void withdraw_window (Display *dpy, Window w, int scr);
#endif
void
@@ -547,7 +547,7 @@
int pid;
#ifndef HAVE_WAITPID
int waited;
- SIGNAL_T (*chldfunc) PROTO((int));
+ SIGNAL_T (*chldfunc) (int);
chldfunc = signal(SIGCHLD, SIG_DFL);
#endif
@@ -594,10 +594,7 @@
*/
#ifdef ALLOWLOGFILEEXEC
-static SIGNAL_T logpipe PROTO((int sig));
-
-static SIGNAL_T logpipe (sig)
- int sig GCC_UNUSED;
+static SIGNAL_T logpipe (int sig GCC_UNUSED)
{
register TScreen *screen = &term->screen;
@@ -1013,24 +1010,23 @@
String attribute;
XtArgVal value;
{
- if (value != 0) {
Arg args[1];
-#if OPT_SAME_NAME
- char *buf;
+ char *name = (value != 0) ? (char *)value : "";
+#if OPT_SAME_NAME
/* If the attribute isn't going to change, then don't bother... */
if( sameName ) {
+ char *buf;
XtSetArg( args[0], attribute, &buf );
XtGetValues( toplevel, args, 1 );
- if (strcmp((char *)value, buf) == 0)
+ if (strcmp(name, buf) == 0)
return;
}
#endif /* OPT_SAME_NAME */
- XtSetArg( args[0], attribute, value );
+ XtSetArg( args[0], attribute, name );
XtSetValues( toplevel, args, 1 );
- }
}
void
@@ -1419,8 +1415,7 @@
#endif
-void set_vt_visibility (on)
- Boolean on;
+void set_vt_visibility (Boolean on)
{
register TScreen *screen = &term->screen;
@@ -1452,8 +1447,7 @@
#if OPT_TEK4014
extern Atom wm_delete_window; /* for ICCCM delete window */
-void set_tek_visibility (on)
- Boolean on;
+void set_tek_visibility (Boolean on)
{
register TScreen *screen = &term->screen;
if (on) {
@@ -1485,7 +1479,7 @@
return;
}
-void end_tek_mode ()
+void end_tek_mode (void)
{
register TScreen *screen = &term->screen;
@@ -1501,7 +1495,7 @@
return;
}
-void end_vt_mode ()
+void end_vt_mode (void)
{
register TScreen *screen = &term->screen;
@@ -1518,8 +1512,7 @@
return;
}
-void switch_modes (tovt)
- Bool tovt; /* if true, then become vt mode */
+void switch_modes (Bool tovt) /* if true, then become vt mode */
{
if (tovt) {
if (TekRefresh) dorefresh();
@@ -1529,7 +1522,7 @@
}
}
-void hide_vt_window ()
+void hide_vt_window (void)
{
register TScreen *screen = &term->screen;
@@ -1537,7 +1530,7 @@
if (!screen->TekEmu) switch_modes (False); /* switch to tek mode */
}
-void hide_tek_window ()
+void hide_tek_window (void)
{
register TScreen *screen = &term->screen;
Index: os2main.c
--- xterm-76+/os2main.c Tue Apr 28 15:01:01 1998
+++ xterm-77/os2main.c Mon May 25 21:15:41 1998
@@ -109,19 +109,19 @@
int switchfb[] = {0, 2, 1, 3};
-static SIGNAL_T reapchild PROTO((int n));
-static char *base_name PROTO((char *name));
-static int pty_search PROTO((int *pty));
-static int remove_termcap_entry PROTO((char *buf, char *str));
-static int spawn PROTO((void));
+static SIGNAL_T reapchild (int n);
+static char *base_name (char *name);
+static int pty_search (int *pty);
+static int remove_termcap_entry (char *buf, char *str);
+static int spawn (void);
static void DeleteWindow PROTO_XT_ACTIONS_ARGS;
-static void Help PROTO((void));
+static void Help (void);
static void KeyboardMapping PROTO_XT_ACTIONS_ARGS;
-static void Syntax PROTO((char *badOption));
-static void Version PROTO((void));
-static void get_terminal PROTO((void));
-static void my_error_handler PROTO((String message));
-static void resize PROTO((TScreen *s, char *oldtc, char *newtc));
+static void Syntax (char *badOption);
+static void Version (void);
+static void get_terminal (void);
+static void my_error_handler (String message);
+static void resize (TScreen *s, char *oldtc, char *newtc);
static Bool added_utmp_entry = False;
@@ -214,7 +214,7 @@
{ NULL, 0, 0, '\0' }, /* end of data */
};
-static int parse_tty_modes PROTO((char *s, struct _xttymodes *modelist));
+static int parse_tty_modes (char *s, struct _xttymodes *modelist);
static int inhibit;
static char passedPty[2]; /* name if pty if slave */
@@ -528,7 +528,7 @@
}
}
-static void closecons()
+static void closecons(void)
{
fclose(confd);
}
@@ -547,8 +547,7 @@
return ((len >= 2) && (!strncmp(tst, cmp, len)));
}
-static void Syntax (badOption)
- char *badOption;
+static void Syntax (char *badOption)
{
struct _options *opt;
int col;
@@ -573,13 +572,13 @@
exit (1);
}
-static void Version ()
+static void Version (void)
{
puts (XTERM_VERSION);
exit (0);
}
-static void Help ()
+static void Help (void)
{
struct _options *opt;
char **cpp;
@@ -603,12 +602,14 @@
/* ARGSUSED */
static Boolean
-ConvertConsoleSelection(w, selection, target, type, value, length, format)
- Widget w GCC_UNUSED;
- Atom *selection GCC_UNUSED, *target GCC_UNUSED, *type GCC_UNUSED;
- XtPointer *value GCC_UNUSED;
- unsigned long *length GCC_UNUSED;
- int *format GCC_UNUSED;
+ConvertConsoleSelection(
+ Widget w GCC_UNUSED,
+ Atom *selection GCC_UNUSED,
+ Atom *target GCC_UNUSED,
+ Atom *type GCC_UNUSED,
+ XtPointer *value GCC_UNUSED,
+ unsigned long *length GCC_UNUSED,
+ int *format GCC_UNUSED)
{
/* we don't save console output, so can't offer it */
return False;
@@ -628,11 +629,11 @@
*/
/* ARGSUSED */
static void
-DeleteWindow(w, event, params, num_params)
- Widget w;
- XEvent *event GCC_UNUSED;
- String *params GCC_UNUSED;
- Cardinal *num_params GCC_UNUSED;
+DeleteWindow(
+ Widget w,
+ XEvent *event GCC_UNUSED,
+ String *params GCC_UNUSED,
+ Cardinal *num_params GCC_UNUSED)
{
#if OPT_TEK4014
if (w == toplevel)
@@ -650,11 +651,11 @@
/* ARGSUSED */
static void
-KeyboardMapping(w, event, params, num_params)
- Widget w GCC_UNUSED;
- XEvent *event;
- String *params GCC_UNUSED;
- Cardinal *num_params GCC_UNUSED;
+KeyboardMapping(
+ Widget w GCC_UNUSED,
+ XEvent *event,
+ String *params GCC_UNUSED,
+ Cardinal *num_params GCC_UNUSED)
{
switch (event->type) {
case MappingNotify:
@@ -790,10 +791,8 @@
char **gblenvp;
-main (argc, argv, envp)
-int argc;
-char **argv;
-char **envp;
+int
+main (int argc, char **argv, char **envp)
{
register TScreen *screen;
int mode;
@@ -1121,11 +1120,11 @@
#endif
VTRun();
}
+ return 0;
}
static char *
-base_name(name)
-char *name;
+base_name(char *name)
{
register char *cp;
@@ -1141,8 +1140,7 @@
*/
static int
-get_pty (pty)
- int *pty;
+get_pty (int *pty)
{
return pty_search(pty);
}
@@ -1154,8 +1152,7 @@
* Returns 0 if found a pty, 1 if fails.
*/
static int
-pty_search(pty)
- int *pty;
+pty_search(int *pty)
{
char namebuf[PTMS_BUFSZ];
@@ -1177,7 +1174,7 @@
}
static void
-get_terminal ()
+get_terminal (void)
/*
* sets up X and initializes the terminal structure except for term.buf.fildes.
*/
@@ -1235,8 +1232,7 @@
};
/* ARGSUSED */
-static SIGNAL_T hungtty(i)
- int i GCC_UNUSED;
+static SIGNAL_T hungtty(int i GCC_UNUSED)
{
longjmp(env, 1);
SIGNAL_RETURN;
@@ -1247,7 +1243,7 @@
int cols;
} handshake = {-1,-1};
-void first_map_occurred ()
+void first_map_occurred (void)
{
register TScreen *screen = &term->screen;
handshake.rows = screen->max_row;
@@ -1283,7 +1279,7 @@
}
static int
-spawn ()
+spawn (void)
/*
* Inits pty and tty and forks a login process.
* Does not close fd Xsocket.
@@ -1702,8 +1698,7 @@
} /* end spawn */
SIGNAL_T
-Exit(n)
- int n;
+Exit(int n)
{
register TScreen *screen = &term->screen;
int pty = term->screen.respond; /* file descriptor of pty */
@@ -1727,9 +1722,7 @@
/* ARGSUSED */
static void
-resize(screen, oldtc, newtc)
-TScreen *screen;
-register char *oldtc, *newtc;
+resize(TScreen *screen, register char *oldtc, register char *newtc)
{
}
@@ -1739,7 +1732,7 @@
* Returns the pid of the child, or 0 or -1 if none or error.
*/
int
-nonblocking_wait()
+nonblocking_wait(void)
{
pid_t pid;
@@ -1748,8 +1741,7 @@
}
/* ARGSUSED */
-static SIGNAL_T reapchild (n)
- int n GCC_UNUSED;
+static SIGNAL_T reapchild (int n GCC_UNUSED)
{
int pid;
@@ -1772,39 +1764,8 @@
SIGNAL_RETURN;
}
-#if 0 /* this isn't used, but could be useful in debugging */
-/* VARARGS1 */
-void
-consolepr(fmt,x0,x1,x2,x3,x4,x5,x6,x7,x8,x9)
-char *fmt;
-{
- int oerrno;
- int f;
- char buf[ BUFSIZ ];
-
- oerrno = errno;
- strcpy(buf, "xterm: ");
- sprintf(buf+strlen(buf), fmt, x0,x1,x2,x3,x4,x5,x6,x7,x8,x9);
- strcat(buf, ": ");
- strcat(buf, SysErrorMsg (oerrno));
- strcat(buf, "\n");
-
- f = open("/dev/console",O_WRONLY);
- write(f, buf, strlen(buf));
- close(f);
-#ifdef TIOCNOTTY
- if ((f = open("/dev/tty", 2)) >= 0) {
- ioctl(f, TIOCNOTTY, (char *)NULL);
- close(f);
- }
-#endif /* TIOCNOTTY */
-}
-#endif
-
static int
-remove_termcap_entry (buf, str)
- char *buf;
- char *str;
+remove_termcap_entry (char *buf, char *str)
{
register char *strinbuf;
@@ -1831,9 +1792,7 @@
* where setting consists of the words in the modelist followed by a character
* or ^char.
*/
-static int parse_tty_modes (s, modelist)
- char *s;
- struct _xttymodes *modelist;
+static int parse_tty_modes (char *s, struct _xttymodes *modelist)
{
struct _xttymodes *mp;
int c;
@@ -1865,8 +1824,7 @@
}
}
-int GetBytesAvailable (fd)
- int fd;
+int GetBytesAvailable (int fd)
{
long arg;
ioctl (fd, FIONREAD, (char *) &arg);
@@ -1877,9 +1835,7 @@
everybody who used to call killpg() */
int
-kill_process_group(pid, sig)
- int pid;
- int sig;
+kill_process_group(int pid, int sig)
{
return kill (-pid, sig);
}
Index: print.c
--- xterm-76+/print.c Fri May 8 18:57:40 1998
+++ xterm-77/print.c Mon May 25 16:27:51 1998
@@ -58,18 +58,30 @@
#define SGR_MASK (BOLD|BLINK|UNDERLINE|INVERSE)
-static void charToPrinter PROTO((int chr));
-static void printCursorLine PROTO((void));
-static void printLine PROTO((int row, int chr));
-static void send_CharSet PROTO((int row));
-static void send_SGR PROTO((unsigned attr, int fg, int bg));
-static void stringToPrinter PROTO((char * str));
+static void charToPrinter (int chr);
+static void printLine (int row, int chr);
+static void send_CharSet (int row);
+static void send_SGR (unsigned attr, int fg, int bg);
+static void stringToPrinter (char * str);
static FILE *Printer;
static int Printer_pid;
static int initialized;
-static void printCursorLine()
+static void closePrinter(void)
+{
+ if (Printer != 0) {
+ fclose(Printer);
+ TRACE(("closed printer, waiting...\n"));
+ while (nonblocking_wait() > 0)
+ ;
+ Printer = 0;
+ initialized = 0;
+ TRACE(("closed printer\n"));
+ }
+}
+
+static void printCursorLine(void)
{
register TScreen *screen = &term->screen;
TRACE(("printCursorLine\n"))
@@ -81,9 +93,7 @@
* happens with a line that is entirely blank. This function prints the
* characters that xterm would allow as a selection (which may include blanks).
*/
-static void printLine(row, chr)
- int row;
- int chr;
+static void printLine(int row, int chr)
{
register TScreen *screen = &term->screen;
Char *c = SCRN_BUF_CHARS(screen, row);
@@ -174,7 +184,7 @@
charToPrinter(chr);
}
-void xtermPrintScreen()
+void xtermPrintScreen(void)
{
register TScreen *screen = &term->screen;
int top = screen->printer_extent ? 0 : screen->top_marg;
@@ -188,19 +198,12 @@
if (screen->printer_formfeed)
charToPrinter('\f');
- if (Printer != 0 && !was_open) {
- fclose(Printer);
- TRACE(("closed printer, waiting...\n"));
- while (nonblocking_wait() > 0)
- ;
- Printer = 0;
- initialized = 0;
- TRACE(("closed printer\n"));
+ if (!was_open || screen->printer_autoclose) {
+ closePrinter();
}
}
-static void send_CharSet(row)
- int row;
+static void send_CharSet(int row)
{
#if OPT_DEC_CHRSET
register TScreen *screen = &term->screen;
@@ -225,10 +228,7 @@
#endif /* OPT_DEC_CHRSET */
}
-static void send_SGR(attr, fg, bg)
- unsigned attr;
- int fg;
- int bg;
+static void send_SGR(unsigned attr, int fg, int bg)
{
char msg[80];
strcpy(msg, "\033[0");
@@ -261,8 +261,7 @@
/*
* This implementation only knows how to write to a pipe.
*/
-static void charToPrinter(chr)
- int chr;
+static void charToPrinter(int chr)
{
if (!initialized) {
FILE *input;
@@ -303,8 +302,7 @@
}
}
-static void stringToPrinter(str)
- char *str;
+static void stringToPrinter(char *str)
{
while (*str)
charToPrinter(*str++);
@@ -316,9 +314,7 @@
* VT330/VT340 Programmer Reference Manual EK-VT3XX-TP-001 (Digital Equipment
* Corp., March 1987).
*/
-void xtermMediaControl (param, private)
- int param;
- int private;
+void xtermMediaControl (int param, int private)
{
register TScreen *screen = &term->screen;
@@ -362,8 +358,7 @@
* autowrap occurs. The printed line ends with a CR and the character (LF, FF
* or VT) that moved the cursor off the previous line.
*/
-void xtermAutoPrint(chr)
- int chr;
+void xtermAutoPrint(int chr)
{
register TScreen *screen = &term->screen;
@@ -387,8 +382,7 @@
*/
#define LB '['
-int xtermPrinterControl(chr)
- int chr;
+int xtermPrinterControl(int chr)
{
register TScreen *screen = &term->screen;
@@ -427,6 +421,11 @@
if (length == len
&& Strcmp(bfr, tbl[n].seq) == 0) {
screen->printer_controlmode = tbl[n].active;
+ TRACE(("Set printer controller mode %sactive\n",
+ tbl[n].active ? "" : "in"))
+ if (screen->printer_autoclose
+ && screen->printer_controlmode == 0)
+ closePrinter();
length = 0;
return 0;
} else if (len > length
Index: ptyx.h
--- xterm-76+/ptyx.h Wed May 6 19:45:59 1998
+++ xterm-77/ptyx.h Mon May 25 17:46:53 1998
@@ -37,6 +37,15 @@
#include <X11/Xfuncs.h>
#include <X11/Xosdefs.h>
+/* adapted from IntrinsicI.h */
+#define MyStackAlloc(size, stack_cache_array) \
+ ((size) <= sizeof(stack_cache_array) \
+ ? (XtPointer)(stack_cache_array) \
+ : malloc((unsigned)(size)))
+
+#define MyStackFree(pointer, stack_cache_array) \
+ if ((pointer) != ((XtPointer)(stack_cache_array))) free(pointer)
+
#ifdef AMOEBA
/* Avoid name clashes with standard Amoeba types: */
#define event am_event_t
@@ -637,6 +646,7 @@
Cursor pointer_cursor; /* pointer cursor in window */
String printer_command; /* pipe/shell command string */
+ Boolean printer_autoclose; /* close printer when offline */
Boolean printer_extent; /* print complete page */
Boolean printer_formfeed; /* print formfeed per function */
int printer_controlmode; /* 0=off, 1=auto, 2=controller */
Index: resize.c
--- xterm-76+/resize.c Tue Apr 28 15:01:01 1998
+++ xterm-77/resize.c Mon May 25 20:44:41 1998
@@ -81,7 +81,7 @@
#define USE_SYSV_UTMP
#endif
-#if defined(SYSV) || defined(Lynx)
+#if defined(SYSV) || defined(Lynx) || defined(__CYGWIN32__)
#define USE_SYSV_TERMIO
#ifndef Lynx
#define USE_SYSV_UTMP
@@ -104,7 +104,10 @@
#define USE_TERMIOS
#endif
+#ifndef __CYGWIN32__
#include <sys/ioctl.h>
+#endif
+
#ifdef USE_SYSV_TERMIO
# ifndef Lynx
# include <sys/termio.h>
@@ -241,21 +244,19 @@
#include "proto.h"
-extern int main PROTO((int argc, char **argv));
-
-static SIGNAL_T onintr PROTO((int sig));
-static SIGNAL_T resize_timeout PROTO((int sig));
-static int checkdigits PROTO((char *str));
-static void Usage PROTO((void));
-static void readstring PROTO((FILE *fp, char *buf, char *str));
+static SIGNAL_T onintr (int sig);
+static SIGNAL_T resize_timeout (int sig);
+static int checkdigits (char *str);
+static void Usage (void);
+static void readstring (FILE *fp, char *buf, char *str);
#ifdef USE_TERMCAP
-static char *strindex PROTO((char *s1, char *s2));
+static char *strindex (char *s1, char *s2);
#if HAVE_TERMCAP_H
#include <termcap.h>
#if defined(NCURSES_VERSION)
/* The tgetent emulation function in SVr4-style curses implementations
- * (e.g., ncurses) ignores the buffer, so TERMCAP can't be set from it.
+ * (e.g., ncurses) ignores the buffer, so TERMCAP can't be set from it.
* Instead, just use terminfo.
*/
#undef USE_TERMCAP
@@ -270,9 +271,7 @@
resets termcap string to reflect current screen size
*/
int
-main (argc, argv)
- int argc;
- char **argv;
+main (int argc, char **argv)
{
register char *ptr, *env;
register int emu = VT100;
@@ -368,7 +367,7 @@
Usage(); /* Never returns */
#ifdef CANT_OPEN_DEV_TTY
- if ((name_of_tty = ttyname(fileno(stderr))) == NULL)
+ if ((name_of_tty = ttyname(fileno(stderr))) == NULL)
#endif
name_of_tty = "/dev/tty";
@@ -562,12 +561,11 @@
#ifdef USE_TERMCAP
static char *
-strindex (s1, s2)
+strindex (register char *s1, register char *s2)
/*
returns a pointer to the first occurrence of s2 in s1, or NULL if there are
none.
*/
-register char *s1, *s2;
{
register char *s3;
size_t s2len = strlen (s2);
@@ -582,8 +580,7 @@
#endif
static int
-checkdigits(str)
-register char *str;
+checkdigits(register char *str)
{
while(*str) {
if(!isdigit(*str))
@@ -594,10 +591,7 @@
}
static void
-readstring(fp, buf, str)
- register FILE *fp;
- register char *buf;
- char *str;
+readstring(register FILE *fp, register char *buf, char *str)
{
register int last, c;
#if !defined(USG) && !defined(AMOEBA) && !defined(MINIX) && !(__EMX__)
@@ -635,7 +629,7 @@
}
static void
-Usage()
+Usage(void)
{
fprintf(stderr, strcmp(myname, sunname) == 0 ?
"Usage: %s [rows cols]\n" :
@@ -644,8 +638,7 @@
}
static SIGNAL_T
-resize_timeout(sig)
- int sig;
+resize_timeout(int sig)
{
fprintf(stderr, "\n%s: Time out occurred\r\n", myname);
onintr(sig);
@@ -653,8 +646,7 @@
/* ARGSUSED */
static SIGNAL_T
-onintr(sig)
- int sig GCC_UNUSED;
+onintr(int sig GCC_UNUSED)
{
#ifdef USE_SYSV_TERMIO
ioctl (tty, TCSETAW, &tioorig);
Index: screen.c
--- xterm-76+/screen.c Tue Apr 28 15:01:01 1998
+++ xterm-77/screen.c Mon May 25 21:00:10 1998
@@ -44,8 +44,15 @@
#define SYSV
#include <termios.h>
#else
+#ifndef __CYGWIN32__
#include <sys/ioctl.h>
#endif
+#endif
+
+#if defined(__CYGWIN32__) && !defined(TIOCSPGRP)
+#include <termios.h>
+#define TIOCSPGRP (_IOW('t', 118, pid_t))
+#endif
#ifdef __hpux
#include <sys/termio.h>
@@ -91,10 +98,6 @@
};
#endif
-static int Reallocate PROTO((ScrnBuf *sbuf, Char **sbufaddr, int nrow, int ncol, int oldrow, int oldcol));
-static void ScrnClearLines PROTO((TScreen *screen, ScrnBuf sb, int where, int n, int size));
-
-
ScrnBuf Allocate (nrow, ncol, addr)
/*
* Allocates memory for a 2-dimensional array of chars and returns a pointer
@@ -145,10 +148,10 @@
* (Return value only necessary with SouthWestGravity.)
*/
static int
-Reallocate(sbuf, sbufaddr, nrow, ncol, oldrow, oldcol)
- ScrnBuf *sbuf;
- Char **sbufaddr;
- int nrow, ncol, oldrow, oldcol;
+Reallocate(
+ ScrnBuf *sbuf,
+ Char **sbufaddr,
+ int nrow, int ncol, int oldrow, int oldcol)
{
register ScrnBuf base;
register Char *tmp;
@@ -173,7 +176,7 @@
* -gildea
*/
- /*
+ /*
* realloc sbuf, the pointers to all the lines.
* If the screen shrinks, remove lines off the top of the buffer
* if resizeGravity resource says to do so.
@@ -194,7 +197,7 @@
SysError(ERROR_RESIZE);
base = *sbuf;
- /*
+ /*
* create the new buffer space and copy old buffer contents there
* line by line.
*/
@@ -251,7 +254,7 @@
#if OPT_ISO_COLORS
register Char *fb = 0;
#endif
-#if OPT_DEC_CHRSET
+#if OPT_DEC_CHRSET
register Char *cb = 0;
#endif
register Char *attrs;
@@ -304,14 +307,11 @@
})
}
-static void
-ScrnClearLines (screen, sb, where, n, size)
/*
* Saves pointers to the n lines beginning at sb + where, and clears the lines
*/
-TScreen *screen;
-ScrnBuf sb;
-int where, n, size;
+static void
+ScrnClearLines (TScreen *screen, ScrnBuf sb, int where, int n, int size)
{
register int i, j;
size_t len = ScrnPointers(screen, n);
@@ -387,7 +387,7 @@
* +--------|---------|----+
*/
memmove( (char *) &sb [MAX_PTRS * (where + n)],
- (char *) &sb [MAX_PTRS * where],
+ (char *) &sb [MAX_PTRS * where],
MAX_PTRS * sizeof (char *) * (last - where));
/* reuse storage for new lines at where */
@@ -412,12 +412,12 @@
/* move up lines */
memmove( (char *) &sb[MAX_PTRS * where],
- (char *) &sb[MAX_PTRS * (where + n)],
+ (char *) &sb[MAX_PTRS * (where + n)],
MAX_PTRS * sizeof (char *) * ((last -= n - 1) - where));
/* reuse storage for new bottom lines */
memcpy ( (char *) &sb[MAX_PTRS * last],
- (char *)screen->save_ptr,
+ (char *)screen->save_ptr,
MAX_PTRS * sizeof(char *) * n);
}
@@ -437,6 +437,7 @@
register int i, j;
register Char *ptr = BUF_CHARS(sb, row);
register Char *attrs = BUF_ATTRS(sb, row);
+ register size_t nbytes = (size - n - col);
int wrappedbit = ScrnTstWrapped(screen, row);
int flags = CHARDRAWN | TERM_COLOR_FLAGS;
@@ -451,10 +452,14 @@
for (i=col; i<col+n; i++)
attrs[i] = flags;
if_OPT_ISO_COLORS(screen,{
- memset(BUF_COLOR(sb, row) + col, xtermColorPair(), n);
+ Char *colors = BUF_COLOR(sb, row);
+ memmove(colors + col + n, colors + col, nbytes);
+ memset(colors + col, xtermColorPair(), n);
})
if_OPT_DEC_CHRSET({
- memset(BUF_CSETS(sb, row) + col, curXtermChrSet(row), n);
+ Char *csets = BUF_CSETS(sb, row);
+ memmove(csets + col + n, csets + col, nbytes);
+ memset(csets + col, curXtermChrSet(row), n);
})
if (wrappedbit)
@@ -480,16 +485,20 @@
register size_t nbytes = (size - n - col);
int wrappedbit = ScrnTstWrapped(screen, row);
- memcpy (ptr + col, ptr + col + n, nbytes);
- memcpy (attrs + col, attrs + col + n, nbytes);
+ memmove (ptr + col, ptr + col + n, nbytes);
+ memmove (attrs + col, attrs + col + n, nbytes);
bzero (ptr + size - n, n);
memset (attrs + size - n, TERM_COLOR_FLAGS, n);
if_OPT_ISO_COLORS(screen,{
- memset(BUF_COLOR(sb, row) + size - n, xtermColorPair(), n);
+ Char *colors = BUF_COLOR(sb, row);
+ memmove(colors + col, colors + col + n, nbytes);
+ memset(colors + size - n, xtermColorPair(), n);
})
if_OPT_DEC_CHRSET({
- memset(BUF_CSETS(sb, row) + size - n, curXtermChrSet(row), n);
+ Char *csets = BUF_CSETS(sb, row);
+ memmove(csets + col, csets + col + n, nbytes);
+ memset(csets + size - n, curXtermChrSet(row), n);
})
if (wrappedbit)
ScrnSetWrapped(screen, row);
@@ -517,6 +526,9 @@
int scrollamt = screen->scroll_amt;
int max = screen->max_row;
int gc_changes = 0;
+#ifdef __CYGWIN32__
+ static char first_time = 1;
+#endif
TRACE(("ScrnRefresh (%d,%d) - (%d,%d)%s\n",
toprow, leftcol,
@@ -547,7 +559,7 @@
int fg_bg = 0, fg = 0, bg = 0;
int x;
GC gc;
- Boolean hilite;
+ Boolean hilite;
if (row < screen->top_marg || row > screen->bot_marg)
lastind = row;
@@ -720,6 +732,19 @@
if (gc_changes & BG_COLOR)
SGR_Background(term->cur_background);
})
+
+#if defined(__CYGWIN32__) && defined(TIOCSWINSZ)
+ if (first_time == 1) {
+ struct winsize ws;
+
+ first_time = 0;
+ ws.ws_row = nrows;
+ ws.ws_col = ncols;
+ ws.ws_xpixel = term->core.width;
+ ws.ws_ypixel = term->core.height;
+ ioctl (screen->respond, TIOCSWINSZ, (char *)&ws);
+ }
+#endif
}
void
@@ -795,7 +820,7 @@
False);
}
if (height >= FullHeight(screen)) {
- XClearArea (screen->display, tw,
+ XClearArea (screen->display, tw,
0, FullHeight(screen), /* bottom */
width, 0, /* all across the bottom */
False);
@@ -815,14 +840,14 @@
register int savelines = screen->scrollWidget ?
screen->savelines : 0;
int delta_rows = rows - (screen->max_row + 1);
-
+
if(screen->cursor_state)
HideCursor();
if ( screen->alternate
&& term->misc.resizeGravity == SouthWestGravity )
/* swap buffer pointers back to make all this hair work */
SwitchBufPtrs(screen);
- if (screen->altbuf)
+ if (screen->altbuf)
(void) Reallocate(&screen->altbuf, &screen->abuf_address,
rows, cols, screen->max_row + 1, screen->max_col + 1);
move_down_by = Reallocate(&screen->allbuf,
@@ -850,7 +875,7 @@
if (screen->alternate)
SwitchBufPtrs(screen); /* put the pointers back */
}
-
+
/* adjust scrolling region */
screen->top_marg = 0;
screen->bot_marg = screen->max_row;
@@ -860,7 +885,7 @@
screen->cur_row = screen->max_row;
if (screen->cur_col > screen->max_col)
screen->cur_col = screen->max_col;
-
+
screen->fullVwin.height = height - border;
screen->fullVwin.width = width - border - screen->fullVwin.scrollbar;
@@ -872,7 +897,7 @@
if(screen->scrollWidget)
ResizeScrollBar(screen);
-
+
ResizeSelection (screen, rows, cols);
#ifndef NO_ACTIVE_ICON
@@ -886,7 +911,7 @@
changes.width = screen->iconVwin.fullwidth =
screen->iconVwin.width + 2 * screen->border;
-
+
changes.height = screen->iconVwin.fullheight =
screen->iconVwin.height + 2 * screen->border;
@@ -904,7 +929,7 @@
#ifdef SIGWINCH
if(screen->pid > 1) {
int pgrp;
-
+
if (ioctl (screen->respond, TIOCGPGRP, &pgrp) != -1)
kill_process_group(pgrp, SIGWINCH);
}
@@ -921,7 +946,7 @@
#ifdef notdef /* change to SIGWINCH if this doesn't work for you */
if(screen->pid > 1) {
int pgrp;
-
+
if (ioctl (screen->respond, TIOCGPGRP, &pgrp) != -1)
kill_process_group(pgrp, SIGWINCH);
}
Index: scrollbar.c
--- xterm-76+/scrollbar.c Tue Apr 28 15:01:01 1998
+++ xterm-77/scrollbar.c Mon May 25 21:10:43 1998
@@ -47,11 +47,6 @@
#include "xterm.h"
-static Widget CreateScrollBar PROTO((XtermWidget xw, int x, int y, int height));
-static int params_to_pixels PROTO((TScreen *screen, String *params, Cardinal n));
-static int specialcmplowerwiths PROTO((char *a, char *b));
-static void ResizeScreen PROTO((XtermWidget xw, int min_width, int min_height));
-
/* Event handlers */
static void ScrollTextTo PROTO_XT_CALLBACK_ARGS;
@@ -62,9 +57,8 @@
* appropriate WM_SIZE_HINTS and taking advantage of bit gravity.
*/
-static void ResizeScreen(xw, min_width, min_height )
- register XtermWidget xw;
- int min_width, min_height;
+static void
+ResizeScreen(register XtermWidget xw, int min_width, int min_height)
{
register TScreen *screen = &xw->screen;
#ifndef nothack
@@ -182,17 +176,15 @@
#endif /* NO_ACTIVE_ICON */
}
-void DoResizeScreen (xw)
- register XtermWidget xw;
+void DoResizeScreen (register XtermWidget xw)
{
int border = 2 * xw->screen.border;
ResizeScreen (xw, border + xw->screen.fullVwin.scrollbar, border);
}
-static Widget CreateScrollBar(xw, x, y, height)
- XtermWidget xw;
- int x, y, height;
+static Widget
+CreateScrollBar(XtermWidget xw, int x, int y, int height)
{
Widget scrollWidget;
@@ -219,8 +211,7 @@
void
-ScrollBarReverseVideo(scrollWidget)
- register Widget scrollWidget;
+ScrollBarReverseVideo(register Widget scrollWidget)
{
Arg args[4];
Cardinal nargs = XtNumber(args);
@@ -245,8 +236,7 @@
void
-ScrollBarDrawThumb(scrollWidget)
- register Widget scrollWidget;
+ScrollBarDrawThumb(register Widget scrollWidget)
{
register TScreen *screen = &term->screen;
register int thumbTop, thumbHeight, totalHeight;
@@ -261,8 +251,7 @@
}
void
-ResizeScrollBar(screen)
- TScreen *screen;
+ResizeScrollBar(TScreen *screen)
{
XtConfigureWidget(
screen->scrollWidget,
@@ -283,9 +272,7 @@
}
void
-WindowScroll(screen, top)
- register TScreen *screen;
- int top;
+WindowScroll(register TScreen *screen, int top)
{
register int i, lines;
register int scrolltop, scrollheight, refreshtop;
@@ -332,9 +319,7 @@
}
void
-ScrollBarOn (xw, init, doalloc)
- XtermWidget xw;
- int init, doalloc;
+ScrollBarOn (XtermWidget xw, int init, int doalloc)
{
register TScreen *screen = &xw->screen;
register int i, j, k;
@@ -416,8 +401,7 @@
}
void
-ScrollBarOff(screen)
- register TScreen *screen;
+ScrollBarOff(register TScreen *screen)
{
if(!screen->fullVwin.scrollbar)
return;
@@ -432,10 +416,11 @@
}
/*ARGSUSED*/
-static void ScrollTextTo(scrollbarWidget, client_data, call_data)
- Widget scrollbarWidget GCC_UNUSED;
- XtPointer client_data GCC_UNUSED;
- XtPointer call_data;
+static void
+ScrollTextTo(
+ Widget scrollbarWidget GCC_UNUSED,
+ XtPointer client_data GCC_UNUSED,
+ XtPointer call_data)
{
float *topPercent = (float *) call_data;
register TScreen *screen = &term->screen;
@@ -454,10 +439,11 @@
}
/*ARGSUSED*/
-static void ScrollTextUpDownBy(scrollbarWidget, client_data, call_data)
- Widget scrollbarWidget GCC_UNUSED;
- XtPointer client_data GCC_UNUSED;
- XtPointer call_data;
+static void
+ScrollTextUpDownBy(
+ Widget scrollbarWidget GCC_UNUSED,
+ XtPointer client_data GCC_UNUSED,
+ XtPointer call_data)
{
int pixels = (int) call_data;
@@ -479,8 +465,8 @@
/*
* assume that b is lower case and allow plural
*/
-static int specialcmplowerwiths (a, b)
- char *a, *b;
+static int
+specialcmplowerwiths (char *a, char *b)
{
register char ca, cb;
@@ -505,10 +491,8 @@
return 0;
}
-static int params_to_pixels (screen, params, n)
- TScreen *screen;
- String *params;
- Cardinal n;
+static int
+params_to_pixels (TScreen *screen, String *params, Cardinal n)
{
register int mult = 1;
register char *s;
@@ -540,11 +524,11 @@
/*ARGSUSED*/
-void HandleScrollForward (gw, event, params, nparams)
- Widget gw;
- XEvent *event GCC_UNUSED;
- String *params;
- Cardinal *nparams;
+void HandleScrollForward (
+ Widget gw,
+ XEvent *event GCC_UNUSED,
+ String *params,
+ Cardinal *nparams)
{
if (IsXtermWidget(gw)) {
register TScreen *screen = &((XtermWidget)gw)->screen;
@@ -556,11 +540,11 @@
/*ARGSUSED*/
-void HandleScrollBack (gw, event, params, nparams)
- Widget gw;
- XEvent *event GCC_UNUSED;
- String *params;
- Cardinal *nparams;
+void HandleScrollBack (
+ Widget gw,
+ XEvent *event GCC_UNUSED,
+ String *params,
+ Cardinal *nparams)
{
if (IsXtermWidget(gw)) {
register TScreen *screen = &((XtermWidget)gw)->screen;
Index: tabs.c
--- xterm-76+/tabs.c Mon Jun 30 08:51:00 1997
+++ xterm-77/tabs.c Tue May 26 05:50:16 1998
@@ -53,8 +53,7 @@
* places tabstops at only every 8 columns
*/
void
-TabReset(tabs)
-Tabs tabs;
+TabReset(Tabs tabs)
{
register int i;
@@ -70,9 +69,7 @@
* places a tabstop at col
*/
void
-TabSet(tabs, col)
- Tabs tabs;
- int col;
+TabSet(Tabs tabs, int col)
{
SET_TAB(tabs,col);
}
@@ -81,9 +78,7 @@
* clears a tabstop at col
*/
void
-TabClear(tabs, col)
- Tabs tabs;
- int col;
+TabClear(Tabs tabs, int col)
{
CLR_TAB(tabs,col);
}
@@ -94,9 +89,7 @@
* A tabstop at col is ignored.
*/
int
-TabNext (tabs, col)
- Tabs tabs;
- int col;
+TabNext (Tabs tabs, int col)
{
register TScreen *screen = &term->screen;
@@ -117,9 +110,7 @@
* A tabstop at col is ignored.
*/
int
-TabPrev (tabs, col)
- Tabs tabs;
- int col;
+TabPrev (Tabs tabs, int col)
{
for (--col; col >= 0; --col)
if (TST_TAB(tabs,col))
@@ -132,7 +123,7 @@
* Tab to the next stop, returning true if the cursor moved
*/
Boolean
-TabToNextStop()
+TabToNextStop(void)
{
register TScreen *screen = &term->screen;
int saved_column = screen->cur_col;
@@ -148,7 +139,7 @@
* Tab to the previous stop, returning true if the cursor moved
*/
Boolean
-TabToPrevStop()
+TabToPrevStop(void)
{
register TScreen *screen = &term->screen;
int saved_column = screen->cur_col;
@@ -162,8 +153,7 @@
* clears all tabs
*/
void
-TabZonk (tabs)
-Tabs tabs;
+TabZonk (Tabs tabs)
{
register int i;
Index: terminfo
--- xterm-76+/terminfo Tue Apr 28 15:01:01 1998
+++ xterm-77/terminfo Tue May 26 06:04:39 1998
@@ -33,6 +33,7 @@
pairs#64,
acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
bel=^G,
+ blink=\E[5m,
bold=\E[1m,
cbt=\E[Z,
civis=\E[?25l,
@@ -68,6 +69,7 @@
il=\E[%p1%dL,
il1=\E[L,
ind=^J,
+ invis=\E[8m,
is2=\E7\E[r\E[m\E[?7h\E[?1;3;4;6l\E[4l\E8\E>,
ka1=\EOw,
ka3=\EOu,
@@ -131,45 +133,9 @@
sc=\E7,
setab=\E[4%p1%dm,
setaf=\E[3%p1%dm,
- setb=\E[4
- %?%p1%{1}%=
- %t4
- %e%p1%{3}%=
- %t6
- %e%p1%{4}%=
- %t1
- %e%p1%{6}%=
- %t3
- %e%p1%d
- %;m,
- setf=\E[3
- %?%p1%{1}%=
- %t4
- %e%p1%{3}%=
- %t6
- %e%p1%{4}%=
- %t1
- %e%p1%{6}%=
- %t3
- %e%p1%d
- %;m,
- sgr=\E[0
- %?%p1%p6%|
- %t;1
- %;
- %?%p2
- %t;4
- %;
- %?%p1%p3%|
- %t;7
- %;
- %?%p4
- %t;5
- %;m
- %?%p9
- %t\016
- %e\017
- %;,
+ setb=\E[4%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m,
+ setf=\E[3%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m,
+ sgr=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m%?%p9%t\016%e\017%;,
sgr0=\E[m\017,
smacs=^N,
smam=\E[?7h,
@@ -239,70 +205,8 @@
# normally used only for printers). The parameter to csnm and scs is the same
# in both cases: the keyboard language parameter returned by CSI ? 2 6 n.
xterm-nrc|xterm with VT220 national replacement character sets,
- csnm=
- %?%p1%{1}%=
- %tNorth American
- %e%p1%{2}%=
- %tBritish
- %e%p1%{3}%=
- %tFlemish
- %e%p1%{4}%=
- %tFrench Canadian
- %e%p1%{5}%=
- %tDanish
- %e%p1%{6}%=
- %tFinnish
- %e%p1%{7}%=
- %tGerman
- %e%p1%{8}%=
- %tDutch
- %e%p1%{9}%=
- %tItalian
- %e%p1%{10}%=
- %tSwiss (French)
- %e%p1%{11}%=
- %tSwiss (German)
- %e%p1%{12}%=
- %tSwedish
- %e%p1%{13}%=
- %tNorwegian
- %e%p1%{14}%=
- %tFrench/Belgian
- %e%p1%{15}%=
- %tSpanish
- %;,
- scs=
- %?%p1%{1}%=
- %t\E(B
- %e%p1%{2}%=
- %t\E(A
- %e%p1%{3}%=
- %t\E(R
- %e%p1%{4}%=
- %t\E(9
- %e%p1%{5}%=
- %t\E(E
- %e%p1%{6}%=
- %t\E(5
- %e%p1%{7}%=
- %t\E(K
- %e%p1%{8}%=
- %t\E(4
- %e%p1%{9}%=
- %t\E(Y
- %e%p1%{10}%=
- %t\E(=
- %e%p1%{11}%=
- %t\E(=
- %e%p1%{12}%=
- %t\E(7
- %e%p1%{13}%=
- %t\E(E
- %e%p1%{14}%=
- %t\E(R
- %e%p1%{15}%=
- %t\E(Z
- %;,
+ csnm=%?%p1%{1}%=%tNorth American%e%p1%{2}%=%tBritish%e%p1%{3}%=%tFlemish%e%p1%{4}%=%tFrench Canadian%e%p1%{5}%=%tDanish%e%p1%{6}%=%tFinnish%e%p1%{7}%=%tGerman%e%p1%{8}%=%tDutch%e%p1%{9}%=%tItalian%e%p1%{10}%=%tSwiss (French)%e%p1%{11}%=%tSwiss (German)%e%p1%{12}%=%tSwedish%e%p1%{13}%=%tNorwegian%e%p1%{14}%=%tFrench/Belgian%e%p1%{15}%=%tSpanish%;,
+ scs=%?%p1%{1}%=%t\E(B%e%p1%{2}%=%t\E(A%e%p1%{3}%=%t\E(R%e%p1%{4}%=%t\E(9%e%p1%{5}%=%t\E(E%e%p1%{6}%=%t\E(5%e%p1%{7}%=%t\E(K%e%p1%{8}%=%t\E(4%e%p1%{9}%=%t\E(Y%e%p1%{10}%=%t\E(=%e%p1%{11}%=%t\E(=%e%p1%{12}%=%t\E(7%e%p1%{13}%=%t\E(E%e%p1%{14}%=%t\E(R%e%p1%{15}%=%t\E(Z%;,
use=xterm,
#
# Foreground 0-15 maps (with toggles) into 30-37 & 90-97
@@ -319,38 +223,10 @@
colors#16,
ncv#32,
pairs#256,
- setab=\E[
- %?%p1%{8}%<
- %t%p1%{40}%+
- %e%p1%{92}%+
- %;%dm,
- setaf=\E[
- %?%p1%{8}%<
- %t%p1%{30}%+
- %e%p1%{82}%+
- %;%dm,
- setb=%p1%{8}%/%{6}%*%{4}%+\E[%d%p1%{8}%m%Pa
- %?%ga%{1}%=
- %t4
- %e%ga%{3}%=
- %t6
- %e%ga%{4}%=
- %t1
- %e%ga%{6}%=
- %t3
- %e%ga%d
- %;m,
- setf=%p1%{8}%/%{6}%*%{3}%+\E[%d%p1%{8}%m%Pa
- %?%ga%{1}%=
- %t4
- %e%ga%{3}%=
- %t6
- %e%ga%{4}%=
- %t1
- %e%ga%{6}%=
- %t3
- %e%ga%d
- %;m,
+ setab=\E[%?%p1%{8}%<%t%p1%{40}%+%e%p1%{92}%+%;%dm,
+ setaf=\E[%?%p1%{8}%<%t%p1%{30}%+%e%p1%{82}%+%;%dm,
+ setb=%p1%{8}%/%{6}%*%{4}%+\E[%d%p1%{8}%m%Pa%?%ga%{1}%=%t4%e%ga%{3}%=%t6%e%ga%{4}%=%t1%e%ga%{6}%=%t3%e%ga%d%;m,
+ setf=%p1%{8}%/%{6}%*%{3}%+\E[%d%p1%{8}%m%Pa%?%ga%{1}%=%t4%e%ga%{3}%=%t6%e%ga%{4}%=%t1%e%ga%{6}%=%t3%e%ga%d%;m,
use=xterm,
# This is an 8-bit version of xterm, which emulates DEC vt220 with ANSI color.
# To use it, your decTerminalID resource must be set to 200 or above.
@@ -375,6 +251,7 @@
pairs#64,
acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
bel=^G,
+ blink=\23325m,
bold=\2331m,
cbt=\233Z,
civis=\233?25l,
@@ -410,6 +287,7 @@
il=\233%p1%dL,
il1=\233L,
ind=^J,
+ invis=\2338m,
is2=\E7\E G\233r\233m\233?7h\233?1;3;4;6l\2334l\E8\E>,
ka1=\217w,
ka3=\217u,
@@ -473,45 +351,9 @@
sc=\E7,
setab=\2334%p1%dm,
setaf=\2333%p1%dm,
- setb=\2334
- %?%p1%{1}%=
- %t4
- %e%p1%{3}%=
- %t6
- %e%p1%{4}%=
- %t1
- %e%p1%{6}%=
- %t3
- %e%p1%d
- %;m,
- setf=\2333
- %?%p1%{1}%=
- %t4
- %e%p1%{3}%=
- %t6
- %e%p1%{4}%=
- %t1
- %e%p1%{6}%=
- %t3
- %e%p1%d
- %;m,
- sgr=\2330
- %?%p1%p6%|
- %t;1
- %;
- %?%p2
- %t;4
- %;
- %?%p1%p3%|
- %t;7
- %;
- %?%p4
- %t;5
- %;m
- %?%p9
- %t\016
- %e\017
- %;,
+ setb=\2334%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m,
+ setf=\2333%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m,
+ sgr=\2330%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m%?%p9%t\016%e\017%;,
sgr0=\233m^O,
smacs=^N,
smam=\233?7h,
@@ -684,22 +526,7 @@
rmso=\E[m,
rs1=\E>\E[1;3;4;5;6l\E[?7h\E[m\E[r\E[2J\E[H,
sc=\E7,
- sgr=\E[
- %?%p1
- %t;7
- %;
- %?%p2
- %t;4
- %;
- %?%p3
- %t;7
- %;
- %?%p4
- %t;5
- %;
- %?%p6
- %t;1
- %;m,
+ sgr=\E[%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p6%t;1%;m,
sgr0=\E[m,
smkx=\E[?1h\E=,
smso=\E[7m,
Index: trace.c
--- xterm-76+/trace.c Wed May 6 18:30:45 1998
+++ xterm-77/trace.c Tue May 26 05:51:42 1998
@@ -40,27 +40,13 @@
#include <sys/types.h>
#include "trace.h"
-#if __STDC__ || CC_HAS_PROTOS
-#define ANSI_VARARGS 1
#include <stdarg.h>
-#else
-#define ANSI_VARARGS 0
-#include <varargs.h>
-#endif
char *trace_who = "parent";
void
-#if ANSI_VARARGS
Trace(char *fmt, ...)
-#else
-Trace(va_alist)
-va_dcl
-#endif
{
-#if !ANSI_VARARGS
- register char *fmt;
-#endif
static FILE *fp;
va_list ap;
@@ -86,19 +72,14 @@
if (!fp)
abort();
-#if ANSI_VARARGS
va_start(ap,fmt);
-#else
- va_start(ap);
- fmt = va_arg(ap, char *);
-#endif
if (fmt != 0) {
vfprintf(fp, fmt, ap);
- va_end(ap);
(void)fflush(fp);
} else {
(void)fclose(fp);
(void)fflush(stdout);
(void)fflush(stderr);
}
+ va_end(ap);
}
Index: trace.h
--- xterm-76+/trace.h Tue Apr 28 15:01:01 1998
+++ xterm-77/trace.h Mon May 25 20:42:31 1998
@@ -33,9 +33,7 @@
#ifndef included_trace_h
#define included_trace_h
-#include "proto.h"
-
-extern void Trace PROTO(( char *, ... ))
+extern void Trace ( char *, ... )
#if __GNUC__
__attribute__ ((format(printf,1,2)))
#endif
Index: util.c
--- xterm-76+/util.c Tue Apr 28 15:01:01 1998
+++ xterm-77/util.c Mon May 25 21:00:48 1998
@@ -43,16 +43,16 @@
extern Bool waiting_for_initial_map;
-static int ClearInLine PROTO((TScreen *screen, int row, int col, int len));
-static int handle_translated_exposure PROTO((TScreen *screen, int rect_x, int rect_y, unsigned int rect_width, unsigned int rect_height));
-static void ClearAbove PROTO((TScreen *screen));
-static void ClearBelow PROTO((TScreen *screen));
-static void ClearLeft PROTO((TScreen *screen));
-static void ClearLine PROTO((TScreen *screen));
-static void CopyWait PROTO((TScreen *screen));
-static void copy_area PROTO((TScreen *screen, int src_x, int src_y, unsigned int width, unsigned int height, int dest_x, int dest_y));
-static void horizontal_copy_area PROTO((TScreen *screen, int firstchar, int nchars, int amount));
-static void vertical_copy_area PROTO((TScreen *screen, int firstline, int nlines, int amount));
+static int ClearInLine (TScreen *screen, int row, int col, int len);
+static int handle_translated_exposure (TScreen *screen, int rect_x, int rect_y, unsigned int rect_width, unsigned int rect_height);
+static void ClearAbove (TScreen *screen);
+static void ClearBelow (TScreen *screen);
+static void ClearLeft (TScreen *screen);
+static void ClearLine (TScreen *screen);
+static void CopyWait (TScreen *screen);
+static void copy_area (TScreen *screen, int src_x, int src_y, unsigned int width, unsigned int height, int dest_x, int dest_y);
+static void horizontal_copy_area (TScreen *screen, int firstchar, int nchars, int amount);
+static void vertical_copy_area (TScreen *screen, int firstline, int nlines, int amount);
/*
* These routines are used for the jump scroll feature
@@ -165,10 +165,10 @@
}
}
-/*
- * scrolls the screen by amount lines, erases bottom, doesn't alter
+/*
+ * scrolls the screen by amount lines, erases bottom, doesn't alter
* cursor position (i.e. cursor moves down amount relative to text).
- * All done within the scrolling region, of course.
+ * All done within the scrolling region, of course.
* requires: amount > 0
*/
void
@@ -504,18 +504,18 @@
* prevent InsertChar from shifting the end of a line over
* if it is being appended to
*/
- if (non_blank_line (screen->visbuf, screen->cur_row,
+ if (non_blank_line (screen->visbuf, screen->cur_row,
screen->cur_col, screen->max_col + 1))
horizontal_copy_area(screen, screen->cur_col,
col - screen->cur_col,
n);
- FillCurBackground(
+ ClearCurBackground(
screen,
- CurCursorX (screen, screen->cur_row, screen->cur_col),
CursorY (screen, screen->cur_row),
- n * CurFontWidth(screen,screen->cur_row),
- FontHeight(screen));
+ CurCursorX (screen, screen->cur_row, screen->cur_col),
+ FontHeight(screen),
+ n * CurFontWidth(screen,screen->cur_row));
}
}
/* adjust screen->buf */
@@ -537,13 +537,13 @@
screen->do_wrap = 0;
if (n > (width = screen->max_col + 1 - screen->cur_col))
n = width;
-
+
if(screen->cur_row - screen->topline <= screen->max_row) {
if(!AddToRefresh(screen)) {
int col = screen->max_col + 1 - n;
if(screen->scroll_amt)
FlushScroll(screen);
-
+
#if OPT_DEC_CHRSET
if (CSET_DOUBLE(SCRN_BUF_CSETS(screen, screen->cur_row)[0])) {
col = (screen->max_col + 1) / 2 - n;
@@ -553,12 +553,12 @@
col - screen->cur_col,
-n);
- FillCurBackground (
+ ClearCurBackground (
screen,
- CurCursorX(screen, screen->cur_row, col),
CursorY (screen, screen->cur_row),
- n * CurFontWidth(screen,screen->cur_row),
- FontHeight(screen));
+ CurCursorX(screen, screen->cur_row, col),
+ FontHeight(screen),
+ n * CurFontWidth(screen,screen->cur_row));
}
}
/* adjust screen->buf */
@@ -703,12 +703,12 @@
if(!AddToRefresh(screen)) {
if(screen->scroll_amt)
FlushScroll(screen);
- FillCurBackground (
+ ClearCurBackground (
screen,
- CurCursorX (screen, row, col),
CursorY (screen, row),
- len * CurFontWidth(screen,row),
- FontHeight(screen));
+ CurCursorX (screen, row, col),
+ FontHeight(screen),
+ len * CurFontWidth(screen,row));
}
}
@@ -725,7 +725,7 @@
return rc;
}
-/*
+/*
* Clear the next n characters on the cursor's line, including the cursor's
* position.
*/
@@ -760,7 +760,7 @@
(void) ClearInLine(screen, screen->cur_row, 0, screen->cur_col + 1);
}
-/*
+/*
* Erase the cursor's line.
*/
static void
@@ -783,8 +783,8 @@
if(screen->scroll_amt)
FlushScroll(screen);
ClearCurBackground(screen,
- top * FontHeight(screen) + screen->border,
- OriginX(screen),
+ top * FontHeight(screen) + screen->border,
+ OriginX(screen),
(screen->max_row - top + 1) * FontHeight(screen),
Width(screen));
}
@@ -893,7 +893,7 @@
XEvent *rep = &reply;
while (1) {
- XWindowEvent (screen->display, VWindow(screen),
+ XWindowEvent (screen->display, VWindow(screen),
ExposureMask, &reply);
switch (reply.type) {
case Expose:
@@ -948,7 +948,7 @@
screen->copy_dest_x = dest_x;
screen->copy_dest_y = dest_y;
- XCopyArea(screen->display,
+ XCopyArea(screen->display,
TextWindow(screen), TextWindow(screen),
NormalGC(screen),
src_x, src_y, width, height, dest_x, dest_y);
@@ -1084,7 +1084,7 @@
/ CurFontWidth(screen,screen->cur_row);
if(leftcol < 0)
leftcol = 0;
- nrows = (rect_y + rect_height - 1 - screen->border) /
+ nrows = (rect_y + rect_height - 1 - screen->border) /
FontHeight(screen) - toprow + 1;
ncols = (rect_x + rect_width - 1 - OriginX(screen)) /
FontWidth(screen) - leftcol + 1;
@@ -1272,7 +1272,7 @@
screen->iconVwin.reverseboldGC = tmpGC;
#endif /* NO_ACTIVE_ICON */
- recolor_cursor (screen->pointer_cursor,
+ recolor_cursor (screen->pointer_cursor,
screen->mousecolor, screen->mousecolorback);
recolor_cursor (screen->arrow,
screen->mousecolor, screen->mousecolorback);
@@ -1407,7 +1407,7 @@
screen->cursor_state == OFF ? ' ' : '*',
y, x, chrset, len, len, text))
y += FontAscent(screen);
- XDrawImageString(screen->display, TextWindow(screen), gc,
+ XDrawImageString(screen->display, TextWindow(screen), gc,
x, y, (char *)text, len);
if ((flags & (BOLD|BLINK)) && screen->enbolden)
XDrawString(screen->display, TextWindow(screen), gc,
@@ -1415,8 +1415,8 @@
if ((flags & UNDERLINE) && screen->underline) {
if (FontDescent(screen) > 1)
y++;
- XDrawLine(screen->display, TextWindow(screen), gc,
- x, y, x + len * FontWidth(screen), y);
+ XDrawLine(screen->display, TextWindow(screen), gc,
+ x, y, x + len * FontWidth(screen) - 1, y);
}
return x + len * FontWidth(screen);
@@ -1519,7 +1519,7 @@
{
int fg = (int) ((color >> 4) & 0xf);
- if (term->screen.colorAttrMode
+ if (term->screen.colorAttrMode
|| (fg == extract_bg(color))) {
if (term->screen.colorULMode && (flags & UNDERLINE))
fg = COLOR_UL;
Index: version.h
--- xterm-76+/version.h Fri May 8 19:37:00 1998
+++ xterm-77/version.h Mon May 25 20:07:18 1998
@@ -6,4 +6,4 @@
* version of xterm has been built. The number in parentheses is my patch
* number (T.Dickey).
*/
-#define XTERM_VERSION "XFree86 3.9Ah(76)"
+#define XTERM_VERSION "XFree86 3.9Ah(77)"
Index: xterm.h
--- xterm-76+/xterm.h Tue Apr 28 15:01:01 1998
+++ xterm-77/xterm.h Mon May 25 22:11:38 1998
@@ -12,6 +12,8 @@
#define GCC_UNUSED /* nothing */
#endif
+#include <X11/Xos.h>
+
#ifndef HAVE_CONFIG_H
#ifndef HAVE_X11_DECKEYSYM_H
@@ -76,24 +78,24 @@
#include "proto.h"
/* Tekproc.c */
-extern int TekInit PROTO((void));
-extern void ChangeTekColors PROTO((TScreen *screen, ScrnColors *pNew));
-extern void TCursorToggle PROTO((int toggle));
-extern void TekCopy PROTO((void));
-extern void TekEnqMouse PROTO((int c));
-extern void TekExpose PROTO((Widget w, XEvent *event, Region region));
-extern void TekGINoff PROTO((void));
-extern void TekReverseVideo PROTO((TScreen *screen));
-extern void TekRun PROTO((void));
-extern void TekSetFontSize PROTO((int newitem));
-extern void TekSimulatePageButton PROTO((Bool reset));
-extern void dorefresh PROTO((void));
+extern int TekInit (void);
+extern void ChangeTekColors (TScreen *screen, ScrnColors *pNew);
+extern void TCursorToggle (int toggle);
+extern void TekCopy (void);
+extern void TekEnqMouse (int c);
+extern void TekExpose (Widget w, XEvent *event, Region region);
+extern void TekGINoff (void);
+extern void TekReverseVideo (TScreen *screen);
+extern void TekRun (void);
+extern void TekSetFontSize (int newitem);
+extern void TekSimulatePageButton (Bool reset);
+extern void dorefresh (void);
/* button.c */
-extern Boolean SendMousePosition PROTO((Widget w, XEvent* event));
-extern int SetCharacterClassRange PROTO((int low, int high, int value));
+extern Boolean SendMousePosition (Widget w, XEvent* event);
+extern int SetCharacterClassRange (int low, int high, int value);
extern void DiredButton PROTO_XT_ACTIONS_ARGS;
-extern void DisownSelection PROTO((XtermWidget termw));
+extern void DisownSelection (XtermWidget termw);
extern void HandleGINInput PROTO_XT_ACTIONS_ARGS;
extern void HandleInsertSelection PROTO_XT_ACTIONS_ARGS;
extern void HandleKeyboardSelectEnd PROTO_XT_ACTIONS_ARGS;
@@ -105,90 +107,94 @@
extern void HandleSelectSet PROTO_XT_ACTIONS_ARGS;
extern void HandleSelectStart PROTO_XT_ACTIONS_ARGS;
extern void HandleStartExtend PROTO_XT_ACTIONS_ARGS;
-extern void ResizeSelection PROTO((TScreen *screen, int rows, int cols));
-extern void ScrollSelection PROTO((TScreen* screen, int amount));
-extern void TrackMouse PROTO((int func, int startrow, int startcol, int firstrow, int lastrow));
-extern void TrackText PROTO((int frow, int fcol, int trow, int tcol));
+extern void ResizeSelection (TScreen *screen, int rows, int cols);
+extern void ScrollSelection (TScreen* screen, int amount);
+extern void TrackMouse (int func, int startrow, int startcol, int firstrow, int lastrow);
+extern void TrackText (int frow, int fcol, int trow, int tcol);
extern void ViButton PROTO_XT_ACTIONS_ARGS;
/* charproc.c */
-extern int VTInit PROTO((void));
-extern int v_write PROTO((int f, char *d, int len));
-extern void FindFontSelection PROTO((char *atom_name, Bool justprobe));
-extern void HideCursor PROTO((void));
-extern void SetVTFont PROTO((int i, Bool doresize, char *name1, char *name2));
-extern void ShowCursor PROTO((void));
-extern void SwitchBufPtrs PROTO((TScreen *screen));
-extern void ToggleAlternate PROTO((TScreen *screen));
-extern void VTReset PROTO((int full, int saved));
-extern void VTRun PROTO((void));
-extern void dotext PROTO((TScreen *screen, int charset, Char *buf, Char *ptr));
-extern void resetCharsets PROTO((TScreen *screen));
-extern void set_cursor_gcs PROTO((TScreen *screen));
-extern void unparseputc PROTO((int c, int fd));
-extern void unparseputc1 PROTO((int c, int fd));
-extern void unparseseq PROTO((ANSI *ap, int fd));
+extern int VTInit (void);
+extern int v_write (int f, char *d, int len);
+extern void FindFontSelection (char *atom_name, Bool justprobe);
+extern void HideCursor (void);
+extern void SetVTFont (int i, Bool doresize, char *name1, char *name2);
+extern void ShowCursor (void);
+extern void SwitchBufPtrs (TScreen *screen);
+extern void ToggleAlternate (TScreen *screen);
+extern void VTReset (int full, int saved);
+extern void VTRun (void);
+extern void dotext (TScreen *screen, int charset, Char *buf, Char *ptr);
+extern void resetCharsets (TScreen *screen);
+extern void set_cursor_gcs (TScreen *screen);
+extern void unparseputc (int c, int fd);
+extern void unparseputc1 (int c, int fd);
+extern void unparseseq (ANSI *ap, int fd);
#if OPT_ISO_COLORS
-extern void SGR_Background PROTO((int color));
-extern void SGR_Foreground PROTO((int color));
+extern void SGR_Background (int color);
+extern void SGR_Foreground (int color);
#endif
/* charsets.c */
extern int xtermCharSets (Char *buf, Char *ptr, char charset);
/* cursor.c */
-extern void CarriageReturn PROTO((TScreen *screen));
-extern void CursorBack PROTO((TScreen *screen, int n));
-extern void CursorDown PROTO((TScreen *screen, int n));
-extern void CursorForward PROTO((TScreen *screen, int n));
-extern void CursorNextLine PROTO((TScreen *screen, int count));
-extern void CursorPrevLine PROTO((TScreen *screen, int count));
-extern void CursorRestore PROTO((XtermWidget tw, SavedCursor *sc));
-extern void CursorSave PROTO((XtermWidget tw, SavedCursor *sc));
-extern void CursorSet PROTO((TScreen *screen, int row, int col, unsigned flags));
-extern void CursorUp PROTO((TScreen *screen, int n));
-extern void Index PROTO((TScreen *screen, int amount));
-extern void RevIndex PROTO((TScreen *screen, int amount));
+extern void CarriageReturn (TScreen *screen);
+extern void CursorBack (TScreen *screen, int n);
+extern void CursorDown (TScreen *screen, int n);
+extern void CursorForward (TScreen *screen, int n);
+extern void CursorNextLine (TScreen *screen, int count);
+extern void CursorPrevLine (TScreen *screen, int count);
+extern void CursorRestore (XtermWidget tw, SavedCursor *sc);
+extern void CursorSave (XtermWidget tw, SavedCursor *sc);
+extern void CursorSet (TScreen *screen, int row, int col, unsigned flags);
+extern void CursorUp (TScreen *screen, int n);
+extern void Index (TScreen *screen, int amount);
+extern void RevIndex (TScreen *screen, int amount);
/* doublechr.c */
-extern void xterm_DECDHL PROTO((Bool top));
-extern void xterm_DECSWL PROTO((void));
-extern void xterm_DECDWL PROTO((void));
+extern void xterm_DECDHL (Bool top);
+extern void xterm_DECSWL (void);
+extern void xterm_DECDWL (void);
/* input.c */
-extern void Input PROTO((TKeyboard *keyboard, TScreen *screen, XKeyEvent *event, Bool eightbit));
-extern void StringInput PROTO((TScreen *screen, char *string, size_t nbytes));
+extern void Input (TKeyboard *keyboard, TScreen *screen, XKeyEvent *event, Bool eightbit);
+extern void StringInput (TScreen *screen, char *string, size_t nbytes);
/* main.c */
-extern int main PROTO((int argc, char **argv));
+#ifndef __EMX__
+extern int main (int argc, char **argv);
+#else
+extern int main (int argc, char **argv,char **envp);
+#endif
-extern int GetBytesAvailable PROTO((int fd));
-extern int kill_process_group PROTO((int pid, int sig));
-extern int nonblocking_wait PROTO((void));
-extern void first_map_occurred PROTO((void));
+extern int GetBytesAvailable (int fd);
+extern int kill_process_group (int pid, int sig);
+extern int nonblocking_wait (void);
+extern void first_map_occurred (void);
#ifdef SIGNAL_T
-extern SIGNAL_T Exit PROTO((int n));
+extern SIGNAL_T Exit (int n);
#endif
/* menu.c */
extern void do_hangup PROTO_XT_CALLBACK_ARGS;
-extern void show_8bit_control PROTO((Bool value));
+extern void show_8bit_control (Bool value);
/* misc.c */
-extern Cursor make_colored_cursor PROTO((unsigned cursorindex, unsigned long fg, unsigned long bg));
-extern char *SysErrorMsg PROTO((int n));
-extern char *strindex PROTO((char *s1, char *s2));
-extern char *udk_lookup PROTO((int keycode, int *len));
-extern int XStrCmp PROTO((char *s1, char *s2));
-extern int xerror PROTO((Display *d, XErrorEvent *ev));
-extern int xioerror PROTO((Display *dpy));
-extern void Bell PROTO((int which, int percent));
-extern void Changename PROTO((char *name));
-extern void Changetitle PROTO((char *name));
-extern void Cleanup PROTO((int code));
-extern void Error PROTO((int i));
+extern Cursor make_colored_cursor (unsigned cursorindex, unsigned long fg, unsigned long bg);
+extern char *SysErrorMsg (int n);
+extern char *strindex (char *s1, char *s2);
+extern char *udk_lookup (int keycode, int *len);
+extern int XStrCmp (char *s1, char *s2);
+extern int xerror (Display *d, XErrorEvent *ev);
+extern int xioerror (Display *dpy);
+extern void Bell (int which, int percent);
+extern void Changename (char *name);
+extern void Changetitle (char *name);
+extern void Cleanup (int code);
+extern void Error (int i);
extern void HandleBellPropertyChange PROTO_XT_EV_HANDLER_ARGS;
extern void HandleEightBitKeyPressed PROTO_XT_ACTIONS_ARGS;
extern void HandleEnterWindow PROTO_XT_EV_HANDLER_ARGS;
@@ -196,109 +202,109 @@
extern void HandleKeyPressed PROTO_XT_ACTIONS_ARGS;
extern void HandleLeaveWindow PROTO_XT_EV_HANDLER_ARGS;
extern void HandleStringEvent PROTO_XT_ACTIONS_ARGS;
-extern void Panic PROTO((char *s, int a));
-extern void Redraw PROTO((void));
-extern void ReverseOldColors PROTO((void));
-extern void Setenv PROTO((char *var, char *value));
-extern void SysError PROTO((int i));
-extern void VisualBell PROTO((void));
-extern void creat_as PROTO((int uid, int gid, char *pathname, int mode));
-extern void do_dcs PROTO((Char *buf, size_t len));
-extern void do_osc PROTO((Char *buf, int len));
-extern void do_xevents PROTO((void));
-extern void end_tek_mode PROTO((void));
-extern void end_vt_mode PROTO((void));
-extern void hide_tek_window PROTO((void));
-extern void hide_vt_window PROTO((void));
-extern void reset_decudk PROTO((void));
-extern void set_tek_visibility PROTO((int on));
-extern void set_vt_visibility PROTO((int on));
-extern void switch_modes PROTO((Bool tovt));
-extern void xevents PROTO((void));
-extern void xt_error PROTO((String message));
+extern void Panic (char *s, int a);
+extern void Redraw (void);
+extern void ReverseOldColors (void);
+extern void Setenv (char *var, char *value);
+extern void SysError (int i);
+extern void VisualBell (void);
+extern void creat_as (int uid, int gid, char *pathname, int mode);
+extern void do_dcs (Char *buf, size_t len);
+extern void do_osc (Char *buf, int len);
+extern void do_xevents (void);
+extern void end_tek_mode (void);
+extern void end_vt_mode (void);
+extern void hide_tek_window (void);
+extern void hide_vt_window (void);
+extern void reset_decudk (void);
+extern void set_tek_visibility (Boolean on);
+extern void set_vt_visibility (Boolean on);
+extern void switch_modes (Bool tovt);
+extern void xevents (void);
+extern void xt_error (String message);
#ifdef ALLOWLOGGING
-extern void StartLog PROTO((TScreen *screen));
-extern void CloseLog PROTO((TScreen *screen));
-extern void FlushLog PROTO((TScreen *screen));
+extern void StartLog (TScreen *screen);
+extern void CloseLog (TScreen *screen);
+extern void FlushLog (TScreen *screen);
#endif
/* print.c */
-extern int xtermPrinterControl PROTO((int chr));
-extern void xtermAutoPrint PROTO((int chr));
-extern void xtermMediaControl PROTO((int param, int private));
-extern void xtermPrintScreen PROTO((void));
+extern int xtermPrinterControl (int chr);
+extern void xtermAutoPrint (int chr);
+extern void xtermMediaControl (int param, int private);
+extern void xtermPrintScreen (void);
/* screen.c */
-extern Bool non_blank_line PROTO((ScrnBuf sb, int row, int col, int len));
-extern ScrnBuf Allocate PROTO((int nrow, int ncol, Char **addr));
-extern int ScreenResize PROTO((TScreen *screen, int width, int height, unsigned *flags));
-extern int ScrnTstWrapped PROTO((TScreen *screen, int row));
-extern size_t ScrnPointers PROTO((TScreen *screen, size_t len));
-extern void ClearBufRows PROTO((TScreen *screen, int first, int last));
-extern void ScreenWrite PROTO((TScreen *screen, Char *str, unsigned flags, unsigned cur_fg_bg, int length));
-extern void ScrnClrWrapped PROTO((TScreen *screen, int row));
-extern void ScrnDeleteChar PROTO((TScreen *screen, int n, int size));
-extern void ScrnDeleteLine PROTO((TScreen *screen, ScrnBuf sb, int n, int last, int size, int where));
-extern void ScrnInsertChar PROTO((TScreen *screen, int n, int size));
-extern void ScrnInsertLine PROTO((TScreen *screen, ScrnBuf sb, int last, int where, int n, int size));
-extern void ScrnRefresh PROTO((TScreen *screen, int toprow, int leftcol, int nrows, int ncols, int force));
-extern void ScrnSetWrapped PROTO((TScreen *screen, int row));
+extern Bool non_blank_line (ScrnBuf sb, int row, int col, int len);
+extern ScrnBuf Allocate (int nrow, int ncol, Char **addr);
+extern int ScreenResize (TScreen *screen, int width, int height, unsigned *flags);
+extern int ScrnTstWrapped (TScreen *screen, int row);
+extern size_t ScrnPointers (TScreen *screen, size_t len);
+extern void ClearBufRows (TScreen *screen, int first, int last);
+extern void ScreenWrite (TScreen *screen, Char *str, unsigned flags, unsigned cur_fg_bg, int length);
+extern void ScrnClrWrapped (TScreen *screen, int row);
+extern void ScrnDeleteChar (TScreen *screen, int n, int size);
+extern void ScrnDeleteLine (TScreen *screen, ScrnBuf sb, int n, int last, int size, int where);
+extern void ScrnInsertChar (TScreen *screen, int n, int size);
+extern void ScrnInsertLine (TScreen *screen, ScrnBuf sb, int last, int where, int n, int size);
+extern void ScrnRefresh (TScreen *screen, int toprow, int leftcol, int nrows, int ncols, int force);
+extern void ScrnSetWrapped (TScreen *screen, int row);
/* scrollbar.c */
-extern void DoResizeScreen PROTO((XtermWidget xw));
+extern void DoResizeScreen (XtermWidget xw);
extern void HandleScrollBack PROTO_XT_ACTIONS_ARGS;
extern void HandleScrollForward PROTO_XT_ACTIONS_ARGS;
-extern void ResizeScrollBar PROTO((TScreen *screen));
-extern void ScrollBarDrawThumb PROTO((Widget scrollWidget));
-extern void ScrollBarOff PROTO((TScreen *screen));
-extern void ScrollBarOn PROTO((XtermWidget xw, int init, int doalloc));
-extern void ScrollBarReverseVideo PROTO((Widget scrollWidget));
-extern void WindowScroll PROTO((TScreen *screen, int top));
+extern void ResizeScrollBar (TScreen *screen);
+extern void ScrollBarDrawThumb (Widget scrollWidget);
+extern void ScrollBarOff (TScreen *screen);
+extern void ScrollBarOn (XtermWidget xw, int init, int doalloc);
+extern void ScrollBarReverseVideo (Widget scrollWidget);
+extern void WindowScroll (TScreen *screen, int top);
/* tabs.c */
-extern Boolean TabToNextStop PROTO((void));
-extern Boolean TabToPrevStop PROTO((void));
-extern int TabNext PROTO((Tabs tabs, int col));
-extern int TabPrev PROTO((Tabs tabs, int col));
-extern void TabClear PROTO((Tabs tabs, int col));
-extern void TabReset PROTO((Tabs tabs));
-extern void TabSet PROTO((Tabs tabs, int col));
-extern void TabZonk PROTO((Tabs tabs));
+extern Boolean TabToNextStop (void);
+extern Boolean TabToPrevStop (void);
+extern int TabNext (Tabs tabs, int col);
+extern int TabPrev (Tabs tabs, int col);
+extern void TabClear (Tabs tabs, int col);
+extern void TabReset (Tabs tabs);
+extern void TabSet (Tabs tabs, int col);
+extern void TabZonk (Tabs tabs);
/* util.c */
-extern GC updatedXtermGC PROTO((TScreen *screen, int flags, int fg_bg, Bool hilite));
-extern int AddToRefresh PROTO((TScreen *screen));
-extern int HandleExposure PROTO((TScreen *screen, XEvent *event));
-extern int drawXtermText PROTO((TScreen *screen, unsigned flags, GC gc, int x, int y, int chrset, Char *text, int len));
-extern void ChangeColors PROTO((XtermWidget tw, ScrnColors *pNew));
-extern void ClearRight PROTO((TScreen *screen, int n));
-extern void ClearScreen PROTO((TScreen *screen));
-extern void DeleteChar PROTO((TScreen *screen, int n));
-extern void DeleteLine PROTO((TScreen *screen, int n));
-extern void FlushScroll PROTO((TScreen *screen));
-extern void GetColors PROTO((XtermWidget tw, ScrnColors *pColors));
-extern void InsertChar PROTO((TScreen *screen, int n));
-extern void InsertLine PROTO((TScreen *screen, int n));
-extern void RevScroll PROTO((TScreen *screen, int amount));
-extern void ReverseVideo PROTO((XtermWidget termw));
-extern void Scroll PROTO((TScreen *screen, int amount));
-extern void do_erase_display PROTO((TScreen *screen, int param, int mode));
-extern void do_erase_line PROTO((TScreen *screen, int param, int mode));
-extern void recolor_cursor PROTO((Cursor cursor, unsigned long fg, unsigned long bg));
-extern void resetXtermGC PROTO((TScreen *screen, int flags, Bool hilite));
-extern void scrolling_copy_area PROTO((TScreen *screen, int firstline, int nlines, int amount));
+extern GC updatedXtermGC (TScreen *screen, int flags, int fg_bg, Bool hilite);
+extern int AddToRefresh (TScreen *screen);
+extern int HandleExposure (TScreen *screen, XEvent *event);
+extern int drawXtermText (TScreen *screen, unsigned flags, GC gc, int x, int y, int chrset, Char *text, int len);
+extern void ChangeColors (XtermWidget tw, ScrnColors *pNew);
+extern void ClearRight (TScreen *screen, int n);
+extern void ClearScreen (TScreen *screen);
+extern void DeleteChar (TScreen *screen, int n);
+extern void DeleteLine (TScreen *screen, int n);
+extern void FlushScroll (TScreen *screen);
+extern void GetColors (XtermWidget tw, ScrnColors *pColors);
+extern void InsertChar (TScreen *screen, int n);
+extern void InsertLine (TScreen *screen, int n);
+extern void RevScroll (TScreen *screen, int amount);
+extern void ReverseVideo (XtermWidget termw);
+extern void Scroll (TScreen *screen, int amount);
+extern void do_erase_display (TScreen *screen, int param, int mode);
+extern void do_erase_line (TScreen *screen, int param, int mode);
+extern void recolor_cursor (Cursor cursor, unsigned long fg, unsigned long bg);
+extern void resetXtermGC (TScreen *screen, int flags, Bool hilite);
+extern void scrolling_copy_area (TScreen *screen, int firstline, int nlines, int amount);
#if OPT_ISO_COLORS
-extern Pixel getXtermBackground PROTO((int flags, int color));
-extern Pixel getXtermForeground PROTO((int flags, int color));
-extern int extract_bg PROTO((unsigned color));
-extern int extract_fg PROTO((unsigned color, unsigned flags));
-extern unsigned makeColorPair PROTO((int fg, int bg));
-extern unsigned xtermColorPair PROTO((void));
-extern void ClearCurBackground PROTO((TScreen *screen, int top, int left, unsigned height, unsigned width));
-extern void useCurBackground PROTO((Bool flag));
+extern Pixel getXtermBackground (int flags, int color);
+extern Pixel getXtermForeground (int flags, int color);
+extern int extract_bg (unsigned color);
+extern int extract_fg (unsigned color, unsigned flags);
+extern unsigned makeColorPair (int fg, int bg);
+extern unsigned xtermColorPair (void);
+extern void ClearCurBackground (TScreen *screen, int top, int left, unsigned height, unsigned width);
+extern void useCurBackground (Bool flag);
#else /* !OPT_ISO_COLORS */
@@ -318,24 +324,18 @@
#endif /* OPT_ISO_COLORS */
-#define FillCurBackground(screen, left, top, width, height) \
- useCurBackground(TRUE); \
- XFillRectangle (screen->display, TextWindow(screen), \
- ReverseGC(screen), left, top, width, height); \
- useCurBackground(FALSE)
-
#if OPT_DEC_CHRSET
-extern int getXtermChrSet PROTO((int row, int col));
-extern int curXtermChrSet PROTO((int row));
+extern int getXtermChrSet (int row, int col);
+extern int curXtermChrSet (int row);
#else
#define getXtermChrSet(row, col) 0
#define curXtermChrSet(row) 0
#endif
#if OPT_XMC_GLITCH
-extern void Mark_XMC PROTO((TScreen *screen, int param));
-extern void Jump_XMC PROTO((TScreen *screen));
-extern void Resolve_XMC PROTO((TScreen *screen));
+extern void Mark_XMC (TScreen *screen, int param);
+extern void Jump_XMC (TScreen *screen);
+extern void Resolve_XMC (TScreen *screen);
#endif
#endif /* included_xterm_h */
Index: xterm.log.html
--- xterm-76+/xterm.log.html Fri May 8 20:58:03 1998
+++ xterm-77/xterm.log.html Tue May 26 06:45:26 1998
@@ -41,6 +41,7 @@
xc/programs/Xserver/hw/xfree86).
<UL>
+<LI><A HREF="#xterm_77">Patch #77 - 1998/5/26 - XFree86 3.9Ah and 3.3.2</A>
<LI><A HREF="#xterm_76">Patch #76 - 1998/5/8 - XFree86 3.9Ah and 3.3.2</A>
<LI><A HREF="#xterm_75">Patch #75 - 1998/5/7 - XFree86 3.9Ah and 3.3.2</A>
<LI><A HREF="#xterm_74">Patch #74 - 1998/4/27 - XFree86 3.9Ag and 3.3.2</A>
@@ -118,6 +119,76 @@
<LI><A HREF="#xterm_02">Patch #2 - 1996/1/7</A>
<LI><A HREF="#xterm_01">Patch #1 - 1996/1/6</A>
</UL>
+
+<H1><A NAME="xterm_77">Patch #77 - 1998/5/26 - XFree86 3.9Ah and 3.3.2</A></H1>
+
+Most of the bulk of this patch is to convert the extended C (K&R functions
+with prototypes) to ANSI. I verified that on Linux by comparing object
+files, to ensure that I did not, for example, interchange parameters in
+the function declarations.
+<p>
+The rest of the patch fixes several minor bugs, and adds a few features:
+<ul>
+ <li>back-out my use of ncurses "captoinfo -f" option (if/then/else/endif)
+ formatting, since ncurses did not correctly filter embedded newlines
+ in terminfo capability strings until _after_ ncurses 4.1, thus
+ corrupting setf/setb/sgr strings (reported by Darren Hiebert and
+ others).
+
+ <li>document SGR 8, 28 (invisible/visible), add corresponding
+ capabilities to terminfo description.
+<p>
+ I would also add the 'prot protected capability, but the control
+ sequences for that would not be recognized or properly ignored by the
+ older xterm programs.
+
+ <li>modify ChangeGroup to not suppress a null-resource, but treat it as an
+ empty string (recommended by Stefan Dalibor).
+
+ <li>add printerAutoClose resource to control whether printer is closed
+ when going offline. More than one person reports problems (on
+ Solaris 2.6 and Digital Unix 4.0) getting the printer to proceed
+ unless xterm exits; I think that it is a problem flushing the pipe.
+ Closing it ought to flush it.
+
+ <li>adapt TOG fix-3 to in HandleKeymapChange and VTInitI18N (but adapt
+ XtStackAlloc/XtStackFree for clarity, as well as fixing memory leak).
+
+ <li>change calls on FillCurBackground to ClearCurBackground, in effect
+ using XClearArea rather than XFillRectangle when clearing as a
+ side-effect of scrolling and insertion (patch by Alexander V
+ Lukyanov)
+
+ <li>correct some places where insert/delete did not _move_ the color
+ attributes, using memmove (patch by Alexander V Lukyanov
+ <lav@long.yar.ru>)
+
+ <li>add ifdef's for __CYGWIN32__, for port to cygnus version B19.1
+ (patch by Andrew Sumner <andrew_sumner@hotmail.com>).
+
+ <li>remove #define for hpux that turned on USE_SYSV_ENVVARS, since this
+ causes some applications (such as 'less') to get incorrect $LINES and
+ $COLUMNS values (reported by Clint Olsen).
+
+ <li>modify behavior for HP-UX, to set the "reserved" process group
+ controls to _POSIX_VDISABLE so the TIOCSLTC ioctl does not produce an
+ error (patch by Ben Yoshino <ben@wiliki.eng.hawaii.edu>).
+
+ <li>correct length of underlining, reducing it by one pixel to avoid
+ leaving a dot when the application does not clear the whole screen
+ (patch by (Sergei Laskavy <Laskavy@cs.msu.su>).
+<p>
+ I noticed this only recently myself (and other people as well); it
+ depends on the font chosen. A 6x10 font shows it, but the other
+ fonts (from XTerm.ad) do not. I also see a similar problem with the
+ emulation of bold fonts.
+
+ <li>add include for Xos.h to xterm.h, to ensure proper definitions
+ (reported by Holger Veit).
+
+ <li>update config.guess to recognize Unixware 2.1 and 7 (patch by
+ Mike Hopkirk <hops@sco.com>).
+</ul>
<H1><A NAME="xterm_76">Patch #76 - 1998/5/8 - XFree86 3.9Ah and 3.3.2</A></H1>
Index: xterm.man
--- xterm-76+/xterm.man Wed May 6 07:10:25 1998
+++ xterm-77/xterm.man Mon May 25 16:31:08 1998
@@ -985,6 +985,18 @@
A ``2'' prints ANSI color attributes as well.
The default is ``1.''
.TP 8
+.B "printerAutoClose (\fPclass\fB PrinterAutoClose)"
+If true, xterm will close the printer (a pipe) when the application switches
+the printer offline with a Media Copy command.
+The default is ``false.''
+.TP 8
+.B "printerCommand (\fPclass\fB PrinterCommand)"
+Specifies a shell command to which
+.I xterm
+will open a pipe when the first
+MC (Media Copy) command is initiated.
+The default is ``lpr.''
+.TP 8
.B "printerControlMode (\fPclass\fB PrinterControlMode)"
Specifies the printer control mode.
A ``1'' selects autoprint mode, which causes
@@ -995,13 +1007,6 @@
Autoprint mode is overridden by printer controller mode (a ``2''),
which causes all of the output to be directed to the printer.
The default is ``0.''
-.TP 8
-.B "printerCommand (\fPclass\fB PrinterCommand)"
-Specifies a shell command to which
-.I xterm
-will open a pipe when the first
-MC (Media Copy) command is initiated.
-The default is ``lpr.''
.TP 8
.B "printerExtent (\fPclass\fB PrinterExtent)"
Controls whether a print page function will print the entire page (true), or