Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package xterm for openSUSE:Factory checked in at 2023-03-08 14:51:31 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/xterm (Old) and /work/SRC/openSUSE:Factory/.xterm.new.31432 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "xterm" Wed Mar 8 14:51:31 2023 rev:136 rq:1069863 version:379 Changes: -------- --- /work/SRC/openSUSE:Factory/xterm/xterm.changes 2023-01-31 16:22:53.158565732 +0100 +++ /work/SRC/openSUSE:Factory/.xterm.new.31432/xterm.changes 2023-03-08 14:51:33.186342956 +0100 @@ -1,0 +2,30 @@ +Tue Mar 7 07:41:33 UTC 2023 - Dirk Müller <[email protected]> + +- update to 379: + * improve text-cursor (patch by Jan Engelhardt): + + allow selecting CURSOR_BAR mode from command- + line/Xresources. + + draw cursor using filled rectangle instead + of rectangle outline to permit thicker underlines/bars. + + scale up cursor relative to font size. + * improve readline modes (Fedora #2166860): + + document readline modes + + change the feature to configure by default + + replace hard-coded SS3 for cursor movement with + current mode + + replace hard-coded erase/lnext characters with + current values + * improve status-line (report by Thomas Wolff): + + RIS turns off status-line + + Right-margin (DECLRMM and DECSLRM) limits the + length of text written/updated in the status-line. + + Most controls which affect the whole screen are + ignored while updating the status-line. + * modify configure check for tgetent to allow for some special + cases of ncurses configuration + * reduce timeout, improve warning message if resize is + run on a terminal which is not VT100-compatible. + * reduce compiler warnings in configure script. +- drop xterm-enable_libtinfo.patch (obsolete) + +------------------------------------------------------------------- Old: ---- xterm-378.tgz xterm-378.tgz.asc xterm-enable_libtinfo.patch New: ---- xterm-379.tgz xterm-379.tgz.asc ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ xterm.spec ++++++ --- /var/tmp/diff_new_pack.fS4DoK/_old 2023-03-08 14:51:33.902346854 +0100 +++ /var/tmp/diff_new_pack.fS4DoK/_new 2023-03-08 14:51:33.906346876 +0100 @@ -19,7 +19,7 @@ %define splitbin 0%{?suse_version} >= 1300 Name: xterm -Version: 378 +Version: 379 Release: 0 Summary: The basic X terminal program License: MIT @@ -42,7 +42,6 @@ Patch3: xterm-double_width_fonts.patch Patch4: xterm-desktop_file_icon.patch Patch5: xterm-forbid_window_and_font_ops.patch -Patch6: xterm-enable_libtinfo.patch Patch7: xterm-allow_iso-utf_fonts_in_menu.patch Patch8: xterm-decomposed_bitmaps.patch Patch9: xterm-desktop-item-in-gnome-utilities-appfolder.patch ++++++ xterm-378.tgz -> xterm-379.tgz ++++++ ++++ 14031 lines of diff (skipped) ++++ retrying with extended exclude list diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xterm-378/INSTALL new/xterm-379/INSTALL --- old/xterm-378/INSTALL 2022-09-11 21:44:11.000000000 +0200 +++ new/xterm-379/INSTALL 2023-02-12 20:17:48.000000000 +0100 @@ -1,6 +1,6 @@ --- $XTermId: INSTALL,v 1.190 2022/09/11 19:44:11 tom Exp $ +-- $XTermId: INSTALL,v 1.192 2023/02/12 19:17:48 tom Exp $ ------------------------------------------------------------------------------- --- Copyright 1997-2021,2022 by Thomas E. Dickey +-- Copyright 1997-2022,2023 by Thomas E. Dickey -- -- All Rights Reserved -- @@ -32,7 +32,7 @@ Xterm was originally built as part of the X Window System source tree, using imake to generate a Makefile from Imakefile. -An example Imakefile is provided for legacy use. +An example Imakefile is provided for legacy use (with xmkmf). The preferred method uses the configure script to generate a Makefile from Makefile.in @@ -298,6 +298,13 @@ leaving the right scrollbar incorrectly positioned after changing the font size. + --disable-readline-mouse enable support for mouse in readline applications + + Do not compile-in code to support readline with mouse. + + (The "paste64" feature, which fits xterm's protocol better, is + configured by default). + --disable-rpath-hack don't add rpath options for additional libraries By default, the configure script looks for libraries in unusual places @@ -526,16 +533,6 @@ This sets the default resource value, which is shown in the manpage. - --enable-readline-mouse enable support for mouse in readline applications - - Compile-in code to support predecessor to bracketed paste mode, i.e., - provide functions for setting/getting the selection data. Essentially - this puts xterm into a mode that sends special function-key strings to - bracket the data. - - (The "paste64" feature, which fits xterm's protocol better, is - configured by default). - --enable-regis-graphics enable support for ReGIS graphics Compile-in code to support experimental ReGIS graphics diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xterm-378/MANIFEST new/xterm-379/MANIFEST --- old/xterm-378/MANIFEST 2022-11-26 13:25:02.000000000 +0100 +++ new/xterm-379/MANIFEST 2023-01-25 02:14:44.000000000 +0100 @@ -1,4 +1,4 @@ -MANIFEST for xterm, version xterm-378 +MANIFEST for xterm, version xterm-379 -------------------------------------------------------------------------------- MANIFEST this file 256colres.h resource-definitions for 256-color mode diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xterm-378/NEWS new/xterm-379/NEWS --- old/xterm-378/NEWS 2023-01-09 11:29:25.000000000 +0100 +++ new/xterm-379/NEWS 2023-02-16 01:57:38.000000000 +0100 @@ -1,22 +1,27 @@ The NEWS file was generated from xterm.log.html, which serves as the changelog for xterm. -------------------------------------------------------------------------------- - Patch #378 - 2023/01/09 + Patch #379 - 2023/02/15 - * improve descriptions of XTQMODKEYS and XTQALLOWED features in - ctlseqs.ms (reports by Bram Moolenaar, Thomas Wolff). - * add bracketed+paste and report+version building blocks to terminfo, - from ncurses 6.4 - * improve check for unsupported formatting characters, e.g., - zero-width space, to properly ignore them (report by Thomas Wolff). - * improve/document error-checking for some of the controls which - return responses: DECRQSS, XTGETXRES, XTSETTCAP, XTGETTCAP - (prompted by discussion with David Leadbeater). - * improve limit-checks for fallback font cache (report by Dimitrije - Erdeljan). - * improve check for too-wide glyph in fallback font by allowing xterm - to continue searching for a suitable font rather than just failing - on the first. Also add limitFontWidth to allow changing the amount - by which a glyph must extend outside the font's bounding box to - disallow it. + * improve text-cursor (patch by Jan Engelhardt): + + allow selecting CURSOR_BAR mode from command-line/Xresources. + + draw cursor using filled rectangle instead of rectangle + outline to permit thicker underlines/bars. + + scale up cursor relative to font size. + * improve readline modes (Fedora #2166860): + + document readline modes + + change the feature to configure by default + + replace hard-coded SS3 for cursor movement with current mode + + replace hard-coded erase/lnext characters with current values + * improve status-line (report by Thomas Wolff): + + RIS turns off status-line + + Right-margin (DECLRMM and DECSLRM) limits the length of text + written/updated in the status-line. + + Most controls which affect the whole screen are ignored while + updating the status-line. + * modify configure check for tgetent to allow for some special cases + of ncurses configuration (report by Satadru Pramani). + * reduce timeout, improve warning message if resize is run on a + terminal which is not VT100-compatible. + * reduce compiler warnings in configure script. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xterm-378/button.c new/xterm-379/button.c --- old/xterm-378/button.c 2022-11-25 01:26:32.000000000 +0100 +++ new/xterm-379/button.c 2023-02-13 23:34:51.000000000 +0100 @@ -1,7 +1,7 @@ -/* $XTermId: button.c,v 1.646 2022/11/25 00:26:32 tom Exp $ */ +/* $XTermId: button.c,v 1.653 2023/02/13 22:34:51 tom Exp $ */ /* - * Copyright 1999-2021,2022 by Thomas E. Dickey + * Copyright 1999-2022,2023 by Thomas E. Dickey * * All Rights Reserved * @@ -1302,8 +1302,9 @@ } static int -ReadLineMovePoint(TScreen *screen, int col, int ldelta) +ReadLineMovePoint(XtermWidget xw, int col, int ldelta) { + TScreen *screen = TScreenOf(xw); Char line[6]; unsigned count = 0; @@ -1314,13 +1315,13 @@ line[count++] = ANSI_CSI; } else { line[count++] = ANSI_ESC; - line[count++] = '['; /* XXX maybe sometimes O is better? */ + line[count++] = (xw->keyboard.flags & MODE_DECCKM) ? 'O' : '['; } line[count] = CharOf(col > 0 ? 'C' : 'D'); if (col < 0) col = -col; while (col--) - v_write(screen->respond, line, 3); + v_write(screen->respond, line, (size_t) 3); return 1; } @@ -1328,12 +1329,16 @@ ReadLineDelete(TScreen *screen, CELL *cell1, CELL *cell2) { int del; + Char erases[2]; + + erases[0] = (Char) get_tty_erase(screen->respond, XTERM_ERASE, "pty"); + erases[1] = 0; del = (cell2->col - cell1->col) + ((cell2->row - cell1->row) * MaxCols(screen)); if (del <= 0) /* Just in case... */ return 0; while (del--) - v_write(screen->respond, (const Char *) "\177", 1); + v_write(screen->respond, erases, (size_t) 1); return 1; } @@ -1348,13 +1353,13 @@ if (isClick1_clean(xw, my_event) && SCREEN_FLAG(screen, click1_moves) && rowOnCurrentLine(screen, eventRow(screen, event), &ldelta1)) { - ReadLineMovePoint(screen, eventColBetween(screen, event), ldelta1); + ReadLineMovePoint(xw, eventColBetween(screen, event), ldelta1); } if (isDoubleClick3(xw, screen, my_event) && SCREEN_FLAG(screen, dclick3_deletes) && rowOnCurrentLine(screen, screen->startSel.row, &ldelta1) && rowOnCurrentLine(screen, screen->endSel.row, &ldelta2)) { - ReadLineMovePoint(screen, screen->endSel.col, ldelta2); + ReadLineMovePoint(xw, screen->endSel.col, ldelta2); ReadLineDelete(screen, &screen->startSel, &(screen->endSel)); } } @@ -1388,7 +1393,7 @@ Line[2] = 'G'; Line[3] = CharOf(' ' + col); Line[4] = CharOf(' ' + line); - v_write(screen->respond, Line, 5); + v_write(screen->respond, Line, (size_t) 5); } } } @@ -1436,13 +1441,12 @@ if (col == 0) goto finish; Line[0] = ANSI_ESC; - /* XXX: sometimes it is better to send '['? */ - Line[1] = 'O'; + Line[1] = (xw->keyboard.flags & MODE_DECCKM) ? 'O' : '['; Line[2] = CharOf(col > 0 ? 'C' : 'D'); if (col < 0) col = -col; while (col--) - v_write(screen->respond, Line, 3); + v_write(screen->respond, Line, (size_t) 3); finish: if (event->type == ButtonRelease) do_select_end(xw, event, params, num_params, False); @@ -1473,7 +1477,7 @@ Char Line[6]; Line[0] = ANSI_ESC; /* force an exit from insert-mode */ - v_write(pty, Line, 1); + v_write(pty, Line, (size_t) 1); if (line < 0) { line = -line; @@ -1482,7 +1486,7 @@ Line[0] = CONTROL('p'); } while (--line >= 0) - v_write(pty, Line, 1); + v_write(pty, Line, (size_t) 1); } } } @@ -2278,7 +2282,7 @@ #ifdef VMS # define tty_vwrite(pty,lag,l) tt_write(lag,l) #else /* !( VMS ) */ -# define tty_vwrite(pty,lag,l) v_write(pty,lag,l) +# define tty_vwrite(pty,lag,l) v_write(pty,lag,(size_t) l) #endif /* defined VMS */ #if OPT_PASTE64 @@ -2454,14 +2458,18 @@ #endif /* OPT_PASTE64 */ #if OPT_READLINE if (SCREEN_FLAG(screen, paste_quotes)) { + Char quote[2]; + quote[0] = (Char) get_tty_lnext(screen->respond, XTERM_LNEXT, "pty"); + quote[1] = 0; + TRACE(("writing quoted selection data %s\n", visibleChars(lag, length))); while (length--) { - tty_vwrite(screen->respond, (const Char *) "\026", 1); /* Control-V */ + tty_vwrite(screen->respond, quote, 1); tty_vwrite(screen->respond, lag++, 1); } } else #endif { - TRACE(("writing base64 padding %s\n", visibleChars(lag, length))); + TRACE(("writing selection data %s\n", visibleChars(lag, length))); tty_vwrite(screen->respond, lag, length); } } @@ -2469,14 +2477,9 @@ static void _WriteSelectionData(XtermWidget xw, Char *line, size_t length) { - /* Write data to pty a line at a time. */ - /* Doing this one line at a time may no longer be necessary - because v_write has been re-written. */ - -#if OPT_PASTE64 +#if OPT_PASTE64 || OPT_READLINE TScreen *screen = TScreenOf(xw); #endif - Char *lag, *end; /* in the VMS version, if tt_pasting isn't set to True then qio reads aren't blocked and an infinite loop is entered, where the @@ -2486,30 +2489,23 @@ tt_pasting = True; #endif - end = &line[length]; - lag = line; - #if OPT_PASTE64 if (screen->base64_paste) { - _qWriteSelectionData(xw, lag, (size_t) (end - lag)); + _qWriteSelectionData(xw, line, length); base64_flush(screen); } else #endif { if (!SCREEN_FLAG(screen, paste_literal_nl)) { - Char *cp; - for (cp = line; cp != end; cp++) { - if (*cp == '\n') { - *cp = '\r'; - _qWriteSelectionData(xw, lag, (size_t) (cp - lag + 1)); - lag = cp + 1; + size_t n; + for (n = 0; n < length; ++n) { + if (line[n] == '\n') { + line[n] = '\r'; } } } - if (lag != end) { - _qWriteSelectionData(xw, lag, (size_t) (end - lag)); - } + _qWriteSelectionData(xw, line, length); } #ifdef VMS tt_pasting = False; @@ -2826,7 +2822,7 @@ && (okSendMousePos(xw) == MOUSE_OFF) && SCREEN_FLAG(screen, paste_moves) && rowOnCurrentLine(screen, eventRow(screen, event), &ldelta)) - ReadLineMovePoint(screen, eventColBetween(screen, event), ldelta); + ReadLineMovePoint(xw, eventColBetween(screen, event), ldelta); #endif /* OPT_READLINE */ xtermGetSelection(w, event->xbutton.time, params, *num_params, NULL); @@ -3101,7 +3097,7 @@ break; } } - v_write(screen->respond, line, count); + v_write(screen->respond, line, (size_t) count); UnHiliteText(xw); } } @@ -5432,7 +5428,7 @@ /* Transmit key sequence to process running under xterm */ TRACE(("EditorButton -> %s\n", visibleChars(line, count))); - v_write(pty, line, count); + v_write(pty, line, (size_t) count); } return; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xterm-378/charproc.c new/xterm-379/charproc.c --- old/xterm-378/charproc.c 2023-01-09 01:26:45.000000000 +0100 +++ new/xterm-379/charproc.c 2023-02-15 01:10:20.000000000 +0100 @@ -1,4 +1,4 @@ -/* $XTermId: charproc.c,v 1.1924 2023/01/09 00:26:45 tom Exp $ */ +/* $XTermId: charproc.c,v 1.1934 2023/02/15 00:10:20 tom Exp $ */ /* * Copyright 1999-2022,2023 by Thomas E. Dickey @@ -583,6 +583,7 @@ Sres(XtNcursorBlink, XtCCursorBlink, screen.cursor_blink_s, "false"), #endif Bres(XtNcursorUnderLine, XtCCursorUnderLine, screen.cursor_underline, False), + Bres(XtNcursorBar, XtCCursorBar, screen.cursor_bar, False), #if OPT_BLINK_TEXT Bres(XtNshowBlinkAsBold, XtCCursorBlink, screen.blink_as_bold, DEFBLINKASBOLD), @@ -2479,6 +2480,8 @@ Cardinal n; for (n = 0; n < SL_BUFSIZ && length > 0 && *value != '\0'; ++n) { buffer[n] = CharOf(*value++); + if (buffer[n] < 32 || buffer[n] > 126) + buffer[n] = ' '; /* FIXME - provide for UTF-8 */ --length; } buffer[n] = 0; @@ -2493,6 +2496,7 @@ { XtermWidget xw = (XtermWidget) closure; TScreen *screen = TScreenOf(xw); + int right_margin; time_t now; const char *parse; @@ -2569,10 +2573,14 @@ StatusPutChars(xw, parse, 1); } } - while (screen->cur_col < screen->max_col) - StatusPutChars(xw, " ", 1); + right_margin = ScrnRightMargin(xw); + memset(buffer, ' ', (size_t) SL_BUFSIZ); + while (screen->cur_col < right_margin) { + int chunk = Min(SL_BUFSIZ, (right_margin - screen->cur_col)); + StatusPutChars(xw, buffer, chunk); + } - ScrnRefresh(xw, FirstRowNumber(screen), 0, 1, screen->max_col, True); + ScrnRefresh(xw, FirstRowNumber(screen), 0, 1, right_margin, True); screen->status_active = False; CursorRestore2(xw, &screen->status_data[0]); @@ -2609,6 +2617,7 @@ int n; char buffer[SL_BUFSIZ + 1]; CLineData *ld = getLineData(screen, screen->cur_row); + int right_margin = ScrnRightMargin(xw); TRACE(("...text[%d:%d]:%s\n", screen->cur_row, @@ -2617,7 +2626,7 @@ memset(buffer, '#', SL_BUFSIZ); for (n = 0; n < screen->max_col; n += SL_BUFSIZ) { - StatusPutChars(xw, buffer, screen->max_col - n); + StatusPutChars(xw, buffer, right_margin - n); } } #endif @@ -3178,6 +3187,56 @@ if (xw->work.palette_changed) { repaintWhenPaletteChanged(xw, sp); } +#if OPT_STATUS_LINE + /* + * If we are currently writing to the status-line, ignore controls that + * apply only to the full screen, or which use features which we will + * not support in the status-line. + */ + if (IsStatusShown(screen) && (screen)->status_active) { + switch (sp->nextstate) { + case CASE_DECDHL: + case CASE_DECSWL: + case CASE_DECDWL: + case CASE_CUU: + case CASE_CUD: + case CASE_VPA: + case CASE_VPR: + case CASE_ED: + case CASE_TRACK_MOUSE: + case CASE_DECSTBM: + case CASE_DECALN: + case CASE_GRAPHICS_ATTRIBUTES: + case CASE_SPA: + case CASE_EPA: + case CASE_SU: + case CASE_IND: + case CASE_CPL: + case CASE_CNL: + case CASE_NEL: + case CASE_RI: +#if OPT_DEC_LOCATOR + case CASE_DECEFR: + case CASE_DECELR: + case CASE_DECSLE: + case CASE_DECRQLP: +#endif +#if OPT_DEC_RECTOPS + case CASE_DECRQCRA: + case CASE_DECCRA: + case CASE_DECERA: + case CASE_DECFRA: + case CASE_DECSERA: + case CASE_DECSACE: + case CASE_DECCARA: + case CASE_DECRARA: +#endif + ResetState(sp); + sp->nextstate = -1; /* not a legal state */ + break; + } + } +#endif switch (sp->nextstate) { case CASE_PRINT: @@ -6154,7 +6213,7 @@ * of output. */ if (size == FRG_SIZE) { - init_timeval(&my_timeout, 0); + init_timeval(&my_timeout, 0L); i = Select(max_plus1, &select_mask, &write_mask, 0, &my_timeout); if (i > 0 && FD_ISSET(screen->respond, &select_mask)) { sched_yield(); @@ -6183,7 +6242,7 @@ XFD_COPYSET(&pty_mask, &write_mask); } else FD_ZERO(&write_mask); - init_timeval(&my_timeout, 0); + init_timeval(&my_timeout, 0L); time_select = 0; /* @@ -6205,12 +6264,12 @@ } #if OPT_STATUS_LINE if ((screen->status_type == 1) && screen->status_timeout) { - ImproveTimeout(find_SL_Timeout(xw) * 1000); + ImproveTimeout(find_SL_Timeout(xw) * 1000L); time_select = 1; } #endif if (screen->awaitInput) { - ImproveTimeout(50000); + ImproveTimeout(50000L); time_select = 1; } #if OPT_BLINK_CURS @@ -6221,9 +6280,9 @@ * Compute the timeout for the blinking cursor to be much * smaller than the "on" or "off" interval. */ - long tick = smaller_timeout((screen->blink_on < screen->blink_off) - ? screen->blink_on - : screen->blink_off); + long tick = smaller_timeout((long) ((screen->blink_on < screen->blink_off) + ? screen->blink_on + : screen->blink_off)); ImproveTimeout(tick); time_select = 1; } @@ -6247,7 +6306,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, (Char *) 0, 0); /* flush buffer */ + v_write(screen->respond, (Char *) 0, (size_t) 0); /* flush buffer */ } /* if there are X events already in our queue, it @@ -8626,11 +8685,11 @@ if (screen->unparse_len) { TRACE(("unparse_end %u:%s\n", screen->unparse_len, - visibleIChars(screen->unparse_bfr, screen->unparse_len))); + visibleIChars(screen->unparse_bfr, (size_t) screen->unparse_len))); #ifdef VMS tt_write(screen->unparse_bfr, screen->unparse_len); #else /* VMS */ - writePtyData(screen->respond, screen->unparse_bfr, screen->unparse_len); + writePtyData(screen->respond, screen->unparse_bfr, (size_t) screen->unparse_len); #endif /* VMS */ screen->unparse_len = 0; } @@ -9424,9 +9483,8 @@ } #define InitCursorShape(target, source) \ - target->cursor_shape = source->cursor_underline \ - ? CURSOR_UNDERLINE \ - : CURSOR_BLOCK + target->cursor_shape = source->cursor_underline ? CURSOR_UNDERLINE : \ + source->cursor_bar ? CURSOR_BAR : CURSOR_BLOCK #if OPT_XRES_QUERY static XtResource * @@ -9981,6 +10039,7 @@ screen->cursor_blink_i = screen->cursor_blink; #endif init_Bres(screen.cursor_underline); + init_Bres(screen.cursor_bar); /* resources allow for underline or block, not (yet) bar */ InitCursorShape(screen, TScreenOf(request)); #if OPT_BLINK_CURS @@ -12824,9 +12883,14 @@ * Finally, draw the underline. */ screen->box->x = (short) x; - screen->box->y = (short) (y + FontHeight(screen) - 2); - XDrawLines(screen->display, VDrawable(screen), outlineGC, - screen->box, NBOX, CoordModePrevious); + screen->box->y = (short) (y + + FontHeight(screen) + - screen->box[2].y); + XFillRectangle(screen->display, VDrawable(screen), outlineGC, + screen->box->x, + screen->box->y, + (unsigned) screen->box[1].x, + (unsigned) screen->box[2].y); } else if (isCursorBar(screen)) { /* @@ -12834,8 +12898,11 @@ */ screen->box->x = (short) x; screen->box->y = (short) y; - XDrawLines(screen->display, VDrawable(screen), outlineGC, - screen->box, NBOX, CoordModePrevious); + XFillRectangle(screen->display, VDrawable(screen), outlineGC, + screen->box->x, + screen->box->y, + (unsigned) screen->box[1].x, + (unsigned) screen->box[2].y); } else { #if OPT_WIDE_ATTRS int italics_on = ((ld->attribs[cursor_col] & ATR_ITALIC) != 0); @@ -13301,6 +13368,11 @@ screen->cursor_shape, screen->cursor_blink)); #endif +#if OPT_STATUS_LINE + if (screen->vtXX_level >= 2) { + handle_DECSSDT(xw, 0); /* DEC STD 070, page 14-10 */ + } +#endif /* reset scrolling region */ resetMarginMode(xw); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xterm-378/configure.in new/xterm-379/configure.in --- old/xterm-378/configure.in 2023-01-08 12:41:52.000000000 +0100 +++ new/xterm-379/configure.in 2023-02-12 20:12:35.000000000 +0100 @@ -1,4 +1,4 @@ -dnl $XTermId: configure.in,v 1.392 2023/01/08 11:41:52 tom Exp $ +dnl $XTermId: configure.in,v 1.394 2023/02/12 19:12:35 tom Exp $ dnl dnl ----------------------------------------------------------------------------- dnl this file is part of xterm @@ -105,6 +105,7 @@ wcswidth \ wcwidth ) CF_MKSTEMP +CF_SETITIMER CF_UTMP CF_STRUCT_LASTLOG CF_POSIX_SAVED_IDS @@ -839,10 +840,10 @@ fi AC_MSG_CHECKING(if you want support for mouse in readline applications) -CF_ARG_ENABLE(readline-mouse, - [ --enable-readline-mouse enable support for mouse in readline applications], - [enable_readline_mouse=yes], - [enable_readline_mouse=no]) +CF_ARG_DISABLE(readline-mouse, + [ --disable-readline-mouse disable support for mouse in readline applications], + [enable_readline_mouse=no], + [enable_readline_mouse=yes]) AC_MSG_RESULT($enable_readline_mouse) if test "$enable_readline_mouse" = yes ; then AC_DEFINE(OPT_READLINE,1,[Define to 1 to enable support for mouse in readline applications]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xterm-378/ctlseqs.ms new/xterm-379/ctlseqs.ms --- old/xterm-378/ctlseqs.ms 2023-01-07 02:30:20.000000000 +0100 +++ new/xterm-379/ctlseqs.ms 2023-02-12 22:59:49.000000000 +0100 @@ -1,6 +1,6 @@ .\"#! troff -ms $1 -*- Nroff -*- .\" "XTerm Control Sequences" document -.\" $XTermId: ctlseqs.ms,v 1.666 2023/01/07 01:30:20 tom Exp $ +.\" $XTermId: ctlseqs.ms,v 1.667 2023/02/12 21:59:49 tom Exp $ .\" .\" .\" Copyright 1996-2022,2023 by Thomas E. Dickey @@ -69,8 +69,8 @@ .\" .ds XT XTerm .ds xt xterm -.ds LF Patch #378 -.ds RF 2023/01/06 +.ds LF Patch #379 +.ds RF 2023/02/12 .\" .if n .pl 9999v \" no page breaks in nroff .ND @@ -1433,7 +1433,12 @@ \*(Ps = \*1\*0\*6\*0 \(-> Set legacy keyboard emulation, i.e, X11R6, \fI\*(xt\fP. \*(Ps = \*1\*0\*6\*1 \(-> Set VT220 keyboard emulation, \fI\*(xt\fP. + \*(Ps = \*2\*0\*0\*1 \(-> Enable readline mouse button-1, \fI\*(xt\fP. + \*(Ps = \*2\*0\*0\*2 \(-> Enable readline mouse button-2, \fI\*(xt\fP. + \*(Ps = \*2\*0\*0\*3 \(-> Enable readline mouse button-3, \fI\*(xt\fP. \*(Ps = \*2\*0\*0\*4 \(-> Set bracketed paste mode, \fI\*(xt\fP. + \*(Ps = \*2\*0\*0\*5 \(-> Enable readline character-quoting, \fI\*(xt\fP. + \*(Ps = \*2\*0\*0\*6 \(-> Enable readline newline pasting, \fI\*(xt\fP. . .iP .IP \\*(Cs\\*(Ps\\*s\\*i @@ -1569,7 +1574,12 @@ \*(Ps = \*1\*0\*5\*3 \(-> Reset SCO function-key mode, \fI\*(xt\fP. \*(Ps = \*1\*0\*6\*0 \(-> Reset legacy keyboard emulation, i.e, X11R6, \fI\*(xt\fP. \*(Ps = \*1\*0\*6\*1 \(-> Reset keyboard emulation to Sun/PC style, \fI\*(xt\fP. + \*(Ps = \*2\*0\*0\*1 \(-> Disable readline mouse button-1, \fI\*(xt\fP. + \*(Ps = \*2\*0\*0\*2 \(-> Disable readline mouse button-2, \fI\*(xt\fP. + \*(Ps = \*2\*0\*0\*3 \(-> Disable readline mouse button-3, \fI\*(xt\fP. \*(Ps = \*2\*0\*0\*4 \(-> Reset bracketed paste mode, \fI\*(xt\fP. + \*(Ps = \*2\*0\*0\*5 \(-> Disable readline character-quoting, \fI\*(xt\fP. + \*(Ps = \*2\*0\*0\*6 \(-> Disable readline newline pasting, \fI\*(xt\fP. . .iP .IP \\*(Cs\\*(Pm\\*s\\*m @@ -3304,6 +3314,48 @@ \fIXTerm - bracketed-paste\fP .DE . +.Sh "Readline Modes" +.LP +Several modes provide support for mouse button events in \fIreadline\fP. +Bracketed paste is one of these \fIreadline\fP modes, but is used more widely. +. +.LP +Some assumptions (particular mouse buttons) and limitations +(the mouse is clicked on the current row on the screen) apply: +. +.IP "\*2\*0\*0\*1" +If mouse button 1 is used to end or extend a selection +(the \fBselect-end\fP action), +and if the cursor position is on the same row as the mouse-click, +send left/right cursor control sequences to the host to +adjust the cursor position to match the mouse click. +. +.IP "\*2\*0\*0\*2" +When pasting text (the \fBinsert-selection\fP action +which is normally bound to mouse button 2), +if mouse protocol is not enabled, +and if the cursor position is on the same row as the mouse-click, +send left/right cursor control sequences to the host to +adjust the cursor position to match the mouse click. +.IP "\*2\*0\*0\*3" +If mouse button 3 is double-clicked when ending or extending a selection, +(the \fBselect-end\fP action), +and if the cursor position is on the same row as the mouse-click, +send left/right cursor control sequences to the host to +adjust the cursor position to match the mouse click. +After adjusting the cursor position, +\fI\*(xt\fP sends erase-characters +(one for each character in the selection) +to tell the host to delete the selected text. +.IP "\*2\*0\*0\*5" +When writing a selection to the host +(i.e., pasting text), +escape each character with the \fIliteral-next\fP (Ctrl-V) character. +.IP "\*2\*0\*0\*6" +Normally when \fI\*(xt\fP writes selections to the host, +it translates newlines to carriage returns. +This mode disables the translation, passing newlines literally. +. .Sh "Title Modes" .LP The window- and icon-labels can be set or queried using control sequences. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xterm-378/ctlseqs.txt new/xterm-379/ctlseqs.txt --- old/xterm-378/ctlseqs.txt 2023-01-07 02:32:15.000000000 +0100 +++ new/xterm-379/ctlseqs.txt 2023-02-12 23:01:38.000000000 +0100 @@ -21,7 +21,7 @@ Thomas Dickey XFree86 Project (1996-2006) invisible-island.net (2006-2023) - updated for XTerm Patch #378 (2023/01/06) + updated for XTerm Patch #379 (2023/02/12) @@ -874,7 +874,12 @@ Ps = 1 0 6 0 -> Set legacy keyboard emulation, i.e, X11R6, xterm. Ps = 1 0 6 1 -> Set VT220 keyboard emulation, xterm. + Ps = 2 0 0 1 -> Enable readline mouse button-1, xterm. + Ps = 2 0 0 2 -> Enable readline mouse button-2, xterm. + Ps = 2 0 0 3 -> Enable readline mouse button-3, xterm. Ps = 2 0 0 4 -> Set bracketed paste mode, xterm. + Ps = 2 0 0 5 -> Enable readline character-quoting, xterm. + Ps = 2 0 0 6 -> Enable readline newline pasting, xterm. CSI Ps i Media Copy (MC). Ps = 0 -> Print screen (default). @@ -1004,7 +1009,12 @@ X11R6, xterm. Ps = 1 0 6 1 -> Reset keyboard emulation to Sun/PC style, xterm. + Ps = 2 0 0 1 -> Disable readline mouse button-1, xterm. + Ps = 2 0 0 2 -> Disable readline mouse button-2, xterm. + Ps = 2 0 0 3 -> Disable readline mouse button-3, xterm. Ps = 2 0 0 4 -> Reset bracketed paste mode, xterm. + Ps = 2 0 0 5 -> Disable readline character-quoting, xterm. + Ps = 2 0 0 6 -> Disable readline newline pasting, xterm. CSI Pm m Character Attributes (SGR). Ps = 0 -> Normal (default), VT100. @@ -2459,6 +2469,43 @@ +Readline Modes + +Several modes provide support for mouse button events in readline. +Bracketed paste is one of these readline modes, but is used more widely. + +Some assumptions (particular mouse buttons) and limitations (the mouse +is clicked on the current row on the screen) apply: + +2 0 0 1 If mouse button 1 is used to end or extend a selection (the + select-end action), and if the cursor position is on the same + row as the mouse-click, send left/right cursor control + sequences to the host to adjust the cursor position to match + the mouse click. + +2 0 0 2 When pasting text (the insert-selection action which is + normally bound to mouse button 2), if mouse protocol is not + enabled, and if the cursor position is on the same row as the + mouse-click, send left/right cursor control sequences to the + host to adjust the cursor position to match the mouse click. + +2 0 0 3 If mouse button 3 is double-clicked when ending or extending a + selection, (the select-end action), and if the cursor position + is on the same row as the mouse-click, send left/right cursor + control sequences to the host to adjust the cursor position to + match the mouse click. After adjusting the cursor position, + xterm sends erase-characters (one for each character in the + selection) to tell the host to delete the selected text. + +2 0 0 5 When writing a selection to the host (i.e., pasting text), + escape each character with the literal-next (Ctrl-V) + character. + +2 0 0 6 Normally when xterm writes selections to the host, it + translates newlines to carriage returns. This mode disables + the translation, passing newlines literally. + + Title Modes The window- and icon-labels can be set or queried using control diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xterm-378/fontutils.c new/xterm-379/fontutils.c --- old/xterm-378/fontutils.c 2023-01-09 00:42:23.000000000 +0100 +++ new/xterm-379/fontutils.c 2023-02-15 10:03:18.000000000 +0100 @@ -1,4 +1,4 @@ -/* $XTermId: fontutils.c,v 1.760 2023/01/08 23:42:23 tom Exp $ */ +/* $XTermId: fontutils.c,v 1.762 2023/02/15 09:03:18 tom Exp $ */ /* * Copyright 1998-2022,2023 by Thomas E. Dickey @@ -2398,8 +2398,12 @@ XPoint *vp; int fw = FontWidth(screen) - 1; int fh = FontHeight(screen) - 1; - int ww = isCursorBar(screen) ? 1 : fw; - int hh = isCursorUnderline(screen) ? 1 : fh; + int ww = isCursorBar(screen) ? fw / 8 : fw; + int hh = isCursorUnderline(screen) ? fw / 8 : fh; + if (ww < 2) + ww = 2; + if (hh < 2) + hh = 2; vp = &VTbox[1]; (vp++)->x = (short) ww; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xterm-378/main.c new/xterm-379/main.c --- old/xterm-378/main.c 2023-01-09 01:28:06.000000000 +0100 +++ new/xterm-379/main.c 2023-02-15 02:25:39.000000000 +0100 @@ -1,4 +1,4 @@ -/* $XTermId: main.c,v 1.892 2023/01/09 00:28:06 tom Exp $ */ +/* $XTermId: main.c,v 1.899 2023/02/15 01:25:39 tom Exp $ */ /* * Copyright 2002-2022,2023 by Thomas E. Dickey @@ -503,9 +503,6 @@ static unsigned command_length_with_luit = 0; #endif -#define TERMCAP_ERASE "kb" -#define VAL_INITIAL_ERASE A2E(8) - /* choose a nice default value for speed - if we make it too low, users who * mistakenly use $TERM set to vt100 will get padding delays. Setting it to a * higher value is not useful since legacy applications (termcap) that care @@ -1011,6 +1008,8 @@ DATA("+ai", "*activeIcon", XrmoptionNoArg, "on"), #endif /* NO_ACTIVE_ICON */ DATA("-b", "*internalBorder",XrmoptionSepArg, NULL), +DATA("-barc", "*cursorBar", XrmoptionNoArg, "on"), +DATA("+barc", "*cursorBar", XrmoptionNoArg, "off"), DATA("-bc", "*cursorBlink", XrmoptionNoArg, "on"), DATA("+bc", "*cursorBlink", XrmoptionNoArg, "off"), DATA("-bcf", "*cursorOffTime",XrmoptionSepArg, NULL), @@ -1156,8 +1155,8 @@ DATA("+uc", "*cursorUnderLine", XrmoptionNoArg, "off"), DATA("-ulc", "*colorULMode", XrmoptionNoArg, "off"), DATA("+ulc", "*colorULMode", XrmoptionNoArg, "on"), -DATA("-ulit", "*italicULMode", XrmoptionNoArg, "off"), -DATA("+ulit", "*italicULMode", XrmoptionNoArg, "on"), +DATA("-ulit", "*italicULMode", XrmoptionNoArg, "off"), +DATA("+ulit", "*italicULMode", XrmoptionNoArg, "on"), DATA("-ut", "*utmpInhibit", XrmoptionNoArg, "on"), DATA("+ut", "*utmpInhibit", XrmoptionNoArg, "off"), DATA("-im", "*useInsertMode", XrmoptionNoArg, "on"), @@ -2198,6 +2197,52 @@ } int +get_tty_erase(int fd, int default_erase, const char *tag) +{ + int result = default_erase; + int rc; + +#ifdef TERMIO_STRUCT + TERMIO_STRUCT my_tio; + rc = ttyGetAttr(fd, &my_tio); + if (rc == 0) + result = my_tio.c_cc[VERASE]; +#else /* !TERMIO_STRUCT */ + struct sgttyb my_sg; + rc = ioctl(fd, TIOCGETP, (char *) &my_sg); + if (rc == 0) + result = my_sg.sg_erase; +#endif /* TERMIO_STRUCT */ + TRACE(("%s erase:%d (from %s)\n", (rc == 0) ? "OK" : "FAIL", result, tag)); + (void) tag; + return result; +} + +int +get_tty_lnext(int fd, int default_lnext, const char *tag) +{ + int result = default_lnext; + int rc; + +#ifdef TERMIO_STRUCT + TERMIO_STRUCT my_tio; + rc = ttyGetAttr(fd, &my_tio); + if (rc == 0) + result = my_tio.c_cc[VLNEXT]; +#elif defined(HAS_LTCHARS) + struct ltchars my_ltc; + rc = ioctl(fd, TIOCGLTC, (char *) &my_ltc); + if (rc == 0) + result = my_ltc.t_lnextc; +#else + result = XTERM_LNEXT; +#endif /* TERMIO_STRUCT */ + TRACE(("%s lnext:%d (from %s)\n", (rc == 0) ? "OK" : "FAIL", result, tag)); + (void) tag; + return result; +} + +int main(int argc, char *argv[]ENVP_ARG) { #if OPT_MAXIMIZE @@ -3750,7 +3795,7 @@ int done; #endif #if OPT_INITIAL_ERASE - int initial_erase = VAL_INITIAL_ERASE; + int initial_erase = XTERM_ERASE; Bool setInitialErase; #endif int rc = 0; @@ -3867,7 +3912,7 @@ got_handshake_size = False; #endif /* OPT_PTY_HANDSHAKE */ #if OPT_INITIAL_ERASE - initial_erase = VAL_INITIAL_ERASE; + initial_erase = XTERM_ERASE; #endif signal(SIGALRM, SIG_DFL); @@ -3982,20 +4027,9 @@ TRACE_GET_TTYSIZE(screen->respond, "after get_pty"); #if OPT_INITIAL_ERASE if (resource.ptyInitialErase) { -#ifdef TERMIO_STRUCT - TERMIO_STRUCT my_tio; - rc = ttyGetAttr(screen->respond, &my_tio); - if (rc == 0) - initial_erase = my_tio.c_cc[VERASE]; -#else /* !TERMIO_STRUCT */ - struct sgttyb my_sg; - rc = ioctl(screen->respond, TIOCGETP, (char *) &my_sg); - if (rc == 0) - initial_erase = my_sg.sg_erase; -#endif /* TERMIO_STRUCT */ - TRACE(("%s initial_erase:%d (from pty)\n", - (rc == 0) ? "OK" : "FAIL", - initial_erase)); + initial_erase = get_tty_erase(screen->respond, + initial_erase, + "pty"); } #endif /* OPT_INITIAL_ERASE */ } @@ -5045,6 +5079,7 @@ } if (*newtc) { #if OPT_INITIAL_ERASE +#define TERMCAP_ERASE "kb" unsigned len; remove_termcap_entry(newtc, TERMCAP_ERASE "="); len = (unsigned) strlen(newtc); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xterm-378/package/debian/changelog new/xterm-379/package/debian/changelog --- old/xterm-378/package/debian/changelog 2022-11-26 13:25:02.000000000 +0100 +++ new/xterm-379/package/debian/changelog 2023-01-25 02:14:44.000000000 +0100 @@ -1,3 +1,9 @@ +xterm-dev (379) unstable; urgency=low + + * maintenance updates + + -- Thomas E. Dickey <[email protected]> Tue, 24 Jan 2023 20:14:44 -0500 + xterm-dev (378) unstable; urgency=low * maintenance updates diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xterm-378/package/freebsd/Makefile new/xterm-379/package/freebsd/Makefile --- old/xterm-378/package/freebsd/Makefile 2022-11-26 13:25:02.000000000 +0100 +++ new/xterm-379/package/freebsd/Makefile 2023-01-25 02:14:44.000000000 +0100 @@ -1,4 +1,4 @@ -# $XTermId: Makefile,v 1.99 2022/11/26 12:25:02 tom Exp $ +# $XTermId: Makefile,v 1.100 2023/01/25 01:14:44 tom Exp $ # $FreeBSD: head/x11/xterm/Makefile 492827 2019-02-13 06:43:36Z ehaupt $ # This is adapted from the FreeBSD port, installing as "xterm-dev" with @@ -7,7 +7,7 @@ # and "make makesum". PORTNAME= xterm -PORTVERSION= 378 +PORTVERSION= 379 CATEGORIES= x11 MASTER_SITES= ftp://ftp.invisible-island.net/xterm/:src1 \ https://invisible-mirror.net/archives/xterm/:src1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xterm-378/package/pkgsrc/Makefile new/xterm-379/package/pkgsrc/Makefile --- old/xterm-378/package/pkgsrc/Makefile 2022-11-26 13:25:02.000000000 +0100 +++ new/xterm-379/package/pkgsrc/Makefile 2023-01-25 02:14:44.000000000 +0100 @@ -1,6 +1,6 @@ # $NetBSD: Makefile,v 1.117 2018/03/12 11:18:00 wiz Exp $ -DISTNAME= xterm-378 +DISTNAME= xterm-379 PKGREVISION= 1 CATEGORIES= x11 MASTER_SITES= ftp://ftp.invisible-island.net/xterm/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xterm-378/package/xterm.spec new/xterm-379/package/xterm.spec --- old/xterm-378/package/xterm.spec 2022-11-26 13:25:02.000000000 +0100 +++ new/xterm-379/package/xterm.spec 2023-01-25 02:14:44.000000000 +0100 @@ -1,11 +1,11 @@ -# $XTermId: xterm.spec,v 1.156 2022/11/26 12:25:02 tom Exp $ +# $XTermId: xterm.spec,v 1.157 2023/01/25 01:14:44 tom Exp $ Summary: X terminal emulator (development version) %global my_middle xterm %global my_suffix -dev %global fullname %{my_middle}%{my_suffix} %global my_class XTermDev Name: %{fullname} -Version: 378 +Version: 379 Release: 1 License: X11 Group: User Interface/X diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xterm-378/ptyx.h new/xterm-379/ptyx.h --- old/xterm-378/ptyx.h 2023-01-02 14:24:41.000000000 +0100 +++ new/xterm-379/ptyx.h 2023-02-14 23:14:16.000000000 +0100 @@ -1,4 +1,4 @@ -/* $XTermId: ptyx.h,v 1.1082 2023/01/02 13:24:41 tom Exp $ */ +/* $XTermId: ptyx.h,v 1.1085 2023/02/14 22:14:16 Jan.Engelhardt Exp $ */ /* * Copyright 1999-2022,2023 by Thomas E. Dickey @@ -397,6 +397,9 @@ ((c) >= ANSI_DEL && (c) <= ANSI_APC))) #define OnlyLatin1(c) (NonLatin1(c) ? BAD_ASCII : (c)) +#define L_BLOK '[' +#define R_BLOK ']' + #define L_CURL '{' #define R_CURL '}' @@ -1594,6 +1597,9 @@ #define CONTROL(a) (A2E(E2A(a)&037)) +#define XTERM_ERASE A2E(CONTROL('H')) +#define XTERM_LNEXT A2E(CONTROL('V')) + /***====================================================================***/ #if OPT_TEK4014 @@ -2572,6 +2578,7 @@ int cursor_state; /* ON, OFF, or BLINKED_OFF */ int cursor_busy; /* do not redraw... */ Boolean cursor_underline; /* true if cursor is in underline mode */ + Boolean cursor_bar; /* true if cursor is in bar mode */ XtCursorShape cursor_shape; #if OPT_BLINK_CURS BlinkOps cursor_blink; /* cursor blink enable */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xterm-378/resize.c new/xterm-379/resize.c --- old/xterm-378/resize.c 2022-02-18 21:32:48.000000000 +0100 +++ new/xterm-379/resize.c 2023-01-26 01:43:18.000000000 +0100 @@ -1,7 +1,7 @@ -/* $XTermId: resize.c,v 1.148 2022/02/18 20:32:48 tom Exp $ */ +/* $XTermId: resize.c,v 1.149 2023/01/26 00:43:18 tom Exp $ */ /* - * Copyright 2003-2021,2022 by Thomas E. Dickey + * Copyright 2003-2022,2023 by Thomas E. Dickey * * All Rights Reserved * @@ -98,7 +98,7 @@ #define SUN 1 #define VT100 0 -#define TIMEOUT 10 +#define TIMEOUT 3 #define SHELL_UNKNOWN 0 #define SHELL_C 1 @@ -133,6 +133,11 @@ }; static char *myname; static int shell_type = SHELL_UNKNOWN; +static const char *const getattr[EMULATIONS] = +{ + ESCAPE("[c"), + NULL, +}; static const char *const getsize[EMULATIONS] = { ESCAPE("7") ESCAPE("[r") ESCAPE("[9999;9999H") ESCAPE("[6n"), @@ -164,7 +169,12 @@ static struct sgttyb sgorig; #endif /* USE_ANY_SYSV_TERMIO/USE_TERMIOS */ -static const char *const size[EMULATIONS] = +static const char *const reply_attr[EMULATIONS] = +{ + ESCAPE("[?%d;%dc"), + NULL, +}; +static const char *const reply_size[EMULATIONS] = { ESCAPE("[%d;%dR"), ESCAPE("[8;%d;%dt"), @@ -211,10 +221,12 @@ exit(EXIT_FAILURE); } +const char *timeout_message = "?"; + static void resize_timeout(int sig) { - fprintf(stderr, "\n%s: Time out occurred\r\n", myname); + fprintf(stderr, "\n%s: %s\r\n", myname, timeout_message); onintr(sig); } @@ -275,19 +287,18 @@ readstring(FILE *fp, char *buf, const char *str) { int last, c; -#if !defined(USG) && !defined(__minix) - /* What is the advantage of setitimer() over alarm()? */ +#if HAVE_SETITIMER struct itimerval it; #endif int limit = (BUFSIZ - 3); signal(SIGALRM, resize_timeout); -#if defined(USG) || defined(__minix) - alarm(TIMEOUT); -#else +#if HAVE_SETITIMER memset((char *) &it, 0, sizeof(struct itimerval)); it.it_value.tv_sec = TIMEOUT; setitimer(ITIMER_REAL, &it, (struct itimerval *) NULL); +#else + alarm(TIMEOUT); #endif if ((c = getc(fp)) == 0233) { /* meta-escape, CSI */ c = ESCAPE("")[0]; @@ -312,11 +323,11 @@ if (c == last) break; } -#if defined(USG) || defined(__minix) - alarm(0); -#else +#if HAVE_SETITIMER memset((char *) &it, 0, sizeof(struct itimerval)); setitimer(ITIMER_REAL, &it, (struct itimerval *) NULL); +#else + alarm(0); #endif *buf = 0; } @@ -513,9 +524,15 @@ free(tmpbuf); } } + if (getattr[emu]) { + timeout_message = "Terminal is not VT100-compatible"; + IGNORE_RC(write(tty, getattr[emu], strlen(getattr[emu]))); + readstring(ttyfp, buf, reply_attr[emu]); + } + timeout_message = "Time out occurred"; IGNORE_RC(write(tty, getsize[emu], strlen(getsize[emu]))); - readstring(ttyfp, buf, size[emu]); - if (sscanf(buf, size[emu], &rows, &cols) != 2) { + readstring(ttyfp, buf, reply_size[emu]); + if (sscanf(buf, reply_size[emu], &rows, &cols) != 2) { fprintf(stderr, "%s: Can't get rows and columns\r\n", myname); onintr(0); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xterm-378/screen.c new/xterm-379/screen.c --- old/xterm-378/screen.c 2022-10-24 00:57:40.000000000 +0200 +++ new/xterm-379/screen.c 2023-02-13 01:04:20.000000000 +0100 @@ -1,7 +1,7 @@ -/* $XTermId: screen.c,v 1.627 2022/10/23 22:57:40 tom Exp $ */ +/* $XTermId: screen.c,v 1.628 2023/02/13 00:04:20 tom Exp $ */ /* - * Copyright 1999-2021,2022 by Thomas E. Dickey + * Copyright 1999-2022,2023 by Thomas E. Dickey * * All Rights Reserved * @@ -1896,7 +1896,7 @@ #define ALLOC_IT(field) \ if (result != NULL) { \ - if ((result->field = calloc(ncol, sizeof(*result->field))) == NULL) { \ + if ((result->field = calloc((size_t) ncol, sizeof(*result->field))) == NULL) { \ result = freeLineData(screen, result); \ } \ } @@ -1913,7 +1913,7 @@ #if OPT_WIDE_CHARS size += source->combSize * sizeof(result->combData[0]); #endif - if ((result = calloc(1, size)) != NULL) { + if ((result = calloc((size_t) 1, size)) != NULL) { result->lineSize = ncol; ALLOC_IT(attribs); #if OPT_ISO_COLORS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xterm-378/version.h new/xterm-379/version.h --- old/xterm-378/version.h 2023-01-09 11:29:58.000000000 +0100 +++ new/xterm-379/version.h 2023-02-16 01:58:04.000000000 +0100 @@ -1,4 +1,4 @@ -/* $XTermId: version.h,v 1.536 2023/01/09 10:29:58 tom Exp $ */ +/* $XTermId: version.h,v 1.538 2023/02/16 00:58:04 tom Exp $ */ /* * Copyright 1998-2022,2023 by Thomas E. Dickey @@ -38,8 +38,8 @@ * version of X to which this version of xterm has been built. The resulting * number in parentheses is my patch number (Thomas E. Dickey). */ -#define XTERM_PATCH 378 -#define XTERM_DATE 2023-01-09 +#define XTERM_PATCH 379 +#define XTERM_DATE 2023-02-15 #ifndef __vendorversion__ #define __vendorversion__ "XTerm" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xterm-378/vttests/insdelln.pl new/xterm-379/vttests/insdelln.pl --- old/xterm-378/vttests/insdelln.pl 2022-10-10 19:05:38.000000000 +0200 +++ new/xterm-379/vttests/insdelln.pl 2022-10-10 19:05:38.000000000 +0200 @@ -1,5 +1,5 @@ #!/usr/bin/env perl -# $XTermId: vxt-insdelln,v 1.10 2022/10/10 17:05:38 tom Exp $ +# $XTermId: insdelln.pl,v 1.10 2022/10/10 17:05:38 tom Exp $ # ----------------------------------------------------------------------------- # this file is part of xterm # diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xterm-378/xterm.appdata.xml new/xterm-379/xterm.appdata.xml --- old/xterm-378/xterm.appdata.xml 2023-01-09 11:30:26.000000000 +0100 +++ new/xterm-379/xterm.appdata.xml 2023-02-16 01:58:26.000000000 +0100 @@ -35,7 +35,7 @@ <keyword>terminal</keyword> </keywords> <releases> - <release version="378" date="2023-01-09"/> + <release version="379" date="2023-02-15"/> </releases> <url type="homepage">https://invisible-island.net/xterm/</url> <update_contact>[email protected]</update_contact> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xterm-378/xterm.h new/xterm-379/xterm.h --- old/xterm-378/xterm.h 2023-01-04 10:21:42.000000000 +0100 +++ new/xterm-379/xterm.h 2023-02-15 00:49:04.000000000 +0100 @@ -1,4 +1,4 @@ -/* $XTermId: xterm.h,v 1.922 2023/01/04 09:21:42 tom Exp $ */ +/* $XTermId: xterm.h,v 1.926 2023/02/14 23:49:04 tom Exp $ */ /* * Copyright 1999-2022,2023 by Thomas E. Dickey @@ -211,6 +211,12 @@ #define HAVE_INITGROUPS #endif +#if !defined(USG) && !defined(__minix) +#define HAVE_SETITIMER 1 +#else +#define HAVE_SETITIMER 0 +#endif + #endif /* HAVE_CONFIG_H */ #ifndef HAVE_X11_DECKEYSYM_H @@ -485,6 +491,7 @@ #define XtNcombiningChars "combiningChars" #define XtNctrlFKeys "ctrlFKeys" #define XtNcurses "curses" +#define XtNcursorBar "cursorBar" #define XtNcursorBlink "cursorBlink" #define XtNcursorBlinkXOR "cursorBlinkXOR" #define XtNcursorColor "cursorColor" @@ -701,6 +708,7 @@ #define XtCCombiningChars "CombiningChars" #define XtCCtrlFKeys "CtrlFKeys" #define XtCCurses "Curses" +#define XtCCursorBar "CursorBar" #define XtCCursorBlink "CursorBlink" #define XtCCursorBlinkXOR "CursorBlinkXOR" #define XtCCursorOffTime "CursorOffTime" @@ -1148,6 +1156,9 @@ extern int kill_process_group (int /* pid */, int /* sig */); extern int nonblocking_wait (void); +extern int get_tty_erase(int /* fd */, int /* default_erase */, const char * /* tag */); +extern int get_tty_lnext(int /* fd */, int /* default_lnext */, const char * /* tag */); + #if OPT_PTY_HANDSHAKE extern void first_map_occurred (void); #else diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xterm-378/xterm.log.html new/xterm-379/xterm.log.html --- old/xterm-378/xterm.log.html 2023-01-09 11:29:25.000000000 +0100 +++ new/xterm-379/xterm.log.html 2023-02-16 01:57:38.000000000 +0100 @@ -30,7 +30,7 @@ * sale, use or other dealings in this Software without prior written * * authorization. * ***************************************************************************** - $XTermId: xterm.log.html,v 1.2478 2023/01/09 10:29:25 tom Exp $ + $XTermId: xterm.log.html,v 1.2487 2023/02/16 00:57:38 tom Exp $ --> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> <html> @@ -70,6 +70,8 @@ CHANGELOG</a>).</p> <ul> + <li><a href="#xterm_379">Patch #379 - 2023/02/15</a></li> + <li><a href="#xterm_378">Patch #378 - 2023/01/09</a></li> <li><a href="#xterm_377">Patch #377 - 2022/11/25</a></li> @@ -1034,6 +1036,59 @@ <li><a href="#xterm_01">Patch #1 - 1996/1/6</a></li> </ul> + <h1><a name="xterm_379" id="xterm_379">Patch #379 - + 2023/02/15</a></h1> + + <ul> + <li>improve text-cursor (patch by Jan Engelhardt): + <ul> + <li>allow selecting <tt>CURSOR_BAR</tt> mode from + command-line/Xresources.</li> + + <li>draw cursor using filled rectangle instead of rectangle + outline to permit thicker underlines/bars.</li> + + <li>scale up cursor relative to font size.</li> + </ul> + </li> + + <li>improve readline modes (Fedora #2166860): + <ul> + <li>document readline modes</li> + + <li>change the feature to configure by default</li> + + <li>replace hard-coded SS3 for cursor movement with current + mode</li> + + <li>replace hard-coded erase/lnext characters with current + values</li> + </ul> + </li> + + <li>improve status-line (report by Thomas Wolff): + <ul> + <li><tt>RIS</tt> turns off status-line</li> + + <li>Right-margin (<tt>DECLRMM</tt> and <tt>DECSLRM</tt>) + limits the length of text written/updated in the + status-line.</li> + + <li>Most controls which affect the whole screen are ignored + while updating the status-line.</li> + </ul> + </li> + + <li>modify configure check for <tt>tgetent</tt> to allow for + some special cases of ncurses configuration (report by Satadru + Pramani).</li> + + <li>reduce timeout, improve warning message if resize is run on + a terminal which is not VT100-compatible.</li> + + <li>reduce compiler warnings in configure script.</li> + </ul> + <h1><a name="xterm_378" id="xterm_378">Patch #378 - 2023/01/09</a></h1> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xterm-378/xterm.man new/xterm-379/xterm.man --- old/xterm-378/xterm.man 2023-01-08 20:20:45.000000000 +0100 +++ new/xterm-379/xterm.man 2023-02-15 01:16:39.000000000 +0100 @@ -1,5 +1,5 @@ '\" t -.\" $XTermId: xterm.man,v 1.874 2023/01/08 19:20:45 tom Exp $ +.\" $XTermId: xterm.man,v 1.876 2023/02/15 00:16:39 tom Exp $ .\" .\" Copyright 1996-2022,2023 by Thomas E. Dickey .\" @@ -461,6 +461,14 @@ The default is \*(``2\*(''. .TP 8 +.B "\-barc" +This option, corresponding to the \fBcursorBar\fP resource, +makes the cursor a bar instead of a box. +.TP 8 +.B "+barc" +This option, corresponding to the \fBcursorBar\fP resource, +makes the cursor a box instead of a bar. +.TP 8 .BI \-baudrate " number" Set the line-speed, used to test the behavior of applications that use the line-speed when optimizing their output to the screen. @@ -1249,10 +1257,12 @@ This option resets the \fButf8\fP resource. .TP 8 .B "\-uc" -This option makes the cursor underlined instead of a box. +This option, corresponding to the \fBcursorUnderline\fP resource, +makes the cursor underlined instead of a box. .TP 8 .B "+uc" -This option makes the cursor a box instead of underlined. +This option m, corresponding to the \fBcursorUnderline\fP resource, +akes the cursor a box instead of underlined. .TP 8 .B "\-ulc" This option disables the display of characters with underline attribute as @@ -2952,6 +2962,11 @@ See the \fB\-cu\fP option for details. The default is \*(``false\*(''. .TP 8 +.B "cursorBar\fP (class\fB CursorBar\fP)" +Specifies whether to make the cursor a left-bar or a box, +unless the \fBcursorUnderline\fP resource is set. +The default is \*(``false\*(''. +.TP 8 .B "cursorBlink\fP (class\fB CursorBlink\fP)" Specifies whether to make the cursor blink. \fI\*N\fP accepts either a keyword (ignoring case) @@ -3029,6 +3044,7 @@ .TP 8 .B "cursorUnderLine\fP (class\fB CursorUnderLine\fP)" Specifies whether to make the cursor underlined or a box. +If unset (false), the \fBcursorBar\fP resource may set the cursor shape. The default is \*(``false\*(''. .TP 8 .B "cutNewline\fP (class\fB CutNewline\fP)" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xterm-378/xtermcfg.hin new/xterm-379/xtermcfg.hin --- old/xterm-378/xtermcfg.hin 2022-09-11 21:26:01.000000000 +0200 +++ new/xterm-379/xtermcfg.hin 2023-01-26 01:54:10.000000000 +0100 @@ -1,7 +1,7 @@ -/* $XTermId: xtermcfg.hin,v 1.227 2022/09/11 19:26:01 tom Exp $ */ +/* $XTermId: xtermcfg.hin,v 1.228 2023/01/26 00:54:10 tom Exp $ */ /* - * Copyright 1997-2021,2022 by Thomas E. Dickey + * Copyright 1997-2022,2023 by Thomas E. Dickey * * All Rights Reserved * @@ -96,6 +96,7 @@ #undef HAVE_PTSNAME /* CF_FUNC_GRANTPT */ #undef HAVE_PUTENV /* AC_CHECK_FUNCS(putenv) */ #undef HAVE_SCHED_YIELD /* AC_CHECK_FUNCS(sched_yield) */ +#undef HAVE_SETITIMER /* CF_SETITIMER */ #undef HAVE_SETPGID /* AC_CHECK_FUNCS(setpgid) */ #undef HAVE_STDINT_H /* AC_PROG_CC_STDC */ #undef HAVE_STDLIB_H /* AC_CHECK_HEADERS(stdlib.h) */
