2008-02-09 Marcus Brinkmann <marcus@g10code.de>
[gnupg.git] / common / status.c
blob7012edf03384f049aaea62facf759d60c51660a2
1 /* status.c - status code helper functions
2 * Copyright (C) 2007 Free Software Foundation, Inc.
4 * This file is part of GnuPG.
6 * GnuPG is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 3 of the License, or
9 * (at your option) any later version.
11 * GnuPG is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, see <http://www.gnu.org/licenses/>.
20 #include <config.h>
21 #include <stdlib.h>
23 #include "util.h"
24 #include "status.h"
25 #include "status-codes.h"
28 /* Return the status string for code NO. */
29 const char *
30 get_status_string ( int no )
32 int idx = statusstr_msgidxof (no);
33 if (idx == -1)
34 return "?";
35 else
36 return statusstr_msgstr + statusstr_msgidx[idx];