summaryrefslogtreecommitdiffstats
path: root/eBones/krb/log.c
diff options
context:
space:
mode:
authormarkm <markm@FreeBSD.org>1995-09-07 21:39:00 +0000
committermarkm <markm@FreeBSD.org>1995-09-07 21:39:00 +0000
commit2539acf77b018acd7416a9857a14c466e55cd7e8 (patch)
tree96ff3578d62372822240f11a1567e45b880f3910 /eBones/krb/log.c
parenteed9438eb23b62f78af7685dc226228e2bf5c524 (diff)
downloadFreeBSD-src-2539acf77b018acd7416a9857a14c466e55cd7e8.zip
FreeBSD-src-2539acf77b018acd7416a9857a14c466e55cd7e8.tar.gz
Major cleanup of eBones code:
- Get all functions prototyped or at least defined before use. - Make code compile (Mostly) clean with -Wall set - Start to reduce the degree to which DES aka libdes is built in. - get all functions to the same uniform standard of definition: int foo(a, b) int a; int *b; { : } - fix numerous bugs exposed by above processes. Note - this replaces the previous work which used an unpopular function definition style.
Diffstat (limited to 'eBones/krb/log.c')
-rw-r--r--eBones/krb/log.c23
1 files changed, 17 insertions, 6 deletions
diff --git a/eBones/krb/log.c b/eBones/krb/log.c
index aea6ab9..e33477f 100644
--- a/eBones/krb/log.c
+++ b/eBones/krb/log.c
@@ -44,12 +44,18 @@ static is_open;
* The return value is undefined.
*/
+__BEGIN_DECLS
+char *month_sname __P((int));
+__END_DECLS
+
+
/*VARARGS1 */
-void log(char *format,int a1,int a2,int a3,int a4,int a5,int a6,int a7,
- int a8,int a9,int a0)
+void log(format,a1,a2,a3,a4,a5,a6,a7,a8,a9,a0)
+ char *format;
+ int a1,a2,a3,a4,a5,a6,a7,a8,a9,a0;
{
- FILE *logfile;
- long now;
+ FILE *logfile, *fopen();
+ long time(),now;
struct tm *tm;
if ((logfile = fopen(log_name,"a")) == NULL)
@@ -73,7 +79,9 @@ void log(char *format,int a1,int a2,int a3,int a4,int a5,int a6,int a7,
* the logfile defaults to KRBLOG, defined in "krb.h".
*/
-void set_logfile(char *filename)
+void
+set_logfile(filename)
+ char *filename;
{
log_name = filename;
is_open = 0;
@@ -86,7 +94,10 @@ void set_logfile(char *filename)
* on success.
*/
-int new_log(long t, char *string)
+int
+new_log(t,string)
+ long t;
+ char *string;
{
static FILE *logfile;
OpenPOWER on IntegriCloud