From e2fcb90996c592a51979e95133a0652d13bdb1fd Mon Sep 17 00:00:00 2001 From: Renaud Fivet Date: Thu, 6 Jun 2013 09:28:34 +0800 Subject: [PATCH] clean macroes in main and remove main.h (no more dependencies to main). --- estruct.h | 2 ++ main.c | 22 +++++++--------------- main.h | 8 -------- 3 files changed, 9 insertions(+), 23 deletions(-) delete mode 100644 main.h diff --git a/estruct.h b/estruct.h index dd7a83d..9863a1e 100644 --- a/estruct.h +++ b/estruct.h @@ -403,6 +403,8 @@ #if CLEAN #define exit(a) cexit(a) + +int cexit( int status) ; #endif /* diff --git a/main.c b/main.c index 352a0b1..5b1758c 100644 --- a/main.c +++ b/main.c @@ -1,6 +1,3 @@ -/* main.c -- implements main.h */ -#include "main.h" - /* * main.c @@ -60,27 +57,23 @@ #include -/* Make global definitions not external. */ -#define maindef - -#include "crypt.h" -#include "display.h" -#include "estruct.h" /* Global structures and defines. */ -#include "edef.h" /* Global definitions. */ -#include "input.h" -#include "termio.h" -#include "version.h" - #include "basic.h" #include "bind.h" #include "bindable.h" #include "buffer.h" +#include "crypt.h" +#include "display.h" +#include "edef.h" /* Global definitions. */ +#include "estruct.h" /* Global structures and defines. */ #include "eval.h" #include "execute.h" #include "file.h" +#include "input.h" #include "lock.h" #include "random.h" #include "search.h" +#include "termio.h" +#include "version.h" /* For MSDOS, increase the default stack space. */ #if MSDOS & TURBO @@ -93,7 +86,6 @@ extern unsigned _stklen = 32766; #if UNIX #include -static void emergencyexit(int); #ifdef SIGWINCH extern void sizesignal(int); #endif diff --git a/main.h b/main.h deleted file mode 100644 index 34c2f3b..0000000 --- a/main.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef _MAIN_H_ -#define _MAIN_H_ - -#if CLEAN -int cexit( int status) ; -#endif - -#endif