home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
files
/
037.lha
/
DU
/
Du21wb.doc
< prev
next >
Wrap
Text File
|
1987-05-16
|
13KB
|
325 lines
TDI Modula-2 Du v2.1wb - By Greg Browne - compiled for 250 files CLI or WB.
A combination of my DirUtil (smoothed down in size and cleaned up) with an
expansion on (the idea of) the Simple Development Program demo provided
with TDI's Modula-2 system. It allows you to edit, compile and link your
programs without all the repetitive typing and works as a full DirUtil.
This version IS my last (famous 'last' words - don't make me eat them
later, Lord). It does all I want it to do, and I want to move on to other
things. If someone else fancies it up, bravo. Besides, I finally got the
Workbench startup to work. No EVERYTHING seems to function properly
either from CLI or WB.
DISCLAIMER: I take no responsibility for damage or lost files if someone
is foolish enough to use this on valuable files untested. I am NOT a
professional programmer and am prone to mistakes like anyone else. I use
it with no problem, but you may do something differently.
NOTICE: This program is placed in the public domain. Give it away for the
asking, but don't try to sell it or else.?.?.?
ALERTS: Don't worry if the compiler (2.20a) returns "Modula failed
returncode 526" or some other such nonsense. If you check, it worked.
The TDI Simple Development Program does the same thing. That's a COMPILER
QUIRK. Also, if you don't have your .sym/.lnk files in m2: or the current
directory, it will fail rather than asking for names, since it is
NONinteractive.
HELP ???
I use this with 2.20a. I'm sure it will work with 3.00 (if you have enough
memory). However, it WON'T compile AND RUN RIGHT on 3.00 - I tried it, and
unless I am missing something about Gadgets, they don't like to be static.
At least, I can't find a way to get the structure to recognize the
IOStringInfo since I am not declaring them dynamically with the new TAG
field. My Modula book says a CASE variant in a record is undefined if the
tag is undefined, and how else do you define CASE : INTEGER OF ??? ***
ANYWAY, change a few structures to pointers as called for in 3.00, and it
compiles fine, but none of the string gadgets work right. Maybe it's in the
Strings modules.
=======================
PROGRAM SPECIFIC QUIRKS
(*---------*)
If you have used DirUtils, operating this should be familiar.
If not, make yourself a junk disk and try it out. It's easy to learn.
(*---------*)
Everything is "relative verify-Gadget Up". That means press AND RELEASE
the left mouse button over a gadget (or name) for it to register. You can
save some grief by moving the pointer off a gadget without releasing the
button, and then releasing it in some blank area.
Multi-file actions (see detail below) may be interrupted by pressing the
mouse button on something. It will stop after the current pass is
complete.
When doing multi-file execution stuff (ARC,DO,EDIT,LINK,MODULA) the program
is smart enough to just execute them (NOT RUN - to prevent multiple execute
disk grinding) unless it is the last (or only) file worked on. Then it will
RUN >NIL: the command to free up the DirUtil for other things.
Directory reads may be interrupted by clicking the slider while in progress.
If your directory exceeds 100 (currently) files, you will be notified and
the first 100 will be used.
Free memory := AvailMem(MemReqSet{MemChip}) + AvailMem(MemReqSet{MemFast});
and is shown in the title bar.
**NEW**
To accomodate WB startup (where the cli commands still think they are in
DF0:, I added full path expansion to all filenames used in commands.
I included my startup-sequence (MyStart.seq needs to be renamed). to show
how I use it. It will work with 2.20a and 512k memory, but not 3.00 with
only 512k no matter where you put the t: directory.
===============
OPERATION NOTES
The screen has 5 major divisions.
1) The 'window' is the file display area. It is where files are shown for
selected directories. (It is a gadget)
2) Above the window are device selection gadgets and the "SWAP". These are
"one-click-select" gadgets (The "SWAP" button is described below)
3) Right of the window is a slider for scrolling lists of filenames too long
to show in a (8 name) window. Above and below the slider are one line at
a time scrollers.
4) Right of the slider are the 'BUTTONS'. They are click select functions.
Their uses are described below in more detail.
5) Below the 'BUTTONS' are string display areas R,S,D, and M. These are
for typed input and messages to you. Also see the section below on HIDDEN
Gadgets.
DEVICE GADGETS: -> df0: df1: df2: dh0: dh1: ram: vd0:
Click the left mouse button on any of these to select a device. It will be
read and the files displayed in the filewindow.
FILEWINDOW GADGET:
Click over an unselected filename (white on black) and it will be selected
for inclusion in the multiple-file operations described below.
Click on a selected filename (black on white) to unselect it.
Click on a directory name (orange on black) to select it. A prompt will
appear in the (M) gadget giving you the option of switching into that
directory with a second click on top of it. (Clicking anywhere else cancels
this option). Click on a selected directory (after cancelling entry) to
unselect it. A click to cancel is not acted on except as a cancel.
NOTE: Only one directory at a time may be selected. Any and/or all
filenames may be selected.
SLIDER GADGET:
The slider scrolls through long lists of filenames. If the slider is filled
and will not move, then all files/directories are displayed. The + above
and - below the slider move one file at a time through the display.
STRING I/O GADGETS: -> R S D M (You may type in all EXCEPT 'M')
'R' is the Run gadget. It holds arguments to pass to a program being run,
like a command line tail. This gadget may also be used alone.
'S' is the Source gadget. It holds the name of the current active device
or directory. Click a device gadget and the name will replace what's here.
CLICK-AND-ENTER into this gadget, and your entry will be taken as a new
device or directory to access. If access to the name fails, the program
returns to the last active directory (or to ram: if that fails).
'D' is the Destination gadget. It holds the name of the path (or filename
in some cases) to be used for certain GADGET functions as described below.
'M' is the Message gadget. It will display messages and other information
from time to time. CLICK-AND-ENTER IN THIS GADGET and you get a NoNo. It
is for one-way (to you) communications.
HIDDEN GADGETS:
Unmarked gadgets are under the 'R' 'S' and 'D' beside the two-way gadgets.
Clicking 'R' or 'D' blanks out the contents of the gadget, BUT clicking 'S'
FORCES a directory read of the current 'S' contents.
BUTTON GADGETS: (alphabetically - almost)
ARC
---
This is the most complicated gadget to use. It tries to string together
'arc' followed by a tail made up of 'Rgadget' + 'Dgadget' + filename.
If any are empty, they will make spaces (ignored).
to add to (create too) an arc file.
'R' => a
'D' => Result.arc (the name of the destination file)
highlighted Joe.exe Bill.doc
This will create Result.arc if new and add Joe.exe and Bill.doc to it
BUT makes a full load for each highlighted file (sorry).
faster to do this.
'R' => a Result.arc Joe.exe Bill.doc (whole tail there)
'D' => [empty]
highlighted => [none]
Fool around with this one. It is powerful, but complicated to explain.
BYTES
-----
This will total and display the number of bytes and files for all selected
files in the window NOT including 512 bytes used per FileInfoBlock.
COPY (Multiple files - consecutively)
----
This copies all (any) selected file(s) to the location given in the D
gadget. THIS MUST NOT BE A FILENAME. The path in D must be to a valid
device or directory. Since multiple copying may be done, copying to a
specific filename is not supported.
CPYDEL (Multiple files - consecutively)
------
Same as COPY - except that if copy is successful, it deletes the original
source file. If interrupted, the DELETE part is still done on the last
copied file.
DELETE (Multiple files - consecutively)
------
FILE delete function. You'll get a CONFIRM message. Click DELETE again, and
any (all) files currently highlighted will be deleted. The 'M' gadget will
show progress, and the deletion may be stopped by clicking the left mouse
button on any gadget (or in the filewindow).
DELDIR
------
Delete the currently highlighted directory. To work, the directory must be
selected, entry to it cancelled, and IT MUST BE EMPTY. This command has to
be confirmed with another click on DELDIR.
DO f-R DO R-f (Multiple files - consecutively)
------ ------
These two try to execute the result of sticking together the R gadget and
the 'selected' filename(s)*. The order of placement depends on which
gadget you select. If no files are selected, 'DO R-f' will attempt the R
gadget content by itself. This uses the DOS call EXECUTE (like typing in a
command at the > prompt).
* KNOW YE - THIS OPTION *DOES* INCLUDE ANY HIGHLIGHTED DIRECTORY NAME
IN THE ATTEMPT TO STICK TOGETHER R+f OR f+R (My choice).
EDIT (Multiple files - consecutively)
----
This gadget invokes your editor with the selected filename(s) as command
tails. If no filenames are selected, the editor will be run with no file.
It expects an editor named 'dme' somewhere in the normal search path. SEE
PATCHING.
GETDIR
------
There is NO GETDIR. To get a directory, double click on top of the name.
(See the filewindow description above.)
HPRINT HTYPE PRINT TYPE
------ ----- ----- ----
Display/print files in ascii or hex. Output device for print is PRT: but
can be patched (see end of this doc).
INFO
----
This reports free space on S and D, (if valid) and the volume name(s).
LINK (Multiple files - consecutively)
----
This will invoke the linker WITH 'O' OPTION ONLY. It will run consecutively
on any (all) selected files IN ALPHABETIC ORDER (sorry no choice).
MAKDIR
------
Make a new directory named in the D gadget (if valid and not already
existing). If a complete dev:path is not given, it will be relative to the
path in S. If successful, the S directory will be re-read in case of
change. A check is made to insure you are not trying to create a directory
with an already existing name (or over a file).
MODULA (Multiple files - consecutively)
------
This will invoke the compiler (NO OPTIONS-3.00 people). It will run
consecutively on any (all) selected files IN ALPHABETIC ORDER (sorry no
choice).
MOVE (Multiple files - consecutively)
----
Quick rename. The destination (path only-not name) of all selected file(s)
should be in D. This attempts consecutive renames (between directories not
devices). Since the files can only drop out of sight, they are eliminated
from the filewindow without re-reading S.
PARENT ROOT
------ ----
These commands attempt to 'back-up' to the parent or root directory of the
current 'S' gadget. If they fail (horrors) they returns to the current
directory (or ram: as a last resort).
RENAME
------
This attempts to rename the FIRST selected file it finds (should be only
for this) to the NAME given in the D gadget. Since it may be still in the
same directory, it will re-read the directory afterwards. Wherever feasable,
MOVE is faster.
RETAG TAG ALL UNTAG
----- ------- -----
Mass selection (or unselection) of all FILENAMES in a window. Some DU's
call these ALL and CLEAR. RETAG works after multiple file operations to
reselect any files which were selected before (if they remain now).
SHOW
----
Picture display. Execs "show" (patchable - see end) with the highlighted
files as command tails.
S->D
----
This command copies the current Source to the Dest gadget.
SWAP
----
These are for two-way swap of S D content. The new S will be sourced as
though typed in.
PATCHING
--------
Changing the editor name:
Use NewZap to find the only occurrance of 'dme' (no quotes). Change it
to a null terminated string of your choice. There is space for up to an
10 character name.
Changing PRINT output device:
Use NewZap to find only occurrance of PRT:. It can be changed to any
valid file or device which can accept output and fit in 4 characters plus
the null terminator.
Changing SHOW program name:
Use NewZap to find only occurrance of 'show' (no quotes) with spaces
behind it. Change to null terminated string of your choice. The other
'SHOW' is the gadget text.
Changing MODULA or LINK:
The lower case occurrance of these two names is the actual one passed to
the CLI. HOWEVER link always tags a ' o' (blank + optimize) on the end of
everything. These can be changed, too (if the 'o' is no problem). The
UPPER CASE occurrance of these words is the gadget text.
OR - modify and recompile the source!