Freeciv-3.1: /fast/freeciv/nightly/S3_1/common/events.c Source File

Freeciv-3.1

Loading...
Searching...
No Matches
events.c
Go to the documentation of this file.
1/***********************************************************************
2 Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; either version 2, or (at your option)
6 any later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12***********************************************************************/
13
14#ifdef HAVE_CONFIG_H
15#include <fc_config.h>
16#endif
17
18#include <stdio.h>
19#include <stdlib.h>
20
21/* utility */
22#include "fcintl.h"
23#include "log.h"
24#include "mem.h"
25#include "shared.h"
26#include "support.h"
27
28#include "events.h"
29
30 enum event_section_n {
31 E_S_ADVANCE,
32 E_S_BUILD,
33 E_S_CITY,
34 E_S_D_ME,
35 E_S_D_THEM,
36 E_S_GLOBAL,
37 E_S_HUT,
38 E_S_NATION,
39 E_S_TREATY,
40 E_S_UNIT,
41 E_S_VOTE,
42 E_S_WONDER,
43 E_S_XYZZY
44};
45
46/*
47 * Information about all event sections, matching the enum above.
48 */
49 static const char *event_sections[] = {
50 /* TRANS: This and following strings are prefixes for event names, which
51 * replace %s. For instance, "Technology: Selected New Goal". */
52 N_("Technology: %s"),
53 N_("Improvement: %s"),
54 N_("City: %s"),
55 N_("Diplomat Action: %s"),
56 N_("Enemy Diplomat: %s"),
57 N_("Global: %s"),
58 N_("Hut: %s"),
59 N_("Nation: %s"),
60 N_("Treaty: %s"),
61 N_("Unit: %s"),
62 /* TRANS: "Vote" as a process */
63 N_("Vote: %s"),
64 N_("Wonder: %s"),
65 NULL
66};
67
68#define GEN_EV(event, section, descr) { #event, NULL, section, descr, NULL, event }
69
70/*
71 * Holds information about all event types. The entries don't have
72 * to be sorted.
73 * Every E_* event defined in common/events.h should have an entry here.
74 */
75static struct {
76 const char *enum_name;
77 char *tag_name;
78 enum event_section_n esn;
79 char *descr_orig;
80 char *full_descr;
81 enum event_type event;
82} events[] = {
83 /* TRANS: this and following strings are names for events which cause the
84 * server to generate messages. They are used in configuring how the client
85 * handles the different types of messages. Some of them will be displayed
86 * with prefixes, such as "Technology: Learned From Great Library". */
87 GEN_EV(E_TECH_GAIN, E_S_ADVANCE, N_("Acquired New Tech")),
88 GEN_EV(E_TECH_LEARNED, E_S_ADVANCE, N_("Learned New Tech")),
89 GEN_EV(E_TECH_GOAL, E_S_ADVANCE, N_("Selected New Goal")),
90 GEN_EV(E_TECH_LOST, E_S_ADVANCE, N_("Lost a Tech")),
91 GEN_EV(E_TECH_EMBASSY, E_S_ADVANCE, N_("Other Player Gained/Lost a Tech")),
92 GEN_EV(E_IMP_BUY, E_S_BUILD, N_("Bought")),
93 GEN_EV(E_IMP_BUILD, E_S_BUILD, N_("Built")),
94 GEN_EV(E_IMP_AUCTIONED, E_S_BUILD, N_("Forced to Sell")),
95 GEN_EV(E_IMP_AUTO, E_S_BUILD, N_("New Improvement Selected")),
96 GEN_EV(E_IMP_SOLD, E_S_BUILD, N_("Sold")),
97 GEN_EV(E_CITY_CANTBUILD, E_S_CITY, N_("Building Unavailable Item")),
98 GEN_EV(E_CITY_LOST, E_S_CITY, N_("Captured/Destroyed")),
99 GEN_EV(E_CITY_LOVE, E_S_CITY, N_("Celebrating")),
100 GEN_EV(E_CITY_DISORDER, E_S_CITY, N_("Civil Disorder")),
101 GEN_EV(E_CITY_FAMINE, E_S_CITY, N_("Famine")),
102 GEN_EV(E_CITY_FAMINE_FEARED, E_S_CITY, N_("Famine Feared")),
103 GEN_EV(E_CITY_GROWTH, E_S_CITY, N_("Growth")),
104 GEN_EV(E_CITY_MAY_SOON_GROW, E_S_CITY, N_("May Soon Grow")),
105 GEN_EV(E_CITY_AQUEDUCT, E_S_CITY, N_("Needs Aqueduct")),
106 GEN_EV(E_CITY_AQ_BUILDING, E_S_CITY, N_("Needs Aqueduct Being Built")),
107 GEN_EV(E_CITY_NORMAL, E_S_CITY, N_("Normal")),
108 GEN_EV(E_CITY_NUKED, E_S_CITY, N_("Nuked")),
109 GEN_EV(E_CITY_CMA_RELEASE, E_S_CITY, N_("Released from citizen governor")),
110 GEN_EV(E_CITY_GRAN_THROTTLE, E_S_CITY, N_("Suggest Growth Throttling")),
111 GEN_EV(E_CITY_TRANSFER, E_S_CITY, N_("Transfer")),
112 GEN_EV(E_CITY_BUILD, E_S_CITY, N_("Was Built")),
113 GEN_EV(E_CITY_PLAGUE, E_S_CITY, N_("Has Plague")),
114 GEN_EV(E_CITY_RADIUS_SQ, E_S_CITY, N_("City Map changed")),
115 GEN_EV(E_WORKLIST, E_S_CITY, N_("Worklist Events")),
116 GEN_EV(E_CITY_PRODUCTION_CHANGED, E_S_CITY, N_("Production changed")),
117 GEN_EV(E_DISASTER, E_S_CITY, N_("Disaster")),
118 GEN_EV(E_MY_DIPLOMAT_BRIBE, E_S_D_ME, N_("Bribe")),
119 GEN_EV(E_DIPLOMATIC_INCIDENT, E_S_D_ME, N_("Caused Incident")),
120 GEN_EV(E_MY_DIPLOMAT_ESCAPE, E_S_D_ME, N_("Escape")),
121 GEN_EV(E_MY_DIPLOMAT_EMBASSY, E_S_D_ME, N_("Embassy")),
122 GEN_EV(E_MY_DIPLOMAT_FAILED, E_S_D_ME, N_("Failed")),
123 GEN_EV(E_MY_DIPLOMAT_INCITE, E_S_D_ME, N_("Incite")),
124 GEN_EV(E_MY_DIPLOMAT_POISON, E_S_D_ME, N_("Poison")),
125 GEN_EV(E_MY_DIPLOMAT_SABOTAGE, E_S_D_ME, N_("Sabotage")),
126 GEN_EV(E_MY_DIPLOMAT_THEFT, E_S_D_ME, N_("Theft")),
127 GEN_EV(E_MY_SPY_STEAL_GOLD, E_S_D_ME, N_("Gold Theft")),
128 GEN_EV(E_MY_SPY_STEAL_MAP, E_S_D_ME, N_("Map Theft")),
129 GEN_EV(E_MY_SPY_NUKE, E_S_D_ME, N_("Suitcase Nuke")),
130 GEN_EV(E_ENEMY_DIPLOMAT_BRIBE, E_S_D_THEM, N_("Bribe")),
131 GEN_EV(E_ENEMY_DIPLOMAT_EMBASSY, E_S_D_THEM, N_("Embassy")),
132 GEN_EV(E_ENEMY_DIPLOMAT_FAILED, E_S_D_THEM, N_("Failed")),
133 GEN_EV(E_ENEMY_DIPLOMAT_INCITE, E_S_D_THEM, N_("Incite")),
134 GEN_EV(E_ENEMY_DIPLOMAT_POISON, E_S_D_THEM, N_("Poison")),
135 GEN_EV(E_ENEMY_DIPLOMAT_SABOTAGE, E_S_D_THEM, N_("Sabotage")),
136 GEN_EV(E_ENEMY_DIPLOMAT_THEFT, E_S_D_THEM, N_("Theft")),
137 GEN_EV(E_ENEMY_SPY_STEAL_GOLD, E_S_D_THEM, N_("Gold Theft")),
138 GEN_EV(E_ENEMY_SPY_STEAL_MAP, E_S_D_THEM, N_("Map Theft")),
139 GEN_EV(E_ENEMY_SPY_NUKE, E_S_D_THEM, N_("Suitcase Nuke")),
140 GEN_EV(E_GLOBAL_ECO, E_S_GLOBAL, N_("Eco-Disaster")),
141 GEN_EV(E_NUKE, E_S_GLOBAL, N_("Nuke Detonated")),
142 GEN_EV(E_HUT_BARB, E_S_HUT, N_("Barbarians in a Hut Roused")),
143 GEN_EV(E_HUT_CITY, E_S_HUT, N_("City Founded from Hut")),
144 GEN_EV(E_HUT_GOLD, E_S_HUT, N_("Gold Found in Hut")),
145 GEN_EV(E_HUT_BARB_KILLED, E_S_HUT, N_("Killed by Barbarians in a Hut")),
146 GEN_EV(E_HUT_MERC, E_S_HUT, N_("Mercenaries Found in Hut")),
147 GEN_EV(E_HUT_SETTLER, E_S_HUT, N_("Settler Found in Hut")),
148 GEN_EV(E_HUT_TECH, E_S_HUT, N_("Tech Found in Hut")),
149 GEN_EV(E_HUT_BARB_CITY_NEAR, E_S_HUT, N_("Unit Spared by Barbarians")),
150 GEN_EV(E_ACHIEVEMENT, E_S_NATION, N_("Achievements")),
151 GEN_EV(E_UPRISING, E_S_NATION, N_("Barbarian Uprising")),
152 GEN_EV(E_CIVIL_WAR, E_S_NATION, N_("Civil War")),
153 GEN_EV(E_ANARCHY, E_S_NATION, N_("Collapse to Anarchy")),
154 GEN_EV(E_FIRST_CONTACT, E_S_NATION, N_("First Contact")),
155 GEN_EV(E_NEW_GOVERNMENT, E_S_NATION, N_("Learned New Government")),
156 GEN_EV(E_LOW_ON_FUNDS, E_S_NATION, N_("Low Funds")),
157 GEN_EV(E_POLLUTION, E_S_NATION, N_("?event:Pollution")),
158 GEN_EV(E_REVOLT_DONE, E_S_NATION, N_("Revolution Ended")),
159 GEN_EV(E_REVOLT_START, E_S_NATION, N_("Revolution Started")),
160 GEN_EV(E_SPACESHIP, E_S_NATION, N_("Spaceship Events")),
161 GEN_EV(E_TREATY_ALLIANCE, E_S_TREATY, N_("Alliance")),
162 GEN_EV(E_TREATY_BROKEN, E_S_TREATY, N_("Broken")),
163 GEN_EV(E_TREATY_CEASEFIRE, E_S_TREATY, N_("Cease-fire")),
164 GEN_EV(E_TREATY_EMBASSY, E_S_TREATY, N_("Embassy")),
165 GEN_EV(E_TREATY_PEACE, E_S_TREATY, N_("Peace")),
166 GEN_EV(E_TREATY_SHARED_VISION,E_S_TREATY, N_("Shared Vision")),
167 GEN_EV(E_UNIT_LOST_ATT, E_S_UNIT, N_("Attack Failed")),
168 GEN_EV(E_UNIT_WIN_ATT, E_S_UNIT, N_("Attack Succeeded")),
169 GEN_EV(E_UNIT_BUY, E_S_UNIT, N_("Bought")),
170 GEN_EV(E_UNIT_BUILT, E_S_UNIT, N_("Built")),
171 GEN_EV(E_UNIT_LOST_DEF, E_S_UNIT, N_("Defender Destroyed")),
172 GEN_EV(E_UNIT_WIN_DEF, E_S_UNIT, N_("Defender Survived")),
173 GEN_EV(E_UNIT_BECAME_VET, E_S_UNIT, N_("Promoted to Veteran")),
174 GEN_EV(E_UNIT_LOST_MISC, E_S_UNIT, N_("Lost outside battle")),
175 GEN_EV(E_UNIT_UPGRADED, E_S_UNIT, N_("Production Upgraded")),
176 GEN_EV(E_UNIT_RELOCATED, E_S_UNIT, N_("Relocated")),
177 GEN_EV(E_UNIT_ORDERS, E_S_UNIT, N_("Orders / goto events")),
178 GEN_EV(E_UNIT_BUILT_POP_COST, E_S_UNIT, N_("Built unit with population cost")),
179 GEN_EV(E_UNIT_WAS_EXPELLED, E_S_UNIT, N_("Was Expelled")),
180 GEN_EV(E_UNIT_DID_EXPEL, E_S_UNIT, N_("Did Expel")),
181 GEN_EV(E_UNIT_ACTION_FAILED, E_S_UNIT, N_("Action failed")),
182 /* TRANS: "vote" as a process */
183 GEN_EV(E_VOTE_NEW, E_S_VOTE, N_("New vote")),
184 /* TRANS: "Vote" as a process */
185 GEN_EV(E_VOTE_RESOLVED, E_S_VOTE, N_("Vote resolved")),
186 /* TRANS: "Vote" as a process */
187 GEN_EV(E_VOTE_ABORTED, E_S_VOTE, N_("Vote canceled")),
188 GEN_EV(E_WONDER_BUILD, E_S_WONDER, N_("Finished")),
189 GEN_EV(E_WONDER_OBSOLETE, E_S_WONDER, N_("Made Obsolete")),
190 GEN_EV(E_WONDER_STARTED, E_S_WONDER, N_("Started")),
191 GEN_EV(E_WONDER_STOPPED, E_S_WONDER, N_("Stopped")),
192 GEN_EV(E_WONDER_WILL_BE_BUILT,E_S_WONDER, N_("Will Finish Next Turn")),
193 GEN_EV(E_AI_DEBUG, E_S_XYZZY, N_("AI Debug messages")),
194 GEN_EV(E_BROADCAST_REPORT, E_S_XYZZY, N_("Broadcast Report")),
195 GEN_EV(E_CARAVAN_ACTION, E_S_XYZZY, N_("Caravan actions")),
196 GEN_EV(E_CHAT_ERROR, E_S_XYZZY, N_("Chat error messages")),
197 GEN_EV(E_CHAT_MSG, E_S_XYZZY, N_("Chat messages")),
198 GEN_EV(E_CONNECTION, E_S_XYZZY, N_("Connect/disconnect messages")),
199 GEN_EV(E_DIPLOMACY, E_S_XYZZY, N_("Diplomatic Message")),
200 GEN_EV(E_BAD_COMMAND, E_S_XYZZY, N_("Error message from bad command")),
201 GEN_EV(E_GAME_END, E_S_XYZZY, N_("Game Ended")),
202 GEN_EV(E_GAME_START, E_S_XYZZY, N_("Game Started")),
203 GEN_EV(E_NATION_SELECTED, E_S_XYZZY, N_("Nation Selected")),
204 GEN_EV(E_DESTROYED, E_S_XYZZY, N_("Player Destroyed")),
205 GEN_EV(E_REPORT, E_S_XYZZY, N_("Report")),
206 GEN_EV(E_LOG_FATAL, E_S_XYZZY, N_("Server Aborting")),
207 GEN_EV(E_LOG_ERROR, E_S_XYZZY, N_("Server Problems")),
208 GEN_EV(E_MESSAGE_WALL, E_S_XYZZY, N_("Message from server operator")),
209 GEN_EV(E_SETTING, E_S_XYZZY, N_("Server settings changed")),
210 GEN_EV(E_TURN_BELL, E_S_XYZZY, N_("Turn Bell")),
211 GEN_EV(E_SCRIPT, E_S_XYZZY, N_("Scenario/ruleset script message")),
212 /* TRANS: Event name for when the game year changes. */
213 GEN_EV(E_NEXT_YEAR, E_S_XYZZY, N_("Year Advance")),
214 GEN_EV(E_DEPRECATION_WARNING, E_S_XYZZY, N_("Deprecated Modpack syntax warnings")),
215 GEN_EV(E_SPONTANEOUS_EXTRA, E_S_XYZZY, N_("Extra Appears or Disappears")),
216 GEN_EV(E_UNIT_ILLEGAL_ACTION, E_S_UNIT, N_("Unit Illegal Action")),
217 GEN_EV(E_UNIT_ESCAPED, E_S_UNIT, N_("Unit escaped")),
218 GEN_EV(E_BEGINNER_HELP, E_S_XYZZY, N_("Help for beginners")),
219 GEN_EV(E_MY_UNIT_DID_HEAL, E_S_UNIT, N_("Unit did heal")),
220 GEN_EV(E_MY_UNIT_WAS_HEALED, E_S_UNIT, N_("Unit was healed")),
221 GEN_EV(E_MULTIPLIER, E_S_NATION, N_("Multiplier changed")),
222 GEN_EV(E_UNIT_ACTION_ACTOR_SUCCESS, E_S_UNIT, N_("Your unit did")),
223 GEN_EV(E_UNIT_ACTION_ACTOR_FAILURE, E_S_UNIT, N_("Your unit failed")),
224 GEN_EV(E_UNIT_ACTION_TARGET_HOSTILE, E_S_UNIT, N_("Unit did to you")),
225 GEN_EV(E_UNIT_ACTION_TARGET_OTHER, E_S_UNIT, N_("Unit did")),
226 GEN_EV(E_INFRAPOINTS, E_S_NATION, N_("Infrapoints")),
227 GEN_EV(E_HUT_MAP, E_S_HUT, N_("Map found from a hut")),
228 /* The sound system also generates "e_game_quit", although there's no
229 * corresponding identifier E_GAME_QUIT. */
230};
231
232
233/*
234 * Maps from enum event_type to indexes of events[]. Set by
235 * events_init.
236 */
237 static int event_to_index[E_COUNT];
238
239 enum event_type sorted_events[E_COUNT];
240
241
242/**********************************************************************/
245 const char *get_event_message_text(enum event_type event)
246{
247 fc_assert_ret_val(event_type_is_valid(event), NULL);
248
249 if (events[event_to_index[event]].event == event) {
250 return events[event_to_index[event]].full_descr;
251 }
252
253 log_error("unknown event %d", event);
254 return "UNKNOWN EVENT"; /* FIXME: Should be marked for translation?
255 * we get non-translated in log message. */
256}
257
258/**********************************************************************/
262 static int compar_event_message_texts(const void *i1, const void *i2)
263{
264 const enum event_type *j1 = i1;
265 const enum event_type *j2 = i2;
266
267 return fc_strcasecmp(get_event_message_text(*j1),
268 get_event_message_text(*j2));
269}
270
271/**********************************************************************/
274 const char *get_event_tag(enum event_type event)
275{
276 fc_assert_ret_val(event_type_is_valid(event), NULL);
277
278 if (events[event_to_index[event]].event == event) {
279 return events[event_to_index[event]].tag_name;
280 }
281 log_error("unknown event %d", event);
282
283 return NULL;
284}
285
286/**********************************************************************/
290 bool is_city_event(enum event_type event)
291{
292 switch (event) {
293 case E_GLOBAL_ECO:
294 case E_CITY_LOST:
295 case E_UNIT_LOST_DEF: /* FIXME: Is this correct.
296 * I'd like to find now defendeseless city quickly! */
297 case E_UNIT_LOST_MISC:
298 case E_UNIT_WIN_DEF:
299 case E_ENEMY_DIPLOMAT_FAILED:
300 case E_ENEMY_DIPLOMAT_EMBASSY:
301 case E_ENEMY_DIPLOMAT_POISON:
302 case E_ENEMY_DIPLOMAT_BRIBE:
303 case E_ENEMY_DIPLOMAT_INCITE:
304 case E_ENEMY_DIPLOMAT_SABOTAGE:
305 case E_ENEMY_DIPLOMAT_THEFT:
306 case E_MY_DIPLOMAT_FAILED:
307 case E_MY_DIPLOMAT_EMBASSY:
308 case E_MY_DIPLOMAT_POISON:
309 case E_MY_DIPLOMAT_BRIBE:
310 case E_MY_DIPLOMAT_INCITE:
311 case E_MY_DIPLOMAT_SABOTAGE:
312 case E_MY_DIPLOMAT_THEFT:
313 case E_MY_DIPLOMAT_ESCAPE:
314 case E_UNIT_LOST_ATT:
315 case E_UNIT_WIN_ATT:
316 case E_UPRISING:
317 case E_UNIT_RELOCATED:
318 case E_UNIT_ILLEGAL_ACTION:
319 return FALSE;
320
321 default:
322 return TRUE;
323 }
324}
325
326/**********************************************************************/
330 void events_init(void)
331{
332 int i;
333
334 for (i = 0; i < ARRAY_SIZE(event_to_index); i++) {
335 event_to_index[i] = 0;
336 }
337
338 for (i = 0; i < E_COUNT; i++) {
339 int j;
340
341 if (E_S_XYZZY > events[i].esn) {
342 const char *event_format = Q_(event_sections[events[i].esn]);
343 int l = 1 + strlen(event_format) + strlen(Q_(events[i].descr_orig));
344
345 events[i].full_descr = fc_malloc(l);
346 fc_snprintf(events[i].full_descr, l, event_format,
347 Q_(events[i].descr_orig));
348 } else {
349 /* No section part */
350 events[i].full_descr = fc_strdup(Q_(events[i].descr_orig));
351 }
352
353 event_to_index[events[i].event] = i;
354 events[i].tag_name = fc_strdup(events[i].enum_name);
355 for (j = 0; j < strlen(events[i].tag_name); j++) {
356 events[i].tag_name[j] = fc_tolower(events[i].tag_name[j]);
357 }
358 log_debug("event[%d]=%d: name='%s' / '%s'\n"
359 "\tdescr_orig='%s'\n"
360 "\tdescr='%s'",
361 i, events[i].event, events[i].enum_name, events[i].tag_name,
362 Qn_(events[i].descr_orig), events[i].full_descr);
363 }
364
365 for (i = 0; i <= event_type_max(); i++) {
366 /* Initialise sorted list of all (even possble missing) events. */
367 sorted_events[i] = i;
368 }
369 qsort(sorted_events, event_type_max() + 1, sizeof(*sorted_events),
370 compar_event_message_texts);
371}
372
373/**********************************************************************/
376 void events_free(void)
377{
378 int i;
379
380 for (i = 0; i <= event_type_max(); i++) {
381 free(events[i].full_descr);
382 events[i].full_descr = NULL;
383 }
384}
GEN_EV
#define GEN_EV(event, section, descr)
Definition events.c:68
event_section_n
event_section_n
Definition events.c:30
E_S_D_THEM
@ E_S_D_THEM
Definition events.c:35
E_S_D_ME
@ E_S_D_ME
Definition events.c:34
E_S_NATION
@ E_S_NATION
Definition events.c:38
E_S_TREATY
@ E_S_TREATY
Definition events.c:39
E_S_WONDER
@ E_S_WONDER
Definition events.c:42
E_S_CITY
@ E_S_CITY
Definition events.c:33
E_S_ADVANCE
@ E_S_ADVANCE
Definition events.c:31
E_S_XYZZY
@ E_S_XYZZY
Definition events.c:43
E_S_VOTE
@ E_S_VOTE
Definition events.c:41
E_S_GLOBAL
@ E_S_GLOBAL
Definition events.c:36
E_S_HUT
@ E_S_HUT
Definition events.c:37
E_S_UNIT
@ E_S_UNIT
Definition events.c:40
E_S_BUILD
@ E_S_BUILD
Definition events.c:32
full_descr
char * full_descr
Definition events.c:80
event
enum event_type event
Definition events.c:81
event_to_index
static int event_to_index[E_COUNT]
Definition events.c:237
get_event_message_text
const char * get_event_message_text(enum event_type event)
Definition events.c:245
is_city_event
bool is_city_event(enum event_type event)
Definition events.c:290
enum_name
const char * enum_name
Definition events.c:76
get_event_tag
const char * get_event_tag(enum event_type event)
Definition events.c:274
event_sections
static const char * event_sections[]
Definition events.c:49
compar_event_message_texts
static int compar_event_message_texts(const void *i1, const void *i2)
Definition events.c:262
descr_orig
char * descr_orig
Definition events.c:79
esn
enum event_section_n esn
Definition events.c:78
events
static struct @23 events[]
tag_name
char * tag_name
Definition events.c:77
events_init
void events_init(void)
Definition events.c:330
events_free
void events_free(void)
Definition events.c:376
sorted_events
enum event_type sorted_events[E_COUNT]
Definition events.c:239
events.h
fcintl.h
Q_
#define Q_(String)
Definition fcintl.h:70
Qn_
#define Qn_(String)
Definition fcintl.h:89
N_
#define N_(String)
Definition fcintl.h:69
log.h
fc_assert_ret_val
#define fc_assert_ret_val(condition, val)
Definition log.h:194
log_debug
#define log_debug(message,...)
Definition log.h:115
log_error
#define log_error(message,...)
Definition log.h:103
mem.h
fc_strdup
#define fc_strdup(str)
Definition mem.h:43
fc_malloc
#define fc_malloc(sz)
Definition mem.h:34
shared.h
ARRAY_SIZE
#define ARRAY_SIZE(x)
Definition shared.h:85
fc_snprintf
int fc_snprintf(char *str, size_t n, const char *format,...)
Definition support.c:969
fc_strcasecmp
int fc_strcasecmp(const char *str0, const char *str1)
Definition support.c:189
fc_tolower
char fc_tolower(char c)
Definition support.c:1282
support.h
TRUE
#define TRUE
Definition support.h:46
FALSE
#define FALSE
Definition support.h:47