From 32a5631bde2e28699a21d9920dce3f8ae585fc00 Mon Sep 17 00:00:00 2001 From: Renaud Fivet Date: Thu, 19 Sep 2013 16:32:20 +0800 Subject: [PATCH] Review return type of log functions. --- log.c | 8 ++++---- log.h | 8 +++++--- main.c | 2 +- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/log.c b/log.c index dce6d7a..debf1b4 100644 --- a/log.c +++ b/log.c @@ -8,17 +8,17 @@ static void logdump( const char *buf, ...) { void (*logwrite)( const char *, ...) = logdump ; -static int logit( int retcode, int beep_f, const char *buf, ...) { +static boolean logit( boolean retcode, boolean beep_f, const char *buf, ...) { return retcode ; } -int (*logger)( int, int, const char *, ...) = logit ; +boolean (*logger)( boolean, boolean, const char *, ...) = logit ; /* * tell the user that this command is illegal while we are in * VIEW (read-only) mode */ -int rdonly(void) +boolean rdonly(void) { /* TTbeep(); mlwrite("(Key illegal in VIEW mode)"); @@ -29,7 +29,7 @@ int rdonly(void) -int resterr(void) +boolean resterr(void) { /* TTbeep(); mlwrite("(That command is RESTRICTED)"); diff --git a/log.h b/log.h index 66c8beb..4441fad 100644 --- a/log.h +++ b/log.h @@ -1,6 +1,8 @@ -int rdonly( void) ; -int resterr( void) ; +#include "retcode.h" + +boolean rdonly( void) ; +boolean resterr( void) ; extern void (*logwrite)( const char *, ...) ; -extern int (*logger)( int, int, const char *, ...) ; +extern boolean (*logger)( boolean, boolean, const char *, ...) ; diff --git a/main.c b/main.c index 20aa84c..abe7f05 100644 --- a/main.c +++ b/main.c @@ -124,7 +124,7 @@ static void usage( void) { } -static int mllog( int retcode, int beep_f, const char *buf, ...) { +static boolean mllog( boolean retcode, boolean beep_f, const char *buf, ...) { if( beep_f) TTbeep() ;