Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!ut-sally!husc6!linus!encore!paradis From: paradis@encore.UUCP (Jim Paradis) Newsgroups: comp.os.minix Subject: Patches to minix shell (1 of 7) Message-ID: <1681@encore.UUCP> Date: Tue, 23-Jun-87 15:18:08 EDT Article-I.D.: encore.1681 Posted: Tue Jun 23 15:18:08 1987 Date-Received: Fri, 26-Jun-87 04:48:47 EDT Organization: Encore Computer Corp., Marlboro, MA Lines: 40 Keywords: minix shell shar fix Here and in the next six messages are my fixes for the MINIX shell. These patches fix the following bugs: - Allows you to build the shell under MINIX (yay!) - Re-implements "<<" input redirection in a non-memory-hogging way - $0 now returns the name of the shell script rather than "/bin/sh" - $# now returns the correct number of arguments - Backslashes inside of double quotes are no longer swallowed. This first article contains a new file, "shg.c". The reason for this is that, in order to get the shell to build under MINIX it is necessary to do all the external variable declarations properly (i.e. declare them for real only once and extern for all other uses). To do this I changed all the "extern"s in sh.h to "Extern". For all other files, "Extern" is declared to be "extern". To accomplish the "real" declaration of the variables, though, shg.c defines "Extern" to be the null string, then includes "sh.h". You should add "shg.c" to your commands makefile. The next six articles are diff-patches to sh.h, sh1.c, sh2.c, sh3.c, sh4.c, and sh5.c respectively. +----------------+ Jim Paradis linus--+ +--+-------------+ | Encore Computer Corp. necntc--| | | E N C O R E | | 257 Cedar Hill St. ihnp4--+-encore!paradis | +-------------+--+ Marlboro MA 01752 decvax--| +----------------+ (617) 460-0500 talcott--+ ------------------------------cut here ------------------------------ /* This is file shg.c */ #define Extern #include #include #include #include "sh.h"