Module Name: xsrc
Committed By: mrg
Date: Wed Feb 23 09:14:10 UTC 2011
Modified Files:
xsrc/external/mit/xterm/dist: XTerm.ad linedata.c misc.c ptyx.h
xterm.man
Log Message:
merge xterm 269
To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 xsrc/external/mit/xterm/dist/XTerm.ad
cvs rdiff -u -r1.2 -r1.3 xsrc/external/mit/xterm/dist/linedata.c
cvs rdiff -u -r1.7 -r1.8 xsrc/external/mit/xterm/dist/misc.c \
xsrc/external/mit/xterm/dist/xterm.man
cvs rdiff -u -r1.6 -r1.7 xsrc/external/mit/xterm/dist/ptyx.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: xsrc/external/mit/xterm/dist/XTerm.ad
diff -u xsrc/external/mit/xterm/dist/XTerm.ad:1.5 xsrc/external/mit/xterm/dist/XTerm.ad:1.6
--- xsrc/external/mit/xterm/dist/XTerm.ad:1.5 Wed Jun 30 04:49:44 2010
+++ xsrc/external/mit/xterm/dist/XTerm.ad Wed Feb 23 09:14:10 2011
@@ -1,8 +1,8 @@
-! $XTermId: XTerm.ad,v 1.93 2010/06/15 10:55:59 tom Exp $
+! $XTermId: XTerm.ad,v 1.94 2011/01/19 22:05:58 tom Exp $
! -----------------------------------------------------------------------------
! this file is part of xterm
!
-! Copyright 1996-2009,2010 by Thomas E. Dickey
+! Copyright 1996-2010,2011 by Thomas E. Dickey
!
! All Rights Reserved
!
@@ -43,6 +43,7 @@
*mainMenu.Label: Main Options
*mainMenu*toolbar*Label: Toolbar
+*mainMenu*fullscreen*Label: Full Screen
*mainMenu*securekbd*Label: Secure Keyboard
*mainMenu*allowsends*Label: Allow SendEvents
*mainMenu*redraw*Label: Redraw Window
Index: xsrc/external/mit/xterm/dist/linedata.c
diff -u xsrc/external/mit/xterm/dist/linedata.c:1.2 xsrc/external/mit/xterm/dist/linedata.c:1.3
--- xsrc/external/mit/xterm/dist/linedata.c:1.2 Wed Jun 30 04:49:44 2010
+++ xsrc/external/mit/xterm/dist/linedata.c Wed Feb 23 09:14:10 2011
@@ -1,8 +1,8 @@
-/* $XTermId: linedata.c,v 1.78 2010/04/14 23:41:10 tom Exp $ */
+/* $XTermId: linedata.c,v 1.79 2011/01/21 00:07:35 tom Exp $ */
/************************************************************
-Copyright 2009,2010 by Thomas E. Dickey
+Copyright 2009-2010,2011 by Thomas E. Dickey
All Rights Reserved
@@ -189,7 +189,7 @@
#define CellDataSize(screen) (SizeOfCellData + screen->lineExtra)
#define CellDataAddr(screen, data, cell) \
- (CellData *)((char *)data + (cell * CellDataSize(screen)))
+ (CellData *)(void *) ((char *)data + (cell * CellDataSize(screen)))
CellData *
newCellData(XtermWidget xw, Cardinal count)
Index: xsrc/external/mit/xterm/dist/misc.c
diff -u xsrc/external/mit/xterm/dist/misc.c:1.7 xsrc/external/mit/xterm/dist/misc.c:1.8
--- xsrc/external/mit/xterm/dist/misc.c:1.7 Tue Nov 23 09:18:19 2010
+++ xsrc/external/mit/xterm/dist/misc.c Wed Feb 23 09:14:10 2011
@@ -1,7 +1,7 @@
-/* $XTermId: misc.c,v 1.511 2010/11/10 00:56:29 tom Exp $ */
+/* $XTermId: misc.c,v 1.520 2011/02/13 21:03:21 tom Exp $ */
/*
- * Copyright 1999-2009,2010 by Thomas E. Dickey
+ * Copyright 1999-2010,2011 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -250,17 +250,19 @@
#endif
static void
-setXUrgency(TScreen * screen, Bool enable)
+setXUrgency(XtermWidget xw, Bool enable)
{
+ TScreen *screen = TScreenOf(xw);
+
if (screen->bellIsUrgent) {
- XWMHints *h = XGetWMHints(screen->display, VShellWindow);
+ XWMHints *h = XGetWMHints(screen->display, VShellWindow(xw));
if (h != 0) {
- if (enable) {
+ if (enable && !(screen->select & FOCUS)) {
h->flags |= XUrgencyHint;
} else {
h->flags &= ~XUrgencyHint;
}
- XSetWMHints(screen->display, VShellWindow, h);
+ XSetWMHints(screen->display, VShellWindow(xw), h);
}
}
}
@@ -739,9 +741,9 @@
if (screen->quiet_grab
&& (event->mode == NotifyGrab || event->mode == NotifyUngrab)) {
- ;
+ /* EMPTY */ ;
} else if (event->type == FocusIn) {
- setXUrgency(screen, False);
+ setXUrgency(xw, False);
/*
* NotifyNonlinear only happens (on FocusIn) if the pointer was not in
@@ -856,7 +858,7 @@
#if defined(HAVE_XKB_BELL_EXT)
if (tony != None) {
- XkbBell(screen->display, VShellWindow, percent, tony);
+ XkbBell(screen->display, VShellWindow(xw), percent, tony);
} else
#endif
XBell(screen->display, percent);
@@ -874,7 +876,7 @@
return;
}
- setXUrgency(screen, True);
+ setXUrgency(xw, True);
/* has enough time gone by that we are allowed to ring
the bell again? */
@@ -901,7 +903,7 @@
}
if (screen->poponbell)
- XRaiseWindow(screen->display, VShellWindow);
+ XRaiseWindow(screen->display, VShellWindow(xw));
if (screen->bellSuppressTime) {
/* now we change a property and wait for the notify event to come
@@ -972,19 +974,19 @@
}
Window
-WMFrameWindow(XtermWidget termw)
+WMFrameWindow(XtermWidget xw)
{
Window win_root, win_current, *children;
Window win_parent = 0;
unsigned int nchildren;
- win_current = XtWindow(termw);
+ win_current = XtWindow(xw);
/* find the parent which is child of root */
do {
if (win_parent)
win_current = win_parent;
- XQueryTree(TScreenOf(termw)->display,
+ XQueryTree(TScreenOf(xw)->display,
win_current,
&win_root,
&win_parent,
@@ -1196,7 +1198,7 @@
if ((xw = getXtermWidget(w)) != 0) {
TScreen *screen = TScreenOf(xw);
- XMapWindow(screen->display, VShellWindow);
+ XMapWindow(screen->display, VShellWindow(xw));
}
}
@@ -1212,15 +1214,15 @@
if ((xw = getXtermWidget(w)) != 0) {
TScreen *screen = TScreenOf(xw);
XIconifyWindow(screen->display,
- VShellWindow,
+ VShellWindow(xw),
DefaultScreen(screen->display));
}
}
int
-QueryMaximize(XtermWidget termw, unsigned *width, unsigned *height)
+QueryMaximize(XtermWidget xw, unsigned *width, unsigned *height)
{
- TScreen *screen = TScreenOf(termw);
+ TScreen *screen = TScreenOf(xw);
XSizeHints hints;
long supp = 0;
Window root_win;
@@ -1230,7 +1232,7 @@
unsigned root_depth;
if (XGetGeometry(screen->display,
- RootWindowOfScreen(XtScreen(termw)),
+ RootWindowOfScreen(XtScreen(xw)),
&root_win,
&root_x,
&root_y,
@@ -1250,7 +1252,7 @@
hints.flags = PMaxSize;
if (XGetWMNormalHints(screen->display,
- VShellWindow,
+ VShellWindow(xw),
&hints,
&supp)
&& (hints.flags & PMaxSize) != 0) {
@@ -1270,9 +1272,9 @@
}
void
-RequestMaximize(XtermWidget termw, int maximize)
+RequestMaximize(XtermWidget xw, int maximize)
{
- TScreen *screen = TScreenOf(termw);
+ TScreen *screen = TScreenOf(xw);
XWindowAttributes wm_attrs, vshell_attrs;
unsigned root_width, root_height;
@@ -1280,14 +1282,14 @@
if (maximize) {
- if (QueryMaximize(termw, &root_width, &root_height)) {
+ if (QueryMaximize(xw, &root_width, &root_height)) {
if (XGetWindowAttributes(screen->display,
- WMFrameWindow(termw),
+ WMFrameWindow(xw),
&wm_attrs)) {
if (XGetWindowAttributes(screen->display,
- VShellWindow,
+ VShellWindow(xw),
&vshell_attrs)) {
if (screen->restore_data != True
@@ -1313,7 +1315,7 @@
(unsigned) ((wm_attrs.height - vshell_attrs.height)
+ (wm_attrs.border_width * 2));
- XMoveResizeWindow(screen->display, VShellWindow,
+ XMoveResizeWindow(screen->display, VShellWindow(xw),
0 + wm_attrs.border_width, /* x */
0 + wm_attrs.border_width, /* y */
root_width,
@@ -1331,7 +1333,7 @@
screen->restore_data = False;
XMoveResizeWindow(screen->display,
- VShellWindow,
+ VShellWindow(xw),
screen->restore_x,
screen->restore_y,
screen->restore_width,
@@ -1440,7 +1442,7 @@
if ((fd = open(path, O_WRONLY | O_CREAT | O_TRUNC, 0644)) < 0) {
int the_error = errno;
fprintf(stderr, "%s: cannot open %s: %d:%s\n",
- xterm_name,
+ ProgramName,
path,
the_error,
SysErrorMsg(the_error));
@@ -1453,7 +1455,7 @@
|| ((fd = open(path, O_WRONLY | O_APPEND)) < 0)) {
int the_error = errno;
fprintf(stderr, "%s: cannot open %s: %d:%s\n",
- xterm_name,
+ ProgramName,
path,
the_error,
SysErrorMsg(the_error));
@@ -1468,7 +1470,7 @@
if (fstat(fd, &sb) < 0
|| sb.st_uid != uid
|| (sb.st_mode & 022) != 0) {
- fprintf(stderr, "%s: you do not own %s\n", xterm_name, path);
+ fprintf(stderr, "%s: you do not own %s\n", ProgramName, path);
close(fd);
return -1;
}
@@ -1722,7 +1724,8 @@
execl(shell, shell, "-c", &screen->logfile[1], (void *) 0);
- fprintf(stderr, "%s: Can't exec `%s'\n", xterm_name,
+ fprintf(stderr, "%s: Can't exec `%s'\n",
+ ProgramName,
&screen->logfile[1]);
exit(ERROR_LOGEXEC);
}
@@ -1992,7 +1995,7 @@
res->mode = -True;
fprintf(stderr,
"%s: Cannot allocate color \"%s\"\n",
- xterm_name,
+ ProgramName,
NonNull(res->resource));
}
result = res->value;
@@ -2309,7 +2312,7 @@
{
int i;
if (pOldColors == NULL) {
- pOldColors = (ScrnColors *) XtMalloc((Cardinal) sizeof(ScrnColors));
+ pOldColors = TypeXtMalloc(ScrnColors);
if (pOldColors == NULL) {
fprintf(stderr, "allocation failure in GetOldColors\n");
return (False);
@@ -2673,7 +2676,9 @@
}
#if OPT_RENDERFONT
if (UsingRenderFont(xw)) {
- ; /* there is only one font entry to load */
+ /* EMPTY */
+ /* there is only one font entry to load */
+ ;
} else
#endif
{
@@ -3174,7 +3179,7 @@
if (++nparam < NPARAM)
params->a_nparam = nparam;
} else if (ch < 32) {
- ;
+ /* EMPTY */ ;
} else {
/* should be 0x30 to 0x7e */
params->a_final = ch;
@@ -3344,7 +3349,7 @@
} else
#endif
if (code == XK_TCAPNAME) {
- unparseputs(xw, xterm_name);
+ unparseputs(xw, resource.term_name);
} else {
XKeyEvent event;
event.state = state;
@@ -3828,14 +3833,14 @@
if (IsSetUtf8Title(xw)) {
TRACE(("...updating %s\n", propname));
TRACE(("...value is %s\n", value));
- XChangeProperty(dpy, VShellWindow, my_atom,
+ XChangeProperty(dpy, VShellWindow(xw), my_atom,
XA_UTF8_STRING(dpy), 8,
PropModeReplace,
(Char *) value,
(int) strlen(value));
} else {
TRACE(("...deleting %s\n", propname));
- XDeleteProperty(dpy, VShellWindow, my_atom);
+ XDeleteProperty(dpy, VShellWindow(xw), my_atom);
}
}
}
@@ -3987,7 +3992,7 @@
{
#ifdef DEBUG
if (debug) {
- fprintf(stderr, "%s: PANIC!\t", xterm_name);
+ fprintf(stderr, "%s: PANIC!\t", ProgramName);
fprintf(stderr, s, a);
fputs("\r\n", stderr);
fflush(stderr);
@@ -4070,7 +4075,7 @@
{
int oerrno = errno;
- fprintf(stderr, "%s: Error %d, errno %d: ", xterm_name, code, oerrno);
+ fprintf(stderr, "%s: Error %d, errno %d: ", ProgramName, code, oerrno);
fprintf(stderr, "%s\n", SysErrorMsg(oerrno));
fprintf(stderr, "Reason: %s\n", SysReasonMsg(code));
@@ -4257,7 +4262,7 @@
int
xerror(Display * d, XErrorEvent * ev)
{
- fprintf(stderr, "%s: warning, error event received:\n", xterm_name);
+ fprintf(stderr, "%s: warning, error event received:\n", ProgramName);
(void) XmuPrintDefaultErrorMessage(d, ev, stderr);
Exit(ERROR_XERROR);
return 0; /* appease the compiler */
@@ -4271,7 +4276,7 @@
(void) fprintf(stderr,
"%s: fatal IO error %d (%s) or KillClient on X server \"%s\"\r\n",
- xterm_name, the_error, SysErrorMsg(the_error),
+ ProgramName, the_error, SysErrorMsg(the_error),
DisplayString(dpy));
Exit(ERROR_XIOERROR);
@@ -4318,16 +4323,17 @@
void
set_vt_visibility(Bool on)
{
- TScreen *screen = TScreenOf(term);
+ XtermWidget xw = term;
+ TScreen *screen = TScreenOf(xw);
TRACE(("set_vt_visibility(%d)\n", on));
if (on) {
- if (!screen->Vshow && term) {
- VTInit(term);
- XtMapWidget(XtParent(term));
+ if (!screen->Vshow && xw) {
+ VTInit(xw);
+ XtMapWidget(XtParent(xw));
#if OPT_TOOLBAR
/* we need both of these during initialization */
- XtMapWidget(SHELL_OF(term));
+ XtMapWidget(SHELL_OF(xw));
ShowToolbar(resource.toolBar);
#endif
screen->Vshow = True;
@@ -4335,10 +4341,10 @@
}
#if OPT_TEK4014
else {
- if (screen->Vshow && term) {
- withdraw_window(XtDisplay(term),
- VShellWindow,
- XScreenNumberOfScreen(XtScreen(term)));
+ if (screen->Vshow && xw) {
+ withdraw_window(XtDisplay(xw),
+ VShellWindow(xw),
+ XScreenNumberOfScreen(XtScreen(xw)));
screen->Vshow = False;
}
}
@@ -4549,6 +4555,7 @@
#if OPT_TRACE
for (j = 0; j < opt_count; j++) {
if (!strncmp(opt_array[j].opt, "-/+", 3)) {
+ char temp[80];
const char *name = opt_array[j].opt + 3;
for (k = 0; k < numDescs; ++k) {
const char *value = res_array[k].value;
@@ -4559,7 +4566,8 @@
} else {
code = 0;
}
- if (x_strindex(opt_array[j].desc, "inhibit") != 0)
+ strcpy(temp, opt_array[j].desc);
+ if (x_strindex(temp, "inhibit") != 0)
code = -code;
if (code != 0
&& res_array[k].value != 0
Index: xsrc/external/mit/xterm/dist/xterm.man
diff -u xsrc/external/mit/xterm/dist/xterm.man:1.7 xsrc/external/mit/xterm/dist/xterm.man:1.8
--- xsrc/external/mit/xterm/dist/xterm.man:1.7 Tue Nov 23 09:18:19 2010
+++ xsrc/external/mit/xterm/dist/xterm.man Wed Feb 23 09:14:10 2011
@@ -1,7 +1,7 @@
'\" t
-.\" $XTermId: xterm.man,v 1.469 2010/11/11 11:57:07 tom Exp $
+.\" $XTermId: xterm.man,v 1.481 2011/02/18 10:48:14 tom Exp $
.\"
-.\" Copyright 1996-2009,2010 by Thomas E. Dickey
+.\" Copyright 1996-2010,2011 by Thomas E. Dickey
.\"
.\" All Rights Reserved
.\"
@@ -55,7 +55,11 @@
.\" from The Open Group.
.\"
.\" updated by Thomas E. Dickey for XFree86, July 1996 - February 2006.
-.
+.\"
+.\" Bulleted paragraph
+.de bP
+.IP \(bu 4
+..
.\" these would be fallbacks for DS/DE,
.\" but groff changed the meaning of the macros.
.de NS
@@ -506,6 +510,17 @@
library if support for that library was compiled into \fIxterm\fP.
This corresponds to the \fBfaceSize\fP resource.
.TP 8
+.BI \-fullscreen
+This option indicates that \fIxterm\fP should ask the window manager to
+let it use the full-screen for display,
+e.g., without window decorations.
+It sets the \fBfullscreen\fP resource to \*(``true\*(''.
+.TP 8
+.BI +fullscreen
+This option indicates that \fIxterm\fP should not ask the window manager to
+let it use the full-screen for display.
+It sets the \fBfullscreen\fP resource to \*(``false\*(''.
+.TP 8
.B \-fw \fIfont\fP
This option specifies the font to be used for displaying wide text.
By default,
@@ -1214,6 +1229,33 @@
stty erase is a backspace (8) or delete (127) character.
The default is \*(``false\*('', which disables this feature.
.TP 8
+.B "fullscreen (\fPclass\fB Fullscreen)"
+Specifies whether or not \fIxterm\fP should ask the window manager to
+use a fullscreen layout on startup.
+\fIXterm\fP accepts either a keyword (ignoring case)
+or the number shown in parentheses:
+.RS
+.TP 3
+false (0)
+Fullscreen layout is not used initially,
+but may be later via menu-selection or control sequence.
+.TP 3
+true (1)
+Fullscreen layout is used initially,
+but may be disabled later via menu-selection or control sequence.
+.TP 3
+always (2)
+Fullscreen layout is used initially,
+and cannot be disabled later via menu-selection or control sequence.
+.TP 3
+never (3)
+Fullscreen layout is not used,
+and cannot be enabled later via menu-selection or control sequence.
+.RE
+.IP
+The default is
+\*(``false.\*(''
+.TP 8
.B "hold (\fPclass\fB Hold)"
If true,
\fIxterm\fP will not immediately destroy its window when the shell command completes.
@@ -1294,6 +1336,19 @@
The default is 4096.
You cannot set this to a value less than 64.
.TP 8
+.B "omitTranslation (\fPclass\fB OmitTranslation)"
+Selectively omit one or more parts of \fIxterm\fP's default translations
+at startup.
+The resource value is a comma-separated list of keywords,
+which may be abbreviated:
+\*(``fullscreen\*('',
+\*(``scroll-lock\*('',
+\*(``shift-fonts\*('' or
+\*(``wheel-mouse\*(''.
+\fIXterm\fP also recognizes \*(``default\*('',
+but omitting that will make the program unusable
+unless you provide a similar definition in your resource settings.
+.TP 8
.B "ptyHandshake (\fPclass\fB PtyHandshake)
If \*(``true\*('', \fIxterm\fP will perform handshaking during initialization
to ensure that the parent and child processes update the \fIutmp\fP
@@ -2207,6 +2262,9 @@
MaximizeWin (9)
Maximize window (i.e., resize to screen size).
.TP 5
+FullscreenWin (10)
+Use full screen (i.e., resize to screen size, without window decorations).
+.TP 5
MinimizeWin (2)
Iconify window.
.TP 5
@@ -3121,6 +3179,54 @@
Specifies whether or not reverse video should be simulated.
The default is
\*(``false.\*(''
+.IP
+There are several aspects to reverse video in \fIxterm\fP:
+.RS
+.bP
+The command-line \fB\-rv\fP option tells the X libraries to reverse
+the foreground and background colors.
+\fIXterm\fP's command-line options set resource values.
+In particular, the X Toolkit sets the \fBreverseVideo\fP resource
+when the \fB\-rv\fP option is used.
+.bP
+If the user has also used command-line options \fB\-fg\fP or \fB\-bg\fP
+to set the foreground and background colors,
+\fIxterm\fP does not see these options directly.
+Instead,
+it examines the resource values to reconstruct the command-line options,
+and determine which of the colors is the user's intended foreground, etc.
+Their actual values are irrelevant to the reverse video function;
+some users prefer the X defaults (black text on a white background),
+others prefer white text on a black background.
+.bP
+After startup,
+the user can toggle the "Enable Reverse Video" menu entry.
+This exchanges the current foreground and background colors
+of the VT100 widget,
+and repaints the screen.
+Because of the X resource hierarchy,
+the \fBreverseVideo\fP resource applies to more than the VT100 widget.
+.RE
+.IP
+Programs running in an \fIxterm\fP can also use control sequences
+to enable the VT100 reverse video mode.
+These are independent of the \fIreverseVideo\fP resource and the menu entry.
+\fIXterm\fP exchanges the current foreground and background colors
+when drawing text affected by these control sequences.
+.IP
+Other control sequences can alter the foreground and background colors
+which are used:
+.RS
+.bP
+Programs can also use the ANSI color control sequences to set the
+foreground and background colors.
+.bP
+Extensions to the ANSI color controls (such as 16-, 88- or 256-colors)
+are treated similarly to the ANSI control.
+.bP
+Using other control sequences (the "\fIdynamic colors\fR" feature),
+a program can change the foreground and background colors.
+.RE
.TP 8
.B "reverseWrap (\fPclass\fB ReverseWrap)"
Specifies whether or not reverse-wraparound should be enabled.
@@ -3363,6 +3469,8 @@
which assume the string is UTF-8.
.IP
However, some users may wish to write a title string encoded in UTF-8.
+The window manager is responsible for drawing window titles.
+Some window managers (not all) support UTF-8 encoding of window titles.
Set this resource to \*(``true\*('' to allow UTF-8 encoded title strings.
That cancels the translation to UTF-8,
allowing UTF-8 strings to be displayed as is.
@@ -4782,6 +4890,9 @@
^X ESC G <line+\*(`` \*(''> <col+\*(`` \*(''>
.in -8
.TP 8
+.B "fullscreen()"
+Asks the window manager to change the window to full-screen.
+.TP 8
.B "iconify()"
Iconifies the window.
.TP 8
@@ -5310,6 +5421,7 @@
Shift <KeyPress> Select:select-cursor-start() \\\&
select-cursor-end(SELECT, CUT_BUFFER0) \\n\\\&
Shift <KeyPress> Insert:insert-selection(SELECT, CUT_BUFFER0) \\n\\\&
+ Alt <Key>Return:fullscreen() \\n\\\&
<KeyRelease> Scroll_Lock:scroll-lock() \\n\\\&
Shift~Ctrl <KeyPress> KP_Add:larger-vt-font() \\n\\\&
Shift Ctrl <KeyPress> KP_Add:smaller-vt-font() \\n\\\&
Index: xsrc/external/mit/xterm/dist/ptyx.h
diff -u xsrc/external/mit/xterm/dist/ptyx.h:1.6 xsrc/external/mit/xterm/dist/ptyx.h:1.7
--- xsrc/external/mit/xterm/dist/ptyx.h:1.6 Sun Nov 21 06:20:30 2010
+++ xsrc/external/mit/xterm/dist/ptyx.h Wed Feb 23 09:14:10 2011
@@ -1,7 +1,7 @@
-/* $XTermId: ptyx.h,v 1.675 2010/10/11 08:25:53 tom Exp $ */
+/* $XTermId: ptyx.h,v 1.684 2011/02/17 00:13:06 tom Exp $ */
/*
- * Copyright 1999-2009,2010 by Thomas E. Dickey
+ * Copyright 1999-2010,2011 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -60,6 +60,7 @@
#endif
/* ptyx.h */
+/* *INDENT-OFF* */
/* @(#)ptyx.h X10/6.6 11/10/86 */
#include <X11/IntrinsicP.h>
@@ -91,6 +92,12 @@
#define TypeRealloc(type,n,p) (type *)realloc(p, (n) * sizeof(type))
+#define TypeXtReallocN(t,p,n) (t *)(void *)XtRealloc((char *)(p), (Cardinal)(sizeof(t) * (size_t) (n)))
+
+#define TypeXtMallocX(type,n) (type *)(void *)XtMalloc((Cardinal)(sizeof(type) + (size_t) (n)))
+#define TypeXtMallocN(type,n) (type *)(void *)XtMalloc((Cardinal)(sizeof(type) * (size_t) (n)))
+#define TypeXtMalloc(type) TypeXtMallocN(type, 1)
+
/* use these to allocate partly-structured data */
#define CastMallocN(type,n) (type *)malloc(sizeof(type) + (size_t) (n))
#define CastMalloc(type) CastMallocN(type,0)
@@ -883,6 +890,13 @@
} FontOps;
typedef enum {
+ esFalse = 0
+ , esTrue
+ , esAlways
+ , esNever
+} FullscreenOps;
+
+typedef enum {
etSetTcap = 1
, etGetTcap
, etLAST
@@ -900,6 +914,7 @@
, ewSetWinSizeChars = 8
#if OPT_MAXIMIZE
, ewMaximizeWin = 9
+ , ewFullscreenWin = 10
#endif
, ewGetWinState = 11
, ewGetWinPosition = 13
@@ -1650,6 +1665,9 @@
Boolean awaitInput; /* select-timeout mode */
Boolean grabbedKbd; /* keyboard is grabbed */
+#if OPT_MAXIMIZE
+ Boolean fullscreen; /* window is fullscreen */
+#endif
#ifdef ALLOWLOGGING
int logging; /* logging mode */
int logfd; /* file descriptor of log */
@@ -2031,6 +2049,11 @@
#define MULTICLICKTIME 250 /* milliseconds */
+typedef struct {
+ const char *name;
+ int code;
+} FlagList;
+
typedef enum {
fwNever = 0,
fwResource,
@@ -2455,7 +2478,7 @@
* These definitions do not depend on whether xterm supports active-icon.
*/
#define VWindow(screen) WhichVWin(screen)->window
-#define VShellWindow XtWindow(SHELL_OF(term))
+#define VShellWindow(xw) XtWindow(SHELL_OF(xw))
#define TWindow(screen) WhichTWin(screen)->window
#define TShellWindow XtWindow(SHELL_OF(tekWidget))
@@ -2508,8 +2531,8 @@
#if OPT_TOOLBAR
#define ToolbarHeight(w) ((resource.toolBar) \
- ? (term->VT100_TB_INFO(menu_height) \
- + term->VT100_TB_INFO(menu_border) * 2) \
+ ? ((w)->VT100_TB_INFO(menu_height) \
+ + (w)->VT100_TB_INFO(menu_border) * 2) \
: 0)
#else
#define ToolbarHeight(w) 0
@@ -2603,4 +2626,6 @@
#define TRACE2(p) /*nothing*/
#endif
+/* *INDENT-ON* */
+
#endif /* included_ptyx_h */