home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: SHell self-extracting ARchive
(archive/shar).
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%
| 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| 53 75 62 6a 65 63 74 3a | 20 20 76 30 38 69 30 32 |Subject:| v08i02|
|00000010| 31 3a 20 20 54 68 65 20 | 4a 4f 56 45 20 74 65 78 |1: The |JOVE tex|
|00000020| 74 20 65 64 69 74 6f 72 | 2c 20 50 61 72 74 30 32 |t editor|, Part02|
|00000030| 2f 31 33 0a 4e 65 77 73 | 67 72 6f 75 70 73 3a 20 |/13.News|groups: |
|00000040| 6d 6f 64 2e 73 6f 75 72 | 63 65 73 0a 41 70 70 72 |mod.sour|ces.Appr|
|00000050| 6f 76 65 64 3a 20 6d 69 | 72 72 6f 72 21 72 73 0a |oved: mi|rror!rs.|
|00000060| 0a 53 75 62 6d 69 74 74 | 65 64 20 62 79 3a 20 73 |.Submitt|ed by: s|
|00000070| 65 69 73 6d 6f 21 72 6f | 63 68 65 73 74 65 72 21 |eismo!ro|chester!|
|00000080| 6a 70 61 79 6e 65 20 28 | 4a 6f 6e 61 74 68 61 6e |jpayne (|Jonathan|
|00000090| 20 50 61 79 6e 65 29 0a | 4d 6f 64 2e 73 6f 75 72 | Payne).|Mod.sour|
|000000a0| 63 65 73 3a 20 56 6f 6c | 75 6d 65 20 38 2c 20 49 |ces: Vol|ume 8, I|
|000000b0| 73 73 75 65 20 32 31 0a | 41 72 63 68 69 76 65 2d |ssue 21.|Archive-|
|000000c0| 6e 61 6d 65 3a 20 6a 6f | 76 65 2f 50 61 72 74 30 |name: jo|ve/Part0|
|000000d0| 32 0a 0a 23 21 20 2f 62 | 69 6e 2f 73 68 0a 23 20 |2..#! /b|in/sh.# |
|000000e0| 54 68 69 73 20 69 73 20 | 61 20 73 68 65 6c 6c 20 |This is |a shell |
|000000f0| 61 72 63 68 69 76 65 2e | 20 20 52 65 6d 6f 76 65 |archive.| Remove|
|00000100| 20 61 6e 79 74 68 69 6e | 67 20 62 65 66 6f 72 65 | anythin|g before|
|00000110| 20 74 68 69 73 20 6c 69 | 6e 65 2c 0a 23 20 74 68 | this li|ne,.# th|
|00000120| 65 6e 20 75 6e 70 61 63 | 6b 20 69 74 20 62 79 20 |en unpac|k it by |
|00000130| 73 61 76 69 6e 67 20 69 | 74 20 69 6e 20 61 20 66 |saving i|t in a f|
|00000140| 69 6c 65 20 61 6e 64 20 | 74 79 70 69 6e 67 20 22 |ile and |typing "|
|00000150| 73 68 20 66 69 6c 65 22 | 2e 0a 23 20 49 66 20 61 |sh file"|..# If a|
|00000160| 6c 6c 20 67 6f 65 73 20 | 77 65 6c 6c 2c 20 79 6f |ll goes |well, yo|
|00000170| 75 20 77 69 6c 6c 20 73 | 65 65 20 74 68 65 20 6d |u will s|ee the m|
|00000180| 65 73 73 61 67 65 20 22 | 45 6e 64 20 6f 66 20 61 |essage "|End of a|
|00000190| 72 63 68 69 76 65 20 32 | 20 28 6f 66 20 31 33 29 |rchive 2| (of 13)|
|000001a0| 2e 22 0a 23 20 43 6f 6e | 74 65 6e 74 73 3a 20 20 |.".# Con|tents: |
|000001b0| 63 2e 63 20 63 74 79 70 | 65 2e 63 20 64 65 6c 65 |c.c ctyp|e.c dele|
|000001c0| 74 65 2e 63 20 64 69 73 | 70 2e 63 20 66 6d 74 2e |te.c dis|p.c fmt.|
|000001d0| 63 20 72 65 2e 68 20 72 | 65 63 2e 68 0a 23 20 20 |c re.h r|ec.h.# |
|000001e0| 20 64 6f 63 2f 63 6d 64 | 73 2e 64 6f 63 2e 6e 72 | doc/cmd|s.doc.nr|
|000001f0| 0a 50 41 54 48 3d 2f 62 | 69 6e 3a 2f 75 73 72 2f |.PATH=/b|in:/usr/|
|00000200| 62 69 6e 3a 2f 75 73 72 | 2f 75 63 62 3b 20 65 78 |bin:/usr|/ucb; ex|
|00000210| 70 6f 72 74 20 50 41 54 | 48 0a 65 63 68 6f 20 73 |port PAT|H.echo s|
|00000220| 68 61 72 3a 20 65 78 74 | 72 61 63 74 69 6e 67 20 |har: ext|racting |
|00000230| 22 27 63 2e 63 27 22 20 | 27 28 31 33 31 38 37 20 |"'c.c'" |'(13187 |
|00000240| 63 68 61 72 61 63 74 65 | 72 73 29 27 0a 69 66 20 |characte|rs)'.if |
|00000250| 74 65 73 74 20 2d 66 20 | 27 63 2e 63 27 20 3b 20 |test -f |'c.c' ; |
|00000260| 74 68 65 6e 20 0a 20 20 | 65 63 68 6f 20 73 68 61 |then . |echo sha|
|00000270| 72 3a 20 77 69 6c 6c 20 | 6e 6f 74 20 6f 76 65 72 |r: will |not over|
|00000280| 2d 77 72 69 74 65 20 65 | 78 69 73 74 69 6e 67 20 |-write e|xisting |
|00000290| 66 69 6c 65 20 22 27 63 | 2e 63 27 22 0a 65 6c 73 |file "'c|.c'".els|
|000002a0| 65 0a 73 65 64 20 27 73 | 2f 5e 58 2f 2f 27 20 3e |e.sed 's|/^X//' >|
|000002b0| 63 2e 63 20 3c 3c 27 40 | 2f 2f 45 2a 4f 2a 46 20 |c.c <<'@|//E*O*F |
|000002c0| 63 2e 63 2f 2f 27 0a 58 | 2f 2a 2a 2a 2a 2a 2a 2a |c.c//'.X|/*******|
|000002d0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000002e0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000002f0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000300| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000310| 2a 0a 58 20 2a 20 54 68 | 69 73 20 70 72 6f 67 72 |*.X * Th|is progr|
|00000320| 61 6d 20 69 73 20 43 6f | 70 79 72 69 67 68 74 20 |am is Co|pyright |
|00000330| 28 43 29 20 31 39 38 36 | 20 62 79 20 4a 6f 6e 61 |(C) 1986| by Jona|
|00000340| 74 68 61 6e 20 50 61 79 | 6e 65 2e 20 20 4a 4f 56 |than Pay|ne. JOV|
|00000350| 45 20 69 73 20 20 20 20 | 20 20 20 2a 0a 58 20 2a |E is | *.X *|
|00000360| 20 70 72 6f 76 69 64 65 | 64 20 74 6f 20 79 6f 75 | provide|d to you|
|00000370| 20 77 69 74 68 6f 75 74 | 20 63 68 61 72 67 65 2c | without| charge,|
|00000380| 20 61 6e 64 20 77 69 74 | 68 20 6e 6f 20 77 61 72 | and wit|h no war|
|00000390| 72 61 6e 74 79 2e 20 20 | 59 6f 75 20 6d 61 79 20 |ranty. |You may |
|000003a0| 67 69 76 65 20 20 2a 0a | 58 20 2a 20 61 77 61 79 |give *.|X * away|
|000003b0| 20 63 6f 70 69 65 73 20 | 6f 66 20 4a 4f 56 45 2c | copies |of JOVE,|
|000003c0| 20 69 6e 63 6c 75 64 69 | 6e 67 20 73 6f 75 72 63 | includi|ng sourc|
|000003d0| 65 73 2c 20 70 72 6f 76 | 69 64 65 64 20 74 68 61 |es, prov|ided tha|
|000003e0| 74 20 74 68 69 73 20 6e | 6f 74 69 63 65 20 69 73 |t this n|otice is|
|000003f0| 20 2a 0a 58 20 2a 20 69 | 6e 63 6c 75 64 65 64 20 | *.X * i|ncluded |
|00000400| 69 6e 20 61 6c 6c 20 74 | 68 65 20 66 69 6c 65 73 |in all t|he files|
|00000410| 2e 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00000420| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000430| 20 20 20 20 20 20 20 20 | 20 20 20 20 2a 0a 58 20 | | *.X |
|00000440| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000450| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000460| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000470| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000480| 2a 2a 2a 2a 2a 2a 2a 2a | 2f 0a 58 0a 58 2f 2a 20 |********|/.X.X/* |
|00000490| 43 6f 6e 74 61 69 6e 73 | 20 63 6f 6d 6d 61 6e 64 |Contains| command|
|000004a0| 73 20 66 6f 72 20 43 20 | 6d 6f 64 65 2e 20 20 50 |s for C |mode. P|
|000004b0| 61 72 65 6e 20 6d 61 74 | 63 68 69 6e 67 20 72 6f |aren mat|ching ro|
|000004c0| 75 74 69 6e 65 73 20 61 | 72 65 20 69 6e 20 68 65 |utines a|re in he|
|000004d0| 72 65 2e 20 2a 2f 0a 58 | 0a 58 23 69 6e 63 6c 75 |re. */.X|.X#inclu|
|000004e0| 64 65 20 22 6a 6f 76 65 | 2e 68 22 0a 58 23 69 6e |de "jove|.h".X#in|
|000004f0| 63 6c 75 64 65 20 22 72 | 65 2e 68 22 0a 58 23 69 |clude "r|e.h".X#i|
|00000500| 6e 63 6c 75 64 65 20 22 | 63 74 79 70 65 2e 68 22 |nclude "|ctype.h"|
|00000510| 0a 58 0a 58 70 72 69 76 | 61 74 65 0a 58 62 61 63 |.X.Xpriv|ate.Xbac|
|00000520| 6b 73 6c 61 73 68 65 64 | 28 6c 70 2c 20 63 70 6f |kslashed|(lp, cpo|
|00000530| 73 29 0a 58 72 65 67 69 | 73 74 65 72 20 63 68 61 |s).Xregi|ster cha|
|00000540| 72 09 2a 6c 70 3b 0a 58 | 72 65 67 69 73 74 65 72 |r.*lp;.X|register|
|00000550| 20 69 6e 74 09 63 70 6f | 73 3b 0a 58 7b 0a 58 09 | int.cpo|s;.X{.X.|
|00000560| 72 65 67 69 73 74 65 72 | 20 69 6e 74 09 63 6e 74 |register| int.cnt|
|00000570| 20 3d 20 30 3b 0a 58 0a | 58 09 77 68 69 6c 65 20 | = 0;.X.|X.while |
|00000580| 28 63 70 6f 73 20 3e 20 | 30 20 26 26 20 6c 70 5b |(cpos > |0 && lp[|
|00000590| 2d 2d 63 70 6f 73 5d 20 | 3d 3d 20 27 5c 5c 27 29 |--cpos] |== '\\')|
|000005a0| 0a 58 09 09 63 6e 74 2b | 2b 3b 0a 58 09 72 65 74 |.X..cnt+|+;.X.ret|
|000005b0| 75 72 6e 20 28 63 6e 74 | 20 25 20 32 29 3b 0a 58 |urn (cnt| % 2);.X|
|000005c0| 7d 0a 58 0a 58 70 72 69 | 76 61 74 65 20 63 68 61 |}.X.Xpri|vate cha|
|000005d0| 72 09 2a 70 5f 74 79 70 | 65 73 20 3d 20 22 28 29 |r.*p_typ|es = "()|
|000005e0| 7b 7d 5b 5d 22 3b 0a 58 | 70 72 69 76 61 74 65 20 |{}[]";.X|private |
|000005f0| 69 6e 74 09 6d 70 5f 6b | 69 6e 64 3b 0a 58 23 64 |int.mp_k|ind;.X#d|
|00000600| 65 66 69 6e 65 20 4d 50 | 5f 4f 4b 41 59 09 09 30 |efine MP|_OKAY..0|
|00000610| 0a 58 23 64 65 66 69 6e | 65 20 4d 50 5f 4d 49 53 |.X#defin|e MP_MIS|
|00000620| 4d 41 54 43 48 09 31 0a | 58 23 64 65 66 69 6e 65 |MATCH.1.|X#define|
|00000630| 20 4d 50 5f 55 4e 42 41 | 4c 41 4e 43 45 44 09 32 | MP_UNBA|LANCED.2|
|00000640| 0a 58 0a 58 6d 70 5f 65 | 72 72 6f 72 28 29 0a 58 |.X.Xmp_e|rror().X|
|00000650| 7b 0a 58 09 73 77 69 74 | 63 68 20 28 6d 70 5f 6b |{.X.swit|ch (mp_k|
|00000660| 69 6e 64 29 20 7b 0a 58 | 09 63 61 73 65 20 4d 50 |ind) {.X|.case MP|
|00000670| 5f 4d 49 53 4d 41 54 43 | 48 3a 0a 58 09 09 6d 65 |_MISMATC|H:.X..me|
|00000680| 73 73 61 67 65 28 22 5b | 4d 69 73 6d 61 74 63 68 |ssage("[|Mismatch|
|00000690| 65 64 20 70 61 72 65 6e | 74 68 65 73 65 73 5d 22 |ed paren|theses]"|
|000006a0| 29 3b 0a 58 09 09 62 72 | 65 61 6b 3b 0a 58 0a 58 |);.X..br|eak;.X.X|
|000006b0| 09 63 61 73 65 20 4d 50 | 5f 55 4e 42 41 4c 41 4e |.case MP|_UNBALAN|
|000006c0| 43 45 44 3a 0a 58 09 09 | 6d 65 73 73 61 67 65 28 |CED:.X..|message(|
|000006d0| 22 5b 55 6e 62 61 6c 61 | 6e 63 65 64 20 70 61 72 |"[Unbala|nced par|
|000006e0| 65 6e 74 68 65 73 69 73 | 5d 22 29 3b 0a 58 09 09 |enthesis|]");.X..|
|000006f0| 62 72 65 61 6b 3b 0a 58 | 0a 58 09 63 61 73 65 20 |break;.X|.X.case |
|00000700| 4d 50 5f 4f 4b 41 59 3a | 0a 58 09 64 65 66 61 75 |MP_OKAY:|.X.defau|
|00000710| 6c 74 3a 0a 58 09 09 72 | 65 74 75 72 6e 3b 0a 58 |lt:.X..r|eturn;.X|
|00000720| 09 7d 0a 58 09 72 62 65 | 6c 6c 28 29 3b 0a 58 7d |.}.X.rbe|ll();.X}|
|00000730| 0a 58 0a 58 2f 2a 20 53 | 65 61 72 63 68 20 66 72 |.X.X/* S|earch fr|
|00000740| 6f 6d 20 74 68 65 20 63 | 75 72 72 65 6e 74 20 70 |om the c|urrent p|
|00000750| 6f 73 69 74 69 6f 6e 20 | 66 6f 72 20 74 68 65 20 |osition |for the |
|00000760| 70 61 72 65 6e 20 74 68 | 61 74 20 6d 61 74 63 68 |paren th|at match|
|00000770| 65 73 20 70 5f 74 79 70 | 65 2e 0a 58 20 20 20 53 |es p_typ|e..X S|
|00000780| 65 61 72 63 68 20 69 6e | 20 74 68 65 20 64 69 72 |earch in| the dir|
|00000790| 65 63 74 69 6f 6e 20 64 | 69 72 2e 20 20 49 66 20 |ection d|ir. If |
|000007a0| 63 61 6e 5f 6d 69 73 6d | 61 74 63 68 20 69 73 20 |can_mism|atch is |
|000007b0| 59 45 53 20 74 68 65 6e | 20 69 74 20 69 73 20 6f |YES then| it is o|
|000007c0| 6b 61 79 0a 58 20 20 20 | 74 6f 20 68 61 76 65 20 |kay.X |to have |
|000007d0| 6d 69 73 6d 61 74 63 68 | 65 64 20 70 61 72 65 6e |mismatch|ed paren|
|000007e0| 73 2e 20 20 49 66 20 73 | 74 6f 70 5f 65 61 72 6c |s. If s|top_earl|
|000007f0| 79 20 69 73 20 59 45 53 | 20 74 68 65 6e 20 77 68 |y is YES| then wh|
|00000800| 65 6e 20 61 6e 20 6f 70 | 65 6e 0a 58 20 20 20 70 |en an op|en.X p|
|00000810| 61 72 65 6e 20 69 73 20 | 66 6f 75 6e 64 20 61 74 |aren is |found at|
|00000820| 20 74 68 65 20 62 65 67 | 69 6e 6e 69 6e 67 20 6f | the beg|inning o|
|00000830| 66 20 61 20 6c 69 6e 65 | 2c 20 69 74 20 69 73 20 |f a line|, it is |
|00000840| 61 73 73 75 6d 65 64 20 | 74 68 61 74 20 74 68 65 |assumed |that the|
|00000850| 72 65 0a 58 20 20 20 69 | 73 20 6e 6f 20 70 6f 69 |re.X i|s no poi|
|00000860| 6e 74 20 69 6e 20 62 61 | 63 6b 69 6e 67 20 75 70 |nt in ba|cking up|
|00000870| 20 66 75 72 74 68 65 72 | 2e 20 20 54 68 69 73 20 | further|. This |
|00000880| 69 73 20 73 6f 20 77 68 | 65 6e 20 79 6f 75 20 68 |is so wh|en you h|
|00000890| 69 74 20 74 61 62 20 6f | 72 0a 58 20 20 20 4c 69 |it tab o|r.X Li|
|000008a0| 6e 65 46 65 65 64 20 6f | 75 74 73 69 64 65 2c 20 |neFeed o|utside, |
|000008b0| 69 6e 2d 62 65 74 77 65 | 65 6e 20 70 72 6f 63 65 |in-betwe|en proce|
|000008c0| 64 75 72 65 2f 66 75 6e | 63 74 69 6f 6e 20 64 65 |dure/fun|ction de|
|000008d0| 66 69 6e 69 74 69 6f 6e | 73 2c 20 69 74 20 77 6f |finition|s, it wo|
|000008e0| 6e 27 74 0a 58 20 20 20 | 73 69 74 20 74 68 65 72 |n't.X |sit ther|
|000008f0| 65 20 73 65 61 72 63 68 | 69 6e 67 20 61 6c 6c 20 |e search|ing all |
|00000900| 74 68 65 20 77 61 79 20 | 74 6f 20 74 68 65 20 62 |the way |to the b|
|00000910| 65 67 69 6e 6e 69 6e 67 | 20 6f 66 20 74 68 65 20 |eginning| of the |
|00000920| 66 69 6c 65 20 66 6f 72 | 20 61 0a 58 20 20 20 6d |file for| a.X m|
|00000930| 61 74 63 68 20 74 68 61 | 74 20 64 6f 65 73 6e 27 |atch tha|t doesn'|
|00000940| 74 20 65 78 69 73 74 2e | 20 20 7b 66 6f 72 77 61 |t exist.| {forwa|
|00000950| 72 64 2c 62 61 63 6b 77 | 61 72 64 7d 2d 73 2d 65 |rd,backw|ard}-s-e|
|00000960| 78 70 72 65 73 73 69 6f | 6e 20 61 72 65 20 74 68 |xpressio|n are th|
|00000970| 65 0a 58 20 20 20 6f 6e | 6c 79 20 6f 6e 65 73 20 |e.X on|ly ones |
|00000980| 74 68 61 74 20 69 6e 73 | 69 73 74 20 6f 6e 20 67 |that ins|ist on g|
|00000990| 65 74 74 69 6e 67 20 74 | 68 65 20 22 74 72 75 65 |etting t|he "true|
|000009a0| 22 20 73 74 6f 72 79 2e | 20 2a 2f 0a 58 0a 58 42 |" story.| */.X.XB|
|000009b0| 75 66 70 6f 73 20 2a 0a | 58 6d 5f 70 61 72 65 6e |ufpos *.|Xm_paren|
|000009c0| 28 70 5f 74 79 70 65 2c | 20 64 69 72 2c 20 63 61 |(p_type,| dir, ca|
|000009d0| 6e 5f 6d 69 73 6d 61 74 | 63 68 2c 20 63 61 6e 5f |n_mismat|ch, can_|
|000009e0| 73 74 6f 70 29 0a 58 63 | 68 61 72 09 70 5f 74 79 |stop).Xc|har.p_ty|
|000009f0| 70 65 3b 0a 58 72 65 67 | 69 73 74 65 72 20 69 6e |pe;.Xreg|ister in|
|00000a00| 74 09 64 69 72 3b 0a 58 | 7b 0a 58 09 73 74 61 74 |t.dir;.X|{.X.stat|
|00000a10| 69 63 20 42 75 66 70 6f | 73 09 72 65 74 3b 0a 58 |ic Bufpo|s.ret;.X|
|00000a20| 09 42 75 66 70 6f 73 09 | 73 61 76 65 64 6f 74 2c |.Bufpos.|savedot,|
|00000a30| 0a 58 09 09 2a 73 70 3b | 0a 58 09 63 68 61 72 09 |.X..*sp;|.X.char.|
|00000a40| 72 65 5f 62 75 66 5b 31 | 30 30 5d 2c 0a 58 09 09 |re_buf[1|00],.X..|
|00000a50| 2a 72 65 5f 61 6c 74 73 | 5b 4e 41 4c 54 53 5d 3b |*re_alts|[NALTS];|
|00000a60| 0a 58 09 69 6e 74 09 63 | 6f 75 6e 74 20 3d 20 30 |.X.int.c|ount = 0|
|00000a70| 3b 0a 58 09 72 65 67 69 | 73 74 65 72 20 63 68 61 |;.X.regi|ster cha|
|00000a80| 72 09 2a 6c 70 2c 0a 58 | 09 09 09 63 3b 0a 58 09 |r.*lp,.X|...c;.X.|
|00000a90| 63 68 61 72 09 70 5f 6d | 61 74 63 68 2c 0a 58 09 |char.p_m|atch,.X.|
|00000aa0| 09 72 65 5f 73 74 72 5b | 31 32 38 5d 2c 0a 58 09 |.re_str[|128],.X.|
|00000ab0| 09 2a 63 70 2c 0a 58 09 | 09 71 75 6f 74 65 5f 63 |.*cp,.X.|.quote_c|
|00000ac0| 20 3d 20 30 3b 0a 58 09 | 72 65 67 69 73 74 65 72 | = 0;.X.|register|
|00000ad0| 20 69 6e 74 09 63 5f 63 | 68 61 72 3b 0a 58 09 69 | int.c_c|har;.X.i|
|00000ae0| 6e 74 09 69 6e 5f 63 6f | 6d 6d 65 6e 74 20 3d 20 |nt.in_co|mment = |
|00000af0| 4e 4f 2c 0a 58 09 09 73 | 74 6f 70 70 65 64 20 3d |NO,.X..s|topped =|
|00000b00| 20 4e 4f 3b 0a 58 0a 58 | 09 73 70 72 69 6e 74 66 | NO;.X.X|.sprintf|
|00000b10| 28 72 65 5f 73 74 72 2c | 20 22 5b 28 29 7b 7d 5b |(re_str,| "[(){}[|
|00000b20| 5c 5c 5d 25 73 5d 22 2c | 20 28 4d 61 6a 6f 72 4d |\\]%s]",| (MajorM|
|00000b30| 6f 64 65 28 43 4d 4f 44 | 45 29 29 20 3f 20 22 2f |ode(CMOD|E)) ? "/|
|00000b40| 5c 22 27 22 20 3a 20 22 | 5c 22 22 29 3b 0a 58 09 |\"'" : "|\"");.X.|
|00000b50| 52 45 63 6f 6d 70 69 6c | 65 28 72 65 5f 73 74 72 |REcompil|e(re_str|
|00000b60| 2c 20 31 2c 20 72 65 5f | 62 75 66 2c 20 72 65 5f |, 1, re_|buf, re_|
|00000b70| 61 6c 74 73 29 3b 0a 58 | 09 69 66 20 28 63 70 20 |alts);.X|.if (cp |
|00000b80| 3d 20 69 6e 64 65 78 28 | 70 5f 74 79 70 65 73 2c |= index(|p_types,|
|00000b90| 20 70 5f 74 79 70 65 29 | 29 0a 58 09 09 70 5f 6d | p_type)|).X..p_m|
|00000ba0| 61 74 63 68 20 3d 20 63 | 70 5b 64 69 72 5d 3b 0a |atch = c|p[dir];.|
|00000bb0| 58 09 65 6c 73 65 0a 58 | 09 09 63 6f 6d 70 6c 61 |X.else.X|..compla|
|00000bc0| 69 6e 28 22 5b 43 61 6e | 6e 6f 74 20 6d 61 74 63 |in("[Can|not matc|
|00000bd0| 68 20 25 63 27 73 5d 22 | 2c 20 70 5f 74 79 70 65 |h %c's]"|, p_type|
|00000be0| 29 3b 0a 58 09 44 4f 54 | 73 61 76 65 28 26 73 61 |);.X.DOT|save(&sa|
|00000bf0| 76 65 64 6f 74 29 3b 0a | 58 0a 58 09 2f 2a 20 54 |vedot);.|X.X./* T|
|00000c00| 6f 20 6d 61 6b 65 20 74 | 68 69 6e 67 73 20 61 20 |o make t|hings a |
|00000c10| 6c 69 74 74 6c 65 20 66 | 61 73 74 65 72 20 49 20 |little f|aster I |
|00000c20| 61 76 6f 69 64 20 63 6f | 70 79 69 6e 67 20 6c 69 |avoid co|pying li|
|00000c30| 6e 65 73 20 69 6e 74 6f | 0a 58 09 20 20 20 6c 69 |nes into|.X. li|
|00000c40| 6e 65 62 75 66 20 62 79 | 20 73 65 74 74 69 6e 67 |nebuf by| setting|
|00000c50| 20 63 75 72 6c 69 6e 65 | 20 61 6e 64 20 63 75 72 | curline| and cur|
|00000c60| 63 68 61 72 20 62 79 20 | 68 61 6e 64 2e 20 20 57 |char by |hand. W|
|00000c70| 61 72 6e 69 6e 67 3a 0a | 58 09 20 20 20 74 68 69 |arning:.|X. thi|
|00000c80| 73 20 69 73 20 73 6c 69 | 67 68 74 6c 79 20 74 6f |s is sli|ghtly to|
|00000c90| 20 76 65 72 79 20 72 69 | 73 6b 79 2e 20 20 57 68 | very ri|sky. Wh|
|00000ca0| 65 6e 20 49 20 64 69 64 | 20 74 68 69 73 20 74 68 |en I did| this th|
|00000cb0| 65 72 65 20 77 65 72 65 | 0a 58 09 20 20 20 6c 6f |ere were|.X. lo|
|00000cc0| 74 73 20 6f 66 20 70 72 | 6f 62 6c 65 6d 73 20 77 |ts of pr|oblems w|
|00000cd0| 69 74 68 20 70 72 6f 63 | 65 64 75 72 65 73 20 74 |ith proc|edures t|
|00000ce0| 68 61 74 20 65 78 70 65 | 63 74 20 74 68 65 20 63 |hat expe|ct the c|
|00000cf0| 6f 6e 74 65 6e 74 73 20 | 6f 66 0a 58 09 20 20 20 |ontents |of.X. |
|00000d00| 63 75 72 6c 69 6e 65 20 | 74 6f 20 62 65 20 69 6e |curline |to be in|
|00000d10| 20 6c 69 6e 65 62 75 66 | 2e 20 2a 2f 0a 58 09 77 | linebuf|. */.X.w|
|00000d20| 68 69 6c 65 20 28 63 6f | 75 6e 74 20 3e 3d 20 30 |hile (co|unt >= 0|
|00000d30| 29 20 7b 0a 58 09 09 73 | 70 20 3d 20 64 6f 63 6f |) {.X..s|p = doco|
|00000d40| 6d 70 69 6c 65 64 28 64 | 69 72 2c 20 72 65 5f 62 |mpiled(d|ir, re_b|
|00000d50| 75 66 2c 20 72 65 5f 61 | 6c 74 73 29 3b 0a 58 09 |uf, re_a|lts);.X.|
|00000d60| 09 69 66 20 28 73 70 20 | 3d 3d 20 30 29 0a 58 09 |.if (sp |== 0).X.|
|00000d70| 09 09 62 72 65 61 6b 3b | 0a 58 09 09 6c 70 20 3d |..break;|.X..lp =|
|00000d80| 20 6c 62 70 74 72 28 73 | 70 2d 3e 70 5f 6c 69 6e | lbptr(s|p->p_lin|
|00000d90| 65 29 3b 0a 58 0a 58 09 | 09 63 75 72 6c 69 6e 65 |e);.X.X.|.curline|
|00000da0| 20 3d 20 73 70 2d 3e 70 | 5f 6c 69 6e 65 3b 0a 58 | = sp->p|_line;.X|
|00000db0| 09 09 63 75 72 63 68 61 | 72 20 3d 20 73 70 2d 3e |..curcha|r = sp->|
|00000dc0| 70 5f 63 68 61 72 3b 09 | 2f 2a 20 68 65 72 65 27 |p_char;.|/* here'|
|00000dd0| 73 20 77 68 65 72 65 20 | 49 20 63 68 65 61 74 20 |s where |I cheat |
|00000de0| 2a 2f 0a 58 09 09 63 5f | 63 68 61 72 20 3d 20 63 |*/.X..c_|char = c|
|00000df0| 75 72 63 68 61 72 3b 0a | 58 09 09 69 66 20 28 64 |urchar;.|X..if (d|
|00000e00| 69 72 20 3d 3d 20 46 4f | 52 57 41 52 44 29 0a 58 |ir == FO|RWARD).X|
|00000e10| 09 09 09 63 5f 63 68 61 | 72 2d 2d 3b 0a 58 0a 58 |...c_cha|r--;.X.X|
|00000e20| 09 09 69 66 20 28 62 61 | 63 6b 73 6c 61 73 68 65 |..if (ba|ckslashe|
|00000e30| 64 28 6c 70 2c 20 63 5f | 63 68 61 72 29 29 0a 58 |d(lp, c_|char)).X|
|00000e40| 09 09 09 63 6f 6e 74 69 | 6e 75 65 3b 0a 58 09 09 |...conti|nue;.X..|
|00000e50| 63 20 3d 20 6c 70 5b 63 | 5f 63 68 61 72 5d 3b 0a |c = lp[c|_char];.|
|00000e60| 58 09 09 2f 2a 20 63 68 | 65 63 6b 20 69 66 20 74 |X../* ch|eck if t|
|00000e70| 68 69 73 20 69 73 20 61 | 20 63 6f 6d 6d 65 6e 74 |his is a| comment|
|00000e80| 20 28 69 66 20 77 65 27 | 72 65 20 6e 6f 74 20 69 | (if we'|re not i|
|00000e90| 6e 73 69 64 65 20 71 75 | 6f 74 65 73 29 20 2a 2f |nside qu|otes) */|
|00000ea0| 0a 58 09 09 69 66 20 28 | 71 75 6f 74 65 5f 63 20 |.X..if (|quote_c |
|00000eb0| 3d 3d 20 30 20 26 26 20 | 63 20 3d 3d 20 27 2f 27 |== 0 && |c == '/'|
|00000ec0| 29 20 7b 0a 58 09 09 09 | 69 66 20 28 28 63 5f 63 |) {.X...|if ((c_c|
|00000ed0| 68 61 72 20 21 3d 20 30 | 29 20 26 26 20 6c 70 5b |har != 0|) && lp[|
|00000ee0| 63 5f 63 68 61 72 20 2d | 20 31 5d 20 3d 3d 20 27 |c_char -| 1] == '|
|00000ef0| 2a 27 29 0a 58 09 09 09 | 09 69 6e 5f 63 6f 6d 6d |*').X...|.in_comm|
|00000f00| 65 6e 74 20 3d 20 28 64 | 69 72 20 3d 3d 20 46 4f |ent = (d|ir == FO|
|00000f10| 52 57 41 52 44 29 20 3f | 20 4e 4f 20 3a 20 59 45 |RWARD) ?| NO : YE|
|00000f20| 53 3b 0a 58 09 09 09 65 | 6c 73 65 20 69 66 20 28 |S;.X...e|lse if (|
|00000f30| 6c 70 5b 63 5f 63 68 61 | 72 20 2b 20 31 5d 20 3d |lp[c_cha|r + 1] =|
|00000f40| 3d 20 27 2a 27 29 0a 58 | 09 09 09 09 69 6e 5f 63 |= '*').X|....in_c|
|00000f50| 6f 6d 6d 65 6e 74 20 3d | 20 28 64 69 72 20 3d 3d |omment =| (dir ==|
|00000f60| 20 46 4f 52 57 41 52 44 | 29 20 3f 20 59 45 53 20 | FORWARD|) ? YES |
|00000f70| 3a 20 4e 4f 3b 0a 58 09 | 09 7d 0a 58 09 09 69 66 |: NO;.X.|.}.X..if|
|00000f80| 20 28 69 6e 5f 63 6f 6d | 6d 65 6e 74 29 0a 58 09 | (in_com|ment).X.|
|00000f90| 09 09 63 6f 6e 74 69 6e | 75 65 3b 0a 58 09 09 69 |..contin|ue;.X..i|
|00000fa0| 66 20 28 63 20 3d 3d 20 | 27 22 27 20 7c 7c 20 63 |f (c == |'"' || c|
|00000fb0| 20 3d 3d 20 27 5c 27 27 | 29 20 7b 0a 58 09 09 09 | == '\''|) {.X...|
|00000fc0| 69 66 20 28 71 75 6f 74 | 65 5f 63 20 3d 3d 20 63 |if (quot|e_c == c|
|00000fd0| 29 0a 58 09 09 09 09 71 | 75 6f 74 65 5f 63 20 3d |).X....q|uote_c =|
|00000fe0| 20 30 3b 0a 58 09 09 09 | 65 6c 73 65 20 69 66 20 | 0;.X...|else if |
|00000ff0| 28 71 75 6f 74 65 5f 63 | 20 3d 3d 20 30 29 0a 58 |(quote_c| == 0).X|
|00001000| 09 09 09 09 71 75 6f 74 | 65 5f 63 20 3d 20 63 3b |....quot|e_c = c;|
|00001010| 0a 58 09 09 7d 0a 58 09 | 09 69 66 20 28 71 75 6f |.X..}.X.|.if (quo|
|00001020| 74 65 5f 63 20 21 3d 20 | 30 29 0a 58 09 09 09 63 |te_c != |0).X...c|
|00001030| 6f 6e 74 69 6e 75 65 3b | 0a 58 09 09 69 66 20 28 |ontinue;|.X..if (|
|00001040| 69 73 6f 70 65 6e 70 28 | 63 29 29 20 7b 0a 58 09 |isopenp(|c)) {.X.|
|00001050| 09 09 63 6f 75 6e 74 20 | 2b 3d 20 64 69 72 3b 0a |..count |+= dir;.|
|00001060| 58 09 09 09 69 66 20 28 | 63 5f 63 68 61 72 20 3d |X...if (|c_char =|
|00001070| 3d 20 30 20 26 26 20 63 | 61 6e 5f 73 74 6f 70 20 |= 0 && c|an_stop |
|00001080| 3d 3d 20 59 45 53 20 26 | 26 20 63 6f 75 6e 74 20 |== YES &|& count |
|00001090| 3e 3d 20 30 29 20 7b 0a | 58 09 09 09 09 73 74 6f |>= 0) {.|X....sto|
|000010a0| 70 70 65 64 20 3d 20 59 | 45 53 3b 0a 58 09 09 09 |pped = Y|ES;.X...|
|000010b0| 09 62 72 65 61 6b 3b 0a | 58 09 09 09 7d 0a 58 09 |.break;.|X...}.X.|
|000010c0| 09 7d 20 65 6c 73 65 20 | 69 66 20 28 69 73 63 6c |.} else |if (iscl|
|000010d0| 6f 73 65 70 28 63 29 29 | 0a 58 09 09 09 63 6f 75 |osep(c))|.X...cou|
|000010e0| 6e 74 20 2d 3d 20 64 69 | 72 3b 0a 58 09 7d 0a 58 |nt -= di|r;.X.}.X|
|000010f0| 0a 58 09 72 65 74 2e 70 | 5f 6c 69 6e 65 20 3d 20 |.X.ret.p|_line = |
|00001100| 63 75 72 6c 69 6e 65 3b | 0a 58 09 72 65 74 2e 70 |curline;|.X.ret.p|
|00001110| 5f 63 68 61 72 20 3d 20 | 63 75 72 63 68 61 72 3b |_char = |curchar;|
|00001120| 0a 58 0a 58 09 63 75 72 | 6c 69 6e 65 20 3d 20 73 |.X.X.cur|line = s|
|00001130| 61 76 65 64 6f 74 2e 70 | 5f 6c 69 6e 65 3b 0a 58 |avedot.p|_line;.X|
|00001140| 09 63 75 72 63 68 61 72 | 20 3d 20 73 61 76 65 64 |.curchar| = saved|
|00001150| 6f 74 2e 70 5f 63 68 61 | 72 3b 09 2f 2a 20 68 65 |ot.p_cha|r;./* he|
|00001160| 72 65 27 73 20 77 68 65 | 72 65 20 49 20 75 6e 64 |re's whe|re I und|
|00001170| 6f 20 69 74 20 2a 2f 0a | 58 0a 58 09 69 66 20 28 |o it */.|X.X.if (|
|00001180| 63 6f 75 6e 74 20 3e 3d | 20 30 29 0a 58 09 09 6d |count >=| 0).X..m|
|00001190| 70 5f 6b 69 6e 64 20 3d | 20 4d 50 5f 55 4e 42 41 |p_kind =| MP_UNBA|
|000011a0| 4c 41 4e 43 45 44 3b 0a | 58 09 65 6c 73 65 20 69 |LANCED;.|X.else i|
|000011b0| 66 20 28 63 20 21 3d 20 | 70 5f 6d 61 74 63 68 29 |f (c != |p_match)|
|000011c0| 0a 58 09 09 6d 70 5f 6b | 69 6e 64 20 3d 20 4d 50 |.X..mp_k|ind = MP|
|000011d0| 5f 4d 49 53 4d 41 54 43 | 48 3b 0a 58 09 65 6c 73 |_MISMATC|H;.X.els|
|000011e0| 65 0a 58 09 09 6d 70 5f | 6b 69 6e 64 20 3d 20 4d |e.X..mp_|kind = M|
|000011f0| 50 5f 4f 4b 41 59 3b 0a | 58 0a 58 09 2f 2a 20 49 |P_OKAY;.|X.X./* I|
|00001200| 66 20 77 65 20 73 74 6f | 70 70 65 64 20 28 77 68 |f we sto|pped (wh|
|00001210| 69 63 68 20 6d 65 61 6e | 73 20 77 65 20 77 65 72 |ich mean|s we wer|
|00001220| 65 20 61 6c 6c 6f 77 65 | 64 20 74 6f 20 73 74 6f |e allowe|d to sto|
|00001230| 70 29 20 61 6e 64 20 74 | 68 65 72 65 0a 58 09 20 |p) and t|here.X. |
|00001240| 20 20 77 61 73 20 61 6e | 20 65 72 72 6f 72 2c 20 | was an| error, |
|00001250| 77 65 20 63 6c 65 61 72 | 20 74 68 65 20 65 72 72 |we clear| the err|
|00001260| 6f 72 20 73 6f 20 6e 6f | 20 65 72 72 6f 72 20 6d |or so no| error m|
|00001270| 65 73 73 61 67 65 20 69 | 73 20 70 72 69 6e 74 65 |essage i|s printe|
|00001280| 64 2e 0a 58 09 20 20 20 | 41 6e 20 65 72 72 6f 72 |d..X. |An error|
|00001290| 20 73 68 6f 75 6c 64 20 | 62 65 20 70 72 69 6e 74 | should |be print|
|000012a0| 65 64 20 4f 4e 4c 59 20 | 77 68 65 6e 20 77 65 20 |ed ONLY |when we |
|000012b0| 61 72 65 20 73 75 72 65 | 20 61 62 6f 75 74 20 74 |are sure| about t|
|000012c0| 68 65 20 66 61 63 74 2c | 0a 58 09 20 20 20 6e 61 |he fact,|.X. na|
|000012d0| 6d 65 6c 79 20 77 65 20 | 64 69 64 6e 27 74 20 73 |mely we |didn't s|
|000012e0| 74 6f 70 20 70 72 65 6d | 61 74 75 72 65 6c 79 20 |top prem|aturely |
|000012f0| 48 4f 50 49 4e 47 20 74 | 68 61 74 20 69 74 20 77 |HOPING t|hat it w|
|00001300| 61 73 20 74 68 65 20 72 | 69 67 68 74 0a 58 09 20 |as the r|ight.X. |
|00001310| 20 20 61 6e 73 77 65 72 | 2e 20 2a 2f 0a 58 09 69 | answer|. */.X.i|
|00001320| 66 20 28 73 74 6f 70 70 | 65 64 20 26 26 20 6d 70 |f (stopp|ed && mp|
|00001330| 5f 6b 69 6e 64 20 21 3d | 20 4d 50 5f 4f 4b 41 59 |_kind !=| MP_OKAY|
|00001340| 29 20 7b 0a 58 09 09 6d | 70 5f 6b 69 6e 64 20 3d |) {.X..m|p_kind =|
|00001350| 20 4d 50 5f 4f 4b 41 59 | 3b 0a 58 09 09 72 65 74 | MP_OKAY|;.X..ret|
|00001360| 75 72 6e 20 30 3b 0a 58 | 09 7d 0a 58 09 69 66 20 |urn 0;.X|.}.X.if |
|00001370| 28 6d 70 5f 6b 69 6e 64 | 20 3d 3d 20 4d 50 5f 4f |(mp_kind| == MP_O|
|00001380| 4b 41 59 20 7c 7c 20 28 | 6d 70 5f 6b 69 6e 64 20 |KAY || (|mp_kind |
|00001390| 3d 3d 20 4d 50 5f 4d 49 | 53 4d 41 54 43 48 20 26 |== MP_MI|SMATCH &|
|000013a0| 26 20 63 61 6e 5f 6d 69 | 73 6d 61 74 63 68 20 3d |& can_mi|smatch =|
|000013b0| 3d 20 59 45 53 29 29 0a | 58 09 09 72 65 74 75 72 |= YES)).|X..retur|
|000013c0| 6e 20 26 72 65 74 3b 0a | 58 09 72 65 74 75 72 6e |n &ret;.|X.return|
|000013d0| 20 30 3b 0a 58 7d 0a 58 | 0a 58 70 72 69 76 61 74 | 0;.X}.X|.Xprivat|
|000013e0| 65 0a 58 64 6f 5f 65 78 | 70 72 28 64 69 72 2c 20 |e.Xdo_ex|pr(dir, |
|000013f0| 73 6b 69 70 5f 77 6f 72 | 64 73 29 0a 58 72 65 67 |skip_wor|ds).Xreg|
|00001400| 69 73 74 65 72 20 69 6e | 74 09 64 69 72 3b 0a 58 |ister in|t.dir;.X|
|00001410| 7b 0a 58 09 72 65 67 69 | 73 74 65 72 20 63 68 61 |{.X.regi|ster cha|
|00001420| 72 09 63 2c 0a 58 09 09 | 09 73 79 6e 74 61 78 20 |r.c,.X..|.syntax |
|00001430| 3d 20 28 64 69 72 20 3d | 3d 20 46 4f 52 57 41 52 |= (dir =|= FORWAR|
|00001440| 44 29 20 3f 20 5f 4f 70 | 20 3a 20 5f 43 6c 3b 0a |D) ? _Op| : _Cl;.|
|00001450| 58 0a 58 09 65 78 70 20 | 3d 20 31 3b 0a 58 09 69 |X.X.exp |= 1;.X.i|
|00001460| 66 20 28 64 69 72 20 3d | 3d 20 42 41 43 4b 57 41 |f (dir =|= BACKWA|
|00001470| 52 44 29 0a 58 09 09 42 | 61 63 6b 43 68 61 72 28 |RD).X..B|ackChar(|
|00001480| 29 3b 0a 58 09 63 20 3d | 20 6c 69 6e 65 62 75 66 |);.X.c =| linebuf|
|00001490| 5b 63 75 72 63 68 61 72 | 5d 3b 0a 58 09 66 6f 72 |[curchar|];.X.for|
|000014a0| 20 28 3b 3b 29 20 7b 0a | 58 09 09 69 66 20 28 21 | (;;) {.|X..if (!|
|000014b0| 73 6b 69 70 5f 77 6f 72 | 64 73 20 26 26 20 69 73 |skip_wor|ds && is|
|000014c0| 6d 77 6f 72 64 28 63 29 | 29 20 7b 0a 58 09 09 20 |mword(c)|) {.X.. |
|000014d0| 20 20 20 57 49 54 48 5f | 54 41 42 4c 45 28 63 75 | WITH_|TABLE(cu|
|000014e0| 72 62 75 66 2d 3e 62 5f | 6d 61 6a 6f 72 29 0a 58 |rbuf->b_|major).X|
|000014f0| 09 09 09 28 64 69 72 20 | 3d 3d 20 46 4f 52 57 41 |...(dir |== FORWA|
|00001500| 52 44 29 20 3f 20 46 6f | 72 57 6f 72 64 28 29 20 |RD) ? Fo|rWord() |
|00001510| 3a 20 42 61 63 6b 57 6f | 72 64 28 29 3b 0a 58 09 |: BackWo|rd();.X.|
|00001520| 09 20 20 20 20 45 4e 44 | 5f 54 41 42 4c 45 28 29 |. END|_TABLE()|
|00001530| 3b 0a 58 09 09 20 20 20 | 20 62 72 65 61 6b 3b 0a |;.X.. | break;.|
|00001540| 58 09 09 7d 20 65 6c 73 | 65 20 69 66 20 28 68 61 |X..} els|e if (ha|
|00001550| 73 5f 73 79 6e 74 61 78 | 28 63 2c 20 73 79 6e 74 |s_syntax|(c, synt|
|00001560| 61 78 29 29 20 7b 0a 58 | 09 09 09 46 69 6e 64 4d |ax)) {.X|...FindM|
|00001570| 61 74 63 68 28 64 69 72 | 29 3b 0a 58 09 09 09 62 |atch(dir|);.X...b|
|00001580| 72 65 61 6b 3b 0a 58 09 | 09 7d 0a 58 09 09 44 6f |reak;.X.|.}.X..Do|
|00001590| 54 69 6d 65 73 28 46 6f | 72 43 68 61 72 28 29 2c |Times(Fo|rChar(),|
|000015a0| 20 64 69 72 29 3b 0a 58 | 09 09 69 66 20 28 65 6f | dir);.X|..if (eo|
|000015b0| 62 70 28 29 20 7c 7c 20 | 62 6f 62 70 28 29 29 0a |bp() || |bobp()).|
|000015c0| 58 09 09 09 72 65 74 75 | 72 6e 3b 0a 58 09 09 63 |X...retu|rn;.X..c|
|000015d0| 20 3d 20 6c 69 6e 65 62 | 75 66 5b 63 75 72 63 68 | = lineb|uf[curch|
|000015e0| 61 72 5d 3b 0a 58 09 7d | 0a 58 7d 0a 58 0a 58 46 |ar];.X.}|.X}.X.XF|
|000015f0| 53 65 78 70 72 28 29 0a | 58 7b 0a 58 09 72 65 67 |Sexpr().|X{.X.reg|
|00001600| 69 73 74 65 72 20 69 6e | 74 09 6e 75 6d 20 3d 20 |ister in|t.num = |
|00001610| 65 78 70 3b 0a 58 0a 58 | 09 69 66 20 28 65 78 70 |exp;.X.X|.if (exp|
|00001620| 20 3c 20 30 29 20 7b 0a | 58 09 09 65 78 70 20 3d | < 0) {.|X..exp =|
|00001630| 20 2d 65 78 70 3b 0a 58 | 09 09 42 53 65 78 70 72 | -exp;.X|..BSexpr|
|00001640| 28 29 3b 0a 58 09 7d 0a | 58 09 77 68 69 6c 65 20 |();.X.}.|X.while |
|00001650| 28 2d 2d 6e 75 6d 20 3e | 3d 20 30 29 0a 58 09 09 |(--num >|= 0).X..|
|00001660| 64 6f 5f 65 78 70 72 28 | 46 4f 52 57 41 52 44 2c |do_expr(|FORWARD,|
|00001670| 20 4e 4f 29 3b 0a 58 7d | 0a 58 0a 58 46 4c 69 73 | NO);.X}|.X.XFLis|
|00001680| 74 28 29 0a 58 7b 0a 58 | 09 72 65 67 69 73 74 65 |t().X{.X|.registe|
|00001690| 72 20 69 6e 74 09 6e 75 | 6d 20 3d 20 65 78 70 3b |r int.nu|m = exp;|
|000016a0| 0a 58 0a 58 09 69 66 20 | 28 65 78 70 20 3c 20 30 |.X.X.if |(exp < 0|
|000016b0| 29 20 7b 0a 58 09 09 65 | 78 70 20 3d 20 2d 65 78 |) {.X..e|xp = -ex|
|000016c0| 70 3b 0a 58 09 09 42 4c | 69 73 74 28 29 3b 0a 58 |p;.X..BL|ist();.X|
|000016d0| 09 7d 0a 58 09 77 68 69 | 6c 65 20 28 2d 2d 6e 75 |.}.X.whi|le (--nu|
|000016e0| 6d 20 3e 3d 20 30 29 0a | 58 09 09 64 6f 5f 65 78 |m >= 0).|X..do_ex|
|000016f0| 70 72 28 46 4f 52 57 41 | 52 44 2c 20 59 45 53 29 |pr(FORWA|RD, YES)|
|00001700| 3b 0a 58 7d 0a 58 0a 58 | 42 53 65 78 70 72 28 29 |;.X}.X.X|BSexpr()|
|00001710| 0a 58 7b 0a 58 09 72 65 | 67 69 73 74 65 72 20 69 |.X{.X.re|gister i|
|00001720| 6e 74 09 6e 75 6d 20 3d | 20 65 78 70 3b 0a 58 0a |nt.num =| exp;.X.|
|00001730| 58 09 69 66 20 28 65 78 | 70 20 3c 20 30 29 20 7b |X.if (ex|p < 0) {|
|00001740| 0a 58 09 09 65 78 70 20 | 3d 20 2d 65 78 70 3b 0a |.X..exp |= -exp;.|
|00001750| 58 09 09 46 53 65 78 70 | 72 28 29 3b 0a 58 09 7d |X..FSexp|r();.X.}|
|00001760| 0a 58 09 77 68 69 6c 65 | 20 28 2d 2d 6e 75 6d 20 |.X.while| (--num |
|00001770| 3e 3d 20 30 29 0a 58 09 | 09 64 6f 5f 65 78 70 72 |>= 0).X.|.do_expr|
|00001780| 28 42 41 43 4b 57 41 52 | 44 2c 20 4e 4f 29 3b 0a |(BACKWAR|D, NO);.|
|00001790| 58 7d 0a 58 0a 58 42 4c | 69 73 74 28 29 0a 58 7b |X}.X.XBL|ist().X{|
|000017a0| 0a 58 09 72 65 67 69 73 | 74 65 72 20 69 6e 74 09 |.X.regis|ter int.|
|000017b0| 6e 75 6d 20 3d 20 65 78 | 70 3b 0a 58 0a 58 09 69 |num = ex|p;.X.X.i|
|000017c0| 66 20 28 65 78 70 20 3c | 20 30 29 20 7b 0a 58 09 |f (exp <| 0) {.X.|
|000017d0| 09 65 78 70 20 3d 20 2d | 65 78 70 3b 0a 58 09 09 |.exp = -|exp;.X..|
|000017e0| 46 4c 69 73 74 28 29 3b | 0a 58 09 7d 0a 58 09 77 |FList();|.X.}.X.w|
|000017f0| 68 69 6c 65 20 28 2d 2d | 6e 75 6d 20 3e 3d 20 30 |hile (--|num >= 0|
|00001800| 29 0a 58 09 09 64 6f 5f | 65 78 70 72 28 42 41 43 |).X..do_|expr(BAC|
|00001810| 4b 57 41 52 44 2c 20 59 | 45 53 29 3b 0a 58 7d 0a |KWARD, Y|ES);.X}.|
|00001820| 58 0a 58 42 55 70 4c 69 | 73 74 28 29 0a 58 7b 0a |X.XBUpLi|st().X{.|
|00001830| 58 09 42 75 66 70 6f 73 | 09 2a 6d 70 3b 0a 58 09 |X.Bufpos|.*mp;.X.|
|00001840| 63 68 61 72 09 63 20 3d | 20 28 4d 61 6a 6f 72 4d |char.c =| (MajorM|
|00001850| 6f 64 65 28 43 4d 4f 44 | 45 29 20 3f 20 27 7d 27 |ode(CMOD|E) ? '}'|
|00001860| 20 3a 20 27 29 27 29 3b | 0a 58 0a 58 09 6d 70 20 | : ')');|.X.X.mp |
|00001870| 3d 20 6d 5f 70 61 72 65 | 6e 28 63 2c 20 42 41 43 |= m_pare|n(c, BAC|
|00001880| 4b 57 41 52 44 2c 20 4e | 4f 2c 20 59 45 53 29 3b |KWARD, N|O, YES);|
|00001890| 0a 58 09 69 66 20 28 6d | 70 20 3d 3d 20 30 29 0a |.X.if (m|p == 0).|
|000018a0| 58 09 09 6d 70 5f 65 72 | 72 6f 72 28 29 3b 0a 58 |X..mp_er|ror();.X|
|000018b0| 09 65 6c 73 65 0a 58 09 | 09 53 65 74 44 6f 74 28 |.else.X.|.SetDot(|
|000018c0| 6d 70 29 3b 0a 58 7d 0a | 58 0a 58 46 44 6f 77 6e |mp);.X}.|X.XFDown|
|000018d0| 4c 69 73 74 28 29 0a 58 | 7b 0a 58 09 42 75 66 70 |List().X|{.X.Bufp|
|000018e0| 6f 73 09 2a 73 70 3b 0a | 58 09 63 68 61 72 09 2a |os.*sp;.|X.char.*|
|000018f0| 73 73 74 72 20 3d 20 28 | 4d 61 6a 6f 72 4d 6f 64 |sstr = (|MajorMod|
|00001900| 65 28 43 4d 4f 44 45 29 | 20 3f 20 22 5b 7b 28 5b |e(CMODE)| ? "[{([|
|00001910| 5c 5c 5d 29 7d 5d 22 20 | 3a 20 22 5b 28 29 5d 22 |\\])}]" |: "[()]"|
|00001920| 29 2c 0a 58 09 09 2a 6c | 70 3b 0a 58 0a 58 09 73 |),.X..*l|p;.X.X.s|
|00001930| 70 20 3d 20 64 6f 73 65 | 61 72 63 68 28 73 73 74 |p = dose|arch(sst|
|00001940| 72 2c 20 46 4f 52 57 41 | 52 44 2c 20 59 45 53 29 |r, FORWA|RD, YES)|
|00001950| 3b 0a 58 09 69 66 20 28 | 73 70 20 21 3d 20 30 29 |;.X.if (|sp != 0)|
|00001960| 0a 58 09 09 6c 70 20 3d | 20 6c 63 6f 6e 74 65 6e |.X..lp =| lconten|
|00001970| 74 73 28 73 70 2d 3e 70 | 5f 6c 69 6e 65 29 3b 0a |ts(sp->p|_line);.|
|00001980| 58 09 69 66 20 28 73 70 | 20 3d 3d 20 30 20 7c 7c |X.if (sp| == 0 |||
|00001990| 20 68 61 73 5f 73 79 6e | 74 61 78 28 6c 70 5b 73 | has_syn|tax(lp[s|
|000019a0| 70 2d 3e 70 5f 63 68 61 | 72 20 2d 20 31 5d 2c 20 |p->p_cha|r - 1], |
|000019b0| 5f 43 6c 29 29 0a 58 09 | 09 63 6f 6d 70 6c 61 69 |_Cl)).X.|.complai|
|000019c0| 6e 28 22 5b 4e 6f 20 63 | 6f 6e 74 61 69 6e 65 64 |n("[No c|ontained|
|000019d0| 20 65 78 70 72 65 73 73 | 69 6f 6e 5d 22 29 3b 0a | express|ion]");.|
|000019e0| 58 09 53 65 74 44 6f 74 | 28 73 70 29 3b 0a 58 7d |X.SetDot|(sp);.X}|
|000019f0| 0a 58 0a 58 2f 2a 20 4d | 6f 76 65 20 74 6f 20 74 |.X.X/* M|ove to t|
|00001a00| 68 65 20 6d 61 74 63 68 | 69 6e 67 20 62 72 61 63 |he match|ing brac|
|00001a10| 65 20 6f 72 20 70 61 72 | 65 6e 20 64 65 70 65 6e |e or par|en depen|
|00001a20| 64 69 6e 67 20 6f 6e 20 | 74 68 65 20 63 75 72 72 |ding on |the curr|
|00001a30| 65 6e 74 20 70 6f 73 69 | 74 69 6f 6e 0a 58 20 20 |ent posi|tion.X |
|00001a40| 20 69 6e 20 74 68 65 20 | 62 75 66 66 65 72 2e 20 | in the |buffer. |
|00001a50| 2a 2f 0a 58 0a 58 70 72 | 69 76 61 74 65 0a 58 46 |*/.X.Xpr|ivate.XF|
|00001a60| 69 6e 64 4d 61 74 63 68 | 28 64 69 72 29 0a 58 7b |indMatch|(dir).X{|
|00001a70| 0a 58 09 72 65 67 69 73 | 74 65 72 20 42 75 66 70 |.X.regis|ter Bufp|
|00001a80| 6f 73 09 2a 62 70 3b 0a | 58 09 72 65 67 69 73 74 |os.*bp;.|X.regist|
|00001a90| 65 72 20 63 68 61 72 09 | 63 20 3d 20 6c 69 6e 65 |er char.|c = line|
|00001aa0| 62 75 66 5b 63 75 72 63 | 68 61 72 5d 3b 0a 58 0a |buf[curc|har];.X.|
|00001ab0| 58 09 69 66 20 28 28 69 | 6e 64 65 78 28 70 5f 74 |X.if ((i|ndex(p_t|
|00001ac0| 79 70 65 73 2c 20 63 29 | 20 3d 3d 20 30 29 20 7c |ypes, c)| == 0) ||
|00001ad0| 7c 0a 58 09 20 20 20 20 | 28 62 61 63 6b 73 6c 61 ||.X. |(backsla|
|00001ae0| 73 68 65 64 28 6c 69 6e | 65 62 75 66 2c 20 63 75 |shed(lin|ebuf, cu|
|00001af0| 72 63 68 61 72 29 29 29 | 0a 58 09 09 63 6f 6d 70 |rchar)))|.X..comp|
|00001b00| 6c 61 69 6e 28 28 63 68 | 61 72 20 2a 29 20 30 29 |lain((ch|ar *) 0)|
|00001b10| 3b 0a 58 09 69 66 20 28 | 64 69 72 20 3d 3d 20 46 |;.X.if (|dir == F|
|00001b20| 4f 52 57 41 52 44 29 0a | 58 09 09 46 6f 72 43 68 |ORWARD).|X..ForCh|
|00001b30| 61 72 28 29 3b 0a 58 09 | 62 70 20 3d 20 6d 5f 70 |ar();.X.|bp = m_p|
|00001b40| 61 72 65 6e 28 63 2c 20 | 64 69 72 2c 20 59 45 53 |aren(c, |dir, YES|
|00001b50| 2c 20 4e 4f 29 3b 0a 58 | 09 69 66 20 28 64 69 72 |, NO);.X|.if (dir|
|00001b60| 20 3d 3d 20 46 4f 52 57 | 41 52 44 29 0a 58 09 09 | == FORW|ARD).X..|
|00001b70| 42 61 63 6b 43 68 61 72 | 28 29 3b 0a 58 09 69 66 |BackChar|();.X.if|
|00001b80| 20 28 62 70 20 21 3d 20 | 30 29 0a 58 09 09 53 65 | (bp != |0).X..Se|
|00001b90| 74 44 6f 74 28 62 70 29 | 3b 0a 58 09 6d 70 5f 65 |tDot(bp)|;.X.mp_e|
|00001ba0| 72 72 6f 72 28 29 3b 09 | 2f 2a 20 69 66 20 74 68 |rror();.|/* if th|
|00001bb0| 65 72 65 20 69 73 20 61 | 6e 20 65 72 72 6f 72 20 |ere is a|n error |
|00001bc0| 74 68 65 20 75 73 65 72 | 20 77 61 6e 74 73 20 74 |the user| wants t|
|00001bd0| 6f 0a 58 09 09 09 20 20 | 20 6b 6e 6f 77 20 61 62 |o.X... | know ab|
|00001be0| 6f 75 74 20 69 74 20 2a | 2f 0a 58 7d 0a 58 0a 58 |out it *|/.X}.X.X|
|00001bf0| 42 75 66 70 6f 73 20 2a | 0a 58 63 5f 69 6e 64 65 |Bufpos *|.Xc_inde|
|00001c00| 6e 74 28 69 6e 63 72 6d | 74 29 0a 58 7b 0a 58 09 |nt(incrm|t).X{.X.|
|00001c10| 42 75 66 70 6f 73 09 2a | 62 70 3b 0a 58 09 69 6e |Bufpos.*|bp;.X.in|
|00001c20| 74 09 69 6e 64 65 6e 74 | 20 3d 20 30 3b 0a 58 0a |t.indent| = 0;.X.|
|00001c30| 58 09 69 66 20 28 62 70 | 20 3d 20 6d 5f 70 61 72 |X.if (bp| = m_par|
|00001c40| 65 6e 28 27 7d 27 2c 20 | 42 41 43 4b 57 41 52 44 |en('}', |BACKWARD|
|00001c50| 2c 20 4e 4f 2c 20 59 45 | 53 29 29 20 7b 0a 58 09 |, NO, YE|S)) {.X.|
|00001c60| 09 42 75 66 70 6f 73 09 | 73 61 76 65 3b 0a 58 0a |.Bufpos.|save;.X.|
|00001c70| 58 09 09 44 4f 54 73 61 | 76 65 28 26 73 61 76 65 |X..DOTsa|ve(&save|
|00001c80| 29 3b 0a 58 09 09 53 65 | 74 44 6f 74 28 62 70 29 |);.X..Se|tDot(bp)|
|00001c90| 3b 0a 58 09 09 54 6f 49 | 6e 64 65 6e 74 28 29 3b |;.X..ToI|ndent();|
|00001ca0| 0a 58 09 09 69 6e 64 65 | 6e 74 20 3d 20 63 61 6c |.X..inde|nt = cal|
|00001cb0| 63 5f 70 6f 73 28 6c 69 | 6e 65 62 75 66 2c 20 63 |c_pos(li|nebuf, c|
|00001cc0| 75 72 63 68 61 72 29 3b | 0a 58 09 09 53 65 74 44 |urchar);|.X..SetD|
|00001cd0| 6f 74 28 26 73 61 76 65 | 29 3b 0a 58 09 7d 0a 58 |ot(&save|);.X.}.X|
|00001ce0| 09 69 66 20 28 69 6e 63 | 72 6d 74 29 20 7b 0a 58 |.if (inc|rmt) {.X|
|00001cf0| 09 09 69 66 20 28 69 6e | 64 65 6e 74 20 3d 3d 20 |..if (in|dent == |
|00001d00| 30 29 0a 58 09 09 09 69 | 6e 63 72 6d 74 20 3d 20 |0).X...i|ncrmt = |
|00001d10| 74 61 62 73 74 6f 70 3b | 0a 58 09 09 65 6c 73 65 |tabstop;|.X..else|
|00001d20| 0a 58 09 09 09 69 6e 63 | 72 6d 74 20 3d 20 28 74 |.X...inc|rmt = (t|
|00001d30| 61 62 73 74 6f 70 20 2d | 20 28 69 6e 64 65 6e 74 |abstop -| (indent|
|00001d40| 25 74 61 62 73 74 6f 70 | 29 29 3b 0a 58 09 7d 0a |%tabstop|));.X.}.|
|00001d50| 58 09 6e 5f 69 6e 64 65 | 6e 74 28 69 6e 64 65 6e |X.n_inde|nt(inden|
|00001d60| 74 20 2b 20 69 6e 63 72 | 6d 74 29 3b 0a 58 09 72 |t + incr|mt);.X.r|
|00001d70| 65 74 75 72 6e 20 62 70 | 3b 0a 58 7d 0a 58 0a 58 |eturn bp|;.X}.X.X|
|00001d80| 23 69 66 64 65 66 20 43 | 4d 54 5f 46 4d 54 0a 58 |#ifdef C|MT_FMT.X|
|00001d90| 0a 58 63 68 61 72 09 43 | 6d 74 46 6d 74 5b 38 30 |.Xchar.C|mtFmt[80|
|00001da0| 5d 20 3d 20 22 2f 2a 25 | 6e 25 21 20 2a 20 25 63 |] = "/*%|n%! * %c|
|00001db0| 25 21 25 6e 20 2a 2f 22 | 3b 0a 58 0a 58 43 6f 6d |%!%n */"|;.X.XCom|
|00001dc0| 6d 65 6e 74 28 29 0a 58 | 7b 0a 58 09 46 69 6c 6c |ment().X|{.X.Fill|
|00001dd0| 43 6f 6d 6d 65 6e 74 28 | 43 6d 74 46 6d 74 29 3b |Comment(|CmtFmt);|
|00001de0| 0a 58 7d 0a 58 0a 58 2f | 2a 20 53 74 72 69 70 20 |.X}.X.X/|* Strip |
|00001df0| 6c 65 61 64 69 6e 67 20 | 61 6e 64 20 74 72 61 69 |leading |and trai|
|00001e00| 6c 69 6e 67 20 77 68 69 | 74 65 20 73 70 61 63 65 |ling whi|te space|
|00001e10| 2e 20 20 53 6b 69 70 20 | 6f 76 65 72 20 61 6e 79 |. Skip |over any|
|00001e20| 20 69 6d 62 65 64 64 65 | 64 20 27 5c 72 27 73 2e | imbedde|d '\r's.|
|00001e30| 20 2a 2f 0a 58 0a 58 70 | 72 69 76 61 74 65 0a 58 | */.X.Xp|rivate.X|
|00001e40| 73 74 72 69 70 5f 63 28 | 66 72 6f 6d 2c 20 74 6f |strip_c(|from, to|
|00001e50| 29 0a 58 63 68 61 72 09 | 2a 66 72 6f 6d 2c 0a 58 |).Xchar.|*from,.X|
|00001e60| 09 2a 74 6f 3b 0a 58 7b | 0a 58 09 72 65 67 69 73 |.*to;.X{|.X.regis|
|00001e70| 74 65 72 20 63 68 61 72 | 09 2a 66 72 5f 70 20 3d |ter char|.*fr_p =|
|00001e80| 20 66 72 6f 6d 2c 0a 58 | 09 09 09 2a 74 6f 5f 70 | from,.X|...*to_p|
|00001e90| 20 3d 20 74 6f 2c 0a 58 | 09 09 09 63 3b 0a 58 0a | = to,.X|...c;.X.|
|00001ea0| 58 09 77 68 69 6c 65 20 | 28 63 20 3d 20 2a 66 72 |X.while |(c = *fr|
|00001eb0| 5f 70 29 20 7b 0a 58 09 | 09 69 66 20 28 63 20 3d |_p) {.X.|.if (c =|
|00001ec0| 3d 20 27 20 27 20 7c 7c | 20 63 20 3d 3d 20 27 5c |= ' ' ||| c == '\|
|00001ed0| 74 27 20 7c 7c 20 63 20 | 3d 3d 20 27 5c 72 27 29 |t' || c |== '\r')|
|00001ee0| 0a 58 09 09 09 66 72 5f | 70 2b 2b 3b 0a 58 09 09 |.X...fr_|p++;.X..|
|00001ef0| 65 6c 73 65 0a 58 09 09 | 09 62 72 65 61 6b 3b 0a |else.X..|.break;.|
|00001f00| 58 09 7d 0a 58 09 77 68 | 69 6c 65 20 28 63 20 3d |X.}.X.wh|ile (c =|
|00001f10| 20 2a 66 72 5f 70 29 20 | 7b 0a 58 09 09 69 66 20 | *fr_p) |{.X..if |
|00001f20| 28 63 20 21 3d 20 27 5c | 72 27 29 0a 58 09 09 09 |(c != '\|r').X...|
|00001f30| 2a 74 6f 5f 70 2b 2b 20 | 3d 20 63 3b 0a 58 09 09 |*to_p++ |= c;.X..|
|00001f40| 66 72 5f 70 2b 2b 3b 0a | 58 09 7d 0a 58 09 77 68 |fr_p++;.|X.}.X.wh|
|00001f50| 69 6c 65 20 28 2d 2d 74 | 6f 5f 70 20 3e 3d 20 74 |ile (--t|o_p >= t|
|00001f60| 6f 29 0a 58 09 09 69 66 | 20 28 2a 74 6f 5f 70 20 |o).X..if| (*to_p |
|00001f70| 21 3d 20 27 20 27 20 26 | 26 20 2a 74 6f 5f 70 20 |!= ' ' &|& *to_p |
|00001f80| 21 3d 20 27 5c 74 27 29 | 0a 58 09 09 09 62 72 65 |!= '\t')|.X...bre|
|00001f90| 61 6b 3b 0a 58 09 2a 2b | 2b 74 6f 5f 70 20 3d 20 |ak;.X.*+|+to_p = |
|00001fa0| 27 5c 30 27 3b 0a 58 7d | 0a 58 0a 58 70 72 69 76 |'\0';.X}|.X.Xpriv|
|00001fb0| 61 74 65 20 63 68 61 72 | 09 6f 70 65 6e 5f 63 5b |ate char|.open_c[|
|00001fc0| 32 30 5d 2c 09 2f 2a 20 | 74 68 65 20 6f 70 65 6e |20],./* |the open|
|00001fd0| 20 63 6f 6d 6d 65 6e 74 | 20 66 6f 72 6d 61 74 20 | comment| format |
|00001fe0| 73 74 72 69 6e 67 20 2a | 2f 0a 58 09 09 6f 70 65 |string *|/.X..ope|
|00001ff0| 6e 5f 70 61 74 5b 32 30 | 5d 2c 09 2f 2a 20 74 68 |n_pat[20|],./* th|
|00002000| 65 20 73 65 61 72 63 68 | 20 70 61 74 74 65 72 6e |e search| pattern|
|00002010| 20 66 6f 72 20 6f 70 65 | 6e 20 63 6f 6d 6d 65 6e | for ope|n commen|
|00002020| 74 20 2a 2f 0a 58 09 09 | 6c 5f 68 65 61 64 65 72 |t */.X..|l_header|
|00002030| 5b 32 30 5d 2c 09 2f 2a | 20 74 68 65 20 70 72 65 |[20],./*| the pre|
|00002040| 66 69 78 20 66 6f 72 20 | 65 61 63 68 20 63 6f 6d |fix for |each com|
|00002050| 6d 65 6e 74 20 6c 69 6e | 65 20 2a 2f 0a 58 09 09 |ment lin|e */.X..|
|00002060| 6c 5f 74 72 61 69 6c 65 | 72 5b 32 30 5d 2c 09 2f |l_traile|r[20],./|
|00002070| 2a 20 74 68 65 20 73 75 | 66 66 69 78 20 2e 2e 2e |* the su|ffix ...|
|00002080| 20 2a 2f 0a 58 09 09 63 | 6c 6f 73 65 5f 63 5b 32 | */.X..c|lose_c[2|
|00002090| 30 5d 2c 0a 58 09 09 63 | 6c 6f 73 65 5f 70 61 74 |0],.X..c|lose_pat|
|000020a0| 5b 32 30 5d 3b 0a 58 0a | 58 70 72 69 76 61 74 65 |[20];.X.|Xprivate|
|000020b0| 20 63 68 61 72 09 2a 63 | 6f 6d 6d 65 6e 74 5f 62 | char.*c|omment_b|
|000020c0| 6f 64 79 5b 5d 20 3d 20 | 7b 0a 58 20 09 6f 70 65 |ody[] = |{.X .ope|
|000020d0| 6e 5f 63 2c 0a 58 09 6c | 5f 68 65 61 64 65 72 2c |n_c,.X.l|_header,|
|000020e0| 0a 58 09 6c 5f 74 72 61 | 69 6c 65 72 2c 0a 58 09 |.X.l_tra|iler,.X.|
|000020f0| 63 6c 6f 73 65 5f 63 0a | 58 7d 3b 0a 58 09 09 09 |close_c.|X};.X...|
|00002100| 09 09 0a 58 70 72 69 76 | 61 74 65 20 69 6e 74 09 |...Xpriv|ate int.|
|00002110| 6e 6c 66 6c 61 67 73 3b | 0a 58 0a 58 2f 2a 20 46 |nlflags;|.X.X/* F|
|00002120| 69 6c 6c 20 69 6e 20 74 | 68 65 20 64 61 74 61 20 |ill in t|he data |
|00002130| 73 74 72 75 63 74 75 72 | 65 73 20 61 62 6f 76 65 |structur|es above|
|00002140| 20 66 72 6f 6d 20 74 68 | 65 20 66 6f 72 6d 61 74 | from th|e format|
|00002150| 20 73 74 72 69 6e 67 2e | 20 20 44 6f 6e 27 74 20 | string.| Don't |
|00002160| 72 65 74 75 72 6e 0a 58 | 20 20 20 69 66 20 74 68 |return.X| if th|
|00002170| 65 72 65 27 73 20 74 72 | 6f 75 62 6c 65 2e 20 2a |ere's tr|ouble. *|
|00002180| 2f 0a 58 0a 58 70 72 69 | 76 61 74 65 0a 58 70 61 |/.X.Xpri|vate.Xpa|
|00002190| 72 73 65 5f 63 6d 74 5f | 66 6d 74 28 73 74 72 29 |rse_cmt_|fmt(str)|
|000021a0| 0a 58 63 68 61 72 09 2a | 73 74 72 3b 0a 58 7b 0a |.Xchar.*|str;.X{.|
|000021b0| 58 09 72 65 67 69 73 74 | 65 72 20 63 68 61 72 09 |X.regist|er char.|
|000021c0| 2a 66 6d 74 70 20 3d 20 | 73 74 72 3b 0a 58 09 72 |*fmtp = |str;.X.r|
|000021d0| 65 67 69 73 74 65 72 20 | 63 68 61 72 09 2a 2a 63 |egister |char.**c|
|000021e0| 5f 62 6f 64 79 20 3d 20 | 63 6f 6d 6d 65 6e 74 5f |_body = |comment_|
|000021f0| 62 6f 64 79 2c 0a 58 09 | 09 09 2a 62 6f 64 79 5f |body,.X.|..*body_|
|00002200| 70 20 3d 20 2a 63 5f 62 | 6f 64 79 3b 0a 58 09 69 |p = *c_b|ody;.X.i|
|00002210| 6e 74 09 63 2c 0a 58 09 | 20 09 6e 65 77 6c 69 6e |nt.c,.X.| .newlin|
|00002220| 65 73 20 3d 20 31 3b 0a | 58 0a 58 09 2f 2a 20 70 |es = 1;.|X.X./* p|
|00002230| 69 63 6b 20 61 70 61 72 | 74 20 74 68 65 20 63 6f |ick apar|t the co|
|00002240| 6d 6d 65 6e 74 20 73 74 | 72 69 6e 67 20 2a 2f 0a |mment st|ring */.|
|00002250| 58 09 77 68 69 6c 65 20 | 28 63 20 3d 20 2a 66 6d |X.while |(c = *fm|
|00002260| 74 70 2b 2b 29 20 7b 0a | 58 09 09 69 66 20 28 63 |tp++) {.|X..if (c|
|00002270| 20 21 3d 20 27 25 27 29 | 20 7b 0a 58 09 09 09 2a | != '%')| {.X...*|
|00002280| 62 6f 64 79 5f 70 2b 2b | 20 3d 20 63 3b 0a 58 09 |body_p++| = c;.X.|
|00002290| 09 09 63 6f 6e 74 69 6e | 75 65 3b 0a 58 09 09 7d |..contin|ue;.X..}|
|000022a0| 0a 58 09 09 73 77 69 74 | 63 68 28 63 20 3d 20 2a |.X..swit|ch(c = *|
|000022b0| 66 6d 74 70 2b 2b 29 20 | 7b 0a 58 09 09 63 61 73 |fmtp++) |{.X..cas|
|000022c0| 65 20 27 6e 27 3a 0a 58 | 09 09 09 69 66 20 28 6e |e 'n':.X|...if (n|
|000022d0| 65 77 6c 69 6e 65 73 20 | 3d 3d 20 32 20 7c 7c 20 |ewlines |== 2 || |
|000022e0| 6e 65 77 6c 69 6e 65 73 | 20 3d 3d 20 33 29 0a 58 |newlines| == 3).X|
|000022f0| 09 09 09 09 63 6f 6d 70 | 6c 61 69 6e 28 22 25 6e |....comp|lain("%n|
|00002300| 20 6e 6f 74 20 61 6c 6c | 6f 77 65 64 20 69 6e 20 | not all|owed in |
|00002310| 6c 69 6e 65 20 68 65 61 | 64 65 72 20 6f 72 20 74 |line hea|der or t|
|00002320| 72 61 69 6c 65 72 3a 20 | 25 73 22 2c 0a 58 09 09 |railer: |%s",.X..|
|00002330| 09 09 20 20 66 6d 74 70 | 20 2d 20 32 29 3b 0a 58 |.. fmtp| - 2);.X|
|00002340| 09 09 09 6e 6c 66 6c 61 | 67 73 20 2b 3d 20 6e 65 |...nlfla|gs += ne|
|00002350| 77 6c 69 6e 65 73 3b 0a | 58 09 09 09 2a 62 6f 64 |wlines;.|X...*bod|
|00002360| 79 5f 70 2b 2b 20 3d 20 | 27 5c 72 27 3b 0a 58 09 |y_p++ = |'\r';.X.|
|00002370| 09 09 62 72 65 61 6b 3b | 0a 58 09 09 63 61 73 65 |..break;|.X..case|
|00002380| 20 27 74 27 3a 0a 58 09 | 09 09 2a 62 6f 64 79 5f | 't':.X.|..*body_|
|00002390| 70 2b 2b 20 3d 20 27 5c | 74 27 3b 0a 58 09 09 09 |p++ = '\|t';.X...|
|000023a0| 62 72 65 61 6b 3b 0a 58 | 09 09 63 61 73 65 20 27 |break;.X|..case '|
|000023b0| 25 27 3a 0a 58 09 09 09 | 2a 62 6f 64 79 5f 70 2b |%':.X...|*body_p+|
|000023c0| 2b 20 3d 20 27 25 27 3b | 0a 58 09 09 09 62 72 65 |+ = '%';|.X...bre|
|000023d0| 61 6b 3b 0a 58 09 09 63 | 61 73 65 20 27 21 27 3a |ak;.X..c|ase '!':|
|000023e0| 0a 58 09 09 63 61 73 65 | 20 27 63 27 3a 0a 58 09 |.X..case| 'c':.X.|
|000023f0| 09 09 6e 65 77 6c 69 6e | 65 73 2b 2b 3b 0a 58 09 |..newlin|es++;.X.|
|00002400| 09 09 2a 62 6f 64 79 5f | 70 2b 2b 20 3d 20 27 5c |..*body_|p++ = '\|
|00002410| 30 27 3b 0a 58 09 09 09 | 62 6f 64 79 5f 70 20 3d |0';.X...|body_p =|
|00002420| 20 2a 2b 2b 63 5f 62 6f | 64 79 3b 0a 58 09 09 09 | *++c_bo|dy;.X...|
|00002430| 62 72 65 61 6b 3b 0a 58 | 09 09 64 65 66 61 75 6c |break;.X|..defaul|
|00002440| 74 3a 0a 58 09 09 09 63 | 6f 6d 70 6c 61 69 6e 28 |t:.X...c|omplain(|
|00002450| 22 5b 55 6e 6b 6e 6f 77 | 6e 20 63 6f 6d 6d 65 6e |"[Unknow|n commen|
|00002460| 74 20 65 73 63 61 70 65 | 3a 20 25 25 25 63 5d 22 |t escape|: %%%c]"|
|00002470| 2c 20 63 29 3b 0a 58 09 | 09 09 2f 2a 20 56 41 52 |, c);.X.|../* VAR|
|00002480| 41 52 47 53 20 2a 2f 0a | 58 09 09 09 62 72 65 61 |ARGS */.|X...brea|
|00002490| 6b 3b 0a 58 09 09 7d 0a | 58 09 7d 0a 58 09 2a 62 |k;.X..}.|X.}.X.*b|
|000024a0| 6f 64 79 5f 70 20 3d 20 | 27 5c 30 27 3b 0a 58 09 |ody_p = |'\0';.X.|
|000024b0| 2f 2a 20 6d 61 6b 65 20 | 73 65 61 72 63 68 20 70 |/* make |search p|
|000024c0| 61 74 74 65 72 6e 73 20 | 2a 2f 0a 58 09 73 74 72 |atterns |*/.X.str|
|000024d0| 69 70 5f 63 28 6f 70 65 | 6e 5f 63 2c 20 6f 70 65 |ip_c(ope|n_c, ope|
|000024e0| 6e 5f 70 61 74 29 3b 0a | 58 09 73 74 72 69 70 5f |n_pat);.|X.strip_|
|000024f0| 63 28 63 6c 6f 73 65 5f | 63 2c 20 63 6c 6f 73 65 |c(close_|c, close|
|00002500| 5f 70 61 74 29 3b 0a 58 | 7d 0a 58 0a 58 23 64 65 |_pat);.X|}.X.X#de|
|00002510| 66 69 6e 65 20 4e 4c 5f | 49 4e 5f 4f 50 45 4e 5f |fine NL_|IN_OPEN_|
|00002520| 43 20 20 28 28 6e 6c 66 | 6c 61 67 73 20 25 20 34 |C ((nlf|lags % 4|
|00002530| 29 20 3d 3d 20 31 29 0a | 58 23 64 65 66 69 6e 65 |) == 1).|X#define|
|00002540| 20 4e 4c 5f 49 4e 5f 43 | 4c 4f 53 45 5f 43 20 28 | NL_IN_C|LOSE_C (|
|00002550| 6e 6c 66 6c 61 67 73 20 | 3e 3d 20 34 29 0a 58 0a |nlflags |>= 4).X.|
|00002560| 58 46 69 6c 6c 43 6f 6d | 6d 65 6e 74 28 66 6f 72 |XFillCom|ment(for|
|00002570| 6d 61 74 29 0a 58 63 68 | 61 72 09 2a 66 6f 72 6d |mat).Xch|ar.*form|
|00002580| 61 74 3b 0a 58 7b 0a 58 | 09 69 6e 74 09 73 61 76 |at;.X{.X|.int.sav|
|00002590| 65 52 4d 61 72 67 69 6e | 2c 0a 58 09 09 69 6e 64 |eRMargin|,.X..ind|
|000025a0| 65 6e 74 5f 70 6f 73 2c | 0a 58 09 09 63 6c 6f 73 |ent_pos,|.X..clos|
|000025b0| 65 5f 61 74 5f 64 6f 74 | 20 3d 20 30 2c 0a 58 09 |e_at_dot| = 0,.X.|
|000025c0| 09 73 6c 65 6e 2c 0a 58 | 09 09 68 65 61 64 65 72 |.slen,.X|..header|
|000025d0| 5f 6c 65 6e 2c 0a 58 09 | 09 74 72 61 69 6c 65 72 |_len,.X.|.trailer|
|000025e0| 5f 6c 65 6e 3b 0a 58 09 | 72 65 67 69 73 74 65 72 |_len;.X.|register|
|000025f0| 20 63 68 61 72 09 2a 63 | 70 3b 0a 58 09 73 74 61 | char.*c|p;.X.sta|
|00002600| 74 69 63 20 63 68 61 72 | 09 69 6e 73 69 64 65 5f |tic char|.inside_|
|00002610| 65 72 72 5b 5d 20 3d 20 | 22 5b 4d 75 73 74 20 62 |err[] = |"[Must b|
|00002620| 65 20 62 65 74 77 65 65 | 6e 20 25 73 20 61 6e 64 |e betwee|n %s and|
|00002630| 20 25 73 20 74 6f 20 72 | 65 2d 66 6f 72 6d 61 74 | %s to r|e-format|
|00002640| 5d 22 3b 0a 58 09 42 75 | 66 70 6f 73 09 6f 70 65 |]";.X.Bu|fpos.ope|
|00002650| 6e 5f 63 5f 70 74 2c 0a | 58 09 09 63 6c 6f 73 65 |n_c_pt,.|X..close|
|00002660| 5f 63 5f 70 74 2c 0a 58 | 09 09 74 6d 70 5f 62 70 |_c_pt,.X|..tmp_bp|
|00002670| 2c 0a 58 09 09 2a 6d 61 | 74 63 68 5f 6f 2c 0a 58 |,.X..*ma|tch_o,.X|
|00002680| 09 09 2a 6d 61 74 63 68 | 5f 63 3b 0a 58 09 4d 61 |..*match|_c;.X.Ma|
|00002690| 72 6b 09 2a 65 6e 74 72 | 79 5f 6d 61 72 6b 2c 0a |rk.*entr|y_mark,.|
|000026a0| 58 09 09 2a 6f 70 65 6e | 5f 63 5f 6d 61 72 6b 2c |X..*open|_c_mark,|
|000026b0| 0a 58 09 09 2a 73 61 76 | 65 64 6f 74 3b 0a 58 0a |.X..*sav|edot;.X.|
|000026c0| 58 09 70 61 72 73 65 5f | 63 6d 74 5f 66 6d 74 28 |X.parse_|cmt_fmt(|
|000026d0| 66 6f 72 6d 61 74 29 3b | 0a 58 09 2f 2a 20 66 69 |format);|.X./* fi|
|000026e0| 67 75 72 65 20 6f 75 74 | 20 69 66 20 77 65 27 72 |gure out| if we'r|
|000026f0| 65 20 22 69 6e 73 69 64 | 65 22 20 61 20 63 6f 6d |e "insid|e" a com|
|00002700| 6d 65 6e 74 20 2a 2f 0a | 58 20 09 69 66 20 28 28 |ment */.|X .if ((|
|00002710| 6d 61 74 63 68 5f 6f 20 | 3d 20 64 6f 73 65 61 72 |match_o |= dosear|
|00002720| 63 68 28 6f 70 65 6e 5f | 70 61 74 2c 20 42 41 43 |ch(open_|pat, BAC|
|00002730| 4b 57 41 52 44 2c 20 30 | 29 29 20 3d 3d 20 30 29 |KWARD, 0|)) == 0)|
|00002740| 0a 58 09 09 2f 2a 20 56 | 41 52 41 52 47 53 20 2a |.X../* V|ARARGS *|
|00002750| 2f 0a 58 09 09 63 6f 6d | 70 6c 61 69 6e 28 22 4e |/.X..com|plain("N|
|00002760| 6f 20 6f 70 65 6e 69 6e | 67 20 25 73 20 74 6f 20 |o openin|g %s to |
|00002770| 6d 61 74 63 68 20 74 6f | 2e 22 2c 20 6f 70 65 6e |match to|.", open|
|00002780| 5f 70 61 74 29 3b 0a 58 | 09 6f 70 65 6e 5f 63 5f |_pat);.X|.open_c_|
|00002790| 70 74 20 3d 20 2a 6d 61 | 74 63 68 5f 6f 3b 0a 58 |pt = *ma|tch_o;.X|
|000027a0| 09 69 66 20 28 28 6d 61 | 74 63 68 5f 63 20 3d 20 |.if ((ma|tch_c = |
|000027b0| 64 6f 73 65 61 72 63 68 | 28 63 6c 6f 73 65 5f 70 |dosearch|(close_p|
|000027c0| 61 74 2c 20 42 41 43 4b | 57 41 52 44 2c 20 4e 4f |at, BACK|WARD, NO|
|000027d0| 29 29 20 21 3d 20 30 20 | 26 26 0a 58 09 20 20 20 |)) != 0 |&&.X. |
|000027e0| 20 69 6e 6f 72 64 65 72 | 28 6f 70 65 6e 5f 63 5f | inorder|(open_c_|
|000027f0| 70 74 2e 70 5f 6c 69 6e | 65 2c 20 6f 70 65 6e 5f |pt.p_lin|e, open_|
|00002800| 63 5f 70 74 2e 70 5f 63 | 68 61 72 2c 0a 58 09 09 |c_pt.p_c|har,.X..|
|00002810| 20 20 20 20 6d 61 74 63 | 68 5f 63 2d 3e 70 5f 6c | matc|h_c->p_l|
|00002820| 69 6e 65 2c 20 6d 61 74 | 63 68 5f 63 2d 3e 70 5f |ine, mat|ch_c->p_|
|00002830| 63 68 61 72 29 29 0a 58 | 09 20 20 09 63 6f 6d 70 |char)).X|. .comp|
|00002840| 6c 61 69 6e 28 69 6e 73 | 69 64 65 5f 65 72 72 2c |lain(ins|ide_err,|
|00002850| 20 6f 70 65 6e 5f 70 61 | 74 2c 20 63 6c 6f 73 65 | open_pa|t, close|
|00002860| 5f 70 61 74 29 3b 0a 58 | 09 69 66 20 28 28 6d 61 |_pat);.X|.if ((ma|
|00002870| 74 63 68 5f 6f 20 3d 20 | 64 6f 73 65 61 72 63 68 |tch_o = |dosearch|
|00002880| 28 6f 70 65 6e 5f 70 61 | 74 2c 20 46 4f 52 57 41 |(open_pa|t, FORWA|
|00002890| 52 44 2c 20 4e 4f 29 29 | 20 21 3d 20 30 29 20 7b |RD, NO))| != 0) {|
|000028a0| 0a 58 09 09 74 6d 70 5f | 62 70 20 3d 20 2a 6d 61 |.X..tmp_|bp = *ma|
|000028b0| 74 63 68 5f 6f 3b 0a 58 | 09 09 6d 61 74 63 68 5f |tch_o;.X|..match_|
|000028c0| 6f 20 3d 20 26 74 6d 70 | 5f 62 70 3b 0a 58 09 7d |o = &tmp|_bp;.X.}|
|000028d0| 20 0a 58 09 69 66 20 28 | 28 6d 61 74 63 68 5f 63 | .X.if (|(match_c|
|000028e0| 20 3d 20 64 6f 73 65 61 | 72 63 68 28 63 6c 6f 73 | = dosea|rch(clos|
|000028f0| 65 5f 70 61 74 2c 20 46 | 4f 52 57 41 52 44 2c 20 |e_pat, F|ORWARD, |
|00002900| 30 29 29 20 21 3d 20 28 | 42 75 66 70 6f 73 20 2a |0)) != (|Bufpos *|
|00002910| 29 20 30 29 0a 58 09 09 | 63 6c 6f 73 65 5f 63 5f |) 0).X..|close_c_|
|00002920| 70 74 20 3d 20 2a 6d 61 | 74 63 68 5f 63 3b 0a 58 |pt = *ma|tch_c;.X|
|00002930| 0a 58 09 2f 2a 20 48 65 | 72 65 27 73 20 77 68 65 |.X./* He|re's whe|
|00002940| 72 65 20 77 65 20 66 69 | 67 75 72 65 20 6f 75 74 |re we fi|gure out|
|00002950| 20 77 68 65 74 68 65 72 | 20 74 6f 20 66 6f 72 6d | whether| to form|
|00002960| 61 74 20 66 72 6f 6d 20 | 64 6f 74 20 6f 72 20 66 |at from |dot or f|
|00002970| 72 6f 6d 0a 58 09 20 20 | 20 74 68 65 20 63 6c 6f |rom.X. | the clo|
|00002980| 73 65 20 63 6f 6d 6d 65 | 6e 74 2e 20 20 4e 6f 74 |se comme|nt. Not|
|00002990| 65 20 74 68 61 74 20 77 | 65 27 76 65 20 61 6c 72 |e that w|e've alr|
|000029a0| 65 61 64 79 20 73 65 61 | 72 63 68 65 64 20 62 61 |eady sea|rched ba|
|000029b0| 63 6b 77 61 72 64 73 20 | 74 6f 0a 58 09 20 20 20 |ckwards |to.X. |
|000029c0| 66 69 6e 64 20 74 68 65 | 20 6f 70 65 6e 20 63 6f |find the| open co|
|000029d0| 6d 6d 65 6e 74 20 73 79 | 6d 62 6f 6c 20 66 6f 72 |mment sy|mbol for|
|000029e0| 20 74 68 65 20 63 6f 6d | 6d 65 6e 74 20 77 65 20 | the com|ment we |
|000029f0| 61 72 65 20 66 6f 72 6d | 61 74 74 69 6e 67 2e 0a |are form|atting..|
|00002a00| 58 09 20 20 20 54 68 65 | 20 6f 70 65 6e 20 73 79 |X. The| open sy|
|00002a10| 6d 62 6f 6c 20 6d 65 6e | 74 69 6f 6e 65 64 20 62 |mbol men|tioned b|
|00002a20| 65 6c 6f 77 20 72 65 66 | 65 72 73 20 74 6f 20 74 |elow ref|ers to t|
|00002a30| 68 65 20 70 6f 73 73 69 | 62 6c 65 20 65 78 69 73 |he possi|ble exis|
|00002a40| 74 65 6e 63 65 0a 58 09 | 20 20 20 6f 66 20 74 68 |tence.X.| of th|
|00002a50| 65 20 6e 65 78 74 20 63 | 6f 6d 6d 65 6e 74 2e 20 |e next c|omment. |
|00002a60| 20 54 68 65 72 65 20 61 | 72 65 20 35 20 63 61 73 | There a|re 5 cas|
|00002a70| 65 73 3a 0a 58 09 09 31 | 29 20 6e 6f 20 6f 70 65 |es:.X..1|) no ope|
|00002a80| 6e 20 6f 72 20 63 6c 6f | 73 65 20 73 79 6d 62 6f |n or clo|se symbo|
|00002a90| 6c 09 09 3d 3d 3e 20 64 | 6f 74 0a 58 09 09 32 29 |l..==> d|ot.X..2)|
|00002aa0| 20 6f 70 65 6e 2c 20 62 | 75 74 20 6e 6f 20 63 6c | open, b|ut no cl|
|00002ab0| 6f 73 65 20 73 79 6d 62 | 6f 6c 09 09 3d 3d 3e 20 |ose symb|ol..==> |
|00002ac0| 64 6f 74 0a 58 09 09 33 | 29 20 63 6c 6f 73 65 2c |dot.X..3|) close,|
|00002ad0| 20 62 75 74 20 6e 6f 20 | 6f 70 65 6e 09 09 09 3d | but no |open...=|
|00002ae0| 3d 3e 20 63 6c 6f 73 65 | 0a 58 09 09 34 29 20 6f |=> close|.X..4) o|
|00002af0| 70 65 6e 2c 20 63 6c 6f | 73 65 20 61 72 65 20 69 |pen, clo|se are i|
|00002b00| 6e 6f 72 64 65 72 09 09 | 3d 3d 3e 20 64 6f 74 0a |norder..|==> dot.|
|00002b10| 58 09 09 35 29 20 6f 70 | 65 6e 2c 20 63 6c 6f 73 |X..5) op|en, clos|
|00002b20| 65 20 61 72 65 20 6e 6f | 74 20 69 6e 6f 72 64 65 |e are no|t inorde|
|00002b30| 72 09 09 3d 3d 3e 20 63 | 6c 6f 73 65 20 2a 2f 0a |r..==> c|lose */.|
|00002b40| 58 0a 58 0a 58 09 69 66 | 20 28 6d 61 74 63 68 5f |X.X.X.if| (match_|
|00002b50| 6f 20 3d 3d 20 28 42 75 | 66 70 6f 73 20 2a 29 20 |o == (Bu|fpos *) |
|00002b60| 30 29 20 7b 0a 58 09 09 | 69 66 20 28 6d 61 74 63 |0) {.X..|if (matc|
|00002b70| 68 5f 63 20 3d 3d 20 28 | 42 75 66 70 6f 73 20 2a |h_c == (|Bufpos *|
|00002b80| 29 20 30 29 0a 58 09 09 | 09 63 6c 6f 73 65 5f 61 |) 0).X..|.close_a|
|00002b90| 74 5f 64 6f 74 2b 2b 3b | 0a 58 09 7d 20 65 6c 73 |t_dot++;|.X.} els|
|00002ba0| 65 20 69 66 20 28 6d 61 | 74 63 68 5f 63 20 3d 3d |e if (ma|tch_c ==|
|00002bb0| 20 28 42 75 66 70 6f 73 | 20 2a 29 20 30 29 0a 58 | (Bufpos| *) 0).X|
|00002bc0| 09 09 63 6c 6f 73 65 5f | 61 74 5f 64 6f 74 2b 2b |..close_|at_dot++|
|00002bd0| 3b 0a 58 09 65 6c 73 65 | 20 69 66 20 28 69 6e 6f |;.X.else| if (ino|
|00002be0| 72 64 65 72 28 6d 61 74 | 63 68 5f 6f 2d 3e 70 5f |rder(mat|ch_o->p_|
|00002bf0| 6c 69 6e 65 2c 20 6d 61 | 74 63 68 5f 6f 2d 3e 70 |line, ma|tch_o->p|
|00002c00| 5f 63 68 61 72 2c 0a 58 | 09 09 20 6d 61 74 63 68 |_char,.X|.. match|
|00002c10| 5f 63 2d 3e 70 5f 6c 69 | 6e 65 2c 20 6d 61 74 63 |_c->p_li|ne, matc|
|00002c20| 68 5f 63 2d 3e 70 5f 63 | 68 61 72 29 29 0a 58 09 |h_c->p_c|har)).X.|
|00002c30| 09 63 6c 6f 73 65 5f 61 | 74 5f 64 6f 74 2b 2b 3b |.close_a|t_dot++;|
|00002c40| 0a 58 0a 58 09 69 66 20 | 28 63 6c 6f 73 65 5f 61 |.X.X.if |(close_a|
|00002c50| 74 5f 64 6f 74 29 20 7b | 0a 58 09 09 63 6c 6f 73 |t_dot) {|.X..clos|
|00002c60| 65 5f 63 5f 70 74 2e 70 | 5f 6c 69 6e 65 20 3d 20 |e_c_pt.p|_line = |
|00002c70| 63 75 72 6c 69 6e 65 3b | 0a 58 09 09 63 6c 6f 73 |curline;|.X..clos|
|00002c80| 65 5f 63 5f 70 74 2e 70 | 5f 63 68 61 72 20 3d 20 |e_c_pt.p|_char = |
|00002c90| 63 75 72 63 68 61 72 3b | 0a 58 09 7d 20 65 6c 73 |curchar;|.X.} els|
|00002ca0| 65 20 7b 0a 58 09 09 53 | 65 74 44 6f 74 28 6d 61 |e {.X..S|etDot(ma|
|00002cb0| 74 63 68 5f 63 29 3b 0a | 58 09 7d 0a 58 09 53 65 |tch_c);.|X.}.X.Se|
|00002cc0| 74 44 6f 74 28 26 6f 70 | 65 6e 5f 63 5f 70 74 29 |tDot(&op|en_c_pt)|
|00002cd0| 3b 0a 58 09 6f 70 65 6e | 5f 63 5f 6d 61 72 6b 20 |;.X.open|_c_mark |
|00002ce0| 3d 20 4d 61 6b 65 4d 61 | 72 6b 28 63 75 72 6c 69 |= MakeMa|rk(curli|
|00002cf0| 6e 65 2c 20 63 75 72 63 | 68 61 72 2c 20 46 4c 4f |ne, curc|har, FLO|
|00002d00| 41 54 45 52 29 3b 0a 58 | 09 69 6e 64 65 6e 74 5f |ATER);.X|.indent_|
|00002d10| 70 6f 73 20 3d 20 63 61 | 6c 63 5f 70 6f 73 28 6c |pos = ca|lc_pos(l|
|00002d20| 69 6e 65 62 75 66 2c 20 | 63 75 72 63 68 61 72 29 |inebuf, |curchar)|
|00002d30| 3b 0a 58 09 2f 2a 20 73 | 65 61 72 63 68 20 66 6f |;.X./* s|earch fo|
|00002d40| 72 20 61 20 63 6c 6f 73 | 65 20 63 6f 6d 6d 65 6e |r a clos|e commen|
|00002d50| 74 3b 20 64 65 6c 65 74 | 65 20 69 74 20 69 66 20 |t; delet|e it if |
|00002d60| 69 74 20 65 78 69 74 73 | 20 2a 2f 0a 58 09 53 65 |it exits| */.X.Se|
|00002d70| 74 44 6f 74 28 26 63 6c | 6f 73 65 5f 63 5f 70 74 |tDot(&cl|ose_c_pt|
|00002d80| 29 3b 0a 58 09 69 66 20 | 28 63 6c 6f 73 65 5f 61 |);.X.if |(close_a|
|00002d90| 74 5f 64 6f 74 20 3d 3d | 20 30 29 20 7b 0a 58 09 |t_dot ==| 0) {.X.|
|00002da0| 09 73 6c 65 6e 20 3d 20 | 73 74 72 6c 65 6e 28 63 |.slen = |strlen(c|
|00002db0| 6c 6f 73 65 5f 70 61 74 | 29 3b 0a 58 09 09 77 68 |lose_pat|);.X..wh|
|00002dc0| 69 6c 65 20 28 73 6c 65 | 6e 2d 2d 29 0a 58 09 09 |ile (sle|n--).X..|
|00002dd0| 09 44 65 6c 50 43 68 61 | 72 28 29 3b 0a 58 09 7d |.DelPCha|r();.X.}|
|00002de0| 0a 58 09 65 6e 74 72 79 | 5f 6d 61 72 6b 20 3d 20 |.X.entry|_mark = |
|00002df0| 4d 61 6b 65 4d 61 72 6b | 28 63 75 72 6c 69 6e 65 |MakeMark|(curline|
|00002e00| 2c 20 63 75 72 63 68 61 | 72 2c 20 46 4c 4f 41 54 |, curcha|r, FLOAT|
|00002e10| 45 52 29 3b 0a 58 09 54 | 6f 4d 61 72 6b 28 6f 70 |ER);.X.T|oMark(op|
|00002e20| 65 6e 5f 63 5f 6d 61 72 | 6b 29 3b 0a 58 09 2f 2a |en_c_mar|k);.X./*|
|00002e30| 20 61 6c 77 61 79 73 20 | 73 65 70 61 72 61 74 65 | always |separate|
|00002e40| 20 74 68 65 20 63 6f 6d | 6d 65 6e 74 20 62 6f 64 | the com|ment bod|
|00002e50| 79 20 66 72 6f 6d 20 61 | 6e 79 74 68 69 6e 67 20 |y from a|nything |
|00002e60| 70 72 65 63 65 65 64 69 | 6e 67 20 69 74 20 2a 2f |preceedi|ng it */|
|00002e70| 0a 58 09 4c 69 6e 65 49 | 6e 73 65 72 74 28 31 29 |.X.LineI|nsert(1)|
|00002e80| 3b 0a 58 09 44 65 6c 57 | 74 53 70 61 63 65 28 29 |;.X.DelW|tSpace()|
|00002e90| 3b 0a 58 09 42 6f 6c 28 | 29 3b 0a 58 09 66 6f 72 |;.X.Bol(|);.X.for|
|00002ea0| 20 28 63 70 20 3d 20 6f | 70 65 6e 5f 63 3b 20 2a | (cp = o|pen_c; *|
|00002eb0| 63 70 3b 20 63 70 2b 2b | 29 20 7b 0a 58 09 09 69 |cp; cp++|) {.X..i|
|00002ec0| 66 20 28 2a 63 70 20 3d | 3d 20 27 5c 72 27 29 20 |f (*cp =|= '\r') |
|00002ed0| 7b 0a 58 09 09 09 69 66 | 20 28 21 65 6f 6c 70 28 |{.X...if| (!eolp(|
|00002ee0| 29 29 0a 58 09 09 09 09 | 4c 69 6e 65 49 6e 73 65 |)).X....|LineInse|
|00002ef0| 72 74 28 31 29 3b 0a 58 | 09 09 09 65 6c 73 65 0a |rt(1);.X|...else.|
|00002f00| 58 09 09 09 09 6c 69 6e | 65 5f 6d 6f 76 65 28 46 |X....lin|e_move(F|
|00002f10| 4f 52 57 41 52 44 2c 20 | 4e 4f 29 3b 0a 58 09 09 |ORWARD, |NO);.X..|
|00002f20| 7d 20 65 6c 73 65 20 69 | 66 20 28 2a 63 70 20 3d |} else i|f (*cp =|
|00002f30| 3d 20 27 20 27 20 7c 7c | 20 2a 63 70 20 3d 3d 20 |= ' ' ||| *cp == |
|00002f40| 27 5c 74 27 29 20 7b 0a | 58 09 09 09 69 66 20 28 |'\t') {.|X...if (|
|00002f50| 6c 69 6e 65 62 75 66 5b | 63 75 72 63 68 61 72 5d |linebuf[|curchar]|
|00002f60| 20 21 3d 20 2a 63 70 29 | 0a 58 09 09 09 09 49 6e | != *cp)|.X....In|
|00002f70| 73 65 72 74 28 2a 63 70 | 29 3b 0a 58 09 09 7d 20 |sert(*cp|);.X..} |
|00002f80| 65 6c 73 65 0a 58 09 09 | 09 2f 2a 20 53 69 6e 63 |else.X..|./* Sinc|
|00002f90| 65 20 77 65 20 6d 61 74 | 63 68 65 64 20 74 68 65 |e we mat|ched the|
|00002fa0| 20 6f 70 65 6e 20 63 6f | 6d 6d 65 6e 74 20 73 74 | open co|mment st|
|00002fb0| 72 69 6e 67 20 6f 6e 20 | 74 68 69 73 0a 58 09 09 |ring on |this.X..|
|00002fc0| 09 20 20 20 6c 69 6e 65 | 2c 20 77 65 20 64 6f 6e |. line|, we don|
|00002fd0| 27 74 20 6e 65 65 64 20 | 74 6f 20 77 6f 72 72 79 |'t need |to worry|
|00002fe0| 20 61 62 6f 75 74 20 63 | 72 6f 73 73 69 6e 67 20 | about c|rossing |
|00002ff0| 6c 69 6e 65 0a 58 09 09 | 09 20 20 20 62 6f 75 6e |line.X..|. boun|
|00003000| 64 61 72 69 65 73 2e 20 | 2a 2f 0a 58 09 09 09 63 |daries. |*/.X...c|
|00003010| 75 72 63 68 61 72 2b 2b | 3b 0a 58 09 7d 0a 58 09 |urchar++|;.X.}.X.|
|00003020| 73 61 76 65 64 6f 74 20 | 3d 20 4d 61 6b 65 4d 61 |savedot |= MakeMa|
|00003030| 72 6b 28 63 75 72 6c 69 | 6e 65 2c 20 63 75 72 63 |rk(curli|ne, curc|
|00003040| 68 61 72 2c 20 46 4c 4f | 41 54 45 52 29 3b 0a 58 |har, FLO|ATER);.X|
|00003050| 0a 58 09 2f 2a 20 57 65 | 20 6e 65 65 64 20 74 6f |.X./* We| need to|
|00003060| 20 73 74 72 69 70 20 74 | 68 65 20 6c 69 6e 65 20 | strip t|he line |
|00003070| 68 65 61 64 65 72 20 70 | 61 74 74 65 72 6e 20 6f |header p|attern o|
|00003080| 66 20 6c 65 61 64 69 6e | 67 20 77 68 69 74 65 20 |f leadin|g white |
|00003090| 73 70 61 63 65 0a 58 09 | 20 20 20 73 69 6e 63 65 |space.X.| since|
|000030a0| 20 77 65 20 6e 65 65 64 | 20 74 6f 20 6d 61 74 63 | we need| to matc|
|000030b0| 68 20 74 68 65 20 6c 69 | 6e 65 20 61 66 74 65 72 |h the li|ne after|
|000030c0| 20 61 6c 6c 20 6f 66 20 | 69 74 73 20 6c 65 61 64 | all of |its lead|
|000030d0| 69 6e 67 0a 58 09 20 20 | 20 77 68 69 74 65 73 70 |ing.X. | whitesp|
|000030e0| 61 63 65 20 69 73 20 67 | 6f 6e 65 2e 20 2a 2f 0a |ace is g|one. */.|
|000030f0| 58 09 66 6f 72 20 28 63 | 70 20 3d 20 6c 5f 68 65 |X.for (c|p = l_he|
|00003100| 61 64 65 72 3b 20 2a 63 | 70 20 26 26 20 28 69 73 |ader; *c|p && (is|
|00003110| 73 70 61 63 65 28 2a 63 | 70 29 29 3b 20 63 70 2b |space(*c|p)); cp+|
|00003120| 2b 29 0a 58 09 09 3b 0a | 58 09 68 65 61 64 65 72 |+).X..;.|X.header|
|00003130| 5f 6c 65 6e 20 3d 20 73 | 74 72 6c 65 6e 28 63 70 |_len = s|trlen(cp|
|00003140| 29 3b 0a 58 09 74 72 61 | 69 6c 65 72 5f 6c 65 6e |);.X.tra|iler_len|
|00003150| 20 3d 20 73 74 72 6c 65 | 6e 28 6c 5f 74 72 61 69 | = strle|n(l_trai|
|00003160| 6c 65 72 29 3b 0a 58 0a | 58 09 2f 2a 20 53 74 72 |ler);.X.|X./* Str|
|00003170| 69 70 20 65 61 63 68 20 | 63 6f 6d 6d 65 6e 74 20 |ip each |comment |
|00003180| 6c 69 6e 65 20 6f 66 20 | 74 68 65 20 6f 70 65 6e |line of |the open|
|00003190| 20 61 6e 64 20 63 6c 6f | 73 65 20 63 6f 6d 6d 65 | and clo|se comme|
|000031a0| 6e 74 20 73 74 72 69 6e | 67 73 0a 58 09 20 20 20 |nt strin|gs.X. |
|000031b0| 62 65 66 6f 72 65 20 72 | 65 66 6f 72 6d 61 74 74 |before r|eformatt|
|000031c0| 69 6e 67 20 69 74 2e 20 | 2a 2f 0a 58 0a 58 09 64 |ing it. |*/.X.X.d|
|000031d0| 6f 20 7b 0a 58 09 09 42 | 6f 6c 28 29 3b 0a 58 09 |o {.X..B|ol();.X.|
|000031e0| 09 44 65 6c 57 74 53 70 | 61 63 65 28 29 3b 0a 58 |.DelWtSp|ace();.X|
|000031f0| 09 09 69 66 20 28 68 65 | 61 64 65 72 5f 6c 65 6e |..if (he|ader_len|
|00003200| 20 26 26 20 21 73 74 72 | 6e 63 6d 70 28 6c 69 6e | && !str|ncmp(lin|
|00003210| 65 62 75 66 2c 20 63 70 | 2c 20 68 65 61 64 65 72 |ebuf, cp|, header|
|00003220| 5f 6c 65 6e 29 29 0a 58 | 09 09 09 44 6f 54 69 6d |_len)).X|...DoTim|
|00003230| 65 73 28 44 65 6c 4e 43 | 68 61 72 28 29 2c 20 68 |es(DelNC|har(), h|
|00003240| 65 61 64 65 72 5f 6c 65 | 6e 29 3b 0a 58 09 09 69 |eader_le|n);.X..i|
|00003250| 66 20 28 74 72 61 69 6c | 65 72 5f 6c 65 6e 29 20 |f (trail|er_len) |
|00003260| 7b 0a 58 09 09 09 45 6f | 6c 28 29 3b 0a 58 09 09 |{.X...Eo|l();.X..|
|00003270| 09 69 66 20 28 28 63 75 | 72 63 68 61 72 20 3e 20 |.if ((cu|rchar > |
|00003280| 74 72 61 69 6c 65 72 5f | 6c 65 6e 29 20 26 26 0a |trailer_|len) &&.|
|00003290| 58 09 09 09 20 20 20 20 | 28 21 73 74 72 6e 63 6d |X... |(!strncm|
|000032a0| 70 28 26 6c 69 6e 65 62 | 75 66 5b 63 75 72 63 68 |p(&lineb|uf[curch|
|000032b0| 61 72 20 2d 20 74 72 61 | 69 6c 65 72 5f 6c 65 6e |ar - tra|iler_len|
|000032c0| 5d 2c 0a 58 09 09 09 09 | 20 20 20 20 20 20 6c 5f |],.X....| l_|
|000032d0| 74 72 61 69 6c 65 72 2c | 20 74 72 61 69 6c 65 72 |trailer,| trailer|
|000032e0| 5f 6c 65 6e 29 29 29 0a | 58 09 09 09 09 44 6f 54 |_len))).|X....DoT|
|000032f0| 69 6d 65 73 28 44 65 6c | 50 43 68 61 72 28 29 2c |imes(Del|PChar(),|
|00003300| 20 74 72 61 69 6c 65 72 | 5f 6c 65 6e 29 3b 0a 58 | trailer|_len);.X|
|00003310| 09 09 7d 0a 58 09 09 69 | 66 20 28 63 75 72 6c 69 |..}.X..i|f (curli|
|00003320| 6e 65 2d 3e 6c 5f 6e 65 | 78 74 20 21 3d 20 30 29 |ne->l_ne|xt != 0)|
|00003330| 0a 58 09 09 09 6c 69 6e | 65 5f 6d 6f 76 65 28 46 |.X...lin|e_move(F|
|00003340| 4f 52 57 41 52 44 2c 20 | 4e 4f 29 3b 0a 58 09 09 |ORWARD, |NO);.X..|
|00003350| 65 6c 73 65 0a 58 09 09 | 09 62 72 65 61 6b 3b 0a |else.X..|.break;.|
|00003360| 58 09 7d 20 77 68 69 6c | 65 20 28 63 75 72 6c 69 |X.} whil|e (curli|
|00003370| 6e 65 20 21 3d 20 65 6e | 74 72 79 5f 6d 61 72 6b |ne != en|try_mark|
|00003380| 2d 3e 6d 5f 6c 69 6e 65 | 2d 3e 6c 5f 6e 65 78 74 |->m_line|->l_next|
|00003390| 29 3b 0a 58 0a 58 09 44 | 6f 53 65 74 4d 61 72 6b |);.X.X.D|oSetMark|
|000033a0| 28 73 61 76 65 64 6f 74 | 2d 3e 6d 5f 6c 69 6e 65 |(savedot|->m_line|
|000033b0| 2c 20 73 61 76 65 64 6f | 74 2d 3e 6d 5f 63 68 61 |, savedo|t->m_cha|
|000033c0| 72 29 3b 0a 58 09 54 6f | 4d 61 72 6b 28 65 6e 74 |r);.X.To|Mark(ent|
|000033d0| 72 79 5f 6d 61 72 6b 29 | 3b 0a 58 09 73 61 76 65 |ry_mark)|;.X.save|
|000033e0| 52 4d 61 72 67 69 6e 20 | 3d 20 52 4d 61 72 67 69 |RMargin |= RMargi|
|000033f0| 6e 3b 0a 58 09 52 4d 61 | 72 67 69 6e 20 3d 20 73 |n;.X.RMa|rgin = s|
|00003400| 61 76 65 52 4d 61 72 67 | 69 6e 20 2d 20 73 74 72 |aveRMarg|in - str|
|00003410| 6c 65 6e 28 6c 5f 68 65 | 61 64 65 72 29 20 2d 0a |len(l_he|ader) -.|
|00003420| 58 09 09 20 20 73 74 72 | 6c 65 6e 28 6c 5f 74 72 |X.. str|len(l_tr|
|00003430| 61 69 6c 65 72 29 20 2d | 20 69 6e 64 65 6e 74 5f |ailer) -| indent_|
|00003440| 70 6f 73 20 2b 20 32 3b | 0a 58 09 2f 2a 20 64 6f |pos + 2;|.X./* do|
|00003450| 20 6e 6f 74 20 75 73 65 | 20 74 68 65 20 6c 65 66 | not use| the lef|
|00003460| 74 20 6d 61 72 67 69 6e | 20 2a 2f 0a 58 09 65 78 |t margin| */.X.ex|
|00003470| 70 5f 70 20 3d 20 4e 4f | 3b 0a 58 09 64 6f 5f 72 |p_p = NO|;.X.do_r|
|00003480| 66 69 6c 6c 28 29 3b 0a | 58 09 52 4d 61 72 67 69 |fill();.|X.RMargi|
|00003490| 6e 20 3d 20 73 61 76 65 | 52 4d 61 72 67 69 6e 3b |n = save|RMargin;|
|000034a0| 0a 58 09 2f 2a 20 67 65 | 74 20 62 61 63 6b 20 74 |.X./* ge|t back t|
|000034b0| 6f 20 74 68 65 20 73 74 | 61 72 74 20 6f 66 20 74 |o the st|art of t|
|000034c0| 68 65 20 63 6f 6d 6d 65 | 6e 74 20 2a 2f 0a 58 09 |he comme|nt */.X.|
|000034d0| 50 6f 70 4d 61 72 6b 28 | 29 3b 20 0a 58 09 64 6f |PopMark(|); .X.do|
|000034e0| 20 7b 0a 58 09 09 69 66 | 20 28 63 75 72 6c 69 6e | {.X..if| (curlin|
|000034f0| 65 20 3d 3d 20 6f 70 65 | 6e 5f 63 5f 6d 61 72 6b |e == ope|n_c_mark|
|00003500| 2d 3e 6d 5f 6c 69 6e 65 | 2d 3e 6c 5f 6e 65 78 74 |->m_line|->l_next|
|00003510| 29 20 7b 0a 58 09 09 09 | 3b 0a 58 09 09 7d 20 65 |) {.X...|;.X..} e|
|00003520| 6c 73 65 20 7b 0a 58 09 | 09 09 6e 5f 69 6e 64 65 |lse {.X.|..n_inde|
|00003530| 6e 74 28 69 6e 64 65 6e | 74 5f 70 6f 73 29 3b 0a |nt(inden|t_pos);.|
|00003540| 58 09 09 09 69 6e 73 5f | 73 74 72 28 6c 5f 68 65 |X...ins_|str(l_he|
|00003550| 61 64 65 72 2c 20 4e 4f | 29 3b 0a 58 09 09 7d 0a |ader, NO|);.X..}.|
|00003560| 58 09 09 45 6f 6c 28 29 | 3b 0a 58 09 09 69 66 20 |X..Eol()|;.X..if |
|00003570| 28 21 4e 4c 5f 49 4e 5f | 43 4c 4f 53 45 5f 43 20 |(!NL_IN_|CLOSE_C |
|00003580| 26 26 20 28 63 75 72 6c | 69 6e 65 20 3d 3d 20 65 |&& (curl|ine == e|
|00003590| 6e 74 72 79 5f 6d 61 72 | 6b 2d 3e 6d 5f 6c 69 6e |ntry_mar|k->m_lin|
|000035a0| 65 29 29 0a 58 09 09 09 | 3b 0a 58 09 09 65 6c 73 |e)).X...|;.X..els|
|000035b0| 65 0a 58 09 09 09 69 6e | 73 5f 73 74 72 28 6c 5f |e.X...in|s_str(l_|
|000035c0| 74 72 61 69 6c 65 72 2c | 20 4e 4f 29 3b 0a 58 09 |trailer,| NO);.X.|
|000035d0| 09 69 66 20 28 63 75 72 | 6c 69 6e 65 2d 3e 6c 5f |.if (cur|line->l_|
|000035e0| 6e 65 78 74 20 21 3d 20 | 30 29 0a 58 09 09 09 6c |next != |0).X...l|
|000035f0| 69 6e 65 5f 6d 6f 76 65 | 28 46 4f 52 57 41 52 44 |ine_move|(FORWARD|
|00003600| 2c 20 4e 4f 29 3b 0a 58 | 09 09 65 6c 73 65 20 0a |, NO);.X|..else .|
|00003610| 58 09 09 09 62 72 65 61 | 6b 3b 0a 58 09 7d 20 77 |X...brea|k;.X.} w|
|00003620| 68 69 6c 65 20 28 63 75 | 72 6c 69 6e 65 20 21 3d |hile (cu|rline !=|
|00003630| 20 65 6e 74 72 79 5f 6d | 61 72 6b 2d 3e 6d 5f 6c | entry_m|ark->m_l|
|00003640| 69 6e 65 2d 3e 6c 5f 6e | 65 78 74 29 3b 0a 58 09 |ine->l_n|ext);.X.|
|00003650| 2f 2a 20 68 61 6e 64 6c | 65 20 74 68 65 20 63 6c |/* handl|e the cl|
|00003660| 6f 73 65 20 63 6f 6d 6d | 65 6e 74 20 73 79 6d 62 |ose comm|ent symb|
|00003670| 6f 6c 20 2a 2f 0a 58 09 | 69 66 20 28 63 75 72 6c |ol */.X.|if (curl|
|00003680| 69 6e 65 20 3d 3d 20 65 | 6e 74 72 79 5f 6d 61 72 |ine == e|ntry_mar|
|00003690| 6b 2d 3e 6d 5f 6c 69 6e | 65 2d 3e 6c 5f 6e 65 78 |k->m_lin|e->l_nex|
|000036a0| 74 29 20 7b 0a 58 09 09 | 6c 69 6e 65 5f 6d 6f 76 |t) {.X..|line_mov|
|000036b0| 65 28 42 41 43 4b 57 41 | 52 44 2c 20 4e 4f 29 3b |e(BACKWA|RD, NO);|
|000036c0| 0a 58 09 09 45 6f 6c 28 | 29 3b 0a 58 09 7d 0a 58 |.X..Eol(|);.X.}.X|
|000036d0| 09 44 65 6c 57 74 53 70 | 61 63 65 28 29 3b 0a 58 |.DelWtSp|ace();.X|
|000036e0| 09 2f 2a 20 69 66 20 74 | 68 65 20 61 64 64 69 74 |./* if t|he addit|
|000036f0| 69 6f 6e 20 6f 66 20 74 | 68 65 20 63 6c 6f 73 65 |ion of t|he close|
|00003700| 20 73 79 6d 62 6f 6c 20 | 77 6f 75 6c 64 20 63 61 | symbol |would ca|
|00003710| 75 73 65 20 74 68 65 20 | 6c 69 6e 65 20 74 6f 20 |use the |line to |
|00003720| 62 65 0a 58 09 20 20 20 | 74 6f 6f 20 6c 6f 6e 67 |be.X. |too long|
|00003730| 2c 20 70 75 74 20 74 68 | 65 20 63 6c 6f 73 65 20 |, put th|e close |
|00003740| 73 79 6d 62 6f 6c 20 6f | 6e 20 74 68 65 20 6e 65 |symbol o|n the ne|
|00003750| 78 74 20 6c 69 6e 65 2e | 20 2a 2f 0a 58 09 69 66 |xt line.| */.X.if|
|00003760| 20 28 73 74 72 6c 65 6e | 28 63 6c 6f 73 65 5f 63 | (strlen|(close_c|
|00003770| 29 20 2b 20 63 61 6c 63 | 5f 70 6f 73 28 6c 69 6e |) + calc|_pos(lin|
|00003780| 65 62 75 66 2c 20 63 75 | 72 63 68 61 72 29 20 3e |ebuf, cu|rchar) >|
|00003790| 20 52 4d 61 72 67 69 6e | 29 20 7b 0a 58 09 09 4c | RMargin|) {.X..L|
|000037a0| 69 6e 65 49 6e 73 65 72 | 74 28 31 29 3b 0a 58 09 |ineInser|t(1);.X.|
|000037b0| 09 6e 5f 69 6e 64 65 6e | 74 28 69 6e 64 65 6e 74 |.n_inden|t(indent|
|000037c0| 5f 70 6f 73 29 3b 0a 58 | 09 7d 0a 58 09 66 6f 72 |_pos);.X|.}.X.for|
|000037d0| 20 28 63 70 20 3d 20 63 | 6c 6f 73 65 5f 63 3b 20 | (cp = c|lose_c; |
|000037e0| 2a 63 70 3b 20 63 70 2b | 2b 29 20 7b 0a 58 09 09 |*cp; cp+|+) {.X..|
|000037f0| 69 66 20 28 2a 63 70 20 | 3d 3d 20 27 5c 72 27 29 |if (*cp |== '\r')|
|00003800| 20 7b 0a 58 09 09 09 4c | 69 6e 65 49 6e 73 65 72 | {.X...L|ineInser|
|00003810| 74 28 31 29 3b 0a 58 09 | 09 09 6e 5f 69 6e 64 65 |t(1);.X.|..n_inde|
|00003820| 6e 74 28 69 6e 64 65 6e | 74 5f 70 6f 73 29 3b 0a |nt(inden|t_pos);.|
|00003830| 58 09 09 7d 20 65 6c 73 | 65 0a 58 09 09 09 49 6e |X..} els|e.X...In|
|00003840| 73 65 72 74 28 2a 63 70 | 29 3b 0a 58 09 7d 0a 58 |sert(*cp|);.X.}.X|
|00003850| 09 54 6f 4d 61 72 6b 28 | 6f 70 65 6e 5f 63 5f 6d |.ToMark(|open_c_m|
|00003860| 61 72 6b 29 3b 0a 58 09 | 45 6f 6c 28 29 3b 0a 58 |ark);.X.|Eol();.X|
|00003870| 09 65 78 70 5f 70 20 3d | 20 4e 4f 3b 0a 58 09 44 |.exp_p =| NO;.X.D|
|00003880| 65 6c 4e 43 68 61 72 28 | 29 3b 0a 58 7d 0a 58 0a |elNChar(|);.X}.X.|
|00003890| 58 23 65 6e 64 69 66 20 | 43 4d 54 5f 46 4d 54 0a |X#endif |CMT_FMT.|
|000038a0| 58 0a 40 2f 2f 45 2a 4f | 2a 46 20 63 2e 63 2f 2f |X.@//E*O|*F c.c//|
|000038b0| 0a 69 66 20 74 65 73 74 | 20 31 33 31 38 37 20 2d |.if test| 13187 -|
|000038c0| 6e 65 20 22 60 77 63 20 | 2d 63 20 3c 27 63 2e 63 |ne "`wc |-c <'c.c|
|000038d0| 27 60 22 3b 20 74 68 65 | 6e 0a 20 20 20 20 65 63 |'`"; the|n. ec|
|000038e0| 68 6f 20 73 68 61 72 3a | 20 65 72 72 6f 72 20 74 |ho shar:| error t|
|000038f0| 72 61 6e 73 6d 69 74 74 | 69 6e 67 20 22 27 63 2e |ransmitt|ing "'c.|
|00003900| 63 27 22 20 27 28 73 68 | 6f 75 6c 64 20 68 61 76 |c'" '(sh|ould hav|
|00003910| 65 20 62 65 65 6e 20 31 | 33 31 38 37 20 63 68 61 |e been 1|3187 cha|
|00003920| 72 61 63 74 65 72 73 29 | 27 0a 66 69 0a 66 69 20 |racters)|'.fi.fi |
|00003930| 23 20 65 6e 64 20 6f 66 | 20 6f 76 65 72 77 72 69 |# end of| overwri|
|00003940| 74 69 6e 67 20 63 68 65 | 63 6b 0a 65 63 68 6f 20 |ting che|ck.echo |
|00003950| 73 68 61 72 3a 20 65 78 | 74 72 61 63 74 69 6e 67 |shar: ex|tracting|
|00003960| 20 22 27 63 74 79 70 65 | 2e 63 27 22 20 27 28 33 | "'ctype|.c'" '(3|
|00003970| 37 30 39 20 63 68 61 72 | 61 63 74 65 72 73 29 27 |709 char|acters)'|
|00003980| 0a 69 66 20 74 65 73 74 | 20 2d 66 20 27 63 74 79 |.if test| -f 'cty|
|00003990| 70 65 2e 63 27 20 3b 20 | 74 68 65 6e 20 0a 20 20 |pe.c' ; |then . |
|000039a0| 65 63 68 6f 20 73 68 61 | 72 3a 20 77 69 6c 6c 20 |echo sha|r: will |
|000039b0| 6e 6f 74 20 6f 76 65 72 | 2d 77 72 69 74 65 20 65 |not over|-write e|
|000039c0| 78 69 73 74 69 6e 67 20 | 66 69 6c 65 20 22 27 63 |xisting |file "'c|
|000039d0| 74 79 70 65 2e 63 27 22 | 0a 65 6c 73 65 0a 73 65 |type.c'"|.else.se|
|000039e0| 64 20 27 73 2f 5e 58 2f | 2f 27 20 3e 63 74 79 70 |d 's/^X/|/' >ctyp|
|000039f0| 65 2e 63 20 3c 3c 27 40 | 2f 2f 45 2a 4f 2a 46 20 |e.c <<'@|//E*O*F |
|00003a00| 63 74 79 70 65 2e 63 2f | 2f 27 0a 58 2f 2a 2a 2a |ctype.c/|/'.X/***|
|00003a10| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00003a20| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00003a30| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00003a40| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00003a50| 2a 2a 2a 2a 2a 0a 58 20 | 2a 20 54 68 69 73 20 70 |*****.X |* This p|
|00003a60| 72 6f 67 72 61 6d 20 69 | 73 20 43 6f 70 79 72 69 |rogram i|s Copyri|
|00003a70| 67 68 74 20 28 43 29 20 | 31 39 38 36 20 62 79 20 |ght (C) |1986 by |
|00003a80| 4a 6f 6e 61 74 68 61 6e | 20 50 61 79 6e 65 2e 20 |Jonathan| Payne. |
|00003a90| 20 4a 4f 56 45 20 69 73 | 20 20 20 20 20 20 20 2a | JOVE is| *|
|00003aa0| 0a 58 20 2a 20 70 72 6f | 76 69 64 65 64 20 74 6f |.X * pro|vided to|
|00003ab0| 20 79 6f 75 20 77 69 74 | 68 6f 75 74 20 63 68 61 | you wit|hout cha|
|00003ac0| 72 67 65 2c 20 61 6e 64 | 20 77 69 74 68 20 6e 6f |rge, and| with no|
|00003ad0| 20 77 61 72 72 61 6e 74 | 79 2e 20 20 59 6f 75 20 | warrant|y. You |
|00003ae0| 6d 61 79 20 67 69 76 65 | 20 20 2a 0a 58 20 2a 20 |may give| *.X * |
|00003af0| 61 77 61 79 20 63 6f 70 | 69 65 73 20 6f 66 20 4a |away cop|ies of J|
|00003b00| 4f 56 45 2c 20 69 6e 63 | 6c 75 64 69 6e 67 20 73 |OVE, inc|luding s|
|00003b10| 6f 75 72 63 65 73 2c 20 | 70 72 6f 76 69 64 65 64 |ources, |provided|
|00003b20| 20 74 68 61 74 20 74 68 | 69 73 20 6e 6f 74 69 63 | that th|is notic|
|00003b30| 65 20 69 73 20 2a 0a 58 | 20 2a 20 69 6e 63 6c 75 |e is *.X| * inclu|
|00003b40| 64 65 64 20 69 6e 20 61 | 6c 6c 20 74 68 65 20 66 |ded in a|ll the f|
|00003b50| 69 6c 65 73 2e 20 20 20 | 20 20 20 20 20 20 20 20 |iles. | |
|00003b60| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003b70| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003b80| 2a 0a 58 20 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |*.X ****|********|
|00003b90| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00003ba0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00003bb0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00003bc0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2f 0a 58 0a |********|****/.X.|
|00003bd0| 58 23 69 6e 63 6c 75 64 | 65 20 22 6a 6f 76 65 2e |X#includ|e "jove.|
|00003be0| 68 22 0a 58 23 69 6e 63 | 6c 75 64 65 20 22 63 74 |h".X#inc|lude "ct|
|00003bf0| 79 70 65 2e 68 22 0a 58 | 0a 58 69 6e 74 09 53 79 |ype.h".X|.Xint.Sy|
|00003c00| 6e 74 61 78 54 61 62 6c | 65 20 3d 20 46 55 4e 44 |ntaxTabl|e = FUND|
|00003c10| 41 4d 45 4e 54 41 4c 3b | 09 2f 2a 20 43 75 72 72 |AMENTAL;|./* Curr|
|00003c20| 65 6e 74 20 74 61 62 6c | 65 20 74 6f 20 75 73 65 |ent tabl|e to use|
|00003c30| 2e 20 2a 2f 0a 58 0a 58 | 63 68 61 72 20 43 68 61 |. */.X.X|char Cha|
|00003c40| 72 54 61 62 6c 65 5b 4e | 4d 41 4a 4f 52 53 5d 5b |rTable[N|MAJORS][|
|00003c50| 31 32 38 5d 20 3d 20 7b | 0a 58 7b 09 5f 43 2c 09 |128] = {|.X{._C,.|
|00003c60| 5f 43 2c 09 5f 43 2c 09 | 5f 43 2c 09 5f 43 2c 09 |_C,._C,.|_C,._C,.|
|00003c70| 5f 43 2c 09 5f 43 2c 09 | 5f 43 2c 0a 58 09 5f 43 |_C,._C,.|_C,.X._C|
|00003c80| 2c 09 5f 43 2c 09 5f 43 | 2c 09 5f 43 2c 09 5f 43 |,._C,._C|,._C,._C|
|00003c90| 2c 09 5f 43 2c 09 5f 43 | 2c 09 5f 43 2c 0a 58 09 |,._C,._C|,._C,.X.|
|00003ca0| 5f 43 2c 09 5f 43 2c 09 | 5f 43 2c 09 5f 43 2c 09 |_C,._C,.|_C,._C,.|
|00003cb0| 5f 43 2c 09 5f 43 2c 09 | 5f 43 2c 09 5f 43 2c 0a |_C,._C,.|_C,._C,.|
|00003cc0| 58 09 5f 43 2c 09 5f 43 | 2c 09 5f 43 2c 09 5f 43 |X._C,._C|,._C,._C|
|00003cd0| 2c 09 5f 43 2c 09 5f 43 | 2c 09 5f 43 2c 09 5f 43 |,._C,._C|,._C,._C|
|00003ce0| 2c 0a 58 09 5f 50 2c 09 | 5f 50 2c 09 5f 50 2c 09 |,.X._P,.|_P,._P,.|
|00003cf0| 5f 50 2c 09 5f 50 2c 09 | 5f 50 2c 09 5f 50 2c 09 |_P,._P,.|_P,._P,.|
|00003d00| 5f 50 2c 0a 58 09 5f 4f | 70 7c 5f 50 2c 09 5f 43 |_P,.X._O|p|_P,._C|
|00003d10| 6c 7c 5f 50 2c 09 5f 50 | 2c 09 5f 50 2c 09 5f 50 |l|_P,._P|,._P,._P|
|00003d20| 2c 09 5f 50 2c 09 5f 50 | 2c 09 5f 50 2c 0a 58 09 |,._P,._P|,._P,.X.|
|00003d30| 5f 57 7c 5f 4e 2c 09 5f | 57 7c 5f 4e 2c 09 5f 57 |_W|_N,._|W|_N,._W|
|00003d40| 7c 5f 4e 2c 09 5f 57 7c | 5f 4e 2c 09 5f 57 7c 5f ||_N,._W||_N,._W|_|
|00003d50| 4e 2c 09 5f 57 7c 5f 4e | 2c 09 5f 57 7c 5f 4e 2c |N,._W|_N|,._W|_N,|
|00003d60| 09 5f 57 7c 5f 4e 2c 0a | 58 09 5f 57 7c 5f 4e 2c |._W|_N,.|X._W|_N,|
|00003d70| 09 5f 57 7c 5f 4e 2c 09 | 5f 50 2c 09 5f 50 2c 09 |._W|_N,.|_P,._P,.|
|00003d80| 5f 50 2c 09 5f 50 2c 09 | 5f 50 2c 09 5f 50 2c 0a |_P,._P,.|_P,._P,.|
|00003d90| 58 09 5f 50 2c 09 5f 57 | 7c 5f 55 2c 09 5f 57 7c |X._P,._W||_U,._W||
|00003da0| 5f 55 2c 09 5f 57 7c 5f | 55 2c 09 5f 57 7c 5f 55 |_U,._W|_|U,._W|_U|
|00003db0| 2c 09 5f 57 7c 5f 55 2c | 09 5f 57 7c 5f 55 2c 09 |,._W|_U,|._W|_U,.|
|00003dc0| 5f 57 7c 5f 55 2c 0a 58 | 09 5f 57 7c 5f 55 2c 09 |_W|_U,.X|._W|_U,.|
|00003dd0| 5f 57 7c 5f 55 2c 09 5f | 57 7c 5f 55 2c 09 5f 57 |_W|_U,._|W|_U,._W|
|00003de0| 7c 5f 55 2c 09 5f 57 7c | 5f 55 2c 09 5f 57 7c 5f ||_U,._W||_U,._W|_|
|00003df0| 55 2c 09 5f 57 7c 5f 55 | 2c 09 5f 57 7c 5f 55 2c |U,._W|_U|,._W|_U,|
|00003e00| 0a 58 09 5f 57 7c 5f 55 | 2c 09 5f 57 7c 5f 55 2c |.X._W|_U|,._W|_U,|
|00003e10| 09 5f 57 7c 5f 55 2c 09 | 5f 57 7c 5f 55 2c 09 5f |._W|_U,.|_W|_U,._|
|00003e20| 57 7c 5f 55 2c 09 5f 57 | 7c 5f 55 2c 09 5f 57 7c |W|_U,._W||_U,._W||
|00003e30| 5f 55 2c 09 5f 57 7c 5f | 55 2c 0a 58 09 5f 57 7c |_U,._W|_|U,.X._W||
|00003e40| 5f 55 2c 09 5f 57 7c 5f | 55 2c 09 5f 57 7c 5f 55 |_U,._W|_|U,._W|_U|
|00003e50| 2c 09 5f 4f 70 7c 5f 50 | 2c 09 5f 50 2c 09 5f 43 |,._Op|_P|,._P,._C|
|00003e60| 6c 7c 5f 50 2c 09 5f 50 | 2c 09 5f 50 2c 0a 58 09 |l|_P,._P|,._P,.X.|
|00003e70| 5f 50 2c 09 5f 57 7c 5f | 4c 2c 09 5f 57 7c 5f 4c |_P,._W|_|L,._W|_L|
|00003e80| 2c 09 5f 57 7c 5f 4c 2c | 09 5f 57 7c 5f 4c 2c 09 |,._W|_L,|._W|_L,.|
|00003e90| 5f 57 7c 5f 4c 2c 09 5f | 57 7c 5f 4c 2c 09 5f 57 |_W|_L,._|W|_L,._W|
|00003ea0| 7c 5f 4c 2c 0a 58 09 5f | 57 7c 5f 4c 2c 09 5f 57 ||_L,.X._|W|_L,._W|
|00003eb0| 7c 5f 4c 2c 09 5f 57 7c | 5f 4c 2c 09 5f 57 7c 5f ||_L,._W||_L,._W|_|
|00003ec0| 4c 2c 09 5f 57 7c 5f 4c | 2c 09 5f 57 7c 5f 4c 2c |L,._W|_L|,._W|_L,|
|00003ed0| 09 5f 57 7c 5f 4c 2c 09 | 5f 57 7c 5f 4c 2c 0a 58 |._W|_L,.|_W|_L,.X|
|00003ee0| 09 5f 57 7c 5f 4c 2c 09 | 5f 57 7c 5f 4c 2c 09 5f |._W|_L,.|_W|_L,._|
|00003ef0| 57 7c 5f 4c 2c 09 5f 57 | 7c 5f 4c 2c 09 5f 57 7c |W|_L,._W||_L,._W||
|00003f00| 5f 4c 2c 09 5f 57 7c 5f | 4c 2c 09 5f 57 7c 5f 4c |_L,._W|_|L,._W|_L|
|00003f10| 2c 09 5f 57 7c 5f 4c 2c | 0a 58 09 5f 57 7c 5f 4c |,._W|_L,|.X._W|_L|
|00003f20| 2c 09 5f 57 7c 5f 4c 2c | 09 5f 57 7c 5f 4c 2c 09 |,._W|_L,|._W|_L,.|
|00003f30| 5f 4f 70 7c 5f 50 2c 09 | 5f 50 2c 09 5f 43 6c 7c |_Op|_P,.|_P,._Cl||
|00003f40| 5f 50 2c 09 5f 50 2c 09 | 5f 43 09 7d 2c 0a 58 0a |_P,._P,.|_C.},.X.|
|00003f50| 58 7b 09 5f 43 2c 09 5f | 43 2c 09 5f 43 2c 09 5f |X{._C,._|C,._C,._|
|00003f60| 43 2c 09 5f 43 2c 09 5f | 43 2c 09 5f 43 2c 09 5f |C,._C,._|C,._C,._|
|00003f70| 43 2c 0a 58 09 5f 43 2c | 09 5f 43 2c 09 5f 43 2c |C,.X._C,|._C,._C,|
|00003f80| 09 5f 43 2c 09 5f 43 2c | 09 5f 43 2c 09 5f 43 2c |._C,._C,|._C,._C,|
|00003f90| 09 5f 43 2c 0a 58 09 5f | 43 2c 09 5f 43 2c 09 5f |._C,.X._|C,._C,._|
|00003fa0| 43 2c 09 5f 43 2c 09 5f | 43 2c 09 5f 43 2c 09 5f |C,._C,._|C,._C,._|
|00003fb0| 43 2c 09 5f 43 2c 0a 58 | 09 5f 43 2c 09 5f 43 2c |C,._C,.X|._C,._C,|
|00003fc0| 09 5f 43 2c 09 5f 43 2c | 09 5f 43 2c 09 5f 43 2c |._C,._C,|._C,._C,|
|00003fd0| 09 5f 43 2c 09 5f 43 2c | 0a 58 09 5f 50 2c 09 5f |._C,._C,|.X._P,._|
|00003fe0| 50 2c 09 5f 50 2c 09 5f | 50 2c 09 5f 50 2c 09 5f |P,._P,._|P,._P,._|
|00003ff0| 50 2c 09 5f 50 2c 09 5f | 50 7c 5f 57 2c 0a 58 09 |P,._P,._|P|_W,.X.|
|00004000| 5f 4f 70 7c 5f 50 2c 09 | 5f 43 6c 7c 5f 50 2c 09 |_Op|_P,.|_Cl|_P,.|
|00004010| 5f 50 2c 09 5f 50 2c 09 | 5f 50 2c 09 5f 50 2c 09 |_P,._P,.|_P,._P,.|
|00004020| 5f 50 2c 09 5f 50 2c 0a | 58 09 5f 57 7c 5f 4e 2c |_P,._P,.|X._W|_N,|
|00004030| 09 5f 57 7c 5f 4e 2c 09 | 5f 57 7c 5f 4e 2c 09 5f |._W|_N,.|_W|_N,._|
|00004040| 57 7c 5f 4e 2c 09 5f 57 | 7c 5f 4e 2c 09 5f 57 7c |W|_N,._W||_N,._W||
|00004050| 5f 4e 2c 09 5f 57 7c 5f | 4e 2c 09 5f 57 7c 5f 4e |_N,._W|_|N,._W|_N|
|00004060| 2c 0a 58 09 5f 57 7c 5f | 4e 2c 09 5f 57 7c 5f 4e |,.X._W|_|N,._W|_N|
|00004070| 2c 09 5f 50 2c 09 5f 50 | 2c 09 5f 50 2c 09 5f 50 |,._P,._P|,._P,._P|
|00004080| 2c 09 5f 50 2c 09 5f 50 | 2c 0a 58 09 5f 50 2c 09 |,._P,._P|,.X._P,.|
|00004090| 5f 57 7c 5f 55 2c 09 5f | 57 7c 5f 55 2c 09 5f 57 |_W|_U,._|W|_U,._W|
|000040a0| 7c 5f 55 2c 09 5f 57 7c | 5f 55 2c 09 5f 57 7c 5f ||_U,._W||_U,._W|_|
|000040b0| 55 2c 09 5f 57 7c 5f 55 | 2c 09 5f 57 7c 5f 55 2c |U,._W|_U|,._W|_U,|
|000040c0| 0a 58 09 5f 57 7c 5f 55 | 2c 09 5f 57 7c 5f 55 2c |.X._W|_U|,._W|_U,|
|000040d0| 09 5f 57 7c 5f 55 2c 09 | 5f 57 7c 5f 55 2c 09 5f |._W|_U,.|_W|_U,._|
|000040e0| 57 7c 5f 55 2c 09 5f 57 | 7c 5f 55 2c 09 5f 57 7c |W|_U,._W||_U,._W||
|000040f0| 5f 55 2c 09 5f 57 7c 5f | 55 2c 0a 58 09 5f 57 7c |_U,._W|_|U,.X._W||
|00004100| 5f 55 2c 09 5f 57 7c 5f | 55 2c 09 5f 57 7c 5f 55 |_U,._W|_|U,._W|_U|
|00004110| 2c 09 5f 57 7c 5f 55 2c | 09 5f 57 7c 5f 55 2c 09 |,._W|_U,|._W|_U,.|
|00004120| 5f 57 7c 5f 55 2c 09 5f | 57 7c 5f 55 2c 09 5f 57 |_W|_U,._|W|_U,._W|
|00004130| 7c 5f 55 2c 0a 58 09 5f | 57 7c 5f 55 2c 09 5f 57 ||_U,.X._|W|_U,._W|
|00004140| 7c 5f 55 2c 09 5f 57 7c | 5f 55 2c 09 5f 4f 70 7c ||_U,._W||_U,._Op||
|00004150| 5f 50 2c 09 5f 50 2c 09 | 5f 43 6c 7c 5f 50 2c 09 |_P,._P,.|_Cl|_P,.|
|00004160| 5f 50 2c 09 5f 50 2c 0a | 58 09 5f 50 2c 09 5f 57 |_P,._P,.|X._P,._W|
|00004170| 7c 5f 4c 2c 09 5f 57 7c | 5f 4c 2c 09 5f 57 7c 5f ||_L,._W||_L,._W|_|
|00004180| 4c 2c 09 5f 57 7c 5f 4c | 2c 09 5f 57 7c 5f 4c 2c |L,._W|_L|,._W|_L,|
|00004190| 09 5f 57 7c 5f 4c 2c 09 | 5f 57 7c 5f 4c 2c 0a 58 |._W|_L,.|_W|_L,.X|
|000041a0| 09 5f 57 7c 5f 4c 2c 09 | 5f 57 7c 5f 4c 2c 09 5f |._W|_L,.|_W|_L,._|
|000041b0| 57 7c 5f 4c 2c 09 5f 57 | 7c 5f 4c 2c 09 5f 57 7c |W|_L,._W||_L,._W||
|000041c0| 5f 4c 2c 09 5f 57 7c 5f | 4c 2c 09 5f 57 7c 5f 4c |_L,._W|_|L,._W|_L|
|000041d0| 2c 09 5f 57 7c 5f 4c 2c | 0a 58 09 5f 57 7c 5f 4c |,._W|_L,|.X._W|_L|
|000041e0| 2c 09 5f 57 7c 5f 4c 2c | 09 5f 57 7c 5f 4c 2c 09 |,._W|_L,|._W|_L,.|
|000041f0| 5f 57 7c 5f 4c 2c 09 5f | 57 7c 5f 4c 2c 09 5f 57 |_W|_L,._|W|_L,._W|
|00004200| 7c 5f 4c 2c 09 5f 57 7c | 5f 4c 2c 09 5f 57 7c 5f ||_L,._W||_L,._W|_|
|00004210| 4c 2c 0a 58 09 5f 57 7c | 5f 4c 2c 09 5f 57 7c 5f |L,.X._W||_L,._W|_|
|00004220| 4c 2c 09 5f 57 7c 5f 4c | 2c 09 5f 4f 70 7c 5f 50 |L,._W|_L|,._Op|_P|
|00004230| 2c 09 5f 50 2c 09 5f 43 | 6c 7c 5f 50 2c 09 5f 50 |,._P,._C|l|_P,._P|
|00004240| 2c 09 5f 43 09 7d 2c 0a | 58 0a 58 7b 09 5f 43 2c |,._C.},.|X.X{._C,|
|00004250| 09 5f 43 2c 09 5f 43 2c | 09 5f 43 2c 09 5f 43 2c |._C,._C,|._C,._C,|
|00004260| 09 5f 43 2c 09 5f 43 2c | 09 5f 43 2c 0a 58 09 5f |._C,._C,|._C,.X._|
|00004270| 43 2c 09 5f 43 2c 09 5f | 43 2c 09 5f 43 2c 09 5f |C,._C,._|C,._C,._|
|00004280| 43 2c 09 5f 43 2c 09 5f | 43 2c 09 5f 43 2c 0a 58 |C,._C,._|C,._C,.X|
|00004290| 09 5f 43 2c 09 5f 43 2c | 09 5f 43 2c 09 5f 43 2c |._C,._C,|._C,._C,|
|000042a0| 09 5f 43 2c 09 5f 43 2c | 09 5f 43 2c 09 5f 43 2c |._C,._C,|._C,._C,|
|000042b0| 0a 58 09 5f 43 2c 09 5f | 43 2c 09 5f 43 2c 09 5f |.X._C,._|C,._C,._|
|000042c0| 43 2c 09 5f 43 2c 09 5f | 43 2c 09 5f 43 2c 09 5f |C,._C,._|C,._C,._|
|000042d0| 43 2c 0a 58 09 5f 50 2c | 09 5f 50 2c 09 5f 50 2c |C,.X._P,|._P,._P,|
|000042e0| 09 5f 50 2c 09 5f 50 7c | 5f 57 2c 09 5f 50 2c 09 |._P,._P||_W,._P,.|
|000042f0| 5f 50 2c 09 5f 50 2c 0a | 58 09 5f 4f 70 7c 5f 50 |_P,._P,.|X._Op|_P|
|00004300| 2c 09 5f 43 6c 7c 5f 50 | 2c 09 5f 50 2c 09 5f 50 |,._Cl|_P|,._P,._P|
|00004310| 2c 09 5f 50 2c 09 5f 50 | 2c 09 5f 50 2c 09 5f 50 |,._P,._P|,._P,._P|
|00004320| 2c 0a 58 09 5f 57 7c 5f | 4e 2c 09 5f 57 7c 5f 4e |,.X._W|_|N,._W|_N|
|00004330| 2c 09 5f 57 7c 5f 4e 2c | 09 5f 57 7c 5f 4e 2c 09 |,._W|_N,|._W|_N,.|
|00004340| 5f 57 7c 5f 4e 2c 09 5f | 57 7c 5f 4e 2c 09 5f 57 |_W|_N,._|W|_N,._W|
|00004350| 7c 5f 4e 2c 09 5f 57 7c | 5f 4e 2c 0a 58 09 5f 57 ||_N,._W||_N,.X._W|
|00004360| 7c 5f 4e 2c 09 5f 57 7c | 5f 4e 2c 09 5f 50 2c 09 ||_N,._W||_N,._P,.|
|00004370| 5f 50 2c 09 5f 50 2c 09 | 5f 50 2c 09 5f 50 2c 09 |_P,._P,.|_P,._P,.|
|00004380| 5f 50 2c 0a 58 09 5f 50 | 2c 09 5f 57 7c 5f 55 2c |_P,.X._P|,._W|_U,|
|00004390| 09 5f 57 7c 5f 55 2c 09 | 5f 57 7c 5f 55 2c 09 5f |._W|_U,.|_W|_U,._|
|000043a0| 57 7c 5f 55 2c 09 5f 57 | 7c 5f 55 2c 09 5f 57 7c |W|_U,._W||_U,._W||
|000043b0| 5f 55 2c 09 5f 57 7c 5f | 55 2c 0a 58 09 5f 57 7c |_U,._W|_|U,.X._W||
|000043c0| 5f 55 2c 09 5f 57 7c 5f | 55 2c 09 5f 57 7c 5f 55 |_U,._W|_|U,._W|_U|
|000043d0| 2c 09 5f 57 7c 5f 55 2c | 09 5f 57 7c 5f 55 2c 09 |,._W|_U,|._W|_U,.|
|000043e0| 5f 57 7c 5f 55 2c 09 5f | 57 7c 5f 55 2c 09 5f 57 |_W|_U,._|W|_U,._W|
|000043f0| 7c 5f 55 2c 0a 58 09 5f | 57 7c 5f 55 2c 09 5f 57 ||_U,.X._|W|_U,._W|
|00004400| 7c 5f 55 2c 09 5f 57 7c | 5f 55 2c 09 5f 57 7c 5f ||_U,._W||_U,._W|_|
|00004410| 55 2c 09 5f 57 7c 5f 55 | 2c 09 5f 57 7c 5f 55 2c |U,._W|_U|,._W|_U,|
|00004420| 09 5f 57 7c 5f 55 2c 09 | 5f 57 7c 5f 55 2c 0a 58 |._W|_U,.|_W|_U,.X|
|00004430| 09 5f 57 7c 5f 55 2c 09 | 5f 57 7c 5f 55 2c 09 5f |._W|_U,.|_W|_U,._|
|00004440| 57 7c 5f 55 2c 09 5f 4f | 70 7c 5f 50 2c 09 5f 50 |W|_U,._O|p|_P,._P|
|00004450| 2c 09 5f 43 6c 7c 5f 50 | 2c 09 5f 50 2c 09 5f 50 |,._Cl|_P|,._P,._P|
|00004460| 7c 5f 57 2c 0a 58 09 5f | 50 2c 09 5f 57 7c 5f 4c ||_W,.X._|P,._W|_L|
|00004470| 2c 09 5f 57 7c 5f 4c 2c | 09 5f 57 7c 5f 4c 2c 09 |,._W|_L,|._W|_L,.|
|00004480| 5f 57 7c 5f 4c 2c 09 5f | 57 7c 5f 4c 2c 09 5f 57 |_W|_L,._|W|_L,._W|
|00004490| 7c 5f 4c 2c 09 5f 57 7c | 5f 4c 2c 0a 58 09 5f 57 ||_L,._W||_L,.X._W|
|000044a0| 7c 5f 4c 2c 09 5f 57 7c | 5f 4c 2c 09 5f 57 7c 5f ||_L,._W||_L,._W|_|
|000044b0| 4c 2c 09 5f 57 7c 5f 4c | 2c 09 5f 57 7c 5f 4c 2c |L,._W|_L|,._W|_L,|
|000044c0| 09 5f 57 7c 5f 4c 2c 09 | 5f 57 7c 5f 4c 2c 09 5f |._W|_L,.|_W|_L,._|
|000044d0| 57 7c 5f 4c 2c 0a 58 09 | 5f 57 7c 5f 4c 2c 09 5f |W|_L,.X.|_W|_L,._|
|000044e0| 57 7c 5f 4c 2c 09 5f 57 | 7c 5f 4c 2c 09 5f 57 7c |W|_L,._W||_L,._W||
|000044f0| 5f 4c 2c 09 5f 57 7c 5f | 4c 2c 09 5f 57 7c 5f 4c |_L,._W|_|L,._W|_L|
|00004500| 2c 09 5f 57 7c 5f 4c 2c | 09 5f 57 7c 5f 4c 2c 0a |,._W|_L,|._W|_L,.|
|00004510| 58 09 5f 57 7c 5f 4c 2c | 09 5f 57 7c 5f 4c 2c 09 |X._W|_L,|._W|_L,.|
|00004520| 5f 57 7c 5f 4c 2c 09 5f | 4f 70 7c 5f 50 2c 09 5f |_W|_L,._|Op|_P,._|
|00004530| 50 2c 09 5f 43 6c 7c 5f | 50 2c 09 5f 50 2c 09 5f |P,._Cl|_|P,._P,._|
|00004540| 43 09 0a 58 23 69 66 6e | 64 65 66 20 4c 49 53 50 |C..X#ifn|def LISP|
|00004550| 0a 58 7d 0a 58 23 65 6c | 73 65 0a 58 7d 2c 0a 58 |.X}.X#el|se.X},.X|
|00004560| 0a 58 7b 09 5f 43 2c 09 | 5f 43 2c 09 5f 43 2c 09 |.X{._C,.|_C,._C,.|
|00004570| 5f 43 2c 09 5f 43 2c 09 | 5f 43 2c 09 5f 43 2c 09 |_C,._C,.|_C,._C,.|
|00004580| 5f 43 2c 0a 58 09 5f 43 | 2c 09 5f 43 2c 09 5f 43 |_C,.X._C|,._C,._C|
|00004590| 2c 09 5f 43 2c 09 5f 43 | 2c 09 5f 43 2c 09 5f 43 |,._C,._C|,._C,._C|
|000045a0| 2c 09 5f 43 2c 0a 58 09 | 5f 43 2c 09 5f 43 2c 09 |,._C,.X.|_C,._C,.|
|000045b0| 5f 43 2c 09 5f 43 2c 09 | 5f 43 2c 09 5f 43 2c 09 |_C,._C,.|_C,._C,.|
|000045c0| 5f 43 2c 09 5f 43 2c 0a | 58 09 5f 43 2c 09 5f 43 |_C,._C,.|X._C,._C|
|000045d0| 2c 09 5f 43 2c 09 5f 43 | 2c 09 5f 43 2c 09 5f 43 |,._C,._C|,._C,._C|
|000045e0| 2c 09 5f 43 2c 09 5f 43 | 2c 0a 58 09 5f 50 2c 09 |,._C,._C|,.X._P,.|
|000045f0| 5f 57 7c 5f 50 2c 09 5f | 50 2c 09 5f 50 2c 09 5f |_W|_P,._|P,._P,._|
|00004600| 57 7c 5f 50 2c 09 5f 57 | 7c 5f 50 2c 09 5f 57 7c |W|_P,._W||_P,._W||
|00004610| 5f 50 2c 09 5f 50 2c 0a | 58 09 5f 4f 70 7c 5f 50 |_P,._P,.|X._Op|_P|
|00004620| 2c 09 5f 43 6c 7c 5f 50 | 2c 09 5f 57 7c 5f 50 2c |,._Cl|_P|,._W|_P,|
|00004630| 09 5f 57 7c 5f 50 2c 09 | 5f 50 2c 09 5f 57 7c 5f |._W|_P,.|_P,._W|_|
|00004640| 50 2c 09 5f 50 2c 09 5f | 50 2c 0a 58 09 5f 57 7c |P,._P,._|P,.X._W||
|00004650| 5f 4e 2c 09 5f 57 7c 5f | 4e 2c 09 5f 57 7c 5f 4e |_N,._W|_|N,._W|_N|
|00004660| 2c 09 5f 57 7c 5f 4e 2c | 09 5f 57 7c 5f 4e 2c 09 |,._W|_N,|._W|_N,.|
|00004670| 5f 57 7c 5f 4e 2c 09 5f | 57 7c 5f 4e 2c 09 5f 57 |_W|_N,._|W|_N,._W|
|00004680| 7c 5f 4e 2c 0a 58 09 5f | 57 7c 5f 4e 2c 09 5f 57 ||_N,.X._|W|_N,._W|
|00004690| 7c 5f 4e 2c 09 5f 57 7c | 5f 50 2c 09 5f 50 2c 09 ||_N,._W||_P,._P,.|
|000046a0| 5f 57 7c 5f 50 2c 09 5f | 57 7c 5f 50 2c 09 5f 57 |_W|_P,._|W|_P,._W|
|000046b0| 7c 5f 50 2c 09 5f 57 7c | 5f 50 2c 0a 58 09 5f 57 ||_P,._W||_P,.X._W|
|000046c0| 7c 5f 50 2c 09 5f 57 7c | 5f 55 2c 09 5f 57 7c 5f ||_P,._W||_U,._W|_|
|000046d0| 55 2c 09 5f 57 7c 5f 55 | 2c 09 5f 57 7c 5f 55 2c |U,._W|_U|,._W|_U,|
|000046e0| 09 5f 57 7c 5f 55 2c 09 | 5f 57 7c 5f 55 2c 09 5f |._W|_U,.|_W|_U,._|
|000046f0| 57 7c 5f 55 2c 0a 58 09 | 5f 57 7c 5f 55 2c 09 5f |W|_U,.X.|_W|_U,._|
|00004700| 57 7c 5f 55 2c 09 5f 57 | 7c 5f 55 2c 09 5f 57 7c |W|_U,._W||_U,._W||
|00004710| 5f 55 2c 09 5f 57 7c 5f | 55 2c 09 5f 57 7c 5f 55 |_U,._W|_|U,._W|_U|
|00004720| 2c 09 5f 57 7c 5f 55 2c | 09 5f 57 7c 5f 55 2c 0a |,._W|_U,|._W|_U,.|
|00004730| 58 09 5f 57 7c 5f 55 2c | 09 5f 57 7c 5f 55 2c 09 |X._W|_U,|._W|_U,.|
|00004740| 5f 57 7c 5f 55 2c 09 5f | 57 7c 5f 55 2c 09 5f 57 |_W|_U,._|W|_U,._W|
|00004750| 7c 5f 55 2c 09 5f 57 7c | 5f 55 2c 09 5f 57 7c 5f ||_U,._W||_U,._W|_|
|00004760| 55 2c 09 5f 57 7c 5f 55 | 2c 0a 58 09 5f 57 7c 5f |U,._W|_U|,.X._W|_|
|00004770| 55 2c 09 5f 57 7c 5f 55 | 2c 09 5f 57 7c 5f 55 2c |U,._W|_U|,._W|_U,|
|00004780| 09 5f 4f 70 7c 5f 50 2c | 09 5f 50 2c 09 5f 43 6c |._Op|_P,|._P,._Cl|
|00004790| 7c 5f 50 2c 09 5f 57 7c | 5f 50 2c 09 5f 57 7c 5f ||_P,._W||_P,._W|_|
|000047a0| 50 2c 0a 58 09 5f 50 2c | 09 5f 57 7c 5f 4c 2c 09 |P,.X._P,|._W|_L,.|
|000047b0| 5f 57 7c 5f 4c 2c 09 5f | 57 7c 5f 4c 2c 09 5f 57 |_W|_L,._|W|_L,._W|
|000047c0| 7c 5f 4c 2c 09 5f 57 7c | 5f 4c 2c 09 5f 57 7c 5f ||_L,._W||_L,._W|_|
|000047d0| 4c 2c 09 5f 57 7c 5f 4c | 2c 0a 58 09 5f 57 7c 5f |L,._W|_L|,.X._W|_|
|000047e0| 4c 2c 09 5f 57 7c 5f 4c | 2c 09 5f 57 7c 5f 4c 2c |L,._W|_L|,._W|_L,|
|000047f0| 09 5f 57 7c 5f 4c 2c 09 | 5f 57 7c 5f 4c 2c 09 5f |._W|_L,.|_W|_L,._|
|00004800| 57 7c 5f 4c 2c 09 5f 57 | 7c 5f 4c 2c 09 5f 57 7c |W|_L,._W||_L,._W||
|00004810| 5f 4c 2c 0a 58 09 5f 57 | 7c 5f 4c 2c 09 5f 57 7c |_L,.X._W||_L,._W||
|00004820| 5f 4c 2c 09 5f 57 7c 5f | 4c 2c 09 5f 57 7c 5f 4c |_L,._W|_|L,._W|_L|
|00004830| 2c 09 5f 57 7c 5f 4c 2c | 09 5f 57 7c 5f 4c 2c 09 |,._W|_L,|._W|_L,.|
|00004840| 5f 57 7c 5f 4c 2c 09 5f | 57 7c 5f 4c 2c 0a 58 09 |_W|_L,._|W|_L,.X.|
|00004850| 5f 57 7c 5f 4c 2c 09 5f | 57 7c 5f 4c 2c 09 5f 57 |_W|_L,._|W|_L,._W|
|00004860| 7c 5f 4c 2c 09 5f 4f 70 | 7c 5f 57 7c 5f 50 2c 09 ||_L,._Op||_W|_P,.|
|00004870| 5f 57 7c 5f 50 2c 09 5f | 43 6c 7c 5f 57 7c 5f 50 |_W|_P,._|Cl|_W|_P|
|00004880| 2c 09 5f 57 7c 5f 50 2c | 09 5f 57 7c 5f 43 09 7d |,._W|_P,|._W|_C.}|
|00004890| 2c 0a 58 23 65 6e 64 69 | 66 0a 58 7d 3b 0a 58 0a |,.X#endi|f.X};.X.|
|000048a0| 58 69 73 6d 77 6f 72 64 | 28 63 29 0a 58 7b 0a 58 |Xismword|(c).X{.X|
|000048b0| 09 72 65 74 75 72 6e 20 | 28 28 43 68 61 72 54 61 |.return |((CharTa|
|000048c0| 62 6c 65 5b 63 75 72 62 | 75 66 2d 3e 62 5f 6d 61 |ble[curb|uf->b_ma|
|000048d0| 6a 6f 72 5d 29 5b 63 5d | 26 28 5f 57 29 29 3b 0a |jor])[c]|&(_W));.|
|000048e0| 58 7d 0a 40 2f 2f 45 2a | 4f 2a 46 20 63 74 79 70 |X}.@//E*|O*F ctyp|
|000048f0| 65 2e 63 2f 2f 0a 69 66 | 20 74 65 73 74 20 33 37 |e.c//.if| test 37|
|00004900| 30 39 20 2d 6e 65 20 22 | 60 77 63 20 2d 63 20 3c |09 -ne "|`wc -c <|
|00004910| 27 63 74 79 70 65 2e 63 | 27 60 22 3b 20 74 68 65 |'ctype.c|'`"; the|
|00004920| 6e 0a 20 20 20 20 65 63 | 68 6f 20 73 68 61 72 3a |n. ec|ho shar:|
|00004930| 20 65 72 72 6f 72 20 74 | 72 61 6e 73 6d 69 74 74 | error t|ransmitt|
|00004940| 69 6e 67 20 22 27 63 74 | 79 70 65 2e 63 27 22 20 |ing "'ct|ype.c'" |
|00004950| 27 28 73 68 6f 75 6c 64 | 20 68 61 76 65 20 62 65 |'(should| have be|
|00004960| 65 6e 20 33 37 30 39 20 | 63 68 61 72 61 63 74 65 |en 3709 |characte|
|00004970| 72 73 29 27 0a 66 69 0a | 66 69 20 23 20 65 6e 64 |rs)'.fi.|fi # end|
|00004980| 20 6f 66 20 6f 76 65 72 | 77 72 69 74 69 6e 67 20 | of over|writing |
|00004990| 63 68 65 63 6b 0a 65 63 | 68 6f 20 73 68 61 72 3a |check.ec|ho shar:|
|000049a0| 20 65 78 74 72 61 63 74 | 69 6e 67 20 22 27 64 65 | extract|ing "'de|
|000049b0| 6c 65 74 65 2e 63 27 22 | 20 27 28 36 33 39 35 20 |lete.c'"| '(6395 |
|000049c0| 63 68 61 72 61 63 74 65 | 72 73 29 27 0a 69 66 20 |characte|rs)'.if |
|000049d0| 74 65 73 74 20 2d 66 20 | 27 64 65 6c 65 74 65 2e |test -f |'delete.|
|000049e0| 63 27 20 3b 20 74 68 65 | 6e 20 0a 20 20 65 63 68 |c' ; the|n . ech|
|000049f0| 6f 20 73 68 61 72 3a 20 | 77 69 6c 6c 20 6e 6f 74 |o shar: |will not|
|00004a00| 20 6f 76 65 72 2d 77 72 | 69 74 65 20 65 78 69 73 | over-wr|ite exis|
|00004a10| 74 69 6e 67 20 66 69 6c | 65 20 22 27 64 65 6c 65 |ting fil|e "'dele|
|00004a20| 74 65 2e 63 27 22 0a 65 | 6c 73 65 0a 73 65 64 20 |te.c'".e|lse.sed |
|00004a30| 27 73 2f 5e 58 2f 2f 27 | 20 3e 64 65 6c 65 74 65 |'s/^X//'| >delete|
|00004a40| 2e 63 20 3c 3c 27 40 2f | 2f 45 2a 4f 2a 46 20 64 |.c <<'@/|/E*O*F d|
|00004a50| 65 6c 65 74 65 2e 63 2f | 2f 27 0a 58 2f 2a 2a 2a |elete.c/|/'.X/***|
|00004a60| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004a70| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004a80| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004a90| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004aa0| 2a 2a 2a 2a 2a 0a 58 20 | 2a 20 54 68 69 73 20 70 |*****.X |* This p|
|00004ab0| 72 6f 67 72 61 6d 20 69 | 73 20 43 6f 70 79 72 69 |rogram i|s Copyri|
|00004ac0| 67 68 74 20 28 43 29 20 | 31 39 38 36 20 62 79 20 |ght (C) |1986 by |
|00004ad0| 4a 6f 6e 61 74 68 61 6e | 20 50 61 79 6e 65 2e 20 |Jonathan| Payne. |
|00004ae0| 20 4a 4f 56 45 20 69 73 | 20 20 20 20 20 20 20 2a | JOVE is| *|
|00004af0| 0a 58 20 2a 20 70 72 6f | 76 69 64 65 64 20 74 6f |.X * pro|vided to|
|00004b00| 20 79 6f 75 20 77 69 74 | 68 6f 75 74 20 63 68 61 | you wit|hout cha|
|00004b10| 72 67 65 2c 20 61 6e 64 | 20 77 69 74 68 20 6e 6f |rge, and| with no|
|00004b20| 20 77 61 72 72 61 6e 74 | 79 2e 20 20 59 6f 75 20 | warrant|y. You |
|00004b30| 6d 61 79 20 67 69 76 65 | 20 20 2a 0a 58 20 2a 20 |may give| *.X * |
|00004b40| 61 77 61 79 20 63 6f 70 | 69 65 73 20 6f 66 20 4a |away cop|ies of J|
|00004b50| 4f 56 45 2c 20 69 6e 63 | 6c 75 64 69 6e 67 20 73 |OVE, inc|luding s|
|00004b60| 6f 75 72 63 65 73 2c 20 | 70 72 6f 76 69 64 65 64 |ources, |provided|
|00004b70| 20 74 68 61 74 20 74 68 | 69 73 20 6e 6f 74 69 63 | that th|is notic|
|00004b80| 65 20 69 73 20 2a 0a 58 | 20 2a 20 69 6e 63 6c 75 |e is *.X| * inclu|
|00004b90| 64 65 64 20 69 6e 20 61 | 6c 6c 20 74 68 65 20 66 |ded in a|ll the f|
|00004ba0| 69 6c 65 73 2e 20 20 20 | 20 20 20 20 20 20 20 20 |iles. | |
|00004bb0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004bc0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004bd0| 2a 0a 58 20 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |*.X ****|********|
|00004be0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004bf0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004c00| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004c10| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2f 0a 58 0a |********|****/.X.|
|00004c20| 58 2f 2a 20 52 6f 75 74 | 69 6e 65 73 20 74 6f 20 |X/* Rout|ines to |
|00004c30| 70 65 72 66 6f 72 6d 20 | 61 6c 6c 20 6b 69 6e 64 |perform |all kind|
|00004c40| 73 20 6f 66 20 64 65 6c | 65 74 69 6f 6e 2e 20 20 |s of del|etion. |
|00004c50| 2a 2f 0a 58 0a 58 23 69 | 6e 63 6c 75 64 65 20 22 |*/.X.X#i|nclude "|
|00004c60| 6a 6f 76 65 2e 68 22 0a | 58 0a 58 2f 2a 20 41 73 |jove.h".|X.X/* As|
|00004c70| 73 75 6d 65 73 20 74 68 | 61 74 20 65 69 74 68 65 |sumes th|at eithe|
|00004c80| 72 20 6c 69 6e 65 31 20 | 6f 72 20 6c 69 6e 65 32 |r line1 |or line2|
|00004c90| 20 69 73 20 61 63 74 75 | 61 6c 20 74 68 65 20 63 | is actu|al the c|
|00004ca0| 75 72 72 65 6e 74 20 6c | 69 6e 65 2c 20 73 6f 20 |urrent l|ine, so |
|00004cb0| 69 74 20 63 61 6e 0a 58 | 20 20 20 70 75 74 20 69 |it can.X| put i|
|00004cc0| 74 73 20 72 65 73 75 6c | 74 20 69 6e 74 6f 20 6c |ts resul|t into l|
|00004cd0| 69 6e 65 62 75 66 2e 20 | 2a 2f 0a 58 0a 58 70 61 |inebuf. |*/.X.Xpa|
|00004ce0| 74 63 68 75 70 28 6c 69 | 6e 65 31 2c 20 63 68 61 |tchup(li|ne1, cha|
|00004cf0| 72 31 2c 20 6c 69 6e 65 | 32 2c 20 63 68 61 72 32 |r1, line|2, char2|
|00004d00| 29 0a 58 4c 69 6e 65 09 | 2a 6c 69 6e 65 31 2c 0a |).XLine.|*line1,.|
|00004d10| 58 09 2a 6c 69 6e 65 32 | 3b 0a 58 72 65 67 69 73 |X.*line2|;.Xregis|
|00004d20| 74 65 72 20 69 6e 74 09 | 63 68 61 72 31 2c 0a 58 |ter int.|char1,.X|
|00004d30| 09 09 63 68 61 72 32 3b | 0a 58 7b 0a 58 09 69 66 |..char2;|.X{.X.if|
|00004d40| 20 28 6c 69 6e 65 31 20 | 21 3d 20 6c 69 6e 65 32 | (line1 |!= line2|
|00004d50| 29 0a 58 09 09 43 68 6b | 57 69 6e 64 6f 77 73 28 |).X..Chk|Windows(|
|00004d60| 6c 69 6e 65 31 2c 20 6c | 69 6e 65 32 29 3b 0a 58 |line1, l|ine2);.X|
|00004d70| 09 44 6f 74 54 6f 28 6c | 69 6e 65 31 2c 20 63 68 |.DotTo(l|ine1, ch|
|00004d80| 61 72 31 29 3b 0a 58 09 | 6d 6f 64 69 66 79 28 29 |ar1);.X.|modify()|
|00004d90| 3b 0a 58 09 6c 69 6e 65 | 63 6f 70 79 28 6c 69 6e |;.X.line|copy(lin|
|00004da0| 65 62 75 66 2c 20 63 75 | 72 63 68 61 72 2c 20 6c |ebuf, cu|rchar, l|
|00004db0| 63 6f 6e 74 65 6e 74 73 | 28 6c 69 6e 65 32 29 20 |contents|(line2) |
|00004dc0| 2b 20 63 68 61 72 32 29 | 3b 0a 58 0a 58 09 2f 2a |+ char2)|;.X.X./*|
|00004dd0| 20 54 68 65 20 66 6f 6c | 6c 6f 77 69 6e 67 20 69 | The fol|lowing i|
|00004de0| 73 20 61 20 72 65 64 69 | 73 70 6c 61 79 20 6f 70 |s a redi|splay op|
|00004df0| 74 69 6d 69 7a 61 74 69 | 6f 6e 2e 20 2a 2f 0a 58 |timizati|on. */.X|
|00004e00| 09 69 66 20 28 6c 69 6e | 65 31 20 21 3d 20 6c 69 |.if (lin|e1 != li|
|00004e10| 6e 65 32 20 26 26 20 28 | 63 68 61 72 31 20 3d 3d |ne2 && (|char1 ==|
|00004e20| 20 30 20 26 26 20 63 68 | 61 72 32 20 3d 3d 20 30 | 0 && ch|ar2 == 0|
|00004e30| 29 29 0a 58 09 09 6c 69 | 6e 65 31 2d 3e 6c 5f 64 |)).X..li|ne1->l_d|
|00004e40| 6c 69 6e 65 20 3d 20 6c | 69 6e 65 32 2d 3e 6c 5f |line = l|ine2->l_|
|00004e50| 64 6c 69 6e 65 3b 0a 58 | 0a 58 09 44 46 69 78 4d |dline;.X|.X.DFixM|
|00004e60| 61 72 6b 73 28 6c 69 6e | 65 31 2c 20 63 68 61 72 |arks(lin|e1, char|
|00004e70| 31 2c 20 6c 69 6e 65 32 | 2c 20 63 68 61 72 32 29 |1, line2|, char2)|
|00004e80| 3b 0a 58 09 6d 61 6b 65 | 64 69 72 74 79 28 63 75 |;.X.make|dirty(cu|
|00004e90| 72 6c 69 6e 65 29 3b 0a | 58 7d 0a 58 0a 58 2f 2a |rline);.|X}.X.X/*|
|00004ea0| 20 44 65 6c 65 74 65 73 | 20 74 68 65 20 72 65 67 | Deletes| the reg|
|00004eb0| 69 6f 6e 20 62 79 20 75 | 6e 6c 69 6e 6b 69 6e 67 |ion by u|nlinking|
|00004ec0| 20 74 68 65 20 6c 69 6e | 65 73 20 69 6e 20 74 68 | the lin|es in th|
|00004ed0| 65 20 6d 69 64 64 6c 65 | 2c 0a 58 20 20 20 61 6e |e middle|,.X an|
|00004ee0| 64 20 70 61 74 63 68 69 | 6e 67 20 74 68 69 6e 67 |d patchi|ng thing|
|00004ef0| 73 20 75 70 2e 20 20 54 | 68 65 20 75 6e 6c 69 6e |s up. T|he unlin|
|00004f00| 6b 65 64 20 6c 69 6e 65 | 73 20 61 72 65 20 73 74 |ked line|s are st|
|00004f10| 69 6c 6c 20 69 6e 0a 58 | 20 20 20 6f 72 64 65 72 |ill in.X| order|
|00004f20| 2e 20 20 2a 2f 0a 58 0a | 58 4c 69 6e 65 20 2a 0a |. */.X.|XLine *.|
|00004f30| 58 72 65 67 5f 64 65 6c | 65 74 65 28 6c 69 6e 65 |Xreg_del|ete(line|
|00004f40| 31 2c 20 63 68 61 72 31 | 2c 20 6c 69 6e 65 32 2c |1, char1|, line2,|
|00004f50| 20 63 68 61 72 32 29 0a | 58 4c 69 6e 65 09 2a 6c | char2).|XLine.*l|
|00004f60| 69 6e 65 31 2c 0a 58 09 | 2a 6c 69 6e 65 32 3b 0a |ine1,.X.|*line2;.|
|00004f70| 58 7b 0a 58 09 72 65 67 | 69 73 74 65 72 20 4c 69 |X{.X.reg|ister Li|
|00004f80| 6e 65 09 2a 72 65 74 6c | 69 6e 65 3b 0a 58 0a 58 |ne.*retl|ine;.X.X|
|00004f90| 09 69 66 20 28 28 6c 69 | 6e 65 31 20 3d 3d 20 6c |.if ((li|ne1 == l|
|00004fa0| 69 6e 65 32 20 26 26 20 | 63 68 61 72 31 20 3d 3d |ine2 && |char1 ==|
|00004fb0| 20 63 68 61 72 32 29 20 | 7c 7c 20 6c 69 6e 65 32 | char2) ||| line2|
|00004fc0| 20 3d 3d 20 30 29 0a 58 | 09 09 63 6f 6d 70 6c 61 | == 0).X|..compla|
|00004fd0| 69 6e 28 28 63 68 61 72 | 20 2a 29 20 30 29 3b 0a |in((char| *) 0);.|
|00004fe0| 58 09 28 76 6f 69 64 29 | 20 66 69 78 6f 72 64 65 |X.(void)| fixorde|
|00004ff0| 72 28 26 6c 69 6e 65 31 | 2c 20 26 63 68 61 72 31 |r(&line1|, &char1|
|00005000| 2c 20 26 6c 69 6e 65 32 | 2c 20 26 63 68 61 72 32 |, &line2|, &char2|
|00005010| 29 3b 0a 58 0a 58 09 72 | 65 74 6c 69 6e 65 20 3d |);.X.X.r|etline =|
|00005020| 20 6e 62 75 66 6c 69 6e | 65 28 29 3b 09 2f 2a 20 | nbuflin|e();./* |
|00005030| 4e 65 77 20 62 75 66 66 | 65 72 20 6c 69 6e 65 20 |New buff|er line |
|00005040| 2a 2f 0a 58 0a 58 09 28 | 76 6f 69 64 29 20 6c 74 |*/.X.X.(|void) lt|
|00005050| 6f 62 75 66 28 6c 69 6e | 65 31 2c 20 67 65 6e 62 |obuf(lin|e1, genb|
|00005060| 75 66 29 3b 0a 58 09 69 | 66 20 28 6c 69 6e 65 31 |uf);.X.i|f (line1|
|00005070| 20 3d 3d 20 6c 69 6e 65 | 32 29 0a 58 09 09 67 65 | == line|2).X..ge|
|00005080| 6e 62 75 66 5b 63 68 61 | 72 32 5d 20 3d 20 27 5c |nbuf[cha|r2] = '\|
|00005090| 30 27 3b 0a 58 0a 58 09 | 72 65 74 6c 69 6e 65 2d |0';.X.X.|retline-|
|000050a0| 3e 6c 5f 70 72 65 76 20 | 3d 20 30 3b 0a 58 09 72 |>l_prev |= 0;.X.r|
|000050b0| 65 74 6c 69 6e 65 2d 3e | 6c 5f 64 6c 69 6e 65 20 |etline->|l_dline |
|000050c0| 3d 20 70 75 74 6c 69 6e | 65 28 26 67 65 6e 62 75 |= putlin|e(&genbu|
|000050d0| 66 5b 63 68 61 72 31 5d | 29 3b 0a 58 09 70 61 74 |f[char1]|);.X.pat|
|000050e0| 63 68 75 70 28 6c 69 6e | 65 31 2c 20 63 68 61 72 |chup(lin|e1, char|
|000050f0| 31 2c 20 6c 69 6e 65 32 | 2c 20 63 68 61 72 32 29 |1, line2|, char2)|
|00005100| 3b 0a 58 0a 58 09 69 66 | 20 28 6c 69 6e 65 31 20 |;.X.X.if| (line1 |
|00005110| 3d 3d 20 6c 69 6e 65 32 | 29 0a 58 09 09 72 65 74 |== line2|).X..ret|
|00005120| 6c 69 6e 65 2d 3e 6c 5f | 6e 65 78 74 20 3d 20 30 |line->l_|next = 0|
|00005130| 3b 0a 58 09 65 6c 73 65 | 20 7b 0a 58 09 09 72 65 |;.X.else| {.X..re|
|00005140| 74 6c 69 6e 65 2d 3e 6c | 5f 6e 65 78 74 20 3d 20 |tline->l|_next = |
|00005150| 6c 69 6e 65 31 2d 3e 6c | 5f 6e 65 78 74 3b 0a 58 |line1->l|_next;.X|
|00005160| 09 09 28 76 6f 69 64 29 | 20 6c 74 6f 62 75 66 28 |..(void)| ltobuf(|
|00005170| 6c 69 6e 65 32 2c 20 67 | 65 6e 62 75 66 29 3b 0a |line2, g|enbuf);.|
|00005180| 58 09 09 67 65 6e 62 75 | 66 5b 63 68 61 72 32 5d |X..genbu|f[char2]|
|00005190| 20 3d 20 27 5c 30 27 3b | 0a 58 09 09 6c 69 6e 65 | = '\0';|.X..line|
|000051a0| 32 2d 3e 6c 5f 64 6c 69 | 6e 65 20 3d 20 70 75 74 |2->l_dli|ne = put|
|000051b0| 6c 69 6e 65 28 67 65 6e | 62 75 66 29 3b 0a 58 09 |line(gen|buf);.X.|
|000051c0| 09 2f 2a 20 53 68 6f 72 | 74 65 6e 20 74 68 69 73 |./* Shor|ten this|
|000051d0| 20 6c 69 6e 65 20 2a 2f | 0a 58 09 7d 0a 58 0a 58 | line */|.X.}.X.X|
|000051e0| 09 69 66 20 28 6c 69 6e | 65 31 20 21 3d 20 6c 69 |.if (lin|e1 != li|
|000051f0| 6e 65 32 29 20 7b 0a 58 | 09 09 6c 69 6e 65 31 2d |ne2) {.X|..line1-|
|00005200| 3e 6c 5f 6e 65 78 74 20 | 3d 20 6c 69 6e 65 32 2d |>l_next |= line2-|
|00005210| 3e 6c 5f 6e 65 78 74 3b | 0a 58 09 09 69 66 20 28 |>l_next;|.X..if (|
|00005220| 6c 69 6e 65 31 2d 3e 6c | 5f 6e 65 78 74 29 0a 58 |line1->l|_next).X|
|00005230| 09 09 09 6c 69 6e 65 31 | 2d 3e 6c 5f 6e 65 78 74 |...line1|->l_next|
|00005240| 2d 3e 6c 5f 70 72 65 76 | 20 3d 20 6c 69 6e 65 31 |->l_prev| = line1|
|00005250| 3b 0a 58 09 09 65 6c 73 | 65 0a 58 09 09 09 63 75 |;.X..els|e.X...cu|
|00005260| 72 62 75 66 2d 3e 62 5f | 6c 61 73 74 20 3d 20 6c |rbuf->b_|last = l|
|00005270| 69 6e 65 31 3b 0a 58 09 | 09 6c 69 6e 65 32 2d 3e |ine1;.X.|.line2->|
|00005280| 6c 5f 6e 65 78 74 20 3d | 20 30 3b 0a 58 09 7d 0a |l_next =| 0;.X.}.|
|00005290| 58 0a 58 09 72 65 74 75 | 72 6e 20 72 65 74 6c 69 |X.X.retu|rn retli|
|000052a0| 6e 65 3b 0a 58 7d 0a 58 | 0a 58 6c 72 65 6d 6f 76 |ne;.X}.X|.Xlremov|
|000052b0| 65 28 6c 69 6e 65 31 2c | 20 6c 69 6e 65 32 29 0a |e(line1,| line2).|
|000052c0| 58 72 65 67 69 73 74 65 | 72 20 4c 69 6e 65 09 2a |Xregiste|r Line.*|
|000052d0| 6c 69 6e 65 31 2c 0a 58 | 09 09 2a 6c 69 6e 65 32 |line1,.X|..*line2|
|000052e0| 3b 0a 58 7b 0a 58 09 4c | 69 6e 65 09 2a 6e 65 78 |;.X{.X.L|ine.*nex|
|000052f0| 74 20 3d 20 6c 69 6e 65 | 31 2d 3e 6c 5f 6e 65 78 |t = line|1->l_nex|
|00005300| 74 3b 0a 58 0a 58 09 69 | 66 20 28 6c 69 6e 65 31 |t;.X.X.i|f (line1|
|00005310| 20 3d 3d 20 6c 69 6e 65 | 32 29 0a 58 09 09 72 65 | == line|2).X..re|
|00005320| 74 75 72 6e 3b 0a 58 09 | 6c 69 6e 65 31 2d 3e 6c |turn;.X.|line1->l|
|00005330| 5f 6e 65 78 74 20 3d 20 | 6c 69 6e 65 32 2d 3e 6c |_next = |line2->l|
|00005340| 5f 6e 65 78 74 3b 0a 58 | 09 69 66 20 28 6c 69 6e |_next;.X|.if (lin|
|00005350| 65 31 2d 3e 6c 5f 6e 65 | 78 74 29 0a 58 09 09 6c |e1->l_ne|xt).X..l|
|00005360| 69 6e 65 31 2d 3e 6c 5f | 6e 65 78 74 2d 3e 6c 5f |ine1->l_|next->l_|
|00005370| 70 72 65 76 20 3d 20 6c | 69 6e 65 31 3b 0a 58 09 |prev = l|ine1;.X.|
|00005380| 65 6c 73 65 0a 58 09 09 | 63 75 72 62 75 66 2d 3e |else.X..|curbuf->|
|00005390| 62 5f 6c 61 73 74 20 3d | 20 6c 69 6e 65 31 3b 0a |b_last =| line1;.|
|000053a0| 58 09 6c 66 72 65 65 72 | 65 67 28 6e 65 78 74 2c |X.lfreer|eg(next,|
|000053b0| 20 6c 69 6e 65 32 29 3b | 09 2f 2a 20 50 75 74 20 | line2);|./* Put |
|000053c0| 72 65 67 69 6f 6e 20 61 | 74 20 65 6e 64 20 6f 66 |region a|t end of|
|000053d0| 20 66 72 65 65 20 6c 69 | 6e 65 20 6c 69 73 74 2e | free li|ne list.|
|000053e0| 20 2a 2f 0a 58 7d 0a 58 | 0a 58 2f 2a 20 44 65 6c | */.X}.X|.X/* Del|
|000053f0| 65 74 65 20 63 68 61 72 | 61 63 74 65 72 20 66 6f |ete char|acter fo|
|00005400| 72 77 61 72 64 20 2a 2f | 0a 58 0a 58 44 65 6c 4e |rward */|.X.XDelN|
|00005410| 43 68 61 72 28 29 0a 58 | 7b 0a 58 09 64 65 6c 5f |Char().X|{.X.del_|
|00005420| 63 68 61 72 28 31 29 3b | 0a 58 7d 0a 58 0a 58 2f |char(1);|.X}.X.X/|
|00005430| 2a 20 44 65 6c 65 74 65 | 20 63 68 61 72 61 63 74 |* Delete| charact|
|00005440| 65 72 20 62 61 63 6b 77 | 61 72 64 20 2a 2f 0a 58 |er backw|ard */.X|
|00005450| 0a 58 44 65 6c 50 43 68 | 61 72 28 29 0a 58 7b 0a |.XDelPCh|ar().X{.|
|00005460| 58 09 69 66 20 28 4d 69 | 6e 6f 72 4d 6f 64 65 28 |X.if (Mi|norMode(|
|00005470| 4f 76 65 72 57 72 69 74 | 65 29 29 20 7b 0a 58 09 |OverWrit|e)) {.X.|
|00005480| 09 69 6e 74 09 63 6f 75 | 6e 74 20 3d 20 6d 69 6e |.int.cou|nt = min|
|00005490| 28 65 78 70 2c 20 63 75 | 72 63 68 61 72 29 3b 0a |(exp, cu|rchar);.|
|000054a0| 58 0a 58 09 09 44 6f 54 | 69 6d 65 73 28 42 61 63 |X.X..DoT|imes(Bac|
|000054b0| 6b 43 68 61 72 28 29 2c | 20 63 6f 75 6e 74 29 3b |kChar(),| count);|
|000054c0| 0a 58 09 09 4c 61 73 74 | 4b 65 79 53 74 72 75 63 |.X..Last|KeyStruc|
|000054d0| 6b 20 3d 20 27 20 27 3b | 09 2f 2a 20 63 61 6e 20 |k = ' ';|./* can |
|000054e0| 79 6f 75 20 73 61 79 20 | 67 72 6f 73 73 3f 20 2a |you say |gross? *|
|000054f0| 2f 0a 58 09 09 44 6f 54 | 69 6d 65 73 28 53 65 6c |/.X..DoT|imes(Sel|
|00005500| 66 49 6e 73 65 72 74 28 | 29 2c 20 63 6f 75 6e 74 |fInsert(|), count|
|00005510| 29 3b 0a 58 09 09 44 6f | 54 69 6d 65 73 28 42 61 |);.X..Do|Times(Ba|
|00005520| 63 6b 43 68 61 72 28 29 | 2c 20 63 6f 75 6e 74 29 |ckChar()|, count)|
|00005530| 3b 0a 58 09 7d 20 65 6c | 73 65 09 09 0a 58 09 09 |;.X.} el|se...X..|
|00005540| 64 65 6c 5f 63 68 61 72 | 28 30 29 3b 0a 58 7d 0a |del_char|(0);.X}.|
|00005550| 58 0a 58 2f 2a 20 44 65 | 6c 65 74 65 20 73 6f 6d |X.X/* De|lete som|
|00005560| 65 20 63 68 61 72 61 63 | 74 65 72 73 2e 20 20 49 |e charac|ters. I|
|00005570| 66 20 64 65 6c 65 74 69 | 6e 67 20 60 66 6f 72 77 |f deleti|ng `forw|
|00005580| 61 72 64 27 20 74 68 65 | 6e 20 63 61 6c 6c 20 66 |ard' the|n call f|
|00005590| 6f 72 5f 63 68 61 72 0a | 58 20 20 20 74 6f 20 74 |or_char.|X to t|
|000055a0| 68 65 20 66 69 6e 61 6c | 20 70 6f 73 69 74 69 6f |he final| positio|
|000055b0| 6e 20 6f 74 68 65 72 77 | 69 73 65 20 63 61 6c 6c |n otherw|ise call|
|000055c0| 20 62 61 63 6b 5f 63 68 | 61 72 2e 20 20 54 68 65 | back_ch|ar. The|
|000055d0| 6e 20 64 65 6c 65 74 65 | 20 74 68 65 0a 58 20 20 |n delete| the.X |
|000055e0| 20 72 65 67 69 6f 6e 20 | 62 65 74 77 65 65 6e 20 | region |between |
|000055f0| 74 68 65 20 74 77 6f 20 | 77 69 74 68 20 70 61 74 |the two |with pat|
|00005600| 63 68 75 70 28 29 2e 20 | 2a 2f 0a 58 0a 58 64 65 |chup(). |*/.X.Xde|
|00005610| 6c 5f 63 68 61 72 28 66 | 6f 72 77 61 72 64 29 0a |l_char(f|orward).|
|00005620| 58 7b 0a 58 09 42 75 66 | 70 6f 73 09 62 65 66 6f |X{.X.Buf|pos.befo|
|00005630| 72 65 2c 0a 58 09 09 61 | 66 74 65 72 3b 0a 58 09 |re,.X..a|fter;.X.|
|00005640| 69 6e 74 09 6b 69 6c 6c | 70 20 3d 20 28 65 78 70 |int.kill|p = (exp|
|00005650| 5f 70 20 26 26 20 61 62 | 73 28 65 78 70 29 20 3e |_p && ab|s(exp) >|
|00005660| 20 31 29 3b 0a 58 0a 58 | 09 44 4f 54 73 61 76 65 | 1);.X.X|.DOTsave|
|00005670| 28 26 62 65 66 6f 72 65 | 29 3b 0a 58 09 28 66 6f |(&before|);.X.(fo|
|00005680| 72 77 61 72 64 29 20 3f | 20 46 6f 72 43 68 61 72 |rward) ?| ForChar|
|00005690| 28 29 20 3a 20 42 61 63 | 6b 43 68 61 72 28 29 3b |() : Bac|kChar();|
|000056a0| 0a 58 09 69 66 20 28 62 | 65 66 6f 72 65 2e 70 5f |.X.if (b|efore.p_|
|000056b0| 6c 69 6e 65 20 3d 3d 20 | 63 75 72 6c 69 6e 65 20 |line == |curline |
|000056c0| 26 26 20 62 65 66 6f 72 | 65 2e 70 5f 63 68 61 72 |&& befor|e.p_char|
|000056d0| 20 3d 3d 20 63 75 72 63 | 68 61 72 29 0a 58 09 09 | == curc|har).X..|
|000056e0| 63 6f 6d 70 6c 61 69 6e | 28 28 63 68 61 72 20 2a |complain|((char *|
|000056f0| 29 20 30 29 3b 0a 58 09 | 69 66 20 28 6b 69 6c 6c |) 0);.X.|if (kill|
|00005700| 70 29 0a 58 09 09 72 65 | 67 5f 6b 69 6c 6c 28 62 |p).X..re|g_kill(b|
|00005710| 65 66 6f 72 65 2e 70 5f | 6c 69 6e 65 2c 20 62 65 |efore.p_|line, be|
|00005720| 66 6f 72 65 2e 70 5f 63 | 68 61 72 2c 20 31 29 3b |fore.p_c|har, 1);|
|00005730| 0a 58 09 65 6c 73 65 20 | 7b 0a 58 09 09 44 4f 54 |.X.else |{.X..DOT|
|00005740| 73 61 76 65 28 26 61 66 | 74 65 72 29 3b 0a 58 09 |save(&af|ter);.X.|
|00005750| 09 28 76 6f 69 64 29 20 | 66 69 78 6f 72 64 65 72 |.(void) |fixorder|
|00005760| 28 26 62 65 66 6f 72 65 | 2e 70 5f 6c 69 6e 65 2c |(&before|.p_line,|
|00005770| 20 26 62 65 66 6f 72 65 | 2e 70 5f 63 68 61 72 2c | &before|.p_char,|
|00005780| 20 26 61 66 74 65 72 2e | 70 5f 6c 69 6e 65 2c 20 | &after.|p_line, |
|00005790| 26 61 66 74 65 72 2e 70 | 5f 63 68 61 72 29 3b 0a |&after.p|_char);.|
|000057a0| 58 09 09 70 61 74 63 68 | 75 70 28 62 65 66 6f 72 |X..patch|up(befor|
|000057b0| 65 2e 70 5f 6c 69 6e 65 | 2c 20 62 65 66 6f 72 65 |e.p_line|, before|
|000057c0| 2e 70 5f 63 68 61 72 2c | 20 61 66 74 65 72 2e 70 |.p_char,| after.p|
|000057d0| 5f 6c 69 6e 65 2c 20 61 | 66 74 65 72 2e 70 5f 63 |_line, a|fter.p_c|
|000057e0| 68 61 72 29 3b 0a 58 09 | 09 6c 72 65 6d 6f 76 65 |har);.X.|.lremove|
|000057f0| 28 62 65 66 6f 72 65 2e | 70 5f 6c 69 6e 65 2c 20 |(before.|p_line, |
|00005800| 61 66 74 65 72 2e 70 5f | 6c 69 6e 65 29 3b 0a 58 |after.p_|line);.X|
|00005810| 09 7d 0a 58 7d 0a 58 0a | 58 2f 2a 20 54 68 69 73 |.}.X}.X.|X/* This|
|00005820| 20 6b 69 6c 6c 73 20 61 | 20 72 65 67 69 6f 6e 20 | kills a| region |
|00005830| 62 65 74 77 65 65 6e 20 | 70 6f 69 6e 74 2c 20 61 |between |point, a|
|00005840| 6e 64 20 6c 69 6e 65 31 | 2f 63 68 61 72 31 20 61 |nd line1|/char1 a|
|00005850| 6e 64 20 70 75 74 73 20 | 69 74 20 6f 6e 0a 58 20 |nd puts |it on.X |
|00005860| 20 20 74 68 65 20 6b 69 | 6c 6c 2d 72 69 6e 67 2e | the ki|ll-ring.|
|00005870| 20 20 49 66 20 74 68 65 | 20 6c 61 73 74 20 63 6f | If the| last co|
|00005880| 6d 6d 61 6e 64 20 77 61 | 73 20 6f 6e 65 20 6f 66 |mmand wa|s one of|
|00005890| 20 74 68 65 20 6b 69 6c | 6c 20 63 6f 6d 6d 61 6e | the kil|l comman|
|000058a0| 64 73 2c 0a 58 20 20 20 | 74 68 65 20 72 65 67 69 |ds,.X |the regi|
|000058b0| 6f 6e 20 69 73 20 61 70 | 70 65 6e 64 65 64 20 28 |on is ap|pended (|
|000058c0| 70 72 65 70 65 6e 64 65 | 64 20 69 66 20 62 61 63 |prepende|d if bac|
|000058d0| 6b 77 61 72 64 73 29 20 | 74 6f 20 74 68 65 20 6c |kwards) |to the l|
|000058e0| 61 73 74 20 65 6e 74 72 | 79 2e 20 20 2a 2f 0a 58 |ast entr|y. */.X|
|000058f0| 0a 58 69 6e 74 09 6b 69 | 6c 6c 70 74 72 20 3d 20 |.Xint.ki|llptr = |
|00005900| 30 3b 0a 58 4c 69 6e 65 | 09 2a 6b 69 6c 6c 62 75 |0;.XLine|.*killbu|
|00005910| 66 5b 4e 55 4d 4b 49 4c | 4c 53 5d 3b 0a 58 0a 58 |f[NUMKIL|LS];.X.X|
|00005920| 72 65 67 5f 6b 69 6c 6c | 28 6c 69 6e 65 32 2c 20 |reg_kill|(line2, |
|00005930| 63 68 61 72 32 2c 20 64 | 6f 74 5f 6d 6f 76 65 64 |char2, d|ot_moved|
|00005940| 29 0a 58 4c 69 6e 65 09 | 2a 6c 69 6e 65 32 3b 0a |).XLine.|*line2;.|
|00005950| 58 7b 0a 58 09 4c 69 6e | 65 09 2a 6e 6c 2c 0a 58 |X{.X.Lin|e.*nl,.X|
|00005960| 09 09 2a 6c 69 6e 65 31 | 20 3d 20 63 75 72 6c 69 |..*line1| = curli|
|00005970| 6e 65 3b 0a 58 09 69 6e | 74 09 63 68 61 72 31 20 |ne;.X.in|t.char1 |
|00005980| 3d 20 63 75 72 63 68 61 | 72 3b 0a 58 09 69 6e 74 |= curcha|r;.X.int|
|00005990| 09 62 61 63 6b 77 61 72 | 64 73 3b 0a 58 0a 58 09 |.backwar|ds;.X.X.|
|000059a0| 62 61 63 6b 77 61 72 64 | 73 20 3d 20 21 66 69 78 |backward|s = !fix|
|000059b0| 6f 72 64 65 72 28 26 6c | 69 6e 65 31 2c 20 26 63 |order(&l|ine1, &c|
|000059c0| 68 61 72 31 2c 20 26 6c | 69 6e 65 32 2c 20 26 63 |har1, &l|ine2, &c|
|000059d0| 68 61 72 32 29 3b 0a 58 | 09 2f 2a 20 54 68 69 73 |har2);.X|./* This|
|000059e0| 20 69 73 20 61 20 6b 6c | 75 64 67 65 21 20 20 42 | is a kl|udge! B|
|000059f0| 75 74 20 69 74 20 70 6f | 73 73 69 62 6c 65 20 66 |ut it po|ssible f|
|00005a00| 6f 72 20 63 6f 6d 6d 61 | 6e 64 73 20 74 68 61 74 |or comma|nds that|
|00005a10| 20 64 6f 6e 27 74 0a 58 | 09 20 20 20 6b 6e 6f 77 | don't.X|. know|
|00005a20| 20 77 68 69 63 68 20 64 | 69 72 65 63 74 69 6f 6e | which d|irection|
|00005a30| 20 74 68 65 79 20 61 72 | 65 20 64 65 6c 65 74 69 | they ar|e deleti|
|00005a40| 6e 67 20 69 6e 20 28 65 | 2e 67 2e 2c 20 64 65 6c |ng in (e|.g., del|
|00005a50| 65 74 65 0a 58 09 20 20 | 20 70 72 65 76 69 6f 75 |ete.X. | previou|
|00005a60| 73 20 77 6f 72 64 20 63 | 6f 75 6c 64 20 68 61 76 |s word c|ould hav|
|00005a70| 65 20 62 65 65 6e 20 63 | 61 6c 6c 65 64 20 77 69 |e been c|alled wi|
|00005a80| 74 68 20 61 20 6e 65 67 | 61 74 69 76 65 20 61 72 |th a neg|ative ar|
|00005a90| 67 75 6d 65 6e 74 0a 58 | 09 20 20 20 69 6e 20 77 |gument.X|. in w|
|00005aa0| 68 69 63 68 20 63 61 73 | 65 2c 20 69 74 20 77 6f |hich cas|e, it wo|
|00005ab0| 75 6c 64 6e 27 74 20 6b | 6e 6f 77 20 74 68 61 74 |uldn't k|now that|
|00005ac0| 20 69 74 20 72 65 61 6c | 6c 79 20 64 65 6c 65 74 | it real|ly delet|
|00005ad0| 65 64 0a 58 09 20 20 20 | 66 6f 72 77 61 72 64 2e |ed.X. |forward.|
|00005ae0| 20 2a 2f 0a 58 0a 58 09 | 69 66 20 28 21 64 6f 74 | */.X.X.|if (!dot|
|00005af0| 5f 6d 6f 76 65 64 29 0a | 58 09 09 62 61 63 6b 77 |_moved).|X..backw|
|00005b00| 61 72 64 73 20 3d 20 21 | 62 61 63 6b 77 61 72 64 |ards = !|backward|
|00005b10| 73 3b 0a 58 0a 58 09 44 | 6f 74 54 6f 28 6c 69 6e |s;.X.X.D|otTo(lin|
|00005b20| 65 31 2c 20 63 68 61 72 | 31 29 3b 0a 58 0a 58 09 |e1, char|1);.X.X.|
|00005b30| 6e 6c 20 3d 20 72 65 67 | 5f 64 65 6c 65 74 65 28 |nl = reg|_delete(|
|00005b40| 6c 69 6e 65 31 2c 20 63 | 68 61 72 31 2c 20 6c 69 |line1, c|har1, li|
|00005b50| 6e 65 32 2c 20 63 68 61 | 72 32 29 3b 0a 58 0a 58 |ne2, cha|r2);.X.X|
|00005b60| 09 69 66 20 28 6c 61 73 | 74 5f 63 6d 64 20 21 3d |.if (las|t_cmd !=|
|00005b70| 20 4b 49 4c 4c 43 4d 44 | 29 20 7b 0a 58 09 09 6b | KILLCMD|) {.X..k|
|00005b80| 69 6c 6c 70 74 72 20 3d | 20 28 28 6b 69 6c 6c 70 |illptr =| ((killp|
|00005b90| 74 72 20 2b 20 31 29 20 | 25 20 4e 55 4d 4b 49 4c |tr + 1) |% NUMKIL|
|00005ba0| 4c 53 29 3b 0a 58 09 09 | 6c 66 72 65 65 6c 69 73 |LS);.X..|lfreelis|
|00005bb0| 74 28 6b 69 6c 6c 62 75 | 66 5b 6b 69 6c 6c 70 74 |t(killbu|f[killpt|
|00005bc0| 72 5d 29 3b 0a 58 09 09 | 6b 69 6c 6c 62 75 66 5b |r]);.X..|killbuf[|
|00005bd0| 6b 69 6c 6c 70 74 72 5d | 20 3d 20 6e 6c 3b 0a 58 |killptr]| = nl;.X|
|00005be0| 09 7d 20 65 6c 73 65 20 | 7b 0a 58 09 09 4c 69 6e |.} else |{.X..Lin|
|00005bf0| 65 09 2a 6c 61 73 74 6c | 6e 20 3d 20 6c 61 73 74 |e.*lastl|n = last|
|00005c00| 6c 69 6e 65 28 6e 6c 29 | 3b 0a 58 0a 58 09 09 69 |line(nl)|;.X.X..i|
|00005c10| 66 20 28 62 61 63 6b 77 | 61 72 64 73 29 0a 58 09 |f (backw|ards).X.|
|00005c20| 09 09 28 76 6f 69 64 29 | 20 44 6f 59 61 6e 6b 28 |..(void)| DoYank(|
|00005c30| 6e 6c 2c 20 30 2c 20 6c | 61 73 74 6c 6e 2c 20 6c |nl, 0, l|astln, l|
|00005c40| 65 6e 67 74 68 28 6c 61 | 73 74 6c 6e 29 2c 20 6b |ength(la|stln), k|
|00005c50| 69 6c 6c 62 75 66 5b 6b | 69 6c 6c 70 74 72 5d 2c |illbuf[k|illptr],|
|00005c60| 20 30 2c 20 28 42 75 66 | 66 65 72 20 2a 29 20 30 | 0, (Buf|fer *) 0|
|00005c70| 29 3b 0a 58 09 09 65 6c | 73 65 20 7b 0a 58 09 09 |);.X..el|se {.X..|
|00005c80| 09 4c 69 6e 65 09 2a 6f | 6c 61 73 74 6c 6e 20 3d |.Line.*o|lastln =|
|00005c90| 20 6c 61 73 74 6c 69 6e | 65 28 6b 69 6c 6c 62 75 | lastlin|e(killbu|
|00005ca0| 66 5b 6b 69 6c 6c 70 74 | 72 5d 29 3b 0a 58 0a 58 |f[killpt|r]);.X.X|
|00005cb0| 09 09 09 28 76 6f 69 64 | 29 20 44 6f 59 61 6e 6b |...(void|) DoYank|
|00005cc0| 28 6e 6c 2c 20 30 2c 20 | 6c 61 73 74 6c 6e 2c 20 |(nl, 0, |lastln, |
|00005cd0| 6c 65 6e 67 74 68 28 6c | 61 73 74 6c 6e 29 2c 20 |length(l|astln), |
|00005ce0| 6f 6c 61 73 74 6c 6e 2c | 20 6c 65 6e 67 74 68 28 |olastln,| length(|
|00005cf0| 6f 6c 61 73 74 6c 6e 29 | 2c 20 28 42 75 66 66 65 |olastln)|, (Buffe|
|00005d00| 72 20 2a 29 20 30 29 3b | 0a 58 09 09 7d 0a 58 09 |r *) 0);|.X..}.X.|
|00005d10| 7d 0a 58 09 74 68 69 73 | 5f 63 6d 64 20 3d 20 4b |}.X.this|_cmd = K|
|00005d20| 49 4c 4c 43 4d 44 3b 0a | 58 7d 0a 58 0a 58 44 65 |ILLCMD;.|X}.X.XDe|
|00005d30| 6c 52 65 67 28 29 0a 58 | 7b 0a 58 09 72 65 67 69 |lReg().X|{.X.regi|
|00005d40| 73 74 65 72 20 4d 61 72 | 6b 09 2a 6d 70 20 3d 20 |ster Mar|k.*mp = |
|00005d50| 43 75 72 4d 61 72 6b 28 | 29 3b 0a 58 0a 58 09 72 |CurMark(|);.X.X.r|
|00005d60| 65 67 5f 6b 69 6c 6c 28 | 6d 70 2d 3e 6d 5f 6c 69 |eg_kill(|mp->m_li|
|00005d70| 6e 65 2c 20 6d 70 2d 3e | 6d 5f 63 68 61 72 2c 20 |ne, mp->|m_char, |
|00005d80| 30 29 3b 0a 58 7d 0a 58 | 0a 58 2f 2a 20 53 61 76 |0);.X}.X|.X/* Sav|
|00005d90| 65 20 61 20 72 65 67 69 | 6f 6e 2e 20 20 41 20 70 |e a regi|on. A p|
|00005da0| 72 65 74 65 6e 64 20 6b | 69 6c 6c 2e 20 2a 2f 0a |retend k|ill. */.|
|00005db0| 58 0a 58 43 6f 70 79 52 | 65 67 69 6f 6e 28 29 0a |X.XCopyR|egion().|
|00005dc0| 58 7b 0a 58 09 72 65 67 | 69 73 74 65 72 20 4c 69 |X{.X.reg|ister Li|
|00005dd0| 6e 65 09 2a 6e 6c 3b 0a | 58 09 72 65 67 69 73 74 |ne.*nl;.|X.regist|
|00005de0| 65 72 20 4d 61 72 6b 09 | 2a 6d 70 3b 0a 58 09 72 |er Mark.|*mp;.X.r|
|00005df0| 65 67 69 73 74 65 72 20 | 69 6e 74 09 73 74 61 74 |egister |int.stat|
|00005e00| 75 73 3b 0a 58 0a 58 09 | 6d 70 20 3d 20 43 75 72 |us;.X.X.|mp = Cur|
|00005e10| 4d 61 72 6b 28 29 3b 0a | 58 09 69 66 20 28 6d 70 |Mark();.|X.if (mp|
|00005e20| 2d 3e 6d 5f 6c 69 6e 65 | 20 3d 3d 20 63 75 72 6c |->m_line| == curl|
|00005e30| 69 6e 65 20 26 26 20 6d | 70 2d 3e 6d 5f 63 68 61 |ine && m|p->m_cha|
|00005e40| 72 20 3d 3d 20 63 75 72 | 63 68 61 72 29 0a 58 09 |r == cur|char).X.|
|00005e50| 09 63 6f 6d 70 6c 61 69 | 6e 28 28 63 68 61 72 20 |.complai|n((char |
|00005e60| 2a 29 20 30 29 3b 0a 58 | 0a 58 09 6b 69 6c 6c 70 |*) 0);.X|.X.killp|
|00005e70| 74 72 20 3d 20 28 28 6b | 69 6c 6c 70 74 72 20 2b |tr = ((k|illptr +|
|00005e80| 20 31 29 20 25 20 4e 55 | 4d 4b 49 4c 4c 53 29 3b | 1) % NU|MKILLS);|
|00005e90| 0a 58 09 69 66 20 28 6b | 69 6c 6c 62 75 66 5b 6b |.X.if (k|illbuf[k|
|00005ea0| 69 6c 6c 70 74 72 5d 29 | 0a 58 09 09 6c 66 72 65 |illptr])|.X..lfre|
|00005eb0| 65 6c 69 73 74 28 6b 69 | 6c 6c 62 75 66 5b 6b 69 |elist(ki|llbuf[ki|
|00005ec0| 6c 6c 70 74 72 5d 29 3b | 0a 58 09 6e 6c 20 3d 20 |llptr]);|.X.nl = |
|00005ed0| 6b 69 6c 6c 62 75 66 5b | 6b 69 6c 6c 70 74 72 5d |killbuf[|killptr]|
|00005ee0| 20 3d 20 6e 62 75 66 6c | 69 6e 65 28 29 3b 0a 58 | = nbufl|ine();.X|
|00005ef0| 09 53 61 76 4c 69 6e 65 | 28 6e 6c 2c 20 4e 75 6c |.SavLine|(nl, Nul|
|00005f00| 6c 53 74 72 29 3b 0a 58 | 09 6e 6c 2d 3e 6c 5f 6e |lStr);.X|.nl->l_n|
|00005f10| 65 78 74 20 3d 20 6e 6c | 2d 3e 6c 5f 70 72 65 76 |ext = nl|->l_prev|
|00005f20| 20 3d 20 30 3b 0a 58 0a | 58 09 73 74 61 74 75 73 | = 0;.X.|X.status|
|00005f30| 20 3d 20 69 6e 6f 72 64 | 65 72 28 6d 70 2d 3e 6d | = inord|er(mp->m|
|00005f40| 5f 6c 69 6e 65 2c 20 6d | 70 2d 3e 6d 5f 63 68 61 |_line, m|p->m_cha|
|00005f50| 72 2c 20 63 75 72 6c 69 | 6e 65 2c 20 63 75 72 63 |r, curli|ne, curc|
|00005f60| 68 61 72 29 3b 0a 58 09 | 69 66 20 28 73 74 61 74 |har);.X.|if (stat|
|00005f70| 75 73 20 3d 3d 20 2d 31 | 29 0a 58 09 09 72 65 74 |us == -1|).X..ret|
|00005f80| 75 72 6e 3b 0a 58 0a 58 | 09 69 66 20 28 73 74 61 |urn;.X.X|.if (sta|
|00005f90| 74 75 73 29 0a 58 09 09 | 28 76 6f 69 64 29 20 44 |tus).X..|(void) D|
|00005fa0| 6f 59 61 6e 6b 28 6d 70 | 2d 3e 6d 5f 6c 69 6e 65 |oYank(mp|->m_line|
|00005fb0| 2c 20 6d 70 2d 3e 6d 5f | 63 68 61 72 2c 20 63 75 |, mp->m_|char, cu|
|00005fc0| 72 6c 69 6e 65 2c 20 63 | 75 72 63 68 61 72 2c 0a |rline, c|urchar,.|
|00005fd0| 58 09 09 09 09 6e 6c 2c | 20 30 2c 20 28 42 75 66 |X....nl,| 0, (Buf|
|00005fe0| 66 65 72 20 2a 29 20 30 | 29 3b 0a 58 09 65 6c 73 |fer *) 0|);.X.els|
|00005ff0| 65 0a 58 09 09 28 76 6f | 69 64 29 20 44 6f 59 61 |e.X..(vo|id) DoYa|
|00006000| 6e 6b 28 63 75 72 6c 69 | 6e 65 2c 20 63 75 72 63 |nk(curli|ne, curc|
|00006010| 68 61 72 2c 20 6d 70 2d | 3e 6d 5f 6c 69 6e 65 2c |har, mp-|>m_line,|
|00006020| 20 6d 70 2d 3e 6d 5f 63 | 68 61 72 2c 0a 58 09 09 | mp->m_c|har,.X..|
|00006030| 09 09 6e 6c 2c 20 30 2c | 20 28 42 75 66 66 65 72 |..nl, 0,| (Buffer|
|00006040| 20 2a 29 20 30 29 3b 0a | 58 7d 0a 58 0a 58 44 65 | *) 0);.|X}.X.XDe|
|00006050| 6c 57 74 53 70 61 63 65 | 28 29 0a 58 7b 0a 58 09 |lWtSpace|().X{.X.|
|00006060| 72 65 67 69 73 74 65 72 | 20 63 68 61 72 09 2a 65 |register| char.*e|
|00006070| 70 20 3d 20 26 6c 69 6e | 65 62 75 66 5b 63 75 72 |p = &lin|ebuf[cur|
|00006080| 63 68 61 72 5d 2c 0a 58 | 09 09 09 2a 73 70 20 3d |char],.X|...*sp =|
|00006090| 20 26 6c 69 6e 65 62 75 | 66 5b 63 75 72 63 68 61 | &linebu|f[curcha|
|000060a0| 72 5d 3b 0a 58 0a 58 09 | 77 68 69 6c 65 20 28 2a |r];.X.X.|while (*|
|000060b0| 65 70 20 3d 3d 20 27 20 | 27 20 7c 7c 20 2a 65 70 |ep == ' |' || *ep|
|000060c0| 20 3d 3d 20 27 5c 74 27 | 29 0a 58 09 09 65 70 2b | == '\t'|).X..ep+|
|000060d0| 2b 3b 0a 58 09 77 68 69 | 6c 65 20 28 73 70 20 3e |+;.X.whi|le (sp >|
|000060e0| 20 6c 69 6e 65 62 75 66 | 20 26 26 20 2a 28 73 70 | linebuf| && *(sp|
|000060f0| 20 2d 20 31 29 20 3d 3d | 20 27 20 27 20 7c 7c 20 | - 1) ==| ' ' || |
|00006100| 2a 28 73 70 20 2d 20 31 | 29 20 3d 3d 20 27 5c 74 |*(sp - 1|) == '\t|
|00006110| 27 29 0a 58 09 09 73 70 | 2d 2d 3b 0a 58 09 69 66 |').X..sp|--;.X.if|
|00006120| 20 28 73 70 20 21 3d 20 | 65 70 29 20 7b 0a 58 09 | (sp != |ep) {.X.|
|00006130| 09 63 75 72 63 68 61 72 | 20 3d 20 73 70 20 2d 20 |.curchar| = sp - |
|00006140| 6c 69 6e 65 62 75 66 3b | 0a 58 09 09 44 46 69 78 |linebuf;|.X..DFix|
|00006150| 4d 61 72 6b 73 28 63 75 | 72 6c 69 6e 65 2c 20 63 |Marks(cu|rline, c|
|00006160| 75 72 63 68 61 72 2c 20 | 63 75 72 6c 69 6e 65 2c |urchar, |curline,|
|00006170| 20 63 75 72 63 68 61 72 | 20 2b 20 28 65 70 20 2d | curchar| + (ep -|
|00006180| 20 73 70 29 29 3b 0a 58 | 09 09 73 74 72 63 70 79 | sp));.X|..strcpy|
|00006190| 28 73 70 2c 20 65 70 29 | 3b 0a 58 09 09 6d 61 6b |(sp, ep)|;.X..mak|
|000061a0| 65 64 69 72 74 79 28 63 | 75 72 6c 69 6e 65 29 3b |edirty(c|urline);|
|000061b0| 0a 58 09 09 6d 6f 64 69 | 66 79 28 29 3b 0a 58 09 |.X..modi|fy();.X.|
|000061c0| 7d 0a 58 7d 0a 58 0a 58 | 44 65 6c 42 6c 6e 6b 4c |}.X}.X.X|DelBlnkL|
|000061d0| 69 6e 65 73 28 29 0a 58 | 7b 0a 58 09 72 65 67 69 |ines().X|{.X.regi|
|000061e0| 73 74 65 72 20 4d 61 72 | 6b 09 2a 64 6f 74 3b 0a |ster Mar|k.*dot;.|
|000061f0| 58 09 69 6e 74 09 61 6c | 6c 3b 0a 58 0a 58 09 65 |X.int.al|l;.X.X.e|
|00006200| 78 70 20 3d 20 31 3b 0a | 58 09 69 66 20 28 21 62 |xp = 1;.|X.if (!b|
|00006210| 6c 6e 6b 70 28 26 6c 69 | 6e 65 62 75 66 5b 63 75 |lnkp(&li|nebuf[cu|
|00006220| 72 63 68 61 72 5d 29 29 | 0a 58 09 09 72 65 74 75 |rchar]))|.X..retu|
|00006230| 72 6e 3b 0a 58 09 64 6f | 74 20 3d 20 4d 61 6b 65 |rn;.X.do|t = Make|
|00006240| 4d 61 72 6b 28 63 75 72 | 6c 69 6e 65 2c 20 63 75 |Mark(cur|line, cu|
|00006250| 72 63 68 61 72 2c 20 46 | 4c 4f 41 54 45 52 29 3b |rchar, F|LOATER);|
|00006260| 0a 58 09 61 6c 6c 20 3d | 20 21 62 6c 6e 6b 70 28 |.X.all =| !blnkp(|
|00006270| 6c 69 6e 65 62 75 66 29 | 3b 0a 58 09 77 68 69 6c |linebuf)|;.X.whil|
|00006280| 65 20 28 62 6c 6e 6b 70 | 28 6c 69 6e 65 62 75 66 |e (blnkp|(linebuf|
|00006290| 29 20 26 26 20 63 75 72 | 6c 69 6e 65 2d 3e 6c 5f |) && cur|line->l_|
|000062a0| 70 72 65 76 29 0a 58 09 | 09 53 65 74 4c 69 6e 65 |prev).X.|.SetLine|
|000062b0| 28 63 75 72 6c 69 6e 65 | 2d 3e 6c 5f 70 72 65 76 |(curline|->l_prev|
|000062c0| 29 3b 0a 58 09 61 6c 6c | 20 7c 3d 20 28 66 69 72 |);.X.all| |= (fir|
|000062d0| 73 74 70 28 63 75 72 6c | 69 6e 65 29 29 3b 0a 58 |stp(curl|ine));.X|
|000062e0| 09 45 6f 6c 28 29 3b 0a | 58 09 44 65 6c 57 74 53 |.Eol();.|X.DelWtS|
|000062f0| 70 61 63 65 28 29 3b 0a | 58 09 6c 69 6e 65 5f 6d |pace();.|X.line_m|
|00006300| 6f 76 65 28 46 4f 52 57 | 41 52 44 2c 20 4e 4f 29 |ove(FORW|ARD, NO)|
|00006310| 3b 0a 58 09 77 68 69 6c | 65 20 28 62 6c 6e 6b 70 |;.X.whil|e (blnkp|
|00006320| 28 6c 69 6e 65 62 75 66 | 29 20 26 26 20 21 65 6f |(linebuf|) && !eo|
|00006330| 62 70 28 29 29 20 7b 0a | 58 09 09 44 65 6c 57 74 |bp()) {.|X..DelWt|
|00006340| 53 70 61 63 65 28 29 3b | 0a 58 09 09 44 65 6c 4e |Space();|.X..DelN|
|00006350| 43 68 61 72 28 29 3b 0a | 58 09 7d 0a 58 09 69 66 |Char();.|X.}.X.if|
|00006360| 20 28 21 61 6c 6c 20 26 | 26 20 21 65 6f 62 70 28 | (!all &|& !eobp(|
|00006370| 29 29 0a 58 09 09 4f 70 | 65 6e 4c 69 6e 65 28 29 |)).X..Op|enLine()|
|00006380| 3b 0a 58 09 54 6f 4d 61 | 72 6b 28 64 6f 74 29 3b |;.X.ToMa|rk(dot);|
|00006390| 0a 58 09 44 65 6c 4d 61 | 72 6b 28 64 6f 74 29 3b |.X.DelMa|rk(dot);|
|000063a0| 0a 58 7d 0a 58 0a 58 44 | 65 6c 4e 57 6f 72 64 28 |.X}.X.XD|elNWord(|
|000063b0| 29 0a 58 7b 0a 58 09 64 | 77 6f 72 64 28 31 29 3b |).X{.X.d|word(1);|
|000063c0| 0a 58 7d 0a 58 0a 58 44 | 65 6c 50 57 6f 72 64 28 |.X}.X.XD|elPWord(|
|000063d0| 29 0a 58 7b 0a 58 09 64 | 77 6f 72 64 28 30 29 3b |).X{.X.d|word(0);|
|000063e0| 0a 58 7d 0a 58 0a 58 64 | 77 6f 72 64 28 66 6f 72 |.X}.X.Xd|word(for|
|000063f0| 77 61 72 64 29 0a 58 7b | 0a 58 09 42 75 66 70 6f |ward).X{|.X.Bufpo|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.