YAZ
5.34.0
src
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
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
config.h
yaz_diag_to_str
const char * yaz_diag_to_str(struct yaz_diag_entry *tab, int code)
Definition:
diag-entry.c:17
diag-entry.h
Diagnostic table lookup header.
yaz_diag_entry
Definition:
diag-entry.h:33
yaz_diag_entry::msg
char * msg
Definition:
diag-entry.h:35
Generated by
1.9.1