示例#1
0
文件: filemem.c 项目: xharbour/core
static void memfsInit( void )
{
   /* HB_MEMFSMT_INIT( s_mtx ); */
   s_error = 0;
   s_fs.ulInodeCount = 0;
   s_fs.ulInodeAlloc = HB_MEMFS_INITSIZE;
   s_fs.pInodes = ( PHB_MEMFS_INODE * ) hb_xgrab( sizeof( PHB_MEMFS_INODE ) * s_fs.ulInodeAlloc );
   s_fs.ulFileAlloc = HB_MEMFS_INITSIZE;
   s_fs.pFiles = ( PHB_MEMFS_FILE * ) hb_xgrab( sizeof( PHB_MEMFS_FILE ) * s_fs.ulFileAlloc );
   memset( s_fs.pFiles, 0, sizeof( PHB_MEMFS_FILE ) * s_fs.ulFileAlloc );
   s_fs.ulFileLast = 0;
   hb_vmAtExit( memfsExit, NULL );
}
示例#2
0
static void sTokSet( TOKEN_ENVIRONMENT env )
{
   if( ! s_fInit && env )
   {
      hb_vmAtExit( sTokExit, NULL );
      s_fInit = HB_TRUE;
   }

   if( s_sTokenEnvironment )
      sTokEnvDel( s_sTokenEnvironment );

   s_sTokenEnvironment = env;
}