From a91a08f82badb99a0f6c97e3dab1352d43c5aa2f Mon Sep 17 00:00:00 2001 From: Kalle Olavi Niemitalo Date: Sun, 19 Apr 2009 18:28:49 +0300 Subject: [PATCH] Named constants in terminal option defaults When setting up default values for terminal options, use named constants like TERM_VT100 or COLOR_MODE_16, rather than plain integers like 1. This is just to make the source code easier to read and perhaps more resistant to future bugs. The binary should not change. --- src/config/options.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/config/options.c b/src/config/options.c index 14ab8db9a..5bf518140 100644 --- a/src/config/options.c +++ b/src/config/options.c @@ -684,23 +684,23 @@ static inline void register_autocreated_options(void) { /* TODO: Use table-driven initialization. --jonas */ - get_opt_int("terminal.linux.type") = 2; - get_opt_int("terminal.linux.colors") = 1; + get_opt_int("terminal.linux.type") = TERM_LINUX; + get_opt_int("terminal.linux.colors") = COLOR_MODE_16; get_opt_bool("terminal.linux.m11_hack") = 1; - get_opt_int("terminal.vt100.type") = 1; - get_opt_int("terminal.vt110.type") = 1; - get_opt_int("terminal.xterm.type") = 1; + get_opt_int("terminal.vt100.type") = TERM_VT100; + get_opt_int("terminal.vt110.type") = TERM_VT100; + get_opt_int("terminal.xterm.type") = TERM_VT100; get_opt_bool("terminal.xterm.underline") = 1; - get_opt_int("terminal.xterm-color.type") = 1; + get_opt_int("terminal.xterm-color.type") = TERM_VT100; get_opt_int("terminal.xterm-color.colors") = COLOR_MODE_16; get_opt_bool("terminal.xterm-color.underline") = 1; #ifdef CONFIG_88_COLORS - get_opt_int("terminal.xterm-88color.type") = 1; + get_opt_int("terminal.xterm-88color.type") = TERM_VT100; get_opt_int("terminal.xterm-88color.colors") = COLOR_MODE_88; get_opt_bool("terminal.xterm-88color.underline") = 1; #endif #ifdef CONFIG_256_COLORS - get_opt_int("terminal.xterm-256color.type") = 1; + get_opt_int("terminal.xterm-256color.type") = TERM_VT100; get_opt_int("terminal.xterm-256color.colors") = COLOR_MODE_256; get_opt_bool("terminal.xterm-256color.underline") = 1; #endif