ReactOS 0.4.15-dev-7934-g1dc8d80
getcwd.c
Go to the documentation of this file.
1#include <precomp.h>
2#include <direct.h>
3#include <process.h>
4#include <tchar.h>
5
6/*
7 * @implemented
8 */
10{
13
14 if (dir_len == 0)
15 {
17 return NULL; /* FIXME: Real return value untested */
18 }
19
20 if (!buf)
21 {
22 return _tcsdup(dir);
23 }
24
25 if (dir_len >= (DWORD)size)
26 {
28 return NULL; /* buf too small */
29 }
30
32 return buf;
33}
#define ERANGE
Definition: acclib.h:92
unsigned int dir
Definition: maze.c:112
#define NULL
Definition: types.h:112
#define MAX_PATH
Definition: compat.h:34
unsigned long DWORD
Definition: ntddk_ex.h:95
GLsizeiptr size
Definition: glext.h:5919
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
#define _tcscpy
Definition: tchar.h:623
#define _tgetcwd
Definition: tchar.h:673
#define _tcsdup
Definition: tchar.h:625
char _TCHAR
Definition: tchar.h:1392
void _dosmaperr(unsigned long oserrcode)
Definition: errno.c:81
errno_t __cdecl _set_errno(_In_ int _Value)
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
#define GetCurrentDirectory
Definition: winbase.h:3805