home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cs.utexas.edu!sdd.hp.com!swrinde!mips!darwin.sura.net!dtix!mimsy!ra!russo
- From: russo@rudedog.nrl.navy.mil (Kevin Russo)
- Newsgroups: comp.sys.sgi
- Subject: Missing Prototypes - Solution!
- Keywords: prototypes, irix
- Message-ID: <3419@ra.nrl.navy.mil>
- Date: 22 Aug 92 02:52:12 GMT
- Sender: usenet@ra.nrl.navy.mil
- Organization: Naval Research Lab, Washington, DC
- Lines: 44
-
-
- Since we're all ANSI-fying our code these days, several people may
- have run into the ol' missing prototype problem. It seems that the
- prototype declarations for some system and library routines are not
- anywhere to be found in the header files. (It's always the one you
- want, too.)
-
- I began investigating these inconsistencies between the man pages
- and header files (IRIX 4.0.4) a few weeks ago. I found that the
- functions fell into 5 states of documentation.
-
- Functions whose man pages...
- o were in sync with the #include files. These are what we want!
-
- o listed no #include files *and* the function was not prototyped
- in any header file.
-
- o listed no #include files but the function was prototyped in
- *some* header file.
-
- o listed #include files(s) but the function was prototyped somewhere else.
-
- o listed #include files(s) but the function was not prototyped anywhere.
-
- Combinations! Permutations!
- And of course there were some functions declared in headers but
- had no man page. I'm not interested in these undocumented guys.
-
- A few shell and awk scripts later, and there were ~280 functions whose
- man pages didn't jive with the /usr/include tree.
-
- In fairness to SGI, the IRIX man pages come from many sources outside
- of SGI, eg AT&T, Sun, BSD, Mips, X11, and a good many of the ones with
- problems were from those places. (I didn't attempt to check the X11 tree.)
-
- I put all the missing prototypes and extern variables in one jumbo
- header file. Since the file is 530 lines, I'm reluctant to post it,
- but I'll send it to anyone who wants it. Or I'll post it if there's a
- big demand. Happy Hacking.
-
-
- Kevin Russo
- russo@orion.nrl.navy.mil
- SFA, Inc. / US Naval Research Lab, Washington, DC
-