diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2012-02-09 16:06:24 -0800 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2012-02-09 16:06:24 -0800 |
commit | 19cd7a248d20001e2e0c491987ca19cefcf8201b (patch) | |
tree | 3181c05bbb841c03ac6f2bfe203cf29c76b807b2 /output.cpp | |
parent | f1b1d1ca7526dd9797b9f406e2351b8a9fbacbdf (diff) |
Cleanup of wildcard.cpp, removing ad-hoc hash table and halloc
Diffstat (limited to 'output.cpp')
-rw-r--r-- | output.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -113,7 +113,7 @@ static int (*out)(char c) = &writeb_internal; /** Name of terminal */ -static wchar_t *current_term = 0; +static wcstring current_term; void output_set_writer( int (*writer)(char) ) @@ -570,12 +570,10 @@ int output_color_code( const wcstring &val, bool is_background ) { void output_set_term( const wchar_t *term ) { - current_term = halloc_wcsdup(global_context, term); + current_term = term; } -wchar_t *output_get_term() +const wchar_t *output_get_term() { - return (wchar_t *)(current_term ? current_term : L"<unknown>"); + return current_term.empty() ? L"<unknown>" : current_term.c_str(); } - - |