Fixed bug #830: pkg-config support. YAZ installs yaz.pc for Debian
[yaz-moved-to-github.git] / src / diag-entry.c
1 /*
2  * Copyright (C) 1995-2007, Index Data ApS
3  * See the file LICENSE for details.
4  *
5  * $Id: diag-entry.c,v 1.4 2007-01-03 08:42:15 adam Exp $
6  */
7
8 /**
9  * \file diag-entry.c
10  * \brief Diagnostic table lookup
11  */
12
13 #if HAVE_CONFIG_H
14 #include <config.h>
15 #endif
16
17 #include "diag-entry.h"
18
19 const char *yaz_diag_to_str(struct yaz_diag_entry *tab, int code)
20 {
21     int i;
22     for (i=0; tab[i].msg; i++)
23         if (tab[i].code == code)
24             return tab[i].msg;
25     return "Unknown error";
26 }
27 /*
28  * Local variables:
29  * c-basic-offset: 4
30  * indent-tabs-mode: nil
31  * End:
32  * vim: shiftwidth=4 tabstop=8 expandtab
33  */
34