Skip to content

Commit

Permalink
Modify include guards in cmd.c so that Windows compilers don't compil…
Browse files Browse the repository at this point in the history
…e Unix-only code.
  • Loading branch information
cr1901 authored and mmicko committed May 8, 2024
1 parent 03da96f commit 237d813
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/base/cmd/cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ static int CmdCommandUnsetVariable ( Abc_Frame_t * pAbc, int argc, char ** argv
static int CmdCommandUndo ( Abc_Frame_t * pAbc, int argc, char ** argv );
static int CmdCommandRecall ( Abc_Frame_t * pAbc, int argc, char ** argv );
static int CmdCommandEmpty ( Abc_Frame_t * pAbc, int argc, char ** argv );
#if defined(WIN32) && !defined(__cplusplus)
#if defined(WIN32)
static int CmdCommandScanDir ( Abc_Frame_t * pAbc, int argc, char ** argv );
static int CmdCommandRenameFiles ( Abc_Frame_t * pAbc, int argc, char ** argv );
static int CmdCommandLs ( Abc_Frame_t * pAbc, int argc, char ** argv );
Expand Down Expand Up @@ -105,7 +105,7 @@ void Cmd_Init( Abc_Frame_t * pAbc )
Cmd_CommandAdd( pAbc, "Basic", "undo", CmdCommandUndo, 0 );
Cmd_CommandAdd( pAbc, "Basic", "recall", CmdCommandRecall, 0 );
Cmd_CommandAdd( pAbc, "Basic", "empty", CmdCommandEmpty, 0 );
#if defined(WIN32) && !defined(__cplusplus)
#if defined(WIN32)
Cmd_CommandAdd( pAbc, "Basic", "scandir", CmdCommandScanDir, 0 );
Cmd_CommandAdd( pAbc, "Basic", "renamefiles", CmdCommandRenameFiles, 0 );
Cmd_CommandAdd( pAbc, "Basic", "ls", CmdCommandLs, 0 );
Expand Down Expand Up @@ -1209,7 +1209,7 @@ int CmdCommandUndo( Abc_Frame_t * pAbc, int argc, char **argv )
#endif


#if defined(WIN32) && !defined(__cplusplus)
#if defined(WIN32)
#include <direct.h>
#include <io.h>

Expand Down Expand Up @@ -1395,10 +1395,10 @@ int CmfFindNumber( char * pName )
***********************************************************************/
void CnfDupFileUnzip( char * pOldName )
{
extern char * Io_MvLoadFileBz2( char * pFileName, int * pnFileSize );
extern char * Io_MvLoadFileBz2( char * pFileName, long * pnFileSize );
char pNewName[1000];
FILE * pFile;
int nFileSize;
long nFileSize;
char * pBuffer = Io_MvLoadFileBz2( pOldName, &nFileSize );
assert( strlen(pOldName) < 1000 );
sprintf( pNewName, "%s.v", pOldName );
Expand Down

0 comments on commit 237d813

Please sign in to comment.