On Tue, 9 Sep 2003, Warren Turkal wrote:

> Thomas Dickey wrote:
>
> > while I'm perfectly aware that "extern" is redundant, there are two things
> > to be said in favor of keeping it:
> >
> > a) it's easy to grep for
>
> sure
>
> > b) some compilers silently ignore conflicts with a "static" definition of
> >    the prototype, but can be persuaded to warn if the extern is explicit.
> >    (gcc does this, making it unsuitable as the only compiler to use for
> >    testing).
> >
> > also - "extern" prototypes really should be moved to a header file,
> > otherwise they're not effective at flagging mismatches between different
> > files..
> >
>
> All of the extern functions were defined in the file. These appear to be
> functions only useful to xwininfo. Why make a header for a one *.c program?

I was offering general advice - most of the files in the X tree have a'
mixture of extern/static prototypes.  If a function's not used outside
a given file, there's no reason to mark it "extern"...

-- 
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net
_______________________________________________
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel

Reply via email to