Home » Archimedes archive » Acorn User » Acorn User - Shareware Collection (1993).adf » Zap » !Zap/Docs/E-File
!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 » Acorn User » Acorn User - Shareware Collection (1993).adf » Zap |
Filename: | !Zap/Docs/E-File |
Read OK: | ✔ |
File size: | 19B0 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 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. 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! The file variables are detailed below. Use E-Library to set them up. f_ptr Address of file buffer/-1 if file is dead. 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 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 free. (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_yank Offset in the undo buffer of the current yank source position / -1. 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_res0 Reserved. 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. f_res1 Reserved. f_res2 Reserved. 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. Use Zap_NewLinkEntry to add links. The links are used by the throwback system. The links list consists of a list of 16 byte blocks terminated by -1. The block format is #0 Pointer to file name of associated file (with match/error) #4 Pointer to a list of search/error, offsets/line numbers. The list is terminated by -1. #8 Offset of file (given in #0) if already loaded into zap -1 if file has not been looked for. #12 Flags: b0 Set if #4 points to line nums, not offsets. b1-b7 reserved b8-b15 Number of lines heading each block b16-b23 Source: 0=search 1=C Throwback 2=C Info 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).
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 6f 74 65 20 74 68 61 74 20 66 5f 70 |...Note that f_p| 00000620 74 72 20 6d 61 79 20 63 68 61 6e 67 65 20 6f 6e |tr may change on| 00000630 20 61 6e 79 20 68 65 61 70 20 62 6c 6f 63 6b 20 | any heap block | 00000640 63 6c 61 69 6d 2c 20 6f 72 20 66 69 6c 65 20 69 |claim, or file i| 00000650 6e 73 65 72 74 2f 64 65 6c 65 74 65 2e 0a 54 68 |nsert/delete..Th| 00000660 75 73 20 61 6c 6c 20 74 68 65 20 6f 74 68 65 72 |us all the other| 00000670 20 76 61 72 69 61 62 6c 65 73 20 61 72 65 20 73 | variables are s| 00000680 74 6f 72 65 64 20 61 73 20 6f 66 66 73 65 74 73 |tored as offsets| 00000690 20 66 72 6f 6d 20 74 68 69 73 2e 20 59 6f 75 20 | from this. You | 000006a0 73 68 6f 75 6c 64 20 75 73 65 0a 74 68 65 20 63 |should use.the c| 000006b0 61 6c 6c 20 5a 61 70 5f 53 70 6c 69 74 42 75 66 |all Zap_SplitBuf| 000006c0 66 65 72 20 74 6f 20 63 68 61 6e 67 65 20 74 68 |fer to change th| 000006d0 65 20 62 75 66 66 65 72 20 6c 65 6e 67 74 68 20 |e buffer length | 000006e0 6f 72 20 73 70 6c 69 74 20 70 6f 73 69 74 69 6f |or split positio| 000006f0 6e 2e 20 59 6f 75 0a 73 68 6f 75 6c 64 20 75 73 |n. You.should us| 00000700 65 20 74 68 65 20 63 61 6c 6c 20 5a 61 70 5f 43 |e the call Zap_C| 00000710 6f 6d 6d 61 6e 64 20 74 6f 20 69 6e 73 65 72 74 |ommand to insert| 00000720 2f 64 65 6c 65 74 65 20 64 61 74 61 2e 20 49 6e |/delete data. In| 00000730 73 65 72 74 69 6e 67 20 64 61 74 61 0a 6d 61 6e |serting data.man| 00000740 75 61 6c 6c 79 20 61 6e 64 20 6b 65 65 70 69 6e |ually and keepin| 00000750 67 20 61 6c 6c 20 74 68 65 20 76 61 72 69 61 62 |g all the variab| 00000760 6c 65 73 2f 75 6e 64 6f 20 62 75 66 66 65 72 2f |les/undo buffer/| 00000770 73 63 72 65 65 6e 20 75 70 64 61 74 65 64 20 72 |screen updated r| 00000780 65 71 75 69 72 65 73 20 61 0a 6c 6f 74 20 6f 66 |equires a.lot of| 00000790 20 63 6f 64 65 20 69 66 20 79 6f 75 20 77 61 6e | code if you wan| 000007a0 74 20 74 6f 20 64 6f 20 69 74 20 79 6f 75 72 73 |t to do it yours| 000007b0 65 6c 66 2e 0a 0a 46 6f 72 20 6d 6f 73 74 20 73 |elf...For most s| 000007c0 75 62 73 20 69 6e 20 7a 61 70 2c 20 61 20 70 6f |ubs in zap, a po| 000007d0 73 69 74 69 6f 6e 20 69 6e 20 74 68 65 20 66 69 |sition in the fi| 000007e0 6c 65 20 69 73 20 67 69 76 65 6e 20 61 73 20 61 |le is given as a| 000007f0 6e 20 6f 66 66 73 65 74 20 66 72 6f 6d 20 74 68 |n offset from th| 00000800 65 0a 66 69 6c 65 20 73 74 61 72 74 20 28 69 6e |e.file start (in| 00000810 20 74 68 65 20 72 61 6e 67 65 20 30 20 74 6f 20 | the range 0 to | 00000820 74 68 65 20 6c 65 6e 67 74 68 20 6f 66 20 74 68 |the length of th| 00000830 65 20 66 69 6c 65 29 2e 20 54 68 65 73 65 20 66 |e file). These f| 00000840 69 6c 65 20 6f 66 66 73 65 74 73 0a 73 68 6f 75 |ile offsets.shou| 00000850 6c 64 20 6e 6f 74 20 62 65 20 63 6f 6e 66 75 73 |ld not be confus| 00000860 65 64 20 77 69 74 68 20 74 68 65 20 66 69 6c 65 |ed with the file| 00000870 20 62 6c 6f 63 6b 20 6f 66 66 73 65 74 73 20 64 | block offsets d| 00000880 65 73 63 72 69 62 65 64 20 69 6e 20 74 68 65 20 |escribed in the | 00000890 66 69 72 73 74 0a 70 61 72 61 67 72 61 70 68 2e |first.paragraph.| 000008a0 20 57 68 65 6e 20 49 20 73 61 79 20 27 66 69 6c | When I say 'fil| 000008b0 65 20 6f 66 66 73 65 74 27 2c 20 69 74 20 73 68 |e offset', it sh| 000008c0 6f 75 6c 64 20 62 65 20 63 6c 65 61 72 20 66 72 |ould be clear fr| 000008d0 6f 6d 20 74 68 65 20 63 6f 6e 74 65 78 74 20 77 |om the context w| 000008e0 68 61 74 0a 49 20 6d 65 61 6e 2e 0a 0a 54 6f 20 |hat.I mean...To | 000008f0 72 65 61 64 20 74 68 65 20 62 79 74 65 20 61 74 |read the byte at| 00000900 20 6f 66 66 73 65 74 20 52 30 20 79 6f 75 20 73 | offset R0 you s| 00000910 68 6f 75 6c 64 20 75 73 65 20 63 6f 64 65 20 6f |hould use code o| 00000920 66 20 74 68 65 20 66 6f 72 6d 3a 0a 0a 09 52 45 |f the form:...RE| 00000930 4d 20 52 30 3d 66 69 6c 65 20 6f 66 66 73 65 74 |M R0=file offset| 00000940 20 52 39 3d 66 69 6c 65 0a 09 52 45 4d 20 4f 6e | R9=file..REM On| 00000950 20 65 78 69 74 20 52 31 20 63 6f 72 72 75 70 74 | exit R1 corrupt| 00000960 65 64 20 61 6e 64 20 52 30 3d 62 79 74 65 20 72 |ed and R0=byte r| 00000970 65 61 64 2e 0a 0a 09 4c 44 52 20 52 31 2c 5b 52 |ead....LDR R1,[R| 00000980 39 2c 23 66 5f 73 70 6c 69 74 6f 5d 09 09 5c 20 |9,#f_splito]..\ | 00000990 66 69 6e 64 20 74 68 65 20 73 70 6c 69 74 20 6f |find the split o| 000009a0 66 66 73 65 74 20 69 6e 20 74 68 65 20 62 75 66 |ffset in the buf| 000009b0 66 65 72 0a 09 43 4d 50 20 52 30 2c 52 31 09 09 |fer..CMP R0,R1..| 000009c0 09 5c 20 61 72 65 20 77 65 20 69 6e 20 74 68 65 |.\ are we in the| 000009d0 20 62 6f 74 74 6f 6d 20 6f 72 20 74 6f 70 20 68 | bottom or top h| 000009e0 61 6c 66 3f 0a 09 4c 44 52 43 53 20 52 31 2c 5b |alf?..LDRCS R1,[| 000009f0 52 39 2c 23 66 5f 73 70 6c 69 74 73 5d 0a 09 41 |R9,#f_splits]..A| 00000a00 44 44 43 53 20 52 30 2c 52 30 2c 52 31 09 09 09 |DDCS R0,R0,R1...| 00000a10 5c 20 69 66 20 69 6e 20 74 68 65 20 74 6f 70 20 |\ if in the top | 00000a20 68 61 6c 66 2c 20 73 6b 69 70 20 74 68 65 20 73 |half, skip the s| 00000a30 70 6c 69 74 0a 09 4c 44 52 20 52 31 2c 5b 52 39 |plit..LDR R1,[R9| 00000a40 2c 23 66 5f 70 74 72 5d 09 09 5c 20 73 74 61 72 |,#f_ptr]..\ star| 00000a50 74 20 61 64 64 72 65 73 73 20 6f 66 20 66 69 6c |t address of fil| 00000a60 65 0a 09 4c 44 52 42 20 52 30 2c 5b 52 31 2c 52 |e..LDRB R0,[R1,R| 00000a70 30 5d 09 09 09 5c 20 72 65 61 64 20 74 68 65 20 |0]...\ read the | 00000a80 62 79 74 65 0a 0a 54 6f 20 72 65 61 64 20 6d 75 |byte..To read mu| 00000a90 6c 74 69 70 6c 65 20 62 79 74 65 73 20 79 6f 75 |ltiple bytes you| 00000aa0 20 73 68 6f 75 6c 64 20 6f 62 76 69 6f 75 73 6c | should obviousl| 00000ab0 79 20 75 73 65 20 6d 6f 72 65 20 65 66 66 69 63 |y use more effic| 00000ac0 69 65 6e 74 20 63 6f 64 65 21 20 54 68 65 20 66 |ient code! The f| 00000ad0 69 6c 65 0a 76 61 72 69 61 62 6c 65 73 20 61 72 |ile.variables ar| 00000ae0 65 20 64 65 74 61 69 6c 65 64 20 62 65 6c 6f 77 |e detailed below| 00000af0 2e 20 55 73 65 20 45 2d 4c 69 62 72 61 72 79 20 |. Use E-Library | 00000b00 74 6f 20 73 65 74 20 74 68 65 6d 20 75 70 2e 0a |to set them up..| 00000b10 0a 66 5f 70 74 72 0a 41 64 64 72 65 73 73 20 6f |.f_ptr.Address o| 00000b20 66 20 66 69 6c 65 20 62 75 66 66 65 72 2f 2d 31 |f file buffer/-1| 00000b30 20 69 66 20 66 69 6c 65 20 69 73 20 64 65 61 64 | if file is dead| 00000b40 2e 20 49 66 20 79 6f 75 20 73 63 61 6e 20 74 68 |. If you scan th| 00000b50 72 6f 75 67 68 20 74 68 65 20 66 69 6c 65 0a 62 |rough the file.b| 00000b60 6c 6f 63 6b 73 2c 20 79 6f 75 20 73 68 6f 75 6c |locks, you shoul| 00000b70 64 20 61 6c 77 61 79 73 20 63 68 65 63 6b 20 74 |d always check t| 00000b80 68 69 73 20 77 6f 72 64 20 74 6f 20 63 68 65 63 |his word to chec| 00000b90 6b 20 74 68 65 20 66 69 6c 65 20 69 73 20 6e 6f |k the file is no| 00000ba0 74 20 64 65 61 64 2e 0a 0a 66 5f 62 75 66 6c 0a |t dead...f_bufl.| 00000bb0 4c 65 6e 67 74 68 20 6f 66 20 66 69 6c 65 20 62 |Length of file b| 00000bc0 75 66 66 65 72 20 28 6d 75 6c 74 69 70 6c 65 20 |uffer (multiple | 00000bd0 6f 66 20 34 29 2e 20 53 65 65 20 70 69 63 20 61 |of 4). See pic a| 00000be0 62 6f 76 65 2e 0a 0a 66 5f 6c 65 6e 0a 4c 65 6e |bove...f_len.Len| 00000bf0 67 74 68 20 6f 66 20 66 69 6c 65 20 73 74 6f 72 |gth of file stor| 00000c00 65 64 20 69 6e 20 74 68 65 20 62 75 66 66 65 72 |ed in the buffer| 00000c10 20 28 3d 66 5f 62 75 66 6c 2d 66 5f 73 70 6c 69 | (=f_bufl-f_spli| 00000c20 74 73 29 2e 0a 0a 66 5f 6e 61 6d 65 0a 4e 61 6d |ts)...f_name.Nam| 00000c30 65 20 6f 66 20 74 68 65 20 66 69 6c 65 2e 0a 0a |e of the file...| 00000c40 66 5f 6c 6f 61 64 0a 4c 6f 61 64 20 61 64 64 72 |f_load.Load addr| 00000c50 65 73 73 20 6f 66 20 74 68 65 20 66 69 6c 65 2e |ess of the file.| 00000c60 0a 0a 66 5f 65 78 65 63 0a 45 78 65 63 75 74 69 |..f_exec.Executi| 00000c70 6f 6e 20 61 64 64 72 65 73 73 20 6f 66 20 74 68 |on address of th| 00000c80 65 20 66 69 6c 65 2e 0a 0a 66 5f 66 6c 61 67 73 |e file...f_flags| 00000c90 0a 46 69 6c 65 20 66 6c 61 67 73 2e 20 53 65 65 |.File flags. See| 00000ca0 20 45 2d 46 6c 61 67 73 20 66 6f 72 20 74 68 65 | E-Flags for the| 00000cb0 20 6d 65 61 6e 69 6e 67 20 6f 66 20 74 68 65 20 | meaning of the | 00000cc0 62 69 74 73 20 69 6e 20 74 68 69 73 20 77 6f 72 |bits in this wor| 00000cd0 64 2e 0a 0a 66 5f 75 70 74 72 0a 50 6f 69 6e 74 |d...f_uptr.Point| 00000ce0 65 72 20 74 6f 20 74 68 65 20 75 6e 64 6f 20 62 |er to the undo b| 00000cf0 75 66 66 65 72 2e 20 54 68 65 20 75 6e 64 6f 20 |uffer. The undo | 00000d00 62 75 66 66 65 72 20 63 6f 6e 73 69 73 74 73 20 |buffer consists | 00000d10 6f 66 20 61 20 6c 69 73 74 20 6f 66 20 62 6c 6f |of a list of blo| 00000d20 63 6b 73 20 6f 66 0a 76 61 72 69 61 62 6c 65 20 |cks of.variable | 00000d30 6c 65 6e 67 74 68 2e 20 54 68 65 20 73 74 61 72 |length. The star| 00000d40 74 20 6f 66 20 61 20 62 6c 6f 63 6b 20 69 73 20 |t of a block is | 00000d50 69 6e 64 69 63 61 74 65 64 20 62 79 20 62 69 74 |indicated by bit| 00000d60 20 33 31 20 6f 66 20 74 68 61 74 20 77 6f 72 64 | 31 of that word| 00000d70 0a 62 65 69 6e 67 20 73 65 74 2e 20 49 6e 20 67 |.being set. In g| 00000d80 65 6e 65 72 61 6c 20 74 68 65 20 66 69 72 73 74 |eneral the first| 00000d90 20 77 6f 72 64 20 6f 66 20 74 68 65 20 62 6c 6f | word of the blo| 00000da0 63 6b 20 68 61 73 20 66 6f 72 6d 61 74 3a 0a 09 |ck has format:..| 00000db0 62 33 31 20 3d 31 20 28 53 65 74 20 74 6f 20 69 |b31 =1 (Set to i| 00000dc0 6e 64 69 63 61 74 65 20 62 6c 6f 63 6b 20 73 74 |ndicate block st| 00000dd0 61 72 74 29 2e 0a 09 62 33 30 20 53 65 74 20 69 |art)...b30 Set i| 00000de0 66 20 74 68 65 20 63 6f 6d 6d 61 6e 64 20 73 68 |f the command sh| 00000df0 6f 75 6c 64 20 62 65 20 75 6e 64 6f 6e 65 20 69 |ould be undone i| 00000e00 6e 20 6f 6e 65 20 67 6f 2e 20 28 61 73 20 6f 70 |n one go. (as op| 00000e10 70 6f 73 65 64 20 74 6f 20 6f 6e 65 0a 09 20 20 |posed to one.. | 00000e20 20 20 63 68 61 72 61 63 74 65 72 20 61 74 20 61 | character at a| 00000e30 20 74 69 6d 65 20 66 6f 72 20 63 6f 6e 63 61 74 | time for concat| 00000e40 65 6e 61 74 65 64 20 62 6c 6f 63 6b 73 29 2e 0a |enated blocks)..| 00000e50 09 62 32 39 20 53 65 74 20 69 66 20 74 68 65 20 |.b29 Set if the | 00000e60 64 61 74 61 20 70 6f 69 6e 74 65 64 20 74 6f 20 |data pointed to | 00000e70 62 79 20 74 68 65 20 63 6f 6d 6d 61 6e 64 20 6e |by the command n| 00000e80 65 65 64 20 6e 6f 74 20 62 65 20 66 72 65 65 2e |eed not be free.| 00000e90 20 28 54 68 69 73 0a 09 20 20 20 20 69 73 20 75 | (This.. is u| 00000ea0 73 65 64 20 6f 6e 20 61 6e 20 75 6e 64 6f 20 77 |sed on an undo w| 00000eb0 68 65 6e 20 62 6c 6f 63 6b 73 20 61 72 65 20 70 |hen blocks are p| 00000ec0 6f 69 6e 74 65 64 20 74 6f 20 74 77 69 63 65 29 |ointed to twice)| 00000ed0 2e 0a 09 62 32 36 2d 62 32 38 20 43 6f 6d 6d 61 |...b26-b28 Comma| 00000ee0 6e 64 20 6e 75 6d 62 65 72 2e 20 41 73 20 66 6f |nd number. As fo| 00000ef0 72 20 52 30 20 69 6e 20 5a 61 70 5f 43 6f 6d 6d |r R0 in Zap_Comm| 00000f00 61 6e 64 20 77 69 74 68 20 61 64 64 69 74 69 6f |and with additio| 00000f10 6e 73 3a 0a 09 09 30 20 3d 20 66 61 73 74 20 75 |ns:...0 = fast u| 00000f20 6e 64 6f 20 70 6f 69 6e 74 65 72 20 28 66 61 73 |ndo pointer (fas| 00000f30 74 20 72 65 64 6f 20 69 66 20 62 33 30 20 73 65 |t redo if b30 se| 00000f40 74 29 0a 09 09 37 20 3d 20 73 74 61 72 74 6f 70 |t)...7 = startop| 00000f50 20 70 6f 69 6e 74 65 72 20 28 73 74 6f 70 6f 70 | pointer (stopop| 00000f60 20 70 6f 69 6e 74 65 72 20 69 66 20 62 33 30 20 | pointer if b30 | 00000f70 73 65 74 29 0a 09 62 30 2d 62 32 37 20 47 69 76 |set)..b0-b27 Giv| 00000f80 65 73 20 74 68 65 20 63 6f 6d 6d 61 6e 64 73 20 |es the commands | 00000f90 66 69 72 73 74 20 70 61 72 61 6d 65 74 65 72 2c |first parameter,| 00000fa0 20 75 73 75 61 6c 6c 79 20 61 20 66 69 6c 65 20 | usually a file | 00000fb0 6f 66 66 73 65 74 0a 09 09 54 68 69 73 20 63 6f |offset...This co| 00000fc0 72 72 65 73 70 6f 6e 64 73 20 74 6f 20 72 65 67 |rresponds to reg| 00000fd0 69 73 74 65 72 20 52 31 20 69 6e 20 5a 61 70 5f |ister R1 in Zap_| 00000fe0 43 6f 6d 6d 61 6e 64 2e 0a 54 68 65 20 6f 74 68 |Command..The oth| 00000ff0 65 72 20 77 6f 72 64 73 20 63 6f 72 72 65 73 70 |er words corresp| 00001000 6f 6e 64 20 74 6f 20 72 65 67 69 73 74 65 72 73 |ond to registers| 00001010 20 52 32 20 6f 6e 77 61 72 64 73 20 77 68 65 6e | R2 onwards when| 00001020 20 63 61 6c 6c 69 6e 67 20 7a 61 70 20 63 6f 6d | calling zap com| 00001030 6d 61 6e 64 2e 0a 0a 66 5f 75 62 75 66 6c 0a 54 |mand...f_ubufl.T| 00001040 6f 74 61 6c 20 6c 65 6e 67 74 68 20 6f 66 20 74 |otal length of t| 00001050 68 65 20 75 6e 64 6f 20 62 75 66 66 65 72 2e 0a |he undo buffer..| 00001060 0a 66 5f 75 6c 65 6e 0a 4c 65 6e 67 74 68 20 6f |.f_ulen.Length o| 00001070 66 20 76 61 6c 69 64 20 64 61 74 61 20 69 6e 20 |f valid data in | 00001080 74 68 65 20 75 6e 64 6f 20 62 75 66 66 65 72 2e |the undo buffer.| 00001090 0a 0a 66 5f 75 6e 64 6f 0a 4f 66 66 73 65 74 20 |..f_undo.Offset | 000010a0 6f 66 20 74 68 65 20 75 6e 64 6f 20 70 6f 69 6e |of the undo poin| 000010b0 74 65 72 20 69 6e 20 74 68 65 20 75 6e 64 6f 20 |ter in the undo | 000010c0 62 75 66 66 65 72 2e 0a 0a 66 5f 75 6e 64 6f 70 |buffer...f_undop| 000010d0 0a 4f 66 66 73 65 74 20 6f 66 20 74 68 65 20 75 |.Offset of the u| 000010e0 6e 64 6f 20 73 75 62 70 6f 69 6e 74 65 72 20 69 |ndo subpointer i| 000010f0 6e 20 74 68 65 20 62 6c 6f 63 6b 20 70 6f 69 6e |n the block poin| 00001100 74 65 72 20 74 6f 20 62 79 20 66 5f 75 6e 64 6f |ter to by f_undo| 00001110 2e 20 49 65 20 69 74 20 67 69 76 65 73 0a 74 68 |. Ie it gives.th| 00001120 65 20 6e 75 6d 62 65 72 20 6f 66 20 63 68 61 72 |e number of char| 00001130 61 63 74 65 72 73 20 6c 65 66 74 20 74 6f 20 75 |acters left to u| 00001140 6e 64 6f 20 69 6e 20 74 68 65 20 6f 70 65 72 61 |ndo in the opera| 00001150 74 69 6f 6e 20 63 75 72 72 65 6e 74 6c 79 20 62 |tion currently b| 00001160 65 69 6e 67 0a 75 6e 64 6f 6e 65 2e 0a 0a 66 5f |eing.undone...f_| 00001170 79 61 6e 6b 0a 4f 66 66 73 65 74 20 69 6e 20 74 |yank.Offset in t| 00001180 68 65 20 75 6e 64 6f 20 62 75 66 66 65 72 20 6f |he undo buffer o| 00001190 66 20 74 68 65 20 63 75 72 72 65 6e 74 20 79 61 |f the current ya| 000011a0 6e 6b 20 73 6f 75 72 63 65 20 70 6f 73 69 74 69 |nk source positi| 000011b0 6f 6e 20 2f 20 2d 31 2e 0a 0a 66 5f 73 70 6c 69 |on / -1...f_spli| 000011c0 74 6f 0a 4f 66 66 73 65 74 20 69 6e 20 74 68 65 |to.Offset in the| 000011d0 20 66 69 6c 65 20 62 75 66 66 65 72 20 6f 66 20 | file buffer of | 000011e0 74 68 65 20 63 75 72 72 65 6e 74 20 73 70 6c 69 |the current spli| 000011f0 74 20 70 6f 73 69 74 69 6f 6e 2e 20 53 65 65 20 |t position. See | 00001200 70 69 63 2e 0a 0a 66 5f 73 70 6c 69 74 65 0a 4f |pic...f_splite.O| 00001210 66 66 73 65 74 20 69 6e 20 74 68 65 20 66 69 6c |ffset in the fil| 00001220 65 20 62 75 66 66 65 72 20 6f 66 20 74 68 65 20 |e buffer of the | 00001230 65 6e 64 20 6f 66 20 74 68 65 20 63 75 72 72 65 |end of the curre| 00001240 6e 74 20 73 70 6c 69 74 2e 20 53 65 65 20 70 69 |nt split. See pi| 00001250 63 2e 0a 0a 66 5f 73 70 6c 69 74 73 0a 53 69 7a |c...f_splits.Siz| 00001260 65 20 6f 66 20 74 68 65 20 66 69 6c 65 20 73 70 |e of the file sp| 00001270 6c 69 74 20 28 3d 66 5f 73 70 6c 69 74 65 2d 66 |lit (=f_splite-f| 00001280 5f 73 70 6c 69 74 6f 29 2e 20 53 65 65 20 70 69 |_splito). See pi| 00001290 63 2e 0a 0a 66 5f 6d 70 74 72 0a 50 6f 69 6e 74 |c...f_mptr.Point| 000012a0 65 72 20 74 6f 20 74 68 65 20 6d 61 72 6b 65 72 |er to the marker| 000012b0 20 62 75 66 66 65 72 2e 20 54 68 65 20 6d 61 72 | buffer. The mar| 000012c0 6b 65 72 20 62 75 66 66 65 72 20 69 73 20 61 20 |ker buffer is a | 000012d0 6c 69 73 74 20 6f 66 20 65 6e 74 72 69 65 73 2c |list of entries,| 000012e0 20 65 61 63 68 0a 74 77 6f 20 77 6f 72 64 73 20 | each.two words | 000012f0 6c 6f 6e 67 73 20 6f 66 20 74 68 65 20 66 6f 72 |longs of the for| 00001300 6d 61 74 3a 0a 09 23 30 09 46 69 6c 65 20 6f 66 |mat:..#0.File of| 00001310 66 73 65 74 20 6f 66 20 74 68 65 20 6d 61 72 6b |fset of the mark| 00001320 0a 09 23 34 09 57 69 6e 64 6f 77 20 6f 66 66 73 |..#4.Window offs| 00001330 65 74 20 6f 66 20 74 68 65 20 77 69 6e 64 6f 77 |et of the window| 00001340 20 6d 61 72 6b 20 77 61 73 20 70 6c 61 63 65 20 | mark was place | 00001350 69 6e 20 6f 72 20 2d 31 20 69 66 20 74 68 65 0a |in or -1 if the.| 00001360 09 09 77 69 6e 64 6f 77 20 68 61 73 20 62 65 65 |..window has bee| 00001370 6e 20 64 65 6c 65 74 65 64 20 28 6f 72 20 69 73 |n deleted (or is| 00001380 20 75 6e 73 70 65 63 69 66 69 65 64 29 2e 0a 0a | unspecified)...| 00001390 66 5f 6d 62 75 66 6c 0a 4c 65 6e 67 74 68 20 6f |f_mbufl.Length o| 000013a0 66 20 74 68 65 20 6d 61 72 6b 65 72 20 62 75 66 |f the marker buf| 000013b0 66 65 72 2e 0a 0a 66 5f 6d 6c 65 6e 0a 4c 65 6e |fer...f_mlen.Len| 000013c0 67 74 68 20 6f 66 20 76 61 6c 69 64 20 64 61 74 |gth of valid dat| 000013d0 61 20 69 6e 20 74 68 65 20 6d 61 72 6b 65 72 20 |a in the marker | 000013e0 62 75 66 66 65 72 2e 0a 0a 66 5f 6d 61 72 6b 0a |buffer...f_mark.| 000013f0 43 75 72 72 65 6e 74 20 6f 66 66 73 65 74 20 69 |Current offset i| 00001400 6e 20 74 68 65 20 6d 61 72 6b 65 72 20 62 75 66 |n the marker buf| 00001410 66 65 72 2e 0a 0a 66 5f 72 65 73 30 0a 52 65 73 |fer...f_res0.Res| 00001420 65 72 76 65 64 2e 0a 0a 66 5f 73 6f 75 72 63 65 |erved...f_source| 00001430 0a 54 68 69 73 20 77 6f 72 64 20 69 73 20 66 6f |.This word is fo| 00001440 72 20 74 68 65 20 75 73 65 20 6f 66 20 74 68 65 |r the use of the| 00001450 20 6d 6f 64 65 20 27 6f 77 6e 69 6e 67 27 20 74 | mode 'owning' t| 00001460 68 69 73 20 66 69 6c 65 2e 20 53 65 65 20 66 5f |his file. See f_| 00001470 63 6d 6f 64 65 2e 20 49 74 0a 75 73 75 61 6c 6c |cmode. It.usuall| 00001480 79 20 70 6f 69 6e 74 73 20 74 6f 20 61 20 64 61 |y points to a da| 00001490 74 61 20 62 6c 6f 63 6b 20 6f 66 20 69 6e 66 6f |ta block of info| 000014a0 20 74 68 61 74 20 6d 6f 64 65 20 77 61 6e 74 73 | that mode wants| 000014b0 20 74 6f 20 68 6f 6c 64 20 66 6f 72 20 74 68 69 | to hold for thi| 000014c0 73 20 66 69 6c 65 2e 0a 0a 66 5f 72 65 73 31 0a |s file...f_res1.| 000014d0 52 65 73 65 72 76 65 64 2e 0a 0a 66 5f 72 65 73 |Reserved...f_res| 000014e0 32 0a 52 65 73 65 72 76 65 64 2e 0a 0a 66 5f 61 |2.Reserved...f_a| 000014f0 6c 74 65 72 65 64 0a 55 73 65 64 20 62 79 20 5a |ltered.Used by Z| 00001500 61 70 5f 44 6f 43 6f 6d 6d 61 6e 64 3a 20 46 69 |ap_DoCommand: Fi| 00001510 72 73 74 20 61 6c 74 65 72 65 64 20 6f 66 66 73 |rst altered offs| 00001520 65 74 20 69 6e 20 66 69 6c 65 20 2f 20 2d 31 0a |et in file / -1.| 00001530 0a 66 5f 73 68 69 66 74 61 62 6c 65 0a 55 73 65 |.f_shiftable.Use| 00001540 64 20 62 79 20 5a 61 70 5f 44 6f 43 6f 6d 6d 61 |d by Zap_DoComma| 00001550 6e 64 3a 20 46 69 72 73 74 20 75 6e 61 6c 74 65 |nd: First unalte| 00001560 72 65 64 20 6f 66 66 73 65 74 20 69 6e 20 66 69 |red offset in fi| 00001570 6c 65 20 2f 20 2d 31 0a 0a 66 5f 63 68 61 6e 67 |le / -1..f_chang| 00001580 65 0a 55 73 65 64 20 62 79 20 5a 61 70 5f 44 6f |e.Used by Zap_Do| 00001590 43 6f 6d 6d 61 6e 64 3a 20 53 69 67 6e 65 64 20 |Command: Signed | 000015a0 63 68 61 6e 67 65 20 69 6e 20 73 69 7a 65 20 6f |change in size o| 000015b0 66 20 64 61 74 61 2e 0a 0a 66 5f 64 65 70 74 68 |f data...f_depth| 000015c0 0a 55 73 65 64 20 62 79 20 5a 61 70 5f 53 74 61 |.Used by Zap_Sta| 000015d0 72 74 4f 70 3a 20 43 75 72 72 65 6e 74 20 53 74 |rtOp: Current St| 000015e0 61 72 74 4f 70 2f 53 74 6f 70 4f 70 20 6e 65 73 |artOp/StopOp nes| 000015f0 74 65 64 20 64 65 70 74 68 2e 0a 0a 66 5f 6c 69 |ted depth...f_li| 00001600 6e 6b 73 0a 4c 69 6e 6b 73 20 6c 69 73 74 20 62 |nks.Links list b| 00001610 75 66 66 65 72 20 70 6f 69 6e 74 65 72 2e 20 55 |uffer pointer. U| 00001620 73 65 20 5a 61 70 5f 4e 65 77 4c 69 6e 6b 45 6e |se Zap_NewLinkEn| 00001630 74 72 79 20 74 6f 20 61 64 64 20 6c 69 6e 6b 73 |try to add links| 00001640 2e 20 54 68 65 20 6c 69 6e 6b 73 20 61 72 65 0a |. The links are.| 00001650 75 73 65 64 20 62 79 20 74 68 65 20 74 68 72 6f |used by the thro| 00001660 77 62 61 63 6b 20 73 79 73 74 65 6d 2e 20 54 68 |wback system. Th| 00001670 65 20 6c 69 6e 6b 73 20 6c 69 73 74 20 63 6f 6e |e links list con| 00001680 73 69 73 74 73 20 6f 66 20 61 20 6c 69 73 74 20 |sists of a list | 00001690 6f 66 20 31 36 20 62 79 74 65 0a 62 6c 6f 63 6b |of 16 byte.block| 000016a0 73 20 74 65 72 6d 69 6e 61 74 65 64 20 62 79 20 |s terminated by | 000016b0 2d 31 2e 20 54 68 65 20 62 6c 6f 63 6b 20 66 6f |-1. The block fo| 000016c0 72 6d 61 74 20 69 73 0a 09 23 30 09 50 6f 69 6e |rmat is..#0.Poin| 000016d0 74 65 72 20 74 6f 20 66 69 6c 65 20 6e 61 6d 65 |ter to file name| 000016e0 20 6f 66 20 61 73 73 6f 63 69 61 74 65 64 20 66 | of associated f| 000016f0 69 6c 65 20 28 77 69 74 68 20 6d 61 74 63 68 2f |ile (with match/| 00001700 65 72 72 6f 72 29 0a 09 23 34 09 50 6f 69 6e 74 |error)..#4.Point| 00001710 65 72 20 74 6f 20 61 20 6c 69 73 74 20 6f 66 20 |er to a list of | 00001720 73 65 61 72 63 68 2f 65 72 72 6f 72 2c 20 6f 66 |search/error, of| 00001730 66 73 65 74 73 2f 6c 69 6e 65 20 6e 75 6d 62 65 |fsets/line numbe| 00001740 72 73 2e 0a 09 09 54 68 65 20 6c 69 73 74 20 69 |rs....The list i| 00001750 73 20 74 65 72 6d 69 6e 61 74 65 64 20 62 79 20 |s terminated by | 00001760 2d 31 2e 0a 09 23 38 09 4f 66 66 73 65 74 20 6f |-1...#8.Offset o| 00001770 66 20 66 69 6c 65 20 28 67 69 76 65 6e 20 69 6e |f file (given in| 00001780 20 23 30 29 20 69 66 20 61 6c 72 65 61 64 79 20 | #0) if already | 00001790 6c 6f 61 64 65 64 20 69 6e 74 6f 20 7a 61 70 0a |loaded into zap.| 000017a0 09 09 2d 31 20 69 66 20 66 69 6c 65 20 68 61 73 |..-1 if file has| 000017b0 20 6e 6f 74 20 62 65 65 6e 20 6c 6f 6f 6b 65 64 | not been looked| 000017c0 20 66 6f 72 2e 0a 09 23 31 32 09 46 6c 61 67 73 | for...#12.Flags| 000017d0 3a 09 62 30 09 53 65 74 20 69 66 20 23 34 20 70 |:.b0.Set if #4 p| 000017e0 6f 69 6e 74 73 20 74 6f 20 6c 69 6e 65 20 6e 75 |oints to line nu| 000017f0 6d 73 2c 20 6e 6f 74 20 6f 66 66 73 65 74 73 2e |ms, not offsets.| 00001800 0a 09 09 09 62 31 2d 62 37 09 72 65 73 65 72 76 |....b1-b7.reserv| 00001810 65 64 0a 09 09 09 62 38 2d 62 31 35 09 4e 75 6d |ed....b8-b15.Num| 00001820 62 65 72 20 6f 66 20 6c 69 6e 65 73 20 68 65 61 |ber of lines hea| 00001830 64 69 6e 67 20 65 61 63 68 20 62 6c 6f 63 6b 0a |ding each block.| 00001840 09 09 09 62 31 36 2d 62 32 33 09 53 6f 75 72 63 |...b16-b23.Sourc| 00001850 65 3a 20 30 3d 73 65 61 72 63 68 20 31 3d 43 20 |e: 0=search 1=C | 00001860 54 68 72 6f 77 62 61 63 6b 20 32 3d 43 20 49 6e |Throwback 2=C In| 00001870 66 6f 0a 09 09 09 62 32 34 2d 62 33 31 20 72 65 |fo....b24-b31 re| 00001880 73 65 72 76 65 64 0a 0a 66 5f 63 6d 6f 64 65 0a |served..f_cmode.| 00001890 54 68 69 73 20 67 69 76 65 73 20 74 68 65 20 6d |This gives the m| 000018a0 6f 64 65 20 6e 75 6d 62 65 72 20 6f 66 20 74 68 |ode number of th| 000018b0 65 20 6d 6f 64 65 20 27 6f 77 6e 69 6e 67 27 20 |e mode 'owning' | 000018c0 74 68 69 73 20 66 69 6c 65 20 28 2d 31 20 69 66 |this file (-1 if| 000018d0 20 6e 6f 6e 65 29 2e 20 54 68 65 0a 6d 6f 64 65 | none). The.mode| 000018e0 20 69 73 20 63 61 6c 6c 65 64 20 77 68 65 6e 20 | is called when | 000018f0 74 68 65 20 66 69 6c 65 20 69 73 20 64 65 6c 65 |the file is dele| 00001900 74 65 64 20 28 65 67 20 61 20 74 61 73 6b 77 69 |ted (eg a taskwi| 00001910 6e 64 6f 77 29 2e 20 54 68 65 20 6d 6f 64 65 20 |ndow). The mode | 00001920 6d 61 79 20 75 73 65 0a 74 68 65 20 77 6f 72 64 |may use.the word| 00001930 20 66 5f 73 6f 75 72 63 65 20 74 6f 20 73 74 6f | f_source to sto| 00001940 72 65 20 70 61 72 61 6d 65 74 65 72 73 20 61 62 |re parameters ab| 00001950 6f 75 74 20 74 68 65 20 66 69 6c 65 2e 20 28 45 |out the file. (E| 00001960 67 20 66 5f 73 6f 75 72 63 65 20 77 69 6c 6c 0a |g f_source will.| 00001970 75 73 75 61 6c 6c 79 20 62 65 20 73 65 74 20 62 |usually be set b| 00001980 79 20 74 68 65 20 65 78 74 65 6e 73 69 6f 6e 20 |y the extension | 00001990 6d 6f 64 65 20 74 6f 20 70 6f 69 6e 74 20 74 6f |mode to point to| 000019a0 20 61 20 64 61 74 61 20 62 6c 6f 63 6b 29 2e 0a | a data block)..| 000019b0