git/list[1] front-page[2] threads[3] people[4] search[5] about
 

header file at a top

From
Thiago Farina <tfransosi@gmail.com>
Date
Dec 17, 2011, 21:57 UTC
Message-ID
<CACnwZYdSPPhLyu6Oi3k2aNzYqvmD=xDYWvCEd2ofyJSntqKdJg@mail.gmail.com>
Hi folks,

I don't understand why in git the .h file is not included as the first substantive line of the .c file.

i.e:

foo.c -------------------------------------------------------------------- #include "foo.h"

/* in alphabetical order */ #include "bar.h" #include "tiz.h"

Any particular reason we include the corresponding header file at some random position in the source file?

Next: Jeff King
Message 1 of 2 in “header file at a top”
  1. Thiago FarinaDec 17, 2011
  2. Jeff KingDec 18, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.