🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.bugs
Article #33

csh fix.

#33
From: utzoowatmathdecvaxharpoeaglemhts...
Date: Tue, 29 Jun 1982 12:45
29 lines
963 bytes
Enclosed is a fix to csh, for escaped quotes in quoted strings.

Change in sh.lex.c, routine word(), approx. line 180:

			if (c == '\\') {
				c = getC(0);
				if (c == HIST)
					c |= QUOTE;
				else {
					if (c == '\n' && c1 != '`')
						c |= QUOTE;
	New:				else if (c == '"')
	New:					c |= QUOTE;
	New:				else if (c == '\'')
	New:					c |= QUOTE;
	New:				else
					            ungetC(c), c = '\\';
				}
			}
-----------------------------------------------------------------
This makes csh behavior the same as "sh" for items like:
	  echo  "#define name \"string\" "


      

		Greg Guthrie
		Bell Labs
		Naperville, Ill (312)979-7303
Technical Details
Message-ID: <bnews.ihuxp.170>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
From: utzoo!watmath!decvax!harpo!eagle!mhtsa!ihnss!ihuxp!grg
Newsgroups: net.bugs
Title: csh fix.
Article-I.D.: ihuxp.170
Posted: Tue Jun 29 12:45:22 1982
Received: Thu Jul  1 00:11:31 1982
Subject: csh fix.
Date: Tue, 29 Jun 1982 12:45:22 +0000
Message-ID: <bnews.ihuxp.170>