Further reduced differences and include all identical msvcrt targets in crtdll makefile.
authorRobert Dickenson <robd@reactos.org>
Fri, 29 Nov 2002 15:59:05 +0000 (15:59 +0000)
committerRobert Dickenson <robd@reactos.org>
Fri, 29 Nov 2002 15:59:05 +0000 (15:59 +0000)
svn path=/trunk/; revision=3809

109 files changed:
reactos/lib/crtdll/ctype/isalnum.c
reactos/lib/crtdll/ctype/isalpha.c
reactos/lib/crtdll/ctype/isascii.c
reactos/lib/crtdll/ctype/isspace.c
reactos/lib/crtdll/direct/chdir.c
reactos/lib/crtdll/direct/chdrive.c
reactos/lib/crtdll/direct/getcwd.c
reactos/lib/crtdll/direct/getdcwd.c
reactos/lib/crtdll/direct/getdfree.c
reactos/lib/crtdll/direct/getdrive.c
reactos/lib/crtdll/direct/mkdir.c
reactos/lib/crtdll/direct/rmdir.c
reactos/lib/crtdll/io/find.c
reactos/lib/crtdll/io/setmode.c
reactos/lib/crtdll/makefile
reactos/lib/crtdll/math/modf.c
reactos/lib/crtdll/math/tanh.c
reactos/lib/crtdll/mbstring/ismbc.c
reactos/lib/crtdll/mbstring/mbscoll.c
reactos/lib/crtdll/mbstring/mbscspn.c
reactos/lib/crtdll/mbstring/mbsicoll.c
reactos/lib/crtdll/mbstring/mbsncpy.c
reactos/lib/crtdll/mbstring/mbsnextc.c
reactos/lib/crtdll/mbstring/mbsnicoll.c
reactos/lib/crtdll/mbstring/mbsspn.c
reactos/lib/crtdll/mbstring/mbsspnp.c
reactos/lib/crtdll/process/procid.c
reactos/lib/crtdll/process/thread.c
reactos/lib/crtdll/search/lfind.c
reactos/lib/crtdll/stdio/fdopen.c
reactos/lib/crtdll/stdio/fscanf.c
reactos/lib/crtdll/stdio/printf.c
reactos/lib/crtdll/stdio/rewind.c
reactos/lib/crtdll/stdio/sprintf.c
reactos/lib/crtdll/stdio/sscanf.c
reactos/lib/crtdll/stdio/tempnam.c
reactos/lib/crtdll/stdio/vprintf.c
reactos/lib/crtdll/stdio/vscanf.c
reactos/lib/crtdll/stdio/vsprintf.c
reactos/lib/crtdll/stdlib/fullpath.c
reactos/lib/crtdll/stdlib/itow.c
reactos/lib/crtdll/stdlib/makepath.c
reactos/lib/crtdll/stdlib/senv.c
reactos/lib/crtdll/stdlib/splitp.c
reactos/lib/crtdll/string/memcpy.c
reactos/lib/crtdll/string/memset.c
reactos/lib/crtdll/string/strcmp.c
reactos/lib/crtdll/string/strcoll.c
reactos/lib/crtdll/string/strdup.c
reactos/lib/crtdll/string/strlen.c
reactos/lib/crtdll/string/strrev.c
reactos/lib/crtdll/string/strxfrm.c
reactos/lib/crtdll/time/clock.c
reactos/lib/crtdll/time/ctime.c
reactos/lib/crtdll/time/time.c
reactos/lib/msvcrt/Makefile
reactos/lib/msvcrt/ctype/isalnum.c
reactos/lib/msvcrt/ctype/isalpha.c
reactos/lib/msvcrt/ctype/isascii.c
reactos/lib/msvcrt/ctype/iscntrl.c
reactos/lib/msvcrt/ctype/iscsym.c
reactos/lib/msvcrt/ctype/isdigit.c
reactos/lib/msvcrt/ctype/islower.c
reactos/lib/msvcrt/ctype/ispunct.c
reactos/lib/msvcrt/ctype/isspace.c
reactos/lib/msvcrt/ctype/isupper.c
reactos/lib/msvcrt/ctype/isxdigit.c
reactos/lib/msvcrt/ctype/toascii.c
reactos/lib/msvcrt/except/matherr.c
reactos/lib/msvcrt/float/chgsign.c
reactos/lib/msvcrt/float/fpclass.c
reactos/lib/msvcrt/float/fpreset.c
reactos/lib/msvcrt/float/isnan.c
reactos/lib/msvcrt/float/nafter.c
reactos/lib/msvcrt/io/locking.c
reactos/lib/msvcrt/math/acos.c
reactos/lib/msvcrt/math/asin.c
reactos/lib/msvcrt/math/cosh.c
reactos/lib/msvcrt/math/frexp.c
reactos/lib/msvcrt/math/ftol.c
reactos/lib/msvcrt/math/j0_y0.c
reactos/lib/msvcrt/math/j1_y1.c
reactos/lib/msvcrt/math/jn_yn.c
reactos/lib/msvcrt/math/stubs.c
reactos/lib/msvcrt/mbstring/ischira.c
reactos/lib/msvcrt/mbstring/iskmoji.c
reactos/lib/msvcrt/mbstring/ismbpun.c
reactos/lib/msvcrt/mbstring/mbsncat.c
reactos/lib/msvcrt/mbstring/mbsncpy.c
reactos/lib/msvcrt/mbstring/mbsnicmp.c
reactos/lib/msvcrt/mbstring/mbspbrk.c
reactos/lib/msvcrt/mbstring/mbsupr.c
reactos/lib/msvcrt/misc/assert.c
reactos/lib/msvcrt/process/_cwait.c
reactos/lib/msvcrt/process/dll.c
reactos/lib/msvcrt/process/thread.c
reactos/lib/msvcrt/search/lfind.c
reactos/lib/msvcrt/stdlib/mbstowcs.c
reactos/lib/msvcrt/stdlib/mbtowc.c
reactos/lib/msvcrt/string/memcpy.c
reactos/lib/msvcrt/string/memset.c
reactos/lib/msvcrt/string/strcmp.c
reactos/lib/msvcrt/string/strlen.c
reactos/lib/msvcrt/string/strxfrm.c
reactos/lib/msvcrt/sys_stat/fstat.c
reactos/lib/msvcrt/sys_stat/futime.c
reactos/lib/msvcrt/time/ctime.c
reactos/lib/msvcrt/time/strftime.c
reactos/lib/msvcrt/time/time.c

index 64de232..cf741ce 100644 (file)
 #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);
 }
index 3aece4a..fecee0a 100644 (file)
@@ -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);
index 822ee3c..5536f02 100644 (file)
 
 int __isascii(int c)
 {
-  return  (!((c)&(~0x7f))) ;
+    return (!((c)&(~0x7f)));
 }
 
 int iswascii(wint_t c)
 {
-       return __isascii(c);
+    return __isascii(c);
 }
index 9eae142..723b8b0 100644 (file)
@@ -7,8 +7,10 @@
  * UPDATE HISTORY:
  *              28/12/98: Created
  */
+
 #include <msvcrt/ctype.h>
 
+
 #undef isspace
 int isspace(int c)
 {
index 212b7dc..eb8061d 100644 (file)
@@ -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;
 }
index d31ed46..1522904 100644 (file)
@@ -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;
 }
index 1a27d4b..67638b9 100644 (file)
@@ -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 (buffer == NULL) {
+        cwd = malloc(MAX_PATH);
+        len = MAX_PATH;
+    } else {
+        cwd = buffer;
+        len = maxlen;
+    }
     if (GetCurrentDirectoryA(len, cwd) == 0) {
-               return NULL;
+        return NULL;
     }
-       return cwd;
+    return cwd;
 }
index 2c6c888..bbf79fd 100644 (file)
@@ -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;
 }
index a240503..cd90b43 100644 (file)
@@ -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;
 }
index e2b6e66..5638c65 100644 (file)
@@ -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
 }
index 9b5bb0f..e568b9c 100644 (file)
@@ -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;
 }
index 3619d04..a057acd 100644 (file)
@@ -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;
 }
index a2dfe8b..83b379b 100644 (file)
@@ -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)
index a127902..6109947 100644 (file)
@@ -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
index a23db83..a7f767e 100644 (file)
@@ -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 \
+       $(PATH_TO_MSVCRT)/stdio/rename.o \
+       $(PATH_TO_MSVCRT)/stdio/rewind.o \
+       $(PATH_TO_MSVCRT)/stdio/rmtmp.o \
+       stdio/scanf.o \
+       $(PATH_TO_MSVCRT)/stdio/setbuf.o \
        stdio/setbuffe.o \
-       stdlib/obsol.o \
        stdio/setlineb.o \
-       stdio/scanf.o \
-       stdio/setbuf.o \
-       stdio/setvbuf.o \
-       stdio/sprintf.o \
-       stdio/sscanf.o \
-       stdio/stdhnd.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 \
index 71b6151..336a7d7 100644 (file)
@@ -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;
-                       
-                               
-                       __x = 0.0;
-                       x->sign = iptr->sign;
+               *__i = __x;
+               if ( _isnan(__x) || _isinf(__x) )
                        return __x;
-       } else {                        /* fraction part in low 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;
-                       }
-                       return __x - *__i;        
+               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;
        }
 }
 
 
 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;
-                               
-                       __x = 0.0L;
-                       x->sign = iptr->sign;
+               *__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;
-                       }
-                       iptr->sign = x->sign;
-                       iptr->exponent = x->exponent;
-                       iptr->mantissah = x->mantissah;
-                       iptr->mantissal = x->mantissal&(~i);
+               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);
        
-                       return __x - *__i;        
-
-
+               return __x - *__i;
        }
 }
index a87337e..da1eabb 100644 (file)
@@ -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);
   }
 }
-
index deed653..a79edbd 100644 (file)
@@ -87,7 +87,6 @@ int _ismbclegal(unsigned int c)
                return _ismbbtrail(c&0xFF);
 
        return 0;
-        
 }
 
 int _ismbcl0(unsigned int c)
index 062413f..dad12be 100644 (file)
@@ -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
index 63f3f35..46783ee 100644 (file)
@@ -1,4 +1,5 @@
 #include <msvcrt/mbstring.h>
+
 // not correct
 size_t _mbscspn(const unsigned char *s1, const unsigned char *s2)
 {
index 426880e..32020cc 100644 (file)
@@ -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)
 {
index a2e21c0..2090c48 100644 (file)
@@ -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) ) {
 
index 3c3a254..7a11cd5 100644 (file)
@@ -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;
-               
 }
index 8697c75..3fead6d 100644 (file)
@@ -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;
index 4a1bbd7..c9ca1ac 100644 (file)
@@ -1,4 +1,5 @@
 #include <msvcrt/mbstring.h>
+
 // not correct
 size_t _mbsspn(const unsigned char *s1, const unsigned char *s2)
 {
index 4e0e6e3..37b8f36 100644 (file)
@@ -1,4 +1,5 @@
 #include <msvcrt/mbstring.h>
+
 // not correct
 unsigned char * _mbsspnp(const unsigned char *s1, const unsigned char *s2)
 {
index 6d8f8a6..a8616fb 100644 (file)
@@ -3,8 +3,6 @@
 
 int _getpid (void)
 {
-       //fixme GetCurrentProcessId
-        //return (int)GetCurrentProcessId();
-       return 1;
+   return (int)GetCurrentProcessId();
 }
 
index b6c0f95..be3b568 100644 (file)
@@ -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
index 33be718..8bfa458 100644 (file)
@@ -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;
        }
index 3ef6769..d543e25 100644 (file)
@@ -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;
 }        
-
index 5e04c6c..1b23898 100644 (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;
 }
-
index 96a16e8..36cd1ae 100644 (file)
@@ -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>
 
index 19f451d..013e2fc 100644 (file)
@@ -12,5 +12,4 @@ void rewind(FILE *f)
   f->_cnt = 0;
   f->_ptr = f->_base;
   f->_flag &= ~(_IOERR|_IOEOF|_IOAHEAD);
-
 }
index 205697c..8a27c85 100644 (file)
@@ -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>
index 002070a..c0ccbb3 100644 (file)
    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, ...)
index a527ebd..574dc4f 100644 (file)
@@ -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;
     }
index 5ce0410..f724749 100644 (file)
@@ -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>
index 3a6ef3d..4c6b796 100644 (file)
@@ -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)
 
index 764020c..75bfb1d 100644 (file)
@@ -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>
 
index 873a49f..246cadf 100644 (file)
@@ -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;
index 38d600b..af83dc8 100644 (file)
@@ -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_*/
     }
index cccae14..8bb5231 100644 (file)
@@ -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>
index b996ef6..b87dcb6 100644 (file)
@@ -5,6 +5,7 @@
 #define NDEBUG
 #include <msvcrt/msvcrtdbg.h>
 
+
 void _searchenv(const char *file,const char *var,char *path )
 {
        char *env = getenv(var);
index e6709fd..9d69349 100644 (file)
@@ -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;
        }
 }
-
index ebad8d9..7b2dd74 100644 (file)
@@ -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)
index 124b3a6..01164bf 100644 (file)
@@ -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--;
index 9a0b8e7..52d3448 100644 (file)
@@ -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);
 }
index 3ecadce..81e27d6 100644 (file)
@@ -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
index 0161c7f..a84de36 100644 (file)
@@ -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;
index 808d96c..a2995f8 100644 (file)
@@ -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 chars;
 
   if (str == 0)
     return 0;
index ef5ab94..d36b7a3 100644 (file)
@@ -1,6 +1,6 @@
 #include <msvcrt/string.h>
 
-char * _strrev(char *s) 
+char * _strrev(char *s)
 {
        char  *e;
        char   a;
index 0ebc3c5..ce76f99 100644 (file)
@@ -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;
index 33bb0b0..3b7745a 100644 (file)
@@ -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);
 }
index 354296f..ef5c117 100644 (file)
  * 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
   }
   /*
index c28af3f..f7019fb 100644 (file)
 #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;
index 98c0fae..451563d 100644 (file)
@@ -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
index e4b7a11..6fed569 100644 (file)
 #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);
 }
index a506197..13f7160 100644 (file)
 
 #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);
 }
index 0725ce3..72819e2 100644 (file)
 
 int __isascii(int c)
 {
-   return (!((c)&(~0x7f)));
+    return (!((c)&(~0x7f)));
 }
 
 int iswascii(wint_t c)
 {
-   return __isascii(c);
+    return __isascii(c);
 }
index f6a685e..cd51e8d 100644 (file)
@@ -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);
 }
index 41a6da6..0e91f7d 100644 (file)
@@ -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 == '_' )) ;
 }
index ae588e4..e84881d 100644 (file)
@@ -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);
 }
index c3a9178..34cc31a 100644 (file)
@@ -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);
 }
index e26e3e8..5a06ae4 100644 (file)
@@ -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);
 }
index de47c11..3bb9d32 100644 (file)
@@ -7,8 +7,10 @@
  * UPDATE HISTORY:
  *              28/12/98: Created
  */
+
 #include <msvcrt/ctype.h>
 
+
 #undef isspace
 int isspace(int c)
 {
index 9898cb3..a7e67b2 100644 (file)
@@ -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);
 }
index 9c24dda..63f8464 100644 (file)
@@ -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);
 }
 
index 16d959b..f26d5af 100644 (file)
@@ -5,5 +5,5 @@
 
 int __toascii(int c)
 {
-  return ((unsigned)(c) & 0x7F );
+    return((unsigned)(c) & 0x7F);
 }
index a87868d..01de05c 100644 (file)
@@ -1,28 +1,35 @@
+#include <windows.h>
+#include <ntos/except.h>
+
+
 struct _exception {
-        int type;
-        char *name;
-        double arg1;
-        double arg2;
-        double retval;
-        } ;
-
-int _matherr(struct _exception *e)
+    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_POINTERSExceptionPointer,
+        int (*handler)(_FPIEEE_RECORD*)
         )
 {
     return 0;
index 0fb4072..a8588a6 100644 (file)
@@ -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 
index d4c280a..5401aa1 100644 (file)
@@ -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;
 }
-
-
index 4127159..59902e4 100644 (file)
@@ -1,5 +1,6 @@
 #include <msvcrt/float.h>
 
+
 void _fpreset(void)
 {
   /* FIXME: This causes an exception */
index 6cff15b..27d810c 100644 (file)
@@ -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;
 }
-
-
index 9773d92..a8bd034 100644 (file)
@@ -1,5 +1,6 @@
 #include <msvcrt/float.h>
 
+
 double _nextafter( double x, double y )
 {
        if ( x == y)
index ba32830..9012183 100644 (file)
@@ -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;
 }
index 9bde5e9..23376a6 100644 (file)
@@ -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);
 }
index 5f912ba..fa57df2 100644 (file)
@@ -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));
 }
index 1f89a0e..10fadd6 100644 (file)
@@ -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;
 }
index 27de8a3..b85cd98 100644 (file)
@@ -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; 
 }
 
 
index dfa3346..1753090 100644 (file)
@@ -2,5 +2,5 @@
 
 long _ftol(double fl)
 {
-  return (long)fl;
+       return (long)fl;
 }
index db89a92..83035ee 100644 (file)
@@ -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;
 }
-
index fa0f618..55d6bd6 100644 (file)
@@ -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;
 }
index a953e80..8a3c833 100644 (file)
@@ -1,5 +1,6 @@
 #include <msvcrt/math.h>
 
+
 double _jn(int n, double x)
 {
        return x;
index a43b9fc..57eb090 100644 (file)
@@ -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);
 }
index 5cd4695..3841564 100644 (file)
@@ -11,6 +11,7 @@
 #include <msvcrt/mbstring.h>
 #include <msvcrt/mbctype.h>
 
+
 int _ismbchira( unsigned int c )
 {
   return ((c>=0x829F) && (c<=0x82F1));
index a8cc174..88ac598 100644 (file)
@@ -3,4 +3,4 @@
 int _ismbbkalpha(unsigned char c)
 {
  return (0xA7 <= c <= 0xDF);
-}
\ No newline at end of file
+}
index 171b1a4..eebe521 100644 (file)
@@ -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)
index 146842b..329b94c 100644 (file)
@@ -56,4 +56,3 @@ unsigned char * _mbsnbcat(unsigned char *dst, const unsigned char *src, size_t n
        }
        return dst;
 }
-
index d1cde62..96d600f 100644 (file)
@@ -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) ) {
 
index ef34bd1..27bfbfd 100644 (file)
@@ -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;
 }
-
index f9566e7..0e36d10 100644 (file)
@@ -1,5 +1,4 @@
 #include <msvcrt/mbstring.h>
-
 // not correct
 unsigned char * _mbspbrk(const unsigned char *s1, const unsigned char *s2)
 {
index 8f8ac5b..6027eef 100644 (file)
@@ -48,4 +48,3 @@ unsigned char * _mbsupr(unsigned char *x)
         }
         return x;
 }
-
index 59b3bbd..31704ea 100644 (file)
@@ -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 */
index 982ec66..2ab22bb 100644 (file)
 #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;
 }
index ccb3c2a..565e466 100644 (file)
 #include <windows.h>
 #include <msvcrt/process.h>
 
-void *_loaddll (char *name)
+
+void* _loaddll(char* name)
 {
        return LoadLibraryA(name);
 }
 
-int _unloaddll(void *handle)
+int _unloaddll(voidhandle)
 {
        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);
 }
index d904bfc..373d535 100644 (file)
@@ -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
-       )
-{
-       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
-       )
+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;
 }
 
-
-void _endthread (void)
+void _endthread(void)
 {
 }
 
-
-void _endthreadex (unsigned retval)
-{
-}
-
-
 /* EOF */
index 4aba8d3..8bfa458 100644 (file)
@@ -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;
 }
 
index 840662c..39923b6 100644 (file)
@@ -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 )
 //{
index e808ed9..e7f0d02 100644 (file)
@@ -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;
- */
 }
index ebad8d9..7b2dd74 100644 (file)
@@ -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)
index 124b3a6..01164bf 100644 (file)
@@ -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--;
index 9a0b8e7..52d3448 100644 (file)
@@ -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);
 }
index 808d96c..a2995f8 100644 (file)
@@ -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 chars;
 
   if (str == 0)
     return 0;
index eca0b2d..ce76f99 100644 (file)
@@ -11,8 +11,7 @@ size_t strxfrm( char *dest, const char *src, size_t n )
 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) );
+                           src, strlen(src), dest, strlen(dest));
 
        if ( ret == 0 )
                return -1;
index 31ae819..a4a99d5 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: fstat.c,v 1.13 2002/11/24 18:42:25 robd Exp $
+/* $Id: fstat.c,v 1.14 2002/11/29 15:59:05 robd Exp $
  *
  * COPYRIGHT:   See COPYING in the top level directory
  * PROJECT:     ReactOS system libraries
@@ -23,8 +23,7 @@ int _fstat(int fd, struct stat* statbuf)
   DWORD dwFileType;
   void* handle;
 
-  if (!statbuf)
-  {
+  if (!statbuf) {
     __set_errno(EINVAL);
     return -1;
   }
index 9140338..399902c 100644 (file)
@@ -6,6 +6,7 @@
 #include <msvcrt/errno.h>
 #include <msvcrt/internal/file.h>
 
+
 int _futime (int nHandle, struct _utimbuf *pTimes)
 {
   FILETIME  LastAccessTime;
index a41a73b..307ebf5 100644 (file)
  * 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,9 @@ 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[] = "   ";
 
@@ -228,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
   }
   /*
index 96831ed..7a39f63 100644 (file)
@@ -4,6 +4,7 @@
 #include <msvcrt/stdlib.h>
 #include <msvcrt/wchar.h>
 
+
 #define TM_YEAR_BASE 1900
 
 static const char *afmt[] = {
@@ -25,8 +26,8 @@ static const char *Bfmt[] = {
 static size_t gsize;
 static char *pt;
 
-static int
-_add(const char *str)
+
+static int _add(const char* str)
 {
   for (;; ++pt, --gsize)
   {
@@ -37,8 +38,7 @@ _add(const char *str)
   }
 }
 
-static int
-_conv(int n, int digits, char pad)
+static int _conv(int n, int digits, char pad)
 {
   static char buf[10];
   char *p;
@@ -50,16 +50,14 @@ _conv(int n, int digits, char pad)
   return _add(++p);
 }
 
-static size_t
-_fmt(const char *format, const struct tm *t)
+static size_t _fmt(const char* format, const struct tm* t)
 {
   for (; *format; ++format)
   {
     if (*format == '%') {
        if (*(format+1) == '#' ) {format++;}
 
-      switch(*++format)
-      {
+    switch(*++format) {
       case '\0':
        --format;
        break;
@@ -113,8 +111,7 @@ _fmt(const char *format, const struct tm *t)
          return 0;
        continue;
       case 'I':
-       if (!_conv(t->tm_hour % 12 ?
-                  t->tm_hour % 12 : 12, 2, '0'))
+       if (!_conv(t->tm_hour % 12 ? t->tm_hour % 12 : 12, 2, '0'))
          return 0;
        continue;
       case 'j':
@@ -126,8 +123,7 @@ _fmt(const char *format, const struct tm *t)
          return 0;
        continue;
       case 'l':
-       if (!_conv(t->tm_hour % 12 ?
-                  t->tm_hour % 12 : 12, 2, ' '))
+       if (!_conv(t->tm_hour % 12 ? t->tm_hour % 12 : 12, 2, ' '))
          return 0;
        continue;
       case 'M':
@@ -168,14 +164,11 @@ _fmt(const char *format, const struct tm *t)
          return 0;
        continue;
       case 'U':
-       if (!_conv((t->tm_yday + 7 - t->tm_wday) / 7,
-                  2, '0'))
+       if (!_conv((t->tm_yday + 7 - t->tm_wday) / 7, 2, '0'))
          return 0;
        continue;
       case 'W':
-       if (!_conv((t->tm_yday + 7 -
-                   (t->tm_wday ? (t->tm_wday - 1) : 6))
-                  / 7, 2, '0'))
+       if (!_conv((t->tm_yday + 7 - (t->tm_wday ? (t->tm_wday - 1) : 6)) / 7, 2, '0'))
          return 0;
        continue;
       case 'w':
@@ -187,8 +180,7 @@ _fmt(const char *format, const struct tm *t)
          return 0;
        continue;
       case 'y':
-       if (!_conv((t->tm_year + TM_YEAR_BASE)
-                  % 100, 2, '0'))
+       if (!_conv((t->tm_year + TM_YEAR_BASE) % 100, 2, '0'))
          return 0;
        continue;
       case 'Y':
@@ -230,8 +222,7 @@ strftime(char *s, size_t maxsize, const char *format, const struct tm *t)
   return 0;
 }
 
-size_t
-wcsftime(wchar_t *s, size_t maxsize, const wchar_t *format, const struct tm *t)
+size_t wcsftime(wchar_t* s, size_t maxsize, const wchar_t* format, const struct tm* t)
 {
   char *x;
   char *f;
@@ -245,8 +236,7 @@ wcsftime(wchar_t *s, size_t maxsize, const wchar_t *format, const struct tm *t)
   pt = x;
   if ((gsize = maxsize) < 1)
     return 0;
-  if (_fmt(f, t))
-  {
+  if (_fmt(f, t)) {
     *pt = '\0';
     free(f);
     for(i=0;i<maxsize;i++)
index 482a1af..f24c9f1 100644 (file)
 #include <msvcrt/time.h>
 #include <msvcrt/internal/file.h>
 
-VOID STDCALL GetSystemTimeAsFileTime(LPFILETIME  lpSystemTimeAsFileTime );
 
-time_t
-time(time_t *t)
+VOID STDCALL GetSystemTimeAsFileTime(LPFILETIME lpSystemTimeAsFileTime);
+
+time_t time(time_t* t)
 {
        FILETIME  SystemTime;
        DWORD Remainder;
        time_t tt;
        GetSystemTimeAsFileTime(&SystemTime);
-       tt = FileTimeToUnixTime( &SystemTime,&Remainder ); 
+       tt = FileTimeToUnixTime(&SystemTime,&Remainder);
        if (t)
                *t = tt;
        return tt;