sef@kithrup.com (Sean Eric Fagan) (01/07/91)
Included below are the diffs to get the latest posting of trn working under
sco unix (including job control). Note that I have not included diffs to
mt.check.SH, which, again, was not distributed correctly (all you have to do
is add a !GROK!THIS! to the end, in case you haven't figured it out
already).
I will try building it with gcc later, and will post any diffs necessary for
that, if there are any (I don't really expect any).
Share and enjoy!
--- snip snip ---
*** INTERN.h.00 Sat Jan 5 01:43:21 1991
--- INTERN.h Sun Jan 6 22:17:48 1991
***************
*** 13,15 ****
--- 13,16 ----
#define INIT(x) = x
#define DOINIT
+
*** term.c.00 Sat Jan 5 01:42:06 1991
--- term.c Sun Jan 6 22:13:49 1991
***************
*** 776,781 ****
--- 776,782 ----
int_count = 0;
errno = 0;
if (read_tty(whatbuf,1) < 0)
+ if (errno != EINTR) {
if (!errno)
errno = EINTR;
else {
***************
*** 782,787 ****
--- 783,789 ----
perror(readerr);
sig_catcher(0);
}
+ }
#ifdef PUSHBACK
if (*whatbuf & 0200 || no_macros) {
*whatbuf &= 0177;
*** util.c.00 Sat Jan 5 01:41:17 1991
--- util.c Sun Jan 6 22:33:17 1991
***************
*** 56,62 ****
--- 56,64 ----
char *s, *shl;
{
int status, pid, w;
+ #ifndef __STDC__
SIGRET (*signal())();
+ #endif /* ! __STDC__ */
char *shell;
#ifdef SIGTSTP
--- snip snip ---
--
Sean Eric Fagan | "I made the universe, but please don't blame me for it;
sef@kithrup.COM | I had a bellyache at the time."
-----------------+ -- The Turtle (Stephen King, _It_)
Any opinions expressed are my own, and generally unpopular with others.
chip@tct.uucp (Chip Salzenberg) (01/08/91)
An alternative patch for trn under SCO UNIX job control follows. It has the nice feature of making trn redraw the screen when restarted. Index: term.c *************** *** 776,785 **** int_count = 0; errno = 0; ! if (read_tty(whatbuf,1) < 0) ! if (!errno) ! errno = EINTR; else { ! perror(readerr); ! sig_catcher(0); } #ifdef PUSHBACK --- 776,787 ---- int_count = 0; errno = 0; ! if (read_tty(whatbuf,1) < 0) { ! if (errno == 0 || errno == EINTR) { ! *whatbuf = '\f'; /* redraw after stop */ ! } else { ! perror(readerr); ! sig_catcher(0); ! } } #ifdef PUSHBACK -- Chip Salzenberg at Teltronics/TCT <chip@tct.uucp>, <uunet!pdn!tct!chip> "If Usenet exists, then what is its mailing address?" -- me "c/o The Daily Planet, Metropolis." -- Jeff Daiell
sef@kithrup.COM (Sean Eric Fagan) (01/10/91)
In article <2789D6C3.3A8@tct.uucp> chip@tct.uucp (Chip Salzenberg) writes: >! *whatbuf = '\f'; /* redraw after stop */ Just remember that *any* signal will cause EINTR to be set, not just job control signals. Say... SIGALRM, for example. -- Sean Eric Fagan | "I made the universe, but please don't blame me for it; sef@kithrup.COM | I had a bellyache at the time." -----------------+ -- The Turtle (Stephen King, _It_) Any opinions expressed are my own, and generally unpopular with others.