Change comment style to use @foo rather than FOO
... when referring to a function's parameter or a struct/union's member. The idea of using FOO comes from the GNU coding standards: The comment on a function is much clearer if you use the argument names to speak about the argument values. The variable name itself should be lower case, but write it in upper case when you are speaking about the value rather than the variable itself. Thus, "the inode number NODE_NUM" rather than "an inode". Upcasing names is problematic for a case-sensitive language like C, because it can create ambiguity. Moreover, it's too much shouting for my taste. GTK-Doc's convention to prefix the identifier with @ makes references to variables stand out nicely. The rest of the GTK-Doc conventions make no sense for us, however. Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
parent
5cff5022a9
commit
9f25de3dce
77 changed files with 633 additions and 633 deletions
|
@ -171,7 +171,7 @@ feed_people(short *vec, int etu)
|
|||
}
|
||||
|
||||
/*
|
||||
* Return food eaten by people in VEC[] in ETU ETUs.
|
||||
* Return food eaten by people in @vec[] in @etu ETUs.
|
||||
*/
|
||||
double
|
||||
food_needed(short *vec, int etu)
|
||||
|
@ -182,7 +182,7 @@ food_needed(short *vec, int etu)
|
|||
}
|
||||
|
||||
/*
|
||||
* Return number of famine victims in VEC[] for ETU ETUs.
|
||||
* Return number of famine victims in @vec[] for @etu ETUs.
|
||||
*/
|
||||
int
|
||||
famine_victims(short *vec, int etu)
|
||||
|
@ -197,7 +197,7 @@ famine_victims(short *vec, int etu)
|
|||
}
|
||||
|
||||
/*
|
||||
* Starve up to NUM people of VEC[WHOM].
|
||||
* Starve up to @num people of @vec[@whom].
|
||||
* Return the number of actually starved.
|
||||
*/
|
||||
static int
|
||||
|
@ -252,10 +252,10 @@ grow_people(struct sctstr *sp, int etu,
|
|||
}
|
||||
|
||||
/*
|
||||
* Return the number of babies born to ADULTS in ETU ETUs.
|
||||
* BRATE is the birth rate.
|
||||
* FOOD is the food available for growing babies.
|
||||
* MAXPOP is the population limit.
|
||||
* Return the number of babies born to @adults in @etu ETUs.
|
||||
* @brate is the birth rate.
|
||||
* @food is the food available for growing babies.
|
||||
* @maxpop is the population limit.
|
||||
*/
|
||||
static int
|
||||
babies(int adults, int etu, double brate, int food, int maxpop)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue