scott@nastar.UUCP (Scott Barman) (11/28/89)
(I hope I word this correctly :-)
Does ANSI C require a prototype for every function used within a file?
For example, if in main.c I know I can do (assuming all the #includes
are entered first):
void intrhandlr(sig)
{
... code ...
}
void main(void)
{
... code ...
signal(SIGINT,intrhandlr);
... more code ...
junk(x);
}
And junk is in another file (e.g. junk.c). Do I have to include the
line
extern void junk(int x);
in the main.c file?
I'm sure this has been debated on the net before--along with its "religious"
implications. Please email me the reply to keep net traffic down to a dull
roar! Thanks!!!!
--
scott barman
{gatech, emory}!nastar!scott