home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1993-12-12 | 38.4 KB | [ TEXT/MPS ]
open in: MacOS 8.1
extracted
|
Win98
extracted
|
DOS
extracted
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary ).
You can browse this item here: util.c
Confidence Program Detection Match Type Support
66%
dexvert
Compact Compressed (Unix) (archive/compact)
ext
Supported
10%
dexvert
MacBinary (archive/macBinary)
fallback
Supported
10%
dexvert
Jesper Olsen Module (music/jesperOlsen)
magic
Supported
1%
dexvert
Text File (text/txt)
fallback
Supported
100%
file
MacBinary II, inited, Sun Dec 12 12:17:25 1993, modified Sun Dec 12 12:17:25 1993, creator 'MPS ', type ASCII, 38620 bytes "util.c" , at 0x975c 428 bytes resource
default (weak)
99%
file
data
default
49%
TrID
Macintosh plain text (MacBinary)
default
33%
TrID
TTComp archive compressed (bin-4K)
default (weak)
16%
TrID
MacBinary 2
default (weak)
100%
siegfried
fmt/1762 MacBinary (II)
default
100%
lsar
MacBinary
default
id metadata key value macFileType [ TEXT] macFileCreator [ MPS ]
hex view +--------+-------------------------+-------------------------+--------+--------+ |00000000| 00 06 75 74 69 6c 2e 63 | 00 00 00 00 00 00 00 00 |..util.c|........| |00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00000040| 00 54 45 58 54 4d 50 53 | 20 01 00 00 00 00 00 00 |.TEXTMPS| .......| |00000050| 00 00 00 00 00 96 dc 00 | 00 01 ac a9 31 02 a5 a9 |........|....1...| |00000060| 31 02 a5 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |1.......|........| |00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 75 09 00 00 |........|....u...| |00000080| 2f 2a 20 24 52 43 53 66 | 69 6c 65 3a 20 75 74 69 |/* $RCSf|ile: uti| |00000090| 6c 2e 63 2c 76 20 24 24 | 52 65 76 69 73 69 6f 6e |l.c,v $$|Revision| |000000a0| 3a 20 34 2e 30 2e 31 2e | 36 20 24 24 44 61 74 65 |: 4.0.1.|6 $$Date| |000000b0| 3a 20 39 32 2f 30 36 2f | 31 31 20 32 31 3a 31 38 |: 92/06/|11 21:18| |000000c0| 3a 34 37 20 24 0d 20 2a | 0d 20 2a 20 20 20 20 43 |:47 $. *|. * C| |000000d0| 6f 70 79 72 69 67 68 74 | 20 28 63 29 20 31 39 39 |opyright| (c) 199| |000000e0| 31 2c 20 4c 61 72 72 79 | 20 57 61 6c 6c 0d 20 2a |1, Larry| Wall. *| |000000f0| 0d 20 2a 20 20 20 20 59 | 6f 75 20 6d 61 79 20 64 |. * Y|ou may d| |00000100| 69 73 74 72 69 62 75 74 | 65 20 75 6e 64 65 72 20 |istribut|e under | |00000110| 74 68 65 20 74 65 72 6d | 73 20 6f 66 20 74 68 65 |the term|s of the| |00000120| 20 50 65 72 6c 20 41 72 | 74 69 73 74 69 63 20 4c | Perl Ar|tistic L| |00000130| 69 63 65 6e 73 65 2c 0d | 20 2a 20 20 20 20 61 73 |icense,.| * as| |00000140| 20 73 70 65 63 69 66 69 | 65 64 20 69 6e 20 74 68 | specifi|ed in th| |00000150| 65 20 52 45 41 44 4d 45 | 20 66 69 6c 65 2e 0d 20 |e README| file.. | |00000160| 2a 0d 20 2a 20 24 4c 6f | 67 3a 09 75 74 69 6c 2e |*. * $Lo|g:.util.| |00000170| 63 2c 76 20 24 0d 20 2a | 20 52 65 76 69 73 69 6f |c,v $. *| Revisio| |00000180| 6e 20 34 2e 30 2e 31 2e | 36 20 20 39 32 2f 30 36 |n 4.0.1.|6 92/06| |00000190| 2f 31 31 20 20 32 31 3a | 31 38 3a 34 37 20 20 6c |/11 21:|18:47 l| |000001a0| 77 61 6c 6c 0d 20 2a 20 | 70 61 74 63 68 33 34 3a |wall. * |patch34:| |000001b0| 20 62 6f 6e 65 68 65 61 | 64 65 64 20 74 79 70 6f | bonehea|ded typo| |000001c0| 20 69 6e 20 6d 79 5f 62 | 63 6f 70 79 28 29 0d 20 | in my_b|copy(). | |000001d0| 2a 20 0d 20 2a 20 52 65 | 76 69 73 69 6f 6e 20 34 |* . * Re|vision 4| |000001e0| 2e 30 2e 31 2e 35 20 20 | 39 32 2f 30 36 2f 30 38 |.0.1.5 |92/06/08| |000001f0| 20 20 31 36 3a 30 38 3a | 33 37 20 20 6c 77 61 6c | 16:08:|37 lwal| |00000200| 6c 0d 20 2a 20 70 61 74 | 63 68 32 30 3a 20 72 65 |l. * pat|ch20: re| |00000210| 6d 6f 76 65 64 20 69 6d | 70 6c 69 63 69 74 20 69 |moved im|plicit i| |00000220| 6e 74 20 64 65 63 6c 61 | 72 61 74 69 6f 6e 73 20 |nt decla|rations | |00000230| 6f 6e 20 66 75 6e 63 74 | 69 6f 6e 73 0d 20 2a 20 |on funct|ions. * | |00000240| 70 61 74 63 68 32 30 3a | 20 50 65 72 6c 20 6e 6f |patch20:| Perl no| |00000250| 77 20 64 69 73 74 69 6e | 67 75 69 73 68 65 73 20 |w distin|guishes | |00000260| 6f 76 65 72 6c 61 70 70 | 65 64 20 63 6f 70 69 65 |overlapp|ed copie| |00000270| 73 20 66 72 6f 6d 20 6e | 6f 6e 2d 6f 76 65 72 6c |s from n|on-overl| |00000280| 61 70 70 65 64 0d 20 2a | 20 70 61 74 63 68 32 30 |apped. *| patch20| |00000290| 3a 20 66 69 78 65 64 20 | 63 6f 6e 66 75 73 69 6f |: fixed |confusio| |000002a0| 6e 20 62 65 74 77 65 65 | 6e 20 61 20 2a 76 61 72 |n betwee|n a *var| |000002b0| 27 73 20 72 65 61 6c 20 | 6e 61 6d 65 20 61 6e 64 |'s real |name and| |000002c0| 20 69 74 73 20 65 66 66 | 65 63 74 69 76 65 20 6e | its eff|ective n| |000002d0| 61 6d 65 0d 20 2a 20 70 | 61 74 63 68 32 30 3a 20 |ame. * p|atch20: | |000002e0| 62 63 6f 70 79 28 29 20 | 61 6e 64 20 6d 65 6d 63 |bcopy() |and memc| |000002f0| 70 79 28 29 20 6e 6f 77 | 20 74 65 73 74 65 64 20 |py() now| tested | |00000300| 66 6f 72 20 6f 76 65 72 | 6c 61 70 20 73 61 66 65 |for over|lap safe| |00000310| 74 79 0d 20 2a 20 70 61 | 74 63 68 32 30 3a 20 61 |ty. * pa|tch20: a| |00000320| 64 64 65 64 20 41 74 61 | 72 69 20 53 54 20 70 6f |dded Ata|ri ST po| |00000330| 72 74 61 62 69 6c 69 74 | 79 0d 20 2a 20 0d 20 2a |rtabilit|y. * . *| |00000340| 20 52 65 76 69 73 69 6f | 6e 20 34 2e 30 2e 31 2e | Revisio|n 4.0.1.| |00000350| 34 20 20 39 31 2f 31 31 | 2f 31 31 20 20 31 36 3a |4 91/11|/11 16:| |00000360| 34 38 3a 35 34 20 20 6c | 77 61 6c 6c 0d 20 2a 20 |48:54 l|wall. * | |00000370| 70 61 74 63 68 31 39 3a | 20 73 74 75 64 79 20 77 |patch19:| study w| |00000380| 61 73 20 62 75 73 74 65 | 64 20 62 79 20 34 2e 30 |as buste|d by 4.0| |00000390| 31 38 0d 20 2a 20 70 61 | 74 63 68 31 39 3a 20 61 |18. * pa|tch19: a| |000003a0| 64 64 65 64 20 6c 69 74 | 74 6c 65 2d 65 6e 64 69 |dded lit|tle-endi| |000003b0| 61 6e 20 70 61 63 6b 2f | 75 6e 70 61 63 6b 20 6f |an pack/|unpack o| |000003c0| 70 74 69 6f 6e 73 0d 20 | 2a 20 0d 20 2a 20 52 65 |ptions. |* . * Re| |000003d0| 76 69 73 69 6f 6e 20 34 | 2e 30 2e 31 2e 33 20 20 |vision 4|.0.1.3 | |000003e0| 39 31 2f 31 31 2f 30 35 | 20 20 31 39 3a 31 38 3a |91/11/05| 19:18:| |000003f0| 32 36 20 20 6c 77 61 6c | 6c 0d 20 2a 20 70 61 74 |26 lwal|l. * pat| |00000400| 63 68 31 31 3a 20 73 61 | 66 65 20 6d 61 6c 6c 6f |ch11: sa|fe mallo| |00000410| 63 20 63 6f 64 65 20 6e | 6f 77 20 69 6e 74 65 67 |c code n|ow integ| |00000420| 72 61 74 65 64 20 69 6e | 74 6f 20 50 65 72 6c 27 |rated in|to Perl'| |00000430| 73 20 6d 61 6c 6c 6f 63 | 20 77 68 65 6e 20 70 6f |s malloc| when po| |00000440| 73 73 69 62 6c 65 0d 20 | 2a 20 70 61 74 63 68 31 |ssible. |* patch1| |00000450| 31 3a 20 69 6e 64 65 78 | 28 22 6c 69 74 74 6c 65 |1: index|("little| |00000460| 22 2c 20 22 6c 6f 6e 67 | 65 72 20 73 74 72 69 6e |", "long|er strin| |00000470| 67 22 29 20 63 6f 75 6c | 64 20 76 69 73 69 74 20 |g") coul|d visit | |00000480| 66 61 72 61 77 61 79 20 | 70 6c 61 63 65 73 0d 20 |faraway |places. | |00000490| 2a 20 70 61 74 63 68 31 | 31 3a 20 77 61 72 6e 20 |* patch1|1: warn | |000004a0| 27 2d 27 20 78 20 31 30 | 30 30 30 20 64 75 6d 70 |'-' x 10|000 dump| |000004b0| 65 64 20 63 6f 72 65 0d | 20 2a 20 70 61 74 63 68 |ed core.| * patch| |000004c0| 31 31 3a 20 66 6f 72 6b | 65 64 20 65 78 65 63 20 |11: fork|ed exec | |000004d0| 6f 6e 20 6e 6f 6e 2d 65 | 78 69 73 74 65 6e 74 20 |on non-e|xistent | |000004e0| 70 72 6f 67 72 61 6d 20 | 6e 6f 77 20 69 73 73 75 |program |now issu| |000004f0| 65 73 20 61 20 77 61 72 | 6e 69 6e 67 0d 20 2a 20 |es a war|ning. * | |00000500| 0d 20 2a 20 52 65 76 69 | 73 69 6f 6e 20 34 2e 30 |. * Revi|sion 4.0| |00000510| 2e 31 2e 32 20 20 39 31 | 2f 30 36 2f 30 37 20 20 |.1.2 91|/06/07 | |00000520| 31 32 3a 31 30 3a 34 32 | 20 20 6c 77 61 6c 6c 0d |12:10:42| lwall.| |00000530| 20 2a 20 70 61 74 63 68 | 34 3a 20 6e 65 77 20 63 | * patch|4: new c| |00000540| 6f 70 79 72 69 67 68 74 | 20 6e 6f 74 69 63 65 0d |opyright| notice.| |00000550| 20 2a 20 70 61 74 63 68 | 34 3a 20 6d 61 64 65 20 | * patch|4: made | |00000560| 73 6f 6d 65 20 61 6c 6c | 6f 77 61 6e 63 65 73 20 |some all|owances | |00000570| 66 6f 72 20 22 73 65 6d | 69 2d 73 74 61 6e 64 61 |for "sem|i-standa| |00000580| 72 64 22 20 43 0d 20 2a | 20 70 61 74 63 68 34 3a |rd" C. *| patch4:| |00000590| 20 69 6e 64 65 78 28 29 | 20 63 6f 75 6c 64 20 62 | index()| could b| |000005a0| 6c 6f 77 20 75 70 20 73 | 65 61 72 63 68 69 6e 67 |low up s|earching| |000005b0| 20 66 6f 72 20 6e 75 6c | 6c 20 73 74 72 69 6e 67 | for nul|l string| |000005c0| 0d 20 2a 20 70 61 74 63 | 68 34 3a 20 74 61 69 6e |. * patc|h4: tain| |000005d0| 74 63 68 65 63 6b 73 20 | 63 6f 75 6c 64 20 69 6d |tchecks |could im| |000005e0| 70 72 6f 70 65 72 6c 79 | 20 6d 6f 64 69 66 79 20 |properly| modify | |000005f0| 70 61 72 65 6e 74 20 69 | 6e 20 76 66 6f 72 6b 28 |parent i|n vfork(| |00000600| 29 0d 20 2a 20 70 61 74 | 63 68 34 3a 20 65 78 65 |). * pat|ch4: exe| |00000610| 63 20 77 6f 75 6c 64 20 | 63 6c 6f 73 65 20 66 69 |c would |close fi| |00000620| 6c 65 73 20 65 76 65 6e | 20 69 66 20 79 6f 75 20 |les even| if you | |00000630| 63 6c 65 61 72 65 64 20 | 63 6c 6f 73 65 2d 6f 6e |cleared |close-on| |00000640| 2d 65 78 65 63 20 66 6c | 61 67 0d 20 2a 20 0d 20 |-exec fl|ag. * . | |00000650| 2a 20 52 65 76 69 73 69 | 6f 6e 20 34 2e 30 2e 31 |* Revisi|on 4.0.1| |00000660| 2e 31 20 20 39 31 2f 30 | 34 2f 31 32 20 20 30 39 |.1 91/0|4/12 09| |00000670| 3a 31 39 3a 32 35 20 20 | 6c 77 61 6c 6c 0d 20 2a |:19:25 |lwall. *| |00000680| 20 70 61 74 63 68 31 3a | 20 72 61 6e 64 6f 6d 20 | patch1:| random | |00000690| 63 6c 65 61 6e 75 70 20 | 69 6e 20 63 70 70 20 6e |cleanup |in cpp n| |000006a0| 61 6d 65 73 70 61 63 65 | 0d 20 2a 20 0d 20 2a 20 |amespace|. * . * | |000006b0| 52 65 76 69 73 69 6f 6e | 20 34 2e 30 20 20 39 31 |Revision| 4.0 91| |000006c0| 2f 30 33 2f 32 30 20 20 | 30 31 3a 35 36 3a 33 39 |/03/20 |01:56:39| |000006d0| 20 20 6c 77 61 6c 6c 0d | 20 2a 20 34 2e 30 20 62 | lwall.| * 4.0 b| |000006e0| 61 73 65 6c 69 6e 65 2e | 0d 20 2a 20 0d 20 2a 2f |aseline.|. * . */| |000006f0| 0d 2f 2a 53 55 50 50 52 | 45 53 53 20 31 31 32 2a |./*SUPPR|ESS 112*| |00000700| 2f 0d 0d 23 69 6e 63 6c | 75 64 65 20 22 45 58 54 |/..#incl|ude "EXT| |00000710| 45 52 4e 2e 68 22 0d 23 | 69 6e 63 6c 75 64 65 20 |ERN.h".#|include | |00000720| 22 70 65 72 6c 2e 68 22 | 0d 0d 23 69 66 20 21 64 |"perl.h"|..#if !d| |00000730| 65 66 69 6e 65 64 28 4e | 53 49 47 29 20 7c 7c 20 |efined(N|SIG) || | |00000740| 64 65 66 69 6e 65 64 28 | 4d 5f 55 4e 49 58 29 20 |defined(|M_UNIX) | |00000750| 7c 7c 20 64 65 66 69 6e | 65 64 28 4d 5f 58 45 4e ||| defin|ed(M_XEN| |00000760| 49 58 29 0d 23 69 6e 63 | 6c 75 64 65 20 3c 73 69 |IX).#inc|lude <si| |00000770| 67 6e 61 6c 2e 68 3e 0d | 23 65 6e 64 69 66 0d 0d |gnal.h>.|#endif..| |00000780| 23 69 66 64 65 66 20 49 | 5f 56 46 4f 52 4b 0d 23 |#ifdef I|_VFORK.#| |00000790| 20 20 69 6e 63 6c 75 64 | 65 20 3c 76 66 6f 72 6b | includ|e <vfork| |000007a0| 2e 68 3e 0d 23 65 6e 64 | 69 66 0d 0d 23 69 66 64 |.h>.#end|if..#ifd| |000007b0| 65 66 20 49 5f 56 41 52 | 41 52 47 53 0d 23 20 20 |ef I_VAR|ARGS.# | |000007c0| 69 6e 63 6c 75 64 65 20 | 3c 76 61 72 61 72 67 73 |include |<varargs| |000007d0| 2e 68 3e 0d 23 65 6e 64 | 69 66 0d 0d 23 69 66 64 |.h>.#end|if..#ifd| |000007e0| 65 66 20 49 5f 46 43 4e | 54 4c 0d 23 20 20 69 6e |ef I_FCN|TL.# in| |000007f0| 63 6c 75 64 65 20 3c 66 | 63 6e 74 6c 2e 68 3e 0d |clude <f|cntl.h>.| |00000800| 23 65 6e 64 69 66 0d 23 | 69 66 64 65 66 20 49 5f |#endif.#|ifdef I_| |00000810| 53 59 53 5f 46 49 4c 45 | 0d 23 20 20 69 6e 63 6c |SYS_FILE|.# incl| |00000820| 75 64 65 20 3c 73 79 73 | 2f 66 69 6c 65 2e 68 3e |ude <sys|/file.h>| |00000830| 0d 23 65 6e 64 69 66 0d | 0d 23 64 65 66 69 6e 65 |.#endif.|.#define| |00000840| 20 46 4c 55 53 48 0d 0d | 23 69 66 6e 64 65 66 20 | FLUSH..|#ifndef | |00000850| 73 61 66 65 6d 61 6c 6c | 6f 63 0d 0d 73 74 61 74 |safemall|oc..stat| |00000860| 69 63 20 63 68 61 72 20 | 6e 6f 6d 65 6d 5b 5d 20 |ic char |nomem[] | |00000870| 3d 20 22 4f 75 74 20 6f | 66 20 6d 65 6d 6f 72 79 |= "Out o|f memory| |00000880| 21 5c 6e 22 3b 0d 0d 2f | 2a 20 70 61 72 61 6e 6f |!\n";../|* parano| |00000890| 69 64 20 76 65 72 73 69 | 6f 6e 20 6f 66 20 6d 61 |id versi|on of ma| |000008a0| 6c 6c 6f 63 20 2a 2f 0d | 0d 23 69 66 64 65 66 20 |lloc */.|.#ifdef | |000008b0| 44 45 42 55 47 47 49 4e | 47 0d 73 74 61 74 69 63 |DEBUGGIN|G.static| |000008c0| 20 69 6e 74 20 61 6e 20 | 3d 20 30 3b 0d 23 65 6e | int an |= 0;.#en| |000008d0| 64 69 66 0d 0d 2f 2a 20 | 4e 4f 54 45 3a 20 20 44 |dif../* |NOTE: D| |000008e0| 6f 20 6e 6f 74 20 63 61 | 6c 6c 20 74 68 65 20 6e |o not ca|ll the n| |000008f0| 65 78 74 20 74 68 72 65 | 65 20 72 6f 75 74 69 6e |ext thre|e routin| |00000900| 65 73 20 64 69 72 65 63 | 74 6c 79 2e 20 20 55 73 |es direc|tly. Us| |00000910| 65 20 74 68 65 20 6d 61 | 63 72 6f 73 0d 20 2a 20 |e the ma|cros. * | |00000920| 69 6e 20 68 61 6e 64 79 | 2e 68 2c 20 73 6f 20 74 |in handy|.h, so t| |00000930| 68 61 74 20 77 65 20 63 | 61 6e 20 65 61 73 69 6c |hat we c|an easil| |00000940| 79 20 72 65 64 65 66 69 | 6e 65 20 65 76 65 72 79 |y redefi|ne every| |00000950| 74 68 69 6e 67 20 74 6f | 20 64 6f 20 74 72 61 63 |thing to| do trac| |00000960| 6b 69 6e 67 20 6f 66 0d | 20 2a 20 61 6c 6c 6f 63 |king of.| * alloc| |00000970| 61 74 65 64 20 68 75 6e | 6b 73 20 62 61 63 6b 20 |ated hun|ks back | |00000980| 74 6f 20 74 68 65 20 6f | 72 69 67 69 6e 61 6c 20 |to the o|riginal | |00000990| 4e 65 77 20 74 6f 20 74 | 72 61 63 6b 20 64 6f 77 |New to t|rack dow| |000009a0| 6e 20 61 6e 79 20 6d 65 | 6d 6f 72 79 20 6c 65 61 |n any me|mory lea| |000009b0| 6b 73 2e 0d 20 2a 2f 0d | 0d 23 69 66 64 65 66 20 |ks.. */.|.#ifdef | |000009c0| 6d 61 63 69 6e 74 6f 73 | 68 0d 65 78 74 65 72 6e |macintos|h.extern| |000009d0| 20 76 6f 69 64 20 2a 20 | 67 53 61 63 72 69 66 69 | void * |gSacrifi| |000009e0| 63 69 61 6c 47 6f 61 74 | 3b 0d 23 65 6e 64 69 66 |cialGoat|;.#endif| |000009f0| 0d 0d 63 68 61 72 20 2a | 0d 73 61 66 65 6d 61 6c |..char *|.safemal| |00000a00| 6c 6f 63 28 73 69 7a 65 | 29 0d 23 69 66 64 65 66 |loc(size|).#ifdef| |00000a10| 20 4d 53 44 4f 53 0d 75 | 6e 73 69 67 6e 65 64 20 | MSDOS.u|nsigned | |00000a20| 6c 6f 6e 67 20 73 69 7a | 65 3b 0d 23 65 6c 73 65 |long siz|e;.#else| |00000a30| 0d 4d 45 4d 5f 53 49 5a | 45 20 73 69 7a 65 3b 0d |.MEM_SIZ|E size;.| |00000a40| 23 65 6e 64 69 66 20 2f | 2a 20 4d 53 44 4f 53 20 |#endif /|* MSDOS | |00000a50| 2a 2f 0d 7b 0d 20 20 20 | 20 63 68 61 72 20 2a 70 |*/.{. | char *p| |00000a60| 74 72 3b 0d 23 69 66 6e | 64 65 66 20 53 54 44 4d |tr;.#ifn|def STDM| |00000a70| 41 43 0d 20 20 20 20 63 | 68 61 72 20 2a 6d 61 6c |AC. c|har *mal| |00000a80| 6c 6f 63 28 29 3b 0d 23 | 65 6e 64 69 66 20 2f 2a |loc();.#|endif /*| |00000a90| 20 21 20 53 54 44 4d 41 | 43 20 2a 2f 0d 0d 23 69 | ! STDMA|C */..#i| |00000aa0| 66 64 65 66 20 4d 53 44 | 4f 53 0d 09 69 66 20 28 |fdef MSD|OS..if (| |00000ab0| 73 69 7a 65 20 3e 20 30 | 78 66 66 66 66 29 20 7b |size > 0|xffff) {| |00000ac0| 0d 09 09 66 70 72 69 6e | 74 66 28 73 74 64 65 72 |...fprin|tf(stder| |00000ad0| 72 2c 20 22 41 6c 6c 6f | 63 61 74 69 6f 6e 20 74 |r, "Allo|cation t| |00000ae0| 6f 6f 20 6c 61 72 67 65 | 3a 20 25 6c 78 5c 6e 22 |oo large|: %lx\n"| |00000af0| 2c 20 73 69 7a 65 29 20 | 46 4c 55 53 48 3b 0d 09 |, size) |FLUSH;..| |00000b00| 09 65 78 69 74 28 31 29 | 3b 0d 09 7d 0d 23 65 6e |.exit(1)|;..}.#en| |00000b10| 64 69 66 20 2f 2a 20 4d | 53 44 4f 53 20 2a 2f 0d |dif /* M|SDOS */.| |00000b20| 23 69 66 64 65 66 20 44 | 45 42 55 47 47 49 4e 47 |#ifdef D|EBUGGING| |00000b30| 0d 20 20 20 20 69 66 20 | 28 28 6c 6f 6e 67 29 73 |. if |((long)s| |00000b40| 69 7a 65 20 3c 20 30 29 | 0d 09 66 61 74 61 6c 28 |ize < 0)|..fatal(| |00000b50| 22 70 61 6e 69 63 3a 20 | 6d 61 6c 6c 6f 63 22 29 |"panic: |malloc")| |00000b60| 3b 0d 23 65 6e 64 69 66 | 0d 20 20 20 20 70 74 72 |;.#endif|. ptr| |00000b70| 20 3d 20 6d 61 6c 6c 6f | 63 28 73 69 7a 65 3f 73 | = mallo|c(size?s| |00000b80| 69 7a 65 3a 31 29 3b 09 | 2f 2a 20 6d 61 6c 6c 6f |ize:1);.|/* mallo| |00000b90| 63 28 30 29 20 69 73 20 | 4e 41 53 54 59 20 6f 6e |c(0) is |NASTY on| |00000ba0| 20 6f 75 72 20 73 79 73 | 74 65 6d 20 2a 2f 0d 23 | our sys|tem */.#| |00000bb0| 69 66 64 65 66 20 44 45 | 42 55 47 47 49 4e 47 0d |ifdef DE|BUGGING.| |00000bc0| 23 20 20 69 66 20 21 28 | 64 65 66 69 6e 65 64 28 |# if !(|defined(| |00000bd0| 49 32 38 36 29 20 7c 7c | 20 64 65 66 69 6e 65 64 |I286) ||| defined| |00000be0| 28 61 74 61 72 69 73 74 | 29 29 0d 23 69 66 64 65 |(atarist|)).#ifde| |00000bf0| 66 20 6d 61 63 69 6e 74 | 6f 73 68 0d 20 20 20 20 |f macint|osh. | |00000c00| 69 66 20 28 64 65 62 75 | 67 20 26 20 31 32 38 29 |if (debu|g & 128)| |00000c10| 0d 09 66 70 72 69 6e 74 | 66 28 70 65 72 6c 64 62 |..fprint|f(perldb| |00000c20| 67 2c 22 30 78 25 78 3a | 20 28 25 30 35 64 29 20 |g,"0x%x:| (%05d) | |00000c30| 6d 61 6c 6c 6f 63 20 25 | 6c 64 20 62 79 74 65 73 |malloc %|ld bytes| |00000c40| 5c 6e 22 2c 70 74 72 2c | 61 6e 2b 2b 2c 28 6c 6f |\n",ptr,|an++,(lo| |00000c50| 6e 67 29 73 69 7a 65 29 | 3b 0d 23 65 6c 73 65 0d |ng)size)|;.#else.| |00000c60| 20 20 20 20 69 66 20 28 | 64 65 62 75 67 20 26 20 | if (|debug & | |00000c70| 31 32 38 29 0d 09 66 70 | 72 69 6e 74 66 28 73 74 |128)..fp|rintf(st| |00000c80| 64 65 72 72 2c 22 30 78 | 25 78 3a 20 28 25 30 35 |derr,"0x|%x: (%05| |00000c90| 64 29 20 6d 61 6c 6c 6f | 63 20 25 6c 64 20 62 79 |d) mallo|c %ld by| |00000ca0| 74 65 73 5c 6e 22 2c 70 | 74 72 2c 61 6e 2b 2b 2c |tes\n",p|tr,an++,| |00000cb0| 28 6c 6f 6e 67 29 73 69 | 7a 65 29 3b 0d 23 65 6e |(long)si|ze);.#en| |00000cc0| 64 69 66 0d 23 20 20 65 | 6c 73 65 0d 20 20 20 20 |dif.# e|lse. | |00000cd0| 69 66 20 28 64 65 62 75 | 67 20 26 20 31 32 38 29 |if (debu|g & 128)| |00000ce0| 0d 09 66 70 72 69 6e 74 | 66 28 73 74 64 65 72 72 |..fprint|f(stderr| |00000cf0| 2c 22 30 78 25 6c 78 3a | 20 28 25 30 35 64 29 20 |,"0x%lx:| (%05d) | |00000d00| 6d 61 6c 6c 6f 63 20 25 | 6c 64 20 62 79 74 65 73 |malloc %|ld bytes| |00000d10| 5c 6e 22 2c 70 74 72 2c | 61 6e 2b 2b 2c 28 6c 6f |\n",ptr,|an++,(lo| |00000d20| 6e 67 29 73 69 7a 65 29 | 3b 0d 23 20 20 65 6e 64 |ng)size)|;.# end| |00000d30| 69 66 0d 23 65 6e 64 69 | 66 0d 23 69 66 64 65 66 |if.#endi|f.#ifdef| |00000d40| 20 6d 61 63 69 6e 74 6f | 73 68 0d 20 20 20 20 69 | macinto|sh. i| |00000d50| 66 20 28 70 74 72 20 21 | 3d 20 4e 75 6c 6c 63 68 |f (ptr !|= Nullch| |00000d60| 20 26 26 20 67 53 61 63 | 72 69 66 69 63 69 61 6c | && gSac|rificial| |00000d70| 47 6f 61 74 29 0d 23 65 | 6c 73 65 0d 20 20 20 20 |Goat).#e|lse. | |00000d80| 69 66 20 28 70 74 72 20 | 21 3d 20 4e 75 6c 6c 63 |if (ptr |!= Nullc| |00000d90| 68 29 0d 23 65 6e 64 69 | 66 0d 09 72 65 74 75 72 |h).#endi|f..retur| |00000da0| 6e 20 70 74 72 3b 0d 20 | 20 20 20 65 6c 73 65 20 |n ptr;. | else | |00000db0| 69 66 20 28 6e 6f 6d 65 | 6d 6f 6b 29 0d 09 72 65 |if (nome|mok)..re| |00000dc0| 74 75 72 6e 20 4e 75 6c | 6c 63 68 3b 0d 20 20 20 |turn Nul|lch;. | |00000dd0| 20 65 6c 73 65 20 7b 0d | 09 66 70 75 74 73 28 6e | else {.|.fputs(n| |00000de0| 6f 6d 65 6d 2c 73 74 64 | 65 72 72 29 20 46 4c 55 |omem,std|err) FLU| |00000df0| 53 48 3b 0d 09 65 78 69 | 74 28 31 29 3b 0d 20 20 |SH;..exi|t(1);. | |00000e00| 20 20 7d 0d 20 20 20 20 | 2f 2a 4e 4f 54 52 45 41 | }. |/*NOTREA| |00000e10| 43 48 45 44 2a 2f 0d 23 | 69 66 64 65 66 20 6c 69 |CHED*/.#|ifdef li| |00000e20| 6e 74 0d 20 20 20 20 72 | 65 74 75 72 6e 20 70 74 |nt. r|eturn pt| |00000e30| 72 3b 0d 23 65 6e 64 69 | 66 0d 7d 0d 0d 2f 2a 20 |r;.#endi|f.}../* | |00000e40| 70 61 72 61 6e 6f 69 64 | 20 76 65 72 73 69 6f 6e |paranoid| version| |00000e50| 20 6f 66 20 72 65 61 6c | 6c 6f 63 20 2a 2f 0d 0d | of real|loc */..| |00000e60| 63 68 61 72 20 2a 0d 73 | 61 66 65 72 65 61 6c 6c |char *.s|afereall| |00000e70| 6f 63 28 77 68 65 72 65 | 2c 73 69 7a 65 29 0d 63 |oc(where|,size).c| |00000e80| 68 61 72 20 2a 77 68 65 | 72 65 3b 0d 23 69 66 6e |har *whe|re;.#ifn| |00000e90| 64 65 66 20 4d 53 44 4f | 53 0d 4d 45 4d 5f 53 49 |def MSDO|S.MEM_SI| |00000ea0| 5a 45 20 73 69 7a 65 3b | 0d 23 65 6c 73 65 0d 75 |ZE size;|.#else.u| |00000eb0| 6e 73 69 67 6e 65 64 20 | 6c 6f 6e 67 20 73 69 7a |nsigned |long siz| |00000ec0| 65 3b 0d 23 65 6e 64 69 | 66 20 2f 2a 20 4d 53 44 |e;.#endi|f /* MSD| |00000ed0| 4f 53 20 2a 2f 0d 7b 0d | 20 20 20 20 63 68 61 72 |OS */.{.| char| |00000ee0| 20 2a 70 74 72 3b 0d 23 | 69 66 6e 64 65 66 20 53 | *ptr;.#|ifndef S| |00000ef0| 54 44 4d 41 43 0d 20 20 | 20 20 63 68 61 72 20 2a |TDMAC. | char *| |00000f00| 72 65 61 6c 6c 6f 63 28 | 29 3b 0d 23 65 6e 64 69 |realloc(|);.#endi| |00000f10| 66 20 2f 2a 20 21 20 53 | 54 44 4d 41 43 20 2a 2f |f /* ! S|TDMAC */| |00000f20| 0d 0d 23 69 66 64 65 66 | 20 4d 53 44 4f 53 0d 09 |..#ifdef| MSDOS..| |00000f30| 69 66 20 28 73 69 7a 65 | 20 3e 20 30 78 66 66 66 |if (size| > 0xfff| |00000f40| 66 29 20 7b 0d 09 09 66 | 70 72 69 6e 74 66 28 73 |f) {...f|printf(s| |00000f50| 74 64 65 72 72 2c 20 22 | 52 65 61 6c 6c 6f 63 61 |tderr, "|Realloca| |00000f60| 74 69 6f 6e 20 74 6f 6f | 20 6c 61 72 67 65 3a 20 |tion too| large: | |00000f70| 25 6c 78 5c 6e 22 2c 20 | 73 69 7a 65 29 20 46 4c |%lx\n", |size) FL| |00000f80| 55 53 48 3b 0d 09 09 65 | 78 69 74 28 31 29 3b 0d |USH;...e|xit(1);.| |00000f90| 09 7d 0d 23 65 6e 64 69 | 66 20 2f 2a 20 4d 53 44 |.}.#endi|f /* MSD| |00000fa0| 4f 53 20 2a 2f 0d 20 20 | 20 20 69 66 20 28 21 77 |OS */. | if (!w| |00000fb0| 68 65 72 65 29 0d 09 66 | 61 74 61 6c 28 22 4e 75 |here)..f|atal("Nu| |00000fc0| 6c 6c 20 72 65 61 6c 6c | 6f 63 22 29 3b 0d 23 69 |ll reall|oc");.#i| |00000fd0| 66 64 65 66 20 44 45 42 | 55 47 47 49 4e 47 0d 20 |fdef DEB|UGGING. | |00000fe0| 20 20 20 69 66 20 28 28 | 6c 6f 6e 67 29 73 69 7a | if ((|long)siz| |00000ff0| 65 20 3c 20 30 29 0d 09 | 66 61 74 61 6c 28 22 70 |e < 0)..|fatal("p| |00001000| 61 6e 69 63 3a 20 72 65 | 61 6c 6c 6f 63 22 29 3b |anic: re|alloc");| |00001010| 0d 23 65 6e 64 69 66 0d | 20 20 20 20 70 74 72 20 |.#endif.| ptr | |00001020| 3d 20 72 65 61 6c 6c 6f | 63 28 77 68 65 72 65 2c |= reallo|c(where,| |00001030| 73 69 7a 65 3f 73 69 7a | 65 3a 31 29 3b 09 2f 2a |size?siz|e:1);./*| |00001040| 20 72 65 61 6c 6c 6f 63 | 28 30 29 20 69 73 20 4e | realloc|(0) is N| |00001050| 41 53 54 59 20 6f 6e 20 | 6f 75 72 20 73 79 73 74 |ASTY on |our syst| |00001060| 65 6d 20 2a 2f 0d 23 69 | 66 64 65 66 20 44 45 42 |em */.#i|fdef DEB| |00001070| 55 47 47 49 4e 47 0d 23 | 20 20 69 66 20 21 28 64 |UGGING.#| if !(d| |00001080| 65 66 69 6e 65 64 28 49 | 32 38 36 29 20 7c 7c 20 |efined(I|286) || | |00001090| 64 65 66 69 6e 65 64 28 | 61 74 61 72 69 73 74 29 |defined(|atarist)| |000010a0| 29 0d 23 69 66 64 65 66 | 20 6d 61 63 69 6e 74 6f |).#ifdef| macinto| |000010b0| 73 68 0d 20 20 20 20 69 | 66 20 28 64 65 62 75 67 |sh. i|f (debug| |000010c0| 20 26 20 31 32 38 29 20 | 7b 0d 09 66 70 72 69 6e | & 128) |{..fprin| |000010d0| 74 66 28 70 65 72 6c 64 | 62 67 2c 22 30 78 25 78 |tf(perld|bg,"0x%x| |000010e0| 3a 20 28 25 30 35 64 29 | 20 72 66 72 65 65 5c 6e |: (%05d)| rfree\n| |000010f0| 22 2c 77 68 65 72 65 2c | 61 6e 2b 2b 29 3b 0d 09 |",where,|an++);..| |00001100| 66 70 72 69 6e 74 66 28 | 70 65 72 6c 64 62 67 2c |fprintf(|perldbg,| |00001110| 22 30 78 25 78 3a 20 28 | 25 30 35 64 29 20 72 65 |"0x%x: (|%05d) re| |00001120| 61 6c 6c 6f 63 20 25 6c | 64 20 62 79 74 65 73 5c |alloc %l|d bytes\| |00001130| 6e 22 2c 70 74 72 2c 61 | 6e 2b 2b 2c 28 6c 6f 6e |n",ptr,a|n++,(lon| |00001140| 67 29 73 69 7a 65 29 3b | 0d 20 20 20 20 7d 0d 23 |g)size);|. }.#| |00001150| 65 6c 73 65 0d 20 20 20 | 20 69 66 20 28 64 65 62 |else. | if (deb| |00001160| 75 67 20 26 20 31 32 38 | 29 20 7b 0d 09 66 70 72 |ug & 128|) {..fpr| |00001170| 69 6e 74 66 28 73 74 64 | 65 72 72 2c 22 30 78 25 |intf(std|err,"0x%| |00001180| 78 3a 20 28 25 30 35 64 | 29 20 72 66 72 65 65 5c |x: (%05d|) rfree\| |00001190| 6e 22 2c 77 68 65 72 65 | 2c 61 6e 2b 2b 29 3b 0d |n",where|,an++);.| |000011a0| 09 66 70 72 69 6e 74 66 | 28 73 74 64 65 72 72 2c |.fprintf|(stderr,| |000011b0| 22 30 78 25 78 3a 20 28 | 25 30 35 64 29 20 72 65 |"0x%x: (|%05d) re| |000011c0| 61 6c 6c 6f 63 20 25 6c | 64 20 62 79 74 65 73 5c |alloc %l|d bytes\| |000011d0| 6e 22 2c 70 74 72 2c 61 | 6e 2b 2b 2c 28 6c 6f 6e |n",ptr,a|n++,(lon| |000011e0| 67 29 73 69 7a 65 29 3b | 0d 20 20 20 20 7d 0d 23 |g)size);|. }.#| |000011f0| 65 6e 64 69 66 0d 23 20 | 20 65 6c 73 65 0d 20 20 |endif.# | else. | |00001200| 20 20 69 66 20 28 64 65 | 62 75 67 20 26 20 31 32 | if (de|bug & 12| |00001210| 38 29 20 7b 0d 09 66 70 | 72 69 6e 74 66 28 73 74 |8) {..fp|rintf(st| |00001220| 64 65 72 72 2c 22 30 78 | 25 6c 78 3a 20 28 25 30 |derr,"0x|%lx: (%0| |00001230| 35 64 29 20 72 66 72 65 | 65 5c 6e 22 2c 77 68 65 |5d) rfre|e\n",whe| |00001240| 72 65 2c 61 6e 2b 2b 29 | 3b 0d 09 66 70 72 69 6e |re,an++)|;..fprin| |00001250| 74 66 28 73 74 64 65 72 | 72 2c 22 30 78 25 6c 78 |tf(stder|r,"0x%lx| |00001260| 3a 20 28 25 30 35 64 29 | 20 72 65 61 6c 6c 6f 63 |: (%05d)| realloc| |00001270| 20 25 6c 64 20 62 79 74 | 65 73 5c 6e 22 2c 70 74 | %ld byt|es\n",pt| |00001280| 72 2c 61 6e 2b 2b 2c 28 | 6c 6f 6e 67 29 73 69 7a |r,an++,(|long)siz| |00001290| 65 29 3b 0d 20 20 20 20 | 7d 0d 23 20 20 65 6e 64 |e);. |}.# end| |000012a0| 69 66 0d 23 65 6e 64 69 | 66 0d 23 69 66 64 65 66 |if.#endi|f.#ifdef| |000012b0| 20 6d 61 63 69 6e 74 6f | 73 68 0d 20 20 20 20 69 | macinto|sh. i| |000012c0| 66 20 28 70 74 72 20 21 | 3d 20 4e 75 6c 6c 63 68 |f (ptr !|= Nullch| |000012d0| 20 26 26 20 67 53 61 63 | 72 69 66 69 63 69 61 6c | && gSac|rificial| |000012e0| 47 6f 61 74 29 0d 23 65 | 6c 73 65 0d 20 20 20 20 |Goat).#e|lse. | |000012f0| 69 66 20 28 70 74 72 20 | 21 3d 20 4e 75 6c 6c 63 |if (ptr |!= Nullc| |00001300| 68 29 0d 23 65 6e 64 69 | 66 0d 09 72 65 74 75 72 |h).#endi|f..retur| |00001310| 6e 20 70 74 72 3b 0d 20 | 20 20 20 65 6c 73 65 20 |n ptr;. | else | |00001320| 69 66 20 28 6e 6f 6d 65 | 6d 6f 6b 29 0d 09 72 65 |if (nome|mok)..re| |00001330| 74 75 72 6e 20 4e 75 6c | 6c 63 68 3b 0d 20 20 20 |turn Nul|lch;. | |00001340| 20 65 6c 73 65 20 7b 0d | 09 66 70 75 74 73 28 6e | else {.|.fputs(n| |00001350| 6f 6d 65 6d 2c 73 74 64 | 65 72 72 29 20 46 4c 55 |omem,std|err) FLU| |00001360| 53 48 3b 0d 09 65 78 69 | 74 28 31 29 3b 0d 20 20 |SH;..exi|t(1);. | |00001370| 20 20 7d 0d 20 20 20 20 | 2f 2a 4e 4f 54 52 45 41 | }. |/*NOTREA| |00001380| 43 48 45 44 2a 2f 0d 23 | 69 66 64 65 66 20 6c 69 |CHED*/.#|ifdef li| |00001390| 6e 74 0d 20 20 20 20 72 | 65 74 75 72 6e 20 70 74 |nt. r|eturn pt| |000013a0| 72 3b 0d 23 65 6e 64 69 | 66 0d 7d 0d 0d 2f 2a 20 |r;.#endi|f.}../* | |000013b0| 73 61 66 65 20 76 65 72 | 73 69 6f 6e 20 6f 66 20 |safe ver|sion of | |000013c0| 66 72 65 65 20 2a 2f 0d | 0d 76 6f 69 64 0d 73 61 |free */.|.void.sa| |000013d0| 66 65 66 72 65 65 28 77 | 68 65 72 65 29 0d 63 68 |fefree(w|here).ch| |000013e0| 61 72 20 2a 77 68 65 72 | 65 3b 0d 7b 0d 23 69 66 |ar *wher|e;.{.#if| |000013f0| 64 65 66 20 44 45 42 55 | 47 47 49 4e 47 0d 23 20 |def DEBU|GGING.# | |00001400| 20 69 66 20 21 28 64 65 | 66 69 6e 65 64 28 49 32 | if !(de|fined(I2| |00001410| 38 36 29 20 7c 7c 20 64 | 65 66 69 6e 65 64 28 61 |86) || d|efined(a| |00001420| 74 61 72 69 73 74 29 29 | 0d 20 20 20 20 69 66 20 |tarist))|. if | |00001430| 28 64 65 62 75 67 20 26 | 20 31 32 38 29 0d 23 69 |(debug &| 128).#i| |00001440| 66 64 65 66 20 6d 61 63 | 69 6e 74 6f 73 68 0d 09 |fdef mac|intosh..| |00001450| 66 70 72 69 6e 74 66 28 | 70 65 72 6c 64 62 67 2c |fprintf(|perldbg,| |00001460| 22 30 78 25 78 3a 20 28 | 25 30 35 64 29 20 66 72 |"0x%x: (|%05d) fr| |00001470| 65 65 5c 6e 22 2c 77 68 | 65 72 65 2c 61 6e 2b 2b |ee\n",wh|ere,an++| |00001480| 29 3b 0d 23 65 6c 73 65 | 0d 09 66 70 72 69 6e 74 |);.#else|..fprint| |00001490| 66 28 73 74 64 65 72 72 | 2c 22 30 78 25 78 3a 20 |f(stderr|,"0x%x: | |000014a0| 28 25 30 35 64 29 20 66 | 72 65 65 5c 6e 22 2c 77 |(%05d) f|ree\n",w| |000014b0| 68 65 72 65 2c 61 6e 2b | 2b 29 3b 0d 23 65 6e 64 |here,an+|+);.#end| |000014c0| 69 66 0d 23 20 20 65 6c | 73 65 0d 20 20 20 20 69 |if.# el|se. i| |000014d0| 66 20 28 64 65 62 75 67 | 20 26 20 31 32 38 29 0d |f (debug| & 128).| |000014e0| 09 66 70 72 69 6e 74 66 | 28 73 74 64 65 72 72 2c |.fprintf|(stderr,| |000014f0| 22 30 78 25 6c 78 3a 20 | 28 25 30 35 64 29 20 66 |"0x%lx: |(%05d) f| |00001500| 72 65 65 5c 6e 22 2c 77 | 68 65 72 65 2c 61 6e 2b |ree\n",w|here,an+| |00001510| 2b 29 3b 0d 23 20 20 65 | 6e 64 69 66 0d 23 65 6e |+);.# e|ndif.#en| |00001520| 64 69 66 0d 20 20 20 20 | 69 66 20 28 77 68 65 72 |dif. |if (wher| |00001530| 65 29 20 7b 0d 09 2f 2a | 53 55 50 50 52 45 53 53 |e) {../*|SUPPRESS| |00001540| 20 37 30 31 2a 2f 0d 09 | 66 72 65 65 28 77 68 65 | 701*/..|free(whe| |00001550| 72 65 29 3b 0d 20 20 20 | 20 7d 0d 7d 0d 0d 23 65 |re);. | }.}..#e| |00001560| 6e 64 69 66 20 2f 2a 20 | 21 73 61 66 65 6d 61 6c |ndif /* |!safemal| |00001570| 6c 6f 63 20 2a 2f 0d 0d | 23 69 66 64 65 66 20 4c |loc */..|#ifdef L| |00001580| 45 41 4b 54 45 53 54 0d | 0d 23 64 65 66 69 6e 65 |EAKTEST.|.#define| |00001590| 20 41 4c 49 47 4e 20 73 | 69 7a 65 6f 66 28 6c 6f | ALIGN s|izeof(lo| |000015a0| 6e 67 29 0d 0d 63 68 61 | 72 20 2a 0d 73 61 66 65 |ng)..cha|r *.safe| |000015b0| 78 6d 61 6c 6c 6f 63 28 | 78 2c 73 69 7a 65 29 0d |xmalloc(|x,size).| |000015c0| 69 6e 74 20 78 3b 0d 4d | 45 4d 5f 53 49 5a 45 20 |int x;.M|EM_SIZE | |000015d0| 73 69 7a 65 3b 0d 7b 0d | 20 20 20 20 72 65 67 69 |size;.{.| regi| |000015e0| 73 74 65 72 20 63 68 61 | 72 20 2a 77 68 65 72 65 |ster cha|r *where| |000015f0| 3b 0d 0d 20 20 20 20 77 | 68 65 72 65 20 3d 20 73 |;.. w|here = s| |00001600| 61 66 65 6d 61 6c 6c 6f | 63 28 73 69 7a 65 20 2b |afemallo|c(size +| |00001610| 20 41 4c 49 47 4e 29 3b | 0d 20 20 20 20 78 63 6f | ALIGN);|. xco| |00001620| 75 6e 74 5b 78 5d 2b 2b | 3b 0d 20 20 20 20 77 68 |unt[x]++|;. wh| |00001630| 65 72 65 5b 30 5d 20 3d | 20 78 20 25 20 31 30 30 |ere[0] =| x % 100| |00001640| 3b 0d 20 20 20 20 77 68 | 65 72 65 5b 31 5d 20 3d |;. wh|ere[1] =| |00001650| 20 78 20 2f 20 31 30 30 | 3b 0d 20 20 20 20 72 65 | x / 100|;. re| |00001660| 74 75 72 6e 20 77 68 65 | 72 65 20 2b 20 41 4c 49 |turn whe|re + ALI| |00001670| 47 4e 3b 0d 7d 0d 0d 63 | 68 61 72 20 2a 0d 73 61 |GN;.}..c|har *.sa| |00001680| 66 65 78 72 65 61 6c 6c | 6f 63 28 77 68 65 72 65 |fexreall|oc(where| |00001690| 2c 73 69 7a 65 29 0d 63 | 68 61 72 20 2a 77 68 65 |,size).c|har *whe| |000016a0| 72 65 3b 0d 4d 45 4d 5f | 53 49 5a 45 20 73 69 7a |re;.MEM_|SIZE siz| |000016b0| 65 3b 0d 7b 0d 20 20 20 | 20 72 65 74 75 72 6e 20 |e;.{. | return | |000016c0| 73 61 66 65 72 65 61 6c | 6c 6f 63 28 77 68 65 72 |safereal|loc(wher| |000016d0| 65 20 2d 20 41 4c 49 47 | 4e 2c 20 73 69 7a 65 20 |e - ALIG|N, size | |000016e0| 2b 20 41 4c 49 47 4e 29 | 20 2b 20 41 4c 49 47 4e |+ ALIGN)| + ALIGN| |000016f0| 3b 0d 7d 0d 0d 76 6f 69 | 64 0d 73 61 66 65 78 66 |;.}..voi|d.safexf| |00001700| 72 65 65 28 77 68 65 72 | 65 29 0d 63 68 61 72 20 |ree(wher|e).char | |00001710| 2a 77 68 65 72 65 3b 0d | 7b 0d 20 20 20 20 69 6e |*where;.|{. in| |00001720| 74 20 78 3b 0d 0d 20 20 | 20 20 69 66 20 28 21 77 |t x;.. | if (!w| |00001730| 68 65 72 65 29 0d 09 72 | 65 74 75 72 6e 3b 0d 20 |here)..r|eturn;. | |00001740| 20 20 20 77 68 65 72 65 | 20 2d 3d 20 41 4c 49 47 | where| -= ALIG| |00001750| 4e 3b 0d 20 20 20 20 78 | 20 3d 20 77 68 65 72 65 |N;. x| = where| |00001760| 5b 30 5d 20 2b 20 31 30 | 30 20 2a 20 77 68 65 72 |[0] + 10|0 * wher| |00001770| 65 5b 31 5d 3b 0d 20 20 | 20 20 78 63 6f 75 6e 74 |e[1];. | xcount| |00001780| 5b 78 5d 2d 2d 3b 0d 20 | 20 20 20 73 61 66 65 66 |[x]--;. | safef| |00001790| 72 65 65 28 77 68 65 72 | 65 29 3b 0d 7d 0d 0d 73 |ree(wher|e);.}..s| |000017a0| 74 61 74 69 63 20 76 6f | 69 64 0d 78 73 74 61 74 |tatic vo|id.xstat| |000017b0| 28 29 0d 7b 0d 20 20 20 | 20 72 65 67 69 73 74 65 |().{. | registe| |000017c0| 72 20 69 6e 74 20 69 3b | 0d 0d 20 20 20 20 66 6f |r int i;|.. fo| |000017d0| 72 20 28 69 20 3d 20 30 | 3b 20 69 20 3c 20 4d 41 |r (i = 0|; i < MA| |000017e0| 58 58 43 4f 55 4e 54 3b | 20 69 2b 2b 29 20 7b 0d |XXCOUNT;| i++) {.| |000017f0| 09 69 66 20 28 78 63 6f | 75 6e 74 5b 69 5d 20 3e |.if (xco|unt[i] >| |00001800| 20 6c 61 73 74 78 63 6f | 75 6e 74 5b 69 5d 29 20 | lastxco|unt[i]) | |00001810| 7b 0d 09 20 20 20 20 66 | 70 72 69 6e 74 66 28 73 |{.. f|printf(s| |00001820| 74 64 65 72 72 2c 22 25 | 32 64 20 25 32 64 5c 74 |tderr,"%|2d %2d\t| |00001830| 25 6c 64 5c 6e 22 2c 20 | 69 20 2f 20 31 30 30 2c |%ld\n", |i / 100,| |00001840| 20 69 20 25 20 31 30 30 | 2c 20 78 63 6f 75 6e 74 | i % 100|, xcount| |00001850| 5b 69 5d 29 3b 0d 09 20 | 20 20 20 6c 61 73 74 78 |[i]);.. | lastx| |00001860| 63 6f 75 6e 74 5b 69 5d | 20 3d 20 78 63 6f 75 6e |count[i]| = xcoun| |00001870| 74 5b 69 5d 3b 0d 09 7d | 0d 20 20 20 20 7d 0d 7d |t[i];..}|. }.}| |00001880| 0d 0d 23 65 6e 64 69 66 | 20 2f 2a 20 4c 45 41 4b |..#endif| /* LEAK| |00001890| 54 45 53 54 20 2a 2f 0d | 0d 2f 2a 20 63 6f 70 79 |TEST */.|./* copy| |000018a0| 20 61 20 73 74 72 69 6e | 67 20 75 70 20 74 6f 20 | a strin|g up to | |000018b0| 73 6f 6d 65 20 28 6e 6f | 6e 2d 62 61 63 6b 73 6c |some (no|n-backsl| |000018c0| 61 73 68 65 64 29 20 64 | 65 6c 69 6d 69 74 65 72 |ashed) d|elimiter| |000018d0| 2c 20 69 66 20 61 6e 79 | 20 2a 2f 0d 0d 63 68 61 |, if any| */..cha| |000018e0| 72 20 2a 0d 63 70 79 74 | 69 6c 6c 28 74 6f 2c 66 |r *.cpyt|ill(to,f| |000018f0| 72 6f 6d 2c 66 72 6f 6d | 65 6e 64 2c 64 65 6c 69 |rom,from|end,deli| |00001900| 6d 2c 72 65 74 6c 65 6e | 29 0d 72 65 67 69 73 74 |m,retlen|).regist| |00001910| 65 72 20 63 68 61 72 20 | 2a 74 6f 3b 0d 72 65 67 |er char |*to;.reg| |00001920| 69 73 74 65 72 20 63 68 | 61 72 20 2a 66 72 6f 6d |ister ch|ar *from| |00001930| 3b 0d 72 65 67 69 73 74 | 65 72 20 63 68 61 72 20 |;.regist|er char | |00001940| 2a 66 72 6f 6d 65 6e 64 | 3b 0d 72 65 67 69 73 74 |*fromend|;.regist| |00001950| 65 72 20 69 6e 74 20 64 | 65 6c 69 6d 3b 0d 69 6e |er int d|elim;.in| |00001960| 74 20 2a 72 65 74 6c 65 | 6e 3b 0d 7b 0d 20 20 20 |t *retle|n;.{. | |00001970| 20 63 68 61 72 20 2a 6f | 72 69 67 74 6f 20 3d 20 | char *o|rigto = | |00001980| 74 6f 3b 0d 0d 20 20 20 | 20 66 6f 72 20 28 3b 20 |to;.. | for (; | |00001990| 66 72 6f 6d 20 3c 20 66 | 72 6f 6d 65 6e 64 3b 20 |from < f|romend; | |000019a0| 66 72 6f 6d 2b 2b 2c 74 | 6f 2b 2b 29 20 7b 0d 09 |from++,t|o++) {..| |000019b0| 69 66 20 28 2a 66 72 6f | 6d 20 3d 3d 20 27 5c 5c |if (*fro|m == '\\| |000019c0| 27 29 20 7b 0d 09 20 20 | 20 20 69 66 20 28 66 72 |') {.. | if (fr| |000019d0| 6f 6d 5b 31 5d 20 3d 3d | 20 64 65 6c 69 6d 29 0d |om[1] ==| delim).| |000019e0| 09 09 66 72 6f 6d 2b 2b | 3b 0d 09 20 20 20 20 65 |..from++|;.. e| |000019f0| 6c 73 65 20 69 66 20 28 | 66 72 6f 6d 5b 31 5d 20 |lse if (|from[1] | |00001a00| 3d 3d 20 27 5c 5c 27 29 | 0d 09 09 2a 74 6f 2b 2b |== '\\')|...*to++| |00001a10| 20 3d 20 2a 66 72 6f 6d | 2b 2b 3b 0d 09 7d 0d 09 | = *from|++;..}..| |00001a20| 65 6c 73 65 20 69 66 20 | 28 2a 66 72 6f 6d 20 3d |else if |(*from =| |00001a30| 3d 20 64 65 6c 69 6d 29 | 0d 09 20 20 20 20 62 72 |= delim)|.. br| |00001a40| 65 61 6b 3b 0d 09 2a 74 | 6f 20 3d 20 2a 66 72 6f |eak;..*t|o = *fro| |00001a50| 6d 3b 0d 20 20 20 20 7d | 0d 20 20 20 20 2a 74 6f |m;. }|. *to| |00001a60| 20 3d 20 27 5c 30 27 3b | 0d 20 20 20 20 2a 72 65 | = '\0';|. *re| |00001a70| 74 6c 65 6e 20 3d 20 74 | 6f 20 2d 20 6f 72 69 67 |tlen = t|o - orig| |00001a80| 74 6f 3b 0d 20 20 20 20 | 72 65 74 75 72 6e 20 66 |to;. |return f| |00001a90| 72 6f 6d 3b 0d 7d 0d 0d | 2f 2a 20 72 65 74 75 72 |rom;.}..|/* retur| |00001aa0| 6e 20 70 74 72 20 74 6f | 20 6c 69 74 74 6c 65 20 |n ptr to| little | |00001ab0| 73 74 72 69 6e 67 20 69 | 6e 20 62 69 67 20 73 74 |string i|n big st| |00001ac0| 72 69 6e 67 2c 20 4e 55 | 4c 4c 20 69 66 20 6e 6f |ring, NU|LL if no| |00001ad0| 74 20 66 6f 75 6e 64 20 | 2a 2f 0d 2f 2a 20 54 68 |t found |*/./* Th| |00001ae0| 69 73 20 72 6f 75 74 69 | 6e 65 20 77 61 73 20 64 |is routi|ne was d| |00001af0| 6f 6e 61 74 65 64 20 62 | 79 20 43 6f 72 65 79 20 |onated b|y Corey | |00001b00| 53 61 74 74 65 6e 2e 20 | 2a 2f 0d 0d 63 68 61 72 |Satten. |*/..char| |00001b10| 20 2a 0d 69 6e 73 74 72 | 28 62 69 67 2c 20 6c 69 | *.instr|(big, li| |00001b20| 74 74 6c 65 29 0d 72 65 | 67 69 73 74 65 72 20 63 |ttle).re|gister c| |00001b30| 68 61 72 20 2a 62 69 67 | 3b 0d 72 65 67 69 73 74 |har *big|;.regist| |00001b40| 65 72 20 63 68 61 72 20 | 2a 6c 69 74 74 6c 65 3b |er char |*little;| |00001b50| 0d 7b 0d 20 20 20 20 72 | 65 67 69 73 74 65 72 20 |.{. r|egister | |00001b60| 63 68 61 72 20 2a 73 2c | 20 2a 78 3b 0d 20 20 20 |char *s,| *x;. | |00001b70| 20 72 65 67 69 73 74 65 | 72 20 69 6e 74 20 66 69 | registe|r int fi| |00001b80| 72 73 74 3b 0d 0d 20 20 | 20 20 69 66 20 28 21 6c |rst;.. | if (!l| |00001b90| 69 74 74 6c 65 29 0d 09 | 72 65 74 75 72 6e 20 62 |ittle)..|return b| |00001ba0| 69 67 3b 0d 20 20 20 20 | 66 69 72 73 74 20 3d 20 |ig;. |first = | |00001bb0| 2a 6c 69 74 74 6c 65 2b | 2b 3b 0d 20 20 20 20 69 |*little+|+;. i| |00001bc0| 66 20 28 21 66 69 72 73 | 74 29 0d 09 72 65 74 75 |f (!firs|t)..retu| |00001bd0| 72 6e 20 62 69 67 3b 0d | 20 20 20 20 77 68 69 6c |rn big;.| whil| |00001be0| 65 20 28 2a 62 69 67 29 | 20 7b 0d 09 69 66 20 28 |e (*big)| {..if (| |00001bf0| 2a 62 69 67 2b 2b 20 21 | 3d 20 66 69 72 73 74 29 |*big++ !|= first)| |00001c00| 0d 09 20 20 20 20 63 6f | 6e 74 69 6e 75 65 3b 0d |.. co|ntinue;.| |00001c10| 09 66 6f 72 20 28 78 3d | 62 69 67 2c 73 3d 6c 69 |.for (x=|big,s=li| |00001c20| 74 74 6c 65 3b 20 2a 73 | 3b 20 2f 2a 2a 2f 20 29 |ttle; *s|; /**/ )| |00001c30| 20 7b 0d 09 20 20 20 20 | 69 66 20 28 21 2a 78 29 | {.. |if (!*x)| |00001c40| 0d 09 09 72 65 74 75 72 | 6e 20 4e 75 6c 6c 63 68 |...retur|n Nullch| |00001c50| 3b 0d 09 20 20 20 20 69 | 66 20 28 2a 73 2b 2b 20 |;.. i|f (*s++ | |00001c60| 21 3d 20 2a 78 2b 2b 29 | 20 7b 0d 09 09 73 2d 2d |!= *x++)| {...s--| |00001c70| 3b 0d 09 09 62 72 65 61 | 6b 3b 0d 09 20 20 20 20 |;...brea|k;.. | |00001c80| 7d 0d 09 7d 0d 09 69 66 | 20 28 21 2a 73 29 0d 09 |}..}..if| (!*s)..| |00001c90| 20 20 20 20 72 65 74 75 | 72 6e 20 62 69 67 2d 31 | retu|rn big-1| |00001ca0| 3b 0d 20 20 20 20 7d 0d | 20 20 20 20 72 65 74 75 |;. }.| retu| |00001cb0| 72 6e 20 4e 75 6c 6c 63 | 68 3b 0d 7d 0d 0d 2f 2a |rn Nullc|h;.}../*| |00001cc0| 20 73 61 6d 65 20 61 73 | 20 69 6e 73 74 72 20 62 | same as| instr b| |00001cd0| 75 74 20 61 6c 6c 6f 77 | 20 65 6d 62 65 64 64 65 |ut allow| embedde| |00001ce0| 64 20 6e 75 6c 6c 73 20 | 2a 2f 0d 0d 63 68 61 72 |d nulls |*/..char| |00001cf0| 20 2a 0d 6e 69 6e 73 74 | 72 28 62 69 67 2c 20 62 | *.ninst|r(big, b| |00001d00| 69 67 65 6e 64 2c 20 6c | 69 74 74 6c 65 2c 20 6c |igend, l|ittle, l| |00001d10| 65 6e 64 29 0d 72 65 67 | 69 73 74 65 72 20 63 68 |end).reg|ister ch| |00001d20| 61 72 20 2a 62 69 67 3b | 0d 72 65 67 69 73 74 65 |ar *big;|.registe| |00001d30| 72 20 63 68 61 72 20 2a | 62 69 67 65 6e 64 3b 0d |r char *|bigend;.| |00001d40| 63 68 61 72 20 2a 6c 69 | 74 74 6c 65 3b 0d 63 68 |char *li|ttle;.ch| |00001d50| 61 72 20 2a 6c 65 6e 64 | 3b 0d 7b 0d 20 20 20 20 |ar *lend|;.{. | |00001d60| 72 65 67 69 73 74 65 72 | 20 63 68 61 72 20 2a 73 |register| char *s| |00001d70| 2c 20 2a 78 3b 0d 20 20 | 20 20 72 65 67 69 73 74 |, *x;. | regist| |00001d80| 65 72 20 69 6e 74 20 66 | 69 72 73 74 20 3d 20 2a |er int f|irst = *| |00001d90| 6c 69 74 74 6c 65 3b 0d | 20 20 20 20 72 65 67 69 |little;.| regi| |00001da0| 73 74 65 72 20 63 68 61 | 72 20 2a 6c 69 74 74 6c |ster cha|r *littl| |00001db0| 65 65 6e 64 20 3d 20 6c | 65 6e 64 3b 0d 0d 20 20 |eend = l|end;.. | |00001dc0| 20 20 69 66 20 28 21 66 | 69 72 73 74 20 26 26 20 | if (!f|irst && | |00001dd0| 6c 69 74 74 6c 65 20 3e | 20 6c 69 74 74 6c 65 65 |little >| littlee| |00001de0| 6e 64 29 0d 09 72 65 74 | 75 72 6e 20 62 69 67 3b |nd)..ret|urn big;| |00001df0| 0d 20 20 20 20 69 66 20 | 28 62 69 67 65 6e 64 20 |. if |(bigend | |00001e00| 2d 20 62 69 67 20 3c 20 | 6c 69 74 74 6c 65 65 6e |- big < |littleen| |00001e10| 64 20 2d 20 6c 69 74 74 | 6c 65 29 0d 09 72 65 74 |d - litt|le)..ret| |00001e20| 75 72 6e 20 4e 75 6c 6c | 63 68 3b 0d 20 20 20 20 |urn Null|ch;. | |00001e30| 62 69 67 65 6e 64 20 2d | 3d 20 6c 69 74 74 6c 65 |bigend -|= little| |00001e40| 65 6e 64 20 2d 20 6c 69 | 74 74 6c 65 2b 2b 3b 0d |end - li|ttle++;.| |00001e50| 20 20 20 20 77 68 69 6c | 65 20 28 62 69 67 20 3c | whil|e (big <| |00001e60| 3d 20 62 69 67 65 6e 64 | 29 20 7b 0d 09 69 66 20 |= bigend|) {..if | |00001e70| 28 2a 62 69 67 2b 2b 20 | 21 3d 20 66 69 72 73 74 |(*big++ |!= first| |00001e80| 29 0d 09 20 20 20 20 63 | 6f 6e 74 69 6e 75 65 3b |).. c|ontinue;| |00001e90| 0d 09 66 6f 72 20 28 78 | 3d 62 69 67 2c 73 3d 6c |..for (x|=big,s=l| |00001ea0| 69 74 74 6c 65 3b 20 73 | 20 3c 20 6c 69 74 74 6c |ittle; s| < littl| |00001eb0| 65 65 6e 64 3b 20 2f 2a | 2a 2f 20 29 20 7b 0d 09 |eend; /*|*/ ) {..| |00001ec0| 20 20 20 20 69 66 20 28 | 2a 73 2b 2b 20 21 3d 20 | if (|*s++ != | |00001ed0| 2a 78 2b 2b 29 20 7b 0d | 09 09 73 2d 2d 3b 0d 09 |*x++) {.|..s--;..| |00001ee0| 09 62 72 65 61 6b 3b 0d | 09 20 20 20 20 7d 0d 09 |.break;.|. }..| |00001ef0| 7d 0d 09 69 66 20 28 73 | 20 3e 3d 20 6c 69 74 74 |}..if (s| >= litt| |00001f00| 6c 65 65 6e 64 29 0d 09 | 20 20 20 20 72 65 74 75 |leend)..| retu| |00001f10| 72 6e 20 62 69 67 2d 31 | 3b 0d 20 20 20 20 7d 0d |rn big-1|;. }.| |00001f20| 20 20 20 20 72 65 74 75 | 72 6e 20 4e 75 6c 6c 63 | retu|rn Nullc| |00001f30| 68 3b 0d 7d 0d 0d 2f 2a | 20 72 65 76 65 72 73 65 |h;.}../*| reverse| |00001f40| 20 6f 66 20 74 68 65 20 | 61 62 6f 76 65 2d 2d 66 | of the |above--f| |00001f50| 69 6e 64 20 6c 61 73 74 | 20 73 75 62 73 74 72 69 |ind last| substri| |00001f60| 6e 67 20 2a 2f 0d 0d 63 | 68 61 72 20 2a 0d 72 6e |ng */..c|har *.rn| |00001f70| 69 6e 73 74 72 28 62 69 | 67 2c 20 62 69 67 65 6e |instr(bi|g, bigen| |00001f80| 64 2c 20 6c 69 74 74 6c | 65 2c 20 6c 65 6e 64 29 |d, littl|e, lend)| |00001f90| 0d 72 65 67 69 73 74 65 | 72 20 63 68 61 72 20 2a |.registe|r char *| |00001fa0| 62 69 67 3b 0d 63 68 61 | 72 20 2a 62 69 67 65 6e |big;.cha|r *bigen| |00001fb0| 64 3b 0d 63 68 61 72 20 | 2a 6c 69 74 74 6c 65 3b |d;.char |*little;| |00001fc0| 0d 63 68 61 72 20 2a 6c | 65 6e 64 3b 0d 7b 0d 20 |.char *l|end;.{. | |00001fd0| 20 20 20 72 65 67 69 73 | 74 65 72 20 63 68 61 72 | regis|ter char| |00001fe0| 20 2a 62 69 67 62 65 67 | 3b 0d 20 20 20 20 72 65 | *bigbeg|;. re| |00001ff0| 67 69 73 74 65 72 20 63 | 68 61 72 20 2a 73 2c 20 |gister c|har *s, | |00002000| 2a 78 3b 0d 20 20 20 20 | 72 65 67 69 73 74 65 72 |*x;. |register| |00002010| 20 69 6e 74 20 66 69 72 | 73 74 20 3d 20 2a 6c 69 | int fir|st = *li| |00002020| 74 74 6c 65 3b 0d 20 20 | 20 20 72 65 67 69 73 74 |ttle;. | regist| |00002030| 65 72 20 63 68 61 72 20 | 2a 6c 69 74 74 6c 65 65 |er char |*littlee| |00002040| 6e 64 20 3d 20 6c 65 6e | 64 3b 0d 0d 20 20 20 20 |nd = len|d;.. | |00002050| 69 66 20 28 21 66 69 72 | 73 74 20 26 26 20 6c 69 |if (!fir|st && li| |00002060| 74 74 6c 65 20 3e 20 6c | 69 74 74 6c 65 65 6e 64 |ttle > l|ittleend| |00002070| 29 0d 09 72 65 74 75 72 | 6e 20 62 69 67 65 6e 64 |)..retur|n bigend| |00002080| 3b 0d 20 20 20 20 62 69 | 67 62 65 67 20 3d 20 62 |;. bi|gbeg = b| |00002090| 69 67 3b 0d 20 20 20 20 | 62 69 67 20 3d 20 62 69 |ig;. |big = bi| |000020a0| 67 65 6e 64 20 2d 20 28 | 6c 69 74 74 6c 65 65 6e |gend - (|littleen| |000020b0| 64 20 2d 20 6c 69 74 74 | 6c 65 2b 2b 29 3b 0d 20 |d - litt|le++);. | |000020c0| 20 20 20 77 68 69 6c 65 | 20 28 62 69 67 20 3e 3d | while| (big >=| |000020d0| 20 62 69 67 62 65 67 29 | 20 7b 0d 09 69 66 20 28 | bigbeg)| {..if (| |000020e0| 2a 62 69 67 2d 2d 20 21 | 3d 20 66 69 72 73 74 29 |*big-- !|= first)| |000020f0| 0d 09 20 20 20 20 63 6f | 6e 74 69 6e 75 65 3b 0d |.. co|ntinue;.| |00002100| 09 66 6f 72 20 28 78 3d | 62 69 67 2b 32 2c 73 3d |.for (x=|big+2,s=| |00002110| 6c 69 74 74 6c 65 3b 20 | 73 20 3c 20 6c 69 74 74 |little; |s < litt| |00002120| 6c 65 65 6e 64 3b 20 2f | 2a 2a 2f 20 29 20 7b 0d |leend; /|**/ ) {.| |00002130| 09 20 20 20 20 69 66 20 | 28 2a 73 2b 2b 20 21 3d |. if |(*s++ !=| |00002140| 20 2a 78 2b 2b 29 20 7b | 0d 09 09 73 2d 2d 3b 0d | *x++) {|...s--;.| |00002150| 09 09 62 72 65 61 6b 3b | 0d 09 20 20 20 20 7d 0d |..break;|.. }.| |00002160| 09 7d 0d 09 69 66 20 28 | 73 20 3e 3d 20 6c 69 74 |.}..if (|s >= lit| |00002170| 74 6c 65 65 6e 64 29 0d | 09 20 20 20 20 72 65 74 |tleend).|. ret| |00002180| 75 72 6e 20 62 69 67 2b | 31 3b 0d 20 20 20 20 7d |urn big+|1;. }| |00002190| 0d 20 20 20 20 72 65 74 | 75 72 6e 20 4e 75 6c 6c |. ret|urn Null| |000021a0| 63 68 3b 0d 7d 0d 0d 75 | 6e 73 69 67 6e 65 64 20 |ch;.}..u|nsigned | |000021b0| 63 68 61 72 20 66 6f 6c | 64 5b 5d 20 3d 20 7b 0d |char fol|d[] = {.| |000021c0| 09 30 2c 09 31 2c 09 32 | 2c 09 33 2c 09 34 2c 09 |.0,.1,.2|,.3,.4,.| |000021d0| 35 2c 09 36 2c 09 37 2c | 0d 09 38 2c 09 39 2c 09 |5,.6,.7,|..8,.9,.| |000021e0| 31 30 2c 09 31 31 2c 09 | 31 32 2c 09 31 33 2c 09 |10,.11,.|12,.13,.| |000021f0| 31 34 2c 09 31 35 2c 0d | 09 31 36 2c 09 31 37 2c |14,.15,.|.16,.17,| |00002200| 09 31 38 2c 09 31 39 2c | 09 32 30 2c 09 32 31 2c |.18,.19,|.20,.21,| |00002210| 09 32 32 2c 09 32 33 2c | 0d 09 32 34 2c 09 32 35 |.22,.23,|..24,.25| |00002220| 2c 09 32 36 2c 09 32 37 | 2c 09 32 38 2c 09 32 39 |,.26,.27|,.28,.29| |00002230| 2c 09 33 30 2c 09 33 31 | 2c 0d 09 33 32 2c 09 33 |,.30,.31|,..32,.3| |00002240| 33 2c 09 33 34 2c 09 33 | 35 2c 09 33 36 2c 09 33 |3,.34,.3|5,.36,.3| |00002250| 37 2c 09 33 38 2c 09 33 | 39 2c 0d 09 34 30 2c 09 |7,.38,.3|9,..40,.| |00002260| 34 31 2c 09 34 32 2c 09 | 34 33 2c 09 34 34 2c 09 |41,.42,.|43,.44,.| |00002270| 34 35 2c 09 34 36 2c 09 | 34 37 2c 0d 09 34 38 2c |45,.46,.|47,..48,| |00002280| 09 34 39 2c 09 35 30 2c | 09 35 31 2c 09 35 32 2c |.49,.50,|.51,.52,| |00002290| 09 35 33 2c 09 35 34 2c | 09 35 35 2c 0d 09 35 36 |.53,.54,|.55,..56| |000022a0| 2c 09 35 37 2c 09 35 38 | 2c 09 35 39 2c 09 36 30 |,.57,.58|,.59,.60| |000022b0| 2c 09 36 31 2c 09 36 32 | 2c 09 36 33 2c 0d 09 36 |,.61,.62|,.63,..6| |000022c0| 34 2c 09 27 61 27 2c 09 | 27 62 27 2c 09 27 63 27 |4,.'a',.|'b',.'c'| |000022d0| 2c 09 27 64 27 2c 09 27 | 65 27 2c 09 27 66 27 2c |,.'d',.'|e',.'f',| |000022e0| 09 27 67 27 2c 0d 09 27 | 68 27 2c 09 27 69 27 2c |.'g',..'|h',.'i',| |000022f0| 09 27 6a 27 2c 09 27 6b | 27 2c 09 27 6c 27 2c 09 |.'j',.'k|',.'l',.| |00002300| 27 6d 27 2c 09 27 6e 27 | 2c 09 27 6f 27 2c 0d 09 |'m',.'n'|,.'o',..| |00002310| 27 70 27 2c 09 27 71 27 | 2c 09 27 72 27 2c 09 27 |'p',.'q'|,.'r',.'| |00002320| 73 27 2c 09 27 74 27 2c | 09 27 75 27 2c 09 27 76 |s',.'t',|.'u',.'v| |00002330| 27 2c 09 27 77 27 2c 0d | 09 27 78 27 2c 09 27 79 |',.'w',.|.'x',.'y| |00002340| 27 2c 09 27 7a 27 2c 09 | 39 31 2c 09 39 32 2c 09 |',.'z',.|91,.92,.| |00002350| 39 33 2c 09 39 34 2c 09 | 39 35 2c 0d 09 39 36 2c |93,.94,.|95,..96,| |00002360| 09 27 41 27 2c 09 27 42 | 27 2c 09 27 43 27 2c 09 |.'A',.'B|',.'C',.| |00002370| 27 44 27 2c 09 27 45 27 | 2c 09 27 46 27 2c 09 27 |'D',.'E'|,.'F',.'| |00002380| 47 27 2c 0d 09 27 48 27 | 2c 09 27 49 27 2c 09 27 |G',..'H'|,.'I',.'| |00002390| 4a 27 2c 09 27 4b 27 2c | 09 27 4c 27 2c 09 27 4d |J',.'K',|.'L',.'M| |000023a0| 27 2c 09 27 4e 27 2c 09 | 27 4f 27 2c 0d 09 27 50 |',.'N',.|'O',..'P| |000023b0| 27 2c 09 27 51 27 2c 09 | 27 52 27 2c 09 27 53 27 |',.'Q',.|'R',.'S'| |000023c0| 2c 09 27 54 27 2c 09 27 | 55 27 2c 09 27 56 27 2c |,.'T',.'|U',.'V',| |000023d0| 09 27 57 27 2c 0d 09 27 | 58 27 2c 09 27 59 27 2c |.'W',..'|X',.'Y',| |000023e0| 09 27 5a 27 2c 09 31 32 | 33 2c 09 31 32 34 2c 09 |.'Z',.12|3,.124,.| |000023f0| 31 32 35 2c 09 31 32 36 | 2c 09 31 32 37 2c 0d 09 |125,.126|,.127,..| |00002400| 31 32 38 2c 09 31 32 39 | 2c 09 31 33 30 2c 09 31 |128,.129|,.130,.1| |00002410| 33 31 2c 09 31 33 32 2c | 09 31 33 33 2c 09 31 33 |31,.132,|.133,.13| |00002420| 34 2c 09 31 33 35 2c 0d | 09 31 33 36 2c 09 31 33 |4,.135,.|.136,.13| |00002430| 37 2c 09 31 33 38 2c 09 | 31 33 39 2c 09 31 34 30 |7,.138,.|139,.140| |00002440| 2c 09 31 34 31 2c 09 31 | 34 32 2c 09 31 34 33 2c |,.141,.1|42,.143,| |00002450| 0d 09 31 34 34 2c 09 31 | 34 35 2c 09 31 34 36 2c |..144,.1|45,.146,| |00002460| 09 31 34 37 2c 09 31 34 | 38 2c 09 31 34 39 2c 09 |.147,.14|8,.149,.| |00002470| 31 35 30 2c 09 31 35 31 | 2c 0d 09 31 35 32 2c 09 |150,.151|,..152,.| |00002480| 31 35 33 2c 09 31 35 34 | 2c 09 31 35 35 2c 09 31 |153,.154|,.155,.1| |00002490| 35 36 2c 09 31 35 37 2c | 09 31 35 38 2c 09 31 35 |56,.157,|.158,.15| |000024a0| 39 2c 0d 09 31 36 30 2c | 09 31 36 31 2c 09 31 36 |9,..160,|.161,.16| |000024b0| 32 2c 09 31 36 33 2c 09 | 31 36 34 2c 09 31 36 35 |2,.163,.|164,.165| |000024c0| 2c 09 31 36 36 2c 09 31 | 36 37 2c 0d 09 31 36 38 |,.166,.1|67,..168| |000024d0| 2c 09 31 36 39 2c 09 31 | 37 30 2c 09 31 37 31 2c |,.169,.1|70,.171,| |000024e0| 09 31 37 32 2c 09 31 37 | 33 2c 09 31 37 34 2c 09 |.172,.17|3,.174,.| |000024f0| 31 37 35 2c 0d 09 31 37 | 36 2c 09 31 37 37 2c 09 |175,..17|6,.177,.| |00002500| 31 37 38 2c 09 31 37 39 | 2c 09 31 38 30 2c 09 31 |178,.179|,.180,.1| |00002510| 38 31 2c 09 31 38 32 2c | 09 31 38 33 2c 0d 09 31 |81,.182,|.183,..1| |00002520| 38 34 2c 09 31 38 35 2c | 09 31 38 36 2c 09 31 38 |84,.185,|.186,.18| |00002530| 37 2c 09 31 38 38 2c 09 | 31 38 39 2c 09 31 39 30 |7,.188,.|189,.190| |00002540| 2c 09 31 39 31 2c 0d 09 | 31 39 32 2c 09 31 39 33 |,.191,..|192,.193| |00002550| 2c 09 31 39 34 2c 09 31 | 39 35 2c 09 31 39 36 2c |,.194,.1|95,.196,| |00002560| 09 31 39 37 2c 09 31 39 | 38 2c 09 31 39 39 2c 0d |.197,.19|8,.199,.| |00002570| 09 32 30 30 2c 09 32 30 | 31 2c 09 32 30 32 2c 09 |.200,.20|1,.202,.| |00002580| 32 30 33 2c 09 32 30 34 | 2c 09 32 30 35 2c 09 32 |203,.204|,.205,.2| |00002590| 30 36 2c 09 32 30 37 2c | 0d 09 32 30 38 2c 09 32 |06,.207,|..208,.2| |000025a0| 30 39 2c 09 32 31 30 2c | 09 32 31 31 2c 09 32 31 |09,.210,|.211,.21| |000025b0| 32 2c 09 32 31 33 2c 09 | 32 31 34 2c 09 32 31 35 |2,.213,.|214,.215| |000025c0| 2c 0d 09 32 31 36 2c 09 | 32 31 37 2c 09 32 31 38 |,..216,.|217,.218| |000025d0| 2c 09 32 31 39 2c 09 32 | 32 30 2c 09 32 32 31 2c |,.219,.2|20,.221,| |000025e0| 09 32 32 32 2c 09 32 32 | 33 2c 09 0d 09 32 32 34 |.222,.22|3,...224| |000025f0| 2c 09 32 32 35 2c 09 32 | 32 36 2c 09 32 32 37 2c |,.225,.2|26,.227,| |00002600| 09 32 32 38 2c 09 32 32 | 39 2c 09 32 33 30 2c 09 |.228,.22|9,.230,.| |00002610| 32 33 31 2c 0d 09 32 33 | 32 2c 09 32 33 33 2c 09 |231,..23|2,.233,.| |00002620| 32 33 34 2c 09 32 33 35 | 2c 09 32 33 36 2c 09 32 |234,.235|,.236,.2| |00002630| 33 37 2c 09 32 33 38 2c | 09 32 33 39 2c 0d 09 32 |37,.238,|.239,..2| |00002640| 34 30 2c 09 32 34 31 2c | 09 32 34 32 2c 09 32 34 |40,.241,|.242,.24| |00002650| 33 2c 09 32 34 34 2c 09 | 32 34 35 2c 09 32 34 36 |3,.244,.|245,.246| |00002660| 2c 09 32 34 37 2c 0d 09 | 32 34 38 2c 09 32 34 39 |,.247,..|248,.249| |00002670| 2c 09 32 35 30 2c 09 32 | 35 31 2c 09 32 35 32 2c |,.250,.2|51,.252,| |00002680| 09 32 35 33 2c 09 32 35 | 34 2c 09 32 35 35 0d 7d |.253,.25|4,.255.}| |00002690| 3b 0d 0d 73 74 61 74 69 | 63 20 75 6e 73 69 67 6e |;..stati|c unsign| |000026a0| 65 64 20 63 68 61 72 20 | 66 72 65 71 5b 5d 20 3d |ed char |freq[] =| |000026b0| 20 7b 0d 09 31 2c 09 32 | 2c 09 38 34 2c 09 31 35 | {..1,.2|,.84,.15| |000026c0| 31 2c 09 31 35 34 2c 09 | 31 35 35 2c 09 31 35 36 |1,.154,.|155,.156| |000026d0| 2c 09 31 35 37 2c 0d 09 | 31 36 35 2c 09 32 34 36 |,.157,..|165,.246| |000026e0| 2c 09 32 35 30 2c 09 33 | 2c 09 31 35 38 2c 09 37 |,.250,.3|,.158,.7| |000026f0| 2c 09 31 38 2c 09 32 39 | 2c 0d 09 34 30 2c 09 35 |,.18,.29|,..40,.5| |00002700| 31 2c 09 36 32 2c 09 37 | 33 2c 09 38 35 2c 09 39 |1,.62,.7|3,.85,.9| |00002710| 36 2c 09 31 30 37 2c 09 | 31 31 38 2c 0d 09 31 32 |6,.107,.|118,..12| |00002720| 39 2c 09 31 34 30 2c 09 | 31 34 37 2c 09 31 34 38 |9,.140,.|147,.148| |00002730| 2c 09 31 34 39 2c 09 31 | 35 30 2c 09 31 35 32 2c |,.149,.1|50,.152,| |00002740| 09 31 35 33 2c 0d 09 32 | 35 35 2c 09 31 38 32 2c |.153,..2|55,.182,| |00002750| 09 32 32 34 2c 09 32 30 | 35 2c 09 31 37 34 2c 09 |.224,.20|5,.174,.| |00002760| 31 37 36 2c 09 31 38 30 | 2c 09 32 31 37 2c 0d 09 |176,.180|,.217,..| |00002770| 32 33 33 2c 09 32 33 32 | 2c 09 32 33 36 2c 09 31 |233,.232|,.236,.1| |00002780| 38 37 2c 09 32 33 35 2c | 09 32 32 38 2c 09 32 33 |87,.235,|.228,.23| |00002790| 34 2c 09 32 32 36 2c 0d | 09 32 32 32 2c 09 32 31 |4,.226,.|.222,.21| |000027a0| 39 2c 09 32 31 31 2c 09 | 31 39 35 2c 09 31 38 38 |9,.211,.|195,.188| |000027b0| 2c 09 31 39 33 2c 09 31 | 38 35 2c 09 31 38 34 2c |,.193,.1|85,.184,| |000027c0| 0d 09 31 39 31 2c 09 31 | 38 33 2c 09 32 30 31 2c |..191,.1|83,.201,| |000027d0| 09 32 32 39 2c 09 31 38 | 31 2c 09 32 32 30 2c 09 |.229,.18|1,.220,.| |000027e0| 31 39 34 2c 09 31 36 32 | 2c 0d 09 31 36 33 2c 09 |194,.162|,..163,.| |000027f0| 32 30 38 2c 09 31 38 36 | 2c 09 32 30 32 2c 09 32 |208,.186|,.202,.2| |00002800| 30 30 2c 09 32 31 38 2c | 09 31 39 38 2c 09 31 37 |00,.218,|.198,.17| |00002810| 39 2c 0d 09 31 37 38 2c | 09 32 31 34 2c 09 31 36 |9,..178,|.214,.16| |00002820| 36 2c 09 31 37 30 2c 09 | 32 30 37 2c 09 31 39 39 |6,.170,.|207,.199| |00002830| 2c 09 32 30 39 2c 09 32 | 30 36 2c 0d 09 32 30 34 |,.209,.2|06,..204| |00002840| 2c 09 31 36 30 2c 09 32 | 31 32 2c 09 32 31 36 2c |,.160,.2|12,.216,| |00002850| 09 32 31 35 2c 09 31 39 | 32 2c 09 31 37 35 2c 09 |.215,.19|2,.175,.| |00002860| 31 37 33 2c 0d 09 32 34 | 33 2c 09 31 37 32 2c 09 |173,..24|3,.172,.| |00002870| 31 36 31 2c 09 31 39 30 | 2c 09 32 30 33 2c 09 31 |161,.190|,.203,.1| |00002880| 38 39 2c 09 31 36 34 2c | 09 32 33 30 2c 0d 09 31 |89,.164,|.230,..1| |00002890| 36 37 2c 09 32 34 38 2c | 09 32 32 37 2c 09 32 34 |67,.248,|.227,.24| |000028a0| 34 2c 09 32 34 32 2c 09 | 32 35 35 2c 09 32 34 31 |4,.242,.|255,.241| |000028b0| 2c 09 32 33 31 2c 0d 09 | 32 34 30 2c 09 32 35 33 |,.231,..|240,.253| |000028c0| 2c 09 31 36 39 2c 09 32 | 31 30 2c 09 32 34 35 2c |,.169,.2|10,.245,| |000028d0| 09 32 33 37 2c 09 32 34 | 39 2c 09 32 34 37 2c 0d |.237,.24|9,.247,.| |000028e0| 09 32 33 39 2c 09 31 36 | 38 2c 09 32 35 32 2c 09 |.239,.16|8,.252,.| |000028f0| 32 35 31 2c 09 32 35 34 | 2c 09 32 33 38 2c 09 32 |251,.254|,.238,.2| |00002900| 32 33 2c 09 32 32 31 2c | 0d 09 32 31 33 2c 09 32 |23,.221,|..213,.2| |00002910| 32 35 2c 09 31 37 37 2c | 09 31 39 37 2c 09 31 37 |25,.177,|.197,.17| |00002920| 31 2c 09 31 39 36 2c 09 | 31 35 39 2c 09 34 2c 0d |1,.196,.|159,.4,.| |00002930| 09 35 2c 09 36 2c 09 38 | 2c 09 39 2c 09 31 30 2c |.5,.6,.8|,.9,.10,| |00002940| 09 31 31 2c 09 31 32 2c | 09 31 33 2c 0d 09 31 34 |.11,.12,|.13,..14| |00002950| 2c 09 31 35 2c 09 31 36 | 2c 09 31 37 2c 09 31 39 |,.15,.16|,.17,.19| |00002960| 2c 09 32 30 2c 09 32 31 | 2c 09 32 32 2c 0d 09 32 |,.20,.21|,.22,..2| |00002970| 33 2c 09 32 34 2c 09 32 | 35 2c 09 32 36 2c 09 32 |3,.24,.2|5,.26,.2| |00002980| 37 2c 09 32 38 2c 09 33 | 30 2c 09 33 31 2c 0d 09 |7,.28,.3|0,.31,..| |00002990| 33 32 2c 09 33 33 2c 09 | 33 34 2c 09 33 35 2c 09 |32,.33,.|34,.35,.| |000029a0| 33 36 2c 09 33 37 2c 09 | 33 38 2c 09 33 39 2c 0d |36,.37,.|38,.39,.| |000029b0| 09 34 31 2c 09 34 32 2c | 09 34 33 2c 09 34 34 2c |.41,.42,|.43,.44,| |000029c0| 09 34 35 2c 09 34 36 2c | 09 34 37 2c 09 34 38 2c |.45,.46,|.47,.48,| |000029d0| 0d 09 34 39 2c 09 35 30 | 2c 09 35 32 2c 09 35 33 |..49,.50|,.52,.53| |000029e0| 2c 09 35 34 2c 09 35 35 | 2c 09 35 36 2c 09 35 37 |,.54,.55|,.56,.57| |000029f0| 2c 0d 09 35 38 2c 09 35 | 39 2c 09 36 30 2c 09 36 |,..58,.5|9,.60,.6| |00002a00| 31 2c 09 36 33 2c 09 36 | 34 2c 09 36 35 2c 09 36 |1,.63,.6|4,.65,.6| |00002a10| 36 2c 0d 09 36 37 2c 09 | 36 38 2c 09 36 39 2c 09 |6,..67,.|68,.69,.| |00002a20| 37 30 2c 09 37 31 2c 09 | 37 32 2c 09 37 34 2c 09 |70,.71,.|72,.74,.| |00002a30| 37 35 2c 0d 09 37 36 2c | 09 37 37 2c 09 37 38 2c |75,..76,|.77,.78,| |00002a40| 09 37 39 2c 09 38 30 2c | 09 38 31 2c 09 38 32 2c |.79,.80,|.81,.82,| |00002a50| 09 38 33 2c 0d 09 38 36 | 2c 09 38 37 2c 09 38 38 |.83,..86|,.87,.88| |00002a60| 2c 09 38 39 2c 09 39 30 | 2c 09 39 31 2c 09 39 32 |,.89,.90|,.91,.92| |00002a70| 2c 09 39 33 2c 0d 09 39 | 34 2c 09 39 35 2c 09 39 |,.93,..9|4,.95,.9| |00002a80| 37 2c 09 39 38 2c 09 39 | 39 2c 09 31 30 30 2c 09 |7,.98,.9|9,.100,.| |00002a90| 31 30 31 2c 09 31 30 32 | 2c 0d 09 31 30 33 2c 09 |101,.102|,..103,.| |00002aa0| 31 30 34 2c 09 31 30 35 | 2c 09 31 30 36 2c 09 31 |104,.105|,.106,.1| |00002ab0| 30 38 2c 09 31 30 39 2c | 09 31 31 30 2c 09 31 31 |08,.109,|.110,.11| |00002ac0| 31 2c 0d 09 31 31 32 2c | 09 31 31 33 2c 09 31 31 |1,..112,|.113,.11| |00002ad0| 34 2c 09 31 31 35 2c 09 | 31 31 36 2c 09 31 31 37 |4,.115,.|116,.117| |00002ae0| 2c 09 31 31 39 2c 09 31 | 32 30 2c 0d 09 31 32 31 |,.119,.1|20,..121| |00002af0| 2c 09 31 32 32 2c 09 31 | 32 33 2c 09 31 32 34 2c |,.122,.1|23,.124,| |00002b00| 09 31 32 35 2c 09 31 32 | 36 2c 09 31 32 37 2c 09 |.125,.12|6,.127,.| |00002b10| 31 32 38 2c 0d 09 31 33 | 30 2c 09 31 33 31 2c 09 |128,..13|0,.131,.| |00002b20| 31 33 32 2c 09 31 33 33 | 2c 09 31 33 34 2c 09 31 |132,.133|,.134,.1| |00002b30| 33 35 2c 09 31 33 36 2c | 09 31 33 37 2c 0d 09 31 |35,.136,|.137,..1| |00002b40| 33 38 2c 09 31 33 39 2c | 09 31 34 31 2c 09 31 34 |38,.139,|.141,.14| |00002b50| 32 2c 09 31 34 33 2c 09 | 31 34 34 2c 09 31 34 35 |2,.143,.|144,.145| |00002b60| 2c 09 31 34 36 0d 7d 3b | 0d 0d 76 6f 69 64 0d 66 |,.146.};|..void.f| |00002b70| 62 6d 63 6f 6d 70 69 6c | 65 28 73 74 72 2c 20 69 |bmcompil|e(str, i| |00002b80| 66 6c 61 67 29 0d 53 54 | 52 20 2a 73 74 72 3b 0d |flag).ST|R *str;.| |00002b90| 69 6e 74 20 69 66 6c 61 | 67 3b 0d 7b 0d 20 20 20 |int ifla|g;.{. | |00002ba0| 20 72 65 67 69 73 74 65 | 72 20 75 6e 73 69 67 6e | registe|r unsign| |00002bb0| 65 64 20 63 68 61 72 20 | 2a 73 3b 0d 20 20 20 20 |ed char |*s;. | |00002bc0| 72 65 67 69 73 74 65 72 | 20 75 6e 73 69 67 6e 65 |register| unsigne| |00002bd0| 64 20 63 68 61 72 20 2a | 74 61 62 6c 65 3b 0d 20 |d char *|table;. | |00002be0| 20 20 20 72 65 67 69 73 | 74 65 72 20 75 6e 73 69 | regis|ter unsi| |00002bf0| 67 6e 65 64 20 69 6e 74 | 20 69 3b 0d 20 20 20 20 |gned int| i;. | |00002c00| 72 65 67 69 73 74 65 72 | 20 75 6e 73 69 67 6e 65 |register| unsigne| |00002c10| 64 20 69 6e 74 20 6c 65 | 6e 20 3d 20 73 74 72 2d |d int le|n = str-| |00002c20| 3e 73 74 72 5f 63 75 72 | 3b 0d 20 20 20 20 69 6e |>str_cur|;. in| |00002c30| 74 20 72 61 72 65 73 74 | 20 3d 20 30 3b 0d 20 20 |t rarest| = 0;. | |00002c40| 20 20 75 6e 73 69 67 6e | 65 64 20 69 6e 74 20 66 | unsign|ed int f| |00002c50| 72 65 71 75 65 6e 63 79 | 20 3d 20 32 35 36 3b 0d |requency| = 256;.| |00002c60| 0d 20 20 20 20 53 74 72 | 5f 47 72 6f 77 28 73 74 |. Str|_Grow(st| |00002c70| 72 2c 6c 65 6e 2b 32 35 | 38 29 3b 0d 23 69 66 6e |r,len+25|8);.#ifn| |00002c80| 64 65 66 20 6c 69 6e 74 | 0d 20 20 20 20 74 61 62 |def lint|. tab| |00002c90| 6c 65 20 3d 20 28 75 6e | 73 69 67 6e 65 64 20 63 |le = (un|signed c| |00002ca0| 68 61 72 2a 29 28 73 74 | 72 2d 3e 73 74 72 5f 70 |har*)(st|r->str_p| |00002cb0| 74 72 20 2b 20 6c 65 6e | 20 2b 20 31 29 3b 0d 23 |tr + len| + 1);.#| |00002cc0| 65 6c 73 65 0d 20 20 20 | 20 74 61 62 6c 65 20 3d |else. | table =| |00002cd0| 20 4e 75 6c 6c 28 75 6e | 73 69 67 6e 65 64 20 63 | Null(un|signed c| |00002ce0| 68 61 72 2a 29 3b 0d 23 | 65 6e 64 69 66 0d 20 20 |har*);.#|endif. | |00002cf0| 20 20 73 20 3d 20 74 61 | 62 6c 65 20 2d 20 32 3b | s = ta|ble - 2;| |00002d00| 0d 20 20 20 20 66 6f 72 | 20 28 69 20 3d 20 30 3b |. for| (i = 0;| |00002d10| 20 69 20 3c 20 32 35 36 | 3b 20 69 2b 2b 29 20 7b | i < 256|; i++) {| |00002d20| 0d 09 74 61 62 6c 65 5b | 69 5d 20 3d 20 6c 65 6e |..table[|i] = len| |00002d30| 3b 0d 20 20 20 20 7d 0d | 20 20 20 20 69 20 3d 20 |;. }.| i = | |00002d40| 30 3b 0d 23 69 66 6e 64 | 65 66 20 6c 69 6e 74 0d |0;.#ifnd|ef lint.| |00002d50| 20 20 20 20 77 68 69 6c | 65 20 28 73 20 3e 3d 20 | whil|e (s >= | |00002d60| 28 75 6e 73 69 67 6e 65 | 64 20 63 68 61 72 2a 29 |(unsigne|d char*)| |00002d70| 28 73 74 72 2d 3e 73 74 | 72 5f 70 74 72 29 29 0d |(str->st|r_ptr)).| |00002d80| 23 65 6e 64 69 66 0d 20 | 20 20 20 7b 0d 09 69 66 |#endif. | {..if| |00002d90| 20 28 74 61 62 6c 65 5b | 2a 73 5d 20 3d 3d 20 6c | (table[|*s] == l| |00002da0| 65 6e 29 20 7b 0d 23 69 | 66 6e 64 65 66 20 70 64 |en) {.#i|fndef pd| |00002db0| 70 31 31 0d 09 20 20 20 | 20 69 66 20 28 69 66 6c |p11.. | if (ifl| |00002dc0| 61 67 29 0d 09 09 74 61 | 62 6c 65 5b 2a 73 5d 20 |ag)...ta|ble[*s] | |00002dd0| 3d 20 74 61 62 6c 65 5b | 66 6f 6c 64 5b 2a 73 5d |= table[|fold[*s]| |00002de0| 5d 20 3d 20 69 3b 0d 23 | 65 6c 73 65 0d 09 20 20 |] = i;.#|else.. | |00002df0| 20 20 69 66 20 28 69 66 | 6c 61 67 29 20 7b 0d 09 | if (if|lag) {..| |00002e00| 09 69 6e 74 20 6a 3b 0d | 09 09 6a 20 3d 20 66 6f |.int j;.|..j = fo| |00002e10| 6c 64 5b 2a 73 5d 3b 0d | 09 09 74 61 62 6c 65 5b |ld[*s];.|..table[| |00002e20| 6a 5d 20 3d 20 69 3b 0d | 09 09 74 61 62 6c 65 5b |j] = i;.|..table[| |00002e30| 2a 73 5d 20 3d 20 69 3b | 0d 09 20 20 20 20 7d 0d |*s] = i;|.. }.| |00002e40| 23 65 6e 64 69 66 20 2f | 2a 20 70 64 70 31 31 20 |#endif /|* pdp11 | |00002e50| 2a 2f 0d 09 20 20 20 20 | 65 6c 73 65 0d 09 09 74 |*/.. |else...t| |00002e60| 61 62 6c 65 5b 2a 73 5d | 20 3d 20 69 3b 0d 09 7d |able[*s]| = i;..}| |00002e70| 0d 09 73 2d 2d 2c 69 2b | 2b 3b 0d 20 20 20 20 7d |..s--,i+|+;. }| |00002e80| 0d 20 20 20 20 73 74 72 | 2d 3e 73 74 72 5f 70 6f |. str|->str_po| |00002e90| 6b 20 7c 3d 20 53 50 5f | 46 42 4d 3b 09 09 2f 2a |k |= SP_|FBM;../*| |00002ea0| 20 64 65 65 70 20 6d 61 | 67 69 63 20 2a 2f 0d 0d | deep ma|gic */..| |00002eb0| 23 69 66 6e 64 65 66 20 | 6c 69 6e 74 0d 20 20 20 |#ifndef |lint. | |00002ec0| 20 73 20 3d 20 28 75 6e | 73 69 67 6e 65 64 20 63 | s = (un|signed c| |00002ed0| 68 61 72 2a 29 28 73 74 | 72 2d 3e 73 74 72 5f 70 |har*)(st|r->str_p| |00002ee0| 74 72 29 3b 09 09 2f 2a | 20 64 65 65 70 65 72 20 |tr);../*| deeper | |00002ef0| 6d 61 67 69 63 20 2a 2f | 0d 23 65 6c 73 65 0d 20 |magic */|.#else. | |00002f00| 20 20 20 73 20 3d 20 4e | 75 6c 6c 28 75 6e 73 69 | s = N|ull(unsi| |00002f10| 67 6e 65 64 20 63 68 61 | 72 2a 29 3b 0d 23 65 6e |gned cha|r*);.#en| |00002f20| 64 69 66 0d 20 20 20 20 | 69 66 20 28 69 66 6c 61 |dif. |if (ifla| |00002f30| 67 29 20 7b 0d 09 72 65 | 67 69 73 74 65 72 20 75 |g) {..re|gister u| |00002f40| 6e 73 69 67 6e 65 64 20 | 69 6e 74 20 74 6d 70 2c |nsigned |int tmp,| |00002f50| 20 66 6f 6c 64 74 6d 70 | 3b 0d 09 73 74 72 2d 3e | foldtmp|;..str->| |00002f60| 73 74 72 5f 70 6f 6b 20 | 7c 3d 20 53 50 5f 43 41 |str_pok ||= SP_CA| |00002f70| 53 45 46 4f 4c 44 3b 0d | 09 66 6f 72 20 28 69 20 |SEFOLD;.|.for (i | |00002f80| 3d 20 30 3b 20 69 20 3c | 20 6c 65 6e 3b 20 69 2b |= 0; i <| len; i+| |00002f90| 2b 29 20 7b 0d 09 20 20 | 20 20 74 6d 70 3d 66 72 |+) {.. | tmp=fr| |00002fa0| 65 71 5b 73 5b 69 5d 5d | 3b 0d 09 20 20 20 20 66 |eq[s[i]]|;.. f| |00002fb0| 6f 6c 64 74 6d 70 3d 66 | 72 65 71 5b 66 6f 6c 64 |oldtmp=f|req[fold| |00002fc0| 5b 73 5b 69 5d 5d 5d 3b | 0d 09 20 20 20 20 69 66 |[s[i]]];|.. if| |00002fd0| 20 28 74 6d 70 20 3c 20 | 66 72 65 71 75 65 6e 63 | (tmp < |frequenc| |00002fe0| 79 20 26 26 20 66 6f 6c | 64 74 6d 70 20 3c 20 66 |y && fol|dtmp < f| |00002ff0| 72 65 71 75 65 6e 63 79 | 29 20 7b 0d 09 09 72 61 |requency|) {...ra| |00003000| 72 65 73 74 20 3d 20 69 | 3b 0d 09 09 2f 2a 20 63 |rest = i|;.../* c| |00003010| 68 6f 6f 73 65 20 6d 6f | 73 74 20 66 72 65 71 75 |hoose mo|st frequ| |00003020| 65 6e 74 20 61 6d 6f 6e | 67 20 74 68 65 20 74 77 |ent amon|g the tw| |00003030| 6f 20 2a 2f 0d 09 09 66 | 72 65 71 75 65 6e 63 79 |o */...f|requency| |00003040| 20 3d 20 28 74 6d 70 20 | 3e 20 66 6f 6c 64 74 6d | = (tmp |> foldtm| |00003050| 70 29 20 3f 20 74 6d 70 | 20 3a 20 66 6f 6c 64 74 |p) ? tmp| : foldt| |00003060| 6d 70 3b 0d 09 20 20 20 | 20 7d 0d 09 7d 0d 20 20 |mp;.. | }..}. | |00003070| 20 20 7d 0d 20 20 20 20 | 65 6c 73 65 20 7b 0d 09 | }. |else {..| |00003080| 66 6f 72 20 28 69 20 3d | 20 30 3b 20 69 20 3c 20 |for (i =| 0; i < | |00003090| 6c 65 6e 3b 20 69 2b 2b | 29 20 7b 0d 09 20 20 20 |len; i++|) {.. | |000030a0| 20 69 66 20 28 66 72 65 | 71 5b 73 5b 69 5d 5d 20 | if (fre|q[s[i]] | |000030b0| 3c 20 66 72 65 71 75 65 | 6e 63 79 29 20 7b 0d 09 |< freque|ncy) {..| |000030c0| 09 72 61 72 65 73 74 20 | 3d 20 69 3b 0d 09 09 66 |.rarest |= i;...f| |000030d0| 72 65 71 75 65 6e 63 79 | 20 3d 20 66 72 65 71 5b |requency| = freq[| |000030e0| 73 5b 69 5d 5d 3b 0d 09 | 20 20 20 20 7d 0d 09 7d |s[i]];..| }..}| |000030f0| 0d 20 20 20 20 7d 0d 20 | 20 20 20 73 74 72 2d 3e |. }. | str->| |00003100| 73 74 72 5f 72 61 72 65 | 20 3d 20 73 5b 72 61 72 |str_rare| = s[rar| |00003110| 65 73 74 5d 3b 0d 20 20 | 20 20 73 74 72 2d 3e 73 |est];. | str->s| |00003120| 74 72 5f 73 74 61 74 65 | 20 3d 20 72 61 72 65 73 |tr_state| = rares| |00003130| 74 3b 0d 23 69 66 64 65 | 66 20 44 45 42 55 47 47 |t;.#ifde|f DEBUGG| |00003140| 49 4e 47 0d 20 20 20 20 | 69 66 20 28 64 65 62 75 |ING. |if (debu| |00003150| 67 20 26 20 35 31 32 29 | 0d 23 69 66 64 65 66 20 |g & 512)|.#ifdef | |00003160| 6d 61 63 69 6e 74 6f 73 | 68 0d 09 66 70 72 69 6e |macintos|h..fprin| |00003170| 74 66 28 70 65 72 6c 64 | 62 67 2c 22 72 61 72 65 |tf(perld|bg,"rare| |00003180| 73 74 20 63 68 61 72 20 | 25 63 20 61 74 20 25 64 |st char |%c at %d| |00003190| 5c 6e 22 2c 73 74 72 2d | 3e 73 74 72 5f 72 61 72 |\n",str-|>str_rar| |000031a0| 65 2c 20 73 74 72 2d 3e | 73 74 72 5f 73 74 61 74 |e, str->|str_stat| |000031b0| 65 29 3b 0d 23 65 6c 73 | 65 0d 09 66 70 72 69 6e |e);.#els|e..fprin| |000031c0| 74 66 28 73 74 64 65 72 | 72 2c 22 72 61 72 65 73 |tf(stder|r,"rares| |000031d0| 74 20 63 68 61 72 20 25 | 63 20 61 74 20 25 64 5c |t char %|c at %d\| |000031e0| 6e 22 2c 73 74 72 2d 3e | 73 74 72 5f 72 61 72 65 |n",str->|str_rare| |000031f0| 2c 20 73 74 72 2d 3e 73 | 74 72 5f 73 74 61 74 65 |, str->s|tr_state| |00003200| 29 3b 0d 23 65 6e 64 69 | 66 0d 23 65 6e 64 69 66 |);.#endi|f.#endif| |00003210| 0d 7d 0d 0d 63 68 61 72 | 20 2a 0d 66 62 6d 69 6e |.}..char| *.fbmin| |00003220| 73 74 72 28 62 69 67 2c | 20 62 69 67 65 6e 64 2c |str(big,| bigend,| |00003230| 20 6c 69 74 74 6c 65 73 | 74 72 29 0d 75 6e 73 69 | littles|tr).unsi| |00003240| 67 6e 65 64 20 63 68 61 | 72 20 2a 62 69 67 3b 0d |gned cha|r *big;.| |00003250| 72 65 67 69 73 74 65 72 | 20 75 6e 73 69 67 6e 65 |register| unsigne| |00003260| 64 20 63 68 61 72 20 2a | 62 69 67 65 6e 64 3b 0d |d char *|bigend;.| |00003270| 53 54 52 20 2a 6c 69 74 | 74 6c 65 73 74 72 3b 0d |STR *lit|tlestr;.| |00003280| 7b 0d 20 20 20 20 72 65 | 67 69 73 74 65 72 20 75 |{. re|gister u| |00003290| 6e 73 69 67 6e 65 64 20 | 63 68 61 72 20 2a 73 3b |nsigned |char *s;| |000032a0| 0d 20 20 20 20 72 65 67 | 69 73 74 65 72 20 69 6e |. reg|ister in| |000032b0| 74 20 74 6d 70 3b 0d 20 | 20 20 20 72 65 67 69 73 |t tmp;. | regis| |000032c0| 74 65 72 20 69 6e 74 20 | 6c 69 74 74 6c 65 6c 65 |ter int |littlele| |000032d0| 6e 3b 0d 20 20 20 20 72 | 65 67 69 73 74 65 72 20 |n;. r|egister | |000032e0| 75 6e 73 69 67 6e 65 64 | 20 63 68 61 72 20 2a 6c |unsigned| char *l| |000032f0| 69 74 74 6c 65 3b 0d 20 | 20 20 20 72 65 67 69 73 |ittle;. | regis| |00003300| 74 65 72 20 75 6e 73 69 | 67 6e 65 64 20 63 68 61 |ter unsi|gned cha| |00003310| 72 20 2a 74 61 62 6c 65 | 3b 0d 20 20 20 20 72 65 |r *table|;. re| |00003320| 67 69 73 74 65 72 20 75 | 6e 73 69 67 6e 65 64 20 |gister u|nsigned | |00003330| 63 68 61 72 20 2a 6f 6c | 64 73 3b 0d 20 20 20 20 |char *ol|ds;. | |00003340| 72 65 67 69 73 74 65 72 | 20 75 6e 73 69 67 6e 65 |register| unsigne| |00003350| 64 20 63 68 61 72 20 2a | 6f 6c 64 6c 69 74 74 6c |d char *|oldlittl| |00003360| 65 3b 0d 0d 23 69 66 6e | 64 65 66 20 6c 69 6e 74 |e;..#ifn|def lint| |00003370| 0d 20 20 20 20 69 66 20 | 28 21 28 6c 69 74 74 6c |. if |(!(littl| |00003380| 65 73 74 72 2d 3e 73 74 | 72 5f 70 6f 6b 20 26 20 |estr->st|r_pok & | |00003390| 53 50 5f 46 42 4d 29 29 | 20 7b 0d 09 69 66 20 28 |SP_FBM))| {..if (| |000033a0| 21 6c 69 74 74 6c 65 73 | 74 72 2d 3e 73 74 72 5f |!littles|tr->str_| |000033b0| 70 74 72 29 0d 09 20 20 | 20 20 72 65 74 75 72 6e |ptr).. | return| |000033c0| 20 28 63 68 61 72 2a 29 | 62 69 67 3b 0d 09 72 65 | (char*)|big;..re| |000033d0| 74 75 72 6e 20 6e 69 6e | 73 74 72 28 28 63 68 61 |turn nin|str((cha| |000033e0| 72 2a 29 62 69 67 2c 28 | 63 68 61 72 2a 29 62 69 |r*)big,(|char*)bi| |000033f0| 67 65 6e 64 2c 0d 09 09 | 6c 69 74 74 6c 65 73 74 |gend,...|littlest| |00003400| 72 2d 3e 73 74 72 5f 70 | 74 72 2c 20 6c 69 74 74 |r->str_p|tr, litt| |00003410| 6c 65 73 74 72 2d 3e 73 | 74 72 5f 70 74 72 20 2b |lestr->s|tr_ptr +| |00003420| 20 6c 69 74 74 6c 65 73 | 74 72 2d 3e 73 74 72 5f | littles|tr->str_| |00003430| 63 75 72 29 3b 0d 20 20 | 20 20 7d 0d 23 65 6e 64 |cur);. | }.#end| |00003440| 69 66 0d 0d 20 20 20 20 | 6c 69 74 74 6c 65 6c 65 |if.. |littlele| |00003450| 6e 20 3d 20 6c 69 74 74 | 6c 65 73 74 72 2d 3e 73 |n = litt|lestr->s| |00003460| 74 72 5f 63 75 72 3b 0d | 23 69 66 6e 64 65 66 20 |tr_cur;.|#ifndef | |00003470| 6c 69 6e 74 0d 20 20 20 | 20 69 66 20 28 6c 69 74 |lint. | if (lit| |00003480| 74 6c 65 73 74 72 2d 3e | 73 74 72 5f 70 6f 6b 20 |tlestr->|str_pok | |00003490| 26 20 53 50 5f 54 41 49 | 4c 20 26 26 20 21 6d 75 |& SP_TAI|L && !mu| |000034a0| 6c 74 69 6c 69 6e 65 29 | 20 7b 09 2f 2a 20 74 61 |ltiline)| {./* ta| |000034b0| 69 6c 20 61 6e 63 68 6f | 72 65 64 3f 20 2a 2f 0d |il ancho|red? */.| |000034c0| 09 69 66 20 28 6c 69 74 | 74 6c 65 6c 65 6e 20 3e |.if (lit|tlelen >| |000034d0| 20 62 69 67 65 6e 64 20 | 2d 20 62 69 67 29 0d 09 | bigend |- big)..| |000034e0| 20 20 20 20 72 65 74 75 | 72 6e 20 4e 75 6c 6c 63 | retu|rn Nullc| |000034f0| 68 3b 0d 09 6c 69 74 74 | 6c 65 20 3d 20 28 75 6e |h;..litt|le = (un| |00003500| 73 69 67 6e 65 64 20 63 | 68 61 72 2a 29 6c 69 74 |signed c|har*)lit| |00003510| 74 6c 65 73 74 72 2d 3e | 73 74 72 5f 70 74 72 3b |tlestr->|str_ptr;| |00003520| 0d 09 69 66 20 28 6c 69 | 74 74 6c 65 73 74 72 2d |..if (li|ttlestr-| |00003530| 3e 73 74 72 5f 70 6f 6b | 20 26 20 53 50 5f 43 41 |>str_pok| & SP_CA| |00003540| 53 45 46 4f 4c 44 29 20 | 7b 09 2f 2a 20 6f 6f 70 |SEFOLD) |{./* oop| |00003550| 73 2c 20 66 61 6b 65 20 | 69 74 20 2a 2f 0d 09 20 |s, fake |it */.. | |00003560| 20 20 20 62 69 67 20 3d | 20 62 69 67 65 6e 64 20 | big =| bigend | |00003570| 2d 20 6c 69 74 74 6c 65 | 6c 65 6e 3b 09 09 2f 2a |- little|len;../*| |00003580| 20 6a 75 73 74 20 73 74 | 61 72 74 20 6e 65 61 72 | just st|art near| |00003590| 20 65 6e 64 20 2a 2f 0d | 09 20 20 20 20 69 66 20 | end */.|. if | |000035a0| 28 62 69 67 65 6e 64 5b | 2d 31 5d 20 3d 3d 20 27 |(bigend[|-1] == '| |000035b0| 5c 6e 27 20 26 26 20 6c | 69 74 74 6c 65 5b 6c 69 |\n' && l|ittle[li| |000035c0| 74 74 6c 65 6c 65 6e 2d | 31 5d 20 21 3d 20 27 5c |ttlelen-|1] != '\| |000035d0| 6e 27 29 0d 09 09 62 69 | 67 2d 2d 3b 0d 09 7d 0d |n')...bi|g--;..}.| |000035e0| 09 65 6c 73 65 20 7b 0d | 09 20 20 20 20 73 20 3d |.else {.|. s =| |000035f0| 20 62 69 67 65 6e 64 20 | 2d 20 6c 69 74 74 6c 65 | bigend |- little| |00003600| 6c 65 6e 3b 0d 09 20 20 | 20 20 69 66 20 28 2a 73 |len;.. | if (*s| |00003610| 20 3d 3d 20 2a 6c 69 74 | 74 6c 65 20 26 26 20 62 | == *lit|tle && b| |00003620| 63 6d 70 28 73 2c 6c 69 | 74 74 6c 65 2c 6c 69 74 |cmp(s,li|ttle,lit| |00003630| 74 6c 65 6c 65 6e 29 3d | 3d 30 29 0d 09 09 72 65 |tlelen)=|=0)...re| |00003640| 74 75 72 6e 20 28 63 68 | 61 72 2a 29 73 3b 09 09 |turn (ch|ar*)s;..| |00003650| 2f 2a 20 68 6f 77 20 73 | 77 65 65 74 20 69 74 20 |/* how s|weet it | |00003660| 69 73 20 2a 2f 0d 09 20 | 20 20 20 65 6c 73 65 20 |is */.. | else | |00003670| 69 66 20 28 62 69 67 65 | 6e 64 5b 2d 31 5d 20 3d |if (bige|nd[-1] =| |00003680| 3d 20 27 5c 6e 27 20 26 | 26 20 6c 69 74 74 6c 65 |= '\n' &|& little| |00003690| 5b 6c 69 74 74 6c 65 6c | 65 6e 2d 31 5d 20 21 3d |[littlel|en-1] !=| |000036a0| 20 27 5c 6e 27 0d 09 20 | 20 20 20 20 20 26 26 20 | '\n'.. | && | |000036b0| 73 20 3e 20 62 69 67 29 | 20 7b 0d 09 09 20 20 20 |s > big)| {... | |000036c0| 20 73 2d 2d 3b 0d 09 09 | 69 66 20 28 2a 73 20 3d | s--;...|if (*s =| |000036d0| 3d 20 2a 6c 69 74 74 6c | 65 20 26 26 20 62 63 6d |= *littl|e && bcm| |000036e0| 70 28 73 2c 6c 69 74 74 | 6c 65 2c 6c 69 74 74 6c |p(s,litt|le,littl| |000036f0| 65 6c 65 6e 29 3d 3d 30 | 29 0d 09 09 20 20 20 20 |elen)==0|)... | |00003700| 72 65 74 75 72 6e 20 28 | 63 68 61 72 2a 29 73 3b |return (|char*)s;| |00003710| 0d 09 20 20 20 20 7d 0d | 09 20 20 20 20 72 65 74 |.. }.|. ret| |00003720| 75 72 6e 20 4e 75 6c 6c | 63 68 3b 0d 09 7d 0d 20 |urn Null|ch;..}. | |00003730| 20 20 20 7d 0d 20 20 20 | 20 74 61 62 6c 65 20 3d | }. | table =| |00003740| 20 28 75 6e 73 69 67 6e | 65 64 20 63 68 61 72 2a | (unsign|ed char*| |00003750| 29 28 6c 69 74 74 6c 65 | 73 74 72 2d 3e 73 74 72 |)(little|str->str| |00003760| 5f 70 74 72 20 2b 20 6c | 69 74 74 6c 65 6c 65 6e |_ptr + l|ittlelen| |00003770| 20 2b 20 31 29 3b 0d 23 | 65 6c 73 65 0d 20 20 20 | + 1);.#|else. | |00003780| 20 74 61 62 6c 65 20 3d | 20 4e 75 6c 6c 28 75 6e | table =| Null(un| |00003790| 73 69 67 6e 65 64 20 63 | 68 61 72 2a 29 3b 0d 23 |signed c|har*);.#| |000037a0| 65 6e 64 69 66 0d 20 20 | 20 20 69 66 20 28 2d 2d |endif. | if (--| |000037b0| 6c 69 74 74 6c 65 6c 65 | 6e 20 3e 3d 20 62 69 67 |littlele|n >= big| |000037c0| 65 6e 64 20 2d 20 62 69 | 67 29 0d 09 72 65 74 75 |end - bi|g)..retu| |000037d0| 72 6e 20 4e 75 6c 6c 63 | 68 3b 0d 20 20 20 20 73 |rn Nullc|h;. s| |000037e0| 20 3d 20 62 69 67 20 2b | 20 6c 69 74 74 6c 65 6c | = big +| littlel| |000037f0| 65 6e 3b 0d 20 20 20 20 | 6f 6c 64 6c 69 74 74 6c |en;. |oldlittl| |00003800| 65 20 3d 20 6c 69 74 74 | 6c 65 20 3d 20 74 61 62 |e = litt|le = tab| |00003810| 6c 65 20 2d 20 32 3b 0d | 20 20 20 20 69 66 20 28 |le - 2;.| if (| |00003820| 6c 69 74 74 6c 65 73 74 | 72 2d 3e 73 74 72 5f 70 |littlest|r->str_p| |00003830| 6f 6b 20 26 20 53 50 5f | 43 41 53 45 46 4f 4c 44 |ok & SP_|CASEFOLD| |00003840| 29 20 7b 09 2f 2a 20 63 | 61 73 65 20 69 6e 73 65 |) {./* c|ase inse| |00003850| 6e 73 69 74 69 76 65 3f | 20 2a 2f 0d 09 69 66 20 |nsitive?| */..if | |00003860| 28 73 20 3c 20 62 69 67 | 65 6e 64 29 20 7b 0d 09 |(s < big|end) {..| |00003870| 20 20 74 6f 70 31 3a 0d | 09 20 20 20 20 2f 2a 53 | top1:.|. /*S| |00003880| 55 50 50 52 45 53 53 20 | 35 36 30 2a 2f 0d 09 20 |UPPRESS |560*/.. | |00003890| 20 20 20 69 66 20 28 74 | 6d 70 20 3d 20 74 61 62 | if (t|mp = tab| |000038a0| 6c 65 5b 2a 73 5d 29 20 | 7b 0d 23 69 66 64 65 66 |le[*s]) |{.#ifdef| |000038b0| 20 50 4f 49 4e 54 45 52 | 52 49 47 4f 52 0d 09 09 | POINTER|RIGOR...| |000038c0| 69 66 20 28 62 69 67 65 | 6e 64 20 2d 20 73 20 3e |if (bige|nd - s >| |000038d0| 20 74 6d 70 29 20 7b 0d | 09 09 20 20 20 20 73 20 | tmp) {.|.. s | |000038e0| 2b 3d 20 74 6d 70 3b 0d | 09 09 20 20 20 20 67 6f |+= tmp;.|.. go| |000038f0| 74 6f 20 74 6f 70 31 3b | 0d 09 09 7d 0d 23 65 6c |to top1;|...}.#el| |00003900| 73 65 0d 09 09 69 66 20 | 28 28 73 20 2b 3d 20 74 |se...if |((s += t| |00003910| 6d 70 29 20 3c 20 62 69 | 67 65 6e 64 29 0d 09 09 |mp) < bi|gend)...| |00003920| 20 20 20 20 67 6f 74 6f | 20 74 6f 70 31 3b 0d 23 | goto| top1;.#| |00003930| 65 6e 64 69 66 0d 09 09 | 72 65 74 75 72 6e 20 4e |endif...|return N| |00003940| 75 6c 6c 63 68 3b 0d 09 | 20 20 20 20 7d 0d 09 20 |ullch;..| }.. | |00003950| 20 20 20 65 6c 73 65 20 | 7b 0d 09 09 74 6d 70 20 | else |{...tmp | |00003960| 3d 20 6c 69 74 74 6c 65 | 6c 65 6e 3b 09 2f 2a 20 |= little|len;./* | |00003970| 6c 65 73 73 20 65 78 70 | 65 6e 73 69 76 65 20 74 |less exp|ensive t| |00003980| 68 61 6e 20 63 61 6c 6c | 69 6e 67 20 73 74 72 6e |han call|ing strn| |00003990| 63 6d 70 28 29 20 2a 2f | 0d 09 09 6f 6c 64 73 20 |cmp() */|...olds | |000039a0| 3d 20 73 3b 0d 09 09 77 | 68 69 6c 65 20 28 74 6d |= s;...w|hile (tm| |000039b0| 70 2d 2d 29 20 7b 0d 09 | 09 20 20 20 20 69 66 20 |p--) {..|. if | |000039c0| 28 2a 2d 2d 73 20 3d 3d | 20 2a 2d 2d 6c 69 74 74 |(*--s ==| *--litt| |000039d0| 6c 65 20 7c 7c 20 66 6f | 6c 64 5b 2a 73 5d 20 3d |le || fo|ld[*s] =| |000039e0| 3d 20 2a 6c 69 74 74 6c | 65 29 0d 09 09 09 63 6f |= *littl|e)....co| |000039f0| 6e 74 69 6e 75 65 3b 0d | 09 09 20 20 20 20 73 20 |ntinue;.|.. s | |00003a00| 3d 20 6f 6c 64 73 20 2b | 20 31 3b 09 2f 2a 20 68 |= olds +| 1;./* h| |00003a10| 65 72 65 20 77 65 20 70 | 61 79 20 74 68 65 20 70 |ere we p|ay the p| |00003a20| 72 69 63 65 20 66 6f 72 | 20 66 61 69 6c 75 72 65 |rice for| failure| |00003a30| 20 2a 2f 0d 09 09 20 20 | 20 20 6c 69 74 74 6c 65 | */... | little| |00003a40| 20 3d 20 6f 6c 64 6c 69 | 74 74 6c 65 3b 0d 09 09 | = oldli|ttle;...| |00003a50| 20 20 20 20 69 66 20 28 | 73 20 3c 20 62 69 67 65 | if (|s < bige| |00003a60| 6e 64 29 09 2f 2a 20 66 | 61 6b 65 20 75 70 20 63 |nd)./* f|ake up c| |00003a70| 6f 6e 74 69 6e 75 65 20 | 74 6f 20 6f 75 74 65 72 |ontinue |to outer| |00003a80| 20 6c 6f 6f 70 20 2a 2f | 0d 09 09 09 67 6f 74 6f | loop */|....goto| |00003a90| 20 74 6f 70 31 3b 0d 09 | 09 20 20 20 20 72 65 74 | top1;..|. ret| |00003aa0| 75 72 6e 20 4e 75 6c 6c | 63 68 3b 0d 09 09 7d 0d |urn Null|ch;...}.| |00003ab0| 23 69 66 6e 64 65 66 20 | 6c 69 6e 74 0d 09 09 72 |#ifndef |lint...r| |00003ac0| 65 74 75 72 6e 20 28 63 | 68 61 72 20 2a 29 73 3b |eturn (c|har *)s;| |00003ad0| 0d 23 65 6e 64 69 66 0d | 09 20 20 20 20 7d 0d 09 |.#endif.|. }..| |00003ae0| 7d 0d 20 20 20 20 7d 0d | 20 20 20 20 65 6c 73 65 |}. }.| else| |00003af0| 20 7b 0d 09 69 66 20 28 | 73 20 3c 20 62 69 67 65 | {..if (|s < bige| |00003b00| 6e 64 29 20 7b 0d 09 20 | 20 74 6f 70 32 3a 0d 09 |nd) {.. | top2:..| |00003b10| 20 20 20 20 2f 2a 53 55 | 50 50 52 45 53 53 20 35 | /*SU|PPRESS 5| |00003b20| 36 30 2a 2f 0d 09 20 20 | 20 20 69 66 20 28 74 6d |60*/.. | if (tm| |00003b30| 70 20 3d 20 74 61 62 6c | 65 5b 2a 73 5d 29 20 7b |p = tabl|e[*s]) {| |00003b40| 0d 23 69 66 64 65 66 20 | 50 4f 49 4e 54 45 52 52 |.#ifdef |POINTERR| |00003b50| 49 47 4f 52 0d 09 09 69 | 66 20 28 62 69 67 65 6e |IGOR...i|f (bigen| |00003b60| 64 20 2d 20 73 20 3e 20 | 74 6d 70 29 20 7b 0d 09 |d - s > |tmp) {..| |00003b70| 09 20 20 20 20 73 20 2b | 3d 20 74 6d 70 3b 0d 09 |. s +|= tmp;..| |00003b80| 09 20 20 20 20 67 6f 74 | 6f 20 74 6f 70 32 3b 0d |. got|o top2;.| |00003b90| 09 09 7d 0d 23 65 6c 73 | 65 0d 09 09 69 66 20 28 |..}.#els|e...if (| |00003ba0| 28 73 20 2b 3d 20 74 6d | 70 29 20 3c 20 62 69 67 |(s += tm|p) < big| |00003bb0| 65 6e 64 29 0d 09 09 20 | 20 20 20 67 6f 74 6f 20 |end)... | goto | |00003bc0| 74 6f 70 32 3b 0d 23 65 | 6e 64 69 66 0d 09 09 72 |top2;.#e|ndif...r| |00003bd0| 65 74 75 72 6e 20 4e 75 | 6c 6c 63 68 3b 0d 09 20 |eturn Nu|llch;.. | |00003be0| 20 20 20 7d 0d 09 20 20 | 20 20 65 6c 73 65 20 7b | }.. | else {| |00003bf0| 0d 09 09 74 6d 70 20 3d | 20 6c 69 74 74 6c 65 6c |...tmp =| littlel| |00003c00| 65 6e 3b 09 2f 2a 20 6c | 65 73 73 20 65 78 70 65 |en;./* l|ess expe| |00003c10| 6e 73 69 76 65 20 74 68 | 61 6e 20 63 61 6c 6c 69 |nsive th|an calli| |00003c20| 6e 67 20 73 74 72 6e 63 | 6d 70 28 29 20 2a 2f 0d |ng strnc|mp() */.| |00003c30| 09 09 6f 6c 64 73 20 3d | 20 73 3b 0d 09 09 77 68 |..olds =| s;...wh| |00003c40| 69 6c 65 20 28 74 6d 70 | 2d 2d 29 20 7b 0d 09 09 |ile (tmp|--) {...| |00003c50| 20 20 20 20 69 66 20 28 | 2a 2d 2d 73 20 3d 3d 20 | if (|*--s == | |00003c60| 2a 2d 2d 6c 69 74 74 6c | 65 29 0d 09 09 09 63 6f |*--littl|e)....co| |00003c70| 6e 74 69 6e 75 65 3b 0d | 09 09 20 20 20 20 73 20 |ntinue;.|.. s | |00003c80| 3d 20 6f 6c 64 73 20 2b | 20 31 3b 09 2f 2a 20 68 |= olds +| 1;./* h| |00003c90| 65 72 65 20 77 65 20 70 | 61 79 20 74 68 65 20 70 |ere we p|ay the p| |00003ca0| 72 69 63 65 20 66 6f 72 | 20 66 61 69 6c 75 72 65 |rice for| failure| |00003cb0| 20 2a 2f 0d 09 09 20 20 | 20 20 6c 69 74 74 6c 65 | */... | little| |00003cc0| 20 3d 20 6f 6c 64 6c 69 | 74 74 6c 65 3b 0d 09 09 | = oldli|ttle;...| |00003cd0| 20 20 20 20 69 66 20 28 | 73 20 3c 20 62 69 67 65 | if (|s < bige| |00003ce0| 6e 64 29 09 2f 2a 20 66 | 61 6b 65 20 75 70 20 63 |nd)./* f|ake up c| |00003cf0| 6f 6e 74 69 6e 75 65 20 | 74 6f 20 6f 75 74 65 72 |ontinue |to outer| |00003d00| 20 6c 6f 6f 70 20 2a 2f | 0d 09 09 09 67 6f 74 6f | loop */|....goto| |00003d10| 20 74 6f 70 32 3b 0d 09 | 09 20 20 20 20 72 65 74 | top2;..|. ret| |00003d20| 75 72 6e 20 4e 75 6c 6c | 63 68 3b 0d 09 09 7d 0d |urn Null|ch;...}.| |00003d30| 23 69 66 6e 64 65 66 20 | 6c 69 6e 74 0d 09 09 72 |#ifndef |lint...r| |00003d40| 65 74 75 72 6e 20 28 63 | 68 61 72 20 2a 29 73 3b |eturn (c|har *)s;| |00003d50| 0d 23 65 6e 64 69 66 0d | 09 20 20 20 20 7d 0d 09 |.#endif.|. }..| |00003d60| 7d 0d 20 20 20 20 7d 0d | 20 20 20 20 72 65 74 75 |}. }.| retu| |00003d70| 72 6e 20 4e 75 6c 6c 63 | 68 3b 0d 7d 0d 0d 63 68 |rn Nullc|h;.}..ch| |00003d80| 61 72 20 2a 0d 73 63 72 | 65 61 6d 69 6e 73 74 72 |ar *.scr|eaminstr| |00003d90| 28 62 69 67 73 74 72 2c | 20 6c 69 74 74 6c 65 73 |(bigstr,| littles| |00003da0| 74 72 29 0d 53 54 52 20 | 2a 62 69 67 73 74 72 3b |tr).STR |*bigstr;| |00003db0| 0d 53 54 52 20 2a 6c 69 | 74 74 6c 65 73 74 72 3b |.STR *li|ttlestr;| |00003dc0| 0d 7b 0d 20 20 20 20 72 | 65 67 69 73 74 65 72 20 |.{. r|egister | |00003dd0| 75 6e 73 69 67 6e 65 64 | 20 63 68 61 72 20 2a 73 |unsigned| char *s| |00003de0| 2c 20 2a 78 3b 0d 20 20 | 20 20 72 65 67 69 73 74 |, *x;. | regist| |00003df0| 65 72 20 75 6e 73 69 67 | 6e 65 64 20 63 68 61 72 |er unsig|ned char| |00003e00| 20 2a 62 69 67 3b 0d 20 | 20 20 20 72 65 67 69 73 | *big;. | regis| |00003e10| 74 65 72 20 69 6e 74 20 | 70 6f 73 3b 0d 20 20 20 |ter int |pos;. | |00003e20| 20 72 65 67 69 73 74 65 | 72 20 69 6e 74 20 70 72 | registe|r int pr| |00003e30| 65 76 69 6f 75 73 3b 0d | 20 20 20 20 72 65 67 69 |evious;.| regi| |00003e40| 73 74 65 72 20 69 6e 74 | 20 66 69 72 73 74 3b 0d |ster int| first;.| |00003e50| 20 20 20 20 72 65 67 69 | 73 74 65 72 20 75 6e 73 | regi|ster uns| |00003e60| 69 67 6e 65 64 20 63 68 | 61 72 20 2a 6c 69 74 74 |igned ch|ar *litt| |00003e70| 6c 65 3b 0d 20 20 20 20 | 72 65 67 69 73 74 65 72 |le;. |register| |00003e80| 20 75 6e 73 69 67 6e 65 | 64 20 63 68 61 72 20 2a | unsigne|d char *| |00003e90| 62 69 67 65 6e 64 3b 0d | 20 20 20 20 72 65 67 69 |bigend;.| regi| |00003ea0| 73 74 65 72 20 75 6e 73 | 69 67 6e 65 64 20 63 68 |ster uns|igned ch| |00003eb0| 61 72 20 2a 6c 69 74 74 | 6c 65 65 6e 64 3b 0d 0d |ar *litt|leend;..| |00003ec0| 20 20 20 20 69 66 20 28 | 28 70 6f 73 20 3d 20 73 | if (|(pos = s| |00003ed0| 63 72 65 61 6d 66 69 72 | 73 74 5b 6c 69 74 74 6c |creamfir|st[littl| |00003ee0| 65 73 74 72 2d 3e 73 74 | 72 5f 72 61 72 65 5d 29 |estr->st|r_rare])| |00003ef0| 20 3c 20 30 29 20 0d 09 | 72 65 74 75 72 6e 20 4e | < 0) ..|return N| |00003f00| 75 6c 6c 63 68 3b 0d 23 | 69 66 6e 64 65 66 20 6c |ullch;.#|ifndef l| |00003f10| 69 6e 74 0d 20 20 20 20 | 6c 69 74 74 6c 65 20 3d |int. |little =| |00003f20| 20 28 75 6e 73 69 67 6e | 65 64 20 63 68 61 72 20 | (unsign|ed char | |00003f30| 2a 29 28 6c 69 74 74 6c | 65 73 74 72 2d 3e 73 74 |*)(littl|estr->st| |00003f40| 72 5f 70 74 72 29 3b 0d | 23 65 6c 73 65 0d 20 20 |r_ptr);.|#else. | |00003f50| 20 20 6c 69 74 74 6c 65 | 20 3d 20 4e 75 6c 6c 28 | little| = Null(| |00003f60| 75 6e 73 69 67 6e 65 64 | 20 63 68 61 72 20 2a 29 |unsigned| char *)| |00003f70| 3b 0d 23 65 6e 64 69 66 | 0d 20 20 20 20 6c 69 74 |;.#endif|. lit| |00003f80| 74 6c 65 65 6e 64 20 3d | 20 6c 69 74 74 6c 65 20 |tleend =| little | |00003f90| 2b 20 6c 69 74 74 6c 65 | 73 74 72 2d 3e 73 74 72 |+ little|str->str| |00003fa0| 5f 63 75 72 3b 0d 20 20 | 20 20 66 69 72 73 74 20 |_cur;. | first | |00003fb0| 3d 20 2a 6c 69 74 74 6c | 65 2b 2b 3b 0d 20 20 20 |= *littl|e++;. | |00003fc0| 20 70 72 65 76 69 6f 75 | 73 20 3d 20 6c 69 74 74 | previou|s = litt| |00003fd0| 6c 65 73 74 72 2d 3e 73 | 74 72 5f 73 74 61 74 65 |lestr->s|tr_state| |00003fe0| 3b 0d 23 69 66 6e 64 65 | 66 20 6c 69 6e 74 0d 20 |;.#ifnde|f lint. | |00003ff0| 20 20 20 62 69 67 20 3d | 20 28 75 6e 73 69 67 6e | big =| (unsign| |00004000| 65 64 20 63 68 61 72 20 | 2a 29 28 62 69 67 73 74 |ed char |*)(bigst| |00004010| 72 2d 3e 73 74 72 5f 70 | 74 72 29 3b 0d 23 65 6c |r->str_p|tr);.#el| |00004020| 73 65 0d 20 20 20 20 62 | 69 67 20 3d 20 4e 75 6c |se. b|ig = Nul| |00004030| 6c 28 75 6e 73 69 67 6e | 65 64 20 63 68 61 72 2a |l(unsign|ed char*| |00004040| 29 3b 0d 23 65 6e 64 69 | 66 0d 20 20 20 20 62 69 |);.#endi|f. bi| |00004050| 67 65 6e 64 20 3d 20 62 | 69 67 20 2b 20 62 69 67 |gend = b|ig + big| |00004060| 73 74 72 2d 3e 73 74 72 | 5f 63 75 72 3b 0d 20 20 |str->str|_cur;. | |00004070| 20 20 77 68 69 6c 65 20 | 28 70 6f 73 20 3c 20 70 | while |(pos < p| |00004080| 72 65 76 69 6f 75 73 29 | 20 7b 0d 23 69 66 6e 64 |revious)| {.#ifnd| |00004090| 65 66 20 6c 69 6e 74 0d | 09 69 66 20 28 21 28 70 |ef lint.|.if (!(p| |000040a0| 6f 73 20 2b 3d 20 73 63 | 72 65 61 6d 6e 65 78 74 |os += sc|reamnext| |000040b0| 5b 70 6f 73 5d 29 29 0d | 23 65 6e 64 69 66 0d 09 |[pos])).|#endif..| |000040c0| 20 20 20 20 72 65 74 75 | 72 6e 20 4e 75 6c 6c 63 | retu|rn Nullc| |000040d0| 68 3b 0d 20 20 20 20 7d | 0d 23 69 66 64 65 66 20 |h;. }|.#ifdef | |000040e0| 50 4f 49 4e 54 45 52 52 | 49 47 4f 52 0d 20 20 20 |POINTERR|IGOR. | |000040f0| 20 69 66 20 28 6c 69 74 | 74 6c 65 73 74 72 2d 3e | if (lit|tlestr->| |00004100| 73 74 72 5f 70 6f 6b 20 | 26 20 53 50 5f 43 41 53 |str_pok |& SP_CAS| |00004110| 45 46 4f 4c 44 29 20 7b | 09 2f 2a 20 63 61 73 65 |EFOLD) {|./* case| |00004120| 20 69 6e 73 69 67 6e 69 | 66 69 63 61 6e 74 3f 20 | insigni|ficant? | |00004130| 2a 2f 0d 09 64 6f 20 7b | 0d 09 20 20 20 20 69 66 |*/..do {|.. if| |00004140| 20 28 62 69 67 5b 70 6f | 73 2d 70 72 65 76 69 6f | (big[po|s-previo| |00004150| 75 73 5d 20 21 3d 20 66 | 69 72 73 74 20 26 26 20 |us] != f|irst && | |00004160| 62 69 67 5b 70 6f 73 2d | 70 72 65 76 69 6f 75 73 |big[pos-|previous| |00004170| 5d 20 21 3d 20 66 6f 6c | 64 5b 66 69 72 73 74 5d |] != fol|d[first]| |00004180| 29 0d 09 09 63 6f 6e 74 | 69 6e 75 65 3b 0d 09 20 |)...cont|inue;.. | |00004190| 20 20 20 66 6f 72 20 28 | 78 3d 62 69 67 2b 70 6f | for (|x=big+po| |000041a0| 73 2b 31 2d 70 72 65 76 | 69 6f 75 73 2c 73 3d 6c |s+1-prev|ious,s=l| |000041b0| 69 74 74 6c 65 3b 20 73 | 20 3c 20 6c 69 74 74 6c |ittle; s| < littl| |000041c0| 65 65 6e 64 3b 20 2f 2a | 2a 2f 20 29 20 7b 0d 09 |eend; /*|*/ ) {..| |000041d0| 09 69 66 20 28 78 20 3e | 3d 20 62 69 67 65 6e 64 |.if (x >|= bigend| |000041e0| 29 0d 09 09 20 20 20 20 | 72 65 74 75 72 6e 20 4e |)... |return N| |000041f0| 75 6c 6c 63 68 3b 0d 09 | 09 69 66 20 28 2a 73 2b |ullch;..|.if (*s+| |00004200| 2b 20 21 3d 20 2a 78 2b | 2b 20 26 26 20 66 6f 6c |+ != *x+|+ && fol| |00004210| 64 5b 2a 28 73 2d 31 29 | 5d 20 21 3d 20 2a 28 78 |d[*(s-1)|] != *(x| |00004220| 2d 31 29 29 20 7b 0d 09 | 09 20 20 20 20 73 2d 2d |-1)) {..|. s--| |00004230| 3b 0d 09 09 20 20 20 20 | 62 72 65 61 6b 3b 0d 09 |;... |break;..| |00004240| 09 7d 0d 09 20 20 20 20 | 7d 0d 09 20 20 20 20 69 |.}.. |}.. i| |00004250| 66 20 28 73 20 3d 3d 20 | 6c 69 74 74 6c 65 65 6e |f (s == |littleen| |00004260| 64 29 0d 23 69 66 6e 64 | 65 66 20 6c 69 6e 74 0d |d).#ifnd|ef lint.| |00004270| 09 09 72 65 74 75 72 6e | 20 28 63 68 61 72 20 2a |..return| (char *| |00004280| 29 28 62 69 67 2b 70 6f | 73 2d 70 72 65 76 69 6f |)(big+po|s-previo| |00004290| 75 73 29 3b 0d 23 65 6c | 73 65 0d 09 09 72 65 74 |us);.#el|se...ret| |000042a0| 75 72 6e 20 4e 75 6c 6c | 63 68 3b 0d 23 65 6e 64 |urn Null|ch;.#end| |000042b0| 69 66 0d 09 7d 20 77 68 | 69 6c 65 20 28 0d 23 69 |if..} wh|ile (.#i| |000042c0| 66 6e 64 65 66 20 6c 69 | 6e 74 0d 09 09 70 6f 73 |fndef li|nt...pos| |000042d0| 20 2b 3d 20 73 63 72 65 | 61 6d 6e 65 78 74 5b 70 | += scre|amnext[p| |000042e0| 6f 73 5d 09 2f 2a 20 64 | 6f 65 73 20 74 68 69 73 |os]./* d|oes this| |000042f0| 20 67 6f 6f 66 20 75 70 | 20 61 6e 79 77 68 65 72 | goof up| anywher| |00004300| 65 3f 20 2a 2f 0d 23 65 | 6c 73 65 0d 09 09 70 6f |e? */.#e|lse...po| |00004310| 73 20 2b 3d 20 73 63 72 | 65 61 6d 6e 65 78 74 5b |s += scr|eamnext[| |00004320| 30 5d 0d 23 65 6e 64 69 | 66 0d 09 20 20 20 20 29 |0].#endi|f.. )| |00004330| 3b 0d 20 20 20 20 7d 0d | 20 20 20 20 65 6c 73 65 |;. }.| else| |00004340| 20 7b 0d 09 64 6f 20 7b | 0d 09 20 20 20 20 69 66 | {..do {|.. if| |00004350| 20 28 62 69 67 5b 70 6f | 73 2d 70 72 65 76 69 6f | (big[po|s-previo| |00004360| 75 73 5d 20 21 3d 20 66 | 69 72 73 74 29 0d 09 09 |us] != f|irst)...| |00004370| 63 6f 6e 74 69 6e 75 65 | 3b 0d 09 20 20 20 20 66 |continue|;.. f| |00004380| 6f 72 20 28 78 3d 62 69 | 67 2b 70 6f 73 2b 31 2d |or (x=bi|g+pos+1-| |00004390| 70 72 65 76 69 6f 75 73 | 2c 73 3d 6c 69 74 74 6c |previous|,s=littl| |000043a0| 65 3b 20 73 20 3c 20 6c | 69 74 74 6c 65 65 6e 64 |e; s < l|ittleend| |000043b0| 3b 20 2f 2a 2a 2f 20 29 | 20 7b 0d 09 09 69 66 20 |; /**/ )| {...if | |000043c0| 28 78 20 3e 3d 20 62 69 | 67 65 6e 64 29 0d 09 09 |(x >= bi|gend)...| |000043d0| 20 20 20 20 72 65 74 75 | 72 6e 20 4e 75 6c 6c 63 | retu|rn Nullc| |000043e0| 68 3b 0d 09 09 69 66 20 | 28 2a 73 2b 2b 20 21 3d |h;...if |(*s++ !=| |000043f0| 20 2a 78 2b 2b 29 20 7b | 0d 09 09 20 20 20 20 73 | *x++) {|... s| |00004400| 2d 2d 3b 0d 09 09 20 20 | 20 20 62 72 65 61 6b 3b |--;... | break;| |00004410| 0d 09 09 7d 0d 09 20 20 | 20 20 7d 0d 09 20 20 20 |...}.. | }.. | |00004420| 20 69 66 20 28 73 20 3d | 3d 20 6c 69 74 74 6c 65 | if (s =|= little| |00004430| 65 6e 64 29 0d 23 69 66 | 6e 64 65 66 20 6c 69 6e |end).#if|ndef lin| |00004440| 74 0d 09 09 72 65 74 75 | 72 6e 20 28 63 68 61 72 |t...retu|rn (char| |00004450| 20 2a 29 28 62 69 67 2b | 70 6f 73 2d 70 72 65 76 | *)(big+|pos-prev| |00004460| 69 6f 75 73 29 3b 0d 23 | 65 6c 73 65 0d 09 09 72 |ious);.#|else...r| |00004470| 65 74 75 72 6e 20 4e 75 | 6c 6c 63 68 3b 0d 23 65 |eturn Nu|llch;.#e| |00004480| 6e 64 69 66 0d 09 7d 20 | 77 68 69 6c 65 20 28 0d |ndif..} |while (.| |00004490| 23 69 66 6e 64 65 66 20 | 6c 69 6e 74 0d 09 09 70 |#ifndef |lint...p| |000044a0| 6f 73 20 2b 3d 20 73 63 | 72 65 61 6d 6e 65 78 74 |os += sc|reamnext| |000044b0| 5b 70 6f 73 5d 0d 23 65 | 6c 73 65 0d 09 09 70 6f |[pos].#e|lse...po| |000044c0| 73 20 2b 3d 20 73 63 72 | 65 61 6d 6e 65 78 74 5b |s += scr|eamnext[| |000044d0| 30 5d 0d 23 65 6e 64 69 | 66 0d 09 20 20 20 20 29 |0].#endi|f.. )| |000044e0| 3b 0d 20 20 20 20 7d 0d | 23 65 6c 73 65 20 2f 2a |;. }.|#else /*| |000044f0| 20 21 50 4f 49 4e 54 45 | 52 52 49 47 4f 52 20 2a | !POINTE|RRIGOR *| |00004500| 2f 0d 20 20 20 20 62 69 | 67 20 2d 3d 20 70 72 65 |/. bi|g -= pre| |00004510| 76 69 6f 75 73 3b 0d 20 | 20 20 20 69 66 20 28 6c |vious;. | if (l| |00004520| 69 74 74 6c 65 73 74 72 | 2d 3e 73 74 72 5f 70 6f |ittlestr|->str_po| |00004530| 6b 20 26 20 53 50 5f 43 | 41 53 45 46 4f 4c 44 29 |k & SP_C|ASEFOLD)| |00004540| 20 7b 09 2f 2a 20 63 61 | 73 65 20 69 6e 73 69 67 | {./* ca|se insig| |00004550| 6e 69 66 69 63 61 6e 74 | 3f 20 2a 2f 0d 09 64 6f |nificant|? */..do| |00004560| 20 7b 0d 09 20 20 20 20 | 69 66 20 28 62 69 67 5b | {.. |if (big[| |00004570| 70 6f 73 5d 20 21 3d 20 | 66 69 72 73 74 20 26 26 |pos] != |first &&| |00004580| 20 62 69 67 5b 70 6f 73 | 5d 20 21 3d 20 66 6f 6c | big[pos|] != fol| |00004590| 64 5b 66 69 72 73 74 5d | 29 0d 09 09 63 6f 6e 74 |d[first]|)...cont| |000045a0| 69 6e 75 65 3b 0d 09 20 | 20 20 20 66 6f 72 20 28 |inue;.. | for (| |000045b0| 78 3d 62 69 67 2b 70 6f | 73 2b 31 2c 73 3d 6c 69 |x=big+po|s+1,s=li| |000045c0| 74 74 6c 65 3b 20 73 20 | 3c 20 6c 69 74 74 6c 65 |ttle; s |< little| |000045d0| 65 6e 64 3b 20 2f 2a 2a | 2f 20 29 20 7b 0d 09 09 |end; /**|/ ) {...| |000045e0| 69 66 20 28 78 20 3e 3d | 20 62 69 67 65 6e 64 29 |if (x >=| bigend)| |000045f0| 0d 09 09 20 20 20 20 72 | 65 74 75 72 6e 20 4e 75 |... r|eturn Nu| |00004600| 6c 6c 63 68 3b 0d 09 09 | 69 66 20 28 2a 73 2b 2b |llch;...|if (*s++| |00004610| 20 21 3d 20 2a 78 2b 2b | 20 26 26 20 66 6f 6c 64 | != *x++| && fold| |00004620| 5b 2a 28 73 2d 31 29 5d | 20 21 3d 20 2a 28 78 2d |[*(s-1)]| != *(x-| |00004630| 31 29 29 20 7b 0d 09 09 | 20 20 20 20 73 2d 2d 3b |1)) {...| s--;| |00004640| 0d 09 09 20 20 20 20 62 | 72 65 61 6b 3b 0d 09 09 |... b|reak;...| |00004650| 7d 0d 09 20 20 20 20 7d | 0d 09 20 20 20 20 69 66 |}.. }|.. if| |00004660| 20 28 73 20 3d 3d 20 6c | 69 74 74 6c 65 65 6e 64 | (s == l|ittleend| |00004670| 29 0d 23 69 66 6e 64 65 | 66 20 6c 69 6e 74 0d 09 |).#ifnde|f lint..| |00004680| 09 72 65 74 75 72 6e 20 | 28 63 68 61 72 20 2a 29 |.return |(char *)| |00004690| 28 62 69 67 2b 70 6f 73 | 29 3b 0d 23 65 6c 73 65 |(big+pos|);.#else| |000046a0| 0d 09 09 72 65 74 75 72 | 6e 20 4e 75 6c 6c 63 68 |...retur|n Nullch| |000046b0| 3b 0d 23 65 6e 64 69 66 | 0d 09 7d 20 77 68 69 6c |;.#endif|..} whil| |000046c0| 65 20 28 0d 23 69 66 6e | 64 65 66 20 6c 69 6e 74 |e (.#ifn|def lint| |000046d0| 0d 09 09 70 6f 73 20 2b | 3d 20 73 63 72 65 61 6d |...pos +|= scream| |000046e0| 6e 65 78 74 5b 70 6f 73 | 5d 09 2f 2a 20 64 6f 65 |next[pos|]./* doe| |000046f0| 73 20 74 68 69 73 20 67 | 6f 6f 66 20 75 70 20 61 |s this g|oof up a| |00004700| 6e 79 77 68 65 72 65 3f | 20 2a 2f 0d 23 65 6c 73 |nywhere?| */.#els| |00004710| 65 0d 09 09 70 6f 73 20 | 2b 3d 20 73 63 72 65 61 |e...pos |+= screa| |00004720| 6d 6e 65 78 74 5b 30 5d | 0d 23 65 6e 64 69 66 0d |mnext[0]|.#endif.| |00004730| 09 20 20 20 20 29 3b 0d | 20 20 20 20 7d 0d 20 20 |. );.| }. | |00004740| 20 20 65 6c 73 65 20 7b | 0d 09 64 6f 20 7b 0d 09 | else {|..do {..| |00004750| 20 20 20 20 69 66 20 28 | 62 69 67 5b 70 6f 73 5d | if (|big[pos]| |00004760| 20 21 3d 20 66 69 72 73 | 74 29 0d 09 09 63 6f 6e | != firs|t)...con| |00004770| 74 69 6e 75 65 3b 0d 09 | 20 20 20 20 66 6f 72 20 |tinue;..| for | |00004780| 28 78 3d 62 69 67 2b 70 | 6f 73 2b 31 2c 73 3d 6c |(x=big+p|os+1,s=l| |00004790| 69 74 74 6c 65 3b 20 73 | 20 3c 20 6c 69 74 74 6c |ittle; s| < littl| |000047a0| 65 65 6e 64 3b 20 2f 2a | 2a 2f 20 29 20 7b 0d 09 |eend; /*|*/ ) {..| |000047b0| 09 69 66 20 28 78 20 3e | 3d 20 62 69 67 65 6e 64 |.if (x >|= bigend| |000047c0| 29 0d 09 09 20 20 20 20 | 72 65 74 75 72 6e 20 4e |)... |return N| |000047d0| 75 6c 6c 63 68 3b 0d 09 | 09 69 66 20 28 2a 73 2b |ullch;..|.if (*s+| |000047e0| 2b 20 21 3d 20 2a 78 2b | 2b 29 20 7b 0d 09 09 20 |+ != *x+|+) {... | |000047f0| 20 20 20 73 2d 2d 3b 0d | 09 09 20 20 20 20 62 72 | s--;.|.. br| |00004800| 65 61 6b 3b 0d 09 09 7d | 0d 09 20 20 20 20 7d 0d |eak;...}|.. }.| |00004810| 09 20 20 20 20 69 66 20 | 28 73 20 3d 3d 20 6c 69 |. if |(s == li| |00004820| 74 74 6c 65 65 6e 64 29 | 0d 23 69 66 6e 64 65 66 |ttleend)|.#ifndef| |00004830| 20 6c 69 6e 74 0d 09 09 | 72 65 74 75 72 6e 20 28 | lint...|return (| |00004840| 63 68 61 72 20 2a 29 28 | 62 69 67 2b 70 6f 73 29 |char *)(|big+pos)| |00004850| 3b 0d 23 65 6c 73 65 0d | 09 09 72 65 74 75 72 6e |;.#else.|..return| |00004860| 20 4e 75 6c 6c 63 68 3b | 0d 23 65 6e 64 69 66 0d | Nullch;|.#endif.| |00004870| 09 7d 20 77 68 69 6c 65 | 20 28 0d 23 69 66 6e 64 |.} while| (.#ifnd| |00004880| 65 66 20 6c 69 6e 74 0d | 09 09 70 6f 73 20 2b 3d |ef lint.|..pos +=| |00004890| 20 73 63 72 65 61 6d 6e | 65 78 74 5b 70 6f 73 5d | screamn|ext[pos]| |000048a0| 0d 23 65 6c 73 65 0d 09 | 09 70 6f 73 20 2b 3d 20 |.#else..|.pos += | |000048b0| 73 63 72 65 61 6d 6e 65 | 78 74 5b 30 5d 0d 23 65 |screamne|xt[0].#e| |000048c0| 6e 64 69 66 0d 09 20 20 | 20 20 29 3b 0d 20 20 20 |ndif.. | );. | |000048d0| 20 7d 0d 23 65 6e 64 69 | 66 20 2f 2a 20 50 4f 49 | }.#endi|f /* POI| |000048e0| 4e 54 45 52 52 49 47 4f | 52 20 2a 2f 0d 20 20 20 |NTERRIGO|R */. | |000048f0| 20 72 65 74 75 72 6e 20 | 4e 75 6c 6c 63 68 3b 0d | return |Nullch;.| |00004900| 7d 0d 0d 2f 2a 20 63 6f | 70 79 20 61 20 73 74 72 |}../* co|py a str| |00004910| 69 6e 67 20 74 6f 20 61 | 20 73 61 66 65 20 73 70 |ing to a| safe sp| |00004920| 6f 74 20 2a 2f 0d 0d 63 | 68 61 72 20 2a 0d 73 61 |ot */..c|har *.sa| |00004930| 76 65 73 74 72 28 73 74 | 72 29 0d 63 68 61 72 20 |vestr(st|r).char | |00004940| 2a 73 74 72 3b 0d 7b 0d | 20 20 20 20 72 65 67 69 |*str;.{.| regi| |00004950| 73 74 65 72 20 63 68 61 | 72 20 2a 6e 65 77 61 64 |ster cha|r *newad| |00004960| 64 72 3b 0d 0d 20 20 20 | 20 4e 65 77 28 39 30 32 |dr;.. | New(902| |00004970| 2c 6e 65 77 61 64 64 72 | 2c 73 74 72 6c 65 6e 28 |,newaddr|,strlen(| |00004980| 73 74 72 29 2b 31 2c 63 | 68 61 72 29 3b 0d 20 20 |str)+1,c|har);. | |00004990| 20 20 28 76 6f 69 64 29 | 73 74 72 63 70 79 28 6e | (void)|strcpy(n| |000049a0| 65 77 61 64 64 72 2c 73 | 74 72 29 3b 0d 20 20 20 |ewaddr,s|tr);. | |000049b0| 20 72 65 74 75 72 6e 20 | 6e 65 77 61 64 64 72 3b | return |newaddr;| |000049c0| 0d 7d 0d 0d 2f 2a 20 73 | 61 6d 65 20 74 68 69 6e |.}../* s|ame thin| |000049d0| 67 20 62 75 74 20 77 69 | 74 68 20 61 20 6b 6e 6f |g but wi|th a kno| |000049e0| 77 6e 20 6c 65 6e 67 74 | 68 20 2a 2f 0d 0d 63 68 |wn lengt|h */..ch| |000049f0| 61 72 20 2a 0d 6e 73 61 | 76 65 73 74 72 28 73 74 |ar *.nsa|vestr(st| |00004a00| 72 2c 20 6c 65 6e 29 0d | 63 68 61 72 20 2a 73 74 |r, len).|char *st| |00004a10| 72 3b 0d 72 65 67 69 73 | 74 65 72 20 69 6e 74 20 |r;.regis|ter int | |00004a20| 6c 65 6e 3b 0d 7b 0d 20 | 20 20 20 72 65 67 69 73 |len;.{. | regis| |00004a30| 74 65 72 20 63 68 61 72 | 20 2a 6e 65 77 61 64 64 |ter char| *newadd| |00004a40| 72 3b 0d 0d 20 20 20 20 | 4e 65 77 28 39 30 33 2c |r;.. |New(903,| |00004a50| 6e 65 77 61 64 64 72 2c | 6c 65 6e 2b 31 2c 63 68 |newaddr,|len+1,ch| |00004a60| 61 72 29 3b 0d 20 20 20 | 20 43 6f 70 79 28 73 74 |ar);. | Copy(st| |00004a70| 72 2c 6e 65 77 61 64 64 | 72 2c 6c 65 6e 2c 63 68 |r,newadd|r,len,ch| |00004a80| 61 72 29 3b 09 09 2f 2a | 20 6d 69 67 68 74 20 6e |ar);../*| might n| |00004a90| 6f 74 20 62 65 20 6e 75 | 6c 6c 20 74 65 72 6d 69 |ot be nu|ll termi| |00004aa0| 6e 61 74 65 64 20 2a 2f | 0d 20 20 20 20 6e 65 77 |nated */|. new| |00004ab0| 61 64 64 72 5b 6c 65 6e | 5d 20 3d 20 27 5c 30 27 |addr[len|] = '\0'| |00004ac0| 3b 09 09 2f 2a 20 69 73 | 20 6e 6f 77 20 2a 2f 0d |;../* is| now */.| |00004ad0| 20 20 20 20 72 65 74 75 | 72 6e 20 6e 65 77 61 64 | retu|rn newad| |00004ae0| 64 72 3b 0d 7d 0d 0d 2f | 2a 20 67 72 6f 77 20 61 |dr;.}../|* grow a| |00004af0| 20 73 74 61 74 69 63 20 | 73 74 72 69 6e 67 20 74 | static |string t| |00004b00| 6f 20 61 74 20 6c 65 61 | 73 74 20 61 20 63 65 72 |o at lea|st a cer| |00004b10| 74 61 69 6e 20 6c 65 6e | 67 74 68 20 2a 2f 0d 0d |tain len|gth */..| |00004b20| 76 6f 69 64 0d 67 72 6f | 77 73 74 72 28 73 74 72 |void.gro|wstr(str| |00004b30| 70 74 72 2c 63 75 72 6c | 65 6e 2c 6e 65 77 6c 65 |ptr,curl|en,newle| |00004b40| 6e 29 0d 63 68 61 72 20 | 2a 2a 73 74 72 70 74 72 |n).char |**strptr| |00004b50| 3b 0d 69 6e 74 20 2a 63 | 75 72 6c 65 6e 3b 0d 69 |;.int *c|urlen;.i| |00004b60| 6e 74 20 6e 65 77 6c 65 | 6e 3b 0d 7b 0d 20 20 20 |nt newle|n;.{. | |00004b70| 20 69 66 20 28 6e 65 77 | 6c 65 6e 20 3e 20 2a 63 | if (new|len > *c| |00004b80| 75 72 6c 65 6e 29 20 7b | 09 09 2f 2a 20 6e 65 65 |urlen) {|../* nee| |00004b90| 64 20 6d 6f 72 65 20 72 | 6f 6f 6d 3f 20 2a 2f 0d |d more r|oom? */.| |00004ba0| 09 69 66 20 28 2a 63 75 | 72 6c 65 6e 29 0d 09 20 |.if (*cu|rlen).. | |00004bb0| 20 20 20 52 65 6e 65 77 | 28 2a 73 74 72 70 74 72 | Renew|(*strptr| |00004bc0| 2c 6e 65 77 6c 65 6e 2c | 63 68 61 72 29 3b 0d 09 |,newlen,|char);..| |00004bd0| 65 6c 73 65 0d 09 20 20 | 20 20 4e 65 77 28 39 30 |else.. | New(90| |00004be0| 35 2c 2a 73 74 72 70 74 | 72 2c 6e 65 77 6c 65 6e |5,*strpt|r,newlen| |00004bf0| 2c 63 68 61 72 29 3b 0d | 09 2a 63 75 72 6c 65 6e |,char);.|.*curlen| |00004c00| 20 3d 20 6e 65 77 6c 65 | 6e 3b 0d 20 20 20 20 7d | = newle|n;. }| |00004c10| 0d 7d 0d 0d 23 69 66 64 | 65 66 20 6d 61 63 69 6e |.}..#ifd|ef macin| |00004c20| 74 6f 73 68 0d 0d 63 68 | 61 72 20 67 50 73 65 75 |tosh..ch|ar gPseu| |00004c30| 64 6f 46 69 6c 65 4e 61 | 6d 65 5b 32 35 36 5d 3b |doFileNa|me[256];| |00004c40| 0d 0d 63 68 61 72 20 2a | 20 4d 50 57 46 69 6c 65 |..char *| MPWFile| |00004c50| 4e 61 6d 65 28 63 68 61 | 72 20 2a 20 66 69 6c 65 |Name(cha|r * file| |00004c60| 29 0d 7b 0d 20 20 20 20 | 69 66 20 28 21 73 74 72 |).{. |if (!str| |00004c70| 63 6d 70 28 66 69 6c 65 | 2c 20 22 44 65 76 3a 50 |cmp(file|, "Dev:P| |00004c80| 73 65 75 64 6f 22 29 29 | 0d 20 20 20 20 09 72 65 |seudo"))|. .re| |00004c90| 74 75 72 6e 20 67 50 73 | 65 75 64 6f 46 69 6c 65 |turn gPs|eudoFile| |00004ca0| 4e 61 6d 65 3b 0d 20 20 | 20 20 65 6c 73 65 20 69 |Name;. | else i| |00004cb0| 66 20 28 21 73 74 72 6e | 63 6d 70 28 66 69 6c 65 |f (!strn|cmp(file| |00004cc0| 2c 20 22 44 65 76 3a 50 | 73 65 75 64 6f 3a 22 2c |, "Dev:P|seudo:",| |00004cd0| 20 31 31 29 29 0d 20 20 | 20 20 09 72 65 74 75 72 | 11)). | .retur| |00004ce0| 6e 20 66 69 6c 65 20 2b | 20 31 31 3b 0d 20 20 20 |n file +| 11;. | |00004cf0| 20 65 6c 73 65 0d 20 20 | 20 20 09 72 65 74 75 72 | else. | .retur| |00004d00| 6e 20 66 69 6c 65 3b 0d | 7d 0d 0d 63 68 61 72 20 |n file;.|}..char | |00004d10| 2a 20 4d 50 57 50 6f 73 | 49 6e 64 69 63 61 74 69 |* MPWPos|Indicati| |00004d20| 6f 6e 28 63 68 61 72 20 | 2a 20 62 75 66 2c 20 63 |on(char |* buf, c| |00004d30| 68 61 72 20 2a 20 66 69 | 6c 65 2c 20 6c 6f 6e 67 |har * fi|le, long| |00004d40| 20 6c 69 6e 65 29 0d 7b | 0d 20 20 20 20 73 74 72 | line).{|. str| |00004d50| 63 70 79 28 62 75 66 2c | 20 22 46 69 6c 65 20 27 |cpy(buf,| "File '| |00004d60| 22 29 3b 20 0d 20 20 20 | 20 62 75 66 20 2b 3d 20 |"); . | buf += | |00004d70| 36 3b 0d 20 20 20 20 0d | 20 20 20 20 66 69 6c 65 |6;. .| file| |00004d80| 20 3d 20 4d 50 57 46 69 | 6c 65 4e 61 6d 65 28 66 | = MPWFi|leName(f| |00004d90| 69 6c 65 29 3b 0d 20 20 | 20 20 0d 20 20 20 20 77 |ile);. | . w| |00004da0| 68 69 6c 65 20 28 2a 66 | 69 6c 65 29 20 0d 20 20 |hile (*f|ile) . | |00004db0| 20 20 09 69 66 20 28 2a | 66 69 6c 65 20 3d 3d 20 | .if (*|file == | |00004dc0| 27 5c 27 27 29 20 7b 0d | 09 20 20 20 20 73 74 72 |'\'') {.|. str| |00004dd0| 63 70 79 28 62 75 66 2c | 20 22 27 b6 27 27 22 29 |cpy(buf,| "'.''")| |00004de0| 3b 0d 09 20 20 20 20 62 | 75 66 20 2b 3d 20 33 3b |;.. b|uf += 3;| |00004df0| 0d 09 20 20 20 20 2b 2b | 66 69 6c 65 3b 0d 09 7d |.. ++|file;..}| |00004e00| 20 65 6c 73 65 0d 09 20 | 20 20 20 2a 62 75 66 2b | else.. | *buf+| |00004e10| 2b 20 3d 20 2a 66 69 6c | 65 2b 2b 3b 0d 09 20 20 |+ = *fil|e++;.. | |00004e20| 20 20 0d 20 20 20 20 69 | 66 20 28 62 75 66 5b 2d | . i|f (buf[-| |00004e30| 31 5d 20 3d 3d 20 27 5c | 27 27 20 26 26 20 62 75 |1] == '\|'' && bu| |00004e40| 66 5b 2d 32 5d 20 3d 3d | 20 27 5c 27 27 29 0d 20 |f[-2] ==| '\''). | |00004e50| 20 20 20 09 2d 2d 62 75 | 66 3b 0d 20 20 20 20 65 | .--bu|f;. e| |00004e60| 6c 73 65 0d 20 20 20 20 | 09 2a 62 75 66 2b 2b 20 |lse. |.*buf++ | |00004e70| 3d 20 27 5c 27 27 3b 0d | 0d 20 20 20 20 72 65 74 |= '\'';.|. ret| |00004e80| 75 72 6e 20 62 75 66 20 | 2b 20 73 70 72 69 6e 74 |urn buf |+ sprint| |00004e90| 66 28 62 75 66 2c 20 22 | 3b 20 4c 69 6e 65 20 25 |f(buf, "|; Line %| |00004ea0| 6c 64 22 2c 20 6c 69 6e | 65 29 3b 0d 7d 0d 23 65 |ld", lin|e);.}.#e| |00004eb0| 6e 64 69 66 0d 0d 23 69 | 66 6e 64 65 66 20 49 5f |ndif..#i|fndef I_| |00004ec0| 56 41 52 41 52 47 53 0d | 2f 2a 56 41 52 41 52 47 |VARARGS.|/*VARARG| |00004ed0| 53 31 2a 2f 0d 63 68 61 | 72 20 2a 0d 6d 65 73 73 |S1*/.cha|r *.mess| |00004ee0| 28 70 61 74 2c 61 31 2c | 61 32 2c 61 33 2c 61 34 |(pat,a1,|a2,a3,a4| |00004ef0| 29 0d 63 68 61 72 20 2a | 70 61 74 3b 0d 6c 6f 6e |).char *|pat;.lon| |00004f00| 67 20 61 31 2c 20 61 32 | 2c 20 61 33 2c 20 61 34 |g a1, a2|, a3, a4| |00004f10| 3b 0d 7b 0d 20 20 20 20 | 63 68 61 72 20 2a 73 3b |;.{. |char *s;| |00004f20| 0d 20 20 20 20 69 6e 74 | 20 75 73 65 72 6d 65 73 |. int| usermes| |00004f30| 73 20 3d 20 73 74 72 45 | 51 28 70 61 74 2c 22 25 |s = strE|Q(pat,"%| |00004f40| 73 22 29 3b 0d 20 20 20 | 20 53 54 52 20 2a 74 6d |s");. | STR *tm| |00004f50| 70 73 74 72 3b 0d 0d 20 | 20 20 20 73 20 3d 20 62 |pstr;.. | s = b| |00004f60| 75 66 3b 0d 23 69 66 64 | 65 66 20 6d 61 63 69 6e |uf;.#ifd|ef macin| |00004f70| 74 6f 73 68 0d 20 20 20 | 20 69 66 20 28 75 73 65 |tosh. | if (use| |00004f80| 72 6d 65 73 73 29 20 7b | 0d 09 74 6d 70 73 74 72 |rmess) {|..tmpstr| |00004f90| 20 3d 20 73 74 72 5f 6d | 6f 72 74 61 6c 28 26 73 | = str_m|ortal(&s| |00004fa0| 74 72 5f 75 6e 64 65 66 | 29 3b 0d 09 73 74 72 5f |tr_undef|);..str_| |00004fb0| 73 65 74 28 74 6d 70 73 | 74 72 2c 20 22 23 20 22 |set(tmps|tr, "# "| |00004fc0| 29 3b 0d 09 73 74 72 5f | 63 61 74 28 74 6d 70 73 |);..str_|cat(tmps| |00004fd0| 74 72 2c 20 28 63 68 61 | 72 2a 29 61 31 29 3b 0d |tr, (cha|r*)a1);.| |00004fe0| 09 2a 73 2b 2b 20 3d 20 | 74 6d 70 73 74 72 2d 3e |.*s++ = |tmpstr->| |00004ff0| 73 74 72 5f 70 74 72 5b | 74 6d 70 73 74 72 2d 3e |str_ptr[|tmpstr->| |00005000| 73 74 72 5f 63 75 72 2d | 31 5d 3b 0d 20 20 20 20 |str_cur-|1];. | |00005010| 7d 0d 20 20 20 20 65 6c | 73 65 20 7b 0d 20 20 20 |}. el|se {. | |00005020| 20 09 28 76 6f 69 64 29 | 20 73 70 72 69 6e 74 66 | .(void)| sprintf| |00005030| 28 62 75 66 2c 20 22 23 | 20 22 29 3b 0d 20 20 20 |(buf, "#| ");. | |00005040| 20 09 73 20 2b 3d 20 32 | 3b 0d 09 28 76 6f 69 64 | .s += 2|;..(void| |00005050| 29 73 70 72 69 6e 74 66 | 28 73 2c 70 61 74 2c 61 |)sprintf|(s,pat,a| |00005060| 31 2c 61 32 2c 61 33 2c | 61 34 29 3b 0d 09 73 20 |1,a2,a3,|a4);..s | |00005070| 2b 3d 20 73 74 72 6c 65 | 6e 28 73 29 3b 0d 20 20 |+= strle|n(s);. | |00005080| 20 20 7d 0d 23 65 6c 73 | 65 0d 20 20 20 20 69 66 | }.#els|e. if| |00005090| 20 28 75 73 65 72 6d 65 | 73 73 29 20 7b 0d 09 74 | (userme|ss) {..t| |000050a0| 6d 70 73 74 72 20 3d 20 | 73 74 72 5f 6d 6f 72 74 |mpstr = |str_mort| |000050b0| 61 6c 28 26 73 74 72 5f | 75 6e 64 65 66 29 3b 0d |al(&str_|undef);.| |000050c0| 09 73 74 72 5f 73 65 74 | 28 74 6d 70 73 74 72 2c |.str_set|(tmpstr,| |000050d0| 20 28 63 68 61 72 2a 29 | 61 31 29 3b 0d 09 2a 73 | (char*)|a1);..*s| |000050e0| 2b 2b 20 3d 20 74 6d 70 | 73 74 72 2d 3e 73 74 72 |++ = tmp|str->str| |000050f0| 5f 70 74 72 5b 74 6d 70 | 73 74 72 2d 3e 73 74 72 |_ptr[tmp|str->str| |00005100| 5f 63 75 72 2d 31 5d 3b | 0d 20 20 20 20 7d 0d 20 |_cur-1];|. }. | |00005110| 20 20 20 65 6c 73 65 20 | 7b 0d 09 28 76 6f 69 64 | else |{..(void| |00005120| 29 73 70 72 69 6e 74 66 | 28 73 2c 70 61 74 2c 61 |)sprintf|(s,pat,a| |00005130| 31 2c 61 32 2c 61 33 2c | 61 34 29 3b 0d 09 73 20 |1,a2,a3,|a4);..s | |00005140| 2b 3d 20 73 74 72 6c 65 | 6e 28 73 29 3b 0d 20 20 |+= strle|n(s);. | |00005150| 20 20 7d 0d 23 65 6e 64 | 69 66 0d 0d 20 20 20 20 | }.#end|if.. | |00005160| 69 66 20 28 73 5b 2d 31 | 5d 20 21 3d 20 27 5c 6e |if (s[-1|] != '\n| |00005170| 27 29 20 7b 0d 23 69 66 | 64 65 66 20 6d 61 63 69 |') {.#if|def maci| |00005180| 6e 74 6f 73 68 0d 09 69 | 66 20 28 6c 61 73 74 5f |ntosh..i|f (last_| |00005190| 69 6e 5f 73 74 61 62 20 | 26 26 0d 09 20 20 20 20 |in_stab |&&.. | |000051a0| 73 74 61 62 5f 69 6f 28 | 6c 61 73 74 5f 69 6e 5f |stab_io(|last_in_| |000051b0| 73 74 61 62 29 20 26 26 | 0d 09 20 20 20 20 73 74 |stab) &&|.. st| |000051c0| 61 62 5f 69 6f 28 6c 61 | 73 74 5f 69 6e 5f 73 74 |ab_io(la|st_in_st| |000051d0| 61 62 29 2d 3e 6c 69 6e | 65 73 20 29 20 7b 0d 09 |ab)->lin|es ) {..| |000051e0| 20 20 20 20 69 66 20 28 | 73 5b 2d 31 5d 20 21 3d | if (|s[-1] !=| |000051f0| 20 27 2e 27 29 0d 09 20 | 20 20 20 09 2a 73 2b 2b | '.').. | .*s++| |00005200| 20 3d 20 27 2e 27 3b 0d | 09 20 20 20 20 28 76 6f | = '.';.|. (vo| |00005210| 69 64 29 73 70 72 69 6e | 74 66 28 73 2c 22 20 49 |id)sprin|tf(s," I| |00005220| 6e 70 75 74 20 66 72 6f | 6d 20 3c 25 73 3e 2c 20 |nput fro|m <%s>, | |00005230| 6c 69 6e 65 20 25 6c 64 | 22 2c 0d 09 20 20 20 20 |line %ld|",.. | |00005240| 20 20 6c 61 73 74 5f 69 | 6e 5f 73 74 61 62 20 3d | last_i|n_stab =| |00005250| 3d 20 61 72 67 76 73 74 | 61 62 20 3f 20 22 22 20 |= argvst|ab ? "" | |00005260| 3a 20 73 74 61 62 5f 6e | 61 6d 65 28 6c 61 73 74 |: stab_n|ame(last| |00005270| 5f 69 6e 5f 73 74 61 62 | 29 2c 0d 09 20 20 20 20 |_in_stab|),.. | |00005280| 20 20 28 6c 6f 6e 67 29 | 73 74 61 62 5f 69 6f 28 | (long)|stab_io(| |00005290| 6c 61 73 74 5f 69 6e 5f | 73 74 61 62 29 2d 3e 6c |last_in_|stab)->l| |000052a0| 69 6e 65 73 29 3b 0d 09 | 20 20 20 20 73 20 2b 3d |ines);..| s +=| |000052b0| 20 73 74 72 6c 65 6e 28 | 73 29 3b 0d 09 7d 0d 09 | strlen(|s);..}..| |000052c0| 69 66 20 28 63 75 72 63 | 6d 64 2d 3e 63 5f 6c 69 |if (curc|md->c_li| |000052d0| 6e 65 29 20 7b 0d 09 20 | 20 20 20 73 5b 30 5d 20 |ne) {.. | s[0] | |000052e0| 3d 20 27 5c 6e 27 3b 0d | 09 20 20 20 20 73 20 3d |= '\n';.|. s =| |000052f0| 20 4d 50 57 50 6f 73 49 | 6e 64 69 63 61 74 69 6f | MPWPosI|ndicatio| |00005300| 6e 28 0d 09 20 20 20 20 | 09 20 20 20 20 73 2b 31 |n(.. |. s+1| |00005310| 2c 20 0d 09 09 20 20 20 | 20 73 74 61 62 5f 76 61 |, ... | stab_va| |00005320| 6c 28 63 75 72 63 6d 64 | 2d 3e 63 5f 66 69 6c 65 |l(curcmd|->c_file| |00005330| 73 74 61 62 29 2d 3e 73 | 74 72 5f 70 74 72 2c 20 |stab)->s|tr_ptr, | |00005340| 0d 09 09 20 20 20 20 28 | 6c 6f 6e 67 29 63 75 72 |... (|long)cur| |00005350| 63 6d 64 2d 3e 63 5f 6c | 69 6e 65 29 3b 0d 09 7d |cmd->c_l|ine);..}| |00005360| 0d 09 28 76 6f 69 64 29 | 73 74 72 63 70 79 28 73 |..(void)|strcpy(s| |00005370| 2c 22 5c 6e 22 29 3b 0d | 23 65 6c 73 65 0d 09 69 |,"\n");.|#else..i| |00005380| 66 20 28 63 75 72 63 6d | 64 2d 3e 63 5f 6c 69 6e |f (curcm|d->c_lin| |00005390| 65 29 20 7b 0d 09 20 20 | 20 20 28 76 6f 69 64 29 |e) {.. | (void)| |000053a0| 73 70 72 69 6e 74 66 28 | 73 2c 22 20 61 74 20 25 |sprintf(|s," at %| |000053b0| 73 20 6c 69 6e 65 20 25 | 6c 64 22 2c 0d 09 20 20 |s line %|ld",.. | |000053c0| 20 20 20 20 73 74 61 62 | 5f 76 61 6c 28 63 75 72 | stab|_val(cur| |000053d0| 63 6d 64 2d 3e 63 5f 66 | 69 6c 65 73 74 61 62 29 |cmd->c_f|ilestab)| |000053e0| 2d 3e 73 74 72 5f 70 74 | 72 2c 20 28 6c 6f 6e 67 |->str_pt|r, (long| |000053f0| 29 63 75 72 63 6d 64 2d | 3e 63 5f 6c 69 6e 65 29 |)curcmd-|>c_line)| |00005400| 3b 0d 09 20 20 20 20 73 | 20 2b 3d 20 73 74 72 6c |;.. s| += strl| |00005410| 65 6e 28 73 29 3b 0d 09 | 7d 0d 09 69 66 20 28 6c |en(s);..|}..if (l| |00005420| 61 73 74 5f 69 6e 5f 73 | 74 61 62 20 26 26 0d 09 |ast_in_s|tab &&..| |00005430| 20 20 20 20 73 74 61 62 | 5f 69 6f 28 6c 61 73 74 | stab|_io(last| |00005440| 5f 69 6e 5f 73 74 61 62 | 29 20 26 26 0d 09 20 20 |_in_stab|) &&.. | |00005450| 20 20 73 74 61 62 5f 69 | 6f 28 6c 61 73 74 5f 69 | stab_i|o(last_i| |00005460| 6e 5f 73 74 61 62 29 2d | 3e 6c 69 6e 65 73 20 29 |n_stab)-|>lines )| |00005470| 20 7b 0d 09 20 20 20 20 | 28 76 6f 69 64 29 73 70 | {.. |(void)sp| |00005480| 72 69 6e 74 66 28 73 2c | 22 2c 20 3c 25 73 3e 20 |rintf(s,|", <%s> | |00005490| 6c 69 6e 65 20 25 6c 64 | 22 2c 0d 09 20 20 20 20 |line %ld|",.. | |000054a0| 20 20 6c 61 73 74 5f 69 | 6e 5f 73 74 61 62 20 3d | last_i|n_stab =| |000054b0| 3d 20 61 72 67 76 73 74 | 61 62 20 3f 20 22 22 20 |= argvst|ab ? "" | |000054c0| 3a 20 73 74 61 62 5f 65 | 6e 61 6d 65 28 6c 61 73 |: stab_e|name(las| |000054d0| 74 5f 69 6e 5f 73 74 61 | 62 29 2c 0d 09 20 20 20 |t_in_sta|b),.. | |000054e0| 20 20 20 28 6c 6f 6e 67 | 29 73 74 61 62 5f 69 6f | (long|)stab_io| |000054f0| 28 6c 61 73 74 5f 69 6e | 5f 73 74 61 62 29 2d 3e |(last_in|_stab)->| |00005500| 6c 69 6e 65 73 29 3b 0d | 09 20 20 20 20 73 20 2b |lines);.|. s +| |00005510| 3d 20 73 74 72 6c 65 6e | 28 73 29 3b 0d 09 7d 0d |= strlen|(s);..}.| |00005520| 09 28 76 6f 69 64 29 73 | 74 72 63 70 79 28 73 2c |.(void)s|trcpy(s,| |00005530| 22 2e 5c 6e 22 29 3b 0d | 23 65 6e 64 69 66 0d 09 |".\n");.|#endif..| |00005540| 69 66 20 28 75 73 65 72 | 6d 65 73 73 29 0d 09 20 |if (user|mess).. | |00005550| 20 20 20 73 74 72 5f 63 | 61 74 28 74 6d 70 73 74 | str_c|at(tmpst| |00005560| 72 2c 62 75 66 2b 31 29 | 3b 0d 20 20 20 20 7d 0d |r,buf+1)|;. }.| |00005570| 20 20 20 20 69 66 20 28 | 75 73 65 72 6d 65 73 73 | if (|usermess| |00005580| 29 0d 09 72 65 74 75 72 | 6e 20 74 6d 70 73 74 72 |)..retur|n tmpstr| |00005590| 2d 3e 73 74 72 5f 70 74 | 72 3b 0d 20 20 20 20 65 |->str_pt|r;. e| |000055a0| 6c 73 65 0d 09 72 65 74 | 75 72 6e 20 62 75 66 3b |lse..ret|urn buf;| |000055b0| 0d 7d 0d 0d 2f 2a 56 41 | 52 41 52 47 53 31 2a 2f |.}../*VA|RARGS1*/| |000055c0| 0d 76 6f 69 64 20 66 61 | 74 61 6c 28 70 61 74 2c |.void fa|tal(pat,| |000055d0| 61 31 2c 61 32 2c 61 33 | 2c 61 34 29 0d 63 68 61 |a1,a2,a3|,a4).cha| |000055e0| 72 20 2a 70 61 74 3b 0d | 6c 6f 6e 67 20 61 31 2c |r *pat;.|long a1,| |000055f0| 20 61 32 2c 20 61 33 2c | 20 61 34 3b 0d 7b 0d 20 | a2, a3,| a4;.{. | |00005600| 20 20 20 65 78 74 65 72 | 6e 20 46 49 4c 45 20 2a | exter|n FILE *| |00005610| 65 5f 66 70 3b 0d 20 20 | 20 20 65 78 74 65 72 6e |e_fp;. | extern| |00005620| 20 63 68 61 72 20 2a 65 | 5f 74 6d 70 6e 61 6d 65 | char *e|_tmpname| |00005630| 3b 0d 20 20 20 20 63 68 | 61 72 20 2a 74 6d 70 73 |;. ch|ar *tmps| |00005640| 3b 0d 20 20 20 20 63 68 | 61 72 20 2a 6d 65 73 73 |;. ch|ar *mess| |00005650| 61 67 65 3b 0d 0d 20 20 | 20 20 6d 65 73 73 61 67 |age;.. | messag| |00005660| 65 20 3d 20 6d 65 73 73 | 28 70 61 74 2c 61 31 2c |e = mess|(pat,a1,| |00005670| 61 32 2c 61 33 2c 61 34 | 29 3b 0d 20 20 20 20 69 |a2,a3,a4|);. i| |00005680| 66 20 28 69 6e 5f 65 76 | 61 6c 29 20 7b 0d 09 73 |f (in_ev|al) {..s| |00005690| 74 72 5f 73 65 74 28 73 | 74 61 62 5f 76 61 6c 28 |tr_set(s|tab_val(| |000056a0| 73 74 61 62 65 6e 74 28 | 22 40 22 2c 54 52 55 45 |stabent(|"@",TRUE| |000056b0| 29 29 2c 6d 65 73 73 61 | 67 65 29 3b 0d 09 74 6d |)),messa|ge);..tm| |000056c0| 70 73 20 3d 20 22 5f 45 | 56 41 4c 5f 22 3b 0d 09 |ps = "_E|VAL_";..| |000056d0| 77 68 69 6c 65 20 28 6c | 6f 6f 70 5f 70 74 72 20 |while (l|oop_ptr | |000056e0| 3e 3d 20 30 20 26 26 20 | 28 21 6c 6f 6f 70 5f 73 |>= 0 && |(!loop_s| |000056f0| 74 61 63 6b 5b 6c 6f 6f | 70 5f 70 74 72 5d 2e 6c |tack[loo|p_ptr].l| |00005700| 6f 6f 70 5f 6c 61 62 65 | 6c 20 7c 7c 0d 09 20 20 |oop_labe|l ||.. | |00005710| 73 74 72 4e 45 28 74 6d | 70 73 2c 6c 6f 6f 70 5f |strNE(tm|ps,loop_| |00005720| 73 74 61 63 6b 5b 6c 6f | 6f 70 5f 70 74 72 5d 2e |stack[lo|op_ptr].| |00005730| 6c 6f 6f 70 5f 6c 61 62 | 65 6c 29 20 29 29 20 7b |loop_lab|el) )) {| |00005740| 0d 23 69 66 64 65 66 20 | 44 45 42 55 47 47 49 4e |.#ifdef |DEBUGGIN| |00005750| 47 0d 09 20 20 20 20 69 | 66 20 28 64 65 62 75 67 |G.. i|f (debug| |00005760| 20 26 20 34 29 20 7b 0d | 09 09 64 65 62 28 22 28 | & 4) {.|..deb("(| |00005770| 53 6b 69 70 70 69 6e 67 | 20 6c 61 62 65 6c 20 23 |Skipping| label #| |00005780| 25 64 20 25 73 29 5c 6e | 22 2c 6c 6f 6f 70 5f 70 |%d %s)\n|",loop_p| |00005790| 74 72 2c 0d 09 09 20 20 | 20 20 6c 6f 6f 70 5f 73 |tr,... | loop_s| |000057a0| 74 61 63 6b 5b 6c 6f 6f | 70 5f 70 74 72 5d 2e 6c |tack[loo|p_ptr].l| |000057b0| 6f 6f 70 5f 6c 61 62 65 | 6c 29 3b 0d 09 20 20 20 |oop_labe|l);.. | |000057c0| 20 7d 0d 23 65 6e 64 69 | 66 0d 09 20 20 20 20 6c | }.#endi|f.. l| |000057d0| 6f 6f 70 5f 70 74 72 2d | 2d 3b 0d 09 7d 0d 23 69 |oop_ptr-|-;..}.#i| |000057e0| 66 64 65 66 20 44 45 42 | 55 47 47 49 4e 47 0d 09 |fdef DEB|UGGING..| |000057f0| 69 66 20 28 64 65 62 75 | 67 20 26 20 34 29 20 7b |if (debu|g & 4) {| |00005800| 0d 09 20 20 20 20 64 65 | 62 28 22 28 46 6f 75 6e |.. de|b("(Foun| |00005810| 64 20 6c 61 62 65 6c 20 | 23 25 64 20 25 73 29 5c |d label |#%d %s)\| |00005820| 6e 22 2c 6c 6f 6f 70 5f | 70 74 72 2c 0d 09 09 6c |n",loop_|ptr,...l| |00005830| 6f 6f 70 5f 73 74 61 63 | 6b 5b 6c 6f 6f 70 5f 70 |oop_stac|k[loop_p| |00005840| 74 72 5d 2e 6c 6f 6f 70 | 5f 6c 61 62 65 6c 29 3b |tr].loop|_label);| |00005850| 0d 09 7d 0d 23 65 6e 64 | 69 66 0d 09 69 66 20 28 |..}.#end|if..if (| |00005860| 6c 6f 6f 70 5f 70 74 72 | 20 3c 20 30 29 20 7b 0d |loop_ptr| < 0) {.| |00005870| 09 20 20 20 20 69 6e 5f | 65 76 61 6c 20 3d 20 30 |. in_|eval = 0| |00005880| 3b 0d 09 20 20 20 20 66 | 61 74 61 6c 28 22 42 61 |;.. f|atal("Ba| |00005890| 64 20 6c 61 62 65 6c 3a | 20 25 73 22 2c 20 74 6d |d label:| %s", tm| |000058a0| 70 73 29 3b 0d 09 7d 0d | 09 6c 6f 6e 67 6a 6d 70 |ps);..}.|.longjmp| |000058b0| 28 6c 6f 6f 70 5f 73 74 | 61 63 6b 5b 6c 6f 6f 70 |(loop_st|ack[loop| |000058c0| 5f 70 74 72 5d 2e 6c 6f | 6f 70 5f 65 6e 76 2c 20 |_ptr].lo|op_env, | |000058d0| 31 29 3b 0d 20 20 20 20 | 7d 0d 20 20 20 20 66 70 |1);. |}. fp| |000058e0| 75 74 73 28 6d 65 73 73 | 61 67 65 2c 73 74 64 65 |uts(mess|age,stde| |000058f0| 72 72 29 3b 0d 20 20 20 | 20 28 76 6f 69 64 29 66 |rr);. | (void)f| |00005900| 66 6c 75 73 68 28 73 74 | 64 65 72 72 29 3b 0d 20 |flush(st|derr);. | |00005910| 20 20 20 69 66 20 28 65 | 5f 66 70 29 0d 09 28 76 | if (e|_fp)..(v| |00005920| 6f 69 64 29 55 4e 4c 49 | 4e 4b 28 65 5f 74 6d 70 |oid)UNLI|NK(e_tmp| |00005930| 6e 61 6d 65 29 3b 0d 20 | 20 20 20 73 74 61 74 75 |name);. | statu| |00005940| 73 76 61 6c 75 65 20 3e | 3e 3d 20 38 3b 0d 20 20 |svalue >|>= 8;. | |00005950| 20 20 65 78 69 74 28 28 | 69 6e 74 29 28 28 65 72 | exit((|int)((er| |00005960| 72 6e 6f 26 32 35 35 29 | 3f 65 72 72 6e 6f 3a 28 |rno&255)|?errno:(| |00005970| 28 73 74 61 74 75 73 76 | 61 6c 75 65 26 32 35 35 |(statusv|alue&255| |00005980| 29 3f 73 74 61 74 75 73 | 76 61 6c 75 65 3a 32 35 |)?status|value:25| |00005990| 35 29 29 29 3b 0d 7d 0d | 0d 2f 2a 56 41 52 41 52 |5)));.}.|./*VARAR| |000059a0| 47 53 31 2a 2f 0d 76 6f | 69 64 20 77 61 72 6e 28 |GS1*/.vo|id warn(| |000059b0| 70 61 74 2c 61 31 2c 61 | 32 2c 61 33 2c 61 34 29 |pat,a1,a|2,a3,a4)| |000059c0| 0d 63 68 61 72 20 2a 70 | 61 74 3b 0d 6c 6f 6e 67 |.char *p|at;.long| |000059d0| 20 61 31 2c 20 61 32 2c | 20 61 33 2c 20 61 34 3b | a1, a2,| a3, a4;| |000059e0| 0d 7b 0d 20 20 20 20 63 | 68 61 72 20 2a 6d 65 73 |.{. c|har *mes| |000059f0| 73 61 67 65 3b 0d 0d 20 | 20 20 20 6d 65 73 73 61 |sage;.. | messa| |00005a00| 67 65 20 3d 20 6d 65 73 | 73 28 70 61 74 2c 61 31 |ge = mes|s(pat,a1| |00005a10| 2c 61 32 2c 61 33 2c 61 | 34 29 3b 0d 20 20 20 20 |,a2,a3,a|4);. | |00005a20| 66 70 75 74 73 28 6d 65 | 73 73 61 67 65 2c 73 74 |fputs(me|ssage,st| |00005a30| 64 65 72 72 29 3b 0d 23 | 69 66 64 65 66 20 4c 45 |derr);.#|ifdef LE| |00005a40| 41 4b 54 45 53 54 0d 23 | 69 66 64 65 66 20 44 45 |AKTEST.#|ifdef DE| |00005a50| 42 55 47 47 49 4e 47 0d | 20 20 20 20 69 66 20 28 |BUGGING.| if (| |00005a60| 64 65 62 75 67 20 26 20 | 34 30 39 36 29 0d 09 78 |debug & |4096)..x| |00005a70| 73 74 61 74 28 29 3b 0d | 23 65 6e 64 69 66 0d 23 |stat();.|#endif.#| |00005a80| 65 6e 64 69 66 0d 20 20 | 20 20 28 76 6f 69 64 29 |endif. | (void)| |00005a90| 66 66 6c 75 73 68 28 73 | 74 64 65 72 72 29 3b 0d |fflush(s|tderr);.| |00005aa0| 7d 0d 23 65 6c 73 65 0d | 2f 2a 56 41 52 41 52 47 |}.#else.|/*VARARG| |00005ab0| 53 30 2a 2f 0d 63 68 61 | 72 20 2a 0d 6d 65 73 73 |S0*/.cha|r *.mess| |00005ac0| 28 61 72 67 73 29 0d 76 | 61 5f 6c 69 73 74 20 61 |(args).v|a_list a| |00005ad0| 72 67 73 3b 0d 7b 0d 20 | 20 20 20 63 68 61 72 20 |rgs;.{. | char | |00005ae0| 2a 70 61 74 3b 0d 20 20 | 20 20 63 68 61 72 20 2a |*pat;. | char *| |00005af0| 73 3b 0d 20 20 20 20 53 | 54 52 20 2a 74 6d 70 73 |s;. S|TR *tmps| |00005b00| 74 72 3b 0d 20 20 20 20 | 69 6e 74 20 75 73 65 72 |tr;. |int user| |00005b10| 6d 65 73 73 3b 0d 23 69 | 66 6e 64 65 66 20 48 41 |mess;.#i|fndef HA| |00005b20| 53 5f 56 50 52 49 4e 54 | 46 0d 23 69 66 64 65 66 |S_VPRINT|F.#ifdef| |00005b30| 20 43 48 41 52 56 53 50 | 52 49 4e 54 46 0d 20 20 | CHARVSP|RINTF. | |00005b40| 20 20 63 68 61 72 20 2a | 76 73 70 72 69 6e 74 66 | char *|vsprintf| |00005b50| 28 29 3b 0d 23 65 6c 73 | 65 0d 20 20 20 20 69 6e |();.#els|e. in| |00005b60| 74 20 76 73 70 72 69 6e | 74 66 28 29 3b 0d 23 65 |t vsprin|tf();.#e| |00005b70| 6e 64 69 66 0d 23 65 6e | 64 69 66 0d 0d 23 69 66 |ndif.#en|dif..#if| |00005b80| 64 65 66 20 6c 69 6e 74 | 0d 20 20 20 20 70 61 74 |def lint|. pat| |00005b90| 20 3d 20 4e 75 6c 6c 63 | 68 3b 0d 23 65 6c 73 65 | = Nullc|h;.#else| |00005ba0| 0d 20 20 20 20 70 61 74 | 20 3d 20 76 61 5f 61 72 |. pat| = va_ar| |00005bb0| 67 28 61 72 67 73 2c 20 | 63 68 61 72 20 2a 29 3b |g(args, |char *);| |00005bc0| 0d 23 65 6e 64 69 66 0d | 20 20 20 20 73 20 3d 20 |.#endif.| s = | |00005bd0| 62 75 66 3b 0d 20 20 20 | 20 75 73 65 72 6d 65 73 |buf;. | usermes| |00005be0| 73 20 3d 20 73 74 72 45 | 51 28 70 61 74 2c 20 22 |s = strE|Q(pat, "| |00005bf0| 25 73 22 29 3b 0d 20 20 | 20 20 69 66 20 28 75 73 |%s");. | if (us| |00005c00| 65 72 6d 65 73 73 29 20 | 7b 0d 09 74 6d 70 73 74 |ermess) |{..tmpst| |00005c10| 72 20 3d 20 73 74 72 5f | 6d 6f 72 74 61 6c 28 26 |r = str_|mortal(&| |00005c20| 73 74 72 5f 75 6e 64 65 | 66 29 3b 0d 09 73 74 72 |str_unde|f);..str| |00005c30| 5f 73 65 74 28 74 6d 70 | 73 74 72 2c 20 76 61 5f |_set(tmp|str, va_| |00005c40| 61 72 67 28 61 72 67 73 | 2c 20 63 68 61 72 20 2a |arg(args|, char *| |00005c50| 29 29 3b 0d 09 2a 73 2b | 2b 20 3d 20 74 6d 70 73 |));..*s+|+ = tmps| |00005c60| 74 72 2d 3e 73 74 72 5f | 70 74 72 5b 74 6d 70 73 |tr->str_|ptr[tmps| |00005c70| 74 72 2d 3e 73 74 72 5f | 63 75 72 2d 31 5d 3b 0d |tr->str_|cur-1];.| |00005c80| 20 20 20 20 7d 0d 20 20 | 20 20 65 6c 73 65 20 7b | }. | else {| |00005c90| 0d 09 28 76 6f 69 64 29 | 20 76 73 70 72 69 6e 74 |..(void)| vsprint| |00005ca0| 66 28 73 2c 70 61 74 2c | 61 72 67 73 29 3b 0d 09 |f(s,pat,|args);..| |00005cb0| 73 20 2b 3d 20 73 74 72 | 6c 65 6e 28 73 29 3b 0d |s += str|len(s);.| |00005cc0| 20 20 20 20 7d 0d 0d 20 | 20 20 20 69 66 20 28 73 | }.. | if (s| |00005cd0| 5b 2d 31 5d 20 21 3d 20 | 27 5c 6e 27 29 20 7b 0d |[-1] != |'\n') {.| |00005ce0| 09 69 66 20 28 63 75 72 | 63 6d 64 2d 3e 63 5f 6c |.if (cur|cmd->c_l| |00005cf0| 69 6e 65 29 20 7b 0d 09 | 20 20 20 20 28 76 6f 69 |ine) {..| (voi| |00005d00| 64 29 73 70 72 69 6e 74 | 66 28 73 2c 22 20 61 74 |d)sprint|f(s," at| |00005d10| 20 25 73 20 6c 69 6e 65 | 20 25 6c 64 22 2c 0d 09 | %s line| %ld",..| |00005d20| 20 20 20 20 20 20 73 74 | 61 62 5f 76 61 6c 28 63 | st|ab_val(c| |00005d30| 75 72 63 6d 64 2d 3e 63 | 5f 66 69 6c 65 73 74 61 |urcmd->c|_filesta| |00005d40| 62 29 2d 3e 73 74 72 5f | 70 74 72 2c 20 28 6c 6f |b)->str_|ptr, (lo| |00005d50| 6e 67 29 63 75 72 63 6d | 64 2d 3e 63 5f 6c 69 6e |ng)curcm|d->c_lin| |00005d60| 65 29 3b 0d 09 20 20 20 | 20 73 20 2b 3d 20 73 74 |e);.. | s += st| |00005d70| 72 6c 65 6e 28 73 29 3b | 0d 09 7d 0d 09 69 66 20 |rlen(s);|..}..if | |00005d80| 28 6c 61 73 74 5f 69 6e | 5f 73 74 61 62 20 26 26 |(last_in|_stab &&| |00005d90| 0d 09 20 20 20 20 73 74 | 61 62 5f 69 6f 28 6c 61 |.. st|ab_io(la| |00005da0| 73 74 5f 69 6e 5f 73 74 | 61 62 29 20 26 26 0d 09 |st_in_st|ab) &&..| |00005db0| 20 20 20 20 73 74 61 62 | 5f 69 6f 28 6c 61 73 74 | stab|_io(last| |00005dc0| 5f 69 6e 5f 73 74 61 62 | 29 2d 3e 6c 69 6e 65 73 |_in_stab|)->lines| |00005dd0| 20 29 20 7b 0d 09 20 20 | 20 20 28 76 6f 69 64 29 | ) {.. | (void)| |00005de0| 73 70 72 69 6e 74 66 28 | 73 2c 22 2c 20 3c 25 73 |sprintf(|s,", <%s| |00005df0| 3e 20 6c 69 6e 65 20 25 | 6c 64 22 2c 0d 09 20 20 |> line %|ld",.. | |00005e00| 20 20 20 20 6c 61 73 74 | 5f 69 6e 5f 73 74 61 62 | last|_in_stab| |00005e10| 20 3d 3d 20 61 72 67 76 | 73 74 61 62 20 3f 20 22 | == argv|stab ? "| |00005e20| 22 20 3a 20 6c 61 73 74 | 5f 69 6e 5f 73 74 61 62 |" : last|_in_stab| |00005e30| 2d 3e 73 74 72 5f 6d 61 | 67 69 63 2d 3e 73 74 72 |->str_ma|gic->str| |00005e40| 5f 70 74 72 2c 0d 09 20 | 20 20 20 20 20 28 6c 6f |_ptr,.. | (lo| |00005e50| 6e 67 29 73 74 61 62 5f | 69 6f 28 6c 61 73 74 5f |ng)stab_|io(last_| |00005e60| 69 6e 5f 73 74 61 62 29 | 2d 3e 6c 69 6e 65 73 29 |in_stab)|->lines)| |00005e70| 3b 0d 09 20 20 20 20 73 | 20 2b 3d 20 73 74 72 6c |;.. s| += strl| |00005e80| 65 6e 28 73 29 3b 0d 09 | 7d 0d 09 28 76 6f 69 64 |en(s);..|}..(void| |00005e90| 29 73 74 72 63 70 79 28 | 73 2c 22 2e 5c 6e 22 29 |)strcpy(|s,".\n")| |00005ea0| 3b 0d 09 69 66 20 28 75 | 73 65 72 6d 65 73 73 29 |;..if (u|sermess)| |00005eb0| 0d 09 20 20 20 20 73 74 | 72 5f 63 61 74 28 74 6d |.. st|r_cat(tm| |00005ec0| 70 73 74 72 2c 62 75 66 | 2b 31 29 3b 0d 20 20 20 |pstr,buf|+1);. | |00005ed0| 20 7d 0d 0d 20 20 20 20 | 69 66 20 28 75 73 65 72 | }.. |if (user| |00005ee0| 6d 65 73 73 29 0d 09 72 | 65 74 75 72 6e 20 74 6d |mess)..r|eturn tm| |00005ef0| 70 73 74 72 2d 3e 73 74 | 72 5f 70 74 72 3b 0d 20 |pstr->st|r_ptr;. | |00005f00| 20 20 20 65 6c 73 65 0d | 09 72 65 74 75 72 6e 20 | else.|.return | |00005f10| 62 75 66 3b 0d 7d 0d 0d | 2f 2a 56 41 52 41 52 47 |buf;.}..|/*VARARG| |00005f20| 53 30 2a 2f 0d 76 6f 69 | 64 20 66 61 74 61 6c 28 |S0*/.voi|d fatal(| |00005f30| 76 61 5f 61 6c 69 73 74 | 29 0d 76 61 5f 64 63 6c |va_alist|).va_dcl| |00005f40| 0d 7b 0d 20 20 20 20 76 | 61 5f 6c 69 73 74 20 61 |.{. v|a_list a| |00005f50| 72 67 73 3b 0d 20 20 20 | 20 65 78 74 65 72 6e 20 |rgs;. | extern | |00005f60| 46 49 4c 45 20 2a 65 5f | 66 70 3b 0d 20 20 20 20 |FILE *e_|fp;. | |00005f70| 65 78 74 65 72 6e 20 63 | 68 61 72 20 2a 65 5f 74 |extern c|har *e_t| |00005f80| 6d 70 6e 61 6d 65 3b 0d | 20 20 20 20 63 68 61 72 |mpname;.| char| |00005f90| 20 2a 74 6d 70 73 3b 0d | 20 20 20 20 63 68 61 72 | *tmps;.| char| |00005fa0| 20 2a 6d 65 73 73 61 67 | 65 3b 0d 0d 23 69 66 6e | *messag|e;..#ifn| |00005fb0| 64 65 66 20 6c 69 6e 74 | 0d 20 20 20 20 76 61 5f |def lint|. va_| |00005fc0| 73 74 61 72 74 28 61 72 | 67 73 29 3b 0d 23 65 6c |start(ar|gs);.#el| |00005fd0| 73 65 0d 20 20 20 20 61 | 72 67 73 20 3d 20 30 3b |se. a|rgs = 0;| |00005fe0| 0d 23 65 6e 64 69 66 0d | 20 20 20 20 6d 65 73 73 |.#endif.| mess| |00005ff0| 61 67 65 20 3d 20 6d 65 | 73 73 28 61 72 67 73 29 |age = me|ss(args)| |00006000| 3b 0d 20 20 20 20 76 61 | 5f 65 6e 64 28 61 72 67 |;. va|_end(arg| |00006010| 73 29 3b 0d 20 20 20 20 | 69 66 20 28 69 6e 5f 65 |s);. |if (in_e| |00006020| 76 61 6c 29 20 7b 0d 09 | 73 74 72 5f 73 65 74 28 |val) {..|str_set(| |00006030| 73 74 61 62 5f 76 61 6c | 28 73 74 61 62 65 6e 74 |stab_val|(stabent| |00006040| 28 22 40 22 2c 54 52 55 | 45 29 29 2c 6d 65 73 73 |("@",TRU|E)),mess| |00006050| 61 67 65 29 3b 0d 09 74 | 6d 70 73 20 3d 20 22 5f |age);..t|mps = "_| |00006060| 45 56 41 4c 5f 22 3b 0d | 09 77 68 69 6c 65 20 28 |EVAL_";.|.while (| |00006070| 6c 6f 6f 70 5f 70 74 72 | 20 3e 3d 20 30 20 26 26 |loop_ptr| >= 0 &&| |00006080| 20 28 21 6c 6f 6f 70 5f | 73 74 61 63 6b 5b 6c 6f | (!loop_|stack[lo| |00006090| 6f 70 5f 70 74 72 5d 2e | 6c 6f 6f 70 5f 6c 61 62 |op_ptr].|loop_lab| |000060a0| 65 6c 20 7c 7c 0d 09 20 | 20 73 74 72 4e 45 28 74 |el ||.. | strNE(t| |000060b0| 6d 70 73 2c 6c 6f 6f 70 | 5f 73 74 61 63 6b 5b 6c |mps,loop|_stack[l| |000060c0| 6f 6f 70 5f 70 74 72 5d | 2e 6c 6f 6f 70 5f 6c 61 |oop_ptr]|.loop_la| |000060d0| 62 65 6c 29 20 29 29 20 | 7b 0d 23 69 66 64 65 66 |bel) )) |{.#ifdef| |000060e0| 20 44 45 42 55 47 47 49 | 4e 47 0d 09 20 20 20 20 | DEBUGGI|NG.. | |000060f0| 69 66 20 28 64 65 62 75 | 67 20 26 20 34 29 20 7b |if (debu|g & 4) {| |00006100| 0d 09 09 64 65 62 28 22 | 28 53 6b 69 70 70 69 6e |...deb("|(Skippin| |00006110| 67 20 6c 61 62 65 6c 20 | 23 25 64 20 25 73 29 5c |g label |#%d %s)\| |00006120| 6e 22 2c 6c 6f 6f 70 5f | 70 74 72 2c 0d 09 09 20 |n",loop_|ptr,... | |00006130| 20 20 20 6c 6f 6f 70 5f | 73 74 61 63 6b 5b 6c 6f | loop_|stack[lo| |00006140| 6f 70 5f 70 74 72 5d 2e | 6c 6f 6f 70 5f 6c 61 62 |op_ptr].|loop_lab| |00006150| 65 6c 29 3b 0d 09 20 20 | 20 20 7d 0d 23 65 6e 64 |el);.. | }.#end| |00006160| 69 66 0d 09 20 20 20 20 | 6c 6f 6f 70 5f 70 74 72 |if.. |loop_ptr| |00006170| 2d 2d 3b 0d 09 7d 0d 23 | 69 66 64 65 66 20 44 45 |--;..}.#|ifdef DE| |00006180| 42 55 47 47 49 4e 47 0d | 09 69 66 20 28 64 65 62 |BUGGING.|.if (deb| |00006190| 75 67 20 26 20 34 29 20 | 7b 0d 09 20 20 20 20 64 |ug & 4) |{.. d| |000061a0| 65 62 28 22 28 46 6f 75 | 6e 64 20 6c 61 62 65 6c |eb("(Fou|nd label| |000061b0| 20 23 25 64 20 25 73 29 | 5c 6e 22 2c 6c 6f 6f 70 | #%d %s)|\n",loop| |000061c0| 5f 70 74 72 2c 0d 09 09 | 6c 6f 6f 70 5f 73 74 61 |_ptr,...|loop_sta| |000061d0| 63 6b 5b 6c 6f 6f 70 5f | 70 74 72 5d 2e 6c 6f 6f |ck[loop_|ptr].loo| |000061e0| 70 5f 6c 61 62 65 6c 29 | 3b 0d 09 7d 0d 23 65 6e |p_label)|;..}.#en| |000061f0| 64 69 66 0d 09 69 66 20 | 28 6c 6f 6f 70 5f 70 74 |dif..if |(loop_pt| |00006200| 72 20 3c 20 30 29 20 7b | 0d 09 20 20 20 20 69 6e |r < 0) {|.. in| |00006210| 5f 65 76 61 6c 20 3d 20 | 30 3b 0d 09 20 20 20 20 |_eval = |0;.. | |00006220| 66 61 74 61 6c 28 22 42 | 61 64 20 6c 61 62 65 6c |fatal("B|ad label| |00006230| 3a 20 25 73 22 2c 20 74 | 6d 70 73 29 3b 0d 09 7d |: %s", t|mps);..}| |00006240| 0d 09 6c 6f 6e 67 6a 6d | 70 28 6c 6f 6f 70 5f 73 |..longjm|p(loop_s| |00006250| 74 61 63 6b 5b 6c 6f 6f | 70 5f 70 74 72 5d 2e 6c |tack[loo|p_ptr].l| |00006260| 6f 6f 70 5f 65 6e 76 2c | 20 31 29 3b 0d 20 20 20 |oop_env,| 1);. | |00006270| 20 7d 0d 20 20 20 20 66 | 70 75 74 73 28 6d 65 73 | }. f|puts(mes| |00006280| 73 61 67 65 2c 73 74 64 | 65 72 72 29 3b 0d 20 20 |sage,std|err);. | |00006290| 20 20 28 76 6f 69 64 29 | 66 66 6c 75 73 68 28 73 | (void)|fflush(s| |000062a0| 74 64 65 72 72 29 3b 0d | 20 20 20 20 69 66 20 28 |tderr);.| if (| |000062b0| 65 5f 66 70 29 0d 09 28 | 76 6f 69 64 29 55 4e 4c |e_fp)..(|void)UNL| |000062c0| 49 4e 4b 28 65 5f 74 6d | 70 6e 61 6d 65 29 3b 0d |INK(e_tm|pname);.| |000062d0| 20 20 20 20 73 74 61 74 | 75 73 76 61 6c 75 65 20 | stat|usvalue | |000062e0| 3e 3e 3d 20 38 3b 0d 20 | 20 20 20 65 78 69 74 28 |>>= 8;. | exit(| |000062f0| 28 69 6e 74 29 28 28 65 | 72 72 6e 6f 26 32 35 35 |(int)((e|rrno&255| |00006300| 29 3f 65 72 72 6e 6f 3a | 28 28 73 74 61 74 75 73 |)?errno:|((status| |00006310| 76 61 6c 75 65 26 32 35 | 35 29 3f 73 74 61 74 75 |value&25|5)?statu| |00006320| 73 76 61 6c 75 65 3a 32 | 35 35 29 29 29 3b 0d 7d |svalue:2|55)));.}| |00006330| 0d 0d 2f 2a 56 41 52 41 | 52 47 53 30 2a 2f 0d 76 |../*VARA|RGS0*/.v| |00006340| 6f 69 64 20 77 61 72 6e | 28 76 61 5f 61 6c 69 73 |oid warn|(va_alis| |00006350| 74 29 0d 76 61 5f 64 63 | 6c 0d 7b 0d 20 20 20 20 |t).va_dc|l.{. | |00006360| 76 61 5f 6c 69 73 74 20 | 61 72 67 73 3b 0d 20 20 |va_list |args;. | |00006370| 20 20 63 68 61 72 20 2a | 6d 65 73 73 61 67 65 3b | char *|message;| |00006380| 0d 0d 23 69 66 6e 64 65 | 66 20 6c 69 6e 74 0d 20 |..#ifnde|f lint. | |00006390| 20 20 20 76 61 5f 73 74 | 61 72 74 28 61 72 67 73 | va_st|art(args| |000063a0| 29 3b 0d 23 65 6c 73 65 | 0d 20 20 20 20 61 72 67 |);.#else|. arg| |000063b0| 73 20 3d 20 30 3b 0d 23 | 65 6e 64 69 66 0d 20 20 |s = 0;.#|endif. | |000063c0| 20 20 6d 65 73 73 61 67 | 65 20 3d 20 6d 65 73 73 | messag|e = mess| |000063d0| 28 61 72 67 73 29 3b 0d | 20 20 20 20 76 61 5f 65 |(args);.| va_e| |000063e0| 6e 64 28 61 72 67 73 29 | 3b 0d 0d 20 20 20 20 66 |nd(args)|;.. f| |000063f0| 70 75 74 73 28 6d 65 73 | 73 61 67 65 2c 73 74 64 |puts(mes|sage,std| +--------+-------------------------+-------------------------+--------+--------+ Only 25.0 KB of data is shown above.