/*! * \return Error code. * \ingroup Reconstruct * \brief Writes out the given debug Woolz object to the woolz * debug file. * Global recDbgWlzData: is used to pass woolz debug output * file. * \param obj Woolz debug object for output. * \param freeFlg If non zero free the object after * writting it. */ RecError RecDbgWlzWrite(WlzObject *obj, int freeFlg) { RecError errFlag = REC_ERR_NONE; if(recDbgWlzData) { flockfile((FILE *)recDbgWlzData); errFlag = RecFileObjWlzWrite((FILE *)recDbgWlzData, obj); (void )fflush((FILE *)recDbgWlzData); if(freeFlg && obj) { WlzFreeObj(obj); } funlockfile((FILE *)recDbgWlzData); (void )sleep(1); } return(errFlag); }
/*! * \return Error code. * \ingroup Reconstruct * \brief Writes out the given debug Woolz object to the woolz * debug file. * Global recDbgWlzData: is used to pass woolz debug output * file. * \param obj Woolz debug object for output. * \param freeFlg If non zero free the object after * writting it. */ RecError RecDbgWlzWrite(WlzObject *obj, int freeFlg) { RecError errFlag = REC_ERR_NONE; if(recDbgWlzData) { flockfile((FILE *)recDbgWlzData); errFlag = RecFileObjWlzWrite((FILE *)recDbgWlzData, obj); (void )fflush((FILE *)recDbgWlzData); if(freeFlg && obj) { WlzFreeObj(obj); } funlockfile((FILE *)recDbgWlzData); #if (defined _WIN32 || defined __MINGW32__ ) (void )Sleep(1); #else (void )sleep(1); #endif } return(errFlag); }