#include <msvcrt/stdlib.h>
+/*
+ * @implemented
+ */
char *_cgets(char *string)
{
unsigned len = 0;
#include <msvcrt/stdio.h>
#include <msvcrt/conio.h>
+/*
+ * @unimplemented
+ */
int
_cprintf(const char *fmt, ...)
{
#include <msvcrt/stdio.h>
#include <msvcrt/internal/file.h>
+/*
+ * @implemented
+ */
int _cputs(const char *_str)
{
int len = strlen(_str);
#include <msvcrt/stdio.h>
#include <msvcrt/internal/stdio.h>
+/*
+ * @unimplemented
+ */
int _cscanf(char *fmt, ...)
{
int cnt;
#include <msvcrt/internal/console.h>
+/*
+ * @implemented
+ */
int _getch(void)
{
DWORD NumberOfCharsRead = 0;
}
#if 0
+/*
+ * @unimplemented
+ */
int _getche(void)
{
int c;
#include <msvcrt/internal/console.h>
-// FIXME PeekCosoleInput returns more than keyboard hits
+/*
+ * FIXME PeekConsoleInput returns more than keyboard hits
+ *
+ * @unimplemented
+ */
int _kbhit(void)
{
//INPUT_RECORD InputRecord;
#include <windows.h>
#include <msvcrt/conio.h>
+/*
+ * @implemented
+ */
int _putch(int c)
{
DWORD NumberOfCharsWritten;
int ungot_char = 0;
+/*
+ * @implemented
+ */
int _ungetch(int c)
{
if (char_avail)
#undef isalnum
+/*
+ * @implemented
+ */
int isalnum(int c)
{
return _isctype(c, _ALPHA | _DIGIT);
}
#undef iswalnum
+/*
+ * @implemented
+ */
int iswalnum(wint_t c)
{
return iswctype(c, _ALPHA | _DIGIT);
#undef isalpha
+/*
+ * @implemented
+ */
int isalpha(int c)
{
return _isctype(c, _ALPHA);
}
#undef iswalpha
+/*
+ * @implemented
+ */
int iswalpha(wint_t c)
{
return iswctype(c, _ALPHA);
#include <msvcrt/ctype.h>
+/*
+ * @implemented
+ */
int __isascii(int c)
{
return (!((c)&(~0x7f)));
}
+/*
+ * @implemented
+ */
int iswascii(wint_t c)
{
return __isascii(c);
#undef iscntrl
+/*
+ * @implemented
+ */
int iscntrl(int c)
{
return _isctype(c, _CONTROL);
}
#undef iswcntrl
+/*
+ * @implemented
+ */
int iswcntrl(wint_t c)
{
return iswctype(c, _CONTROL);
#include <msvcrt/ctype.h>
+/*
+ * @implemented
+ */
int __iscsymf(int c)
{
return (isalpha(c) || ( c == '_' )) ;
}
+/*
+ * @implemented
+ */
int __iscsym(int c)
{
return (isalnum(c) || ( c == '_' )) ;
unsigned short *_pwctype = _ctype + 1;
+/*
+ * @implemented
+ */
unsigned short **__p__pctype(void)
{
return &_pctype;
}
+/*
+ * @implemented
+ */
unsigned short **__p__pwctype(void)
{
return &_pwctype;
}
+/*
+ * @implemented
+ */
int _isctype(unsigned int c, int ctypeFlags)
{
return (_pctype[(unsigned char)(c & 0xFF)] & ctypeFlags);
}
+/*
+ * @implemented
+ */
int iswctype(wint_t wc, wctype_t wctypeFlags)
{
return (_pwctype[(unsigned char)(wc & 0xFF)] & wctypeFlags);
}
-// obsolete
+/*
+ * obsolete
+ *
+ * @implemented
+ */
int is_wctype(wint_t wc, wctype_t wctypeFlags)
{
return (_pwctype[(unsigned char)(wc & 0xFF)] & wctypeFlags);
#undef isdigit
+/*
+ * @implemented
+ */
int isdigit(int c)
{
return _isctype(c, _DIGIT);
}
#undef iswdigit
+/*
+ * @implemented
+ */
int iswdigit(wint_t c)
{
return iswctype(c, _DIGIT);
#include <msvcrt/ctype.h>
#undef isgraph
+/*
+ * @implemented
+ */
int isgraph(int c)
{
return _isctype(c,_PUNCT | _ALPHA | _DIGIT);
}
#undef iswgraph
+/*
+ * @implemented
+ */
int iswgraph(wint_t c)
{
return iswctype(c,_PUNCT | _ALPHA | _DIGIT);
#undef islower
+/*
+ * @implemented
+ */
int islower(int c)
{
return _isctype(c, _LOWER);
}
+/*
+ * @implemented
+ */
int iswlower(wint_t c)
{
return iswctype(c, _LOWER);
#include <msvcrt/ctype.h>
#undef isprint
+/*
+ * @implemented
+ */
int isprint(int c)
{
return _isctype(c,_BLANK | _PUNCT | _ALPHA | _DIGIT);
}
+/*
+ * @implemented
+ */
int iswprint(wint_t c)
{
return iswctype((unsigned short)c,_BLANK | _PUNCT | _ALPHA | _DIGIT);
#undef ispunct
+/*
+ * @implemented
+ */
int ispunct(int c)
{
return _isctype(c, _PUNCT);
}
#undef iswpunct
+/*
+ * @implemented
+ */
int iswpunct(wint_t c)
{
return iswctype(c, _PUNCT);
#undef isspace
+/*
+ * @implemented
+ */
int isspace(int c)
{
return _isctype(c,_SPACE);
}
#undef iswspace
+/*
+ * @implemented
+ */
int iswspace(wint_t c)
{
return iswctype(c,_SPACE);
#undef isupper
+/*
+ * @implemented
+ */
int isupper(int c)
{
return _isctype(c, _UPPER);
}
+/*
+ * @implemented
+ */
int iswupper(wint_t c)
{
return iswctype(c, _UPPER);
#undef isxdigit
+/*
+ * @implemented
+ */
int isxdigit(int c)
{
return _isctype(c, _HEX);
}
#undef iswxdigit
+/*
+ * @implemented
+ */
int iswxdigit(wint_t c)
{
return iswctype(c, _HEX);
#include <msvcrt/ctype.h>
+/*
+ * @implemented
+ */
int __toascii(int c)
{
return((unsigned)(c) & 0x7F);
#include <msvcrt/ctype.h>
#undef tolower
+/*
+ * @implemented
+ */
int tolower(int c)
{
if (_isctype (c, _UPPER))
}
#undef towlower
+/*
+ * @implemented
+ */
int towlower(wint_t c)
//wchar_t towlower(wchar_t c)
{
return(c);
}
+/*
+ * @implemented
+ */
int _tolower(int c)
{
return (c - ('A' - 'a'));
#undef toupper
+/*
+ * @implemented
+ */
int toupper(int c)
{
if (_isctype (c, _LOWER))
}
#undef towupper
+/*
+ * @implemented
+ */
int towupper(wint_t c)
{
if (iswctype (c, _LOWER))
return(c);
}
+/*
+ * @implemented
+ */
int _toupper(int c)
{
return (c + ('A' - 'a'));
#include <msvcrt/direct.h>
+/*
+ * @implemented
+ */
int _chdir(const char* _path)
{
if (_path[1] == ':')
int cur_drive = 0;
+/*
+ * @implemented
+ */
int _chdrive(int drive)
{
char d[3];
#include <msvcrt/stdlib.h>
+/*
+ * @implemented
+ */
char *_getcwd(char* buffer, int maxlen)
{
char *cwd;
#include <windows.h>
#include <msvcrt/direct.h>
+/*
+ * @implemented
+ */
char* _getdcwd(int nDrive, char* caBuffer, int nBufLen)
{
int i =0;
#include <msvcrt/direct.h>
+/*
+ * @implemented
+ */
unsigned int _getdiskfree(unsigned int _drive, struct _diskfree_t* _diskspace)
{
char RootPathName[10];
extern int cur_drive;
+/*
+ * @implemented
+ */
int _getdrive(void)
{
char Buffer[MAX_PATH];
return cur_drive;
}
+/*
+ * @unimplemented
+ */
unsigned long _getdrives(void)
{
//fixme get logical drives
#include <msvcrt/direct.h>
+/*
+ * @implemented
+ */
int _mkdir(const char* _path)
{
if (!CreateDirectoryA(_path, NULL))
#include <msvcrt/direct.h>
+/*
+ * @implemented
+ */
int _rmdir(const char* _path)
{
if (!RemoveDirectoryA(_path))
#include <msvcrt/direct.h>
+/*
+ * @implemented
+ */
int _wchdir (const wchar_t *_path)
{
if (_path[1] == L':')
#include <msvcrt/stdlib.h>
+/*
+ * @implemented
+ */
wchar_t* _wgetcwd(wchar_t* buffer, int maxlen)
{
wchar_t *cwd;
#include <msvcrt/direct.h>
+/*
+ * @implemented
+ */
wchar_t* _wgetdcwd(int nDrive, wchar_t* caBuffer, int nBufLen)
{
int i =0;
#include <msvcrt/direct.h>
+/*
+ * @implemented
+ */
int _wmkdir(const wchar_t* _path)
{
if (!CreateDirectoryW(_path, NULL))
#include <windows.h>
#include <msvcrt/direct.h>
+/*
+ * @implemented
+ */
int _wrmdir(const wchar_t* _path)
{
if (!RemoveDirectoryW(_path))
#ifdef __GNUC__
+/*
+ * @unimplemented
+ */
int _abnormal_termination(void)
{
printf("Abnormal Termination\n");
//DbgPrint("MsvcrtDebug 0x%.08x\n", Value);
}
+/*
+ * @implemented
+ */
EXCEPTION_DISPOSITION
_except_handler2(
struct _EXCEPTION_RECORD *ExceptionRecord,
return 0;
}
-
-// not exported by NTDLL
+/*
+ * not exported by NTDLL
+ *
+ * @unimplemented
+ */
void __setusermatherr(int (*handler)(struct _exception*))
{
#define _FPIEEE_RECORD void
+/*
+ * @unimplemented
+ */
int _fpieee_flt(
unsigned long exception_code,
struct _EXCEPTION_POINTERS* ExceptionPointer,
#include <windows.h>
+/*
+ * @implemented
+ */
void __cdecl
_global_unwind2(PEXCEPTION_REGISTRATION RegistrationFrame)
{
#include <windows.h>
+/*
+ * @unimplemented
+ */
int
_XcptFilter(DWORD ExceptionCode,
struct _EXCEPTION_POINTERS * ExceptionInfo)
#include <msvcrt/internal/ieee.h>
+/*
+ * @implemented
+ */
double _chgsign( double __x )
{
double_t *x = (double_t *)&x;
#include <msvcrt/float.h>
+/*
+ * @implemented
+ */
unsigned int _clearfp (void)
{
unsigned short __res = _statusfp();
#include <msvcrt/float.h>
+/*
+ * @implemented
+ */
unsigned int _controlfp(unsigned int unNew, unsigned int unMask)
{
return _control87(unNew,unMask);
}
+/*
+ * @implemented
+ */
unsigned int _control87(unsigned int unNew, unsigned int unMask)
{
register unsigned int __res;
#include <msvcrt/float.h>
#include <msvcrt/internal/ieee.h>
+/*
+ * @implemented
+ */
double _copysign (double __d, double __s)
{
double_t *d = (double_t *)&__d;
typedef int fpclass_t;
+/*
+ * @implemented
+ */
fpclass_t _fpclass(double __d)
{
double_t *d = (double_t *)&__d;
#include <msvcrt/float.h>
#include <msvcrt/internal/tls.h>
+/*
+ * @implemented
+ */
int * __fpecode(void)
{
return(&(GetThreadData()->fpecode));
#include <msvcrt/float.h>
+/*
+ * @unimplemented
+ */
void _fpreset(void)
{
/* FIXME: This causes an exception */
#include <msvcrt/internal/ieee.h>
+/*
+ * @implemented
+ */
int _isnan(double __x)
{
double_t * x = (double_t *)&__x;
return ( x->exponent == 0x7ff && ( x->mantissah == 0 && x->mantissal == 0 ));
}
+/*
+ * @implemented
+ */
int _finite( double x )
{
return !_isinf(x);
#include <msvcrt/float.h>
+/*
+ * @implemented
+ */
double _nextafter( double x, double y )
{
if ( x == y)
#include <msvcrt/float.h>
#include <msvcrt/internal/ieee.h>
+/*
+ * @implemented
+ */
double _scalb( double __x, long e )
{
double_t *x = (double_t *)&__x;
#include <msvcrt/float.h>
+/*
+ * @implemented
+ */
unsigned int _statusfp (void)
{
#include <msvcrt/msvcrtdbg.h>
+/*
+ * @implemented
+ */
int _access( const char *_path, int _amode )
{
DWORD Attributes = GetFileAttributesA(_path);
#define mode_t int
+/*
+ * @implemented
+ */
int _chmod(const char* filename, mode_t mode)
{
DWORD FileAttributes = 0;
#define NDEBUG
#include <msvcrt/msvcrtdbg.h>
+/*
+ * @implemented
+ */
int _chsize(int _fd, long size)
{
DPRINT("_chsize(fd %d, size %d)\n", _fd, size);
#define NDEBUG
#include <msvcrt/msvcrtdbg.h>
+/*
+ * @implemented
+ */
int _close(int _fd)
{
DPRINT("_close(fd %d)\n", _fd);
#include <msvcrt/internal/file.h>
+/*
+ * @implemented
+ */
int _commit(int _fd)
{
if (! FlushFileBuffers(_get_osfhandle(_fd)) ) {
#include <msvcrt/msvcrtdbg.h>
+/*
+ * @implemented
+ */
int _creat(const char* filename, int mode)
{
DPRINT("_creat('%s', mode %x)\n", filename, mode);
-/* $Id: dup.c,v 1.4 2002/09/08 10:22:50 chorns Exp $ */
+/* $Id: dup.c,v 1.5 2003/07/11 21:57:54 royce Exp $ */
#include <windows.h>
#include <msvcrt/io.h>
#include <msvcrt/internal/file.h>
+/*
+ * @implemented
+ */
int _dup(int handle)
{
HANDLE hFile;
#include <msvcrt/io.h>
#include <msvcrt/internal/file.h>
+/*
+ * @implemented
+ */
int _dup2(int handle1, int handle2)
{
return __fileno_dup2(handle1, handle2);
//#include <windows.h>
#include <msvcrt/io.h>
+/*
+ * @implemented
+ */
int _eof(int _fd)
{
__int64 cur_pos = _lseeki64(_fd, 0, SEEK_CUR);
#include <msvcrt/io.h>
+/*
+ * @implemented
+ */
long _filelength(int _fd)
{
return GetFileSize(_get_osfhandle(_fd), NULL);
#include <msvcrt/io.h>
+/*
+ * @implemented
+ */
__int64 _filelengthi64(int _fd)
{
long lo_length, hi_length;
#include <msvcrt/internal/file.h>
+/*
+ * @implemented
+ */
int _findclose(int handle)
{
// check no wildcards or invalid handle
return FindClose((void*)handle);
}
+/*
+ * @implemented
+ */
int _findfirst(const char* _name, struct _finddata_t* result)
{
WIN32_FIND_DATAA FindFileData;
return hFindFile;
}
+/*
+ * @implemented
+ */
int _findnext(int handle, struct _finddata_t* result)
{
WIN32_FIND_DATAA FindFileData;
#undef _fmode
unsigned int _fmode = O_TEXT;
+/*
+ * @implemented
+ */
unsigned int *__p__fmode(void)
{
return &_fmode;
#define NDEBUG
#include <msvcrt/msvcrtdbg.h>
+/*
+ * @implemented
+ */
int _isatty( int fd )
{
struct stat buf;
#include <msvcrt/io.h>
+/*
+ * @implemented
+ */
int _locking(int _fd, int mode, long nbytes)
{
long offset = _lseek(_fd, 0L, 1);
#include <msvcrt/internal/file.h>
+/*
+ * @implemented
+ */
long _lseek(int _fildes, long _offset, int _whence)
{
return (SetFilePointer((HANDLE)filehnd(_fildes), _offset, NULL, _whence));
//#define SETFILEPOINTEREX_AVAILABLE
+/*
+ * @implemented
+ */
__int64 _lseeki64(int _fildes, __int64 _offset, int _whence)
{
#ifdef SETFILEPOINTEREX_AVAILABLE
#include <msvcrt/msvcrtdbg.h>
+/*
+ * @implemented
+ */
char* _mktemp(char* _template)
{
static int count = 0;
-/* $Id: open.c,v 1.14 2002/12/26 17:26:41 robd Exp $
+/* $Id: open.c,v 1.15 2003/07/11 21:57:54 royce Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
return (!((p)->_flag&_IOSTRG) && (__pioinfo[(p)->_file].mode&O_TEXT));
}
+/*
+ * @implemented
+ */
int _open(const char* _path, int _oflag,...)
{
#if !defined(NDEBUG) && defined(DBG)
return 0;
}
+/*
+ * @implemented
+ */
int _open_osfhandle(void* osfhandle, int flags)
{
return __fileno_alloc((HANDLE)osfhandle, flags);
}
+/*
+ * @implemented
+ */
void* _get_osfhandle( int fileno )
{
return filehnd(fileno);
-/* $Id: pipe.c,v 1.5 2002/11/18 03:19:42 robd Exp $
+/* $Id: pipe.c,v 1.6 2003/07/11 21:57:54 royce Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
#include <msvcrt/internal/file.h>
+/*
+ * @implemented
+ */
int _pipe(int _fildes[2], unsigned int size, int mode )
{
HANDLE hReadPipe, hWritePipe;
-/* $Id: read.c,v 1.10 2003/01/19 01:05:03 gvg Exp $
+/* $Id: read.c,v 1.11 2003/07/11 21:57:54 royce Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
#define NDEBUG
#include <msvcrt/msvcrtdbg.h>
+/*
+ * @implemented
+ */
size_t _read(int _fd, void *_buf, size_t _nbyte)
{
DWORD _rbyte = 0, nbyte = _nbyte;
-/* $Id: setmode.c,v 1.8 2002/11/24 18:42:22 robd Exp $
+/* $Id: setmode.c,v 1.9 2003/07/11 21:57:54 royce Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
#include <msvcrt/msvcrtdbg.h>
+/*
+ * @implemented
+ */
int _setmode(int _fd, int _newmode)
{
DPRINT("_setmod(fd %d, newmode %x)\n", _fd, _newmode);
#include <msvcrt/io.h>
+/*
+ * @implemented
+ */
int _sopen(char *path, int access, int shflag, int mode)
{
return _open((path), (access)|(shflag), (mode));
#include <msvcrt/io.h>
+/*
+ * @implemented
+ */
off_t _tell(int _file)
{
return _lseek(_file, 0, SEEK_CUR);
#include <msvcrt/io.h>
+/*
+ * @implemented
+ */
__int64 _telli64(int _file)
{
return _lseeki64(_file, 0, SEEK_CUR);
unsigned _unMode_dll = 022;
+/*
+ * @implemented
+ */
unsigned _umask (unsigned unMode)
{
unsigned old_mask = _unMode_dll;
#include <msvcrt/msvcrtdbg.h>
+/*
+ * @implemented
+ */
int _unlink(const char* filename)
{
int result = 0;
#include <msvcrt/internal/file.h>
+/*
+ * @implemented
+ */
int _utime(const char* filename, struct _utimbuf* buf)
{
int fn;
#include <msvcrt/msvcrtdbg.h>
+/*
+ * @implemented
+ */
int _waccess(const wchar_t *_path, int _amode)
{
DWORD Attributes = GetFileAttributesW(_path);
#define mode_t int
+/*
+ * @implemented
+ */
int _wchmod(const wchar_t* filename, mode_t mode)
{
DWORD FileAttributes = 0;
#include <msvcrt/msvcrtdbg.h>
+/*
+ * @implemented
+ */
int _wcreat(const wchar_t* filename, int mode)
{
DPRINT("_wcreat('%S', mode %x)\n", filename, mode);
#include <msvcrt/internal/file.h>
+/*
+ * @implemented
+ */
int _wfindfirst(const wchar_t* _name, struct _wfinddata_t* result)
{
WIN32_FIND_DATAW FindFileData;
return hFindFile;
}
+/*
+ * @implemented
+ */
int _findfirsti64(const char *_name, struct _finddatai64_t *result)
{
WIN32_FIND_DATAA FindFileData;
return hFindFile;
}
+/*
+ * @implemented
+ */
int _findnexti64(int handle, struct _finddatai64_t *result)
{
WIN32_FIND_DATAA FindFileData;
return 0;
}
+/*
+ * @implemented
+ */
int _wfindfirsti64(const wchar_t *_name, struct _wfinddatai64_t *result)
{
WIN32_FIND_DATAW FindFileData;
return hFindFile;
}
+/*
+ * @implemented
+ */
int _wfindnext(int handle, struct _wfinddata_t *result)
{
WIN32_FIND_DATAW FindFileData;
return 0;
}
+/*
+ * @implemented
+ */
int _wfindnexti64(int handle, struct _wfinddatai64_t *result)
{
WIN32_FIND_DATAW FindFileData;
#include <msvcrt/msvcrtdbg.h>
+/*
+ * @implemented
+ */
wchar_t* _wmktemp (wchar_t *_template)
{
static int count = 0;
-/* $Id: wopen.c,v 1.2 2002/12/05 15:30:44 robd Exp $
+/* $Id: wopen.c,v 1.3 2003/07/11 21:57:54 royce Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
#include <msvcrt/msvcrtdbg.h>
+/*
+ * @implemented
+ */
int _wopen(const wchar_t* _path, int _oflag, ...)
{
#if !defined(NDEBUG) && defined(DBG)
return __fileno_alloc(hFile,_oflag);
}
+/*
+ * @implemented
+ */
int _wsopen(wchar_t* path, int access, int shflag, int mode)
{
return _wopen((path), (access)|(shflag), (mode));
}
}
*/
+/*
+ * @implemented
+ */
size_t _write(int _fd, const void* _buf, size_t _nbyte)
{
char *tmp, *in, *out;
#include <msvcrt/msvcrtdbg.h>
+/*
+ * @implemented
+ */
int _wunlink(const wchar_t* filename)
{
DPRINT("_wunlink('%S')\n", filename);
#include <msvcrt/internal/file.h>
+/*
+ * @implemented
+ */
int _wutime(const wchar_t* filename, struct _utimbuf* buf)
{
int fn;
int parse_locale(char *locale, char *lang, char *country, char *code_page);
+/*
+ * @implemented
+ */
char *setlocale(int category, const char *locale)
{
char lang[100];
127 // n_sign_posn;
};
+/*
+ * @implemented
+ */
struct lconv *localeconv(void)
{
return (struct lconv *) &_lconv;
double atan2 (double __y, double __x);
+/*
+ * @implemented
+ */
double atan2 (double __y, double __x)
{
register double __value;
#include <msvcrt/math.h>
+/*
+ * @implemented
+ */
double _cabs( struct _complex z )
{
return sqrt( z.x*z.x + z.y*z.y );
#include <msvcrt/math.h>
+/*
+ * @implemented
+ */
double ceil (double __x)
{
register double __value;
double cos (double __x);
+/*
+ * @implemented
+ */
double cos (double __x)
{
register double __value;
#include <msvcrt/math.h>
+/*
+ * @implemented
+ */
double cosh(double x)
{
const double ebig = exp(fabs(x));
#include <msvcrt/stdlib.h>
#include <msvcrt/internal/ieee.h>
+/*
+ * @implemented
+ */
double
frexp(double __x, int *exptr)
{
#define __SQRT_DBL_MAX 1.3e+154
#define __SQRT_DBL_MIN 2.3e-162
+/*
+ * @implemented
+ */
double
_hypot(double x, double y)
{
#include <msvcrt/math.h>
+/*
+ * @unimplemented
+ */
double _j0(double x)
{
return x;
}
+/*
+ * @unimplemented
+ */
double _y0(double x)
{
return x;
#include <msvcrt/math.h>
+/*
+ * @unimplemented
+ */
double _j1(double x)
{
return x;
}
+/*
+ * @unimplemented
+ */
double _y1(double x)
{
return x;
#include <msvcrt/math.h>
+/*
+ * @unimplemented
+ */
double _jn(int n, double x)
{
return x;
}
+/*
+ * @unimplemented
+ */
double _yn(int n, double x)
{
return x;
return __value;
}
+/*
+ * @implemented
+ */
double pow (double __x, double __y)
{
register double __value;
/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
#include <msvcrt/math.h>
+/*
+ * @implemented
+ */
double sinh(double x)
{
if(x >= 0.0)
double _CIfmod(double x, double y);
+/*
+ * @implemented
+ */
double _CIsin(double x)
{
return sin(x);
}
+/*
+ * @implemented
+ */
double _CIcos(double x)
{
return cos(x);
}
+/*
+ * @implemented
+ */
double _CItan(double x)
{
return tan(x);
}
+/*
+ * @implemented
+ */
double _CIsinh(double x)
{
return sinh(x);
}
+/*
+ * @implemented
+ */
double _CIcosh(double x)
{
return cosh(x);
}
+/*
+ * @implemented
+ */
double _CItanh(double x)
{
return tanh(x);
}
+/*
+ * @implemented
+ */
double _CIasin(double x)
{
return asin(x);
}
+/*
+ * @implemented
+ */
double _CIacos(double x)
{
return acos(x);
}
+/*
+ * @implemented
+ */
double _CIatan(double x)
{
return atan(x);
}
+/*
+ * @implemented
+ */
double _CIatan2(double y, double x)
{
return atan2(y, x);
}
+/*
+ * @implemented
+ */
double _CIexp(double x)
{
return exp(x);
}
+/*
+ * @implemented
+ */
double _CIlog(double x)
{
return log(x);
}
+/*
+ * @implemented
+ */
double _CIlog10(double x)
{
return log10(x);
}
+/*
+ * @implemented
+ */
double _CIpow(double x, double y)
{
return pow(x, y);
}
+/*
+ * @implemented
+ */
double _CIsqrt(double x)
{
return sqrt(x);
}
+/*
+ * @implemented
+ */
double _CIfmod(double x, double y)
{
return fmod(x, y);
#include <msvcrt/math.h>
+/*
+ * @implemented
+ */
double tanh(double x)
{
if (x > 50)
#define JTOKANA(c) ((c) <= 0x82dd ? (c) + 0xa1 : (c) + 0xa2)
+/*
+ * @implemented
+ */
unsigned short _mbbtombc(unsigned short c)
{
if (c >= 0x20 && c <= 0x7e) {
}
+/*
+ * @implemented
+ */
unsigned short _mbctombb(unsigned short c)
{
int i;
#include <msvcrt/mbctype.h>
+/*
+ * @implemented
+ */
int _ismbchira( unsigned int c )
{
return ((c>=0x829F) && (c<=0x82F1));
}
+/*
+ * @implemented
+ */
int _ismbckata( unsigned int c )
{
return ((c>=0x8340) && (c<=0x8396));
}
+/*
+ * @unimplemented
+ */
unsigned int _mbctohira( unsigned int c )
{
return c;
}
+/*
+ * @unimplemented
+ */
unsigned int _mbctokata( unsigned int c )
{
return c;
#include <msvcrt/mbstring.h>
#include <msvcrt/mbctype.h>
+/*
+ * @implemented
+ */
int _ismbbkana(unsigned char c)
{
return ((_jctype+1)[(unsigned char)(c)] & (_KNJ_M|_KNJ_P));
*/
#include <msvcrt/mbctype.h>
+/*
+ * @implemented
+ */
int _ismbbkpunct( unsigned int c )
{
return ((_jctype+1)[(unsigned char)(c)] & (_KNJ_P));
#include <windows.h>
#include <msvcrt/mbstring.h>
+/*
+ * @unimplemented
+ */
int isleadbyte(char *mbstr)
{
return 0;
#include <msvcrt/mbctype.h>
#include <msvcrt/ctype.h>
-// code page 952 only
+/*
+ * code page 952 only
+ *
+ * @implemented
+ */
int _ismbclower( unsigned int c )
{
if ((c & 0xFF00) != 0) {
#include <msvcrt/mbctype.h>
#include <msvcrt/ctype.h>
+/*
+ * @implemented
+ */
int _ismbbalpha(unsigned char c)
{
return (isalpha(c) || _ismbbkalnum(c));
#include <msvcrt/ctype.h>
+/*
+ * @implemented
+ */
int _ismbbalnum(unsigned char c)
{
return (isalnum(c) || _ismbbkalnum(c));
int _ismbbalpha(unsigned char c);
int _ismbbalnum(unsigned char c);
+/*
+ * @implemented
+ */
int _ismbcalnum( unsigned int c )
{
if ((c & 0xFF00) != 0) {
return 0;
}
+/*
+ * @implemented
+ */
int _ismbcalpha( unsigned int c )
{
if ((c & 0xFF00) != 0) {
return 0;
}
+/*
+ * @implemented
+ */
int _ismbcdigit( unsigned int c )
{
if ((c & 0xFF00) != 0) {
return 0;
}
+/*
+ * @unimplemented
+ */
int _ismbcprint( unsigned int c )
{
if ((c & 0xFF00) != 0) {
return 0;
}
+/*
+ * @unimplemented
+ */
int _ismbcsymbol( unsigned int c )
{
if ((c & 0xFF00) != 0) {
return 0;
}
+/*
+ * @unimplemented
+ */
int _ismbcspace( unsigned int c )
{
if ((c & 0xFF00) != 0) {
return 0;
}
+/*
+ * @implemented
+ */
int _ismbclegal(unsigned int c)
{
if ((c & 0xFF00) != 0) {
return 0;
}
+/*
+ * @unimplemented
+ */
int _ismbcl0(unsigned int c)
{
return 0;
}
+/*
+ * @unimplemented
+ */
int _ismbcl1(unsigned int c)
{
return 0;
}
+/*
+ * @unimplemented
+ */
int _ismbcl2(unsigned int c)
{
return 0;
#include <msvcrt/mbctype.h>
#include <msvcrt/ctype.h>
+/*
+ * @implemented
+ */
int _ismbbgraph(unsigned char c)
{
return (isgraph(c) || _ismbbkana(c));
#include <msvcrt/mbctype.h>
#include <msvcrt/ctype.h>
+/*
+ * @implemented
+ */
int _ismbbkalnum( unsigned int c )
{
return ((_jctype+1)[(unsigned char)(c)] & (_KNJ_P));
};
char *_mbctype = _jctype;
+/*
+ * @implemented
+ */
int _ismbblead(unsigned int c)
{
return ((_jctype+1)[(unsigned char)(c)] & _KNJ_1);
// return (int)IsDBCSLeadByte(byte)
//}
+/*
+ * @implemented
+ */
int _ismbslead( const unsigned char *str, const unsigned char *t)
{
unsigned char *s = (unsigned char *)str;
#include <msvcrt/mbctype.h>
#include <msvcrt/ctype.h>
+/*
+ * @implemented
+ */
int _ismbbprint(unsigned char c)
{
return (isprint(c) || _ismbbkana(c));
#include <msvcrt/ctype.h>
+/*
+ * @implemented
+ */
int _ismbbpunct(unsigned char c)
{
// (0xA1 <= c <= 0xA6)
// iskanji2() : (0x40 <= c <= 0x7E 0x80 <= c <= 0xFC)
+/*
+ * @implemented
+ */
int _ismbbtrail(unsigned int c)
{
return ((_jctype+1)[(unsigned char)(c)] & _KNJ_2);
//}
+/*
+ * @implemented
+ */
int _ismbstrail( const unsigned char *str, const unsigned char *t)
{
unsigned char *s = (unsigned char *)str;
#include <msvcrt/mbctype.h>
#include <msvcrt/ctype.h>
-// code page 952 only
+/*
+ * code page 952 only
+ *
+ * @implemented
+ */
int _ismbcupper( unsigned int c )
{
if ((c & 0xFF00) != 0) {
#include <msvcrt/mbstring.h>
+/*
+ * @implemented
+ */
unsigned short _mbcjistojms(unsigned short c)
{
int c1, c2;
#include <msvcrt/mbstring.h>
+/*
+ * @implemented
+ */
unsigned short _mbcjmstojis(unsigned short c)
{
int c1, c2;
#include <msvcrt/mbstring.h>
#include <msvcrt/mbctype.h>
+/*
+ * @implemented
+ */
int _mbbtype(unsigned char c , int type)
{
if ( type == 1 ) {
return 0;
}
+/*
+ * @implemented
+ */
int _mbsbtype( const unsigned char *str, size_t n )
{
if ( str == NULL )
size_t _mbclen2(const unsigned int s);
+/*
+ * @implemented
+ */
void _mbccpy(unsigned char *dst, const unsigned char *src)
{
if (!_ismbblead(*src) )
#include <msvcrt/stdlib.h>
+/*
+ * @implemented
+ */
size_t _mbclen(const unsigned char *s)
{
return (_ismbblead(*s>>8) && _ismbbtrail(*s&0x00FF)) ? 2 : 1;
return (_ismbblead(s>>8) && _ismbbtrail(s&0x00FF)) ? 2 : 1;
}
-// assume MB_CUR_MAX == 2
+/*
+ * assume MB_CUR_MAX == 2
+ *
+ * @implemented
+ */
int mblen( const char *s, size_t count )
{
size_t l;
#include <msvcrt/string.h>
+/*
+ * @implemented
+ */
unsigned char * _mbscat(unsigned char *dst, const unsigned char *src)
{
return strcat(dst,src);
#include <msvcrt/string.h>
+/*
+ * @implemented
+ */
unsigned char * _mbschr(const unsigned char *str, unsigned int c)
{
return strchr(str,c);
#include <msvcrt/mbstring.h>
#include <msvcrt/string.h>
+/*
+ * @implemented
+ */
int _mbscmp(const unsigned char *str1, const unsigned char *str2)
{
return strcmp(str1,str2);
int colldif(unsigned short c1, unsigned short c2);
+/*
+ * @implemented
+ */
int _mbscoll(const unsigned char *str1, const unsigned char *str2)
{
unsigned char *s1 = (unsigned char *)str1;
#include <msvcrt/mbstring.h>
#include <msvcrt/string.h>
+/*
+ * @implemented
+ */
unsigned char * _mbscpy(unsigned char *dst, const unsigned char *str)
{
return strcpy(dst,str);
#include <msvcrt/mbstring.h>
-// not correct
+/*
+ * FIXME not correct
+ *
+ * @unimplemented
+ */
size_t _mbscspn(const unsigned char *s1, const unsigned char *s2)
{
const char *p, *spanp;
#include <msvcrt/mbstring.h>
+/*
+ * @implemented
+ */
unsigned char * _mbsdec(const unsigned char *str, const unsigned char *cur)
{
unsigned char *s = (unsigned char *)cur;
#include <msvcrt/mbstring.h>
#include <msvcrt/stdlib.h>
+/*
+ * @implemented
+ */
unsigned char * _mbsdup(const unsigned char *_s)
{
char *rv;
#include <msvcrt/mbctype.h>
#include <msvcrt/ctype.h>
+/*
+ * @implemented
+ */
int _mbsicmp(const unsigned char *str1, const unsigned char *str2)
{
unsigned char *s1 = (unsigned char *)str1;
#include <msvcrt/ctype.h>
int colldif(unsigned short c1, unsigned short c2);
+/*
+ * @implemented
+ */
int _mbsicoll(const unsigned char *str1, const unsigned char *str2)
{
unsigned char *s1 = (unsigned char *)str1;
#include <msvcrt/mbstring.h>
+/*
+ * @implemented
+ */
unsigned char * _mbsinc(const unsigned char *s)
{
unsigned char *c = (unsigned char *)s;
size_t _mbclen2(const unsigned int s);
+/*
+ * @implemented
+ */
size_t _mbslen(const unsigned char *str)
{
int i = 0;
// code page 952
#define CASE_DIFF (0x8281 - 0x8260)
+/*
+ * @implemented
+ */
unsigned int _mbctolower(unsigned int c)
{
if ((c & 0xFF00) != 0) {
return 0;
}
+/*
+ * @implemented
+ */
unsigned char * _mbslwr(unsigned char *x)
{
unsigned char *y=x;
size_t _mbclen2(const unsigned int s);
+/*
+ * @implemented
+ */
unsigned char * _mbsncat(unsigned char *dst, const unsigned char *src, size_t n)
{
char *d = (char *)dst;
return dst;
}
+/*
+ * @implemented
+ */
unsigned char * _mbsnbcat(unsigned char *dst, const unsigned char *src, size_t n)
{
char *d;
#include <msvcrt/mbstring.h>
+/*
+ * @implemented
+ */
size_t _mbsnccnt(const unsigned char *str, size_t n)
{
unsigned char *s = (unsigned char *)str;
return cnt;
}
+/*
+ * @implemented
+ */
size_t _mbsnbcnt(const unsigned char *str, size_t n)
{
unsigned char *s = (unsigned char *)str;
#include <msvcrt/mbstring.h>
+/*
+ * @implemented
+ */
int _mbsncmp(const unsigned char *str1, const unsigned char *str2, size_t n)
{
unsigned char *s1 = (unsigned char *)str1;
return 0;
}
+/*
+ * @implemented
+ */
int _mbsnbcmp(const unsigned char *str1, const unsigned char *str2, size_t n)
{
unsigned char *s1 = (unsigned char *)str1;
int colldif(unsigned short c1, unsigned short c2);
+/*
+ * @implemented
+ */
int _mbsncoll(const unsigned char *str1, const unsigned char *str2, size_t n)
{
unsigned char *s1 = (unsigned char *)str1;
return 0;
}
+/*
+ * @implemented
+ */
int _mbsnbcoll(const unsigned char *str1, const unsigned char *str2, size_t n)
{
unsigned char *s1 = (unsigned char *)str1;
#include <msvcrt/mbstring.h>
+/*
+ * @implemented
+ */
unsigned char* _mbsncpy(unsigned char *str1, const unsigned char *str2, size_t n)
{
unsigned char *s1 = (unsigned char *)str1;
}
-//
-//The _mbsnbcpy function copies count bytes from src to dest. If src is shorter
-//than dest, the string is padded with null characters. If dest is less than or
-//equal to count it is not terminated with a null character.
-//
-
+/*
+ * The _mbsnbcpy function copies count bytes from src to dest. If src is shorter
+ * than dest, the string is padded with null characters. If dest is less than or
+ * equal to count it is not terminated with a null character.
+ *
+ * @implemented
+ */
unsigned char * _mbsnbcpy(unsigned char *str1, const unsigned char *str2, size_t n)
{
unsigned char *s1 = (unsigned char *)str1;
#include <msvcrt/mbstring.h>
+/*
+ * @implemented
+ */
unsigned int _mbsnextc (const unsigned char *src)
{
unsigned char *char_src = (unsigned char *)src;
unsigned int _mbbtoupper(unsigned int c);
+/*
+ * @implemented
+ */
int _mbsnicmp(const unsigned char *s1, const unsigned char *s2, size_t n)
{
if (n == 0)
return 0;
}
+/*
+ * @implemented
+ */
int _mbsnbicmp(const unsigned char *s1, const unsigned char *s2, size_t n)
{
if (n == 0)
#include <msvcrt/mbstring.h>
+/*
+ * @unimplemented
+ */
int _mbsnicoll(const unsigned char *s1, const unsigned char *s2, size_t n)
{
return 0;
}
+/*
+ * @unimplemented
+ */
int _mbsnbicoll(const unsigned char *s1, const unsigned char *s2, size_t n)
{
return 0;
#include <msvcrt/mbstring.h>
+/*
+ * @implemented
+ */
unsigned char * _mbsninc(const unsigned char *str, size_t n)
{
unsigned char *s = (unsigned char *)str;
size_t _mbclen2(const unsigned int s);
+/*
+ * @implemented
+ */
unsigned char * _mbsnset(unsigned char *src, unsigned int val, size_t count)
{
unsigned char *char_src = (unsigned char *)src;
return src;
}
+/*
+ * @implemented
+ */
unsigned char * _mbsnbset(unsigned char *src, unsigned int val, size_t count)
{
unsigned char *char_src = (unsigned char *)src;
#include <msvcrt/mbstring.h>
-// not correct
+/*
+ * not correct
+ *
+ * @implemented
+ */
unsigned char * _mbspbrk(const unsigned char *s1, const unsigned char *s2)
{
const char *scanp;
size_t _mbclen2(const unsigned int s);
+/*
+ * @implemented
+ */
unsigned char * _mbsrchr(const unsigned char *src, unsigned int val)
{
char *s = (char *)src;
#include <msvcrt/mbstring.h>
+/*
+ * @implemented
+ */
unsigned char * _mbsrev(unsigned char *s)
{
unsigned char *e;
size_t _mbclen2(const unsigned int s);
+/*
+ * @implemented
+ */
unsigned char * _mbsset(unsigned char *src, unsigned int c)
{
unsigned char *char_src = src;
#include <msvcrt/mbstring.h>
-// not correct
+/*
+ * FIXME not correct
+ *
+ * @unimplemented
+ */
size_t _mbsspn(const unsigned char *s1, const unsigned char *s2)
{
const char *p = s1, *spanp;
#include <msvcrt/mbstring.h>
-// not correct
+/*
+ * FIXME not correct
+ *
+ * @unimplemented
+ */
unsigned char * _mbsspnp(const unsigned char *s1, const unsigned char *s2)
{
const char *p = s1, *spanp;
#include <msvcrt/mbstring.h>
#include <msvcrt/stdlib.h>
+/*
+ * @implemented
+ */
unsigned char *_mbsstr(const unsigned char *src1,const unsigned char *src2)
{
int len;
#include <msvcrt/mbstring.h>
+/*
+ * @implemented
+ */
unsigned char * _mbstok(unsigned char *s, unsigned char *delim)
{
const char *spanp;
#include <msvcrt/mbstring.h>
#include <msvcrt/stdlib.h>
+/*
+ * @implemented
+ */
size_t _mbstrlen( const char *string )
{
char *s = (char *)string;
// codepage 952
#define CASE_DIFF (0x8281 - 0x8260)
+/*
+ * @implemented
+ */
unsigned int _mbctoupper(unsigned int c)
{
return 0;
}
+/*
+ * @implemented
+ */
unsigned char * _mbsupr(unsigned char *x)
{
unsigned char *y=x;
};
+/*
+ * @implemented
+ */
int _aexit_rtn(int exitcode)
{
_exit(exitcode);
return 0;
}
+/*
+ * @implemented
+ */
void _amsg_exit(int errnum)
{
fprintf(stderr, "runtime error - %s\n", __rt_err_msg[errnum]);
#include <msvcrt/signal.h>
+/*
+ * @implemented
+ */
void _assert(const char *msg, const char *file, int line)
{
/* Assertion failed at foo.c line 45: x<y */
-/* $Id: crtmain.c,v 1.4 2003/03/23 15:18:01 hbirr Exp $
+/* $Id: crtmain.c,v 1.5 2003/07/11 21:58:09 royce Exp $
*
* ReactOS MSVCRT.DLL Compatibility Library
*/
/* FUNCTIONS **************************************************************/
+/*
+ * @unimplemented
+ */
int
STDCALL
_except_handler3(void)
return 0;
}
+/*
+ * @unimplemented
+ */
int
STDCALL
_local_unwind2(void)
-/* $Id: environ.c,v 1.3 2003/06/01 17:08:03 hbirr Exp $
+/* $Id: environ.c,v 1.4 2003/07/11 21:58:09 royce Exp $
*
* dllmain.c
*
int _commode = _IOCOMMIT;
+/*
+ * @implemented
+ */
int *__p__commode(void) // not exported by NTDLL
{
return &_commode;
return 0;
}
+/*
+ * @implemented
+ */
void __set_app_type(int app_type)
{
__app_type = app_type;
}
+/*
+ * @implemented
+ */
char **__p__acmdln(void)
{
return &_acmdln;
}
+/*
+ * @implemented
+ */
char ***__p__environ(void)
{
return _environ_dll;
}
+/*
+ * @implemented
+ */
char ***__p___initenv(void)
{
return &__initenv;
}
+/*
+ * @implemented
+ */
int *__p___mb_cur_max(void)
{
return &__mb_cur_max;
}
+/*
+ * @implemented
+ */
unsigned int *__p__osver(void)
{
return &_osver;
}
+/*
+ * @implemented
+ */
char **__p__pgmptr(void)
{
return &_pgmptr;
}
+/*
+ * @implemented
+ */
unsigned int *__p__winmajor(void)
{
return &_winmajor;
}
+/*
+ * @implemented
+ */
unsigned int *__p__winminor(void)
{
return &_winminor;
}
+/*
+ * @implemented
+ */
unsigned int *__p__winver(void)
{
return &_winver;
return 0;
}
+/*
+ * @unimplemented
+ */
int __getmainargs(int* argc, char*** argv, char*** env, int flag)
{
int i, afterlastspace, ignorespace, len;
return 0;
}
+/*
+ * @implemented
+ */
int* __p___argc(void)
{
return &__argc;
}
+/*
+ * @implemented
+ */
char*** __p___argv(void)
{
return &__argv;
#include <msvcrt/stdlib.h>
+/*
+ * @implemented
+ */
void _initterm(void (*fStart[])(void), void (*fEnd[])(void))
{
int i = 0;
typedef int (* _onexit_t)(void);
+/*
+ * @unimplemented
+ */
_onexit_t __dllonexit(_onexit_t func, void (** fStart[])(void), void (** fEnd[])(void))
{
}
+/*
+ * @unimplemented
+ */
_onexit_t _onexit(_onexit_t x)
{
return x;
#include <msvcrt/internal/rterror.h>
+/*
+ * @implemented
+ */
void _purecall(void)
{
_amsg_exit(_RT_PUREVIRT);
#include <msvcrt/internal/file.h>
+/*
+ * @implemented
+ */
int _cwait(int* pnStatus, int hProc, int nAction)
{
DWORD ExitCode;
-/* $Id: _system.c,v 1.6 2002/11/25 17:41:39 robd Exp $
+/* $Id: _system.c,v 1.7 2003/07/11 21:58:09 royce Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
#include <msvcrt/errno.h>
#include <msvcrt/internal/file.h>
+/*
+ * @implemented
+ */
int system(const char *command)
{
char *szCmdLine = NULL;
#include <msvcrt/process.h>
+/*
+ * @implemented
+ */
void* _loaddll(char* name)
{
return LoadLibraryA(name);
}
+/*
+ * @implemented
+ */
int _unloaddll(void* handle)
{
return FreeLibrary(handle);
}
+/*
+ * @implemented
+ */
FARPROC _getdllprocaddr(void* hModule, char* lpProcName, int iOrdinal)
{
if (lpProcName != NULL)
-/* $Id: process.c,v 1.4 2003/03/23 15:18:01 hbirr Exp $ */
+/* $Id: process.c,v 1.5 2003/07/11 21:58:09 royce Exp $ */
#include <msvcrt/process.h>
#include <msvcrt/stdlib.h>
#include <msvcrt/string.h>
return (int)ProcessInformation.hProcess;
}
+/*
+ * @implemented
+ */
int _spawnl(int mode, const char *cmdname, const char* arg0, ...)
{
va_list argp;
return ret;
}
+/*
+ * @implemented
+ */
int _spawnv(int mode, const char *cmdname, char* const* argv)
{
char* args;
return ret;
}
+/*
+ * @implemented
+ */
int _spawnle(int mode, const char *cmdname, const char* arg0, ... /*, NULL, const char* const* envp*/)
{
va_list argp;
}
+/*
+ * @implemented
+ */
int _spawnve(int mode, const char *cmdname, char* const* argv, char* const* envp)
{
char *args;
return ret;
}
+/*
+ * @implemented
+ */
int _spawnvp(int mode, const char* cmdname, char* const* argv)
{
char pathname[FILENAME_MAX];
return _spawnv(mode, find_exec(cmdname, pathname), argv);
}
+/*
+ * @implemented
+ */
int _spawnlp(int mode, const char* cmdname, const char* arg0, .../*, NULL*/)
{
va_list argp;
}
+/*
+ * @implemented
+ */
int _spawnlpe(int mode, const char* cmdname, const char* arg0, .../*, NULL, const char* const* envp*/)
{
va_list argp;
return ret;
}
+/*
+ * @implemented
+ */
int _spawnvpe(int mode, const char* cmdname, char* const* argv, char* const* envp)
{
char pathname[FILENAME_MAX];
return _spawnve(mode, find_exec(cmdname, pathname), argv, envp);
}
+/*
+ * @implemented
+ */
int _execl(const char* cmdname, const char* arg0, ...)
{
char* args;
return ret;
}
+/*
+ * @implemented
+ */
int _execv(const char* cmdname, char* const* argv)
{
DPRINT("_execv('%s')\n", cmdname);
return _spawnv(P_OVERLAY, cmdname, argv);
}
+/*
+ * @implemented
+ */
int _execle(const char* cmdname, const char* arg0, ... /*, NULL, char* const* envp */)
{
va_list argp;
return ret;
}
+/*
+ * @implemented
+ */
int _execve(const char* cmdname, char* const* argv, char* const* envp)
{
DPRINT("_execve('%s')\n", cmdname);
return _spawnve(P_OVERLAY, cmdname, argv, envp);
}
+/*
+ * @implemented
+ */
int _execlp(const char* cmdname, const char* arg0, ...)
{
char* args;
return ret;
}
+/*
+ * @implemented
+ */
int _execvp(const char* cmdname, char* const* argv)
{
DPRINT("_execvp('%s')\n", cmdname);
return _spawnvp(P_OVERLAY, cmdname, argv);
}
+/*
+ * @implemented
+ */
int _execlpe(const char* cmdname, const char* arg0, ... /*, NULL, char* const* envp */)
{
va_list argp;
return ret;
}
+/*
+ * @implemented
+ */
int _execvpe(const char* cmdname, char* const* argv, char* const* envp)
{
DPRINT("_execvpe('%s')\n", cmdname);
#include <windows.h>
#include <msvcrt/process.h>
+/*
+ * @implemented
+ */
int _getpid (void)
{
return (int)GetCurrentProcessId();
-/* $Id: thread.c,v 1.5 2002/11/29 15:59:04 robd Exp $
+/* $Id: thread.c,v 1.6 2003/07/11 21:58:09 royce Exp $
*
*/
#include <windows.h>
#include <msvcrt/process.h>
+/*
+ * @unimplemented
+ */
unsigned long _beginthread(
void (__cdecl *start_address)(void*),
unsigned stack_size,
return (unsigned long)-1;
}
+/*
+ * @unimplemented
+ */
void _endthread(void)
{
}
#include <windows.h>
#include <msvcrt/process.h>
+/*
+ * @implemented
+ */
unsigned long __threadid (void)
{
return GetCurrentThreadId();
}
+/*
+ * @implemented
+ */
void *__threadhandle(void)
{
return GetCurrentThread();
-/* $Id: threadx.c,v 1.2 2003/04/20 19:42:50 gvg Exp $
+/* $Id: threadx.c,v 1.3 2003/07/11 21:58:09 royce Exp $
*
*/
#include <windows.h>
#include <msvcrt/process.h>
+/*
+ * @unimplemented
+ */
unsigned long _beginthreadex(
void* security,
unsigned stack_size,
}
+/*
+ * @implemented
+ */
void _endthreadex(unsigned retval)
{
/*
#include <msvcrt/stdlib.h>
+/*
+ * @implemented
+ */
void *_lfind(const void *key, const void *base, size_t *nelp,
size_t width, int (*compar)(const void *, const void *))
{
#include <msvcrt/stdlib.h>
#include <msvcrt/string.h>
+/*
+ * @implemented
+ */
void *_lsearch(const void *key, void *base, size_t *nelp, size_t width,
int (*compar)(const void *, const void *))
{
int nsignal = 21;
+/*
+ * @implemented
+ */
_p_sig_fn_t signal(int sig, _p_sig_fn_t func)
{
_p_sig_fn_t temp;
}
+/*
+ * @implemented
+ */
int
raise(int sig)
{
}
+/*
+ * @implemented
+ */
int _fcloseall( void )
{
__file_rec *fr = __file_rec_list;
void clearerr(FILE *stream);
#endif
+/*
+ * @implemented
+ */
void
clearerr(FILE *f)
{
// changed check for writable stream
+/*
+ * @implemented
+ */
int
fclose(FILE *f)
{
FILE* __alloc_file(void);
+/*
+ * @implemented
+ */
FILE* _fdopen(int handle, char* mode)
{
FILE* file;
int feof(FILE *stream);
#endif
+/*
+ * @implemented
+ */
int feof(FILE *stream)
{
if (stream == NULL) {
int *_errno(void);
+/*
+ * @implemented
+ */
int ferror(FILE *stream)
{
return stream->_flag & _IOERR;
#include <msvcrt/io.h>
+/*
+ * @implemented
+ */
int fflush(FILE *f)
{
char *base;
return 0;
}
+/*
+ * @implemented
+ */
int _flushall( void )
{
return fflush(NULL);
#include <msvcrt/stdio.h>
#include <msvcrt/internal/file.h>
+/*
+ * @implemented
+ */
int fgetc(FILE *f)
{
return getc(f);
}
+/*
+ * @implemented
+ */
wint_t fgetwc(FILE *f)
{
return getwc(f);
-/* $Id: fgetchar.c,v 1.5 2002/11/24 18:42:24 robd Exp $
+/* $Id: fgetchar.c,v 1.6 2003/07/11 21:58:09 royce Exp $
*
* ReactOS msvcrt library
*
return getc(stdin);
}
+/*
+ * @implemented
+ */
wint_t _fgetwchar(void)
{
return getwc(stdin);
#include <msvcrt/stdio.h>
#include <msvcrt/errno.h>
+/*
+ * @implemented
+ */
int fgetpos(FILE *stream, fpos_t *pos)
{
if (stream && pos)
int _readcnv(int fn, void* buf, size_t siz);
+/*
+ * @implemented
+ */
int _filbuf(FILE* f)
{
int size;
}
#endif
+/*
+ * @implemented
+ */
int _fileno(FILE *f)
{
return f->_file;
int _writecnv(int fn, void* buf, size_t bufsiz);
+/*
+ * @implemented
+ */
int _flsbuf(int c, FILE* f)
{
char* base;
-/* $Id: fopen.c,v 1.7 2002/11/24 18:42:24 robd Exp $
+/* $Id: fopen.c,v 1.8 2003/07/11 21:58:09 royce Exp $
*
* ReactOS msvcrt library
*
return f;
}
+/*
+ * @implemented
+ */
FILE* _wfopen(const wchar_t *file, const wchar_t *mode)
{
FILE *f;
#include <msvcrt/wchar.h>
#include <msvcrt/internal/file.h>
+/*
+ * @implemented
+ */
int
fprintf(register FILE *iop, const char *fmt, ...)
{
return ferror(iop) ? EOF : len;
}
+/*
+ * @implemented
+ */
int
fwprintf(register FILE *iop, const wchar_t *fmt, ...)
{
#include <msvcrt/wchar.h>
#include <msvcrt/internal/file.h>
+/*
+ * @implemented
+ */
int
fputc(int c, FILE *fp)
{
return putc(c, fp);
}
+/*
+ * @implemented
+ */
wint_t
fputwc(wchar_t c, FILE *fp)
{
-/* $Id: fputchar.c,v 1.4 2002/11/24 18:42:24 robd Exp $
+/* $Id: fputchar.c,v 1.5 2003/07/11 21:58:09 royce Exp $
*
* ReactOS msvcrt library
*
return putc(c, stdout);
}
+/*
+ * @implemented
+ */
int _fputwchar(wchar_t c)
{
return putwc(c, stdout);
-/* $Id: fputs.c,v 1.5 2002/11/24 18:42:24 robd Exp $
+/* $Id: fputs.c,v 1.6 2003/07/11 21:58:09 royce Exp $
*
* ReactOS msvcrt library
*
return(r);
}
+/*
+ * @implemented
+ */
int
fputws(const wchar_t* s, FILE* f)
{
#include <msvcrt/internal/file.h>
+/*
+ * @implemented
+ */
size_t fread(void *vptr, size_t size, size_t count, FILE *iop)
{
unsigned char *ptr = (unsigned char *)vptr;
#include <msvcrt/internal/file.h>
+/*
+ * @implemented
+ */
FILE *freopen(const char *file, const char *mode, FILE *f)
{
int fd, rw, oflags=0;
return f;
}
+/*
+ * @implemented
+ */
FILE *_wfreopen(const wchar_t *file, const wchar_t *mode, FILE *f)
{
int fd, rw, oflags=0;
/* Read formatted input from STREAM according to the format string FORMAT. */
/* VARARGS2 */
+/*
+ * @implemented
+ */
int fscanf(FILE *stream,const char *format, ...)
{
va_list arg;
return done;
}
+/*
+ * @implemented
+ */
int
fwscanf(FILE *stream, const wchar_t *fmt, ...)
{
#include <msvcrt/internal/file.h>
+/*
+ * @implemented
+ */
int fseek(FILE *f, long offset, int ptrname)
{
long p = -1; /* can't happen? */
#include <msvcrt/errno.h>
#include <msvcrt/internal/file.h>
+/*
+ * @implemented
+ */
int fsetpos(FILE *stream,const fpos_t *pos)
{
if (stream && pos)
FILE * __alloc_file(void);
+/*
+ * @implemented
+ */
FILE* _fsopen(const char *file, const char *mode, int shflag)
{
FILE *f;
return f;
}
+/*
+ * @implemented
+ */
FILE* _wfsopen(const wchar_t *file, const wchar_t *mode, int shflag)
{
FILE *f;
#include <msvcrt/internal/file.h>
+/*
+ * @implemented
+ */
long ftell(FILE *f)
{
long tres;
#include <msvcrt/msvcrtdbg.h>
+/*
+ * @implemented
+ */
size_t fwrite(const void *vptr, size_t size, size_t count, FILE *iop)
{
size_t to_write, n_written;
-/* $Id: getc.c,v 1.8 2003/01/11 22:40:24 gvg Exp $
+/* $Id: getc.c,v 1.9 2003/07/11 21:58:09 royce Exp $
*
* ReactOS msvcrt library
*
return c;
}
+/*
+ * @implemented
+ */
wint_t getwc(FILE *fp)
{
wint_t c = -1;
-/* $Id: getchar.c,v 1.4 2002/11/24 18:42:24 robd Exp $
+/* $Id: getchar.c,v 1.5 2003/07/11 21:58:09 royce Exp $
*
* ReactOS msvcrt library
*
return getc(stdin);
}
+/*
+ * @implemented
+ */
wint_t
getwchar(void)
{
-/* $Id: gets.c,v 1.4 2002/11/24 18:42:24 robd Exp $
+/* $Id: gets.c,v 1.5 2003/07/11 21:58:09 royce Exp $
*
* ReactOS msvcrt library
*
#define WEOF (wchar_t)(0xFFFF)
#endif
-// Get a line from the stdin stream.
+/*
+ * Get a line from the stdin stream.
+ *
+ * @implemented
+ */
wchar_t* _getws(wchar_t* s)
{
wchar_t c;
#include <msvcrt/stdio.h>
-/* Read a word (int) from STREAM. */
+/*
+ * Read a word (int) from STREAM.
+ *
+ * @implemented
+ */
int _getw(FILE *stream)
{
int w;
void perror(const char *s);
#endif
+/*
+ * @implemented
+ */
void perror(const char *s)
{
fprintf(stderr, "%s: %s\n", s, _strerror(NULL));
}
+/*
+ * @implemented
+ */
void _wperror(const wchar_t *s)
{
fwprintf(stderr, L"%s: %S\n", s, _strerror(NULL));
-/* $Id: popen.c,v 1.4 2002/09/08 10:22:56 chorns Exp $ */
+/* $Id: popen.c,v 1.5 2003/07/11 21:58:09 royce Exp $ */
#include <windows.h>
#include <msvcrt/io.h>
#include <msvcrt/errno.h>
#include <msvcrt/msvcrtdbg.h>
+/*
+ * @implemented
+ */
FILE *_popen (const char *cm, const char *md) /* program name, pipe mode */
{
char *szCmdLine=NULL;
}
+/*
+ * @implemented
+ */
int _pclose (FILE *pp)
{
fclose(pp);
}
+/*
+ * @implemented
+ */
FILE *_wpopen (const wchar_t *cm, const wchar_t *md) /* program name, pipe mode */
{
wchar_t *szCmdLine=NULL;
#include <msvcrt/wchar.h>
+/*
+ * @implemented
+ */
int printf(const char* format, ...)
{
va_list arg;
return done;
}
+/*
+ * @implemented
+ */
int wprintf(const wchar_t* format, ...)
{
va_list arg;
-/* $Id: putc.c,v 1.7 2002/12/08 16:14:28 robd Exp $
+/* $Id: putc.c,v 1.8 2003/07/11 21:58:09 royce Exp $
*
* ReactOS msvcrt library
*
}
//wint_t putwc(wint_t c, FILE* fp)
+/*
+ * @implemented
+ */
int putwc(wint_t c, FILE* fp)
{
// valid stream macro should check that fp is dword aligned
#undef putwc
#undef putwchar
+/*
+ * @implemented
+ */
int putchar(int c)
{
int r = putc(c, stdout);
return r;
}
+/*
+ * @implemented
+ */
wint_t putwchar(wint_t c)
{
wint_t r = putwc(c, stdout);
#undef putwchar
+/*
+ * @implemented
+ */
int puts(const char *s)
{
int c;
return putchar('\n');
}
+/*
+ * @implemented
+ */
int _putws(const wchar_t *s)
{
wint_t c;
#include <msvcrt/stdio.h>
-/* Write the word (int) W to STREAM. */
+/*
+ * Write the word (int) W to STREAM.
+ *
+ * @implemented
+ */
int _putw(int w,FILE *stream)
{
/* Is there a better way? */
#define NDEBUG
#include <msvcrt/msvcrtdbg.h>
+/*
+ * @implemented
+ */
int remove(const char *fn)
{
int result = 0;
return result;
}
+/*
+ * @implemented
+ */
int _wremove(const wchar_t *fn)
{
DPRINT("_wremove('%S')\n", fn);
#include <msvcrt/io.h>
+/*
+ * @implemented
+ */
int rename(const char* old_, const char* new_)
{
if (old_ == NULL || new_ == NULL)
#include <msvcrt/internal/file.h>
+/*
+ * @implemented
+ */
void rewind(FILE *f)
{
fflush(f);
/* Read formatted input from stdin according to the format string FORMAT. */
/* VARARGS1 */
+/*
+ * @implemented
+ */
int scanf(const char *format, ...)
{
va_list arg;
return done;
}
+/*
+ * @implemented
+ */
int
wscanf(const wchar_t *fmt, ...)
{
#include <msvcrt/stdlib.h>
#include <msvcrt/internal/file.h>
+/*
+ * @implemented
+ */
void setbuf(FILE *f, char *buf)
{
if (buf)
#include <msvcrt/internal/file.h>
+/*
+ * @implemented
+ */
int setvbuf(FILE *f, char *buf, int type, size_t len)
{
int mine=0;
#undef sprintf
#undef wsprintf
+/*
+ * @implemented
+ */
int
sprintf(char *str, const char *fmt, ...)
{
return done;
}
+/*
+ * @implemented
+ */
int
swprintf(wchar_t *str, const wchar_t *fmt, ...)
{
/* Write formatted output into S, according to the format
string FORMAT, writing no more than MAXLEN characters. */
/* VARARGS3 */
+/*
+ * @implemented
+ */
int
_snprintf (char *s, size_t maxlen,const char *format, ...)
{
return done;
}
+/*
+ * @implemented
+ */
int
_snwprintf (wchar_t *s, size_t maxlen,const wchar_t *format, ...)
{
/* Read formatted input from S, according to the format string FORMAT. */
/* VARARGS2 */
+/*
+ * @implemented
+ */
int sscanf (const char *s,const char *format, ...)
{
va_list arg;
return done;
}
+/*
+ * @implemented
+ */
int swscanf(const wchar_t *str, const wchar_t *fmt, ...)
{
va_list arg;
}
};
+/*
+ * @implemented
+ */
FILE *__p__iob(void)
{
return &_iob[0];
#include <msvcrt/stdlib.h>
+/*
+ * @implemented
+ */
char* _tempnam(const char* dir,const char* prefix)
{
char* TempFileName = malloc(MAX_PATH);
FILE * __alloc_file(void);
+/*
+ * @implemented
+ */
FILE *
tmpfile(void)
{
#include <msvcrt/string.h>
+/*
+ * @implemented
+ */
char* tmpnam(char* s)
{
char PathName[MAX_PATH];
#include <msvcrt/internal/file.h>
+/*
+ * @implemented
+ */
int ungetc(int c, FILE *f)
{
if (!__validfp (f) || !OPEN4READING(f)) {
}
+/*
+ * @implemented
+ */
wint_t
ungetwc(wchar_t c, FILE *f)
{
int __vfprintf(FILE*, const char*, va_list);
+/*
+ * @implemented
+ */
int vfprintf(FILE* f, const char* fmt, va_list ap)
{
int len;
__vfwprintf(FILE *fp, const wchar_t *fmt0, va_list argp);
+/*
+ * @implemented
+ */
int
vfwprintf(FILE *f, const wchar_t *fmt, va_list ap)
{
#ifndef _USE_VARARG_
+/*
+ * @implemented
+ */
int vprintf(const char* format, va_list arg)
{
int ret;
return ret;
}
+/*
+ * @implemented
+ */
int vwprintf(const wchar_t* format, va_list arg)
{
int ret;
#include <limits.h>
#include <msvcrt/internal/file.h>
+/*
+ * @implemented
+ */
int
vsprintf(char *str, const char *fmt, va_list ap)
{
return len;
}
+/*
+ * @implemented
+ */
int
vswprintf(wchar_t *str, const wchar_t *fmt, va_list ap)
{
}
+/*
+ * @implemented
+ */
int
_vsnprintf(char *str, size_t maxlen, const char *fmt, va_list ap)
{
return len;
}
+/*
+ * @implemented
+ */
int
_vsnwprintf(wchar_t *str, size_t maxlen, const wchar_t *fmt, va_list ap)
{
FILE* __alloc_file(void);
+/*
+ * @implemented
+ */
FILE* _wfdopen(int handle, wchar_t* mode)
{
FILE* file;
#include <msvcrt/io.h>
+/*
+ * @implemented
+ */
int _wrename(const wchar_t* old_, const wchar_t* new_)
{
if (old_ == NULL || new_ == NULL)
#include <msvcrt/stdlib.h>
+/*
+ * @implemented
+ */
wchar_t* _wtempnam(const wchar_t* dir, const wchar_t* prefix)
{
wchar_t* TempFileName = malloc(MAX_PATH);
#include <msvcrt/string.h>
+/*
+ * @implemented
+ */
wchar_t* _wtmpnam(wchar_t* s)
{
wchar_t PathName[MAX_PATH];
struct __atexit *__atexit_ptr = 0;
+/*
+ * @implemented
+ */
void exit(int status)
{
//int i;
}
+/*
+ * @implemented
+ */
void _exit(int _status)
{
ExitProcess(_status);
for(;;);
}
+/*
+ * @unimplemented
+ */
void _cexit( void )
{
// flush
}
+/*
+ * @unimplemented
+ */
void _c_exit( void )
{
// reset interup vectors
char *msg ="Abort\n\r";
+/*
+ * @implemented
+ */
void abort()
{
fflush(NULL);
#include <msvcrt/stdlib.h>
#include <msvcrt/crttypes.h>
+/*
+ * @implemented
+ */
int
abs(int j)
{
#include <msvcrt/stdlib.h>
#include <msvcrt/internal/atexit.h>
+/*
+ * @implemented
+ */
int
atexit(void (*a)(void))
{
/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
#include <msvcrt/stdlib.h>
+/*
+ * @implemented
+ */
double
atof(const char *ascii)
{
/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
#include <msvcrt/stdlib.h>
+/*
+ * @implemented
+ */
int
atoi(const char *str)
{
#include <msvcrt/ctype.h>
#include <msvcrt/stdlib.h>
+/*
+ * @implemented
+ */
__int64
_atoi64(const char *nptr)
{
/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
#include <msvcrt/stdlib.h>
+/*
+ * @implemented
+ */
long
atol(const char *str)
{
/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
#include <msvcrt/stdlib.h>
+/*
+ * @implemented
+ */
void *
bsearch(const void *key, const void *base0, size_t nelem,
size_t size, int (*cmp)(const void *ck, const void *ce))
/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
#include <msvcrt/stdlib.h>
+/*
+ * @implemented
+ */
div_t
div(int num, int denom)
{
char *ecvtbuf (double, int, int *, int *, char *);
+/*
+ * @implemented
+ */
char *
_ecvt (double value, int ndigits, int *decpt, int *sign)
{
-/* $Id: errno.c,v 1.8 2002/09/08 10:22:57 chorns Exp $
+/* $Id: errno.c,v 1.9 2003/07/11 21:58:09 royce Exp $
*
*/
#include <msvcrt/internal/tls.h>
#include <msvcrt/internal/file.h>
+/*
+ * @implemented
+ */
int* __doserrno(void)
{
return(&GetThreadData()->tdoserrno);
}
+/*
+ * @implemented
+ */
int *_errno(void)
{
return(&GetThreadData()->terrno);
char *fcvtbuf (double, int, int *, int *, char *);
+/*
+ * @implemented
+ */
char *
_fcvt (double value, int ndigits, int *decpt, int *sign)
{
#include <msvcrt/stdlib.h>
+/*
+ * @implemented
+ */
char* _fullpath(char* absPath, const char* relPath, size_t maxLength)
{
char* lpFilePart;
#include <msvcrt/stdio.h>
#include <msvcrt/string.h>
+/*
+ * @implemented
+ */
char *
_gcvt (double value, int ndigits, char *buf)
{
#include <msvcrt/msvcrtdbg.h>
+/*
+ * @implemented
+ */
char *getenv(const char *name)
{
char *buffer = (char*)0xffffffff;
return buffer;
}
+/*
+ * @implemented
+ */
wchar_t *_wgetenv(const wchar_t *name)
{
wchar_t *buffer = (wchar_t*)0xffffffff;
#include <msvcrt/internal/file.h>
+/*
+ * @implemented
+ */
char* _itoa(int value, char* string, int radix)
{
char tmp[33];
return string;
}
+/*
+ * @implemented
+ */
char* _ltoa(long value, char* string, int radix)
{
char tmp[33];
return string;
}
+/*
+ * @implemented
+ */
char* _ultoa(unsigned long value, char* string, int radix)
{
char tmp[33];
-/* $Id: itow.c,v 1.5 2002/11/24 18:42:25 robd Exp $
+/* $Id: itow.c,v 1.6 2003/07/11 21:58:09 royce Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
#include <msvcrt/internal/file.h>
+/*
+ * @implemented
+ */
wchar_t* _itow(int value, wchar_t* string, int radix)
{
wchar_t tmp [33];
return string;
}
+/*
+ * @implemented
+ */
wchar_t* _ltow(long value, wchar_t* string, int radix)
{
wchar_t tmp [33];
return string;
}
+/*
+ * @unimplemented
+ */
wchar_t* _ultow(unsigned long value, wchar_t* string, int radix)
{
wchar_t tmp [33];
#include <msvcrt/stdlib.h>
#include <msvcrt/crttypes.h>
+/*
+ * @implemented
+ */
long
labs(long j)
{
/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
#include <msvcrt/stdlib.h>
+/*
+ * @implemented
+ */
ldiv_t
ldiv(long num, long denom)
{
-/* $Id: makepath.c,v 1.10 2002/11/24 18:42:25 robd Exp $
+/* $Id: makepath.c,v 1.11 2003/07/11 21:58:09 royce Exp $
*/
#include <msvcrt/stdlib.h>
#include <msvcrt/string.h>
+/*
+ * @implemented
+ */
void _makepath(char* path, const char* drive, const char* dir, const char* fname, const char* ext)
{
int dir_len;
return old_handler;
}
+/*
+ * @implemented
+ */
void* malloc(size_t _size)
{
return HeapAlloc(hHeap, HEAP_ZERO_MEMORY, _size);
}
+/*
+ * @implemented
+ */
void free(void* _ptr)
{
HeapFree(hHeap,0,_ptr);
}
+/*
+ * @implemented
+ */
void* calloc(size_t _nmemb, size_t _size)
{
return HeapAlloc(hHeap, HEAP_ZERO_MEMORY, _nmemb*_size);
}
+/*
+ * @implemented
+ */
void* realloc(void* _ptr, size_t _size)
{
return HeapReAlloc(hHeap, 0, _ptr, _size);
#include <msvcrt/stdlib.h>
#if 1
+/*
+ * @unimplemented
+ */
size_t mbstowcs(wchar_t* wcstr, const char* mbstr, size_t count)
{
size_t size;
#if 1
+/*
+ * @implemented
+ */
int mbtowc(wchar_t *dst, const char *str, size_t n)
{
// printf("\t\t\tmbtowc(%p, %p, %d) called.\n", dst, str, n);
VOID STDCALL Sleep(DWORD dwMilliseconds);
UINT STDCALL SetErrorMode(UINT uMode);
+/*
+ * @implemented
+ */
void _seterrormode(int nMode)
{
SetErrorMode(nMode);
return;
}
+/*
+ * @implemented
+ */
void _beep(unsigned nFreq, unsigned nDur)
{
Beep(nFreq,nDur);
return;
}
+/*
+ * @implemented
+ */
void _sleep(unsigned long ulTime)
{
Sleep(ulTime);
extern int BlockEnvToEnviron(); // defined in misc/dllmain.c
+/*
+ * @implemented
+ */
int _putenv(const char* val)
{
char* buffer;
* First, set up some global parameters for qst to share. Then, quicksort
* with qst(), and then a cleanup insertion sort ourselves. Sound simple?
* It's not...
+ *
+ * @implemented
*/
void
qsort(const void *base0, size_t n, size_t size, _pfunccmp_t compar)
#include <msvcrt/stdlib.h>
#include <msvcrt/internal/tls.h>
+/*
+ * @implemented
+ */
int
rand(void)
{
return (int)((ThreadData->tnext >> 16) & RAND_MAX);
}
+/*
+ * @implemented
+ */
void
srand(unsigned int seed)
{
#include <msvcrt/stdlib.h>
#include <msvcrt/crttypes.h>
+/*
+ * @implemented
+ */
unsigned int _rotl( unsigned int value, int shift )
{
int max_bits = sizeof(unsigned int)<<3;
return (value << shift) | (value >> (max_bits-shift));
}
+/*
+ * @implemented
+ */
unsigned int _rotr( unsigned int value, int shift )
{
int max_bits = sizeof(unsigned int)<<3;
}
+/*
+ * @implemented
+ */
unsigned long _lrotl( unsigned long value, int shift )
{
int max_bits = sizeof(unsigned long)<<3;
return (value << shift) | (value >> (max_bits-shift));
}
+/*
+ * @implemented
+ */
unsigned long _lrotr( unsigned long value, int shift )
{
int max_bits = sizeof(unsigned long)<<3;
#include <msvcrt/msvcrtdbg.h>
+/*
+ * @implemented
+ */
void _searchenv(const char* file,const char* var,char* path)
{
char* env = getenv(var);
#include <msvcrt/string.h>
+/*
+ * @implemented
+ */
void _splitpath(const char* path, char* drive, char* dir, char* fname, char* ext)
{
char* tmp_drive;
#include <msvcrt/stdlib.h>
+/*
+ * @implemented
+ */
double
strtod(const char *s, char **sret)
{
#include <msvcrt/stdlib.h>
+/*
+ * @implemented
+ */
long
strtol(const char *nptr, char **endptr, int base)
{
*
* Ignores `locale' stuff. Assumes that the upper and lower case
* alphabets and digits are each contiguous.
+ *
+ * @implemented
*/
unsigned long
strtoul(const char *nptr, char **endptr, int base)
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
#include <msvcrt/stdlib.h>
+/*
+ * @implemented
+ */
void _swab (const char* caFrom, char* caTo, size_t sizeToCopy)
{
unsigned long temp;
#include <msvcrt/stdlib.h>
+/*
+ * @implemented
+ */
double wcstod(const wchar_t *s, wchar_t **sret)
{
long double r; /* result */
#include <msvcrt/stdlib.h>
+/*
+ * @implemented
+ */
long wcstol(const wchar_t *cp,wchar_t **endp,int base)
{
long result = 0,value;
#include <msvcrt/stdlib.h>
+/*
+ * @unimplemented
+ */
size_t wcstombs (char* mbsDest, const wchar_t* wsConvert, size_t size)
{
return 0;
}
+/*
+ * @unimplemented
+ */
int wctomb (char* mbDest, wchar_t wc)
{
return 0;
size_t
__wcrtomb (char *s, wchar_t wc);
-/* Convert WCHAR into its multibyte character representation,
- putting this in S and returning its length.
-
- Attention: this function should NEVER be intentionally used.
- The interface is completely stupid. The state is shared between
- all conversion functions. You should use instead the restartable
- version `wcrtomb'. */
+/*
+ * Convert WCHAR into its multibyte character representation,
+ * putting this in S and returning its length.
+ *
+ * Attention: this function should NEVER be intentionally used.
+ * The interface is completely stupid. The state is shared between
+ * all conversion functions. You should use instead the restartable
+ * version `wcrtomb'.
+ *
+ * @implemented
+ */
int
wctomb (char *s, wchar_t wchar)
{
size_t
__wcsrtombs (char *dst, const wchar_t **src, size_t len, mbstate_t *ps);
-/* Convert the `wchar_t' string in PWCS to a multibyte character string
- in S, writing no more than N characters. Return the number of bytes
- written, or (size_t) -1 if an invalid `wchar_t' was found.
-
- Attention: this function should NEVER be intentionally used.
- The interface is completely stupid. The state is shared between
- all conversion functions. You should use instead the restartable
- version `wcsrtombs'. */
+/*
+ * Convert the `wchar_t' string in PWCS to a multibyte character string
+ * in S, writing no more than N characters. Return the number of bytes
+ * written, or (size_t) -1 if an invalid `wchar_t' was found.
+ *
+ * Attention: this function should NEVER be intentionally used.
+ * The interface is completely stupid. The state is shared between
+ * all conversion functions. You should use instead the restartable
+ * version `wcsrtombs'.
+ *
+ * @implemented
+ */
size_t
wcstombs (char *s, const wchar_t *pwcs, size_t n)
{
*
* Ignores `locale' stuff. Assumes that the upper and lower case
* alphabets and digits are each contiguous.
+ *
+ * @implemented
*/
unsigned long
wcstoul(const wchar_t *nptr, wchar_t **endptr, int base)
LPBOOL lpUsedDefaultChar);
+/*
+ * @unimplemented
+ */
int wctomb(char* dst, wchar_t ch)
{
#if 0
#include <msvcrt/stdlib.h>
+/*
+ * @implemented
+ */
wchar_t* _wfullpath(wchar_t* absPath, const wchar_t* relPath, size_t maxLength)
{
wchar_t* lpFilePart;
#include <msvcrt/internal/file.h>
+/*
+ * @implemented
+ */
char* _i64toa(__int64 value, char* string, int radix)
{
char tmp[65];
return string;
}
+/*
+ * @implemented
+ */
char* _ui64toa(unsigned __int64 value, char* string, int radix)
{
char tmp[65];
-/* $Id: witow.c,v 1.2 2002/12/05 15:30:45 robd Exp $
+/* $Id: witow.c,v 1.3 2003/07/11 21:58:09 royce Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
#include <msvcrt/internal/file.h>
+/*
+ * @implemented
+ */
wchar_t* _i64tow(__int64 value, wchar_t* string, int radix)
{
wchar_t tmp[65];
return string;
}
+/*
+ * @implemented
+ */
wchar_t* _ui64tow(unsigned __int64 value, wchar_t* string, int radix)
{
wchar_t tmp[65];
-/* $Id: wmakpath.c,v 1.1 2002/11/24 18:42:25 robd Exp $
+/* $Id: wmakpath.c,v 1.2 2003/07/11 21:58:09 royce Exp $
*/
#include <msvcrt/stdlib.h>
#include <msvcrt/string.h>
+/*
+ * @implemented
+ */
void _wmakepath(wchar_t* path, const wchar_t* drive, const wchar_t* dir, const wchar_t* fname, const wchar_t* ext)
{
int dir_len;
extern int BlockEnvToEnviron(); // defined in misc/dllmain.c
+/*
+ * @implemented
+ */
int _wputenv(const wchar_t* val)
{
wchar_t* buffer;
#include <msvcrt/msvcrtdbg.h>
+/*
+ * @implemented
+ */
void _wsearchenv(const wchar_t* file,const wchar_t* var,wchar_t* path)
{
wchar_t* env = _wgetenv(var);
#include <msvcrt/string.h>
+/*
+ * @implemented
+ */
void _wsplitpath(const wchar_t* path, wchar_t* drive, wchar_t* dir, wchar_t* fname, wchar_t* ext)
{
wchar_t* tmp_drive;
#include <msvcrt/stdlib.h>
+/*
+ * @implemented
+ */
int _wtoi( const wchar_t *str )
{
return (int)wcstol(str, 0, 10);
}
+/*
+ * @implemented
+ */
long _wtol( const wchar_t *str )
{
return (int)wcstol(str, 0, 10);
#include <msvcrt/stdlib.h>
+/*
+ * @implemented
+ */
__int64 _wtoi64(const wchar_t* nptr)
{
wchar_t* s = (wchar_t*)nptr;
#include <msvcrt/ctype.h>
#include <msvcrt/string.h>
+/*
+ * @implemented
+ */
int
_memicmp(const void *s1, const void *s2, size_t n)
{
less than, equal to or greater than the collated form of S2. */
#if 1
+/*
+ * @unimplemented
+ */
int strcoll(const char* s1, const char* s2)
{
return strcmp(s1, s2);
}
+/*
+ * @unimplemented
+ */
int _stricoll(const char* s1, const char* s2)
{
return _stricmp(s1, s2);
#include <msvcrt/stdlib.h>
+/*
+ * @implemented
+ */
char *_strdup(const char *_s)
{
char *rv;
int* _sys_nerr = &__sys_nerr;
+/*
+ * @implemented
+ */
char *strerror(int errnum)
{
static char ebuf[40]; /* 64-bit number + slop */
}
+/*
+ * @implemented
+ */
char *_strerror(const char *s)
{
if ( s == NULL )
#include <msvcrt/string.h>
#include <msvcrt/ctype.h>
+/*
+ * @implemented
+ */
int
_stricmp(const char *s1, const char *s2)
{
return toupper(*(unsigned const char *)s1) - toupper(*(unsigned const char *)(s2));
}
+/*
+ * @implemented
+ */
int
_strcmpi(const char *s1, const char *s2)
{
#include <msvcrt/string.h>
#include <msvcrt/ctype.h>
+/*
+ * @implemented
+ */
char * _strlwr(char *x)
{
char *y=x;
less than, equal to or greater than the collated form of S2. */
+/*
+ * @unimplemented
+ */
int _strncoll(const char* s1, const char* s2, size_t c)
{
return strncmp(s1, s2, c);
}
+/*
+ * @unimplemented
+ */
int _strnicoll(const char* s1, const char* s2, size_t c)
{
return _strnicmp(s1, s2, c);
#include <msvcrt/string.h>
#include <msvcrt/ctype.h>
+/*
+ * @implemented
+ */
int _strnicmp(const char *s1, const char *s2, size_t n)
{
#include <msvcrt/string.h>
+/*
+ * @implemented
+ */
char *
strpbrk(const char *s1, const char *s2)
{
#include <msvcrt/string.h>
+/*
+ * @implemented
+ */
char * _strrev(char *s)
{
char a, *b, *e;
#include <msvcrt/stdlib.h>
#include <msvcrt/crttypes.h>
+/*
+ * @implemented
+ */
char* _strnset (char* szToFill, int szFill, size_t sizeMaxFill)
{
char *t = szToFill;
return t;
}
+/*
+ * @implemented
+ */
char* _strset (char* szToFill, int szFill)
{
char *t = szToFill;
#include <msvcrt/string.h>
+/*
+ * @implemented
+ */
char *strstr(const char *s, const char *find)
{
char c, sc;
#include <msvcrt/string.h>
#include <msvcrt/internal/tls.h>
+/*
+ * @implemented
+ */
char* strtok(char* s, const char* delim)
{
const char *spanp;
#include <msvcrt/string.h>
#include <msvcrt/ctype.h>
+/*
+ * @implemented
+ */
char *_strupr(char *x)
{
char *y=x;
#include <msvcrt/string.h>
#if 1
+/*
+ * @implemented
+ */
size_t strxfrm( char *dest, const char *src, size_t n )
{
strncpy(dest, src, n);
-/* $Id: fstat.c,v 1.14 2002/11/29 15:59:05 robd Exp $
+/* $Id: fstat.c,v 1.15 2003/07/11 21:58:09 royce Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
#include <msvcrt/internal/file.h>
+/*
+ * @implemented
+ */
int _fstat(int fd, struct stat* statbuf)
{
BY_HANDLE_FILE_INFORMATION FileInformation;
-/* $Id: fstati64.c,v 1.1 2002/11/24 18:42:25 robd Exp $
+/* $Id: fstati64.c,v 1.2 2003/07/11 21:58:16 royce Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
#include <msvcrt/internal/file.h>
+/*
+ * @implemented
+ */
__int64 _fstati64(int fd, struct _stati64* statbuf)
{
BY_HANDLE_FILE_INFORMATION FileInformation;
#include <msvcrt/internal/file.h>
+/*
+ * @implemented
+ */
int _futime (int nHandle, struct _utimbuf *pTimes)
{
FILETIME LastAccessTime;
#include <msvcrt/internal/file.h>
+/*
+ * @implemented
+ */
int _stat(const char* path, struct stat* buffer)
{
WIN32_FILE_ATTRIBUTE_DATA fileAttributeData;
return 0;
}
+/*
+ * @implemented
+ */
__int64 _stati64 (const char *path, struct _stati64 *buffer)
{
WIN32_FILE_ATTRIBUTE_DATA fileAttributeData;
#include <msvcrt/internal/file.h>
+/*
+ * @implemented
+ */
int _wstat (const wchar_t *path, struct stat *buffer)
{
WIN32_FILE_ATTRIBUTE_DATA fileAttributeData;
return 0;
}
+/*
+ * @implemented
+ */
__int64 _wstati64 (const wchar_t *path, struct _stati64 *buffer)
{
WIN32_FILE_ATTRIBUTE_DATA fileAttributeData;
VOID STDCALL GetSystemTimeAsFileTime(LPFILETIME lpSystemTimeAsFileTime );
+/*
+ * @implemented
+ */
clock_t clock ( void )
{
FILETIME CreationTime;
(void) tzparse(GMT, sp, TRUE);
}
+/*
+ * @implemented
+ */
void
_tzset(void)
{
tmp->tm_zone = (char *)&sp->chars[ttisp->tt_abbrind];
}
+/*
+ * @implemented
+ */
struct tm *
localtime(const time_t * CPP_CONST timep)
{
}
}
+/*
+ * @implemented
+ */
struct tm *
gmtime(const time_t * CPP_CONST timep)
{
** A la X3J11
*/
+/*
+ * @implemented
+ */
char *
asctime(const struct tm *timeptr)
{
return result;
}
+/*
+ * @implemented
+ */
char *
ctime(const time_t * CPP_CONST timep)
{
return WRONG;
}
+/*
+ * @implemented
+ */
time_t
mktime(struct tm * tmp)
{
/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
#include <msvcrt/time.h>
+/*
+ * @implemented
+ */
double
difftime(time_t time1, time_t time0)
{
#include <msvcrt/internal/file.h>
+/*
+ * @implemented
+ */
char* _strdate(const char* datestr)
{
time_t t;
return gsize;
}
+/*
+ * @implemented
+ */
size_t
strftime(char *s, size_t maxsize, const char *format, const struct tm *t)
{
return 0;
}
+/*
+ * @implemented
+ */
size_t wcsftime(wchar_t* s, size_t maxsize, const wchar_t* format, const struct tm* t)
{
char *x;
#include <msvcrt/internal/file.h>
+/*
+ * @implemented
+ */
char* _strtime(char* buf)
{
time_t t;
VOID STDCALL GetSystemTimeAsFileTime(LPFILETIME lpSystemTimeAsFileTime);
+/*
+ * @implemented
+ */
time_t time(time_t* t)
{
FILETIME SystemTime;
#include "tzfile.h"
+/*
+ * @implemented
+ */
wchar_t* _wasctime(const struct tm* timeptr)
{
#ifdef __GNUC__
}
+/*
+ * @implemented
+ */
wchar_t* _wctime(const time_t* const timep)
{
return _wasctime(localtime(timep));
#include <msvcrt/internal/file.h>
+/*
+ * @implemented
+ */
wchar_t* _wstrdate(const wchar_t* datestr)
{
time_t t;
#include <msvcrt/internal/file.h>
+/*
+ * @implemented
+ */
wchar_t* _wstrtime(wchar_t* buf)
{
time_t t;
#include <msvcrt/string.h>
+/*
+ * @unimplemented
+ */
int wcscoll(const wchar_t *a1,const wchar_t *a2)
{
/* FIXME: handle collates */
return wcscmp(a1,a2);
}
+/*
+ * @unimplemented
+ */
int _wcsicoll(const wchar_t *a1,const wchar_t *a2)
{
/* FIXME: handle collates */
return _wcsicmp(a1,a2);
}
+/*
+ * @unimplemented
+ */
int _wcsncoll (const wchar_t *s1, const wchar_t *s2, size_t c)
{
/* FIXME: handle collates */
return wcsncmp(s1,s2,c);
}
+/*
+ * @unimplemented
+ */
int _wcsnicoll (const wchar_t *s1, const wchar_t *s2, size_t c)
{
/* FIXME: handle collates */
#include <msvcrt/string.h>
+/*
+ * @implemented
+ */
size_t wcscspn(const wchar_t *str,const wchar_t *reject)
{
wchar_t *s;
#include <msvcrt/internal/file.h>
+/*
+ * @implemented
+ */
wchar_t* _wcsdup(const wchar_t* ptr)
{
wchar_t* dup;
#include <msvcrt/string.h>
+/*
+ * @implemented
+ */
int _wcsicmp(const wchar_t* cs,const wchar_t * ct)
{
while (towlower(*cs) == towlower(*ct))
#include <msvcrt/wchar.h>
+/*
+ * @implemented
+ */
wchar_t * _wcslwr(wchar_t *x)
{
wchar_t *y=x;
#include <msvcrt/wchar.h>
+/*
+ * @implemented
+ */
int _wcsnicmp (const wchar_t *cs, const wchar_t *ct, size_t count)
{
if (count == 0)
#include <msvcrt/string.h>
+/*
+ * @implemented
+ */
wchar_t *wcspbrk(const wchar_t *s1, const wchar_t *s2)
{
const wchar_t *scanp;
#include <msvcrt/string.h>
+/*
+ * @implemented
+ */
wchar_t * _wcsrev(wchar_t *s)
{
wchar_t *e;
#include <msvcrt/string.h>
+/*
+ * @implemented
+ */
wchar_t* _wcsnset (wchar_t* wsToFill, wchar_t wcFill, size_t sizeMaxFill)
{
wchar_t *t = wsToFill;
return t;
}
+/*
+ * @implemented
+ */
wchar_t* _wcsset (wchar_t* wsToFill, wchar_t wcFill)
{
wchar_t *t = wsToFill;
#include <msvcrt/string.h>
+/*
+ * @implemented
+ */
size_t wcsspn(const wchar_t *str,const wchar_t *accept)
{
wchar_t *s;
#include <msvcrt/string.h>
+/*
+ * @implemented
+ */
wchar_t *wcsstr(const wchar_t *s,const wchar_t *b)
{
wchar_t *x;
#include <msvcrt/string.h>
#include <msvcrt/internal/tls.h>
+/*
+ * @implemented
+ */
wchar_t *wcstok(wchar_t *s, const wchar_t *ct)
{
const wchar_t *spanp;
#include <msvcrt/ctype.h>
#include <msvcrt/string.h>
+/*
+ * @implemented
+ */
wchar_t *_wcsupr(wchar_t *x)
{
wchar_t *y = x;
#include <msvcrt/string.h>
+/*
+ * @implemented
+ */
size_t wcsxfrm(wchar_t *dst,const wchar_t *src, size_t n)
{
size_t r = 0;