Files
heimdal/lib/error/error.c
Johan Danielsson 93566390d6 x
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@2330 ec53bebd-3082-4978-b11e-865c3cabbd6b
1997-07-15 21:21:42 +00:00

29 lines
486 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;
}
void
free_error_table(struct error_table *et)
{
while(et){
struct error_table *p = et;
et = et->next;
free(p);
}
}