src/base/cmd/cmdFlag.c File Reference

#include "mainInt.h"
Include dependency graph for cmdFlag.c:

Go to the source code of this file.

Functions

char * Cmd_FlagReadByName (Abc_Frame_t *pAbc, char *flag)
void Cmd_FlagUpdateValue (Abc_Frame_t *pAbc, char *key, char *value)
void Cmd_FlagDeleteByName (Abc_Frame_t *pAbc, char *key)

Function Documentation

void Cmd_FlagDeleteByName ( Abc_Frame_t pAbc,
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 86 of file cmdFlag.c.

00087 {
00088     char *value;
00089     if ( !key )
00090         return;
00091     if ( st_delete( pAbc->tFlags, &key, &value ) ) 
00092     {
00093         FREE(key);
00094         FREE(value);
00095     }
00096 }

char* Cmd_FlagReadByName ( Abc_Frame_t pAbc,
char *  flag 
)

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

] DECLARATIONS /// 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 43 of file cmdFlag.c.

00044 {
00045     char * value;
00046     if ( st_lookup(pAbc->tFlags, flag, &value) )
00047         return value;
00048     return NULL;
00049 }

void Cmd_FlagUpdateValue ( Abc_Frame_t pAbc,
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 61 of file cmdFlag.c.

00062 {
00063     char * oldValue, * newValue;
00064     if ( !key )
00065         return;
00066     if ( value )
00067         newValue = Extra_UtilStrsav(value);
00068     else
00069         newValue = Extra_UtilStrsav("");
00070 //        newValue = NULL;
00071     if ( st_delete(pAbc->tFlags, &key, &oldValue) )
00072         FREE(oldValue);
00073     st_insert( pAbc->tFlags, key, newValue );
00074 }


Generated on Tue Jan 5 12:18:43 2010 for abc70930 by  doxygen 1.6.1