home *** CD-ROM | disk | FTP | other *** search
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: 2296
Confidence | Program | Detection | Match Type | Support
|
---|
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 53 47 4d | 4c 20 3c 74 61 67 3e 20 |ect: SGM|L <tag> |
|00000060| 73 74 72 69 70 70 69 6e | 67 0a 4d 65 73 73 61 67 |strippin|g.Messag|
|00000070| 65 2d 49 44 3a 20 3c 31 | 39 39 30 44 65 63 31 33 |e-ID: <1|990Dec13|
|00000080| 2e 32 32 34 30 34 33 2e | 38 32 35 36 40 6d 69 64 |.224043.|8256@mid|
|00000090| 77 61 79 2e 75 63 68 69 | 63 61 67 6f 2e 65 64 75 |way.uchi|cago.edu|
|000000a0| 3e 0a 44 61 74 65 3a 20 | 31 33 20 44 65 63 20 39 |>.Date: |13 Dec 9|
|000000b0| 30 20 32 32 3a 34 30 3a | 34 33 20 47 4d 54 0a 0a |0 22:40:|43 GMT..|
|000000c0| 53 47 4d 4c 20 28 61 6e | 64 20 43 68 69 63 61 67 |SGML (an|d Chicag|
|000000d0| 6f 29 20 73 74 79 6c 65 | 20 3c 74 61 67 73 3e 20 |o) style| <tags> |
|000000e0| 61 72 65 20 61 6e 20 69 | 6e 63 72 65 61 73 69 6e |are an i|ncreasin|
|000000f0| 67 20 66 61 6d 69 6c 69 | 61 72 20 73 69 67 68 74 |g famili|ar sight|
|00000100| 2c 0a 61 6e 64 20 49 20 | 6f 66 74 65 6e 20 77 61 |,.and I |often wa|
|00000110| 6e 74 20 74 6f 20 6a 75 | 73 74 20 73 74 72 69 70 |nt to ju|st strip|
|00000120| 20 74 68 65 6d 20 6f 75 | 74 20 28 6f 72 20 65 6c | them ou|t (or el|
|00000130| 73 65 20 70 65 72 66 6f | 72 6d 20 73 69 6d 70 6c |se perfo|rm simpl|
|00000140| 65 0a 6d 61 6e 69 70 75 | 6c 61 74 69 6f 6e 73 20 |e.manipu|lations |
|00000150| 6f 6e 20 74 68 65 6d 29 | 2e 20 20 48 65 72 65 27 |on them)|. Here'|
|00000160| 73 20 61 20 73 69 6d 70 | 6c 65 20 70 72 6f 67 72 |s a simp|le progr|
|00000170| 61 6d 20 74 68 61 74 20 | 64 6f 65 73 20 74 68 69 |am that |does thi|
|00000180| 73 2e 0a 0a 53 6f 72 72 | 79 20 74 6f 20 74 68 65 |s...Sorr|y to the|
|00000190| 20 70 65 6f 70 6c 65 20 | 77 68 6f 20 74 72 79 20 | people |who try |
|000001a0| 74 6f 20 6d 61 6b 65 20 | 6d 65 20 62 65 6c 69 65 |to make |me belie|
|000001b0| 76 65 20 74 68 61 74 20 | 43 20 69 73 20 74 68 65 |ve that |C is the|
|000001c0| 20 72 69 67 68 74 0a 74 | 6f 6f 6c 20 66 6f 72 20 | right.t|ool for |
|000001d0| 65 76 65 72 79 74 68 69 | 6e 67 2e 20 20 54 68 69 |everythi|ng. Thi|
|000001e0| 73 20 69 73 20 61 20 74 | 65 78 74 2d 70 72 6f 63 |s is a t|ext-proc|
|000001f0| 65 73 73 69 6e 67 20 70 | 72 6f 62 6c 65 6d 2c 20 |essing p|roblem, |
|00000200| 61 6e 64 20 73 6f 20 49 | 0a 68 61 76 65 20 75 73 |and so I|.have us|
|00000210| 65 64 20 61 20 67 6f 6f | 64 20 74 65 78 74 2d 70 |ed a goo|d text-p|
|00000220| 72 6f 63 65 73 73 69 6e | 67 20 6c 61 6e 67 75 61 |rocessin|g langua|
|00000230| 67 65 2c 20 6e 61 6d 65 | 6c 79 20 49 63 6f 6e 2e |ge, name|ly Icon.|
|00000240| 0a 0a 49 27 64 20 62 65 | 20 63 75 72 69 6f 75 73 |..I'd be| curious|
|00000250| 20 74 6f 20 6b 6e 6f 77 | 20 68 6f 77 20 74 6f 20 | to know| how to |
|00000260| 64 6f 20 74 68 69 73 20 | 69 6e 20 70 65 72 6c 2e |do this |in perl.|
|00000270| 0a 0a 2d 52 69 63 68 61 | 72 64 20 28 67 6f 65 72 |..-Richa|rd (goer|
|00000280| 40 73 6f 70 68 69 73 74 | 2e 75 63 68 69 63 61 67 |@sophist|.uchicag|
|00000290| 6f 2e 65 64 75 29 0a 0a | 0a 2d 2d 2d 2d 20 43 75 |o.edu)..|.---- Cu|
|000002a0| 74 20 48 65 72 65 20 61 | 6e 64 20 66 65 65 64 20 |t Here a|nd feed |
|000002b0| 74 68 65 20 66 6f 6c 6c | 6f 77 69 6e 67 20 74 6f |the foll|owing to|
|000002c0| 20 73 68 20 2d 2d 2d 2d | 0a 23 21 2f 62 69 6e 2f | sh ----|.#!/bin/|
|000002d0| 73 68 0a 23 20 54 68 69 | 73 20 69 73 20 61 20 73 |sh.# Thi|s is a s|
|000002e0| 68 65 6c 6c 20 61 72 63 | 68 69 76 65 20 28 70 72 |hell arc|hive (pr|
|000002f0| 6f 64 75 63 65 64 20 62 | 79 20 73 68 61 72 20 33 |oduced b|y shar 3|
|00000300| 2e 34 39 29 0a 23 20 54 | 6f 20 65 78 74 72 61 63 |.49).# T|o extrac|
|00000310| 74 20 74 68 65 20 66 69 | 6c 65 73 20 66 72 6f 6d |t the fi|les from|
|00000320| 20 74 68 69 73 20 61 72 | 63 68 69 76 65 2c 20 73 | this ar|chive, s|
|00000330| 61 76 65 20 69 74 20 74 | 6f 20 61 20 66 69 6c 65 |ave it t|o a file|
|00000340| 2c 20 72 65 6d 6f 76 65 | 0a 23 20 65 76 65 72 79 |, remove|.# every|
|00000350| 74 68 69 6e 67 20 61 62 | 6f 76 65 20 74 68 65 20 |thing ab|ove the |
|00000360| 22 21 2f 62 69 6e 2f 73 | 68 22 20 6c 69 6e 65 20 |"!/bin/s|h" line |
|00000370| 61 62 6f 76 65 2c 20 61 | 6e 64 20 74 79 70 65 20 |above, a|nd type |
|00000380| 22 73 68 20 66 69 6c 65 | 5f 6e 61 6d 65 22 2e 0a |"sh file|_name"..|
|00000390| 23 0a 23 20 6d 61 64 65 | 20 31 32 2f 31 33 2f 31 |#.# made| 12/13/1|
|000003a0| 39 39 30 20 32 33 3a 30 | 38 20 55 54 43 20 62 79 |990 23:0|8 UTC by|
|000003b0| 20 67 6f 65 72 40 73 6f | 70 68 69 73 74 2e 75 63 | goer@so|phist.uc|
|000003c0| 68 69 63 61 67 6f 2e 65 | 64 75 0a 23 20 53 6f 75 |hicago.e|du.# Sou|
|000003d0| 72 63 65 20 64 69 72 65 | 63 74 6f 72 79 20 2f 75 |rce dire|ctory /u|
|000003e0| 2f 72 69 63 68 61 72 64 | 2f 53 74 72 69 70 73 67 |/richard|/Stripsg|
|000003f0| 6d 6c 0a 23 0a 23 20 65 | 78 69 73 74 69 6e 67 20 |ml.#.# e|xisting |
|00000400| 66 69 6c 65 73 20 77 69 | 6c 6c 20 4e 4f 54 20 62 |files wi|ll NOT b|
|00000410| 65 20 6f 76 65 72 77 72 | 69 74 74 65 6e 20 75 6e |e overwr|itten un|
|00000420| 6c 65 73 73 20 2d 63 20 | 69 73 20 73 70 65 63 69 |less -c |is speci|
|00000430| 66 69 65 64 0a 23 20 54 | 68 69 73 20 66 6f 72 6d |fied.# T|his form|
|00000440| 61 74 20 72 65 71 75 69 | 72 65 73 20 76 65 72 79 |at requi|res very|
|00000450| 20 6c 69 74 74 6c 65 20 | 69 6e 74 65 6c 6c 69 67 | little |intellig|
|00000460| 65 6e 63 65 20 61 74 20 | 75 6e 73 68 61 72 20 74 |ence at |unshar t|
|00000470| 69 6d 65 2e 0a 23 20 22 | 69 66 20 74 65 73 74 22 |ime..# "|if test"|
|00000480| 2c 20 22 63 61 74 22 2c | 20 22 72 6d 22 2c 20 22 |, "cat",| "rm", "|
|00000490| 65 63 68 6f 22 2c 20 22 | 74 72 75 65 22 2c 20 61 |echo", "|true", a|
|000004a0| 6e 64 20 22 73 65 64 22 | 20 6d 61 79 20 62 65 20 |nd "sed"| may be |
|000004b0| 6e 65 65 64 65 64 2e 0a | 23 0a 23 20 20 20 20 20 |needed..|#.# |
|000004c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|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 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000500| 20 20 20 20 20 0a 23 20 | 20 20 20 20 20 20 20 20 | .# | |
|00000510| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000520| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000530| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000540| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000550| 20 0a 23 0a 23 20 54 68 | 69 73 20 73 68 61 72 20 | .#.# Th|is shar |
|00000560| 63 6f 6e 74 61 69 6e 73 | 3a 0a 23 20 6c 65 6e 67 |contains|:.# leng|
|00000570| 74 68 20 20 6d 6f 64 65 | 20 20 20 20 20 20 20 6e |th mode| n|
|00000580| 61 6d 65 0a 23 20 2d 2d | 2d 2d 2d 2d 20 2d 2d 2d |ame.# --|---- ---|
|00000590| 2d 2d 2d 2d 2d 2d 2d 20 | 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| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000005c0| 2d 2d 0a 23 20 20 20 32 | 36 39 37 20 2d 72 2d 2d |--.# 2|697 -r--|
|000005d0| 72 2d 2d 72 2d 2d 20 73 | 74 72 69 70 73 67 6d 6c |r--r-- s|tripsgml|
|000005e0| 2e 69 63 6e 0a 23 20 20 | 20 33 32 38 39 20 2d 72 |.icn.# | 3289 -r|
|000005f0| 2d 2d 72 2d 2d 72 2d 2d | 20 73 74 72 69 70 75 6e |--r--r--| stripun|
|00000600| 62 2e 69 63 6e 0a 23 20 | 20 20 31 39 31 35 20 2d |b.icn.# | 1915 -|
|00000610| 72 2d 2d 72 2d 2d 72 2d | 2d 20 72 65 61 64 74 62 |r--r--r-|- readtb|
|00000620| 6c 2e 69 63 6e 0a 23 20 | 20 20 32 32 37 34 20 2d |l.icn.# | 2274 -|
|00000630| 72 2d 2d 72 2d 2d 72 2d | 2d 20 73 6c 61 73 68 62 |r--r--r-|- slashb|
|00000640| 61 6c 2e 69 63 6e 0a 23 | 20 20 20 20 39 38 33 20 |al.icn.#| 983 |
|00000650| 2d 72 77 2d 72 2d 2d 72 | 2d 2d 20 52 45 41 44 4d |-rw-r--r|-- READM|
|00000660| 45 0a 23 20 20 20 20 36 | 35 39 20 2d 72 77 2d 72 |E.# 6|59 -rw-r|
|00000670| 2d 2d 72 2d 2d 20 4d 61 | 6b 65 66 69 6c 65 2e 64 |--r-- Ma|kefile.d|
|00000680| 69 73 74 0a 23 0a 69 66 | 20 74 65 73 74 20 2d 72 |ist.#.if| test -r|
|00000690| 20 5f 73 68 61 72 5f 73 | 65 71 5f 2e 74 6d 70 3b | _shar_s|eq_.tmp;|
|000006a0| 20 74 68 65 6e 0a 09 65 | 63 68 6f 20 27 4d 75 73 | then..e|cho 'Mus|
|000006b0| 74 20 75 6e 70 61 63 6b | 20 61 72 63 68 69 76 65 |t unpack| archive|
|000006c0| 73 20 69 6e 20 73 65 71 | 75 65 6e 63 65 21 27 0a |s in seq|uence!'.|
|000006d0| 09 65 63 68 6f 20 50 6c | 65 61 73 65 20 75 6e 70 |.echo Pl|ease unp|
|000006e0| 61 63 6b 20 70 61 72 74 | 20 60 63 61 74 20 5f 73 |ack part| `cat _s|
|000006f0| 68 61 72 5f 73 65 71 5f | 2e 74 6d 70 60 20 6e 65 |har_seq_|.tmp` ne|
|00000700| 78 74 0a 09 65 78 69 74 | 20 31 0a 66 69 0a 23 20 |xt..exit| 1.fi.# |
|00000710| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 20 73 74 |========|===== st|
|00000720| 72 69 70 73 67 6d 6c 2e | 69 63 6e 20 3d 3d 3d 3d |ripsgml.|icn ====|
|00000730| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 0a 69 66 20 74 65 |========|==.if te|
|00000740| 73 74 20 2d 66 20 27 73 | 74 72 69 70 73 67 6d 6c |st -f 's|tripsgml|
|00000750| 2e 69 63 6e 27 20 2d 61 | 20 58 22 24 31 22 20 21 |.icn' -a| X"$1" !|
|00000760| 3d 20 58 22 2d 63 22 3b | 20 74 68 65 6e 0a 09 65 |= X"-c";| then..e|
|00000770| 63 68 6f 20 27 78 20 2d | 20 73 6b 69 70 70 69 6e |cho 'x -| skippin|
|00000780| 67 20 73 74 72 69 70 73 | 67 6d 6c 2e 69 63 6e 20 |g strips|gml.icn |
|00000790| 28 46 69 6c 65 20 61 6c | 72 65 61 64 79 20 65 78 |(File al|ready ex|
|000007a0| 69 73 74 73 29 27 0a 09 | 72 6d 20 2d 66 20 5f 73 |ists)'..|rm -f _s|
|000007b0| 68 61 72 5f 77 6e 74 5f | 2e 74 6d 70 0a 65 6c 73 |har_wnt_|.tmp.els|
|000007c0| 65 0a 3e 20 5f 73 68 61 | 72 5f 77 6e 74 5f 2e 74 |e.> _sha|r_wnt_.t|
|000007d0| 6d 70 0a 65 63 68 6f 20 | 27 78 20 2d 20 65 78 74 |mp.echo |'x - ext|
|000007e0| 72 61 63 74 69 6e 67 20 | 73 74 72 69 70 73 67 6d |racting |stripsgm|
|000007f0| 6c 2e 69 63 6e 20 28 54 | 65 78 74 29 27 0a 73 65 |l.icn (T|ext)'.se|
|00000800| 64 20 27 73 2f 5e 58 2f | 2f 27 20 3c 3c 20 27 53 |d 's/^X/|/' << 'S|
|00000810| 48 41 52 5f 45 4f 46 27 | 20 3e 20 27 73 74 72 69 |HAR_EOF'| > 'stri|
|00000820| 70 73 67 6d 6c 2e 69 63 | 6e 27 20 26 26 0a 58 23 |psgml.ic|n' &&.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 23 | 23 23 23 0a 58 23 0a 58 |########|###.X#.X|
|00000880| 23 09 4e 61 6d 65 3a 09 | 20 73 74 72 69 70 73 67 |#.Name:.| stripsg|
|00000890| 6d 6c 2e 69 63 6e 0a 58 | 23 0a 58 23 09 54 69 74 |ml.icn.X|#.X#.Tit|
|000008a0| 6c 65 3a 09 20 53 74 72 | 69 70 20 28 6f 72 20 74 |le:. Str|ip (or t|
|000008b0| 72 61 6e 73 6c 61 74 65 | 29 20 73 69 6d 70 6c 65 |ranslate|) simple|
|000008c0| 20 53 47 4d 4c 20 74 61 | 67 73 20 66 72 6f 6d 20 | SGML ta|gs from |
|000008d0| 61 20 66 69 6c 65 0a 58 | 23 0a 58 23 09 41 75 74 |a file.X|#.X#.Aut|
|000008e0| 68 6f 72 3a 09 20 52 69 | 63 68 61 72 64 20 4c 2e |hor:. Ri|chard L.|
|000008f0| 20 47 6f 65 72 77 69 74 | 7a 0a 58 23 0a 58 23 09 | Goerwit|z.X#.X#.|
|00000900| 56 65 72 73 69 6f 6e 3a | 20 31 2e 39 0a 58 23 0a |Version:| 1.9.X#.|
|00000910| 58 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |X#######|########|
|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 23 23 |########|########|
|00000950| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 0a 58 23 |########|#####.X#|
|00000960| 0a 58 23 20 20 53 74 72 | 69 70 20 6f 72 20 70 65 |.X# Str|ip or pe|
|00000970| 72 66 6f 72 6d 20 73 69 | 6d 70 6c 65 20 74 72 61 |rform si|mple tra|
|00000980| 6e 73 6c 61 74 69 6f 6e | 20 6f 6e 20 53 47 4d 4c |nslation| on SGML|
|00000990| 20 3c 3e 2d 73 74 79 6c | 65 20 74 61 67 73 2e 20 | <>-styl|e tags. |
|000009a0| 20 55 73 61 67 65 0a 58 | 23 20 20 69 73 20 61 73 | Usage.X|# is as|
|000009b0| 20 66 6f 6c 6c 6f 77 73 | 3a 0a 58 23 0a 58 23 20 | follows|:.X#.X# |
|000009c0| 20 20 20 20 20 73 74 72 | 69 70 73 67 6d 6c 20 5b | str|ipsgml [|
|000009d0| 2d 66 20 74 72 61 6e 73 | 6c 61 74 69 6f 6e 2d 66 |-f trans|lation-f|
|000009e0| 69 6c 65 5d 20 5b 6c 65 | 66 74 2d 64 65 6c 69 6d |ile] [le|ft-delim|
|000009f0| 69 74 65 72 20 5b 72 69 | 67 68 74 2d 64 65 6c 69 |iter [ri|ght-deli|
|00000a00| 6d 69 74 65 72 5d 5d 0a | 58 23 0a 58 23 20 20 54 |miter]].|X#.X# T|
|00000a10| 68 65 20 64 65 66 61 75 | 6c 74 20 6c 65 66 74 2d |he defau|lt left-|
|00000a20| 64 65 6c 69 6d 69 74 65 | 72 20 69 73 20 3c 2c 20 |delimite|r is <, |
|00000a30| 74 68 65 20 64 65 66 61 | 75 6c 74 20 72 69 67 68 |the defa|ult righ|
|00000a40| 74 20 64 65 6c 69 6d 69 | 74 65 72 20 69 73 20 3e |t delimi|ter is >|
|00000a50| 2e 0a 58 23 20 20 49 66 | 20 6e 6f 20 74 72 61 6e |..X# If| no tran|
|00000a60| 73 6c 61 74 69 6f 6e 20 | 66 69 6c 65 20 69 73 20 |slation |file is |
|00000a70| 73 70 65 63 69 66 69 65 | 64 2c 20 74 68 65 20 70 |specifie|d, the p|
|00000a80| 72 6f 67 72 61 6d 20 61 | 63 74 73 20 61 73 20 61 |rogram a|cts as a|
|00000a90| 20 73 74 72 69 70 2d 0a | 58 23 20 20 70 65 72 2c | strip-.|X# per,|
|00000aa0| 20 73 69 6d 70 6c 79 20 | 72 65 6d 6f 76 69 6e 67 | simply |removing|
|00000ab0| 20 6d 61 74 65 72 69 61 | 6c 20 62 65 74 77 65 65 | materia|l betwee|
|00000ac0| 6e 20 74 68 65 20 64 65 | 6c 69 6d 69 74 65 72 73 |n the de|limiters|
|00000ad0| 2e 20 20 53 74 72 69 70 | 73 67 6d 6c 0a 58 23 20 |. Strip|sgml.X# |
|00000ae0| 20 74 61 6b 65 73 20 69 | 74 73 20 69 6e 70 75 74 | takes i|ts input|
|00000af0| 20 66 72 6f 6d 20 73 74 | 64 69 6e 2c 20 77 72 69 | from st|din, wri|
|00000b00| 74 69 6e 67 20 74 6f 20 | 73 74 64 6f 75 74 2e 0a |ting to |stdout..|
|00000b10| 58 23 0a 58 23 20 20 54 | 68 65 20 66 6f 72 6d 61 |X#.X# T|he forma|
|00000b20| 74 20 6f 66 20 74 68 65 | 20 74 72 61 6e 73 6c 61 |t of the| transla|
|00000b30| 74 69 6f 6e 20 66 69 6c | 65 20 69 73 3a 0a 58 23 |tion fil|e is:.X#|
|00000b40| 0a 58 23 20 20 20 20 20 | 20 63 6f 64 65 09 69 6e |.X# | code.in|
|00000b50| 69 74 69 61 6c 69 7a 61 | 74 69 6f 6e 09 63 6f 6d |itializa|tion.com|
|00000b60| 70 6c 65 74 69 6f 6e 0a | 58 23 0a 58 23 20 20 41 |pletion.|X#.X# A|
|00000b70| 20 74 61 62 20 6f 72 20 | 63 6f 6c 6f 6e 20 73 65 | tab or |colon se|
|00000b80| 70 61 72 61 74 65 73 20 | 74 68 65 20 66 69 65 6c |parates |the fiel|
|00000b90| 64 73 2e 20 20 49 66 20 | 79 6f 75 20 77 61 6e 74 |ds. If |you want|
|00000ba0| 20 74 6f 20 75 73 65 20 | 61 20 74 61 62 20 6f 72 | to use |a tab or|
|00000bb0| 20 63 6f 6c 6f 6e 0a 58 | 23 20 20 61 73 20 70 61 | colon.X|# as pa|
|00000bc0| 72 74 20 6f 66 20 74 68 | 65 20 74 65 78 74 20 28 |rt of th|e text (|
|00000bd0| 61 6e 64 20 6e 6f 74 20 | 61 73 20 61 20 73 65 70 |and not |as a sep|
|00000be0| 61 72 61 74 6f 72 29 2c | 20 70 6c 61 63 65 20 61 |arator),| place a|
|00000bf0| 20 62 61 63 6b 73 6c 61 | 73 68 20 62 65 66 6f 72 | backsla|sh befor|
|00000c00| 65 0a 58 23 20 20 69 74 | 2e 20 20 54 68 65 20 63 |e.X# it|. The c|
|00000c10| 6f 6d 70 6c 65 74 69 6f | 6e 20 66 69 65 6c 64 20 |ompletio|n field |
|00000c20| 69 73 20 6f 70 74 69 6f | 6e 61 6c 2e 20 20 54 68 |is optio|nal. Th|
|00000c30| 65 72 65 20 69 73 20 6e | 6f 74 20 63 75 72 72 65 |ere is n|ot curre|
|00000c40| 6e 74 6c 79 20 61 6e 79 | 20 77 61 79 0a 58 23 20 |ntly any| way.X# |
|00000c50| 20 6f 66 20 73 70 65 63 | 69 66 79 69 6e 67 20 61 | of spec|ifying a|
|00000c60| 20 63 6f 6d 70 6c 65 74 | 69 6f 6e 20 66 69 65 6c | complet|ion fiel|
|00000c70| 64 20 77 69 74 68 6f 75 | 74 20 61 6e 20 69 6e 69 |d withou|t an ini|
|00000c80| 74 69 61 6c 69 7a 61 74 | 69 6f 6e 20 66 69 65 6c |tializat|ion fiel|
|00000c90| 64 2e 20 20 44 6f 0a 58 | 23 20 20 6e 6f 74 20 73 |d. Do.X|# not s|
|00000ca0| 70 65 63 69 66 79 20 64 | 65 6c 69 6d 69 74 65 72 |pecify d|elimiter|
|00000cb0| 73 20 61 73 20 70 61 72 | 74 20 6f 66 20 63 6f 64 |s as par|t of cod|
|00000cc0| 65 2e 0a 58 23 0a 58 23 | 20 20 4e 6f 74 65 20 74 |e..X#.X#| Note t|
|00000cd0| 68 61 74 2c 20 69 66 20 | 79 6f 75 20 61 72 65 20 |hat, if |you are |
|00000ce0| 74 72 61 6e 73 6c 61 74 | 69 6e 67 20 53 47 4d 4c |translat|ing SGML|
|00000cf0| 20 63 6f 64 65 20 69 6e | 74 6f 20 66 6f 6e 74 20 | code in|to font |
|00000d00| 63 68 61 6e 67 65 20 6f | 72 20 65 73 63 61 70 65 |change o|r escape|
|00000d10| 0a 58 23 20 20 73 65 71 | 75 65 6e 63 65 73 2c 20 |.X# seq|uences, |
|00000d20| 79 6f 75 20 6d 61 79 20 | 67 65 74 20 75 6e 65 78 |you may |get unex|
|00000d30| 70 65 63 74 65 64 20 72 | 65 73 75 6c 74 73 2e 20 |pected r|esults. |
|00000d40| 20 54 68 69 73 20 69 73 | 6e 27 74 20 73 74 72 69 | This is|n't stri|
|00000d50| 70 73 67 6d 6c 27 73 0a | 58 23 20 20 66 61 75 6c |psgml's.|X# faul|
|00000d60| 74 2e 20 20 49 74 27 73 | 20 6a 75 73 74 20 61 20 |t. It's| just a |
|00000d70| 6d 61 74 74 65 72 20 6f | 66 20 68 6f 77 20 79 6f |matter o|f how yo|
|00000d80| 75 72 20 74 65 72 6d 69 | 6e 61 6c 20 6f 72 20 57 |ur termi|nal or W|
|00000d90| 50 20 6f 70 65 72 61 74 | 65 2e 20 20 53 6f 6d 65 |P operat|e. Some|
|00000da0| 0a 58 23 20 20 6e 65 65 | 64 20 74 6f 20 62 65 20 |.X# nee|d to be |
|00000db0| 22 72 65 6d 69 6e 64 65 | 64 22 20 61 74 20 74 68 |"reminde|d" at th|
|00000dc0| 65 20 62 65 67 69 6e 6e | 69 6e 67 20 6f 66 20 65 |e beginn|ing of e|
|00000dd0| 61 63 68 20 6c 69 6e 65 | 20 77 68 61 74 20 6d 6f |ach line| what mo|
|00000de0| 64 65 20 6f 72 20 66 6f | 6e 74 0a 58 23 20 20 69 |de or fo|nt.X# i|
|00000df0| 73 20 62 65 69 6e 67 20 | 75 73 65 64 2e 20 20 4e |s being |used. N|
|00000e00| 6f 74 65 20 61 6c 73 6f | 20 74 68 61 74 20 73 74 |ote also| that st|
|00000e10| 72 69 70 73 67 6d 6c 20 | 61 73 73 75 6d 65 73 20 |ripsgml |assumes |
|00000e20| 3c 20 61 6e 64 20 3e 20 | 61 73 20 64 65 6c 69 6d |< and > |as delim|
|00000e30| 69 74 65 72 73 2e 0a 58 | 23 20 20 49 66 20 79 6f |iters..X|# If yo|
|00000e40| 75 20 77 61 6e 74 20 74 | 6f 20 70 75 74 20 61 20 |u want t|o put a |
|00000e50| 67 72 65 61 74 65 72 2d | 74 68 61 6e 20 6f 72 20 |greater-|than or |
|00000e60| 6c 65 73 73 2d 74 68 61 | 6e 20 73 69 67 6e 20 69 |less-tha|n sign i|
|00000e70| 6e 74 6f 20 79 6f 75 72 | 20 74 65 78 74 2c 0a 58 |nto your| text,.X|
|00000e80| 23 20 20 70 75 74 20 61 | 20 62 61 63 6b 73 6c 61 |# put a| backsla|
|00000e90| 73 68 20 62 65 66 6f 72 | 65 20 69 74 2e 20 20 54 |sh befor|e it. T|
|00000ea0| 68 69 73 20 77 69 6c 6c | 20 65 66 66 65 63 74 69 |his will| effecti|
|00000eb0| 76 65 6c 79 20 22 65 73 | 63 61 70 65 22 20 74 68 |vely "es|cape" th|
|00000ec0| 65 20 73 70 65 2d 0a 58 | 23 20 20 63 69 61 6c 20 |e spe-.X|# cial |
|00000ed0| 6d 65 61 6e 69 6e 67 20 | 6f 66 20 74 68 6f 73 65 |meaning |of those|
|00000ee0| 20 73 79 6d 62 6f 6c 73 | 2e 20 20 49 74 20 69 73 | symbols|. It is|
|00000ef0| 20 6e 6f 77 20 70 6f 73 | 73 69 62 6c 65 20 74 6f | now pos|sible to|
|00000f00| 20 63 68 61 6e 67 65 20 | 74 68 65 0a 58 23 20 20 | change |the.X# |
|00000f10| 64 65 66 61 75 6c 74 20 | 64 65 6c 69 6d 69 74 65 |default |delimite|
|00000f20| 72 73 2c 20 62 75 74 20 | 74 68 65 20 6f 70 74 69 |rs, but |the opti|
|00000f30| 6f 6e 20 68 61 73 20 6e | 6f 74 20 62 65 65 6e 20 |on has n|ot been |
|00000f40| 74 68 6f 72 6f 75 67 68 | 6c 79 20 74 65 73 74 65 |thorough|ly teste|
|00000f50| 64 2e 0a 58 23 0a 58 23 | 23 23 23 23 23 23 23 23 |d..X#.X#|########|
|00000f60| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00000f70| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00000f80| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00000f90| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00000fa0| 23 23 23 0a 58 23 0a 58 | 23 20 20 4c 69 6e 6b 73 |###.X#.X|# Links|
|00000fb0| 3a 20 73 6c 61 73 68 62 | 61 6c 2e 69 63 6e 20 2e |: slashb|al.icn .|
|00000fc0| 2f 73 74 72 69 70 75 6e | 62 2e 69 63 6e 20 2e 2f |/stripun|b.icn ./|
|00000fd0| 72 65 61 64 74 62 6c 2e | 69 63 6e 0a 58 23 0a 58 |readtbl.|icn.X#.X|
|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 | 23 23 23 23 23 23 23 23 |########|########|
|00001010| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00001020| 23 23 23 23 23 23 23 23 | 23 23 23 23 0a 58 0a 58 |########|####.X.X|
|00001030| 0a 58 70 72 6f 63 65 64 | 75 72 65 20 6d 61 69 6e |.Xproced|ure main|
|00001040| 28 61 29 0a 58 0a 58 20 | 20 20 20 6c 6f 63 61 6c |(a).X.X | local|
|00001050| 20 75 73 61 67 65 2c 20 | 5f 61 72 67 2c 20 4c 2c | usage, |_arg, L,|
|00001060| 20 52 0a 58 0a 58 20 20 | 20 20 75 73 61 67 65 3a | R.X.X | usage:|
|00001070| 3d 0a 58 20 20 20 20 20 | 22 75 73 61 67 65 3a 20 |=.X |"usage: |
|00001080| 20 73 74 72 69 70 73 67 | 6d 6c 20 5b 2d 66 20 6d | stripsg|ml [-f m|
|00001090| 61 70 2d 66 69 6c 65 5d | 20 5b 6c 65 66 74 2d 64 |ap-file]| [left-d|
|000010a0| 65 6c 69 6d 69 74 65 72 | 28 73 29 20 5b 72 69 67 |elimiter|(s) [rig|
|000010b0| 68 74 2d 64 65 6c 69 6d | 69 74 65 72 28 73 29 5d |ht-delim|iter(s)]|
|000010c0| 5d 22 0a 58 0a 58 20 20 | 20 20 4c 20 3a 3d 20 27 |]".X.X | L := '|
|000010d0| 3c 27 3b 20 52 20 3a 3d | 20 27 3e 27 0a 58 20 20 |<'; R :=| '>'.X |
|000010e0| 20 20 77 68 69 6c 65 20 | 5f 61 72 67 20 3a 3d 20 | while |_arg := |
|000010f0| 67 65 74 28 61 29 20 64 | 6f 20 7b 0a 58 20 20 20 |get(a) d|o {.X |
|00001100| 20 20 20 20 20 69 66 20 | 5f 61 72 67 20 3d 3d 20 | if |_arg == |
|00001110| 22 2d 66 22 20 74 68 65 | 6e 20 7b 0a 58 20 20 20 |"-f" the|n {.X |
|00001120| 20 20 20 20 20 20 20 20 | 20 6d 61 70 5f 66 69 6c | | map_fil|
|00001130| 65 20 3a 3d 20 6f 70 65 | 6e 28 67 65 74 28 61 29 |e := ope|n(get(a)|
|00001140| 29 20 7c 0a 58 20 20 20 | 20 20 20 20 20 20 20 20 |) |.X | |
|00001150| 20 20 20 20 20 73 74 6f | 70 28 22 73 74 72 69 70 | sto|p("strip|
|00001160| 73 67 6d 6c 3a 20 20 63 | 61 6e 27 74 20 6f 70 65 |sgml: c|an't ope|
|00001170| 6e 20 6d 61 70 5f 66 69 | 6c 65 5c 6e 22 2c 75 73 |n map_fi|le\n",us|
|00001180| 61 67 65 29 0a 58 20 20 | 20 20 20 20 20 20 20 20 |age).X | |
|00001190| 20 20 74 20 3a 3d 20 72 | 65 61 64 74 62 6c 28 6d | t := r|eadtbl(m|
|000011a0| 61 70 5f 66 69 6c 65 29 | 0a 58 20 20 20 20 20 20 |ap_file)|.X |
|000011b0| 20 20 7d 0a 58 20 20 20 | 20 20 20 20 20 65 6c 73 | }.X | els|
|000011c0| 65 20 7b 0a 58 20 20 20 | 20 20 20 20 20 20 20 20 |e {.X | |
|000011d0| 20 4c 20 3a 3d 20 5f 61 | 72 67 0a 58 20 20 20 20 | L := _a|rg.X |
|000011e0| 20 20 20 20 20 20 20 20 | 52 20 3a 3d 20 63 73 65 | |R := cse|
|000011f0| 74 28 67 65 74 28 61 29 | 29 0a 58 20 20 20 20 20 |t(get(a)|).X |
|00001200| 20 20 20 7d 0a 58 20 20 | 20 20 7d 0a 58 0a 58 20 | }.X | }.X.X |
|00001210| 20 20 20 65 76 65 72 79 | 20 6c 69 6e 65 20 3a 3d | every| line :=|
|00001220| 20 21 26 69 6e 70 75 74 | 20 64 6f 0a 58 09 77 72 | !&input| do.X.wr|
|00001230| 69 74 65 28 73 74 72 69 | 70 75 6e 62 28 4c 2c 52 |ite(stri|punb(L,R|
|00001240| 2c 6c 69 6e 65 2c 26 6e | 75 6c 6c 2c 26 6e 75 6c |,line,&n|ull,&nul|
|00001250| 6c 2c 74 29 29 20 20 23 | 20 74 20 69 73 20 74 68 |l,t)) #| t is th|
|00001260| 65 20 6d 61 70 20 74 61 | 62 6c 65 0a 58 0a 58 20 |e map ta|ble.X.X |
|00001270| 20 20 20 23 20 6c 61 73 | 74 5f 6b 20 69 73 20 74 | # las|t_k is t|
|00001280| 68 65 20 73 74 61 63 6b | 20 75 73 65 64 20 69 6e |he stack| used in|
|00001290| 20 73 74 72 69 70 75 6e | 62 2e 69 63 6e 0a 58 20 | stripun|b.icn.X |
|000012a0| 20 20 20 69 66 20 2a 5c | 6c 61 73 74 5f 6b 20 7e | if *\|last_k ~|
|000012b0| 3d 20 30 20 74 68 65 6e | 0a 58 09 73 74 6f 70 28 |= 0 then|.X.stop(|
|000012c0| 22 55 6e 65 78 70 65 63 | 74 65 64 20 45 4f 46 20 |"Unexpec|ted EOF |
|000012d0| 65 6e 63 6f 75 6e 74 65 | 72 65 64 2e 20 20 45 78 |encounte|red. Ex|
|000012e0| 70 65 63 74 69 6e 67 20 | 22 2c 20 70 6f 70 28 6c |pecting |", pop(l|
|000012f0| 61 73 74 5f 6b 29 2c 20 | 22 2e 22 29 0a 58 0a 58 |ast_k), |".").X.X|
|00001300| 65 6e 64 0a 53 48 41 52 | 5f 45 4f 46 0a 74 72 75 |end.SHAR|_EOF.tru|
|00001310| 65 20 7c 7c 20 65 63 68 | 6f 20 27 72 65 73 74 6f |e || ech|o 'resto|
|00001320| 72 65 20 6f 66 20 73 74 | 72 69 70 73 67 6d 6c 2e |re of st|ripsgml.|
|00001330| 69 63 6e 20 66 61 69 6c | 65 64 27 0a 72 6d 20 2d |icn fail|ed'.rm -|
|00001340| 66 20 5f 73 68 61 72 5f | 77 6e 74 5f 2e 74 6d 70 |f _shar_|wnt_.tmp|
|00001350| 0a 66 69 0a 23 20 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |.fi.# ==|========|
|00001360| 3d 3d 3d 20 73 74 72 69 | 70 75 6e 62 2e 69 63 6e |=== stri|punb.icn|
|00001370| 20 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 0a | =======|=======.|
|00001380| 69 66 20 74 65 73 74 20 | 2d 66 20 27 73 74 72 69 |if test |-f 'stri|
|00001390| 70 75 6e 62 2e 69 63 6e | 27 20 2d 61 20 58 22 24 |punb.icn|' -a X"$|
|000013a0| 31 22 20 21 3d 20 58 22 | 2d 63 22 3b 20 74 68 65 |1" != X"|-c"; the|
|000013b0| 6e 0a 09 65 63 68 6f 20 | 27 78 20 2d 20 73 6b 69 |n..echo |'x - ski|
|000013c0| 70 70 69 6e 67 20 73 74 | 72 69 70 75 6e 62 2e 69 |pping st|ripunb.i|
|000013d0| 63 6e 20 28 46 69 6c 65 | 20 61 6c 72 65 61 64 79 |cn (File| already|
|000013e0| 20 65 78 69 73 74 73 29 | 27 0a 09 72 6d 20 2d 66 | exists)|'..rm -f|
|000013f0| 20 5f 73 68 61 72 5f 77 | 6e 74 5f 2e 74 6d 70 0a | _shar_w|nt_.tmp.|
|00001400| 65 6c 73 65 0a 3e 20 5f | 73 68 61 72 5f 77 6e 74 |else.> _|shar_wnt|
|00001410| 5f 2e 74 6d 70 0a 65 63 | 68 6f 20 27 78 20 2d 20 |_.tmp.ec|ho 'x - |
|00001420| 65 78 74 72 61 63 74 69 | 6e 67 20 73 74 72 69 70 |extracti|ng strip|
|00001430| 75 6e 62 2e 69 63 6e 20 | 28 54 65 78 74 29 27 0a |unb.icn |(Text)'.|
|00001440| 73 65 64 20 27 73 2f 5e | 58 2f 2f 27 20 3c 3c 20 |sed 's/^|X//' << |
|00001450| 27 53 48 41 52 5f 45 4f | 46 27 20 3e 20 27 73 74 |'SHAR_EO|F' > 'st|
|00001460| 72 69 70 75 6e 62 2e 69 | 63 6e 27 20 26 26 0a 58 |ripunb.i|cn' &&.X|
|00001470| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00001480| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00001490| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|000014a0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|000014b0| 23 23 23 23 23 23 23 23 | 23 23 23 23 0a 58 23 0a |########|####.X#.|
|000014c0| 58 23 09 4e 61 6d 65 3a | 09 20 73 74 72 69 70 75 |X#.Name:|. stripu|
|000014d0| 6e 62 2e 69 63 6e 0a 58 | 23 0a 58 23 09 54 69 74 |nb.icn.X|#.X#.Tit|
|000014e0| 6c 65 3a 09 20 53 74 72 | 69 70 20 75 6e 62 61 6c |le:. Str|ip unbal|
|000014f0| 61 6e 63 65 64 20 6d 61 | 74 65 72 69 61 6c 0a 58 |anced ma|terial.X|
|00001500| 23 0a 58 23 09 41 75 74 | 68 6f 72 3a 09 20 52 69 |#.X#.Aut|hor:. Ri|
|00001510| 63 68 61 72 64 20 4c 2e | 20 47 6f 65 72 77 69 74 |chard L.| Goerwit|
|00001520| 7a 0a 58 23 0a 58 23 09 | 56 65 72 73 69 6f 6e 3a |z.X#.X#.|Version:|
|00001530| 20 31 2e 35 0a 58 23 0a | 58 23 23 23 23 23 23 23 | 1.5.X#.|X#######|
|00001540| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00001550| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00001560| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00001570| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00001580| 23 23 23 23 23 0a 58 23 | 20 20 0a 58 23 20 20 54 |#####.X#| .X# T|
|00001590| 68 69 73 20 72 6f 75 74 | 69 6e 65 20 73 74 72 69 |his rout|ine stri|
|000015a0| 70 73 20 6d 61 74 65 72 | 69 61 6c 20 66 72 6f 6d |ps mater|ial from|
|000015b0| 20 61 20 6c 69 6e 65 20 | 77 68 69 63 68 20 69 73 | a line |which is|
|000015c0| 20 75 6e 62 61 6c 61 6e | 63 65 64 20 77 69 74 68 | unbalan|ced with|
|000015d0| 0a 58 23 20 20 72 65 73 | 70 65 63 74 20 74 6f 20 |.X# res|pect to |
|000015e0| 74 68 65 20 63 68 61 72 | 61 63 74 65 72 73 20 64 |the char|acters d|
|000015f0| 65 66 69 6e 65 64 20 69 | 6e 20 61 72 67 75 6d 65 |efined i|n argume|
|00001600| 6e 74 73 20 31 20 61 6e | 64 20 32 20 28 75 6e 62 |nts 1 an|d 2 (unb|
|00001610| 61 6c 61 6e 63 65 64 0a | 58 23 20 20 62 65 69 6e |alanced.|X# bein|
|00001620| 67 20 64 65 66 69 6e 65 | 64 20 61 73 20 62 61 6c |g define|d as bal|
|00001630| 28 29 20 64 65 66 69 6e | 65 73 20 69 74 2c 20 65 |() defin|es it, e|
|00001640| 78 63 65 70 74 20 74 68 | 61 74 20 63 68 61 72 61 |xcept th|at chara|
|00001650| 63 74 65 72 73 20 70 72 | 65 63 65 64 65 64 0a 58 |cters pr|eceded.X|
|00001660| 23 20 20 62 79 20 61 20 | 62 61 63 6b 73 6c 61 73 |# by a |backslas|
|00001670| 68 20 61 72 65 20 63 6f | 75 6e 74 65 64 20 61 73 |h are co|unted as|
|00001680| 20 72 65 67 75 6c 61 72 | 20 63 68 61 72 61 63 74 | regular| charact|
|00001690| 65 72 73 2c 20 61 6e 64 | 20 61 72 65 20 6e 6f 74 |ers, and| are not|
|000016a0| 20 74 61 6b 65 6e 0a 58 | 23 20 20 69 6e 74 6f 20 | taken.X|# into |
|000016b0| 61 63 63 6f 75 6e 74 20 | 62 79 20 74 68 65 20 62 |account |by the b|
|000016c0| 61 6c 61 6e 63 69 6e 67 | 20 61 6c 67 6f 72 69 74 |alancing| algorit|
|000016d0| 68 6d 29 2e 0a 58 23 0a | 58 23 20 20 4f 6e 65 20 |hm)..X#.|X# One |
|000016e0| 6c 69 74 74 6c 65 20 62 | 69 74 20 6f 66 20 77 65 |little b|it of we|
|000016f0| 69 72 64 6e 65 73 73 20 | 49 20 61 64 64 65 64 20 |irdness |I added |
|00001700| 69 6e 20 69 73 20 61 20 | 74 61 62 6c 65 20 61 72 |in is a |table ar|
|00001710| 67 75 6d 65 6e 74 2e 20 | 50 75 74 0a 58 23 20 20 |gument. |Put.X# |
|00001720| 73 69 6d 70 6c 79 2c 20 | 69 66 20 79 6f 75 20 63 |simply, |if you c|
|00001730| 61 6c 6c 20 73 74 72 69 | 70 75 6e 62 28 29 20 61 |all stri|punb() a|
|00001740| 73 20 66 6f 6c 6c 6f 77 | 73 2c 0a 58 23 0a 58 23 |s follow|s,.X#.X#|
|00001750| 20 20 20 20 20 20 73 74 | 72 69 70 75 6e 62 28 27 | st|ripunb('|
|00001760| 3c 27 2c 27 3e 27 2c 73 | 2c 26 6e 75 6c 6c 2c 26 |<','>',s|,&null,&|
|00001770| 6e 75 6c 6c 2c 74 29 0a | 58 23 0a 58 23 20 20 61 |null,t).|X#.X# a|
|00001780| 6e 64 20 69 66 20 74 20 | 69 73 20 61 20 74 61 62 |nd if t |is a tab|
|00001790| 6c 65 20 68 61 76 69 6e | 67 20 74 68 65 20 66 6f |le havin|g the fo|
|000017a0| 72 6d 2c 0a 58 23 0a 58 | 23 20 20 20 20 20 20 6b |rm,.X#.X|# k|
|000017b0| 65 79 3a 20 20 22 62 6f | 6c 64 22 20 20 20 20 20 |ey: "bo|ld" |
|000017c0| 20 20 20 76 61 6c 75 65 | 3a 20 6f 75 74 73 74 72 | value|: outstr|
|000017d0| 28 22 5c 65 5b 32 6d 22 | 2c 20 22 5c 65 31 6d 22 |("\e[2m"|, "\e1m"|
|000017e0| 29 0a 58 23 20 20 20 20 | 20 20 6b 65 79 3a 20 20 |).X# | key: |
|000017f0| 22 75 6e 64 65 72 6c 69 | 6e 65 22 20 20 20 76 61 |"underli|ne" va|
|00001800| 6c 75 65 3a 20 6f 75 74 | 73 74 72 28 22 5c 65 5b |lue: out|str("\e[|
|00001810| 34 6d 22 2c 20 22 5c 65 | 31 6d 22 29 0a 58 23 20 |4m", "\e|1m").X# |
|00001820| 20 20 20 20 20 65 74 63 | 2e 0a 58 23 0a 58 23 20 | etc|..X#.X# |
|00001830| 20 74 68 65 6e 20 65 76 | 65 72 79 20 69 6e 73 74 | then ev|ery inst|
|00001840| 61 6e 63 65 20 6f 66 20 | 22 3c 62 6f 6c 64 3e 22 |ance of |"<bold>"|
|00001850| 20 69 6e 20 73 74 72 69 | 6e 67 20 73 20 77 69 6c | in stri|ng s wil|
|00001860| 6c 20 62 65 20 6d 61 70 | 70 65 64 20 74 6f 0a 58 |l be map|ped to.X|
|00001870| 23 20 20 22 5c 65 32 6d | 2c 22 20 61 6e 64 20 65 |# "\e2m|," and e|
|00001880| 76 65 72 79 20 69 6e 73 | 74 61 6e 63 65 20 6f 66 |very ins|tance of|
|00001890| 20 22 3c 2f 62 6f 6c 64 | 3e 22 20 77 69 6c 6c 20 | "</bold|>" will |
|000018a0| 62 65 20 6d 61 70 70 65 | 64 20 74 6f 20 22 5c 65 |be mappe|d to "\e|
|000018b0| 5b 31 6d 2e 22 0a 58 23 | 20 20 56 61 6c 75 65 73 |[1m.".X#| Values|
|000018c0| 20 69 6e 20 74 61 62 6c | 65 20 74 20 6d 75 73 74 | in tabl|e t must|
|000018d0| 20 62 65 20 72 65 63 6f | 72 64 73 20 6f 66 20 74 | be reco|rds of t|
|000018e0| 79 70 65 20 6f 75 74 70 | 75 74 28 6f 6e 2c 20 6f |ype outp|ut(on, o|
|000018f0| 66 66 29 2e 20 20 57 68 | 65 6e 0a 58 23 20 20 22 |ff). Wh|en.X# "|
|00001900| 3c 2f 3e 22 20 69 73 20 | 65 6e 63 6f 75 6e 74 65 |</>" is |encounte|
|00001910| 72 65 64 2c 20 73 74 72 | 69 70 75 6e 62 20 77 69 |red, str|ipunb wi|
|00001920| 6c 6c 20 6f 75 74 70 75 | 74 20 74 68 65 20 2e 6f |ll outpu|t the .o|
|00001930| 66 66 20 76 61 6c 75 65 | 20 66 6f 72 20 74 68 65 |ff value| for the|
|00001940| 0a 58 23 20 20 70 72 65 | 63 65 64 69 6e 67 20 2e |.X# pre|ceding .|
|00001950| 6f 6e 20 73 74 72 69 6e | 67 20 65 6e 63 6f 75 6e |on strin|g encoun|
|00001960| 74 65 72 65 64 2e 0a 58 | 23 0a 58 23 23 23 23 23 |tered..X|#.X#####|
|00001970| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00001980| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00001990| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|000019a0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|000019b0| 23 23 23 23 23 23 23 0a | 58 23 0a 58 23 20 20 4c |#######.|X#.X# L|
|000019c0| 69 6e 6b 73 3a 20 73 6c | 61 73 68 62 61 6c 2e 69 |inks: sl|ashbal.i|
|000019d0| 63 6e 0a 58 23 0a 58 23 | 23 23 23 23 23 23 23 23 |cn.X#.X#|########|
|000019e0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|000019f0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00001a00| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00001a10| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00001a20| 23 23 23 0a 58 0a 58 67 | 6c 6f 62 61 6c 20 6c 61 |###.X.Xg|lobal la|
|00001a30| 73 74 5f 6b 0a 58 72 65 | 63 6f 72 64 20 6f 75 74 |st_k.Xre|cord out|
|00001a40| 73 74 72 28 6f 6e 2c 20 | 6f 66 66 29 0a 58 0a 58 |str(on, |off).X.X|
|00001a50| 0a 58 70 72 6f 63 65 64 | 75 72 65 20 73 74 72 69 |.Xproced|ure stri|
|00001a60| 70 75 6e 62 28 63 31 2c | 63 32 2c 73 2c 69 2c 6a |punb(c1,|c2,s,i,j|
|00001a70| 2c 74 29 0a 58 0a 58 20 | 20 20 20 23 20 4e 42 3a |,t).X.X | # NB:|
|00001a80| 20 20 53 74 72 69 70 75 | 6e 62 28 29 20 72 65 74 | Stripu|nb() ret|
|00001a90| 75 72 6e 73 20 61 20 73 | 74 72 69 6e 67 20 2d 20 |urns a s|tring - |
|00001aa0| 6e 6f 74 20 61 6e 20 69 | 6e 74 65 67 65 72 20 28 |not an i|nteger (|
|00001ab0| 6c 69 6b 65 20 66 69 6e | 64 2c 0a 58 20 20 20 20 |like fin|d,.X |
|00001ac0| 23 20 75 70 74 6f 29 2e | 0a 58 0a 58 20 20 20 20 |# upto).|.X.X |
|00001ad0| 6c 6f 63 61 6c 20 6c 6f | 6f 6b 69 6e 66 6f 72 2c |local lo|okinfor,|
|00001ae0| 20 62 6f 74 68 63 73 2c | 20 73 32 2c 20 6b 2c 20 | bothcs,| s2, k, |
|00001af0| 6e 65 77 5f 73 0a 58 20 | 20 20 20 23 67 6c 6f 62 |new_s.X | #glob|
|00001b00| 61 6c 20 6c 61 73 74 5f | 6b 0a 58 20 20 20 20 69 |al last_|k.X i|
|00001b10| 6e 69 74 69 61 6c 20 6c | 61 73 74 5f 6b 20 3a 3d |nitial l|ast_k :=|
|00001b20| 20 6c 69 73 74 28 29 0a | 58 0a 58 20 20 20 20 2f | list().|X.X /|
|00001b30| 63 31 20 3a 3d 20 27 3c | 27 0a 58 20 20 20 20 2f |c1 := '<|'.X /|
|00001b40| 63 32 20 3a 3d 20 27 3e | 27 0a 58 20 20 20 20 62 |c2 := '>|'.X b|
|00001b50| 6f 74 68 63 73 20 3a 3d | 20 63 31 20 2b 2b 20 63 |othcs :=| c1 ++ c|
|00001b60| 32 0a 58 20 20 20 20 6c | 6f 6f 6b 69 6e 66 6f 72 |2.X l|ookinfor|
|00001b70| 20 3a 3d 20 63 31 20 2b | 2b 20 27 5c 5c 27 0a 58 | := c1 +|+ '\\'.X|
|00001b80| 20 20 20 20 63 20 3a 3d | 20 26 63 73 65 74 20 2d | c :=| &cset -|
|00001b90| 2d 20 63 31 20 2d 2d 20 | 63 32 0a 58 0a 58 20 20 |- c1 -- |c2.X.X |
|00001ba0| 20 20 2f 73 20 3a 3d 20 | 5c 26 73 75 62 6a 65 63 | /s := |\&subjec|
|00001bb0| 74 20 7c 20 73 74 6f 70 | 28 22 73 74 72 69 70 75 |t | stop|("stripu|
|00001bc0| 6e 62 3a 20 20 4e 6f 20 | 73 74 72 69 6e 67 20 61 |nb: No |string a|
|00001bd0| 72 67 75 6d 65 6e 74 2e | 22 29 0a 58 20 20 20 20 |rgument.|").X |
|00001be0| 69 66 20 5c 69 20 74 68 | 65 6e 20 7b 0a 58 09 69 |if \i th|en {.X.i|
|00001bf0| 66 20 69 20 3c 20 31 20 | 74 68 65 6e 0a 58 09 20 |f i < 1 |then.X. |
|00001c00| 20 20 20 69 20 3a 3d 20 | 2a 73 20 2b 20 28 69 2b | i := |*s + (i+|
|00001c10| 31 29 0a 58 20 20 20 20 | 7d 0a 58 20 20 20 20 65 |1).X |}.X e|
|00001c20| 6c 73 65 20 69 20 3a 3d | 20 5c 26 70 6f 73 20 7c |lse i :=| \&pos ||
|00001c30| 20 31 0a 58 20 20 20 20 | 69 66 20 5c 6a 20 74 68 | 1.X |if \j th|
|00001c40| 65 6e 20 7b 0a 58 09 69 | 66 20 6a 20 3c 20 31 20 |en {.X.i|f j < 1 |
|00001c50| 74 68 65 6e 0a 58 09 20 | 20 20 20 6a 20 3a 3d 20 |then.X. | j := |
|00001c60| 2a 73 20 2b 20 28 6a 2b | 31 29 0a 58 20 20 20 20 |*s + (j+|1).X |
|00001c70| 7d 0a 58 20 20 20 20 65 | 6c 73 65 20 6a 20 3a 3d |}.X e|lse j :=|
|00001c80| 20 2a 73 20 2b 20 31 0a | 58 0a 58 20 20 20 20 73 | *s + 1.|X.X s|
|00001c90| 32 20 3a 3d 20 22 22 0a | 58 20 20 20 20 73 20 3f |2 := "".|X s ?|
|00001ca0| 20 7b 0a 58 09 77 68 69 | 6c 65 20 73 32 20 7c 7c | {.X.whi|le s2 |||
|00001cb0| 3a 3d 20 74 61 62 28 75 | 70 74 6f 28 6c 6f 6f 6b |:= tab(u|pto(look|
|00001cc0| 69 6e 66 6f 72 29 29 20 | 64 6f 20 7b 0a 58 09 20 |infor)) |do {.X. |
|00001cd0| 20 20 20 69 66 20 3d 22 | 5c 5c 22 20 74 68 65 6e | if ="|\\" then|
|00001ce0| 20 7b 0a 58 09 09 69 66 | 20 6e 6f 74 20 61 6e 79 | {.X..if| not any|
|00001cf0| 28 62 6f 74 68 63 73 29 | 20 74 68 65 6e 0a 58 09 |(bothcs)| then.X.|
|00001d00| 09 20 20 20 20 73 32 20 | 7c 7c 3a 3d 20 22 5c 5c |. s2 |||:= "\\|
|00001d10| 22 0a 58 09 09 26 70 6f | 73 2b 31 20 3e 20 6a 20 |".X..&po|s+1 > j |
|00001d20| 26 20 28 72 65 74 75 72 | 6e 20 73 32 29 0a 58 09 |& (retur|n s2).X.|
|00001d30| 09 73 32 20 7c 7c 3a 3d | 20 6d 6f 76 65 28 31 29 |.s2 ||:=| move(1)|
|00001d40| 0a 58 09 09 6e 65 78 74 | 0a 58 09 20 20 20 20 7d |.X..next|.X. }|
|00001d50| 0a 58 09 20 20 20 20 65 | 6c 73 65 20 7b 0a 58 09 |.X. e|lse {.X.|
|00001d60| 09 26 70 6f 73 20 3e 20 | 6a 20 26 20 28 72 65 74 |.&pos > |j & (ret|
|00001d70| 75 72 6e 20 73 32 29 0a | 58 09 09 61 6e 79 28 63 |urn s2).|X..any(c|
|00001d80| 31 29 20 7c 0a 58 09 09 | 20 20 20 20 73 74 6f 70 |1) |.X..| stop|
|00001d90| 28 22 73 74 72 69 70 75 | 6e 62 3a 20 20 55 6e 62 |("stripu|nb: Unb|
|00001da0| 61 6c 61 6e 63 65 64 20 | 73 74 72 69 6e 67 2c 20 |alanced |string, |
|00001db0| 70 6f 73 28 22 2c 26 70 | 6f 73 2c 22 29 2e 5c 6e |pos(",&p|os,").\n|
|00001dc0| 22 2c 73 29 0a 58 09 09 | 69 66 20 6e 6f 74 20 28 |",s).X..|if not (|
|00001dd0| 6b 20 3a 3d 20 74 61 62 | 28 73 6c 61 73 68 62 61 |k := tab|(slashba|
|00001de0| 6c 28 63 2c 63 31 2c 63 | 32 29 29 29 0a 58 09 09 |l(c,c1,c|2))).X..|
|00001df0| 74 68 65 6e 20 7b 0a 58 | 09 09 20 20 20 20 23 20 |then {.X|.. # |
|00001e00| 49 66 20 74 68 65 20 6c | 61 73 74 20 63 68 61 72 |If the l|ast char|
|00001e10| 20 6f 6e 20 74 68 65 20 | 6c 69 6e 65 20 69 73 20 | on the |line is |
|00001e20| 74 68 65 20 72 69 67 68 | 74 2d 64 65 6c 69 6d 2e |the righ|t-delim.|
|00001e30| 2e 2e 0a 58 09 09 20 20 | 20 20 69 66 20 28 2e 26 |...X.. | if (.&|
|00001e40| 73 75 62 6a 65 63 74 5b | 26 70 6f 73 3a 30 5d 7c |subject[|&pos:0]||
|00001e50| 7c 22 20 22 29 20 3f 20 | 73 6c 61 73 68 62 61 6c ||" ") ? |slashbal|
|00001e60| 28 63 2c 63 31 2c 63 32 | 29 0a 58 09 09 20 20 20 |(c,c1,c2|).X.. |
|00001e70| 20 23 20 2e 2e 2e 74 68 | 65 6e 2c 20 6e 61 74 75 | # ...th|en, natu|
|00001e80| 72 61 6c 6c 79 2c 20 74 | 68 65 20 72 65 73 74 20 |rally, t|he rest |
|00001e90| 6f 66 20 74 68 65 20 6c | 69 6e 65 20 69 73 20 74 |of the l|ine is t|
|00001ea0| 68 65 20 74 61 67 2e 0a | 58 09 09 20 20 20 20 74 |he tag..|X.. t|
|00001eb0| 68 65 6e 20 6b 20 3a 3d | 20 74 61 62 28 30 29 0a |hen k :=| tab(0).|
|00001ec0| 58 09 09 20 20 20 20 65 | 6c 73 65 20 7b 0a 58 09 |X.. e|lse {.X.|
|00001ed0| 09 09 23 20 42 55 54 2c | 20 69 66 20 69 74 27 73 |..# BUT,| if it's|
|00001ee0| 20 6e 6f 74 20 74 68 65 | 20 72 69 67 68 74 2d 64 | not the| right-d|
|00001ef0| 65 6c 69 6d 2c 20 74 68 | 65 6e 20 77 65 20 68 61 |elim, th|en we ha|
|00001f00| 76 65 20 61 0a 58 09 09 | 09 23 20 74 61 67 20 73 |ve a.X..|.# tag s|
|00001f10| 70 6c 69 74 20 62 79 20 | 61 20 6c 69 6e 65 20 62 |plit by |a line b|
|00001f20| 72 65 61 6b 2e 20 20 42 | 6c 61 73 74 65 64 20 74 |reak. B|lasted t|
|00001f30| 68 69 6e 67 73 2e 0a 58 | 09 09 09 72 65 74 75 72 |hings..X|...retur|
|00001f40| 6e 20 73 74 72 69 70 75 | 6e 62 28 63 31 2c 63 32 |n stripu|nb(c1,c2|
|00001f50| 2c 26 73 75 62 6a 65 63 | 74 7c 7c 72 65 61 64 28 |,&subjec|t||read(|
|00001f60| 26 69 6e 70 75 74 29 2c | 0a 58 09 09 09 09 09 2a |&input),|.X.....*|
|00001f70| 2e 26 73 75 62 6a 65 63 | 74 2c 2c 74 29 20 7c 0a |.&subjec|t,,t) |.|
|00001f80| 58 09 09 09 23 20 43 61 | 6e 27 74 20 66 69 6e 64 |X...# Ca|n't find|
|00001f90| 20 74 68 65 20 72 69 67 | 68 74 20 64 65 6c 69 6d | the rig|ht delim|
|00001fa0| 69 74 65 72 2e 20 20 50 | 61 72 73 69 6e 67 20 65 |iter. P|arsing e|
|00001fb0| 72 72 6f 72 2e 0a 58 09 | 09 09 73 74 6f 70 28 22 |rror..X.|..stop("|
|00001fc0| 73 74 72 69 70 75 6e 62 | 3a 20 20 49 6e 63 6f 6d |stripunb|: Incom|
|00001fd0| 70 6c 65 74 65 20 74 61 | 67 5c 6e 22 2c 73 5b 31 |plete ta|g\n",s[1|
|00001fe0| 3a 38 30 5d 20 7c 20 73 | 29 0a 58 09 09 20 20 20 |:80] | s|).X.. |
|00001ff0| 20 7d 0a 58 09 09 7d 0a | 58 09 09 23 20 54 20 69 | }.X..}.|X..# T i|
|00002000| 73 20 74 68 65 20 6d 61 | 70 74 61 62 6c 65 2e 0a |s the ma|ptable..|
|00002010| 58 09 09 69 66 20 5c 74 | 20 74 68 65 6e 20 7b 0a |X..if \t| then {.|
|00002020| 58 09 09 20 20 20 20 6b | 20 3f 3a 3d 20 32 28 74 |X.. k| ?:= 2(t|
|00002030| 61 62 28 61 6e 79 28 63 | 31 29 29 2c 20 74 61 62 |ab(any(c|1)), tab|
|00002040| 28 75 70 74 6f 28 63 32 | 29 29 2c 20 6d 6f 76 65 |(upto(c2|)), move|
|00002050| 28 31 29 2c 20 70 6f 73 | 28 30 29 29 0a 58 09 09 |(1), pos|(0)).X..|
|00002060| 20 20 20 20 69 66 20 6b | 20 3f 3a 3d 20 28 3d 22 | if k| ?:= (="|
|00002070| 2f 22 2c 20 74 61 62 28 | 30 29 29 20 74 68 65 6e |/", tab(|0)) then|
|00002080| 20 7b 0a 58 09 09 09 63 | 6f 6d 70 6c 3a 3d 20 70 | {.X...c|ompl:= p|
|00002090| 6f 70 28 6c 61 73 74 5f | 6b 29 20 7c 20 73 74 6f |op(last_|k) | sto|
|000020a0| 70 28 22 49 6e 63 6f 6d | 70 6c 65 74 65 20 74 61 |p("Incom|plete ta|
|000020b0| 67 2c 20 22 2c 26 73 75 | 62 6a 65 63 74 29 20 0a |g, ",&su|bject) .|
|000020c0| 58 09 09 09 69 66 20 6b | 20 3d 3d 20 22 22 0a 58 |X...if k| == "".X|
|000020d0| 09 09 09 74 68 65 6e 20 | 6b 20 3a 3d 20 63 6f 6d |...then |k := com|
|000020e0| 70 6c 0a 58 09 09 09 65 | 6c 73 65 20 6b 20 3d 3d |pl.X...e|lse k ==|
|000020f0| 20 63 6f 6d 70 6c 20 7c | 20 73 74 6f 70 28 22 49 | compl || stop("I|
|00002100| 6e 63 6f 72 72 65 63 74 | 6c 79 20 70 61 69 72 65 |ncorrect|ly paire|
|00002110| 64 20 74 61 67 2c 2f 74 | 61 67 2e 22 29 0a 58 09 |d tag,/t|ag.").X.|
|00002120| 09 09 73 32 20 7c 7c 3a | 3d 20 5c 28 5c 74 5b 6b |..s2 ||:|= \(\t[k|
|00002130| 5d 29 2e 6f 66 66 0a 58 | 09 09 20 20 20 20 7d 0a |]).off.X|.. }.|
|00002140| 58 09 09 20 20 20 20 65 | 6c 73 65 20 7b 0a 58 09 |X.. e|lse {.X.|
|00002150| 09 09 73 32 20 7c 7c 3a | 3d 20 5c 28 5c 74 5b 6b |..s2 ||:|= \(\t[k|
|00002160| 5d 29 2e 6f 6e 0a 58 09 | 09 09 70 75 73 68 28 6c |]).on.X.|..push(l|
|00002170| 61 73 74 5f 6b 2c 20 6b | 29 0a 58 09 09 20 20 20 |ast_k, k|).X.. |
|00002180| 20 7d 0a 58 09 09 7d 0a | 58 09 20 20 20 20 7d 0a | }.X..}.|X. }.|
|00002190| 58 09 7d 0a 58 09 73 32 | 20 7c 7c 3a 3d 20 74 61 |X.}.X.s2| ||:= ta|
|000021a0| 62 28 30 29 0a 58 20 20 | 20 20 7d 0a 58 0a 58 20 |b(0).X | }.X.X |
|000021b0| 20 20 20 72 65 74 75 72 | 6e 20 73 32 0a 58 0a 58 | retur|n s2.X.X|
|000021c0| 65 6e 64 0a 53 48 41 52 | 5f 45 4f 46 0a 74 72 75 |end.SHAR|_EOF.tru|
|000021d0| 65 20 7c 7c 20 65 63 68 | 6f 20 27 72 65 73 74 6f |e || ech|o 'resto|
|000021e0| 72 65 20 6f 66 20 73 74 | 72 69 70 75 6e 62 2e 69 |re of st|ripunb.i|
|000021f0| 63 6e 20 66 61 69 6c 65 | 64 27 0a 72 6d 20 2d 66 |cn faile|d'.rm -f|
|00002200| 20 5f 73 68 61 72 5f 77 | 6e 74 5f 2e 74 6d 70 0a | _shar_w|nt_.tmp.|
|00002210| 66 69 0a 23 20 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |fi.# ===|========|
|00002220| 3d 3d 20 72 65 61 64 74 | 62 6c 2e 69 63 6e 20 3d |== readt|bl.icn =|
|00002230| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 0a 69 66 |========|=====.if|
|00002240| 20 74 65 73 74 20 2d 66 | 20 27 72 65 61 64 74 62 | test -f| 'readtb|
|00002250| 6c 2e 69 63 6e 27 20 2d | 61 20 58 22 24 31 22 20 |l.icn' -|a X"$1" |
|00002260| 21 3d 20 58 22 2d 63 22 | 3b 20 74 68 65 6e 0a 09 |!= X"-c"|; then..|
|00002270| 65 63 68 6f 20 27 78 20 | 2d 20 73 6b 69 70 70 69 |echo 'x |- skippi|
|00002280| 6e 67 20 72 65 61 64 74 | 62 6c 2e 69 63 6e 20 28 |ng readt|bl.icn (|
|00002290| 46 69 6c 65 20 61 6c 72 | 65 61 64 79 20 65 78 69 |File alr|eady exi|
|000022a0| 73 74 73 29 27 0a 09 72 | 6d 20 2d 66 20 5f 73 68 |sts)'..r|m -f _sh|
|000022b0| 61 72 5f 77 6e 74 5f 2e | 74 6d 70 0a 65 6c 73 65 |ar_wnt_.|tmp.else|
|000022c0| 0a 3e 20 5f 73 68 61 72 | 5f 77 6e 74 5f 2e 74 6d |.> _shar|_wnt_.tm|
|000022d0| 70 0a 65 63 68 6f 20 27 | 78 20 2d 20 65 78 74 72 |p.echo '|x - extr|
|000022e0| 61 63 74 69 6e 67 20 72 | 65 61 64 74 62 6c 2e 69 |acting r|eadtbl.i|
|000022f0| 63 6e 20 28 54 65 78 74 | 29 27 0a 73 65 64 20 27 |cn (Text|)'.sed '|
|00002300| 73 2f 5e 58 2f 2f 27 20 | 3c 3c 20 27 53 48 41 52 |s/^X//' |<< 'SHAR|
|00002310| 5f 45 4f 46 27 20 3e 20 | 27 72 65 61 64 74 62 6c |_EOF' > |'readtbl|
|00002320| 2e 69 63 6e 27 20 26 26 | 0a 58 23 23 23 23 23 23 |.icn' &&|.X######|
|00002330| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00002340| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00002350| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00002360| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00002370| 23 23 23 23 23 23 0a 58 | 23 0a 58 23 09 4e 61 6d |######.X|#.X#.Nam|
|00002380| 65 3a 09 20 72 65 61 64 | 74 62 6c 2e 69 63 6e 0a |e:. read|tbl.icn.|
|00002390| 58 23 0a 58 23 09 54 69 | 74 6c 65 3a 09 20 52 65 |X#.X#.Ti|tle:. Re|
|000023a0| 61 64 20 75 73 65 72 2d | 63 72 65 61 74 65 64 20 |ad user-|created |
|000023b0| 73 74 72 69 70 73 67 6d | 6c 20 74 61 62 6c 65 0a |stripsgm|l table.|
|000023c0| 58 23 0a 58 23 09 41 75 | 74 68 6f 72 3a 09 20 52 |X#.X#.Au|thor:. R|
|000023d0| 69 63 68 61 72 64 20 4c | 2e 20 47 6f 65 72 77 69 |ichard L|. Goerwi|
|000023e0| 74 7a 0a 58 23 0a 58 23 | 09 56 65 72 73 69 6f 6e |tz.X#.X#|.Version|
|000023f0| 3a 20 31 2e 31 0a 58 23 | 0a 58 23 23 23 23 23 23 |: 1.1.X#|.X######|
|00002400| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00002410| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00002420| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00002430| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00002440| 23 23 23 23 23 23 0a 58 | 23 20 20 0a 58 23 20 20 |######.X|# .X# |
|00002450| 54 68 69 73 20 66 69 6c | 65 20 69 73 20 70 61 72 |This fil|e is par|
|00002460| 74 20 6f 66 20 74 68 65 | 20 73 74 72 69 70 73 67 |t of the| stripsg|
|00002470| 6d 6c 20 70 61 63 6b 61 | 67 65 2e 20 20 49 74 20 |ml packa|ge. It |
|00002480| 64 6f 65 73 20 74 68 65 | 20 6a 6f 62 20 6f 66 20 |does the| job of |
|00002490| 72 65 61 64 2d 0a 58 23 | 20 20 69 6e 67 20 6f 70 |read-.X#| ing op|
|000024a0| 74 69 6f 6e 20 75 73 65 | 72 2d 63 72 65 61 74 65 |tion use|r-create|
|000024b0| 64 20 6d 61 70 70 69 6e | 67 20 69 6e 66 6f 72 6d |d mappin|g inform|
|000024c0| 61 74 69 6f 6e 20 66 72 | 6f 6d 20 61 20 66 69 6c |ation fr|om a fil|
|000024d0| 65 2e 20 20 54 68 65 20 | 70 75 72 70 6f 73 65 0a |e. The |purpose.|
|000024e0| 58 23 20 20 6f 66 20 74 | 68 69 73 20 66 69 6c 65 |X# of t|his file|
|000024f0| 20 69 73 20 74 6f 20 73 | 70 65 63 69 66 79 20 68 | is to s|pecify h|
|00002500| 6f 77 20 65 61 63 68 20 | 63 6f 64 65 20 69 6e 20 |ow each |code in |
|00002510| 61 20 67 69 76 65 6e 20 | 69 6e 70 75 74 20 74 65 |a given |input te|
|00002520| 78 74 20 73 68 6f 75 6c | 64 0a 58 23 20 20 62 65 |xt shoul|d.X# be|
|00002530| 20 74 72 61 6e 73 6c 61 | 74 65 64 2e 20 20 45 61 | transla|ted. Ea|
|00002540| 63 68 20 6c 69 6e 65 20 | 68 61 73 20 74 68 65 20 |ch line |has the |
|00002550| 66 6f 72 6d 3a 0a 58 23 | 0a 58 23 20 20 20 20 20 |form:.X#|.X# |
|00002560| 20 53 47 4d 4c 2d 64 65 | 73 69 67 6e 61 74 6f 72 | SGML-de|signator|
|00002570| 09 73 74 61 72 74 5f 63 | 6f 64 65 09 65 6e 64 5f |.start_c|ode.end_|
|00002580| 63 6f 64 65 0a 58 23 0a | 58 23 20 20 77 68 65 72 |code.X#.|X# wher|
|00002590| 65 20 74 68 65 20 53 47 | 4d 4c 20 64 65 73 69 67 |e the SG|ML desig|
|000025a0| 6e 61 74 6f 72 20 69 73 | 20 73 6f 6d 65 74 68 69 |nator is| somethi|
|000025b0| 6e 67 20 6c 69 6b 65 20 | 22 71 75 6f 74 65 22 20 |ng like |"quote" |
|000025c0| 28 77 69 74 68 6f 75 74 | 20 74 68 65 20 71 75 6f |(without| the quo|
|000025d0| 74 61 2d 0a 58 23 20 20 | 74 69 6f 6e 20 6d 61 72 |ta-.X# |tion mar|
|000025e0| 6b 73 29 2c 20 61 6e 64 | 20 74 68 65 20 73 74 61 |ks), and| the sta|
|000025f0| 72 74 20 61 6e 64 20 65 | 6e 64 20 63 6f 64 65 73 |rt and e|nd codes|
|00002600| 20 61 72 65 20 74 68 65 | 20 77 61 79 20 69 6e 20 | are the| way in |
|00002610| 77 68 69 63 68 20 79 6f | 75 20 77 61 6e 74 0a 58 |which yo|u want.X|
|00002620| 23 20 20 74 68 65 20 62 | 65 67 69 6e 6e 69 6e 67 |# the b|eginning|
|00002630| 20 61 6e 64 20 65 6e 64 | 20 6f 66 20 61 20 3c 71 | and end| of a <q|
|00002640| 75 6f 74 65 3e 2e 2e 2e | 3c 5c 71 75 6f 74 65 3e |uote>...|<\quote>|
|00002650| 20 73 65 71 75 65 6e 63 | 65 20 74 6f 20 62 65 20 | sequenc|e to be |
|00002660| 74 72 61 6e 73 6c 61 2d | 0a 58 23 20 20 74 65 64 |transla-|.X# ted|
|00002670| 2e 20 20 50 72 65 73 75 | 6d 61 62 6c 79 2c 20 69 |. Presu|mably, i|
|00002680| 6e 20 74 68 69 73 20 69 | 6e 73 74 61 6e 63 65 2c |n this i|nstance,|
|00002690| 20 79 6f 75 72 20 63 6f | 64 65 73 20 77 6f 75 6c | your co|des woul|
|000026a0| 64 20 69 6e 64 69 63 61 | 74 65 20 73 6f 6d 65 20 |d indica|te some |
|000026b0| 73 65 74 0a 58 23 20 20 | 6c 65 76 65 6c 20 6f 66 |set.X# |level of|
|000026c0| 20 69 6e 64 65 6e 74 61 | 74 69 6f 6e 2c 20 61 6e | indenta|tion, an|
|000026d0| 64 20 70 65 72 68 61 70 | 73 20 61 20 66 6f 6e 74 |d perhap|s a font|
|000026e0| 20 63 68 61 6e 67 65 2e | 20 20 49 66 20 79 6f 75 | change.| If you|
|000026f0| 20 64 6f 6e 27 74 20 68 | 61 76 65 20 61 6e 0a 58 | don't h|ave an.X|
|00002700| 23 20 20 65 6e 64 20 63 | 6f 64 65 20 66 6f 72 20 |# end c|ode for |
|00002710| 61 20 70 61 72 74 69 63 | 75 6c 61 72 20 53 47 4d |a partic|ular SGM|
|00002720| 4c 20 64 65 73 69 67 6e | 61 74 6f 72 2c 20 6a 75 |L design|ator, ju|
|00002730| 73 74 20 6c 65 61 76 65 | 20 69 74 20 62 6c 61 6e |st leave| it blan|
|00002740| 6b 2e 0a 58 23 0a 58 23 | 23 23 23 23 23 23 23 23 |k..X#.X#|########|
|00002750| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00002760| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00002770| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00002780| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00002790| 23 23 23 0a 58 23 0a 58 | 23 20 20 4c 69 6e 6b 73 |###.X#.X|# Links|
|000027a0| 3a 20 73 74 72 69 70 73 | 67 6d 6c 2e 69 63 6e 0a |: strips|gml.icn.|
|000027b0| 58 23 0a 58 23 23 23 23 | 23 23 23 23 23 23 23 23 |X#.X####|########|
|000027c0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|000027d0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|000027e0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|000027f0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00002800| 0a 58 0a 58 0a 58 70 72 | 6f 63 65 64 75 72 65 20 |.X.X.Xpr|ocedure |
|00002810| 72 65 61 64 74 62 6c 28 | 66 29 0a 58 0a 58 20 20 |readtbl(|f).X.X |
|00002820| 20 20 6c 6f 63 61 6c 20 | 74 2c 20 6c 69 6e 65 2c | local |t, line,|
|00002830| 20 6b 2c 20 6f 6e 5f 73 | 65 71 75 65 6e 63 65 2c | k, on_s|equence,|
|00002840| 20 6f 66 66 5f 73 65 71 | 75 65 6e 63 65 0a 58 0a | off_seq|uence.X.|
|00002850| 58 20 20 20 20 2f 66 20 | 26 20 73 74 6f 70 28 22 |X /f |& stop("|
|00002860| 72 65 61 64 74 62 6c 3a | 20 20 41 72 67 20 6d 75 |readtbl:| Arg mu|
|00002870| 73 74 20 62 65 20 61 20 | 76 61 6c 69 64 20 6f 70 |st be a |valid op|
|00002880| 65 6e 20 66 69 6c 65 2e | 22 29 0a 58 0a 58 20 20 |en file.|").X.X |
|00002890| 20 20 74 20 3a 3d 20 74 | 61 62 6c 65 28 29 0a 58 | t := t|able().X|
|000028a0| 0a 58 20 20 20 20 65 76 | 65 72 79 20 6c 69 6e 65 |.X ev|ery line|
|000028b0| 20 3a 3d 20 74 72 69 6d | 28 21 66 2c 27 5c 74 20 | := trim|(!f,'\t |
|000028c0| 27 29 20 64 6f 20 7b 0a | 58 09 6c 69 6e 65 20 3f |') do {.|X.line ?|
|000028d0| 20 7b 0a 58 09 20 20 20 | 20 6b 20 3a 3d 20 74 61 | {.X. | k := ta|
|000028e0| 62 73 6c 61 73 68 75 70 | 74 6f 28 27 5c 74 3a 27 |bslashup|to('\t:'|
|000028f0| 29 20 26 0a 58 09 20 20 | 20 20 74 61 62 28 6d 61 |) &.X. | tab(ma|
|00002900| 6e 79 28 27 5c 74 3a 27 | 29 29 20 26 0a 58 09 20 |ny('\t:'|)) &.X. |
|00002910| 20 20 20 6f 6e 5f 73 65 | 71 75 65 6e 63 65 20 3a | on_se|quence :|
|00002920| 3d 20 74 61 62 73 6c 61 | 73 68 75 70 74 6f 28 27 |= tabsla|shupto('|
|00002930| 5c 74 3a 27 29 20 7c 20 | 74 61 62 28 30 29 0a 58 |\t:') | |tab(0).X|
|00002940| 09 20 20 20 20 74 61 62 | 28 6d 61 6e 79 28 27 5c |. tab|(many('\|
|00002950| 74 3a 27 29 29 0a 58 09 | 20 20 20 20 6f 66 66 5f |t:')).X.| off_|
|00002960| 73 65 71 75 65 6e 63 65 | 20 3a 3d 20 74 61 62 28 |sequence| := tab(|
|00002970| 30 29 0a 58 09 7d 20 7c | 20 73 74 6f 70 28 22 72 |0).X.} || stop("r|
|00002980| 65 61 64 74 62 6c 3a 20 | 20 42 61 64 20 6d 61 70 |eadtbl: | Bad map|
|00002990| 20 66 69 6c 65 20 66 6f | 72 6d 61 74 2e 22 29 0a | file fo|rmat.").|
|000029a0| 58 09 69 6e 73 65 72 74 | 28 74 2c 20 6b 2c 20 6f |X.insert|(t, k, o|
|000029b0| 75 74 73 74 72 28 6f 6e | 5f 73 65 71 75 65 6e 63 |utstr(on|_sequenc|
|000029c0| 65 2c 20 6f 66 66 5f 73 | 65 71 75 65 6e 63 65 29 |e, off_s|equence)|
|000029d0| 29 0a 58 20 20 20 20 7d | 0a 58 0a 58 20 20 20 20 |).X }|.X.X |
|000029e0| 72 65 74 75 72 6e 20 74 | 0a 58 0a 58 65 6e 64 0a |return t|.X.Xend.|
|000029f0| 58 0a 58 0a 58 0a 58 70 | 72 6f 63 65 64 75 72 65 |X.X.X.Xp|rocedure|
|00002a00| 20 74 61 62 73 6c 61 73 | 68 75 70 74 6f 28 63 2c | tabslas|hupto(c,|
|00002a10| 73 29 0a 58 0a 58 20 20 | 20 20 50 4f 53 20 3a 3d |s).X.X | POS :=|
|00002a20| 20 26 70 6f 73 0a 58 0a | 58 20 20 20 20 77 68 69 | &pos.X.|X whi|
|00002a30| 6c 65 20 74 61 62 28 75 | 70 74 6f 28 27 5c 5c 27 |le tab(u|pto('\\'|
|00002a40| 20 2b 2b 20 63 29 29 20 | 64 6f 20 7b 0a 58 09 69 | ++ c)) |do {.X.i|
|00002a50| 66 20 3d 22 5c 5c 22 20 | 74 68 65 6e 20 7b 0a 58 |f ="\\" |then {.X|
|00002a60| 09 20 20 20 20 6d 6f 76 | 65 28 31 29 0a 58 09 20 |. mov|e(1).X. |
|00002a70| 20 20 20 6e 65 78 74 0a | 58 09 7d 0a 58 09 65 6c | next.|X.}.X.el|
|00002a80| 73 65 20 7b 0a 58 09 20 | 20 20 20 69 66 20 61 6e |se {.X. | if an|
|00002a90| 79 28 63 29 20 74 68 65 | 6e 20 7b 0a 58 09 09 73 |y(c) the|n {.X..s|
|00002aa0| 75 73 70 65 6e 64 20 26 | 73 75 62 6a 65 63 74 5b |uspend &|subject[|
|00002ab0| 50 4f 53 3a 2e 26 70 6f | 73 5d 0a 58 09 20 20 20 |POS:.&po|s].X. |
|00002ac0| 20 7d 0a 58 09 7d 0a 58 | 20 20 20 20 7d 0a 58 0a | }.X.}.X| }.X.|
|00002ad0| 58 20 20 20 20 26 70 6f | 73 20 3a 3d 20 50 4f 53 |X &po|s := POS|
|00002ae0| 0a 58 20 20 20 20 66 61 | 69 6c 0a 58 0a 58 65 6e |.X fa|il.X.Xen|
|00002af0| 64 0a 53 48 41 52 5f 45 | 4f 46 0a 74 72 75 65 20 |d.SHAR_E|OF.true |
|00002b00| 7c 7c 20 65 63 68 6f 20 | 27 72 65 73 74 6f 72 65 ||| echo |'restore|
|00002b10| 20 6f 66 20 72 65 61 64 | 74 62 6c 2e 69 63 6e 20 | of read|tbl.icn |
|00002b20| 66 61 69 6c 65 64 27 0a | 72 6d 20 2d 66 20 5f 73 |failed'.|rm -f _s|
|00002b30| 68 61 72 5f 77 6e 74 5f | 2e 74 6d 70 0a 66 69 0a |har_wnt_|.tmp.fi.|
|00002b40| 23 20 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 20 |# ======|======= |
|00002b50| 73 6c 61 73 68 62 61 6c | 2e 69 63 6e 20 3d 3d 3d |slashbal|.icn ===|
|00002b60| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 0a 69 66 20 74 |========|===.if t|
|00002b70| 65 73 74 20 2d 66 20 27 | 73 6c 61 73 68 62 61 6c |est -f '|slashbal|
|00002b80| 2e 69 63 6e 27 20 2d 61 | 20 58 22 24 31 22 20 21 |.icn' -a| X"$1" !|
|00002b90| 3d 20 58 22 2d 63 22 3b | 20 74 68 65 6e 0a 09 65 |= X"-c";| then..e|
|00002ba0| 63 68 6f 20 27 78 20 2d | 20 73 6b 69 70 70 69 6e |cho 'x -| skippin|
|00002bb0| 67 20 73 6c 61 73 68 62 | 61 6c 2e 69 63 6e 20 28 |g slashb|al.icn (|
|00002bc0| 46 69 6c 65 20 61 6c 72 | 65 61 64 79 20 65 78 69 |File alr|eady exi|
|00002bd0| 73 74 73 29 27 0a 09 72 | 6d 20 2d 66 20 5f 73 68 |sts)'..r|m -f _sh|
|00002be0| 61 72 5f 77 6e 74 5f 2e | 74 6d 70 0a 65 6c 73 65 |ar_wnt_.|tmp.else|
|00002bf0| 0a 3e 20 5f 73 68 61 72 | 5f 77 6e 74 5f 2e 74 6d |.> _shar|_wnt_.tm|
|00002c00| 70 0a 65 63 68 6f 20 27 | 78 20 2d 20 65 78 74 72 |p.echo '|x - extr|
|00002c10| 61 63 74 69 6e 67 20 73 | 6c 61 73 68 62 61 6c 2e |acting s|lashbal.|
|00002c20| 69 63 6e 20 28 54 65 78 | 74 29 27 0a 73 65 64 20 |icn (Tex|t)'.sed |
|00002c30| 27 73 2f 5e 58 2f 2f 27 | 20 3c 3c 20 27 53 48 41 |'s/^X//'| << 'SHA|
|00002c40| 52 5f 45 4f 46 27 20 3e | 20 27 73 6c 61 73 68 62 |R_EOF' >| 'slashb|
|00002c50| 61 6c 2e 69 63 6e 27 20 | 26 26 0a 58 23 23 23 23 |al.icn' |&&.X####|
|00002c60| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00002c70| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00002c80| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00002c90| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00002ca0| 23 23 23 23 23 23 23 23 | 0a 58 23 0a 58 23 09 4e |########|.X#.X#.N|
|00002cb0| 61 6d 65 3a 09 20 73 6c | 61 73 68 62 61 6c 2e 69 |ame:. sl|ashbal.i|
|00002cc0| 63 6e 0a 58 23 0a 58 23 | 09 54 69 74 6c 65 3a 09 |cn.X#.X#|.Title:.|
|00002cd0| 20 42 61 6c 28 29 20 77 | 69 74 68 20 62 61 63 6b | Bal() w|ith back|
|00002ce0| 73 6c 61 73 68 20 65 73 | 63 61 70 69 6e 67 0a 58 |slash es|caping.X|
|00002cf0| 23 0a 58 23 09 41 75 74 | 68 6f 72 3a 09 20 52 69 |#.X#.Aut|hor:. Ri|
|00002d00| 63 68 61 72 64 20 4c 2e | 20 47 6f 65 72 77 69 74 |chard L.| Goerwit|
|00002d10| 7a 0a 58 23 0a 58 23 09 | 56 65 72 73 69 6f 6e 3a |z.X#.X#.|Version:|
|00002d20| 20 31 2e 38 0a 58 23 0a | 58 23 23 23 23 23 23 23 | 1.8.X#.|X#######|
|00002d30| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00002d40| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00002d50| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00002d60| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00002d70| 23 23 23 23 23 0a 58 23 | 0a 58 23 20 20 49 20 61 |#####.X#|.X# I a|
|00002d80| 6d 20 6f 66 74 65 6e 20 | 66 72 75 73 74 72 61 74 |m often |frustrat|
|00002d90| 65 64 20 61 74 20 62 61 | 6c 28 29 27 73 20 69 6e |ed at ba|l()'s in|
|00002da0| 61 62 69 6c 69 74 79 20 | 74 6f 20 64 65 61 6c 20 |ability |to deal |
|00002db0| 65 6c 65 67 61 6e 74 6c | 79 20 77 69 74 68 0a 58 |elegantl|y with.X|
|00002dc0| 23 20 20 74 68 65 20 63 | 6f 6d 6d 6f 6e 20 5c 62 |# the c|ommon \b|
|00002dd0| 61 63 6b 73 6c 61 73 68 | 20 65 73 63 61 70 69 6e |ackslash| escapin|
|00002de0| 67 20 63 6f 6e 76 65 6e | 74 69 6f 6e 20 28 61 20 |g conven|tion (a |
|00002df0| 77 61 79 20 6f 66 20 74 | 65 6c 6c 69 6e 67 20 55 |way of t|elling U|
|00002e00| 6e 69 78 0a 58 23 20 20 | 42 6f 75 72 6e 65 20 61 |nix.X# |Bourne a|
|00002e10| 6e 64 20 43 20 73 68 65 | 6c 6c 73 2c 20 66 6f 72 |nd C she|lls, for|
|00002e20| 20 69 6e 73 74 61 6e 63 | 65 2c 20 6e 6f 74 20 74 | instanc|e, not t|
|00002e30| 6f 20 69 6e 74 65 72 70 | 72 65 74 20 61 20 67 69 |o interp|ret a gi|
|00002e40| 76 65 6e 0a 58 23 20 20 | 63 68 61 72 61 63 74 65 |ven.X# |characte|
|00002e50| 72 20 61 73 20 61 20 22 | 6d 65 74 61 63 68 61 72 |r as a "|metachar|
|00002e60| 61 63 74 65 72 22 29 2e | 20 20 49 20 72 65 63 6f |acter").| I reco|
|00002e70| 67 6e 69 7a 65 20 74 68 | 61 74 20 62 61 6c 28 29 |gnize th|at bal()|
|00002e80| 27 73 20 67 65 6e 65 72 | 69 63 0a 58 23 20 20 62 |'s gener|ic.X# b|
|00002e90| 65 68 61 76 69 6f 72 20 | 69 73 20 61 20 6d 75 73 |ehavior |is a mus|
|00002ea0| 74 2c 20 61 6e 64 20 73 | 6f 20 49 20 77 72 6f 74 |t, and s|o I wrot|
|00002eb0| 65 20 73 6c 61 73 68 62 | 61 6c 28 29 20 74 6f 20 |e slashb|al() to |
|00002ec0| 66 69 6c 6c 20 74 68 65 | 20 67 61 70 2e 0a 58 23 |fill the| gap..X#|
|00002ed0| 0a 58 23 20 20 53 6c 61 | 73 68 62 61 6c 20 62 65 |.X# Sla|shbal be|
|00002ee0| 68 61 76 65 73 20 6c 69 | 6b 65 20 62 61 6c 2c 20 |haves li|ke bal, |
|00002ef0| 65 78 63 65 70 74 20 74 | 68 61 74 20 69 74 20 69 |except t|hat it i|
|00002f00| 67 6e 6f 72 65 73 2c 20 | 66 6f 72 20 70 75 72 70 |gnores, |for purp|
|00002f10| 6f 73 65 73 20 6f 66 0a | 58 23 20 20 62 61 6c 61 |oses of.|X# bala|
|00002f20| 6e 63 69 6e 67 2c 20 61 | 6e 79 20 63 32 2f 63 33 |ncing, a|ny c2/c3|
|00002f30| 20 63 68 61 72 20 77 68 | 69 63 68 20 69 73 20 70 | char wh|ich is p|
|00002f40| 72 65 63 65 64 65 64 20 | 62 79 20 61 20 62 61 63 |receded |by a bac|
|00002f50| 6b 73 6c 61 73 68 2e 20 | 20 4e 6f 74 65 0a 58 23 |kslash. | Note.X#|
|00002f60| 20 20 74 68 61 74 20 77 | 65 20 61 72 65 20 74 61 | that w|e are ta|
|00002f70| 6c 6b 69 6e 67 20 61 62 | 6f 75 74 20 69 6e 74 65 |lking ab|out inte|
|00002f80| 72 6e 61 6c 6c 79 20 72 | 65 70 72 65 73 65 6e 74 |rnally r|epresent|
|00002f90| 65 64 20 62 61 63 6b 73 | 6c 61 73 68 65 73 2c 20 |ed backs|lashes, |
|00002fa0| 61 6e 64 0a 58 23 20 20 | 6e 6f 74 20 6e 65 63 65 |and.X# |not nece|
|00002fb0| 73 73 61 72 69 6c 79 20 | 74 68 65 20 62 61 63 6b |ssarily |the back|
|00002fc0| 73 6c 61 73 68 65 73 20 | 75 73 65 64 20 69 6e 20 |slashes |used in |
|00002fd0| 49 63 6f 6e 20 73 74 72 | 69 6e 67 20 6c 69 74 65 |Icon str|ing lite|
|00002fe0| 72 61 6c 73 2e 20 20 49 | 66 0a 58 23 20 20 79 6f |rals. I|f.X# yo|
|00002ff0| 75 20 68 61 76 65 20 22 | 5c 28 22 20 69 6e 20 79 |u have "|\(" in y|
|00003000| 6f 75 72 20 73 6f 75 72 | 63 65 20 63 6f 64 65 2c |our sour|ce code,|
|00003010| 20 74 68 65 20 73 74 72 | 69 6e 67 20 70 72 6f 64 | the str|ing prod|
|00003020| 75 63 65 64 20 77 69 6c | 6c 20 68 61 76 65 20 6e |uced wil|l have n|
|00003030| 6f 0a 58 23 20 20 62 61 | 63 6b 73 6c 61 73 68 2e |o.X# ba|ckslash.|
|00003040| 20 20 54 6f 20 67 65 74 | 20 74 68 69 73 20 65 66 | To get| this ef|
|00003050| 66 65 63 74 2c 20 79 6f | 75 20 77 6f 75 6c 64 20 |fect, yo|u would |
|00003060| 6e 65 65 64 20 74 6f 20 | 77 72 69 74 65 20 22 5c |need to |write "\|
|00003070| 5c 28 2e 22 0a 58 23 0a | 58 23 20 20 42 55 47 53 |\(.".X#.|X# BUGS|
|00003080| 3a 20 20 4e 6f 74 65 20 | 74 68 61 74 2c 20 6c 69 |: Note |that, li|
|00003090| 6b 65 20 62 61 6c 28 29 | 20 28 76 38 29 2c 20 73 |ke bal()| (v8), s|
|000030a0| 6c 61 73 68 62 61 6c 28 | 29 20 63 61 6e 6e 6f 74 |lashbal(|) cannot|
|000030b0| 20 63 6f 72 72 65 63 74 | 6c 79 0a 58 23 20 20 68 | correct|ly.X# h|
|000030c0| 61 6e 64 6c 65 20 63 61 | 73 65 73 20 77 68 65 72 |andle ca|ses wher|
|000030d0| 65 20 63 32 20 61 6e 64 | 20 63 33 20 69 6e 74 65 |e c2 and| c3 inte|
|000030e0| 72 73 65 63 74 2e 0a 58 | 23 0a 58 23 23 23 23 23 |rsect..X|#.X#####|
|000030f0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00003100| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00003110| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|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 0a | 58 23 0a 58 23 20 20 4c |#######.|X#.X# L|
|00003140| 69 6e 6b 73 3a 20 6e 6f | 6e 65 0a 58 23 0a 58 23 |inks: no|ne.X#.X#|
|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 23 | 23 23 23 23 23 23 23 23 |########|########|
|00003170| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00003180| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00003190| 23 23 23 23 23 23 23 23 | 23 23 23 0a 58 0a 58 70 |########|###.X.Xp|
|000031a0| 72 6f 63 65 64 75 72 65 | 20 73 6c 61 73 68 62 61 |rocedure| slashba|
|000031b0| 6c 28 63 31 2c 20 63 32 | 2c 20 63 33 2c 20 73 2c |l(c1, c2|, c3, s,|
|000031c0| 20 69 2c 20 6a 29 0a 58 | 0a 58 20 20 20 20 6c 6f | i, j).X|.X lo|
|000031d0| 63 61 6c 20 74 77 6f 63 | 73 2c 20 61 6c 6c 63 73 |cal twoc|s, allcs|
|000031e0| 2c 20 63 68 72 32 2c 20 | 63 6f 75 6e 74 0a 58 0a |, chr2, |count.X.|
|000031f0| 58 20 20 20 20 2f 63 31 | 20 3a 3d 20 26 63 73 65 |X /c1| := &cse|
|00003200| 74 0a 58 20 20 20 20 2f | 63 32 20 3a 3d 20 27 28 |t.X /|c2 := '(|
|00003210| 27 0a 58 20 20 20 20 2f | 63 33 20 3a 3d 20 27 29 |'.X /|c3 := ')|
|00003220| 27 0a 58 20 20 20 20 74 | 77 6f 63 73 20 3a 3d 20 |'.X t|wocs := |
|00003230| 63 32 20 2b 2b 20 63 33 | 0a 58 20 20 20 20 61 6c |c2 ++ c3|.X al|
|00003240| 6c 63 73 20 3a 3d 20 63 | 31 20 2b 2b 20 63 32 20 |lcs := c|1 ++ c2 |
|00003250| 2b 2b 20 63 33 20 2b 2b | 20 27 5c 5c 27 0a 58 0a |++ c3 ++| '\\'.X.|
|00003260| 58 20 20 20 20 2f 73 20 | 3a 3d 20 5c 26 73 75 62 |X /s |:= \&sub|
|00003270| 6a 65 63 74 20 7c 20 73 | 74 6f 70 28 22 73 6c 61 |ject | s|top("sla|
|00003280| 73 68 62 61 6c 3a 20 20 | 4e 6f 20 73 74 72 69 6e |shbal: |No strin|
|00003290| 67 20 61 72 67 75 6d 65 | 6e 74 2e 22 29 0a 58 20 |g argume|nt.").X |
|000032a0| 20 20 20 69 66 20 5c 69 | 20 74 68 65 6e 20 7b 0a | if \i| then {.|
|000032b0| 58 09 69 66 20 69 20 3c | 20 31 20 74 68 65 6e 0a |X.if i <| 1 then.|
|000032c0| 58 09 20 20 20 20 69 20 | 3a 3d 20 2a 73 20 2b 20 |X. i |:= *s + |
|000032d0| 28 69 2b 31 29 0a 58 20 | 20 20 20 7d 0a 58 20 20 |(i+1).X | }.X |
|000032e0| 20 20 65 6c 73 65 20 69 | 20 3a 3d 20 5c 26 70 6f | else i| := \&po|
|000032f0| 73 20 7c 20 31 0a 58 20 | 20 20 20 69 66 20 5c 6a |s | 1.X | if \j|
|00003300| 20 74 68 65 6e 20 7b 0a | 58 09 69 66 20 6a 20 3c | then {.|X.if j <|
|00003310| 20 31 20 74 68 65 6e 0a | 58 09 20 20 20 20 6a 20 | 1 then.|X. j |
|00003320| 3a 3d 20 2a 73 20 2b 20 | 28 6a 2b 31 29 0a 58 20 |:= *s + |(j+1).X |
|00003330| 20 20 20 7d 0a 58 20 20 | 20 20 65 6c 73 65 20 6a | }.X | else j|
|00003340| 20 3a 3d 20 2a 73 20 2b | 20 31 0a 58 0a 58 20 20 | := *s +| 1.X.X |
|00003350| 20 20 63 6f 75 6e 74 20 | 3a 3d 20 30 0a 58 20 20 | count |:= 0.X |
|00003360| 20 20 73 20 3f 20 7b 0a | 58 09 77 68 69 6c 65 20 | s ? {.|X.while |
|00003370| 74 61 62 28 75 70 74 6f | 28 61 6c 6c 63 73 29 29 |tab(upto|(allcs))|
|00003380| 20 64 6f 20 7b 0a 58 09 | 20 20 20 20 63 68 72 20 | do {.X.| chr |
|00003390| 3a 3d 20 6d 6f 76 65 28 | 31 29 0a 58 09 20 20 20 |:= move(|1).X. |
|000033a0| 20 26 70 6f 73 20 3e 20 | 6a 20 26 20 66 61 69 6c | &pos > |j & fail|
|000033b0| 0a 58 09 20 20 20 20 69 | 66 20 63 68 72 20 3d 3d |.X. i|f chr ==|
|000033c0| 20 22 5c 5c 22 20 26 20 | 61 6e 79 28 74 77 6f 63 | "\\" & |any(twoc|
|000033d0| 73 29 20 74 68 65 6e 20 | 7b 0a 58 09 09 63 68 72 |s) then |{.X..chr|
|000033e0| 32 20 3a 3d 20 6d 6f 76 | 65 28 31 29 0a 58 09 09 |2 := mov|e(1).X..|
|000033f0| 26 70 6f 73 20 3e 20 6a | 20 26 20 66 61 69 6c 0a |&pos > j| & fail.|
|00003400| 58 09 09 26 70 6f 73 20 | 3e 20 69 20 7c 20 6e 65 |X..&pos |> i | ne|
|00003410| 78 74 0a 58 09 09 69 66 | 20 61 6e 79 28 63 31 2c |xt.X..if| any(c1,|
|00003420| 20 63 68 72 29 20 26 20 | 63 6f 75 6e 74 20 3d 20 | chr) & |count = |
|00003430| 30 20 74 68 65 6e 0a 58 | 09 09 20 20 20 20 73 75 |0 then.X|.. su|
|00003440| 73 70 65 6e 64 20 2e 26 | 70 6f 73 20 2d 20 32 0a |spend .&|pos - 2.|
|00003450| 58 09 09 69 66 20 61 6e | 79 28 63 31 2c 20 63 68 |X..if an|y(c1, ch|
|00003460| 72 32 29 20 26 20 63 6f | 75 6e 74 20 3d 20 30 20 |r2) & co|unt = 0 |
|00003470| 74 68 65 6e 0a 58 09 09 | 20 20 20 20 73 75 73 70 |then.X..| susp|
|00003480| 65 6e 64 20 2e 26 70 6f | 73 20 2d 20 31 0a 58 09 |end .&po|s - 1.X.|
|00003490| 20 20 20 20 7d 0a 58 09 | 20 20 20 20 65 6c 73 65 | }.X.| else|
|000034a0| 20 7b 0a 58 09 09 26 70 | 6f 73 20 3e 20 6a 20 26 | {.X..&p|os > j &|
|000034b0| 20 66 61 69 6c 0a 58 09 | 09 69 66 20 61 6e 79 28 | fail.X.|.if any(|
|000034c0| 63 31 2c 20 63 68 72 29 | 20 26 20 63 6f 75 6e 74 |c1, chr)| & count|
|000034d0| 20 3d 20 30 20 74 68 65 | 6e 20 7b 0a 58 09 09 20 | = 0 the|n {.X.. |
|000034e0| 20 20 20 26 70 6f 73 20 | 3e 20 69 20 7c 20 6e 65 | &pos |> i | ne|
|000034f0| 78 74 0a 58 09 09 20 20 | 20 20 73 75 73 70 65 6e |xt.X.. | suspen|
|00003500| 64 20 2e 26 70 6f 73 20 | 2d 20 31 0a 58 09 09 7d |d .&pos |- 1.X..}|
|00003510| 0a 58 09 09 69 66 20 61 | 6e 79 28 63 32 2c 20 63 |.X..if a|ny(c2, c|
|00003520| 68 72 29 20 74 68 65 6e | 0a 58 09 09 20 20 20 20 |hr) then|.X.. |
|00003530| 63 6f 75 6e 74 20 2b 3a | 3d 20 31 0a 58 09 09 65 |count +:|= 1.X..e|
|00003540| 6c 73 65 20 69 66 20 61 | 6e 79 28 63 33 2c 20 63 |lse if a|ny(c3, c|
|00003550| 68 72 29 20 26 20 63 6f | 75 6e 74 20 3e 20 30 20 |hr) & co|unt > 0 |
|00003560| 74 68 65 6e 0a 58 09 09 | 20 20 20 20 63 6f 75 6e |then.X..| coun|
|00003570| 74 20 2d 3a 3d 20 31 0a | 58 09 20 20 20 20 7d 0a |t -:= 1.|X. }.|
|00003580| 58 09 7d 0a 58 20 20 20 | 20 7d 0a 58 0a 58 65 6e |X.}.X | }.X.Xen|
|00003590| 64 0a 53 48 41 52 5f 45 | 4f 46 0a 74 72 75 65 20 |d.SHAR_E|OF.true |
|000035a0| 7c 7c 20 65 63 68 6f 20 | 27 72 65 73 74 6f 72 65 ||| echo |'restore|
|000035b0| 20 6f 66 20 73 6c 61 73 | 68 62 61 6c 2e 69 63 6e | of slas|hbal.icn|
|000035c0| 20 66 61 69 6c 65 64 27 | 0a 72 6d 20 2d 66 20 5f | failed'|.rm -f _|
|000035d0| 73 68 61 72 5f 77 6e 74 | 5f 2e 74 6d 70 0a 66 69 |shar_wnt|_.tmp.fi|
|000035e0| 0a 23 20 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |.# =====|========|
|000035f0| 20 52 45 41 44 4d 45 20 | 3d 3d 3d 3d 3d 3d 3d 3d | README |========|
|00003600| 3d 3d 3d 3d 3d 3d 0a 69 | 66 20 74 65 73 74 20 2d |======.i|f test -|
|00003610| 66 20 27 52 45 41 44 4d | 45 27 20 2d 61 20 58 22 |f 'READM|E' -a X"|
|00003620| 24 31 22 20 21 3d 20 58 | 22 2d 63 22 3b 20 74 68 |$1" != X|"-c"; th|
|00003630| 65 6e 0a 09 65 63 68 6f | 20 27 78 20 2d 20 73 6b |en..echo| 'x - sk|
|00003640| 69 70 70 69 6e 67 20 52 | 45 41 44 4d 45 20 28 46 |ipping R|EADME (F|
|00003650| 69 6c 65 20 61 6c 72 65 | 61 64 79 20 65 78 69 73 |ile alre|ady exis|
|00003660| 74 73 29 27 0a 09 72 6d | 20 2d 66 20 5f 73 68 61 |ts)'..rm| -f _sha|
|00003670| 72 5f 77 6e 74 5f 2e 74 | 6d 70 0a 65 6c 73 65 0a |r_wnt_.t|mp.else.|
|00003680| 3e 20 5f 73 68 61 72 5f | 77 6e 74 5f 2e 74 6d 70 |> _shar_|wnt_.tmp|
|00003690| 0a 65 63 68 6f 20 27 78 | 20 2d 20 65 78 74 72 61 |.echo 'x| - extra|
|000036a0| 63 74 69 6e 67 20 52 45 | 41 44 4d 45 20 28 54 65 |cting RE|ADME (Te|
|000036b0| 78 74 29 27 0a 73 65 64 | 20 27 73 2f 5e 58 2f 2f |xt)'.sed| 's/^X//|
|000036c0| 27 20 3c 3c 20 27 53 48 | 41 52 5f 45 4f 46 27 20 |' << 'SH|AR_EOF' |
|000036d0| 3e 20 27 52 45 41 44 4d | 45 27 20 26 26 0a 58 0a |> 'READM|E' &&.X.|
|000036e0| 58 52 65 3a 20 20 73 74 | 72 69 70 73 67 6d 6c 2e |XRe: st|ripsgml.|
|000036f0| 69 63 6e 20 26 20 61 73 | 73 6f 63 69 61 74 65 64 |icn & as|sociated|
|00003700| 20 66 69 6c 65 73 0a 58 | 0a 58 54 68 69 73 20 70 | files.X|.XThis p|
|00003710| 72 6f 67 72 61 6d 20 69 | 73 20 64 6f 63 75 6d 65 |rogram i|s docume|
|00003720| 6e 74 65 64 20 69 6e 20 | 74 68 65 20 76 61 72 69 |nted in |the vari|
|00003730| 6f 75 73 20 73 6f 75 72 | 63 65 20 66 69 6c 65 73 |ous sour|ce files|
|00003740| 2c 20 6d 6f 73 74 20 6e | 6f 74 61 62 6c 79 0a 58 |, most n|otably.X|
|00003750| 73 74 72 69 70 73 67 6d | 6c 2e 69 63 6e 2e 20 20 |stripsgm|l.icn. |
|00003760| 50 6c 65 61 73 65 20 6c | 6f 6f 6b 20 74 68 65 6d |Please l|ook them|
|00003770| 20 6f 76 65 72 2c 20 65 | 76 65 6e 20 69 66 20 79 | over, e|ven if y|
|00003780| 6f 75 20 61 72 65 20 6e | 6f 74 20 61 6e 20 49 63 |ou are n|ot an Ic|
|00003790| 6f 6e 0a 58 70 72 6f 67 | 72 61 6d 6d 65 72 2e 0a |on.Xprog|rammer..|
|000037a0| 58 0a 58 49 6e 20 6f 72 | 64 65 72 20 74 6f 20 63 |X.XIn or|der to c|
|000037b0| 6f 6d 70 69 6c 65 20 74 | 68 69 73 20 70 72 6f 67 |ompile t|his prog|
|000037c0| 72 61 6d 2c 20 79 6f 75 | 20 77 69 6c 6c 20 6e 65 |ram, you| will ne|
|000037d0| 65 64 20 61 6e 20 49 63 | 6f 6e 20 69 6e 74 65 72 |ed an Ic|on inter|
|000037e0| 70 72 65 74 65 72 0a 58 | 28 6f 72 20 63 6f 6d 70 |preter.X|(or comp|
|000037f0| 69 6c 65 72 29 2e 20 20 | 49 66 20 79 6f 75 20 64 |iler). |If you d|
|00003800| 6f 20 6e 6f 74 20 68 61 | 76 65 20 69 74 2c 20 67 |o not ha|ve it, g|
|00003810| 65 74 20 69 74 2e 20 20 | 49 74 20 69 73 20 66 72 |et it. |It is fr|
|00003820| 65 65 2c 20 61 6e 64 20 | 63 61 6e 20 62 65 0a 58 |ee, and |can be.X|
|00003830| 6f 62 74 61 69 6e 65 64 | 20 76 69 61 20 66 74 70 |obtained| via ftp|
|00003840| 20 66 72 6f 6d 20 63 73 | 2e 61 72 69 7a 6f 6e 61 | from cs|.arizona|
|00003850| 2e 65 64 75 2e 20 20 49 | 66 20 79 6f 75 20 64 6f |.edu. I|f you do|
|00003860| 20 6e 6f 74 20 68 61 76 | 65 20 61 63 63 65 73 73 | not hav|e access|
|00003870| 20 74 6f 0a 58 74 68 65 | 20 69 6e 74 65 72 6e 65 | to.Xthe| interne|
|00003880| 74 2c 20 64 72 6f 70 20 | 61 20 6c 69 6e 65 20 74 |t, drop |a line t|
|00003890| 6f 20 74 68 65 20 69 63 | 6f 6e 2d 70 72 6f 6a 65 |o the ic|on-proje|
|000038a0| 63 74 40 61 72 69 7a 6f | 6e 61 2e 65 64 75 2c 20 |ct@arizo|na.edu, |
|000038b0| 61 6e 64 20 74 68 65 79 | 0a 58 77 69 6c 6c 20 66 |and they|.Xwill f|
|000038c0| 69 6c 6c 20 79 6f 75 20 | 69 6e 20 6f 6e 20 77 68 |ill you |in on wh|
|000038d0| 61 74 20 74 6f 20 64 6f | 2e 0a 58 0a 58 49 66 20 |at to do|..X.XIf |
|000038e0| 79 6f 75 20 61 72 65 20 | 77 6f 72 6b 69 6e 67 20 |you are |working |
|000038f0| 6f 6e 20 61 20 55 6e 69 | 78 20 73 79 73 74 65 6d |on a Uni|x system|
|00003900| 2c 20 79 6f 75 20 63 61 | 6e 20 73 69 6d 70 6c 79 |, you ca|n simply|
|00003910| 20 6d 76 20 4d 61 6b 65 | 66 69 6c 65 2e 64 69 73 | mv Make|file.dis|
|00003920| 74 0a 58 74 6f 20 4d 61 | 6b 65 66 69 6c 65 2c 20 |t.Xto Ma|kefile, |
|00003930| 61 6e 64 20 74 68 65 6e | 20 6d 61 6b 65 2e 20 20 |and then| make. |
|00003940| 55 73 65 72 73 20 6f 6e | 20 6f 74 68 65 72 20 73 |Users on| other s|
|00003950| 79 73 74 65 6d 73 20 77 | 69 6c 6c 20 6e 65 65 64 |ystems w|ill need|
|00003960| 20 74 6f 20 74 79 70 65 | 3a 0a 58 0a 58 20 20 20 | to type|:.X.X |
|00003970| 20 20 69 63 6f 6e 74 20 | 2d 6f 20 73 74 72 69 70 | icont |-o strip|
|00003980| 73 67 6d 6c 20 72 65 61 | 64 74 62 6c 2e 69 63 6e |sgml rea|dtbl.icn|
|00003990| 20 73 6c 61 73 68 62 61 | 6c 2e 69 63 6e 20 73 74 | slashba|l.icn st|
|000039a0| 72 69 70 73 67 6d 6c 2e | 69 63 6e 20 73 74 72 69 |ripsgml.|icn stri|
|000039b0| 70 75 6e 62 2e 69 63 6e | 0a 58 0a 58 41 73 20 49 |punb.icn|.X.XAs I|
|000039c0| 20 73 61 69 64 20 61 62 | 6f 76 65 2c 20 73 65 65 | said ab|ove, see|
|000039d0| 20 74 68 65 20 66 69 6c | 65 20 73 74 72 69 70 73 | the fil|e strips|
|000039e0| 67 6d 6c 2e 69 63 6e 20 | 66 6f 72 20 6d 6f 72 65 |gml.icn |for more|
|000039f0| 20 69 6e 66 6f 72 6d 61 | 74 69 6f 6e 20 6f 6e 0a | informa|tion on.|
|00003a00| 58 68 6f 77 20 74 6f 20 | 75 73 65 20 74 68 69 73 |Xhow to |use this|
|00003a10| 20 70 72 6f 67 72 61 6d | 2e 20 20 54 68 69 73 20 | program|. This |
|00003a20| 70 72 6f 67 72 61 6d 20 | 69 73 20 6e 6f 74 20 66 |program |is not f|
|00003a30| 61 6e 63 79 2c 20 61 6e | 64 20 68 61 6e 64 6c 65 |ancy, an|d handle|
|00003a40| 73 20 6f 6e 6c 79 0a 58 | 74 68 65 20 73 69 6d 70 |s only.X|the simp|
|00003a50| 6c 65 73 74 20 3c 3e 2d | 73 74 79 6c 65 20 6d 61 |lest <>-|style ma|
|00003a60| 72 6b 75 70 2e 20 20 49 | 74 20 69 73 20 69 6e 20 |rkup. I|t is in |
|00003a70| 6e 6f 20 77 61 79 20 61 | 6e 20 61 74 74 65 6d 70 |no way a|n attemp|
|00003a80| 74 20 74 6f 20 68 61 6e | 64 6c 65 0a 58 74 68 65 |t to han|dle.Xthe|
|00003a90| 20 66 75 6c 6c 20 6d 65 | 74 61 6c 61 6e 67 75 61 | full me|talangua|
|00003aa0| 67 65 21 0a 58 0a 58 2d | 52 69 63 68 61 72 64 20 |ge!.X.X-|Richard |
|00003ab0| 28 67 6f 65 72 40 73 6f | 70 68 69 73 74 2e 75 63 |(goer@so|phist.uc|
|00003ac0| 68 69 63 61 67 6f 2e 65 | 64 75 29 0a 58 0a 53 48 |hicago.e|du).X.SH|
|00003ad0| 41 52 5f 45 4f 46 0a 74 | 72 75 65 20 7c 7c 20 65 |AR_EOF.t|rue || e|
|00003ae0| 63 68 6f 20 27 72 65 73 | 74 6f 72 65 20 6f 66 20 |cho 'res|tore of |
|00003af0| 52 45 41 44 4d 45 20 66 | 61 69 6c 65 64 27 0a 72 |README f|ailed'.r|
|00003b00| 6d 20 2d 66 20 5f 73 68 | 61 72 5f 77 6e 74 5f 2e |m -f _sh|ar_wnt_.|
|00003b10| 74 6d 70 0a 66 69 0a 23 | 20 3d 3d 3d 3d 3d 3d 3d |tmp.fi.#| =======|
|00003b20| 3d 3d 3d 3d 3d 3d 20 4d | 61 6b 65 66 69 6c 65 2e |====== M|akefile.|
|00003b30| 64 69 73 74 20 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |dist ===|========|
|00003b40| 3d 3d 3d 0a 69 66 20 74 | 65 73 74 20 2d 66 20 27 |===.if t|est -f '|
|00003b50| 4d 61 6b 65 66 69 6c 65 | 2e 64 69 73 74 27 20 2d |Makefile|.dist' -|
|00003b60| 61 20 58 22 24 31 22 20 | 21 3d 20 58 22 2d 63 22 |a X"$1" |!= X"-c"|
|00003b70| 3b 20 74 68 65 6e 0a 09 | 65 63 68 6f 20 27 78 20 |; then..|echo 'x |
|00003b80| 2d 20 73 6b 69 70 70 69 | 6e 67 20 4d 61 6b 65 66 |- skippi|ng Makef|
|00003b90| 69 6c 65 2e 64 69 73 74 | 20 28 46 69 6c 65 20 61 |ile.dist| (File a|
|00003ba0| 6c 72 65 61 64 79 20 65 | 78 69 73 74 73 29 27 0a |lready e|xists)'.|
|00003bb0| 09 72 6d 20 2d 66 20 5f | 73 68 61 72 5f 77 6e 74 |.rm -f _|shar_wnt|
|00003bc0| 5f 2e 74 6d 70 0a 65 6c | 73 65 0a 3e 20 5f 73 68 |_.tmp.el|se.> _sh|
|00003bd0| 61 72 5f 77 6e 74 5f 2e | 74 6d 70 0a 65 63 68 6f |ar_wnt_.|tmp.echo|
|00003be0| 20 27 78 20 2d 20 65 78 | 74 72 61 63 74 69 6e 67 | 'x - ex|tracting|
|00003bf0| 20 4d 61 6b 65 66 69 6c | 65 2e 64 69 73 74 20 28 | Makefil|e.dist (|
|00003c00| 54 65 78 74 29 27 0a 73 | 65 64 20 27 73 2f 5e 58 |Text)'.s|ed 's/^X|
|00003c10| 2f 2f 27 20 3c 3c 20 27 | 53 48 41 52 5f 45 4f 46 |//' << '|SHAR_EOF|
|00003c20| 27 20 3e 20 27 4d 61 6b | 65 66 69 6c 65 2e 64 69 |' > 'Mak|efile.di|
|00003c30| 73 74 27 20 26 26 0a 58 | 50 52 4f 47 4e 41 4d 45 |st' &&.X|PROGNAME|
|00003c40| 20 3d 20 73 74 72 69 70 | 73 67 6d 6c 0a 58 0a 58 | = strip|sgml.X.X|
|00003c50| 23 20 50 6c 65 61 73 65 | 20 65 64 69 74 20 74 68 |# Please| edit th|
|00003c60| 65 73 65 20 74 6f 20 72 | 65 66 6c 65 63 74 20 79 |ese to r|eflect y|
|00003c70| 6f 75 72 20 6c 6f 63 61 | 6c 20 66 69 6c 65 20 73 |our loca|l file s|
|00003c80| 74 72 75 63 74 75 72 65 | 20 26 20 63 6f 6e 76 65 |tructure| & conve|
|00003c90| 6e 74 69 6f 6e 73 2e 0a | 58 44 45 53 54 44 49 52 |ntions..|XDESTDIR|
|00003ca0| 20 3d 20 2f 75 73 72 2f | 6c 6f 63 61 6c 2f 62 69 | = /usr/|local/bi|
|00003cb0| 6e 0a 58 4f 57 4e 45 52 | 20 3d 20 62 69 6e 0a 58 |n.XOWNER| = bin.X|
|00003cc0| 47 52 4f 55 50 20 3d 20 | 62 69 6e 0a 58 0a 58 53 |GROUP = |bin.X.XS|
|00003cd0| 52 43 20 3d 20 24 28 50 | 52 4f 47 4e 41 4d 45 29 |RC = $(P|ROGNAME)|
|00003ce0| 2e 69 63 6e 20 73 74 72 | 69 70 75 6e 62 2e 69 63 |.icn str|ipunb.ic|
|00003cf0| 6e 20 72 65 61 64 74 62 | 6c 2e 69 63 6e 20 73 6c |n readtb|l.icn sl|
|00003d00| 61 73 68 62 61 6c 2e 69 | 63 6e 0a 58 0a 58 24 28 |ashbal.i|cn.X.X$(|
|00003d10| 50 52 4f 47 4e 41 4d 45 | 29 3a 20 24 28 53 52 43 |PROGNAME|): $(SRC|
|00003d20| 29 0a 58 09 69 63 6f 6e | 74 20 2d 6f 20 24 28 50 |).X.icon|t -o $(P|
|00003d30| 52 4f 47 4e 41 4d 45 29 | 20 24 28 53 52 43 29 0a |ROGNAME)| $(SRC).|
|00003d40| 58 0a 58 23 20 50 65 73 | 73 69 6d 69 73 74 69 63 |X.X# Pes|simistic|
|00003d50| 20 61 73 73 75 6d 70 74 | 69 6f 6e 73 20 72 65 67 | assumpt|ions reg|
|00003d60| 61 72 64 69 6e 67 20 74 | 68 65 20 65 6e 76 69 72 |arding t|he envir|
|00003d70| 6f 6e 6d 65 6e 74 20 28 | 69 6e 20 70 61 72 74 69 |onment (|in parti|
|00003d80| 63 75 6c 61 72 2c 0a 58 | 23 20 49 20 64 6f 6e 27 |cular,.X|# I don'|
|00003d90| 74 20 61 73 73 75 6d 65 | 20 79 6f 75 20 68 61 76 |t assume| you hav|
|00003da0| 65 20 74 68 65 20 42 53 | 44 20 22 69 6e 73 74 61 |e the BS|D "insta|
|00003db0| 6c 6c 22 20 73 68 65 6c | 6c 20 73 63 72 69 70 74 |ll" shel|l script|
|00003dc0| 29 2e 0a 58 69 6e 73 74 | 61 6c 6c 3a 20 24 28 50 |)..Xinst|all: $(P|
|00003dd0| 52 4f 47 4e 41 4d 45 29 | 0a 58 09 40 73 68 20 2d |ROGNAME)|.X.@sh -|
|00003de0| 63 20 22 74 65 73 74 20 | 2d 64 20 24 28 44 45 53 |c "test |-d $(DES|
|00003df0| 54 44 49 52 29 20 7c 7c | 20 28 6d 6b 64 69 72 20 |TDIR) ||| (mkdir |
|00003e00| 24 28 44 45 53 54 44 49 | 52 29 20 26 26 20 63 68 |$(DESTDI|R) && ch|
|00003e10| 6d 6f 64 20 37 35 35 20 | 24 28 44 45 53 54 44 49 |mod 755 |$(DESTDI|
|00003e20| 52 29 29 22 0a 58 09 63 | 70 20 24 28 50 52 4f 47 |R))".X.c|p $(PROG|
|00003e30| 4e 41 4d 45 29 20 24 28 | 44 45 53 54 44 49 52 29 |NAME) $(|DESTDIR)|
|00003e40| 2f 0a 58 09 63 68 67 72 | 70 20 24 28 47 52 4f 55 |/.X.chgr|p $(GROU|
|00003e50| 50 29 20 24 28 44 45 53 | 54 44 49 52 29 2f 24 28 |P) $(DES|TDIR)/$(|
|00003e60| 50 52 4f 47 4e 41 4d 45 | 29 0a 58 09 63 68 6f 77 |PROGNAME|).X.chow|
|00003e70| 6e 20 24 28 4f 57 4e 45 | 52 29 20 24 28 44 45 53 |n $(OWNE|R) $(DES|
|00003e80| 54 44 49 52 29 2f 24 28 | 50 52 4f 47 4e 41 4d 45 |TDIR)/$(|PROGNAME|
|00003e90| 29 0a 58 09 40 65 63 68 | 6f 20 22 5c 6e 49 6e 73 |).X.@ech|o "\nIns|
|00003ea0| 74 61 6c 6c 61 74 69 6f | 6e 20 64 6f 6e 65 2e 5c |tallatio|n done.\|
|00003eb0| 6e 22 0a 58 0a 58 63 6c | 65 61 6e 3a 0a 58 09 2d |n".X.Xcl|ean:.X.-|
|00003ec0| 72 6d 20 2d 66 20 2a 7e | 20 2e 75 3f 0a 58 09 2d |rm -f *~| .u?.X.-|
|00003ed0| 72 6d 20 2d 66 20 24 28 | 50 52 4f 47 4e 41 4d 45 |rm -f $(|PROGNAME|
|00003ee0| 29 0a 53 48 41 52 5f 45 | 4f 46 0a 74 72 75 65 20 |).SHAR_E|OF.true |
|00003ef0| 7c 7c 20 65 63 68 6f 20 | 27 72 65 73 74 6f 72 65 ||| echo |'restore|
|00003f00| 20 6f 66 20 4d 61 6b 65 | 66 69 6c 65 2e 64 69 73 | of Make|file.dis|
|00003f10| 74 20 66 61 69 6c 65 64 | 27 0a 72 6d 20 2d 66 20 |t failed|'.rm -f |
|00003f20| 5f 73 68 61 72 5f 77 6e | 74 5f 2e 74 6d 70 0a 66 |_shar_wn|t_.tmp.f|
|00003f30| 69 0a 65 78 69 74 20 30 | 0a |i.exit 0|. |
+--------+-------------------------+-------------------------+--------+--------+