Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site 3comvax.UUCP Path: utzoo!watmath!clyde!burl!ulysses!bellcore!decvax!genrad!panda!talcott!harvard!seismo!lll-crg!qantel!hplabs!oliveb!3comvax!mykes From: mykes@3comvax.UUCP (Mike Schwartz) Newsgroups: net.micro.amiga Subject: Re: Review of MyCLI.c (Author Mike Schwartz) Message-ID: <340@3comvax.UUCP> Date: Tue, 14-Jan-86 15:23:51 EST Article-I.D.: 3comvax.340 Posted: Tue Jan 14 15:23:51 1986 Date-Received: Fri, 17-Jan-86 07:12:37 EST References: <3006@vax4.fluke.UUCP> Reply-To: mykes@3comvax.UUCP (Mike Schwartz) Distribution: net Organization: 3Com Corp; Mountain View, CA Lines: 86 I am glad that MyCLI is of use to some of you out there. I am not working extremely hard on it currently, becuase I have some work to do for someone else (till end of Jan.), which is why I posted the early version. However, I have done some things to it. First of all, I planned to do a lot of things that were suggested by mr. fluke, however, My idea of a replacement CLI is one that is maybe twice the size of the old CLI, and that had a generous subset of the normal CLI commands. The idea is to reduce the number of compiled lattice 'C' programs (executable programs like copy, cd, etc.) that one normally puts in ramdisk (for speed). I felt that it was better to have a 24K CLI and 12K of external (disk resident) commands in ram disk than to have an 8K CLI and 28K of external commands. The other added features of a replacement CLI should make it more desireable to use. First of all, the HELP key does work in MyCLI!! It will list all of the available commands. I am sorry, but until I complete the next version of MyCLI, the exact format of the commands is only documented in the source code. The "prompt" command is similar to the one on MS DOS, and you can use it to make some neat prompts. The prompt string is printed character for character, except that '$' is a metacharacter. $r turns on reverse video, $n turns it off, $_ generates a newline, $d generates the date, $t genereates the time, and $p generates the path. Please feel free to use the source code as examples of how to do most things with AmigaDos. Although the program has been published in the public domain, the source does belong to me. Some of the more interesting routines in MyCLI that are worth looking at are the date and time stamp decoding routines, lock structure processing, directory and subdirectory handling, and the copy command. I will release a copy command to replace the old CLI copy command in the very near future - my scheme is 6X faster than the standard CLI copy, and works extremely well with just one disk!!! A tip for MyCLI - I use the assign command to assign x: to the normal c: (command) subdirectory. From MyCLI, I can access any standard CLI command by doing x:list or x:copy or x:dir, etc. Also, I use the autoexec.bat startup file to initialize a set of function key values. Typically they are the ATDT command to dial the 3Com Vax, my login and password, and other unix commands I want ready at a keystroke. The current version of MyCLI that I have will read out loud, using the translator and narrator devices, news and mail (and anything else) from unix (or over the phone). It is a new toggle command called "narrate". I currently use the Exec function to create newcli's, but a friend at Amiga suggested that I make a library out of MyCLI and just Exec smaller front ends. As long as I am at it, I will probably explore some of the deeper depths of AmigaDos (the Load function, and the CreateProcess function) which will (hopefully) get rid of the NEWCLI problems MyCLI now has. I am sorry I couldn't get the NEWCLI to work as well as I wanted, but I tried everything I could think of (all combinations of Exec calls) with no sucess. In general, AmigaDos is pretty good, but it is real weak at dealing with multi-window/multi-tasking (no close gadget, etc.), and there is a bug when the standard CLI tries to endcli with no windows open. Some other points about the review: The size gadget gets erased, because the standard console device on the amiga defaults to 77 characters per line, and this makes using programs that expect 80 character displayable lines. I hacked a solution (by sending the ANSI sequence to set the right margin to 80 characters), but this causes the size gadget to scroll. The tradeoff would be unix programs that use the curses package only work with 80 char lines (otherwise the screen scrolls and the curses positioning gets screwed up). From my work on MyCLI, I have a pretty good idea that the Amiga makes an incredible terminal for UNIX!! I think it would be VERY TRIVIAL to create a version of unix that interfaced to the Amiga and allowed Multiple signons in multiple windows on one Amiga. In other words, the NEWCLI command can be added to UNIX, and it would open a window on the Amiga, and would issue its prompts, etc. there. I think the trivial change would be modifying the "output character" (lowest level) routine that is called by every unix program (via printf, puts, etc.) to output a window identifier prefix before each byte output (a number identifying which window the output goes to). The Amiga can easily direct the character to the appropriate window... I do not know the ST internals very well, but I find it hard to believe that without multi-tasking, such an enhancement to unix would be as easy. I also see lots of similarities between the Amiga's OS and UNIX, although there is little overlap and quite a bit of complementary stuff (i.e. windows, gadgets, etc. on the Amiga, and the Unix internals). Also, Amiga 'C' functions seem to all begin with capital letters (OpenLibrary, etc.) while unix symbols seem shorter and are lowercase (creat). I am very new to UNIX, so this is just a simple observation, but it seems valid. Later... mike schwartz @ 3Com Corp. (usual disclaimers apply).