9
votes
5answers
340 views

How to make it obvious that a function is being accessed from the outside?

This is a C specific question. I am trying to keep everything possible inside the translation unit boundaries, exposing only a few functions through the .h file. That is, I am giving static linkage to ...
9
votes
3answers
545 views

How should I mark types in C and C++ programs?

In this answer of mine, I used _t at end of types, which ended at best, controversial. This is the practice I use in my current projects. typedef struct { int x; int y; } point_t; This was ...
5
votes
6answers
4k views

Naming conventions used for variables and functions in C

While coding a large project in C I came upon a problem. If I keep on writing more code then there will be a time when it will be difficult for me to organize the code. I mean that the naming for ...
6
votes
3answers
349 views

C project avoiding naming conflicts

I'm struggling to find pragmatic real-world advice on function naming conventions for a medium sized C library project. My library project is separated into a few modules and submodules with their own ...
14
votes
1answer
1k views

Why does the C library use macros and functions with same name?

I am reading 'The Standard C Library' by PJ Plauger which is really interesting. The book explains not only how to USE the library but also how it is implemented. I have finished reading the ctype.h ...
3
votes
7answers
866 views

Any standards for naming variables in for loops (instead of i,j,k) [duplicate]

Possible Duplicate: Why do most of us use 'i' as a loop counter variable? I was just writing a nested loop and got to the point where I was using l and m as variables to control for ...
2
votes
6answers
329 views

C: What is a good source to teach standard/basic code conventions to someone newly learning the language? [closed]

I'm tutoring someone who can be described as a rank newcomer in C. Understandably, she does not know much about coding conventions generally practiced, and hence all her programs tend to use single ...