/* 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
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
./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 \
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
{
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;
}
if (newlen)
len = STRLEN (kbuf);
}
+
/*
* Pass meta for all function keys, if 'meta' option set
*/
for (ch = kbuf; ch < kbuf + len; ch++)
*ch |= 0x80;
+
meta = 0;
}
#endif
&rxvt_codeset_conv_unicode
};
-//#define ENCODING_COMPOSE
+#if ENABLE_COMBINING
+# define ENCODING_COMPOSE
+#endif
#include "table/compose.h"
#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.
/* #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
*/
#define MAX_COLS 4000
#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
* 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
*/
//#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
* 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
*/
#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
* 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
#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
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;
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
}
}
+#if ENABLE_COMBINING
class rxvt_composite_vec rxvt_composite;
text_t rxvt_composite_vec::compose (uint32_t c1, uint32_t c2)
return len;
}
+#endif
-extern struct rxvt_composite_vec rxvt_composite;
void *
rxvt_term::operator new (size_t s)
{
}
}
}
+
/* TODO: BOUNDS */
TermWin.width = TermWin.ncol * TermWin.fwidth;
TermWin.height = TermWin.nrow * TermWin.fheight;
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,
Rs_lineSpace,
#endif
Rs_cutchars,
-#ifdef ACS_ASCII
- Rs_acs_chars,
-#endif
Rs_modifier,
Rs_answerbackstring,
Rs_tripleclickwords,
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
# 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.
#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;
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];
{
display = XOpenDisplay (id);
+ if (!display)
+ return false;
+
screen = DefaultScreen (display);
root = DefaultRootWindow (display);
visual = DefaultVisual (display, screen);
{
x_ev.stop ();
- XCloseDisplay (display);
+ if (display)
+ XCloseDisplay (display);
}
void rxvt_display::im_change_cb ()
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.
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
}
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.
}
if (rend & RS_Uline)
- {
- if (ISSET_PIXCOLOR (Color_UL))
- fore = Color_UL;
- }
+ if (ISSET_PIXCOLOR (Color_UL))
+ fore = Color_UL;
#endif
if (rvid)
{
if (*t == NOCHAR)
t++;
+#if ENABLE_COMBINING
else if (IS_COMPOSE (*t))
{
int len = rxvt_composite.expand (*t, 0);
ofs += rxvt_composite.expand (*t++, new_selection_text + ofs);
}
+#endif
else
new_selection_text[ofs++] = *t++;
}
/*--------------------------------*-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 <nation@rocket.sanders.lockheed.com>
#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"),
INFO ("xrm", "string", "X resource"),
#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")
};
# 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)
# 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
}
/*}}} */