abc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
cmdInt.h
Go to the documentation of this file.
1 /**CFile****************************************************************
2 
3  FileName [cmdInt.h]
4 
5  SystemName [ABC: Logic synthesis and verification system.]
6 
7  PackageName [Command processing package.]
8 
9  Synopsis [Internal declarations of the command package.]
10 
11  Author [Alan Mishchenko]
12 
13  Affiliation [UC Berkeley]
14 
15  Date [Ver. 1.0. Started - June 20, 2005.]
16 
17  Revision [$Id: cmdInt.h,v 1.00 2005/06/20 00:00:00 alanmi Exp $]
18 
19 ***********************************************************************/
20 
21 #ifndef ABC__base__cmd__cmdInt_h
22 #define ABC__base__cmd__cmdInt_h
23 
24 
25 ////////////////////////////////////////////////////////////////////////
26 /// INCLUDES ///
27 ////////////////////////////////////////////////////////////////////////
28 
29 #include "base/main/mainInt.h"
30 #include "cmd.h"
31 
33 
34 
35 ////////////////////////////////////////////////////////////////////////
36 /// PARAMETERS ///
37 ////////////////////////////////////////////////////////////////////////
38 
39 ////////////////////////////////////////////////////////////////////////
40 /// STRUCTURE DEFINITIONS ///
41 ////////////////////////////////////////////////////////////////////////
42 
43 struct MvCommand
44 {
45  char * sName; // the command name
46  char * sGroup; // the group name
47  Cmd_CommandFuncType pFunc; // the function to execute the command
48  int fChange; // set to 1 to mark that the network is changed
49 };
50 
51 struct MvAlias
52 {
53  char * sName; // the alias name
54  int argc; // the number of alias parts
55  char ** argv; // the alias parts
56 };
57 
58 ////////////////////////////////////////////////////////////////////////
59 /// MACRO DEFINITIONS ///
60 ////////////////////////////////////////////////////////////////////////
61 
62 ////////////////////////////////////////////////////////////////////////
63 /// FUNCTION DEFINITIONS ///
64 ////////////////////////////////////////////////////////////////////////
65 
66 /*=== cmdAlias.c =============-========================================*/
67 extern void CmdCommandAliasAdd( Abc_Frame_t * pAbc, char * sName, int argc, char ** argv );
68 extern void CmdCommandAliasPrint( Abc_Frame_t * pAbc, Abc_Alias * pAlias );
69 extern char * CmdCommandAliasLookup( Abc_Frame_t * pAbc, char * sCommand );
70 extern void CmdCommandAliasFree( Abc_Alias * p );
71 /*=== cmdUtils.c =======================================================*/
72 extern int CmdCommandDispatch( Abc_Frame_t * pAbc, int * argc, char *** argv );
73 extern const char * CmdSplitLine( Abc_Frame_t * pAbc, const char * sCommand, int * argc, char *** argv );
74 extern int CmdApplyAlias( Abc_Frame_t * pAbc, int * argc, char *** argv, int * loop );
75 extern char * CmdHistorySubstitution( Abc_Frame_t * pAbc, char * line, int * changed );
76 extern FILE * CmdFileOpen( Abc_Frame_t * pAbc, char * sFileName, char * sMode, char ** pFileNameReal, int silent );
77 extern void CmdFreeArgv( int argc, char ** argv );
78 extern char ** CmdAddToArgv( int argc, char ** argv );
79 extern void CmdCommandFree( Abc_Command * pCommand );
80 extern void CmdCommandPrint( Abc_Frame_t * pAbc, int fPrintAll, int fDetails );
81 extern void CmdPrintTable( st__table * tTable, int fAliases );
82 
83 ////////////////////////////////////////////////////////////////////////
84 /// END OF FILE ///
85 ////////////////////////////////////////////////////////////////////////
86 
87 
88 
90 
91 #endif
92 
int fChange
Definition: cmdInt.h:48
INCLUDES ///.
Definition: cmdInt.h:43
typedefABC_NAMESPACE_HEADER_START struct MvCommand Abc_Command
INCLUDES ///.
Definition: cmd.h:39
char * sGroup
Definition: cmdInt.h:46
char ** argv
Definition: cmdInt.h:55
int argc
Definition: cmdInt.h:54
int CmdCommandDispatch(Abc_Frame_t *pAbc, int *argc, char ***argv)
Definition: cmdUtils.c:93
static Llb_Mgr_t * p
Definition: llb3Image.c:950
char * CmdHistorySubstitution(Abc_Frame_t *pAbc, char *line, int *changed)
Definition: cmdUtils.c:390
Cmd_CommandFuncType pFunc
Definition: cmdInt.h:47
Definition: cmdInt.h:51
const char * CmdSplitLine(Abc_Frame_t *pAbc, const char *sCommand, int *argc, char ***argv)
Definition: cmdUtils.c:181
void CmdCommandAliasPrint(Abc_Frame_t *pAbc, Abc_Alias *pAlias)
Definition: cmdAlias.c:72
void CmdCommandAliasFree(Abc_Alias *p)
Definition: cmdAlias.c:113
typedefABC_NAMESPACE_HEADER_START struct Abc_Frame_t_ Abc_Frame_t
INCLUDES ///.
Definition: st.h:52
void CmdPrintTable(st__table *tTable, int fAliases)
Definition: cmdUtils.c:722
void CmdCommandPrint(Abc_Frame_t *pAbc, int fPrintAll, int fDetails)
Definition: cmdUtils.c:554
#define ABC_NAMESPACE_HEADER_START
NAMESPACES ///.
Definition: abc_global.h:105
void CmdCommandAliasAdd(Abc_Frame_t *pAbc, char *sName, int argc, char **argv)
MACRO DEFINITIONS ///.
Definition: cmdAlias.c:46
#define ABC_NAMESPACE_HEADER_END
Definition: abc_global.h:106
void CmdFreeArgv(int argc, char **argv)
Definition: cmdUtils.c:485
int(* Cmd_CommandFuncType)(Abc_Frame_t *, int, char **)
Definition: cmd.h:54
FILE * CmdFileOpen(Abc_Frame_t *pAbc, char *sFileName, char *sMode, char **pFileNameReal, int silent)
Definition: cmdUtils.c:408
char * sName
Definition: cmdInt.h:45
void CmdCommandFree(Abc_Command *pCommand)
Definition: cmdUtils.c:535
char * sName
Definition: cmdInt.h:53
char ** CmdAddToArgv(int argc, char **argv)
Definition: cmdUtils.c:512
char * CmdCommandAliasLookup(Abc_Frame_t *pAbc, char *sCommand)
Definition: cmdAlias.c:92
int CmdApplyAlias(Abc_Frame_t *pAbc, int *argc, char ***argv, int *loop)
Definition: cmdUtils.c:267