Freeciv-3.1
|
#include "support.h"
Go to the source code of this file.
Macros | |
#define | MAX_LEN_CONSOLE_LINE 1024 /* closing '\0' included */ |
Enumerations | |
enum | rfc_status { C_IGNORE = -1 , C_COMMENT = 0 , C_VERSION = 1 , C_DEBUG = 2 , C_LOG_BASE = 10 , C_OK = 100 , C_CONNECTION = 101 , C_DISCONNECTED = 102 , C_REJECTED = 103 , C_FAIL = 200 , C_METAERROR = 201 , C_SYNTAX = 300 , C_BOUNCE = 301 , C_GENFAIL = 400 , C_WARNING = 500 , C_READY = 999 } |
Functions | |
void | con_log_init (const char *log_filename, enum log_level level, int fatal_assertions) |
void | con_log_close (void) |
void | con_write (enum rfc_status rfc_status, const char *message,...) fc__attribute((__format__(__printf__ |
void void | con_puts (enum rfc_status rfc_status, const char *str) |
void | con_flush (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) |
void | con_set_style (bool i) |
bool | con_get_style (void) |
#define MAX_LEN_CONSOLE_LINE 1024 /* closing '\0' included */ |
enum rfc_status |
void con_flush | ( | void | ) |
Ensure timely update.
Definition at line 243 of file console.c.
Referenced by con_update_prompt(), and srv_prepare().
bool con_get_style | ( | void | ) |
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().
void con_log_close | ( | void | ) |
Deinitialize logging
Definition at line 167 of file console.c.
Referenced by main(), and server_quit().
void con_log_init | ( | const char * | log_filename, |
enum log_level | level, | ||
int | fatal_assertions | ||
) |
Initialize logging via console.
Definition at line 150 of file console.c.
Referenced by main(), and srv_prepare().
void con_prompt_enter | ( | void | ) |
User pressed enter: will need a new prompt
Definition at line 303 of file console.c.
Referenced by server_sniff_all_input().
void con_prompt_enter_clear | ( | void | ) |
Clear "user pressed enter" state (used in special cases).
Definition at line 314 of file console.c.
Referenced by server_sniff_all_input().
void con_prompt_init | ( | void | ) |
Initialize prompt; display initial message.
Definition at line 272 of file console.c.
Referenced by server_sniff_all_input().
void con_prompt_off | ( | void | ) |
Do not print a prompt after log messages.
Definition at line 295 of file console.c.
Referenced by server_sniff_all_input().
void con_prompt_on | ( | void | ) |
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 void con_puts | ( | enum 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().
void con_set_style | ( | bool | i | ) |
void con_write | ( | enum rfc_status | rfc_status, |
const char * | message, | ||
... | |||
) |