I was reading TLDP and noticed that all global variables and functions are declared static. After further reading, I understand that the variables are declared static to reduce namespace pollution.
According to this SO post,
static functions are functions that are only visible to other
functions in the same file (more precisely the same translation unit).
When a Static variable is modified by a module, all other modules will
see the new value.
When a Static variable is modified by a module
I believe you are misinterpreting that sentence. It can be a bit confusing. It is not referring to the C
static keyword. It is referring to the C standard's usage of "static storage duration". Refer to section 6.2.4 of the C standard:
1 An object has a storage duration that determines its lifetime. There are three storage durations: static, automatic, and allocated.
3 An object whose identifier is declared with external or internal linkage, or with the storage-class specifier static has static storage duration. Its lifetime is the entire execution of the program
That is, "static storage duration" variables include both global variables and variables declared with the C
static keyword. In the TLDP article it is referring to the former.