diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2012-02-07 23:17:20 -0800 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2012-02-07 23:17:20 -0800 |
commit | 6a31457c6d764425f8039a6159e92b5f84a2a0c5 (patch) | |
tree | 539548653d9309533aa909566cd82f624e8670f9 /input.cpp | |
parent | e6f7912a25361eccdaa2355d4c907f401bcc5311 (diff) |
Really excise halloc from input.cpp
Diffstat (limited to 'input.cpp')
-rw-r--r-- | input.cpp | 17 |
1 files changed, 5 insertions, 12 deletions
@@ -67,8 +67,6 @@ #include "output.h" #include "intern.h" -#include "halloc.h" -#include "halloc_util.h" #include <vector> /** @@ -734,8 +732,10 @@ static void input_terminfo_init() const wchar_t *input_terminfo_get_sequence( const wchar_t *name ) { + ASSERT_IS_MAIN_THREAD(); + const char *res = 0; - static string_buffer_t *buff = 0; + static wcstring buff; int err = ENOENT; CHECK( name, 0 ); @@ -758,15 +758,8 @@ const wchar_t *input_terminfo_get_sequence( const wchar_t *name ) return 0; } - if( !buff ) - { - buff = sb_halloc( global_context ); - } - - sb_clear( buff ); - sb_printf( buff, L"%s", res ); - - return (wchar_t *)buff->buff; + buff = format_string(L"%s", res); + return buff.c_str(); } |