Modify include guards in cmd.c so that Windows compilers don't compile Unix-only code.

This commit is contained in:
William D. Jones 2024-04-27 19:06:36 -04:00 committed by Miodrag Milanovic
parent 03da96f12f
commit 237d81397f
1 changed files with 5 additions and 5 deletions

View File

@ -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 );
@ -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 );
@ -1209,7 +1209,7 @@ usage:
#endif
#if defined(WIN32) && !defined(__cplusplus)
#if defined(WIN32)
#include <direct.h>
#include <io.h>
@ -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 );