Home » Archimedes archive » Archimedes World » AW-1994-06-Disc2.adf » Disk2Jun94 » !AWJune94/Goodies/Zap/!Zap/3rdParty/UtilsHelp

!AWJune94/Goodies/Zap/!Zap/3rdParty/UtilsHelp

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Archimedes archive » Archimedes World » AW-1994-06-Disc2.adf » Disk2Jun94
Filename: !AWJune94/Goodies/Zap/!Zap/3rdParty/UtilsHelp
Read OK:
File size: 0F30 bytes
Load address: 0000
Exec address: 0000
File contents
This is the ReadMe file for ZapUtils 0.03

	� Paul Moore (04-Jan-1994)

This is a module providing a number of extra commands for Zap. It requires Zap
1.00 or later.

The distribution conditions of ZapUtils are the same as those for Zap, with
one exception; you do not need my permission to copy ZapUtils if you have
Dominic Symes' permission to copy Zap.  Thus, ZapUtils is freeware and those
wishing to distribute it on a cover disk need only contact Dom for
permission.

You should distribute ZapUtils in both source and executable form.


Installation
============

1. Check your version of Zap is >= 1.00 (in the Info box).
2. Copy the ZapUtils module into the !Zap directory.
3. Add the line
	RMLoad <Zap$Dir>.ZapUtils
   after the line
   	RMLoad <Zap$Dir>.ZapBasic
   in the !Zap.!Run file, if it is not already present.
4. Restart your copy of Zap.


The Commands
============

Note: All the word commands use a different definition of a "word" than the
one used by Zap's standard SLEFT and SRIGHT commands. Because of this, I
have supplied new commands BW and FW to replace the Zap defaults. If you
use this module, you may wish to amend your default Keys file to use the
FW and BW commands instead of SRIGHT and SLEFT.

For this module, a "word" is defined as any continuous set of letters,
numbers, or underscore characters. This matches an identifier in many
programming languages (notably C) and is fairly intuitive (to me, at least!)

In a future release of this module, I intend to add commands to alter the
set of characters which make up a "word".


WINLEFT n, WINRIGHT n, WINUP n, WINDOWN n
-----------------------------------------

These commands move the current Zap window on screen, by the amount specified
(in OS units). The intention is that a keymap could be used to temporarily make
the cursor keys move the window round, eg

     cA     &001     KEYMAP 5
     LEFT   &5018C   WINLEFT 40:KEYMAP 5
     RIGHT  &5018D   WINRIGHT 40:KEYMAP 5
     DOWN   &5018E   WINDOWN 40:KEYMAP 5
     UP     &5018F   WINUP 40:KEYMAP 5


FW, BW
------

Move the cursor forward and backward one word.


DELWORDLEFT, DELWORDRIGHT
-------------------------

Delete one word, to the left or to the right.


FILTERSEL "str"
---------------

This command takes the selected area of the current file, and feeds it to the
standard input of the command "str". The selection is replaced by the standard
output.

C-style redirection is used (ie, command <standard_in >standard_out), so only
filter programs written in languages using the Shared C Library are likely to
work.
Error messages are ignored.
<Wimp$ScrapDir> is used for temporary files (called Zap-In and Zap-Out).

As an example, to sort the selected area, use FILTERSEL "sort", assuming you
have a suitable sort program available.


SEARCHWORD n
------------

Search for the word at the cursor. The exact effect depends on the parameter n.

    n=0     Search to buffer
    n=+1    Search forward from the current cursor position (ie, next match)
    n=-1    Search backward from the current cursor position (ie, previous match)
    n=+2    Search forward from the start of the buffer (ie, first occurrence)
    n=-2    Search forward from the start of the buffer (ie, last occurrence)

All searches wrap at the end of the buffer, just like Zap's standard search routine
(because that's what we use!)


To Do
=====

Add commands to change the set of 'word characters'.
Filter selection to check return code.
Filter selection bug - "out of memory" message on error.
Ctrl-U n SEARCHWORD 2 to search for the nth occurrence.
Searchword may be confused by macros defined on letters.
Escape/Cancel handling when in window move mode (needs a new Zap service call).


Version History
===============

0.01
0.02

Unreleased development versions

0.03

First release version.
Word move, delete, search, window move, filter selection.
00000000  0a 54 68 69 73 20 69 73  20 74 68 65 20 52 65 61  |.This is the Rea|
00000010  64 4d 65 20 66 69 6c 65  20 66 6f 72 20 5a 61 70  |dMe file for Zap|
00000020  55 74 69 6c 73 20 30 2e  30 33 0a 0a 09 a9 20 50  |Utils 0.03.... P|
00000030  61 75 6c 20 4d 6f 6f 72  65 20 28 30 34 2d 4a 61  |aul Moore (04-Ja|
00000040  6e 2d 31 39 39 34 29 0a  0a 54 68 69 73 20 69 73  |n-1994)..This is|
00000050  20 61 20 6d 6f 64 75 6c  65 20 70 72 6f 76 69 64  | a module provid|
00000060  69 6e 67 20 61 20 6e 75  6d 62 65 72 20 6f 66 20  |ing a number of |
00000070  65 78 74 72 61 20 63 6f  6d 6d 61 6e 64 73 20 66  |extra commands f|
00000080  6f 72 20 5a 61 70 2e 20  49 74 20 72 65 71 75 69  |or Zap. It requi|
00000090  72 65 73 20 5a 61 70 0a  31 2e 30 30 20 6f 72 20  |res Zap.1.00 or |
000000a0  6c 61 74 65 72 2e 0a 0a  54 68 65 20 64 69 73 74  |later...The dist|
000000b0  72 69 62 75 74 69 6f 6e  20 63 6f 6e 64 69 74 69  |ribution conditi|
000000c0  6f 6e 73 20 6f 66 20 5a  61 70 55 74 69 6c 73 20  |ons of ZapUtils |
000000d0  61 72 65 20 74 68 65 20  73 61 6d 65 20 61 73 20  |are the same as |
000000e0  74 68 6f 73 65 20 66 6f  72 20 5a 61 70 2c 20 77  |those for Zap, w|
000000f0  69 74 68 0a 6f 6e 65 20  65 78 63 65 70 74 69 6f  |ith.one exceptio|
00000100  6e 3b 20 79 6f 75 20 64  6f 20 6e 6f 74 20 6e 65  |n; you do not ne|
00000110  65 64 20 6d 79 20 70 65  72 6d 69 73 73 69 6f 6e  |ed my permission|
00000120  20 74 6f 20 63 6f 70 79  20 5a 61 70 55 74 69 6c  | to copy ZapUtil|
00000130  73 20 69 66 20 79 6f 75  20 68 61 76 65 0a 44 6f  |s if you have.Do|
00000140  6d 69 6e 69 63 20 53 79  6d 65 73 27 20 70 65 72  |minic Symes' per|
00000150  6d 69 73 73 69 6f 6e 20  74 6f 20 63 6f 70 79 20  |mission to copy |
00000160  5a 61 70 2e 20 20 54 68  75 73 2c 20 5a 61 70 55  |Zap.  Thus, ZapU|
00000170  74 69 6c 73 20 69 73 20  66 72 65 65 77 61 72 65  |tils is freeware|
00000180  20 61 6e 64 20 74 68 6f  73 65 0a 77 69 73 68 69  | and those.wishi|
00000190  6e 67 20 74 6f 20 64 69  73 74 72 69 62 75 74 65  |ng to distribute|
000001a0  20 69 74 20 6f 6e 20 61  20 63 6f 76 65 72 20 64  | it on a cover d|
000001b0  69 73 6b 20 6e 65 65 64  20 6f 6e 6c 79 20 63 6f  |isk need only co|
000001c0  6e 74 61 63 74 20 44 6f  6d 20 66 6f 72 0a 70 65  |ntact Dom for.pe|
000001d0  72 6d 69 73 73 69 6f 6e  2e 0a 0a 59 6f 75 20 73  |rmission...You s|
000001e0  68 6f 75 6c 64 20 64 69  73 74 72 69 62 75 74 65  |hould distribute|
000001f0  20 5a 61 70 55 74 69 6c  73 20 69 6e 20 62 6f 74  | ZapUtils in bot|
00000200  68 20 73 6f 75 72 63 65  20 61 6e 64 20 65 78 65  |h source and exe|
00000210  63 75 74 61 62 6c 65 20  66 6f 72 6d 2e 0a 0a 0a  |cutable form....|
00000220  49 6e 73 74 61 6c 6c 61  74 69 6f 6e 0a 3d 3d 3d  |Installation.===|
00000230  3d 3d 3d 3d 3d 3d 3d 3d  3d 0a 0a 31 2e 20 43 68  |=========..1. Ch|
00000240  65 63 6b 20 79 6f 75 72  20 76 65 72 73 69 6f 6e  |eck your version|
00000250  20 6f 66 20 5a 61 70 20  69 73 20 3e 3d 20 31 2e  | of Zap is >= 1.|
00000260  30 30 20 28 69 6e 20 74  68 65 20 49 6e 66 6f 20  |00 (in the Info |
00000270  62 6f 78 29 2e 0a 32 2e  20 43 6f 70 79 20 74 68  |box)..2. Copy th|
00000280  65 20 5a 61 70 55 74 69  6c 73 20 6d 6f 64 75 6c  |e ZapUtils modul|
00000290  65 20 69 6e 74 6f 20 74  68 65 20 21 5a 61 70 20  |e into the !Zap |
000002a0  64 69 72 65 63 74 6f 72  79 2e 0a 33 2e 20 41 64  |directory..3. Ad|
000002b0  64 20 74 68 65 20 6c 69  6e 65 0a 09 52 4d 4c 6f  |d the line..RMLo|
000002c0  61 64 20 3c 5a 61 70 24  44 69 72 3e 2e 5a 61 70  |ad <Zap$Dir>.Zap|
000002d0  55 74 69 6c 73 0a 20 20  20 61 66 74 65 72 20 74  |Utils.   after t|
000002e0  68 65 20 6c 69 6e 65 0a  20 20 20 09 52 4d 4c 6f  |he line.   .RMLo|
000002f0  61 64 20 3c 5a 61 70 24  44 69 72 3e 2e 5a 61 70  |ad <Zap$Dir>.Zap|
00000300  42 61 73 69 63 0a 20 20  20 69 6e 20 74 68 65 20  |Basic.   in the |
00000310  21 5a 61 70 2e 21 52 75  6e 20 66 69 6c 65 2c 20  |!Zap.!Run file, |
00000320  69 66 20 69 74 20 69 73  20 6e 6f 74 20 61 6c 72  |if it is not alr|
00000330  65 61 64 79 20 70 72 65  73 65 6e 74 2e 0a 34 2e  |eady present..4.|
00000340  20 52 65 73 74 61 72 74  20 79 6f 75 72 20 63 6f  | Restart your co|
00000350  70 79 20 6f 66 20 5a 61  70 2e 0a 0a 0a 54 68 65  |py of Zap....The|
00000360  20 43 6f 6d 6d 61 6e 64  73 0a 3d 3d 3d 3d 3d 3d  | Commands.======|
00000370  3d 3d 3d 3d 3d 3d 0a 0a  4e 6f 74 65 3a 20 41 6c  |======..Note: Al|
00000380  6c 20 74 68 65 20 77 6f  72 64 20 63 6f 6d 6d 61  |l the word comma|
00000390  6e 64 73 20 75 73 65 20  61 20 64 69 66 66 65 72  |nds use a differ|
000003a0  65 6e 74 20 64 65 66 69  6e 69 74 69 6f 6e 20 6f  |ent definition o|
000003b0  66 20 61 20 22 77 6f 72  64 22 20 74 68 61 6e 20  |f a "word" than |
000003c0  74 68 65 0a 6f 6e 65 20  75 73 65 64 20 62 79 20  |the.one used by |
000003d0  5a 61 70 27 73 20 73 74  61 6e 64 61 72 64 20 53  |Zap's standard S|
000003e0  4c 45 46 54 20 61 6e 64  20 53 52 49 47 48 54 20  |LEFT and SRIGHT |
000003f0  63 6f 6d 6d 61 6e 64 73  2e 20 42 65 63 61 75 73  |commands. Becaus|
00000400  65 20 6f 66 20 74 68 69  73 2c 20 49 0a 68 61 76  |e of this, I.hav|
00000410  65 20 73 75 70 70 6c 69  65 64 20 6e 65 77 20 63  |e supplied new c|
00000420  6f 6d 6d 61 6e 64 73 20  42 57 20 61 6e 64 20 46  |ommands BW and F|
00000430  57 20 74 6f 20 72 65 70  6c 61 63 65 20 74 68 65  |W to replace the|
00000440  20 5a 61 70 20 64 65 66  61 75 6c 74 73 2e 20 49  | Zap defaults. I|
00000450  66 20 79 6f 75 0a 75 73  65 20 74 68 69 73 20 6d  |f you.use this m|
00000460  6f 64 75 6c 65 2c 20 79  6f 75 20 6d 61 79 20 77  |odule, you may w|
00000470  69 73 68 20 74 6f 20 61  6d 65 6e 64 20 79 6f 75  |ish to amend you|
00000480  72 20 64 65 66 61 75 6c  74 20 4b 65 79 73 20 66  |r default Keys f|
00000490  69 6c 65 20 74 6f 20 75  73 65 20 74 68 65 0a 46  |ile to use the.F|
000004a0  57 20 61 6e 64 20 42 57  20 63 6f 6d 6d 61 6e 64  |W and BW command|
000004b0  73 20 69 6e 73 74 65 61  64 20 6f 66 20 53 52 49  |s instead of SRI|
000004c0  47 48 54 20 61 6e 64 20  53 4c 45 46 54 2e 0a 0a  |GHT and SLEFT...|
000004d0  46 6f 72 20 74 68 69 73  20 6d 6f 64 75 6c 65 2c  |For this module,|
000004e0  20 61 20 22 77 6f 72 64  22 20 69 73 20 64 65 66  | a "word" is def|
000004f0  69 6e 65 64 20 61 73 20  61 6e 79 20 63 6f 6e 74  |ined as any cont|
00000500  69 6e 75 6f 75 73 20 73  65 74 20 6f 66 20 6c 65  |inuous set of le|
00000510  74 74 65 72 73 2c 0a 6e  75 6d 62 65 72 73 2c 20  |tters,.numbers, |
00000520  6f 72 20 75 6e 64 65 72  73 63 6f 72 65 20 63 68  |or underscore ch|
00000530  61 72 61 63 74 65 72 73  2e 20 54 68 69 73 20 6d  |aracters. This m|
00000540  61 74 63 68 65 73 20 61  6e 20 69 64 65 6e 74 69  |atches an identi|
00000550  66 69 65 72 20 69 6e 20  6d 61 6e 79 0a 70 72 6f  |fier in many.pro|
00000560  67 72 61 6d 6d 69 6e 67  20 6c 61 6e 67 75 61 67  |gramming languag|
00000570  65 73 20 28 6e 6f 74 61  62 6c 79 20 43 29 20 61  |es (notably C) a|
00000580  6e 64 20 69 73 20 66 61  69 72 6c 79 20 69 6e 74  |nd is fairly int|
00000590  75 69 74 69 76 65 20 28  74 6f 20 6d 65 2c 20 61  |uitive (to me, a|
000005a0  74 20 6c 65 61 73 74 21  29 0a 0a 49 6e 20 61 20  |t least!)..In a |
000005b0  66 75 74 75 72 65 20 72  65 6c 65 61 73 65 20 6f  |future release o|
000005c0  66 20 74 68 69 73 20 6d  6f 64 75 6c 65 2c 20 49  |f this module, I|
000005d0  20 69 6e 74 65 6e 64 20  74 6f 20 61 64 64 20 63  | intend to add c|
000005e0  6f 6d 6d 61 6e 64 73 20  74 6f 20 61 6c 74 65 72  |ommands to alter|
000005f0  20 74 68 65 0a 73 65 74  20 6f 66 20 63 68 61 72  | the.set of char|
00000600  61 63 74 65 72 73 20 77  68 69 63 68 20 6d 61 6b  |acters which mak|
00000610  65 20 75 70 20 61 20 22  77 6f 72 64 22 2e 0a 0a  |e up a "word"...|
00000620  0a 57 49 4e 4c 45 46 54  20 6e 2c 20 57 49 4e 52  |.WINLEFT n, WINR|
00000630  49 47 48 54 20 6e 2c 20  57 49 4e 55 50 20 6e 2c  |IGHT n, WINUP n,|
00000640  20 57 49 4e 44 4f 57 4e  20 6e 0a 2d 2d 2d 2d 2d  | WINDOWN n.-----|
00000650  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00000670  2d 2d 2d 2d 0a 0a 54 68  65 73 65 20 63 6f 6d 6d  |----..These comm|
00000680  61 6e 64 73 20 6d 6f 76  65 20 74 68 65 20 63 75  |ands move the cu|
00000690  72 72 65 6e 74 20 5a 61  70 20 77 69 6e 64 6f 77  |rrent Zap window|
000006a0  20 6f 6e 20 73 63 72 65  65 6e 2c 20 62 79 20 74  | on screen, by t|
000006b0  68 65 20 61 6d 6f 75 6e  74 20 73 70 65 63 69 66  |he amount specif|
000006c0  69 65 64 0a 28 69 6e 20  4f 53 20 75 6e 69 74 73  |ied.(in OS units|
000006d0  29 2e 20 54 68 65 20 69  6e 74 65 6e 74 69 6f 6e  |). The intention|
000006e0  20 69 73 20 74 68 61 74  20 61 20 6b 65 79 6d 61  | is that a keyma|
000006f0  70 20 63 6f 75 6c 64 20  62 65 20 75 73 65 64 20  |p could be used |
00000700  74 6f 20 74 65 6d 70 6f  72 61 72 69 6c 79 20 6d  |to temporarily m|
00000710  61 6b 65 0a 74 68 65 20  63 75 72 73 6f 72 20 6b  |ake.the cursor k|
00000720  65 79 73 20 6d 6f 76 65  20 74 68 65 20 77 69 6e  |eys move the win|
00000730  64 6f 77 20 72 6f 75 6e  64 2c 20 65 67 0a 0a 20  |dow round, eg.. |
00000740  20 20 20 20 63 41 20 20  20 20 20 26 30 30 31 20  |    cA     &001 |
00000750  20 20 20 20 4b 45 59 4d  41 50 20 35 0a 20 20 20  |    KEYMAP 5.   |
00000760  20 20 4c 45 46 54 20 20  20 26 35 30 31 38 43 20  |  LEFT   &5018C |
00000770  20 20 57 49 4e 4c 45 46  54 20 34 30 3a 4b 45 59  |  WINLEFT 40:KEY|
00000780  4d 41 50 20 35 0a 20 20  20 20 20 52 49 47 48 54  |MAP 5.     RIGHT|
00000790  20 20 26 35 30 31 38 44  20 20 20 57 49 4e 52 49  |  &5018D   WINRI|
000007a0  47 48 54 20 34 30 3a 4b  45 59 4d 41 50 20 35 0a  |GHT 40:KEYMAP 5.|
000007b0  20 20 20 20 20 44 4f 57  4e 20 20 20 26 35 30 31  |     DOWN   &501|
000007c0  38 45 20 20 20 57 49 4e  44 4f 57 4e 20 34 30 3a  |8E   WINDOWN 40:|
000007d0  4b 45 59 4d 41 50 20 35  0a 20 20 20 20 20 55 50  |KEYMAP 5.     UP|
000007e0  20 20 20 20 20 26 35 30  31 38 46 20 20 20 57 49  |     &5018F   WI|
000007f0  4e 55 50 20 34 30 3a 4b  45 59 4d 41 50 20 35 0a  |NUP 40:KEYMAP 5.|
00000800  0a 0a 46 57 2c 20 42 57  0a 2d 2d 2d 2d 2d 2d 0a  |..FW, BW.------.|
00000810  0a 4d 6f 76 65 20 74 68  65 20 63 75 72 73 6f 72  |.Move the cursor|
00000820  20 66 6f 72 77 61 72 64  20 61 6e 64 20 62 61 63  | forward and bac|
00000830  6b 77 61 72 64 20 6f 6e  65 20 77 6f 72 64 2e 0a  |kward one word..|
00000840  0a 0a 44 45 4c 57 4f 52  44 4c 45 46 54 2c 20 44  |..DELWORDLEFT, D|
00000850  45 4c 57 4f 52 44 52 49  47 48 54 0a 2d 2d 2d 2d  |ELWORDRIGHT.----|
00000860  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
00000870  2d 2d 2d 2d 2d 0a 0a 44  65 6c 65 74 65 20 6f 6e  |-----..Delete on|
00000880  65 20 77 6f 72 64 2c 20  74 6f 20 74 68 65 20 6c  |e word, to the l|
00000890  65 66 74 20 6f 72 20 74  6f 20 74 68 65 20 72 69  |eft or to the ri|
000008a0  67 68 74 2e 0a 0a 0a 46  49 4c 54 45 52 53 45 4c  |ght....FILTERSEL|
000008b0  20 22 73 74 72 22 0a 2d  2d 2d 2d 2d 2d 2d 2d 2d  | "str".---------|
000008c0  2d 2d 2d 2d 2d 2d 0a 0a  54 68 69 73 20 63 6f 6d  |------..This com|
000008d0  6d 61 6e 64 20 74 61 6b  65 73 20 74 68 65 20 73  |mand takes the s|
000008e0  65 6c 65 63 74 65 64 20  61 72 65 61 20 6f 66 20  |elected area of |
000008f0  74 68 65 20 63 75 72 72  65 6e 74 20 66 69 6c 65  |the current file|
00000900  2c 20 61 6e 64 20 66 65  65 64 73 20 69 74 20 74  |, and feeds it t|
00000910  6f 20 74 68 65 0a 73 74  61 6e 64 61 72 64 20 69  |o the.standard i|
00000920  6e 70 75 74 20 6f 66 20  74 68 65 20 63 6f 6d 6d  |nput of the comm|
00000930  61 6e 64 20 22 73 74 72  22 2e 20 54 68 65 20 73  |and "str". The s|
00000940  65 6c 65 63 74 69 6f 6e  20 69 73 20 72 65 70 6c  |election is repl|
00000950  61 63 65 64 20 62 79 20  74 68 65 20 73 74 61 6e  |aced by the stan|
00000960  64 61 72 64 0a 6f 75 74  70 75 74 2e 0a 0a 43 2d  |dard.output...C-|
00000970  73 74 79 6c 65 20 72 65  64 69 72 65 63 74 69 6f  |style redirectio|
00000980  6e 20 69 73 20 75 73 65  64 20 28 69 65 2c 20 63  |n is used (ie, c|
00000990  6f 6d 6d 61 6e 64 20 3c  73 74 61 6e 64 61 72 64  |ommand <standard|
000009a0  5f 69 6e 20 3e 73 74 61  6e 64 61 72 64 5f 6f 75  |_in >standard_ou|
000009b0  74 29 2c 20 73 6f 20 6f  6e 6c 79 0a 66 69 6c 74  |t), so only.filt|
000009c0  65 72 20 70 72 6f 67 72  61 6d 73 20 77 72 69 74  |er programs writ|
000009d0  74 65 6e 20 69 6e 20 6c  61 6e 67 75 61 67 65 73  |ten in languages|
000009e0  20 75 73 69 6e 67 20 74  68 65 20 53 68 61 72 65  | using the Share|
000009f0  64 20 43 20 4c 69 62 72  61 72 79 20 61 72 65 20  |d C Library are |
00000a00  6c 69 6b 65 6c 79 20 74  6f 0a 77 6f 72 6b 2e 0a  |likely to.work..|
00000a10  45 72 72 6f 72 20 6d 65  73 73 61 67 65 73 20 61  |Error messages a|
00000a20  72 65 20 69 67 6e 6f 72  65 64 2e 0a 3c 57 69 6d  |re ignored..<Wim|
00000a30  70 24 53 63 72 61 70 44  69 72 3e 20 69 73 20 75  |p$ScrapDir> is u|
00000a40  73 65 64 20 66 6f 72 20  74 65 6d 70 6f 72 61 72  |sed for temporar|
00000a50  79 20 66 69 6c 65 73 20  28 63 61 6c 6c 65 64 20  |y files (called |
00000a60  5a 61 70 2d 49 6e 20 61  6e 64 20 5a 61 70 2d 4f  |Zap-In and Zap-O|
00000a70  75 74 29 2e 0a 0a 41 73  20 61 6e 20 65 78 61 6d  |ut)...As an exam|
00000a80  70 6c 65 2c 20 74 6f 20  73 6f 72 74 20 74 68 65  |ple, to sort the|
00000a90  20 73 65 6c 65 63 74 65  64 20 61 72 65 61 2c 20  | selected area, |
00000aa0  75 73 65 20 46 49 4c 54  45 52 53 45 4c 20 22 73  |use FILTERSEL "s|
00000ab0  6f 72 74 22 2c 20 61 73  73 75 6d 69 6e 67 20 79  |ort", assuming y|
00000ac0  6f 75 0a 68 61 76 65 20  61 20 73 75 69 74 61 62  |ou.have a suitab|
00000ad0  6c 65 20 73 6f 72 74 20  70 72 6f 67 72 61 6d 20  |le sort program |
00000ae0  61 76 61 69 6c 61 62 6c  65 2e 0a 0a 0a 53 45 41  |available....SEA|
00000af0  52 43 48 57 4f 52 44 20  6e 0a 2d 2d 2d 2d 2d 2d  |RCHWORD n.------|
00000b00  2d 2d 2d 2d 2d 2d 0a 0a  53 65 61 72 63 68 20 66  |------..Search f|
00000b10  6f 72 20 74 68 65 20 77  6f 72 64 20 61 74 20 74  |or the word at t|
00000b20  68 65 20 63 75 72 73 6f  72 2e 20 54 68 65 20 65  |he cursor. The e|
00000b30  78 61 63 74 20 65 66 66  65 63 74 20 64 65 70 65  |xact effect depe|
00000b40  6e 64 73 20 6f 6e 20 74  68 65 20 70 61 72 61 6d  |nds on the param|
00000b50  65 74 65 72 20 6e 2e 0a  0a 20 20 20 20 6e 3d 30  |eter n...    n=0|
00000b60  20 20 20 20 20 53 65 61  72 63 68 20 74 6f 20 62  |     Search to b|
00000b70  75 66 66 65 72 0a 20 20  20 20 6e 3d 2b 31 20 20  |uffer.    n=+1  |
00000b80  20 20 53 65 61 72 63 68  20 66 6f 72 77 61 72 64  |  Search forward|
00000b90  20 66 72 6f 6d 20 74 68  65 20 63 75 72 72 65 6e  | from the curren|
00000ba0  74 20 63 75 72 73 6f 72  20 70 6f 73 69 74 69 6f  |t cursor positio|
00000bb0  6e 20 28 69 65 2c 20 6e  65 78 74 20 6d 61 74 63  |n (ie, next matc|
00000bc0  68 29 0a 20 20 20 20 6e  3d 2d 31 20 20 20 20 53  |h).    n=-1    S|
00000bd0  65 61 72 63 68 20 62 61  63 6b 77 61 72 64 20 66  |earch backward f|
00000be0  72 6f 6d 20 74 68 65 20  63 75 72 72 65 6e 74 20  |rom the current |
00000bf0  63 75 72 73 6f 72 20 70  6f 73 69 74 69 6f 6e 20  |cursor position |
00000c00  28 69 65 2c 20 70 72 65  76 69 6f 75 73 20 6d 61  |(ie, previous ma|
00000c10  74 63 68 29 0a 20 20 20  20 6e 3d 2b 32 20 20 20  |tch).    n=+2   |
00000c20  20 53 65 61 72 63 68 20  66 6f 72 77 61 72 64 20  | Search forward |
00000c30  66 72 6f 6d 20 74 68 65  20 73 74 61 72 74 20 6f  |from the start o|
00000c40  66 20 74 68 65 20 62 75  66 66 65 72 20 28 69 65  |f the buffer (ie|
00000c50  2c 20 66 69 72 73 74 20  6f 63 63 75 72 72 65 6e  |, first occurren|
00000c60  63 65 29 0a 20 20 20 20  6e 3d 2d 32 20 20 20 20  |ce).    n=-2    |
00000c70  53 65 61 72 63 68 20 66  6f 72 77 61 72 64 20 66  |Search forward f|
00000c80  72 6f 6d 20 74 68 65 20  73 74 61 72 74 20 6f 66  |rom the start of|
00000c90  20 74 68 65 20 62 75 66  66 65 72 20 28 69 65 2c  | the buffer (ie,|
00000ca0  20 6c 61 73 74 20 6f 63  63 75 72 72 65 6e 63 65  | last occurrence|
00000cb0  29 0a 0a 41 6c 6c 20 73  65 61 72 63 68 65 73 20  |)..All searches |
00000cc0  77 72 61 70 20 61 74 20  74 68 65 20 65 6e 64 20  |wrap at the end |
00000cd0  6f 66 20 74 68 65 20 62  75 66 66 65 72 2c 20 6a  |of the buffer, j|
00000ce0  75 73 74 20 6c 69 6b 65  20 5a 61 70 27 73 20 73  |ust like Zap's s|
00000cf0  74 61 6e 64 61 72 64 20  73 65 61 72 63 68 20 72  |tandard search r|
00000d00  6f 75 74 69 6e 65 0a 28  62 65 63 61 75 73 65 20  |outine.(because |
00000d10  74 68 61 74 27 73 20 77  68 61 74 20 77 65 20 75  |that's what we u|
00000d20  73 65 21 29 0a 0a 0a 54  6f 20 44 6f 0a 3d 3d 3d  |se!)...To Do.===|
00000d30  3d 3d 0a 0a 41 64 64 20  63 6f 6d 6d 61 6e 64 73  |==..Add commands|
00000d40  20 74 6f 20 63 68 61 6e  67 65 20 74 68 65 20 73  | to change the s|
00000d50  65 74 20 6f 66 20 27 77  6f 72 64 20 63 68 61 72  |et of 'word char|
00000d60  61 63 74 65 72 73 27 2e  0a 46 69 6c 74 65 72 20  |acters'..Filter |
00000d70  73 65 6c 65 63 74 69 6f  6e 20 74 6f 20 63 68 65  |selection to che|
00000d80  63 6b 20 72 65 74 75 72  6e 20 63 6f 64 65 2e 0a  |ck return code..|
00000d90  46 69 6c 74 65 72 20 73  65 6c 65 63 74 69 6f 6e  |Filter selection|
00000da0  20 62 75 67 20 2d 20 22  6f 75 74 20 6f 66 20 6d  | bug - "out of m|
00000db0  65 6d 6f 72 79 22 20 6d  65 73 73 61 67 65 20 6f  |emory" message o|
00000dc0  6e 20 65 72 72 6f 72 2e  0a 43 74 72 6c 2d 55 20  |n error..Ctrl-U |
00000dd0  6e 20 53 45 41 52 43 48  57 4f 52 44 20 32 20 74  |n SEARCHWORD 2 t|
00000de0  6f 20 73 65 61 72 63 68  20 66 6f 72 20 74 68 65  |o search for the|
00000df0  20 6e 74 68 20 6f 63 63  75 72 72 65 6e 63 65 2e  | nth occurrence.|
00000e00  0a 53 65 61 72 63 68 77  6f 72 64 20 6d 61 79 20  |.Searchword may |
00000e10  62 65 20 63 6f 6e 66 75  73 65 64 20 62 79 20 6d  |be confused by m|
00000e20  61 63 72 6f 73 20 64 65  66 69 6e 65 64 20 6f 6e  |acros defined on|
00000e30  20 6c 65 74 74 65 72 73  2e 0a 45 73 63 61 70 65  | letters..Escape|
00000e40  2f 43 61 6e 63 65 6c 20  68 61 6e 64 6c 69 6e 67  |/Cancel handling|
00000e50  20 77 68 65 6e 20 69 6e  20 77 69 6e 64 6f 77 20  | when in window |
00000e60  6d 6f 76 65 20 6d 6f 64  65 20 28 6e 65 65 64 73  |move mode (needs|
00000e70  20 61 20 6e 65 77 20 5a  61 70 20 73 65 72 76 69  | a new Zap servi|
00000e80  63 65 20 63 61 6c 6c 29  2e 0a 0a 0a 56 65 72 73  |ce call)....Vers|
00000e90  69 6f 6e 20 48 69 73 74  6f 72 79 0a 3d 3d 3d 3d  |ion History.====|
00000ea0  3d 3d 3d 3d 3d 3d 3d 3d  3d 3d 3d 0a 0a 30 2e 30  |===========..0.0|
00000eb0  31 0a 30 2e 30 32 0a 0a  55 6e 72 65 6c 65 61 73  |1.0.02..Unreleas|
00000ec0  65 64 20 64 65 76 65 6c  6f 70 6d 65 6e 74 20 76  |ed development v|
00000ed0  65 72 73 69 6f 6e 73 0a  0a 30 2e 30 33 0a 0a 46  |ersions..0.03..F|
00000ee0  69 72 73 74 20 72 65 6c  65 61 73 65 20 76 65 72  |irst release ver|
00000ef0  73 69 6f 6e 2e 0a 57 6f  72 64 20 6d 6f 76 65 2c  |sion..Word move,|
00000f00  20 64 65 6c 65 74 65 2c  20 73 65 61 72 63 68 2c  | delete, search,|
00000f10  20 77 69 6e 64 6f 77 20  6d 6f 76 65 2c 20 66 69  | window move, fi|
00000f20  6c 74 65 72 20 73 65 6c  65 63 74 69 6f 6e 2e 0a  |lter selection..|
00000f30