Changed include/yaz/diagbib1.h and added include/yaz/diagsrw.h with
[yaz-moved-to-github.git] / src / diag-entry.c
1 /*
2  * Copyright (C) 1995-2005, Index Data ApS
3  * See the file LICENSE for details.
4  *
5  * $Id: diag-entry.c,v 1.1 2005-04-22 08:27:58 adam Exp $
6  */
7
8 #include "diag-entry.h"
9
10 const char *yaz_diag_to_str(struct yaz_diag_entry *tab, int code)
11 {
12     int i;
13     for (i=0; tab[i].msg; i++)
14         if (tab[i].code == code)
15             return tab[i].msg;
16     return "Unknown error";
17 }