ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
cmdFlag.c File Reference
#include "base/abc/abc.h"
#include "base/main/mainInt.h"
Include dependency graph for cmdFlag.c:

Go to the source code of this file.

Functions

ABC_NAMESPACE_IMPL_START char * Cmd_FlagReadByName (Abc_Frame_t *pAbc, char *flag)
 DECLARATIONS ///.
 
void Cmd_FlagUpdateValue (Abc_Frame_t *pAbc, const char *key, char *value)
 
void Cmd_FlagDeleteByName (Abc_Frame_t *pAbc, const char *key)
 

Function Documentation

◆ Cmd_FlagDeleteByName()

void Cmd_FlagDeleteByName ( Abc_Frame_t * pAbc,
const char * key )

Function********************************************************************

Synopsis [Deletes a set value by calling instead of unset command.]

Description [Deletes a set value by calling instead of unset command.]

SideEffects []

Definition at line 90 of file cmdFlag.c.

91{
92 char *value;
93 if ( !key )
94 return;
95 if ( st__delete( pAbc->tFlags, &key, &value ) )
96 {
99 }
100}
#define ABC_FREE(obj)
Definition abc_global.h:267
ABC_NAMESPACE_IMPL_START typedef signed char value
enum keys key
Definition main.h:25
int st__delete(st__table *table, const char **keyp, char **value)
Definition st.c:375
Here is the call graph for this function:

◆ Cmd_FlagReadByName()

ABC_NAMESPACE_IMPL_START char * Cmd_FlagReadByName ( Abc_Frame_t * pAbc,
char * flag )

DECLARATIONS ///.

CFile****************************************************************

FileName [cmdFlag.c]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [Command processing package.]

Synopsis [Procedures working with flags.]

Author [Alan Mishchenko]

Affiliation [UC Berkeley]

Date [Ver. 1.0. Started - June 20, 2005.]

Revision [

Id
cmdFlag.c,v 1.00 2005/06/20 00:00:00 alanmi Exp

] FUNCTION DEFINITIONS /// Function********************************************************************

Synopsis [Looks up value of flag in table of named values.]

Description [The command parser maintains a table of named values. These are manipulated using the 'set' and 'unset' commands. The value of the named flag is returned, or NULL is returned if the flag has not been set.]

SideEffects []

Definition at line 47 of file cmdFlag.c.

48{
49 char * value;
50 if ( st__lookup(pAbc->tFlags, flag, &value) )
51 return value;
52 return NULL;
53}
int st__lookup(st__table *table, const char *key, char **value)
Definition st.c:114
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Cmd_FlagUpdateValue()

void Cmd_FlagUpdateValue ( Abc_Frame_t * pAbc,
const char * key,
char * value )

Function********************************************************************

Synopsis [Updates a set value by calling instead of set command.]

Description [Updates a set value by calling instead of set command.]

SideEffects []

Definition at line 65 of file cmdFlag.c.

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}
char * Extra_UtilStrsav(const char *s)
int st__insert(st__table *table, const char *key, char *value)
Definition st.c:171
Here is the call graph for this function:
Here is the caller graph for this function: