init_pchr(void)
{
struct pchrstr *p;
- int pcount;
- for (p = pchr, pcount = 0; pcount < prd_maxno; pcount++, p++) {
+ for (p = pchr; p->p_name; p++) {
if (opt_GO_RENEW) {
if (p->p_type == I_DUST || p->p_type == I_OIL)
p->p_nrdep = 0;
I_DUST, -1, 0, offsetof(struct sctstr, sct_gmin), 20, -1, 0, 0, 75,
"gold dust", "dust",},
{{I_NONE, I_NONE, I_NONE}, {0, 0, 0},
- I_NONE, 0, 0, 0, 0, 0, 0, 0, 0, "", "",}
+ I_NONE, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL,}
};
-
-int prd_maxno = (sizeof(pchr) / sizeof(struct pchrstr)) - 1;
if (opt_NO_LCMS)
dchr[i].d_lcms = 0;
}
- for (i = 0; i < prd_maxno; i++) {
+ for (i = 0; pchr[i].p_name; i++) {
for (j = 0; j < MAXPRCON; j++) {
if (opt_NO_HCMS && pchr[i].p_ctype[j] == I_HCM)
pchr[i].p_camt[j] = 0;