XFree86 3.1.2Ei - xterm patch #25 - T.Dickey
Here's a correction for two minor bugs that I picked up in testing, plus
some lint (from Solaris 2.5) where NULL was used incorrectly:
+ make the second alternate font the same as the first (that's what
vt420 and dtterm do)
+ corrected DECSCL report when DECSCL hasn't been set (i.e., don't
return a '60').
--------------------------------------------------------------------------------
charproc.c | 12 +++++-----
cursor.c | 6 +++--
menu.c | 70 ++++++++++++++++++++++++++++-------------------------------
misc.c | 3 +-
4 files changed, 46 insertions, 45 deletions
--------------------------------------------------------------------------------
Index: charproc.c
--- xterm-24+/charproc.c Tue Aug 13 14:51:20 1996
+++ xterm-25/charproc.c Sun Aug 18 23:03:39 1996
@@ -1126,7 +1126,7 @@
case CASE_DECID:
param[0] = -1; /* Default ID parameter */
- /* Fall through into ... */
+ /* FALLTHRU */
case CASE_DA1:
/* DA1 */
if (param[0] <= 0) { /* less than means DEFAULT */
@@ -2009,7 +2009,7 @@
/* if there is room to write more data to the pty, go write more */
if (FD_ISSET (screen->respond, &write_mask)) {
- v_write(screen->respond, 0, 0); /* flush buffer */
+ v_write(screen->respond, (char *)0, 0); /* flush buffer */
}
/* if there are X events already in our queue, it
@@ -2063,11 +2063,11 @@
*s = '\036'; /* UK pound sign*/
break;
- case '1':
+ case '1': /* Alternate Character ROM standard characters */
+ case '2': /* Alternate Character ROM special graphics */
case 'B': /* ASCII set */
break;
- case '2':
case '0': /* special graphics (line drawing) */
for (s=buf; s<ptr; ++s)
if (*s>=0x5f && *s<=0x7e)
@@ -2488,7 +2488,7 @@
update_cursesemul();
break;
case 44: /* margin bell */
- if(!(screen->marginbell = screen->save_modes[12]))
+ if((screen->marginbell = screen->save_modes[12]) == 0)
screen->bellarmed = -1;
update_marginbell();
break;
@@ -4108,7 +4108,7 @@
switch (*param_count) { /* assign 'em */
case 3:
name2 = params[2];
- /* fall through */
+ /* FALLTHRU */
case 2:
name1 = params[1];
break;
Index: cursor.c
--- xterm-24+/cursor.c Tue Aug 13 14:51:20 1996
+++ xterm-25/cursor.c Sun Aug 18 23:05:15 1996
@@ -40,7 +40,8 @@
{
if (screen->cur_row > screen->endHRow ||
(screen->cur_row == screen->endHRow &&
- screen->cur_col >= screen->endHCol)) {}
+ screen->cur_col >= screen->endHCol))
+ ;
else
DisownSelection(term);
}
@@ -84,7 +85,8 @@
register int i, j, k, rev;
if((rev = (term->flags & (REVERSEWRAP | WRAPAROUND)) ==
- (REVERSEWRAP | WRAPAROUND)) && screen->do_wrap)
+ (REVERSEWRAP | WRAPAROUND)) != 0
+ && screen->do_wrap)
n--;
if ((screen->cur_col -= n) < 0) {
if(rev) {
Index: menu.c
--- xterm-24+/menu.c Tue Aug 13 14:51:20 1996
+++ xterm-25/menu.c Sun Aug 18 23:09:02 1996
@@ -396,7 +396,7 @@
void DoSecureKeyboard (tp)
Time tp;
{
- do_securekbd (term->screen.mainMenu, NULL, NULL);
+ do_securekbd (term->screen.mainMenu, (XtPointer)0, (XtPointer)0);
}
static void do_securekbd (gw, closure, data)
@@ -797,7 +797,7 @@
for (i = 0; i < NMENUFONTS; i++) {
if (strcmp (entryname, fontMenuEntries[i].name) == 0) {
- SetVTFont (i, True, NULL, NULL);
+ SetVTFont (i, True, (char *)0, (char *)0);
return;
}
}
@@ -970,7 +970,7 @@
Cardinal *param_count;
{
handle_toggle (do_allowsends, (int) term->screen.allowSendEvents,
- params, *param_count, w, NULL, NULL);
+ params, *param_count, w, (XtPointer)0, (XtPointer)0);
}
void HandleSetVisualBell(w, event, params, param_count)
@@ -980,7 +980,7 @@
Cardinal *param_count;
{
handle_toggle (do_visualbell, (int) term->screen.visualbell,
- params, *param_count, w, NULL, NULL);
+ params, *param_count, w, (XtPointer)0, (XtPointer)0);
}
#ifdef ALLOWLOGGING
@@ -991,7 +991,7 @@
Cardinal *param_count;
{
handle_toggle (do_logging, (int) term->screen.logging,
- params, *param_count, w, NULL, NULL);
+ params, *param_count, w, (XtPointer)0, (XtPointer)0);
}
#endif
@@ -1002,7 +1002,7 @@
String *params;
Cardinal *param_count;
{
- do_redraw(w, NULL, NULL);
+ do_redraw(w, (XtPointer)0, (XtPointer)0);
}
/* ARGSUSED */
@@ -1055,7 +1055,7 @@
String *params;
Cardinal *param_count;
{
- do_quit(w, NULL, NULL);
+ do_quit(w, (XtPointer)0, (XtPointer)0);
}
void Handle8BitControl(w, event, params, param_count)
@@ -1065,7 +1065,7 @@
Cardinal *param_count;
{
handle_toggle (do_8bit_control, (int) term->screen.control_eight_bits,
- params, *param_count, w, NULL, NULL);
+ params, *param_count, w, (XtPointer)0, (XtPointer)0);
}
void HandleSunFunctionKeys(w, event, params, param_count)
@@ -1075,7 +1075,7 @@
Cardinal *param_count;
{
handle_toggle (do_sun_fkeys, (int) sunFunctionKeys,
- params, *param_count, w, NULL, NULL);
+ params, *param_count, w, (XtPointer)0, (XtPointer)0);
}
void HandleScrollbar(w, event, params, param_count)
@@ -1085,7 +1085,7 @@
Cardinal *param_count;
{
handle_toggle (do_scrollbar, (int) term->screen.scrollbar,
- params, *param_count, w, NULL, NULL);
+ params, *param_count, w, (XtPointer)0, (XtPointer)0);
}
void HandleJumpscroll(w, event, params, param_count)
@@ -1095,7 +1095,7 @@
Cardinal *param_count;
{
handle_toggle (do_jumpscroll, (int) term->screen.jumpscroll,
- params, *param_count, w, NULL, NULL);
+ params, *param_count, w, (XtPointer)0, (XtPointer)0);
}
void HandleReverseVideo(w, event, params, param_count)
@@ -1105,7 +1105,7 @@
Cardinal *param_count;
{
handle_toggle (do_reversevideo, (int) (term->flags & REVERSE_VIDEO),
- params, *param_count, w, NULL, NULL);
+ params, *param_count, w, (XtPointer)0, (XtPointer)0);
}
void HandleAutoWrap(w, event, params, param_count)
@@ -1115,7 +1115,7 @@
Cardinal *param_count;
{
handle_toggle (do_autowrap, (int) (term->flags & WRAPAROUND),
- params, *param_count, w, NULL, NULL);
+ params, *param_count, w, (XtPointer)0, (XtPointer)0);
}
void HandleReverseWrap(w, event, params, param_count)
@@ -1125,7 +1125,7 @@
Cardinal *param_count;
{
handle_toggle (do_reversewrap, (int) (term->flags & REVERSEWRAP),
- params, *param_count, w, NULL, NULL);
+ params, *param_count, w, (XtPointer)0, (XtPointer)0);
}
void HandleAutoLineFeed(w, event, params, param_count)
@@ -1135,7 +1135,7 @@
Cardinal *param_count;
{
handle_toggle (do_autolinefeed, (int) (term->flags & LINEFEED),
- params, *param_count, w, NULL, NULL);
+ params, *param_count, w, (XtPointer)0, (XtPointer)0);
}
void HandleAppCursor(w, event, params, param_count)
@@ -1145,7 +1145,7 @@
Cardinal *param_count;
{
handle_toggle (do_appcursor, (int) (term->keyboard.flags & CURSOR_APL),
- params, *param_count, w, NULL, NULL);
+ params, *param_count, w, (XtPointer)0, (XtPointer)0);
}
void HandleAppKeypad(w, event, params, param_count)
@@ -1155,7 +1155,7 @@
Cardinal *param_count;
{
handle_toggle (do_appkeypad, (int) (term->keyboard.flags & KYPD_APL),
- params, *param_count, w, NULL, NULL);
+ params, *param_count, w, (XtPointer)0, (XtPointer)0);
}
void HandleScrollKey(w, event, params, param_count)
@@ -1165,7 +1165,7 @@
Cardinal *param_count;
{
handle_toggle (do_scrollkey, (int) term->screen.scrollkey,
- params, *param_count, w, NULL, NULL);
+ params, *param_count, w, (XtPointer)0, (XtPointer)0);
}
void HandleScrollTtyOutput(w, event, params, param_count)
@@ -1175,7 +1175,7 @@
Cardinal *param_count;
{
handle_toggle (do_scrollttyoutput, (int) term->screen.scrollttyoutput,
- params, *param_count, w, NULL, NULL);
+ params, *param_count, w, (XtPointer)0, (XtPointer)0);
}
void HandleAllow132(w, event, params, param_count)
@@ -1185,7 +1185,7 @@
Cardinal *param_count;
{
handle_toggle (do_allow132, (int) term->screen.c132,
- params, *param_count, w, NULL, NULL);
+ params, *param_count, w, (XtPointer)0, (XtPointer)0);
}
void HandleCursesEmul(w, event, params, param_count)
@@ -1195,7 +1195,7 @@
Cardinal *param_count;
{
handle_toggle (do_cursesemul, (int) term->screen.curses,
- params, *param_count, w, NULL, NULL);
+ params, *param_count, w, (XtPointer)0, (XtPointer)0);
}
void HandleMarginBell(w, event, params, param_count)
@@ -1205,7 +1205,7 @@
Cardinal *param_count;
{
handle_toggle (do_marginbell, (int) term->screen.marginbell,
- params, *param_count, w, NULL, NULL);
+ params, *param_count, w, (XtPointer)0, (XtPointer)0);
}
void HandleAltScreen(w, event, params, param_count)
@@ -1216,7 +1216,7 @@
{
/* eventually want to see if sensitive or not */
handle_toggle (do_altscreen, (int) term->screen.alternate,
- params, *param_count, w, NULL, NULL);
+ params, *param_count, w, (XtPointer)0, (XtPointer)0);
}
/* ARGSUSED */
@@ -1226,7 +1226,7 @@
String *params;
Cardinal *param_count;
{
- do_softreset(w, NULL, NULL);
+ do_softreset(w, (XtPointer)0, (XtPointer)0);
}
/* ARGSUSED */
@@ -1236,7 +1236,7 @@
String *params;
Cardinal *param_count;
{
- do_hardreset(w, NULL, NULL);
+ do_hardreset(w, (XtPointer)0, (XtPointer)0);
}
/* ARGSUSED */
@@ -1246,7 +1246,7 @@
String *params;
Cardinal *param_count;
{
- do_clearsavedlines(w, NULL, NULL);
+ do_clearsavedlines(w, (XtPointer)0, (XtPointer)0);
}
void HandleSetTerminalType(w, event, params, param_count)
@@ -1258,10 +1258,10 @@
if (*param_count == 1) {
switch (params[0][0]) {
case 'v': case 'V':
- if (term->screen.TekEmu) do_vtmode (w, NULL, NULL);
+ if (term->screen.TekEmu) do_vtmode (w, (XtPointer)0, (XtPointer)0);
break;
case 't': case 'T':
- if (!term->screen.TekEmu) do_tekmode (w, NULL, NULL);
+ if (!term->screen.TekEmu) do_tekmode (w, (XtPointer)0, (XtPointer)0);
break;
default:
Bell(XkbBI_MinorError, 0);
@@ -1281,11 +1281,11 @@
switch (params[0][0]) {
case 'v': case 'V':
handle_toggle (do_vtonoff, (int) term->screen.Vshow,
- params+1, (*param_count) - 1, w, NULL, NULL);
+ params+1, (*param_count) - 1, w, (XtPointer)0, (XtPointer)0);
break;
case 't': case 'T':
handle_toggle (do_tekonoff, (int) term->screen.Tshow,
- params+1, (*param_count) - 1, w, NULL, NULL);
+ params+1, (*param_count) - 1, w, (XtPointer)0, (XtPointer)0);
break;
default:
Bell(XkbBI_MinorError, 0);
@@ -1317,7 +1317,7 @@
}
break;
}
- if (proc) (*proc) (w, NULL, NULL);
+ if (proc) (*proc) (w, (XtPointer)0, (XtPointer)0);
else Bell(XkbBI_MinorError, 0);
}
@@ -1328,7 +1328,7 @@
String *params;
Cardinal *param_count;
{
- do_tekpage(w, NULL, NULL);
+ do_tekpage(w, (XtPointer)0, (XtPointer)0);
}
/* ARGSUSED */
@@ -1338,7 +1338,7 @@
String *params;
Cardinal *param_count;
{
- do_tekreset(w, NULL, NULL);
+ do_tekreset(w, (XtPointer)0, (XtPointer)0);
}
/* ARGSUSED */
@@ -1348,7 +1348,5 @@
String *params;
Cardinal *param_count;
{
- do_tekcopy(w, NULL, NULL);
+ do_tekcopy(w, (XtPointer)0, (XtPointer)0);
}
-
-
Index: misc.c
--- xterm-24+/misc.c Tue Aug 13 14:51:20 1996
+++ xterm-25/misc.c Sun Aug 18 22:50:30 1996
@@ -851,7 +851,8 @@
cp);
} else if (!strcmp(cp, "\"p")) { /* DECSCL */
sprintf(reply, "%d%s",
- screen->ansi_level + 60,
+ (screen->ansi_level ?
+ screen->ansi_level : 1) + 60,
cp);
} else if (!strcmp(cp, "r")) { /* DECSTBM */
sprintf(reply, "%d;%dr",