home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 5 / DATAFILE_PDCD5.iso / utilities / z / zapupdates / Wagenaar / DWExtHelp < prev    next >
Text File  |  1995-11-07  |  8KB  |  183 lines

  1. ZapDWExt - an extension to Zap, (c) 1994,1995 Daniel Wagenaar
  2. This text describes version 1.15
  3.  
  4. ZapDWExt does not provide any new modes.
  5.  
  6. ZapDWExt provides one *command: *Zap_Command. This command takes a filename
  7. and a colon-separated list of Zap commands for arguments. The file will be
  8. opened if necessary, the cursor will jump into it, and the commands will be
  9. executed.
  10.  
  11. It supports the following Zap commands:
  12.  
  13. BLOCKID        Blocks the identifier under the cursor. An
  14.         identifier is as defined by ANSI C, ie it starts with
  15.         a letter, and may contain numbers, letters, and the
  16.         underscore.
  17.  
  18. FIRSTBLOCK    Finds the first occurence in the file of the marked
  19.         block.
  20.         
  21. DEFBLOCK    Finds ‘.<block>’ or ‘DEF<block>’ for BASIC or
  22.         ‘<block>(’ for C.
  23.  
  24. FINDBLOCK    Open a throwback window containing all occurences of the
  25.         marked block.
  26.  
  27. FINDID        First do BLOCKID, then, if the mode is Basic, or the
  28.         mode is C and the first char after the block is '(',
  29.         do DEFBLOCK, else do FIRSTBLOCK. In this way, function
  30.         definitions may be found, and the first occurence of a
  31.         variable may be found in C mode.
  32.  
  33. BLOCKSTAR    Do ‘*TaskWindow "<block>" -quit’, where <block> is the
  34.         selected area.
  35.  
  36. STARCOM        Does ‘*TaskWindow "<arg>" -quit’. <arg> may be
  37.         included in the Keys file, or typed in a mini-buffer.
  38.  
  39. CC        Compiles a C program using ‘STARCOM "cc <filename>"’.
  40.         It opens a minibuffer in which the command line
  41.         options may be specified. The default options are read
  42.         from and written to the system variable Zap$CCOptions.
  43.         As explained below, a default value may be assigned in
  44.         Zap's !Run file. A sensible default could be:
  45.         ‘-IC: -throwback -Lc:o.stubs,c:o.risc_oslib -Desktop ^’
  46.  
  47. MAKE        Makes a project using ‘STARCOM "prefix <dirname> |M amu -f
  48.         <leafname>"’. Additional command line options may be
  49.         specified via the minibuffer. Default options are read
  50.         from and written to the system variable Zap$AmuOptions.
  51.  
  52. ANYCOMPILE    Does ‘MAKE’ or ‘CC’, whichever is appropriate: for project
  53.         files do MAKE; for C files do CC, unless the string
  54.         'Makefile: <name> [<target>]' occurs near the start of the
  55.         text. In that case, MAKE is done, but no options are asked.
  56.         If a line of the form:
  57.           xxx +-+ <command> +-+ xxx
  58.         or:
  59.           xxx +-+ <command>
  60.         is found, then the command is executed instead of any
  61.         default action. In the command, the sequences %f, %l, %d
  62.         may be used to represent, respectively, the full filename,
  63.         the leafname, or the parent directory name of the file.
  64.         Example:
  65.          /* +-+ cc -IC: -Lc:o.stubs -throwback -Desktop ^ %f +-+ */
  66.  
  67. OPENMAKE    Opens the makefile for this project, if the string
  68.         ‘Makefile: <name>’ is included in the start of the
  69.         file.
  70.  
  71. OPENREF        Opens a file referenced at the cursor, eg for
  72.         #include <fff.h>. Note that OPENREF takes care of
  73.         path element inversion, as in ‘fff.h’ => ‘h.fff’.
  74.  
  75. OPENCH        If the current file is named ‘...h.yyy’, opens
  76.         ‘...c.yyy’ and vice versa
  77.     
  78. OPENOTHER    Does either OPENREF, OPENMAKE or OPENCH, whichever is
  79.         most appropriate. OPENOTHER uses the path ‘ZapDWS:’ to
  80.         complete filenames. For example, if a reference is made
  81.         to ‘stdio.h’, then OPENOTHER/OPENREF will try to open
  82.         ‘ZapDWS:h.stdio’. (As always, element inversion is taken
  83.         care of.) To make this system work, a line defining
  84.         ZapDWS$Path must be included in Zap's !Run file. See
  85.         below.
  86.  
  87. CLOSETBTW    Closes all throwback and task windows.
  88.  
  89. MODBRK        Sets a breakpoint in a module, at the cursor address.
  90.         The module must be loaded into Zap using 
  91.         
  92.           Create.Get module.<modname>
  93.           
  94.         and the filename must have remained unchanged. You must
  95.         be careful when using this command, because the computer
  96.         may crash if you set a breakpoint in a piece of code that
  97.         is used in IRQ mode. So: don't set breakpoints in the
  98.         UtilityModule unless you know what your doing :-)
  99.         In fact, MODBRK only works if the module in question
  100.         is in RMA. For ROM-based modules, you'd have to do a
  101.         *RMFaster before using MODBRK. This command is mainly
  102.         intended to be of use while debugging.
  103.  
  104. LINEEND        Replaces all occurences of CRLF, CR, LF, LFCR by the
  105.         correct return character (as set in the ‘Display->
  106.         Misc->Return char->’ submenu). This is particularly
  107.         useful when you've copied a text file from an MS-DOS
  108.         system, which uses CRLF instead of plain LF.
  109.  
  110. CRLF        Exchanges CR <-> LF (Carriage returns with linefeeds).
  111.         This can be used to convert Mac style texts to Risc OS
  112.         style texts, or to convert spooled output (with LFCR)
  113.         to 'DOS style' text (CRLF) which can be converted to
  114.         ordinary Risc OS style texts by dragging them to the
  115.         Zap icon. This command has been written to replace
  116.         LINEEND where possible. It is *much* faster. CRLF can
  117.         not be undone using the UNDO command. It's action is
  118.         reversed by executing it again.
  119.         
  120. SETNAME        Sets the name of a file from an in-core filename.
  121.  
  122. REVERT        Reloads the current file from disc. This can be used in
  123.         two occasions: firstly if you have accidentally currupted
  124.         your work and don't feel like pressing ‘Full undo’ a
  125.         million times. Secondly if an external program (such as
  126.         amu) has changed your file and you want to edit the
  127.         new version.
  128.  
  129. GOTOLINE    Alternative for F5 (GOTO), using the minibuffer. Thus it can
  130.         be used through *Zap_Command. The (string) argument is either
  131.         a logical line number, or 'P' followed by a physical line
  132.         number. Example in Basic:
  133.         ON ERROR OSCLI "Zap_Command this.file GOTOLINE "+STR$ERL:END
  134.         Also very useful for TeX users who don't have throwback at
  135.         their disposal.
  136.         If the argument is ‘!’ or the empty string, the system
  137.         variable ‘DWExt$LineNo’ is substituted.
  138.  
  139. GOTOADDR    As GOTOLINE, but goes to an address. If the command opens a
  140.         minibuffer, an hexadecimal sign ('&') is typed in for you.
  141.         No system variable substitution is performed.
  142.  
  143. In addition to the Zap commands, there is a single *-command: *Zap_Command.
  144. This may be used to call Zap commands from an external task. Its syntax is:
  145. *Zap_Command <filename> <commands>. The file is loaded if it isn't already
  146. in memory. There may be more than one command, separated by colons as in the
  147. ‘Keys’ file. See the example under GOTOLINE.
  148. Note that this command is currently in beta-release. It doesn't seem to do
  149. terrible things, but sometimes the display update isn't very nice,
  150. particularly when called from a task window.
  151.  
  152. I hope these commands may be of use to other people.
  153. As I distribute ZapDWExt free of charge, I cannot take any
  154. responsibility for any damage caused by using or the inability to use
  155. it. In particular, I don't give any guarantee that it will leave your
  156. texts intact. That said, I believe I've tested it rather thoroughly,
  157. and to my knowledge, it is bug-free. There may be features, though :-)
  158. If you do encounter any bugs, or unexpected behaviour, or if you have
  159. any comments, please contact me:
  160.  
  161.         Daniel Wagenaar
  162. snail:  Van Eeghenlaan 10
  163.         1071 EL  Amsterdam
  164.         The Netherlands
  165. tel.:   +31-(20)-6795615
  166. e-mail: wagenaar@phys.uva.nl
  167.  
  168. Any feedback is highly welcome!
  169.  
  170. Finally...
  171.  
  172. ZapDWExt will only run under Risc OS 3, mainly because Risc OS 2 can't
  173. complete pathnames. If anybody urgently wants to run ZapDWExt under
  174. Risc OS 2, then I hope someone will have a replacement for OS_FSControl
  175. with r0=37, or else I may have to write something...
  176.  
  177. I agree that the documentation for ZapDWExt is rather terse. This is
  178. because it originally served only as a post-it note to myself, to
  179. enable me to remember the commands... Feel free to flame me about this
  180. attitude. On popular demand I'll write more extensive docs. Also, if
  181. you feel these commands lack universality, and have an idea to improve
  182. them, I'd be delighted...
  183.