wantcomp[i] = cm; \
} while (0)
-#define NEWFMT (next_fp++)
#define NEW_FP(type,fill,wid) do {\
- fp=NEWFMT; fp->f_type=(type); fp->f_fill=(fill); fp->f_width=(wid); \
+ fp=next_fp++; fp->f_type=(type); fp->f_fill=(fill); fp->f_width=(wid); \
} while (0)
/* Add (possibly new) component to the hash table */
CERROR("component used as both date and address");
}
if (cm->c_tws) {
- memset (cm->c_tws, 0, sizeof *cm->c_tws);
+ ZERO(cm->c_tws);
} else {
NEW0(cm->c_tws);
}
unsigned int i;
struct comp *cm;
- for (i = 0; i < sizeof(wantcomp)/sizeof(wantcomp[0]); i++)
+ for (i = 0; i < DIM(wantcomp); i++)
for (cm = wantcomp[i]; cm; cm = cm->c_next) {
mh_xfree(cm->c_text);
cm->c_text = NULL;
else
comp = comp->c_next;
- while (comp == NULL && *bucket < sizeof(wantcomp)/sizeof(wantcomp[0])) {
+ while (comp == NULL && *bucket < DIM(wantcomp)) {
comp = wantcomp[(*bucket)++];
}
unsigned int i;
struct comp *cm, *cm2;
- for (i = 0; i < sizeof(wantcomp)/sizeof(wantcomp[0]); i++) {
+ for (i = 0; i < DIM(wantcomp); i++) {
cm = wantcomp[i];
while (cm != NULL) {
cm2 = cm->c_next;