Files
heimdal/lib/com_err/error.c
Johan Danielsson e3c11cd30c Replace krb5_get_err_text with new function com_right.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@2127 ec53bebd-3082-4978-b11e-865c3cabbd6b
1997-07-10 04:19:46 +00:00

19 lines
359 B
C

#ifdef HAVE_CONFIG_H
#include <config.h>
RCSID("$Id$");
#endif
#include <stdio.h>
#include <string.h>
#include <error.h>
const char *
com_right(struct error_table *list, long code)
{
struct error_table *p;
for(p = list; p; p = p->next){
if(code >= p->base && code < p->base + p->n_msgs)
return p->msgs[code - p->base];
}
return NULL;
}