From: ayin Date: Sun, 28 Oct 2007 11:25:04 +0000 (+0000) Subject: Nuke rxvt_strdup. X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=06b4dea2bee8be27db11caf6adb151f16b4b9d6d;p=dana%2Furxvt.git Nuke rxvt_strdup. --- diff --git a/src/init.C b/src/init.C index 009d5a44..3069d028 100644 --- a/src/init.C +++ b/src/init.C @@ -659,7 +659,7 @@ rxvt_term::set_locale (const char *locale) } - this->locale = rxvt_strdup (this->locale); + this->locale = strdup (this->locale); SET_LOCALE (this->locale); mbstate.reset (); #endif diff --git a/src/rxvt.h b/src/rxvt.h index 1c5ef050..342262de 100644 --- a/src/rxvt.h +++ b/src/rxvt.h @@ -107,8 +107,6 @@ wchar_t * rxvt_mbstowcs (const char *str, int len = -1 char * rxvt_wcstoutf8 (const wchar_t *str, int len = -1); wchar_t * rxvt_utf8towcs (const char *str, int len = -1); -#define rxvt_strdup(s) ((s) ? strdup(s) : 0) - char * rxvt_basename (const char *str) NOTHROW; void rxvt_vlog (const char *fmt, va_list arg_ptr) NOTHROW; void rxvt_log (const char *fmt,...) NOTHROW; diff --git a/src/rxvtfont.C b/src/rxvtfont.C index c24d721f..45eb7798 100644 --- a/src/rxvtfont.C +++ b/src/rxvtfont.C @@ -514,7 +514,7 @@ rxvt_font_x11::get_property (XFontStruct *f, Atom property, const char *repl) co if (XGetFontProperty (f, property, &value)) return XGetAtomName (term->dpy, value); else - return rxvt_strdup (repl); + return repl ? strdup (repl) : 0; } rxvt_fontprop