home *** CD-ROM | disk | FTP | other *** search
/ Amiga Elysian Archive / AmigaElysianArchive.iso / prog / c / ue2sas10.lha / ue2sas10.doc < prev   
Text File  |  1993-02-21  |  8KB  |  139 lines

  1. UE2SAS version 1.0
  2.  
  3. Compile C source code directly from the UEdit text editor. Step through any
  4. reported errors and have the error lines in the source appear inverted. The
  5. related error message will appear in a split window. Run this utility from the
  6. defined keys or with the mouse from customized screen gadgets. Also contains
  7. key definitions for loading macro sequences onto the keys of the numeric
  8. keypad.
  9.     The included script contains special key definitions that can be added to
  10. a UEdit configuration. Instructions for adding the definitions are given below.
  11.                         
  12.                         What the commands do:
  13.  
  14. ShiftAltControl-j: Changes the screen gadgets so that they will run my
  15. compile keys. Just press this same combination to toggle back and forth
  16. between my screen gadget functions and the default UEdit ones. The other
  17. key definitions will work whether one has the screen gadgets on or off.
  18. Having the gadgets just adds the option of mouse control.
  19.  
  20. ShiftAlt-j or gadget 1: Run this key to compile the source code in the
  21. current file. A split window will appear. If the results returned by DOS
  22. include no compile errors, the window will reveal whatever message comes from
  23. DOS. If the compile has been successful, the split window will just show the
  24. message "SAS C 6.1.",etc. If the DOS result has at least six lines of text,
  25. my script assumes that it has compiler error results and it runs the key
  26. ShiftAlt-k once.
  27.  
  28. ShiftAlt-k or gadget 2: Hilites the appropriate error line in the source
  29. window and shows the correct error message in the split window. If all of
  30. the error messages have been shown, then the last source error line remains
  31. hilited and the message "last error message" appears in the split window.If
  32. you are using a compiler other than SAS C version 6, see below for changes
  33. that can be made that will allow my key definitions to work with the output
  34. of other programs.
  35.  
  36. ShiftAlt-l or gadget 3: Removes the split window and the inverted region and
  37. returns to editing the source file.
  38.  
  39. ShiftAlt-; : That's shift-alt-semicolon. This prompts the user to input a
  40. different compile command, the default is 'sc:c/sc'. If this key is used
  41. and nothing is entered, the default will be used. Even if one is using SAS
  42. C, one might wish to enter just 'sc' as the command if the compiler has
  43. been made resident, for example. I wanted to put this key on gadget 4, but
  44. I couldn't find a way to mask the mouse button from ending primitive mode.
  45. Oh, well.
  46. l
  47. ShiftControl-keypad (: No that's not a smiley face. It refers to the open
  48. parenthesis on the top row of the numeric keypad. Saves the current learn
  49. sequence to T: as uLearn.1.
  50.  
  51. ShiftAlt-keypad (: Loads and runs the learn sequence T:uLearn.1. This key and
  52. the previous one are specimens of eight keys that all do similar things.
  53. They allow one to load learn sequences onto the top four keys of the
  54. numeric keypad { (,),/and * } and replay them as macros. I missed this
  55. feature from the Lattice Screen Editor (now 'se').  One might expand on the
  56. UEdit code that I've provided to give one the ability to load macros onto
  57. more of the keypad keys, or other keys.
  58.  
  59.                         Adding the new features to UEdit:
  60.  
  61. Run UEdit and open the included Config!J file. Place the cursor at the top of the
  62. file. Press function key F6 repeatedly until the cursor reaches the
  63. bottom of the file. The new features are now available, but your configuration
  64. on disk is unchanged. If you wish to add the new features to your setup,
  65. then select the 'Data File/Save Data' menu item from the Buffers menu.
  66. UEdit will prompt you to enter the name of the Data! file. If you just
  67. press Escape, the default name of S:Data! will be used.
  68.  
  69.                         UEdit resources used:
  70.                         
  71. A look at the 'defines' section of Config!J should tell most of the story.
  72. Besides using ShiftAlt jkl and ;, I used ShiftControl jk and l to store
  73. the contents of the screen gadgets while they are being used for my
  74. functions. If any of the keys, variables, or buffers I've used are in
  75. conflict with ones being used by your current UEdit setup, just modify the
  76. contents of Config!J and recompile. That's the beauty of UEdit.  If you
  77. compile my keypad learn sequence keys at the end of Config!J, they occupy
  78. ShiftControl (,),/, and * at the top of the keypad, plus the same keys,
  79. only modified with ShiftAlt.
  80.  
  81.                         Using these features with other compilers:
  82.                         
  83. It should be possible to modify Config!J to work with the output of other
  84. compilers, as long as the error line is given with the error message.  If
  85. you are using Lattice C 5.04. the first line of the ShiftAlt-k definition
  86. should be changed to 'setSearch("line")' and the number of subsequent
  87. occurrances of the line 'incLoc(DOS_RESULT,locA)' should be changed. Each
  88. time that incLoc is issued, it's like moving the cursor to the right by one
  89. space. In the error message, count how many characters there are from the
  90. start of the search word in the error message to the first numeral of the
  91. line number.  This will tell you the number of times incLoc should be
  92. repeated to place the cursor on the line number. The code following this
  93. converts the numeric char into an integer used to place the cursor on the
  94. proper line of your source code.
  95.     I tried to get my keys going with the shareware version of DICE, but
  96. it won't send all of the error messages to UEdit that it sends when run
  97. from a shell a Shell window. Perhaps it has something to do with the
  98. difference between STDOUT and STDERR on the Amiga. Who knows? If anyone
  99. gets it going, let me know.
  100.  
  101.                         Limitations:
  102.  
  103. There is a problem with this version when split windows exist at the time of
  104. the compile.  Maybe I'll get that ironed out in a subsequent version...if
  105. there are any.
  106.  
  107.                         The story:
  108.                         
  109. Aren't you really GLAD that I saved the personal details until the end,
  110. unlike SOME documentation authors? Pat Ryan of East Braintree, Massachusetts
  111. is the world's premier UEdit evangelist. He's eager to tell you all about it
  112. even if you're left wondering afterward, "What is an Omega?" So when I
  113. decided to make a break away from LSE I made the move to UEdit. When some of
  114. the details of SAS 6 revealed that it would offer a way to send compile
  115. errors to ARexx capable text editors via the Scmsg facility, Pat was all
  116. excited about applying this technique to UEdit. He and I are both interested
  117. in programming, although we're mainly just duffers. Since I've been starting
  118. to learn some ARexx, and with the prospect of Pat's help if I got bogged
  119. down I set about interfacing UEdit with Scmsg. Well, you may have noticed
  120. that there is no mention of ARexx anywhere in my docs or source. Scmsg
  121. refuses to be invoked if the compiler is run from UEdit. I tried all kinds
  122. of dodges: run, runback, even NewShell from fromfile. No soap. I was getting
  123. set to call SAS technical support when it dawned on me...DUH! I could run
  124. the compile from UEdit and get the console output in a buffer. I already had
  125. all of the error lines in my grasp.  To Hell with Scmsg (sorry SAS).
  126.     Please let me know if you have any suggestions, comments...or Praise!
  127.  
  128.  
  129. Uploader:                 Joel B. Couch                               
  130.                           Boston Computer Society Amiga Users' Group  
  131.                           One Kendall Square                          
  132.                           Cambridge, MA 02139                         
  133.                                                                       
  134.                           jbciii@world.std.com
  135.                           
  136.                           Meager Creations
  137.  
  138.                                                
  139.