README revision 145479
192422SobrienThis is tcsh version 6.14.  Tcsh is a version of the Berkeley
292422SobrienC-Shell, with the addition of: a command line editor, command and file
392422Sobrienname completion, listing, etc. and a bunch of small additions to the
492422Sobrienshell itself.
592422Sobrien
692422SobrienTcsh has been ported to most unix variants, and can be tinkered to work
792422Sobrienin unix systems that it has not ported yet. See the Ported file for
892422Sobriena more complete list of ported systems and in the config directory for
992422Sobriena configuration file that matches your system.
1092422SobrienTcsh also runs under VMS/POSIX and OS/2+emx; the OS/2 port is not
1192422Sobriencomplete yet.
1292422Sobrien
1392422SobrienFeel free to use it.  These changes to csh may only be included in a
1492422Sobriencommercial product if the inclusion or exclusion does not change the
1592422Sobrienpurchase price, level of support, etc.  Please respect the individual
1692422Sobrienauthors by giving credit where credit is due (in other words, don't
1792422Sobrienclaim that you wrote portions that you haven't, and don't delete the
1892422Sobriennames of the authors from the source code or documentation).  
1992422Sobrien
2092422SobrienTo install tcsh:
2192422Sobrien
2292422Sobrien0)  Try running "configure".  If that works, goto step 6.
2392422Sobrien    If you are using imake, try xmkmf and goto step 3.
2492422Sobrien    If imake does not work, copy Makefile.std to Makefile.
2592422Sobrien
2692422Sobrien1)  Look at the Makefile and make sure that you are using the right
2792422Sobrien    compilation flags.
2892422Sobrien
29107806Sobrien2)  Copy the appropriate for your machine and OS config file from the
30170331Srafan    config subdirectory into config.h.  Consult the file "Ported" for
31244988Sdelphij    settings known to work on various machines.  If you are trying to
32224731Sru    compile tcsh on a machine for which there is no config file yet,
3392422Sobrien    you will need to create a config file using as a template one of
34244988Sdelphij    the supplied ones.  If you get tcsh working on a new machine, I'd
35244988Sdelphij    appreciate a copy of the config file plus additional information
36244988Sdelphij    about the architecture/OS.  If you are creating a new config file,
37244988Sdelphij    look very hard at BSDJOBS, BSDSIGS, and BSDTIMES if you are running
3892422Sobrien    a non-BSD machine.  For vanila SysV, these would all be #undef-ed,
3992422Sobrien    but others may vary (such as A/UX or HPUX).  On a pyramid, compile
4092422Sobrien    in the UCB universe even if you are running under the ATT universe
41107806Sobrien    usually; it will work anyway, and you get job control for free.
42221381Sru
4392422Sobrien3)  Look at config_f.h, and enable or disable any features you want.
44107806Sobrien    It is configured the way I like it, but you may disagree.
45221381Sru    If you do not have NLS, then locale.h will not be found. Undefine it
4692422Sobrien    and things should work ok. On the other hand, if you have NLS you
47221381Sru    might as well use it...
48221381Sru
4992422Sobrien4)  Look at host.defs to make sure that you have the right defines to set
5092422Sobrien    the environment variables "HOSTTYPE", "MACHTYPE", "OSTYPE" and 
5192422Sobrien    "VENDOR" correctly.  If you need to make changes, PLEASE SEND THEM 
5292422Sobrien    BACK TO ME.
5392422Sobrien
5492422Sobrien5)  You may want to adjust the TCSH_BINDIR and TCSH_MANDIR entries in
5592422Sobrien    the Makefile.  These are the directories that tcsh, and the tcsh.1
5692422Sobrien    man entry will be placed in when you do a "make install" and "make
5792422Sobrien    install.man" respectively.  If you decide to install tcsh somewhere
5892422Sobrien    other than in /usr/local/bin/tcsh, you should #define _PATH_TCSHELL
5992422Sobrien    "/your/installation/directory/tcsh" in pathnames.h.
6092422Sobrien
6192422Sobrien6)  If you've changed any of the configuration variables you may need
6292422Sobrien    to re-run configure.
6392422Sobrien
6492422Sobrien7)  make
6592422Sobrien
6692422Sobrien8)  Read the documentation while you are waiting.  The file tcsh.man
6792422Sobrien    is in standard [nt]roff -man format. If you like, you can run the
6892422Sobrien    tcsh.man2html script (requires Perl) to generate an HTML version of
6992422Sobrien    the manpage which you can read with Mosaic, lynx or other HTML browser.
7092422Sobrien
7192422Sobrien9)  Test tcsh by typing ./tcsh to see that it has compiled correctly.
7292422Sobrien    The history command should give a time stamp on every entry.
7392422Sobrien    Typing normal characters should echo each exactly once.  Control-A
7492422Sobrien    should put the cursor at the beginning of the input line, but after
7592422Sobrien    the prompt.  Typing characters after that should insert them into
7692422Sobrien    the line.  If you have job control make sure that stopping and
7792422Sobrien    restarting jobs works. Make sure you can ^C in the middle of the
7892422Sobrien    input line.  Also make sure that pipelines work correctly and there
7992422Sobrien    are no races. Try 'echo | cat | cat | cat | cat | more' a couple of
8092422Sobrien    times. If you have job control, try this command in the background
8192422Sobrien    and bring it in the foreground when it stops for tty output.  Also
8292422Sobrien    make sure that the ioctl() modes are preserved.  Get into vi, enter
8392422Sobrien    and exit input mode and suspend it, background it and foreground it
8492422Sobrien    again. After all that, lastly make sure that the tty process group
8592422Sobrien    manipulation is happening correctly. Try ftp to some host. If your
86170331Srafan    passwd appears on the screen, you have lost /dev/tty. Otherwise
87    everything is fine.
88
8910) Once satisfied that tcsh is working correctly, complete the installation
90    by typing "make install" to install the binary, and "make install.man" to
91    install the documentation. Don't forget to look at complete.tcsh for
92    useful completions...
93
9411) Enjoy.
95
9612) PLEASE file any bug reports (and fixes), code for new features at:
97
98	http://bugs.gw.com/
99
100    Comments, questions, etc. (even flames) are welcome via email to:
101
102	The tcsh bugs mailing list
103	tcsh-bugs@mx.gw.com
104
105Various:
106
107***************************************************************************
108
109On sysv versions < 3.0 (not hpux) Doug Gwyn's public domain directory 
110manipulation library has to be installed. This library is available
111for anonymous ftp from prep.ai.mit.edu:/pub/gnu/dirent.tar.Z
112If the network is not installed, then there is a gethostname()
113routine is tc.os.c
114
115***************************************************************************
116
117On BSDreno, in ttyname() closedir() is called twice and so the same
118pointer gets free'd twice. tcsh's malloc is picky and it prints an
119error message to that effect. If you don't like the message:
120
1211. Apply the following patch:
122
123*** /usr/src/lib/libc/gen/ttyname.c.orig	Fri Jun  1 17:17:15 1990
124--- /usr/src/lib/libc/gen/ttyname.c	Tue Oct 29 16:33:12 1991
125***************
126*** 51,57 ****
127  		if (stat(buf, &sb2) < 0 || sb1.st_dev != sb2.st_dev ||
128  		    sb1.st_ino != sb2.st_ino)
129  			continue;
130- 		closedir(dp);
131  		rval = buf;
132  		break;
133  	}
134--- 51,56 ----
135
136Or: Comment the error printing out in tc.alloc.c
137Or: Compile -DSYSMALLOC
138
139
140***************************************************************************
141
142From: Scott Krotz <krotz@honey.rtsg.mot.com>
143
144Tcsh has been ported to minix by  Scott Krotz (krotz@honey.rtsg.mot.com).
145Unfortunately the minix sed is broken, so you'll have to find a way to
146make tc.const.h, sh.err.h, ed.defns.h which are automatically generated.
147The easiest way to create them is to make a copy from unix, copying 
148minix to config.h, and then 'make sh.err.h tc.const.h ed.defns.h'
149
150The OS/dependent files are in mi.termios.h, mi.wait.h, mi.varargs.h
151
152You will get some warnings, but dont worry about them, just ignore
153them.  After tcsh has compiled and the gcc binary is converted to a
154minix binary, remember to chmem it to give it more memory - it will
155need it!  How much you need depends on how many aliases you have, etc..
156Add at least 50000 to it.
157
158One last thing.  You might have to make some links for include files so
159that they are in the directories that tcsh is expecting while compiling.
160I forget if I had to do this or not, but it should be fairly easy to sort
161out.  If it cant find any include files this is probably the reason.
162
163If you have any problems, please tell me.  I can be contacted through
164e-mail at:
165
166krotz@honey.rtsg.mot.com
167
168I also read comp.os.minix on a regular basis, so a note there will get
169my attention also.
170
171Have fun!
172
173ps.  The termios functions are provided by Magnus Doell and Bruce Evans.
174     Thanks, guys!
175
176
177From: Bob Byrnes <byrnes@ee.cornell.edu>
178
179This is for minix 1.5 (straight out of the box from P-H) plus the i386
180patches from Bruce Evans.
181
182I cross-compiled on a Sun using gcc 2.1 with a target of i386-bsd
183(using the minix include files instead of the bsd versions), and then
184linked the resulting object files with similarly compiled crtso.o and
185libc.a on vax (little endian) using a hacked version of ld which I put
186together to generate minix executables instead of bsd a.out format.
187What a kludge ...
188
189I compiled with -O2 -Wall ...  So far I haven't noticed any problems
190with the optimizer.
191
192In case anyone is contemplating compiling tcsh with bcc (Bruce Evan's
193i386 compiler that comes with the minix386 upgrade package), don't bother.
194It is some serious bugs that kill tcsh when compiled for 16-bit characters.
195I can provide more details of bugs that I noticed for brave souls who want
196to try, but it would be hard (and why bother if you can get gcc?).
197
198I can make the binary available to anyone who wants it (for example people
199who can't get access to a cross-compiling environment, and who don't yet
200have gcc running under minix).
201
202
203***************************************************************************
204
205If your compiler cannot handle long symbol names, add 
206
207#include "snames.h" 
208
209to your config.h file
210
211	     -- Christos Zoulas
212		christos@zoulas.com
213
214