/** * Starts the parsing of a scene description file. */ int scn20_parse( const char * fname, RaySetupData * rsd, const char * searchpaths ) { g_scn20error = SCN_OK; if (!error_initialize()) return SCN_INIT_FAIL; FindFileInitialize(); if (!gettoken_Init(fname)) return SCN_INIT_FAIL; if (!pcontext_init()) return SCN_INIT_FAIL; Image_Initialize(); SCN_SetPaths(&scn_include_paths, searchpaths); parse(rsd); // ScnBuild_CommitScene(); pcontext_close(); gettoken_Close(); FindFileClose(); error_close(); return g_error_count ? SCN_ERR_PARSE : SCN_OK; }
/** Close the channel. */ ach_status_t close(int allow_mask=ACH_MASK_OK, int warn_mask=ACH_MASK_NONE) { ach_status_t r = ach_close(&channel); switch(check_status(r, allow_mask, warn_mask)) { case STATUS_WARN: warn_close(r); break; case STATUS_ERR: error_close(r); break; case STATUS_OK: break; } return r; }