Added f_getcwd().

git-svn-id: https://svn.code.sf.net/p/flaim/code/trunk@450 0109f412-320b-0410-ab79-c3e0c5ffbbe6
This commit is contained in:
ahodgkinson
2006-05-24 19:26:29 +00:00
parent d162adb63a
commit a3fda8265f
5 changed files with 56 additions and 0 deletions

View File

@@ -1457,6 +1457,9 @@
RCODE FLMAPI f_chdir(
const char * pszDir);
RCODE FLMAPI f_getcwd(
char * pszDir);
/****************************************************************************
Desc:
****************************************************************************/

View File

@@ -4084,6 +4084,18 @@ RCODE FLMAPI f_chdir(
}
#endif
/**********************************************************************
Desc:
**********************************************************************/
#if defined( FLM_RING_ZERO_NLM)
RCODE FLMAPI f_getcwd(
char * pszDir)
{
*pszDir = NULL;
return( RC_SET( NE_FLM_NOT_IMPLEMENTED));
}
#endif
#endif // FLM_NLM
/****************************************************************************

View File

@@ -93,6 +93,7 @@
#include <imagehlp.h>
#include <malloc.h>
#include <stdio.h>
#include <direct.h>
#pragma pack( pop, enter_windows)
// Conversion from XXX to YYY, possible loss of data

View File

@@ -1598,6 +1598,26 @@ Exit:
return( rc);
}
/**********************************************************************
Desc:
**********************************************************************/
RCODE FLMAPI f_getcwd(
char * pszDir)
{
RCODE rc = NE_FLM_OK;
if( getcwd( pszDir, F_PATH_MAX_SIZE) == NULL)
{
*pszDir = 0;
rc = f_mapPlatformError( errno, NE_FLM_IO_PATH_NOT_FOUND);
goto Exit;
}
Exit:
return( rc);
}
#endif // FLM_UNIX
#if defined( FLM_WATCOM_NLM)

View File

@@ -1625,6 +1625,26 @@ Exit:
return( rc);
}
/**********************************************************************
Desc:
**********************************************************************/
RCODE FLMAPI f_getcwd(
char * pszDir)
{
RCODE rc = NE_FLM_OK;
if( _getcwd( pszDir, F_PATH_MAX_SIZE) == NULL)
{
*pszDir = 0;
rc = f_mapPlatformError( GetLastError(), NE_FLM_IO_PATH_NOT_FOUND);
goto Exit;
}
Exit:
return( rc);
}
#endif // FLM_WIN
/****************************************************************************