struct error_table {
    char const * const * msgs;
    long base;
    int n_msgs;
};
struct et_list {
    struct et_list *next;
    struct error_table *table;
};
extern struct et_list *_et_list;

to be binary compatible with MIT compile_et


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@4436 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Björn Groenvall
1998-02-17 21:19:44 +00:00
parent 42ac8abf83
commit be97c75d57
4 changed files with 37 additions and 25 deletions

View File

@@ -45,13 +45,13 @@ RCSID("$Id$");
#include <string.h>
#include "com_err.h"
static struct error_table *et_list;
struct et_list *_et_list;
const char *
error_message (long code)
{
static char msg[128];
const char *p = com_right(et_list, code);
const char *p = com_right(_et_list, code);
if(p){
strncpy(msg, p, sizeof(msg));
msg[sizeof(msg)-1] = '\0';
@@ -64,7 +64,7 @@ error_message (long code)
int
init_error_table(const char **msgs, long base, int count)
{
initialize_error_table_r(&et_list, msgs, count, base);
initialize_error_table_r(&_et_list, msgs, count, base);
return 0;
}