33#define MESSAGES_MAX_KEY_LENGTH 30
41#define MESSAGES_MAX_MSG_LENGTH 120
43#define MESSAGES_COUNT 32
45#define MESSAGES_FILENAME "loc.txt"
47#define MESSAGES_NOKEYFOUND "NO MESSAGE FOUND FOR THIS KEY"
50#define MSG_SHOW(dict,key) printf(msgGet(dict,key))
52#define MSG_SHOWN(dict,key) printf(msgGet(dict,key)); printf("\n")
54#define MSG_SHOWS(dict,key) printf(msgGet(dict,key)); printf(" ")
57#define MSG_SHOWV(dict,key,...) printf(msgGet(dict,key),__VA_ARGS__)
59#define MSG_SHOWVN(dict,key,...) printf(msgGet(dict,key),__VA_ARGS__); printf("\n")
61#define MSG_SHOWVS(dict,key,...) printf(msgGet(dict,key),__VA_ARGS__); printf(" ")
#define MESSAGES_MAX_MSG_LENGTH
Maximum length of a single message text.
Definition messages.h:41
#define MESSAGES_MAX_KEY_LENGTH
Maximum length of a single key.
Definition messages.h:33
Message GLOBAL_MSGS[MESSAGES_COUNT]
A global singleton that holds all the message strings.
Definition messages.c:10
#define MESSAGES_COUNT
Current amount of lines contained within the loc.txt file.
Definition messages.h:43
void msgInitFromFile(const char *)
Populates the global singleton GLOBAL_MSGS with contents of the provided file.
Definition messages.c:18
char * msgGet(const Message[], const char *)
Retrieves a message with the matching key value.
Definition messages.c:61
A message string with a unique Key.
Definition messages.h:64