ReactOS 0.4.15-dev-7834-g00c4b3d
getcwd.c File Reference
#include <precomp.h>
#include <direct.h>
#include <process.h>
#include <tchar.h>
Include dependency graph for getcwd.c:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

_TCHAR_tgetcwd (_TCHAR *buf, int size)
 

Function Documentation

◆ _tgetcwd()

_TCHAR * _tgetcwd ( _TCHAR buf,
int  size 
)

Definition at line 9 of file getcwd.c.

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 _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:3740