void AddRecipe( int (*function)(CeosSARVolume_t *volume, void *token), void *token, const char *name ) { RecipeFunctionData_t *TempData; Link_t *Link; TempData = HMalloc( sizeof( RecipeFunctionData_t ) ); TempData->function = function; TempData->token = token; TempData->name = name; Link = ceos2CreateLink( TempData ); if( RecipeFunctions == NULL) { RecipeFunctions = Link; } else { RecipeFunctions = InsertLink( RecipeFunctions, Link ); } }
void SerializeCeosRecordsFromFile(Link_t *record_list, VSILFILE *fp) { CeosRecord_t *crec; Link_t *Link; while(!VSIFEofL(fp)) { crec = HMalloc(sizeof(CeosRecord_t)); VSIFReadL(crec,sizeof(CeosRecord_t),1,fp); crec->Buffer = HMalloc(crec->Length * sizeof(char) ); VSIFReadL(crec->Buffer,sizeof(char),crec->Length,fp); Link = ceos2CreateLink(crec); AddLink(record_list,Link); } }