home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS 1992 September / Simtel20_Sept92.cdr / msdos / qedit / qcp208.arc / QCONFIG.QCP < prev    next >
Text File  |  1989-11-17  |  4KB  |  85 lines

  1. *
  2. * QCONFIG.QCP -- Sample QEdit macros for QCP, version 2.08
  3. * Author:  Tim Farley
  4. * Date:    17-November-1989
  5. *
  6.  
  7. *
  8. * ^F9 is our "Compile" macro
  9. *
  10. *  Note that this macro causes the the Output file name ($O) to be ERRORS.LST
  11. *  in the current directory, and the Macro file name ($M) to be ERRORS.MAC,
  12. *  also in the current directory.  This is forced via the /M and /O command
  13. *  line switches.
  14. *
  15. *  If you have a RAM disk, you will probably want to edit this macro
  16. *  (and/or change the ..O and ..M values in your QCP.DAT) to locate these
  17. *  files on the RAM disk for faster operation.  If you configure QCP
  18. *  properly, making sure the filenames used for $O and $M are always the
  19. *  same as those referenced in this macro, then you can remove the /O and
  20. *  /M options below, saving some space here (since QCONFIG has a limited
  21. *  space for macros).
  22. *
  23. ^f9 MacroBegin SaveFile OneWindow UnmarkBlock MarkLine EditFile 'errors.lst' Return Quit GotoBlockBeg Dos 'QCP/O.\errors.lst /M.\errors.mac ' CurrentFilename Return " " HorizontalWindow EditFile Return PrevWindow MacroRead 'errors.mac' Return UnMarkBlock
  24.  
  25. *
  26. *  The following is an alternate version of the compile macro, that makes the
  27. *  bottom "error" window take up only one quarter of the screen, instead of
  28. *  one half.  Good for use on 43 or 50 line screens.
  29. *
  30. *  NOTE:  Because of the extra overhead of sizing the window, the following
  31. *         does not include the /O or /M switches on the QCP command line.
  32. *         You must make sure that QCP will always read/write these files
  33. *         from the same directory that this macro does.
  34. *
  35. *  This macro also assumes that you have the QCONFIG (G)eneral option:
  36. *
  37. *         Prompt for filename on open window?
  38. *
  39. *  Set to "NO", which is the default.
  40. *
  41. ^f9 MacroBegin SaveFile OneWindow UnmarkBlock MarkLine EditFile 'errors.lst' Return Quit GotoBlockBeg Dos 'QCP ' CurrentFilename Return " " HorizontalWindow HorizontalWindow EditFile Return PrevWindow CloseWindow MacroRead 'errors.mac' Return UmMarkBlock
  42.  
  43. *
  44. * ^f8 is our "Regular expression search" macro
  45. *
  46. *  This macro demonstrates the use of the /# options that QCP recognizes.
  47. *  It assumes that you have the definition:
  48. *
  49. *      ..1     grep -o+n+r+ $1 $2 $3 $4 $5 $6 $7 $8 $9  $F >$O
  50. *
  51. *  or similar in your QCP.DAT.  This causes QCP /1 to invoke Borland's
  52. *  Turbo Grep (which comes with most Turbo language products now).
  53. *
  54. *  Any other GREP utility which generates output with a filename, followed
  55. *  by a line number, followed by the line of text, could be substituted.
  56. *  In this case, Turbo Grep generates output in this form if you make sure
  57. *  the o+ and n+ switches are turned on.
  58. *
  59. *  Again, you can get rid of the /M and /O options here by configuring your
  60. *  copy of QCP properly, to shorten this macro considerably.
  61. *
  62. *  Hit ^f8, type your regular expression, then hit RETURN.  ESC aborts.
  63. *
  64. *  Note the use of Pause in this macro, taking advantage of QEdit 2.08.
  65. *
  66. ^f8 MacroBegin SaveFile OneWindow UnmarkBlock MarkLine EditFile 'grep.lst' Return Quit GotoBlockBeg Dos 'QCP/O.\grep.lst /M.\grep.mac /1 ' CurrentFilename ' ' Pause Return " " HorizontalWindow EditFile Return PrevWindow MacroRead 'grep.mac' Return
  67.  
  68. *
  69. * ^f10 is a "Make" macro
  70. *
  71. *  This macro makes use of the /# option of QCP to replace the function of
  72. *  QMAKE by Jerry Houston.  It assumes that you have the definition:
  73. *
  74. *      ..2     make  $N
  75. *
  76. *  or similar in your QCP.DAT.  This causes QCP /2 to run your make program,
  77. *  with the assumption that you always keep a make file, with no extension,
  78. *  with the same root name as each source file you compile.
  79. *
  80. ^f10 MacroBegin Dos 'QCP /G- /2 ' CurrentFilename Return
  81.  
  82. *
  83. * EOF: QCONFIG.QCP *
  84. 
  85.