home *** CD-ROM | disk | FTP | other *** search
/ Merciful 1 / Merciful - Disc 1.iso / software / r / rexx_plus_compiler / rexxpluscompiler2.dms / in.adf / Examples / ttx / RxPCompile.ttx < prev    next >
Encoding:
Text File  |  1991-11-01  |  1.6 KB  |  67 lines

  1. /*******************************************************/
  2. /* rxpcompile.ttx - TurboText macro to interface with    */
  3. /* the RexxPlus compiler.  You may desire to change the*/
  4. /* default paths to something appropriate to your     */
  5. /* system.  You may also wish to change the default    */
  6. /* compiler options I use to something else.            */
  7. /*                                            */
  8. /* Steven D. Kapplin - 9/9/91                        */
  9. /*******************************************************/
  10.  
  11. TRACE OFF
  12.  
  13. OPTIONS RESULTS
  14. PARSE ARG parm
  15. outputpath = 'VD0:'
  16. execpath = 'RPDir:'
  17.  
  18. defaultopts = '+br +bs +ec +eh -v +l'
  19.  
  20. RequestStr PROMPT "Options?" defaultopts
  21. IF RC = 5 THEN EXIT
  22.  
  23. opts = compress(RESULT,'"')
  24.  
  25. RESULTS = ''
  26. GetFilePath
  27.  
  28. filename = compress(RESULT,'" ')
  29.  
  30. GetFileInfo
  31. PARSE VAR RESULT lines status fname
  32. fname = compress(fname,'" ')
  33.  
  34. SetStatusBar "Compiling "fname "... "
  35.  
  36. address COMMAND 'RexxPlus +fi' filename '+fp ' outputpath ' +FE' outputpath||'errors' opts
  37.  
  38. IF RC = 0 & parm = 'C' THEN DO
  39.     SetStatusBar "Done"
  40.     EXIT
  41. END
  42.  
  43. IF RC = 0 & parm = 'X' THEN DO
  44.     SetStatusBar "Linking ... "
  45.     period = lastpos('.',fname)
  46.     fname = left(fname,period-1)
  47.     RequestFile PROMPT "OutputFile" PATTERN "#?" PATH execpath||fname
  48.     outname = RESULT
  49.     IF outname = '' THEN outname = execpath||fname
  50.     ADDRESS COMMAND 'NewWsh "con:75/160/540/150/BLinking File: 'fname'/c" CMD' 'BLink' outputpath||fname||'.rexx.obj to ' outname ' lib lib: smallcode'
  51.      SetStatusBar "Close CLI Window When Done"
  52.     EXIT
  53. END
  54.  
  55. BeepScreen
  56. CALL open(f,'vd0:errors','r')
  57. err = readln(f)
  58. fpos = seek(f,0,'c')
  59. CALL setclip('FilePos',fpos)
  60. CALL close(f)
  61.  
  62. PARSE VAR err code ':' line ':' col ':' errmsg
  63.  
  64. SetStatusBar errmsg
  65. Move line col
  66. CenterView TOGGLE
  67.