mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-16 23:08:32 +00:00
Allow people to select the old console behavior of white text on a black
background, by using the startup flag '-B'. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@147262 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -2795,6 +2795,8 @@ static void ast_readconfig(void)
|
||||
ast_verbose("Invalid Entity ID '%s' provided\n", v->value);
|
||||
} else if (!strcasecmp(v->name, "lightbackground")) {
|
||||
ast_set2_flag(&ast_options, ast_true(v->value), AST_OPT_FLAG_LIGHT_BACKGROUND);
|
||||
} else if (!strcasecmp(v->name, "forceblackbackground")) {
|
||||
ast_set2_flag(&ast_options, ast_true(v->value), AST_OPT_FLAG_FORCE_BLACK_BACKGROUND);
|
||||
}
|
||||
}
|
||||
for (v = ast_variable_browse(cfg, "compat"); v; v = v->next) {
|
||||
@@ -2937,7 +2939,7 @@ int main(int argc, char *argv[])
|
||||
if (getenv("HOME"))
|
||||
snprintf(filename, sizeof(filename), "%s/.asterisk_history", getenv("HOME"));
|
||||
/* Check for options */
|
||||
while ((c = getopt(argc, argv, "mtThfFdvVqprRgciInx:U:G:C:L:M:e:s:W")) != -1) {
|
||||
while ((c = getopt(argc, argv, "mtThfFdvVqprRgciInx:U:G:C:L:M:e:s:WB")) != -1) {
|
||||
switch (c) {
|
||||
#if defined(HAVE_SYSINFO)
|
||||
case 'e':
|
||||
@@ -3031,6 +3033,11 @@ int main(int argc, char *argv[])
|
||||
break;
|
||||
case 'W': /* White background */
|
||||
ast_set_flag(&ast_options, AST_OPT_FLAG_LIGHT_BACKGROUND);
|
||||
ast_clear_flag(&ast_options, AST_OPT_FLAG_FORCE_BLACK_BACKGROUND);
|
||||
break;
|
||||
case 'B': /* Force black background */
|
||||
ast_set_flag(&ast_options, AST_OPT_FLAG_FORCE_BLACK_BACKGROUND);
|
||||
ast_clear_flag(&ast_options, AST_OPT_FLAG_LIGHT_BACKGROUND);
|
||||
break;
|
||||
case '?':
|
||||
exit(1);
|
||||
|
||||
Reference in New Issue
Block a user