#include #include #include "structs.h" void detach_hybrid (struct fitpars *fpar) { static int high = 0; /* First go to the end */ if (fpar->next != NULL) detach_hybrid (fpar->next); if (fpar->high != NULL && high == 0) { high = 1; detach_hybrid (fpar->high); high = 0; }; /*****************************************************************\ * The following high order parameters are only pointers to the * * main hybrid structure. No space was allocated to them to * * begin with. * \*****************************************************************/ if (high > 0 && strncmp (fpar->objtype, "hybrid", 6) == 0) { fpar->outer = NULL; fpar->inner = NULL; fpar->a = NULL; fpar->sig = NULL; fpar->ia = NULL; fpar->dp = NULL; fpar->high = NULL; /* <== Note that fourier modes and disky/boxyness */ /* are detached wholesale because they were */ /* simply pointers all along. */ }; }