TCSH porting to OpenVMS

For the port of OpenOffice a working TCSH is needed. We found this version (6.12.00 dated 07/23/2002) of TCSH on ftp://ftp.astron.com/pub/tcsh/.

The home page for TCSH can be found at http://www.tcsh.org/Home. There seems to be no recent port (including ODS5 support) of TCSH.

We hope to get a working TCSH soon so we can get on with our port of OpenOffice for OpenVMS.

You can download the software from the original location or from this site.

If you have questions or something to share please send it to tcshdev@oooovms.dyndns.org. We will publish your contributions or questions on these webpages.

READMETCSH.TXT

   
    This is tcsh version 6.12.  Tcsh is a version of the Berkeley
C-Shell, with the addition of: a command line editor, command and file
name completion, listing, etc. and a bunch of small additions to the
shell itself.

Tcsh has been ported to most unix variants, and can be tinkered to work
in unix systems that it has not ported yet. See the Ported file for
a more complete list of ported systems and in the config directory for
a configuration file that matches your system.
Tcsh also runs under VMS/POSIX and OS/2+emx; the OS/2 port is not
complete yet.

Feel free to use it.  These changes to csh may only be included in a
commercial product if the inclusion or exclusion does not change the
purchase price, level of support, etc.  Please respect the individual
authors by giving credit where credit is due (in other words, don't
claim that you wrote portions that you haven't, and don't delete the
names of the authors from the source code or documentation).  

To install tcsh:

0)  Try running "configure".  If that works, goto step 6.
    If you are using imake, try xmkmf and goto step 3.
    If imake does not work, copy Makefile.std to Makefile.

1)  Look at the Makefile and make sure that you are using the right
    compilation flags.

2)  Copy the appropriate for your machine and OS config file from the
    config subdirectory into config.h.  Consult the file "Ported" for
    settings known to work on various machines.  If you are trying to
    compile tcsh on a machine for which there is no config file yet,
    you will need to create a config file using as a template one of
    the supplied ones.  If you get tcsh working on a new machine, I'd
    appreciate a copy of the config file plus additional information
    about the architecture/OS.  If you are creating a new config file,
    look very hard at BSDJOBS, BSDSIGS, and BSDTIMES if you are running
    a non-BSD machine.  For vanila SysV, these would all be #undef-ed,
    but others may vary (such as A/UX or HPUX).  On a pyramid, compile
    in the UCB universe even if you are running under the ATT universe
    usually; it will work anyway, and you get job control for free.

3)  Look at config_f.h, and enable or disable any features you want.
    It is configured the way I like it, but you may disagree.
    If you do not have NLS, then locale.h will not be found. Undefine it
    and things should work ok. On the other hand, if you have NLS you
    might as well use it...

4)  Look at host.defs to make sure that you have the right defines to set
    the environment variables "HOSTTYPE", "MACHTYPE", "OSTYPE" and 
    "VENDOR" correctly.  If you need to make changes, PLEASE SEND THEM 
    BACK TO ME.

5)  You may want to adjust the TCSH_BINDIR and TCSH_MANDIR entries in
    the Makefile.  These are the directories that tcsh, and the tcsh.1
    man entry will be placed in when you do a "make install" and "make
    install.man" respectively.  If you decide to install tcsh somewhere
    other than in /usr/local/bin/tcsh, you should #define _PATH_TCSHELL
    "/your/installation/directory/tcsh" in pathnames.h.

6)  If you've changed any of the configuration variables you may need
    to re-run configure.

7)  make

8)  Read the documentation while you are waiting.  The file tcsh.man
    is in standard [nt]roff -man format. If you like, you can run the
    tcsh.man2html script (requires Perl) to generate an HTML version of
    the manpage which you can read with Mosaic, lynx or other HTML browser.

9)  Test tcsh by typing ./tcsh to see that it has compiled correctly.
    The history command should give a time stamp on every entry.
    Typing normal characters should echo each exactly once.  Control-A
    should put the cursor at the beginning of the input line, but after
    the prompt.  Typing characters after that should insert them into
    the line.  If you have job control make sure that stopping and
    restarting jobs works. Make sure you can ^C in the middle of the
    input line.  Also make sure that pipelines work correctly and there
    are no races. Try 'echo | cat | cat | cat | cat | more' a couple of
    times. If you have job control, try this command in the background
    and bring it in the foreground when it stops for tty output.  Also
    make sure that the ioctl() modes are preserved.  Get into vi, enter
    and exit input mode and suspend it, background it and foreground it
    again. After all that, lastly make sure that the tty process group
    manipulation is happening correctly. Try ftp to some host. If your
    passwd appears on the screen, you have lost /dev/tty. Otherwise
    everything is fine.

10)  Once satisfied that tcsh is working correctly, complete the installation
    by typing "make install" to install the binary, and "make install.man" to
    install the documentation. Don't forget to look at complete.tcsh for
    useful completions...

11) Enjoy.

12) PLEASE send any bug reports (and fixes), code for new features,
    comments, questions, etc. (even flames) to:

	The tcsh mailing list
	tcsh@mx.gw.com

Various:

***************************************************************************

On sysv versions < 3.0 (not hpux) Doug Gwyn's public domain directory 
manipulation library has to be installed. This library is available
for anonymous ftp from prep.ai.mit.edu:/pub/gnu/dirent.tar.Z
If the network is not installed, then there is a gethostname()
routine is tc.os.c, enabled by defining NEEDgethostname

***************************************************************************

On BSDreno, in ttyname() closedir() is called twice and so the same
pointer gets free'd twice. tcsh's malloc is picky and it prints an
error message to that effect. If you don't like the message:

1. Apply the following patch:

*** /usr/src/lib/libc/gen/ttyname.c.orig	Fri Jun  1 17:17:15 1990
--- /usr/src/lib/libc/gen/ttyname.c	Tue Oct 29 16:33:12 1991
***************
*** 51,57 ****
  		if (stat(buf, &sb2) < 0 || sb1.st_dev != sb2.st_dev ||
  		    sb1.st_ino != sb2.st_ino)
  			continue;
- 		closedir(dp);
  		rval = buf;
  		break;
  	}
--- 51,56 ----

Or: Comment the error printing out in tc.alloc.c
Or: Compile -DSYSMALLOC


***************************************************************************

From: Scott Krotz 

Tcsh has been ported to minix by  Scott Krotz (krotz@honey.rtsg.mot.com).
Unfortunately the minix sed is broken, so you'll have to find a way to
make tc.const.h, sh.err.h, ed.defns.h which are automatically generated.
The easiest way to create them is to make a copy from unix, copying 
minix to config.h, and then 'make sh.err.h tc.const.h ed.defns.h'

The OS/dependent files are in mi.termios.h, mi.wait.h, mi.varargs.h

You will get some warnings, but dont worry about them, just ignore
them.  After tcsh has compiled and the gcc binary is converted to a
minix binary, remember to chmem it to give it more memory - it will
need it!  How much you need depends on how many aliases you have, etc..
Add at least 50000 to it.

One last thing.  You might have to make some links for include files so
that they are in the directories that tcsh is expecting while compiling.
I forget if I had to do this or not, but it should be fairly easy to sort
out.  If it cant find any include files this is probably the reason.

If you have any problems, please tell me.  I can be contacted through
e-mail at:

krotz@honey.rtsg.mot.com

I also read comp.os.minix on a regular basis, so a note there will get
my attention also.

Have fun!

ps.  The termios functions are provided by Magnus Doell and Bruce Evans.
     Thanks, guys!


From: Bob Byrnes 

This is for minix 1.5 (straight out of the box from P-H) plus the i386
patches from Bruce Evans.

I cross-compiled on a Sun using gcc 2.1 with a target of i386-bsd
(using the minix include files instead of the bsd versions), and then
linked the resulting object files with similarly compiled crtso.o and
libc.a on vax (little endian) using a hacked version of ld which I put
together to generate minix executables instead of bsd a.out format.
What a kludge ...

I compiled with -O2 -Wall ...  So far I haven't noticed any problems
with the optimizer.

In case anyone is contemplating compiling tcsh with bcc (Bruce Evan's
i386 compiler that comes with the minix386 upgrade package), don't bother.
It is some serious bugs that kill tcsh when compiled for 16-bit characters.
I can provide more details of bugs that I noticed for brave souls who want
to try, but it would be hard (and why bother if you can get gcc?).

I can make the binary available to anyone who wants it (for example people
who can't get access to a cross-compiling environment, and who don't yet
have gcc running under minix).


***************************************************************************

If your compiler cannot handle long symbol names, add 

#include "snames.h" 

to your config.h file

	     -- Christos Zoulas
		christos@zoulas.com


    

Announce-6_12_00.txt

   
    Hello,

I am pleased to announce that tcsh-6.12 is now available; this version
fixes a lot of bugs and adds the following enhancements:

New Features:
	* %j in prompt
	* utf8 support

New Ports:
	* darwin support

Locale Support:
	* russian locale fixes
	* polish locale fixes

Bug Fixes:
	* too many to enumerate here, consult the fixes file

Tcsh is an enhanced version of the Berkeley C-shell that offers command
line editing and completion plus many other little things that preserve
the length of your fingers.

Tcsh runs on most unix machines, VMS_POSIX, OS/2 EMX, WIN32, Amiga

You can get tcsh from ftp.astron.com:/pub/tcsh/tcsh-6.12.tar.gz
This is a gzip (GNU zip) tar archive. If you don't have GNU zip you
can get it from ftp.gnu.org or other GNU mirrors, or ask ftpd to
unpack it on the fly using 'get tcsh-6.12.tar'.

I would like to thank:

    o everyone who sent bug reports
    o the beta team for all their help, bug fixes, and suggestions

christos

    

FAQ.txt

   
    
                                  [Home] FAQ

   Home | RecentChanges | Preferences
     _________________________________________________________________

   This is for people who do not read the manual!

   So  far  people who don't read manuals don't read this either... I may
   call  it README.*PLEASE* in the future, but then the same people won't
   be able to get ftp it... :-)
     _________________________________________________________________

   1. Why is the meta key broken in tcsh-5.20 and up?

   On  some  machines  the  tty is not set up to pass 8 bit characters by
   default.  Tcsh 5.19 used to try to determine if pass8 should be set by
   looking at the terminal's meta key. Unfortunately there is no good way
   of  determining  if  the terminal can really pass 8 characters or not.
   Consider  if  you  are  logged in through a modem line with 7 bits and
   parity  and  your  terminal  has  a meta key. Then tcsh 5.19 would set
   wrongly set pass8.

   If  you  did like the previous behavior you can add in /etc/csh.login,
   or in .login:

    if ( $?tcsh && $?prompt ) then
        if ( "`echotc meta`" == "yes" ) then
             stty pass8
        endif
    endif

   If you don't have pass8, maybe one of these would work..

    stty -parity -evenp -oddp cs8 -istrip   (rs6000)
    stty -parenb -istrip cs8

   Finally,  tcsh  will  bind  all  printable meta characters to the self
   insert  command.  If  you  don't  want  that  to  happen (i.e. use the
   printable meta characters for commands) setenv NOREBIND.
     _________________________________________________________________

   2.  I  ran 'dbxtool &' and 'shelltool &' from tcsh, and they end up in
   cbreak and no echo mode?

   These  programs  are broken. Background jobs should not try to look at
   the  tty.  What happens is that dbxtool looks in stderr to inherit the
   tty  setups,  but  tcsh  sets up the tty in cbreak and -echo modes, so
   that  it can do line editing. This cannot be fixed because tcsh cannot
   give away the tty. Pick one of the following as a workaround:

    dbxtool < /dev/null >& /dev/null &
    /usr/etc/setsid dbxtool &

   If that does not work, for dbxtool at least you can add "sh stty sane"
   in your .dbxinit
     _________________________________________________________________

   3. I tried to compile tcsh and it cannot find ?

   Your  system  does  not support NLS. Undefine NLS in config_f.h and it
   should work fine.
     _________________________________________________________________

   4. Where can I get csh sources?

   Csh   sources   are   now   available   with   the  4.4BSD  networking
   distributions. You don't need csh sources to compile tcsh-6.0x.
     _________________________________________________________________

   5. I just made tcsh my login shell, and I cannot ftp any more?

   Newer  versions of the ftp daemon check for the validity of the user's
   shell  before  they  allow  logins.  The list of valid login shells is
   either  hardcoded or it is usually in a file called /etc/shells. If it
   is  hard-coded, then you are out of luck and your best bet is to get a
   newer  version of ftpd. Otherwise add tcsh to the list of shells. [For
   AIX  this  file  is called /etc/security/login.cfg.] Remember that the
   full  path  is  required.  If  there  is  no  /etc/shells, and you are
   creating  one,  remember to add /bin/csh, /bin/sh, and any other valid
   shells for your system, so that other people can ftp too :-)
     _________________________________________________________________

   6.  I  am using SunView? or OpenWindows? and editing is screwed up. In
   particular  my  arrow  keys  and backspace don't work right. What am I
   doing wrong?

   Well,  cmdtool tries to do its own command line editing and the effect
   you  get  is  one  of  using  an  editor inside an editor. Both try to
   interpret  the arrow key sequences and cmdtool wins since it gets them
   first. The solutions are in my order of preference:

    1. Don't use suntools
    2. Use shelltool instead of cmdtool.
    3. Unset edit in tcsh.

   6b. On a SPARCstation running Solaris 2.x and OpenWindows? 3.1, inside
   a  cmdtool,  the  short-cut  key sequence to clear log (i.e. Meta-e or
   Diamond-e) doesn't work: it just echos 'e' 

   6c.  On  a  SPARCstation  running  Solaris  2.x  and OpenWindows? 3.1,
   maketool  (within SPARCworks) doesn't work: it just does a `cd' to the
   working directory then stops.

   The  workaround  for  6b and 6c is doing "unset edit." Using shelltool
   instead of cmdtool doesn't fix 6c.
     _________________________________________________________________

   7.  I rlogin to another machine, and then no matter what I tell 'stty'
   I cannot get it to pass 8 bit characters?

   Maybe  you  need  to  use  'rlogin  -8'  to  tell rlogin to pass 8 bit
   characters.
     _________________________________________________________________

   8. Where do I get the public domain directory library?

   Anonymous ftp to prep.ai.mit.edu:/pub/gnu/dirent.tar.Z
     _________________________________________________________________

   9.  I  compiled  tcsh  using  gcc,  and when I start up it says: tcsh:
   Warning  no  access  to tty (Invalid Argument). Thus no job control in
   this shell

   Your    file  is  not  ansi  compliant. You have one of 3
   choices:

    1. Run fixincludes from the gcc distribution.
    2. Add -traditional to the gcc flags.
    3. Compile with cc.
     _________________________________________________________________

   10.  I compiled tcsh with the SunOS? unbundled compiler and now things
   get echo'ed twice.

   It is a bug in the unbundled optimizer. Lower the optimization level.
     _________________________________________________________________

   11. How can I use the arrow keys with hpterm?

   Hp terminals use the arrow keys internally. You can tell hpterm not to
   do that, by sending it the termcap sequence smkx. Since this has to be
   done  all  the  time,  the  easiest thing is to put it as an alias for
   precmd, or inside the prompt:

    if ($term == "hp") then
        set prompt="%{`echotc smkx`%}$prompt"
    endif

   Note that by doing that you cannot use pgup and pgdn to scroll... Also
   if you are using termcap, replace "smkx" with "ks"...
     _________________________________________________________________

   12.  On POSIX machines ^C and ^Z will do not work when tcsh is a login
   shell?

   Make sure that the interrupt character is set to ^C and suspend is set
   to  ^Z;  'stty -a' will show you the current stty settings; 'stty intr
   ^C susp ^Z' will set them to ^C and ^Z respectively.
     _________________________________________________________________

   13.  I  am trying to compile tcsh and I am getting compile errors that
   look like:

    >sh.c:???: `STR???' undeclared, outside of functions [gcc]
    >"sh.c", line ???: STR??? undefined [cc]

   You  interrupted make, while it was making the automatically generated
   headers. Type 'make clean; make'
     _________________________________________________________________

   14. On the cray, sometimes the CR/LF mapping gets screwed up.

   You  are  probably  logged  in  to the cray via telnet. Cray's telnetd
   implements  line  mode  selection the telnet client you are using does
   not  implement  telnet line mode. This cause the Cray's telnetd to try
   to use KLUDGELINEMODE. You can turn off telnet line mode from the cray
   side  by doing a "stty -extproc", or you can get the Cray AIC to build
   a  telnetd  without  KLUDGELINEMODE,  or  you can compile a new telnet
   client  (from  the  BSD net2 tape), or at least on the suns use: 'mode
   character'.
     _________________________________________________________________

   15.  On AU/X, I made tcsh my startup shell, but the mac desktop is not
   starting up (no X11 or Finder), and I only get console emulation.

   This is another manifestation of item 5. Just add the pathname to tcsh
   in /etc/shells and everything should work fine.
     _________________________________________________________________

   16.  On  machines  that  use  YP (NIS) tilde expansion might end up in
   /dev/null

   If  this happens complain to your vendor, to get a new version of NIS.
   You can fix that in tcsh by defining YPBUGS in config.h
     _________________________________________________________________

   17.  Script on SGI 4.0.5 does not give us a tty, so we cannot have job
   control.

   Their csh does not have job control either. Try:

        % script
        % cat > /dev/tty
     _________________________________________________________________

   18. I start tcsh and it takes a couple of minutes to get the prompt.

   You  have  defined  REMOTEHOST  and your DNS is not responding. Either
   undefine REMOTEHOST and recompile or fix your DNS.
     _________________________________________________________________

   19. If you need help generating your .cshrc file, check out:

        http://www.imada.ou.dk/~blackie/dotfile/
     _________________________________________________________________

   20.  On  POSIX  systems  the  kernel  will send hup signals to all the
   processes in the foreground process group if 'stty hupcl' is set.

   For example

    ./tcsh
    echo $$
    591
    ./tcsh
    kill -6 591

   Will kill everything, since hup will be sent to all tcsh processes. To
   avoid that you can set stty -hupcl, but it is not recommended.
     _________________________________________________________________

   21. When I rsh the meta key stops working on the remote machine.

   Try  using rsh -8; this option is undocumented on some systems, but it
   works.  If  that does not work, get and use ssh/sshd. You'll be better
   off from a security point of view anyway.
     _________________________________________________________________

   22.  Tcsh  compiled  under  hp/ux-10.x  does  not pass resource limits
   correctly when ran on hp/ux-11.x systems.

   This  is  a  problem  with  lack  of ABI compatibility between the two
   systems. The only solution is to recompile.
     _________________________________________________________________

   23. Refreshing in command line editing can appear broken on some OS's

   This  is  because  the  termcap/terminfo  description  lies  about the
   ability  of  the  terminal  to  use tabs. At least on Compaq/DEC Alpha
   OSF/1 3.x and 4.x systems, stty -tabs will cause problems.
     _________________________________________________________________

   Everything else is a bug :-(

   Christos
     _________________________________________________________________

   Home | RecentChanges | Preferences
   Edit text of this page | View other revisions
   Last edited April 27, 2001 13:43 (diff)
   Search: ____________________

    

The following gzip file contains the full build environment.

Because of the low bandwidth of this server please have patience if you decide to download.

tcsh-6_12_00.tar-gz (810 KB)

Maintained by the OpenOffice on OpenVMS porting Project.