Path: utzoo!mnetor!uunet!lll-winken!lll-tis!ames!hc!hi!erikj From: erikj@hi.unm.edu (Erik Johannes) Newsgroups: comp.sys.amiga Subject: Add to VT100 v2.8 a script NULL character transmission command. Message-ID: <23565@hi.unm.edu> Date: 6 Apr 88 06:30:08 GMT Reply-To: erikj@hi.unm.edu () Organization: U. of New Mexico, Albuquerque Lines: 61 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