home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: Tape Archive
(archive/tar).
You can browse this item here: cdecl.tar
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| Tape Archive (archive/tar)
| magic
| Supported |
100%
| file
| tar archive
| default
| |
99%
| file
| tar archive (V7), file cdecl/, mode 755 , uid 243 , gid 12 , size 0 , seconds 4403601423
| default
| |
98%
| file
| data
| default
| |
100%
| TrID
| Sybase iAnywhere database files
| default (weak)
| |
100%
| siegfried
| x-fmt/265 Tape Archive Format
| default
| |
100%
| lsar
| Tar
| default
| |
100%
| gt2
| TAR Archiv gefunden (Auflistung ist deaktiviert)
| default
| |
100%
| disktype
| Pre-POSIX tar archive
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 63 64 65 63 6c 2f 00 00 | 00 00 00 00 00 00 00 00 |cdecl/..|........|
|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 | 35 35 20 00 20 20 20 32 |.... 7|55 . 2|
|00000070| 34 33 20 00 20 20 20 20 | 31 32 20 00 20 20 20 20 |43 . |12 . |
|00000080| 20 20 20 20 20 20 30 20 | 20 34 34 30 33 36 30 31 | 0 | 4403601|
|00000090| 34 32 33 20 20 20 35 30 | 36 32 00 20 00 00 00 00 |423 50|62. ....|
|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| 63 64 65 63 6c 2f 4d 41 | 4e 49 46 45 53 54 00 00 |cdecl/MA|NIFEST..|
|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 36 | 34 34 20 00 20 20 20 32 |.... 6|44 . 2|
|00000270| 34 33 20 00 20 20 20 20 | 31 32 20 00 20 20 20 20 |43 . |12 . |
|00000280| 20 20 20 20 35 35 32 20 | 20 34 34 30 33 36 30 31 | 552 | 4403601|
|00000290| 33 36 35 20 20 20 36 32 | 36 37 00 20 00 00 00 00 |365 62|67. ....|
|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| 20 20 20 46 69 6c 65 20 | 4e 61 6d 65 09 09 41 72 | File |Name..Ar|
|00000410| 63 68 69 76 65 20 23 09 | 44 65 73 63 72 69 70 74 |chive #.|Descript|
|00000420| 69 6f 6e 0a 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |ion.----|--------|
|00000430| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000440| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000450| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 0a |--------|-------.|
|00000460| 20 4d 41 4e 49 46 45 53 | 54 20 20 20 20 20 20 20 | MANIFES|T |
|00000470| 20 20 20 20 20 20 20 20 | 20 20 20 20 31 09 54 68 | | 1.Th|
|00000480| 69 73 20 73 68 69 70 70 | 69 6e 67 20 6c 69 73 74 |is shipp|ing list|
|00000490| 0a 20 63 64 65 63 6c 2e | 31 20 20 20 20 20 20 20 |. cdecl.|1 |
|000004a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 31 09 0a | | 1..|
|000004b0| 20 63 64 65 63 6c 2e 63 | 20 20 20 20 20 20 20 20 | cdecl.c| |
|000004c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 32 09 0a 20 | | 2.. |
|000004d0| 63 64 67 72 61 6d 2e 79 | 20 20 20 20 20 20 20 20 |cdgram.y| |
|000004e0| 20 20 20 20 20 20 20 20 | 20 20 20 31 09 0a 20 63 | | 1.. c|
|000004f0| 64 6c 65 78 2e 6c 20 20 | 20 20 20 20 20 20 20 20 |dlex.l | |
|00000500| 20 20 20 20 20 20 20 20 | 20 20 31 09 0a 20 6d 61 | | 1.. ma|
|00000510| 6b 65 66 69 6c 65 20 20 | 20 20 20 20 20 20 20 20 |kefile | |
|00000520| 20 20 20 20 20 20 20 20 | 20 31 09 0a 20 74 65 73 | | 1.. tes|
|00000530| 74 73 65 74 20 20 20 20 | 20 20 20 20 20 20 20 20 |tset | |
|00000540| 20 20 20 20 20 20 20 20 | 31 09 0a 20 74 65 73 74 | |1.. test|
|00000550| 73 65 74 2b 2b 20 20 20 | 20 20 20 20 20 20 20 20 |set++ | |
|00000560| 20 20 20 20 20 20 20 31 | 09 0a 00 00 00 00 00 00 | 1|........|
|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| 63 64 65 63 6c 2f 63 64 | 65 63 6c 2e 31 00 00 00 |cdecl/cd|ecl.1...|
|00000610| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000620| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000630| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000640| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000650| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000660| 00 00 00 00 20 20 20 36 | 34 34 20 00 20 20 20 32 |.... 6|44 . 2|
|00000670| 34 33 20 00 20 20 20 20 | 31 32 20 00 20 20 20 20 |43 . |12 . |
|00000680| 20 20 32 33 31 33 31 20 | 20 34 34 30 33 36 30 31 | 23131 | 4403601|
|00000690| 33 37 31 20 20 20 36 33 | 32 35 00 20 00 00 00 00 |371 63|25. ....|
|000006a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000006b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000006c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000006d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000006e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000006f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000700| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000710| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000720| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000730| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000740| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000750| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000760| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000770| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000780| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000790| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000800| 27 5c 22 20 40 28 23 29 | 63 64 65 63 6c 2e 31 09 |'\" @(#)|cdecl.1.|
|00000810| 32 2e 34 20 33 2f 33 30 | 2f 38 38 0a 2e 54 48 20 |2.4 3/30|/88..TH |
|00000820| 43 44 45 43 4c 20 31 0a | 2e 53 48 20 4e 41 4d 45 |CDECL 1.|.SH NAME|
|00000830| 0a 63 64 65 63 6c 2c 20 | 63 2b 2b 64 65 63 6c 20 |.cdecl, |c++decl |
|00000840| 5c 2d 20 43 6f 6d 70 6f | 73 65 20 43 20 61 6e 64 |\- Compo|se C and|
|00000850| 20 43 2b 2b 20 74 79 70 | 65 20 64 65 63 6c 61 72 | C++ typ|e declar|
|00000860| 61 74 69 6f 6e 73 0a 2e | 53 48 20 53 59 4e 4f 50 |ations..|SH SYNOP|
|00000870| 53 49 53 0a 2e 42 20 63 | 64 65 63 6c 0a 5b 5c 2d |SIS..B c|decl.[\-|
|00000880| 61 20 7c 20 5c 2d 2b 20 | 7c 20 5c 2d 70 20 7c 20 |a | \-+ || \-p | |
|00000890| 5c 2d 72 5d 0a 5b 5c 2d | 63 69 64 44 56 5d 0a 2e |\-r].[\-|cidDV]..|
|000008a0| 62 72 0a 2e 52 53 20 2e | 35 69 0a 2e 52 49 20 5b |br..RS .|5i..RI [|
|000008b0| 5b 20 66 69 6c 65 73 0a | 5c 26 2e 2e 2e 5d 20 7c |[ files.|\&...] ||
|000008c0| 0a 2e 42 20 65 78 70 6c | 61 69 6e 0a 5c 26 2e 2e |..B expl|ain.\&..|
|000008d0| 2e 20 7c 0a 2e 42 20 64 | 65 63 6c 61 72 65 0a 5c |. |..B d|eclare.\|
|000008e0| 26 2e 2e 2e 20 7c 0a 2e | 42 20 63 61 73 74 0a 5c |&... |..|B cast.\|
|000008f0| 26 2e 2e 2e 20 7c 0a 2e | 42 20 73 65 74 0a 5c 26 |&... |..|B set.\&|
|00000900| 2e 2e 2e 20 7c 0a 2e 42 | 20 68 65 6c 70 0a 5c 26 |... |..B| help.\&|
|00000910| 2e 2e 2e 20 7c 0a 2e 42 | 20 3f 0a 5c 26 2e 2e 2e |... |..B| ?.\&...|
|00000920| 20 5d 0a 2e 52 45 0a 2e | 62 72 0a 2e 42 20 63 2b | ]..RE..|br..B c+|
|00000930| 2b 64 65 63 6c 0a 5b 5c | 2d 61 20 7c 20 5c 2d 2b |+decl.[\|-a | \-+|
|00000940| 20 7c 20 5c 2d 70 20 7c | 20 5c 2d 72 5d 0a 5b 5c | | \-p || \-r].[\|
|00000950| 2d 63 69 64 44 56 5d 0a | 2e 62 72 0a 2e 52 53 20 |-cidDV].|.br..RS |
|00000960| 2e 35 69 0a 2e 52 49 20 | 5b 5b 20 66 69 6c 65 73 |.5i..RI |[[ files|
|00000970| 0a 5c 26 2e 2e 2e 5d 20 | 7c 0a 2e 42 20 65 78 70 |.\&...] ||..B exp|
|00000980| 6c 61 69 6e 0a 5c 26 2e | 2e 2e 20 7c 0a 2e 42 20 |lain.\&.|.. |..B |
|00000990| 64 65 63 6c 61 72 65 0a | 5c 26 2e 2e 2e 20 7c 0a |declare.|\&... |.|
|000009a0| 2e 42 20 63 61 73 74 0a | 5c 26 2e 2e 2e 20 7c 0a |.B cast.|\&... |.|
|000009b0| 2e 42 20 73 65 74 0a 5c | 26 2e 2e 2e 20 7c 0a 2e |.B set.\|&... |..|
|000009c0| 42 20 68 65 6c 70 0a 5c | 26 2e 2e 2e 20 7c 0a 2e |B help.\|&... |..|
|000009d0| 42 20 3f 0a 5c 26 2e 2e | 2e 20 5d 0a 2e 52 45 0a |B ?.\&..|. ]..RE.|
|000009e0| 2e 62 72 0a 2e 42 20 65 | 78 70 6c 61 69 6e 0a 5c |.br..B e|xplain.\|
|000009f0| 26 2e 2e 2e 0a 2e 62 72 | 0a 2e 42 20 64 65 63 6c |&.....br|..B decl|
|00000a00| 61 72 65 0a 5c 26 2e 2e | 2e 0a 2e 62 72 0a 2e 42 |are.\&..|...br..B|
|00000a10| 20 63 61 73 74 0a 5c 26 | 2e 2e 2e 0a 2e 53 48 20 | cast.\&|.....SH |
|00000a20| 44 45 53 43 52 49 50 54 | 49 4f 4e 0a 2e 49 20 43 |DESCRIPT|ION..I C|
|00000a30| 64 65 63 6c 0a 28 61 6e | 64 0a 2e 49 20 63 2b 2b |decl.(an|d..I c++|
|00000a40| 64 65 63 6c 20 29 0a 69 | 73 20 61 20 70 72 6f 67 |decl ).i|s a prog|
|00000a50| 72 61 6d 20 66 6f 72 20 | 65 6e 63 6f 64 69 6e 67 |ram for |encoding|
|00000a60| 20 61 6e 64 20 64 65 63 | 6f 64 69 6e 67 20 43 20 | and dec|oding C |
|00000a70| 28 43 2b 2b 29 20 74 79 | 70 65 2d 64 65 63 6c 61 |(C++) ty|pe-decla|
|00000a80| 72 61 74 69 6f 6e 73 2e | 0a 54 68 65 20 43 20 6c |rations.|.The C l|
|00000a90| 61 6e 67 75 61 67 65 20 | 28 74 68 65 20 64 65 66 |anguage |(the def|
|00000aa0| 61 75 6c 74 20 66 6f 72 | 20 0a 2e 49 20 63 64 65 |ault for| ..I cde|
|00000ab0| 63 6c 20 2c 0a 6f 72 20 | 77 69 74 68 20 74 68 65 |cl ,.or |with the|
|00000ac0| 0a 2e 42 20 5c 2d 61 0a | 6f 70 74 69 6f 6e 29 20 |..B \-a.|option) |
|00000ad0| 69 73 20 62 61 73 65 64 | 20 6f 6e 20 74 68 65 20 |is based| on the |
|00000ae0| 28 64 72 61 66 74 20 70 | 72 6f 70 6f 73 65 64 29 |(draft p|roposed)|
|00000af0| 20 58 33 4a 31 31 20 41 | 4e 53 49 0a 53 74 61 6e | X3J11 A|NSI.Stan|
|00000b00| 64 61 72 64 3b 0a 6f 70 | 74 69 6f 6e 61 6c 6c 79 |dard;.op|tionally|
|00000b10| 2c 20 74 68 65 20 43 20 | 6c 61 6e 67 75 61 67 65 |, the C |language|
|00000b20| 20 6d 61 79 20 62 65 20 | 62 61 73 65 64 20 6f 6e | may be |based on|
|00000b30| 20 74 68 65 20 70 72 65 | 2d 41 4e 53 49 20 64 65 | the pre|-ANSI de|
|00000b40| 66 69 6e 69 74 69 6f 6e | 20 64 65 66 69 6e 65 64 |finition| defined|
|00000b50| 20 62 79 0a 4b 65 72 6e | 69 67 68 61 6e 20 26 20 | by.Kern|ighan & |
|00000b60| 52 69 74 63 68 69 65 27 | 73 20 0a 2e 49 20 22 54 |Ritchie'|s ..I "T|
|00000b70| 68 65 20 43 20 50 72 6f | 67 72 61 6d 6d 69 6e 67 |he C Pro|gramming|
|00000b80| 20 4c 61 6e 67 75 61 67 | 65 22 0a 62 6f 6f 6b 20 | Languag|e".book |
|00000b90| 28 74 68 65 0a 2e 42 20 | 5c 2d 70 0a 6f 70 74 69 |(the..B |\-p.opti|
|00000ba0| 6f 6e 20 69 73 20 75 73 | 65 64 29 2c 20 6f 72 0a |on is us|ed), or.|
|00000bb0| 74 68 65 20 43 20 6c 61 | 6e 67 75 61 67 65 20 64 |the C la|nguage d|
|00000bc0| 65 66 69 6e 65 64 20 62 | 79 20 74 68 65 20 52 69 |efined b|y the Ri|
|00000bd0| 74 63 68 69 65 20 50 44 | 50 2d 31 31 20 43 20 63 |tchie PD|P-11 C c|
|00000be0| 6f 6d 70 69 6c 65 72 20 | 28 74 68 65 0a 2e 42 20 |ompiler |(the..B |
|00000bf0| 5c 2d 72 0a 6f 70 74 69 | 6f 6e 20 69 73 20 75 73 |\-r.opti|on is us|
|00000c00| 65 64 29 2e 0a 54 68 65 | 20 43 2b 2b 20 6c 61 6e |ed)..The| C++ lan|
|00000c10| 67 75 61 67 65 20 28 74 | 68 65 20 64 65 66 61 75 |guage (t|he defau|
|00000c20| 6c 74 20 66 6f 72 0a 2e | 49 20 63 2b 2b 64 65 63 |lt for..|I c++dec|
|00000c30| 6c 20 2c 0a 6f 72 20 77 | 69 74 68 20 74 68 65 0a |l ,.or w|ith the.|
|00000c40| 2e 42 20 5c 2d 2b 0a 6f | 70 74 69 6f 6e 29 20 69 |.B \-+.o|ption) i|
|00000c50| 73 20 62 61 73 65 64 20 | 6f 6e 20 53 74 72 6f 75 |s based |on Strou|
|00000c60| 73 74 72 75 70 27 73 0a | 2e 49 52 20 22 54 68 65 |strup's.|.IR "The|
|00000c70| 20 43 2b 2b 20 50 72 6f | 67 72 61 6d 6d 69 6e 67 | C++ Pro|gramming|
|00000c80| 20 4c 61 6e 67 75 61 67 | 65 22 20 2c 0a 70 6c 75 | Languag|e" ,.plu|
|00000c90| 73 20 74 68 65 20 76 65 | 72 73 69 6f 6e 20 32 2e |s the ve|rsion 2.|
|00000ca0| 30 20 61 64 64 69 74 69 | 6f 6e 73 20 74 6f 20 74 |0 additi|ons to t|
|00000cb0| 68 65 20 6c 61 6e 67 75 | 61 67 65 2e 0a 2e 50 50 |he langu|age...PP|
|00000cc0| 0a 2e 49 20 43 64 65 63 | 6c 0a 72 65 61 64 73 20 |..I Cdec|l.reads |
|00000cd0| 74 68 65 20 6e 61 6d 65 | 64 20 66 69 6c 65 73 20 |the name|d files |
|00000ce0| 66 6f 72 20 73 74 61 74 | 65 6d 65 6e 74 73 20 69 |for stat|ements i|
|00000cf0| 6e 20 74 68 65 20 6c 61 | 6e 67 75 61 67 65 20 64 |n the la|nguage d|
|00000d00| 65 73 63 72 69 62 65 64 | 20 62 65 6c 6f 77 2e 0a |escribed| below..|
|00000d10| 41 20 74 72 61 6e 73 66 | 6f 72 6d 61 74 69 6f 6e |A transf|ormation|
|00000d20| 20 69 73 20 6d 61 64 65 | 20 66 72 6f 6d 20 74 68 | is made| from th|
|00000d30| 61 74 20 6c 61 6e 67 75 | 61 67 65 20 74 6f 20 43 |at langu|age to C|
|00000d40| 20 28 43 2b 2b 29 20 6f | 72 20 70 73 65 75 64 6f | (C++) o|r pseudo|
|00000d50| 2d 45 6e 67 6c 69 73 68 | 2e 0a 54 68 65 20 72 65 |-English|..The re|
|00000d60| 73 75 6c 74 73 20 6f 66 | 20 74 68 69 73 20 74 72 |sults of| this tr|
|00000d70| 61 6e 73 66 6f 72 6d 61 | 74 69 6f 6e 20 61 72 65 |ansforma|tion are|
|00000d80| 20 77 72 69 74 74 65 6e | 20 6f 6e 20 73 74 61 6e | written| on stan|
|00000d90| 64 61 72 64 20 6f 75 74 | 70 75 74 2e 0a 49 66 20 |dard out|put..If |
|00000da0| 6e 6f 20 66 69 6c 65 73 | 20 61 72 65 20 6e 61 6d |no files| are nam|
|00000db0| 65 64 2c 20 6f 72 20 61 | 20 66 69 6c 65 6e 61 6d |ed, or a| filenam|
|00000dc0| 65 20 6f 66 20 60 60 5c | 2d 27 27 20 69 73 20 65 |e of ``\|-'' is e|
|00000dd0| 6e 63 6f 75 6e 74 65 72 | 65 64 2c 20 73 74 61 6e |ncounter|ed, stan|
|00000de0| 64 61 72 64 20 69 6e 70 | 75 74 0a 77 69 6c 6c 20 |dard inp|ut.will |
|00000df0| 62 65 20 72 65 61 64 2e | 0a 49 66 20 73 74 61 6e |be read.|.If stan|
|00000e00| 64 61 72 64 20 69 6e 70 | 75 74 20 69 73 20 63 6f |dard inp|ut is co|
|00000e10| 6d 69 6e 67 20 66 72 6f | 6d 20 61 20 74 65 72 6d |ming fro|m a term|
|00000e20| 69 6e 61 6c 2c 20 28 6f | 72 20 74 68 65 0a 2e 42 |inal, (o|r the..B|
|00000e30| 20 5c 2d 69 0a 6f 70 74 | 69 6f 6e 20 69 73 20 75 | \-i.opt|ion is u|
|00000e40| 73 65 64 29 2c 20 61 20 | 70 72 6f 6d 70 74 20 77 |sed), a |prompt w|
|00000e50| 69 6c 6c 20 62 65 20 77 | 72 69 74 74 65 6e 20 74 |ill be w|ritten t|
|00000e60| 6f 20 74 68 65 20 74 65 | 72 6d 69 6e 61 6c 20 62 |o the te|rminal b|
|00000e70| 65 66 6f 72 65 20 65 61 | 63 68 20 6c 69 6e 65 2e |efore ea|ch line.|
|00000e80| 0a 49 66 0a 2e 49 20 63 | 64 65 63 6c 0a 69 73 20 |.If..I c|decl.is |
|00000e90| 69 6e 76 6f 6b 65 64 20 | 61 73 20 0a 2e 49 52 20 |invoked |as ..IR |
|00000ea0| 65 78 70 6c 61 69 6e 20 | 2c 0a 2e 49 52 20 64 65 |explain |,..IR de|
|00000eb0| 63 6c 61 72 65 0a 6f 72 | 0a 2e 49 52 20 63 61 73 |clare.or|..IR cas|
|00000ec0| 74 20 2c 0a 6f 72 20 74 | 68 65 20 66 69 72 73 74 |t ,.or t|he first|
|00000ed0| 20 61 72 67 75 6d 65 6e | 74 20 69 73 20 6f 6e 65 | argumen|t is one|
|00000ee0| 20 6f 66 20 74 68 65 20 | 63 6f 6d 6d 61 6e 64 73 | of the |commands|
|00000ef0| 20 64 69 73 63 75 73 73 | 65 64 20 62 65 6c 6f 77 | discuss|ed below|
|00000f00| 2c 20 74 68 65 20 61 72 | 67 75 6d 65 6e 74 0a 6c |, the ar|gument.l|
|00000f10| 69 73 74 20 77 69 6c 6c | 20 62 65 20 69 6e 74 65 |ist will| be inte|
|00000f20| 72 70 72 65 74 65 64 20 | 61 63 63 6f 72 64 69 6e |rpreted |accordin|
|00000f30| 67 20 74 6f 20 74 68 65 | 20 67 72 61 6d 6d 61 72 |g to the| grammar|
|00000f40| 20 73 68 6f 77 6e 20 62 | 65 6c 6f 77 20 69 6e 73 | shown b|elow ins|
|00000f50| 74 65 61 64 20 6f 66 20 | 61 73 0a 66 69 6c 65 20 |tead of |as.file |
|00000f60| 6e 61 6d 65 73 2e 0a 2e | 50 50 0a 59 6f 75 20 63 |names...|PP.You c|
|00000f70| 61 6e 20 75 73 65 0a 2e | 49 20 63 64 65 63 6c 0a |an use..|I cdecl.|
|00000f80| 61 73 20 79 6f 75 20 63 | 72 65 61 74 65 20 61 20 |as you c|reate a |
|00000f90| 43 20 70 72 6f 67 72 61 | 6d 20 77 69 74 68 20 61 |C progra|m with a|
|00000fa0| 6e 20 65 64 69 74 6f 72 | 20 6c 69 6b 65 20 76 69 |n editor| like vi|
|00000fb0| 28 31 29 20 6f 72 20 65 | 6d 61 63 73 28 31 29 2e |(1) or e|macs(1).|
|00000fc0| 0a 59 6f 75 20 73 69 6d | 70 6c 79 20 74 79 70 65 |.You sim|ply type|
|00000fd0| 20 69 6e 20 74 68 65 20 | 70 73 65 75 64 6f 2d 45 | in the |pseudo-E|
|00000fe0| 6e 67 6c 69 73 68 20 76 | 65 72 73 69 6f 6e 20 6f |nglish v|ersion o|
|00000ff0| 66 20 74 68 65 20 64 65 | 63 6c 61 72 61 74 69 6f |f the de|claratio|
|00001000| 6e 20 61 6e 64 20 61 70 | 70 6c 79 0a 2e 49 20 63 |n and ap|ply..I c|
|00001010| 64 65 63 6c 0a 61 73 20 | 61 20 66 69 6c 74 65 72 |decl.as |a filter|
|00001020| 20 74 6f 20 74 68 65 20 | 6c 69 6e 65 2e 0a 28 49 | to the |line..(I|
|00001030| 6e 20 76 69 28 31 29 2c | 20 74 79 70 65 20 60 60 |n vi(1),| type ``|
|00001040| 21 21 63 64 65 63 6c 3c | 63 72 3e 27 27 2e 29 0a |!!cdecl<|cr>''.).|
|00001050| 2e 50 50 0a 49 66 20 74 | 68 65 20 0a 2e 49 20 22 |.PP.If t|he ..I "|
|00001060| 63 72 65 61 74 65 20 70 | 72 6f 67 72 61 6d 22 0a |create p|rogram".|
|00001070| 6f 70 74 69 6f 6e 0a 2e | 42 20 5c 2d 63 0a 69 73 |option..|B \-c.is|
|00001080| 20 75 73 65 64 2c 20 74 | 68 65 20 6f 75 74 70 75 | used, t|he outpu|
|00001090| 74 20 77 69 6c 6c 20 69 | 6e 63 6c 75 64 65 20 73 |t will i|nclude s|
|000010a0| 65 6d 69 2d 63 6f 6c 6f | 6e 73 20 61 66 74 65 72 |emi-colo|ns after|
|000010b0| 20 76 61 72 69 61 62 6c | 65 20 64 65 63 6c 61 72 | variabl|e declar|
|000010c0| 61 74 69 6f 6e 73 20 61 | 6e 64 0a 63 75 72 6c 79 |ations a|nd.curly|
|000010d0| 20 62 72 61 63 65 20 70 | 61 69 72 73 20 61 66 74 | brace p|airs aft|
|000010e0| 65 72 20 66 75 6e 63 74 | 69 6f 6e 20 64 65 63 6c |er funct|ion decl|
|000010f0| 61 72 61 74 69 6f 6e 73 | 2e 0a 2e 50 50 0a 54 68 |arations|...PP.Th|
|00001100| 65 0a 2e 42 20 5c 2d 56 | 0a 6f 70 74 69 6f 6e 20 |e..B \-V|.option |
|00001110| 77 69 6c 6c 20 70 72 69 | 6e 74 20 6f 75 74 20 74 |will pri|nt out t|
|00001120| 68 65 20 76 65 72 73 69 | 6f 6e 20 6e 75 6d 62 65 |he versi|on numbe|
|00001130| 72 73 20 6f 66 20 74 68 | 65 20 66 69 6c 65 73 20 |rs of th|e files |
|00001140| 75 73 65 64 20 74 6f 20 | 63 72 65 61 74 65 20 74 |used to |create t|
|00001150| 68 65 0a 70 72 6f 63 65 | 73 73 2e 0a 49 66 20 74 |he.proce|ss..If t|
|00001160| 68 65 20 73 6f 75 72 63 | 65 20 69 73 20 63 6f 6d |he sourc|e is com|
|00001170| 70 69 6c 65 64 20 77 69 | 74 68 20 64 65 62 75 67 |piled wi|th debug|
|00001180| 67 69 6e 67 20 69 6e 66 | 6f 72 6d 61 74 69 6f 6e |ging inf|ormation|
|00001190| 20 74 75 72 6e 65 64 20 | 6f 6e 2c 20 74 68 65 0a | turned |on, the.|
|000011a0| 2e 42 20 5c 2d 64 0a 6f | 70 74 69 6f 6e 20 77 69 |.B \-d.o|ption wi|
|000011b0| 6c 6c 20 65 6e 61 62 6c | 65 20 69 74 20 74 6f 20 |ll enabl|e it to |
|000011c0| 62 65 20 6f 75 74 70 75 | 74 2e 0a 49 66 20 74 68 |be outpu|t..If th|
|000011d0| 65 20 73 6f 75 72 63 65 | 20 69 73 20 63 6f 6d 70 |e source| is comp|
|000011e0| 69 6c 65 64 20 77 69 74 | 68 20 59 41 43 43 20 64 |iled wit|h YACC d|
|000011f0| 65 62 75 67 67 69 6e 67 | 20 69 6e 66 6f 72 6d 61 |ebugging| informa|
|00001200| 74 69 6f 6e 20 74 75 72 | 6e 65 64 20 6f 6e 2c 20 |tion tur|ned on, |
|00001210| 74 68 65 0a 2e 42 20 5c | 2d 44 0a 6f 70 74 69 6f |the..B \|-D.optio|
|00001220| 6e 20 77 69 6c 6c 20 65 | 6e 61 62 6c 65 20 69 74 |n will e|nable it|
|00001230| 20 74 6f 20 62 65 20 6f | 75 74 70 75 74 2e 0a 2e | to be o|utput...|
|00001240| 53 48 20 22 43 4f 4d 4d | 41 4e 44 20 4c 41 4e 47 |SH "COMM|AND LANG|
|00001250| 55 41 47 45 22 0a 54 68 | 65 72 65 20 61 72 65 20 |UAGE".Th|ere are |
|00001260| 73 69 78 20 73 74 61 74 | 65 6d 65 6e 74 73 20 69 |six stat|ements i|
|00001270| 6e 20 74 68 65 20 6c 61 | 6e 67 75 61 67 65 2e 0a |n the la|nguage..|
|00001280| 54 68 65 0a 2e 49 20 22 | 64 65 63 6c 61 72 65 22 |The..I "|declare"|
|00001290| 0a 73 74 61 74 65 6d 65 | 6e 74 20 63 6f 6d 70 6f |.stateme|nt compo|
|000012a0| 73 65 73 20 61 20 43 20 | 74 79 70 65 2d 64 65 63 |ses a C |type-dec|
|000012b0| 6c 61 72 61 74 69 6f 6e | 20 66 72 6f 6d 20 61 20 |laration| from a |
|000012c0| 76 65 72 62 6f 73 65 20 | 64 65 73 63 72 69 70 74 |verbose |descript|
|000012d0| 69 6f 6e 2e 0a 54 68 65 | 0a 2e 49 20 22 63 61 73 |ion..The|..I "cas|
|000012e0| 74 22 0a 73 74 61 74 65 | 6d 65 6e 74 20 63 6f 6d |t".state|ment com|
|000012f0| 70 6f 73 65 73 20 61 20 | 43 20 74 79 70 65 2d 63 |poses a |C type-c|
|00001300| 61 73 74 20 61 73 20 6d | 69 67 68 74 20 61 70 70 |ast as m|ight app|
|00001310| 65 61 72 20 69 6e 20 61 | 6e 20 65 78 70 72 65 73 |ear in a|n expres|
|00001320| 73 69 6f 6e 2e 0a 54 68 | 65 0a 2e 49 20 22 65 78 |sion..Th|e..I "ex|
|00001330| 70 6c 61 69 6e 22 0a 73 | 74 61 74 65 6d 65 6e 74 |plain".s|tatement|
|00001340| 20 64 65 63 6f 64 65 73 | 20 61 20 43 20 74 79 70 | decodes| a C typ|
|00001350| 65 2d 64 65 63 6c 61 72 | 61 74 69 6f 6e 20 6f 72 |e-declar|ation or|
|00001360| 20 63 61 73 74 2c 20 70 | 72 6f 64 75 63 69 6e 67 | cast, p|roducing|
|00001370| 20 61 20 76 65 72 62 6f | 73 65 0a 64 65 73 63 72 | a verbo|se.descr|
|00001380| 69 70 74 69 6f 6e 2e 0a | 54 68 65 0a 2e 49 20 22 |iption..|The..I "|
|00001390| 68 65 6c 70 22 0a 28 6f | 72 0a 2e 49 52 20 3f 20 |help".(o|r..IR ? |
|000013a0| 29 0a 73 74 61 74 65 6d | 65 6e 74 20 70 72 6f 76 |).statem|ent prov|
|000013b0| 69 64 65 73 20 61 20 68 | 65 6c 70 20 6d 65 73 73 |ides a h|elp mess|
|000013c0| 61 67 65 2e 0a 54 68 65 | 0a 2e 49 20 22 71 75 69 |age..The|..I "qui|
|000013d0| 74 22 0a 28 6f 72 0a 2e | 49 52 20 22 65 78 69 74 |t".(or..|IR "exit|
|000013e0| 22 20 29 0a 73 74 61 74 | 65 6d 65 6e 74 20 28 6f |" ).stat|ement (o|
|000013f0| 72 20 74 68 65 20 65 6e | 64 20 6f 66 20 66 69 6c |r the en|d of fil|
|00001400| 65 29 20 65 78 69 74 73 | 20 74 68 65 20 70 72 6f |e) exits| the pro|
|00001410| 67 72 61 6d 2e 0a 54 68 | 65 0a 2e 49 20 22 73 65 |gram..Th|e..I "se|
|00001420| 74 22 0a 73 74 61 74 65 | 6d 65 6e 74 20 61 6c 6c |t".state|ment all|
|00001430| 6f 77 73 20 74 68 65 20 | 63 6f 6d 6d 61 6e 64 20 |ows the |command |
|00001440| 6c 69 6e 65 20 6f 70 74 | 69 6f 6e 73 20 74 6f 20 |line opt|ions to |
|00001450| 62 65 20 73 65 74 20 69 | 6e 74 65 72 61 63 74 69 |be set i|nteracti|
|00001460| 76 65 6c 79 2e 0a 45 61 | 63 68 20 73 74 61 74 65 |vely..Ea|ch state|
|00001470| 6d 65 6e 74 20 69 73 20 | 73 65 70 61 72 61 74 65 |ment is |separate|
|00001480| 64 20 62 79 20 61 20 73 | 65 6d 69 2d 63 6f 6c 6f |d by a s|emi-colo|
|00001490| 6e 20 6f 72 20 61 20 6e | 65 77 6c 69 6e 65 2e 0a |n or a n|ewline..|
|000014a0| 2e 50 50 0a 54 68 65 20 | 66 6f 6c 6c 6f 77 69 6e |.PP.The |followin|
|000014b0| 67 20 67 72 61 6d 6d 61 | 72 20 64 65 73 63 72 69 |g gramma|r descri|
|000014c0| 62 65 73 20 74 68 65 20 | 6c 61 6e 67 75 61 67 65 |bes the |language|
|000014d0| 2e 0a 49 6e 20 74 68 65 | 20 67 72 61 6d 6d 61 72 |..In the| grammar|
|000014e0| 2c 20 77 6f 72 64 73 20 | 69 6e 20 22 3c 3e 22 20 |, words |in "<>" |
|000014f0| 61 72 65 20 6e 6f 6e 2d | 74 65 72 6d 69 6e 61 6c |are non-|terminal|
|00001500| 73 2c 0a 62 61 72 65 20 | 6c 6f 77 65 72 2d 63 61 |s,.bare |lower-ca|
|00001510| 73 65 20 77 6f 72 64 73 | 20 61 72 65 20 74 65 72 |se words| are ter|
|00001520| 6d 69 6e 61 6c 73 20 74 | 68 61 74 20 73 74 61 6e |minals t|hat stan|
|00001530| 64 20 66 6f 72 20 74 68 | 65 6d 73 65 6c 76 65 73 |d for th|emselves|
|00001540| 2e 0a 42 61 72 65 20 75 | 70 70 65 72 2d 63 61 73 |..Bare u|pper-cas|
|00001550| 65 20 77 6f 72 64 73 20 | 61 72 65 20 6f 74 68 65 |e words |are othe|
|00001560| 72 20 6c 65 78 69 63 61 | 6c 20 74 6f 6b 65 6e 73 |r lexica|l tokens|
|00001570| 3a 0a 4e 4f 54 48 49 4e | 47 20 6d 65 61 6e 73 20 |:.NOTHIN|G means |
|00001580| 74 68 65 20 65 6d 70 74 | 79 20 73 74 72 69 6e 67 |the empt|y string|
|00001590| 3b 0a 4e 41 4d 45 20 6d | 65 61 6e 73 20 61 20 43 |;.NAME m|eans a C|
|000015a0| 20 69 64 65 6e 74 69 66 | 69 65 72 3b 0a 4e 55 4d | identif|ier;.NUM|
|000015b0| 42 45 52 20 6d 65 61 6e | 73 20 61 20 73 74 72 69 |BER mean|s a stri|
|000015c0| 6e 67 20 6f 66 20 64 65 | 63 69 6d 61 6c 20 64 69 |ng of de|cimal di|
|000015d0| 67 69 74 73 3b 20 61 6e | 64 0a 4e 4c 20 6d 65 61 |gits; an|d.NL mea|
|000015e0| 6e 73 20 74 68 65 20 6e | 65 77 2d 6c 69 6e 65 20 |ns the n|ew-line |
|000015f0| 6f 72 20 73 65 6d 69 2d | 63 6f 6c 6f 6e 20 63 68 |or semi-|colon ch|
|00001600| 61 72 61 63 74 65 72 73 | 2e 0a 2e 50 50 0a 53 6f |aracters|...PP.So|
|00001610| 6d 65 20 73 79 6e 6f 6e | 79 6d 73 20 61 72 65 20 |me synon|yms are |
|00001620| 70 65 72 6d 69 74 74 65 | 64 20 64 75 72 69 6e 67 |permitte|d during|
|00001630| 20 61 20 64 65 63 6c 61 | 72 61 74 69 6f 6e 3a 0a | a decla|ration:.|
|00001640| 63 68 61 72 61 63 74 65 | 72 20 5c 28 2d 3e 20 63 |characte|r \(-> c|
|00001650| 68 61 72 2c 0a 63 6f 6e | 73 74 61 6e 74 20 5c 28 |har,.con|stant \(|
|00001660| 2d 3e 20 63 6f 6e 73 74 | 2c 0a 65 6e 75 6d 65 72 |-> const|,.enumer|
|00001670| 61 74 69 6f 6e 20 5c 28 | 2d 3e 20 65 6e 75 6d 2c |ation \(|-> enum,|
|00001680| 0a 66 75 6e 63 20 5c 28 | 2d 3e 20 66 75 6e 63 74 |.func \(|-> funct|
|00001690| 69 6f 6e 2c 0a 69 6e 74 | 65 67 65 72 20 5c 28 2d |ion,.int|eger \(-|
|000016a0| 3e 20 69 6e 74 2c 0a 70 | 74 72 20 5c 28 2d 3e 20 |> int,.p|tr \(-> |
|000016b0| 70 6f 69 6e 74 65 72 2c | 0a 72 65 66 20 5c 28 2d |pointer,|.ref \(-|
|000016c0| 3e 20 72 65 66 65 72 65 | 6e 63 65 2c 0a 72 65 74 |> refere|nce,.ret|
|000016d0| 20 5c 28 2d 3e 20 72 65 | 74 75 72 6e 69 6e 67 2c | \(-> re|turning,|
|000016e0| 0a 73 74 72 75 63 74 75 | 72 65 20 5c 28 2d 3e 20 |.structu|re \(-> |
|000016f0| 73 74 72 75 63 74 2c 0a | 61 6e 64 0a 76 65 63 74 |struct,.|and.vect|
|00001700| 6f 72 20 5c 28 2d 3e 20 | 61 72 72 61 79 2e 0a 2e |or \(-> |array...|
|00001710| 50 50 0a 2e 6e 66 0a 2e | 66 74 20 43 57 0a 2e 74 |PP..nf..|ft CW..t|
|00001720| 61 20 2e 35 69 20 31 2e | 35 69 0a 09 3c 70 72 6f |a .5i 1.|5i..<pro|
|00001730| 67 72 61 6d 3e 09 3a 3a | 3d 20 4e 4f 54 48 49 4e |gram>.::|= NOTHIN|
|00001740| 47 0a 09 09 7c 20 3c 70 | 72 6f 67 72 61 6d 3e 20 |G...| <p|rogram> |
|00001750| 3c 73 74 6d 74 3e 20 4e | 4c 0a 09 3c 73 74 6d 74 |<stmt> N|L..<stmt|
|00001760| 3e 09 3a 3a 3d 20 4e 4f | 54 48 49 4e 47 0a 09 09 |>.::= NO|THING...|
|00001770| 7c 20 64 65 63 6c 61 72 | 65 20 4e 41 4d 45 20 61 || declar|e NAME a|
|00001780| 73 20 3c 61 64 65 63 6c | 3e 0a 09 09 7c 20 64 65 |s <adecl|>...| de|
|00001790| 63 6c 61 72 65 20 3c 61 | 64 65 63 6c 3e 0a 09 09 |clare <a|decl>...|
|000017a0| 7c 20 63 61 73 74 20 4e | 41 4d 45 20 69 6e 74 6f || cast N|AME into|
|000017b0| 20 3c 61 64 65 63 6c 3e | 0a 09 09 7c 20 63 61 73 | <adecl>|...| cas|
|000017c0| 74 20 3c 61 64 65 63 6c | 3e 0a 09 09 7c 20 65 78 |t <adecl|>...| ex|
|000017d0| 70 6c 61 69 6e 20 3c 6f | 70 74 73 74 6f 72 61 67 |plain <o|ptstorag|
|000017e0| 65 3e 20 3c 70 74 72 6d | 6f 64 6c 69 73 74 3e 20 |e> <ptrm|odlist> |
|000017f0| 3c 74 79 70 65 3e 20 3c | 63 64 65 63 6c 3e 0a 09 |<type> <|cdecl>..|
|00001800| 09 7c 20 65 78 70 6c 61 | 69 6e 20 3c 73 74 6f 72 |.| expla|in <stor|
|00001810| 61 67 65 3e 20 3c 70 74 | 72 6d 6f 64 6c 69 73 74 |age> <pt|rmodlist|
|00001820| 3e 20 3c 63 64 65 63 6c | 3e 0a 09 09 7c 20 65 78 |> <cdecl|>...| ex|
|00001830| 70 6c 61 69 6e 20 28 20 | 3c 70 74 72 6d 6f 64 6c |plain ( |<ptrmodl|
|00001840| 69 73 74 3e 20 3c 74 79 | 70 65 3e 20 3c 63 61 73 |ist> <ty|pe> <cas|
|00001850| 74 3e 20 29 20 6f 70 74 | 69 6f 6e 61 6c 2d 4e 41 |t> ) opt|ional-NA|
|00001860| 4d 45 0a 09 09 7c 20 73 | 65 74 20 3c 6f 70 74 69 |ME...| s|et <opti|
|00001870| 6f 6e 73 3e 0a 09 09 7c | 20 68 65 6c 70 20 7c 20 |ons>...|| help | |
|00001880| 3f 0a 09 09 7c 20 71 75 | 69 74 0a 09 09 7c 20 65 |?...| qu|it...| e|
|00001890| 78 69 74 0a 09 3c 61 64 | 65 63 6c 3e 09 3a 3a 3d |xit..<ad|ecl>.::=|
|000018a0| 20 61 72 72 61 79 20 6f | 66 20 3c 61 64 65 63 6c | array o|f <adecl|
|000018b0| 3e 0a 09 09 7c 20 61 72 | 72 61 79 20 4e 55 4d 42 |>...| ar|ray NUMB|
|000018c0| 45 52 20 6f 66 20 3c 61 | 64 65 63 6c 3e 0a 09 09 |ER of <a|decl>...|
|000018d0| 7c 20 66 75 6e 63 74 69 | 6f 6e 20 72 65 74 75 72 || functi|on retur|
|000018e0| 6e 69 6e 67 20 3c 61 64 | 65 63 6c 3e 0a 09 09 7c |ning <ad|ecl>...||
|000018f0| 20 66 75 6e 63 74 69 6f | 6e 20 28 20 3c 61 64 65 | functio|n ( <ade|
|00001900| 63 6c 2d 6c 69 73 74 3e | 20 29 20 72 65 74 75 72 |cl-list>| ) retur|
|00001910| 6e 69 6e 67 20 3c 61 64 | 65 63 6c 3e 0a 09 09 7c |ning <ad|ecl>...||
|00001920| 20 3c 70 74 72 6d 6f 64 | 6c 69 73 74 3e 20 70 6f | <ptrmod|list> po|
|00001930| 69 6e 74 65 72 20 74 6f | 20 3c 61 64 65 63 6c 3e |inter to| <adecl>|
|00001940| 0a 09 09 7c 20 3c 70 74 | 72 6d 6f 64 6c 69 73 74 |...| <pt|rmodlist|
|00001950| 3e 20 70 6f 69 6e 74 65 | 72 20 74 6f 20 6d 65 6d |> pointe|r to mem|
|00001960| 62 65 72 20 6f 66 20 63 | 6c 61 73 73 20 4e 41 4d |ber of c|lass NAM|
|00001970| 45 20 3c 61 64 65 63 6c | 3e 0a 09 09 7c 20 3c 70 |E <adecl|>...| <p|
|00001980| 74 72 6d 6f 64 6c 69 73 | 74 3e 20 72 65 66 65 72 |trmodlis|t> refer|
|00001990| 65 6e 63 65 20 74 6f 20 | 3c 61 64 65 63 6c 3e 0a |ence to |<adecl>.|
|000019a0| 09 09 7c 20 3c 70 74 72 | 6d 6f 64 6c 69 73 74 3e |..| <ptr|modlist>|
|000019b0| 20 3c 74 79 70 65 3e 0a | 09 3c 63 64 65 63 6c 3e | <type>.|.<cdecl>|
|000019c0| 09 3a 3a 3d 20 3c 63 64 | 65 63 6c 31 3e 0a 09 09 |.::= <cd|ecl1>...|
|000019d0| 7c 20 2a 20 3c 70 74 72 | 6d 6f 64 6c 69 73 74 3e || * <ptr|modlist>|
|000019e0| 20 3c 63 64 65 63 6c 3e | 0a 09 09 7c 20 4e 41 4d | <cdecl>|...| NAM|
|000019f0| 45 20 3a 3a 20 2a 20 3c | 63 64 65 63 6c 3e 0a 09 |E :: * <|cdecl>..|
|00001a00| 09 7c 20 26 20 3c 70 74 | 72 6d 6f 64 6c 69 73 74 |.| & <pt|rmodlist|
|00001a10| 3e 20 3c 63 64 65 63 6c | 3e 0a 09 3c 63 64 65 63 |> <cdecl|>..<cdec|
|00001a20| 6c 31 3e 09 3a 3a 3d 20 | 3c 63 64 65 63 6c 31 3e |l1>.::= |<cdecl1>|
|00001a30| 20 28 20 29 0a 09 09 7c | 20 3c 63 64 65 63 6c 31 | ( )...|| <cdecl1|
|00001a40| 3e 20 28 20 3c 63 61 73 | 74 6c 69 73 74 3e 20 29 |> ( <cas|tlist> )|
|00001a50| 0a 09 09 7c 20 3c 63 64 | 65 63 6c 31 3e 20 5b 20 |...| <cd|ecl1> [ |
|00001a60| 5d 0a 09 09 7c 20 3c 63 | 64 65 63 6c 31 3e 20 5b |]...| <c|decl1> [|
|00001a70| 20 4e 55 4d 42 45 52 20 | 5d 0a 09 09 7c 20 28 20 | NUMBER |]...| ( |
|00001a80| 3c 63 64 65 63 6c 3e 20 | 29 0a 09 09 7c 20 4e 41 |<cdecl> |)...| NA|
|00001a90| 4d 45 0a 09 3c 63 61 73 | 74 3e 09 3a 3a 3d 20 4e |ME..<cas|t>.::= N|
|00001aa0| 4f 54 48 49 4e 47 0a 09 | 09 7c 20 28 20 29 0a 09 |OTHING..|.| ( )..|
|00001ab0| 09 7c 20 28 20 3c 63 61 | 73 74 3e 20 29 20 28 20 |.| ( <ca|st> ) ( |
|00001ac0| 29 0a 09 09 7c 20 28 20 | 3c 63 61 73 74 3e 20 29 |)...| ( |<cast> )|
|00001ad0| 20 28 20 3c 63 61 73 74 | 6c 69 73 74 3e 20 29 0a | ( <cast|list> ).|
|00001ae0| 09 09 7c 20 28 20 3c 63 | 61 73 74 3e 20 29 0a 09 |..| ( <c|ast> )..|
|00001af0| 09 7c 20 4e 41 4d 45 20 | 3a 3a 20 2a 20 3c 63 61 |.| NAME |:: * <ca|
|00001b00| 73 74 3e 0a 09 09 7c 20 | 2a 20 3c 63 61 73 74 3e |st>...| |* <cast>|
|00001b10| 0a 09 09 7c 20 26 20 3c | 63 61 73 74 3e 0a 09 09 |...| & <|cast>...|
|00001b20| 7c 20 3c 63 61 73 74 3e | 20 5b 20 5d 0a 09 09 7c || <cast>| [ ]...||
|00001b30| 20 3c 63 61 73 74 3e 20 | 5b 20 4e 55 4d 42 45 52 | <cast> |[ NUMBER|
|00001b40| 20 5d 0a 09 3c 74 79 70 | 65 3e 09 3a 3a 3d 20 3c | ]..<typ|e>.::= <|
|00001b50| 74 79 70 65 6e 61 6d 65 | 3e 20 7c 20 3c 6d 6f 64 |typename|> | <mod|
|00001b60| 6c 69 73 74 3e 0a 09 09 | 7c 20 3c 6d 6f 64 6c 69 |list>...|| <modli|
|00001b70| 73 74 3e 20 3c 74 79 70 | 65 6e 61 6d 65 3e 0a 09 |st> <typ|ename>..|
|00001b80| 09 7c 20 73 74 72 75 63 | 74 20 4e 41 4d 45 20 7c |.| struc|t NAME ||
|00001b90| 20 75 6e 69 6f 6e 20 4e | 41 4d 45 20 7c 20 65 6e | union N|AME | en|
|00001ba0| 75 6d 20 4e 41 4d 45 20 | 7c 20 63 6c 61 73 73 20 |um NAME || class |
|00001bb0| 4e 41 4d 45 0a 09 3c 63 | 61 73 74 6c 69 73 74 3e |NAME..<c|astlist>|
|00001bc0| 09 3a 3a 3d 20 3c 63 61 | 73 74 6c 69 73 74 3e 20 |.::= <ca|stlist> |
|00001bd0| 2c 20 3c 63 61 73 74 6c | 69 73 74 3e 0a 09 09 7c |, <castl|ist>...||
|00001be0| 20 3c 70 74 72 6d 6f 64 | 6c 69 73 74 3e 20 3c 74 | <ptrmod|list> <t|
|00001bf0| 79 70 65 3e 20 3c 63 61 | 73 74 3e 0a 09 09 7c 20 |ype> <ca|st>...| |
|00001c00| 3c 6e 61 6d 65 3e 0a 09 | 3c 61 64 65 63 6c 6c 69 |<name>..|<adeclli|
|00001c10| 73 74 3e 09 3a 3a 3d 20 | 3c 61 64 65 63 6c 6c 69 |st>.::= |<adeclli|
|00001c20| 73 74 3e 20 2c 20 3c 61 | 64 65 63 6c 6c 69 73 74 |st> , <a|decllist|
|00001c30| 3e 0a 09 09 7c 20 4e 4f | 54 48 49 4e 47 0a 09 09 |>...| NO|THING...|
|00001c40| 7c 20 3c 6e 61 6d 65 3e | 0a 09 09 7c 20 3c 61 64 || <name>|...| <ad|
|00001c50| 65 63 6c 3e 0a 09 09 7c | 20 3c 6e 61 6d 65 3e 20 |ecl>...|| <name> |
|00001c60| 61 73 20 3c 61 64 65 63 | 6c 3e 0a 09 3c 74 79 70 |as <adec|l>..<typ|
|00001c70| 65 6e 61 6d 65 3e 09 3a | 3a 3d 20 69 6e 74 20 7c |ename>.:|:= int ||
|00001c80| 20 63 68 61 72 20 7c 20 | 64 6f 75 62 6c 65 20 7c | char | |double ||
|00001c90| 20 66 6c 6f 61 74 20 7c | 20 76 6f 69 64 0a 09 3c | float || void..<|
|00001ca0| 6d 6f 64 6c 69 73 74 3e | 09 3a 3a 3d 20 3c 6d 6f |modlist>|.::= <mo|
|00001cb0| 64 69 66 69 65 72 3e 20 | 7c 20 3c 6d 6f 64 6c 69 |difier> || <modli|
|00001cc0| 73 74 3e 20 3c 6d 6f 64 | 69 66 69 65 72 3e 0a 09 |st> <mod|ifier>..|
|00001cd0| 3c 6d 6f 64 69 66 69 65 | 72 3e 09 3a 3a 3d 20 73 |<modifie|r>.::= s|
|00001ce0| 68 6f 72 74 20 7c 20 6c | 6f 6e 67 20 7c 20 75 6e |hort | l|ong | un|
|00001cf0| 73 69 67 6e 65 64 20 7c | 20 73 69 67 6e 65 64 20 |signed || signed |
|00001d00| 7c 20 3c 70 74 72 6d 6f | 64 3e 0a 09 3c 70 74 72 || <ptrmo|d>..<ptr|
|00001d10| 6d 6f 64 6c 69 73 74 3e | 09 3a 3a 3d 20 3c 70 74 |modlist>|.::= <pt|
|00001d20| 72 6d 6f 64 3e 20 3c 70 | 74 72 6d 6f 64 6c 69 73 |rmod> <p|trmodlis|
|00001d30| 74 3e 20 7c 20 4e 4f 54 | 48 49 4e 47 0a 09 3c 70 |t> | NOT|HING..<p|
|00001d40| 74 72 6d 6f 64 3e 09 3a | 3a 3d 20 63 6f 6e 73 74 |trmod>.:|:= const|
|00001d50| 20 7c 20 76 6f 6c 61 74 | 69 6c 65 20 7c 20 6e 6f | | volat|ile | no|
|00001d60| 61 6c 69 61 73 0a 09 3c | 73 74 6f 72 61 67 65 3e |alias..<|storage>|
|00001d70| 09 3a 3a 3d 20 61 75 74 | 6f 20 7c 20 65 78 74 65 |.::= aut|o | exte|
|00001d80| 72 6e 20 7c 20 72 65 67 | 69 73 74 65 72 20 7c 20 |rn | reg|ister | |
|00001d90| 61 75 74 6f 0a 09 3c 6f | 70 74 73 74 6f 72 61 67 |auto..<o|ptstorag|
|00001da0| 65 3e 09 3a 3a 3d 20 4e | 4f 54 48 49 4e 47 20 7c |e>.::= N|OTHING ||
|00001db0| 20 3c 73 74 6f 72 61 67 | 65 3e 0a 09 3c 6f 70 74 | <storag|e>..<opt|
|00001dc0| 69 6f 6e 73 3e 09 3a 3a | 3d 20 4e 4f 54 48 49 4e |ions>.::|= NOTHIN|
|00001dd0| 47 20 7c 20 3c 6f 70 74 | 69 6f 6e 73 3e 0a 09 09 |G | <opt|ions>...|
|00001de0| 7c 20 63 72 65 61 74 65 | 20 7c 20 6e 6f 63 72 65 || create| | nocre|
|00001df0| 61 74 65 0a 09 09 7c 20 | 69 6e 74 65 72 61 63 74 |ate...| |interact|
|00001e00| 69 76 65 20 7c 20 6e 6f | 69 6e 74 65 72 61 63 74 |ive | no|interact|
|00001e10| 69 76 65 0a 09 09 7c 20 | 72 69 74 63 68 69 65 20 |ive...| |ritchie |
|00001e20| 7c 20 70 72 65 61 6e 73 | 69 20 7c 20 61 6e 73 69 || preans|i | ansi|
|00001e30| 20 7c 20 63 70 6c 75 73 | 70 6c 75 73 0a 09 09 7c | | cplus|plus...||
|00001e40| 20 64 65 62 75 67 20 7c | 20 6e 6f 64 65 62 75 67 | debug || nodebug|
|00001e50| 20 7c 20 79 79 64 65 62 | 75 67 20 7c 20 6e 6f 79 | | yydeb|ug | noy|
|00001e60| 79 64 65 62 75 67 0a 2e | 66 74 20 50 0a 2e 66 69 |ydebug..|ft P..fi|
|00001e70| 0a 2e 53 48 20 45 58 41 | 4d 50 4c 45 53 0a 2e 64 |..SH EXA|MPLES..d|
|00001e80| 65 20 45 78 0a 2e 20 20 | 20 20 50 50 0a 2e 20 20 |e Ex.. | PP.. |
|00001e90| 20 20 52 53 20 2e 35 69 | 0a 2e 2e 0a 2e 64 65 20 | RS .5i|.....de |
|00001ea0| 45 65 0a 2e 20 20 20 20 | 52 45 0a 2e 20 20 20 20 |Ee.. |RE.. |
|00001eb0| 50 50 0a 2e 2e 0a 54 6f | 20 64 65 63 6c 61 72 65 |PP....To| declare|
|00001ec0| 20 61 6e 20 61 72 72 61 | 79 20 6f 66 20 70 6f 69 | an arra|y of poi|
|00001ed0| 6e 74 65 72 73 20 74 6f | 20 66 75 6e 63 74 69 6f |nters to| functio|
|00001ee0| 6e 73 20 6c 69 6b 65 20 | 6d 61 6c 6c 6f 63 28 33 |ns like |malloc(3|
|00001ef0| 29 2c 20 64 6f 0a 2e 45 | 78 0a 64 65 63 6c 61 72 |), do..E|x.declar|
|00001f00| 65 20 66 70 74 61 62 20 | 61 73 20 61 72 72 61 79 |e fptab |as array|
|00001f10| 20 6f 66 20 70 6f 69 6e | 74 65 72 20 74 6f 20 66 | of poin|ter to f|
|00001f20| 75 6e 63 74 69 6f 6e 20 | 72 65 74 75 72 6e 69 6e |unction |returnin|
|00001f30| 67 20 70 6f 69 6e 74 65 | 72 20 74 6f 20 63 68 61 |g pointe|r to cha|
|00001f40| 72 0a 2e 45 65 0a 54 68 | 65 20 72 65 73 75 6c 74 |r..Ee.Th|e result|
|00001f50| 20 6f 66 20 74 68 69 73 | 20 63 6f 6d 6d 61 6e 64 | of this| command|
|00001f60| 20 69 73 0a 2e 45 78 0a | 63 68 61 72 20 2a 28 2a | is..Ex.|char *(*|
|00001f70| 66 70 74 61 62 5b 5d 29 | 28 29 0a 2e 45 65 0a 57 |fptab[])|()..Ee.W|
|00001f80| 68 65 6e 20 79 6f 75 20 | 73 65 65 20 74 68 69 73 |hen you |see this|
|00001f90| 20 64 65 63 6c 61 72 61 | 74 69 6f 6e 20 69 6e 20 | declara|tion in |
|00001fa0| 73 6f 6d 65 6f 6e 65 20 | 65 6c 73 65 27 73 20 63 |someone |else's c|
|00001fb0| 6f 64 65 2c 20 79 6f 75 | 0a 63 61 6e 20 6d 61 6b |ode, you|.can mak|
|00001fc0| 65 20 73 65 6e 73 65 20 | 6f 75 74 20 6f 66 20 69 |e sense |out of i|
|00001fd0| 74 20 62 79 20 64 6f 69 | 6e 67 0a 2e 45 78 0a 65 |t by doi|ng..Ex.e|
|00001fe0| 78 70 6c 61 69 6e 20 63 | 68 61 72 20 2a 28 2a 66 |xplain c|har *(*f|
|00001ff0| 70 74 61 62 5b 5d 29 28 | 29 0a 2e 45 65 0a 54 68 |ptab[])(|)..Ee.Th|
|00002000| 65 20 70 72 6f 70 65 72 | 20 64 65 63 6c 61 72 61 |e proper| declara|
|00002010| 74 69 6f 6e 20 66 6f 72 | 20 73 69 67 6e 61 6c 28 |tion for| signal(|
|00002020| 32 29 2c 20 69 67 6e 6f | 72 69 6e 67 20 66 75 6e |2), igno|ring fun|
|00002030| 63 74 69 6f 6e 20 70 72 | 6f 74 6f 74 79 70 65 73 |ction pr|ototypes|
|00002040| 2c 20 69 73 20 65 61 73 | 69 6c 79 0a 64 65 73 63 |, is eas|ily.desc|
|00002050| 72 69 62 65 64 20 69 6e | 0a 2e 49 52 20 63 64 65 |ribed in|..IR cde|
|00002060| 63 6c 20 27 73 0a 6c 61 | 6e 67 75 61 67 65 3a 0a |cl 's.la|nguage:.|
|00002070| 2e 45 78 0a 64 65 63 6c | 61 72 65 20 73 69 67 6e |.Ex.decl|are sign|
|00002080| 61 6c 20 61 73 20 66 75 | 6e 63 74 69 6f 6e 20 72 |al as fu|nction r|
|00002090| 65 74 75 72 6e 69 6e 67 | 20 70 6f 69 6e 74 65 72 |eturning| pointer|
|000020a0| 20 74 6f 20 66 75 6e 63 | 74 69 6f 6e 20 72 65 74 | to func|tion ret|
|000020b0| 75 72 6e 69 6e 67 20 76 | 6f 69 64 0a 2e 45 65 0a |urning v|oid..Ee.|
|000020c0| 77 68 69 63 68 20 70 72 | 6f 64 75 63 65 73 0a 2e |which pr|oduces..|
|000020d0| 45 78 0a 76 6f 69 64 20 | 28 2a 73 69 67 6e 61 6c |Ex.void |(*signal|
|000020e0| 28 29 29 28 29 0a 2e 45 | 65 0a 54 68 65 20 66 75 |())()..E|e.The fu|
|000020f0| 6e 63 74 69 6f 6e 20 64 | 65 63 6c 61 72 61 74 69 |nction d|eclarati|
|00002100| 6f 6e 20 74 68 61 74 20 | 72 65 73 75 6c 74 73 20 |on that |results |
|00002110| 68 61 73 20 74 77 6f 20 | 73 65 74 73 20 6f 66 20 |has two |sets of |
|00002120| 65 6d 70 74 79 20 70 61 | 72 65 6e 74 68 65 73 65 |empty pa|renthese|
|00002130| 73 2e 0a 54 68 65 20 61 | 75 74 68 6f 72 20 6f 66 |s..The a|uthor of|
|00002140| 20 73 75 63 68 20 61 20 | 66 75 6e 63 74 69 6f 6e | such a |function|
|00002150| 20 6d 69 67 68 74 20 77 | 6f 6e 64 65 72 20 77 68 | might w|onder wh|
|00002160| 65 72 65 20 74 6f 20 70 | 75 74 20 74 68 65 20 70 |ere to p|ut the p|
|00002170| 61 72 61 6d 65 74 65 72 | 73 3a 0a 2e 45 78 0a 64 |arameter|s:..Ex.d|
|00002180| 65 63 6c 61 72 65 20 73 | 69 67 6e 61 6c 20 61 73 |eclare s|ignal as|
|00002190| 20 66 75 6e 63 74 69 6f | 6e 20 28 61 72 67 31 2c | functio|n (arg1,|
|000021a0| 61 72 67 32 29 20 72 65 | 74 75 72 6e 69 6e 67 20 |arg2) re|turning |
|000021b0| 70 6f 69 6e 74 65 72 20 | 74 6f 20 66 75 6e 63 74 |pointer |to funct|
|000021c0| 69 6f 6e 20 72 65 74 75 | 72 6e 69 6e 67 0a 76 6f |ion retu|rning.vo|
|000021d0| 69 64 0a 2e 45 65 0a 70 | 72 6f 76 69 64 65 73 20 |id..Ee.p|rovides |
|000021e0| 74 68 65 20 66 6f 6c 6c | 6f 77 69 6e 67 20 73 6f |the foll|owing so|
|000021f0| 6c 75 74 69 6f 6e 20 28 | 77 68 65 6e 20 72 75 6e |lution (|when run|
|00002200| 20 77 69 74 68 20 74 68 | 65 0a 2e 49 20 5c 2d 63 | with th|e..I \-c|
|00002210| 0a 6f 70 74 69 6f 6e 29 | 3a 0a 2e 45 78 0a 76 6f |.option)|:..Ex.vo|
|00002220| 69 64 20 28 2a 73 69 67 | 6e 61 6c 28 61 72 67 31 |id (*sig|nal(arg1|
|00002230| 2c 61 72 67 32 29 29 28 | 29 0a 7b 0a 7d 0a 2e 45 |,arg2))(|).{.}..E|
|00002240| 65 0a 49 66 20 77 65 20 | 77 61 6e 74 20 74 6f 20 |e.If we |want to |
|00002250| 61 64 64 20 69 6e 20 74 | 68 65 20 66 75 6e 63 74 |add in t|he funct|
|00002260| 69 6f 6e 20 70 72 6f 74 | 6f 74 79 70 65 73 2c 20 |ion prot|otypes, |
|00002270| 74 68 65 20 66 75 6e 63 | 74 69 6f 6e 20 70 72 6f |the func|tion pro|
|00002280| 74 6f 74 79 70 65 20 66 | 6f 72 20 61 0a 66 75 6e |totype f|or a.fun|
|00002290| 63 74 69 6f 6e 20 73 75 | 63 68 20 61 73 20 5f 65 |ction su|ch as _e|
|000022a0| 78 69 74 28 32 29 20 77 | 6f 75 6c 64 20 62 65 20 |xit(2) w|ould be |
|000022b0| 64 65 63 6c 61 72 65 64 | 20 77 69 74 68 3a 0a 2e |declared| with:..|
|000022c0| 45 78 0a 64 65 63 6c 61 | 72 65 20 5f 65 78 69 74 |Ex.decla|re _exit|
|000022d0| 20 61 73 20 66 75 6e 63 | 74 69 6f 6e 20 28 72 65 | as func|tion (re|
|000022e0| 74 76 61 6c 75 65 20 61 | 73 20 69 6e 74 29 20 72 |tvalue a|s int) r|
|000022f0| 65 74 75 72 6e 69 6e 67 | 20 76 6f 69 64 0a 2e 45 |eturning| void..E|
|00002300| 65 0a 67 69 76 69 6e 67 | 0a 2e 45 78 0a 76 6f 69 |e.giving|..Ex.voi|
|00002310| 64 20 5f 65 78 69 74 28 | 69 6e 74 20 72 65 74 76 |d _exit(|int retv|
|00002320| 61 6c 75 65 29 0a 7b 0a | 7d 0a 2e 45 65 0a 41 73 |alue).{.|}..Ee.As|
|00002330| 20 61 20 6d 6f 72 65 20 | 63 6f 6d 70 6c 65 78 20 | a more |complex |
|00002340| 65 78 61 6d 70 6c 65 20 | 75 73 69 6e 67 20 66 75 |example |using fu|
|00002350| 6e 63 74 69 6f 6e 20 70 | 72 6f 74 6f 74 79 70 65 |nction p|rototype|
|00002360| 73 2c 20 73 69 67 6e 61 | 6c 28 32 29 20 63 6f 75 |s, signa|l(2) cou|
|00002370| 6c 64 20 62 65 20 66 75 | 6c 6c 79 0a 64 65 66 69 |ld be fu|lly.defi|
|00002380| 6e 65 64 20 61 73 3a 0a | 2e 45 78 0a 64 65 63 6c |ned as:.|.Ex.decl|
|00002390| 61 72 65 20 73 69 67 6e | 61 6c 20 61 73 20 66 75 |are sign|al as fu|
|000023a0| 6e 63 74 69 6f 6e 28 78 | 20 61 73 20 69 6e 74 2c |nction(x| as int,|
|000023b0| 20 79 20 61 73 20 70 6f | 69 6e 74 65 72 20 74 6f | y as po|inter to|
|000023c0| 20 66 75 6e 63 74 69 6f | 6e 28 69 6e 74 29 0a 72 | functio|n(int).r|
|000023d0| 65 74 75 72 6e 69 6e 67 | 20 76 6f 69 64 29 20 72 |eturning| void) r|
|000023e0| 65 74 75 72 6e 69 6e 67 | 20 70 6f 69 6e 74 65 72 |eturning| pointer|
|000023f0| 20 74 6f 20 66 75 6e 63 | 74 69 6f 6e 28 69 6e 74 | to func|tion(int|
|00002400| 29 20 72 65 74 75 72 6e | 69 6e 67 20 76 6f 69 64 |) return|ing void|
|00002410| 0a 2e 45 65 0a 67 69 76 | 69 6e 67 20 28 77 69 74 |..Ee.giv|ing (wit|
|00002420| 68 20 5c 2d 63 29 0a 2e | 45 78 0a 76 6f 69 64 20 |h \-c)..|Ex.void |
|00002430| 28 2a 73 69 67 6e 61 6c | 28 69 6e 74 20 78 2c 20 |(*signal|(int x, |
|00002440| 76 6f 69 64 20 28 2a 79 | 29 28 69 6e 74 20 29 29 |void (*y|)(int ))|
|00002450| 29 28 69 6e 74 20 29 0a | 7b 0a 7d 0a 2e 45 65 0a |)(int ).|{.}..Ee.|
|00002460| 2e 49 20 43 64 65 63 6c | 0a 63 61 6e 20 68 65 6c |.I Cdecl|.can hel|
|00002470| 70 20 66 69 67 75 72 65 | 20 6f 75 74 20 74 68 65 |p figure| out the|
|00002480| 20 77 68 65 72 65 20 74 | 6f 20 70 75 74 20 74 68 | where t|o put th|
|00002490| 65 20 22 63 6f 6e 73 74 | 22 20 61 6e 64 20 22 76 |e "const|" and "v|
|000024a0| 6f 6c 61 74 69 6c 65 22 | 20 6d 6f 64 69 66 69 65 |olatile"| modifie|
|000024b0| 72 73 0a 69 6e 20 64 65 | 63 6c 61 72 61 74 69 6f |rs.in de|claratio|
|000024c0| 6e 73 2c 20 74 68 75 73 | 0a 2e 45 78 0a 64 65 63 |ns, thus|..Ex.dec|
|000024d0| 6c 61 72 65 20 66 6f 6f | 20 61 73 20 70 6f 69 6e |lare foo| as poin|
|000024e0| 74 65 72 20 74 6f 20 63 | 6f 6e 73 74 20 69 6e 74 |ter to c|onst int|
|000024f0| 0a 2e 45 65 0a 67 69 76 | 65 73 0a 2e 45 78 0a 63 |..Ee.giv|es..Ex.c|
|00002500| 6f 6e 73 74 20 69 6e 74 | 20 2a 66 6f 6f 0a 2e 45 |onst int| *foo..E|
|00002510| 65 0a 77 68 69 6c 65 0a | 2e 45 78 0a 64 65 63 6c |e.while.|.Ex.decl|
|00002520| 61 72 65 20 66 6f 6f 20 | 61 73 20 63 6f 6e 73 74 |are foo |as const|
|00002530| 20 70 6f 69 6e 74 65 72 | 20 74 6f 20 69 6e 74 0a | pointer| to int.|
|00002540| 2e 45 65 0a 67 69 76 65 | 73 0a 2e 45 78 0a 69 6e |.Ee.give|s..Ex.in|
|00002550| 74 20 2a 20 63 6f 6e 73 | 74 20 66 6f 6f 0a 2e 45 |t * cons|t foo..E|
|00002560| 65 0a 2e 49 20 43 2b 2b | 64 65 63 6c 0a 63 61 6e |e..I C++|decl.can|
|00002570| 20 68 65 6c 70 20 77 69 | 74 68 20 64 65 63 6c 61 | help wi|th decla|
|00002580| 72 69 6e 67 20 72 65 66 | 65 72 65 6e 63 65 73 2c |ring ref|erences,|
|00002590| 20 74 68 75 73 0a 2e 45 | 78 0a 64 65 63 6c 61 72 | thus..E|x.declar|
|000025a0| 65 20 78 20 61 73 20 72 | 65 66 65 72 65 6e 63 65 |e x as r|eference|
|000025b0| 20 74 6f 20 70 6f 69 6e | 74 65 72 20 74 6f 20 63 | to poin|ter to c|
|000025c0| 68 61 72 61 63 74 65 72 | 0a 2e 45 65 0a 67 69 76 |haracter|..Ee.giv|
|000025d0| 65 73 0a 2e 45 78 0a 63 | 68 61 72 20 2a 26 78 0a |es..Ex.c|har *&x.|
|000025e0| 2e 45 65 0a 2e 49 20 43 | 2b 2b 64 65 63 6c 0a 63 |.Ee..I C|++decl.c|
|000025f0| 61 6e 20 68 65 6c 70 20 | 77 69 74 68 20 70 6f 69 |an help |with poi|
|00002600| 6e 74 65 72 73 20 74 6f | 20 6d 65 6d 62 65 72 20 |nters to| member |
|00002610| 6f 66 20 63 6c 61 73 73 | 65 73 2c 20 74 68 75 73 |of class|es, thus|
|00002620| 0a 64 65 63 6c 61 72 69 | 6e 67 20 61 20 70 6f 69 |.declari|ng a poi|
|00002630| 6e 74 65 72 20 74 6f 20 | 61 6e 20 69 6e 74 65 67 |nter to |an integ|
|00002640| 65 72 20 6d 65 6d 62 65 | 72 20 6f 66 20 61 20 63 |er membe|r of a c|
|00002650| 6c 61 73 73 20 58 20 77 | 69 74 68 0a 2e 45 78 0a |lass X w|ith..Ex.|
|00002660| 64 65 63 6c 61 72 65 20 | 66 6f 6f 20 61 73 20 70 |declare |foo as p|
|00002670| 6f 69 6e 74 65 72 20 74 | 6f 20 6d 65 6d 62 65 72 |ointer t|o member|
|00002680| 20 6f 66 20 63 6c 61 73 | 73 20 58 20 69 6e 74 0a | of clas|s X int.|
|00002690| 2e 45 65 0a 67 69 76 65 | 73 0a 2e 45 78 0a 69 6e |.Ee.give|s..Ex.in|
|000026a0| 74 20 58 3a 3a 2a 66 6f | 6f 0a 2e 45 65 0a 61 6e |t X::*fo|o..Ee.an|
|000026b0| 64 0a 2e 45 78 0a 64 65 | 63 6c 61 72 65 20 66 6f |d..Ex.de|clare fo|
|000026c0| 6f 20 61 73 20 70 6f 69 | 6e 74 65 72 20 74 6f 20 |o as poi|nter to |
|000026d0| 6d 65 6d 62 65 72 20 6f | 66 20 63 6c 61 73 73 20 |member o|f class |
|000026e0| 58 20 66 75 6e 63 74 69 | 6f 6e 20 28 61 72 67 31 |X functi|on (arg1|
|000026f0| 2c 20 61 72 67 32 29 20 | 72 65 74 75 72 6e 69 6e |, arg2) |returnin|
|00002700| 67 0a 70 6f 69 6e 74 65 | 72 20 74 6f 20 63 6c 61 |g.pointe|r to cla|
|00002710| 73 73 20 59 0a 2e 45 65 | 0a 67 69 76 65 73 0a 2e |ss Y..Ee|.gives..|
|00002720| 45 78 0a 63 6c 61 73 73 | 20 59 20 2a 28 58 3a 3a |Ex.class| Y *(X::|
|00002730| 2a 66 6f 6f 29 28 61 72 | 67 31 2c 20 61 72 67 32 |*foo)(ar|g1, arg2|
|00002740| 29 0a 2e 45 65 0a 2e 53 | 48 20 44 49 41 47 4e 4f |)..Ee..S|H DIAGNO|
|00002750| 53 54 49 43 53 0a 54 68 | 65 20 64 65 63 6c 61 72 |STICS.Th|e declar|
|00002760| 65 2c 20 63 61 73 74 20 | 61 6e 64 20 65 78 70 6c |e, cast |and expl|
|00002770| 61 69 6e 20 73 74 61 74 | 65 6d 65 6e 74 73 20 74 |ain stat|ements t|
|00002780| 72 79 20 74 6f 20 70 6f | 69 6e 74 20 6f 75 74 20 |ry to po|int out |
|00002790| 63 6f 6e 73 74 72 75 63 | 74 69 6f 6e 73 20 74 68 |construc|tions th|
|000027a0| 61 74 0a 61 72 65 20 6e | 6f 74 20 73 75 70 70 6f |at.are n|ot suppo|
|000027b0| 72 74 65 64 20 69 6e 20 | 43 2e 0a 49 6e 20 73 6f |rted in |C..In so|
|000027c0| 6d 65 20 63 61 73 65 73 | 2c 20 61 20 67 75 65 73 |me cases|, a gues|
|000027d0| 73 20 69 73 20 6d 61 64 | 65 20 61 73 20 74 6f 20 |s is mad|e as to |
|000027e0| 77 68 61 74 20 77 61 73 | 20 72 65 61 6c 6c 79 20 |what was| really |
|000027f0| 69 6e 74 65 6e 64 65 64 | 2e 0a 49 6e 20 74 68 65 |intended|..In the|
|00002800| 73 65 20 63 61 73 65 73 | 2c 20 74 68 65 20 43 20 |se cases|, the C |
|00002810| 72 65 73 75 6c 74 20 69 | 73 20 61 20 74 6f 79 20 |result i|s a toy |
|00002820| 64 65 63 6c 61 72 61 74 | 69 6f 6e 20 77 68 6f 73 |declarat|ion whos|
|00002830| 65 20 73 65 6d 61 6e 74 | 69 63 73 20 77 69 6c 6c |e semant|ics will|
|00002840| 20 77 6f 72 6b 0a 6f 6e | 6c 79 20 69 6e 20 41 6c | work.on|ly in Al|
|00002850| 67 6f 6c 2d 36 38 2e 0a | 54 68 65 20 6c 69 73 74 |gol-68..|The list|
|00002860| 20 6f 66 20 75 6e 73 75 | 70 70 6f 72 74 65 64 20 | of unsu|pported |
|00002870| 43 20 63 6f 6e 73 74 72 | 75 63 74 73 20 69 73 20 |C constr|ucts is |
|00002880| 64 65 70 65 6e 64 65 6e | 74 20 6f 6e 20 77 68 69 |dependen|t on whi|
|00002890| 63 68 20 76 65 72 73 69 | 6f 6e 20 6f 66 20 74 68 |ch versi|on of th|
|000028a0| 65 20 43 0a 6c 61 6e 67 | 75 61 67 65 20 69 73 20 |e C.lang|uage is |
|000028b0| 62 65 69 6e 67 20 75 73 | 65 64 20 28 73 65 65 20 |being us|ed (see |
|000028c0| 74 68 65 20 41 4e 53 49 | 2c 20 70 72 65 2d 41 4e |the ANSI|, pre-AN|
|000028d0| 53 49 2c 20 61 6e 64 20 | 52 69 74 63 68 69 65 20 |SI, and |Ritchie |
|000028e0| 6f 70 74 69 6f 6e 73 29 | 2e 0a 54 68 65 20 73 65 |options)|..The se|
|000028f0| 74 20 6f 66 20 73 75 70 | 70 6f 72 74 65 64 20 43 |t of sup|ported C|
|00002900| 2b 2b 20 63 6f 6e 73 74 | 72 75 63 74 73 20 69 73 |++ const|ructs is|
|00002910| 20 61 20 73 75 70 65 72 | 73 65 74 20 6f 66 20 74 | a super|set of t|
|00002920| 68 65 20 41 4e 53 49 20 | 73 65 74 2c 20 77 69 74 |he ANSI |set, wit|
|00002930| 68 20 74 68 65 0a 65 78 | 63 65 70 74 69 6f 6e 20 |h the.ex|ception |
|00002940| 6f 66 20 74 68 65 0a 2e | 42 20 6e 6f 61 6c 69 61 |of the..|B noalia|
|00002950| 73 0a 6b 65 79 77 6f 72 | 64 2e 0a 2e 53 48 20 22 |s.keywor|d...SH "|
|00002960| 53 45 45 20 41 4c 53 4f | 22 0a 28 64 72 61 66 74 |SEE ALSO|".(draft|
|00002970| 20 70 72 6f 70 6f 73 65 | 64 29 20 41 4e 53 49 20 | propose|d) ANSI |
|00002980| 4e 61 74 69 6f 6e 61 6c | 20 53 74 61 6e 64 61 72 |National| Standar|
|00002990| 64 20 58 33 4a 31 31 0a | 2e 73 70 0a 5c 28 73 63 |d X3J11.|.sp.\(sc|
|000029a0| 38 2e 34 20 6f 66 20 74 | 68 65 20 43 20 52 65 66 |8.4 of t|he C Ref|
|000029b0| 65 72 65 6e 63 65 20 4d | 61 6e 75 61 6c 20 77 69 |erence M|anual wi|
|000029c0| 74 68 69 6e 0a 2e 49 20 | 22 54 68 65 20 43 20 50 |thin..I |"The C P|
|000029d0| 72 6f 67 72 61 6d 6d 69 | 6e 67 20 4c 61 6e 67 75 |rogrammi|ng Langu|
|000029e0| 61 67 65 22 0a 62 79 20 | 42 2e 20 4b 65 72 6e 69 |age".by |B. Kerni|
|000029f0| 67 68 61 6e 20 26 20 44 | 2e 20 52 69 74 63 68 69 |ghan & D|. Ritchi|
|00002a00| 65 2e 0a 2e 73 70 0a 5c | 28 73 63 38 20 6f 66 20 |e...sp.\|(sc8 of |
|00002a10| 74 68 65 20 43 2b 2b 20 | 52 65 66 65 72 65 6e 63 |the C++ |Referenc|
|00002a20| 65 20 4d 61 6e 75 61 6c | 20 77 69 74 68 69 6e 0a |e Manual| within.|
|00002a30| 2e 49 20 22 54 68 65 20 | 43 2b 2b 20 50 72 6f 67 |.I "The |C++ Prog|
|00002a40| 72 61 6d 6d 69 6e 67 20 | 4c 61 6e 67 75 61 67 65 |ramming |Language|
|00002a50| 22 0a 62 79 20 42 2e 20 | 53 74 72 6f 75 73 74 72 |".by B. |Stroustr|
|00002a60| 75 70 2e 0a 2e 53 48 20 | 43 41 56 45 41 54 53 0a |up...SH |CAVEATS.|
|00002a70| 54 68 65 20 70 73 65 75 | 64 6f 2d 45 6e 67 6c 69 |The pseu|do-Engli|
|00002a80| 73 68 20 73 79 6e 74 61 | 78 20 69 73 20 65 78 63 |sh synta|x is exc|
|00002a90| 65 73 73 69 76 65 6c 79 | 20 76 65 72 62 6f 73 65 |essively| verbose|
|00002aa0| 2e 0a 2e 50 50 0a 54 68 | 65 72 65 20 69 73 20 61 |...PP.Th|ere is a|
|00002ab0| 20 77 65 61 6c 74 68 20 | 6f 66 20 73 65 6d 61 6e | wealth |of seman|
|00002ac0| 74 69 63 20 63 68 65 63 | 6b 69 6e 67 20 74 68 61 |tic chec|king tha|
|00002ad0| 74 20 69 73 6e 27 74 20 | 62 65 69 6e 67 20 64 6f |t isn't |being do|
|00002ae0| 6e 65 2e 0a 2e 50 50 0a | 2e 49 20 43 64 65 63 6c |ne...PP.|.I Cdecl|
|00002af0| 27 73 0a 73 63 6f 70 65 | 20 69 73 20 69 6e 74 65 |'s.scope| is inte|
|00002b00| 6e 74 69 6f 6e 61 6c 6c | 79 20 73 6d 61 6c 6c 2e |ntionall|y small.|
|00002b10| 0a 49 74 20 64 6f 65 73 | 6e 27 74 20 68 65 6c 70 |.It does|n't help|
|00002b20| 20 79 6f 75 20 66 69 67 | 75 72 65 20 6f 75 74 20 | you fig|ure out |
|00002b30| 69 6e 69 74 69 61 6c 69 | 7a 61 74 69 6f 6e 73 2e |initiali|zations.|
|00002b40| 0a 49 74 20 65 78 70 65 | 63 74 73 20 73 74 6f 72 |.It expe|cts stor|
|00002b50| 61 67 65 20 63 6c 61 73 | 73 65 73 20 74 6f 20 62 |age clas|ses to b|
|00002b60| 65 20 61 74 20 74 68 65 | 20 62 65 67 69 6e 6e 69 |e at the| beginni|
|00002b70| 6e 67 20 6f 66 20 61 20 | 64 65 63 6c 61 72 61 74 |ng of a |declarat|
|00002b80| 69 6f 6e 2c 0a 66 6f 6c | 6c 6f 77 65 64 20 62 79 |ion,.fol|lowed by|
|00002b90| 20 74 68 65 20 74 68 65 | 20 63 6f 6e 73 74 2c 20 | the the| const, |
|00002ba0| 76 6f 6c 61 74 69 6c 65 | 20 61 6e 64 20 6e 6f 61 |volatile| and noa|
|00002bb0| 6c 69 61 73 20 6d 6f 64 | 69 66 69 65 72 73 2c 20 |lias mod|ifiers, |
|00002bc0| 66 6f 6c 6c 6f 77 65 64 | 20 62 79 20 74 68 65 0a |followed| by the.|
|00002bd0| 74 79 70 65 20 6f 66 20 | 74 68 65 20 76 61 72 69 |type of |the vari|
|00002be0| 61 62 6c 65 2e 0a 2e 49 | 20 43 64 65 63 6c 0a 64 |able...I| Cdecl.d|
|00002bf0| 6f 65 73 6e 27 74 20 6b | 6e 6f 77 20 61 6e 79 74 |oesn't k|now anyt|
|00002c00| 68 69 6e 67 20 61 62 6f | 75 74 20 76 61 72 69 61 |hing abo|ut varia|
|00002c10| 62 6c 65 20 6c 65 6e 67 | 74 68 20 61 72 67 75 6d |ble leng|th argum|
|00002c20| 65 6e 74 20 6c 69 73 74 | 73 2e 0a 28 54 68 69 73 |ent list|s..(This|
|00002c30| 20 69 6e 63 6c 75 64 65 | 73 20 74 68 65 20 60 60 | include|s the ``|
|00002c40| 5c 66 28 43 57 2c 2e 2e | 2e 5c 66 50 27 27 20 73 |\f(CW,..|.\fP'' s|
|00002c50| 79 6e 74 61 78 2e 29 0a | 2e 50 50 0a 2e 49 20 43 |yntax.).|.PP..I C|
|00002c60| 64 65 63 6c 0a 74 68 69 | 6e 6b 73 20 61 6c 6c 20 |decl.thi|nks all |
|00002c70| 74 68 65 20 64 65 63 6c | 61 72 61 74 69 6f 6e 73 |the decl|arations|
|00002c80| 20 79 6f 75 20 75 74 74 | 65 72 20 61 72 65 20 67 | you utt|er are g|
|00002c90| 6f 69 6e 67 20 74 6f 20 | 62 65 20 75 73 65 64 20 |oing to |be used |
|00002ca0| 61 73 20 65 78 74 65 72 | 6e 61 6c 0a 64 65 66 69 |as exter|nal.defi|
|00002cb0| 6e 69 74 69 6f 6e 73 2e | 0a 53 6f 6d 65 20 64 65 |nitions.|.Some de|
|00002cc0| 63 6c 61 72 61 74 69 6f | 6e 20 63 6f 6e 74 65 78 |claratio|n contex|
|00002cd0| 74 73 20 69 6e 20 43 20 | 61 6c 6c 6f 77 20 6d 6f |ts in C |allow mo|
|00002ce0| 72 65 20 66 6c 65 78 69 | 62 69 6c 69 74 79 20 74 |re flexi|bility t|
|00002cf0| 68 61 6e 20 74 68 69 73 | 2e 0a 41 6e 20 65 78 61 |han this|..An exa|
|00002d00| 6d 70 6c 65 20 6f 66 20 | 74 68 69 73 20 69 73 3a |mple of |this is:|
|00002d10| 0a 2e 45 78 0a 64 65 63 | 6c 61 72 65 20 61 72 67 |..Ex.dec|lare arg|
|00002d20| 76 20 61 73 20 61 72 72 | 61 79 20 6f 66 20 61 72 |v as arr|ay of ar|
|00002d30| 72 61 79 20 6f 66 20 63 | 68 61 72 0a 2e 45 65 0a |ray of c|har..Ee.|
|00002d40| 77 68 65 72 65 0a 2e 49 | 20 63 64 65 63 6c 0a 72 |where..I| cdecl.r|
|00002d50| 65 73 70 6f 6e 64 73 20 | 77 69 74 68 0a 2e 45 78 |esponds |with..Ex|
|00002d60| 0a 2e 6e 66 0a 57 61 72 | 6e 69 6e 67 3a 20 55 6e |..nf.War|ning: Un|
|00002d70| 73 75 70 70 6f 72 74 65 | 64 20 69 6e 20 43 20 2d |supporte|d in C -|
|00002d80| 2d 20 27 49 6e 6e 65 72 | 20 61 72 72 61 79 20 6f |- 'Inner| array o|
|00002d90| 66 20 75 6e 73 70 65 63 | 69 66 69 65 64 20 73 69 |f unspec|ified si|
|00002da0| 7a 65 27 0a 20 20 20 20 | 20 20 20 20 28 6d 61 79 |ze'. | (may|
|00002db0| 62 65 20 79 6f 75 20 6d | 65 61 6e 20 22 61 72 72 |be you m|ean "arr|
|00002dc0| 61 79 20 6f 66 20 70 6f | 69 6e 74 65 72 22 29 0a |ay of po|inter").|
|00002dd0| 63 68 61 72 20 61 72 67 | 76 5b 5d 5b 5d 0a 2e 66 |char arg|v[][]..f|
|00002de0| 69 0a 2e 45 65 0a 2e 50 | 50 0a 54 65 6e 74 61 74 |i..Ee..P|P.Tentat|
|00002df0| 69 76 65 20 73 75 70 70 | 6f 72 74 20 66 6f 72 20 |ive supp|ort for |
|00002e00| 74 68 65 0a 2e 49 20 6e | 6f 61 6c 69 61 73 0a 6b |the..I n|oalias.k|
|00002e10| 65 79 77 6f 72 64 20 68 | 61 73 20 62 65 65 6e 20 |eyword h|as been |
|00002e20| 70 75 74 20 69 6e 20 62 | 65 63 61 75 73 65 20 69 |put in b|ecause i|
|00002e30| 74 20 69 73 20 69 6e 20 | 74 68 65 20 63 75 72 72 |t is in |the curr|
|00002e40| 65 6e 74 20 41 4e 53 49 | 20 73 70 65 63 69 66 69 |ent ANSI| specifi|
|00002e50| 63 61 74 69 6f 6e 73 2e | 0a 74 61 6e 74 20 5c 28 |cations.|.tant \(|
|00002e60| 2d 3e 20 63 6f 6e 73 74 | 2c 0a 65 6e 75 6d 65 72 |-> const|,.enumer|
|00002e70| 61 74 69 6f 6e 20 5c 28 | 2d 3e 20 65 6e 75 6d 2c |ation \(|-> enum,|
|00002e80| 0a 66 75 6e 63 20 5c 28 | 2d 3e 20 66 75 6e 63 74 |.func \(|-> funct|
|00002e90| 69 6f 6e 2c 0a 69 6e 74 | 65 67 65 72 20 5c 28 2d |ion,.int|eger \(-|
|00002ea0| 3e 20 69 6e 74 2c 0a 70 | 74 72 20 5c 28 2d 3e 20 |> int,.p|tr \(-> |
|00002eb0| 70 6f 69 6e 74 65 72 2c | 0a 72 65 66 20 5c 28 2d |pointer,|.ref \(-|
|00002ec0| 3e 20 72 65 66 65 72 65 | 6e 63 65 2c 0a 72 65 74 |> refere|nce,.ret|
|00002ed0| 20 5c 28 2d 3e 20 72 65 | 74 75 72 6e 69 6e 67 2c | \(-> re|turning,|
|00002ee0| 0a 73 74 72 75 63 74 75 | 72 65 20 5c 28 2d 3e 20 |.structu|re \(-> |
|00002ef0| 73 74 72 75 63 74 2c 0a | 61 6e 64 0a 76 65 63 74 |struct,.|and.vect|
|00002f00| 6f 72 20 5c 28 2d 3e 20 | 61 72 72 61 79 2e 0a 2e |or \(-> |array...|
|00002f10| 50 50 0a 2e 6e 66 0a 2e | 66 74 20 43 57 0a 2e 74 |PP..nf..|ft CW..t|
|00002f20| 61 20 2e 35 69 20 31 2e | 35 69 0a 09 3c 70 72 6f |a .5i 1.|5i..<pro|
|00002f30| 67 72 61 6d 3e 09 3a 3a | 3d 20 4e 4f 54 48 49 4e |gram>.::|= NOTHIN|
|00002f40| 47 0a 09 09 7c 20 3c 70 | 72 6f 67 72 61 6d 3e 20 |G...| <p|rogram> |
|00002f50| 3c 73 74 6d 74 3e 20 4e | 4c 0a 09 3c 73 74 6d 74 |<stmt> N|L..<stmt|
|00002f60| 3e 09 3a 3a 3d 20 4e 4f | 54 48 49 4e 47 0a 09 09 |>.::= NO|THING...|
|00002f70| 7c 20 64 65 63 6c 61 72 | 65 20 4e 41 4d 45 20 61 || declar|e NAME a|
|00002f80| 73 20 3c 61 64 65 63 6c | 3e 0a 09 09 7c 20 64 65 |s <adecl|>...| de|
|00002f90| 63 6c 61 72 65 20 3c 61 | 64 65 63 6c 3e 0a 09 09 |clare <a|decl>...|
|00002fa0| 7c 20 63 61 73 74 20 4e | 41 4d 45 20 69 6e 74 6f || cast N|AME into|
|00002fb0| 20 3c 61 64 65 63 6c 3e | 0a 09 09 7c 20 63 61 73 | <adecl>|...| cas|
|00002fc0| 74 20 3c 61 64 65 63 6c | 3e 0a 09 09 7c 20 65 78 |t <adecl|>...| ex|
|00002fd0| 70 6c 61 69 6e 20 3c 6f | 70 74 73 74 6f 72 61 67 |plain <o|ptstorag|
|00002fe0| 65 3e 20 3c 70 74 72 6d | 6f 64 6c 69 73 74 3e 20 |e> <ptrm|odlist> |
|00002ff0| 3c 74 79 70 65 3e 20 3c | 63 64 65 63 6c 3e 0a 09 |<type> <|cdecl>..|
|00003000| 63 64 65 63 6c 2f 63 64 | 65 63 6c 2e 63 00 00 00 |cdecl/cd|ecl.c...|
|00003010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003040| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003050| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003060| 00 00 00 00 20 20 20 36 | 34 34 20 00 20 20 20 32 |.... 6|44 . 2|
|00003070| 34 33 20 00 20 20 20 20 | 31 32 20 00 20 20 20 20 |43 . |12 . |
|00003080| 20 20 36 31 37 32 33 20 | 20 34 34 30 33 36 30 31 | 61723 | 4403601|
|00003090| 34 30 33 20 20 20 36 34 | 31 34 00 20 00 00 00 00 |403 64|14. ....|
|000030a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000030b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000030c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000030d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000030e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000030f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003100| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003110| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003120| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003130| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003140| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003150| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003180| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003190| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000031a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000031b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000031c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000031d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000031e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000031f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003200| 2f 2a 0a 20 2a 20 63 64 | 65 63 6c 20 2d 20 41 4e |/*. * cd|ecl - AN|
|00003210| 53 49 20 43 20 61 6e 64 | 20 43 2b 2b 20 64 65 63 |SI C and| C++ dec|
|00003220| 6c 61 72 61 74 69 6f 6e | 20 63 6f 6d 70 6f 73 65 |laration| compose|
|00003230| 72 20 26 20 64 65 63 6f | 64 65 72 0a 20 2a 0a 20 |r & deco|der. *. |
|00003240| 2a 09 6f 72 69 67 69 6e | 61 6c 6c 79 20 77 72 69 |*.origin|ally wri|
|00003250| 74 74 65 6e 0a 20 2a 09 | 09 47 72 61 68 61 6d 20 |tten. *.|.Graham |
|00003260| 52 6f 73 73 0a 20 2a 09 | 09 6f 6e 63 65 20 61 74 |Ross. *.|.once at|
|00003270| 20 74 65 6b 74 72 6f 6e | 69 78 21 74 65 6b 6d 64 | tektron|ix!tekmd|
|00003280| 70 21 67 72 61 68 61 6d | 72 0a 20 2a 09 09 6e 6f |p!graham|r. *..no|
|00003290| 77 20 61 74 20 43 6f 6e | 74 65 78 74 2c 20 49 6e |w at Con|text, In|
|000032a0| 63 2e 0a 20 2a 0a 20 2a | 09 6d 6f 64 69 66 69 65 |c.. *. *|.modifie|
|000032b0| 64 20 74 6f 20 70 72 6f | 76 69 64 65 20 68 69 6e |d to pro|vide hin|
|000032c0| 74 73 20 66 6f 72 20 75 | 6e 73 75 70 70 6f 72 74 |ts for u|nsupport|
|000032d0| 65 64 20 74 79 70 65 73 | 0a 20 2a 09 61 64 64 65 |ed types|. *.adde|
|000032e0| 64 20 61 72 67 75 6d 65 | 6e 74 20 6c 69 73 74 73 |d argume|nt lists|
|000032f0| 20 66 6f 72 20 66 75 6e | 63 74 69 6f 6e 73 0a 20 | for fun|ctions. |
|00003300| 2a 09 61 64 64 65 64 20 | 27 65 78 70 6c 61 69 6e |*.added |'explain|
|00003310| 20 63 61 73 74 27 20 67 | 72 61 6d 6d 61 72 0a 20 | cast' g|rammar. |
|00003320| 2a 09 61 64 64 65 64 20 | 23 69 66 64 65 66 20 66 |*.added |#ifdef f|
|00003330| 6f 72 20 27 63 72 65 61 | 74 65 20 70 72 6f 67 72 |or 'crea|te progr|
|00003340| 61 6d 27 20 66 65 61 74 | 75 72 65 0a 20 2a 09 09 |am' feat|ure. *..|
|00003350| 3f 3f 3f 3f 20 28 73 6f | 72 72 79 2c 20 49 20 6c |???? (so|rry, I l|
|00003360| 6f 73 74 20 79 6f 75 72 | 20 6e 61 6d 65 20 61 6e |ost your| name an|
|00003370| 64 20 6c 6f 67 69 6e 29 | 0a 20 2a 0a 20 2a 09 63 |d login)|. *. *.c|
|00003380| 6f 6e 76 65 72 73 69 6f | 6e 20 74 6f 20 41 4e 53 |onversio|n to ANS|
|00003390| 49 20 43 0a 20 2a 09 09 | 44 61 76 69 64 20 57 6f |I C. *..|David Wo|
|000033a0| 6c 76 65 72 74 6f 6e 0a | 20 2a 09 09 69 68 6e 70 |lverton.| *..ihnp|
|000033b0| 34 21 68 6f 75 78 73 21 | 64 61 77 0a 20 2a 0a 20 |4!houxs!|daw. *. |
|000033c0| 2a 09 6d 65 72 67 65 64 | 20 44 2e 20 57 6f 6c 76 |*.merged| D. Wolv|
|000033d0| 65 72 74 6f 6e 27 73 20 | 41 4e 53 49 20 43 20 76 |erton's |ANSI C v|
|000033e0| 65 72 73 69 6f 6e 20 77 | 2f 20 3f 3f 3f 3f 27 73 |ersion w|/ ????'s|
|000033f0| 20 76 65 72 73 69 6f 6e | 0a 20 2a 09 61 64 64 65 | version|. *.adde|
|00003400| 64 20 66 75 6e 63 74 69 | 6f 6e 20 70 72 6f 74 6f |d functi|on proto|
|00003410| 74 79 70 65 73 0a 20 2a | 09 61 64 64 65 64 20 43 |types. *|.added C|
|00003420| 2b 2b 20 64 65 63 6c 61 | 72 61 74 69 6f 6e 73 0a |++ decla|rations.|
|00003430| 20 2a 09 6d 61 64 65 20 | 74 79 70 65 20 63 6f 6d | *.made |type com|
|00003440| 62 69 6e 61 74 69 6f 6e | 20 63 68 65 63 6b 69 6e |bination| checkin|
|00003450| 67 20 74 61 62 6c 65 20 | 64 72 69 76 65 6e 0a 20 |g table |driven. |
|00003460| 2a 09 61 64 64 65 64 20 | 63 68 65 63 6b 73 20 66 |*.added |checks f|
|00003470| 6f 72 20 76 6f 69 64 20 | 76 61 72 69 61 62 6c 65 |or void |variable|
|00003480| 20 63 6f 6d 62 69 6e 61 | 74 69 6f 6e 73 0a 20 2a | combina|tions. *|
|00003490| 09 6d 61 64 65 20 27 63 | 72 65 61 74 65 20 70 72 |.made 'c|reate pr|
|000034a0| 6f 67 72 61 6d 27 20 66 | 65 61 74 75 72 65 20 61 |ogram' f|eature a|
|000034b0| 20 72 75 6e 74 69 6d 65 | 20 6f 70 74 69 6f 6e 0a | runtime| option.|
|000034c0| 20 2a 09 61 64 64 65 64 | 20 66 69 6c 65 20 70 61 | *.added| file pa|
|000034d0| 72 73 69 6e 67 20 61 73 | 20 77 65 6c 6c 20 61 73 |rsing as| well as|
|000034e0| 20 6a 75 73 74 20 73 74 | 64 69 6e 0a 20 2a 09 61 | just st|din. *.a|
|000034f0| 64 64 65 64 20 68 65 6c | 70 20 6d 65 73 73 61 67 |dded hel|p messag|
|00003500| 65 20 61 74 20 62 65 67 | 69 6e 6e 69 6e 67 0a 20 |e at beg|inning. |
|00003510| 2a 09 61 64 64 65 64 20 | 70 72 6f 6d 70 74 73 20 |*.added |prompts |
|00003520| 77 68 65 6e 20 6f 6e 20 | 61 20 54 54 59 20 6f 72 |when on |a TTY or|
|00003530| 20 69 6e 20 69 6e 74 65 | 72 61 63 74 69 76 65 20 | in inte|ractive |
|00003540| 6d 6f 64 65 0a 20 2a 09 | 61 64 64 65 64 20 67 65 |mode. *.|added ge|
|00003550| 74 6f 70 74 28 29 20 75 | 73 61 67 65 0a 20 2a 09 |topt() u|sage. *.|
|00003560| 61 64 64 65 64 20 2d 61 | 2c 20 2d 72 2c 20 2d 70 |added -a|, -r, -p|
|00003570| 2c 20 2d 63 2c 20 2d 64 | 2c 20 2d 44 2c 20 2d 56 |, -c, -d|, -D, -V|
|00003580| 2c 20 2d 69 20 61 6e 64 | 20 2d 2b 20 6f 70 74 69 |, -i and| -+ opti|
|00003590| 6f 6e 73 0a 20 2a 09 64 | 65 6c 69 6e 74 65 64 0a |ons. *.d|elinted.|
|000035a0| 20 2a 09 61 64 64 65 64 | 20 23 64 65 66 69 6e 65 | *.added| #define|
|000035b0| 73 20 66 6f 72 20 74 68 | 6f 73 65 20 77 69 74 68 |s for th|ose with|
|000035c0| 6f 75 74 20 67 65 74 6f | 70 74 20 6f 72 20 76 6f |out geto|pt or vo|
|000035d0| 69 64 0a 20 2a 09 61 64 | 64 65 64 20 27 73 65 74 |id. *.ad|ded 'set|
|000035e0| 20 6f 70 74 69 6f 6e 73 | 27 20 63 6f 6d 6d 61 6e | options|' comman|
|000035f0| 64 0a 20 2a 09 61 64 64 | 65 64 20 27 71 75 69 74 |d. *.add|ed 'quit|
|00003600| 2f 65 78 69 74 27 20 63 | 6f 6d 6d 61 6e 64 0a 20 |/exit' c|ommand. |
|00003610| 2a 09 61 64 64 65 64 20 | 73 79 6e 6f 6e 79 6d 73 |*.added |synonyms|
|00003620| 0a 20 2a 09 09 54 6f 6e | 79 20 48 61 6e 73 65 6e |. *..Ton|y Hansen|
|00003630| 0a 20 2a 09 09 61 74 74 | 6d 61 69 6c 21 74 6f 6e |. *..att|mail!ton|
|00003640| 79 2c 20 69 68 6e 70 34 | 21 70 65 67 61 73 75 73 |y, ihnp4|!pegasus|
|00003650| 21 68 61 6e 73 65 6e 0a | 20 2a 0a 20 2a 09 61 64 |!hansen.| *. *.ad|
|00003660| 64 65 64 20 65 78 74 65 | 72 6e 2c 20 72 65 67 69 |ded exte|rn, regi|
|00003670| 73 74 65 72 2c 20 73 74 | 61 74 69 63 0a 20 2a 09 |ster, st|atic. *.|
|00003680| 61 64 64 65 64 20 6c 69 | 6e 6b 73 20 74 6f 20 65 |added li|nks to e|
|00003690| 78 70 6c 61 69 6e 2c 20 | 63 61 73 74 2c 20 64 65 |xplain, |cast, de|
|000036a0| 63 6c 61 72 65 0a 20 2a | 09 73 65 70 61 72 61 74 |clare. *|.separat|
|000036b0| 65 6c 79 20 64 65 76 65 | 6c 6f 70 65 64 20 41 4e |ely deve|loped AN|
|000036c0| 53 49 20 43 20 73 75 70 | 70 6f 72 74 0a 20 2a 09 |SI C sup|port. *.|
|000036d0| 09 4d 65 72 6c 79 6e 20 | 4c 65 52 6f 79 0a 20 2a |.Merlyn |LeRoy. *|
|000036e0| 09 09 6d 65 72 6c 79 6e | 40 72 6f 73 65 33 2e 72 |..merlyn|@rose3.r|
|000036f0| 6f 73 65 6d 6f 75 6e 74 | 2e 63 6f 6d 0a 20 2a 0a |osemount|.com. *.|
|00003700| 20 2a 09 6d 65 72 67 65 | 64 20 76 65 72 73 69 6f | *.merge|d versio|
|00003710| 6e 73 20 66 72 6f 6d 20 | 4c 65 52 6f 79 0a 20 2a |ns from |LeRoy. *|
|00003720| 09 61 64 64 65 64 20 74 | 6d 70 66 69 6c 65 28 29 |.added t|mpfile()|
|00003730| 20 73 75 70 70 6f 72 74 | 0a 20 2a 09 61 6c 6c 6f | support|. *.allo|
|00003740| 77 20 6d 6f 72 65 20 70 | 61 72 74 73 20 74 6f 20 |w more p|arts to |
|00003750| 62 65 20 6d 69 73 73 69 | 6e 67 20 64 75 72 69 6e |be missi|ng durin|
|00003760| 67 20 65 78 70 6c 61 6e | 61 74 69 6f 6e 73 0a 20 |g explan|ations. |
|00003770| 2a 09 09 54 6f 6e 79 20 | 48 61 6e 73 65 6e 0a 20 |*..Tony |Hansen. |
|00003780| 2a 09 09 61 74 74 6d 61 | 69 6c 21 74 6f 6e 79 2c |*..attma|il!tony,|
|00003790| 20 69 68 6e 70 34 21 70 | 65 67 61 73 75 73 21 68 | ihnp4!p|egasus!h|
|000037a0| 61 6e 73 65 6e 0a 20 2a | 2f 0a 0a 63 68 61 72 20 |ansen. *|/..char |
|000037b0| 63 64 65 63 6c 73 63 63 | 73 69 64 5b 5d 20 3d 20 |cdeclscc|sid[] = |
|000037c0| 22 40 28 23 29 63 64 65 | 63 6c 2e 63 09 32 2e 34 |"@(#)cde|cl.c.2.4|
|000037d0| 20 33 2f 33 31 2f 38 38 | 22 3b 0a 0c 0a 23 69 6e | 3/31/88|";...#in|
|000037e0| 63 6c 75 64 65 20 3c 73 | 74 64 69 6f 2e 68 3e 0a |clude <s|tdio.h>.|
|000037f0| 23 69 6e 63 6c 75 64 65 | 20 3c 63 74 79 70 65 2e |#include| <ctype.|
|00003800| 68 3e 0a 23 69 66 20 5f | 5f 53 54 44 43 5f 5f 20 |h>.#if _|_STDC__ |
|00003810| 7c 7c 20 64 65 66 69 6e | 65 64 28 44 4f 53 29 0a ||| defin|ed(DOS).|
|00003820| 23 20 69 6e 63 6c 75 64 | 65 20 3c 73 74 64 6c 69 |# includ|e <stdli|
|00003830| 62 2e 68 3e 0a 23 20 69 | 6e 63 6c 75 64 65 20 3c |b.h>.# i|nclude <|
|00003840| 73 74 64 64 65 66 2e 68 | 3e 0a 23 20 69 6e 63 6c |stddef.h|>.# incl|
|00003850| 75 64 65 20 3c 73 74 72 | 69 6e 67 2e 68 3e 0a 23 |ude <str|ing.h>.#|
|00003860| 20 69 6e 63 6c 75 64 65 | 20 3c 73 74 64 61 72 67 | include| <stdarg|
|00003870| 2e 68 3e 0a 23 65 6c 73 | 65 0a 23 20 69 66 6e 64 |.h>.#els|e.# ifnd|
|00003880| 65 66 20 4e 4f 56 41 52 | 41 52 47 53 0a 23 20 20 |ef NOVAR|ARGS.# |
|00003890| 69 6e 63 6c 75 64 65 20 | 3c 76 61 72 61 72 67 73 |include |<varargs|
|000038a0| 2e 68 3e 0a 23 20 65 6e | 64 69 66 20 2f 2a 20 6e |.h>.# en|dif /* n|
|000038b0| 64 65 66 20 4e 4f 56 41 | 52 41 52 47 53 20 2a 2f |def NOVA|RARGS */|
|000038c0| 0a 63 68 61 72 20 2a 6d | 61 6c 6c 6f 63 28 29 3b |.char *m|alloc();|
|000038d0| 0a 76 6f 69 64 20 66 72 | 65 65 28 29 2c 20 65 78 |.void fr|ee(), ex|
|000038e0| 69 74 28 29 2c 20 70 65 | 72 72 6f 72 28 29 3b 0a |it(), pe|rror();.|
|000038f0| 23 20 69 66 64 65 66 20 | 42 53 44 0a 23 20 20 69 |# ifdef |BSD.# i|
|00003900| 6e 63 6c 75 64 65 20 3c | 73 74 72 69 6e 67 73 2e |nclude <|strings.|
|00003910| 68 3e 0a 20 20 20 65 78 | 74 65 72 6e 20 69 6e 74 |h>. ex|tern int|
|00003920| 20 65 72 72 6e 6f 3b 0a | 23 20 20 64 65 66 69 6e | errno;.|# defin|
|00003930| 65 20 73 74 72 72 63 68 | 72 20 72 69 6e 64 65 78 |e strrch|r rindex|
|00003940| 0a 23 20 20 64 65 66 69 | 6e 65 20 4e 4f 54 4d 50 |.# defi|ne NOTMP|
|00003950| 46 49 4c 45 0a 23 20 65 | 6c 73 65 0a 23 20 20 69 |FILE.# e|lse.# i|
|00003960| 6e 63 6c 75 64 65 20 3c | 73 74 72 69 6e 67 2e 68 |nclude <|string.h|
|00003970| 3e 0a 23 20 20 69 6e 63 | 6c 75 64 65 20 3c 65 72 |>.# inc|lude <er|
|00003980| 72 6e 6f 2e 68 3e 0a 23 | 20 65 6e 64 69 66 20 2f |rno.h>.#| endif /|
|00003990| 2a 20 42 53 44 20 2a 2f | 0a 23 20 69 66 64 65 66 |* BSD */|.# ifdef|
|000039a0| 20 4e 4f 56 4f 49 44 0a | 23 20 20 64 65 66 69 6e | NOVOID.|# defin|
|000039b0| 65 20 76 6f 69 64 20 69 | 6e 74 0a 23 20 65 6e 64 |e void i|nt.# end|
|000039c0| 69 66 20 2f 2a 20 4e 4f | 56 4f 49 44 20 2a 2f 0a |if /* NO|VOID */.|
|000039d0| 23 65 6e 64 69 66 20 2f | 2a 20 5f 5f 53 54 44 43 |#endif /|* __STDC|
|000039e0| 5f 5f 20 7c 7c 20 44 4f | 53 20 2a 2f 0a 0a 23 64 |__ || DO|S */..#d|
|000039f0| 65 66 69 6e 65 09 4d 42 | 5f 53 48 4f 52 54 09 30 |efine.MB|_SHORT.0|
|00003a00| 30 30 31 0a 23 64 65 66 | 69 6e 65 09 4d 42 5f 4c |001.#def|ine.MB_L|
|00003a10| 4f 4e 47 09 09 30 30 30 | 32 0a 23 64 65 66 69 6e |ONG..000|2.#defin|
|00003a20| 65 09 4d 42 5f 55 4e 53 | 49 47 4e 45 44 09 30 30 |e.MB_UNS|IGNED.00|
|00003a30| 30 34 0a 23 64 65 66 69 | 6e 65 20 4d 42 5f 49 4e |04.#defi|ne MB_IN|
|00003a40| 54 09 09 30 30 31 30 0a | 23 64 65 66 69 6e 65 20 |T..0010.|#define |
|00003a50| 4d 42 5f 43 48 41 52 09 | 09 30 30 32 30 0a 23 64 |MB_CHAR.|.0020.#d|
|00003a60| 65 66 69 6e 65 20 4d 42 | 5f 46 4c 4f 41 54 09 30 |efine MB|_FLOAT.0|
|00003a70| 30 34 30 0a 23 64 65 66 | 69 6e 65 20 4d 42 5f 44 |040.#def|ine MB_D|
|00003a80| 4f 55 42 4c 45 09 30 31 | 30 30 0a 23 64 65 66 69 |OUBLE.01|00.#defi|
|00003a90| 6e 65 20 4d 42 5f 56 4f | 49 44 09 09 30 32 30 30 |ne MB_VO|ID..0200|
|00003aa0| 0a 23 64 65 66 69 6e 65 | 09 4d 42 5f 53 49 47 4e |.#define|.MB_SIGN|
|00003ab0| 45 44 09 30 34 30 30 0a | 0a 23 64 65 66 69 6e 65 |ED.0400.|.#define|
|00003ac0| 20 4e 75 6c 6c 43 50 20 | 28 28 63 68 61 72 2a 29 | NullCP |((char*)|
|00003ad0| 4e 55 4c 4c 29 0a 23 69 | 66 64 65 66 20 64 6f 64 |NULL).#i|fdef dod|
|00003ae0| 65 62 75 67 0a 23 20 64 | 65 66 69 6e 65 20 44 65 |ebug.# d|efine De|
|00003af0| 62 75 67 28 78 29 20 64 | 6f 20 7b 20 69 66 20 28 |bug(x) d|o { if (|
|00003b00| 44 65 62 75 67 46 6c 61 | 67 29 20 28 76 6f 69 64 |DebugFla|g) (void|
|00003b10| 29 20 66 70 72 69 6e 74 | 66 20 78 3b 20 7d 20 77 |) fprint|f x; } w|
|00003b20| 68 69 6c 65 20 28 30 29 | 0a 23 65 6c 73 65 0a 23 |hile (0)|.#else.#|
|00003b30| 20 64 65 66 69 6e 65 20 | 44 65 62 75 67 28 78 29 | define |Debug(x)|
|00003b40| 20 2f 2a 20 6e 6f 74 68 | 69 6e 67 20 2a 2f 0a 23 | /* noth|ing */.#|
|00003b50| 65 6e 64 69 66 0a 0a 23 | 69 66 20 5f 5f 53 54 44 |endif..#|if __STD|
|00003b60| 43 5f 5f 0a 20 20 63 68 | 61 72 20 2a 64 73 28 63 |C__. ch|ar *ds(c|
|00003b70| 68 61 72 20 2a 29 2c 20 | 2a 63 61 74 28 63 68 61 |har *), |*cat(cha|
|00003b80| 72 20 2a 2c 20 2e 2e 2e | 29 2c 20 2a 76 69 73 69 |r *, ...|), *visi|
|00003b90| 62 6c 65 28 69 6e 74 29 | 3b 0a 20 20 69 6e 74 20 |ble(int)|;. int |
|00003ba0| 67 65 74 6f 70 74 28 69 | 6e 74 2c 63 68 61 72 20 |getopt(i|nt,char |
|00003bb0| 2a 2a 2c 63 68 61 72 20 | 2a 29 3b 0a 20 20 69 6e |**,char |*);. in|
|00003bc0| 74 20 6d 61 69 6e 28 69 | 6e 74 2c 20 63 68 61 72 |t main(i|nt, char|
|00003bd0| 20 2a 2a 29 3b 0a 20 20 | 69 6e 74 20 79 79 77 72 | **);. |int yywr|
|00003be0| 61 70 28 76 6f 69 64 29 | 3b 0a 20 20 69 6e 74 20 |ap(void)|;. int |
|00003bf0| 64 6f 73 74 64 69 6e 28 | 76 6f 69 64 29 3b 0a 20 |dostdin(|void);. |
|00003c00| 20 76 6f 69 64 20 6d 62 | 63 68 65 63 6b 28 76 6f | void mb|check(vo|
|00003c10| 69 64 29 2c 20 64 6f 68 | 65 6c 70 28 76 6f 69 64 |id), doh|elp(void|
|00003c20| 29 2c 20 75 73 61 67 65 | 28 76 6f 69 64 29 3b 0a |), usage|(void);.|
|00003c30| 20 20 76 6f 69 64 20 70 | 72 6f 6d 70 74 28 76 6f | void p|rompt(vo|
|00003c40| 69 64 29 2c 20 64 6f 70 | 72 6f 6d 70 74 28 76 6f |id), dop|rompt(vo|
|00003c50| 69 64 29 2c 20 6e 6f 70 | 72 6f 6d 70 74 28 76 6f |id), nop|rompt(vo|
|00003c60| 69 64 29 3b 0a 20 20 76 | 6f 69 64 20 75 6e 73 75 |id);. v|oid unsu|
|00003c70| 70 70 28 63 68 61 72 20 | 2a 2c 20 63 68 61 72 20 |pp(char |*, char |
|00003c80| 2a 29 3b 0a 20 20 76 6f | 69 64 20 6e 6f 74 73 75 |*);. vo|id notsu|
|00003c90| 70 70 6f 72 74 65 64 28 | 63 68 61 72 20 2a 2c 20 |pported(|char *, |
|00003ca0| 63 68 61 72 20 2a 2c 20 | 63 68 61 72 20 2a 29 3b |char *, |char *);|
|00003cb0| 0a 20 20 76 6f 69 64 20 | 79 79 65 72 72 6f 72 28 |. void |yyerror(|
|00003cc0| 63 68 61 72 20 2a 29 3b | 0a 20 20 76 6f 69 64 20 |char *);|. void |
|00003cd0| 64 6f 73 65 74 28 63 68 | 61 72 20 2a 29 3b 0a 20 |doset(ch|ar *);. |
|00003ce0| 20 76 6f 69 64 20 64 6f | 64 65 63 6c 61 72 65 28 | void do|declare(|
|00003cf0| 63 68 61 72 2a 2c 20 63 | 68 61 72 2a 2c 20 63 68 |char*, c|har*, ch|
|00003d00| 61 72 2a 2c 20 63 68 61 | 72 2a 2c 20 63 68 61 72 |ar*, cha|r*, char|
|00003d10| 2a 29 3b 0a 20 20 76 6f | 69 64 20 64 6f 63 61 73 |*);. vo|id docas|
|00003d20| 74 28 63 68 61 72 2a 2c | 20 63 68 61 72 2a 2c 20 |t(char*,| char*, |
|00003d30| 63 68 61 72 2a 2c 20 63 | 68 61 72 2a 29 3b 0a 20 |char*, c|har*);. |
|00003d40| 20 76 6f 69 64 20 64 6f | 64 65 78 70 6c 61 69 6e | void do|dexplain|
|00003d50| 28 63 68 61 72 2a 2c 20 | 63 68 61 72 2a 2c 20 63 |(char*, |char*, c|
|00003d60| 68 61 72 2a 2c 20 63 68 | 61 72 2a 29 3b 0a 20 20 |har*, ch|ar*);. |
|00003d70| 76 6f 69 64 20 64 6f 63 | 65 78 70 6c 61 69 6e 28 |void doc|explain(|
|00003d80| 63 68 61 72 2a 2c 20 63 | 68 61 72 2a 2c 20 63 68 |char*, c|har*, ch|
|00003d90| 61 72 2a 2c 20 63 68 61 | 72 2a 29 3b 0a 20 20 76 |ar*, cha|r*);. v|
|00003da0| 6f 69 64 20 73 65 74 70 | 72 6f 67 6e 61 6d 65 28 |oid setp|rogname(|
|00003db0| 63 68 61 72 20 2a 29 3b | 0a 20 20 69 6e 74 20 64 |char *);|. int d|
|00003dc0| 6f 74 6d 70 66 69 6c 65 | 28 69 6e 74 2c 20 63 68 |otmpfile|(int, ch|
|00003dd0| 61 72 2a 2a 29 2c 20 64 | 6f 66 69 6c 65 61 72 67 |ar**), d|ofilearg|
|00003de0| 73 28 69 6e 74 2c 20 63 | 68 61 72 2a 2a 29 3b 0a |s(int, c|har**);.|
|00003df0| 23 65 6c 73 65 0a 20 20 | 63 68 61 72 20 2a 64 73 |#else. |char *ds|
|00003e00| 28 29 2c 20 2a 63 61 74 | 28 29 2c 20 2a 76 69 73 |(), *cat|(), *vis|
|00003e10| 69 62 6c 65 28 29 3b 0a | 20 20 69 6e 74 20 67 65 |ible();.| int ge|
|00003e20| 74 6f 70 74 28 29 3b 0a | 20 20 76 6f 69 64 20 6d |topt();.| void m|
|00003e30| 62 63 68 65 63 6b 28 29 | 2c 20 64 6f 68 65 6c 70 |bcheck()|, dohelp|
|00003e40| 28 29 2c 20 75 73 61 67 | 65 28 29 3b 0a 20 20 76 |(), usag|e();. v|
|00003e50| 6f 69 64 20 70 72 6f 6d | 70 74 28 29 2c 20 64 6f |oid prom|pt(), do|
|00003e60| 70 72 6f 6d 70 74 28 29 | 2c 20 6e 6f 70 72 6f 6d |prompt()|, noprom|
|00003e70| 70 74 28 29 3b 0a 20 20 | 76 6f 69 64 20 75 6e 73 |pt();. |void uns|
|00003e80| 75 70 70 28 29 2c 20 6e | 6f 74 73 75 70 70 6f 72 |upp(), n|otsuppor|
|00003e90| 74 65 64 28 29 3b 0a 20 | 20 76 6f 69 64 20 79 79 |ted();. | void yy|
|00003ea0| 65 72 72 6f 72 28 29 3b | 0a 20 20 76 6f 69 64 20 |error();|. void |
|00003eb0| 64 6f 73 65 74 28 29 2c | 20 64 6f 64 65 63 6c 61 |doset(),| dodecla|
|00003ec0| 72 65 28 29 2c 20 64 6f | 63 61 73 74 28 29 2c 20 |re(), do|cast(), |
|00003ed0| 64 6f 64 65 78 70 6c 61 | 69 6e 28 29 2c 20 64 6f |dodexpla|in(), do|
|00003ee0| 63 65 78 70 6c 61 69 6e | 28 29 3b 0a 20 20 76 6f |cexplain|();. vo|
|00003ef0| 69 64 20 73 65 74 70 72 | 6f 67 6e 61 6d 65 28 29 |id setpr|ogname()|
|00003f00| 3b 0a 20 20 69 6e 74 20 | 64 6f 74 6d 70 66 69 6c |;. int |dotmpfil|
|00003f10| 65 28 29 2c 20 64 6f 66 | 69 6c 65 61 72 67 73 28 |e(), dof|ileargs(|
|00003f20| 29 3b 0a 23 65 6e 64 69 | 66 20 2f 2a 20 5f 5f 53 |);.#endi|f /* __S|
|00003f30| 54 44 43 5f 5f 20 2a 2f | 0a 20 20 46 49 4c 45 20 |TDC__ */|. FILE |
|00003f40| 2a 74 6d 70 66 69 6c 65 | 28 29 3b 0a 0a 2f 2a 20 |*tmpfile|();../* |
|00003f50| 76 61 72 69 61 62 6c 65 | 73 20 75 73 65 64 20 64 |variable|s used d|
|00003f60| 75 72 69 6e 67 20 70 61 | 72 73 69 6e 67 20 2a 2f |uring pa|rsing */|
|00003f70| 0a 75 6e 73 69 67 6e 65 | 64 20 6d 6f 64 62 69 74 |.unsigne|d modbit|
|00003f80| 73 20 3d 20 30 3b 0a 69 | 6e 74 20 61 72 62 64 69 |s = 0;.i|nt arbdi|
|00003f90| 6d 73 20 3d 20 31 3b 0a | 63 68 61 72 20 2a 73 61 |ms = 1;.|char *sa|
|00003fa0| 76 65 64 6e 61 6d 65 20 | 3d 20 30 3b 0a 63 68 61 |vedname |= 0;.cha|
|00003fb0| 72 20 75 6e 6b 6e 6f 77 | 6e 5f 6e 61 6d 65 5b 5d |r unknow|n_name[]|
|00003fc0| 20 3d 20 22 75 6e 6b 6e | 6f 77 6e 5f 6e 61 6d 65 | = "unkn|own_name|
|00003fd0| 22 3b 0a 63 68 61 72 20 | 70 72 65 76 20 3d 20 30 |";.char |prev = 0|
|00003fe0| 3b 09 09 2f 2a 20 74 68 | 65 20 63 75 72 72 65 6e |;../* th|e curren|
|00003ff0| 74 20 74 79 70 65 20 6f | 66 20 74 68 65 20 76 61 |t type o|f the va|
|00004000| 72 69 61 62 6c 65 20 62 | 65 69 6e 67 20 65 78 61 |riable b|eing exa|
|00004010| 6d 69 6e 65 64 20 2a 2f | 0a 09 09 09 2f 2a 20 20 |mined */|..../* |
|00004020| 20 20 76 61 6c 75 65 73 | 09 74 79 70 65 09 09 09 | values|.type...|
|00004030| 09 20 20 20 2a 2f 0a 09 | 09 09 2f 2a 09 70 09 70 |. */..|../*.p.p|
|00004040| 6f 69 6e 74 65 72 09 09 | 09 09 20 20 20 2a 2f 0a |ointer..|.. */.|
|00004050| 09 09 09 2f 2a 09 72 09 | 72 65 66 65 72 65 6e 63 |.../*.r.|referenc|
|00004060| 65 09 09 09 20 20 20 2a | 2f 0a 09 09 09 2f 2a 09 |e... *|/..../*.|
|00004070| 66 09 66 75 6e 63 74 69 | 6f 6e 09 09 09 20 20 20 |f.functi|on... |
|00004080| 2a 2f 0a 09 09 09 2f 2a | 09 61 09 61 72 72 61 79 |*/..../*|.a.array|
|00004090| 20 28 6f 66 20 61 72 62 | 69 74 72 61 72 79 20 64 | (of arb|itrary d|
|000040a0| 69 6d 65 6e 73 69 6f 6e | 73 29 20 20 20 20 2a 2f |imension|s) */|
|000040b0| 0a 09 09 09 2f 2a 09 41 | 09 61 72 72 61 79 20 77 |..../*.A|.array w|
|000040c0| 69 74 68 20 64 69 6d 65 | 6e 73 69 6f 6e 73 09 09 |ith dime|nsions..|
|000040d0| 20 20 20 2a 2f 0a 09 09 | 09 2f 2a 09 6e 09 6e 61 | */...|./*.n.na|
|000040e0| 6d 65 09 09 09 09 20 20 | 20 2a 2f 0a 09 09 09 2f |me.... | */..../|
|000040f0| 2a 09 76 09 76 6f 69 64 | 09 09 09 09 20 20 20 2a |*.v.void|.... *|
|00004100| 2f 0a 09 09 09 2f 2a 09 | 73 09 73 74 72 75 63 74 |/..../*.|s.struct|
|00004110| 20 7c 20 63 6c 61 73 73 | 09 09 09 20 20 20 2a 2f | | class|... */|
|00004120| 0a 09 09 09 2f 2a 09 74 | 09 73 69 6d 70 6c 65 20 |..../*.t|.simple |
|00004130| 74 79 70 65 20 28 69 6e | 74 2c 20 6c 6f 6e 67 2c |type (in|t, long,|
|00004140| 20 65 74 63 2e 29 09 20 | 20 20 2a 2f 0a 0a 2f 2a | etc.). | */../*|
|00004150| 20 6f 70 74 69 6f 6e 73 | 20 2a 2f 0a 69 6e 74 20 | options| */.int |
|00004160| 52 69 74 63 68 69 65 46 | 6c 61 67 20 3d 20 30 3b |RitchieF|lag = 0;|
|00004170| 09 09 2f 2a 20 2d 72 2c | 20 61 73 73 75 6d 65 20 |../* -r,| assume |
|00004180| 52 69 74 63 68 69 65 20 | 50 44 50 20 43 20 6c 61 |Ritchie |PDP C la|
|00004190| 6e 67 75 61 67 65 20 2a | 2f 0a 69 6e 74 20 4d 6b |nguage *|/.int Mk|
|000041a0| 50 72 6f 67 72 61 6d 46 | 6c 61 67 20 3d 20 30 3b |ProgramF|lag = 0;|
|000041b0| 09 09 2f 2a 20 2d 63 2c | 20 6f 75 74 70 75 74 20 |../* -c,| output |
|000041c0| 7b 7d 20 61 6e 64 20 3b | 20 61 66 74 65 72 20 64 |{} and ;| after d|
|000041d0| 65 63 6c 61 72 61 74 69 | 6f 6e 73 20 2a 2f 0a 69 |eclarati|ons */.i|
|000041e0| 6e 74 20 50 72 65 41 4e | 53 49 46 6c 61 67 20 3d |nt PreAN|SIFlag =|
|000041f0| 20 30 3b 09 09 2f 2a 20 | 2d 70 2c 20 61 73 73 75 | 0;../* |-p, assu|
|00004200| 6d 65 20 70 72 65 2d 41 | 4e 53 49 20 43 20 6c 61 |me pre-A|NSI C la|
|00004210| 6e 67 75 61 67 65 20 2a | 2f 0a 69 6e 74 20 43 70 |nguage *|/.int Cp|
|00004220| 6c 75 73 70 6c 75 73 46 | 6c 61 67 20 3d 20 30 3b |lusplusF|lag = 0;|
|00004230| 09 09 2f 2a 20 2d 2b 2c | 20 61 73 73 75 6d 65 20 |../* -+,| assume |
|00004240| 43 2b 2b 20 6c 61 6e 67 | 75 61 67 65 20 2a 2f 0a |C++ lang|uage */.|
|00004250| 69 6e 74 20 4f 6e 41 54 | 74 79 20 3d 20 30 3b 09 |int OnAT|ty = 0;.|
|00004260| 09 09 2f 2a 20 73 74 64 | 69 6e 20 69 73 20 63 6f |../* std|in is co|
|00004270| 6d 69 6e 67 20 66 72 6f | 6d 20 61 20 74 65 72 6d |ming fro|m a term|
|00004280| 69 6e 61 6c 20 2a 2f 0a | 69 6e 74 20 49 6e 74 65 |inal */.|int Inte|
|00004290| 72 61 63 74 69 76 65 20 | 3d 20 30 3b 09 09 2f 2a |ractive |= 0;../*|
|000042a0| 20 2d 69 2c 20 6f 76 65 | 72 72 69 64 65 73 20 4f | -i, ove|rrides O|
|000042b0| 6e 41 54 74 79 20 2a 2f | 0a 69 6e 74 20 4b 65 79 |nATty */|.int Key|
|000042c0| 77 6f 72 64 4e 61 6d 65 | 20 3d 20 30 3b 09 09 2f |wordName| = 0;../|
|000042d0| 2a 20 24 30 20 69 73 20 | 61 20 6b 65 79 77 6f 72 |* $0 is |a keywor|
|000042e0| 64 20 28 64 65 63 6c 61 | 72 65 2c 20 65 78 70 6c |d (decla|re, expl|
|000042f0| 61 69 6e 2c 20 63 61 73 | 74 29 20 2a 2f 0a 63 68 |ain, cas|t) */.ch|
|00004300| 61 72 20 2a 70 72 6f 67 | 6e 61 6d 65 20 3d 20 22 |ar *prog|name = "|
|00004310| 63 64 65 63 6c 22 3b 09 | 2f 2a 20 24 30 20 2a 2f |cdecl";.|/* $0 */|
|00004320| 0a 0a 23 69 66 20 64 6f | 64 65 62 75 67 0a 69 6e |..#if do|debug.in|
|00004330| 74 20 44 65 62 75 67 46 | 6c 61 67 20 3d 20 30 3b |t DebugF|lag = 0;|
|00004340| 09 09 2f 2a 20 2d 64 2c | 20 6f 75 74 70 75 74 20 |../* -d,| output |
|00004350| 64 65 62 75 67 67 69 6e | 67 20 74 72 61 63 65 20 |debuggin|g trace |
|00004360| 69 6e 66 6f 20 2a 2f 0a | 23 65 6e 64 69 66 0a 0a |info */.|#endif..|
|00004370| 23 69 66 64 65 66 20 64 | 6f 79 79 64 65 62 75 67 |#ifdef d|oyydebug|
|00004380| 09 09 2f 2a 20 63 6f 6d | 70 69 6c 65 20 69 6e 20 |../* com|pile in |
|00004390| 79 61 63 63 20 74 72 61 | 63 65 20 73 74 61 74 65 |yacc tra|ce state|
|000043a0| 6d 65 6e 74 73 20 2a 2f | 0a 23 64 65 66 69 6e 65 |ments */|.#define|
|000043b0| 20 59 59 44 45 42 55 47 | 20 31 0a 23 65 6e 64 69 | YYDEBUG| 1.#endi|
|000043c0| 66 20 2f 2a 20 64 6f 79 | 79 64 65 62 75 67 20 2a |f /* doy|ydebug *|
|000043d0| 2f 0a 0a 23 69 6e 63 6c | 75 64 65 20 22 63 64 67 |/..#incl|ude "cdg|
|000043e0| 72 61 6d 2e 63 22 0a 23 | 69 6e 63 6c 75 64 65 20 |ram.c".#|include |
|000043f0| 22 63 64 6c 65 78 2e 63 | 22 0a 0c 0a 2f 2a 20 64 |"cdlex.c|".../* d|
|00004400| 65 66 69 6e 69 74 69 6f | 6e 73 20 28 61 6e 64 20 |efinitio|ns (and |
|00004410| 61 62 62 72 65 76 69 61 | 74 69 6f 6e 73 29 20 66 |abbrevia|tions) f|
|00004420| 6f 72 20 74 79 70 65 20 | 63 6f 6d 62 69 6e 61 74 |or type |combinat|
|00004430| 69 6f 6e 73 20 63 72 6f | 73 73 20 63 68 65 63 6b |ions cro|ss check|
|00004440| 20 74 61 62 6c 65 20 2a | 2f 0a 23 64 65 66 69 6e | table *|/.#defin|
|00004450| 65 20 41 4c 57 41 59 53 | 09 30 09 2f 2a 20 63 6f |e ALWAYS|.0./* co|
|00004460| 6d 62 6f 20 61 6c 77 61 | 79 73 20 6f 6b 61 79 20 |mbo alwa|ys okay |
|00004470| 2a 2f 0a 23 64 65 66 69 | 6e 65 20 5f 09 41 4c 57 |*/.#defi|ne _.ALW|
|00004480| 41 59 53 0a 23 64 65 66 | 69 6e 65 20 4e 45 56 45 |AYS.#def|ine NEVE|
|00004490| 52 09 31 09 2f 2a 20 63 | 6f 6d 62 6f 20 6e 65 76 |R.1./* c|ombo nev|
|000044a0| 65 72 20 61 6c 6c 6f 77 | 65 64 20 2a 2f 0a 23 64 |er allow|ed */.#d|
|000044b0| 65 66 69 6e 65 20 58 09 | 4e 45 56 45 52 0a 23 64 |efine X.|NEVER.#d|
|000044c0| 65 66 69 6e 65 20 52 49 | 54 43 48 49 45 09 32 09 |efine RI|TCHIE.2.|
|000044d0| 2f 2a 20 63 6f 6d 62 6f | 20 6e 6f 74 20 61 6c 6c |/* combo| not all|
|000044e0| 6f 77 65 64 20 69 6e 20 | 52 69 74 63 68 69 65 20 |owed in |Ritchie |
|000044f0| 63 6f 6d 70 69 6c 65 72 | 20 2a 2f 0a 23 64 65 66 |compiler| */.#def|
|00004500| 69 6e 65 20 52 09 52 49 | 54 43 48 49 45 0a 23 64 |ine R.RI|TCHIE.#d|
|00004510| 65 66 69 6e 65 20 50 52 | 45 41 4e 53 49 09 33 09 |efine PR|EANSI.3.|
|00004520| 2f 2a 20 63 6f 6d 62 6f | 20 6e 6f 74 20 61 6c 6c |/* combo| not all|
|00004530| 6f 77 65 64 20 69 6e 20 | 50 72 65 2d 41 4e 53 49 |owed in |Pre-ANSI|
|00004540| 20 63 6f 6d 70 69 6c 65 | 72 20 2a 2f 0a 23 64 65 | compile|r */.#de|
|00004550| 66 69 6e 65 20 50 09 50 | 52 45 41 4e 53 49 0a 23 |fine P.P|REANSI.#|
|00004560| 64 65 66 69 6e 65 20 41 | 4e 53 49 09 34 09 2f 2a |define A|NSI.4./*|
|00004570| 20 63 6f 6d 62 6f 20 6e | 6f 74 20 61 6c 6c 6f 77 | combo n|ot allow|
|00004580| 65 64 20 61 6e 79 6d 6f | 72 65 20 69 6e 20 41 4e |ed anymo|re in AN|
|00004590| 53 49 20 63 6f 6d 70 69 | 6c 65 72 20 2a 2f 0a 23 |SI compi|ler */.#|
|000045a0| 64 65 66 69 6e 65 20 41 | 09 41 4e 53 49 0a 0a 2f |define A|.ANSI../|
|000045b0| 2a 20 54 68 69 73 20 69 | 73 20 61 6e 20 6c 6f 77 |* This i|s an low|
|000045c0| 65 72 20 6c 65 66 74 20 | 74 72 69 61 6e 67 75 6c |er left |triangul|
|000045d0| 61 72 20 61 72 72 61 79 | 2e 20 49 66 20 77 65 20 |ar array|. If we |
|000045e0| 6e 65 65 64 65 64 20 2a | 2f 0a 2f 2a 20 74 6f 20 |needed *|/./* to |
|000045f0| 73 61 76 65 20 39 20 62 | 79 74 65 73 2c 20 74 68 |save 9 b|ytes, th|
|00004600| 65 20 22 6c 6f 6e 67 22 | 20 72 6f 77 20 63 61 6e |e "long"| row can|
|00004610| 20 62 65 20 72 65 6d 6f | 76 65 64 2e 20 2a 2f 0a | be remo|ved. */.|
|00004620| 63 68 61 72 20 63 72 6f | 73 73 63 68 65 63 6b 5b |char cro|sscheck[|
|00004630| 39 5d 5b 39 5d 20 3d 20 | 7b 0a 20 20 20 20 2f 2a |9][9] = |{. /*|
|00004640| 09 09 09 4c 2c 20 49 2c | 20 53 2c 20 43 2c 20 56 |...L, I,| S, C, V|
|00004650| 2c 20 55 2c 20 53 2c 20 | 46 2c 20 44 2c 20 2a 2f |, U, S, |F, D, */|
|00004660| 0a 20 20 20 20 2f 2a 20 | 6c 6f 6e 67 20 2a 2f 09 |. /* |long */.|
|00004670| 09 5f 2c 20 5f 2c 20 5f | 2c 20 5f 2c 20 5f 2c 20 |._, _, _|, _, _, |
|00004680| 5f 2c 20 5f 2c 20 5f 2c | 20 5f 2c 0a 20 20 20 20 |_, _, _,| _,. |
|00004690| 2f 2a 20 69 6e 74 20 2a | 2f 09 09 5f 2c 20 5f 2c |/* int *|/.._, _,|
|000046a0| 20 5f 2c 20 5f 2c 20 5f | 2c 20 5f 2c 20 5f 2c 20 | _, _, _|, _, _, |
|000046b0| 5f 2c 20 5f 2c 0a 20 20 | 20 20 2f 2a 20 73 68 6f |_, _,. | /* sho|
|000046c0| 72 74 20 2a 2f 09 09 58 | 2c 20 5f 2c 20 5f 2c 20 |rt */..X|, _, _, |
|000046d0| 5f 2c 20 5f 2c 20 5f 2c | 20 5f 2c 20 5f 2c 20 5f |_, _, _,| _, _, _|
|000046e0| 2c 0a 20 20 20 20 2f 2a | 20 63 68 61 72 20 2a 2f |,. /*| char */|
|000046f0| 09 09 58 2c 20 58 2c 20 | 58 2c 20 5f 2c 20 5f 2c |..X, X, |X, _, _,|
|00004700| 20 5f 2c 20 5f 2c 20 5f | 2c 20 5f 2c 0a 20 20 20 | _, _, _|, _,. |
|00004710| 20 2f 2a 20 76 6f 69 64 | 20 2a 2f 09 09 58 2c 20 | /* void| */..X, |
|00004720| 58 2c 20 58 2c 20 58 2c | 20 5f 2c 20 5f 2c 20 5f |X, X, X,| _, _, _|
|00004730| 2c 20 5f 2c 20 5f 2c 0a | 20 20 20 20 2f 2a 20 75 |, _, _,.| /* u|
|00004740| 6e 73 69 67 6e 65 64 20 | 2a 2f 09 52 2c 20 5f 2c |nsigned |*/.R, _,|
|00004750| 20 52 2c 20 52 2c 20 58 | 2c 20 5f 2c 20 5f 2c 20 | R, R, X|, _, _, |
|00004760| 5f 2c 20 5f 2c 0a 20 20 | 20 20 2f 2a 20 73 69 67 |_, _,. | /* sig|
|00004770| 6e 65 64 20 2a 2f 09 50 | 2c 20 50 2c 20 50 2c 20 |ned */.P|, P, P, |
|00004780| 50 2c 20 58 2c 20 58 2c | 20 5f 2c 20 5f 2c 20 5f |P, X, X,| _, _, _|
|00004790| 2c 0a 20 20 20 20 2f 2a | 20 66 6c 6f 61 74 20 2a |,. /*| float *|
|000047a0| 2f 09 09 41 2c 20 58 2c | 20 58 2c 20 58 2c 20 58 |/..A, X,| X, X, X|
|000047b0| 2c 20 58 2c 20 58 2c 20 | 5f 2c 20 5f 2c 0a 20 20 |, X, X, |_, _,. |
|000047c0| 20 20 2f 2a 20 64 6f 75 | 62 6c 65 20 2a 2f 09 50 | /* dou|ble */.P|
|000047d0| 2c 20 58 2c 20 58 2c 20 | 58 2c 20 58 2c 20 58 2c |, X, X, |X, X, X,|
|000047e0| 20 58 2c 20 58 2c 20 5f | 0a 7d 3b 0a 0a 2f 2a 20 | X, X, _|.};../* |
|000047f0| 74 68 65 20 6e 61 6d 65 | 73 20 61 6e 64 20 62 69 |the name|s and bi|
|00004800| 74 73 20 63 68 65 63 6b | 65 64 20 66 6f 72 20 65 |ts check|ed for e|
|00004810| 61 63 68 20 72 6f 77 20 | 69 6e 20 74 68 65 20 61 |ach row |in the a|
|00004820| 62 6f 76 65 20 61 72 72 | 61 79 20 2a 2f 0a 73 74 |bove arr|ay */.st|
|00004830| 72 75 63 74 0a 20 20 20 | 20 7b 0a 20 20 20 20 63 |ruct. | {. c|
|00004840| 68 61 72 20 2a 6e 61 6d | 65 3b 0a 20 20 20 20 69 |har *nam|e;. i|
|00004850| 6e 74 20 62 69 74 3b 0a | 20 20 20 20 7d 20 63 72 |nt bit;.| } cr|
|00004860| 6f 73 73 74 79 70 65 73 | 5b 39 5d 20 3d 0a 09 7b |osstypes|[9] =..{|
|00004870| 0a 09 20 20 20 20 7b 20 | 22 6c 6f 6e 67 22 2c 09 |.. { |"long",.|
|00004880| 09 4d 42 5f 4c 4f 4e 47 | 09 09 7d 2c 0a 09 20 20 |.MB_LONG|..},.. |
|00004890| 20 20 7b 20 22 69 6e 74 | 22 2c 09 09 4d 42 5f 49 | { "int|",..MB_I|
|000048a0| 4e 54 09 09 7d 2c 0a 09 | 20 20 20 20 7b 20 22 73 |NT..},..| { "s|
|000048b0| 68 6f 72 74 22 2c 09 09 | 4d 42 5f 53 48 4f 52 54 |hort",..|MB_SHORT|
|000048c0| 09 7d 2c 0a 09 20 20 20 | 20 7b 20 22 63 68 61 72 |.},.. | { "char|
|000048d0| 22 2c 09 09 4d 42 5f 43 | 48 41 52 09 09 7d 2c 0a |",..MB_C|HAR..},.|
|000048e0| 09 20 20 20 20 7b 20 22 | 76 6f 69 64 22 2c 09 09 |. { "|void",..|
|000048f0| 4d 42 5f 56 4f 49 44 09 | 09 7d 2c 0a 09 20 20 20 |MB_VOID.|.},.. |
|00004900| 20 7b 20 22 75 6e 73 69 | 67 6e 65 64 22 2c 09 4d | { "unsi|gned",.M|
|00004910| 42 5f 55 4e 53 49 47 4e | 45 44 09 7d 2c 0a 09 20 |B_UNSIGN|ED.},.. |
|00004920| 20 20 20 7b 20 22 73 69 | 67 6e 65 64 22 2c 09 09 | { "si|gned",..|
|00004930| 4d 42 5f 53 49 47 4e 45 | 44 09 7d 2c 0a 09 20 20 |MB_SIGNE|D.},.. |
|00004940| 20 20 7b 20 22 66 6c 6f | 61 74 22 2c 09 09 4d 42 | { "flo|at",..MB|
|00004950| 5f 46 4c 4f 41 54 09 7d | 2c 0a 09 20 20 20 20 7b |_FLOAT.}|,.. {|
|00004960| 20 22 64 6f 75 62 6c 65 | 22 2c 09 09 4d 42 5f 44 | "double|",..MB_D|
|00004970| 4f 55 42 4c 45 09 7d 0a | 09 7d 3b 0a 0a 2f 2a 20 |OUBLE.}.|.};../* |
|00004980| 52 75 6e 20 74 68 72 6f | 75 67 68 20 74 68 65 20 |Run thro|ugh the |
|00004990| 63 72 6f 73 73 63 68 65 | 63 6b 20 61 72 72 61 79 |crossche|ck array|
|000049a0| 20 6c 6f 6f 6b 69 6e 67 | 20 2a 2f 0a 2f 2a 20 66 | looking| */./* f|
|000049b0| 6f 72 20 75 6e 73 75 70 | 70 6f 72 74 65 64 20 63 |or unsup|ported c|
|000049c0| 6f 6d 62 69 6e 61 74 69 | 6f 6e 73 20 6f 66 20 74 |ombinati|ons of t|
|000049d0| 79 70 65 73 2e 20 2a 2f | 0a 76 6f 69 64 20 6d 62 |ypes. */|.void mb|
|000049e0| 63 68 65 63 6b 28 29 0a | 7b 0a 20 20 20 20 72 65 |check().|{. re|
|000049f0| 67 69 73 74 65 72 20 69 | 6e 74 20 69 2c 20 6a 2c |gister i|nt i, j,|
|00004a00| 20 72 65 73 74 72 69 63 | 74 3b 0a 20 20 20 20 63 | restric|t;. c|
|00004a10| 68 61 72 20 2a 74 31 2c | 20 2a 74 32 3b 0a 0a 20 |har *t1,| *t2;.. |
|00004a20| 20 20 20 2f 2a 20 4c 6f | 6f 70 20 74 68 72 6f 75 | /* Lo|op throu|
|00004a30| 67 68 20 74 68 65 20 74 | 79 70 65 73 20 2a 2f 0a |gh the t|ypes */.|
|00004a40| 20 20 20 20 2f 2a 20 28 | 73 6b 69 70 20 74 68 65 | /* (|skip the|
|00004a50| 20 22 6c 6f 6e 67 22 20 | 72 6f 77 29 20 2a 2f 0a | "long" |row) */.|
|00004a60| 20 20 20 20 66 6f 72 20 | 28 69 20 3d 20 31 3b 20 | for |(i = 1; |
|00004a70| 69 20 3c 20 39 3b 20 69 | 2b 2b 29 0a 09 7b 0a 09 |i < 9; i|++)..{..|
|00004a80| 2f 2a 20 69 66 20 74 68 | 69 73 20 74 79 70 65 20 |/* if th|is type |
|00004a90| 69 73 20 69 6e 20 75 73 | 65 20 2a 2f 0a 09 69 66 |is in us|e */..if|
|00004aa0| 20 28 28 6d 6f 64 62 69 | 74 73 20 26 20 63 72 6f | ((modbi|ts & cro|
|00004ab0| 73 73 74 79 70 65 73 5b | 69 5d 2e 62 69 74 29 20 |sstypes[|i].bit) |
|00004ac0| 21 3d 20 30 29 0a 09 20 | 20 20 20 7b 0a 09 20 20 |!= 0).. | {.. |
|00004ad0| 20 20 2f 2a 20 63 68 65 | 63 6b 20 66 6f 72 20 6f | /* che|ck for o|
|00004ae0| 74 68 65 72 20 74 79 70 | 65 73 20 61 6c 73 6f 20 |ther typ|es also |
|00004af0| 69 6e 20 75 73 65 20 2a | 2f 0a 09 20 20 20 20 66 |in use *|/.. f|
|00004b00| 6f 72 20 28 6a 20 3d 20 | 30 3b 20 6a 20 3c 20 69 |or (j = |0; j < i|
|00004b10| 3b 20 6a 2b 2b 29 0a 09 | 09 7b 0a 09 09 2f 2a 20 |; j++)..|.{.../* |
|00004b20| 74 68 69 73 20 74 79 70 | 65 20 69 73 20 6e 6f 74 |this typ|e is not|
|00004b30| 20 69 6e 20 75 73 65 20 | 2a 2f 0a 09 09 69 66 20 | in use |*/...if |
|00004b40| 28 21 28 6d 6f 64 62 69 | 74 73 20 26 20 63 72 6f |(!(modbi|ts & cro|
|00004b50| 73 73 74 79 70 65 73 5b | 6a 5d 2e 62 69 74 29 29 |sstypes[|j].bit))|
|00004b60| 0a 09 09 20 20 20 20 63 | 6f 6e 74 69 6e 75 65 3b |... c|ontinue;|
|00004b70| 0a 09 09 2f 2a 20 63 68 | 65 63 6b 20 74 68 65 20 |.../* ch|eck the |
|00004b80| 74 79 70 65 20 6f 66 20 | 72 65 73 74 72 69 63 74 |type of |restrict|
|00004b90| 69 6f 6e 20 2a 2f 0a 09 | 09 72 65 73 74 72 69 63 |ion */..|.restric|
|00004ba0| 74 20 3d 20 63 72 6f 73 | 73 63 68 65 63 6b 5b 69 |t = cros|scheck[i|
|00004bb0| 5d 5b 6a 5d 3b 0a 09 09 | 69 66 20 28 72 65 73 74 |][j];...|if (rest|
|00004bc0| 72 69 63 74 20 3d 3d 20 | 41 4c 57 41 59 53 29 0a |rict == |ALWAYS).|
|00004bd0| 09 09 20 20 20 20 63 6f | 6e 74 69 6e 75 65 3b 0a |.. co|ntinue;.|
|00004be0| 09 09 74 31 20 3d 20 63 | 72 6f 73 73 74 79 70 65 |..t1 = c|rosstype|
|00004bf0| 73 5b 69 5d 2e 6e 61 6d | 65 3b 0a 09 09 74 32 20 |s[i].nam|e;...t2 |
|00004c00| 3d 20 63 72 6f 73 73 74 | 79 70 65 73 5b 6a 5d 2e |= crosst|ypes[j].|
|00004c10| 6e 61 6d 65 3b 0a 09 09 | 69 66 20 28 72 65 73 74 |name;...|if (rest|
|00004c20| 72 69 63 74 20 3d 3d 20 | 4e 45 56 45 52 29 0a 09 |rict == |NEVER)..|
|00004c30| 09 20 20 20 20 7b 0a 09 | 09 20 20 20 20 6e 6f 74 |. {..|. not|
|00004c40| 73 75 70 70 6f 72 74 65 | 64 28 22 22 2c 20 74 31 |supporte|d("", t1|
|00004c50| 2c 20 74 32 29 3b 0a 09 | 09 20 20 20 20 7d 0a 09 |, t2);..|. }..|
|00004c60| 09 65 6c 73 65 20 69 66 | 20 28 72 65 73 74 72 69 |.else if| (restri|
|00004c70| 63 74 20 3d 3d 20 52 49 | 54 43 48 49 45 29 0a 09 |ct == RI|TCHIE)..|
|00004c80| 09 20 20 20 20 7b 0a 09 | 09 20 20 20 20 69 66 20 |. {..|. if |
|00004c90| 28 52 69 74 63 68 69 65 | 46 6c 61 67 29 0a 09 09 |(Ritchie|Flag)...|
|00004ca0| 09 6e 6f 74 73 75 70 70 | 6f 72 74 65 64 28 22 20 |.notsupp|orted(" |
|00004cb0| 28 52 69 74 63 68 69 65 | 20 43 6f 6d 70 69 6c 65 |(Ritchie| Compile|
|00004cc0| 72 29 22 2c 20 74 31 2c | 20 74 32 29 3b 0a 09 09 |r)", t1,| t2);...|
|00004cd0| 20 20 20 20 7d 0a 09 09 | 65 6c 73 65 20 69 66 20 | }...|else if |
|00004ce0| 28 72 65 73 74 72 69 63 | 74 20 3d 3d 20 50 52 45 |(restric|t == PRE|
|00004cf0| 41 4e 53 49 29 0a 09 09 | 20 20 20 20 7b 0a 09 09 |ANSI)...| {...|
|00004d00| 20 20 20 20 69 66 20 28 | 50 72 65 41 4e 53 49 46 | if (|PreANSIF|
|00004d10| 6c 61 67 20 7c 7c 20 52 | 69 74 63 68 69 65 46 6c |lag || R|itchieFl|
|00004d20| 61 67 29 0a 09 09 09 6e | 6f 74 73 75 70 70 6f 72 |ag)....n|otsuppor|
|00004d30| 74 65 64 28 22 20 28 50 | 72 65 2d 41 4e 53 49 20 |ted(" (P|re-ANSI |
|00004d40| 43 6f 6d 70 69 6c 65 72 | 29 22 2c 20 74 31 2c 20 |Compiler|)", t1, |
|00004d50| 74 32 29 3b 0a 09 09 20 | 20 20 20 7d 0a 09 09 65 |t2);... | }...e|
|00004d60| 6c 73 65 20 69 66 20 28 | 72 65 73 74 72 69 63 74 |lse if (|restrict|
|00004d70| 20 3d 3d 20 41 4e 53 49 | 29 0a 09 09 20 20 20 20 | == ANSI|)... |
|00004d80| 7b 0a 09 09 20 20 20 20 | 69 66 20 28 21 52 69 74 |{... |if (!Rit|
|00004d90| 63 68 69 65 46 6c 61 67 | 20 26 26 20 21 50 72 65 |chieFlag| && !Pre|
|00004da0| 41 4e 53 49 46 6c 61 67 | 29 0a 09 09 09 6e 6f 74 |ANSIFlag|)....not|
|00004db0| 73 75 70 70 6f 72 74 65 | 64 28 22 20 28 41 4e 53 |supporte|d(" (ANS|
|00004dc0| 49 20 43 6f 6d 70 69 6c | 65 72 29 22 2c 20 74 31 |I Compil|er)", t1|
|00004dd0| 2c 20 74 32 29 3b 0a 09 | 09 20 20 20 20 7d 0a 09 |, t2);..|. }..|
|00004de0| 09 65 6c 73 65 0a 09 09 | 20 20 20 20 7b 0a 09 09 |.else...| {...|
|00004df0| 20 20 20 20 28 76 6f 69 | 64 29 20 66 70 72 69 6e | (voi|d) fprin|
|00004e00| 74 66 20 28 73 74 64 65 | 72 72 2c 0a 09 09 09 22 |tf (stde|rr,...."|
|00004e10| 25 73 3a 20 49 6e 74 65 | 72 6e 61 6c 20 65 72 72 |%s: Inte|rnal err|
|00004e20| 6f 72 20 69 6e 20 63 72 | 6f 73 73 63 68 65 63 6b |or in cr|osscheck|
|00004e30| 5b 25 64 2c 25 64 5d 3d | 25 64 21 5c 6e 22 2c 0a |[%d,%d]=|%d!\n",.|
|00004e40| 09 09 09 70 72 6f 67 6e | 61 6d 65 2c 20 69 2c 20 |...progn|ame, i, |
|00004e50| 6a 2c 20 72 65 73 74 72 | 69 63 74 29 3b 0a 09 09 |j, restr|ict);...|
|00004e60| 20 20 20 20 65 78 69 74 | 28 31 29 3b 20 2f 2a 20 | exit|(1); /* |
|00004e70| 4e 4f 54 52 45 41 43 48 | 45 44 20 2a 2f 0a 09 09 |NOTREACH|ED */...|
|00004e80| 20 20 20 20 7d 0a 09 09 | 7d 0a 09 20 20 20 20 7d | }...|}.. }|
|00004e90| 0a 09 7d 0a 7d 0a 0a 2f | 2a 20 75 6e 64 65 66 69 |..}.}../|* undefi|
|00004ea0| 6e 65 20 74 68 65 73 65 | 20 61 73 20 74 68 65 79 |ne these| as they|
|00004eb0| 20 61 72 65 20 6e 6f 20 | 6c 6f 6e 67 65 72 20 6e | are no |longer n|
|00004ec0| 65 65 64 65 64 20 2a 2f | 0a 23 75 6e 64 65 66 20 |eeded */|.#undef |
|00004ed0| 5f 0a 23 75 6e 64 65 66 | 20 41 4c 57 41 59 53 0a |_.#undef| ALWAYS.|
|00004ee0| 23 75 6e 64 65 66 20 58 | 0a 23 75 6e 64 65 66 20 |#undef X|.#undef |
|00004ef0| 4e 45 56 45 52 0a 23 75 | 6e 64 65 66 20 52 0a 23 |NEVER.#u|ndef R.#|
|00004f00| 75 6e 64 65 66 20 52 49 | 54 43 48 49 45 0a 23 75 |undef RI|TCHIE.#u|
|00004f10| 6e 64 65 66 20 50 0a 23 | 75 6e 64 65 66 20 50 52 |ndef P.#|undef PR|
|00004f20| 45 41 4e 53 49 0a 23 75 | 6e 64 65 66 20 41 0a 23 |EANSI.#u|ndef A.#|
|00004f30| 75 6e 64 65 66 20 41 4e | 53 49 0a 0c 0a 2f 2a 20 |undef AN|SI.../* |
|00004f40| 57 72 69 74 65 20 6f 75 | 74 20 61 20 6d 65 73 73 |Write ou|t a mess|
|00004f50| 61 67 65 20 61 62 6f 75 | 74 20 73 6f 6d 65 74 68 |age abou|t someth|
|00004f60| 69 6e 67 20 2a 2f 0a 2f | 2a 20 62 65 69 6e 67 20 |ing */./|* being |
|00004f70| 75 6e 73 75 70 70 6f 72 | 74 65 64 2c 20 70 6f 73 |unsuppor|ted, pos|
|00004f80| 73 69 62 6c 79 20 77 69 | 74 68 20 61 20 68 69 6e |sibly wi|th a hin|
|00004f90| 74 2e 20 2a 2f 0a 76 6f | 69 64 20 75 6e 73 75 70 |t. */.vo|id unsup|
|00004fa0| 70 28 73 2c 68 69 6e 74 | 29 0a 63 68 61 72 20 2a |p(s,hint|).char *|
|00004fb0| 73 2c 2a 68 69 6e 74 3b | 0a 7b 0a 20 20 20 20 6e |s,*hint;|.{. n|
|00004fc0| 6f 74 73 75 70 70 6f 72 | 74 65 64 28 22 22 2c 20 |otsuppor|ted("", |
|00004fd0| 73 2c 20 4e 75 6c 6c 43 | 50 29 3b 0a 20 20 20 20 |s, NullC|P);. |
|00004fe0| 69 66 20 28 68 69 6e 74 | 29 0a 09 28 76 6f 69 64 |if (hint|)..(void|
|00004ff0| 29 20 66 70 72 69 6e 74 | 66 28 73 74 64 65 72 72 |) fprint|f(stderr|
|00005000| 2c 20 22 5c 74 28 6d 61 | 79 62 65 20 79 6f 75 20 |, "\t(ma|ybe you |
|00005010| 6d 65 61 6e 20 5c 22 25 | 73 5c 22 29 5c 6e 22 2c |mean \"%|s\")\n",|
|00005020| 20 68 69 6e 74 29 3b 0a | 7d 0a 0a 2f 2a 20 57 72 | hint);.|}../* Wr|
|00005030| 69 74 65 20 6f 75 74 20 | 61 20 6d 65 73 73 61 67 |ite out |a messag|
|00005040| 65 20 61 62 6f 75 74 20 | 73 6f 6d 65 74 68 69 6e |e about |somethin|
|00005050| 67 20 2a 2f 0a 2f 2a 20 | 62 65 69 6e 67 20 75 6e |g */./* |being un|
|00005060| 73 75 70 70 6f 72 74 65 | 64 20 6f 6e 20 61 20 70 |supporte|d on a p|
|00005070| 61 72 74 69 63 75 6c 61 | 72 20 63 6f 6d 70 69 6c |articula|r compil|
|00005080| 65 72 2e 20 2a 2f 0a 76 | 6f 69 64 20 6e 6f 74 73 |er. */.v|oid nots|
|00005090| 75 70 70 6f 72 74 65 64 | 28 63 6f 6d 70 69 6c 65 |upported|(compile|
|000050a0| 72 2c 20 74 79 70 65 31 | 2c 20 74 79 70 65 32 29 |r, type1|, type2)|
|000050b0| 0a 63 68 61 72 20 2a 63 | 6f 6d 70 69 6c 65 72 2c |.char *c|ompiler,|
|000050c0| 20 2a 74 79 70 65 31 2c | 20 2a 74 79 70 65 32 3b | *type1,| *type2;|
|000050d0| 0a 7b 0a 20 20 20 20 69 | 66 20 28 74 79 70 65 32 |.{. i|f (type2|
|000050e0| 29 0a 09 28 76 6f 69 64 | 29 20 66 70 72 69 6e 74 |)..(void|) fprint|
|000050f0| 66 28 73 74 64 65 72 72 | 2c 0a 09 20 20 20 20 22 |f(stderr|,.. "|
|00005100| 57 61 72 6e 69 6e 67 3a | 20 55 6e 73 75 70 70 6f |Warning:| Unsuppo|
|00005110| 72 74 65 64 20 69 6e 25 | 73 20 43 25 73 20 2d 2d |rted in%|s C%s --|
|00005120| 20 27 25 73 27 20 77 69 | 74 68 20 27 25 73 27 5c | '%s' wi|th '%s'\|
|00005130| 6e 22 2c 0a 09 20 20 20 | 20 63 6f 6d 70 69 6c 65 |n",.. | compile|
|00005140| 72 2c 20 43 70 6c 75 73 | 70 6c 75 73 46 6c 61 67 |r, Cplus|plusFlag|
|00005150| 20 3f 20 22 2b 2b 22 20 | 3a 20 22 22 2c 20 74 79 | ? "++" |: "", ty|
|00005160| 70 65 31 2c 20 74 79 70 | 65 32 29 3b 0a 20 20 20 |pe1, typ|e2);. |
|00005170| 20 65 6c 73 65 0a 09 28 | 76 6f 69 64 29 20 66 70 | else..(|void) fp|
|00005180| 72 69 6e 74 66 28 73 74 | 64 65 72 72 2c 0a 09 20 |rintf(st|derr,.. |
|00005190| 20 20 20 22 57 61 72 6e | 69 6e 67 3a 20 55 6e 73 | "Warn|ing: Uns|
|000051a0| 75 70 70 6f 72 74 65 64 | 20 69 6e 25 73 20 43 25 |upported| in%s C%|
|000051b0| 73 20 2d 2d 20 27 25 73 | 27 5c 6e 22 2c 0a 09 20 |s -- '%s|'\n",.. |
|000051c0| 20 20 20 63 6f 6d 70 69 | 6c 65 72 2c 20 43 70 6c | compi|ler, Cpl|
|000051d0| 75 73 70 6c 75 73 46 6c | 61 67 20 3f 20 22 2b 2b |usplusFl|ag ? "++|
|000051e0| 22 20 3a 20 22 22 2c 20 | 74 79 70 65 31 29 3b 0a |" : "", |type1);.|
|000051f0| 7d 0a 0a 2f 2a 20 43 61 | 6c 6c 65 64 20 62 79 20 |}../* Ca|lled by |
|00005200| 74 68 65 20 79 61 63 63 | 20 67 72 61 6d 6d 61 72 |the yacc| grammar|
|00005210| 20 2a 2f 0a 76 6f 69 64 | 20 79 79 65 72 72 6f 72 | */.void| yyerror|
|00005220| 28 73 29 0a 63 68 61 72 | 20 2a 73 3b 0a 7b 0a 20 |(s).char| *s;.{. |
|00005230| 20 20 20 28 76 6f 69 64 | 29 20 70 72 69 6e 74 66 | (void|) printf|
|00005240| 28 22 25 73 5c 6e 22 2c | 73 29 3b 0a 20 20 20 20 |("%s\n",|s);. |
|00005250| 44 65 62 75 67 28 28 73 | 74 64 6f 75 74 2c 20 22 |Debug((s|tdout, "|
|00005260| 79 79 63 68 61 72 3d 25 | 64 5c 6e 22 2c 20 79 79 |yychar=%|d\n", yy|
|00005270| 63 68 61 72 29 29 3b 0a | 7d 0a 0a 2f 2a 20 43 61 |char));.|}../* Ca|
|00005280| 6c 6c 65 64 20 62 79 20 | 74 68 65 20 79 61 63 63 |lled by |the yacc|
|00005290| 20 67 72 61 6d 6d 61 72 | 20 2a 2f 0a 69 6e 74 20 | grammar| */.int |
|000052a0| 79 79 77 72 61 70 28 29 | 0a 7b 0a 20 20 20 20 72 |yywrap()|.{. r|
|000052b0| 65 74 75 72 6e 20 31 3b | 0a 7d 0a 0a 2f 2a 0a 20 |eturn 1;|.}../*. |
|000052c0| 2a 20 53 75 70 70 6f 72 | 74 20 66 6f 72 20 64 79 |* Suppor|t for dy|
|000052d0| 6e 61 6d 69 63 20 73 74 | 72 69 6e 67 73 3a 0a 20 |namic st|rings:. |
|000052e0| 2a 20 63 61 74 28 29 20 | 63 72 65 61 74 65 73 20 |* cat() |creates |
|000052f0| 61 20 73 74 72 69 6e 67 | 20 66 72 6f 6d 20 74 68 |a string| from th|
|00005300| 65 20 63 6f 6e 63 61 74 | 65 6e 61 74 69 6f 6e 0a |e concat|enation.|
|00005310| 20 2a 20 6f 66 20 61 20 | 6e 75 6c 6c 20 74 65 72 | * of a |null ter|
|00005320| 6d 69 6e 61 74 65 64 20 | 6c 69 73 74 20 6f 66 20 |minated |list of |
|00005330| 69 6e 70 75 74 20 73 74 | 72 69 6e 67 73 2e 0a 20 |input st|rings.. |
|00005340| 2a 20 54 68 65 20 69 6e | 70 75 74 20 73 74 72 69 |* The in|put stri|
|00005350| 6e 67 73 20 61 72 65 20 | 66 72 65 65 28 29 27 64 |ngs are |free()'d|
|00005360| 20 62 79 20 63 61 74 28 | 29 0a 20 2a 20 28 73 6f | by cat(|). * (so|
|00005370| 20 74 68 65 79 20 62 65 | 74 74 65 72 20 68 61 76 | they be|tter hav|
|00005380| 65 20 62 65 65 6e 20 6d | 61 6c 6c 6f 63 28 29 27 |e been m|alloc()'|
|00005390| 64 29 2e 0a 20 2a 0a 20 | 2a 20 74 68 65 20 64 69 |d).. *. |* the di|
|000053a0| 66 66 65 72 65 6e 74 20 | 6d 65 74 68 6f 64 73 20 |fferent |methods |
|000053b0| 6f 66 20 3c 73 74 64 61 | 72 67 2e 68 3e 20 61 6e |of <stda|rg.h> an|
|000053c0| 64 0a 20 2a 20 3c 76 61 | 72 61 72 67 2e 68 3e 20 |d. * <va|rarg.h> |
|000053d0| 61 72 65 20 68 61 6e 64 | 6c 65 64 20 77 69 74 68 |are hand|led with|
|000053e0| 69 6e 20 74 68 65 73 65 | 20 6d 61 63 72 6f 73 0a |in these| macros.|
|000053f0| 20 2a 2f 0a 23 69 66 20 | 5f 5f 53 54 44 43 5f 5f | */.#if |__STDC__|
|00005400| 0a 23 20 20 64 65 66 69 | 6e 65 20 56 41 5f 44 43 |.# defi|ne VA_DC|
|00005410| 4c 28 74 79 70 65 2c 76 | 61 72 29 09 09 28 74 79 |L(type,v|ar)..(ty|
|00005420| 70 65 20 76 61 72 2c 2e | 2e 2e 29 0a 23 20 20 64 |pe var,.|..).# d|
|00005430| 65 66 69 6e 65 20 56 41 | 5f 53 54 41 52 54 28 6c |efine VA|_START(l|
|00005440| 69 73 74 2c 76 61 72 2c | 74 79 70 65 29 09 28 28 |ist,var,|type).((|
|00005450| 76 61 5f 73 74 61 72 74 | 28 6c 69 73 74 2c 76 61 |va_start|(list,va|
|00005460| 72 29 29 20 2c 20 28 76 | 61 72 29 29 0a 23 65 6c |r)) , (v|ar)).#el|
|00005470| 73 65 0a 23 69 66 20 64 | 65 66 69 6e 65 64 28 44 |se.#if d|efined(D|
|00005480| 4f 53 29 0a 23 20 20 64 | 65 66 69 6e 65 20 56 41 |OS).# d|efine VA|
|00005490| 5f 44 43 4c 28 74 79 70 | 65 2c 76 61 72 29 09 09 |_DCL(typ|e,var)..|
|000054a0| 28 76 61 72 2c 2e 2e 2e | 29 20 74 79 70 65 20 76 |(var,...|) type v|
|000054b0| 61 72 3b 0a 23 20 20 64 | 65 66 69 6e 65 20 56 41 |ar;.# d|efine VA|
|000054c0| 5f 53 54 41 52 54 28 6c | 69 73 74 2c 76 61 72 2c |_START(l|ist,var,|
|000054d0| 74 79 70 65 29 09 28 28 | 76 61 5f 73 74 61 72 74 |type).((|va_start|
|000054e0| 28 6c 69 73 74 2c 76 61 | 72 29 29 20 2c 20 28 76 |(list,va|r)) , (v|
|000054f0| 61 72 29 29 0a 23 65 6c | 73 65 0a 23 69 66 6e 64 |ar)).#el|se.#ifnd|
|00005500| 65 66 20 4e 4f 56 41 52 | 41 52 47 53 0a 23 20 64 |ef NOVAR|ARGS.# d|
|00005510| 65 66 69 6e 65 20 56 41 | 5f 44 43 4c 28 74 79 70 |efine VA|_DCL(typ|
|00005520| 65 2c 76 61 72 29 09 09 | 28 76 61 5f 61 6c 69 73 |e,var)..|(va_alis|
|00005530| 74 29 20 76 61 5f 64 63 | 6c 0a 23 20 64 65 66 69 |t) va_dc|l.# defi|
|00005540| 6e 65 20 56 41 5f 53 54 | 41 52 54 28 6c 69 73 74 |ne VA_ST|ART(list|
|00005550| 2c 76 61 72 2c 74 79 70 | 65 29 09 28 28 76 61 5f |,var,typ|e).((va_|
|00005560| 73 74 61 72 74 28 6c 69 | 73 74 29 29 20 2c 20 76 |start(li|st)) , v|
|00005570| 61 5f 61 72 67 28 6c 69 | 73 74 2c 74 79 70 65 29 |a_arg(li|st,type)|
|00005580| 29 0a 23 65 6c 73 65 0a | 20 20 20 2f 2a 0a 20 20 |).#else.| /*. |
|00005590| 20 20 2a 09 69 74 20 69 | 73 20 61 73 73 75 6d 65 | *.it i|s assume|
|000055a0| 64 20 68 65 72 65 20 74 | 68 61 74 20 6d 61 63 68 |d here t|hat mach|
|000055b0| 69 6e 65 73 20 77 68 69 | 63 68 20 64 6f 6e 27 74 |ines whi|ch don't|
|000055c0| 20 68 61 76 65 20 65 69 | 74 68 65 72 0a 20 20 20 | have ei|ther. |
|000055d0| 20 2a 09 3c 76 61 72 61 | 72 67 73 2e 68 3e 20 6f | *.<vara|rgs.h> o|
|000055e0| 72 20 3c 73 74 64 61 72 | 67 2e 68 3e 20 77 69 6c |r <stdar|g.h> wil|
|000055f0| 6c 20 70 75 74 20 69 74 | 73 20 61 72 67 75 6d 65 |l put it|s argume|
|00005600| 6e 74 73 20 6f 6e 0a 20 | 20 20 20 2a 09 74 68 65 |nts on. | *.the|
|00005610| 20 73 74 61 63 6b 20 69 | 6e 20 74 68 65 20 22 75 | stack i|n the "u|
|00005620| 73 75 61 6c 22 20 77 61 | 79 20 61 6e 64 20 63 6f |sual" wa|y and co|
|00005630| 6e 73 65 71 75 65 6e 74 | 6c 79 20 63 61 6e 20 67 |nsequent|ly can g|
|00005640| 72 61 62 0a 20 20 20 20 | 2a 09 74 68 65 20 61 72 |rab. |*.the ar|
|00005650| 67 75 6d 65 6e 74 73 20 | 75 73 69 6e 67 20 74 68 |guments |using th|
|00005660| 65 20 22 74 61 6b 65 20 | 74 68 65 20 61 64 64 72 |e "take |the addr|
|00005670| 65 73 73 20 6f 66 20 74 | 68 65 20 66 69 72 73 74 |ess of t|he first|
|00005680| 0a 20 20 20 20 2a 09 70 | 61 72 61 6d 65 74 65 72 |. *.p|arameter|
|00005690| 20 61 6e 64 20 69 6e 63 | 72 65 6d 65 6e 74 20 62 | and inc|rement b|
|000056a0| 79 20 73 69 7a 65 6f 66 | 22 20 74 72 69 63 6b 2e |y sizeof|" trick.|
|000056b0| 0a 20 20 20 20 2a 2f 0a | 23 20 64 65 66 69 6e 65 |. */.|# define|
|000056c0| 20 56 41 5f 44 43 4c 28 | 74 79 70 65 2c 76 61 72 | VA_DCL(|type,var|
|000056d0| 29 09 09 28 76 61 72 29 | 20 74 79 70 65 20 76 61 |)..(var)| type va|
|000056e0| 72 3b 0a 23 20 64 65 66 | 69 6e 65 20 56 41 5f 53 |r;.# def|ine VA_S|
|000056f0| 54 41 52 54 28 6c 69 73 | 74 2c 76 61 72 2c 74 79 |TART(lis|t,var,ty|
|00005700| 70 65 29 09 28 6c 69 73 | 74 20 3d 20 28 76 61 5f |pe).(lis|t = (va_|
|00005710| 6c 69 73 74 29 26 28 76 | 61 72 29 20 2c 20 28 76 |list)&(v|ar) , (v|
|00005720| 61 72 29 29 0a 23 20 64 | 65 66 69 6e 65 20 76 61 |ar)).# d|efine va|
|00005730| 5f 61 72 67 28 6c 69 73 | 74 2c 74 79 70 65 29 09 |_arg(lis|t,type).|
|00005740| 09 28 28 74 79 70 65 20 | 2a 29 28 6c 69 73 74 20 |.((type |*)(list |
|00005750| 2b 3d 20 73 69 7a 65 6f | 66 28 74 79 70 65 29 29 |+= sizeo|f(type))|
|00005760| 29 5b 2d 31 5d 0a 23 20 | 64 65 66 69 6e 65 20 76 |)[-1].# |define v|
|00005770| 61 5f 65 6e 64 28 70 29 | 09 09 09 2f 2a 20 6e 6f |a_end(p)|.../* no|
|00005780| 74 68 69 6e 67 20 2a 2f | 0a 74 79 70 65 64 65 66 |thing */|.typedef|
|00005790| 20 63 68 61 72 20 2a 76 | 61 5f 6c 69 73 74 3b 0a | char *v|a_list;.|
|000057a0| 23 65 6e 64 69 66 20 2f | 2a 20 4e 4f 56 41 52 41 |#endif /|* NOVARA|
|000057b0| 52 47 53 20 2a 2f 0a 23 | 65 6e 64 69 66 20 2f 2a |RGS */.#|endif /*|
|000057c0| 20 44 4f 53 20 2a 2f 0a | 23 65 6e 64 69 66 20 2f | DOS */.|#endif /|
|000057d0| 2a 20 5f 5f 53 54 44 43 | 5f 5f 20 2a 2f 0a 0a 2f |* __STDC|__ */../|
|000057e0| 2a 20 56 41 52 41 52 47 | 53 20 2a 2f 0a 63 68 61 |* VARARG|S */.cha|
|000057f0| 72 20 2a 63 61 74 0a 56 | 41 5f 44 43 4c 28 63 68 |r *cat.V|A_DCL(ch|
|00005800| 61 72 2a 2c 20 73 31 29 | 0a 7b 0a 20 20 20 20 72 |ar*, s1)|.{. r|
|00005810| 65 67 69 73 74 65 72 20 | 63 68 61 72 20 2a 6e 65 |egister |char *ne|
|00005820| 77 73 74 72 3b 0a 20 20 | 20 20 72 65 67 69 73 74 |wstr;. | regist|
|00005830| 65 72 20 75 6e 73 69 67 | 6e 65 64 20 6c 65 6e 20 |er unsig|ned len |
|00005840| 3d 20 31 3b 0a 20 20 20 | 20 63 68 61 72 20 2a 73 |= 1;. | char *s|
|00005850| 74 72 3b 0a 20 20 20 20 | 76 61 5f 6c 69 73 74 20 |tr;. |va_list |
|00005860| 61 72 67 73 3b 0a 0a 20 | 20 20 20 2f 2a 20 66 69 |args;.. | /* fi|
|00005870| 6e 64 20 74 68 65 20 6c | 65 6e 67 74 68 20 77 68 |nd the l|ength wh|
|00005880| 69 63 68 20 6e 65 65 64 | 73 20 74 6f 20 62 65 20 |ich need|s to be |
|00005890| 61 6c 6c 6f 63 61 74 65 | 64 20 2a 2f 0a 20 20 20 |allocate|d */. |
|000058a0| 20 73 74 72 20 3d 20 56 | 41 5f 53 54 41 52 54 28 | str = V|A_START(|
|000058b0| 61 72 67 73 2c 20 73 31 | 2c 20 63 68 61 72 2a 29 |args, s1|, char*)|
|000058c0| 3b 0a 20 20 20 20 66 6f | 72 20 28 20 3b 20 73 74 |;. fo|r ( ; st|
|000058d0| 72 3b 20 73 74 72 20 3d | 20 76 61 5f 61 72 67 28 |r; str =| va_arg(|
|000058e0| 61 72 67 73 2c 20 63 68 | 61 72 2a 29 29 0a 09 6c |args, ch|ar*))..l|
|000058f0| 65 6e 20 2b 3d 20 73 74 | 72 6c 65 6e 28 73 74 72 |en += st|rlen(str|
|00005900| 29 3b 0a 20 20 20 20 76 | 61 5f 65 6e 64 28 61 72 |);. v|a_end(ar|
|00005910| 67 73 29 3b 0a 0a 20 20 | 20 20 2f 2a 20 61 6c 6c |gs);.. | /* all|
|00005920| 6f 63 61 74 65 20 69 74 | 20 2a 2f 0a 20 20 20 20 |ocate it| */. |
|00005930| 6e 65 77 73 74 72 20 3d | 20 6d 61 6c 6c 6f 63 28 |newstr =| malloc(|
|00005940| 6c 65 6e 29 3b 0a 20 20 | 20 20 69 66 20 28 6e 65 |len);. | if (ne|
|00005950| 77 73 74 72 20 3d 3d 20 | 30 29 0a 09 7b 0a 09 28 |wstr == |0)..{..(|
|00005960| 76 6f 69 64 29 20 66 70 | 72 69 6e 74 66 20 28 73 |void) fp|rintf (s|
|00005970| 74 64 65 72 72 2c 20 22 | 25 73 3a 20 6f 75 74 20 |tderr, "|%s: out |
|00005980| 6f 66 20 6d 61 6c 6c 6f | 63 20 73 70 61 63 65 20 |of mallo|c space |
|00005990| 77 69 74 68 69 6e 20 63 | 61 74 28 29 21 5c 6e 22 |within c|at()!\n"|
|000059a0| 2c 0a 09 20 20 20 20 70 | 72 6f 67 6e 61 6d 65 29 |,.. p|rogname)|
|000059b0| 3b 0a 09 65 78 69 74 28 | 31 29 3b 0a 09 7d 0a 20 |;..exit(|1);..}. |
|000059c0| 20 20 20 6e 65 77 73 74 | 72 5b 30 5d 20 3d 20 27 | newst|r[0] = '|
|000059d0| 5c 30 27 3b 0a 0a 20 20 | 20 20 2f 2a 20 63 6f 70 |\0';.. | /* cop|
|000059e0| 79 20 69 6e 20 74 68 65 | 20 73 74 72 69 6e 67 73 |y in the| strings|
|000059f0| 20 2a 2f 0a 20 20 20 20 | 73 74 72 20 3d 20 56 41 | */. |str = VA|
|00005a00| 5f 53 54 41 52 54 28 61 | 72 67 73 2c 20 73 31 2c |_START(a|rgs, s1,|
|00005a10| 20 63 68 61 72 2a 29 3b | 0a 20 20 20 20 66 6f 72 | char*);|. for|
|00005a20| 20 28 20 3b 20 73 74 72 | 3b 20 73 74 72 20 3d 20 | ( ; str|; str = |
|00005a30| 76 61 5f 61 72 67 28 61 | 72 67 73 2c 20 63 68 61 |va_arg(a|rgs, cha|
|00005a40| 72 2a 29 29 0a 09 7b 0a | 09 28 76 6f 69 64 29 20 |r*))..{.|.(void) |
|00005a50| 73 74 72 63 61 74 28 6e | 65 77 73 74 72 2c 73 74 |strcat(n|ewstr,st|
|00005a60| 72 29 3b 0a 09 66 72 65 | 65 28 73 74 72 29 3b 0a |r);..fre|e(str);.|
|00005a70| 09 7d 0a 20 20 20 20 76 | 61 5f 65 6e 64 28 61 72 |.}. v|a_end(ar|
|00005a80| 67 73 29 3b 0a 0a 20 20 | 20 20 44 65 62 75 67 28 |gs);.. | Debug(|
|00005a90| 28 73 74 64 65 72 72 2c | 20 22 5c 74 63 61 74 20 |(stderr,| "\tcat |
|00005aa0| 63 72 65 61 74 65 64 20 | 27 25 73 27 5c 6e 22 2c |created |'%s'\n",|
|00005ab0| 20 6e 65 77 73 74 72 29 | 29 3b 0a 20 20 20 20 72 | newstr)|);. r|
|00005ac0| 65 74 75 72 6e 20 6e 65 | 77 73 74 72 3b 0a 7d 0a |eturn ne|wstr;.}.|
|00005ad0| 0a 2f 2a 0a 20 2a 20 64 | 73 28 29 20 6d 61 6b 65 |./*. * d|s() make|
|00005ae0| 73 20 61 20 6d 61 6c 6c | 6f 63 28 29 27 64 20 73 |s a mall|oc()'d s|
|00005af0| 74 72 69 6e 67 20 66 72 | 6f 6d 20 6f 6e 65 20 74 |tring fr|om one t|
|00005b00| 68 61 74 27 73 20 6e 6f | 74 2e 0a 20 2a 2f 0a 63 |hat's no|t.. */.c|
|00005b10| 68 61 72 20 2a 64 73 28 | 73 29 0a 63 68 61 72 20 |har *ds(|s).char |
|00005b20| 2a 73 3b 0a 7b 0a 20 20 | 20 20 72 65 67 69 73 74 |*s;.{. | regist|
|00005b30| 65 72 20 63 68 61 72 20 | 2a 70 20 3d 20 6d 61 6c |er char |*p = mal|
|00005b40| 6c 6f 63 28 28 75 6e 73 | 69 67 6e 65 64 29 28 73 |loc((uns|igned)(s|
|00005b50| 74 72 6c 65 6e 28 73 29 | 2b 31 29 29 3b 0a 0a 20 |trlen(s)|+1));.. |
|00005b60| 20 20 20 69 66 20 28 70 | 29 0a 09 28 76 6f 69 64 | if (p|)..(void|
|00005b70| 29 20 73 74 72 63 70 79 | 28 70 2c 73 29 3b 0a 20 |) strcpy|(p,s);. |
|00005b80| 20 20 20 65 6c 73 65 0a | 09 7b 0a 09 28 76 6f 69 | else.|.{..(voi|
|00005b90| 64 29 20 66 70 72 69 6e | 74 66 20 28 73 74 64 65 |d) fprin|tf (stde|
|00005ba0| 72 72 2c 20 22 25 73 3a | 20 6d 61 6c 6c 6f 63 28 |rr, "%s:| malloc(|
|00005bb0| 29 20 66 61 69 6c 65 64 | 21 5c 6e 22 2c 20 70 72 |) failed|!\n", pr|
|00005bc0| 6f 67 6e 61 6d 65 29 3b | 0a 09 65 78 69 74 28 31 |ogname);|..exit(1|
|00005bd0| 29 3b 0a 09 7d 0a 20 20 | 20 20 72 65 74 75 72 6e |);..}. | return|
|00005be0| 20 70 3b 0a 7d 0a 0a 2f | 2a 20 72 65 74 75 72 6e | p;.}../|* return|
|00005bf0| 20 61 20 76 69 73 69 62 | 6c 65 20 72 65 70 72 65 | a visib|le repre|
|00005c00| 73 65 6e 74 61 74 69 6f | 6e 20 6f 66 20 61 20 63 |sentatio|n of a c|
|00005c10| 68 61 72 61 63 74 65 72 | 20 2a 2f 0a 63 68 61 72 |haracter| */.char|
|00005c20| 20 2a 76 69 73 69 62 6c | 65 28 63 29 0a 69 6e 74 | *visibl|e(c).int|
|00005c30| 20 63 3b 0a 7b 0a 20 20 | 20 20 73 74 61 74 69 63 | c;.{. | static|
|00005c40| 20 63 68 61 72 20 62 75 | 66 5b 35 5d 3b 0a 0a 20 | char bu|f[5];.. |
|00005c50| 20 20 20 63 20 26 3d 20 | 30 33 37 37 3b 0a 20 20 | c &= |0377;. |
|00005c60| 20 20 69 66 20 28 69 73 | 70 72 69 6e 74 28 63 29 | if (is|print(c)|
|00005c70| 29 0a 09 7b 0a 09 62 75 | 66 5b 30 5d 20 3d 20 63 |)..{..bu|f[0] = c|
|00005c80| 3b 0a 09 62 75 66 5b 31 | 5d 20 3d 20 27 5c 30 27 |;..buf[1|] = '\0'|
|00005c90| 3b 0a 09 7d 0a 20 20 20 | 20 65 6c 73 65 0a 09 28 |;..}. | else..(|
|00005ca0| 76 6f 69 64 29 20 73 70 | 72 69 6e 74 66 28 62 75 |void) sp|rintf(bu|
|00005cb0| 66 2c 22 5c 5c 25 30 33 | 6f 22 2c 63 29 3b 0a 20 |f,"\\%03|o",c);. |
|00005cc0| 20 20 20 72 65 74 75 72 | 6e 20 62 75 66 3b 0a 7d | retur|n buf;.}|
|00005cd0| 0a 0a 23 69 66 64 65 66 | 20 4e 4f 54 4d 50 46 49 |..#ifdef| NOTMPFI|
|00005ce0| 4c 45 0a 2f 2a 20 70 72 | 6f 76 69 64 65 20 61 20 |LE./* pr|ovide a |
|00005cf0| 63 6f 6e 73 65 72 76 61 | 74 69 76 65 20 76 65 72 |conserva|tive ver|
|00005d00| 73 69 6f 6e 20 6f 66 20 | 74 6d 70 66 69 6c 65 28 |sion of |tmpfile(|
|00005d10| 29 20 2a 2f 0a 2f 2a 20 | 66 6f 72 20 74 68 6f 73 |) */./* |for thos|
|00005d20| 65 20 73 79 73 74 65 6d | 73 20 77 69 74 68 6f 75 |e system|s withou|
|00005d30| 74 20 69 74 2e 20 2a 2f | 0a 2f 2a 20 74 6d 70 66 |t it. */|./* tmpf|
|00005d40| 69 6c 65 28 29 20 72 65 | 74 75 72 6e 73 20 61 20 |ile() re|turns a |
|00005d50| 46 49 4c 45 2a 20 6f 66 | 20 61 20 66 69 6c 65 20 |FILE* of| a file |
|00005d60| 6f 70 65 6e 65 64 20 2a | 2f 0a 2f 2a 20 66 6f 72 |opened *|/./* for|
|00005d70| 20 72 65 61 64 26 77 72 | 69 74 65 2e 20 49 74 20 | read&wr|ite. It |
|00005d80| 69 73 20 73 75 70 70 6f | 73 65 64 20 74 6f 20 62 |is suppo|sed to b|
|00005d90| 65 20 2a 2f 0a 2f 2a 20 | 61 75 74 6f 6d 61 74 69 |e */./* |automati|
|00005da0| 63 61 6c 6c 79 20 72 65 | 6d 6f 76 65 64 20 77 68 |cally re|moved wh|
|00005db0| 65 6e 20 69 74 20 67 65 | 74 73 20 63 6c 6f 73 65 |en it ge|ts close|
|00005dc0| 64 2c 20 2a 2f 0a 2f 2a | 20 62 75 74 20 68 65 72 |d, */./*| but her|
|00005dd0| 65 20 77 65 20 70 72 6f | 76 69 64 65 20 61 20 73 |e we pro|vide a s|
|00005de0| 65 70 61 72 61 74 65 20 | 72 6d 74 6d 70 66 69 6c |eparate |rmtmpfil|
|00005df0| 65 28 29 20 2a 2f 0a 2f | 2a 20 66 75 6e 63 74 69 |e() */./|* functi|
|00005e00| 6f 6e 20 74 6f 20 70 65 | 72 66 6f 72 6d 20 74 68 |on to pe|rform th|
|00005e10| 61 74 20 66 75 6e 63 74 | 69 6f 6e 2e 20 2a 2f 0a |at funct|ion. */.|
|00005e20| 2f 2a 20 41 6c 73 6f 20 | 70 72 6f 76 69 64 65 20 |/* Also |provide |
|00005e30| 73 65 76 65 72 61 6c 20 | 70 6f 73 73 69 62 6c 65 |several |possible|
|00005e40| 20 66 69 6c 65 20 6e 61 | 6d 65 73 20 74 6f 20 2a | file na|mes to *|
|00005e50| 2f 0a 2f 2a 20 74 72 79 | 20 66 6f 72 20 6f 70 65 |/./* try| for ope|
|00005e60| 6e 69 6e 67 2e 20 2a 2f | 0a 73 74 61 74 69 63 20 |ning. */|.static |
|00005e70| 63 68 61 72 20 2a 66 69 | 6c 65 34 74 6d 70 66 69 |char *fi|le4tmpfi|
|00005e80| 6c 65 20 3d 20 30 3b 0a | 0a 46 49 4c 45 20 2a 74 |le = 0;.|.FILE *t|
|00005e90| 6d 70 66 69 6c 65 28 29 | 0a 7b 0a 20 20 20 20 73 |mpfile()|.{. s|
|00005ea0| 74 61 74 69 63 20 63 68 | 61 72 20 2a 6c 69 73 74 |tatic ch|ar *list|
|00005eb0| 74 6d 70 66 69 6c 65 73 | 5b 5d 20 3d 0a 09 7b 0a |tmpfiles|[] =..{.|
|00005ec0| 09 22 2f 75 73 72 2f 74 | 6d 70 2f 63 64 65 63 6c |."/usr/t|mp/cdecl|
|00005ed0| 58 58 58 58 58 58 22 2c | 0a 09 22 2f 74 6d 70 2f |XXXXXX",|.."/tmp/|
|00005ee0| 63 64 65 63 6c 58 58 58 | 58 58 58 22 2c 0a 09 22 |cdeclXXX|XXX",.."|
|00005ef0| 2f 63 64 65 63 6c 58 58 | 58 58 58 58 22 2c 0a 09 |/cdeclXX|XXXX",..|
|00005f00| 22 63 64 65 63 6c 58 58 | 58 58 58 58 22 2c 0a 09 |"cdeclXX|XXXX",..|
|00005f10| 30 0a 09 7d 3b 0a 0a 20 | 20 20 20 63 68 61 72 20 |0..};.. | char |
|00005f20| 2a 2a 6c 69 73 74 70 20 | 3d 20 6c 69 73 74 74 6d |**listp |= listtm|
|00005f30| 70 66 69 6c 65 73 3b 0a | 20 20 20 20 66 6f 72 20 |pfiles;.| for |
|00005f40| 28 20 3b 20 2a 6c 69 73 | 74 70 3b 20 6c 69 73 74 |( ; *lis|tp; list|
|00005f50| 70 2b 2b 29 0a 09 7b 0a | 09 46 49 4c 45 20 2a 72 |p++)..{.|.FILE *r|
|00005f60| 65 74 66 70 3b 0a 09 28 | 76 6f 69 64 29 20 6d 6b |etfp;..(|void) mk|
|00005f70| 74 65 6d 70 28 2a 6c 69 | 73 74 70 29 3b 0a 09 72 |temp(*li|stp);..r|
|00005f80| 65 74 66 70 20 3d 20 66 | 6f 70 65 6e 28 2a 6c 69 |etfp = f|open(*li|
|00005f90| 73 74 70 2c 20 22 77 2b | 22 29 3b 0a 09 69 66 20 |stp, "w+|");..if |
|00005fa0| 28 21 72 65 74 66 70 29 | 0a 09 20 20 20 20 63 6f |(!retfp)|.. co|
|00005fb0| 6e 74 69 6e 75 65 3b 0a | 09 66 69 6c 65 34 74 6d |ntinue;.|.file4tm|
|00005fc0| 70 66 69 6c 65 20 3d 20 | 2a 6c 69 73 74 70 3b 0a |pfile = |*listp;.|
|00005fd0| 09 72 65 74 75 72 6e 20 | 72 65 74 66 70 3b 0a 09 |.return |retfp;..|
|00005fe0| 7d 0a 0a 20 20 20 20 72 | 65 74 75 72 6e 20 30 3b |}.. r|eturn 0;|
|00005ff0| 0a 7d 0a 0a 76 6f 69 64 | 20 72 6d 74 6d 70 66 69 |.}..void| rmtmpfi|
|00006000| 6c 65 28 29 0a 7b 0a 20 | 20 20 20 69 66 20 28 66 |le().{. | if (f|
|00006010| 69 6c 65 34 74 6d 70 66 | 69 6c 65 29 0a 09 28 76 |ile4tmpf|ile)..(v|
|00006020| 6f 69 64 29 20 75 6e 6c | 69 6e 6b 28 66 69 6c 65 |oid) unl|ink(file|
|00006030| 34 74 6d 70 66 69 6c 65 | 29 3b 0a 7d 0a 23 65 6c |4tmpfile|);.}.#el|
|00006040| 73 65 0a 2f 2a 20 70 72 | 6f 76 69 64 65 20 61 20 |se./* pr|ovide a |
|00006050| 6d 6f 63 6b 20 72 6d 74 | 6d 70 66 69 6c 65 28 29 |mock rmt|mpfile()|
|00006060| 20 66 6f 72 20 6e 6f 72 | 6d 61 6c 20 73 79 73 74 | for nor|mal syst|
|00006070| 65 6d 73 20 2a 2f 0a 23 | 20 64 65 66 69 6e 65 20 |ems */.#| define |
|00006080| 72 6d 74 6d 70 66 69 6c | 65 28 29 09 2f 2a 20 6e |rmtmpfil|e()./* n|
|00006090| 6f 74 68 69 6e 67 20 2a | 2f 0a 23 65 6e 64 69 66 |othing *|/.#endif|
|000060a0| 20 2f 2a 20 4e 4f 54 4d | 50 46 49 4c 45 20 2a 2f | /* NOTM|PFILE */|
|000060b0| 0a 0a 23 69 66 6e 64 65 | 66 20 4e 4f 47 45 54 4f |..#ifnde|f NOGETO|
|000060c0| 50 54 0a 65 78 74 65 72 | 6e 20 69 6e 74 20 6f 70 |PT.exter|n int op|
|000060d0| 74 69 6e 64 3b 0a 23 65 | 6c 73 65 0a 2f 2a 20 54 |tind;.#e|lse./* T|
|000060e0| 68 69 73 20 69 73 20 61 | 20 6d 69 6e 69 61 74 75 |his is a| miniatu|
|000060f0| 72 65 20 76 65 72 73 69 | 6f 6e 20 6f 66 20 67 65 |re versi|on of ge|
|00006100| 74 6f 70 74 28 29 20 77 | 68 69 63 68 20 77 69 6c |topt() w|hich wil|
|00006110| 6c 20 2a 2f 0a 2f 2a 20 | 64 6f 20 6a 75 73 74 20 |l */./* |do just |
|00006120| 62 61 72 65 6c 79 20 65 | 6e 6f 75 67 68 20 66 6f |barely e|nough fo|
|00006130| 72 20 75 73 20 74 6f 20 | 67 65 74 20 62 79 20 62 |r us to |get by b|
|00006140| 65 6c 6f 77 2e 20 2a 2f | 0a 2f 2a 20 4f 70 74 69 |elow. */|./* Opti|
|00006150| 6f 6e 73 20 61 72 65 20 | 6e 6f 74 20 61 6c 6c 6f |ons are |not allo|
|00006160| 77 65 64 20 74 6f 20 62 | 65 20 62 75 6e 63 68 65 |wed to b|e bunche|
|00006170| 64 20 75 70 20 74 6f 67 | 65 74 68 65 72 2e 20 2a |d up tog|ether. *|
|00006180| 2f 0a 2f 2a 20 4f 70 74 | 69 6f 6e 20 61 72 67 75 |/./* Opt|ion argu|
|00006190| 6d 65 6e 74 73 20 61 72 | 65 20 6e 6f 74 20 73 75 |ments ar|e not su|
|000061a0| 70 70 6f 72 74 65 64 2e | 20 2a 2f 0a 69 6e 74 20 |pported.| */.int |
|000061b0| 6f 70 74 69 6e 64 20 3d | 20 31 3b 0a 0a 69 6e 74 |optind =| 1;..int|
|000061c0| 20 67 65 74 6f 70 74 28 | 61 72 67 63 2c 61 72 67 | getopt(|argc,arg|
|000061d0| 76 2c 6f 70 74 73 74 72 | 69 6e 67 29 0a 63 68 61 |v,optstr|ing).cha|
|000061e0| 72 20 2a 2a 61 72 67 76 | 3b 0a 63 68 61 72 20 2a |r **argv|;.char *|
|000061f0| 6f 70 74 73 74 72 69 6e | 67 3b 0a 7b 0a 20 20 20 |optstrin|g;.{. |
|00006200| 20 69 6e 74 20 72 65 74 | 3b 0a 20 20 20 20 63 68 | int ret|;. ch|
|00006210| 61 72 20 2a 70 3b 0a 0a | 20 20 20 20 69 66 20 28 |ar *p;..| if (|
|00006220| 28 61 72 67 76 5b 6f 70 | 74 69 6e 64 5d 5b 30 5d |(argv[op|tind][0]|
|00006230| 20 21 3d 20 27 2d 27 29 | 0a 23 69 66 64 65 66 20 | != '-')|.#ifdef |
|00006240| 44 4f 53 0a 09 26 26 20 | 28 61 72 67 76 5b 6f 70 |DOS..&& |(argv[op|
|00006250| 74 69 6e 64 5d 5b 30 5d | 20 21 3d 20 27 2f 27 29 |tind][0]| != '/')|
|00006260| 0a 23 65 6e 64 69 66 20 | 2f 2a 20 44 4f 53 20 2a |.#endif |/* DOS *|
|00006270| 2f 0a 09 29 0a 09 72 65 | 74 75 72 6e 20 45 4f 46 |/..)..re|turn EOF|
|00006280| 3b 0a 0a 20 20 20 20 72 | 65 74 20 3d 20 61 72 67 |;.. r|et = arg|
|00006290| 76 5b 6f 70 74 69 6e 64 | 5d 5b 31 5d 3b 0a 20 20 |v[optind|][1];. |
|000062a0| 20 20 6f 70 74 69 6e 64 | 2b 2b 3b 0a 0a 20 20 20 | optind|++;.. |
|000062b0| 20 66 6f 72 20 28 70 20 | 3d 20 6f 70 74 73 74 72 | for (p |= optstr|
|000062c0| 69 6e 67 3b 20 2a 70 3b | 20 70 2b 2b 29 0a 09 69 |ing; *p;| p++)..i|
|000062d0| 66 20 28 2a 70 20 3d 3d | 20 72 65 74 29 0a 09 20 |f (*p ==| ret).. |
|000062e0| 20 20 20 72 65 74 75 72 | 6e 20 72 65 74 3b 0a 0a | retur|n ret;..|
|000062f0| 20 20 20 20 28 76 6f 69 | 64 29 20 66 70 72 69 6e | (voi|d) fprin|
|00006300| 74 66 20 28 73 74 64 65 | 72 72 2c 20 22 25 73 3a |tf (stde|rr, "%s:|
|00006310| 20 69 6c 6c 65 67 61 6c | 20 6f 70 74 69 6f 6e 20 | illegal| option |
|00006320| 2d 2d 20 25 73 5c 6e 22 | 2c 0a 09 70 72 6f 67 6e |-- %s\n"|,..progn|
|00006330| 61 6d 65 2c 20 76 69 73 | 69 62 6c 65 28 72 65 74 |ame, vis|ible(ret|
|00006340| 29 29 3b 0a 0a 20 20 20 | 20 72 65 74 75 72 6e 20 |));.. | return |
|00006350| 27 3f 27 3b 0a 7d 0a 23 | 65 6e 64 69 66 0a 0c 0a |'?';.}.#|endif...|
|00006360| 2f 2a 20 74 68 65 20 68 | 65 6c 70 20 6d 65 73 73 |/* the h|elp mess|
|00006370| 61 67 65 73 20 2a 2f 0a | 73 74 72 75 63 74 20 68 |ages */.|struct h|
|00006380| 65 6c 70 73 74 72 75 63 | 74 0a 20 20 20 20 7b 0a |elpstruc|t. {.|
|00006390| 09 63 68 61 72 20 2a 74 | 65 78 74 3b 09 2f 2a 20 |.char *t|ext;./* |
|000063a0| 67 65 6e 65 72 69 63 20 | 74 65 78 74 20 2a 2f 0a |generic |text */.|
|000063b0| 09 63 68 61 72 20 2a 63 | 70 70 74 65 78 74 3b 09 |.char *c|pptext;.|
|000063c0| 2f 2a 20 43 2b 2b 20 73 | 70 65 63 69 66 69 63 20 |/* C++ s|pecific |
|000063d0| 74 65 78 74 20 2a 2f 0a | 20 20 20 20 7d 20 68 65 |text */.| } he|
|000063e0| 6c 70 74 65 78 74 5b 5d | 20 3d 0a 20 20 20 20 7b |lptext[]| =. {|
|000063f0| 09 2f 2a 20 75 70 2d 74 | 6f 20 32 33 20 6c 69 6e |./* up-t|o 23 lin|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.