error_message.c revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* Copyright (c) 1998-2000 by Sun Microsystems, Inc.
* All rights reserved.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
*
* Copyright 1987 by the Student Information Processing Board
* of the Massachusetts Institute of Technology
*
* For copyright info, see "mit-sipb-copyright.h".
*/
#include <stdio.h>
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#include <string.h>
#include <libintl.h>
#include "com_err.h"
#include "mit-sipb-copyright.h"
#include "internal.h"
#include "error_message.h"
static char buffer[25];
long code;
{
int offset;
long l_offset;
long table_num;
int started = 0;
char *cp;
if (!table_num) {
#ifdef HAVE_STRERROR
if (cp)
return cp;
goto oops;
#else
#ifdef HAVE_SYS_ERRLIST
return(sys_errlist[offset]);
else
goto oops;
#else
goto oops;
#endif /* HAVE_SYS_ERRLIST */
#endif /* HAVE_STRERROR */
}
switch (table_num) {
case -2045022976L:
return(ggss_error_table(offset));
case -1783126272L:
return(kadm_error_table(offset));
case -1780008448L:
return(kdb5_error_table(offset));
case -1779992064L:
return(kdc5_error_table(offset));
case -1767084800L:
return(kpws_error_table(offset));
case -1765328384L:
return(krb5_error_table(offset));
case -1760647424L:
return(kv5m_error_table(offset));
case -1492553984L:
return(ovku_error_table(offset));
case -1429577728L:
return(prof_error_table(offset));
case 748800L:
return(ss_error_table(offset));
case 28810240L:
return(adb_error_table(offset));
case 1859794432L:
return(asn1_error_table(offset));
case 37349888L:
return(imp_error_table(offset));
case 39756032L:
return(k5g_error_table(offset));
case 43787520L:
return(ovk_error_table(offset));
case 44806912L:
return(pty_error_table(offset));
}
oops:
;
if (offset >= 100) {
offset %= 100;
started++;
}
offset %= 10;
}
*cp = '\0';
return(buffer);
}