From 15903f5c6ca3cdeea14fdf770b477dd041a0ec7a Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Thu, 18 Mar 2004 02:03:15 +0000 Subject: [PATCH] * error.c (ss_error): Always use ANSI C form. Don't try to hide the declaration in the header file. * ss.h: Always use the prototype forms of declarations. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16178 dc483132-0cff-0310-8789-dd5450dbe970 --- src/util/ss/ChangeLog | 7 +++++++ src/util/ss/error.c | 28 ---------------------------- src/util/ss/ss.h | 18 ------------------ 3 files changed, 7 insertions(+), 46 deletions(-) diff --git a/src/util/ss/ChangeLog b/src/util/ss/ChangeLog index 8cc5b8bef..fde441576 100644 --- a/src/util/ss/ChangeLog +++ b/src/util/ss/ChangeLog @@ -1,3 +1,10 @@ +2004-03-17 Ken Raeburn + + * error.c (ss_error): Always use ANSI C form. Don't try to hide + the declaration in the header file. + + * ss.h: Always use the prototype forms of declarations. + 2003-06-27 Ken Raeburn * Makefile.in (HDRS): Remove mit-sipb-copyright.h. diff --git a/src/util/ss/error.c b/src/util/ss/error.c index 0274bce61..064805506 100644 --- a/src/util/ss/error.c +++ b/src/util/ss/error.c @@ -7,23 +7,10 @@ #include -/* - * I'm assuming that com_err.h includes varargs.h, which it does - * (right now). There really ought to be a way for me to include the - * file without worrying about whether com_err.h includes it or not, - * but varargs.h doesn't define anything that I can use as a flag, and - * gcc will lose if I try to include it twice and redefine stuff. - */ -#if !defined(__STDC__) || !defined(ibm032) || !defined(NeXT) -#define ss_error ss_error_external -#endif - #include "copyright.h" #include "com_err.h" #include "ss_internal.h" -#undef ss_error - char * ss_name(sci_idx) int sci_idx; { @@ -62,26 +49,11 @@ char * ss_name(sci_idx) } } -#ifdef HAVE_STDARG_H void ss_error (int sci_idx, long code, const char * fmt, ...) -#else -void ss_error (va_alist) - va_dcl -#endif { register char *whoami; va_list pvar; -#ifndef HAVE_STDARG_H - int sci_idx; - long code; - char * fmt; - va_start (pvar); - sci_idx = va_arg (pvar, int); - code = va_arg (pvar, long); - fmt = va_arg (pvar, char *); -#else va_start (pvar, fmt); -#endif whoami = ss_name (sci_idx); com_err_va (whoami, code, fmt, pvar); free (whoami); diff --git a/src/util/ss/ss.h b/src/util/ss/ss.h index 062003d3c..45ba4061b 100644 --- a/src/util/ss/ss.h +++ b/src/util/ss/ss.h @@ -48,7 +48,6 @@ void ss_help __SS_PROTO; void ss_list_requests __SS_PROTO; void ss_quit __SS_PROTO; char *ss_current_request(); -#ifdef __STDC__ char *ss_name(int); void ss_error (int, long, char const *, ...); void ss_perror (int, long, char const *); @@ -64,22 +63,5 @@ char *ss_get_prompt(int); void ss_add_request_table(int, ss_request_table *, int, int *); void ss_delete_request_table(int, ss_request_table *, int *); int ss_execute_line (int, char*); -#else -char *ss_name(); -void ss_error (); -void ss_perror (); -int ss_listen (); -int ss_create_invocation(); -void ss_delete_invocation(); -void ss_add_info_dir(); -void ss_delete_info_dir(); -int ss_execute_command(); -void ss_abort_subsystem(); -void ss_set_prompt(); -char *ss_get_prompt(); -void ss_add_request_table(); -void ss_delete_request_table(); -int ss_execute_line(); -#endif extern ss_request_table ss_std_requests; #endif /* _ss_h */ -- 2.26.2