tum-esi / common-coding-conventions

A concise and universal guide to clear software design.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Header files in C

mohammadhamad opened this issue · comments

It was mentioned that "Functions that appear in the header file are public, while functions that only appear in the .c files are private.".
I think this is violating, in somehow, the idea behind the header file. The header file should include the signature of ALL functions. Do you have this recommendation written somewhere?

I cannot remember exactly where I got this from but here is an explanation confirming this style:
https://stackoverflow.com/questions/50593094/what-declarations-should-be-placed-in-a-c-header-file/50595509