ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
cmdFlag.c
Go to the documentation of this file.
1
20
21#include "base/abc/abc.h"
22#include "base/main/mainInt.h"
23
25
26
30
34
35
47char * Cmd_FlagReadByName( Abc_Frame_t * pAbc, char * flag )
48{
49 char * value;
50 if ( st__lookup(pAbc->tFlags, flag, &value) )
51 return value;
52 return NULL;
53}
54
55
65void Cmd_FlagUpdateValue( Abc_Frame_t * pAbc, const char * key, char * value )
66{
67 char * oldValue, * newValue;
68 if ( !key )
69 return;
70 if ( value )
71 newValue = Extra_UtilStrsav(value);
72 else
73 newValue = Extra_UtilStrsav("");
74// newValue = NULL;
75 if ( st__delete(pAbc->tFlags, &key, &oldValue) )
76 ABC_FREE(oldValue);
77 st__insert( pAbc->tFlags, key, newValue );
78}
79
80
90void Cmd_FlagDeleteByName( Abc_Frame_t * pAbc, const char * key )
91{
92 char *value;
93 if ( !key )
94 return;
95 if ( st__delete( pAbc->tFlags, &key, &value ) )
96 {
99 }
100}
101
102
103
107
108
110
#define ABC_FREE(obj)
Definition abc_global.h:267
#define ABC_NAMESPACE_IMPL_START
#define ABC_NAMESPACE_IMPL_END
typedefABC_NAMESPACE_HEADER_START struct Abc_Frame_t_ Abc_Frame_t
INCLUDES ///.
Definition abcapis.h:38
ABC_NAMESPACE_IMPL_START typedef signed char value
void Cmd_FlagUpdateValue(Abc_Frame_t *pAbc, const char *key, char *value)
Definition cmdFlag.c:65
void Cmd_FlagDeleteByName(Abc_Frame_t *pAbc, const char *key)
Definition cmdFlag.c:90
ABC_NAMESPACE_IMPL_START char * Cmd_FlagReadByName(Abc_Frame_t *pAbc, char *flag)
DECLARATIONS ///.
Definition cmdFlag.c:47
char * Extra_UtilStrsav(const char *s)
enum keys key
Definition main.h:25
int st__delete(st__table *table, const char **keyp, char **value)
Definition st.c:375
int st__lookup(st__table *table, const char *key, char **value)
Definition st.c:114
int st__insert(st__table *table, const char *key, char *value)
Definition st.c:171