remove obvious duplicates Deleted: trunk/reactos/lib/crtdll/conio/ Deleted: trunk/reactos/lib/crtdll/ctype/ Deleted: trunk/reactos/lib/crtdll/direct/getdfree.c Deleted: trunk/reactos/lib/crtdll/direct/getdrive.c Deleted: trunk/reactos/lib/crtdll/direct/mkdir.c Deleted: trunk/reactos/lib/crtdll/except/ Deleted: trunk/reactos/lib/crtdll/float/clearfp.c Deleted: trunk/reactos/lib/crtdll/float/cntrlfp.c Deleted: trunk/reactos/lib/crtdll/float/fpreset.c Deleted: trunk/reactos/lib/crtdll/float/logb.c Deleted: trunk/reactos/lib/crtdll/float/nafter.c Deleted: trunk/reactos/lib/crtdll/float/statfp.c Deleted: trunk/reactos/lib/crtdll/io/chsize.c Deleted: trunk/reactos/lib/crtdll/io/close.c Deleted: trunk/reactos/lib/crtdll/io/commit.c Deleted: trunk/reactos/lib/crtdll/io/dup2.c Deleted: trunk/reactos/lib/crtdll/io/isatty.c Deleted: trunk/reactos/lib/crtdll/io/mktemp.c Deleted: trunk/reactos/lib/crtdll/io/setmode.c Deleted: trunk/reactos/lib/crtdll/io/sopen.c Deleted: trunk/reactos/lib/crtdll/io/tell.c Deleted: trunk/reactos/lib/crtdll/io/umask.c Deleted: trunk/reactos/lib/crtdll/io/utime.c Deleted: trunk/reactos/lib/crtdll/math/acos.c Deleted: trunk/reactos/lib/crtdll/math/asin.c Deleted: trunk/reactos/lib/crtdll/math/atan.c Deleted: trunk/reactos/lib/crtdll/math/atan2.c Deleted: trunk/reactos/lib/crtdll/math/cabs.c Deleted: trunk/reactos/lib/crtdll/math/cos.c Deleted: trunk/reactos/lib/crtdll/math/cosh.c Deleted: trunk/reactos/lib/crtdll/math/exp.c Deleted: trunk/reactos/lib/crtdll/math/fabs.c Deleted: trunk/reactos/lib/crtdll/math/fmod.c Deleted: trunk/reactos/lib/crtdll/math/hypot.c Deleted: trunk/reactos/lib/crtdll/math/j0_y0.c Deleted: trunk/reactos/lib/crtdll/math/j1_y1.c Deleted: trunk/reactos/lib/crtdll/math/jn_yn.c Deleted: trunk/reactos/lib/crtdll/math/ldexp.c Deleted: trunk/reactos/lib/crtdll/math/log.c Deleted: trunk/reactos/lib/crtdll/math/log10.c Deleted: trunk/reactos/lib/crtdll/math/pow.c Deleted: trunk/reactos/lib/crtdll/math/sin.c Deleted: trunk/reactos/lib/crtdll/math/sinh.c Deleted: trunk/reactos/lib/crtdll/math/sqrt.c Deleted: trunk/reactos/lib/crtdll/math/stubs.c Deleted: trunk/reactos/lib/crtdll/math/tan.c Deleted: trunk/reactos/lib/crtdll/math/tanh.c Deleted: trunk/reactos/lib/crtdll/mbstring/hanzen.c Deleted: trunk/reactos/lib/crtdll/mbstring/ischira.c Deleted: trunk/reactos/lib/crtdll/mbstring/iskana.c Deleted: trunk/reactos/lib/crtdll/mbstring/iskmoji.c Deleted: trunk/reactos/lib/crtdll/mbstring/iskpun.c Deleted: trunk/reactos/lib/crtdll/mbstring/islwr.c Deleted: trunk/reactos/lib/crtdll/mbstring/ismbal.c Deleted: trunk/reactos/lib/crtdll/mbstring/ismbaln.c Deleted: trunk/reactos/lib/crtdll/mbstring/ismbc.c Deleted: trunk/reactos/lib/crtdll/mbstring/ismbgra.c Deleted: trunk/reactos/lib/crtdll/mbstring/ismbkaln.c Deleted: trunk/reactos/lib/crtdll/mbstring/ismblead.c Deleted: trunk/reactos/lib/crtdll/mbstring/ismbpri.c Deleted: trunk/reactos/lib/crtdll/mbstring/ismbpun.c Deleted: trunk/reactos/lib/crtdll/mbstring/ismbtrl.c Deleted: trunk/reactos/lib/crtdll/mbstring/isuppr.c Deleted: trunk/reactos/lib/crtdll/mbstring/jistojms.c Deleted: trunk/reactos/lib/crtdll/mbstring/jmstojis.c Deleted: trunk/reactos/lib/crtdll/mbstring/mbbtype.c Deleted: trunk/reactos/lib/crtdll/mbstring/mbccpy.c Deleted: trunk/reactos/lib/crtdll/mbstring/mbscoll.c Deleted: trunk/reactos/lib/crtdll/mbstring/mbsdec.c Deleted: trunk/reactos/lib/crtdll/mbstring/mbsicmp.c Deleted: trunk/reactos/lib/crtdll/mbstring/mbsicoll.c Deleted: trunk/reactos/lib/crtdll/mbstring/mbsinc.c Deleted: trunk/reactos/lib/crtdll/mbstring/mbslen.c Deleted: trunk/reactos/lib/crtdll/mbstring/mbslwr.c Deleted: trunk/reactos/lib/crtdll/mbstring/mbsnccnt.c Deleted: trunk/reactos/lib/crtdll/mbstring/mbsncmp.c Deleted: trunk/reactos/lib/crtdll/mbstring/mbsncoll.c Deleted: trunk/reactos/lib/crtdll/mbstring/mbsncpy.c Deleted: trunk/reactos/lib/crtdll/mbstring/mbsnextc.c Deleted: trunk/reactos/lib/crtdll/mbstring/mbsnicmp.c Deleted: trunk/reactos/lib/crtdll/mbstring/mbsnicoll.c Deleted: trunk/reactos/lib/crtdll/mbstring/mbsninc.c Deleted: trunk/reactos/lib/crtdll/mbstring/mbsnset.c Deleted: trunk/reactos/lib/crtdll/mbstring/mbsset.c Deleted: trunk/reactos/lib/crtdll/mbstring/mbstrlen.c Deleted: trunk/reactos/lib/crtdll/mbstring/mbsupr.c Deleted: trunk/reactos/lib/crtdll/process/dll.c Deleted: trunk/reactos/lib/crtdll/process/procid.c Deleted: trunk/reactos/lib/crtdll/process/threadid.c Deleted: trunk/reactos/lib/crtdll/search/ Deleted: trunk/reactos/lib/crtdll/signal/ Deleted: trunk/reactos/lib/crtdll/stdio/allocfil.c Deleted: trunk/reactos/lib/crtdll/stdio/clearerr.c Deleted: trunk/reactos/lib/crtdll/stdio/fclose.c Deleted: trunk/reactos/lib/crtdll/stdio/fdopen.c Deleted: trunk/reactos/lib/crtdll/stdio/feof.c Deleted: trunk/reactos/lib/crtdll/stdio/ferror.c Deleted: trunk/reactos/lib/crtdll/stdio/fflush.c Deleted: trunk/reactos/lib/crtdll/stdio/fgetc.c Deleted: trunk/reactos/lib/crtdll/stdio/fgetchar.c [truncated at 100 lines; 69 more skipped] _____
Deleted: trunk/reactos/lib/crtdll/direct/getdfree.c --- trunk/reactos/lib/crtdll/direct/getdfree.c 2005-01-31 18:25:55 UTC (rev 13371) +++ trunk/reactos/lib/crtdll/direct/getdfree.c 2005-01-31 22:13:43 UTC (rev 13372) @@ -1,23 +0,0 @@
-#include "precomp.h" -#include <msvcrt/ctype.h> -#include <msvcrt/direct.h> - - -/* - * @implemented - */ -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; - if (!GetDiskFreeSpaceA(RootPathName,(LPDWORD)&_diskspace->sectors_per_clust er,(LPDWORD)&_diskspace->bytes_per_sector, - (LPDWORD )&_diskspace->avail_clusters,(LPDWORD )&_diskspace->total_clusters)) - return 0; - return _diskspace->avail_clusters; -} _____
Deleted: trunk/reactos/lib/crtdll/direct/getdrive.c --- trunk/reactos/lib/crtdll/direct/getdrive.c 2005-01-31 18:25:55 UTC (rev 13371) +++ trunk/reactos/lib/crtdll/direct/getdrive.c 2005-01-31 22:13:43 UTC (rev 13372) @@ -1,30 +0,0 @@
-#include "precomp.h" -#include <msvcrt/ctype.h> -#include <msvcrt/direct.h> - - -extern int cur_drive; - -/* - * @implemented - */ -int _getdrive(void) -{ - char Buffer[MAX_PATH]; - - if (cur_drive == 0) { - GetCurrentDirectoryA(MAX_PATH, Buffer); - cur_drive = toupper(Buffer[0] - '@'); - } - return cur_drive; -} - -/* - * @unimplemented - */ -unsigned long _getdrives(void) -{ - //fixme get logical drives - //return GetLogicalDrives(); - return 5; // drive A and C -} _____
Deleted: trunk/reactos/lib/crtdll/direct/mkdir.c --- trunk/reactos/lib/crtdll/direct/mkdir.c 2005-01-31 18:25:55 UTC (rev 13371) +++ trunk/reactos/lib/crtdll/direct/mkdir.c 2005-01-31 22:13:43 UTC (rev 13372) @@ -1,13 +0,0 @@
-#include "precomp.h" -#include <msvcrt/direct.h> - - -/* - * @implemented - */ -int _mkdir(const char* _path) -{ - if (!CreateDirectoryA(_path, NULL)) - return -1; - return 0; -} _____
Deleted: trunk/reactos/lib/crtdll/float/clearfp.c --- trunk/reactos/lib/crtdll/float/clearfp.c 2005-01-31 18:25:55 UTC (rev 13371) +++ trunk/reactos/lib/crtdll/float/clearfp.c 2005-01-31 22:13:43 UTC (rev 13372) @@ -1,17 +0,0 @@
-#include <msvcrt/float.h> - -/* - * @implemented - */ -unsigned int _clearfp (void) -{ -unsigned short __res = _statusfp(); -#ifdef __GNUC__ -__asm__ __volatile__ ( - "fclex \n\t" - ); -#else -#endif /*__GNUC__*/ - return __res; -} - _____
Deleted: trunk/reactos/lib/crtdll/float/cntrlfp.c --- trunk/reactos/lib/crtdll/float/cntrlfp.c 2005-01-31 18:25:55 UTC (rev 13371) +++ trunk/reactos/lib/crtdll/float/cntrlfp.c 2005-01-31 22:13:43 UTC (rev 13372) @@ -1,174 +0,0 @@
-/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ - -#include <msvcrt/float.h> - -#define X87_CW_IM (1<<0) /* Invalid operation mask */ -#define X87_CW_DM (1<<1) /* Denormal operand mask */ -#define X87_CW_ZM (1<<2) /* Zero divide mask */ -#define X87_CW_OM (1<<3) /* Overflow mask */ -#define X87_CW_UM (1<<4) /* Underflow mask */ -#define X87_CW_PM (1<<5) /* Precision mask */ - -#define X87_CW_PC_MASK (3<<8) /* precision control mask */ -#define X87_CW_PC24 (0<<8) /* 24 bit precision */ -#define X87_CW_PC53 (2<<8) /* 53 bit precision */ -#define X87_CW_PC64 (3<<8) /* 64 bit precision */ - -#define X87_CW_RC_MASK (3<<10) /* rounding control mask */ -#define X87_CW_RC_NEAREST (0<<10) /* round to nearest */ -#define X87_CW_RC_DOWN (1<<10) /* round down */ -#define X87_CW_RC_UP (2<<10) /* round up */ -#define X87_CW_RC_ZERO (3<<10) /* round toward zero (chop) */ - -#define X87_CW_IC (1<<12) /* infinity control flag */ - -/* - * @implemented - */ -unsigned int _controlfp(unsigned int unNew, unsigned int unMask) -{ - return _control87(unNew,unMask); -} - -/* - * @implemented - */ -unsigned int _control87(unsigned int unNew, unsigned int unMask) -{ - unsigned int FpuCw; - unsigned int DummyCw = 0; - - /* get the controlword */ - asm volatile("fstcw %0\n\t" : "=m"(FpuCw)); - FpuCw &= 0x0000ffff; - - /* translate it into _control87 format */ - if (FpuCw & X87_CW_IM) - DummyCw |= _EM_INVALID; - if (FpuCw & X87_CW_DM) - DummyCw |= _EM_DENORMAL; - if (FpuCw & X87_CW_ZM) - DummyCw |= _EM_ZERODIVIDE; - if (FpuCw & X87_CW_OM) - DummyCw |= _EM_OVERFLOW; - if (FpuCw & X87_CW_UM) - DummyCw |= _EM_UNDERFLOW; - if (FpuCw & X87_CW_PM) - DummyCw |= _EM_INEXACT; - - switch (FpuCw & X87_CW_PC_MASK) - { - case X87_CW_PC24: - DummyCw |= _PC_24; - break; - case X87_CW_PC53: - DummyCw |= _PC_53; - break; - case X87_CW_PC64: - DummyCw |= _PC_64; - break; - } - - switch (FpuCw & X87_CW_RC_MASK) - { - case X87_CW_RC_NEAREST: - DummyCw |= _RC_NEAR; - break; - case X87_CW_RC_DOWN: - DummyCw |= _RC_DOWN; - break; - case X87_CW_RC_UP: - DummyCw |= _RC_UP; - break; - case X87_CW_RC_ZERO: - DummyCw |= _RC_CHOP; - break; - } - - /* unset (un)masked bits */ - DummyCw &= ~unMask; - unNew &= unMask; - - /* set new bits */ - DummyCw |= unNew; - - /* translate back into x87 format - * FIXME: translate infinity control! - */ - FpuCw = 0; - if (DummyCw & _EM_INVALID) - FpuCw |= X87_CW_IM; - if (DummyCw & _EM_DENORMAL) - FpuCw |= X87_CW_DM; - if (DummyCw & _EM_ZERODIVIDE) - FpuCw |= X87_CW_ZM; - if (DummyCw & _EM_OVERFLOW) - FpuCw |= X87_CW_OM; - if (DummyCw & _EM_UNDERFLOW) - FpuCw |= X87_CW_UM; - if (DummyCw & _EM_INEXACT) - FpuCw |= X87_CW_PM; - - switch (DummyCw & _MCW_PC) - { - case _PC_24: - FpuCw |= X87_CW_PC24; - break; - case _PC_53: - FpuCw |= X87_CW_PC53; - break; - case _PC_64: - default: - FpuCw |= X87_CW_PC64; - break; - } - - switch (DummyCw & _MCW_RC) - { - case _RC_NEAR: - FpuCw |= X87_CW_RC_NEAREST; - break; - case _RC_DOWN: - FpuCw |= X87_CW_RC_DOWN; - break; - case _RC_UP: - FpuCw |= X87_CW_RC_UP; - break; - case _RC_CHOP: - FpuCw |= X87_CW_RC_ZERO; - break; - } - - /* set controlword */ - asm volatile("fldcw %0" : : "m"(FpuCw)); - - return DummyCw; - -#if 0 /* The follwing is the original code, broken I think! -blight */ -register unsigned int __res; -#ifdef __GNUC__ -__asm__ __volatile__ ( - "pushl %%eax \n\t" /* make room on stack */ - "fstcw (%%esp) \n\t" - "fwait \n\t" - "popl %%eax \n\t" - "andl $0xffff, %%eax \n\t" /* OK; we have the old value ready */ - - "movl %1, %%ecx \n\t" - "notl %%ecx \n\t" - "andl %%eax, %%ecx \n\t" /* the bits we want to keep */ - - "movl %2, %%edx \n\t" - "andl %1, %%edx \n\t" /* the bits we want to change */ - - "orl %%ecx, %%edx\n\t" /* the new value */ - "pushl %%edx \n\t" - "fldcw (%%esp) \n\t" - "popl %%edx \n\t" - - :"=a" (__res):"r" (unNew),"r" (unMask): "dx", "cx"); -#else -#endif /*__GNUC__*/ - return __res; -#endif -} _____
Deleted: trunk/reactos/lib/crtdll/float/fpreset.c --- trunk/reactos/lib/crtdll/float/fpreset.c 2005-01-31 18:25:55 UTC (rev 13371) +++ trunk/reactos/lib/crtdll/float/fpreset.c 2005-01-31 22:13:43 UTC (rev 13372) @@ -1,12 +0,0 @@
-#include <msvcrt/float.h> - - -/* - * @unimplemented - */ -void _fpreset(void) -{ - /* FIXME: This causes an exception */ -// __asm__ __volatile__("fninit\n\t"); - return; -} _____
Deleted: trunk/reactos/lib/crtdll/float/logb.c --- trunk/reactos/lib/crtdll/float/logb.c 2005-01-31 18:25:55 UTC (rev 13371) +++ trunk/reactos/lib/crtdll/float/logb.c 2005-01-31 22:13:43 UTC (rev 13372) @@ -1,34 +0,0 @@
-/* Math functions for i387. - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by John C. Bowman bowman@ipp-garching.mpg.de, 1995. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include <msvcrt/float.h> - -double _logb (double __x) -{ - register double __value; -#ifdef __GNUC__ - register double __junk; - __asm __volatile__ - ("fxtract\n\t" - : "=t" (__junk), "=u" (__value) : "0" (__x)); -#else -#endif /*__GNUC__*/ - return __value; -} _____
Deleted: trunk/reactos/lib/crtdll/float/nafter.c --- trunk/reactos/lib/crtdll/float/nafter.c 2005-01-31 18:25:55 UTC (rev 13371) +++ trunk/reactos/lib/crtdll/float/nafter.c 2005-01-31 22:13:43 UTC (rev 13372) @@ -1,16 +0,0 @@
-#include <msvcrt/float.h> - - -/* - * @implemented - */ -double _nextafter(double x, double y) -{ - if (x == y) - return x; - - if (isnan(x) || isnan(y)) - return x; - - return x; -} _____
Deleted: trunk/reactos/lib/crtdll/float/statfp.c --- trunk/reactos/lib/crtdll/float/statfp.c 2005-01-31 18:25:55 UTC (rev 13371) +++ trunk/reactos/lib/crtdll/float/statfp.c 2005-01-31 22:13:43 UTC (rev 13372) @@ -1,19 +0,0 @@
-#include <msvcrt/float.h> - -/* - * @implemented - */ -unsigned int _statusfp (void) -{ - -register unsigned short __res; -#ifdef __GNUC__ -__asm__ __volatile__ ( - "fstsw %0 \n\t" -// "movzwl %ax, %eax" - :"=a" (__res) - ); -#else -#endif /*__GNUC__*/ - return __res; -} _____
Deleted: trunk/reactos/lib/crtdll/io/chsize.c --- trunk/reactos/lib/crtdll/io/chsize.c 2005-01-31 18:25:55 UTC (rev 13371) +++ trunk/reactos/lib/crtdll/io/chsize.c 2005-01-31 22:13:43 UTC (rev 13372) @@ -1,18 +0,0 @@
-/* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */ -#include <msvcrt/io.h> - -#define NDEBUG -#include <msvcrt/msvcrtdbg.h> - -/* - * @implemented - */ -int _chsize(int _fd, long size) -{ - DPRINT("_chsize(fd %d, size %d)\n", _fd, size); - if (lseek(_fd, size, 0) == -1) - return -1; - if (_write(_fd, 0, 0) < 0) - return -1; - return 0; -} _____
Deleted: trunk/reactos/lib/crtdll/io/close.c --- trunk/reactos/lib/crtdll/io/close.c 2005-01-31 18:25:55 UTC (rev 13371) +++ trunk/reactos/lib/crtdll/io/close.c 2005-01-31 22:13:43 UTC (rev 13372) @@ -1,19 +0,0 @@
-#include "precomp.h" -#include <msvcrt/io.h> -#include <msvcrt/internal/file.h> - -#define NDEBUG -#include <msvcrt/msvcrtdbg.h> - -/* - * @implemented - */ -int _close(int _fd) -{ - DPRINT("_close(fd %d)\n", _fd); - if (_fd == -1) - return -1; - if (CloseHandle(_get_osfhandle(_fd)) == FALSE) - return -1; - return __fileno_close(_fd); -} _____
Deleted: trunk/reactos/lib/crtdll/io/commit.c --- trunk/reactos/lib/crtdll/io/commit.c 2005-01-31 18:25:55 UTC (rev 13371) +++ trunk/reactos/lib/crtdll/io/commit.c 2005-01-31 22:13:43 UTC (rev 13372) @@ -1,18 +0,0 @@
-#include "precomp.h" -#include <msvcrt/io.h> -#include <msvcrt/errno.h> -#include <msvcrt/internal/file.h> - - -/* - * @implemented - */ -int _commit(int _fd) -{ - if (! FlushFileBuffers(_get_osfhandle(_fd)) ) { - __set_errno(EBADF); - return -1; - } - - return 0; -} _____
Deleted: trunk/reactos/lib/crtdll/io/dup2.c --- trunk/reactos/lib/crtdll/io/dup2.c 2005-01-31 18:25:55 UTC (rev 13371) +++ trunk/reactos/lib/crtdll/io/dup2.c 2005-01-31 22:13:43 UTC (rev 13372) @@ -1,10 +0,0 @@
-#include <msvcrt/io.h> -#include <msvcrt/internal/file.h> - -/* - * @implemented - */ -int _dup2( int handle1, int handle2 ) -{ - return __fileno_dup2( handle1, handle2 ); -} _____
Deleted: trunk/reactos/lib/crtdll/io/isatty.c --- trunk/reactos/lib/crtdll/io/isatty.c 2005-01-31 18:25:55 UTC (rev 13371) +++ trunk/reactos/lib/crtdll/io/isatty.c 2005-01-31 22:13:43 UTC (rev 13372) @@ -1,19 +0,0 @@
-#include <msvcrt/io.h> -#include <msvcrt/sys/stat.h> - -#define NDEBUG -#include <msvcrt/msvcrtdbg.h> - -/* - * @implemented - */ -int _isatty( int fd ) -{ - struct stat buf; - DPRINT("_isatty(fd %d)\n", fd); - if (_fstat (fd, &buf) < 0) - return 0; - if (S_ISCHR (buf.st_mode)) - return 1; - return 0; -} _____
Deleted: trunk/reactos/lib/crtdll/io/mktemp.c --- trunk/reactos/lib/crtdll/io/mktemp.c 2005-01-31 18:25:55 UTC (rev 13371) +++ trunk/reactos/lib/crtdll/io/mktemp.c 2005-01-31 22:13:43 UTC (rev 13372) @@ -1,78 +0,0 @@
-/* - * COPYRIGHT: See COPYING in the top level directory - * Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details - * PROJECT: ReactOS system libraries - * FILE: lib/crtdll/io/mktemp.c - * PURPOSE: Makes a temp file based on a template - * PROGRAMER: DJ Delorie - Boudewijn Dekker - * UPDATE HISTORY: - * 28/12/98: Appropriated for the Reactos Kernel - */ - -/* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */ -/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ - -#include <msvcrt/stdio.h> -#include <msvcrt/string.h> -#include <msvcrt/io.h> - -#define NDEBUG -#include <msvcrt/msvcrtdbg.h> - - -/* - * @implemented - */ -char* _mktemp (char *_template) -{ - static int count = 0; - char *cp, *dp; - int i, len, xcount, loopcnt; - - DPRINT("_mktemp('%s')\n", _template); - len = strlen (_template); - cp = _template + len; - - xcount = 0; - while (xcount < 6 && cp > _template && cp[-1] == 'X') - xcount++, cp--; - - if (xcount) { - dp = cp; - while (dp > _template && dp[-1] != '/' && dp[-1] != '\' && dp[-1] != ':') - dp--; - - /* Keep the first characters of the template, but turn the rest into - Xs. */ - while (cp > dp + 8 - xcount) { - *--cp = 'X'; - xcount = (xcount >= 6) ? 6 : 1 + xcount; - } - - /* If dots occur too early -- squash them. */ - while (dp < cp) { - if (*dp == '.') *dp = 'a'; - dp++; - } - - /* Try to add ".tmp" to the filename. Truncate unused Xs. */ - if (cp + xcount + 3 < _template + len) - strcpy (cp + xcount, ".tmp"); - else - cp[xcount] = 0; - - /* This loop can run up to 2<<(5*6) times, or about 10^9 times. */ - for (loopcnt = 0; loopcnt < (1 << (5 * xcount)); loopcnt++) { - int c = count++; - for (i = 0; i < xcount; i++, c >>= 5) - cp[i] = "abcdefghijklmnopqrstuvwxyz012345"[c & 0x1f]; - if (_access(_template,0) == -1) - return _template; - } - } - - /* Failure: truncate the template and return NULL. */ - *_template = 0; - return 0; -} _____
Deleted: trunk/reactos/lib/crtdll/io/setmode.c --- trunk/reactos/lib/crtdll/io/setmode.c 2005-01-31 18:25:55 UTC (rev 13371) +++ trunk/reactos/lib/crtdll/io/setmode.c 2005-01-31 22:13:43 UTC (rev 13372) @@ -1,27 +0,0 @@
-/* $Id$ - * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/crtdll/io/setmode.c - * PURPOSE: Sets the file translation mode - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 28/12/98: Created - */ - -#include <msvcrt/io.h> -#include <msvcrt/stdio.h> -#include <msvcrt/internal/file.h> - -#define NDEBUG -#include <msvcrt/msvcrtdbg.h> - - -/* - * @implemented - */ -int _setmode(int _fd, int _newmode) -{ - DPRINT("_setmod(fd %d, newmode %x)\n", _fd, _newmode); - return __fileno_setmode(_fd, _newmode); -} _____
Deleted: trunk/reactos/lib/crtdll/io/sopen.c --- trunk/reactos/lib/crtdll/io/sopen.c 2005-01-31 18:25:55 UTC (rev 13371) +++ trunk/reactos/lib/crtdll/io/sopen.c 2005-01-31 22:13:43 UTC (rev 13372) @@ -1,10 +0,0 @@
-#include <msvcrt/io.h> - - -/* - * @implemented - */ -int _sopen(char *path,int access,int shflag,int mode) -{ - return _open((path), (access)|(shflag), (mode)); -} _____
Deleted: trunk/reactos/lib/crtdll/io/tell.c --- trunk/reactos/lib/crtdll/io/tell.c 2005-01-31 18:25:55 UTC (rev 13371) +++ trunk/reactos/lib/crtdll/io/tell.c 2005-01-31 22:13:43 UTC (rev 13372) @@ -1,12 +0,0 @@
-/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ -#include <msvcrt/errno.h> -#include <msvcrt/io.h> - - -/* - * @implemented - */ -off_t _tell(int _file) -{ - return _lseek(_file, 0, SEEK_CUR); -} _____
Deleted: trunk/reactos/lib/crtdll/io/umask.c --- trunk/reactos/lib/crtdll/io/umask.c 2005-01-31 18:25:55 UTC (rev 13371) +++ trunk/reactos/lib/crtdll/io/umask.c 2005-01-31 22:13:43 UTC (rev 13372) @@ -1,14 +0,0 @@
-/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include <msvcrt/sys/stat.h> - -unsigned _unMode_dll = 022; - -/* - * @implemented - */ -unsigned _umask (unsigned unMode) -{ - unsigned old_mask = _unMode_dll; - _unMode_dll = unMode; - return old_mask; -} _____
Deleted: trunk/reactos/lib/crtdll/io/utime.c --- trunk/reactos/lib/crtdll/io/utime.c 2005-01-31 18:25:55 UTC (rev 13371) +++ trunk/reactos/lib/crtdll/io/utime.c 2005-01-31 22:13:43 UTC (rev 13372) @@ -1,25 +0,0 @@
-#include <msvcrt/stdio.h> -#include <msvcrt/io.h> -#include <msvcrt/errno.h> -#include <msvcrt/sys/utime.h> -#include <msvcrt/internal/file.h> - - -/* - * @implemented - */ -int _utime(const char* filename, struct _utimbuf* buf) -{ - int fn; - int ret; - - fn = _open(filename, _O_RDWR); - if ( fn == -1 ) { - __set_errno(EBADF); - return -1; - } - ret = _futime(fn,buf); - if ( _close(fn) < 0 ) - return -1; - return ret; -} _____
Deleted: trunk/reactos/lib/crtdll/math/acos.c --- trunk/reactos/lib/crtdll/math/acos.c 2005-01-31 18:25:55 UTC (rev 13371) +++ trunk/reactos/lib/crtdll/math/acos.c 2005-01-31 22:13:43 UTC (rev 13372) @@ -1,27 +0,0 @@
-/* Math functions for i387. - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by John C. Bowman bowman@ipp-garching.mpg.de, 1995. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include <msvcrt/math.h> - - -double acos(double __x) -{ - return atan2(sqrt(1.0 - __x * __x), __x); -} _____
Deleted: trunk/reactos/lib/crtdll/math/asin.c --- trunk/reactos/lib/crtdll/math/asin.c 2005-01-31 18:25:55 UTC (rev 13371) +++ trunk/reactos/lib/crtdll/math/asin.c 2005-01-31 22:13:43 UTC (rev 13372) @@ -1,27 +0,0 @@
-/* Math functions for i387. - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by John C. Bowman bowman@ipp-garching.mpg.de, 1995. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include <msvcrt/math.h> - - -double asin(double __x) -{ - return atan2(__x, sqrt(1.0 - __x * __x)); -} _____
Deleted: trunk/reactos/lib/crtdll/math/atan.c --- trunk/reactos/lib/crtdll/math/atan.c 2005-01-31 18:25:55 UTC (rev 13371) +++ trunk/reactos/lib/crtdll/math/atan.c 2005-01-31 22:13:43 UTC (rev 13372) @@ -1,37 +0,0 @@
-/* Math functions for i387. - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by John C. Bowman bowman@ipp-garching.mpg.de, 1995. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include <msvcrt/math.h> - -double atan (double __x); - -double atan (double __x) -{ - register double __value; -#ifdef __GNUC__ - __asm __volatile__ - ("fld1\n\t" - "fpatan" - : "=t" (__value) : "0" (__x)); -#else - __value = linkme_atan(__x); -#endif /*__GNUC__*/ - return __value; -} _____
Deleted: trunk/reactos/lib/crtdll/math/atan2.c --- trunk/reactos/lib/crtdll/math/atan2.c 2005-01-31 18:25:55 UTC (rev 13371) +++ trunk/reactos/lib/crtdll/math/atan2.c 2005-01-31 22:13:43 UTC (rev 13372) @@ -1,21 +0,0 @@
- -#include <msvcrt/math.h> - -double atan2 (double __y, double __x); - -/* - * @implemented - */ -double atan2 (double __y, double __x) -{ - register double __value; -#ifdef __GNUC__ - __asm __volatile__ - ("fpatan\n\t" - "fld %%st(0)" - : "=t" (__value) : "0" (__x), "u" (__y)); -#else - __value = linkme_atan2(__x, __y); -#endif /*__GNUC__*/ - return __value; -} _____
Deleted: trunk/reactos/lib/crtdll/math/cabs.c --- trunk/reactos/lib/crtdll/math/cabs.c 2005-01-31 18:25:55 UTC (rev 13371) +++ trunk/reactos/lib/crtdll/math/cabs.c 2005-01-31 22:13:43 UTC (rev 13372) @@ -1,14 +0,0 @@
-#include <msvcrt/math.h> - -/* - * @implemented - */ -double _cabs( struct _complex z ) -{ - return sqrt( z.x*z.x + z.y*z.y ); -// return hypot(z.x,z.y); -} - - - - _____
Deleted: trunk/reactos/lib/crtdll/math/cos.c --- trunk/reactos/lib/crtdll/math/cos.c 2005-01-31 18:25:55 UTC (rev 13371) +++ trunk/reactos/lib/crtdll/math/cos.c 2005-01-31 22:13:43 UTC (rev 13372) @@ -1,19 +0,0 @@
-#include <msvcrt/math.h> - -double cos (double __x); - -/* - * @implemented - */ -double cos (double __x) -{ - register double __value; -#ifdef __GNUC__ - __asm __volatile__ - ("fcos" - : "=t" (__value): "0" (__x)); -#else - __value = linkme_cos(__x); -#endif /*__GNUC__*/ - return __value; -} _____
Deleted: trunk/reactos/lib/crtdll/math/cosh.c --- trunk/reactos/lib/crtdll/math/cosh.c 2005-01-31 18:25:55 UTC (rev 13371) +++ trunk/reactos/lib/crtdll/math/cosh.c 2005-01-31 22:13:43 UTC (rev 13372) @@ -1,12 +0,0 @@
-/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include <msvcrt/math.h> - - -/* - * @implemented - */ -double cosh(double x) -{ - const double ebig = exp(fabs(x)); - return (ebig + 1.0/ebig) / 2.0; -} _____
Deleted: trunk/reactos/lib/crtdll/math/exp.c --- trunk/reactos/lib/crtdll/math/exp.c 2005-01-31 18:25:55 UTC (rev 13371) +++ trunk/reactos/lib/crtdll/math/exp.c 2005-01-31 22:13:43 UTC (rev 13372) @@ -1,47 +0,0 @@
-/* Math functions for i387. - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by John C. Bowman bowman@ipp-garching.mpg.de, 1995. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include <msvcrt/math.h> - -double exp (double __x); - -double exp (double __x) -{ -#ifdef __GNUC__ - register double __value, __exponent; - __asm __volatile__ - ("fldl2e # e^x = 2^(x * log2(e))\n\t" - "fmul %%st(1) # x * log2(e)\n\t" - "fst %%st(1)\n\t" - "frndint # int(x * log2(e))\n\t" - "fxch\n\t" - "fsub %%st(1) # fract(x * log2(e))\n\t" - "f2xm1 # 2^(fract(x * log2(e))) - 1\n\t" - : "=t" (__value), "=u" (__exponent) : "0" (__x)); - __value += 1.0; - __asm __volatile__ - ("fscale" - : "=t" (__value) : "0" (__value), "u" (__exponent)); - - return __value; -#else - return linkme_exp(__x); -#endif /*__GNUC__*/ -} _____
Deleted: trunk/reactos/lib/crtdll/math/fabs.c --- trunk/reactos/lib/crtdll/math/fabs.c 2005-01-31 18:25:55 UTC (rev 13371) +++ trunk/reactos/lib/crtdll/math/fabs.c 2005-01-31 22:13:43 UTC (rev 13372) @@ -1,36 +0,0 @@
-/* Math functions for i387. - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by John C. Bowman bowman@ipp-garching.mpg.de, 1995. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include <msvcrt/math.h> - -double fabs (double __x); - -double fabs (double __x) -{ - register double __value; -#ifdef __GNUC__ - __asm __volatile__ - ("fabs" - : "=t" (__value) : "0" (__x)); -#else - __value = linkme_fabs(__x); -#endif /*__GNUC__*/ - return __value; -} _____
Deleted: trunk/reactos/lib/crtdll/math/fmod.c --- trunk/reactos/lib/crtdll/math/fmod.c 2005-01-31 18:25:55 UTC (rev 13371) +++ trunk/reactos/lib/crtdll/math/fmod.c 2005-01-31 22:13:43 UTC (rev 13372) @@ -1,39 +0,0 @@
-/* Math functions for i387. - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by John C. Bowman bowman@ipp-garching.mpg.de, 1995. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include <msvcrt/math.h> - [truncated at 1000 lines; 7077 more skipped]