mirror of https://github.com/YosysHQ/abc.git
Added check if a given command exists.
This commit is contained in:
parent
d662e7ff68
commit
c06bdc151c
|
|
@ -52,6 +52,7 @@ extern void Cmd_Init( Abc_Frame_t * pAbc );
|
|||
extern void Cmd_End( Abc_Frame_t * pAbc );
|
||||
/*=== cmdApi.c ========================================================*/
|
||||
typedef int (*Cmd_CommandFuncType)(Abc_Frame_t*, int, char**);
|
||||
extern int Cmd_CommandIsDefined( Abc_Frame_t * pAbc, const char * sName );
|
||||
extern void Cmd_CommandAdd( Abc_Frame_t * pAbc, const char * sGroup, const char * sName, Cmd_CommandFuncType pFunc, int fChanges );
|
||||
extern ABC_DLL int Cmd_CommandExecute( Abc_Frame_t * pAbc, const char * sCommand );
|
||||
/*=== cmdFlag.c ========================================================*/
|
||||
|
|
|
|||
|
|
@ -33,6 +33,22 @@ ABC_NAMESPACE_IMPL_START
|
|||
/// FUNCTION DEFINITIONS ///
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/**Function*************************************************************
|
||||
|
||||
Synopsis []
|
||||
|
||||
Description []
|
||||
|
||||
SideEffects []
|
||||
|
||||
SeeAlso []
|
||||
|
||||
***********************************************************************/
|
||||
int Cmd_CommandIsDefined( Abc_Frame_t * pAbc, const char * sName )
|
||||
{
|
||||
return st__is_member( pAbc->tCommands, sName );
|
||||
}
|
||||
|
||||
/**Function*************************************************************
|
||||
|
||||
Synopsis []
|
||||
|
|
|
|||
Loading…
Reference in New Issue