Fix and clean up some comments

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
Markus Armbruster 2015-06-14 11:36:40 +02:00
parent 9f25de3dce
commit eba87789ab
37 changed files with 73 additions and 69 deletions

View file

@ -43,7 +43,7 @@
#include "budg.h"
#include "update.h"
/* Item types we want to track. */
/* Item types we want to track. */
enum bp_item_idx {
BP_NONE = -1, /* not tracked */
BP_MILIT, BP_LCM, BP_HCM,
@ -59,14 +59,14 @@ struct bp {
short bp_avail;
};
/* Map i_type to enum bp_item_idx. */
/* Map i_type to enum bp_item_idx. */
static enum bp_item_idx bud_key[I_MAX + 1] = {
BP_NONE, BP_MILIT, BP_NONE, BP_NONE,
BP_NONE, BP_NONE, BP_NONE, BP_NONE, BP_NONE, BP_NONE,
BP_LCM, BP_HCM, BP_NONE, BP_NONE
};
/* Return pointer to the element of BP belonging to SP. */
/* Return pointer to the element of BP belonging to SP. */
static struct bp *
bp_ref(struct bp *bp, struct sctstr *sp)
{
@ -87,7 +87,9 @@ 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 item value tracked in @bp for sector @sp's item @comm to @amount.
*/
void
bp_put_item(struct bp *bp, struct sctstr *sp, i_type comm, int amount)
{
@ -119,7 +121,7 @@ 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 to @amount. */
void
bp_put_avail(struct bp *bp, struct sctstr *sp, int amount)
{

View file

@ -232,7 +232,7 @@ prod_resource_limit(struct pchrstr *pp, unsigned char *resource)
/*
* Return p.e. for sector type @type.
* Zero means level is too low for production.
* @level is the affecting production of PP; it must match PP->p_nlndx.
* @level is the level affecting production.
*/
double
prod_eff(int type, float level)

View file

@ -202,7 +202,7 @@ guerrilla(struct sctstr *sp)
return;
tnat = getnatp(target);
if (tnat->nat_stat == STAT_UNUSED) {
/* target nation has dissolved: che's retire. */
/* target nation has dissolved: che's retire. */
logerror("%d Che targeted at country %d retiring", che, target);
sp->sct_che = 0;
sp->sct_che_target = 0;