Fix up a few identifier references in comments

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
Markus Armbruster 2017-07-24 21:20:04 +02:00
parent 3fa0937a80
commit 644817993b
15 changed files with 42 additions and 41 deletions

View file

@ -63,21 +63,22 @@ struct empfile {
/* User callbacks, may all be null */ /* User callbacks, may all be null */
/* /*
* Called after element initialization. ELT is the element. * Called after element initialization. @elt is the element.
* May modify the element. * May modify the element.
*/ */
void (*oninit)(void *elt); void (*oninit)(void *elt);
/* /*
* Called after read. ID is the element id, and ELT is the * Called after read. @id is the element id, and @elt is the
* element read. May modify the element. Modifications are * element read. May modify the element. Modifications are
* visible to caller of ef_read(), but have no effect on the file. * visible to caller of ef_read(), but have no effect on the file.
*/ */
void (*postread)(int id, void *elt); void (*postread)(int id, void *elt);
/* /*
* Called before write. ID is the element id, OLD is the element * Called before write. @id is the element id, @old is the
* being updated (null unless it is cached) and ELT is the element * element being updated (null unless it is cached) and @elt is
* being written. May modify the element. Modifications will be * the element being written. May modify the element.
* visible to caller of ef_write() and are written to the file. * Modifications will be visible to caller of ef_write() and are
* written to the file.
*/ */
void (*prewrite)(int id, void *old, void *elt); void (*prewrite)(int id, void *old, void *elt);
/* /*

View file

@ -488,7 +488,7 @@ recv_input(int fd, struct ring *inbuf)
return -1; return -1;
if (n == 0) { if (n == 0) {
/* /*
* Can't put EOF cookie into INBUF here, it may not fit. * Can't put EOF cookie into @inbuf here, it may not fit.
* Leave it to caller. * Leave it to caller.
*/ */
res = 0; res = 0;
@ -543,10 +543,10 @@ int
play(int sock, char *history_file) play(int sock, char *history_file)
{ {
/* /*
* Player input flows from INPUT_FD through recv_input() into ring * Player input flows from @input_fd through recv_input() into
* buffer INBUF, which drains into SOCK. This must not block. * ring buffer @inbuf, which drains into @sock. This must not
* Server output flows from SOCK into recv_output(). Reading SOCK * block. Server output flows from @sock into recv_output().
* must not block. * Reading @sock must not block.
*/ */
struct sigaction sa; struct sigaction sa;
struct ring inbuf; /* input buffer, draining to SOCK */ struct ring inbuf; /* input buffer, draining to SOCK */

View file

@ -39,7 +39,7 @@
/* /*
* Initialize empty ring buffer. * Initialize empty ring buffer.
* Not necessary if *R is already zeroed. * Not necessary if *@r is already zeroed.
*/ */
void void
ring_init(struct ring *r) ring_init(struct ring *r)
@ -144,7 +144,7 @@ ring_putm(struct ring *r, void *buf, size_t sz)
} }
/* /*
* Discard the N oldest bytes from the ring buffer. * Discard the @n oldest bytes from the ring buffer.
* It must hold at least that many. * It must hold at least that many.
*/ */
void void
@ -155,9 +155,9 @@ ring_discard(struct ring *r, int n)
} }
/* /*
* Search the ring buffer for zero-terminated string S. * Search the ring buffer for zero-terminated string @s.
* Start at the @(n+1)-th byte to be gotten. * Start at the (@n+1)-th byte to be gotten.
* If found, return the number of bytes in the buffer before S. * If found, return the number of bytes in the buffer before @s.
* Else return -1. * Else return -1.
*/ */
int int

View file

@ -601,7 +601,7 @@ ef_set_uid(int type, void *buf, int uid)
} }
/* /*
* Are *A and *B equal, except for timestamps and such? * Are *@a and *@b equal, except for timestamps and such?
*/ */
int int
ef_typedstr_eq(struct ef_typedstr *a, struct ef_typedstr *b) ef_typedstr_eq(struct ef_typedstr *a, struct ef_typedstr *b)
@ -675,7 +675,7 @@ ef_make_stale(void)
ef_generation++; ef_generation++;
} }
/* Mark copy of an element of table TYPE in BUF fresh. */ /* Mark copy of an element of table @type in @buf fresh. */
void void
ef_mark_fresh(int type, void *buf) ef_mark_fresh(int type, void *buf)
{ {

View file

@ -86,7 +86,7 @@ is_daytime_allowed(int dtime, char *times)
} }
/* /*
* Can the game played at time T? * Can the game played at time @t?
*/ */
int int
gamehours(time_t t) gamehours(time_t t)

View file

@ -99,7 +99,7 @@ static struct pf_map *pf_map;
struct pf_heap { struct pf_heap {
int uid; /* sector uid and */ int uid; /* sector uid and */
coord x, y; /* coordinates, uid == XYOFFSET(x, y) */ coord x, y; /* coordinates, @uid == XYOFFSET(@x, @y) */
double cost; /* cost from source */ double cost; /* cost from source */
}; };
@ -387,11 +387,11 @@ path_find_to(coord dx, coord dy)
ny = y_in_dir(y, DIR_FIRST + i); ny = y_in_dir(y, DIR_FIRST + i);
nuid = XYOFFSET(nx, ny); nuid = XYOFFSET(nx, ny);
/* /*
* Cost to enter NX,NY doesn't depend on direction of * Cost to enter @nx,@ny doesn't depend on direction of
* entry. This X,Y is at least as expensive as any * entry. This @x,@y is at least as expensive as any
* previous one. Therefore, cost to go to NX,NY via X,Y * previous one. Therefore, cost to go to @nx,@ny via
* is at least as high as any previously found route. * @x,@y is at least as high as any previously found
* Skip neighbors that have a route already. * route. Skip neighbors that have a route already.
*/ */
if (!pf_is_unvisited(nuid)) if (!pf_is_unvisited(nuid))
continue; continue;
@ -565,7 +565,7 @@ static double
cost_land(natid actor, int uid, int mobtype) cost_land(natid actor, int uid, int mobtype)
{ {
/* /*
* Non-negative cost must not depend on ACTOR, see unit_path(). * Non-negative cost must not depend on @actor, see unit_path().
*/ */
struct sctstr *sp = (void *)empfile[EF_SECTOR].cache; struct sctstr *sp = (void *)empfile[EF_SECTOR].cache;

View file

@ -100,7 +100,7 @@ read_schedule(char *fname, time_t sched[], int n, time_t t0, time_t anchor)
/* /*
* Parse an update schedule directive from @line. * Parse an update schedule directive from @line.
* Update @sched[] and @anchor accordingly. * Update @sched[] and @anchor accordingly.
* @sched[] holds the first N-1 updates after @t0 in ascending order. * @sched[] holds the first @n-1 updates after @t0 in ascending order.
* @fname and @lno file name and line number for reporting errors. * @fname and @lno file name and line number for reporting errors.
*/ */
static int static int
@ -316,7 +316,7 @@ find_update(time_t t, time_t sched[])
* Insert update at @t into @sched[]. * Insert update at @t into @sched[].
* @sched[] holds the first @n-1 updates after @t0 in ascending order. * @sched[] holds the first @n-1 updates after @t0 in ascending order.
* If @t is before @t0 or outside game_days/game_hours, return -1. * If @t is before @t0 or outside game_days/game_hours, return -1.
* If there's no space for @t in @sched[], return N-1. * If there's no space for @t in @sched[], return @n-1.
* Else insert @t into @sched[] and return its index in @sched[]. * Else insert @t into @sched[] and return its index in @sched[].
*/ */
static int static int

View file

@ -195,7 +195,7 @@ tbl_end(void)
/* /*
* Seek to current table's @id-th object. * Seek to current table's @id-th object.
* Extend the table if necessary. * Extend the table if necessary.
* Save @id in cur_id. * Save @id in @cur_id.
* Return the object on success, NULL on failure. * Return the object on success, NULL on failure.
*/ */
static void * static void *
@ -450,7 +450,7 @@ rowid_realm(void)
/* /*
* Get the current row's object. * Get the current row's object.
* Extend the table if necessary. * Extend the table if necessary.
* Save ID in cur_id. * Save ID in @cur_id.
* Return the object on success, NULL on failure. * Return the object on success, NULL on failure.
*/ */
static void * static void *

View file

@ -41,7 +41,7 @@
#include "mt19937ar.h" #include "mt19937ar.h"
/* /*
* Return non-zero with probability D. * Return non-zero with probability @d.
*/ */
int int
chance(double d) chance(double d)
@ -72,8 +72,8 @@ round_up_to_pow2(unsigned val)
} }
/* /*
* Return a random number in [0..N-1]. * Return a random number in [0..@n-1].
* N must be in [1..2^31-1]. * @n must be in [1..2^31-1].
*/ */
int int
roll0(int n) roll0(int n)
@ -88,8 +88,8 @@ roll0(int n)
} }
/* /*
* Return a random number in [1..N]. * Return a random number in [1..@n].
* N must be in [0..2^31-1]. * @n must be in [0..2^31-1].
*/ */
int int
roll(int n) roll(int n)

View file

@ -97,7 +97,7 @@ getele(char *recipient, char *buf)
} }
/* /*
* If S is a `tilde escape', return its code, else 0. * If @s is a `tilde escape', return its code, else 0.
* A tilde escape is '~' followed by the code character. * A tilde escape is '~' followed by the code character.
*/ */
static int static int

View file

@ -925,7 +925,7 @@ lnd_pathcost(struct lndstr *lp, double pathcost)
effspd *= lp->lnd_effic * 0.01; effspd *= lp->lnd_effic * 0.01;
/* /*
* The return value must be PATHCOST times a factor that depends * The return value must be @pathcost times a factor that depends
* only on the land unit. Anything else breaks path finding. In * only on the land unit. Anything else breaks path finding. In
* particular, you can't add or enforce a minimum cost here. Do * particular, you can't add or enforce a minimum cost here. Do
* it in sector_mcost(). * it in sector_mcost().

View file

@ -222,7 +222,7 @@ rad_range(int eff, double tlev, int spy)
} }
/* /*
* Return character to use in radar maps for sector @SP. * Return character to use in radar maps for sector @sp.
* @dist is the distance from the radar, @range its range. * @dist is the distance from the radar, @range its range.
* Country @cn is using the radar. * Country @cn is using the radar.
*/ */

View file

@ -559,7 +559,7 @@ show_news(int tlev)
} }
/* /*
* Show update policy and up to N scheduled updates. * Show update policy and up to @n scheduled updates.
*/ */
void void
show_updates(int n) show_updates(int n)

View file

@ -24,7 +24,7 @@
* *
* --- * ---
* *
* anno.c: Delete announcements older than ANNO_KEEP_DAYS * anno.c: Delete announcements older than anno_keep_days
* *
* Known contributors to this file: * Known contributors to this file:
* Ken Stevens, 1995 * Ken Stevens, 1995

View file

@ -103,7 +103,7 @@ infect_people(struct natstr *np, struct sctstr *sp)
/* /*
* Given the fact that plague exists, kill off * Given the fact that plague exists, kill off
* people if in plague state DYING. Increment * people if in plague state PLG_DYING. Increment
* the plague time. Return "current" plague * the plague time. Return "current" plague
* stage. No reports generated here anymore. * stage. No reports generated here anymore.
*/ */