home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
files
/
164.lha
/
ARexx
/
McC_v1.3_ARexx
/
mcc1R3.docs
< prev
next >
Wrap
Text File
|
1988-04-28
|
7KB
|
155 lines
McC
Integrated Editor/Compiler
Version 1.3
by John McClennan
June 25, 1988
Introduction:
McC is a set of six ARexx V1.06 macros that create and integrated
edit/compile enviroment using TxEd Plus and Lattice C V4.0. Programs can
be edited using TxEd and then compiled without having to exit the editor.
If any errors are detected during the compilation, the cursor is positioned
at the line in the source code corresponding to the first error. A TxEd
menu option allows the cursor to be moved to the lines where subsequent
errors occurred.
Installation:
If you received McC in ARC'ed format, the first thing you must do is
rename two of the files. The file "McCstm.txed" should be renamed
"McCstmain.txed" and the file "McCste.txed" should be renamed
"McCsterr.txed". The six macros should then be copied to the directory
corresponding to the logical device name REXX:. Also, the library
"rexxsupport.library" must be in the LIBS: directory. Once this has been
accomplished, McC is ready for use.
Operation:
The McC enviroment is started by typing "rx mcc" at the command line
prompt (Note: WShell users can omit the "rx" command and just type "mcc").
When the TxEd window appears the message "Can't Open File!" will appear.
This is normal and due to the fact that McC names the default file upon
invocation as "noname.c" (Note: if a file by that name does exist in your
current directory, it will be loaded and the warning message will not
appear). If you wish to enter a new file and name it as something other
than "noname.c", use the TxEd menu option "Save AS" in the Project menu to
save the file for the first time. If you wish to load and edit an already
existing file use the "Open" command from the Project menu.
To compile the program currently being edited, select the "Compile"
option from the User menu or use the command key shortcut Right-Amiga-M.
This will save the file currently being edited and then call the compiler.
A window will appear in the middle of the screen informing you of the name
of the file being compiled. When the compilation is finished, the TxEd
window will go blank for a second and then a second window will appear
containing the output from the compiler. If errors were detected during
the compilation, then the cursor in the error message window will be
positioned at the text describing the first error message and the cursor in
the edit window will be positioned at the start of the line that caused the
error. If no errors were detected, the cursor in the error message window
will be positioned at the bottom line of the compiler's output. If more
than one error occurred during the compilation, you can move forward to the
next error by using the "Next Error" option in the User menu or the command
key shortcut Right-Amiga-N. The cursors in the two windows will be
positioned as described above except at the positions corresponding to the
second (or third etc.) error. Note, each time the "Next Error" command is
used (including finding the first error), the message "ARexx MACRO ERROR"
will appear in the title bar of the error message window. The cause of
this is undetermined but it can be ignored since it does not affect the
operation of McC. One thing to remember about the "Next Error" command is
that it determines the position to move the cursor to from the line number
in the error message. If you correct a previous error by adding or
deleting lines, the line numbers corresponding to the errors will be out of
synch.
By default on startup, all files are compiled using the "-b0" switch for
the LC command. To change the compiler options use the "Set Options"
command in the User menu. A window will appear showing the options that
were previously in effect and asking you to enter the new options. Note,
entering a blank line for the new options indicates that no options will be
used for a compilation.
To exit from McC, use the normal TxEd "Quit" command in the Project
menu.
Warnings:
The error message window should never be closed once it is opened until
you are ready to exit McC. If you do so, an error may occur if you try to
compile a file. If you do close the window by accident, save the file you
are currently working on, exit McC, and then re-enter it and load your file
back in. This is due to the fact that the port name corresponding to the
error message window can't be determined until it is opened for the first
time. Closing and reopening it may cause the port to change without McC's
knowledge.
A second possible problem relates to the one above. If you close the
error message window and then use the "More TxEd" command to open a new
window and edit a file, the contents of the second file may be lost if you
try and compile the original file. This is also due to the port name
confusion.
Finally, only one instance of the McC eviroment should be invoked at any
time. ARexx's clip list is used to store some important values (such as
the port addresses for the windows) and will be corrupted if more than one
case of McC is run at any time.
Revisions from Version 1.2:
1. The limitation confining you to only editing files in the current
directory upon invocation of McC no longer exists. The standard TxEd
"Open" command can be used to load files from any directory or device.
2. A file name can no longer be specified on the command line. This is a
direct result of changes needed to make the first revision above work.
Upon initial entry into McC V1.3 a default filename of "noname.c" is
assumed. This can be changed by using the "Load" or "Save AS" commands.
3. WShell is no longer required. Changes made in V1.06 of ARexx now allow
McC to be run as-is from the normal CLI.
4. The "Next Error" option has been added.
5. The problem of the compiler not finding quoted include files that are
in the current directory as opposed to INCLUDE: has been fixed.
Macro File Description:
Version 1.3 consists of the six ARexx macro files described below.
McC.rexx - This macro sets up the McC enviroment and makes the initial call
to TxEd Plus.
McC1.txed - This macro handles the actual call to the compiler. It opens
the error message window the first time it is called.
McCnext.txed - This macro finds the next error in the compilation and
positions the cursors in the two windows as described in
the Operation section above.
McCopts.txed - This macro opens up a CON: window to get the new compiler
options.
McCstmain.txed - This is a TxEd startup macro for the main edit window. It
also calls a startup.txed macro if you have one.
McCsterr.txed - This is a TxEd startup macro for the error message window.
Bug Reports and Comments:
The best way to get in touch with me is to send BIX mail to jmcclennan.
Failing that, send paper (yecch!) mail to:
John McClennan
65 Bonney Dr.
Holliston, MA 01746