diff options
author | Thiago Farina <tfransosi@gmail.com> | 2010-08-29 23:28:34 -0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-09-07 13:47:00 -0700 |
commit | 74336ca924c45d46b9fafffb9309878e368cc301 (patch) | |
tree | 092ffb5399737596ace272d12d34a5e2d5d1961c | |
parent | 1dcc35b3098ee7675d974aee313cd73291f8f2dd (diff) | |
download | uemacs-74336ca924c45d46b9fafffb9309878e368cc301.tar.gz |
uemacs: Get rid of the CALLED macro.
uemacs is not a subprogram and doesn't seem it will be, so there is no reason
to leave this macro. And this macro is defined to 0, so we never reach the path
where we test for this macro.
Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | edef.h | 4 | ||||
-rw-r--r-- | estruct.h | 1 | ||||
-rw-r--r-- | globals.c | 4 | ||||
-rw-r--r-- | main.c | 31 |
4 files changed, 5 insertions, 35 deletions
@@ -86,10 +86,6 @@ extern int saveflag; /* Flags, saved with the $target var */ extern char *fline; /* dynamic return line */ extern int flen; /* current length of fline */ extern int rval; /* return value of a subprocess */ -#if CALLED -extern int eexitflag; /* EMACS exit flag */ -extern int eexitval; /* and the exit return value */ -#endif #if PKCODE extern int nullflag; extern int justflag; /* justify, don't fill */ @@ -156,7 +156,6 @@ #define AEDIT 1 /* advanced editing options: en/detabbing */ #define PROC 1 /* named procedures */ #define CLEAN 0 /* de-alloc memory on exit */ -#define CALLED 0 /* is emacs a called subroutine? or stand alone */ #define ASCII 1 /* always using ASCII char sequences for now */ #define EBCDIC 0 /* later IBM mainfraim versions will use EBCDIC */ @@ -81,10 +81,6 @@ int saveflag = 0; /* Flags, saved with the $target var */ char *fline = NULL; /* dynamic return line */ int flen = 0; /* current length of fline */ int rval = 0; /* return value of a subprocess */ -#if CALLED -int eexitflag = FALSE; /* EMACS exit flag */ -int eexitval = 0; /* and the exit return value */ -#endif #if PKCODE int nullflag = FALSE; /* accept null characters */ int justflag = FALSE; /* justify, don't fill */ @@ -100,11 +100,7 @@ void usage(int status) exit(status); } -#if CALLED -int emacs(int argc, char **argv) -#else int main(int argc, char **argv) -#endif { int c = -1; /* command character */ int f; /* default flag */ @@ -166,9 +162,6 @@ int main(int argc, char **argv) #if CRYPT cryptflag = FALSE; /* no encryption by default */ #endif -#if CALLED - eexitflag = FALSE; /* not time to exit yet */ -#endif /* Parse the command line */ for (carg = 1; carg < argc; ++carg) { @@ -305,23 +298,16 @@ int main(int argc, char **argv) update(FALSE); } - /* setup to process commands */ - lastflag = 0; /* Fake last flags. */ + /* Setup to process commands. */ + lastflag = 0; /* Fake last flags. */ loop: - -#if CALLED - /* if we were called as a subroutine and want to leave, do so */ - if (eexitflag) - return eexitval; -#endif - - /* execute the "command" macro...normally null */ - saveflag = lastflag; /* preserve lastflag through this */ + /* Execute the "command" macro...normally null. */ + saveflag = lastflag; /* Preserve lastflag through this. */ execute(META | SPEC | 'C', FALSE, 1); lastflag = saveflag; -#if TYPEAH && PKCODE +#if TYPEAH && PKCODE if (typahead()) { newc = getcmd(); update(FALSE); @@ -865,14 +851,7 @@ int cexit(int status) /* and the video buffers */ vtfree(); - /* and now.. we leave [pick the return if we are a subprogram] */ -#if CALLED - eexitflag = TRUE; /* flag a program exit */ - eexitval = status; - return status; -#else #undef exit exit(status); -#endif } #endif |