Hello community, here is the log from the commit of package xterm for openSUSE:Factory checked in at 2014-09-28 19:56:36 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/xterm (Old) and /work/SRC/openSUSE:Factory/.xterm.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "xterm" Changes: -------- --- /work/SRC/openSUSE:Factory/xterm/xterm.changes 2014-09-20 15:49:50.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.xterm.new/xterm.changes 2014-09-28 19:56:41.000000000 +0200 @@ -1,0 +2,30 @@ +Thu Sep 25 08:28:22 UTC 2014 - pce...@suse.com + +- Patch #311 - 2014/09/18 + * mention xclip in manpage as an alternative workaround for + copying clipboard data, noting that selectToClipboard (from + patch #209) is the recommended approach (Debian #639094). + * correct comparison in do_select_regex() of working position + against starting column. + * correct initialization for regular-expression feature of + exec-selectable and insert-selectable actions (Debian + #758633). + * modify logic for exec-formatted and insert-formatted actions + to ensure that the formatting occurs just after the selection + is received (Debian #758633). + * account for state of reverse-video in special case of cursor + coloring (Debian #759734). + * fix a sign-extension problem in ReGIS support, as well as + correcting a case where ignored-characters were not really + ignored (patch by Ross Combs). + * Enable the "Escape Sequence" menu entry when an OSC 50 is + received. Also disable it if the escape sequence specifies no + font (Debian #760208). + * improve fix for the fontsel menu entry from patch #304: + because the recovery used the "current font", it would fail + if one first selected a valid font, then an invalid font + (Debian #760207). + * correct an off-by-one in limit-check for ScrnLimitChar + function (report by Egmont Koblinger). + +------------------------------------------------------------------- Old: ---- xterm-310.tgz xterm-310.tgz.asc New: ---- xterm-311.tgz xterm-311.tgz.asc ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ xterm.spec ++++++ --- /var/tmp/diff_new_pack.AeToru/_old 2014-09-28 19:56:43.000000000 +0200 +++ /var/tmp/diff_new_pack.AeToru/_new 2014-09-28 19:56:43.000000000 +0200 @@ -52,7 +52,7 @@ %if 0%{?suse_version} > 1210 Requires: luit %endif -Version: 310 +Version: 311 Release: 0 Summary: The basic X terminal program License: MIT ++++++ xterm-310.tgz -> xterm-311.tgz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xterm-310/MANIFEST new/xterm-311/MANIFEST --- old/xterm-310/MANIFEST 2014-07-15 01:36:58.000000000 +0200 +++ new/xterm-311/MANIFEST 2014-07-28 23:36:30.000000000 +0200 @@ -1,4 +1,4 @@ -MANIFEST for xterm-310, version xterm-310 +MANIFEST for xterm-311, version xterm-311 -------------------------------------------------------------------------------- MANIFEST this file 256colres.h resource-definitions for 256-color mode diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xterm-310/button.c new/xterm-311/button.c --- old/xterm-310/button.c 2014-05-26 19:12:51.000000000 +0200 +++ new/xterm-311/button.c 2014-09-18 02:17:35.000000000 +0200 @@ -1,4 +1,4 @@ -/* $XTermId: button.c,v 1.473 2014/05/26 17:12:51 tom Exp $ */ +/* $XTermId: button.c,v 1.481 2014/09/18 00:17:35 tom Exp $ */ /* * Copyright 1999-2013,2014 by Thomas E. Dickey @@ -2177,16 +2177,39 @@ #endif for (i = 0; i < text_list_count; i++) { size_t len = removeControls(xw, text_list[i]); + if (screen->selectToBuffer) { - size_t have = (screen->internal_select - ? strlen(screen->internal_select) + InternalSelect *mydata = &(screen->internal_select); + size_t have = (mydata->buffer + ? strlen(mydata->buffer) : 0); size_t need = have + len + 1; - char *buffer = realloc(screen->internal_select, need); + char *buffer = realloc(mydata->buffer, need); + + screen->selectToBuffer = False; +#if OPT_PASTE64 + screen->base64_paste = mydata->base64_paste; +#endif +#if OPT_READLINE + screen->paste_brackets = mydata->paste_brackets; +#endif if (buffer != 0) { strcpy(buffer + have, text_list[i]); - screen->internal_select = buffer; + mydata->buffer = buffer; } + TRACE(("FormatSelect %d.%d .. %d.%d %s\n", + screen->startSel.row, + screen->startSel.col, + screen->endSel.row, + screen->endSel.col, + mydata->buffer)); + mydata->format_select(w, mydata->format, mydata->buffer, + &(screen->startSel), + &(screen->endSel)); + + free(mydata->format); + free(mydata->buffer); + memset(mydata, 0, sizeof(*mydata)); } else { _WriteSelectionData(xw, (Char *) text_list[i], len); } @@ -3204,7 +3227,7 @@ char *search; int *indexed; - TRACE(("Select_REGEX:%s\n", NonNull(expr))); + TRACE(("Select_REGEX[%d]:%s\n", inx, NonNull(expr))); if (okPosition(screen, &ld, startc) && expr != 0) { if (regcomp(&preg, expr, REG_EXTENDED) == 0) { int firstRow = firstRowOfLine(screen, startc->row, True); @@ -3234,7 +3257,7 @@ int start_col = indexToCol(indexed, len, start_inx); int finis_col = indexToCol(indexed, len, finis_inx); - if (start_col <= actual && + if (start_col >= actual && actual < finis_col) { int test = finis_col - start_col; if (best_len < test) { @@ -4559,53 +4582,33 @@ } /* obtain the selection string, passing the endpoints to caller's parameters */ -static char * -getSelectionString(XtermWidget xw, - Widget w, - XEvent *event, - String *params, - Cardinal *num_params, - CELL *start, CELL *finish) +static void +doSelectionFormat(XtermWidget xw, + Widget w, + XEvent *event, + String *params, + Cardinal *num_params, + FormatSelect format_select) { TScreen *screen = TScreenOf(xw); -#if OPT_PASTE64 - int base64_paste = (int) screen->base64_paste; -#endif -#if OPT_READLINE - int paste_brackets = (int) SCREEN_FLAG(screen, paste_brackets); -#endif + InternalSelect *mydata = &(screen->internal_select); + + memset(mydata, 0, sizeof(*mydata)); + mydata->format = x_strdup(params[0]); + mydata->format_select = format_select; /* override flags so that SelectionReceived only updates a buffer */ #if OPT_PASTE64 + mydata->base64_paste = screen->base64_paste; screen->base64_paste = 0; #endif #if OPT_READLINE + mydata->paste_brackets = screen->paste_brackets; SCREEN_FLAG_unset(screen, paste_brackets); #endif screen->selectToBuffer = True; - screen->internal_select = 0; xtermGetSelection(w, getEventTime(event), params + 1, *num_params - 1, NULL); - screen->selectToBuffer = False; - - if (screen->internal_select != 0) { - TRACE(("getSelectionString %d:%s\n", - (int) strlen(screen->internal_select), - screen->internal_select)); - *start = screen->startSel; - *finish = screen->endSel; - } else { - memset(start, 0, sizeof(*start)); - memset(finish, 0, sizeof(*finish)); - } -#if OPT_PASTE64 - screen->base64_paste = (Cardinal) base64_paste; -#endif -#if OPT_READLINE - if (paste_brackets) - SCREEN_FLAG_set(screen, paste_brackets); -#endif - return screen->internal_select; } /* obtain data from the screen, passing the endpoints to caller's parameters */ @@ -4625,10 +4628,13 @@ int save_firstValidRow = screen->firstValidRow; int save_lastValidRow = screen->lastValidRow; + const Cardinal noClick = 0; + int save_numberOfClicks = screen->numberOfClicks; + SelectUnit saveUnits = screen->selectUnit; - SelectUnit saveMap = screen->selectMap[0]; + SelectUnit saveMap = screen->selectMap[noClick]; #if OPT_SELECT_REGEX - char *saveExpr = screen->selectExpr[0]; + char *saveExpr = screen->selectExpr[noClick]; #endif Char *save_selection_data = screen->selection_data; @@ -4643,13 +4649,15 @@ screen->selection_size = 0; screen->selection_length = 0; - lookupSelectUnit(xw, 0, method); - screen->selectUnit = screen->selectMap[0]; + screen->numberOfClicks = 1; + lookupSelectUnit(xw, noClick, method); + screen->selectUnit = screen->selectMap[noClick]; memset(start, 0, sizeof(*start)); start->row = screen->cur_row; start->col = screen->cur_col; - *finish = *start; + finish->row = screen->cur_row; + finish->col = screen->max_col; ComputeSelect(xw, start, finish, False); SaltTextAway(xw, &(screen->startSel), &(screen->endSel)); @@ -4676,10 +4684,11 @@ screen->firstValidRow = save_firstValidRow; screen->lastValidRow = save_lastValidRow; + screen->numberOfClicks = save_numberOfClicks; screen->selectUnit = saveUnits; - screen->selectMap[0] = saveMap; + screen->selectMap[noClick] = saveMap; #if OPT_SELECT_REGEX - screen->selectExpr[0] = saveExpr; + screen->selectExpr[noClick] = saveExpr; #endif screen->selection_data = save_selection_data; @@ -4974,35 +4983,39 @@ } } +static void +reallyExecFormatted(Widget w, char *format, char *data, CELL *start, CELL *finish) +{ + XtermWidget xw; + + if ((xw = getXtermWidget(w)) != 0) { + char **argv; + char *blob; + int argc; + + if ((argv = tokenizeFormat(format)) != 0) { + blob = argv[0]; + for (argc = 0; argv[argc] != 0; ++argc) { + argv[argc] = expandFormat(xw, argv[argc], data, start, finish); + } + executeCommand(argv); + freeArgv(blob, argv); + } + } +} + void HandleExecFormatted(Widget w, - XEvent *event GCC_UNUSED, + XEvent *event, String *params, /* selections */ Cardinal *num_params) { XtermWidget xw; - if ((xw = getXtermWidget(w)) != 0) { - TRACE(("HandleExecFormatted(%d)\n", *num_params)); - - if (*num_params > 1) { - CELL start, finish; - char *data; - char **argv; - char *blob; - int argc; - - data = getSelectionString(xw, w, event, params, num_params, - &start, &finish); - if ((argv = tokenizeFormat(params[0])) != 0) { - blob = argv[0]; - for (argc = 0; argv[argc] != 0; ++argc) { - argv[argc] = expandFormat(xw, argv[argc], data, &start, &finish); - } - executeCommand(argv); - freeArgv(blob, argv); - } - } + TRACE(("HandleExecFormatted(%d)\n", *num_params)); + if ((xw = getXtermWidget(w)) != 0 && + (*num_params > 1)) { + doSelectionFormat(xw, w, event, params, num_params, reallyExecFormatted); } } @@ -5041,32 +5054,34 @@ } } +static void +reallyInsertFormatted(Widget w, char *format, char *data, CELL *start, CELL *finish) +{ + XtermWidget xw; + + if ((xw = getXtermWidget(w)) != 0) { + char *exps; + + if ((exps = expandFormat(xw, format, data, start, finish)) != 0) { + unparseputs(xw, exps); + unparse_end(xw); + free(exps); + } + } +} + void HandleInsertFormatted(Widget w, - XEvent *event GCC_UNUSED, + XEvent *event, String *params, /* selections */ Cardinal *num_params) { XtermWidget xw; - if ((xw = getXtermWidget(w)) != 0) { - TRACE(("HandleInsertFormatted(%d)\n", *num_params)); - - if (*num_params > 1) { - CELL start, finish; - char *data; - char *temp = x_strdup(params[0]); - char *exps; - - data = getSelectionString(xw, w, event, params, num_params, - &start, &finish); - if ((exps = expandFormat(xw, temp, data, &start, &finish)) != 0) { - unparseputs(xw, exps); - free(exps); - } - free(data); - free(temp); - } + TRACE(("HandleInsertFormatted(%d)\n", *num_params)); + if ((xw = getXtermWidget(w)) != 0 && + (*num_params > 1)) { + doSelectionFormat(xw, w, event, params, num_params, reallyInsertFormatted); } } @@ -5092,6 +5107,7 @@ exps = expandFormat(xw, temp, data, &start, &finish); if (exps != 0) { unparseputs(xw, exps); + unparse_end(xw); free(exps); } free(data); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xterm-310/charproc.c new/xterm-311/charproc.c --- old/xterm-310/charproc.c 2014-07-13 00:49:54.000000000 +0200 +++ new/xterm-311/charproc.c 2014-09-16 01:39:44.000000000 +0200 @@ -1,4 +1,4 @@ -/* $XTermId: charproc.c,v 1.1367 2014/07/12 22:49:54 Steve.Wall Exp $ */ +/* $XTermId: charproc.c,v 1.1370 2014/09/15 23:39:44 tom Exp $ */ /* * Copyright 1999-2013,2014 by Thomas E. Dickey @@ -7972,8 +7972,8 @@ DefaultFontNames[fWide] = x_strdup(wnew->misc.default_font.f_w); DefaultFontNames[fWBold] = x_strdup(wnew->misc.default_font.f_wb); #endif - TScreenOf(wnew)->MenuFontName(fontMenu_fontescape) = NULL; - TScreenOf(wnew)->MenuFontName(fontMenu_fontsel) = NULL; + TScreenOf(wnew)->EscapeFontName() = NULL; + TScreenOf(wnew)->SelectFontName() = NULL; TScreenOf(wnew)->menu_font_number = fontMenu_default; init_Sres(screen.initial_font); @@ -9830,7 +9830,9 @@ } } } - if (T_COLOR(screen, TEXT_CURSOR) == xw->dft_foreground) { + if (T_COLOR(screen, TEXT_CURSOR) == (reversed + ? xw->dft_background + : xw->dft_foreground)) { setCgsBack(xw, currentWin, currentCgs, fg_pix); } setCgsFore(xw, currentWin, currentCgs, bg_pix); @@ -9906,7 +9908,9 @@ * Set up a new request. */ if (filled) { - if (T_COLOR(screen, TEXT_CURSOR) == xw->dft_foreground) { + if (T_COLOR(screen, TEXT_CURSOR) == (reversed + ? xw->dft_background + : xw->dft_foreground)) { setCgsBack(xw, currentWin, currentCgs, fg_pix); } setCgsFore(xw, currentWin, currentCgs, bg_pix); @@ -10764,7 +10768,7 @@ } else { Boolean failed = False; int oldFont = TScreenOf(xw)->menu_font_number; - String save = TScreenOf(xw)->MenuFontName(fontMenu_fontsel); + String save = TScreenOf(xw)->SelectFontName(); char *val; char *test = 0; char *used = 0; @@ -10794,14 +10798,14 @@ && used != 0 && !strchr(used, '\n') && (test = x_strdup(used)) != 0) { - TScreenOf(xw)->MenuFontName(fontMenu_fontsel) = test; + TScreenOf(xw)->SelectFontName() = test; if (!xtermLoadFont(term, xtermFontName(used), True, fontMenu_fontsel)) { failed = True; free(test); - TScreenOf(xw)->MenuFontName(fontMenu_fontsel) = save; + TScreenOf(xw)->SelectFontName() = save; } } else { failed = True; @@ -10830,7 +10834,7 @@ Atom target; if (!atom_name) - atom_name = (screen->mappedSelect + atom_name = ((screen->mappedSelect && atomCount) ? screen->mappedSelect[0] : "PRIMARY"); TRACE(("FindFontSelection(%s)\n", atom_name)); @@ -10850,10 +10854,10 @@ target = XmuInternAtom(XtDisplay(xw), *pAtom); if (justprobe) { - screen->MenuFontName(fontMenu_fontsel) = + screen->SelectFontName() = XGetSelectionOwner(XtDisplay(xw), target) ? _Font_Selected_ : 0; TRACE(("...selected fontname '%s'\n", - NonNull(screen->MenuFontName(fontMenu_fontsel)))); + NonNull(screen->SelectFontName()))); } else { XtGetSelectionValue((Widget) xw, target, XA_STRING, DoSetSelectedFont, NULL, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xterm-310/fontutils.c new/xterm-311/fontutils.c --- old/xterm-310/fontutils.c 2014-07-13 02:34:40.000000000 +0200 +++ new/xterm-311/fontutils.c 2014-09-04 01:58:53.000000000 +0200 @@ -1,4 +1,4 @@ -/* $XTermId: fontutils.c,v 1.440 2014/07/13 00:34:40 Ross.Combs Exp $ */ +/* $XTermId: fontutils.c,v 1.443 2014/09/03 23:58:53 tom Exp $ */ /* * Copyright 1998-2013,2014 by Thomas E. Dickey @@ -51,12 +51,6 @@ #include <stdio.h> #include <ctype.h> -#define ALLOC_STRING(name) \ - if (name != 0) \ - name = x_strdup(name) -#define FREE_STRING(name) \ - free_string(name) - #define SetFontWidth(screen,dst,src) (dst)->f_width = (src) #define SetFontHeight(screen,dst,src) (dst)->f_height = dimRound((screen)->scale_height * (float) (src)) @@ -126,12 +120,6 @@ char *end; } FontNameProperties; -static void -free_string(String value) -{ - free((void *) value); -} - #if OPT_RENDERFONT static void fillInFaceSize(XtermWidget, int); #endif @@ -1145,7 +1133,9 @@ &fnts[fNorm], warn[fNorm], (fontnum == fontMenu_default))) { - SetItemSensitivity(fontMenuEntries[fontnum].widget, False); + if (fontnum != fontMenu_fontsel) { + SetItemSensitivity(fontMenuEntries[fontnum].widget, False); + } goto bad; } @@ -1437,8 +1427,7 @@ FREE_STRING(screen->MenuFontName(fontnum)); screen->MenuFontName(fontnum) = tmpname; if (fontnum == fontMenu_fontescape) { - SetItemSensitivity(fontMenuEntries[fontMenu_fontescape].widget, - True); + update_font_escape(); } #if OPT_SHIFT_FONTS screen->menu_font_sizes[fontnum] = FontSize(fnts[fNorm].fs); @@ -1477,7 +1466,7 @@ free(tmpname); #if OPT_RENDERFONT - if (fontnum == fontMenu_fontsel) { + if ((fontnum == fontMenu_fontsel) && (fontnum != screen->menu_font_number)) { int old_fontnum = screen->menu_font_number; #if OPT_TOOLBAR SetItemSensitivity(fontMenuEntries[fontnum].widget, True); @@ -1492,8 +1481,10 @@ TRACE(("...recovering for TrueType fonts\n")); code = xtermLoadFont(xw, &myfonts, doresize, fontnum); if (code) { - SetItemSensitivity(fontMenuEntries[fontnum].widget, - UsingRenderFont(xw)); + if (fontnum != fontMenu_fontsel) { + SetItemSensitivity(fontMenuEntries[fontnum].widget, + UsingRenderFont(xw)); + } TRACE(("...recovered size %dx%d\n", FontHeight(screen), FontWidth(screen))); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xterm-310/graphics_regis.c new/xterm-311/graphics_regis.c --- old/xterm-310/graphics_regis.c 2014-07-13 11:10:24.000000000 +0200 +++ new/xterm-311/graphics_regis.c 2014-09-17 10:35:49.000000000 +0200 @@ -1,4 +1,4 @@ -/* $XTermId: graphics_regis.c,v 1.42 2014/07/13 09:10:24 tom Exp $ */ +/* $XTermId: graphics_regis.c,v 1.44 2014/09/17 08:35:49 tom Exp $ */ /* * Copyright 2014 by Ross Combs @@ -188,7 +188,7 @@ unsigned load_alphabet; unsigned load_w, load_h; unsigned load_index; - char load_glyph; + unsigned load_glyph; unsigned load_row; /* text options */ int string_rot_set; /* flag to distinguish string vs. character rotation */ @@ -3729,7 +3729,7 @@ state->load_w = 8U; state->load_h = 10U; state->load_alphabet = 1U; - state->load_glyph = '\0'; + state->load_glyph = (unsigned) (unsigned char) '\0'; state->load_row = 0U; break; case 'P': @@ -4777,10 +4777,14 @@ (RegisterNum) register_num, r, g, b); continue; - } + } { + char skip; - TRACE(("DATA_ERROR: ignoring unexpected character in ReGIS screen color register mapping value \"%c\"\n", - pop_fragment(&optionarg))); + skip = pop_fragment(&optionarg); + (void) skip; /* variable needed only if tracing */ + TRACE(("DATA_ERROR: ignoring unexpected character in ReGIS screen color register mapping value \"%c\"\n", + skip)); + } return 1; } } @@ -5050,8 +5054,12 @@ } TRACE(("size multiplier: %s\n", fragment_to_tempstr(&sizemultiplierarg))); - load_regis_extent(fragment_to_tempstr(&sizemultiplierarg), - 0, 0, &ww, &hh); + if (!load_regis_extent(fragment_to_tempstr(&sizemultiplierarg), + 0, 0, &ww, &hh)) { + TRACE(("DATA_ERROR: unable to parse extent in '%c' command: \"%s\"\n", + state->option, fragment_to_tempstr(&sizemultiplierarg))); + break; + } if (!regis_num_to_int(&sizemultiplierarg, &sizemultiplier)) { TRACE(("DATA_ERROR: unable to parse extent in size multiplier option: \"%s\"\n", fragment_to_tempstr(&sizemultiplierarg))); @@ -5195,8 +5203,12 @@ } TRACE(("unitsize cell size: %s\n", fragment_to_tempstr(&unitsizearg))); - load_regis_extent(fragment_to_tempstr(&unitsizearg), 0, 0, - &unit_w, &unit_h); + if (!load_regis_extent(fragment_to_tempstr(&unitsizearg), 0, 0, + &unit_w, &unit_h)) { + TRACE(("DATA_ERROR: unable to parse extent in '%c' command: \"%s\"\n", + state->option, fragment_to_tempstr(&unitsizearg))); + break; + } if (!regis_num_to_int(&unitsizearg, &unitsize)) { TRACE(("DATA_ERROR: unable to parse extent in text unit cell size option: \"%s\"\n", fragment_to_tempstr(&unitsizearg))); @@ -5690,8 +5702,9 @@ if (extract_regis_string(input, state->temp, state->templen)) { switch (state->command) { case 'l': + /* FIXME: confirm that extra characters are ignored */ TRACE(("found character to load: \"%s\"\n", state->temp)); - state->load_glyph = state->temp[0]; /* FIXME: proper conversion */ + state->load_glyph = (unsigned) (unsigned char) state->temp[0]; state->load_row = 0U; break; case 't': @@ -5744,11 +5757,11 @@ unsigned glyph_size; val = strtoul(state->temp, NULL, 16); - TRACE(("found row %u for glyph \"%c\": \"%s\" value %02lx (%lu)\n", + TRACE(("found row %u for glyph %u: \"%s\" value %02lx (%lu)\n", state->load_row, state->load_glyph, state->temp, val, val)); if (state->load_row >= state->load_h) { - TRACE(("DATA_ERROR: ignoring extra glyph row for \"%c\"\n", + TRACE(("DATA_ERROR: ignoring extra row for glyph %u\n", state->load_glyph)); return 0; } @@ -5777,7 +5790,7 @@ unsigned unused_bits; glyph = &context->alphabets[state->load_index] - .bytes[(unsigned) state->load_glyph * glyph_size]; + .bytes[state->load_glyph * glyph_size]; bytew = GLYPH_WIDTH_BYTES(context->alphabets[state->load_index] .pixw); unused_bits = 8U - (context->alphabets[state->load_index].pixw @@ -5798,9 +5811,9 @@ state->load_row++; context->alphabets[state->load_index] - .loaded[(unsigned) state->load_glyph] = 1; + .loaded[state->load_glyph] = 1; #ifdef DEBUG_LOAD - TRACE(("marking alphabet %u at index %u glyph '%c' as loaded\n", + TRACE(("marking alphabet %u at index %u glyph %u as loaded\n", state->load_alphabet, state->load_index, state->load_glyph)); #endif @@ -5893,8 +5906,14 @@ continue; if (state->input.pos >= state->input.len) break; - TRACE(("DATA_ERROR: skipping unknown token in optionset: \"%c\"\n", - pop_fragment(&state->input))); + { + char skip; + + skip = pop_fragment(&state->input); + (void) skip; /* variable needed only if tracing */ + TRACE(("DATA_ERROR: skipping unexpected character in optionset: \"%c\"\n", + skip)); + } /* FIXME: suboptions */ } state->option = '_'; @@ -5929,8 +5948,14 @@ } if (state->input.pos >= state->input.len) return 0; - TRACE(("DATA_ERROR: skipping unknown token at top level: \"%c\"\n", - pop_fragment(&state->input))); + + { + char skip; + + skip = pop_fragment(&state->input); + (void) skip; /* variable needed only if tracing */ + TRACE(("DATA_ERROR: skipping unexpected character at top level: \"%c\"\n", ch)); + } return 0; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xterm-310/menu.c new/xterm-311/menu.c --- old/xterm-310/menu.c 2014-07-13 00:50:28.000000000 +0200 +++ new/xterm-311/menu.c 2014-09-04 01:35:52.000000000 +0200 @@ -1,4 +1,4 @@ -/* $XTermId: menu.c,v 1.326 2014/07/12 22:50:28 Steve.Wall Exp $ */ +/* $XTermId: menu.c,v 1.327 2014/09/03 23:35:52 tom Exp $ */ /* * Copyright 1999-2013,2014 by Thomas E. Dickey @@ -822,10 +822,7 @@ if (IsEmpty(screen->menu_font_names[n][fNorm])) SetItemSensitivity(fontMenuEntries[n].widget, False); } - SetItemSensitivity( - fontMenuEntries[fontMenu_fontescape].widget, - (screen->menu_font_names[fontMenu_fontescape][fNorm] - ? True : False)); + update_font_escape(); update_menu_allowBoldFonts(); #if OPT_BOX_CHARS update_font_boxchars(); @@ -872,10 +869,10 @@ SetItemSensitivity(fontMenuEntries[fontMenu_fontsel].widget, True); #else FindFontSelection(xw, NULL, True); - SetItemSensitivity( - fontMenuEntries[fontMenu_fontsel].widget, - (screen->menu_font_names[fontMenu_fontsel][fNorm] - ? True : False)); + SetItemSensitivity(fontMenuEntries[fontMenu_fontsel].widget, + (screen->SelectFontName() + ? True + : False)); #endif break; @@ -2633,6 +2630,19 @@ HANDLE_VT_TOGGLE(allowBoldFonts); } +#if OPT_LOAD_VTFONTS +void +update_font_escape(void) +{ + TScreen *screen = TScreenOf(term); + + SetItemSensitivity(fontMenuEntries[fontMenu_fontescape].widget, + ((screen->allowFontOps && + screen->EscapeFontName()) + ? True : False)); +} +#endif + #if OPT_DEC_CHRSET void HandleFontDoublesize(Widget w, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xterm-310/menu.h new/xterm-311/menu.h --- old/xterm-310/menu.h 2014-04-12 02:03:12.000000000 +0200 +++ new/xterm-311/menu.h 2014-09-04 02:17:55.000000000 +0200 @@ -1,4 +1,4 @@ -/* $XTermId: menu.h,v 1.133 2014/04/12 00:03:12 Ross.Combs Exp $ */ +/* $XTermId: menu.h,v 1.135 2014/09/04 00:17:55 tom Exp $ */ /* * Copyright 1999-2013,2014 by Thomas E. Dickey @@ -452,6 +452,12 @@ #define update_marginbell() /* nothing */ +#if OPT_LOAD_VTFONTS +extern void update_font_escape(void); +#else +#define update_font_escape() /* nothing */ +#endif + #if OPT_ALLOW_XXX_OPS extern void update_menu_allowColorOps(void); extern void update_menu_allowFontOps(void); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xterm-310/misc.c new/xterm-311/misc.c --- old/xterm-310/misc.c 2014-05-26 16:45:58.000000000 +0200 +++ new/xterm-311/misc.c 2014-09-04 01:59:25.000000000 +0200 @@ -1,4 +1,4 @@ -/* $XTermId: misc.c,v 1.712 2014/05/26 14:45:58 tom Exp $ */ +/* $XTermId: misc.c,v 1.714 2014/09/03 23:59:25 tom Exp $ */ /* * Copyright 1999-2013,2014 by Thomas E. Dickey @@ -3412,6 +3412,10 @@ num = screen->menu_font_number; } name = x_strtrim(buf); + if (screen->EscapeFontName()) { + FREE_STRING(screen->EscapeFontName()); + screen->EscapeFontName() = 0; + } if (success && !IsEmpty(name)) { #if OPT_RENDERFONT if (UsingRenderFont(xw)) { @@ -3423,10 +3427,15 @@ memset(&fonts, 0, sizeof(fonts)); fonts.f_n = name; SetVTFont(xw, num, True, &fonts); + if (num == screen->menu_font_number && + num != fontMenu_fontescape) { + screen->EscapeFontName() = x_strdup(name); + } } } else { Bell(xw, XkbBI_MinorError, 0); } + update_font_escape(); free(name); } } @@ -3528,6 +3537,7 @@ * a special case. */ switch (mode) { + case 50: #if OPT_ISO_COLORS case OSC_Reset(4): case OSC_Reset(5): @@ -6044,3 +6054,9 @@ screen->embed_wide = (Dimension) attrs.width; } } + +void +free_string(String value) +{ + free((void *) value); +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xterm-310/package/debian/changelog new/xterm-311/package/debian/changelog --- old/xterm-310/package/debian/changelog 2014-07-15 01:36:58.000000000 +0200 +++ new/xterm-311/package/debian/changelog 2014-07-28 23:36:30.000000000 +0200 @@ -1,3 +1,9 @@ +xterm-dev (311) unstable; urgency=low + + * maintenance updates + + -- Thomas E. Dickey <dic...@invisible-island.net> Mon, 28 Jul 2014 17:36:30 -0400 + xterm-dev (310) unstable; urgency=low * maintenance updates diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xterm-310/package/freebsd/Makefile new/xterm-311/package/freebsd/Makefile --- old/xterm-310/package/freebsd/Makefile 2014-07-26 01:40:38.000000000 +0200 +++ new/xterm-311/package/freebsd/Makefile 2014-07-28 23:36:30.000000000 +0200 @@ -5,7 +5,7 @@ # and "make makesum". PORTNAME= xterm -PORTVERSION= 310 +PORTVERSION= 311 CATEGORIES= x11 MASTER_SITES= ftp://invisible-island.net/xterm/ \ CRITICAL diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xterm-310/package/xterm.spec new/xterm-311/package/xterm.spec --- old/xterm-310/package/xterm.spec 2014-07-15 01:36:58.000000000 +0200 +++ new/xterm-311/package/xterm.spec 2014-07-28 23:36:30.000000000 +0200 @@ -1,11 +1,11 @@ -# $XTermId: xterm.spec,v 1.75 2014/07/14 23:36:58 tom Exp $ +# $XTermId: xterm.spec,v 1.76 2014/07/28 21:36:30 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: 310 +Version: 311 Release: 1 License: X11 Group: User Interface/X diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xterm-310/ptyx.h new/xterm-311/ptyx.h --- old/xterm-310/ptyx.h 2014-06-13 02:53:35.000000000 +0200 +++ new/xterm-311/ptyx.h 2014-09-17 10:24:34.000000000 +0200 @@ -1,4 +1,4 @@ -/* $XTermId: ptyx.h,v 1.809 2014/06/13 00:53:35 tom Exp $ */ +/* $XTermId: ptyx.h,v 1.813 2014/09/17 08:24:34 tom Exp $ */ /* * Copyright 1999-2013,2014 by Thomas E. Dickey @@ -910,6 +910,23 @@ } TermColors; /* + * Definitions for exec-formatted and insert-formatted actions. + */ +typedef void (*FormatSelect) (Widget, char *, char *, CELL *, CELL *); + +typedef struct { + char *format; + char *buffer; + FormatSelect format_select; +#if OPT_PASTE64 + Cardinal base64_paste; +#endif +#if OPT_READLINE + unsigned paste_brackets; +#endif +} InternalSelect; + +/* * Constants for titleModes resource */ typedef enum { @@ -2294,7 +2311,7 @@ int lastValidRow; /* " " */ Boolean selectToBuffer; /* copy selection to buffer */ - char * internal_select; + InternalSelect internal_select; String default_string; String eightbit_select_types; @@ -2328,6 +2345,8 @@ String initial_font; String menu_font_names[NMENUFONTS][fMAX]; #define MenuFontName(n) menu_font_names[n][fNorm] +#define EscapeFontName() MenuFontName(fontMenu_fontescape) +#define SelectFontName() MenuFontName(fontMenu_fontsel) long menu_font_sizes[NMENUFONTS]; int menu_font_number; #if OPT_LOAD_VTFONTS || OPT_WIDE_CHARS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xterm-310/screen.c new/xterm-311/screen.c --- old/xterm-310/screen.c 2014-06-19 23:09:11.000000000 +0200 +++ new/xterm-311/screen.c 2014-07-30 10:06:23.000000000 +0200 @@ -1,4 +1,4 @@ -/* $XTermId: screen.c,v 1.500 2014/06/19 21:09:11 tom Exp $ */ +/* $XTermId: screen.c,v 1.501 2014/07/30 08:06:23 tom Exp $ */ /* * Copyright 1999-2013,2014 by Thomas E. Dickey @@ -1254,8 +1254,8 @@ if (col < first || col > last) { TRACE(("ScrnInsertChar - col %d outside [%d..%d]\n", col, first, last)); return; - } else if (last <= (col + (int) n)) { - n = (unsigned) (last - col); + } else if (last < (col + (int) n)) { + n = (unsigned) (last + 1 - col); } assert(screen->cur_col >= 0); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xterm-310/version.h new/xterm-311/version.h --- old/xterm-310/version.h 2014-07-26 02:04:51.000000000 +0200 +++ new/xterm-311/version.h 2014-09-18 23:12:19.000000000 +0200 @@ -1,4 +1,4 @@ -/* $XTermId: version.h,v 1.395 2014/07/26 00:04:51 tom Exp $ */ +/* $XTermId: version.h,v 1.397 2014/09/18 21:12:19 tom Exp $ */ /* * Copyright 1998-2013,2014 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 310 -#define XTERM_DATE 2014-07-25 +#define XTERM_PATCH 311 +#define XTERM_DATE 2014-09-18 #ifndef __vendorversion__ #define __vendorversion__ "XTerm" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xterm-310/xterm.h new/xterm-311/xterm.h --- old/xterm-310/xterm.h 2014-07-25 00:47:09.000000000 +0200 +++ new/xterm-311/xterm.h 2014-09-04 01:58:49.000000000 +0200 @@ -1,4 +1,4 @@ -/* $XTermId: xterm.h,v 1.745 2014/07/24 22:47:09 tom Exp $ */ +/* $XTermId: xterm.h,v 1.746 2014/09/03 23:58:49 tom Exp $ */ /* * Copyright 1999-2013,2014 by Thomas E. Dickey @@ -367,6 +367,12 @@ #define Maybe 2 +#define ALLOC_STRING(name) \ + if (name != 0) \ + name = x_strdup(name) +#define FREE_STRING(name) \ + free_string(name) + /***====================================================================***/ #define XtNallowBoldFonts "allowBoldFonts" @@ -1066,6 +1072,7 @@ extern void do_xevents (void); extern void end_tek_mode (void); extern void end_vt_mode (void); +extern void free_string(String value); extern void hide_tek_window (void); extern void hide_vt_window (void); extern void ice_error (IceConn /* iceConn */); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xterm-310/xterm.log.html new/xterm-311/xterm.log.html --- old/xterm-310/xterm.log.html 2014-07-26 02:05:11.000000000 +0200 +++ new/xterm-311/xterm.log.html 2014-09-18 23:11:45.000000000 +0200 @@ -30,7 +30,7 @@ * sale, use or other dealings in this Software without prior written * * authorization. * ***************************************************************************** - $XTermId: xterm.log.html,v 1.1511 2014/07/26 00:05:11 tom Exp $ + $XTermId: xterm.log.html,v 1.1522 2014/09/18 21:11:45 tom Exp $ --> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> @@ -72,6 +72,8 @@ CHANGELOG</a>).</p> <ul> + <li><a href="#xterm_311">Patch #311 - 2014/09/18</a></li> + <li><a href="#xterm_310">Patch #310 - 2014/07/25</a></li> <li><a href="#xterm_309">Patch #309 - 2014/07/13</a></li> @@ -905,6 +907,48 @@ <li><a href="#xterm_01">Patch #1 - 1996/1/6</a></li> </ul> + <h1><a name="xterm_311" id="xterm_311">Patch #311 - + 2014/09/18</a></h1> + + <ul> + <li>mention <code>xclip</code> in manpage as an alternative + workaround for copying clipboard data, noting that + <code>selectToClipboard</code> (from <a href="#xterm_209">patch + #209</a>) is the recommended approach (Debian #639094).</li> + + <li>correct comparison in do_select_regex() of working position + against starting column.</li> + + <li>correct initialization for regular-expression feature of + <code>exec-selectable</code> and <code>insert-selectable</code> + actions (Debian #758633).</li> + + <li>modify logic for <code>exec-formatted</code> and + <code>insert-formatted</code> actions to ensure that the + formatting occurs just after the selection is received (Debian + #758633).</li> + + <li>account for state of reverse-video in special case of + cursor coloring (Debian #759734).</li> + + <li>fix a sign-extension problem in ReGIS support, as well as + correcting a case where ignored-characters were not really + ignored (patch by Ross Combs).</li> + + <li>Enable the "Escape Sequence" menu entry when an OSC 50 + is received. Also disable it if the escape sequence specifies + no font (Debian #760208).</li> + + <li>improve fix for the <code>fontsel</code> menu entry from + <a href="#xterm_304">patch #304</a>: because the recovery used + the "current font", it would fail if one first selected a valid + font, then an invalid font (Debian #760207).</li> + + <li>correct an off-by-one in limit-check for + <code>ScrnLimitChar</code> function (report by Egmont + Koblinger).</li> + </ul> + <h1><a name="xterm_310" id="xterm_310">Patch #310 - 2014/07/25</a></h1> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xterm-310/xterm.man new/xterm-311/xterm.man --- old/xterm-310/xterm.man 2014-04-14 20:42:54.000000000 +0200 +++ new/xterm-311/xterm.man 2014-09-18 10:35:37.000000000 +0200 @@ -1,5 +1,5 @@ '\" t -.\" $XTermId: xterm.man,v 1.581 2014/04/14 18:42:54 Ross.Combs Exp $ +.\" $XTermId: xterm.man,v 1.582 2014/09/18 08:35:37 tom Exp $ .\" .\" Copyright 1996-2013,2014 by Thomas E. Dickey .\" @@ -4623,6 +4623,24 @@ the problem with persistence of ownership is bypassed. Otherwise, there is no difference regarding the data which can be passed via selection. +.PP +The PRIMARY token is a standard X feature, documented in the ICCCM +(\fIInter-Client Communication Conventions Manual\fR), +which states +.RS +.PP +The selection named by the atom PRIMARY is used for all commands that take only a single argument and is the principal means of communication between clients that use the selection mechanism. +.RE +.PP +However, many applications use CLIPBOARD in imitation of other windowing +systems. +The \fBselectToClipboard\fP resource (and corresponding menu entry +\fISelect to Clipboard\fP) introduce the SELECT token (known only +to \fI\*n\fP) which chooses between the PRIMARY and CLIPBOARD tokens. +.PP +Without using this feature, one can use workarounds such as the +\fIxclip\fP program to show the contents of the X clipboard within an +\fI\*n\fP window. . .SS SELECTION TARGETS The different types of data which are passed depend on what the receiving -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org