Permalink
Browse files

snapshot of project "xterm", label xterm-304d

  • Loading branch information...
ThomasDickey committed May 11, 2014
1 parent 2079a73 commit 2fd29cb98d214cb536bcafbee00bc73b3f1eeb9d
Showing with 124 additions and 68 deletions.
  1. +1 −1 MANIFEST
  2. +18 −20 charproc.c
  3. +1 −2 package/xterm.spec
  4. +10 −10 print.c
  5. +13 −2 ptyx.h
  6. +3 −3 screen.c
  7. +7 −7 scrollback.c
  8. +6 −3 terminfo
  9. +2 −2 testxmc.c
  10. +63 −18 util.c
@@ -1,4 +1,4 @@
MANIFEST for xterm, version xterm-304c
MANIFEST for xterm, version xterm-304d
--------------------------------------------------------------------------------
MANIFEST this file
256colres.h resource-definitions for 256-color mode
@@ -1,4 +1,4 @@
/* $XTermId: charproc.c,v 1.1335 2014/05/08 08:29:02 tom Exp $ */
/* $XTermId: charproc.c,v 1.1339 2014/05/11 16:14:50 tom Exp $ */
/*
* Copyright 1999-2013,2014 by Thomas E. Dickey
@@ -907,14 +907,14 @@ CheckBogusForeground(TScreen *screen, const char *tag)
LineData *ld = getLineData(screen, row)->;
if (ld != 0) {
Char *attribs = ld->attribs;
IAttr *attribs = ld->attribs;
col = (row == screen->cur_row) ? screen->cur_col : 0;
for (; isClear && (col <= screen->max_col); ++col) {
unsigned flags = attribs[col];
if (pass) {
flags &= ~FG_COLOR;
attribs[col] = (Char) flags;
attribs[col] = (IAttr) flags;
} else if ((flags & BG_COLOR)) {
isClear = False;
} else if ((flags & FG_COLOR)) {
@@ -2803,41 +2803,44 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp)
case DEFAULT:
case 0:
UIntClr(xw->flags,
(INVERSE | BOLD | BLINK | UNDERLINE | INVISIBLE));
(SGR_MASK | SGR_MASK2 | INVISIBLE));
if_OPT_ISO_COLORS(screen, {
reset_SGR_Colors(xw);
});
break;
case 1: /* Bold */
xw->flags |= BOLD;
UIntSet(xw->flags, BOLD);
if_OPT_ISO_COLORS(screen, {
setExtendedFG(xw);
});
break;
case 5: /* Blink */
xw->flags |= BLINK;
UIntSet(xw->flags, BLINK);
StartBlinking(screen);
if_OPT_ISO_COLORS(screen, {
setExtendedFG(xw);
});
break;
case 4: /* Underscore */
xw->flags |= UNDERLINE;
UIntSet(xw->flags, UNDERLINE);
if_OPT_ISO_COLORS(screen, {
setExtendedFG(xw);
});
break;
case 7:
xw->flags |= INVERSE;
UIntSet(xw->flags, INVERSE);
if_OPT_ISO_COLORS(screen, {
setExtendedBG(xw);
});
break;
case 8:
xw->flags |= INVISIBLE;
UIntSet(xw->flags, INVISIBLE);
break;
case 22: /* reset 'bold' */
UIntClr(xw->flags, BOLD);
#if OPT_WIDE_ATTRS
UIntClr(xw->flags, ATR_FAINT);
#endif
if_OPT_ISO_COLORS(screen, {
setExtendedFG(xw);
});
@@ -2956,27 +2959,22 @@ doparsing(XtermWidget xw, unsigned c, struct ParseState *sp)
break;
#if OPT_WIDE_ATTRS
case 2: /* faint, decreased intensity or second colour */
TRACE(("FIXME - not implemented\n"));
UIntSet(xw->flags, ATR_FAINT);
break;
case 3: /* italicized */
TRACE(("FIXME - not implemented\n"));
UIntSet(xw->flags, ATR_ITALIC);
break;
case 9: /* crossed-out characters */
TRACE(("FIXME - not implemented\n"));
UIntSet(xw->flags, ATR_STRIKEOUT);
break;
case 21: /* doubly-underlined */
TRACE(("FIXME - not implemented\n"));
UIntSet(xw->flags, ATR_DBL_UNDER);
break;
#if 0
case 22: /* normal colour or normal intensity (neither bold nor faint) */
TRACE(("FIXME - not implemented\n"));
break;
#endif
case 23: /* not italicized */
TRACE(("FIXME - not implemented\n"));
UIntClr(xw->flags, ATR_ITALIC);
break;
case 29: /* not crossed out */
TRACE(("FIXME - not implemented\n"));
UIntClr(xw->flags, ATR_STRIKEOUT);
break;
#endif
}
@@ -1,4 +1,4 @@
# $XTermId: xterm.spec,v 1.68 2014/05/05 18:51:42 tom Exp $
# $XTermId: xterm.spec,v 1.69 2014/05/10 13:31:26 tom Exp $
Summary: X terminal emulator (development version)
%global my_middle xterm
%global my_suffix -dev
@@ -137,7 +137,6 @@ CPPFLAGS="-DMISC_EXP -DEXP_HTTP_HEADERS" \
--with-utempter \
--with-icon-name=mini.xterm \
--with-xpm
copy config.status /tmp/
make
chmod u+w XTerm.ad
20 print.c
@@ -1,7 +1,7 @@
/* $XTermId: print.c,v 1.150 2013/05/27 00:55:47 tom Exp $ */
/* $XTermId: print.c,v 1.151 2014/05/11 10:55:11 tom Exp $ */
/*
* Copyright 1997-2012,2013 by Thomas E. Dickey
* Copyright 1997-2013,2014 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -124,12 +124,12 @@ printCursorLine(XtermWidget xw)
* characters that xterm would allow as a selection (which may include blanks).
*/
static void
printLine(XtermWidget xw, int row, unsigned chr, PrinterFlags * p)
printLine(XtermWidget xw, int row, unsigned chr, PrinterFlags *p)
{
TScreen *screen = TScreenOf(xw);
int inx = ROW2INX(screen, row);
LineData *ld;
Char attr = 0;
IAttr attr = 0;
unsigned ch;
int last = MaxCols(screen);
int col;
@@ -180,7 +180,7 @@ printLine(XtermWidget xw, int row, unsigned chr, PrinterFlags * p)
#endif
)
&& ch) {
attr = CharOf(ld->attribs[col] & SGR_MASK);
attr = ld->attribs[col] & SGR_MASK;
#if OPT_PRINT_COLORS
last_fg = fg;
last_bg = bg;
@@ -252,7 +252,7 @@ printLine(XtermWidget xw, int row, unsigned chr, PrinterFlags * p)
#define PrintNewLine() (unsigned) (((top < bot) || p->printer_newline) ? '\n' : '\0')
static void
printLines(XtermWidget xw, int top, int bot, PrinterFlags * p)
printLines(XtermWidget xw, int top, int bot, PrinterFlags *p)
{
TRACE(("printLines, rows %d..%d\n", top, bot));
while (top <= bot) {
@@ -262,7 +262,7 @@ printLines(XtermWidget xw, int top, int bot, PrinterFlags * p)
}
void
xtermPrintScreen(XtermWidget xw, Bool use_DECPEX, PrinterFlags * p)
xtermPrintScreen(XtermWidget xw, Bool use_DECPEX, PrinterFlags *p)
{
if (XtIsRealized((Widget) xw)) {
TScreen *screen = TScreenOf(xw);
@@ -297,7 +297,7 @@ xtermPrintScreen(XtermWidget xw, Bool use_DECPEX, PrinterFlags * p)
* 8 = saved lines
*/
void
xtermPrintEverything(XtermWidget xw, PrinterFlags * p)
xtermPrintEverything(XtermWidget xw, PrinterFlags *p)
{
TScreen *screen = TScreenOf(xw);
Boolean was_open = SPS.isOpen;
@@ -344,7 +344,7 @@ xtermPrintEverything(XtermWidget xw, PrinterFlags * p)
}
static void
send_CharSet(XtermWidget xw, LineData * ld)
send_CharSet(XtermWidget xw, LineData *ld)
{
#if OPT_DEC_CHRSET
const char *msg = 0;
@@ -726,7 +726,7 @@ setPrinterControlMode(XtermWidget xw, int mode)
}
PrinterFlags *
getPrinterFlags(XtermWidget xw, String * params, Cardinal *param_count)
getPrinterFlags(XtermWidget xw, String *params, Cardinal *param_count)
{
/* *INDENT-OFF* */
static const struct {
15 ptyx.h
@@ -1,4 +1,4 @@
/* $XTermId: ptyx.h,v 1.806 2014/05/08 20:31:34 tom Exp $ */
/* $XTermId: ptyx.h,v 1.807 2014/05/09 08:01:03 tom Exp $ */
/*
* Copyright 1999-2013,2014 by Thomas E. Dickey
@@ -2766,6 +2766,17 @@ typedef struct _TekWidgetRec {
the screen. Used to distinguish
blanks from empty parts of the
screen when selecting */
#if OPT_WIDE_ATTRS
#define ATR_FAINT AttrBIT(8)
#define ATR_ITALIC AttrBIT(9)
#define ATR_STRIKEOUT AttrBIT(10)
#define ATR_DBL_UNDER AttrBIT(11)
#define SGR_MASK2 (ATR_FAINT | ATR_ITALIC | ATR_STRIKEOUT | ATR_DBL_UNDER)
#else
#define SGR_MASK2 0
#endif
/*
* Other flags
*/
@@ -2801,7 +2812,7 @@ typedef struct _TekWidgetRec {
#define SGR_MASK (BOLD | BLINK | UNDERLINE | INVERSE)
/* mask: user-visible attributes */
#define ATTRIBUTES (SGR_MASK | BG_COLOR | FG_COLOR | INVISIBLE | PROTECTED)
#define ATTRIBUTES (SGR_MASK | SGR_MASK2 | BG_COLOR | FG_COLOR | INVISIBLE | PROTECTED)
/* The toplevel-call to drawXtermText() should have text-attributes guarded: */
#define DRAWX_MASK (ATTRIBUTES | CHARDRAWN)
@@ -1,4 +1,4 @@
/* $XTermId: screen.c,v 1.493 2014/05/08 23:55:19 tom Exp $ */
/* $XTermId: screen.c,v 1.495 2014/05/11 14:06:18 tom Exp $ */
/*
* Copyright 1999-2013,2014 by Thomas E. Dickey
@@ -2394,7 +2394,7 @@ ScrnFillRectangle(XtermWidget xw,
UIntClr(temp, (FG_COLOR | BG_COLOR));
}
temp = attrs | (temp & (FG_COLOR | BG_COLOR)) | CHARDRAWN;
ld->attribs[col] = (Char) temp;
ld->attribs[col] = (IAttr) temp;
#if OPT_ISO_COLORS
if (attrs & (FG_COLOR | BG_COLOR)) {
if_OPT_ISO_COLORS(screen, {
@@ -2629,7 +2629,7 @@ ScrnMarkRectangle(XtermWidget xw,
TRACE(("first mask-change is %#x\n",
ld->attribs[col] ^ flags));
#endif
ld->attribs[col] = (Char) flags;
ld->attribs[col] = (IAttr) flags;
}
}
ScrnRefresh(xw,
@@ -1,7 +1,7 @@
/* $XTermId: scrollback.c,v 1.16 2013/04/23 09:57:05 Bertram.Felgenhauer Exp $ */
/* $XTermId: scrollback.c,v 1.17 2014/05/11 14:08:11 tom Exp $ */
/*
* Copyright 2009-2011,2013 by Thomas E. Dickey
* Copyright 2009-2013,2014 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -42,7 +42,7 @@
* So we just count backwards from the last saved line.
*/
LineData *
getScrollback(TScreen * screen, int row)
getScrollback(TScreen *screen, int row)
{
LineData *result = 0;
@@ -62,7 +62,7 @@ getScrollback(TScreen * screen, int row)
* Allocate a new row in the scrollback FIFO, returning a pointer to it.
*/
LineData *
addScrollback(TScreen * screen)
addScrollback(TScreen *screen)
{
ScrnBuf where = 0;
unsigned which;
@@ -85,7 +85,7 @@ addScrollback(TScreen * screen)
*/
if (prior->attribs != 0) {
TRACE(("...freeing prior FIFO data in slot %d: %p->%p\n",
which, (void *) prior, prior->attribs));
which, (void *) prior, (void *) prior->attribs));
free(prior->attribs);
prior->attribs = 0;
}
@@ -109,7 +109,7 @@ addScrollback(TScreen * screen)
}
void
deleteScrollback(TScreen * screen)
deleteScrollback(TScreen *screen)
{
unsigned which = ROW2FIFO(screen, -1);
ScrnBuf where = scrnHeadAddr(screen, screen->saveBuf_index, which);
@@ -120,7 +120,7 @@ deleteScrollback(TScreen * screen)
*/
if (prior->attribs != 0) {
TRACE(("...freeing prior FIFO data in slot %d: %p->%p\n",
which, (void *) prior, prior->attribs));
which, (void *) prior, (void *) prior->attribs));
free(prior->attribs);
prior->attribs = 0;
}
@@ -1,10 +1,10 @@
# $XTermId: terminfo,v 1.161 2012/09/05 00:24:08 tom Exp $
# $XTermId: terminfo,v 1.162 2014/05/11 15:16:38 tom Exp $
#
# Updates/notes/new entries (e.g., xterm-8bit, xterm-16color, xterm-256color)
# - Thomas E. Dickey
#
#------------------------------------------------------------------------------
# Copyright 1996-2011,2012 by Thomas E. Dickey
# Copyright 1996-2012,2014 by Thomas E. Dickey
#
# All Rights Reserved
#
@@ -921,6 +921,7 @@ xterm-basic|modern xterm terminal emulator - common,
cvvis=\E[?12;25h,
dch=\E[%p1%dP,
dch1=\E[P,
dim=\E[2m,
dl=\E[%p1%dM,
dl1=\E[M,
ech=\E[%p1%dX,
@@ -948,6 +949,7 @@ xterm-basic|modern xterm terminal emulator - common,
rc=\E8,
rev=\E[7m,
ri=\EM,
ritm=\E[23m,
rmacs=\E(B,
rmam=\E[?7l,
rmcup=\E[?1049l,
@@ -963,8 +965,9 @@ xterm-basic|modern xterm terminal emulator - common,
setaf=\E[3%p1%dm,
setb=\E[4%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m,
setf=\E[3%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m,
sgr=%?%p9%t\E(0%e\E(B%;\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m,
sgr=%?%p9%t\E(0%e\E(B%;\E[0%?%p6%t;1%;%?%p5%t;2%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m,
sgr0=\E(B\E[m,
sitm=\E[3m,
smacs=\E(0,
smam=\E[?7h,
smcup=\E[?1049h,
@@ -1,4 +1,4 @@
/* $XTermId: testxmc.c,v 1.50 2014/05/08 23:57:48 tom Exp $ */
/* $XTermId: testxmc.c,v 1.52 2014/05/11 14:05:38 tom Exp $ */
/*
* Copyright 1997-2011,2014 by Thomas E. Dickey
@@ -208,7 +208,7 @@ Resolve_XMC(XtermWidget xw)
break;
if ((ld->attribs[col] & my_attrs) != start) {
ld->attribs[col] =
CharOf(start | (ld->attribs[col] & ~my_attrs));
(IAttr) (start | (ld->attribs[col] & ~my_attrs));
changed = True;
}
}
Oops, something went wrong.

0 comments on commit 2fd29cb

Please sign in to comment.