Home » Archimedes archive » Archimedes World » AW-1994-06-Disc2.adf » Disk2Jun94 » !AWJune94/Goodies/Zap/!Zap/Docs/E-File
!AWJune94/Goodies/Zap/!Zap/Docs/E-File
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/Docs/E-File |
Read OK: | ✔ |
File size: | 25BD bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
************************************************************************* * >E-File Documents a file block format * ************************************************************************* By convention, file blocks are pointed to by R9. However, whenever a file is created, the file block pointers of the other files may change. Hence these pointers are not preserved across calls to Wimp_Poll. Thus they must be converted to file block 'offsets' (ie 0=first file,1=second etc) for storing as pointers or links. The calls Zap_ConvFileOff and Zap_GetFileOff can be used to do this. The number of valid file block offsets may be got by Zap_ReadVar. (Then valid offsets are 0 1 ... n-1) The length of a file block is not fixed and varies across versions of zap. Thus you must not assume a fixed length. If you must know the length then convert file offsets 0,1 to pointers and then subtract them. The offsets from the file block start are given names beginning with 'f_'. See the E-Library file for a list of the 'f_' names. You should use code of the form: LDR R0,[R9,#f_ptr] \ set R0 to start of file buffer. to read these variables. The files themselves are stored in SPLIT BUFFER format. This means that the file data is split in two, with a gap in the middle. The diagram below should illustrate this. ------------------------ f_ptr+f_bufl | top half of file | ------------------------ f_ptr+f_splite | file gap | ------------------------ f_ptr+f_splito | bottom half of file | ------------------------ f_ptr NB For all Zap data structures block_start=first byte of data, block_end= last byte of data+1, block_length=block_end-block_start. Note that f_ptr may change on any heap block claim, or file insert/delete. Thus all the other variables are stored as offsets from this. You should use the call Zap_SplitBuffer to change the buffer length or split position. You should use the call Zap_Command to insert/delete data. Inserting data manually and keeping all the variables/undo buffer/screen updated requires a lot of code if you want to do it yourself (the only exception to this is the e_postload/e_presave calls where it is quicker to manipulate the file directly). For most subs in Zap, a position in the file is given as an offset from the file start (in the range 0 to the length of the file). These file offsets should not be confused with the file block offsets described in the first paragraph. When I say 'file offset', it should be clear from the context what I mean. To read the byte at offset R0 you should use code of the form: REM R0=file offset R9=file REM On exit R1 corrupted and R0=byte read. LDR R1,[R9,#f_splito] \ find the split offset in the buffer CMP R0,R1 \ are we in the bottom or top half? LDRCS R1,[R9,#f_splits] ADDCS R0,R0,R1 \ if in the top half, skip the split LDR R1,[R9,#f_ptr] \ start address of file LDRB R0,[R1,R0] \ read the byte To read multiple bytes you should obviously use more efficient code! If you are doing a very intensive operation then you may want to coagulate the text via Zap_SplitBuffer. The file variables are detailed below. Use E-Library to set them up. f_ptr Address of file buffer/-1 if file is dead (has been deleted). If you scan through the file blocks, you should always check this word to check the file is not dead. f_bufl Length of file buffer (multiple of 4). See pic above. f_len Length of file stored in the buffer (=f_bufl-f_splits). f_name Pointer to name of the file. f_load Load address of the file. f_exec Execution address of the file. f_flags File flags. See E-Flags for the meaning of the bits in this word. f_uptr Pointer to the undo buffer. The undo buffer consists of a list of blocks of variable length. The start of a block is indicated by bit 31 of that word being set. In general the first word of the block has format: b31 =1 (Set to indicate block start). b30 Set if the command should be undone in one go. (as opposed to one character at a time for concatenated blocks). b29 Set if the data pointed to by the command need not be freed. (This is used on an undo when blocks are pointed to twice). b26-b28 Command number. As for R0 in Zap_Command with additions: 0 = fast undo pointer (fast redo if b30 set) 7 = startop pointer (stopop pointer if b30 set) b0-b27 Gives the commands first parameter, usually a file offset This corresponds to register R1 in Zap_Command. The other words correspond to registers R2 onwards when calling Zap_Command. f_ubufl Total length of the undo buffer. f_ulen Length of valid data in the undo buffer. f_undo Offset of the undo pointer in the undo buffer. f_undop Offset of the undo subpointer in the block pointer to by f_undo. Ie it gives the number of characters left to undo in the operation currently being undone. f_res3 reserved f_splito Offset in the file buffer of the current split position. See pic. f_splite Offset in the file buffer of the end of the current split. See pic. f_splits Size of the file split (=f_splite-f_splito). See pic. f_mptr Pointer to the marker buffer. The marker buffer is a list of entries, each two words longs of the format: #0 File offset of the mark #4 Window offset of the window mark was place in or -1 if the window has been deleted (or is unspecified). f_mbufl Length of the marker buffer. f_mlen Length of valid data in the marker buffer. f_mark Current offset in the marker buffer. f_docom Used by Zap_SaveTxtStatus: stores the current action (as for Zap_DoCommand bits 0-2) ie, 1=insert text 2=delete text 3/4=replacement of text. f_source This word is for the use of the mode 'owning' this file. See f_cmode. It usually points to a data block of info that mode wants to hold for this file. Current formats used are: f_cmode f_source meaning 0 (Text) Text mode owns external edit files and handles them. f_source points to the block: #0 External edit JOB handle (Zaps part of the job handle is the file block offset+1) #4 Task handle of client task #8 Flags passed by client when job started #12 Offset in window block of associated window. 1 (Byte) Byte mode owns 'read disc' files. f_source is the disc address the file was read from. 11 (Throwback) Task handle of task that sent throwback data. 12(Taskwindow) Taskwindow mode owns taskwindow files. f_source points to a block of the format: #0 Task handle of child task #4 Cursor x posn (chars) #8 Cursor y posn (chars) #12 Height of emulated screen (chars) #16 Text window min x (chars) #20 Text window min y (chars) #24 Text window max x (chars) #28 Text window max y (chars) #32 Number of bytes stored in the VDU queue. #36 12 byte buffer to store the VDU queue in. #48 Offset in window block of associated window. #52 Flags: b0 Set if task suspended b1 internal use #56 Line offset from work area start of emulated screen. w_bpl stores the width of the emulated screen. f_dolen Used by Zap_SaveTxtStatus: Stores the size of the data being inserted/ deleted/replaced. f_dodata Used by Zap_SaveTxtStatus: Stores the address of the data being inserted/ replaced. f_altered Used by Zap_DoCommand: First altered offset in file / -1 f_shiftable Used by Zap_DoCommand: First unaltered offset in file / -1 f_change Used by Zap_DoCommand: Signed change in size of data. f_depth Used by Zap_StartOp: Current StartOp/StopOp nested depth. f_links Links list buffer pointer. This is most used by 'throwback' though may have other uses. The idea is that this block stores references to offsets in other files. When these files are updated, the offsets are updated too so you can keep track of that point in the file. Use Zap_NewLinkEntry to add a new link. f_links points to a list of 16 byte blocks terminated by -1. The block format is #0 Pointer to file name of associated file (with match/error) (Eg this is the C source file corresponding to this throwback file). #4 Pointer to a list of search/error, offsets/line numbers. The list is terminated by -1. (These are the offsets to be updated when changes are made to the file with name #0 and file block offset in #8). #8 Offset of file (name given in #0) if already loaded into Zap. -1 if file has not been looked for. If the file is loaded then any changes to the file cause the list in #4 to be updated. #12 Flags: b0 Set if #4 points to line nums, not offsets. The line numbers are converted to offsets when throwback mode loads the file. b1-b7 reserved b8-b15 Number of lines heading each block. The format of the throwback buffer must be <file header para> <list of matches para> <next file header para> etc. This details the number of lines of heading/info that the <list of matches para> starts off with before listing the matches (at one match per line corresponding to the offsets pointed to by #4). b16-b23 Source: (for info purposes) 0=Search throwback (F7) 1=C Throwback (Eg !CC) 2=C Info (Eg !Find). b24-b31 reserved f_cmode This gives the mode number of the mode 'owning' this file (-1 if none). The mode is called when the file is deleted (eg a taskwindow). The mode may use the word f_source to store parameters about the file. (Eg f_source will usually be set by the extension mode to point to a data block). To claim the file, simply check that this word is -1 and then poke your mode number in. Use the entry point e_init with reason code 3 to free any data you have stored associated with this file (and pointed to by f_source). This mode is NOT necessarily the mode the file is displayed in.
00000000 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |****************| * 00000040 2a 2a 2a 2a 2a 2a 2a 2a 2a 0a 2a 20 3e 45 2d 46 |*********.* >E-F| 00000050 69 6c 65 09 44 6f 63 75 6d 65 6e 74 73 20 61 20 |ile.Documents a | 00000060 66 69 6c 65 20 62 6c 6f 63 6b 20 66 6f 72 6d 61 |file block forma| 00000070 74 09 09 09 09 2a 0a 2a 2a 2a 2a 2a 2a 2a 2a 2a |t....*.*********| 00000080 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |****************| * 000000c0 0a 0a 42 79 20 63 6f 6e 76 65 6e 74 69 6f 6e 2c |..By convention,| 000000d0 20 66 69 6c 65 20 62 6c 6f 63 6b 73 20 61 72 65 | file blocks are| 000000e0 20 70 6f 69 6e 74 65 64 20 74 6f 20 62 79 20 52 | pointed to by R| 000000f0 39 2e 20 48 6f 77 65 76 65 72 2c 20 77 68 65 6e |9. However, when| 00000100 65 76 65 72 20 61 20 66 69 6c 65 20 69 73 0a 63 |ever a file is.c| 00000110 72 65 61 74 65 64 2c 20 74 68 65 20 66 69 6c 65 |reated, the file| 00000120 20 62 6c 6f 63 6b 20 70 6f 69 6e 74 65 72 73 20 | block pointers | 00000130 6f 66 20 74 68 65 20 6f 74 68 65 72 20 66 69 6c |of the other fil| 00000140 65 73 20 6d 61 79 20 63 68 61 6e 67 65 2e 20 48 |es may change. H| 00000150 65 6e 63 65 20 74 68 65 73 65 0a 70 6f 69 6e 74 |ence these.point| 00000160 65 72 73 20 61 72 65 20 6e 6f 74 20 70 72 65 73 |ers are not pres| 00000170 65 72 76 65 64 20 61 63 72 6f 73 73 20 63 61 6c |erved across cal| 00000180 6c 73 20 74 6f 20 57 69 6d 70 5f 50 6f 6c 6c 2e |ls to Wimp_Poll.| 00000190 20 54 68 75 73 20 74 68 65 79 20 6d 75 73 74 20 | Thus they must | 000001a0 62 65 0a 63 6f 6e 76 65 72 74 65 64 20 74 6f 20 |be.converted to | 000001b0 66 69 6c 65 20 62 6c 6f 63 6b 20 27 6f 66 66 73 |file block 'offs| 000001c0 65 74 73 27 20 28 69 65 20 30 3d 66 69 72 73 74 |ets' (ie 0=first| 000001d0 20 66 69 6c 65 2c 31 3d 73 65 63 6f 6e 64 20 65 | file,1=second e| 000001e0 74 63 29 20 66 6f 72 20 73 74 6f 72 69 6e 67 0a |tc) for storing.| 000001f0 61 73 20 70 6f 69 6e 74 65 72 73 20 6f 72 20 6c |as pointers or l| 00000200 69 6e 6b 73 2e 20 54 68 65 20 63 61 6c 6c 73 20 |inks. The calls | 00000210 5a 61 70 5f 43 6f 6e 76 46 69 6c 65 4f 66 66 20 |Zap_ConvFileOff | 00000220 61 6e 64 20 5a 61 70 5f 47 65 74 46 69 6c 65 4f |and Zap_GetFileO| 00000230 66 66 20 63 61 6e 20 62 65 0a 75 73 65 64 20 74 |ff can be.used t| 00000240 6f 20 64 6f 20 74 68 69 73 2e 20 54 68 65 20 6e |o do this. The n| 00000250 75 6d 62 65 72 20 6f 66 20 76 61 6c 69 64 20 66 |umber of valid f| 00000260 69 6c 65 20 62 6c 6f 63 6b 20 6f 66 66 73 65 74 |ile block offset| 00000270 73 20 6d 61 79 20 62 65 20 67 6f 74 20 62 79 0a |s may be got by.| 00000280 5a 61 70 5f 52 65 61 64 56 61 72 2e 20 28 54 68 |Zap_ReadVar. (Th| 00000290 65 6e 20 76 61 6c 69 64 20 6f 66 66 73 65 74 73 |en valid offsets| 000002a0 20 61 72 65 20 30 20 31 20 2e 2e 2e 20 6e 2d 31 | are 0 1 ... n-1| 000002b0 29 0a 0a 54 68 65 20 6c 65 6e 67 74 68 20 6f 66 |)..The length of| 000002c0 20 61 20 66 69 6c 65 20 62 6c 6f 63 6b 20 69 73 | a file block is| 000002d0 20 6e 6f 74 20 66 69 78 65 64 20 61 6e 64 20 76 | not fixed and v| 000002e0 61 72 69 65 73 20 61 63 72 6f 73 73 20 76 65 72 |aries across ver| 000002f0 73 69 6f 6e 73 20 6f 66 20 7a 61 70 2e 0a 54 68 |sions of zap..Th| 00000300 75 73 20 79 6f 75 20 6d 75 73 74 20 6e 6f 74 20 |us you must not | 00000310 61 73 73 75 6d 65 20 61 20 66 69 78 65 64 20 6c |assume a fixed l| 00000320 65 6e 67 74 68 2e 20 49 66 20 79 6f 75 20 6d 75 |ength. If you mu| 00000330 73 74 20 6b 6e 6f 77 20 74 68 65 20 6c 65 6e 67 |st know the leng| 00000340 74 68 20 74 68 65 6e 0a 63 6f 6e 76 65 72 74 20 |th then.convert | 00000350 66 69 6c 65 20 6f 66 66 73 65 74 73 20 30 2c 31 |file offsets 0,1| 00000360 20 74 6f 20 70 6f 69 6e 74 65 72 73 20 61 6e 64 | to pointers and| 00000370 20 74 68 65 6e 20 73 75 62 74 72 61 63 74 20 74 | then subtract t| 00000380 68 65 6d 2e 20 54 68 65 20 6f 66 66 73 65 74 73 |hem. The offsets| 00000390 20 66 72 6f 6d 0a 74 68 65 20 66 69 6c 65 20 62 | from.the file b| 000003a0 6c 6f 63 6b 20 73 74 61 72 74 20 61 72 65 20 67 |lock start are g| 000003b0 69 76 65 6e 20 6e 61 6d 65 73 20 62 65 67 69 6e |iven names begin| 000003c0 6e 69 6e 67 20 77 69 74 68 20 27 66 5f 27 2e 0a |ning with 'f_'..| 000003d0 0a 53 65 65 20 74 68 65 20 45 2d 4c 69 62 72 61 |.See the E-Libra| 000003e0 72 79 20 66 69 6c 65 20 66 6f 72 20 61 20 6c 69 |ry file for a li| 000003f0 73 74 20 6f 66 20 74 68 65 20 27 66 5f 27 20 6e |st of the 'f_' n| 00000400 61 6d 65 73 2e 20 59 6f 75 20 73 68 6f 75 6c 64 |ames. You should| 00000410 20 75 73 65 20 63 6f 64 65 20 6f 66 0a 74 68 65 | use code of.the| 00000420 20 66 6f 72 6d 3a 0a 0a 09 4c 44 52 20 52 30 2c | form:...LDR R0,| 00000430 5b 52 39 2c 23 66 5f 70 74 72 5d 09 09 5c 20 73 |[R9,#f_ptr]..\ s| 00000440 65 74 20 52 30 20 74 6f 20 73 74 61 72 74 20 6f |et R0 to start o| 00000450 66 20 66 69 6c 65 20 62 75 66 66 65 72 2e 0a 09 |f file buffer...| 00000460 0a 74 6f 20 72 65 61 64 20 74 68 65 73 65 20 76 |.to read these v| 00000470 61 72 69 61 62 6c 65 73 2e 0a 0a 54 68 65 20 66 |ariables...The f| 00000480 69 6c 65 73 20 74 68 65 6d 73 65 6c 76 65 73 20 |iles themselves | 00000490 61 72 65 20 73 74 6f 72 65 64 20 69 6e 20 53 50 |are stored in SP| 000004a0 4c 49 54 20 42 55 46 46 45 52 20 66 6f 72 6d 61 |LIT BUFFER forma| 000004b0 74 2e 20 54 68 69 73 20 6d 65 61 6e 73 20 74 68 |t. This means th| 000004c0 61 74 20 74 68 65 0a 66 69 6c 65 20 64 61 74 61 |at the.file data| 000004d0 20 69 73 20 73 70 6c 69 74 20 69 6e 20 74 77 6f | is split in two| 000004e0 2c 20 77 69 74 68 20 61 20 67 61 70 20 69 6e 20 |, with a gap in | 000004f0 74 68 65 20 6d 69 64 64 6c 65 2e 20 54 68 65 20 |the middle. The | 00000500 64 69 61 67 72 61 6d 20 62 65 6c 6f 77 20 73 68 |diagram below sh| 00000510 6f 75 6c 64 0a 69 6c 6c 75 73 74 72 61 74 65 20 |ould.illustrate | 00000520 74 68 69 73 2e 0a 0a 09 09 2d 2d 2d 2d 2d 2d 2d |this.....-------| 00000530 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| 00000540 2d 20 66 5f 70 74 72 2b 66 5f 62 75 66 6c 0a 09 |- f_ptr+f_bufl..| 00000550 09 7c 20 74 6f 70 20 68 61 6c 66 20 6f 66 20 66 |.| top half of f| 00000560 69 6c 65 20 20 20 20 20 7c 0a 09 09 2d 2d 2d 2d |ile |...----| 00000570 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| 00000580 2d 2d 2d 2d 20 66 5f 70 74 72 2b 66 5f 73 70 6c |---- f_ptr+f_spl| 00000590 69 74 65 0a 09 09 7c 20 66 69 6c 65 20 67 61 70 |ite...| file gap| 000005a0 09 20 20 20 20 20 20 20 7c 0a 09 09 2d 2d 2d 2d |. |...----| 000005b0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| 000005c0 2d 2d 2d 2d 20 66 5f 70 74 72 2b 66 5f 73 70 6c |---- f_ptr+f_spl| 000005d0 69 74 6f 0a 09 09 7c 20 62 6f 74 74 6f 6d 20 68 |ito...| bottom h| 000005e0 61 6c 66 20 6f 66 20 66 69 6c 65 20 20 7c 0a 09 |alf of file |..| 000005f0 09 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |.---------------| 00000600 2d 2d 2d 2d 2d 2d 2d 2d 2d 20 66 5f 70 74 72 0a |--------- f_ptr.| 00000610 09 09 0a 4e 42 20 46 6f 72 20 61 6c 6c 20 5a 61 |...NB For all Za| 00000620 70 20 64 61 74 61 20 73 74 72 75 63 74 75 72 65 |p data structure| 00000630 73 20 62 6c 6f 63 6b 5f 73 74 61 72 74 3d 66 69 |s block_start=fi| 00000640 72 73 74 20 62 79 74 65 20 6f 66 20 64 61 74 61 |rst byte of data| 00000650 2c 20 62 6c 6f 63 6b 5f 65 6e 64 3d 0a 6c 61 73 |, block_end=.las| 00000660 74 20 62 79 74 65 20 6f 66 20 64 61 74 61 2b 31 |t byte of data+1| 00000670 2c 20 62 6c 6f 63 6b 5f 6c 65 6e 67 74 68 3d 62 |, block_length=b| 00000680 6c 6f 63 6b 5f 65 6e 64 2d 62 6c 6f 63 6b 5f 73 |lock_end-block_s| 00000690 74 61 72 74 2e 0a 0a 4e 6f 74 65 20 74 68 61 74 |tart...Note that| 000006a0 20 66 5f 70 74 72 20 6d 61 79 20 63 68 61 6e 67 | f_ptr may chang| 000006b0 65 20 6f 6e 20 61 6e 79 20 68 65 61 70 20 62 6c |e on any heap bl| 000006c0 6f 63 6b 20 63 6c 61 69 6d 2c 20 6f 72 20 66 69 |ock claim, or fi| 000006d0 6c 65 20 69 6e 73 65 72 74 2f 64 65 6c 65 74 65 |le insert/delete| 000006e0 2e 0a 54 68 75 73 20 61 6c 6c 20 74 68 65 20 6f |..Thus all the o| 000006f0 74 68 65 72 20 76 61 72 69 61 62 6c 65 73 20 61 |ther variables a| 00000700 72 65 20 73 74 6f 72 65 64 20 61 73 20 6f 66 66 |re stored as off| 00000710 73 65 74 73 20 66 72 6f 6d 20 74 68 69 73 2e 20 |sets from this. | 00000720 59 6f 75 20 73 68 6f 75 6c 64 20 75 73 65 0a 74 |You should use.t| 00000730 68 65 20 63 61 6c 6c 20 5a 61 70 5f 53 70 6c 69 |he call Zap_Spli| 00000740 74 42 75 66 66 65 72 20 74 6f 20 63 68 61 6e 67 |tBuffer to chang| 00000750 65 20 74 68 65 20 62 75 66 66 65 72 20 6c 65 6e |e the buffer len| 00000760 67 74 68 20 6f 72 20 73 70 6c 69 74 20 70 6f 73 |gth or split pos| 00000770 69 74 69 6f 6e 2e 20 59 6f 75 0a 73 68 6f 75 6c |ition. You.shoul| 00000780 64 20 75 73 65 20 74 68 65 20 63 61 6c 6c 20 5a |d use the call Z| 00000790 61 70 5f 43 6f 6d 6d 61 6e 64 20 74 6f 20 69 6e |ap_Command to in| 000007a0 73 65 72 74 2f 64 65 6c 65 74 65 20 64 61 74 61 |sert/delete data| 000007b0 2e 20 49 6e 73 65 72 74 69 6e 67 20 64 61 74 61 |. Inserting data| 000007c0 0a 6d 61 6e 75 61 6c 6c 79 20 61 6e 64 20 6b 65 |.manually and ke| 000007d0 65 70 69 6e 67 20 61 6c 6c 20 74 68 65 20 76 61 |eping all the va| 000007e0 72 69 61 62 6c 65 73 2f 75 6e 64 6f 20 62 75 66 |riables/undo buf| 000007f0 66 65 72 2f 73 63 72 65 65 6e 20 75 70 64 61 74 |fer/screen updat| 00000800 65 64 20 72 65 71 75 69 72 65 73 20 61 0a 6c 6f |ed requires a.lo| 00000810 74 20 6f 66 20 63 6f 64 65 20 69 66 20 79 6f 75 |t of code if you| 00000820 20 77 61 6e 74 20 74 6f 20 64 6f 20 69 74 20 79 | want to do it y| 00000830 6f 75 72 73 65 6c 66 20 28 74 68 65 20 6f 6e 6c |ourself (the onl| 00000840 79 20 65 78 63 65 70 74 69 6f 6e 20 74 6f 20 74 |y exception to t| 00000850 68 69 73 20 69 73 20 74 68 65 0a 65 5f 70 6f 73 |his is the.e_pos| 00000860 74 6c 6f 61 64 2f 65 5f 70 72 65 73 61 76 65 20 |tload/e_presave | 00000870 63 61 6c 6c 73 20 77 68 65 72 65 20 69 74 20 69 |calls where it i| 00000880 73 20 71 75 69 63 6b 65 72 20 74 6f 20 6d 61 6e |s quicker to man| 00000890 69 70 75 6c 61 74 65 20 74 68 65 20 66 69 6c 65 |ipulate the file| 000008a0 0a 64 69 72 65 63 74 6c 79 29 2e 0a 0a 46 6f 72 |.directly)...For| 000008b0 20 6d 6f 73 74 20 73 75 62 73 20 69 6e 20 5a 61 | most subs in Za| 000008c0 70 2c 20 61 20 70 6f 73 69 74 69 6f 6e 20 69 6e |p, a position in| 000008d0 20 74 68 65 20 66 69 6c 65 20 69 73 20 67 69 76 | the file is giv| 000008e0 65 6e 20 61 73 20 61 6e 20 6f 66 66 73 65 74 20 |en as an offset | 000008f0 66 72 6f 6d 20 74 68 65 0a 66 69 6c 65 20 73 74 |from the.file st| 00000900 61 72 74 20 28 69 6e 20 74 68 65 20 72 61 6e 67 |art (in the rang| 00000910 65 20 30 20 74 6f 20 74 68 65 20 6c 65 6e 67 74 |e 0 to the lengt| 00000920 68 20 6f 66 20 74 68 65 20 66 69 6c 65 29 2e 20 |h of the file). | 00000930 54 68 65 73 65 20 66 69 6c 65 20 6f 66 66 73 65 |These file offse| 00000940 74 73 0a 73 68 6f 75 6c 64 20 6e 6f 74 20 62 65 |ts.should not be| 00000950 20 63 6f 6e 66 75 73 65 64 20 77 69 74 68 20 74 | confused with t| 00000960 68 65 20 66 69 6c 65 20 62 6c 6f 63 6b 20 6f 66 |he file block of| 00000970 66 73 65 74 73 20 64 65 73 63 72 69 62 65 64 20 |fsets described | 00000980 69 6e 20 74 68 65 20 66 69 72 73 74 0a 70 61 72 |in the first.par| 00000990 61 67 72 61 70 68 2e 20 57 68 65 6e 20 49 20 73 |agraph. When I s| 000009a0 61 79 20 27 66 69 6c 65 20 6f 66 66 73 65 74 27 |ay 'file offset'| 000009b0 2c 20 69 74 20 73 68 6f 75 6c 64 20 62 65 20 63 |, it should be c| 000009c0 6c 65 61 72 20 66 72 6f 6d 20 74 68 65 20 63 6f |lear from the co| 000009d0 6e 74 65 78 74 20 77 68 61 74 0a 49 20 6d 65 61 |ntext what.I mea| 000009e0 6e 2e 0a 0a 54 6f 20 72 65 61 64 20 74 68 65 20 |n...To read the | 000009f0 62 79 74 65 20 61 74 20 6f 66 66 73 65 74 20 52 |byte at offset R| 00000a00 30 20 79 6f 75 20 73 68 6f 75 6c 64 20 75 73 65 |0 you should use| 00000a10 20 63 6f 64 65 20 6f 66 20 74 68 65 20 66 6f 72 | code of the for| 00000a20 6d 3a 0a 0a 09 52 45 4d 20 52 30 3d 66 69 6c 65 |m:...REM R0=file| 00000a30 20 6f 66 66 73 65 74 20 52 39 3d 66 69 6c 65 0a | offset R9=file.| 00000a40 09 52 45 4d 20 4f 6e 20 65 78 69 74 20 52 31 20 |.REM On exit R1 | 00000a50 63 6f 72 72 75 70 74 65 64 20 61 6e 64 20 52 30 |corrupted and R0| 00000a60 3d 62 79 74 65 20 72 65 61 64 2e 0a 0a 09 4c 44 |=byte read....LD| 00000a70 52 20 52 31 2c 5b 52 39 2c 23 66 5f 73 70 6c 69 |R R1,[R9,#f_spli| 00000a80 74 6f 5d 09 09 5c 20 66 69 6e 64 20 74 68 65 20 |to]..\ find the | 00000a90 73 70 6c 69 74 20 6f 66 66 73 65 74 20 69 6e 20 |split offset in | 00000aa0 74 68 65 20 62 75 66 66 65 72 0a 09 43 4d 50 20 |the buffer..CMP | 00000ab0 52 30 2c 52 31 09 09 09 5c 20 61 72 65 20 77 65 |R0,R1...\ are we| 00000ac0 20 69 6e 20 74 68 65 20 62 6f 74 74 6f 6d 20 6f | in the bottom o| 00000ad0 72 20 74 6f 70 20 68 61 6c 66 3f 0a 09 4c 44 52 |r top half?..LDR| 00000ae0 43 53 20 52 31 2c 5b 52 39 2c 23 66 5f 73 70 6c |CS R1,[R9,#f_spl| 00000af0 69 74 73 5d 0a 09 41 44 44 43 53 20 52 30 2c 52 |its]..ADDCS R0,R| 00000b00 30 2c 52 31 09 09 09 5c 20 69 66 20 69 6e 20 74 |0,R1...\ if in t| 00000b10 68 65 20 74 6f 70 20 68 61 6c 66 2c 20 73 6b 69 |he top half, ski| 00000b20 70 20 74 68 65 20 73 70 6c 69 74 0a 09 4c 44 52 |p the split..LDR| 00000b30 20 52 31 2c 5b 52 39 2c 23 66 5f 70 74 72 5d 09 | R1,[R9,#f_ptr].| 00000b40 09 5c 20 73 74 61 72 74 20 61 64 64 72 65 73 73 |.\ start address| 00000b50 20 6f 66 20 66 69 6c 65 0a 09 4c 44 52 42 20 52 | of file..LDRB R| 00000b60 30 2c 5b 52 31 2c 52 30 5d 09 09 09 5c 20 72 65 |0,[R1,R0]...\ re| 00000b70 61 64 20 74 68 65 20 62 79 74 65 0a 0a 54 6f 20 |ad the byte..To | 00000b80 72 65 61 64 20 6d 75 6c 74 69 70 6c 65 20 62 79 |read multiple by| 00000b90 74 65 73 20 79 6f 75 20 73 68 6f 75 6c 64 20 6f |tes you should o| 00000ba0 62 76 69 6f 75 73 6c 79 20 75 73 65 20 6d 6f 72 |bviously use mor| 00000bb0 65 20 65 66 66 69 63 69 65 6e 74 20 63 6f 64 65 |e efficient code| 00000bc0 21 20 49 66 0a 79 6f 75 20 61 72 65 20 64 6f 69 |! If.you are doi| 00000bd0 6e 67 20 61 20 76 65 72 79 20 69 6e 74 65 6e 73 |ng a very intens| 00000be0 69 76 65 20 6f 70 65 72 61 74 69 6f 6e 20 74 68 |ive operation th| 00000bf0 65 6e 20 79 6f 75 20 6d 61 79 20 77 61 6e 74 20 |en you may want | 00000c00 74 6f 20 63 6f 61 67 75 6c 61 74 65 0a 74 68 65 |to coagulate.the| 00000c10 20 74 65 78 74 20 76 69 61 20 5a 61 70 5f 53 70 | text via Zap_Sp| 00000c20 6c 69 74 42 75 66 66 65 72 2e 20 54 68 65 20 66 |litBuffer. The f| 00000c30 69 6c 65 20 76 61 72 69 61 62 6c 65 73 20 61 72 |ile variables ar| 00000c40 65 20 64 65 74 61 69 6c 65 64 20 62 65 6c 6f 77 |e detailed below| 00000c50 2e 20 55 73 65 0a 45 2d 4c 69 62 72 61 72 79 20 |. Use.E-Library | 00000c60 74 6f 20 73 65 74 20 74 68 65 6d 20 75 70 2e 0a |to set them up..| 00000c70 0a 66 5f 70 74 72 0a 41 64 64 72 65 73 73 20 6f |.f_ptr.Address o| 00000c80 66 20 66 69 6c 65 20 62 75 66 66 65 72 2f 2d 31 |f file buffer/-1| 00000c90 20 69 66 20 66 69 6c 65 20 69 73 20 64 65 61 64 | if file is dead| 00000ca0 20 28 68 61 73 20 62 65 65 6e 20 64 65 6c 65 74 | (has been delet| 00000cb0 65 64 29 2e 20 49 66 20 79 6f 75 20 73 63 61 6e |ed). If you scan| 00000cc0 0a 74 68 72 6f 75 67 68 20 74 68 65 20 66 69 6c |.through the fil| 00000cd0 65 20 62 6c 6f 63 6b 73 2c 20 79 6f 75 20 73 68 |e blocks, you sh| 00000ce0 6f 75 6c 64 20 61 6c 77 61 79 73 20 63 68 65 63 |ould always chec| 00000cf0 6b 20 74 68 69 73 20 77 6f 72 64 20 74 6f 20 63 |k this word to c| 00000d00 68 65 63 6b 20 74 68 65 20 66 69 6c 65 0a 69 73 |heck the file.is| 00000d10 20 6e 6f 74 20 64 65 61 64 2e 0a 0a 66 5f 62 75 | not dead...f_bu| 00000d20 66 6c 0a 4c 65 6e 67 74 68 20 6f 66 20 66 69 6c |fl.Length of fil| 00000d30 65 20 62 75 66 66 65 72 20 28 6d 75 6c 74 69 70 |e buffer (multip| 00000d40 6c 65 20 6f 66 20 34 29 2e 20 53 65 65 20 70 69 |le of 4). See pi| 00000d50 63 20 61 62 6f 76 65 2e 0a 0a 66 5f 6c 65 6e 0a |c above...f_len.| 00000d60 4c 65 6e 67 74 68 20 6f 66 20 66 69 6c 65 20 73 |Length of file s| 00000d70 74 6f 72 65 64 20 69 6e 20 74 68 65 20 62 75 66 |tored in the buf| 00000d80 66 65 72 20 28 3d 66 5f 62 75 66 6c 2d 66 5f 73 |fer (=f_bufl-f_s| 00000d90 70 6c 69 74 73 29 2e 0a 0a 66 5f 6e 61 6d 65 0a |plits)...f_name.| 00000da0 50 6f 69 6e 74 65 72 20 74 6f 20 6e 61 6d 65 20 |Pointer to name | 00000db0 6f 66 20 74 68 65 20 66 69 6c 65 2e 0a 0a 66 5f |of the file...f_| 00000dc0 6c 6f 61 64 0a 4c 6f 61 64 20 61 64 64 72 65 73 |load.Load addres| 00000dd0 73 20 6f 66 20 74 68 65 20 66 69 6c 65 2e 0a 0a |s of the file...| 00000de0 66 5f 65 78 65 63 0a 45 78 65 63 75 74 69 6f 6e |f_exec.Execution| 00000df0 20 61 64 64 72 65 73 73 20 6f 66 20 74 68 65 20 | address of the | 00000e00 66 69 6c 65 2e 0a 0a 66 5f 66 6c 61 67 73 0a 46 |file...f_flags.F| 00000e10 69 6c 65 20 66 6c 61 67 73 2e 20 53 65 65 20 45 |ile flags. See E| 00000e20 2d 46 6c 61 67 73 20 66 6f 72 20 74 68 65 20 6d |-Flags for the m| 00000e30 65 61 6e 69 6e 67 20 6f 66 20 74 68 65 20 62 69 |eaning of the bi| 00000e40 74 73 20 69 6e 20 74 68 69 73 20 77 6f 72 64 2e |ts in this word.| 00000e50 0a 0a 66 5f 75 70 74 72 0a 50 6f 69 6e 74 65 72 |..f_uptr.Pointer| 00000e60 20 74 6f 20 74 68 65 20 75 6e 64 6f 20 62 75 66 | to the undo buf| 00000e70 66 65 72 2e 20 54 68 65 20 75 6e 64 6f 20 62 75 |fer. The undo bu| 00000e80 66 66 65 72 20 63 6f 6e 73 69 73 74 73 20 6f 66 |ffer consists of| 00000e90 20 61 20 6c 69 73 74 20 6f 66 20 62 6c 6f 63 6b | a list of block| 00000ea0 73 20 6f 66 0a 76 61 72 69 61 62 6c 65 20 6c 65 |s of.variable le| 00000eb0 6e 67 74 68 2e 20 54 68 65 20 73 74 61 72 74 20 |ngth. The start | 00000ec0 6f 66 20 61 20 62 6c 6f 63 6b 20 69 73 20 69 6e |of a block is in| 00000ed0 64 69 63 61 74 65 64 20 62 79 20 62 69 74 20 33 |dicated by bit 3| 00000ee0 31 20 6f 66 20 74 68 61 74 20 77 6f 72 64 0a 62 |1 of that word.b| 00000ef0 65 69 6e 67 20 73 65 74 2e 20 49 6e 20 67 65 6e |eing set. In gen| 00000f00 65 72 61 6c 20 74 68 65 20 66 69 72 73 74 20 77 |eral the first w| 00000f10 6f 72 64 20 6f 66 20 74 68 65 20 62 6c 6f 63 6b |ord of the block| 00000f20 20 68 61 73 20 66 6f 72 6d 61 74 3a 0a 09 62 33 | has format:..b3| 00000f30 31 20 3d 31 20 28 53 65 74 20 74 6f 20 69 6e 64 |1 =1 (Set to ind| 00000f40 69 63 61 74 65 20 62 6c 6f 63 6b 20 73 74 61 72 |icate block star| 00000f50 74 29 2e 0a 09 62 33 30 20 53 65 74 20 69 66 20 |t)...b30 Set if | 00000f60 74 68 65 20 63 6f 6d 6d 61 6e 64 20 73 68 6f 75 |the command shou| 00000f70 6c 64 20 62 65 20 75 6e 64 6f 6e 65 20 69 6e 20 |ld be undone in | 00000f80 6f 6e 65 20 67 6f 2e 20 28 61 73 20 6f 70 70 6f |one go. (as oppo| 00000f90 73 65 64 20 74 6f 20 6f 6e 65 0a 09 20 20 20 20 |sed to one.. | 00000fa0 63 68 61 72 61 63 74 65 72 20 61 74 20 61 20 74 |character at a t| 00000fb0 69 6d 65 20 66 6f 72 20 63 6f 6e 63 61 74 65 6e |ime for concaten| 00000fc0 61 74 65 64 20 62 6c 6f 63 6b 73 29 2e 0a 09 62 |ated blocks)...b| 00000fd0 32 39 20 53 65 74 20 69 66 20 74 68 65 20 64 61 |29 Set if the da| 00000fe0 74 61 20 70 6f 69 6e 74 65 64 20 74 6f 20 62 79 |ta pointed to by| 00000ff0 20 74 68 65 20 63 6f 6d 6d 61 6e 64 20 6e 65 65 | the command nee| 00001000 64 20 6e 6f 74 20 62 65 20 66 72 65 65 64 2e 0a |d not be freed..| 00001010 09 28 54 68 69 73 20 69 73 20 75 73 65 64 20 6f |.(This is used o| 00001020 6e 20 61 6e 20 75 6e 64 6f 20 77 68 65 6e 20 62 |n an undo when b| 00001030 6c 6f 63 6b 73 20 61 72 65 20 70 6f 69 6e 74 65 |locks are pointe| 00001040 64 20 74 6f 20 74 77 69 63 65 29 2e 0a 09 62 32 |d to twice)...b2| 00001050 36 2d 62 32 38 20 43 6f 6d 6d 61 6e 64 20 6e 75 |6-b28 Command nu| 00001060 6d 62 65 72 2e 20 41 73 20 66 6f 72 20 52 30 20 |mber. As for R0 | 00001070 69 6e 20 5a 61 70 5f 43 6f 6d 6d 61 6e 64 20 77 |in Zap_Command w| 00001080 69 74 68 20 61 64 64 69 74 69 6f 6e 73 3a 0a 09 |ith additions:..| 00001090 09 30 20 3d 20 66 61 73 74 20 75 6e 64 6f 20 70 |.0 = fast undo p| 000010a0 6f 69 6e 74 65 72 20 28 66 61 73 74 20 72 65 64 |ointer (fast red| 000010b0 6f 20 69 66 20 62 33 30 20 73 65 74 29 0a 09 09 |o if b30 set)...| 000010c0 37 20 3d 20 73 74 61 72 74 6f 70 20 70 6f 69 6e |7 = startop poin| 000010d0 74 65 72 20 28 73 74 6f 70 6f 70 20 70 6f 69 6e |ter (stopop poin| 000010e0 74 65 72 20 69 66 20 62 33 30 20 73 65 74 29 0a |ter if b30 set).| 000010f0 09 62 30 2d 62 32 37 20 47 69 76 65 73 20 74 68 |.b0-b27 Gives th| 00001100 65 20 63 6f 6d 6d 61 6e 64 73 20 66 69 72 73 74 |e commands first| 00001110 20 70 61 72 61 6d 65 74 65 72 2c 20 75 73 75 61 | parameter, usua| 00001120 6c 6c 79 20 61 20 66 69 6c 65 20 6f 66 66 73 65 |lly a file offse| 00001130 74 0a 09 09 54 68 69 73 20 63 6f 72 72 65 73 70 |t...This corresp| 00001140 6f 6e 64 73 20 74 6f 20 72 65 67 69 73 74 65 72 |onds to register| 00001150 20 52 31 20 69 6e 20 5a 61 70 5f 43 6f 6d 6d 61 | R1 in Zap_Comma| 00001160 6e 64 2e 0a 54 68 65 20 6f 74 68 65 72 20 77 6f |nd..The other wo| 00001170 72 64 73 20 63 6f 72 72 65 73 70 6f 6e 64 20 74 |rds correspond t| 00001180 6f 20 72 65 67 69 73 74 65 72 73 20 52 32 20 6f |o registers R2 o| 00001190 6e 77 61 72 64 73 20 77 68 65 6e 20 63 61 6c 6c |nwards when call| 000011a0 69 6e 67 20 5a 61 70 5f 43 6f 6d 6d 61 6e 64 2e |ing Zap_Command.| 000011b0 0a 0a 66 5f 75 62 75 66 6c 0a 54 6f 74 61 6c 20 |..f_ubufl.Total | 000011c0 6c 65 6e 67 74 68 20 6f 66 20 74 68 65 20 75 6e |length of the un| 000011d0 64 6f 20 62 75 66 66 65 72 2e 0a 0a 66 5f 75 6c |do buffer...f_ul| 000011e0 65 6e 0a 4c 65 6e 67 74 68 20 6f 66 20 76 61 6c |en.Length of val| 000011f0 69 64 20 64 61 74 61 20 69 6e 20 74 68 65 20 75 |id data in the u| 00001200 6e 64 6f 20 62 75 66 66 65 72 2e 0a 0a 66 5f 75 |ndo buffer...f_u| 00001210 6e 64 6f 0a 4f 66 66 73 65 74 20 6f 66 20 74 68 |ndo.Offset of th| 00001220 65 20 75 6e 64 6f 20 70 6f 69 6e 74 65 72 20 69 |e undo pointer i| 00001230 6e 20 74 68 65 20 75 6e 64 6f 20 62 75 66 66 65 |n the undo buffe| 00001240 72 2e 0a 0a 66 5f 75 6e 64 6f 70 0a 4f 66 66 73 |r...f_undop.Offs| 00001250 65 74 20 6f 66 20 74 68 65 20 75 6e 64 6f 20 73 |et of the undo s| 00001260 75 62 70 6f 69 6e 74 65 72 20 69 6e 20 74 68 65 |ubpointer in the| 00001270 20 62 6c 6f 63 6b 20 70 6f 69 6e 74 65 72 20 74 | block pointer t| 00001280 6f 20 62 79 20 66 5f 75 6e 64 6f 2e 20 49 65 20 |o by f_undo. Ie | 00001290 69 74 20 67 69 76 65 73 0a 74 68 65 20 6e 75 6d |it gives.the num| 000012a0 62 65 72 20 6f 66 20 63 68 61 72 61 63 74 65 72 |ber of character| 000012b0 73 20 6c 65 66 74 20 74 6f 20 75 6e 64 6f 20 69 |s left to undo i| 000012c0 6e 20 74 68 65 20 6f 70 65 72 61 74 69 6f 6e 20 |n the operation | 000012d0 63 75 72 72 65 6e 74 6c 79 20 62 65 69 6e 67 0a |currently being.| 000012e0 75 6e 64 6f 6e 65 2e 0a 0a 66 5f 72 65 73 33 0a |undone...f_res3.| 000012f0 72 65 73 65 72 76 65 64 0a 0a 66 5f 73 70 6c 69 |reserved..f_spli| 00001300 74 6f 0a 4f 66 66 73 65 74 20 69 6e 20 74 68 65 |to.Offset in the| 00001310 20 66 69 6c 65 20 62 75 66 66 65 72 20 6f 66 20 | file buffer of | 00001320 74 68 65 20 63 75 72 72 65 6e 74 20 73 70 6c 69 |the current spli| 00001330 74 20 70 6f 73 69 74 69 6f 6e 2e 20 53 65 65 20 |t position. See | 00001340 70 69 63 2e 0a 0a 66 5f 73 70 6c 69 74 65 0a 4f |pic...f_splite.O| 00001350 66 66 73 65 74 20 69 6e 20 74 68 65 20 66 69 6c |ffset in the fil| 00001360 65 20 62 75 66 66 65 72 20 6f 66 20 74 68 65 20 |e buffer of the | 00001370 65 6e 64 20 6f 66 20 74 68 65 20 63 75 72 72 65 |end of the curre| 00001380 6e 74 20 73 70 6c 69 74 2e 20 53 65 65 20 70 69 |nt split. See pi| 00001390 63 2e 0a 0a 66 5f 73 70 6c 69 74 73 0a 53 69 7a |c...f_splits.Siz| 000013a0 65 20 6f 66 20 74 68 65 20 66 69 6c 65 20 73 70 |e of the file sp| 000013b0 6c 69 74 20 28 3d 66 5f 73 70 6c 69 74 65 2d 66 |lit (=f_splite-f| 000013c0 5f 73 70 6c 69 74 6f 29 2e 20 53 65 65 20 70 69 |_splito). See pi| 000013d0 63 2e 0a 0a 66 5f 6d 70 74 72 0a 50 6f 69 6e 74 |c...f_mptr.Point| 000013e0 65 72 20 74 6f 20 74 68 65 20 6d 61 72 6b 65 72 |er to the marker| 000013f0 20 62 75 66 66 65 72 2e 20 54 68 65 20 6d 61 72 | buffer. The mar| 00001400 6b 65 72 20 62 75 66 66 65 72 20 69 73 20 61 20 |ker buffer is a | 00001410 6c 69 73 74 20 6f 66 20 65 6e 74 72 69 65 73 2c |list of entries,| 00001420 20 65 61 63 68 0a 74 77 6f 20 77 6f 72 64 73 20 | each.two words | 00001430 6c 6f 6e 67 73 20 6f 66 20 74 68 65 20 66 6f 72 |longs of the for| 00001440 6d 61 74 3a 0a 09 23 30 09 46 69 6c 65 20 6f 66 |mat:..#0.File of| 00001450 66 73 65 74 20 6f 66 20 74 68 65 20 6d 61 72 6b |fset of the mark| 00001460 0a 09 23 34 09 57 69 6e 64 6f 77 20 6f 66 66 73 |..#4.Window offs| 00001470 65 74 20 6f 66 20 74 68 65 20 77 69 6e 64 6f 77 |et of the window| 00001480 20 6d 61 72 6b 20 77 61 73 20 70 6c 61 63 65 20 | mark was place | 00001490 69 6e 20 6f 72 20 2d 31 20 69 66 20 74 68 65 0a |in or -1 if the.| 000014a0 09 09 77 69 6e 64 6f 77 20 68 61 73 20 62 65 65 |..window has bee| 000014b0 6e 20 64 65 6c 65 74 65 64 20 28 6f 72 20 69 73 |n deleted (or is| 000014c0 20 75 6e 73 70 65 63 69 66 69 65 64 29 2e 0a 0a | unspecified)...| 000014d0 66 5f 6d 62 75 66 6c 0a 4c 65 6e 67 74 68 20 6f |f_mbufl.Length o| 000014e0 66 20 74 68 65 20 6d 61 72 6b 65 72 20 62 75 66 |f the marker buf| 000014f0 66 65 72 2e 0a 0a 66 5f 6d 6c 65 6e 0a 4c 65 6e |fer...f_mlen.Len| 00001500 67 74 68 20 6f 66 20 76 61 6c 69 64 20 64 61 74 |gth of valid dat| 00001510 61 20 69 6e 20 74 68 65 20 6d 61 72 6b 65 72 20 |a in the marker | 00001520 62 75 66 66 65 72 2e 0a 0a 66 5f 6d 61 72 6b 0a |buffer...f_mark.| 00001530 43 75 72 72 65 6e 74 20 6f 66 66 73 65 74 20 69 |Current offset i| 00001540 6e 20 74 68 65 20 6d 61 72 6b 65 72 20 62 75 66 |n the marker buf| 00001550 66 65 72 2e 0a 0a 66 5f 64 6f 63 6f 6d 0a 55 73 |fer...f_docom.Us| 00001560 65 64 20 62 79 20 5a 61 70 5f 53 61 76 65 54 78 |ed by Zap_SaveTx| 00001570 74 53 74 61 74 75 73 3a 20 73 74 6f 72 65 73 20 |tStatus: stores | 00001580 74 68 65 20 63 75 72 72 65 6e 74 20 61 63 74 69 |the current acti| 00001590 6f 6e 20 28 61 73 20 66 6f 72 20 5a 61 70 5f 44 |on (as for Zap_D| 000015a0 6f 43 6f 6d 6d 61 6e 64 0a 62 69 74 73 20 30 2d |oCommand.bits 0-| 000015b0 32 29 20 69 65 2c 20 31 3d 69 6e 73 65 72 74 20 |2) ie, 1=insert | 000015c0 74 65 78 74 20 32 3d 64 65 6c 65 74 65 20 74 65 |text 2=delete te| 000015d0 78 74 20 33 2f 34 3d 72 65 70 6c 61 63 65 6d 65 |xt 3/4=replaceme| 000015e0 6e 74 20 6f 66 20 74 65 78 74 2e 0a 0a 66 5f 73 |nt of text...f_s| 000015f0 6f 75 72 63 65 0a 54 68 69 73 20 77 6f 72 64 20 |ource.This word | 00001600 69 73 20 66 6f 72 20 74 68 65 20 75 73 65 20 6f |is for the use o| 00001610 66 20 74 68 65 20 6d 6f 64 65 20 27 6f 77 6e 69 |f the mode 'owni| 00001620 6e 67 27 20 74 68 69 73 20 66 69 6c 65 2e 20 53 |ng' this file. S| 00001630 65 65 20 66 5f 63 6d 6f 64 65 2e 20 49 74 0a 75 |ee f_cmode. It.u| 00001640 73 75 61 6c 6c 79 20 70 6f 69 6e 74 73 20 74 6f |sually points to| 00001650 20 61 20 64 61 74 61 20 62 6c 6f 63 6b 20 6f 66 | a data block of| 00001660 20 69 6e 66 6f 20 74 68 61 74 20 6d 6f 64 65 20 | info that mode | 00001670 77 61 6e 74 73 20 74 6f 20 68 6f 6c 64 20 66 6f |wants to hold fo| 00001680 72 20 74 68 69 73 20 66 69 6c 65 2e 0a 43 75 72 |r this file..Cur| 00001690 72 65 6e 74 20 66 6f 72 6d 61 74 73 20 75 73 65 |rent formats use| 000016a0 64 20 61 72 65 3a 0a 20 66 5f 63 6d 6f 64 65 09 |d are:. f_cmode.| 000016b0 66 5f 73 6f 75 72 63 65 20 6d 65 61 6e 69 6e 67 |f_source meaning| 000016c0 0a 20 30 20 28 54 65 78 74 29 09 54 65 78 74 20 |. 0 (Text).Text | 000016d0 6d 6f 64 65 20 6f 77 6e 73 20 65 78 74 65 72 6e |mode owns extern| 000016e0 61 6c 20 65 64 69 74 20 66 69 6c 65 73 20 61 6e |al edit files an| 000016f0 64 20 68 61 6e 64 6c 65 73 20 74 68 65 6d 2e 20 |d handles them. | 00001700 66 5f 73 6f 75 72 63 65 0a 20 09 09 70 6f 69 6e |f_source. ..poin| 00001710 74 73 20 74 6f 20 74 68 65 20 62 6c 6f 63 6b 3a |ts to the block:| 00001720 0a 20 09 09 23 30 09 45 78 74 65 72 6e 61 6c 20 |. ..#0.External | 00001730 65 64 69 74 20 4a 4f 42 20 68 61 6e 64 6c 65 20 |edit JOB handle | 00001740 28 5a 61 70 73 20 70 61 72 74 20 6f 66 20 74 68 |(Zaps part of th| 00001750 65 20 6a 6f 62 0a 20 09 09 09 68 61 6e 64 6c 65 |e job. ...handle| 00001760 20 69 73 20 74 68 65 20 66 69 6c 65 20 62 6c 6f | is the file blo| 00001770 63 6b 20 6f 66 66 73 65 74 2b 31 29 0a 20 09 09 |ck offset+1). ..| 00001780 23 34 09 54 61 73 6b 20 68 61 6e 64 6c 65 20 6f |#4.Task handle o| 00001790 66 20 63 6c 69 65 6e 74 20 74 61 73 6b 0a 20 09 |f client task. .| 000017a0 09 23 38 09 46 6c 61 67 73 20 70 61 73 73 65 64 |.#8.Flags passed| 000017b0 20 62 79 20 63 6c 69 65 6e 74 20 77 68 65 6e 20 | by client when | 000017c0 6a 6f 62 20 73 74 61 72 74 65 64 0a 20 09 09 23 |job started. ..#| 000017d0 31 32 09 4f 66 66 73 65 74 20 69 6e 20 77 69 6e |12.Offset in win| 000017e0 64 6f 77 20 62 6c 6f 63 6b 20 6f 66 20 61 73 73 |dow block of ass| 000017f0 6f 63 69 61 74 65 64 20 77 69 6e 64 6f 77 2e 0a |ociated window..| 00001800 20 31 20 28 42 79 74 65 29 09 42 79 74 65 20 6d | 1 (Byte).Byte m| 00001810 6f 64 65 20 6f 77 6e 73 20 27 72 65 61 64 20 64 |ode owns 'read d| 00001820 69 73 63 27 20 66 69 6c 65 73 2e 20 66 5f 73 6f |isc' files. f_so| 00001830 75 72 63 65 20 69 73 20 74 68 65 20 64 69 73 63 |urce is the disc| 00001840 0a 20 09 09 61 64 64 72 65 73 73 20 74 68 65 20 |. ..address the | 00001850 66 69 6c 65 20 77 61 73 20 72 65 61 64 20 66 72 |file was read fr| 00001860 6f 6d 2e 0a 20 31 31 20 28 54 68 72 6f 77 62 61 |om.. 11 (Throwba| 00001870 63 6b 29 20 54 61 73 6b 20 68 61 6e 64 6c 65 20 |ck) Task handle | 00001880 6f 66 20 74 61 73 6b 20 74 68 61 74 20 73 65 6e |of task that sen| 00001890 74 20 74 68 72 6f 77 62 61 63 6b 20 64 61 74 61 |t throwback data| 000018a0 2e 0a 20 31 32 28 54 61 73 6b 77 69 6e 64 6f 77 |.. 12(Taskwindow| 000018b0 29 20 54 61 73 6b 77 69 6e 64 6f 77 20 6d 6f 64 |) Taskwindow mod| 000018c0 65 20 6f 77 6e 73 20 74 61 73 6b 77 69 6e 64 6f |e owns taskwindo| 000018d0 77 20 66 69 6c 65 73 2e 20 66 5f 73 6f 75 72 63 |w files. f_sourc| 000018e0 65 20 70 6f 69 6e 74 73 20 74 6f 0a 20 09 09 61 |e points to. ..a| 000018f0 20 62 6c 6f 63 6b 20 6f 66 20 74 68 65 20 66 6f | block of the fo| 00001900 72 6d 61 74 3a 0a 20 09 09 23 30 09 54 61 73 6b |rmat:. ..#0.Task| 00001910 20 68 61 6e 64 6c 65 20 6f 66 20 63 68 69 6c 64 | handle of child| 00001920 20 74 61 73 6b 0a 20 09 09 23 34 09 43 75 72 73 | task. ..#4.Curs| 00001930 6f 72 20 78 20 70 6f 73 6e 20 28 63 68 61 72 73 |or x posn (chars| 00001940 29 0a 20 09 09 23 38 09 43 75 72 73 6f 72 20 79 |). ..#8.Cursor y| 00001950 20 70 6f 73 6e 20 28 63 68 61 72 73 29 0a 20 09 | posn (chars). .| 00001960 09 23 31 32 09 48 65 69 67 68 74 20 6f 66 20 65 |.#12.Height of e| 00001970 6d 75 6c 61 74 65 64 20 73 63 72 65 65 6e 20 28 |mulated screen (| 00001980 63 68 61 72 73 29 0a 20 09 09 23 31 36 09 54 65 |chars). ..#16.Te| 00001990 78 74 20 77 69 6e 64 6f 77 20 6d 69 6e 20 78 20 |xt window min x | 000019a0 28 63 68 61 72 73 29 0a 20 09 09 23 32 30 09 54 |(chars). ..#20.T| 000019b0 65 78 74 20 77 69 6e 64 6f 77 20 6d 69 6e 20 79 |ext window min y| 000019c0 20 28 63 68 61 72 73 29 0a 20 09 09 23 32 34 09 | (chars). ..#24.| 000019d0 54 65 78 74 20 77 69 6e 64 6f 77 20 6d 61 78 20 |Text window max | 000019e0 78 20 28 63 68 61 72 73 29 0a 20 09 09 23 32 38 |x (chars). ..#28| 000019f0 09 54 65 78 74 20 77 69 6e 64 6f 77 20 6d 61 78 |.Text window max| 00001a00 20 79 20 28 63 68 61 72 73 29 0a 20 09 09 23 33 | y (chars). ..#3| 00001a10 32 09 4e 75 6d 62 65 72 20 6f 66 20 62 79 74 65 |2.Number of byte| 00001a20 73 20 73 74 6f 72 65 64 20 69 6e 20 74 68 65 20 |s stored in the | 00001a30 56 44 55 20 71 75 65 75 65 2e 0a 20 09 09 23 33 |VDU queue.. ..#3| 00001a40 36 09 31 32 20 62 79 74 65 20 62 75 66 66 65 72 |6.12 byte buffer| 00001a50 20 74 6f 20 73 74 6f 72 65 20 74 68 65 20 56 44 | to store the VD| 00001a60 55 20 71 75 65 75 65 20 69 6e 2e 0a 20 09 09 23 |U queue in.. ..#| 00001a70 34 38 09 4f 66 66 73 65 74 20 69 6e 20 77 69 6e |48.Offset in win| 00001a80 64 6f 77 20 62 6c 6f 63 6b 20 6f 66 20 61 73 73 |dow block of ass| 00001a90 6f 63 69 61 74 65 64 20 77 69 6e 64 6f 77 2e 0a |ociated window..| 00001aa0 20 09 09 23 35 32 09 46 6c 61 67 73 3a 09 62 30 | ..#52.Flags:.b0| 00001ab0 09 53 65 74 20 69 66 20 74 61 73 6b 20 73 75 73 |.Set if task sus| 00001ac0 70 65 6e 64 65 64 0a 20 09 09 09 09 62 31 09 69 |pended. ....b1.i| 00001ad0 6e 74 65 72 6e 61 6c 20 75 73 65 0a 20 09 09 23 |nternal use. ..#| 00001ae0 35 36 09 4c 69 6e 65 20 6f 66 66 73 65 74 20 66 |56.Line offset f| 00001af0 72 6f 6d 20 77 6f 72 6b 20 61 72 65 61 20 73 74 |rom work area st| 00001b00 61 72 74 20 6f 66 20 65 6d 75 6c 61 74 65 64 20 |art of emulated | 00001b10 73 63 72 65 65 6e 2e 0a 09 09 77 5f 62 70 6c 20 |screen....w_bpl | 00001b20 73 74 6f 72 65 73 20 74 68 65 20 77 69 64 74 68 |stores the width| 00001b30 20 6f 66 20 74 68 65 20 65 6d 75 6c 61 74 65 64 | of the emulated| 00001b40 20 73 63 72 65 65 6e 2e 0a 0a 66 5f 64 6f 6c 65 | screen...f_dole| 00001b50 6e 0a 55 73 65 64 20 62 79 20 5a 61 70 5f 53 61 |n.Used by Zap_Sa| 00001b60 76 65 54 78 74 53 74 61 74 75 73 3a 20 53 74 6f |veTxtStatus: Sto| 00001b70 72 65 73 20 74 68 65 20 73 69 7a 65 20 6f 66 20 |res the size of | 00001b80 74 68 65 20 64 61 74 61 20 62 65 69 6e 67 20 69 |the data being i| 00001b90 6e 73 65 72 74 65 64 2f 0a 64 65 6c 65 74 65 64 |nserted/.deleted| 00001ba0 2f 72 65 70 6c 61 63 65 64 2e 0a 0a 66 5f 64 6f |/replaced...f_do| 00001bb0 64 61 74 61 0a 55 73 65 64 20 62 79 20 5a 61 70 |data.Used by Zap| 00001bc0 5f 53 61 76 65 54 78 74 53 74 61 74 75 73 3a 20 |_SaveTxtStatus: | 00001bd0 53 74 6f 72 65 73 20 74 68 65 20 61 64 64 72 65 |Stores the addre| 00001be0 73 73 20 6f 66 20 74 68 65 20 64 61 74 61 20 62 |ss of the data b| 00001bf0 65 69 6e 67 20 69 6e 73 65 72 74 65 64 2f 0a 72 |eing inserted/.r| 00001c00 65 70 6c 61 63 65 64 2e 0a 0a 66 5f 61 6c 74 65 |eplaced...f_alte| 00001c10 72 65 64 0a 55 73 65 64 20 62 79 20 5a 61 70 5f |red.Used by Zap_| 00001c20 44 6f 43 6f 6d 6d 61 6e 64 3a 20 46 69 72 73 74 |DoCommand: First| 00001c30 20 61 6c 74 65 72 65 64 20 6f 66 66 73 65 74 20 | altered offset | 00001c40 69 6e 20 66 69 6c 65 20 2f 20 2d 31 0a 0a 66 5f |in file / -1..f_| 00001c50 73 68 69 66 74 61 62 6c 65 0a 55 73 65 64 20 62 |shiftable.Used b| 00001c60 79 20 5a 61 70 5f 44 6f 43 6f 6d 6d 61 6e 64 3a |y Zap_DoCommand:| 00001c70 20 46 69 72 73 74 20 75 6e 61 6c 74 65 72 65 64 | First unaltered| 00001c80 20 6f 66 66 73 65 74 20 69 6e 20 66 69 6c 65 20 | offset in file | 00001c90 2f 20 2d 31 0a 0a 66 5f 63 68 61 6e 67 65 0a 55 |/ -1..f_change.U| 00001ca0 73 65 64 20 62 79 20 5a 61 70 5f 44 6f 43 6f 6d |sed by Zap_DoCom| 00001cb0 6d 61 6e 64 3a 20 53 69 67 6e 65 64 20 63 68 61 |mand: Signed cha| 00001cc0 6e 67 65 20 69 6e 20 73 69 7a 65 20 6f 66 20 64 |nge in size of d| 00001cd0 61 74 61 2e 0a 0a 66 5f 64 65 70 74 68 0a 55 73 |ata...f_depth.Us| 00001ce0 65 64 20 62 79 20 5a 61 70 5f 53 74 61 72 74 4f |ed by Zap_StartO| 00001cf0 70 3a 20 43 75 72 72 65 6e 74 20 53 74 61 72 74 |p: Current Start| 00001d00 4f 70 2f 53 74 6f 70 4f 70 20 6e 65 73 74 65 64 |Op/StopOp nested| 00001d10 20 64 65 70 74 68 2e 0a 0a 66 5f 6c 69 6e 6b 73 | depth...f_links| 00001d20 0a 4c 69 6e 6b 73 20 6c 69 73 74 20 62 75 66 66 |.Links list buff| 00001d30 65 72 20 70 6f 69 6e 74 65 72 2e 20 54 68 69 73 |er pointer. This| 00001d40 20 69 73 20 6d 6f 73 74 20 75 73 65 64 20 62 79 | is most used by| 00001d50 20 27 74 68 72 6f 77 62 61 63 6b 27 20 74 68 6f | 'throwback' tho| 00001d60 75 67 68 20 6d 61 79 0a 68 61 76 65 20 6f 74 68 |ugh may.have oth| 00001d70 65 72 20 75 73 65 73 2e 20 54 68 65 20 69 64 65 |er uses. The ide| 00001d80 61 20 69 73 20 74 68 61 74 20 74 68 69 73 20 62 |a is that this b| 00001d90 6c 6f 63 6b 20 73 74 6f 72 65 73 20 72 65 66 65 |lock stores refe| 00001da0 72 65 6e 63 65 73 20 74 6f 20 6f 66 66 73 65 74 |rences to offset| 00001db0 73 0a 69 6e 20 6f 74 68 65 72 20 66 69 6c 65 73 |s.in other files| 00001dc0 2e 20 57 68 65 6e 20 74 68 65 73 65 20 66 69 6c |. When these fil| 00001dd0 65 73 20 61 72 65 20 75 70 64 61 74 65 64 2c 20 |es are updated, | 00001de0 74 68 65 20 6f 66 66 73 65 74 73 20 61 72 65 20 |the offsets are | 00001df0 75 70 64 61 74 65 64 20 74 6f 6f 0a 73 6f 20 79 |updated too.so y| 00001e00 6f 75 20 63 61 6e 20 6b 65 65 70 20 74 72 61 63 |ou can keep trac| 00001e10 6b 20 6f 66 20 74 68 61 74 20 70 6f 69 6e 74 20 |k of that point | 00001e20 69 6e 20 74 68 65 20 66 69 6c 65 2e 20 55 73 65 |in the file. Use| 00001e30 20 5a 61 70 5f 4e 65 77 4c 69 6e 6b 45 6e 74 72 | Zap_NewLinkEntr| 00001e40 79 20 74 6f 20 61 64 64 0a 61 20 6e 65 77 20 6c |y to add.a new l| 00001e50 69 6e 6b 2e 20 66 5f 6c 69 6e 6b 73 20 70 6f 69 |ink. f_links poi| 00001e60 6e 74 73 20 74 6f 20 61 20 6c 69 73 74 20 6f 66 |nts to a list of| 00001e70 20 31 36 20 62 79 74 65 20 62 6c 6f 63 6b 73 20 | 16 byte blocks | 00001e80 74 65 72 6d 69 6e 61 74 65 64 20 62 79 20 2d 31 |terminated by -1| 00001e90 2e 20 54 68 65 0a 62 6c 6f 63 6b 20 66 6f 72 6d |. The.block form| 00001ea0 61 74 20 69 73 0a 09 23 30 09 50 6f 69 6e 74 65 |at is..#0.Pointe| 00001eb0 72 20 74 6f 20 66 69 6c 65 20 6e 61 6d 65 20 6f |r to file name o| 00001ec0 66 20 61 73 73 6f 63 69 61 74 65 64 20 66 69 6c |f associated fil| 00001ed0 65 20 28 77 69 74 68 20 6d 61 74 63 68 2f 65 72 |e (with match/er| 00001ee0 72 6f 72 29 0a 09 09 28 45 67 20 74 68 69 73 20 |ror)...(Eg this | 00001ef0 69 73 20 74 68 65 20 43 20 73 6f 75 72 63 65 20 |is the C source | 00001f00 66 69 6c 65 20 63 6f 72 72 65 73 70 6f 6e 64 69 |file correspondi| 00001f10 6e 67 20 74 6f 20 74 68 69 73 20 74 68 72 6f 77 |ng to this throw| 00001f20 62 61 63 6b 0a 09 09 66 69 6c 65 29 2e 0a 09 23 |back...file)...#| 00001f30 34 09 50 6f 69 6e 74 65 72 20 74 6f 20 61 20 6c |4.Pointer to a l| 00001f40 69 73 74 20 6f 66 20 73 65 61 72 63 68 2f 65 72 |ist of search/er| 00001f50 72 6f 72 2c 20 6f 66 66 73 65 74 73 2f 6c 69 6e |ror, offsets/lin| 00001f60 65 20 6e 75 6d 62 65 72 73 2e 0a 09 09 54 68 65 |e numbers....The| 00001f70 20 6c 69 73 74 20 69 73 20 74 65 72 6d 69 6e 61 | list is termina| 00001f80 74 65 64 20 62 79 20 2d 31 2e 0a 09 09 28 54 68 |ted by -1....(Th| 00001f90 65 73 65 20 61 72 65 20 74 68 65 20 6f 66 66 73 |ese are the offs| 00001fa0 65 74 73 20 74 6f 20 62 65 20 75 70 64 61 74 65 |ets to be update| 00001fb0 64 20 77 68 65 6e 20 63 68 61 6e 67 65 73 20 61 |d when changes a| 00001fc0 72 65 20 6d 61 64 65 0a 09 09 74 6f 20 74 68 65 |re made...to the| 00001fd0 20 66 69 6c 65 20 77 69 74 68 20 6e 61 6d 65 20 | file with name | 00001fe0 23 30 20 61 6e 64 20 66 69 6c 65 20 62 6c 6f 63 |#0 and file bloc| 00001ff0 6b 20 6f 66 66 73 65 74 20 69 6e 20 23 38 29 2e |k offset in #8).| 00002000 0a 09 23 38 09 4f 66 66 73 65 74 20 6f 66 20 66 |..#8.Offset of f| 00002010 69 6c 65 20 28 6e 61 6d 65 20 67 69 76 65 6e 20 |ile (name given | 00002020 69 6e 20 23 30 29 20 69 66 20 61 6c 72 65 61 64 |in #0) if alread| 00002030 79 20 6c 6f 61 64 65 64 20 69 6e 74 6f 20 5a 61 |y loaded into Za| 00002040 70 2e 0a 09 09 2d 31 20 69 66 20 66 69 6c 65 20 |p....-1 if file | 00002050 68 61 73 20 6e 6f 74 20 62 65 65 6e 20 6c 6f 6f |has not been loo| 00002060 6b 65 64 20 66 6f 72 2e 20 49 66 20 74 68 65 20 |ked for. If the | 00002070 66 69 6c 65 20 69 73 20 6c 6f 61 64 65 64 0a 09 |file is loaded..| 00002080 09 74 68 65 6e 20 61 6e 79 20 63 68 61 6e 67 65 |.then any change| 00002090 73 20 74 6f 20 74 68 65 20 66 69 6c 65 20 63 61 |s to the file ca| 000020a0 75 73 65 20 74 68 65 20 6c 69 73 74 20 69 6e 20 |use the list in | 000020b0 23 34 20 74 6f 20 62 65 0a 09 09 75 70 64 61 74 |#4 to be...updat| 000020c0 65 64 2e 0a 09 23 31 32 09 46 6c 61 67 73 3a 09 |ed...#12.Flags:.| 000020d0 62 30 09 53 65 74 20 69 66 20 23 34 20 70 6f 69 |b0.Set if #4 poi| 000020e0 6e 74 73 20 74 6f 20 6c 69 6e 65 20 6e 75 6d 73 |nts to line nums| 000020f0 2c 20 6e 6f 74 20 6f 66 66 73 65 74 73 2e 0a 09 |, not offsets...| 00002100 09 09 09 54 68 65 20 6c 69 6e 65 20 6e 75 6d 62 |...The line numb| 00002110 65 72 73 20 61 72 65 20 63 6f 6e 76 65 72 74 65 |ers are converte| 00002120 64 20 74 6f 20 6f 66 66 73 65 74 73 0a 09 09 09 |d to offsets....| 00002130 09 77 68 65 6e 20 74 68 72 6f 77 62 61 63 6b 20 |.when throwback | 00002140 6d 6f 64 65 20 6c 6f 61 64 73 20 74 68 65 20 66 |mode loads the f| 00002150 69 6c 65 2e 0a 09 09 09 62 31 2d 62 37 09 72 65 |ile.....b1-b7.re| 00002160 73 65 72 76 65 64 0a 09 09 09 62 38 2d 62 31 35 |served....b8-b15| 00002170 09 4e 75 6d 62 65 72 20 6f 66 20 6c 69 6e 65 73 |.Number of lines| 00002180 20 68 65 61 64 69 6e 67 20 65 61 63 68 20 62 6c | heading each bl| 00002190 6f 63 6b 2e 0a 09 09 09 09 54 68 65 20 66 6f 72 |ock......The for| 000021a0 6d 61 74 20 6f 66 20 74 68 65 20 74 68 72 6f 77 |mat of the throw| 000021b0 62 61 63 6b 20 62 75 66 66 65 72 20 6d 75 73 74 |back buffer must| 000021c0 0a 09 09 09 09 62 65 20 3c 66 69 6c 65 20 68 65 |.....be <file he| 000021d0 61 64 65 72 20 70 61 72 61 3e 20 3c 6c 69 73 74 |ader para> <list| 000021e0 20 6f 66 20 6d 61 74 63 68 65 73 20 70 61 72 61 | of matches para| 000021f0 3e 0a 09 09 09 09 3c 6e 65 78 74 20 66 69 6c 65 |>.....<next file| 00002200 20 68 65 61 64 65 72 20 70 61 72 61 3e 20 65 74 | header para> et| 00002210 63 2e 20 54 68 69 73 20 64 65 74 61 69 6c 73 0a |c. This details.| 00002220 09 09 09 09 74 68 65 20 6e 75 6d 62 65 72 20 6f |....the number o| 00002230 66 20 6c 69 6e 65 73 20 6f 66 20 68 65 61 64 69 |f lines of headi| 00002240 6e 67 2f 69 6e 66 6f 20 74 68 61 74 20 74 68 65 |ng/info that the| 00002250 0a 09 09 09 09 3c 6c 69 73 74 20 6f 66 20 6d 61 |.....<list of ma| 00002260 74 63 68 65 73 20 70 61 72 61 3e 20 73 74 61 72 |tches para> star| 00002270 74 73 20 6f 66 66 20 77 69 74 68 0a 09 09 09 09 |ts off with.....| 00002280 62 65 66 6f 72 65 20 6c 69 73 74 69 6e 67 20 74 |before listing t| 00002290 68 65 20 6d 61 74 63 68 65 73 20 28 61 74 20 6f |he matches (at o| 000022a0 6e 65 20 6d 61 74 63 68 0a 09 09 09 09 70 65 72 |ne match.....per| 000022b0 20 6c 69 6e 65 20 63 6f 72 72 65 73 70 6f 6e 64 | line correspond| 000022c0 69 6e 67 20 74 6f 20 74 68 65 20 6f 66 66 73 65 |ing to the offse| 000022d0 74 73 0a 09 09 09 09 70 6f 69 6e 74 65 64 20 74 |ts.....pointed t| 000022e0 6f 20 62 79 20 23 34 29 2e 0a 09 09 09 62 31 36 |o by #4).....b16| 000022f0 2d 62 32 33 09 53 6f 75 72 63 65 3a 20 28 66 6f |-b23.Source: (fo| 00002300 72 20 69 6e 66 6f 20 70 75 72 70 6f 73 65 73 29 |r info purposes)| 00002310 0a 09 09 09 09 30 3d 53 65 61 72 63 68 20 74 68 |.....0=Search th| 00002320 72 6f 77 62 61 63 6b 20 28 46 37 29 0a 09 09 09 |rowback (F7)....| 00002330 09 31 3d 43 20 54 68 72 6f 77 62 61 63 6b 20 28 |.1=C Throwback (| 00002340 45 67 20 21 43 43 29 0a 09 09 09 09 32 3d 43 20 |Eg !CC).....2=C | 00002350 49 6e 66 6f 20 28 45 67 20 21 46 69 6e 64 29 2e |Info (Eg !Find).| 00002360 0a 09 09 09 62 32 34 2d 62 33 31 20 72 65 73 65 |....b24-b31 rese| 00002370 72 76 65 64 0a 0a 66 5f 63 6d 6f 64 65 0a 54 68 |rved..f_cmode.Th| 00002380 69 73 20 67 69 76 65 73 20 74 68 65 20 6d 6f 64 |is gives the mod| 00002390 65 20 6e 75 6d 62 65 72 20 6f 66 20 74 68 65 20 |e number of the | 000023a0 6d 6f 64 65 20 27 6f 77 6e 69 6e 67 27 20 74 68 |mode 'owning' th| 000023b0 69 73 20 66 69 6c 65 20 28 2d 31 20 69 66 20 6e |is file (-1 if n| 000023c0 6f 6e 65 29 2e 20 54 68 65 0a 6d 6f 64 65 20 69 |one). The.mode i| 000023d0 73 20 63 61 6c 6c 65 64 20 77 68 65 6e 20 74 68 |s called when th| 000023e0 65 20 66 69 6c 65 20 69 73 20 64 65 6c 65 74 65 |e file is delete| 000023f0 64 20 28 65 67 20 61 20 74 61 73 6b 77 69 6e 64 |d (eg a taskwind| 00002400 6f 77 29 2e 20 54 68 65 20 6d 6f 64 65 20 6d 61 |ow). The mode ma| 00002410 79 20 75 73 65 0a 74 68 65 20 77 6f 72 64 20 66 |y use.the word f| 00002420 5f 73 6f 75 72 63 65 20 74 6f 20 73 74 6f 72 65 |_source to store| 00002430 20 70 61 72 61 6d 65 74 65 72 73 20 61 62 6f 75 | parameters abou| 00002440 74 20 74 68 65 20 66 69 6c 65 2e 20 28 45 67 20 |t the file. (Eg | 00002450 66 5f 73 6f 75 72 63 65 20 77 69 6c 6c 0a 75 73 |f_source will.us| 00002460 75 61 6c 6c 79 20 62 65 20 73 65 74 20 62 79 20 |ually be set by | 00002470 74 68 65 20 65 78 74 65 6e 73 69 6f 6e 20 6d 6f |the extension mo| 00002480 64 65 20 74 6f 20 70 6f 69 6e 74 20 74 6f 20 61 |de to point to a| 00002490 20 64 61 74 61 20 62 6c 6f 63 6b 29 2e 20 54 6f | data block). To| 000024a0 20 63 6c 61 69 6d 20 74 68 65 0a 66 69 6c 65 2c | claim the.file,| 000024b0 20 73 69 6d 70 6c 79 20 63 68 65 63 6b 20 74 68 | simply check th| 000024c0 61 74 20 74 68 69 73 20 77 6f 72 64 20 69 73 20 |at this word is | 000024d0 2d 31 20 61 6e 64 20 74 68 65 6e 20 70 6f 6b 65 |-1 and then poke| 000024e0 20 79 6f 75 72 20 6d 6f 64 65 20 6e 75 6d 62 65 | your mode numbe| 000024f0 72 20 69 6e 2e 0a 55 73 65 20 74 68 65 20 65 6e |r in..Use the en| 00002500 74 72 79 20 70 6f 69 6e 74 20 65 5f 69 6e 69 74 |try point e_init| 00002510 20 77 69 74 68 20 72 65 61 73 6f 6e 20 63 6f 64 | with reason cod| 00002520 65 20 33 20 74 6f 20 66 72 65 65 20 61 6e 79 20 |e 3 to free any | 00002530 64 61 74 61 20 79 6f 75 20 68 61 76 65 0a 73 74 |data you have.st| 00002540 6f 72 65 64 20 61 73 73 6f 63 69 61 74 65 64 20 |ored associated | 00002550 77 69 74 68 20 74 68 69 73 20 66 69 6c 65 20 28 |with this file (| 00002560 61 6e 64 20 70 6f 69 6e 74 65 64 20 74 6f 20 62 |and pointed to b| 00002570 79 20 66 5f 73 6f 75 72 63 65 29 2e 20 54 68 69 |y f_source). Thi| 00002580 73 20 6d 6f 64 65 20 69 73 0a 4e 4f 54 20 6e 65 |s mode is.NOT ne| 00002590 63 65 73 73 61 72 69 6c 79 20 74 68 65 20 6d 6f |cessarily the mo| 000025a0 64 65 20 74 68 65 20 66 69 6c 65 20 69 73 20 64 |de the file is d| 000025b0 69 73 70 6c 61 79 65 64 20 69 6e 2e 0a |isplayed in..| 000025bd