Freeciv-3.2
|
#include "fc_prehdrs.h"
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
#include "deprecations.h"
#include "fcbacktrace.h"
#include "fciconv.h"
#include "fcintl.h"
#include "log.h"
#include "support.h"
#include "game.h"
#include "notify.h"
#include "srv_main.h"
#include "console.h"
Go to the source code of this file.
Functions | |
static int | con_dump (enum rfc_status rfc_status, const char *message,...) |
static void | con_handle_log (enum log_level level, const char *message, bool file_too) |
static void | con_update_prompt (void) |
static void | depr_warn_callback (const char *msg) |
void | con_log_init (const char *log_filename, enum log_level level, int fatal_assertions) |
void | con_log_close (void) |
static int | con_dump (enum rfc_status rfc_status, const char *message,...) |
void | con_write (enum rfc_status rfc_status, const char *message,...) |
void | con_puts (enum rfc_status rfc_status, const char *str) |
void | con_flush (void) |
void | con_set_style (bool i) |
bool | con_get_style (void) |
void | con_prompt_init (void) |
void | con_prompt_on (void) |
void | con_prompt_off (void) |
void | con_prompt_enter (void) |
void | con_prompt_enter_clear (void) |
Variables | |
static bool | console_show_prompt = FALSE |
static bool | console_prompt_is_showing = FALSE |
static bool | console_rfcstyle = FALSE |
Referenced by con_update_prompt().
Ensure timely update.
Definition at line 243 of file console.c.
Referenced by con_update_prompt(), and srv_prepare().
Returns rfc-style.
Definition at line 264 of file console.c.
Referenced by handle_stdin_input_real(), show_help_command_list(), and show_help_option_list().
Function to handle log messages. This must match the log_callback_fn typedef signature.
Definition at line 58 of file console.c.
Referenced by con_log_init().
Deinitialize logging
Definition at line 167 of file console.c.
Referenced by main(), and server_quit().
Initialize logging via console.
Definition at line 150 of file console.c.
Referenced by main(), and srv_prepare().
User pressed enter: will need a new prompt
Definition at line 303 of file console.c.
Referenced by server_sniff_all_input().
Clear "user pressed enter" state (used in special cases).
Definition at line 314 of file console.c.
Referenced by server_sniff_all_input().
Initialize prompt; display initial message.
Definition at line 272 of file console.c.
Referenced by server_sniff_all_input().
Do not print a prompt after log messages.
Definition at line 295 of file console.c.
Referenced by server_sniff_all_input().
Make sure a prompt is printed, and re-printed after every message.
Definition at line 286 of file console.c.
Referenced by server_sniff_all_input().
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 226 of file console.c.
Referenced by con_prompt_init(), con_set_style(), con_write(), srv_prepare(), and start_game().
Print the prompt if it is not the last thing printed.
Definition at line 91 of file console.c.
Referenced by con_prompt_on(), and con_puts().
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 203 of file console.c.
Referenced by chat_msg_to_all(), cmd_reply_line(), con_handle_log(), handle_stdin_input_real(), main(), save_thread_run(), set_command(), and srv_prepare().
Deprecation warning callback to send event to clients.
Definition at line 142 of file console.c.
Referenced by con_log_init().
Definition at line 46 of file console.c.
Referenced by con_dump(), con_prompt_enter(), con_prompt_enter_clear(), con_puts(), and con_update_prompt().
Definition at line 47 of file console.c.
Referenced by con_dump(), con_get_style(), con_handle_log(), con_puts(), and con_set_style().
Definition at line 45 of file console.c.
Referenced by con_prompt_off(), con_prompt_on(), and con_update_prompt().