nmake: ICU_VER helper var
[yaz-moved-to-github.git] / src / diag-entry.c
1 /* This file is part of the YAZ toolkit.
2  * Copyright (C) Index Data
3  * See the file LICENSE for details.
4  */
5
6 /**
7  * \file diag-entry.c
8  * \brief Diagnostic table lookup
9  */
10
11 #if HAVE_CONFIG_H
12 #include <config.h>
13 #endif
14
15 #include "diag-entry.h"
16
17 const char *yaz_diag_to_str(struct yaz_diag_entry *tab, int code)
18 {
19     int i;
20     for (i=0; tab[i].msg; i++)
21         if (tab[i].code == code)
22             return tab[i].msg;
23     return "Unknown error";
24 }
25 /*
26  * Local variables:
27  * c-basic-offset: 4
28  * c-file-style: "Stroustrup"
29  * indent-tabs-mode: nil
30  * End:
31  * vim: shiftwidth=4 tabstop=8 expandtab
32  */
33