YAZ 5.35.1
diag-entry.c
Go to the documentation of this file.
1/* This file is part of the YAZ toolkit.
2 * Copyright (C) Index Data
3 * See the file LICENSE for details.
4 */
5
11#if HAVE_CONFIG_H
12#include <config.h>
13#endif
14
15#include <diag-entry.h>
16
17const 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
const char * yaz_diag_to_str(struct yaz_diag_entry *tab, int code)
Definition diag-entry.c:17
Diagnostic table lookup header.
Definition diag-entry.h:33
char * msg
Definition diag-entry.h:35