53 vCommand = Vec_StrAlloc( 100 );
54 Vec_StrAppend( vCommand,
"abccmd_" );
55 Vec_StrAppend( vCommand, argv[0] );
56 Vec_StrAppend( vCommand,
".exe" );
57 Vec_StrPush( vCommand, 0 );
59 if ( (pFile = fopen( Vec_StrArray(vCommand),
"r" )) == NULL )
61 Abc_Print( -1,
"Cannot run the binary \"%s\".\n\n", Vec_StrArray(vCommand) );
62 Vec_StrFree( vCommand );
66 Vec_StrPop( vCommand );
68 for ( i = 1; i < argc; i++ )
70 Vec_StrAppend( vCommand,
" " );
71 Vec_StrAppend( vCommand, argv[i] );
73 Vec_StrPush( vCommand, 0 );
77 Abc_Print( -1,
"The following command has returned non-zero exit status:\n" );
78 Abc_Print( -1,
"\"%s\"\n", Vec_StrArray(vCommand) );
79 Vec_StrFree( vCommand );
82 Vec_StrFree( vCommand );
97#if defined(WIN32) && !defined(__cplusplus)
116 struct _finddata_t c_file;
119 if( (hFile = _findfirst(
"*.exe", &c_file )) == -1L )
124 vFileNames = Vec_PtrAlloc( 100 );
127 }
while( _findnext( hFile, &c_file ) == 0 );
167 char * pName, * pStop;
170 if ( vFileNames == NULL )
174 if (
strncmp( pName,
"abccmd_", 7 ) )
178 pStop =
strstr( pName + 7,
"." );
185 Vec_PtrFreeFree( vFileNames );
#define ABC_NAMESPACE_IMPL_START
#define ABC_NAMESPACE_IMPL_END
typedefABC_NAMESPACE_HEADER_START struct Abc_Frame_t_ Abc_Frame_t
INCLUDES ///.
struct Vec_Str_t_ Vec_Str_t
void Load_End(Abc_Frame_t *pAbc)
Vec_Ptr_t * CmdCollectFileNames()
void Load_Init(Abc_Frame_t *pAbc)
ABC_NAMESPACE_IMPL_START int CmdCommandLoad(Abc_Frame_t *pAbc, int argc, char **argv)
DECLARATIONS ///.
void Cmd_CommandAdd(Abc_Frame_t *pAbc, const char *sGroup, const char *sName, Cmd_CommandFuncType pFunc, int fChanges)
int CmdCommandLoad(Abc_Frame_t *pAbc, int argc, char **argv)
DECLARATIONS ///.
ABC_NAMESPACE_IMPL_START int Util_SignalSystem(const char *cmd)
DECLARATIONS ///.
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.