#include <msvcrt/stdlib.h>
-char *_cgets(char *string)
+/*
+ * @implemented
+ */
+char* _cgets(char *string)
{
unsigned len = 0;
unsigned int maxlen_wanted;
#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;
// FIXME PeekCosoleInput 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_dll = _ctype + 1;
+/*
+ * @implemented
+ */
int _isctype(unsigned int c, int ctypeFlags)
{
return (_pctype_dll[(unsigned char)(c & 0xFF)] & ctypeFlags);
}
+/*
+ * @implemented
+ */
int iswctype(wint_t wc, wctype_t wctypeFlags)
{
return (_pwctype_dll[(unsigned char)(wc & 0xFF)] & wctypeFlags);
}
// obsolete
+/*
+ * @implemented
+ */
int is_wctype(wint_t wc, wctype_t wctypeFlags)
{
return (_pwctype_dll[(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
+ */
wchar_t towlower(wchar_t c)
{
if (iswctype (c, _UPPER))
return(c);
}
+/*
+ * @implemented
+ */
int _tolower(int c)
{
if (_isctype (c, _UPPER))
#undef toupper
+/*
+ * @implemented
+ */
int toupper(int c)
{
if (_isctype (c, _LOWER))
}
#undef towupper
+/*
+ * @implemented
+ */
wchar_t towupper(wchar_t c)
{
if (iswctype (c, _LOWER))
return(c);
}
+/*
+ * @implemented
+ */
int _toupper(int c)
{
if (_isctype (c, _LOWER))
#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))
#ifdef __GNUC__
+/*
+ * @unimplemented
+ */
int _abnormal_termination(void)
{
printf("Abnormal Termination\n");
}
+/*
+ * @unimplemented
+ */
EXCEPTION_DISPOSITION
_except_handler2(
struct _EXCEPTION_RECORD* ExceptionRecord, void* Frame,
} ;
+/*
+ * @unimplemented
+ */
int _matherr(struct _exception* e)
{
return 0;
#define _FPIEEE_RECORD void
+/*
+ * @unimplemented
+ */
int _fpieee_flt(
unsigned long exception_code,
struct _EXCEPTION_POINTERS* ExceptionPointer,
#include <windows.h>
#define PEXCEPTION_FRAME void*
+/*
+ * @unimplemented
+ */
void _global_unwind2( PEXCEPTION_FRAME frame )
{
//RtlUnwind( frame, 0, NULL, 0 );
}
+/*
+ * @unimplemented
+ */
void _local_unwind2( PEXCEPTION_FRAME endframe, DWORD nr )
{
//TRACE(crtdll,"(%p,%ld)\n",endframe,nr);
#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>
+/*
+ * @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/io.h>
#include <msvcrt/fcntl.h>
+/*
+ * @implemented
+ */
int _creat(const char *filename, int mode)
{
return open(filename,_O_CREAT|_O_TRUNC,mode);
-/* $Id: dup.c,v 1.7 2002/11/24 18:42:13 robd Exp $ */
+/* $Id: dup.c,v 1.8 2003/07/11 17:25:16 royce Exp $ */
#include <windows.h>
#include <msvcrt/io.h>
#include <msvcrt/internal/file.h>
int __fileno_alloc(HANDLE hFile, int mode);
int __fileno_getmode(int _fd);
+/*
+ * @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 )
{
int cur_pos = _lseek(_fd, 0, SEEK_CUR);
#include <msvcrt/io.h>
+/*
+ * @implemented
+ */
long _filelength(int _fd)
{
return GetFileSize(_get_osfhandle(_fd),NULL);
#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;
#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 _llseek((HFILE)filehnd(_fildes),_offset,_whence);
#include <msvcrt/msvcrtdbg.h>
+/*
+ * @implemented
+ */
char* _mktemp (char *_template)
{
static int count = 0;
-/* $Id: open.c,v 1.13 2002/11/24 18:42:13 robd Exp $
+/* $Id: open.c,v 1.14 2003/07/11 17:25:16 royce Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
return (!((p)->_flag&_IOSTRG) && (fileno_modes[(p)->_file].mode&O_TEXT));
}
+/*
+ * @implemented
+ */
int _open(const char* _path, int _oflag,...)
{
HANDLE hFile;
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.4 2002/11/24 18:42:13 robd Exp $
+/* $Id: pipe.c,v 1.5 2003/07/11 17:25:16 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.9 2002/11/24 18:42:13 robd Exp $
+/* $Id: read.c,v 1.10 2003/07/11 17:25:16 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;
-/* $Id: setmode.c,v 1.6 2002/11/29 15:59:00 robd Exp $
+/* $Id: setmode.c,v 1.7 2003/07/11 17:25:16 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);
unsigned _unMode_dll = 022;
+/*
+ * @implemented
+ */
unsigned _umask (unsigned unMode)
{
unsigned old_mask = _unMode_dll;
+/*
+ * @implemented
+ */
int _unlink( const char *filename )
{
if ( !DeleteFileA(filename) )
#include <msvcrt/internal/file.h>
+/*
+ * @implemented
+ */
int _utime(const char* filename, struct _utimbuf* buf)
{
int fn;
+/*
+ * @implemented
+ */
size_t _write(int _fd, const void *_buf, size_t _nbyte)
{
DWORD _wbyte;
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;
#include <msvcrt/malloc.h>
#include <msvcrt/stdlib.h>
+/*
+ * @implemented
+ */
void* _expand(void* pold, size_t size)
{
PHEAP_BUCKET pbucket;
return NULL;
}
+/*
+ * @implemented
+ */
size_t _msize(void* pBlock)
{
PHEAP_BUCKET pbucket;
#include <windows.h>
#include <msvcrt/malloc.h>
+/*
+ * @implemented
+ */
int _heapchk(void)
{
if (!HeapValidate(GetProcessHeap(), 0, NULL))
return 0;
}
+/*
+ * @implemented
+ */
int _heapmin(void)
{
if (!HeapCompact(GetProcessHeap(), 0))
return 0;
}
+/*
+ * @implemented
+ */
int _heapset(unsigned int unFill)
{
if (_heapchk() == -1)
}
+/*
+ * @implemented
+ */
int _heapwalk(struct _heapinfo* entry)
{
return 0;
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));
}
+/*
+ * @implemented
+ */
unsigned int _mbctohira(unsigned int c)
{
return c;
}
+/*
+ * @implemented
+ */
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));
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;
}
+/*
+ * @implemented
+ */
int _ismbcprint( unsigned int c )
{
if ((c & 0xFF00) != 0) {
return 0;
}
+/*
+ * @implemented
+ */
int _ismbcsymbol( unsigned int c )
{
if ((c & 0xFF00) != 0) {
return 0;
}
+/*
+ * @implemented
+ */
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);
#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/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;
#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>
+/*
+ * @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
+/*
+ * FIXME 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
+ *
+ * @implemented
+ */
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
+ *
+ * @implemented
+ */
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;
return 0;
}
+/*
+ * @implemented
+ */
int __GetMainArgs(int *argc,char ***argv,char ***env,int flag)
{
int i,afterlastspace;
#include <msvcrt/stdio.h>
#include <msvcrt/string.h>
+/*
+ * @implemented
+ */
int _aexit_rtn_dll(int exitcode)
{
_exit(exitcode);
}
+/*
+ * @implemented
+ */
void _amsg_exit(int errnum)
{
fprintf(stderr,strerror(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 */
* DISCLAMED. This includes but is not limited to warrenties of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Revision: 1.3 $
- * $Author: robd $
- * $Date: 2002/11/29 12:27:48 $
+ * $Revision: 1.4 $
+ * $Author: royce $
+ * $Date: 2003/07/11 17:25:16 $
*
*/
* the global constructor function __do_global_ctors called from __main
* will attempt to register __do_global_dtors using atexit.
* Thanks to Andrey A. Smirnov for pointing this one out.
+ *
+ * @unimplemented
*/
int
atexit(void (*pfn)())
typedef void(*atexit_t)(void);
+/*
+ * @unimplemented
+ */
void _initterm(atexit_t *, atexit_t *)
{
return;
-}
\ No newline at end of file
+}
#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;
+/*
+ * @unimplemented
+ */
int _purecall(void)
{
return 0;
+/*
+ * @implemented
+ */
void _global_unwind2( PEXCEPTION_FRAME frame )
{
RtlUnwind( frame, 0, NULL, 0 );
}
+/*
+ * @implemented
+ */
void _local_unwind2( PEXCEPTION_FRAME endframe, DWORD nr )
{
TRACE(crtdll,"(%p,%ld)\n",endframe,nr);
#include <msvcrt/internal/file.h>
+/*
+ * @implemented
+ */
int _cwait(int* pnStatus, int hProc, int nAction)
{
DWORD ExitCode;
-/* $Id: _system.c,v 1.6 2002/11/24 18:42:15 robd Exp $
+/* $Id: _system.c,v 1.7 2003/07/11 17:25:16 royce Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
#include <msvcrt/string.h>
#include <msvcrt/process.h>
+/*
+ * @implemented
+ */
int system(const char *command)
{
char szCmdLine[MAX_PATH];
#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)
#include <msvcrt/stdlib.h>
#include <stdarg.h>
+/*
+ * @implemented
+ */
int _execl(const char* szPath, const char* szArgv0, ...)
{
char *szArg[100];
#include <msvcrt/stdarg.h>
-// fixme rewrite to pass the array variants to va_list variant
-
+/*
+ * FIXME rewrite to pass the array variants to va_list variant
+ *
+ * @unimplemented
+ */
int _execle(const char *path, const char *szArgv0, ... /*, const char **envp */)
{
char *szArg[100];
#include <msvcrt/stdlib.h>
#include <msvcrt/stdarg.h>
+/*
+ * @implemented
+ */
int _execlp(const char *szPath, const char *szArgv0, ...)
{
char *szArg[100];
#include <msvcrt/process.h>
#include <msvcrt/stdlib.h>
+/*
+ * @implemented
+ */
int _execv(const char* szPath, char* const* szaArgv)
{
return _spawnve(P_OVERLAY, szPath, szaArgv, _environ);
#include <msvcrt/process.h>
+/*
+ * @implemented
+ */
int _execve(const char* szPath, char* const* szaArgv, char* const* szaEnv)
{
return spawnve(P_OVERLAY, szPath, szaArgv, szaEnv);
#include <msvcrt/process.h>
#include <msvcrt/stdlib.h>
+/*
+ * @implemented
+ */
int _execvp(const char* szPath, char* const* szaArgv)
{
return _spawnvpe(P_OVERLAY, szPath, szaArgv, _environ);
#include <msvcrt/process.h>
+/*
+ * @implemented
+ */
int _execvpe(const char* szPath, char* const* szaArgv, char* const* szaEnv)
{
return _spawnvpe(P_OVERLAY, szPath, szaArgv, szaEnv);
#include <windows.h>
#include <msvcrt/process.h>
+/*
+ * @implemented
+ */
int _getpid (void)
{
return (int)GetCurrentProcessId();
#include <stdarg.h>
+/*
+ * @implemented
+ */
int _spawnl(int nMode, const char* szPath, const char* szArgv0,...)
{
char* szArg[100];
#include <msvcrt/stdarg.h>
+/*
+ * @implemented
+ */
int _spawnle(int mode, const char *path, const char *szArgv0, ... /*, const char **envp */)
{
char *szArg[100];
#include <msvcrt/stdlib.h>
#include <stdarg.h>
+/*
+ * @implemented
+ */
int _spawnlp(int nMode, const char* szPath, const char* szArgv0, ...)
{
char *szArg[100];
#include <msvcrt/stdarg.h>
+/*
+ * @implemented
+ */
int _spawnlpe(int mode, const char *path, const char *szArgv0, ... /*, const char **envp */)
{
char *szArg[100];
#include <msvcrt/process.h>
#include <msvcrt/stdlib.h>
+/*
+ * @implemented
+ */
int _spawnv(int nMode, const char* szPath, char* const* szaArgv)
{
return _spawnve(nMode, szPath, (char * const *)szaArgv, _environ);
/*-------------------------------------------------*/
+/*
+ * @implemented
+ */
int _spawnve(int mode, const char* path, char* const argv[], char* const envp[])
{
/* This is the one that does the work! */
return rpath;
}
+/*
+ * @implemented
+ */
int _spawnvpe(int nMode, const char* szPath, char* const* szaArgv, char* const* szaEnv)
{
char rpath[FILENAME_MAX];
#include <msvcrt/process.h>
#include <msvcrt/stdlib.h>
+/*
+ * @implemented
+ */
int _spawnvp(int nMode, const char* szPath, char* const* szaArgv)
{
return spawnvpe(nMode, szPath, (char * const *)szaArgv, _environ);
#include <msvcrt/errno.h>
+/*
+ * @implemented
+ */
int _spawnvpe(int nMode, const char* szPath, char* const* szaArgv, char* const* szaEnv)
{
-/* $Id: thread.c,v 1.6 2002/11/29 15:59:01 robd Exp $
+/* $Id: thread.c,v 1.7 2003/07/11 17:25:32 royce Exp $
*
*/
#include <windows.h>
#include <msvcrt/internal/file.h>
+/*
+ * @implemented
+ */
unsigned long _beginthread(
void (*pfuncStart)(void*),
unsigned unStackSize,
return (unsigned long)hThread;
}
+/*
+ * @unimplemented
+ */
void _endthread(void)
{
//fixme ExitThread
#include <windows.h>
#include <msvcrt/process.h>
+/*
+ * @implemented
+ */
unsigned long __threadid (void)
{
return GetCurrentThreadId();
}
+/*
+ * @implemented
+ */
void *__threadhandle(void)
{
return GetCurrentThread();
#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 *))
{
/* jumps back to position specified in jmp_buf */
+/*
+ * @implemented
+ */
int longjmp( jmp_buf env, int value )
{
//push ebp generated by the compiler
#ifdef __GNUC__
+/*
+ * @implemented
+ */
int _setjmp( jmp_buf env )
{
//push ebp generated by the compiler
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)
{
#include <windows.h>
+/*
+ * @unimplemented
+ */
int _XcptFilter (
DWORD ExceptionCode,
struct _EXCEPTION_POINTERS * ExceptionInfo
#include <msvcrt/stdlib.h>
+/*
+ * @unimplemented
+ */
void **__pxcptinfoptrs (void)
{
return NULL;
}
+/*
+ * @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 ferror(FILE *stream);
#endif
+/*
+ * @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:17 robd Exp $
+/* $Id: fgetchar.c,v 1.6 2003/07/11 17:25:32 royce Exp $
*
* ReactOS msvcrt library
*
return _getch();
}
+/*
+ * @implemented
+ */
int _fgetwchar (void)
{
return _getch();
#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)
{
}
+/*
+ * @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;
FILE * __alloc_file(void);
+/*
+ * @implemented
+ */
FILE* fopen(const char *file, const char *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)
{
#include <msvcrt/conio.h>
#include <msvcrt/wchar.h>
+/*
+ * @implemented
+ */
int _fputchar (int c)
{
return _putch(c);
}
+/*
+ * @unimplemented
+ */
int _fputwchar (wchar_t c)
{
//return _putch(c);
#include <msvcrt/string.h>
#include <windows.h>
+/*
+ * @implemented
+ */
int
fputs(const char *s, FILE *f)
{
// carriage return line feed conversion is done in filbuf and flsbuf
#if 0
+/*
+ * @unimplemented
+ */
size_t
fread(void *p, size_t size, size_t count, FILE *iop)
{
#include <msvcrt/internal/file.h>
+/*
+ * @implemented
+ */
FILE *freopen(const char *file, const char *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;
#include <msvcrt/internal/file.h>
+/*
+ * @implemented
+ */
long ftell(FILE *f)
{
long tres;
#include <msvcrt/errno.h>
#include <msvcrt/internal/file.h>
+/*
+ * @implemented
+ */
#if 0
size_t
fwrite(const void *p, size_t size, size_t count, FILE *iop)
//getc can be a macro
#undef getc
+/*
+ * @implemented
+ */
int getc(FILE *fp)
{
int c = -1;
#include <msvcrt/internal/file.h>
#undef getchar
+/*
+ * @implemented
+ */
int
getchar(void)
{
+/*
+ * @implemented
+ */
char *getenv(const char *name)
{
char *buffer;
/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
#include <msvcrt/stdio.h>
+/*
+ * @implemented
+ */
char* gets(char* s)
{
int 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)
{
#include <msvcrt/internal/file.h>
+/*
+ * @unimplemented
+ */
FILE *_popen (const char *cm, const char *md) /* program name, pipe mode */
{
FILE *pf;
}
+/*
+ * @unimplemented
+ */
int
_pclose (FILE *pp)
{
/* Write formatted output to stdout from the format string FORMAT. */
/* VARARGS1 */
+/*
+ * @implemented
+ */
int
printf (const char *format, ...)
{
return done;
}
+/*
+ * @implemented
+ */
int
wprintf (const wchar_t *format, ...)
{
#undef putc
#undef putwc
+/*
+ * @implemented
+ */
int putc(int c, FILE* fp)
{
// valid stream macro should check that fp is dword aligned
#undef putc
#undef putchar
+/*
+ * @implemented
+ */
int putchar(int c)
{
int r = putc(c, stdout);
#undef putchar
+/*
+ * @implemented
+ */
int puts(const char *s)
{
int 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? */
#include <windows.h>
+/*
+ * @implemented
+ */
int remove(const char *fn)
{
if (!DeleteFileA(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;
#include <msvcrt/stdlib.h>
+/*
+ * @unimplemented
+ */
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 *fp, const char *fmt0, va_list argp);
+/*
+ * @implemented
+ */
int
vfprintf(FILE *f, const char *fmt, va_list ap)
{
__vfwprintf(FILE *fp, const wchar_t *fmt0, va_list argp);
+/*
+ * @implemented
+ */
int
vfwprintf(FILE *f, const wchar_t *fmt, va_list ap)
{
#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)
{
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)
{
/* 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))
#include <msvcrt/stdlib.h>
#include <msvcrt/string.h>
+/*
+ * @implemented
+ */
void *
calloc(size_t size, size_t nelem)
{
/* 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)
{
#undef _fpecode
int fpecode;
+/*
+ * @implemented
+ */
int *_errno(void)
{
return &errno;
+/*
+ * @implemented
+ */
int * __fpecode ( void )
{
return &fpecode;
}
+/*
+ * @implemented
+ */
int* __doserrno(void)
{
_doserrno = GetLastError();
char *fcvtbuf (double, int, int *, int *, char *);
+/*
+ * @implemented
+ */
char *
_fcvt (double value, int ndigits, int *decpt, int *sign)
{
return _fullpath(absPath,relPath,maxLength );
}
+/*
+ * @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/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.3 2002/11/29 15:59:01 robd Exp $
+/* $Id: itow.c,v 1.4 2003/07/11 17:25:32 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;
}
+/*
+ * @implemented
+ */
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.9 2002/11/29 15:59:01 robd Exp $
+/* $Id: makepath.c,v 1.10 2003/07/11 17:25:32 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;
#include <msvcrt/stdlib.h>
+/*
+ * @implemented
+ */
void* malloc(size_t _size)
{
return(HeapAlloc(GetProcessHeap(),0,_size));
}
+/*
+ * @implemented
+ */
void free(void* _ptr)
{
HeapFree(GetProcessHeap(),0,_ptr);
}
+/*
+ * @implemented
+ */
void* calloc(size_t _nmemb, size_t _size)
{
return(HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY, _nmemb*_size));
}
+/*
+ * @implemented
+ */
void* realloc(void* _ptr, size_t _size)
{
return(HeapReAlloc(GetProcessHeap(),0,_ptr,_size));
#include <stdlib.h>
+/*
+ * @unimplemented
+ */
size_t mbstowcs( wchar_t *wcstr, const char *mbstr, size_t count )
{
return 0;
}
+/*
+ * @unimplemented
+ */
int mbtowc( wchar_t *wchar, const char *mbchar, size_t count )
{
return 0;
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);
* 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)
static unsigned long long next = 0;
+/*
+ * @implemented
+ */
int
rand(void)
{
return (int)((next >> 16) & RAND_MAX);
}
+/*
+ * @implemented
+ */
void
srand(unsigned 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>
+/*
+ * @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)
{
__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'. */
+ * 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)
{
#include <msvcrt/string.h>
+/*
+ * @implemented
+ */
void *
_memccpy (void *to, const void *from,int c,size_t count)
{
#include <msvcrt/string.h>
+/*
+ * @implemented
+ */
void *
memchr(const void *s, int c, size_t n)
{
#include <msvcrt/string.h>
+/*
+ * @implemented
+ */
int memcmp(const void *s1, const void *s2, size_t n)
{
if (n != 0) {
#include <msvcrt/string.h>
-/* This is the most reliable way to avoid incompatibilities
- in available built-in functions on various systems. */
+/*
+ * This is the most reliable way to avoid incompatibilities
+ * in available built-in functions on various systems.
+ *
+ * @implemented
+ */
void* memcpy(void* to, const void* from, size_t count)
{
register char* f = (char*)from;
#include <msvcrt/ctype.h>
#include <msvcrt/string.h>
+/*
+ * @implemented
+ */
int
_memicmp(const void *s1, const void *s2, size_t n)
{
#include <msvcrt/string.h>
+/*
+ * @implemented
+ */
void * memmove(void *dest,const void *src,size_t count)
{
char *char_dest = (char *)dest;
#include <msvcrt/string.h>
+/*
+ * @implemented
+ */
void* memset(void* src, int val, size_t count)
{
char* char_src = (char*)src;
#include <msvcrt/string.h>
+/*
+ * @implemented
+ */
char* strcat(char* s, const char* append)
{
char* save = s;
#include <msvcrt/string.h>
+/*
+ * @implemented
+ */
char *strchr(const char *s, int c)
{
char cc = c;
#include <msvcrt/string.h>
+/*
+ * @implemented
+ */
int strcmp(const char* s1, const char* s2)
{
while (*s1 == *s2)
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);
#pragma function(strcpy)
+/*
+ * @implemented
+ */
char* strcpy(char *to, const char *from)
{
char *save = to;
/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
#include <msvcrt/string.h>
+/*
+ * @implemented
+ */
size_t strcspn(const char *s1, const char *s2)
{
const char *p, *spanp;
#include <msvcrt/stdlib.h>
+/*
+ * @implemented
+ */
char *_strdup(const char *_s)
{
char *rv;
int* _sys_nerr_dll = &__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>
+/*
+ * @implemented
+ */
size_t strlen(const char* str)
{
const char* s;
#include <msvcrt/string.h>
#include <msvcrt/ctype.h>
+/*
+ * @implemented
+ */
char * _strlwr(char *x)
{
char *y=x;
/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
#include <msvcrt/string.h>
+/*
+ * @implemented
+ */
char *
strncat(char *dst, const char *src, size_t n)
{
#include <msvcrt/string.h>
+/*
+ * @implemented
+ */
int
strncmp(const char *s1, const char *s2, size_t n)
{
/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
#include <msvcrt/string.h>
+/*
+ * @implemented
+ */
char *
strncpy(char *dst, const char *src, size_t n)
{
#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)
{
/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
#include <msvcrt/string.h>
+/*
+ * @implemented
+ */
char *
strrchr(const char *s, int c)
{
#include <msvcrt/string.h>
+/*
+ * @implemented
+ */
char * _strrev(char *s)
{
char *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;
/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
#include <msvcrt/string.h>
+/*
+ * @implemented
+ */
size_t
strspn(const char *s1, const char *s2)
{
#include <msvcrt/string.h>
+/*
+ * @implemented
+ */
char *strstr(const char *s, const char *find)
{
char c, sc;
/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
#include <msvcrt/string.h>
+/*
+ * @implemented
+ */
char* strtok(char *s, const char *delim)
{
const char *spanp;
#include <msvcrt/string.h>
#include <msvcrt/ctype.h>
+/*
+ * @implemented
+ */
unsigned long strtoul(const char *cp,char **endp,unsigned int base)
{
unsigned long result = 0,value;
#include <msvcrt/string.h>
#include <msvcrt/ctype.h>
+/*
+ * @implemented
+ */
char *_strupr(char *x)
{
char *y=x;
#include <windows.h>
#include <msvcrt/string.h>
-#if 1
+/*
+ * @unimplemented
+ */
size_t strxfrm( char *dest, const char *src, size_t n )
{
+#if 1
strncpy(dest, src, n);
return (strlen(dest));
-}
#else
-size_t strxfrm( char *dest, const char *src, size_t n )
-{
int ret = LCMapStringA(LOCALE_USER_DEFAULT,LCMAP_LOWERCASE,
src, strlen(src), dest, strlen(dest));
if ( ret == 0 )
return -1;
return ret;
-
-}
#endif
+}
-/* $Id: fstat.c,v 1.12 2002/11/29 12:27:49 robd Exp $
+/* $Id: fstat.c,v 1.13 2003/07/11 17:25:32 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;
#include <msvcrt/internal/file.h>
-// crtdll has void return type instead of int
+/*
+ * crtdll has void return type instead of int
+ *
+ * @implemented
+ */
void _ftime(struct timeb* timebuf)
{
int save = errno;
#include <msvcrt/internal/file.h>
+/*
+ * @implemented
+ */
int _futime(int nHandle, struct _utimbuf* pTimes)
{
FILETIME LastAccessTime;
#include <msvcrt/errno.h>
+/*
+ * @implemented
+ */
int _stat(const char* path, struct stat* buffer)
{
HANDLE fh;
int month[12] = { 31,28,31,30,31,30,31,31,30,31,30,31};
+/*
+ * @unimplemented
+ */
unsigned int _getsystime(struct tm* tp)
{
SYSTEMTIME Time;
}
+/*
+ * @implemented
+ */
unsigned int _setsystime(struct tm* tp, unsigned int ms)
{
SYSTEMTIME Time;
#include <msvcrt/string.h>
+/*
+ * @implemented
+ */
char * _strdec(const char *str1, const char *str2)
{
return (char *) (( str1 >= str2 ) ? ( str1 ) : --str2);
#include <msvcrt/string.h>
+/*
+ * @implemented
+ */
char * _strinc(const char *str)
{
return (char *)(++str);
#include <msvcrt/sys/types.h>
#include <msvcrt/string.h>
+/*
+ * @implemented
+ */
size_t _strncnt( const char *str, size_t max)
{
return strnlen(str,max);
#include <msvcrt/string.h>
+/*
+ * @implemented
+ */
int _strnextc(const char *str)
{
return *(++str);
#include <msvcrt/string.h>
#include <msvcrt/stdlib.h>
+/*
+ * @implemented
+ */
char * _strninc(const char *str, size_t inc)
{
return (char *)(str + inc);
#include <msvcrt/stdlib.h>
+/*
+ * @implemented
+ */
char * _strspnp( const char * str1, const char * str2)
{
return NULL;
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 <msvcrt/string.h>
+/*
+ * @unimplemented
+ */
int wcscoll(const wchar_t *a1,const wchar_t *a2)
{
/* FIXME: handle collates */
}
+/*
+ * @unimplemented
+ */
int _wcsicoll(const wchar_t *a1,const wchar_t *a2)
{
/* FIXME: handle collates */
#include <msvcrt/stdlib.h>
+/*
+ * @implemented
+ */
double wcstod(const wchar_t* s, wchar_t** sret)
{
long double r; /* result */
#include <msvcrt/string.h>
+/*
+ * @implemented
+ */
wchar_t *wcstok(wchar_t *s, const wchar_t *ct)
{
const wchar_t *spanp;
#include <msvcrt/wchar.h>
+/*
+ * @implemented
+ */
long wcstol(const wchar_t* cp, wchar_t** endp, int base)
{
long result = 0, value;
return result * sign;
}
+/*
+ * @implemented
+ */
unsigned long wcstoul(const wchar_t* cp, wchar_t** endp, int base)
{
unsigned long result = 0, value;
#include <msvcrt/wchar.h>
#include <msvcrt/stdlib.h>
+/*
+ * @unimplemented
+ */
size_t wcstombs( char *dst, const wchar_t *src, size_t len )
{
return 0;
#include <msvcrt/wchar.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);