home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 9
/
FreshFishVol9-CD2.bin
/
bbs
/
util
/
breq-1.16.lha
/
BReq
/
BReq.man
< prev
next >
Wrap
Text File
|
1994-09-09
|
8KB
|
210 lines
BREQ() Some Programmer's Manual BREQ()
NAME
BReq - opens custom screen with two gadgets for startup
options on either NTSC or PAL screen.
SYNOPSIS
BReq [ATEXT/K,BTEXT/K,BLANK/K,BUTTONS/K,DEFAULT/K,
REVERSE/S,SYSA/K,SYSB/K,TIMEOUT/K]
DESCRIPTION
BReq opens a custom screen allowing two options to the
user. The options are named on two gadgets and by using
either mouse or keyboard selection the user can execute
a system call or exit from BReq. The system call sends
one string to the system which can be declared on the
command line. The exit option does no more than cause
BReq to exit returning the user to the calling shell or
script.
BReq also recognizes whether it is running under NTSC or
PAL screen modes and will adjust the screen, window and
gadgets accordingly.
The default system gadget (top) executes
"sys:loadbsd sys:vmunix -a"
And may be declared differently on the command line as
indicated below.
This may seem almost entirely useless but, if used during
startup it allows the user the ability to avoid a long
startup sequence to setup the system with options not
dependent on that startup sequence or with different
options at some point in the startup script.
REQUIREMENTS
The best machine ever created (for the unknowing, that
would be the Amiga). The Author has attempted to make
BReq independent of OS2.0+ specific code but, since there
is no access to 1.3 versions of the OS available to the
author it is impossible to verify that BReq will work
with versions of AmigaOS other than 2.0+
OPTIONS
The options for BReq are as follows:
ATEXT="Top gadget comment"
Allows user to give the top gadget a trailing comment.
Default: " "
BTEXT="Bottom gadget comment"
Allows user to give bottom gadget a trailing comment.
Default: " "
BLANK=seconds
After an idle time of seconds duration the screen is
blanked by setting registers 0 and 1 to black. Upon
activity either by the keyboard or mouse the screen
will return to its previous mode. The value must be
given as an integer.
Default: 180 (3 minutes)
BUTTONS=top_button|bottom_button
This gives each of the two gadgets a separate title
different than the default. To make two blank buttons
use BUTTONS=" |".
Default: NetBSD|ADOS
DEFAULT=A/B
This makes the default response of BReq either the
top (A) gadget or the bottom (B) gadget. This
option only makes sense when used with the TIMEOUT
option (see "TIMEOUT" below)
Default: A
REVERSE
REVERSE is a boolean switch causing the screen to be
black and the gadgets to be white.
Default: FALSE
SYSA="string"
This option allows the user to select a system call
other than the above mentioned default. The string
may be any valid program string as would be issued
from the command line. The string must be enclosed
in double quotes. This string is attached to the top
gadget.
Default: "sys:loadbsd sys:vmunix -a"
SYSB="String"
Same as option SYSA.
Default: NULL
TIMEOUT=seconds
This option allows the user to select a timeout value
in seconds where in this period of time if no valid
response is received from the user BReq will execute
the DEFAULT response (see DEFAULT above)
Default: 31536000 (one year)
RESPONSES
Valid responses using the mouse should be obvious. Valid
responses from the keyboard are
v, y (selects top gadget)
b, n (selects bottom gadget)
RETURN (selects default response)
ESC (selects opposite to default response)
These were chosen as such to be compatible in some respect
with standards and with the previous versions of BReq.
SYNTAX
BReq [options]
EXAMPLES
BReq SYSA="echo Hello, world"
Will cause the calling shell to echo "Hello, world" should
the user select the top gadget. Selection of the bottom
gadget will cause BReq to exit silently.
BReq BUTTONS=Echo|Silent
BReq will open the BReq screen with two gadgets entitled
"Echo" and "Silent".
BReq REVERSE
BReq will open a custom screen which is black with white
outlined gadgets.
BReq BUTTONS=Echo|Silent SYSA="echo Hello"
BReq will open as previously with the two gadgets titled
"Echo" and "Silent". Selection of the "Echo" (top) gadget
will cause BReq to issue the command to echo the string
"Hello" to the calling shell afterwhich BReq will close
the screen and exit. Selection of the "Silent" gadget
(bottom) will make BReq close the screen and exit silently.
BReq BUTTONS=Echo|Silent SYSA="echo Hello" TIMEOUT=90
Same as previous example except that if BReq does not re-
ceive a valid response inside of 90 seconds BReq will
execute the default option (gadget A).
BReq DEFAULT=B TIMEOUT=900 BLANK=30
BReq opens normally and without interaction by way of a
valid response, BReq will blank the screen in 30 seconds
and exit silently in 900 seconds (fifteen minutes)
DIAGNOSTICS
BReq returns non-zero values for any error. See the source
code for error explaination.
AUTHOR
Eric R. Augustine: uairk@mcl.mcl.ucsb.edu (til OCT94)
voodoo@well.sf.ca.us
BUGS
This is copyrighted freeware and as such comes with no
warantee or assurances whatsoever. Any damage that is a
result of BReq's use is not the responsibility of the
author.
The BUTTONS option gives odd errors if the string is not
"normal". BUTTONS="| for instance will make BReq send
garbage to the default system call in combination with a
command line change to the system call. BUTTONS=" | " will
cause BReq to exit silently as will BUTTONS="| ". I can't
see any advantage to requesting button titles like this
anyhow. See the OPTIONS section above for making blank
buttons.
TODO
Add a NoClick flag to stop that annoying click from the
floppy drive. Also, make the blanker more interesting.
LAST WORDS
BReq is Copyright (c)1994 by Eric R. Augustine. Being free
ware it may be handed out, passed on and out however you
feel as long as all original documentation and source are
included and that its distribution is not done for the
gain of profit. If you find BReq useful, have any suggest
ions, flames or have discovered a bug or two the author
can be contacted at the above internet e-mail addresses
All comments, suggestions, bug reports and flames are
welcome.
CREDITS
Thanks to Samu Nuojua (author of the excellent SNMA macro-
assembler) for catching a bug and testing the BReq's PAL
recognition.
Thanks to Anders Bjerin. Reading the includes gave little
general help in getting the structures right. The ACM did
though - that and insight into IDCMP.
Thanks to Nico Francois for his great package "ReqTools"..
Even if I haven't used ReqTools in this current version it
offered my initial leap into this sort of programming on
the Amiga.
Amiga - for making such an amazing machine..
And of course, thanks to Markus Wild - for bringing NetBSD
to the Amiga.