Freeciv-3.2: /fast/freeciv/nightly/S3_2/common/featured_text.c File Reference

Freeciv-3.2

Loading...
Searching...
No Matches
Data Structures | Macros | Enumerations | Functions | Variables
featured_text.c File Reference
`#include <stdarg.h>`
`#include <string.h>`
`#include "fcintl.h"`
`#include "log.h"`
`#include "mem.h"`
`#include "shared.h"`
`#include "support.h"`
`#include "city.h"`
`#include "combat.h"`
`#include "game.h"`
`#include "map.h"`
`#include "tile.h"`
`#include "unit.h"`
`#include "featured_text.h"`

Go to the source code of this file.

## Data Structures

struct | text_tag

## Macros

#define | SEQ_START '['
#define | SEQ_STOP ']'
#define | SEQ_END '/'
#define | MAX_LEN_STR 32
#define | log_featured_text log_verbose
#define | text_tag_list_rev_iterate(tags, ptag) TYPED_LIST_ITERATE_REV(struct text_tag, tags, ptag)
#define | text_tag_list_rev_iterate_end LIST_ITERATE_REV_END

## Enumerations

enum | sequence_type { ST_START , ST_STOP , ST_SINGLE }

## Functions

static const char * | text_tag_type_name (enum text_tag_type type)
static const char * | text_tag_type_short_name (enum text_tag_type type)
static const char * | text_link_type_name (enum text_link_type type)
static bool | find_option (const char *buf_in, const char *option, char *buf_out, size_t write_len)
static bool | text_tag_init_from_sequence (struct text_tag *ptag, enum text_tag_type type, ft_offset_t start_offset, const char *sequence)
static bool | text_tag_initv (struct text_tag *ptag, enum text_tag_type type, ft_offset_t start_offset, ft_offset_t stop_offset, va_list args)
static size_t | text_tag_start_sequence (const struct text_tag *ptag, char *buf, size_t len)
static size_t | text_tag_stop_sequence (const struct text_tag *ptag, char *buf, size_t len)
static size_t | text_tag_replace_text (const struct text_tag *ptag, char *buf, size_t len, bool replace_link_text)
struct text_tag * | text_tag_new (enum text_tag_type tag_type, ft_offset_t start_offset, ft_offset_t stop_offset,...)
struct text_tag * | text_tag_copy (const struct text_tag *ptag)
void | text_tag_destroy (struct text_tag *ptag)
enum text_tag_type | text_tag_type (const struct text_tag *ptag)
ft_offset_t | text_tag_start_offset (const struct text_tag *ptag)
ft_offset_t | text_tag_stop_offset (const struct text_tag *ptag)
const char * | text_tag_color_foreground (const struct text_tag *ptag)
const char * | text_tag_color_background (const struct text_tag *ptag)
enum text_link_type | text_tag_link_type (const struct text_tag *ptag)
int | text_tag_link_id (const struct text_tag *ptag)
static size_t | extract_sequence_text (const char *featured_text, char *buf, size_t len, enum sequence_type *seq_type, enum text_tag_type *type)
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)
size_t | featured_text_apply_tag (const char *text_source, char *featured_text, size_t featured_text_len, enum text_tag_type tag_type, ft_offset_t start_offset, ft_offset_t stop_offset,...)
const char * | city_link (const struct city *pcity)
const char * | city_tile_link (const struct city *pcity)
const char * | tile_link (const struct tile *ptile)
const char * | unit_link (const struct unit *punit)
const char * | unit_tile_link (const struct unit *punit)

## Variables

const struct ft_color | ftc_any = FT_COLOR(NULL, NULL)
const struct ft_color | ftc_warning = FT_COLOR("#FF0000", NULL)
const struct ft_color | ftc_log = FT_COLOR("#7F7F7F", NULL)
const struct ft_color | ftc_server = FT_COLOR("#8B0000", NULL)
const struct ft_color | ftc_client = FT_COLOR("#EF7F00", NULL)
const struct ft_color | ftc_editor = FT_COLOR("#0000FF", NULL)
const struct ft_color | ftc_command = FT_COLOR("#006400", NULL)
struct ft_color | ftc_changed = FT_COLOR("#FF0000", NULL)
const struct ft_color | ftc_server_prompt = FT_COLOR("#FF0000", "#BEBEBE")
const struct ft_color | ftc_player_lost = FT_COLOR("#FFFFFF", "#000000")
const struct ft_color | ftc_game_start = FT_COLOR("#00FF00", "#115511")
const struct ft_color | ftc_chat_public = FT_COLOR("#00008B", NULL)
const struct ft_color | ftc_chat_ally = FT_COLOR("#551166", NULL)
const struct ft_color | ftc_chat_private = FT_COLOR("#A020F0", NULL)
const struct ft_color | ftc_chat_luaconsole = FT_COLOR("#006400", NULL)
const struct ft_color | ftc_vote_public = FT_COLOR("#FFFFFF", "#AA0000")
const struct ft_color | ftc_vote_team = FT_COLOR("#FFFFFF", "#5555CC")
const struct ft_color | ftc_vote_passed = FT_COLOR("#006400", "#AAFFAA")
const struct ft_color | ftc_vote_failed = FT_COLOR("#8B0000", "#FFAAAA")
const struct ft_color | ftc_vote_yes = FT_COLOR("#000000", "#C8FFD5")
const struct ft_color | ftc_vote_no = FT_COLOR("#000000", "#FFD2D2")
const struct ft_color | ftc_vote_abstain = FT_COLOR("#000000", "#E8E8E8")
const struct ft_color | ftc_luaconsole_input = FT_COLOR("#2B008B", NULL)
const struct ft_color | ftc_luaconsole_error = FT_COLOR("#FF0000", NULL)
const struct ft_color | ftc_luaconsole_warn = FT_COLOR("#CF2020", NULL)
const struct ft_color | ftc_luaconsole_normal = FT_COLOR("#006400", NULL)
const struct ft_color | ftc_luaconsole_verbose = FT_COLOR("#B8B8B8", NULL)
const struct ft_color | ftc_luaconsole_debug = FT_COLOR("#B87676", NULL)

## Macro Definition Documentation

## ◆ log_featured_text

#define log_featured_text log_verbose

Definition at line 42 of file featured_text.c.

## ◆ MAX_LEN_STR

#define MAX_LEN_STR 32

Definition at line 41 of file featured_text.c.

## ◆ SEQ_END

#define SEQ_END '/'

Definition at line 39 of file featured_text.c.

## ◆ SEQ_START

#define SEQ_START '['

Definition at line 37 of file featured_text.c.

## ◆ SEQ_STOP

#define SEQ_STOP ']'

Definition at line 38 of file featured_text.c.

## ◆ text_tag_list_rev_iterate

#define text_tag_list_rev_iterate | ( |  | tags,
|  |  | ptag
| ) |  | TYPED_LIST_ITERATE_REV(struct text_tag, tags, ptag)

Definition at line 44 of file featured_text.c.

## ◆ text_tag_list_rev_iterate_end

#define text_tag_list_rev_iterate_end LIST_ITERATE_REV_END

Definition at line 46 of file featured_text.c.

## Enumeration Type Documentation

## ◆ sequence_type

enum sequence_type

Enumerator
ST_START |
ST_STOP |
ST_SINGLE |

Definition at line 66 of file featured_text.c.

## Function Documentation

## ◆ city_link()

const char * city_link | ( | const struct city * | pcity | ) |

Get a text link to a city. N.B.: The returned string is static, so every call to this function overwrites the previous.

Definition at line 1072 of file featured_text.c.

Referenced by announce_trade_route_removal(), api_methods_city_link(), apply_disaster(), auto_arrange_workers(), build_free_small_wonders(), trade_generator::calculate(), change_build_target(), check_city_migrations_player(), check_pollution(), city_add_unit(), city_build_building(), city_build_unit(), city_distribute_surplus_shields(), city_empty_food_stock(), city_global_turn_notify(), city_illness_strike(), city_increase_size(), city_landlocked_sell_coastal_improvements(), city_populate(), city_refresh_after_city_size_increase(), city_turn_notify(), cityrep_buy(), civil_war(), create_city(), dai_city_sell_noncritical(), diplomat_embassy(), diplomat_escape(), diplomat_escape_full(), diplomat_get_tech(), diplomat_incite(), diplomat_infiltrate_tile(), diplomat_investigate(), diplomat_sabotage(), disband_city(), do_city_migration(), do_nuke_tile(), do_paradrop(), do_unit_change_homecity(), do_unit_conquer_city(), do_unit_establish_trade(), do_unit_strike_city_building(), do_unit_strike_city_production(), found_new_tech(), handle_city(), handle_diplomacy_accept_treaty_req(), handle_edit_city(), inputline_make_chat_link(), chatwdg::make_link(), player_loot_player(), really_handle_city_sell(), remove_city(), remove_obsolete_buildings_city(), research_tech_lost(), sell_random_building(), map_view::shortcut_pressed(), spy_escape(), spy_nuke_city(), spy_poison(), spy_spread_plague(), spy_steal_gold(), spy_steal_some_maps(), teleport_unit_to_city(), transfer_city(), transfer_unit(), try_summon_barbarians(), try_to_save_unit(), unit_attack_civilian_casualties(), unit_conquer_city(), unit_do_destroy_city(), unit_do_help_build(), unit_nuke(), update_city_activity(), upgrade_building_prod(), upgrade_unit_prod(), worklist_change_build_target(), and worklist_item_postpone_req_vec().

## ◆ city_tile_link()

const char * city_tile_link | ( | const struct city * | pcity | ) |

Get a text link to a city tile (make a clickable link to a tile with the city name as text). N.B.: The returned string is static, so every call to this function overwrites the previous.

Definition at line 1089 of file featured_text.c.

Referenced by api_methods_city_tile_link(), disband_city(), do_city_migration(), remove_city(), unit_conquer_city(), and unit_do_destroy_city().

## ◆ extract_sequence_text()

static size_t extract_sequence_text | ( | const char * | featured_text,
|  | char * | buf,
|  | size_t | len,
|  | enum sequence_type * | seq_type,
|  | enum text_tag_type * | type
| ) |  |

static

Extract a sequence from a string. Also, determine the type and the text tag type of the sequence. Return 0 on error.

Definition at line 770 of file featured_text.c.

Referenced by featured_text_to_plain_text().

## ◆ featured_text_apply_tag()

size_t featured_text_apply_tag | ( | const char * | text_source,
|  | char * | featured_text,
|  | size_t | featured_text_len,
|  | enum text_tag_type | tag_type,
|  | ft_offset_t | start_offset,
|  | ft_offset_t | stop_offset,
|  |  | ...
| ) |  |

Apply a tag to a text. This text can already containing escape sequences. Returns 0 on error.

Prototype:

- If tag_type is TTT_BOLD, TTT_ITALIC, TTT_STRIKE or TTT_UNDERLINE, there shouldn't be any extra argument.
- If tag_type is TTT_COLOR: size_t featured_text_apply_tag(..., const struct ft_color color);
- If tag_type is TTT_LINK and you want a city link: size_t featured_text_apply_tag(..., TLT_CITY, struct city *pcity);
- If tag_type is TTT_LINK and you want a tile link: size_t featured_text_apply_tag(..., TLT_TILE, struct tile *ptile);
- If tag_type is TTT_LINK and you want an unit link: size_t featured_text_apply_tag(..., TLT_UNIT, struct unit *punit);

See also comment for text_tag_initv().

Definition at line 993 of file featured_text.c.

Referenced by create_event(), inputline_make_chat_link(), inputline_make_tag(), package_event_full(), player_color_ftstr(), show_players(), and show_settings_one().

## ◆ featured_text_to_plain_text()

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
| ) |  |

Separate the text from the text features. 'tags' can be NULL.

When 'replace_link_text' is set, the text used for the signal sequence links will be overwritten. It is used on client side to have updated links in chatline, to communicate when users don't know share the city names, and avoid users making voluntary confusing names when editing links in chatline.

Definition at line 864 of file featured_text.c.

Referenced by con_write(), handle_event(), luaconsole_append(), and output_window_append().

## ◆ find_option()

static bool find_option | ( | const char * | buf_in,
|  | const char * | option,
|  | char * | buf_out,
|  | size_t | write_len
| ) |  |

static

Find inside a sequence the string associated to a particular option name. Returns TRUE on success.

Definition at line 175 of file featured_text.c.

Referenced by text_tag_init_from_sequence().

## ◆ text_link_type_name()

static const char * text_link_type_name | ( | enum text_link_type | type | ) |

static

Return the name of the text tag link target type.

Definition at line 157 of file featured_text.c.

Referenced by city_link(), city_tile_link(), text_tag_init_from_sequence(), text_tag_start_sequence(), tile_link(), unit_link(), and unit_tile_link().

## ◆ text_tag_color_background()

const char * text_tag_color_background | ( | const struct text_tag * | ptag | ) |

Return the background color suggested by this text tag. This requires the tag type to be TTT_COLOR. Returns NULL on error, "" if unset.

Definition at line 727 of file featured_text.c.

Referenced by apply_tags(), and apply_text_tag().

## ◆ text_tag_color_foreground()

const char * text_tag_color_foreground | ( | const struct text_tag * | ptag | ) |

Return the foreground color suggested by this text tag. This requires the tag type to be TTT_COLOR. Returns NULL on error, "" if unset.

Definition at line 713 of file featured_text.c.

Referenced by apply_tags(), and apply_text_tag().

## ◆ text_tag_copy()

struct text_tag * text_tag_copy | ( | const struct text_tag * | ptag | ) |

This function returns a new pointer to a text_tag which is similar to the 'ptag' argument.

Definition at line 663 of file featured_text.c.

## ◆ text_tag_destroy()

void text_tag_destroy | ( | struct text_tag * | ptag | ) |

Free a text_tag structure.

Definition at line 680 of file featured_text.c.

Referenced by featured_text_to_plain_text().

## ◆ text_tag_init_from_sequence()

static bool text_tag_init_from_sequence | ( | struct text_tag * | ptag,
|  | enum text_tag_type | type,
|  | ft_offset_t | start_offset,
|  | const char * | sequence
| ) |  |

static

Initialize a text_tag structure from a string sequence. Returns TRUE on success.

Definition at line 224 of file featured_text.c.

Referenced by featured_text_to_plain_text().

## ◆ text_tag_initv()

static bool text_tag_initv | ( | struct text_tag * | ptag,
|  | enum text_tag_type | type,
|  | ft_offset_t | start_offset,
|  | ft_offset_t | stop_offset,
|  | va_list | args
| ) |  |

static

Initialize a text_tag structure from a va_list.

What's should be in the va_list:

- If the text tag type is TTT_BOLD, TTT_ITALIC, TTT_STRIKE or TTT_UNDERLINE, there shouldn't be any extra argument.
- If the text tag type is TTT_COLOR, then there should be 1 argument of type 'struct ft_color'.
- If the text tag type is TTT_LINK, then there should be 2 extra arguments. The first is type 'enum text_link_type' and will determine the type of the following argument:
  - If the link type is TLT_CITY, last argument is typed 'struct city *'.
  - If the link type is TLT_TILE, last argument is typed 'struct tile *'.
  - If the link type is TLT_UNIT, last argument is typed 'struct unit *'.

Returns TRUE on success.

Definition at line 388 of file featured_text.c.

Referenced by featured_text_apply_tag(), and text_tag_new().

## ◆ text_tag_link_id()

int text_tag_link_id | ( | const struct text_tag * | ptag | ) |

Return the link target id suggested by this text tag (city id, tile index or unit id). This requires the tag type to be TTT_LINK. Returns -1 on error.

Definition at line 756 of file featured_text.c.

Referenced by apply_tags(), apply_text_tag(), and handle_event().

## ◆ text_tag_link_type()

enum text_link_type text_tag_link_type | ( | const struct text_tag * | ptag | ) |

Return the link target type suggested by this text tag. This requires the tag type to be TTT_LINK. Returns -1 on error.

Definition at line 741 of file featured_text.c.

Referenced by apply_tags(), apply_text_tag(), and handle_event().

## ◆ text_tag_new()

struct text_tag * text_tag_new | ( | enum text_tag_type | tag_type,
|  | ft_offset_t | start_offset,
|  | ft_offset_t | stop_offset,
|  |  | ...
| ) |  |

Returns a new text_tag or NULL on error.

Prototype:

- If tag_type is TTT_BOLD, TTT_ITALIC, TTT_STRIKE or TTT_UNDERLINE, there shouldn't be any extra argument.
- If tag_type is TTT_COLOR: struct text_tag *text_tag_new(..., const struct ft_color color);
- If tag_type is TTT_LINK and you want a city link: struct text_tag *text_tag_new(..., TLT_CITY, struct city *pcity);
- If tag_type is TTT_LINK and you want a tile link: struct text_tag *text_tag_new(..., TLT_TILE, struct tile *ptile);
- If tag_type is TTT_LINK and you want an unit link: struct text_tag *text_tag_new(..., TLT_UNIT, struct unit *punit);

See also comment for text_tag_initv().

Definition at line 638 of file featured_text.c.

Referenced by handle_event(), luaconsole_append(), and output_window_append().

## ◆ text_tag_replace_text()

static size_t text_tag_replace_text | ( | const struct text_tag * | ptag,
|  | char * | buf,
|  | size_t | len,
|  | bool | replace_link_text
| ) |  |

static

When the sequence looks like [sequence/] then we insert a string instead.

Definition at line 575 of file featured_text.c.

Referenced by featured_text_to_plain_text().

## ◆ text_tag_start_offset()

ft_offset_t text_tag_start_offset | ( | const struct text_tag * | ptag | ) |

Return the start offset (in bytes) of this text tag.

Definition at line 696 of file featured_text.c.

Referenced by apply_tags(), and apply_text_tag().

## ◆ text_tag_start_sequence()

static size_t text_tag_start_sequence | ( | const struct text_tag * | ptag,
|  | char * | buf,
|  | size_t | len
| ) |  |

static

Print in a string the start sequence of the tag.

Definition at line 471 of file featured_text.c.

Referenced by featured_text_apply_tag().

## ◆ text_tag_stop_offset()

ft_offset_t text_tag_stop_offset | ( | const struct text_tag * | ptag | ) |

Return the stop offset (in bytes) of this text tag.

Definition at line 704 of file featured_text.c.

Referenced by apply_tags(), and apply_text_tag().

## ◆ text_tag_stop_sequence()

static size_t text_tag_stop_sequence | ( | const struct text_tag * | ptag,
|  | char * | buf,
|  | size_t | len
| ) |  |

static

Print in a string the stop sequence of the tag.

Definition at line 560 of file featured_text.c.

Referenced by featured_text_apply_tag().

## ◆ text_tag_type()

enum text_tag_type text_tag_type | ( | const struct text_tag * | ptag | ) |

Return the type of this text tag.

Definition at line 688 of file featured_text.c.

## ◆ text_tag_type_name()

static const char * text_tag_type_name | ( | enum text_tag_type | type | ) |

static

Return the long name of the text tag type. See also text_tag_type_short_name().

Definition at line 110 of file featured_text.c.

Referenced by extract_sequence_text(), and featured_text_to_plain_text().

## ◆ text_tag_type_short_name()

static const char * text_tag_type_short_name | ( | enum text_tag_type | type | ) |

static

Return the name abbreviation of the text tag type. See also text_tag_type_name().

Definition at line 134 of file featured_text.c.

Referenced by city_link(), city_tile_link(), extract_sequence_text(), text_tag_start_sequence(), text_tag_stop_sequence(), tile_link(), unit_link(), and unit_tile_link().

## ◆ tile_link()

const char * tile_link | ( | const struct tile * | ptile | ) |

Get a text link to a tile. N.B.: The returned string is static, so every call to this function overwrites the previous.

Definition at line 1106 of file featured_text.c.

Referenced by api_methods_tile_link(), city_build(), diplomat_infiltrate_tile(), do_conquer_extras(), do_paradrop(), end_turn(), execute_orders(), handle_edit_city_create(), handle_edit_player_vision(), handle_edit_tile_extra(), handle_edit_tile_terrain(), handle_edit_unit_create(), handle_edit_unit_remove(), inputline_make_chat_link(), chatwdg::make_link(), map_view::shortcut_pressed(), spy_attack(), spy_escape(), unit_activity_targeted_internal(), unit_do_regular_move(), unit_nuke(), and update_unit_activity().

## ◆ unit_link()

const char * unit_link | ( | const struct unit * | punit | ) |

Get a text link to an unit. N.B.: The returned string is static, so every call to this function overwrites the previous.

Definition at line 1122 of file featured_text.c.

Referenced by api_methods_unit_link(), bounce_unit(), can_unit_move_to_tile_with_notify(), city_distribute_surplus_shields(), collect_ransom(), diplomat_bribe(), diplomat_escape_full(), diplomat_infiltrate_tile(), diplomat_sabotage(), do_airline(), do_attack(), do_capture_units(), do_expel_unit(), do_heal_unit(), do_unit_establish_trade(), do_unit_strike_city_building(), do_unit_strike_city_production(), do_unit_upgrade(), do_upgrade_effects(), do_wipe_units(), execute_orders(), explain_why_no_action_enabled(), handle_edit_unit(), illegal_action_msg(), inputline_make_chat_link(), kill_unit(), chatwdg::make_link(), notify_unit_experience(), player_restore_units(), remove_city(), server_remove_unit_full(), spy_nuke_city(), spy_poison(), spy_sabotage_unit(), spy_spread_plague(), spy_steal_gold(), spy_steal_some_maps(), teleport_unit_to_city(), terrain_change_bounce_single_unit(), transfer_unit(), try_to_save_unit(), unit_activities_cancel(), unit_attack_civilian_casualties(), unit_bombard(), unit_do_help_build(), and wakeup_neighbor_sentries().

## ◆ unit_tile_link()

const char * unit_tile_link | ( | const struct unit * | punit | ) |

Get a text link to a unit tile (make a clickable link to a tile with the unit type name as text). N.B.: The returned string is static, so every call to this function overwrites the previous.

Definition at line 1139 of file featured_text.c.

Referenced by api_methods_unit_tile_link(), begin_turn(), bounce_unit(), check_units_single_tile(), city_add_unit(), city_populate(), collect_ransom(), diplomat_escape_full(), diplomat_get_tech(), diplomat_incite(), diplomat_infiltrate_tile(), diplomat_sabotage(), do_attack(), do_nuke_tile(), do_paradrop(), do_unit_change_homecity(), do_unit_establish_trade(), hut_get_limited(), kill_unit(), player_restore_units(), remove_city(), remove_illegal_armistice_units(), sell_random_unit(), spy_nuke_city(), spy_poison(), spy_spread_plague(), spy_steal_gold(), spy_steal_some_maps(), transfer_city_units(), transfer_unit(), unit_lost_with_transport(), and unit_nuke().

## Variable Documentation

## ◆ ftc_any

const struct ft_color ftc_any = FT_COLOR(NULL, NULL)

Definition at line 73 of file featured_text.c.

Referenced by api_notify_embassies_msg(), api_notify_event_msg(), api_notify_research_embassies_msg(), api_notify_research_msg(), chat_welcome_message(), connect_callback(), establish_new_connection(), handle_stdin_input_real(), inputline_return_callback(), luaconsole_welcome_message(), notify_if_first_access_level_is_available(), send_year_to_clients(), and update_revolution().

## ◆ ftc_changed

struct ft_color ftc_changed = FT_COLOR("#FF0000", NULL)

Definition at line 81 of file featured_text.c.

Referenced by show_players(), and show_settings_one().

## ◆ ftc_chat_ally

const struct ft_color ftc_chat_ally = FT_COLOR("#551166", NULL)

Definition at line 87 of file featured_text.c.

Referenced by chat_msg_to_allies(), and chat_msg_to_global_observers().

## ◆ ftc_chat_luaconsole

const struct ft_color ftc_chat_luaconsole = FT_COLOR("#006400", NULL)

Definition at line 89 of file featured_text.c.

Referenced by api_client_chat_base().

## ◆ ftc_chat_private

const struct ft_color ftc_chat_private = FT_COLOR("#A020F0", NULL)

Definition at line 88 of file featured_text.c.

Referenced by chat_msg_to_conn(), chat_msg_to_player(), and dai_diplo_notify().

## ◆ ftc_chat_public

const struct ft_color ftc_chat_public = FT_COLOR("#00008B", NULL)

Definition at line 86 of file featured_text.c.

Referenced by chat_msg_to_all().

## ◆ ftc_client

const struct ft_color ftc_client = FT_COLOR("#EF7F00", NULL)

Definition at line 78 of file featured_text.c.

Referenced by chatwdg::anchor_clicked(), trade_generator::calculate(), chatline_autocomplete(), cityrep_buy(), client_change_all(), client_conn_close_callback(), client_start_server(), clipboard_copy_production(), clipboard_paste_production(), connect_callback(), diplo_dialog_returnkey(), disconnect_from_server(), do_disband_alternative(), do_unit_connect(), do_unit_goto(), do_unit_patrol_to(), event_after(), event_after(), gold_callback(), gui_version_message(), handle_city(), handle_game_info(), handle_new_year(), handle_player_info(), handle_server_join_reply(), handle_single_want_hack_reply(), inputline_make_chat_link(), key_center_capital(), key_unit_action_select_tgt(), races_dialog::ok_pressed(), popup_connection_dialog(), races_dialog_ok_callback(), races_response(), request_unit_autosettlers(), request_unit_goto(), request_unit_paradrop(), request_unit_teleport(), request_unit_unload_all(), server_scan_error(), server_scan_error(), set_city_workertask(), set_client_state(), map_view::shortcut_pressed(), fc_client::slot_connect(), start_autoconnecting_to_server(), start_scenario_callback(), try_to_autoconnect(), version_message(), version_message_main_thread(), and write_chatline_content().

## ◆ ftc_command

const struct ft_color ftc_command = FT_COLOR("#006400", NULL)

Definition at line 80 of file featured_text.c.

Referenced by cmd_reply_line().

## ◆ ftc_editor

const struct ft_color ftc_editor = FT_COLOR("#0000FF", NULL)

Definition at line 79 of file featured_text.c.

Referenced by establish_new_connection(), handle_edit_city(), handle_edit_city_create(), handle_edit_city_remove(), handle_edit_mode(), handle_edit_player(), handle_edit_player_create(), handle_edit_player_remove(), handle_edit_player_vision(), handle_edit_startpos(), handle_edit_startpos_full(), handle_edit_tile(), handle_edit_tile_extra(), handle_edit_tile_terrain(), handle_edit_toggle_fogofwar(), handle_edit_unit(), handle_edit_unit_create(), handle_edit_unit_remove(), handle_edit_unit_remove_by_id(), handle_save_scenario(), and server_packet_input().

## ◆ ftc_game_start

const struct ft_color ftc_game_start = FT_COLOR("#00FF00", "#115511")

Definition at line 84 of file featured_text.c.

Referenced by start_command().

## ◆ ftc_log

const struct ft_color ftc_log = FT_COLOR("#7F7F7F", NULL)

Definition at line 76 of file featured_text.c.

Referenced by debug_command(), real_bodyguard_log(), real_city_log(), real_diplo_log(), real_tech_log(), real_unit_log(), and timing_results_real().

## ◆ ftc_luaconsole_debug

const struct ft_color ftc_luaconsole_debug = FT_COLOR("#B87676", NULL)

Definition at line 104 of file featured_text.c.

Referenced by script_client_output().

## ◆ ftc_luaconsole_error

const struct ft_color ftc_luaconsole_error = FT_COLOR("#FF0000", NULL)

Definition at line 100 of file featured_text.c.

Referenced by script_client_output().

## ◆ ftc_luaconsole_input

const struct ft_color ftc_luaconsole_input = FT_COLOR("#2B008B", NULL)

Definition at line 99 of file featured_text.c.

Referenced by luaconsole_input_return(), and luaconsole_load_file_callback().

## ◆ ftc_luaconsole_normal

const struct ft_color ftc_luaconsole_normal = FT_COLOR("#006400", NULL)

Definition at line 102 of file featured_text.c.

Referenced by script_client_output().

## ◆ ftc_luaconsole_verbose

const struct ft_color ftc_luaconsole_verbose = FT_COLOR("#B8B8B8", NULL)

Definition at line 103 of file featured_text.c.

Referenced by script_client_output().

## ◆ ftc_luaconsole_warn

const struct ft_color ftc_luaconsole_warn = FT_COLOR("#CF2020", NULL)

Definition at line 101 of file featured_text.c.

Referenced by script_client_output().

## ◆ ftc_player_lost

const struct ft_color ftc_player_lost = FT_COLOR("#FFFFFF", "#000000")

Definition at line 83 of file featured_text.c.

Referenced by lost_connection_to_client().

## ◆ ftc_server

const struct ft_color ftc_server = FT_COLOR("#8B0000", NULL)

Definition at line 77 of file featured_text.c.

Referenced by aifill(), aifill_action(), announce_player(), announce_trade_route_removal(), api_edit_give_technology(), apply_disaster(), auto_arrange_workers(), begin_turn(), bounce_unit(), build_free_small_wonders(), can_unit_move_to_tile_with_notify(), cancelvote_command(), change_build_target(), check_city_migrations_player(), check_for_game_over(), check_player_max_rates(), check_pollution(), check_units_single_tile(), choose_tech_goal(), city_add_unit(), city_build(), city_build_building(), city_build_unit(), city_distribute_surplus_shields(), city_empty_food_stock(), city_global_turn_notify(), city_illness_strike(), city_increase_size(), city_landlocked_sell_coastal_improvements(), city_map_update_radius_sq(), city_populate(), city_refresh_after_city_size_increase(), city_turn_notify(), civil_war(), cmd_reply_line(), collect_ransom(), complain_ambiguous(), connection_detach(), create_barbarian_player(), create_city(), dai_city_sell_noncritical(), delegate_command(), diplomat_bribe(), diplomat_embassy(), diplomat_escape_full(), diplomat_get_tech(), diplomat_incite(), diplomat_infiltrate_tile(), diplomat_may_lose_gold(), diplomat_sabotage(), disband_city(), do_airline(), do_attack(), do_capture_units(), do_city_migration(), do_expel_unit(), do_heal_unit(), do_nuclear_explosion(), do_nuke_tile(), do_paradrop(), do_spaceship_place(), do_tech_parasite_effects(), do_unit_change_homecity(), do_unit_establish_trade(), do_unit_strike_city_building(), do_unit_strike_city_production(), do_unit_upgrade(), do_upgrade_effects(), do_wipe_units(), end_command(), end_phase(), end_turn(), establish_new_connection(), execute_orders(), explain_why_no_action_enabled(), forget_tech_transferred(), found_new_tech(), global_warming(), government_change(), handle_chat_msg_req(), handle_city_change(), handle_city_rename(), handle_diplomacy_accept_treaty_req(), handle_diplomacy_cancel_pact(), handle_diplomacy_init_meeting_req(), handle_nation_select_req(), handle_player_change_government(), handle_player_place_infra(), handle_player_rates(), handle_player_ready(), handle_report_req(), handle_spaceship_launch(), handle_unit_get_actions(), handle_unit_type_upgrade(), hut_get_limited(), illegal_action(), illegal_action_msg(), illegal_action_pay_price(), kill_player(), kill_unit(), lost_connection_to_client(), make_contact(), nationset_action(), notify_actor_caught(), notify_actor_success(), notify_global_caught(), notify_global_success(), notify_illegal_armistice_units(), notify_new_government_options(), notify_unit_experience(), notify_victim_caught(), notify_victim_success(), nuclear_winter(), player_loot_player(), player_restore_units(), really_diplomacy_cancel_meeting(), really_handle_city_buy(), really_handle_city_sell(), remove_city(), remove_illegal_armistice_units(), remove_obsolete_buildings_city(), research_tech_lost(), revolution_length(), sell_random_building(), sell_random_unit(), send_delegation_info(), server_remove_player(), server_remove_unit_full(), set_command(), set_running_game_access_level(), spaceship_arrived(), spaceship_lost(), spy_nuke_city(), spy_poison(), spy_sabotage_unit(), spy_spread_plague(), spy_steal_gold(), spy_steal_some_maps(), srv_ready(), srv_scores(), start_cmd_reply(), start_game(), steal_a_tech(), surrender_command(), take_command(), tech_researched(), tech_transfer(), teleport_unit_to_city(), terrain_change_bounce_single_unit(), transfer_city(), transfer_city_units(), transfer_unit(), try_summon_barbarians(), try_to_save_unit(), unit_activities_cancel(), unit_attack_civilian_casualties(), unit_bombard(), unit_can_do_action_now(), unit_conquer_city(), unit_convert(), unit_do_destroy_city(), unit_do_help_build(), unit_lost_with_transport(), unit_nuke(), update_bulbs(), update_city_activity(), update_diplomatics(), update_national_activities(), update_timeout(), upgrade_all_city_extras(), upgrade_building_prod(), upgrade_unit_prod(), wakeup_neighbor_sentries(), worklist_change_build_target(), and worklist_item_postpone_req_vec().

## ◆ ftc_server_prompt

const struct ft_color ftc_server_prompt = FT_COLOR("#FF0000", "#BEBEBE")

Definition at line 82 of file featured_text.c.

Referenced by handle_stdin_input_real(), and wall().

## ◆ ftc_vote_abstain

const struct ft_color ftc_vote_abstain = FT_COLOR("#000000", "#E8E8E8")

Definition at line 97 of file featured_text.c.

Referenced by check_vote().

## ◆ ftc_vote_failed

const struct ft_color ftc_vote_failed = FT_COLOR("#8B0000", "#FFAAAA")

Definition at line 94 of file featured_text.c.

Referenced by check_vote().

## ◆ ftc_vote_no

const struct ft_color ftc_vote_no = FT_COLOR("#000000", "#FFD2D2")

Definition at line 96 of file featured_text.c.

Referenced by check_vote().

## ◆ ftc_vote_passed

const struct ft_color ftc_vote_passed = FT_COLOR("#006400", "#AAFFAA")

Definition at line 93 of file featured_text.c.

Referenced by check_vote().

## ◆ ftc_vote_public

const struct ft_color ftc_vote_public = FT_COLOR("#FFFFFF", "#AA0000")

Definition at line 91 of file featured_text.c.

Referenced by handle_stdin_input_real().

## ◆ ftc_vote_team

const struct ft_color ftc_vote_team = FT_COLOR("#FFFFFF", "#5555CC")

Definition at line 92 of file featured_text.c.

Referenced by handle_stdin_input_real().

## ◆ ftc_vote_yes

const struct ft_color ftc_vote_yes = FT_COLOR("#000000", "#C8FFD5")

Definition at line 95 of file featured_text.c.

Referenced by check_vote().

## ◆ ftc_warning

const struct ft_color ftc_warning = FT_COLOR("#FF0000", NULL)

Definition at line 75 of file featured_text.c.

Referenced by auth_handle_reply(), auth_user(), chat_msg_to_conn(), chat_msg_to_player(), con_handle_log(), depr_warn_callback(), notify_ruleset_fallback(), save_game(), and save_thread_run().