int FBeginThread( thread_fn *rtn, void *stack, unsigned stk_size, void *arglist ) //================================================================================ { fthread_info *fti; if( InitFThreads() != 0 ) return( -1 ); fti = RMemAlloc( sizeof( fthread_info ) ); if( fti == NULL ) return( -1 ); fti->rtn = (fthread_fn *)rtn; fti->arglist = arglist; return( __BeginThread( ThreadHelper, stack, stk_size, fti ) ); }
unsigned __FInitDLL( void ) { //============================ __InitExceptionVectors(); if( __InitFThreadProcessing() != 0 ) return( 0 ); #if defined( __NT__ ) { if( __ASTACKSIZ != 0 ) { __ASTACKPTR = RMemAlloc( __ASTACKSIZ ); if( __ASTACKPTR == NULL ) return( 0 ); __ASTACKPTR += __ASTACKSIZ; } } #endif return( 1 ); }
static char *GetSysName( ftnfile *fcb ) { //=========================================== // Return a system file name given a user name and a file structure. char buff[_MAX_PATH]; char *p; #if defined( __DOS__ ) || defined( __WINDOWS__ ) || (defined( __OS2__ ) && defined( _M_I86 )) p = JmpBlanks( fcb->filename ); if( IsDevice( fcb ) ) { strcpy( buff, p ); } else #endif { p = _fullpath( buff, fcb->filename, _MAX_PATH ); } if( p != NULL ) { p = RMemAlloc( strlen( buff ) + sizeof( char ) ); strcpy( p, buff ); } return( p ); }