include # CATMATCH -- Match objects in catalogs procedure t_catmatch () pointer mcatalog # Matched catalog int list # List of catalogs real delta # Matching delta real clgetr() int ncatalogs, clpopnu(), clgfil(), locva(), stflt() pointer sp, catalog, catalogs[8], filter begin call smark (sp) call salloc (mcatalog, SZ_FNAME, TY_CHAR) call salloc (catalog, SZ_FNAME, TY_CHAR) call salloc (filter, SZ_FNAME, TY_CHAR) call clgstr ("mcatalog", Memc[mcatalog], SZ_FNAME) list = clpopnu ("catalogs") delta = clgetr ("delta") ncatalogs = 0 while (ncatalogs < 8 && clgfil (list, Memc[catalog], SZ_FNAME) != EOF) { ncatalogs = ncatalogs + 1 call salloc (catalogs[ncatalogs], SZ_FNAME, TY_CHAR) call strpak (Memc[catalog], Memc[catalogs[ncatalogs]], SZ_FNAME) catalogs[ncatalogs] = locva (Memc[catalogs[ncatalogs]]) * SZB_CHAR } call strpak (Memc[mcatalog], Memc[mcatalog], SZ_FNAME) call strpak ("F E H", Memc[filter], SZ_FNAME) if (stflt (Memc[filter]) == 0) call match (Memc[mcatalog], catalogs, ncatalogs, delta) call sfree (sp) end