"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/rxvt.h" between
rxvt-unicode-9.26.tar.bz2 and rxvt-unicode-9.29.tar.bz2

About: rxvt-unicode is a clone of the terminal emulator rxvt.

rxvt.h  (rxvt-unicode-9.26.tar.bz2):rxvt.h  (rxvt-unicode-9.29.tar.bz2)
skipping to change at line 29 skipping to change at line 29
#ifdef HAVE_SYS_STRREDIR_H #ifdef HAVE_SYS_STRREDIR_H
#include <sys/strredir.h> #include <sys/strredir.h>
#endif #endif
#if HAVE_WCHAR_H #if HAVE_WCHAR_H
# include <wchar.h> # include <wchar.h>
#else #else
// stdlib.h might provide it // stdlib.h might provide it
#endif #endif
#include <libptytty.h>
// we assume that Xlib.h defines XPointer, and it does since at least 1994... // we assume that Xlib.h defines XPointer, and it does since at least 1994...
extern "C" { extern "C" {
#include <X11/Xlib.h> #include <X11/Xlib.h>
#include <X11/Xutil.h> #include <X11/Xutil.h>
#include <X11/Xresource.h> #include <X11/Xresource.h>
} }
#if UNICODE_3 #if UNICODE_3
typedef uint32_t text_t; typedef uint32_t text_t;
skipping to change at line 93 skipping to change at line 95
#define ECB_NO_THREADS 1 #define ECB_NO_THREADS 1
#include "ecb.h" #include "ecb.h"
#include "encoding.h" #include "encoding.h"
#include "rxvtutil.h" #include "rxvtutil.h"
#include "rxvtfont.h" #include "rxvtfont.h"
#include "rxvttoolkit.h" #include "rxvttoolkit.h"
#include "rxvtimg.h" #include "rxvtimg.h"
#include "scrollbar.h" #include "scrollbar.h"
#include "ev_cpp.h" #include "ev_cpp.h"
#include "libptytty.h"
#include "rxvtperl.h" #include "rxvtperl.h"
// try to avoid some macros to decrease code size, on some systems // try to avoid some macros to decrease code size, on some systems
#if ENABLE_MINIMAL #if ENABLE_MINIMAL
# define strcmp(a,b) (strcmp)(a,b) # define strcmp(a,b) (strcmp)(a,b)
# define strlen(a) (strlen)(a) # define strlen(a) (strlen)(a)
# define strcpy(a,b) (strcpy)(a,b) # define strcpy(a,b) (strcpy)(a,b)
# define memset(a,c,l) (memset)(a,c,l) # define memset(a,c,l) (memset)(a,c,l)
# define memcpy(a,b,l) (memcpy)(a,b,l) # define memcpy(a,b,l) (memcpy)(a,b,l)
skipping to change at line 128 skipping to change at line 129
#endif #endif
#ifndef EXIT_SUCCESS /* missing from <stdlib.h> */ #ifndef EXIT_SUCCESS /* missing from <stdlib.h> */
# define EXIT_SUCCESS 0 /* exit function success */ # define EXIT_SUCCESS 0 /* exit function success */
# define EXIT_FAILURE 1 /* exit function failure */ # define EXIT_FAILURE 1 /* exit function failure */
#endif #endif
/****************************************************************************/ /****************************************************************************/
// exception thrown on fatal (per-instance) errors // exception thrown on fatal (per-instance) errors
class rxvt_failure_exception { }; class rxvt_failure_exception : public std::exception
{
public:
const char *
what () const noexcept override
{
return "";
}
};
// exception thrown when the command parser runs out of input data // exception thrown when the command parser runs out of input data
class out_of_input { }; class out_of_input { };
/* /*
***************************************************************************** *****************************************************************************
* PROTOTYPES * PROTOTYPES
***************************************************************************** *****************************************************************************
*/ */
// main.C // main.C
skipping to change at line 446 skipping to change at line 455
URxvt_Color_border = 708, URxvt_Color_border = 708,
URxvt_font = 710, URxvt_font = 710,
URxvt_boldFont = 711, URxvt_boldFont = 711,
URxvt_italicFont = 712, URxvt_italicFont = 712,
URxvt_boldItalicFont = 713, URxvt_boldItalicFont = 713,
URxvt_view_up = 720, URxvt_view_up = 720,
URxvt_view_down = 721, URxvt_view_down = 721,
URxvt_cellinfo = 776, // returns font cell width, height etc.
URxvt_perl = 777, // for use by perl extensions, starts with " extension-name;" URxvt_perl = 777, // for use by perl extensions, starts with " extension-name;"
}; };
/* Words starting with `Color_' are colours. Others are counts */ /* Words starting with `Color_' are colours. Others are counts */
/* /*
* The PixColor and rendition colour usage should probably be decoupled * The PixColor and rendition colour usage should probably be decoupled
* on the unnecessary items, e.g. Color_pointer, but won't bother * on the unnecessary items, e.g. Color_pointer, but won't bother
* until we need to. Also, be aware of usage in pixcolor_set * until we need to. Also, be aware of usage in pixcolor_set
*/ */
skipping to change at line 774 skipping to change at line 784
operator mbstate_t *() { return &mbs; } operator mbstate_t *() { return &mbs; }
void reset () { memset (&mbs, 0, sizeof (mbs)); } void reset () { memset (&mbs, 0, sizeof (mbs)); }
mbstate () { reset (); } mbstate () { reset (); }
}; };
/****************************************************************************/ /****************************************************************************/
#define UNICODE_MASK 0x1fffffUL #define UNICODE_MASK 0x1fffffUL
#if UNICODE_3 #if UNICODE_3
# define COMPOSE_LO 0x40000000UL # define COMPOSE_LO 0x110000UL
# define COMPOSE_HI 0x400fffffUL # define COMPOSE_HI 0x1fffffUL
# define IS_COMPOSE(n) ((int32_t)(n) >= COMPOSE_LO) # define IS_COMPOSE(n) ((int32_t)(n) >= COMPOSE_LO)
#else #else
# if ENABLE_PERL # if ENABLE_PERL
# define COMPOSE_LO 0xe000UL // our _own_ functions don't like (illegal) surrog ates # define COMPOSE_LO 0xe000UL // our _own_ functions don't like (illegal) surrog ates
# define COMPOSE_HI 0xf8ffUL // in utf-8, so use private use area only # define COMPOSE_HI 0xf8ffUL // in utf-8, so use private use area only
# else # else
# define COMPOSE_LO 0xd800UL # define COMPOSE_LO 0xd800UL
# define COMPOSE_HI 0xf8ffUL # define COMPOSE_HI 0xf8ffUL
# endif # endif
# define IS_COMPOSE(n) IN_RANGE_INC ((n), COMPOSE_LO, COMPOSE_HI) # define IS_COMPOSE(n) IN_RANGE_INC ((n), COMPOSE_LO, COMPOSE_HI)
#endif #endif
#if ENABLE_COMBINING #if ENABLE_COMBINING
// compose chars are used to represent composite characters // compose chars are used to represent composite characters
// that are not representable in unicode, as well as characters // that are not representable in unicode, as well as characters
// not fitting in the BMP. // not fitting in the BMP.
struct compose_char struct compose_char
{ {
unicode_t c1, c2; // any chars != NOCHAR are valid // c1 can be any character != NOCHAR, including another compose character
// c2 must always be a zero-width character or NOCHAR, in case
// this just extends beyond the BMP.
unicode_t c1, c2;
compose_char (unicode_t c1, unicode_t c2) compose_char (unicode_t c1, unicode_t c2)
: c1(c1), c2(c2) : c1(c1), c2(c2)
{ } { }
}; };
class rxvt_composite_vec struct rxvt_composite_vec
{ {
vector<compose_char> v; vector<compose_char> v;
public:
text_t compose (unicode_t c1, unicode_t c2 = NOCHAR); text_t compose (unicode_t c1, unicode_t c2 = NOCHAR);
int expand (unicode_t c, wchar_t *r); template<typename T> int expand (unicode_t c, T *r);
int expand (unicode_t c) { return expand (c, (text_t *)0); }
compose_char *operator [](text_t c) compose_char *operator [](text_t c)
{ {
return c >= COMPOSE_LO && c < COMPOSE_LO + v.size () return c >= COMPOSE_LO && c < COMPOSE_LO + v.size ()
? &v[c - COMPOSE_LO] ? &v[c - COMPOSE_LO]
: 0; : 0;
} }
}; };
extern class rxvt_composite_vec rxvt_composite; extern class rxvt_composite_vec rxvt_composite;
#endif #endif
#if 0
// expand the sequence into a static array
// works even without ENABLE_COMBINING
template<typename T, int max_size_ = 48>
struct rxvt_compose_expand_static
{
#if ENABLE_COMBINING
enum { max_size = max_size_ };
T chrs[max_size];
// expand sequence and return start ptr
// guarantees at least one output
// get the length with length () on that ptr
T *operator ()(unicode_t c)
{
T *cur = chrs + max_size;
while (ecb_expect_false (IS_COMPOSE (c)))
if (ecb_expect_true (c - COMPOSE_LO < rxvt_composite.v.size ()))
{
compose_char *cc = &rxvt_composite.v [c - COMPOSE_LO];
if (cc->c2 != NOCHAR)
{
cur -= cur > chrs; *cur = cc->c2;
}
c = cc->c1;
}
else
c = NOCHAR;
cur -= cur > chrs; *cur = c;
return cur;
}
int length (T *first)
{
return chrs + max_size - first;
}
#else
T chr;
T *operator ()(text_t c);
{
chr = c;
return &chr;
}
int length (T *first)
{
return 1;
}
#endif
};
#endif
/****************************************************************************/ /****************************************************************************/
#ifdef KEYSYM_RESOURCE #ifdef KEYSYM_RESOURCE
class keyboard_manager; class keyboard_manager;
#endif #endif
typedef struct rxvt_term *rxvt_t; typedef struct rxvt_term *rxvt_t;
extern rxvt_t rxvt_current_term; extern rxvt_t rxvt_current_term;
skipping to change at line 1034 skipping to change at line 1107
rxvt_perl_term perl; rxvt_perl_term perl;
#endif #endif
struct mbstate mbstate; // current input multibyte state struct mbstate mbstate; // current input multibyte state
unsigned char want_refresh:1, unsigned char want_refresh:1,
current_screen:1, /* primary or secondary */ current_screen:1, /* primary or secondary */
num_scr_allow:1, num_scr_allow:1,
bypass_keystate:1, bypass_keystate:1,
#if ENABLE_FRILLS #if ENABLE_FRILLS
urgency_hint:1, urgency_hint:1,
rewrap_always:1,
rewrap_never:1,
#endif #endif
#if CURSOR_BLINK #if CURSOR_BLINK
hidden_cursor:1, hidden_cursor:1,
#endif #endif
#if TEXT_BLINK #if TEXT_BLINK
hidden_text:1, hidden_text:1,
#endif #endif
#if POINTER_BLANK #if POINTER_BLANK
hidden_pointer:1, hidden_pointer:1,
#endif #endif
 End of changes. 11 change blocks. 
8 lines changed or deleted 83 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)