60 va_start(args, format);
105 const char *featured_text)
108 struct text_tag_list *tags;
112 sizeof(plain_text), &tags,
FALSE);
121 text_tag_list_prepend(tags, ptag);
123 log_error(
"Failed to create a color text tag (fg = %s, bg = %s).",
124 (NULL !=
color.foreground ?
color.foreground :
"NULL"),
125 (NULL !=
color.background ?
color.background :
"NULL"));
132 text_tag_list_destroy(tags);
140 const char *format, va_list args)
144 fc_vsnprintf(featured_text,
sizeof(featured_text), format, args);
154 const char *format, ...)
158 va_start(args, format);
167 const struct text_tag_list *tags,
int conn_id)
180 "welcome to distribute copies of it "
181 "under certain conditions;"));
182 if (gui_has_copying_mitem) {
201 fc_snprintf(buf,
sizeof(buf),
_(
"Exporting output window to '%s' ..."),
211 _(
"Export failed, couldn't write to file."));
int send_chat_printf(const char *format,...)
int send_chat(const char *message)
void output_window_append(const struct ft_color color, const char *featured_text)
void output_window_event(const char *plain_text, const struct text_tag_list *tags, int conn_id)
void write_chatline_content(const char *txt)
void fc_allocate_ow_mutex(void)
void fc_release_ow_mutex(void)
void output_window_vprintf(const struct ft_color color, const char *format, va_list args)
void output_window_printf(const struct ft_color color, const char *format,...)
void chat_welcome_message(bool gui_has_copying_mitem)
void fc_destroy_ow_mutex(void)
void fc_init_ow_mutex(void)
int fc_utf8_vsnprintf_trunc(char *str, size_t n, const char *format, va_list args)
void fc_allocate_mutex(fc_mutex *mutex)
void fc_release_mutex(fc_mutex *mutex)
void fc_destroy_mutex(fc_mutex *mutex)
void fc_init_mutex(fc_mutex *mutex)
size_t featured_text_to_plain_text(const char *featured_text, char *plain_text, size_t plain_text_len, struct text_tag_list **tags, bool replace_link_text)
const struct ft_color ftc_client
const struct ft_color ftc_any
struct text_tag * text_tag_new(enum text_tag_type tag_type, ft_offset_t start_offset, ft_offset_t stop_offset,...)
static bool ft_color_requested(const struct ft_color color)
void real_output_window_append(const char *astring, const struct text_tag_list *tags, int conn_id)
#define log_error(message,...)
struct client_options gui_options
int dsend_packet_chat_msg_req(struct connection *pc, const char *message)
int send_packet_chat_msg_req(struct connection *pc, const struct packet_chat_msg_req *packet)
char default_chat_logfile[512]
char message[MAX_LEN_MSG]
int fc_snprintf(char *str, size_t n, const char *format,...)
int fc_vsnprintf(char *str, size_t n, const char *format, va_list ap)
FILE * fc_fopen(const char *filename, const char *opentype)