Article View: gnu.gcc.help
Article #50163protoize to make prototype headers
From: Dan Karron
Date: Tue, 09 Nov 1993 19:51
Date: Tue, 09 Nov 1993 19:51
39 lines
2344 bytes
2344 bytes
I have a slightly different use for protoize, and I was wondering if anyone had some ideas as to how to wire this functionality directly into protoize. Here is the idea: Each .c file instances static text and variables, and some 'extern' text and variables. The externs can be referenced in other files by an extern declaration. In one file the objects are declared (defined, the actual thing exists), and in another file the objects are defined (referred to, and prototyped, but not actually instanced) Or do I have it backward. (define, declare, argument, parameter, I am not certain which way one referres to the other.....:) Now, my style is to have every .c include a Private.h file, which includes a Public.h file where all of the stuff that the .c file wants to make public is defined. So by running protoize and grep'ing out all of the non local and non static headers, I can get a short list of what is public in that file. Only there are other objects, such as variables, that need to be made public, and conversly, if you want a to verify that you are not leaving everything in your .c file public, you can use this to check that. Any thoughts on this issue are welcome. I did have some code that read COFF symbol tables to generate public header files. What is involved with walking the gnu symbol tables ? What style are they ? DWARF or COFF ? Cheers! Dan. | karron@nyu.edu (e-mail alias ) Dan Karron, Ph.D.,Research Associate| | Phone: 212 263 5210 Fax: 212 263 7190 New York University Medical Center | | 560 First Avenue Digital Pager <1> 212 397 9330 | | New York, New York 10016 <2> 10896 <3> <your-number-here> |
Technical Details
Message-ID:
<9311091945.AA13240@tesla.psych.nyu.edu>Path:
arc1-ca.pugleaf.net!gmd.de!xlink.net!sol.ctr.columbia.edu!math.ohio-state.edu!cis.ohio-state.edu!tesla.psych.nyu.edu!danShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,72658e6f8318fe2d,start X-Google-Attributes: gid11318c,public X-Google-ArrivalTime: 1993-11-09 12:34:02 PST Path: arc1-ca.pugleaf.net!gmd.de!xlink.net!sol.ctr.columbia.edu!math.ohio-state.edu!cis.ohio-state.edu!tesla.psych.nyu.edu!dan From: dan@tesla.psych.nyu.edu (Dan Karron) Newsgroups: gnu.gcc.help Subject: protoize to make prototype headers Date: 9 Nov 1993 14:51:08 -0500 Organization: GNUs Not Usenet Lines: 40 Sender: daemon@cis.ohio-state.edu Distribution: gnu Message-ID: <9311091945.AA13240@tesla.psych.nyu.edu> Reply-To: karron@nyu.edu