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

Go to the source code of this file.

Functions

ABC_NAMESPACE_IMPL_START void CmdCommandAliasAdd (Abc_Frame_t *pAbc, char *sName, int argc, char **argv)
 DECLARATIONS ///.
 
void CmdCommandAliasPrint (Abc_Frame_t *pAbc, Abc_Alias *pAlias)
 
char * CmdCommandAliasLookup (Abc_Frame_t *pAbc, char *sCommand)
 
void CmdCommandAliasFree (Abc_Alias *pAlias)
 

Function Documentation

◆ CmdCommandAliasAdd()

ABC_NAMESPACE_IMPL_START void CmdCommandAliasAdd ( Abc_Frame_t * pAbc,
char * sName,
int argc,
char ** argv )

DECLARATIONS ///.

MACRO DEFINITIONS ///.

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

FileName [cmdAlias.c]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [Command processing package.]

Synopsis [Procedures dealing with aliases in the command package.]

Author [Alan Mishchenko]

Affiliation [UC Berkeley]

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

Revision [

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

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 46 of file cmdAlias.c.

47{
48 Abc_Alias * pAlias;
49 int fStatus, i;
50
51 pAlias = ABC_ALLOC(Abc_Alias, 1);
52 pAlias->sName = Extra_UtilStrsav(sName);
53 pAlias->argc = argc;
54 pAlias->argv = ABC_ALLOC(char *, pAlias->argc);
55 for(i = 0; i < argc; i++)
56 pAlias->argv[i] = Extra_UtilStrsav(argv[i]);
57 fStatus = st__insert( pAbc->tAliases, pAlias->sName, (char *) pAlias );
58 assert(!fStatus);
59}
#define ABC_ALLOC(type, num)
Definition abc_global.h:264
struct MvAlias Abc_Alias
Definition cmd.h:40
char * Extra_UtilStrsav(const char *s)
int st__insert(st__table *table, const char *key, char *value)
Definition st.c:171
char * sName
Definition cmdInt.h:53
char ** argv
Definition cmdInt.h:55
int argc
Definition cmdInt.h:54
#define assert(ex)
Definition util_old.h:213
Here is the call graph for this function:

◆ CmdCommandAliasFree()

void CmdCommandAliasFree ( Abc_Alias * pAlias)

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 113 of file cmdAlias.c.

114{
115 CmdFreeArgv( pAlias->argc, pAlias->argv );
116 ABC_FREE(pAlias->sName);
117 ABC_FREE(pAlias);
118}
#define ABC_FREE(obj)
Definition abc_global.h:267
void CmdFreeArgv(int argc, char **argv)
Definition cmdUtils.c:489
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CmdCommandAliasLookup()

char * CmdCommandAliasLookup ( Abc_Frame_t * pAbc,
char * sCommand )

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

Synopsis [required]

Description [optional]

SideEffects [required]

SeeAlso [optional]

Definition at line 92 of file cmdAlias.c.

93{
94 Abc_Alias * pAlias;
95 char * value;
96 if (! st__lookup( pAbc->tAliases, sCommand, &value))
97 return sCommand;
98 pAlias = (Abc_Alias *) value;
99 return pAlias->argv[0];
100}
ABC_NAMESPACE_IMPL_START typedef signed char value
int st__lookup(st__table *table, const char *key, char **value)
Definition st.c:114
Here is the call graph for this function:

◆ CmdCommandAliasPrint()

void CmdCommandAliasPrint ( Abc_Frame_t * pAbc,
Abc_Alias * pAlias )

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

Synopsis [required]

Description [optional]

SideEffects [required]

SeeAlso [optional]

Definition at line 72 of file cmdAlias.c.

73{
74 int i;
75 fprintf(pAbc->Out, "%-15s", pAlias->sName);
76 for(i = 0; i < pAlias->argc; i++)
77 fprintf( pAbc->Out, " %s", pAlias->argv[i] );
78 fprintf( pAbc->Out, "\n" );
79}
Here is the caller graph for this function: