[comp.sys.amiga] Add to VT100 v2.8 a script NULL character transmission command.

erikj@hi.unm.edu (Erik Johannes) (04/06/88)

	This posting is two fold.  First a question about compiling VT100 2.8
with Manx 3.6A followed by a modification to add the ability to transmit the
NULL character from a script.

	When I try to compile the stock VT100 2.8 I get an error on vt100.c
saying that ConsoleDevice is multipluly defined.  ConsoleDevice is defined in
the two include files : functions.h (defined as a function) and 
intuition/intuitionbase.h (defined as an APTR ).  Renaming ConsoleDevice
in the vt100 would result in the linker not being able to find _ConsoleDevice.
The only solution I could come up with is to comment out ConsoleDevice from
the include files.  Modifying the Manx include files is not the kind of 
solution I like.  Has anybody come up with a better solution for this problem?
At any point I managed to finally compile the vt100 and confirm that my
modification does work.
 
	When trying to write a script that would log onto the library computer
at the university I noticed that there was a problem with trying to send a NULL
from a script.  The SEND command performs the conversion turning "^@" into
the NULL character.  However this NULL ends up terminating the string that
is to be sent and thus SEND is unable to send a NULL character.  Inorder to
keep my modifications as little as possible I decided to add a new script
command instead of modifying the SEND code.  The new command is the NULL 
command.  The manual entry would look like this :

------------------------------------------------------------
NULL	Sends a NULL character to the host			(SCRIPT)
   Format:
	NULL	
------------------------------------------------------------

	The implementation involves very little modification of the vt100
code.  Below are the diffs for the two file that had to be modified.  The
diff program I used is the one that comes with Manx C.  The first diff says
to change line 227 in the original file to the second line preceded by >.
The second diff says to add at line 103 the line that is shown.  It also
says to add at line 695 the new cmd_snull() function.

*******************************************************************************
File :	vt100.h

227c227
< 		cmd_sendf(), cmd_wait(), cmd_xr(), cmd_xs(),
---
> 		cmd_sendf(), cmd_snull(), cmd_wait(), cmd_xr(), cmd_xs(),

*******************************************************************************
File :	script.c

103a104
>     cmd_snull,	"null",		/* send a NULL			*/
695a697,702
> void cmd_snull(str)
> char *str;
> {
>     sendchar('\0');
> }
> 
*******************************************************************************


		-Erik

page@swan.ulowell.edu (Bob Page) (04/06/88)

erikj@hi.unm.edu () wrote:
>ConsoleDevice is defined in the two include files : functions.h
>(defined as a function) and intuition/intuitionbase.h (defined as an APTR).

The Manx functions.h is wrong.  ConsoleDevice is not a function, it
is a library base pointer for the console.device.

>Modifying the Manx include files is not the kind of solution I like.

Send me your disk and I'll do it. :-)  The Manx functions.h file has a
number of (acknowledged) problems.

..Bob
-- 
Bob Page, U of Lowell CS Dept.  page@swan.ulowell.edu  ulowell!page

derick@garfield.UUCP (Derick Linegar) (04/10/88)

In article <6009@swan.ulowell.edu> page@swan.ulowell.edu (Bob Page) writes:
>
>The Manx functions.h is wrong.  ConsoleDevice is not a function, it
>is a library base pointer for the console.device.
>The Manx functions.h file has a number of (acknowledged) problems.
>
>..Bob
>-- 
>Bob Page, U of Lowell CS Dept.  page@swan.ulowell.edu  ulowell!page


Would a kind soul out there please post all the problems with the MANX include
file function.h for version 3.4 and 3.6? I like to fix the problems so I 
do not run into these nagging points again.

Of course I am assuming that the 3.4 function.h is different from the 3.6, no?
Or did they forgot that ?? ( Yes I still have 3.4 but not for long, untill
then I like to have the 3.4 functions.h fixes AND the 3.6. )

Thanx
derick

Derick Linegar, 12A Fleming Str. St John's Nfld. Canada A1C 3A2
UUCP:	{akgua,allegra,cbosgd,ihnp4,utcsri,uunet}!garfield!derick
EAN:	derick@garfield.mun.cdn
CSNET:  derick@garfield.mun.cdn@ubc.csnet
-- 
Derick Linegar, 12A Fleming Str. St John's Nfld. Canada A1C 3A2
UUCP:	{akgua,allegra,cbosgd,ihnp4,utcsri,uunet}!garfield!derick
EAN:	derick@garfield.mun.cdn
CSNET:  derick@garfield.mun.cdn@ubc.csnet

acs@amdahl.uts.amdahl.com (Tony Sumrall) (04/19/88)

In article <23565@hi.unm.edu> erikj@hi.unm.edu () writes:
>
>	This posting is two fold.  First a question about compiling VT100 2.8
>with Manx 3.6A followed by a modification to add the ability to transmit the
>NULL character from a script.

1)  I don't know any other way to fix the problem in functions.h other
    than removing the definition.
2)  WRT your request for a NULL command...I've done what you request in
    2.9.

>		-Erik

-- 
Tony Sumrall acs@amdahl.uts.amdahl.com <=> amdahl!acs

[ Opinions expressed herein are the author's and should not be construed
  to reflect the views of Amdahl Corp. ]