home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 3 / 3001 < prev    next >
SHell self-extracting ARchive  |  1991-03-07  |  20.0 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: SHell self-extracting ARchive (archive/shar).

You can browse this item here: 3001

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Newsgroup Content (archive/news) magic Supported
100% dexvert SHell self-extracting ARchive (archive/shar) magic Supported
100% dexvert Internet Message Format (text/imf) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file news or mail, ASCII text default
100% TrID E-Mail message (Var. 2) default
100% checkBytes Printable ASCII default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/329 Shell Archive Format default
100% detectItEasy Format: plain text[LF] default (weak)
100% xdgMime message/rfc822 default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 46 72 6f 6d 3a 20 67 6f | 65 72 40 65 6c 6c 69 73 |From: go|er@ellis|
|00000010| 2e 75 63 68 69 63 61 67 | 6f 2e 65 64 75 20 28 52 |.uchicag|o.edu (R|
|00000020| 69 63 68 61 72 64 20 4c | 2e 20 47 6f 65 72 77 69 |ichard L|. Goerwi|
|00000030| 74 7a 29 0a 4e 65 77 73 | 67 72 6f 75 70 73 3a 20 |tz).News|groups: |
|00000040| 61 6c 74 2e 73 6f 75 72 | 63 65 73 0a 53 75 62 6a |alt.sour|ces.Subj|
|00000050| 65 63 74 3a 20 6a 61 72 | 67 6f 6e 20 69 6e 64 65 |ect: jar|gon inde|
|00000060| 78 2c 20 70 61 72 74 20 | 30 31 20 6f 66 20 30 32 |x, part |01 of 02|
|00000070| 0a 4d 65 73 73 61 67 65 | 2d 49 44 3a 20 3c 31 39 |.Message|-ID: <19|
|00000080| 39 31 4d 61 72 36 2e 31 | 36 34 36 35 37 2e 31 32 |91Mar6.1|64657.12|
|00000090| 35 38 34 40 6d 69 64 77 | 61 79 2e 75 63 68 69 63 |584@midw|ay.uchic|
|000000a0| 61 67 6f 2e 65 64 75 3e | 0a 44 61 74 65 3a 20 36 |ago.edu>|.Date: 6|
|000000b0| 20 4d 61 72 20 39 31 20 | 31 36 3a 34 36 3a 35 37 | Mar 91 |16:46:57|
|000000c0| 20 47 4d 54 0a 0a 48 65 | 72 65 27 73 20 61 20 6c | GMT..He|re's a l|
|000000d0| 69 74 74 6c 65 20 69 6e | 64 65 78 69 6e 67 20 70 |ittle in|dexing p|
|000000e0| 72 6f 67 72 61 6d 20 66 | 6f 72 20 74 68 65 20 6a |rogram f|or the j|
|000000f0| 61 72 67 6f 6e 20 66 69 | 6c 65 20 72 65 63 65 6e |argon fi|le recen|
|00000100| 74 6c 79 20 70 6f 73 74 | 65 64 2e 0a 49 74 27 73 |tly post|ed..It's|
|00000110| 20 77 72 69 74 74 65 6e | 20 69 6e 20 49 63 6f 6e | written| in Icon|
|00000120| 2c 20 73 6f 20 69 66 20 | 79 6f 75 20 64 6f 6e 27 |, so if |you don'|
|00000130| 74 20 68 61 76 65 20 61 | 6e 20 49 63 6f 6e 20 69 |t have a|n Icon i|
|00000140| 6e 74 65 72 70 72 65 74 | 65 72 20 6f 72 20 63 6f |nterpret|er or co|
|00000150| 6d 2d 0a 70 69 6c 65 72 | 20 69 6e 73 74 61 6c 6c |m-.piler| install|
|00000160| 65 64 2c 20 65 69 74 68 | 65 72 20 67 65 74 20 6f |ed, eith|er get o|
|00000170| 6e 65 20 28 69 74 27 73 | 20 66 72 65 65 20 66 72 |ne (it's| free fr|
|00000180| 6f 6d 20 63 73 2e 61 72 | 69 7a 6f 6e 61 2e 65 64 |om cs.ar|izona.ed|
|00000190| 75 29 2c 20 6f 72 0a 65 | 6c 73 65 20 68 69 74 20 |u), or.e|lse hit |
|000001a0| 74 68 65 20 22 6b 22 20 | 62 75 74 74 6f 6e 2e 0a |the "k" |button..|
|000001b0| 0a 49 74 27 73 20 6e 6f | 74 68 69 6e 67 20 66 61 |.It's no|thing fa|
|000001c0| 6e 63 79 2e 20 20 4a 75 | 73 74 20 73 6f 6d 65 74 |ncy. Ju|st somet|
|000001d0| 68 69 6e 67 20 49 20 75 | 73 65 20 74 6f 20 70 65 |hing I u|se to pe|
|000001e0| 72 75 73 65 20 74 68 69 | 73 20 28 76 65 72 79 2c |ruse thi|s (very,|
|000001f0| 20 76 65 72 79 0a 69 6e | 74 65 72 65 73 74 69 6e | very.in|terestin|
|00000200| 67 29 20 66 69 6c 65 2e | 20 20 42 65 20 73 75 72 |g) file.| Be sur|
|00000210| 65 20 74 6f 20 65 64 69 | 74 20 74 68 65 20 6d 61 |e to edi|t the ma|
|00000220| 6b 65 66 69 6c 65 20 62 | 65 66 6f 72 65 20 69 6e |kefile b|efore in|
|00000230| 73 74 61 6c 6c 69 6e 67 | 2e 0a 0a 2d 52 69 63 68 |stalling|...-Rich|
|00000240| 61 72 64 20 28 67 6f 65 | 72 40 73 6f 70 68 69 73 |ard (goe|r@sophis|
|00000250| 74 2e 75 63 68 69 63 61 | 67 6f 2e 65 64 75 29 0a |t.uchica|go.edu).|
|00000260| 0a 0a 73 74 74 79 3a 20 | 4f 70 65 72 61 74 69 6f |..stty: |Operatio|
|00000270| 6e 20 6e 6f 74 20 73 75 | 70 70 6f 72 74 65 64 20 |n not su|pported |
|00000280| 6f 6e 20 73 6f 63 6b 65 | 74 0a 2d 2d 2d 2d 20 43 |on socke|t.---- C|
|00000290| 75 74 20 48 65 72 65 20 | 61 6e 64 20 66 65 65 64 |ut Here |and feed|
|000002a0| 20 74 68 65 20 66 6f 6c | 6c 6f 77 69 6e 67 20 74 | the fol|lowing t|
|000002b0| 6f 20 73 68 20 2d 2d 2d | 2d 0a 23 21 2f 62 69 6e |o sh ---|-.#!/bin|
|000002c0| 2f 73 68 0a 23 20 54 68 | 69 73 20 69 73 20 61 20 |/sh.# Th|is is a |
|000002d0| 73 68 65 6c 6c 20 61 72 | 63 68 69 76 65 20 28 70 |shell ar|chive (p|
|000002e0| 72 6f 64 75 63 65 64 20 | 62 79 20 73 68 61 72 20 |roduced |by shar |
|000002f0| 33 2e 34 39 29 0a 23 20 | 54 6f 20 65 78 74 72 61 |3.49).# |To extra|
|00000300| 63 74 20 74 68 65 20 66 | 69 6c 65 73 20 66 72 6f |ct the f|iles fro|
|00000310| 6d 20 74 68 69 73 20 61 | 72 63 68 69 76 65 2c 20 |m this a|rchive, |
|00000320| 73 61 76 65 20 69 74 20 | 74 6f 20 61 20 66 69 6c |save it |to a fil|
|00000330| 65 2c 20 72 65 6d 6f 76 | 65 0a 23 20 65 76 65 72 |e, remov|e.# ever|
|00000340| 79 74 68 69 6e 67 20 61 | 62 6f 76 65 20 74 68 65 |ything a|bove the|
|00000350| 20 22 21 2f 62 69 6e 2f | 73 68 22 20 6c 69 6e 65 | "!/bin/|sh" line|
|00000360| 20 61 62 6f 76 65 2c 20 | 61 6e 64 20 74 79 70 65 | above, |and type|
|00000370| 20 22 73 68 20 66 69 6c | 65 5f 6e 61 6d 65 22 2e | "sh fil|e_name".|
|00000380| 0a 23 0a 23 20 6d 61 64 | 65 20 30 33 2f 30 36 2f |.#.# mad|e 03/06/|
|00000390| 31 39 39 31 20 30 37 3a | 35 31 20 55 54 43 20 62 |1991 07:|51 UTC b|
|000003a0| 79 20 67 6f 65 72 40 73 | 6f 70 68 69 73 74 2e 75 |y goer@s|ophist.u|
|000003b0| 63 68 69 63 61 67 6f 2e | 65 64 75 0a 23 20 53 6f |chicago.|edu.# So|
|000003c0| 75 72 63 65 20 64 69 72 | 65 63 74 6f 72 79 20 2f |urce dir|ectory /|
|000003d0| 75 2f 72 69 63 68 61 72 | 64 2f 4a 61 72 67 6f 6e |u/richar|d/Jargon|
|000003e0| 0a 23 0a 23 20 65 78 69 | 73 74 69 6e 67 20 66 69 |.#.# exi|sting fi|
|000003f0| 6c 65 73 20 77 69 6c 6c | 20 4e 4f 54 20 62 65 20 |les will| NOT be |
|00000400| 6f 76 65 72 77 72 69 74 | 74 65 6e 20 75 6e 6c 65 |overwrit|ten unle|
|00000410| 73 73 20 2d 63 20 69 73 | 20 73 70 65 63 69 66 69 |ss -c is| specifi|
|00000420| 65 64 0a 23 20 54 68 69 | 73 20 66 6f 72 6d 61 74 |ed.# Thi|s format|
|00000430| 20 72 65 71 75 69 72 65 | 73 20 76 65 72 79 20 6c | require|s very l|
|00000440| 69 74 74 6c 65 20 69 6e | 74 65 6c 6c 69 67 65 6e |ittle in|telligen|
|00000450| 63 65 20 61 74 20 75 6e | 73 68 61 72 20 74 69 6d |ce at un|shar tim|
|00000460| 65 2e 0a 23 20 22 69 66 | 20 74 65 73 74 22 2c 20 |e..# "if| test", |
|00000470| 22 63 61 74 22 2c 20 22 | 72 6d 22 2c 20 22 65 63 |"cat", "|rm", "ec|
|00000480| 68 6f 22 2c 20 22 74 72 | 75 65 22 2c 20 61 6e 64 |ho", "tr|ue", and|
|00000490| 20 22 73 65 64 22 20 6d | 61 79 20 62 65 20 6e 65 | "sed" m|ay be ne|
|000004a0| 65 64 65 64 2e 0a 23 0a | 23 20 54 68 69 73 20 69 |eded..#.|# This i|
|000004b0| 73 20 70 61 72 74 20 31 | 20 6f 66 20 61 20 6d 75 |s part 1| of a mu|
|000004c0| 6c 74 69 70 61 72 74 20 | 61 72 63 68 69 76 65 20 |ltipart |archive |
|000004d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000004e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000004f0| 20 20 20 0a 23 20 64 6f | 20 6e 6f 74 20 63 6f 6e | .# do| not con|
|00000500| 63 61 74 65 6e 61 74 65 | 20 74 68 65 73 65 20 70 |catenate| these p|
|00000510| 61 72 74 73 2c 20 75 6e | 70 61 63 6b 20 74 68 65 |arts, un|pack the|
|00000520| 6d 20 69 6e 20 6f 72 64 | 65 72 20 77 69 74 68 20 |m in ord|er with |
|00000530| 2f 62 69 6e 2f 73 68 20 | 20 20 20 20 20 20 20 0a |/bin/sh | .|
|00000540| 23 0a 23 20 54 68 69 73 | 20 73 68 61 72 20 63 6f |#.# This| shar co|
|00000550| 6e 74 61 69 6e 73 3a 0a | 23 20 6c 65 6e 67 74 68 |ntains:.|# length|
|00000560| 20 20 6d 6f 64 65 20 20 | 20 20 20 20 20 6e 61 6d | mode | nam|
|00000570| 65 0a 23 20 2d 2d 2d 2d | 2d 2d 20 2d 2d 2d 2d 2d |e.# ----|-- -----|
|00000580| 2d 2d 2d 2d 2d 20 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |----- --|--------|
|00000590| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000005a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000005b0| 0a 23 20 20 20 31 33 33 | 30 20 2d 72 77 2d 72 2d |.# 133|0 -rw-r-|
|000005c0| 2d 72 2d 2d 20 6a 61 72 | 67 6f 6e 2e 73 72 63 0a |-r-- jar|gon.src.|
|000005d0| 23 20 20 20 36 32 32 35 | 20 2d 72 2d 2d 72 2d 2d |# 6225| -r--r--|
|000005e0| 72 2d 2d 20 67 65 74 74 | 65 78 74 2e 69 63 6e 0a |r-- gett|ext.icn.|
|000005f0| 23 20 20 20 31 33 31 30 | 20 2d 72 2d 2d 72 2d 2d |# 1310| -r--r--|
|00000600| 72 2d 2d 20 61 64 6a 75 | 6e 63 74 73 2e 69 63 6e |r-- adju|ncts.icn|
|00000610| 0a 23 20 20 20 32 37 39 | 39 20 2d 72 2d 2d 72 2d |.# 279|9 -r--r-|
|00000620| 2d 72 2d 2d 20 69 64 78 | 74 65 78 74 2e 69 63 6e |-r-- idx|text.icn|
|00000630| 0a 23 20 20 20 31 35 36 | 39 20 2d 72 2d 2d 72 2d |.# 156|9 -r--r-|
|00000640| 2d 72 2d 2d 20 6a 61 72 | 67 32 67 65 74 2e 69 63 |-r-- jar|g2get.ic|
|00000650| 6e 0a 23 20 20 20 33 31 | 35 38 20 2d 72 77 2d 72 |n.# 31|58 -rw-r|
|00000660| 2d 2d 72 2d 2d 20 52 45 | 41 44 4d 45 0a 23 20 20 |--r-- RE|ADME.# |
|00000670| 20 31 39 32 37 20 2d 72 | 77 2d 72 2d 2d 72 2d 2d | 1927 -r|w-r--r--|
|00000680| 20 4d 61 6b 65 66 69 6c | 65 2e 64 69 73 74 0a 23 | Makefil|e.dist.#|
|00000690| 0a 69 66 20 74 65 73 74 | 20 2d 72 20 5f 73 68 61 |.if test| -r _sha|
|000006a0| 72 5f 73 65 71 5f 2e 74 | 6d 70 3b 20 74 68 65 6e |r_seq_.t|mp; then|
|000006b0| 0a 09 65 63 68 6f 20 27 | 4d 75 73 74 20 75 6e 70 |..echo '|Must unp|
|000006c0| 61 63 6b 20 61 72 63 68 | 69 76 65 73 20 69 6e 20 |ack arch|ives in |
|000006d0| 73 65 71 75 65 6e 63 65 | 21 27 0a 09 65 63 68 6f |sequence|!'..echo|
|000006e0| 20 50 6c 65 61 73 65 20 | 75 6e 70 61 63 6b 20 70 | Please |unpack p|
|000006f0| 61 72 74 20 60 63 61 74 | 20 5f 73 68 61 72 5f 73 |art `cat| _shar_s|
|00000700| 65 71 5f 2e 74 6d 70 60 | 20 6e 65 78 74 0a 09 65 |eq_.tmp`| next..e|
|00000710| 78 69 74 20 31 0a 66 69 | 0a 23 20 3d 3d 3d 3d 3d |xit 1.fi|.# =====|
|00000720| 3d 3d 3d 3d 3d 3d 3d 3d | 20 6a 61 72 67 6f 6e 2e |========| jargon.|
|00000730| 73 72 63 20 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |src ====|========|
|00000740| 3d 3d 0a 69 66 20 74 65 | 73 74 20 2d 66 20 27 6a |==.if te|st -f 'j|
|00000750| 61 72 67 6f 6e 2e 73 72 | 63 27 20 2d 61 20 58 22 |argon.sr|c' -a X"|
|00000760| 24 31 22 20 21 3d 20 58 | 22 2d 63 22 3b 20 74 68 |$1" != X|"-c"; th|
|00000770| 65 6e 0a 09 65 63 68 6f | 20 27 78 20 2d 20 73 6b |en..echo| 'x - sk|
|00000780| 69 70 70 69 6e 67 20 6a | 61 72 67 6f 6e 2e 73 72 |ipping j|argon.sr|
|00000790| 63 20 28 46 69 6c 65 20 | 61 6c 72 65 61 64 79 20 |c (File |already |
|000007a0| 65 78 69 73 74 73 29 27 | 0a 09 72 6d 20 2d 66 20 |exists)'|..rm -f |
|000007b0| 5f 73 68 61 72 5f 77 6e | 74 5f 2e 74 6d 70 0a 65 |_shar_wn|t_.tmp.e|
|000007c0| 6c 73 65 0a 3e 20 5f 73 | 68 61 72 5f 77 6e 74 5f |lse.> _s|har_wnt_|
|000007d0| 2e 74 6d 70 0a 65 63 68 | 6f 20 27 78 20 2d 20 65 |.tmp.ech|o 'x - e|
|000007e0| 78 74 72 61 63 74 69 6e | 67 20 6a 61 72 67 6f 6e |xtractin|g jargon|
|000007f0| 2e 73 72 63 20 28 54 65 | 78 74 29 27 0a 73 65 64 |.src (Te|xt)'.sed|
|00000800| 20 27 73 2f 5e 58 2f 2f | 27 20 3c 3c 20 27 53 48 | 's/^X//|' << 'SH|
|00000810| 41 52 5f 45 4f 46 27 20 | 3e 20 27 6a 61 72 67 6f |AR_EOF' |> 'jargo|
|00000820| 6e 2e 73 72 63 27 20 26 | 26 0a 58 23 23 23 23 23 |n.src' &|&.X#####|
|00000830| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00000840| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00000850| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00000860| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00000870| 23 23 23 23 23 23 23 0a | 58 23 0a 58 23 09 4e 61 |#######.|X#.X#.Na|
|00000880| 6d 65 3a 09 20 31 2e 34 | 0a 58 23 0a 58 23 09 54 |me:. 1.4|.X#.X#.T|
|00000890| 69 74 6c 65 3a 09 20 6c | 6f 6f 6b 20 75 70 20 77 |itle:. l|ook up w|
|000008a0| 6f 72 64 73 20 69 6e 20 | 68 61 63 6b 65 72 27 73 |ords in |hacker's|
|000008b0| 20 6a 61 72 67 6f 6e 20 | 64 61 74 61 62 61 73 65 | jargon |database|
|000008c0| 0a 58 23 0a 58 23 09 41 | 75 74 68 6f 72 3a 09 20 |.X#.X#.A|uthor:. |
|000008d0| 52 69 63 68 61 72 64 20 | 4c 2e 20 47 6f 65 72 77 |Richard |L. Goerw|
|000008e0| 69 74 7a 0a 58 23 0a 58 | 23 09 56 65 72 73 69 6f |itz.X#.X|#.Versio|
|000008f0| 6e 3a 20 6a 61 72 67 6f | 6e 2e 69 63 6e 0a 58 23 |n: jargo|n.icn.X#|
|00000900| 0a 58 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |.X######|########|
|00000910| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00000920| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00000930| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00000940| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 0a 58 |########|######.X|
|00000950| 23 0a 58 23 20 20 44 65 | 66 69 6e 65 73 20 68 61 |#.X# De|fines ha|
|00000960| 63 6b 65 72 27 73 20 6a | 61 72 67 6f 6e 2e 20 20 |cker's j|argon. |
|00000970| 55 73 61 67 65 20 69 73 | 20 73 69 6d 70 6c 79 20 |Usage is| simply |
|00000980| 22 6a 61 72 67 6f 6e 20 | 77 6f 72 64 2c 22 20 77 |"jargon |word," w|
|00000990| 68 65 72 65 20 77 6f 72 | 64 0a 58 23 20 20 69 73 |here wor|d.X# is|
|000009a0| 20 73 6f 6d 65 20 62 69 | 74 20 6f 66 20 68 61 63 | some bi|t of hac|
|000009b0| 6b 65 72 27 73 20 73 6c | 61 6e 67 20 66 6f 72 20 |ker's sl|ang for |
|000009c0| 77 68 69 63 68 20 61 20 | 64 65 66 69 6e 69 74 69 |which a |definiti|
|000009d0| 6f 6e 20 69 73 20 64 65 | 73 69 72 65 64 2e 0a 58 |on is de|sired..X|
|000009e0| 23 20 20 41 62 6f 72 74 | 73 20 77 69 74 68 20 61 |# Abort|s with a|
|000009f0| 6e 20 65 78 69 74 20 63 | 6f 64 65 20 6f 66 20 31 |n exit c|ode of 1|
|00000a00| 20 6f 6e 20 6e 6f 2d 61 | 72 67 20 69 6e 76 6f 63 | on no-a|rg invoc|
|00000a10| 61 74 69 6f 6e 2e 20 20 | 49 66 20 61 20 22 77 6f |ation. |If a "wo|
|00000a20| 72 64 22 0a 58 23 20 20 | 61 72 67 20 69 73 20 67 |rd".X# |arg is g|
|00000a30| 69 76 65 6e 2c 20 62 75 | 74 20 6e 6f 20 64 65 66 |iven, bu|t no def|
|00000a40| 69 6e 69 74 69 6f 6e 20 | 69 73 20 66 6f 75 6e 64 |inition |is found|
|00000a50| 2c 20 6a 61 72 67 6f 6e | 20 65 78 69 74 73 20 77 |, jargon| exits w|
|00000a60| 69 74 68 20 73 74 61 74 | 75 73 0a 58 23 20 20 32 |ith stat|us.X# 2|
|00000a70| 2e 20 20 4f 74 68 65 72 | 77 69 73 65 20 74 68 65 |. Other|wise the|
|00000a80| 20 61 70 70 72 6f 70 72 | 69 61 74 65 20 65 6e 74 | appropr|iate ent|
|00000a90| 72 79 20 66 6f 72 20 22 | 77 6f 72 64 22 20 69 73 |ry for "|word" is|
|00000aa0| 20 64 69 73 70 6c 61 79 | 65 64 2e 0a 58 23 0a 58 | display|ed..X#.X|
|00000ab0| 23 20 20 44 61 74 61 62 | 61 73 65 20 69 73 20 62 |# Datab|ase is b|
|00000ac0| 61 73 65 64 20 6f 6e 20 | 74 68 65 20 6a 61 72 67 |ased on |the jarg|
|00000ad0| 6f 6e 20 66 69 6c 65 2c | 20 76 65 72 73 69 6f 6e |on file,| version|
|00000ae0| 20 32 2e 37 2e 31 2c 20 | 70 6f 73 74 65 64 20 74 | 2.7.1, |posted t|
|00000af0| 6f 20 61 6c 74 2e 0a 58 | 23 20 20 73 6f 75 72 63 |o alt..X|# sourc|
|00000b00| 65 73 20 6f 6e 20 4d 61 | 72 63 68 20 31 2c 20 31 |es on Ma|rch 1, 1|
|00000b10| 39 39 31 2e 20 20 4d 69 | 67 68 74 20 77 6f 72 6b |991. Mi|ght work|
|00000b20| 20 6f 6e 20 6f 74 68 65 | 72 20 76 65 72 73 69 6f | on othe|r versio|
|00000b30| 6e 73 2c 20 74 68 6f 75 | 67 68 20 49 0a 58 23 20 |ns, thou|gh I.X# |
|00000b40| 20 68 61 76 65 20 6e 6f | 74 20 74 65 73 74 65 64 | have no|t tested|
|00000b50| 20 69 74 20 6f 75 74 2e | 0a 58 23 0a 58 23 23 23 | it out.|.X#.X###|
|00000b60| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00000b70| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00000b80| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00000b90| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00000ba0| 23 23 23 23 23 23 23 23 | 23 0a 58 23 0a 58 23 20 |########|#.X#.X# |
|00000bb0| 20 4c 69 6e 6b 73 3a 20 | 20 67 65 74 74 65 78 74 | Links: | gettext|
|00000bc0| 2e 69 63 6e 2c 20 61 64 | 6a 75 6e 63 74 73 2e 69 |.icn, ad|juncts.i|
|00000bd0| 63 6e 0a 58 23 0a 58 23 | 23 23 23 23 23 23 23 23 |cn.X#.X#|########|
|00000be0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00000bf0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00000c00| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00000c10| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00000c20| 23 23 23 0a 58 0a 58 70 | 72 6f 63 65 64 75 72 65 |###.X.Xp|rocedure|
|00000c30| 20 6d 61 69 6e 28 61 29 | 0a 58 0a 58 20 20 20 20 | main(a)|.X.X |
|00000c40| 6c 6f 63 61 6c 20 64 61 | 74 61 62 61 73 65 2c 20 |local da|tabase, |
|00000c50| 75 73 61 67 65 2c 20 6e | 6f 2c 20 79 65 73 0a 58 |usage, n|o, yes.X|
|00000c60| 0a 58 20 20 20 20 23 20 | 43 68 61 6e 67 65 20 74 |.X # |Change t|
|00000c70| 68 69 73 2c 20 69 66 20 | 79 6f 75 20 75 73 65 20 |his, if |you use |
|00000c80| 61 20 64 69 66 66 65 72 | 65 6e 74 20 6c 6f 63 61 |a differ|ent loca|
|00000c90| 74 69 6f 6e 2e 0a 58 20 | 20 20 20 64 61 74 61 62 |tion..X | datab|
|00000ca0| 61 73 65 20 3a 3d 20 22 | 2f 75 73 72 2f 6c 6f 63 |ase := "|/usr/loc|
|00000cb0| 61 6c 2f 6c 69 62 2f 6a | 61 72 67 6f 6e 2f 6a 61 |al/lib/j|argon/ja|
|00000cc0| 72 67 6f 6e 2e 77 72 64 | 22 0a 58 0a 58 20 20 20 |rgon.wrd|".X.X |
|00000cd0| 20 6e 6f 20 3a 3d 20 26 | 75 63 61 73 65 20 7c 7c | no := &|ucase |||
|00000ce0| 20 22 2d 2f 22 3b 20 79 | 65 73 20 3a 3d 20 26 6c | "-/"; y|es := &l|
|00000cf0| 63 61 73 65 20 7c 7c 20 | 22 20 20 22 0a 58 20 20 |case || |" ".X |
|00000d00| 20 20 75 73 61 67 65 20 | 3a 3d 20 22 75 73 61 67 | usage |:= "usag|
|00000d10| 65 3a 20 20 6a 61 72 67 | 6f 6e 20 77 6f 72 64 22 |e: jarg|on word"|
|00000d20| 0a 58 20 20 20 20 2a 61 | 20 3d 20 31 20 7c 20 73 |.X *a| = 1 | s|
|00000d30| 74 6f 70 28 75 73 61 67 | 65 29 0a 58 20 20 20 20 |top(usag|e).X |
|00000d40| 77 72 69 74 65 28 67 65 | 74 74 65 78 74 28 74 72 |write(ge|ttext(tr|
|00000d50| 69 6d 28 6d 61 70 28 61 | 5b 31 5d 2c 20 6e 6f 2c |im(map(a|[1], no,|
|00000d60| 20 79 65 73 29 29 2c 20 | 64 61 74 61 62 61 73 65 | yes)), |database|
|00000d70| 29 29 20 7c 20 65 78 69 | 74 28 32 29 0a 58 0a 58 |)) | exi|t(2).X.X|
|00000d80| 65 6e 64 20 0a 53 48 41 | 52 5f 45 4f 46 0a 74 72 |end .SHA|R_EOF.tr|
|00000d90| 75 65 20 7c 7c 20 65 63 | 68 6f 20 27 72 65 73 74 |ue || ec|ho 'rest|
|00000da0| 6f 72 65 20 6f 66 20 6a | 61 72 67 6f 6e 2e 73 72 |ore of j|argon.sr|
|00000db0| 63 20 66 61 69 6c 65 64 | 27 0a 72 6d 20 2d 66 20 |c failed|'.rm -f |
|00000dc0| 5f 73 68 61 72 5f 77 6e | 74 5f 2e 74 6d 70 0a 66 |_shar_wn|t_.tmp.f|
|00000dd0| 69 0a 23 20 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |i.# ====|========|
|00000de0| 3d 20 67 65 74 74 65 78 | 74 2e 69 63 6e 20 3d 3d |= gettex|t.icn ==|
|00000df0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 0a 69 66 20 |========|====.if |
|00000e00| 74 65 73 74 20 2d 66 20 | 27 67 65 74 74 65 78 74 |test -f |'gettext|
|00000e10| 2e 69 63 6e 27 20 2d 61 | 20 58 22 24 31 22 20 21 |.icn' -a| X"$1" !|
|00000e20| 3d 20 58 22 2d 63 22 3b | 20 74 68 65 6e 0a 09 65 |= X"-c";| then..e|
|00000e30| 63 68 6f 20 27 78 20 2d | 20 73 6b 69 70 70 69 6e |cho 'x -| skippin|
|00000e40| 67 20 67 65 74 74 65 78 | 74 2e 69 63 6e 20 28 46 |g gettex|t.icn (F|
|00000e50| 69 6c 65 20 61 6c 72 65 | 61 64 79 20 65 78 69 73 |ile alre|ady exis|
|00000e60| 74 73 29 27 0a 09 72 6d | 20 2d 66 20 5f 73 68 61 |ts)'..rm| -f _sha|
|00000e70| 72 5f 77 6e 74 5f 2e 74 | 6d 70 0a 65 6c 73 65 0a |r_wnt_.t|mp.else.|
|00000e80| 3e 20 5f 73 68 61 72 5f | 77 6e 74 5f 2e 74 6d 70 |> _shar_|wnt_.tmp|
|00000e90| 0a 65 63 68 6f 20 27 78 | 20 2d 20 65 78 74 72 61 |.echo 'x| - extra|
|00000ea0| 63 74 69 6e 67 20 67 65 | 74 74 65 78 74 2e 69 63 |cting ge|ttext.ic|
|00000eb0| 6e 20 28 54 65 78 74 29 | 27 0a 73 65 64 20 27 73 |n (Text)|'.sed 's|
|00000ec0| 2f 5e 58 2f 2f 27 20 3c | 3c 20 27 53 48 41 52 5f |/^X//' <|< 'SHAR_|
|00000ed0| 45 4f 46 27 20 3e 20 27 | 67 65 74 74 65 78 74 2e |EOF' > '|gettext.|
|00000ee0| 69 63 6e 27 20 26 26 0a | 58 23 23 23 23 23 23 23 |icn' &&.|X#######|
|00000ef0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00000f00| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00000f10| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00000f20| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00000f30| 23 23 23 23 23 0a 58 23 | 0a 58 23 09 4e 61 6d 65 |#####.X#|.X#.Name|
|00000f40| 3a 09 20 67 65 74 74 65 | 78 74 2e 69 63 6e 0a 58 |:. gette|xt.icn.X|
|00000f50| 23 0a 58 23 09 54 69 74 | 6c 65 3a 09 20 67 65 74 |#.X#.Tit|le:. get|
|00000f60| 74 65 78 74 20 28 73 69 | 6d 70 6c 65 20 74 65 78 |text (si|mple tex|
|00000f70| 74 2d 62 61 73 65 20 72 | 6f 75 74 69 6e 65 73 29 |t-base r|outines)|
|00000f80| 0a 58 23 0a 58 23 09 41 | 75 74 68 6f 72 3a 09 20 |.X#.X#.A|uthor:. |
|00000f90| 52 69 63 68 61 72 64 20 | 4c 2e 20 47 6f 65 72 77 |Richard |L. Goerw|
|00000fa0| 69 74 7a 0a 58 23 0a 58 | 23 09 56 65 72 73 69 6f |itz.X#.X|#.Versio|
|00000fb0| 6e 3a 20 31 2e 31 34 0a | 58 23 0a 58 23 23 23 23 |n: 1.14.|X#.X####|
|00000fc0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00000fd0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00000fe0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00000ff0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00001000| 23 23 23 23 23 23 23 23 | 0a 58 23 0a 58 23 20 20 |########|.X#.X# |
|00001010| 47 65 74 74 65 78 74 28 | 29 20 61 6e 64 20 61 73 |Gettext(|) and as|
|00001020| 73 6f 63 69 61 74 65 64 | 20 72 6f 75 74 69 6e 65 |sociated| routine|
|00001030| 73 20 61 6c 6c 6f 77 20 | 74 68 65 20 75 73 65 72 |s allow |the user|
|00001040| 20 74 6f 20 6d 61 69 6e | 74 61 69 6e 20 61 20 66 | to main|tain a f|
|00001050| 69 6c 65 0a 58 23 20 20 | 6f 66 20 4b 45 59 2f 76 |ile.X# |of KEY/v|
|00001060| 61 6c 75 65 20 63 6f 6d | 62 69 6e 61 74 69 6f 6e |alue com|bination|
|00001070| 73 20 73 75 63 68 20 74 | 68 61 74 20 61 20 63 61 |s such t|hat a ca|
|00001080| 6c 6c 20 74 6f 20 67 65 | 74 74 65 78 74 28 4b 45 |ll to ge|ttext(KE|
|00001090| 59 2c 20 46 4e 41 4d 45 | 29 0a 58 23 20 20 77 69 |Y, FNAME|).X# wi|
|000010a0| 6c 6c 20 70 72 6f 64 75 | 63 65 20 76 61 6c 75 65 |ll produ|ce value|
|000010b0| 2e 20 20 47 65 74 74 65 | 78 74 28 29 20 66 61 69 |. Gette|xt() fai|
|000010c0| 6c 73 20 69 66 20 6e 6f | 20 73 75 63 68 20 4b 45 |ls if no| such KE|
|000010d0| 59 20 65 78 69 73 74 73 | 2e 0a 58 23 20 20 52 65 |Y exists|..X# Re|
|000010e0| 74 75 72 6e 73 20 61 6e | 20 65 6d 70 74 79 20 73 |turns an| empty s|
|000010f0| 74 72 69 6e 67 20 69 66 | 20 74 68 65 20 6b 65 79 |tring if| the key|
|00001100| 20 65 78 69 73 74 73 2c | 20 62 75 74 20 68 61 73 | exists,| but has|
|00001110| 20 6e 6f 20 61 73 73 6f | 63 69 61 74 65 64 0a 58 | no asso|ciated.X|
|00001120| 23 20 20 76 61 6c 75 65 | 20 69 6e 20 74 68 65 20 |# value| in the |
|00001130| 66 69 6c 65 2c 20 46 4e | 41 4d 45 2e 0a 58 23 0a |file, FN|AME..X#.|
|00001140| 58 23 20 20 54 68 65 20 | 66 69 6c 65 20 66 6f 72 |X# The |file for|
|00001150| 6d 61 74 20 69 73 20 73 | 69 6d 70 6c 65 2e 20 20 |mat is s|imple. |
|00001160| 4b 65 79 73 20 62 65 6c | 6f 6e 67 20 6f 6e 20 73 |Keys bel|ong on s|
|00001170| 65 70 61 72 61 74 65 20 | 6c 69 6e 65 73 2c 20 6d |eparate |lines, m|
|00001180| 61 72 6b 65 64 0a 58 23 | 20 20 61 73 20 73 75 63 |arked.X#| as suc|
|00001190| 68 20 62 79 20 61 6e 20 | 69 6e 69 74 69 61 6c 20 |h by an |initial |
|000011a0| 63 6f 6c 6f 6e 2b 63 6f | 6c 6f 6e 20 28 3a 3a 29 |colon+co|lon (::)|
|000011b0| 2e 20 20 56 61 6c 75 65 | 73 20 62 65 67 69 6e 20 |. Value|s begin |
|000011c0| 6f 6e 20 74 68 65 20 6c | 69 6e 65 0a 58 23 20 20 |on the l|ine.X# |
|000011d0| 66 6f 6c 6c 6f 77 69 6e | 67 20 74 68 65 69 72 20 |followin|g their |
|000011e0| 72 65 73 70 65 63 74 69 | 76 65 20 6b 65 79 73 2c |respecti|ve keys,|
|000011f0| 20 61 6e 64 20 65 78 74 | 65 6e 64 20 75 70 20 74 | and ext|end up t|
|00001200| 6f 20 74 68 65 20 6e 65 | 78 74 0a 58 23 20 20 63 |o the ne|xt.X# c|
|00001210| 6f 6c 6f 6e 2b 63 6f 6c | 6f 6e 2d 69 6e 69 74 69 |olon+col|on-initi|
|00001220| 61 6c 20 6c 69 6e 65 20 | 6f 72 20 45 4f 46 2e 20 |al line |or EOF. |
|00001230| 20 45 2e 67 2e 0a 58 23 | 0a 58 23 20 20 20 20 3a | E.g..X#|.X# :|
|00001240| 3a 73 61 6d 70 6c 65 2e | 31 0a 58 23 20 20 20 20 |:sample.|1.X# |
|00001250| 4e 6f 74 69 63 65 20 68 | 6f 77 20 74 68 65 20 6b |Notice h|ow the k|
|00001260| 65 79 20 61 62 6f 76 65 | 2c 20 73 61 6d 70 6c 65 |ey above|, sample|
|00001270| 2e 31 2c 20 68 61 73 20 | 3a 3a 20 70 72 65 70 65 |.1, has |:: prepe|
|00001280| 6e 64 65 64 20 74 6f 20 | 6d 61 72 6b 20 69 74 0a |nded to |mark it.|
|00001290| 58 23 20 20 20 20 6f 75 | 74 20 61 73 20 61 20 6b |X# ou|t as a k|
|000012a0| 65 79 2e 20 20 54 68 65 | 20 74 65 78 74 20 79 6f |ey. The| text yo|
|000012b0| 75 20 61 72 65 20 6e 6f | 77 20 72 65 61 64 69 6e |u are no|w readin|
|000012c0| 67 20 72 65 70 72 65 73 | 65 6e 74 73 20 74 68 61 |g repres|ents tha|
|000012d0| 74 20 6b 65 79 27 73 0a | 58 23 20 20 20 20 76 61 |t key's.|X# va|
|000012e0| 6c 75 65 2e 20 20 54 6f | 20 72 65 74 72 69 65 76 |lue. To| retriev|
|000012f0| 65 20 74 68 69 73 20 74 | 65 78 74 2c 20 79 6f 75 |e this t|ext, you|
|00001300| 20 77 6f 75 6c 64 20 63 | 61 6c 6c 20 67 65 74 74 | would c|all gett|
|00001310| 65 78 74 28 29 20 77 69 | 74 68 20 74 68 65 0a 58 |ext() wi|th the.X|
|00001320| 23 20 20 20 20 6e 61 6d | 65 20 6f 66 20 74 68 65 |# nam|e of the|
|00001330| 20 6b 65 79 20 70 61 73 | 73 65 64 20 61 73 20 69 | key pas|sed as i|
|00001340| 74 73 20 66 69 72 73 74 | 20 61 72 67 75 6d 65 6e |ts first| argumen|
|00001350| 74 2c 20 61 6e 64 20 74 | 68 65 20 6e 61 6d 65 20 |t, and t|he name |
|00001360| 6f 66 20 74 68 65 0a 58 | 23 20 20 20 20 66 69 6c |of the.X|# fil|
|00001370| 65 20 69 6e 20 77 68 69 | 63 68 20 74 68 69 73 20 |e in whi|ch this |
|00001380| 74 65 78 74 20 69 73 20 | 73 74 6f 72 65 64 20 61 |text is |stored a|
|00001390| 73 20 69 74 73 20 73 65 | 63 6f 6e 64 20 61 72 67 |s its se|cond arg|
|000013a0| 75 6d 65 6e 74 20 28 61 | 73 20 69 6e 0a 58 23 20 |ument (a|s in.X# |
|000013b0| 20 20 20 67 65 74 74 65 | 78 74 28 22 73 61 6d 70 | gette|xt("samp|
|000013c0| 6c 65 2e 31 22 2c 22 74 | 6d 70 2e 69 64 78 22 29 |le.1","t|mp.idx")|
|000013d0| 29 2e 0a 58 23 20 20 20 | 20 3a 3a 6e 65 78 74 2e |)..X# | ::next.|
|000013e0| 6b 65 79 0a 58 23 20 20 | 20 20 65 74 63 2e 2e 2e |key.X# | etc...|
|000013f0| 0a 58 23 0a 58 23 20 20 | 46 6f 72 20 66 61 73 74 |.X#.X# |For fast|
|00001400| 65 72 20 61 63 63 65 73 | 73 2c 20 61 6e 20 69 6e |er acces|s, an in|
|00001410| 64 65 78 69 6e 67 20 75 | 74 69 6c 69 74 79 20 69 |dexing u|tility i|
|00001420| 73 20 69 6e 63 6c 75 64 | 65 64 2c 20 69 64 78 74 |s includ|ed, idxt|
|00001430| 65 78 74 2e 20 20 49 64 | 78 74 65 78 74 0a 58 23 |ext. Id|xtext.X#|
|00001440| 20 20 63 72 65 61 74 65 | 73 20 61 20 73 65 70 61 | create|s a sepa|
|00001450| 72 61 74 65 20 69 6e 64 | 65 78 20 66 6f 72 20 61 |rate ind|ex for a|
|00001460| 20 67 69 76 65 6e 20 74 | 65 78 74 2d 62 61 73 65 | given t|ext-base|
|00001470| 20 66 69 6c 65 2e 20 20 | 49 66 20 61 6e 20 69 6e | file. |If an in|
|00001480| 64 65 78 20 66 69 6c 65 | 0a 58 23 20 20 65 78 69 |dex file|.X# exi|
|00001490| 73 74 73 20 69 6e 20 74 | 68 65 20 73 61 6d 65 20 |sts in t|he same |
|000014a0| 64 69 72 65 63 74 6f 72 | 79 20 61 73 20 46 4e 41 |director|y as FNA|
|000014b0| 4d 45 2c 20 67 65 74 74 | 65 78 74 28 29 20 77 69 |ME, gett|ext() wi|
|000014c0| 6c 6c 20 6d 61 6b 65 20 | 75 73 65 20 6f 66 20 69 |ll make |use of i|
|000014d0| 74 2e 0a 58 23 20 20 54 | 68 65 20 69 6e 64 65 78 |t..X# T|he index|
|000014e0| 20 62 65 63 6f 6d 65 73 | 20 77 6f 72 74 68 77 68 | becomes| worthwh|
|000014f0| 69 6c 65 20 28 61 74 20 | 6c 65 61 73 74 20 6f 6e |ile (at |least on|
|00001500| 20 6d 79 20 73 79 73 74 | 65 6d 29 20 61 66 74 65 | my syst|em) afte|
|00001510| 72 20 74 68 65 20 74 65 | 78 74 2d 0a 58 23 20 20 |r the te|xt-.X# |
|00001520| 62 61 73 65 20 66 69 6c | 65 20 62 65 63 6f 6d 65 |base fil|e become|
|00001530| 73 20 6c 6f 6e 67 65 72 | 20 74 68 61 6e 20 35 20 |s longer| than 5 |
|00001540| 6b 69 6c 6f 62 79 74 65 | 73 2e 0a 58 23 0a 58 23 |kilobyte|s..X#.X#|
|00001550| 20 20 44 6f 6e 74 73 3a | 0a 58 23 20 20 20 20 20 | Donts:|.X# |
|00001560| 20 31 29 20 44 6f 6e 27 | 74 20 6e 65 73 74 20 67 | 1) Don'|t nest g|
|00001570| 65 74 74 65 78 74 20 74 | 65 78 74 2d 62 61 73 65 |ettext t|ext-base|
|00001580| 20 66 69 6c 65 73 2e 0a | 58 23 20 20 20 20 20 20 | files..|X# |
|00001590| 32 29 20 44 6f 6e 27 74 | 20 75 73 65 20 73 70 61 |2) Don't| use spa|
|000015a0| 63 65 73 20 61 6e 64 2f | 6f 72 20 74 61 62 73 20 |ces and/|or tabs |
|000015b0| 69 6e 20 6b 65 79 20 6e | 61 6d 65 73 2e 0a 58 23 |in key n|ames..X#|
|000015c0| 20 20 20 20 20 20 33 29 | 20 44 6f 6e 27 74 20 6d | 3)| Don't m|
|000015d0| 6f 64 69 66 79 20 69 6e | 64 65 78 65 64 20 66 69 |odify in|dexed fi|
|000015e0| 6c 65 73 20 69 6e 20 61 | 6e 79 20 77 61 79 20 6f |les in a|ny way o|
|000015f0| 74 68 65 72 20 74 68 61 | 6e 20 74 6f 20 61 70 70 |ther tha|n to app|
|00001600| 65 6e 64 0a 58 23 20 20 | 20 20 20 20 20 20 20 61 |end.X# | a|
|00001610| 64 64 69 74 69 6f 6e 61 | 6c 20 6b 65 79 73 2f 76 |dditiona|l keys/v|
|00001620| 61 6c 75 65 73 20 28 75 | 6e 6c 65 73 73 20 79 6f |alues (u|nless yo|
|00001630| 75 20 77 61 6e 74 20 74 | 6f 20 72 65 2d 69 6e 64 |u want t|o re-ind|
|00001640| 65 78 29 2e 0a 58 23 0a | 58 23 20 20 54 68 69 73 |ex)..X#.|X# This|
|00001650| 20 70 72 6f 67 72 61 6d | 20 69 73 20 69 6e 74 65 | program| is inte|
|00001660| 6e 64 65 64 20 66 6f 72 | 20 73 69 74 75 61 74 69 |nded for| situati|
|00001670| 6f 6e 73 20 77 68 65 72 | 65 20 6b 65 79 73 20 74 |ons wher|e keys t|
|00001680| 65 6e 64 20 74 6f 20 68 | 61 76 65 0a 58 23 20 20 |end to h|ave.X# |
|00001690| 76 65 72 79 20 6c 61 72 | 67 65 20 76 61 6c 75 65 |very lar|ge value|
|000016a0| 73 2c 20 61 6e 64 20 75 | 73 65 20 6f 66 20 61 6e |s, and u|se of an|
|000016b0| 20 49 63 6f 6e 20 74 61 | 62 6c 65 20 73 74 72 75 | Icon ta|ble stru|
|000016c0| 63 74 75 72 65 20 77 6f | 75 6c 64 20 62 65 0a 58 |cture wo|uld be.X|
|000016d0| 23 20 20 75 6e 77 65 69 | 6c 64 79 2e 0a 58 23 0a |# unwei|ldy..X#.|
|000016e0| 58 23 20 20 42 55 47 53 | 3a 20 20 47 65 74 74 65 |X# BUGS|: Gette|
|000016f0| 78 74 28 29 20 72 65 6c | 69 65 73 20 6f 6e 20 74 |xt() rel|ies on t|
|00001700| 68 65 20 49 63 6f 6e 20 | 72 75 6e 74 69 6d 65 20 |he Icon |runtime |
|00001710| 73 79 73 74 65 6d 20 61 | 6e 64 20 74 68 65 20 4f |system a|nd the O|
|00001720| 53 20 74 6f 0a 58 23 20 | 20 6d 61 6b 65 20 73 75 |S to.X# | make su|
|00001730| 72 65 20 74 68 65 20 6c | 61 73 74 20 74 65 78 74 |re the l|ast text|
|00001740| 2f 69 6e 64 65 78 20 66 | 69 6c 65 20 69 74 20 6f |/index f|ile it o|
|00001750| 70 65 6e 73 20 67 65 74 | 73 20 63 6c 6f 73 65 64 |pens get|s closed|
|00001760| 2e 0a 58 23 0a 58 23 20 | 20 4e 6f 74 65 3a 20 20 |..X#.X# | Note: |
|00001770| 54 68 69 73 20 70 72 6f | 67 72 61 6d 20 69 73 20 |This pro|gram is |
|00001780| 4e 4f 54 20 59 45 54 20 | 54 45 53 54 45 44 20 55 |NOT YET |TESTED U|
|00001790| 4e 44 45 52 20 44 4f 53 | 2e 20 20 49 6e 20 70 61 |NDER DOS|. In pa|
|000017a0| 72 74 69 63 75 6c 61 72 | 2c 0a 58 23 20 20 49 20 |rticular|,.X# I |
|000017b0| 68 61 76 65 20 6e 6f 20 | 69 64 65 61 20 77 68 65 |have no |idea whe|
|000017c0| 74 68 65 72 20 74 68 65 | 20 69 6e 64 65 78 69 6e |ther the| indexin|
|000017d0| 67 20 6d 65 63 68 61 6e | 69 73 6d 20 77 69 6c 6c |g mechan|ism will|
|000017e0| 20 77 6f 72 6b 2c 20 64 | 75 65 20 74 6f 0a 58 23 | work, d|ue to.X#|
|000017f0| 20 20 74 72 61 6e 73 6c | 61 74 69 6f 6e 20 74 68 | transl|ation th|
|00001800| 61 74 20 68 61 73 20 74 | 6f 20 62 65 20 64 6f 6e |at has t|o be don|
|00001810| 65 20 6f 6e 20 4d 53 2d | 44 4f 53 20 74 65 78 74 |e on MS-|DOS text|
|00001820| 20 66 69 6c 65 73 2e 0a | 58 23 0a 58 23 23 23 23 | files..|X#.X####|
|00001830| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00001840| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00001850| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00001860| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00001870| 23 23 23 23 23 23 23 23 | 0a 58 23 0a 58 23 20 20 |########|.X#.X# |
|00001880| 4c 69 6e 6b 73 3a 20 2e | 2f 61 64 6a 75 6e 63 74 |Links: .|/adjunct|
|00001890| 73 2e 69 63 6e 0a 58 23 | 0a 58 23 20 20 52 65 71 |s.icn.X#|.X# Req|
|000018a0| 75 69 72 65 73 3a 20 55 | 4e 49 58 20 28 6d 61 79 |uires: U|NIX (may|
|000018b0| 62 65 20 4d 53 2d 44 4f | 53 3b 20 75 6e 74 65 73 |be MS-DO|S; untes|
|000018c0| 74 65 64 29 0a 58 23 0a | 58 23 23 23 23 23 23 23 |ted).X#.|X#######|
|000018d0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|000018e0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|000018f0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00001900| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00001910| 23 23 23 23 23 0a 58 0a | 58 0a 58 67 6c 6f 62 61 |#####.X.|X.Xgloba|
|00001920| 6c 20 5f 73 6c 61 73 68 | 2c 20 5f 62 61 73 65 6c |l _slash|, _basel|
|00001930| 65 6e 0a 58 0a 58 70 72 | 6f 63 65 64 75 72 65 20 |en.X.Xpr|ocedure |
|00001940| 67 65 74 74 65 78 74 28 | 4b 45 59 2c 46 4e 41 4d |gettext(|KEY,FNAM|
|00001950| 45 29 0a 58 0a 58 20 20 | 20 20 6c 6f 63 61 6c 20 |E).X.X | local |
|00001960| 6c 69 6e 65 2c 20 76 61 | 6c 75 65 0a 58 20 20 20 |line, va|lue.X |
|00001970| 20 73 74 61 74 69 63 20 | 6c 61 73 74 5f 46 4e 41 | static |last_FNA|
|00001980| 4d 45 2c 20 69 6e 74 65 | 78 74 2c 20 69 6e 69 64 |ME, inte|xt, inid|
|00001990| 78 0a 58 20 20 20 20 69 | 6e 69 74 69 61 6c 20 7b |x.X i|nitial {|
|000019a0| 0a 58 09 69 66 20 66 69 | 6e 64 28 22 55 4e 49 58 |.X.if fi|nd("UNIX|
|000019b0| 22 2c 20 26 66 65 61 74 | 75 72 65 73 29 20 74 68 |", &feat|ures) th|
|000019c0| 65 6e 20 7b 0a 58 09 20 | 20 20 20 5f 73 6c 61 73 |en {.X. | _slas|
|000019d0| 68 20 3a 3d 20 22 2f 22 | 0a 58 09 20 20 20 20 5f |h := "/"|.X. _|
|000019e0| 62 61 73 65 6c 65 6e 20 | 3a 3d 20 31 30 0a 58 09 |baselen |:= 10.X.|
|000019f0| 7d 0a 58 09 65 6c 73 65 | 20 69 66 20 66 69 6e 64 |}.X.else| if find|
|00001a00| 28 22 4d 53 2d 44 4f 53 | 22 2c 20 26 66 65 61 74 |("MS-DOS|", &feat|
|00001a10| 75 72 65 73 29 20 74 68 | 65 6e 20 7b 0a 58 09 20 |ures) th|en {.X. |
|00001a20| 20 20 20 5f 73 6c 61 73 | 68 20 3a 3d 20 22 5c 5c | _slas|h := "\\|
|00001a30| 22 0a 58 09 20 20 20 20 | 5f 62 61 73 65 6c 65 6e |".X. |_baselen|
|00001a40| 20 3a 3d 20 38 0a 58 09 | 7d 0a 58 09 65 6c 73 65 | := 8.X.|}.X.else|
|00001a50| 20 73 74 6f 70 28 22 67 | 65 74 74 65 78 74 3a 20 | stop("g|ettext: |
|00001a60| 20 4f 53 20 6e 6f 74 20 | 73 75 70 70 6f 72 74 65 | OS not |supporte|
|00001a70| 64 22 29 0a 58 20 20 20 | 20 7d 0a 58 0a 58 20 20 |d").X | }.X.X |
|00001a80| 20 20 28 2f 4b 45 59 20 | 7c 20 2f 46 4e 41 4d 45 | (/KEY || /FNAME|
|00001a90| 29 20 26 20 73 74 6f 70 | 28 22 65 72 72 6f 72 20 |) & stop|("error |
|00001aa0| 28 67 65 74 74 65 78 74 | 29 3a 20 20 6e 75 6c 6c |(gettext|): null|
|00001ab0| 20 61 72 67 75 6d 65 6e | 74 22 29 0a 58 0a 58 20 | argumen|t").X.X |
|00001ac0| 20 20 20 69 66 20 46 4e | 41 4d 45 20 7e 3d 3d 20 | if FN|AME ~== |
|00001ad0| 5c 6c 61 73 74 5f 46 4e | 41 4d 45 20 74 68 65 6e |\last_FN|AME then|
|00001ae0| 20 7b 0a 58 09 73 65 65 | 6b 28 69 6e 74 65 78 74 | {.X.see|k(intext|
|00001af0| 2c 20 31 29 0a 58 09 73 | 65 65 6b 28 5c 69 6e 69 |, 1).X.s|eek(\ini|
|00001b00| 64 78 2c 20 31 29 0a 58 | 20 20 20 20 7d 0a 58 20 |dx, 1).X| }.X |
|00001b10| 20 20 20 65 6c 73 65 20 | 7b 0a 58 09 23 20 57 65 | else |{.X.# We|
|00001b20| 27 76 65 20 67 6f 74 20 | 61 20 6e 65 77 20 74 65 |'ve got |a new te|
|00001b30| 78 74 2d 62 61 73 65 20 | 66 69 6c 65 2e 20 20 43 |xt-base |file. C|
|00001b40| 6c 6f 73 65 20 74 68 65 | 20 6f 6c 64 20 6f 6e 65 |lose the| old one|
|00001b50| 2e 0a 58 09 65 76 65 72 | 79 20 63 6c 6f 73 65 28 |..X.ever|y close(|
|00001b60| 5c 69 6e 74 65 78 74 20 | 7c 20 5c 69 6e 69 64 78 |\intext || \inidx|
|00001b70| 29 0a 58 20 20 20 20 20 | 20 20 20 23 20 54 72 79 |).X | # Try|
|00001b80| 20 74 6f 20 6f 70 65 6e | 20 6e 61 6d 65 64 20 74 | to open| named t|
|00001b90| 65 78 74 2d 62 61 73 65 | 20 66 69 6c 65 2e 0a 58 |ext-base| file..X|
|00001ba0| 09 69 6e 74 65 78 74 20 | 3a 3d 20 6f 70 65 6e 28 |.intext |:= open(|
|00001bb0| 46 4e 41 4d 45 29 20 7c | 20 73 74 6f 70 28 22 67 |FNAME) || stop("g|
|00001bc0| 65 74 74 65 78 74 3a 20 | 20 22 2c 46 4e 41 4d 45 |ettext: | ",FNAME|
|00001bd0| 2c 22 20 6e 6f 74 20 66 | 6f 75 6e 64 22 29 0a 58 |," not f|ound").X|
|00001be0| 20 20 20 20 20 20 20 20 | 23 20 54 72 79 20 74 6f | |# Try to|
|00001bf0| 20 6f 70 65 6e 20 69 6e | 64 65 78 20 66 69 6c 65 | open in|dex file|
|00001c00| 2e 0a 58 09 69 6e 69 64 | 78 20 3a 3d 20 6f 70 65 |..X.inid|x := ope|
|00001c10| 6e 28 50 61 74 68 6e 61 | 6d 65 28 46 4e 41 4d 45 |n(Pathna|me(FNAME|
|00001c20| 29 20 7c 7c 20 67 65 74 | 69 64 78 6e 61 6d 65 28 |) || get|idxname(|
|00001c30| 46 4e 41 4d 45 29 29 0a | 58 20 20 20 20 7d 0a 58 |FNAME)).|X }.X|
|00001c40| 20 20 20 20 6c 61 73 74 | 5f 46 4e 41 4d 45 20 3a | last|_FNAME :|
|00001c50| 3d 20 46 4e 41 4d 45 0a | 58 0a 58 20 20 20 20 23 |= FNAME.|X.X #|
|00001c60| 20 46 69 6e 64 20 6f 66 | 66 73 65 74 73 20 66 6f | Find of|fsets fo|
|00001c70| 72 20 6b 65 79 20 4b 45 | 59 20 69 6e 20 69 6e 64 |r key KE|Y in ind|
|00001c80| 65 78 20 66 69 6c 65 2e | 20 20 49 66 20 69 6e 69 |ex file.| If ini|
|00001c90| 64 78 20 28 74 68 65 20 | 69 6e 64 65 78 0a 58 20 |dx (the |index.X |
|00001ca0| 20 20 20 23 20 66 69 6c | 65 29 20 69 73 20 6e 75 | # fil|e) is nu|
|00001cb0| 6c 6c 20 28 77 68 69 63 | 68 20 68 61 70 70 65 6e |ll (whic|h happen|
|00001cc0| 73 20 77 68 65 6e 20 6e | 6f 6e 65 20 77 61 73 20 |s when n|one was |
|00001cd0| 66 6f 75 6e 64 29 2c 20 | 67 65 74 5f 6f 66 66 73 |found), |get_offs|
|00001ce0| 65 74 73 28 29 0a 58 20 | 20 20 20 23 20 64 65 66 |ets().X | # def|
|00001cf0| 61 75 6c 74 73 20 74 6f | 20 31 2e 20 20 4f 74 68 |aults to| 1. Oth|
|00001d00| 65 72 77 69 73 65 20 69 | 74 20 72 65 74 75 72 6e |erwise i|t return|
|00001d10| 73 20 74 68 65 20 6f 66 | 66 73 65 74 20 66 6f 72 |s the of|fset for|
|00001d20| 20 4b 45 59 20 69 6e 20 | 74 68 65 0a 58 20 20 20 | KEY in |the.X |
|00001d30| 20 23 20 69 6e 64 65 78 | 20 66 69 6c 65 2c 20 61 | # index| file, a|
|00001d40| 6e 64 20 74 68 65 6e 20 | 72 65 74 75 72 6e 73 20 |nd then |returns |
|00001d50| 74 68 65 20 6c 61 73 74 | 20 69 6e 64 65 78 65 64 |the last| indexed|
|00001d60| 20 62 79 74 65 20 6f 66 | 20 74 68 65 20 66 69 6c | byte of| the fil|
|00001d70| 65 2e 0a 58 20 20 20 20 | 23 20 52 65 74 75 72 6e |e..X |# Return|
|00001d80| 69 6e 67 20 74 68 65 20 | 6c 61 73 74 20 69 6e 64 |ing the |last ind|
|00001d90| 65 78 65 64 20 62 79 74 | 65 20 6c 65 74 73 20 75 |exed byt|e lets u|
|00001da0| 73 20 73 65 65 6b 20 74 | 6f 20 74 68 65 20 65 6e |s seek t|o the en|
|00001db0| 64 20 61 6e 64 20 64 6f | 20 61 0a 58 20 20 20 20 |d and do| a.X |
|00001dc0| 23 20 73 65 71 75 65 6e | 74 69 61 6c 20 73 65 61 |# sequen|tial sea|
|00001dd0| 72 63 68 20 6f 66 20 61 | 6e 79 20 6b 65 79 2f 76 |rch of a|ny key/v|
|00001de0| 61 6c 75 65 20 65 6e 74 | 72 69 65 73 20 74 68 61 |alue ent|ries tha|
|00001df0| 74 20 68 61 76 65 20 62 | 65 65 6e 20 61 64 64 65 |t have b|een adde|
|00001e00| 64 0a 58 20 20 20 20 23 | 20 73 69 6e 63 65 20 74 |d.X #| since t|
|00001e10| 68 65 20 6c 61 73 74 20 | 74 69 6d 65 20 69 64 78 |he last |time idx|
|00001e20| 74 65 78 74 20 77 61 73 | 20 72 75 6e 2e 0a 58 0a |text was| run..X.|
|00001e30| 58 20 20 20 20 73 65 65 | 6b 28 69 6e 74 65 78 74 |X see|k(intext|
|00001e40| 2c 20 67 65 74 5f 6f 66 | 66 73 65 74 73 28 4b 45 |, get_of|fsets(KE|
|00001e50| 59 2c 20 69 6e 69 64 78 | 29 29 0a 58 0a 58 20 20 |Y, inidx|)).X.X |
|00001e60| 20 20 23 20 46 69 6e 64 | 20 6b 65 79 2e 20 20 53 | # Find| key. S|
|00001e70| 68 6f 75 6c 64 20 62 65 | 20 72 69 67 68 74 20 74 |hould be| right t|
|00001e80| 68 65 72 65 2c 20 75 6e | 6c 65 73 73 20 74 68 65 |here, un|less the|
|00001e90| 20 75 73 65 72 20 68 61 | 73 20 61 70 70 65 6e 64 | user ha|s append|
|00001ea0| 65 64 0a 58 20 20 20 20 | 23 20 6b 65 79 2f 76 61 |ed.X |# key/va|
|00001eb0| 6c 75 65 20 70 61 69 72 | 73 20 74 6f 20 74 68 65 |lue pair|s to the|
|00001ec0| 20 65 6e 64 20 77 69 74 | 68 6f 75 74 20 72 65 2d | end wit|hout re-|
|00001ed0| 69 6e 64 65 78 69 6e 67 | 2c 20 6f 72 20 65 6c 73 |indexing|, or els|
|00001ee0| 65 20 68 61 73 20 6e 6f | 74 0a 58 20 20 20 20 23 |e has no|t.X #|
|00001ef0| 20 62 6f 74 68 65 72 65 | 64 20 74 6f 20 69 6e 64 | bothere|d to ind|
|00001f00| 65 78 20 69 6e 20 74 68 | 65 20 66 69 72 73 74 20 |ex in th|e first |
|00001f10| 70 6c 61 63 65 2e 20 20 | 49 6e 20 74 68 69 73 20 |place. |In this |
|00001f20| 63 61 73 65 20 77 65 27 | 72 65 0a 58 20 20 20 20 |case we'|re.X |
|00001f30| 23 20 73 75 70 70 6f 73 | 65 64 20 74 6f 20 73 74 |# suppos|ed to st|
|00001f40| 61 72 74 20 61 20 73 65 | 71 75 65 6e 74 69 61 6c |art a se|quential|
|00001f50| 20 73 65 61 72 63 68 20 | 66 6f 72 20 4b 45 59 20 | search |for KEY |
|00001f60| 75 70 74 6f 20 45 4f 46 | 2e 0a 58 0a 58 20 20 20 |upto EOF|..X.X |
|00001f70| 20 77 68 69 6c 65 20 6c | 69 6e 65 20 3a 3d 20 28 | while l|ine := (|
|00001f80| 72 65 61 64 28 69 6e 74 | 65 78 74 29 20 7c 20 66 |read(int|ext) | f|
|00001f90| 61 69 6c 29 20 64 6f 20 | 7b 0a 58 09 6c 69 6e 65 |ail) do |{.X.line|
|00001fa0| 20 3f 20 7b 0a 58 09 20 | 20 20 20 69 66 20 28 3d | ? {.X. | if (=|
|00001fb0| 22 3a 3a 22 2c 20 3d 4b | 45 59 2c 20 70 6f 73 28 |"::", =K|EY, pos(|
|00001fc0| 30 29 29 0a 58 09 20 20 | 20 20 74 68 65 6e 20 62 |0)).X. | then b|
|00001fd0| 72 65 61 6b 0a 58 09 7d | 0a 58 20 20 20 20 7d 0a |reak.X.}|.X }.|
|00001fe0| 58 0a 58 20 20 20 20 23 | 20 43 6f 6c 6c 65 63 74 |X.X #| Collect|
|00001ff0| 20 61 6c 6c 20 74 65 78 | 74 20 75 70 74 6f 20 74 | all tex|t upto t|
|00002000| 68 65 20 6e 65 78 74 20 | 63 6f 6c 6f 6e 2b 63 6f |he next |colon+co|
|00002010| 6c 6f 6e 2d 69 6e 69 74 | 69 61 6c 20 6c 69 6e 65 |lon-init|ial line|
|00002020| 20 28 3a 3a 29 0a 58 20 | 20 20 20 23 20 6f 72 20 | (::).X | # or |
|00002030| 45 4f 46 2e 0a 58 20 20 | 20 20 76 61 6c 75 65 20 |EOF..X | value |
|00002040| 3a 3d 20 22 22 0a 58 20 | 20 20 20 77 68 69 6c 65 |:= "".X | while|
|00002050| 20 6c 69 6e 65 20 3a 3d | 20 72 65 61 64 28 69 6e | line :=| read(in|
|00002060| 74 65 78 74 29 20 64 6f | 20 7b 0a 58 09 6d 61 74 |text) do| {.X.mat|
|00002070| 63 68 28 22 3a 3a 22 2c | 6c 69 6e 65 29 20 26 20 |ch("::",|line) & |
|00002080| 62 72 65 61 6b 0a 58 09 | 76 61 6c 75 65 20 7c 7c |break.X.|value |||
|00002090| 3a 3d 20 6c 69 6e 65 20 | 7c 7c 20 22 5c 6e 22 0a |:= line ||| "\n".|
|000020a0| 58 20 20 20 20 7d 0a 58 | 0a 58 20 20 20 20 23 20 |X }.X|.X # |
|000020b0| 4e 6f 74 65 20 74 68 61 | 74 20 61 20 6b 65 79 20 |Note tha|t a key |
|000020c0| 77 69 74 68 20 61 6e 20 | 65 6d 70 74 79 20 76 61 |with an |empty va|
|000020d0| 6c 75 65 20 72 65 74 75 | 72 6e 73 20 61 6e 20 65 |lue retu|rns an e|
|000020e0| 6d 70 74 79 20 73 74 72 | 69 6e 67 2e 0a 58 20 20 |mpty str|ing..X |
|000020f0| 20 20 72 65 74 75 72 6e | 20 74 72 69 6d 28 76 61 | return| trim(va|
|00002100| 6c 75 65 2c 20 27 5c 6e | 27 29 0a 58 0a 58 65 6e |lue, '\n|').X.Xen|
|00002110| 64 0a 58 0a 58 0a 58 0a | 58 70 72 6f 63 65 64 75 |d.X.X.X.|Xprocedu|
|00002120| 72 65 20 67 65 74 5f 6f | 66 66 73 65 74 73 28 4b |re get_o|ffsets(K|
|00002130| 45 59 2c 20 69 6e 69 64 | 78 29 0a 58 0a 58 20 20 |EY, inid|x).X.X |
|00002140| 20 20 6c 6f 63 61 6c 20 | 62 6f 74 74 6f 6d 2c 20 | local |bottom, |
|00002150| 74 6f 70 2c 20 6c 6f 63 | 2c 20 66 69 72 73 74 70 |top, loc|, firstp|
|00002160| 61 72 74 2c 20 6f 66 66 | 73 65 74 0a 58 20 20 20 |art, off|set.X |
|00002170| 20 23 20 55 73 65 20 74 | 68 65 73 65 20 74 6f 20 | # Use t|hese to |
|00002180| 73 74 6f 72 65 20 76 61 | 6c 75 65 73 20 6c 69 6b |store va|lues lik|
|00002190| 65 6c 79 20 74 6f 20 62 | 65 20 72 65 75 73 65 64 |ely to b|e reused|
|000021a0| 2e 0a 58 20 20 20 20 73 | 74 61 74 69 63 20 6f 6c |..X s|tatic ol|
|000021b0| 64 5f 69 6e 69 64 78 2c | 20 66 69 72 73 74 6c 69 |d_inidx,| firstli|
|000021c0| 6e 65 2c 20 53 4f 46 2c | 20 45 4f 46 0a 58 0a 58 |ne, SOF,| EOF.X.X|
|000021d0| 20 20 20 20 23 20 49 66 | 20 74 68 65 72 65 27 73 | # If| there's|
|000021e0| 20 6e 6f 20 69 6e 64 65 | 78 20 66 69 6c 65 2c 20 | no inde|x file, |
|000021f0| 74 68 65 6e 20 6a 75 73 | 74 20 72 65 74 75 72 6e |then jus|t return|
|00002200| 20 61 6e 20 6f 66 66 73 | 65 74 20 6f 66 20 31 2e | an offs|et of 1.|
|00002210| 0a 58 20 20 20 20 69 66 | 20 2f 69 6e 69 64 78 20 |.X if| /inidx |
|00002220| 74 68 65 6e 0a 58 09 72 | 65 74 75 72 6e 20 31 0a |then.X.r|eturn 1.|
|00002230| 58 0a 58 20 20 20 20 23 | 20 46 69 72 73 74 20 6c |X.X #| First l|
|00002240| 69 6e 65 20 63 6f 6e 74 | 61 69 6e 73 20 6f 66 66 |ine cont|ains off|
|00002250| 73 65 74 20 6f 66 20 6c | 61 73 74 20 69 6e 64 65 |set of l|ast inde|
|00002260| 78 65 64 20 62 79 74 65 | 20 69 6e 20 74 68 65 20 |xed byte| in the |
|00002270| 6d 61 69 6e 0a 58 20 20 | 20 20 23 20 74 65 78 74 |main.X | # text|
|00002280| 20 66 69 6c 65 2e 20 20 | 57 65 20 6e 65 65 64 20 | file. |We need |
|00002290| 74 68 69 73 20 6c 61 74 | 65 72 2e 20 20 53 61 76 |this lat|er. Sav|
|000022a0| 65 20 69 74 2e 20 20 53 | 74 61 72 74 20 74 68 65 |e it. S|tart the|
|000022b0| 20 62 69 6e 61 72 79 0a | 58 20 20 20 20 23 20 73 | binary.|X # s|
|000022c0| 65 61 72 63 68 20 72 6f | 75 74 69 6e 65 20 61 74 |earch ro|utine at|
|000022d0| 20 74 68 65 20 6e 65 78 | 74 20 62 79 74 65 20 61 | the nex|t byte a|
|000022e0| 66 74 65 72 20 74 68 69 | 73 20 6c 69 6e 65 2e 0a |fter thi|s line..|
|000022f0| 58 20 20 20 20 73 65 65 | 6b 28 69 6e 69 64 78 2c |X see|k(inidx,|
|00002300| 20 31 29 0a 58 20 20 20 | 20 69 66 20 6e 6f 74 20 | 1).X | if not |
|00002310| 28 69 6e 69 64 78 20 3d | 3d 3d 20 5c 6f 6c 64 5f |(inidx =|== \old_|
|00002320| 69 6e 69 64 78 29 20 74 | 68 65 6e 20 7b 0a 58 0a |inidx) t|hen {.X.|
|00002330| 58 09 23 20 47 65 74 20 | 66 69 72 73 74 20 6c 69 |X.# Get |first li|
|00002340| 6e 65 2e 0a 58 09 66 69 | 72 73 74 6c 69 6e 65 20 |ne..X.fi|rstline |
|00002350| 3a 3d 20 21 69 6e 69 64 | 78 0a 58 09 23 20 53 65 |:= !inid|x.X.# Se|
|00002360| 74 20 22 62 6f 74 74 6f | 6d 2e 22 0a 58 09 31 20 |t "botto|m.".X.1 |
|00002370| 3d 20 28 53 4f 46 20 3a | 3d 20 77 68 65 72 65 28 |= (SOF :|= where(|
|00002380| 69 6e 69 64 78 29 2d 31 | 29 20 26 0a 58 09 20 20 |inidx)-1|) &.X. |
|00002390| 20 20 73 74 6f 70 28 22 | 67 65 74 5f 6f 66 66 73 | stop("|get_offs|
|000023a0| 65 74 73 3a 20 20 63 6f | 72 72 75 70 74 20 2e 49 |ets: co|rrupt .I|
|000023b0| 44 58 20 66 69 6c 65 3b | 20 72 65 69 6e 64 65 78 |DX file;| reindex|
|000023c0| 22 29 0a 58 09 23 20 48 | 6f 77 20 62 69 67 20 69 |").X.# H|ow big i|
|000023d0| 73 20 74 68 69 73 20 66 | 69 6c 65 3f 0a 58 09 73 |s this f|ile?.X.s|
|000023e0| 65 65 6b 28 69 6e 69 64 | 78 2c 20 30 29 0a 58 09 |eek(inid|x, 0).X.|
|000023f0| 45 4f 46 20 3a 3d 20 77 | 68 65 72 65 28 69 6e 69 |EOF := w|here(ini|
|00002400| 64 78 29 0a 58 0a 58 09 | 6f 6c 64 5f 69 6e 69 64 |dx).X.X.|old_inid|
|00002410| 78 20 3a 3d 20 69 6e 69 | 64 78 0a 58 20 20 20 20 |x := ini|dx.X |
|00002420| 7d 0a 58 20 20 20 20 23 | 20 53 4f 46 2c 20 45 4f |}.X #| SOF, EO|
|00002430| 46 20 63 6f 6e 73 74 61 | 6e 74 20 66 6f 72 20 61 |F consta|nt for a|
|00002440| 20 67 69 76 65 6e 20 69 | 6e 69 64 78 20 66 69 6c | given i|nidx fil|
|00002450| 65 2e 0a 58 20 20 20 20 | 62 6f 74 74 6f 6d 20 3a |e..X |bottom :|
|00002460| 3d 20 53 4f 46 3b 20 74 | 6f 70 20 3a 3d 20 45 4f |= SOF; t|op := EO|
|00002470| 46 0a 58 0a 58 20 20 20 | 20 23 20 49 66 20 62 6f |F.X.X | # If bo|
|00002480| 74 74 6f 6d 20 67 65 74 | 73 20 62 69 67 67 65 72 |ttom get|s bigger|
|00002490| 20 74 68 61 6e 20 74 6f | 70 2c 20 74 68 65 72 65 | than to|p, there|
|000024a0| 27 73 20 6e 6f 20 73 75 | 63 68 20 6b 65 79 2e 0a |'s no su|ch key..|
|000024b0| 58 20 20 20 20 75 6e 74 | 69 6c 20 62 6f 74 74 6f |X unt|il botto|
|000024c0| 6d 20 3e 20 74 6f 70 20 | 64 6f 20 7b 0a 58 0a 58 |m > top |do {.X.X|
|000024d0| 09 6c 6f 63 20 3a 3d 20 | 28 74 6f 70 2b 62 6f 74 |.loc := |(top+bot|
|000024e0| 74 6f 6d 29 20 2f 20 32 | 0a 58 09 73 65 65 6b 28 |tom) / 2|.X.seek(|
|000024f0| 69 6e 69 64 78 2c 20 6c | 6f 63 29 0a 58 0a 58 09 |inidx, l|oc).X.X.|
|00002500| 23 20 4d 6f 76 65 20 70 | 61 73 74 20 6e 65 78 74 |# Move p|ast next|
|00002510| 20 6e 65 77 6c 69 6e 65 | 2e 20 20 49 66 20 61 74 | newline|. If at|
|00002520| 20 45 4f 46 2c 20 62 72 | 65 61 6b 2e 0a 58 09 69 | EOF, br|eak..X.i|
|00002530| 6e 63 72 20 3a 3d 20 31 | 0a 58 09 75 6e 74 69 6c |ncr := 1|.X.until|
|00002540| 20 72 65 61 64 73 28 69 | 6e 69 64 78 29 20 3d 3d | reads(i|nidx) ==|
|00002550| 20 22 5c 6e 22 20 64 6f | 0a 58 09 20 20 20 20 69 | "\n" do|.X. i|
|00002560| 6e 63 72 20 2b 3a 3d 20 | 31 0a 58 09 69 66 20 6c |ncr +:= |1.X.if l|
|00002570| 6f 63 2b 69 6e 63 72 20 | 3d 20 45 4f 46 20 74 68 |oc+incr |= EOF th|
|00002580| 65 6e 20 7b 0a 58 09 20 | 20 20 20 74 6f 70 20 3a |en {.X. | top :|
|00002590| 3d 20 6c 6f 63 2d 31 0a | 58 09 20 20 20 20 6e 65 |= loc-1.|X. ne|
|000025a0| 78 74 0a 58 09 7d 0a 58 | 0a 58 09 23 20 43 68 65 |xt.X.}.X|.X.# Che|
|000025b0| 63 6b 20 74 6f 20 73 65 | 65 20 69 66 20 74 68 65 |ck to se|e if the|
|000025c0| 20 63 75 72 72 65 6e 74 | 20 6c 69 6e 65 20 63 6f | current| line co|
|000025d0| 6e 74 61 69 6e 73 20 4b | 45 59 2e 0a 58 09 72 65 |ntains K|EY..X.re|
|000025e0| 61 64 28 69 6e 69 64 78 | 29 20 3f 20 7b 0a 58 0a |ad(inidx|) ? {.X.|
|000025f0| 58 09 20 20 20 20 23 20 | 2e 49 44 58 20 66 69 6c |X. # |.IDX fil|
|00002600| 65 20 6c 69 6e 65 20 66 | 6f 72 6d 61 74 20 69 73 |e line f|ormat is|
|00002610| 20 4b 45 59 5c 74 6f 66 | 66 73 65 74 0a 58 09 20 | KEY\tof|fset.X. |
|00002620| 20 20 20 66 69 72 73 74 | 70 61 72 74 20 3a 3d 20 | first|part := |
|00002630| 74 61 62 28 66 69 6e 64 | 28 22 5c 74 22 29 29 0a |tab(find|("\t")).|
|00002640| 58 09 20 20 20 20 69 66 | 20 4b 45 59 20 3d 3d 20 |X. if| KEY == |
|00002650| 66 69 72 73 74 70 61 72 | 74 20 74 68 65 6e 20 7b |firstpar|t then {|
|00002660| 0a 58 09 09 23 20 72 65 | 74 75 72 6e 20 6f 66 66 |.X..# re|turn off|
|00002670| 73 65 74 0a 58 09 09 72 | 65 74 75 72 6e 20 28 6d |set.X..r|eturn (m|
|00002680| 6f 76 65 28 31 29 2c 20 | 74 61 62 28 30 29 29 0a |ove(1), |tab(0)).|
|00002690| 58 09 20 20 20 20 7d 0a | 58 09 20 20 20 20 23 20 |X. }.|X. # |
|000026a0| 41 68 2c 20 74 68 69 73 | 20 69 73 20 77 68 61 74 |Ah, this| is what|
|000026b0| 20 61 6c 6c 20 62 69 6e | 61 72 79 20 73 65 61 72 | all bin|ary sear|
|000026c0| 63 68 65 73 20 64 6f 2e | 0a 58 09 20 20 20 20 65 |ches do.|.X. e|
|000026d0| 6c 73 65 20 7b 0a 58 09 | 09 69 66 20 4b 45 59 20 |lse {.X.|.if KEY |
|000026e0| 3c 3c 20 66 69 72 73 74 | 70 61 72 74 0a 58 09 09 |<< first|part.X..|
|000026f0| 74 68 65 6e 20 74 6f 70 | 20 3a 3d 20 6c 6f 63 2d |then top| := loc-|
|00002700| 31 0a 58 09 09 65 6c 73 | 65 20 62 6f 74 74 6f 6d |1.X..els|e bottom|
|00002710| 20 3a 3d 20 6c 6f 63 20 | 2b 20 69 6e 63 72 20 2b | := loc |+ incr +|
|00002720| 20 2a 26 73 75 62 6a 65 | 63 74 0a 58 09 20 20 20 | *&subje|ct.X. |
|00002730| 20 7d 0a 58 09 7d 0a 58 | 20 20 20 20 7d 0a 58 0a | }.X.}.X| }.X.|
|00002740| 58 20 20 20 20 23 20 46 | 69 72 73 74 20 6c 69 6e |X # F|irst lin|
|00002750| 65 20 6f 66 20 74 68 65 | 20 69 6e 64 65 78 20 66 |e of the| index f|
|00002760| 69 6c 65 20 63 6f 6e 74 | 61 69 6e 73 20 6f 66 66 |ile cont|ains off|
|00002770| 73 65 74 20 6f 66 20 6c | 61 73 74 20 69 6e 64 65 |set of l|ast inde|
|00002780| 78 65 64 0a 58 20 20 20 | 20 23 20 62 79 74 65 20 |xed.X | # byte |
|00002790| 2b 20 31 2e 20 20 4d 69 | 67 68 74 20 62 65 20 74 |+ 1. Mi|ght be t|
|000027a0| 68 65 20 6f 6e 6c 79 20 | 6c 69 6e 65 20 69 6e 20 |he only |line in |
|000027b0| 74 68 65 20 66 69 6c 65 | 20 28 69 66 20 69 74 20 |the file| (if it |
|000027c0| 68 61 64 20 6e 6f 0a 58 | 20 20 20 20 23 20 6b 65 |had no.X| # ke|
|000027d0| 79 73 20 77 68 65 6e 20 | 69 74 20 77 61 73 20 69 |ys when |it was i|
|000027e0| 6e 64 65 78 65 64 29 2e | 0a 58 20 20 20 20 72 65 |ndexed).|.X re|
|000027f0| 74 75 72 6e 20 66 69 72 | 73 74 6c 69 6e 65 0a 58 |turn fir|stline.X|
|00002800| 0a 58 65 6e 64 0a 53 48 | 41 52 5f 45 4f 46 0a 74 |.Xend.SH|AR_EOF.t|
|00002810| 72 75 65 20 7c 7c 20 65 | 63 68 6f 20 27 72 65 73 |rue || e|cho 'res|
|00002820| 74 6f 72 65 20 6f 66 20 | 67 65 74 74 65 78 74 2e |tore of |gettext.|
|00002830| 69 63 6e 20 66 61 69 6c | 65 64 27 0a 72 6d 20 2d |icn fail|ed'.rm -|
|00002840| 66 20 5f 73 68 61 72 5f | 77 6e 74 5f 2e 74 6d 70 |f _shar_|wnt_.tmp|
|00002850| 0a 66 69 0a 23 20 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |.fi.# ==|========|
|00002860| 3d 3d 3d 20 61 64 6a 75 | 6e 63 74 73 2e 69 63 6e |=== adju|ncts.icn|
|00002870| 20 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 0a | =======|=======.|
|00002880| 69 66 20 74 65 73 74 20 | 2d 66 20 27 61 64 6a 75 |if test |-f 'adju|
|00002890| 6e 63 74 73 2e 69 63 6e | 27 20 2d 61 20 58 22 24 |ncts.icn|' -a X"$|
|000028a0| 31 22 20 21 3d 20 58 22 | 2d 63 22 3b 20 74 68 65 |1" != X"|-c"; the|
|000028b0| 6e 0a 09 65 63 68 6f 20 | 27 78 20 2d 20 73 6b 69 |n..echo |'x - ski|
|000028c0| 70 70 69 6e 67 20 61 64 | 6a 75 6e 63 74 73 2e 69 |pping ad|juncts.i|
|000028d0| 63 6e 20 28 46 69 6c 65 | 20 61 6c 72 65 61 64 79 |cn (File| already|
|000028e0| 20 65 78 69 73 74 73 29 | 27 0a 09 72 6d 20 2d 66 | exists)|'..rm -f|
|000028f0| 20 5f 73 68 61 72 5f 77 | 6e 74 5f 2e 74 6d 70 0a | _shar_w|nt_.tmp.|
|00002900| 65 6c 73 65 0a 3e 20 5f | 73 68 61 72 5f 77 6e 74 |else.> _|shar_wnt|
|00002910| 5f 2e 74 6d 70 0a 65 63 | 68 6f 20 27 78 20 2d 20 |_.tmp.ec|ho 'x - |
|00002920| 65 78 74 72 61 63 74 69 | 6e 67 20 61 64 6a 75 6e |extracti|ng adjun|
|00002930| 63 74 73 2e 69 63 6e 20 | 28 54 65 78 74 29 27 0a |cts.icn |(Text)'.|
|00002940| 73 65 64 20 27 73 2f 5e | 58 2f 2f 27 20 3c 3c 20 |sed 's/^|X//' << |
|00002950| 27 53 48 41 52 5f 45 4f | 46 27 20 3e 20 27 61 64 |'SHAR_EO|F' > 'ad|
|00002960| 6a 75 6e 63 74 73 2e 69 | 63 6e 27 20 26 26 0a 58 |juncts.i|cn' &&.X|
|00002970| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00002980| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00002990| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|000029a0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|000029b0| 23 23 23 23 23 23 23 23 | 23 23 23 23 0a 58 23 0a |########|####.X#.|
|000029c0| 58 23 09 4e 61 6d 65 3a | 09 20 61 64 6a 75 6e 63 |X#.Name:|. adjunc|
|000029d0| 74 73 2e 69 63 6e 0a 58 | 23 0a 58 23 09 54 69 74 |ts.icn.X|#.X#.Tit|
|000029e0| 6c 65 3a 09 20 61 64 6a | 75 6e 63 74 73 20 28 61 |le:. adj|uncts (a|
|000029f0| 64 6a 75 6e 63 74 20 75 | 74 69 6c 69 74 69 65 73 |djunct u|tilities|
|00002a00| 20 66 6f 72 20 67 65 74 | 74 65 78 74 20 61 6e 64 | for get|text and|
|00002a10| 20 69 64 78 74 65 78 74 | 29 0a 58 23 0a 58 23 09 | idxtext|).X#.X#.|
|00002a20| 41 75 74 68 6f 72 3a 09 | 20 52 69 63 68 61 72 64 |Author:.| Richard|
|00002a30| 20 4c 2e 20 47 6f 65 72 | 77 69 74 7a 0a 58 23 0a | L. Goer|witz.X#.|
|00002a40| 58 23 09 56 65 72 73 69 | 6f 6e 3a 20 31 2e 31 0a |X#.Versi|on: 1.1.|
|00002a50| 58 23 0a 58 23 23 23 23 | 23 23 23 23 23 23 23 23 |X#.X####|########|
|00002a60| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00002a70| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00002a80| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00002a90| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00002aa0| 0a 58 23 20 20 0a 58 23 | 20 20 50 72 65 74 74 79 |.X# .X#| Pretty|
|00002ab0| 20 6d 75 6e 64 61 6e 65 | 20 73 74 75 66 66 2e 20 | mundane| stuff. |
|00002ac0| 20 42 61 73 65 6e 61 6d | 65 28 29 2c 20 50 61 74 | Basenam|e(), Pat|
|00002ad0| 68 6e 61 6d 65 28 29 2c | 20 53 74 72 69 70 28 29 |hname(),| Strip()|
|00002ae0| 2c 20 61 6e 64 20 61 20 | 75 74 69 6c 69 74 79 0a |, and a |utility.|
|00002af0| 58 23 20 20 66 6f 72 20 | 63 72 65 61 74 69 6e 67 |X# for |creating|
|00002b00| 20 69 6e 64 65 78 20 66 | 69 6c 65 6e 61 6d 65 73 | index f|ilenames|
|00002b10| 2e 0a 58 23 0a 58 23 23 | 23 23 23 23 23 23 23 23 |..X#.X##|########|
|00002b20| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00002b30| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00002b40| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00002b50| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00002b60| 23 23 0a 58 23 0a 58 23 | 20 20 4c 69 6e 6b 73 3a |##.X#.X#| Links:|
|00002b70| 20 6e 6f 6e 65 0a 58 23 | 0a 58 23 20 20 53 65 65 | none.X#|.X# See|
|00002b80| 20 61 6c 73 6f 3a 20 67 | 65 74 74 65 78 74 2e 69 | also: g|ettext.i|
|00002b90| 63 6e 2c 20 69 64 78 74 | 65 78 74 2c 69 63 6e 0a |cn, idxt|ext,icn.|
|00002ba0| 58 23 0a 58 23 23 23 23 | 23 23 23 23 23 23 23 23 |X#.X####|########|
|00002bb0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00002bc0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00002bd0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00002be0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00002bf0| 0a 58 0a 58 0a 58 70 72 | 6f 63 65 64 75 72 65 20 |.X.X.Xpr|ocedure |
|00002c00| 42 61 73 65 6e 61 6d 65 | 28 73 29 0a 58 0a 58 20 |Basename|(s).X.X |
|00002c10| 20 20 20 23 20 67 6c 6f | 62 61 6c 20 5f 73 6c 61 | # glo|bal _sla|
|00002c20| 73 68 0a 58 20 20 20 20 | 73 20 3f 20 7b 0a 58 09 |sh.X |s ? {.X.|
|00002c30| 77 68 69 6c 65 20 74 61 | 62 28 66 69 6e 64 28 5f |while ta|b(find(_|
|00002c40| 73 6c 61 73 68 29 2b 31 | 29 0a 58 09 72 65 74 75 |slash)+1|).X.retu|
|00002c50| 72 6e 20 74 61 62 28 30 | 29 0a 58 20 20 20 20 7d |rn tab(0|).X }|
|00002c60| 0a 58 0a 58 65 6e 64 0a | 58 0a 58 0a 58 70 72 6f |.X.Xend.|X.X.Xpro|
|00002c70| 63 65 64 75 72 65 20 50 | 61 74 68 6e 61 6d 65 28 |cedure P|athname(|
|00002c80| 73 29 0a 58 0a 58 20 20 | 20 20 23 20 67 6c 6f 62 |s).X.X | # glob|
|00002c90| 61 6c 20 5f 73 6c 61 73 | 68 0a 58 20 20 20 20 73 |al _slas|h.X s|
|00002ca0| 32 20 3a 3d 20 22 22 0a | 58 20 20 20 20 73 20 3f |2 := "".|X s ?|
|00002cb0| 20 7b 0a 58 09 77 68 69 | 6c 65 20 73 32 20 7c 7c | {.X.whi|le s2 |||
|00002cc0| 3a 3d 20 74 61 62 28 66 | 69 6e 64 28 5f 73 6c 61 |:= tab(f|ind(_sla|
|00002cd0| 73 68 29 2b 31 29 0a 58 | 09 72 65 74 75 72 6e 20 |sh)+1).X|.return |
|00002ce0| 73 32 0a 58 20 20 20 20 | 7d 0a 58 0a 58 65 6e 64 |s2.X |}.X.Xend|
|00002cf0| 0a 58 0a 58 0a 58 70 72 | 6f 63 65 64 75 72 65 20 |.X.X.Xpr|ocedure |
|00002d00| 67 65 74 69 64 78 6e 61 | 6d 65 28 46 4e 41 4d 45 |getidxna|me(FNAME|
|00002d10| 29 0a 58 0a 58 20 20 20 | 20 23 0a 58 20 20 20 20 |).X.X | #.X |
|00002d20| 23 20 44 69 73 63 61 72 | 64 20 70 61 74 68 20 63 |# Discar|d path c|
|00002d30| 6f 6d 70 6f 6e 65 6e 74 | 2e 20 20 43 75 74 20 62 |omponent|. Cut b|
|00002d40| 61 73 65 6e 61 6d 65 20 | 64 6f 77 6e 20 74 6f 20 |asename |down to |
|00002d50| 61 20 73 6d 61 6c 6c 20 | 65 6e 6f 75 67 68 0a 58 |a small |enough.X|
|00002d60| 20 20 20 20 23 20 73 69 | 7a 65 20 74 68 61 74 20 | # si|ze that |
|00002d70| 74 68 65 20 4f 53 20 77 | 69 6c 6c 20 62 65 20 61 |the OS w|ill be a|
|00002d80| 62 6c 65 20 74 6f 20 68 | 61 6e 64 6c 65 20 61 64 |ble to h|andle ad|
|00002d90| 64 69 74 69 6f 6e 20 6f | 66 20 74 68 65 20 65 78 |dition o|f the ex|
|00002da0| 2d 0a 58 20 20 20 20 23 | 20 74 65 6e 73 69 6f 6e |-.X #| tension|
|00002db0| 20 22 2e 49 44 58 22 0a | 58 20 20 20 20 23 0a 58 | ".IDX".|X #.X|
|00002dc0| 0a 58 20 20 20 20 23 20 | 67 6c 6f 62 61 6c 20 5f |.X # |global _|
|00002dd0| 73 6c 61 73 68 2c 20 5f | 62 61 73 65 6c 65 6e 0a |slash, _|baselen.|
|00002de0| 58 20 20 20 20 72 65 74 | 75 72 6e 20 72 69 67 68 |X ret|urn righ|
|00002df0| 74 28 53 74 72 69 70 28 | 42 61 73 65 6e 61 6d 65 |t(Strip(|Basename|
|00002e00| 28 46 4e 41 4d 45 2c 5f | 73 6c 61 73 68 29 2c 27 |(FNAME,_|slash),'|
|00002e10| 2e 27 29 2c 20 5f 62 61 | 73 65 6c 65 6e 2c 20 22 |.'), _ba|selen, "|
|00002e20| 78 22 29 20 7c 7c 20 22 | 2e 49 44 58 22 0a 58 0a |x") || "|.IDX".X.|
|00002e30| 58 65 6e 64 0a 58 0a 58 | 0a 58 70 72 6f 63 65 64 |Xend.X.X|.Xproced|
|00002e40| 75 72 65 20 53 74 72 69 | 70 28 73 2c 63 29 0a 58 |ure Stri|p(s,c).X|
|00002e50| 0a 58 20 20 20 20 6c 6f | 63 61 6c 20 73 32 0a 58 |.X lo|cal s2.X|
|00002e60| 0a 58 20 20 20 20 73 32 | 20 3a 3d 20 22 22 0a 58 |.X s2| := "".X|
|00002e70| 20 20 20 20 73 20 3f 20 | 7b 0a 58 09 77 68 69 6c | s ? |{.X.whil|
|00002e80| 65 20 73 32 20 7c 7c 3a | 3d 20 74 61 62 28 75 70 |e s2 ||:|= tab(up|
|00002e90| 74 6f 28 63 29 29 0a 58 | 09 64 6f 20 74 61 62 28 |to(c)).X|.do tab(|
|00002ea0| 6d 61 6e 79 28 63 29 29 | 0a 58 09 73 32 20 7c 7c |many(c))|.X.s2 |||
|00002eb0| 3a 3d 20 74 61 62 28 30 | 29 0a 58 20 20 20 20 7d |:= tab(0|).X }|
|00002ec0| 0a 58 20 20 20 20 72 65 | 74 75 72 6e 20 73 32 0a |.X re|turn s2.|
|00002ed0| 58 0a 58 65 6e 64 0a 53 | 48 41 52 5f 45 4f 46 0a |X.Xend.S|HAR_EOF.|
|00002ee0| 74 72 75 65 20 7c 7c 20 | 65 63 68 6f 20 27 72 65 |true || |echo 're|
|00002ef0| 73 74 6f 72 65 20 6f 66 | 20 61 64 6a 75 6e 63 74 |store of| adjunct|
|00002f00| 73 2e 69 63 6e 20 66 61 | 69 6c 65 64 27 0a 72 6d |s.icn fa|iled'.rm|
|00002f10| 20 2d 66 20 5f 73 68 61 | 72 5f 77 6e 74 5f 2e 74 | -f _sha|r_wnt_.t|
|00002f20| 6d 70 0a 66 69 0a 23 20 | 3d 3d 3d 3d 3d 3d 3d 3d |mp.fi.# |========|
|00002f30| 3d 3d 3d 3d 3d 20 69 64 | 78 74 65 78 74 2e 69 63 |===== id|xtext.ic|
|00002f40| 6e 20 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |n ======|========|
|00002f50| 0a 69 66 20 74 65 73 74 | 20 2d 66 20 27 69 64 78 |.if test| -f 'idx|
|00002f60| 74 65 78 74 2e 69 63 6e | 27 20 2d 61 20 58 22 24 |text.icn|' -a X"$|
|00002f70| 31 22 20 21 3d 20 58 22 | 2d 63 22 3b 20 74 68 65 |1" != X"|-c"; the|
|00002f80| 6e 0a 09 65 63 68 6f 20 | 27 78 20 2d 20 73 6b 69 |n..echo |'x - ski|
|00002f90| 70 70 69 6e 67 20 69 64 | 78 74 65 78 74 2e 69 63 |pping id|xtext.ic|
|00002fa0| 6e 20 28 46 69 6c 65 20 | 61 6c 72 65 61 64 79 20 |n (File |already |
|00002fb0| 65 78 69 73 74 73 29 27 | 0a 09 72 6d 20 2d 66 20 |exists)'|..rm -f |
|00002fc0| 5f 73 68 61 72 5f 77 6e | 74 5f 2e 74 6d 70 0a 65 |_shar_wn|t_.tmp.e|
|00002fd0| 6c 73 65 0a 3e 20 5f 73 | 68 61 72 5f 77 6e 74 5f |lse.> _s|har_wnt_|
|00002fe0| 2e 74 6d 70 0a 65 63 68 | 6f 20 27 78 20 2d 20 65 |.tmp.ech|o 'x - e|
|00002ff0| 78 74 72 61 63 74 69 6e | 67 20 69 64 78 74 65 78 |xtractin|g idxtex|
|00003000| 74 2e 69 63 6e 20 28 54 | 65 78 74 29 27 0a 73 65 |t.icn (T|ext)'.se|
|00003010| 64 20 27 73 2f 5e 58 2f | 2f 27 20 3c 3c 20 27 53 |d 's/^X/|/' << 'S|
|00003020| 48 41 52 5f 45 4f 46 27 | 20 3e 20 27 69 64 78 74 |HAR_EOF'| > 'idxt|
|00003030| 65 78 74 2e 69 63 6e 27 | 20 26 26 0a 58 23 23 23 |ext.icn'| &&.X###|
|00003040| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00003050| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00003060| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00003070| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00003080| 23 23 23 23 23 23 23 23 | 23 0a 58 23 0a 58 23 09 |########|#.X#.X#.|
|00003090| 4e 61 6d 65 3a 09 20 69 | 64 78 74 65 78 74 2e 69 |Name:. i|dxtext.i|
|000030a0| 63 6e 0a 58 23 0a 58 23 | 09 54 69 74 6c 65 3a 09 |cn.X#.X#|.Title:.|
|000030b0| 20 69 64 78 74 65 78 74 | 20 28 69 6e 64 65 78 20 | idxtext| (index |
|000030c0| 74 65 78 74 2d 62 61 73 | 65 20 66 6f 72 20 67 65 |text-bas|e for ge|
|000030d0| 74 74 65 78 74 28 29 20 | 72 6f 75 74 69 6e 65 29 |ttext() |routine)|
|000030e0| 0a 58 23 0a 58 23 09 41 | 75 74 68 6f 72 3a 09 20 |.X#.X#.A|uthor:. |
|000030f0| 52 69 63 68 61 72 64 20 | 4c 2e 20 47 6f 65 72 77 |Richard |L. Goerw|
|00003100| 69 74 7a 0a 58 23 0a 58 | 23 09 56 65 72 73 69 6f |itz.X#.X|#.Versio|
|00003110| 6e 3a 20 31 2e 39 0a 58 | 23 0a 58 23 23 23 23 23 |n: 1.9.X|#.X#####|
|00003120| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00003130| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00003140| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00003150| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00003160| 23 23 23 23 23 23 23 0a | 58 23 0a 58 23 20 20 20 |#######.|X#.X# |
|00003170| 20 20 20 49 64 78 74 65 | 78 74 20 74 75 72 6e 73 | Idxte|xt turns|
|00003180| 20 61 20 66 69 6c 65 20 | 61 73 73 6f 63 69 61 74 | a file |associat|
|00003190| 65 64 20 77 69 74 68 20 | 67 65 74 74 65 78 74 28 |ed with |gettext(|
|000031a0| 29 20 72 6f 75 74 69 6e | 65 20 69 6e 74 6f 20 61 |) routin|e into a|
|000031b0| 6e 0a 58 23 20 20 69 6e | 64 65 78 65 64 20 74 65 |n.X# in|dexed te|
|000031c0| 78 74 2d 20 62 61 73 65 | 2e 20 20 54 68 6f 75 67 |xt- base|. Thoug|
|000031d0| 68 20 67 65 74 74 65 78 | 74 28 29 20 77 69 6c 6c |h gettex|t() will|
|000031e0| 20 77 6f 72 6b 20 66 69 | 6e 65 20 77 69 74 68 20 | work fi|ne with |
|000031f0| 66 69 6c 65 73 0a 58 23 | 20 20 74 68 61 74 20 68 |files.X#| that h|
|00003200| 61 76 65 6e 27 74 20 62 | 65 65 6e 20 69 6e 64 65 |aven't b|een inde|
|00003210| 78 65 64 20 76 69 61 20 | 69 64 78 74 65 78 74 28 |xed via |idxtext(|
|00003220| 29 2c 20 61 63 63 65 73 | 73 20 69 73 20 66 61 73 |), acces|s is fas|
|00003230| 74 65 72 20 69 66 20 74 | 68 65 0a 58 23 20 20 69 |ter if t|he.X# i|
|00003240| 6e 64 65 78 69 6e 67 20 | 69 73 20 64 6f 6e 65 20 |ndexing |is done |
|00003250| 69 66 20 74 68 65 20 66 | 69 6c 65 20 69 73 2c 20 |if the f|ile is, |
|00003260| 73 61 79 2c 20 6f 76 65 | 72 20 31 30 6b 20 28 6f |say, ove|r 10k (o|
|00003270| 6e 20 6d 79 20 73 79 73 | 74 65 6d 20 74 68 65 0a |n my sys|tem the.|
|00003280| 58 23 20 20 63 72 6f 73 | 73 6f 76 65 72 20 70 6f |X# cros|sover po|
|00003290| 69 6e 74 20 69 73 20 61 | 63 74 75 61 6c 6c 79 20 |int is a|ctually |
|000032a0| 61 62 6f 75 74 20 35 6b | 29 2e 0a 58 23 0a 58 23 |about 5k|)..X#.X#|
|000032b0| 20 20 20 20 20 20 55 73 | 61 67 65 20 69 73 20 73 | Us|age is s|
|000032c0| 69 6d 70 6c 79 20 22 69 | 64 78 74 65 78 74 20 66 |imply "i|dxtext f|
|000032d0| 69 6c 65 31 20 5b 66 69 | 6c 65 32 20 5b 2e 2e 2e |ile1 [fi|le2 [...|
|000032e0| 5d 5d 2c 22 20 77 68 65 | 72 65 20 66 69 6c 65 31 |]]," whe|re file1|
|000032f0| 2c 0a 58 23 20 20 66 69 | 6c 65 32 2c 20 65 74 63 |,.X# fi|le2, etc|
|00003300| 20 61 72 65 20 74 68 65 | 20 6e 61 6d 65 73 20 6f | are the| names o|
|00003310| 66 20 67 65 74 74 65 78 | 74 2d 66 6f 72 6d 61 74 |f gettex|t-format|
|00003320| 20 66 69 6c 65 73 20 74 | 68 61 74 20 61 72 65 20 | files t|hat are |
|00003330| 74 6f 20 62 65 0a 58 23 | 20 20 28 72 65 2d 29 69 |to be.X#| (re-)i|
|00003340| 6e 64 65 78 65 64 2e 0a | 58 23 0a 58 23 20 20 20 |ndexed..|X#.X# |
|00003350| 20 20 20 49 6e 64 65 78 | 65 64 20 66 69 6c 65 73 | Index|ed files|
|00003360| 20 68 61 76 65 20 61 20 | 76 65 72 79 20 73 69 6d | have a |very sim|
|00003370| 70 6c 65 20 66 6f 72 6d | 61 74 3a 20 6b 65 79 6e |ple form|at: keyn|
|00003380| 61 6d 65 20 74 61 62 20 | 6f 66 66 73 65 74 0a 58 |ame tab |offset.X|
|00003390| 23 20 20 5b 74 61 62 20 | 6f 66 66 73 65 74 20 5b |# [tab |offset [|
|000033a0| 65 74 63 2e 5d 5d 5c 6e | 2e 20 20 54 68 65 20 66 |etc.]]\n|. The f|
|000033b0| 69 72 73 74 20 6c 69 6e | 65 20 6f 66 20 74 68 65 |irst lin|e of the|
|000033c0| 20 69 6e 64 65 78 20 66 | 69 6c 65 20 69 73 20 61 | index f|ile is a|
|000033d0| 0a 58 23 20 20 70 6f 69 | 6e 74 65 72 20 74 6f 20 |.X# poi|nter to |
|000033e0| 74 68 65 20 6c 61 73 74 | 20 69 6e 64 65 78 65 64 |the last| indexed|
|000033f0| 20 62 79 74 65 20 6f 66 | 20 74 68 65 20 74 65 78 | byte of| the tex|
|00003400| 74 2d 62 61 73 65 20 66 | 69 6c 65 20 69 74 20 69 |t-base f|ile it i|
|00003410| 6e 64 65 78 65 73 2e 0a | 58 23 0a 58 23 20 20 42 |ndexes..|X#.X# B|
|00003420| 55 47 53 3a 20 20 49 6e | 64 65 78 20 66 69 6c 65 |UGS: In|dex file|
|00003430| 73 20 61 72 65 20 74 6f | 6f 20 6c 61 72 67 65 2e |s are to|o large.|
|00003440| 0a 58 23 0a 58 23 23 23 | 23 23 23 23 23 23 23 23 |.X#.X###|########|
|00003450| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00003460| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00003470| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00003480| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00003490| 23 0a 58 23 0a 58 23 20 | 20 4c 69 6e 6b 73 3a 20 |#.X#.X# | Links: |
|000034a0| 2e 2f 61 64 6a 75 6e 63 | 74 73 2e 69 63 6e 0a 58 |./adjunc|ts.icn.X|
|000034b0| 23 0a 58 23 20 20 52 65 | 71 75 69 72 65 73 3a 20 |#.X# Re|quires: |
|000034c0| 55 4e 49 58 20 6f 72 20 | 4d 53 2d 44 4f 53 0a 58 |UNIX or |MS-DOS.X|
|000034d0| 23 0a 58 23 20 20 53 65 | 65 20 61 6c 73 6f 3a 20 |#.X# Se|e also: |
|000034e0| 67 65 74 74 65 78 74 2e | 69 63 6e 0a 58 23 0a 58 |gettext.|icn.X#.X|
|000034f0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00003500| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00003510| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00003520| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00003530| 23 23 23 23 23 23 23 23 | 23 23 23 23 0a 58 0a 58 |########|####.X.X|
|00003540| 0a 58 67 6c 6f 62 61 6c | 20 5f 73 6c 61 73 68 2c |.Xglobal| _slash,|
|00003550| 20 5f 62 61 73 65 6c 65 | 6e 0a 58 0a 58 70 72 6f | _basele|n.X.Xpro|
|00003560| 63 65 64 75 72 65 20 6d | 61 69 6e 28 61 29 0a 58 |cedure m|ain(a).X|
|00003570| 0a 58 20 20 20 20 6c 6f | 63 61 6c 20 74 65 6d 70 |.X lo|cal temp|
|00003580| 5f 6e 61 6d 65 2c 20 66 | 6e 61 6d 65 2c 20 69 6e |_name, f|name, in|
|00003590| 66 69 6c 65 2c 20 6f 75 | 74 66 69 6c 65 0a 58 20 |file, ou|tfile.X |
|000035a0| 20 20 20 69 6e 69 74 69 | 61 6c 20 7b 0a 58 09 69 | initi|al {.X.i|
|000035b0| 66 20 66 69 6e 64 28 22 | 55 4e 49 58 22 2c 20 26 |f find("|UNIX", &|
|000035c0| 66 65 61 74 75 72 65 73 | 29 20 74 68 65 6e 20 7b |features|) then {|
|000035d0| 0a 58 09 20 20 20 20 5f | 73 6c 61 73 68 20 3a 3d |.X. _|slash :=|
|000035e0| 20 22 2f 22 0a 58 09 20 | 20 20 20 5f 62 61 73 65 | "/".X. | _base|
|000035f0| 6c 65 6e 20 3a 3d 20 31 | 30 0a 58 09 7d 0a 58 09 |len := 1|0.X.}.X.|
|00003600| 65 6c 73 65 20 69 66 20 | 66 69 6e 64 28 22 4d 53 |else if |find("MS|
|00003610| 2d 44 4f 53 22 2c 20 26 | 66 65 61 74 75 72 65 73 |-DOS", &|features|
|00003620| 29 20 74 68 65 6e 20 7b | 0a 58 09 20 20 20 20 5f |) then {|.X. _|
|00003630| 73 6c 61 73 68 20 3a 3d | 20 22 5c 5c 22 0a 58 09 |slash :=| "\\".X.|
|00003640| 20 20 20 20 5f 62 61 73 | 65 6c 65 6e 20 3a 3d 20 | _bas|elen := |
|00003650| 38 0a 58 09 7d 0a 58 09 | 65 6c 73 65 20 73 74 6f |8.X.}.X.|else sto|
|00003660| 70 28 22 69 64 78 74 65 | 78 74 3a 20 20 4f 53 20 |p("idxte|xt: OS |
|00003670| 6e 6f 74 20 73 75 70 70 | 6f 72 74 65 64 22 29 0a |not supp|orted").|
|00003680| 58 20 20 20 20 7d 0a 58 | 0a 58 20 20 20 20 23 20 |X }.X|.X # |
|00003690| 43 68 65 63 6b 20 74 6f | 20 73 65 65 20 69 66 20 |Check to| see if |
|000036a0| 77 65 20 68 61 76 65 20 | 61 6e 79 20 61 72 67 75 |we have |any argu|
|000036b0| 6d 65 6e 74 73 2e 0a 58 | 20 20 20 20 2a 61 20 3d |ments..X| *a =|
|000036c0| 20 30 20 26 20 73 74 6f | 70 28 22 75 73 61 67 65 | 0 & sto|p("usage|
|000036d0| 3a 20 20 69 64 78 74 65 | 78 74 20 66 69 6c 65 31 |: idxte|xt file1|
|000036e0| 20 5b 66 69 6c 65 32 20 | 5b 2e 2e 2e 5d 5d 22 29 | [file2 |[...]]")|
|000036f0| 0a 58 0a 58 20 20 20 20 | 23 20 53 74 61 72 74 20 |.X.X |# Start |
|00003700| 70 6f 70 70 69 6e 67 20 | 66 69 6c 65 6e 61 6d 65 |popping |filename|
|00003710| 73 20 6f 66 66 20 6f 66 | 20 74 68 65 20 61 72 67 |s off of| the arg|
|00003720| 75 6d 65 6e 74 20 6c 69 | 73 74 2e 0a 58 20 20 20 |ument li|st..X |
|00003730| 20 77 68 69 6c 65 20 66 | 6e 61 6d 65 20 3a 3d 20 | while f|name := |
|00003740| 70 6f 70 28 61 29 20 64 | 6f 20 7b 0a 58 0a 58 09 |pop(a) d|o {.X.X.|
|00003750| 23 20 4f 70 65 6e 20 69 | 6e 70 75 74 20 66 69 6c |# Open i|nput fil|
|00003760| 65 2e 0a 58 09 69 6e 66 | 69 6c 65 20 3a 3d 20 6f |e..X.inf|ile := o|
|00003770| 70 65 6e 28 66 6e 61 6d | 65 29 20 7c 20 73 74 6f |pen(fnam|e) | sto|
|00003780| 70 28 22 69 64 78 74 65 | 78 74 3a 20 20 22 2c 66 |p("idxte|xt: ",f|
|00003790| 6e 61 6d 65 2c 22 20 6e | 6f 74 20 66 6f 75 6e 64 |name," n|ot found|
|000037a0| 22 29 0a 58 09 23 20 47 | 65 74 20 69 6e 64 65 78 |").X.# G|et index|
|000037b0| 20 66 69 6c 65 20 6e 61 | 6d 65 2e 0a 58 09 6f 75 | file na|me..X.ou|
|000037c0| 74 66 69 6c 65 20 3a 3d | 20 6f 70 65 6e 28 74 65 |tfile :=| open(te|
|000037d0| 6d 70 5f 6e 61 6d 65 20 | 3a 3d 20 50 61 74 68 6e |mp_name |:= Pathn|
|000037e0| 61 6d 65 28 66 6e 61 6d | 65 29 7c 7c 67 65 74 69 |ame(fnam|e)||geti|
|000037f0| 64 78 6e 61 6d 65 28 66 | 6e 61 6d 65 29 2c 22 77 |dxname(f|name),"w|
|00003800| 22 29 20 7c 0a 58 09 20 | 20 20 20 73 74 6f 70 28 |") |.X. | stop(|
|00003810| 22 69 64 78 74 65 78 74 | 3a 20 20 22 2c 74 65 6d |"idxtext|: ",tem|
|00003820| 70 5f 6e 61 6d 65 2c 22 | 20 6e 6f 74 20 66 6f 75 |p_name,"| not fou|
|00003830| 6e 64 22 29 0a 58 0a 58 | 09 23 20 57 72 69 74 65 |nd").X.X|.# Write|
|00003840| 20 69 6e 64 65 78 20 74 | 6f 20 69 6e 64 65 78 2e | index t|o index.|
|00003850| 49 44 58 20 66 69 6c 65 | 2e 0a 58 09 77 72 69 74 |IDX file|..X.writ|
|00003860| 65 5f 69 6e 64 65 78 28 | 69 6e 66 69 6c 65 2c 20 |e_index(|infile, |
|00003870| 6f 75 74 66 69 6c 65 29 | 0a 58 0a 58 09 65 76 65 |outfile)|.X.X.eve|
|00003880| 72 79 20 63 6c 6f 73 65 | 28 69 6e 66 69 6c 65 20 |ry close|(infile |
|00003890| 7c 20 6f 75 74 66 69 6c | 65 29 0a 58 0a 58 20 20 || outfil|e).X.X |
|000038a0| 20 20 7d 0a 58 0a 58 65 | 6e 64 0a 58 0a 58 0a 58 | }.X.Xe|nd.X.X.X|
|000038b0| 70 72 6f 63 65 64 75 72 | 65 20 77 72 69 74 65 5f |procedur|e write_|
|000038c0| 69 6e 64 65 78 28 69 6e | 2c 20 6f 75 74 29 0a 58 |index(in|, out).X|
|000038d0| 0a 58 20 20 20 20 6c 6f | 63 61 6c 20 6b 65 79 5f |.X lo|cal key_|
|000038e0| 6f 66 66 73 65 74 5f 74 | 61 62 6c 65 2c 20 77 2c |offset_t|able, w,|
|000038f0| 20 6c 69 6e 65 2c 20 4b | 45 59 0a 58 0a 58 20 20 | line, K|EY.X.X |
|00003900| 20 20 23 20 57 72 69 74 | 65 20 74 6f 20 6f 75 74 | # Writ|e to out|
|00003910| 20 61 6c 6c 20 6b 65 79 | 73 20 69 6e 20 66 69 6c | all key|s in fil|
|00003920| 65 20 22 69 6e 2c 22 20 | 77 69 74 68 20 74 68 65 |e "in," |with the|
|00003930| 69 72 20 62 79 74 65 0a | 58 20 20 20 20 23 20 6f |ir byte.|X # o|
|00003940| 66 66 73 65 74 73 2e 0a | 58 0a 58 20 20 20 20 6b |ffsets..|X.X k|
|00003950| 65 79 5f 6f 66 66 73 65 | 74 5f 74 61 62 6c 65 20 |ey_offse|t_table |
|00003960| 3a 3d 20 74 61 62 6c 65 | 28 29 0a 58 0a 58 20 20 |:= table|().X.X |
|00003970| 20 20 77 68 69 6c 65 20 | 28 77 20 3a 3d 20 77 68 | while |(w := wh|
|00003980| 65 72 65 28 69 6e 29 2c | 20 6c 69 6e 65 20 3a 3d |ere(in),| line :=|
|00003990| 20 72 65 61 64 28 69 6e | 29 29 20 64 6f 20 7b 0a | read(in|)) do {.|
|000039a0| 58 09 6c 69 6e 65 20 3f | 20 7b 0a 58 09 20 20 20 |X.line ?| {.X. |
|000039b0| 20 69 66 20 3d 22 3a 3a | 22 20 74 68 65 6e 20 7b | if ="::|" then {|
|000039c0| 0a 58 09 09 4b 45 59 20 | 3a 3d 20 74 72 69 6d 28 |.X..KEY |:= trim(|
|000039d0| 74 61 62 28 30 29 29 0a | 58 09 09 69 66 20 6e 6f |tab(0)).|X..if no|
|000039e0| 74 20 28 2f 6b 65 79 5f | 6f 66 66 73 65 74 5f 74 |t (/key_|offset_t|
|000039f0| 61 62 6c 65 5b 4b 45 59 | 5d 20 3a 3d 20 4b 45 59 |able[KEY|] := KEY|
|00003a00| 20 7c 7c 20 22 5c 74 22 | 20 7c 7c 20 77 29 0a 58 | || "\t"| || w).X|
|00003a10| 09 09 74 68 65 6e 20 73 | 74 6f 70 28 22 69 64 78 |..then s|top("idx|
|00003a20| 74 65 78 74 3a 20 20 64 | 75 70 6c 69 63 61 74 65 |text: d|uplicate|
|00003a30| 20 6b 65 79 2c 20 22 2c | 4b 45 59 29 0a 58 09 20 | key, ",|KEY).X. |
|00003a40| 20 20 20 7d 0a 58 09 7d | 0a 58 20 20 20 20 7d 0a | }.X.}|.X }.|
|00003a50| 58 0a 58 20 20 20 20 23 | 20 46 69 72 73 74 20 6c |X.X #| First l|
|00003a60| 69 6e 65 20 6f 66 20 69 | 6e 64 65 78 20 63 6f 6e |ine of i|ndex con|
|00003a70| 74 61 69 6e 73 20 74 68 | 65 20 6f 66 66 73 65 74 |tains th|e offset|
|00003a80| 20 6f 66 20 74 68 65 20 | 6c 61 73 74 0a 58 20 20 | of the |last.X |
|00003a90| 20 20 23 20 69 6e 64 65 | 78 65 64 20 62 79 74 65 | # inde|xed byte|
|00003aa0| 20 69 6e 20 77 72 69 74 | 65 5f 69 6e 64 65 78 2c | in writ|e_index,|
|00003ab0| 20 73 6f 20 74 68 61 74 | 20 77 65 20 63 61 6e 20 | so that| we can |
|00003ac0| 73 74 69 6c 6c 0a 58 20 | 20 20 20 23 20 73 65 61 |still.X | # sea|
|00003ad0| 72 63 68 20 75 6e 69 6e | 64 65 78 65 64 20 70 61 |rch unin|dexed pa|
|00003ae0| 72 74 73 20 6f 66 20 69 | 6e 2e 0a 58 20 20 20 20 |rts of i|n..X |
|00003af0| 77 72 69 74 65 28 6f 75 | 74 2c 20 77 68 65 72 65 |write(ou|t, where|
|00003b00| 28 69 6e 29 29 0a 58 0a | 58 20 20 20 20 23 20 57 |(in)).X.|X # W|
|00003b10| 72 69 74 65 20 73 6f 72 | 74 65 64 20 4b 45 59 5c |rite sor|ted KEY\|
|00003b20| 74 6f 66 66 73 65 74 20 | 6c 69 6e 65 73 2e 0a 58 |toffset |lines..X|
|00003b30| 20 20 20 20 69 66 20 2a | 6b 65 79 5f 6f 66 66 73 | if *|key_offs|
|00003b40| 65 74 5f 74 61 62 6c 65 | 20 3e 20 30 20 74 68 65 |et_table| > 0 the|
|00003b50| 6e 0a 58 09 65 76 65 72 | 79 20 77 72 69 74 65 28 |n.X.ever|y write(|
|00003b60| 6f 75 74 2c 20 28 21 73 | 6f 72 74 28 6b 65 79 5f |out, (!s|ort(key_|
|00003b70| 6f 66 66 73 65 74 5f 74 | 61 62 6c 65 29 29 5b 32 |offset_t|able))[2|
|00003b80| 5d 29 0a 58 0a 58 20 20 | 20 20 72 65 74 75 72 6e |]).X.X | return|
|00003b90| 0a 58 0a 58 65 6e 64 0a | 53 48 41 52 5f 45 4f 46 |.X.Xend.|SHAR_EOF|
|00003ba0| 0a 74 72 75 65 20 7c 7c | 20 65 63 68 6f 20 27 72 |.true ||| echo 'r|
|00003bb0| 65 73 74 6f 72 65 20 6f | 66 20 69 64 78 74 65 78 |estore o|f idxtex|
|00003bc0| 74 2e 69 63 6e 20 66 61 | 69 6c 65 64 27 0a 72 6d |t.icn fa|iled'.rm|
|00003bd0| 20 2d 66 20 5f 73 68 61 | 72 5f 77 6e 74 5f 2e 74 | -f _sha|r_wnt_.t|
|00003be0| 6d 70 0a 66 69 0a 23 20 | 3d 3d 3d 3d 3d 3d 3d 3d |mp.fi.# |========|
|00003bf0| 3d 3d 3d 3d 3d 20 6a 61 | 72 67 32 67 65 74 2e 69 |===== ja|rg2get.i|
|00003c00| 63 6e 20 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |cn =====|========|
|00003c10| 3d 0a 69 66 20 74 65 73 | 74 20 2d 66 20 27 6a 61 |=.if tes|t -f 'ja|
|00003c20| 72 67 32 67 65 74 2e 69 | 63 6e 27 20 2d 61 20 58 |rg2get.i|cn' -a X|
|00003c30| 22 24 31 22 20 21 3d 20 | 58 22 2d 63 22 3b 20 74 |"$1" != |X"-c"; t|
|00003c40| 68 65 6e 0a 09 65 63 68 | 6f 20 27 78 20 2d 20 73 |hen..ech|o 'x - s|
|00003c50| 6b 69 70 70 69 6e 67 20 | 6a 61 72 67 32 67 65 74 |kipping |jarg2get|
|00003c60| 2e 69 63 6e 20 28 46 69 | 6c 65 20 61 6c 72 65 61 |.icn (Fi|le alrea|
|00003c70| 64 79 20 65 78 69 73 74 | 73 29 27 0a 09 72 6d 20 |dy exist|s)'..rm |
|00003c80| 2d 66 20 5f 73 68 61 72 | 5f 77 6e 74 5f 2e 74 6d |-f _shar|_wnt_.tm|
|00003c90| 70 0a 65 6c 73 65 0a 3e | 20 5f 73 68 61 72 5f 77 |p.else.>| _shar_w|
|00003ca0| 6e 74 5f 2e 74 6d 70 0a | 65 63 68 6f 20 27 78 20 |nt_.tmp.|echo 'x |
|00003cb0| 2d 20 65 78 74 72 61 63 | 74 69 6e 67 20 6a 61 72 |- extrac|ting jar|
|00003cc0| 67 32 67 65 74 2e 69 63 | 6e 20 28 54 65 78 74 29 |g2get.ic|n (Text)|
|00003cd0| 27 0a 73 65 64 20 27 73 | 2f 5e 58 2f 2f 27 20 3c |'.sed 's|/^X//' <|
|00003ce0| 3c 20 27 53 48 41 52 5f | 45 4f 46 27 20 3e 20 27 |< 'SHAR_|EOF' > '|
|00003cf0| 6a 61 72 67 32 67 65 74 | 2e 69 63 6e 27 20 26 26 |jarg2get|.icn' &&|
|00003d00| 0a 58 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |.X######|########|
|00003d10| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00003d20| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00003d30| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00003d40| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 0a 58 |########|######.X|
|00003d50| 23 0a 58 23 09 4e 61 6d | 65 3a 09 20 31 2e 31 0a |#.X#.Nam|e:. 1.1.|
|00003d60| 58 23 0a 58 23 09 54 69 | 74 6c 65 3a 09 20 6a 61 |X#.X#.Ti|tle:. ja|
|00003d70| 72 67 6f 6e 20 74 6f 20 | 67 65 74 74 65 78 74 20 |rgon to |gettext |
|00003d80| 66 6f 72 6d 61 74 20 63 | 6f 6e 76 65 72 74 65 72 |format c|onverter|
|00003d90| 0a 58 23 0a 58 23 09 41 | 75 74 68 6f 72 3a 09 20 |.X#.X#.A|uthor:. |
|00003da0| 52 69 63 68 61 72 64 20 | 4c 2e 20 47 6f 65 72 77 |Richard |L. Goerw|
|00003db0| 69 74 7a 0a 58 23 0a 58 | 23 09 56 65 72 73 69 6f |itz.X#.X|#.Versio|
|00003dc0| 6e 3a 20 6a 61 72 67 32 | 67 65 74 2e 69 63 6e 0a |n: jarg2|get.icn.|
|00003dd0| 58 23 0a 58 23 23 23 23 | 23 23 23 23 23 23 23 23 |X#.X####|########|
|00003de0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00003df0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00003e00| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00003e10| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00003e20| 0a 58 23 20 20 0a 58 23 | 20 20 43 6f 6e 76 65 72 |.X# .X#| Conver|
|00003e30| 74 73 20 6a 61 72 67 6f | 6e 2e 61 73 63 69 69 20 |ts jargo|n.ascii |
|00003e40| 28 73 74 64 69 6e 29 20 | 74 6f 20 61 20 66 6f 72 |(stdin) |to a for|
|00003e50| 6d 61 74 20 73 75 69 74 | 61 62 6c 65 20 66 6f 72 |mat suit|able for|
|00003e60| 20 75 73 65 20 62 79 20 | 67 65 74 74 65 78 74 2e | use by |gettext.|
|00003e70| 0a 58 23 20 20 57 72 69 | 74 65 73 20 74 6f 20 73 |.X# Wri|tes to s|
|00003e80| 74 64 6f 75 74 2e 20 20 | 4a 61 72 67 6f 6e 2e 61 |tdout. |Jargon.a|
|00003e90| 73 63 69 69 20 77 61 73 | 20 70 6f 73 74 65 64 20 |scii was| posted |
|00003ea0| 72 65 63 65 6e 74 6c 79 | 20 28 63 2e 20 4d 61 72 |recently| (c. Mar|
|00003eb0| 63 68 20 31 2c 20 31 39 | 39 31 29 0a 58 23 20 20 |ch 1, 19|91).X# |
|00003ec0| 74 6f 20 61 6c 74 2e 73 | 6f 75 72 63 65 73 2e 0a |to alt.s|ources..|
|00003ed0| 58 23 0a 58 23 23 23 23 | 23 23 23 23 23 23 23 23 |X#.X####|########|
|00003ee0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00003ef0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00003f00| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00003f10| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00003f20| 0a 58 0a 58 70 72 6f 63 | 65 64 75 72 65 20 6d 61 |.X.Xproc|edure ma|
|00003f30| 69 6e 28 29 0a 58 0a 58 | 20 20 20 20 6c 6f 63 61 |in().X.X| loca|
|00003f40| 6c 20 6c 69 6e 65 2c 20 | 4b 45 59 2c 20 6b 65 79 |l line, |KEY, key|
|00003f50| 5f 73 65 74 2c 20 6e 6f | 2c 20 79 65 73 0a 58 0a |_set, no|, yes.X.|
|00003f60| 58 20 20 20 20 62 6c 61 | 6e 6b 5f 63 6f 75 6e 74 |X bla|nk_count|
|00003f70| 20 3a 3d 20 30 0a 58 20 | 20 20 20 6b 65 79 5f 73 | := 0.X | key_s|
|00003f80| 65 74 20 3a 3d 20 73 65 | 74 28 29 0a 58 20 20 20 |et := se|t().X |
|00003f90| 20 6e 6f 20 3a 3d 20 26 | 75 63 61 73 65 20 7c 7c | no := &|ucase |||
|00003fa0| 20 22 2d 2f 22 3b 20 79 | 65 73 20 3a 3d 20 26 6c | "-/"; y|es := &l|
|00003fb0| 63 61 73 65 20 7c 7c 20 | 22 20 20 22 0a 58 20 20 |case || |" ".X |
|00003fc0| 20 20 23 20 49 73 6e 27 | 74 20 67 6f 61 6c 2d 64 | # Isn'|t goal-d|
|00003fd0| 69 72 65 63 74 65 64 20 | 65 76 61 6c 75 61 74 69 |irected |evaluati|
|00003fe0| 6f 6e 20 6e 69 63 65 3f | 0a 58 20 20 20 20 28 6d |on nice?|.X (m|
|00003ff0| 61 74 63 68 28 22 3d 20 | 41 20 3d 22 2c 20 21 26 |atch("= |A =", !&|
|00004000| 69 6e 70 75 74 29 2c 20 | 22 22 20 3d 3d 20 21 26 |input), |"" == !&|
|00004010| 69 6e 70 75 74 29 0a 58 | 0a 58 20 20 20 20 23 20 |input).X|.X # |
|00004020| 52 65 61 64 20 73 74 64 | 69 6e 2c 20 6c 6f 6f 6b |Read std|in, look|
|00004030| 69 6e 67 20 66 6f 72 20 | 65 6e 74 72 69 65 73 2e |ing for |entries.|
|00004040| 20 20 45 6e 74 72 69 65 | 73 20 63 61 6e 20 62 65 | Entrie|s can be|
|00004050| 20 64 69 73 74 69 6e 67 | 75 69 73 68 65 64 0a 58 | disting|uished.X|
|00004060| 20 20 20 20 23 20 61 29 | 20 62 79 20 61 20 70 72 | # a)| by a pr|
|00004070| 65 63 65 64 69 6e 67 20 | 62 6c 61 6e 6b 20 6c 69 |eceding |blank li|
|00004080| 6e 65 2c 20 61 6e 64 20 | 62 29 20 62 79 20 74 68 |ne, and |b) by th|
|00004090| 65 20 70 72 65 73 65 6e | 63 65 20 6f 66 20 63 68 |e presen|ce of ch|
|000040a0| 61 72 61 63 2d 0a 58 20 | 20 20 20 23 20 74 65 72 |arac-.X | # ter|
|000040b0| 73 20 62 65 67 69 6e 6e | 69 6e 67 20 69 6d 6d 65 |s beginn|ing imme|
|000040c0| 64 69 61 74 65 6c 79 20 | 61 74 20 74 68 65 20 6d |diately |at the m|
|000040d0| 61 72 67 69 6e 2c 20 61 | 6e 64 20 63 29 20 62 79 |argin, a|nd c) by|
|000040e0| 20 74 68 65 20 70 72 65 | 73 65 6e 63 65 0a 58 20 | the pre|sence.X |
|000040f0| 20 20 20 23 20 6f 66 20 | 61 20 63 6f 6c 6f 6e 20 | # of |a colon |
|00004100| 70 6c 75 73 20 61 20 73 | 70 61 63 65 20 6f 6e 20 |plus a s|pace on |
|00004110| 74 68 65 20 6c 69 6e 65 | 2e 0a 58 20 20 20 20 77 |the line|..X w|
|00004120| 68 69 6c 65 20 6c 69 6e | 65 20 3a 3d 20 74 72 69 |hile lin|e := tri|
|00004130| 6d 28 72 65 61 64 28 29 | 2c 20 27 5c 74 20 5c 78 |m(read()|, '\t \x|
|00004140| 46 46 5c 72 27 29 20 64 | 6f 20 7b 0a 58 0a 58 09 |FF\r') d|o {.X.X.|
|00004150| 69 66 20 22 22 20 3d 3d | 20 6c 69 6e 65 20 74 68 |if "" ==| line th|
|00004160| 65 6e 20 7b 0a 58 09 20 | 20 20 20 69 66 20 28 62 |en {.X. | if (b|
|00004170| 6c 61 6e 6b 5f 63 6f 75 | 6e 74 20 2b 3a 3d 20 31 |lank_cou|nt +:= 1|
|00004180| 29 20 3e 20 32 20 7c 0a | 58 09 09 6d 61 74 63 68 |) > 2 |.|X..match|
|00004190| 28 22 48 61 63 6b 65 72 | 20 46 6f 6c 6b 6c 6f 72 |("Hacker| Folklor|
|000041a0| 65 22 2c 20 6c 69 6e 65 | 29 0a 58 09 20 20 20 20 |e", line|).X. |
|000041b0| 74 68 65 6e 20 65 78 69 | 74 28 30 29 0a 58 09 20 |then exi|t(0).X. |
|000041c0| 20 20 20 6d 61 79 62 65 | 20 3a 3d 20 31 3b 20 77 | maybe| := 1; w|
|000041d0| 72 69 74 65 28 29 0a 58 | 09 7d 0a 58 09 65 6c 73 |rite().X|.}.X.els|
|000041e0| 65 20 7b 0a 58 09 20 20 | 20 20 6c 69 6e 65 20 3f |e {.X. | line ?|
|000041f0| 20 7b 0a 58 09 09 69 66 | 20 5c 6d 61 79 62 65 20 | {.X..if| \maybe |
|00004200| 26 0a 58 09 09 20 20 20 | 4b 45 59 20 3a 3d 0a 58 |&.X.. |KEY :=.X|
|00004210| 09 09 20 20 20 20 20 20 | 20 74 72 69 6d 28 6d 61 |.. | trim(ma|
|00004220| 70 28 74 61 62 28 61 6e | 79 28 26 6c 65 74 74 65 |p(tab(an|y(&lette|
|00004230| 72 73 29 29 20 7c 7c 20 | 74 61 62 28 66 69 6e 64 |rs)) || |tab(find|
|00004240| 28 22 3a 20 22 29 29 2c | 6e 6f 2c 79 65 73 29 29 |(": ")),|no,yes))|
|00004250| 0a 58 09 09 74 68 65 6e | 20 7b 0a 58 09 09 20 20 |.X..then| {.X.. |
|00004260| 20 20 69 66 20 6e 6f 74 | 20 6d 65 6d 62 65 72 28 | if not| member(|
|00004270| 6b 65 79 5f 73 65 74 2c | 20 4b 45 59 29 0a 58 09 |key_set,| KEY).X.|
|00004280| 09 20 20 20 20 74 68 65 | 6e 20 77 72 69 74 65 28 |. the|n write(|
|00004290| 22 3a 3a 22 2c 20 4b 45 | 59 29 0a 58 09 09 20 20 |"::", KE|Y).X.. |
|000042a0| 20 20 69 6e 73 65 72 74 | 28 6b 65 79 5f 73 65 74 | insert|(key_set|
|000042b0| 2c 20 4b 45 59 29 0a 58 | 09 09 7d 0a 58 09 09 77 |, KEY).X|..}.X..w|
|000042c0| 72 69 74 65 28 6c 69 6e | 65 29 0a 58 09 20 20 20 |rite(lin|e).X. |
|000042d0| 20 7d 0a 58 09 20 20 20 | 20 6d 61 79 62 65 20 3a | }.X. | maybe :|
|000042e0| 3d 20 26 6e 75 6c 6c 0a | 58 09 20 20 20 20 62 6c |= &null.|X. bl|
|000042f0| 61 6e 6b 5f 63 6f 75 6e | 74 20 3a 3d 20 30 0a 58 |ank_coun|t := 0.X|
|00004300| 09 7d 0a 58 20 20 20 20 | 7d 0a 58 0a 58 20 20 20 |.}.X |}.X.X |
|00004310| 20 73 74 6f 70 28 22 6a | 61 72 67 32 67 65 74 3a | stop("j|arg2get:|
|00004320| 20 20 61 62 6f 72 74 69 | 6e 67 20 28 61 72 65 20 | aborti|ng (are |
|00004330| 79 6f 75 20 73 75 72 65 | 20 79 6f 75 20 68 61 76 |you sure| you hav|
|00004340| 65 20 74 68 65 20 63 6f | 72 72 65 63 74 20 66 69 |e the co|rrect fi|
|00004350| 6c 65 3f 29 22 29 0a 58 | 0a 58 65 6e 64 0a 53 48 |le?)").X|.Xend.SH|
|00004360| 41 52 5f 45 4f 46 0a 74 | 72 75 65 20 7c 7c 20 65 |AR_EOF.t|rue || e|
|00004370| 63 68 6f 20 27 72 65 73 | 74 6f 72 65 20 6f 66 20 |cho 'res|tore of |
|00004380| 6a 61 72 67 32 67 65 74 | 2e 69 63 6e 20 66 61 69 |jarg2get|.icn fai|
|00004390| 6c 65 64 27 0a 72 6d 20 | 2d 66 20 5f 73 68 61 72 |led'.rm |-f _shar|
|000043a0| 5f 77 6e 74 5f 2e 74 6d | 70 0a 66 69 0a 23 20 3d |_wnt_.tm|p.fi.# =|
|000043b0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 20 52 45 41 |========|==== REA|
|000043c0| 44 4d 45 20 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |DME ====|========|
|000043d0| 3d 3d 0a 69 66 20 74 65 | 73 74 20 2d 66 20 27 52 |==.if te|st -f 'R|
|000043e0| 45 41 44 4d 45 27 20 2d | 61 20 58 22 24 31 22 20 |EADME' -|a X"$1" |
|000043f0| 21 3d 20 58 22 2d 63 22 | 3b 20 74 68 65 6e 0a 09 |!= X"-c"|; then..|
|00004400| 65 63 68 6f 20 27 78 20 | 2d 20 73 6b 69 70 70 69 |echo 'x |- skippi|
|00004410| 6e 67 20 52 45 41 44 4d | 45 20 28 46 69 6c 65 20 |ng READM|E (File |
|00004420| 61 6c 72 65 61 64 79 20 | 65 78 69 73 74 73 29 27 |already |exists)'|
|00004430| 0a 09 72 6d 20 2d 66 20 | 5f 73 68 61 72 5f 77 6e |..rm -f |_shar_wn|
|00004440| 74 5f 2e 74 6d 70 0a 65 | 6c 73 65 0a 3e 20 5f 73 |t_.tmp.e|lse.> _s|
|00004450| 68 61 72 5f 77 6e 74 5f | 2e 74 6d 70 0a 65 63 68 |har_wnt_|.tmp.ech|
|00004460| 6f 20 27 78 20 2d 20 65 | 78 74 72 61 63 74 69 6e |o 'x - e|xtractin|
|00004470| 67 20 52 45 41 44 4d 45 | 20 28 54 65 78 74 29 27 |g README| (Text)'|
|00004480| 0a 73 65 64 20 27 73 2f | 5e 58 2f 2f 27 20 3c 3c |.sed 's/|^X//' <<|
|00004490| 20 27 53 48 41 52 5f 45 | 4f 46 27 20 3e 20 27 52 | 'SHAR_E|OF' > 'R|
|000044a0| 45 41 44 4d 45 27 20 26 | 26 0a 58 2d 2d 2d 2d 2d |EADME' &|&.X-----|
|000044b0| 2d 2d 0a 58 0a 58 50 72 | 6f 67 72 61 6d 20 6e 61 |--.X.XPr|ogram na|
|000044c0| 6d 65 3a 20 20 6a 61 72 | 67 6f 6e 0a 58 53 6f 75 |me: jar|gon.XSou|
|000044d0| 72 63 65 20 6c 61 6e 67 | 75 61 67 65 3a 20 20 69 |rce lang|uage: i|
|000044e0| 63 6f 6e 0a 58 50 75 72 | 70 6f 73 65 3a 20 20 71 |con.XPur|pose: q|
|000044f0| 75 69 63 6b 6c 79 20 66 | 69 6e 64 20 65 6e 74 72 |uickly f|ind entr|
|00004500| 69 65 73 20 69 6e 20 74 | 68 65 20 68 61 63 6b 65 |ies in t|he hacke|
|00004510| 72 27 73 20 6a 61 72 67 | 6f 6e 20 66 69 6c 65 0a |r's jarg|on file.|
|00004520| 58 0a 58 2d 2d 2d 2d 2d | 2d 2d 0a 58 0a 58 44 65 |X.X-----|--.X.XDe|
|00004530| 73 63 72 69 70 74 69 6f | 6e 3a 0a 58 0a 58 54 68 |scriptio|n:.X.XTh|
|00004540| 69 73 20 73 68 65 6c 6c | 20 61 72 63 68 69 76 65 |is shell| archive|
|00004550| 20 63 6f 6e 74 61 69 6e | 73 20 61 20 6a 61 72 67 | contain|s a jarg|
|00004560| 6f 6e 20 64 61 74 61 62 | 61 73 65 20 70 72 6f 67 |on datab|ase prog|
|00004570| 72 61 6d 2c 20 61 70 74 | 6c 79 20 65 6e 6f 75 67 |ram, apt|ly enoug|
|00004580| 68 0a 58 6e 61 6d 65 64 | 20 22 6a 61 72 67 6f 6e |h.Xnamed| "jargon|
|00004590| 2e 22 20 20 49 66 20 79 | 6f 75 20 68 61 76 65 20 |." If y|ou have |
|000045a0| 74 68 65 20 72 65 63 65 | 6e 74 6c 79 20 70 6f 73 |the rece|ntly pos|
|000045b0| 74 65 64 20 28 4d 61 72 | 63 68 20 31 2c 20 31 39 |ted (Mar|ch 1, 19|
|000045c0| 39 31 2c 20 61 6c 74 2e | 0a 58 73 6f 75 72 63 65 |91, alt.|.Xsource|
|000045d0| 73 29 20 68 61 63 6b 65 | 72 27 73 20 6a 61 72 67 |s) hacke|r's jarg|
|000045e0| 6f 6e 20 66 69 6c 65 20 | 61 72 6f 75 6e 64 2c 20 |on file |around, |
|000045f0| 79 6f 75 20 63 61 6e 20 | 75 73 65 20 74 68 69 73 |you can |use this|
|00004600| 20 70 61 63 6b 61 67 65 | 20 66 6f 72 0a 58 71 75 | package| for.Xqu|
|00004610| 69 63 6b 20 61 63 63 65 | 73 73 20 74 6f 20 65 6e |ick acce|ss to en|
|00004620| 74 72 69 65 73 20 77 69 | 74 68 69 6e 20 74 68 61 |tries wi|thin tha|
|00004630| 74 20 66 69 6c 65 2c 20 | 61 73 20 69 6e 20 22 6a |t file, |as in "j|
|00004640| 61 72 67 6f 6e 20 77 6f | 72 64 22 20 28 77 68 65 |argon wo|rd" (whe|
|00004650| 72 65 0a 58 22 77 6f 72 | 64 22 20 69 73 20 74 68 |re.X"wor|d" is th|
|00004660| 65 20 62 69 74 20 6f 66 | 20 68 61 63 6b 65 72 27 |e bit of| hacker'|
|00004670| 73 20 6a 61 72 67 6f 6e | 20 79 6f 75 20 77 61 6e |s jargon| you wan|
|00004680| 74 20 61 20 64 65 66 69 | 6e 69 74 69 6f 6e 20 66 |t a defi|nition f|
|00004690| 6f 72 29 2e 0a 58 0a 58 | 2d 2d 2d 2d 2d 2d 2d 0a |or)..X.X|-------.|
|000046a0| 58 0a 58 49 6e 73 74 61 | 6c 6c 61 74 69 6f 6e 3a |X.XInsta|llation:|
|000046b0| 0a 58 0a 58 43 70 20 4d | 61 6b 65 66 69 6c 65 2e |.X.XCp M|akefile.|
|000046c0| 64 69 73 74 20 74 6f 20 | 4d 61 6b 65 66 69 6c 65 |dist to |Makefile|
|000046d0| 20 61 6e 64 20 65 64 69 | 74 20 69 74 20 74 6f 20 | and edi|t it to |
|000046e0| 72 65 66 6c 65 63 74 20 | 6c 6f 63 61 6c 20 6e 61 |reflect |local na|
|000046f0| 6d 69 6e 67 20 63 6f 6e | 2d 0a 58 76 65 6e 74 69 |ming con|-.Xventi|
|00004700| 6f 6e 73 2e 20 20 41 66 | 74 65 72 20 65 64 69 74 |ons. Af|ter edit|
|00004710| 69 6e 67 2c 20 74 79 70 | 65 20 22 6d 61 6b 65 20 |ing, typ|e "make |
|00004720| 61 6c 6c 2e 22 20 20 49 | 66 2c 20 61 66 74 65 72 |all." I|f, after|
|00004730| 20 73 65 65 69 6e 67 20 | 61 20 6c 6f 74 20 6f 66 | seeing |a lot of|
|00004740| 0a 58 67 61 72 62 61 67 | 65 20 67 6f 20 62 79 2c |.Xgarbag|e go by,|
|00004750| 20 79 6f 75 20 67 65 74 | 20 74 68 65 20 6d 65 73 | you get| the mes|
|00004760| 73 61 67 65 20 22 65 76 | 65 72 79 74 68 69 6e 67 |sage "ev|erything|
|00004770| 20 73 65 65 6d 73 20 4f | 4b 2c 22 20 74 68 65 6e | seems O|K," then|
|00004780| 20 73 75 20 72 6f 6f 74 | 0a 58 61 6e 64 20 6d 61 | su root|.Xand ma|
|00004790| 6b 65 20 69 6e 73 74 61 | 6c 6c 2e 20 20 42 65 20 |ke insta|ll. Be |
|000047a0| 73 75 72 65 20 74 6f 20 | 73 65 74 20 64 65 66 61 |sure to |set defa|
|000047b0| 75 6c 74 20 6f 77 6e 65 | 72 73 68 69 70 20 61 6e |ult owne|rship an|
|000047c0| 64 20 70 65 72 6d 69 73 | 73 69 6f 6e 73 20 69 6e |d permis|sions in|
|000047d0| 0a 58 74 68 65 20 6d 61 | 6b 65 66 69 6c 65 20 74 |.Xthe ma|kefile t|
|000047e0| 6f 20 73 6f 6d 65 20 76 | 61 6c 75 65 20 74 68 61 |o some v|alue tha|
|000047f0| 74 20 6d 61 6b 65 73 20 | 73 65 6e 73 65 20 66 6f |t makes |sense fo|
|00004800| 72 20 79 6f 75 72 20 73 | 79 73 74 65 6d 2e 20 20 |r your s|ystem. |
|00004810| 49 66 20 79 6f 75 0a 58 | 64 6f 6e 27 74 20 68 61 |If you.X|don't ha|
|00004820| 76 65 20 72 6f 6f 74 20 | 70 72 69 76 69 6c 65 64 |ve root |priviled|
|00004830| 67 65 73 2c 20 79 6f 75 | 20 6d 75 73 74 20 63 68 |ges, you| must ch|
|00004840| 61 6e 67 65 20 74 68 65 | 20 44 45 53 54 44 49 52 |ange the| DESTDIR|
|00004850| 20 61 6e 64 20 4c 49 42 | 44 49 52 0a 58 76 61 72 | and LIB|DIR.Xvar|
|00004860| 69 61 62 6c 65 73 20 69 | 6e 20 74 68 65 20 6d 61 |iables i|n the ma|
|00004870| 6b 65 66 69 6c 65 20 73 | 6f 20 74 68 61 74 20 74 |kefile s|o that t|
|00004880| 68 65 79 20 72 65 66 6c | 65 63 74 20 64 69 72 65 |hey refl|ect dire|
|00004890| 63 74 6f 72 69 65 73 20 | 79 6f 75 20 68 61 76 65 |ctories |you have|
|000048a0| 0a 58 61 63 63 65 73 73 | 20 74 6f 2e 20 20 4e 6f |.Xaccess| to. No|
|000048b0| 74 65 20 74 68 61 74 20 | 49 20 61 6d 20 61 73 73 |te that |I am ass|
|000048c0| 75 6d 69 6e 67 20 61 20 | 55 6e 69 78 20 69 6e 73 |uming a |Unix ins|
|000048d0| 74 61 6c 6c 61 74 69 6f | 6e 20 69 6e 20 74 68 65 |tallatio|n in the|
|000048e0| 0a 58 6d 61 6b 65 66 69 | 6c 65 2e 20 20 49 66 20 |.Xmakefi|le. If |
|000048f0| 79 6f 75 20 61 72 65 20 | 75 73 69 6e 67 20 73 6f |you are |using so|
|00004900| 6d 65 20 6f 74 68 65 72 | 20 70 6c 61 74 66 6f 72 |me other| platfor|
|00004910| 6d 2c 20 79 6f 75 27 6c | 6c 20 6e 65 65 64 20 74 |m, you'l|l need t|
|00004920| 6f 20 65 64 69 74 0a 58 | 74 68 65 20 66 69 6c 65 |o edit.X|the file|
|00004930| 20 22 6a 61 72 67 6f 6e | 2e 73 72 63 22 20 73 6f | "jargon|.src" so|
|00004940| 20 74 68 61 74 20 74 68 | 65 20 76 61 72 69 61 62 | that th|e variab|
|00004950| 6c 65 20 22 64 61 74 61 | 62 61 73 65 22 20 69 73 |le "data|base" is|
|00004960| 20 73 65 74 20 74 6f 20 | 74 68 65 0a 58 66 75 6c | set to |the.Xful|
|00004970| 6c 20 70 61 74 68 20 6f | 66 20 74 68 65 20 6a 61 |l path o|f the ja|
|00004980| 72 67 6f 6e 2e 77 72 64 | 20 66 69 6c 65 20 28 69 |rgon.wrd| file (i|
|00004990| 2e 65 2e 20 24 28 4c 49 | 42 44 49 52 29 2f 6a 61 |.e. $(LI|BDIR)/ja|
|000049a0| 72 67 6f 6e 2e 77 72 64 | 20 69 6e 20 74 68 65 0a |rgon.wrd| in the.|
|000049b0| 58 6d 61 6b 65 66 69 6c | 65 29 2e 20 20 54 68 65 |Xmakefil|e). The|
|000049c0| 6e 20 74 79 70 65 3a 0a | 58 0a 58 09 69 63 6f 6e |n type:.|X.X.icon|
|000049d0| 74 20 6a 61 72 67 32 67 | 65 74 2e 69 63 6e 0a 58 |t jarg2g|et.icn.X|
|000049e0| 09 69 63 6f 6e 74 20 2d | 6f 20 69 64 78 74 65 78 |.icont -|o idxtex|
|000049f0| 74 20 69 64 78 74 65 78 | 74 2e 69 63 6e 20 61 64 |t idxtex|t.icn ad|
|00004a00| 6a 75 6e 63 74 73 2e 69 | 63 6e 0a 58 09 63 6f 70 |juncts.i|cn.X.cop|
|00004a10| 79 20 6a 61 72 67 6f 6e | 2e 73 72 63 20 6a 61 72 |y jargon|.src jar|
|00004a20| 67 6f 6e 2e 69 63 6e 0a | 58 09 69 63 6f 6e 74 20 |gon.icn.|X.icont |
|00004a30| 2d 6f 20 6a 61 72 67 6f | 6e 20 6a 61 72 67 6f 6e |-o jargo|n jargon|
|00004a40| 2e 69 63 6e 20 67 65 74 | 74 65 78 74 2e 69 63 6e |.icn get|text.icn|
|00004a50| 20 61 64 6a 75 6e 63 74 | 73 2e 69 63 6e 0a 58 09 | adjunct|s.icn.X.|
|00004a60| 74 68 65 73 32 67 65 74 | 20 3c 20 4a 41 52 47 4f |thes2get| < JARGO|
|00004a70| 4e 46 49 4c 45 20 3e 20 | 6a 61 72 67 6f 6e 2e 77 |NFILE > |jargon.w|
|00004a80| 72 64 0a 58 09 69 64 78 | 74 65 78 74 20 6a 61 72 |rd.X.idx|text jar|
|00004a90| 67 6f 6e 2e 77 72 64 0a | 58 0a 58 77 68 65 72 65 |gon.wrd.|X.Xwhere|
|00004aa0| 20 22 63 6f 70 79 22 20 | 69 73 20 79 6f 75 72 20 | "copy" |is your |
|00004ab0| 73 79 73 74 65 6d 27 73 | 20 66 69 6c 65 20 63 6f |system's| file co|
|00004ac0| 70 79 20 6f 72 20 72 65 | 6e 61 6d 65 20 63 6f 6d |py or re|name com|
|00004ad0| 6d 61 6e 64 2c 20 61 6e | 64 0a 58 4a 41 52 47 4f |mand, an|d.XJARGO|
|00004ae0| 4e 46 49 4c 45 20 69 73 | 20 74 68 65 20 6e 61 6d |NFILE is| the nam|
|00004af0| 65 20 6f 66 20 74 68 65 | 20 6f 72 69 67 69 6e 61 |e of the| origina|
|00004b00| 6c 20 6a 61 72 67 6f 6e | 2e 61 73 63 69 69 20 66 |l jargon|.ascii f|
|00004b10| 69 6c 65 2e 20 20 54 6f | 20 74 65 73 74 20 61 0a |ile. To| test a.|
|00004b20| 58 6e 6f 6e 2d 55 4e 49 | 58 20 69 6e 73 74 61 6c |Xnon-UNI|X instal|
|00004b30| 6c 61 74 69 6f 6e 2c 20 | 74 79 70 65 0a 58 0a 58 |lation, |type.X.X|
|00004b40| 09 28 66 69 63 6f 6e 78 | 29 20 6a 61 72 67 6f 6e |.(ficonx|) jargon|
|00004b50| 20 7a 6f 72 6b 0a 58 0a | 58 54 68 65 20 66 69 63 | zork.X.|XThe fic|
|00004b60| 6f 6e 78 20 70 61 72 74 | 20 6d 61 79 20 6e 6f 74 |onx part| may not|
|00004b70| 20 62 65 20 6e 65 63 65 | 73 73 61 72 79 2e 20 20 | be nece|ssary. |
|00004b80| 49 66 20 79 6f 75 20 67 | 65 74 20 61 20 64 65 66 |If you g|et a def|
|00004b90| 69 6e 69 74 69 6f 6e 20 | 66 6f 72 0a 58 22 7a 6f |inition |for.X"zo|
|00004ba0| 72 6b 2c 22 20 74 68 65 | 6e 20 65 76 65 72 79 74 |rk," the|n everyt|
|00004bb0| 68 69 6e 67 20 69 73 20 | 70 72 6f 62 61 62 6c 79 |hing is |probably|
|00004bc0| 20 4f 4b 2e 20 20 49 66 | 20 79 6f 75 20 61 6c 74 | OK. If| you alt|
|00004bd0| 65 72 65 64 20 6a 61 72 | 67 6f 6e 2e 73 72 63 20 |ered jar|gon.src |
|00004be0| 73 6f 0a 58 74 68 61 74 | 20 74 68 65 20 64 61 74 |so.Xthat| the dat|
|00004bf0| 61 62 61 73 65 20 76 61 | 72 69 61 62 6c 65 20 70 |abase va|riable p|
|00004c00| 6f 69 6e 74 73 20 74 6f | 20 61 20 6a 61 72 67 6f |oints to| a jargo|
|00004c10| 6e 2e 77 72 64 20 66 69 | 6c 65 20 69 6e 20 74 68 |n.wrd fi|le in th|
|00004c20| 65 20 63 75 72 72 65 6e | 74 0a 58 64 69 72 65 63 |e curren|t.Xdirec|
|00004c30| 74 6f 72 79 2c 20 74 68 | 65 6e 20 74 68 65 72 65 |tory, th|en there|
|00004c40| 20 69 73 20 6e 6f 20 6e | 65 65 64 20 74 6f 20 64 | is no n|eed to d|
|00004c50| 6f 20 61 6e 79 74 68 69 | 6e 67 20 6d 6f 72 65 2e |o anythi|ng more.|
|00004c60| 20 20 49 66 20 79 6f 75 | 20 6e 61 6d 65 64 20 61 | If you| named a|
|00004c70| 0a 58 64 61 74 61 62 61 | 73 65 20 66 69 6c 65 20 |.Xdataba|se file |
|00004c80| 69 6e 20 61 20 64 69 66 | 66 65 72 65 6e 74 20 64 |in a dif|ferent d|
|00004c90| 69 72 65 63 74 6f 72 79 | 20 74 68 61 6e 20 74 68 |irectory| than th|
|00004ca0| 65 20 63 75 72 72 65 6e | 74 20 6f 6e 65 2c 20 74 |e curren|t one, t|
|00004cb0| 68 65 6e 20 79 6f 75 0a | 58 73 68 6f 75 6c 64 20 |hen you.|Xshould |
|00004cc0| 63 6f 70 79 20 74 68 65 | 20 6a 61 72 67 6f 6e 2e |copy the| jargon.|
|00004cd0| 77 72 64 20 66 69 6c 65 | 20 74 6f 20 74 68 61 74 |wrd file| to that|
|00004ce0| 20 64 69 72 65 63 74 6f | 72 79 2c 20 61 6e 64 20 | directo|ry, and |
|00004cf0| 74 68 65 6e 20 74 79 70 | 65 0a 58 0a 58 09 28 66 |then typ|e.X.X.(f|
|00004d00| 69 63 6f 6e 78 29 20 69 | 64 78 74 65 78 74 20 44 |iconx) i|dxtext D|
|00004d10| 41 54 41 42 41 53 45 0a | 58 0a 58 77 68 65 72 65 |ATABASE.|X.Xwhere|
|00004d20| 20 44 41 54 41 42 41 53 | 45 20 67 69 76 65 73 20 | DATABAS|E gives |
|00004d30| 74 68 65 20 66 75 6c 6c | 20 70 61 74 68 20 6f 66 |the full| path of|
|00004d40| 20 79 6f 75 72 20 6a 61 | 72 67 6f 6e 2e 77 72 64 | your ja|rgon.wrd|
|00004d50| 20 66 69 6c 65 2e 20 20 | 52 75 6e 6e 69 6e 67 0a | file. |Running.|
|00004d60| 58 74 68 69 73 20 63 6f | 6d 6d 61 6e 64 20 6d 61 |Xthis co|mmand ma|
|00004d70| 79 20 74 61 6b 65 20 61 | 20 6d 69 6e 75 74 65 2c |y take a| minute,|
|00004d80| 20 73 6f 20 62 65 20 70 | 61 74 69 65 6e 74 2e 0a | so be p|atient..|
|00004d90| 58 0a 58 4e 6f 74 65 20 | 74 68 61 74 20 49 20 68 |X.XNote |that I h|
|00004da0| 61 76 65 20 6e 6f 74 20 | 74 72 69 65 64 20 69 6e |ave not |tried in|
|00004db0| 73 74 61 6c 6c 69 6e 67 | 20 6a 61 72 67 6f 6e 20 |stalling| jargon |
|00004dc0| 6f 6e 20 61 6e 79 74 68 | 69 6e 67 20 62 75 74 20 |on anyth|ing but |
|00004dd0| 61 20 55 6e 69 78 0a 58 | 73 79 73 74 65 6d 2c 20 |a Unix.X|system, |
|00004de0| 73 6f 20 49 20 68 61 76 | 65 20 6e 6f 20 69 64 65 |so I hav|e no ide|
|00004df0| 61 20 68 6f 77 20 69 74 | 20 77 69 6c 6c 20 77 6f |a how it| will wo|
|00004e00| 72 6b 2e 20 20 49 6e 20 | 70 61 72 74 69 63 75 6c |rk. In |particul|
|00004e10| 61 72 2c 20 74 68 65 72 | 65 0a 58 6d 69 67 68 74 |ar, ther|e.Xmight|
|00004e20| 20 62 65 20 64 69 66 66 | 69 63 75 6c 74 69 65 73 | be diff|iculties|
|00004e30| 20 6f 6e 20 73 79 73 74 | 65 6d 73 20 66 6f 72 20 | on syst|ems for |
|00004e40| 77 68 69 63 68 20 6e 65 | 77 6c 69 6e 65 20 74 72 |which ne|wline tr|
|00004e50| 61 6e 73 6c 61 74 69 6f | 6e 20 69 73 0a 58 6e 65 |anslatio|n is.Xne|
|00004e60| 63 65 73 73 61 72 79 2e | 0a 58 0a 58 2d 2d 2d 2d |cessary.|.X.X----|
|00004e70| 2d 2d 2d 0a 58 0a 58 41 | 64 6d 69 73 73 69 6f 6e |---.X.XA|dmission|
|00004e80| 3a 0a 58 0a 58 4a 61 72 | 67 6f 6e 20 69 73 20 72 |:.X.XJar|gon is r|
|00004e90| 65 61 6c 6c 79 20 6a 75 | 73 74 20 61 20 63 68 65 |eally ju|st a che|
|00004ea0| 61 70 20 74 72 69 63 6b | 20 49 20 75 73 65 20 74 |ap trick| I use t|
|00004eb0| 6f 20 67 65 74 20 70 65 | 6f 70 6c 65 20 74 6f 20 |o get pe|ople to |
|00004ec0| 74 65 73 74 20 61 0a 58 | 73 6d 61 6c 6c 20 74 65 |test a.X|small te|
|00004ed0| 78 74 20 72 65 74 72 69 | 65 76 61 6c 20 70 61 63 |xt retri|eval pac|
|00004ee0| 6b 61 67 65 2e 20 20 54 | 68 69 73 20 70 61 63 6b |kage. T|his pack|
|00004ef0| 61 67 65 20 69 73 20 66 | 75 6c 6c 79 20 64 6f 63 |age is f|ully doc|
|00004f00| 75 6d 65 6e 74 65 64 20 | 69 6e 20 74 68 65 0a 58 |umented |in the.X|
|00004f10| 66 69 6c 65 73 0a 58 0a | 58 20 20 20 20 67 65 74 |files.X.|X get|
|00004f20| 74 65 78 74 2e 69 63 6e | 0a 58 20 20 20 20 61 64 |text.icn|.X ad|
|00004f30| 6a 75 6e 63 74 73 2e 69 | 63 6e 0a 58 20 20 20 20 |juncts.i|cn.X |
|00004f40| 69 64 78 74 65 78 74 2e | 69 63 6e 0a 58 0a 58 49 |idxtext.|icn.X.XI|
|00004f50| 63 6f 6e 20 70 72 6f 67 | 72 61 6d 6d 65 72 73 20 |con prog|rammers |
|00004f60| 77 69 6c 6c 20 66 69 6e | 64 20 67 65 74 74 65 78 |will fin|d gettex|
|00004f70| 74 20 61 20 6e 69 63 65 | 2c 20 65 61 73 79 20 77 |t a nice|, easy w|
|00004f80| 61 79 20 74 6f 20 61 63 | 63 65 73 73 0a 53 48 41 |ay to ac|cess.SHA|
|00004f90| 52 5f 45 4f 46 0a 74 72 | 75 65 20 7c 7c 20 65 63 |R_EOF.tr|ue || ec|
|00004fa0| 68 6f 20 27 72 65 73 74 | 6f 72 65 20 6f 66 20 52 |ho 'rest|ore of R|
|00004fb0| 45 41 44 4d 45 20 66 61 | 69 6c 65 64 27 0a 66 69 |EADME fa|iled'.fi|
|00004fc0| 0a 65 63 68 6f 20 27 45 | 6e 64 20 6f 66 20 20 70 |.echo 'E|nd of p|
|00004fd0| 61 72 74 20 31 27 0a 65 | 63 68 6f 20 27 46 69 6c |art 1'.e|cho 'Fil|
|00004fe0| 65 20 52 45 41 44 4d 45 | 20 69 73 20 63 6f 6e 74 |e README| is cont|
|00004ff0| 69 6e 75 65 64 20 69 6e | 20 70 61 72 74 20 32 27 |inued in| part 2'|
|00005000| 0a 65 63 68 6f 20 32 20 | 3e 20 5f 73 68 61 72 5f |.echo 2 |> _shar_|
|00005010| 73 65 71 5f 2e 74 6d 70 | 0a 65 78 69 74 20 30 0a |seq_.tmp|.exit 0.|
+--------+-------------------------+-------------------------+--------+--------+