cmdInt.h 3.67 KB
Newer Older
Alan Mishchenko committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
/**CFile****************************************************************

  FileName    [cmdInt.h]

  SystemName  [ABC: Logic synthesis and verification system.]

  PackageName [Command processing package.]

  Synopsis    [Internal declarations of the command package.]

  Author      [Alan Mishchenko]
  
  Affiliation [UC Berkeley]

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

  Revision    [$Id: cmdInt.h,v 1.00 2005/06/20 00:00:00 alanmi Exp $]

***********************************************************************/

#ifndef __CMD_INT_H__
#define __CMD_INT_H__

24

Alan Mishchenko committed
25 26 27 28 29 30 31
////////////////////////////////////////////////////////////////////////
///                          INCLUDES                                ///
////////////////////////////////////////////////////////////////////////

#include "mainInt.h"
#include "cmd.h"

32 33 34
ABC_NAMESPACE_HEADER_START


Alan Mishchenko committed
35 36 37 38 39 40 41 42 43 44 45 46
////////////////////////////////////////////////////////////////////////
///                         PARAMETERS                               ///
////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////
///                    STRUCTURE DEFINITIONS                         ///
////////////////////////////////////////////////////////////////////////

struct MvCommand
{
    char *        sName;       // the command name  
    char *        sGroup;      // the group name  
47
    Cmd_CommandFuncType        pFunc;       // the function to execute the command
Alan Mishchenko committed
48 49 50 51 52 53 54 55 56 57 58
    int           fChange;     // set to 1 to mark that the network is changed
};

struct MvAlias
{
    char *        sName;       // the alias name
    int           argc;        // the number of alias parts
    char **       argv;        // the alias parts
};

////////////////////////////////////////////////////////////////////////
Alan Mishchenko committed
59
///                       MACRO DEFINITIONS                          ///
Alan Mishchenko committed
60 61 62
////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////
Alan Mishchenko committed
63
///                     FUNCTION DEFINITIONS                        ///
Alan Mishchenko committed
64 65 66 67 68 69 70 71
////////////////////////////////////////////////////////////////////////

/*=== cmdAlias.c =============-========================================*/
extern void       CmdCommandAliasAdd( Abc_Frame_t * pAbc, char * sName, int argc, char ** argv );
extern void       CmdCommandAliasPrint( Abc_Frame_t * pAbc, Abc_Alias * pAlias );
extern char *     CmdCommandAliasLookup( Abc_Frame_t * pAbc, char * sCommand );
extern void       CmdCommandAliasFree( Abc_Alias * p );
/*=== cmdUtils.c =======================================================*/
Alan Mishchenko committed
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 );
Alan Mishchenko committed
74 75 76 77
extern int        CmdApplyAlias( Abc_Frame_t * pAbc, int * argc, char *** argv, int * loop );
extern char *     CmdHistorySubstitution( Abc_Frame_t * pAbc, char * line, int * changed );
extern FILE *     CmdFileOpen( Abc_Frame_t * pAbc, char * sFileName, char * sMode, char ** pFileNameReal, int silent );
extern void       CmdFreeArgv( int argc, char ** argv );
Alan Mishchenko committed
78
extern char **    CmdAddToArgv( int argc, char ** argv );
Alan Mishchenko committed
79
extern void       CmdCommandFree( Abc_Command * pCommand );
80
extern void       CmdCommandPrint( Abc_Frame_t * pAbc, int fPrintAll );
Alan Mishchenko committed
81
extern void       CmdPrintTable( st_table * tTable, int fAliases );
Alan Mishchenko committed
82 83 84 85 86

////////////////////////////////////////////////////////////////////////
///                       END OF FILE                                ///
////////////////////////////////////////////////////////////////////////

87 88 89 90


ABC_NAMESPACE_HEADER_END

Alan Mishchenko committed
91 92
#endif