Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!unmvax!pprg.unm.edu!hc!ames!amdcad!sun!pitstop!sundc!seismo!uunet!mcvax!unido!fauern!faui44!immd3.informatik.uni-erlangen.de!rtregn From: rtregn@immd3.informatik.uni-erlangen.de (Robert Regn) Newsgroups: comp.os.minix Subject: Re: stevie with -DTERMCAP Message-ID: <825@faui10.informatik.uni-erlangen.de> Date: 2 Feb 89 11:56:34 GMT References: <384@prles2.UUCP> Organization: IMMD I, University of Erlangen, W-Erlangen Lines: 91 From article <384@prles2.UUCP>, by laverman@prismab.prl.philips.nl (Bert Laverman): > (minix/ST problem, PC as well???) I speak ONLY for the PC - but this should make no difference > I am having a problem with stevie when compiled with -DTERMCAP. > The distributed version is hardwired for the minix terminal, but > code is present for using the termcap facility. When compiling > with -DTERMCAP, (have to add term.c to makefile) I do not seem > to be able to get stevie running. > In minix mode, the program checks for the presence of the TERM > variable, and complains if it isn't minix. This is a hardwired > complaint, and does not depend on any entries in /etc/termcap. YES > In termcap mode, with TERM=vt100; export TERM, I always get a > ``invalid terminal type'' type of message. Looking at the code > this can only happen if tgetent() and the lot don't work. With DTERMCAP there is no "Invalid terminal type '%s'\n" message but a "unknown terminal type\n" message. It stands for a lot of problems with the termcap file e.g. if mandatory entries are missing. (see term.c) I have tested vi_with_termcap on a PC and this termcap file (I'm working on a sun with the tty1): su|sun|sunworkstation:\ bs:\ cd=\E[0J:\ cl=\E[H\E[0J:\ cm=\E[%i%d;%dH:\ co#80:\ ho=\E[H:\ li#40:\ se=\E[0m:\ so=\E[7m:\ sr=\EM:\ ce=\E[K:\ al=\E[L:dl=\E[M:\ sc=\E7:rc=\E8:\ up=\E[A:nd=\E[C mx|minix|ansi:\ bs:\ cd=\E[0J:\ cl=\E[H\E[0J:\ cm=\E[%i%d;%dH:\ co#80:\ ho=\E[H:\ li#25:\ se=\E[0m:\ so=\E[7m:\ sr=\EM:\ ce=\E[K:\ al=\E[L:dl=\E[M:\ sc=\E7:rc=\E8:\ up=\E[A:nd=\E[C Look at the syntax of the first line - the sun (or vt100) must be in the second position. Here is what the sun manual entry termcap(5) says: TERMCAP(5) FILE FORMATS TERMCAP(5) Each termcap entry consist of a number of colon-separated (:) fields. The first field for each terminal lists the various names by which it is known, separated by bar ( | ) characters. The first name is always two characters long, and is used by older (version 6) systems (which store the terminal type in a 16-bit word in a system-wide database). > The second name given is the most common abbreviation for the terminal (this is the one to which the environment vari- able TERM would normally be set). The last name should fully identify the terminal's make and model. All other names are taken as synonyms for the initial terminal name. All names but the first and last should be in lower case and contain no blanks; the last name may well contain upper case and blanks for added readability. > So: > Compile stevie with -DTERMCAP (add term.c in makefile) > TERM=someterminalname; export TERM > run stevie > will get (me) an error message from stevie. I got no errors with TERM=sun and above termcap. If this don't help, insert messages before each return 0 in t_init() (term.c). I used 1.3c termcap(3) with corrections efth 1988-Apr-29 Robert Regn rtregn@faui32.uucp rtregn@immd3.informatik.uni-erlangen.de