예제 #1
0
void TempFileRemove(char* name)
{
   bool res;

   if(unlink(name)!=0)
   {
      TmpErrno = errno;
      SysError("Could not remove temporary file", SYS_ERROR);
   }
   res = StrTreeDeleteEntry(&temp_file_store, name);
   assert(res);
}
예제 #2
0
void TempFileCleanup(void)
{
   while(temp_file_store)
   {
      VERBOUTARG("Removing termorary file ", temp_file_store->key);
      if(unlink(temp_file_store->key))
      {
	 sprintf(ErrStr, "Could not remove temporary file %s",
		 temp_file_store->key);	 
	 Warning(ErrStr);
      }      
      StrTreeDeleteEntry(&temp_file_store, temp_file_store->key);
   }
}
예제 #3
0
ExampleRep_p ExampleSetExtract(ExampleSet_p set, ExampleRep_p rep)
{
   ExampleRep_p handle;
   NumTree_p    cell;
   bool         res;

   cell = NumTreeExtractEntry(&(set->ident_index), rep->ident);
   if(!cell)
   { 
      return NULL;
   }
   handle = cell->val1.p_val;
   NumTreeCellFree(cell);
   res = StrTreeDeleteEntry(&(set->name_index), rep->name);
   (void)res; assert(res);

   return handle;
}