@implemented and @unimplemented comments for lib/msvcrt/*

svn path=/trunk/; revision=5087
This commit is contained in:
Royce Mitchell III 2003-07-11 21:58:16 +00:00
parent edec53a34e
commit abfcc7803e
331 changed files with 1614 additions and 63 deletions

View file

@ -2,6 +2,9 @@
#include <msvcrt/stdlib.h> #include <msvcrt/stdlib.h>
/*
* @implemented
*/
char *_cgets(char *string) char *_cgets(char *string)
{ {
unsigned len = 0; unsigned len = 0;

View file

@ -1,6 +1,9 @@
#include <msvcrt/stdio.h> #include <msvcrt/stdio.h>
#include <msvcrt/conio.h> #include <msvcrt/conio.h>
/*
* @unimplemented
*/
int int
_cprintf(const char *fmt, ...) _cprintf(const char *fmt, ...)
{ {

View file

@ -13,6 +13,9 @@
#include <msvcrt/stdio.h> #include <msvcrt/stdio.h>
#include <msvcrt/internal/file.h> #include <msvcrt/internal/file.h>
/*
* @implemented
*/
int _cputs(const char *_str) int _cputs(const char *_str)
{ {
int len = strlen(_str); int len = strlen(_str);

View file

@ -3,6 +3,9 @@
#include <msvcrt/stdio.h> #include <msvcrt/stdio.h>
#include <msvcrt/internal/stdio.h> #include <msvcrt/internal/stdio.h>
/*
* @unimplemented
*/
int _cscanf(char *fmt, ...) int _cscanf(char *fmt, ...)
{ {
int cnt; int cnt;

View file

@ -14,6 +14,9 @@
#include <msvcrt/internal/console.h> #include <msvcrt/internal/console.h>
/*
* @implemented
*/
int _getch(void) int _getch(void)
{ {
DWORD NumberOfCharsRead = 0; DWORD NumberOfCharsRead = 0;
@ -35,6 +38,9 @@ int _getch(void)
} }
#if 0 #if 0
/*
* @unimplemented
*/
int _getche(void) int _getche(void)
{ {
int c; int c;

View file

@ -13,8 +13,12 @@
#include <msvcrt/internal/console.h> #include <msvcrt/internal/console.h>
// FIXME PeekCosoleInput returns more than keyboard hits
/*
* FIXME PeekConsoleInput returns more than keyboard hits
*
* @unimplemented
*/
int _kbhit(void) int _kbhit(void)
{ {
//INPUT_RECORD InputRecord; //INPUT_RECORD InputRecord;

View file

@ -10,6 +10,9 @@
#include <windows.h> #include <windows.h>
#include <msvcrt/conio.h> #include <msvcrt/conio.h>
/*
* @implemented
*/
int _putch(int c) int _putch(int c)
{ {
DWORD NumberOfCharsWritten; DWORD NumberOfCharsWritten;

View file

@ -19,6 +19,9 @@ int char_avail = 0;
int ungot_char = 0; int ungot_char = 0;
/*
* @implemented
*/
int _ungetch(int c) int _ungetch(int c)
{ {
if (char_avail) if (char_avail)

View file

@ -11,12 +11,18 @@
#undef isalnum #undef isalnum
/*
* @implemented
*/
int isalnum(int c) int isalnum(int c)
{ {
return _isctype(c, _ALPHA | _DIGIT); return _isctype(c, _ALPHA | _DIGIT);
} }
#undef iswalnum #undef iswalnum
/*
* @implemented
*/
int iswalnum(wint_t c) int iswalnum(wint_t c)
{ {
return iswctype(c, _ALPHA | _DIGIT); return iswctype(c, _ALPHA | _DIGIT);

View file

@ -13,12 +13,18 @@
#undef isalpha #undef isalpha
/*
* @implemented
*/
int isalpha(int c) int isalpha(int c)
{ {
return _isctype(c, _ALPHA); return _isctype(c, _ALPHA);
} }
#undef iswalpha #undef iswalpha
/*
* @implemented
*/
int iswalpha(wint_t c) int iswalpha(wint_t c)
{ {
return iswctype(c, _ALPHA); return iswctype(c, _ALPHA);

View file

@ -10,11 +10,17 @@
#include <msvcrt/ctype.h> #include <msvcrt/ctype.h>
/*
* @implemented
*/
int __isascii(int c) int __isascii(int c)
{ {
return (!((c)&(~0x7f))); return (!((c)&(~0x7f)));
} }
/*
* @implemented
*/
int iswascii(wint_t c) int iswascii(wint_t c)
{ {
return __isascii(c); return __isascii(c);

View file

@ -3,12 +3,18 @@
#undef iscntrl #undef iscntrl
/*
* @implemented
*/
int iscntrl(int c) int iscntrl(int c)
{ {
return _isctype(c, _CONTROL); return _isctype(c, _CONTROL);
} }
#undef iswcntrl #undef iswcntrl
/*
* @implemented
*/
int iswcntrl(wint_t c) int iswcntrl(wint_t c)
{ {
return iswctype(c, _CONTROL); return iswctype(c, _CONTROL);

View file

@ -10,11 +10,17 @@
#include <msvcrt/ctype.h> #include <msvcrt/ctype.h>
/*
* @implemented
*/
int __iscsymf(int c) int __iscsymf(int c)
{ {
return (isalpha(c) || ( c == '_' )) ; return (isalpha(c) || ( c == '_' )) ;
} }
/*
* @implemented
*/
int __iscsym(int c) int __iscsym(int c)
{ {
return (isalnum(c) || ( c == '_' )) ; return (isalnum(c) || ( c == '_' )) ;

View file

@ -8,27 +8,43 @@ unsigned short *_pctype = _ctype + 1;
unsigned short *_pwctype = _ctype + 1; unsigned short *_pwctype = _ctype + 1;
/*
* @implemented
*/
unsigned short **__p__pctype(void) unsigned short **__p__pctype(void)
{ {
return &_pctype; return &_pctype;
} }
/*
* @implemented
*/
unsigned short **__p__pwctype(void) unsigned short **__p__pwctype(void)
{ {
return &_pwctype; return &_pwctype;
} }
/*
* @implemented
*/
int _isctype(unsigned int c, int ctypeFlags) int _isctype(unsigned int c, int ctypeFlags)
{ {
return (_pctype[(unsigned char)(c & 0xFF)] & ctypeFlags); return (_pctype[(unsigned char)(c & 0xFF)] & ctypeFlags);
} }
/*
* @implemented
*/
int iswctype(wint_t wc, wctype_t wctypeFlags) int iswctype(wint_t wc, wctype_t wctypeFlags)
{ {
return (_pwctype[(unsigned char)(wc & 0xFF)] & wctypeFlags); return (_pwctype[(unsigned char)(wc & 0xFF)] & wctypeFlags);
} }
// obsolete /*
* obsolete
*
* @implemented
*/
int is_wctype(wint_t wc, wctype_t wctypeFlags) int is_wctype(wint_t wc, wctype_t wctypeFlags)
{ {
return (_pwctype[(unsigned char)(wc & 0xFF)] & wctypeFlags); return (_pwctype[(unsigned char)(wc & 0xFF)] & wctypeFlags);

View file

@ -3,12 +3,18 @@
#undef isdigit #undef isdigit
/*
* @implemented
*/
int isdigit(int c) int isdigit(int c)
{ {
return _isctype(c, _DIGIT); return _isctype(c, _DIGIT);
} }
#undef iswdigit #undef iswdigit
/*
* @implemented
*/
int iswdigit(wint_t c) int iswdigit(wint_t c)
{ {
return iswctype(c, _DIGIT); return iswctype(c, _DIGIT);

View file

@ -2,12 +2,18 @@
#include <msvcrt/ctype.h> #include <msvcrt/ctype.h>
#undef isgraph #undef isgraph
/*
* @implemented
*/
int isgraph(int c) int isgraph(int c)
{ {
return _isctype(c,_PUNCT | _ALPHA | _DIGIT); return _isctype(c,_PUNCT | _ALPHA | _DIGIT);
} }
#undef iswgraph #undef iswgraph
/*
* @implemented
*/
int iswgraph(wint_t c) int iswgraph(wint_t c)
{ {
return iswctype(c,_PUNCT | _ALPHA | _DIGIT); return iswctype(c,_PUNCT | _ALPHA | _DIGIT);

View file

@ -3,11 +3,17 @@
#undef islower #undef islower
/*
* @implemented
*/
int islower(int c) int islower(int c)
{ {
return _isctype(c, _LOWER); return _isctype(c, _LOWER);
} }
/*
* @implemented
*/
int iswlower(wint_t c) int iswlower(wint_t c)
{ {
return iswctype(c, _LOWER); return iswctype(c, _LOWER);

View file

@ -2,11 +2,17 @@
#include <msvcrt/ctype.h> #include <msvcrt/ctype.h>
#undef isprint #undef isprint
/*
* @implemented
*/
int isprint(int c) int isprint(int c)
{ {
return _isctype(c,_BLANK | _PUNCT | _ALPHA | _DIGIT); return _isctype(c,_BLANK | _PUNCT | _ALPHA | _DIGIT);
} }
/*
* @implemented
*/
int iswprint(wint_t c) int iswprint(wint_t c)
{ {
return iswctype((unsigned short)c,_BLANK | _PUNCT | _ALPHA | _DIGIT); return iswctype((unsigned short)c,_BLANK | _PUNCT | _ALPHA | _DIGIT);

View file

@ -3,12 +3,18 @@
#undef ispunct #undef ispunct
/*
* @implemented
*/
int ispunct(int c) int ispunct(int c)
{ {
return _isctype(c, _PUNCT); return _isctype(c, _PUNCT);
} }
#undef iswpunct #undef iswpunct
/*
* @implemented
*/
int iswpunct(wint_t c) int iswpunct(wint_t c)
{ {
return iswctype(c, _PUNCT); return iswctype(c, _PUNCT);

View file

@ -12,12 +12,18 @@
#undef isspace #undef isspace
/*
* @implemented
*/
int isspace(int c) int isspace(int c)
{ {
return _isctype(c,_SPACE); return _isctype(c,_SPACE);
} }
#undef iswspace #undef iswspace
/*
* @implemented
*/
int iswspace(wint_t c) int iswspace(wint_t c)
{ {
return iswctype(c,_SPACE); return iswctype(c,_SPACE);

View file

@ -3,11 +3,17 @@
#undef isupper #undef isupper
/*
* @implemented
*/
int isupper(int c) int isupper(int c)
{ {
return _isctype(c, _UPPER); return _isctype(c, _UPPER);
} }
/*
* @implemented
*/
int iswupper(wint_t c) int iswupper(wint_t c)
{ {
return iswctype(c, _UPPER); return iswctype(c, _UPPER);

View file

@ -3,12 +3,18 @@
#undef isxdigit #undef isxdigit
/*
* @implemented
*/
int isxdigit(int c) int isxdigit(int c)
{ {
return _isctype(c, _HEX); return _isctype(c, _HEX);
} }
#undef iswxdigit #undef iswxdigit
/*
* @implemented
*/
int iswxdigit(wint_t c) int iswxdigit(wint_t c)
{ {
return iswctype(c, _HEX); return iswctype(c, _HEX);

View file

@ -3,6 +3,9 @@
#include <msvcrt/ctype.h> #include <msvcrt/ctype.h>
/*
* @implemented
*/
int __toascii(int c) int __toascii(int c)
{ {
return((unsigned)(c) & 0x7F); return((unsigned)(c) & 0x7F);

View file

@ -2,6 +2,9 @@
#include <msvcrt/ctype.h> #include <msvcrt/ctype.h>
#undef tolower #undef tolower
/*
* @implemented
*/
int tolower(int c) int tolower(int c)
{ {
if (_isctype (c, _UPPER)) if (_isctype (c, _UPPER))
@ -10,6 +13,9 @@ int tolower(int c)
} }
#undef towlower #undef towlower
/*
* @implemented
*/
int towlower(wint_t c) int towlower(wint_t c)
//wchar_t towlower(wchar_t c) //wchar_t towlower(wchar_t c)
{ {
@ -18,6 +24,9 @@ int towlower(wint_t c)
return(c); return(c);
} }
/*
* @implemented
*/
int _tolower(int c) int _tolower(int c)
{ {
return (c - ('A' - 'a')); return (c - ('A' - 'a'));

View file

@ -3,6 +3,9 @@
#undef toupper #undef toupper
/*
* @implemented
*/
int toupper(int c) int toupper(int c)
{ {
if (_isctype (c, _LOWER)) if (_isctype (c, _LOWER))
@ -11,6 +14,9 @@ int toupper(int c)
} }
#undef towupper #undef towupper
/*
* @implemented
*/
int towupper(wint_t c) int towupper(wint_t c)
{ {
if (iswctype (c, _LOWER)) if (iswctype (c, _LOWER))
@ -18,6 +24,9 @@ int towupper(wint_t c)
return(c); return(c);
} }
/*
* @implemented
*/
int _toupper(int c) int _toupper(int c)
{ {
return (c + ('A' - 'a')); return (c + ('A' - 'a'));

View file

@ -3,6 +3,9 @@
#include <msvcrt/direct.h> #include <msvcrt/direct.h>
/*
* @implemented
*/
int _chdir(const char* _path) int _chdir(const char* _path)
{ {
if (_path[1] == ':') if (_path[1] == ':')

View file

@ -7,6 +7,9 @@
int cur_drive = 0; int cur_drive = 0;
/*
* @implemented
*/
int _chdrive(int drive) int _chdrive(int drive)
{ {
char d[3]; char d[3];

View file

@ -3,6 +3,9 @@
#include <msvcrt/stdlib.h> #include <msvcrt/stdlib.h>
/*
* @implemented
*/
char *_getcwd(char* buffer, int maxlen) char *_getcwd(char* buffer, int maxlen)
{ {
char *cwd; char *cwd;

View file

@ -1,6 +1,9 @@
#include <windows.h> #include <windows.h>
#include <msvcrt/direct.h> #include <msvcrt/direct.h>
/*
* @implemented
*/
char* _getdcwd(int nDrive, char* caBuffer, int nBufLen) char* _getdcwd(int nDrive, char* caBuffer, int nBufLen)
{ {
int i =0; int i =0;

View file

@ -3,6 +3,9 @@
#include <msvcrt/direct.h> #include <msvcrt/direct.h>
/*
* @implemented
*/
unsigned int _getdiskfree(unsigned int _drive, struct _diskfree_t* _diskspace) unsigned int _getdiskfree(unsigned int _drive, struct _diskfree_t* _diskspace)
{ {
char RootPathName[10]; char RootPathName[10];

View file

@ -5,6 +5,9 @@
extern int cur_drive; extern int cur_drive;
/*
* @implemented
*/
int _getdrive(void) int _getdrive(void)
{ {
char Buffer[MAX_PATH]; char Buffer[MAX_PATH];
@ -16,6 +19,9 @@ int _getdrive(void)
return cur_drive; return cur_drive;
} }
/*
* @unimplemented
*/
unsigned long _getdrives(void) unsigned long _getdrives(void)
{ {
//fixme get logical drives //fixme get logical drives

View file

@ -2,6 +2,9 @@
#include <msvcrt/direct.h> #include <msvcrt/direct.h>
/*
* @implemented
*/
int _mkdir(const char* _path) int _mkdir(const char* _path)
{ {
if (!CreateDirectoryA(_path, NULL)) if (!CreateDirectoryA(_path, NULL))

View file

@ -2,6 +2,9 @@
#include <msvcrt/direct.h> #include <msvcrt/direct.h>
/*
* @implemented
*/
int _rmdir(const char* _path) int _rmdir(const char* _path)
{ {
if (!RemoveDirectoryA(_path)) if (!RemoveDirectoryA(_path))

View file

@ -3,6 +3,9 @@
#include <msvcrt/direct.h> #include <msvcrt/direct.h>
/*
* @implemented
*/
int _wchdir (const wchar_t *_path) int _wchdir (const wchar_t *_path)
{ {
if (_path[1] == L':') if (_path[1] == L':')

View file

@ -3,6 +3,9 @@
#include <msvcrt/stdlib.h> #include <msvcrt/stdlib.h>
/*
* @implemented
*/
wchar_t* _wgetcwd(wchar_t* buffer, int maxlen) wchar_t* _wgetcwd(wchar_t* buffer, int maxlen)
{ {
wchar_t *cwd; wchar_t *cwd;

View file

@ -2,6 +2,9 @@
#include <msvcrt/direct.h> #include <msvcrt/direct.h>
/*
* @implemented
*/
wchar_t* _wgetdcwd(int nDrive, wchar_t* caBuffer, int nBufLen) wchar_t* _wgetdcwd(int nDrive, wchar_t* caBuffer, int nBufLen)
{ {
int i =0; int i =0;

View file

@ -2,6 +2,9 @@
#include <msvcrt/direct.h> #include <msvcrt/direct.h>
/*
* @implemented
*/
int _wmkdir(const wchar_t* _path) int _wmkdir(const wchar_t* _path)
{ {
if (!CreateDirectoryW(_path, NULL)) if (!CreateDirectoryW(_path, NULL))

View file

@ -1,6 +1,9 @@
#include <windows.h> #include <windows.h>
#include <msvcrt/direct.h> #include <msvcrt/direct.h>
/*
* @implemented
*/
int _wrmdir(const wchar_t* _path) int _wrmdir(const wchar_t* _path)
{ {
if (!RemoveDirectoryW(_path)) if (!RemoveDirectoryW(_path))

View file

@ -3,6 +3,9 @@
#ifdef __GNUC__ #ifdef __GNUC__
/*
* @unimplemented
*/
int _abnormal_termination(void) int _abnormal_termination(void)
{ {
printf("Abnormal Termination\n"); printf("Abnormal Termination\n");

View file

@ -14,6 +14,9 @@ MsvcrtDebug(ULONG Value)
//DbgPrint("MsvcrtDebug 0x%.08x\n", Value); //DbgPrint("MsvcrtDebug 0x%.08x\n", Value);
} }
/*
* @implemented
*/
EXCEPTION_DISPOSITION EXCEPTION_DISPOSITION
_except_handler2( _except_handler2(
struct _EXCEPTION_RECORD *ExceptionRecord, struct _EXCEPTION_RECORD *ExceptionRecord,

View file

@ -16,8 +16,11 @@ int _matherr(struct _exception* e)
return 0; return 0;
} }
/*
// not exported by NTDLL * not exported by NTDLL
*
* @unimplemented
*/
void __setusermatherr(int (*handler)(struct _exception*)) void __setusermatherr(int (*handler)(struct _exception*))
{ {
@ -26,6 +29,9 @@ void __setusermatherr(int (*handler)(struct _exception*))
#define _FPIEEE_RECORD void #define _FPIEEE_RECORD void
/*
* @unimplemented
*/
int _fpieee_flt( int _fpieee_flt(
unsigned long exception_code, unsigned long exception_code,
struct _EXCEPTION_POINTERS* ExceptionPointer, struct _EXCEPTION_POINTERS* ExceptionPointer,

View file

@ -1,5 +1,8 @@
#include <windows.h> #include <windows.h>
/*
* @implemented
*/
void __cdecl void __cdecl
_global_unwind2(PEXCEPTION_REGISTRATION RegistrationFrame) _global_unwind2(PEXCEPTION_REGISTRATION RegistrationFrame)
{ {

View file

@ -1,6 +1,9 @@
#include <windows.h> #include <windows.h>
/*
* @unimplemented
*/
int int
_XcptFilter(DWORD ExceptionCode, _XcptFilter(DWORD ExceptionCode,
struct _EXCEPTION_POINTERS * ExceptionInfo) struct _EXCEPTION_POINTERS * ExceptionInfo)

View file

@ -2,6 +2,9 @@
#include <msvcrt/internal/ieee.h> #include <msvcrt/internal/ieee.h>
/*
* @implemented
*/
double _chgsign( double __x ) double _chgsign( double __x )
{ {
double_t *x = (double_t *)&x; double_t *x = (double_t *)&x;

View file

@ -1,5 +1,8 @@
#include <msvcrt/float.h> #include <msvcrt/float.h>
/*
* @implemented
*/
unsigned int _clearfp (void) unsigned int _clearfp (void)
{ {
unsigned short __res = _statusfp(); unsigned short __res = _statusfp();

View file

@ -2,11 +2,17 @@
#include <msvcrt/float.h> #include <msvcrt/float.h>
/*
* @implemented
*/
unsigned int _controlfp(unsigned int unNew, unsigned int unMask) unsigned int _controlfp(unsigned int unNew, unsigned int unMask)
{ {
return _control87(unNew,unMask); return _control87(unNew,unMask);
} }
/*
* @implemented
*/
unsigned int _control87(unsigned int unNew, unsigned int unMask) unsigned int _control87(unsigned int unNew, unsigned int unMask)
{ {
register unsigned int __res; register unsigned int __res;

View file

@ -1,6 +1,9 @@
#include <msvcrt/float.h> #include <msvcrt/float.h>
#include <msvcrt/internal/ieee.h> #include <msvcrt/internal/ieee.h>
/*
* @implemented
*/
double _copysign (double __d, double __s) double _copysign (double __d, double __s)
{ {
double_t *d = (double_t *)&__d; double_t *d = (double_t *)&__d;

View file

@ -27,6 +27,9 @@
typedef int fpclass_t; typedef int fpclass_t;
/*
* @implemented
*/
fpclass_t _fpclass(double __d) fpclass_t _fpclass(double __d)
{ {
double_t *d = (double_t *)&__d; double_t *d = (double_t *)&__d;

View file

@ -1,6 +1,9 @@
#include <msvcrt/float.h> #include <msvcrt/float.h>
#include <msvcrt/internal/tls.h> #include <msvcrt/internal/tls.h>
/*
* @implemented
*/
int * __fpecode(void) int * __fpecode(void)
{ {
return(&(GetThreadData()->fpecode)); return(&(GetThreadData()->fpecode));

View file

@ -1,6 +1,9 @@
#include <msvcrt/float.h> #include <msvcrt/float.h>
/*
* @unimplemented
*/
void _fpreset(void) void _fpreset(void)
{ {
/* FIXME: This causes an exception */ /* FIXME: This causes an exception */

View file

@ -21,6 +21,9 @@ Cambridge, MA 02139, USA. */
#include <msvcrt/internal/ieee.h> #include <msvcrt/internal/ieee.h>
/*
* @implemented
*/
int _isnan(double __x) int _isnan(double __x)
{ {
double_t * x = (double_t *)&__x; double_t * x = (double_t *)&__x;
@ -49,6 +52,9 @@ int _isinf(double __x)
return ( x->exponent == 0x7ff && ( x->mantissah == 0 && x->mantissal == 0 )); return ( x->exponent == 0x7ff && ( x->mantissah == 0 && x->mantissal == 0 ));
} }
/*
* @implemented
*/
int _finite( double x ) int _finite( double x )
{ {
return !_isinf(x); return !_isinf(x);

View file

@ -1,6 +1,9 @@
#include <msvcrt/float.h> #include <msvcrt/float.h>
/*
* @implemented
*/
double _nextafter( double x, double y ) double _nextafter( double x, double y )
{ {
if ( x == y) if ( x == y)

View file

@ -1,6 +1,9 @@
#include <msvcrt/float.h> #include <msvcrt/float.h>
#include <msvcrt/internal/ieee.h> #include <msvcrt/internal/ieee.h>
/*
* @implemented
*/
double _scalb( double __x, long e ) double _scalb( double __x, long e )
{ {
double_t *x = (double_t *)&__x; double_t *x = (double_t *)&__x;

View file

@ -1,5 +1,8 @@
#include <msvcrt/float.h> #include <msvcrt/float.h>
/*
* @implemented
*/
unsigned int _statusfp (void) unsigned int _statusfp (void)
{ {

View file

@ -5,6 +5,9 @@
#include <msvcrt/msvcrtdbg.h> #include <msvcrt/msvcrtdbg.h>
/*
* @implemented
*/
int _access( const char *_path, int _amode ) int _access( const char *_path, int _amode )
{ {
DWORD Attributes = GetFileAttributesA(_path); DWORD Attributes = GetFileAttributesA(_path);

View file

@ -7,6 +7,9 @@
#define mode_t int #define mode_t int
/*
* @implemented
*/
int _chmod(const char* filename, mode_t mode) int _chmod(const char* filename, mode_t mode)
{ {
DWORD FileAttributes = 0; DWORD FileAttributes = 0;

View file

@ -4,6 +4,9 @@
#define NDEBUG #define NDEBUG
#include <msvcrt/msvcrtdbg.h> #include <msvcrt/msvcrtdbg.h>
/*
* @implemented
*/
int _chsize(int _fd, long size) int _chsize(int _fd, long size)
{ {
DPRINT("_chsize(fd %d, size %d)\n", _fd, size); DPRINT("_chsize(fd %d, size %d)\n", _fd, size);

View file

@ -5,6 +5,9 @@
#define NDEBUG #define NDEBUG
#include <msvcrt/msvcrtdbg.h> #include <msvcrt/msvcrtdbg.h>
/*
* @implemented
*/
int _close(int _fd) int _close(int _fd)
{ {
DPRINT("_close(fd %d)\n", _fd); DPRINT("_close(fd %d)\n", _fd);

View file

@ -4,6 +4,9 @@
#include <msvcrt/internal/file.h> #include <msvcrt/internal/file.h>
/*
* @implemented
*/
int _commit(int _fd) int _commit(int _fd)
{ {
if (! FlushFileBuffers(_get_osfhandle(_fd)) ) { if (! FlushFileBuffers(_get_osfhandle(_fd)) ) {

View file

@ -5,6 +5,9 @@
#include <msvcrt/msvcrtdbg.h> #include <msvcrt/msvcrtdbg.h>
/*
* @implemented
*/
int _creat(const char* filename, int mode) int _creat(const char* filename, int mode)
{ {
DPRINT("_creat('%s', mode %x)\n", filename, mode); DPRINT("_creat('%s', mode %x)\n", filename, mode);

View file

@ -1,9 +1,12 @@
/* $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 <windows.h>
#include <msvcrt/io.h> #include <msvcrt/io.h>
#include <msvcrt/internal/file.h> #include <msvcrt/internal/file.h>
/*
* @implemented
*/
int _dup(int handle) int _dup(int handle)
{ {
HANDLE hFile; HANDLE hFile;

View file

@ -1,6 +1,9 @@
#include <msvcrt/io.h> #include <msvcrt/io.h>
#include <msvcrt/internal/file.h> #include <msvcrt/internal/file.h>
/*
* @implemented
*/
int _dup2(int handle1, int handle2) int _dup2(int handle1, int handle2)
{ {
return __fileno_dup2(handle1, handle2); return __fileno_dup2(handle1, handle2);

View file

@ -1,6 +1,9 @@
//#include <windows.h> //#include <windows.h>
#include <msvcrt/io.h> #include <msvcrt/io.h>
/*
* @implemented
*/
int _eof(int _fd) int _eof(int _fd)
{ {
__int64 cur_pos = _lseeki64(_fd, 0, SEEK_CUR); __int64 cur_pos = _lseeki64(_fd, 0, SEEK_CUR);

View file

@ -2,6 +2,9 @@
#include <msvcrt/io.h> #include <msvcrt/io.h>
/*
* @implemented
*/
long _filelength(int _fd) long _filelength(int _fd)
{ {
return GetFileSize(_get_osfhandle(_fd), NULL); return GetFileSize(_get_osfhandle(_fd), NULL);

View file

@ -2,6 +2,9 @@
#include <msvcrt/io.h> #include <msvcrt/io.h>
/*
* @implemented
*/
__int64 _filelengthi64(int _fd) __int64 _filelengthi64(int _fd)
{ {
long lo_length, hi_length; long lo_length, hi_length;

View file

@ -4,6 +4,9 @@
#include <msvcrt/internal/file.h> #include <msvcrt/internal/file.h>
/*
* @implemented
*/
int _findclose(int handle) int _findclose(int handle)
{ {
// check no wildcards or invalid handle // check no wildcards or invalid handle
@ -12,6 +15,9 @@ int _findclose(int handle)
return FindClose((void*)handle); return FindClose((void*)handle);
} }
/*
* @implemented
*/
int _findfirst(const char* _name, struct _finddata_t* result) int _findfirst(const char* _name, struct _finddata_t* result)
{ {
WIN32_FIND_DATAA FindFileData; WIN32_FIND_DATAA FindFileData;
@ -54,6 +60,9 @@ int _findfirst(const char* _name, struct _finddata_t* result)
return hFindFile; return hFindFile;
} }
/*
* @implemented
*/
int _findnext(int handle, struct _finddata_t* result) int _findnext(int handle, struct _finddata_t* result)
{ {
WIN32_FIND_DATAA FindFileData; WIN32_FIND_DATAA FindFileData;

View file

@ -5,6 +5,9 @@
#undef _fmode #undef _fmode
unsigned int _fmode = O_TEXT; unsigned int _fmode = O_TEXT;
/*
* @implemented
*/
unsigned int *__p__fmode(void) unsigned int *__p__fmode(void)
{ {
return &_fmode; return &_fmode;

View file

@ -4,6 +4,9 @@
#define NDEBUG #define NDEBUG
#include <msvcrt/msvcrtdbg.h> #include <msvcrt/msvcrtdbg.h>
/*
* @implemented
*/
int _isatty( int fd ) int _isatty( int fd )
{ {
struct stat buf; struct stat buf;

View file

@ -2,6 +2,9 @@
#include <msvcrt/io.h> #include <msvcrt/io.h>
/*
* @implemented
*/
int _locking(int _fd, int mode, long nbytes) int _locking(int _fd, int mode, long nbytes)
{ {
long offset = _lseek(_fd, 0L, 1); long offset = _lseek(_fd, 0L, 1);

View file

@ -3,6 +3,9 @@
#include <msvcrt/internal/file.h> #include <msvcrt/internal/file.h>
/*
* @implemented
*/
long _lseek(int _fildes, long _offset, int _whence) long _lseek(int _fildes, long _offset, int _whence)
{ {
return (SetFilePointer((HANDLE)filehnd(_fildes), _offset, NULL, _whence)); return (SetFilePointer((HANDLE)filehnd(_fildes), _offset, NULL, _whence));

View file

@ -5,6 +5,9 @@
//#define SETFILEPOINTEREX_AVAILABLE //#define SETFILEPOINTEREX_AVAILABLE
/*
* @implemented
*/
__int64 _lseeki64(int _fildes, __int64 _offset, int _whence) __int64 _lseeki64(int _fildes, __int64 _offset, int _whence)
{ {
#ifdef SETFILEPOINTEREX_AVAILABLE #ifdef SETFILEPOINTEREX_AVAILABLE

View file

@ -21,6 +21,9 @@
#include <msvcrt/msvcrtdbg.h> #include <msvcrt/msvcrtdbg.h>
/*
* @implemented
*/
char* _mktemp(char* _template) char* _mktemp(char* _template)
{ {
static int count = 0; static int count = 0;

View file

@ -1,4 +1,4 @@
/* $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 * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries * PROJECT: ReactOS system libraries
@ -91,6 +91,9 @@ char __is_text_file(FILE* p)
return (!((p)->_flag&_IOSTRG) && (__pioinfo[(p)->_file].mode&O_TEXT)); return (!((p)->_flag&_IOSTRG) && (__pioinfo[(p)->_file].mode&O_TEXT));
} }
/*
* @implemented
*/
int _open(const char* _path, int _oflag,...) int _open(const char* _path, int _oflag,...)
{ {
#if !defined(NDEBUG) && defined(DBG) #if !defined(NDEBUG) && defined(DBG)
@ -279,11 +282,17 @@ int __fileno_close(int _fd)
return 0; return 0;
} }
/*
* @implemented
*/
int _open_osfhandle(void* osfhandle, int flags) int _open_osfhandle(void* osfhandle, int flags)
{ {
return __fileno_alloc((HANDLE)osfhandle, flags); return __fileno_alloc((HANDLE)osfhandle, flags);
} }
/*
* @implemented
*/
void* _get_osfhandle( int fileno ) void* _get_osfhandle( int fileno )
{ {
return filehnd(fileno); return filehnd(fileno);

View file

@ -1,4 +1,4 @@
/* $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 * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries * PROJECT: ReactOS system libraries
@ -14,6 +14,9 @@
#include <msvcrt/internal/file.h> #include <msvcrt/internal/file.h>
/*
* @implemented
*/
int _pipe(int _fildes[2], unsigned int size, int mode ) int _pipe(int _fildes[2], unsigned int size, int mode )
{ {
HANDLE hReadPipe, hWritePipe; HANDLE hReadPipe, hWritePipe;

View file

@ -1,4 +1,4 @@
/* $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 * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries * PROJECT: ReactOS system libraries
@ -18,6 +18,9 @@
#define NDEBUG #define NDEBUG
#include <msvcrt/msvcrtdbg.h> #include <msvcrt/msvcrtdbg.h>
/*
* @implemented
*/
size_t _read(int _fd, void *_buf, size_t _nbyte) size_t _read(int _fd, void *_buf, size_t _nbyte)
{ {
DWORD _rbyte = 0, nbyte = _nbyte; DWORD _rbyte = 0, nbyte = _nbyte;

View file

@ -1,4 +1,4 @@
/* $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 * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries * PROJECT: ReactOS system libraries
@ -17,6 +17,9 @@
#include <msvcrt/msvcrtdbg.h> #include <msvcrt/msvcrtdbg.h>
/*
* @implemented
*/
int _setmode(int _fd, int _newmode) int _setmode(int _fd, int _newmode)
{ {
DPRINT("_setmod(fd %d, newmode %x)\n", _fd, _newmode); DPRINT("_setmod(fd %d, newmode %x)\n", _fd, _newmode);

View file

@ -1,6 +1,9 @@
#include <msvcrt/io.h> #include <msvcrt/io.h>
/*
* @implemented
*/
int _sopen(char *path, int access, int shflag, int mode) int _sopen(char *path, int access, int shflag, int mode)
{ {
return _open((path), (access)|(shflag), (mode)); return _open((path), (access)|(shflag), (mode));

View file

@ -3,6 +3,9 @@
#include <msvcrt/io.h> #include <msvcrt/io.h>
/*
* @implemented
*/
off_t _tell(int _file) off_t _tell(int _file)
{ {
return _lseek(_file, 0, SEEK_CUR); return _lseek(_file, 0, SEEK_CUR);

View file

@ -2,6 +2,9 @@
#include <msvcrt/io.h> #include <msvcrt/io.h>
/*
* @implemented
*/
__int64 _telli64(int _file) __int64 _telli64(int _file)
{ {
return _lseeki64(_file, 0, SEEK_CUR); return _lseeki64(_file, 0, SEEK_CUR);

View file

@ -3,6 +3,9 @@
unsigned _unMode_dll = 022; unsigned _unMode_dll = 022;
/*
* @implemented
*/
unsigned _umask (unsigned unMode) unsigned _umask (unsigned unMode)
{ {
unsigned old_mask = _unMode_dll; unsigned old_mask = _unMode_dll;

View file

@ -14,6 +14,9 @@
#include <msvcrt/msvcrtdbg.h> #include <msvcrt/msvcrtdbg.h>
/*
* @implemented
*/
int _unlink(const char* filename) int _unlink(const char* filename)
{ {
int result = 0; int result = 0;

View file

@ -5,6 +5,9 @@
#include <msvcrt/internal/file.h> #include <msvcrt/internal/file.h>
/*
* @implemented
*/
int _utime(const char* filename, struct _utimbuf* buf) int _utime(const char* filename, struct _utimbuf* buf)
{ {
int fn; int fn;

View file

@ -5,6 +5,9 @@
#include <msvcrt/msvcrtdbg.h> #include <msvcrt/msvcrtdbg.h>
/*
* @implemented
*/
int _waccess(const wchar_t *_path, int _amode) int _waccess(const wchar_t *_path, int _amode)
{ {
DWORD Attributes = GetFileAttributesW(_path); DWORD Attributes = GetFileAttributesW(_path);

View file

@ -7,6 +7,9 @@
#define mode_t int #define mode_t int
/*
* @implemented
*/
int _wchmod(const wchar_t* filename, mode_t mode) int _wchmod(const wchar_t* filename, mode_t mode)
{ {
DWORD FileAttributes = 0; DWORD FileAttributes = 0;

View file

@ -5,6 +5,9 @@
#include <msvcrt/msvcrtdbg.h> #include <msvcrt/msvcrtdbg.h>
/*
* @implemented
*/
int _wcreat(const wchar_t* filename, int mode) int _wcreat(const wchar_t* filename, int mode)
{ {
DPRINT("_wcreat('%S', mode %x)\n", filename, mode); DPRINT("_wcreat('%S', mode %x)\n", filename, mode);

View file

@ -4,6 +4,9 @@
#include <msvcrt/internal/file.h> #include <msvcrt/internal/file.h>
/*
* @implemented
*/
int _wfindfirst(const wchar_t* _name, struct _wfinddata_t* result) int _wfindfirst(const wchar_t* _name, struct _wfinddata_t* result)
{ {
WIN32_FIND_DATAW FindFileData; WIN32_FIND_DATAW FindFileData;
@ -45,6 +48,9 @@ int _wfindfirst(const wchar_t* _name, struct _wfinddata_t* result)
return hFindFile; return hFindFile;
} }
/*
* @implemented
*/
int _findfirsti64(const char *_name, struct _finddatai64_t *result) int _findfirsti64(const char *_name, struct _finddatai64_t *result)
{ {
WIN32_FIND_DATAA FindFileData; WIN32_FIND_DATAA FindFileData;
@ -90,6 +96,9 @@ int _findfirsti64(const char *_name, struct _finddatai64_t *result)
return hFindFile; return hFindFile;
} }
/*
* @implemented
*/
int _findnexti64(int handle, struct _finddatai64_t *result) int _findnexti64(int handle, struct _finddatai64_t *result)
{ {
WIN32_FIND_DATAA FindFileData; WIN32_FIND_DATAA FindFileData;
@ -112,6 +121,9 @@ int _findnexti64(int handle, struct _finddatai64_t *result)
return 0; return 0;
} }
/*
* @implemented
*/
int _wfindfirsti64(const wchar_t *_name, struct _wfinddatai64_t *result) int _wfindfirsti64(const wchar_t *_name, struct _wfinddatai64_t *result)
{ {
WIN32_FIND_DATAW FindFileData; WIN32_FIND_DATAW FindFileData;
@ -159,6 +171,9 @@ int _wfindfirsti64(const wchar_t *_name, struct _wfinddatai64_t *result)
return hFindFile; return hFindFile;
} }
/*
* @implemented
*/
int _wfindnext(int handle, struct _wfinddata_t *result) int _wfindnext(int handle, struct _wfinddata_t *result)
{ {
WIN32_FIND_DATAW FindFileData; WIN32_FIND_DATAW FindFileData;
@ -180,6 +195,9 @@ int _wfindnext(int handle, struct _wfinddata_t *result)
return 0; return 0;
} }
/*
* @implemented
*/
int _wfindnexti64(int handle, struct _wfinddatai64_t *result) int _wfindnexti64(int handle, struct _wfinddatai64_t *result)
{ {
WIN32_FIND_DATAW FindFileData; WIN32_FIND_DATAW FindFileData;

View file

@ -21,6 +21,9 @@
#include <msvcrt/msvcrtdbg.h> #include <msvcrt/msvcrtdbg.h>
/*
* @implemented
*/
wchar_t* _wmktemp (wchar_t *_template) wchar_t* _wmktemp (wchar_t *_template)
{ {
static int count = 0; static int count = 0;

View file

@ -1,4 +1,4 @@
/* $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 * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries * PROJECT: ReactOS system libraries
@ -29,6 +29,9 @@
#include <msvcrt/msvcrtdbg.h> #include <msvcrt/msvcrtdbg.h>
/*
* @implemented
*/
int _wopen(const wchar_t* _path, int _oflag, ...) int _wopen(const wchar_t* _path, int _oflag, ...)
{ {
#if !defined(NDEBUG) && defined(DBG) #if !defined(NDEBUG) && defined(DBG)
@ -134,6 +137,9 @@ int _wopen(const wchar_t* _path, int _oflag, ...)
return __fileno_alloc(hFile,_oflag); return __fileno_alloc(hFile,_oflag);
} }
/*
* @implemented
*/
int _wsopen(wchar_t* path, int access, int shflag, int mode) int _wsopen(wchar_t* path, int access, int shflag, int mode)
{ {
return _wopen((path), (access)|(shflag), (mode)); return _wopen((path), (access)|(shflag), (mode));

View file

@ -32,6 +32,9 @@ void ReportLastError(void)
} }
} }
*/ */
/*
* @implemented
*/
size_t _write(int _fd, const void* _buf, size_t _nbyte) size_t _write(int _fd, const void* _buf, size_t _nbyte)
{ {
char *tmp, *in, *out; char *tmp, *in, *out;

View file

@ -14,6 +14,9 @@
#include <msvcrt/msvcrtdbg.h> #include <msvcrt/msvcrtdbg.h>
/*
* @implemented
*/
int _wunlink(const wchar_t* filename) int _wunlink(const wchar_t* filename)
{ {
DPRINT("_wunlink('%S')\n", filename); DPRINT("_wunlink('%S')\n", filename);

View file

@ -5,6 +5,9 @@
#include <msvcrt/internal/file.h> #include <msvcrt/internal/file.h>
/*
* @implemented
*/
int _wutime(const wchar_t* filename, struct _utimbuf* buf) int _wutime(const wchar_t* filename, struct _utimbuf* buf)
{ {
int fn; int fn;

View file

@ -9,6 +9,9 @@ const char *_current_locale;
int parse_locale(char *locale, char *lang, char *country, char *code_page); int parse_locale(char *locale, char *lang, char *country, char *code_page);
/*
* @implemented
*/
char *setlocale(int category, const char *locale) char *setlocale(int category, const char *locale)
{ {
char lang[100]; char lang[100];
@ -135,6 +138,9 @@ struct lconv _lconv = {
127 // n_sign_posn; 127 // n_sign_posn;
}; };
/*
* @implemented
*/
struct lconv *localeconv(void) struct lconv *localeconv(void)
{ {
return (struct lconv *) &_lconv; return (struct lconv *) &_lconv;

View file

@ -3,6 +3,9 @@
double atan2 (double __y, double __x); double atan2 (double __y, double __x);
/*
* @implemented
*/
double atan2 (double __y, double __x) double atan2 (double __y, double __x)
{ {
register double __value; register double __value;

View file

@ -1,5 +1,8 @@
#include <msvcrt/math.h> #include <msvcrt/math.h>
/*
* @implemented
*/
double _cabs( struct _complex z ) double _cabs( struct _complex z )
{ {
return sqrt( z.x*z.x + z.y*z.y ); return sqrt( z.x*z.x + z.y*z.y );

View file

@ -1,5 +1,8 @@
#include <msvcrt/math.h> #include <msvcrt/math.h>
/*
* @implemented
*/
double ceil (double __x) double ceil (double __x)
{ {
register double __value; register double __value;

View file

@ -2,6 +2,9 @@
double cos (double __x); double cos (double __x);
/*
* @implemented
*/
double cos (double __x) double cos (double __x)
{ {
register double __value; register double __value;

View file

@ -2,6 +2,9 @@
#include <msvcrt/math.h> #include <msvcrt/math.h>
/*
* @implemented
*/
double cosh(double x) double cosh(double x)
{ {
const double ebig = exp(fabs(x)); const double ebig = exp(fabs(x));

View file

@ -2,6 +2,9 @@
#include <msvcrt/stdlib.h> #include <msvcrt/stdlib.h>
#include <msvcrt/internal/ieee.h> #include <msvcrt/internal/ieee.h>
/*
* @implemented
*/
double double
frexp(double __x, int *exptr) frexp(double __x, int *exptr)
{ {

View file

@ -26,6 +26,9 @@
#define __SQRT_DBL_MAX 1.3e+154 #define __SQRT_DBL_MAX 1.3e+154
#define __SQRT_DBL_MIN 2.3e-162 #define __SQRT_DBL_MIN 2.3e-162
/*
* @implemented
*/
double double
_hypot(double x, double y) _hypot(double x, double y)
{ {

View file

@ -1,11 +1,17 @@
#include <msvcrt/math.h> #include <msvcrt/math.h>
/*
* @unimplemented
*/
double _j0(double x) double _j0(double x)
{ {
return x; return x;
} }
/*
* @unimplemented
*/
double _y0(double x) double _y0(double x)
{ {
return x; return x;

Some files were not shown because too many files have changed in this diff Show more