or changed rxvt behaviour to make it more compatible to xterm (usually
xfree86's xterm).
+TODO: escaping system for long escape sequences, so we can stop on CR/LF.
+TODO: implement xterm mode to be able to use xfree's TERM=xterm.
+TODO: multibyte support for setwmname et al.
+TODO: there are other todo items, but they are not in this file because they
+ are very long-term :)
+
+3.2 Mon Jul 26 19:57:32 CEST 2004
+ - support real bold fonts (patch by Adam Sampson <azz@us-lot.org>),
+ if specified in the font list (and enabled by -rb).
+ - fixed --enable-keepscrolling and --enable-selectionscrolling, which
+ was broken since 1.8. Patch by Hans de Goede <j.w.r.degoede@hhs.nl>.
+ - fixed --enable-slipwheeling, see above.
+ - sequences ended by ST can now contain any octet by quoting it
+ with ^V (SYN).
+ - 8-bit-controls disabled by default (compiletime option).
+
+3.1 Sat Jun 26 23:38:07 CEST 2004
+ - set default backspace sequence to "DEC" (which defaults to \177)
+ as opposed to \010 as before, which was incorrect (ahem :).
+ - updated doc/etc/rxvt.* to reflect the change. This brings rxvt
+ in line with many existing rxvt terminfo and termcap entries as
+ well as with other terminal emulators.
+ - fix a segfault when trying to set a nonexistant locale
+ (reported by elmex).
+ - find more fonts by default for japanese.
+ - the internal border wasn't always cleared. This is fixed by moving
+ the window relative to it's frame and simplifies a lot of code, too.
+ - fixed quite hard to find scrollbar colour bug, reported by Eduard
+ Bloch.
+
+3.0 Mon May 10 20:47:23 CEST 2004
+ - experimental flickerfree resize mode (I tried to get even
+ less flickering with SouthWestGravity but couldn't get it to work,
+ sorry).
+ - c++-ify (or at least make it compile with g++-3.4, which should
+ make it a little bit more correct c++).
+
2.9 Sat May 8 19:13:41 CEST 2004
- fix some minor doc issues + some generated doc files are now
getting distributed (closes debian bug #246035).
hasn't been tested well. Either try with --enable-everything or use the
./reconf script as a base for experiments. ./reconf is used by myself,
so it should generally be a working config. Of course, you should always
-report when a combination doesn't work, so it cnya be fixed. Marc Lehmann
+report when a combination doesn't work, so it can be fixed. Marc Lehmann
<rxvt@schmorp.de>.
--enable-everything
-COMMENT(-- $Id: versioninfo.yo,v 1.17 2004-07-26 14:57:12 root Exp $ --)
+COMMENT(-- $Id: versioninfo.yo,v 1.18 2004-07-26 18:01:18 root Exp $ --)
DEFINEMACRO(RXVTNAME)(0)
- (urxvt)
+ (rxvt)
DEFINEMACRO(RXVTDATE)(0)
- (2004-06-26)
+ (2004-07-26)
DEFINEMACRO(RXVTVERSION)(0)
- (3.1)
+ (3.2)
DEFINEMACRO(RXVTMAINT)(0)
(Marc A. Lehmann)
DEFINEMACRO(RXVTMAINTEMAIL)(0)
./configure --prefix=/opt/rxvt --enable-utmp \
--enable-wtmp --enable-lastlog --enable-xim --disable-strings \
- --with-term=rxvt --enable-keepscrolling --enable-xft \
+ --with-term=rxvt --disable-keepscrolling --enable-xft --enable-mousewheel \
--with-name=rxvt --enable-selectionscrolling \
--enable-frills --enable-swapscreen --enable-transparency \
--with-codesets=eu,jp --enable-menubar --enable-tinting \
--enable-cursor-blink --enable-pointer-blank --enable-text-blink \
- --enable-plain-scroll --enable-combining \
+ --enable-plain-scroll --enable-rxvt-scroll --enable-combining \
"$@"
}
#endif
+#ifndef NO_SCROLLBAR_BUTTON_CONTINUAL_SCROLLING
+void
+rxvt_term::cont_scroll_cb (time_watcher &w)
+{
+ if ((scrollbar_isUp() || scrollbar_isDn()) &&
+ scr_page (scrollbar_isUp() ? UP : DN, 1))
+ {
+ refresh_type |= SMOOTH_REFRESH;
+ want_refresh = 1;
+ w.start (w.at + SCROLLBAR_CONTINUOUS_DELAY);
+ }
+}
+#endif
+
+#ifdef SELECTION_SCROLLING
+void
+rxvt_term::sel_scroll_cb (time_watcher &w)
+{
+ if (scr_page (scroll_selection_dir, scroll_selection_lines))
+ {
+ selection_extend (selection_save_x, selection_save_y, selection_save_state);
+ refresh_type |= SMOOTH_REFRESH;
+ want_refresh = 1;
+ w.start (w.at + SCROLLBAR_CONTINUOUS_DELAY);
+ }
+}
+#endif
+
+#if defined(MOUSE_WHEEL) && defined(MOUSE_SLIP_WHEELING)
+void
+rxvt_term::slip_wheel_cb (time_watcher &w)
+{
+ if (mouse_slip_wheel_speed == 0
+ || mouse_slip_wheel_speed < 0 ? scr_page (DN, -mouse_slip_wheel_speed)
+ : scr_page (UP, mouse_slip_wheel_speed))
+ {
+ refresh_type |= SMOOTH_REFRESH;
+ want_refresh = 1;
+ w.start (w.at + SCROLLBAR_CONTINUOUS_DELAY);
+ }
+}
+#endif
+
bool
rxvt_term::pty_fill ()
{
#if defined(MOUSE_WHEEL) && defined(MOUSE_SLIP_WHEELING)
case KeyRelease:
{
- if (! (ev.xkey.state & ControlMask))
- mouse_slip_wheel_speed = 0;
+ if (!(ev.xkey.state & ControlMask))
+ slip_wheel_ev.stop ();
else
{
- KeySym ks;
+ KeySym ks;
ks = XKeycodeToKeysym (display->display, ev.xkey.keycode, 0);
if (ks == XK_Control_L || ks == XK_Control_R)
{
int dist;
- pending_scroll_selection=1;
-
/* don't clobber the current delay if we are
* already in the middle of scrolling.
*/
- if (scroll_selection_delay<=0)
- scroll_selection_delay=SCROLLBAR_CONTINUOUS_DELAY;
+ if (!sel_scroll_ev.active)
+ sel_scroll_ev.start (NOW + SCROLLBAR_INITIAL_DELAY);
/* save the event params so we can highlight
* the selection in the pending-scroll loop
/* we are within the text window, so we
* shouldn't be scrolling
*/
- pending_scroll_selection = 0;
+ if (sel_scroll_ev.active)
+ sel_scroll_ev.stop();
}
#endif
#ifdef MOUSE_THRESHOLD
if (upordown)
{
#ifndef NO_SCROLLBAR_BUTTON_CONTINUAL_SCROLLING
- scroll_arrow_delay = SCROLLBAR_INITIAL_DELAY;
+ cont_scroll_ev.start (NOW + SCROLLBAR_INITIAL_DELAY);
#endif
if (scr_page (upordown < 0 ? UP : DN, 1))
{
}
#ifdef SELECTION_SCROLLING
- pending_scroll_selection=0;
+ if (sel_scroll_ev.active)
+ sel_scroll_ev.stop();
#endif
if (ev.window == TermWin.vt)
{
int i;
page_dirn v;
- v = (ev.button == Button4) ? UP : DN;
+ v = ev.button == Button4 ? UP : DN;
+
if (ev.state & ShiftMask)
i = 1;
- else if ((Options & Opt_mouseWheelScrollPage))
+ else if (Options & Opt_mouseWheelScrollPage)
i = TermWin.nrow - 1;
else
i = 5;
+
# ifdef MOUSE_SLIP_WHEELING
if (ev.state & ControlMask)
{
- mouse_slip_wheel_speed += (v ? -1 : 1);
- mouse_slip_wheel_delay = SCROLLBAR_CONTINUOUS_DELAY;
+ mouse_slip_wheel_speed += v ? -1 : 1;
+ slip_wheel_ev.start (NOW + SCROLLBAR_CONTINUOUS_DELAY);
}
# endif
# ifdef JUMP_MOUSE_WHEEL
return flag;
}
+// read the next octet
+unicode_t
+rxvt_term::next_octet ()
+{
+ return cmdbuf_ptr < cmdbuf_endp
+ ? *cmdbuf_ptr++
+ : NOCHAR;
+}
+
// read the next character
unicode_t
rxvt_term::next_char ()
return c;
}
+unicode_t
+rxvt_term::cmd_get8 ()
+{
+ unicode_t c = next_octet ();
+
+ if (c == NOCHAR)
+ throw out_of_input;
+
+ return c;
+}
+
/*{{{ print pipe */
/*----------------------------------------------------------------------*/
#ifdef PRINTPIPE
scr_charset_choose (0);
break;
+#ifdef EIGHT_BIT_CONTROLS
// 8-bit controls
case 0x90: /* DCS */
process_dcs_seq ();
case 0x9d: /* CSI */
process_osc_seq ();
break;
+#endif
}
}
/*}}} */
unsigned char *
rxvt_term::get_to_st (unicode_t &ends_how)
{
- int seen_esc = 0; /* seen escape? */
+ unicode_t prev = 0, ch;
unsigned int n = 0;
unsigned char *s;
- unicode_t ch;
unsigned char string[STRING_MAX];
- while ((ch = cmd_getc ()))
+ while ((ch = cmd_getc ()) != NOCHAR)
{
- if (ch == C0_BEL || ch == CHAR_ST)
- break;
-
- if (seen_esc)
- if (ch == 0x5c) /* 7bit ST */
- break;
- else
- return NULL;
-
- if (ch == C0_ESC)
+ if (prev == C0_ESC)
{
- seen_esc = 1;
- continue;
+ if (ch == 0x5c) /* 7bit ST */
+ break;
+ else
+ return NULL;
}
- else if (ch == C0_HT)
- ch = ' '; /* translate '\t' to space */
- else if (ch < 0x20 && (ch != C0_LF && ch != C0_CR))
+ else if (ch == C0_BEL || ch == CHAR_ST)
+ break;
+ else if (ch < 0x20)
return NULL; /* other control character - exit */
if (n >= sizeof (string) - 1)
// stop at some sane length
return NULL;
- string[n++] = ch;
- seen_esc = 0;
+ if (ch == C0_SYN)
+ {
+ string[n++] = cmd_get8 ();
+ prev = 0;
+ }
+ else
+ string[n++] = prev = ch;
}
string[n++] = '\0';
/*
- * $Id: command.h,v 1.8 2004-04-08 20:22:25 pcg Exp $
+ * $Id: command.h,v 1.10 2004-07-26 18:01:19 root Exp $
*/
#ifndef COMMAND_H_
#define COMMAND_H_
// STRING_MAX __MUST__ not be larger than what CBUFSIZ can hold.
-#define STRING_MAX 1024 /* max string size for process_rxvt_xterm_seq() */
+#define STRING_MAX 2048 /* max string size for process_rxvt_xterm_seq() */
#define ESC_ARGS 32 /* max # of args for esc sequences */
# define MULTICLICK_TIME 500
#endif
#ifndef SCROLLBAR_INITIAL_DELAY
-# ifdef NEXT_SCROLLER
-# define SCROLLBAR_INITIAL_DELAY 20
-# else
-# define SCROLLBAR_INITIAL_DELAY 40
-# endif
+# define SCROLLBAR_INITIAL_DELAY 0.33
#endif
#ifndef SCROLLBAR_CONTINUOUS_DELAY
-# define SCROLLBAR_CONTINUOUS_DELAY 2
+# define SCROLLBAR_CONTINUOUS_DELAY 0.05
#endif
/*
* Define defaults for backspace and delete keys - unless they have been
* configured out with --disable-backspace-key / --disable-delete-key
*/
-//#define DEFAULT_BACKSPACE "DEC" /* SPECIAL */
-#define DEFAULT_BACKSPACE "\010" /* wrong, but match terminfo etc. */
+#define DEFAULT_BACKSPACE "DEC" /* SPECIAL */
#define DEFAULT_DELETE "\033[3~"
/*
/*
* Set delay periods for continuous scrolling with scrollbar buttons
*/
-/* #define SCROLLBAR_INITIAL_DELAY 40 */
-/* #define SCROLLBAR_CONTINUOUS_DELAY 2 */
+/* #define SCROLLBAR_INITIAL_DELAY 0.33 */
+/* #define SCROLLBAR_CONTINUOUS_DELAY 0.05 */
/*
* The speed of selection scrolling is proportional to the distance
#ifdef TEXT_BLINK
text_blink_ev (this, &rxvt_term::text_blink_cb),
#endif
+#ifndef NO_SCROLLBAR_BUTTON_CONTINUAL_SCROLLING
+ cont_scroll_ev (this, &rxvt_term::cont_scroll_cb),
+#endif
+#ifdef SELECTION_SCROLLING
+ sel_scroll_ev (this, &rxvt_term::sel_scroll_cb),
+#endif
+#if defined(MOUSE_WHEEL) && defined(MOUSE_SLIP_WHEELING)
+ slip_wheel_ev (this, &rxvt_term::slip_wheel_cb),
+#endif
#ifdef POINTER_BLANK
pointer_ev (this, &rxvt_term::pointer_cb),
#endif
#ifdef TEXT_BLINK
text_blink_ev.stop ();
#endif
+#ifndef NO_SCROLLBAR_BUTTON_CONTINUAL_SCROLLING
+ cont_scroll_ev.stop ();
+#endif
+#ifdef SELECTION_SCROLLING
+ sel_scroll_ev.stop ();
+#endif
#ifdef POINTER_BLANK
pointer_ev.stop ();
#endif
szHint.base_width = szHint.base_height = 2 * TermWin.int_bwidth;
sb_w = mb_h = 0;
- window_vt_x = window_vt_y = 0;
+ window_vt_x = window_vt_y = TermWin.int_bwidth;
if (scrollbar_visible ())
{
sb_w = scrollbar_TotalWidth ();
szHint.base_width += sb_w;
- if (! (Options & Opt_scrollBar_right))
- window_vt_x = sb_w;
+ if (!(Options & Opt_scrollBar_right))
+ window_vt_x += sb_w;
}
if (menubar_visible ())
{
mb_h = menuBar_TotalHeight ();
szHint.base_height += mb_h;
- window_vt_y = mb_h;
+ window_vt_y += mb_h;
}
szHint.width_inc = TermWin.fwidth;
FAST_REFRESH = 1<<0, /* Fully exposed window */
SLOW_REFRESH = 1<<1, /* Partially exposed window */
SMOOTH_REFRESH = 1<<2, /* Do sync'ing to make it smooth */
+#if 0
REFRESH_BOUNDS = 1<<3
+#endif
+ REFRESH_BOUNDS = 0 /* only required for old int_bwidth code. */ //TODO: remove this and all depending code
};
#ifdef NO_SECONDARY_SCREEN
Rs_secondaryScreen,
Rs_secondaryScroll,
#endif
+#ifndef NO_BOLD_UNDERLINE_REVERSE
+ Rs_realBold,
+#endif
NUM_RESOURCES
};
#define STRRCHR(x, y) strrchr((const char *)(x), (int)(y))
/* convert pixel dimensions to row/column values. Everything as int32_t */
-#define Pixel2Col(x) Pixel2Width((int32_t)(x) - (int32_t)TermWin.int_bwidth)
-#define Pixel2Row(y) Pixel2Height((int32_t)(y) - (int32_t)TermWin.int_bwidth)
+#define Pixel2Col(x) Pixel2Width((int32_t)(x))
+#define Pixel2Row(y) Pixel2Height((int32_t)(y))
#define Pixel2Width(x) ((int32_t)(x) / (int32_t)TermWin.fwidth)
#define Pixel2Height(y) ((int32_t)(y) / (int32_t)TermWin.fheight)
-#define Col2Pixel(col) ((int32_t)Width2Pixel(col) + (int32_t)TermWin.int_bwidth)
-#define Row2Pixel(row) ((int32_t)Height2Pixel(row) + (int32_t)TermWin.int_bwidth)
+#define Col2Pixel(col) ((int32_t)Width2Pixel(col))
+#define Row2Pixel(row) ((int32_t)Height2Pixel(row))
#define Width2Pixel(n) ((int32_t)(n) * (int32_t)TermWin.fwidth)
#define Height2Pixel(n) ((int32_t)(n) * (int32_t)TermWin.fheight)
-#define TermWin_TotalWidth() ((int32_t)TermWin.width + 2 * (int32_t)TermWin.int_bwidth)
-#define TermWin_TotalHeight() ((int32_t)TermWin.height + 2 * (int32_t)TermWin.int_bwidth)
+#define TermWin_TotalWidth() ((int32_t)TermWin.width)
+#define TermWin_TotalHeight() ((int32_t)TermWin.height)
/* how to build & extract colors and attributes */
#define GET_BASEFG(x) (((x) & RS_fgMask))
uint32_t pixcolor_set[NPIXCLR_SETS];
/* ---------- */
#ifdef SELECTION_SCROLLING
- int scroll_selection_delay,
- scroll_selection_lines;
+ int scroll_selection_lines;
enum page_dirn scroll_selection_dir;
int selection_save_x,
selection_save_y,
- selection_save_state,
- pending_scroll_selection;
+ selection_save_state;
#endif
/* ---------- */
int csrO, /* Hops - csr offset in thumb/slider to */
/* give proper Scroll behaviour */
-#ifndef NO_SCROLLBAR_BUTTON_CONTINUAL_SCROLLING
- scroll_arrow_delay,
-#endif
#if defined(MOUSE_WHEEL) && defined(MOUSE_SLIP_WHEELING)
- mouse_slip_wheel_delay,
mouse_slip_wheel_speed,
#endif
refresh_count,
void text_blink_cb (time_watcher &w); time_watcher text_blink_ev;
#endif
+#ifndef NO_SCROLLBAR_BUTTON_CONTINUAL_SCROLLING
+ void cont_scroll_cb (time_watcher &w); time_watcher cont_scroll_ev;
+#endif
+#ifdef SELECTION_SCROLLING
+ void sel_scroll_cb (time_watcher &w); time_watcher sel_scroll_ev;
+#endif
+#if defined(MOUSE_WHEEL) && defined(MOUSE_SLIP_WHEELING)
+ void slip_wheel_cb (time_watcher &w); time_watcher slip_wheel_ev;
+#endif
+
#ifdef POINTER_BLANK
void pointer_cb (time_watcher &w); time_watcher pointer_ev;
void pointer_blank ();
bool init (int argc, const char *const *argv);
bool init_vars ();
- unicode_t next_char ();
-
bool pty_fill ();
void *operator new (size_t s);
// command.C
void lookup_key (XKeyEvent &ev);
unsigned int cmd_write (const unsigned char *str, unsigned int count);
+
+ unicode_t next_char ();
unicode_t cmd_getc ();
+ unicode_t next_octet ();
+ unicode_t cmd_get8 ();
+
bool cmd_parse ();
void mouse_report (XButtonEvent &ev);
void button_press (XButtonEvent &ev);
if (unicode == 0x2312) return 0x225e;
uint8_t l = unicode;
uint16_t h = unicode >> 8;
- if (0x00 <= h && h <= 0xff
- && 0x00 <= l && l <= 0xff
+ if (h <= 0xff
+ && l <= 0xff
&& jis0208_1990_0_f_i[h - 0x00])
return jis0208_1990_0_f_i[h - 0x00][l - 0x00]
? jis0208_1990_0_f_i[h - 0x00][l - 0x00]
if (unicode == 0x2122) return 0x226f;
uint8_t l = unicode;
uint16_t h = unicode >> 8;
- if (0x00 <= h && h <= 0x9f
- && 0x00 <= l && l <= 0xff
+ if (h <= 0x9f
+ && l <= 0xff
&& jis0212_1990_0_f_i[h - 0x00])
return jis0212_1990_0_f_i[h - 0x00][l - 0x00]
? jis0212_1990_0_f_i[h - 0x00][l - 0x00]
-#define VERSION "2.9"
-#define VSTRING "20900"
-#define DATE "2004-05-08"
-#define LSMDATE "08MAY04"
-#define LIBVERSION "2:9:0"
+#define VERSION "3.2"
+#define VSTRING "30200"
+#define DATE "2004-07-26"
+#define LSMDATE "26JUL04"
+#define LIBVERSION "3:2:0"