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: 1887
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 64 62 | 65 6c 6c 40 6e 65 63 63 |From: db|ell@necc|
|00000010| 61 6e 2e 6f 7a 20 28 44 | 61 76 69 64 20 49 2e 20 |an.oz (D|avid I. |
|00000020| 42 65 6c 6c 29 0a 4e 65 | 77 73 67 72 6f 75 70 73 |Bell).Ne|wsgroups|
|00000030| 3a 20 61 6c 74 2e 73 6f | 75 72 63 65 73 0a 53 75 |: alt.so|urces.Su|
|00000040| 62 6a 65 63 74 3a 20 4c | 69 66 65 20 73 65 61 72 |bject: L|ife sear|
|00000050| 63 68 20 70 72 6f 67 72 | 61 6d 20 28 70 61 72 74 |ch progr|am (part|
|00000060| 20 31 20 6f 66 20 32 29 | 0a 4d 65 73 73 61 67 65 | 1 of 2)|.Message|
|00000070| 2d 49 44 3a 20 3c 38 32 | 32 40 6e 65 63 63 61 6e |-ID: <82|2@neccan|
|00000080| 2e 6f 7a 3e 0a 44 61 74 | 65 3a 20 32 38 20 53 65 |.oz>.Dat|e: 28 Se|
|00000090| 70 20 39 30 20 30 32 3a | 33 36 3a 34 34 20 47 4d |p 90 02:|36:44 GM|
|000000a0| 54 0a 0a 54 68 69 73 20 | 69 73 20 61 20 70 72 6f |T..This |is a pro|
|000000b0| 67 72 61 6d 20 77 68 69 | 63 68 20 73 65 61 72 63 |gram whi|ch searc|
|000000c0| 68 65 73 20 66 6f 72 20 | 6f 73 63 69 6c 6c 61 74 |hes for |oscillat|
|000000d0| 6f 72 73 2c 20 73 70 61 | 63 65 73 68 69 70 73 2c |ors, spa|ceships,|
|000000e0| 20 6f 72 20 70 61 72 65 | 6e 74 73 20 6f 66 0a 6f | or pare|nts of.o|
|000000f0| 62 6a 65 63 74 73 20 66 | 6f 72 20 74 68 65 20 67 |bjects f|or the g|
|00000100| 61 6d 65 20 6f 66 20 4c | 49 46 45 2e 20 20 49 74 |ame of L|IFE. It|
|00000110| 20 72 75 6e 73 20 6f 6e | 20 6e 6f 72 6d 61 6c 20 | runs on| normal |
|00000120| 74 65 72 6d 69 6e 61 6c | 73 2c 20 6f 70 74 69 6f |terminal|s, optio|
|00000130| 6e 61 6c 6c 79 20 75 73 | 69 6e 67 0a 63 75 72 73 |nally us|ing.curs|
|00000140| 65 73 2e 20 20 45 6e 6a | 6f 79 21 0a 0a 44 61 76 |es. Enj|oy!..Dav|
|00000150| 69 64 20 49 2e 20 42 65 | 6c 6c 20 0a 64 62 65 6c |id I. Be|ll .dbel|
|00000160| 6c 40 70 64 61 63 74 2e | 70 64 2e 6e 65 63 69 73 |l@pdact.|pd.necis|
|00000170| 61 2e 6f 7a 0a 0a 23 21 | 20 2f 62 69 6e 2f 73 68 |a.oz..#!| /bin/sh|
|00000180| 0a 23 20 54 68 69 73 20 | 69 73 20 61 20 73 68 65 |.# This |is a she|
|00000190| 6c 6c 20 61 72 63 68 69 | 76 65 2e 20 20 52 65 6d |ll archi|ve. Rem|
|000001a0| 6f 76 65 20 61 6e 79 74 | 68 69 6e 67 20 62 65 66 |ove anyt|hing bef|
|000001b0| 6f 72 65 20 74 68 69 73 | 20 6c 69 6e 65 2c 20 74 |ore this| line, t|
|000001c0| 68 65 6e 20 75 6e 70 61 | 63 6b 0a 23 20 69 74 20 |hen unpa|ck.# it |
|000001d0| 62 79 20 73 61 76 69 6e | 67 20 69 74 20 69 6e 74 |by savin|g it int|
|000001e0| 6f 20 61 20 66 69 6c 65 | 20 61 6e 64 20 74 79 70 |o a file| and typ|
|000001f0| 69 6e 67 20 22 73 68 20 | 66 69 6c 65 22 2e 20 20 |ing "sh |file". |
|00000200| 54 6f 20 6f 76 65 72 77 | 72 69 74 65 20 65 78 69 |To overw|rite exi|
|00000210| 73 74 69 6e 67 0a 23 20 | 66 69 6c 65 73 2c 20 74 |sting.# |files, t|
|00000220| 79 70 65 20 22 73 68 20 | 66 69 6c 65 20 2d 63 22 |ype "sh |file -c"|
|00000230| 2e 20 20 59 6f 75 20 63 | 61 6e 20 61 6c 73 6f 20 |. You c|an also |
|00000240| 66 65 65 64 20 74 68 69 | 73 20 61 73 20 73 74 61 |feed thi|s as sta|
|00000250| 6e 64 61 72 64 20 69 6e | 70 75 74 20 76 69 61 0a |ndard in|put via.|
|00000260| 23 20 75 6e 73 68 61 72 | 2c 20 6f 72 20 62 79 20 |# unshar|, or by |
|00000270| 74 79 70 69 6e 67 20 22 | 73 68 20 3c 66 69 6c 65 |typing "|sh <file|
|00000280| 22 2c 20 65 2e 67 2e 2e | 20 20 49 66 20 74 68 69 |", e.g..| If thi|
|00000290| 73 20 61 72 63 68 69 76 | 65 20 69 73 20 63 6f 6d |s archiv|e is com|
|000002a0| 70 6c 65 74 65 2c 20 79 | 6f 75 0a 23 20 77 69 6c |plete, y|ou.# wil|
|000002b0| 6c 20 73 65 65 20 74 68 | 65 20 66 6f 6c 6c 6f 77 |l see th|e follow|
|000002c0| 69 6e 67 20 6d 65 73 73 | 61 67 65 20 61 74 20 74 |ing mess|age at t|
|000002d0| 68 65 20 65 6e 64 3a 0a | 23 09 09 22 45 6e 64 20 |he end:.|#.."End |
|000002e0| 6f 66 20 61 72 63 68 69 | 76 65 20 31 20 28 6f 66 |of archi|ve 1 (of|
|000002f0| 20 32 29 2e 22 0a 23 20 | 43 6f 6e 74 65 6e 74 73 | 2).".# |Contents|
|00000300| 3a 20 20 4d 41 4e 49 46 | 45 53 54 20 4d 61 6b 65 |: MANIF|EST Make|
|00000310| 66 69 6c 65 20 52 45 41 | 44 4d 45 20 63 75 72 73 |file REA|DME curs|
|00000320| 65 73 74 74 79 2e 63 20 | 64 75 6d 62 74 74 79 2e |estty.c |dumbtty.|
|00000330| 63 20 69 6e 74 65 72 61 | 63 74 2e 63 0a 23 20 20 |c intera|ct.c.# |
|00000340| 20 6c 69 66 65 73 72 63 | 2e 68 0a 23 20 57 72 61 | lifesrc|.h.# Wra|
|00000350| 70 70 65 64 20 62 79 20 | 64 62 65 6c 6c 40 65 6c |pped by |dbell@el|
|00000360| 6d 20 6f 6e 20 46 72 69 | 20 53 65 70 20 32 38 20 |m on Fri| Sep 28 |
|00000370| 31 32 3a 31 34 3a 32 30 | 20 31 39 39 30 0a 50 41 |12:14:20| 1990.PA|
|00000380| 54 48 3d 2f 62 69 6e 3a | 2f 75 73 72 2f 62 69 6e |TH=/bin:|/usr/bin|
|00000390| 3a 2f 75 73 72 2f 75 63 | 62 20 3b 20 65 78 70 6f |:/usr/uc|b ; expo|
|000003a0| 72 74 20 50 41 54 48 0a | 69 66 20 74 65 73 74 20 |rt PATH.|if test |
|000003b0| 2d 66 20 27 4d 41 4e 49 | 46 45 53 54 27 20 2d 61 |-f 'MANI|FEST' -a|
|000003c0| 20 22 24 7b 31 7d 22 20 | 21 3d 20 22 2d 63 22 20 | "${1}" |!= "-c" |
|000003d0| 3b 20 74 68 65 6e 20 0a | 20 20 65 63 68 6f 20 73 |; then .| echo s|
|000003e0| 68 61 72 3a 20 57 69 6c | 6c 20 6e 6f 74 20 63 6c |har: Wil|l not cl|
|000003f0| 6f 62 62 65 72 20 65 78 | 69 73 74 69 6e 67 20 66 |obber ex|isting f|
|00000400| 69 6c 65 20 5c 22 27 4d | 41 4e 49 46 45 53 54 27 |ile \"'M|ANIFEST'|
|00000410| 5c 22 0a 65 6c 73 65 0a | 65 63 68 6f 20 73 68 61 |\".else.|echo sha|
|00000420| 72 3a 20 45 78 74 72 61 | 63 74 69 6e 67 20 5c 22 |r: Extra|cting \"|
|00000430| 27 4d 41 4e 49 46 45 53 | 54 27 5c 22 20 5c 28 33 |'MANIFES|T'\" \(3|
|00000440| 37 35 20 63 68 61 72 61 | 63 74 65 72 73 5c 29 0a |75 chara|cters\).|
|00000450| 73 65 64 20 22 73 2f 5e | 58 2f 2f 22 20 3e 27 4d |sed "s/^|X//" >'M|
|00000460| 41 4e 49 46 45 53 54 27 | 20 3c 3c 27 45 4e 44 5f |ANIFEST'| <<'END_|
|00000470| 4f 46 5f 46 49 4c 45 27 | 0a 58 20 20 20 46 69 6c |OF_FILE'|.X Fil|
|00000480| 65 20 4e 61 6d 65 09 09 | 41 72 63 68 69 76 65 20 |e Name..|Archive |
|00000490| 23 09 44 65 73 63 72 69 | 70 74 69 6f 6e 0a 58 2d |#.Descri|ption.X-|
|000004a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000004b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000004c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000004d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 0a 58 20 4d 41 4e |--------|--.X MAN|
|000004e0| 49 46 45 53 54 20 20 20 | 20 20 20 20 20 20 20 20 |IFEST | |
|000004f0| 20 20 20 20 20 20 20 20 | 31 09 0a 58 20 4d 61 6b | |1..X Mak|
|00000500| 65 66 69 6c 65 20 20 20 | 20 20 20 20 20 20 20 20 |efile | |
|00000510| 20 20 20 20 20 20 20 20 | 31 09 0a 58 20 4f 52 49 | |1..X ORI|
|00000520| 47 49 4e 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |GIN | |
|00000530| 20 20 20 20 20 20 20 20 | 32 09 0a 58 20 52 45 41 | |2..X REA|
|00000540| 44 4d 45 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |DME | |
|00000550| 20 20 20 20 20 20 20 20 | 31 09 0a 58 20 63 75 72 | |1..X cur|
|00000560| 73 65 73 74 74 79 2e 63 | 20 20 20 20 20 20 20 20 |sestty.c| |
|00000570| 20 20 20 20 20 20 20 20 | 31 09 0a 58 20 64 75 6d | |1..X dum|
|00000580| 62 74 74 79 2e 63 20 20 | 20 20 20 20 20 20 20 20 |btty.c | |
|00000590| 20 20 20 20 20 20 20 20 | 31 09 0a 58 20 69 6e 74 | |1..X int|
|000005a0| 65 72 61 63 74 2e 63 20 | 20 20 20 20 20 20 20 20 |eract.c | |
|000005b0| 20 20 20 20 20 20 20 20 | 31 09 0a 58 20 6c 69 66 | |1..X lif|
|000005c0| 65 73 72 63 2e 68 20 20 | 20 20 20 20 20 20 20 20 |esrc.h | |
|000005d0| 20 20 20 20 20 20 20 20 | 31 09 0a 58 20 73 65 61 | |1..X sea|
|000005e0| 72 63 68 2e 63 20 20 20 | 20 20 20 20 20 20 20 20 |rch.c | |
|000005f0| 20 20 20 20 20 20 20 20 | 32 09 0a 45 4e 44 5f 4f | |2..END_O|
|00000600| 46 5f 46 49 4c 45 0a 69 | 66 20 74 65 73 74 20 33 |F_FILE.i|f test 3|
|00000610| 37 35 20 2d 6e 65 20 60 | 77 63 20 2d 63 20 3c 27 |75 -ne `|wc -c <'|
|00000620| 4d 41 4e 49 46 45 53 54 | 27 60 3b 20 74 68 65 6e |MANIFEST|'`; then|
|00000630| 0a 20 20 20 20 65 63 68 | 6f 20 73 68 61 72 3a 20 |. ech|o shar: |
|00000640| 5c 22 27 4d 41 4e 49 46 | 45 53 54 27 5c 22 20 75 |\"'MANIF|EST'\" u|
|00000650| 6e 70 61 63 6b 65 64 20 | 77 69 74 68 20 77 72 6f |npacked |with wro|
|00000660| 6e 67 20 73 69 7a 65 21 | 0a 66 69 0a 23 20 65 6e |ng size!|.fi.# en|
|00000670| 64 20 6f 66 20 27 4d 41 | 4e 49 46 45 53 54 27 0a |d of 'MA|NIFEST'.|
|00000680| 66 69 0a 69 66 20 74 65 | 73 74 20 2d 66 20 27 4d |fi.if te|st -f 'M|
|00000690| 61 6b 65 66 69 6c 65 27 | 20 2d 61 20 22 24 7b 31 |akefile'| -a "${1|
|000006a0| 7d 22 20 21 3d 20 22 2d | 63 22 20 3b 20 74 68 65 |}" != "-|c" ; the|
|000006b0| 6e 20 0a 20 20 65 63 68 | 6f 20 73 68 61 72 3a 20 |n . ech|o shar: |
|000006c0| 57 69 6c 6c 20 6e 6f 74 | 20 63 6c 6f 62 62 65 72 |Will not| clobber|
|000006d0| 20 65 78 69 73 74 69 6e | 67 20 66 69 6c 65 20 5c | existin|g file \|
|000006e0| 22 27 4d 61 6b 65 66 69 | 6c 65 27 5c 22 0a 65 6c |"'Makefi|le'\".el|
|000006f0| 73 65 0a 65 63 68 6f 20 | 73 68 61 72 3a 20 45 78 |se.echo |shar: Ex|
|00000700| 74 72 61 63 74 69 6e 67 | 20 5c 22 27 4d 61 6b 65 |tracting| \"'Make|
|00000710| 66 69 6c 65 27 5c 22 20 | 5c 28 32 32 32 20 63 68 |file'\" |\(222 ch|
|00000720| 61 72 61 63 74 65 72 73 | 5c 29 0a 73 65 64 20 22 |aracters|\).sed "|
|00000730| 73 2f 5e 58 2f 2f 22 20 | 3e 27 4d 61 6b 65 66 69 |s/^X//" |>'Makefi|
|00000740| 6c 65 27 20 3c 3c 27 45 | 4e 44 5f 4f 46 5f 46 49 |le' <<'E|ND_OF_FI|
|00000750| 4c 45 27 0a 58 61 6c 6c | 3a 09 6c 69 66 65 73 72 |LE'.Xall|:.lifesr|
|00000760| 63 64 75 6d 62 20 6c 69 | 66 65 73 72 63 0a 58 0a |cdumb li|fesrc.X.|
|00000770| 58 6c 69 66 65 73 72 63 | 64 75 6d 62 3a 09 73 65 |Xlifesrc|dumb:.se|
|00000780| 61 72 63 68 2e 6f 20 69 | 6e 74 65 72 61 63 74 2e |arch.o i|nteract.|
|00000790| 6f 20 64 75 6d 62 74 74 | 79 2e 6f 0a 58 09 24 28 |o dumbtt|y.o.X.$(|
|000007a0| 43 43 29 20 2d 6f 20 6c | 69 66 65 73 72 63 64 75 |CC) -o l|ifesrcdu|
|000007b0| 6d 62 20 73 65 61 72 63 | 68 2e 6f 20 69 6e 74 65 |mb searc|h.o inte|
|000007c0| 72 61 63 74 2e 6f 20 64 | 75 6d 62 74 74 79 2e 6f |ract.o d|umbtty.o|
|000007d0| 0a 58 0a 58 6c 69 66 65 | 73 72 63 3a 09 73 65 61 |.X.Xlife|src:.sea|
|000007e0| 72 63 68 2e 6f 20 69 6e | 74 65 72 61 63 74 2e 6f |rch.o in|teract.o|
|000007f0| 20 63 75 72 73 65 73 74 | 74 79 2e 6f 0a 58 09 24 | cursest|ty.o.X.$|
|00000800| 28 43 43 29 20 2d 6f 20 | 6c 69 66 65 73 72 63 20 |(CC) -o |lifesrc |
|00000810| 73 65 61 72 63 68 2e 6f | 20 69 6e 74 65 72 61 63 |search.o| interac|
|00000820| 74 2e 6f 20 63 75 72 73 | 65 73 74 74 79 2e 6f 20 |t.o curs|estty.o |
|00000830| 2d 6c 63 75 72 73 65 73 | 0a 45 4e 44 5f 4f 46 5f |-lcurses|.END_OF_|
|00000840| 46 49 4c 45 0a 69 66 20 | 74 65 73 74 20 32 32 32 |FILE.if |test 222|
|00000850| 20 2d 6e 65 20 60 77 63 | 20 2d 63 20 3c 27 4d 61 | -ne `wc| -c <'Ma|
|00000860| 6b 65 66 69 6c 65 27 60 | 3b 20 74 68 65 6e 0a 20 |kefile'`|; then. |
|00000870| 20 20 20 65 63 68 6f 20 | 73 68 61 72 3a 20 5c 22 | echo |shar: \"|
|00000880| 27 4d 61 6b 65 66 69 6c | 65 27 5c 22 20 75 6e 70 |'Makefil|e'\" unp|
|00000890| 61 63 6b 65 64 20 77 69 | 74 68 20 77 72 6f 6e 67 |acked wi|th wrong|
|000008a0| 20 73 69 7a 65 21 0a 66 | 69 0a 23 20 65 6e 64 20 | size!.f|i.# end |
|000008b0| 6f 66 20 27 4d 61 6b 65 | 66 69 6c 65 27 0a 66 69 |of 'Make|file'.fi|
|000008c0| 0a 69 66 20 74 65 73 74 | 20 2d 66 20 27 52 45 41 |.if test| -f 'REA|
|000008d0| 44 4d 45 27 20 2d 61 20 | 22 24 7b 31 7d 22 20 21 |DME' -a |"${1}" !|
|000008e0| 3d 20 22 2d 63 22 20 3b | 20 74 68 65 6e 20 0a 20 |= "-c" ;| then . |
|000008f0| 20 65 63 68 6f 20 73 68 | 61 72 3a 20 57 69 6c 6c | echo sh|ar: Will|
|00000900| 20 6e 6f 74 20 63 6c 6f | 62 62 65 72 20 65 78 69 | not clo|bber exi|
|00000910| 73 74 69 6e 67 20 66 69 | 6c 65 20 5c 22 27 52 45 |sting fi|le \"'RE|
|00000920| 41 44 4d 45 27 5c 22 0a | 65 6c 73 65 0a 65 63 68 |ADME'\".|else.ech|
|00000930| 6f 20 73 68 61 72 3a 20 | 45 78 74 72 61 63 74 69 |o shar: |Extracti|
|00000940| 6e 67 20 5c 22 27 52 45 | 41 44 4d 45 27 5c 22 20 |ng \"'RE|ADME'\" |
|00000950| 5c 28 31 32 39 35 38 20 | 63 68 61 72 61 63 74 65 |\(12958 |characte|
|00000960| 72 73 5c 29 0a 73 65 64 | 20 22 73 2f 5e 58 2f 2f |rs\).sed| "s/^X//|
|00000970| 22 20 3e 27 52 45 41 44 | 4d 45 27 20 3c 3c 27 45 |" >'READ|ME' <<'E|
|00000980| 4e 44 5f 4f 46 5f 46 49 | 4c 45 27 0a 58 09 09 09 |ND_OF_FI|LE'.X...|
|00000990| 09 4c 49 46 45 53 52 43 | 0a 58 0a 58 0a 58 54 68 |.LIFESRC|.X.X.XTh|
|000009a0| 65 20 66 6f 6c 6c 6f 77 | 69 6e 67 20 69 73 20 61 |e follow|ing is a|
|000009b0| 20 73 68 6f 72 74 20 65 | 78 70 6c 61 6e 61 74 69 | short e|xplanati|
|000009c0| 6f 6e 20 6f 6e 20 68 6f | 77 20 74 6f 20 72 75 6e |on on ho|w to run|
|000009d0| 20 74 68 65 20 6c 69 66 | 65 20 73 65 61 72 63 68 | the lif|e search|
|000009e0| 20 70 72 6f 67 72 61 6d | 2e 0a 58 0a 58 54 68 69 | program|..X.XThi|
|000009f0| 73 20 70 72 6f 67 72 61 | 6d 20 61 74 74 65 6d 70 |s progra|m attemp|
|00000a00| 74 73 20 74 6f 20 66 69 | 6e 64 20 6c 69 66 65 20 |ts to fi|nd life |
|00000a10| 6f 62 6a 65 63 74 73 20 | 77 68 69 63 68 20 61 72 |objects |which ar|
|00000a20| 65 20 70 65 72 69 6f 64 | 69 63 2c 20 77 68 69 63 |e period|ic, whic|
|00000a30| 68 20 61 72 65 0a 58 73 | 70 61 63 65 73 68 69 70 |h are.Xs|paceship|
|00000a40| 73 2c 20 6f 72 20 77 68 | 69 63 68 20 61 72 65 20 |s, or wh|ich are |
|00000a50| 70 61 72 65 6e 74 73 20 | 6f 66 20 61 6e 20 6f 62 |parents |of an ob|
|00000a60| 6a 65 63 74 2e 20 20 59 | 6f 75 20 73 70 65 63 69 |ject. Y|ou speci|
|00000a70| 66 79 20 61 20 72 65 67 | 69 6f 6e 20 74 6f 0a 58 |fy a reg|ion to.X|
|00000a80| 73 65 61 72 63 68 20 69 | 6e 2c 20 74 68 65 20 6e |search i|n, the n|
|00000a90| 75 6d 62 65 72 20 6f 66 | 20 67 65 6e 65 72 61 74 |umber of| generat|
|00000aa0| 69 6f 6e 73 20 6f 66 20 | 69 6e 74 65 72 65 73 74 |ions of |interest|
|00000ab0| 2c 20 61 6e 64 20 73 6f | 6d 65 20 69 6e 69 74 69 |, and so|me initi|
|00000ac0| 61 6c 20 63 65 6c 6c 73 | 2e 0a 58 54 68 65 20 70 |al cells|..XThe p|
|00000ad0| 72 6f 67 72 61 6d 20 74 | 68 65 6e 20 73 65 61 72 |rogram t|hen sear|
|00000ae0| 63 68 65 73 20 66 6f 72 | 20 61 6c 6c 20 6f 62 6a |ches for| all obj|
|00000af0| 65 63 74 73 20 77 68 69 | 63 68 20 73 61 74 69 73 |ects whi|ch satis|
|00000b00| 66 79 20 74 68 65 20 63 | 6f 6e 64 69 74 69 6f 6e |fy the c|ondition|
|00000b10| 73 2e 0a 58 54 68 65 20 | 73 65 61 72 63 68 20 61 |s..XThe |search a|
|00000b20| 70 70 6c 69 65 73 20 74 | 72 61 6e 73 69 74 69 6f |pplies t|ransitio|
|00000b30| 6e 20 61 6e 64 20 69 6d | 70 6c 69 63 61 74 69 6f |n and im|plicatio|
|00000b40| 6e 20 72 75 6c 65 73 20 | 77 68 69 63 68 20 72 65 |n rules |which re|
|00000b50| 73 74 72 69 63 74 20 74 | 68 65 20 6e 75 6d 62 65 |strict t|he numbe|
|00000b60| 72 0a 58 6f 66 20 70 6f | 73 73 69 62 6c 65 20 6f |r.Xof po|ssible o|
|00000b70| 62 6a 65 63 74 73 20 63 | 6f 6e 73 69 64 65 72 65 |bjects c|onsidere|
|00000b80| 64 20 74 6f 20 61 20 73 | 6d 61 6c 6c 20 66 72 61 |d to a s|mall fra|
|00000b90| 63 74 69 6f 6e 20 6f 66 | 20 74 68 65 20 74 6f 74 |ction of| the tot|
|00000ba0| 61 6c 20 6e 75 6d 62 65 | 72 2e 20 20 54 68 69 73 |al numbe|r. This|
|00000bb0| 0a 58 6d 61 6b 65 73 20 | 69 74 20 70 72 61 63 74 |.Xmakes |it pract|
|00000bc0| 69 63 61 6c 20 74 6f 20 | 66 69 6e 64 20 74 68 65 |ical to |find the|
|00000bd0| 73 65 20 6f 62 6a 65 63 | 74 73 20 69 6e 20 61 20 |se objec|ts in a |
|00000be0| 72 65 61 73 6f 6e 61 62 | 6c 65 20 61 6d 6f 75 6e |reasonab|le amoun|
|00000bf0| 74 20 6f 66 20 74 69 6d | 65 2e 0a 58 28 52 65 61 |t of tim|e..X(Rea|
|00000c00| 73 6f 6e 61 62 6c 65 20 | 72 61 6e 67 65 73 20 66 |sonable |ranges f|
|00000c10| 72 6f 6d 20 61 20 66 65 | 77 20 6d 69 6e 75 74 65 |rom a fe|w minute|
|00000c20| 73 20 74 6f 20 6d 61 6e | 79 20 64 61 79 73 2c 20 |s to man|y days, |
|00000c30| 64 65 70 65 6e 64 69 6e | 67 20 6f 6e 20 74 68 65 |dependin|g on the|
|00000c40| 20 73 69 7a 65 0a 58 6f | 66 20 74 68 65 20 73 65 | size.Xo|f the se|
|00000c50| 61 72 63 68 2e 29 0a 58 | 0a 58 54 68 65 20 61 6c |arch.).X|.XThe al|
|00000c60| 67 6f 72 69 74 68 6d 20 | 75 73 65 64 20 68 65 72 |gorithm |used her|
|00000c70| 65 20 69 73 20 62 61 73 | 65 64 20 6f 6e 20 74 68 |e is bas|ed on th|
|00000c80| 65 20 6f 6e 65 20 64 65 | 73 63 72 69 62 65 64 20 |e one de|scribed |
|00000c90| 62 79 20 44 65 61 6e 20 | 48 69 63 6b 65 72 73 6f |by Dean |Hickerso|
|00000ca0| 6e 0a 58 69 6e 20 68 69 | 73 20 64 6f 63 75 6d 65 |n.Xin hi|s docume|
|00000cb0| 6e 74 20 74 68 61 74 20 | 77 61 73 20 69 6e 63 6c |nt that |was incl|
|00000cc0| 75 64 65 64 20 77 69 74 | 68 20 74 68 65 20 78 6c |uded wit|h the xl|
|00000cd0| 69 66 65 20 70 72 6f 67 | 72 61 6d 2c 20 61 6e 64 |ife prog|ram, and|
|00000ce0| 20 77 68 69 63 68 20 69 | 73 20 61 6c 73 6f 0a 58 | which i|s also.X|
|00000cf0| 69 6e 63 6c 75 64 65 64 | 20 77 69 74 68 20 74 68 |included| with th|
|00000d00| 69 73 20 64 69 73 74 72 | 69 62 75 74 69 6f 6e 2e |is distr|ibution.|
|00000d10| 20 20 52 65 61 64 69 6e | 67 20 74 68 61 74 20 64 | Readin|g that d|
|00000d20| 6f 63 75 6d 65 6e 74 20 | 77 69 6c 6c 20 65 78 70 |ocument |will exp|
|00000d30| 6c 61 69 6e 20 68 6f 77 | 0a 58 74 68 65 20 73 65 |lain how|.Xthe se|
|00000d40| 61 72 63 68 20 69 6e 20 | 74 68 69 73 20 70 72 6f |arch in |this pro|
|00000d50| 67 72 61 6d 20 77 6f 72 | 6b 73 2c 20 65 78 63 65 |gram wor|ks, exce|
|00000d60| 70 74 20 66 6f 72 20 6d | 69 6e 6f 72 20 63 68 61 |pt for m|inor cha|
|00000d70| 6e 67 65 73 2e 0a 58 0a | 58 54 68 65 20 70 72 6f |nges..X.|XThe pro|
|00000d80| 67 72 61 6d 20 75 73 75 | 61 6c 6c 79 20 6c 6f 6f |gram usu|ally loo|
|00000d90| 6b 73 20 66 6f 72 20 61 | 6e 20 6f 62 6a 65 63 74 |ks for a|n object|
|00000da0| 20 77 68 69 63 68 20 69 | 73 20 70 65 72 69 6f 64 | which i|s period|
|00000db0| 69 63 20 69 6e 20 74 68 | 65 20 6e 75 6d 62 65 72 |ic in th|e number|
|00000dc0| 20 6f 66 0a 58 67 65 6e | 65 72 61 74 69 6f 6e 73 | of.Xgen|erations|
|00000dd0| 20 73 70 65 63 69 66 69 | 65 64 20 62 79 20 74 68 | specifi|ed by th|
|00000de0| 65 20 2d 67 20 6f 70 74 | 69 6f 6e 2e 20 20 46 6f |e -g opt|ion. Fo|
|00000df0| 72 20 65 78 61 6d 70 6c | 65 2c 20 75 73 65 20 2d |r exampl|e, use -|
|00000e00| 67 33 20 74 6f 20 6c 6f | 6f 6b 20 66 6f 72 0a 58 |g3 to lo|ok for.X|
|00000e10| 70 65 72 69 6f 64 20 33 | 20 6f 73 63 69 6c 6c 61 |period 3| oscilla|
|00000e20| 74 6f 72 73 20 6f 72 20 | 73 70 61 63 65 73 68 69 |tors or |spaceshi|
|00000e30| 70 73 2e 20 20 54 68 65 | 20 70 72 6f 67 72 61 6d |ps. The| program|
|00000e40| 20 69 73 20 70 72 65 74 | 74 79 20 66 61 73 74 20 | is pret|ty fast |
|00000e50| 66 6f 72 20 70 65 72 69 | 6f 64 20 32 2c 0a 58 73 |for peri|od 2,.Xs|
|00000e60| 61 74 69 73 66 61 63 74 | 6f 72 79 20 66 6f 72 20 |atisfact|ory for |
|00000e70| 70 65 72 69 6f 64 20 33 | 2c 20 6c 6f 6e 67 20 66 |period 3|, long f|
|00000e80| 6f 72 20 70 65 72 69 6f | 64 20 34 2c 20 61 6e 64 |or perio|d 4, and|
|00000e90| 20 76 65 72 79 20 6c 6f | 6e 67 20 66 6f 72 20 70 | very lo|ng for p|
|00000ea0| 65 72 69 6f 64 20 35 2e | 0a 58 0a 58 42 79 20 64 |eriod 5.|.X.XBy d|
|00000eb0| 65 66 61 75 6c 74 2c 20 | 74 68 65 20 70 72 6f 67 |efault, |the prog|
|00000ec0| 72 61 6d 20 6f 6e 6c 79 | 20 66 69 6e 64 73 20 6f |ram only| finds o|
|00000ed0| 62 6a 65 63 74 73 20 77 | 68 69 63 68 20 68 61 76 |bjects w|hich hav|
|00000ee0| 65 20 74 68 65 20 66 75 | 6c 6c 20 70 65 72 69 6f |e the fu|ll perio|
|00000ef0| 64 20 73 70 65 63 69 66 | 69 65 64 0a 58 62 79 20 |d specif|ied.Xby |
|00000f00| 74 68 65 20 2d 67 20 6f | 70 74 69 6f 6e 2e 20 20 |the -g o|ption. |
|00000f10| 4f 62 6a 65 63 74 73 20 | 68 61 76 69 6e 67 20 73 |Objects |having s|
|00000f20| 75 62 70 65 72 69 6f 64 | 73 20 6f 66 20 74 68 65 |ubperiod|s of the|
|00000f30| 20 66 75 6c 6c 20 70 65 | 72 69 6f 64 20 61 72 65 | full pe|riod are|
|00000f40| 20 73 6b 69 70 70 65 64 | 2e 0a 58 46 6f 72 20 65 | skipped|..XFor e|
|00000f50| 78 61 6d 70 6c 65 2c 20 | 77 68 65 6e 20 75 73 69 |xample, |when usi|
|00000f60| 6e 67 20 2d 67 34 2c 20 | 61 6c 6c 20 73 74 61 62 |ng -g4, |all stab|
|00000f70| 6c 65 20 6f 62 6a 65 63 | 74 73 20 6f 72 20 70 65 |le objec|ts or pe|
|00000f80| 72 69 6f 64 20 32 20 6f | 73 63 69 6c 6c 61 74 6f |riod 2 o|scillato|
|00000f90| 72 73 20 77 69 6c 6c 0a | 58 6e 6f 74 20 62 65 20 |rs will.|Xnot be |
|00000fa0| 66 6f 75 6e 64 2e 20 20 | 54 68 65 20 2d 61 20 63 |found. |The -a c|
|00000fb0| 6f 6d 6d 61 6e 64 20 6c | 69 6e 65 20 6f 70 74 69 |ommand l|ine opti|
|00000fc0| 6f 6e 20 64 69 73 61 62 | 6c 65 73 20 74 68 69 73 |on disab|les this|
|00000fd0| 20 73 6b 69 70 70 69 6e | 67 2c 20 74 68 75 73 20 | skippin|g, thus |
|00000fe0| 66 69 6e 64 69 6e 67 0a | 58 61 6c 6c 20 6f 62 6a |finding.|Xall obj|
|00000ff0| 65 63 74 73 2c 20 65 76 | 65 6e 20 74 68 6f 73 65 |ects, ev|en those|
|00001000| 20 77 69 74 68 20 73 75 | 62 70 65 72 69 6f 64 73 | with su|bperiods|
|00001010| 2e 20 20 59 6f 75 20 70 | 72 6f 62 61 62 6c 79 20 |. You p|robably |
|00001020| 77 61 6e 74 20 74 6f 20 | 75 73 65 20 2d 61 20 69 |want to |use -a i|
|00001030| 66 20 79 6f 75 0a 58 75 | 73 65 20 61 6e 79 20 6f |f you.Xu|se any o|
|00001040| 66 20 74 68 65 20 2d 74 | 72 2c 20 2d 74 63 2c 20 |f the -t|r, -tc, |
|00001050| 6f 72 20 2d 70 20 6f 70 | 74 69 6f 6e 73 2e 0a 58 |or -p op|tions..X|
|00001060| 0a 58 54 68 65 20 6f 62 | 6a 65 63 74 20 69 73 20 |.XThe ob|ject is |
|00001070| 6c 69 6d 69 74 65 64 20 | 74 6f 20 74 68 65 20 6e |limited |to the n|
|00001080| 75 6d 62 65 72 20 6f 66 | 20 72 6f 77 73 20 61 6e |umber of| rows an|
|00001090| 64 20 63 6f 6c 75 6d 6e | 73 20 73 70 65 63 69 66 |d column|s specif|
|000010a0| 69 65 64 20 62 79 20 74 | 68 65 20 2d 72 0a 58 61 |ied by t|he -r.Xa|
|000010b0| 6e 64 20 2d 63 20 6f 70 | 74 69 6f 6e 73 2e 20 20 |nd -c op|tions. |
|000010c0| 43 65 6c 6c 73 20 6f 75 | 74 73 69 64 65 20 6f 66 |Cells ou|tside of|
|000010d0| 20 74 68 69 73 20 62 6f | 75 6e 64 61 72 79 20 61 | this bo|undary a|
|000010e0| 72 65 20 61 73 73 75 6d | 65 64 20 4f 46 46 2e 20 |re assum|ed OFF. |
|000010f0| 20 54 68 75 73 20 69 66 | 0a 58 61 6e 79 20 67 65 | Thus if|.Xany ge|
|00001100| 6e 65 72 61 74 69 6f 6e | 20 6f 66 20 74 68 65 20 |neration| of the |
|00001110| 6f 62 6a 65 63 74 20 77 | 6f 75 6c 64 20 65 78 70 |object w|ould exp|
|00001120| 61 6e 64 20 6f 75 74 20 | 6f 66 20 74 68 65 20 62 |and out |of the b|
|00001130| 6f 78 2c 20 74 68 65 6e | 20 74 68 65 20 6f 62 6a |ox, then| the obj|
|00001140| 65 63 74 0a 58 77 69 6c | 6c 20 6e 6f 74 20 62 65 |ect.Xwil|l not be|
|00001150| 20 66 6f 75 6e 64 2e 20 | 20 54 68 65 20 70 72 6f | found. | The pro|
|00001160| 67 72 61 6d 20 66 69 6e | 64 73 20 74 68 69 6e 67 |gram fin|ds thing|
|00001170| 73 20 71 75 69 63 6b 65 | 72 20 66 6f 72 20 61 20 |s quicke|r for a |
|00001180| 73 6d 61 6c 6c 65 72 20 | 6e 75 6d 62 65 72 20 6f |smaller |number o|
|00001190| 66 0a 58 72 6f 77 73 20 | 61 6e 64 20 63 6f 6c 75 |f.Xrows |and colu|
|000011a0| 6d 6e 73 2e 20 20 53 65 | 61 72 63 68 69 6e 67 20 |mns. Se|arching |
|000011b0| 70 72 6f 63 65 65 64 73 | 20 66 72 6f 6d 20 6c 65 |proceeds| from le|
|000011c0| 66 74 20 74 6f 20 72 69 | 67 68 74 20 63 6f 6c 75 |ft to ri|ght colu|
|000011d0| 6d 6e 20 62 79 20 63 6f | 6c 75 6d 6e 2c 0a 58 61 |mn by co|lumn,.Xa|
|000011e0| 6e 64 20 77 69 74 68 69 | 6e 20 61 20 63 6f 6c 75 |nd withi|n a colu|
|000011f0| 6d 6e 20 66 72 6f 6d 20 | 6d 69 64 64 6c 65 20 74 |mn from |middle t|
|00001200| 6f 20 65 64 67 65 2e 20 | 20 49 74 20 69 73 20 71 |o edge. | It is q|
|00001210| 75 69 63 6b 65 72 20 74 | 6f 20 73 65 61 72 63 68 |uicker t|o search|
|00001220| 20 77 68 65 6e 20 74 68 | 65 72 65 0a 58 61 72 65 | when th|ere.Xare|
|00001230| 20 6c 65 73 73 20 72 6f | 77 73 20 74 68 61 6e 20 | less ro|ws than |
|00001240| 63 6f 6c 75 6d 6e 73 2e | 0a 58 0a 58 54 68 65 20 |columns.|.X.XThe |
|00001250| 74 68 72 65 65 20 63 6f | 6d 6d 61 6e 64 20 6c 69 |three co|mmand li|
|00001260| 6e 65 20 6f 70 74 69 6f | 6e 73 20 2d 72 2c 20 2d |ne optio|ns -r, -|
|00001270| 63 2c 20 61 6e 64 20 2d | 67 20 61 72 65 20 61 6c |c, and -|g are al|
|00001280| 77 61 79 73 20 72 65 71 | 75 69 72 65 64 20 28 75 |ways req|uired (u|
|00001290| 6e 6c 65 73 73 0a 58 79 | 6f 75 20 61 72 65 20 63 |nless.Xy|ou are c|
|000012a0| 6f 6e 74 69 6e 75 69 6e | 67 20 61 20 73 65 61 72 |ontinuin|g a sear|
|000012b0| 63 68 20 75 73 69 6e 67 | 20 2d 6c 20 6f 72 20 2d |ch using| -l or -|
|000012c0| 6c 6e 29 2e 20 20 49 66 | 20 79 6f 75 20 64 6f 20 |ln). If| you do |
|000012d0| 6e 6f 74 20 73 70 65 63 | 69 66 79 20 74 68 65 73 |not spec|ify thes|
|000012e0| 65 0a 58 6f 70 74 69 6f | 6e 73 2c 20 6f 72 20 67 |e.Xoptio|ns, or g|
|000012f0| 69 76 65 20 74 68 65 6d | 20 69 6c 6c 65 67 61 6c |ive them| illegal|
|00001300| 20 61 72 67 75 6d 65 6e | 74 73 2c 20 61 20 62 72 | argumen|ts, a br|
|00001310| 69 65 66 20 6d 65 73 73 | 61 67 65 20 77 69 6c 6c |ief mess|age will|
|00001320| 20 62 65 20 6f 75 74 70 | 75 74 20 61 6e 64 0a 58 | be outp|ut and.X|
|00001330| 74 68 65 20 70 72 6f 67 | 72 61 6d 20 77 69 6c 6c |the prog|ram will|
|00001340| 20 65 78 69 74 2e 20 20 | 41 6c 6c 20 6f 74 68 65 | exit. |All othe|
|00001350| 72 20 6f 70 74 69 6f 6e | 73 20 61 72 65 20 74 72 |r option|s are tr|
|00001360| 75 6c 79 20 6f 70 74 69 | 6f 6e 61 6c 2e 0a 58 0a |uly opti|onal..X.|
|00001370| 58 49 66 20 79 6f 75 20 | 77 61 6e 74 20 74 6f 20 |XIf you |want to |
|00001380| 66 69 6e 64 20 61 20 73 | 79 6d 6d 65 74 72 69 63 |find a s|ymmetric|
|00001390| 20 6f 62 6a 65 63 74 2c | 20 74 68 65 6e 20 75 73 | object,| then us|
|000013a0| 65 20 74 68 65 20 2d 73 | 72 20 6f 72 20 2d 73 63 |e the -s|r or -sc|
|000013b0| 20 6f 70 74 69 6f 6e 73 | 2e 0a 58 54 68 65 20 2d | options|..XThe -|
|000013c0| 73 72 20 6f 70 74 69 6f | 6e 20 65 6e 66 6f 72 63 |sr optio|n enforc|
|000013d0| 65 73 20 73 79 6d 6d 65 | 74 72 79 20 61 72 6f 75 |es symme|try arou|
|000013e0| 6e 64 20 74 68 65 20 6d | 69 64 64 6c 65 20 72 6f |nd the m|iddle ro|
|000013f0| 77 20 69 66 20 74 68 65 | 20 6e 75 6d 62 65 72 20 |w if the| number |
|00001400| 6f 66 20 72 6f 77 73 0a | 58 69 73 20 6f 64 64 2c |of rows.|Xis odd,|
|00001410| 20 6f 72 20 74 68 65 20 | 6d 69 64 64 6c 65 20 74 | or the |middle t|
|00001420| 77 6f 20 72 6f 77 73 20 | 69 66 20 74 68 65 20 6e |wo rows |if the n|
|00001430| 75 6d 62 65 72 20 6f 66 | 20 72 6f 77 73 20 69 73 |umber of| rows is|
|00001440| 20 65 76 65 6e 2e 20 20 | 54 68 65 20 2d 73 63 20 | even. |The -sc |
|00001450| 6f 70 74 69 6f 6e 0a 58 | 64 6f 65 73 20 74 68 65 |option.X|does the|
|00001460| 20 73 61 6d 65 20 74 68 | 69 6e 67 20 66 6f 72 20 | same th|ing for |
|00001470| 63 6f 6c 75 6d 6e 73 2e | 20 20 59 6f 75 20 63 61 |columns.| You ca|
|00001480| 6e 20 73 70 65 63 69 66 | 79 20 62 6f 74 68 20 6f |n specif|y both o|
|00001490| 70 74 69 6f 6e 73 20 74 | 6f 20 6c 6f 6f 6b 20 66 |ptions t|o look f|
|000014a0| 6f 72 0a 58 66 6f 75 72 | 66 6f 6c 64 20 73 79 6d |or.Xfour|fold sym|
|000014b0| 6d 65 74 72 79 2e 20 20 | 54 68 65 73 65 20 6f 70 |metry. |These op|
|000014c0| 74 69 6f 6e 73 20 77 69 | 6c 6c 20 73 70 65 65 64 |tions wi|ll speed|
|000014d0| 20 75 70 20 74 68 65 20 | 73 65 61 72 63 68 20 73 | up the |search s|
|000014e0| 69 6e 63 65 20 66 65 77 | 65 72 20 63 65 6c 6c 73 |ince few|er cells|
|000014f0| 0a 58 6e 65 65 64 20 65 | 78 61 6d 69 6e 69 6e 67 |.Xneed e|xamining|
|00001500| 2c 20 62 75 74 20 6f 66 | 20 63 6f 75 72 73 65 20 |, but of| course |
|00001510| 77 69 6c 6c 20 6d 69 73 | 73 20 61 6c 6c 20 75 6e |will mis|s all un|
|00001520| 73 79 6d 6d 65 74 72 69 | 63 20 6f 62 6a 65 63 74 |symmetri|c object|
|00001530| 73 2e 0a 58 0a 58 41 6e | 6f 74 68 65 72 20 77 61 |s..X.XAn|other wa|
|00001540| 79 20 74 6f 20 73 70 65 | 65 64 20 75 70 20 74 68 |y to spe|ed up th|
|00001550| 65 20 73 65 61 72 63 68 | 20 69 73 20 74 6f 20 75 |e search| is to u|
|00001560| 73 65 20 74 68 65 20 2d | 6d 20 6f 70 74 69 6f 6e |se the -|m option|
|00001570| 20 74 6f 20 6c 69 6d 69 | 74 20 74 68 65 0a 58 6e | to limi|t the.Xn|
|00001580| 75 6d 62 65 72 20 6f 66 | 20 4f 4e 20 63 65 6c 6c |umber of| ON cell|
|00001590| 73 20 69 6e 20 67 65 6e | 65 72 61 74 69 6f 6e 20 |s in gen|eration |
|000015a0| 30 2e 20 20 54 68 69 73 | 20 77 69 6c 6c 20 6f 66 |0. This| will of|
|000015b0| 20 63 6f 75 72 73 65 20 | 6d 69 73 73 20 61 6e 79 | course |miss any|
|000015c0| 0a 58 6f 62 6a 65 63 74 | 73 20 77 68 69 63 68 20 |.Xobject|s which |
|000015d0| 68 61 76 65 20 74 6f 6f | 20 6d 61 6e 79 20 63 65 |have too| many ce|
|000015e0| 6c 6c 73 2e 0a 58 0a 58 | 42 79 20 64 65 66 61 75 |lls..X.X|By defau|
|000015f0| 6c 74 2c 20 74 68 65 20 | 70 72 6f 67 72 61 6d 20 |lt, the |program |
|00001600| 6c 6f 6f 6b 73 20 66 6f | 72 20 70 75 72 65 6c 79 |looks fo|r purely|
|00001610| 20 70 65 72 69 6f 64 69 | 63 20 6f 62 6a 65 63 74 | periodi|c object|
|00001620| 73 2e 20 20 54 6f 20 66 | 69 6e 64 20 61 0a 58 73 |s. To f|ind a.Xs|
|00001630| 70 61 63 65 73 68 69 70 | 2c 20 79 6f 75 20 6d 75 |paceship|, you mu|
|00001640| 73 74 20 75 73 65 20 74 | 68 65 20 2d 74 72 20 6f |st use t|he -tr o|
|00001650| 72 20 2d 74 63 20 6f 70 | 74 69 6f 6e 73 20 74 6f |r -tc op|tions to|
|00001660| 20 73 70 65 63 69 66 79 | 20 61 20 74 72 61 6e 73 | specify| a trans|
|00001670| 6c 61 74 69 6f 6e 2e 0a | 58 54 68 69 73 20 6d 61 |lation..|XThis ma|
|00001680| 6b 65 73 20 67 65 6e 65 | 72 61 74 69 6f 6e 20 4e |kes gene|ration N|
|00001690| 2d 31 20 73 68 69 66 74 | 20 72 69 67 68 74 20 6f |-1 shift| right o|
|000016a0| 72 20 64 6f 77 6e 20 62 | 79 20 74 68 65 20 73 70 |r down b|y the sp|
|000016b0| 65 63 69 66 69 65 64 20 | 6e 75 6d 62 65 72 20 6f |ecified |number o|
|000016c0| 66 0a 58 63 65 6c 6c 73 | 20 69 6e 20 6f 72 64 65 |f.Xcells| in orde|
|000016d0| 72 20 74 6f 20 62 65 63 | 6f 6d 65 20 67 65 6e 65 |r to bec|ome gene|
|000016e0| 72 61 74 69 6f 6e 20 30 | 2e 20 20 54 68 75 73 20 |ration 0|. Thus |
|000016f0| 74 68 69 73 20 66 69 6e | 64 73 20 73 70 61 63 65 |this fin|ds space|
|00001700| 73 68 69 70 73 20 77 68 | 69 63 68 0a 58 6d 6f 76 |ships wh|ich.Xmov|
|00001710| 65 20 6c 65 66 74 77 61 | 72 64 73 20 6f 72 20 75 |e leftwa|rds or u|
|00001720| 70 77 61 72 64 73 2e 20 | 20 55 73 65 20 2d 74 63 |pwards. | Use -tc|
|00001730| 20 74 6f 20 74 72 61 6e | 73 6c 61 74 65 20 63 6f | to tran|slate co|
|00001740| 6c 75 6d 6e 73 20 28 74 | 68 75 73 20 6d 61 6b 69 |lumns (t|hus maki|
|00001750| 6e 67 0a 58 68 6f 72 69 | 7a 6f 6e 74 61 6c 20 73 |ng.Xhori|zontal s|
|00001760| 68 69 70 73 29 2c 20 61 | 6e 64 20 2d 74 72 20 74 |hips), a|nd -tr t|
|00001770| 6f 20 74 72 61 6e 73 6c | 61 74 65 20 72 6f 77 73 |o transl|ate rows|
|00001780| 20 28 74 68 75 73 20 6d | 61 6b 69 6e 67 20 76 65 | (thus m|aking ve|
|00001790| 72 74 69 63 61 6c 20 73 | 68 69 70 73 29 2c 0a 58 |rtical s|hips),.X|
|000017a0| 6f 72 20 61 20 63 6f 6d | 62 69 6e 61 74 69 6f 6e |or a com|bination|
|000017b0| 20 28 74 68 75 73 20 6d | 61 6b 69 6e 67 20 64 69 | (thus m|aking di|
|000017c0| 61 67 6f 6e 61 6c 20 73 | 70 61 63 65 73 68 69 70 |agonal s|paceship|
|000017d0| 73 29 2e 20 20 54 68 65 | 20 73 6c 6f 77 65 73 74 |s). The| slowest|
|000017e0| 20 73 68 69 70 20 66 6f | 72 0a 58 61 6e 79 20 70 | ship fo|r.Xany p|
|000017f0| 65 72 69 6f 64 20 75 73 | 65 73 20 61 20 74 72 61 |eriod us|es a tra|
|00001800| 6e 73 6c 61 74 69 6f 6e | 20 6f 66 20 31 2c 20 61 |nslation| of 1, a|
|00001810| 73 20 66 6f 72 20 65 78 | 61 6d 70 6c 65 20 2d 74 |s for ex|ample -t|
|00001820| 63 31 2e 20 20 52 65 6d | 65 6d 62 65 72 20 74 68 |c1. Rem|ember th|
|00001830| 61 74 20 74 68 65 0a 58 | 66 61 73 74 65 73 74 20 |at the.X|fastest |
|00001840| 68 6f 72 69 7a 6f 6e 74 | 61 6c 20 73 70 65 65 64 |horizont|al speed|
|00001850| 20 69 73 20 43 2f 32 20 | 61 6e 64 20 74 68 65 20 | is C/2 |and the |
|00001860| 66 61 73 74 65 73 74 20 | 64 69 61 67 6f 6e 61 6c |fastest |diagonal|
|00001870| 20 73 70 65 65 64 20 69 | 73 20 43 2f 34 2c 20 73 | speed i|s C/4, s|
|00001880| 6f 0a 58 74 68 61 74 20 | 66 6f 72 20 65 78 61 6d |o.Xthat |for exam|
|00001890| 70 6c 65 2c 20 75 73 69 | 6e 67 20 2d 74 63 32 20 |ple, usi|ng -tc2 |
|000018a0| 66 6f 72 20 61 20 70 65 | 72 69 6f 64 20 33 20 73 |for a pe|riod 3 s|
|000018b0| 70 61 63 65 73 68 69 70 | 20 77 69 6c 6c 20 66 69 |paceship| will fi|
|000018c0| 6e 64 20 6e 6f 74 68 69 | 6e 67 2e 0a 58 0a 58 42 |nd nothi|ng..X.XB|
|000018d0| 79 20 64 65 66 61 75 6c | 74 2c 20 74 68 65 20 70 |y defaul|t, the p|
|000018e0| 72 6f 67 72 61 6d 20 6c | 6f 6f 6b 73 20 66 6f 72 |rogram l|ooks for|
|000018f0| 20 6f 62 6a 65 63 74 73 | 20 73 75 63 68 20 74 68 | objects| such th|
|00001900| 61 74 20 67 65 6e 65 72 | 61 74 69 6f 6e 20 4e 2d |at gener|ation N-|
|00001910| 31 20 69 6d 70 6c 69 65 | 73 0a 58 67 65 6e 65 72 |1 implie|s.Xgener|
|00001920| 61 74 69 6f 6e 20 30 2c | 20 73 6f 20 74 68 61 74 |ation 0,| so that|
|00001930| 20 70 65 72 69 6f 64 69 | 63 20 6f 62 6a 65 63 74 | periodi|c object|
|00001940| 73 20 63 61 6e 20 62 65 | 20 66 6f 75 6e 64 2e 20 |s can be| found. |
|00001950| 20 54 68 65 20 2d 70 20 | 63 6f 6d 6d 61 6e 64 20 | The -p |command |
|00001960| 6c 69 6e 65 0a 58 6f 70 | 74 69 6f 6e 20 64 69 73 |line.Xop|tion dis|
|00001970| 61 62 6c 65 73 20 74 68 | 69 73 20 63 69 72 63 75 |ables th|is circu|
|00001980| 6c 61 72 20 64 65 70 65 | 6e 64 65 6e 63 79 2c 20 |lar depe|ndency, |
|00001990| 73 6f 20 74 68 61 74 20 | 67 65 6e 65 72 61 74 69 |so that |generati|
|000019a0| 6f 6e 20 30 20 68 61 73 | 20 6e 6f 20 70 61 73 74 |on 0 has| no past|
|000019b0| 0a 58 61 6e 64 20 67 65 | 6e 65 72 61 74 69 6f 6e |.Xand ge|neration|
|000019c0| 20 4e 2d 31 20 68 61 73 | 20 6e 6f 20 66 75 74 75 | N-1 has| no futu|
|000019d0| 72 65 2e 20 20 54 68 69 | 73 20 65 6e 61 62 6c 65 |re. Thi|s enable|
|000019e0| 73 20 79 6f 75 20 74 6f | 20 73 65 61 72 63 68 20 |s you to| search |
|000019f0| 66 6f 72 20 74 68 65 20 | 70 61 72 65 6e 74 73 0a |for the |parents.|
|00001a00| 58 6f 66 20 61 6e 79 20 | 6f 62 6a 65 63 74 20 79 |Xof any |object y|
|00001a10| 6f 75 20 64 65 73 69 72 | 65 2e 20 20 43 6f 6d 6d |ou desir|e. Comm|
|00001a20| 6f 6e 6c 79 20 79 6f 75 | 20 73 70 65 63 69 66 79 |only you| specify|
|00001a30| 20 2d 67 32 20 77 69 74 | 68 20 74 68 69 73 20 6f | -g2 wit|h this o|
|00001a40| 70 74 69 6f 6e 2c 20 74 | 6f 0a 58 6c 6f 6f 6b 20 |ption, t|o.Xlook |
|00001a50| 6f 6e 6c 79 20 6f 6e 65 | 20 67 65 6e 65 72 61 74 |only one| generat|
|00001a60| 69 6f 6e 20 62 61 63 6b | 2e 20 20 54 6f 20 6c 6f |ion back|. To lo|
|00001a70| 6f 6b 20 66 6f 72 20 70 | 61 72 65 6e 74 73 20 6f |ok for p|arents o|
|00001a80| 66 20 61 6e 20 6f 62 6a | 65 63 74 2c 20 79 6f 75 |f an obj|ect, you|
|00001a90| 20 73 70 65 63 69 66 79 | 0a 58 74 68 65 20 63 65 | specify|.Xthe ce|
|00001aa0| 6c 6c 73 20 6f 66 20 74 | 68 65 20 6f 62 6a 65 63 |lls of t|he objec|
|00001ab0| 74 20 69 6e 20 67 65 6e | 65 72 61 74 69 6f 6e 20 |t in gen|eration |
|00001ac0| 4e 2d 31 2c 20 61 6e 64 | 20 6c 65 61 76 65 20 74 |N-1, and| leave t|
|00001ad0| 68 65 20 65 61 72 6c 69 | 65 72 20 67 65 6e 65 72 |he earli|er gener|
|00001ae0| 61 74 69 6f 6e 73 0a 58 | 75 6e 6b 6e 6f 77 6e 2e |ations.X|unknown.|
|00001af0| 20 20 54 68 65 20 27 63 | 27 20 63 6f 6d 6d 61 6e | The 'c|' comman|
|00001b00| 64 20 69 73 20 75 73 65 | 66 75 6c 20 77 69 74 68 |d is use|ful with|
|00001b10| 20 74 68 69 73 20 6f 70 | 74 69 6f 6e 20 74 6f 20 | this op|tion to |
|00001b20| 63 6f 6d 70 6c 65 74 65 | 6c 79 20 73 70 65 63 69 |complete|ly speci|
|00001b30| 66 79 0a 58 74 68 65 20 | 6c 61 73 74 20 67 65 6e |fy.Xthe |last gen|
|00001b40| 65 72 61 74 69 6f 6e 20 | 28 73 65 65 20 62 65 6c |eration |(see bel|
|00001b50| 6f 77 29 2e 0a 58 0a 58 | 54 68 65 20 73 65 61 72 |ow)..X.X|The sear|
|00001b60| 63 68 20 70 72 6f 67 72 | 61 6d 20 69 73 20 61 6c |ch progr|am is al|
|00001b70| 77 61 79 73 20 69 6e 20 | 6f 6e 65 20 6f 66 20 74 |ways in |one of t|
|00001b80| 77 6f 20 6d 6f 64 65 73 | 2e 20 20 49 74 20 69 73 |wo modes|. It is|
|00001b90| 20 65 69 74 68 65 72 20 | 69 6e 20 63 6f 6d 6d 61 | either |in comma|
|00001ba0| 6e 64 0a 58 6d 6f 64 65 | 2c 20 6f 72 20 69 6e 20 |nd.Xmode|, or in |
|00001bb0| 73 65 61 72 63 68 20 6d | 6f 64 65 2e 20 20 57 68 |search m|ode. Wh|
|00001bc0| 65 6e 20 66 69 72 73 74 | 20 73 74 61 72 74 65 64 |en first| started|
|00001bd0| 2c 20 69 74 20 69 73 20 | 69 6e 20 63 6f 6d 6d 61 |, it is |in comma|
|00001be0| 6e 64 20 6d 6f 64 65 2e | 0a 58 43 6f 6d 6d 61 6e |nd mode.|.XComman|
|00001bf0| 64 20 6d 6f 64 65 20 69 | 73 20 69 6e 64 69 63 61 |d mode i|s indica|
|00001c00| 74 65 64 20 62 79 20 74 | 68 65 20 70 72 65 73 65 |ted by t|he prese|
|00001c10| 6e 63 65 20 6f 66 20 61 | 20 22 3e 20 22 20 70 72 |nce of a| "> " pr|
|00001c20| 6f 6d 70 74 2e 20 20 57 | 68 65 6e 20 69 6e 0a 58 |ompt. W|hen in.X|
|00001c30| 63 6f 6d 6d 61 6e 64 20 | 6d 6f 64 65 2c 20 79 6f |command |mode, yo|
|00001c40| 75 20 63 61 6e 20 65 6e | 74 65 72 20 63 6f 6d 6d |u can en|ter comm|
|00001c50| 61 6e 64 73 20 74 6f 20 | 74 68 65 20 70 72 6f 67 |ands to |the prog|
|00001c60| 72 61 6d 2c 20 6f 6e 65 | 20 70 65 72 20 6c 69 6e |ram, one| per lin|
|00001c70| 65 2e 0a 58 54 6f 20 6c | 65 61 76 65 20 63 6f 6d |e..XTo l|eave com|
|00001c80| 6d 61 6e 64 20 6d 6f 64 | 65 20 61 6e 64 20 62 65 |mand mod|e and be|
|00001c90| 67 69 6e 20 73 65 61 72 | 63 68 69 6e 67 2c 20 79 |gin sear|ching, y|
|00001ca0| 6f 75 20 73 69 6d 70 6c | 79 20 65 6e 74 65 72 20 |ou simpl|y enter |
|00001cb0| 61 20 62 6c 61 6e 6b 20 | 6c 69 6e 65 2e 0a 58 59 |a blank |line..XY|
|00001cc0| 6f 75 20 63 61 6e 20 67 | 65 74 20 62 61 63 6b 20 |ou can g|et back |
|00001cd0| 74 6f 20 63 6f 6d 6d 61 | 6e 64 20 6d 6f 64 65 20 |to comma|nd mode |
|00001ce0| 61 67 61 69 6e 20 62 79 | 20 67 65 6e 65 72 61 74 |again by| generat|
|00001cf0| 69 6e 67 20 74 68 65 20 | 53 49 47 49 4e 54 20 73 |ing the |SIGINT s|
|00001d00| 69 67 6e 61 6c 2e 0a 58 | 57 68 65 6e 20 74 68 69 |ignal..X|When thi|
|00001d10| 73 20 69 73 20 64 6f 6e | 65 2c 20 74 68 65 20 70 |s is don|e, the p|
|00001d20| 72 6f 67 72 61 6d 20 77 | 69 6c 6c 20 73 74 6f 70 |rogram w|ill stop|
|00001d30| 20 73 65 61 72 63 68 69 | 6e 67 20 61 74 20 61 20 | searchi|ng at a |
|00001d40| 63 6f 6e 76 65 6e 69 65 | 6e 74 20 70 6c 61 63 65 |convenie|nt place|
|00001d50| 2c 0a 58 64 69 73 70 6c | 61 79 20 74 68 65 20 6c |,.Xdispl|ay the l|
|00001d60| 61 73 74 65 73 74 20 73 | 74 61 74 75 73 20 6f 66 |astest s|tatus of|
|00001d70| 20 74 68 65 20 73 65 61 | 72 63 68 2c 20 61 6e 64 | the sea|rch, and|
|00001d80| 20 72 65 61 64 20 63 6f | 6d 6d 61 6e 64 73 20 61 | read co|mmands a|
|00001d90| 67 61 69 6e 2e 20 20 44 | 6f 20 6e 6f 74 0a 58 66 |gain. D|o not.Xf|
|00001da0| 6f 72 67 65 74 20 74 6f | 20 6c 61 74 65 72 20 74 |orget to| later t|
|00001db0| 79 70 65 20 74 68 65 20 | 62 6c 61 6e 6b 20 6c 69 |ype the |blank li|
|00001dc0| 6e 65 20 74 6f 20 63 6f | 6e 74 69 6e 75 65 20 73 |ne to co|ntinue s|
|00001dd0| 65 61 72 63 68 69 6e 67 | 20 61 67 61 69 6e 21 0a |earching| again!.|
|00001de0| 58 0a 58 57 68 65 6e 20 | 66 69 72 73 74 20 73 74 |X.XWhen |first st|
|00001df0| 61 72 74 65 64 2c 20 79 | 6f 75 20 6d 61 79 20 77 |arted, y|ou may w|
|00001e00| 69 73 68 20 74 6f 20 73 | 70 65 63 69 66 79 20 74 |ish to s|pecify t|
|00001e10| 68 65 20 73 74 61 74 65 | 20 6f 66 20 73 6f 6d 65 |he state| of some|
|00001e20| 20 63 65 6c 6c 73 20 74 | 6f 0a 58 67 75 69 64 65 | cells t|o.Xguide|
|00001e30| 20 74 68 65 20 73 65 61 | 72 63 68 2e 20 20 59 6f | the sea|rch. Yo|
|00001e40| 75 20 63 61 6e 20 73 70 | 65 63 69 66 79 20 74 68 |u can sp|ecify th|
|00001e50| 61 74 20 61 6e 79 20 63 | 65 6c 6c 20 69 6e 20 61 |at any c|ell in a|
|00001e60| 6e 79 20 67 65 6e 65 72 | 61 74 69 6f 6e 20 73 68 |ny gener|ation sh|
|00001e70| 6f 75 6c 64 0a 58 62 65 | 20 65 69 74 68 65 72 20 |ould.Xbe| either |
|00001e80| 4f 4e 20 6f 72 20 4f 46 | 46 2e 20 20 43 65 6c 6c |ON or OF|F. Cell|
|00001e90| 73 20 74 68 61 74 20 79 | 6f 75 20 64 6f 20 6e 6f |s that y|ou do no|
|00001ea0| 74 20 73 70 65 63 69 66 | 79 20 72 65 6d 61 69 6e |t specif|y remain|
|00001eb0| 20 75 6e 6b 6e 6f 77 6e | 2e 20 20 41 73 20 61 6e | unknown|. As an|
|00001ec0| 0a 58 65 78 61 6d 70 6c | 65 2c 20 69 66 20 79 6f |.Xexampl|e, if yo|
|00001ed0| 75 20 77 65 72 65 20 6c | 6f 6f 6b 69 6e 67 20 66 |u were l|ooking f|
|00001ee0| 6f 72 20 61 20 70 65 72 | 69 6f 64 20 33 20 6f 73 |or a per|iod 3 os|
|00001ef0| 63 69 6c 6c 61 74 6f 72 | 2c 20 79 6f 75 20 6d 69 |cillator|, you mi|
|00001f00| 67 68 74 20 77 61 6e 74 | 20 74 6f 0a 58 73 70 65 |ght want| to.Xspe|
|00001f10| 63 69 66 79 20 74 68 65 | 20 6d 69 64 64 6c 65 20 |cify the| middle |
|00001f20| 63 65 6c 6c 20 61 73 20 | 62 65 69 6e 67 20 4f 4e |cell as |being ON|
|00001f30| 20 69 6e 20 67 65 6e 65 | 72 61 74 69 6f 6e 20 30 | in gene|ration 0|
|00001f40| 2c 20 61 6e 64 20 4f 46 | 46 20 69 6e 20 67 65 6e |, and OF|F in gen|
|00001f50| 65 72 61 74 69 6f 6e 20 | 31 2e 0a 58 54 68 69 73 |eration |1..XThis|
|00001f60| 20 77 6f 75 6c 64 20 66 | 6f 72 63 65 20 70 65 72 | would f|orce per|
|00001f70| 69 6f 64 20 33 20 62 65 | 68 61 76 69 6f 72 2e 20 |iod 3 be|havior. |
|00001f80| 20 4e 6f 74 65 20 74 68 | 61 74 20 77 68 65 6e 20 | Note th|at when |
|00001f90| 79 6f 75 20 73 70 65 63 | 69 66 79 20 63 65 6c 6c |you spec|ify cell|
|00001fa0| 73 2c 20 74 68 65 0a 58 | 73 74 61 74 65 20 73 70 |s, the.X|state sp|
|00001fb0| 65 63 69 66 69 65 64 20 | 69 73 20 70 65 72 6d 61 |ecified |is perma|
|00001fc0| 6e 65 6e 74 2e 20 20 54 | 68 65 20 70 72 6f 67 72 |nent. T|he progr|
|00001fd0| 61 6d 20 77 69 6c 6c 20 | 6e 6f 74 20 72 65 76 65 |am will |not reve|
|00001fe0| 72 73 65 20 79 6f 75 72 | 20 73 65 74 74 69 6e 67 |rse your| setting|
|00001ff0| 73 2c 0a 58 61 6e 64 20 | 74 68 65 72 65 66 6f 72 |s,.Xand |therefor|
|00002000| 65 20 63 61 6e 20 6e 6f | 74 20 66 69 6e 64 20 61 |e can no|t find a|
|00002010| 6e 79 20 6f 62 6a 65 63 | 74 73 20 77 68 69 63 68 |ny objec|ts which|
|00002020| 20 64 6f 20 6e 6f 74 20 | 6d 61 74 63 68 20 79 6f | do not |match yo|
|00002030| 75 72 20 73 65 74 74 69 | 6e 67 73 2e 0a 58 41 6c |ur setti|ngs..XAl|
|00002040| 73 6f 20 6e 6f 74 65 20 | 74 68 61 74 20 73 65 74 |so note |that set|
|00002050| 74 69 6e 67 73 20 75 6e | 66 6f 72 74 75 6e 61 74 |tings un|fortunat|
|00002060| 65 6c 79 20 63 61 6e 6e | 6f 74 20 62 65 20 63 6f |ely cann|ot be co|
|00002070| 72 72 65 63 74 65 64 2c | 20 73 6f 20 69 66 20 79 |rrected,| so if y|
|00002080| 6f 75 20 73 65 74 0a 58 | 74 68 65 20 77 72 6f 6e |ou set.X|the wron|
|00002090| 67 20 63 65 6c 6c 20 62 | 79 20 6d 69 73 74 61 6b |g cell b|y mistak|
|000020a0| 65 2c 20 79 6f 75 20 6d | 75 73 74 20 6c 65 61 76 |e, you m|ust leav|
|000020b0| 65 20 74 68 65 20 70 72 | 6f 67 72 61 6d 20 61 6e |e the pr|ogram an|
|000020c0| 64 20 73 74 61 72 74 20 | 61 67 61 69 6e 2e 0a 58 |d start |again..X|
|000020d0| 0a 58 54 6f 20 73 70 65 | 63 69 66 79 20 61 20 63 |.XTo spe|cify a c|
|000020e0| 65 6c 6c 2c 20 79 6f 75 | 20 75 73 65 20 74 68 65 |ell, you| use the|
|000020f0| 20 27 73 27 20 63 6f 6d | 6d 61 6e 64 20 77 68 65 | 's' com|mand whe|
|00002100| 6e 20 69 6e 20 63 6f 6d | 6d 61 6e 64 20 6d 6f 64 |n in com|mand mod|
|00002110| 65 2e 20 20 54 68 69 73 | 20 63 6f 6d 6d 61 6e 64 |e. This| command|
|00002120| 0a 58 74 61 6b 65 73 20 | 32 20 6f 72 20 33 20 61 |.Xtakes |2 or 3 a|
|00002130| 72 67 75 6d 65 6e 74 73 | 2e 20 20 54 68 65 20 66 |rguments|. The f|
|00002140| 69 72 73 74 20 74 77 6f | 20 61 72 67 75 6d 65 6e |irst two| argumen|
|00002150| 74 73 20 61 72 65 20 74 | 68 65 20 72 6f 77 20 61 |ts are t|he row a|
|00002160| 6e 64 20 63 6f 6c 75 6d | 6e 0a 58 6e 75 6d 62 65 |nd colum|n.Xnumbe|
|00002170| 72 73 20 6f 66 20 74 68 | 65 20 63 65 6c 6c 20 74 |rs of th|e cell t|
|00002180| 6f 20 73 65 74 2e 20 20 | 54 68 65 20 74 68 69 72 |o set. |The thir|
|00002190| 64 20 6e 75 6d 62 65 72 | 20 69 73 20 65 69 74 68 |d number| is eith|
|000021a0| 65 72 20 31 20 66 6f 72 | 20 73 65 74 74 69 6e 67 |er 1 for| setting|
|000021b0| 20 74 68 65 0a 58 63 65 | 6c 6c 20 4f 4e 2c 20 6f | the.Xce|ll ON, o|
|000021c0| 72 20 30 20 66 6f 72 20 | 73 65 74 74 69 6e 67 20 |r 0 for |setting |
|000021d0| 74 68 65 20 63 65 6c 6c | 20 4f 46 46 2e 20 20 49 |the cell| OFF. I|
|000021e0| 66 20 74 68 65 20 74 68 | 69 72 64 20 6e 75 6d 62 |f the th|ird numb|
|000021f0| 65 72 20 69 73 20 6f 6d | 69 74 74 65 64 2c 0a 58 |er is om|itted,.X|
|00002200| 74 68 65 6e 20 4f 4e 20 | 69 73 20 61 73 73 75 6d |then ON |is assum|
|00002210| 65 64 2e 20 20 54 68 65 | 20 63 65 6c 6c 20 69 73 |ed. The| cell is|
|00002220| 20 61 6c 77 61 79 73 20 | 73 65 74 20 69 6e 20 74 | always |set in t|
|00002230| 68 65 20 63 75 72 72 65 | 6e 74 20 67 65 6e 65 72 |he curre|nt gener|
|00002240| 61 74 69 6f 6e 2c 20 77 | 68 69 63 68 0a 58 69 73 |ation, w|hich.Xis|
|00002250| 20 74 68 65 20 6f 6e 65 | 20 6c 61 73 74 20 64 69 | the one| last di|
|00002260| 73 70 6c 61 79 65 64 2e | 20 20 49 66 20 6e 65 63 |splayed.| If nec|
|00002270| 65 73 73 61 72 79 2c 20 | 79 6f 75 20 75 73 65 20 |essary, |you use |
|00002280| 74 68 65 20 27 6e 27 20 | 6f 72 20 27 70 27 20 63 |the 'n' |or 'p' c|
|00002290| 6f 6d 6d 61 6e 64 73 0a | 58 74 6f 20 63 68 61 6e |ommands.|Xto chan|
|000022a0| 67 65 20 74 68 65 20 63 | 75 72 72 65 6e 74 20 67 |ge the c|urrent g|
|000022b0| 65 6e 65 72 61 74 69 6f | 6e 20 74 6f 20 74 68 65 |eneratio|n to the|
|000022c0| 20 64 65 73 69 72 65 64 | 20 6f 6e 65 20 62 65 66 | desired| one bef|
|000022d0| 6f 72 65 20 75 73 69 6e | 67 20 74 68 65 20 27 73 |ore usin|g the 's|
|000022e0| 27 0a 58 63 6f 6d 6d 61 | 6e 64 2e 20 20 46 6f 72 |'.Xcomma|nd. For|
|000022f0| 20 65 78 61 6d 70 6c 65 | 2c 20 69 66 20 74 68 65 | example|, if the|
|00002300| 20 63 75 72 72 65 6e 74 | 6c 79 20 64 69 73 70 6c | current|ly displ|
|00002310| 61 79 65 64 20 67 65 6e | 65 72 61 74 69 6f 6e 20 |ayed gen|eration |
|00002320| 69 73 20 67 65 6e 65 72 | 61 74 69 6f 6e 20 30 2c |is gener|ation 0,|
|00002330| 0a 58 65 6e 74 65 72 69 | 6e 67 20 22 73 20 35 20 |.Xenteri|ng "s 5 |
|00002340| 36 22 20 77 6f 75 6c 64 | 20 73 65 74 20 74 68 65 |6" would| set the|
|00002350| 20 63 65 6c 6c 20 61 74 | 20 72 6f 77 20 35 20 63 | cell at| row 5 c|
|00002360| 6f 6c 75 6d 6e 20 36 20 | 6f 66 20 67 65 6e 65 72 |olumn 6 |of gener|
|00002370| 61 74 69 6f 6e 20 30 20 | 74 6f 20 4f 4e 2c 0a 58 |ation 0 |to ON,.X|
|00002380| 77 68 65 72 65 61 73 20 | 22 73 20 32 20 37 20 30 |whereas |"s 2 7 0|
|00002390| 22 20 77 6f 75 6c 64 20 | 73 65 74 20 74 68 65 20 |" would |set the |
|000023a0| 63 65 6c 6c 20 61 74 20 | 72 6f 77 20 32 20 63 6f |cell at |row 2 co|
|000023b0| 6c 75 6d 6e 20 37 20 74 | 6f 20 4f 46 46 2e 20 20 |lumn 7 t|o OFF. |
|000023c0| 41 73 20 61 20 73 68 6f | 72 74 63 75 74 2c 0a 58 |As a sho|rtcut,.X|
|000023d0| 79 6f 75 20 63 61 6e 20 | 6f 6d 69 74 20 74 68 65 |you can |omit the|
|000023e0| 20 27 73 27 20 6c 65 74 | 74 65 72 2c 20 73 6f 20 | 's' let|ter, so |
|000023f0| 74 68 61 74 20 74 68 65 | 20 63 6f 6d 6d 61 6e 64 |that the| command|
|00002400| 20 22 35 20 36 22 20 77 | 6f 75 6c 64 20 73 65 74 | "5 6" w|ould set|
|00002410| 20 74 68 65 20 63 65 6c | 6c 20 61 74 0a 58 72 6f | the cel|l at.Xro|
|00002420| 77 20 35 20 63 6f 6c 75 | 6d 6e 20 36 20 4f 4e 2e |w 5 colu|mn 6 ON.|
|00002430| 20 20 49 66 20 79 6f 75 | 20 61 72 65 20 75 73 69 | If you| are usi|
|00002440| 6e 67 20 74 68 65 20 2d | 73 72 20 6f 72 20 2d 73 |ng the -|sr or -s|
|00002450| 63 20 6f 70 74 69 6f 6e | 73 20 66 6f 72 20 73 79 |c option|s for sy|
|00002460| 6d 6d 65 74 72 79 2c 20 | 79 6f 75 0a 58 64 6f 6e |mmetry, |you.Xdon|
|00002470| 27 74 20 68 61 76 65 20 | 74 6f 20 65 6e 74 65 72 |'t have |to enter|
|00002480| 20 74 68 65 20 73 79 6d | 6d 65 74 72 69 63 20 63 | the sym|metric c|
|00002490| 65 6c 6c 73 20 73 69 6e | 63 65 20 74 68 65 20 70 |ells sin|ce the p|
|000024a0| 72 6f 67 72 61 6d 20 64 | 6f 65 73 20 74 68 61 74 |rogram d|oes that|
|000024b0| 20 66 6f 72 20 79 6f 75 | 2e 0a 58 0a 58 59 6f 75 | for you|..X.XYou|
|000024c0| 20 63 61 6e 20 75 73 65 | 20 74 68 65 20 2d 69 20 | can use| the -i |
|000024d0| 6f 72 20 2d 69 61 20 6f | 70 74 69 6f 6e 73 20 74 |or -ia o|ptions t|
|000024e0| 6f 20 69 6e 70 75 74 20 | 74 68 65 20 69 6e 69 74 |o input |the init|
|000024f0| 69 61 6c 20 73 65 74 74 | 69 6e 67 73 20 66 6f 72 |ial sett|ings for|
|00002500| 20 65 69 74 68 65 72 0a | 58 67 65 6e 65 72 61 74 | either.|Xgenerat|
|00002510| 69 6f 6e 20 30 20 6f 72 | 20 74 68 65 20 6c 61 73 |ion 0 or| the las|
|00002520| 74 20 67 65 6e 65 72 61 | 74 69 6f 6e 20 69 6e 73 |t genera|tion ins|
|00002530| 74 65 61 64 20 6f 66 20 | 74 79 70 69 6e 67 20 69 |tead of |typing i|
|00002540| 6e 20 74 68 65 69 72 20 | 63 6f 6f 72 64 69 6e 61 |n their |coordina|
|00002550| 74 65 73 0a 58 6d 61 6e | 75 61 6c 6c 79 20 61 73 |tes.Xman|ually as|
|00002560| 20 61 62 6f 76 65 2e 20 | 20 54 68 65 20 73 65 74 | above. | The set|
|00002570| 74 69 6e 67 20 69 73 20 | 6e 6f 72 6d 61 6c 6c 79 |ting is |normally|
|00002580| 20 66 6f 72 20 67 65 6e | 65 72 61 74 69 6f 6e 20 | for gen|eration |
|00002590| 30 2c 20 62 75 74 20 69 | 66 20 74 68 65 0a 58 2d |0, but i|f the.X-|
|000025a0| 70 20 6f 70 74 69 6f 6e | 20 77 61 73 20 61 6c 73 |p option| was als|
|000025b0| 6f 20 75 73 65 64 2c 20 | 74 68 65 6e 20 74 68 65 |o used, |then the|
|000025c0| 20 73 65 74 74 69 6e 67 | 20 69 73 20 66 6f 72 20 | setting| is for |
|000025d0| 74 68 65 20 6c 61 73 74 | 20 67 65 6e 65 72 61 74 |the last| generat|
|000025e0| 69 6f 6e 2e 20 20 54 68 | 65 0a 58 73 70 65 63 69 |ion. Th|e.Xspeci|
|000025f0| 66 69 65 64 20 66 69 6c | 65 20 63 6f 6e 74 61 69 |fied fil|e contai|
|00002600| 6e 73 20 61 20 70 69 63 | 74 75 72 65 20 6f 66 20 |ns a pic|ture of |
|00002610| 74 68 65 20 63 65 6c 6c | 73 2c 20 77 69 74 68 20 |the cell|s, with |
|00002620| 27 4f 27 20 6f 72 20 27 | 2a 27 20 69 6e 64 69 63 |'O' or '|*' indic|
|00002630| 61 74 69 6e 67 0a 58 4f | 4e 2c 20 27 2e 27 20 69 |ating.XO|N, '.' i|
|00002640| 6e 64 69 63 61 74 69 6e | 67 20 4f 46 46 2c 20 61 |ndicatin|g OFF, a|
|00002650| 6e 64 20 27 3f 27 20 69 | 6e 64 69 63 61 74 69 6e |nd '?' i|ndicatin|
|00002660| 67 20 75 6e 6b 6e 6f 77 | 6e 2e 20 20 49 66 20 79 |g unknow|n. If y|
|00002670| 6f 75 20 75 73 65 20 2d | 69 2c 20 74 68 65 6e 0a |ou use -|i, then.|
|00002680| 58 6f 6e 6c 79 20 74 68 | 65 20 4f 4e 20 63 65 6c |Xonly th|e ON cel|
|00002690| 6c 73 20 61 72 65 20 73 | 65 74 2c 20 6d 61 6b 69 |ls are s|et, maki|
|000026a0| 6e 67 20 74 68 65 20 4f | 46 46 20 63 65 6c 6c 73 |ng the O|FF cells|
|000026b0| 20 73 74 61 79 20 75 6e | 6b 6e 6f 77 6e 2e 20 20 | stay un|known. |
|000026c0| 49 66 20 79 6f 75 20 75 | 73 65 0a 58 2d 69 61 2c |If you u|se.X-ia,|
|000026d0| 20 74 68 65 6e 20 62 6f | 74 68 20 4f 4e 20 61 6e | then bo|th ON an|
|000026e0| 64 20 4f 46 46 20 63 65 | 6c 6c 73 20 61 72 65 20 |d OFF ce|lls are |
|000026f0| 73 65 74 2e 20 20 59 6f | 75 20 63 61 6e 20 73 74 |set. Yo|u can st|
|00002700| 69 6c 6c 20 73 70 65 63 | 69 66 79 20 61 64 64 69 |ill spec|ify addi|
|00002710| 74 69 6f 6e 61 6c 0a 58 | 63 65 6c 6c 73 20 61 66 |tional.X|cells af|
|00002720| 74 65 72 20 74 68 65 20 | 6f 6e 65 73 20 69 6e 20 |ter the |ones in |
|00002730| 74 68 65 20 66 69 6c 65 | 20 68 61 76 65 20 62 65 |the file| have be|
|00002740| 65 6e 20 72 65 61 64 2e | 0a 58 0a 58 54 68 65 20 |en read.|.X.XThe |
|00002750| 27 63 27 20 63 6f 6d 6d | 61 6e 64 20 77 69 6c 6c |'c' comm|and will|
|00002760| 20 73 65 74 20 61 6c 6c | 20 74 68 65 20 63 75 72 | set all| the cur|
|00002770| 72 65 6e 74 6c 79 20 75 | 6e 6b 6e 6f 77 6e 20 63 |rently u|nknown c|
|00002780| 65 6c 6c 73 20 69 6e 20 | 74 68 65 20 63 75 72 72 |ells in |the curr|
|00002790| 65 6e 74 0a 58 67 65 6e | 65 72 61 74 69 6f 6e 20 |ent.Xgen|eration |
|000027a0| 74 6f 20 74 68 65 20 4f | 46 46 20 73 74 61 74 65 |to the O|FF state|
|000027b0| 2e 20 20 54 68 69 73 20 | 69 73 20 69 6e 74 65 6e |. This |is inten|
|000027c0| 64 65 64 20 74 6f 20 62 | 65 20 75 73 65 64 20 77 |ded to b|e used w|
|000027d0| 68 65 6e 20 73 65 61 72 | 63 68 69 6e 67 0a 58 66 |hen sear|ching.Xf|
|000027e0| 6f 72 20 70 61 72 65 6e | 74 73 20 6f 66 20 61 6e |or paren|ts of an|
|000027f0| 20 6f 62 6a 65 63 74 20 | 74 68 61 74 20 79 6f 75 | object |that you|
|00002800| 20 68 61 76 65 20 65 6e | 74 65 72 65 64 2c 20 61 | have en|tered, a|
|00002810| 6e 64 20 79 6f 75 20 6b | 6e 6f 77 20 65 78 61 63 |nd you k|now exac|
|00002820| 74 6c 79 20 77 68 61 74 | 0a 58 74 68 65 20 6f 62 |tly what|.Xthe ob|
|00002830| 6a 65 63 74 20 69 6e 20 | 74 68 65 20 6c 61 73 74 |ject in |the last|
|00002840| 20 67 65 6e 65 72 61 74 | 69 6f 6e 20 6c 6f 6f 6b | generat|ion look|
|00002850| 73 20 6c 69 6b 65 2e 20 | 20 54 68 69 73 20 63 6f |s like. | This co|
|00002860| 6d 6d 61 6e 64 20 72 65 | 71 75 69 72 65 73 0a 58 |mmand re|quires.X|
|00002870| 63 6f 6e 66 69 72 6d 61 | 74 69 6f 6e 20 62 65 66 |confirma|tion bef|
|00002880| 6f 72 65 20 69 74 20 69 | 73 20 61 63 74 65 64 20 |ore it i|s acted |
|00002890| 6f 6e 2e 0a 58 0a 58 4a | 75 73 74 20 62 65 66 6f |on..X.XJ|ust befo|
|000028a0| 72 65 20 65 6e 74 65 72 | 69 6e 67 20 63 6f 6d 6d |re enter|ing comm|
|000028b0| 61 6e 64 20 6d 6f 64 65 | 2c 20 6f 72 20 6f 63 63 |and mode|, or occ|
|000028c0| 61 73 69 6f 6e 61 6c 6c | 79 20 69 66 20 61 75 74 |asionall|y if aut|
|000028d0| 6f 6d 61 74 69 63 20 76 | 69 65 77 69 6e 67 20 69 |omatic v|iewing i|
|000028e0| 73 0a 58 65 6e 61 62 6c | 65 64 2c 20 74 68 65 20 |s.Xenabl|ed, the |
|000028f0| 70 72 6f 67 72 61 6d 20 | 77 69 6c 6c 20 64 69 73 |program |will dis|
|00002900| 70 6c 61 79 20 74 68 65 | 20 63 75 72 72 65 6e 74 |play the| current|
|00002910| 20 73 74 61 74 75 73 20 | 6f 66 20 74 68 65 20 73 | status |of the s|
|00002920| 65 61 72 63 68 2e 0a 58 | 43 65 6c 6c 73 20 6d 61 |earch..X|Cells ma|
|00002930| 72 6b 65 64 20 61 73 20 | 27 4f 27 20 61 72 65 20 |rked as |'O' are |
|00002940| 4f 4e 2c 20 63 65 6c 6c | 73 20 6d 61 72 6b 65 64 |ON, cell|s marked|
|00002950| 20 61 73 20 27 2e 27 20 | 61 72 65 20 4f 46 46 2c | as '.' |are OFF,|
|00002960| 20 61 6e 64 20 63 65 6c | 6c 73 20 6d 61 72 6b 65 | and cel|ls marke|
|00002970| 64 0a 58 61 73 20 27 3f | 27 20 61 72 65 20 63 75 |d.Xas '?|' are cu|
|00002980| 72 72 65 6e 74 6c 79 20 | 75 6e 6b 6e 6f 77 6e 2e |rrently |unknown.|
|00002990| 20 20 54 68 65 20 67 65 | 6e 65 72 61 74 69 6f 6e | The ge|neration|
|000029a0| 20 6e 75 6d 62 65 72 20 | 61 6e 64 20 74 68 65 20 | number |and the |
|000029b0| 6e 75 6d 62 65 72 20 6f | 66 20 4f 4e 0a 58 63 65 |number o|f ON.Xce|
|000029c0| 6c 6c 73 20 61 72 65 20 | 61 6c 73 6f 20 67 69 76 |lls are |also giv|
|000029d0| 65 6e 2c 20 61 6c 6f 6e | 67 20 77 69 74 68 20 73 |en, alon|g with s|
|000029e0| 6f 6d 65 20 6f 66 20 74 | 68 65 20 63 6f 6d 6d 61 |ome of t|he comma|
|000029f0| 6e 64 20 6c 69 6e 65 20 | 6f 70 74 69 6f 6e 73 20 |nd line |options |
|00002a00| 74 68 61 74 20 77 65 72 | 65 0a 58 75 73 65 64 20 |that wer|e.Xused |
|00002a10| 74 6f 20 73 74 61 72 74 | 20 74 68 65 20 70 72 6f |to start| the pro|
|00002a20| 67 72 61 6d 2e 0a 58 0a | 58 49 66 20 79 6f 75 20 |gram..X.|XIf you |
|00002a30| 64 6f 6e 27 74 20 6c 69 | 6b 65 20 74 6f 20 6b 65 |don't li|ke to ke|
|00002a40| 65 70 20 68 69 74 74 69 | 6e 67 20 69 6e 74 65 72 |ep hitti|ng inter|
|00002a50| 72 75 70 74 20 69 6e 20 | 6f 72 64 65 72 20 74 6f |rupt in |order to|
|00002a60| 20 73 65 65 20 74 68 65 | 20 70 72 6f 67 72 65 73 | see the| progres|
|00002a70| 73 20 6f 66 0a 58 61 20 | 73 65 61 72 63 68 2c 20 |s of.Xa |search, |
|00002a80| 79 6f 75 20 63 61 6e 20 | 74 65 6c 6c 20 74 68 65 |you can |tell the|
|00002a90| 20 70 72 6f 67 72 61 6d | 20 74 6f 20 61 75 74 6f | program| to auto|
|00002aa0| 6d 61 74 69 63 61 6c 6c | 79 20 64 69 73 70 6c 61 |maticall|y displa|
|00002ab0| 79 20 74 68 65 20 6f 62 | 6a 65 63 74 20 65 76 65 |y the ob|ject eve|
|00002ac0| 72 79 0a 58 73 6f 20 6f | 66 74 65 6e 2e 20 20 54 |ry.Xso o|ften. T|
|00002ad0| 68 69 73 20 69 73 20 64 | 6f 6e 65 20 65 69 74 68 |his is d|one eith|
|00002ae0| 65 72 20 77 69 74 68 20 | 74 68 65 20 2d 76 20 63 |er with |the -v c|
|00002af0| 6f 6d 6d 61 6e 64 20 6c | 69 6e 65 20 6f 70 74 69 |ommand l|ine opti|
|00002b00| 6f 6e 2c 20 6f 72 20 74 | 68 65 20 27 76 27 0a 58 |on, or t|he 'v'.X|
|00002b10| 63 6f 6d 6d 61 6e 64 2e | 20 20 54 68 65 20 6e 75 |command.| The nu|
|00002b20| 6d 65 72 69 63 20 61 72 | 67 75 6d 65 6e 74 20 69 |meric ar|gument i|
|00002b30| 73 20 68 6f 77 20 6d 61 | 6e 79 20 74 68 6f 75 73 |s how ma|ny thous|
|00002b40| 61 6e 64 20 73 65 61 72 | 63 68 20 69 74 65 72 61 |and sear|ch itera|
|00002b50| 74 69 6f 6e 73 20 74 6f | 0a 58 70 65 72 66 6f 72 |tions to|.Xperfor|
|00002b60| 6d 20 62 65 74 77 65 65 | 6e 20 64 69 73 70 6c 61 |m betwee|n displa|
|00002b70| 79 73 2e 20 20 41 73 20 | 61 6e 20 65 78 61 6d 70 |ys. As |an examp|
|00002b80| 6c 65 2c 20 74 68 65 20 | 63 6f 6d 6d 61 6e 64 20 |le, the |command |
|00002b90| 6c 69 6e 65 20 6f 70 74 | 69 6f 6e 20 2d 76 31 0a |line opt|ion -v1.|
|00002ba0| 58 64 69 73 70 6c 61 79 | 73 20 61 62 6f 75 74 20 |Xdisplay|s about |
|00002bb0| 65 76 65 72 79 20 35 20 | 73 65 63 6f 6e 64 73 20 |every 5 |seconds |
|00002bc0| 66 6f 72 20 61 20 32 30 | 4d 48 20 33 38 36 2e 0a |for a 20|MH 386..|
|00002bd0| 58 0a 58 4e 6f 72 6d 61 | 6c 6c 79 20 69 66 20 74 |X.XNorma|lly if t|
|00002be0| 68 65 20 70 72 6f 67 20 | 66 69 6e 64 73 20 73 6f |he prog |finds so|
|00002bf0| 6d 65 74 68 69 6e 67 2c | 20 69 74 20 77 69 6c 6c |mething,| it will|
|00002c00| 20 64 69 73 70 6c 61 79 | 20 74 68 65 20 6f 62 6a | display| the obj|
|00002c10| 65 63 74 20 61 6e 64 20 | 77 61 69 74 20 66 6f 72 |ect and |wait for|
|00002c20| 0a 58 63 6f 6d 6d 61 6e | 64 73 2e 20 20 41 74 20 |.Xcomman|ds. At |
|00002c30| 74 68 69 73 20 70 6f 69 | 6e 74 20 79 6f 75 20 63 |this poi|nt you c|
|00002c40| 61 6e 20 77 72 69 74 65 | 20 6f 75 74 20 74 68 65 |an write| out the|
|00002c50| 20 6f 62 6a 65 63 74 20 | 69 66 20 64 65 73 69 72 | object |if desir|
|00002c60| 65 64 2e 20 20 54 79 70 | 69 6e 67 20 27 4e 27 0a |ed. Typ|ing 'N'.|
|00002c70| 58 77 69 6c 6c 20 63 6f | 6e 74 69 6e 75 65 20 6c |Xwill co|ntinue l|
|00002c80| 6f 6f 6b 69 6e 67 20 66 | 6f 72 20 66 75 72 74 68 |ooking f|or furth|
|00002c90| 65 72 20 6f 62 6a 65 63 | 74 73 20 77 68 69 63 68 |er objec|ts which|
|00002ca0| 20 77 6f 72 6b 2e 20 20 | 49 66 20 79 6f 75 20 73 | work. |If you s|
|00002cb0| 70 65 63 69 66 69 65 64 | 20 74 68 65 0a 58 2d 61 |pecified| the.X-a|
|00002cc0| 20 63 6f 6d 6d 61 6e 64 | 20 6c 69 6e 65 20 6f 70 | command| line op|
|00002cd0| 74 69 6f 6e 2c 20 74 68 | 65 6e 20 74 68 65 20 27 |tion, th|en the '|
|00002ce0| 4e 27 20 63 6f 6d 6d 61 | 6e 64 20 77 69 6c 6c 20 |N' comma|nd will |
|00002cf0| 62 65 20 6e 65 65 64 65 | 64 20 69 6d 6d 65 64 69 |be neede|d immedi|
|00002d00| 61 74 65 6c 79 0a 58 61 | 66 74 65 72 20 73 74 61 |ately.Xa|fter sta|
|00002d10| 72 74 69 6e 67 20 61 20 | 73 65 61 72 63 68 20 77 |rting a |search w|
|00002d20| 69 74 68 20 6e 6f 20 69 | 6e 69 74 69 61 6c 20 73 |ith no i|nitial s|
|00002d30| 65 74 74 69 6e 67 73 2c | 20 73 69 6e 63 65 20 74 |ettings,| since t|
|00002d40| 68 65 20 73 74 61 74 65 | 20 6f 66 20 61 6c 6c 0a |he state| of all.|
|00002d50| 58 4f 46 46 20 63 65 6c | 6c 73 20 6f 62 76 69 6f |XOFF cel|ls obvio|
|00002d60| 75 73 6c 79 20 73 61 74 | 69 73 66 69 65 73 20 61 |usly sat|isfies a|
|00002d70| 6c 6c 20 63 6f 6e 64 69 | 74 69 6f 6e 73 2e 0a 58 |ll condi|tions..X|
|00002d80| 0a 58 48 6f 77 65 76 65 | 72 2c 20 69 66 20 79 6f |.XHoweve|r, if yo|
|00002d90| 75 20 73 70 65 63 69 66 | 79 20 74 68 65 20 2d 6f |u specif|y the -o|
|00002da0| 20 6f 70 74 69 6f 6e 20 | 6f 6e 20 74 68 65 20 63 | option |on the c|
|00002db0| 6f 6d 6d 61 6e 64 20 6c | 69 6e 65 2c 20 74 68 65 |ommand l|ine, the|
|00002dc0| 20 70 72 6f 67 72 61 6d | 20 77 69 6c 6c 0a 58 4e | program| will.XN|
|00002dd0| 4f 54 20 73 74 6f 70 20 | 77 68 65 6e 20 69 74 20 |OT stop |when it |
|00002de0| 66 69 6e 64 73 20 61 6e | 20 6f 62 6a 65 63 74 2e |finds an| object.|
|00002df0| 20 20 49 6e 73 74 65 61 | 64 2c 20 69 74 20 77 69 | Instea|d, it wi|
|00002e00| 6c 6c 20 61 70 70 65 6e | 64 20 74 68 65 20 66 6f |ll appen|d the fo|
|00002e10| 75 6e 64 20 6f 62 6a 65 | 63 74 0a 58 74 6f 20 74 |und obje|ct.Xto t|
|00002e20| 68 65 20 73 70 65 63 69 | 66 69 65 64 20 66 69 6c |he speci|fied fil|
|00002e30| 65 20 6e 61 6d 65 2c 20 | 61 6e 64 20 61 75 74 6f |e name, |and auto|
|00002e40| 6d 61 74 69 63 61 6c 6c | 79 20 6b 65 65 70 20 6c |maticall|y keep l|
|00002e50| 6f 6f 6b 69 6e 67 20 66 | 6f 72 20 66 75 72 74 68 |ooking f|or furth|
|00002e60| 65 72 0a 58 6f 62 6a 65 | 63 74 73 20 77 68 69 63 |er.Xobje|cts whic|
|00002e70| 68 20 77 6f 72 6b 2e 20 | 20 54 68 65 20 6f 62 6a |h work. | The obj|
|00002e80| 65 63 74 73 20 73 74 6f | 72 65 64 20 69 6e 20 74 |ects sto|red in t|
|00002e90| 68 65 20 6f 75 74 70 75 | 74 20 66 69 6c 65 20 61 |he outpu|t file a|
|00002ea0| 72 65 20 73 65 70 61 72 | 61 74 65 64 0a 58 77 69 |re separ|ated.Xwi|
|00002eb0| 74 68 20 62 6c 61 6e 6b | 20 6c 69 6e 65 73 2e 20 |th blank| lines. |
|00002ec0| 20 57 68 65 6e 20 6e 6f | 20 6d 6f 72 65 20 6f 62 | When no| more ob|
|00002ed0| 6a 65 63 74 73 20 68 61 | 76 65 20 62 65 65 6e 20 |jects ha|ve been |
|00002ee0| 66 6f 75 6e 64 2c 20 74 | 68 65 20 70 72 6f 67 72 |found, t|he progr|
|00002ef0| 61 6d 20 77 69 6c 6c 0a | 58 70 72 69 6e 74 20 61 |am will.|Xprint a|
|00002f00| 20 66 69 6e 61 6c 20 73 | 74 61 74 75 73 20 6d 65 | final s|tatus me|
|00002f10| 73 73 61 67 65 20 61 6e | 64 20 65 78 69 74 2e 0a |ssage an|d exit..|
|00002f20| 58 0a 58 54 68 65 20 66 | 6f 6c 6c 6f 77 69 6e 67 |X.XThe f|ollowing|
|00002f30| 20 69 73 20 61 20 73 75 | 6d 6d 61 72 79 20 6f 66 | is a su|mmary of|
|00002f40| 20 61 6c 6c 20 74 68 65 | 20 63 6f 6d 6d 61 6e 64 | all the| command|
|00002f50| 73 20 61 76 61 69 6c 61 | 62 6c 65 2e 20 20 54 68 |s availa|ble. Th|
|00002f60| 65 20 27 73 27 20 63 6f | 6d 6d 61 6e 64 0a 58 73 |e 's' co|mmand.Xs|
|00002f70| 65 74 73 20 63 65 6c 6c | 73 20 61 6e 64 20 68 61 |ets cell|s and ha|
|00002f80| 73 20 61 6c 72 65 61 64 | 79 20 62 65 65 6e 20 64 |s alread|y been d|
|00002f90| 65 73 63 72 69 62 65 64 | 20 61 62 6f 76 65 2e 20 |escribed| above. |
|00002fa0| 20 54 68 65 20 27 6e 27 | 20 63 6f 6d 6d 61 6e 64 | The 'n'| command|
|00002fb0| 20 64 69 73 70 6c 61 79 | 73 0a 58 74 68 65 20 6e | display|s.Xthe n|
|00002fc0| 65 78 74 20 67 65 6e 65 | 72 61 74 69 6f 6e 20 6f |ext gene|ration o|
|00002fd0| 66 20 74 68 65 20 63 75 | 72 72 65 6e 74 20 6f 62 |f the cu|rrent ob|
|00002fe0| 6a 65 63 74 2c 20 61 6e | 64 20 77 69 6c 6c 20 77 |ject, an|d will w|
|00002ff0| 72 61 70 20 61 72 6f 75 | 6e 64 20 66 72 6f 6d 20 |rap arou|nd from |
|00003000| 74 68 65 20 6c 61 73 74 | 0a 58 67 65 6e 65 72 61 |the last|.Xgenera|
|00003010| 74 69 6f 6e 20 62 61 63 | 6b 20 74 6f 20 67 65 6e |tion bac|k to gen|
|00003020| 65 72 61 74 69 6f 6e 20 | 30 2e 20 20 54 68 65 20 |eration |0. The |
|00003030| 27 70 27 20 63 6f 6d 6d | 61 6e 64 20 64 69 73 70 |'p' comm|and disp|
|00003040| 6c 61 79 73 20 74 68 65 | 20 70 72 65 76 69 6f 75 |lays the| previou|
|00003050| 73 0a 58 67 65 6e 65 72 | 61 74 69 6f 6e 2c 20 61 |s.Xgener|ation, a|
|00003060| 6c 73 6f 20 77 72 61 70 | 70 69 6e 67 20 61 72 6f |lso wrap|ping aro|
|00003070| 75 6e 64 2e 20 20 54 68 | 65 20 27 77 27 20 63 6f |und. Th|e 'w' co|
|00003080| 6d 6d 61 6e 64 20 77 72 | 69 74 65 73 20 6f 75 74 |mmand wr|ites out|
|00003090| 20 61 20 70 69 63 74 75 | 72 65 20 6f 66 0a 58 74 | a pictu|re of.Xt|
|000030a0| 68 65 20 63 75 72 72 65 | 6e 74 20 67 65 6e 65 72 |he curre|nt gener|
|000030b0| 61 74 69 6f 6e 20 6f 75 | 74 20 74 6f 20 74 68 65 |ation ou|t to the|
|000030c0| 20 73 70 65 63 69 66 69 | 65 64 20 66 69 6c 65 2e | specifi|ed file.|
|000030d0| 20 20 54 68 65 20 27 64 | 27 20 63 6f 6d 6d 61 6e | The 'd|' comman|
|000030e0| 64 20 64 75 6d 70 73 0a | 58 74 68 65 20 73 74 61 |d dumps.|Xthe sta|
|000030f0| 74 65 20 6f 66 20 74 68 | 65 20 73 65 61 72 63 68 |te of th|e search|
|00003100| 20 6f 75 74 20 74 6f 20 | 74 68 65 20 73 70 65 63 | out to |the spec|
|00003110| 69 66 69 65 64 20 66 69 | 6c 65 20 28 73 65 65 20 |ified fi|le (see |
|00003120| 62 65 6c 6f 77 29 2e 20 | 20 54 68 65 20 27 4e 27 |below). | The 'N'|
|00003130| 0a 58 63 6f 6d 6d 61 6e | 64 20 77 69 6c 6c 20 63 |.Xcomman|d will c|
|00003140| 6f 6e 74 69 6e 75 65 20 | 73 65 61 72 63 68 69 6e |ontinue |searchin|
|00003150| 67 20 66 6f 72 20 74 68 | 65 20 6e 65 78 74 20 6f |g for th|e next o|
|00003160| 62 6a 65 63 74 20 61 66 | 74 65 72 20 61 6e 20 6f |bject af|ter an o|
|00003170| 62 6a 65 63 74 20 68 61 | 73 0a 58 62 65 65 6e 20 |bject ha|s.Xbeen |
|00003180| 66 6f 75 6e 64 2e 20 20 | 54 68 65 20 27 76 27 20 |found. |The 'v' |
|00003190| 6f 70 74 69 6f 6e 20 73 | 70 65 63 69 66 69 65 73 |option s|pecifies|
|000031a0| 20 74 68 65 20 66 72 65 | 71 75 65 6e 63 79 20 6f | the fre|quency o|
|000031b0| 66 20 61 75 74 6f 6d 61 | 74 69 63 20 76 69 65 77 |f automa|tic view|
|000031c0| 69 6e 67 2e 0a 58 54 68 | 65 20 27 63 27 20 63 6f |ing..XTh|e 'c' co|
|000031d0| 6d 6d 61 6e 64 20 74 75 | 72 6e 73 20 61 6c 6c 20 |mmand tu|rns all |
|000031e0| 75 6e 6b 6e 6f 77 6e 20 | 63 65 6c 6c 73 20 69 6e |unknown |cells in|
|000031f0| 20 74 68 65 20 63 75 72 | 72 65 6e 74 20 67 65 6e | the cur|rent gen|
|00003200| 65 72 61 74 69 6f 6e 20 | 4f 46 46 2e 0a 58 46 69 |eration |OFF..XFi|
|00003210| 6e 61 6c 6c 79 2c 20 74 | 68 65 20 27 71 27 20 63 |nally, t|he 'q' c|
|00003220| 6f 6d 6d 61 6e 64 20 71 | 75 69 74 73 20 74 68 65 |ommand q|uits the|
|00003230| 20 70 72 6f 67 72 61 6d | 20 28 63 6f 6e 66 69 72 | program| (confir|
|00003240| 6d 61 74 69 6f 6e 20 69 | 73 20 72 65 71 75 69 72 |mation i|s requir|
|00003250| 65 64 29 2e 0a 58 0a 58 | 53 69 6e 63 65 20 69 74 |ed)..X.X|Since it|
|00003260| 20 63 61 6e 20 74 61 6b | 65 20 61 20 76 65 72 79 | can tak|e a very|
|00003270| 20 6c 6f 6e 67 20 74 69 | 6d 65 20 74 6f 20 66 69 | long ti|me to fi|
|00003280| 6e 64 20 73 6f 6d 65 74 | 68 69 6e 67 20 28 64 61 |nd somet|hing (da|
|00003290| 79 73 20 6f 72 20 65 76 | 65 6e 20 77 65 65 6b 73 |ys or ev|en weeks|
|000032a0| 21 29 2c 0a 58 74 68 65 | 20 63 75 72 72 65 6e 74 |!),.Xthe| current|
|000032b0| 20 73 74 61 74 65 20 6f | 66 20 61 20 73 65 61 72 | state o|f a sear|
|000032c0| 63 68 20 63 61 6e 20 62 | 65 20 64 75 6d 70 65 64 |ch can b|e dumped|
|000032d0| 20 74 6f 20 61 20 66 69 | 6c 65 20 61 6e 64 20 72 | to a fi|le and r|
|000032e0| 65 61 64 20 61 67 61 69 | 6e 20 6c 61 74 65 72 2e |ead agai|n later.|
|000032f0| 0a 58 59 6f 75 20 63 61 | 6e 20 65 78 70 6c 69 63 |.XYou ca|n explic|
|00003300| 69 74 6c 79 20 64 75 6d | 70 20 74 68 65 20 73 74 |itly dum|p the st|
|00003310| 61 74 75 73 20 74 6f 20 | 61 20 66 69 6c 65 20 62 |atus to |a file b|
|00003320| 79 20 75 73 69 6e 67 20 | 74 68 65 20 27 64 27 20 |y using |the 'd' |
|00003330| 63 6f 6d 6d 61 6e 64 2e | 0a 58 41 66 74 65 72 20 |command.|.XAfter |
|00003340| 74 68 69 73 20 68 61 73 | 20 62 65 65 6e 20 64 6f |this has| been do|
|00003350| 6e 65 2c 20 79 6f 75 20 | 63 61 6e 20 75 73 65 20 |ne, you |can use |
|00003360| 27 71 27 20 74 6f 20 71 | 75 69 74 20 74 68 65 20 |'q' to q|uit the |
|00003370| 70 72 6f 67 72 61 6d 2e | 20 20 54 68 65 6e 20 6c |program.| Then l|
|00003380| 61 74 65 72 2c 0a 58 79 | 6f 75 20 63 61 6e 20 75 |ater,.Xy|ou can u|
|00003390| 73 65 20 74 68 65 20 2d | 6c 20 63 6f 6d 6d 61 6e |se the -|l comman|
|000033a0| 64 20 6c 69 6e 65 20 6f | 70 74 69 6f 6e 20 74 6f |d line o|ption to|
|000033b0| 20 63 6f 6e 74 69 6e 75 | 65 20 73 65 61 72 63 68 | continu|e search|
|000033c0| 69 6e 67 2e 0a 58 0a 58 | 4d 6f 72 65 20 75 73 65 |ing..X.X|More use|
|000033d0| 66 75 6c 20 61 6e 64 20 | 73 61 66 65 72 2c 20 68 |ful and |safer, h|
|000033e0| 6f 77 65 76 65 72 2c 20 | 69 73 20 74 68 65 20 61 |owever, |is the a|
|000033f0| 75 74 6f 64 75 6d 70 20 | 66 65 61 74 75 72 65 20 |utodump |feature |
|00003400| 6f 66 20 74 68 65 20 70 | 72 6f 67 72 61 6d 2e 0a |of the p|rogram..|
|00003410| 58 55 73 69 6e 67 20 74 | 68 65 20 2d 64 20 63 6f |XUsing t|he -d co|
|00003420| 6d 6d 61 6e 64 20 6c 69 | 6e 65 20 6f 70 74 69 6f |mmand li|ne optio|
|00003430| 6e 20 63 61 75 73 65 73 | 20 61 20 64 75 6d 70 20 |n causes| a dump |
|00003440| 73 74 61 74 75 73 20 66 | 69 6c 65 20 74 6f 20 62 |status f|ile to b|
|00003450| 65 20 61 75 74 6f 6d 61 | 74 69 63 61 6c 6c 79 0a |e automa|tically.|
|00003460| 58 77 72 69 74 74 65 6e | 20 61 66 74 65 72 20 65 |Xwritten| after e|
|00003470| 76 65 72 79 20 73 6f 20 | 6d 61 6e 79 20 73 65 61 |very so |many sea|
|00003480| 72 63 68 20 69 74 65 72 | 61 74 69 6f 6e 73 2e 20 |rch iter|ations. |
|00003490| 20 54 68 75 73 20 65 76 | 65 72 79 20 73 6f 20 6f | Thus ev|ery so o|
|000034a0| 66 74 65 6e 20 74 68 65 | 0a 58 73 70 65 63 69 66 |ften the|.Xspecif|
|000034b0| 69 65 64 20 66 69 6c 65 | 20 77 69 6c 6c 20 63 6f |ied file| will co|
|000034c0| 6e 74 61 69 6e 20 74 68 | 65 20 6c 61 74 65 73 74 |ntain th|e latest|
|000034d0| 20 73 74 61 74 75 73 20 | 6f 66 20 74 68 65 20 73 | status |of the s|
|000034e0| 65 61 72 63 68 2e 20 20 | 54 68 65 6e 20 69 66 20 |earch. |Then if |
|000034f0| 79 6f 75 72 0a 58 6d 61 | 63 68 69 6e 65 20 63 72 |your.Xma|chine cr|
|00003500| 61 73 68 65 73 2c 20 79 | 6f 75 20 77 69 6c 6c 20 |ashes, y|ou will |
|00003510| 6e 6f 74 20 68 61 76 65 | 20 6c 6f 73 74 20 64 61 |not have| lost da|
|00003520| 79 73 20 6f 66 20 77 6f | 72 6b 2e 20 20 54 68 65 |ys of wo|rk. The|
|00003530| 20 2d 64 20 6f 70 74 69 | 6f 6e 20 74 61 6b 65 73 | -d opti|on takes|
|00003540| 20 61 0a 58 6e 75 6d 65 | 72 69 63 20 6f 70 65 72 | a.Xnume|ric oper|
|00003550| 61 6e 64 2c 20 77 68 69 | 63 68 20 69 73 20 68 6f |and, whi|ch is ho|
|00003560| 77 20 6d 61 6e 79 20 74 | 68 6f 75 73 61 6e 64 20 |w many t|housand |
|00003570| 73 65 61 72 63 68 65 73 | 20 74 6f 20 70 65 72 66 |searches| to perf|
|00003580| 6f 72 6d 20 62 65 74 77 | 65 65 6e 20 64 75 6d 70 |orm betw|een dump|
|00003590| 73 2e 0a 58 54 68 65 20 | 6f 70 74 69 6f 6e 20 61 |s..XThe |option a|
|000035a0| 6c 73 6f 20 74 61 6b 65 | 73 20 61 20 66 69 6c 65 |lso take|s a file|
|000035b0| 6e 61 6d 65 20 61 73 20 | 61 6e 20 61 72 67 75 6d |name as |an argum|
|000035c0| 65 6e 74 2c 20 61 6e 64 | 20 69 66 20 69 74 20 69 |ent, and| if it i|
|000035d0| 73 6e 27 74 20 67 69 76 | 65 6e 2c 0a 58 64 65 66 |sn't giv|en,.Xdef|
|000035e0| 61 75 6c 74 73 20 74 6f | 20 22 6c 69 66 65 73 72 |aults to| "lifesr|
|000035f0| 63 2e 64 6d 70 22 2e 20 | 20 41 73 20 61 6e 20 65 |c.dmp". | As an e|
|00003600| 78 61 6d 70 6c 65 2c 20 | 74 68 65 20 6f 70 74 69 |xample, |the opti|
|00003610| 6f 6e 20 22 2d 64 31 30 | 30 20 66 6f 6f 22 20 72 |on "-d10|0 foo" r|
|00003620| 65 73 75 6c 74 73 0a 58 | 69 6e 20 61 75 74 6f 6d |esults.X|in autom|
|00003630| 61 74 69 63 61 6c 6c 79 | 20 64 75 6d 70 69 6e 67 |atically| dumping|
|00003640| 20 73 74 61 74 75 73 20 | 61 62 6f 75 74 20 65 76 | status |about ev|
|00003650| 65 72 79 20 31 30 20 6d | 69 6e 75 74 65 73 20 74 |ery 10 m|inutes t|
|00003660| 6f 20 74 68 65 20 66 69 | 6c 65 20 22 66 6f 6f 22 |o the fi|le "foo"|
|00003670| 2e 0a 58 0a 58 54 6f 20 | 6c 6f 61 64 20 74 68 65 |..X.XTo |load the|
|00003680| 20 64 75 6d 70 65 64 20 | 73 74 61 74 65 20 74 68 | dumped |state th|
|00003690| 61 74 20 68 61 73 20 62 | 65 65 6e 20 73 61 76 65 |at has b|een save|
|000036a0| 64 20 74 6f 20 61 20 66 | 69 6c 65 2c 20 75 73 65 |d to a f|ile, use|
|000036b0| 20 74 68 65 20 2d 6c 20 | 6f 72 20 2d 6c 6e 0a 58 | the -l |or -ln.X|
|000036c0| 63 6f 6d 6d 61 6e 64 20 | 6c 69 6e 65 20 6f 70 74 |command |line opt|
|000036d0| 69 6f 6e 73 2e 20 20 53 | 69 6e 63 65 20 74 68 65 |ions. S|ince the|
|000036e0| 20 73 74 61 74 75 73 20 | 66 69 6c 65 20 63 6f 6e | status |file con|
|000036f0| 74 61 69 6e 73 20 61 6c | 6c 20 69 6e 66 6f 72 6d |tains al|l inform|
|00003700| 61 74 69 6f 6e 20 61 62 | 6f 75 74 0a 58 74 68 65 |ation ab|out.Xthe|
|00003710| 20 73 65 61 72 63 68 20 | 63 6f 6e 66 69 67 75 72 | search |configur|
|00003720| 61 74 69 6f 6e 2c 20 79 | 6f 75 20 64 6f 20 6e 6f |ation, y|ou do no|
|00003730| 74 20 6e 65 65 64 20 74 | 6f 20 73 70 65 63 69 66 |t need t|o specif|
|00003740| 79 20 74 68 65 20 6e 75 | 6d 62 65 72 20 6f 66 20 |y the nu|mber of |
|00003750| 72 6f 77 73 2c 0a 58 63 | 6f 6c 75 6d 6e 73 2c 20 |rows,.Xc|olumns, |
|00003760| 67 65 6e 65 72 61 74 69 | 6f 6e 73 2c 20 74 72 61 |generati|ons, tra|
|00003770| 6e 73 6c 61 74 69 6f 6e | 73 2c 20 73 79 6d 6d 65 |nslation|s, symme|
|00003780| 74 72 69 65 73 2c 20 6f | 72 20 69 6e 69 74 69 61 |tries, o|r initia|
|00003790| 6c 20 73 65 74 74 69 6e | 67 73 20 61 67 61 69 6e |l settin|gs again|
|000037a0| 2e 0a 58 48 6f 77 65 76 | 65 72 2c 20 69 66 20 79 |..XHowev|er, if y|
|000037b0| 6f 75 20 77 69 73 68 20 | 61 75 74 6f 64 75 6d 70 |ou wish |autodump|
|000037c0| 73 2c 20 61 6e 20 6f 75 | 74 70 75 74 20 66 69 6c |s, an ou|tput fil|
|000037d0| 65 2c 20 6f 72 20 61 75 | 74 6f 6d 61 74 69 63 20 |e, or au|tomatic |
|000037e0| 76 69 65 77 69 6e 67 2c | 20 74 68 65 6e 0a 58 79 |viewing,| then.Xy|
|000037f0| 6f 75 20 68 61 76 65 20 | 74 6f 20 73 70 65 63 69 |ou have |to speci|
|00003800| 66 79 20 74 68 6f 73 65 | 20 6f 70 74 69 6f 6e 73 |fy those| options|
|00003810| 20 61 67 61 69 6e 2e 0a | 58 0a 58 41 66 74 65 72 | again..|X.XAfter|
|00003820| 20 74 68 65 20 73 74 61 | 74 65 20 68 61 73 20 62 | the sta|te has b|
|00003830| 65 65 6e 20 6c 6f 61 64 | 65 64 2c 20 67 65 6e 65 |een load|ed, gene|
|00003840| 72 61 74 69 6f 6e 20 30 | 20 69 73 20 64 69 73 70 |ration 0| is disp|
|00003850| 6c 61 79 65 64 20 61 6e | 64 20 65 69 74 68 65 72 |layed an|d either|
|00003860| 20 74 68 65 0a 58 70 72 | 6f 67 72 61 6d 20 65 6e | the.Xpr|ogram en|
|00003870| 74 65 72 73 20 63 6f 6d | 6d 61 6e 64 20 6d 6f 64 |ters com|mand mod|
|00003880| 65 20 69 66 20 2d 6c 20 | 77 61 73 20 75 73 65 64 |e if -l |was used|
|00003890| 2c 20 6f 72 20 65 6c 73 | 65 20 74 68 65 20 73 65 |, or els|e the se|
|000038a0| 61 72 63 68 20 69 6d 6d | 65 64 69 61 74 65 6c 79 |arch imm|ediately|
|000038b0| 0a 58 63 6f 6e 74 69 6e | 75 65 73 20 77 68 65 72 |.Xcontin|ues wher|
|000038c0| 65 20 69 74 20 6c 65 66 | 74 20 6f 66 66 20 69 66 |e it lef|t off if|
|000038d0| 20 2d 6c 6e 20 77 61 73 | 20 75 73 65 64 2e 20 20 | -ln was| used. |
|000038e0| 54 68 65 20 2d 6c 6e 20 | 6f 70 74 69 6f 6e 20 69 |The -ln |option i|
|000038f0| 73 20 70 72 6f 76 69 64 | 65 64 20 73 6f 0a 58 74 |s provid|ed so.Xt|
|00003900| 68 61 74 20 63 6f 6e 74 | 69 6e 75 69 6e 67 20 74 |hat cont|inuing t|
|00003910| 68 65 20 73 65 61 72 63 | 68 20 70 72 6f 67 72 61 |he searc|h progra|
|00003920| 6d 20 77 69 74 68 69 6e | 20 73 68 65 6c 6c 20 73 |m within| shell s|
|00003930| 63 72 69 70 74 73 20 69 | 73 20 65 61 73 79 2e 0a |cripts i|s easy..|
|00003940| 58 0a 58 54 68 65 72 65 | 20 61 72 65 20 74 77 6f |X.XThere| are two|
|00003950| 20 76 65 72 73 69 6f 6e | 73 20 6f 66 20 74 68 65 | version|s of the|
|00003960| 20 70 72 6f 67 72 61 6d | 2c 20 63 61 6c 6c 65 64 | program|, called|
|00003970| 20 6c 69 66 65 73 72 63 | 20 61 6e 64 20 6c 69 66 | lifesrc| and lif|
|00003980| 65 73 72 63 64 75 6d 62 | 2e 0a 58 54 68 65 79 20 |esrcdumb|..XThey |
|00003990| 70 65 72 66 6f 72 6d 20 | 74 68 65 20 73 61 6d 65 |perform |the same|
|000039a0| 20 66 75 6e 63 74 69 6f | 6e 73 2c 20 62 75 74 20 | functio|ns, but |
|000039b0| 74 68 65 20 75 73 65 72 | 20 69 6e 74 65 72 66 61 |the user| interfa|
|000039c0| 63 65 73 20 61 72 65 20 | 73 6c 69 67 68 74 6c 79 |ces are |slightly|
|000039d0| 0a 58 64 69 66 66 65 72 | 65 6e 74 2e 20 20 4c 69 |.Xdiffer|ent. Li|
|000039e0| 66 65 73 72 63 20 75 73 | 65 73 20 74 68 65 20 63 |fesrc us|es the c|
|000039f0| 75 72 73 65 73 20 64 69 | 73 70 6c 61 79 20 72 6f |urses di|splay ro|
|00003a00| 75 74 69 6e 65 73 20 74 | 6f 20 64 69 73 70 6c 61 |utines t|o displa|
|00003a10| 79 20 74 68 65 0a 58 6f | 62 6a 65 63 74 73 20 70 |y the.Xo|bjects p|
|00003a20| 72 65 74 74 69 6c 79 2c | 20 77 68 65 72 65 61 73 |rettily,| whereas|
|00003a30| 20 6c 69 66 65 73 72 63 | 64 75 6d 62 20 61 73 73 | lifesrc|dumb ass|
|00003a40| 75 6d 65 73 20 6e 6f 74 | 68 69 6e 67 20 66 61 6e |umes not|hing fan|
|00003a50| 63 79 20 61 6e 64 20 6a | 75 73 74 0a 58 70 72 69 |cy and j|ust.Xpri|
|00003a60| 6e 74 73 20 6f 62 6a 65 | 63 74 73 20 73 69 6d 70 |nts obje|cts simp|
|00003a70| 6c 79 2e 0a 58 0a 58 41 | 73 20 79 6f 75 20 63 61 |ly..X.XA|s you ca|
|00003a80| 6e 20 73 65 65 2c 20 66 | 69 6e 64 69 6e 67 20 73 |n see, f|inding s|
|00003a90| 6f 6d 65 74 68 69 6e 67 | 20 72 65 71 75 69 72 65 |omething| require|
|00003aa0| 73 20 73 6b 69 6c 6c 2c | 20 6c 75 63 6b 2c 20 61 |s skill,| luck, a|
|00003ab0| 6e 64 20 70 61 74 69 65 | 6e 63 65 2e 0a 58 53 69 |nd patie|nce..XSi|
|00003ac0| 6e 63 65 20 79 6f 75 20 | 61 72 65 20 6c 69 6d 69 |nce you |are limi|
|00003ad0| 74 69 6e 67 20 74 68 65 | 20 73 65 61 72 63 68 20 |ting the| search |
|00003ae0| 62 79 20 73 70 65 63 69 | 66 79 69 6e 67 20 61 20 |by speci|fying a |
|00003af0| 72 65 63 74 61 6e 67 6c | 65 2c 20 73 79 6d 6d 65 |rectangl|e, symme|
|00003b00| 74 72 79 2c 0a 58 6d 61 | 78 69 6d 75 6d 20 63 65 |try,.Xma|ximum ce|
|00003b10| 6c 6c 73 2c 20 61 6e 64 | 20 69 6e 69 74 69 61 6c |lls, and| initial|
|00003b20| 20 63 65 6c 6c 73 2c 20 | 79 6f 75 20 70 72 6f 62 | cells, |you prob|
|00003b30| 61 62 6c 79 20 68 61 76 | 65 20 74 6f 20 6b 65 65 |ably hav|e to kee|
|00003b40| 70 20 76 61 72 79 69 6e | 67 0a 58 74 68 65 73 65 |p varyin|g.Xthese|
|00003b50| 20 70 61 72 61 6d 65 74 | 65 72 73 20 69 6e 20 6f | paramet|ers in o|
|00003b60| 72 64 65 72 20 74 6f 20 | 63 6f 6d 65 20 61 63 72 |rder to |come acr|
|00003b70| 6f 73 73 20 73 6f 6d 65 | 74 68 69 6e 67 2e 0a 58 |oss some|thing..X|
|00003b80| 0a 58 45 78 61 6d 70 6c | 65 20 73 65 61 72 63 68 |.XExampl|e search|
|00003b90| 65 73 20 61 72 65 20 74 | 68 65 20 66 6f 6c 6c 6f |es are t|he follo|
|00003ba0| 77 69 6e 67 3a 0a 58 0a | 58 09 6c 69 66 65 73 72 |wing:.X.|X.lifesr|
|00003bb0| 63 20 2d 72 35 20 2d 63 | 35 20 2d 67 32 20 2d 61 |c -r5 -c|5 -g2 -a|
|00003bc0| 09 09 09 73 74 61 62 6c | 65 20 61 6e 64 20 70 65 |...stabl|e and pe|
|00003bd0| 72 69 6f 64 20 32 20 6f | 73 63 69 6c 6c 61 74 6f |riod 2 o|scillato|
|00003be0| 72 73 0a 58 09 6c 69 66 | 65 73 72 63 20 2d 72 31 |rs.X.lif|esrc -r1|
|00003bf0| 30 20 2d 63 31 30 20 2d | 67 33 20 2d 73 72 20 2d |0 -c10 -|g3 -sr -|
|00003c00| 73 63 20 2d 76 31 09 70 | 65 72 69 6f 64 20 33 20 |sc -v1.p|eriod 3 |
|00003c10| 6f 73 63 69 6c 6c 61 74 | 6f 72 0a 58 09 6c 69 66 |oscillat|or.X.lif|
|00003c20| 65 73 72 63 20 2d 72 34 | 20 2d 63 34 20 2d 67 34 |esrc -r4| -c4 -g4|
|00003c30| 20 2d 74 72 31 20 2d 74 | 63 31 09 09 67 6c 69 64 | -tr1 -t|c1..glid|
|00003c40| 65 72 0a 58 09 6c 69 66 | 65 73 72 63 20 2d 72 35 |er.X.lif|esrc -r5|
|00003c50| 20 2d 63 37 20 2d 67 34 | 20 2d 74 63 32 09 09 75 | -c7 -g4| -tc2..u|
|00003c60| 73 75 61 6c 20 73 6d 61 | 6c 6c 20 73 70 61 63 65 |sual sma|ll space|
|00003c70| 73 68 69 70 0a 58 09 6c | 69 66 65 73 72 63 20 2d |ship.X.l|ifesrc -|
|00003c80| 72 35 20 2d 63 31 36 20 | 2d 67 33 20 2d 74 72 31 |r5 -c16 |-g3 -tr1|
|00003c90| 20 2d 76 31 09 09 70 65 | 72 69 6f 64 20 33 20 73 | -v1..pe|riod 3 s|
|00003ca0| 70 61 63 65 73 68 69 70 | 0a 58 09 6c 69 66 65 73 |paceship|.X.lifes|
|00003cb0| 72 63 20 2d 72 35 20 2d | 63 35 20 2d 67 32 20 2d |rc -r5 -|c5 -g2 -|
|00003cc0| 70 20 2d 61 09 09 70 61 | 72 65 6e 74 73 20 6f 66 |p -a..pa|rents of|
|00003cd0| 20 67 6c 69 64 65 72 20 | 28 6e 65 65 64 73 20 69 | glider |(needs i|
|00003ce0| 6e 70 75 74 29 0a 58 0a | 58 45 6e 6a 6f 79 20 73 |nput).X.|XEnjoy s|
|00003cf0| 65 61 72 63 68 69 6e 67 | 21 0a 58 0a 58 2d 64 62 |earching|!.X.X-db|
|00003d00| 65 6c 6c 2d 0a 45 4e 44 | 5f 4f 46 5f 46 49 4c 45 |ell-.END|_OF_FILE|
|00003d10| 0a 69 66 20 74 65 73 74 | 20 31 32 39 35 38 20 2d |.if test| 12958 -|
|00003d20| 6e 65 20 60 77 63 20 2d | 63 20 3c 27 52 45 41 44 |ne `wc -|c <'READ|
|00003d30| 4d 45 27 60 3b 20 74 68 | 65 6e 0a 20 20 20 20 65 |ME'`; th|en. e|
|00003d40| 63 68 6f 20 73 68 61 72 | 3a 20 5c 22 27 52 45 41 |cho shar|: \"'REA|
|00003d50| 44 4d 45 27 5c 22 20 75 | 6e 70 61 63 6b 65 64 20 |DME'\" u|npacked |
|00003d60| 77 69 74 68 20 77 72 6f | 6e 67 20 73 69 7a 65 21 |with wro|ng size!|
|00003d70| 0a 66 69 0a 23 20 65 6e | 64 20 6f 66 20 27 52 45 |.fi.# en|d of 'RE|
|00003d80| 41 44 4d 45 27 0a 66 69 | 0a 69 66 20 74 65 73 74 |ADME'.fi|.if test|
|00003d90| 20 2d 66 20 27 63 75 72 | 73 65 73 74 74 79 2e 63 | -f 'cur|sestty.c|
|00003da0| 27 20 2d 61 20 22 24 7b | 31 7d 22 20 21 3d 20 22 |' -a "${|1}" != "|
|00003db0| 2d 63 22 20 3b 20 74 68 | 65 6e 20 0a 20 20 65 63 |-c" ; th|en . ec|
|00003dc0| 68 6f 20 73 68 61 72 3a | 20 57 69 6c 6c 20 6e 6f |ho shar:| Will no|
|00003dd0| 74 20 63 6c 6f 62 62 65 | 72 20 65 78 69 73 74 69 |t clobbe|r existi|
|00003de0| 6e 67 20 66 69 6c 65 20 | 5c 22 27 63 75 72 73 65 |ng file |\"'curse|
|00003df0| 73 74 74 79 2e 63 27 5c | 22 0a 65 6c 73 65 0a 65 |stty.c'\|".else.e|
|00003e00| 63 68 6f 20 73 68 61 72 | 3a 20 45 78 74 72 61 63 |cho shar|: Extrac|
|00003e10| 74 69 6e 67 20 5c 22 27 | 63 75 72 73 65 73 74 74 |ting \"'|cursestt|
|00003e20| 79 2e 63 27 5c 22 20 5c | 28 32 33 33 35 20 63 68 |y.c'\" \|(2335 ch|
|00003e30| 61 72 61 63 74 65 72 73 | 5c 29 0a 73 65 64 20 22 |aracters|\).sed "|
|00003e40| 73 2f 5e 58 2f 2f 22 20 | 3e 27 63 75 72 73 65 73 |s/^X//" |>'curses|
|00003e50| 74 74 79 2e 63 27 20 3c | 3c 27 45 4e 44 5f 4f 46 |tty.c' <|<'END_OF|
|00003e60| 5f 46 49 4c 45 27 0a 58 | 2f 2a 0a 58 20 2a 20 53 |_FILE'.X|/*.X * S|
|00003e70| 6d 61 72 74 20 74 65 72 | 6d 69 6e 61 6c 20 6f 75 |mart ter|minal ou|
|00003e80| 74 70 75 74 20 72 6f 75 | 74 69 6e 65 2e 0a 58 20 |tput rou|tine..X |
|00003e90| 2a 20 55 73 65 73 20 63 | 75 72 73 65 73 20 74 6f |* Uses c|urses to|
|00003ea0| 20 64 69 73 70 6c 61 79 | 20 74 68 65 20 6f 62 6a | display| the obj|
|00003eb0| 65 63 74 2e 0a 58 20 2a | 2f 0a 58 23 69 6e 63 6c |ect..X *|/.X#incl|
|00003ec0| 75 64 65 20 3c 73 69 67 | 6e 61 6c 2e 68 3e 0a 58 |ude <sig|nal.h>.X|
|00003ed0| 23 69 6e 63 6c 75 64 65 | 20 3c 63 75 72 73 65 73 |#include| <curses|
|00003ee0| 2e 68 3e 0a 58 23 69 6e | 63 6c 75 64 65 20 22 73 |.h>.X#in|clude "s|
|00003ef0| 74 64 61 72 67 2e 68 22 | 0a 58 0a 58 0a 58 23 64 |tdarg.h"|.X.X.X#d|
|00003f00| 65 66 69 6e 65 09 53 54 | 41 54 55 53 4c 49 4e 45 |efine.ST|ATUSLINE|
|00003f10| 09 32 32 0a 58 23 64 65 | 66 69 6e 65 09 49 4e 50 |.22.X#de|fine.INP|
|00003f20| 55 54 4c 49 4e 45 09 32 | 33 0a 58 0a 58 0a 58 73 |UTLINE.2|3.X.X.Xs|
|00003f30| 74 61 74 69 63 09 69 6e | 74 09 69 6e 70 75 74 72 |tatic.in|t.inputr|
|00003f40| 65 61 64 79 3b 0a 58 0a | 58 73 74 61 74 69 63 20 |eady;.X.|Xstatic |
|00003f50| 76 6f 69 64 09 67 6f 74 | 69 6e 70 75 74 28 29 3b |void.got|input();|
|00003f60| 0a 58 65 78 74 65 72 6e | 20 76 6f 69 64 09 74 74 |.Xextern| void.tt|
|00003f70| 79 77 72 69 74 65 28 29 | 3b 0a 58 0a 58 0a 58 2f |ywrite()|;.X.X.X/|
|00003f80| 2a 0a 58 20 2a 20 4f 70 | 65 6e 20 74 68 65 20 74 |*.X * Op|en the t|
|00003f90| 65 72 6d 69 6e 61 6c 20 | 61 6e 64 20 65 6e 61 62 |erminal |and enab|
|00003fa0| 6c 65 20 66 6f 72 20 64 | 65 74 65 63 74 69 6e 67 |le for d|etecting|
|00003fb0| 20 74 65 72 6d 69 6e 61 | 6c 20 69 6e 70 75 74 2e | termina|l input.|
|00003fc0| 0a 58 20 2a 2f 0a 58 74 | 74 79 6f 70 65 6e 28 29 |.X */.Xt|tyopen()|
|00003fd0| 0a 58 7b 0a 58 09 69 6e | 69 74 73 63 72 28 29 3b |.X{.X.in|itscr();|
|00003fe0| 0a 58 09 63 62 72 65 61 | 6b 28 29 3b 0a 58 09 73 |.X.cbrea|k();.X.s|
|00003ff0| 69 67 6e 61 6c 28 53 49 | 47 49 4e 54 2c 20 67 6f |ignal(SI|GINT, go|
|00004000| 74 69 6e 70 75 74 29 3b | 0a 58 09 72 65 74 75 72 |tinput);|.X.retur|
|00004010| 6e 20 30 3b 0a 58 7d 0a | 58 0a 58 0a 58 73 74 61 |n 0;.X}.|X.X.Xsta|
|00004020| 74 69 63 20 76 6f 69 64 | 0a 58 67 6f 74 69 6e 70 |tic void|.Xgotinp|
|00004030| 75 74 28 29 0a 58 7b 0a | 58 09 73 69 67 6e 61 6c |ut().X{.|X.signal|
|00004040| 28 53 49 47 49 4e 54 2c | 20 67 6f 74 69 6e 70 75 |(SIGINT,| gotinpu|
|00004050| 74 29 3b 0a 58 09 69 6e | 70 75 74 72 65 61 64 79 |t);.X.in|putready|
|00004060| 20 3d 20 31 3b 0a 58 7d | 0a 58 0a 58 0a 58 2f 2a | = 1;.X}|.X.X.X/*|
|00004070| 0a 58 20 2a 20 43 6c 6f | 73 65 20 74 68 65 20 74 |.X * Clo|se the t|
|00004080| 65 72 6d 69 6e 61 6c 2e | 0a 58 20 2a 2f 0a 58 76 |erminal.|.X */.Xv|
|00004090| 6f 69 64 0a 58 74 74 79 | 63 6c 6f 73 65 28 29 0a |oid.Xtty|close().|
|000040a0| 58 7b 0a 58 09 72 65 66 | 72 65 73 68 28 29 3b 0a |X{.X.ref|resh();.|
|000040b0| 58 09 65 6e 64 77 69 6e | 28 29 3b 0a 58 7d 0a 58 |X.endwin|();.X}.X|
|000040c0| 0a 58 0a 58 2f 2a 0a 58 | 20 2a 20 54 65 73 74 20 |.X.X/*.X| * Test |
|000040d0| 74 6f 20 73 65 65 20 69 | 66 20 61 20 6b 65 79 62 |to see i|f a keyb|
|000040e0| 6f 61 72 64 20 63 68 61 | 72 61 63 74 65 72 20 69 |oard cha|racter i|
|000040f0| 73 20 72 65 61 64 79 2e | 0a 58 20 2a 20 52 65 74 |s ready.|.X * Ret|
|00004100| 75 72 6e 73 20 6e 6f 6e | 7a 65 72 6f 20 69 66 20 |urns non|zero if |
|00004110| 73 6f 20 28 61 6e 64 20 | 63 6c 65 61 72 73 20 74 |so (and |clears t|
|00004120| 68 65 20 72 65 61 64 79 | 20 66 6c 61 67 29 2e 0a |he ready| flag)..|
|00004130| 58 20 2a 2f 0a 58 74 74 | 79 63 68 65 63 6b 28 29 |X */.Xtt|ycheck()|
|00004140| 0a 58 7b 0a 58 09 69 6e | 74 09 72 65 73 75 6c 74 |.X{.X.in|t.result|
|00004150| 3b 0a 58 0a 58 09 72 65 | 73 75 6c 74 20 3d 20 69 |;.X.X.re|sult = i|
|00004160| 6e 70 75 74 72 65 61 64 | 79 3b 0a 58 09 69 6e 70 |nputread|y;.X.inp|
|00004170| 75 74 72 65 61 64 79 20 | 3d 20 30 3b 0a 58 09 72 |utready |= 0;.X.r|
|00004180| 65 74 75 72 6e 20 72 65 | 73 75 6c 74 3b 0a 58 7d |eturn re|sult;.X}|
|00004190| 0a 58 0a 58 0a 58 2f 2a | 0a 58 20 2a 20 50 72 69 |.X.X.X/*|.X * Pri|
|000041a0| 6e 74 20 61 20 66 6f 72 | 6d 61 74 74 65 64 20 73 |nt a for|matted s|
|000041b0| 74 72 69 6e 67 20 74 6f | 20 74 68 65 20 74 65 72 |tring to| the ter|
|000041c0| 6d 69 6e 61 6c 2e 0a 58 | 20 2a 20 54 68 65 20 73 |minal..X| * The s|
|000041d0| 74 72 69 6e 67 20 6c 65 | 6e 67 74 68 20 69 73 20 |tring le|ngth is |
|000041e0| 6c 69 6d 69 74 65 64 20 | 74 6f 20 32 35 36 20 63 |limited |to 256 c|
|000041f0| 68 61 72 61 63 74 65 72 | 73 2e 0a 58 20 2a 2f 0a |haracter|s..X */.|
|00004200| 58 76 6f 69 64 0a 58 74 | 74 79 70 72 69 6e 74 66 |Xvoid.Xt|typrintf|
|00004210| 28 66 6d 74 29 0a 58 09 | 63 68 61 72 09 2a 66 6d |(fmt).X.|char.*fm|
|00004220| 74 3b 0a 58 7b 0a 58 09 | 76 61 5f 6c 69 73 74 20 |t;.X{.X.|va_list |
|00004230| 61 70 3b 0a 58 09 73 74 | 61 74 69 63 20 63 68 61 |ap;.X.st|atic cha|
|00004240| 72 09 62 75 66 5b 32 35 | 36 5d 3b 0a 58 0a 58 09 |r.buf[25|6];.X.X.|
|00004250| 76 61 5f 73 74 61 72 74 | 28 61 70 2c 20 66 6d 74 |va_start|(ap, fmt|
|00004260| 29 3b 0a 58 09 76 73 70 | 72 69 6e 74 66 28 62 75 |);.X.vsp|rintf(bu|
|00004270| 66 2c 20 66 6d 74 2c 20 | 61 70 29 3b 0a 58 09 76 |f, fmt, |ap);.X.v|
|00004280| 61 5f 65 6e 64 28 61 70 | 29 3b 0a 58 09 61 64 64 |a_end(ap|);.X.add|
|00004290| 73 74 72 28 62 75 66 29 | 3b 0a 58 7d 0a 58 0a 58 |str(buf)|;.X}.X.X|
|000042a0| 0a 58 2f 2a 0a 58 20 2a | 20 50 72 69 6e 74 20 61 |.X/*.X *| Print a|
|000042b0| 20 73 74 61 74 75 73 20 | 6c 69 6e 65 2c 20 73 69 | status |line, si|
|000042c0| 6d 69 6c 61 72 20 74 6f | 20 70 72 69 6e 74 66 2e |milar to| printf.|
|000042d0| 0a 58 20 2a 20 54 68 65 | 20 73 74 72 69 6e 67 20 |.X * The| string |
|000042e0| 6c 65 6e 67 74 68 20 69 | 73 20 6c 69 6d 69 74 65 |length i|s limite|
|000042f0| 64 20 74 6f 20 32 35 36 | 20 63 68 61 72 61 63 74 |d to 256| charact|
|00004300| 65 72 73 2e 0a 58 20 2a | 2f 0a 58 76 6f 69 64 0a |ers..X *|/.Xvoid.|
|00004310| 58 74 74 79 73 74 61 74 | 75 73 28 66 6d 74 29 0a |Xttystat|us(fmt).|
|00004320| 58 09 63 68 61 72 09 2a | 66 6d 74 3b 0a 58 7b 0a |X.char.*|fmt;.X{.|
|00004330| 58 09 76 61 5f 6c 69 73 | 74 20 61 70 3b 0a 58 09 |X.va_lis|t ap;.X.|
|00004340| 73 74 61 74 69 63 20 63 | 68 61 72 09 62 75 66 5b |static c|har.buf[|
|00004350| 32 35 36 5d 3b 0a 58 0a | 58 09 76 61 5f 73 74 61 |256];.X.|X.va_sta|
|00004360| 72 74 28 61 70 2c 20 66 | 6d 74 29 3b 0a 58 09 76 |rt(ap, f|mt);.X.v|
|00004370| 73 70 72 69 6e 74 66 28 | 62 75 66 2c 20 66 6d 74 |sprintf(|buf, fmt|
|00004380| 2c 20 61 70 29 3b 0a 58 | 09 76 61 5f 65 6e 64 28 |, ap);.X|.va_end(|
|00004390| 61 70 29 3b 0a 58 0a 58 | 09 6d 6f 76 65 28 53 54 |ap);.X.X|.move(ST|
|000043a0| 41 54 55 53 4c 49 4e 45 | 2c 20 30 29 3b 0a 58 09 |ATUSLINE|, 0);.X.|
|000043b0| 61 64 64 73 74 72 28 62 | 75 66 29 3b 0a 58 09 63 |addstr(b|uf);.X.c|
|000043c0| 6c 72 74 6f 62 6f 74 28 | 29 3b 0a 58 09 6d 6f 76 |lrtobot(|);.X.mov|
|000043d0| 65 28 30 2c 20 30 29 3b | 0a 58 09 72 65 66 72 65 |e(0, 0);|.X.refre|
|000043e0| 73 68 28 29 3b 0a 58 7d | 0a 58 0a 58 0a 58 76 6f |sh();.X}|.X.X.Xvo|
|000043f0| 69 64 0a 58 74 74 79 77 | 72 69 74 65 28 63 70 2c |id.Xttyw|rite(cp,|
|00004400| 20 6c 65 6e 29 0a 58 09 | 63 68 61 72 09 2a 63 70 | len).X.|char.*cp|
|00004410| 3b 0a 58 7b 0a 58 09 77 | 68 69 6c 65 20 28 6c 65 |;.X{.X.w|hile (le|
|00004420| 6e 2d 2d 20 3e 20 30 29 | 20 7b 0a 58 09 09 61 64 |n-- > 0)| {.X..ad|
|00004430| 64 63 68 28 2a 63 70 29 | 3b 0a 58 09 09 63 70 2b |dch(*cp)|;.X..cp+|
|00004440| 2b 3b 0a 58 09 7d 0a 58 | 7d 0a 58 0a 58 0a 58 76 |+;.X.}.X|}.X.X.Xv|
|00004450| 6f 69 64 0a 58 74 74 79 | 68 6f 6d 65 28 29 0a 58 |oid.Xtty|home().X|
|00004460| 7b 0a 58 09 6d 6f 76 65 | 28 30 2c 20 30 29 3b 0a |{.X.move|(0, 0);.|
|00004470| 58 7d 0a 58 0a 58 0a 58 | 76 6f 69 64 0a 58 74 74 |X}.X.X.X|void.Xtt|
|00004480| 79 65 65 6f 70 28 29 0a | 58 7b 0a 58 09 63 6c 72 |yeeop().|X{.X.clr|
|00004490| 74 6f 62 6f 74 28 29 3b | 0a 58 7d 0a 58 0a 58 0a |tobot();|.X}.X.X.|
|000044a0| 58 76 6f 69 64 0a 58 74 | 74 79 66 6c 75 73 68 28 |Xvoid.Xt|tyflush(|
|000044b0| 29 0a 58 7b 0a 58 09 72 | 65 66 72 65 73 68 28 29 |).X{.X.r|efresh()|
|000044c0| 3b 0a 58 7d 0a 58 0a 58 | 0a 58 2f 2a 0a 58 20 2a |;.X}.X.X|.X/*.X *|
|000044d0| 20 52 65 74 75 72 6e 20 | 61 20 4e 55 4c 4c 20 74 | Return |a NULL t|
|000044e0| 65 72 6d 69 6e 61 74 65 | 64 20 69 6e 70 75 74 20 |erminate|d input |
|000044f0| 6c 69 6e 65 20 28 77 69 | 74 68 6f 75 74 20 74 68 |line (wi|thout th|
|00004500| 65 20 66 69 6e 61 6c 20 | 6e 65 77 6c 69 6e 65 29 |e final |newline)|
|00004510| 2e 0a 58 20 2a 20 54 68 | 65 20 73 70 65 63 69 66 |..X * Th|e specif|
|00004520| 69 65 64 20 73 74 72 69 | 6e 67 20 69 73 20 70 72 |ied stri|ng is pr|
|00004530| 69 6e 74 65 64 20 61 73 | 20 61 20 70 72 6f 6d 70 |inted as| a promp|
|00004540| 74 2e 0a 58 20 2a 20 52 | 65 74 75 72 6e 73 20 6e |t..X * R|eturns n|
|00004550| 6f 6e 7a 65 72 6f 20 28 | 61 6e 64 20 61 6e 20 65 |onzero (|and an e|
|00004560| 6d 70 74 79 20 62 75 66 | 66 65 72 29 20 6f 6e 20 |mpty buf|fer) on |
|00004570| 45 4f 46 20 6f 72 20 65 | 72 72 6f 72 2e 0a 58 20 |EOF or e|rror..X |
|00004580| 2a 2f 0a 58 74 74 79 72 | 65 61 64 28 70 72 6f 6d |*/.Xttyr|ead(prom|
|00004590| 70 74 2c 20 62 75 66 2c | 20 62 75 66 6c 65 6e 29 |pt, buf,| buflen)|
|000045a0| 0a 58 09 63 68 61 72 09 | 2a 70 72 6f 6d 70 74 3b |.X.char.|*prompt;|
|000045b0| 0a 58 09 63 68 61 72 09 | 2a 62 75 66 3b 0a 58 7b |.X.char.|*buf;.X{|
|000045c0| 0a 58 09 69 6e 74 09 63 | 3b 0a 58 09 63 68 61 72 |.X.int.c|;.X.char|
|000045d0| 09 2a 63 70 3b 0a 58 0a | 58 09 6d 6f 76 65 28 49 |.*cp;.X.|X.move(I|
|000045e0| 4e 50 55 54 4c 49 4e 45 | 2c 20 30 29 3b 0a 58 09 |NPUTLINE|, 0);.X.|
|000045f0| 61 64 64 73 74 72 28 70 | 72 6f 6d 70 74 29 3b 0a |addstr(p|rompt);.|
|00004600| 58 09 63 6c 72 74 6f 65 | 6f 6c 28 29 3b 0a 58 0a |X.clrtoe|ol();.X.|
|00004610| 58 09 63 70 20 3d 20 62 | 75 66 3b 0a 58 09 66 6f |X.cp = b|uf;.X.fo|
|00004620| 72 20 28 3b 3b 29 0a 58 | 09 7b 0a 58 09 09 72 65 |r (;;).X|.{.X..re|
|00004630| 66 72 65 73 68 28 29 3b | 0a 58 09 09 63 20 3d 20 |fresh();|.X..c = |
|00004640| 66 67 65 74 63 28 73 74 | 64 69 6e 29 3b 0a 58 09 |fgetc(st|din);.X.|
|00004650| 09 73 77 69 74 63 68 20 | 28 63 29 0a 58 09 09 7b |.switch |(c).X..{|
|00004660| 0a 58 09 09 63 61 73 65 | 20 45 4f 46 3a 0a 58 09 |.X..case| EOF:.X.|
|00004670| 09 09 62 75 66 5b 30 5d | 20 3d 20 27 5c 30 27 3b |..buf[0]| = '\0';|
|00004680| 0a 58 09 09 09 6d 6f 76 | 65 28 49 4e 50 55 54 4c |.X...mov|e(INPUTL|
|00004690| 49 4e 45 2c 20 30 29 3b | 0a 58 09 09 09 63 6c 72 |INE, 0);|.X...clr|
|000046a0| 74 6f 65 6f 6c 28 29 3b | 0a 58 09 09 09 6d 6f 76 |toeol();|.X...mov|
|000046b0| 65 28 30 2c 20 30 29 3b | 0a 58 09 09 09 72 65 66 |e(0, 0);|.X...ref|
|000046c0| 72 65 73 68 28 29 3b 0a | 58 09 09 09 72 65 74 75 |resh();.|X...retu|
|000046d0| 72 6e 20 2d 31 3b 0a 58 | 0a 58 09 09 64 65 66 61 |rn -1;.X|.X..defa|
|000046e0| 75 6c 74 3a 0a 58 09 09 | 09 2a 63 70 2b 2b 20 3d |ult:.X..|.*cp++ =|
|000046f0| 20 63 3b 0a 58 09 09 09 | 61 64 64 63 68 28 63 29 | c;.X...|addch(c)|
|00004700| 3b 0a 58 09 09 09 69 66 | 20 28 63 70 20 3c 20 62 |;.X...if| (cp < b|
|00004710| 75 66 20 2b 20 62 75 66 | 6c 65 6e 20 2d 20 31 29 |uf + buf|len - 1)|
|00004720| 0a 58 09 09 09 09 62 72 | 65 61 6b 3b 0a 58 09 09 |.X....br|eak;.X..|
|00004730| 09 2f 2a 20 66 61 6c 6c | 20 74 68 72 6f 75 67 68 |./* fall| through|
|00004740| 2e 2e 2e 20 2a 2f 0a 58 | 0a 58 09 09 63 61 73 65 |... */.X|.X..case|
|00004750| 20 27 5c 6e 27 3a 0a 58 | 09 09 63 61 73 65 20 27 | '\n':.X|..case '|
|00004760| 5c 72 27 3a 0a 58 09 09 | 09 2a 63 70 20 3d 20 30 |\r':.X..|.*cp = 0|
|00004770| 3b 0a 58 09 09 09 6d 6f | 76 65 28 49 4e 50 55 54 |;.X...mo|ve(INPUT|
|00004780| 4c 49 4e 45 2c 20 30 29 | 3b 0a 58 09 09 09 63 6c |LINE, 0)|;.X...cl|
|00004790| 72 74 6f 65 6f 6c 28 29 | 3b 0a 58 09 09 09 6d 6f |rtoeol()|;.X...mo|
|000047a0| 76 65 28 30 2c 20 30 29 | 3b 0a 58 09 09 09 72 65 |ve(0, 0)|;.X...re|
|000047b0| 66 72 65 73 68 28 29 3b | 0a 58 09 09 09 72 65 74 |fresh();|.X...ret|
|000047c0| 75 72 6e 20 30 3b 0a 58 | 0a 58 09 09 63 61 73 65 |urn 0;.X|.X..case|
|000047d0| 20 27 5c 62 27 3a 0a 58 | 09 09 09 69 66 20 28 63 | '\b':.X|...if (c|
|000047e0| 70 20 3d 3d 20 62 75 66 | 29 0a 58 09 09 09 09 62 |p == buf|).X....b|
|000047f0| 72 65 61 6b 3b 0a 58 09 | 09 09 2d 2d 63 70 3b 0a |reak;.X.|..--cp;.|
|00004800| 58 09 09 09 61 64 64 63 | 68 28 27 5c 62 27 29 3b |X...addc|h('\b');|
|00004810| 0a 58 09 09 09 63 6c 72 | 74 6f 65 6f 6c 28 29 3b |.X...clr|toeol();|
|00004820| 0a 58 09 09 09 62 72 65 | 61 6b 3b 0a 58 09 09 7d |.X...bre|ak;.X..}|
|00004830| 0a 58 09 7d 0a 58 7d 0a | 58 0a 58 2f 2a 20 45 4e |.X.}.X}.|X.X/* EN|
|00004840| 44 20 43 4f 44 45 20 2a | 2f 0a 45 4e 44 5f 4f 46 |D CODE *|/.END_OF|
|00004850| 5f 46 49 4c 45 0a 69 66 | 20 74 65 73 74 20 32 33 |_FILE.if| test 23|
|00004860| 33 35 20 2d 6e 65 20 60 | 77 63 20 2d 63 20 3c 27 |35 -ne `|wc -c <'|
|00004870| 63 75 72 73 65 73 74 74 | 79 2e 63 27 60 3b 20 74 |cursestt|y.c'`; t|
|00004880| 68 65 6e 0a 20 20 20 20 | 65 63 68 6f 20 73 68 61 |hen. |echo sha|
|00004890| 72 3a 20 5c 22 27 63 75 | 72 73 65 73 74 74 79 2e |r: \"'cu|rsestty.|
|000048a0| 63 27 5c 22 20 75 6e 70 | 61 63 6b 65 64 20 77 69 |c'\" unp|acked wi|
|000048b0| 74 68 20 77 72 6f 6e 67 | 20 73 69 7a 65 21 0a 66 |th wrong| size!.f|
|000048c0| 69 0a 23 20 65 6e 64 20 | 6f 66 20 27 63 75 72 73 |i.# end |of 'curs|
|000048d0| 65 73 74 74 79 2e 63 27 | 0a 66 69 0a 69 66 20 74 |estty.c'|.fi.if t|
|000048e0| 65 73 74 20 2d 66 20 27 | 64 75 6d 62 74 74 79 2e |est -f '|dumbtty.|
|000048f0| 63 27 20 2d 61 20 22 24 | 7b 31 7d 22 20 21 3d 20 |c' -a "$|{1}" != |
|00004900| 22 2d 63 22 20 3b 20 74 | 68 65 6e 20 0a 20 20 65 |"-c" ; t|hen . e|
|00004910| 63 68 6f 20 73 68 61 72 | 3a 20 57 69 6c 6c 20 6e |cho shar|: Will n|
|00004920| 6f 74 20 63 6c 6f 62 62 | 65 72 20 65 78 69 73 74 |ot clobb|er exist|
|00004930| 69 6e 67 20 66 69 6c 65 | 20 5c 22 27 64 75 6d 62 |ing file| \"'dumb|
|00004940| 74 74 79 2e 63 27 5c 22 | 0a 65 6c 73 65 0a 65 63 |tty.c'\"|.else.ec|
|00004950| 68 6f 20 73 68 61 72 3a | 20 45 78 74 72 61 63 74 |ho shar:| Extract|
|00004960| 69 6e 67 20 5c 22 27 64 | 75 6d 62 74 74 79 2e 63 |ing \"'d|umbtty.c|
|00004970| 27 5c 22 20 5c 28 32 30 | 33 35 20 63 68 61 72 61 |'\" \(20|35 chara|
|00004980| 63 74 65 72 73 5c 29 0a | 73 65 64 20 22 73 2f 5e |cters\).|sed "s/^|
|00004990| 58 2f 2f 22 20 3e 27 64 | 75 6d 62 74 74 79 2e 63 |X//" >'d|umbtty.c|
|000049a0| 27 20 3c 3c 27 45 4e 44 | 5f 4f 46 5f 46 49 4c 45 |' <<'END|_OF_FILE|
|000049b0| 27 0a 58 2f 2a 0a 58 20 | 2a 20 44 75 6d 62 20 74 |'.X/*.X |* Dumb t|
|000049c0| 65 72 6d 69 6e 61 6c 20 | 6f 75 74 70 75 74 20 72 |erminal |output r|
|000049d0| 6f 75 74 69 6e 65 2e 0a | 58 20 2a 20 44 6f 65 73 |outine..|X * Does|
|000049e0| 20 6e 6f 20 63 75 72 73 | 6f 72 20 61 64 64 72 65 | no curs|or addre|
|000049f0| 73 73 69 6e 67 20 73 74 | 75 66 66 2e 0a 58 20 2a |ssing st|uff..X *|
|00004a00| 2f 0a 58 0a 58 23 69 6e | 63 6c 75 64 65 20 3c 73 |/.X.X#in|clude <s|
|00004a10| 74 64 69 6f 2e 68 3e 0a | 58 23 69 6e 63 6c 75 64 |tdio.h>.|X#includ|
|00004a20| 65 20 3c 73 69 67 6e 61 | 6c 2e 68 3e 0a 58 23 69 |e <signa|l.h>.X#i|
|00004a30| 6e 63 6c 75 64 65 20 22 | 73 74 64 61 72 67 2e 68 |nclude "|stdarg.h|
|00004a40| 22 0a 58 0a 58 0a 58 73 | 74 61 74 69 63 09 69 6e |".X.X.Xs|tatic.in|
|00004a50| 74 09 69 6e 70 75 74 72 | 65 61 64 79 3b 09 09 2f |t.inputr|eady;../|
|00004a60| 2a 20 6e 6f 6e 7a 65 72 | 6f 20 69 66 20 69 6e 70 |* nonzer|o if inp|
|00004a70| 75 74 20 6e 6f 77 20 72 | 65 61 64 79 20 2a 2f 0a |ut now r|eady */.|
|00004a80| 58 0a 58 73 74 61 74 69 | 63 20 76 6f 69 64 09 67 |X.Xstati|c void.g|
|00004a90| 6f 74 69 6e 70 75 74 28 | 29 3b 0a 58 65 78 74 65 |otinput(|);.Xexte|
|00004aa0| 72 6e 20 76 6f 69 64 09 | 74 74 79 77 72 69 74 65 |rn void.|ttywrite|
|00004ab0| 28 29 3b 0a 58 0a 58 0a | 58 2f 2a 0a 58 20 2a 20 |();.X.X.|X/*.X * |
|00004ac0| 4f 70 65 6e 20 74 68 65 | 20 74 65 72 6d 69 6e 61 |Open the| termina|
|00004ad0| 6c 20 61 6e 64 20 65 6e | 61 62 6c 65 20 66 6f 72 |l and en|able for|
|00004ae0| 20 64 65 74 65 63 74 69 | 6e 67 20 74 65 72 6d 69 | detecti|ng termi|
|00004af0| 6e 61 6c 20 69 6e 70 75 | 74 2e 0a 58 20 2a 2f 0a |nal inpu|t..X */.|
|00004b00| 58 74 74 79 6f 70 65 6e | 28 29 0a 58 7b 0a 58 09 |Xttyopen|().X{.X.|
|00004b10| 73 69 67 6e 61 6c 28 53 | 49 47 49 4e 54 2c 20 67 |signal(S|IGINT, g|
|00004b20| 6f 74 69 6e 70 75 74 29 | 3b 0a 58 09 72 65 74 75 |otinput)|;.X.retu|
|00004b30| 72 6e 20 30 3b 0a 58 7d | 0a 58 0a 58 0a 58 73 74 |rn 0;.X}|.X.X.Xst|
|00004b40| 61 74 69 63 20 76 6f 69 | 64 0a 58 67 6f 74 69 6e |atic voi|d.Xgotin|
|00004b50| 70 75 74 28 29 0a 58 7b | 0a 58 09 73 69 67 6e 61 |put().X{|.X.signa|
|00004b60| 6c 28 53 49 47 49 4e 54 | 2c 20 67 6f 74 69 6e 70 |l(SIGINT|, gotinp|
|00004b70| 75 74 29 3b 0a 58 09 69 | 6e 70 75 74 72 65 61 64 |ut);.X.i|nputread|
|00004b80| 79 20 3d 20 31 3b 0a 58 | 7d 0a 58 0a 58 0a 58 2f |y = 1;.X|}.X.X.X/|
|00004b90| 2a 0a 58 20 2a 20 43 6c | 6f 73 65 20 74 68 65 20 |*.X * Cl|ose the |
|00004ba0| 74 65 72 6d 69 6e 61 6c | 2e 0a 58 20 2a 2f 0a 58 |terminal|..X */.X|
|00004bb0| 76 6f 69 64 0a 58 74 74 | 79 63 6c 6f 73 65 28 29 |void.Xtt|yclose()|
|00004bc0| 0a 58 7b 0a 58 7d 0a 58 | 0a 58 0a 58 2f 2a 0a 58 |.X{.X}.X|.X.X/*.X|
|00004bd0| 20 2a 20 54 65 73 74 20 | 74 6f 20 73 65 65 20 69 | * Test |to see i|
|00004be0| 66 20 61 20 6b 65 79 62 | 6f 61 72 64 20 63 68 61 |f a keyb|oard cha|
|00004bf0| 72 61 63 74 65 72 20 69 | 73 20 72 65 61 64 79 2e |racter i|s ready.|
|00004c00| 0a 58 20 2a 20 52 65 74 | 75 72 6e 73 20 6e 6f 6e |.X * Ret|urns non|
|00004c10| 7a 65 72 6f 20 69 66 20 | 73 6f 20 28 61 6e 64 20 |zero if |so (and |
|00004c20| 63 6c 65 61 72 73 20 74 | 68 65 20 72 65 61 64 79 |clears t|he ready|
|00004c30| 20 66 6c 61 67 29 2e 0a | 58 20 2a 2f 0a 58 74 74 | flag)..|X */.Xtt|
|00004c40| 79 63 68 65 63 6b 28 29 | 0a 58 7b 0a 58 09 69 6e |ycheck()|.X{.X.in|
|00004c50| 74 09 72 65 73 75 6c 74 | 3b 0a 58 0a 58 09 72 65 |t.result|;.X.X.re|
|00004c60| 73 75 6c 74 20 3d 20 69 | 6e 70 75 74 72 65 61 64 |sult = i|nputread|
|00004c70| 79 3b 0a 58 09 69 6e 70 | 75 74 72 65 61 64 79 20 |y;.X.inp|utready |
|00004c80| 3d 20 30 3b 0a 58 09 72 | 65 74 75 72 6e 20 72 65 |= 0;.X.r|eturn re|
|00004c90| 73 75 6c 74 3b 0a 58 7d | 0a 58 0a 58 0a 58 2f 2a |sult;.X}|.X.X.X/*|
|00004ca0| 0a 58 20 2a 20 50 72 69 | 6e 74 20 61 20 66 6f 72 |.X * Pri|nt a for|
|00004cb0| 6d 61 74 74 65 64 20 73 | 74 72 69 6e 67 20 74 6f |matted s|tring to|
|00004cc0| 20 74 68 65 20 74 65 72 | 6d 69 6e 61 6c 2e 0a 58 | the ter|minal..X|
|00004cd0| 20 2a 20 54 68 65 20 73 | 74 72 69 6e 67 20 6c 65 | * The s|tring le|
|00004ce0| 6e 67 74 68 20 69 73 20 | 6c 69 6d 69 74 65 64 20 |ngth is |limited |
|00004cf0| 74 6f 20 32 35 36 20 63 | 68 61 72 61 63 74 65 72 |to 256 c|haracter|
|00004d00| 73 2e 0a 58 20 2a 2f 0a | 58 76 6f 69 64 0a 58 74 |s..X */.|Xvoid.Xt|
|00004d10| 74 79 70 72 69 6e 74 66 | 28 66 6d 74 29 0a 58 09 |typrintf|(fmt).X.|
|00004d20| 63 68 61 72 09 2a 66 6d | 74 3b 0a 58 7b 0a 58 09 |char.*fm|t;.X{.X.|
|00004d30| 76 61 5f 6c 69 73 74 20 | 61 70 3b 0a 58 09 73 74 |va_list |ap;.X.st|
|00004d40| 61 74 69 63 20 63 68 61 | 72 09 62 75 66 5b 32 35 |atic cha|r.buf[25|
|00004d50| 36 5d 3b 0a 58 0a 58 09 | 76 61 5f 73 74 61 72 74 |6];.X.X.|va_start|
|00004d60| 28 61 70 2c 20 66 6d 74 | 29 3b 0a 58 09 76 73 70 |(ap, fmt|);.X.vsp|
|00004d70| 72 69 6e 74 66 28 62 75 | 66 2c 20 66 6d 74 2c 20 |rintf(bu|f, fmt, |
|00004d80| 61 70 29 3b 0a 58 09 76 | 61 5f 65 6e 64 28 61 70 |ap);.X.v|a_end(ap|
|00004d90| 29 3b 0a 58 09 74 74 79 | 77 72 69 74 65 28 62 75 |);.X.tty|write(bu|
|00004da0| 66 2c 20 73 74 72 6c 65 | 6e 28 62 75 66 29 29 3b |f, strle|n(buf));|
|00004db0| 0a 58 7d 0a 58 0a 58 0a | 58 2f 2a 0a 58 20 2a 20 |.X}.X.X.|X/*.X * |
|00004dc0| 50 72 69 6e 74 20 61 20 | 73 74 61 74 75 73 20 6d |Print a |status m|
|00004dd0| 65 73 73 61 67 65 2c 20 | 6c 69 6b 65 20 70 72 69 |essage, |like pri|
|00004de0| 6e 74 66 2e 0a 58 20 2a | 20 54 68 65 20 73 74 72 |ntf..X *| The str|
|00004df0| 69 6e 67 20 6c 65 6e 67 | 74 68 20 69 73 20 6c 69 |ing leng|th is li|
|00004e00| 6d 69 74 65 64 20 74 6f | 20 32 35 36 20 63 68 61 |mited to| 256 cha|
|00004e10| 72 61 63 74 65 72 73 2e | 0a 58 20 2a 2f 0a 58 76 |racters.|.X */.Xv|
|00004e20| 6f 69 64 0a 58 74 74 79 | 73 74 61 74 75 73 28 66 |oid.Xtty|status(f|
|00004e30| 6d 74 29 0a 58 09 63 68 | 61 72 09 2a 66 6d 74 3b |mt).X.ch|ar.*fmt;|
|00004e40| 0a 58 7b 0a 58 09 76 61 | 5f 6c 69 73 74 20 61 70 |.X{.X.va|_list ap|
|00004e50| 3b 0a 58 09 73 74 61 74 | 69 63 20 63 68 61 72 09 |;.X.stat|ic char.|
|00004e60| 62 75 66 5b 32 35 36 5d | 3b 0a 58 0a 58 09 76 61 |buf[256]|;.X.X.va|
|00004e70| 5f 73 74 61 72 74 28 61 | 70 2c 20 66 6d 74 29 3b |_start(a|p, fmt);|
|00004e80| 0a 58 09 76 73 70 72 69 | 6e 74 66 28 62 75 66 2c |.X.vspri|ntf(buf,|
|00004e90| 20 66 6d 74 2c 20 61 70 | 29 3b 0a 58 09 76 61 5f | fmt, ap|);.X.va_|
|00004ea0| 65 6e 64 28 61 70 29 3b | 0a 58 09 74 74 79 77 72 |end(ap);|.X.ttywr|
|00004eb0| 69 74 65 28 62 75 66 2c | 20 73 74 72 6c 65 6e 28 |ite(buf,| strlen(|
|00004ec0| 62 75 66 29 29 3b 0a 58 | 7d 0a 58 0a 58 0a 58 2f |buf));.X|}.X.X.X/|
|00004ed0| 2a 0a 58 20 2a 20 57 72 | 69 74 65 20 74 68 65 20 |*.X * Wr|ite the |
|00004ee0| 73 70 65 63 69 66 69 65 | 64 20 6e 75 6d 62 65 72 |specifie|d number|
|00004ef0| 20 6f 66 20 63 68 61 72 | 61 63 74 65 72 73 20 74 | of char|acters t|
|00004f00| 6f 20 74 68 65 20 74 65 | 72 6d 69 6e 61 6c 2e 0a |o the te|rminal..|
|00004f10| 58 20 2a 2f 0a 58 76 6f | 69 64 0a 58 74 74 79 77 |X */.Xvo|id.Xttyw|
|00004f20| 72 69 74 65 28 62 75 66 | 2c 20 63 6f 75 6e 74 29 |rite(buf|, count)|
|00004f30| 0a 58 09 75 6e 73 69 67 | 6e 65 64 20 63 68 61 72 |.X.unsig|ned char|
|00004f40| 09 2a 62 75 66 3b 09 09 | 2f 2a 20 62 75 66 66 65 |.*buf;..|/* buffe|
|00004f50| 72 20 74 6f 20 77 72 69 | 74 65 20 2a 2f 0a 58 09 |r to wri|te */.X.|
|00004f60| 69 6e 74 09 63 6f 75 6e | 74 3b 09 09 09 2f 2a 20 |int.coun|t;.../* |
|00004f70| 6e 75 6d 62 65 72 20 6f | 66 20 63 68 61 72 61 63 |number o|f charac|
|00004f80| 74 65 72 73 20 2a 2f 0a | 58 7b 0a 58 09 75 6e 73 |ters */.|X{.X.uns|
|00004f90| 69 67 6e 65 64 20 63 68 | 61 72 20 63 68 3b 0a 58 |igned ch|ar ch;.X|
|00004fa0| 0a 58 09 77 68 69 6c 65 | 20 28 63 6f 75 6e 74 2d |.X.while| (count-|
|00004fb0| 2d 20 3e 20 30 29 20 7b | 0a 58 09 09 63 68 20 3d |- > 0) {|.X..ch =|
|00004fc0| 20 2a 62 75 66 2b 2b 3b | 0a 58 09 09 70 75 74 63 | *buf++;|.X..putc|
|00004fd0| 68 61 72 28 63 68 29 3b | 0a 58 09 7d 0a 58 7d 0a |har(ch);|.X.}.X}.|
|00004fe0| 58 0a 58 0a 58 76 6f 69 | 64 0a 58 74 74 79 68 6f |X.X.Xvoi|d.Xttyho|
|00004ff0| 6d 65 28 29 0a 58 7b 0a | 58 7d 0a 58 0a 58 0a 58 |me().X{.|X}.X.X.X|
|00005000| 76 6f 69 64 0a 58 74 74 | 79 65 65 6f 70 28 29 0a |void.Xtt|yeeop().|
|00005010| 58 7b 0a 58 7d 0a 58 0a | 58 0a 58 76 6f 69 64 0a |X{.X}.X.|X.Xvoid.|
|00005020| 58 74 74 79 66 6c 75 73 | 68 28 29 0a 58 7b 0a 58 |Xttyflus|h().X{.X|
|00005030| 09 66 66 6c 75 73 68 28 | 73 74 64 6f 75 74 29 3b |.fflush(|stdout);|
|00005040| 0a 58 7d 0a 58 0a 58 0a | 58 2f 2a 0a 58 20 2a 20 |.X}.X.X.|X/*.X * |
|00005050| 52 65 74 75 72 6e 20 61 | 20 4e 55 4c 4c 20 74 65 |Return a| NULL te|
|00005060| 72 6d 69 6e 61 74 65 64 | 20 69 6e 70 75 74 20 6c |rminated| input l|
|00005070| 69 6e 65 20 28 77 69 74 | 68 6f 75 74 20 74 68 65 |ine (wit|hout the|
|00005080| 20 66 69 6e 61 6c 20 6e | 65 77 6c 69 6e 65 29 2e | final n|ewline).|
|00005090| 0a 58 20 2a 20 54 68 65 | 20 73 70 65 63 69 66 69 |.X * The| specifi|
|000050a0| 65 64 20 73 74 72 69 6e | 67 20 69 73 20 70 72 69 |ed strin|g is pri|
|000050b0| 6e 74 65 64 20 61 73 20 | 61 20 70 72 6f 6d 70 74 |nted as |a prompt|
|000050c0| 2e 0a 58 20 2a 20 52 65 | 74 75 72 6e 73 20 6e 6f |..X * Re|turns no|
|000050d0| 6e 7a 65 72 6f 20 28 61 | 6e 64 20 61 6e 20 65 6d |nzero (a|nd an em|
|000050e0| 70 74 79 20 62 75 66 66 | 65 72 29 20 6f 6e 20 45 |pty buff|er) on E|
|000050f0| 4f 46 20 6f 72 20 65 72 | 72 6f 72 2e 0a 58 20 2a |OF or er|ror..X *|
|00005100| 2f 0a 58 74 74 79 72 65 | 61 64 28 70 72 6f 6d 70 |/.Xttyre|ad(promp|
|00005110| 74 2c 20 62 75 66 2c 20 | 62 75 66 6c 65 6e 29 0a |t, buf, |buflen).|
|00005120| 58 09 63 68 61 72 09 2a | 70 72 6f 6d 70 74 3b 0a |X.char.*|prompt;.|
|00005130| 58 09 63 68 61 72 09 2a | 62 75 66 3b 0a 58 7b 0a |X.char.*|buf;.X{.|
|00005140| 58 09 69 6e 74 09 6c 65 | 6e 3b 0a 58 0a 58 09 66 |X.int.le|n;.X.X.f|
|00005150| 70 75 74 73 28 70 72 6f | 6d 70 74 2c 20 73 74 64 |puts(pro|mpt, std|
|00005160| 6f 75 74 29 3b 0a 58 09 | 66 66 6c 75 73 68 28 73 |out);.X.|fflush(s|
|00005170| 74 64 6f 75 74 29 3b 0a | 58 0a 58 09 69 66 20 28 |tdout);.|X.X.if (|
|00005180| 66 67 65 74 73 28 62 75 | 66 2c 20 62 75 66 6c 65 |fgets(bu|f, bufle|
|00005190| 6e 2c 20 73 74 64 69 6e | 29 20 3d 3d 20 4e 55 4c |n, stdin|) == NUL|
|000051a0| 4c 29 20 7b 0a 58 09 09 | 62 75 66 5b 30 5d 20 3d |L) {.X..|buf[0] =|
|000051b0| 20 27 5c 30 27 3b 0a 58 | 09 09 72 65 74 75 72 6e | '\0';.X|..return|
|000051c0| 20 2d 31 3b 0a 58 09 7d | 0a 58 09 6c 65 6e 20 3d | -1;.X.}|.X.len =|
|000051d0| 20 73 74 72 6c 65 6e 28 | 62 75 66 29 20 2d 20 31 | strlen(|buf) - 1|
|000051e0| 3b 0a 58 09 69 66 20 28 | 28 6c 65 6e 20 3e 3d 20 |;.X.if (|(len >= |
|000051f0| 30 29 20 26 26 20 28 62 | 75 66 5b 6c 65 6e 5d 20 |0) && (b|uf[len] |
|00005200| 3d 3d 20 27 5c 6e 27 29 | 29 0a 58 09 09 62 75 66 |== '\n')|).X..buf|
|00005210| 5b 6c 65 6e 5d 20 3d 20 | 27 5c 30 27 3b 0a 58 09 |[len] = |'\0';.X.|
|00005220| 72 65 74 75 72 6e 20 30 | 3b 0a 58 7d 0a 58 0a 58 |return 0|;.X}.X.X|
|00005230| 2f 2a 20 45 4e 44 20 43 | 4f 44 45 20 2a 2f 0a 45 |/* END C|ODE */.E|
|00005240| 4e 44 5f 4f 46 5f 46 49 | 4c 45 0a 69 66 20 74 65 |ND_OF_FI|LE.if te|
|00005250| 73 74 20 32 30 33 35 20 | 2d 6e 65 20 60 77 63 20 |st 2035 |-ne `wc |
|00005260| 2d 63 20 3c 27 64 75 6d | 62 74 74 79 2e 63 27 60 |-c <'dum|btty.c'`|
|00005270| 3b 20 74 68 65 6e 0a 20 | 20 20 20 65 63 68 6f 20 |; then. | echo |
|00005280| 73 68 61 72 3a 20 5c 22 | 27 64 75 6d 62 74 74 79 |shar: \"|'dumbtty|
|00005290| 2e 63 27 5c 22 20 75 6e | 70 61 63 6b 65 64 20 77 |.c'\" un|packed w|
|000052a0| 69 74 68 20 77 72 6f 6e | 67 20 73 69 7a 65 21 0a |ith wron|g size!.|
|000052b0| 66 69 0a 23 20 65 6e 64 | 20 6f 66 20 27 64 75 6d |fi.# end| of 'dum|
|000052c0| 62 74 74 79 2e 63 27 0a | 66 69 0a 69 66 20 74 65 |btty.c'.|fi.if te|
|000052d0| 73 74 20 2d 66 20 27 69 | 6e 74 65 72 61 63 74 2e |st -f 'i|nteract.|
|000052e0| 63 27 20 2d 61 20 22 24 | 7b 31 7d 22 20 21 3d 20 |c' -a "$|{1}" != |
|000052f0| 22 2d 63 22 20 3b 20 74 | 68 65 6e 20 0a 20 20 65 |"-c" ; t|hen . e|
|00005300| 63 68 6f 20 73 68 61 72 | 3a 20 57 69 6c 6c 20 6e |cho shar|: Will n|
|00005310| 6f 74 20 63 6c 6f 62 62 | 65 72 20 65 78 69 73 74 |ot clobb|er exist|
|00005320| 69 6e 67 20 66 69 6c 65 | 20 5c 22 27 69 6e 74 65 |ing file| \"'inte|
|00005330| 72 61 63 74 2e 63 27 5c | 22 0a 65 6c 73 65 0a 65 |ract.c'\|".else.e|
|00005340| 63 68 6f 20 73 68 61 72 | 3a 20 45 78 74 72 61 63 |cho shar|: Extrac|
|00005350| 74 69 6e 67 20 5c 22 27 | 69 6e 74 65 72 61 63 74 |ting \"'|interact|
|00005360| 2e 63 27 5c 22 20 5c 28 | 31 37 32 31 35 20 63 68 |.c'\" \(|17215 ch|
|00005370| 61 72 61 63 74 65 72 73 | 5c 29 0a 73 65 64 20 22 |aracters|\).sed "|
|00005380| 73 2f 5e 58 2f 2f 22 20 | 3e 27 69 6e 74 65 72 61 |s/^X//" |>'intera|
|00005390| 63 74 2e 63 27 20 3c 3c | 27 45 4e 44 5f 4f 46 5f |ct.c' <<|'END_OF_|
|000053a0| 46 49 4c 45 27 0a 58 2f | 2a 0a 58 20 2a 20 4c 69 |FILE'.X/|*.X * Li|
|000053b0| 66 65 20 73 65 61 72 63 | 68 20 70 72 6f 67 72 61 |fe searc|h progra|
|000053c0| 6d 20 2d 20 75 73 65 72 | 20 69 6e 74 65 72 61 63 |m - user| interac|
|000053d0| 74 69 6f 6e 73 20 6d 6f | 64 75 6c 65 2e 0a 58 20 |tions mo|dule..X |
|000053e0| 2a 20 41 75 74 68 6f 72 | 3a 20 44 61 76 69 64 20 |* Author|: David |
|000053f0| 49 2e 20 42 65 6c 6c 2e | 0a 58 20 2a 2f 0a 58 0a |I. Bell.|.X */.X.|
|00005400| 58 23 69 6e 63 6c 75 64 | 65 20 22 6c 69 66 65 73 |X#includ|e "lifes|
|00005410| 72 63 2e 68 22 0a 58 0a | 58 0a 58 2f 2a 0a 58 20 |rc.h".X.|X.X/*.X |
|00005420| 2a 20 4c 6f 63 61 6c 20 | 70 72 6f 63 65 64 75 72 |* Local |procedur|
|00005430| 65 73 0a 58 20 2a 2f 0a | 58 73 74 61 74 69 63 20 |es.X */.|Xstatic |
|00005440| 76 6f 69 64 09 75 73 61 | 67 65 28 29 3b 0a 58 73 |void.usa|ge();.Xs|
|00005450| 74 61 74 69 63 20 76 6f | 69 64 09 67 65 74 73 65 |tatic vo|id.getse|
|00005460| 74 74 69 6e 67 28 29 3b | 0a 58 73 74 61 74 69 63 |tting();|.Xstatic|
|00005470| 20 76 6f 69 64 09 63 6c | 65 61 72 75 6e 6b 6e 6f | void.cl|earunkno|
|00005480| 77 6e 73 28 29 3b 0a 58 | 73 74 61 74 69 63 20 76 |wns();.X|static v|
|00005490| 6f 69 64 09 77 72 69 74 | 65 67 65 6e 28 29 3b 0a |oid.writ|egen();.|
|000054a0| 58 73 74 61 74 69 63 20 | 53 54 41 54 55 53 09 6c |Xstatic |STATUS.l|
|000054b0| 6f 61 64 73 74 61 74 65 | 28 29 3b 0a 58 73 74 61 |oadstate|();.Xsta|
|000054c0| 74 69 63 20 53 54 41 54 | 55 53 09 72 65 61 64 66 |tic STAT|US.readf|
|000054d0| 69 6c 65 28 29 3b 0a 58 | 73 74 61 74 69 63 20 42 |ile();.X|static B|
|000054e0| 4f 4f 4c 09 63 6f 6e 66 | 69 72 6d 28 29 3b 0a 58 |OOL.conf|irm();.X|
|000054f0| 73 74 61 74 69 63 20 6c | 6f 6e 67 09 67 65 74 6e |static l|ong.getn|
|00005500| 75 6d 28 29 3b 0a 58 73 | 74 61 74 69 63 20 63 68 |um();.Xs|tatic ch|
|00005510| 61 72 09 2a 67 65 74 73 | 74 72 28 29 3b 0a 58 0a |ar.*gets|tr();.X.|
|00005520| 58 0a 58 6d 61 69 6e 28 | 61 72 67 63 2c 20 61 72 |X.Xmain(|argc, ar|
|00005530| 67 76 29 0a 58 09 63 68 | 61 72 09 2a 2a 61 72 67 |gv).X.ch|ar.**arg|
|00005540| 76 3b 0a 58 7b 0a 58 09 | 63 68 61 72 09 2a 73 74 |v;.X{.X.|char.*st|
|00005550| 72 3b 0a 58 09 53 54 41 | 54 55 53 09 73 74 61 74 |r;.X.STA|TUS.stat|
|00005560| 75 73 3b 0a 58 0a 58 09 | 69 66 20 28 2d 2d 61 72 |us;.X.X.|if (--ar|
|00005570| 67 63 20 3c 3d 20 30 29 | 20 7b 0a 58 09 09 75 73 |gc <= 0)| {.X..us|
|00005580| 61 67 65 28 29 3b 0a 58 | 09 09 65 78 69 74 28 31 |age();.X|..exit(1|
|00005590| 29 3b 0a 58 09 7d 0a 58 | 09 61 72 67 76 2b 2b 3b |);.X.}.X|.argv++;|
|000055a0| 0a 58 0a 58 09 77 68 69 | 6c 65 20 28 61 72 67 63 |.X.X.whi|le (argc|
|000055b0| 2d 2d 20 3e 20 30 29 20 | 7b 0a 58 09 09 73 74 72 |-- > 0) |{.X..str|
|000055c0| 20 3d 20 2a 61 72 67 76 | 2b 2b 3b 0a 58 09 09 69 | = *argv|++;.X..i|
|000055d0| 66 20 28 2a 73 74 72 2b | 2b 20 21 3d 20 27 2d 27 |f (*str+|+ != '-'|
|000055e0| 29 20 7b 0a 58 09 09 09 | 75 73 61 67 65 28 29 3b |) {.X...|usage();|
|000055f0| 0a 58 09 09 09 65 78 69 | 74 28 31 29 3b 0a 58 09 |.X...exi|t(1);.X.|
|00005600| 09 7d 0a 58 09 09 73 77 | 69 74 63 68 20 28 2a 73 |.}.X..sw|itch (*s|
|00005610| 74 72 2b 2b 29 20 7b 0a | 58 09 09 09 63 61 73 65 |tr++) {.|X...case|
|00005620| 20 27 72 27 3a 09 09 09 | 2f 2a 20 72 6f 77 73 20 | 'r':...|/* rows |
|00005630| 2a 2f 0a 58 09 09 09 09 | 72 6f 77 6d 61 78 20 3d |*/.X....|rowmax =|
|00005640| 20 61 74 6f 69 28 73 74 | 72 29 3b 0a 58 09 09 09 | atoi(st|r);.X...|
|00005650| 09 62 72 65 61 6b 3b 0a | 58 0a 58 09 09 09 63 61 |.break;.|X.X...ca|
|00005660| 73 65 20 27 63 27 3a 09 | 09 09 2f 2a 20 63 6f 6c |se 'c':.|../* col|
|00005670| 75 6d 6e 73 20 2a 2f 0a | 58 09 09 09 09 63 6f 6c |umns */.|X....col|
|00005680| 6d 61 78 20 3d 20 61 74 | 6f 69 28 73 74 72 29 3b |max = at|oi(str);|
|00005690| 0a 58 09 09 09 09 62 72 | 65 61 6b 3b 0a 58 0a 58 |.X....br|eak;.X.X|
|000056a0| 09 09 09 63 61 73 65 20 | 27 67 27 3a 09 09 09 2f |...case |'g':.../|
|000056b0| 2a 20 67 65 6e 65 72 61 | 74 69 6f 6e 73 20 2a 2f |* genera|tions */|
|000056c0| 0a 58 09 09 09 09 67 65 | 6e 6d 61 78 20 3d 20 61 |.X....ge|nmax = a|
|000056d0| 74 6f 69 28 73 74 72 29 | 3b 0a 58 09 09 09 09 62 |toi(str)|;.X....b|
|000056e0| 72 65 61 6b 3b 0a 58 0a | 58 09 09 09 63 61 73 65 |reak;.X.|X...case|
|000056f0| 20 27 74 27 3a 09 09 09 | 2f 2a 20 74 72 61 6e 73 | 't':...|/* trans|
|00005700| 6c 61 74 69 6f 6e 20 2a | 2f 0a 58 09 09 09 09 73 |lation *|/.X....s|
|00005710| 77 69 74 63 68 20 28 2a | 73 74 72 2b 2b 29 20 7b |witch (*|str++) {|
|00005720| 0a 58 09 09 09 09 09 63 | 61 73 65 20 27 72 27 3a |.X.....c|ase 'r':|
|00005730| 0a 58 09 09 09 09 09 09 | 72 6f 77 74 72 61 6e 73 |.X......|rowtrans|
|00005740| 20 3d 20 61 74 6f 69 28 | 73 74 72 29 3b 0a 58 09 | = atoi(|str);.X.|
|00005750| 09 09 09 09 09 62 72 65 | 61 6b 3b 0a 58 09 09 09 |.....bre|ak;.X...|
|00005760| 09 09 63 61 73 65 20 27 | 63 27 3a 0a 58 09 09 09 |..case '|c':.X...|
|00005770| 09 09 09 63 6f 6c 74 72 | 61 6e 73 20 3d 20 61 74 |...coltr|ans = at|
|00005780| 6f 69 28 73 74 72 29 3b | 0a 58 09 09 09 09 09 09 |oi(str);|.X......|
|00005790| 62 72 65 61 6b 3b 0a 58 | 09 09 09 09 09 64 65 66 |break;.X|.....def|
|000057a0| 61 75 6c 74 3a 0a 58 09 | 09 09 09 09 09 66 70 72 |ault:.X.|.....fpr|
|000057b0| 69 6e 74 66 28 73 74 64 | 65 72 72 2c 20 22 42 61 |intf(std|err, "Ba|
|000057c0| 64 20 74 72 61 6e 73 6c | 61 74 65 5c 6e 22 29 3b |d transl|ate\n");|
|000057d0| 0a 58 09 09 09 09 09 09 | 65 78 69 74 28 31 29 3b |.X......|exit(1);|
|000057e0| 0a 58 09 09 09 09 7d 0a | 58 09 09 09 09 62 72 65 |.X....}.|X....bre|
|000057f0| 61 6b 3b 0a 58 0a 58 09 | 09 09 63 61 73 65 20 27 |ak;.X.X.|..case '|
|00005800| 73 27 3a 09 09 09 2f 2a | 20 73 79 6d 6d 65 74 72 |s':.../*| symmetr|
|00005810| 79 20 2a 2f 0a 58 09 09 | 09 09 73 77 69 74 63 68 |y */.X..|..switch|
|00005820| 20 28 2a 73 74 72 2b 2b | 29 20 7b 0a 58 09 09 09 | (*str++|) {.X...|
|00005830| 09 09 63 61 73 65 20 27 | 72 27 3a 0a 58 09 09 09 |..case '|r':.X...|
|00005840| 09 09 09 72 6f 77 73 79 | 6d 20 3d 20 54 52 55 45 |...rowsy|m = TRUE|
|00005850| 3b 0a 58 09 09 09 09 09 | 09 62 72 65 61 6b 3b 0a |;.X.....|.break;.|
|00005860| 58 09 09 09 09 09 63 61 | 73 65 20 27 63 27 3a 0a |X.....ca|se 'c':.|
|00005870| 58 09 09 09 09 09 09 63 | 6f 6c 73 79 6d 20 3d 20 |X......c|olsym = |
|00005880| 54 52 55 45 3b 0a 58 09 | 09 09 09 09 09 62 72 65 |TRUE;.X.|.....bre|
|00005890| 61 6b 3b 0a 58 09 09 09 | 09 09 64 65 66 61 75 6c |ak;.X...|..defaul|
|000058a0| 74 3a 0a 58 09 09 09 09 | 09 09 66 70 72 69 6e 74 |t:.X....|..fprint|
|000058b0| 66 28 73 74 64 65 72 72 | 2c 20 22 42 61 64 20 73 |f(stderr|, "Bad s|
|000058c0| 79 6d 6d 65 74 72 79 5c | 6e 22 29 3b 0a 58 09 09 |ymmetry\|n");.X..|
|000058d0| 09 09 09 09 65 78 69 74 | 28 31 29 3b 0a 58 09 09 |....exit|(1);.X..|
|000058e0| 09 09 7d 0a 58 09 09 09 | 09 62 72 65 61 6b 3b 0a |..}.X...|.break;.|
|000058f0| 58 0a 58 09 09 09 63 61 | 73 65 20 27 64 27 3a 09 |X.X...ca|se 'd':.|
|00005900| 09 09 2f 2a 20 64 75 6d | 70 20 66 72 65 71 75 65 |../* dum|p freque|
|00005910| 6e 63 79 20 2a 2f 0a 58 | 09 09 09 09 64 75 6d 70 |ncy */.X|....dump|
|00005920| 66 72 65 71 20 3d 20 61 | 74 6f 6c 28 73 74 72 29 |freq = a|tol(str)|
|00005930| 20 2a 20 44 55 4d 50 4d | 55 4c 54 3b 0a 58 09 09 | * DUMPM|ULT;.X..|
|00005940| 09 09 64 75 6d 70 66 69 | 6c 65 20 3d 20 44 55 4d |..dumpfi|le = DUM|
|00005950| 50 46 49 4c 45 3b 0a 58 | 09 09 09 09 69 66 20 28 |PFILE;.X|....if (|
|00005960| 28 61 72 67 63 20 3e 20 | 30 29 20 26 26 20 28 2a |(argc > |0) && (*|
|00005970| 2a 61 72 67 76 20 21 3d | 20 27 2d 27 29 29 20 7b |*argv !=| '-')) {|
|00005980| 0a 58 09 09 09 09 09 61 | 72 67 63 2d 2d 3b 0a 58 |.X.....a|rgc--;.X|
|00005990| 09 09 09 09 09 64 75 6d | 70 66 69 6c 65 20 3d 20 |.....dum|pfile = |
|000059a0| 2a 61 72 67 76 2b 2b 3b | 0a 58 09 09 09 09 7d 0a |*argv++;|.X....}.|
|000059b0| 58 09 09 09 09 62 72 65 | 61 6b 3b 0a 58 0a 58 09 |X....bre|ak;.X.X.|
|000059c0| 09 09 63 61 73 65 20 27 | 76 27 3a 09 09 09 2f 2a |..case '|v':.../*|
|000059d0| 20 76 69 65 77 20 66 72 | 65 71 75 65 6e 63 79 20 | view fr|equency |
|000059e0| 2a 2f 0a 58 09 09 09 09 | 76 69 65 77 66 72 65 71 |*/.X....|viewfreq|
|000059f0| 20 3d 20 61 74 6f 6c 28 | 73 74 72 29 20 2a 20 56 | = atol(|str) * V|
|00005a00| 49 45 57 4d 55 4c 54 3b | 0a 58 09 09 09 09 62 72 |IEWMULT;|.X....br|
|00005a10| 65 61 6b 3b 0a 58 0a 58 | 09 09 09 63 61 73 65 20 |eak;.X.X|...case |
|00005a20| 27 6c 27 3a 09 09 09 2f | 2a 20 6c 6f 61 64 20 66 |'l':.../|* load f|
|00005a30| 69 6c 65 20 2a 2f 0a 58 | 09 09 09 09 69 66 20 28 |ile */.X|....if (|
|00005a40| 2a 73 74 72 20 3d 3d 20 | 27 6e 27 29 0a 58 09 09 |*str == |'n').X..|
|00005a50| 09 09 09 6e 6f 77 61 69 | 74 20 3d 20 54 52 55 45 |...nowai|t = TRUE|
|00005a60| 3b 0a 58 09 09 09 09 69 | 66 20 28 28 61 72 67 63 |;.X....i|f ((argc|
|00005a70| 20 3c 3d 20 30 29 20 7c | 7c 20 28 2a 2a 61 72 67 | <= 0) ||| (**arg|
|00005a80| 76 20 3d 3d 20 27 2d 27 | 29 29 20 7b 0a 58 09 09 |v == '-'|)) {.X..|
|00005a90| 09 09 09 66 70 72 69 6e | 74 66 28 73 74 64 65 72 |...fprin|tf(stder|
|00005aa0| 72 2c 20 22 4d 69 73 73 | 69 6e 67 20 6c 6f 61 64 |r, "Miss|ing load|
|00005ab0| 20 66 69 6c 65 20 6e 61 | 6d 65 5c 6e 22 29 3b 0a | file na|me\n");.|
|00005ac0| 58 09 09 09 09 09 65 78 | 69 74 28 31 29 3b 0a 58 |X.....ex|it(1);.X|
|00005ad0| 09 09 09 09 7d 0a 58 09 | 09 09 09 6c 6f 61 64 66 |....}.X.|...loadf|
|00005ae0| 69 6c 65 20 3d 20 2a 61 | 72 67 76 2b 2b 3b 0a 58 |ile = *a|rgv++;.X|
|00005af0| 09 09 09 09 61 72 67 63 | 2d 2d 3b 0a 58 09 09 09 |....argc|--;.X...|
|00005b00| 09 62 72 65 61 6b 3b 0a | 58 0a 58 09 09 09 63 61 |.break;.|X.X...ca|
|00005b10| 73 65 20 27 69 27 3a 09 | 09 09 2f 2a 20 69 6e 69 |se 'i':.|../* ini|
|00005b20| 74 69 61 6c 20 66 69 6c | 65 20 2a 2f 0a 58 09 09 |tial fil|e */.X..|
|00005b30| 09 09 69 66 20 28 2a 73 | 74 72 20 3d 3d 20 27 61 |..if (*s|tr == 'a|
|00005b40| 27 29 0a 58 09 09 09 09 | 09 73 65 74 61 6c 6c 20 |').X....|.setall |
|00005b50| 3d 20 54 52 55 45 3b 0a | 58 09 09 09 09 69 66 20 |= TRUE;.|X....if |
|00005b60| 28 28 61 72 67 63 20 3c | 3d 20 30 29 20 7c 7c 20 |((argc <|= 0) || |
|00005b70| 28 2a 2a 61 72 67 76 20 | 3d 3d 20 27 2d 27 29 29 |(**argv |== '-'))|
|00005b80| 20 7b 0a 58 09 09 09 09 | 09 66 70 72 69 6e 74 66 | {.X....|.fprintf|
|00005b90| 28 73 74 64 65 72 72 2c | 20 22 4d 69 73 73 69 6e |(stderr,| "Missin|
|00005ba0| 67 20 69 6e 69 74 69 61 | 6c 20 66 69 6c 65 20 6e |g initia|l file n|
|00005bb0| 61 6d 65 5c 6e 22 29 3b | 0a 58 09 09 09 09 09 65 |ame\n");|.X.....e|
|00005bc0| 78 69 74 28 31 29 3b 0a | 58 09 09 09 09 7d 0a 58 |xit(1);.|X....}.X|
|00005bd0| 09 09 09 09 69 6e 69 74 | 66 69 6c 65 20 3d 20 2a |....init|file = *|
|00005be0| 61 72 67 76 2b 2b 3b 0a | 58 09 09 09 09 61 72 67 |argv++;.|X....arg|
|00005bf0| 63 2d 2d 3b 0a 58 09 09 | 09 09 62 72 65 61 6b 3b |c--;.X..|..break;|
|00005c00| 0a 58 0a 58 09 09 09 63 | 61 73 65 20 27 6f 27 3a |.X.X...c|ase 'o':|
|00005c10| 09 09 09 2f 2a 20 6f 75 | 74 70 75 74 20 66 69 6c |.../* ou|tput fil|
|00005c20| 65 20 2a 2f 0a 58 09 09 | 09 09 69 66 20 28 28 61 |e */.X..|..if ((a|
|00005c30| 72 67 63 20 3c 3d 20 30 | 29 20 7c 7c 20 28 2a 2a |rgc <= 0|) || (**|
|00005c40| 61 72 67 76 20 3d 3d 20 | 27 2d 27 29 29 20 7b 0a |argv == |'-')) {.|
|00005c50| 58 09 09 09 09 09 66 70 | 72 69 6e 74 66 28 73 74 |X.....fp|rintf(st|
|00005c60| 64 65 72 72 2c 20 22 4d | 69 73 73 69 6e 67 20 6f |derr, "M|issing o|
|00005c70| 75 74 70 75 74 20 66 69 | 6c 65 20 6e 61 6d 65 5c |utput fi|le name\|
|00005c80| 6e 22 29 3b 0a 58 09 09 | 09 09 09 65 78 69 74 28 |n");.X..|...exit(|
|00005c90| 31 29 3b 0a 58 09 09 09 | 09 7d 0a 58 09 09 09 09 |1);.X...|.}.X....|
|00005ca0| 6f 75 74 70 75 74 66 69 | 6c 65 20 3d 20 2a 61 72 |outputfi|le = *ar|
|00005cb0| 67 76 2b 2b 3b 0a 58 09 | 09 09 09 61 72 67 63 2d |gv++;.X.|...argc-|
|00005cc0| 2d 3b 0a 58 09 09 09 09 | 62 72 65 61 6b 3b 0a 58 |-;.X....|break;.X|
|00005cd0| 0a 58 09 09 09 63 61 73 | 65 20 27 6d 27 3a 09 09 |.X...cas|e 'm':..|
|00005ce0| 09 2f 2a 20 6d 61 78 20 | 63 65 6c 6c 20 63 6f 75 |./* max |cell cou|
|00005cf0| 6e 74 20 2a 2f 0a 58 09 | 09 09 09 6d 61 78 63 6f |nt */.X.|...maxco|
|00005d00| 75 6e 74 20 3d 20 61 74 | 6f 69 28 73 74 72 29 3b |unt = at|oi(str);|
|00005d10| 0a 58 09 09 09 09 62 72 | 65 61 6b 3b 0a 58 0a 58 |.X....br|eak;.X.X|
|00005d20| 09 09 09 63 61 73 65 20 | 27 70 27 3a 09 09 09 2f |...case |'p':.../|
|00005d30| 2a 20 66 69 6e 64 20 70 | 61 72 65 6e 74 73 20 6f |* find p|arents o|
|00005d40| 6e 6c 79 20 2a 2f 0a 58 | 09 09 09 09 70 61 72 65 |nly */.X|....pare|
|00005d50| 6e 74 20 3d 20 54 52 55 | 45 3b 0a 58 09 09 09 09 |nt = TRU|E;.X....|
|00005d60| 62 72 65 61 6b 3b 0a 58 | 0a 58 09 09 09 63 61 73 |break;.X|.X...cas|
|00005d70| 65 20 27 61 27 3a 0a 58 | 09 09 09 09 61 6c 6c 6f |e 'a':.X|....allo|
|00005d80| 62 6a 65 63 74 73 20 3d | 20 54 52 55 45 3b 09 2f |bjects =| TRUE;./|
|00005d90| 2a 20 66 69 6e 64 20 61 | 6c 6c 20 6f 62 6a 65 63 |* find a|ll objec|
|00005da0| 74 73 20 2a 2f 0a 58 09 | 09 09 09 62 72 65 61 6b |ts */.X.|...break|
|00005db0| 3b 0a 58 0a 58 09 09 09 | 63 61 73 65 20 27 44 27 |;.X.X...|case 'D'|
|00005dc0| 3a 09 09 09 2f 2a 20 64 | 65 62 75 67 67 69 6e 67 |:.../* d|ebugging|
|00005dd0| 20 6f 75 74 70 75 74 20 | 2a 2f 0a 58 09 09 09 09 | output |*/.X....|
|00005de0| 64 65 62 75 67 20 3d 20 | 54 52 55 45 3b 0a 58 09 |debug = |TRUE;.X.|
|00005df0| 09 09 09 62 72 65 61 6b | 3b 0a 58 0a 58 09 09 09 |...break|;.X.X...|
|00005e00| 64 65 66 61 75 6c 74 3a | 0a 58 09 09 09 09 66 70 |default:|.X....fp|
|00005e10| 72 69 6e 74 66 28 73 74 | 64 65 72 72 2c 20 22 55 |rintf(st|derr, "U|
|00005e20| 6e 6b 6e 6f 77 6e 20 6f | 70 74 69 6f 6e 20 2d 25 |nknown o|ption -%|
|00005e30| 63 5c 6e 22 2c 0a 58 09 | 09 09 09 09 73 74 72 5b |c\n",.X.|....str[|
|00005e40| 2d 31 5d 29 3b 0a 58 09 | 09 09 09 65 78 69 74 28 |-1]);.X.|...exit(|
|00005e50| 31 29 3b 0a 58 09 09 7d | 0a 58 09 7d 0a 58 0a 58 |1);.X..}|.X.}.X.X|
|00005e60| 09 69 66 20 28 70 61 72 | 65 6e 74 20 26 26 20 28 |.if (par|ent && (|
|00005e70| 72 6f 77 74 72 61 6e 73 | 20 7c 7c 20 63 6f 6c 74 |rowtrans| || colt|
|00005e80| 72 61 6e 73 29 29 20 7b | 0a 58 09 09 66 70 72 69 |rans)) {|.X..fpri|
|00005e90| 6e 74 66 28 73 74 64 65 | 72 72 2c 20 22 43 61 6e |ntf(stde|rr, "Can|
|00005ea0| 6e 6f 74 20 73 70 65 63 | 69 66 79 20 2d 74 72 20 |not spec|ify -tr |
|00005eb0| 6f 72 20 2d 74 63 20 77 | 69 74 68 20 2d 70 5c 6e |or -tc w|ith -p\n|
|00005ec0| 22 29 3b 0a 58 09 09 65 | 78 69 74 28 31 29 3b 0a |");.X..e|xit(1);.|
|00005ed0| 58 09 7d 0a 58 0a 58 09 | 69 66 20 28 74 74 79 6f |X.}.X.X.|if (ttyo|
|00005ee0| 70 65 6e 28 29 29 20 7b | 0a 58 09 09 66 70 72 69 |pen()) {|.X..fpri|
|00005ef0| 6e 74 66 28 73 74 64 65 | 72 72 2c 20 22 43 61 6e |ntf(stde|rr, "Can|
|00005f00| 6e 6f 74 20 69 6e 69 74 | 69 61 6c 69 7a 65 20 74 |not init|ialize t|
|00005f10| 65 72 6d 69 6e 61 6c 5c | 6e 22 29 3b 0a 58 09 09 |erminal\|n");.X..|
|00005f20| 65 78 69 74 28 31 29 3b | 0a 58 09 7d 0a 58 0a 58 |exit(1);|.X.}.X.X|
|00005f30| 09 2f 2a 0a 58 09 20 2a | 20 43 68 65 63 6b 20 66 |./*.X. *| Check f|
|00005f40| 6f 72 20 6c 6f 61 64 69 | 6e 67 20 73 74 61 74 65 |or loadi|ng state|
|00005f50| 20 66 72 6f 6d 20 66 69 | 6c 65 20 6f 72 20 72 65 | from fi|le or re|
|00005f60| 61 64 69 6e 67 20 69 6e | 69 74 69 61 6c 0a 58 09 |ading in|itial.X.|
|00005f70| 20 2a 20 6f 62 6a 65 63 | 74 20 66 72 6f 6d 20 66 | * objec|t from f|
|00005f80| 69 6c 65 2e 0a 58 09 20 | 2a 2f 0a 58 09 69 66 20 |ile..X. |*/.X.if |
|00005f90| 28 6c 6f 61 64 66 69 6c | 65 29 20 7b 0a 58 09 09 |(loadfil|e) {.X..|
|00005fa0| 69 66 20 28 6c 6f 61 64 | 73 74 61 74 65 28 6c 6f |if (load|state(lo|
|00005fb0| 61 64 66 69 6c 65 29 20 | 21 3d 20 4f 4b 29 20 7b |adfile) |!= OK) {|
|00005fc0| 0a 58 09 09 09 74 74 79 | 63 6c 6f 73 65 28 29 3b |.X...tty|close();|
|00005fd0| 0a 58 09 09 09 65 78 69 | 74 28 31 29 3b 0a 58 09 |.X...exi|t(1);.X.|
|00005fe0| 09 7d 0a 58 09 7d 20 65 | 6c 73 65 20 7b 0a 58 09 |.}.X.} e|lse {.X.|
|00005ff0| 09 69 6e 69 74 63 65 6c | 6c 73 28 29 3b 0a 58 09 |.initcel|ls();.X.|
|00006000| 09 69 66 20 28 69 6e 69 | 74 66 69 6c 65 29 20 7b |.if (ini|tfile) {|
|00006010| 0a 58 09 09 09 69 66 20 | 28 72 65 61 64 66 69 6c |.X...if |(readfil|
|00006020| 65 28 69 6e 69 74 66 69 | 6c 65 29 20 21 3d 20 4f |e(initfi|le) != O|
|00006030| 4b 29 20 7b 0a 58 09 09 | 09 09 74 74 79 63 6c 6f |K) {.X..|..ttyclo|
|00006040| 73 65 28 29 3b 0a 58 09 | 09 09 09 65 78 69 74 28 |se();.X.|...exit(|
|00006050| 31 29 3b 0a 58 09 09 09 | 7d 0a 58 09 09 09 62 61 |1);.X...|}.X...ba|
|00006060| 73 65 73 65 74 20 3d 20 | 6e 65 78 74 73 65 74 3b |seset = |nextset;|
|00006070| 0a 58 09 09 7d 0a 58 09 | 7d 0a 58 0a 58 09 2f 2a |.X..}.X.|}.X.X./*|
|00006080| 0a 58 09 20 2a 20 49 66 | 20 77 65 20 61 72 65 20 |.X. * If| we are |
|00006090| 6c 6f 6f 6b 69 6e 67 20 | 66 6f 72 20 70 61 72 65 |looking |for pare|
|000060a0| 6e 74 73 2c 20 74 68 65 | 6e 20 73 65 74 20 74 68 |nts, the|n set th|
|000060b0| 65 20 63 75 72 72 65 6e | 74 20 67 65 6e 65 72 61 |e curren|t genera|
|000060c0| 74 69 6f 6e 0a 58 09 20 | 2a 20 74 6f 20 74 68 65 |tion.X. |* to the|
|000060d0| 20 6c 61 73 74 20 6f 6e | 65 20 73 6f 20 74 68 61 | last on|e so tha|
|000060e0| 74 20 69 74 20 63 61 6e | 20 62 65 20 69 6e 70 75 |t it can| be inpu|
|000060f0| 74 20 65 61 73 69 6c 79 | 2e 20 20 54 68 65 6e 20 |t easily|. Then |
|00006100| 67 65 74 20 74 68 65 0a | 58 09 20 2a 20 63 6f 6d |get the.|X. * com|
|00006110| 6d 61 6e 64 73 20 74 6f | 20 69 6e 69 74 69 61 6c |mands to| initial|
|00006120| 69 7a 65 20 74 68 65 20 | 63 65 6c 6c 73 2c 20 75 |ize the |cells, u|
|00006130| 6e 6c 65 73 73 20 77 65 | 20 77 65 72 65 20 74 6f |nless we| were to|
|00006140| 6c 64 20 74 6f 20 6e 6f | 74 20 77 61 69 74 2e 0a |ld to no|t wait..|
|00006150| 58 09 20 2a 2f 0a 58 09 | 69 66 20 28 70 61 72 65 |X. */.X.|if (pare|
|00006160| 6e 74 29 0a 58 09 09 63 | 75 72 67 65 6e 20 3d 20 |nt).X..c|urgen = |
|00006170| 67 65 6e 6d 61 78 20 2d | 20 31 3b 0a 58 0a 58 09 |genmax -| 1;.X.X.|
|00006180| 69 66 20 28 6e 6f 77 61 | 69 74 29 0a 58 09 09 70 |if (nowa|it).X..p|
|00006190| 72 69 6e 74 67 65 6e 28 | 30 29 3b 0a 58 09 65 6c |rintgen(|0);.X.el|
|000061a0| 73 65 0a 58 09 09 67 65 | 74 63 6f 6d 6d 61 6e 64 |se.X..ge|tcommand|
|000061b0| 73 28 29 3b 0a 58 0a 58 | 09 2f 2a 0a 58 09 20 2a |s();.X.X|./*.X. *|
|000061c0| 20 49 6e 69 74 69 61 6c | 20 63 6f 6d 6d 61 6e 64 | Initial| command|
|000061d0| 73 20 61 72 65 20 63 6f | 6d 70 6c 65 74 2c 20 6e |s are co|mplet, n|
|000061e0| 6f 77 20 6c 6f 6f 6b 20 | 66 6f 72 20 74 68 65 20 |ow look |for the |
|000061f0| 6f 62 6a 65 63 74 2e 0a | 58 09 20 2a 2f 0a 58 09 |object..|X. */.X.|
|00006200| 77 68 69 6c 65 20 28 54 | 52 55 45 29 20 7b 0a 58 |while (T|RUE) {.X|
|00006210| 09 09 69 66 20 28 63 75 | 72 73 74 61 74 75 73 20 |..if (cu|rstatus |
|00006220| 3d 3d 20 4f 4b 29 0a 58 | 09 09 09 63 75 72 73 74 |== OK).X|...curst|
|00006230| 61 74 75 73 20 3d 20 73 | 65 61 72 63 68 28 29 3b |atus = s|earch();|
|00006240| 0a 58 0a 58 09 09 69 66 | 20 28 64 75 6d 70 66 72 |.X.X..if| (dumpfr|
|00006250| 65 71 29 20 7b 0a 58 09 | 09 09 64 75 6d 70 63 6f |eq) {.X.|..dumpco|
|00006260| 75 6e 74 20 3d 20 30 3b | 0a 58 09 09 09 64 75 6d |unt = 0;|.X...dum|
|00006270| 70 73 74 61 74 65 28 64 | 75 6d 70 66 69 6c 65 29 |pstate(d|umpfile)|
|00006280| 3b 0a 58 09 09 7d 0a 58 | 0a 58 09 09 69 66 20 28 |;.X..}.X|.X..if (|
|00006290| 28 63 75 72 73 74 61 74 | 75 73 20 3d 3d 20 46 4f |(curstat|us == FO|
|000062a0| 55 4e 44 29 20 26 26 20 | 21 61 6c 6c 6f 62 6a 65 |UND) && |!allobje|
|000062b0| 63 74 73 20 26 26 20 73 | 75 62 70 65 72 69 6f 64 |cts && s|ubperiod|
|000062c0| 73 28 29 29 20 7b 0a 58 | 09 09 09 63 75 72 73 74 |s()) {.X|...curst|
|000062d0| 61 74 75 73 20 3d 20 4f | 4b 3b 0a 58 09 09 09 63 |atus = O|K;.X...c|
|000062e0| 6f 6e 74 69 6e 75 65 3b | 0a 58 09 09 7d 0a 58 0a |ontinue;|.X..}.X.|
|000062f0| 58 09 09 63 75 72 67 65 | 6e 20 3d 20 30 3b 0a 58 |X..curge|n = 0;.X|
|00006300| 0a 58 09 09 69 66 20 28 | 6f 75 74 70 75 74 66 69 |.X..if (|outputfi|
|00006310| 6c 65 20 3d 3d 20 4e 55 | 4c 4c 29 20 7b 0a 58 09 |le == NU|LL) {.X.|
|00006320| 09 09 67 65 74 63 6f 6d | 6d 61 6e 64 73 28 29 3b |..getcom|mands();|
|00006330| 0a 58 09 09 09 63 6f 6e | 74 69 6e 75 65 3b 0a 58 |.X...con|tinue;.X|
|00006340| 09 09 7d 0a 58 0a 58 09 | 09 2f 2a 0a 58 09 09 20 |..}.X.X.|./*.X.. |
|00006350| 2a 20 48 65 72 65 20 69 | 66 20 72 65 73 75 6c 74 |* Here i|f result|
|00006360| 73 20 61 72 65 20 67 6f | 69 6e 67 20 74 6f 20 61 |s are go|ing to a|
|00006370| 20 66 69 6c 65 2e 0a 58 | 09 09 20 2a 2f 0a 58 09 | file..X|.. */.X.|
|00006380| 09 69 66 20 28 63 75 72 | 73 74 61 74 75 73 20 3d |.if (cur|status =|
|00006390| 3d 20 46 4f 55 4e 44 29 | 20 7b 0a 58 09 09 09 63 |= FOUND)| {.X...c|
|000063a0| 75 72 73 74 61 74 75 73 | 20 3d 20 4f 4b 3b 0a 58 |urstatus| = OK;.X|
|000063b0| 09 09 09 70 72 69 6e 74 | 67 65 6e 28 30 29 3b 0a |...print|gen(0);.|
|000063c0| 58 09 09 09 74 74 79 73 | 74 61 74 75 73 28 22 4f |X...ttys|tatus("O|
|000063d0| 62 6a 65 63 74 20 25 6c | 64 20 66 6f 75 6e 64 2e |bject %l|d found.|
|000063e0| 5c 6e 22 2c 20 2b 2b 66 | 6f 75 6e 64 63 6f 75 6e |\n", ++f|oundcoun|
|000063f0| 74 29 3b 0a 58 09 09 09 | 77 72 69 74 65 67 65 6e |t);.X...|writegen|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.