Ethereal-dev: Re: [Ethereal-dev] Patch to packet-wbxml.h

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <guy@xxxxxxxxxx>
Date: Thu, 13 Feb 2003 17:06:11 -0800
On Fri, Feb 14, 2003 at 12:30:16AM +0100, Joerg Mayer wrote:
> Looking at the patch I noticed that quite a lot of static variables
> are declared in the .h file. IMO, this is not the right thing to do.

Yes, I tend to have .h files only for variables and #defines exported to
other pieces of code - if something is used only in one .c file, I tend
to declare/define it only in that .c file.

Static definitions are explicitly intended to be used only in one .c
file, so I don't put them in .h files - if those variables are intended
to be used in more than one .c file, they should be defined as
*non*-static variables in one of those files, and should be given
external declarations in the .h file.