![]() |
Freeciv21
Develop your civilization from humble roots to a global empire
|
#include <fc_config.h>#include <cstdarg>#include <cstdio>#include "fcbacktrace.h"#include "fciconv.h"#include "fcintl.h"#include "log.h"#include "support.h"#include <readline/readline.h>#include "game.h"#include "console.h"#include "notify.h"
Include dependency graph for console.cpp:Go to the source code of this file.
Functions | |
| static void | con_update_prompt () |
| Print the prompt if it is not the last thing printed. More... | |
| void | con_log_init (const QString &log_filename) |
| Initialize logging via console. More... | |
| void | con_log_close () |
| Deinitialize logging. More... | |
| void | con_set_color (const char *col) |
| void | con_write (enum rfc_status rfc_status, const char *message,...) |
| Write to console and add line-break, and show prompt if required. More... | |
| void | con_puts (enum rfc_status rfc_status, const char *str) |
| Write to console and add line-break, and show prompt if required. More... | |
| void | con_flush () |
| Ensure timely update. More... | |
| void | con_set_style (bool i) |
| Set style. More... | |
| bool | con_get_style () |
| Returns rfc-style. More... | |
| void | con_prompt_init () |
| Initialize prompt; display initial message. More... | |
| void | con_prompt_off () |
| Do not print a prompt after log messages. More... | |
| void | con_prompt_enter () |
| User pressed enter: will need a new prompt. More... | |
Variables | |
| static bool | console_show_prompt = false |
| static bool | console_prompt_is_showing = false |
| static bool | console_rfcstyle = false |
| static bool | readline_received_enter = true |
| void con_flush | ( | ) |
Ensure timely update.
Definition at line 183 of file console.cpp.
Referenced by metaserver_failed().
| bool con_get_style | ( | ) |
Returns rfc-style.
Definition at line 201 of file console.cpp.
Referenced by handle_stdin_input_real(), show_help_command_list(), and show_help_option_list().
| void con_log_close | ( | ) |
Deinitialize logging.
Definition at line 123 of file console.cpp.
Referenced by main(), and server_quit().
| void con_log_init | ( | const QString & | log_filename | ) |
| void con_prompt_enter | ( | ) |
User pressed enter: will need a new prompt.
Definition at line 225 of file console.cpp.
| void con_prompt_init | ( | ) |
Initialize prompt; display initial message.
Definition at line 206 of file console.cpp.
Referenced by freeciv::server::server().
| void con_prompt_off | ( | ) |
Do not print a prompt after log messages.
Definition at line 220 of file console.cpp.
Referenced by freeciv::server::pulse().
| void con_puts | ( | enum rfc_status rfc_status rfc_status | , |
| const char * | str | ||
| ) |
Write to console and add line-break, and show prompt if required.
Same as con_write, but without the format string stuff. The real reason for this is because attribute complained with con_write(C_COMMENT,"") of "warning: zero-length format string"; this allows con_puts(C_COMMENT,"");
Definition at line 162 of file console.cpp.
Referenced by con_prompt_init(), con_set_style(), con_write(), metaserver_failed(), and start_game().
| void con_set_color | ( | const char * | col | ) |
Definition at line 130 of file console.cpp.
Referenced by con_puts().
| void con_set_style | ( | bool | i | ) |
|
static |
Print the prompt if it is not the last thing printed.
Definition at line 81 of file console.cpp.
Referenced by con_puts(), and con_set_color().
| void con_write | ( | enum rfc_status rfc_status | , |
| const char * | message, | ||
| ... | |||
| ) |
Write to console and add line-break, and show prompt if required.
Definition at line 139 of file console.cpp.
Referenced by chat_msg_to_all(), cmd_reply_line(), handle_stdin_input_real(), main(), save_thread_run(), and set_command().
|
static |
Definition at line 36 of file console.cpp.
Referenced by con_prompt_enter(), con_puts(), con_set_color(), and con_update_prompt().
|
static |
Definition at line 37 of file console.cpp.
Referenced by con_get_style(), con_puts(), and con_set_style().
|
static |
Definition at line 35 of file console.cpp.
Referenced by con_prompt_off(), and con_update_prompt().
|
static |
Definition at line 38 of file console.cpp.
Referenced by con_prompt_enter(), and con_update_prompt().