cmdHist.c 1.8 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
/**CFile****************************************************************

  FileName    [cmdHist.c]

  SystemName  [ABC: Logic synthesis and verification system.]

  PackageName [Command processing package.]

  Synopsis    [Procedures working with history.]

  Author      [Alan Mishchenko]
  
  Affiliation [UC Berkeley]

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

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

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

21 22
#include "src/base/abc/abc.h"
#include "src/base/main/mainInt.h"
Alan Mishchenko committed
23 24 25
#include "cmd.h"
#include "cmdInt.h"

26 27 28
ABC_NAMESPACE_IMPL_START


Alan Mishchenko committed
29 30 31 32 33
////////////////////////////////////////////////////////////////////////
///                        DECLARATIONS                              ///
////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////
Alan Mishchenko committed
34
///                     FUNCTION DEFINITIONS                         ///
Alan Mishchenko committed
35 36 37 38 39 40 41 42 43 44 45 46 47
////////////////////////////////////////////////////////////////////////

/**Function*************************************************************

  Synopsis    []

  Description []
               
  SideEffects []

  SeeAlso     []

***********************************************************************/
48
void Cmd_HistoryAddCommand(    Abc_Frame_t * p, const char * command )
Alan Mishchenko committed
49
{
Alan Mishchenko committed
50
    static char Buffer[MAX_STR];
Alan Mishchenko committed
51 52 53
    strcpy( Buffer, command );
    if ( command[strlen(command)-1] != '\n' )
        strcat( Buffer, "\n" );
Alan Mishchenko committed
54
    Vec_PtrPush( p->aHistory, Extra_UtilStrsav(Buffer) );
Alan Mishchenko committed
55 56 57 58 59
}

////////////////////////////////////////////////////////////////////////
///                       END OF FILE                                ///
////////////////////////////////////////////////////////////////////////
60 61
ABC_NAMESPACE_IMPL_END