diff options
Diffstat (limited to 'crypto/heimdal/lib/com_err/com_err.c')
-rw-r--r-- | crypto/heimdal/lib/com_err/com_err.c | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/crypto/heimdal/lib/com_err/com_err.c b/crypto/heimdal/lib/com_err/com_err.c index 25c679e..7975739 100644 --- a/crypto/heimdal/lib/com_err/com_err.c +++ b/crypto/heimdal/lib/com_err/com_err.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997 - 2000 Kungliga Tekniska Högskolan + * Copyright (c) 1997 - 2001 Kungliga Tekniska Högskolan * (Royal Institute of Technology, Stockholm, Sweden). * All rights reserved. * @@ -33,7 +33,7 @@ #ifdef HAVE_CONFIG_H #include <config.h> -RCSID("$Id: com_err.c,v 1.15 2000/04/04 22:04:55 assar Exp $"); +RCSID("$Id: com_err.c,v 1.17 2001/05/11 20:02:34 assar Exp $"); #endif #include <stdio.h> #include <stdlib.h> @@ -68,6 +68,10 @@ init_error_table(const char **msgs, long base, int count) static void default_proc (const char *whoami, long code, const char *fmt, va_list args) + __attribute__((__format__(__printf__, 3, 0))); + +static void +default_proc (const char *whoami, long code, const char *fmt, va_list args) { if (whoami) fprintf(stderr, "%s: ", whoami); @@ -149,3 +153,17 @@ error_table_name(int num) *p = '\0'; return(buf); } + +void +add_to_error_table(struct et_list *new_table) +{ + struct et_list *et; + + for (et = _et_list; et; et = et->next) { + if (et->table->base == new_table->table->base) + return; + } + + new_table->next = _et_list; + _et_list = new_table; +} |