home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume29 / cproto / part01 next >
SHell self-extracting ARchive  |  1992-04-06  |  54.4 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: SHell self-extracting ARchive (archive/shar).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert SHell self-extracting ARchive (archive/shar) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file ASCII text default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/329 Shell Archive Format default
100% detectItEasy Format: plain text[LF] default (weak)



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 4e 65 77 73 67 72 6f 75 | 70 73 3a 20 63 6f 6d 70 |Newsgrou|ps: comp|
|00000010| 2e 73 6f 75 72 63 65 73 | 2e 6d 69 73 63 0a 46 72 |.sources|.misc.Fr|
|00000020| 6f 6d 3a 20 63 74 68 75 | 61 6e 67 40 7a 65 72 6f |om: cthu|ang@zero|
|00000030| 73 61 6e 2e 75 75 63 70 | 20 28 43 68 69 6e 20 48 |san.uucp| (Chin H|
|00000040| 75 61 6e 67 29 0a 53 75 | 62 6a 65 63 74 3a 20 20 |uang).Su|bject: |
|00000050| 76 32 39 69 30 36 31 3a | 20 20 63 70 72 6f 74 6f |v29i061:| cproto|
|00000060| 20 2d 20 67 65 6e 65 72 | 61 74 65 20 43 20 66 75 | - gener|ate C fu|
|00000070| 6e 63 74 69 6f 6e 20 70 | 72 6f 74 6f 74 79 70 65 |nction p|rototype|
|00000080| 73 20 76 33 50 4c 32 2c | 20 50 61 72 74 30 31 2f |s v3PL2,| Part01/|
|00000090| 30 32 0a 4d 65 73 73 61 | 67 65 2d 49 44 3a 20 3c |02.Messa|ge-ID: <|
|000000a0| 63 73 6d 2d 76 32 39 69 | 30 36 31 3d 63 70 72 6f |csm-v29i|061=cpro|
|000000b0| 74 6f 2e 32 32 32 32 34 | 32 40 73 70 61 72 6b 79 |to.22224|2@sparky|
|000000c0| 2e 49 4d 44 2e 53 74 65 | 72 6c 69 6e 67 2e 43 4f |.IMD.Ste|rling.CO|
|000000d0| 4d 3e 0a 58 2d 4d 64 34 | 2d 53 69 67 6e 61 74 75 |M>.X-Md4|-Signatu|
|000000e0| 72 65 3a 20 65 32 64 31 | 35 66 62 34 32 37 64 34 |re: e2d1|5fb427d4|
|000000f0| 32 66 62 39 65 61 65 33 | 66 30 36 66 61 39 36 66 |2fb9eae3|f06fa96f|
|00000100| 36 31 39 39 0a 44 61 74 | 65 3a 20 53 75 6e 2c 20 |6199.Dat|e: Sun, |
|00000110| 35 20 41 70 72 20 31 39 | 39 32 20 30 34 3a 32 33 |5 Apr 19|92 04:23|
|00000120| 3a 34 38 20 47 4d 54 0a | 41 70 70 72 6f 76 65 64 |:48 GMT.|Approved|
|00000130| 3a 20 6b 65 6e 74 40 73 | 70 61 72 6b 79 2e 69 6d |: kent@s|parky.im|
|00000140| 64 2e 73 74 65 72 6c 69 | 6e 67 2e 63 6f 6d 0a 0a |d.sterli|ng.com..|
|00000150| 53 75 62 6d 69 74 74 65 | 64 2d 62 79 3a 20 63 74 |Submitte|d-by: ct|
|00000160| 68 75 61 6e 67 40 7a 65 | 72 6f 73 61 6e 2e 75 75 |huang@ze|rosan.uu|
|00000170| 63 70 20 28 43 68 69 6e | 20 48 75 61 6e 67 29 0a |cp (Chin| Huang).|
|00000180| 50 6f 73 74 69 6e 67 2d | 6e 75 6d 62 65 72 3a 20 |Posting-|number: |
|00000190| 56 6f 6c 75 6d 65 20 32 | 39 2c 20 49 73 73 75 65 |Volume 2|9, Issue|
|000001a0| 20 36 31 0a 41 72 63 68 | 69 76 65 2d 6e 61 6d 65 | 61.Arch|ive-name|
|000001b0| 3a 20 63 70 72 6f 74 6f | 2f 70 61 72 74 30 31 0a |: cproto|/part01.|
|000001c0| 45 6e 76 69 72 6f 6e 6d | 65 6e 74 3a 20 55 4e 49 |Environm|ent: UNI|
|000001d0| 58 2c 20 4d 53 2d 44 4f | 53 2c 20 67 65 74 6f 70 |X, MS-DO|S, getop|
|000001e0| 74 2c 20 6c 65 78 2c 20 | 79 61 63 63 0a 53 75 70 |t, lex, |yacc.Sup|
|000001f0| 65 72 73 65 64 65 73 3a | 20 63 70 72 6f 74 6f 3a |ersedes:| cproto:|
|00000200| 20 56 6f 6c 75 6d 65 20 | 32 38 2c 20 49 73 73 75 | Volume |28, Issu|
|00000210| 65 20 31 30 30 2d 31 30 | 31 0a 0a 54 68 69 73 20 |e 100-10|1..This |
|00000220| 69 73 20 76 65 72 73 69 | 6f 6e 20 33 20 70 61 74 |is versi|on 3 pat|
|00000230| 63 68 6c 65 76 65 6c 20 | 32 20 6f 66 20 63 70 72 |chlevel |2 of cpr|
|00000240| 6f 74 6f 2c 20 61 20 70 | 72 6f 67 72 61 6d 20 74 |oto, a p|rogram t|
|00000250| 68 61 74 20 67 65 6e 65 | 72 61 74 65 73 0a 66 75 |hat gene|rates.fu|
|00000260| 6e 63 74 69 6f 6e 20 70 | 72 6f 74 6f 74 79 70 65 |nction p|rototype|
|00000270| 73 20 61 6e 64 20 63 6f | 6e 76 65 72 74 73 20 66 |s and co|nverts f|
|00000280| 75 6e 63 74 69 6f 6e 20 | 64 65 66 69 6e 69 74 69 |unction |definiti|
|00000290| 6f 6e 73 20 62 65 74 77 | 65 65 6e 20 74 68 65 20 |ons betw|een the |
|000002a0| 6f 6c 64 0a 73 74 79 6c | 65 20 61 6e 64 20 74 68 |old.styl|e and th|
|000002b0| 65 20 41 4e 53 49 20 43 | 20 73 74 79 6c 65 2e 20 |e ANSI C| style. |
|000002c0| 20 54 68 65 20 63 6f 6e | 76 65 72 73 69 6f 6e 20 | The con|version |
|000002d0| 6f 76 65 72 77 72 69 74 | 65 73 20 74 68 65 20 6f |overwrit|es the o|
|000002e0| 72 69 67 69 6e 61 6c 0a | 66 69 6c 65 73 2c 20 73 |riginal.|files, s|
|000002f0| 6f 20 6d 61 6b 65 20 61 | 20 62 61 63 6b 75 70 20 |o make a| backup |
|00000300| 63 6f 70 79 20 6f 66 20 | 79 6f 75 72 20 66 69 6c |copy of |your fil|
|00000310| 65 73 20 69 6e 20 63 61 | 73 65 20 73 6f 6d 65 74 |es in ca|se somet|
|00000320| 68 69 6e 67 20 67 6f 65 | 73 20 77 72 6f 6e 67 2e |hing goe|s wrong.|
|00000330| 0a 0a 54 68 69 73 20 72 | 65 6c 65 61 73 65 20 69 |..This r|elease i|
|00000340| 6e 63 6c 75 64 65 73 20 | 74 68 65 20 66 6f 6c 6c |ncludes |the foll|
|00000350| 6f 77 69 6e 67 20 63 68 | 61 6e 67 65 73 3a 0a 0a |owing ch|anges:..|
|00000360| 2d 20 46 69 78 3a 20 54 | 68 65 20 66 75 6e 63 74 |- Fix: T|he funct|
|00000370| 69 6f 6e 20 64 65 66 69 | 6e 69 74 69 6f 6e 20 63 |ion defi|nition c|
|00000380| 6f 6e 76 65 72 73 69 6f | 6e 20 6d 61 79 20 70 72 |onversio|n may pr|
|00000390| 6f 64 75 63 65 20 61 20 | 6d 61 6e 67 6c 65 64 20 |oduce a |mangled |
|000003a0| 66 75 6e 63 74 69 6f 6e | 0a 20 20 64 65 66 69 6e |function|. defin|
|000003b0| 69 74 69 6f 6e 20 69 66 | 20 61 6e 20 23 69 6e 63 |ition if| an #inc|
|000003c0| 6c 75 64 65 20 64 69 72 | 65 63 74 69 76 65 20 61 |lude dir|ective a|
|000003d0| 70 70 65 61 72 73 20 62 | 65 66 6f 72 65 20 74 68 |ppears b|efore th|
|000003e0| 65 20 66 75 6e 63 74 69 | 6f 6e 20 61 6e 64 0a 20 |e functi|on and. |
|000003f0| 20 6e 6f 20 63 6f 6d 6d | 65 6e 74 73 20 61 70 70 | no comm|ents app|
|00000400| 65 61 72 20 62 65 74 77 | 65 65 6e 20 74 68 65 20 |ear betw|een the |
|00000410| 64 69 72 65 63 74 69 76 | 65 20 61 6e 64 20 74 68 |directiv|e and th|
|00000420| 65 20 66 75 6e 63 74 69 | 6f 6e 2e 0a 2d 20 46 69 |e functi|on..- Fi|
|00000430| 78 3a 20 54 68 65 20 73 | 69 7a 65 20 6f 66 20 74 |x: The s|ize of t|
|00000440| 68 65 20 62 75 66 66 65 | 72 20 61 6c 6c 6f 63 61 |he buffe|r alloca|
|00000450| 74 65 64 20 66 6f 72 20 | 74 68 65 20 43 20 70 72 |ted for |the C pr|
|00000460| 65 70 72 6f 63 65 73 73 | 6f 72 20 63 6f 6d 6d 61 |eprocess|or comma|
|00000470| 6e 64 0a 20 20 73 74 72 | 69 6e 67 20 64 69 64 20 |nd. str|ing did |
|00000480| 6e 6f 74 20 69 6e 63 6c | 75 64 65 20 65 6e 6f 75 |not incl|ude enou|
|00000490| 67 68 20 73 70 61 63 65 | 20 66 6f 72 20 6f 70 74 |gh space| for opt|
|000004a0| 69 6f 6e 73 20 73 65 74 | 20 69 6e 20 74 68 65 20 |ions set| in the |
|000004b0| 65 6e 76 69 72 6f 6e 6d | 65 6e 74 0a 20 20 76 61 |environm|ent. va|
|000004c0| 72 69 61 62 6c 65 20 43 | 50 52 4f 54 4f 2e 0a 2d |riable C|PROTO..-|
|000004d0| 20 52 65 70 6c 61 63 65 | 64 20 74 68 65 20 2d 6e | Replace|d the -n|
|000004e0| 20 6f 70 74 69 6f 6e 20 | 77 69 74 68 20 2d 63 20 | option |with -c |
|000004f0| 77 68 69 63 68 20 64 69 | 73 61 62 6c 65 73 20 61 |which di|sables a|
|00000500| 6c 6c 20 63 6f 6d 6d 65 | 6e 74 73 20 69 6e 20 74 |ll comme|nts in t|
|00000510| 68 65 0a 20 20 67 65 6e | 65 72 61 74 65 64 20 70 |he. gen|erated p|
|00000520| 72 6f 74 6f 74 79 70 65 | 73 2e 0a 2d 20 52 65 70 |rototype|s..- Rep|
|00000530| 6c 61 63 65 64 20 74 68 | 65 20 65 6e 75 6d 27 73 |laced th|e enum's|
|00000540| 20 77 69 74 68 20 23 64 | 65 66 69 6e 65 20 63 6f | with #d|efine co|
|00000550| 6e 73 74 61 6e 74 73 20 | 74 6f 20 61 63 63 6f 6d |nstants |to accom|
|00000560| 6d 6f 64 61 74 65 20 43 | 20 63 6f 6d 70 69 6c 65 |modate C| compile|
|00000570| 72 73 0a 20 20 74 68 61 | 74 20 64 6f 6e 27 74 20 |rs. tha|t don't |
|00000580| 6c 69 6b 65 20 65 6e 75 | 6d 65 72 61 74 6f 72 73 |like enu|merators|
|00000590| 20 69 6e 20 63 6f 6e 73 | 74 61 6e 74 20 65 78 70 | in cons|tant exp|
|000005a0| 72 65 73 73 69 6f 6e 73 | 2e 0a 0a 54 68 61 6e 6b |ressions|...Thank|
|000005b0| 73 20 74 6f 20 74 68 65 | 20 66 6f 6c 6c 6f 77 69 |s to the| followi|
|000005c0| 6e 67 20 70 65 6f 70 6c | 65 20 66 6f 72 20 74 68 |ng peopl|e for th|
|000005d0| 65 69 72 20 73 75 67 67 | 65 73 74 69 6f 6e 73 20 |eir sugg|estions |
|000005e0| 61 6e 64 20 62 75 67 20 | 72 65 70 6f 72 74 73 3a |and bug |reports:|
|000005f0| 0a 0a 73 77 65 65 74 40 | 68 6f 72 69 7a 6f 6e 2e |..sweet@|horizon.|
|00000600| 63 6f 6d 20 28 4b 65 76 | 69 6e 20 53 77 65 65 74 |com (Kev|in Sweet|
|00000610| 29 0a 6b 75 72 74 40 67 | 72 6f 67 61 74 63 68 2e |).kurt@g|rogatch.|
|00000620| 63 65 6c 65 73 74 69 61 | 6c 2e 63 6f 6d 20 28 4b |celestia|l.com (K|
|00000630| 75 72 74 20 43 6f 63 6b | 72 75 6d 29 0a 6a 61 6d |urt Cock|rum).jam|
|00000640| 65 73 68 6f 40 67 61 67 | 6d 65 2e 63 68 69 2e 69 |esho@gag|me.chi.i|
|00000650| 6c 2e 75 73 20 28 4a 61 | 6d 65 73 20 48 6f 29 0a |l.us (Ja|mes Ho).|
|00000660| 72 65 67 65 72 40 6d 61 | 67 65 6c 6c 61 6e 2e 70 |reger@ma|gellan.p|
|00000670| 68 79 73 69 6b 2e 75 6e | 69 2d 6d 61 69 6e 7a 2e |hysik.un|i-mainz.|
|00000680| 64 65 20 28 4a 6f 73 65 | 70 68 20 44 2e 20 52 65 |de (Jose|ph D. Re|
|00000690| 67 65 72 29 0a 0a 23 21 | 20 2f 62 69 6e 2f 73 68 |ger)..#!| /bin/sh|
|000006a0| 0a 23 20 54 68 69 73 20 | 69 73 20 61 20 73 68 65 |.# This |is a she|
|000006b0| 6c 6c 20 61 72 63 68 69 | 76 65 2e 20 20 52 65 6d |ll archi|ve. Rem|
|000006c0| 6f 76 65 20 61 6e 79 74 | 68 69 6e 67 20 62 65 66 |ove anyt|hing bef|
|000006d0| 6f 72 65 20 74 68 69 73 | 20 6c 69 6e 65 2c 20 74 |ore this| line, t|
|000006e0| 68 65 6e 20 75 6e 70 61 | 63 6b 0a 23 20 69 74 20 |hen unpa|ck.# it |
|000006f0| 62 79 20 73 61 76 69 6e | 67 20 69 74 20 69 6e 74 |by savin|g it int|
|00000700| 6f 20 61 20 66 69 6c 65 | 20 61 6e 64 20 74 79 70 |o a file| and typ|
|00000710| 69 6e 67 20 22 73 68 20 | 66 69 6c 65 22 2e 20 20 |ing "sh |file". |
|00000720| 54 6f 20 6f 76 65 72 77 | 72 69 74 65 20 65 78 69 |To overw|rite exi|
|00000730| 73 74 69 6e 67 0a 23 20 | 66 69 6c 65 73 2c 20 74 |sting.# |files, t|
|00000740| 79 70 65 20 22 73 68 20 | 66 69 6c 65 20 2d 63 22 |ype "sh |file -c"|
|00000750| 2e 20 20 59 6f 75 20 63 | 61 6e 20 61 6c 73 6f 20 |. You c|an also |
|00000760| 66 65 65 64 20 74 68 69 | 73 20 61 73 20 73 74 61 |feed thi|s as sta|
|00000770| 6e 64 61 72 64 20 69 6e | 70 75 74 20 76 69 61 0a |ndard in|put via.|
|00000780| 23 20 75 6e 73 68 61 72 | 2c 20 6f 72 20 62 79 20 |# unshar|, or by |
|00000790| 74 79 70 69 6e 67 20 22 | 73 68 20 3c 66 69 6c 65 |typing "|sh <file|
|000007a0| 22 2c 20 65 2e 67 2e 2e | 20 20 49 66 20 74 68 69 |", e.g..| If thi|
|000007b0| 73 20 61 72 63 68 69 76 | 65 20 69 73 20 63 6f 6d |s archiv|e is com|
|000007c0| 70 6c 65 74 65 2c 20 79 | 6f 75 0a 23 20 77 69 6c |plete, y|ou.# wil|
|000007d0| 6c 20 73 65 65 20 74 68 | 65 20 66 6f 6c 6c 6f 77 |l see th|e follow|
|000007e0| 69 6e 67 20 6d 65 73 73 | 61 67 65 20 61 74 20 74 |ing mess|age at t|
|000007f0| 68 65 20 65 6e 64 3a 0a | 23 09 09 22 45 6e 64 20 |he end:.|#.."End |
|00000800| 6f 66 20 73 68 65 6c 6c | 20 61 72 63 68 69 76 65 |of shell| archive|
|00000810| 2e 22 0a 23 20 43 6f 6e | 74 65 6e 74 73 3a 20 20 |.".# Con|tents: |
|00000820| 52 45 41 44 4d 45 20 43 | 48 41 4e 47 45 53 20 63 |README C|HANGES c|
|00000830| 70 72 6f 74 6f 2e 6d 61 | 6e 20 63 70 72 6f 74 6f |proto.ma|n cproto|
|00000840| 2e 31 20 4d 61 6b 65 66 | 69 6c 65 2e 62 63 0a 23 |.1 Makef|ile.bc.#|
|00000850| 20 20 20 4d 61 6b 65 66 | 69 6c 65 2e 6d 73 63 20 | Makef|ile.msc |
|00000860| 4d 61 6b 65 66 69 6c 65 | 2e 75 6e 69 20 6c 65 78 |Makefile|.uni lex|
|00000870| 2e 6c 20 67 72 61 6d 6d | 61 72 2e 79 0a 23 20 57 |.l gramm|ar.y.# W|
|00000880| 72 61 70 70 65 64 20 62 | 79 20 63 74 68 75 61 6e |rapped b|y cthuan|
|00000890| 67 40 7a 65 72 6f 73 61 | 6e 2e 55 55 43 50 20 6f |g@zerosa|n.UUCP o|
|000008a0| 6e 20 53 61 74 20 41 70 | 72 20 30 34 20 31 34 3a |n Sat Ap|r 04 14:|
|000008b0| 30 37 3a 33 35 20 31 39 | 39 32 0a 50 41 54 48 3d |07:35 19|92.PATH=|
|000008c0| 2f 62 69 6e 3a 2f 75 73 | 72 2f 62 69 6e 3a 2f 75 |/bin:/us|r/bin:/u|
|000008d0| 73 72 2f 75 63 62 20 3b | 20 65 78 70 6f 72 74 20 |sr/ucb ;| export |
|000008e0| 50 41 54 48 0a 69 66 20 | 74 65 73 74 20 2d 66 20 |PATH.if |test -f |
|000008f0| 52 45 41 44 4d 45 20 2d | 61 20 22 24 7b 31 7d 22 |README -|a "${1}"|
|00000900| 20 21 3d 20 22 2d 63 22 | 20 3b 20 74 68 65 6e 20 | != "-c"| ; then |
|00000910| 0a 20 20 65 63 68 6f 20 | 73 68 61 72 3a 20 57 69 |. echo |shar: Wi|
|00000920| 6c 6c 20 6e 6f 74 20 6f | 76 65 72 2d 77 72 69 74 |ll not o|ver-writ|
|00000930| 65 20 65 78 69 73 74 69 | 6e 67 20 66 69 6c 65 20 |e existi|ng file |
|00000940| 5c 22 52 45 41 44 4d 45 | 5c 22 0a 65 6c 73 65 0a |\"README|\".else.|
|00000950| 65 63 68 6f 20 73 68 61 | 72 3a 20 45 78 74 72 61 |echo sha|r: Extra|
|00000960| 63 74 69 6e 67 20 5c 22 | 52 45 41 44 4d 45 5c 22 |cting \"|README\"|
|00000970| 20 5c 28 36 38 39 20 63 | 68 61 72 61 63 74 65 72 | \(689 c|haracter|
|00000980| 73 5c 29 0a 73 65 64 20 | 22 73 2f 5e 58 2f 2f 22 |s\).sed |"s/^X//"|
|00000990| 20 3e 52 45 41 44 4d 45 | 20 3c 3c 27 45 4e 44 5f | >README| <<'END_|
|000009a0| 4f 46 5f 52 45 41 44 4d | 45 27 0a 58 43 70 72 6f |OF_READM|E'.XCpro|
|000009b0| 74 6f 20 69 73 20 61 20 | 70 72 6f 67 72 61 6d 20 |to is a |program |
|000009c0| 74 68 61 74 20 67 65 6e | 65 72 61 74 65 73 20 66 |that gen|erates f|
|000009d0| 75 6e 63 74 69 6f 6e 20 | 70 72 6f 74 6f 74 79 70 |unction |prototyp|
|000009e0| 65 73 20 61 6e 64 20 76 | 61 72 69 61 62 6c 65 0a |es and v|ariable.|
|000009f0| 58 64 65 63 6c 61 72 61 | 74 69 6f 6e 73 20 66 72 |Xdeclara|tions fr|
|00000a00| 6f 6d 20 43 20 73 6f 75 | 72 63 65 20 63 6f 64 65 |om C sou|rce code|
|00000a10| 2e 20 20 49 74 20 63 61 | 6e 20 61 6c 73 6f 20 63 |. It ca|n also c|
|00000a20| 6f 6e 76 65 72 74 20 66 | 75 6e 63 74 69 6f 6e 0a |onvert f|unction.|
|00000a30| 58 64 65 66 69 6e 69 74 | 69 6f 6e 73 20 62 65 74 |Xdefinit|ions bet|
|00000a40| 77 65 65 6e 20 74 68 65 | 20 6f 6c 64 20 73 74 79 |ween the| old sty|
|00000a50| 6c 65 20 61 6e 64 20 74 | 68 65 20 41 4e 53 49 20 |le and t|he ANSI |
|00000a60| 43 20 73 74 79 6c 65 2e | 20 20 54 68 69 73 20 63 |C style.| This c|
|00000a70| 6f 6e 76 65 72 73 69 6f | 6e 0a 58 6f 76 65 72 77 |onversio|n.Xoverw|
|00000a80| 72 69 74 65 73 20 74 68 | 65 20 6f 72 69 67 69 6e |rites th|e origin|
|00000a90| 61 6c 20 66 69 6c 65 73 | 2c 20 73 6f 20 6d 61 6b |al files|, so mak|
|00000aa0| 65 20 61 20 62 61 63 6b | 75 70 20 63 6f 70 79 20 |e a back|up copy |
|00000ab0| 6f 66 20 79 6f 75 72 20 | 66 69 6c 65 73 20 69 6e |of your |files in|
|00000ac0| 0a 58 63 61 73 65 20 73 | 6f 6d 65 74 68 69 6e 67 |.Xcase s|omething|
|00000ad0| 20 67 6f 65 73 20 77 72 | 6f 6e 67 2e 0a 58 0a 58 | goes wr|ong..X.X|
|00000ae0| 54 68 65 20 70 72 6f 67 | 72 61 6d 20 69 73 6e 27 |The prog|ram isn'|
|00000af0| 74 20 63 6f 6e 66 75 73 | 65 64 20 62 79 20 63 6f |t confus|ed by co|
|00000b00| 6d 70 6c 65 78 20 66 75 | 6e 63 74 69 6f 6e 20 64 |mplex fu|nction d|
|00000b10| 65 66 69 6e 69 74 69 6f | 6e 73 20 61 73 20 6d 75 |efinitio|ns as mu|
|00000b20| 63 68 20 61 73 0a 58 6f | 74 68 65 72 20 70 72 6f |ch as.Xo|ther pro|
|00000b30| 74 6f 74 79 70 65 20 67 | 65 6e 65 72 61 74 6f 72 |totype g|enerator|
|00000b40| 73 20 62 65 63 61 75 73 | 65 20 69 74 20 75 73 65 |s becaus|e it use|
|00000b50| 73 20 61 20 79 61 63 63 | 20 67 65 6e 65 72 61 74 |s a yacc| generat|
|00000b60| 65 64 20 70 61 72 73 65 | 72 2e 20 20 42 79 0a 58 |ed parse|r. By.X|
|00000b70| 69 67 6e 6f 72 69 6e 67 | 20 61 6c 6c 20 74 68 65 |ignoring| all the|
|00000b80| 20 69 6e 70 75 74 20 62 | 65 74 77 65 65 6e 20 62 | input b|etween b|
|00000b90| 72 61 63 65 73 2c 20 49 | 20 61 76 6f 69 64 65 64 |races, I| avoided|
|00000ba0| 20 69 6d 70 6c 65 6d 65 | 6e 74 69 6e 67 20 74 68 | impleme|nting th|
|00000bb0| 65 20 65 6e 74 69 72 65 | 0a 58 43 20 6c 61 6e 67 |e entire|.XC lang|
|00000bc0| 75 61 67 65 20 67 72 61 | 6d 6d 61 72 2e 0a 58 0a |uage gra|mmar..X.|
|00000bd0| 58 43 70 72 6f 74 6f 20 | 69 73 20 69 6e 20 74 68 |XCproto |is in th|
|00000be0| 65 20 70 75 62 6c 69 63 | 20 64 6f 6d 61 69 6e 2e |e public| domain.|
|00000bf0| 20 20 49 66 20 79 6f 75 | 20 68 61 76 65 20 61 6e | If you| have an|
|00000c00| 79 20 63 6f 6d 6d 65 6e | 74 73 20 6f 72 20 66 69 |y commen|ts or fi|
|00000c10| 6e 64 20 61 6e 79 0a 58 | 62 75 67 73 2c 20 70 6c |nd any.X|bugs, pl|
|00000c20| 65 61 73 65 20 6c 65 74 | 20 6d 65 20 6b 6e 6f 77 |ease let| me know|
|00000c30| 2e 0a 58 0a 58 43 68 69 | 6e 20 48 75 61 6e 67 0a |..X.XChi|n Huang.|
|00000c40| 58 63 74 68 75 61 6e 67 | 40 7a 65 72 6f 73 61 6e |Xcthuang|@zerosan|
|00000c50| 2e 55 55 43 50 0a 58 63 | 68 69 6e 2e 68 75 61 6e |.UUCP.Xc|hin.huan|
|00000c60| 67 40 63 61 6e 72 65 6d | 2e 63 6f 6d 0a 45 4e 44 |g@canrem|.com.END|
|00000c70| 5f 4f 46 5f 52 45 41 44 | 4d 45 0a 69 66 20 74 65 |_OF_READ|ME.if te|
|00000c80| 73 74 20 36 38 39 20 2d | 6e 65 20 60 77 63 20 2d |st 689 -|ne `wc -|
|00000c90| 63 20 3c 52 45 41 44 4d | 45 60 3b 20 74 68 65 6e |c <READM|E`; then|
|00000ca0| 0a 20 20 20 20 65 63 68 | 6f 20 73 68 61 72 3a 20 |. ech|o shar: |
|00000cb0| 5c 22 52 45 41 44 4d 45 | 5c 22 20 75 6e 70 61 63 |\"README|\" unpac|
|00000cc0| 6b 65 64 20 77 69 74 68 | 20 77 72 6f 6e 67 20 73 |ked with| wrong s|
|00000cd0| 69 7a 65 21 0a 66 69 0a | 23 20 65 6e 64 20 6f 66 |ize!.fi.|# end of|
|00000ce0| 20 6f 76 65 72 77 72 69 | 74 69 6e 67 20 63 68 65 | overwri|ting che|
|00000cf0| 63 6b 0a 66 69 0a 69 66 | 20 74 65 73 74 20 2d 66 |ck.fi.if| test -f|
|00000d00| 20 43 48 41 4e 47 45 53 | 20 2d 61 20 22 24 7b 31 | CHANGES| -a "${1|
|00000d10| 7d 22 20 21 3d 20 22 2d | 63 22 20 3b 20 74 68 65 |}" != "-|c" ; the|
|00000d20| 6e 20 0a 20 20 65 63 68 | 6f 20 73 68 61 72 3a 20 |n . ech|o shar: |
|00000d30| 57 69 6c 6c 20 6e 6f 74 | 20 6f 76 65 72 2d 77 72 |Will not| over-wr|
|00000d40| 69 74 65 20 65 78 69 73 | 74 69 6e 67 20 66 69 6c |ite exis|ting fil|
|00000d50| 65 20 5c 22 43 48 41 4e | 47 45 53 5c 22 0a 65 6c |e \"CHAN|GES\".el|
|00000d60| 73 65 0a 65 63 68 6f 20 | 73 68 61 72 3a 20 45 78 |se.echo |shar: Ex|
|00000d70| 74 72 61 63 74 69 6e 67 | 20 5c 22 43 48 41 4e 47 |tracting| \"CHANG|
|00000d80| 45 53 5c 22 20 5c 28 34 | 32 35 32 20 63 68 61 72 |ES\" \(4|252 char|
|00000d90| 61 63 74 65 72 73 5c 29 | 0a 73 65 64 20 22 73 2f |acters\)|.sed "s/|
|00000da0| 5e 58 2f 2f 22 20 3e 43 | 48 41 4e 47 45 53 20 3c |^X//" >C|HANGES <|
|00000db0| 3c 27 45 4e 44 5f 4f 46 | 5f 43 48 41 4e 47 45 53 |<'END_OF|_CHANGES|
|00000dc0| 27 0a 58 56 65 72 73 69 | 6f 6e 20 33 0a 58 0a 58 |'.XVersi|on 3.X.X|
|00000dd0| 50 61 74 63 68 6c 65 76 | 65 6c 20 32 0a 58 0a 58 |Patchlev|el 2.X.X|
|00000de0| 2d 20 46 69 78 3a 20 54 | 68 65 20 66 75 6e 63 74 |- Fix: T|he funct|
|00000df0| 69 6f 6e 20 64 65 66 69 | 6e 69 74 69 6f 6e 20 63 |ion defi|nition c|
|00000e00| 6f 6e 76 65 72 73 69 6f | 6e 20 6d 61 79 20 70 72 |onversio|n may pr|
|00000e10| 6f 64 75 63 65 20 61 20 | 6d 61 6e 67 6c 65 64 20 |oduce a |mangled |
|00000e20| 66 75 6e 63 74 69 6f 6e | 0a 58 20 20 64 65 66 69 |function|.X defi|
|00000e30| 6e 69 74 69 6f 6e 20 69 | 66 20 61 6e 20 23 69 6e |nition i|f an #in|
|00000e40| 63 6c 75 64 65 20 64 69 | 72 65 63 74 69 76 65 20 |clude di|rective |
|00000e50| 61 70 70 65 61 72 73 20 | 62 65 66 6f 72 65 20 74 |appears |before t|
|00000e60| 68 65 20 66 75 6e 63 74 | 69 6f 6e 20 61 6e 64 0a |he funct|ion and.|
|00000e70| 58 20 20 6e 6f 20 63 6f | 6d 6d 65 6e 74 73 20 61 |X no co|mments a|
|00000e80| 70 70 65 61 72 20 62 65 | 74 77 65 65 6e 20 74 68 |ppear be|tween th|
|00000e90| 65 20 64 69 72 65 63 74 | 69 76 65 20 61 6e 64 20 |e direct|ive and |
|00000ea0| 74 68 65 20 66 75 6e 63 | 74 69 6f 6e 2e 0a 58 2d |the func|tion..X-|
|00000eb0| 20 46 69 78 3a 20 54 68 | 65 20 73 69 7a 65 20 6f | Fix: Th|e size o|
|00000ec0| 66 20 74 68 65 20 62 75 | 66 66 65 72 20 61 6c 6c |f the bu|ffer all|
|00000ed0| 6f 63 61 74 65 64 20 66 | 6f 72 20 74 68 65 20 43 |ocated f|or the C|
|00000ee0| 20 70 72 65 70 72 6f 63 | 65 73 73 6f 72 20 63 6f | preproc|essor co|
|00000ef0| 6d 6d 61 6e 64 0a 58 20 | 20 73 74 72 69 6e 67 20 |mmand.X | string |
|00000f00| 64 69 64 20 6e 6f 74 20 | 69 6e 63 6c 75 64 65 20 |did not |include |
|00000f10| 65 6e 6f 75 67 68 20 73 | 70 61 63 65 20 66 6f 72 |enough s|pace for|
|00000f20| 20 6f 70 74 69 6f 6e 73 | 20 73 65 74 20 69 6e 20 | options| set in |
|00000f30| 74 68 65 20 65 6e 76 69 | 72 6f 6e 6d 65 6e 74 0a |the envi|ronment.|
|00000f40| 58 20 20 76 61 72 69 61 | 62 6c 65 20 43 50 52 4f |X varia|ble CPRO|
|00000f50| 54 4f 2e 0a 58 2d 20 52 | 65 70 6c 61 63 65 64 20 |TO..X- R|eplaced |
|00000f60| 74 68 65 20 2d 6e 20 6f | 70 74 69 6f 6e 20 77 69 |the -n o|ption wi|
|00000f70| 74 68 20 2d 63 20 77 68 | 69 63 68 20 64 69 73 61 |th -c wh|ich disa|
|00000f80| 62 6c 65 73 20 61 6c 6c | 20 63 6f 6d 6d 65 6e 74 |bles all| comment|
|00000f90| 73 20 69 6e 20 74 68 65 | 0a 58 20 20 67 65 6e 65 |s in the|.X gene|
|00000fa0| 72 61 74 65 64 20 70 72 | 6f 74 6f 74 79 70 65 73 |rated pr|ototypes|
|00000fb0| 2e 0a 58 2d 20 52 65 70 | 6c 61 63 65 64 20 74 68 |..X- Rep|laced th|
|00000fc0| 65 20 65 6e 75 6d 27 73 | 20 77 69 74 68 20 23 64 |e enum's| with #d|
|00000fd0| 65 66 69 6e 65 20 63 6f | 6e 73 74 61 6e 74 73 20 |efine co|nstants |
|00000fe0| 74 6f 20 61 63 63 6f 6d | 6d 6f 64 61 74 65 20 43 |to accom|modate C|
|00000ff0| 20 63 6f 6d 70 69 6c 65 | 72 73 0a 58 20 20 74 68 | compile|rs.X th|
|00001000| 61 74 20 64 6f 6e 27 74 | 20 6c 69 6b 65 20 65 6e |at don't| like en|
|00001010| 75 6d 65 72 61 74 6f 72 | 73 20 69 6e 20 63 6f 6e |umerator|s in con|
|00001020| 73 74 61 6e 74 20 65 78 | 70 72 65 73 73 69 6f 6e |stant ex|pression|
|00001030| 73 2e 0a 58 0a 58 50 61 | 74 63 68 6c 65 76 65 6c |s..X.XPa|tchlevel|
|00001040| 20 31 0a 58 0a 58 2d 20 | 46 69 78 3a 20 54 68 65 | 1.X.X- |Fix: The|
|00001050| 20 70 72 6f 67 72 61 6d | 20 77 61 73 20 63 61 6c | program| was cal|
|00001060| 6c 69 6e 67 20 66 74 65 | 6c 6c 28 29 20 6f 6e 20 |ling fte|ll() on |
|00001070| 61 6e 20 69 6e 76 61 6c | 69 64 20 46 49 4c 45 20 |an inval|id FILE |
|00001080| 70 6f 69 6e 74 65 72 2e | 0a 58 0a 58 50 61 74 63 |pointer.|.X.XPatc|
|00001090| 68 6c 65 76 65 6c 20 30 | 0a 58 0a 58 2d 20 41 64 |hlevel 0|.X.X- Ad|
|000010a0| 64 65 64 20 6f 70 74 69 | 6f 6e 73 20 74 6f 20 63 |ded opti|ons to c|
|000010b0| 6f 6e 76 65 72 74 20 66 | 75 6e 63 74 69 6f 6e 20 |onvert f|unction |
|000010c0| 64 65 66 69 6e 69 74 69 | 6f 6e 73 20 62 65 74 77 |definiti|ons betw|
|000010d0| 65 65 6e 20 74 68 65 20 | 6f 6c 64 20 73 74 79 6c |een the |old styl|
|000010e0| 65 0a 58 20 20 61 6e 64 | 20 41 4e 53 49 20 43 20 |e.X and| ANSI C |
|000010f0| 73 74 79 6c 65 2e 0a 58 | 2d 20 4f 70 74 69 6f 6e |style..X|- Option|
|00001100| 73 20 63 61 6e 20 62 65 | 20 73 70 65 63 69 66 69 |s can be| specifi|
|00001110| 65 64 20 66 72 6f 6d 20 | 74 68 65 20 65 6e 76 69 |ed from |the envi|
|00001120| 72 6f 6e 6d 65 6e 74 20 | 76 61 72 69 61 62 6c 65 |ronment |variable|
|00001130| 20 43 50 52 4f 54 4f 2e | 0a 58 2d 20 54 68 65 20 | CPROTO.|.X- The |
|00001140| 4d 53 2d 44 4f 53 20 76 | 65 72 73 69 6f 6e 20 72 |MS-DOS v|ersion r|
|00001150| 65 63 6f 67 6e 69 7a 65 | 73 20 6d 6f 72 65 20 4d |ecognize|s more M|
|00001160| 69 63 72 6f 73 6f 66 74 | 20 43 20 61 6e 64 20 42 |icrosoft| C and B|
|00001170| 6f 72 6c 61 6e 64 20 43 | 2b 2b 20 74 79 70 65 0a |orland C|++ type.|
|00001180| 58 20 20 6d 6f 64 69 66 | 69 65 72 73 20 28 73 75 |X modif|iers (su|
|00001190| 63 68 20 61 73 20 5f 63 | 64 65 63 6c 2c 20 5f 66 |ch as _c|decl, _f|
|000011a0| 61 72 2c 20 5f 6e 65 61 | 72 29 2e 0a 58 2d 20 46 |ar, _nea|r)..X- F|
|000011b0| 69 78 3a 20 46 6f 72 6d | 61 6c 20 70 61 72 61 6d |ix: Form|al param|
|000011c0| 65 74 65 72 73 20 73 70 | 65 63 69 66 69 65 64 20 |eters sp|ecified |
|000011d0| 77 69 74 68 20 74 79 70 | 65 64 65 66 20 6e 61 6d |with typ|edef nam|
|000011e0| 65 73 20 77 65 72 65 20 | 6e 6f 74 20 70 72 6f 6d |es were |not prom|
|000011f0| 6f 74 65 64 2e 0a 58 20 | 20 46 6f 72 20 65 78 61 |oted..X | For exa|
|00001200| 6d 70 6c 65 2c 20 66 6f | 72 20 74 68 65 20 64 65 |mple, fo|r the de|
|00001210| 66 69 6e 69 74 69 6f 6e | 0a 58 0a 58 20 20 09 74 |finition|.X.X .t|
|00001220| 79 70 65 64 65 66 20 75 | 6e 73 69 67 6e 65 64 20 |ypedef u|nsigned |
|00001230| 73 68 6f 72 74 20 75 73 | 68 6f 72 74 3b 0a 58 0a |short us|hort;.X.|
|00001240| 58 09 76 6f 69 64 20 74 | 65 73 74 20 28 78 29 0a |X.void t|est (x).|
|00001250| 58 09 75 73 68 6f 72 74 | 20 78 3b 0a 58 09 7b 0a |X.ushort| x;.X.{.|
|00001260| 58 09 7d 0a 58 0a 58 20 | 20 63 70 72 6f 74 6f 20 |X.}.X.X | cproto |
|00001270| 67 65 6e 65 72 61 74 65 | 64 20 74 68 65 20 69 6e |generate|d the in|
|00001280| 63 6f 72 72 65 63 74 20 | 70 72 6f 74 6f 74 79 70 |correct |prototyp|
|00001290| 65 0a 58 0a 58 20 20 09 | 76 6f 69 64 20 74 65 73 |e.X.X .|void tes|
|000012a0| 74 28 75 73 68 6f 72 74 | 20 78 29 3b 0a 58 0a 58 |t(ushort| x);.X.X|
|000012b0| 20 20 77 68 69 6c 65 20 | 74 68 65 20 63 6f 72 72 | while |the corr|
|000012c0| 65 63 74 20 6f 6e 65 20 | 69 73 0a 58 0a 58 20 20 |ect one |is.X.X |
|000012d0| 09 76 6f 69 64 20 74 65 | 73 74 28 69 6e 74 20 78 |.void te|st(int x|
|000012e0| 29 3b 0a 58 0a 58 2d 20 | 46 69 78 3a 20 49 6e 63 |);.X.X- |Fix: Inc|
|000012f0| 6f 72 72 65 63 74 20 70 | 72 6f 74 6f 74 79 70 65 |orrect p|rototype|
|00001300| 73 20 77 65 72 65 20 67 | 65 6e 65 72 61 74 65 64 |s were g|enerated|
|00001310| 20 66 6f 72 20 66 75 6e | 63 74 69 6f 6e 73 20 74 | for fun|ctions t|
|00001320| 68 61 74 20 72 65 74 75 | 72 6e 65 64 0a 58 20 20 |hat retu|rned.X |
|00001330| 66 75 6e 63 74 69 6f 6e | 20 70 6f 69 6e 74 65 72 |function| pointer|
|00001340| 73 2e 20 20 46 6f 72 20 | 65 78 61 6d 70 6c 65 2c |s. For |example,|
|00001350| 20 63 70 72 6f 74 6f 20 | 67 65 6e 65 72 61 74 65 | cproto |generate|
|00001360| 64 20 61 6e 20 69 6e 63 | 6f 72 72 65 63 74 0a 58 |d an inc|orrect.X|
|00001370| 20 20 70 72 6f 74 6f 74 | 79 70 65 20 66 6f 72 20 | protot|ype for |
|00001380| 74 68 65 20 66 75 6e 63 | 74 69 6f 6e 20 64 65 66 |the func|tion def|
|00001390| 69 6e 69 74 69 6f 6e 0a | 58 0a 58 09 76 6f 69 64 |inition.|X.X.void|
|000013a0| 20 28 2a 73 69 67 6e 61 | 6c 28 69 6e 74 20 78 2c | (*signa|l(int x,|
|000013b0| 20 76 6f 69 64 20 28 2a | 66 75 6e 63 29 28 69 6e | void (*|func)(in|
|000013c0| 74 20 79 29 29 29 28 69 | 6e 74 20 7a 29 0a 58 09 |t y)))(i|nt z).X.|
|000013d0| 7b 0a 58 09 7d 0a 58 0a | 58 2d 20 46 69 78 3a 20 |{.X.}.X.|X- Fix: |
|000013e0| 43 68 61 6e 67 65 64 20 | 63 61 6c 6c 73 20 74 6f |Changed |calls to|
|000013f0| 20 6d 65 6d 6f 72 79 20 | 61 6c 6c 6f 63 61 74 69 | memory |allocati|
|00001400| 6f 6e 20 66 75 6e 63 74 | 69 6f 6e 73 20 74 6f 20 |on funct|ions to |
|00001410| 61 62 6f 72 74 20 74 68 | 65 20 70 72 6f 67 72 61 |abort th|e progra|
|00001420| 6d 0a 58 20 20 69 66 20 | 74 68 65 79 20 66 61 69 |m.X if |they fai|
|00001430| 6c 2e 0a 58 0a 58 56 65 | 72 73 69 6f 6e 20 32 0a |l..X.XVe|rsion 2.|
|00001440| 58 0a 58 50 61 74 63 68 | 6c 65 76 65 6c 20 33 0a |X.XPatch|level 3.|
|00001450| 58 0a 58 2d 20 4d 61 64 | 65 20 63 70 72 6f 74 6f |X.X- Mad|e cproto|
|00001460| 20 63 6f 6d 70 61 74 69 | 62 6c 65 20 77 69 74 68 | compati|ble with|
|00001470| 20 47 4e 55 20 66 6c 65 | 78 2e 0a 58 2d 20 41 66 | GNU fle|x..X- Af|
|00001480| 74 65 72 20 63 6f 6d 70 | 69 6c 69 6e 67 20 77 69 |ter comp|iling wi|
|00001490| 74 68 20 74 68 65 20 70 | 72 65 70 72 6f 63 65 73 |th the p|reproces|
|000014a0| 73 6f 72 20 73 79 6d 62 | 6f 6c 20 54 55 52 42 4f |sor symb|ol TURBO|
|000014b0| 5f 43 50 50 20 64 65 66 | 69 6e 65 64 2c 20 6f 6e |_CPP def|ined, on|
|000014c0| 0a 58 20 20 4d 53 2d 44 | 4f 53 20 73 79 73 74 65 |.X MS-D|OS syste|
|000014d0| 6d 73 2c 20 63 70 72 6f | 74 6f 20 77 69 6c 6c 20 |ms, cpro|to will |
|000014e0| 70 69 70 65 20 69 74 73 | 20 69 6e 70 75 74 20 74 |pipe its| input t|
|000014f0| 68 72 6f 75 67 68 20 74 | 68 65 20 54 75 72 62 6f |hrough t|he Turbo|
|00001500| 20 43 0a 58 20 20 70 72 | 65 70 72 6f 63 65 73 73 | C.X pr|eprocess|
|00001510| 6f 72 2e 0a 58 2d 20 46 | 69 78 3a 20 54 79 70 65 |or..X- F|ix: Type|
|00001520| 64 65 66 20 6e 61 6d 65 | 73 20 6d 61 79 20 6e 6f |def name|s may no|
|00001530| 77 20 62 65 20 6f 6d 69 | 74 74 65 64 20 66 72 6f |w be omi|tted fro|
|00001540| 6d 20 74 79 70 65 64 65 | 66 20 64 65 63 6c 61 72 |m typede|f declar|
|00001550| 61 74 69 6f 6e 73 2e 0a | 58 20 20 46 6f 72 20 65 |ations..|X For e|
|00001560| 78 61 6d 70 6c 65 2c 20 | 65 76 65 72 79 20 43 20 |xample, |every C |
|00001570| 63 6f 6d 70 69 6c 65 72 | 20 49 20 74 72 69 65 64 |compiler| I tried|
|00001580| 20 61 63 63 65 70 74 73 | 0a 58 0a 58 09 74 79 70 | accepts|.X.X.typ|
|00001590| 65 64 65 66 20 69 6e 74 | 3b 0a 58 0a 58 20 20 61 |edef int|;.X.X a|
|000015a0| 6e 64 20 73 6f 6d 65 20 | 65 76 65 6e 20 67 69 76 |nd some |even giv|
|000015b0| 65 20 77 61 72 6e 69 6e | 67 73 20 77 68 65 6e 20 |e warnin|gs when |
|000015c0| 65 6e 63 6f 75 6e 74 65 | 72 69 6e 67 20 74 68 69 |encounte|ring thi|
|000015d0| 73 20 73 74 61 74 65 6d | 65 6e 74 2e 0a 58 0a 58 |s statem|ent..X.X|
|000015e0| 50 61 74 63 68 6c 65 76 | 65 6c 20 32 0a 58 0a 58 |Patchlev|el 2.X.X|
|000015f0| 2d 20 43 70 72 6f 74 6f | 20 69 73 20 6e 6f 77 20 |- Cproto| is now |
|00001600| 61 62 6c 65 20 74 6f 20 | 67 65 6e 65 72 61 74 65 |able to |generate|
|00001610| 20 70 72 6f 74 6f 74 79 | 70 65 73 20 66 6f 72 20 | prototy|pes for |
|00001620| 66 75 6e 63 74 69 6f 6e | 73 20 64 65 66 69 6e 65 |function|s define|
|00001630| 64 20 69 6e 20 6c 65 78 | 0a 58 20 20 61 6e 64 20 |d in lex|.X and |
|00001640| 79 61 63 63 20 73 6f 75 | 72 63 65 20 66 69 6c 65 |yacc sou|rce file|
|00001650| 73 20 6e 61 6d 65 64 20 | 6f 6e 20 74 68 65 20 63 |s named |on the c|
|00001660| 6f 6d 6d 61 6e 64 20 6c | 69 6e 65 2e 20 20 4c 65 |ommand l|ine. Le|
|00001670| 78 20 61 6e 64 20 79 61 | 63 63 20 73 6f 75 72 63 |x and ya|cc sourc|
|00001680| 65 0a 58 20 20 66 69 6c | 65 73 20 61 72 65 20 72 |e.X fil|es are r|
|00001690| 65 63 6f 67 6e 69 7a 65 | 64 20 62 79 20 74 68 65 |ecognize|d by the|
|000016a0| 20 2e 6c 20 6f 72 20 2e | 79 20 65 78 74 65 6e 73 | .l or .|y extens|
|000016b0| 69 6f 6e 2e 0a 58 2d 20 | 46 69 78 3a 20 54 68 65 |ion..X- |Fix: The|
|000016c0| 20 6d 65 6d 6f 72 79 20 | 61 6c 6c 6f 63 61 74 65 | memory |allocate|
|000016d0| 64 20 74 6f 20 74 68 65 | 20 74 79 70 65 64 65 66 |d to the| typedef|
|000016e0| 20 73 79 6d 62 6f 6c 20 | 74 61 62 6c 65 20 77 61 | symbol |table wa|
|000016f0| 73 20 6e 6f 74 20 62 65 | 69 6e 67 0a 58 20 20 66 |s not be|ing.X f|
|00001700| 72 65 65 64 20 61 66 74 | 65 72 20 73 63 61 6e 6e |reed aft|er scann|
|00001710| 69 6e 67 20 65 61 63 68 | 20 73 6f 75 72 63 65 20 |ing each| source |
|00001720| 66 69 6c 65 2e 0a 58 2d | 20 46 69 78 3a 20 46 61 |file..X-| Fix: Fa|
|00001730| 69 6c 75 72 65 20 74 6f | 20 72 65 73 65 74 20 61 |ilure to| reset a|
|00001740| 20 76 61 72 69 61 62 6c | 65 20 64 75 72 69 6e 67 | variabl|e during|
|00001750| 20 65 72 72 6f 72 20 72 | 65 63 6f 76 65 72 79 20 | error r|ecovery |
|00001760| 63 61 75 73 65 64 0a 58 | 20 20 73 65 67 6d 65 6e |caused.X| segmen|
|00001770| 74 61 74 69 6f 6e 20 66 | 61 75 6c 74 73 2e 0a 58 |tation f|aults..X|
|00001780| 0a 58 50 61 74 63 68 6c | 65 76 65 6c 20 31 0a 58 |.XPatchl|evel 1.X|
|00001790| 0a 58 2d 20 46 69 78 3a | 20 43 70 72 6f 74 6f 20 |.X- Fix:| Cproto |
|000017a0| 69 6e 63 6f 72 72 65 63 | 74 6c 79 20 67 65 6e 65 |incorrec|tly gene|
|000017b0| 72 61 74 65 64 20 74 68 | 65 20 70 61 72 61 6d 65 |rated th|e parame|
|000017c0| 74 65 72 20 22 69 6e 74 | 20 2e 2e 2e 22 20 69 6e |ter "int| ..." in|
|000017d0| 0a 58 20 20 70 72 6f 74 | 6f 74 79 70 65 73 20 6f |.X prot|otypes o|
|000017e0| 66 20 66 75 6e 63 74 69 | 6f 6e 73 20 74 61 6b 69 |f functi|ons taki|
|000017f0| 6e 67 20 76 61 72 69 61 | 62 6c 65 20 70 61 72 61 |ng varia|ble para|
|00001800| 6d 65 74 65 72 73 2e 0a | 58 2d 20 46 69 78 3a 20 |meters..|X- Fix: |
|00001810| 46 75 6e 63 74 69 6f 6e | 20 64 65 66 69 6e 69 74 |Function| definit|
|00001820| 69 6f 6e 73 20 63 61 6e | 20 6e 6f 77 20 62 65 20 |ions can| now be |
|00001830| 66 6f 6c 6c 6f 77 65 64 | 20 62 79 20 61 6e 20 6f |followed| by an o|
|00001840| 70 74 69 6f 6e 61 6c 0a | 58 20 20 73 65 6d 69 63 |ptional.|X semic|
|00001850| 6f 6c 6f 6e 2e 20 20 49 | 20 66 6f 75 6e 64 20 74 |olon. I| found t|
|00001860| 68 69 73 20 66 65 61 74 | 75 72 65 20 69 6e 20 65 |his feat|ure in e|
|00001870| 76 65 72 79 20 43 20 63 | 6f 6d 70 69 6c 65 72 20 |very C c|ompiler |
|00001880| 49 20 74 72 69 65 64 2e | 0a 58 0a 58 50 61 74 63 |I tried.|.X.XPatc|
|00001890| 68 6c 65 76 65 6c 20 30 | 0a 58 0a 58 2d 20 41 64 |hlevel 0|.X.X- Ad|
|000018a0| 64 65 64 20 66 6f 72 6d | 61 6c 20 70 61 72 61 6d |ded form|al param|
|000018b0| 65 74 65 72 20 70 72 6f | 6d 6f 74 69 6f 6e 2e 0a |eter pro|motion..|
|000018c0| 58 2d 20 41 64 64 65 64 | 20 70 72 6f 74 6f 74 79 |X- Added| prototy|
|000018d0| 70 65 20 73 74 79 6c 65 | 20 74 68 61 74 20 73 75 |pe style| that su|
|000018e0| 72 72 6f 75 6e 64 73 20 | 70 72 6f 74 6f 74 79 70 |rrounds |prototyp|
|000018f0| 65 73 20 77 69 74 68 20 | 61 20 67 75 61 72 64 20 |es with |a guard |
|00001900| 6d 61 63 72 6f 2e 0a 58 | 2d 20 48 61 6e 64 6c 65 |macro..X|- Handle|
|00001910| 73 20 43 2b 2b 20 73 74 | 79 6c 65 20 63 6f 6d 6d |s C++ st|yle comm|
|00001920| 65 6e 74 20 2f 2f 2e 0a | 58 2d 20 4e 69 66 74 79 |ent //..|X- Nifty|
|00001930| 20 6e 65 77 20 77 61 79 | 20 74 6f 20 73 65 74 20 | new way| to set |
|00001940| 70 72 6f 74 6f 74 79 70 | 65 20 6f 75 74 70 75 74 |prototyp|e output|
|00001950| 20 66 6f 72 6d 61 74 2e | 0a 58 2d 20 47 6f 74 20 | format.|.X- Got |
|00001960| 72 69 64 20 6f 66 20 74 | 68 65 20 73 68 65 6c 6c |rid of t|he shell|
|00001970| 20 77 72 61 70 70 65 72 | 20 75 73 65 64 20 74 6f | wrapper| used to|
|00001980| 20 70 69 70 65 20 74 68 | 65 20 69 6e 70 75 74 20 | pipe th|e input |
|00001990| 74 68 72 6f 75 67 68 20 | 74 68 65 20 43 0a 58 20 |through |the C.X |
|000019a0| 20 70 72 65 70 72 6f 63 | 65 73 73 6f 72 20 28 63 | preproc|essor (c|
|000019b0| 70 70 29 2e 0a 58 2d 20 | 46 6f 72 20 74 68 65 20 |pp)..X- |For the |
|000019c0| 70 6f 72 74 20 74 6f 20 | 4d 53 2d 44 4f 53 2c 20 |port to |MS-DOS, |
|000019d0| 49 20 6d 6f 64 69 66 69 | 65 64 20 63 70 72 6f 74 |I modifi|ed cprot|
|000019e0| 6f 20 74 6f 20 72 75 6e | 20 77 69 74 68 6f 75 74 |o to run| without|
|000019f0| 20 63 70 70 2c 20 62 75 | 74 0a 58 20 20 73 69 6e | cpp, bu|t.X sin|
|00001a00| 63 65 20 49 20 64 69 64 | 6e 27 74 20 77 61 6e 74 |ce I did|n't want|
|00001a10| 20 74 6f 20 72 65 69 6d | 70 6c 65 6d 65 6e 74 20 | to reim|plement |
|00001a20| 63 70 70 2c 20 74 68 65 | 20 70 72 6f 67 72 61 6d |cpp, the| program|
|00001a30| 20 70 72 6f 63 65 73 73 | 65 73 20 6f 6e 6c 79 20 | process|es only |
|00001a40| 74 68 65 0a 58 20 20 23 | 69 6e 63 6c 75 64 65 20 |the.X #|include |
|00001a50| 61 6e 64 20 23 64 65 66 | 69 6e 65 20 64 69 72 65 |and #def|ine dire|
|00001a60| 63 74 69 76 65 73 20 61 | 6e 64 20 69 67 6e 6f 72 |ctives a|nd ignor|
|00001a70| 65 73 20 61 6c 6c 20 6f | 74 68 65 72 73 2e 20 20 |es all o|thers. |
|00001a80| 4d 61 63 72 6f 20 6e 61 | 6d 65 73 0a 58 20 20 64 |Macro na|mes.X d|
|00001a90| 65 66 69 6e 65 64 20 62 | 79 20 74 68 65 20 23 64 |efined b|y the #d|
|00001aa0| 65 66 69 6e 65 20 64 69 | 72 65 63 74 69 76 65 20 |efine di|rective |
|00001ab0| 61 72 65 20 74 72 65 61 | 74 65 64 20 6c 69 6b 65 |are trea|ted like|
|00001ac0| 20 74 79 70 65 64 65 66 | 20 6e 61 6d 65 73 20 69 | typedef| names i|
|00001ad0| 66 0a 58 20 20 74 68 65 | 79 20 61 70 70 65 61 72 |f.X the|y appear|
|00001ae0| 20 69 6e 20 64 65 63 6c | 61 72 61 74 69 6f 6e 20 | in decl|aration |
|00001af0| 73 70 65 63 69 66 69 65 | 72 73 2e 0a 58 0a 58 56 |specifie|rs..X.XV|
|00001b00| 65 72 73 69 6f 6e 20 31 | 0a 58 0a 58 50 61 74 63 |ersion 1|.X.XPatc|
|00001b10| 68 6c 65 76 65 6c 20 33 | 0a 58 0a 58 2d 20 46 69 |hlevel 3|.X.X- Fi|
|00001b20| 78 3a 20 69 64 65 6e 74 | 69 63 61 6c 20 74 79 70 |x: ident|ical typ|
|00001b30| 65 64 65 66 20 6e 61 6d | 65 73 20 61 6e 64 20 73 |edef nam|es and s|
|00001b40| 74 72 75 63 74 20 74 61 | 67 73 20 73 68 6f 75 6c |truct ta|gs shoul|
|00001b50| 64 20 62 65 20 61 6c 6c | 6f 77 65 64 2e 0a 58 20 |d be all|owed..X |
|00001b60| 20 46 6f 72 20 65 78 61 | 6d 70 6c 65 3a 0a 58 0a | For exa|mple:.X.|
|00001b70| 58 09 74 79 70 65 64 65 | 66 20 73 74 72 75 63 74 |X.typede|f struct|
|00001b80| 20 65 67 67 5f 73 61 6c | 61 64 20 65 67 67 5f 73 | egg_sal|ad egg_s|
|00001b90| 61 6c 61 64 3b 0a 58 0a | 58 09 73 74 72 75 63 74 |alad;.X.|X.struct|
|00001ba0| 20 65 67 67 5f 73 61 6c | 61 64 20 7b 0a 58 09 20 | egg_sal|ad {.X. |
|00001bb0| 20 20 20 69 6e 74 20 6d | 61 79 6f 3b 0a 58 09 7d | int m|ayo;.X.}|
|00001bc0| 3b 0a 58 0a 58 09 76 6f | 69 64 20 64 69 6e 65 28 |;.X.X.vo|id dine(|
|00001bd0| 65 67 67 5f 73 61 6c 61 | 64 20 6c 29 0a 58 09 7b |egg_sala|d l).X.{|
|00001be0| 0a 58 09 7d 0a 58 0a 58 | 50 61 74 63 68 6c 65 76 |.X.}.X.X|Patchlev|
|00001bf0| 65 6c 20 32 0a 58 0a 58 | 2d 20 46 69 78 3a 20 41 |el 2.X.X|- Fix: A|
|00001c00| 20 74 79 70 65 64 65 66 | 20 73 74 61 74 65 6d 65 | typedef| stateme|
|00001c10| 6e 74 20 73 68 6f 75 6c | 64 20 61 6c 6c 6f 77 20 |nt shoul|d allow |
|00001c20| 61 20 6c 69 73 74 20 6f | 66 20 74 79 70 65 64 65 |a list o|f typede|
|00001c30| 66 73 20 74 6f 20 62 65 | 20 64 65 63 6c 61 72 65 |fs to be| declare|
|00001c40| 64 2e 0a 58 20 20 45 78 | 61 6d 70 6c 65 3a 0a 58 |d..X Ex|ample:.X|
|00001c50| 0a 58 09 74 79 70 65 64 | 65 66 20 69 6e 74 20 61 |.X.typed|ef int a|
|00001c60| 2c 20 2a 62 3b 0a 58 0a | 58 2d 20 46 69 78 3a 20 |, *b;.X.|X- Fix: |
|00001c70| 57 68 65 6e 20 72 75 6e | 20 77 69 74 68 20 74 68 |When run| with th|
|00001c80| 65 20 2d 76 20 6f 70 74 | 69 6f 6e 20 6f 6e 20 74 |e -v opt|ion on t|
|00001c90| 68 69 73 20 69 6e 70 75 | 74 2c 20 63 70 72 6f 74 |his inpu|t, cprot|
|00001ca0| 6f 20 64 69 64 20 6e 6f | 74 20 6f 75 74 70 75 74 |o did no|t output|
|00001cb0| 0a 58 20 20 61 20 64 65 | 63 6c 61 72 61 74 69 6f |.X a de|claratio|
|00001cc0| 6e 20 66 6f 72 20 76 61 | 72 69 61 62 6c 65 20 22 |n for va|riable "|
|00001cd0| 62 22 3a 0a 58 0a 58 09 | 63 68 61 72 20 2a 61 3d |b":.X.X.|char *a=|
|00001ce0| 22 6f 6e 65 22 3b 20 63 | 68 61 72 20 2a 62 3d 22 |"one"; c|har *b="|
|00001cf0| 74 77 6f 22 3b 0a 58 0a | 58 2d 20 54 68 65 20 6f |two";.X.|X- The o|
|00001d00| 70 74 69 6f 6e 73 20 77 | 65 72 65 20 72 65 6e 61 |ptions w|ere rena|
|00001d10| 6d 65 64 2e 20 20 41 64 | 64 65 64 20 6e 65 77 20 |med. Ad|ded new |
|00001d20| 6f 70 74 69 6f 6e 73 20 | 74 68 61 74 20 63 68 61 |options |that cha|
|00001d30| 6e 67 65 20 74 68 65 20 | 6f 75 74 70 75 74 0a 58 |nge the |output.X|
|00001d40| 20 20 66 6f 72 6d 61 74 | 20 6f 66 20 74 68 65 20 | format| of the |
|00001d50| 70 72 6f 74 6f 74 79 70 | 65 73 2e 0a 58 0a 58 50 |prototyp|es..X.XP|
|00001d60| 61 74 63 68 6c 65 76 65 | 6c 20 31 0a 58 0a 58 2d |atchleve|l 1.X.X-|
|00001d70| 20 46 69 78 3a 20 49 6e | 63 6f 72 72 65 63 74 20 | Fix: In|correct |
|00001d80| 70 72 6f 74 6f 74 79 70 | 65 73 20 77 65 72 65 20 |prototyp|es were |
|00001d90| 70 72 6f 64 75 63 65 64 | 20 66 6f 72 20 66 75 6e |produced| for fun|
|00001da0| 63 74 69 6f 6e 73 20 74 | 68 61 74 20 74 61 6b 65 |ctions t|hat take|
|00001db0| 0a 58 20 20 66 75 6e 63 | 74 69 6f 6e 20 70 6f 69 |.X func|tion poi|
|00001dc0| 6e 74 65 72 20 70 61 72 | 61 6d 65 74 65 72 73 20 |nter par|ameters |
|00001dd0| 6f 72 20 72 65 74 75 72 | 6e 20 61 20 66 75 6e 63 |or retur|n a func|
|00001de0| 74 69 6f 6e 20 70 6f 69 | 6e 74 65 72 2e 20 20 46 |tion poi|nter. F|
|00001df0| 6f 72 20 65 78 61 6d 70 | 6c 65 2c 0a 58 20 20 63 |or examp|le,.X c|
|00001e00| 70 72 6f 74 6f 20 70 72 | 6f 64 75 63 65 64 20 61 |proto pr|oduced a|
|00001e10| 6e 20 65 72 72 6f 6e 65 | 6f 75 73 20 70 72 6f 74 |n errone|ous prot|
|00001e20| 6f 74 79 70 65 20 66 6f | 72 20 74 68 69 73 20 66 |otype fo|r this f|
|00001e30| 75 6e 63 74 69 6f 6e 20 | 64 65 66 69 6e 69 74 69 |unction |definiti|
|00001e40| 6f 6e 3a 0a 58 0a 58 09 | 76 6f 69 64 0a 58 09 28 |on:.X.X.|void.X.(|
|00001e50| 2a 73 69 67 6e 61 6c 20 | 28 73 69 67 2c 20 66 75 |*signal |(sig, fu|
|00001e60| 6e 63 29 29 28 29 0a 58 | 09 69 6e 74 20 73 69 67 |nc))().X|.int sig|
|00001e70| 3b 0a 58 09 76 6f 69 64 | 20 28 2a 66 75 6e 63 29 |;.X.void| (*func)|
|00001e80| 28 29 3b 0a 58 09 7b 0a | 58 09 20 20 20 20 2f 2a |();.X.{.|X. /*|
|00001e90| 20 73 74 75 66 66 20 2a | 2f 0a 58 09 7d 0a 58 0a | stuff *|/.X.}.X.|
|00001ea0| 58 2d 20 54 68 65 20 6c | 65 78 69 63 61 6c 20 61 |X- The l|exical a|
|00001eb0| 6e 61 6c 79 73 65 72 20 | 6e 6f 77 20 75 73 65 73 |nalyser |now uses|
|00001ec0| 20 4c 45 58 2e 20 20 49 | 74 20 73 68 6f 75 6c 64 | LEX. I|t should|
|00001ed0| 20 73 74 69 6c 6c 20 62 | 65 20 63 6f 6d 70 61 74 | still b|e compat|
|00001ee0| 69 62 6c 65 20 77 69 74 | 68 0a 58 20 20 46 4c 45 |ible wit|h.X FLE|
|00001ef0| 58 2e 0a 45 4e 44 5f 4f | 46 5f 43 48 41 4e 47 45 |X..END_O|F_CHANGE|
|00001f00| 53 0a 69 66 20 74 65 73 | 74 20 34 32 35 32 20 2d |S.if tes|t 4252 -|
|00001f10| 6e 65 20 60 77 63 20 2d | 63 20 3c 43 48 41 4e 47 |ne `wc -|c <CHANG|
|00001f20| 45 53 60 3b 20 74 68 65 | 6e 0a 20 20 20 20 65 63 |ES`; the|n. ec|
|00001f30| 68 6f 20 73 68 61 72 3a | 20 5c 22 43 48 41 4e 47 |ho shar:| \"CHANG|
|00001f40| 45 53 5c 22 20 75 6e 70 | 61 63 6b 65 64 20 77 69 |ES\" unp|acked wi|
|00001f50| 74 68 20 77 72 6f 6e 67 | 20 73 69 7a 65 21 0a 66 |th wrong| size!.f|
|00001f60| 69 0a 23 20 65 6e 64 20 | 6f 66 20 6f 76 65 72 77 |i.# end |of overw|
|00001f70| 72 69 74 69 6e 67 20 63 | 68 65 63 6b 0a 66 69 0a |riting c|heck.fi.|
|00001f80| 69 66 20 74 65 73 74 20 | 2d 66 20 63 70 72 6f 74 |if test |-f cprot|
|00001f90| 6f 2e 6d 61 6e 20 2d 61 | 20 22 24 7b 31 7d 22 20 |o.man -a| "${1}" |
|00001fa0| 21 3d 20 22 2d 63 22 20 | 3b 20 74 68 65 6e 20 0a |!= "-c" |; then .|
|00001fb0| 20 20 65 63 68 6f 20 73 | 68 61 72 3a 20 57 69 6c | echo s|har: Wil|
|00001fc0| 6c 20 6e 6f 74 20 6f 76 | 65 72 2d 77 72 69 74 65 |l not ov|er-write|
|00001fd0| 20 65 78 69 73 74 69 6e | 67 20 66 69 6c 65 20 5c | existin|g file \|
|00001fe0| 22 63 70 72 6f 74 6f 2e | 6d 61 6e 5c 22 0a 65 6c |"cproto.|man\".el|
|00001ff0| 73 65 0a 65 63 68 6f 20 | 73 68 61 72 3a 20 45 78 |se.echo |shar: Ex|
|00002000| 74 72 61 63 74 69 6e 67 | 20 5c 22 63 70 72 6f 74 |tracting| \"cprot|
|00002010| 6f 2e 6d 61 6e 5c 22 20 | 5c 28 37 35 32 31 20 63 |o.man\" |\(7521 c|
|00002020| 68 61 72 61 63 74 65 72 | 73 5c 29 0a 73 65 64 20 |haracter|s\).sed |
|00002030| 22 73 2f 5e 58 2f 2f 22 | 20 3e 63 70 72 6f 74 6f |"s/^X//"| >cproto|
|00002040| 2e 6d 61 6e 20 3c 3c 27 | 45 4e 44 5f 4f 46 5f 63 |.man <<'|END_OF_c|
|00002050| 70 72 6f 74 6f 2e 6d 61 | 6e 27 0a 58 0a 58 0a 58 |proto.ma|n'.X.X.X|
|00002060| 43 50 52 4f 54 4f 28 31 | 29 20 20 20 20 20 20 20 |CPROTO(1|) |
|00002070| 20 20 20 20 20 20 20 20 | 20 20 20 55 6e 69 78 20 | | Unix |
|00002080| 50 72 6f 67 72 61 6d 6d | 65 72 27 73 20 4d 61 6e |Programm|er's Man|
|00002090| 75 61 6c 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |ual | |
|000020a0| 20 20 20 20 20 43 50 52 | 4f 54 4f 28 31 29 0a 58 | CPR|OTO(1).X|
|000020b0| 0a 58 0a 58 4e 41 4d 45 | 0a 58 20 20 20 20 20 63 |.X.XNAME|.X c|
|000020c0| 70 72 6f 74 6f 20 2d 20 | 67 65 6e 65 72 61 74 65 |proto - |generate|
|000020d0| 20 43 20 66 75 6e 63 74 | 69 6f 6e 20 70 72 6f 74 | C funct|ion prot|
|000020e0| 6f 74 79 70 65 73 20 61 | 6e 64 20 63 6f 6e 76 65 |otypes a|nd conve|
|000020f0| 72 74 20 66 75 6e 63 74 | 69 6f 6e 20 64 65 66 69 |rt funct|ion defi|
|00002100| 6e 69 74 69 6f 6e 73 0a | 58 0a 58 53 59 4e 4f 50 |nitions.|X.XSYNOP|
|00002110| 53 49 53 0a 58 20 20 20 | 20 20 63 70 72 6f 74 6f |SIS.X | cproto|
|00002120| 20 5b 20 6f 70 74 69 6f | 6e 20 2e 2e 2e 20 5d 20 | [ optio|n ... ] |
|00002130| 5b 20 66 69 6c 65 20 2e | 2e 2e 20 5d 0a 58 0a 58 |[ file .|.. ].X.X|
|00002140| 44 45 53 43 52 49 50 54 | 49 4f 4e 0a 58 20 20 20 |DESCRIPT|ION.X |
|00002150| 20 20 43 70 72 6f 74 6f | 20 20 67 65 6e 65 72 61 | Cproto| genera|
|00002160| 74 65 73 20 20 66 75 6e | 63 74 69 6f 6e 20 20 70 |tes fun|ction p|
|00002170| 72 6f 74 6f 74 79 70 65 | 73 20 20 66 6f 72 20 20 |rototype|s for |
|00002180| 66 75 6e 63 74 69 6f 6e | 73 20 20 64 65 66 69 6e |function|s defin|
|00002190| 65 64 20 20 69 6e 20 20 | 74 68 65 0a 58 20 20 20 |ed in |the.X |
|000021a0| 20 20 73 70 65 63 69 66 | 69 65 64 20 20 20 43 20 | specif|ied C |
|000021b0| 20 20 73 6f 75 72 63 65 | 20 20 66 69 6c 65 73 20 | source| files |
|000021c0| 20 74 6f 20 20 74 68 65 | 20 20 73 74 61 6e 64 61 | to the| standa|
|000021d0| 72 64 20 20 6f 75 74 70 | 75 74 2e 20 20 20 54 68 |rd outp|ut. Th|
|000021e0| 65 20 20 66 75 6e 63 74 | 69 6f 6e 0a 58 20 20 20 |e funct|ion.X |
|000021f0| 20 20 64 65 66 69 6e 69 | 74 69 6f 6e 73 20 6d 61 | defini|tions ma|
|00002200| 79 20 62 65 20 69 6e 20 | 74 68 65 20 6f 6c 64 20 |y be in |the old |
|00002210| 73 74 79 6c 65 20 6f 72 | 20 41 4e 53 49 20 43 20 |style or| ANSI C |
|00002220| 73 74 79 6c 65 2e 20 20 | 4f 70 74 69 6f 6e 61 6c |style. |Optional|
|00002230| 6c 79 2c 20 20 63 70 72 | 6f 74 6f 0a 58 20 20 20 |ly, cpr|oto.X |
|00002240| 20 20 61 6c 73 6f 20 20 | 6f 75 74 70 75 74 73 20 | also |outputs |
|00002250| 20 64 65 63 6c 61 72 61 | 74 69 6f 6e 73 20 66 6f | declara|tions fo|
|00002260| 72 20 61 6e 79 20 76 61 | 72 69 61 62 6c 65 73 20 |r any va|riables |
|00002270| 64 65 66 69 6e 65 64 20 | 69 6e 20 74 68 65 20 66 |defined |in the f|
|00002280| 69 6c 65 2e 20 20 49 66 | 20 6e 6f 0a 58 20 20 20 |ile. If| no.X |
|00002290| 20 20 66 69 6c 65 20 61 | 72 67 75 6d 65 6e 74 20 | file a|rgument |
|000022a0| 69 73 20 67 69 76 65 6e | 2c 20 63 70 72 6f 74 6f |is given|, cproto|
|000022b0| 20 72 65 61 64 73 20 69 | 74 73 20 69 6e 70 75 74 | reads i|ts input|
|000022c0| 20 66 72 6f 6d 20 74 68 | 65 20 73 74 61 6e 64 61 | from th|e standa|
|000022d0| 72 64 20 69 6e 70 75 74 | 2e 0a 58 0a 58 20 20 20 |rd input|..X.X |
|000022e0| 20 20 42 79 20 67 69 76 | 69 6e 67 20 61 20 63 6f | By giv|ing a co|
|000022f0| 6d 6d 61 6e 64 20 20 6c | 69 6e 65 20 20 6f 70 74 |mmand l|ine opt|
|00002300| 69 6f 6e 2c 20 20 63 70 | 72 6f 74 6f 20 20 77 69 |ion, cp|roto wi|
|00002310| 6c 6c 20 20 61 6c 73 6f | 20 20 63 6f 6e 76 65 72 |ll also| conver|
|00002320| 74 20 20 66 75 6e 63 74 | 69 6f 6e 0a 58 20 20 20 |t funct|ion.X |
|00002330| 20 20 64 65 66 69 6e 69 | 74 69 6f 6e 73 20 20 69 | defini|tions i|
|00002340| 6e 20 20 74 68 65 20 20 | 73 70 65 63 69 66 69 65 |n the |specifie|
|00002350| 64 20 20 66 69 6c 65 73 | 20 20 66 72 6f 6d 20 20 |d files| from |
|00002360| 74 68 65 20 6f 6c 64 20 | 73 74 79 6c 65 20 74 6f |the old |style to|
|00002370| 20 74 68 65 20 41 4e 53 | 49 20 43 0a 58 20 20 20 | the ANS|I C.X |
|00002380| 20 20 73 74 79 6c 65 2e | 20 20 54 68 65 20 6f 72 | style.| The or|
|00002390| 69 67 69 6e 61 6c 20 73 | 6f 75 72 63 65 20 66 69 |iginal s|ource fi|
|000023a0| 6c 65 73 20 61 6c 6f 6e | 67 20 77 69 74 68 20 66 |les alon|g with f|
|000023b0| 69 6c 65 73 20 73 70 65 | 63 69 66 69 65 64 20 62 |iles spe|cified b|
|000023c0| 79 0a 58 0a 58 20 20 20 | 20 20 20 20 20 20 20 23 |y.X.X | #|
|000023d0| 69 6e 63 6c 75 64 65 20 | 22 66 69 6c 65 22 0a 58 |include |"file".X|
|000023e0| 0a 58 20 20 20 20 20 64 | 69 72 65 63 74 69 76 65 |.X d|irective|
|000023f0| 73 20 61 70 70 65 61 72 | 69 6e 67 20 69 6e 20 74 |s appear|ing in t|
|00002400| 68 65 20 73 6f 75 72 63 | 65 20 63 6f 64 65 20 20 |he sourc|e code |
|00002410| 77 69 6c 6c 20 20 62 65 | 20 20 6f 76 65 72 77 72 |will be| overwr|
|00002420| 69 74 74 65 6e 20 20 77 | 69 74 68 20 20 74 68 65 |itten w|ith the|
|00002430| 0a 58 20 20 20 20 20 63 | 6f 6e 76 65 72 74 65 64 |.X c|onverted|
|00002440| 20 63 6f 64 65 2e 20 20 | 49 66 20 6e 6f 20 66 69 | code. |If no fi|
|00002450| 6c 65 20 6e 61 6d 65 73 | 20 61 72 65 20 67 69 76 |le names| are giv|
|00002460| 65 6e 20 6f 6e 20 74 68 | 65 20 63 6f 6d 6d 61 6e |en on th|e comman|
|00002470| 64 20 6c 69 6e 65 2c 20 | 74 68 65 6e 20 74 68 65 |d line, |then the|
|00002480| 0a 58 20 20 20 20 20 70 | 72 6f 67 72 61 6d 20 72 |.X p|rogram r|
|00002490| 65 61 64 73 20 74 68 65 | 20 73 6f 75 72 63 65 20 |eads the| source |
|000024a0| 63 6f 64 65 20 66 72 6f | 6d 20 74 68 65 20 73 74 |code fro|m the st|
|000024b0| 61 6e 64 61 72 64 20 20 | 69 6e 70 75 74 20 20 61 |andard |input a|
|000024c0| 6e 64 20 20 6f 75 74 70 | 75 74 73 20 20 74 68 65 |nd outp|uts the|
|000024d0| 0a 58 20 20 20 20 20 63 | 6f 6e 76 65 72 74 65 64 |.X c|onverted|
|000024e0| 20 73 6f 75 72 63 65 20 | 74 6f 20 74 68 65 20 73 | source |to the s|
|000024f0| 74 61 6e 64 61 72 64 20 | 6f 75 74 70 75 74 2e 0a |tandard |output..|
|00002500| 58 0a 58 20 20 20 20 20 | 49 66 20 61 6e 79 20 63 |X.X |If any c|
|00002510| 6f 6d 6d 65 6e 74 73 20 | 61 70 70 65 61 72 20 69 |omments |appear i|
|00002520| 6e 20 20 74 68 65 20 20 | 70 61 72 61 6d 65 74 65 |n the |paramete|
|00002530| 72 20 20 64 65 63 6c 61 | 72 61 74 69 6f 6e 73 20 |r decla|rations |
|00002540| 20 66 6f 72 20 20 61 20 | 20 66 75 6e 63 74 69 6f | for a | functio|
|00002550| 6e 0a 58 20 20 20 20 20 | 64 65 66 69 6e 69 74 69 |n.X |definiti|
|00002560| 6f 6e 2c 20 73 75 63 68 | 20 61 73 20 69 6e 20 74 |on, such| as in t|
|00002570| 68 65 20 65 78 61 6d 70 | 6c 65 2c 0a 58 0a 58 20 |he examp|le,.X.X |
|00002580| 20 20 20 20 20 20 20 20 | 20 6d 61 69 6e 20 28 61 | | main (a|
|00002590| 72 67 63 2c 20 61 72 67 | 76 29 0a 58 20 20 20 20 |rgc, arg|v).X |
|000025a0| 20 20 20 20 20 20 69 6e | 74 20 61 72 67 63 3b 20 | in|t argc; |
|000025b0| 2f 2a 20 6e 75 6d 62 65 | 72 20 6f 66 20 61 72 67 |/* numbe|r of arg|
|000025c0| 75 6d 65 6e 74 73 20 2a | 2f 0a 58 20 20 20 20 20 |uments *|/.X |
|000025d0| 20 20 20 20 20 63 68 61 | 72 20 2a 61 72 67 76 5b | cha|r *argv[|
|000025e0| 5d 3b 20 2f 2a 20 61 72 | 67 75 6d 65 6e 74 73 20 |]; /* ar|guments |
|000025f0| 2a 2f 0a 58 20 20 20 20 | 20 20 20 20 20 20 7b 0a |*/.X | {.|
|00002600| 58 20 20 20 20 20 20 20 | 20 20 20 20 2e 2e 2e 0a |X | ....|
|00002610| 58 20 20 20 20 20 20 20 | 20 20 20 7d 0a 58 0a 58 |X | }.X.X|
|00002620| 20 20 20 20 20 74 68 65 | 6e 20 74 68 65 20 63 6f | the|n the co|
|00002630| 6e 76 65 72 74 65 64 20 | 66 75 6e 63 74 69 6f 6e |nverted |function|
|00002640| 20 64 65 66 69 6e 69 74 | 69 6f 6e 20 77 69 6c 6c | definit|ion will|
|00002650| 20 68 61 76 65 20 74 68 | 65 20 66 6f 72 6d 0a 58 | have th|e form.X|
|00002660| 0a 58 20 20 20 20 20 20 | 20 20 20 20 69 6e 74 0a |.X | int.|
|00002670| 58 20 20 20 20 20 20 20 | 20 20 20 6d 61 69 6e 20 |X | main |
|00002680| 28 0a 58 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |(.X | |
|00002690| 20 69 6e 74 20 61 72 67 | 63 3b 20 20 20 20 2f 2a | int arg|c; /*|
|000026a0| 20 6e 75 6d 62 65 72 20 | 6f 66 20 61 72 67 75 6d | number |of argum|
|000026b0| 65 6e 74 73 20 2a 2f 0a | 58 20 20 20 20 20 20 20 |ents */.|X |
|000026c0| 20 20 20 20 20 20 20 63 | 68 61 72 20 2a 61 72 67 | c|har *arg|
|000026d0| 76 5b 5d 3b 20 20 20 2f | 2a 20 61 72 67 75 6d 65 |v[]; /|* argume|
|000026e0| 6e 74 73 20 2a 2f 0a 58 | 20 20 20 20 20 20 20 20 |nts */.X| |
|000026f0| 20 20 29 0a 58 20 20 20 | 20 20 20 20 20 20 20 7b | ).X | {|
|00002700| 0a 58 20 20 20 20 20 20 | 20 20 20 20 20 2e 2e 2e |.X | ...|
|00002710| 0a 58 20 20 20 20 20 20 | 20 20 20 20 7d 0a 58 0a |.X | }.X.|
|00002720| 58 20 20 20 20 20 4f 74 | 68 65 72 77 69 73 65 2c |X Ot|herwise,|
|00002730| 20 74 68 65 20 63 6f 6e | 76 65 72 74 65 64 20 66 | the con|verted f|
|00002740| 75 6e 63 74 69 6f 6e 20 | 64 65 66 69 6e 69 74 69 |unction |definiti|
|00002750| 6f 6e 20 77 69 6c 6c 20 | 6c 6f 6f 6b 20 6c 69 6b |on will |look lik|
|00002760| 65 0a 58 0a 58 20 20 20 | 20 20 20 20 20 20 20 69 |e.X.X | i|
|00002770| 6e 74 0a 58 20 20 20 20 | 20 20 20 20 20 20 6d 61 |nt.X | ma|
|00002780| 69 6e 20 28 69 6e 74 20 | 61 72 67 63 2c 20 63 68 |in (int |argc, ch|
|00002790| 61 72 20 2a 61 72 67 76 | 5b 5d 29 0a 58 20 20 20 |ar *argv|[]).X |
|000027a0| 20 20 20 20 20 20 20 7b | 0a 58 20 20 20 20 20 20 | {|.X |
|000027b0| 20 20 20 20 20 2e 2e 2e | 0a 58 20 20 20 20 20 20 | ...|.X |
|000027c0| 20 20 20 20 7d 0a 58 0a | 58 0a 58 0a 58 0a 58 0a | }.X.|X.X.X.X.|
|000027d0| 58 0a 58 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |X.X | |
|000027e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000027f0| 20 20 20 41 70 72 69 6c | 20 33 2c 20 31 39 39 32 | April| 3, 1992|
|00002800| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002810| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002820| 31 0a 58 0a 58 0a 58 0c | 0a 58 0a 58 43 50 52 4f |1.X.X.X.|.X.XCPRO|
|00002830| 54 4f 28 31 29 20 20 20 | 20 20 20 20 20 20 20 20 |TO(1) | |
|00002840| 20 20 20 20 20 20 20 55 | 6e 69 78 20 50 72 6f 67 | U|nix Prog|
|00002850| 72 61 6d 6d 65 72 27 73 | 20 4d 61 6e 75 61 6c 20 |rammer's| Manual |
|00002860| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002870| 20 43 50 52 4f 54 4f 28 | 31 29 0a 58 0a 58 0a 58 | CPROTO(|1).X.X.X|
|00002880| 20 20 20 20 20 43 70 72 | 6f 74 6f 20 63 61 6e 20 | Cpr|oto can |
|00002890| 6f 70 74 69 6f 6e 61 6c | 6c 79 20 63 6f 6e 76 65 |optional|ly conve|
|000028a0| 72 74 20 66 75 6e 63 74 | 69 6f 6e 20 64 65 66 69 |rt funct|ion defi|
|000028b0| 6e 69 74 69 6f 6e 73 20 | 66 72 6f 6d 20 74 68 65 |nitions |from the|
|000028c0| 20 41 4e 53 49 20 73 74 | 79 6c 65 20 74 6f 0a 58 | ANSI st|yle to.X|
|000028d0| 20 20 20 20 20 74 68 65 | 20 20 6f 6c 64 20 20 73 | the| old s|
|000028e0| 74 79 6c 65 2e 20 20 20 | 49 6e 20 20 74 68 69 73 |tyle. |In this|
|000028f0| 20 20 6d 6f 64 65 2c 20 | 20 74 68 65 20 20 70 72 | mode, | the pr|
|00002900| 6f 67 72 61 6d 20 20 61 | 6c 73 6f 20 20 63 6f 6e |ogram a|lso con|
|00002910| 76 65 72 74 73 20 66 75 | 6e 63 74 69 6f 6e 0a 58 |verts fu|nction.X|
|00002920| 20 20 20 20 20 64 65 63 | 6c 61 72 61 74 6f 72 73 | dec|larators|
|00002930| 20 61 6e 64 20 70 72 6f | 74 6f 74 79 70 65 73 20 | and pro|totypes |
|00002940| 74 68 61 74 20 61 70 70 | 65 61 72 20 6f 75 74 73 |that app|ear outs|
|00002950| 69 64 65 20 66 75 6e 63 | 74 69 6f 6e 20 62 6f 64 |ide func|tion bod|
|00002960| 69 65 73 2e 20 20 54 68 | 69 73 20 20 69 73 0a 58 |ies. Th|is is.X|
|00002970| 20 20 20 20 20 6e 6f 74 | 20 20 61 20 20 63 6f 6d | not| a com|
|00002980| 70 6c 65 74 65 20 41 4e | 53 49 20 43 20 74 6f 20 |plete AN|SI C to |
|00002990| 6f 6c 64 20 43 20 63 6f | 6e 76 65 72 73 69 6f 6e |old C co|nversion|
|000029a0| 2e 20 20 54 68 65 20 70 | 72 6f 67 72 61 6d 20 64 |. The p|rogram d|
|000029b0| 6f 65 73 20 6e 6f 74 20 | 63 68 61 6e 67 65 0a 58 |oes not |change.X|
|000029c0| 20 20 20 20 20 61 6e 79 | 74 68 69 6e 67 20 77 69 | any|thing wi|
|000029d0| 74 68 69 6e 20 66 75 6e | 63 74 69 6f 6e 20 62 6f |thin fun|ction bo|
|000029e0| 64 69 65 73 2e 0a 58 0a | 58 4f 50 54 49 4f 4e 53 |dies..X.|XOPTIONS|
|000029f0| 0a 58 0a 58 20 20 20 20 | 20 2d 61 20 20 20 43 6f |.X.X | -a Co|
|00002a00| 6e 76 65 72 74 20 66 75 | 6e 63 74 69 6f 6e 20 64 |nvert fu|nction d|
|00002a10| 65 66 69 6e 69 74 69 6f | 6e 73 20 66 72 6f 6d 20 |efinitio|ns from |
|00002a20| 74 68 65 20 6f 6c 64 20 | 73 74 79 6c 65 20 74 6f |the old |style to|
|00002a30| 20 74 68 65 20 41 4e 53 | 49 20 43 20 73 74 79 6c | the ANS|I C styl|
|00002a40| 65 2e 0a 58 0a 58 20 20 | 20 20 20 2d 65 20 20 20 |e..X.X | -e |
|00002a50| 4f 75 74 70 75 74 20 74 | 68 65 20 6b 65 79 77 6f |Output t|he keywo|
|00002a60| 72 64 20 65 78 74 65 72 | 6e 20 20 69 6e 20 20 66 |rd exter|n in f|
|00002a70| 72 6f 6e 74 20 20 6f 66 | 20 20 65 76 65 72 79 20 |ront of| every |
|00002a80| 20 64 65 63 6c 61 72 61 | 74 69 6f 6e 20 20 68 61 | declara|tion ha|
|00002a90| 76 69 6e 67 0a 58 20 20 | 20 20 20 20 20 20 20 20 |ving.X | |
|00002aa0| 67 6c 6f 62 61 6c 20 73 | 63 6f 70 65 2e 0a 58 0a |global s|cope..X.|
|00002ab0| 58 20 20 20 20 20 2d 66 | 6e 20 20 53 65 74 20 74 |X -f|n Set t|
|00002ac0| 68 65 20 73 74 79 6c 65 | 20 6f 66 20 67 65 6e 65 |he style| of gene|
|00002ad0| 72 61 74 65 64 20 66 75 | 6e 63 74 69 6f 6e 20 70 |rated fu|nction p|
|00002ae0| 72 6f 74 6f 74 79 70 65 | 73 20 77 68 65 72 65 20 |rototype|s where |
|00002af0| 6e 20 69 73 20 20 61 20 | 20 6e 75 6d 62 65 72 0a |n is a | number.|
|00002b00| 58 20 20 20 20 20 20 20 | 20 20 20 66 72 6f 6d 20 |X | from |
|00002b10| 30 20 74 6f 20 34 2e 20 | 20 46 6f 72 20 65 78 61 |0 to 4. | For exa|
|00002b20| 6d 70 6c 65 2c 20 63 6f | 6e 73 69 64 65 72 20 74 |mple, co|nsider t|
|00002b30| 68 65 20 66 75 6e 63 74 | 69 6f 6e 20 64 65 66 69 |he funct|ion defi|
|00002b40| 6e 69 74 69 6f 6e 0a 58 | 0a 58 20 20 20 20 20 20 |nition.X|.X |
|00002b50| 20 20 20 20 20 20 20 20 | 20 6d 61 69 6e 20 28 61 | | main (a|
|00002b60| 72 67 63 2c 20 61 72 67 | 76 29 0a 58 20 20 20 20 |rgc, arg|v).X |
|00002b70| 20 20 20 20 20 20 20 20 | 20 20 20 69 6e 74 20 61 | | int a|
|00002b80| 72 67 63 3b 0a 58 20 20 | 20 20 20 20 20 20 20 20 |rgc;.X | |
|00002b90| 20 20 20 20 20 63 68 61 | 72 20 2a 61 72 67 76 5b | cha|r *argv[|
|00002ba0| 5d 3b 0a 58 20 20 20 20 | 20 20 20 20 20 20 20 20 |];.X | |
|00002bb0| 20 20 20 7b 0a 58 20 20 | 20 20 20 20 20 20 20 20 | {.X | |
|00002bc0| 20 20 20 20 20 20 2e 2e | 2e 0a 58 20 20 20 20 20 | ..|..X |
|00002bd0| 20 20 20 20 20 20 20 20 | 20 20 7d 0a 58 0a 58 20 | | }.X.X |
|00002be0| 20 20 20 20 20 20 20 20 | 20 49 66 20 74 68 65 20 | | If the |
|00002bf0| 76 61 6c 75 65 20 69 73 | 20 30 2c 20 74 68 65 6e |value is| 0, then|
|00002c00| 20 6e 6f 20 70 72 6f 74 | 6f 74 79 70 65 73 20 61 | no prot|otypes a|
|00002c10| 72 65 20 67 65 6e 65 72 | 61 74 65 64 2e 20 20 57 |re gener|ated. W|
|00002c20| 68 65 6e 20 73 65 74 20 | 74 6f 20 31 2c 0a 58 20 |hen set |to 1,.X |
|00002c30| 20 20 20 20 20 20 20 20 | 20 74 68 65 20 6f 75 74 | | the out|
|00002c40| 70 75 74 20 69 73 3a 0a | 58 0a 58 20 20 20 20 20 |put is:.|X.X |
|00002c50| 20 20 20 20 20 20 20 20 | 20 20 69 6e 74 20 6d 61 | | int ma|
|00002c60| 69 6e 28 2f 2a 69 6e 74 | 20 61 72 67 63 2c 20 63 |in(/*int| argc, c|
|00002c70| 68 61 72 20 2a 61 72 67 | 76 5b 5d 2a 2f 29 3b 0a |har *arg|v[]*/);.|
|00002c80| 58 0a 58 20 20 20 20 20 | 20 20 20 20 20 46 6f 72 |X.X | For|
|00002c90| 20 61 20 76 61 6c 75 65 | 20 6f 66 20 32 2c 20 74 | a value| of 2, t|
|00002ca0| 68 65 20 6f 75 74 70 75 | 74 20 68 61 73 20 74 68 |he outpu|t has th|
|00002cb0| 65 20 66 6f 72 6d 3a 0a | 58 0a 58 20 20 20 20 20 |e form:.|X.X |
|00002cc0| 20 20 20 20 20 20 20 20 | 20 20 69 6e 74 20 6d 61 | | int ma|
|00002cd0| 69 6e 28 69 6e 74 20 2f | 2a 61 72 67 63 2a 2f 2c |in(int /|*argc*/,|
|00002ce0| 20 63 68 61 72 20 2a 2f | 2a 61 72 67 76 2a 2f 5b | char */|*argv*/[|
|00002cf0| 5d 29 3b 0a 58 0a 58 20 | 20 20 20 20 20 20 20 20 |]);.X.X | |
|00002d00| 20 54 68 65 20 64 65 66 | 61 75 6c 74 20 76 61 6c | The def|ault val|
|00002d10| 75 65 20 69 73 20 33 2e | 20 20 49 74 20 70 72 6f |ue is 3.| It pro|
|00002d20| 64 75 63 65 73 20 74 68 | 65 20 66 75 6c 6c 20 66 |duces th|e full f|
|00002d30| 75 6e 63 74 69 6f 6e 20 | 70 72 6f 74 6f 74 79 70 |unction |prototyp|
|00002d40| 65 3a 0a 58 0a 58 20 20 | 20 20 20 20 20 20 20 20 |e:.X.X | |
|00002d50| 20 20 20 20 20 69 6e 74 | 20 6d 61 69 6e 28 69 6e | int| main(in|
|00002d60| 74 20 61 72 67 63 2c 20 | 63 68 61 72 20 2a 61 72 |t argc, |char *ar|
|00002d70| 67 76 5b 5d 29 3b 0a 58 | 0a 58 20 20 20 20 20 20 |gv[]);.X|.X |
|00002d80| 20 20 20 20 41 20 76 61 | 6c 75 65 20 6f 66 20 34 | A va|lue of 4|
|00002d90| 20 70 72 6f 64 75 63 65 | 73 20 70 72 6f 74 6f 74 | produce|s protot|
|00002da0| 79 70 65 73 20 67 75 61 | 72 64 65 64 20 62 79 20 |ypes gua|rded by |
|00002db0| 61 20 6d 61 63 72 6f 3a | 0a 58 0a 58 20 20 20 20 |a macro:|.X.X |
|00002dc0| 20 20 20 20 20 20 20 20 | 20 20 20 69 6e 74 20 6d | | int m|
|00002dd0| 61 69 6e 20 50 5f 28 28 | 69 6e 74 20 61 72 67 63 |ain P_((|int argc|
|00002de0| 2c 20 63 68 61 72 20 2a | 61 72 67 76 5b 5d 29 29 |, char *|argv[]))|
|00002df0| 3b 0a 58 0a 58 0a 58 20 | 20 20 20 20 2d 63 20 20 |;.X.X.X | -c |
|00002e00| 20 4f 6d 69 74 20 74 68 | 65 20 70 61 72 61 6d 65 | Omit th|e parame|
|00002e10| 74 65 72 20 63 6f 6d 6d | 65 6e 74 73 20 69 6e 20 |ter comm|ents in |
|00002e20| 74 68 65 20 70 72 6f 74 | 6f 74 79 70 65 73 20 67 |the prot|otypes g|
|00002e30| 65 6e 65 72 61 74 65 64 | 20 62 79 20 20 74 68 65 |enerated| by the|
|00002e40| 20 20 2d 66 31 0a 58 20 | 20 20 20 20 20 20 20 20 | -f1.X | |
|00002e50| 20 61 6e 64 20 20 2d 66 | 32 20 20 6f 70 74 69 6f | and -f|2 optio|
|00002e60| 6e 73 2e 20 20 20 54 68 | 69 73 20 20 6f 70 74 69 |ns. Th|is opti|
|00002e70| 6f 6e 20 61 6c 73 6f 20 | 6f 6d 69 74 73 20 74 68 |on also |omits th|
|00002e80| 65 20 63 6f 6d 6d 65 6e | 74 73 20 6e 61 6d 69 6e |e commen|ts namin|
|00002e90| 67 20 74 68 65 0a 58 20 | 20 20 20 20 20 20 20 20 |g the.X | |
|00002ea0| 20 73 6f 75 72 63 65 20 | 66 69 6c 65 73 20 66 72 | source |files fr|
|00002eb0| 6f 6d 20 77 68 69 63 68 | 20 74 68 65 20 70 72 6f |om which| the pro|
|00002ec0| 74 6f 74 79 70 65 73 20 | 77 65 72 65 20 67 65 6e |totypes |were gen|
|00002ed0| 65 72 61 74 65 64 2e 0a | 58 0a 58 20 20 20 20 20 |erated..|X.X |
|00002ee0| 2d 6d 6e 61 6d 65 0a 58 | 20 20 20 20 20 20 20 20 |-mname.X| |
|00002ef0| 20 20 53 65 74 20 74 68 | 65 20 6e 61 6d 65 20 6f | Set th|e name o|
|00002f00| 66 20 74 68 65 20 6d 61 | 63 72 6f 20 75 73 65 64 |f the ma|cro used|
|00002f10| 20 74 6f 20 67 75 61 72 | 64 20 70 72 6f 74 6f 74 | to guar|d protot|
|00002f20| 79 70 65 73 20 77 68 65 | 6e 20 20 6f 70 74 69 6f |ypes whe|n optio|
|00002f30| 6e 20 20 2d 66 34 0a 58 | 20 20 20 20 20 20 20 20 |n -f4.X| |
|00002f40| 20 20 69 73 20 73 65 6c | 65 63 74 65 64 2e 20 20 | is sel|ected. |
|00002f50| 54 68 65 20 64 65 66 61 | 75 6c 74 20 69 73 20 22 |The defa|ult is "|
|00002f60| 50 5f 22 2e 0a 58 0a 58 | 20 20 20 20 20 2d 64 20 |P_"..X.X| -d |
|00002f70| 20 20 4f 6d 69 74 20 74 | 68 65 20 64 65 66 69 6e | Omit t|he defin|
|00002f80| 69 74 69 6f 6e 20 6f 66 | 20 74 68 65 20 70 72 6f |ition of| the pro|
|00002f90| 74 6f 74 79 70 65 20 6d | 61 63 72 6f 20 6e 61 6d |totype m|acro nam|
|00002fa0| 65 64 20 62 79 20 74 68 | 65 20 2d 6d 20 6f 70 74 |ed by th|e -m opt|
|00002fb0| 69 6f 6e 2e 0a 58 0a 58 | 20 20 20 20 20 2d 70 20 |ion..X.X| -p |
|00002fc0| 20 20 44 69 73 61 62 6c | 65 20 20 70 72 6f 6d 6f | Disabl|e promo|
|00002fd0| 74 69 6f 6e 20 20 6f 66 | 20 20 66 6f 72 6d 61 6c |tion of| formal|
|00002fe0| 20 20 70 61 72 61 6d 65 | 74 65 72 73 20 20 69 6e | parame|ters in|
|00002ff0| 20 20 6f 6c 64 20 20 73 | 74 79 6c 65 20 20 66 75 | old s|tyle fu|
|00003000| 6e 63 74 69 6f 6e 0a 58 | 20 20 20 20 20 20 20 20 |nction.X| |
|00003010| 20 20 64 65 66 69 6e 69 | 74 69 6f 6e 73 2e 20 20 | defini|tions. |
|00003020| 20 42 79 20 20 64 65 66 | 61 75 6c 74 2c 20 20 70 | By def|ault, p|
|00003030| 61 72 61 6d 65 74 65 72 | 73 20 6f 66 20 74 79 70 |arameter|s of typ|
|00003040| 65 20 63 68 61 72 20 6f | 72 20 73 68 6f 72 74 20 |e char o|r short |
|00003050| 69 6e 20 6f 6c 64 0a 58 | 20 20 20 20 20 20 20 20 |in old.X| |
|00003060| 20 20 73 74 79 6c 65 20 | 66 75 6e 63 74 69 6f 6e | style |function|
|00003070| 20 64 65 66 69 6e 69 74 | 69 6f 6e 73 20 61 72 65 | definit|ions are|
|00003080| 20 70 72 6f 6d 6f 74 65 | 64 20 74 6f 20 74 79 70 | promote|d to typ|
|00003090| 65 20 69 6e 74 20 69 6e | 20 74 68 65 20 20 66 75 |e int in| the fu|
|000030a0| 6e 63 74 69 6f 6e 0a 58 | 20 20 20 20 20 20 20 20 |nction.X| |
|000030b0| 20 20 70 72 6f 74 6f 74 | 79 70 65 20 20 6f 72 20 | protot|ype or |
|000030c0| 20 63 6f 6e 76 65 72 74 | 65 64 20 20 41 4e 53 49 | convert|ed ANSI|
|000030d0| 20 43 20 66 75 6e 63 74 | 69 6f 6e 20 64 65 66 69 | C funct|ion defi|
|000030e0| 6e 69 74 69 6f 6e 2e 20 | 20 50 61 72 61 6d 65 74 |nition. | Paramet|
|000030f0| 65 72 73 20 6f 66 0a 58 | 20 20 20 20 20 20 20 20 |ers of.X| |
|00003100| 20 20 74 79 70 65 20 66 | 6c 6f 61 74 20 67 65 74 | type f|loat get|
|00003110| 20 70 72 6f 6d 6f 74 65 | 64 20 74 6f 20 64 6f 75 | promote|d to dou|
|00003120| 62 6c 65 20 61 73 20 77 | 65 6c 6c 2e 0a 58 0a 58 |ble as w|ell..X.X|
|00003130| 0a 58 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |.X | |
|00003140| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003150| 20 20 41 70 72 69 6c 20 | 33 2c 20 31 39 39 32 20 | April |3, 1992 |
|00003160| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003170| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 32 | | 2|
|00003180| 0a 58 0a 58 0a 58 0c 0a | 58 0a 58 43 50 52 4f 54 |.X.X.X..|X.XCPROT|
|00003190| 4f 28 31 29 20 20 20 20 | 20 20 20 20 20 20 20 20 |O(1) | |
|000031a0| 20 20 20 20 20 20 55 6e | 69 78 20 50 72 6f 67 72 | Un|ix Progr|
|000031b0| 61 6d 6d 65 72 27 73 20 | 4d 61 6e 75 61 6c 20 20 |ammer's |Manual |
|000031c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000031d0| 43 50 52 4f 54 4f 28 31 | 29 0a 58 0a 58 0a 58 20 |CPROTO(1|).X.X.X |
|000031e0| 20 20 20 20 2d 73 20 20 | 20 42 79 20 64 65 66 61 | -s | By defa|
|000031f0| 75 6c 74 2c 20 63 70 72 | 6f 74 6f 20 6f 6e 6c 79 |ult, cpr|oto only|
|00003200| 20 67 65 6e 65 72 61 74 | 65 73 20 20 64 65 63 6c | generat|es decl|
|00003210| 61 72 61 74 69 6f 6e 73 | 20 20 66 6f 72 20 20 66 |arations| for f|
|00003220| 75 6e 63 74 69 6f 6e 73 | 20 20 61 6e 64 0a 58 20 |unctions| and.X |
|00003230| 20 20 20 20 20 20 20 20 | 20 76 61 72 69 61 62 6c | | variabl|
|00003240| 65 73 20 20 68 61 76 69 | 6e 67 20 20 67 6c 6f 62 |es havi|ng glob|
|00003250| 61 6c 20 20 73 63 6f 70 | 65 2e 20 20 20 54 68 69 |al scop|e. Thi|
|00003260| 73 20 20 6f 70 74 69 6f | 6e 20 20 77 69 6c 6c 20 |s optio|n will |
|00003270| 6f 75 74 70 75 74 20 73 | 74 61 74 69 63 0a 58 20 |output s|tatic.X |
|00003280| 20 20 20 20 20 20 20 20 | 20 64 65 63 6c 61 72 61 | | declara|
|00003290| 74 69 6f 6e 73 20 61 73 | 20 77 65 6c 6c 2e 0a 58 |tions as| well..X|
|000032a0| 0a 58 20 20 20 20 20 2d | 74 20 20 20 43 6f 6e 76 |.X -|t Conv|
|000032b0| 65 72 74 20 20 66 75 6e | 63 74 69 6f 6e 20 20 64 |ert fun|ction d|
|000032c0| 65 66 69 6e 69 74 69 6f | 6e 73 20 20 66 72 6f 6d |efinitio|ns from|
|000032d0| 20 20 74 68 65 20 20 41 | 4e 53 49 20 20 43 20 20 | the A|NSI C |
|000032e0| 73 74 79 6c 65 20 20 20 | 74 6f 20 20 20 74 68 65 |style |to the|
|000032f0| 0a 58 20 20 20 20 20 20 | 20 20 20 20 74 72 61 64 |.X | trad|
|00003300| 69 74 69 6f 6e 61 6c 20 | 73 74 79 6c 65 2e 0a 58 |itional |style..X|
|00003310| 0a 58 20 20 20 20 20 2d | 76 20 20 20 41 6c 73 6f |.X -|v Also|
|00003320| 20 6f 75 74 70 75 74 20 | 64 65 63 6c 61 72 61 74 | output |declarat|
|00003330| 69 6f 6e 73 20 66 6f 72 | 20 76 61 72 69 61 62 6c |ions for| variabl|
|00003340| 65 73 20 64 65 66 69 6e | 65 64 20 69 6e 20 74 68 |es defin|ed in th|
|00003350| 65 20 73 6f 75 72 63 65 | 2e 0a 58 0a 58 20 20 20 |e source|..X.X |
|00003360| 20 20 2d 50 74 65 6d 70 | 6c 61 74 65 0a 58 20 20 | -Ptemp|late.X |
|00003370| 20 20 20 2d 46 74 65 6d | 70 6c 61 74 65 0a 58 20 | -Ftem|plate.X |
|00003380| 20 20 20 20 2d 43 74 65 | 6d 70 6c 61 74 65 0a 58 | -Cte|mplate.X|
|00003390| 20 20 20 20 20 20 20 20 | 20 20 53 65 74 20 20 74 | | Set t|
|000033a0| 68 65 20 20 6f 75 74 70 | 75 74 20 20 20 66 6f 72 |he outp|ut for|
|000033b0| 6d 61 74 20 20 20 66 6f | 72 20 20 20 67 65 6e 65 |mat fo|r gene|
|000033c0| 72 61 74 65 64 20 20 20 | 70 72 6f 74 6f 74 79 70 |rated |prototyp|
|000033d0| 65 73 2c 20 20 20 66 75 | 6e 63 74 69 6f 6e 0a 58 |es, fu|nction.X|
|000033e0| 20 20 20 20 20 20 20 20 | 20 20 64 65 66 69 6e 69 | | defini|
|000033f0| 74 69 6f 6e 73 2c 20 20 | 20 61 6e 64 20 20 66 75 |tions, | and fu|
|00003400| 6e 63 74 69 6f 6e 20 20 | 64 65 66 69 6e 69 74 69 |nction |definiti|
|00003410| 6f 6e 73 20 20 77 69 74 | 68 20 20 70 61 72 61 6d |ons wit|h param|
|00003420| 65 74 65 72 20 20 63 6f | 6d 6d 65 6e 74 73 0a 58 |eter co|mments.X|
|00003430| 20 20 20 20 20 20 20 20 | 20 20 72 65 73 70 65 63 | | respec|
|00003440| 74 69 76 65 6c 79 2e 20 | 20 54 68 65 20 66 6f 72 |tively. | The for|
|00003450| 6d 61 74 20 69 73 20 73 | 70 65 63 69 66 69 65 64 |mat is s|pecified|
|00003460| 20 62 79 20 61 20 74 65 | 6d 70 6c 61 74 65 20 69 | by a te|mplate i|
|00003470| 6e 20 74 68 65 20 66 6f | 72 6d 0a 58 0a 58 20 20 |n the fo|rm.X.X |
|00003480| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 22 20 69 | | " i|
|00003490| 6e 74 20 6d 61 69 6e 20 | 28 20 61 2c 20 62 20 29 |nt main |( a, b )|
|000034a0| 22 0a 58 0a 58 20 20 20 | 20 20 20 20 20 20 20 62 |".X.X | b|
|000034b0| 75 74 20 79 6f 75 20 6d | 61 79 20 72 65 70 6c 61 |ut you m|ay repla|
|000034c0| 63 65 20 65 61 63 68 20 | 73 70 61 63 65 20 69 6e |ce each |space in|
|000034d0| 20 74 68 69 73 20 73 74 | 72 69 6e 67 20 20 77 69 | this st|ring wi|
|000034e0| 74 68 20 20 61 6e 79 20 | 20 6e 75 6d 62 65 72 20 |th any | number |
|000034f0| 20 6f 66 0a 58 20 20 20 | 20 20 20 20 20 20 20 77 | of.X | w|
|00003500| 68 69 74 65 73 70 61 63 | 65 20 63 68 61 72 61 63 |hitespac|e charac|
|00003510| 74 65 72 73 2e 20 20 46 | 6f 72 20 65 78 61 6d 70 |ters. F|or examp|
|00003520| 6c 65 2c 20 74 68 65 20 | 6f 70 74 69 6f 6e 0a 58 |le, the |option.X|
|00003530| 0a 58 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |.X | |
|00003540| 20 2d 46 22 69 6e 74 20 | 6d 61 69 6e 28 5c 6e 5c | -F"int |main(\n\|
|00003550| 74 61 2c 5c 6e 5c 74 62 | 5c 6e 5c 74 29 22 0a 58 |ta,\n\tb|\n\t)".X|
|00003560| 0a 58 20 20 20 20 20 20 | 20 20 20 20 77 69 6c 6c |.X | will|
|00003570| 20 70 72 6f 64 75 63 65 | 0a 58 0a 58 20 20 20 20 | produce|.X.X |
|00003580| 20 20 20 20 20 20 20 20 | 20 20 20 69 6e 74 20 6d | | int m|
|00003590| 61 69 6e 28 0a 58 20 20 | 20 20 20 20 20 20 20 20 |ain(.X | |
|000035a0| 20 20 20 20 20 20 20 20 | 20 20 69 6e 74 20 61 72 | | int ar|
|000035b0| 67 63 2c 0a 58 20 20 20 | 20 20 20 20 20 20 20 20 |gc,.X | |
|000035c0| 20 20 20 20 20 20 20 20 | 20 63 68 61 72 20 2a 61 | | char *a|
|000035d0| 72 67 76 5b 5d 0a 58 20 | 20 20 20 20 20 20 20 20 |rgv[].X | |
|000035e0| 20 20 20 20 20 20 20 20 | 20 20 20 29 0a 58 0a 58 | | ).X.X|
|000035f0| 0a 58 20 20 20 20 20 2d | 44 6e 61 6d 65 5c 5b 3d |.X -|Dname\[=|
|00003600| 76 61 6c 75 65 5c 5d 0a | 58 20 20 20 20 20 20 20 |value\].|X |
|00003610| 20 20 20 54 68 69 73 20 | 6f 70 74 69 6f 6e 20 69 | This |option i|
|00003620| 73 20 70 61 73 73 65 64 | 20 74 68 72 6f 75 67 68 |s passed| through|
|00003630| 20 74 6f 20 74 68 65 20 | 70 72 65 70 72 6f 63 65 | to the |preproce|
|00003640| 73 73 6f 72 20 20 61 6e | 64 20 20 69 73 20 20 75 |ssor an|d is u|
|00003650| 73 65 64 20 20 74 6f 0a | 58 20 20 20 20 20 20 20 |sed to.|X |
|00003660| 20 20 20 64 65 66 69 6e | 65 20 73 79 6d 62 6f 6c | defin|e symbol|
|00003670| 73 20 66 6f 72 20 75 73 | 65 20 77 69 74 68 20 63 |s for us|e with c|
|00003680| 6f 6e 64 69 74 69 6f 6e | 61 6c 73 20 73 75 63 68 |ondition|als such|
|00003690| 20 61 73 20 23 69 66 64 | 65 66 2e 0a 58 0a 58 20 | as #ifd|ef..X.X |
|000036a0| 20 20 20 20 2d 55 6e 61 | 6d 65 0a 58 20 20 20 20 | -Una|me.X |
|000036b0| 20 20 20 20 20 20 54 68 | 69 73 20 6f 70 74 69 6f | Th|is optio|
|000036c0| 6e 20 69 73 20 70 61 73 | 73 65 64 20 74 68 72 6f |n is pas|sed thro|
|000036d0| 75 67 68 20 74 6f 20 74 | 68 65 20 70 72 65 70 72 |ugh to t|he prepr|
|000036e0| 6f 63 65 73 73 6f 72 20 | 20 61 6e 64 20 20 69 73 |ocessor | and is|
|000036f0| 20 20 75 73 65 64 20 20 | 74 6f 0a 58 20 20 20 20 | used |to.X |
|00003700| 20 20 20 20 20 20 72 65 | 6d 6f 76 65 20 61 6e 79 | re|move any|
|00003710| 20 64 65 66 69 6e 69 74 | 69 6f 6e 73 20 6f 66 20 | definit|ions of |
|00003720| 74 68 69 73 20 73 79 6d | 62 6f 6c 2e 0a 58 0a 58 |this sym|bol..X.X|
|00003730| 20 20 20 20 20 2d 49 64 | 69 72 65 63 74 6f 72 79 | -Id|irectory|
|00003740| 0a 58 20 20 20 20 20 20 | 20 20 20 20 54 68 69 73 |.X | This|
|00003750| 20 6f 70 74 69 6f 6e 20 | 69 73 20 70 61 73 73 65 | option |is passe|
|00003760| 64 20 74 68 72 6f 75 67 | 68 20 74 6f 20 74 68 65 |d throug|h to the|
|00003770| 20 70 72 65 70 72 6f 63 | 65 73 73 6f 72 20 20 61 | preproc|essor a|
|00003780| 6e 64 20 20 69 73 20 20 | 75 73 65 64 20 20 74 6f |nd is |used to|
|00003790| 0a 58 20 20 20 20 20 20 | 20 20 20 20 73 70 65 63 |.X | spec|
|000037a0| 69 66 79 20 20 61 20 20 | 64 69 72 65 63 74 6f 72 |ify a |director|
|000037b0| 79 20 20 74 6f 20 20 73 | 65 61 72 63 68 20 66 6f |y to s|earch fo|
|000037c0| 72 20 66 69 6c 65 73 20 | 74 68 61 74 20 61 72 65 |r files |that are|
|000037d0| 20 72 65 66 65 72 65 6e | 63 65 64 20 77 69 74 68 | referen|ced with|
|000037e0| 0a 58 20 20 20 20 20 20 | 20 20 20 20 23 69 6e 63 |.X | #inc|
|000037f0| 6c 75 64 65 2e 0a 58 0a | 58 20 20 20 20 20 2d 56 |lude..X.|X -V|
|00003800| 20 20 20 50 72 69 6e 74 | 20 76 65 72 73 69 6f 6e | Print| version|
|00003810| 20 69 6e 66 6f 72 6d 61 | 74 69 6f 6e 2e 0a 58 0a | informa|tion..X.|
|00003820| 58 45 4e 56 49 52 4f 4e | 4d 45 4e 54 0a 58 20 20 |XENVIRON|MENT.X |
|00003830| 20 20 20 54 68 65 20 65 | 6e 76 69 72 6f 6e 6d 65 | The e|nvironme|
|00003840| 6e 74 20 76 61 72 69 61 | 62 6c 65 20 43 50 52 4f |nt varia|ble CPRO|
|00003850| 54 4f 20 69 73 20 73 63 | 61 6e 6e 65 64 20 66 6f |TO is sc|anned fo|
|00003860| 72 20 61 20 6c 69 73 74 | 20 6f 66 20 6f 70 74 69 |r a list| of opti|
|00003870| 6f 6e 73 20 20 69 6e 20 | 20 74 68 65 0a 58 20 20 |ons in | the.X |
|00003880| 20 20 20 73 61 6d 65 20 | 66 6f 72 6d 61 74 20 61 | same |format a|
|00003890| 73 20 74 68 65 20 63 6f | 6d 6d 61 6e 64 20 6c 69 |s the co|mmand li|
|000038a0| 6e 65 20 6f 70 74 69 6f | 6e 73 2e 0a 58 0a 58 42 |ne optio|ns..X.XB|
|000038b0| 55 47 53 0a 58 20 20 20 | 20 20 49 66 20 61 6e 20 |UGS.X | If an |
|000038c0| 75 6e 74 61 67 67 65 64 | 20 73 74 72 75 63 74 2c |untagged| struct,|
|000038d0| 20 75 6e 69 6f 6e 20 6f | 72 20 65 6e 75 6d 20 64 | union o|r enum d|
|000038e0| 65 63 6c 61 72 61 74 69 | 6f 6e 20 61 70 70 65 61 |eclarati|on appea|
|000038f0| 72 73 20 69 6e 20 20 61 | 20 20 67 65 6e 65 72 61 |rs in a| genera|
|00003900| 74 65 64 0a 58 20 20 20 | 20 20 66 75 6e 63 74 69 |ted.X | functi|
|00003910| 6f 6e 20 20 70 72 6f 74 | 6f 74 79 70 65 20 20 6f |on prot|otype o|
|00003920| 72 20 63 6f 6e 76 65 72 | 74 65 64 20 66 75 6e 63 |r conver|ted func|
|00003930| 74 69 6f 6e 20 64 65 66 | 69 6e 69 74 69 6f 6e 2c |tion def|inition,|
|00003940| 20 74 68 65 20 63 6f 6e | 74 65 6e 74 20 6f 66 20 | the con|tent of |
|00003950| 74 68 65 0a 58 20 20 20 | 20 20 64 65 63 6c 61 72 |the.X | declar|
|00003960| 61 74 69 6f 6e 20 62 65 | 74 77 65 65 6e 20 74 68 |ation be|tween th|
|00003970| 65 20 62 72 61 63 65 73 | 20 69 73 20 65 6d 70 74 |e braces| is empt|
|00003980| 79 2e 0a 58 0a 58 0a 58 | 0a 58 0a 58 20 20 20 20 |y..X.X.X|.X.X |
|00003990| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000039a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 41 70 72 69 | | Apri|
|000039b0| 6c 20 33 2c 20 31 39 39 | 32 20 20 20 20 20 20 20 |l 3, 199|2 |
|000039c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000039d0| 20 20 20 20 20 20 20 20 | 20 33 0a 58 0a 58 0a 58 | | 3.X.X.X|
|000039e0| 0c 0a 58 0a 58 43 50 52 | 4f 54 4f 28 31 29 20 20 |..X.XCPR|OTO(1) |
|000039f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003a00| 55 6e 69 78 20 50 72 6f | 67 72 61 6d 6d 65 72 27 |Unix Pro|grammer'|
|00003a10| 73 20 4d 61 6e 75 61 6c | 20 20 20 20 20 20 20 20 |s Manual| |
|00003a20| 20 20 20 20 20 20 20 20 | 20 20 43 50 52 4f 54 4f | | CPROTO|
|00003a30| 28 31 29 0a 58 0a 58 0a | 58 20 20 20 20 20 54 68 |(1).X.X.|X Th|
|00003a40| 65 20 70 72 6f 67 72 61 | 6d 20 64 6f 65 73 20 6e |e progra|m does n|
|00003a50| 6f 74 20 70 69 70 65 20 | 74 68 65 20 73 6f 75 72 |ot pipe |the sour|
|00003a60| 63 65 20 66 69 6c 65 73 | 20 20 74 68 72 6f 75 67 |ce files| throug|
|00003a70| 68 20 20 74 68 65 20 20 | 43 20 20 70 72 65 70 72 |h the |C prepr|
|00003a80| 6f 63 65 73 73 6f 72 0a | 58 20 20 20 20 20 77 68 |ocessor.|X wh|
|00003a90| 65 6e 20 20 69 74 20 69 | 73 20 63 6f 6e 76 65 72 |en it i|s conver|
|00003aa0| 74 69 6e 67 20 66 75 6e | 63 74 69 6f 6e 20 64 65 |ting fun|ction de|
|00003ab0| 66 69 6e 69 74 69 6f 6e | 73 2e 20 20 49 6e 73 74 |finition|s. Inst|
|00003ac0| 65 61 64 2c 20 69 74 20 | 74 72 69 65 73 20 74 6f |ead, it |tries to|
|00003ad0| 20 68 61 6e 64 6c 65 0a | 58 20 20 20 20 20 70 72 | handle.|X pr|
|00003ae0| 65 70 72 6f 63 65 73 73 | 6f 72 20 64 69 72 65 63 |eprocess|or direc|
|00003af0| 74 69 76 65 73 20 61 6e | 64 20 6d 61 63 72 6f 73 |tives an|d macros|
|00003b00| 20 69 74 73 65 6c 66 20 | 61 6e 64 20 63 61 6e 20 | itself |and can |
|00003b10| 62 65 20 63 6f 6e 66 75 | 73 65 64 20 20 62 79 20 |be confu|sed by |
|00003b20| 20 74 72 69 63 6b 79 0a | 58 20 20 20 20 20 6d 61 | tricky.|X ma|
|00003b30| 63 72 6f 20 20 65 78 70 | 61 6e 73 69 6f 6e 73 2e |cro exp|ansions.|
|00003b40| 20 20 20 54 68 65 20 20 | 63 6f 6e 76 65 72 73 69 | The |conversi|
|00003b50| 6f 6e 20 20 61 6c 73 6f | 20 20 64 69 73 63 61 72 |on also| discar|
|00003b60| 64 73 20 73 6f 6d 65 20 | 63 6f 6d 6d 65 6e 74 73 |ds some |comments|
|00003b70| 20 69 6e 20 74 68 65 0a | 58 20 20 20 20 20 66 75 | in the.|X fu|
|00003b80| 6e 63 74 69 6f 6e 20 64 | 65 66 69 6e 69 74 69 6f |nction d|efinitio|
|00003b90| 6e 20 68 65 61 64 2e 0a | 58 0a 58 20 20 20 20 20 |n head..|X.X |
|00003ba0| 54 68 65 20 2d 76 20 6f | 70 74 69 6f 6e 20 64 6f |The -v o|ption do|
|00003bb0| 65 73 20 6e 6f 74 20 67 | 65 6e 65 72 61 74 65 20 |es not g|enerate |
|00003bc0| 64 65 63 6c 61 72 61 74 | 69 6f 6e 73 20 66 6f 72 |declarat|ions for|
|00003bd0| 20 76 61 72 69 61 62 6c | 65 73 20 20 64 65 66 69 | variabl|es defi|
|00003be0| 6e 65 64 20 20 77 69 74 | 68 0a 58 20 20 20 20 20 |ned wit|h.X |
|00003bf0| 74 68 65 20 20 65 78 74 | 65 72 6e 20 20 73 70 65 |the ext|ern spe|
|00003c00| 63 69 66 69 65 72 2e 20 | 20 20 54 68 69 73 20 64 |cifier. | This d|
|00003c10| 6f 65 73 6e 27 74 20 73 | 74 72 69 63 74 6c 79 20 |oesn't s|trictly |
|00003c20| 63 6f 6e 66 6f 72 6d 20 | 74 6f 20 74 68 65 20 43 |conform |to the C|
|00003c30| 20 6c 61 6e 67 75 61 67 | 65 0a 58 20 20 20 20 20 | languag|e.X |
|00003c40| 73 74 61 6e 64 61 72 64 | 20 62 75 74 20 74 68 69 |standard| but thi|
|00003c50| 73 20 72 75 6c 65 20 77 | 61 73 20 69 6d 70 6c 65 |s rule w|as imple|
|00003c60| 6d 65 6e 74 65 64 20 20 | 62 65 63 61 75 73 65 20 |mented |because |
|00003c70| 20 69 6e 63 6c 75 64 65 | 20 20 66 69 6c 65 73 20 | include| files |
|00003c80| 20 63 6f 6d 6d 6f 6e 6c | 79 0a 58 20 20 20 20 20 | commonl|y.X |
|00003c90| 64 65 63 6c 61 72 65 20 | 76 61 72 69 61 62 6c 65 |declare |variable|
|00003ca0| 73 20 74 68 69 73 20 77 | 61 79 2e 0a 58 0a 58 20 |s this w|ay..X.X |
|00003cb0| 20 20 20 20 57 68 65 6e | 20 74 68 65 20 70 72 6f | When| the pro|
|00003cc0| 67 72 61 6d 20 65 6e 63 | 6f 75 6e 74 65 72 73 20 |gram enc|ounters |
|00003cd0| 61 6e 20 65 72 72 6f 72 | 2c 20 69 74 20 75 73 75 |an error|, it usu|
|00003ce0| 61 6c 6c 79 20 20 6f 75 | 74 70 75 74 73 20 20 74 |ally ou|tputs t|
|00003cf0| 68 65 20 20 6e 6f 74 20 | 20 76 65 72 79 0a 58 20 |he not | very.X |
|00003d00| 20 20 20 20 64 65 73 63 | 72 69 70 74 69 76 65 20 | desc|riptive |
|00003d10| 6d 65 73 73 61 67 65 20 | 22 73 79 6e 74 61 78 20 |message |"syntax |
|00003d20| 65 72 72 6f 72 22 2e 0a | 58 0a 58 20 20 20 20 20 |error"..|X.X |
|00003d30| 4f 70 74 69 6f 6e 73 20 | 74 68 61 74 20 74 61 6b |Options |that tak|
|00003d40| 65 20 73 74 72 69 6e 67 | 20 61 72 67 75 6d 65 6e |e string| argumen|
|00003d50| 74 73 20 6f 6e 6c 79 20 | 69 6e 74 65 72 70 72 65 |ts only |interpre|
|00003d60| 74 20 74 68 65 20 66 6f | 6c 6c 6f 77 69 6e 67 20 |t the fo|llowing |
|00003d70| 63 68 61 72 61 63 74 65 | 72 0a 58 20 20 20 20 20 |characte|r.X |
|00003d80| 65 73 63 61 70 65 20 73 | 65 71 75 65 6e 63 65 73 |escape s|equences|
|00003d90| 3a 0a 58 0a 58 20 20 20 | 20 20 20 20 20 20 20 5c |:.X.X | \|
|00003da0| 6e 20 20 20 6e 65 77 6c | 69 6e 65 0a 58 20 20 20 |n newl|ine.X |
|00003db0| 20 20 20 20 20 20 20 5c | 74 20 20 20 74 61 62 0a | \|t tab.|
|00003dc0| 58 0a 58 0a 58 41 55 54 | 48 4f 52 0a 58 20 20 20 |X.X.XAUT|HOR.X |
|00003dd0| 20 20 43 68 69 6e 20 48 | 75 61 6e 67 0a 58 20 20 | Chin H|uang.X |
|00003de0| 20 20 20 63 74 68 75 61 | 6e 67 40 7a 65 72 6f 73 | cthua|ng@zeros|
|00003df0| 61 6e 2e 55 55 43 50 0a | 58 20 20 20 20 20 63 68 |an.UUCP.|X ch|
|00003e00| 69 6e 2e 68 75 61 6e 67 | 40 63 61 6e 72 65 6d 2e |in.huang|@canrem.|
|00003e10| 63 6f 6d 0a 58 0a 58 53 | 45 45 20 41 4c 53 4f 0a |com.X.XS|EE ALSO.|
|00003e20| 58 20 20 20 20 20 63 63 | 28 31 29 2c 20 63 70 70 |X cc|(1), cpp|
|00003e30| 28 31 29 0a 58 0a 58 0a | 58 0a 58 0a 58 0a 58 0a |(1).X.X.|X.X.X.X.|
|00003e40| 58 0a 58 0a 58 0a 58 0a | 58 0a 58 0a 58 0a 58 0a |X.X.X.X.|X.X.X.X.|
|00003e50| 58 0a 58 0a 58 0a 58 0a | 58 0a 58 0a 58 0a 58 0a |X.X.X.X.|X.X.X.X.|
|00003e60| 58 0a 58 0a 58 0a 58 0a | 58 0a 58 0a 58 0a 58 0a |X.X.X.X.|X.X.X.X.|
|00003e70| 58 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |X | |
|00003e80| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003e90| 20 41 70 72 69 6c 20 33 | 2c 20 31 39 39 32 20 20 | April 3|, 1992 |
|00003ea0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003eb0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 34 0a | | 4.|
|00003ec0| 58 0a 58 0a 45 4e 44 5f | 4f 46 5f 63 70 72 6f 74 |X.X.END_|OF_cprot|
|00003ed0| 6f 2e 6d 61 6e 0a 69 66 | 20 74 65 73 74 20 37 35 |o.man.if| test 75|
|00003ee0| 32 31 20 2d 6e 65 20 60 | 77 63 20 2d 63 20 3c 63 |21 -ne `|wc -c <c|
|00003ef0| 70 72 6f 74 6f 2e 6d 61 | 6e 60 3b 20 74 68 65 6e |proto.ma|n`; then|
|00003f00| 0a 20 20 20 20 65 63 68 | 6f 20 73 68 61 72 3a 20 |. ech|o shar: |
|00003f10| 5c 22 63 70 72 6f 74 6f | 2e 6d 61 6e 5c 22 20 75 |\"cproto|.man\" u|
|00003f20| 6e 70 61 63 6b 65 64 20 | 77 69 74 68 20 77 72 6f |npacked |with wro|
|00003f30| 6e 67 20 73 69 7a 65 21 | 0a 66 69 0a 23 20 65 6e |ng size!|.fi.# en|
|00003f40| 64 20 6f 66 20 6f 76 65 | 72 77 72 69 74 69 6e 67 |d of ove|rwriting|
|00003f50| 20 63 68 65 63 6b 0a 66 | 69 0a 69 66 20 74 65 73 | check.f|i.if tes|
|00003f60| 74 20 2d 66 20 63 70 72 | 6f 74 6f 2e 31 20 2d 61 |t -f cpr|oto.1 -a|
|00003f70| 20 22 24 7b 31 7d 22 20 | 21 3d 20 22 2d 63 22 20 | "${1}" |!= "-c" |
|00003f80| 3b 20 74 68 65 6e 20 0a | 20 20 65 63 68 6f 20 73 |; then .| echo s|
|00003f90| 68 61 72 3a 20 57 69 6c | 6c 20 6e 6f 74 20 6f 76 |har: Wil|l not ov|
|00003fa0| 65 72 2d 77 72 69 74 65 | 20 65 78 69 73 74 69 6e |er-write| existin|
|00003fb0| 67 20 66 69 6c 65 20 5c | 22 63 70 72 6f 74 6f 2e |g file \|"cproto.|
|00003fc0| 31 5c 22 0a 65 6c 73 65 | 0a 65 63 68 6f 20 73 68 |1\".else|.echo sh|
|00003fd0| 61 72 3a 20 45 78 74 72 | 61 63 74 69 6e 67 20 5c |ar: Extr|acting \|
|00003fe0| 22 63 70 72 6f 74 6f 2e | 31 5c 22 20 5c 28 36 30 |"cproto.|1\" \(60|
|00003ff0| 39 31 20 63 68 61 72 61 | 63 74 65 72 73 5c 29 0a |91 chara|cters\).|
|00004000| 73 65 64 20 22 73 2f 5e | 58 2f 2f 22 20 3e 63 70 |sed "s/^|X//" >cp|
|00004010| 72 6f 74 6f 2e 31 20 3c | 3c 27 45 4e 44 5f 4f 46 |roto.1 <|<'END_OF|
|00004020| 5f 63 70 72 6f 74 6f 2e | 31 27 0a 58 2e 5c 22 20 |_cproto.|1'.X.\" |
|00004030| 24 49 64 3a 20 63 70 72 | 6f 74 6f 2e 31 20 33 2e |$Id: cpr|oto.1 3.|
|00004040| 34 20 39 32 2f 30 34 2f | 30 34 20 31 34 3a 30 31 |4 92/04/|04 14:01|
|00004050| 3a 35 32 20 63 74 68 75 | 61 6e 67 20 45 78 70 20 |:52 cthu|ang Exp |
|00004060| 24 0a 58 2e 5c 22 0a 58 | 2e 64 65 20 45 58 09 09 |$.X.\".X|.de EX..|
|00004070| 5c 22 42 65 67 69 6e 20 | 65 78 61 6d 70 6c 65 0a |\"Begin |example.|
|00004080| 58 2e 6e 65 20 35 0a 58 | 2e 69 66 20 6e 20 2e 73 |X.ne 5.X|.if n .s|
|00004090| 70 20 31 0a 58 2e 69 66 | 20 74 20 2e 73 70 20 2e |p 1.X.if| t .sp .|
|000040a0| 35 0a 58 2e 6e 66 0a 58 | 2e 69 6e 20 2b 35 6e 0a |5.X.nf.X|.in +5n.|
|000040b0| 58 2e 2e 0a 58 2e 64 65 | 20 45 45 09 09 5c 22 45 |X...X.de| EE..\"E|
|000040c0| 6e 64 20 65 78 61 6d 70 | 6c 65 0a 58 2e 66 69 0a |nd examp|le.X.fi.|
|000040d0| 58 2e 69 6e 20 2d 35 6e | 0a 58 2e 69 66 20 6e 20 |X.in -5n|.X.if n |
|000040e0| 2e 73 70 20 31 0a 58 2e | 69 66 20 74 20 2e 73 70 |.sp 1.X.|if t .sp|
|000040f0| 20 2e 35 0a 58 2e 2e 0a | 58 2e 54 48 20 43 50 52 | .5.X...|X.TH CPR|
|00004100| 4f 54 4f 20 31 20 22 41 | 70 72 69 6c 20 33 2c 20 |OTO 1 "A|pril 3, |
|00004110| 31 39 39 32 22 0a 58 2e | 53 48 20 4e 41 4d 45 0a |1992".X.|SH NAME.|
|00004120| 58 63 70 72 6f 74 6f 20 | 5c 2d 20 67 65 6e 65 72 |Xcproto |\- gener|
|00004130| 61 74 65 20 43 20 66 75 | 6e 63 74 69 6f 6e 20 70 |ate C fu|nction p|
|00004140| 72 6f 74 6f 74 79 70 65 | 73 20 61 6e 64 20 63 6f |rototype|s and co|
|00004150| 6e 76 65 72 74 20 66 75 | 6e 63 74 69 6f 6e 20 64 |nvert fu|nction d|
|00004160| 65 66 69 6e 69 74 69 6f | 6e 73 0a 58 2e 53 48 20 |efinitio|ns.X.SH |
|00004170| 53 59 4e 4f 50 53 49 53 | 0a 58 2e 42 20 63 70 72 |SYNOPSIS|.X.B cpr|
|00004180| 6f 74 6f 0a 58 5b 20 0a | 58 2e 49 20 6f 70 74 69 |oto.X[ .|X.I opti|
|00004190| 6f 6e 20 5c 66 50 2e 2e | 2e 5c 66 49 0a 58 5d 20 |on \fP..|.\fI.X] |
|000041a0| 5b 0a 58 2e 49 20 66 69 | 6c 65 20 5c 66 50 2e 2e |[.X.I fi|le \fP..|
|000041b0| 2e 5c 66 49 0a 58 5d 0a | 58 2e 53 48 20 44 45 53 |.\fI.X].|X.SH DES|
|000041c0| 43 52 49 50 54 49 4f 4e | 0a 58 2e 42 20 43 70 72 |CRIPTION|.X.B Cpr|
|000041d0| 6f 74 6f 0a 58 67 65 6e | 65 72 61 74 65 73 20 66 |oto.Xgen|erates f|
|000041e0| 75 6e 63 74 69 6f 6e 20 | 70 72 6f 74 6f 74 79 70 |unction |prototyp|
|000041f0| 65 73 20 66 6f 72 0a 58 | 66 75 6e 63 74 69 6f 6e |es for.X|function|
|00004200| 73 20 64 65 66 69 6e 65 | 64 20 69 6e 20 74 68 65 |s define|d in the|
|00004210| 20 73 70 65 63 69 66 69 | 65 64 20 43 20 73 6f 75 | specifi|ed C sou|
|00004220| 72 63 65 20 66 69 6c 65 | 73 20 74 6f 20 74 68 65 |rce file|s to the|
|00004230| 20 73 74 61 6e 64 61 72 | 64 20 6f 75 74 70 75 74 | standar|d output|
|00004240| 2e 0a 58 54 68 65 20 66 | 75 6e 63 74 69 6f 6e 20 |..XThe f|unction |
|00004250| 64 65 66 69 6e 69 74 69 | 6f 6e 73 20 6d 61 79 20 |definiti|ons may |
|00004260| 62 65 20 69 6e 20 74 68 | 65 20 6f 6c 64 20 73 74 |be in th|e old st|
|00004270| 79 6c 65 20 6f 72 20 41 | 4e 53 49 20 43 20 73 74 |yle or A|NSI C st|
|00004280| 79 6c 65 2e 0a 58 4f 70 | 74 69 6f 6e 61 6c 6c 79 |yle..XOp|tionally|
|00004290| 2c 0a 58 2e 42 20 63 70 | 72 6f 74 6f 0a 58 61 6c |,.X.B cp|roto.Xal|
|000042a0| 73 6f 20 6f 75 74 70 75 | 74 73 20 64 65 63 6c 61 |so outpu|ts decla|
|000042b0| 72 61 74 69 6f 6e 73 20 | 66 6f 72 20 61 6e 79 20 |rations |for any |
|000042c0| 76 61 72 69 61 62 6c 65 | 73 20 64 65 66 69 6e 65 |variable|s define|
|000042d0| 64 20 69 6e 20 74 68 65 | 20 66 69 6c 65 2e 0a 58 |d in the| file..X|
|000042e0| 49 66 20 6e 6f 0a 58 2e | 49 20 66 69 6c 65 0a 58 |If no.X.|I file.X|
|000042f0| 61 72 67 75 6d 65 6e 74 | 20 69 73 20 67 69 76 65 |argument| is give|
|00004300| 6e 2c 0a 58 2e 42 20 63 | 70 72 6f 74 6f 0a 58 72 |n,.X.B c|proto.Xr|
|00004310| 65 61 64 73 20 69 74 73 | 20 69 6e 70 75 74 20 66 |eads its| input f|
|00004320| 72 6f 6d 20 74 68 65 20 | 73 74 61 6e 64 61 72 64 |rom the |standard|
|00004330| 20 69 6e 70 75 74 2e 0a | 58 2e 4c 50 0a 58 42 79 | input..|X.LP.XBy|
|00004340| 20 67 69 76 69 6e 67 20 | 61 20 63 6f 6d 6d 61 6e | giving |a comman|
|00004350| 64 20 6c 69 6e 65 20 6f | 70 74 69 6f 6e 2c 0a 58 |d line o|ption,.X|
|00004360| 2e 42 20 63 70 72 6f 74 | 6f 0a 58 77 69 6c 6c 20 |.B cprot|o.Xwill |
|00004370| 61 6c 73 6f 20 63 6f 6e | 76 65 72 74 20 66 75 6e |also con|vert fun|
|00004380| 63 74 69 6f 6e 20 64 65 | 66 69 6e 69 74 69 6f 6e |ction de|finition|
|00004390| 73 20 69 6e 20 74 68 65 | 20 73 70 65 63 69 66 69 |s in the| specifi|
|000043a0| 65 64 20 66 69 6c 65 73 | 20 66 72 6f 6d 20 74 68 |ed files| from th|
|000043b0| 65 0a 58 6f 6c 64 20 73 | 74 79 6c 65 20 74 6f 20 |e.Xold s|tyle to |
|000043c0| 74 68 65 20 41 4e 53 49 | 20 43 20 73 74 79 6c 65 |the ANSI| C style|
|000043d0| 2e 0a 58 54 68 65 20 6f | 72 69 67 69 6e 61 6c 20 |..XThe o|riginal |
|000043e0| 73 6f 75 72 63 65 20 66 | 69 6c 65 73 20 61 6c 6f |source f|iles alo|
|000043f0| 6e 67 20 77 69 74 68 20 | 66 69 6c 65 73 20 73 70 |ng with |files sp|
|00004400| 65 63 69 66 69 65 64 20 | 62 79 0a 58 2e 45 58 0a |ecified |by.X.EX.|
|00004410| 58 23 69 6e 63 6c 75 64 | 65 20 22 66 69 6c 65 22 |X#includ|e "file"|
|00004420| 0a 58 2e 45 45 0a 58 64 | 69 72 65 63 74 69 76 65 |.X.EE.Xd|irective|
|00004430| 73 20 61 70 70 65 61 72 | 69 6e 67 20 69 6e 20 74 |s appear|ing in t|
|00004440| 68 65 20 73 6f 75 72 63 | 65 20 63 6f 64 65 20 77 |he sourc|e code w|
|00004450| 69 6c 6c 20 62 65 20 6f | 76 65 72 77 72 69 74 74 |ill be o|verwritt|
|00004460| 65 6e 0a 58 77 69 74 68 | 20 74 68 65 20 63 6f 6e |en.Xwith| the con|
|00004470| 76 65 72 74 65 64 20 63 | 6f 64 65 2e 0a 58 49 66 |verted c|ode..XIf|
|00004480| 20 6e 6f 20 66 69 6c 65 | 20 6e 61 6d 65 73 20 61 | no file| names a|
|00004490| 72 65 20 67 69 76 65 6e | 20 6f 6e 20 74 68 65 20 |re given| on the |
|000044a0| 63 6f 6d 6d 61 6e 64 20 | 6c 69 6e 65 2c 20 74 68 |command |line, th|
|000044b0| 65 6e 20 74 68 65 20 70 | 72 6f 67 72 61 6d 20 72 |en the p|rogram r|
|000044c0| 65 61 64 73 0a 58 74 68 | 65 20 73 6f 75 72 63 65 |eads.Xth|e source|
|000044d0| 20 63 6f 64 65 20 66 72 | 6f 6d 20 74 68 65 20 73 | code fr|om the s|
|000044e0| 74 61 6e 64 61 72 64 20 | 69 6e 70 75 74 20 61 6e |tandard |input an|
|000044f0| 64 20 6f 75 74 70 75 74 | 73 20 74 68 65 20 63 6f |d output|s the co|
|00004500| 6e 76 65 72 74 65 64 20 | 73 6f 75 72 63 65 0a 58 |nverted |source.X|
|00004510| 74 6f 20 74 68 65 20 73 | 74 61 6e 64 61 72 64 20 |to the s|tandard |
|00004520| 6f 75 74 70 75 74 2e 0a | 58 2e 4c 50 0a 58 49 66 |output..|X.LP.XIf|
|00004530| 20 61 6e 79 20 63 6f 6d | 6d 65 6e 74 73 20 61 70 | any com|ments ap|
|00004540| 70 65 61 72 20 69 6e 20 | 74 68 65 20 70 61 72 61 |pear in |the para|
|00004550| 6d 65 74 65 72 20 64 65 | 63 6c 61 72 61 74 69 6f |meter de|claratio|
|00004560| 6e 73 20 66 6f 72 20 61 | 20 66 75 6e 63 74 69 6f |ns for a| functio|
|00004570| 6e 20 64 65 66 69 6e 69 | 74 69 6f 6e 2c 0a 58 73 |n defini|tion,.Xs|
|00004580| 75 63 68 20 61 73 20 69 | 6e 20 74 68 65 20 65 78 |uch as i|n the ex|
|00004590| 61 6d 70 6c 65 2c 0a 58 | 2e 45 58 0a 58 6d 61 69 |ample,.X|.EX.Xmai|
|000045a0| 6e 20 28 61 72 67 63 2c | 20 61 72 67 76 29 0a 58 |n (argc,| argv).X|
|000045b0| 69 6e 74 20 61 72 67 63 | 3b 09 2f 2a 20 6e 75 6d |int argc|;./* num|
|000045c0| 62 65 72 20 6f 66 20 61 | 72 67 75 6d 65 6e 74 73 |ber of a|rguments|
|000045d0| 20 2a 2f 0a 58 63 68 61 | 72 20 2a 61 72 67 76 5b | */.Xcha|r *argv[|
|000045e0| 5d 3b 09 2f 2a 20 61 72 | 67 75 6d 65 6e 74 73 20 |];./* ar|guments |
|000045f0| 2a 2f 0a 58 7b 0a 58 20 | 2e 2e 2e 0a 58 7d 0a 58 |*/.X{.X |....X}.X|
|00004600| 2e 45 45 0a 58 74 68 65 | 6e 20 74 68 65 20 63 6f |.EE.Xthe|n the co|
|00004610| 6e 76 65 72 74 65 64 20 | 66 75 6e 63 74 69 6f 6e |nverted |function|
|00004620| 20 64 65 66 69 6e 69 74 | 69 6f 6e 20 77 69 6c 6c | definit|ion will|
|00004630| 20 68 61 76 65 20 74 68 | 65 20 66 6f 72 6d 0a 58 | have th|e form.X|
|00004640| 2e 45 58 0a 58 69 6e 74 | 0a 58 6d 61 69 6e 20 28 |.EX.Xint|.Xmain (|
|00004650| 0a 58 20 20 20 20 69 6e | 74 20 61 72 67 63 3b 09 |.X in|t argc;.|
|00004660| 20 20 20 20 2f 2a 20 6e | 75 6d 62 65 72 20 6f 66 | /* n|umber of|
|00004670| 20 61 72 67 75 6d 65 6e | 74 73 20 2a 2f 0a 58 20 | argumen|ts */.X |
|00004680| 20 20 20 63 68 61 72 20 | 2a 61 72 67 76 5b 5d 3b | char |*argv[];|
|00004690| 20 20 20 2f 2a 20 61 72 | 67 75 6d 65 6e 74 73 20 | /* ar|guments |
|000046a0| 2a 2f 0a 58 29 0a 58 7b | 0a 58 20 2e 2e 2e 0a 58 |*/.X).X{|.X ....X|
|000046b0| 7d 0a 58 2e 45 45 0a 58 | 4f 74 68 65 72 77 69 73 |}.X.EE.X|Otherwis|
|000046c0| 65 2c 20 74 68 65 20 63 | 6f 6e 76 65 72 74 65 64 |e, the c|onverted|
|000046d0| 20 66 75 6e 63 74 69 6f | 6e 20 64 65 66 69 6e 69 | functio|n defini|
|000046e0| 74 69 6f 6e 20 77 69 6c | 6c 20 6c 6f 6f 6b 20 6c |tion wil|l look l|
|000046f0| 69 6b 65 0a 58 2e 45 58 | 0a 58 69 6e 74 0a 58 6d |ike.X.EX|.Xint.Xm|
|00004700| 61 69 6e 20 28 69 6e 74 | 20 61 72 67 63 2c 20 63 |ain (int| argc, c|
|00004710| 68 61 72 20 2a 61 72 67 | 76 5b 5d 29 0a 58 7b 0a |har *arg|v[]).X{.|
|00004720| 58 20 2e 2e 2e 0a 58 7d | 0a 58 2e 45 45 0a 58 2e |X ....X}|.X.EE.X.|
|00004730| 4c 50 0a 58 2e 42 20 43 | 70 72 6f 74 6f 0a 58 63 |LP.X.B C|proto.Xc|
|00004740| 61 6e 20 6f 70 74 69 6f | 6e 61 6c 6c 79 20 63 6f |an optio|nally co|
|00004750| 6e 76 65 72 74 20 66 75 | 6e 63 74 69 6f 6e 20 64 |nvert fu|nction d|
|00004760| 65 66 69 6e 69 74 69 6f | 6e 73 20 66 72 6f 6d 20 |efinitio|ns from |
|00004770| 74 68 65 20 41 4e 53 49 | 20 73 74 79 6c 65 20 74 |the ANSI| style t|
|00004780| 6f 20 74 68 65 20 6f 6c | 64 0a 58 73 74 79 6c 65 |o the ol|d.Xstyle|
|00004790| 2e 0a 58 49 6e 20 74 68 | 69 73 20 6d 6f 64 65 2c |..XIn th|is mode,|
|000047a0| 20 74 68 65 20 70 72 6f | 67 72 61 6d 20 61 6c 73 | the pro|gram als|
|000047b0| 6f 20 63 6f 6e 76 65 72 | 74 73 20 66 75 6e 63 74 |o conver|ts funct|
|000047c0| 69 6f 6e 20 64 65 63 6c | 61 72 61 74 6f 72 73 20 |ion decl|arators |
|000047d0| 61 6e 64 20 70 72 6f 74 | 6f 74 79 70 65 73 0a 58 |and prot|otypes.X|
|000047e0| 74 68 61 74 20 61 70 70 | 65 61 72 20 6f 75 74 73 |that app|ear outs|
|000047f0| 69 64 65 20 66 75 6e 63 | 74 69 6f 6e 20 62 6f 64 |ide func|tion bod|
|00004800| 69 65 73 2e 0a 58 54 68 | 69 73 20 69 73 20 6e 6f |ies..XTh|is is no|
|00004810| 74 20 61 20 63 6f 6d 70 | 6c 65 74 65 20 41 4e 53 |t a comp|lete ANS|
|00004820| 49 20 43 20 74 6f 20 6f | 6c 64 20 43 20 63 6f 6e |I C to o|ld C con|
|00004830| 76 65 72 73 69 6f 6e 2e | 0a 58 54 68 65 20 70 72 |version.|.XThe pr|
|00004840| 6f 67 72 61 6d 20 64 6f | 65 73 20 6e 6f 74 20 63 |ogram do|es not c|
|00004850| 68 61 6e 67 65 20 61 6e | 79 74 68 69 6e 67 20 77 |hange an|ything w|
|00004860| 69 74 68 69 6e 20 66 75 | 6e 63 74 69 6f 6e 20 62 |ithin fu|nction b|
|00004870| 6f 64 69 65 73 2e 0a 58 | 2e 53 48 20 4f 50 54 49 |odies..X|.SH OPTI|
|00004880| 4f 4e 53 0a 58 2e 54 50 | 0a 58 2e 42 20 5c 2d 61 |ONS.X.TP|.X.B \-a|
|00004890| 0a 58 43 6f 6e 76 65 72 | 74 20 66 75 6e 63 74 69 |.XConver|t functi|
|000048a0| 6f 6e 20 64 65 66 69 6e | 69 74 69 6f 6e 73 20 66 |on defin|itions f|
|000048b0| 72 6f 6d 20 74 68 65 20 | 6f 6c 64 20 73 74 79 6c |rom the |old styl|
|000048c0| 65 20 74 6f 20 74 68 65 | 20 41 4e 53 49 20 43 20 |e to the| ANSI C |
|000048d0| 73 74 79 6c 65 2e 0a 58 | 2e 54 50 0a 58 2e 42 20 |style..X|.TP.X.B |
|000048e0| 5c 2d 65 0a 58 4f 75 74 | 70 75 74 20 74 68 65 20 |\-e.XOut|put the |
|000048f0| 6b 65 79 77 6f 72 64 0a | 58 2e 42 20 65 78 74 65 |keyword.|X.B exte|
|00004900| 72 6e 0a 58 69 6e 20 66 | 72 6f 6e 74 20 6f 66 20 |rn.Xin f|ront of |
|00004910| 65 76 65 72 79 20 64 65 | 63 6c 61 72 61 74 69 6f |every de|claratio|
|00004920| 6e 20 68 61 76 69 6e 67 | 20 67 6c 6f 62 61 6c 20 |n having| global |
|00004930| 73 63 6f 70 65 2e 0a 58 | 2e 54 50 0a 58 2e 42 49 |scope..X|.TP.X.BI|
|00004940| 20 5c 2d 66 20 6e 0a 58 | 53 65 74 20 74 68 65 20 | \-f n.X|Set the |
|00004950| 73 74 79 6c 65 20 6f 66 | 20 67 65 6e 65 72 61 74 |style of| generat|
|00004960| 65 64 20 66 75 6e 63 74 | 69 6f 6e 20 70 72 6f 74 |ed funct|ion prot|
|00004970| 6f 74 79 70 65 73 20 77 | 68 65 72 65 0a 58 2e 49 |otypes w|here.X.I|
|00004980| 20 6e 0a 58 69 73 20 61 | 20 6e 75 6d 62 65 72 20 | n.Xis a| number |
|00004990| 66 72 6f 6d 20 30 20 74 | 6f 20 34 2e 0a 58 46 6f |from 0 t|o 4..XFo|
|000049a0| 72 20 65 78 61 6d 70 6c | 65 2c 20 63 6f 6e 73 69 |r exampl|e, consi|
|000049b0| 64 65 72 20 74 68 65 20 | 66 75 6e 63 74 69 6f 6e |der the |function|
|000049c0| 20 64 65 66 69 6e 69 74 | 69 6f 6e 0a 58 2e 45 58 | definit|ion.X.EX|
|000049d0| 0a 58 6d 61 69 6e 20 28 | 61 72 67 63 2c 20 61 72 |.Xmain (|argc, ar|
|000049e0| 67 76 29 0a 58 69 6e 74 | 20 61 72 67 63 3b 0a 58 |gv).Xint| argc;.X|
|000049f0| 63 68 61 72 20 2a 61 72 | 67 76 5b 5d 3b 0a 58 7b |char *ar|gv[];.X{|
|00004a00| 0a 58 20 2e 2e 2e 0a 58 | 7d 0a 58 2e 45 45 0a 58 |.X ....X|}.X.EE.X|
|00004a10| 49 66 20 74 68 65 20 76 | 61 6c 75 65 20 69 73 20 |If the v|alue is |
|00004a20| 30 2c 20 74 68 65 6e 20 | 6e 6f 20 70 72 6f 74 6f |0, then |no proto|
|00004a30| 74 79 70 65 73 20 61 72 | 65 20 67 65 6e 65 72 61 |types ar|e genera|
|00004a40| 74 65 64 2e 0a 58 57 68 | 65 6e 20 73 65 74 20 74 |ted..XWh|en set t|
|00004a50| 6f 20 31 2c 20 74 68 65 | 20 6f 75 74 70 75 74 20 |o 1, the| output |
|00004a60| 69 73 3a 0a 58 2e 45 58 | 0a 58 69 6e 74 20 6d 61 |is:.X.EX|.Xint ma|
|00004a70| 69 6e 28 2f 2a 69 6e 74 | 20 61 72 67 63 2c 20 63 |in(/*int| argc, c|
|00004a80| 68 61 72 20 2a 61 72 67 | 76 5b 5d 2a 2f 29 3b 0a |har *arg|v[]*/);.|
|00004a90| 58 2e 45 45 0a 58 46 6f | 72 20 61 20 76 61 6c 75 |X.EE.XFo|r a valu|
|00004aa0| 65 20 6f 66 20 32 2c 20 | 74 68 65 20 6f 75 74 70 |e of 2, |the outp|
|00004ab0| 75 74 20 68 61 73 20 74 | 68 65 20 66 6f 72 6d 3a |ut has t|he form:|
|00004ac0| 0a 58 2e 45 58 0a 58 69 | 6e 74 20 6d 61 69 6e 28 |.X.EX.Xi|nt main(|
|00004ad0| 69 6e 74 20 2f 2a 61 72 | 67 63 2a 2f 2c 20 63 68 |int /*ar|gc*/, ch|
|00004ae0| 61 72 20 2a 2f 2a 61 72 | 67 76 2a 2f 5b 5d 29 3b |ar */*ar|gv*/[]);|
|00004af0| 0a 58 2e 45 45 0a 58 54 | 68 65 20 64 65 66 61 75 |.X.EE.XT|he defau|
|00004b00| 6c 74 20 76 61 6c 75 65 | 20 69 73 20 33 2e 0a 58 |lt value| is 3..X|
|00004b10| 49 74 20 70 72 6f 64 75 | 63 65 73 20 74 68 65 20 |It produ|ces the |
|00004b20| 66 75 6c 6c 20 66 75 6e | 63 74 69 6f 6e 20 70 72 |full fun|ction pr|
|00004b30| 6f 74 6f 74 79 70 65 3a | 0a 58 2e 45 58 0a 58 69 |ototype:|.X.EX.Xi|
|00004b40| 6e 74 20 6d 61 69 6e 28 | 69 6e 74 20 61 72 67 63 |nt main(|int argc|
|00004b50| 2c 20 63 68 61 72 20 2a | 61 72 67 76 5b 5d 29 3b |, char *|argv[]);|
|00004b60| 0a 58 2e 45 45 0a 58 41 | 20 76 61 6c 75 65 20 6f |.X.EE.XA| value o|
|00004b70| 66 20 34 20 70 72 6f 64 | 75 63 65 73 20 70 72 6f |f 4 prod|uces pro|
|00004b80| 74 6f 74 79 70 65 73 20 | 67 75 61 72 64 65 64 20 |totypes |guarded |
|00004b90| 62 79 20 61 20 6d 61 63 | 72 6f 3a 0a 58 2e 45 58 |by a mac|ro:.X.EX|
|00004ba0| 0a 58 69 6e 74 20 6d 61 | 69 6e 20 50 5f 28 28 69 |.Xint ma|in P_((i|
|00004bb0| 6e 74 20 61 72 67 63 2c | 20 63 68 61 72 20 2a 61 |nt argc,| char *a|
|00004bc0| 72 67 76 5b 5d 29 29 3b | 0a 58 2e 45 45 0a 58 2e |rgv[]));|.X.EE.X.|
|00004bd0| 54 50 0a 58 2e 42 20 5c | 2d 63 0a 58 4f 6d 69 74 |TP.X.B \|-c.XOmit|
|00004be0| 20 74 68 65 20 70 61 72 | 61 6d 65 74 65 72 20 63 | the par|ameter c|
|00004bf0| 6f 6d 6d 65 6e 74 73 20 | 69 6e 20 74 68 65 20 70 |omments |in the p|
|00004c00| 72 6f 74 6f 74 79 70 65 | 73 20 67 65 6e 65 72 61 |rototype|s genera|
|00004c10| 74 65 64 20 62 79 0a 58 | 74 68 65 20 2d 66 31 20 |ted by.X|the -f1 |
|00004c20| 61 6e 64 20 2d 66 32 20 | 6f 70 74 69 6f 6e 73 2e |and -f2 |options.|
|00004c30| 0a 58 54 68 69 73 20 6f | 70 74 69 6f 6e 20 61 6c |.XThis o|ption al|
|00004c40| 73 6f 20 6f 6d 69 74 73 | 20 74 68 65 20 63 6f 6d |so omits| the com|
|00004c50| 6d 65 6e 74 73 20 6e 61 | 6d 69 6e 67 20 74 68 65 |ments na|ming the|
|00004c60| 20 73 6f 75 72 63 65 20 | 66 69 6c 65 73 20 66 72 | source |files fr|
|00004c70| 6f 6d 20 77 68 69 63 68 | 0a 58 74 68 65 20 70 72 |om which|.Xthe pr|
|00004c80| 6f 74 6f 74 79 70 65 73 | 20 77 65 72 65 20 67 65 |ototypes| were ge|
|00004c90| 6e 65 72 61 74 65 64 2e | 0a 58 2e 54 50 0a 58 2e |nerated.|.X.TP.X.|
|00004ca0| 42 49 20 5c 2d 6d 20 6e | 61 6d 65 0a 58 53 65 74 |BI \-m n|ame.XSet|
|00004cb0| 20 74 68 65 20 6e 61 6d | 65 20 6f 66 20 74 68 65 | the nam|e of the|
|00004cc0| 20 6d 61 63 72 6f 20 75 | 73 65 64 20 74 6f 20 67 | macro u|sed to g|
|00004cd0| 75 61 72 64 20 70 72 6f | 74 6f 74 79 70 65 73 20 |uard pro|totypes |
|00004ce0| 77 68 65 6e 20 6f 70 74 | 69 6f 6e 20 2d 66 34 20 |when opt|ion -f4 |
|00004cf0| 69 73 20 73 65 6c 65 63 | 74 65 64 2e 0a 58 54 68 |is selec|ted..XTh|
|00004d00| 65 20 64 65 66 61 75 6c | 74 20 69 73 20 22 50 5f |e defaul|t is "P_|
|00004d10| 22 2e 0a 58 2e 54 50 0a | 58 2e 42 20 5c 2d 64 0a |"..X.TP.|X.B \-d.|
|00004d20| 58 4f 6d 69 74 20 74 68 | 65 20 64 65 66 69 6e 69 |XOmit th|e defini|
|00004d30| 74 69 6f 6e 20 6f 66 20 | 74 68 65 20 70 72 6f 74 |tion of |the prot|
|00004d40| 6f 74 79 70 65 20 6d 61 | 63 72 6f 20 6e 61 6d 65 |otype ma|cro name|
|00004d50| 64 20 62 79 20 74 68 65 | 20 2d 6d 20 6f 70 74 69 |d by the| -m opti|
|00004d60| 6f 6e 2e 0a 58 2e 54 50 | 0a 58 2e 42 20 5c 2d 70 |on..X.TP|.X.B \-p|
|00004d70| 0a 58 44 69 73 61 62 6c | 65 20 70 72 6f 6d 6f 74 |.XDisabl|e promot|
|00004d80| 69 6f 6e 20 6f 66 20 66 | 6f 72 6d 61 6c 20 70 61 |ion of f|ormal pa|
|00004d90| 72 61 6d 65 74 65 72 73 | 20 69 6e 20 6f 6c 64 20 |rameters| in old |
|00004da0| 73 74 79 6c 65 20 66 75 | 6e 63 74 69 6f 6e 20 64 |style fu|nction d|
|00004db0| 65 66 69 6e 69 74 69 6f | 6e 73 2e 0a 58 42 79 20 |efinitio|ns..XBy |
|00004dc0| 64 65 66 61 75 6c 74 2c | 20 70 61 72 61 6d 65 74 |default,| paramet|
|00004dd0| 65 72 73 20 6f 66 20 74 | 79 70 65 0a 58 2e 42 20 |ers of t|ype.X.B |
|00004de0| 63 68 61 72 0a 58 6f 72 | 0a 58 2e 42 20 73 68 6f |char.Xor|.X.B sho|
|00004df0| 72 74 0a 58 69 6e 20 6f | 6c 64 20 73 74 79 6c 65 |rt.Xin o|ld style|
|00004e00| 20 66 75 6e 63 74 69 6f | 6e 20 64 65 66 69 6e 69 | functio|n defini|
|00004e10| 74 69 6f 6e 73 20 61 72 | 65 20 70 72 6f 6d 6f 74 |tions ar|e promot|
|00004e20| 65 64 20 74 6f 20 74 79 | 70 65 0a 58 2e 42 20 69 |ed to ty|pe.X.B i|
|00004e30| 6e 74 0a 58 69 6e 20 74 | 68 65 20 66 75 6e 63 74 |nt.Xin t|he funct|
|00004e40| 69 6f 6e 20 70 72 6f 74 | 6f 74 79 70 65 20 6f 72 |ion prot|otype or|
|00004e50| 20 63 6f 6e 76 65 72 74 | 65 64 20 41 4e 53 49 20 | convert|ed ANSI |
|00004e60| 43 20 66 75 6e 63 74 69 | 6f 6e 20 64 65 66 69 6e |C functi|on defin|
|00004e70| 69 74 69 6f 6e 2e 0a 58 | 50 61 72 61 6d 65 74 65 |ition..X|Paramete|
|00004e80| 72 73 20 6f 66 20 74 79 | 70 65 0a 58 2e 42 20 66 |rs of ty|pe.X.B f|
|00004e90| 6c 6f 61 74 0a 58 67 65 | 74 20 70 72 6f 6d 6f 74 |loat.Xge|t promot|
|00004ea0| 65 64 20 74 6f 20 0a 58 | 2e 42 20 64 6f 75 62 6c |ed to .X|.B doubl|
|00004eb0| 65 0a 58 61 73 20 77 65 | 6c 6c 2e 0a 58 2e 54 50 |e.Xas we|ll..X.TP|
|00004ec0| 0a 58 2e 42 20 5c 2d 73 | 0a 58 42 79 20 64 65 66 |.X.B \-s|.XBy def|
|00004ed0| 61 75 6c 74 2c 0a 58 2e | 42 20 63 70 72 6f 74 6f |ault,.X.|B cproto|
|00004ee0| 0a 58 6f 6e 6c 79 20 67 | 65 6e 65 72 61 74 65 73 |.Xonly g|enerates|
|00004ef0| 20 64 65 63 6c 61 72 61 | 74 69 6f 6e 73 20 66 6f | declara|tions fo|
|00004f00| 72 20 66 75 6e 63 74 69 | 6f 6e 73 20 61 6e 64 20 |r functi|ons and |
|00004f10| 76 61 72 69 61 62 6c 65 | 73 20 68 61 76 69 6e 67 |variable|s having|
|00004f20| 20 67 6c 6f 62 61 6c 20 | 73 63 6f 70 65 2e 0a 58 | global |scope..X|
|00004f30| 54 68 69 73 20 6f 70 74 | 69 6f 6e 20 77 69 6c 6c |This opt|ion will|
|00004f40| 20 6f 75 74 70 75 74 0a | 58 2e 42 20 73 74 61 74 | output.|X.B stat|
|00004f50| 69 63 0a 58 64 65 63 6c | 61 72 61 74 69 6f 6e 73 |ic.Xdecl|arations|
|00004f60| 20 61 73 20 77 65 6c 6c | 2e 0a 58 2e 54 50 0a 58 | as well|..X.TP.X|
|00004f70| 2e 42 20 5c 2d 74 0a 58 | 43 6f 6e 76 65 72 74 20 |.B \-t.X|Convert |
|00004f80| 66 75 6e 63 74 69 6f 6e | 20 64 65 66 69 6e 69 74 |function| definit|
|00004f90| 69 6f 6e 73 20 66 72 6f | 6d 20 74 68 65 20 41 4e |ions fro|m the AN|
|00004fa0| 53 49 20 43 20 73 74 79 | 6c 65 20 74 6f 20 74 68 |SI C sty|le to th|
|00004fb0| 65 20 74 72 61 64 69 74 | 69 6f 6e 61 6c 20 73 74 |e tradit|ional st|
|00004fc0| 79 6c 65 2e 0a 58 2e 54 | 50 0a 58 2e 42 20 5c 2d |yle..X.T|P.X.B \-|
|00004fd0| 76 0a 58 41 6c 73 6f 20 | 6f 75 74 70 75 74 20 64 |v.XAlso |output d|
|00004fe0| 65 63 6c 61 72 61 74 69 | 6f 6e 73 20 66 6f 72 20 |eclarati|ons for |
|00004ff0| 76 61 72 69 61 62 6c 65 | 73 20 64 65 66 69 6e 65 |variable|s define|
|00005000| 64 20 69 6e 20 74 68 65 | 20 73 6f 75 72 63 65 2e |d in the| source.|
|00005010| 0a 58 2e 4c 50 0a 58 2e | 6e 66 0a 58 2e 42 49 20 |.X.LP.X.|nf.X.BI |
|00005020| 5c 2d 50 20 74 65 6d 70 | 6c 61 74 65 0a 58 2e 42 |\-P temp|late.X.B|
|00005030| 49 20 5c 2d 46 20 74 65 | 6d 70 6c 61 74 65 0a 58 |I \-F te|mplate.X|
|00005040| 2e 42 49 20 5c 2d 43 20 | 74 65 6d 70 6c 61 74 65 |.BI \-C |template|
|00005050| 0a 58 2e 66 69 0a 58 2e | 69 6e 20 2b 35 6e 0a 58 |.X.fi.X.|in +5n.X|
|00005060| 53 65 74 20 74 68 65 20 | 6f 75 74 70 75 74 20 66 |Set the |output f|
|00005070| 6f 72 6d 61 74 20 66 6f | 72 20 67 65 6e 65 72 61 |ormat fo|r genera|
|00005080| 74 65 64 20 70 72 6f 74 | 6f 74 79 70 65 73 2c 20 |ted prot|otypes, |
|00005090| 66 75 6e 63 74 69 6f 6e | 20 64 65 66 69 6e 69 74 |function| definit|
|000050a0| 69 6f 6e 73 2c 0a 58 61 | 6e 64 20 66 75 6e 63 74 |ions,.Xa|nd funct|
|000050b0| 69 6f 6e 20 64 65 66 69 | 6e 69 74 69 6f 6e 73 20 |ion defi|nitions |
|000050c0| 77 69 74 68 20 70 61 72 | 61 6d 65 74 65 72 20 63 |with par|ameter c|
|000050d0| 6f 6d 6d 65 6e 74 73 20 | 72 65 73 70 65 63 74 69 |omments |respecti|
|000050e0| 76 65 6c 79 2e 0a 58 54 | 68 65 20 66 6f 72 6d 61 |vely..XT|he forma|
|000050f0| 74 20 69 73 20 73 70 65 | 63 69 66 69 65 64 20 62 |t is spe|cified b|
|00005100| 79 20 61 20 74 65 6d 70 | 6c 61 74 65 20 69 6e 20 |y a temp|late in |
|00005110| 74 68 65 20 66 6f 72 6d | 0a 58 2e 45 58 0a 58 22 |the form|.X.EX.X"|
|00005120| 20 69 6e 74 20 6d 61 69 | 6e 20 28 20 61 2c 20 62 | int mai|n ( a, b|
|00005130| 20 29 22 0a 58 2e 45 45 | 0a 58 62 75 74 20 79 6f | )".X.EE|.Xbut yo|
|00005140| 75 20 6d 61 79 20 72 65 | 70 6c 61 63 65 20 65 61 |u may re|place ea|
|00005150| 63 68 20 73 70 61 63 65 | 20 69 6e 20 74 68 69 73 |ch space| in this|
|00005160| 20 73 74 72 69 6e 67 20 | 77 69 74 68 20 61 6e 79 | string |with any|
|00005170| 20 6e 75 6d 62 65 72 20 | 6f 66 0a 58 77 68 69 74 | number |of.Xwhit|
|00005180| 65 73 70 61 63 65 20 63 | 68 61 72 61 63 74 65 72 |espace c|haracter|
|00005190| 73 2e 0a 58 46 6f 72 20 | 65 78 61 6d 70 6c 65 2c |s..XFor |example,|
|000051a0| 20 74 68 65 20 6f 70 74 | 69 6f 6e 0a 58 2e 45 58 | the opt|ion.X.EX|
|000051b0| 0a 58 2d 46 22 69 6e 74 | 20 6d 61 69 6e 28 5c 5c |.X-F"int| main(\\|
|000051c0| 6e 5c 5c 74 61 2c 5c 5c | 6e 5c 5c 74 62 5c 5c 6e |n\\ta,\\|n\\tb\\n|
|000051d0| 5c 5c 74 29 22 0a 58 2e | 45 45 0a 58 77 69 6c 6c |\\t)".X.|EE.Xwill|
|000051e0| 20 70 72 6f 64 75 63 65 | 0a 58 2e 45 58 0a 58 69 | produce|.X.EX.Xi|
|000051f0| 6e 74 20 6d 61 69 6e 28 | 0a 58 09 69 6e 74 20 61 |nt main(|.X.int a|
|00005200| 72 67 63 2c 0a 58 09 63 | 68 61 72 20 2a 61 72 67 |rgc,.X.c|har *arg|
|00005210| 76 5b 5d 0a 58 09 29 0a | 58 2e 45 45 0a 58 2e 54 |v[].X.).|X.EE.X.T|
|00005220| 50 0a 58 2e 42 49 20 5c | 2d 44 20 6e 61 6d 65 5c |P.X.BI \|-D name\|
|00005230| 5b 3d 76 61 6c 75 65 5c | 5d 0a 58 54 68 69 73 20 |[=value\|].XThis |
|00005240| 6f 70 74 69 6f 6e 20 69 | 73 20 70 61 73 73 65 64 |option i|s passed|
|00005250| 20 74 68 72 6f 75 67 68 | 20 74 6f 20 74 68 65 20 | through| to the |
|00005260| 70 72 65 70 72 6f 63 65 | 73 73 6f 72 20 61 6e 64 |preproce|ssor and|
|00005270| 20 69 73 20 75 73 65 64 | 20 74 6f 20 64 65 66 69 | is used| to defi|
|00005280| 6e 65 20 0a 58 73 79 6d | 62 6f 6c 73 20 66 6f 72 |ne .Xsym|bols for|
|00005290| 20 75 73 65 20 77 69 74 | 68 20 63 6f 6e 64 69 74 | use wit|h condit|
|000052a0| 69 6f 6e 61 6c 73 20 73 | 75 63 68 20 61 73 0a 58 |ionals s|uch as.X|
|000052b0| 2e 49 20 23 69 66 64 65 | 66 2e 0a 58 2e 54 50 0a |.I #ifde|f..X.TP.|
|000052c0| 58 2e 42 49 20 5c 2d 55 | 20 6e 61 6d 65 0a 58 54 |X.BI \-U| name.XT|
|000052d0| 68 69 73 20 6f 70 74 69 | 6f 6e 20 69 73 20 70 61 |his opti|on is pa|
|000052e0| 73 73 65 64 20 74 68 72 | 6f 75 67 68 20 74 6f 20 |ssed thr|ough to |
|000052f0| 74 68 65 20 70 72 65 70 | 72 6f 63 65 73 73 6f 72 |the prep|rocessor|
|00005300| 20 61 6e 64 20 69 73 20 | 75 73 65 64 20 74 6f 20 | and is |used to |
|00005310| 72 65 6d 6f 76 65 0a 58 | 61 6e 79 20 64 65 66 69 |remove.X|any defi|
|00005320| 6e 69 74 69 6f 6e 73 20 | 6f 66 20 74 68 69 73 20 |nitions |of this |
|00005330| 73 79 6d 62 6f 6c 2e 0a | 58 2e 54 50 0a 58 2e 42 |symbol..|X.TP.X.B|
|00005340| 49 20 5c 2d 49 20 64 69 | 72 65 63 74 6f 72 79 0a |I \-I di|rectory.|
|00005350| 58 54 68 69 73 20 6f 70 | 74 69 6f 6e 20 69 73 20 |XThis op|tion is |
|00005360| 70 61 73 73 65 64 20 74 | 68 72 6f 75 67 68 20 74 |passed t|hrough t|
|00005370| 6f 20 74 68 65 20 70 72 | 65 70 72 6f 63 65 73 73 |o the pr|eprocess|
|00005380| 6f 72 20 61 6e 64 20 69 | 73 20 75 73 65 64 20 74 |or and i|s used t|
|00005390| 6f 20 73 70 65 63 69 66 | 79 0a 58 61 20 64 69 72 |o specif|y.Xa dir|
|000053a0| 65 63 74 6f 72 79 20 74 | 6f 20 73 65 61 72 63 68 |ectory t|o search|
|000053b0| 20 66 6f 72 20 66 69 6c | 65 73 20 74 68 61 74 20 | for fil|es that |
|000053c0| 61 72 65 20 72 65 66 65 | 72 65 6e 63 65 64 20 77 |are refe|renced w|
|000053d0| 69 74 68 20 0a 58 2e 49 | 20 23 69 6e 63 6c 75 64 |ith .X.I| #includ|
|000053e0| 65 2e 0a 58 2e 54 50 0a | 58 2e 42 20 5c 2d 56 0a |e..X.TP.|X.B \-V.|
|000053f0| 58 50 72 69 6e 74 20 76 | 65 72 73 69 6f 6e 20 69 |XPrint v|ersion i|
|00005400| 6e 66 6f 72 6d 61 74 69 | 6f 6e 2e 0a 58 2e 53 48 |nformati|on..X.SH|
|00005410| 20 45 4e 56 49 52 4f 4e | 4d 45 4e 54 0a 58 54 68 | ENVIRON|MENT.XTh|
|00005420| 65 20 65 6e 76 69 72 6f | 6e 6d 65 6e 74 20 76 61 |e enviro|nment va|
|00005430| 72 69 61 62 6c 65 20 43 | 50 52 4f 54 4f 20 69 73 |riable C|PROTO is|
|00005440| 20 73 63 61 6e 6e 65 64 | 20 66 6f 72 0a 58 61 20 | scanned| for.Xa |
|00005450| 6c 69 73 74 20 6f 66 20 | 6f 70 74 69 6f 6e 73 20 |list of |options |
|00005460| 69 6e 20 74 68 65 20 73 | 61 6d 65 20 66 6f 72 6d |in the s|ame form|
|00005470| 61 74 20 61 73 20 74 68 | 65 20 63 6f 6d 6d 61 6e |at as th|e comman|
|00005480| 64 20 6c 69 6e 65 20 6f | 70 74 69 6f 6e 73 2e 0a |d line o|ptions..|
|00005490| 58 2e 53 48 20 42 55 47 | 53 0a 58 49 66 20 61 6e |X.SH BUG|S.XIf an|
|000054a0| 20 75 6e 74 61 67 67 65 | 64 20 73 74 72 75 63 74 | untagge|d struct|
|000054b0| 2c 20 75 6e 69 6f 6e 20 | 6f 72 20 65 6e 75 6d 20 |, union |or enum |
|000054c0| 64 65 63 6c 61 72 61 74 | 69 6f 6e 20 61 70 70 65 |declarat|ion appe|
|000054d0| 61 72 73 20 69 6e 0a 58 | 61 20 67 65 6e 65 72 61 |ars in.X|a genera|
|000054e0| 74 65 64 20 66 75 6e 63 | 74 69 6f 6e 20 70 72 6f |ted func|tion pro|
|000054f0| 74 6f 74 79 70 65 20 6f | 72 20 63 6f 6e 76 65 72 |totype o|r conver|
|00005500| 74 65 64 20 66 75 6e 63 | 74 69 6f 6e 20 64 65 66 |ted func|tion def|
|00005510| 69 6e 69 74 69 6f 6e 2c | 0a 58 74 68 65 20 63 6f |inition,|.Xthe co|
|00005520| 6e 74 65 6e 74 20 6f 66 | 20 74 68 65 20 64 65 63 |ntent of| the dec|
|00005530| 6c 61 72 61 74 69 6f 6e | 20 62 65 74 77 65 65 6e |laration| between|
|00005540| 20 74 68 65 20 62 72 61 | 63 65 73 20 69 73 20 65 | the bra|ces is e|
|00005550| 6d 70 74 79 2e 0a 58 2e | 4c 50 0a 58 54 68 65 20 |mpty..X.|LP.XThe |
|00005560| 70 72 6f 67 72 61 6d 20 | 64 6f 65 73 20 6e 6f 74 |program |does not|
|00005570| 20 70 69 70 65 20 74 68 | 65 20 73 6f 75 72 63 65 | pipe th|e source|
|00005580| 20 66 69 6c 65 73 20 74 | 68 72 6f 75 67 68 20 74 | files t|hrough t|
|00005590| 68 65 20 43 20 70 72 65 | 70 72 6f 63 65 73 73 6f |he C pre|processo|
|000055a0| 72 20 77 68 65 6e 0a 58 | 69 74 20 69 73 20 63 6f |r when.X|it is co|
|000055b0| 6e 76 65 72 74 69 6e 67 | 20 66 75 6e 63 74 69 6f |nverting| functio|
|000055c0| 6e 20 64 65 66 69 6e 69 | 74 69 6f 6e 73 2e 0a 58 |n defini|tions..X|
|000055d0| 49 6e 73 74 65 61 64 2c | 20 69 74 20 74 72 69 65 |Instead,| it trie|
|000055e0| 73 20 74 6f 20 68 61 6e | 64 6c 65 20 70 72 65 70 |s to han|dle prep|
|000055f0| 72 6f 63 65 73 73 6f 72 | 20 64 69 72 65 63 74 69 |rocessor| directi|
|00005600| 76 65 73 20 61 6e 64 20 | 6d 61 63 72 6f 73 20 69 |ves and |macros i|
|00005610| 74 73 65 6c 66 0a 58 61 | 6e 64 20 63 61 6e 20 62 |tself.Xa|nd can b|
|00005620| 65 20 63 6f 6e 66 75 73 | 65 64 20 62 79 20 74 72 |e confus|ed by tr|
|00005630| 69 63 6b 79 20 6d 61 63 | 72 6f 20 65 78 70 61 6e |icky mac|ro expan|
|00005640| 73 69 6f 6e 73 2e 0a 58 | 54 68 65 20 63 6f 6e 76 |sions..X|The conv|
|00005650| 65 72 73 69 6f 6e 20 61 | 6c 73 6f 20 64 69 73 63 |ersion a|lso disc|
|00005660| 61 72 64 73 20 73 6f 6d | 65 20 63 6f 6d 6d 65 6e |ards som|e commen|
|00005670| 74 73 20 69 6e 20 74 68 | 65 20 66 75 6e 63 74 69 |ts in th|e functi|
|00005680| 6f 6e 20 64 65 66 69 6e | 69 74 69 6f 6e 0a 58 68 |on defin|ition.Xh|
|00005690| 65 61 64 2e 0a 58 2e 4c | 50 0a 58 54 68 65 20 2d |ead..X.L|P.XThe -|
|000056a0| 76 20 6f 70 74 69 6f 6e | 20 64 6f 65 73 20 6e 6f |v option| does no|
|000056b0| 74 20 67 65 6e 65 72 61 | 74 65 20 64 65 63 6c 61 |t genera|te decla|
|000056c0| 72 61 74 69 6f 6e 73 20 | 66 6f 72 20 76 61 72 69 |rations |for vari|
|000056d0| 61 62 6c 65 73 20 64 65 | 66 69 6e 65 64 20 77 69 |ables de|fined wi|
|000056e0| 74 68 20 74 68 65 0a 58 | 2e 42 20 65 78 74 65 72 |th the.X|.B exter|
|000056f0| 6e 0a 58 73 70 65 63 69 | 66 69 65 72 2e 0a 58 54 |n.Xspeci|fier..XT|
|00005700| 68 69 73 20 64 6f 65 73 | 6e 27 74 20 73 74 72 69 |his does|n't stri|
|00005710| 63 74 6c 79 20 63 6f 6e | 66 6f 72 6d 20 74 6f 20 |ctly con|form to |
|00005720| 74 68 65 20 43 20 6c 61 | 6e 67 75 61 67 65 20 73 |the C la|nguage s|
|00005730| 74 61 6e 64 61 72 64 20 | 62 75 74 20 74 68 69 73 |tandard |but this|
|00005740| 20 72 75 6c 65 0a 58 77 | 61 73 20 69 6d 70 6c 65 | rule.Xw|as imple|
|00005750| 6d 65 6e 74 65 64 20 62 | 65 63 61 75 73 65 20 69 |mented b|ecause i|
|00005760| 6e 63 6c 75 64 65 20 66 | 69 6c 65 73 20 63 6f 6d |nclude f|iles com|
|00005770| 6d 6f 6e 6c 79 20 64 65 | 63 6c 61 72 65 20 76 61 |monly de|clare va|
|00005780| 72 69 61 62 6c 65 73 20 | 74 68 69 73 20 77 61 79 |riables |this way|
|00005790| 2e 0a 58 2e 4c 50 0a 58 | 57 68 65 6e 20 74 68 65 |..X.LP.X|When the|
|000057a0| 20 70 72 6f 67 72 61 6d | 20 65 6e 63 6f 75 6e 74 | program| encount|
|000057b0| 65 72 73 20 61 6e 20 65 | 72 72 6f 72 2c 20 69 74 |ers an e|rror, it|
|000057c0| 20 75 73 75 61 6c 6c 79 | 20 6f 75 74 70 75 74 73 | usually| outputs|
|000057d0| 20 74 68 65 20 6e 6f 74 | 20 76 65 72 79 0a 58 64 | the not| very.Xd|
|000057e0| 65 73 63 72 69 70 74 69 | 76 65 20 6d 65 73 73 61 |escripti|ve messa|
|000057f0| 67 65 20 22 73 79 6e 74 | 61 78 20 65 72 72 6f 72 |ge "synt|ax error|
|00005800| 22 2e 0a 58 2e 4c 50 0a | 58 4f 70 74 69 6f 6e 73 |"..X.LP.|XOptions|
|00005810| 20 74 68 61 74 20 74 61 | 6b 65 20 73 74 72 69 6e | that ta|ke strin|
|00005820| 67 20 61 72 67 75 6d 65 | 6e 74 73 20 6f 6e 6c 79 |g argume|nts only|
|00005830| 20 69 6e 74 65 72 70 72 | 65 74 20 74 68 65 20 66 | interpr|et the f|
|00005840| 6f 6c 6c 6f 77 69 6e 67 | 0a 58 63 68 61 72 61 63 |ollowing|.Xcharac|
|00005850| 74 65 72 20 65 73 63 61 | 70 65 20 73 65 71 75 65 |ter esca|pe seque|
|00005860| 6e 63 65 73 3a 0a 58 2e | 45 58 0a 58 5c 5c 6e 09 |nces:.X.|EX.X\\n.|
|00005870| 6e 65 77 6c 69 6e 65 0a | 58 5c 5c 74 09 74 61 62 |newline.|X\\t.tab|
|00005880| 0a 58 2e 45 45 0a 58 2e | 53 48 20 41 55 54 48 4f |.X.EE.X.|SH AUTHO|
|00005890| 52 0a 58 2e 6e 66 0a 58 | 43 68 69 6e 20 48 75 61 |R.X.nf.X|Chin Hua|
|000058a0| 6e 67 0a 58 63 74 68 75 | 61 6e 67 40 7a 65 72 6f |ng.Xcthu|ang@zero|
|000058b0| 73 61 6e 2e 55 55 43 50 | 0a 58 63 68 69 6e 2e 68 |san.UUCP|.Xchin.h|
|000058c0| 75 61 6e 67 40 63 61 6e | 72 65 6d 2e 63 6f 6d 0a |uang@can|rem.com.|
|000058d0| 58 2e 66 69 0a 58 2e 53 | 48 20 22 53 45 45 20 41 |X.fi.X.S|H "SEE A|
|000058e0| 4c 53 4f 22 0a 58 63 63 | 28 31 29 2c 0a 58 63 70 |LSO".Xcc|(1),.Xcp|
|000058f0| 70 28 31 29 0a 45 4e 44 | 5f 4f 46 5f 63 70 72 6f |p(1).END|_OF_cpro|
|00005900| 74 6f 2e 31 0a 69 66 20 | 74 65 73 74 20 36 30 39 |to.1.if |test 609|
|00005910| 31 20 2d 6e 65 20 60 77 | 63 20 2d 63 20 3c 63 70 |1 -ne `w|c -c <cp|
|00005920| 72 6f 74 6f 2e 31 60 3b | 20 74 68 65 6e 0a 20 20 |roto.1`;| then. |
|00005930| 20 20 65 63 68 6f 20 73 | 68 61 72 3a 20 5c 22 63 | echo s|har: \"c|
|00005940| 70 72 6f 74 6f 2e 31 5c | 22 20 75 6e 70 61 63 6b |proto.1\|" unpack|
|00005950| 65 64 20 77 69 74 68 20 | 77 72 6f 6e 67 20 73 69 |ed with |wrong si|
|00005960| 7a 65 21 0a 66 69 0a 23 | 20 65 6e 64 20 6f 66 20 |ze!.fi.#| end of |
|00005970| 6f 76 65 72 77 72 69 74 | 69 6e 67 20 63 68 65 63 |overwrit|ing chec|
|00005980| 6b 0a 66 69 0a 69 66 20 | 74 65 73 74 20 2d 66 20 |k.fi.if |test -f |
|00005990| 4d 61 6b 65 66 69 6c 65 | 2e 62 63 20 2d 61 20 22 |Makefile|.bc -a "|
|000059a0| 24 7b 31 7d 22 20 21 3d | 20 22 2d 63 22 20 3b 20 |${1}" !=| "-c" ; |
|000059b0| 74 68 65 6e 20 0a 20 20 | 65 63 68 6f 20 73 68 61 |then . |echo sha|
|000059c0| 72 3a 20 57 69 6c 6c 20 | 6e 6f 74 20 6f 76 65 72 |r: Will |not over|
|000059d0| 2d 77 72 69 74 65 20 65 | 78 69 73 74 69 6e 67 20 |-write e|xisting |
|000059e0| 66 69 6c 65 20 5c 22 4d | 61 6b 65 66 69 6c 65 2e |file \"M|akefile.|
|000059f0| 62 63 5c 22 0a 65 6c 73 | 65 0a 65 63 68 6f 20 73 |bc\".els|e.echo s|
|00005a00| 68 61 72 3a 20 45 78 74 | 72 61 63 74 69 6e 67 20 |har: Ext|racting |
|00005a10| 5c 22 4d 61 6b 65 66 69 | 6c 65 2e 62 63 5c 22 20 |\"Makefi|le.bc\" |
|00005a20| 5c 28 31 34 39 39 20 63 | 68 61 72 61 63 74 65 72 |\(1499 c|haracter|
|00005a30| 73 5c 29 0a 73 65 64 20 | 22 73 2f 5e 58 2f 2f 22 |s\).sed |"s/^X//"|
|00005a40| 20 3e 4d 61 6b 65 66 69 | 6c 65 2e 62 63 20 3c 3c | >Makefi|le.bc <<|
|00005a50| 27 45 4e 44 5f 4f 46 5f | 4d 61 6b 65 66 69 6c 65 |'END_OF_|Makefile|
|00005a60| 2e 62 63 27 0a 58 23 20 | 24 49 64 3a 20 6d 61 6b |.bc'.X# |$Id: mak|
|00005a70| 65 66 69 6c 65 2e 62 63 | 20 33 2e 31 20 39 32 2f |efile.bc| 3.1 92/|
|00005a80| 30 33 2f 30 33 20 31 30 | 3a 34 35 3a 35 33 20 63 |03/03 10|:45:53 c|
|00005a90| 74 68 75 61 6e 67 20 45 | 78 70 20 24 0a 58 23 0a |thuang E|xp $.X#.|
|00005aa0| 58 23 20 42 6f 72 6c 61 | 6e 64 20 43 2b 2b 20 6d |X# Borla|nd C++ m|
|00005ab0| 61 6b 65 66 69 6c 65 20 | 66 6f 72 20 43 20 70 72 |akefile |for C pr|
|00005ac0| 6f 74 6f 74 79 70 65 20 | 67 65 6e 65 72 61 74 6f |ototype |generato|
|00005ad0| 72 0a 58 0a 58 23 20 44 | 65 66 69 6e 65 20 4d 53 |r.X.X# D|efine MS|
|00005ae0| 44 4f 53 20 66 6f 72 20 | 4d 53 2d 44 4f 53 20 63 |DOS for |MS-DOS c|
|00005af0| 6f 6d 70 61 74 69 62 69 | 6c 69 74 79 2e 0a 58 23 |ompatibi|lity..X#|
|00005b00| 20 44 65 66 69 6e 65 20 | 54 55 52 42 4f 5f 43 50 | Define |TURBO_CP|
|00005b10| 50 20 74 6f 20 70 69 70 | 65 20 74 68 65 20 69 6e |P to pip|e the in|
|00005b20| 70 75 74 20 74 68 72 6f | 75 67 68 20 74 68 65 20 |put thro|ugh the |
|00005b30| 54 75 72 62 6f 20 43 20 | 70 72 65 70 72 6f 63 65 |Turbo C |preproce|
|00005b40| 73 73 6f 72 2e 0a 58 44 | 45 46 49 4e 45 53 20 3d |ssor..XD|EFINES =|
|00005b50| 20 2d 44 4d 53 44 4f 53 | 20 2d 44 54 55 52 42 4f | -DMSDOS| -DTURBO|
|00005b60| 5f 43 50 50 0a 58 0a 58 | 4c 45 58 20 3d 20 6c 65 |_CPP.X.X|LEX = le|
|00005b70| 78 0a 58 59 41 43 43 20 | 3d 20 79 61 63 63 0a 58 |x.XYACC |= yacc.X|
|00005b80| 43 43 20 3d 20 62 63 63 | 0a 58 43 46 4c 41 47 53 |CC = bcc|.XCFLAGS|
|00005b90| 20 3d 20 2d 6d 63 20 24 | 28 44 45 46 49 4e 45 53 | = -mc $|(DEFINES|
|00005ba0| 29 0a 58 4c 49 42 53 20 | 3d 20 5c 62 63 5c 6c 69 |).XLIBS |= \bc\li|
|00005bb0| 62 5c 77 69 6c 64 61 72 | 67 73 2e 6f 62 6a 0a 58 |b\wildar|gs.obj.X|
|00005bc0| 0a 58 44 49 53 54 31 20 | 3d 20 52 45 41 44 4d 45 |.XDIST1 |= README|
|00005bd0| 20 43 48 41 4e 47 45 53 | 20 63 70 72 6f 74 6f 2e | CHANGES| cproto.|
|00005be0| 6d 61 6e 0a 58 44 49 53 | 54 32 20 3d 20 63 70 72 |man.XDIS|T2 = cpr|
|00005bf0| 6f 74 6f 2e 31 20 4d 61 | 6b 65 66 69 6c 65 2e 62 |oto.1 Ma|kefile.b|
|00005c00| 63 20 4d 61 6b 65 66 69 | 6c 65 2e 6d 73 63 20 4d |c Makefi|le.msc M|
|00005c10| 61 6b 65 66 69 6c 65 2e | 75 6e 69 20 6c 65 78 2e |akefile.|uni lex.|
|00005c20| 6c 20 67 72 61 6d 6d 61 | 72 2e 79 0a 58 44 49 53 |l gramma|r.y.XDIS|
|00005c30| 54 33 20 3d 20 63 6f 6e | 66 69 67 2e 68 20 63 70 |T3 = con|fig.h cp|
|00005c40| 72 6f 74 6f 2e 68 20 70 | 61 74 63 68 6c 65 76 2e |roto.h p|atchlev.|
|00005c50| 68 20 73 65 6d 61 6e 74 | 69 63 2e 68 20 73 79 6d |h semant|ic.h sym|
|00005c60| 62 6f 6c 2e 68 0a 58 44 | 49 53 54 34 20 3d 20 63 |bol.h.XD|IST4 = c|
|00005c70| 70 72 6f 74 6f 2e 63 20 | 70 6f 70 65 6e 2e 63 20 |proto.c |popen.c |
|00005c80| 73 65 6d 61 6e 74 69 63 | 2e 63 20 73 74 72 73 74 |semantic|.c strst|
|00005c90| 72 2e 63 20 73 79 6d 62 | 6f 6c 2e 63 0a 58 0a 58 |r.c symb|ol.c.X.X|
|00005ca0| 4f 42 4a 45 43 54 53 20 | 3d 20 63 70 72 6f 74 6f |OBJECTS |= cproto|
|00005cb0| 2e 6f 62 6a 20 67 65 74 | 6f 70 74 2e 6f 62 6a 20 |.obj get|opt.obj |
|00005cc0| 70 6f 70 65 6e 2e 6f 62 | 6a 20 73 65 6d 61 6e 74 |popen.ob|j semant|
|00005cd0| 69 63 2e 6f 62 6a 20 73 | 79 6d 62 6f 6c 2e 6f 62 |ic.obj s|ymbol.ob|
|00005ce0| 6a 20 79 5f 74 61 62 2e | 6f 62 6a 0a 58 0a 58 61 |j y_tab.|obj.X.Xa|
|00005cf0| 6c 6c 3a 20 63 70 72 6f | 74 6f 2e 65 78 65 0a 58 |ll: cpro|to.exe.X|
|00005d00| 0a 58 63 70 72 6f 74 6f | 2e 65 78 65 3a 20 24 28 |.Xcproto|.exe: $(|
|00005d10| 4f 42 4a 45 43 54 53 29 | 0a 58 09 24 28 43 43 29 |OBJECTS)|.X.$(CC)|
|00005d20| 20 24 28 43 46 4c 41 47 | 53 29 20 2d 65 24 2a 2e | $(CFLAG|S) -e$*.|
|00005d30| 65 78 65 20 24 28 4f 42 | 4a 45 43 54 53 29 20 24 |exe $(OB|JECTS) $|
|00005d40| 28 4c 49 42 53 29 0a 58 | 0a 58 79 5f 74 61 62 2e |(LIBS).X|.Xy_tab.|
|00005d50| 6f 62 6a 3a 20 79 5f 74 | 61 62 2e 63 20 6c 65 78 |obj: y_t|ab.c lex|
|00005d60| 5f 79 79 2e 63 20 63 6f | 6e 66 69 67 2e 68 20 63 |_yy.c co|nfig.h c|
|00005d70| 70 72 6f 74 6f 2e 68 20 | 73 79 6d 62 6f 6c 2e 68 |proto.h |symbol.h|
|00005d80| 20 73 65 6d 61 6e 74 69 | 63 2e 68 0a 58 09 24 28 | semanti|c.h.X.$(|
|00005d90| 43 43 29 20 24 28 43 46 | 4c 41 47 53 29 20 2d 63 |CC) $(CF|LAGS) -c|
|00005da0| 20 24 2a 2e 63 0a 58 0a | 58 79 5f 74 61 62 2e 63 | $*.c.X.|Xy_tab.c|
|00005db0| 3a 20 67 72 61 6d 6d 61 | 72 2e 79 0a 58 09 24 28 |: gramma|r.y.X.$(|
|00005dc0| 59 41 43 43 29 20 67 72 | 61 6d 6d 61 72 2e 79 0a |YACC) gr|ammar.y.|
|00005dd0| 58 0a 58 6c 65 78 5f 79 | 79 2e 63 3a 20 6c 65 78 |X.Xlex_y|y.c: lex|
|00005de0| 2e 6c 0a 58 09 24 28 4c | 45 58 29 20 6c 65 78 2e |.l.X.$(L|EX) lex.|
|00005df0| 6c 0a 58 0a 58 63 70 72 | 6f 74 6f 2e 6d 61 6e 3a |l.X.Xcpr|oto.man:|
|00005e00| 20 63 70 72 6f 74 6f 2e | 31 0a 58 09 63 61 77 66 | cproto.|1.X.cawf|
|00005e10| 20 2d 6d 61 6e 20 24 2a | 2e 31 20 7c 20 62 73 66 | -man $*|.1 | bsf|
|00005e20| 69 6c 74 20 2d 20 3e 24 | 2a 2e 6d 61 6e 0a 58 0a |ilt - >$|*.man.X.|
|00005e30| 58 63 6c 65 61 6e 3a 0a | 58 09 65 72 61 73 65 20 |Xclean:.|X.erase |
|00005e40| 2a 2e 6f 62 6a 0a 58 09 | 65 72 61 73 65 20 2a 2e |*.obj.X.|erase *.|
|00005e50| 62 61 6b 0a 58 09 65 72 | 61 73 65 20 2a 2e 6c 6f |bak.X.er|ase *.lo|
|00005e60| 67 0a 58 09 65 72 61 73 | 65 20 6c 65 78 5f 79 79 |g.X.eras|e lex_yy|
|00005e70| 2e 63 0a 58 09 65 72 61 | 73 65 20 79 5f 74 61 62 |.c.X.era|se y_tab|
|00005e80| 2e 63 0a 58 09 65 72 61 | 73 65 20 63 70 72 6f 74 |.c.X.era|se cprot|
|00005e90| 6f 2e 65 78 65 0a 58 0a | 58 63 69 3a 0a 58 09 63 |o.exe.X.|Xci:.X.c|
|00005ea0| 69 20 2d 75 33 20 24 28 | 44 49 53 54 32 29 20 24 |i -u3 $(|DIST2) $|
|00005eb0| 28 44 49 53 54 33 29 0a | 58 09 63 69 20 2d 75 33 |(DIST3).|X.ci -u3|
|00005ec0| 20 24 28 44 49 53 54 34 | 29 0a 58 0a 58 73 68 61 | $(DIST4|).X.Xsha|
|00005ed0| 72 3a 0a 58 09 72 6d 63 | 72 20 24 28 44 49 53 54 |r:.X.rmc|r $(DIST|
|00005ee0| 31 29 20 24 28 44 49 53 | 54 32 29 0a 58 09 72 6d |1) $(DIS|T2).X.rm|
|00005ef0| 63 72 20 24 28 44 49 53 | 54 33 29 20 24 28 44 49 |cr $(DIS|T3) $(DI|
|00005f00| 53 54 34 29 0a 58 09 73 | 68 61 72 20 24 28 44 49 |ST4).X.s|har $(DI|
|00005f10| 53 54 31 29 20 24 28 44 | 49 53 54 32 29 20 3e 63 |ST1) $(D|IST2) >c|
|00005f20| 70 72 6f 74 6f 2e 73 68 | 31 0a 58 09 73 68 61 72 |proto.sh|1.X.shar|
|00005f30| 20 24 28 44 49 53 54 33 | 29 20 24 28 44 49 53 54 | $(DIST3|) $(DIST|
|00005f40| 34 29 20 3e 63 70 72 6f | 74 6f 2e 73 68 32 0a 58 |4) >cpro|to.sh2.X|
|00005f50| 0a 58 69 6e 73 63 72 3a | 0a 58 09 69 6e 73 63 72 |.Xinscr:|.X.inscr|
|00005f60| 20 24 28 44 49 53 54 31 | 29 20 24 28 44 49 53 54 | $(DIST1|) $(DIST|
|00005f70| 32 29 0a 58 09 69 6e 73 | 63 72 20 24 28 44 49 53 |2).X.ins|cr $(DIS|
|00005f80| 54 33 29 20 24 28 44 49 | 53 54 34 29 0a 58 0a 58 |T3) $(DI|ST4).X.X|
|00005f90| 23 20 44 4f 20 4e 4f 54 | 20 44 45 4c 45 54 45 20 |# DO NOT| DELETE |
|00005fa0| 54 48 49 53 20 4c 49 4e | 45 20 2d 2d 20 6d 61 6b |THIS LIN|E -- mak|
|00005fb0| 65 20 64 65 70 65 6e 64 | 20 64 65 70 65 6e 64 73 |e depend| depends|
|00005fc0| 20 6f 6e 20 69 74 2e 0a | 58 0a 58 63 70 72 6f 74 | on it..|X.Xcprot|
|00005fd0| 6f 2e 6f 62 6a 3a 20 63 | 6f 6e 66 69 67 2e 68 20 |o.obj: c|onfig.h |
|00005fe0| 63 70 72 6f 74 6f 2e 68 | 20 73 79 6d 62 6f 6c 2e |cproto.h| symbol.|
|00005ff0| 68 0a 58 70 6f 70 65 6e | 2e 6f 62 6a 3a 20 63 6f |h.Xpopen|.obj: co|
|00006000| 6e 66 69 67 2e 68 20 63 | 70 72 6f 74 6f 2e 68 0a |nfig.h c|proto.h.|
|00006010| 58 73 65 6d 61 6e 74 69 | 63 2e 6f 62 6a 3a 20 63 |Xsemanti|c.obj: c|
|00006020| 6f 6e 66 69 67 2e 68 20 | 63 70 72 6f 74 6f 2e 68 |onfig.h |cproto.h|
|00006030| 20 73 79 6d 62 6f 6c 2e | 68 20 73 65 6d 61 6e 74 | symbol.|h semant|
|00006040| 69 63 2e 68 0a 58 73 74 | 72 73 74 72 2e 6f 62 6a |ic.h.Xst|rstr.obj|
|00006050| 3a 20 63 6f 6e 66 69 67 | 2e 68 0a 58 73 79 6d 62 |: config|.h.Xsymb|
|00006060| 6f 6c 2e 6f 62 6a 3a 20 | 63 6f 6e 66 69 67 2e 68 |ol.obj: |config.h|
|00006070| 20 63 70 72 6f 74 6f 2e | 68 20 73 79 6d 62 6f 6c | cproto.|h symbol|
|00006080| 2e 68 0a 45 4e 44 5f 4f | 46 5f 4d 61 6b 65 66 69 |.h.END_O|F_Makefi|
|00006090| 6c 65 2e 62 63 0a 69 66 | 20 74 65 73 74 20 31 34 |le.bc.if| test 14|
|000060a0| 39 39 20 2d 6e 65 20 60 | 77 63 20 2d 63 20 3c 4d |99 -ne `|wc -c <M|
|000060b0| 61 6b 65 66 69 6c 65 2e | 62 63 60 3b 20 74 68 65 |akefile.|bc`; the|
|000060c0| 6e 0a 20 20 20 20 65 63 | 68 6f 20 73 68 61 72 3a |n. ec|ho shar:|
|000060d0| 20 5c 22 4d 61 6b 65 66 | 69 6c 65 2e 62 63 5c 22 | \"Makef|ile.bc\"|
|000060e0| 20 75 6e 70 61 63 6b 65 | 64 20 77 69 74 68 20 77 | unpacke|d with w|
|000060f0| 72 6f 6e 67 20 73 69 7a | 65 21 0a 66 69 0a 23 20 |rong siz|e!.fi.# |
|00006100| 65 6e 64 20 6f 66 20 6f | 76 65 72 77 72 69 74 69 |end of o|verwriti|
|00006110| 6e 67 20 63 68 65 63 6b | 0a 66 69 0a 69 66 20 74 |ng check|.fi.if t|
|00006120| 65 73 74 20 2d 66 20 4d | 61 6b 65 66 69 6c 65 2e |est -f M|akefile.|
|00006130| 6d 73 63 20 2d 61 20 22 | 24 7b 31 7d 22 20 21 3d |msc -a "|${1}" !=|
|00006140| 20 22 2d 63 22 20 3b 20 | 74 68 65 6e 20 0a 20 20 | "-c" ; |then . |
|00006150| 65 63 68 6f 20 73 68 61 | 72 3a 20 57 69 6c 6c 20 |echo sha|r: Will |
|00006160| 6e 6f 74 20 6f 76 65 72 | 2d 77 72 69 74 65 20 65 |not over|-write e|
|00006170| 78 69 73 74 69 6e 67 20 | 66 69 6c 65 20 5c 22 4d |xisting |file \"M|
|00006180| 61 6b 65 66 69 6c 65 2e | 6d 73 63 5c 22 0a 65 6c |akefile.|msc\".el|
|00006190| 73 65 0a 65 63 68 6f 20 | 73 68 61 72 3a 20 45 78 |se.echo |shar: Ex|
|000061a0| 74 72 61 63 74 69 6e 67 | 20 5c 22 4d 61 6b 65 66 |tracting| \"Makef|
|000061b0| 69 6c 65 2e 6d 73 63 5c | 22 20 5c 28 31 35 32 31 |ile.msc\|" \(1521|
|000061c0| 20 63 68 61 72 61 63 74 | 65 72 73 5c 29 0a 73 65 | charact|ers\).se|
|000061d0| 64 20 22 73 2f 5e 58 2f | 2f 22 20 3e 4d 61 6b 65 |d "s/^X/|/" >Make|
|000061e0| 66 69 6c 65 2e 6d 73 63 | 20 3c 3c 27 45 4e 44 5f |file.msc| <<'END_|
|000061f0| 4f 46 5f 4d 61 6b 65 66 | 69 6c 65 2e 6d 73 63 27 |OF_Makef|ile.msc'|
|00006200| 0a 58 23 20 24 49 64 3a | 20 6d 61 6b 65 66 69 6c |.X# $Id:| makefil|
|00006210| 65 2e 6d 73 63 20 33 2e | 32 20 39 32 2f 30 33 2f |e.msc 3.|2 92/03/|
|00006220| 31 34 20 31 31 3a 35 36 | 3a 34 30 20 63 74 68 75 |14 11:56|:40 cthu|
|00006230| 61 6e 67 20 45 78 70 20 | 24 0a 58 23 0a 58 23 20 |ang Exp |$.X#.X# |
|00006240| 4d 69 63 72 6f 73 6f 66 | 74 20 43 20 6d 61 6b 65 |Microsof|t C make|
|00006250| 66 69 6c 65 20 66 6f 72 | 20 43 20 70 72 6f 74 6f |file for| C proto|
|00006260| 74 79 70 65 20 67 65 6e | 65 72 61 74 6f 72 0a 58 |type gen|erator.X|
|00006270| 0a 58 23 20 44 65 66 69 | 6e 65 20 4d 53 44 4f 53 |.X# Defi|ne MSDOS|
|00006280| 20 66 6f 72 20 4d 53 2d | 44 4f 53 20 63 6f 6d 70 | for MS-|DOS comp|
|00006290| 61 74 69 62 69 6c 69 74 | 79 2e 0a 58 23 20 44 65 |atibilit|y..X# De|
|000062a0| 66 69 6e 65 20 54 55 52 | 42 4f 5f 43 50 50 20 74 |fine TUR|BO_CPP t|
|000062b0| 6f 20 70 69 70 65 20 74 | 68 65 20 69 6e 70 75 74 |o pipe t|he input|
|000062c0| 20 74 68 72 6f 75 67 68 | 20 74 68 65 20 54 75 72 | through| the Tur|
|000062d0| 62 6f 20 43 20 70 72 65 | 70 72 6f 63 65 73 73 6f |bo C pre|processo|
|000062e0| 72 2e 0a 58 44 45 46 49 | 4e 45 53 20 3d 20 2d 44 |r..XDEFI|NES = -D|
|000062f0| 4d 53 44 4f 53 0a 58 0a | 58 4c 45 58 20 3d 20 6c |MSDOS.X.|XLEX = l|
|00006300| 65 78 0a 58 59 41 43 43 | 20 3d 20 79 61 63 63 0a |ex.XYACC| = yacc.|
|00006310| 58 43 43 20 3d 20 63 6c | 0a 58 43 46 4c 41 47 53 |XCC = cl|.XCFLAGS|
|00006320| 20 3d 20 2d 41 43 20 24 | 28 44 45 46 49 4e 45 53 | = -AC $|(DEFINES|
|00006330| 29 0a 58 4c 49 42 53 20 | 3d 20 5c 63 36 5c 6c 69 |).XLIBS |= \c6\li|
|00006340| 62 5c 73 65 74 61 72 67 | 76 2e 6f 62 6a 0a 58 4c |b\setarg|v.obj.XL|
|00006350| 44 46 4c 41 47 53 20 3d | 20 2f 6c 69 6e 6b 20 2f |DFLAGS =| /link /|
|00006360| 6e 6f 65 20 2f 73 74 61 | 63 6b 3a 34 30 39 36 0a |noe /sta|ck:4096.|
|00006370| 58 0a 58 44 49 53 54 31 | 20 3d 20 52 45 41 44 4d |X.XDIST1| = READM|
|00006380| 45 20 43 48 41 4e 47 45 | 53 20 63 70 72 6f 74 6f |E CHANGE|S cproto|
|00006390| 2e 6d 61 6e 0a 58 44 49 | 53 54 32 20 3d 20 63 70 |.man.XDI|ST2 = cp|
|000063a0| 72 6f 74 6f 2e 31 20 4d | 61 6b 65 66 69 6c 65 2e |roto.1 M|akefile.|
|000063b0| 62 63 20 4d 61 6b 65 66 | 69 6c 65 2e 6d 73 63 20 |bc Makef|ile.msc |
|000063c0| 4d 61 6b 65 66 69 6c 65 | 2e 75 6e 69 20 6c 65 78 |Makefile|.uni lex|
|000063d0| 2e 6c 20 67 72 61 6d 6d | 61 72 2e 79 0a 58 44 49 |.l gramm|ar.y.XDI|
|000063e0| 53 54 33 20 3d 20 63 6f | 6e 66 69 67 2e 68 20 63 |ST3 = co|nfig.h c|
|000063f0| 70 72 6f 74 6f 2e 68 20 | 70 61 74 63 68 6c 65 76 |proto.h |patchlev|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.