From ce309aa5a9c1f813f6bdf152221f9bff88c4d3e1 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Mon, 26 Nov 2012 17:20:15 +0000 Subject: add message retrival of error codes ensuring there are messages for all codes --- utils/messages.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'utils/messages.h') diff --git a/utils/messages.h b/utils/messages.h index 2b78d07ee..81c380515 100644 --- a/utils/messages.h +++ b/utils/messages.h @@ -33,6 +33,7 @@ #ifndef _NETSURF_UTILS_MESSAGES_H_ #define _NETSURF_UTILS_MESSAGES_H_ +#include "utils/errors.h" #include "utils/hashtable.h" void messages_load(const char *path); @@ -40,6 +41,14 @@ struct hash_table *messages_load_ctx(const char *path, struct hash_table *ctx); const char *messages_get_ctx(const char *key, struct hash_table *ctx); const char *messages_get(const char *key); +/** + * lookup of a message by errorcode from the standard Messages hash. + * + * \param code errorcode of message + * \return message text + */ +const char *messages_get_errorcode(nserror code); + /** * Formatted message from a key in the global message hash. * -- cgit v1.2.3