/* Copyright (c) 1980 Regents of the University of California */
-static char *sccsid = "@(#)ex.c 5.3 %G%";
+static char *sccsid = "@(#)ex.c 6.1 %G%";
#include "ex.h"
#include "ex_argv.h"
#include "ex_temp.h"
ruptible = signal(SIGINT, SIG_IGN) == SIG_DFL;
if (signal(SIGTERM, SIG_IGN) == SIG_DFL)
signal(SIGTERM, onhup);
-#ifdef SIGTSTP
- if (signal(SIGTSTP, SIG_IGN) == SIG_DFL)
- signal(SIGTSTP, onsusp), dosusp++;
-#endif
/*
* Initialize end of core pointers.
}
ac--, av++;
}
+
+#ifdef SIGTSTP
+ if (!hush && signal(SIGTSTP, SIG_IGN) == SIG_DFL)
+ signal(SIGTSTP, onsusp), dosusp++;
+#endif
+
if (ac && av[0][0] == '+') {
firstpat = &av[0][1];
ac--, av++;
* Initialize a temporary file (buffer) and
* set up terminal environment. Read user startup commands.
*/
- init();
if (setexit() == 0) {
setrupt();
intty = isatty(0);
if ((cp = getenv("HOME")) != 0 && *cp)
source(strcat(strcpy(genbuf, cp), "/.exrc"), 1);
}
+ init(); /* moved after prev 2 chunks to fix directory option */
/*
* Initial processing. Handle tag, recover, and file argument
* If you quit out of a 'vi' command by doing Q or ^\,
* you also fall through to here.
*/
+ seenprompt = 1;
ungetchar(0);
globp = 0;
initev = 0;