case XTerm_font:
change_font (str);
break;
+#ifndef NO_FRILLS
case XTerm_locale:
if (str[0] == '?' && !str[1])
tt_printf ("%-.250s\n", locale);
else
{
set_locale (str);
+# ifdef USE_XIM
im_cb ();
-
+# endif
// TODO: call selection_make with the right values set
// to re-fresh the selection.
if (display->selection_owner == this)
display->set_selection_owner (0);
}
break;
+#endif
#if 0
case XTerm_dumpscreen: /* no error notices */
{
struct rxvt_drawable {
rxvt_display *display;
Drawable drawable;
-# if XFT
+#if XFT
XftDraw *xftdrawable;
+ operator XftDraw *();
#endif
+
rxvt_drawable (rxvt_display *display, Drawable drawable)
- : display(display), drawable(drawable), xftdrawable(0) { }
+ : display(display),
+#if XFT
+ xftdrawable(0),
+#endif
+ drawable(drawable)
+ { }
+
+#if XFT
~rxvt_drawable ();
+#endif
operator Drawable() { return drawable; }
- operator XftDraw *();
};
struct rxvt_font {
* Copyright (c) 1996 mj olesen <olesen@me.QueensU.CA> Queen's Univ at Kingston
* Copyright (c) 1997,1998 Oezguer Kesim <kesim@math.fu-berlin.de>
* Copyright (c) 1998-2000 Geoff Wing <gcw@pobox.com>
+ * Copyright (c) 2003-2004 Marc Lehmann <pcg@goof.com>
*
* 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
}
/* EXTPROTO */
-char *
+char *
rxvt_r_basename (const char *str)
{
- char *base = STRRCHR (str, '/');
+ char *base = STRRCHR (str, '/');
return (char *) (base ? base + 1 : str);
}
void
rxvt_print_error (const char *fmt,...)
{
- va_list arg_ptr;
+ va_list arg_ptr;
va_start (arg_ptr, fmt);
fprintf (stderr, APL_NAME ": ");
int
rxvt_Str_match (const char *s1, const char *s2)
{
- int n = STRLEN (s2);
+ int n = STRLEN (s2);
return ((STRNCMP (s1, s2, n) == 0) ? n : 0);
}
/* EXTPROTO */
-const char *
+const char *
rxvt_Str_skip_space (const char *str)
{
if (str)
while (*str && isspace (*str))
str++;
+
return str;
}
char *
rxvt_Str_trim (char *str)
{
- char *r, *s;
- int n;
+ char *r, *s;
+ int n;
if (!str || !*str) /* shortcut */
return str;
s++;
n -= 2;
}
+
/* copy back over: forwards copy */
for (r = str; n; n--)
*r++ = *s++;