🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: sublink.sources.forum
Article #1

tcsh incompatibility (+fix) with Xenix vi

#1
From: Walter Pelissero
Date: Sat, 28 Dec 1991 16:52
57 lines
2374 bytes
I found a bug in Xenix (2.3.3) vi that show up with tcsh.
If your system has this bug you can be shure of that typing something
like this:
	vi foo
	:!echo %
( Pay attention, there is no problem if you type:
	:!echo foo				)
Now the broken vi should print the graphic interpretation for your
terminal of: \346\357\357. This is 'foo' with the 8th bit of every
byte set.
As you could think, if you want to do something like:
	:!lp %
lp complains that it cannot find that file.

I don't know if it is a Xenix specific problem, but here is the fix:

--- OLD/sh.c	Fri Dec 27 21:01:05 1991
+++ sh.c	Sun Dec 28 12:20:02 1980
@@ -486,6 +486,18 @@
 		if (argc == 1)
 		    xexit(0);
 		argc--, tempv++;
+#ifdef M_XENIX
+		/* Xenix Vi bug:
+		   it relies on a 7 bit environment (/bin/sh), so it
+		   pass ascii arguments with the 8th bit set */
+		if (!strcmp(argv[0], "sh"))
+		  {
+		    char *p;
+
+		    for (p = tempv[0]; *p; ++p)
+		      *p &= ASCII;
+		  }
+#endif
 		arginp = SAVE(tempv[0]);
 		/*
 		 * * Give an error on -c arguments that end in * backslash to

Xenix owners wishing to use the M-h key with the system help files
should apreciate this fix also (remember to set HPATH to /usr/lib/help):

--- OLD/tw.help.c	Fri Dec 27 20:35:27 1991
+++ tw.help.c	Fri Dec 27 20:35:48 1991
@@ -51,7 +51,7 @@
 static	void		 nextslist 	__P((Char *, Char *));
 
 static char *h_ext[] = {
-    ".help", ".1", ".8", ".6", NULL
+    ".help", ".1", ".8", ".6", "", NULL
 };
 
 void

I hope Christos Zoulas was reading.
-- 
?@@@x@@@? PPPp@@?B?B@00P@   @
Technical Details
Message-ID: <812@lpds.sublink.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-comp.sources.d.mbox.zip!gmdzi!ira.uka.de!yale.edu!qt.cs.utexas.edu!cs.utexas.edu!swrinde!gatech!rutgers!modus!lpds!wally

Show Full Headers
Complete Article Headers
Message-ID: <812@lpds.sublink.org>
Subject: tcsh incompatibility (+fix) with Xenix vi
Date: Sat, 28 Dec 1991 16:52:39 +0000
From: wally@lpds.sublink.org (Walter Pelissero)
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-comp.sources.d.mbox.zip!gmdzi!ira.uka.de!yale.edu!qt.cs.utexas.edu!cs.utexas.edu!swrinde!gatech!rutgers!modus!lpds!wally
Newsgroups: comp.sources.d,sublink.sources.forum
Keywords: xenix tcsh vi
Followup-To: comp.sources.d
Organization: keeps changing ....
Lines: 56
Phone: + 39 2 8464117 - 8435411 (work) 8267089 (home)
Postal-Address: Via G. de Ruggiero 87, 20142 Milano - Italia