void ProfileInvoke( char *name ) { unsigned len; #if defined(__UNIX__) handle hndl; #endif len = strlen( name ); if( len != 0 ) { Invoke( name, len, NULL ); return; } /* default name search */ len = strlen( EXENAME ); _AllocA( name, len + 4 ); #if defined(__UNIX__) /* under QNX and Linux, look for .wdrc first */ name[0] = '.'; strcpy( &name[1], EXENAME ); strcat( name, "rc" ); strlwr( name ); hndl = LocalFullPathOpen( name, LIT( Empty ), TxtBuff, TXT_LEN ); if( hndl != NIL_HANDLE ) { DoInvoke( hndl, TxtBuff, NULL ); return; } #endif strcpy( name, EXENAME ); strlwr( name ); Invoke( name, len, NULL ); }
void Invoke( const char *invfile, int len, char_ring *parmlist ) { handle hndl; hndl = LocalFullPathOpen( invfile, len, "dbg", TxtBuff, TXT_LEN ); if( hndl == NIL_HANDLE ) { MakeFileName( TxtBuff, invfile, "dbg", 0 ); FreeRing( parmlist ); Error( ERR_NONE, LIT_ENG( ERR_FILE_NOT_OPEN ), TxtBuff ); } DoInvoke( hndl, TxtBuff, parmlist ); }
void Invoke( char *invfile, int len, char_ring *parmlist ) { char *invname; handle hndl; _AllocA( invname, len + 1 ); memcpy( invname, invfile, len ); invname[ len ] = '\0'; hndl = LocalFullPathOpen( invname, "dbg", TxtBuff, TXT_LEN ); if( hndl == NIL_HANDLE ) { MakeFileName( TxtBuff, invname, "dbg", 0 ); FreeRing( parmlist ); Error( ERR_NONE, LIT( ERR_FILE_NOT_OPEN ), TxtBuff ); } DoInvoke( hndl, TxtBuff, parmlist ); }