home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / unix_c / gnu / epoch.tar < prev    next >
Tape Archive  |  1992-04-21  |  11.3 MB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: Tape Archive (archive/tar).

You can browse this item here: epoch.tar

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Tape Archive (archive/tar) magic Supported
100% file tar archive default
99% file tar archive (V7), file epoch-4.0p0/, mode 775 , uid 5224 , gid 116 , size 0 , seconds 5164644744 default
98% file data default
100% lsar Tar default
100% gt2 TAR Archiv gefunden (Auflistung ist deaktiviert) default
100% disktype Pre-POSIX tar archive default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 65 70 6f 63 68 2d 34 2e | 30 70 30 2f 00 00 00 00 |epoch-4.|0p0/....|
|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 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000050| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000060| 00 00 00 00 20 20 20 37 | 37 35 20 00 20 20 35 32 |.... 7|75 . 52|
|00000070| 32 34 20 00 20 20 20 31 | 31 36 20 00 20 20 20 20 |24 . 1|16 . |
|00000080| 20 20 20 20 20 20 30 20 | 20 35 31 36 34 36 34 34 | 0 | 5164644|
|00000090| 37 34 34 20 20 20 35 37 | 34 32 00 20 00 00 00 00 |744 57|42. ....|
|000000a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000100| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000110| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000120| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000130| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000140| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000150| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000180| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000190| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000200| 65 70 6f 63 68 2d 34 2e | 30 70 30 2f 63 70 70 2f |epoch-4.|0p0/cpp/|
|00000210| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000220| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000230| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000240| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000250| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000260| 00 00 00 00 20 20 20 37 | 37 35 20 00 20 20 35 32 |.... 7|75 . 52|
|00000270| 32 34 20 00 20 20 20 31 | 31 36 20 00 20 20 20 20 |24 . 1|16 . |
|00000280| 20 20 20 20 20 20 30 20 | 20 35 31 36 33 34 30 34 | 0 | 5163404|
|00000290| 36 35 37 20 20 20 36 35 | 32 30 00 20 00 00 00 00 |657 65|20. ....|
|000002a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000300| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000310| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000320| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000330| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000340| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000350| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000360| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000370| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000380| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000390| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000400| 65 70 6f 63 68 2d 34 2e | 30 70 30 2f 63 70 70 2f |epoch-4.|0p0/cpp/|
|00000410| 4d 61 6b 65 66 69 6c 65 | 00 00 00 00 00 00 00 00 |Makefile|........|
|00000420| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000430| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000440| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000450| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000460| 00 00 00 00 20 20 20 36 | 34 34 20 00 20 20 35 32 |.... 6|44 . 52|
|00000470| 32 34 20 00 20 20 20 31 | 31 36 20 00 20 20 20 20 |24 . 1|16 . |
|00000480| 20 20 20 31 30 33 33 20 | 20 35 31 36 33 34 30 32 | 1033 | 5163402|
|00000490| 35 34 37 20 20 31 30 32 | 33 34 00 20 00 00 00 00 |547 102|34. ....|
|000004a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000500| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000510| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000520| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000530| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000540| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000550| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000560| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000570| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000580| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000590| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000600| 23 20 4d 61 6b 65 66 69 | 6c 65 20 66 6f 72 20 63 |# Makefi|le for c|
|00000610| 63 63 70 20 69 6e 20 74 | 68 65 20 45 6d 61 63 73 |ccp in t|he Emacs|
|00000620| 20 64 69 73 74 72 69 62 | 75 74 69 6f 6e 20 6f 6e | distrib|ution on|
|00000630| 6c 79 2e 0a 23 20 48 65 | 72 65 20 77 65 20 61 73 |ly..# He|re we as|
|00000640| 73 75 6d 65 20 74 68 61 | 74 20 79 6f 75 20 61 72 |sume tha|t you ar|
|00000650| 65 20 75 73 69 6e 67 20 | 73 79 73 20 56 2e 30 0a |e using |sys V.0.|
|00000660| 23 20 28 73 69 6e 63 65 | 20 63 63 63 70 20 69 73 |# (since| cccp is|
|00000670| 20 75 73 65 64 20 62 79 | 20 45 6d 61 63 73 20 6f | used by| Emacs o|
|00000680| 6e 6c 79 20 74 6f 20 64 | 65 61 6c 20 77 69 74 68 |nly to d|eal with|
|00000690| 20 73 68 6f 72 74 6e 61 | 6d 65 73 20 6c 6f 73 73 | shortna|mes loss|
|000006a0| 61 67 65 29 2e 0a 23 20 | 54 68 65 72 65 66 6f 72 |age)..# |Therefor|
|000006b0| 65 2c 20 77 65 20 61 64 | 64 20 2d 44 45 4d 41 43 |e, we ad|d -DEMAC|
|000006c0| 53 20 74 6f 20 43 46 4c | 41 47 53 20 61 6e 64 20 |S to CFL|AGS and |
|000006d0| 61 64 64 20 2d 6c 50 57 | 20 74 6f 20 6c 69 6e 6b |add -lPW| to link|
|000006e0| 69 6e 67 2e 0a 0a 43 46 | 4c 41 47 53 3d 2d 67 20 |ing...CF|LAGS=-g |
|000006f0| 2d 49 2e 20 2d 44 45 4d | 41 43 53 0a 63 70 70 3a |-I. -DEM|ACS.cpp:|
|00000700| 20 63 63 63 70 0a 09 2d | 72 6d 20 63 70 70 0a 09 | cccp..-|rm cpp..|
|00000710| 6c 6e 20 63 63 63 70 20 | 63 70 70 0a 63 63 63 70 |ln cccp |cpp.cccp|
|00000720| 3a 20 63 63 63 70 2e 6f | 20 79 2e 74 61 62 2e 6f |: cccp.o| y.tab.o|
|00000730| 0a 09 63 63 20 2d 6f 20 | 63 63 63 70 20 2d 67 20 |..cc -o |cccp -g |
|00000740| 63 63 63 70 2e 6f 20 79 | 2e 74 61 62 2e 6f 20 2d |cccp.o y|.tab.o -|
|00000750| 6c 50 57 0a 74 65 73 74 | 65 78 70 3a 20 79 2e 74 |lPW.test|exp: y.t|
|00000760| 61 62 2e 63 0a 09 63 63 | 20 2d 67 20 2d 44 54 45 |ab.c..cc| -g -DTE|
|00000770| 53 54 5f 45 58 50 5f 52 | 45 41 44 45 52 20 79 2e |ST_EXP_R|EADER y.|
|00000780| 74 61 62 2e 63 20 2d 6f | 20 74 65 73 74 65 78 70 |tab.c -o| testexp|
|00000790| 0a 79 2e 74 61 62 2e 63 | 3a 20 63 65 78 70 2e 79 |.y.tab.c|: cexp.y|
|000007a0| 0a 09 65 63 68 6f 20 65 | 78 70 65 63 74 20 34 30 |..echo e|xpect 40|
|000007b0| 20 73 68 69 66 74 2f 72 | 65 64 75 63 65 20 63 6f | shift/r|educe co|
|000007c0| 6e 66 6c 69 63 74 73 0a | 09 79 61 63 63 20 63 65 |nflicts.|.yacc ce|
|000007d0| 78 70 2e 79 0a 63 63 63 | 70 2e 6f 3a 20 63 63 63 |xp.y.ccc|p.o: ccc|
|000007e0| 70 2e 63 0a 79 2e 74 61 | 62 2e 6f 3a 20 79 2e 74 |p.c.y.ta|b.o: y.t|
|000007f0| 61 62 2e 63 0a 6c 69 6e | 74 3a 09 79 2e 74 61 62 |ab.c.lin|t:.y.tab|
|00000800| 2e 63 0a 09 6c 69 6e 74 | 20 2d 70 20 79 2e 74 61 |.c..lint| -p y.ta|
|00000810| 62 2e 63 20 63 63 63 70 | 2e 63 0a 00 00 00 00 00 |b.c cccp|.c......|
|00000820| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000830| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000840| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000850| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000860| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000870| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000880| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000890| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000900| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000910| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000920| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000930| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000940| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000950| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000960| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000970| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000980| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000990| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000a00| 65 70 6f 63 68 2d 34 2e | 30 70 30 2f 63 70 70 2f |epoch-4.|0p0/cpp/|
|00000a10| 63 63 63 70 2e 63 00 00 | 00 00 00 00 00 00 00 00 |cccp.c..|........|
|00000a20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000a30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000a40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000a50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000a60| 00 00 00 00 20 20 20 36 | 34 34 20 00 20 20 35 32 |.... 6|44 . 52|
|00000a70| 32 34 20 00 20 20 20 31 | 31 36 20 00 20 20 20 20 |24 . 1|16 . |
|00000a80| 20 31 37 37 32 30 36 20 | 20 35 31 36 33 34 30 32 | 177206 | 5163402|
|00000a90| 35 35 30 20 20 20 37 37 | 32 32 00 20 00 00 00 00 |550 77|22. ....|
|00000aa0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ab0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ac0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ad0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ae0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000af0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b00| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ba0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000bb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000bc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000bd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000be0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000bf0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000c00| 2f 2a 20 43 20 43 6f 6d | 70 61 74 69 62 6c 65 20 |/* C Com|patible |
|00000c10| 43 6f 6d 70 69 6c 65 72 | 20 50 72 65 70 72 6f 63 |Compiler| Preproc|
|00000c20| 65 73 73 6f 72 20 28 43 | 43 43 50 29 0a 43 6f 70 |essor (C|CCP).Cop|
|00000c30| 79 72 69 67 68 74 20 28 | 43 29 20 31 39 38 36 2c |yright (|C) 1986,|
|00000c40| 20 46 72 65 65 20 53 6f | 66 74 77 61 72 65 20 46 | Free So|ftware F|
|00000c50| 6f 75 6e 64 61 74 69 6f | 6e 2c 20 49 6e 63 2e 0a |oundatio|n, Inc..|
|00000c60| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000c70| 20 20 20 20 57 72 69 74 | 74 65 6e 20 62 79 20 50 | Writ|ten by P|
|00000c80| 61 75 6c 20 52 75 62 69 | 6e 2c 20 4a 75 6e 65 20 |aul Rubi|n, June |
|00000c90| 31 39 38 36 0a 0a 09 09 | 20 20 20 20 20 20 20 4e |1986....| N|
|00000ca0| 4f 20 57 41 52 52 41 4e | 54 59 0a 0a 20 20 42 45 |O WARRAN|TY.. BE|
|00000cb0| 43 41 55 53 45 20 54 48 | 49 53 20 50 52 4f 47 52 |CAUSE TH|IS PROGR|
|00000cc0| 41 4d 20 49 53 20 4c 49 | 43 45 4e 53 45 44 20 46 |AM IS LI|CENSED F|
|00000cd0| 52 45 45 20 4f 46 20 43 | 48 41 52 47 45 2c 20 57 |REE OF C|HARGE, W|
|00000ce0| 45 20 50 52 4f 56 49 44 | 45 20 41 42 53 4f 4c 55 |E PROVID|E ABSOLU|
|00000cf0| 54 45 4c 59 0a 4e 4f 20 | 57 41 52 52 41 4e 54 59 |TELY.NO |WARRANTY|
|00000d00| 2c 20 54 4f 20 54 48 45 | 20 45 58 54 45 4e 54 20 |, TO THE| EXTENT |
|00000d10| 50 45 52 4d 49 54 54 45 | 44 20 42 59 20 41 50 50 |PERMITTE|D BY APP|
|00000d20| 4c 49 43 41 42 4c 45 20 | 53 54 41 54 45 20 4c 41 |LICABLE |STATE LA|
|00000d30| 57 2e 20 20 45 58 43 45 | 50 54 0a 57 48 45 4e 20 |W. EXCE|PT.WHEN |
|00000d40| 4f 54 48 45 52 57 49 53 | 45 20 53 54 41 54 45 44 |OTHERWIS|E STATED|
|00000d50| 20 49 4e 20 57 52 49 54 | 49 4e 47 2c 20 46 52 45 | IN WRIT|ING, FRE|
|00000d60| 45 20 53 4f 46 54 57 41 | 52 45 20 46 4f 55 4e 44 |E SOFTWA|RE FOUND|
|00000d70| 41 54 49 4f 4e 2c 20 49 | 4e 43 2c 0a 52 49 43 48 |ATION, I|NC,.RICH|
|00000d80| 41 52 44 20 4d 2e 20 53 | 54 41 4c 4c 4d 41 4e 20 |ARD M. S|TALLMAN |
|00000d90| 41 4e 44 2f 4f 52 20 4f | 54 48 45 52 20 50 41 52 |AND/OR O|THER PAR|
|00000da0| 54 49 45 53 20 50 52 4f | 56 49 44 45 20 54 48 49 |TIES PRO|VIDE THI|
|00000db0| 53 20 50 52 4f 47 52 41 | 4d 20 22 41 53 20 49 53 |S PROGRA|M "AS IS|
|00000dc0| 22 0a 57 49 54 48 4f 55 | 54 20 57 41 52 52 41 4e |".WITHOU|T WARRAN|
|00000dd0| 54 59 20 4f 46 20 41 4e | 59 20 4b 49 4e 44 2c 20 |TY OF AN|Y KIND, |
|00000de0| 45 49 54 48 45 52 20 45 | 58 50 52 45 53 53 45 44 |EITHER E|XPRESSED|
|00000df0| 20 4f 52 20 49 4d 50 4c | 49 45 44 2c 20 49 4e 43 | OR IMPL|IED, INC|
|00000e00| 4c 55 44 49 4e 47 2c 0a | 42 55 54 20 4e 4f 54 20 |LUDING,.|BUT NOT |
|00000e10| 4c 49 4d 49 54 45 44 20 | 54 4f 2c 20 54 48 45 20 |LIMITED |TO, THE |
|00000e20| 49 4d 50 4c 49 45 44 20 | 57 41 52 52 41 4e 54 49 |IMPLIED |WARRANTI|
|00000e30| 45 53 20 4f 46 20 4d 45 | 52 43 48 41 4e 54 41 42 |ES OF ME|RCHANTAB|
|00000e40| 49 4c 49 54 59 20 41 4e | 44 0a 46 49 54 4e 45 53 |ILITY AN|D.FITNES|
|00000e50| 53 20 46 4f 52 20 41 20 | 50 41 52 54 49 43 55 4c |S FOR A |PARTICUL|
|00000e60| 41 52 20 50 55 52 50 4f | 53 45 2e 20 20 54 48 45 |AR PURPO|SE. THE|
|00000e70| 20 45 4e 54 49 52 45 20 | 52 49 53 4b 20 41 53 20 | ENTIRE |RISK AS |
|00000e80| 54 4f 20 54 48 45 20 51 | 55 41 4c 49 54 59 0a 41 |TO THE Q|UALITY.A|
|00000e90| 4e 44 20 50 45 52 46 4f | 52 4d 41 4e 43 45 20 4f |ND PERFO|RMANCE O|
|00000ea0| 46 20 54 48 45 20 50 52 | 4f 47 52 41 4d 20 49 53 |F THE PR|OGRAM IS|
|00000eb0| 20 57 49 54 48 20 59 4f | 55 2e 20 20 53 48 4f 55 | WITH YO|U. SHOU|
|00000ec0| 4c 44 20 54 48 45 20 50 | 52 4f 47 52 41 4d 20 50 |LD THE P|ROGRAM P|
|00000ed0| 52 4f 56 45 0a 44 45 46 | 45 43 54 49 56 45 2c 20 |ROVE.DEF|ECTIVE, |
|00000ee0| 59 4f 55 20 41 53 53 55 | 4d 45 20 54 48 45 20 43 |YOU ASSU|ME THE C|
|00000ef0| 4f 53 54 20 4f 46 20 41 | 4c 4c 20 4e 45 43 45 53 |OST OF A|LL NECES|
|00000f00| 53 41 52 59 20 53 45 52 | 56 49 43 49 4e 47 2c 20 |SARY SER|VICING, |
|00000f10| 52 45 50 41 49 52 20 4f | 52 0a 43 4f 52 52 45 43 |REPAIR O|R.CORREC|
|00000f20| 54 49 4f 4e 2e 0a 0a 20 | 49 4e 20 4e 4f 20 45 56 |TION... |IN NO EV|
|00000f30| 45 4e 54 20 55 4e 4c 45 | 53 53 20 52 45 51 55 49 |ENT UNLE|SS REQUI|
|00000f40| 52 45 44 20 42 59 20 41 | 50 50 4c 49 43 41 42 4c |RED BY A|PPLICABL|
|00000f50| 45 20 4c 41 57 20 57 49 | 4c 4c 20 52 49 43 48 41 |E LAW WI|LL RICHA|
|00000f60| 52 44 20 4d 2e 0a 53 54 | 41 4c 4c 4d 41 4e 2c 20 |RD M..ST|ALLMAN, |
|00000f70| 54 48 45 20 46 52 45 45 | 20 53 4f 46 54 57 41 52 |THE FREE| SOFTWAR|
|00000f80| 45 20 46 4f 55 4e 44 41 | 54 49 4f 4e 2c 20 49 4e |E FOUNDA|TION, IN|
|00000f90| 43 2e 2c 20 41 4e 44 2f | 4f 52 20 41 4e 59 20 4f |C., AND/|OR ANY O|
|00000fa0| 54 48 45 52 20 50 41 52 | 54 59 0a 57 48 4f 20 4d |THER PAR|TY.WHO M|
|00000fb0| 41 59 20 4d 4f 44 49 46 | 59 20 41 4e 44 20 52 45 |AY MODIF|Y AND RE|
|00000fc0| 44 49 53 54 52 49 42 55 | 54 45 20 54 48 49 53 20 |DISTRIBU|TE THIS |
|00000fd0| 50 52 4f 47 52 41 4d 20 | 41 53 20 50 45 52 4d 49 |PROGRAM |AS PERMI|
|00000fe0| 54 54 45 44 20 42 45 4c | 4f 57 2c 20 42 45 0a 4c |TTED BEL|OW, BE.L|
|00000ff0| 49 41 42 4c 45 20 54 4f | 20 59 4f 55 20 46 4f 52 |IABLE TO| YOU FOR|
|00001000| 20 44 41 4d 41 47 45 53 | 2c 20 49 4e 43 4c 55 44 | DAMAGES|, INCLUD|
|00001010| 49 4e 47 20 41 4e 59 20 | 4c 4f 53 54 20 50 52 4f |ING ANY |LOST PRO|
|00001020| 46 49 54 53 2c 20 4c 4f | 53 54 20 4d 4f 4e 49 45 |FITS, LO|ST MONIE|
|00001030| 53 2c 20 4f 52 0a 4f 54 | 48 45 52 20 53 50 45 43 |S, OR.OT|HER SPEC|
|00001040| 49 41 4c 2c 20 49 4e 43 | 49 44 45 4e 54 41 4c 20 |IAL, INC|IDENTAL |
|00001050| 4f 52 20 43 4f 4e 53 45 | 51 55 45 4e 54 49 41 4c |OR CONSE|QUENTIAL|
|00001060| 20 44 41 4d 41 47 45 53 | 20 41 52 49 53 49 4e 47 | DAMAGES| ARISING|
|00001070| 20 4f 55 54 20 4f 46 20 | 54 48 45 0a 55 53 45 20 | OUT OF |THE.USE |
|00001080| 4f 52 20 49 4e 41 42 49 | 4c 49 54 59 20 54 4f 20 |OR INABI|LITY TO |
|00001090| 55 53 45 20 28 49 4e 43 | 4c 55 44 49 4e 47 20 42 |USE (INC|LUDING B|
|000010a0| 55 54 20 4e 4f 54 20 4c | 49 4d 49 54 45 44 20 54 |UT NOT L|IMITED T|
|000010b0| 4f 20 4c 4f 53 53 20 4f | 46 20 44 41 54 41 20 4f |O LOSS O|F DATA O|
|000010c0| 52 0a 44 41 54 41 20 42 | 45 49 4e 47 20 52 45 4e |R.DATA B|EING REN|
|000010d0| 44 45 52 45 44 20 49 4e | 41 43 43 55 52 41 54 45 |DERED IN|ACCURATE|
|000010e0| 20 4f 52 20 4c 4f 53 53 | 45 53 20 53 55 53 54 41 | OR LOSS|ES SUSTA|
|000010f0| 49 4e 45 44 20 42 59 20 | 54 48 49 52 44 20 50 41 |INED BY |THIRD PA|
|00001100| 52 54 49 45 53 20 4f 52 | 0a 41 20 46 41 49 4c 55 |RTIES OR|.A FAILU|
|00001110| 52 45 20 4f 46 20 54 48 | 45 20 50 52 4f 47 52 41 |RE OF TH|E PROGRA|
|00001120| 4d 20 54 4f 20 4f 50 45 | 52 41 54 45 20 57 49 54 |M TO OPE|RATE WIT|
|00001130| 48 20 41 4e 59 20 4f 54 | 48 45 52 20 50 52 4f 47 |H ANY OT|HER PROG|
|00001140| 52 41 4d 53 29 20 54 48 | 49 53 0a 50 52 4f 47 52 |RAMS) TH|IS.PROGR|
|00001150| 41 4d 2c 20 45 56 45 4e | 20 49 46 20 59 4f 55 20 |AM, EVEN| IF YOU |
|00001160| 48 41 56 45 20 42 45 45 | 4e 20 41 44 56 49 53 45 |HAVE BEE|N ADVISE|
|00001170| 44 20 4f 46 20 54 48 45 | 20 50 4f 53 53 49 42 49 |D OF THE| POSSIBI|
|00001180| 4c 49 54 59 20 4f 46 20 | 53 55 43 48 0a 44 41 4d |LITY OF |SUCH.DAM|
|00001190| 41 47 45 53 2c 20 4f 52 | 20 46 4f 52 20 41 4e 59 |AGES, OR| FOR ANY|
|000011a0| 20 43 4c 41 49 4d 20 42 | 59 20 41 4e 59 20 4f 54 | CLAIM B|Y ANY OT|
|000011b0| 48 45 52 20 50 41 52 54 | 59 2e 0a 0a 09 09 47 45 |HER PART|Y.....GE|
|000011c0| 4e 45 52 41 4c 20 50 55 | 42 4c 49 43 20 4c 49 43 |NERAL PU|BLIC LIC|
|000011d0| 45 4e 53 45 20 54 4f 20 | 43 4f 50 59 0a 0a 20 20 |ENSE TO |COPY.. |
|000011e0| 31 2e 20 59 6f 75 20 6d | 61 79 20 63 6f 70 79 20 |1. You m|ay copy |
|000011f0| 61 6e 64 20 64 69 73 74 | 72 69 62 75 74 65 20 76 |and dist|ribute v|
|00001200| 65 72 62 61 74 69 6d 20 | 63 6f 70 69 65 73 20 6f |erbatim |copies o|
|00001210| 66 20 74 68 69 73 20 73 | 6f 75 72 63 65 20 66 69 |f this s|ource fi|
|00001220| 6c 65 0a 61 73 20 79 6f | 75 20 72 65 63 65 69 76 |le.as yo|u receiv|
|00001230| 65 20 69 74 2c 20 69 6e | 20 61 6e 79 20 6d 65 64 |e it, in| any med|
|00001240| 69 75 6d 2c 20 70 72 6f | 76 69 64 65 64 20 74 68 |ium, pro|vided th|
|00001250| 61 74 20 79 6f 75 20 63 | 6f 6e 73 70 69 63 75 6f |at you c|onspicuo|
|00001260| 75 73 6c 79 0a 61 6e 64 | 20 61 70 70 72 6f 70 72 |usly.and| appropr|
|00001270| 69 61 74 65 6c 79 20 70 | 75 62 6c 69 73 68 20 6f |iately p|ublish o|
|00001280| 6e 20 65 61 63 68 20 63 | 6f 70 79 20 61 20 76 61 |n each c|opy a va|
|00001290| 6c 69 64 20 63 6f 70 79 | 72 69 67 68 74 20 6e 6f |lid copy|right no|
|000012a0| 74 69 63 65 0a 22 43 6f | 70 79 72 69 67 68 74 20 |tice."Co|pyright |
|000012b0| 28 43 29 20 31 39 38 36 | 20 46 72 65 65 20 53 6f |(C) 1986| Free So|
|000012c0| 66 74 77 61 72 65 20 46 | 6f 75 6e 64 61 74 69 6f |ftware F|oundatio|
|000012d0| 6e 22 3b 20 61 6e 64 20 | 69 6e 63 6c 75 64 65 0a |n"; and |include.|
|000012e0| 66 6f 6c 6c 6f 77 69 6e | 67 20 74 68 65 20 63 6f |followin|g the co|
|000012f0| 70 79 72 69 67 68 74 20 | 6e 6f 74 69 63 65 20 61 |pyright |notice a|
|00001300| 20 76 65 72 62 61 74 69 | 6d 20 63 6f 70 79 20 6f | verbati|m copy o|
|00001310| 66 20 74 68 65 20 61 62 | 6f 76 65 20 64 69 73 63 |f the ab|ove disc|
|00001320| 6c 61 69 6d 65 72 0a 6f | 66 20 77 61 72 72 61 6e |laimer.o|f warran|
|00001330| 74 79 20 61 6e 64 20 6f | 66 20 74 68 69 73 20 4c |ty and o|f this L|
|00001340| 69 63 65 6e 73 65 2e 0a | 0a 20 20 32 2e 20 59 6f |icense..|. 2. Yo|
|00001350| 75 20 6d 61 79 20 6d 6f | 64 69 66 79 20 79 6f 75 |u may mo|dify you|
|00001360| 72 20 63 6f 70 79 20 6f | 72 20 63 6f 70 69 65 73 |r copy o|r copies|
|00001370| 20 6f 66 20 74 68 69 73 | 20 73 6f 75 72 63 65 20 | of this| source |
|00001380| 66 69 6c 65 20 6f 72 0a | 61 6e 79 20 70 6f 72 74 |file or.|any port|
|00001390| 69 6f 6e 20 6f 66 20 69 | 74 2c 20 61 6e 64 20 63 |ion of i|t, and c|
|000013a0| 6f 70 79 20 61 6e 64 20 | 64 69 73 74 72 69 62 75 |opy and |distribu|
|000013b0| 74 65 20 73 75 63 68 20 | 6d 6f 64 69 66 69 63 61 |te such |modifica|
|000013c0| 74 69 6f 6e 73 20 75 6e | 64 65 72 0a 74 68 65 20 |tions un|der.the |
|000013d0| 74 65 72 6d 73 20 6f 66 | 20 50 61 72 61 67 72 61 |terms of| Paragra|
|000013e0| 70 68 20 31 20 61 62 6f | 76 65 2c 20 70 72 6f 76 |ph 1 abo|ve, prov|
|000013f0| 69 64 65 64 20 74 68 61 | 74 20 79 6f 75 20 61 6c |ided tha|t you al|
|00001400| 73 6f 20 64 6f 20 74 68 | 65 20 66 6f 6c 6c 6f 77 |so do th|e follow|
|00001410| 69 6e 67 3a 0a 0a 20 20 | 20 20 61 29 20 63 61 75 |ing:.. | a) cau|
|00001420| 73 65 20 74 68 65 20 6d | 6f 64 69 66 69 65 64 20 |se the m|odified |
|00001430| 66 69 6c 65 73 20 74 6f | 20 63 61 72 72 79 20 70 |files to| carry p|
|00001440| 72 6f 6d 69 6e 65 6e 74 | 20 6e 6f 74 69 63 65 73 |rominent| notices|
|00001450| 20 73 74 61 74 69 6e 67 | 0a 20 20 20 20 74 68 61 | stating|. tha|
|00001460| 74 20 79 6f 75 20 63 68 | 61 6e 67 65 64 20 74 68 |t you ch|anged th|
|00001470| 65 20 66 69 6c 65 73 20 | 61 6e 64 20 74 68 65 20 |e files |and the |
|00001480| 64 61 74 65 20 6f 66 20 | 61 6e 79 20 63 68 61 6e |date of |any chan|
|00001490| 67 65 3b 20 61 6e 64 0a | 0a 20 20 20 20 62 29 20 |ge; and.|. b) |
|000014a0| 63 61 75 73 65 20 74 68 | 65 20 77 68 6f 6c 65 20 |cause th|e whole |
|000014b0| 6f 66 20 61 6e 79 20 77 | 6f 72 6b 20 74 68 61 74 |of any w|ork that|
|000014c0| 20 79 6f 75 20 64 69 73 | 74 72 69 62 75 74 65 20 | you dis|tribute |
|000014d0| 6f 72 20 70 75 62 6c 69 | 73 68 2c 0a 20 20 20 20 |or publi|sh,. |
|000014e0| 74 68 61 74 20 69 6e 20 | 77 68 6f 6c 65 20 6f 72 |that in |whole or|
|000014f0| 20 69 6e 20 70 61 72 74 | 20 63 6f 6e 74 61 69 6e | in part| contain|
|00001500| 73 20 6f 72 20 69 73 20 | 61 20 64 65 72 69 76 61 |s or is |a deriva|
|00001510| 74 69 76 65 20 6f 66 20 | 74 68 69 73 0a 20 20 20 |tive of |this. |
|00001520| 20 70 72 6f 67 72 61 6d | 20 6f 72 20 61 6e 79 20 | program| or any |
|00001530| 70 61 72 74 20 74 68 65 | 72 65 6f 66 2c 20 74 6f |part the|reof, to|
|00001540| 20 62 65 20 6c 69 63 65 | 6e 73 65 64 20 61 74 20 | be lice|nsed at |
|00001550| 6e 6f 20 63 68 61 72 67 | 65 20 74 6f 20 61 6c 6c |no charg|e to all|
|00001560| 0a 20 20 20 20 74 68 69 | 72 64 20 70 61 72 74 69 |. thi|rd parti|
|00001570| 65 73 20 6f 6e 20 74 65 | 72 6d 73 20 69 64 65 6e |es on te|rms iden|
|00001580| 74 69 63 61 6c 20 74 6f | 20 74 68 6f 73 65 20 63 |tical to| those c|
|00001590| 6f 6e 74 61 69 6e 65 64 | 20 69 6e 20 74 68 69 73 |ontained| in this|
|000015a0| 0a 20 20 20 20 4c 69 63 | 65 6e 73 65 20 41 67 72 |. Lic|ense Agr|
|000015b0| 65 65 6d 65 6e 74 20 28 | 65 78 63 65 70 74 20 74 |eement (|except t|
|000015c0| 68 61 74 20 79 6f 75 20 | 6d 61 79 20 63 68 6f 6f |hat you |may choo|
|000015d0| 73 65 20 74 6f 20 67 72 | 61 6e 74 20 6d 6f 72 65 |se to gr|ant more|
|000015e0| 20 65 78 74 65 6e 73 69 | 76 65 0a 20 20 20 20 77 | extensi|ve. w|
|000015f0| 61 72 72 61 6e 74 79 20 | 70 72 6f 74 65 63 74 69 |arranty |protecti|
|00001600| 6f 6e 20 74 6f 20 73 6f | 6d 65 20 6f 72 20 61 6c |on to so|me or al|
|00001610| 6c 20 74 68 69 72 64 20 | 70 61 72 74 69 65 73 2c |l third |parties,|
|00001620| 20 61 74 20 79 6f 75 72 | 20 6f 70 74 69 6f 6e 29 | at your| option)|
|00001630| 2e 0a 0a 20 20 20 20 63 | 29 20 59 6f 75 20 6d 61 |... c|) You ma|
|00001640| 79 20 63 68 61 72 67 65 | 20 61 20 64 69 73 74 72 |y charge| a distr|
|00001650| 69 62 75 74 69 6f 6e 20 | 66 65 65 20 66 6f 72 20 |ibution |fee for |
|00001660| 74 68 65 20 70 68 79 73 | 69 63 61 6c 20 61 63 74 |the phys|ical act|
|00001670| 20 6f 66 0a 20 20 20 20 | 74 72 61 6e 73 66 65 72 | of. |transfer|
|00001680| 72 69 6e 67 20 61 20 63 | 6f 70 79 2c 20 61 6e 64 |ring a c|opy, and|
|00001690| 20 79 6f 75 20 6d 61 79 | 20 61 74 20 79 6f 75 72 | you may| at your|
|000016a0| 20 6f 70 74 69 6f 6e 20 | 6f 66 66 65 72 20 77 61 | option |offer wa|
|000016b0| 72 72 61 6e 74 79 0a 20 | 20 20 20 70 72 6f 74 65 |rranty. | prote|
|000016c0| 63 74 69 6f 6e 20 69 6e | 20 65 78 63 68 61 6e 67 |ction in| exchang|
|000016d0| 65 20 66 6f 72 20 61 20 | 66 65 65 2e 0a 0a 4d 65 |e for a |fee...Me|
|000016e0| 72 65 20 61 67 67 72 65 | 67 61 74 69 6f 6e 20 6f |re aggre|gation o|
|000016f0| 66 20 61 6e 6f 74 68 65 | 72 20 75 6e 72 65 6c 61 |f anothe|r unrela|
|00001700| 74 65 64 20 70 72 6f 67 | 72 61 6d 20 77 69 74 68 |ted prog|ram with|
|00001710| 20 74 68 69 73 20 70 72 | 6f 67 72 61 6d 20 28 6f | this pr|ogram (o|
|00001720| 72 20 69 74 73 0a 64 65 | 72 69 76 61 74 69 76 65 |r its.de|rivative|
|00001730| 29 20 6f 6e 20 61 20 76 | 6f 6c 75 6d 65 20 6f 66 |) on a v|olume of|
|00001740| 20 61 20 73 74 6f 72 61 | 67 65 20 6f 72 20 64 69 | a stora|ge or di|
|00001750| 73 74 72 69 62 75 74 69 | 6f 6e 20 6d 65 64 69 75 |stributi|on mediu|
|00001760| 6d 20 64 6f 65 73 20 6e | 6f 74 20 62 72 69 6e 67 |m does n|ot bring|
|00001770| 0a 74 68 65 20 6f 74 68 | 65 72 20 70 72 6f 67 72 |.the oth|er progr|
|00001780| 61 6d 20 75 6e 64 65 72 | 20 74 68 65 20 73 63 6f |am under| the sco|
|00001790| 70 65 20 6f 66 20 74 68 | 65 73 65 20 74 65 72 6d |pe of th|ese term|
|000017a0| 73 2e 0a 0a 20 20 33 2e | 20 59 6f 75 20 6d 61 79 |s... 3.| You may|
|000017b0| 20 63 6f 70 79 20 61 6e | 64 20 64 69 73 74 72 69 | copy an|d distri|
|000017c0| 62 75 74 65 20 74 68 69 | 73 20 70 72 6f 67 72 61 |bute thi|s progra|
|000017d0| 6d 20 28 6f 72 20 61 20 | 70 6f 72 74 69 6f 6e 20 |m (or a |portion |
|000017e0| 6f 72 20 64 65 72 69 76 | 61 74 69 76 65 0a 6f 66 |or deriv|ative.of|
|000017f0| 20 69 74 2c 20 75 6e 64 | 65 72 20 50 61 72 61 67 | it, und|er Parag|
|00001800| 72 61 70 68 20 32 29 20 | 69 6e 20 6f 62 6a 65 63 |raph 2) |in objec|
|00001810| 74 20 63 6f 64 65 20 6f | 72 20 65 78 65 63 75 74 |t code o|r execut|
|00001820| 61 62 6c 65 20 66 6f 72 | 6d 20 75 6e 64 65 72 20 |able for|m under |
|00001830| 74 68 65 20 74 65 72 6d | 73 0a 6f 66 20 50 61 72 |the term|s.of Par|
|00001840| 61 67 72 61 70 68 73 20 | 31 20 61 6e 64 20 32 20 |agraphs |1 and 2 |
|00001850| 61 62 6f 76 65 20 70 72 | 6f 76 69 64 65 64 20 74 |above pr|ovided t|
|00001860| 68 61 74 20 79 6f 75 20 | 61 6c 73 6f 20 64 6f 20 |hat you |also do |
|00001870| 6f 6e 65 20 6f 66 20 74 | 68 65 20 66 6f 6c 6c 6f |one of t|he follo|
|00001880| 77 69 6e 67 3a 0a 0a 20 | 20 20 20 61 29 20 61 63 |wing:.. | a) ac|
|00001890| 63 6f 6d 70 61 6e 79 20 | 69 74 20 77 69 74 68 20 |company |it with |
|000018a0| 74 68 65 20 63 6f 6d 70 | 6c 65 74 65 20 63 6f 72 |the comp|lete cor|
|000018b0| 72 65 73 70 6f 6e 64 69 | 6e 67 20 6d 61 63 68 69 |respondi|ng machi|
|000018c0| 6e 65 2d 72 65 61 64 61 | 62 6c 65 0a 20 20 20 20 |ne-reada|ble. |
|000018d0| 73 6f 75 72 63 65 20 63 | 6f 64 65 2c 20 77 68 69 |source c|ode, whi|
|000018e0| 63 68 20 6d 75 73 74 20 | 62 65 20 64 69 73 74 72 |ch must |be distr|
|000018f0| 69 62 75 74 65 64 20 75 | 6e 64 65 72 20 74 68 65 |ibuted u|nder the|
|00001900| 20 74 65 72 6d 73 20 6f | 66 0a 20 20 20 20 50 61 | terms o|f. Pa|
|00001910| 72 61 67 72 61 70 68 73 | 20 31 20 61 6e 64 20 32 |ragraphs| 1 and 2|
|00001920| 20 61 62 6f 76 65 3b 20 | 6f 72 2c 0a 0a 20 20 20 | above; |or,.. |
|00001930| 20 62 29 20 61 63 63 6f | 6d 70 61 6e 79 20 69 74 | b) acco|mpany it|
|00001940| 20 77 69 74 68 20 61 20 | 77 72 69 74 74 65 6e 20 | with a |written |
|00001950| 6f 66 66 65 72 2c 20 76 | 61 6c 69 64 20 66 6f 72 |offer, v|alid for|
|00001960| 20 61 74 20 6c 65 61 73 | 74 20 74 68 72 65 65 0a | at leas|t three.|
|00001970| 20 20 20 20 79 65 61 72 | 73 2c 20 74 6f 20 67 69 | year|s, to gi|
|00001980| 76 65 20 61 6e 79 20 74 | 68 69 72 64 20 70 61 72 |ve any t|hird par|
|00001990| 74 79 20 66 72 65 65 20 | 28 65 78 63 65 70 74 20 |ty free |(except |
|000019a0| 66 6f 72 20 61 20 6e 6f | 6d 69 6e 61 6c 0a 20 20 |for a no|minal. |
|000019b0| 20 20 73 68 69 70 70 69 | 6e 67 20 63 68 61 72 67 | shippi|ng charg|
|000019c0| 65 29 20 61 20 63 6f 6d | 70 6c 65 74 65 20 6d 61 |e) a com|plete ma|
|000019d0| 63 68 69 6e 65 2d 72 65 | 61 64 61 62 6c 65 20 63 |chine-re|adable c|
|000019e0| 6f 70 79 20 6f 66 20 74 | 68 65 0a 20 20 20 20 63 |opy of t|he. c|
|000019f0| 6f 72 72 65 73 70 6f 6e | 64 69 6e 67 20 73 6f 75 |orrespon|ding sou|
|00001a00| 72 63 65 20 63 6f 64 65 | 2c 20 74 6f 20 62 65 20 |rce code|, to be |
|00001a10| 64 69 73 74 72 69 62 75 | 74 65 64 20 75 6e 64 65 |distribu|ted unde|
|00001a20| 72 20 74 68 65 20 74 65 | 72 6d 73 20 6f 66 0a 20 |r the te|rms of. |
|00001a30| 20 20 20 50 61 72 61 67 | 72 61 70 68 73 20 31 20 | Parag|raphs 1 |
|00001a40| 61 6e 64 20 32 20 61 62 | 6f 76 65 3b 20 6f 72 2c |and 2 ab|ove; or,|
|00001a50| 0a 0a 20 20 20 20 63 29 | 20 61 63 63 6f 6d 70 61 |.. c)| accompa|
|00001a60| 6e 79 20 69 74 20 77 69 | 74 68 20 74 68 65 20 69 |ny it wi|th the i|
|00001a70| 6e 66 6f 72 6d 61 74 69 | 6f 6e 20 79 6f 75 20 72 |nformati|on you r|
|00001a80| 65 63 65 69 76 65 64 20 | 61 73 20 74 6f 20 77 68 |eceived |as to wh|
|00001a90| 65 72 65 20 74 68 65 0a | 20 20 20 20 63 6f 72 72 |ere the.| corr|
|00001aa0| 65 73 70 6f 6e 64 69 6e | 67 20 73 6f 75 72 63 65 |espondin|g source|
|00001ab0| 20 63 6f 64 65 20 6d 61 | 79 20 62 65 20 6f 62 74 | code ma|y be obt|
|00001ac0| 61 69 6e 65 64 2e 20 20 | 28 54 68 69 73 20 61 6c |ained. |(This al|
|00001ad0| 74 65 72 6e 61 74 69 76 | 65 20 69 73 0a 20 20 20 |ternativ|e is. |
|00001ae0| 20 61 6c 6c 6f 77 65 64 | 20 6f 6e 6c 79 20 66 6f | allowed| only fo|
|00001af0| 72 20 6e 6f 6e 63 6f 6d | 6d 65 72 63 69 61 6c 20 |r noncom|mercial |
|00001b00| 64 69 73 74 72 69 62 75 | 74 69 6f 6e 20 61 6e 64 |distribu|tion and|
|00001b10| 20 6f 6e 6c 79 20 69 66 | 20 79 6f 75 0a 20 20 20 | only if| you. |
|00001b20| 20 72 65 63 65 69 76 65 | 64 20 74 68 65 20 70 72 | receive|d the pr|
|00001b30| 6f 67 72 61 6d 20 69 6e | 20 6f 62 6a 65 63 74 20 |ogram in| object |
|00001b40| 63 6f 64 65 20 6f 72 20 | 65 78 65 63 75 74 61 62 |code or |executab|
|00001b50| 6c 65 20 66 6f 72 6d 20 | 61 6c 6f 6e 65 2e 29 0a |le form |alone.).|
|00001b60| 0a 46 6f 72 20 61 6e 20 | 65 78 65 63 75 74 61 62 |.For an |executab|
|00001b70| 6c 65 20 66 69 6c 65 2c | 20 63 6f 6d 70 6c 65 74 |le file,| complet|
|00001b80| 65 20 73 6f 75 72 63 65 | 20 63 6f 64 65 20 6d 65 |e source| code me|
|00001b90| 61 6e 73 20 61 6c 6c 20 | 74 68 65 20 73 6f 75 72 |ans all |the sour|
|00001ba0| 63 65 20 63 6f 64 65 20 | 66 6f 72 0a 61 6c 6c 20 |ce code |for.all |
|00001bb0| 6d 6f 64 75 6c 65 73 20 | 69 74 20 63 6f 6e 74 61 |modules |it conta|
|00001bc0| 69 6e 73 3b 20 62 75 74 | 2c 20 61 73 20 61 20 73 |ins; but|, as a s|
|00001bd0| 70 65 63 69 61 6c 20 65 | 78 63 65 70 74 69 6f 6e |pecial e|xception|
|00001be0| 2c 20 69 74 20 6e 65 65 | 64 20 6e 6f 74 20 69 6e |, it nee|d not in|
|00001bf0| 63 6c 75 64 65 0a 73 6f | 75 72 63 65 20 63 6f 64 |clude.so|urce cod|
|00001c00| 65 20 66 6f 72 20 6d 6f | 64 75 6c 65 73 20 77 68 |e for mo|dules wh|
|00001c10| 69 63 68 20 61 72 65 20 | 73 74 61 6e 64 61 72 64 |ich are |standard|
|00001c20| 20 6c 69 62 72 61 72 69 | 65 73 20 74 68 61 74 20 | librari|es that |
|00001c30| 61 63 63 6f 6d 70 61 6e | 79 20 74 68 65 0a 6f 70 |accompan|y the.op|
|00001c40| 65 72 61 74 69 6e 67 20 | 73 79 73 74 65 6d 20 6f |erating |system o|
|00001c50| 6e 20 77 68 69 63 68 20 | 74 68 65 20 65 78 65 63 |n which |the exec|
|00001c60| 75 74 61 62 6c 65 20 66 | 69 6c 65 20 72 75 6e 73 |utable f|ile runs|
|00001c70| 2e 0a 0a 20 20 34 2e 20 | 59 6f 75 20 6d 61 79 20 |... 4. |You may |
|00001c80| 6e 6f 74 20 63 6f 70 79 | 2c 20 73 75 62 6c 69 63 |not copy|, sublic|
|00001c90| 65 6e 73 65 2c 20 64 69 | 73 74 72 69 62 75 74 65 |ense, di|stribute|
|00001ca0| 20 6f 72 20 74 72 61 6e | 73 66 65 72 20 74 68 69 | or tran|sfer thi|
|00001cb0| 73 20 70 72 6f 67 72 61 | 6d 0a 65 78 63 65 70 74 |s progra|m.except|
|00001cc0| 20 61 73 20 65 78 70 72 | 65 73 73 6c 79 20 70 72 | as expr|essly pr|
|00001cd0| 6f 76 69 64 65 64 20 75 | 6e 64 65 72 20 74 68 69 |ovided u|nder thi|
|00001ce0| 73 20 4c 69 63 65 6e 73 | 65 20 41 67 72 65 65 6d |s Licens|e Agreem|
|00001cf0| 65 6e 74 2e 20 20 41 6e | 79 20 61 74 74 65 6d 70 |ent. An|y attemp|
|00001d00| 74 0a 6f 74 68 65 72 77 | 69 73 65 20 74 6f 20 63 |t.otherw|ise to c|
|00001d10| 6f 70 79 2c 20 73 75 62 | 6c 69 63 65 6e 73 65 2c |opy, sub|license,|
|00001d20| 20 64 69 73 74 72 69 62 | 75 74 65 20 6f 72 20 74 | distrib|ute or t|
|00001d30| 72 61 6e 73 66 65 72 20 | 74 68 69 73 20 70 72 6f |ransfer |this pro|
|00001d40| 67 72 61 6d 20 69 73 20 | 76 6f 69 64 20 61 6e 64 |gram is |void and|
|00001d50| 0a 79 6f 75 72 20 72 69 | 67 68 74 73 20 74 6f 20 |.your ri|ghts to |
|00001d60| 75 73 65 20 74 68 65 20 | 70 72 6f 67 72 61 6d 20 |use the |program |
|00001d70| 75 6e 64 65 72 20 74 68 | 69 73 20 4c 69 63 65 6e |under th|is Licen|
|00001d80| 73 65 20 61 67 72 65 65 | 6d 65 6e 74 20 73 68 61 |se agree|ment sha|
|00001d90| 6c 6c 20 62 65 0a 61 75 | 74 6f 6d 61 74 69 63 61 |ll be.au|tomatica|
|00001da0| 6c 6c 79 20 74 65 72 6d | 69 6e 61 74 65 64 2e 20 |lly term|inated. |
|00001db0| 20 48 6f 77 65 76 65 72 | 2c 20 70 61 72 74 69 65 | However|, partie|
|00001dc0| 73 20 77 68 6f 20 68 61 | 76 65 20 72 65 63 65 69 |s who ha|ve recei|
|00001dd0| 76 65 64 20 63 6f 6d 70 | 75 74 65 72 0a 73 6f 66 |ved comp|uter.sof|
|00001de0| 74 77 61 72 65 20 70 72 | 6f 67 72 61 6d 73 20 66 |tware pr|ograms f|
|00001df0| 72 6f 6d 20 79 6f 75 20 | 77 69 74 68 20 74 68 69 |rom you |with thi|
|00001e00| 73 20 4c 69 63 65 6e 73 | 65 20 41 67 72 65 65 6d |s Licens|e Agreem|
|00001e10| 65 6e 74 20 77 69 6c 6c | 20 6e 6f 74 20 68 61 76 |ent will| not hav|
|00001e20| 65 0a 74 68 65 69 72 20 | 6c 69 63 65 6e 73 65 73 |e.their |licenses|
|00001e30| 20 74 65 72 6d 69 6e 61 | 74 65 64 20 73 6f 20 6c | termina|ted so l|
|00001e40| 6f 6e 67 20 61 73 20 73 | 75 63 68 20 70 61 72 74 |ong as s|uch part|
|00001e50| 69 65 73 20 72 65 6d 61 | 69 6e 20 69 6e 20 66 75 |ies rema|in in fu|
|00001e60| 6c 6c 20 63 6f 6d 70 6c | 69 61 6e 63 65 2e 0a 0a |ll compl|iance...|
|00001e70| 20 49 6e 20 6f 74 68 65 | 72 20 77 6f 72 64 73 2c | In othe|r words,|
|00001e80| 20 79 6f 75 20 61 72 65 | 20 77 65 6c 63 6f 6d 65 | you are| welcome|
|00001e90| 20 74 6f 20 75 73 65 2c | 20 73 68 61 72 65 20 61 | to use,| share a|
|00001ea0| 6e 64 20 69 6d 70 72 6f | 76 65 20 74 68 69 73 20 |nd impro|ve this |
|00001eb0| 70 72 6f 67 72 61 6d 2e | 0a 20 59 6f 75 20 61 72 |program.|. You ar|
|00001ec0| 65 20 66 6f 72 62 69 64 | 64 65 6e 20 74 6f 20 66 |e forbid|den to f|
|00001ed0| 6f 72 62 69 64 20 61 6e | 79 6f 6e 65 20 65 6c 73 |orbid an|yone els|
|00001ee0| 65 20 74 6f 20 75 73 65 | 2c 20 73 68 61 72 65 20 |e to use|, share |
|00001ef0| 61 6e 64 20 69 6d 70 72 | 6f 76 65 0a 20 77 68 61 |and impr|ove. wha|
|00001f00| 74 20 79 6f 75 20 67 69 | 76 65 20 74 68 65 6d 2e |t you gi|ve them.|
|00001f10| 20 20 20 48 65 6c 70 20 | 73 74 61 6d 70 20 6f 75 | Help |stamp ou|
|00001f20| 74 20 73 6f 66 74 77 61 | 72 65 2d 68 6f 61 72 64 |t softwa|re-hoard|
|00001f30| 69 6e 67 21 20 20 2a 2f | 0a 0a 74 79 70 65 64 65 |ing! */|..typede|
|00001f40| 66 20 75 6e 73 69 67 6e | 65 64 20 63 68 61 72 20 |f unsign|ed char |
|00001f50| 55 5f 43 48 41 52 3b 0a | 0a 23 69 66 64 65 66 20 |U_CHAR;.|.#ifdef |
|00001f60| 45 4d 41 43 53 0a 23 64 | 65 66 69 6e 65 20 4e 4f |EMACS.#d|efine NO|
|00001f70| 5f 53 48 4f 52 54 4e 41 | 4d 45 53 0a 23 69 6e 63 |_SHORTNA|MES.#inc|
|00001f80| 6c 75 64 65 20 22 2e 2e | 2f 73 72 63 2f 63 6f 6e |lude "..|/src/con|
|00001f90| 66 69 67 2e 68 22 0a 23 | 69 66 64 65 66 20 73 74 |fig.h".#|ifdef st|
|00001fa0| 61 74 69 63 0a 23 75 6e | 64 65 66 20 73 74 61 74 |atic.#un|def stat|
|00001fb0| 69 63 0a 23 65 6e 64 69 | 66 0a 23 69 66 64 65 66 |ic.#endi|f.#ifdef|
|00001fc0| 20 6f 70 65 6e 0a 23 75 | 6e 64 65 66 20 6f 70 65 | open.#u|ndef ope|
|00001fd0| 6e 0a 23 75 6e 64 65 66 | 20 63 6c 6f 73 65 0a 23 |n.#undef| close.#|
|00001fe0| 75 6e 64 65 66 20 72 65 | 61 64 0a 23 75 6e 64 65 |undef re|ad.#unde|
|00001ff0| 66 20 77 72 69 74 65 0a | 23 65 6e 64 69 66 20 2f |f write.|#endif /|
|00002000| 2a 20 6f 70 65 6e 20 2a | 2f 0a 23 65 6e 64 69 66 |* open *|/.#endif|
|00002010| 20 2f 2a 20 45 4d 41 43 | 53 20 2a 2f 0a 0a 23 69 | /* EMAC|S */..#i|
|00002020| 6e 63 6c 75 64 65 20 3c | 73 79 73 2f 74 79 70 65 |nclude <|sys/type|
|00002030| 73 2e 68 3e 0a 23 69 6e | 63 6c 75 64 65 20 3c 73 |s.h>.#in|clude <s|
|00002040| 79 73 2f 73 74 61 74 2e | 68 3e 0a 23 69 6e 63 6c |ys/stat.|h>.#incl|
|00002050| 75 64 65 20 3c 73 79 73 | 2f 66 69 6c 65 2e 68 3e |ude <sys|/file.h>|
|00002060| 0a 23 69 6e 63 6c 75 64 | 65 20 3c 63 74 79 70 65 |.#includ|e <ctype|
|00002070| 2e 68 3e 0a 23 69 6e 63 | 6c 75 64 65 20 3c 73 74 |.h>.#inc|lude <st|
|00002080| 64 69 6f 2e 68 3e 0a 23 | 69 66 6e 64 65 66 20 55 |dio.h>.#|ifndef U|
|00002090| 53 47 0a 23 69 6e 63 6c | 75 64 65 20 3c 73 79 73 |SG.#incl|ude <sys|
|000020a0| 2f 74 69 6d 65 2e 68 3e | 09 09 2f 2a 20 66 6f 72 |/time.h>|../* for|
|000020b0| 20 5f 5f 44 41 54 45 5f | 5f 20 61 6e 64 20 5f 5f | __DATE_|_ and __|
|000020c0| 54 49 4d 45 5f 5f 20 2a | 2f 0a 23 65 6c 73 65 0a |TIME__ *|/.#else.|
|000020d0| 23 64 65 66 69 6e 65 20 | 69 6e 64 65 78 20 73 74 |#define |index st|
|000020e0| 72 63 68 72 0a 23 64 65 | 66 69 6e 65 20 72 69 6e |rchr.#de|fine rin|
|000020f0| 64 65 78 20 73 74 72 72 | 63 68 72 0a 23 69 6e 63 |dex strr|chr.#inc|
|00002100| 6c 75 64 65 20 3c 74 69 | 6d 65 2e 68 3e 0a 23 69 |lude <ti|me.h>.#i|
|00002110| 6e 63 6c 75 64 65 20 3c | 66 63 6e 74 6c 2e 68 3e |nclude <|fcntl.h>|
|00002120| 0a 23 65 6e 64 69 66 20 | 2f 2a 20 55 53 47 20 2a |.#endif |/* USG *|
|00002130| 2f 0a 0a 76 6f 69 64 20 | 62 63 6f 70 79 20 28 29 |/..void |bcopy ()|
|00002140| 2c 20 62 7a 65 72 6f 20 | 28 29 3b 0a 69 6e 74 20 |, bzero |();.int |
|00002150| 62 63 6d 70 20 28 29 3b | 0a 0a 63 68 61 72 20 2a |bcmp ();|..char *|
|00002160| 78 6d 61 6c 6c 6f 63 20 | 28 29 2c 20 2a 78 72 65 |xmalloc |(), *xre|
|00002170| 61 6c 6c 6f 63 20 28 29 | 2c 20 2a 78 63 61 6c 6c |alloc ()|, *xcall|
|00002180| 6f 63 20 28 29 3b 0a 76 | 6f 69 64 20 66 61 74 61 |oc ();.v|oid fata|
|00002190| 6c 20 28 29 2c 20 70 66 | 61 74 61 6c 5f 77 69 74 |l (), pf|atal_wit|
|000021a0| 68 5f 6e 61 6d 65 20 28 | 29 2c 20 70 65 72 72 6f |h_name (|), perro|
|000021b0| 72 5f 77 69 74 68 5f 6e | 61 6d 65 20 28 29 3b 0a |r_with_n|ame ();.|
|000021c0| 0a 63 68 61 72 20 2a 70 | 72 6f 67 6e 61 6d 65 3b |.char *p|rogname;|
|000021d0| 0a 0a 23 64 65 66 69 6e | 65 20 46 41 54 41 4c 5f |..#defin|e FATAL_|
|000021e0| 45 58 49 54 5f 43 4f 44 | 45 20 33 33 09 2f 2a 20 |EXIT_COD|E 33./* |
|000021f0| 67 6e 75 20 63 63 20 63 | 6f 6d 6d 61 6e 64 20 75 |gnu cc c|ommand u|
|00002200| 6e 64 65 72 73 74 61 6e | 64 73 20 74 68 69 73 20 |nderstan|ds this |
|00002210| 2a 2f 0a 0a 73 74 72 75 | 63 74 20 64 69 72 65 63 |*/..stru|ct direc|
|00002220| 74 6f 72 79 5f 73 74 61 | 63 6b 0a 20 20 7b 0a 20 |tory_sta|ck. {. |
|00002230| 20 20 20 73 74 72 75 63 | 74 20 64 69 72 65 63 74 | struc|t direct|
|00002240| 6f 72 79 5f 73 74 61 63 | 6b 20 2a 6e 65 78 74 3b |ory_stac|k *next;|
|00002250| 0a 20 20 20 20 63 68 61 | 72 20 2a 66 6e 61 6d 65 |. cha|r *fname|
|00002260| 3b 0a 20 20 7d 3b 0a 0a | 2f 2a 20 23 69 6e 63 6c |;. };..|/* #incl|
|00002270| 75 64 65 20 22 66 69 6c | 65 22 20 73 74 61 72 74 |ude "fil|e" start|
|00002280| 73 20 77 69 74 68 20 74 | 68 65 20 66 69 72 73 74 |s with t|he first|
|00002290| 20 65 6e 74 72 79 20 69 | 6e 20 74 68 65 20 73 74 | entry i|n the st|
|000022a0| 61 63 6b 20 2a 2f 0a 2f | 2a 20 23 69 6e 63 6c 75 |ack */./|* #inclu|
|000022b0| 64 65 20 3c 66 69 6c 65 | 3e 20 73 74 61 72 74 73 |de <file|> starts|
|000022c0| 20 77 69 74 68 20 74 68 | 65 20 73 65 63 6f 6e 64 | with th|e second|
|000022d0| 2e 20 2a 2f 0a 2f 2a 20 | 2d 49 20 64 69 72 65 63 |. */./* |-I direc|
|000022e0| 74 6f 72 69 65 73 20 61 | 72 65 20 61 64 64 65 64 |tories a|re added|
|000022f0| 20 61 66 74 65 72 20 74 | 68 65 20 66 69 72 73 74 | after t|he first|
|00002300| 20 2a 2f 0a 73 74 72 75 | 63 74 20 64 69 72 65 63 | */.stru|ct direc|
|00002310| 74 6f 72 79 5f 73 74 61 | 63 6b 20 64 65 66 61 75 |tory_sta|ck defau|
|00002320| 6c 74 5f 69 6e 63 6c 75 | 64 65 73 5b 32 5d 20 3d |lt_inclu|des[2] =|
|00002330| 0a 20 20 7b 0a 20 20 20 | 20 7b 20 26 64 65 66 61 |. {. | { &defa|
|00002340| 75 6c 74 5f 69 6e 63 6c | 75 64 65 73 5b 31 5d 2c |ult_incl|udes[1],|
|00002350| 20 22 2e 22 20 7d 2c 0a | 20 20 20 20 7b 20 30 2c | "." },.| { 0,|
|00002360| 20 22 2f 75 73 72 2f 69 | 6e 63 6c 75 64 65 22 20 | "/usr/i|nclude" |
|00002370| 7d 0a 20 20 7d 3b 0a 73 | 74 72 75 63 74 20 64 69 |}. };.s|truct di|
|00002380| 72 65 63 74 6f 72 79 5f | 73 74 61 63 6b 20 2a 69 |rectory_|stack *i|
|00002390| 6e 63 6c 75 64 65 20 3d | 20 26 64 65 66 61 75 6c |nclude =| &defaul|
|000023a0| 74 5f 69 6e 63 6c 75 64 | 65 73 5b 30 5d 3b 0a 0a |t_includ|es[0];..|
|000023b0| 69 6e 74 20 6d 61 78 5f | 69 6e 63 6c 75 64 65 5f |int max_|include_|
|000023c0| 6c 65 6e 20 3d 20 31 34 | 3b 09 2f 2a 20 73 74 72 |len = 14|;./* str|
|000023d0| 6c 65 6e 20 28 64 65 66 | 61 75 6c 74 5f 69 6e 63 |len (def|ault_inc|
|000023e0| 6c 75 64 65 29 20 2b 20 | 32 0a 09 09 09 09 09 09 |lude) + |2.......|
|000023f0| 09 28 66 6f 72 20 2f 20 | 61 6e 64 20 6e 75 6c 6c |.(for / |and null|
|00002400| 29 20 2a 2f 0a 0a 63 68 | 61 72 20 53 54 44 49 4e |) */..ch|ar STDIN|
|00002410| 5f 46 49 4c 45 5b 5d 20 | 3d 20 22 22 3b 09 09 2f |_FILE[] |= "";../|
|00002420| 2a 20 45 6d 70 74 79 2c | 20 6c 69 6b 65 20 72 65 |* Empty,| like re|
|00002430| 61 6c 20 63 70 70 20 2a | 2f 0a 69 6e 74 20 70 75 |al cpp *|/.int pu|
|00002440| 74 5f 6f 75 74 5f 63 6f | 6d 6d 65 6e 74 73 20 3d |t_out_co|mments =|
|00002450| 20 30 3b 09 2f 2a 20 4a | 46 20 6e 6f 6e 2d 7a 65 | 0;./* J|F non-ze|
|00002460| 72 6f 20 6d 65 61 6e 73 | 20 6c 65 61 76 65 20 63 |ro means| leave c|
|00002470| 6f 6d 6d 65 6e 74 73 20 | 69 6e 20 74 68 65 0a 09 |omments |in the..|
|00002480| 09 09 09 20 20 20 6f 75 | 74 70 75 74 20 66 69 6c |... ou|tput fil|
|00002490| 65 2e 20 20 55 73 65 64 | 20 62 79 20 6c 69 6e 74 |e. Used| by lint|
|000024a0| 20 2a 2f 0a 0a 2f 2a 20 | 74 61 62 6c 65 20 74 6f | */../* |table to|
|000024b0| 20 74 65 6c 6c 20 69 66 | 20 63 68 61 72 20 63 61 | tell if| char ca|
|000024c0| 6e 20 62 65 20 70 61 72 | 74 20 6f 66 20 61 20 43 |n be par|t of a C|
|000024d0| 20 69 64 65 6e 74 69 66 | 69 65 72 2e 20 2a 2f 0a | identif|ier. */.|
|000024e0| 55 5f 43 48 41 52 20 69 | 73 5f 69 64 63 68 61 72 |U_CHAR i|s_idchar|
|000024f0| 5b 32 35 36 5d 3b 0a 2f | 2a 20 74 61 62 6c 65 20 |[256];./|* table |
|00002500| 74 6f 20 74 65 6c 6c 20 | 69 66 20 63 68 61 72 20 |to tell |if char |
|00002510| 63 61 6e 20 62 65 20 66 | 69 72 73 74 20 63 68 61 |can be f|irst cha|
|00002520| 72 20 6f 66 20 61 20 63 | 20 69 64 65 6e 74 69 66 |r of a c| identif|
|00002530| 69 65 72 2e 20 2a 2f 0a | 55 5f 43 48 41 52 20 69 |ier. */.|U_CHAR i|
|00002540| 73 5f 69 64 73 74 61 72 | 74 5b 32 35 36 5d 3b 0a |s_idstar|t[256];.|
|00002550| 2f 2a 20 74 61 62 6c 65 | 20 74 6f 20 74 65 6c 6c |/* table| to tell|
|00002560| 20 69 66 20 63 20 69 73 | 20 68 6f 72 69 7a 6f 6e | if c is| horizon|
|00002570| 74 61 6c 20 73 70 61 63 | 65 2e 20 20 69 73 73 70 |tal spac|e. issp|
|00002580| 61 63 65 28 29 20 74 68 | 69 6e 6b 73 20 74 68 61 |ace() th|inks tha|
|00002590| 74 0a 20 20 20 6e 65 77 | 6c 69 6e 65 20 69 73 20 |t. new|line is |
|000025a0| 73 70 61 63 65 3b 20 74 | 68 69 73 20 69 73 20 6e |space; t|his is n|
|000025b0| 6f 74 20 61 20 67 6f 6f | 64 20 69 64 65 61 20 66 |ot a goo|d idea f|
|000025c0| 6f 72 20 74 68 69 73 20 | 70 72 6f 67 72 61 6d 2e |or this |program.|
|000025d0| 20 2a 2f 0a 55 5f 43 48 | 41 52 20 69 73 5f 68 6f | */.U_CH|AR is_ho|
|000025e0| 72 5f 73 70 61 63 65 5b | 32 35 36 5d 3b 0a 0a 2f |r_space[|256];../|
|000025f0| 2a 20 49 2f 4f 20 62 75 | 66 66 65 72 20 73 74 72 |* I/O bu|ffer str|
|00002600| 75 63 74 75 72 65 2e 20 | 20 4f 75 67 68 74 20 74 |ucture. | Ought t|
|00002610| 6f 20 62 65 20 75 73 65 | 64 20 66 6f 72 20 74 68 |o be use|d for th|
|00002620| 65 20 6f 75 74 70 75 74 | 20 66 69 6c 65 20 74 6f |e output| file to|
|00002630| 6f 2e 0a 20 20 20 54 68 | 65 73 65 20 61 72 65 20 |o.. Th|ese are |
|00002640| 61 6c 73 6f 20 75 73 65 | 64 20 77 68 65 6e 20 74 |also use|d when t|
|00002650| 68 65 72 65 20 69 73 20 | 6e 6f 20 66 69 6c 65 20 |here is |no file |
|00002660| 70 72 65 73 65 6e 74 2c | 20 66 6f 72 20 65 78 61 |present,| for exa|
|00002670| 6d 70 6c 65 2c 0a 20 20 | 20 77 68 65 6e 20 72 65 |mple,. | when re|
|00002680| 73 63 61 6e 6e 69 6e 67 | 20 61 20 64 65 66 69 6e |scanning| a defin|
|00002690| 69 74 69 6f 6e 2e 20 20 | 54 68 65 6e 2c 20 74 68 |ition. |Then, th|
|000026a0| 65 20 66 6e 61 6d 65 20 | 66 69 65 6c 64 20 69 73 |e fname |field is|
|000026b0| 20 6e 75 6c 6c 2e 20 2a | 2f 0a 23 64 65 66 69 6e | null. *|/.#defin|
|000026c0| 65 20 49 4e 50 55 54 5f | 53 54 41 43 4b 5f 4d 41 |e INPUT_|STACK_MA|
|000026d0| 58 20 31 30 30 0a 73 74 | 72 75 63 74 20 66 69 6c |X 100.st|ruct fil|
|000026e0| 65 5f 62 75 66 20 7b 0a | 20 20 73 74 72 75 63 74 |e_buf {.| struct|
|000026f0| 20 69 6e 66 69 6c 65 20 | 2a 6e 65 78 74 3b 09 2f | infile |*next;./|
|00002700| 2a 20 66 6f 72 20 6d 61 | 6b 69 6e 67 20 73 74 61 |* for ma|king sta|
|00002710| 63 6b 73 20 6f 66 20 66 | 69 6c 65 20 70 74 72 73 |cks of f|ile ptrs|
|00002720| 20 2a 2f 0a 20 20 63 68 | 61 72 20 2a 66 6e 61 6d | */. ch|ar *fnam|
|00002730| 65 3b 0a 20 20 69 6e 74 | 20 6c 69 6e 65 6e 6f 3b |e;. int| lineno;|
|00002740| 0a 20 20 69 6e 74 20 6c | 65 6e 67 74 68 3b 0a 20 |. int l|ength;. |
|00002750| 20 55 5f 43 48 41 52 20 | 2a 62 75 66 3b 0a 20 20 | U_CHAR |*buf;. |
|00002760| 55 5f 43 48 41 52 20 2a | 62 75 66 70 3b 0a 7d 20 |U_CHAR *|bufp;.} |
|00002770| 69 6e 73 74 61 63 6b 5b | 49 4e 50 55 54 5f 53 54 |instack[|INPUT_ST|
|00002780| 41 43 4b 5f 4d 41 58 5d | 3b 0a 69 6e 74 20 69 6e |ACK_MAX]|;.int in|
|00002790| 64 65 70 74 68 20 3d 20 | 30 3b 0a 0a 74 79 70 65 |depth = |0;..type|
|000027a0| 64 65 66 20 73 74 72 75 | 63 74 20 66 69 6c 65 5f |def stru|ct file_|
|000027b0| 62 75 66 20 46 49 4c 45 | 5f 42 55 46 3b 0a 0a 2f |buf FILE|_BUF;../|
|000027c0| 2a 20 54 68 65 20 6f 75 | 74 70 75 74 20 62 75 66 |* The ou|tput buf|
|000027d0| 66 65 72 2e 20 20 49 74 | 73 20 4c 45 4e 47 54 48 |fer. It|s LENGTH|
|000027e0| 20 66 69 65 6c 64 20 69 | 73 20 74 68 65 20 61 6d | field i|s the am|
|000027f0| 6f 75 6e 74 20 6f 66 20 | 72 6f 6f 6d 20 61 6c 6c |ount of |room all|
|00002800| 6f 63 61 74 65 64 0a 20 | 20 20 66 6f 72 20 74 68 |ocated. | for th|
|00002810| 65 20 62 75 66 66 65 72 | 2c 20 6e 6f 74 20 74 68 |e buffer|, not th|
|00002820| 65 20 6e 75 6d 62 65 72 | 20 6f 66 20 63 68 61 72 |e number| of char|
|00002830| 73 20 61 63 74 75 61 6c | 6c 79 20 70 72 65 73 65 |s actual|ly prese|
|00002840| 6e 74 2e 20 20 54 6f 20 | 67 65 74 0a 20 20 20 74 |nt. To |get. t|
|00002850| 68 61 74 2c 20 73 75 62 | 74 72 61 63 74 20 6f 75 |hat, sub|tract ou|
|00002860| 74 62 75 66 2e 62 75 66 | 20 66 72 6f 6d 20 6f 75 |tbuf.buf| from ou|
|00002870| 74 62 75 66 2e 62 75 66 | 70 2e 20 2a 2f 0a 0a 23 |tbuf.buf|p. */..#|
|00002880| 64 65 66 69 6e 65 20 4f | 55 54 42 55 46 5f 53 49 |define O|UTBUF_SI|
|00002890| 5a 45 20 31 30 09 2f 2a | 20 69 6e 69 74 69 61 6c |ZE 10./*| initial|
|000028a0| 20 73 69 7a 65 20 6f 66 | 20 6f 75 74 70 75 74 20 | size of| output |
|000028b0| 62 75 66 66 65 72 20 2a | 2f 0a 46 49 4c 45 5f 42 |buffer *|/.FILE_B|
|000028c0| 55 46 20 6f 75 74 62 75 | 66 3b 0a 0a 2f 2a 20 53 |UF outbu|f;../* S|
|000028d0| 74 72 75 63 74 75 72 65 | 20 61 6c 6c 6f 63 61 74 |tructure| allocat|
|000028e0| 65 64 20 66 6f 72 20 65 | 76 65 72 79 20 23 64 65 |ed for e|very #de|
|000028f0| 66 69 6e 65 2e 20 20 46 | 6f 72 20 61 20 73 69 6d |fine. F|or a sim|
|00002900| 70 6c 65 20 72 65 70 6c | 61 63 65 6d 65 6e 74 0a |ple repl|acement.|
|00002910| 20 20 20 73 75 63 68 20 | 61 73 0a 20 20 20 09 23 | such |as. .#|
|00002920| 64 65 66 69 6e 65 20 66 | 6f 6f 20 62 61 72 20 2c |define f|oo bar ,|
|00002930| 0a 20 20 20 6e 61 72 67 | 73 20 3d 20 2d 31 2c 20 |. narg|s = -1, |
|00002940| 74 68 65 20 60 70 61 74 | 74 65 72 6e 27 20 6c 69 |the `pat|tern' li|
|00002950| 73 74 20 69 73 20 6e 75 | 6c 6c 2c 20 61 6e 64 20 |st is nu|ll, and |
|00002960| 74 68 65 20 65 78 70 61 | 6e 73 69 6f 6e 20 69 73 |the expa|nsion is|
|00002970| 20 6a 75 73 74 0a 20 20 | 20 74 68 65 20 72 65 70 | just. | the rep|
|00002980| 6c 61 63 65 6d 65 6e 74 | 20 74 65 78 74 2e 20 20 |lacement| text. |
|00002990| 4e 61 72 67 73 20 3d 20 | 30 20 6d 65 61 6e 73 20 |Nargs = |0 means |
|000029a0| 61 20 72 65 61 6c 20 6d | 61 63 72 6f 20 77 69 74 |a real m|acro wit|
|000029b0| 68 20 6e 6f 20 61 72 67 | 73 2c 0a 20 20 20 65 2e |h no arg|s,. e.|
|000029c0| 67 2e 2c 0a 20 20 20 20 | 20 20 20 23 64 65 66 69 |g.,. | #defi|
|000029d0| 6e 65 20 67 65 74 63 68 | 61 72 28 29 20 67 65 74 |ne getch|ar() get|
|000029e0| 63 28 73 74 64 69 6e 29 | 20 2e 0a 20 20 20 57 68 |c(stdin)| .. Wh|
|000029f0| 65 6e 20 74 68 65 72 65 | 20 61 72 65 20 61 72 67 |en there| are arg|
|00002a00| 73 2c 20 74 68 65 20 65 | 78 70 61 6e 73 69 6f 6e |s, the e|xpansion|
|00002a10| 20 69 73 20 74 68 65 20 | 72 65 70 6c 61 63 65 6d | is the |replacem|
|00002a20| 65 6e 74 20 74 65 78 74 | 20 77 69 74 68 20 74 68 |ent text| with th|
|00002a30| 65 0a 20 20 20 61 72 67 | 73 20 73 71 75 61 73 68 |e. arg|s squash|
|00002a40| 65 64 20 6f 75 74 2c 20 | 61 6e 64 20 74 68 65 20 |ed out, |and the |
|00002a50| 72 65 66 6c 69 73 74 20 | 69 73 20 61 20 6c 69 73 |reflist |is a lis|
|00002a60| 74 20 64 65 73 63 72 69 | 62 69 6e 67 20 68 6f 77 |t descri|bing how|
|00002a70| 20 74 6f 0a 20 20 20 62 | 75 69 6c 64 20 74 68 65 | to. b|uild the|
|00002a80| 20 6f 75 74 70 75 74 20 | 66 72 6f 6d 20 74 68 65 | output |from the|
|00002a90| 20 69 6e 70 75 74 3a 20 | 65 2e 67 2e 2c 20 22 33 | input: |e.g., "3|
|00002aa0| 20 63 68 61 72 73 2c 20 | 74 68 65 6e 20 74 68 65 | chars, |then the|
|00002ab0| 20 31 73 74 20 61 72 67 | 2c 0a 20 20 20 74 68 65 | 1st arg|,. the|
|00002ac0| 6e 20 39 20 63 68 61 72 | 73 2c 20 74 68 65 6e 20 |n 9 char|s, then |
|00002ad0| 74 68 65 20 33 72 64 20 | 61 72 67 2c 20 74 68 65 |the 3rd |arg, the|
|00002ae0| 6e 20 30 20 63 68 61 72 | 73 2c 20 74 68 65 6e 20 |n 0 char|s, then |
|00002af0| 74 68 65 20 32 6e 64 20 | 61 72 67 22 2e 0a 20 20 |the 2nd |arg".. |
|00002b00| 20 54 68 65 20 63 68 61 | 72 73 20 68 65 72 65 20 | The cha|rs here |
|00002b10| 63 6f 6d 65 20 66 72 6f | 6d 20 74 68 65 20 65 78 |come fro|m the ex|
|00002b20| 70 61 6e 73 69 6f 6e 2e | 20 20 54 68 75 73 2c 20 |pansion.| Thus, |
|00002b30| 66 6f 72 20 61 6e 79 20 | 64 65 66 69 6e 69 74 69 |for any |definiti|
|00002b40| 6f 6e 0a 20 20 20 64 20 | 2c 20 73 74 72 6c 65 6e |on. d |, strlen|
|00002b50| 28 64 2d 3e 65 78 70 61 | 6e 73 69 6f 6e 29 20 73 |(d->expa|nsion) s|
|00002b60| 68 6f 75 6c 64 20 65 71 | 75 61 6c 20 74 68 65 20 |hould eq|ual the |
|00002b70| 73 75 6d 20 6f 66 20 61 | 6c 6c 20 74 68 65 0a 20 |sum of a|ll the. |
|00002b80| 20 20 64 2d 3e 70 61 74 | 74 65 72 6e 2d 3e 6e 63 | d->pat|tern->nc|
|00002b90| 68 61 72 73 2e 20 20 4e | 6f 74 65 20 74 68 61 74 |hars. N|ote that|
|00002ba0| 20 74 68 65 20 6c 69 73 | 74 20 63 61 6e 20 62 65 | the lis|t can be|
|00002bb0| 20 61 72 62 69 74 72 61 | 72 69 6c 79 20 6c 6f 6e | arbitra|rily lon|
|00002bc0| 67 2d 2d 2d 0a 20 20 20 | 69 74 73 20 6c 65 6e 67 |g---. |its leng|
|00002bd0| 74 68 20 64 65 70 65 6e | 64 73 20 6f 6e 20 74 68 |th depen|ds on th|
|00002be0| 65 20 6e 75 6d 62 65 72 | 20 6f 66 20 74 69 6d 65 |e number| of time|
|00002bf0| 73 20 74 68 65 20 61 72 | 67 75 65 6d 65 6e 74 73 |s the ar|guements|
|00002c00| 20 61 70 70 65 61 72 20 | 69 6e 0a 20 20 20 74 68 | appear |in. th|
|00002c10| 65 20 72 65 70 6c 61 63 | 65 6d 65 6e 74 20 74 65 |e replac|ement te|
|00002c20| 78 74 2c 20 6e 6f 74 20 | 68 6f 77 20 6d 61 6e 79 |xt, not |how many|
|00002c30| 20 61 72 67 73 20 74 68 | 65 72 65 20 61 72 65 2e | args th|ere are.|
|00002c40| 20 20 45 78 61 6d 70 6c | 65 3a 0a 20 20 20 23 64 | Exampl|e:. #d|
|00002c50| 65 66 69 6e 65 20 66 28 | 78 29 20 78 2b 78 2b 78 |efine f(|x) x+x+x|
|00002c60| 2b 78 2b 78 2b 78 2b 78 | 20 77 6f 75 6c 64 20 68 |+x+x+x+x| would h|
|00002c70| 61 76 65 20 72 65 70 6c | 61 63 65 6d 65 6e 74 20 |ave repl|acement |
|00002c80| 74 65 78 74 20 22 2b 2b | 2b 2b 2b 2b 22 20 61 6e |text "++|++++" an|
|00002c90| 64 0a 20 20 20 70 61 74 | 74 65 72 6e 20 6c 69 73 |d. pat|tern lis|
|00002ca0| 74 0a 20 20 20 20 20 7b | 20 28 30 2c 20 31 29 2c |t. {| (0, 1),|
|00002cb0| 20 28 31 2c 20 31 29 2c | 20 28 31 2c 20 31 29 2c | (1, 1),| (1, 1),|
|00002cc0| 20 2e 2e 2e 2c 20 28 31 | 2c 20 31 29 2c 20 4e 55 | ..., (1|, 1), NU|
|00002cd0| 4c 4c 20 7d 0a 20 20 20 | 77 68 65 72 65 20 28 78 |LL }. |where (x|
|00002ce0| 2c 20 79 29 20 6d 65 61 | 6e 73 20 28 6e 63 68 61 |, y) mea|ns (ncha|
|00002cf0| 72 73 2c 20 61 72 67 6e | 6f 29 2e 20 2a 2f 0a 0a |rs, argn|o). */..|
|00002d00| 74 79 70 65 64 65 66 20 | 73 74 72 75 63 74 20 64 |typedef |struct d|
|00002d10| 65 66 69 6e 69 74 69 6f | 6e 20 44 45 46 49 4e 49 |efinitio|n DEFINI|
|00002d20| 54 49 4f 4e 3b 0a 73 74 | 72 75 63 74 20 64 65 66 |TION;.st|ruct def|
|00002d30| 69 6e 69 74 69 6f 6e 20 | 7b 0a 20 20 69 6e 74 20 |inition |{. int |
|00002d40| 6e 61 72 67 73 3b 0a 20 | 20 69 6e 74 20 6c 65 6e |nargs;. | int len|
|00002d50| 67 74 68 3b 09 09 09 2f | 2a 20 6c 65 6e 67 74 68 |gth;.../|* length|
|00002d60| 20 6f 66 20 65 78 70 61 | 6e 73 69 6f 6e 20 73 74 | of expa|nsion st|
|00002d70| 72 69 6e 67 20 2a 2f 0a | 20 20 55 5f 43 48 41 52 |ring */.| U_CHAR|
|00002d80| 20 2a 65 78 70 61 6e 73 | 69 6f 6e 3b 0a 20 20 73 | *expans|ion;. s|
|00002d90| 74 72 75 63 74 20 72 65 | 66 6c 69 73 74 20 7b 0a |truct re|flist {.|
|00002da0| 20 20 20 20 73 74 72 75 | 63 74 20 72 65 66 6c 69 | stru|ct refli|
|00002db0| 73 74 20 2a 6e 65 78 74 | 3b 0a 20 20 20 20 69 6e |st *next|;. in|
|00002dc0| 74 20 6e 63 68 61 72 73 | 3b 0a 20 20 20 20 69 6e |t nchars|;. in|
|00002dd0| 74 20 61 72 67 6e 6f 3b | 0a 20 20 7d 20 2a 70 61 |t argno;|. } *pa|
|00002de0| 74 74 65 72 6e 3b 0a 7d | 3b 0a 0a 2f 2a 20 64 69 |ttern;.}|;../* di|
|00002df0| 66 66 65 72 65 6e 74 20 | 6b 69 6e 64 73 20 6f 66 |fferent |kinds of|
|00002e00| 20 74 68 69 6e 67 73 20 | 74 68 61 74 20 63 61 6e | things |that can|
|00002e10| 20 61 70 70 65 61 72 20 | 69 6e 20 74 68 65 20 76 | appear |in the v|
|00002e20| 61 6c 75 65 20 66 69 65 | 6c 64 0a 20 20 20 6f 66 |alue fie|ld. of|
|00002e30| 20 61 20 68 61 73 68 20 | 6e 6f 64 65 2e 20 20 41 | a hash |node. A|
|00002e40| 63 74 75 61 6c 6c 79 2c | 20 74 68 69 73 20 6d 61 |ctually,| this ma|
|00002e50| 79 20 62 65 20 75 73 65 | 6c 65 73 73 20 6e 6f 77 |y be use|less now|
|00002e60| 2e 20 2a 2f 0a 75 6e 69 | 6f 6e 20 68 61 73 68 76 |. */.uni|on hashv|
|00002e70| 61 6c 20 7b 0a 20 20 69 | 6e 74 20 69 76 61 6c 3b |al {. i|nt ival;|
|00002e80| 0a 20 20 63 68 61 72 20 | 2a 63 70 76 61 6c 3b 0a |. char |*cpval;.|
|00002e90| 20 20 44 45 46 49 4e 49 | 54 49 4f 4e 20 2a 64 65 | DEFINI|TION *de|
|00002ea0| 66 6e 3b 0a 7d 3b 0a 0a | 0a 2f 2a 20 54 68 65 20 |fn;.};..|./* The |
|00002eb0| 73 74 72 75 63 74 75 72 | 65 20 6f 66 20 61 20 6e |structur|e of a n|
|00002ec0| 6f 64 65 20 69 6e 20 74 | 68 65 20 68 61 73 68 20 |ode in t|he hash |
|00002ed0| 74 61 62 6c 65 2e 20 20 | 54 68 65 20 68 61 73 68 |table. |The hash|
|00002ee0| 20 74 61 62 6c 65 0a 20 | 20 20 68 61 73 20 65 6e | table. | has en|
|00002ef0| 74 72 69 65 73 20 66 6f | 72 20 61 6c 6c 20 74 6f |tries fo|r all to|
|00002f00| 6b 65 6e 73 20 64 65 66 | 69 6e 65 64 20 62 79 20 |kens def|ined by |
|00002f10| 23 64 65 66 69 6e 65 20 | 63 6f 6d 6d 61 6e 64 73 |#define |commands|
|00002f20| 20 28 74 79 70 65 20 54 | 5f 4d 41 43 52 4f 29 2c | (type T|_MACRO),|
|00002f30| 0a 20 20 20 70 6c 75 73 | 20 73 6f 6d 65 20 73 70 |. plus| some sp|
|00002f40| 65 63 69 61 6c 20 74 6f | 6b 65 6e 73 20 6c 69 6b |ecial to|kens lik|
|00002f50| 65 20 5f 5f 4c 49 4e 45 | 5f 5f 20 28 74 68 65 73 |e __LINE|__ (thes|
|00002f60| 65 20 65 61 63 68 20 68 | 61 76 65 20 74 68 65 69 |e each h|ave thei|
|00002f70| 72 20 6f 77 6e 0a 20 20 | 20 74 79 70 65 2c 20 61 |r own. | type, a|
|00002f80| 6e 64 20 74 68 65 20 61 | 70 70 72 6f 70 72 69 61 |nd the a|ppropria|
|00002f90| 74 65 20 63 6f 64 65 20 | 69 73 20 72 75 6e 20 77 |te code |is run w|
|00002fa0| 68 65 6e 20 74 68 61 74 | 20 74 79 70 65 20 6f 66 |hen that| type of|
|00002fb0| 20 6e 6f 64 65 20 69 73 | 20 73 65 65 6e 2e 0a 20 | node is| seen.. |
|00002fc0| 20 20 49 74 20 64 6f 65 | 73 20 6e 6f 74 20 63 6f | It doe|s not co|
|00002fd0| 6e 74 61 69 6e 20 63 6f | 6e 74 72 6f 6c 20 77 6f |ntain co|ntrol wo|
|00002fe0| 72 64 73 20 6c 69 6b 65 | 20 22 23 64 65 66 69 6e |rds like| "#defin|
|00002ff0| 65 22 2c 20 77 68 69 63 | 68 20 61 72 65 20 72 65 |e", whic|h are re|
|00003000| 63 6f 67 6e 69 7a 65 64 | 0a 20 20 20 62 79 20 61 |cognized|. by a|
|00003010| 20 73 65 70 61 72 61 74 | 65 20 70 69 65 63 65 20 | separat|e piece |
|00003020| 6f 66 20 63 6f 64 65 2e | 20 2a 2f 0a 74 79 70 65 |of code.| */.type|
|00003030| 64 65 66 20 73 74 72 75 | 63 74 20 68 61 73 68 6e |def stru|ct hashn|
|00003040| 6f 64 65 20 48 41 53 48 | 4e 4f 44 45 3b 0a 73 74 |ode HASH|NODE;.st|
|00003050| 72 75 63 74 20 68 61 73 | 68 6e 6f 64 65 20 7b 0a |ruct has|hnode {.|
|00003060| 20 20 48 41 53 48 4e 4f | 44 45 20 2a 6e 65 78 74 | HASHNO|DE *next|
|00003070| 3b 09 09 2f 2a 20 64 6f | 75 62 6c 65 20 6c 69 6e |;../* do|uble lin|
|00003080| 6b 73 20 66 6f 72 20 65 | 61 73 79 20 64 65 6c 65 |ks for e|asy dele|
|00003090| 74 69 6f 6e 20 2a 2f 0a | 20 20 48 41 53 48 4e 4f |tion */.| HASHNO|
|000030a0| 44 45 20 2a 70 72 65 76 | 3b 0a 20 20 48 41 53 48 |DE *prev|;. HASH|
|000030b0| 4e 4f 44 45 20 2a 2a 62 | 75 63 6b 65 74 5f 68 64 |NODE **b|ucket_hd|
|000030c0| 72 3b 09 2f 2a 20 61 6c | 73 6f 2c 20 61 20 62 61 |r;./* al|so, a ba|
|000030d0| 63 6b 20 70 6f 69 6e 74 | 65 72 20 74 6f 20 74 68 |ck point|er to th|
|000030e0| 69 73 20 6e 6f 64 65 27 | 73 20 68 61 73 68 0a 09 |is node'|s hash..|
|000030f0| 09 09 09 20 20 20 63 68 | 61 69 6e 20 69 73 20 6b |... ch|ain is k|
|00003100| 65 70 74 2c 20 69 6e 20 | 63 61 73 65 20 74 68 65 |ept, in |case the|
|00003110| 20 6e 6f 64 65 20 69 73 | 20 74 68 65 20 68 65 61 | node is| the hea|
|00003120| 64 0a 09 09 09 09 20 20 | 20 6f 66 20 74 68 65 20 |d..... | of the |
|00003130| 63 68 61 69 6e 20 61 6e | 64 20 67 65 74 73 20 64 |chain an|d gets d|
|00003140| 65 6c 65 74 65 64 2e 20 | 2a 2f 0a 20 20 69 6e 74 |eleted. |*/. int|
|00003150| 20 74 79 70 65 3b 09 09 | 09 2f 2a 20 74 79 70 65 | type;..|./* type|
|00003160| 20 6f 66 20 73 70 65 63 | 69 61 6c 20 74 6f 6b 65 | of spec|ial toke|
|00003170| 6e 20 2a 2f 0a 20 20 69 | 6e 74 20 6c 65 6e 67 74 |n */. i|nt lengt|
|00003180| 68 3b 09 09 09 2f 2a 20 | 6c 65 6e 67 74 68 20 6f |h;.../* |length o|
|00003190| 66 20 74 6f 6b 65 6e 2c | 20 66 6f 72 20 71 75 69 |f token,| for qui|
|000031a0| 63 6b 20 63 6f 6d 70 61 | 72 69 73 6f 6e 20 2a 2f |ck compa|rison */|
|000031b0| 0a 20 20 55 5f 43 48 41 | 52 20 2a 6e 61 6d 65 3b |. U_CHA|R *name;|
|000031c0| 09 09 09 2f 2a 20 74 68 | 65 20 61 63 74 75 61 6c |.../* th|e actual|
|000031d0| 20 6e 61 6d 65 20 2a 2f | 0a 20 20 75 6e 69 6f 6e | name */|. union|
|000031e0| 20 68 61 73 68 76 61 6c | 20 76 61 6c 75 65 3b 09 | hashval| value;.|
|000031f0| 09 2f 2a 20 70 6f 69 6e | 74 65 72 20 74 6f 20 65 |./* poin|ter to e|
|00003200| 78 70 61 6e 73 69 6f 6e | 2c 20 6f 72 20 77 68 61 |xpansion|, or wha|
|00003210| 74 65 76 65 72 20 2a 2f | 0a 7d 3b 0a 0a 0a 48 41 |tever */|.};...HA|
|00003220| 53 48 4e 4f 44 45 20 2a | 69 6e 73 74 61 6c 6c 28 |SHNODE *|install(|
|00003230| 29 3b 0a 2f 2a 20 64 69 | 66 66 65 72 65 6e 74 20 |);./* di|fferent |
|00003240| 66 6c 61 76 6f 72 73 20 | 6f 66 20 68 61 73 68 20 |flavors |of hash |
|00003250| 6e 6f 64 65 73 20 2d 2d | 2d 20 61 6c 73 6f 20 75 |nodes --|- also u|
|00003260| 73 65 64 20 69 6e 20 6b | 65 79 77 6f 72 64 20 74 |sed in k|eyword t|
|00003270| 61 62 6c 65 20 2a 2f 0a | 23 64 65 66 69 6e 65 20 |able */.|#define |
|00003280| 54 5f 44 45 46 49 4e 45 | 09 31 09 2f 2a 20 74 68 |T_DEFINE|.1./* th|
|00003290| 65 20 22 23 64 65 66 69 | 6e 65 22 20 6b 65 79 77 |e "#defi|ne" keyw|
|000032a0| 6f 72 64 20 2a 2f 0a 23 | 64 65 66 69 6e 65 20 54 |ord */.#|define T|
|000032b0| 5f 49 4e 43 4c 55 44 45 | 09 32 09 2f 2a 20 74 68 |_INCLUDE|.2./* th|
|000032c0| 65 20 22 23 69 6e 63 6c | 75 64 65 22 20 6b 65 79 |e "#incl|ude" key|
|000032d0| 77 6f 72 64 20 2a 2f 0a | 23 64 65 66 69 6e 65 20 |word */.|#define |
|000032e0| 54 5f 49 46 44 45 46 09 | 09 33 09 2f 2a 20 74 68 |T_IFDEF.|.3./* th|
|000032f0| 65 20 22 23 69 66 64 65 | 66 22 20 6b 65 79 77 6f |e "#ifde|f" keywo|
|00003300| 72 64 20 2a 2f 0a 23 64 | 65 66 69 6e 65 20 54 5f |rd */.#d|efine T_|
|00003310| 49 46 09 09 34 09 2f 2a | 20 74 68 65 20 22 23 69 |IF..4./*| the "#i|
|00003320| 66 22 20 6b 65 79 77 6f | 72 64 20 2a 2f 0a 23 64 |f" keywo|rd */.#d|
|00003330| 65 66 69 6e 65 20 54 5f | 45 58 50 41 4e 44 09 35 |efine T_|EXPAND.5|
|00003340| 09 2f 2a 20 61 72 67 75 | 6d 65 6e 74 20 74 6f 20 |./* argu|ment to |
|00003350| 62 65 20 65 78 70 61 6e | 64 65 64 20 28 6e 6f 77 |be expan|ded (now|
|00003360| 20 75 6e 75 73 65 64 29 | 20 2a 2f 0a 23 64 65 66 | unused)| */.#def|
|00003370| 69 6e 65 20 54 5f 4d 41 | 43 52 4f 09 09 36 09 2f |ine T_MA|CRO..6./|
|00003380| 2a 20 6d 61 63 72 6f 20 | 64 65 66 69 6e 65 64 20 |* macro |defined |
|00003390| 62 79 20 22 23 64 65 66 | 69 6e 65 22 20 2a 2f 0a |by "#def|ine" */.|
|000033a0| 23 64 65 66 69 6e 65 20 | 54 5f 45 4c 53 45 09 09 |#define |T_ELSE..|
|000033b0| 37 09 2f 2a 20 22 23 65 | 6c 73 65 22 20 2a 2f 0a |7./* "#e|lse" */.|
|000033c0| 23 64 65 66 69 6e 65 20 | 54 5f 50 52 41 47 4d 41 |#define |T_PRAGMA|
|000033d0| 09 38 09 2f 2a 20 22 23 | 70 72 61 67 6d 61 22 20 |.8./* "#|pragma" |
|000033e0| 2a 2f 0a 23 64 65 66 69 | 6e 65 20 54 5f 45 4c 49 |*/.#defi|ne T_ELI|
|000033f0| 46 09 09 39 09 2f 2a 20 | 22 23 65 6c 73 65 22 20 |F..9./* |"#else" |
|00003400| 2a 2f 0a 23 64 65 66 69 | 6e 65 20 54 5f 55 4e 44 |*/.#defi|ne T_UND|
|00003410| 45 46 09 09 31 30 09 2f | 2a 20 22 23 75 6e 64 65 |EF..10./|* "#unde|
|00003420| 66 22 20 2a 2f 0a 23 64 | 65 66 69 6e 65 20 54 5f |f" */.#d|efine T_|
|00003430| 4c 49 4e 45 09 09 31 31 | 09 2f 2a 20 22 23 6c 69 |LINE..11|./* "#li|
|00003440| 6e 65 22 20 2a 2f 0a 23 | 64 65 66 69 6e 65 20 54 |ne" */.#|define T|
|00003450| 5f 45 52 52 4f 52 09 09 | 31 32 09 2f 2a 20 22 23 |_ERROR..|12./* "#|
|00003460| 65 72 72 6f 72 22 20 2a | 2f 0a 23 64 65 66 69 6e |error" *|/.#defin|
|00003470| 65 20 54 5f 49 46 4e 44 | 45 46 09 31 33 09 2f 2a |e T_IFND|EF.13./*|
|00003480| 20 22 23 69 66 6e 64 65 | 66 22 3b 20 66 6f 72 67 | "#ifnde|f"; forg|
|00003490| 6f 74 20 74 68 69 73 20 | 65 61 72 6c 69 65 72 20 |ot this |earlier |
|000034a0| 2a 2f 0a 23 64 65 66 69 | 6e 65 20 54 5f 45 4e 44 |*/.#defi|ne T_END|
|000034b0| 49 46 09 09 31 34 09 2f | 2a 20 22 23 65 6e 64 69 |IF..14./|* "#endi|
|000034c0| 66 22 20 2a 2f 0a 23 64 | 65 66 69 6e 65 20 54 5f |f" */.#d|efine T_|
|000034d0| 53 50 45 43 4c 49 4e 45 | 09 31 35 09 2f 2a 20 73 |SPECLINE|.15./* s|
|000034e0| 70 65 63 69 61 6c 20 73 | 79 6d 62 6f 6c 20 22 5f |pecial s|ymbol "_|
|000034f0| 5f 4c 49 4e 45 5f 5f 22 | 20 2a 2f 0a 23 64 65 66 |_LINE__"| */.#def|
|00003500| 69 6e 65 20 54 5f 44 41 | 54 45 09 09 31 36 09 2f |ine T_DA|TE..16./|
|00003510| 2a 20 22 5f 5f 44 41 54 | 45 5f 5f 22 20 2a 2f 0a |* "__DAT|E__" */.|
|00003520| 23 64 65 66 69 6e 65 20 | 54 5f 46 49 4c 45 09 09 |#define |T_FILE..|
|00003530| 31 37 09 2f 2a 20 22 5f | 5f 46 49 4c 45 5f 5f 22 |17./* "_|_FILE__"|
|00003540| 20 2a 2f 0a 23 64 65 66 | 69 6e 65 20 54 5f 54 49 | */.#def|ine T_TI|
|00003550| 4d 45 09 09 31 38 09 2f | 2a 20 22 5f 5f 54 49 4d |ME..18./|* "__TIM|
|00003560| 45 5f 5f 22 20 2a 2f 0a | 0a 23 64 65 66 69 6e 65 |E__" */.|.#define|
|00003570| 20 54 5f 53 50 45 43 5f | 44 45 46 49 4e 45 44 09 | T_SPEC_|DEFINED.|
|00003580| 31 39 09 2f 2a 20 73 70 | 65 63 69 61 6c 20 6d 61 |19./* sp|ecial ma|
|00003590| 63 72 6f 20 66 6f 72 20 | 75 73 65 20 69 6e 20 23 |cro for |use in #|
|000035a0| 69 66 20 73 74 61 74 65 | 6d 65 6e 74 73 20 2a 2f |if state|ments */|
|000035b0| 0a 0a 0a 0a 2f 2a 20 73 | 6f 6d 65 20 6d 6f 72 65 |..../* s|ome more|
|000035c0| 20 64 69 66 66 65 72 65 | 6e 74 20 74 79 70 65 73 | differe|nt types|
|000035d0| 20 77 69 6c 6c 20 62 65 | 20 6e 65 65 64 65 64 20 | will be| needed |
|000035e0| 2d 2d 2d 20 6e 6f 20 6c | 6f 6e 67 65 72 20 62 6c |--- no l|onger bl|
|000035f0| 6f 6f 64 79 20 6c 69 6b | 65 6c 79 20 2a 2f 0a 0a |oody lik|ely */..|
|00003600| 0a 69 6e 74 20 64 6f 5f | 64 65 66 69 6e 65 28 29 |.int do_|define()|
|00003610| 2c 20 64 6f 5f 6c 69 6e | 65 28 29 2c 20 64 6f 5f |, do_lin|e(), do_|
|00003620| 69 6e 63 6c 75 64 65 28 | 29 2c 20 64 6f 5f 75 6e |include(|), do_un|
|00003630| 64 65 66 28 29 2c 20 64 | 6f 5f 65 72 72 6f 72 28 |def(), d|o_error(|
|00003640| 29 2c 0a 20 20 64 6f 5f | 70 72 61 67 6d 61 28 29 |),. do_|pragma()|
|00003650| 2c 20 64 6f 5f 69 66 28 | 29 2c 20 64 6f 5f 78 69 |, do_if(|), do_xi|
|00003660| 66 64 65 66 28 29 2c 20 | 64 6f 5f 65 6c 73 65 28 |fdef(), |do_else(|
|00003670| 29 2c 0a 20 20 64 6f 5f | 65 6c 69 66 28 29 2c 20 |),. do_|elif(), |
|00003680| 64 6f 5f 65 6e 64 69 66 | 28 29 3b 0a 0a 0a 2f 2a |do_endif|();.../*|
|00003690| 20 74 61 62 6c 65 20 6f | 66 20 63 6f 6e 74 72 6f | table o|f contro|
|000036a0| 6c 20 77 6f 72 64 73 2c | 20 61 6c 6f 6e 67 20 77 |l words,| along w|
|000036b0| 69 74 68 20 63 6f 64 65 | 20 74 6f 20 65 78 65 63 |ith code| to exec|
|000036c0| 75 74 65 20 77 68 65 6e | 20 74 68 65 20 6b 65 79 |ute when| the key|
|000036d0| 77 6f 72 64 0a 20 20 20 | 69 73 20 73 65 65 6e 2e |word. |is seen.|
|000036e0| 20 20 46 6f 72 20 6e 6f | 77 2c 20 69 74 20 69 73 | For no|w, it is|
|000036f0| 20 73 65 61 72 63 68 65 | 64 20 6c 69 6e 65 61 72 | searche|d linear|
|00003700| 6c 79 2c 20 73 6f 20 70 | 75 74 20 74 68 65 20 6d |ly, so p|ut the m|
|00003710| 6f 73 74 20 66 72 65 71 | 75 65 6e 74 6c 79 0a 20 |ost freq|uently. |
|00003720| 20 20 66 6f 75 6e 64 20 | 6b 65 79 77 6f 72 64 73 | found |keywords|
|00003730| 20 61 74 20 74 68 65 20 | 62 65 67 69 6e 6e 69 6e | at the |beginnin|
|00003740| 67 20 6f 66 20 74 68 65 | 20 6c 69 73 74 2e 20 2a |g of the| list. *|
|00003750| 2f 0a 0a 73 74 72 75 63 | 74 20 6b 65 79 77 6f 72 |/..struc|t keywor|
|00003760| 64 5f 74 61 62 6c 65 20 | 7b 0a 20 20 69 6e 74 20 |d_table |{. int |
|00003770| 6c 65 6e 67 74 68 3b 0a | 20 20 69 6e 74 20 28 2a |length;.| int (*|
|00003780| 66 75 6e 63 29 28 29 3b | 0a 20 20 63 68 61 72 20 |func)();|. char |
|00003790| 2a 6e 61 6d 65 3b 0a 20 | 20 69 6e 74 20 74 79 70 |*name;. | int typ|
|000037a0| 65 3b 0a 7d 20 6b 65 79 | 77 6f 72 64 5f 74 61 62 |e;.} key|word_tab|
|000037b0| 6c 65 5b 5d 20 3d 20 7b | 0a 20 20 7b 20 20 36 2c |le[] = {|. { 6,|
|000037c0| 20 64 6f 5f 64 65 66 69 | 6e 65 2c 20 22 64 65 66 | do_defi|ne, "def|
|000037d0| 69 6e 65 22 2c 20 54 5f | 44 45 46 49 4e 45 7d 2c |ine", T_|DEFINE},|
|000037e0| 0a 20 20 7b 20 20 34 2c | 20 64 6f 5f 6c 69 6e 65 |. { 4,| do_line|
|000037f0| 2c 20 22 6c 69 6e 65 22 | 2c 20 54 5f 4c 49 4e 45 |, "line"|, T_LINE|
|00003800| 7d 2c 0a 20 20 7b 20 20 | 37 2c 20 64 6f 5f 69 6e |},. { |7, do_in|
|00003810| 63 6c 75 64 65 2c 20 22 | 69 6e 63 6c 75 64 65 22 |clude, "|include"|
|00003820| 2c 20 54 5f 49 4e 43 4c | 55 44 45 7d 2c 0a 20 20 |, T_INCL|UDE},. |
|00003830| 7b 20 20 35 2c 20 64 6f | 5f 75 6e 64 65 66 2c 20 |{ 5, do|_undef, |
|00003840| 22 75 6e 64 65 66 22 2c | 20 54 5f 55 4e 44 45 46 |"undef",| T_UNDEF|
|00003850| 7d 2c 0a 20 20 7b 20 20 | 35 2c 20 64 6f 5f 65 72 |},. { |5, do_er|
|00003860| 72 6f 72 2c 20 22 65 72 | 72 6f 72 22 2c 20 54 5f |ror, "er|ror", T_|
|00003870| 45 52 52 4f 52 7d 2c 0a | 20 20 7b 20 20 32 2c 20 |ERROR},.| { 2, |
|00003880| 64 6f 5f 69 66 2c 20 22 | 69 66 22 2c 20 54 5f 49 |do_if, "|if", T_I|
|00003890| 46 7d 2c 0a 20 20 7b 20 | 20 35 2c 20 64 6f 5f 78 |F},. { | 5, do_x|
|000038a0| 69 66 64 65 66 2c 20 22 | 69 66 64 65 66 22 2c 20 |ifdef, "|ifdef", |
|000038b0| 54 5f 49 46 44 45 46 7d | 2c 0a 20 20 7b 20 20 36 |T_IFDEF}|,. { 6|
|000038c0| 2c 20 64 6f 5f 78 69 66 | 64 65 66 2c 20 22 69 66 |, do_xif|def, "if|
|000038d0| 6e 64 65 66 22 2c 20 54 | 5f 49 46 4e 44 45 46 7d |ndef", T|_IFNDEF}|
|000038e0| 2c 0a 20 20 7b 20 20 34 | 2c 20 64 6f 5f 65 6c 73 |,. { 4|, do_els|
|000038f0| 65 2c 20 22 65 6c 73 65 | 22 2c 20 54 5f 45 4c 53 |e, "else|", T_ELS|
|00003900| 45 7d 2c 0a 20 20 7b 20 | 20 34 2c 20 64 6f 5f 65 |E},. { | 4, do_e|
|00003910| 6c 69 66 2c 20 22 65 6c | 69 66 22 2c 20 54 5f 45 |lif, "el|if", T_E|
|00003920| 4c 49 46 7d 2c 0a 20 20 | 7b 20 20 35 2c 20 64 6f |LIF},. |{ 5, do|
|00003930| 5f 65 6e 64 69 66 2c 20 | 22 65 6e 64 69 66 22 2c |_endif, |"endif",|
|00003940| 20 54 5f 45 4e 44 49 46 | 7d 2c 0a 20 20 7b 20 20 | T_ENDIF|},. { |
|00003950| 36 2c 20 64 6f 5f 70 72 | 61 67 6d 61 2c 20 22 70 |6, do_pr|agma, "p|
|00003960| 72 61 67 6d 61 22 2c 20 | 54 5f 50 52 41 47 4d 41 |ragma", |T_PRAGMA|
|00003970| 7d 2c 0a 20 20 7b 20 20 | 2d 31 2c 20 30 2c 20 22 |},. { |-1, 0, "|
|00003980| 22 2c 20 2d 31 7d 2c 0a | 7d 3b 0a 0a 2f 2a 20 53 |", -1},.|};../* S|
|00003990| 6f 6d 65 20 64 65 66 69 | 6e 69 74 69 6f 6e 73 20 |ome defi|nitions |
|000039a0| 66 6f 72 20 74 68 65 20 | 68 61 73 68 20 74 61 62 |for the |hash tab|
|000039b0| 6c 65 2e 20 20 54 68 65 | 20 68 61 73 68 20 66 75 |le. The| hash fu|
|000039c0| 6e 63 74 69 6f 6e 20 4d | 55 53 54 20 62 65 0a 20 |nction M|UST be. |
|000039d0| 20 20 63 6f 6d 70 75 74 | 65 64 20 61 73 20 73 68 | comput|ed as sh|
|000039e0| 6f 77 6e 20 69 6e 20 68 | 61 73 68 66 28 29 20 62 |own in h|ashf() b|
|000039f0| 65 6c 6f 77 2e 20 20 54 | 68 61 74 20 69 73 20 62 |elow. T|hat is b|
|00003a00| 65 63 61 75 73 65 20 74 | 68 65 20 72 65 73 63 61 |ecause t|he resca|
|00003a10| 6e 0a 20 20 20 6c 6f 6f | 70 20 63 6f 6d 70 75 74 |n. loo|p comput|
|00003a20| 65 73 20 74 68 65 20 68 | 61 73 68 20 76 61 6c 75 |es the h|ash valu|
|00003a30| 65 20 60 6f 6e 20 74 68 | 65 20 66 6c 79 27 20 66 |e `on th|e fly' f|
|00003a40| 6f 72 20 6d 6f 73 74 20 | 74 6f 6b 65 6e 73 2c 0a |or most |tokens,.|
|00003a50| 20 20 20 69 6e 20 6f 72 | 64 65 72 20 74 6f 20 61 | in or|der to a|
|00003a60| 76 6f 69 64 20 74 68 65 | 20 6f 76 65 72 68 65 61 |void the| overhea|
|00003a70| 64 20 6f 66 20 61 20 6c | 6f 74 20 6f 66 20 70 72 |d of a l|ot of pr|
|00003a80| 6f 63 65 64 75 72 65 20 | 63 61 6c 6c 73 20 74 6f |ocedure |calls to|
|00003a90| 0a 20 20 20 74 68 65 20 | 68 61 73 68 66 28 29 20 |. the |hashf() |
|00003aa0| 66 75 6e 63 74 69 6f 6e | 2e 20 20 48 61 73 68 66 |function|. Hashf|
|00003ab0| 28 29 20 6f 6e 6c 79 20 | 65 78 69 73 74 73 20 66 |() only |exists f|
|00003ac0| 6f 72 20 74 68 65 20 73 | 61 6b 65 20 6f 66 0a 20 |or the s|ake of. |
|00003ad0| 20 20 70 6f 6c 69 74 65 | 6e 65 73 73 2c 20 66 6f | polite|ness, fo|
|00003ae0| 72 20 75 73 65 20 77 68 | 65 6e 20 73 70 65 65 64 |r use wh|en speed|
|00003af0| 20 69 73 6e 27 74 20 73 | 6f 20 69 6d 70 6f 72 74 | isn't s|o import|
|00003b00| 61 6e 74 2e 20 2a 2f 0a | 0a 23 64 65 66 69 6e 65 |ant. */.|.#define|
|00003b10| 20 48 41 53 48 53 49 5a | 45 20 31 30 30 39 0a 48 | HASHSIZ|E 1009.H|
|00003b20| 41 53 48 4e 4f 44 45 20 | 2a 68 61 73 68 74 61 62 |ASHNODE |*hashtab|
|00003b30| 5b 48 41 53 48 53 49 5a | 45 5d 3b 0a 23 64 65 66 |[HASHSIZ|E];.#def|
|00003b40| 69 6e 65 20 48 41 53 48 | 53 54 45 50 28 6f 6c 64 |ine HASH|STEP(old|
|00003b50| 2c 20 63 29 20 28 28 6f | 6c 64 20 3c 3c 20 31 29 |, c) ((o|ld << 1)|
|00003b60| 20 2b 20 63 29 0a 23 64 | 65 66 69 6e 65 20 4d 41 | + c).#d|efine MA|
|00003b70| 4b 45 5f 50 4f 53 28 76 | 29 20 28 76 20 26 20 7e |KE_POS(v|) (v & ~|
|00003b80| 30 78 38 30 30 30 30 30 | 30 30 29 20 2f 2a 20 6d |0x800000|00) /* m|
|00003b90| 61 6b 65 20 6e 75 6d 62 | 65 72 20 70 6f 73 69 74 |ake numb|er posit|
|00003ba0| 69 76 65 20 2a 2f 0a 0a | 23 64 65 66 69 6e 65 20 |ive */..|#define |
|00003bb0| 53 4b 49 50 5f 57 48 49 | 54 45 5f 53 50 41 43 45 |SKIP_WHI|TE_SPACE|
|00003bc0| 28 70 29 20 7b 20 77 68 | 69 6c 65 20 28 69 73 5f |(p) { wh|ile (is_|
|00003bd0| 68 6f 72 5f 73 70 61 63 | 65 5b 2a 70 5d 29 20 70 |hor_spac|e[*p]) p|
|00003be0| 2b 2b 3b 20 7d 0a 0a 0c | 0a 0a 6d 61 69 6e 20 28 |++; }...|..main (|
|00003bf0| 61 72 67 63 2c 20 61 72 | 67 76 29 0a 20 20 20 20 |argc, ar|gv). |
|00003c00| 20 69 6e 74 20 61 72 67 | 63 3b 0a 20 20 20 20 20 | int arg|c;. |
|00003c10| 63 68 61 72 20 2a 2a 61 | 72 67 76 3b 0a 7b 0a 20 |char **a|rgv;.{. |
|00003c20| 20 73 74 72 75 63 74 20 | 73 74 61 74 20 73 62 75 | struct |stat sbu|
|00003c30| 66 3b 0a 20 20 63 68 61 | 72 20 2a 69 6e 5f 66 6e |f;. cha|r *in_fn|
|00003c40| 61 6d 65 2c 20 2a 6f 75 | 74 5f 66 6e 61 6d 65 3b |ame, *ou|t_fname;|
|00003c50| 0a 20 20 69 6e 74 20 6f | 75 74 5f 66 64 20 3d 20 |. int o|ut_fd = |
|00003c60| 31 3b 09 2f 2a 20 64 65 | 66 61 75 6c 74 20 74 6f |1;./* de|fault to|
|00003c70| 20 73 74 64 6f 75 74 20 | 2a 2f 0a 20 20 69 6e 74 | stdout |*/. int|
|00003c80| 20 66 2c 20 69 3b 0a 20 | 20 46 49 4c 45 5f 42 55 | f, i;. | FILE_BU|
|00003c90| 46 20 2a 66 70 3b 0a 0a | 20 20 70 72 6f 67 6e 61 |F *fp;..| progna|
|00003ca0| 6d 65 20 3d 20 61 72 67 | 76 5b 30 5d 3b 0a 20 20 |me = arg|v[0];. |
|00003cb0| 69 6e 5f 66 6e 61 6d 65 | 20 3d 20 4e 55 4c 4c 3b |in_fname| = NULL;|
|00003cc0| 0a 20 20 6f 75 74 5f 66 | 6e 61 6d 65 20 3d 20 4e |. out_f|name = N|
|00003cd0| 55 4c 4c 3b 0a 20 20 69 | 6e 69 74 69 61 6c 69 7a |ULL;. i|nitializ|
|00003ce0| 65 5f 72 61 6e 64 6f 6d | 5f 6a 75 6e 6b 20 28 29 |e_random|_junk ()|
|00003cf0| 3b 0a 0a 20 20 66 70 20 | 3d 20 26 69 6e 73 74 61 |;.. fp |= &insta|
|00003d00| 63 6b 5b 69 6e 64 65 70 | 74 68 2b 2b 5d 3b 0a 0a |ck[indep|th++];..|
|00003d10| 2f 2a 20 20 69 66 20 28 | 61 72 67 63 20 3c 20 32 |/* if (|argc < 2|
|00003d20| 29 09 09 4a 46 20 6e 6f | 20 61 72 67 73 20 6d 65 |)..JF no| args me|
|00003d30| 61 6e 73 20 77 6f 72 6b | 20 61 73 20 66 69 6c 74 |ans work| as filt|
|00003d40| 65 72 0a 20 20 20 20 72 | 65 74 75 72 6e 20 46 41 |er. r|eturn FA|
|00003d50| 54 41 4c 5f 45 58 49 54 | 5f 43 4f 44 45 3b 20 2a |TAL_EXIT|_CODE; *|
|00003d60| 2f 0a 0a 20 20 66 6f 72 | 20 28 69 20 3d 20 31 3b |/.. for| (i = 1;|
|00003d70| 20 69 20 3c 20 61 72 67 | 63 3b 20 69 2b 2b 29 20 | i < arg|c; i++) |
|00003d80| 7b 0a 20 20 20 20 69 66 | 20 28 61 72 67 76 5b 69 |{. if| (argv[i|
|00003d90| 5d 5b 30 5d 20 21 3d 20 | 27 2d 27 29 20 7b 0a 20 |][0] != |'-') {. |
|00003da0| 20 20 20 20 20 69 66 20 | 28 6f 75 74 5f 66 6e 61 | if |(out_fna|
|00003db0| 6d 65 20 21 3d 20 4e 55 | 4c 4c 29 0a 09 66 61 74 |me != NU|LL)..fat|
|00003dc0| 61 6c 20 28 22 55 73 61 | 67 65 3a 20 25 73 20 5b |al ("Usa|ge: %s [|
|00003dd0| 73 77 69 74 63 68 65 73 | 5d 20 69 6e 70 75 74 20 |switches|] input |
|00003de0| 6f 75 74 70 75 74 5c 6e | 22 2c 20 61 72 67 76 5b |output\n|", argv[|
|00003df0| 30 5d 29 3b 0a 20 20 20 | 20 20 20 65 6c 73 65 20 |0]);. | else |
|00003e00| 69 66 20 28 69 6e 5f 66 | 6e 61 6d 65 20 21 3d 20 |if (in_f|name != |
|00003e10| 4e 55 4c 4c 29 20 7b 0a | 09 6f 75 74 5f 66 6e 61 |NULL) {.|.out_fna|
|00003e20| 6d 65 20 3d 20 61 72 67 | 76 5b 69 5d 3b 0a 09 69 |me = arg|v[i];..i|
|00003e30| 66 20 28 28 6f 75 74 5f | 66 64 20 3d 20 63 72 65 |f ((out_|fd = cre|
|00003e40| 61 74 20 28 6f 75 74 5f | 66 6e 61 6d 65 2c 20 30 |at (out_|fname, 0|
|00003e50| 36 36 36 29 29 20 3c 20 | 30 29 0a 09 20 20 70 66 |666)) < |0).. pf|
|00003e60| 61 74 61 6c 5f 77 69 74 | 68 5f 6e 61 6d 65 20 28 |atal_wit|h_name (|
|00003e70| 6f 75 74 5f 66 6e 61 6d | 65 29 3b 0a 20 20 20 20 |out_fnam|e);. |
|00003e80| 20 20 7d 20 65 6c 73 65 | 0a 09 69 6e 5f 66 6e 61 | } else|..in_fna|
|00003e90| 6d 65 20 3d 20 61 72 67 | 76 5b 69 5d 3b 0a 20 20 |me = arg|v[i];. |
|00003ea0| 20 20 7d 20 65 6c 73 65 | 20 7b 0a 20 20 20 20 20 | } else| {. |
|00003eb0| 20 73 77 69 74 63 68 20 | 28 61 72 67 76 5b 69 5d | switch |(argv[i]|
|00003ec0| 5b 31 5d 29 20 7b 0a 09 | 55 5f 43 48 41 52 20 2a |[1]) {..|U_CHAR *|
|00003ed0| 70 3b 0a 09 73 74 72 75 | 63 74 20 64 69 72 65 63 |p;..stru|ct direc|
|00003ee0| 74 6f 72 79 5f 73 74 61 | 63 6b 20 2a 64 69 72 74 |tory_sta|ck *dirt|
|00003ef0| 6d 70 3b 0a 20 20 20 20 | 20 20 63 61 73 65 20 27 |mp;. | case '|
|00003f00| 44 27 3a 0a 09 69 66 20 | 28 28 70 20 3d 20 28 55 |D':..if |((p = (U|
|00003f10| 5f 43 48 41 52 20 2a 29 | 20 69 6e 64 65 78 28 61 |_CHAR *)| index(a|
|00003f20| 72 67 76 5b 69 5d 2b 32 | 2c 20 27 3d 27 29 29 20 |rgv[i]+2|, '=')) |
|00003f30| 21 3d 20 4e 55 4c 4c 29 | 0a 09 20 20 2a 70 20 3d |!= NULL)|.. *p =|
|00003f40| 20 27 20 27 3b 0a 09 6d | 61 6b 65 5f 64 65 66 69 | ' ';..m|ake_defi|
|00003f50| 6e 69 74 69 6f 6e 20 28 | 61 72 67 76 5b 69 5d 20 |nition (|argv[i] |
|00003f60| 2b 20 32 29 3b 0a 09 62 | 72 65 61 6b 3b 0a 20 20 |+ 2);..b|reak;. |
|00003f70| 20 20 20 20 63 61 73 65 | 20 27 55 27 3a 09 09 2f | case| 'U':../|
|00003f80| 2a 20 4a 46 20 23 75 6e | 64 65 66 20 73 6f 6d 65 |* JF #un|def some|
|00003f90| 74 68 69 6e 67 20 2a 2f | 0a 09 6d 61 6b 65 5f 75 |thing */|..make_u|
|00003fa0| 6e 64 65 66 28 61 72 67 | 76 5b 69 5d 20 2b 20 32 |ndef(arg|v[i] + 2|
|00003fb0| 29 3b 0a 09 62 72 65 61 | 6b 3b 0a 20 20 20 20 20 |);..brea|k;. |
|00003fc0| 20 63 61 73 65 20 27 43 | 27 3a 09 09 2f 2a 20 4a | case 'C|':../* J|
|00003fd0| 46 20 64 6f 20 6c 61 74 | 65 72 20 2d 43 20 6d 65 |F do lat|er -C me|
|00003fe0| 61 6e 73 20 6c 65 61 76 | 65 20 63 6f 6d 6d 65 6e |ans leav|e commen|
|00003ff0| 74 73 20 61 6c 6f 6e 65 | 21 20 2a 2f 0a 09 70 75 |ts alone|! */..pu|
|00004000| 74 5f 6f 75 74 5f 63 6f | 6d 6d 65 6e 74 73 2b 2b |t_out_co|mments++|
|00004010| 3b 0a 09 62 72 65 61 6b | 3b 0a 20 20 20 20 20 20 |;..break|;. |
|00004020| 63 61 73 65 20 27 45 27 | 3a 09 09 09 2f 2a 20 2d |case 'E'|:.../* -|
|00004030| 45 20 63 6f 6d 65 73 20 | 66 72 6f 6d 20 63 63 20 |E comes |from cc |
|00004040| 2d 45 3b 20 69 67 6e 6f | 72 65 20 69 74 2e 20 20 |-E; igno|re it. |
|00004050| 2a 2f 0a 09 62 72 65 61 | 6b 3b 0a 20 20 20 20 20 |*/..brea|k;. |
|00004060| 20 63 61 73 65 20 27 4d | 27 3a 09 09 09 2f 2a 20 | case 'M|':.../* |
|00004070| 4d 61 6b 65 66 69 6c 65 | 20 64 65 70 65 6e 64 65 |Makefile| depende|
|00004080| 6e 63 69 65 73 20 6f 72 | 20 73 6f 6d 65 74 68 69 |ncies or| somethi|
|00004090| 6e 67 20 6c 69 6b 65 0a | 09 09 09 09 20 20 20 74 |ng like.|.... t|
|000040a0| 68 61 74 2e 20 20 4e 6f | 74 20 69 6d 70 6c 69 6d |hat. No|t implim|
|000040b0| 65 6e 74 65 64 20 79 65 | 74 20 2a 2f 0a 09 62 72 |ented ye|t */..br|
|000040c0| 65 61 6b 3b 0a 20 20 20 | 20 20 20 63 61 73 65 20 |eak;. | case |
|000040d0| 27 49 27 3a 09 09 09 2f | 2a 20 4a 46 20 68 61 6e |'I':.../|* JF han|
|000040e0| 64 6c 65 20 64 69 72 65 | 63 74 6f 72 79 20 70 61 |dle dire|ctory pa|
|000040f0| 74 68 20 72 69 67 68 74 | 20 2a 2f 0a 20 20 20 20 |th right| */. |
|00004100| 20 20 20 20 64 69 72 74 | 6d 70 20 3d 20 28 73 74 | dirt|mp = (st|
|00004110| 72 75 63 74 20 64 69 72 | 65 63 74 6f 72 79 5f 73 |ruct dir|ectory_s|
|00004120| 74 61 63 6b 20 2a 29 0a | 09 09 09 78 6d 61 6c 6c |tack *).|...xmall|
|00004130| 6f 63 20 28 73 69 7a 65 | 6f 66 20 28 73 74 72 75 |oc (size|of (stru|
|00004140| 63 74 20 64 69 72 65 63 | 74 6f 72 79 5f 73 74 61 |ct direc|tory_sta|
|00004150| 63 6b 29 29 3b 0a 09 64 | 69 72 74 6d 70 2d 3e 6e |ck));..d|irtmp->n|
|00004160| 65 78 74 20 3d 20 69 6e | 63 6c 75 64 65 2d 3e 6e |ext = in|clude->n|
|00004170| 65 78 74 3b 0a 09 69 6e | 63 6c 75 64 65 2d 3e 6e |ext;..in|clude->n|
|00004180| 65 78 74 20 3d 20 64 69 | 72 74 6d 70 3b 0a 09 64 |ext = di|rtmp;..d|
|00004190| 69 72 74 6d 70 2d 3e 66 | 6e 61 6d 65 20 3d 20 61 |irtmp->f|name = a|
|000041a0| 72 67 76 5b 69 5d 2b 32 | 3b 0a 09 69 6e 63 6c 75 |rgv[i]+2|;..inclu|
|000041b0| 64 65 20 3d 20 64 69 72 | 74 6d 70 3b 0a 09 69 66 |de = dir|tmp;..if|
|000041c0| 20 28 73 74 72 6c 65 6e | 20 28 61 72 67 76 5b 69 | (strlen| (argv[i|
|000041d0| 5d 29 20 3e 20 6d 61 78 | 5f 69 6e 63 6c 75 64 65 |]) > max|_include|
|000041e0| 5f 6c 65 6e 29 0a 09 20 | 20 6d 61 78 5f 69 6e 63 |_len).. | max_inc|
|000041f0| 6c 75 64 65 5f 6c 65 6e | 20 3d 20 73 74 72 6c 65 |lude_len| = strle|
|00004200| 6e 20 28 61 72 67 76 5b | 69 5d 29 3b 0a 09 62 72 |n (argv[|i]);..br|
|00004210| 65 61 6b 3b 0a 0a 20 20 | 20 20 20 20 63 61 73 65 |eak;.. | case|
|00004220| 20 27 5c 30 27 3a 20 2f | 2a 20 4a 46 20 68 61 6e | '\0': /|* JF han|
|00004230| 64 6c 65 20 27 2d 27 20 | 61 73 20 66 69 6c 65 20 |dle '-' |as file |
|00004240| 6e 61 6d 65 20 6d 65 61 | 6e 69 6e 67 20 73 74 64 |name mea|ning std|
|00004250| 69 6e 20 6f 72 20 73 74 | 64 6f 75 74 20 2a 2f 0a |in or st|dout */.|
|00004260| 09 69 66 20 28 69 6e 5f | 66 6e 61 6d 65 20 3d 3d |.if (in_|fname ==|
|00004270| 20 4e 55 4c 4c 29 20 7b | 0a 09 20 20 69 6e 5f 66 | NULL) {|.. in_f|
|00004280| 6e 61 6d 65 20 3d 20 53 | 54 44 49 4e 5f 46 49 4c |name = S|TDIN_FIL|
|00004290| 45 3b 0a 09 20 20 62 72 | 65 61 6b 3b 0a 09 7d 20 |E;.. br|eak;..} |
|000042a0| 65 6c 73 65 20 69 66 20 | 28 6f 75 74 5f 66 6e 61 |else if |(out_fna|
|000042b0| 6d 65 20 3d 3d 20 4e 55 | 4c 4c 29 20 7b 0a 09 20 |me == NU|LL) {.. |
|000042c0| 20 6f 75 74 5f 66 6e 61 | 6d 65 20 3d 20 22 73 74 | out_fna|me = "st|
|000042d0| 64 6f 75 74 22 3b 0a 09 | 20 20 62 72 65 61 6b 3b |dout";..| break;|
|000042e0| 0a 09 7d 09 2f 2a 20 65 | 6c 73 65 20 66 61 6c 6c |..}./* e|lse fall|
|000042f0| 20 74 68 72 6f 75 67 68 | 20 69 6e 74 6f 20 65 72 | through| into er|
|00004300| 72 6f 72 20 2a 2f 0a 0a | 20 20 20 20 20 20 64 65 |ror */..| de|
|00004310| 66 61 75 6c 74 3a 0a 09 | 66 61 74 61 6c 20 28 22 |fault:..|fatal ("|
|00004320| 49 6c 6c 65 67 61 6c 20 | 6f 70 74 69 6f 6e 20 25 |Illegal |option %|
|00004330| 73 5c 6e 22 2c 20 61 72 | 67 76 5b 69 5d 29 3b 0a |s\n", ar|gv[i]);.|
|00004340| 20 20 20 20 20 20 7d 0a | 20 20 20 20 7d 0a 20 20 | }.| }. |
|00004350| 7d 0a 0a 20 20 2f 2a 20 | 4a 46 20 63 68 65 63 6b |}.. /* |JF check|
|00004360| 20 66 6f 72 20 73 74 64 | 69 6e 20 2a 2f 0a 20 20 | for std|in */. |
|00004370| 69 66 20 28 69 6e 5f 66 | 6e 61 6d 65 20 3d 3d 20 |if (in_f|name == |
|00004380| 53 54 44 49 4e 5f 46 49 | 4c 45 20 7c 7c 20 69 6e |STDIN_FI|LE || in|
|00004390| 5f 66 6e 61 6d 65 20 3d | 3d 20 4e 55 4c 4c 29 0a |_fname =|= NULL).|
|000043a0| 20 20 20 20 66 20 3d 20 | 30 3b 0a 20 20 65 6c 73 | f = |0;. els|
|000043b0| 65 20 69 66 20 28 28 66 | 20 3d 20 6f 70 65 6e 20 |e if ((f| = open |
|000043c0| 28 69 6e 5f 66 6e 61 6d | 65 2c 20 4f 5f 52 44 4f |(in_fnam|e, O_RDO|
|000043d0| 4e 4c 59 29 29 20 3c 20 | 30 29 0a 20 20 20 20 67 |NLY)) < |0). g|
|000043e0| 6f 74 6f 20 70 65 72 72 | 6f 72 3b 0a 0a 20 20 66 |oto perr|or;.. f|
|000043f0| 73 74 61 74 20 28 66 2c | 20 26 73 62 75 66 29 3b |stat (f,| &sbuf);|
|00004400| 0a 20 20 66 70 2d 3e 66 | 6e 61 6d 65 20 3d 20 69 |. fp->f|name = i|
|00004410| 6e 5f 66 6e 61 6d 65 3b | 0a 20 20 66 70 2d 3e 6c |n_fname;|. fp->l|
|00004420| 69 6e 65 6e 6f 20 3d 20 | 31 3b 0a 20 20 2f 2a 20 |ineno = |1;. /* |
|00004430| 4a 46 20 61 6c 6c 20 74 | 68 69 73 20 69 73 20 6d |JF all t|his is m|
|00004440| 69 6e 65 20 61 62 6f 75 | 74 20 72 65 61 64 69 6e |ine abou|t readin|
|00004450| 67 20 70 69 70 65 73 20 | 61 6e 64 20 74 74 79 73 |g pipes |and ttys|
|00004460| 20 2a 2f 0a 20 20 69 66 | 20 28 28 73 62 75 66 2e | */. if| ((sbuf.|
|00004470| 73 74 5f 6d 6f 64 65 20 | 26 20 53 5f 49 46 4d 54 |st_mode |& S_IFMT|
|00004480| 29 20 21 3d 20 53 5f 49 | 46 52 45 47 29 20 7b 0a |) != S_I|FREG) {.|
|00004490| 20 20 20 20 69 6e 74 20 | 73 69 7a 65 3b 0a 20 20 | int |size;. |
|000044a0| 20 20 69 6e 74 20 62 73 | 69 7a 65 3b 0a 20 20 20 | int bs|ize;. |
|000044b0| 20 69 6e 74 20 63 6e 74 | 3b 0a 20 20 20 20 55 5f | int cnt|;. U_|
|000044c0| 43 48 41 52 20 2a 62 75 | 66 70 3b 0a 0a 20 20 20 |CHAR *bu|fp;.. |
|000044d0| 20 62 73 69 7a 65 20 3d | 20 32 30 30 30 3b 0a 20 | bsize =| 2000;. |
|000044e0| 20 20 20 73 69 7a 65 20 | 3d 20 30 3b 0a 20 20 20 | size |= 0;. |
|000044f0| 20 66 70 2d 3e 62 75 66 | 20 3d 20 28 55 5f 43 48 | fp->buf| = (U_CH|
|00004500| 41 52 20 2a 29 20 78 6d | 61 6c 6c 6f 63 20 28 62 |AR *) xm|alloc (b|
|00004510| 73 69 7a 65 20 2b 20 31 | 29 3b 0a 20 20 20 20 62 |size + 1|);. b|
|00004520| 75 66 70 20 3d 20 66 70 | 2d 3e 62 75 66 3b 0a 20 |ufp = fp|->buf;. |
|00004530| 20 20 20 66 6f 72 20 28 | 3b 3b 29 20 7b 0a 20 20 | for (|;;) {. |
|00004540| 20 20 20 20 63 6e 74 20 | 3d 20 72 65 61 64 20 28 | cnt |= read (|
|00004550| 66 2c 20 62 75 66 70 2c | 20 62 73 69 7a 65 20 2d |f, bufp,| bsize -|
|00004560| 20 73 69 7a 65 29 3b 0a | 20 20 20 20 20 20 69 66 | size);.| if|
|00004570| 20 28 63 6e 74 20 3c 20 | 30 29 20 67 6f 74 6f 20 | (cnt < |0) goto |
|00004580| 70 65 72 72 6f 72 3b 09 | 2f 2a 20 65 72 72 6f 72 |perror;.|/* error|
|00004590| 21 20 2a 2f 0a 20 20 20 | 20 20 20 69 66 20 28 63 |! */. | if (c|
|000045a0| 6e 74 20 3d 3d 20 30 29 | 20 62 72 65 61 6b 3b 09 |nt == 0)| break;.|
|000045b0| 2f 2a 20 45 6e 64 20 6f | 66 20 66 69 6c 65 20 2a |/* End o|f file *|
|000045c0| 2f 0a 20 20 20 20 20 20 | 73 69 7a 65 20 2b 3d 20 |/. |size += |
|000045d0| 63 6e 74 3b 0a 20 20 20 | 20 20 20 62 75 66 70 20 |cnt;. | bufp |
|000045e0| 2b 3d 20 63 6e 74 3b 0a | 20 20 20 20 20 20 69 66 |+= cnt;.| if|
|000045f0| 20 28 62 73 69 7a 65 2d | 73 69 7a 65 20 3d 3d 20 | (bsize-|size == |
|00004600| 30 29 20 7b 09 2f 2a 20 | 42 75 66 66 65 72 20 69 |0) {./* |Buffer i|
|00004610| 73 20 66 75 6c 6c 21 20 | 2a 2f 0a 20 20 20 20 20 |s full! |*/. |
|00004620| 20 20 20 62 73 69 7a 65 | 20 2a 3d 20 32 3b 0a 20 | bsize| *= 2;. |
|00004630| 20 20 20 20 20 20 20 66 | 70 2d 3e 62 75 66 20 3d | f|p->buf =|
|00004640| 20 28 55 5f 43 48 41 52 | 20 2a 29 20 78 72 65 61 | (U_CHAR| *) xrea|
|00004650| 6c 6c 6f 63 20 28 66 70 | 2d 3e 62 75 66 2c 20 62 |lloc (fp|->buf, b|
|00004660| 73 69 7a 65 20 2b 20 31 | 29 3b 0a 09 62 75 66 70 |size + 1|);..bufp|
|00004670| 20 3d 20 66 70 2d 3e 62 | 75 66 20 2b 20 73 69 7a | = fp->b|uf + siz|
|00004680| 65 3b 09 2f 2a 20 4d 61 | 79 20 68 61 76 65 20 6d |e;./* Ma|y have m|
|00004690| 6f 76 65 64 20 2a 2f 0a | 20 20 20 20 20 20 7d 0a |oved */.| }.|
|000046a0| 20 20 20 20 7d 0a 20 20 | 20 20 66 70 2d 3e 62 75 | }. | fp->bu|
|000046b0| 66 5b 73 69 7a 65 5d 20 | 3d 20 27 5c 30 27 3b 0a |f[size] |= '\0';.|
|000046c0| 20 20 20 20 66 70 2d 3e | 6c 65 6e 67 74 68 20 3d | fp->|length =|
|000046d0| 20 73 69 7a 65 3b 0a 20 | 20 7d 20 65 6c 73 65 20 | size;. | } else |
|000046e0| 7b 0a 20 20 20 20 66 70 | 2d 3e 6c 65 6e 67 74 68 |{. fp|->length|
|000046f0| 20 3d 20 73 62 75 66 2e | 73 74 5f 73 69 7a 65 3b | = sbuf.|st_size;|
|00004700| 0a 20 20 20 20 66 70 2d | 3e 62 75 66 20 3d 20 28 |. fp-|>buf = (|
|00004710| 55 5f 43 48 41 52 20 2a | 29 20 61 6c 6c 6f 63 61 |U_CHAR *|) alloca|
|00004720| 20 28 73 62 75 66 2e 73 | 74 5f 73 69 7a 65 20 2b | (sbuf.s|t_size +|
|00004730| 20 31 29 3b 0a 0a 20 20 | 20 20 69 66 20 28 72 65 | 1);.. | if (re|
|00004740| 61 64 20 28 66 2c 20 66 | 70 2d 3e 62 75 66 2c 20 |ad (f, f|p->buf, |
|00004750| 73 62 75 66 2e 73 74 5f | 73 69 7a 65 29 20 21 3d |sbuf.st_|size) !=|
|00004760| 20 73 62 75 66 2e 73 74 | 5f 73 69 7a 65 29 0a 20 | sbuf.st|_size). |
|00004770| 20 20 20 20 20 67 6f 74 | 6f 20 70 65 72 72 6f 72 | got|o perror|
|00004780| 3b 0a 0a 20 20 20 20 66 | 70 2d 3e 62 75 66 5b 73 |;.. f|p->buf[s|
|00004790| 62 75 66 2e 73 74 5f 73 | 69 7a 65 5d 20 3d 20 27 |buf.st_s|ize] = '|
|000047a0| 5c 30 27 3b 0a 20 20 7d | 0a 0a 20 20 2f 2a 20 69 |\0';. }|.. /* i|
|000047b0| 6e 69 74 69 61 6c 69 7a | 65 20 6f 75 74 70 75 74 |nitializ|e output|
|000047c0| 20 62 75 66 66 65 72 20 | 2a 2f 0a 20 20 6f 75 74 | buffer |*/. out|
|000047d0| 62 75 66 2e 62 75 66 20 | 3d 20 28 55 5f 43 48 41 |buf.buf |= (U_CHA|
|000047e0| 52 20 2a 29 20 78 6d 61 | 6c 6c 6f 63 20 28 4f 55 |R *) xma|lloc (OU|
|000047f0| 54 42 55 46 5f 53 49 5a | 45 29 3b 0a 20 20 6f 75 |TBUF_SIZ|E);. ou|
|00004800| 74 62 75 66 2e 62 75 66 | 70 20 3d 20 6f 75 74 62 |tbuf.buf|p = outb|
|00004810| 75 66 2e 62 75 66 3b 0a | 20 20 6f 75 74 62 75 66 |uf.buf;.| outbuf|
|00004820| 2e 6c 65 6e 67 74 68 20 | 3d 20 4f 55 54 42 55 46 |.length |= OUTBUF|
|00004830| 5f 53 49 5a 45 3b 0a 0a | 20 20 6f 75 74 70 75 74 |_SIZE;..| output|
|00004840| 5f 6c 69 6e 65 5f 63 6f | 6d 6d 61 6e 64 20 28 66 |_line_co|mmand (f|
|00004850| 70 2c 20 26 6f 75 74 62 | 75 66 29 3b 0a 20 20 72 |p, &outb|uf);. r|
|00004860| 65 73 63 61 6e 20 28 66 | 70 2c 20 26 6f 75 74 62 |escan (f|p, &outb|
|00004870| 75 66 29 3b 0a 0a 20 20 | 2f 2a 20 64 6f 20 73 6f |uf);.. |/* do so|
|00004880| 6d 65 74 68 69 6e 67 20 | 64 69 66 66 65 72 65 6e |mething |differen|
|00004890| 74 20 74 68 61 6e 20 74 | 68 69 73 20 6c 61 74 65 |t than t|his late|
|000048a0| 72 20 2a 2f 0a 20 20 66 | 66 6c 75 73 68 20 28 73 |r */. f|flush (s|
|000048b0| 74 64 6f 75 74 29 3b 0a | 20 20 77 72 69 74 65 20 |tdout);.| write |
|000048c0| 28 6f 75 74 5f 66 64 2c | 20 6f 75 74 62 75 66 2e |(out_fd,| outbuf.|
|000048d0| 62 75 66 2c 20 6f 75 74 | 62 75 66 2e 62 75 66 70 |buf, out|buf.bufp|
|000048e0| 20 2d 20 6f 75 74 62 75 | 66 2e 62 75 66 29 3b 0a | - outbu|f.buf);.|
|000048f0| 20 20 65 78 69 74 20 28 | 30 29 3b 0a 0a 20 70 65 | exit (|0);.. pe|
|00004900| 72 72 6f 72 3a 0a 20 20 | 70 66 61 74 61 6c 5f 77 |rror:. |pfatal_w|
|00004910| 69 74 68 5f 6e 61 6d 65 | 20 28 61 72 67 76 5b 31 |ith_name| (argv[1|
|00004920| 5d 29 3b 0a 7d 0a 0c 0a | 2f 2a 0a 20 2a 20 54 68 |]);.}...|/*. * Th|
|00004930| 65 20 6d 61 69 6e 20 6c | 6f 6f 70 20 6f 66 20 74 |e main l|oop of t|
|00004940| 68 65 20 70 72 6f 67 72 | 61 6d 2e 20 20 54 72 79 |he progr|am. Try|
|00004950| 20 74 6f 20 65 78 61 6d | 69 6e 65 20 61 6e 64 20 | to exam|ine and |
|00004960| 6d 6f 76 65 20 70 61 73 | 74 20 6d 6f 73 74 0a 20 |move pas|t most. |
|00004970| 2a 20 6f 72 64 69 6e 61 | 72 79 20 69 6e 70 75 74 |* ordina|ry input|
|00004980| 20 63 68 61 72 73 20 61 | 73 20 66 61 73 74 20 61 | chars a|s fast a|
|00004990| 73 20 70 6f 73 73 69 62 | 6c 65 2e 20 20 43 61 6c |s possib|le. Cal|
|000049a0| 6c 20 61 70 70 72 6f 70 | 72 69 61 74 65 20 72 6f |l approp|riate ro|
|000049b0| 75 74 69 6e 65 73 0a 20 | 2a 20 77 68 65 6e 20 73 |utines. |* when s|
|000049c0| 6f 6d 65 74 68 69 6e 67 | 20 73 70 65 63 69 61 6c |omething| special|
|000049d0| 20 28 73 75 63 68 20 61 | 73 20 61 20 6d 61 63 72 | (such a|s a macr|
|000049e0| 6f 20 65 78 70 61 6e 73 | 69 6f 6e 29 20 68 61 73 |o expans|ion) has|
|000049f0| 20 74 6f 20 68 61 70 70 | 65 6e 2e 0a 0a 49 50 20 | to happ|en...IP |
|00004a00| 69 73 20 74 68 65 20 73 | 6f 75 72 63 65 20 6f 66 |is the s|ource of|
|00004a10| 20 69 6e 70 75 74 20 74 | 6f 20 73 63 61 6e 2e 0a | input t|o scan..|
|00004a20| 4f 50 20 69 73 20 74 68 | 65 20 70 6c 61 63 65 20 |OP is th|e place |
|00004a30| 74 6f 20 70 75 74 20 69 | 6e 70 75 74 2e 20 2a 2f |to put i|nput. */|
|00004a40| 0a 0a 72 65 73 63 61 6e | 20 28 69 70 2c 20 6f 70 |..rescan| (ip, op|
|00004a50| 29 0a 20 20 20 20 20 46 | 49 4c 45 5f 42 55 46 20 |). F|ILE_BUF |
|00004a60| 2a 69 70 2c 20 2a 6f 70 | 3b 0a 7b 0a 20 20 72 65 |*ip, *op|;.{. re|
|00004a70| 67 69 73 74 65 72 20 69 | 6e 74 20 63 3b 0a 20 20 |gister i|nt c;. |
|00004a80| 72 65 67 69 73 74 65 72 | 20 69 6e 74 20 69 64 65 |register| int ide|
|00004a90| 6e 74 5f 6c 65 6e 67 74 | 68 20 3d 20 30 2c 20 68 |nt_lengt|h = 0, h|
|00004aa0| 61 73 68 20 3d 20 30 3b | 0a 20 20 72 65 67 69 73 |ash = 0;|. regis|
|00004ab0| 74 65 72 20 55 5f 43 48 | 41 52 20 2a 6c 69 6d 69 |ter U_CH|AR *limi|
|00004ac0| 74 3b 0a 20 20 55 5f 43 | 48 41 52 20 2a 63 68 65 |t;. U_C|HAR *che|
|00004ad0| 63 6b 5f 65 78 70 61 6e | 64 20 28 29 3b 0a 20 20 |ck_expan|d ();. |
|00004ae0| 73 74 72 75 63 74 20 6b | 65 79 77 6f 72 64 5f 74 |struct k|eyword_t|
|00004af0| 61 62 6c 65 20 2a 68 61 | 6e 64 6c 65 5f 64 69 72 |able *ha|ndle_dir|
|00004b00| 65 63 74 69 76 65 20 28 | 29 3b 0a 20 20 69 6e 74 |ective (|);. int|
|00004b10| 20 65 78 63 65 73 73 5f | 6e 65 77 6c 69 6e 65 73 | excess_|newlines|
|00004b20| 20 3d 20 30 3b 0a 20 20 | 69 6e 74 20 65 73 63 61 | = 0;. |int esca|
|00004b30| 70 65 64 20 3d 20 30 3b | 0a 20 20 0a 20 20 55 5f |ped = 0;|. . U_|
|00004b40| 43 48 41 52 20 2a 62 70 | 3b 0a 20 20 0a 20 20 63 |CHAR *bp|;. . c|
|00004b50| 68 65 63 6b 5f 65 78 70 | 61 6e 64 28 6f 70 2c 20 |heck_exp|and(op, |
|00004b60| 69 70 2d 3e 6c 65 6e 67 | 74 68 29 3b 0a 20 20 0a |ip->leng|th);. .|
|00004b70| 20 20 69 70 2d 3e 62 75 | 66 70 20 3d 20 69 70 2d | ip->bu|fp = ip-|
|00004b80| 3e 62 75 66 3b 0a 20 20 | 6c 69 6d 69 74 20 3d 20 |>buf;. |limit = |
|00004b90| 69 70 2d 3e 62 75 66 20 | 2b 20 69 70 2d 3e 6c 65 |ip->buf |+ ip->le|
|00004ba0| 6e 67 74 68 3b 0a 20 20 | 77 68 69 6c 65 20 28 31 |ngth;. |while (1|
|00004bb0| 29 20 7b 0a 20 20 20 20 | 69 66 20 28 69 70 2d 3e |) {. |if (ip->|
|00004bc0| 62 75 66 70 20 3c 20 6c | 69 6d 69 74 29 20 7b 0a |bufp < l|imit) {.|
|00004bd0| 20 20 20 20 20 20 63 20 | 3d 20 2a 69 70 2d 3e 62 | c |= *ip->b|
|00004be0| 75 66 70 2b 2b 3b 0a 20 | 20 20 20 20 20 2a 6f 70 |ufp++;. | *op|
|00004bf0| 2d 3e 62 75 66 70 2b 2b | 20 3d 20 63 3b 0a 20 20 |->bufp++| = c;. |
|00004c00| 20 20 7d 20 65 6c 73 65 | 20 7b 0a 20 20 20 20 20 | } else| {. |
|00004c10| 20 63 20 3d 20 2d 31 3b | 0a 20 20 20 20 7d 0a 0a | c = -1;|. }..|
|00004c20| 20 20 20 20 2d 2d 65 73 | 63 61 70 65 64 3b 0a 20 | --es|caped;. |
|00004c30| 20 20 20 2f 2a 20 4e 6f | 77 20 45 53 43 41 50 45 | /* No|w ESCAPE|
|00004c40| 44 20 69 73 20 30 20 69 | 66 20 61 6e 64 20 6f 6e |D is 0 i|f and on|
|00004c50| 6c 79 20 69 66 20 74 68 | 69 73 20 63 68 61 72 61 |ly if th|is chara|
|00004c60| 63 74 65 72 20 69 73 20 | 65 73 63 61 70 65 64 2e |cter is |escaped.|
|00004c70| 20 20 2a 2f 0a 0a 20 20 | 20 20 73 77 69 74 63 68 | */.. | switch|
|00004c80| 20 28 63 29 20 7b 0a 20 | 20 20 20 63 61 73 65 20 | (c) {. | case |
|00004c90| 27 5c 5c 27 3a 0a 20 20 | 20 20 20 20 69 66 20 28 |'\\':. | if (|
|00004ca0| 65 73 63 61 70 65 64 20 | 3d 3d 20 30 29 0a 09 67 |escaped |== 0)..g|
|00004cb0| 6f 74 6f 20 72 61 6e 64 | 6f 6d 63 68 61 72 3b 0a |oto rand|omchar;.|
|00004cc0| 20 20 20 20 20 20 69 66 | 20 28 2a 69 70 2d 3e 62 | if| (*ip->b|
|00004cd0| 75 66 70 20 21 3d 20 27 | 5c 6e 27 29 0a 09 7b 0a |ufp != '|\n')..{.|
|00004ce0| 09 20 20 65 73 63 61 70 | 65 64 20 3d 20 31 3b 0a |. escap|ed = 1;.|
|00004cf0| 09 20 20 67 6f 74 6f 20 | 72 61 6e 64 6f 6d 63 68 |. goto |randomch|
|00004d00| 61 72 3b 0a 09 7d 0a 20 | 20 20 20 20 20 2f 2a 20 |ar;..}. | /* |
|00004d10| 61 6c 77 61 79 73 20 6d | 65 72 67 65 20 6c 69 6e |always m|erge lin|
|00004d20| 65 73 20 65 6e 64 69 6e | 67 20 77 69 74 68 20 62 |es endin|g with b|
|00004d30| 61 63 6b 73 6c 61 73 68 | 2d 6e 65 77 6c 69 6e 65 |ackslash|-newline|
|00004d40| 20 2a 2f 0a 20 20 20 20 | 20 20 2b 2b 69 70 2d 3e | */. | ++ip->|
|00004d50| 62 75 66 70 3b 0a 20 20 | 20 20 20 20 2b 2b 69 70 |bufp;. | ++ip|
|00004d60| 2d 3e 6c 69 6e 65 6e 6f | 3b 0a 20 20 20 20 20 20 |->lineno|;. |
|00004d70| 2b 2b 65 78 63 65 73 73 | 5f 6e 65 77 6c 69 6e 65 |++excess|_newline|
|00004d80| 73 3b 0a 20 20 20 20 20 | 20 2d 2d 6f 70 2d 3e 62 |s;. | --op->b|
|00004d90| 75 66 70 3b 09 09 2f 2a | 20 72 65 6d 6f 76 65 20 |ufp;../*| remove |
|00004da0| 62 61 63 6b 73 6c 61 73 | 68 20 66 72 6f 6d 20 6f |backslas|h from o|
|00004db0| 62 75 66 20 2a 2f 0a 20 | 20 20 20 20 20 63 6f 6e |buf */. | con|
|00004dc0| 74 69 6e 75 65 3b 09 09 | 09 2f 2a 20 62 61 63 6b |tinue;..|./* back|
|00004dd0| 20 74 6f 20 74 6f 70 20 | 6f 66 20 77 68 69 6c 65 | to top |of while|
|00004de0| 20 6c 6f 6f 70 20 2a 2f | 0a 0a 20 20 20 20 63 61 | loop */|.. ca|
|00004df0| 73 65 20 27 23 27 3a 0a | 20 20 20 20 20 20 2f 2a |se '#':.| /*|
|00004e00| 20 23 20 6b 65 79 77 6f | 72 64 3a 20 61 20 23 20 | # keywo|rd: a # |
|00004e10| 6d 75 73 74 20 62 65 20 | 66 69 72 73 74 20 6e 6f |must be |first no|
|00004e20| 6e 62 6c 61 6e 6b 20 63 | 68 61 72 20 6f 6e 20 74 |nblank c|har on t|
|00004e30| 68 65 20 6c 69 6e 65 20 | 2a 2f 0a 20 20 20 20 20 |he line |*/. |
|00004e40| 20 66 6f 72 20 28 62 70 | 20 3d 20 69 70 2d 3e 62 | for (bp| = ip->b|
|00004e50| 75 66 70 20 2d 20 31 3b | 20 62 70 20 3e 3d 20 69 |ufp - 1;| bp >= i|
|00004e60| 70 2d 3e 62 75 66 3b 20 | 62 70 2d 2d 29 0a 09 69 |p->buf; |bp--)..i|
|00004e70| 66 20 28 2a 62 70 20 3d | 3d 20 27 5c 6e 27 29 0a |f (*bp =|= '\n').|
|00004e80| 09 20 20 62 72 65 61 6b | 3b 0a 20 20 20 20 20 20 |. break|;. |
|00004e90| 62 70 2b 2b 3b 09 09 09 | 2f 2a 20 73 6b 69 70 20 |bp++;...|/* skip |
|00004ea0| 6e 6c 20 6f 72 20 6d 6f | 76 65 20 62 61 63 6b 20 |nl or mo|ve back |
|00004eb0| 69 6e 74 6f 20 62 75 66 | 66 65 72 20 2a 2f 0a 20 |into buf|fer */. |
|00004ec0| 20 20 20 20 20 53 4b 49 | 50 5f 57 48 49 54 45 5f | SKI|P_WHITE_|
|00004ed0| 53 50 41 43 45 20 28 62 | 70 29 3b 0a 20 20 20 20 |SPACE (b|p);. |
|00004ee0| 20 20 69 66 20 28 2a 62 | 70 20 21 3d 20 27 23 27 | if (*b|p != '#'|
|00004ef0| 29 0a 09 67 6f 74 6f 20 | 72 61 6e 64 6f 6d 63 68 |)..goto |randomch|
|00004f00| 61 72 3b 0a 20 20 20 20 | 20 20 69 64 65 6e 74 5f |ar;. | ident_|
|00004f10| 6c 65 6e 67 74 68 20 3d | 20 68 61 73 68 20 3d 20 |length =| hash = |
|00004f20| 30 3b 0a 20 20 20 20 20 | 20 2d 2d 6f 70 2d 3e 62 |0;. | --op->b|
|00004f30| 75 66 70 3b 09 09 2f 2a | 20 64 6f 6e 27 74 20 63 |ufp;../*| don't c|
|00004f40| 6f 70 79 20 74 68 65 20 | 27 23 27 20 2a 2f 0a 0a |opy the |'#' */..|
|00004f50| 20 20 20 20 20 20 69 66 | 20 28 68 61 6e 64 6c 65 | if| (handle|
|00004f60| 5f 64 69 72 65 63 74 69 | 76 65 20 28 69 70 2c 20 |_directi|ve (ip, |
|00004f70| 6f 70 2c 20 26 65 78 63 | 65 73 73 5f 6e 65 77 6c |op, &exc|ess_newl|
|00004f80| 69 6e 65 73 29 20 3d 3d | 20 4e 55 4c 4c 29 20 7b |ines) ==| NULL) {|
|00004f90| 0a 09 2b 2b 6f 70 2d 3e | 62 75 66 70 3b 09 09 2f |..++op->|bufp;../|
|00004fa0| 2a 20 63 6f 70 79 20 74 | 68 65 20 27 23 27 20 61 |* copy t|he '#' a|
|00004fb0| 66 74 65 72 20 61 6c 6c | 20 2a 2f 0a 09 67 6f 74 |fter all| */..got|
|00004fc0| 6f 20 72 61 6e 64 6f 6d | 63 68 61 72 3b 0a 20 20 |o random|char;. |
|00004fd0| 20 20 20 20 7d 0a 20 20 | 20 20 20 20 62 72 65 61 | }. | brea|
|00004fe0| 6b 3b 0a 0a 20 20 20 20 | 63 61 73 65 20 27 5c 22 |k;.. |case '\"|
|00004ff0| 27 3a 09 09 09 2f 2a 20 | 73 6b 69 70 20 71 75 6f |':.../* |skip quo|
|00005000| 74 65 64 20 73 74 72 69 | 6e 67 20 2a 2f 0a 20 20 |ted stri|ng */. |
|00005010| 20 20 63 61 73 65 20 27 | 5c 27 27 3a 0a 20 20 20 | case '|\'':. |
|00005020| 20 20 20 2f 2a 20 61 20 | 73 69 6e 67 6c 65 20 71 | /* a |single q|
|00005030| 75 6f 74 65 64 20 73 74 | 72 69 6e 67 20 69 73 20 |uoted st|ring is |
|00005040| 74 72 65 61 74 65 64 20 | 6c 69 6b 65 20 61 20 64 |treated |like a d|
|00005050| 6f 75 62 6c 65 20 2d 2d | 20 73 6f 6d 65 0a 09 20 |ouble --| some.. |
|00005060| 70 72 6f 67 72 61 6d 73 | 20 28 65 2e 67 2e 2c 20 |programs| (e.g., |
|00005070| 74 72 6f 66 66 29 20 61 | 72 65 20 70 65 72 76 65 |troff) a|re perve|
|00005080| 72 73 65 20 74 68 69 73 | 20 77 61 79 20 2a 2f 0a |rse this| way */.|
|00005090| 0a 20 20 20 20 20 20 69 | 66 20 28 65 73 63 61 70 |. i|f (escap|
|000050a0| 65 64 20 3d 3d 20 30 29 | 0a 09 67 6f 74 6f 20 72 |ed == 0)|..goto r|
|000050b0| 61 6e 64 6f 6d 63 68 61 | 72 3b 09 2f 2a 20 66 61 |andomcha|r;./* fa|
|000050c0| 6c 73 65 20 61 6c 61 72 | 6d 2d 2d 20 69 74 27 73 |lse alar|m-- it's|
|000050d0| 20 65 73 63 61 70 65 64 | 2e 20 2a 2f 0a 0a 20 20 | escaped|. */.. |
|000050e0| 20 20 20 20 2f 2a 20 73 | 6b 69 70 20 61 68 65 61 | /* s|kip ahea|
|000050f0| 64 20 74 6f 20 61 20 6d | 61 74 63 68 69 6e 67 20 |d to a m|atching |
|00005100| 71 75 6f 74 65 2e 20 20 | 2a 2f 0a 0a 20 20 20 20 |quote. |*/.. |
|00005110| 20 20 62 70 20 3d 20 69 | 70 2d 3e 62 75 66 70 3b | bp = i|p->bufp;|
|00005120| 0a 20 20 20 20 20 20 77 | 68 69 6c 65 20 28 62 70 |. w|hile (bp|
|00005130| 20 3c 20 6c 69 6d 69 74 | 29 20 7b 0a 09 2a 6f 70 | < limit|) {..*op|
|00005140| 2d 3e 62 75 66 70 2b 2b | 20 3d 20 2a 62 70 3b 0a |->bufp++| = *bp;.|
|00005150| 09 73 77 69 74 63 68 20 | 28 2a 62 70 2b 2b 29 20 |.switch |(*bp++) |
|00005160| 7b 0a 09 63 61 73 65 20 | 27 5c 6e 27 3a 0a 09 20 |{..case |'\n':.. |
|00005170| 20 2b 2b 69 70 2d 3e 6c | 69 6e 65 6e 6f 3b 0a 09 | ++ip->l|ineno;..|
|00005180| 20 20 62 72 65 61 6b 3b | 0a 09 63 61 73 65 20 27 | break;|..case '|
|00005190| 5c 5c 27 3a 0a 09 20 20 | 69 66 20 28 62 70 20 3e |\\':.. |if (bp >|
|000051a0| 3d 20 6c 69 6d 69 74 29 | 0a 09 20 20 20 20 62 72 |= limit)|.. br|
|000051b0| 65 61 6b 3b 0a 09 20 20 | 69 66 20 28 2a 62 70 20 |eak;.. |if (*bp |
|000051c0| 3d 3d 20 27 5c 6e 27 29 | 0a 09 20 20 20 20 7b 0a |== '\n')|.. {.|
|000051d0| 09 20 20 20 20 20 20 2f | 2a 20 62 61 63 6b 73 6c |. /|* backsl|
|000051e0| 61 73 68 20 6e 65 77 6c | 69 6e 65 20 69 73 20 72 |ash newl|ine is r|
|000051f0| 65 70 6c 61 63 65 64 20 | 62 79 20 6e 6f 74 68 69 |eplaced |by nothi|
|00005200| 6e 67 20 61 74 20 61 6c | 6c 2c 0a 09 09 20 62 75 |ng at al|l,... bu|
|00005210| 74 20 72 65 6d 65 6d 62 | 65 72 20 74 68 61 74 20 |t rememb|er that |
|00005220| 74 68 65 20 73 6f 75 72 | 63 65 20 6c 69 6e 65 20 |the sour|ce line |
|00005230| 63 6f 75 6e 74 20 69 73 | 20 6f 75 74 20 6f 66 20 |count is| out of |
|00005240| 73 79 6e 63 68 2e 20 20 | 2a 2f 0a 09 20 20 20 20 |synch. |*/.. |
|00005250| 20 20 2d 2d 6f 70 2d 3e | 62 75 66 70 3b 0a 09 20 | --op->|bufp;.. |
|00005260| 20 20 20 20 20 2b 2b 62 | 70 3b 0a 09 20 20 20 20 | ++b|p;.. |
|00005270| 20 20 2b 2b 65 78 63 65 | 73 73 5f 6e 65 77 6c 69 | ++exce|ss_newli|
|00005280| 6e 65 73 3b 0a 09 20 20 | 20 20 20 20 2b 2b 69 70 |nes;.. | ++ip|
|00005290| 2d 3e 6c 69 6e 65 6e 6f | 3b 0a 09 20 20 20 20 7d |->lineno|;.. }|
|000052a0| 0a 09 20 20 65 6c 73 65 | 0a 09 20 20 20 20 2a 6f |.. else|.. *o|
|000052b0| 70 2d 3e 62 75 66 70 2b | 2b 20 3d 20 2a 62 70 2b |p->bufp+|+ = *bp+|
|000052c0| 2b 3b 0a 09 20 20 62 72 | 65 61 6b 3b 0a 09 63 61 |+;.. br|eak;..ca|
|000052d0| 73 65 20 27 5c 22 27 3a | 0a 09 63 61 73 65 20 27 |se '\"':|..case '|
|000052e0| 5c 27 27 3a 0a 09 20 20 | 69 66 20 28 62 70 5b 2d |\'':.. |if (bp[-|
|000052f0| 31 5d 20 3d 3d 20 63 29 | 0a 09 20 20 20 20 67 6f |1] == c)|.. go|
|00005300| 74 6f 20 77 68 69 6c 65 | 32 65 6e 64 3b 0a 09 20 |to while|2end;.. |
|00005310| 20 62 72 65 61 6b 3b 0a | 09 7d 0a 20 20 20 20 20 | break;.|.}. |
|00005320| 20 7d 0a 20 20 20 20 77 | 68 69 6c 65 32 65 6e 64 | }. w|hile2end|
|00005330| 3a 0a 20 20 20 20 20 20 | 69 70 2d 3e 62 75 66 70 |:. |ip->bufp|
|00005340| 20 3d 20 62 70 3b 0a 20 | 20 20 20 20 20 62 72 65 | = bp;. | bre|
|00005350| 61 6b 3b 0a 0a 20 20 20 | 20 63 61 73 65 20 27 2f |ak;.. | case '/|
|00005360| 27 3a 09 09 09 2f 2a 20 | 70 6f 73 73 69 62 6c 65 |':.../* |possible|
|00005370| 20 63 6f 6d 6d 65 6e 74 | 20 2a 2f 0a 20 20 20 20 | comment| */. |
|00005380| 20 20 69 66 20 28 2a 69 | 70 2d 3e 62 75 66 70 20 | if (*i|p->bufp |
|00005390| 21 3d 20 27 2a 27 29 0a | 09 67 6f 74 6f 20 72 61 |!= '*').|.goto ra|
|000053a0| 6e 64 6f 6d 63 68 61 72 | 3b 0a 20 20 20 20 20 20 |ndomchar|;. |
|000053b0| 69 66 20 28 70 75 74 5f | 6f 75 74 5f 63 6f 6d 6d |if (put_|out_comm|
|000053c0| 65 6e 74 73 29 20 7b 0a | 20 20 20 20 20 20 20 20 |ents) {.| |
|000053d0| 62 70 20 3d 20 69 70 2d | 3e 62 75 66 70 3b 0a 09 |bp = ip-|>bufp;..|
|000053e0| 2a 6f 70 2d 3e 62 75 66 | 70 2b 2b 20 3d 20 2a 62 |*op->buf|p++ = *b|
|000053f0| 70 2b 2b 3b 0a 20 20 20 | 20 20 20 7d 20 65 6c 73 |p++;. | } els|
|00005400| 65 20 7b 0a 09 62 70 20 | 3d 20 69 70 2d 3e 62 75 |e {..bp |= ip->bu|
|00005410| 66 70 20 2b 20 31 3b 0a | 09 2d 2d 6f 70 2d 3e 62 |fp + 1;.|.--op->b|
|00005420| 75 66 70 3b 09 09 2f 2a | 20 64 6f 6e 27 74 20 6c |ufp;../*| don't l|
|00005430| 65 61 76 65 20 69 6e 69 | 74 69 61 6c 20 73 6c 61 |eave ini|tial sla|
|00005440| 73 68 20 69 6e 20 62 75 | 66 66 65 72 20 2a 2f 0a |sh in bu|ffer */.|
|00005450| 20 20 20 20 20 20 7d 0a | 0a 20 20 20 20 20 20 66 | }.|. f|
|00005460| 6f 72 20 28 3b 3b 29 20 | 7b 0a 09 77 68 69 6c 65 |or (;;) |{..while|
|00005470| 20 28 62 70 20 3c 20 6c | 69 6d 69 74 29 20 7b 0a | (bp < l|imit) {.|
|00005480| 09 20 20 69 66 20 28 70 | 75 74 5f 6f 75 74 5f 63 |. if (p|ut_out_c|
|00005490| 6f 6d 6d 65 6e 74 73 29 | 0a 09 20 20 20 20 2a 6f |omments)|.. *o|
|000054a0| 70 2d 3e 62 75 66 70 2b | 2b 20 3d 20 2a 62 70 3b |p->bufp+|+ = *bp;|
|000054b0| 0a 09 20 20 73 77 69 74 | 63 68 20 28 2a 62 70 2b |.. swit|ch (*bp+|
|000054c0| 2b 29 20 7b 0a 09 20 20 | 63 61 73 65 20 27 2a 27 |+) {.. |case '*'|
|000054d0| 3a 0a 09 20 20 20 20 67 | 6f 74 6f 20 77 68 69 6c |:.. g|oto whil|
|000054e0| 65 65 6e 64 3b 0a 09 20 | 20 63 61 73 65 20 27 5c |eend;.. | case '\|
|000054f0| 6e 27 3a 0a 09 20 20 20 | 20 2f 2a 20 63 6f 70 79 |n':.. | /* copy|
|00005500| 20 74 68 65 20 6e 65 77 | 6c 69 6e 65 20 69 6e 74 | the new|line int|
|00005510| 6f 20 74 68 65 20 6f 75 | 74 70 75 74 20 62 75 66 |o the ou|tput buf|
|00005520| 66 65 72 2c 20 69 6e 20 | 6f 72 64 65 72 20 74 6f |fer, in |order to|
|00005530| 0a 09 20 20 20 20 20 20 | 20 61 76 6f 69 64 20 74 |.. | avoid t|
|00005540| 68 65 20 70 61 69 6e 20 | 6f 66 20 61 20 23 6c 69 |he pain |of a #li|
|00005550| 6e 65 20 65 76 65 72 79 | 20 74 69 6d 65 20 61 20 |ne every| time a |
|00005560| 6d 75 6c 74 69 6c 69 6e | 65 20 63 6f 6d 6d 65 6e |multilin|e commen|
|00005570| 74 0a 09 20 20 20 20 20 | 20 20 69 73 20 73 65 65 |t.. | is see|
|00005580| 6e 2e 20 20 54 68 69 73 | 20 6d 65 61 6e 73 20 6b |n. This| means k|
|00005590| 65 79 77 6f 72 64 73 20 | 77 69 74 68 20 65 6d 62 |eywords |with emb|
|000055a0| 65 64 64 65 64 20 63 6f | 6d 6d 65 6e 74 73 0a 09 |edded co|mments..|
|000055b0| 20 20 20 20 20 20 20 74 | 68 61 74 20 63 6f 6e 74 | t|hat cont|
|000055c0| 61 69 6e 20 6e 65 77 6c | 69 6e 65 73 20 28 62 6c |ain newl|ines (bl|
|000055d0| 75 63 63 68 21 29 20 77 | 69 6c 6c 20 6c 6f 73 65 |ucch!) w|ill lose|
|000055e0| 2e 20 20 42 79 20 6d 61 | 6b 69 6e 67 0a 09 20 20 |. By ma|king.. |
|000055f0| 20 20 20 20 20 73 75 72 | 65 20 74 68 61 74 20 65 | sur|e that e|
|00005600| 78 63 65 73 73 5f 6e 65 | 77 6c 69 6e 65 73 20 69 |xcess_ne|wlines i|
|00005610| 73 20 6e 6f 74 20 6a 75 | 73 74 20 61 20 66 6c 61 |s not ju|st a fla|
|00005620| 67 2c 20 62 75 74 20 72 | 65 61 6c 6c 79 0a 09 20 |g, but r|eally.. |
|00005630| 20 20 20 20 20 20 61 6e | 20 61 63 63 75 72 61 74 | an| accurat|
|00005640| 65 20 63 6f 75 6e 74 2c | 20 69 74 20 6d 69 67 68 |e count,| it migh|
|00005650| 74 20 62 65 20 70 6f 73 | 73 69 62 6c 65 20 74 6f |t be pos|sible to|
|00005660| 20 67 65 74 20 61 72 6f | 75 6e 64 20 74 68 69 73 | get aro|und this|
|00005670| 2e 20 2a 2f 0a 09 20 20 | 20 20 69 66 20 28 21 70 |. */.. | if (!p|
|00005680| 75 74 5f 6f 75 74 5f 63 | 6f 6d 6d 65 6e 74 73 29 |ut_out_c|omments)|
|00005690| 0a 09 20 20 20 20 20 20 | 2a 6f 70 2d 3e 62 75 66 |.. |*op->buf|
|000056a0| 70 2b 2b 20 3d 20 27 5c | 6e 27 3b 0a 09 20 20 20 |p++ = '\|n';.. |
|000056b0| 20 2b 2b 69 70 2d 3e 6c | 69 6e 65 6e 6f 3b 0a 09 | ++ip->l|ineno;..|
|000056c0| 20 20 7d 0a 09 7d 0a 20 | 20 20 20 20 20 77 68 69 | }..}. | whi|
|000056d0| 6c 65 65 6e 64 3a 0a 09 | 69 66 20 28 62 70 20 3e |leend:..|if (bp >|
|000056e0| 3d 20 6c 69 6d 69 74 29 | 20 7b 0a 09 20 20 65 72 |= limit)| {.. er|
|000056f0| 72 6f 72 20 28 22 75 6e | 74 65 72 6d 69 6e 61 74 |ror ("un|terminat|
|00005700| 65 64 20 63 6f 6d 6d 65 | 6e 74 22 29 3b 0a 09 20 |ed comme|nt");.. |
|00005710| 20 62 72 65 61 6b 3b 09 | 09 2f 2a 20 63 61 75 73 | break;.|./* caus|
|00005720| 65 73 20 65 6f 66 20 63 | 6f 6e 64 69 74 69 6f 6e |es eof c|ondition|
|00005730| 20 2a 2f 0a 09 7d 0a 09 | 69 66 20 28 2a 62 70 20 | */..}..|if (*bp |
|00005740| 3d 3d 20 27 2f 27 29 0a | 09 20 20 62 72 65 61 6b |== '/').|. break|
|00005750| 3b 0a 20 20 20 20 20 20 | 7d 0a 20 20 20 20 20 20 |;. |}. |
|00005760| 69 66 20 28 70 75 74 5f | 6f 75 74 5f 63 6f 6d 6d |if (put_|out_comm|
|00005770| 65 6e 74 73 29 0a 20 20 | 20 20 20 20 20 20 2a 6f |ents). | *o|
|00005780| 70 2d 3e 62 75 66 70 2b | 2b 20 3d 20 27 2f 27 3b |p->bufp+|+ = '/';|
|00005790| 0a 20 20 20 20 20 20 69 | 70 2d 3e 62 75 66 70 20 |. i|p->bufp |
|000057a0| 3d 20 62 70 20 2b 20 31 | 3b 0a 20 20 20 20 20 20 |= bp + 1|;. |
|000057b0| 62 72 65 61 6b 3b 0a 20 | 20 20 20 20 20 0a 20 20 |break;. | . |
|000057c0| 20 20 63 61 73 65 20 27 | 30 27 3a 20 63 61 73 65 | case '|0': case|
|000057d0| 20 27 31 27 3a 20 63 61 | 73 65 20 27 32 27 3a 20 | '1': ca|se '2': |
|000057e0| 63 61 73 65 20 27 33 27 | 3a 20 63 61 73 65 20 27 |case '3'|: case '|
|000057f0| 34 27 3a 0a 20 20 20 20 | 63 61 73 65 20 27 35 27 |4':. |case '5'|
|00005800| 3a 20 63 61 73 65 20 27 | 36 27 3a 20 63 61 73 65 |: case '|6': case|
|00005810| 20 27 37 27 3a 20 63 61 | 73 65 20 27 38 27 3a 20 | '7': ca|se '8': |
|00005820| 63 61 73 65 20 27 39 27 | 3a 0a 20 20 20 20 20 20 |case '9'|:. |
|00005830| 2f 2a 20 69 66 20 64 69 | 67 69 74 20 69 73 20 6e |/* if di|git is n|
|00005840| 6f 74 20 70 61 72 74 20 | 6f 66 20 69 64 65 6e 74 |ot part |of ident|
|00005850| 69 66 69 65 72 2c 20 69 | 74 20 69 73 20 72 61 6e |ifier, i|t is ran|
|00005860| 64 6f 6d 20 2a 2f 0a 20 | 20 20 20 20 20 69 66 20 |dom */. | if |
|00005870| 28 69 64 65 6e 74 5f 6c | 65 6e 67 74 68 20 3d 3d |(ident_l|ength ==|
|00005880| 20 30 29 0a 09 67 6f 74 | 6f 20 72 61 6e 64 6f 6d | 0)..got|o random|
|00005890| 63 68 61 72 3b 0a 20 20 | 20 20 20 20 2f 2a 20 66 |char;. | /* f|
|000058a0| 61 6c 6c 20 74 68 72 6f | 75 67 68 20 2a 2f 0a 20 |all thro|ugh */. |
|000058b0| 20 20 20 20 20 0a 20 20 | 20 20 63 61 73 65 20 27 | . | case '|
|000058c0| 5f 27 3a 0a 20 20 20 20 | 63 61 73 65 20 27 61 27 |_':. |case 'a'|
|000058d0| 3a 20 63 61 73 65 20 27 | 62 27 3a 20 63 61 73 65 |: case '|b': case|
|000058e0| 20 27 63 27 3a 20 63 61 | 73 65 20 27 64 27 3a 20 | 'c': ca|se 'd': |
|000058f0| 63 61 73 65 20 27 65 27 | 3a 20 63 61 73 65 20 27 |case 'e'|: case '|
|00005900| 66 27 3a 0a 20 20 20 20 | 63 61 73 65 20 27 67 27 |f':. |case 'g'|
|00005910| 3a 20 63 61 73 65 20 27 | 68 27 3a 20 63 61 73 65 |: case '|h': case|
|00005920| 20 27 69 27 3a 20 63 61 | 73 65 20 27 6a 27 3a 20 | 'i': ca|se 'j': |
|00005930| 63 61 73 65 20 27 6b 27 | 3a 20 63 61 73 65 20 27 |case 'k'|: case '|
|00005940| 6c 27 3a 0a 20 20 20 20 | 63 61 73 65 20 27 6d 27 |l':. |case 'm'|
|00005950| 3a 20 63 61 73 65 20 27 | 6e 27 3a 20 63 61 73 65 |: case '|n': case|
|00005960| 20 27 6f 27 3a 20 63 61 | 73 65 20 27 70 27 3a 20 | 'o': ca|se 'p': |
|00005970| 63 61 73 65 20 27 71 27 | 3a 20 63 61 73 65 20 27 |case 'q'|: case '|
|00005980| 72 27 3a 0a 20 20 20 20 | 63 61 73 65 20 27 73 27 |r':. |case 's'|
|00005990| 3a 20 63 61 73 65 20 27 | 74 27 3a 20 63 61 73 65 |: case '|t': case|
|000059a0| 20 27 75 27 3a 20 63 61 | 73 65 20 27 76 27 3a 20 | 'u': ca|se 'v': |
|000059b0| 63 61 73 65 20 27 77 27 | 3a 20 63 61 73 65 20 27 |case 'w'|: case '|
|000059c0| 78 27 3a 0a 20 20 20 20 | 63 61 73 65 20 27 79 27 |x':. |case 'y'|
|000059d0| 3a 20 63 61 73 65 20 27 | 7a 27 3a 20 0a 20 20 20 |: case '|z': . |
|000059e0| 20 63 61 73 65 20 27 41 | 27 3a 20 63 61 73 65 20 | case 'A|': case |
|000059f0| 27 42 27 3a 20 63 61 73 | 65 20 27 43 27 3a 20 63 |'B': cas|e 'C': c|
|00005a00| 61 73 65 20 27 44 27 3a | 20 63 61 73 65 20 27 45 |ase 'D':| case 'E|
|00005a10| 27 3a 20 63 61 73 65 20 | 27 46 27 3a 0a 20 20 20 |': case |'F':. |
|00005a20| 20 63 61 73 65 20 27 47 | 27 3a 20 63 61 73 65 20 | case 'G|': case |
|00005a30| 27 48 27 3a 20 63 61 73 | 65 20 27 49 27 3a 20 63 |'H': cas|e 'I': c|
|00005a40| 61 73 65 20 27 4a 27 3a | 20 63 61 73 65 20 27 4b |ase 'J':| case 'K|
|00005a50| 27 3a 20 63 61 73 65 20 | 27 4c 27 3a 0a 20 20 20 |': case |'L':. |
|00005a60| 20 63 61 73 65 20 27 4d | 27 3a 20 63 61 73 65 20 | case 'M|': case |
|00005a70| 27 4e 27 3a 20 63 61 73 | 65 20 27 4f 27 3a 20 63 |'N': cas|e 'O': c|
|00005a80| 61 73 65 20 27 50 27 3a | 20 63 61 73 65 20 27 51 |ase 'P':| case 'Q|
|00005a90| 27 3a 20 63 61 73 65 20 | 27 52 27 3a 0a 20 20 20 |': case |'R':. |
|00005aa0| 20 63 61 73 65 20 27 53 | 27 3a 20 63 61 73 65 20 | case 'S|': case |
|00005ab0| 27 54 27 3a 20 63 61 73 | 65 20 27 55 27 3a 20 63 |'T': cas|e 'U': c|
|00005ac0| 61 73 65 20 27 56 27 3a | 20 63 61 73 65 20 27 57 |ase 'V':| case 'W|
|00005ad0| 27 3a 20 63 61 73 65 20 | 27 58 27 3a 0a 20 20 20 |': case |'X':. |
|00005ae0| 20 63 61 73 65 20 27 59 | 27 3a 20 63 61 73 65 20 | case 'Y|': case |
|00005af0| 27 5a 27 3a 20 0a 20 20 | 20 20 20 20 69 64 65 6e |'Z': . | iden|
|00005b00| 74 5f 6c 65 6e 67 74 68 | 2b 2b 3b 0a 20 20 20 20 |t_length|++;. |
|00005b10| 20 20 2f 2a 20 63 6f 6d | 70 75 74 65 20 73 74 65 | /* com|pute ste|
|00005b20| 70 20 6f 66 20 68 61 73 | 68 20 66 75 6e 63 74 69 |p of has|h functi|
|00005b30| 6f 6e 2c 20 74 6f 20 61 | 76 6f 69 64 20 61 20 70 |on, to a|void a p|
|00005b40| 72 6f 63 20 63 61 6c 6c | 20 6f 6e 20 65 76 65 72 |roc call| on ever|
|00005b50| 79 20 74 6f 6b 65 6e 20 | 2a 2f 0a 20 20 20 20 20 |y token |*/. |
|00005b60| 20 68 61 73 68 20 3d 20 | 48 41 53 48 53 54 45 50 | hash = |HASHSTEP|
|00005b70| 28 68 61 73 68 2c 20 63 | 29 3b 0a 20 20 20 20 20 |(hash, c|);. |
|00005b80| 20 62 72 65 61 6b 3b 0a | 0a 20 20 20 20 64 65 66 | break;.|. def|
|00005b90| 61 75 6c 74 3a 0a 72 61 | 6e 64 6f 6d 63 68 61 72 |ault:.ra|ndomchar|
|00005ba0| 3a 0a 20 20 20 20 20 20 | 69 66 20 28 69 64 65 6e |:. |if (iden|
|00005bb0| 74 5f 6c 65 6e 67 74 68 | 20 3e 20 30 29 20 7b 0a |t_length| > 0) {.|
|00005bc0| 09 72 65 67 69 73 74 65 | 72 20 48 41 53 48 4e 4f |.registe|r HASHNO|
|00005bd0| 44 45 20 2a 68 70 3b 0a | 09 66 6f 72 20 28 68 70 |DE *hp;.|.for (hp|
|00005be0| 20 3d 20 68 61 73 68 74 | 61 62 5b 4d 41 4b 45 5f | = hasht|ab[MAKE_|
|00005bf0| 50 4f 53 28 68 61 73 68 | 29 20 25 20 48 41 53 48 |POS(hash|) % HASH|
|00005c00| 53 49 5a 45 5d 3b 20 68 | 70 20 21 3d 20 4e 55 4c |SIZE]; h|p != NUL|
|00005c10| 4c 3b 0a 09 20 20 20 20 | 20 68 70 20 3d 20 68 70 |L;.. | hp = hp|
|00005c20| 2d 3e 6e 65 78 74 29 20 | 7b 0a 20 20 20 20 20 20 |->next) |{. |
|00005c30| 20 20 20 20 55 5f 43 48 | 41 52 20 2a 73 61 76 65 | U_CH|AR *save|
|00005c40| 5f 69 62 75 66 70 3b 09 | 2f 2a 20 6b 6c 75 64 67 |_ibufp;.|/* kludg|
|00005c50| 65 2c 20 73 65 65 20 62 | 65 6c 6f 77 20 2a 2f 0a |e, see b|elow */.|
|00005c60| 09 20 20 20 20 20 20 0a | 20 20 20 20 20 20 20 20 |. .| |
|00005c70| 20 20 69 66 20 28 68 70 | 2d 3e 6c 65 6e 67 74 68 | if (hp|->length|
|00005c80| 20 3d 3d 20 69 64 65 6e | 74 5f 6c 65 6e 67 74 68 | == iden|t_length|
|00005c90| 29 20 7b 0a 09 20 20 20 | 20 72 65 67 69 73 74 65 |) {.. | registe|
|00005ca0| 72 20 69 6e 74 20 69 20 | 3d 20 69 64 65 6e 74 5f |r int i |= ident_|
|00005cb0| 6c 65 6e 67 74 68 3b 0a | 09 20 20 20 20 72 65 67 |length;.|. reg|
|00005cc0| 69 73 74 65 72 20 55 5f | 43 48 41 52 20 2a 70 20 |ister U_|CHAR *p |
|00005cd0| 3d 20 68 70 2d 3e 6e 61 | 6d 65 3b 0a 09 20 20 20 |= hp->na|me;.. |
|00005ce0| 20 72 65 67 69 73 74 65 | 72 20 55 5f 43 48 41 52 | registe|r U_CHAR|
|00005cf0| 20 2a 71 20 3d 20 6f 70 | 2d 3e 62 75 66 70 20 2d | *q = op|->bufp -|
|00005d00| 20 69 3b 0a 0a 09 20 20 | 20 20 69 66 20 28 63 20 | i;... | if (c |
|00005d10| 21 3d 20 28 55 5f 43 48 | 41 52 29 20 2d 31 29 0a |!= (U_CH|AR) -1).|
|00005d20| 09 20 20 20 20 20 20 71 | 2d 2d 3b 0a 0a 09 20 20 |. q|--;... |
|00005d30| 20 20 64 6f 20 7b 09 09 | 2f 2a 20 61 6c 6c 20 74 | do {..|/* all t|
|00005d40| 68 69 73 20 74 6f 20 61 | 76 6f 69 64 20 61 20 73 |his to a|void a s|
|00005d50| 74 72 6e 63 6d 70 28 29 | 20 2a 2f 0a 09 20 20 20 |trncmp()| */.. |
|00005d60| 20 20 20 69 66 20 28 2a | 70 2b 2b 20 21 3d 20 2a | if (*|p++ != *|
|00005d70| 71 2b 2b 29 0a 09 09 67 | 6f 74 6f 20 68 61 73 68 |q++)...g|oto hash|
|00005d80| 63 6f 6c 6c 69 73 69 6f | 6e 3b 0a 09 20 20 20 20 |collisio|n;.. |
|00005d90| 7d 20 77 68 69 6c 65 20 | 28 2d 2d 69 29 3b 0a 09 |} while |(--i);..|
|00005da0| 20 0a 09 20 20 20 20 73 | 61 76 65 5f 69 62 75 66 | .. s|ave_ibuf|
|00005db0| 70 20 3d 20 69 70 2d 3e | 62 75 66 70 3b 0a 09 20 |p = ip->|bufp;.. |
|00005dc0| 20 20 20 2f 2a 20 62 61 | 63 6b 20 75 70 20 6f 76 | /* ba|ck up ov|
|00005dd0| 65 72 20 69 64 65 6e 74 | 69 66 69 65 72 2c 20 74 |er ident|ifier, t|
|00005de0| 68 65 6e 20 65 78 70 61 | 6e 64 20 74 6f 6b 65 6e |hen expa|nd token|
|00005df0| 20 2a 2f 0a 09 20 20 20 | 20 6f 70 2d 3e 62 75 66 | */.. | op->buf|
|00005e00| 70 20 2d 3d 20 69 64 65 | 6e 74 5f 6c 65 6e 67 74 |p -= ide|nt_lengt|
|00005e10| 68 3b 0a 09 20 20 20 20 | 69 66 20 28 63 20 21 3d |h;.. |if (c !=|
|00005e20| 20 28 55 5f 43 48 41 52 | 29 20 2d 31 29 20 6f 70 | (U_CHAR|) -1) op|
|00005e30| 2d 3e 62 75 66 70 2d 2d | 3b 0a 09 20 20 20 20 6d |->bufp--|;.. m|
|00005e40| 61 63 72 6f 65 78 70 61 | 6e 64 20 28 68 70 2c 20 |acroexpa|nd (hp, |
|00005e50| 69 70 2c 20 6f 70 2c 20 | 26 65 78 63 65 73 73 5f |ip, op, |&excess_|
|00005e60| 6e 65 77 6c 69 6e 65 73 | 29 3b 0a 0a 09 20 20 20 |newlines|);... |
|00005e70| 20 63 68 65 63 6b 5f 65 | 78 70 61 6e 64 28 6f 70 | check_e|xpand(op|
|00005e80| 2c 20 69 70 2d 3e 6c 65 | 6e 67 74 68 20 2d 20 28 |, ip->le|ngth - (|
|00005e90| 69 70 2d 3e 62 75 66 70 | 20 2d 20 69 70 2d 3e 62 |ip->bufp| - ip->b|
|00005ea0| 75 66 29 29 3b 0a 09 20 | 20 20 20 0a 09 20 20 20 |uf));.. | .. |
|00005eb0| 20 2f 2a 20 49 66 20 77 | 65 20 6a 75 73 74 20 70 | /* If w|e just p|
|00005ec0| 72 6f 63 65 73 73 65 64 | 20 61 6e 20 69 64 65 6e |rocessed| an iden|
|00005ed0| 74 69 66 69 65 72 20 61 | 74 20 65 6e 64 20 6f 66 |tifier a|t end of|
|00005ee0| 20 69 6e 70 75 74 2c 0a | 09 20 20 20 20 20 20 20 | input,.|. |
|00005ef0| 72 65 74 75 72 6e 20 72 | 69 67 68 74 20 61 77 61 |return r|ight awa|
|00005f00| 79 2e 20 20 2a 2f 0a 09 | 20 20 20 20 69 66 20 28 |y. */..| if (|
|00005f10| 63 20 3d 3d 20 28 55 5f | 43 48 41 52 29 20 2d 31 |c == (U_|CHAR) -1|
|00005f20| 29 0a 09 20 20 20 20 20 | 20 72 65 74 75 72 6e 3b |).. | return;|
|00005f30| 0a 0a 09 20 20 20 20 2f | 2a 20 69 66 20 74 68 65 |... /|* if the|
|00005f40| 20 65 78 70 61 6e 73 69 | 6f 6e 20 72 6f 75 74 69 | expansi|on routi|
|00005f50| 6e 65 20 68 61 73 20 6e | 6f 74 20 6d 6f 76 65 64 |ne has n|ot moved|
|00005f60| 20 74 68 65 20 69 6e 70 | 75 74 0a 09 20 20 20 20 | the inp|ut.. |
|00005f70| 20 20 20 70 6f 69 6e 74 | 65 72 2c 20 70 75 74 20 | point|er, put |
|00005f80| 62 61 63 6b 20 74 68 65 | 20 63 68 61 72 20 74 68 |back the| char th|
|00005f90| 61 74 20 65 6e 64 65 64 | 20 74 68 65 20 74 6f 6b |at ended| the tok|
|00005fa0| 65 6e 2e 0a 09 20 20 20 | 20 20 20 20 54 68 69 73 |en... | This|
|00005fb0| 20 69 73 20 61 20 6b 6c | 75 64 67 65 20 62 65 63 | is a kl|udge bec|
|00005fc0| 61 75 73 65 20 74 68 65 | 72 65 20 6d 69 67 68 74 |ause the|re might|
|00005fd0| 20 62 65 20 61 20 64 69 | 66 66 65 72 65 6e 74 0a | be a di|fferent.|
|00005fe0| 09 20 20 20 20 20 20 20 | 72 65 61 73 6f 6e 20 74 |. |reason t|
|00005ff0| 6f 20 70 75 74 20 69 74 | 20 62 61 63 6b 20 6f 72 |o put it| back or|
|00006000| 20 6e 6f 74 20 70 75 74 | 20 69 74 20 62 61 63 6b | not put| it back|
|00006010| 2e 20 2a 2f 0a 09 20 20 | 20 20 69 66 20 28 69 70 |. */.. | if (ip|
|00006020| 2d 3e 62 75 66 70 20 3d | 3d 20 73 61 76 65 5f 69 |->bufp =|= save_i|
|00006030| 62 75 66 70 29 0a 09 20 | 20 20 20 20 20 2a 6f 70 |bufp).. | *op|
|00006040| 2d 3e 62 75 66 70 2b 2b | 20 3d 20 63 3b 0a 09 20 |->bufp++| = c;.. |
|00006050| 20 20 20 0a 09 20 20 20 | 20 62 72 65 61 6b 3b 09 | .. | break;.|
|00006060| 09 2f 2a 20 6f 75 74 20 | 6f 66 20 66 6f 72 20 6c |./* out |of for l|
|00006070| 6f 6f 70 20 2a 2f 0a 09 | 20 20 7d 0a 68 61 73 68 |oop */..| }.hash|
|00006080| 63 6f 6c 6c 69 73 69 6f | 6e 3a 0a 09 20 20 20 20 |collisio|n:.. |
|00006090| 20 20 20 3b 0a 09 7d 09 | 09 09 2f 2a 20 65 6e 64 | ;..}.|../* end|
|000060a0| 20 66 6f 72 20 6c 6f 6f | 70 20 2a 2f 0a 09 69 64 | for loo|p */..id|
|000060b0| 65 6e 74 5f 6c 65 6e 67 | 74 68 20 3d 20 68 61 73 |ent_leng|th = has|
|000060c0| 68 20 3d 20 30 3b 20 2f | 2a 20 73 74 6f 70 20 63 |h = 0; /|* stop c|
|000060d0| 6f 6c 6c 65 63 74 69 6e | 67 20 69 64 65 6e 74 69 |ollectin|g identi|
|000060e0| 66 69 65 72 20 2a 2f 0a | 20 20 20 20 20 20 7d 0a |fier */.| }.|
|000060f0| 09 20 20 20 20 0a 20 20 | 20 20 20 20 2f 2a 20 49 |. . | /* I|
|00006100| 66 20 77 65 20 6a 75 73 | 74 20 70 72 6f 63 65 73 |f we jus|t proces|
|00006110| 73 65 64 20 61 6e 20 69 | 64 65 6e 74 69 66 69 65 |sed an i|dentifie|
|00006120| 72 20 61 74 20 65 6e 64 | 20 6f 66 20 69 6e 70 75 |r at end| of inpu|
|00006130| 74 2c 0a 09 20 72 65 74 | 75 72 6e 20 72 69 67 68 |t,.. ret|urn righ|
|00006140| 74 20 61 77 61 79 2e 20 | 20 2a 2f 0a 20 20 20 20 |t away. | */. |
|00006150| 20 20 69 66 20 28 63 20 | 3d 3d 20 2d 31 29 0a 09 | if (c |== -1)..|
|00006160| 72 65 74 75 72 6e 3b 0a | 0a 20 20 20 20 20 20 2f |return;.|. /|
|00006170| 2a 20 63 6f 75 6e 74 20 | 74 68 65 20 6e 65 77 6c |* count |the newl|
|00006180| 69 6e 65 2c 20 69 66 20 | 69 74 20 77 61 73 20 6f |ine, if |it was o|
|00006190| 6e 65 2e 20 20 54 68 65 | 20 72 65 61 73 6f 6e 20 |ne. The| reason |
|000061a0| 74 68 69 73 20 69 73 0a | 09 20 64 6f 6e 65 20 64 |this is.|. done d|
|000061b0| 6f 77 6e 20 68 65 72 65 | 20 69 6e 73 74 65 61 64 |own here| instead|
|000061c0| 20 6f 66 20 61 73 20 61 | 20 63 61 73 65 20 69 6e | of as a| case in|
|000061d0| 20 74 68 65 20 73 77 69 | 74 63 68 20 69 73 0a 09 | the swi|tch is..|
|000061e0| 20 74 68 61 74 20 73 6f | 6d 65 20 65 78 70 61 6e | that so|me expan|
|000061f0| 73 69 6f 6e 73 20 6d 69 | 67 68 74 20 77 61 6e 74 |sions mi|ght want|
|00006200| 20 74 6f 20 6c 6f 6f 6b | 20 61 74 20 74 68 65 20 | to look| at the |
|00006210| 6c 69 6e 65 0a 09 20 6e | 75 6d 62 65 72 2c 20 61 |line.. n|umber, a|
|00006220| 6e 64 20 69 66 20 74 68 | 65 79 20 68 61 70 70 65 |nd if th|ey happe|
|00006230| 6e 20 72 69 67 68 74 20 | 62 65 66 6f 72 65 20 74 |n right |before t|
|00006240| 68 65 20 6e 65 77 6c 69 | 6e 65 2c 0a 09 20 77 65 |he newli|ne,.. we|
|00006250| 20 64 6f 6e 27 74 20 77 | 61 6e 74 20 74 68 65 6d | don't w|ant them|
|00006260| 20 74 6f 20 67 65 74 20 | 74 68 65 20 77 72 6f 6e | to get |the wron|
|00006270| 67 20 6f 6e 65 2e 20 20 | 53 6f 20 74 68 65 20 6e |g one. |So the n|
|00006280| 65 77 6c 69 6e 65 0a 09 | 20 6d 75 73 74 20 62 65 |ewline..| must be|
|00006290| 20 63 6f 75 6e 74 65 64 | 20 41 46 54 45 52 20 61 | counted| AFTER a|
|000062a0| 6e 79 20 65 78 70 61 6e | 73 69 6f 6e 73 20 68 61 |ny expan|sions ha|
|000062b0| 70 70 65 6e 2e 20 2a 2f | 0a 20 20 20 20 20 20 69 |ppen. */|. i|
|000062c0| 66 20 28 63 20 3d 3d 20 | 27 5c 6e 27 29 20 7b 0a |f (c == |'\n') {.|
|000062d0| 09 2b 2b 69 70 2d 3e 6c | 69 6e 65 6e 6f 3b 0a 09 |.++ip->l|ineno;..|
|000062e0| 69 66 20 28 65 78 63 65 | 73 73 5f 6e 65 77 6c 69 |if (exce|ss_newli|
|000062f0| 6e 65 73 20 3e 20 30 29 | 20 7b 0a 09 20 20 6f 75 |nes > 0)| {.. ou|
|00006300| 74 70 75 74 5f 6c 69 6e | 65 5f 63 6f 6d 6d 61 6e |tput_lin|e_comman|
|00006310| 64 20 28 69 70 2c 20 6f | 70 29 3b 0a 09 20 20 63 |d (ip, o|p);.. c|
|00006320| 68 65 63 6b 5f 65 78 70 | 61 6e 64 28 6f 70 2c 20 |heck_exp|and(op, |
|00006330| 69 70 2d 3e 6c 65 6e 67 | 74 68 20 2d 20 28 69 70 |ip->leng|th - (ip|
|00006340| 2d 3e 62 75 66 70 20 2d | 20 69 70 2d 3e 62 75 66 |->bufp -| ip->buf|
|00006350| 29 29 3b 0a 0a 09 20 20 | 65 78 63 65 73 73 5f 6e |));... |excess_n|
|00006360| 65 77 6c 69 6e 65 73 20 | 3d 20 30 3b 0a 09 7d 0a |ewlines |= 0;..}.|
|00006370| 20 20 20 20 20 20 7d 0a | 20 20 20 20 20 20 62 72 | }.| br|
|00006380| 65 61 6b 3b 09 09 09 2f | 2a 20 66 72 6f 6d 20 73 |eak;.../|* from s|
|00006390| 77 69 74 63 68 20 2a 2f | 0a 20 20 20 20 7d 0a 20 |witch */|. }. |
|000063a0| 20 7d 0a 7d 0a 0a 2f 2a | 0a 20 2a 20 50 72 6f 63 | }.}../*|. * Proc|
|000063b0| 65 73 73 20 61 20 23 20 | 64 69 72 65 63 74 69 76 |ess a # |directiv|
|000063c0| 65 2e 20 20 45 78 70 65 | 63 74 73 20 69 70 2d 3e |e. Expe|cts ip->|
|000063d0| 62 75 66 70 20 74 6f 20 | 70 6f 69 6e 74 20 74 6f |bufp to |point to|
|000063e0| 20 74 68 65 20 27 23 27 | 2c 20 61 73 20 69 6e 0a | the '#'|, as in.|
|000063f0| 20 2a 20 22 23 64 65 66 | 69 6e 65 20 66 6f 6f 20 | * "#def|ine foo |
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.