repo: rxvt-unicode-sixel action: commit revision: path_from: revision_from: b078c6601f224a2a38b3af16434a29c2dabf5687: path_to: revision_to:
commit b078c6601f224a2a38b3af16434a29c2dabf5687 Author: Marc LehmannDate: Sun Mar 14 17:33:08 2004 +0000 *** empty log message *** diff --git a/autoconf/config.h.in b/autoconf/config.h.in
--- a/autoconf/config.h.in +++ b/autoconf/config.h.in @@ -3,15 +3,15 @@ /* Define if you want blinking cursor support */ #undef CURSOR_BLINK +/* Define if you want to automatically compose combining characters */ +#undef ENABLE_COMBINING + /* Define if you want chinese codesets */ #undef ENCODING_CN /* Define if you want extended chinese codesets */ #undef ENCODING_CN_EXT -/* Define if you want to automatically compose combining characters */ -#undef ENCODING_COMPOSE - /* Define if you want european extended codesets */ #undef ENCODING_EU diff --git a/autoconf/configure.in b/autoconf/configure.in
--- a/autoconf/configure.in +++ b/autoconf/configure.in @@ -1242,7 +1242,7 @@ if test x$support_unicode3 = xyes; then AC_DEFINE(UNICODE_3, 1, Define if you want to represent unicode characters outside plane 0) fi if test x$support_combining = xyes; then - AC_DEFINE(ENCODING_COMPOSE, 1, Define if you want to automatically compose combining characters) + AC_DEFINE(ENABLE_COMBINING, 1, Define if you want to automatically compose combining characters) fi if test x$codesets = xall; then codesets=jp,jp-ext,kr,cn,cn-ext diff --git a/reconf b/reconf
--- a/reconf
+++ b/reconf
@@ -6,7 +6,7 @@
./configure --prefix=/opt/rxvt --enable-utmp \
--enable-wtmp --enable-lastlog --enable-xim --disable-strings \
--with-term=rxvt --enable-keepscrolling --enable-xft \
- --with-name=rxvt \
+ --with-name=rxvt --enable-selectionscrolling \
--enable-frills --enable-swapscreen --enable-transparency \
--with-codesets=eu,jp --enable-menubar \
--enable-cursor-blink --enable-pointer-blank --enable-text-blink \
diff --git a/src/command.C b/src/command.C
--- a/src/command.C
+++ b/src/command.C
@@ -142,27 +142,6 @@ rxvt_term::lookup_key (XKeyEvent &ev)
if (valid_keysym)
{
- /* for some backwards compatibility */
-#if defined(HOTKEY_CTRL) || defined(HOTKEY_META)
-# ifdef HOTKEY_CTRL
- if (ctrl)
-# else
- if (meta)
-# endif
- {
- if (keysym == ks_bigfont)
- {
- change_font (FONT_UP);
- return;
- }
- else if (keysym == ks_smallfont)
- {
- change_font (FONT_DN);
- return;
- }
- }
-#endif
-
if (TermWin.saveLines)
{
#ifdef UNSHIFTED_SCROLLKEYS
@@ -263,17 +242,21 @@ rxvt_term::lookup_key (XKeyEvent &ev)
{
unsigned int l;
const unsigned char *kbuf0;
- const unsigned char ch = C0_ESC;
kbuf0 = (Keysym_map[keysym & 0xFF]);
l = (unsigned int)*kbuf0++;
/* escape prefix */
- if (meta)
+ if (meta
# ifdef META8_OPTION
- if (meta_char == C0_ESC)
+ && meta_char == C0_ESC
# endif
+ )
+ {
+ const unsigned char ch = C0_ESC;
tt_write (&ch, 1);
+ }
+
tt_write (kbuf0, l);
return;
}
@@ -547,6 +530,7 @@ rxvt_term::lookup_key (XKeyEvent &ev)
if (newlen)
len = STRLEN (kbuf);
}
+
/*
* Pass meta for all function keys, if 'meta' option set
*/
@@ -571,6 +555,7 @@ rxvt_term::lookup_key (XKeyEvent &ev)
for (ch = kbuf; ch < kbuf + len; ch++)
*ch |= 0x80;
+
meta = 0;
}
#endif
diff --git a/src/encoding.C b/src/encoding.C
--- a/src/encoding.C
+++ b/src/encoding.C
@@ -247,7 +247,9 @@ const rxvt_codeset_conv *rxvt_codeset[NUM_CODESETS] = {
&rxvt_codeset_conv_unicode
};
-//#define ENCODING_COMPOSE
+#if ENABLE_COMBINING
+# define ENCODING_COMPOSE
+#endif
#include "table/compose.h"
diff --git a/src/feature.h b/src/feature.h
--- a/src/feature.h +++ b/src/feature.h @@ -35,6 +35,16 @@ #endif /*-----------------------SCREEN OPTIONS AND COLOURS---------------------*/ + +/* + * NOTE: + * + * Most of these configuration options have not been tested within the new + * rxvt-unicode framework. Changing them might work, might have no effect, + * destroy your disks or have any other effects. You may freely try (and + * report bugs, too!), but don't _expect_ them to work. + */ + /* * Define the name of the environment variable to be used in * addition to the "PATH" environment and the `path' resource. @@ -65,12 +75,6 @@ */ /* #define NO_BOLD_UNDERLINE_REVERSE */ -/* - * Don't bother cleaning up pixel droppings. If you don't use bold - * overstrike then you don't usually need this - */ -#define NO_PIXEL_DROPPING_AVOIDANCE - /* * Define maximum possible columns and rows */ @@ -102,6 +106,7 @@ #define COLOR_BACKGROUND "White" #define COLOR_SCROLLBAR "#B2B2B2" /* scrollColor match Netscape */ #define COLOR_SCROLLTROUGH "#969696" + /* * The cursor colours are special. Be very careful about setting these: * foreground/background colours may be modified by command line or resources @@ -132,7 +137,7 @@ * Define to find installed application defaults for rxvt * Only if USE_XGETDEFAULT is not defined. */ -/* #define USE_XAPPLOADDIR */ +#define USE_XAPPLOADDIR /* * Add support for the Offix DND (Drag 'n' Drop) protocol @@ -147,14 +152,7 @@ */ //#define DEFAULT_BACKSPACE "DEC" /* SPECIAL */ #define DEFAULT_BACKSPACE "\010" /* wrong, but match terminfo etc. */ -#define DEFAULT_DELETE "\033[3~" - -/* - * Choose one of these values to be the `hotkey' for changing font. - * This has been superceded and is only for you older users - */ -/* #define HOTKEY_CTRL */ -/* #define HOTKEY_META */ +#define DEFAULT_DELETE "\033[3~" /* * To use @@ -247,7 +245,7 @@ * If mouse wheel is defined, then scrolling is by 5 lines (or 1 line * if the shift key is down). Scrolling can be smooth or jump scrolling */ -/* #define JUMP_MOUSE_WHEEL */ +#define JUMP_MOUSE_WHEEL /* * Set delay periods for continuous scrolling with scrollbar buttons @@ -280,18 +278,6 @@ */ #define WTMP_ONLY_ON_LOGIN -/* - * When pasting ACS characters, convert to similar normal characters - */ -/* #define ACS_ASCII */ - -/* - * Default ascii characters to which ACS symbols are converted - */ -#ifdef ACS_ASCII -# define ACS_CHARS ".# o+ ----+---__++--|<> =#. " -#endif - /*--------------------------------BELL----------------------------------*/ /* * Disable all bell indications @@ -341,7 +327,7 @@ * A value of 0 disables menuBar all together. * Note that the amount of memory overhead is the same for any value >= 2. */ -#define MENUBAR_MAX 8 +#define MENUBAR_MAX 16 /* * Change the default shadow style @@ -425,20 +411,8 @@ #define SAVELINES 64 /* - * Provide termcap/terminfo bw support + * Provide termcap/terminfo bw support (wrap backwards on cub1) */ /* #define TERMCAP_HAS_BW */ -/* - * MAX_NFONTS is the maximum allowed number of fonts in the list - * FONT0_IDX is the default font in the list (starting at 0) - * Sizes between multi-char fonts sets (MFONT_LIST) and single-char font - * sets (NFONT_LIST) have been matched up - */ -#define MAX_NFONTS 7 -#define FONT0_IDX 2 - -#define UNICODE 1 /* TODO */ -#define UTF8 1 /* TODO */ - #endif diff --git a/src/init.C b/src/init.C
--- a/src/init.C
+++ b/src/init.C
@@ -396,11 +396,6 @@ rxvt_term::init_vars ()
colorfgbg = DEFAULT_RSTYLE;
#endif
-#if defined (HOTKEY_CTRL) || defined (HOTKEY_META)
- ks_bigfont = XK_greater;
- ks_smallfont = XK_less;
-#endif
-
refresh_limit = 1;
refresh_type = SLOW_REFRESH;
prev_nrow = prev_ncol = 0;
@@ -594,18 +589,6 @@ rxvt_term::init_resources (int argc, const char *const *argv)
if (!rs[Rs_cutchars])
rs[Rs_cutchars] = CUTCHARS;
-#ifdef ACS_ASCII
- if (!rs[Rs_acs_chars])
- rs[Rs_acs_chars] = ACS_CHARS;
- if ((i = STRLEN (rs[Rs_acs_chars])) < 0x20)
- {
- val = rxvt_realloc ((void *)rs[Rs_acs_chars], 0x20);
- for (; i < 0x20; )
- val[i] = ' ';
- rs[Rs_acs_chars] = val;
- }
-#endif
-
#ifndef NO_BACKSPACE_KEY
if (!rs[Rs_backspace_key])
# ifdef DEFAULT_BACKSPACE
diff --git a/src/main.C b/src/main.C
--- a/src/main.C
+++ b/src/main.C
@@ -58,6 +58,7 @@ rxvt_set_locale (const char *locale)
}
}
+#if ENABLE_COMBINING
class rxvt_composite_vec rxvt_composite;
text_t rxvt_composite_vec::compose (uint32_t c1, uint32_t c2)
@@ -119,8 +120,8 @@ int rxvt_composite_vec::expand (uint32_t c, wchar_t *r)
return len;
}
+#endif
-extern struct rxvt_composite_vec rxvt_composite;
void *
rxvt_term::operator new (size_t s)
{
@@ -687,6 +688,7 @@ rxvt_term::window_calc (unsigned int width, unsigned int height)
}
}
}
+
/* TODO: BOUNDS */
TermWin.width = TermWin.ncol * TermWin.fwidth;
TermWin.height = TermWin.nrow * TermWin.fheight;
diff --git a/src/rxvt.h b/src/rxvt.h
--- a/src/rxvt.h
+++ b/src/rxvt.h
@@ -523,10 +523,6 @@ enum {
Rs_preeditType,
Rs_inputMethod,
#endif
-#if defined (HOTKEY_CTRL) || defined (HOTKEY_META)
- Rs_bigfont_key,
- Rs_smallfont_key,
-#endif
#ifdef TRANSPARENT
Rs_transparent,
Rs_transparent_all,
@@ -540,9 +536,6 @@ enum {
Rs_lineSpace,
#endif
Rs_cutchars,
-#ifdef ACS_ASCII
- Rs_acs_chars,
-#endif
Rs_modifier,
Rs_answerbackstring,
Rs_tripleclickwords,
@@ -604,14 +597,12 @@ enum {
if (test) \
PrivateModes |= (bit); \
else \
- PrivateModes &= ~ (bit)
+ PrivateModes &= ~(bit)
#ifdef ALLOW_132_MODE
-# define PrivMode_Default \
-(PrivMode_Autowrap|PrivMode_aplKP|PrivMode_ShiftKeys|PrivMode_VisibleCursor|PrivMode_132OK)
+# define PrivMode_Default (PrivMode_Autowrap|PrivMode_aplKP|PrivMode_ShiftKeys|PrivMode_VisibleCursor|PrivMode_132OK)
#else
-# define PrivMode_Default \
-(PrivMode_Autowrap|PrivMode_aplKP|PrivMode_ShiftKeys|PrivMode_VisibleCursor)
+# define PrivMode_Default (PrivMode_Autowrap|PrivMode_aplKP|PrivMode_ShiftKeys|PrivMode_VisibleCursor)
#endif
#define XDEPTH display->depth
@@ -842,7 +833,7 @@ struct mbstate {
# define IS_COMPOSE(n) (COMPOSE_LO <= (n) && (n) <= COMPOSE_HI)
#endif
-#if ENCODING_COMPOSE
+#if ENABLE_COMBINING
// compose chars are used to represent composite characters
// that are not representable in unicode, as well as characters
// not fitting in the BMP.
@@ -1024,9 +1015,6 @@ struct rxvt_term : rxvt_vars {
#ifndef NO_DELETE_KEY
const char *key_delete;
#endif
-#if defined (HOTKEY_CTRL) || defined (HOTKEY_META)
- KeySym ks_bigfont, ks_smallfont;
-#endif
#ifdef USE_XIM
rxvt_xim *input_method;
XIC Input_Context;
@@ -1081,7 +1069,6 @@ struct rxvt_term : rxvt_vars {
char charsets[4];
unsigned char *v_buffer; /* pointer to physical buffer */
unsigned int v_buflen; /* size of area to write */
- char *newfont[MAX_NFONTS];
stringvec *argv, *envv; /* if != 0, will be freed on destroy time */
#ifdef KEYSYM_RESOURCE
const unsigned char *Keysym_map[256];
diff --git a/src/rxvtcolor.C b/src/rxvtcolor.C
--- a/src/rxvtcolor.C
+++ b/src/rxvtcolor.C
@@ -113,6 +113,9 @@ bool rxvt_display::init ()
{
display = XOpenDisplay (id);
+ if (!display)
+ return false;
+
screen = DefaultScreen (display);
root = DefaultRootWindow (display);
visual = DefaultVisual (display, screen);
@@ -154,7 +157,8 @@ rxvt_display::~rxvt_display ()
{
x_ev.stop ();
- XCloseDisplay (display);
+ if (display)
+ XCloseDisplay (display);
}
void rxvt_display::im_change_cb ()
diff --git a/src/screen.C b/src/screen.C
--- a/src/screen.C
+++ b/src/screen.C
@@ -866,9 +866,6 @@ rxvt_term::scr_add_lines (const uint32_t *str, int nlines, int len)
if (screen.flags & Screen_Insert)
scr_insdel_chars (1, INSERT);
- if (IS_COMPOSE (c))
- c = REPLACEMENT_CHAR;
-
// rely on wcwidth to tell us the character width, at least for non-latin1
// do wcwidth before further replacements, as wcwidth says that line-drawing
// characters have width -1 (DOH!) on gnu/linux sometimes.
@@ -890,11 +887,10 @@ rxvt_term::scr_add_lines (const uint32_t *str, int nlines, int len)
case 'y': c = 0x2264; break; case 'z': c = 0x2265; break; case '{': c = 0x03c0; break;
case '|': c = 0x2260; break; case '}': c = 0x00a3; break; case '~': c = 0x00b7; break;
}
-
if (width > 0)
{
-#if !UNICODE_3
+#if !UNICODE_3 && ENABLE_COMBINING
// trim characters we can't store directly :(
if (c >= 0x10000)
c = rxvt_composite.compose (c); // map to lower 16 bits
@@ -929,7 +925,7 @@ rxvt_term::scr_add_lines (const uint32_t *str, int nlines, int len)
}
else if (width == 0)
{
-#if ENCODING_COMPOSE
+#if ENABLE_COMBINING
// handle combining characters
// we just tag the accent on the previous on-screen character.
// this is arguably not correct, but also arguably not wrong.
@@ -2194,10 +2190,8 @@ rxvt_term::scr_refresh (unsigned char refresh_type)
}
if (rend & RS_Uline)
- {
- if (ISSET_PIXCOLOR (Color_UL))
- fore = Color_UL;
- }
+ if (ISSET_PIXCOLOR (Color_UL))
+ fore = Color_UL;
#endif
if (rvid)
@@ -2840,6 +2834,7 @@ rxvt_term::selection_make (Time tm)
{
if (*t == NOCHAR)
t++;
+#if ENABLE_COMBINING
else if (IS_COMPOSE (*t))
{
int len = rxvt_composite.expand (*t, 0);
@@ -2855,6 +2850,7 @@ rxvt_term::selection_make (Time tm)
ofs += rxvt_composite.expand (*t++, new_selection_text + ofs);
}
+#endif
else
new_selection_text[ofs++] = *t++;
}
diff --git a/src/xdefaults.C b/src/xdefaults.C
--- a/src/xdefaults.C +++ b/src/xdefaults.C @@ -1,7 +1,7 @@ /*--------------------------------*-C-*---------------------------------* * File: xdefaults.c *----------------------------------------------------------------------* - * $Id: xdefaults.C,v 1.16 2004/03/04 00:59:10 pcg Exp $ + * $Id: xdefaults.C,v 1.17 2004/03/14 17:33:08 pcg Exp $ * * All portions of code are copyright by their respective author/s. * Copyright (c) 1994 Robert Nation@@ -241,10 +241,6 @@ optList[] = { #endif #ifdef PRINTPIPE RSTRG (Rs_print_pipe, "print-pipe", "string"), -#endif -#if defined (HOTKEY_CTRL) || defined (HOTKEY_META) - RSTRG (Rs_bigfont_key, "bigfont_key", "keysym"), - RSTRG (Rs_smallfont_key, "smallfont_key", "keysym"), #endif STRG (Rs_modifier, "modifier", "mod", "modifier", "meta modifier = alt|meta|hyper|super|mod1|...|mod5"), @@ -252,9 +248,6 @@ optList[] = { #ifdef CUTCHAR_RESOURCE RSTRG (Rs_cutchars, "cutchars", "string"), #endif /* CUTCHAR_RESOURCE */ -#ifdef ACS_ASCII - RSTRG (Rs_acs_chars, "acsChars", "string"), -#endif /* ACS_ASCII */ RSTRG (Rs_answerbackstring, "answerbackString", "string"), INFO ("e", "command arg ...", "command to execute") }; @@ -980,9 +973,8 @@ rxvt_term::extract_resources (Display *display __attribute__ ((unused)), const c # endif # if defined(XAPPLOADDIR) && defined(USE_XAPPLOADDIR) - { - FILE *ad = NULL; + FILE *ad = NULL; # if defined(HAVE_XSETLOCALE) || defined(HAVE_SETLOCALE) if (localepath == NULL || (ad = fopen (localepath, "r")) == NULL) @@ -1013,22 +1005,6 @@ rxvt_term::extract_resources (Display *display __attribute__ ((unused)), const c # endif #endif /* NO_RESOURCES */ - - /* - * even without resources, at least do this setup for command-line - * options and command-line long options - */ - -#if defined (HOTKEY_CTRL) || defined (HOTKEY_META) - KeySym sym; - - if (rs[Rs_bigfont_key] - && ((sym = XStringToKeysym (rs[Rs_bigfont_key])) != 0)) - ks_bigfont = sym; - if (rs[Rs_smallfont_key] - && ((sym = XStringToKeysym (rs[Rs_smallfont_key])) != 0)) - ks_smallfont = sym; -#endif } /*}}} */
-----END OF PAGE-----