aboutsummaryrefslogtreecommitdiffhomepage
path: root/output.cpp
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-02-09 16:06:24 -0800
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-02-09 16:06:24 -0800
commit19cd7a248d20001e2e0c491987ca19cefcf8201b (patch)
tree3181c05bbb841c03ac6f2bfe203cf29c76b807b2 /output.cpp
parentf1b1d1ca7526dd9797b9f406e2351b8a9fbacbdf (diff)
Cleanup of wildcard.cpp, removing ad-hoc hash table and halloc
Diffstat (limited to 'output.cpp')
-rw-r--r--output.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/output.cpp b/output.cpp
index 979d9c38..6d085c9c 100644
--- a/output.cpp
+++ b/output.cpp
@@ -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();
}
-
-