home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
High Voltage Shareware
/
high1.zip
/
high1
/
DIR36
/
KEXX.ZIP
/
CC.DOC
< prev
next >
Wrap
Text File
|
1992-12-30
|
5KB
|
104 lines
CC.KEX Documentation
Version 2.0 (June, 1992)
The CC macro can be used to compile your source programs from within
KEDIT 5.00 and to locate the lines that generated compiler errors.
CC will work with any compiler that issues error messages in
one of the formats documented below. It has been tested with the
following Microsoft products: C Compiler, Assembler, MAKE, and MEGREP.
Here is an example of CC usage: assume you have made some changes to
the file TEST.C. While still editing the file, type "CC" on the KEDIT
command line. CC will save the file to disk if necessary, and run your
C compiler, redirecting the output to a disk file. CC then processes
the compiler output to determine whether any errors occurred. If
compiler errors occurred, you can use the Alt-N and Alt-P keys to find
the next and previous source lines that generated errors. CC will find
the correct lines even if they are not in the current source file, or if
you have added or deleted lines while correcting previous errors.
When no arguments are specified, CC determines how to compile your
program by examining EDITV variables set in your KEDIT profile. The
EDITV variable used consists of the string CC_ and the extension of the
file you are editing. A "%s" in the value of the EDITV variable is
replaced with the current fileid. Here are some examples you may want
to include in your PROFILE.KEX for C, Assembler, BASIC, FORTRAN, Pascal,
and MAKE files, respectively:
'EDITV SETL CC_C cl /c /Zep /DLINT_ARGS %s'
'EDITV SETL CC_ASM masm -Mx %s;'
'EDITV SETL CC_BAS bc /Z %s'
'EDITV SETL CC_FOR fl /c %s'
'EDITV SETL CC_PAS pl /c /h %s'
'EDITV SETL CC_ make %s'
To override these defaults specify an argument to the CC command. This
argument will become the new default for the current file extension for
the rest of your edit session. For example, if you enter "CC MAKE TEST"
then CC will issue the DOS command "MAKE TEST".
You can further customize CC by setting the following EDITV variables.
Since there are defaults for these values you do not need to set them.
CC_NEXT_KEY Contains keyname to find the next error.
Default: Alt-N
CC_PREV_KEY Contains keyname to find the previous error.
Default: Alt-P
CC_CURR_KEY Contains keyname to find the current error.
Default: Alt-T
Prerequisites:
- KEDIT 5.00 or later.
- The RUNCMD, POP, PUSH, and PRGLINES macros (all distributed as part
of this package in \COMMON) must be in your KEDIT macropath.
Notes:
1) Error message formats supported are:
filename(row):error message
filename(row,column): error message
filename row column: error message
"filename", row column:error message
Error filename row: message
2) If "SET IMPMACRO ON" is not in effect, you need to type "MACRO CC"
on the KEDIT command line instead of "CC". If you do not want to
use "SET IMPMACRO ON", you can set up a synonym for CC with this
command: "SET SYNONYM CC MACRO CC".
3) CC can only find include files if they are in the KEDIT path. One
easy way to do this is to "SET PATH KPATH", and have the DOS KPATH
environment variable include the directories your compiler uses to
search for include files.
4) Even if you don't use CC to run the compiler from the KEDIT command
line, you can use it to step through your errors. Use the following
procedure:
a) Compile from DOS with output redirected to the file CC.TMP.
b) From the DOS prompt type "KEDIT CC.TMP (PROFILE CC".
Originally written 5/88 by Nico Mak, based on Chris Dunford's CL REXX
macro for KEDIT 4.00 and my MSCERROR.KED macro for KEDIT 3.5.
Disclaimer for all BBS (and other distributed) utilities/programs/macros:
The programs and macros distributed on this diskette are available
strictly as aids and examples for users of Mansfield Software Group
products.
Mansfield Software does not guarantee, or commit to support or maintain
the programs or macros distributed on this diskette. Also note that the
programs and macros provided are not guaranteed to work with past,
present, or future versions of Mansfield Software products.
Nonetheless, comments and suggestions are welcome. Please post any
comments, suggestions, or bug reports in:
-- section 2 of the PCVENA forum on CompuServe, or
-- the Mansfield Software Group Bulletin Board, at (203) 429-3784.