pkgsrc/editors/mg2a/patches/patch-ab
tron 4d21cec081 Update "mg2a" package to version to version 1.11:
Don't attempt to edit non regular files.

Patches supplied by John Refling in PR pkg/10536.
2000-07-10 18:26:52 +00:00

39 lines
1.1 KiB
Text

$NetBSD: patch-ab,v 1.2 2000/07/10 18:26:54 tron Exp $
--- sys/bsd/ttyio.c.orig Sun Jul 3 10:51:02 1988
+++ sys/bsd/ttyio.c Wed May 31 16:36:30 2000
@@ -35,13 +35,17 @@
ttopen() {
register char *tv_stype;
char *getenv(), *tgetstr(), tcbuf[1024], err_str[72];
- char *sprintf();
+/* int sprintf(); refling was here */
/* do this the REAL way */
if ((tv_stype = getenv("TERM")) == NULL)
{
- puts("Environment variable TERM not defined!");
- exit(1);
+// refling --- took out the exit, added default
+ puts("Environment variable TERM not defined, trying vt102");
+// exit(1);
+ sleep(1);
+ putenv("TERM=vt102");
+ tv_stype = getenv("TERM");
}
if((tgetent(tcbuf, tv_stype)) != 1)
@@ -229,9 +233,11 @@
panic(s) char *s; {
(void) fputs("panic: ", stderr);
(void) fputs(s, stderr);
- (void) fputc('\n', stderr);
+// (void) fputc('\n', stderr); refling
+ (void) fputc(13, stderr); // refling
(void) fflush(stderr);
- abort(); /* To leave a core image. */
+// abort(); /* To leave a core image. */ refling
+ exit(1); // refling
}
#ifndef NO_DPROMPT
#include <sys/time.h>