mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 22:16:04 +00:00
Further reduced differences and include all identical msvcrt targets in crtdll makefile.
svn path=/trunk/; revision=3809
This commit is contained in:
parent
b5cd7d30a0
commit
1b135b8732
109 changed files with 717 additions and 750 deletions
|
@ -13,11 +13,11 @@
|
|||
#undef isalnum
|
||||
int isalnum(int c)
|
||||
{
|
||||
return _isctype(c,_ALPHA | _DIGIT);
|
||||
return _isctype(c, _ALPHA | _DIGIT);
|
||||
}
|
||||
|
||||
#undef iswalnum
|
||||
int iswalnum(wint_t c)
|
||||
{
|
||||
return iswctype(c,_ALPHA | _DIGIT);
|
||||
return iswctype(c, _ALPHA | _DIGIT);
|
||||
}
|
||||
|
|
|
@ -1,16 +1,18 @@
|
|||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS system libraries
|
||||
* FILE: lib/crtdll/conio/putch.c
|
||||
* FILE: lib/crtdll/ctype/isalpha.c
|
||||
* PURPOSE: Checks if a character is alphanumeric
|
||||
* PROGRAMER: Boudewijn Dekker
|
||||
* UPDATE HISTORY:
|
||||
* 28/12/98: Created
|
||||
*/
|
||||
|
||||
#include <msvcrt/ctype.h>
|
||||
|
||||
|
||||
#undef isalpha
|
||||
|
||||
int isalpha(int c)
|
||||
{
|
||||
return _isctype(c, _ALPHA);
|
||||
|
|
|
@ -12,10 +12,10 @@
|
|||
|
||||
int __isascii(int c)
|
||||
{
|
||||
return (!((c)&(~0x7f))) ;
|
||||
return (!((c)&(~0x7f)));
|
||||
}
|
||||
|
||||
int iswascii(wint_t c)
|
||||
{
|
||||
return __isascii(c);
|
||||
return __isascii(c);
|
||||
}
|
||||
|
|
|
@ -7,8 +7,10 @@
|
|||
* UPDATE HISTORY:
|
||||
* 28/12/98: Created
|
||||
*/
|
||||
|
||||
#include <msvcrt/ctype.h>
|
||||
|
||||
|
||||
#undef isspace
|
||||
int isspace(int c)
|
||||
{
|
||||
|
|
|
@ -3,11 +3,11 @@
|
|||
#include <msvcrt/direct.h>
|
||||
|
||||
|
||||
int _chdir( const char *_path )
|
||||
int _chdir(const char* _path)
|
||||
{
|
||||
if ( _path[1] == ':')
|
||||
_chdrive(tolower(_path[0] - 'a')+1);
|
||||
if ( !SetCurrentDirectoryA((char *)_path) )
|
||||
return -1;
|
||||
return 0;
|
||||
if (_path[1] == ':')
|
||||
_chdrive(tolower(_path[0] - 'a')+1);
|
||||
if (!SetCurrentDirectoryA((char*)_path))
|
||||
return -1;
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -7,18 +7,18 @@
|
|||
int cur_drive = 0;
|
||||
|
||||
|
||||
int _chdrive( int drive )
|
||||
int _chdrive(int drive)
|
||||
{
|
||||
char d[3];
|
||||
if (!( drive >= 1 && drive <= 26 ))
|
||||
return -1;
|
||||
char d[3];
|
||||
|
||||
if ( cur_drive != drive ) {
|
||||
cur_drive = drive;
|
||||
d[0] = toupper(cur_drive + '@');
|
||||
d[1] = ':';
|
||||
d[2] = 0;
|
||||
SetCurrentDirectoryA(d);
|
||||
}
|
||||
return 0;
|
||||
if (!( drive >= 1 && drive <= 26))
|
||||
return -1;
|
||||
if (cur_drive != drive) {
|
||||
cur_drive = drive;
|
||||
d[0] = toupper(cur_drive + '@');
|
||||
d[1] = ':';
|
||||
d[2] = 0;
|
||||
SetCurrentDirectoryA(d);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -3,20 +3,20 @@
|
|||
#include <msvcrt/stdlib.h>
|
||||
|
||||
|
||||
char *_getcwd( char *buffer, int maxlen )
|
||||
char *_getcwd(char* buffer, int maxlen)
|
||||
{
|
||||
char *cwd;
|
||||
int len;
|
||||
char *cwd;
|
||||
int len;
|
||||
|
||||
if ( buffer == NULL ) {
|
||||
cwd = malloc(MAX_PATH);
|
||||
len = MAX_PATH;
|
||||
} else {
|
||||
cwd = buffer;
|
||||
len = maxlen;
|
||||
}
|
||||
if (GetCurrentDirectoryA(len, cwd) == 0) {
|
||||
return NULL;
|
||||
if (buffer == NULL) {
|
||||
cwd = malloc(MAX_PATH);
|
||||
len = MAX_PATH;
|
||||
} else {
|
||||
cwd = buffer;
|
||||
len = maxlen;
|
||||
}
|
||||
return cwd;
|
||||
if (GetCurrentDirectoryA(len, cwd) == 0) {
|
||||
return NULL;
|
||||
}
|
||||
return cwd;
|
||||
}
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
#include <windows.h>
|
||||
#include <msvcrt/direct.h>
|
||||
|
||||
char* _getdcwd (int nDrive, char* caBuffer, int nBufLen)
|
||||
char* _getdcwd(int nDrive, char* caBuffer, int nBufLen)
|
||||
{
|
||||
int i =0;
|
||||
int dr = _getdrive();
|
||||
|
||||
if ( nDrive < 1 || nDrive > 26 )
|
||||
return NULL;
|
||||
if ( dr != nDrive )
|
||||
_chdrive(nDrive);
|
||||
i = GetCurrentDirectoryA(nBufLen,caBuffer);
|
||||
if ( i == nBufLen )
|
||||
return NULL;
|
||||
if ( dr != nDrive )
|
||||
_chdrive(dr);
|
||||
return caBuffer;
|
||||
int i =0;
|
||||
int dr = _getdrive();
|
||||
|
||||
if (nDrive < 1 || nDrive > 26)
|
||||
return NULL;
|
||||
if (dr != nDrive)
|
||||
_chdrive(nDrive);
|
||||
i = GetCurrentDirectoryA(nBufLen, caBuffer);
|
||||
if (i == nBufLen)
|
||||
return NULL;
|
||||
if (dr != nDrive)
|
||||
_chdrive(dr);
|
||||
return caBuffer;
|
||||
}
|
||||
|
|
|
@ -3,18 +3,18 @@
|
|||
#include <msvcrt/direct.h>
|
||||
|
||||
|
||||
unsigned int _getdiskfree(unsigned int _drive, struct _diskfree_t *_diskspace)
|
||||
unsigned int _getdiskfree(unsigned int _drive, struct _diskfree_t* _diskspace)
|
||||
{
|
||||
char RootPathName[10];
|
||||
RootPathName[0] = toupper(_drive +'@');
|
||||
RootPathName[1] = ':';
|
||||
RootPathName[2] = '\\';
|
||||
RootPathName[3] = 0;
|
||||
if ( _diskspace == NULL )
|
||||
return 0;
|
||||
char RootPathName[10];
|
||||
|
||||
if ( !GetDiskFreeSpaceA(RootPathName,(LPDWORD)&_diskspace->sectors_per_cluster,(LPDWORD)&_diskspace->bytes_per_sector,
|
||||
(LPDWORD )&_diskspace->avail_clusters,(LPDWORD )&_diskspace->total_clusters ) )
|
||||
return 0;
|
||||
return _diskspace->avail_clusters;
|
||||
RootPathName[0] = toupper(_drive +'@');
|
||||
RootPathName[1] = ':';
|
||||
RootPathName[2] = '\\';
|
||||
RootPathName[3] = 0;
|
||||
if (_diskspace == NULL)
|
||||
return 0;
|
||||
if (!GetDiskFreeSpaceA(RootPathName,(LPDWORD)&_diskspace->sectors_per_cluster,(LPDWORD)&_diskspace->bytes_per_sector,
|
||||
(LPDWORD )&_diskspace->avail_clusters,(LPDWORD )&_diskspace->total_clusters))
|
||||
return 0;
|
||||
return _diskspace->avail_clusters;
|
||||
}
|
||||
|
|
|
@ -5,21 +5,20 @@
|
|||
|
||||
extern int cur_drive;
|
||||
|
||||
int _getdrive( void )
|
||||
int _getdrive(void)
|
||||
{
|
||||
char Buffer[MAX_PATH];
|
||||
char Buffer[MAX_PATH];
|
||||
|
||||
if ( cur_drive == 0 ) {
|
||||
GetCurrentDirectoryA(MAX_PATH,Buffer);
|
||||
cur_drive = toupper(Buffer[0] - '@');
|
||||
}
|
||||
|
||||
return cur_drive;
|
||||
if (cur_drive == 0) {
|
||||
GetCurrentDirectoryA(MAX_PATH, Buffer);
|
||||
cur_drive = toupper(Buffer[0] - '@');
|
||||
}
|
||||
return cur_drive;
|
||||
}
|
||||
|
||||
unsigned long _getdrives(void)
|
||||
{
|
||||
//fixme get logical drives
|
||||
//return GetLogicalDrives();
|
||||
return 5; // drive A and C
|
||||
return 5; // drive A and C
|
||||
}
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
#include <msvcrt/direct.h>
|
||||
|
||||
|
||||
int _mkdir( const char *_path )
|
||||
int _mkdir(const char* _path)
|
||||
{
|
||||
if (!CreateDirectoryA(_path,NULL))
|
||||
return -1;
|
||||
return 0;
|
||||
if (!CreateDirectoryA(_path, NULL))
|
||||
return -1;
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
#include <msvcrt/direct.h>
|
||||
|
||||
|
||||
int _rmdir( const char *_path )
|
||||
int _rmdir(const char* _path)
|
||||
{
|
||||
if (!RemoveDirectoryA(_path))
|
||||
return -1;
|
||||
return 0;
|
||||
if (!RemoveDirectoryA(_path))
|
||||
return -1;
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -14,13 +14,13 @@ int _findclose(int handle)
|
|||
|
||||
int _findfirst(const char* _name, struct _finddata_t* result)
|
||||
{
|
||||
WIN32_FIND_DATA FindFileData;
|
||||
WIN32_FIND_DATAA FindFileData;
|
||||
char dir[MAX_PATH];
|
||||
long hFindFile;
|
||||
int len = 0;
|
||||
|
||||
if (_name == NULL || _name[0] == 0) {
|
||||
len = GetCurrentDirectory(MAX_PATH-4,dir);
|
||||
len = GetCurrentDirectoryA(MAX_PATH-4,dir);
|
||||
if (dir[len-1] != '\\') {
|
||||
dir[len] = '\\';
|
||||
dir[len+1] = 0;
|
||||
|
@ -41,7 +41,7 @@ int _findfirst(const char* _name, struct _finddata_t* result)
|
|||
result->time_access = FileTimeToUnixTime(&FindFileData.ftLastAccessTime,NULL);
|
||||
result->time_write = FileTimeToUnixTime(&FindFileData.ftLastWriteTime,NULL);
|
||||
result->size = FindFileData.nFileSizeLow;
|
||||
strncpy(result->name,FindFileData.cFileName,260);
|
||||
strncpy(result->name,FindFileData.cFileName,MAX_PATH);
|
||||
|
||||
// if no wildcard the find file handle can be closed right away
|
||||
// a return value of 0 can flag this.
|
||||
|
@ -56,7 +56,7 @@ int _findfirst(const char* _name, struct _finddata_t* result)
|
|||
|
||||
int _findnext(int handle, struct _finddata_t* result)
|
||||
{
|
||||
WIN32_FIND_DATA FindFileData;
|
||||
WIN32_FIND_DATAA FindFileData;
|
||||
|
||||
// check no wildcards or invalid handle
|
||||
if (handle == 0 || handle == -1)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: setmode.c,v 1.5 2002/11/24 18:42:13 robd Exp $
|
||||
/* $Id: setmode.c,v 1.6 2002/11/29 15:59:00 robd Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS system libraries
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $Id: makefile,v 1.50 2002/11/24 18:42:12 robd Exp $
|
||||
# $Id: makefile,v 1.51 2002/11/29 15:58:59 robd Exp $
|
||||
|
||||
PATH_TO_TOP = ../..
|
||||
|
||||
|
@ -52,45 +52,45 @@ include $(TOOLS_PATH)/helper.mk
|
|||
|
||||
|
||||
CONIO_OBJECTS = \
|
||||
conio/cgets.o \
|
||||
conio/cprintf.o \
|
||||
conio/cputs.o \
|
||||
conio/cscanf.o \
|
||||
conio/getch.o \
|
||||
conio/getche.o \
|
||||
conio/kbhit.o \
|
||||
conio/putch.o \
|
||||
conio/ungetch.o
|
||||
$(PATH_TO_MSVCRT)/conio/cgets.o \
|
||||
$(PATH_TO_MSVCRT)/conio/cprintf.o \
|
||||
$(PATH_TO_MSVCRT)/conio/cputs.o \
|
||||
$(PATH_TO_MSVCRT)/conio/cscanf.o \
|
||||
$(PATH_TO_MSVCRT)/conio/getch.o \
|
||||
$(PATH_TO_MSVCRT)/conio/getche.o \
|
||||
$(PATH_TO_MSVCRT)/conio/kbhit.o \
|
||||
$(PATH_TO_MSVCRT)/conio/putch.o \
|
||||
$(PATH_TO_MSVCRT)/conio/ungetch.o
|
||||
|
||||
CTYPE_OBJECTS = \
|
||||
ctype/ctype.o \
|
||||
ctype/isalnum.o \
|
||||
ctype/isalpha.o \
|
||||
ctype/isascii.o \
|
||||
ctype/iscntrl.o \
|
||||
ctype/isdigit.o \
|
||||
ctype/isgraph.o \
|
||||
ctype/islower.o \
|
||||
ctype/isprint.o \
|
||||
ctype/ispunct.o \
|
||||
ctype/isspace.o \
|
||||
ctype/isupper.o \
|
||||
ctype/isxdigit.o \
|
||||
ctype/toascii.o \
|
||||
ctype/tolower.o \
|
||||
ctype/toupper.o \
|
||||
ctype/iscsym.o \
|
||||
$(PATH_TO_MSVCRT)/ctype/ctype.o \
|
||||
$(PATH_TO_MSVCRT)/ctype/isalnum.o \
|
||||
$(PATH_TO_MSVCRT)/ctype/isalpha.o \
|
||||
$(PATH_TO_MSVCRT)/ctype/isascii.o \
|
||||
$(PATH_TO_MSVCRT)/ctype/iscntrl.o \
|
||||
$(PATH_TO_MSVCRT)/ctype/isdigit.o \
|
||||
$(PATH_TO_MSVCRT)/ctype/isgraph.o \
|
||||
$(PATH_TO_MSVCRT)/ctype/islower.o \
|
||||
$(PATH_TO_MSVCRT)/ctype/isprint.o \
|
||||
$(PATH_TO_MSVCRT)/ctype/ispunct.o \
|
||||
$(PATH_TO_MSVCRT)/ctype/isspace.o \
|
||||
$(PATH_TO_MSVCRT)/ctype/isupper.o \
|
||||
$(PATH_TO_MSVCRT)/ctype/isxdigit.o \
|
||||
$(PATH_TO_MSVCRT)/ctype/toascii.o \
|
||||
$(PATH_TO_MSVCRT)/ctype/tolower.o \
|
||||
$(PATH_TO_MSVCRT)/ctype/toupper.o \
|
||||
$(PATH_TO_MSVCRT)/ctype/iscsym.o \
|
||||
ctype/isctype.o
|
||||
|
||||
DIRECT_OBJECTS = \
|
||||
direct/chdir.o \
|
||||
direct/chdrive.o \
|
||||
direct/getcwd.o \
|
||||
direct/getdcwd.o \
|
||||
direct/getdfree.o \
|
||||
direct/getdrive.o \
|
||||
direct/mkdir.o \
|
||||
direct/rmdir.o
|
||||
$(PATH_TO_MSVCRT)/direct/chdir.o \
|
||||
$(PATH_TO_MSVCRT)/direct/chdrive.o \
|
||||
$(PATH_TO_MSVCRT)/direct/getcwd.o \
|
||||
$(PATH_TO_MSVCRT)/direct/getdcwd.o \
|
||||
$(PATH_TO_MSVCRT)/direct/getdfree.o \
|
||||
$(PATH_TO_MSVCRT)/direct/getdrive.o \
|
||||
$(PATH_TO_MSVCRT)/direct/mkdir.o \
|
||||
$(PATH_TO_MSVCRT)/direct/rmdir.o
|
||||
|
||||
EXCEPT_OBJECTS = \
|
||||
except/abnorter.o \
|
||||
|
@ -99,159 +99,159 @@ EXCEPT_OBJECTS = \
|
|||
except/unwind.o
|
||||
|
||||
FLOAT_OBJECTS = \
|
||||
float/chgsign.o \
|
||||
float/clearfp.o \
|
||||
float/cntrlfp.o \
|
||||
float/copysign.o \
|
||||
float/fpclass.o \
|
||||
float/fpreset.o \
|
||||
float/isnan.o \
|
||||
float/logb.o \
|
||||
float/nafter.o \
|
||||
float/scalb.o \
|
||||
float/statfp.o
|
||||
$(PATH_TO_MSVCRT)/float/chgsign.o \
|
||||
$(PATH_TO_MSVCRT)/float/clearfp.o \
|
||||
$(PATH_TO_MSVCRT)/float/cntrlfp.o \
|
||||
$(PATH_TO_MSVCRT)/float/copysign.o \
|
||||
$(PATH_TO_MSVCRT)/float/fpclass.o \
|
||||
$(PATH_TO_MSVCRT)/float/fpreset.o \
|
||||
$(PATH_TO_MSVCRT)/float/isnan.o \
|
||||
$(PATH_TO_MSVCRT)/float/logb.o \
|
||||
$(PATH_TO_MSVCRT)/float/nafter.o \
|
||||
$(PATH_TO_MSVCRT)/float/scalb.o \
|
||||
$(PATH_TO_MSVCRT)/float/statfp.o
|
||||
|
||||
IO_OBJECTS = \
|
||||
io/access.o \
|
||||
io/chmod.o \
|
||||
io/chsize.o \
|
||||
io/close.o \
|
||||
io/commit.o \
|
||||
$(PATH_TO_MSVCRT)/io/access.o \
|
||||
$(PATH_TO_MSVCRT)/io/chmod.o \
|
||||
$(PATH_TO_MSVCRT)/io/chsize.o \
|
||||
$(PATH_TO_MSVCRT)/io/close.o \
|
||||
$(PATH_TO_MSVCRT)/io/commit.o \
|
||||
io/create.o \
|
||||
io/dup.o \
|
||||
io/dup2.o \
|
||||
$(PATH_TO_MSVCRT)/io/dup2.o \
|
||||
io/eof.o \
|
||||
io/filelen.o \
|
||||
$(PATH_TO_MSVCRT)/io/filelen.o \
|
||||
io/find.o \
|
||||
io/fmode.o \
|
||||
io/isatty.o \
|
||||
io/locking.o \
|
||||
$(PATH_TO_MSVCRT)/io/isatty.o \
|
||||
$(PATH_TO_MSVCRT)/io/locking.o \
|
||||
io/lseek.o \
|
||||
io/mktemp.o \
|
||||
$(PATH_TO_MSVCRT)/io/mktemp.o \
|
||||
io/open.o \
|
||||
io/pipe.o \
|
||||
io/read.o \
|
||||
io/setmode.o \
|
||||
io/sopen.o \
|
||||
io/tell.o \
|
||||
io/umask.o \
|
||||
$(PATH_TO_MSVCRT)/io/setmode.o \
|
||||
$(PATH_TO_MSVCRT)/io/sopen.o \
|
||||
$(PATH_TO_MSVCRT)/io/tell.o \
|
||||
$(PATH_TO_MSVCRT)/io/umask.o \
|
||||
io/unlink.o \
|
||||
io/utime.o \
|
||||
$(PATH_TO_MSVCRT)/io/utime.o \
|
||||
io/write.o
|
||||
|
||||
LOCALE_OBJECTS = \
|
||||
locale/locale.o
|
||||
$(PATH_TO_MSVCRT)/locale/locale.o
|
||||
|
||||
MATH_OBJECTS = \
|
||||
math/acos.o \
|
||||
$(PATH_TO_MSVCRT)/math/acos.o \
|
||||
math/acosh.o \
|
||||
math/asin.o \
|
||||
$(PATH_TO_MSVCRT)/math/asin.o \
|
||||
math/asinh.o \
|
||||
math/atan.o \
|
||||
math/atan2.o\
|
||||
$(PATH_TO_MSVCRT)/math/atan.o \
|
||||
$(PATH_TO_MSVCRT)/math/atan2.o\
|
||||
math/atanh.o \
|
||||
math/cabs.o \
|
||||
$(PATH_TO_MSVCRT)/math/cabs.o \
|
||||
math/ceil.o \
|
||||
math/cos.o \
|
||||
math/cosh.o \
|
||||
math/exp.o \
|
||||
math/fabs.o\
|
||||
$(PATH_TO_MSVCRT)/math/cos.o \
|
||||
$(PATH_TO_MSVCRT)/math/cosh.o \
|
||||
$(PATH_TO_MSVCRT)/math/exp.o \
|
||||
$(PATH_TO_MSVCRT)/math/fabs.o\
|
||||
math/floor.o \
|
||||
math/fmod.o \
|
||||
math/frexp.o \
|
||||
math/ftol.o \
|
||||
$(PATH_TO_MSVCRT)/math/fmod.o \
|
||||
$(PATH_TO_MSVCRT)/math/frexp.o \
|
||||
$(PATH_TO_MSVCRT)/math/ftol.o \
|
||||
math/huge_val.o \
|
||||
math/hypot.o \
|
||||
math/j0_y0.o \
|
||||
math/j1_y1.o \
|
||||
math/jn_yn.o \
|
||||
math/ldexp.o \
|
||||
math/log.o \
|
||||
math/log10.o \
|
||||
math/modf.o \
|
||||
math/pow.o \
|
||||
math/sin.o \
|
||||
math/sinh.o \
|
||||
math/sqrt.o \
|
||||
math/stubs.o \
|
||||
math/tan.o \
|
||||
math/tanh.o
|
||||
$(PATH_TO_MSVCRT)/math/hypot.o \
|
||||
$(PATH_TO_MSVCRT)/math/j0_y0.o \
|
||||
$(PATH_TO_MSVCRT)/math/j1_y1.o \
|
||||
$(PATH_TO_MSVCRT)/math/jn_yn.o \
|
||||
$(PATH_TO_MSVCRT)/math/ldexp.o \
|
||||
$(PATH_TO_MSVCRT)/math/log.o \
|
||||
$(PATH_TO_MSVCRT)/math/log10.o \
|
||||
$(PATH_TO_MSVCRT)/math/modf.o \
|
||||
$(PATH_TO_MSVCRT)/math/pow.o \
|
||||
$(PATH_TO_MSVCRT)/math/sin.o \
|
||||
$(PATH_TO_MSVCRT)/math/sinh.o \
|
||||
$(PATH_TO_MSVCRT)/math/sqrt.o \
|
||||
$(PATH_TO_MSVCRT)/math/stubs.o \
|
||||
$(PATH_TO_MSVCRT)/math/tan.o \
|
||||
$(PATH_TO_MSVCRT)/math/tanh.o
|
||||
|
||||
MALLOC_OBJECTS = \
|
||||
malloc/expand.o \
|
||||
malloc/heap.o
|
||||
|
||||
MBSTRING_OBJECTS = \
|
||||
mbstring/hanzen.o \
|
||||
mbstring/ischira.o \
|
||||
mbstring/iskana.o \
|
||||
mbstring/iskpun.o \
|
||||
mbstring/islead.o \
|
||||
mbstring/islwr.o \
|
||||
mbstring/iskmoji.o \
|
||||
mbstring/ismbal.o \
|
||||
mbstring/ismbaln.o \
|
||||
mbstring/ismbc.o \
|
||||
mbstring/ismbgra.o \
|
||||
mbstring/ismbkaln.o \
|
||||
mbstring/ismblead.o \
|
||||
mbstring/ismbpri.o \
|
||||
mbstring/ismbpun.o \
|
||||
mbstring/ismbtrl.o \
|
||||
mbstring/isuppr.o \
|
||||
mbstring/jistojms.o \
|
||||
mbstring/jmstojis.o \
|
||||
mbstring/mbbtype.o \
|
||||
mbstring/mbccpy.o \
|
||||
mbstring/mbclen.o \
|
||||
mbstring/mbscat.o \
|
||||
mbstring/mbschr.o \
|
||||
mbstring/mbscmp.o \
|
||||
mbstring/mbscoll.o \
|
||||
mbstring/mbscpy.o \
|
||||
mbstring/mbscspn.o \
|
||||
mbstring/mbsdec.o \
|
||||
mbstring/mbsdup.o \
|
||||
mbstring/mbsicmp.o \
|
||||
mbstring/mbsicoll.o \
|
||||
mbstring/mbsinc.o \
|
||||
mbstring/mbslen.o \
|
||||
mbstring/mbslwr.o \
|
||||
mbstring/mbsncat.o \
|
||||
mbstring/mbsnccnt.o \
|
||||
mbstring/mbsncmp.o \
|
||||
mbstring/mbsncoll.o \
|
||||
mbstring/mbsncpy.o \
|
||||
mbstring/mbsnextc.o \
|
||||
mbstring/mbsnicmp.o \
|
||||
mbstring/mbsnicoll.o \
|
||||
mbstring/mbsninc.o \
|
||||
mbstring/mbsnset.o \
|
||||
mbstring/mbspbrk.o \
|
||||
mbstring/mbsrchr.o \
|
||||
mbstring/mbsrev.o \
|
||||
mbstring/mbsset.o \
|
||||
mbstring/mbsspn.o \
|
||||
mbstring/mbsspnp.o \
|
||||
mbstring/mbsstr.o \
|
||||
mbstring/mbstok.o \
|
||||
mbstring/mbstrlen.o \
|
||||
mbstring/mbsupr.o
|
||||
$(PATH_TO_MSVCRT)/mbstring/hanzen.o \
|
||||
$(PATH_TO_MSVCRT)/mbstring/ischira.o \
|
||||
$(PATH_TO_MSVCRT)/mbstring/iskana.o \
|
||||
$(PATH_TO_MSVCRT)/mbstring/iskpun.o \
|
||||
$(PATH_TO_MSVCRT)/mbstring/islead.o \
|
||||
$(PATH_TO_MSVCRT)/mbstring/islwr.o \
|
||||
$(PATH_TO_MSVCRT)/mbstring/iskmoji.o \
|
||||
$(PATH_TO_MSVCRT)/mbstring/ismbal.o \
|
||||
$(PATH_TO_MSVCRT)/mbstring/ismbaln.o \
|
||||
$(PATH_TO_MSVCRT)/mbstring/ismbc.o \
|
||||
$(PATH_TO_MSVCRT)/mbstring/ismbgra.o \
|
||||
$(PATH_TO_MSVCRT)/mbstring/ismbkaln.o \
|
||||
$(PATH_TO_MSVCRT)/mbstring/ismblead.o \
|
||||
$(PATH_TO_MSVCRT)/mbstring/ismbpri.o \
|
||||
$(PATH_TO_MSVCRT)/mbstring/ismbpun.o \
|
||||
$(PATH_TO_MSVCRT)/mbstring/ismbtrl.o \
|
||||
$(PATH_TO_MSVCRT)/mbstring/isuppr.o \
|
||||
$(PATH_TO_MSVCRT)/mbstring/jistojms.o \
|
||||
$(PATH_TO_MSVCRT)/mbstring/jmstojis.o \
|
||||
$(PATH_TO_MSVCRT)/mbstring/mbbtype.o \
|
||||
$(PATH_TO_MSVCRT)/mbstring/mbccpy.o \
|
||||
$(PATH_TO_MSVCRT)/mbstring/mbclen.o \
|
||||
$(PATH_TO_MSVCRT)/mbstring/mbscat.o \
|
||||
$(PATH_TO_MSVCRT)/mbstring/mbschr.o \
|
||||
$(PATH_TO_MSVCRT)/mbstring/mbscmp.o \
|
||||
$(PATH_TO_MSVCRT)/mbstring/mbscoll.o \
|
||||
$(PATH_TO_MSVCRT)/mbstring/mbscpy.o \
|
||||
$(PATH_TO_MSVCRT)/mbstring/mbscspn.o \
|
||||
$(PATH_TO_MSVCRT)/mbstring/mbsdec.o \
|
||||
$(PATH_TO_MSVCRT)/mbstring/mbsdup.o \
|
||||
$(PATH_TO_MSVCRT)/mbstring/mbsicmp.o \
|
||||
$(PATH_TO_MSVCRT)/mbstring/mbsicoll.o \
|
||||
$(PATH_TO_MSVCRT)/mbstring/mbsinc.o \
|
||||
$(PATH_TO_MSVCRT)/mbstring/mbslen.o \
|
||||
$(PATH_TO_MSVCRT)/mbstring/mbslwr.o \
|
||||
$(PATH_TO_MSVCRT)/mbstring/mbsncat.o \
|
||||
$(PATH_TO_MSVCRT)/mbstring/mbsnccnt.o \
|
||||
$(PATH_TO_MSVCRT)/mbstring/mbsncmp.o \
|
||||
$(PATH_TO_MSVCRT)/mbstring/mbsncoll.o \
|
||||
$(PATH_TO_MSVCRT)/mbstring/mbsncpy.o \
|
||||
$(PATH_TO_MSVCRT)/mbstring/mbsnextc.o \
|
||||
$(PATH_TO_MSVCRT)/mbstring/mbsnicmp.o \
|
||||
$(PATH_TO_MSVCRT)/mbstring/mbsnicoll.o \
|
||||
$(PATH_TO_MSVCRT)/mbstring/mbsninc.o \
|
||||
$(PATH_TO_MSVCRT)/mbstring/mbsnset.o \
|
||||
$(PATH_TO_MSVCRT)/mbstring/mbspbrk.o \
|
||||
$(PATH_TO_MSVCRT)/mbstring/mbsrchr.o \
|
||||
$(PATH_TO_MSVCRT)/mbstring/mbsrev.o \
|
||||
$(PATH_TO_MSVCRT)/mbstring/mbsset.o \
|
||||
$(PATH_TO_MSVCRT)/mbstring/mbsspn.o \
|
||||
$(PATH_TO_MSVCRT)/mbstring/mbsspnp.o \
|
||||
$(PATH_TO_MSVCRT)/mbstring/mbsstr.o \
|
||||
$(PATH_TO_MSVCRT)/mbstring/mbstok.o \
|
||||
$(PATH_TO_MSVCRT)/mbstring/mbstrlen.o \
|
||||
$(PATH_TO_MSVCRT)/mbstring/mbsupr.o
|
||||
|
||||
MISC_OBJECTS = \
|
||||
misc/amsg.o \
|
||||
misc/assert.o \
|
||||
$(PATH_TO_MSVCRT)/misc/assert.o \
|
||||
misc/debug.o \
|
||||
misc/dllmain.o \
|
||||
misc/GetArgs.o \
|
||||
misc/initterm.o \
|
||||
$(PATH_TO_MSVCRT)/misc/initterm.o \
|
||||
misc/purecall.o \
|
||||
misc/setnew.o
|
||||
|
||||
PROCESS_OBJECTS = \
|
||||
process/_cwait.o \
|
||||
process/_system.o\
|
||||
process/dll.o \
|
||||
$(PATH_TO_MSVCRT)/process/dll.o \
|
||||
process/spawnl.o \
|
||||
process/spawnlp.o \
|
||||
process/spawnlpe.o \
|
||||
|
@ -267,9 +267,9 @@ PROCESS_OBJECTS = \
|
|||
process/execv.o \
|
||||
process/execle.o \
|
||||
process/execve.o \
|
||||
process/procid.o \
|
||||
$(PATH_TO_MSVCRT)/process/procid.o \
|
||||
process/thread.o \
|
||||
process/threadid.o
|
||||
$(PATH_TO_MSVCRT)/process/threadid.o
|
||||
|
||||
QUAD_OBJECTS = \
|
||||
quad/qdivrem.o \
|
||||
|
@ -279,159 +279,159 @@ QUAD_OBJECTS = \
|
|||
quad/umoddi3.o
|
||||
|
||||
SEARCH_OBJECTS = \
|
||||
search/lfind.o \
|
||||
search/lsearch.o
|
||||
$(PATH_TO_MSVCRT)/search/lfind.o \
|
||||
$(PATH_TO_MSVCRT)/search/lsearch.o
|
||||
|
||||
SETJMP_OBJECTS = \
|
||||
setjmp/setjmp.o
|
||||
$(PATH_TO_MSVCRT)/setjmp/setjmp.o
|
||||
|
||||
SIGNAL_OBJECTS = \
|
||||
signal/xcptfil.o \
|
||||
signal/xcptinfo.o \
|
||||
signal/signal.o
|
||||
$(PATH_TO_MSVCRT)/signal/signal.o
|
||||
|
||||
STDIO_OBJECTS = \
|
||||
stdio/allocfil.o \
|
||||
$(PATH_TO_MSVCRT)/stdio/allocfil.o \
|
||||
stdio/getenv.o \
|
||||
stdio/clearerr.o \
|
||||
stdio/fclose.o \
|
||||
stdio/fdopen.o \
|
||||
stdio/feof.o \
|
||||
$(PATH_TO_MSVCRT)/stdio/clearerr.o \
|
||||
$(PATH_TO_MSVCRT)/stdio/fclose.o \
|
||||
$(PATH_TO_MSVCRT)/stdio/fdopen.o \
|
||||
$(PATH_TO_MSVCRT)/stdio/feof.o \
|
||||
stdio/ferror.o \
|
||||
stdio/fflush.o \
|
||||
stdio/fgetc.o \
|
||||
$(PATH_TO_MSVCRT)/stdio/fgetc.o \
|
||||
stdio/fgetchar.o \
|
||||
stdio/fgetpos.o \
|
||||
$(PATH_TO_MSVCRT)/stdio/fgetpos.o \
|
||||
stdio/fgets.o \
|
||||
stdio/filbuf.o \
|
||||
stdio/fileno.o \
|
||||
stdio/flsbuf.o \
|
||||
$(PATH_TO_MSVCRT)/stdio/flsbuf.o \
|
||||
stdio/fopen.o \
|
||||
stdio/fprintf.o \
|
||||
stdio/fputc.o \
|
||||
$(PATH_TO_MSVCRT)/stdio/fprintf.o \
|
||||
$(PATH_TO_MSVCRT)/stdio/fputc.o \
|
||||
stdio/fputchar.o\
|
||||
stdio/fputs.o \
|
||||
stdio/fread.o \
|
||||
stdio/freopen.o \
|
||||
stdio/fscanf.o \
|
||||
stdio/fseek.o \
|
||||
stdio/fsetpos.o \
|
||||
$(PATH_TO_MSVCRT)/stdio/fseek.o \
|
||||
$(PATH_TO_MSVCRT)/stdio/fsetpos.o \
|
||||
stdio/frlist.o \
|
||||
stdio/fsopen.o \
|
||||
stdio/ftell.o \
|
||||
stdio/fwalk.o \
|
||||
$(PATH_TO_MSVCRT)/stdio/fwalk.o \
|
||||
stdio/fwrite.o \
|
||||
stdio/getc.o \
|
||||
stdio/getchar.o \
|
||||
stdio/gets.o \
|
||||
stdio/getw.o \
|
||||
$(PATH_TO_MSVCRT)/stdio/getw.o \
|
||||
stdio/perror.o \
|
||||
stdio/popen.o \
|
||||
stdio/printf.o \
|
||||
stdio/putc.o \
|
||||
stdio/putchar.o \
|
||||
stdio/puts.o \
|
||||
stdio/putw.o \
|
||||
$(PATH_TO_MSVCRT)/stdio/putw.o \
|
||||
stdio/remove.o \
|
||||
stdio/rename.o \
|
||||
stdio/rewind.o \
|
||||
stdio/rmtmp.o \
|
||||
stdio/setbuffe.o \
|
||||
stdlib/obsol.o \
|
||||
stdio/setlineb.o \
|
||||
$(PATH_TO_MSVCRT)/stdio/rename.o \
|
||||
$(PATH_TO_MSVCRT)/stdio/rewind.o \
|
||||
$(PATH_TO_MSVCRT)/stdio/rmtmp.o \
|
||||
stdio/scanf.o \
|
||||
stdio/setbuf.o \
|
||||
stdio/setvbuf.o \
|
||||
stdio/sprintf.o \
|
||||
stdio/sscanf.o \
|
||||
stdio/stdhnd.o \
|
||||
$(PATH_TO_MSVCRT)/stdio/setbuf.o \
|
||||
stdio/setbuffe.o \
|
||||
stdio/setlineb.o \
|
||||
$(PATH_TO_MSVCRT)/stdio/setvbuf.o \
|
||||
$(PATH_TO_MSVCRT)/stdio/sprintf.o \
|
||||
$(PATH_TO_MSVCRT)/stdio/sscanf.o \
|
||||
$(PATH_TO_MSVCRT)/stdio/stdhnd.o \
|
||||
stdio/stdiohk.o \
|
||||
stdio/tempnam.o \
|
||||
stdio/tmpfile.o \
|
||||
stdio/tmpnam.o \
|
||||
stdio/ungetc.o \
|
||||
$(PATH_TO_MSVCRT)/stdio/tempnam.o \
|
||||
$(PATH_TO_MSVCRT)/stdio/tmpfile.o \
|
||||
$(PATH_TO_MSVCRT)/stdio/tmpnam.o \
|
||||
$(PATH_TO_MSVCRT)/stdio/ungetc.o \
|
||||
stdio/vfprintf.o \
|
||||
stdio/vfscanf.o \
|
||||
stdio/vfwprint.o \
|
||||
stdio/vprintf.o \
|
||||
stdio/vscanf.o \
|
||||
stdio/vsprintf.o \
|
||||
stdio/vsscanf.o
|
||||
$(PATH_TO_MSVCRT)/stdio/vprintf.o \
|
||||
$(PATH_TO_MSVCRT)/stdio/vscanf.o \
|
||||
$(PATH_TO_MSVCRT)/stdio/vsprintf.o \
|
||||
$(PATH_TO_MSVCRT)/stdio/vsscanf.o
|
||||
|
||||
STDLIB_OBJECTS = \
|
||||
stdlib/_exit.o \
|
||||
stdlib/abort.o \
|
||||
stdlib/abs.o \
|
||||
stdlib/atexit.o \
|
||||
stdlib/atof.o \
|
||||
stdlib/atoi.o \
|
||||
stdlib/atol.o \
|
||||
stdlib/bsearch.o \
|
||||
stdlib/div.o \
|
||||
stdlib/ecvt.o \
|
||||
stdlib/ecvtbuf.o \
|
||||
$(PATH_TO_MSVCRT)/stdlib/_exit.o \
|
||||
$(PATH_TO_MSVCRT)/stdlib/abort.o \
|
||||
$(PATH_TO_MSVCRT)/stdlib/abs.o \
|
||||
$(PATH_TO_MSVCRT)/stdlib/atexit.o \
|
||||
$(PATH_TO_MSVCRT)/stdlib/atof.o \
|
||||
$(PATH_TO_MSVCRT)/stdlib/atoi.o \
|
||||
$(PATH_TO_MSVCRT)/stdlib/atol.o \
|
||||
$(PATH_TO_MSVCRT)/stdlib/bsearch.o \
|
||||
$(PATH_TO_MSVCRT)/stdlib/div.o \
|
||||
$(PATH_TO_MSVCRT)/stdlib/ecvt.o \
|
||||
$(PATH_TO_MSVCRT)/stdlib/ecvtbuf.o \
|
||||
stdlib/errno.o \
|
||||
stdlib/fcvt.o \
|
||||
stdlib/fcvtbuf.o \
|
||||
$(PATH_TO_MSVCRT)/stdlib/fcvt.o \
|
||||
$(PATH_TO_MSVCRT)/stdlib/fcvtbuf.o \
|
||||
stdlib/fullpath.o \
|
||||
stdlib/gcvt.o \
|
||||
stdlib/itoa.o \
|
||||
$(PATH_TO_MSVCRT)/stdlib/gcvt.o \
|
||||
$(PATH_TO_MSVCRT)/stdlib/itoa.o \
|
||||
stdlib/itow.o \
|
||||
stdlib/labs.o \
|
||||
stdlib/ldiv.o \
|
||||
stdlib/makepath.o \
|
||||
$(PATH_TO_MSVCRT)/stdlib/labs.o \
|
||||
$(PATH_TO_MSVCRT)/stdlib/ldiv.o \
|
||||
$(PATH_TO_MSVCRT)/stdlib/makepath.o \
|
||||
stdlib/malloc.o \
|
||||
stdlib/mbstowcs.o \
|
||||
$(PATH_TO_MSVCRT)/stdlib/obsol.o \
|
||||
stdlib/putenv.o \
|
||||
stdlib/qsort.o \
|
||||
stdlib/rand.o \
|
||||
stdlib/rot.o \
|
||||
stdlib/senv.o \
|
||||
stdlib/splitp.o \
|
||||
stdlib/strtod.o \
|
||||
stdlib/strtol.o \
|
||||
stdlib/strtoul.o \
|
||||
stdlib/swab.o \
|
||||
stdlib/wcstomb.o \
|
||||
$(PATH_TO_MSVCRT)/stdlib/rot.o \
|
||||
$(PATH_TO_MSVCRT)/stdlib/senv.o \
|
||||
$(PATH_TO_MSVCRT)/stdlib/splitp.o \
|
||||
$(PATH_TO_MSVCRT)/stdlib/strtod.o \
|
||||
$(PATH_TO_MSVCRT)/stdlib/strtol.o \
|
||||
$(PATH_TO_MSVCRT)/stdlib/strtoul.o \
|
||||
$(PATH_TO_MSVCRT)/stdlib/swab.o \
|
||||
$(PATH_TO_MSVCRT)/stdlib/wcstomb.o \
|
||||
|
||||
STRING_OBJECTS = \
|
||||
string/memccpy.o \
|
||||
string/memchr.o \
|
||||
string/memcmp.o \
|
||||
string/memcpy.o \
|
||||
string/memicmp.o \
|
||||
string/memmove.o \
|
||||
string/memset.o \
|
||||
string/strcat.o \
|
||||
string/strchr.o \
|
||||
string/strcmp.o \
|
||||
string/strcoll.o \
|
||||
string/strcpy.o \
|
||||
string/strcspn.o \
|
||||
string/strdup.o \
|
||||
$(PATH_TO_MSVCRT)/string/memccpy.o \
|
||||
$(PATH_TO_MSVCRT)/string/memchr.o \
|
||||
$(PATH_TO_MSVCRT)/string/memcmp.o \
|
||||
$(PATH_TO_MSVCRT)/string/memcpy.o \
|
||||
$(PATH_TO_MSVCRT)/string/memicmp.o \
|
||||
$(PATH_TO_MSVCRT)/string/memmove.o \
|
||||
$(PATH_TO_MSVCRT)/string/memset.o \
|
||||
$(PATH_TO_MSVCRT)/string/strcat.o \
|
||||
$(PATH_TO_MSVCRT)/string/strchr.o \
|
||||
$(PATH_TO_MSVCRT)/string/strcmp.o \
|
||||
$(PATH_TO_MSVCRT)/string/strcoll.o \
|
||||
$(PATH_TO_MSVCRT)/string/strcpy.o \
|
||||
$(PATH_TO_MSVCRT)/string/strcspn.o \
|
||||
$(PATH_TO_MSVCRT)/string/strdup.o \
|
||||
string/strerror.o \
|
||||
string/stricmp.o \
|
||||
string/strlen.o \
|
||||
string/strlwr.o \
|
||||
string/strncat.o \
|
||||
string/strncmp.o \
|
||||
string/strncpy.o \
|
||||
string/strnicmp.o \
|
||||
string/strnlen.o \
|
||||
string/strpbrk.o \
|
||||
string/strrchr.o \
|
||||
string/strrev.o \
|
||||
string/strset.o \
|
||||
string/strspn.o \
|
||||
string/strstr.o \
|
||||
$(PATH_TO_MSVCRT)/string/stricmp.o \
|
||||
$(PATH_TO_MSVCRT)/string/strlen.o \
|
||||
$(PATH_TO_MSVCRT)/string/strlwr.o \
|
||||
$(PATH_TO_MSVCRT)/string/strncat.o \
|
||||
$(PATH_TO_MSVCRT)/string/strncmp.o \
|
||||
$(PATH_TO_MSVCRT)/string/strncpy.o \
|
||||
$(PATH_TO_MSVCRT)/string/strnicmp.o \
|
||||
$(PATH_TO_MSVCRT)/string/strnlen.o \
|
||||
$(PATH_TO_MSVCRT)/string/strpbrk.o \
|
||||
$(PATH_TO_MSVCRT)/string/strrchr.o \
|
||||
$(PATH_TO_MSVCRT)/string/strrev.o \
|
||||
$(PATH_TO_MSVCRT)/string/strset.o \
|
||||
$(PATH_TO_MSVCRT)/string/strspn.o \
|
||||
$(PATH_TO_MSVCRT)/string/strstr.o \
|
||||
string/strtok.o \
|
||||
string/strupr.o \
|
||||
$(PATH_TO_MSVCRT)/string/strupr.o \
|
||||
string/str_old.o \
|
||||
string/strxfrm.o
|
||||
$(PATH_TO_MSVCRT)/string/strxfrm.o
|
||||
|
||||
SYS_STAT_OBJECTS = \
|
||||
sys_stat/fstat.o \
|
||||
sys_stat/futime.o \
|
||||
$(PATH_TO_MSVCRT)/sys_stat/futime.o \
|
||||
sys_stat/ftime.o \
|
||||
sys_stat/systime.o \
|
||||
sys_stat/stat.o
|
||||
|
@ -445,13 +445,14 @@ TCHAR_OBJECTS = \
|
|||
tchar/strspnp.o
|
||||
|
||||
TIME_OBJECTS = \
|
||||
time/clock.o \
|
||||
time/ctime.o \
|
||||
time/difftime.o \
|
||||
time/strdate.o \
|
||||
time/strftime.o \
|
||||
time/strtime.o \
|
||||
time/time.o
|
||||
$(PATH_TO_MSVCRT)/time/clock.o \
|
||||
$(PATH_TO_MSVCRT)/time/ctime.o \
|
||||
$(PATH_TO_MSVCRT)/time/difftime.o \
|
||||
$(PATH_TO_MSVCRT)/time/strdate.o \
|
||||
$(PATH_TO_MSVCRT)/time/strftime.o \
|
||||
$(PATH_TO_MSVCRT)/time/strtime.o \
|
||||
$(PATH_TO_MSVCRT)/time/time.o \
|
||||
time/tz_vars.o \
|
||||
|
||||
WSTRING_OBJECTS = \
|
||||
$(PATH_TO_MSVCRT)/wstring/wcscat.o \
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
|
||||
double modf(double __x, double *__i)
|
||||
{
|
||||
|
||||
double_t * x = (double_t *)&__x;
|
||||
double_t * iptr = ( double_t *)__i;
|
||||
|
||||
|
@ -39,7 +38,7 @@ double modf(double __x, double *__i)
|
|||
return 0.0;
|
||||
}
|
||||
|
||||
i = (0x000fffff)>>j0;
|
||||
i = (0x000fffff)>>j0;
|
||||
iptr->sign = x->sign;
|
||||
iptr->exponent = x->exponent;
|
||||
iptr->mantissah = x->mantissah&(~i);
|
||||
|
@ -48,48 +47,43 @@ double modf(double __x, double *__i)
|
|||
__x = 0.0;
|
||||
x->sign = iptr->sign;
|
||||
return __x;
|
||||
}
|
||||
return __x - *__i;
|
||||
}
|
||||
return __x - *__i;
|
||||
}
|
||||
} else if (j0>51) { /* no fraction part */
|
||||
*__i = __x;
|
||||
if ( _isnan(__x) || _isinf(__x) )
|
||||
return __x;
|
||||
|
||||
|
||||
*__i = __x;
|
||||
if ( _isnan(__x) || _isinf(__x) )
|
||||
return __x;
|
||||
|
||||
__x = 0.0;
|
||||
x->sign = iptr->sign;
|
||||
return __x;
|
||||
} else { /* fraction part in low x */
|
||||
|
||||
i = ((unsigned)(0xffffffff))>>(j0-20);
|
||||
iptr->sign = x->sign;
|
||||
iptr->exponent = x->exponent;
|
||||
iptr->mantissah = x->mantissah;
|
||||
iptr->mantissal = x->mantissal&(~i);
|
||||
if ( __x == *__i ) {
|
||||
__x = 0.0;
|
||||
x->sign = iptr->sign;
|
||||
return __x;
|
||||
} else { /* fraction part in low x */
|
||||
|
||||
|
||||
i = ((unsigned)(0xffffffff))>>(j0-20);
|
||||
iptr->sign = x->sign;
|
||||
iptr->exponent = x->exponent;
|
||||
iptr->mantissah = x->mantissah;
|
||||
iptr->mantissal = x->mantissal&(~i);
|
||||
if ( __x == *__i ) {
|
||||
__x = 0.0;
|
||||
x->sign = iptr->sign;
|
||||
return __x;
|
||||
}
|
||||
return __x - *__i;
|
||||
}
|
||||
return __x - *__i;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
long double modfl(long double __x, long double *__i)
|
||||
{
|
||||
|
||||
|
||||
long_double_t * x = (long_double_t *)&__x;
|
||||
long_double_t * iptr = (long_double_t *)__i;
|
||||
|
||||
int j0;
|
||||
unsigned int i;
|
||||
j0 = x->exponent - 0x3fff; /* exponent of x */
|
||||
|
||||
|
||||
|
||||
if(j0<32) { /* integer part in high x */
|
||||
if(j0<0) { /* |x|<1 */
|
||||
*__i = 0.0L;
|
||||
|
@ -97,7 +91,7 @@ long double modfl(long double __x, long double *__i)
|
|||
return __x;
|
||||
} else {
|
||||
|
||||
i = ((unsigned int)(0xffffffff))>>(j0+1);
|
||||
i = ((unsigned int)(0xffffffff))>>(j0+1);
|
||||
if ( x->mantissal == 0 && (x->mantissal & i) == 0 ) {
|
||||
*__i = __x;
|
||||
__x = 0.0L;
|
||||
|
@ -106,36 +100,33 @@ long double modfl(long double __x, long double *__i)
|
|||
}
|
||||
iptr->sign = x->sign;
|
||||
iptr->exponent = x->exponent;
|
||||
iptr->mantissah = x->mantissah&((~i));
|
||||
iptr->mantissah = x->mantissah&((~i));
|
||||
iptr->mantissal = 0;
|
||||
|
||||
|
||||
return __x - *__i;
|
||||
return __x - *__i;
|
||||
}
|
||||
} else if (j0>63) { /* no fraction part */
|
||||
*__i = __x;
|
||||
if ( _isnanl(__x) || _isinfl(__x) )
|
||||
return __x;
|
||||
|
||||
*__i = __x;
|
||||
if ( _isnanl(__x) || _isinfl(__x) )
|
||||
return __x;
|
||||
|
||||
__x = 0.0L;
|
||||
x->sign = iptr->sign;
|
||||
return __x;
|
||||
} else { /* fraction part in low x */
|
||||
|
||||
i = ((unsigned int)(0xffffffff))>>(j0-32);
|
||||
if ( x->mantissal == 0 ) {
|
||||
*__i = __x;
|
||||
__x = 0.0L;
|
||||
x->sign = iptr->sign;
|
||||
return __x;
|
||||
} else { /* fraction part in low x */
|
||||
|
||||
i = ((unsigned int)(0xffffffff))>>(j0-32);
|
||||
if ( x->mantissal == 0 ) {
|
||||
*__i = __x;
|
||||
__x = 0.0L;
|
||||
x->sign = iptr->sign;
|
||||
return __x;
|
||||
}
|
||||
iptr->sign = x->sign;
|
||||
iptr->exponent = x->exponent;
|
||||
iptr->mantissah = x->mantissah;
|
||||
iptr->mantissal = x->mantissal&(~i);
|
||||
}
|
||||
iptr->sign = x->sign;
|
||||
iptr->exponent = x->exponent;
|
||||
iptr->mantissah = x->mantissah;
|
||||
iptr->mantissal = x->mantissal&(~i);
|
||||
|
||||
return __x - *__i;
|
||||
|
||||
|
||||
return __x - *__i;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
|
||||
|
||||
#include <msvcrt/math.h>
|
||||
|
||||
double tanh(double x)
|
||||
|
@ -14,4 +15,3 @@ double tanh(double x)
|
|||
return (ebig - esmall) / (ebig + esmall);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -87,7 +87,6 @@ int _ismbclegal(unsigned int c)
|
|||
return _ismbbtrail(c&0xFF);
|
||||
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
int _ismbcl0(unsigned int c)
|
||||
|
|
|
@ -54,6 +54,7 @@ int _mbscoll(const unsigned char *str1, const unsigned char *str2)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#if 0
|
||||
int _mbsbcoll(const unsigned char *str1, const unsigned char *str2)
|
||||
{
|
||||
unsigned char *s1 = (unsigned char *)str1;
|
||||
|
@ -93,3 +94,4 @@ int _mbsbcoll(const unsigned char *str1, const unsigned char *str2)
|
|||
} ;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include <msvcrt/mbstring.h>
|
||||
|
||||
// not correct
|
||||
size_t _mbscspn(const unsigned char *s1, const unsigned char *s2)
|
||||
{
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include <msvcrt/mbstring.h>
|
||||
#include <msvcrt/mbctype.h>
|
||||
#include <msvcrt/ctype.h>
|
||||
|
||||
int colldif(unsigned short c1, unsigned short c2);
|
||||
int _mbsicoll(const unsigned char *str1, const unsigned char *str2)
|
||||
{
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
|
||||
#include <msvcrt/mbstring.h>
|
||||
|
||||
|
||||
unsigned char *_mbsncpy(unsigned char *str1, const unsigned char *str2, size_t n)
|
||||
{
|
||||
unsigned char *s1 = (unsigned char *)str1;
|
||||
|
@ -43,6 +44,13 @@ unsigned char *_mbsncpy(unsigned char *str1, const unsigned char *str2, size_t n
|
|||
return 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.
|
||||
//
|
||||
|
||||
unsigned char * _mbsnbcpy(unsigned char *str1, const unsigned char *str2, size_t n)
|
||||
{
|
||||
unsigned char *s1 = (unsigned char *)str1;
|
||||
|
@ -54,8 +62,10 @@ unsigned char * _mbsnbcpy(unsigned char *str1, const unsigned char *str2, size_t
|
|||
return 0;
|
||||
do {
|
||||
|
||||
if (*s2 == 0)
|
||||
if (*s2 == 0) {
|
||||
*s1 = *s2;
|
||||
break;
|
||||
}
|
||||
|
||||
if ( !_ismbblead(*s2) ) {
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
unsigned int _mbsnextc (const unsigned char *src)
|
||||
{
|
||||
|
||||
unsigned char *char_src = (unsigned char *)src;
|
||||
unsigned short *short_src = (unsigned short *)src;
|
||||
|
||||
|
@ -14,5 +13,4 @@ unsigned int _mbsnextc (const unsigned char *src)
|
|||
else
|
||||
return *short_src;
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ int _mbsnicoll(const unsigned char *s1, const unsigned char *s2, size_t n)
|
|||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int _mbsnbicoll(const unsigned char *s1, const unsigned char *s2, size_t n)
|
||||
{
|
||||
return 0;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include <msvcrt/mbstring.h>
|
||||
|
||||
// not correct
|
||||
size_t _mbsspn(const unsigned char *s1, const unsigned char *s2)
|
||||
{
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include <msvcrt/mbstring.h>
|
||||
|
||||
// not correct
|
||||
unsigned char * _mbsspnp(const unsigned char *s1, const unsigned char *s2)
|
||||
{
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
|
||||
int _getpid (void)
|
||||
{
|
||||
//fixme GetCurrentProcessId
|
||||
//return (int)GetCurrentProcessId();
|
||||
return 1;
|
||||
return (int)GetCurrentProcessId();
|
||||
}
|
||||
|
||||
|
|
|
@ -1,12 +1,16 @@
|
|||
/* $Id: thread.c,v 1.6 2002/11/29 15:59:01 robd Exp $
|
||||
*
|
||||
*/
|
||||
#include <windows.h>
|
||||
#include <msvcrt/process.h>
|
||||
#include <msvcrt/errno.h>
|
||||
#include <msvcrt/process.h>
|
||||
#include <msvcrt/internal/file.h>
|
||||
|
||||
|
||||
unsigned long
|
||||
_beginthread (void (*pfuncStart)(void *),
|
||||
unsigned unStackSize, void* pArgList)
|
||||
unsigned long _beginthread(
|
||||
void (*pfuncStart)(void*),
|
||||
unsigned unStackSize,
|
||||
void* pArgList)
|
||||
{
|
||||
DWORD ThreadId;
|
||||
HANDLE hThread;
|
||||
|
@ -20,6 +24,7 @@ unsigned long
|
|||
}
|
||||
return (unsigned long)hThread;
|
||||
}
|
||||
|
||||
void _endthread(void)
|
||||
{
|
||||
//fixme ExitThread
|
||||
|
|
|
@ -5,11 +5,11 @@
|
|||
void *_lfind(const void *key, const void *base, size_t *nelp,
|
||||
size_t width, int (*compar)(const void *, const void *))
|
||||
{
|
||||
char *char_base = (char *)base;
|
||||
char* char_base = (char*)base;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < *nelp; i++) {
|
||||
if ( compar(key,char_base) == 0)
|
||||
if (compar(key, char_base) == 0)
|
||||
return char_base;
|
||||
char_base += width;
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
FILE * __alloc_file(void);
|
||||
|
||||
|
||||
FILE *_fdopen(int handle, char *mode)
|
||||
{
|
||||
FILE *file;
|
||||
|
@ -51,4 +52,3 @@ FILE *_fdopen(int handle, char *mode)
|
|||
|
||||
return file;
|
||||
}
|
||||
|
||||
|
|
|
@ -17,13 +17,13 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
|||
Cambridge, MA 02139, USA. */
|
||||
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <msvcrt/stdarg.h>
|
||||
#include <msvcrt/stdio.h>
|
||||
#include <msvcrt/wchar.h>
|
||||
#include <msvcrt/alloc.h>
|
||||
#include <msvcrt/internal/stdio.h>
|
||||
|
||||
|
||||
int __vfscanf (FILE *s, const char *format, va_list argptr);
|
||||
/* Read formatted input from STREAM according to the format string FORMAT. */
|
||||
/* VARARGS2 */
|
||||
int fscanf(FILE *stream,const char *format, ...)
|
||||
|
@ -57,4 +57,3 @@ fwscanf(FILE *stream, const wchar_t *fmt, ...)
|
|||
free(cf);
|
||||
return done;
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <msvcrt/stdarg.h>
|
||||
#include <msvcrt/stdio.h>
|
||||
#include <msvcrt/wchar.h>
|
||||
|
||||
|
|
|
@ -12,5 +12,4 @@ void rewind(FILE *f)
|
|||
f->_cnt = 0;
|
||||
f->_ptr = f->_base;
|
||||
f->_flag &= ~(_IOERR|_IOEOF|_IOAHEAD);
|
||||
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ License along with the GNU C Library; see the file COPYING.LIB. If
|
|||
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
||||
Cambridge, MA 02139, USA. */
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <msvcrt/stdarg.h>
|
||||
#include <msvcrt/stdio.h>
|
||||
#include <msvcrt/wchar.h>
|
||||
#include <limits.h>
|
||||
|
|
|
@ -16,14 +16,13 @@
|
|||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <msvcrt/stdarg.h>
|
||||
#include <msvcrt/stdio.h>
|
||||
#include <msvcrt/wchar.h>
|
||||
#include <msvcrt/alloc.h>
|
||||
#include <msvcrt/internal/stdio.h>
|
||||
|
||||
|
||||
int __vsscanf (const char *s,const char *format,va_list arg);
|
||||
|
||||
/* Read formatted input from S, according to the format string FORMAT. */
|
||||
/* VARARGS2 */
|
||||
int sscanf (const char *s,const char *format, ...)
|
||||
|
|
|
@ -13,11 +13,12 @@ char *_tempnam(const char *dir,const char *prefix )
|
|||
else
|
||||
d = (char *)dir;
|
||||
|
||||
#ifdef _MSVCRT_LIB_
|
||||
#ifdef _MSVCRT_LIB_ // TODO: check on difference?
|
||||
if (GetTempFileNameA(d, prefix, 1, TempFileName) == 0) {
|
||||
#else
|
||||
#else// TODO: FIXME: review which is correct
|
||||
if (GetTempFileNameA(d, prefix, 0, TempFileName) == 0) {
|
||||
#endif /*_MSVCRT_LIB_*/
|
||||
|
||||
free(TempFileName);
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ License along with the GNU C Library; see the file COPYING.LIB. If
|
|||
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
||||
Cambridge, MA 02139, USA. */
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <msvcrt/stdarg.h>
|
||||
#undef __OPTIMIZE__ /* Avoid inline `vprintf' function. */
|
||||
#include <msvcrt/stdio.h>
|
||||
#include <msvcrt/wchar.h>
|
||||
|
|
|
@ -16,11 +16,11 @@ License along with the GNU C Library; see the file COPYING.LIB. If
|
|||
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
||||
Cambridge, MA 02139, USA. */
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <msvcrt/stdarg.h>
|
||||
#include <msvcrt/stdio.h>
|
||||
#include <msvcrt/internal/file.h>
|
||||
#include <msvcrt/internal/stdio.h>
|
||||
|
||||
int __vfscanf (FILE *s, const char *format, va_list argptr);
|
||||
|
||||
#undef vscanf
|
||||
|
||||
|
@ -31,5 +31,4 @@ int __vscanf (const char *format, va_list arg)
|
|||
{
|
||||
return __vfscanf(stdin, format, arg);
|
||||
}
|
||||
//weak_alias (__vscanf, vscanf)
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
|
||||
#include <msvcrt/stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <msvcrt/stdarg.h>
|
||||
#include <limits.h>
|
||||
#include <msvcrt/internal/file.h>
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ char* _fullpath(char* absPath, const char* relPath, size_t maxLength)
|
|||
{
|
||||
char* lpFilePart;
|
||||
|
||||
if (GetFullPathName(relPath,maxLength,absPath,&lpFilePart) == 0)
|
||||
if (GetFullPathNameA(relPath,maxLength,absPath,&lpFilePart) == 0)
|
||||
return NULL;
|
||||
|
||||
return absPath;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: itow.c,v 1.2 2002/11/24 18:42:18 robd Exp $
|
||||
/* $Id: itow.c,v 1.3 2002/11/29 15:59:01 robd Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS system libraries
|
||||
|
@ -131,9 +131,9 @@ wchar_t* _ultow(unsigned long value, wchar_t* string, int radix)
|
|||
}
|
||||
|
||||
if (string == 0) {
|
||||
#ifdef _MSVCRT_LIB_
|
||||
#ifdef _MSVCRT_LIB_ // TODO: check on difference?
|
||||
string = (wchar_t *)malloc(((tp-tmp)+1)*sizeof(wchar_t));
|
||||
#else
|
||||
#else // TODO: FIXME: review which is correct
|
||||
string = (wchar_t *) malloc((tp - tmp) + sizeof(wchar_t));
|
||||
#endif /*_MSVCRT_LIB_*/
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: makepath.c,v 1.8 2002/11/24 18:42:18 robd Exp $
|
||||
/* $Id: makepath.c,v 1.9 2002/11/29 15:59:01 robd Exp $
|
||||
*/
|
||||
#include <msvcrt/stdlib.h>
|
||||
#include <msvcrt/string.h>
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#define NDEBUG
|
||||
#include <msvcrt/msvcrtdbg.h>
|
||||
|
||||
|
||||
void _searchenv(const char *file,const char *var,char *path )
|
||||
{
|
||||
char *env = getenv(var);
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include <msvcrt/stdlib.h>
|
||||
#include <msvcrt/string.h>
|
||||
|
||||
|
||||
void _splitpath( const char *path, char *drive, char *dir, char *fname, char *ext )
|
||||
{
|
||||
char *tmp_drive;
|
||||
|
@ -44,4 +45,3 @@ void _splitpath( const char *path, char *drive, char *dir, char *fname, char *ex
|
|||
*(fname+(tmp_ext-path))=0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -3,11 +3,10 @@
|
|||
|
||||
/* This is the most reliable way to avoid incompatibilities
|
||||
in available built-in functions on various systems. */
|
||||
void *
|
||||
memcpy (void *to, const void *from, size_t count)
|
||||
void* memcpy(void* to, const void* from, size_t count)
|
||||
{
|
||||
register char *f = (char *)from;
|
||||
register char *t = (char *)to;
|
||||
register char* f = (char*)from;
|
||||
register char* t = (char*)to;
|
||||
register int i = count;
|
||||
|
||||
while (i-- > 0)
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
#include <msvcrt/string.h>
|
||||
|
||||
|
||||
void * memset(void *src,int val,size_t count)
|
||||
void* memset(void* src, int val, size_t count)
|
||||
{
|
||||
char *char_src = (char *)src;
|
||||
char* char_src = (char*)src;
|
||||
|
||||
while(count>0) {
|
||||
while (count>0) {
|
||||
*char_src = val;
|
||||
char_src++;
|
||||
count--;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#include <msvcrt/string.h>
|
||||
|
||||
|
||||
int strcmp(const char *s1, const char *s2)
|
||||
int strcmp(const char* s1, const char* s2)
|
||||
{
|
||||
while (*s1 == *s2)
|
||||
{
|
||||
|
@ -11,5 +11,5 @@ int strcmp(const char *s1, const char *s2)
|
|||
s1++;
|
||||
s2++;
|
||||
}
|
||||
return *(unsigned const char *)s1 - *(unsigned const char *)(s2);
|
||||
return *(unsigned const char*)s1 - *(unsigned const char*)(s2);
|
||||
}
|
||||
|
|
|
@ -6,25 +6,25 @@
|
|||
less than, equal to or greater than the collated form of S2. */
|
||||
|
||||
#if 1
|
||||
int strcoll (const char* s1, const char* s2)
|
||||
int strcoll(const char* s1, const char* s2)
|
||||
{
|
||||
return strcmp(s1,s2);
|
||||
return strcmp(s1, s2);
|
||||
}
|
||||
|
||||
int _stricoll (const char* s1, const char* s2)
|
||||
int _stricoll(const char* s1, const char* s2)
|
||||
{
|
||||
return _stricmp(s1,s2);
|
||||
return _stricmp(s1, s2);
|
||||
}
|
||||
|
||||
#else
|
||||
int strcoll (const char *s1,const char *s2)
|
||||
int strcoll (const char* s1,const char* s2)
|
||||
{
|
||||
int ret;
|
||||
ret = CompareStringA(LOCALE_USER_DEFAULT,0,s1,strlen(s1),s2,strlen(s2));
|
||||
if (ret == 0)
|
||||
return 0;
|
||||
else
|
||||
return ret - 2;
|
||||
return 0;
|
||||
int ret;
|
||||
ret = CompareStringA(LOCALE_USER_DEFAULT,0,s1,strlen(s1),s2,strlen(s2));
|
||||
if (ret == 0)
|
||||
return 0;
|
||||
else
|
||||
return ret - 2;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
|
||||
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
|
||||
#include <msvcrt/string.h>
|
||||
#include <msvcrt/stdlib.h>
|
||||
|
||||
|
||||
char *_strdup(const char *_s)
|
||||
{
|
||||
char *rv;
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
|
||||
#include <msvcrt/string.h>
|
||||
|
||||
size_t
|
||||
strlen(const char *str)
|
||||
|
||||
size_t strlen(const char* str)
|
||||
{
|
||||
const char *s;
|
||||
const char* s;
|
||||
|
||||
if (str == 0)
|
||||
return 0;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include <msvcrt/string.h>
|
||||
|
||||
char * _strrev(char *s)
|
||||
char * _strrev(char *s)
|
||||
{
|
||||
char *e;
|
||||
char a;
|
||||
|
|
|
@ -4,15 +4,14 @@
|
|||
#if 1
|
||||
size_t strxfrm( char *dest, const char *src, size_t n )
|
||||
{
|
||||
|
||||
|
||||
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) );
|
||||
int ret = LCMapStringA(LOCALE_USER_DEFAULT,LCMAP_LOWERCASE,
|
||||
src, strlen(src), dest, strlen(dest));
|
||||
|
||||
if ( ret == 0 )
|
||||
return -1;
|
||||
|
|
|
@ -16,16 +16,14 @@ VOID STDCALL GetSystemTimeAsFileTime(LPFILETIME lpSystemTimeAsFileTime );
|
|||
|
||||
clock_t clock ( void )
|
||||
{
|
||||
FILETIME CreationTime;
|
||||
FILETIME ExitTime;
|
||||
FILETIME KernelTime;
|
||||
FILETIME UserTime;
|
||||
|
||||
DWORD Remainder;
|
||||
FILETIME CreationTime;
|
||||
FILETIME ExitTime;
|
||||
FILETIME KernelTime;
|
||||
FILETIME UserTime;
|
||||
DWORD Remainder;
|
||||
|
||||
if ( !GetProcessTimes(GetCurrentProcess(),&CreationTime,&ExitTime,&KernelTime,&UserTime ) )
|
||||
return -1;
|
||||
|
||||
if (!GetProcessTimes(GetCurrentProcess(),&CreationTime,&ExitTime,&KernelTime,&UserTime))
|
||||
return -1;
|
||||
|
||||
return FileTimeToUnixTime( &KernelTime,&Remainder ) + FileTimeToUnixTime( &UserTime,&Remainder );
|
||||
return FileTimeToUnixTime(&KernelTime,&Remainder) + FileTimeToUnixTime(&UserTime,&Remainder);
|
||||
}
|
||||
|
|
|
@ -29,10 +29,6 @@
|
|||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*/
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
static char sccsid[] = "@(#)ctime.c 5.23 (Berkeley) 6/22/90";
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
/*
|
||||
** Leap second handling from Bradley White (bww@k.gp.cs.cmu.edu).
|
||||
** POSIX-style TZ environment variable handling from Guy Harris
|
||||
|
@ -53,6 +49,7 @@ static char sccsid[] = "@(#)ctime.c 5.23 (Berkeley) 6/22/90";
|
|||
|
||||
#include "posixrul.h"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
#define CPP_CONST const
|
||||
#else
|
||||
|
@ -88,13 +85,8 @@ static char sccsid[] = "@(#)ctime.c 5.23 (Berkeley) 6/22/90";
|
|||
** that tzname[0] has the "normal" length of three characters).
|
||||
*/
|
||||
|
||||
#ifdef _MSVCRT_LIB_
|
||||
int _daylight;
|
||||
int _timezone;
|
||||
#else
|
||||
int _daylight_dll;
|
||||
int _timezone_dll;
|
||||
#endif /*_MSVCRT_LIB_*/
|
||||
void _set_daylight_export(int);
|
||||
void _set_timezone_export(int);
|
||||
|
||||
|
||||
static char WILDABBR[] = " ";
|
||||
|
@ -229,12 +221,17 @@ settzname(void)
|
|||
_tzname[ttisp->tt_isdst] =
|
||||
(char *)&sp->chars[ttisp->tt_abbrind];
|
||||
#if 0
|
||||
if (ttisp->tt_isdst)
|
||||
_daylight = 1;
|
||||
if (i == 0 || !ttisp->tt_isdst)
|
||||
_timezone_dll = -(ttisp->tt_gmtoff);
|
||||
if (i == 0 || ttisp->tt_isdst)
|
||||
if (ttisp->tt_isdst) {
|
||||
//_daylight = 1;
|
||||
_set_daylight_export(1);
|
||||
}
|
||||
if (i == 0 || !ttisp->tt_isdst) {
|
||||
//_timezone_dll = -(ttisp->tt_gmtoff);
|
||||
_set_timezone_export(-(ttisp->tt_gmtoff));
|
||||
}
|
||||
if (i == 0 || ttisp->tt_isdst) {
|
||||
_altzone = -(ttisp->tt_gmtoff);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
|
|
|
@ -19,10 +19,10 @@
|
|||
#include <msvcrt/time.h>
|
||||
#include <msvcrt/internal/file.h>
|
||||
|
||||
|
||||
VOID STDCALL GetSystemTimeAsFileTime(LPFILETIME lpSystemTimeAsFileTime );
|
||||
|
||||
time_t
|
||||
time(time_t *t)
|
||||
time_t time(time_t* t)
|
||||
{
|
||||
FILETIME SystemTime;
|
||||
DWORD Remainder;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $Id: Makefile,v 1.27 2002/11/25 17:41:39 robd Exp $
|
||||
# $Id: Makefile,v 1.28 2002/11/29 15:59:02 robd Exp $
|
||||
|
||||
PATH_TO_TOP = ../..
|
||||
|
||||
|
@ -448,6 +448,7 @@ TIME_OBJECTS = \
|
|||
time/strftime.o \
|
||||
time/strtime.o \
|
||||
time/time.o \
|
||||
time/tz_vars.o \
|
||||
time/wctime.o \
|
||||
time/wstrdate.o \
|
||||
time/wstrtime.o
|
||||
|
|
|
@ -13,11 +13,11 @@
|
|||
#undef isalnum
|
||||
int isalnum(int c)
|
||||
{
|
||||
return _isctype(c,_ALPHA | _DIGIT);
|
||||
return _isctype(c, _ALPHA | _DIGIT);
|
||||
}
|
||||
|
||||
#undef iswalnum
|
||||
int iswalnum(wint_t c)
|
||||
{
|
||||
return iswctype(c,_ALPHA | _DIGIT);
|
||||
return iswctype(c, _ALPHA | _DIGIT);
|
||||
}
|
||||
|
|
|
@ -10,14 +10,16 @@
|
|||
|
||||
#include <msvcrt/ctype.h>
|
||||
|
||||
|
||||
#undef isalpha
|
||||
|
||||
int isalpha(int c)
|
||||
{
|
||||
return _isctype(c,_ALPHA);
|
||||
return _isctype(c, _ALPHA);
|
||||
}
|
||||
|
||||
#undef iswalpha
|
||||
int iswalpha(wint_t c)
|
||||
{
|
||||
return iswctype(c,_ALPHA);
|
||||
return iswctype(c, _ALPHA);
|
||||
}
|
||||
|
|
|
@ -12,10 +12,10 @@
|
|||
|
||||
int __isascii(int c)
|
||||
{
|
||||
return (!((c)&(~0x7f)));
|
||||
return (!((c)&(~0x7f)));
|
||||
}
|
||||
|
||||
int iswascii(wint_t c)
|
||||
{
|
||||
return __isascii(c);
|
||||
return __isascii(c);
|
||||
}
|
||||
|
|
|
@ -1,14 +1,15 @@
|
|||
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
|
||||
#include <msvcrt/ctype.h>
|
||||
|
||||
|
||||
#undef iscntrl
|
||||
int iscntrl(int c)
|
||||
{
|
||||
return _isctype(c,_CONTROL);
|
||||
return _isctype(c, _CONTROL);
|
||||
}
|
||||
|
||||
#undef iswcntrl
|
||||
int iswcntrl(wint_t c)
|
||||
{
|
||||
return iswctype(c,_CONTROL);
|
||||
return iswctype(c, _CONTROL);
|
||||
}
|
||||
|
|
|
@ -7,15 +7,15 @@
|
|||
* UPDATE HISTORY:
|
||||
* 28/12/98: Created
|
||||
*/
|
||||
|
||||
#include <msvcrt/ctype.h>
|
||||
|
||||
|
||||
int __iscsymf(int c)
|
||||
{
|
||||
return (isalpha(c) || ( c == '_' ));
|
||||
return (isalpha(c) || ( c == '_' )) ;
|
||||
}
|
||||
|
||||
int __iscsym(int c)
|
||||
{
|
||||
return (isalnum(c) || ( c == '_' ));
|
||||
return (isalnum(c) || ( c == '_' )) ;
|
||||
}
|
||||
|
|
|
@ -1,14 +1,15 @@
|
|||
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
|
||||
#include <msvcrt/ctype.h>
|
||||
|
||||
|
||||
#undef isdigit
|
||||
int isdigit(int c)
|
||||
{
|
||||
return _isctype(c,_DIGIT);
|
||||
return _isctype(c, _DIGIT);
|
||||
}
|
||||
|
||||
#undef iswdigit
|
||||
int iswdigit(wint_t c)
|
||||
{
|
||||
return iswctype(c,_DIGIT);
|
||||
return iswctype(c, _DIGIT);
|
||||
}
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
|
||||
#include <msvcrt/ctype.h>
|
||||
|
||||
|
||||
#undef islower
|
||||
int islower(int c)
|
||||
{
|
||||
return _isctype(c,_LOWER);
|
||||
return _isctype(c, _LOWER);
|
||||
}
|
||||
|
||||
int iswlower(wint_t c)
|
||||
{
|
||||
return iswctype(c,_LOWER);
|
||||
return iswctype(c, _LOWER);
|
||||
}
|
||||
|
|
|
@ -1,14 +1,15 @@
|
|||
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
|
||||
#include <msvcrt/ctype.h>
|
||||
|
||||
|
||||
#undef ispunct
|
||||
int ispunct(int c)
|
||||
{
|
||||
return _isctype(c,_PUNCT);
|
||||
return _isctype(c, _PUNCT);
|
||||
}
|
||||
|
||||
#undef iswpunct
|
||||
int iswpunct(wint_t c)
|
||||
{
|
||||
return iswctype(c,_PUNCT);
|
||||
return iswctype(c, _PUNCT);
|
||||
}
|
||||
|
|
|
@ -7,8 +7,10 @@
|
|||
* UPDATE HISTORY:
|
||||
* 28/12/98: Created
|
||||
*/
|
||||
|
||||
#include <msvcrt/ctype.h>
|
||||
|
||||
|
||||
#undef isspace
|
||||
int isspace(int c)
|
||||
{
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
|
||||
#include <msvcrt/ctype.h>
|
||||
|
||||
|
||||
#undef isupper
|
||||
int isupper(int c)
|
||||
{
|
||||
return _isctype(c,_UPPER);
|
||||
return _isctype(c, _UPPER);
|
||||
}
|
||||
|
||||
int iswupper(wint_t c)
|
||||
{
|
||||
return iswctype(c,_UPPER);
|
||||
return iswctype(c, _UPPER);
|
||||
}
|
||||
|
|
|
@ -1,15 +1,16 @@
|
|||
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
|
||||
#include <msvcrt/ctype.h>
|
||||
|
||||
|
||||
#undef isxdigit
|
||||
int isxdigit(int c)
|
||||
{
|
||||
return _isctype(c,_HEX);
|
||||
return _isctype(c, _HEX);
|
||||
}
|
||||
|
||||
#undef iswxdigit
|
||||
int iswxdigit(wint_t c)
|
||||
{
|
||||
return iswctype(c,_HEX);
|
||||
return iswctype(c, _HEX);
|
||||
}
|
||||
|
||||
|
|
|
@ -5,5 +5,5 @@
|
|||
|
||||
int __toascii(int c)
|
||||
{
|
||||
return ((unsigned)(c) & 0x7F );
|
||||
return((unsigned)(c) & 0x7F);
|
||||
}
|
||||
|
|
|
@ -1,28 +1,35 @@
|
|||
struct _exception {
|
||||
int type;
|
||||
char *name;
|
||||
double arg1;
|
||||
double arg2;
|
||||
double retval;
|
||||
} ;
|
||||
#include <windows.h>
|
||||
#include <ntos/except.h>
|
||||
|
||||
int _matherr(struct _exception *e)
|
||||
|
||||
struct _exception {
|
||||
int type;
|
||||
char* name;
|
||||
double arg1;
|
||||
double arg2;
|
||||
double retval;
|
||||
} ;
|
||||
|
||||
|
||||
int _matherr(struct _exception* e)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// not exported by NTDLL
|
||||
void __setusermatherr(int (* handler)(struct _exception *))
|
||||
void __setusermatherr(int (*handler)(struct _exception*))
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
#define _FPIEEE_RECORD void
|
||||
|
||||
int _fpieee_flt(
|
||||
unsigned long exception_code,
|
||||
struct _EXCEPTION_POINTERS *ExceptionPointer,
|
||||
int (* handler)(_FPIEEE_RECORD *)
|
||||
struct _EXCEPTION_POINTERS* ExceptionPointer,
|
||||
int (*handler)(_FPIEEE_RECORD*)
|
||||
)
|
||||
{
|
||||
return 0;
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
#include <msvcrt/float.h>
|
||||
#include <msvcrt/internal/ieee.h>
|
||||
|
||||
|
||||
double _chgsign( double __x )
|
||||
{
|
||||
double_t *x = (double_t *)&x;
|
||||
|
||||
if ( x->sign == 1 )
|
||||
x->sign = 0;
|
||||
else
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#include <msvcrt/math.h>
|
||||
#include <msvcrt/internal/ieee.h>
|
||||
|
||||
|
||||
#define _FPCLASS_SNAN 0x0001 /* signaling NaN */
|
||||
#define _FPCLASS_QNAN 0x0002 /* quiet NaN */
|
||||
#define _FPCLASS_NINF 0x0004 /* negative infinity */
|
||||
|
@ -58,8 +59,5 @@ fpclass_t _fpclass(double __d)
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#include <msvcrt/float.h>
|
||||
|
||||
|
||||
void _fpreset(void)
|
||||
{
|
||||
/* FIXME: This causes an exception */
|
||||
|
|
|
@ -20,6 +20,7 @@ Cambridge, MA 02139, USA. */
|
|||
#include <msvcrt/float.h>
|
||||
#include <msvcrt/internal/ieee.h>
|
||||
|
||||
|
||||
int _isnan(double __x)
|
||||
{
|
||||
double_t * x = (double_t *)&__x;
|
||||
|
@ -28,7 +29,6 @@ int _isnan(double __x)
|
|||
|
||||
int _isnanl(long double __x)
|
||||
{
|
||||
|
||||
/* Intel's extended format has the normally implicit 1 explicit
|
||||
present. Sigh! */
|
||||
|
||||
|
@ -43,15 +43,12 @@ int _isnanl(long double __x)
|
|||
&& ( (x->mantissah & (unsigned int)0x7fffffff) != 0 || x->mantissal != 0 ));
|
||||
}
|
||||
|
||||
|
||||
int _isinf(double __x)
|
||||
{
|
||||
double_t * x = (double_t *)&__x;
|
||||
return ( x->exponent == 0x7ff && ( x->mantissah == 0 && x->mantissal == 0 ));
|
||||
}
|
||||
|
||||
|
||||
|
||||
int _finite( double x )
|
||||
{
|
||||
return !_isinf(x);
|
||||
|
@ -73,5 +70,3 @@ int _isinfl(long double __x)
|
|||
return x->sign ? -1 : 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#include <msvcrt/float.h>
|
||||
|
||||
|
||||
double _nextafter( double x, double y )
|
||||
{
|
||||
if ( x == y)
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
#include <windows.h>
|
||||
#include <msvcrt/io.h>
|
||||
|
||||
|
||||
int _locking(int _fd, int mode, long nbytes)
|
||||
{
|
||||
long offset = _lseek(_fd, 0L, 1);
|
||||
if (!LockFile(_get_osfhandle(_fd),offset,0,nbytes,0))
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -20,7 +20,8 @@
|
|||
|
||||
#include <msvcrt/math.h>
|
||||
|
||||
double acos (double __x)
|
||||
|
||||
double acos(double __x)
|
||||
{
|
||||
return atan2 (sqrt (1.0 - __x * __x), __x);
|
||||
return atan2(sqrt(1.0 - __x * __x), __x);
|
||||
}
|
||||
|
|
|
@ -20,7 +20,8 @@
|
|||
|
||||
#include <msvcrt/math.h>
|
||||
|
||||
double asin (double __x)
|
||||
|
||||
double asin(double __x)
|
||||
{
|
||||
return atan2 (__x, sqrt (1.0 - __x * __x));
|
||||
return atan2(__x, sqrt(1.0 - __x * __x));
|
||||
}
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
|
||||
#include <msvcrt/math.h>
|
||||
|
||||
|
||||
double cosh(double x)
|
||||
{
|
||||
const double ebig = exp(fabs(x));
|
||||
return (ebig + 1.0/ebig) / 2.0;
|
||||
const double ebig = exp(fabs(x));
|
||||
return (ebig + 1.0/ebig) / 2.0;
|
||||
}
|
||||
|
|
|
@ -5,14 +5,15 @@
|
|||
double
|
||||
frexp(double __x, int *exptr)
|
||||
{
|
||||
double_t *x = (double_t *)&__x;
|
||||
|
||||
if (exptr != NULL)
|
||||
*exptr = x->exponent - 0x3FE;
|
||||
|
||||
x->exponent = 0x3FE;
|
||||
|
||||
return __x;
|
||||
double_t *x = (double_t *)&__x;
|
||||
|
||||
if ( exptr != NULL )
|
||||
*exptr = x->exponent - 0x3FE;
|
||||
|
||||
|
||||
x->exponent = 0x3FE;
|
||||
|
||||
return __x;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -2,5 +2,5 @@
|
|||
|
||||
long _ftol(double fl)
|
||||
{
|
||||
return (long)fl;
|
||||
return (long)fl;
|
||||
}
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
#include <msvcrt/math.h>
|
||||
|
||||
double _j0(double x)
|
||||
|
||||
double _j0(double x)
|
||||
{
|
||||
return x;
|
||||
return x;
|
||||
}
|
||||
|
||||
double _y0(double x)
|
||||
double _y0(double x)
|
||||
{
|
||||
return x;
|
||||
return x;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
#include <msvcrt/math.h>
|
||||
|
||||
double _j1(double x)
|
||||
|
||||
double _j1(double x)
|
||||
{
|
||||
return x;
|
||||
return x;
|
||||
}
|
||||
|
||||
double _y1(double x)
|
||||
double _y1(double x)
|
||||
{
|
||||
return x;
|
||||
return x;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#include <msvcrt/math.h>
|
||||
|
||||
|
||||
double _jn(int n, double x)
|
||||
{
|
||||
return x;
|
||||
|
|
|
@ -1,84 +1,85 @@
|
|||
#include <msvcrt/math.h>
|
||||
|
||||
double _CIsin (double x);
|
||||
double _CIcos (double x);
|
||||
double _CItan (double x);
|
||||
double _CIsinh (double x);
|
||||
double _CIcosh (double x);
|
||||
double _CItanh (double x);
|
||||
double _CIasin (double x);
|
||||
double _CIacos (double x);
|
||||
double _CIatan (double x);
|
||||
double _CIatan2 (double y, double x);
|
||||
double _CIexp (double x);
|
||||
double _CIlog (double x);
|
||||
double _CIlog10 (double x);
|
||||
double _CIpow (double x, double y);
|
||||
double _CIsqrt (double x);
|
||||
double _CIfmod (double x, double y);
|
||||
|
||||
double _CIsin(double x);
|
||||
double _CIcos(double x);
|
||||
double _CItan(double x);
|
||||
double _CIsinh(double x);
|
||||
double _CIcosh(double x);
|
||||
double _CItanh(double x);
|
||||
double _CIasin(double x);
|
||||
double _CIacos(double x);
|
||||
double _CIatan(double x);
|
||||
double _CIatan2(double y, double x);
|
||||
double _CIexp(double x);
|
||||
double _CIlog(double x);
|
||||
double _CIlog10(double x);
|
||||
double _CIpow(double x, double y);
|
||||
double _CIsqrt(double x);
|
||||
double _CIfmod(double x, double y);
|
||||
|
||||
|
||||
double _CIsin (double x)
|
||||
double _CIsin(double x)
|
||||
{
|
||||
return sin(x);
|
||||
}
|
||||
double _CIcos (double x)
|
||||
double _CIcos(double x)
|
||||
{
|
||||
return cos(x);
|
||||
}
|
||||
double _CItan (double x)
|
||||
double _CItan(double x)
|
||||
{
|
||||
return tan(x);
|
||||
}
|
||||
double _CIsinh (double x)
|
||||
double _CIsinh(double x)
|
||||
{
|
||||
return sinh(x);
|
||||
}
|
||||
double _CIcosh (double x)
|
||||
double _CIcosh(double x)
|
||||
{
|
||||
return cosh(x);
|
||||
}
|
||||
double _CItanh (double x)
|
||||
double _CItanh(double x)
|
||||
{
|
||||
return tanh(x);
|
||||
}
|
||||
double _CIasin (double x)
|
||||
double _CIasin(double x)
|
||||
{
|
||||
return asin(x);
|
||||
}
|
||||
double _CIacos (double x)
|
||||
double _CIacos(double x)
|
||||
{
|
||||
return acos(x);
|
||||
}
|
||||
double _CIatan (double x)
|
||||
double _CIatan(double x)
|
||||
{
|
||||
return atan(x);
|
||||
}
|
||||
double _CIatan2 (double y, double x)
|
||||
double _CIatan2(double y, double x)
|
||||
{
|
||||
return atan2(y,x);
|
||||
return atan2(y, x);
|
||||
}
|
||||
double _CIexp (double x)
|
||||
double _CIexp(double x)
|
||||
{
|
||||
return exp(x);
|
||||
}
|
||||
double _CIlog (double x)
|
||||
double _CIlog(double x)
|
||||
{
|
||||
return log(x);
|
||||
}
|
||||
double _CIlog10 (double x)
|
||||
double _CIlog10(double x)
|
||||
{
|
||||
return log10(x);
|
||||
}
|
||||
double _CIpow (double x, double y)
|
||||
double _CIpow(double x, double y)
|
||||
{
|
||||
return pow(x,y);
|
||||
return pow(x, y);
|
||||
}
|
||||
double _CIsqrt (double x)
|
||||
double _CIsqrt(double x)
|
||||
{
|
||||
return sqrt(x);
|
||||
}
|
||||
double _CIfmod (double x, double y)
|
||||
double _CIfmod(double x, double y)
|
||||
{
|
||||
return fmod(x,y);
|
||||
return fmod(x, y);
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include <msvcrt/mbstring.h>
|
||||
#include <msvcrt/mbctype.h>
|
||||
|
||||
|
||||
int _ismbchira( unsigned int c )
|
||||
{
|
||||
return ((c>=0x829F) && (c<=0x82F1));
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
int _ismbbkalpha(unsigned char c)
|
||||
{
|
||||
return (0xA7 <= c <= 0xDF);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,14 +1,15 @@
|
|||
|
||||
//iskana() :(0xA1 <= c <= 0xDF)
|
||||
//iskpun() :(0xA1 <= c <= 0xA6)
|
||||
//iskmoji() :(0xA7 <= c <= 0xDF)
|
||||
#include <msvcrt/mbstring.h>
|
||||
#include <msvcrt/mbctype.h>
|
||||
#include <msvcrt/ctype.h>
|
||||
|
||||
|
||||
int _ismbbpunct(unsigned char c)
|
||||
{
|
||||
// (0xA1 <= c <= 0xA6)
|
||||
return (ispunct(c) || _ismbbkana(c));
|
||||
}
|
||||
|
||||
//iskana() :(0xA1 <= c <= 0xDF)
|
||||
//iskpun() :(0xA1 <= c <= 0xA6)
|
||||
//iskmoji() :(0xA7 <= c <= 0xDF)
|
||||
|
|
|
@ -56,4 +56,3 @@ unsigned char * _mbsnbcat(unsigned char *dst, const unsigned char *src, size_t n
|
|||
}
|
||||
return dst;
|
||||
}
|
||||
|
||||
|
|
|
@ -10,7 +10,8 @@
|
|||
|
||||
#include <msvcrt/mbstring.h>
|
||||
|
||||
unsigned char *_mbsncpy(unsigned char *str1, const unsigned char *str2, size_t n)
|
||||
|
||||
unsigned char* _mbsncpy(unsigned char *str1, const unsigned char *str2, size_t n)
|
||||
{
|
||||
unsigned char *s1 = (unsigned char *)str1;
|
||||
unsigned char *s2 = (unsigned char *)str2;
|
||||
|
@ -43,6 +44,13 @@ unsigned char *_mbsncpy(unsigned char *str1, const unsigned char *str2, size_t n
|
|||
return 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.
|
||||
//
|
||||
|
||||
unsigned char * _mbsnbcpy(unsigned char *str1, const unsigned char *str2, size_t n)
|
||||
{
|
||||
unsigned char *s1 = (unsigned char *)str1;
|
||||
|
@ -54,8 +62,10 @@ unsigned char * _mbsnbcpy(unsigned char *str1, const unsigned char *str2, size_t
|
|||
return 0;
|
||||
do {
|
||||
|
||||
if (*s2 == 0)
|
||||
if (*s2 == 0) {
|
||||
*s1 = *s2;
|
||||
break;
|
||||
}
|
||||
|
||||
if ( !_ismbblead(*s2) ) {
|
||||
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
#include <msvcrt/mbstring.h>
|
||||
|
||||
|
||||
size_t _mbclen2(const unsigned int s);
|
||||
unsigned int _mbbtoupper(unsigned int c);
|
||||
|
||||
|
||||
int _mbsnicmp(const unsigned char *s1, const unsigned char *s2, size_t n)
|
||||
{
|
||||
if (n == 0)
|
||||
|
@ -37,4 +39,3 @@ int _mbsnbicmp(const unsigned char *s1, const unsigned char *s2, size_t n)
|
|||
} while (n > 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#include <msvcrt/mbstring.h>
|
||||
|
||||
// not correct
|
||||
unsigned char * _mbspbrk(const unsigned char *s1, const unsigned char *s2)
|
||||
{
|
||||
|
|
|
@ -48,4 +48,3 @@ unsigned char * _mbsupr(unsigned char *x)
|
|||
}
|
||||
return x;
|
||||
}
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
#include <msvcrt/stdlib.h>
|
||||
#include <msvcrt/signal.h>
|
||||
|
||||
|
||||
void _assert(const char *msg, const char *file, int line)
|
||||
{
|
||||
/* Assertion failed at foo.c line 45: x<y */
|
||||
|
|
|
@ -12,20 +12,21 @@
|
|||
#include <msvcrt/errno.h>
|
||||
#include <msvcrt/internal/file.h>
|
||||
|
||||
|
||||
int _cwait(int* pnStatus, int hProc, int nAction)
|
||||
{
|
||||
DWORD ExitCode;
|
||||
DWORD ExitCode;
|
||||
|
||||
nAction = 0;
|
||||
if (WaitForSingleObject((void *)hProc,INFINITE) != WAIT_OBJECT_0) {
|
||||
__set_errno(ECHILD);
|
||||
return -1;
|
||||
}
|
||||
nAction = 0;
|
||||
if (WaitForSingleObject((void*)hProc, INFINITE) != WAIT_OBJECT_0) {
|
||||
__set_errno(ECHILD);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!GetExitCodeProcess((void *)hProc,&ExitCode))
|
||||
return -1;
|
||||
if (pnStatus != NULL)
|
||||
*pnStatus = (int)ExitCode;
|
||||
CloseHandle((HANDLE)hProc);
|
||||
return hProc;
|
||||
if (!GetExitCodeProcess((void*)hProc, &ExitCode))
|
||||
return -1;
|
||||
if (pnStatus != NULL)
|
||||
*pnStatus = (int)ExitCode;
|
||||
CloseHandle((HANDLE)hProc);
|
||||
return hProc;
|
||||
}
|
||||
|
|
|
@ -11,21 +11,22 @@
|
|||
#include <windows.h>
|
||||
#include <msvcrt/process.h>
|
||||
|
||||
void *_loaddll (char *name)
|
||||
|
||||
void* _loaddll(char* name)
|
||||
{
|
||||
return LoadLibraryA(name);
|
||||
}
|
||||
|
||||
int _unloaddll(void *handle)
|
||||
int _unloaddll(void* handle)
|
||||
{
|
||||
return FreeLibrary(handle);
|
||||
}
|
||||
|
||||
FARPROC _getdllprocaddr(void *hModule,char * lpProcName, int iOrdinal)
|
||||
FARPROC _getdllprocaddr(void* hModule, char* lpProcName, int iOrdinal)
|
||||
{
|
||||
if ( lpProcName != NULL )
|
||||
if (lpProcName != NULL)
|
||||
return GetProcAddress(hModule, lpProcName);
|
||||
else
|
||||
return GetProcAddress(hModule, (LPSTR)iOrdinal);
|
||||
return (NULL);
|
||||
return (NULL);
|
||||
}
|
||||
|
|
|
@ -1,45 +1,22 @@
|
|||
/* $Id: thread.c,v 1.4 2002/09/08 10:22:54 chorns Exp $
|
||||
/* $Id: thread.c,v 1.5 2002/11/29 15:59:04 robd Exp $
|
||||
*
|
||||
*/
|
||||
#include <windows.h>
|
||||
#include <msvcrt/errno.h>
|
||||
#include <msvcrt/process.h>
|
||||
|
||||
unsigned long
|
||||
_beginthread (
|
||||
void ( __cdecl * start_address ) (void *),
|
||||
unsigned stack_size,
|
||||
void * arglist
|
||||
)
|
||||
|
||||
unsigned long _beginthread(
|
||||
void (__cdecl *start_address)(void*),
|
||||
unsigned stack_size,
|
||||
void* arglist)
|
||||
{
|
||||
errno = ENOSYS;
|
||||
return (unsigned long) -1;
|
||||
errno = ENOSYS;
|
||||
return (unsigned long)-1;
|
||||
}
|
||||
|
||||
|
||||
unsigned long
|
||||
_beginthreadex (
|
||||
void * security,
|
||||
unsigned stack_size,
|
||||
unsigned ( __stdcall * start_address ) (void *),
|
||||
void * arglist,
|
||||
unsigned initflag,
|
||||
unsigned * thrdaddr
|
||||
)
|
||||
{
|
||||
errno = ENOSYS;
|
||||
return (unsigned long) -1;
|
||||
}
|
||||
|
||||
|
||||
void _endthread (void)
|
||||
void _endthread(void)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void _endthreadex (unsigned retval)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/* EOF */
|
||||
|
|
|
@ -5,14 +5,14 @@
|
|||
void *_lfind(const void *key, const void *base, size_t *nelp,
|
||||
size_t width, int (*compar)(const void *, const void *))
|
||||
{
|
||||
char *char_base = (char *)base;
|
||||
int i;
|
||||
char* char_base = (char*)base;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < *nelp; i++) {
|
||||
if (compar(key,char_base) == 0)
|
||||
return char_base;
|
||||
char_base += width;
|
||||
}
|
||||
return NULL;
|
||||
for (i = 0; i < *nelp; i++) {
|
||||
if (compar(key, char_base) == 0)
|
||||
return char_base;
|
||||
char_base += width;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -3,6 +3,9 @@
|
|||
size_t mbstowcs( wchar_t *wcstr, const char *mbstr, size_t count )
|
||||
{
|
||||
size_t Size;
|
||||
return (size_t)Size;
|
||||
}
|
||||
|
||||
/*
|
||||
NTSTATUS Status;
|
||||
ULONG Size;
|
||||
|
@ -27,8 +30,6 @@ size_t mbstowcs( wchar_t *wcstr, const char *mbstr, size_t count )
|
|||
if (!NT_SUCCESS(Status))
|
||||
return -1;
|
||||
*/
|
||||
return (size_t)Size;
|
||||
}
|
||||
|
||||
//int mbtowc( wchar_t *wchar, const char *mbchar, size_t count )
|
||||
//{
|
||||
|
|
|
@ -1,16 +1,6 @@
|
|||
#include <msvcrt/stdlib.h>
|
||||
|
||||
|
||||
//int mblen (const char* mbs, size_t sizeString)
|
||||
//{
|
||||
// return 0;
|
||||
//}
|
||||
|
||||
//size_t mbstowcs (wchar_t* wcaDest, const char* mbsConvert, size_t size)
|
||||
//{
|
||||
// return 0;
|
||||
//}
|
||||
|
||||
//int mbtowc(wchar_t* wcDest, const char* mbConvert, size_t size)
|
||||
int mbtowc(wchar_t *wchar, const char *mbchar, size_t count)
|
||||
{
|
||||
|
@ -19,31 +9,4 @@ int mbtowc(wchar_t *wchar, const char *mbchar, size_t count)
|
|||
|
||||
// WideCharToMultiByte
|
||||
// MultiByteToWideChar
|
||||
/*
|
||||
int MultiByteToWideChar(
|
||||
UINT CodePage, // code page
|
||||
DWORD dwFlags, // character-type options
|
||||
LPCSTR lpMultiByteStr, // string to map
|
||||
int cbMultiByte, // number of bytes in string
|
||||
LPWSTR lpWideCharStr, // wide-character buffer
|
||||
int cchWideChar // size of buffer
|
||||
);
|
||||
*/
|
||||
/*
|
||||
NTSTATUS Status;
|
||||
ULONG Size;
|
||||
|
||||
if (wchar == NULL)
|
||||
return 0;
|
||||
|
||||
Status = RtlMultiByteToUnicodeN (wchar,
|
||||
sizeof(WCHAR),
|
||||
&Size,
|
||||
(char *)mbchar,
|
||||
count);
|
||||
if (!NT_SUCCESS(Status))
|
||||
return -1;
|
||||
|
||||
return (int)Size;
|
||||
*/
|
||||
}
|
||||
|
|
|
@ -3,11 +3,10 @@
|
|||
|
||||
/* This is the most reliable way to avoid incompatibilities
|
||||
in available built-in functions on various systems. */
|
||||
void *
|
||||
memcpy (void *to, const void *from, size_t count)
|
||||
void* memcpy(void* to, const void* from, size_t count)
|
||||
{
|
||||
register char *f = (char *)from;
|
||||
register char *t = (char *)to;
|
||||
register char* f = (char*)from;
|
||||
register char* t = (char*)to;
|
||||
register int i = count;
|
||||
|
||||
while (i-- > 0)
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue