# CATSORT -- Sort a catalog procedure t_catsort () pointer sp, input, output, filter int srttype char clgetc() int stflt() begin call smark (sp) call salloc (input, SZ_FNAME, TY_CHAR) call salloc (output, SZ_FNAME, TY_CHAR) call salloc (filter, SZ_LINE, TY_CHAR) call clgstr ("input", Memc[input], SZ_FNAME) call clgstr ("output", Memc[output], SZ_FNAME) srttype = clgetc ("sorttype") call clgstr ("filter", Memc[filter], SZ_LINE) call strpak (Memc[input], Memc[input], SZ_FNAME) call strpak (Memc[output], Memc[output], SZ_FNAME) call strpak (Memc[filter], Memc[filter], SZ_LINE) if (stflt (Memc[filter]) == 0) call catsort (Memc[input], Memc[output], srttype) call sfree (sp) end