diff options
author | Peter Ammon <corydoras@ridiculousfish.com> | 2012-01-14 02:42:17 -0800 |
---|---|---|
committer | Peter Ammon <corydoras@ridiculousfish.com> | 2012-01-14 02:42:17 -0800 |
commit | a359f45df219e6a3845870ca69b4116083d787f7 (patch) | |
tree | 08454add430170b4113659caf084f9a8801f77c3 /input.cpp | |
parent | e8b6d48ad038089e37730990212676e50a8d2352 (diff) |
Redesign new environment variables to use env_var_t instead of wcstring
Migrate uses of empty() to missing() to distinguish between empty variable and unset variable
Diffstat (limited to 'input.cpp')
-rw-r--r-- | input.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -8,6 +8,7 @@ #include <stdlib.h> #include <stdio.h> +#include <assert.h> #include <string.h> #include <errno.h> #include <termios.h> @@ -324,7 +325,9 @@ int input_init() debug( 0, _( L"Could not set up terminal" ) ); exit(1); } - output_set_term( env_get_string( L"TERM" ).c_str() ); + const env_var_t term = env_get_string( L"TERM" ); + assert(! term.missing()); + output_set_term( term.c_str() ); input_terminfo_init(); |