home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Fred Fish Collection 1.5
/
ffcollection-1-5-1992-11.iso
/
ff_progs
/
shells
/
mycli.lzh
/
MYCLI
/
POSTER
< prev
Wrap
Text File
|
1991-10-31
|
5KB
|
90 lines
Article 1380 of net.micro.amiga:
Relay-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site well.UUCP
Posting-Version: version B 2.10.2 9/18/84; site 3comvax.UUCP
Path: well!ptsfa!qantel!lll-crg!ucdavis!ucbvax!decvax!decwrl!sun!idi!oliveb!3comvax!mykes
From: mykes@3comvax.UUCP (Mike Schwartz)
Newsgroups: net.micro.amiga
Subject: MyCLI - CLI/Terminal program
Message-ID: <314@3comvax.UUCP>
Date: 31 Dec 85 09:15:18 GMT
Date-Received: 3 Jan 86 11:43:40 GMT
Distribution: net
Organization: 3Com Corp; Mountain View, CA
Lines: 1367
I have been coding like a madman the last few weekends, and here is my latest
project, MyCLI. MyCLI is a replacement for the existing AmigaDos CLI. It
does have a few bugs in it, which I will work out, but it works so well, I
use it all the time. I figure it might help some of you out there who might
be doing similar things.
MyCLI tutorial.
MyCLI is a pretty basic CLI-style interface with a built-in terminal
mode for connecting to other computers. The basic CLI commands
are cd, chdir, copy, date, define, def, del, dir, erase, endcli, help,
makedir, md, newcli, online, offline, rename, ren, prompt,
setcomment, terminal, time, type, and whatis.
MyCLI has two different types of batch modes, MyCLI style, and CLI style.
These are differentiated by dot extensions of .bat and .cli. ".bat" files
are simply commands that MyCLI accepts. ".cli" files are files containing
CLI commands, and that under CLI are invoked by typing execute <whatever>.cli.
When you type a command to MyCLI that is not built-in, MyCLI looks first in
the current directory for the filename (first token on command line) with
the .bat extension, and executes it if it finds it (no parameters yet).
If not found, MyCLI looks for the .cli file of the same name and uses the
Execute function to do a "execute filename.cli parameters". If neither
type of batch file is found, then MyCLI tries to execute the filename as
a program file. MyCLI executes a batch file "df0:autoexec.bat" each time
it is invoked, which is useful for automatically configuring MyCLI to suit
your style.
MyCLI also allows you to define up to 20 commands for the function keys and
shifted function keys. You define a function key using the define or def
command. To define F1 to mean the dir command, type "def f1 dir". To define
F1 to compile a c program, type "def f1 make cprogram" or whatever. To
undefine a function key, type "def f1" with no definition. Once a function
key is defined, your command is just a keystroke away. It is useful to
use the autoexec.bat batch file (shades of msdos) to define a set of function
keys at startup. F11 through F20 are the shifted function keys.
MyCLI also features a terminal mode featuring ANSI compatibility. This
terminal mode feature allows for communications with hosts like Vaxs or
BBSs and includes ASCII file transfer capabilities. To enter terminal mode,
type "terminal" or "online". In terminal mode, all of your keystrokes are
echoed to the serial port. If you don't see what you are typing (i.e.
the host you are connected to does not echo back your keystrokes), you can
hit ^E (ctrl-e) to toggle local echoing. This feature is useful when one
MyCLI is connected to another via Modems.
Anytime you are in terminal mode, you can hit ^C to re-enter command
mode. In command mode, you will be allowed to enter one command, and then
you will go back into terminal mode. From command mode, the "type" command
will begin an ASCII file transmission out the serial port. ^C followed by
"capture <filename>" will begin an ASCII file capture (for collecting articles
off of ARPAnet or USENET). I use UNIX ED to collect source code on the 3Com
Vax, along with the type command. To terminate receive of an Ascii file,
^C then "capture". Capture is a toggle command.
Notes:
Programs like AmigaDos ED run concurrently when in terminal mode. They
will freeze until you hit ^C. You must have Run and Execute in your C:
directory (I like mine on Ram Disk -> ram:). I intend to add Xmodem and
better copy and dir command syntax. Right now you have to specify explicit
source and destinations - no wildcards or pattern matching allowed. Also,
there aren't a whole lot of comments, except in the area where I am currently
working. This is done to reduce compile time (don't have to read in the
comments), though I normally like to document quite a bit. Also, right
now the terminal mode is set to 1200 baud in initialize() near the end,
so change it to whatever. I will be adding a phone directory and modem
defaults in the future.
Please mail me bug reports if you are so inclined, and I will get to them
right away. I will also be posting future versions, as they are ready.
--------------------------------cut here-------------------------------------