diff --git a/edef.h b/edef.h index 796e66e..1f2390c 100644 --- a/edef.h +++ b/edef.h @@ -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 */ diff --git a/estruct.h b/estruct.h index 4f2a2c8..998f169 100644 --- a/estruct.h +++ b/estruct.h @@ -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 */ diff --git a/globals.c b/globals.c index a0ee12e..d910a6d 100644 --- a/globals.c +++ b/globals.c @@ -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 */ diff --git a/main.c b/main.c index 2e53c2c..0aa4dfc 100644 --- a/main.c +++ b/main.c @@ -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