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
|
@ -74,8 +74,8 @@ bp_ref(struct bp *bp, struct sctstr *sp)
|
|||
}
|
||||
|
||||
/*
|
||||
* Return the item value tracked in BP for sector SP's item COMM.
|
||||
* COMM must be a tracked item type.
|
||||
* Return the item value tracked in @bp for sector @sp's item @comm.
|
||||
* @comm must be a tracked item type.
|
||||
*/
|
||||
int
|
||||
bp_get_item(struct bp *bp, struct sctstr *sp, i_type comm)
|
||||
|
@ -87,7 +87,7 @@ bp_get_item(struct bp *bp, struct sctstr *sp, i_type comm)
|
|||
return bp_ref(bp, sp)->bp_item[idx];
|
||||
}
|
||||
|
||||
/* Set the item value tracked in BP for sector SP's item COMM. */
|
||||
/* Set the item value tracked in @bp for sector @sp's item @comm. */
|
||||
void
|
||||
bp_put_item(struct bp *bp, struct sctstr *sp, i_type comm, int amount)
|
||||
{
|
||||
|
@ -97,7 +97,7 @@ bp_put_item(struct bp *bp, struct sctstr *sp, i_type comm, int amount)
|
|||
bp_ref(bp, sp)->bp_item[idx] = amount;
|
||||
}
|
||||
|
||||
/* Set the item values tracked in BP for sector SP from VEC. */
|
||||
/* Set the item values tracked in @bp for sector @sp from @vec. */
|
||||
void
|
||||
bp_put_items(struct bp *bp, struct sctstr *sp, short *vec)
|
||||
{
|
||||
|
@ -112,21 +112,21 @@ bp_put_items(struct bp *bp, struct sctstr *sp, short *vec)
|
|||
}
|
||||
}
|
||||
|
||||
/* Return avail tracked in BP for sector SP. */
|
||||
/* Return avail tracked in @bp for sector @sp. */
|
||||
int
|
||||
bp_get_avail(struct bp *bp, struct sctstr *sp)
|
||||
{
|
||||
return bp_ref(bp, sp)->bp_avail;
|
||||
}
|
||||
|
||||
/* Set avail tracked in BP for sector SP. */
|
||||
/* Set avail tracked in @bp for sector @sp. */
|
||||
void
|
||||
bp_put_avail(struct bp *bp, struct sctstr *sp, int amount)
|
||||
{
|
||||
bp_ref(bp, sp)->bp_avail = amount;
|
||||
}
|
||||
|
||||
/* Set the values tracked in BP for sector SP to the values in SP. */
|
||||
/* Set the values tracked in @bp for sector @sp to the values in @sp. */
|
||||
void
|
||||
bp_set_from_sect(struct bp *bp, struct sctstr *sp)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue