2015-01-30 20:37:14 +01:00
|
|
|
/*
|
2010-08-08 10:06:34 +02:00
|
|
|
+-------------------+ Christian Schlittchen <corwin@amber.kn-bremen.de>
|
|
|
|
| | Enno Rehling <enno@eressea.de>
|
|
|
|
| Eressea PBEM host | Katja Zedel <katze@felidae.kn-bremen.de>
|
|
|
|
| (c) 1998 - 2003 | Henning Peters <faroul@beyond.kn-bremen.de>
|
|
|
|
| | Ingo Wilken <Ingo.Wilken@informatik.uni-oldenburg.de>
|
|
|
|
+-------------------+ Stefan Reich <reich@halbling.de>
|
|
|
|
|
|
|
|
This program may not be used, modified or distributed
|
|
|
|
without prior permission by the authors of Eressea.
|
2015-01-30 20:37:14 +01:00
|
|
|
*/
|
2010-08-08 10:06:34 +02:00
|
|
|
|
|
|
|
#ifndef H_UTIL_NRMESSAGE
|
|
|
|
#define H_UTIL_NRMESSAGE
|
2016-11-25 20:15:11 +01:00
|
|
|
|
|
|
|
#include <stddef.h>
|
2018-05-16 21:58:02 +02:00
|
|
|
#include <stdio.h>
|
2016-11-25 20:15:11 +01:00
|
|
|
|
2010-08-08 10:06:34 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2015-01-30 20:37:14 +01:00
|
|
|
struct locale;
|
|
|
|
struct message;
|
|
|
|
struct message_type;
|
|
|
|
struct nrmessage_type;
|
|
|
|
|
|
|
|
typedef struct nrsection {
|
|
|
|
char *name;
|
|
|
|
struct nrsection *next;
|
|
|
|
} nrsection;
|
|
|
|
|
|
|
|
extern nrsection *sections;
|
|
|
|
|
2017-01-23 21:35:01 +01:00
|
|
|
void free_nrmesssages(void);
|
|
|
|
|
2018-05-17 19:03:49 +02:00
|
|
|
void nrt_register(const struct message_type *mtype, const char *section);
|
|
|
|
struct nrmessage_type *nrt_find(const struct message_type *);
|
|
|
|
const char *nrt_string(const struct nrmessage_type *nrt, const struct locale *lang);
|
|
|
|
const char *nrt_section(const struct nrmessage_type *nrt);
|
2015-01-30 20:37:14 +01:00
|
|
|
|
2017-01-23 21:35:01 +01:00
|
|
|
size_t nr_render(const struct message *msg, const struct locale *lang,
|
2015-01-30 20:37:14 +01:00
|
|
|
char *buffer, size_t size, const void *userdata);
|
2017-01-23 21:35:01 +01:00
|
|
|
const char *nr_section(const struct message *msg);
|
2015-01-30 20:37:14 +01:00
|
|
|
|
2010-08-08 10:06:34 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif
|