From 981f177a58d4c08b3b8e1c192069bbccbff53463 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 21 Aug 2004 05:32:00 +0000 Subject: [PATCH] *** empty log message *** --- autoconf/config.h.in | 9 ++++++--- autoconf/configure.in | 36 +++++++++++++++++++++++------------- doc/etc/urxvt.terminfo | 2 +- src/menubar.C | 8 ++++---- src/rxvtutil.C | 17 +++++++++++++++++ src/rxvtutil.h | 6 ++++++ 6 files changed, 57 insertions(+), 21 deletions(-) diff --git a/autoconf/config.h.in b/autoconf/config.h.in index 8a2d7fe9..fae6ea6e 100644 --- a/autoconf/config.h.in +++ b/autoconf/config.h.in @@ -331,6 +331,12 @@ /* Define for second char in devptyXX */ #undef PTYCHAR2 +/* Define to enable xft support */ +#undef XFT + +/* Define if you want bold and italic support */ +#undef ENABLE_STYLES + /* Define if you want ISO 14755 extended support */ #undef ISO_14755 @@ -436,6 +442,3 @@ /* Define if you don't need to use our replacement string functions */ #undef NO_STRINGS -/* Define to enable xft support */ -#undef XFT - diff --git a/autoconf/configure.in b/autoconf/configure.in index 9bdd0952..794864d7 100644 --- a/autoconf/configure.in +++ b/autoconf/configure.in @@ -94,6 +94,7 @@ support_unicode3=no support_combining=no support_8bitctrls=no support_iso14755=no +support_styles=no codesets= dnl# -------------------------------------------------------------------------- @@ -139,6 +140,7 @@ AC_ARG_ENABLE(everything, support_combining=yes #support_8bitctrls=yes support_iso14755=yes + support_styles=yes codesets=all fi]) @@ -160,6 +162,12 @@ AC_ARG_ENABLE(xft, support_xft=yes fi]) +AC_ARG_ENABLE(font-styles, + [ --enable-font-styles enable bold and italic support], + [if test x$enableval = xyes -o x$enableval = xno; then + support_styles=yes + fi]) + AC_ARG_ENABLE(utmp, [ --enable-utmp enable utmp (utmpx) support], [if test x$enableval = xyes -o x$enableval = xno; then @@ -1175,6 +1183,21 @@ fi dnl# -------------------------------------------------------------------------- dnl# now add and remove other stuff dnl# -------------------------------------------------------------------------- +if test x$support_xft = xyes; then + LIBS="$LIBS `pkg-config xft --libs`" + CFLAGS="$CFLAGS `pkg-config xft --cflags`" + CPPFLAGS="$CPPFLAGS `pkg-config xft --cflags`" + + AC_CHECK_HEADERS(X11/Xft/Xft.h,,[support_xft=no]) + AC_CHECK_LIB(Xft,XftDrawString32,,[support_xft=no]) + + if test x$support_xft = xyes; then + AC_DEFINE(XFT, 1, Define to enable xft support) + fi +fi +if test x$support_styles = xyes; then + AC_DEFINE(ENABLE_STYLES, 1, Define if you want bold and italic support) +fi if test x$support_iso14755 = xyes; then AC_DEFINE(ISO_14755, 1, Define if you want ISO 14755 extended support) fi @@ -1338,19 +1361,6 @@ RXVT_DEFINE_TO_INCLUDE(include_sys_strredir_h, sys/strredir.h, ac_cv_header_sys_ RXVT_DEFINE_TO_INCLUDE(include_sys_time_h, sys/time.h, ac_cv_header_sys_time_h, yes, notset, dontmatch) RXVT_DEFINE_TO_INCLUDE(include_time_h, time.h, ac_cv_header_sys_time_h, no, ac_cv_header_time, yes) -if test x$support_xft = xyes; then - LIBS="$LIBS `pkg-config xft --libs`" - CFLAGS="$CFLAGS `pkg-config xft --cflags`" - CPPFLAGS="$CPPFLAGS `pkg-config xft --cflags`" - - AC_CHECK_HEADERS(X11/Xft/Xft.h,,[support_xft=no]) - AC_CHECK_LIB(Xft,XftDrawString32,,[support_xft=no]) - - if test x$support_xft = xyes; then - AC_DEFINE(XFT, 1, Define to enable xft support) - fi -fi - AC_CONFIG_FILES([autoconf/Make.common \ Makefile \ doc/Makefile \ diff --git a/doc/etc/urxvt.terminfo b/doc/etc/urxvt.terminfo index 673141e1..28592741 100644 --- a/doc/etc/urxvt.terminfo +++ b/doc/etc/urxvt.terminfo @@ -49,7 +49,7 @@ urxvt|rxvt-unicode terminal (X Window System), colors#88, pairs#256, ccc, eo, npc, mc5i, ncv#40, cbt=\E[Z, smam=\E[?7h, rmam=\E[?7l, ech=\E[%p1%dX, - mc0=\E[i, mc4=\E[4i, mc5=\E[5i, + mc0=\E[i, mc4=\E[4i, mc5=\E[5i, sitm=\E[3m, ritm=\E[23m, sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m%?%p9%t\016%e\017%;, initc=\E]4;%p1%d;rgb\:%p2%{255}%*%{1000}%/%2.2X/%p3%{255}%*%{1000}%/%2.2X/%p4%{255}%*%{1000}%/%2.2X\E\\, op=\E[39;49m, diff --git a/src/menubar.C b/src/menubar.C index 4a5c92c8..5bcf4083 100644 --- a/src/menubar.C +++ b/src/menubar.C @@ -1037,14 +1037,14 @@ rxvt_term::menu_show () name = NULL; if (len && name) - draw_string (*ActiveMenu->drawable, gc, TermWin.fontset, + draw_string (*ActiveMenu->drawable, gc, TermWin.fontset[0], xoff, 2 * SHADOW + y, name, len); len = item->len2; name = item->name2; if (len && name) - draw_string (*ActiveMenu->drawable, gc, TermWin.fontset, + draw_string (*ActiveMenu->drawable, gc, TermWin.fontset[0], ActiveMenu->w - (xoff + Width2Pixel (xright)), 2 * SHADOW + y, name, len); h = HEIGHT_TEXT + 2 * SHADOW; @@ -2064,7 +2064,7 @@ rxvt_term::menubar_expose () len = (TermWin.ncol - (menu->x + HSPACE)); drawbox_menubar (menu->x, len, +1); - draw_string (*menuBar.drawable, menubarGC, TermWin.fontset, + draw_string (*menuBar.drawable, menubarGC, TermWin.fontset[0], (Width2Pixel (menu->x) + Width2Pixel (HSPACE) / 2), SHADOW, menu->name, len); @@ -2127,7 +2127,7 @@ rxvt_term::menubar_expose () ncol -= (x + len + HSPACE); if (len > 0 && ncol >= 0) - draw_string (*menuBar.drawable, menubarGC, TermWin.fontset, + draw_string (*menuBar.drawable, menubarGC, TermWin.fontset[0], Width2Pixel (x) + Width2Pixel (ncol + HSPACE) / 2, SHADOW, title, len); } diff --git a/src/rxvtutil.C b/src/rxvtutil.C index f8cbf93e..8bb4a3fa 100644 --- a/src/rxvtutil.C +++ b/src/rxvtutil.C @@ -6,6 +6,8 @@ class byteorder byteorder; +unsigned int byteorder::e; + byteorder::byteorder () { union { @@ -21,5 +23,20 @@ byteorder::byteorder () e = w.u; } +void * +zero_initialized::operator new (size_t s) +{ + void *p = malloc (s); + + memset (p, 0, s); + return p; +} + +void +zero_initialized::operator delete (void *p, size_t s) +{ + free (p); +} + diff --git a/src/rxvtutil.h b/src/rxvtutil.h index d7aaad7c..9d55c701 100644 --- a/src/rxvtutil.h +++ b/src/rxvtutil.h @@ -116,5 +116,11 @@ struct stringvec : simplevec delete [] *c; } }; + +struct zero_initialized { + void *operator new (size_t s); + void operator delete (void *p, size_t s); +}; + #endif -- 2.34.1