Re: [Nautilus-list] Include styles



On 02Sep2001 08:57AM (-0700), Darin Adler wrote:
> on 9/2/01 3:32 AM, Maciej Stachowiak at mjs noisehavoc org wrote:
> 
> > When should a C source file that's part of a library include one of
> > the library's headers as <libfoo/foo-bar.h> and when as "foo-bar.h"?
> > I'm seeing both styles in libnautilus-private and also in gnome-vfs
> > and I'm not sure if the differences are intentional/meaningful or not.
> 
> When including a header that's part of the same source directory, it makes
> sense to use "foo-bar.h", but <libfoo/foo-bar.h> remains legal. For
> including your own corresponding header, "foo-bar.h" seems much clearer.
> 
> When including a header from another directory (say including libnautilus
> headers in libnautilus-private source), the <libfoo/foo-bar.h> form is
> recommended so that we don't need to use -I in every directory for every
> other directory it uses headers from.
> 
> In headers themselves, of course, <libfoo/foo-bar.h> is required.
> 
> Sound OK?
 
Sounds good to me.

 - Maciej





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]