rem: fam = wmalloc(sizeof(Family)); memset(fam, 0, sizeof(Family));
add: if (enc && reg) {  fam->showFoundry = 1;
context: addFontToFamily(WMHashTable *families, char fontFields[NUM_FIELDS][256]){    WMArrayIterator i;    Family *fam;    WMArray *family;    family = WMHashGet(families, fontFields[FAMILY]);        if (family) {	/* look for same encoding/registry and foundry */        WM_ITERATE_ARRAY(family, fam, i) {	    int enc, reg, found;	    enc = (strcmp(fam->encoding, fontFields[ENCODING]) == 0);	    reg = (strcmp(fam->registry, fontFields[REGISTRY]) == 0);	    found = (strcmp(fam->foundry, fontFields[FOUNDRY]) == 0);	    if (enc && reg && found) {		addTypefaceToFamily(fam, fontFields);		return;	    }	}	/* look for same encoding/registry */        WM_ITERATE_ARRAY(family, fam, i) {	    int enc, reg;	    	    enc = (strcmp(fam->encoding, fontFields[ENCODING]) == 0);	    reg = (strcmp(fam->registry, fontFields[REGISTRY]) == 0);	    if (enc && reg) {		/* has the same encoding, but the foundry is different */		fam->showFoundry = 1;		fam = wmalloc(sizeof(Family));		memset(fam, 0, sizeof(Family));		fam->name = wstrdup(fontFields[FAMILY]);		fam->foundry = wstrdup(fontFields[FOUNDRY]);		fam->registry = wstrdup(fontFields[REGISTRY]);		fam->encoding = wstrdup(fontFields[ENCODING]);		fam->showFoundry = 1;		addTypefaceToFamily(fam, fontFields);		WMAddToArray(family, fam);		return;	    }	}	/* look for same foundry */        WM_ITERATE_ARRAY(family, fam, i) {	    int found;	    	    found = (strcmp(fam->foundry, fontFields[FOUNDRY]) == 0);	    if (found) {		/* has the same foundry, but encoding is different */		fam->showRegistry = 1;		fam = wmalloc(sizeof(Family));		memset(fam, 0, sizeof(Family));		fam->name = wstrdup(fontFields[FAMILY]);		fam->foundry = wstrdup(fontFields[FOUNDRY]);		fam->registry = wstrdup(fontFields[REGISTRY]);		fam->encoding = wstrdup(fontFields[ENCODING]);		fam->showRegistry = 1;		addTypefaceToFamily(fam, fontFields);		WMAddToArray(family, fam);		return;	    }	}	/* foundry and encoding do not match anything known */	fam = wmalloc(sizeof(Family));	memset(fam, 0, sizeof(Family));	fam->name = wstrdup(fontFields[FAMILY]);	fam->foundry = wstrdup(fontFields[FOUNDRY]);	fam->registry = wstrdup(fontFields[REGISTRY]);	fam->encoding = wstrdup(fontFields[ENCODING]);	fam->showFoundry = 1;	fam->showRegistry = 1;	addTypefaceToFamily(fam, fontFields);	WMAddToArray(family, fam);	return;    }    family = WMCreateArray(8);    fam = wmalloc(sizeof(Family));    memset(fam, 0, sizeof(Family));    fam->name = wstrdup(fontFields[FAMILY]);    fam->foundry = wstrdup(fontFields[FOUNDRY]);    fam->registry = wstrdup(fontFields[REGISTRY]);    fam->encoding = wstrdup(fontFields[ENCODING]);	    addTypefaceToFamily(fam, fontFields);        WMAddToArray(family, fam);    WMHashInsert(families, fam->name, family);}