From f8df14701567a3f11a7ee1d735cd87ebe13e1c8c Mon Sep 17 00:00:00 2001 From: Renaud Fivet Date: Fri, 13 Feb 2015 11:23:12 +0800 Subject: [PATCH] Insure restflag and resterr() belong to same scope. --- file.c | 5 +++++ file.h | 1 + log.c | 6 ------ log.h | 1 - 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/file.c b/file.c index 38c9da4..043f398 100644 --- a/file.c +++ b/file.c @@ -50,6 +50,11 @@ static const char *eolname[] = { boolean restflag = FALSE ; /* restricted use? */ +boolean resterr( void) { + writefmt( "%B(That command is RESTRICTED)") ; + return FALSE ; +} + /* * Read a file into the current * buffer. This is really easy; all you do it diff --git a/file.h b/file.h index 53417ad..5643833 100644 --- a/file.h +++ b/file.h @@ -11,6 +11,7 @@ int set_encryption_key( int f, int n) ; #endif extern boolean restflag ; /* restricted use? */ +boolean resterr( void) ; /* restricted error message */ int fileread( int f, int n) ; int insfile( int f, int n) ; diff --git a/log.c b/log.c index 75e6671..976969e 100644 --- a/log.c +++ b/log.c @@ -18,9 +18,3 @@ boolean rdonly( void) { writefmt( "%B(Key illegal in VIEW mode)") ; return FALSE ; } - - -boolean resterr( void) { - writefmt( "%B(That command is RESTRICTED)") ; - return FALSE ; -} diff --git a/log.h b/log.h index e330be9..c353f7b 100644 --- a/log.h +++ b/log.h @@ -5,4 +5,3 @@ extern void (*writefmt)( const char *, ...) ; void writestr( const char *str) ; boolean rdonly( void) ; -boolean resterr( void) ;