int meetAirEnumAllCheck(void) { static const char me[]="meetAirEnumAllCheck"; const airEnum **enm, *ee; char err[AIR_STRLEN_LARGE]; unsigned int ei; airArray *mop; mop = airMopNew(); enm = meetAirEnumAll(); airMopAdd(mop, (void*)enm, airFree, airMopAlways); ei = 0; while ((ee = enm[ei])) { /* fprintf(stderr, "!%s: %u %s\n", me, ei, ee->name); */ if (airEnumCheck(err, ee)) { biffAddf(MEET, "%s: problem with enum %u", me, ei); biffAddf(MEET, "%s", err); /* kind of a hack */ airMopError(mop); return 1; } ei++; } airMopOkay(mop); return 0; }
void meetAirEnumAllPrint(FILE *file) { const airEnum **enm, *ee; unsigned int ei; if (!file) { return; } enm = meetAirEnumAll(); ei = 0; while ((ee = enm[ei])) { airEnumPrint(file, ee); fprintf(file, "\n"); ei++; } free(AIR_CAST(void *, enm)); return; }