Move error messages to new util module
[tig.git] / util.c
blobb0fc22619cfa0c8b0dc90663ce8c56991381f9af
1 /* Copyright (c) 2006-2013 Jonas Fonseca <fonseca@diku.dk>
3 * This program is free software; you can redistribute it and/or
4 * modify it under the terms of the GNU General Public License as
5 * published by the Free Software Foundation; either version 2 of
6 * the License, or (at your option) any later version.
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.
14 #include "tig.h"
15 #include "util.h"
17 static const char *status_messages[] = {
18 #define STATUS_CODE_MESSAGE(name, msg) msg
19 STATUS_CODE_INFO(STATUS_CODE_MESSAGE)
22 const char *
23 get_status_message(enum status_code code)
25 if (code == SUCCESS)
26 return "";
27 return status_messages[code];
30 /* vim: set ts=8 sw=8 noexpandtab: */