home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: SHell self-extracting ARchive
(archive/shar).
You can browse this item here: nstrings.bsd
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 46 72 6f 6d 20 64 65 63 | 77 72 6c 21 75 63 62 76 |From dec|wrl!ucbv|
|00000010| 61 78 21 74 75 74 2e 63 | 69 73 2e 6f 68 69 6f 2d |ax!tut.c|is.ohio-|
|00000020| 73 74 61 74 65 2e 65 64 | 75 21 63 73 2e 75 74 65 |state.ed|u!cs.ute|
|00000030| 78 61 73 2e 65 64 75 21 | 75 75 6e 65 74 21 61 6c |xas.edu!|uunet!al|
|00000040| 6c 62 65 72 79 20 53 75 | 6e 20 4a 75 6e 20 20 34 |lbery Su|n Jun 4|
|00000050| 20 31 34 3a 34 34 3a 33 | 36 20 50 44 54 20 31 39 | 14:44:3|6 PDT 19|
|00000060| 38 39 0a 41 72 74 69 63 | 6c 65 20 39 30 31 20 6f |89.Artic|le 901 o|
|00000070| 66 20 63 6f 6d 70 2e 73 | 6f 75 72 63 65 73 2e 6d |f comp.s|ources.m|
|00000080| 69 73 63 3a 0a 50 61 74 | 68 3a 20 64 65 63 77 72 |isc:.Pat|h: decwr|
|00000090| 6c 21 75 63 62 76 61 78 | 21 74 75 74 2e 63 69 73 |l!ucbvax|!tut.cis|
|000000a0| 2e 6f 68 69 6f 2d 73 74 | 61 74 65 2e 65 64 75 21 |.ohio-st|ate.edu!|
|000000b0| 63 73 2e 75 74 65 78 61 | 73 2e 65 64 75 21 75 75 |cs.utexa|s.edu!uu|
|000000c0| 6e 65 74 21 61 6c 6c 62 | 65 72 79 0a 46 72 6f 6d |net!allb|ery.From|
|000000d0| 3a 20 61 6c 6c 62 65 72 | 79 40 75 75 6e 65 74 2e |: allber|y@uunet.|
|000000e0| 55 55 2e 4e 45 54 20 28 | 42 72 61 6e 64 6f 6e 20 |UU.NET (|Brandon |
|000000f0| 53 2e 20 41 6c 6c 62 65 | 72 79 20 2d 20 63 6f 6d |S. Allbe|ry - com|
|00000100| 70 2e 73 6f 75 72 63 65 | 73 2e 6d 69 73 63 29 0a |p.source|s.misc).|
|00000110| 4e 65 77 73 67 72 6f 75 | 70 73 3a 20 63 6f 6d 70 |Newsgrou|ps: comp|
|00000120| 2e 73 6f 75 72 63 65 73 | 2e 6d 69 73 63 0a 53 75 |.sources|.misc.Su|
|00000130| 62 6a 65 63 74 3a 20 76 | 30 37 69 30 31 32 3a 20 |bject: v|07i012: |
|00000140| 53 6f 75 72 63 65 20 6f | 66 20 73 74 72 69 6e 67 |Source o|f string|
|00000150| 73 2c 20 61 20 72 65 70 | 6c 61 63 65 6d 65 6e 74 |s, a rep|lacement|
|00000160| 20 66 6f 72 20 74 68 65 | 20 42 53 44 20 63 6f 6d | for the| BSD com|
|00000170| 6d 61 6e 64 20 6f 66 20 | 74 68 65 20 73 61 6d 65 |mand of |the same|
|00000180| 20 6e 61 6d 65 2e 0a 4d | 65 73 73 61 67 65 2d 49 | name..M|essage-I|
|00000190| 44 3a 20 3c 35 36 37 31 | 38 40 75 75 6e 65 74 2e |D: <5671|8@uunet.|
|000001a0| 55 55 2e 4e 45 54 3e 0a | 44 61 74 65 3a 20 34 20 |UU.NET>.|Date: 4 |
|000001b0| 4a 75 6e 20 38 39 20 30 | 31 3a 34 35 3a 32 35 20 |Jun 89 0|1:45:25 |
|000001c0| 47 4d 54 0a 53 65 6e 64 | 65 72 3a 20 61 6c 6c 62 |GMT.Send|er: allb|
|000001d0| 65 72 79 40 75 75 6e 65 | 74 2e 55 55 2e 4e 45 54 |ery@uune|t.UU.NET|
|000001e0| 0a 52 65 70 6c 79 2d 54 | 6f 3a 20 67 72 65 69 6d |.Reply-T|o: greim|
|000001f0| 40 73 62 73 76 61 78 2e | 69 6e 66 6f 72 6d 61 74 |@sbsvax.|informat|
|00000200| 69 6b 2e 75 6e 69 2d 73 | 61 61 72 6c 61 6e 64 2e |ik.uni-s|aarland.|
|00000210| 64 62 70 2e 64 65 20 28 | 4d 69 63 68 61 65 6c 20 |dbp.de (|Michael |
|00000220| 47 72 65 69 6d 29 0a 4c | 69 6e 65 73 3a 20 31 38 |Greim).L|ines: 18|
|00000230| 33 33 0a 41 70 70 72 6f | 76 65 64 3a 20 61 6c 6c |33.Appro|ved: all|
|00000240| 62 65 72 79 40 75 75 6e | 65 74 2e 55 55 2e 4e 45 |bery@uun|et.UU.NE|
|00000250| 54 20 28 42 72 61 6e 64 | 6f 6e 20 53 2e 20 41 6c |T (Brand|on S. Al|
|00000260| 6c 62 65 72 79 20 2d 20 | 63 6f 6d 70 2e 73 6f 75 |lbery - |comp.sou|
|00000270| 72 63 65 73 2e 6d 69 73 | 63 29 0a 0a 50 6f 73 74 |rces.mis|c)..Post|
|00000280| 69 6e 67 2d 6e 75 6d 62 | 65 72 3a 20 56 6f 6c 75 |ing-numb|er: Volu|
|00000290| 6d 65 20 37 2c 20 49 73 | 73 75 65 20 31 32 0a 53 |me 7, Is|sue 12.S|
|000002a0| 75 62 6d 69 74 74 65 64 | 2d 62 79 3a 20 67 72 65 |ubmitted|-by: gre|
|000002b0| 69 6d 40 73 62 73 76 61 | 78 2e 69 6e 66 6f 72 6d |im@sbsva|x.inform|
|000002c0| 61 74 69 6b 2e 75 6e 69 | 2d 73 61 61 72 6c 61 6e |atik.uni|-saarlan|
|000002d0| 64 2e 64 62 70 2e 64 65 | 20 28 4d 69 63 68 61 65 |d.dbp.de| (Michae|
|000002e0| 6c 20 47 72 65 69 6d 29 | 0a 41 72 63 68 69 76 65 |l Greim)|.Archive|
|000002f0| 2d 6e 61 6d 65 3a 20 6e | 73 74 72 69 6e 67 73 2e |-name: n|strings.|
|00000300| 62 73 64 0a 0a 5b 41 6e | 79 6f 6e 65 20 77 61 6e |bsd..[An|yone wan|
|00000310| 74 20 74 6f 20 76 6f 6c | 75 6e 74 65 65 72 20 74 |t to vol|unteer t|
|00000320| 6f 20 63 6f 6e 76 65 72 | 74 20 74 68 69 73 20 66 |o conver|t this f|
|00000330| 6f 72 20 43 4f 46 46 3f | 20 20 2b 2b 62 73 61 5d |or COFF?| ++bsa]|
|00000340| 0a 0a 48 65 72 65 20 69 | 73 20 73 74 72 69 6e 67 |..Here i|s string|
|00000350| 73 2c 20 61 20 72 65 70 | 6c 61 63 65 6d 65 6e 74 |s, a rep|lacement|
|00000360| 20 66 6f 72 20 74 68 65 | 20 42 53 44 20 70 72 6f | for the| BSD pro|
|00000370| 67 72 61 6d 20 6f 66 20 | 74 68 65 20 73 61 6d 65 |gram of |the same|
|00000380| 20 6e 61 6d 65 2c 0a 66 | 6f 72 20 64 69 73 74 72 | name,.f|or distr|
|00000390| 69 62 75 74 69 6f 6e 20 | 69 6e 20 63 6f 6d 70 2e |ibution |in comp.|
|000003a0| 73 6f 75 72 63 65 73 2e | 6d 69 73 63 2e 0a 0a 49 |sources.|misc...I|
|000003b0| 20 77 72 6f 74 65 20 74 | 68 69 73 20 62 65 63 61 | wrote t|his beca|
|000003c0| 75 73 65 20 49 20 62 65 | 63 61 6d 65 20 61 6e 6e |use I be|came ann|
|000003d0| 6f 79 65 64 20 62 79 20 | 0a 2d 20 6f 6c 64 20 73 |oyed by |.- old s|
|000003e0| 74 72 69 6e 67 73 20 69 | 73 20 73 6c 6f 77 0a 2d |trings i|s slow.-|
|000003f0| 20 6f 6c 64 20 73 74 72 | 69 6e 67 73 20 69 73 20 | old str|ings is |
|00000400| 6e 6f 74 20 63 6f 72 72 | 65 63 74 2e 20 49 74 20 |not corr|ect. It |
|00000410| 74 68 69 6e 6b 73 20 5e | 4c 20 61 6e 64 20 73 6f |thinks ^|L and so|
|00000420| 6d 65 74 69 6d 65 73 20 | 65 76 65 6e 20 30 78 38 |metimes |even 0x8|
|00000430| 30 20 74 6f 20 62 65 0a | 20 20 70 72 69 6e 74 61 |0 to be.| printa|
|00000440| 62 6c 65 2e 20 28 53 65 | 65 20 52 45 41 44 4d 45 |ble. (Se|e README|
|00000450| 20 66 6f 72 20 6d 6f 72 | 65 20 64 65 74 61 69 6c | for mor|e detail|
|00000460| 73 29 0a 5b 41 6d 65 6e | 20 74 6f 20 74 68 61 74 |s).[Amen| to that|
|00000470| 21 20 20 2b 2b 62 73 61 | 5d 0a 2d 20 6f 6c 64 20 |! ++bsa|].- old |
|00000480| 73 74 72 69 6e 67 73 20 | 68 61 73 20 74 72 6f 75 |strings |has trou|
|00000490| 62 6c 65 20 77 69 74 68 | 20 74 68 65 20 73 65 67 |ble with| the seg|
|000004a0| 6d 65 6e 74 20 6f 66 20 | 69 6e 69 74 69 61 6c 69 |ment of |initiali|
|000004b0| 7a 65 64 20 64 61 74 61 | 20 6f 6e 20 73 6f 6d 65 |zed data| on some|
|000004c0| 0a 20 20 73 79 73 74 65 | 6d 73 0a 2d 20 6f 6e 20 |. syste|ms.- on |
|000004d0| 73 6f 6d 65 20 73 79 73 | 74 65 6d 73 20 74 68 65 |some sys|tems the|
|000004e0| 72 65 20 69 73 20 73 74 | 72 69 6e 67 73 2c 20 6f |re is st|rings, o|
|000004f0| 6e 20 73 6f 6d 65 20 74 | 68 65 72 65 20 69 73 6e |n some t|here isn|
|00000500| 27 74 0a 0a 49 74 20 69 | 73 20 6e 6f 74 20 6f 6e |'t..It i|s not on|
|00000510| 6c 79 20 66 6f 72 20 55 | 4e 49 58 20 73 79 73 74 |ly for U|NIX syst|
|00000520| 65 6d 73 2c 20 62 75 74 | 20 49 20 68 61 76 65 20 |ems, but| I have |
|00000530| 6f 6e 6c 79 20 74 72 69 | 65 64 20 69 74 20 6f 6e |only tri|ed it on|
|00000540| 20 55 4e 49 58 20 61 6e | 64 0a 56 4d 53 20 73 6f | UNIX an|d.VMS so|
|00000550| 20 66 61 72 2e 0a 0a 41 | 62 73 6f 72 62 2c 20 61 | far...A|bsorb, a|
|00000560| 70 70 6c 79 20 61 6e 64 | 20 65 6e 6a 6f 79 2c 0a |pply and| enjoy,.|
|00000570| 09 2d 6d 67 0a 0a 2d 2d | 0a 4d 69 63 68 61 65 6c |.-mg..--|.Michael|
|00000580| 20 47 72 65 69 6d 20 20 | 20 20 45 6d 61 69 6c 20 | Greim | Email |
|00000590| 3a 20 67 72 65 69 6d 40 | 73 62 73 76 61 78 2e 69 |: greim@|sbsvax.i|
|000005a0| 6e 66 6f 72 6d 61 74 69 | 6b 2e 75 6e 69 2d 73 61 |nformati|k.uni-sa|
|000005b0| 61 72 6c 61 6e 64 2e 64 | 62 70 2e 64 65 0a 20 20 |arland.d|bp.de. |
|000005c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 6f | | o|
|000005d0| 72 20 20 20 20 3a 20 2e | 2e 2e 21 75 75 6e 65 74 |r : .|..!uunet|
|000005e0| 21 75 6e 69 64 6f 21 73 | 62 73 76 61 78 21 67 72 |!unido!s|bsvax!gr|
|000005f0| 65 69 6d 0a 0a 23 21 20 | 2f 62 69 6e 2f 73 68 0a |eim..#! |/bin/sh.|
|00000600| 23 20 54 68 69 73 20 69 | 73 20 61 20 73 68 65 6c |# This i|s a shel|
|00000610| 6c 20 61 72 63 68 69 76 | 65 2e 20 20 52 65 6d 6f |l archiv|e. Remo|
|00000620| 76 65 20 61 6e 79 74 68 | 69 6e 67 20 62 65 66 6f |ve anyth|ing befo|
|00000630| 72 65 20 74 68 69 73 20 | 6c 69 6e 65 2c 20 74 68 |re this |line, th|
|00000640| 65 6e 20 75 6e 70 61 63 | 6b 0a 23 20 69 74 20 62 |en unpac|k.# it b|
|00000650| 79 20 73 61 76 69 6e 67 | 20 69 74 20 69 6e 74 6f |y saving| it into|
|00000660| 20 61 20 66 69 6c 65 20 | 61 6e 64 20 74 79 70 69 | a file |and typi|
|00000670| 6e 67 20 22 73 68 20 66 | 69 6c 65 22 2e 20 20 54 |ng "sh f|ile". T|
|00000680| 6f 20 6f 76 65 72 77 72 | 69 74 65 20 65 78 69 73 |o overwr|ite exis|
|00000690| 74 69 6e 67 0a 23 20 66 | 69 6c 65 73 2c 20 74 79 |ting.# f|iles, ty|
|000006a0| 70 65 20 22 73 68 20 66 | 69 6c 65 20 2d 63 22 2e |pe "sh f|ile -c".|
|000006b0| 20 20 59 6f 75 20 63 61 | 6e 20 61 6c 73 6f 20 66 | You ca|n also f|
|000006c0| 65 65 64 20 74 68 69 73 | 20 61 73 20 73 74 61 6e |eed this| as stan|
|000006d0| 64 61 72 64 20 69 6e 70 | 75 74 20 76 69 61 0a 23 |dard inp|ut via.#|
|000006e0| 20 75 6e 73 68 61 72 2c | 20 6f 72 20 62 79 20 74 | unshar,| or by t|
|000006f0| 79 70 69 6e 67 20 22 73 | 68 20 3c 66 69 6c 65 22 |yping "s|h <file"|
|00000700| 2c 20 65 2e 67 2e 2e 20 | 20 49 66 20 74 68 69 73 |, e.g.. | If this|
|00000710| 20 61 72 63 68 69 76 65 | 20 69 73 20 63 6f 6d 70 | archive| is comp|
|00000720| 6c 65 74 65 2c 20 79 6f | 75 0a 23 20 77 69 6c 6c |lete, yo|u.# will|
|00000730| 20 73 65 65 20 74 68 65 | 20 66 6f 6c 6c 6f 77 69 | see the| followi|
|00000740| 6e 67 20 6d 65 73 73 61 | 67 65 20 61 74 20 74 68 |ng messa|ge at th|
|00000750| 65 20 65 6e 64 3a 0a 23 | 09 09 22 45 6e 64 20 6f |e end:.#|.."End o|
|00000760| 66 20 61 72 63 68 69 76 | 65 20 31 20 28 6f 66 20 |f archiv|e 1 (of |
|00000770| 31 29 2e 22 0a 23 20 43 | 6f 6e 74 65 6e 74 73 3a |1).".# C|ontents:|
|00000780| 20 20 43 4f 50 59 49 4e | 47 20 4d 41 4e 49 46 45 | COPYIN|G MANIFE|
|00000790| 53 54 20 4d 61 6b 65 66 | 69 6c 65 20 52 45 41 44 |ST Makef|ile READ|
|000007a0| 4d 45 20 63 6f 6e 66 69 | 67 2e 68 20 6c 69 6d 69 |ME confi|g.h limi|
|000007b0| 74 73 2e 63 0a 23 20 20 | 20 6f 75 74 70 75 74 2e |ts.c.# | output.|
|000007c0| 63 20 73 74 72 69 6e 67 | 73 2e 31 20 73 74 72 69 |c string|s.1 stri|
|000007d0| 6e 67 73 2e 63 20 73 74 | 72 69 6e 67 73 2e 68 20 |ngs.c st|rings.h |
|000007e0| 73 74 72 69 6e 67 73 2e | 74 78 74 20 74 65 73 74 |strings.|txt test|
|000007f0| 5f 69 6e 70 75 74 0a 23 | 20 20 20 74 75 6e 65 2e |_input.#| tune.|
|00000800| 68 0a 23 20 57 72 61 70 | 70 65 64 20 62 79 20 67 |h.# Wrap|ped by g|
|00000810| 72 65 69 6d 40 73 62 73 | 76 61 78 20 6f 6e 20 54 |reim@sbs|vax on T|
|00000820| 75 65 20 4d 61 79 20 32 | 33 20 31 38 3a 31 33 3a |ue May 2|3 18:13:|
|00000830| 31 35 20 31 39 38 39 0a | 50 41 54 48 3d 2f 62 69 |15 1989.|PATH=/bi|
|00000840| 6e 3a 2f 75 73 72 2f 62 | 69 6e 3a 2f 75 73 72 2f |n:/usr/b|in:/usr/|
|00000850| 75 63 62 20 3b 20 65 78 | 70 6f 72 74 20 50 41 54 |ucb ; ex|port PAT|
|00000860| 48 0a 69 66 20 74 65 73 | 74 20 2d 66 20 27 43 4f |H.if tes|t -f 'CO|
|00000870| 50 59 49 4e 47 27 20 2d | 61 20 22 24 7b 31 7d 22 |PYING' -|a "${1}"|
|00000880| 20 21 3d 20 22 2d 63 22 | 20 3b 20 74 68 65 6e 20 | != "-c"| ; then |
|00000890| 0a 20 20 65 63 68 6f 20 | 73 68 61 72 3a 20 57 69 |. echo |shar: Wi|
|000008a0| 6c 6c 20 6e 6f 74 20 63 | 6c 6f 62 62 65 72 20 65 |ll not c|lobber e|
|000008b0| 78 69 73 74 69 6e 67 20 | 66 69 6c 65 20 5c 22 27 |xisting |file \"'|
|000008c0| 43 4f 50 59 49 4e 47 27 | 5c 22 0a 65 6c 73 65 0a |COPYING'|\".else.|
|000008d0| 65 63 68 6f 20 73 68 61 | 72 3a 20 45 78 74 72 61 |echo sha|r: Extra|
|000008e0| 63 74 69 6e 67 20 5c 22 | 27 43 4f 50 59 49 4e 47 |cting \"|'COPYING|
|000008f0| 27 5c 22 20 5c 28 31 32 | 36 38 20 63 68 61 72 61 |'\" \(12|68 chara|
|00000900| 63 74 65 72 73 5c 29 0a | 73 65 64 20 22 73 2f 5e |cters\).|sed "s/^|
|00000910| 58 2f 2f 22 20 3e 27 43 | 4f 50 59 49 4e 47 27 20 |X//" >'C|OPYING' |
|00000920| 3c 3c 27 45 4e 44 5f 4f | 46 5f 46 49 4c 45 27 0a |<<'END_O|F_FILE'.|
|00000930| 58 0a 58 09 73 74 72 69 | 6e 67 73 0a 58 0a 58 09 |X.X.stri|ngs.X.X.|
|00000940| 28 43 29 20 43 6f 70 79 | 72 69 67 68 74 20 62 79 |(C) Copy|right by|
|00000950| 20 4d 69 63 68 61 65 6c | 20 47 72 65 69 6d 2c 20 | Michael| Greim, |
|00000960| 35 2f 32 33 2f 38 39 0a | 58 0a 58 2d 2d 2d 2d 2d |5/23/89.|X.X-----|
|00000970| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000980| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000990| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000009a0| 2d 2d 2d 2d 2d 2d 2d 2d | 0a 58 0a 58 54 68 65 20 |--------|.X.XThe |
|000009b0| 61 75 74 68 6f 72 2c 20 | 4d 69 63 68 61 65 6c 20 |author, |Michael |
|000009c0| 47 72 65 69 6d 2c 20 61 | 6c 6c 6f 77 73 20 61 6e |Greim, a|llows an|
|000009d0| 79 6f 6e 65 20 74 6f 20 | 64 6f 20 61 6e 79 74 68 |yone to |do anyth|
|000009e0| 69 6e 67 20 68 65 2f 73 | 68 65 2f 69 74 20 77 61 |ing he/s|he/it wa|
|000009f0| 6e 74 73 20 77 69 74 68 | 0a 58 22 73 74 72 69 6e |nts with|.X"strin|
|00000a00| 67 73 22 2c 20 70 72 6f | 76 69 64 65 64 20 74 68 |gs", pro|vided th|
|00000a10| 65 20 66 6f 6c 6c 6f 77 | 69 6e 67 20 63 6f 6e 64 |e follow|ing cond|
|00000a20| 69 74 69 6f 6e 73 20 61 | 72 65 20 6d 65 74 3a 0a |itions a|re met:.|
|00000a30| 58 0a 58 2d 20 74 68 65 | 20 70 72 6f 67 72 61 6d |X.X- the| program|
|00000a40| 20 6d 61 79 20 6e 6f 74 | 20 62 65 20 73 6f 6c 64 | may not| be sold|
|00000a50| 20 77 69 74 68 6f 75 74 | 20 74 68 65 20 61 75 74 | without| the aut|
|00000a60| 68 6f 72 73 20 77 72 69 | 74 74 65 6e 20 70 65 72 |hors wri|tten per|
|00000a70| 6d 69 73 73 69 6f 6e 0a | 58 2d 20 74 68 69 73 20 |mission.|X- this |
|00000a80| 6e 6f 74 69 63 65 20 73 | 74 61 79 73 20 69 6e 20 |notice s|tays in |
|00000a90| 70 6c 61 63 65 0a 58 2d | 20 61 6e 79 20 63 68 61 |place.X-| any cha|
|00000aa0| 6e 67 65 73 20 74 6f 20 | 74 68 65 20 6f 72 69 67 |nges to |the orig|
|00000ab0| 69 6e 61 6c 20 61 72 65 | 20 6d 61 72 6b 65 64 20 |inal are| marked |
|00000ac0| 61 73 20 73 75 63 68 0a | 58 0a 58 0a 58 54 68 65 |as such.|X.X.XThe|
|00000ad0| 20 61 75 74 68 6f 72 20 | 65 78 70 6c 69 63 69 74 | author |explicit|
|00000ae0| 6c 79 20 61 73 6b 73 20 | 61 6e 79 62 6f 64 79 20 |ly asks |anybody |
|00000af0| 3a 0a 58 0a 58 2d 20 74 | 6f 20 70 6f 72 74 20 74 |:.X.X- t|o port t|
|00000b00| 68 69 73 20 70 72 6f 67 | 72 61 6d 20 74 6f 20 61 |his prog|ram to a|
|00000b10| 73 20 6d 75 63 68 20 63 | 6f 6d 70 75 74 65 72 20 |s much c|omputer |
|00000b20| 73 79 73 74 65 6d 73 20 | 61 73 20 70 6f 73 73 69 |systems |as possi|
|00000b30| 62 6c 65 20 61 6e 64 20 | 73 65 6e 64 0a 58 20 20 |ble and |send.X |
|00000b40| 68 69 6d 20 63 6f 6d 70 | 6c 61 69 6e 74 73 2c 20 |him comp|laints, |
|00000b50| 72 65 73 75 6c 74 73 2c | 20 62 75 67 20 66 69 78 |results,| bug fix|
|00000b60| 65 73 2c 20 70 72 61 69 | 73 65 20 2e 2e 2e 0a 58 |es, prai|se ....X|
|00000b70| 2d 20 74 6f 20 69 6e 63 | 6f 72 70 6f 72 61 74 65 |- to inc|orporate|
|00000b80| 20 74 68 69 73 20 70 72 | 6f 67 72 61 6d 20 69 6e | this pr|ogram in|
|00000b90| 20 61 6e 79 20 70 61 63 | 6b 61 67 65 20 6f 66 20 | any pac|kage of |
|00000ba0| 50 75 62 6c 69 63 20 44 | 6f 6d 61 69 6e 20 70 72 |Public D|omain pr|
|00000bb0| 6f 67 72 61 6d 73 20 66 | 6f 72 0a 58 20 20 66 72 |ograms f|or.X fr|
|00000bc0| 65 65 20 64 69 73 74 72 | 69 62 75 74 69 6f 6e 20 |ee distr|ibution |
|00000bd0| 28 47 4e 55 20 77 6f 75 | 6c 64 20 62 65 20 77 65 |(GNU wou|ld be we|
|00000be0| 6c 63 6f 6d 65 29 0a 58 | 0a 58 0a 58 54 68 65 72 |lcome).X|.X.XTher|
|00000bf0| 65 20 69 73 20 6e 6f 20 | 77 61 72 72 61 6e 74 79 |e is no |warranty|
|00000c00| 20 6f 66 20 6d 65 72 63 | 68 61 6e 74 61 62 69 6c | of merc|hantabil|
|00000c10| 69 74 79 20 6e 6f 72 20 | 61 6e 79 20 77 61 72 72 |ity nor |any warr|
|00000c20| 61 6e 74 79 20 6f 66 20 | 66 69 74 6e 65 73 73 20 |anty of |fitness |
|00000c30| 66 6f 72 20 61 0a 58 70 | 61 72 74 69 63 75 6c 61 |for a.Xp|articula|
|00000c40| 72 20 70 75 72 70 6f 73 | 65 20 6e 6f 72 20 61 6e |r purpos|e nor an|
|00000c50| 79 20 6f 74 68 65 72 20 | 77 61 72 72 61 6e 74 79 |y other |warranty|
|00000c60| 2c 20 65 69 74 68 65 72 | 20 65 78 70 72 65 73 73 |, either| express|
|00000c70| 20 6f 72 20 69 6d 70 6c | 69 65 64 2c 20 61 73 0a | or impl|ied, as.|
|00000c80| 58 74 6f 20 74 68 65 20 | 61 63 63 75 72 61 63 79 |Xto the |accuracy|
|00000c90| 20 6f 66 20 74 68 65 20 | 68 65 72 65 77 69 74 68 | of the |herewith|
|00000ca0| 20 70 75 62 6c 69 73 68 | 65 64 20 70 72 6f 67 72 | publish|ed progr|
|00000cb0| 61 6d 2c 20 6f 72 20 61 | 73 20 74 6f 20 69 74 73 |am, or a|s to its|
|00000cc0| 0a 58 73 75 69 74 61 62 | 69 6c 69 74 79 20 66 6f |.Xsuitab|ility fo|
|00000cd0| 72 20 61 6e 79 20 70 61 | 72 74 69 63 75 6c 61 72 |r any pa|rticular|
|00000ce0| 20 70 75 72 70 6f 73 65 | 2e 0a 58 41 63 63 6f 72 | purpose|..XAccor|
|00000cf0| 64 69 6e 67 6c 79 2c 20 | 49 2c 20 4d 69 63 68 61 |dingly, |I, Micha|
|00000d00| 65 6c 20 47 72 65 69 6d | 2c 20 61 73 73 75 6d 65 |el Greim|, assume|
|00000d10| 20 6e 6f 20 72 65 73 70 | 6f 6e 73 69 62 69 6c 69 | no resp|onsibili|
|00000d20| 74 79 0a 58 66 6f 72 20 | 69 74 73 20 75 73 65 20 |ty.Xfor |its use |
|00000d30| 62 79 20 74 68 65 20 72 | 65 63 69 70 69 65 6e 74 |by the r|ecipient|
|00000d40| 2e 20 46 75 72 74 68 65 | 72 2c 20 49 2c 20 4d 69 |. Furthe|r, I, Mi|
|00000d50| 63 68 61 65 6c 20 47 72 | 65 69 6d 2c 20 61 73 73 |chael Gr|eim, ass|
|00000d60| 75 6d 65 20 6e 6f 0a 58 | 6f 62 6c 69 67 61 74 69 |ume no.X|obligati|
|00000d70| 6f 6e 20 74 6f 20 66 75 | 72 6e 69 73 68 20 61 6e |on to fu|rnish an|
|00000d80| 79 20 61 73 73 69 73 74 | 61 6e 63 65 20 6f 66 20 |y assist|ance of |
|00000d90| 61 6e 79 20 6b 69 6e 64 | 20 77 68 61 74 73 6f 65 |any kind| whatsoe|
|00000da0| 76 65 72 2c 0a 58 6f 72 | 20 74 6f 20 66 75 72 6e |ver,.Xor| to furn|
|00000db0| 69 73 68 20 61 6e 79 20 | 61 64 64 69 74 69 6f 6e |ish any |addition|
|00000dc0| 61 6c 20 69 6e 66 6f 72 | 6d 61 74 69 6f 6e 20 6f |al infor|mation o|
|00000dd0| 72 20 64 6f 63 75 6d 65 | 6e 74 61 74 69 6f 6e 2e |r docume|ntation.|
|00000de0| 0a 58 0a 58 28 42 75 74 | 20 69 66 20 79 6f 75 20 |.X.X(But| if you |
|00000df0| 61 73 6b 20 6d 65 20 6e | 69 63 65 2c 20 49 20 6d |ask me n|ice, I m|
|00000e00| 69 67 68 74 20 63 6f 6e | 73 69 64 65 72 20 74 6f |ight con|sider to|
|00000e10| 20 74 68 69 6e 6b 20 61 | 62 6f 75 74 20 73 74 61 | think a|bout sta|
|00000e20| 72 74 69 6e 67 20 74 6f | 0a 58 20 73 70 65 63 75 |rting to|.X specu|
|00000e30| 6c 61 74 65 20 61 62 6f | 75 74 20 69 74 20 2e 2e |late abo|ut it ..|
|00000e40| 2e 20 3a 2d 29 0a 45 4e | 44 5f 4f 46 5f 46 49 4c |. :-).EN|D_OF_FIL|
|00000e50| 45 0a 69 66 20 74 65 73 | 74 20 31 32 36 38 20 2d |E.if tes|t 1268 -|
|00000e60| 6e 65 20 60 77 63 20 2d | 63 20 3c 27 43 4f 50 59 |ne `wc -|c <'COPY|
|00000e70| 49 4e 47 27 60 3b 20 74 | 68 65 6e 0a 20 20 20 20 |ING'`; t|hen. |
|00000e80| 65 63 68 6f 20 73 68 61 | 72 3a 20 5c 22 27 43 4f |echo sha|r: \"'CO|
|00000e90| 50 59 49 4e 47 27 5c 22 | 20 75 6e 70 61 63 6b 65 |PYING'\"| unpacke|
|00000ea0| 64 20 77 69 74 68 20 77 | 72 6f 6e 67 20 73 69 7a |d with w|rong siz|
|00000eb0| 65 21 0a 66 69 0a 23 20 | 65 6e 64 20 6f 66 20 27 |e!.fi.# |end of '|
|00000ec0| 43 4f 50 59 49 4e 47 27 | 0a 66 69 0a 69 66 20 74 |COPYING'|.fi.if t|
|00000ed0| 65 73 74 20 2d 66 20 27 | 4d 41 4e 49 46 45 53 54 |est -f '|MANIFEST|
|00000ee0| 27 20 2d 61 20 22 24 7b | 31 7d 22 20 21 3d 20 22 |' -a "${|1}" != "|
|00000ef0| 2d 63 22 20 3b 20 74 68 | 65 6e 20 0a 20 20 65 63 |-c" ; th|en . ec|
|00000f00| 68 6f 20 73 68 61 72 3a | 20 57 69 6c 6c 20 6e 6f |ho shar:| Will no|
|00000f10| 74 20 63 6c 6f 62 62 65 | 72 20 65 78 69 73 74 69 |t clobbe|r existi|
|00000f20| 6e 67 20 66 69 6c 65 20 | 5c 22 27 4d 41 4e 49 46 |ng file |\"'MANIF|
|00000f30| 45 53 54 27 5c 22 0a 65 | 6c 73 65 0a 65 63 68 6f |EST'\".e|lse.echo|
|00000f40| 20 73 68 61 72 3a 20 45 | 78 74 72 61 63 74 69 6e | shar: E|xtractin|
|00000f50| 67 20 5c 22 27 4d 41 4e | 49 46 45 53 54 27 5c 22 |g \"'MAN|IFEST'\"|
|00000f60| 20 5c 28 38 33 30 20 63 | 68 61 72 61 63 74 65 72 | \(830 c|haracter|
|00000f70| 73 5c 29 0a 73 65 64 20 | 22 73 2f 5e 58 2f 2f 22 |s\).sed |"s/^X//"|
|00000f80| 20 3e 27 4d 41 4e 49 46 | 45 53 54 27 20 3c 3c 27 | >'MANIF|EST' <<'|
|00000f90| 45 4e 44 5f 4f 46 5f 46 | 49 4c 45 27 0a 58 20 20 |END_OF_F|ILE'.X |
|00000fa0| 20 46 69 6c 65 20 4e 61 | 6d 65 09 09 41 72 63 68 | File Na|me..Arch|
|00000fb0| 69 76 65 20 23 09 44 65 | 73 63 72 69 70 74 69 6f |ive #.De|scriptio|
|00000fc0| 6e 0a 58 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |n.X-----|--------|
|00000fd0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000fe0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000ff0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 0a 58 |--------|------.X|
|00001000| 20 43 4f 50 59 49 4e 47 | 20 20 20 20 20 20 20 20 | COPYING| |
|00001010| 20 20 20 20 20 20 20 20 | 20 20 20 20 31 09 43 6f | | 1.Co|
|00001020| 70 79 72 69 67 68 74 20 | 4e 6f 74 69 63 65 2e 0a |pyright |Notice..|
|00001030| 58 20 4d 41 4e 49 46 45 | 53 54 20 20 20 20 20 20 |X MANIFE|ST |
|00001040| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 31 09 54 | | 1.T|
|00001050| 68 69 73 20 73 68 69 70 | 70 69 6e 67 20 6c 69 73 |his ship|ping lis|
|00001060| 74 0a 58 20 4d 61 6b 65 | 66 69 6c 65 20 20 20 20 |t.X Make|file |
|00001070| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 31 | | 1|
|00001080| 09 0a 58 20 52 45 41 44 | 4d 45 20 20 20 20 20 20 |..X READ|ME |
|00001090| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 31 | | 1|
|000010a0| 09 57 68 61 74 20 69 73 | 20 73 74 72 69 6e 67 73 |.What is| strings|
|000010b0| 20 3f 20 48 6f 77 20 74 | 6f 20 70 6f 72 74 20 69 | ? How t|o port i|
|000010c0| 74 2e 20 0a 58 20 63 6f | 6e 66 69 67 2e 68 20 20 |t. .X co|nfig.h |
|000010d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000010e0| 20 31 09 44 65 66 61 75 | 6c 74 20 70 61 72 61 6d | 1.Defau|lt param|
|000010f0| 65 74 65 72 73 20 66 6f | 72 20 64 69 66 66 65 72 |eters fo|r differ|
|00001100| 65 6e 74 20 6d 61 63 68 | 69 6e 65 73 2e 0a 58 20 |ent mach|ines..X |
|00001110| 6c 69 6d 69 74 73 2e 63 | 20 20 20 20 20 20 20 20 |limits.c| |
|00001120| 20 20 20 20 20 20 20 20 | 20 20 20 31 09 47 65 74 | | 1.Get|
|00001130| 20 6c 69 6d 69 74 73 20 | 6f 66 20 69 6e 69 74 69 | limits |of initi|
|00001140| 61 6c 69 7a 65 64 20 64 | 61 74 61 20 73 65 67 6d |alized d|ata segm|
|00001150| 65 6e 74 2e 0a 58 20 6f | 75 74 70 75 74 2e 63 20 |ent..X o|utput.c |
|00001160| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001170| 20 20 31 09 4f 75 74 70 | 75 74 20 72 6f 75 74 69 | 1.Outp|ut routi|
|00001180| 6e 65 73 2e 0a 58 20 73 | 74 72 69 6e 67 73 2e 31 |nes..X s|trings.1|
|00001190| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000011a0| 20 20 31 09 4d 61 6e 75 | 61 6c 20 65 6e 74 72 79 | 1.Manu|al entry|
|000011b0| 2e 0a 58 20 73 74 72 69 | 6e 67 73 2e 63 20 20 20 |..X stri|ngs.c |
|000011c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 31 | | 1|
|000011d0| 09 4d 61 69 6e 20 70 61 | 72 74 20 6f 66 20 70 72 |.Main pa|rt of pr|
|000011e0| 6f 67 72 61 6d 2e 0a 58 | 20 73 74 72 69 6e 67 73 |ogram..X| strings|
|000011f0| 2e 68 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |.h | |
|00001200| 20 20 20 20 31 09 0a 58 | 20 73 74 72 69 6e 67 73 | 1..X| strings|
|00001210| 2e 74 78 74 20 20 20 20 | 20 20 20 20 20 20 20 20 |.txt | |
|00001220| 20 20 20 20 31 09 4d 61 | 6e 75 61 6c 20 65 6e 74 | 1.Ma|nual ent|
|00001230| 72 79 20 61 73 20 70 6c | 61 69 6e 20 74 65 78 74 |ry as pl|ain text|
|00001240| 20 66 69 6c 65 2e 0a 58 | 20 74 65 73 74 5f 69 6e | file..X| test_in|
|00001250| 70 75 74 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |put | |
|00001260| 20 20 20 20 31 09 73 61 | 6d 70 6c 65 20 28 62 74 | 1.sa|mple (bt|
|00001270| 6f 61 27 64 29 20 66 69 | 6c 65 20 74 6f 20 64 65 |oa'd) fi|le to de|
|00001280| 6d 6f 6e 73 74 72 61 74 | 65 20 65 72 72 6f 72 73 |monstrat|e errors|
|00001290| 20 6f 66 20 6f 6c 64 20 | 22 73 74 72 69 6e 67 73 | of old |"strings|
|000012a0| 22 2e 0a 58 20 74 75 6e | 65 2e 68 20 20 20 20 20 |"..X tun|e.h |
|000012b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000012c0| 31 09 50 61 72 61 6d 65 | 74 65 72 20 73 65 74 74 |1.Parame|ter sett|
|000012d0| 69 6e 67 73 20 66 6f 72 | 20 63 75 72 72 65 6e 74 |ings for| current|
|000012e0| 20 6d 61 63 68 69 6e 65 | 2e 0a 45 4e 44 5f 4f 46 | machine|..END_OF|
|000012f0| 5f 46 49 4c 45 0a 69 66 | 20 74 65 73 74 20 38 33 |_FILE.if| test 83|
|00001300| 30 20 2d 6e 65 20 60 77 | 63 20 2d 63 20 3c 27 4d |0 -ne `w|c -c <'M|
|00001310| 41 4e 49 46 45 53 54 27 | 60 3b 20 74 68 65 6e 0a |ANIFEST'|`; then.|
|00001320| 20 20 20 20 65 63 68 6f | 20 73 68 61 72 3a 20 5c | echo| shar: \|
|00001330| 22 27 4d 41 4e 49 46 45 | 53 54 27 5c 22 20 75 6e |"'MANIFE|ST'\" un|
|00001340| 70 61 63 6b 65 64 20 77 | 69 74 68 20 77 72 6f 6e |packed w|ith wron|
|00001350| 67 20 73 69 7a 65 21 0a | 66 69 0a 23 20 65 6e 64 |g size!.|fi.# end|
|00001360| 20 6f 66 20 27 4d 41 4e | 49 46 45 53 54 27 0a 66 | of 'MAN|IFEST'.f|
|00001370| 69 0a 69 66 20 74 65 73 | 74 20 2d 66 20 27 4d 61 |i.if tes|t -f 'Ma|
|00001380| 6b 65 66 69 6c 65 27 20 | 2d 61 20 22 24 7b 31 7d |kefile' |-a "${1}|
|00001390| 22 20 21 3d 20 22 2d 63 | 22 20 3b 20 74 68 65 6e |" != "-c|" ; then|
|000013a0| 20 0a 20 20 65 63 68 6f | 20 73 68 61 72 3a 20 57 | . echo| shar: W|
|000013b0| 69 6c 6c 20 6e 6f 74 20 | 63 6c 6f 62 62 65 72 20 |ill not |clobber |
|000013c0| 65 78 69 73 74 69 6e 67 | 20 66 69 6c 65 20 5c 22 |existing| file \"|
|000013d0| 27 4d 61 6b 65 66 69 6c | 65 27 5c 22 0a 65 6c 73 |'Makefil|e'\".els|
|000013e0| 65 0a 65 63 68 6f 20 73 | 68 61 72 3a 20 45 78 74 |e.echo s|har: Ext|
|000013f0| 72 61 63 74 69 6e 67 20 | 5c 22 27 4d 61 6b 65 66 |racting |\"'Makef|
|00001400| 69 6c 65 27 5c 22 20 5c | 28 39 30 37 20 63 68 61 |ile'\" \|(907 cha|
|00001410| 72 61 63 74 65 72 73 5c | 29 0a 73 65 64 20 22 73 |racters\|).sed "s|
|00001420| 2f 5e 58 2f 2f 22 20 3e | 27 4d 61 6b 65 66 69 6c |/^X//" >|'Makefil|
|00001430| 65 27 20 3c 3c 27 45 4e | 44 5f 4f 46 5f 46 49 4c |e' <<'EN|D_OF_FIL|
|00001440| 45 27 0a 58 23 0a 58 23 | 20 4d 61 6b 65 66 69 6c |E'.X#.X#| Makefil|
|00001450| 65 20 66 6f 72 20 27 73 | 74 72 69 6e 67 73 27 0a |e for 's|trings'.|
|00001460| 58 23 0a 58 23 20 73 63 | 63 73 69 64 20 3d 20 40 |X#.X# sc|csid = @|
|00001470| 28 23 29 20 20 52 45 4c | 2e 4d 66 69 6c 65 20 20 |(#) REL|.Mfile |
|00001480| 28 76 31 2e 33 20 35 2f | 32 32 2f 38 39 29 0a 58 |(v1.3 5/|22/89).X|
|00001490| 23 0a 58 53 48 45 4c 4c | 3d 2f 62 69 6e 2f 73 68 |#.XSHELL|=/bin/sh|
|000014a0| 0a 58 0a 58 23 20 49 66 | 20 79 6f 75 20 77 61 6e |.X.X# If| you wan|
|000014b0| 74 20 74 6f 20 70 6c 61 | 79 20 69 74 20 73 61 66 |t to pla|y it saf|
|000014c0| 65 2c 20 64 65 66 69 6e | 65 20 53 41 46 45 54 59 |e, defin|e SAFETY|
|000014d0| 5f 46 49 52 53 54 2e 20 | 54 68 65 20 70 72 6f 67 |_FIRST. |The prog|
|000014e0| 72 61 6d 20 77 69 6c 6c | 20 6d 6f 73 74 0a 58 23 |ram will| most.X#|
|000014f0| 20 70 72 6f 62 61 62 6c | 79 20 77 6f 72 6b 20 61 | probabl|y work a|
|00001500| 6e 64 20 79 6f 75 20 77 | 6f 6e 27 74 20 68 61 76 |nd you w|on't hav|
|00001510| 65 20 74 6f 20 73 70 65 | 6e 64 20 74 69 6d 65 20 |e to spe|nd time |
|00001520| 6f 6e 20 70 6f 72 74 69 | 6e 67 20 69 74 2e 0a 58 |on porti|ng it..X|
|00001530| 23 20 49 66 20 79 6f 75 | 20 68 61 76 65 20 64 65 |# If you| have de|
|00001540| 66 69 6e 65 64 20 74 68 | 69 6e 67 73 20 79 6f 75 |fined th|ings you|
|00001550| 72 73 65 6c 66 20 61 6e | 64 20 79 6f 75 20 77 61 |rself an|d you wa|
|00001560| 6e 74 20 74 68 65 20 70 | 72 6f 67 72 61 6d 0a 58 |nt the p|rogram.X|
|00001570| 23 20 74 6f 20 75 73 65 | 20 74 68 65 73 65 20 64 |# to use| these d|
|00001580| 65 66 69 6e 69 74 69 6f | 6e 73 2c 20 79 6f 75 20 |efinitio|ns, you |
|00001590| 6d 75 73 74 20 64 65 66 | 69 6e 65 20 55 53 45 5f |must def|ine USE_|
|000015a0| 55 53 45 52 5f 44 45 46 | 49 4e 45 53 2e 0a 58 23 |USER_DEF|INES..X#|
|000015b0| 20 49 66 20 79 6f 75 20 | 64 6f 6e 27 74 20 64 65 | If you |don't de|
|000015c0| 66 69 6e 65 20 53 41 46 | 45 54 59 5f 46 49 52 53 |fine SAF|ETY_FIRS|
|000015d0| 54 20 61 6e 64 20 55 53 | 45 5f 55 53 45 52 5f 44 |T and US|E_USER_D|
|000015e0| 45 46 49 4e 45 53 2c 20 | 74 68 65 20 70 72 6f 67 |EFINES, |the prog|
|000015f0| 72 61 6d 0a 58 23 20 77 | 69 6c 6c 20 74 72 79 20 |ram.X# w|ill try |
|00001600| 74 6f 20 69 64 65 6e 74 | 69 66 79 20 79 6f 75 72 |to ident|ify your|
|00001610| 20 73 79 73 74 65 6d 20 | 61 6e 64 20 74 68 65 6e | system |and then|
|00001620| 20 75 73 65 20 69 74 73 | 20 64 65 66 61 75 6c 74 | use its| default|
|00001630| 73 2e 0a 58 55 46 4c 41 | 47 53 3d 0a 58 23 55 46 |s..XUFLA|GS=.X#UF|
|00001640| 4c 41 47 53 3d 2d 44 55 | 53 45 5f 55 53 45 52 5f |LAGS=-DU|SE_USER_|
|00001650| 44 45 46 49 4e 45 53 0a | 58 23 55 46 4c 41 47 53 |DEFINES.|X#UFLAGS|
|00001660| 3d 2d 44 53 41 46 45 54 | 59 5f 46 49 52 53 54 0a |=-DSAFET|Y_FIRST.|
|00001670| 58 0a 58 23 20 44 65 66 | 69 6e 65 20 44 45 42 55 |X.X# Def|ine DEBU|
|00001680| 47 20 74 6f 20 67 65 74 | 20 61 20 6c 6f 74 20 6f |G to get| a lot o|
|00001690| 66 20 64 65 62 75 67 20 | 6f 75 74 70 75 74 20 6f |f debug |output o|
|000016a0| 6e 20 22 70 72 6f 74 22 | 2e 0a 58 44 45 42 55 47 |n "prot"|..XDEBUG|
|000016b0| 46 4c 41 47 53 3d 0a 58 | 0a 58 43 46 4c 41 47 53 |FLAGS=.X|.XCFLAGS|
|000016c0| 3d 20 2d 4f 20 24 7b 44 | 45 42 55 47 46 4c 41 47 |= -O ${D|EBUGFLAG|
|000016d0| 53 7d 20 24 7b 55 46 4c | 41 47 53 7d 0a 58 0a 58 |S} ${UFL|AGS}.X.X|
|000016e0| 48 45 41 44 45 52 53 3d | 09 73 74 72 69 6e 67 73 |HEADERS=|.strings|
|000016f0| 2e 68 20 63 6f 6e 66 69 | 67 2e 68 20 74 75 6e 65 |.h confi|g.h tune|
|00001700| 2e 68 0a 58 4f 42 4a 53 | 3d 09 09 73 74 72 69 6e |.h.XOBJS|=..strin|
|00001710| 67 73 2e 6f 20 6c 69 6d | 69 74 73 2e 6f 20 6f 75 |gs.o lim|its.o ou|
|00001720| 74 70 75 74 2e 6f 0a 58 | 0a 58 61 6c 6c 3a 20 73 |tput.o.X|.Xall: s|
|00001730| 74 72 69 6e 67 73 0a 58 | 0a 58 73 74 72 69 6e 67 |trings.X|.Xstring|
|00001740| 73 3a 20 24 7b 4f 42 4a | 53 7d 0a 58 09 63 63 20 |s: ${OBJ|S}.X.cc |
|00001750| 2d 6f 20 73 74 72 69 6e | 67 73 20 24 7b 4f 42 4a |-o strin|gs ${OBJ|
|00001760| 53 7d 0a 58 0a 58 24 7b | 4f 42 4a 53 7d 3a 09 24 |S}.X.X${|OBJS}:.$|
|00001770| 7b 48 45 41 44 45 52 53 | 7d 0a 58 0a 58 23 73 74 |{HEADERS|}.X.X#st|
|00001780| 72 69 6e 67 73 2e 6f 3a | 20 73 74 72 69 6e 67 73 |rings.o:| strings|
|00001790| 2e 68 20 63 6f 6e 66 69 | 67 2e 68 20 74 75 6e 65 |.h confi|g.h tune|
|000017a0| 2e 68 0a 58 23 6c 69 6d | 69 74 73 2e 6f 20 3a 20 |.h.X#lim|its.o : |
|000017b0| 73 74 72 69 6e 67 73 2e | 68 20 63 6f 6e 66 69 67 |strings.|h config|
|000017c0| 2e 68 20 74 75 6e 65 2e | 68 0a 58 23 6f 75 74 70 |.h tune.|h.X#outp|
|000017d0| 75 74 2e 6f 20 3a 20 73 | 74 72 69 6e 67 73 2e 68 |ut.o : s|trings.h|
|000017e0| 20 63 6f 6e 66 69 67 2e | 68 20 74 75 6e 65 2e 68 | config.|h tune.h|
|000017f0| 0a 45 4e 44 5f 4f 46 5f | 46 49 4c 45 0a 69 66 20 |.END_OF_|FILE.if |
|00001800| 74 65 73 74 20 39 30 37 | 20 2d 6e 65 20 60 77 63 |test 907| -ne `wc|
|00001810| 20 2d 63 20 3c 27 4d 61 | 6b 65 66 69 6c 65 27 60 | -c <'Ma|kefile'`|
|00001820| 3b 20 74 68 65 6e 0a 20 | 20 20 20 65 63 68 6f 20 |; then. | echo |
|00001830| 73 68 61 72 3a 20 5c 22 | 27 4d 61 6b 65 66 69 6c |shar: \"|'Makefil|
|00001840| 65 27 5c 22 20 75 6e 70 | 61 63 6b 65 64 20 77 69 |e'\" unp|acked wi|
|00001850| 74 68 20 77 72 6f 6e 67 | 20 73 69 7a 65 21 0a 66 |th wrong| size!.f|
|00001860| 69 0a 23 20 65 6e 64 20 | 6f 66 20 27 4d 61 6b 65 |i.# end |of 'Make|
|00001870| 66 69 6c 65 27 0a 66 69 | 0a 69 66 20 74 65 73 74 |file'.fi|.if test|
|00001880| 20 2d 66 20 27 52 45 41 | 44 4d 45 27 20 2d 61 20 | -f 'REA|DME' -a |
|00001890| 22 24 7b 31 7d 22 20 21 | 3d 20 22 2d 63 22 20 3b |"${1}" !|= "-c" ;|
|000018a0| 20 74 68 65 6e 20 0a 20 | 20 65 63 68 6f 20 73 68 | then . | echo sh|
|000018b0| 61 72 3a 20 57 69 6c 6c | 20 6e 6f 74 20 63 6c 6f |ar: Will| not clo|
|000018c0| 62 62 65 72 20 65 78 69 | 73 74 69 6e 67 20 66 69 |bber exi|sting fi|
|000018d0| 6c 65 20 5c 22 27 52 45 | 41 44 4d 45 27 5c 22 0a |le \"'RE|ADME'\".|
|000018e0| 65 6c 73 65 0a 65 63 68 | 6f 20 73 68 61 72 3a 20 |else.ech|o shar: |
|000018f0| 45 78 74 72 61 63 74 69 | 6e 67 20 5c 22 27 52 45 |Extracti|ng \"'RE|
|00001900| 41 44 4d 45 27 5c 22 20 | 5c 28 37 36 30 31 20 63 |ADME'\" |\(7601 c|
|00001910| 68 61 72 61 63 74 65 72 | 73 5c 29 0a 73 65 64 20 |haracter|s\).sed |
|00001920| 22 73 2f 5e 58 2f 2f 22 | 20 3e 27 52 45 41 44 4d |"s/^X//"| >'READM|
|00001930| 45 27 20 3c 3c 27 45 4e | 44 5f 4f 46 5f 46 49 4c |E' <<'EN|D_OF_FIL|
|00001940| 45 27 0a 58 31 2e 29 20 | 57 68 61 74 20 64 6f 20 |E'.X1.) |What do |
|00001950| 77 65 20 68 61 76 65 20 | 68 65 72 65 3f 0a 58 0a |we have |here?.X.|
|00001960| 58 54 68 69 73 20 69 73 | 20 74 68 65 20 52 45 41 |XThis is| the REA|
|00001970| 44 4d 45 20 66 69 6c 65 | 20 66 6f 72 20 27 73 74 |DME file| for 'st|
|00001980| 72 69 6e 67 73 27 2e 20 | 27 73 74 72 69 6e 67 73 |rings'. |'strings|
|00001990| 27 20 69 73 20 61 20 72 | 65 77 72 69 74 65 0a 58 |' is a r|ewrite.X|
|000019a0| 61 6e 64 20 72 65 70 6c | 61 63 65 6d 65 6e 74 20 |and repl|acement |
|000019b0| 66 6f 72 20 74 68 65 20 | 34 42 53 44 20 70 72 6f |for the |4BSD pro|
|000019c0| 67 72 61 6d 20 6f 66 20 | 74 68 65 20 73 61 6d 65 |gram of |the same|
|000019d0| 20 6e 61 6d 65 2e 0a 58 | 27 73 74 72 69 6e 67 73 | name..X|'strings|
|000019e0| 27 20 6c 6f 6f 6b 73 20 | 66 6f 72 20 73 65 71 75 |' looks |for sequ|
|000019f0| 65 6e 63 65 73 20 6f 66 | 20 70 72 69 6e 74 61 62 |ences of| printab|
|00001a00| 6c 65 20 63 68 61 72 61 | 63 74 65 72 73 20 69 6e |le chara|cters in|
|00001a10| 20 61 20 66 69 6c 65 20 | 61 6e 64 0a 58 6f 75 74 | a file |and.Xout|
|00001a20| 70 75 74 73 20 74 68 65 | 6d 2e 0a 58 0a 58 43 75 |puts the|m..X.XCu|
|00001a30| 72 72 65 6e 74 20 76 65 | 72 73 69 6f 6e 20 69 73 |rrent ve|rsion is|
|00001a40| 20 31 2e 36 2e 39 2e 0a | 58 0a 58 28 54 6f 20 67 | 1.6.9..|X.X(To g|
|00001a50| 65 74 20 62 65 73 74 20 | 72 65 73 75 6c 74 73 20 |et best |results |
|00001a60| 77 68 65 6e 20 72 65 61 | 64 69 6e 67 20 74 68 65 |when rea|ding the|
|00001a70| 73 65 20 66 69 6c 65 73 | 2c 20 75 73 65 20 61 6e |se files|, use an|
|00001a80| 20 6f 70 74 69 6f 6e 20 | 69 6e 20 79 6f 75 72 0a | option |in your.|
|00001a90| 58 20 66 61 76 6f 75 72 | 69 74 65 20 65 64 69 74 |X favour|ite edit|
|00001aa0| 6f 72 20 74 6f 20 65 78 | 70 61 6e 64 20 61 20 54 |or to ex|pand a T|
|00001ab0| 41 42 20 74 6f 20 34 20 | 53 50 41 43 45 73 2e 20 |AB to 4 |SPACEs. |
|00001ac0| 45 2e 67 2e 20 69 6e 20 | 76 69 20 69 74 20 69 73 |E.g. in |vi it is|
|00001ad0| 0a 58 20 22 73 65 74 20 | 74 61 62 73 74 6f 70 3d |.X "set |tabstop=|
|00001ae0| 34 22 29 0a 58 0a 58 59 | 6f 75 20 73 68 6f 75 6c |4").X.XY|ou shoul|
|00001af0| 64 20 68 61 76 65 20 74 | 68 65 20 66 69 6c 65 73 |d have t|he files|
|00001b00| 3a 0a 58 09 52 45 41 44 | 4d 45 09 09 2d 20 74 68 |:.X.READ|ME..- th|
|00001b10| 69 73 20 66 69 6c 65 0a | 58 09 43 4f 50 59 49 4e |is file.|X.COPYIN|
|00001b20| 47 09 09 2d 20 43 6f 70 | 79 72 69 67 68 74 20 4e |G..- Cop|yright N|
|00001b30| 6f 74 69 63 65 0a 58 09 | 4d 61 6b 65 66 69 6c 65 |otice.X.|Makefile|
|00001b40| 09 2d 20 4d 61 6b 65 66 | 69 6c 65 0a 58 09 73 74 |.- Makef|ile.X.st|
|00001b50| 72 69 6e 67 73 2e 68 0a | 58 09 63 6f 6e 66 69 67 |rings.h.|X.config|
|00001b60| 2e 68 0a 58 09 74 75 6e | 65 2e 68 0a 58 09 73 74 |.h.X.tun|e.h.X.st|
|00001b70| 72 69 6e 67 73 2e 63 09 | 2d 20 74 68 65 20 6d 61 |rings.c.|- the ma|
|00001b80| 69 6e 20 73 6f 75 72 63 | 65 0a 58 09 6c 69 6d 69 |in sourc|e.X.limi|
|00001b90| 74 73 2e 63 09 2d 20 74 | 68 65 20 55 4e 49 58 20 |ts.c.- t|he UNIX |
|00001ba0| 28 74 72 61 64 65 6d 61 | 72 6b 20 6f 66 20 41 54 |(tradema|rk of AT|
|00001bb0| 26 54 29 20 73 70 65 63 | 69 66 69 63 20 73 74 75 |&T) spec|ific stu|
|00001bc0| 66 66 20 74 6f 20 69 64 | 65 6e 74 69 66 79 0a 58 |ff to id|entify.X|
|00001bd0| 09 09 09 09 20 20 61 6e | 20 69 6e 69 74 69 61 6c |.... an| initial|
|00001be0| 69 7a 65 64 20 64 61 74 | 61 20 73 65 67 6d 65 6e |ized dat|a segmen|
|00001bf0| 74 0a 58 09 6f 75 74 70 | 75 74 2e 63 09 2d 20 6f |t.X.outp|ut.c.- o|
|00001c00| 75 74 70 75 74 20 72 6f | 75 74 69 6e 65 73 0a 58 |utput ro|utines.X|
|00001c10| 09 74 65 73 74 5f 69 6e | 70 75 74 09 2d 20 61 20 |.test_in|put.- a |
|00001c20| 66 69 6c 65 20 63 6f 6e | 74 61 69 6e 69 6e 67 20 |file con|taining |
|00001c30| 74 68 65 20 32 20 63 68 | 61 72 61 63 74 65 72 73 |the 2 ch|aracters|
|00001c40| 20 74 68 65 20 6f 72 69 | 67 69 6e 61 6c 20 73 74 | the ori|ginal st|
|00001c50| 72 69 6e 67 73 0a 58 09 | 09 09 09 20 20 73 74 75 |rings.X.|... stu|
|00001c60| 6d 62 6c 65 64 20 6f 76 | 65 72 2e 20 55 6e 70 61 |mbled ov|er. Unpa|
|00001c70| 63 6b 20 69 74 20 77 69 | 74 68 20 61 74 6f 62 2e |ck it wi|th atob.|
|00001c80| 0a 58 09 73 74 72 69 6e | 67 73 2e 31 09 2d 20 6d |.X.strin|gs.1.- m|
|00001c90| 61 6e 75 61 6c 20 70 61 | 67 65 2e 0a 58 09 73 74 |anual pa|ge..X.st|
|00001ca0| 72 69 6e 67 73 2e 74 78 | 74 20 2d 20 6d 61 6e 75 |rings.tx|t - manu|
|00001cb0| 61 6c 20 70 61 67 65 20 | 77 69 74 68 6f 75 74 20 |al page |without |
|00001cc0| 6e 72 6f 66 66 20 73 65 | 71 75 65 6e 63 65 73 0a |nroff se|quences.|
|00001cd0| 58 0a 58 32 2e 29 20 48 | 6f 77 20 74 6f 20 62 75 |X.X2.) H|ow to bu|
|00001ce0| 69 6c 64 20 73 74 72 69 | 6e 67 73 2e 0a 58 0a 58 |ild stri|ngs..X.X|
|00001cf0| 4e 6f 77 20 74 68 61 74 | 20 79 6f 75 20 68 61 76 |Now that| you hav|
|00001d00| 65 20 73 74 72 69 6e 67 | 73 20 79 6f 75 20 77 69 |e string|s you wi|
|00001d10| 6c 6c 20 77 61 6e 74 20 | 74 6f 20 62 75 69 6c 64 |ll want |to build|
|00001d20| 20 69 74 2e 0a 58 54 68 | 65 20 70 72 6f 67 72 61 | it..XTh|e progra|
|00001d30| 6d 20 69 73 20 73 68 69 | 70 70 65 64 20 77 69 74 |m is shi|pped wit|
|00001d40| 68 20 55 46 4c 41 47 53 | 20 75 6e 64 65 66 69 6e |h UFLAGS| undefin|
|00001d50| 65 64 20 28 73 65 65 20 | 62 65 6c 6f 77 20 66 6f |ed (see |below fo|
|00001d60| 72 20 61 6e 20 65 78 70 | 6c 61 6e 61 74 69 6f 6e |r an exp|lanation|
|00001d70| 29 2e 0a 58 4f 6e 20 55 | 4e 49 58 20 28 74 72 61 |)..XOn U|NIX (tra|
|00001d80| 64 65 6d 61 72 6b 20 6f | 66 20 41 54 26 54 29 20 |demark o|f AT&T) |
|00001d90| 73 79 73 74 65 6d 73 2c | 20 79 6f 75 20 73 68 6f |systems,| you sho|
|00001da0| 75 6c 64 20 62 65 20 61 | 62 6c 65 20 74 6f 20 62 |uld be a|ble to b|
|00001db0| 75 69 6c 64 20 74 68 65 | 0a 58 70 72 6f 67 72 61 |uild the|.Xprogra|
|00001dc0| 6d 20 62 79 20 6a 75 73 | 74 20 74 79 70 69 6e 67 |m by jus|t typing|
|00001dd0| 20 22 6d 61 6b 65 22 2e | 20 4f 6e 20 6e 6f 6e 2d | "make".| On non-|
|00001de0| 55 4e 49 58 20 73 79 73 | 74 65 6d 73 20 79 6f 75 |UNIX sys|tems you|
|00001df0| 20 6d 69 67 68 74 20 68 | 61 76 65 20 70 72 6f 62 | might h|ave prob|
|00001e00| 6c 65 6d 73 2e 0a 58 0a | 58 61 2e 29 20 65 64 69 |lems..X.|Xa.) edi|
|00001e10| 74 20 4d 61 6b 65 66 69 | 6c 65 2e 20 49 66 20 79 |t Makefi|le. If y|
|00001e20| 6f 75 20 77 61 6e 74 20 | 74 6f 20 70 6c 61 79 20 |ou want |to play |
|00001e30| 69 74 20 73 61 66 65 2c | 20 73 65 74 20 55 46 4c |it safe,| set UFL|
|00001e40| 41 47 53 3d 2d 44 53 41 | 46 45 54 59 5f 46 49 52 |AGS=-DSA|FETY_FIR|
|00001e50| 53 54 2e 0a 58 09 73 74 | 72 69 6e 67 73 20 73 68 |ST..X.st|rings sh|
|00001e60| 6f 75 6c 64 20 6e 6f 77 | 20 63 6f 6d 70 69 6c 65 |ould now| compile|
|00001e70| 20 77 69 74 68 6f 75 74 | 20 61 6e 79 20 70 72 6f | without| any pro|
|00001e80| 62 6c 65 6d 73 2e 0a 58 | 09 59 6f 75 20 77 6f 6e |blems..X|.You won|
|00001e90| 27 74 20 67 65 74 20 74 | 68 65 20 55 4e 49 58 20 |'t get t|he UNIX |
|00001ea0| 73 70 65 63 69 66 69 63 | 20 73 74 75 66 66 3a 20 |specific| stuff: |
|00001eb0| 74 68 65 20 70 72 6f 67 | 72 61 6d 20 64 6f 65 73 |the prog|ram does|
|00001ec0| 20 6e 6f 74 0a 58 09 74 | 72 79 20 74 6f 20 69 64 | not.X.t|ry to id|
|00001ed0| 65 6e 74 69 66 79 20 74 | 68 65 20 69 6e 69 74 69 |entify t|he initi|
|00001ee0| 61 6c 69 7a 65 64 20 64 | 61 74 61 20 73 65 67 6d |alized d|ata segm|
|00001ef0| 65 6e 74 2e 0a 58 0a 58 | 62 2e 29 20 49 66 20 79 |ent..X.X|b.) If y|
|00001f00| 6f 75 20 64 6f 6e 27 74 | 20 77 61 6e 74 20 74 6f |ou don't| want to|
|00001f10| 20 70 6c 61 79 20 69 74 | 20 73 61 66 65 2c 20 62 | play it| safe, b|
|00001f20| 75 74 20 72 61 74 68 65 | 72 20 79 6f 75 20 77 61 |ut rathe|r you wa|
|00001f30| 6e 74 20 74 6f 20 63 6f | 6e 66 69 67 75 72 65 0a |nt to co|nfigure.|
|00001f40| 58 09 73 74 72 69 6e 67 | 73 20 74 6f 20 79 6f 75 |X.string|s to you|
|00001f50| 72 20 73 79 73 74 65 6d | 2c 20 74 61 6b 65 20 61 |r system|, take a|
|00001f60| 20 6c 6f 6f 6b 20 61 74 | 20 63 6f 6e 66 69 67 20 | look at| config |
|00001f70| 66 69 72 73 74 2e 20 54 | 68 65 72 65 20 69 73 20 |first. T|here is |
|00001f80| 61 0a 58 09 6c 69 73 74 | 20 6f 66 20 73 79 73 74 |a.X.list| of syst|
|00001f90| 65 6d 73 2e 20 49 66 20 | 6f 6e 65 20 6f 66 20 74 |ems. If |one of t|
|00001fa0| 68 65 73 65 20 69 73 20 | 79 6f 75 72 73 2c 20 65 |hese is |yours, e|
|00001fb0| 64 69 74 20 4d 61 6b 65 | 66 69 6c 65 20 61 6e 64 |dit Make|file and|
|00001fc0| 0a 58 09 73 65 74 20 55 | 46 4c 41 47 53 20 74 6f |.X.set U|FLAGS to|
|00001fd0| 20 6e 6f 74 68 69 6e 67 | 2e 20 57 68 65 6e 20 63 | nothing|. When c|
|00001fe0| 6f 6d 70 69 6c 69 6e 67 | 20 74 68 65 20 64 65 66 |ompiling| the def|
|00001ff0| 69 6e 65 73 20 66 6f 72 | 20 74 68 65 20 73 79 73 |ines for| the sys|
|00002000| 74 65 6d 0a 58 09 61 72 | 65 20 75 73 65 64 2e 0a |tem.X.ar|e used..|
|00002010| 58 09 57 41 52 4e 49 4e | 47 3a 20 73 6f 6d 65 20 |X.WARNIN|G: some |
|00002020| 74 68 69 6e 67 73 20 6d | 61 79 20 64 69 66 66 65 |things m|ay diffe|
|00002030| 72 20 62 65 74 77 65 65 | 6e 20 64 69 66 66 65 72 |r betwee|n differ|
|00002040| 65 6e 74 20 76 65 72 73 | 69 6f 6e 73 20 6f 66 20 |ent vers|ions of |
|00002050| 74 68 65 0a 58 09 73 61 | 6d 65 20 73 79 73 74 65 |the.X.sa|me syste|
|00002060| 6d 2e 20 4f 6e 20 73 6f | 6d 65 20 6d 61 63 68 69 |m. On so|me machi|
|00002070| 6e 65 73 20 74 68 65 72 | 65 20 69 73 20 6e 6f 20 |nes ther|e is no |
|00002080| 65 61 73 79 20 77 61 79 | 20 74 6f 20 64 69 73 74 |easy way| to dist|
|00002090| 69 6e 67 75 69 73 68 0a | 58 09 62 65 74 77 65 65 |inguish.|X.betwee|
|000020a0| 6e 20 73 75 63 68 20 76 | 65 72 73 69 6f 6e 73 2e |n such v|ersions.|
|000020b0| 0a 58 09 49 66 20 79 6f | 75 20 77 65 72 65 20 77 |.X.If yo|u were w|
|000020c0| 72 6f 6e 67 2c 20 61 6e | 64 20 74 68 65 20 73 79 |rong, an|d the sy|
|000020d0| 73 74 65 6d 20 79 6f 75 | 20 61 72 65 20 75 73 69 |stem you| are usi|
|000020e0| 6e 67 20 69 73 20 6e 6f | 74 20 69 6e 20 74 68 65 |ng is no|t in the|
|000020f0| 0a 58 09 6c 69 73 74 20 | 6f 66 20 6b 6e 6f 77 6e |.X.list |of known|
|00002100| 20 73 79 6d 62 6f 6c 73 | 2c 20 74 68 65 20 6d 69 | symbols|, the mi|
|00002110| 6e 69 6d 61 6c 20 64 65 | 66 61 75 6c 74 73 2c 20 |nimal de|faults, |
|00002120| 6c 69 6b 65 20 69 6e 20 | 61 2e 29 20 77 69 6c 6c |like in |a.) will|
|00002130| 20 62 65 0a 58 09 75 73 | 65 64 2e 0a 58 0a 58 63 | be.X.us|ed..X.Xc|
|00002140| 2e 29 20 59 6f 75 20 77 | 61 6e 74 20 74 6f 20 63 |.) You w|ant to c|
|00002150| 6f 6e 66 69 67 75 72 65 | 20 73 74 72 69 6e 67 73 |onfigure| strings|
|00002160| 2c 20 61 6e 64 20 79 6f | 75 72 20 73 79 73 74 65 |, and yo|ur syste|
|00002170| 6d 20 69 73 20 6e 6f 74 | 20 69 6e 20 74 68 65 20 |m is not| in the |
|00002180| 6c 69 73 74 0a 58 09 6f | 66 20 6b 6e 6f 77 6e 20 |list.X.o|f known |
|00002190| 73 79 73 74 65 6d 73 2e | 0a 58 09 45 64 69 74 20 |systems.|.X.Edit |
|000021a0| 4d 61 6b 65 66 69 6c 65 | 20 61 6e 64 20 73 65 74 |Makefile| and set|
|000021b0| 20 55 46 4c 41 47 53 3d | 2d 44 55 53 45 5f 55 53 | UFLAGS=|-DUSE_US|
|000021c0| 45 52 5f 44 45 46 49 4e | 45 53 2e 0a 58 09 45 64 |ER_DEFIN|ES..X.Ed|
|000021d0| 69 74 20 74 75 6e 65 2e | 68 20 61 6e 64 20 73 65 |it tune.|h and se|
|000021e0| 74 20 74 68 69 6e 67 73 | 20 75 70 20 66 6f 72 20 |t things| up for |
|000021f0| 79 6f 75 72 20 73 79 73 | 74 65 6d 2e 20 54 68 65 |your sys|tem. The|
|00002200| 20 76 61 72 69 61 62 6c | 65 73 20 61 72 65 0a 58 | variabl|es are.X|
|00002210| 09 63 6f 6d 6d 65 6e 74 | 65 64 2e 0a 58 0a 58 54 |.comment|ed..X.XT|
|00002220| 68 65 72 65 20 61 72 65 | 20 33 20 68 65 61 64 65 |here are| 3 heade|
|00002230| 72 20 66 69 6c 65 73 2e | 20 54 68 65 20 69 6e 63 |r files.| The inc|
|00002240| 6c 75 73 69 6f 6e 20 77 | 6f 72 6b 73 20 6c 69 6b |lusion w|orks lik|
|00002250| 65 20 74 68 69 73 2e 0a | 58 28 79 6f 75 20 63 61 |e this..|X(you ca|
|00002260| 6e 20 73 6b 69 70 20 74 | 68 69 73 29 0a 58 0a 58 |n skip t|his).X.X|
|00002270| 20 20 20 20 20 20 20 20 | 28 72 65 61 64 69 6e 67 | |(reading|
|00002280| 20 73 74 72 69 6e 67 73 | 2e 68 29 0a 58 20 20 20 | strings|.h).X |
|00002290| 20 20 20 20 20 20 20 20 | 20 20 20 20 7c 0a 58 20 | | |.X |
|000022a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 76 0a | | v.|
|000022b0| 58 20 20 20 20 20 20 20 | 20 28 69 6e 63 6c 75 64 |X | (includ|
|000022c0| 69 6e 67 20 63 6f 6e 66 | 69 67 2e 68 29 0a 58 09 |ing conf|ig.h).X.|
|000022d0| 20 20 20 20 20 20 20 20 | 20 20 20 7c 0a 58 09 20 | | |.X. |
|000022e0| 20 20 20 20 20 20 20 20 | 20 20 76 0a 58 09 3c 2d | | v.X.<-|
|000022f0| 2d 2d 2d 2d 20 69 73 20 | 53 41 46 45 54 59 5f 46 |---- is |SAFETY_F|
|00002300| 49 52 53 54 20 64 65 66 | 69 6e 65 64 3f 0a 58 09 |IRST def|ined?.X.|
|00002310| 7c 20 20 20 20 20 20 20 | 20 20 20 7c 0a 58 09 7c || | |.X.||
|00002320| 20 20 20 20 20 20 20 20 | 20 20 7c 20 2d 0a 58 09 | | | -.X.|
|00002330| 7c 20 20 20 20 20 20 20 | 20 20 20 76 20 20 20 20 || | v |
|00002340| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002350| 20 20 2b 0a 58 09 7c 20 | 20 69 73 20 55 53 45 5f | +.X.| | is USE_|
|00002360| 55 53 45 52 5f 44 45 46 | 49 4e 45 53 20 64 65 66 |USER_DEF|INES def|
|00002370| 69 6e 65 64 3f 20 2d 2d | 2d 2d 3e 75 73 65 20 73 |ined? --|-->use s|
|00002380| 74 75 66 66 20 66 72 6f | 6d 20 74 75 6e 65 2e 68 |tuff fro|m tune.h|
|00002390| 20 2d 2d 2d 3e 20 63 6f | 6e 74 69 6e 75 65 0a 58 | ---> co|ntinue.X|
|000023a0| 09 7c 20 20 20 20 20 20 | 20 20 20 20 7c 0a 58 09 |.| | |.X.|
|000023b0| 7c 20 20 20 20 20 20 20 | 20 20 20 7c 20 2d 0a 58 || | | -.X|
|000023c0| 09 7c 20 20 20 20 20 20 | 20 20 20 20 76 0a 58 09 |.| | v.X.|
|000023d0| 7c 20 20 20 20 20 20 69 | 73 20 74 68 69 73 20 6d || i|s this m|
|000023e0| 61 63 68 69 6e 65 20 31 | 20 3f 0a 58 09 7c 20 20 |achine 1| ?.X.| |
|000023f0| 20 20 20 20 20 20 20 20 | 7c 0a 58 09 7c 20 20 20 | ||.X.| |
|00002400| 20 20 20 20 20 20 20 7c | 20 2d 0a 58 09 7c 20 20 | || -.X.| |
|00002410| 20 20 20 20 20 20 20 20 | 76 0a 58 09 7c 20 20 20 | |v.X.| |
|00002420| 20 20 20 69 73 20 74 68 | 69 73 20 6d 61 63 68 69 | is th|is machi|
|00002430| 6e 65 20 32 20 3f 0a 58 | 09 7c 20 20 20 20 20 20 |ne 2 ?.X|.| |
|00002440| 20 20 20 20 7c 0a 58 09 | 7c 20 20 20 20 20 20 20 | |.X.|| |
|00002450| 20 20 20 7c 20 2d 0a 58 | 09 7c 20 20 20 20 20 20 | | -.X|.| |
|00002460| 20 20 20 20 76 0a 58 09 | 7c 20 20 20 20 20 20 20 | v.X.|| |
|00002470| 20 20 2e 2e 2e 0a 58 09 | 7c 20 20 20 20 20 20 20 | ....X.|| |
|00002480| 20 20 20 7c 0a 58 09 7c | 20 20 20 20 20 20 20 20 | |.X.|| |
|00002490| 20 20 7c 20 2d 0a 58 09 | 76 20 20 20 20 20 20 20 | | -.X.|v |
|000024a0| 20 20 20 76 0a 58 09 75 | 73 65 20 73 61 66 65 20 | v.X.u|se safe |
|000024b0| 64 65 66 61 75 6c 74 73 | 0a 58 09 7c 0a 58 09 76 |defaults|.X.|.X.v|
|000024c0| 0a 58 09 63 6f 6e 74 69 | 6e 75 65 0a 58 0a 58 54 |.X.conti|nue.X.XT|
|000024d0| 68 65 20 70 72 6f 67 72 | 61 6d 2c 20 6f 72 20 72 |he progr|am, or r|
|000024e0| 61 74 68 65 72 20 74 68 | 65 20 68 65 61 64 65 72 |ather th|e header|
|000024f0| 66 69 6c 65 73 20 6b 6e | 6f 77 20 61 62 6f 75 74 |files kn|ow about|
|00002500| 20 74 68 65 20 66 6f 6c | 6c 6f 77 69 6e 67 20 6d | the fol|lowing m|
|00002510| 61 63 68 69 6e 65 73 3a | 0a 58 0a 58 2d 20 56 41 |achines:|.X.X- VA|
|00002520| 58 20 31 31 2f 37 38 30 | 20 28 34 2e 33 20 42 53 |X 11/780| (4.3 BS|
|00002530| 44 29 20 62 79 20 22 75 | 6e 69 78 22 20 61 6e 64 |D) by "u|nix" and|
|00002540| 20 22 76 61 78 22 20 61 | 6e 64 20 6e 6f 74 20 22 | "vax" a|nd not "|
|00002550| 75 6c 74 72 69 78 22 0a | 58 2d 20 53 49 45 4d 45 |ultrix".|X- SIEME|
|00002560| 4e 53 20 50 43 2d 4d 58 | 32 20 28 53 49 4e 49 58 |NS PC-MX|2 (SINIX|
|00002570| 20 76 32 2e 31 29 20 62 | 79 20 22 6e 73 63 33 32 | v2.1) b|y "nsc32|
|00002580| 30 30 22 20 61 6e 64 20 | 22 73 69 6e 69 78 22 20 |00" and |"sinix" |
|00002590| 61 6e 64 20 22 6e 73 31 | 36 30 30 30 22 0a 58 2d |and "ns1|6000".X-|
|000025a0| 20 53 75 6e 20 33 2f 32 | 36 30 20 28 53 75 6e 4f | Sun 3/2|60 (SunO|
|000025b0| 53 20 33 2e 35 29 20 62 | 79 20 22 75 6e 69 78 22 |S 3.5) b|y "unix"|
|000025c0| 20 61 6e 64 20 22 73 75 | 6e 22 20 61 6e 64 20 22 | and "su|n" and "|
|000025d0| 6d 63 36 38 30 32 30 22 | 0a 58 2d 20 56 41 58 20 |mc68020"|.X- VAX |
|000025e0| 36 38 30 30 20 28 55 6c | 74 72 69 78 20 32 2e 31 |6800 (Ul|trix 2.1|
|000025f0| 29 20 62 79 20 22 75 6e | 69 78 22 20 61 6e 64 20 |) by "un|ix" and |
|00002600| 22 75 6c 74 72 69 78 22 | 20 61 6e 64 20 22 62 73 |"ultrix"| and "bs|
|00002610| 64 34 5f 32 22 09 0a 58 | 2d 20 75 56 41 58 20 28 |d4_2"..X|- uVAX (|
|00002620| 56 4d 53 20 35 2e 31 29 | 20 62 79 20 22 76 6d 73 |VMS 5.1)| by "vms|
|00002630| 22 20 61 6e 64 20 22 76 | 61 78 22 0a 58 0a 58 33 |" and "v|ax".X.X3|
|00002640| 2e 29 20 57 68 79 20 69 | 73 20 74 68 69 73 20 73 |.) Why i|s this s|
|00002650| 74 72 69 6e 67 73 20 62 | 65 74 74 65 72 20 74 68 |trings b|etter th|
|00002660| 61 6e 20 74 68 65 20 73 | 74 61 6e 64 61 72 64 20 |an the s|tandard |
|00002670| 6f 6e 65 3f 0a 58 0a 58 | 09 61 2e 29 20 54 68 69 |one?.X.X|.a.) Thi|
|00002680| 73 20 76 65 72 73 69 6f | 6e 20 6f 66 20 73 74 72 |s versio|n of str|
|00002690| 69 6e 67 73 20 69 73 20 | 61 74 20 6c 65 61 73 74 |ings is |at least|
|000026a0| 20 34 20 74 69 6d 65 73 | 20 66 61 73 74 65 72 20 | 4 times| faster |
|000026b0| 74 68 61 6e 20 74 68 65 | 20 6f 72 69 67 69 6e 61 |than the| origina|
|000026c0| 6c 0a 58 09 09 6f 6e 65 | 2e 20 49 66 20 74 68 65 |l.X..one|. If the|
|000026d0| 20 6d 69 6e 69 6d 61 6c | 20 73 74 72 69 6e 67 20 | minimal| string |
|000026e0| 6c 65 6e 67 74 68 20 69 | 73 20 73 65 74 20 74 6f |length i|s set to|
|000026f0| 20 73 6f 6d 65 74 68 69 | 6e 67 20 65 6c 73 65 2c | somethi|ng else,|
|00002700| 20 69 74 20 6d 69 67 68 | 74 0a 58 09 09 65 76 65 | it migh|t.X..eve|
|00002710| 6e 20 62 65 20 31 30 20 | 74 69 6d 65 73 20 66 61 |n be 10 |times fa|
|00002720| 73 74 65 72 2e 0a 58 09 | 62 2e 29 20 54 68 65 20 |ster..X.|b.) The |
|00002730| 6f 72 69 67 69 6e 61 6c | 20 6f 6e 65 20 68 61 64 |original| one had|
|00002740| 20 73 65 76 65 72 61 6c | 20 62 75 67 73 2e 0a 58 | several| bugs..X|
|00002750| 09 63 2e 29 20 54 68 69 | 73 20 6f 6e 65 20 69 73 |.c.) Thi|s one is|
|00002760| 20 70 75 62 6c 69 63 20 | 64 6f 6d 61 69 6e 2e 20 | public |domain. |
|00002770| 59 6f 75 20 67 65 74 20 | 73 6f 75 72 63 65 2e 0a |You get |source..|
|00002780| 58 0a 58 09 61 64 20 61 | 2e 29 0a 58 09 09 48 65 |X.X.ad a|.).X..He|
|00002790| 72 65 20 61 72 65 20 72 | 65 73 75 6c 74 73 20 6f |re are r|esults o|
|000027a0| 66 20 73 6f 6d 65 20 74 | 65 73 74 73 3a 0a 58 0a |f some t|ests:.X.|
|000027b0| 58 09 09 6d 61 63 68 69 | 6e 65 3a 20 50 43 2d 4d |X..machi|ne: PC-M|
|000027c0| 58 32 2c 20 20 20 4f 53 | 3a 20 53 49 4e 49 58 20 |X2, OS|: SINIX |
|000027d0| 76 32 2e 31 09 09 66 69 | 6c 65 3a 20 2f 76 6d 73 |v2.1..fi|le: /vms|
|000027e0| 69 6e 69 78 09 28 32 38 | 39 30 38 34 29 0a 58 09 |inix.(28|9084).X.|
|000027f0| 09 6f 6c 64 20 3a 09 09 | 75 09 34 33 2e 36 09 09 |.old :..|u.43.6..|
|00002800| 73 09 31 2e 31 09 09 09 | 3d 09 34 34 2e 37 0a 58 |s.1.1...|=.44.7.X|
|00002810| 09 09 6e 65 77 20 3a 09 | 09 75 09 20 33 2e 38 09 |..new :.|.u. 3.8.|
|00002820| 09 73 09 32 2e 33 09 09 | 09 3d 09 20 36 2e 31 0a |.s.2.3..|.=. 6.1.|
|00002830| 58 0a 58 09 09 6d 61 63 | 68 69 6e 65 3a 20 56 41 |X.X..mac|hine: VA|
|00002840| 58 20 31 31 2f 37 38 30 | 09 20 20 20 4f 53 3a 20 |X 11/780|. OS: |
|00002850| 34 2e 33 42 53 44 20 20 | 20 20 09 66 69 6c 65 3a |4.3BSD | .file:|
|00002860| 20 2f 76 6d 75 6e 69 78 | 09 28 33 32 39 37 32 38 | /vmunix|.(329728|
|00002870| 29 0a 58 09 09 6f 6c 64 | 20 3a 09 09 75 09 31 38 |).X..old| :..u.18|
|00002880| 2e 30 09 09 73 09 32 2e | 37 09 09 09 3d 09 32 30 |.0..s.2.|7...=.20|
|00002890| 2e 37 0a 58 09 09 6e 65 | 77 20 3a 09 09 75 09 20 |.7.X..ne|w :..u. |
|000028a0| 31 2e 35 09 09 73 09 30 | 2e 39 09 09 09 3d 09 20 |1.5..s.0|.9...=. |
|000028b0| 32 2e 34 0a 58 0a 58 09 | 09 6d 61 63 68 69 6e 65 |2.4.X.X.|.machine|
|000028c0| 3a 20 53 55 4e 20 33 2f | 32 36 30 20 09 20 20 20 |: SUN 3/|260 . |
|000028d0| 4f 53 3a 20 53 75 6e 4f | 53 20 33 2e 35 20 09 66 |OS: SunO|S 3.5 .f|
|000028e0| 69 6c 65 3a 20 2f 76 6d | 75 6e 69 78 09 28 35 35 |ile: /vm|unix.(55|
|000028f0| 38 33 35 39 29 0a 58 09 | 09 6f 6c 64 20 3a 09 09 |8359).X.|.old :..|
|00002900| 75 09 20 36 2e 35 09 09 | 73 09 30 2e 36 09 09 09 |u. 6.5..|s.0.6...|
|00002910| 3d 09 20 37 2e 31 0a 58 | 09 09 6e 65 77 20 3a 09 |=. 7.1.X|..new :.|
|00002920| 09 75 09 20 31 2e 36 09 | 09 73 09 30 2e 32 09 09 |.u. 1.6.|.s.0.2..|
|00002930| 09 3d 09 20 31 2e 38 0a | 58 0a 58 09 09 6d 61 63 |.=. 1.8.|X.X..mac|
|00002940| 68 69 6e 65 3a 20 56 41 | 58 20 36 38 30 30 20 20 |hine: VA|X 6800 |
|00002950| 09 20 20 20 4f 53 3a 20 | 55 6c 74 72 69 78 20 32 |. OS: |Ultrix 2|
|00002960| 2e 31 09 66 69 6c 65 3a | 20 2f 76 6d 75 6e 69 78 |.1.file:| /vmunix|
|00002970| 09 28 36 36 32 35 32 38 | 29 0a 58 09 09 6f 6c 64 |.(662528|).X..old|
|00002980| 20 3a 09 09 75 09 20 35 | 2e 32 09 09 73 09 30 2e | :..u. 5|.2..s.0.|
|00002990| 34 09 09 09 3d 09 20 35 | 2e 36 0a 58 09 09 6e 65 |4...=. 5|.6.X..ne|
|000029a0| 77 20 3a 09 09 75 09 20 | 30 2e 36 09 09 73 09 30 |w :..u. |0.6..s.0|
|000029b0| 2e 30 09 09 09 3d 09 20 | 30 2e 36 0a 58 0a 58 09 |.0...=. |0.6.X.X.|
|000029c0| 09 55 73 65 72 2c 20 73 | 79 73 20 61 6e 64 20 74 |.User, s|ys and t|
|000029d0| 6f 74 61 6c 20 74 69 6d | 65 73 20 69 6e 20 73 65 |otal tim|es in se|
|000029e0| 63 6f 6e 64 73 2e 0a 58 | 0a 58 09 61 64 20 62 2e |conds..X|.X.ad b.|
|000029f0| 29 0a 58 09 09 54 68 65 | 20 6f 72 69 67 69 6e 61 |).X..The| origina|
|00002a00| 6c 20 73 74 72 69 6e 67 | 73 0a 58 09 09 2d 20 74 |l string|s.X..- t|
|00002a10| 68 69 6e 6b 73 20 63 6f | 6e 74 72 6f 6c 2d 4c 20 |hinks co|ntrol-L |
|00002a20| 28 30 78 30 63 29 20 69 | 73 20 61 20 70 72 69 6e |(0x0c) i|s a prin|
|00002a30| 74 61 62 6c 65 20 63 68 | 61 72 61 63 74 65 72 0a |table ch|aracter.|
|00002a40| 58 09 09 2d 20 75 6e 64 | 65 72 20 73 6f 6d 65 20 |X..- und|er some |
|00002a50| 63 69 72 63 75 6d 73 74 | 61 6e 63 65 73 20 74 68 |circumst|ances th|
|00002a60| 69 6e 6b 73 20 30 78 38 | 30 20 69 73 20 70 72 69 |inks 0x8|0 is pri|
|00002a70| 6e 74 61 62 6c 65 2e 20 | 49 6e 20 74 68 65 0a 58 |ntable. |In the.X|
|00002a80| 09 09 20 20 70 61 63 6b | 61 67 65 20 74 68 65 72 |.. pack|age ther|
|00002a90| 65 20 69 73 20 61 20 66 | 69 6c 65 2c 20 74 65 73 |e is a f|ile, tes|
|00002aa0| 74 5f 69 6e 70 75 74 2e | 20 55 6e 70 61 63 6b 20 |t_input.| Unpack |
|00002ab0| 74 68 69 73 20 66 69 6c | 65 20 77 69 74 68 0a 58 |this fil|e with.X|
|00002ac0| 09 09 20 20 61 74 6f 62 | 2e 20 54 68 65 20 66 69 |.. atob|. The fi|
|00002ad0| 6c 65 20 6e 6f 77 20 63 | 6f 6e 74 61 69 6e 73 20 |le now c|ontains |
|00002ae0| 73 65 76 65 72 61 6c 20 | 6c 69 6e 65 73 20 6f 66 |several |lines of|
|00002af0| 20 63 68 61 72 61 63 74 | 65 72 73 20 69 6e 63 6c | charact|ers incl|
|00002b00| 75 64 69 6e 67 0a 58 09 | 09 20 20 61 20 6c 69 6e |uding.X.|. a lin|
|00002b10| 65 20 77 69 74 68 20 63 | 6f 6e 74 72 6f 6c 2d 4c |e with c|ontrol-L|
|00002b20| 20 61 6e 64 20 6f 6e 65 | 20 77 69 74 68 20 61 20 | and one| with a |
|00002b30| 30 78 38 30 2e 20 54 68 | 65 20 6f 72 69 67 69 6e |0x80. Th|e origin|
|00002b40| 61 6c 20 73 74 72 69 6e | 67 73 0a 58 09 09 20 20 |al strin|gs.X.. |
|00002b50| 65 72 72 73 20 66 6f 72 | 20 62 6f 74 68 20 63 61 |errs for| both ca|
|00002b60| 73 65 73 2e 0a 58 09 09 | 2d 20 64 69 64 20 6e 6f |ses..X..|- did no|
|00002b70| 74 20 67 65 74 20 74 68 | 65 20 73 74 61 72 74 20 |t get th|e start |
|00002b80| 61 64 64 72 65 73 73 20 | 6f 66 20 74 68 65 20 69 |address |of the i|
|00002b90| 6e 69 74 69 61 6c 69 7a | 65 64 20 64 61 74 61 20 |nitializ|ed data |
|00002ba0| 72 69 67 68 74 20 6f 6e | 0a 58 09 09 20 20 73 6f |right on|.X.. so|
|00002bb0| 6d 65 20 73 79 73 74 65 | 6d 73 2e 0a 58 09 09 2d |me syste|ms..X..-|
|00002bc0| 20 68 61 64 20 70 72 6f | 62 6c 65 6d 73 20 77 68 | had pro|blems wh|
|00002bd0| 65 6e 20 64 65 61 6c 69 | 6e 67 20 77 69 74 68 20 |en deali|ng with |
|00002be0| 74 68 65 20 73 74 61 6e | 64 61 72 64 20 69 6e 70 |the stan|dard inp|
|00002bf0| 75 74 2e 0a 58 09 09 54 | 68 65 20 66 69 72 73 74 |ut..X..T|he first|
|00002c00| 20 74 77 6f 20 62 75 67 | 73 20 68 61 76 65 20 62 | two bug|s have b|
|00002c10| 65 65 6e 20 66 6f 75 6e | 64 20 6f 6e 20 34 33 42 |een foun|d on 43B|
|00002c20| 53 44 2c 20 53 75 6e 4f | 53 20 61 6e 64 20 55 4c |SD, SunO|S and UL|
|00002c30| 54 52 49 58 2c 20 74 68 | 65 0a 58 09 09 74 68 69 |TRIX, th|e.X..thi|
|00002c40| 72 64 20 6f 6e 6c 79 20 | 6f 6e 20 4d 58 32 20 53 |rd only |on MX2 S|
|00002c50| 49 4e 49 58 20 76 32 2e | 31 2e 0a 58 0a 58 34 2e |INIX v2.|1..X.X4.|
|00002c60| 29 20 57 68 61 74 20 61 | 62 6f 75 74 20 62 75 67 |) What a|bout bug|
|00002c70| 73 3f 0a 58 0a 58 09 49 | 66 20 79 6f 75 20 66 69 |s?.X.X.I|f you fi|
|00002c80| 6e 64 20 62 75 67 73 2c | 20 74 65 6c 6c 20 6d 65 |nd bugs,| tell me|
|00002c90| 2e 20 49 66 20 79 6f 75 | 20 66 69 78 65 64 20 74 |. If you| fixed t|
|00002ca0| 68 65 6d 20 6f 72 20 69 | 66 20 79 6f 75 20 6d 61 |hem or i|f you ma|
|00002cb0| 64 65 20 61 6e 0a 58 09 | 65 78 74 65 6e 73 69 6f |de an.X.|extensio|
|00002cc0| 6e 20 77 68 69 63 68 20 | 72 65 61 6c 6c 79 20 69 |n which |really i|
|00002cd0| 73 20 6f 6e 65 2c 20 64 | 72 6f 70 20 6d 65 20 61 |s one, d|rop me a|
|00002ce0| 20 6e 6f 74 65 2e 0a 58 | 0a 58 35 2e 29 20 4e 6f | note..X|.X5.) No|
|00002cf0| 74 65 73 0a 58 0a 58 09 | 54 68 69 73 20 70 72 6f |tes.X.X.|This pro|
|00002d00| 67 72 61 6d 20 69 73 20 | 61 62 6f 75 74 20 37 20 |gram is |about 7 |
|00002d10| 74 69 6d 65 73 20 66 61 | 73 74 65 72 20 74 68 61 |times fa|ster tha|
|00002d20| 6e 20 74 68 65 20 6f 72 | 69 67 6e 61 6c 20 6f 6e |n the or|ignal on|
|00002d30| 65 2e 0a 58 09 54 68 65 | 72 65 20 61 72 65 20 74 |e..X.The|re are t|
|00002d40| 77 6f 20 72 65 61 73 6f | 6e 73 20 66 6f 72 20 74 |wo reaso|ns for t|
|00002d50| 68 69 73 3a 0a 58 09 2d | 20 49 74 20 64 6f 65 73 |his:.X.-| It does|
|00002d60| 20 6e 6f 74 20 75 73 65 | 20 66 67 65 74 63 2f 66 | not use| fgetc/f|
|00002d70| 70 75 74 63 20 74 6f 20 | 67 65 74 20 6f 72 20 70 |putc to |get or p|
|00002d80| 75 74 20 63 68 61 72 61 | 63 74 65 72 73 2c 20 62 |ut chara|cters, b|
|00002d90| 75 74 0a 58 09 20 20 72 | 65 61 64 73 20 63 68 61 |ut.X. r|eads cha|
|00002da0| 72 61 63 74 65 72 73 20 | 69 6e 20 62 6c 6f 63 6b |racters |in block|
|00002db0| 73 2e 20 49 74 20 64 6f | 65 73 20 6e 6f 74 20 63 |s. It do|es not c|
|00002dc0| 6f 70 79 20 74 68 65 6d | 20 62 75 74 20 72 61 74 |opy them| but rat|
|00002dd0| 68 65 72 20 6d 6f 76 65 | 73 0a 58 09 20 20 70 6f |her move|s.X. po|
|00002de0| 69 6e 74 65 72 73 20 61 | 72 6f 75 6e 64 20 6f 6e |inters a|round on|
|00002df0| 20 74 68 65 20 69 6e 70 | 75 74 20 62 75 66 66 65 | the inp|ut buffe|
|00002e00| 72 2e 20 54 68 65 72 65 | 20 69 73 20 6e 6f 0a 58 |r. There| is no.X|
|00002e10| 09 20 20 70 72 6f 63 65 | 64 75 72 65 20 63 61 6c |. proce|dure cal|
|00002e20| 6c 20 6e 65 65 64 65 64 | 20 74 6f 20 67 65 74 20 |l needed| to get |
|00002e30| 61 74 20 65 61 63 68 20 | 63 68 61 72 61 63 74 65 |at each |characte|
|00002e40| 72 2e 0a 58 09 20 20 57 | 68 65 6e 20 61 20 73 65 |r..X. W|hen a se|
|00002e50| 71 75 65 6e 63 65 20 69 | 73 20 66 6f 75 6e 64 2c |quence i|s found,|
|00002e60| 20 69 74 20 69 73 20 70 | 75 74 20 69 6e 74 6f 20 | it is p|ut into |
|00002e70| 74 68 65 20 6f 75 74 70 | 75 74 20 62 75 66 66 65 |the outp|ut buffe|
|00002e80| 72 20 69 6e 20 6f 6e 65 | 0a 58 09 20 20 62 6c 6f |r in one|.X. blo|
|00002e90| 63 6b 2c 20 74 68 75 73 | 20 74 68 65 72 65 20 69 |ck, thus| there i|
|00002ea0| 73 20 6e 6f 20 6e 65 65 | 64 2c 20 6c 69 6b 65 20 |s no nee|d, like |
|00002eb0| 69 6e 20 66 70 75 74 63 | 2c 20 74 6f 20 63 68 65 |in fputc|, to che|
|00002ec0| 63 6b 20 66 6f 72 20 70 | 6f 73 73 69 62 6c 65 0a |ck for p|ossible.|
|00002ed0| 58 09 20 20 6f 76 65 72 | 66 6c 6f 77 20 66 6f 72 |X. over|flow for|
|00002ee0| 20 65 61 63 68 20 63 68 | 61 72 61 63 74 65 72 2e | each ch|aracter.|
|00002ef0| 0a 58 09 2d 20 57 68 65 | 6e 20 74 68 65 20 70 72 |.X.- Whe|n the pr|
|00002f00| 6f 67 72 61 6d 20 73 65 | 61 72 63 68 65 73 20 66 |ogram se|arches f|
|00002f10| 6f 72 20 61 20 73 65 71 | 75 65 6e 63 65 20 6f 66 |or a seq|uence of|
|00002f20| 20 70 72 69 6e 74 61 62 | 6c 65 20 63 68 61 72 61 | printab|le chara|
|00002f30| 63 74 65 72 73 0a 58 09 | 20 20 69 74 20 6f 6e 6c |cters.X.| it onl|
|00002f40| 79 20 65 78 61 6d 69 6e | 65 73 20 65 61 63 68 20 |y examin|es each |
|00002f50| 6d 69 6e 5f 73 74 72 5f | 6c 65 6e 20 63 68 61 72 |min_str_|len char|
|00002f60| 61 63 74 65 72 20 69 6e | 73 74 65 61 64 20 6f 66 |acter in|stead of|
|00002f70| 20 65 61 63 68 20 6f 6e | 65 2e 0a 58 20 09 20 20 | each on|e..X . |
|00002f80| 6d 69 6e 5f 73 74 72 5f | 6c 65 6e 20 64 65 66 61 |min_str_|len defa|
|00002f90| 75 6c 74 73 20 74 6f 20 | 34 20 61 6e 64 20 63 61 |ults to |4 and ca|
|00002fa0| 6e 20 62 65 20 73 65 74 | 20 77 69 74 68 20 63 6f |n be set| with co|
|00002fb0| 6d 6d 61 6e 64 20 6c 69 | 6e 65 20 6f 70 74 69 6f |mmand li|ne optio|
|00002fc0| 6e 0a 58 09 20 20 6c 69 | 6b 65 20 22 73 74 72 69 |n.X. li|ke "stri|
|00002fd0| 6e 67 73 20 2d 33 22 2e | 0a 58 0a 58 09 49 74 20 |ngs -3".|.X.X.It |
|00002fe0| 63 61 6e 20 62 65 20 73 | 70 65 64 20 75 70 20 73 |can be s|ped up s|
|00002ff0| 6f 6d 65 20 6d 6f 72 65 | 2c 20 62 75 74 20 74 68 |ome more|, but th|
|00003000| 65 6e 20 69 74 20 77 6f | 75 6c 64 20 62 65 20 64 |en it wo|uld be d|
|00003010| 69 66 66 69 63 75 6c 74 | 20 74 6f 20 70 6f 72 74 |ifficult| to port|
|00003020| 0a 58 09 69 74 20 74 6f | 20 64 69 66 66 65 72 65 |.X.it to| differe|
|00003030| 6e 74 20 73 79 73 74 65 | 6d 73 2e 0a 58 09 45 78 |nt syste|ms..X.Ex|
|00003040| 61 6d 70 6c 65 3a 0a 58 | 09 43 75 72 72 65 6e 74 |ample:.X|.Current|
|00003050| 6c 79 20 74 68 65 20 70 | 72 6f 67 72 61 6d 20 74 |ly the p|rogram t|
|00003060| 61 6b 65 73 20 36 2e 30 | 20 73 65 63 6f 6e 64 73 |akes 6.0| seconds|
|00003070| 20 6f 6e 20 4d 58 32 20 | 66 6f 72 20 2f 76 6d 73 | on MX2 |for /vms|
|00003080| 69 6e 69 78 2e 0a 58 09 | 54 68 65 20 69 6d 70 72 |inix..X.|The impr|
|00003090| 6f 76 65 64 20 76 65 72 | 73 69 6f 6e 20 6f 6e 6c |oved ver|sion onl|
|000030a0| 79 20 6e 65 65 64 73 20 | 35 2e 35 20 73 65 63 6f |y needs |5.5 seco|
|000030b0| 6e 64 73 2e 20 49 74 20 | 69 73 20 61 6c 73 6f 20 |nds. It |is also |
|000030c0| 6d 75 63 68 20 73 6d 61 | 6c 6c 65 72 3a 0a 58 09 |much sma|ller:.X.|
|000030d0| 36 39 37 36 20 62 79 74 | 65 73 20 63 6f 6d 70 61 |6976 byt|es compa|
|000030e0| 72 65 64 20 74 6f 20 31 | 30 35 39 36 2e 0a 58 09 |red to 1|0596..X.|
|000030f0| 57 61 79 73 20 74 6f 20 | 69 6d 70 72 6f 76 65 20 |Ways to |improve |
|00003100| 74 68 65 20 70 72 6f 67 | 72 61 6d 3a 0a 58 09 2d |the prog|ram:.X.-|
|00003110| 20 4f 6e 20 73 6f 6d 65 | 20 6d 61 63 68 69 6e 65 | On some| machine|
|00003120| 73 20 61 6e 6f 74 68 65 | 72 20 6d 65 74 68 6f 64 |s anothe|r method|
|00003130| 20 74 6f 20 74 65 73 74 | 20 77 68 65 74 68 65 72 | to test| whether|
|00003140| 20 61 20 63 68 61 72 61 | 63 74 65 72 20 69 73 20 | a chara|cter is |
|00003150| 70 72 69 6e 74 61 62 6c | 65 0a 58 09 20 20 77 69 |printabl|e.X. wi|
|00003160| 6c 6c 20 62 65 20 66 61 | 73 74 65 72 2e 20 4e 6f |ll be fa|ster. No|
|00003170| 77 20 74 68 65 20 70 72 | 6f 67 72 61 6d 20 75 73 |w the pr|ogram us|
|00003180| 65 73 20 61 6e 20 61 72 | 72 61 79 20 28 69 73 70 |es an ar|ray (isp|
|00003190| 29 2c 20 75 73 65 73 20 | 61 20 63 68 61 72 61 63 |), uses |a charac|
|000031a0| 74 65 72 0a 58 09 20 20 | 63 61 73 74 20 74 6f 20 |ter.X. |cast to |
|000031b0| 61 20 28 73 69 67 6e 65 | 64 29 20 69 6e 74 65 67 |a (signe|d) integ|
|000031c0| 65 72 20 61 73 20 69 6e | 64 65 78 20 69 6e 74 6f |er as in|dex into|
|000031d0| 20 74 68 69 73 20 61 72 | 72 61 79 20 28 69 73 70 | this ar|ray (isp|
|000031e0| 5f 6d 69 64 20 69 73 20 | 74 68 65 0a 58 09 20 20 |_mid is |the.X. |
|000031f0| 62 61 73 65 20 66 72 6f | 6d 20 77 68 69 63 68 20 |base fro|m which |
|00003200| 6f 66 66 73 65 74 73 20 | 61 72 65 20 63 6f 6d 70 |offsets |are comp|
|00003210| 75 74 65 64 29 2e 0a 58 | 09 20 20 4f 6e 20 4d 58 |uted)..X|. On MX|
|00003220| 32 2c 20 61 6e 64 2c 20 | 69 66 20 49 20 62 65 6c |2, and, |if I bel|
|00003230| 69 65 76 65 20 6d 79 20 | 74 65 73 74 73 2c 20 6f |ieve my |tests, o|
|00003240| 6e 20 56 41 58 2c 20 69 | 74 20 69 73 20 66 61 73 |n VAX, i|t is fas|
|00003250| 74 65 72 2c 20 74 6f 20 | 75 73 65 0a 58 09 20 20 |ter, to |use.X. |
|00003260| 75 6e 73 69 67 6e 65 64 | 20 63 68 61 72 61 63 74 |unsigned| charact|
|00003270| 65 72 73 20 61 73 20 69 | 6e 64 65 78 20 69 6e 74 |ers as i|ndex int|
|00003280| 6f 20 74 68 69 73 20 61 | 72 72 61 79 2e 0a 58 09 |o this a|rray..X.|
|00003290| 20 20 49 66 20 79 6f 75 | 20 77 61 6e 74 20 74 6f | If you| want to|
|000032a0| 20 70 6c 61 79 20 61 72 | 6f 75 6e 64 20 77 69 74 | play ar|ound wit|
|000032b0| 68 20 74 68 69 73 2c 20 | 6a 75 73 74 20 63 68 61 |h this, |just cha|
|000032c0| 6e 67 65 20 43 48 41 52 | 5f 54 59 50 45 20 74 6f |nge CHAR|_TYPE to|
|000032d0| 0a 58 09 20 20 27 75 6e | 73 69 67 6e 65 64 20 62 |.X. 'un|signed b|
|000032e0| 79 74 65 27 20 61 6e 64 | 20 64 65 66 69 6e 65 20 |yte' and| define |
|000032f0| 74 68 65 20 6d 61 63 72 | 6f 20 49 53 5f 50 52 49 |the macr|o IS_PRI|
|00003300| 4e 54 41 42 4c 45 20 61 | 63 63 6f 72 64 69 6e 67 |NTABLE a|ccording|
|00003310| 6c 79 20 74 6f 0a 58 09 | 20 20 27 28 69 73 70 5b |ly to.X.| '(isp[|
|00003320| 63 5d 29 27 0a 58 09 2d | 20 49 74 20 6d 61 6b 65 |c])'.X.-| It make|
|00003330| 73 20 61 20 64 69 66 66 | 65 72 65 6e 63 65 20 28 |s a diff|erence (|
|00003340| 61 6c 74 68 6f 75 67 68 | 20 61 20 73 6d 61 6c 6c |although| a small|
|00003350| 20 6f 6e 65 29 2c 20 77 | 68 61 74 20 62 61 73 69 | one), w|hat basi|
|00003360| 63 20 74 79 70 65 20 79 | 6f 75 0a 58 09 20 20 63 |c type y|ou.X. c|
|00003370| 68 6f 6f 73 65 20 66 6f | 72 20 74 68 65 20 69 73 |hoose fo|r the is|
|00003380| 70 20 61 72 72 61 79 2e | 20 4f 6e 20 4d 58 32 20 |p array.| On MX2 |
|00003390| 73 68 6f 72 74 20 69 73 | 20 62 65 73 74 2c 20 62 |short is| best, b|
|000033a0| 75 74 20 63 68 61 72 20 | 69 73 20 6e 65 61 72 6c |ut char |is nearl|
|000033b0| 79 0a 58 09 20 20 61 73 | 20 67 6f 6f 64 2e 0a 58 |y.X. as| good..X|
|000033c0| 09 2d 20 59 6f 75 20 63 | 61 6e 20 6d 61 6b 65 20 |.- You c|an make |
|000033d0| 69 74 20 73 6d 61 6c 6c | 65 72 2e 20 54 68 65 20 |it small|er. The |
|000033e0| 70 72 6f 67 72 61 6d 20 | 64 6f 65 73 20 6e 6f 74 |program |does not|
|000033f0| 20 6e 65 65 64 20 73 74 | 64 69 6f 2e 20 42 75 74 | need st|dio. But|
|00003400| 0a 58 09 20 20 65 78 69 | 74 20 6e 6f 72 6d 61 6c |.X. exi|t normal|
|00003410| 6c 79 20 63 6c 6f 73 65 | 73 20 66 69 6c 65 20 64 |ly close|s file d|
|00003420| 65 73 63 72 69 70 74 6f | 72 73 2c 20 61 6e 64 20 |escripto|rs, and |
|00003430| 74 68 65 72 65 66 6f 72 | 65 20 69 6e 63 6c 75 64 |therefor|e includ|
|00003440| 65 73 20 61 0a 58 09 20 | 20 6c 61 72 67 65 20 70 |es a.X. | large p|
|00003450| 61 72 74 20 6f 66 20 74 | 68 65 20 73 74 64 69 6f |art of t|he stdio|
|00003460| 20 73 74 75 66 66 2e 20 | 57 65 6c 6c 2c 20 61 62 | stuff. |Well, ab|
|00003470| 6f 75 74 20 34 20 4b 20 | 6f 6e 20 73 6f 6d 65 20 |out 4 K |on some |
|00003480| 73 79 73 74 65 6d 73 2e | 0a 58 09 20 20 49 66 20 |systems.|.X. If |
|00003490| 79 6f 75 20 6b 6e 6f 77 | 20 77 68 61 74 20 79 6f |you know| what yo|
|000034a0| 75 72 20 65 78 69 74 20 | 64 6f 65 73 2c 20 79 6f |ur exit |does, yo|
|000034b0| 75 20 63 61 6e 20 73 75 | 62 73 74 69 74 75 74 65 |u can su|bstitute|
|000034c0| 20 61 20 73 75 69 74 61 | 62 6c 65 0a 58 09 20 20 | a suita|ble.X. |
|000034d0| 72 6f 75 74 69 6e 65 20 | 6f 66 20 79 6f 75 72 20 |routine |of your |
|000034e0| 6f 77 6e 2e 20 45 2e 67 | 2e 20 6f 6e 20 4d 58 32 |own. E.g|. on MX2|
|000034f0| 2c 20 65 78 69 74 20 63 | 61 6c 6c 73 20 5f 63 6c |, exit c|alls _cl|
|00003500| 65 61 6e 75 70 2c 20 77 | 68 69 63 68 0a 58 09 20 |eanup, w|hich.X. |
|00003510| 20 6f 6e 6c 79 20 63 6c | 6f 73 65 73 20 61 6c 6c | only cl|oses all|
|00003520| 20 6f 70 65 6e 20 66 69 | 6c 65 20 64 65 73 63 72 | open fi|le descr|
|00003530| 69 70 74 6f 72 73 2e 20 | 41 73 20 49 20 6b 6e 6f |iptors. |As I kno|
|00003540| 77 20 74 68 61 74 20 6f | 6e 6c 79 20 74 68 65 0a |w that o|nly the.|
|00003550| 58 09 20 20 73 74 61 6e | 64 61 72 64 20 64 65 73 |X. stan|dard des|
|00003560| 63 72 69 70 74 6f 72 73 | 20 61 72 65 20 6f 70 65 |criptors| are ope|
|00003570| 6e 20 61 74 20 74 68 65 | 20 65 6e 64 20 6f 66 20 |n at the| end of |
|00003580| 74 68 65 20 70 72 6f 67 | 72 61 6d 2c 20 49 20 63 |the prog|ram, I c|
|00003590| 61 6e 0a 58 09 20 20 77 | 72 69 74 65 20 61 20 5f |an.X. w|rite a _|
|000035a0| 63 6c 65 61 6e 75 70 20 | 77 68 69 63 68 20 6f 6e |cleanup |which on|
|000035b0| 6c 79 20 64 6f 65 73 20 | 61 20 63 6c 6f 73 65 20 |ly does |a close |
|000035c0| 6f 6e 20 30 2c 20 31 2c | 20 61 6e 64 20 32 2e 0a |on 0, 1,| and 2..|
|000035d0| 58 0a 58 09 54 68 65 20 | 73 61 76 69 6e 67 73 20 |X.X.The |savings |
|000035e0| 74 68 61 74 20 79 6f 75 | 20 67 65 74 20 61 72 65 |that you| get are|
|000035f0| 20 61 6c 6d 6f 73 74 20 | 69 6e 76 69 73 69 62 6c | almost |invisibl|
|00003600| 65 2c 20 74 68 65 79 20 | 61 72 65 20 6e 6f 74 20 |e, they |are not |
|00003610| 65 61 73 69 6c 79 0a 58 | 09 70 6f 72 74 61 62 6c |easily.X|.portabl|
|00003620| 65 2c 20 62 75 74 20 72 | 61 74 68 65 72 20 72 65 |e, but r|ather re|
|00003630| 71 75 69 72 65 20 61 20 | 63 65 72 74 61 69 6e 20 |quire a |certain |
|00003640| 61 6d 6f 75 6e 74 20 6f | 66 20 72 65 73 65 61 72 |amount o|f resear|
|00003650| 63 68 20 6f 6e 20 70 61 | 72 74 0a 58 09 6f 66 20 |ch on pa|rt.X.of |
|00003660| 74 68 65 20 70 65 72 73 | 6f 6e 20 64 6f 69 6e 67 |the pers|on doing|
|00003670| 20 74 68 65 20 20 70 6f | 72 74 69 6e 67 2e 20 49 | the po|rting. I|
|00003680| 20 63 68 6f 73 65 20 6e | 6f 74 20 74 6f 20 66 69 | chose n|ot to fi|
|00003690| 74 20 74 68 65 20 70 72 | 6f 67 72 61 6d 73 20 77 |t the pr|ograms w|
|000036a0| 69 74 68 0a 58 09 6f 70 | 74 69 6f 6e 73 20 74 6f |ith.X.op|tions to|
|000036b0| 20 61 64 6a 75 73 74 20 | 74 68 65 73 65 20 74 68 | adjust |these th|
|000036c0| 69 6e 67 73 2e 0a 58 0a | 58 09 54 68 65 72 65 20 |ings..X.|X.There |
|000036d0| 61 72 65 20 73 74 69 6c | 6c 20 73 6f 6d 65 20 44 |are stil|l some D|
|000036e0| 45 42 55 47 20 73 74 61 | 74 65 6d 65 6e 74 73 20 |EBUG sta|tements |
|000036f0| 69 6e 20 74 68 65 20 63 | 6f 64 65 2e 20 59 6f 75 |in the c|ode. You|
|00003700| 20 67 65 74 20 74 68 65 | 6d 0a 58 09 69 66 20 79 | get the|m.X.if y|
|00003710| 6f 75 20 73 65 74 20 44 | 45 42 55 47 46 4c 41 47 |ou set D|EBUGFLAG|
|00003720| 53 3d 2d 44 44 45 42 55 | 47 2e 0a 58 0a 58 36 2e |S=-DDEBU|G..X.X6.|
|00003730| 29 20 53 74 61 74 75 73 | 0a 58 0a 58 09 54 68 69 |) Status|.X.X.Thi|
|00003740| 73 20 70 72 6f 67 72 61 | 6d 20 69 73 20 70 6c 61 |s progra|m is pla|
|00003750| 63 65 64 20 69 6e 74 6f | 20 74 68 65 20 70 75 62 |ced into| the pub|
|00003760| 6c 69 63 20 64 6f 6d 61 | 69 6e 2e 0a 58 09 54 68 |lic doma|in..X.Th|
|00003770| 65 20 43 6f 70 79 72 69 | 67 68 74 20 4e 6f 74 69 |e Copyri|ght Noti|
|00003780| 63 65 20 69 6e 20 43 4f | 50 59 49 4e 47 20 61 70 |ce in CO|PYING ap|
|00003790| 70 6c 69 65 73 2e 0a 58 | 0a 58 41 62 73 6f 72 62 |plies..X|.XAbsorb|
|000037a0| 2c 20 61 70 70 6c 79 20 | 61 6e 64 20 65 6e 6a 6f |, apply |and enjo|
|000037b0| 79 2c 0a 58 09 09 4d 69 | 63 68 61 65 6c 20 47 72 |y,.X..Mi|chael Gr|
|000037c0| 65 69 6d 0a 45 4e 44 5f | 4f 46 5f 46 49 4c 45 0a |eim.END_|OF_FILE.|
|000037d0| 69 66 20 74 65 73 74 20 | 37 36 30 31 20 2d 6e 65 |if test |7601 -ne|
|000037e0| 20 60 77 63 20 2d 63 20 | 3c 27 52 45 41 44 4d 45 | `wc -c |<'README|
|000037f0| 27 60 3b 20 74 68 65 6e | 0a 20 20 20 20 65 63 68 |'`; then|. ech|
|00003800| 6f 20 73 68 61 72 3a 20 | 5c 22 27 52 45 41 44 4d |o shar: |\"'READM|
|00003810| 45 27 5c 22 20 75 6e 70 | 61 63 6b 65 64 20 77 69 |E'\" unp|acked wi|
|00003820| 74 68 20 77 72 6f 6e 67 | 20 73 69 7a 65 21 0a 66 |th wrong| size!.f|
|00003830| 69 0a 23 20 65 6e 64 20 | 6f 66 20 27 52 45 41 44 |i.# end |of 'READ|
|00003840| 4d 45 27 0a 66 69 0a 69 | 66 20 74 65 73 74 20 2d |ME'.fi.i|f test -|
|00003850| 66 20 27 63 6f 6e 66 69 | 67 2e 68 27 20 2d 61 20 |f 'confi|g.h' -a |
|00003860| 22 24 7b 31 7d 22 20 21 | 3d 20 22 2d 63 22 20 3b |"${1}" !|= "-c" ;|
|00003870| 20 74 68 65 6e 20 0a 20 | 20 65 63 68 6f 20 73 68 | then . | echo sh|
|00003880| 61 72 3a 20 57 69 6c 6c | 20 6e 6f 74 20 63 6c 6f |ar: Will| not clo|
|00003890| 62 62 65 72 20 65 78 69 | 73 74 69 6e 67 20 66 69 |bber exi|sting fi|
|000038a0| 6c 65 20 5c 22 27 63 6f | 6e 66 69 67 2e 68 27 5c |le \"'co|nfig.h'\|
|000038b0| 22 0a 65 6c 73 65 0a 65 | 63 68 6f 20 73 68 61 72 |".else.e|cho shar|
|000038c0| 3a 20 45 78 74 72 61 63 | 74 69 6e 67 20 5c 22 27 |: Extrac|ting \"'|
|000038d0| 63 6f 6e 66 69 67 2e 68 | 27 5c 22 20 5c 28 32 37 |config.h|'\" \(27|
|000038e0| 36 35 20 63 68 61 72 61 | 63 74 65 72 73 5c 29 0a |65 chara|cters\).|
|000038f0| 73 65 64 20 22 73 2f 5e | 58 2f 2f 22 20 3e 27 63 |sed "s/^|X//" >'c|
|00003900| 6f 6e 66 69 67 2e 68 27 | 20 3c 3c 27 45 4e 44 5f |onfig.h'| <<'END_|
|00003910| 4f 46 5f 46 49 4c 45 27 | 0a 58 2f 2a 0a 58 20 2a |OF_FILE'|.X/*.X *|
|00003920| 20 54 68 69 73 20 66 69 | 6c 65 20 69 73 20 75 73 | This fi|le is us|
|00003930| 65 64 20 77 69 74 68 69 | 6e 20 73 74 72 69 6e 67 |ed withi|n string|
|00003940| 73 2e 0a 58 20 2a 20 59 | 6f 75 20 63 61 6e 20 61 |s..X * Y|ou can a|
|00003950| 64 64 20 73 70 65 63 69 | 66 69 63 20 64 65 66 69 |dd speci|fic defi|
|00003960| 6e 65 73 20 66 6f 72 20 | 61 20 6d 61 63 68 69 6e |nes for |a machin|
|00003970| 65 20 62 65 6c 6f 77 2e | 20 44 65 66 69 6e 65 20 |e below.| Define |
|00003980| 6e 65 69 74 68 65 72 0a | 58 20 2a 20 53 41 46 45 |neither.|X * SAFE|
|00003990| 54 59 5f 46 49 52 53 54 | 20 6e 6f 72 20 55 53 45 |TY_FIRST| nor USE|
|000039a0| 5f 55 53 45 52 5f 44 45 | 46 49 4e 45 53 0a 58 20 |_USER_DE|FINES.X |
|000039b0| 2a 20 44 65 66 69 6e 65 | 73 20 66 6f 72 20 79 6f |* Define|s for yo|
|000039c0| 75 72 20 63 75 72 72 65 | 6e 74 20 6d 61 63 68 69 |ur curre|nt machi|
|000039d0| 6e 65 20 73 68 6f 75 6c | 64 20 67 6f 20 69 6e 20 |ne shoul|d go in |
|000039e0| 74 75 6e 65 2e 68 2e 20 | 44 65 66 69 6e 65 0a 58 |tune.h. |Define.X|
|000039f0| 20 2a 20 55 53 45 5f 55 | 53 45 52 5f 44 45 46 49 | * USE_U|SER_DEFI|
|00003a00| 4e 45 53 2e 0a 58 20 2a | 0a 58 20 2a 20 73 63 63 |NES..X *|.X * scc|
|00003a10| 73 69 64 20 3a 20 40 28 | 23 29 20 20 63 6f 6e 66 |sid : @(|#) conf|
|00003a20| 69 67 2e 68 20 20 28 76 | 36 2e 35 20 35 2f 32 32 |ig.h (v|6.5 5/22|
|00003a30| 2f 38 39 29 0a 58 20 2a | 0a 58 20 2a 20 46 4f 55 |/89).X *|.X * FOU|
|00003a40| 4e 44 20 77 69 6c 6c 20 | 63 6f 6e 74 61 69 6e 20 |ND will |contain |
|00003a50| 61 20 73 74 72 69 6e 67 | 20 74 65 6c 6c 69 6e 67 |a string| telling|
|00003a60| 20 77 68 61 74 20 64 65 | 66 69 6e 65 73 20 68 61 | what de|fines ha|
|00003a70| 76 65 20 62 65 65 6e 20 | 75 73 65 64 2e 0a 58 20 |ve been |used..X |
|00003a80| 2a 2f 0a 58 0a 58 23 20 | 69 66 6e 64 65 66 20 53 |*/.X.X# |ifndef S|
|00003a90| 41 46 45 54 59 5f 46 49 | 52 53 54 0a 58 23 09 69 |AFETY_FI|RST.X#.i|
|00003aa0| 66 64 65 66 20 55 53 45 | 5f 55 53 45 52 5f 44 45 |fdef USE|_USER_DE|
|00003ab0| 46 49 4e 45 53 0a 58 23 | 09 09 64 65 66 69 6e 65 |FINES.X#|..define|
|00003ac0| 20 46 4f 55 4e 44 09 09 | 22 55 73 69 6e 67 20 74 | FOUND..|"Using t|
|00003ad0| 68 65 20 75 73 65 72 20 | 64 65 66 69 6e 65 73 2e |he user |defines.|
|00003ae0| 22 0a 58 23 09 09 69 6e | 63 6c 75 64 65 20 22 74 |".X#..in|clude "t|
|00003af0| 75 6e 65 2e 68 22 0a 58 | 23 09 65 6c 73 65 20 55 |une.h".X|#.else U|
|00003b00| 53 45 5f 55 53 45 52 5f | 44 45 46 49 4e 45 53 0a |SE_USER_|DEFINES.|
|00003b10| 58 09 09 2f 2a 0a 58 09 | 09 20 2a 20 41 64 64 20 |X../*.X.|. * Add |
|00003b20| 28 61 6c 6c 29 20 64 65 | 66 69 6e 65 73 20 66 6f |(all) de|fines fo|
|00003b30| 72 20 79 6f 75 72 20 6d | 61 63 68 69 6e 65 20 68 |r your m|achine h|
|00003b40| 65 72 65 2e 0a 58 09 09 | 20 2a 2f 0a 58 23 09 09 |ere..X..| */.X#..|
|00003b50| 69 66 20 64 65 66 69 6e | 65 64 28 6e 73 63 33 32 |if defin|ed(nsc32|
|00003b60| 30 30 30 29 20 26 26 20 | 64 65 66 69 6e 65 64 28 |000) && |defined(|
|00003b70| 73 69 6e 69 78 29 20 26 | 26 20 64 65 66 69 6e 65 |sinix) &|& define|
|00003b80| 64 28 6e 73 31 36 30 30 | 30 29 0a 58 23 09 09 09 |d(ns1600|0).X#...|
|00003b90| 64 65 66 69 6e 65 20 46 | 4f 55 4e 44 09 09 09 09 |define F|OUND....|
|00003ba0| 09 09 22 55 73 69 6e 67 | 20 64 65 66 61 75 6c 74 |.."Using| default|
|00003bb0| 73 20 66 6f 72 20 73 69 | 6e 69 78 20 4d 58 32 2e |s for si|nix MX2.|
|00003bc0| 22 0a 58 23 09 09 09 64 | 65 66 69 6e 65 20 46 43 |".X#...d|efine FC|
|00003bd0| 4e 54 4c 09 09 09 09 09 | 09 32 0a 58 23 09 09 09 |NTL.....|.2.X#...|
|00003be0| 64 65 66 69 6e 65 20 46 | 41 53 54 5f 43 4f 50 59 |define F|AST_COPY|
|00003bf0| 28 66 72 6f 6d 2c 74 6f | 2c 63 6f 75 6e 74 29 09 |(from,to|,count).|
|00003c00| 09 62 63 6f 70 79 28 66 | 72 6f 6d 2c 74 6f 2c 63 |.bcopy(f|rom,to,c|
|00003c10| 6f 75 6e 74 29 0a 58 23 | 09 09 09 64 65 66 69 6e |ount).X#|...defin|
|00003c20| 65 20 57 48 41 54 5f 4c | 53 45 45 4b 09 09 09 09 |e WHAT_L|SEEK....|
|00003c30| 09 31 0a 58 23 09 09 09 | 64 65 66 69 6e 65 20 49 |.1.X#...|define I|
|00003c40| 5f 53 50 45 43 49 41 4c | 0a 58 23 09 09 09 64 65 |_SPECIAL|.X#...de|
|00003c50| 66 69 6e 65 20 49 4e 5f | 42 55 46 5f 4c 45 4e 09 |fine IN_|BUF_LEN.|
|00003c60| 09 09 09 09 31 30 32 34 | 0a 58 23 09 09 09 64 65 |....1024|.X#...de|
|00003c70| 66 69 6e 65 20 4f 55 54 | 5f 42 55 46 5f 4c 45 4e |fine OUT|_BUF_LEN|
|00003c80| 09 09 09 09 09 38 31 39 | 32 0a 58 23 09 09 09 64 |.....819|2.X#...d|
|00003c90| 65 66 69 6e 65 20 54 48 | 52 45 53 48 4f 4c 44 09 |efine TH|RESHOLD.|
|00003ca0| 09 09 09 09 31 30 32 34 | 0a 58 23 09 09 65 6e 64 |....1024|.X#..end|
|00003cb0| 69 66 20 2f 2a 20 6e 73 | 63 33 32 30 30 30 20 26 |if /* ns|c32000 &|
|00003cc0| 26 20 73 69 6e 69 78 20 | 26 26 20 6e 73 31 36 30 |& sinix |&& ns160|
|00003cd0| 30 30 20 2a 2f 0a 58 23 | 09 09 69 66 20 64 65 66 |00 */.X#|..if def|
|00003ce0| 69 6e 65 64 28 75 6e 69 | 78 29 20 26 26 20 64 65 |ined(uni|x) && de|
|00003cf0| 66 69 6e 65 64 28 76 61 | 78 29 20 26 26 20 21 64 |fined(va|x) && !d|
|00003d00| 65 66 69 6e 65 64 28 75 | 6c 74 72 69 78 29 0a 58 |efined(u|ltrix).X|
|00003d10| 23 09 09 09 64 65 66 69 | 6e 65 20 46 4f 55 4e 44 |#...defi|ne FOUND|
|00003d20| 09 09 09 09 09 09 22 55 | 73 69 6e 67 20 64 65 66 |......"U|sing def|
|00003d30| 61 75 6c 74 73 20 66 6f | 72 20 56 41 58 20 28 42 |aults fo|r VAX (B|
|00003d40| 53 44 3f 29 2e 22 0a 58 | 23 09 09 09 64 65 66 69 |SD?).".X|#...defi|
|00003d50| 6e 65 20 46 43 4e 54 4c | 09 09 09 09 09 09 31 0a |ne FCNTL|......1.|
|00003d60| 58 23 09 09 09 64 65 66 | 69 6e 65 20 46 41 53 54 |X#...def|ine FAST|
|00003d70| 5f 43 4f 50 59 28 66 72 | 6f 6d 2c 74 6f 2c 63 6f |_COPY(fr|om,to,co|
|00003d80| 75 6e 74 29 09 09 62 63 | 6f 70 79 28 66 72 6f 6d |unt)..bc|opy(from|
|00003d90| 2c 74 6f 2c 63 6f 75 6e | 74 29 0a 58 23 09 09 09 |,to,coun|t).X#...|
|00003da0| 64 65 66 69 6e 65 20 57 | 48 41 54 5f 4c 53 45 45 |define W|HAT_LSEE|
|00003db0| 4b 09 09 09 09 09 31 0a | 58 23 09 09 09 64 65 66 |K.....1.|X#...def|
|00003dc0| 69 6e 65 20 49 5f 53 50 | 45 43 49 41 4c 0a 58 23 |ine I_SP|ECIAL.X#|
|00003dd0| 09 09 09 64 65 66 69 6e | 65 20 49 4e 5f 42 55 46 |...defin|e IN_BUF|
|00003de0| 5f 4c 45 4e 09 09 09 09 | 09 34 30 39 36 0a 58 23 |_LEN....|.4096.X#|
|00003df0| 09 09 09 64 65 66 69 6e | 65 20 4f 55 54 5f 42 55 |...defin|e OUT_BU|
|00003e00| 46 5f 4c 45 4e 09 09 09 | 09 09 31 36 33 38 34 0a |F_LEN...|..16384.|
|00003e10| 58 23 09 09 09 64 65 66 | 69 6e 65 20 54 48 52 45 |X#...def|ine THRE|
|00003e20| 53 48 4f 4c 44 09 09 09 | 09 09 34 30 39 36 0a 58 |SHOLD...|..4096.X|
|00003e30| 23 09 09 65 6e 64 69 66 | 20 2f 2a 20 76 61 78 20 |#..endif| /* vax |
|00003e40| 2a 2f 0a 58 23 09 09 69 | 66 20 64 65 66 69 6e 65 |*/.X#..i|f define|
|00003e50| 64 28 75 6e 69 78 29 20 | 26 26 20 64 65 66 69 6e |d(unix) |&& defin|
|00003e60| 65 64 28 73 75 6e 29 20 | 26 26 20 64 65 66 69 6e |ed(sun) |&& defin|
|00003e70| 65 64 28 6d 63 36 38 30 | 32 30 29 0a 58 23 09 09 |ed(mc680|20).X#..|
|00003e80| 09 64 65 66 69 6e 65 20 | 46 4f 55 4e 44 09 09 09 |.define |FOUND...|
|00003e90| 09 09 09 22 55 73 69 6e | 67 20 64 65 66 61 75 6c |..."Usin|g defaul|
|00003ea0| 74 73 20 66 6f 72 20 53 | 55 4e 20 28 53 55 4e 20 |ts for S|UN (SUN |
|00003eb0| 4f 53 20 33 2e 2a 29 2e | 22 0a 58 23 09 09 09 64 |OS 3.*).|".X#...d|
|00003ec0| 65 66 69 6e 65 20 46 43 | 4e 54 4c 09 09 09 09 09 |efine FC|NTL.....|
|00003ed0| 09 31 0a 58 23 09 09 09 | 64 65 66 69 6e 65 20 46 |.1.X#...|define F|
|00003ee0| 41 53 54 5f 43 4f 50 59 | 28 66 72 6f 6d 2c 74 6f |AST_COPY|(from,to|
|00003ef0| 2c 63 6f 75 6e 74 29 09 | 09 62 63 6f 70 79 28 66 |,count).|.bcopy(f|
|00003f00| 72 6f 6d 2c 74 6f 2c 63 | 6f 75 6e 74 29 0a 58 23 |rom,to,c|ount).X#|
|00003f10| 09 09 09 64 65 66 69 6e | 65 20 57 48 41 54 5f 4c |...defin|e WHAT_L|
|00003f20| 53 45 45 4b 09 09 09 09 | 09 31 0a 58 23 09 09 09 |SEEK....|.1.X#...|
|00003f30| 64 65 66 69 6e 65 20 49 | 5f 53 50 45 43 49 41 4c |define I|_SPECIAL|
|00003f40| 0a 58 23 09 09 09 64 65 | 66 69 6e 65 20 49 4e 5f |.X#...de|fine IN_|
|00003f50| 42 55 46 5f 4c 45 4e 09 | 09 09 09 09 34 30 39 36 |BUF_LEN.|....4096|
|00003f60| 0a 58 23 09 09 09 64 65 | 66 69 6e 65 20 4f 55 54 |.X#...de|fine OUT|
|00003f70| 5f 42 55 46 5f 4c 45 4e | 09 09 09 09 09 31 36 33 |_BUF_LEN|.....163|
|00003f80| 38 34 0a 58 23 09 09 09 | 64 65 66 69 6e 65 20 54 |84.X#...|define T|
|00003f90| 48 52 45 53 48 4f 4c 44 | 09 09 09 09 09 34 30 39 |HRESHOLD|.....409|
|00003fa0| 36 0a 58 23 09 09 65 6e | 64 69 66 20 2f 2a 20 73 |6.X#..en|dif /* s|
|00003fb0| 75 6e 20 2a 2f 0a 58 23 | 09 09 69 66 20 64 65 66 |un */.X#|..if def|
|00003fc0| 69 6e 65 64 28 75 6e 69 | 78 29 20 26 26 20 64 65 |ined(uni|x) && de|
|00003fd0| 66 69 6e 65 64 28 75 6c | 74 72 69 78 29 20 26 26 |fined(ul|trix) &&|
|00003fe0| 20 64 65 66 69 6e 65 64 | 28 62 73 64 34 5f 32 29 | defined|(bsd4_2)|
|00003ff0| 0a 58 23 09 09 09 64 65 | 66 69 6e 65 20 46 4f 55 |.X#...de|fine FOU|
|00004000| 4e 44 09 09 09 09 09 09 | 22 55 73 69 6e 67 20 64 |ND......|"Using d|
|00004010| 65 66 61 75 6c 74 73 20 | 66 6f 72 20 56 41 58 20 |efaults |for VAX |
|00004020| 28 55 4c 54 52 49 58 20 | 32 2e 30 29 22 0a 58 23 |(ULTRIX |2.0)".X#|
|00004030| 09 09 09 64 65 66 69 6e | 65 20 46 43 4e 54 4c 09 |...defin|e FCNTL.|
|00004040| 09 09 09 09 09 31 0a 58 | 23 09 09 09 64 65 66 69 |.....1.X|#...defi|
|00004050| 6e 65 20 46 41 53 54 5f | 43 4f 50 59 28 66 72 6f |ne FAST_|COPY(fro|
|00004060| 6d 2c 74 6f 2c 63 6f 75 | 6e 74 29 09 09 62 63 6f |m,to,cou|nt)..bco|
|00004070| 70 79 28 66 72 6f 6d 2c | 74 6f 2c 63 6f 75 6e 74 |py(from,|to,count|
|00004080| 29 0a 58 23 09 09 09 64 | 65 66 69 6e 65 20 57 48 |).X#...d|efine WH|
|00004090| 41 54 5f 4c 53 45 45 4b | 09 09 09 09 09 31 0a 58 |AT_LSEEK|.....1.X|
|000040a0| 23 09 09 09 64 65 66 69 | 6e 65 20 49 5f 53 50 45 |#...defi|ne I_SPE|
|000040b0| 43 49 41 4c 0a 58 23 09 | 09 09 64 65 66 69 6e 65 |CIAL.X#.|..define|
|000040c0| 20 49 4e 5f 42 55 46 5f | 4c 45 4e 09 09 09 09 09 | IN_BUF_|LEN.....|
|000040d0| 34 30 39 36 0a 58 23 09 | 09 09 64 65 66 69 6e 65 |4096.X#.|..define|
|000040e0| 20 4f 55 54 5f 42 55 46 | 5f 4c 45 4e 09 09 09 09 | OUT_BUF|_LEN....|
|000040f0| 09 31 36 33 38 34 0a 58 | 23 09 09 09 64 65 66 69 |.16384.X|#...defi|
|00004100| 6e 65 20 54 48 52 45 53 | 48 4f 4c 44 09 09 09 09 |ne THRES|HOLD....|
|00004110| 09 34 30 39 36 0a 58 23 | 09 09 65 6e 64 69 66 20 |.4096.X#|..endif |
|00004120| 2f 2a 20 76 61 78 20 75 | 6c 74 72 69 78 20 2a 2f |/* vax u|ltrix */|
|00004130| 0a 58 23 09 09 69 66 20 | 64 65 66 69 6e 65 64 28 |.X#..if |defined(|
|00004140| 76 6d 73 29 20 26 26 20 | 64 65 66 69 6e 65 64 28 |vms) && |defined(|
|00004150| 76 61 78 29 0a 58 23 09 | 09 09 64 65 66 69 6e 65 |vax).X#.|..define|
|00004160| 20 46 4f 55 4e 44 09 09 | 09 09 09 09 22 55 73 69 | FOUND..|...."Usi|
|00004170| 6e 67 20 64 65 66 61 75 | 6c 74 73 20 66 6f 72 20 |ng defau|lts for |
|00004180| 56 41 58 20 28 56 4d 53 | 29 22 0a 58 2f 2a 20 64 |VAX (VMS|)".X/* d|
|00004190| 6f 6e 27 74 20 64 65 66 | 69 6e 65 20 46 43 4e 54 |on't def|ine FCNT|
|000041a0| 4c 2c 20 4f 5f 52 44 4f | 4e 4c 59 20 66 6c 61 67 |L, O_RDO|NLY flag|
|000041b0| 20 69 73 20 69 6e 20 66 | 69 6c 65 2e 68 20 61 6e | is in f|ile.h an|
|000041c0| 64 20 69 73 20 30 20 2a | 2f 0a 58 23 09 09 09 64 |d is 0 *|/.X#...d|
|000041d0| 65 66 69 6e 65 20 46 41 | 53 54 5f 43 4f 50 59 28 |efine FA|ST_COPY(|
|000041e0| 66 72 6f 6d 2c 74 6f 2c | 63 6f 75 6e 74 29 09 09 |from,to,|count)..|
|000041f0| 6d 65 6d 63 70 79 28 74 | 6f 2c 66 72 6f 6d 2c 63 |memcpy(t|o,from,c|
|00004200| 6f 75 6e 74 29 0a 58 23 | 09 09 09 64 65 66 69 6e |ount).X#|...defin|
|00004210| 65 20 57 48 41 54 5f 4c | 53 45 45 4b 09 09 09 09 |e WHAT_L|SEEK....|
|00004220| 09 32 0a 58 2f 2a 09 09 | 09 64 65 66 69 6e 65 20 |.2.X/*..|.define |
|00004230| 49 5f 53 50 45 43 49 41 | 4c 2a 2f 0a 58 23 09 09 |I_SPECIA|L*/.X#..|
|00004240| 09 64 65 66 69 6e 65 20 | 49 4e 5f 42 55 46 5f 4c |.define |IN_BUF_L|
|00004250| 45 4e 09 09 09 09 09 34 | 30 39 36 0a 58 23 09 09 |EN.....4|096.X#..|
|00004260| 09 64 65 66 69 6e 65 20 | 4f 55 54 5f 42 55 46 5f |.define |OUT_BUF_|
|00004270| 4c 45 4e 09 09 09 09 09 | 31 36 33 38 34 0a 58 23 |LEN.....|16384.X#|
|00004280| 09 09 09 64 65 66 69 6e | 65 20 54 48 52 45 53 48 |...defin|e THRESH|
|00004290| 4f 4c 44 09 09 09 09 09 | 34 30 39 36 0a 58 23 09 |OLD.....|4096.X#.|
|000042a0| 09 65 6e 64 69 66 20 2f | 2a 20 76 61 78 20 75 6c |.endif /|* vax ul|
|000042b0| 74 72 69 78 20 2a 2f 0a | 58 23 09 65 6e 64 69 66 |trix */.|X#.endif|
|000042c0| 20 55 53 45 5f 55 53 45 | 52 5f 44 45 46 49 4e 45 | USE_USE|R_DEFINE|
|000042d0| 53 0a 58 23 20 65 6e 64 | 69 66 20 53 41 46 45 54 |S.X# end|if SAFET|
|000042e0| 59 5f 46 49 52 53 54 0a | 58 0a 58 23 20 69 66 6e |Y_FIRST.|X.X# ifn|
|000042f0| 64 65 66 20 46 4f 55 4e | 44 0a 58 2f 2a 0a 58 20 |def FOUN|D.X/*.X |
|00004300| 2a 20 57 65 20 68 61 76 | 65 20 74 6f 20 75 73 65 |* We hav|e to use|
|00004310| 20 74 68 65 20 64 65 66 | 61 75 6c 74 73 2e 0a 58 | the def|aults..X|
|00004320| 20 2a 2f 0a 58 23 09 64 | 65 66 69 6e 65 20 46 4f | */.X#.d|efine FO|
|00004330| 55 4e 44 09 09 09 09 09 | 09 09 22 55 73 69 6e 67 |UND.....|.."Using|
|00004340| 20 6d 69 6e 69 6d 61 6c | 20 64 65 66 61 75 6c 74 | minimal| default|
|00004350| 73 2e 22 0a 58 2f 2a 20 | 64 6f 6e 74 09 64 65 66 |s.".X/* |dont.def|
|00004360| 69 6e 65 20 46 43 4e 54 | 4c 20 2a 2f 0a 58 2f 2a |ine FCNT|L */.X/*|
|00004370| 20 46 41 53 54 5f 43 4f | 50 59 20 77 69 6c 6c 20 | FAST_CO|PY will |
|00004380| 62 65 20 61 20 72 65 61 | 6c 20 72 6f 75 74 69 6e |be a rea|l routin|
|00004390| 65 20 2a 2f 0a 58 23 09 | 64 65 66 69 6e 65 20 57 |e */.X#.|define W|
|000043a0| 48 41 54 5f 4c 53 45 45 | 4b 09 09 09 09 09 09 31 |HAT_LSEE|K......1|
|000043b0| 0a 58 2f 2a 20 64 6f 6e | 27 74 20 64 65 66 69 6e |.X/* don|'t defin|
|000043c0| 65 20 49 5f 53 50 45 43 | 49 41 4c 20 2a 2f 0a 58 |e I_SPEC|IAL */.X|
|000043d0| 23 09 64 65 66 69 6e 65 | 20 49 4e 5f 42 55 46 5f |#.define| IN_BUF_|
|000043e0| 4c 45 4e 09 09 09 09 09 | 09 31 30 32 34 0a 58 23 |LEN.....|.1024.X#|
|000043f0| 09 64 65 66 69 6e 65 20 | 4f 55 54 5f 42 55 46 5f |.define |OUT_BUF_|
|00004400| 4c 45 4e 09 09 09 09 09 | 09 38 31 39 32 0a 58 23 |LEN.....|.8192.X#|
|00004410| 09 64 65 66 69 6e 65 20 | 54 48 52 45 53 48 4f 4c |.define |THRESHOL|
|00004420| 44 09 09 09 09 09 09 31 | 30 32 34 0a 58 0a 58 23 |D......1|024.X.X#|
|00004430| 20 65 6e 64 69 66 20 46 | 4f 55 4e 44 0a 45 4e 44 | endif F|OUND.END|
|00004440| 5f 4f 46 5f 46 49 4c 45 | 0a 69 66 20 74 65 73 74 |_OF_FILE|.if test|
|00004450| 20 32 37 36 35 20 2d 6e | 65 20 60 77 63 20 2d 63 | 2765 -n|e `wc -c|
|00004460| 20 3c 27 63 6f 6e 66 69 | 67 2e 68 27 60 3b 20 74 | <'confi|g.h'`; t|
|00004470| 68 65 6e 0a 20 20 20 20 | 65 63 68 6f 20 73 68 61 |hen. |echo sha|
|00004480| 72 3a 20 5c 22 27 63 6f | 6e 66 69 67 2e 68 27 5c |r: \"'co|nfig.h'\|
|00004490| 22 20 75 6e 70 61 63 6b | 65 64 20 77 69 74 68 20 |" unpack|ed with |
|000044a0| 77 72 6f 6e 67 20 73 69 | 7a 65 21 0a 66 69 0a 23 |wrong si|ze!.fi.#|
|000044b0| 20 65 6e 64 20 6f 66 20 | 27 63 6f 6e 66 69 67 2e | end of |'config.|
|000044c0| 68 27 0a 66 69 0a 69 66 | 20 74 65 73 74 20 2d 66 |h'.fi.if| test -f|
|000044d0| 20 27 6c 69 6d 69 74 73 | 2e 63 27 20 2d 61 20 22 | 'limits|.c' -a "|
|000044e0| 24 7b 31 7d 22 20 21 3d | 20 22 2d 63 22 20 3b 20 |${1}" !=| "-c" ; |
|000044f0| 74 68 65 6e 20 0a 20 20 | 65 63 68 6f 20 73 68 61 |then . |echo sha|
|00004500| 72 3a 20 57 69 6c 6c 20 | 6e 6f 74 20 63 6c 6f 62 |r: Will |not clob|
|00004510| 62 65 72 20 65 78 69 73 | 74 69 6e 67 20 66 69 6c |ber exis|ting fil|
|00004520| 65 20 5c 22 27 6c 69 6d | 69 74 73 2e 63 27 5c 22 |e \"'lim|its.c'\"|
|00004530| 0a 65 6c 73 65 0a 65 63 | 68 6f 20 73 68 61 72 3a |.else.ec|ho shar:|
|00004540| 20 45 78 74 72 61 63 74 | 69 6e 67 20 5c 22 27 6c | Extract|ing \"'l|
|00004550| 69 6d 69 74 73 2e 63 27 | 5c 22 20 5c 28 31 31 38 |imits.c'|\" \(118|
|00004560| 33 20 63 68 61 72 61 63 | 74 65 72 73 5c 29 0a 73 |3 charac|ters\).s|
|00004570| 65 64 20 22 73 2f 5e 58 | 2f 2f 22 20 3e 27 6c 69 |ed "s/^X|//" >'li|
|00004580| 6d 69 74 73 2e 63 27 20 | 3c 3c 27 45 4e 44 5f 4f |mits.c' |<<'END_O|
|00004590| 46 5f 46 49 4c 45 27 0a | 58 73 74 61 74 69 63 20 |F_FILE'.|Xstatic |
|000045a0| 63 68 61 72 20 2a 20 73 | 63 63 73 69 64 20 3d 20 |char * s|ccsid = |
|000045b0| 22 40 28 23 29 20 20 6c | 69 6d 69 74 73 2e 63 20 |"@(#) l|imits.c |
|000045c0| 20 28 76 36 2e 32 20 35 | 2f 31 39 2f 38 39 29 22 | (v6.2 5|/19/89)"|
|000045d0| 3b 0a 58 0a 58 23 20 69 | 6e 63 6c 75 64 65 20 22 |;.X.X# i|nclude "|
|000045e0| 73 74 72 69 6e 67 73 2e | 68 22 0a 58 0a 58 23 20 |strings.|h".X.X# |
|000045f0| 69 66 64 65 66 20 49 5f | 53 50 45 43 49 41 4c 0a |ifdef I_|SPECIAL.|
|00004600| 58 0a 58 23 09 69 66 64 | 65 66 20 73 75 6e 0a 58 |X.X#.ifd|ef sun.X|
|00004610| 23 09 09 69 6e 63 6c 75 | 64 65 20 3c 73 79 73 2f |#..inclu|de <sys/|
|00004620| 65 78 65 63 2e 68 3e 0a | 58 23 09 65 6e 64 69 66 |exec.h>.|X#.endif|
|00004630| 20 73 75 6e 0a 58 23 09 | 69 6e 63 6c 75 64 65 20 | sun.X#.|include |
|00004640| 3c 61 2e 6f 75 74 2e 68 | 3e 0a 58 0a 58 67 65 74 |<a.out.h|>.X.Xget|
|00004650| 5f 6c 69 6d 69 74 73 20 | 28 66 64 2c 20 66 69 72 |_limits |(fd, fir|
|00004660| 73 74 2c 20 6c 61 73 74 | 29 0a 58 69 6e 74 20 66 |st, last|).Xint f|
|00004670| 64 3b 0a 58 4c 53 45 45 | 4b 5f 54 59 50 45 20 2a |d;.XLSEE|K_TYPE *|
|00004680| 20 66 69 72 73 74 2c 20 | 2a 20 6c 61 73 74 3b 0a | first, |* last;.|
|00004690| 58 2f 2a 0a 58 20 2a 20 | 48 61 76 65 20 61 20 6c |X/*.X * |Have a l|
|000046a0| 6f 6f 6b 20 69 6e 74 6f | 20 74 68 65 20 69 6e 70 |ook into| the inp|
|000046b0| 75 74 20 66 69 6c 65 20 | 6f 70 65 6e 20 75 6e 64 |ut file |open und|
|000046c0| 65 72 20 66 64 2e 0a 58 | 20 2a 20 49 66 20 77 65 |er fd..X| * If we|
|000046d0| 20 74 68 69 6e 6b 20 69 | 74 20 69 73 20 61 6e 20 | think i|t is an |
|000046e0| 6f 62 6a 65 63 74 20 66 | 69 6c 65 2c 20 74 68 61 |object f|ile, tha|
|000046f0| 6e 20 67 65 74 20 74 68 | 65 20 73 74 61 72 74 20 |n get th|e start |
|00004700| 61 6e 64 0a 58 20 2a 20 | 73 69 7a 65 20 6f 66 20 |and.X * |size of |
|00004710| 69 6e 69 74 69 61 6c 69 | 7a 65 64 20 64 61 74 61 |initiali|zed data|
|00004720| 20 61 6e 64 20 73 65 74 | 0a 58 20 2a 20 2a 66 69 | and set|.X * *fi|
|00004730| 72 73 74 20 3a 20 61 64 | 64 72 65 73 73 20 77 68 |rst : ad|dress wh|
|00004740| 65 72 65 20 65 78 61 6d | 69 6e 61 74 69 6f 6e 20 |ere exam|ination |
|00004750| 6f 66 20 66 69 6c 65 20 | 77 69 6c 6c 20 73 74 61 |of file |will sta|
|00004760| 72 74 0a 58 20 2a 20 2a | 6c 61 73 74 20 20 3a 20 |rt.X * *|last : |
|00004770| 66 69 72 73 74 20 61 64 | 64 72 65 73 73 20 77 68 |first ad|dress wh|
|00004780| 69 63 68 20 77 69 6c 6c | 20 6e 6f 74 20 62 65 20 |ich will| not be |
|00004790| 65 78 61 6d 69 6e 65 64 | 2e 0a 58 20 2a 2f 0a 58 |examined|..X */.X|
|000047a0| 7b 0a 58 09 72 65 67 69 | 73 74 65 72 20 69 6e 74 |{.X.regi|ster int|
|000047b0| 20 69 3b 0a 58 09 73 74 | 72 75 63 74 20 65 78 65 | i;.X.st|ruct exe|
|000047c0| 63 20 65 3b 0a 58 09 4c | 53 45 45 4b 5f 54 59 50 |c e;.X.L|SEEK_TYP|
|000047d0| 45 20 6c 3b 0a 58 0a 58 | 09 2a 66 69 72 73 74 20 |E l;.X.X|.*first |
|000047e0| 3d 20 28 4c 53 45 45 4b | 5f 54 59 50 45 29 30 3b |= (LSEEK|_TYPE)0;|
|000047f0| 0a 58 09 2a 6c 61 73 74 | 20 3d 20 28 4c 53 45 45 |.X.*last| = (LSEE|
|00004800| 4b 5f 54 59 50 45 29 28 | 2d 31 29 3b 0a 58 09 69 |K_TYPE)(|-1);.X.i|
|00004810| 66 20 28 6c 73 65 65 6b | 20 28 66 64 2c 20 28 4c |f (lseek| (fd, (L|
|00004820| 53 45 45 4b 5f 54 59 50 | 45 29 30 2c 20 30 29 20 |SEEK_TYP|E)0, 0) |
|00004830| 21 3d 20 28 4c 53 45 45 | 4b 5f 54 59 50 45 29 30 |!= (LSEE|K_TYPE)0|
|00004840| 29 20 7b 0a 58 23 20 69 | 66 64 65 66 20 44 45 42 |) {.X# i|fdef DEB|
|00004850| 55 47 0a 58 09 09 66 70 | 72 69 6e 74 66 20 28 70 |UG.X..fp|rintf (p|
|00004860| 72 6f 74 2c 20 22 49 6e | 70 75 74 20 6e 6f 74 20 |rot, "In|put not |
|00004870| 73 65 65 6b 61 62 6c 65 | 5c 6e 22 29 3b 0a 58 23 |seekable|\n");.X#|
|00004880| 20 65 6e 64 69 66 0a 58 | 09 09 72 65 74 75 72 6e | endif.X|..return|
|00004890| 3b 0a 58 09 7d 0a 58 09 | 69 20 3d 20 72 65 61 64 |;.X.}.X.|i = read|
|000048a0| 20 28 66 64 2c 20 28 63 | 68 61 72 2a 29 28 26 65 | (fd, (c|har*)(&e|
|000048b0| 29 2c 20 73 69 7a 65 6f | 66 20 28 65 29 29 3b 0a |), sizeo|f (e));.|
|000048c0| 58 09 69 66 20 28 69 20 | 21 3d 20 73 69 7a 65 6f |X.if (i |!= sizeo|
|000048d0| 66 28 65 29 29 20 7b 0a | 58 23 20 69 66 64 65 66 |f(e)) {.|X# ifdef|
|000048e0| 20 44 45 42 55 47 0a 58 | 09 09 66 70 72 69 6e 74 | DEBUG.X|..fprint|
|000048f0| 66 20 28 70 72 6f 74 2c | 20 22 66 69 6c 65 20 74 |f (prot,| "file t|
|00004900| 6f 6f 20 73 6d 61 6c 6c | 5c 6e 22 29 3b 0a 58 23 |oo small|\n");.X#|
|00004910| 20 65 6e 64 69 66 0a 58 | 09 09 72 65 74 75 72 6e | endif.X|..return|
|00004920| 3b 0a 58 09 7d 0a 58 09 | 69 66 20 28 4e 5f 42 41 |;.X.}.X.|if (N_BA|
|00004930| 44 4d 41 47 28 65 29 29 | 20 7b 0a 58 23 20 69 66 |DMAG(e))| {.X# if|
|00004940| 64 65 66 20 44 45 42 55 | 47 0a 58 09 09 66 70 72 |def DEBU|G.X..fpr|
|00004950| 69 6e 74 66 20 28 70 72 | 6f 74 2c 20 22 62 61 64 |intf (pr|ot, "bad|
|00004960| 20 6d 61 67 69 63 5c 6e | 22 29 3b 0a 58 23 20 65 | magic\n|");.X# e|
|00004970| 6e 64 69 66 0a 58 09 09 | 72 65 74 75 72 6e 3b 0a |ndif.X..|return;.|
|00004980| 58 09 7d 0a 58 09 6c 20 | 3d 20 4e 5f 54 58 54 4f |X.}.X.l |= N_TXTO|
|00004990| 46 46 28 65 29 20 2b 20 | 65 2e 61 5f 74 65 78 74 |FF(e) + |e.a_text|
|000049a0| 3b 0a 58 23 20 69 66 64 | 65 66 20 44 45 42 55 47 |;.X# ifd|ef DEBUG|
|000049b0| 0a 58 09 66 70 72 69 6e | 74 66 20 28 70 72 6f 74 |.X.fprin|tf (prot|
|000049c0| 2c 20 22 73 74 61 72 74 | 20 6f 66 20 69 6e 69 74 |, "start| of init|
|000049d0| 69 61 6c 69 7a 65 64 20 | 64 61 74 61 20 61 74 20 |ialized |data at |
|000049e0| 25 6c 64 5c 6e 22 2c 20 | 28 6c 6f 6e 67 29 69 29 |%ld\n", |(long)i)|
|000049f0| 3b 0a 58 09 66 70 72 69 | 6e 74 66 20 28 70 72 6f |;.X.fpri|ntf (pro|
|00004a00| 74 2c 20 22 6c 65 6e 67 | 74 68 20 3d 20 25 31 6c |t, "leng|th = %1l|
|00004a10| 64 5c 6e 22 2c 20 28 6c | 6f 6e 67 29 28 65 2e 61 |d\n", (l|ong)(e.a|
|00004a20| 5f 64 61 74 61 29 29 3b | 0a 58 23 20 65 6e 64 69 |_data));|.X# endi|
|00004a30| 66 0a 58 09 2a 66 69 72 | 73 74 20 3d 20 6c 3b 0a |f.X.*fir|st = l;.|
|00004a40| 58 09 2a 6c 61 73 74 20 | 3d 20 6c 20 2b 20 65 2e |X.*last |= l + e.|
|00004a50| 61 5f 64 61 74 61 3b 0a | 58 7d 0a 58 0a 58 23 20 |a_data;.|X}.X.X# |
|00004a60| 65 6e 64 69 66 20 49 5f | 53 50 45 43 49 41 4c 0a |endif I_|SPECIAL.|
|00004a70| 45 4e 44 5f 4f 46 5f 46 | 49 4c 45 0a 69 66 20 74 |END_OF_F|ILE.if t|
|00004a80| 65 73 74 20 31 31 38 33 | 20 2d 6e 65 20 60 77 63 |est 1183| -ne `wc|
|00004a90| 20 2d 63 20 3c 27 6c 69 | 6d 69 74 73 2e 63 27 60 | -c <'li|mits.c'`|
|00004aa0| 3b 20 74 68 65 6e 0a 20 | 20 20 20 65 63 68 6f 20 |; then. | echo |
|00004ab0| 73 68 61 72 3a 20 5c 22 | 27 6c 69 6d 69 74 73 2e |shar: \"|'limits.|
|00004ac0| 63 27 5c 22 20 75 6e 70 | 61 63 6b 65 64 20 77 69 |c'\" unp|acked wi|
|00004ad0| 74 68 20 77 72 6f 6e 67 | 20 73 69 7a 65 21 0a 66 |th wrong| size!.f|
|00004ae0| 69 0a 23 20 65 6e 64 20 | 6f 66 20 27 6c 69 6d 69 |i.# end |of 'limi|
|00004af0| 74 73 2e 63 27 0a 66 69 | 0a 69 66 20 74 65 73 74 |ts.c'.fi|.if test|
|00004b00| 20 2d 66 20 27 6f 75 74 | 70 75 74 2e 63 27 20 2d | -f 'out|put.c' -|
|00004b10| 61 20 22 24 7b 31 7d 22 | 20 21 3d 20 22 2d 63 22 |a "${1}"| != "-c"|
|00004b20| 20 3b 20 74 68 65 6e 20 | 0a 20 20 65 63 68 6f 20 | ; then |. echo |
|00004b30| 73 68 61 72 3a 20 57 69 | 6c 6c 20 6e 6f 74 20 63 |shar: Wi|ll not c|
|00004b40| 6c 6f 62 62 65 72 20 65 | 78 69 73 74 69 6e 67 20 |lobber e|xisting |
|00004b50| 66 69 6c 65 20 5c 22 27 | 6f 75 74 70 75 74 2e 63 |file \"'|output.c|
|00004b60| 27 5c 22 0a 65 6c 73 65 | 0a 65 63 68 6f 20 73 68 |'\".else|.echo sh|
|00004b70| 61 72 3a 20 45 78 74 72 | 61 63 74 69 6e 67 20 5c |ar: Extr|acting \|
|00004b80| 22 27 6f 75 74 70 75 74 | 2e 63 27 5c 22 20 5c 28 |"'output|.c'\" \(|
|00004b90| 35 39 35 33 20 63 68 61 | 72 61 63 74 65 72 73 5c |5953 cha|racters\|
|00004ba0| 29 0a 73 65 64 20 22 73 | 2f 5e 58 2f 2f 22 20 3e |).sed "s|/^X//" >|
|00004bb0| 27 6f 75 74 70 75 74 2e | 63 27 20 3c 3c 27 45 4e |'output.|c' <<'EN|
|00004bc0| 44 5f 4f 46 5f 46 49 4c | 45 27 0a 58 73 74 61 74 |D_OF_FIL|E'.Xstat|
|00004bd0| 69 63 20 63 68 61 72 20 | 2a 20 73 63 63 73 69 64 |ic char |* sccsid|
|00004be0| 20 3d 20 22 40 28 23 29 | 20 20 6f 75 74 70 75 74 | = "@(#)| output|
|00004bf0| 2e 63 20 20 28 76 36 2e | 35 20 35 2f 31 39 2f 38 |.c (v6.|5 5/19/8|
|00004c00| 39 29 22 3b 0a 58 2f 2a | 0a 58 20 2a 20 4f 75 74 |9)";.X/*|.X * Out|
|00004c10| 70 75 74 20 72 6f 75 74 | 69 6e 65 73 20 66 6f 72 |put rout|ines for|
|00004c20| 20 27 73 74 72 69 6e 67 | 73 27 2e 0a 58 20 2a 20 | 'string|s'..X * |
|00004c30| 57 65 20 72 6f 6c 6c 20 | 6f 75 72 20 6f 77 6e 20 |We roll |our own |
|00004c40| 68 65 72 65 2c 20 62 65 | 63 61 75 73 65 20 73 74 |here, be|cause st|
|00004c50| 64 69 6f 20 65 69 74 68 | 65 72 20 65 78 70 65 63 |dio eith|er expec|
|00004c60| 74 73 20 4e 55 4c 20 74 | 65 72 6d 69 6e 61 74 65 |ts NUL t|erminate|
|00004c70| 64 0a 58 20 2a 20 73 74 | 72 69 6e 67 73 2c 20 77 |d.X * st|rings, w|
|00004c80| 68 69 63 68 20 77 65 20 | 64 6f 6e 27 74 20 68 61 |hich we |don't ha|
|00004c90| 76 65 2c 20 6f 72 20 74 | 65 73 74 73 20 66 6f 72 |ve, or t|ests for|
|00004ca0| 20 62 75 66 66 65 72 20 | 6f 76 65 72 66 6c 6f 77 | buffer |overflow|
|00004cb0| 20 61 74 20 65 61 63 68 | 0a 58 20 2a 20 63 68 61 | at each|.X * cha|
|00004cc0| 72 61 63 74 65 72 2e 20 | 42 75 74 20 77 65 20 6b |racter. |But we k|
|00004cd0| 6e 6f 77 20 68 6f 77 20 | 6d 75 63 68 20 63 68 61 |now how |much cha|
|00004ce0| 72 61 63 74 65 72 73 20 | 77 69 6c 6c 20 62 65 20 |racters |will be |
|00004cf0| 61 64 64 65 64 20 74 6f | 20 74 68 65 0a 58 20 2a |added to| the.X *|
|00004d00| 20 6f 75 74 70 75 74 20 | 62 6c 6f 63 6b 2c 20 73 | output |block, s|
|00004d10| 6f 20 77 65 20 63 61 6e | 20 6d 61 6b 65 20 64 6f |o we can| make do|
|00004d20| 20 77 69 74 68 20 74 77 | 6f 20 6f 72 20 74 68 72 | with tw|o or thr|
|00004d30| 65 65 20 74 65 73 74 73 | 20 70 65 72 20 73 65 71 |ee tests| per seq|
|00004d40| 75 65 6e 63 65 0a 58 20 | 2a 20 6f 66 20 70 72 69 |uence.X |* of pri|
|00004d50| 6e 74 61 62 6c 65 20 63 | 68 61 72 61 63 74 65 72 |ntable c|haracter|
|00004d60| 73 2e 0a 58 20 2a 0a 58 | 20 2a 20 53 65 71 75 65 |s..X *.X| * Seque|
|00004d70| 6e 63 65 73 20 61 72 65 | 20 73 74 75 66 66 65 64 |nces are| stuffed|
|00004d80| 20 69 6e 74 6f 20 74 68 | 65 20 6f 75 74 70 75 74 | into th|e output|
|00004d90| 20 62 75 66 66 65 72 2c | 20 65 76 65 6e 20 74 65 | buffer,| even te|
|00004da0| 6d 70 6f 72 61 72 69 6c | 79 20 77 68 65 6e 0a 58 |mporaril|y when.X|
|00004db0| 20 2a 20 77 65 20 63 6f | 75 6c 64 20 6e 6f 74 20 | * we co|uld not |
|00004dc0| 64 65 63 69 64 65 20 77 | 68 61 74 20 74 6f 20 64 |decide w|hat to d|
|00004dd0| 6f 20 77 69 74 68 20 74 | 68 65 6d 2c 20 79 65 74 |o with t|hem, yet|
|00004de0| 20 68 61 64 20 74 6f 20 | 72 65 6d 65 6d 62 65 72 | had to |remember|
|00004df0| 20 74 68 65 0a 58 20 2a | 20 63 68 61 72 61 63 74 | the.X *| charact|
|00004e00| 65 72 73 2e 20 57 68 65 | 6e 20 61 20 74 65 6d 70 |ers. Whe|n a temp|
|00004e10| 6f 72 61 72 79 20 73 65 | 71 75 65 6e 63 65 20 69 |orary se|quence i|
|00004e20| 73 20 6d 61 64 65 20 70 | 65 72 6d 61 6e 65 6e 74 |s made p|ermanent|
|00004e30| 20 6f 72 20 61 0a 58 20 | 2a 20 70 65 72 6d 61 6e | or a.X |* perman|
|00004e40| 65 6e 74 20 73 65 71 75 | 65 6e 63 65 20 61 64 64 |ent sequ|ence add|
|00004e50| 65 64 2c 20 61 6e 64 20 | 74 68 65 20 6e 65 77 20 |ed, and |the new |
|00004e60| 6c 65 6e 67 74 68 20 6f | 66 20 64 61 74 61 20 69 |length o|f data i|
|00004e70| 6e 20 74 68 65 20 6f 75 | 74 70 75 74 0a 58 20 2a |n the ou|tput.X *|
|00004e80| 20 62 75 66 66 65 72 20 | 65 78 63 65 65 64 73 20 | buffer |exceeds |
|00004e90| 61 20 74 68 72 65 73 68 | 6f 6c 64 2c 20 69 74 20 |a thresh|old, it |
|00004ea0| 69 73 20 6f 75 74 70 75 | 74 2e 0a 58 20 2a 20 49 |is outpu|t..X * I|
|00004eb0| 66 20 74 68 65 20 62 75 | 66 66 65 72 20 6f 76 65 |f the bu|ffer ove|
|00004ec0| 72 66 6c 6f 77 73 20 69 | 6e 20 62 65 74 77 65 65 |rflows i|n betwee|
|00004ed0| 6e 20 69 74 20 69 73 20 | 65 78 74 65 6e 64 65 64 |n it is |extended|
|00004ee0| 20 77 69 74 68 20 61 20 | 63 61 6c 6c 20 74 6f 0a | with a |call to.|
|00004ef0| 58 20 2a 20 72 65 61 6c | 6c 6f 63 2e 20 54 68 69 |X * real|loc. Thi|
|00004f00| 73 20 72 61 72 65 6c 79 | 20 65 76 65 72 20 68 61 |s rarely| ever ha|
|00004f10| 70 70 65 6e 73 2c 20 62 | 75 74 20 69 66 20 69 74 |ppens, b|ut if it|
|00004f20| 20 68 61 70 70 65 6e 73 | 2c 20 74 68 65 6e 0a 58 | happens|, then.X|
|00004f30| 20 2a 20 79 6f 75 20 77 | 69 6c 6c 20 72 61 74 68 | * you w|ill rath|
|00004f40| 65 72 20 68 61 76 65 20 | 73 74 72 69 6e 67 73 20 |er have |strings |
|00004f50| 74 6f 20 62 65 20 73 6c | 6f 77 69 6e 67 20 64 6f |to be sl|owing do|
|00004f60| 77 6e 20 74 68 61 6e 20 | 64 75 6d 70 20 63 6f 72 |wn than |dump cor|
|00004f70| 65 2e 0a 58 20 2a 2f 0a | 58 0a 58 23 20 69 6e 63 |e..X */.|X.X# inc|
|00004f80| 6c 75 64 65 20 22 73 74 | 72 69 6e 67 73 2e 68 22 |lude "st|rings.h"|
|00004f90| 0a 58 0a 58 2f 2a 0a 58 | 20 2a 20 54 68 65 20 63 |.X.X/*.X| * The c|
|00004fa0| 68 61 72 61 63 74 65 72 | 73 20 69 6e 20 6f 75 74 |haracter|s in out|
|00004fb0| 5f 62 75 66 20 75 6e 74 | 69 6c 20 6e 75 6d 5f 6f |_buf unt|il num_o|
|00004fc0| 75 74 5f 62 75 66 20 61 | 72 65 20 61 6c 72 65 61 |ut_buf a|re alrea|
|00004fd0| 64 79 20 61 63 63 65 70 | 74 65 64 2e 0a 58 20 2a |dy accep|ted..X *|
|00004fe0| 20 6c 65 76 65 6c 20 70 | 6f 69 6e 74 73 20 61 74 | level p|oints at|
|00004ff0| 20 74 68 65 20 65 6e 64 | 20 6f 66 20 61 6c 6c 20 | the end| of all |
|00005000| 63 68 61 72 61 63 74 65 | 72 73 20 69 6e 20 6f 75 |characte|rs in ou|
|00005010| 74 5f 62 75 66 2c 20 65 | 76 65 6e 20 74 68 65 0a |t_buf, e|ven the.|
|00005020| 58 20 2a 20 74 65 6d 70 | 6f 72 61 72 69 6c 79 20 |X * temp|orarily |
|00005030| 73 61 76 65 64 20 6f 6e | 65 73 2e 0a 58 20 2a 20 |saved on|es..X * |
|00005040| 73 61 76 65 64 20 69 73 | 20 74 68 65 20 6e 75 6d |saved is| the num|
|00005050| 62 65 72 20 6f 66 20 63 | 68 61 72 61 63 74 65 72 |ber of c|haracter|
|00005060| 73 20 74 65 6d 70 6f 72 | 61 72 69 6c 79 20 73 61 |s tempor|arily sa|
|00005070| 76 65 64 2e 0a 58 20 2a | 20 4e 6f 74 65 20 74 68 |ved..X *| Note th|
|00005080| 61 74 20 6c 65 76 65 6c | 20 61 6e 64 20 73 61 76 |at level| and sav|
|00005090| 65 64 20 61 72 65 20 6e | 6f 74 20 74 68 65 20 73 |ed are n|ot the s|
|000050a0| 61 6d 65 2e 20 49 66 20 | 74 68 65 72 65 20 61 72 |ame. If |there ar|
|000050b0| 65 20 6e 75 6d 62 65 72 | 20 62 65 66 6f 72 65 0a |e number| before.|
|000050c0| 58 20 2a 20 74 68 65 20 | 73 65 71 75 65 6e 63 65 |X * the |sequence|
|000050d0| 73 2c 20 74 68 65 6e 20 | 62 75 66 2b 6e 75 6d 5f |s, then |buf+num_|
|000050e0| 6f 75 74 5f 62 75 66 2b | 73 61 76 65 64 20 21 3d |out_buf+|saved !=|
|000050f0| 20 6c 65 76 65 6c 20 21 | 21 0a 58 20 2a 20 4e 6f | level !|!.X * No|
|00005100| 74 65 20 74 68 61 74 20 | 73 6f 6d 65 74 69 6d 65 |te that |sometime|
|00005110| 73 20 49 20 68 61 76 65 | 20 74 6f 20 63 6f 6d 70 |s I have| to comp|
|00005120| 75 74 65 20 74 68 65 20 | 6e 75 6d 62 65 72 20 6f |ute the |number o|
|00005130| 66 20 63 68 61 72 61 63 | 74 65 72 73 20 62 65 74 |f charac|ters bet|
|00005140| 77 65 65 6e 0a 58 20 2a | 20 6f 75 74 5f 62 75 66 |ween.X *| out_buf|
|00005150| 20 61 6e 64 20 6c 65 76 | 65 6c 2e 20 49 20 64 6f | and lev|el. I do|
|00005160| 20 74 68 69 73 20 62 79 | 20 73 75 62 74 72 61 63 | this by| subtrac|
|00005170| 74 69 6e 67 20 74 68 65 | 20 74 77 6f 20 70 6f 69 |ting the| two poi|
|00005180| 6e 74 65 72 73 2e 20 49 | 20 61 73 73 75 6d 65 0a |nters. I| assume.|
|00005190| 58 20 2a 20 74 68 61 74 | 20 74 68 65 20 72 65 73 |X * that| the res|
|000051a0| 75 6c 74 20 69 73 20 69 | 6e 74 20 6f 72 20 63 6f |ult is i|nt or co|
|000051b0| 6e 76 65 72 74 69 62 6c | 65 20 74 6f 20 69 6e 74 |nvertibl|e to int|
|000051c0| 2c 20 62 75 74 20 49 20 | 64 6f 6e 27 74 20 68 61 |, but I |don't ha|
|000051d0| 76 65 20 74 68 65 0a 58 | 20 2a 20 61 75 74 68 6f |ve the.X| * autho|
|000051e0| 72 69 74 79 20 61 74 20 | 68 61 6e 64 20 74 6f 20 |rity at |hand to |
|000051f0| 70 72 6f 76 65 20 74 68 | 69 73 2e 0a 58 20 2a 2f |prove th|is..X */|
|00005200| 0a 58 43 48 41 52 5f 54 | 59 50 45 20 2a 20 6f 75 |.XCHAR_T|YPE * ou|
|00005210| 74 5f 62 75 66 3b 0a 58 | 69 6e 74 20 6e 75 6d 5f |t_buf;.X|int num_|
|00005220| 6f 75 74 5f 62 75 66 20 | 3d 20 30 3b 09 09 09 09 |out_buf |= 0;....|
|00005230| 2f 2a 20 6e 75 6d 62 65 | 72 73 20 6f 66 20 63 68 |/* numbe|rs of ch|
|00005240| 61 72 73 20 69 6e 20 6f | 75 74 5f 62 75 66 20 2a |ars in o|ut_buf *|
|00005250| 2f 0a 58 43 48 41 52 5f | 54 59 50 45 20 2a 20 6c |/.XCHAR_|TYPE * l|
|00005260| 65 76 65 6c 3b 0a 58 69 | 6e 74 20 62 75 66 5f 6c |evel;.Xi|nt buf_l|
|00005270| 65 6e 3b 0a 58 69 6e 74 | 20 73 61 76 65 64 20 3d |en;.Xint| saved =|
|00005280| 20 30 3b 0a 58 0a 58 65 | 78 74 65 72 6e 20 69 6e | 0;.X.Xe|xtern in|
|00005290| 74 20 69 6e 64 5f 6f 66 | 66 73 65 74 3b 0a 58 65 |t ind_of|fset;.Xe|
|000052a0| 78 74 65 72 6e 20 69 6e | 74 20 69 6e 64 5f 70 72 |xtern in|t ind_pr|
|000052b0| 65 66 69 78 3b 0a 58 65 | 78 74 65 72 6e 20 43 48 |efix;.Xe|xtern CH|
|000052c0| 41 52 5f 54 59 50 45 20 | 62 75 66 5b 5d 3b 0a 58 |AR_TYPE |buf[];.X|
|000052d0| 65 78 74 65 72 6e 20 4c | 53 45 45 4b 5f 54 59 50 |extern L|SEEK_TYP|
|000052e0| 45 20 6f 66 66 73 65 74 | 3b 0a 58 65 78 74 65 72 |E offset|;.Xexter|
|000052f0| 6e 20 63 68 61 72 20 2a | 20 63 75 72 5f 66 69 6c |n char *| cur_fil|
|00005300| 65 5f 6e 61 6d 65 3b 0a | 58 0a 58 65 78 74 65 72 |e_name;.|X.Xexter|
|00005310| 6e 20 63 68 61 72 20 2a | 20 6d 61 6c 6c 6f 63 20 |n char *| malloc |
|00005320| 28 29 3b 0a 58 65 78 74 | 65 72 6e 20 63 68 61 72 |();.Xext|ern char|
|00005330| 20 2a 20 72 65 61 6c 6c | 6f 63 20 28 29 3b 0a 58 | * reall|oc ();.X|
|00005340| 0a 58 69 6e 69 74 5f 6f | 75 74 70 75 74 20 28 29 |.Xinit_o|utput ()|
|00005350| 0a 58 7b 0a 58 09 6f 75 | 74 5f 62 75 66 20 3d 20 |.X{.X.ou|t_buf = |
|00005360| 28 43 48 41 52 5f 54 59 | 50 45 20 2a 29 20 6d 61 |(CHAR_TY|PE *) ma|
|00005370| 6c 6c 6f 63 20 28 73 69 | 7a 65 6f 66 20 28 43 48 |lloc (si|zeof (CH|
|00005380| 41 52 5f 54 59 50 45 29 | 20 2a 20 4f 55 54 5f 42 |AR_TYPE)| * OUT_B|
|00005390| 55 46 5f 4c 45 4e 29 3b | 0a 58 09 6c 65 76 65 6c |UF_LEN);|.X.level|
|000053a0| 20 3d 20 6f 75 74 5f 62 | 75 66 3b 0a 58 09 6e 75 | = out_b|uf;.X.nu|
|000053b0| 6d 5f 6f 75 74 5f 62 75 | 66 20 3d 20 30 3b 0a 58 |m_out_bu|f = 0;.X|
|000053c0| 09 62 75 66 5f 6c 65 6e | 20 3d 20 4f 55 54 5f 42 |.buf_len| = OUT_B|
|000053d0| 55 46 5f 4c 45 4e 3b 0a | 58 7d 0a 58 0a 58 66 6c |UF_LEN;.|X}.X.Xfl|
|000053e0| 75 73 68 5f 6f 75 74 70 | 75 74 20 28 29 0a 58 2f |ush_outp|ut ().X/|
|000053f0| 2a 0a 58 20 2a 20 4e 75 | 6d 5f 6f 75 74 5f 62 75 |*.X * Nu|m_out_bu|
|00005400| 66 20 63 68 61 72 61 63 | 74 65 72 73 20 66 72 6f |f charac|ters fro|
|00005410| 6d 20 74 68 65 20 62 75 | 66 66 65 72 20 61 72 65 |m the bu|ffer are|
|00005420| 20 77 72 69 74 74 65 6e | 2e 0a 58 20 2a 2f 0a 58 | written|..X */.X|
|00005430| 7b 0a 58 09 69 66 20 28 | 6e 75 6d 5f 6f 75 74 5f |{.X.if (|num_out_|
|00005440| 62 75 66 20 3e 20 30 29 | 20 7b 0a 58 23 20 69 66 |buf > 0)| {.X# if|
|00005450| 64 65 66 20 44 45 42 55 | 47 0a 58 09 09 66 70 72 |def DEBU|G.X..fpr|
|00005460| 69 6e 74 66 20 28 70 72 | 6f 74 2c 20 22 66 6c 75 |intf (pr|ot, "flu|
|00005470| 73 68 5f 6f 75 74 70 75 | 74 20 3a 20 77 72 69 74 |sh_outpu|t : writ|
|00005480| 65 20 25 64 20 63 68 61 | 72 73 5c 6e 22 2c 20 6e |e %d cha|rs\n", n|
|00005490| 75 6d 5f 6f 75 74 5f 62 | 75 66 29 3b 0a 58 23 20 |um_out_b|uf);.X# |
|000054a0| 65 6e 64 69 66 0a 58 09 | 09 69 66 20 28 77 72 69 |endif.X.|.if (wri|
|000054b0| 74 65 20 28 31 2c 20 6f | 75 74 5f 62 75 66 2c 20 |te (1, o|ut_buf, |
|000054c0| 6e 75 6d 5f 6f 75 74 5f | 62 75 66 29 20 21 3d 20 |num_out_|buf) != |
|000054d0| 6e 75 6d 5f 6f 75 74 5f | 62 75 66 29 20 7b 0a 58 |num_out_|buf) {.X|
|000054e0| 09 09 09 6f 75 74 20 28 | 22 50 41 4e 49 43 20 3a |...out (|"PANIC :|
|000054f0| 20 77 72 69 74 65 20 65 | 72 72 6f 72 5c 6e 22 29 | write e|rror\n")|
|00005500| 3b 0a 58 09 09 09 65 78 | 69 74 20 28 31 29 3b 0a |;.X...ex|it (1);.|
|00005510| 58 09 09 7d 0a 58 09 09 | 6e 75 6d 5f 6f 75 74 5f |X..}.X..|num_out_|
|00005520| 62 75 66 20 3d 20 30 3b | 0a 58 09 7d 0a 58 09 6c |buf = 0;|.X.}.X.l|
|00005530| 65 76 65 6c 20 3d 20 6f | 75 74 5f 62 75 66 3b 0a |evel = o|ut_buf;.|
|00005540| 58 7d 0a 58 0a 58 73 74 | 61 74 69 63 0a 58 6d 61 |X}.X.Xst|atic.Xma|
|00005550| 6b 65 5f 72 6f 6f 6d 20 | 28 6e 29 0a 58 72 65 67 |ke_room |(n).Xreg|
|00005560| 69 73 74 65 72 20 69 6e | 74 20 6e 3b 0a 58 2f 2a |ister in|t n;.X/*|
|00005570| 0a 58 20 2a 20 4d 75 73 | 74 20 72 65 61 6c 6c 6f |.X * Mus|t reallo|
|00005580| 63 61 74 65 2e 0a 58 20 | 2a 20 42 75 66 66 65 72 |cate..X |* Buffer|
|00005590| 20 69 73 20 65 6e 6c 61 | 72 67 65 64 20 62 79 20 | is enla|rged by |
|000055a0| 61 74 20 6c 65 61 73 74 | 20 49 4e 5f 42 55 46 5f |at least| IN_BUF_|
|000055b0| 4c 45 4e 20 63 68 61 72 | 61 63 74 65 72 73 2e 20 |LEN char|acters. |
|000055c0| 54 68 65 20 6c 61 72 67 | 65 73 74 0a 58 20 2a 20 |The larg|est.X * |
|000055d0| 70 69 65 63 65 20 77 68 | 69 63 68 20 68 61 73 20 |piece wh|ich has |
|000055e0| 74 6f 20 62 65 20 70 75 | 74 20 69 6e 74 6f 20 74 |to be pu|t into t|
|000055f0| 68 65 20 62 75 66 66 65 | 72 20 77 69 6c 6c 20 62 |he buffe|r will b|
|00005600| 65 20 61 74 20 6d 6f 73 | 74 20 49 4e 5f 42 55 46 |e at mos|t IN_BUF|
|00005610| 5f 4c 45 4e 0a 58 20 2a | 20 63 68 61 72 61 63 74 |_LEN.X *| charact|
|00005620| 65 72 73 2e 20 49 66 20 | 74 68 65 72 65 20 69 73 |ers. If |there is|
|00005630| 20 61 20 73 65 71 75 65 | 6e 63 65 20 6f 66 20 70 | a seque|nce of p|
|00005640| 75 74 73 2c 20 74 68 65 | 20 62 75 66 66 65 72 20 |uts, the| buffer |
|00005650| 77 69 6c 6c 20 62 65 20 | 65 6e 6c 61 72 67 65 64 |will be |enlarged|
|00005660| 0a 58 20 2a 20 65 61 63 | 68 20 74 69 6d 65 2e 20 |.X * eac|h time. |
|00005670| 54 68 69 73 20 73 68 6f | 75 6c 64 20 68 61 70 70 |This sho|uld happ|
|00005680| 65 6e 20 76 65 72 79 20 | 72 61 72 65 6c 79 2e 0a |en very |rarely..|
|00005690| 58 20 2a 2f 0a 58 7b 0a | 58 09 72 65 67 69 73 74 |X */.X{.|X.regist|
|000056a0| 65 72 20 69 6e 74 20 69 | 3b 0a 58 23 20 69 66 64 |er int i|;.X# ifd|
|000056b0| 65 66 20 44 45 42 55 47 | 0a 58 09 66 70 72 69 6e |ef DEBUG|.X.fprin|
|000056c0| 74 66 20 28 70 72 6f 74 | 2c 20 22 6d 61 6b 65 5f |tf (prot|, "make_|
|000056d0| 72 6f 6f 6d 20 3a 3a 20 | 52 45 41 4c 4c 4f 43 20 |room :: |REALLOC |
|000056e0| 72 65 61 6c 6c 6f 63 20 | 63 61 6c 6c 65 64 2e 5c |realloc |called.\|
|000056f0| 6e 22 29 3b 0a 58 09 66 | 66 6c 75 73 68 20 28 70 |n");.X.f|flush (p|
|00005700| 72 6f 74 29 3b 0a 58 23 | 20 65 6e 64 69 66 0a 58 |rot);.X#| endif.X|
|00005710| 09 2f 2a 0a 58 09 20 2a | 20 4c 65 76 65 6c 20 69 |./*.X. *| Level i|
|00005720| 73 20 61 20 70 6f 69 6e | 74 65 72 20 69 6e 74 6f |s a poin|ter into|
|00005730| 20 6f 75 74 5f 62 75 66 | 2e 20 57 65 20 68 61 76 | out_buf|. We hav|
|00005740| 65 20 74 6f 20 73 61 76 | 65 20 69 74 20 68 65 72 |e to sav|e it her|
|00005750| 65 20 61 6e 64 0a 58 09 | 20 2a 20 72 65 73 74 6f |e and.X.| * resto|
|00005760| 72 65 20 69 74 20 6c 61 | 74 65 72 2c 20 62 65 63 |re it la|ter, bec|
|00005770| 61 75 73 65 20 72 65 61 | 6c 6c 6f 63 20 6d 69 67 |ause rea|lloc mig|
|00005780| 68 74 20 63 61 75 73 65 | 20 61 20 63 6f 70 79 69 |ht cause| a copyi|
|00005790| 6e 67 20 6f 66 20 74 68 | 65 0a 58 09 20 2a 20 63 |ng of th|e.X. * c|
|000057a0| 6f 6e 74 65 6e 74 73 20 | 6f 66 20 6f 75 74 5f 62 |ontents |of out_b|
|000057b0| 75 66 20 74 6f 20 61 20 | 6e 65 77 20 61 64 64 72 |uf to a |new addr|
|000057c0| 65 73 73 2e 0a 58 09 20 | 2a 2f 0a 58 09 69 20 3d |ess..X. |*/.X.i =|
|000057d0| 20 6c 65 76 65 6c 20 2d | 20 6f 75 74 5f 62 75 66 | level -| out_buf|
|000057e0| 3b 0a 58 09 62 75 66 5f | 6c 65 6e 20 2b 3d 20 6e |;.X.buf_|len += n|
|000057f0| 3e 49 4e 5f 42 55 46 5f | 4c 45 4e 3f 6e 3a 49 4e |>IN_BUF_|LEN?n:IN|
|00005800| 5f 42 55 46 5f 4c 45 4e | 3b 0a 58 23 20 69 66 64 |_BUF_LEN|;.X# ifd|
|00005810| 65 66 20 44 45 42 55 47 | 0a 58 09 66 70 72 69 6e |ef DEBUG|.X.fprin|
|00005820| 74 66 20 28 70 72 6f 74 | 2c 20 22 6d 61 6b 65 5f |tf (prot|, "make_|
|00005830| 72 6f 6f 6d 20 3a 3a 20 | 6f 75 74 70 75 74 20 62 |room :: |output b|
|00005840| 75 66 66 65 72 20 77 69 | 6c 6c 20 62 65 20 65 6e |uffer wi|ll be en|
|00005850| 6c 61 72 67 65 64 20 74 | 6f 20 25 64 5c 6e 22 2c |larged t|o %d\n",|
|00005860| 20 62 75 66 5f 6c 65 6e | 29 3b 0a 58 23 20 65 6e | buf_len|);.X# en|
|00005870| 64 69 66 0a 58 09 6f 75 | 74 5f 62 75 66 20 3d 20 |dif.X.ou|t_buf = |
|00005880| 28 43 48 41 52 5f 54 59 | 50 45 20 2a 29 20 72 65 |(CHAR_TY|PE *) re|
|00005890| 61 6c 6c 6f 63 20 28 6f | 75 74 5f 62 75 66 2c 20 |alloc (o|ut_buf, |
|000058a0| 28 75 6e 73 69 67 6e 65 | 64 20 69 6e 74 29 62 75 |(unsigne|d int)bu|
|000058b0| 66 5f 6c 65 6e 29 3b 0a | 58 09 69 66 20 28 6f 75 |f_len);.|X.if (ou|
|000058c0| 74 5f 62 75 66 20 3d 3d | 20 4e 55 4c 4c 29 20 7b |t_buf ==| NULL) {|
|000058d0| 09 09 09 2f 2a 20 70 61 | 6e 69 63 20 2a 2f 0a 58 |.../* pa|nic */.X|
|000058e0| 09 09 28 76 6f 69 64 29 | 77 72 69 74 65 20 28 32 |..(void)|write (2|
|000058f0| 2c 20 22 52 45 41 4c 4c | 4f 43 20 45 52 52 4f 52 |, "REALL|OC ERROR|
|00005900| 2e 5c 6e 22 2c 20 31 35 | 29 3b 0a 58 09 09 65 78 |.\n", 15|);.X..ex|
|00005910| 69 74 20 28 31 29 3b 0a | 58 09 7d 0a 58 09 6c 65 |it (1);.|X.}.X.le|
|00005920| 76 65 6c 20 3d 20 6f 75 | 74 5f 62 75 66 20 2b 20 |vel = ou|t_buf + |
|00005930| 69 3b 0a 58 7d 0a 58 0a | 58 76 6f 69 64 0a 58 61 |i;.X}.X.|Xvoid.Xa|
|00005940| 64 64 5f 63 75 72 5f 66 | 69 6c 65 5f 6e 61 6d 65 |dd_cur_f|ile_name|
|00005950| 20 28 29 0a 58 2f 2a 0a | 58 20 2a 20 4f 6e 6c 79 | ().X/*.|X * Only|
|00005960| 20 63 61 6c 6c 65 64 20 | 69 66 20 63 6f 6d 6d 61 | called |if comma|
|00005970| 6e 64 20 6c 69 6e 65 20 | 66 6c 61 67 20 27 2d 70 |nd line |flag '-p|
|00005980| 27 20 77 61 73 20 73 70 | 65 63 69 66 69 65 64 2e |' was sp|ecified.|
|00005990| 0a 58 20 2a 20 41 64 64 | 20 74 68 65 20 6e 61 6d |.X * Add| the nam|
|000059a0| 65 20 6f 66 20 74 68 65 | 20 63 75 72 72 65 6e 74 |e of the| current|
|000059b0| 20 69 6e 70 75 74 20 66 | 69 6c 65 20 74 6f 20 74 | input f|ile to t|
|000059c0| 68 65 20 6f 75 74 70 75 | 74 20 73 74 72 65 61 6d |he outpu|t stream|
|000059d0| 2e 0a 58 20 2a 2f 0a 58 | 7b 0a 58 09 72 65 67 69 |..X */.X|{.X.regi|
|000059e0| 73 74 65 72 20 69 6e 74 | 20 69 3b 0a 58 0a 58 09 |ster int| i;.X.X.|
|000059f0| 69 66 20 28 63 75 72 5f | 66 69 6c 65 5f 6e 61 6d |if (cur_|file_nam|
|00005a00| 65 20 3d 3d 20 4e 55 4c | 4c 29 0a 58 09 09 72 65 |e == NUL|L).X..re|
|00005a10| 74 75 72 6e 3b 0a 58 09 | 69 20 3d 20 73 74 72 6c |turn;.X.|i = strl|
|00005a20| 65 6e 20 28 63 75 72 5f | 66 69 6c 65 5f 6e 61 6d |en (cur_|file_nam|
|00005a30| 65 29 3b 0a 58 09 2f 2a | 0a 58 09 20 2a 20 49 73 |e);.X./*|.X. * Is|
|00005a40| 20 74 68 65 72 65 20 73 | 70 61 63 65 20 66 6f 72 | there s|pace for|
|00005a50| 20 28 69 2b 31 29 20 63 | 68 61 72 61 63 74 65 72 | (i+1) c|haracter|
|00005a60| 73 20 61 74 20 74 68 65 | 20 65 6e 64 20 6f 66 20 |s at the| end of |
|00005a70| 74 68 65 20 6f 75 74 70 | 75 74 20 62 75 66 66 65 |the outp|ut buffe|
|00005a80| 72 3f 0a 58 09 20 2a 20 | 49 66 20 6e 6f 74 2c 20 |r?.X. * |If not, |
|00005a90| 66 6c 75 73 68 20 69 74 | 2e 0a 58 09 20 2a 2f 0a |flush it|..X. */.|
|00005aa0| 58 09 69 66 20 28 28 69 | 6e 74 29 28 6c 65 76 65 |X.if ((i|nt)(leve|
|00005ab0| 6c 20 2d 20 6f 75 74 5f | 62 75 66 29 20 2b 20 69 |l - out_|buf) + i|
|00005ac0| 20 2b 20 31 20 3e 20 62 | 75 66 5f 6c 65 6e 29 0a | + 1 > b|uf_len).|
|00005ad0| 58 09 09 6d 61 6b 65 5f | 72 6f 6f 6d 20 28 69 2b |X..make_|room (i+|
|00005ae0| 31 29 3b 0a 58 09 46 41 | 53 54 5f 43 4f 50 59 20 |1);.X.FA|ST_COPY |
|00005af0| 28 63 75 72 5f 66 69 6c | 65 5f 6e 61 6d 65 2c 20 |(cur_fil|e_name, |
|00005b00| 6c 65 76 65 6c 2c 20 69 | 29 3b 0a 58 09 6c 65 76 |level, i|);.X.lev|
|00005b10| 65 6c 20 2b 3d 20 69 3b | 0a 58 09 2a 6c 65 76 65 |el += i;|.X.*leve|
|00005b20| 6c 2b 2b 20 3d 20 27 3a | 27 3b 0a 58 7d 0a 58 0a |l++ = ':|';.X}.X.|
|00005b30| 58 61 70 70 65 6e 64 20 | 28 62 31 2c 20 62 32 2c |Xappend |(b1, b2,|
|00005b40| 20 69 6e 64 5f 70 65 72 | 6d 29 0a 58 72 65 67 69 | ind_per|m).Xregi|
|00005b50| 73 74 65 72 20 43 48 41 | 52 5f 54 59 50 45 20 2a |ster CHA|R_TYPE *|
|00005b60| 20 62 31 2c 20 2a 20 62 | 32 3b 0a 58 69 6e 74 20 | b1, * b|2;.Xint |
|00005b70| 69 6e 64 5f 70 65 72 6d | 3b 0a 58 2f 2a 0a 58 20 |ind_perm|;.X/*.X |
|00005b80| 2a 20 41 70 70 65 6e 64 | 20 61 20 73 65 71 75 65 |* Append| a seque|
|00005b90| 6e 63 65 20 70 65 72 6d | 61 6e 65 6e 74 6c 79 2e |nce perm|anently.|
|00005ba0| 20 53 65 74 20 74 68 65 | 20 70 6f 69 6e 74 65 72 | Set the| pointer|
|00005bb0| 73 2e 0a 58 20 2a 20 49 | 66 20 74 68 65 72 65 20 |s..X * I|f there |
|00005bc0| 61 72 65 20 6d 6f 72 65 | 20 74 68 61 6e 20 54 48 |are more| than TH|
|00005bd0| 52 45 53 48 4f 4c 44 20 | 63 68 61 72 61 63 74 65 |RESHOLD |characte|
|00005be0| 72 73 20 74 68 65 6e 20 | 77 72 69 74 65 20 74 68 |rs then |write th|
|00005bf0| 65 6d 2e 0a 58 20 2a 2f | 0a 58 7b 0a 58 09 72 65 |em..X */|.X{.X.re|
|00005c00| 67 69 73 74 65 72 20 69 | 6e 74 20 6e 3b 0a 58 0a |gister i|nt n;.X.|
|00005c10| 58 09 2f 2a 0a 58 09 20 | 2a 20 49 66 20 74 68 65 |X./*.X. |* If the|
|00005c20| 20 75 73 65 72 20 77 61 | 6e 74 73 20 69 74 20 61 | user wa|nts it a|
|00005c30| 6e 64 20 74 68 69 73 20 | 69 73 20 74 68 65 20 66 |nd this |is the f|
|00005c40| 69 72 73 74 20 70 61 72 | 74 20 6f 66 20 61 20 73 |irst par|t of a s|
|00005c50| 65 71 75 65 6e 63 65 2c | 0a 58 09 20 2a 20 61 64 |equence,|.X. * ad|
|00005c60| 64 20 6e 61 6d 65 20 6f | 66 20 63 75 72 72 65 6e |d name o|f curren|
|00005c70| 74 20 66 69 6c 65 20 61 | 73 20 70 72 65 66 69 78 |t file a|s prefix|
|00005c80| 2e 0a 58 09 20 2a 2f 0a | 58 09 69 66 20 28 69 6e |..X. */.|X.if (in|
|00005c90| 64 5f 70 72 65 66 69 78 | 20 26 26 20 73 61 76 65 |d_prefix| && save|
|00005ca0| 64 20 3d 3d 20 30 29 0a | 58 09 09 61 64 64 5f 63 |d == 0).|X..add_c|
|00005cb0| 75 72 5f 66 69 6c 65 5f | 6e 61 6d 65 20 28 29 3b |ur_file_|name ();|
|00005cc0| 0a 58 09 2f 2a 0a 58 09 | 20 2a 20 49 66 20 74 68 |.X./*.X.| * If th|
|00005cd0| 65 72 65 20 61 72 65 20 | 6e 6f 20 73 61 76 65 64 |ere are |no saved|
|00005ce0| 20 63 68 61 72 61 63 74 | 65 72 73 20 61 6e 64 20 | charact|ers and |
|00005cf0| 74 68 65 20 75 73 65 72 | 20 77 61 6e 74 73 20 6f |the user| wants o|
|00005d00| 66 66 73 65 74 73 2c 0a | 58 09 20 2a 20 74 68 65 |ffsets,.|X. * the|
|00005d10| 6e 20 77 65 20 68 61 76 | 65 20 74 6f 20 61 64 64 |n we hav|e to add|
|00005d20| 20 61 6e 20 6f 66 66 73 | 65 74 20 66 69 72 73 74 | an offs|et first|
|00005d30| 2e 0a 58 09 20 2a 2f 0a | 58 09 69 66 20 28 69 6e |..X. */.|X.if (in|
|00005d40| 64 5f 6f 66 66 73 65 74 | 20 26 26 20 73 61 76 65 |d_offset| && save|
|00005d50| 64 20 3d 3d 20 30 29 0a | 58 09 09 6f 75 74 70 75 |d == 0).|X..outpu|
|00005d60| 74 5f 6f 66 66 73 65 74 | 20 28 62 31 29 3b 0a 58 |t_offset| (b1);.X|
|00005d70| 09 2f 2a 0a 58 09 20 2a | 20 49 73 20 74 68 65 72 |./*.X. *| Is ther|
|00005d80| 65 20 65 6e 6f 75 67 68 | 20 73 70 61 63 65 20 69 |e enough| space i|
|00005d90| 6e 20 6f 75 74 20 6f 75 | 74 62 75 66 20 3f 0a 58 |n out ou|tbuf ?.X|
|00005da0| 09 20 2a 2f 0a 58 09 6e | 20 3d 20 62 32 20 2d 20 |. */.X.n| = b2 - |
|00005db0| 62 31 3b 0a 58 09 69 66 | 20 28 28 69 6e 74 29 28 |b1;.X.if| ((int)(|
|00005dc0| 6c 65 76 65 6c 20 2d 20 | 6f 75 74 5f 62 75 66 29 |level - |out_buf)|
|00005dd0| 20 2b 20 6e 20 2b 20 31 | 20 3e 20 62 75 66 5f 6c | + n + 1| > buf_l|
|00005de0| 65 6e 29 0a 58 09 09 6d | 61 6b 65 5f 72 6f 6f 6d |en).X..m|ake_room|
|00005df0| 20 28 6e 29 3b 0a 58 09 | 2f 2a 0a 58 09 20 2a 20 | (n);.X.|/*.X. * |
|00005e00| 43 6f 70 79 20 74 68 65 | 20 73 65 71 75 65 6e 63 |Copy the| sequenc|
|00005e10| 65 2e 20 49 74 20 6d 61 | 79 20 62 65 20 65 6d 70 |e. It ma|y be emp|
|00005e20| 74 79 2c 20 73 6f 20 64 | 6f 6e 27 74 20 66 6f 72 |ty, so d|on't for|
|00005e30| 67 65 74 20 74 6f 20 61 | 64 64 20 61 20 4c 46 20 |get to a|dd a LF |
|00005e40| 68 65 72 65 2e 0a 58 09 | 20 2a 2f 0a 58 09 69 66 |here..X.| */.X.if|
|00005e50| 20 28 6e 20 3e 20 30 29 | 20 7b 0a 58 09 09 46 41 | (n > 0)| {.X..FA|
|00005e60| 53 54 5f 43 4f 50 59 20 | 28 62 31 2c 20 6c 65 76 |ST_COPY |(b1, lev|
|00005e70| 65 6c 2c 20 6e 29 3b 0a | 58 09 09 6c 65 76 65 6c |el, n);.|X..level|
|00005e80| 20 2b 3d 20 6e 3b 0a 58 | 09 7d 0a 58 09 69 66 20 | += n;.X|.}.X.if |
|00005e90| 28 69 6e 64 5f 70 65 72 | 6d 20 3d 3d 20 31 29 20 |(ind_per|m == 1) |
|00005ea0| 7b 0a 58 09 09 2a 6c 65 | 76 65 6c 2b 2b 20 3d 20 |{.X..*le|vel++ = |
|00005eb0| 27 5c 6e 27 3b 0a 58 09 | 09 2f 2a 0a 58 09 09 20 |'\n';.X.|./*.X.. |
|00005ec0| 2a 20 54 68 65 72 65 20 | 6d 61 79 20 62 65 20 73 |* There |may be s|
|00005ed0| 6f 6d 65 20 74 65 6d 70 | 6f 72 61 72 69 6c 79 20 |ome temp|orarily |
|00005ee0| 73 61 76 65 64 20 63 68 | 61 72 61 63 74 65 72 73 |saved ch|aracters|
|00005ef0| 20 69 6e 20 6f 75 74 5f | 62 75 66 2e 20 4d 61 6b | in out_|buf. Mak|
|00005f00| 65 0a 58 09 09 20 2a 20 | 74 68 65 6d 20 70 65 72 |e.X.. * |them per|
|00005f10| 6d 61 6e 65 6e 74 2e 0a | 58 09 09 20 2a 2f 0a 58 |manent..|X.. */.X|
|00005f20| 09 09 6e 75 6d 5f 6f 75 | 74 5f 62 75 66 20 3d 20 |..num_ou|t_buf = |
|00005f30| 6c 65 76 65 6c 20 2d 20 | 6f 75 74 5f 62 75 66 3b |level - |out_buf;|
|00005f40| 0a 58 09 09 2f 2a 0a 58 | 09 09 20 2a 20 49 66 20 |.X../*.X|.. * If |
|00005f50| 6e 65 63 65 73 73 61 72 | 79 2c 20 77 72 69 74 65 |necessar|y, write|
|00005f60| 2e 0a 58 09 09 20 2a 2f | 0a 58 09 09 69 66 20 28 |..X.. */|.X..if (|
|00005f70| 6e 75 6d 5f 6f 75 74 5f | 62 75 66 20 3e 20 54 48 |num_out_|buf > TH|
|00005f80| 52 45 53 48 4f 4c 44 29 | 0a 58 09 09 09 66 6c 75 |RESHOLD)|.X...flu|
|00005f90| 73 68 5f 6f 75 74 70 75 | 74 20 28 29 3b 0a 58 09 |sh_outpu|t ();.X.|
|00005fa0| 09 73 61 76 65 64 20 3d | 20 30 3b 0a 58 09 7d 20 |.saved =| 0;.X.} |
|00005fb0| 65 6c 73 65 0a 58 09 09 | 73 61 76 65 64 20 3d 20 |else.X..|saved = |
|00005fc0| 6e 3b 0a 58 7d 0a 58 0a | 58 6f 75 74 70 75 74 5f |n;.X}.X.|Xoutput_|
|00005fd0| 6f 66 66 73 65 74 20 28 | 62 31 29 0a 58 43 48 41 |offset (|b1).XCHA|
|00005fe0| 52 5f 54 59 50 45 20 2a | 20 62 31 3b 0a 58 2f 2a |R_TYPE *| b1;.X/*|
|00005ff0| 0a 58 20 2a 20 43 6f 6e | 76 65 72 74 20 6e 20 74 |.X * Con|vert n t|
|00006000| 6f 20 69 74 73 20 63 68 | 61 72 61 63 74 65 72 20 |o its ch|aracter |
|00006010| 72 65 70 72 65 73 65 6e | 74 61 74 69 6f 6e 20 69 |represen|tation i|
|00006020| 6e 20 64 65 63 69 6d 61 | 6c 20 61 6e 64 20 61 70 |n decima|l and ap|
|00006030| 70 65 6e 64 20 74 68 69 | 73 0a 58 20 2a 20 61 74 |pend thi|s.X * at|
|00006040| 20 74 68 65 20 65 6e 64 | 20 6f 66 20 74 68 65 20 | the end| of the |
|00006050| 6f 75 74 70 75 74 20 62 | 75 66 66 65 72 2e 0a 58 |output b|uffer..X|
|00006060| 20 2a 20 4e 6f 72 6d 61 | 6c 6c 79 20 77 65 20 6f | * Norma|lly we o|
|00006070| 75 74 70 75 74 20 37 20 | 63 68 61 72 61 63 74 65 |utput 7 |characte|
|00006080| 72 73 2e 20 49 66 20 74 | 68 65 20 6e 75 6d 62 65 |rs. If t|he numbe|
|00006090| 72 20 6e 65 65 64 73 20 | 6d 6f 72 65 20 77 65 20 |r needs |more we |
|000060a0| 65 78 70 61 6e 64 2e 0a | 58 20 2a 2f 0a 58 7b 0a |expand..|X */.X{.|
|000060b0| 58 09 72 65 67 69 73 74 | 65 72 20 69 6e 74 20 69 |X.regist|er int i|
|000060c0| 3b 0a 58 09 72 65 67 69 | 73 74 65 72 20 6c 6f 6e |;.X.regi|ster lon|
|000060d0| 67 20 6a 3b 0a 58 09 72 | 65 67 69 73 74 65 72 20 |g j;.X.r|egister |
|000060e0| 4c 53 45 45 4b 5f 54 59 | 50 45 20 6c 3b 0a 58 09 |LSEEK_TY|PE l;.X.|
|000060f0| 43 48 41 52 5f 54 59 50 | 45 20 2a 20 62 3b 0a 58 |CHAR_TYP|E * b;.X|
|00006100| 0a 58 09 6c 20 3d 20 6f | 66 66 73 65 74 20 2b 20 |.X.l = o|ffset + |
|00006110| 28 69 6e 74 29 28 62 31 | 20 2d 20 62 75 66 29 3b |(int)(b1| - buf);|
|00006120| 0a 58 09 2f 2a 0a 58 09 | 20 2a 20 48 6f 77 20 6d |.X./*.X.| * How m|
|00006130| 61 6e 79 20 63 68 61 72 | 61 63 74 65 72 73 20 6d |any char|acters m|
|00006140| 75 73 74 20 77 65 20 6f | 75 74 70 75 74 20 3f 0a |ust we o|utput ?.|
|00006150| 58 09 20 2a 2f 0a 58 09 | 66 6f 72 20 28 69 20 3d |X. */.X.|for (i =|
|00006160| 20 37 2c 20 6a 20 3d 20 | 31 30 30 30 30 30 30 30 | 7, j = |10000000|
|00006170| 4c 3b 20 6c 20 3e 3d 20 | 6a 3b 20 6a 20 2a 3d 20 |L; l >= |j; j *= |
|00006180| 31 30 2c 20 69 2b 2b 29 | 3b 0a 58 0a 58 09 2f 2a |10, i++)|;.X.X./*|
|00006190| 0a 58 09 20 2a 20 49 73 | 20 74 68 65 72 65 20 73 |.X. * Is| there s|
|000061a0| 70 61 63 65 20 66 6f 72 | 20 28 69 2b 31 29 20 63 |pace for| (i+1) c|
|000061b0| 68 61 72 61 63 74 65 72 | 73 20 61 74 20 74 68 65 |haracter|s at the|
|000061c0| 20 65 6e 64 20 6f 66 20 | 74 68 65 20 6f 75 74 70 | end of |the outp|
|000061d0| 75 74 20 62 75 66 66 65 | 72 3f 0a 58 09 20 2a 20 |ut buffe|r?.X. * |
|000061e0| 49 66 20 6e 6f 74 2c 20 | 66 6c 75 73 68 20 69 74 |If not, |flush it|
|000061f0| 2e 0a 58 09 20 2a 2f 0a | 58 09 69 66 20 28 28 69 |..X. */.|X.if ((i|
|00006200| 6e 74 29 28 6c 65 76 65 | 6c 20 2d 20 6f 75 74 5f |nt)(leve|l - out_|
|00006210| 62 75 66 29 20 2b 20 69 | 2b 31 20 3e 20 62 75 66 |buf) + i|+1 > buf|
|00006220| 5f 6c 65 6e 29 0a 58 09 | 09 6d 61 6b 65 5f 72 6f |_len).X.|.make_ro|
|00006230| 6f 6d 20 28 69 2b 31 29 | 3b 0a 58 0a 58 09 62 20 |om (i+1)|;.X.X.b |
|00006240| 3d 20 6c 65 76 65 6c 3b | 0a 58 09 6c 65 76 65 6c |= level;|.X.level|
|00006250| 20 2b 3d 20 69 2b 31 3b | 0a 58 0a 58 09 62 5b 69 | += i+1;|.X.X.b[i|
|00006260| 2d 2d 5d 20 3d 20 27 20 | 27 3b 0a 58 09 2f 2a 0a |--] = ' |';.X./*.|
|00006270| 58 09 20 2a 20 43 6f 6e | 76 65 72 74 20 74 68 65 |X. * Con|vert the|
|00006280| 20 6e 75 6d 62 65 72 2e | 0a 58 09 20 2a 2f 0a 58 | number.|.X. */.X|
|00006290| 09 64 6f 20 7b 0a 58 09 | 09 62 5b 69 2d 2d 5d 20 |.do {.X.|.b[i--] |
|000062a0| 3d 20 27 30 27 20 2b 20 | 6c 20 25 20 31 30 3b 0a |= '0' + |l % 10;.|
|000062b0| 58 09 09 6c 20 2f 3d 20 | 31 30 3b 0a 58 09 7d 20 |X..l /= |10;.X.} |
|000062c0| 77 68 69 6c 65 20 28 6c | 20 21 3d 20 30 29 3b 0a |while (l| != 0);.|
|000062d0| 58 09 2f 2a 0a 58 09 20 | 2a 20 41 64 64 20 73 6f |X./*.X. |* Add so|
|000062e0| 6d 65 20 62 6c 61 6e 6b | 73 20 69 6e 20 66 72 6f |me blank|s in fro|
|000062f0| 6e 74 20 6f 66 20 6e 75 | 6d 62 65 72 0a 58 09 20 |nt of nu|mber.X. |
|00006300| 2a 2f 0a 58 09 66 6f 72 | 20 28 3b 20 69 20 3e 3d |*/.X.for| (; i >=|
|00006310| 20 30 3b 20 69 2d 2d 29 | 0a 58 09 09 62 20 5b 69 | 0; i--)|.X..b [i|
|00006320| 5d 20 3d 20 27 20 27 3b | 0a 58 7d 0a 58 0a 58 23 |] = ' ';|.X}.X.X#|
|00006330| 20 69 66 64 65 66 20 44 | 45 42 55 47 0a 58 6f 75 | ifdef D|EBUG.Xou|
|00006340| 74 20 28 73 29 0a 58 7b | 0a 58 09 66 70 75 74 63 |t (s).X{|.X.fputc|
|00006350| 20 28 73 2c 20 73 74 64 | 65 72 72 29 3b 0a 58 7d | (s, std|err);.X}|
|00006360| 0a 58 23 20 65 6c 73 65 | 20 44 45 42 55 47 0a 58 |.X# else| DEBUG.X|
|00006370| 2f 2a 0a 58 20 2a 20 54 | 68 65 20 6d 61 69 6e 20 |/*.X * T|he main |
|00006380| 70 72 6f 67 72 61 6d 20 | 63 61 6c 6c 73 20 61 20 |program |calls a |
|00006390| 72 6f 75 74 69 6e 65 20 | 63 61 6c 6c 65 64 20 27 |routine |called '|
|000063a0| 6f 75 74 27 2e 0a 58 20 | 2a 2f 0a 58 6f 75 74 20 |out'..X |*/.Xout |
|000063b0| 28 73 29 0a 58 72 65 67 | 69 73 74 65 72 20 63 68 |(s).Xreg|ister ch|
|000063c0| 61 72 20 2a 20 73 3b 0a | 58 7b 0a 58 09 28 76 6f |ar * s;.|X{.X.(vo|
|000063d0| 69 64 29 77 72 69 74 65 | 20 28 32 2c 20 73 2c 20 |id)write| (2, s, |
|000063e0| 73 74 72 6c 65 6e 28 73 | 29 29 3b 0a 58 7d 0a 58 |strlen(s|));.X}.X|
|000063f0| 23 20 65 6e 64 69 66 20 | 44 45 42 55 47 0a 45 4e |# endif |DEBUG.EN|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.