xp_comm_proj/cine/imgcache.c
/* routine: CacheCreate
 * purpose: Instance Cacheator module,
 *    create and initialize internal structures etc.
 */
CacheCreate
purpose: Instance Cacheator module,
create and initialize internal structures etc.
CacheCreate purpose : Instance Cacheator module create and initialize internal structures etc .
int CacheCreate(OMobj_id obj_id, OMevent_mask event_mask, int seq_num)
{
  CacheInfo *cache;
  cache = (CacheInfo *)malloc( sizeof(CacheInfo) );
  if( cache )
    {
      memset( cache, 0, sizeof(CacheInfo) );
      cache->object_id = obj_id;
      OMset_name_ptr_val( obj_id, OMstr_to_name("hidden"), (void *)cache, 0 );
      CacheSetMode(obj_id, event_mask, seq_num);
      CacheCapture(obj_id, event_mask, seq_num);
      CachePlayback(obj_id, event_mask, seq_num);
      return( 1 );
    }
  else
    {
      fprintf( stderr, "CacheCreate: Unable to allocate storage for cache info\n" );
      OMset_name_ptr_val( obj_id, OMstr_to_name("hidden"), NULL, 0 );
      return( 0 );
    }
}
int CacheCreate ( OMobj_id obj_id , OMevent_mask event_mask , int seq_num ) { CacheInfo * cache ; cache = ( CacheInfo * ) malloc ( sizeof ( CacheInfo ) ) ; if ( cache ) { memset ( cache , 0 , sizeof ( CacheInfo ) ) ; cache -> object_id = obj_id ; OMset_name_ptr_val ( obj_id , OMstr_to_name ( " " ) , ( void * ) cache , 0 ) ; CacheSetMode ( obj_id , event_mask , seq_num ) ; CacheCapture ( obj_id , event_mask , seq_num ) ; CachePlayback ( obj_id , event_mask , seq_num ) ; return ( 1 ) ; } else { fprintf ( stderr , " \n " ) ; OMset_name_ptr_val ( obj_id , OMstr_to_name ( " " ) , NULL , 0 ) ; return ( 0 ) ; } }
routine: CacheCreate
 purpose: Instance Cacheator module,
    create and initialize internal structures etc.
routine : CacheCreate purpose : Instance Cacheator module create and initialize internal structures etc .