Review return type of log functions.

This commit is contained in:
Renaud 2013-09-19 16:32:20 +08:00
parent f5c715debd
commit 32a5631bde
3 changed files with 10 additions and 8 deletions

8
log.c
View File

@ -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)");

8
log.h
View File

@ -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 *, ...) ;

2
main.c
View File

@ -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() ;