home *** CD-ROM | disk | FTP | other *** search
-
- Documentation for ParM
-
-
- ParM stands for Parametrable Menu.
-
- ParM allow you to build your own menus in order to run all the programs you
- can have on one ore more disks. This is very usefull for hard disk owners
- which have programs deeply enclosed in subdirectories. With ParM, you can
- run them without going through directories under either WorkBench or CLI.
-
- With ParM, you can start programs in either WorkBench or CLI mode. The
- advantage of WorkBench mode is that the default directory of the program
- you run is the one in which the program file is. In the other hand, you
- can't leave ParM when workbench processes are running.
-
-
- Building:
-
- ParM was made using AztecC 5.0a, CygnusEd release 2, and ARexx 1.10.
- File headers are done in such a way compilation can be launched from
- Ced. I use my own DevKit, completely rewriten since the original 1.2
- version of the DevKit wasn't working at all.
-
- ParM needs arp.library version 39. Since linker libraries given with
- arp 1.3 are for the 3.6 release of the Manx linker, I wrote prototypes
- for all arp functions but Printf(), SPrintf() and FPrintf(). Theses
- can't be prototyped because they have a variable number of arguments.
- Then, I made a small library which only contain the glues for them,
- called a.lib. I make heavy use of Manx precompiled headers facility,
- and I use only three headers of my own. They are called
- dos_functions.h, dos_pragmas.h, and arpdos_pragmas.h. Of course, I have
- removed dos functions prototypes from arpbase.h and functions.h to do
- that. I often use arp.library, and then, when I need dos functions, I
- prefer arp ones, so I use arpdos_pragmas.h, otherwise, I use
- dos_pragmas.h. In both cases, I include dos_functions.h, to have
- automatic casts to long for short int parameters. (I allways use 16
- bits ints) With this method, when I use dos fuctions, if I forget to
- include dos_functions.h the compiler generates warnings telling no
- prototypes have been defined for them. Then, I include dos_functions.h
- and the pragmas needed. I have even a Ced macro to do that!
-
- Compiling with Lattice should be straight forward since ParM doesn't
- use any of the specific Manx library functions. But I didn't try it
- anyway.
-
-
- Installation:
-
- Put ParM with its icon wherever you want, and just put the default
- config file "ParM.cfg" in S: if you use it. If you don't, you'll have
- to specify the config file in the command line or in the tool types of
- the icon, otherwise, you will have to cancel the requester and won't
- have any menus.
-
-
- Running:
-
- It is recommended to run ParM from CLI if you want your programs to
- have a default path other than the current directory and C: which is
- the case if you start it from WorkBench. ParM can be run in two ways.
- 1) You can attach ParM to the CLI you are using.
- In this case, if you don't specify any of the window options,
- the menus will be attached to the CLI window you start it
- from. You may then only "Run" it to prevent you from closing
- the CLI.
- 2) ParM can have its own window. This is allways the case when it is
- run from WorkBench, but you can also tell it to open it's own
- window when run from CLI using "-w" option or any of the
- window options. You should then "RunBack" it to be able to
- close the CLI later. Don't use arp ARun with NOIO because
- some programs don't like it, and those will not run from ParM.
-
- ParM have some options which are available for most either from
- WorkBench or from CLI. The only one which is only available from CLI
- is "-w" since ParM allways open its own window when run from
- WorkBench.
-
- Option list:
-
- CLI WB
-
- -w (CLI only) Tell ParM to open its own window rather than
- taking CLI one's.
- -x LEFTEDGE left edge of ParM Window (default 0)
- -y TOPEDGE top edge of ParM Window (default 0)
- -d DETAILPEN detail pen of ParM Window (default 3)
- -b BLOCKPEN block pen of ParM Window (default 2)
- -c MENUCOLOR color for ParM's main menu (default Window
- detail pen)
- -f CONFIGFILE Configuration file.
-
- -h or anything wrong to get help when run from CLI.
-
- To use workbench tool types, just use the keyword followed by an "="
- and the value needed. For example
-
- DETAILPEN=1
-
- this is equivalent to
-
- RunBack >NIL: ParM -d1 when run from CLI.
-
- if you specify any of the -x,-y,-d,-b options when run from cli, a
- window will be open and -w option is useless.
-
-
- Configuration file:
-
- Configuration file looks like a structured program. You should indent
- your lines to make the file as readable as possible.
-
- The default configuration file should be in the S: directory and be
- named ParM.cfg.
-
- The configuration file defines the menus you want, and what commands
- they will run.
- Comments begin with a #, and continue until the end of the line.
- Upper and lowercase does not make a difference.
- You can also define the command console window.
-
- CMDWIN console_name
-
- This will override the default console used for Command output
- which is "CON:0/11/640/100 Command Window" This should be
- placed anywhere in the file but better be at top of it.
-
- COLOR n
-
- This will set the foreground pen color for new items. You can
- change this as often as you want. The arguments is the pen
- number to use. The default is window detail pen. If the color
- was window block pen, the item would be invisible, in this
- case, ParM replaces the color with window detail pen.
-
- MENU menu_name
-
- Creates a new menu. Each menu must have at least one item or
- submenu.
-
- SUBMENU submenu_name
-
- Creates a new submenu. Each submenu must have at least one
- item and can't have submenus. Each SUBMENU must end with
- an ENDSUBMENU
-
- ENDSUBMENU
-
- See SUBMENU.
-
- ITEM [{command-char}] item_name command_def
-
- Defines a new menu item. Each item definition must have an
- item_name and an associated command. Each item is linked to
- the current menu or submenu. An ENDSUBMENU statement tells
- ParM to attach next items to the current menu rather than to
- the current submenu. If any of the menu, submenu and item
- names may contain whitespaces. In this case, enclose the name
- in double quotes. A command character may be defined for the
- menu item by putting the character after the ITEM keyword and
- surround it with {}'s. Command syntax is decribed below.
-
- command_def
-
- Programs can be run in three ways: CLI, RB, and WB.
-
- 1) CLI syntax
-
- CLI console command [STACK n] [PRI n] [args]
-
- This mode should be used if you want your command to have a
- console window for its output. Otherwise, you should use
- the RB mode. You must specify a valid console window. For
- example, NIL: doesn't work. In such a case, ParM will pop
- up a requester telling you it can't open the window. STACK
- and PRI are optionnal. If STACK is less than the default
- stack specified in ParM.h, STACK will be set to this
- default stack. It is currently 4096 bytes. Actually, the
- console is immediately closed after the program ends. We
- hope to fix this in future release. For example, I use
- this mode to Format my floppies, and I see in a little
- window the format process.
-
- 2) RB syntax
-
- RB command [args]
-
- Execute command in CLI mode with any input/output. You
- MUST have the Run command in your C: directory. You can't
- use redirection since it is already redirected and
- indirected to and from NIL:.
-
- 3) WB syntax
-
- WB command
-
- Execute command in WorkBench mode. You must have a .info
- file associated with the executable one. You can't leave
- ParM until all WB processes aren't finished. No arguments
- are allowed in this mode.
-
-
- For both CLI and RB modes, your command is searched first in arp
- resident list and then in CLI Path at time ParM was run. To know the
- path in which ParM search its commands, just issue the Path command
- in the requester of ParM Command command, or open a newcli or shell
- from ParM and issue the Path command.
-
- A config file is given with ParM as an example.
-
-
- ParM commands:
-
- Open: Pops up a requester asking to select the new
- config file.
- UpDate: UpDate the menu reloading the config file.
- Usefull if you modify the config file while ParM
- is running.
- Command: Allows you to execute a single CLI command.
- Change Dir: Changes ParM current directory. All CLI and RB
- commands will inherit ParM current directory.
- Quit: Why? You don't like it!
-
-
- Limitations:
-
- Redirection can not be done for RB programs, since the code already
- does redirection to and from NIL:.
-
- Scripts cannot be executed with the CLI option. This problem come from
- the arp function ASyncRun(), and not from ParM. Script file stays
- locked and nothing happen.
-
- Don't use characters of ascii value over 127 such as characters with
- accents, strange things happen.
-
- Syntax of the script file is not completely checked to preserve code
- size small. So error analysis shouldn't easy in certain cases. For the
- same reason, the position of the error is mentioned as a char number in
- the script file. For CygnusEd users, it is easy to jump to it, but for
- other text editors, I don't know. Sorry but I don't want to lose my
- time counting the line number of the error.
-
-
- Bugs:
-
- This is not really a ParM bug, but if you start a compressed program in
- WorkBench mode and there is not enough memory for decompression, you
- will never can quit ParM because WorkBench startup message is never
- replied.
-
-
- Future plans:
-
- -Join the CLI and RB options in only one, making STACK and PRI available
- for both, and console window optionnal. The solution may be in
- ASyncRun(). The problem is that the documentation for this function is
- far from perfect and we couldn't have better results than ParM actually
- does. If someone knows or find a solution, please contact us. See
- bottom of file.
- -Having an option to let user close the console in CLI mode.
- -Making Command function asyncronous and having better input handle.
-
-
- Release notes:
-
- 1.0: Internal. Major MyMenu rework.
-
- 1.1: First official release.
- Old CLI option changed to RB (stands for RunBack).
- New CLI option added.
- Config file syntax changed. (Old was MyMenu's one).
-
-
- Acknowledgements:
-
- The first release (internal) of ParM was a major rework of MyMenu by
- Darin Johnson. The problem was that it wasn't possible to have MyMenu
- without workbench, and program started from MyMenu didn't have a Path.
-
- So, lots of thanks to Darin Johnson for menu allocations and workbench
- run. The idea of attaching menus to the CLI and some other ideas came
- from a friend who also made a menu but wasn't easy to configure.
-
-
- Signature:
-
- S.R. & P.C. This is not Status Register and Program Counter but
- Sylvain Rougier & Pierre Carrette. We are Frenchies so we hope the
- documentation is readable. We put our work in making english language
- comments, but it isn't allways easy, so be fair with us.
-
-
- Donnations:
-
- If you enjoy this program, send donnations and/or bugs report to:
-
- Sylvain Rougier
- Coiffure W
- 39 rue Carnot
- 86000 Poitiers
- France.
-
-