#include "focas1.h" /* SETPSF - Set PSF in catalog */ setpsf (catalog, psffile) char *catalog; char *psffile; { struct objrec ob; long oldsz, szcathdr (); FILE *fout; cfd = catopen (catalog, 2); oldsz = szcathdr (); cmmnt ("setpsf"); psf (psffile); if (oldsz != szcathdr ()) { fout = catopen ("setpsf.tmp", 1); fseek (cfd, oldsz, 0); while (rdcatob (cfd, 0L, &ob) == 0) wtcat (&ob, fout); fclose (cfd); fclose (fout); c_delete (catalog); c_rename ("setpsf.tmp", catalog); } else { wtcathdr (cfd, 0); fclose (cfd); } }