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
|
@ -145,7 +145,7 @@ shp_sel(struct nstr_item *ni, struct emp_qelem *list)
|
|||
}
|
||||
|
||||
/*
|
||||
* Append SP to LIST.
|
||||
* Append @sp to @list.
|
||||
* Return the new list link.
|
||||
*/
|
||||
struct ulist *
|
||||
|
@ -224,11 +224,11 @@ shp_nav_put_one(struct ulist *mlp)
|
|||
}
|
||||
|
||||
/*
|
||||
* Sweep seamines with engineers in SHIP_LIST for ACTOR.
|
||||
* All ships in SHIP_LIST must be in the same sector.
|
||||
* If EXPLICIT is non-zero, this is for an explicit sweep command from
|
||||
* Sweep seamines with engineers in @ship_list for @actor.
|
||||
* All ships in @ship_list must be in the same sector.
|
||||
* If @explicit is non-zero, this is for an explicit sweep command from
|
||||
* a player. Else it's an automatic "on the move" sweep.
|
||||
* If TAKEMOB is non-zero, require and charge mobility.
|
||||
* If @takemob is non-zero, require and charge mobility.
|
||||
* Return non-zero when the ships should stop.
|
||||
*/
|
||||
int
|
||||
|
@ -347,7 +347,7 @@ shp_check_mines(struct emp_qelem *ship_list)
|
|||
}
|
||||
|
||||
/*
|
||||
* Return whether and why SP would be stuck in SECTP.
|
||||
* Return whether and why @sp would be stuck in @sectp.
|
||||
*/
|
||||
enum shp_stuck
|
||||
shp_check_nav(struct shpstr *sp, struct sctstr *sectp)
|
||||
|
@ -1005,7 +1005,7 @@ shp_mobcost(struct shpstr *sp)
|
|||
}
|
||||
|
||||
/*
|
||||
* Set SP's tech to TLEV along with everything else that depends on it.
|
||||
* Set @sp's tech to @tlev along with everything else that depends on it.
|
||||
*/
|
||||
void
|
||||
shp_set_tech(struct shpstr *sp, int tlev)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue