/* CATFORMAT -- Change catalog formats. */ #include "focas1.h" catformat (input, output, newtype) char input[]; char output[]; int *newtype; { FILE *fin, *fout; int i, oldtype; struct objrec ob; fin = catopen (input, 0); cmmnt ("catformat"); fout = catopen (output, 1); oldtype = cattype; cattype = *newtype; wtcathdr (fout, 0); for (;;) { cattype = oldtype; if (rdcatob (fin, 0L, &ob)) break; cattype = *newtype; wtcat (&ob, fout); } fclose (fin); fclose (fout); }