home *** CD-ROM | disk | FTP | other *** search
/ High Voltage Shareware / high1.zip / high1 / DIR36 / KEXX.ZIP / CC.DOC < prev    next >
Text File  |  1992-12-30  |  5KB  |  104 lines

  1.                           CC.KEX Documentation
  2.                         Version 2.0 (June, 1992)
  3.  
  4. The CC macro can be used to compile your source programs from within
  5. KEDIT 5.00 and to locate the lines that generated compiler errors.
  6. CC will work with any compiler that issues error messages in
  7. one of the formats documented below.  It has been tested with the
  8. following Microsoft products:  C Compiler, Assembler, MAKE, and MEGREP.
  9.  
  10. Here is an example of CC usage:  assume you have made some changes to
  11. the file TEST.C.  While still editing the file, type "CC" on the KEDIT
  12. command line.  CC will save the file to disk if necessary, and run your
  13. C compiler, redirecting the output to a disk file.  CC then processes
  14. the compiler output to determine whether any errors occurred.  If
  15. compiler errors occurred, you can use the Alt-N and Alt-P keys to find
  16. the next and previous source lines that generated errors.  CC will find
  17. the correct lines even if they are not in the current source file, or if
  18. you have added or deleted lines while correcting previous errors.
  19.  
  20. When no arguments are specified, CC determines how to compile your
  21. program by examining EDITV variables set in your KEDIT profile.  The
  22. EDITV variable used consists of the string CC_ and the extension of the
  23. file you are editing.  A "%s" in the value of the EDITV variable is
  24. replaced with the current fileid.  Here are some examples you may want
  25. to include in your PROFILE.KEX for C, Assembler, BASIC, FORTRAN, Pascal,
  26. and MAKE files, respectively:
  27.  
  28.    'EDITV SETL CC_C   cl /c /Zep /DLINT_ARGS %s'
  29.    'EDITV SETL CC_ASM masm -Mx %s;'
  30.    'EDITV SETL CC_BAS bc /Z %s'
  31.    'EDITV SETL CC_FOR fl /c %s'
  32.    'EDITV SETL CC_PAS pl /c /h %s'
  33.    'EDITV SETL CC_    make %s'
  34.  
  35. To override these defaults specify an argument to the CC command.  This
  36. argument will become the new default for the current file extension for
  37. the rest of your edit session.  For example, if you enter "CC MAKE TEST"
  38. then CC will issue the DOS command "MAKE TEST".
  39.  
  40. You can further customize CC by setting the following EDITV variables.
  41. Since there are defaults for these values you do not need to set them.
  42.  
  43. CC_NEXT_KEY Contains keyname to find the next error.
  44.             Default: Alt-N
  45. CC_PREV_KEY Contains keyname to find the previous error.
  46.             Default: Alt-P
  47. CC_CURR_KEY Contains keyname to find the current error.
  48.             Default: Alt-T
  49.  
  50. Prerequisites:
  51.  
  52. - KEDIT 5.00 or later.
  53.  
  54. - The RUNCMD, POP, PUSH, and PRGLINES macros (all distributed as part
  55.   of this package in \COMMON) must be in your KEDIT macropath.
  56.  
  57. Notes:
  58.  
  59. 1) Error message formats supported are:
  60.  
  61.    filename(row):error message
  62.    filename(row,column): error message
  63.    filename row column: error message
  64.    "filename", row column:error message
  65.    Error filename row: message
  66.  
  67. 2) If "SET IMPMACRO ON" is not in effect, you need to type "MACRO CC"
  68.    on the KEDIT command line instead of "CC".  If you do not want to
  69.    use "SET IMPMACRO ON", you can set up a synonym for CC with this
  70.    command:  "SET SYNONYM CC MACRO CC".
  71.  
  72. 3) CC can only find include files if they are in the KEDIT path.  One
  73.    easy way to do this is to "SET PATH KPATH", and have the DOS KPATH
  74.    environment variable include the directories your compiler uses to
  75.    search for include files.
  76.  
  77. 4) Even if you don't use CC to run the compiler from the KEDIT command
  78.    line, you can use it to step through your errors.  Use the following
  79.    procedure:
  80.  
  81.    a) Compile from DOS with output redirected to the file CC.TMP.
  82.    b) From the DOS prompt type "KEDIT CC.TMP (PROFILE CC".
  83.  
  84. Originally written 5/88 by Nico Mak, based on Chris Dunford's CL REXX
  85. macro for KEDIT 4.00 and my MSCERROR.KED macro for KEDIT 3.5.
  86.  
  87.  
  88. Disclaimer for all BBS (and other distributed) utilities/programs/macros:
  89.  
  90. The programs and macros distributed on this diskette are available
  91. strictly as aids and examples for users of Mansfield Software Group
  92. products.
  93.  
  94. Mansfield Software does not guarantee, or commit to support or maintain
  95. the programs or macros distributed on this diskette.  Also note that the
  96. programs and macros provided are not guaranteed to work with past,
  97. present, or future versions of Mansfield Software products.
  98.  
  99. Nonetheless, comments and suggestions are welcome.  Please post any
  100. comments, suggestions, or bug reports in:
  101.  
  102.   -- section 2 of the PCVENA forum on CompuServe, or
  103.   -- the Mansfield Software Group Bulletin Board, at (203) 429-3784.
  104.