#include "focas1.h" #include "match1.h" /* MCATLIST -- List object fields from a matched catalog */ mcatlist (catalog, list, str, nlist) char *catalog; int list[MAXMATCH]; char *str[]; int *nlist; { int i, j, n; struct sgparm msp[MAXMATCH]; cfd = mcatopen (catalog, 0); for (i = 0; i < ncats; i++) { rdcathdr (cfd, 1); msp[i] = sp; } for (;;) { if (rdmcatob (cfd, &mentry, mob)) break; if (!mfilter (msp, &mentry, mob)) continue; for (i = 0; i < *nlist; i++) { n = list[i]; if (n < ncats) { sp = msp[n]; if (mob[n].entnum < 0) stctlst (str[i], 0); else stctlst (str[i], &mob[n]); } } } fclose (cfd); }