[comp.sources.d] Termcap code in Phil's BASIC

john@moncol.UUCP (John Ruschmeyer) (12/15/86)

Has anyone else had luck bringing up the recently-posted BASIC interpreter
(Phil's BASIC) on a machine other than the four mentioned in the posting?
 
Aa co-worker and I have tried to bring it up on a Perkin-Elmer 3220 running
Edition VII, a Perkin-Elmer 3250 running XELOS (SVr2), and an IBM-PC AT
running SCO XENIX/286. In all three cases, we have had problems related to
the termcap code.

In all three cases, it was necessary to make the interpreter default to no
editor for it to work with most termcap entries.

In the best case, the editor would function correctly with very simple
termcaps (adm3, pe550, etc.).

Under no circumstances, would the editor work with a termcap that referred
to another entry by way of a 'tc=' entry. Depending on the system, either a
'BAD TERMCAP ENTRY' message is returned or the program goes into
never-never land.


Has anyone else noticed problems with the termcap code? If so, what did you
have to do to fix it?

Thanks in advance...

-- 
Name:		John Ruschmeyer
US Mail:	Monmouth College, W. Long Branch, NJ 07764
Phone:		(201) 571-3557
UUCP:		...!vax135!petsd!moncol!john	...!princeton!moncol!john
						   ...!pesnta!moncol!john

	If you give bigger kisses, you get bigger hugs.

randy@chinet.UUCP (Randy Suess) (12/17/86)

In article <447@moncol.UUCP> john@moncol.UUCP (John Ruschmeyer) writes:
>Has anyone else had luck bringing up the recently-posted BASIC interpreter
>(Phil's BASIC) on a machine other than the four mentioned in the posting?
> 

	Doug Price (..!ihnp4!chinet!price) has modified a number of
files and we have been able to bring it up on a 3b2, a VAX 8600
running SysVr2, and an AT running Microport.  Besides the obvious
SysV term stuff, I guess there were a number of routines that had the
same name as library routines.  I think strcpy was one of them.
We will be posting the diffs soon.


-- 
.. that's the biz, sweetheart...
Randy Suess
chinet - Public Access UN*X
(312) 545 7535 (h) (312) 283 0559 (system)
..!ihnp4!chinet!randy

dhp@ihlpa.UUCP (Douglas H. Price) (12/17/86)

> Has anyone else had luck bringing up the recently-posted BASIC interpreter
> (Phil's BASIC) on a machine other than the four mentioned in the posting?

Yes.  It turns out that Phil implemented two routines which hose up System V
machines.  One is setupterm(), which is found in the Sys V terminfo library.
I renamed it to bsetupterm().  The other is strcpy().  This is the one that
really hangs up terminfo.  Phil's  version (which I assume was implemented
before the advent of the standard strings library) has the arguments in the
reverse order, and has a different return value.  Simply rename all references
to bstrcpy() and the problem goes away.

-- 
						Douglas H. Price
						Analysts International Corp.
						@ AT&T Bell Laboratories
						..!ihnp4!ihlpa!dhp

mann@norvax.UUCP (12/18/86)

In article <447@moncol.UUCP> john@moncol.UUCP (John Ruschmeyer) writes:
>Has anyone else noticed problems with the termcap code? If so, what did you
>have to do to fix it?

I brought it up on a TRS-16 running an OLD version of Xenix (1.0.3, I think).
The only change I had to make was to change #include <sys/ioctl.h> to
#include <sgtty.h>.
It seems to run great!

I tried to bring it up on a VAX 750 under 4.2 BSD and have the same
termcap problem but haven't had time to investigate. Any suggestions
would be welcome here!

stark@sbstaff2.UUCP (Eugene Stark) (12/19/86)

> Has anyone else had luck bringing up the recently-posted BASIC interpreter
> (Phil's BASIC) on a machine other than the four mentioned in the posting?
>  
> Aa co-worker and I have tried to bring it up on a Perkin-Elmer 3220 running
> Edition VII, a Perkin-Elmer 3250 running XELOS (SVr2), and an IBM-PC AT
> running SCO XENIX/286. In all three cases, we have had problems related to
> the termcap code.
> 
> In all three cases, it was necessary to make the interpreter default to no
> editor for it to work with most termcap entries.
> 
> In the best case, the editor would function correctly with very simple
> termcaps (adm3, pe550, etc.).
> 
> Under no circumstances, would the editor work with a termcap that referred
> to another entry by way of a 'tc=' entry. Depending on the system, either a
> 'BAD TERMCAP ENTRY' message is returned or the program goes into
> never-never land.
> 
> 
> Has anyone else noticed problems with the termcap code? If so, what did you
> have to do to fix it?
> 
> Thanks in advance...
> 

I compiled Phil's BASIC on a SUN 3, and had the same problem with the
termcap.  I didn't feel like playing with it much, but I seem to recall
I did "adb" it, and noticed that the termcap library software was returning
an error when I didn't think it should have been.  Since I wasn't particularly
interested, and didn't immediately understand it, I gave up.

Gene Stark

dhp@ihlpa.UUCP (Douglas H. Price) (12/22/86)

> I did "adb" it, and noticed that the termcap library software was returning
> an error when I didn't think it should have been.
> Gene Stark

Again, the problem is that Phil's Basic defines its own version of the strcpy(3)
subroutine which is incompatible with the library version.  One need only change
the name of the routine to 'bstrcpy' throughout the code (about 12 invocations)
to fix this problem.

-- 
						Douglas H. Price
						Analysts International Corp.
						@ AT&T Bell Laboratories
						..!ihnp4!ihlpa!dhp