Crossfire Client, Branch
R11627
|
#include "client.h"
#include <stdarg.h>
#include <stdio.h>
#include <errno.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/wait.h>
Go to the source code of this file.
Functions | |
void | clearLogListener (void) |
static const char * | getLogLevelText (LogLevel level) |
char * | getLogText (const LogEntry *le) |
char * | getLogTextRaw (LogLevel level, const char *origin, const char *message) |
void | LOG (LogLevel level, const char *origin, const char *format,...) |
void | logChildPipe (ChildProcess *child, LogLevel level, int flag) |
void | logPipe (ChildProcess *child, LogLevel level, int pipe) |
int | make_path_to_dir (char *directory) |
int | make_path_to_file (char *filename) |
void | monitorChilds (void) |
void | purgePipe (ChildProcess *cp, int pipe) |
ChildProcess * | raiseChild (char *name, int flag) |
int | setLogListener (LogListener li) |
char * | strdup_local (const char *str) |
Variables | |
ChildProcess * | FirstChild = NULL |
ChildProcess * | LastChild = NULL |
int | logcount = 0 |
LogEntry * | LogFirst = NULL |
LogEntry * | LogLast = NULL |
static const char *const | LogLevelTexts [] |
LogListener | loglist = NULL |
int | MINLOG = MINLOGLEVEL |
const char *const | rcsid_common_misc_c = "$Id: misc.c 11626 2009-04-04 12:41:46Z lalo $" |
void clearLogListener | ( | void | ) |
static const char* getLogLevelText | ( | LogLevel | level | ) | [static] |
Definition at line 154 of file misc.c.
References LOG_CRITICAL.
Referenced by getLogTextRaw().
char* getLogText | ( | const LogEntry * | le | ) |
Definition at line 164 of file misc.c.
References getLogTextRaw(), LogEntry::level, LogEntry::message, and LogEntry::origin.
Referenced by createBugTracker(), gtkLogListener(), and LOG().
char* getLogTextRaw | ( | LogLevel | level, |
const char * | origin, | ||
const char * | message | ||
) |
Definition at line 157 of file misc.c.
References getLogLevelText().
Referenced by getLogText().
Definition at line 178 of file misc.c.
References getLogText(), LogEntry::level, LOG_APPEND, LOG_NEW_ENTRY, LOG_SETMESSAGE, and LOG_SETORIGIN.
Referenced by add_to_textbuf(), AddMeFail(), AddMeSuccess(), AddspellCmd(), admin_callback(), AnimCmd(), book_callback(), check_x_events(), client_exit(), common_item_command(), CompleteCmd(), configdialog(), create_icon_image(), DeleteInventory(), DeleteItem(), DeleteSpell(), display_newpng(), do_network(), do_num_free_items(), draw_info(), draw_magic_map(), DrawExtInfoCmd(), DrawInfoCmd(), event_loop(), Face2Cmd(), fill_combobox_from_datadir(), finish_face_cmd(), get_exp_info(), get_image_info(), get_image_sums(), get_skill_info(), get_type_from_name(), gLogHandler(), GoodbyeCmd(), gtk_draw_map(), handle_query(), Image2Cmd(), image_add_hash(), image_find_hash(), image_process_line(), image_remove_hash(), info_get_styles(), init_cache_data(), init_client_vars(), init_connection(), init_keys(), init_sounds(), init_windows(), inscribe_magical_scroll(), insert_key(), inventory_get_styles(), inventory_init(), keybinding_get_data(), keybinding_selection_func(), keyfunc(), keys_init(), list_selection_func(), load_a_font(), load_defaults(), load_image(), load_theme(), load_window_positions(), logPipe(), MagicMapCmd(), main(), make_path_to_file(), Map2Cmd(), map_scrollCmd(), mapdata_init(), menu_quit_program(), message_callback(), metaserver1_get_info(), metaserver1_thread(), metaserver2_get_info(), metaserver2_writer(), monitorChilds(), motd_callback(), MusicCmd(), negotiate_connection(), on_keybinding_button_remove_clicked(), on_keybinding_button_update_clicked(), on_spell_cast_clicked(), on_spell_invoke_clicked(), on_spell_treeview_row_activated(), on_window_destroy_event(), parse_args(), parse_keybind_line(), pickup_init(), play_sound(), PlayerCmd(), png_to_data(), purgePipe(), raiseChild(), ReplyInfoCmd(), rescale_rgba_data(), save_defaults(), save_keys(), script_init(), send_command(), set_window_pos(), setup_config_window(), SetupCmd(), SockList_ReadPacket(), Sound2Cmd(), SoundCmd(), spell_get_styles(), stats_get_styles(), StatsCmd(), unbind_key(), UpdateItemCmd(), UpdspellCmd(), VersionCmd(), void_callback(), write_media_with_state(), and write_socket().
void logChildPipe | ( | ChildProcess * | child, |
LogLevel | level, | ||
int | flag | ||
) |
Definition at line 290 of file misc.c.
References CHILD_STDERR, CHILD_STDOUT, ChildProcess::flag, and logPipe().
Referenced by init_sounds().
void logPipe | ( | ChildProcess * | child, |
LogLevel | level, | ||
int | pipe | ||
) |
Definition at line 271 of file misc.c.
References PipeLog::level, LOG(), PipeLog::log, LOG_WARNING, ChildProcess::logger, PipeLog::name, ChildProcess::name, ChildProcess::pid, and ChildProcess::tube.
Referenced by logChildPipe().
int make_path_to_dir | ( | char * | directory | ) |
int make_path_to_file | ( | char * | filename | ) |
Definition at line 94 of file misc.c.
References LOG(), LOG_ERROR, and MAX_BUF.
Referenced by save_defaults(), and save_keys().
void monitorChilds | ( | void | ) |
Definition at line 239 of file misc.c.
References FirstChild, LOG(), PipeLog::log, LOG_INFO, ChildProcess::logger, ChildProcess::name, ChildProcess::next, ChildProcess::pid, and purgePipe().
Referenced by check_x_events(), and gtk_checkchilds().
void purgePipe | ( | ChildProcess * | cp, |
int | pipe | ||
) |
Definition at line 210 of file misc.c.
References PipeLog::level, LOG(), LOG_ERROR, ChildProcess::logger, PipeLog::name, ChildProcess::name, and ChildProcess::tube.
Referenced by monitorChilds().
ChildProcess* raiseChild | ( | char * | name, |
int | flag | ||
) |
Definition at line 297 of file misc.c.
References CHILD_PIPEERR, CHILD_PIPEIN, CHILD_PIPEOUT, CHILD_SILENTFAIL, CHILD_STDERR, CHILD_STDIN, CHILD_STDOUT, CHILD_TUBE, ChildProcess::flag, LOG(), LOG_ERROR, LOG_INFO, name, ChildProcess::name, ChildProcess::next, and ChildProcess::pid.
Referenced by init_sounds().
int setLogListener | ( | LogListener | li | ) |
char* strdup_local | ( | const char * | str | ) |
Definition at line 125 of file misc.c.
Referenced by applyconfig(), get_image_info(), get_root_display(), get_skill_info(), insert_key(), load_defaults(), on_keybinding_button_update_clicked(), parse_sound_line(), read_config_window(), read_settings(), and requestface().
ChildProcess* FirstChild = NULL |
Definition at line 207 of file misc.c.
Referenced by monitorChilds().
ChildProcess* LastChild = NULL |
Definition at line 133 of file misc.c.
Referenced by createBugTracker().
const char* const LogLevelTexts[] [static] |
LogListener loglist = NULL |
int MINLOG = MINLOGLEVEL |
Definition at line 174 of file misc.c.
Referenced by init_windows(), and parse_args().
const char* const rcsid_common_misc_c = "$Id: misc.c 11626 2009-04-04 12:41:46Z lalo $" |