From: ayin Date: Wed, 31 Oct 2007 09:55:23 +0000 (+0000) Subject: Remove trailing whitespace. X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=1fa3a236a960318e81275f96ec96f107bcd19c5a;p=dana%2Furxvt.git Remove trailing whitespace. --- diff --git a/src/background.C b/src/background.C index eac87fe3..fb800a8f 100644 --- a/src/background.C +++ b/src/background.C @@ -33,7 +33,7 @@ #define TIMING_TEST_START(id) \ struct timeval timing_test_##id##_stv;\ gettimeofday (&timing_test_##id##_stv, NULL); - + #define TIMING_TEST_PRINT_RESULT(id) \ do{ struct timeval tv;gettimeofday (&tv, NULL); tv.tv_sec -= (timing_test_##id##_stv).tv_sec;\ fprintf (stderr, "%s: %s: %d: elapsed %ld usec\n", #id, __FILE__, __LINE__,\ @@ -320,7 +320,7 @@ bgPixmap_t::set_geometry (const char *geom) x = y = defaultAlign; w = h = defaultScale; } - + if (!(flags & geometrySet)) geom_flags |= WidthValue|HeightValue|XValue|YValue; @@ -451,8 +451,8 @@ bgPixmap_t::render_asim (ASImage *background, ARGB32 background_tint) if ((w > 0 && w != original_asim->width) || (h > 0 && h != original_asim->height)) { - result = scale_asimage (target->asv, original_asim, - w > 0 ? w : original_asim->width, + result = scale_asimage (target->asv, original_asim, + w > 0 ? w : original_asim->width, h > 0 ? h : original_asim->height, background ? ASA_ASImage : ASA_XImage, 100, ASIMAGE_QUALITY_DEFAULT); @@ -467,8 +467,8 @@ bgPixmap_t::render_asim (ASImage *background, ARGB32 background_tint) if (h_scale == 0 || v_scale == 0) { ASImage *tmp = tile_asimage (target->asv, result, - (h_scale > 0) ? 0 : (int)result->width - x, - (v_scale > 0) ? 0 : (int)result->height - y, + (h_scale > 0) ? 0 : (int)result->width - x, + (v_scale > 0) ? 0 : (int)result->height - y, result->width, result->height, TINT_LEAVE_SAME, ASA_XImage, 100, ASIMAGE_QUALITY_DEFAULT); @@ -580,7 +580,7 @@ bgPixmap_t::render_asim (ASImage *background, ARGB32 background_tint) /* put result on pixmap */ if (dst_x < new_pmap_width && dst_y < new_pmap_height) asimage2drawable (target->asv, pixmap, result, gc, src_x, src_y, dst_x, dst_y, dst_width, dst_height, True); - + if (result != background && result != original_asim) destroy_asimage (&result); @@ -616,7 +616,7 @@ bgPixmap_t::set_file (const char *file) free (f); } return (original_asim != NULL); -# endif +# endif } return false; } @@ -624,7 +624,7 @@ bgPixmap_t::set_file (const char *file) # endif /* BG_IMAGE_FROM_FILE */ # ifdef ENABLE_TRANSPARENCY -bool +bool bgPixmap_t::set_transparent () { if (!(flags & isTransparent)) @@ -659,7 +659,7 @@ bgPixmap_t::set_blur_radius (const char *geom) ++changed; v_blurRadius = vr; } - + if (v_blurRadius == 0 && h_blurRadius == 0) flags &= ~blurNeeded; else @@ -696,7 +696,7 @@ compute_tint_shade_flags (rxvt_color *tint, int shade) flags |= bgPixmap_t::tintNeeded; } } - + if (flags & bgPixmap_t::tintNeeded) { if (flags & bgPixmap_t::tintWholesome) @@ -758,9 +758,9 @@ bgPixmap_t::set_shade (const char *shade_str) return false; } -/* make_transparency_pixmap() +/* make_transparency_pixmap() * Builds a pixmap sized the same as terminal window, with depth same as the root window - * that pixmap contains tiled portion of the root pixmap that is supposed to be covered by + * that pixmap contains tiled portion of the root pixmap that is supposed to be covered by * our window. */ unsigned long @@ -886,9 +886,9 @@ bgPixmap_t::make_transparency_pixmap () if (tiled_root_pmap != None) { - if (!need_client_side_rendering ()) + if (!need_client_side_rendering ()) { - if ((flags & tintNeeded)) + if ((flags & tintNeeded)) { if (flags & tintWholesome) { @@ -958,7 +958,7 @@ bgPixmap_t::make_transparency_pixmap () Picture overlay_pic = XRenderCreatePicture (dpy, overlay_pmap, solid_format, CPRepeat, &pa); XFreePixmap (dpy, overlay_pmap); - pa.component_alpha = True; + pa.component_alpha = True; Pixmap mask_pmap = XCreatePixmap (dpy, root, 1, 1, 32); Picture mask_pic = XRenderCreatePicture (dpy, mask_pmap, solid_format, CPRepeat|CPComponentAlpha, &pa); XFreePixmap (dpy, mask_pmap); @@ -984,7 +984,7 @@ bgPixmap_t::make_transparency_pixmap () XRenderFreePicture (dpy, back_pic); # if DO_TIMING_TEST XSync (dpy, False); -# endif +# endif # endif } } @@ -998,20 +998,20 @@ bgPixmap_t::make_transparency_pixmap () pmap_height = window_height; pmap_depth = root_depth; } - + if (gc) XFreeGC (dpy, gc); TIMING_TEST_PRINT_RESULT (tp); - - return result; + + return result; } bool bgPixmap_t::set_root_pixmap () { Pixmap new_root_pixmap = None; - + new_root_pixmap = target->get_pixmap_property (XA_XROOTPMAP_ID); if (new_root_pixmap == None) new_root_pixmap = target->get_pixmap_property (XA_ESETROOT_PMAP_ID); @@ -1169,10 +1169,10 @@ bgPixmap_t::render () TIMING_TEST_PRINT_RESULT (tp); - return true; + return true; } -bool +bool bgPixmap_t::set_target (rxvt_term *new_target) { if (new_target) @@ -1229,7 +1229,7 @@ bgPixmap_t::apply() XSetWindowBackground (target->dpy, target->scrollBar.win, target->pix_colors[Color_border]); # endif } - /* don't want Expose on the parent or vt. It is better to use + /* don't want Expose on the parent or vt. It is better to use scr_touch or we get a great deal of flicker otherwise: */ XClearWindow (target->dpy, target->parent[0]); diff --git a/src/background.h b/src/background.h index 378f6521..9937c470 100644 --- a/src/background.h +++ b/src/background.h @@ -47,7 +47,7 @@ struct bgPixmap_t { }; /* this flags are returned by make_transparency_pixmap if called */ bool check_clearChanged () { bool r = flags & hasChanged; flags &= ~hasChanged; return r; }; - + # ifdef BG_IMAGE_FROM_FILE # ifdef HAVE_AFTERIMAGE ASImage *original_asim; @@ -110,8 +110,8 @@ struct bgPixmap_t { bool render (); void invalidate () { if (!(flags & isInvalid)) - { - flags |= isInvalid; + { + flags |= isInvalid; invalid_since = NOW; } }; diff --git a/src/command.C b/src/command.C index 496d13fc..9a06a2f4 100644 --- a/src/command.C +++ b/src/command.C @@ -1036,8 +1036,8 @@ void rxvt_term::flush () { flush_ev.stop (); - -#ifdef HAVE_BG_PIXMAP + +#ifdef HAVE_BG_PIXMAP if (bgPixmap.check_clearChanged ()) { // scr_clear (true); This needs to be researched further! diff --git a/src/encoding.C b/src/encoding.C index 2ae763e2..a77f84d1 100644 --- a/src/encoding.C +++ b/src/encoding.C @@ -49,25 +49,25 @@ const struct n2cs { { "ISO885915", CS_ISO8859_15 }, { "FCD885915", CS_ISO8859_15 }, { "ISO885916", CS_ISO8859_16 }, - + { "TIS620*", CS_ISO8859_11 }, // close enough { "ISO10646*", CS_UNICODE }, { "UNICODE", CS_UNICODE }, { "UTF8", CS_UNICODE }, - + { "ASCII", CS_US_ASCII }, { "USASCII", CS_US_ASCII }, { "ANSIX341968", CS_US_ASCII }, { "ISO646.1991-IRV", CS_US_ASCII }, // older versions used the currency sign - + { "KOI8R*", CS_KOI8_R }, { "GOST1976874*", CS_KOI8_R }, { "KOI8RU", CS_KOI8_U }, { "KOI8U", CS_KOI8_U }, { "VISCII*", CS_VISCII }, - + { "JISX0201*", CS_JIS0201_1976_0 }, { "JISC6226*", CS_JIS0208_1990_0 }, // also wrongly matches -1987-0? (check Encode::JP) { "JISX0208*", CS_JIS0208_1990_0 }, // also wrongly matches -1987-0? (check Encode::JP) @@ -75,11 +75,11 @@ const struct n2cs { { "JISX021320001", CS_JIS0213_1 }, { "JISX021320002", CS_JIS0213_2 }, { "JISX0221*", CS_UNICODE }, // _very_ close - + { "KSC5601*", CS_KSC5601_1987_0 }, { "KSX1001*", CS_KSC5601_1987_0 }, { "KSC5700*", CS_UNICODE }, // unicode plus extensions - + { "BIG5P*", CS_BIG5_PLUS }, { "BIG5ETEN*", CS_BIG5_EXT }, { "BIG5*", CS_BIG5 }, @@ -220,7 +220,7 @@ static uint32_t cs_unicode_16_from_unicode (unicode_t unicode) { return unicode #else # define ENC(base) { cs_ ## base ## _from_unicode } #endif - + // order must match table in encoding.h(!) const rxvt_codeset_conv rxvt_codeset[NUM_CODESETS] = { diff --git a/src/feature.h b/src/feature.h index ba1d2b9e..fb2c9d0c 100644 --- a/src/feature.h +++ b/src/feature.h @@ -30,7 +30,7 @@ # define X11LIBDIR X11USRLIBDIR "/X11" #endif #ifndef XAPPLOADDIR -# define XAPPLOADDIR X11LIBDIR "/app-defaults" +# define XAPPLOADDIR X11LIBDIR "/app-defaults" # define XAPPLOADDIRLOCALE X11LIBDIR "/%s/app-defaults" #endif @@ -154,7 +154,7 @@ * Allow 80/132 mode switching on startup */ /* #define ALLOW_132_MODE */ - + /*---------------------------------KEYS---------------------------------*/ /* @@ -192,7 +192,7 @@ /* * Allow scrolling with modifier+Up/Down keys, in addition * to modifier+Prior/Next? (modifier is controlled with - * SCROLL_ON_* defines above.). + * SCROLL_ON_* defines above.). * Also for modifier+Home/End keys to move to top/bottom */ /* #define SCROLL_ON_UPDOWN_KEYS */ diff --git a/src/genlinedraw b/src/genlinedraw index fec6af58..35f4bc64 100755 --- a/src/genlinedraw +++ b/src/genlinedraw @@ -6,7 +6,7 @@ select TABLE; my $ch = 0x2500; # coordinate system: -# +# # 0..8 (equally spaced) 9,11 mid-1,mid+1, makes 4 bit # one point = 8 bit, two points = 16 bit @@ -76,19 +76,19 @@ while () { emit 0, 0, 10,10, 10 if $h & 1; emit 0, 0, 11,10, 11 if $h > 1; } - + if ($H) { emit 0,10, 9, 8, 9 if $H > 1; emit 0,10, 10, 8, 10 if $H & 1; emit 0,10, 11, 8, 11 if $H > 1; } - + if ($v) { emit 0, 9, 0, 9, 10 if $v > 1; emit 0,10, 0,10, 10 if $v & 1; emit 0,11, 0,11, 10 if $v > 1; } - + if ($V) { emit 0, 9, 10, 9, 8 if $V > 1; emit 0,10, 10,10, 8 if $V & 1; @@ -96,7 +96,7 @@ while () { } $offs[-1] = ($offs[-1] << 4) | ($offs - $offs[-1]); - + printf " // %04x\n", $ch; $ch++; } diff --git a/src/gentables b/src/gentables index c3ad723a..81e84378 100755 --- a/src/gentables +++ b/src/gentables @@ -297,7 +297,7 @@ EU iso8859_9 iso-8859-9 EU iso8859_10 iso-8859-10 EU iso8859_11 iso-8859-11 EU iso8859_13 iso-8859-13 -EU iso8859_14 iso-8859-14 +EU iso8859_14 iso-8859-14 DEFAULT iso8859_15 iso-8859-15 EU iso8859_16 iso-8859-16 JP jis0201_1976_0 jis0201-raw diff --git a/src/init.C b/src/init.C index 3069d028..d62c86b7 100644 --- a/src/init.C +++ b/src/init.C @@ -156,9 +156,9 @@ const char *const def_colorName[] = "rgb:00/00/cd", // 4: blue (Blue3) "rgb:cd/00/cd", // 5: magenta (Magenta3) "rgb:00/cd/cd", // 6: cyan (Cyan3) -# ifdef XTERM_COLORS +# ifdef XTERM_COLORS "rgb:e5/e5/e5", // 7: white (Grey90) -# else +# else "rgb:fa/eb/d7", // 7: white (AntiqueWhite) # endif /* high-intensity colors */ @@ -749,7 +749,7 @@ rxvt_term::Get_Colours () #ifdef OFF_FOCUS_FADING pix_colors = pix_colors_focused; #endif - + for (i = 0; i < (depth <= 2 ? 2 : NRS_COLORS); i++) { const char *name = rs[Rs_color + i]; diff --git a/src/iom_conf.h b/src/iom_conf.h index 03d7fda7..b454498d 100644 --- a/src/iom_conf.h +++ b/src/iom_conf.h @@ -1,17 +1,17 @@ /* iom_conf.h -- generic I/O multiplexer config Copyright (C) 2003-2006 Marc Lehmann - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA diff --git a/src/keyboard.C b/src/keyboard.C index 1c853419..2900d226 100644 --- a/src/keyboard.C +++ b/src/keyboard.C @@ -215,7 +215,7 @@ keyboard_manager::register_user_translation (KeySym keysym, unsigned int state, { char *middle = strchr (translation + 5, translation [4]); char *suffix = strrchr (translation + 5, translation [4]); - + if (suffix && middle && suffix > middle + 1) { key->type = keysym_t::LIST; @@ -467,7 +467,7 @@ keyboard_manager::find_keysym (KeySym keysym, unsigned int state) int hashkey = keysym & KEYSYM_HASH_MASK; unsigned int index = hash [hashkey]; unsigned int end = hashkey < KEYSYM_HASH_BUDGETS - 1 - ? hash [hashkey + 1] + ? hash [hashkey + 1] : keymap.size (); for (; index < end; ++index) diff --git a/src/main.C b/src/main.C index 22df33d2..239a031c 100644 --- a/src/main.C +++ b/src/main.C @@ -95,7 +95,7 @@ class rxvt_composite_vec rxvt_composite; text_t rxvt_composite_vec::compose (unicode_t c1, unicode_t c2) { compose_char *cc; - + // break compose chains, as stupid readline really likes to duplicate // composing characters for some reason near the end of a line. cc = (*this)[c1]; @@ -185,7 +185,7 @@ rxvt_term::rxvt_term () #ifdef USE_XIM im_ev (this, &rxvt_term::im_cb), #endif -#ifndef NO_BELL +#ifndef NO_BELL bell_ev (this, &rxvt_term::bell_cb), #endif termwin_ev (this, &rxvt_term::x_cb), @@ -436,7 +436,7 @@ print_x_error (Display *dpy, XErrorEvent *event) mesg, BUFSIZ); rxvt_warn (strncat (mesg, "\n", BUFSIZ), event->resourceid); } - XGetErrorDatabaseText(dpy, mtype, "ErrorSerial", "Error Serial #%d", + XGetErrorDatabaseText(dpy, mtype, "ErrorSerial", "Error Serial #%d", mesg, BUFSIZ); rxvt_warn (strncat (mesg, "\n", BUFSIZ), event->serial); } @@ -520,10 +520,10 @@ rxvt_term::init (int argc, const char *const *argv, stringvec *envv) if (option (Opt_transparent)) { bgPixmap.set_transparent (); -#ifdef HAVE_AFTERIMAGE +#ifdef HAVE_AFTERIMAGE if (rs [Rs_blurradius]) bgPixmap.set_blur_radius (rs [Rs_blurradius]); -#endif +#endif if (ISSET_PIXCOLOR (Color_tint)) bgPixmap.set_tint (pix_colors_focused [Color_tint]); if (rs [Rs_shade]) @@ -592,7 +592,7 @@ rxvt_term::init (int argc, const char *const *argv, stringvec *envv) static struct sig_handlers { sig_watcher sw_term, sw_int; - + /* * Catch a fatal signal and tidy up before quitting */ @@ -904,7 +904,7 @@ rxvt_term::set_fonts () resize_all_windows (0, 0, 0); scr_remap_chars (); scr_touch (true); - } + } return true; } @@ -958,7 +958,7 @@ rxvt_term::set_window_color (int idx, const char *color) #ifdef XTERM_COLOR_CHANGE rxvt_color xcol; int i; - + if (color == NULL || *color == '\0') return; @@ -1349,7 +1349,7 @@ xim_preedit_draw (XIC ic, XPointer client_data, XIMPreeditDrawCallbackStruct *ca } else str = (void *)text->string.wide_char; - + HOOK_INVOKE ((term, HOOK_XIM_PREEDIT_DRAW, DT_INT, call_data->caret, DT_INT, call_data->chg_first, @@ -1678,7 +1678,7 @@ rxvt_term::IMSetPosition () { im_set_size (preedit_rect); preedit_attr = XVaCreateNestedList (0, XNArea, &preedit_rect, NULL); - + XSetICValues (Input_Context, XNPreeditAttributes, preedit_attr, NULL); } diff --git a/src/misc.C b/src/misc.C index 4e56baff..1d4dd0fb 100644 --- a/src/misc.C +++ b/src/misc.C @@ -118,7 +118,7 @@ rxvt_utf8towcs (const char *str, int len) else if (s[0] < 0x80) *p++ = *s++; else if (len >= 2 - && s[0] >= 0xc2 && s[0] <= 0xdf + && s[0] >= 0xc2 && s[0] <= 0xdf && (s[1] & 0xc0) == 0x80) { *p++ = ((s[0] & 0x1f) << 6) @@ -146,9 +146,9 @@ rxvt_utf8towcs (const char *str, int len) && (s[2] & 0xc0) == 0x80 && (s[3] & 0xc0) == 0x80) { - *p++ = ((s[0] & 0x07) << 18) - | ((s[1] & 0x3f) << 12) - | ((s[2] & 0x3f) << 6) + *p++ = ((s[0] & 0x07) << 18) + | ((s[1] & 0x3f) << 12) + | ((s[2] & 0x3f) << 6) | (s[3] & 0x3f); s += 4; } diff --git a/src/rxvt.h b/src/rxvt.h index 342262de..64b7fc0b 100644 --- a/src/rxvt.h +++ b/src/rxvt.h @@ -93,7 +93,7 @@ class out_of_input { }; /* ***************************************************************************** - * PROTOTYPES + * PROTOTYPES ***************************************************************************** */ // main.C @@ -183,24 +183,24 @@ typedef struct _mwmhints { #if ENABLE_XEMBED // XEMBED messages -# define XEMBED_EMBEDDED_NOTIFY 0 -# define XEMBED_WINDOW_ACTIVATE 1 -# define XEMBED_WINDOW_DEACTIVATE 2 -# define XEMBED_REQUEST_FOCUS 3 -# define XEMBED_FOCUS_IN 4 -# define XEMBED_FOCUS_OUT 5 -# define XEMBED_FOCUS_NEXT 6 +# define XEMBED_EMBEDDED_NOTIFY 0 +# define XEMBED_WINDOW_ACTIVATE 1 +# define XEMBED_WINDOW_DEACTIVATE 2 +# define XEMBED_REQUEST_FOCUS 3 +# define XEMBED_FOCUS_IN 4 +# define XEMBED_FOCUS_OUT 5 +# define XEMBED_FOCUS_NEXT 6 # define XEMBED_FOCUS_PREV 7 -# define XEMBED_MODALITY_ON 10 -# define XEMBED_MODALITY_OFF 11 -# define XEMBED_REGISTER_ACCELERATOR 12 -# define XEMBED_UNREGISTER_ACCELERATOR 13 +# define XEMBED_MODALITY_ON 10 +# define XEMBED_MODALITY_OFF 11 +# define XEMBED_REGISTER_ACCELERATOR 12 +# define XEMBED_UNREGISTER_ACCELERATOR 13 # define XEMBED_ACTIVATE_ACCELERATOR 14 // XEMBED detail code -# define XEMBED_FOCUS_CURRENT 0 -# define XEMBED_FOCUS_FIRST 1 +# define XEMBED_FOCUS_CURRENT 0 +# define XEMBED_FOCUS_FIRST 1 # define XEMBED_FOCUS_LAST 2 # define XEMBED_MAPPED (1 << 0) @@ -423,7 +423,7 @@ enum { C0_BS , C0_HT , C0_LF , C0_VT , C0_FF , C0_CR , C0_SO , C0_SI , C0_DLE, C0_DC1, C0_DC2, D0_DC3, C0_DC4, C0_NAK, C0_SYN, C0_ETB, C0_CAN, C0_EM , C0_SUB, C0_ESC, C0_IS4, C0_IS3, C0_IS2, C0_IS1, -}; +}; #define CHAR_ST 0x9c /* 0234 */ /* @@ -855,7 +855,7 @@ struct rxvt_term : zero_initialized, rxvt_vars, rxvt_screen { static const char resval_undef []; // options specifically unset static const char resval_on []; // boolean options switched on static const char resval_off []; // or off - + log_callback *log_hook; // log error messages through this hook, if != 0 getfd_callback *getfd_hook; // convert remote to local fd, if != 0 #if ENABLE_PERL @@ -1076,7 +1076,7 @@ struct rxvt_term : zero_initialized, rxvt_vars, rxvt_screen { #ifdef TEXT_BLINK void text_blink_cb (time_watcher &w); time_watcher text_blink_ev; #endif -#ifndef NO_BELL +#ifndef NO_BELL void bell_cb (time_watcher &w); time_watcher bell_ev; #endif diff --git a/src/rxvtc.C b/src/rxvtc.C index 435d67f0..38edc015 100644 --- a/src/rxvtc.C +++ b/src/rxvtc.C @@ -47,13 +47,13 @@ client::client () { sockaddr_un sa; char *sockname = rxvt_connection::unix_sockname (); - + if (strlen(sockname) >= sizeof(sa.sun_path)) { fputs ("socket name too long, aborting.\n", stderr); exit (STATUS_FAILURE); } - + if ((fd = socket (AF_UNIX, SOCK_STREAM, 0)) < 0) { perror ("unable to create communications socket"); diff --git a/src/rxvtd.C b/src/rxvtd.C index 138a67b1..feff51f6 100644 --- a/src/rxvtd.C +++ b/src/rxvtd.C @@ -72,7 +72,7 @@ unix_listener::unix_listener (const char *sockname) : accept_ev (this, &unix_listener::accept_cb) { sockaddr_un sa; - + if (strlen (sockname) >= sizeof(sa.sun_path)) { fputs ("socket name too long, aborting.\n", stderr); @@ -163,7 +163,7 @@ void server::read_cb (io_watcher &w, short revents) { stringvec *argv = new stringvec; stringvec *envv = new stringvec; - + for (;;) { if (!recv (tok)) @@ -193,12 +193,12 @@ void server::read_cb (io_watcher &w, short revents) { rxvt_term *term = new rxvt_term; - + term->log_hook = &log_cb; term->getfd_hook = &getfd_cb; bool success; - + try { success = term->init (argv, envv); @@ -246,7 +246,7 @@ main (int argc, const char *const *argv) return EXIT_FAILURE; } } - + chdir ("/"); if (opt_opendisplay) diff --git a/src/rxvtfont.C b/src/rxvtfont.C index 45eb7798..e140daae 100644 --- a/src/rxvtfont.C +++ b/src/rxvtfont.C @@ -45,12 +45,12 @@ const struct rxvt_fallback_font { { CS_ISO8859_1, "-*-*-*-r-*--*-*-*-*-c-*-iso8859-1" }, { CS_ISO8859_15, "-*-*-*-r-*--*-*-*-*-c-*-iso8859-15" }, { CS_ISO8859_15, "-*-*-*-r-*--*-*-*-*-c-*-fcd8859-15" }, - -#if ENCODING_EU - // cyrillic + +#if ENCODING_EU + // cyrillic { CS_KOI8_R, "-*-*-*-r-*--*-*-*-*-c-*-koi8-r" }, { CS_KOI8_U, "-*-*-*-r-*--*-*-*-*-c-*-koi8-u" }, - + { CS_ISO8859_2, "-*-*-*-r-*--*-*-*-*-c-*-iso8859-2" }, { CS_ISO8859_3, "-*-*-*-r-*--*-*-*-*-c-*-iso8859-3" }, { CS_ISO8859_4, "-*-*-*-r-*--*-*-*-*-c-*-iso8859-4" }, @@ -67,7 +67,7 @@ const struct rxvt_fallback_font { # if XFT { CS_KOI8_U, "xft::lang=ru" }, - + { CS_ISO8859_5, "xft::lang=ru" }, { CS_ISO8859_6, "xft::lang=ar" }, { CS_ISO8859_7, "xft::lang=el" }, @@ -233,7 +233,7 @@ rxvt_font::clear_rect (rxvt_drawable &d, int x, int y, int w, int h, int color) { dTermDisplay; dTermGC; - + if (color == Color_bg || color == Color_transparent) XClearArea (disp, d, x, y, w, h, false); else if (color >= 0) @@ -252,7 +252,7 @@ rxvt_font::clear_rect (rxvt_drawable &d, int x, int y, int w, int h, int color) done = true; } } -#endif +#endif if (!done) XftDrawRect (d, &term->pix_colors[color].c, x, y, w, h); #else @@ -407,7 +407,7 @@ rxvt_font_default::draw (rxvt_drawable &d, int x, int y, if (a) { static char bm[] = { 0,0 , 3,1 , 1,2 , 1,0 }; - + gcv.fill_style = FillStippled; gcv.stipple = XCreateBitmapFromData (disp, d, bm + a * 2, 2, 2); gcv.ts_x_origin = x; @@ -676,7 +676,7 @@ rxvt_font_x11::load (const rxvt_fontprop &prop, bool force_prop) if (prop.weight != rxvt_fontprop::unset) { - replace_field (fname, name, 2, 0, + replace_field (fname, name, 2, 0, prop.weight < rxvt_fontprop::bold ? "medium" : "bold"); set_name (strdup (fname)); @@ -830,7 +830,7 @@ rxvt_font_x11::load (const rxvt_fontprop &prop, bool force_prop) if (encm) N += (f->max_byte1 - f->min_byte1) * (f->max_char_or_byte2 - f->min_char_or_byte2 + 1); - + while (N) { if (f->per_char[N].width > width) @@ -992,7 +992,7 @@ rxvt_font_x11::draw (rxvt_drawable &d, int x, int y, clear_rect (d, x, y, term->fwidth * len, term->fheight, bg); XChangeGC (disp, gc, GCForeground | GCFont, &v); - + if (slow) { do @@ -1024,7 +1024,7 @@ rxvt_font_x11::draw (rxvt_drawable &d, int x, int y, clear_rect (d, x, y, term->fwidth * len, term->fheight, bg); XChangeGC (disp, gc, GCForeground | GCFont, &v); - + if (slow) { do @@ -1290,7 +1290,7 @@ rxvt_font_xft::draw (rxvt_drawable &d, int x, int y, int h = term->fheight; /* TODO: this logic needs some more thinking, since we no longer do pseudo-transparency. - * Maybe make buffering into a resource flag? Compile time option doesn't seems like a + * Maybe make buffering into a resource flag? Compile time option doesn't seems like a * good idea from the perspective of packaging for wide variety of user configs. */ bool buffered = true @@ -1312,7 +1312,7 @@ rxvt_font_xft::draw (rxvt_drawable &d, int x, int y, while (len && *text == NOCHAR) text++, len--, cwidth += term->fwidth; - + if (fc != ' ') // skip spaces { FT_UInt glyph = XftCharIndex (disp, f, fc); @@ -1345,17 +1345,17 @@ rxvt_font_xft::draw (rxvt_drawable &d, int x, int y, if (bg >= 0 && term->pix_colors[bg].c.color.alpha < 0x0ff00) dst = XftDrawPicture (d2); - + if (bg < 0 || dst != 0) { - int src_x = x, src_y = y ; - + int src_x = x, src_y = y ; + if (term->bgPixmap.is_parentOrigin ()) { src_x += term->window_vt_x; src_y += term->window_vt_y; } - + if (term->bgPixmap.pmap_width >= src_x+w && term->bgPixmap.pmap_height >= src_y+h) { @@ -1447,7 +1447,7 @@ rxvt_font * rxvt_fontset::new_font (const char *name, codeset cs) { rxvt_font *f; - + if (!name || !*name) { name = ""; @@ -1676,7 +1676,7 @@ rxvt_fontset::find_font (unicode_t unicode) char fontname[4096]; sprintf (fontname, "xft:%-.4090s", font); - fonts.push_back (new_font (fontname, CS_UNICODE)); + fonts.push_back (new_font (fontname, CS_UNICODE)); } free (font); diff --git a/src/rxvtlib.h.in b/src/rxvtlib.h.in index b2723f72..021d2723 100644 --- a/src/rxvtlib.h.in +++ b/src/rxvtlib.h.in @@ -103,7 +103,7 @@ struct line_t; * |························= row_buf[2] etc. * | * +------------+···········= term_start + top_row - * | scrollback | + * | scrollback | * | scrollback +---------+·= term_start + view_start * | scrollback | display | * | scrollback | display | diff --git a/src/rxvtperl.xs b/src/rxvtperl.xs index 489fabb3..44a7c29b 100644 --- a/src/rxvtperl.xs +++ b/src/rxvtperl.xs @@ -384,7 +384,7 @@ rxvt_perl_interp::invoke (rxvt_term *term, hook_type htype, ...) if (htype == HOOK_REFRESH_END) { AV *av = (AV *)SvRV (*hv_fetch ((HV *)SvRV ((SV *)term->perl.self), "_overlay", 8, 0)); - + for (int i = 0; i <= AvFILL (av); i++) ((overlay *)SvIV (*av_fetch (av, i, 0)))->swap (); } @@ -593,7 +593,7 @@ rxvt_perl_interp::invoke (rxvt_term *term, hook_type htype, ...) if (htype == HOOK_REFRESH_BEGIN) { AV *av = (AV *)SvRV (*hv_fetch ((HV *)SvRV ((SV *)term->perl.self), "_overlay", 8, 0)); - + for (int i = AvFILL (av); i >= 0; i--) ((overlay *)SvIV (*av_fetch (av, i, 0)))->swap (); } @@ -601,7 +601,7 @@ rxvt_perl_interp::invoke (rxvt_term *term, hook_type htype, ...) { clearSVptr ((SV *)term->perl.self); SvREFCNT_dec ((SV *)term->perl.self); - + // don't allow further calls term->perl.self = 0; } @@ -1674,7 +1674,7 @@ rxvt_term::XListProperties (Window window) EXTEND (SP, count); while (count--) PUSHs (newSVuv ((U32)props [count])); - + XFree (props); } diff --git a/src/rxvttoolkit.C b/src/rxvttoolkit.C index 9503dd39..59bff554 100644 --- a/src/rxvttoolkit.C +++ b/src/rxvttoolkit.C @@ -668,7 +668,7 @@ insert_component (unsigned int value, unsigned int mask, unsigned int shift) { return (value * (mask + 1) >> 16) << shift; } - + bool rxvt_color::alloc (rxvt_screen *screen, const rgba &color) { @@ -797,7 +797,7 @@ rxvt_color::set (rxvt_screen *screen, const rgba &color) for (int i = 0; i < cmap_size; i++) colors [i].pixel = i; - + // many kilobytes transfer per colour, but pseudocolor isn't worth // many extra optimisations. XQueryColors (screen->dpy, screen->cmap, colors, cmap_size); @@ -820,7 +820,7 @@ rxvt_color::set (rxvt_screen *screen, const rgba &color) //rxvt_warn ("could not allocate %04x %04x %04x, getting %04x %04x %04x instead (%d)\n", // color.r, color.g, color.b, best->red, best->green, best->blue, diff); - + got = alloc (screen, rgba (best->red, best->green, best->blue)); delete [] colors; @@ -858,7 +858,7 @@ rxvt_color::get (XColor &color) color.pixel = (Pixel)*this; } -void +void rxvt_color::free (rxvt_screen *screen) { if (screen->visual->c_class == TrueColor) diff --git a/src/rxvttoolkit.h b/src/rxvttoolkit.h index c7bae0f0..3e3c15f6 100644 --- a/src/rxvttoolkit.h +++ b/src/rxvttoolkit.h @@ -308,7 +308,7 @@ struct rxvt_color { void get (rgba &color); void get (XColor &color); - + bool set (rxvt_screen *screen, const char *name); bool set (rxvt_screen *screen, const rgba &color); diff --git a/src/rxvtutil.C b/src/rxvtutil.C index 739848da..4aac2eb6 100644 --- a/src/rxvtutil.C +++ b/src/rxvtutil.C @@ -94,11 +94,11 @@ void * rxvt_temp_buf (int len) { if (len > temp_len) - { + { temp_buf = realloc (temp_buf, len); temp_len = len; } - + return temp_buf; } diff --git a/src/rxvtutil.h b/src/rxvtutil.h index 98af6952..7de27ebc 100644 --- a/src/rxvtutil.h +++ b/src/rxvtutil.h @@ -92,7 +92,7 @@ struct zero_initialized { }; /* simplevec taken (and heavily modified), from: - * + * * MICO --- a free CORBA implementation * Copyright (C) 1997-98 Kay Roemer & Arno Puder */ diff --git a/src/screen.C b/src/screen.C index 6edee5cb..b4509afa 100644 --- a/src/screen.C +++ b/src/screen.C @@ -276,7 +276,7 @@ rxvt_term::scr_reset () line_t *old_buf = row_buf; row_buf = (line_t *)rxvt_calloc (total_rows + nrow, sizeof (line_t)); - + int p = MOD (term_start + prev_nrow, prev_total_rows); // previous row int pend = MOD (term_start + top_row , prev_total_rows); int q = total_rows; // rewrapped row @@ -330,7 +330,7 @@ rxvt_term::scr_reset () // see below for cursor adjustment rationale if (p == ocur.row) screen.cur.row = q - (total_rows - nrow); - + // fill a single destination line while (lofs < llen && qcol < ncol) { @@ -366,7 +366,7 @@ rxvt_term::scr_reset () term_start = total_rows - nrow; top_row = q - term_start; - + // make sure all terminal lines exist while (top_row > 0) scr_blank_screen_mem (ROW (--top_row), DEFAULT_RSTYLE); @@ -374,7 +374,7 @@ rxvt_term::scr_reset () else { // if no scrollback exists (yet), wing, instead of wrap - + for (int row = min (nrow, prev_nrow); row--; ) { line_t &pline = old_buf [MOD (term_start + row, prev_total_rows)]; @@ -666,7 +666,7 @@ rxvt_term::scr_scroll_text (int row1, int row2, int count) NOTHROW ::swap (l1, l2); l2.touch (); } - + // move and/or clear selection, if any if (selection.op && current_screen == selection.screen) { @@ -712,7 +712,7 @@ rxvt_term::scr_scroll_text (int row1, int row2, int count) NOTHROW selection.beg.row -= count; selection.end.row -= count; selection.mark.row -= count; - + selection_check (0); } } @@ -834,7 +834,7 @@ rxvt_term::scr_add_lines (const wchar_t *str, int len, int minlines) NOTHROW if (screen.flags & Screen_WrapNext) { scr_do_wrap (); - + line->l = ncol; line->is_longer (1); @@ -1062,7 +1062,7 @@ rxvt_term::scr_tab (int count, bool ht) NOTHROW if (!--count) break; } - else + else ht &= l.t[i] == ' ' && RS_SAME (l.r[i], base_rend); @@ -1673,7 +1673,7 @@ rxvt_term::scr_report_position () NOTHROW { tt_printf ("\033[%d;%dR", screen.cur.row + 1, screen.cur.col + 1); } - + /* ------------------------------------------------------------------------- * * FONTS * * ------------------------------------------------------------------------- */ @@ -1736,7 +1736,7 @@ rxvt_term::scr_charset_set (int set, unsigned int ch) NOTHROW set_font_style (); } - + /* ------------------------------------------------------------------------- * * MAJOR SCREEN MANIPULATION * * ------------------------------------------------------------------------- */ @@ -2490,7 +2490,7 @@ rxvt_term::scr_recolour () NOTHROW scr_touch (true); want_refresh = 1; #endif - + } /* ------------------------------------------------------------------------- */ @@ -2607,7 +2607,7 @@ rxvt_term::scr_dump (int fd) NOTHROW } } #endif - + /* ------------------------------------------------------------------------- * * CHARACTER SELECTION * * ------------------------------------------------------------------------- */ @@ -2754,7 +2754,7 @@ rxvt_term::selection_paste (Window win, Atom prop, bool delete_prop) NOTHROW incr_buf_size = 0; incr_ev.stop (); } - else + else { if (selection_wait == Sel_normal && (win != display->root || prop != XA_CUT_BUFFER0)) // avoid recursion @@ -2842,7 +2842,7 @@ rxvt_term::selection_property (Window win, Atom prop) NOTHROW /* ------------------------------------------------------------------------- */ /* - * Request the current selection: + * Request the current selection: * Order: > internal selection if available * > PRIMARY, SECONDARY, CLIPBOARD if ownership is claimed (+) * > CUT_BUFFER0 @@ -3130,7 +3130,7 @@ rxvt_term::selection_start_colrow (int col, int row) NOTHROW while (selection.mark.col > 0 && ROW(selection.mark.row).t[selection.mark.col] == NOCHAR) --selection.mark.col; - + if (selection.op) { /* clear the old selection */ selection.beg.row = selection.end.row = selection.mark.row; @@ -3659,7 +3659,7 @@ rxvt_term::selection_send (const XSelectionRequestEvent &rq) NOTHROW XSendEvent (dpy, rq.requestor, False, 0L, (XEvent *)&ev); } - + /* ------------------------------------------------------------------------- * * MOUSE ROUTINES * * ------------------------------------------------------------------------- */ diff --git a/src/urxvt.pm b/src/urxvt.pm index 0153bfe0..b84b89ad 100644 --- a/src/urxvt.pm +++ b/src/urxvt.pm @@ -930,7 +930,7 @@ sub invoke { if ($htype == 0) { # INIT my @dirs = ((split /:/, $TERM->resource ("perl_lib")), "$LIBDIR/perl"); - + my %ext_arg; { @@ -2004,7 +2004,7 @@ fractional number of seconds since the epoch. Example: ->cb (sub { $term->{overlay}->set (0, 0, sprintf "%2d:%02d:%02d", (localtime urxvt::NOW)[2,1,0]); - }); + }); =over 4 @@ -2137,7 +2137,7 @@ process exits, after which they stop automatically. ->cb (sub { my ($pw, $exit_status) = @_; ... - }); + }); =over 4