summaryrefslogtreecommitdiffstats
path: root/src/util/et/error_message.c
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@mit.edu>2001-10-06 03:14:42 +0000
committerKen Raeburn <raeburn@mit.edu>2001-10-06 03:14:42 +0000
commitc1d2e4e4deaa5d5df19171539a30c13fc43b7a6f (patch)
treeb6b4e2f17a5ab2b237a27c2f6c80f659615285bd /src/util/et/error_message.c
parent2e0ebe3766332b985c79b7ff92476c61fa16326b (diff)
downloadkrb5-c1d2e4e4deaa5d5df19171539a30c13fc43b7a6f.tar.gz
krb5-c1d2e4e4deaa5d5df19171539a30c13fc43b7a6f.tar.xz
krb5-c1d2e4e4deaa5d5df19171539a30c13fc43b7a6f.zip
Danilo also says we can get rid of _MSDOS (Win16) tests, and explicit FAR/NEAR specs
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13786 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/util/et/error_message.c')
-rw-r--r--src/util/et/error_message.c45
1 files changed, 6 insertions, 39 deletions
diff --git a/src/util/et/error_message.c b/src/util/et/error_message.c
index 48c9b1fad..827b52aa7 100644
--- a/src/util/et/error_message.c
+++ b/src/util/et/error_message.c
@@ -31,7 +31,7 @@
#include <ErrorLib.h>
#endif
-#if defined(_MSDOS) || defined(_WIN32)
+#if defined(_WIN32)
#define HAVE_STRERROR
#endif
@@ -48,7 +48,7 @@ extern const int sys_nerr;
static char buffer[ET_EBUFSIZ];
-#if (defined(_MSDOS) || defined(_WIN32) || defined(macintosh))
+#if (defined(_WIN32) || defined(macintosh))
/*@null@*/ static struct et_list * _et_list = (struct et_list *) NULL;
#else
/* Old interface compatibility */
@@ -57,24 +57,13 @@ static char buffer[ET_EBUFSIZ];
/*@null@*//*@only@*/static struct dynamic_et_list * et_list_dynamic;
-#ifdef _MSDOS
-/*
- * Win16 applications cannot call malloc while the DLL is being
- * initialized... To get around this, we pre-allocate an array
- * sufficient to hold several error tables.
- */
-#define PREALLOCATE_ETL 32
-static struct et_list etl[PREALLOCATE_ETL];
-static int etl_used = 0;
-#endif
-
#ifndef DEBUG_TABLE_LIST
#define dprintf(X)
#else
#define dprintf(X) printf X
#endif
-const char FAR * KRB5_CALLCONV
+const char * KRB5_CALLCONV
error_message(long code)
/*@modifies internalState@*/
{
@@ -161,7 +150,7 @@ error_message(long code)
return table->msgs[offset];
no_table_found:
-#if defined(_MSDOS) || defined(_WIN32)
+#if defined(_WIN32)
/*
* WinSock errors exist in the 10000 and 11000 ranges
* but might not appear if WinSock is not initialized
@@ -243,26 +232,12 @@ oops:
/*@-incondefs@*/ /* _et_list is global on unix but not in header annotations */
errcode_t KRB5_CALLCONV
-add_error_table(/*@dependent@*/ const struct error_table FAR * et)
-#ifndef _MSDOS
+add_error_table(/*@dependent@*/ const struct error_table * et)
/*@modifies _et_list,et_list_dynamic@*/
-#else
- /*@modifies _et_list,et_list_dynamic,etl_used,etl@*/
-#endif
/*@=incondefs@*/
{
struct dynamic_et_list *del;
-#ifdef _MSDOS
- if (etl_used < PREALLOCATE_ETL) {
- el = &etl[etl_used++];
- el->table = et;
- el->next = _et_list;
- et_list = el;
- return 0;
- }
-#endif
-
del = (struct dynamic_et_list *)malloc(sizeof(struct dynamic_et_list));
if (del == NULL)
return errno;
@@ -275,12 +250,8 @@ add_error_table(/*@dependent@*/ const struct error_table FAR * et)
/*@-incondefs@*/ /* _et_list is global on unix but not in header annotations */
errcode_t KRB5_CALLCONV
-remove_error_table(const struct error_table FAR * et)
-#ifdef _MSDOS
- /*@modifies _et_list,et_list_dynamic,etl_used,etl@*/
-#else
+remove_error_table(const struct error_table * et)
/*@modifies _et_list,et_list_dynamic@*/
-#endif
/*@=incondefs@*/
{
struct dynamic_et_list **del;
@@ -301,10 +272,6 @@ remove_error_table(const struct error_table FAR * et)
*el = old->next;
old->next = NULL;
old->table = NULL;
-#ifdef _MSDOS
- if ((old >= etl) && (old < &etl[PREALLOCATE_ETL-1]))
- /* do something? */;
-#endif
return 0;
}
return ENOENT;