[ros-diffs] [fireball] 30266: - Rearrange source files location, so that string/math/etc routines aren't spread throughout the CRT tree.

fireball at svn.reactos.org fireball at svn.reactos.org
Thu Nov 8 11:54:43 CET 2007


Author: fireball
Date: Thu Nov  8 13:54:42 2007
New Revision: 30266

URL: http://svn.reactos.org/svn/reactos?rev=30266&view=rev
Log:
- Rearrange source files location, so that string/math/etc routines aren't spread throughout the CRT tree.

Added:
    trunk/reactos/lib/sdk/crt/math/abs.c
      - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/stdlib/abs.c
    trunk/reactos/lib/sdk/crt/math/bsearch.c
      - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/stdlib/bsearch.c
    trunk/reactos/lib/sdk/crt/math/div.c
      - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/stdlib/div.c
    trunk/reactos/lib/sdk/crt/math/labs.c
      - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/stdlib/labs.c
    trunk/reactos/lib/sdk/crt/math/ldiv.c
      - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/stdlib/ldiv.c
    trunk/reactos/lib/sdk/crt/math/rand.c
      - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/stdlib/rand.c
    trunk/reactos/lib/sdk/crt/mem/
    trunk/reactos/lib/sdk/crt/mem/i386/
    trunk/reactos/lib/sdk/crt/mem/i386/memchr_asm.s
      - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/string/i386/memchr_asm.s
    trunk/reactos/lib/sdk/crt/mem/i386/memcpy_asm.s
      - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/string/i386/memcpy_asm.s
    trunk/reactos/lib/sdk/crt/mem/i386/memmove_asm.s
      - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/string/i386/memmove_asm.s
    trunk/reactos/lib/sdk/crt/mem/i386/memset_asm.s
      - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/string/i386/memset_asm.s
    trunk/reactos/lib/sdk/crt/mem/memchr.c
      - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/string/memchr.c
    trunk/reactos/lib/sdk/crt/mem/memcmp.c
      - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/string/memcmp.c
    trunk/reactos/lib/sdk/crt/mem/memcpy.c
      - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/string/memcpy.c
    trunk/reactos/lib/sdk/crt/mem/memicmp.c
      - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/string/memicmp.c
    trunk/reactos/lib/sdk/crt/mem/memmove.c
      - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/string/memmove.c
    trunk/reactos/lib/sdk/crt/mem/memset.c
      - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/string/memset.c
    trunk/reactos/lib/sdk/crt/string/atof.c
      - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/stdlib/atof.c
    trunk/reactos/lib/sdk/crt/string/atoi.c
      - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/stdlib/atoi.c
    trunk/reactos/lib/sdk/crt/string/atoi64.c
      - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/stdlib/atoi64.c
    trunk/reactos/lib/sdk/crt/string/atol.c
      - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/stdlib/atol.c
    trunk/reactos/lib/sdk/crt/string/itoa.c
      - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/stdlib/itoa.c
    trunk/reactos/lib/sdk/crt/string/itow.c
      - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/stdlib/itow.c
    trunk/reactos/lib/sdk/crt/string/splitp.c
      - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/stdlib/splitp.c
    trunk/reactos/lib/sdk/crt/string/strtod.c
      - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/stdlib/strtod.c
    trunk/reactos/lib/sdk/crt/string/strtol.c
      - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/stdlib/strtol.c
    trunk/reactos/lib/sdk/crt/string/strtold.c
      - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/stdlib/strtold.c
    trunk/reactos/lib/sdk/crt/string/strtoul.c
      - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/stdlib/strtoul.c
    trunk/reactos/lib/sdk/crt/string/strtoull.c
      - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/stdlib/strtoull.c
    trunk/reactos/lib/sdk/crt/string/wcstod.c
      - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/stdlib/wcstod.c
    trunk/reactos/lib/sdk/crt/string/wcstol.c
      - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/stdlib/wcstol.c
    trunk/reactos/lib/sdk/crt/string/wcstom.c
      - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/stdlib/wcstom.c
    trunk/reactos/lib/sdk/crt/string/wcstomb.c
      - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/stdlib/wcstomb.c
    trunk/reactos/lib/sdk/crt/string/wcstombs.c
      - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/stdlib/wcstombs.c
    trunk/reactos/lib/sdk/crt/string/wcstoul.c
      - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/stdlib/wcstoul.c
    trunk/reactos/lib/sdk/crt/string/wctomb.c
      - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/stdlib/wctomb.c
    trunk/reactos/lib/sdk/crt/string/witoa.c
      - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/stdlib/witoa.c
    trunk/reactos/lib/sdk/crt/string/witow.c
      - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/stdlib/witow.c
    trunk/reactos/lib/sdk/crt/string/wsplitp.c
      - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/stdlib/wsplitp.c
    trunk/reactos/lib/sdk/crt/string/wtoi.c
      - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/stdlib/wtoi.c
    trunk/reactos/lib/sdk/crt/string/wtoi64.c
      - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/stdlib/wtoi64.c
    trunk/reactos/lib/sdk/crt/string/wtol.c
      - copied unchanged from r30261, trunk/reactos/lib/sdk/crt/stdlib/wtol.c
Removed:
    trunk/reactos/lib/sdk/crt/stdlib/abs.c
    trunk/reactos/lib/sdk/crt/stdlib/atof.c
    trunk/reactos/lib/sdk/crt/stdlib/atoi.c
    trunk/reactos/lib/sdk/crt/stdlib/atoi64.c
    trunk/reactos/lib/sdk/crt/stdlib/atol.c
    trunk/reactos/lib/sdk/crt/stdlib/bsearch.c
    trunk/reactos/lib/sdk/crt/stdlib/div.c
    trunk/reactos/lib/sdk/crt/stdlib/itoa.c
    trunk/reactos/lib/sdk/crt/stdlib/itow.c
    trunk/reactos/lib/sdk/crt/stdlib/labs.c
    trunk/reactos/lib/sdk/crt/stdlib/ldiv.c
    trunk/reactos/lib/sdk/crt/stdlib/rand.c
    trunk/reactos/lib/sdk/crt/stdlib/splitp.c
    trunk/reactos/lib/sdk/crt/stdlib/strtod.c
    trunk/reactos/lib/sdk/crt/stdlib/strtol.c
    trunk/reactos/lib/sdk/crt/stdlib/strtold.c
    trunk/reactos/lib/sdk/crt/stdlib/strtoul.c
    trunk/reactos/lib/sdk/crt/stdlib/strtoull.c
    trunk/reactos/lib/sdk/crt/stdlib/wcstod.c
    trunk/reactos/lib/sdk/crt/stdlib/wcstol.c
    trunk/reactos/lib/sdk/crt/stdlib/wcstom.c
    trunk/reactos/lib/sdk/crt/stdlib/wcstomb.c
    trunk/reactos/lib/sdk/crt/stdlib/wcstombs.c
    trunk/reactos/lib/sdk/crt/stdlib/wcstoul.c
    trunk/reactos/lib/sdk/crt/stdlib/wctomb.c
    trunk/reactos/lib/sdk/crt/stdlib/witoa.c
    trunk/reactos/lib/sdk/crt/stdlib/witow.c
    trunk/reactos/lib/sdk/crt/stdlib/wsplitp.c
    trunk/reactos/lib/sdk/crt/stdlib/wtoi.c
    trunk/reactos/lib/sdk/crt/stdlib/wtoi64.c
    trunk/reactos/lib/sdk/crt/stdlib/wtol.c
    trunk/reactos/lib/sdk/crt/string/i386/memchr_asm.s
    trunk/reactos/lib/sdk/crt/string/i386/memcpy_asm.s
    trunk/reactos/lib/sdk/crt/string/i386/memmove_asm.s
    trunk/reactos/lib/sdk/crt/string/i386/memset_asm.s
    trunk/reactos/lib/sdk/crt/string/memchr.c
    trunk/reactos/lib/sdk/crt/string/memcmp.c
    trunk/reactos/lib/sdk/crt/string/memcpy.c
    trunk/reactos/lib/sdk/crt/string/memicmp.c
    trunk/reactos/lib/sdk/crt/string/memmove.c
    trunk/reactos/lib/sdk/crt/string/memset.c
Modified:
    trunk/reactos/lib/sdk/crt/crt.rbuild

Modified: trunk/reactos/lib/sdk/crt/crt.rbuild
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/crt.rbuild?rev=30266&r1=30265&r2=30266&view=diff
==============================================================================
--- trunk/reactos/lib/sdk/crt/crt.rbuild (original)
+++ trunk/reactos/lib/sdk/crt/crt.rbuild Thu Nov  8 13:54:42 2007
@@ -120,13 +120,16 @@
 		<file>asin.c</file>
 		<file>cabs.c</file>
 		<file>cosh.c</file>
+		<file>div.c</file>
 		<file>frexp.c</file>
 		<file>huge_val.c</file>
 		<file>hypot.c</file>
 		<file>j0_y0.c</file>
 		<file>j1_y1.c</file>
 		<file>jn_yn.c</file>
+		<file>ldiv.c</file>
 		<file>modf.c</file>
+		<file>rand.c</file>
 		<file>s_modf.c</file>
 		<file>sinh.c</file>
 		<file>stubs.c</file>
@@ -205,6 +208,26 @@
 		<file>mbstrlen.c</file>
 		<file>mbsupr.c</file>
 	</directory>
+
+	<directory name="mem">
+		<if property="ARCH" value="i386">
+			<directory name="i386">
+				<file>memchr_asm.s</file>
+				<file>memcpy_asm.s</file>
+				<file>memmove_asm.s</file>
+				<file>memset_asm.s</file>
+			</directory>
+		</if>
+		<ifnot property="ARCH" value="i386">
+			<file>memchr.c</file>
+			<file>memcpy.c</file>
+			<file>memmove.c</file>
+			<file>memset.c</file>
+		</ifnot>
+		<file>memcmp.c</file>
+		<file>memicmp.c</file>
+	</directory>
+
 	<directory name="misc">
 		<file>amsg.c</file>
 		<file>assert.c</file>
@@ -321,8 +344,6 @@
 		<file>_exit.c</file>
 		<file>abort.c</file>
 		<file>atexit.c</file>
-		<file>atof.c</file>
-		<file>div.c</file>
 		<file>ecvt.c</file>
 		<file>ecvtbuf.c</file>
 		<file>errno.c</file>
@@ -331,35 +352,22 @@
 		<file>fullpath.c</file>
 		<file>gcvt.c</file>
 		<file>getenv.c</file>
-		<file>ldiv.c</file>
 		<file>makepath.c</file>
 		<file>malloc.c</file>
 		<file>mbtowc.c</file>
 		<file>obsol.c</file>
 		<file>putenv.c</file>
-		<file>rand.c</file>
 		<file>rot.c</file>
 		<file>senv.c</file>
-		<file>strtod.c</file>
-		<file>strtoul.c</file>
-		<file>strtoull.c</file>
 		<file>swab.c</file>
-		<file>wcstod.c</file>
-		<file>wcstombs.c</file>
-		<file>wctomb.c</file>
 		<file>wfulpath.c</file>
 		<file>wputenv.c</file>
 		<file>wsenv.c</file>
-		<file>wsplitp.c</file>
 		<file>wmakpath.c</file>
 	</directory>
 	<directory name="string">
 		<if property="ARCH" value="i386">
 			<directory name="i386">
-				<file>memchr_asm.s</file>
-				<file>memcpy_asm.s</file>
-				<file>memmove_asm.s</file>
-				<file>memset_asm.s</file>
 				<file>strcat_asm.s</file>
 				<file>strchr_asm.s</file>
 				<file>strcmp_asm.s</file>
@@ -383,10 +391,6 @@
 			</directory>
 		</if>
 		<ifnot property="ARCH" value="i386">
-			<file>memchr.c</file>
-			<file>memcpy.c</file>
-			<file>memmove.c</file>
-			<file>memset.c</file>
 			<file>strcat.c</file>
 			<file>strchr.c</file>
 			<file>strcmp.c</file>
@@ -408,9 +412,8 @@
 			<file>wcsnlen.c</file>
 			<file>wcsrchr.c</file>
 		</ifnot>
+		<file>atof.c</file>
 		<file>lasttok.c</file>
-		<file>memcmp.c</file>
-		<file>memicmp.c</file>
 		<file>strcoll.c</file>
 		<file>strdup.c</file>
 		<file>strerror.c</file>
@@ -422,9 +425,16 @@
 		<file>strrev.c</file>
 		<file>strset.c</file>
 		<file>strstr.c</file>
+		<file>strtod.c</file>
 		<file>strtok.c</file>
+		<file>strtoul.c</file>
+		<file>strtoull.c</file>
 		<file>strupr.c</file>
 		<file>strxfrm.c</file>
+		<file>wcstod.c</file>
+		<file>wcstombs.c</file>
+		<file>wctomb.c</file>
+		<file>wsplitp.c</file>
 	</directory>
 	<directory name="sys_stat">
 		<file>fstat.c</file>

Removed: trunk/reactos/lib/sdk/crt/stdlib/abs.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/stdlib/abs.c?rev=30265&view=auto
==============================================================================
--- trunk/reactos/lib/sdk/crt/stdlib/abs.c (original)
+++ trunk/reactos/lib/sdk/crt/stdlib/abs.c (removed)
@@ -1,11 +1,0 @@
-/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
-#include <stdlib.h>
-
-/*
- * @implemented
- */
-int
-abs(int j)
-{
-  return j<0 ? -j : j;
-}

Removed: trunk/reactos/lib/sdk/crt/stdlib/atof.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/stdlib/atof.c?rev=30265&view=auto
==============================================================================
--- trunk/reactos/lib/sdk/crt/stdlib/atof.c (original)
+++ trunk/reactos/lib/sdk/crt/stdlib/atof.c (removed)
@@ -1,11 +1,0 @@
-/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
-#include <precomp.h>
-
-/*
- * @implemented
- */
-double
-atof(const char *ascii)
-{
-  return strtod(ascii, 0);
-}

Removed: trunk/reactos/lib/sdk/crt/stdlib/atoi.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/stdlib/atoi.c?rev=30265&view=auto
==============================================================================
--- trunk/reactos/lib/sdk/crt/stdlib/atoi.c (original)
+++ trunk/reactos/lib/sdk/crt/stdlib/atoi.c (removed)
@@ -1,11 +1,0 @@
-/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
-#include <precomp.h>
-
-/*
- * @implemented
- */
-int
-_ttoi(const _TCHAR *str)
-{
-  return (int)_tcstol(str, 0, 10);
-}

Removed: trunk/reactos/lib/sdk/crt/stdlib/atoi64.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/stdlib/atoi64.c?rev=30265&view=auto
==============================================================================
--- trunk/reactos/lib/sdk/crt/stdlib/atoi64.c (original)
+++ trunk/reactos/lib/sdk/crt/stdlib/atoi64.c (removed)
@@ -1,42 +1,0 @@
-/*
- * COPYRIGHT:   See COPYING in the top level directory
- * PROJECT:     ReactOS system libraries
- * FILE:        lib/crt/??????
- * PURPOSE:     Unknown
- * PROGRAMER:   Unknown
- * UPDATE HISTORY:
- *              25/11/05: Added license header
- */
-
-#include <precomp.h>
-
-/*
- * @implemented
- */
-__int64
-_atoi64(const char *nptr)
-{
-  char *s = (char *)nptr;
-  __int64 acc = 0;
-  int neg = 0;
-
-  while(isspace((int)*s))
-    s++;
-  if (*s == '-')
-    {
-      neg = 1;
-      s++;
-    }
-  else if (*s == '+')
-    s++;
-
-  while (isdigit((int)*s))
-    {
-      acc = 10 * acc + ((int)*s - '0');
-      s++;
-    }
-
-  if (neg)
-    acc *= -1;
-  return acc;
-}

Removed: trunk/reactos/lib/sdk/crt/stdlib/atol.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/stdlib/atol.c?rev=30265&view=auto
==============================================================================
--- trunk/reactos/lib/sdk/crt/stdlib/atol.c (original)
+++ trunk/reactos/lib/sdk/crt/stdlib/atol.c (removed)
@@ -1,12 +1,0 @@
-/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
-#include <stdlib.h>
-#include <tchar.h>
-
-/*
- * @implemented
- */
-long
-_ttol(const _TCHAR *str)
-{
-  return _tcstol(str, 0, 10);
-}

Removed: trunk/reactos/lib/sdk/crt/stdlib/bsearch.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/stdlib/bsearch.c?rev=30265&view=auto
==============================================================================
--- trunk/reactos/lib/sdk/crt/stdlib/bsearch.c (original)
+++ trunk/reactos/lib/sdk/crt/stdlib/bsearch.c (removed)
@@ -1,28 +1,0 @@
-/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
-#include <stdlib.h>
-
-/*
- * @implemented
- */
-void *
-bsearch(const void *key, const void *base0, size_t nelem,
-	size_t size, int (*cmp)(const void *ck, const void *ce))
-{
-  char *base = (char *)base0;
-  int lim, cmpval;
-  void *p;
-
-  for (lim = nelem; lim != 0; lim >>= 1)
-  {
-    p = base + (lim >> 1) * size;
-    cmpval = (*cmp)(key, p);
-    if (cmpval == 0)
-      return p;
-    if (cmpval > 0)
-    {				/* key > p: move right */
-      base = (char *)p + size;
-      lim--;
-    } /* else move left */
-  }
-  return 0;
-}

Removed: trunk/reactos/lib/sdk/crt/stdlib/div.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/stdlib/div.c?rev=30265&view=auto
==============================================================================
--- trunk/reactos/lib/sdk/crt/stdlib/div.c (original)
+++ trunk/reactos/lib/sdk/crt/stdlib/div.c (removed)
@@ -1,27 +1,0 @@
-/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
-#include <precomp.h>
-
-/*
- * @implemented
- */
-div_t
-div(int num, int denom)
-{
-  div_t r;
-
-  if (num > 0 && denom < 0) {
-    num = -num;
-    denom = -denom;
-  }
-  r.quot = num / denom;
-  r.rem = num % denom;
-  if (num < 0 && denom > 0)
-  {
-    if (r.rem > 0)
-    {
-      r.quot++;
-      r.rem -= denom;
-    }
-  }
-  return r;
-}

Removed: trunk/reactos/lib/sdk/crt/stdlib/itoa.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/stdlib/itoa.c?rev=30265&view=auto
==============================================================================
--- trunk/reactos/lib/sdk/crt/stdlib/itoa.c (original)
+++ trunk/reactos/lib/sdk/crt/stdlib/itoa.c (removed)
@@ -1,135 +1,0 @@
-/*
- * COPYRIGHT:   See COPYING in the top level directory
- * PROJECT:     ReactOS system libraries
- * FILE:        lib/msvcrt/stdlib/itoa.c
- * PURPOSE:     converts a integer to ascii
- * PROGRAMER:
- * UPDATE HISTORY:
- *              1995: Created
- *              1998: Added ltoa by Ariadne
- */
-/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
-
-#include <precomp.h>
-
-/*
- * @implemented
- */
-char* _itoa(int value, char* string, int radix)
-{
-  char tmp[33];
-  char* tp = tmp;
-  int i;
-  unsigned v;
-  int sign;
-  char* sp;
-
-  if (radix > 36 || radix <= 1)
-  {
-    __set_errno(EDOM);
-    return 0;
-  }
-
-  sign = (radix == 10 && value < 0);
-  if (sign)
-    v = -value;
-  else
-    v = (unsigned)value;
-  while (v || tp == tmp)
-  {
-    i = v % radix;
-    v = v / radix;
-    if (i < 10)
-      *tp++ = i+'0';
-    else
-      *tp++ = i + 'a' - 10;
-  }
-
-  if (string == 0)
-    string = (char*)malloc((tp-tmp)+sign+1);
-  sp = string;
-
-  if (sign)
-    *sp++ = '-';
-  while (tp > tmp)
-    *sp++ = *--tp;
-  *sp = 0;
-  return string;
-}
-
-/*
- * @implemented
- */
-char* _ltoa(long value, char* string, int radix)
-{
-  char tmp[33];
-  char* tp = tmp;
-  long i;
-  unsigned long v;
-  int sign;
-  char* sp;
-
-  if (radix > 36 || radix <= 1)
-  {
-     __set_errno(EDOM);
-    return 0;
-  }
-
-  sign = (radix == 10 && value < 0);
-  if (sign)
-    v = -value;
-  else
-    v = (unsigned long)value;
-  while (v || tp == tmp)
-  {
-    i = v % radix;
-    v = v / radix;
-    if (i < 10)
-      *tp++ = i+'0';
-    else
-      *tp++ = i + 'a' - 10;
-  }
-
-  if (string == 0)
-    string = (char*)malloc((tp-tmp)+sign+1);
-  sp = string;
-
-  if (sign)
-    *sp++ = '-';
-  while (tp > tmp)
-    *sp++ = *--tp;
-  *sp = 0;
-  return string;
-}
-
-/*
- * @implemented
- * copy it from wine 0.9.0 with small modifcations do check for NULL
- */
-char* ultoa(unsigned long value, char* string, int radix)
-{
-    char buffer[33];
-    char *pos;
-    int digit;
-
-    pos = &buffer[32];
-    *pos = '\0';
-
-    if (string == NULL)
-    {
-      return NULL;
-    }
-
-    do {
-	digit = value % radix;
-	value = value / radix;
-	if (digit < 10) {
-	    *--pos = '0' + digit;
-	} else {
-	    *--pos = 'a' + digit - 10;
-	} /* if */
-    } while (value != 0L);
-
-    memcpy(string, pos, &buffer[32] - pos + 1);
-    return string;
-}

Removed: trunk/reactos/lib/sdk/crt/stdlib/itow.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/stdlib/itow.c?rev=30265&view=auto
==============================================================================
--- trunk/reactos/lib/sdk/crt/stdlib/itow.c (original)
+++ trunk/reactos/lib/sdk/crt/stdlib/itow.c (removed)
@@ -1,96 +1,0 @@
-/* $Id$
- *
- * COPYRIGHT:   See COPYING in the top level directory
- * PROJECT:     ReactOS system libraries
- * FILE:        lib/msvcrt/stdlib/itow.c
- * PURPOSE:     converts a integer to wchar_t
- * PROGRAMER:
- * UPDATE HISTORY:
- *              1995: Created
- *              1998: Added ltoa by Ariadne
- *              2000: derived from ./itoa.c by ea
- */
-/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
-
-#include <precomp.h>
-
-/*
- * @implemented
- * from wine cvs 2006-05-21
- */
-wchar_t* _itow(int value, wchar_t* string, int radix)
-{
-   return _ltow(value, string, radix);
-}
-
-/*
- * @implemented
- * from wine cvs 2006-05-21
- */
-wchar_t* _ltow(long value, wchar_t* string, int radix)
-{
-     unsigned long val;
-    int negative;
-    WCHAR buffer[33];
-    PWCHAR pos;
-    WCHAR digit;
-
-    if (value < 0 && radix == 10) {
-	negative = 1;
-        val = -value;
-    } else {
-	negative = 0;
-        val = value;
-    } /* if */
-
-    pos = &buffer[32];
-    *pos = '\0';
-
-    do {
-	digit = val % radix;
-	val = val / radix;
-	if (digit < 10) {
-	    *--pos = '0' + digit;
-	} else {
-	    *--pos = 'a' + digit - 10;
-	} /* if */
-    } while (val != 0L);
-
-    if (negative) {
-	*--pos = '-';
-    } /* if */
-
-    if (str != NULL) {
-	memcpy(string, pos, (&buffer[32] - pos + 1) * sizeof(WCHAR));
-    } /* if */
-    return string;
-}
-
-/*
- * @implemented
- * from wine cvs 2006-05-21
- */
-wchar_t* _ultow(unsigned long value, wchar_t* string, int radix)
-{
-    WCHAR buffer[33];
-    PWCHAR pos;
-    WCHAR digit;
-
-    pos = &buffer[32];
-    *pos = '\0';
-
-    do {
-	digit = value % radix;
-	value = value / radix;
-	if (digit < 10) {
-	    *--pos = '0' + digit;
-	} else {
-	    *--pos = 'a' + digit - 10;
-	} /* if */
-    } while (value != 0L);
-
-    if (string != NULL) {
-	memcpy(string, pos, (&buffer[32] - pos + 1) * sizeof(WCHAR));
-    } /* if */
-    return string;
-}

Removed: trunk/reactos/lib/sdk/crt/stdlib/labs.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/stdlib/labs.c?rev=30265&view=auto
==============================================================================
--- trunk/reactos/lib/sdk/crt/stdlib/labs.c (original)
+++ trunk/reactos/lib/sdk/crt/stdlib/labs.c (removed)
@@ -1,11 +1,0 @@
-/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
-#include <precomp.h>
-
-/*
- * @implemented
- */
-long
-labs(long j)
-{
-  return j<0 ? -j : j;
-}

Removed: trunk/reactos/lib/sdk/crt/stdlib/ldiv.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/stdlib/ldiv.c?rev=30265&view=auto
==============================================================================
--- trunk/reactos/lib/sdk/crt/stdlib/ldiv.c (original)
+++ trunk/reactos/lib/sdk/crt/stdlib/ldiv.c (removed)
@@ -1,28 +1,0 @@
-/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
-#include <precomp.h>
-
-/*
- * @implemented
- */
-ldiv_t
-ldiv(long num, long denom)
-{
-  ldiv_t r;
-
-  if (num > 0 && denom < 0)
-  {
-    num = -num;
-    denom = -denom;
-  }
-  r.quot = num / denom;
-  r.rem = num % denom;
-  if (num < 0 && denom > 0)
-  {
-    if (r.rem > 0)
-    {
-      r.quot++;
-      r.rem -= denom;
-    }
-  }
-  return r;
-}

Removed: trunk/reactos/lib/sdk/crt/stdlib/rand.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/stdlib/rand.c?rev=30265&view=auto
==============================================================================
--- trunk/reactos/lib/sdk/crt/stdlib/rand.c (original)
+++ trunk/reactos/lib/sdk/crt/stdlib/rand.c (removed)
@@ -1,27 +1,0 @@
-/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
-#include <precomp.h>
-
-#include <internal/tls.h>
-
-/*
- * @implemented
- */
-int
-rand(void)
-{
-  PTHREADDATA ThreadData = GetThreadData();
-
-  ThreadData->tnext = ThreadData->tnext * 0x5deece66dLL + 2531011;
-  return (int)((ThreadData->tnext >> 16) & RAND_MAX);
-}
-
-/*
- * @implemented
- */
-void
-srand(unsigned int seed)
-{
-  PTHREADDATA ThreadData = GetThreadData();
-
-  ThreadData->tnext = (ULONGLONG)seed;
-}

Removed: trunk/reactos/lib/sdk/crt/stdlib/splitp.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/stdlib/splitp.c?rev=30265&view=auto
==============================================================================
--- trunk/reactos/lib/sdk/crt/stdlib/splitp.c (original)
+++ trunk/reactos/lib/sdk/crt/stdlib/splitp.c (removed)
@@ -1,68 +1,0 @@
-#include <precomp.h>
-
-/*
- * @implemented
- */
-void _tsplitpath(const _TCHAR* path, _TCHAR* drive, _TCHAR* dir, _TCHAR* fname, _TCHAR* ext)
-{
-  _TCHAR* tmp_drive = NULL;
-  _TCHAR* tmp_dir = NULL;
-  _TCHAR* tmp_ext = NULL;
-
-  tmp_drive = (_TCHAR*)_tcschr(path,':');
-  if (drive)
-    {
-      if (tmp_drive)
-        {
-          _tcsncpy(drive,tmp_drive-1,2);
-          *(drive+2) = 0;
-        }
-      else
-        {
-          *drive = 0;
-        }
-    }
-  if (!tmp_drive)
-    {
-      tmp_drive = (_TCHAR*)path - 1;
-    }
-
-  tmp_dir = (_TCHAR*)_tcsrchr(path,'\\');
-  if (dir)
-    {
-      if (tmp_dir)
-        {
-          _tcsncpy(dir,tmp_drive+1,tmp_dir-tmp_drive);
-          *(dir+(tmp_dir-tmp_drive)) = 0;
-        }
-      else
-        {
-          *dir =0;
-        }
-    }
-
-  /* If the dot is before the last dir separator, it's part
-   * of a directory name, not the start of the extension */
-  if (!tmp_ext || tmp_ext < tmp_dir)
-    {
-      tmp_ext = (_TCHAR*)path+_tcslen(path);
-    }
-  if (ext)
-    {
-      _tcscpy(ext,tmp_ext);
-    }
-
-  if (fname)
-    {
-      if (tmp_dir)
-        {
-          _tcsncpy(fname,tmp_dir+1,tmp_ext-tmp_dir-1);
-          *(fname+(tmp_ext-tmp_dir-1)) = 0;
-        }
-      else
-        {
-          _tcsncpy(fname,tmp_drive+1,tmp_ext-tmp_drive-1);
-          *(fname+(tmp_ext-path))=0;
-        }
-    }
-}

Removed: trunk/reactos/lib/sdk/crt/stdlib/strtod.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/stdlib/strtod.c?rev=30265&view=auto
==============================================================================
--- trunk/reactos/lib/sdk/crt/stdlib/strtod.c (original)
+++ trunk/reactos/lib/sdk/crt/stdlib/strtod.c (removed)
@@ -1,103 +1,0 @@
-/* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */
-/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
-
-#include <precomp.h>
-
-/*
- * @implemented
- */
-double
-strtod(const char *s, char **sret)
-{
-  long double r;		/* result */
-  int e;			/* exponent */
-  long double d;		/* scale */
-  int sign;			/* +- 1.0 */
-  int esign;
-  int i;
-  int flags=0;
-
-  r = 0.0;
-  sign = 1;
-  e = 0;
-  esign = 1;
-
-  if (s == NULL)
-     return r;
-
-
-  while ((*s == ' ') || (*s == '\t'))
-    s++;
-
-  if (*s == '+')
-    s++;
-  else if (*s == '-')
-  {
-    sign = -1;
-    s++;
-  }
-
-  while ((*s >= '0') && (*s <= '9'))
-  {
-    flags |= 1;
-    r *= 10.0;
-    r += *s - '0';
-    s++;
-  }
-
-  if (*s == '.')
-  {
-    d = 0.1L;
-    s++;
-    while ((*s >= '0') && (*s <= '9'))
-    {
-      flags |= 2;
-      r += d * (*s - '0');
-      s++;
-      d *= 0.1L;
-    }
-  }
-
-  if (flags == 0)
-  {
-    if (sret)
-      *sret = (char *)s;
-    return 0;
-  }
-
-  if ((*s == 'e') || (*s == 'E'))
-  {
-    s++;
-    if (*s == '+')
-      s++;
-    else if (*s == '-')
-    {
-      s++;
-      esign = -1;
-    }
-    if ((*s < '0') || (*s > '9'))
-    {
-      if (sret)
-	*sret = (char *)s;
-      return r;
-    }
-
-    while ((*s >= '0') && (*s <= '9'))
-    {
-      e *= 10;
-      e += *s - '0';
-      s++;
-    }
-  }
-
-  if (esign < 0)
-    for (i = 1; i <= e; i++)
-      r *= 0.1L;
-  else
-    for (i = 1; i <= e; i++)
-      r *= 10.0;
-
-  if (sret)
-    *sret = (char *)s;
-  return r * sign;
-}

Removed: trunk/reactos/lib/sdk/crt/stdlib/strtol.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/stdlib/strtol.c?rev=30265&view=auto
==============================================================================
--- trunk/reactos/lib/sdk/crt/stdlib/strtol.c (original)
+++ trunk/reactos/lib/sdk/crt/stdlib/strtol.c (removed)
@@ -1,90 +1,0 @@
-/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
-#include <precomp.h>
-
-/*
- * @implemented
- */
-long
-strtol(const char *nptr, char **endptr, int base)
-{
-  const char *s = nptr;
-  unsigned long acc;
-  int c;
-  unsigned long cutoff;
-  int neg = 0, any, cutlim;
-
-  /*
-   * Skip white space and pick up leading +/- sign if any.
-   * If base is 0, allow 0x for hex and 0 for octal, else
-   * assume decimal; if base is already 16, allow 0x.
-   */
-  do {
-    c = *s++;
-  } while (isspace(c));
-  if (c == '-')
-  {
-    neg = 1;
-    c = *s++;
-  }
-  else if (c == '+')
-    c = *s++;
-  if ((base == 0 || base == 16) &&
-      c == '0' && (*s == 'x' || *s == 'X'))
-  {
-    c = s[1];
-    s += 2;
-    base = 16;
-  }
-  if (base == 0)
-    base = c == '0' ? 8 : 10;
-
-  /*
-   * Compute the cutoff value between legal numbers and illegal
-   * numbers.  That is the largest legal value, divided by the
-   * base.  An input number that is greater than this value, if
-   * followed by a legal input character, is too big.  One that
-   * is equal to this value may be valid or not; the limit
-   * between valid and invalid numbers is then based on the last
-   * digit.  For instance, if the range for longs is
-   * [-2147483648..2147483647] and the input base is 10,
-   * cutoff will be set to 214748364 and cutlim to either
-   * 7 (neg==0) or 8 (neg==1), meaning that if we have accumulated
-   * a value > 214748364, or equal but the next digit is > 7 (or 8),
-   * the number is too big, and we will return a range error.
-   *
-   * Set any if any `digits' consumed; make it negative to indicate
-   * overflow.
-   */
-  cutoff = neg ? -(unsigned long)LONG_MIN : LONG_MAX;
-  cutlim = cutoff % (unsigned long)base;
-  cutoff /= (unsigned long)base;
-  for (acc = 0, any = 0;; c = *s++)
-  {
-    if (isdigit(c))
-      c -= '0';
-    else if (isalpha(c))
-      c -= isupper(c) ? 'A' - 10 : 'a' - 10;
-    else
-      break;
-    if (c >= base)
-      break;
-    if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim))
-      any = -1;
-    else
-    {
-      any = 1;
-      acc *= base;
-      acc += c;
-    }
-  }
-  if (any < 0)
-  {
-    acc = neg ? LONG_MIN : LONG_MAX;
-    __set_errno(ERANGE);
-  }
-  else if (neg)
-    acc = -acc;
-  if (endptr != 0)
-    *endptr = any ? (char *)s - 1 : (char *)nptr;
-  return acc;
-}

Removed: trunk/reactos/lib/sdk/crt/stdlib/strtold.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/stdlib/strtold.c?rev=30265&view=auto
==============================================================================
--- trunk/reactos/lib/sdk/crt/stdlib/strtold.c (original)
+++ trunk/reactos/lib/sdk/crt/stdlib/strtold.c (removed)
@@ -1,125 +1,0 @@
-/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
-#include <stdlib.h>
-#include <msvcrt/ctype.h>
-
-static double powten[] =
-{
-  1e1L, 1e2L, 1e4L, 1e8L, 1e16L, 1e32L, 1e64L, 1e128L, 1e256L,
-#ifdef __GNUC__
-  1e512L, 1e512L*1e512L, 1e2048L, 1e4096L
-#else
-  1e256L, 1e256L, 1e256L, 1e256L
-#endif
-};
-
-long double
-_strtold(const char *s, char **sret)
-{
-  double r;		/* result */
-  int e, ne;			/* exponent */
-  int sign;			/* +- 1.0 */
-  int esign;
-  int flags=0;
-  int l2powm1;
-
-  r = 0.0L;
-  sign = 1;
-  e = ne = 0;
-  esign = 1;
-
-  while(*s && isspace(*s))
-    s++;
-
-  if (*s == '+')
-    s++;
-  else if (*s == '-')
-  {
-    sign = -1;
-    s++;
-  }
-
-  while ((*s >= '0') && (*s <= '9'))
-  {
-    flags |= 1;
-    r *= 10.0L;
-    r += *s - '0';
-    s++;
-  }
-
-  if (*s == '.')
-  {
-    s++;
-    while ((*s >= '0') && (*s <= '9'))
-    {
-      flags |= 2;
-      r *= 10.0L;
-      r += *s - '0';
-      s++;
-      ne++;
-    }
-  }
-  if (flags == 0)
-  {
-    if (sret)
-      *sret = (char *)s;
-    return 0.0L;
-  }
-
-  if ((*s == 'e') || (*s == 'E'))
-  {
-    s++;
-    if (*s == '+')
-      s++;
-    else if (*s == '-')
-    {
-      s++;
-      esign = -1;
-    }
-    while ((*s >= '0') && (*s <= '9'))
-    {
-      e *= 10;
-      e += *s - '0';
-      s++;
-    }
-  }
-  if (esign < 0)
-  {
-    esign = -esign;
-    e = -e;
-  }
-  e = e - ne;
-  if (e < -4096)
-  {
-    /* possibly subnormal number, 10^e would overflow */
-    r *= 1.0e-2048L;
-    e += 2048;
-  }
-  if (e < 0)
-  {
-    e = -e;
-    esign = -esign;
-  }
-  if (e >= 8192)
-    e = 8191;
-  if (e)
-  {
-    double d = 1.0L;
-    l2powm1 = 0;
-    while (e)
-    {
-      if (e & 1)
-	d *= powten[l2powm1];
-      e >>= 1;
-      l2powm1++;
-    }
-    if (esign > 0)
-      r *= d;
-    else
-      r /= d;
-  }
-  if (sret)
-    *sret = (char *)s;
-  return r * sign;
-
-  return 0;
-}

Removed: trunk/reactos/lib/sdk/crt/stdlib/strtoul.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/stdlib/strtoul.c?rev=30265&view=auto
==============================================================================
--- trunk/reactos/lib/sdk/crt/stdlib/strtoul.c (original)
+++ trunk/reactos/lib/sdk/crt/stdlib/strtoul.c (removed)
@@ -1,74 +1,0 @@
-/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
-#include <precomp.h>
-#include <ctype.h>
-
-/*
- * Convert a string to an unsigned long integer.
- *
- * Ignores `locale' stuff.  Assumes that the upper and lower case
- * alphabets and digits are each contiguous.
- *
- * @implemented
- */
-unsigned long
-strtoul(const char *nptr, char **endptr, int base)
-{
-  const char *s = nptr;
-  unsigned long acc;
-  int c;
-  unsigned long cutoff;
-  int neg = 0, any, cutlim;
-
-  /*
-   * See strtol for comments as to the logic used.
-   */
-  do {
-    c = *s++;
-  } while (isspace(c));
-  if (c == '-')
-  {
-    neg = 1;
-    c = *s++;
-  }
-  else if (c == '+')
-    c = *s++;
-  if ((base == 0 || base == 16) &&
-      c == '0' && (*s == 'x' || *s == 'X'))
-  {
-    c = s[1];
-    s += 2;
-    base = 16;
-  }
-  if (base == 0)
-    base = c == '0' ? 8 : 10;
-  cutoff = (unsigned long)ULONG_MAX / (unsigned long)base;
-  cutlim = (unsigned long)ULONG_MAX % (unsigned long)base;
-  for (acc = 0, any = 0;; c = *s++)
-  {
-    if (isdigit(c))
-      c -= '0';
-    else if (isalpha(c))
-      c -= isupper(c) ? 'A' - 10 : 'a' - 10;
-    else
-      break;
-    if (c >= base)
-      break;
-    if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim))
-      any = -1;
-    else {
-      any = 1;
-      acc *= base;
-      acc += c;
-    }
-  }
-  if (any < 0)
-  {
-    acc = ULONG_MAX;
-    __set_errno(ERANGE);
-  }
-  else if (neg)
-    acc = -acc;
-  if (endptr != 0)
-    *endptr = any ? (char *)s - 1 : (char *)nptr;
-  return acc;
-}

Removed: trunk/reactos/lib/sdk/crt/stdlib/strtoull.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/stdlib/strtoull.c?rev=30265&view=auto
==============================================================================
--- trunk/reactos/lib/sdk/crt/stdlib/strtoull.c (original)
+++ trunk/reactos/lib/sdk/crt/stdlib/strtoull.c (removed)
@@ -1,76 +1,0 @@
-/* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */
-/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
-#include <precomp.h>
-
-#if defined (_MSC_VER)
-#define UINT64_MAX	0xffffffffffffffff
-#endif
-
-/*
- * Convert a string to an unsigned long integer.
- *
- * Ignores `locale' stuff.  Assumes that the upper and lower case
- * alphabets and digits are each contiguous.
- */
-UINT64
-strtoull(const char *nptr, char **endptr, int base)
-{
-  const char *s = nptr;
-  UINT64 acc;
-  int c;
-  UINT64 cutoff;
-  int neg = 0, any, cutlim;
-
-  /*
-   * See strtol for comments as to the logic used.
-   */
-  do {
-    c = *s++;
-  } while (isspace(c));
-  if (c == '-')
-  {
-    neg = 1;
-    c = *s++;
-  }
-  else if (c == '+')
-    c = *s++;
-  if ((base == 0 || base == 16) &&
-      c == '0' && (*s == 'x' || *s == 'X'))
-  {
-    c = s[1];
-    s += 2;
-    base = 16;
-  }
-  if (base == 0)
-    base = c == '0' ? 8 : 10;
-  cutoff = UINT64_MAX / base;
-  cutlim = (int)(UINT64_MAX % base);
-  for (acc = 0, any = 0;; c = *s++)
-  {
-    if (isdigit(c))
-      c -= '0';
-    else if (isalpha(c))
-      c -= isupper(c) ? 'A' - 10 : 'a' - 10;
-    else
-      break;
-    if (c >= base)
-      break;
-    if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim))
-      any = -1;
-    else {
-      any = 1;
-      acc *= base;
-      acc += c;
-    }
-  }
-  if (any < 0)
-  {
-    acc = UINT64_MAX;
-    __set_errno ( ERANGE );
-  }
-  else if (neg)
-    acc = -acc;
-  if (endptr != 0)
-    *endptr = any ? (char *)s - 1 : (char *)nptr;
-  return acc;
-}

Removed: trunk/reactos/lib/sdk/crt/stdlib/wcstod.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/stdlib/wcstod.c?rev=30265&view=auto
==============================================================================
--- trunk/reactos/lib/sdk/crt/stdlib/wcstod.c (original)
+++ trunk/reactos/lib/sdk/crt/stdlib/wcstod.c (removed)
@@ -1,98 +1,0 @@
-/* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */
-/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
-#include <stdlib.h>
-
-
-/*
- * @implemented
- */
-double wcstod(const wchar_t *s, wchar_t **sret)
-{
-  long double r;		/* result */
-  int e;			/* exponent */
-  long double d;		/* scale */
-  int sign;			/* +- 1.0 */
-  int esign;
-  int i;
-  int flags=0;
-
-  r = 0.0;
-  sign = 1;
-  e = 0;
-  esign = 1;
-
-  while ((*s == L' ') || (*s == L'\t'))
-    s++;
-
-  if (*s == L'+')
-    s++;
-  else if (*s == L'-')
-  {
-    sign = -1;
-    s++;
-  }
-
-  while ((*s >= L'0') && (*s <= L'9'))
-  {
-    flags |= 1;
-    r *= 10.0;
-    r += *s - L'0';
-    s++;
-  }
-
-  if (*s == L'.')
-  {
-    d = 0.1L;
-    s++;
-    while ((*s >= L'0') && (*s <= L'9'))
-    {
-      flags |= 2;
-      r += d * (*s - L'0');
-      s++;
-      d *= 0.1L;
-    }
-  }
-
-  if (flags == 0)
-  {
-    if (sret)
-      *sret = (wchar_t *)s;
-    return 0;
-  }
-
-  if ((*s == L'e') || (*s == L'E'))
-  {
-    s++;
-    if (*s == L'+')
-      s++;
-    else if (*s == L'-')
-    {
-      s++;
-      esign = -1;
-    }
-    if ((*s < L'0') || (*s > L'9'))
-    {
-      if (sret)
-	*sret = (wchar_t *)s;
-      return r;
-    }
-
-    while ((*s >= L'0') && (*s <= L'9'))
-    {
-      e *= 10;
-      e += *s - L'0';
-      s++;
-    }
-  }
-
-  if (esign < 0)
-    for (i = 1; i <= e; i++)
-      r *= 0.1L;
-  else
-    for (i = 1; i <= e; i++)
-      r *= 10.0;
-
-  if (sret)
-    *sret = (wchar_t *)s;
-  return r * sign;
-}

Removed: trunk/reactos/lib/sdk/crt/stdlib/wcstol.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/stdlib/wcstol.c?rev=30265&view=auto
==============================================================================
--- trunk/reactos/lib/sdk/crt/stdlib/wcstol.c (original)
+++ trunk/reactos/lib/sdk/crt/stdlib/wcstol.c (removed)
@@ -1,45 +1,0 @@
-/*
- * COPYRIGHT:   See COPYING in the top level directory
- * PROJECT:     ReactOS system libraries
- * FILE:        lib/crt/??????
- * PURPOSE:     Unknown
- * PROGRAMER:   Unknown
- * UPDATE HISTORY:
- *              25/11/05: Added license header
- */
-
-#include <precomp.h>
-
-/*
- * @implemented
- */
-long wcstol(const wchar_t *cp,wchar_t **endp,int base)
-{
-	long result = 0,value;
-	int sign = 1;
-
-	if ( *cp == L'-' ) {
-		sign = -1;
-		cp++;
-	}
-
-	if (!base) {
-		base = 10;
-		if (*cp == L'0') {
-			base = 8;
-			cp++;
-			if ((*cp == L'x') && iswxdigit(cp[1])) {
-				cp++;
-				base = 16;
-			}
-		}
-	}
-	while (iswxdigit(*cp) && (value = iswdigit(*cp) ? *cp-L'0' : (iswlower(*cp)
-	    ? towupper(*cp) : *cp)-L'A'+10) < base) {
-		result = result*base + value;
-		cp++;
-	}
-	if (endp)
-		*endp = (wchar_t *)cp;
-	return result * sign;
-}

Removed: trunk/reactos/lib/sdk/crt/stdlib/wcstom.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/stdlib/wcstom.c?rev=30265&view=auto
==============================================================================
--- trunk/reactos/lib/sdk/crt/stdlib/wcstom.c (original)
+++ trunk/reactos/lib/sdk/crt/stdlib/wcstom.c (removed)
@@ -1,20 +1,0 @@
-#include <stdlib.h>
-
-/*
- * @unimplemented
- */
-size_t wcstombs (char* mbsDest, const wchar_t* wsConvert, size_t size)
-{
-  return 0;
-}
-
-/*
- * @unimplemented
- */
-int wctomb (char* mbDest, wchar_t wc)
-{
-  return 0;
-}
-
-
-

Removed: trunk/reactos/lib/sdk/crt/stdlib/wcstomb.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/stdlib/wcstomb.c?rev=30265&view=auto
==============================================================================
--- trunk/reactos/lib/sdk/crt/stdlib/wcstomb.c (original)
+++ trunk/reactos/lib/sdk/crt/stdlib/wcstomb.c (removed)
@@ -1,114 +1,0 @@
-/* Copyright (C) 1991, 1992, 1995, 1996, 1997 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   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 <precomp.h>
-#include <wchar.h>
-
-#ifndef EILSEQ
-#define EILSEQ EINVAL
-#endif
-
-static const wchar_t encoding_mask[] =
-{
-  (wchar_t)~0x7ff, (wchar_t)~0xffff, (wchar_t)~0x1fffff, (wchar_t)~0x3ffffff
-};
-
-static const unsigned char encoding_byte[] =
-{
-  0xc0, 0xe0, 0xf0, 0xf8, 0xfc
-};
-
-/* The state is for this UTF8 encoding not used.  */
-//static mbstate_t internal;
-
-
-//extern mbstate_t __no_r_state;  /* Defined in mbtowc.c.  */
-
-size_t
-__wcrtomb (char *s, wchar_t wc);
-
-/*
- * Convert WCHAR into its multibyte character representation,
- * putting this in S and returning its length.
- *
- * Attention: this function should NEVER be intentionally used.
- * The interface is completely stupid.  The state is shared between
- * all conversion functions.  You should use instead the restartable
- * version `wcrtomb'.
- *
- * @implemented
- */
-int
-wctomb (char *s, wchar_t wchar)
-{
-  /* If S is NULL the function has to return null or not null
-     depending on the encoding having a state depending encoding or
-     not.  This is nonsense because any multibyte encoding has a
-     state.  The ISO C amendment 1 corrects this while introducing the
-     restartable functions.  We simply say here all encodings have a
-     state.  */
-  if (s == NULL)
-    return 1;
-
-  return __wcrtomb (s, wchar);
-}
-
-
-size_t
-__wcrtomb (char *s, wchar_t wc)
-{
-  char fake[1];
-  size_t written = 0;
-
-
-
-  if (s == NULL)
-    {
-      s = fake;
-      wc = L'\0';
-    }
-
-  if (wc < 0x80)
-    {
-      /* It's a one byte sequence.  */
-      if (s != NULL)
-        *s = (char) wc;
-      return 1;
-    }
-
-  for (written = 2; written < 6; ++written)
-    if ((wc & encoding_mask[written - 2]) == 0)
-      break;
-
-  if (s != NULL)
-    {
-      size_t cnt = written;
-      s[0] = encoding_byte[cnt - 2];
-
-      --cnt;
-      do
-        {
-          s[cnt] = 0x80 | (wc & 0x3f);
-          wc >>= 6;
-        }
-      while (--cnt > 0);
-      s[0] |= wc;
-    }
-
-  return written;
-}

Removed: trunk/reactos/lib/sdk/crt/stdlib/wcstombs.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/stdlib/wcstombs.c?rev=30265&view=auto
==============================================================================
--- trunk/reactos/lib/sdk/crt/stdlib/wcstombs.c (original)
+++ trunk/reactos/lib/sdk/crt/stdlib/wcstombs.c (removed)
@@ -1,157 +1,0 @@
-/* Copyright (C) 1991, 1992, 1995, 1996, 1997 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   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 <precomp.h>
-#include <wchar.h>
-
-#ifndef EILSEQ
-#define EILSEQ EINVAL
-#endif
-
-
-static const wchar_t encoding_mask[] =
-{
-  (~0x7ff&WCHAR_MAX), (~0xffff&WCHAR_MAX), (~0x1fffff&WCHAR_MAX), (~0x3ffffff&WCHAR_MAX)
-};
-
-static const unsigned char encoding_byte[] =
-{
-  0xc0, 0xe0, 0xf0, 0xf8, 0xfc
-};
-
-/* We don't need the state really because we don't have shift states
-   to maintain between calls to this function.  */
-
-static mbstate_t mbstate_internal;
-
-
-mbstate_t __no_r_state;  /* Now defined in wcstombs.c.  */
-//extern mbstate_t __no_r_state;  /* Defined in mbtowc.c.  */
-
-size_t
-__wcsrtombs (char *dst, const wchar_t **src, size_t len, mbstate_t *ps);
-
-/*
- * Convert the `wchar_t' string in PWCS to a multibyte character string
- * in S, writing no more than N characters.  Return the number of bytes
- * written, or (size_t) -1 if an invalid `wchar_t' was found.
- *
- * Attention: this function should NEVER be intentionally used.
- * The interface is completely stupid.  The state is shared between
- * all conversion functions.  You should use instead the restartable
- * version `wcsrtombs'.
- *
- * @implemented
- */
-size_t
-wcstombs (char *s, const wchar_t *pwcs, size_t n)
-{
-  mbstate_t save_shift = __no_r_state;
-  size_t written;
-
-  written = __wcsrtombs (s, &pwcs, n, &__no_r_state);
-
-  /* Restore the old shift state.  */
-  __no_r_state = save_shift;
-
-  /* Return how many we wrote (or maybe an error).  */
-  return written;
-}
-
-size_t
-__wcsrtombs (char *dst, const wchar_t **src, size_t len, mbstate_t *ps)
-{
-  size_t written = 0;
-  const wchar_t *run = *src;
-
-  if (ps == NULL)
-    ps = &mbstate_internal;
-
-  if (dst == NULL)
-    /* The LEN parameter has to be ignored if we don't actually write
-       anything.  */
-    len = ~0;
-
-  while (written < len)
-    {
-      wchar_t wc = *run++;
-
-#if 0
-      if (wc < 0 || wc > WCHAR_MAX)
-        {
-          /* This is no correct ISO 10646 character.  */
-          __set_errno (EILSEQ);
-          return (size_t) -1;
-        }
-#endif
-
-      if (wc == L'\0')
-        {
-          /* Found the end.  */
-          if (dst != NULL)
-            *dst = '\0';
-          *src = NULL;
-          return written;
-        }
-      else if (wc < 0x80)
-        {
-          /* It's an one byte sequence.  */
-          if (dst != NULL)
-            *dst++ = (char) wc;
-          ++written;
-        }
-      else
-        {
-          size_t step;
-
-          for (step = 2; step < 6; ++step)
-            if ((wc & encoding_mask[step - 2]) == 0)
-              break;
-
-          if (written + step >= len)
-            /* Too long.  */
-            break;
-
-          if (dst != NULL)
-            {
-              size_t cnt = step;
-
-              dst[0] = encoding_byte[cnt - 2];
-
-              --cnt;
-              do
-                {
-                  dst[cnt] = 0x80 | (wc & 0x3f);
-                  wc >>= 6;
-                }
-              while (--cnt > 0);
-              dst[0] |= wc;
-
-              dst += step;
-            }
-
-          written += step;
-        }
-    }
-
-  /* Store position of first unprocessed word.  */
-  *src = run;
-
-  return written;
-}
-//weak_alias (__wcsrtombs, wcsrtombs)

Removed: trunk/reactos/lib/sdk/crt/stdlib/wcstoul.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/stdlib/wcstoul.c?rev=30265&view=auto
==============================================================================
--- trunk/reactos/lib/sdk/crt/stdlib/wcstoul.c (original)
+++ trunk/reactos/lib/sdk/crt/stdlib/wcstoul.c (removed)
@@ -1,100 +1,0 @@
-/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
-#include <precomp.h>
-
-/*
- * Convert a unicode string to an unsigned long integer.
- *
- * Ignores `locale' stuff.  Assumes that the upper and lower case
- * alphabets and digits are each contiguous.
- *
- * @implemented
- */
-unsigned long
-wcstoul(const wchar_t *nptr, wchar_t **endptr, int base)
-{
-  const wchar_t *s = nptr;
-  unsigned long acc;
-  int c;
-  unsigned long cutoff;
-  int neg = 0, any, cutlim;
-
-  /*
-   * See strtol for comments as to the logic used.
-   */
-  do {
-    c = *s++;
-  } while (iswspace(c));
-  if (c == L'-')
-  {
-    neg = 1;
-    c = *s++;
-  }
-  else if (c == L'+')
-    c = *s++;
-  if ((base == 0 || base == 16) &&
-      c == L'0' && (*s == L'x' || *s == L'X'))
-  {
-    c = s[1];
-    s += 2;
-    base = 16;
-  }
-  if (base == 0)
-    base = c == L'0' ? 8 : 10;
-  cutoff = (unsigned long)ULONG_MAX / (unsigned long)base;
-  cutlim = (unsigned long)ULONG_MAX % (unsigned long)base;
-  for (acc = 0, any = 0;; c = *s++)
-  {
-    if (iswdigit(c))
-      c -= L'0';
-    else if (iswalpha(c))
-      c -= iswupper(c) ? L'A' - 10 : L'a' - 10;
-    else
-      break;
-    if (c >= base)
-      break;
-    if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim))
-      any = -1;
-    else {
-      any = 1;
-      acc *= base;
-      acc += c;
-    }
-  }
-  if (any < 0)
-  {
-    acc = ULONG_MAX;
-    __set_errno(ERANGE);
-  }
-  else if (neg)
-    acc = -acc;
-  if (endptr != 0)
-    *endptr = any ? (wchar_t *)s - 1 : (wchar_t *)nptr;
-  return acc;
-}
-
-#if 0
-unsigned long wcstoul(const wchar_t *cp,wchar_t **endp,int base)
-{
-	unsigned long result = 0,value;
-
-	if (!base) {
-		base = 10;
-		if (*cp == L'0') {
-			base = 8;
-			cp++;
-			if ((*cp == L'x') && iswxdigit(cp[1])) {
-				cp++;
-				base = 16;
-			}
-		}
-	}
-	while (iswxdigit(*cp) && (value = iswdigit(*cp) ? *cp-L'0' : (iswlower(*cp)
-	    ? towupper(*cp) : *cp)-L'A'+10) < base) {
-		result = result*base + value;
-		cp++;
-	}
-	if (endp)
-		*endp = (wchar_t *)cp;
-	return result;
-}
-#endif

Removed: trunk/reactos/lib/sdk/crt/stdlib/wctomb.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/stdlib/wctomb.c?rev=30265&view=auto
==============================================================================
--- trunk/reactos/lib/sdk/crt/stdlib/wctomb.c (original)
+++ trunk/reactos/lib/sdk/crt/stdlib/wctomb.c (removed)
@@ -1,145 +1,0 @@
-/* Copyright (C) 1991, 1992, 1995, 1996, 1997 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   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 <precomp.h>
-
-int
-STDCALL
-WideCharToMultiByte(
-    UINT     CodePage,
-    DWORD    dwFlags,
-    LPCWSTR  lpWideCharStr,
-    int      cchWideChar,
-    LPSTR    lpMultiByteStr,
-    int      cchMultiByte,
-    LPCSTR   lpDefaultChar,
-    LPBOOL   lpUsedDefaultChar);
-
-
-/*
- * @unimplemented
- */
-int wctomb(char* dst, wchar_t ch)
-{
-#if 0
-    return WideCharToMultiByte(CP_ACP, 0, &ch, 1, dst, 6, NULL, NULL);
-#else
-    if (dst == NULL) {
-        return 1;
-    } else if (0 != (ch & 0xff00)) {
-        return -1;
-    }
-    *dst = ch;
-    return 1;
-#endif
-}
-
-
-#if 0
-
-#ifndef EILSEQ
-#define EILSEQ EINVAL
-#endif
-
-static const wchar_t encoding_mask[] =
-{
-    /* This reflects the sources *nix origin where type wchar_t
-       was 32 bits wide. Since our type wchar_t is only 16 bits
-       wide all this module will need to be reviewed.
-       Simplest option may well be to forward this modules work
-       on to the kernel which already has support for this.
-      */
-    ~0x7ff, ~0xffff, ~0x1fffff, ~0x3ffffff
-    //~0x0000-07ff, ~0x0000-ffff, ~0x001f-ffff, ~0x03ff-ffff
-};
-
-static const unsigned char encoding_byte[] =
-{
-    0xc0, 0xe0, 0xf0, 0xf8, 0xfc
-};
-
-/* The state is for this UTF8 encoding not used.  */
-//static mbstate_t internal;
-//extern mbstate_t __no_r_state;  /* Defined in mbtowc.c.  */
-
-size_t __wcrtomb(char *s, wchar_t wc);
-
-/* Convert WCHAR into its multibyte character representation,
-   putting this in S and returning its length.
-
-   Attention: this function should NEVER be intentionally used.
-   The interface is completely stupid.  The state is shared between
-   all conversion functions.  You should use instead the restartable
-   version `wcrtomb'.  */
-
-int wctomb(char *s, wchar_t wchar)
-{
-  /* If S is NULL the function has to return null or not null
-     depending on the encoding having a state depending encoding or
-     not.  This is nonsense because any multibyte encoding has a
-     state.  The ISO C amendment 1 corrects this while introducing the
-     restartable functions.  We simply say here all encodings have a
-     state.  */
-    if (s == NULL) {
-        return 1;
-    }
-    return __wcrtomb(s, wchar);
-}
-
-size_t __wcrtomb(char *s, wchar_t wc)
-{
-    char fake[1];
-    size_t written = 0;
-
-    if (s == NULL) {
-        s = fake;
-        wc = L'\0';
-    }
-    /* Store the UTF8 representation of WC.  */
-    //if (wc < 0 || wc > 0x7fffffff) {
-    if (wc < 0 || wc > 0x7fff) {
-        /* This is no correct ISO 10646 character.  */
-        __set_errno (EILSEQ);
-        return (size_t) -1;
-    }
-    if (wc < 0x80) {
-        /* It's a one byte sequence.  */
-        if (s != NULL) {
-            *s = (char)wc;
-        }
-        return 1;
-    }
-    for (written = 2; written < 6; ++written) {
-        if ((wc & encoding_mask[written - 2]) == 0) {
-            break;
-        }
-    }
-    if (s != NULL) {
-        size_t cnt = written;
-        s[0] = encoding_byte[cnt - 2];
-        --cnt;
-        do {
-            s[cnt] = 0x80 | (wc & 0x3f);
-            wc >>= 6;
-        } while (--cnt > 0);
-        s[0] |= wc;
-    }
-    return written;
-}
-
-#endif

Removed: trunk/reactos/lib/sdk/crt/stdlib/witoa.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/stdlib/witoa.c?rev=30265&view=auto
==============================================================================
--- trunk/reactos/lib/sdk/crt/stdlib/witoa.c (original)
+++ trunk/reactos/lib/sdk/crt/stdlib/witoa.c (removed)
@@ -1,81 +1,0 @@
-/*
- * COPYRIGHT:   See COPYING in the top level directory
- * PROJECT:     ReactOS system libraries
- * FILE:        lib/msvcrt/stdlib/itoa.c
- * PURPOSE:     converts a integer to ascii
- * PROGRAMER:
- * UPDATE HISTORY:
- *              1995: Created
- *              1998: Added ltoa by Ariadne
- *              2006 : replace all api in this file to wine cvs 2006-05-21
- */
-/*  */
-#include <precomp.h>
-
-/*
- * @implemented
- * copy _i64toa from wine cvs 2006 month 05 day 21
- */
-char* _i64toa(__int64 value, char* string, int radix)
-{
-    ULONGLONG val;
-    int negative;
-    char buffer[65];
-    char *pos;
-    int digit;
-
-    if (value < 0 && radix == 10) {
-	negative = 1;
-        val = -value;
-    } else {
-	negative = 0;
-        val = value;
-    } /* if */
-
-    pos = &buffer[64];
-    *pos = '\0';
-
-    do {
-	digit = val % radix;
-	val = val / radix;
-	if (digit < 10) {
-	    *--pos = '0' + digit;
-	} else {
-	    *--pos = 'a' + digit - 10;
-	} /* if */
-    } while (val != 0L);
-
-    if (negative) {
-	*--pos = '-';
-    } /* if */
-
-    memcpy(string, pos, &buffer[64] - pos + 1);
-    return string;
-}
-
-
-/*
- * @implemented
- */
-char* _ui64toa(unsigned __int64 value, char* string, int radix)
-{
-    char buffer[65];
-    char *pos;
-    int digit;
-
-    pos = &buffer[64];
-    *pos = '\0';
-
-    do {
-	digit = value % radix;
-	value = value / radix;
-	if (digit < 10) {
-	    *--pos = '0' + digit;
-	} else {
-	    *--pos = 'a' + digit - 10;
-	} /* if */
-    } while (value != 0L);
-
-    memcpy(string, pos, &buffer[64] - pos + 1);
-    return string;
-}

Removed: trunk/reactos/lib/sdk/crt/stdlib/witow.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/stdlib/witow.c?rev=30265&view=auto
==============================================================================
--- trunk/reactos/lib/sdk/crt/stdlib/witow.c (original)
+++ trunk/reactos/lib/sdk/crt/stdlib/witow.c (removed)
@@ -1,93 +1,0 @@
-/* $Id$
- *
- * COPYRIGHT:   See COPYING in the top level directory
- * PROJECT:     ReactOS system libraries
- * FILE:        lib/msvcrt/stdlib/itow.c
- * PURPOSE:     converts a integer to wchar_t
- * PROGRAMER:
- * UPDATE HISTORY:
- *              1995: Created
- *              1998: Added ltoa by Ariadne
- *              2000: derived from ./itoa.c by ea
- */
-/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
-
-#include <precomp.h>
-
-/*
- * @implemented
- */
-wchar_t* _i64tow(__int64 value, wchar_t* string, int radix)
-{
-  wchar_t tmp[65];
-  wchar_t* tp = tmp;
-  int i;
-  unsigned v;
-  int sign;
-  wchar_t* sp;
-
-  if (radix > 36 || radix <= 1) {
-    __set_errno(EDOM);
-    return 0;
-  }
-
-  sign = (radix == 10 && value < 0);
-  if (sign)
-    v = -value;
-  else
-    v = (unsigned)value;
-  while (v || tp == tmp) {
-    i = v % radix;
-    v = v / radix;
-    if (i < 10)
-      *tp++ = i+L'0';
-    else
-      *tp++ = i + L'a' - 10;
-  }
-
-  if (string == 0)
-    string = (wchar_t*)malloc(((tp-tmp)+sign+1)*sizeof(wchar_t));
-  sp = string;
-
-  if (sign)
-    *sp++ = L'-';
-  while (tp > tmp)
-    *sp++ = *--tp;
-  *sp = 0;
-  return string;
-}
-
-/*
- * @implemented
- */
-wchar_t* _ui64tow(unsigned __int64 value, wchar_t* string, int radix)
-{
-  wchar_t tmp[65];
-  wchar_t* tp = tmp;
-  long i;
-  unsigned long v = value;
-  wchar_t* sp;
-
-  if (radix > 36 || radix <= 1) {
-    __set_errno(EDOM);
-    return 0;
-  }
-
-  while (v || tp == tmp) {
-    i = v % radix;
-    v = v / radix;
-    if (i < 10)
-      *tp++ = i+L'0';
-    else
-      *tp++ = i + L'a' - 10;
-  }
-
-  if (string == 0)
-    string = (wchar_t*)malloc(((tp-tmp)+1)*sizeof(wchar_t));
-  sp = string;
-
-  while (tp > tmp)
-    *sp++ = *--tp;
-  *sp = 0;
-  return string;
-}

Removed: trunk/reactos/lib/sdk/crt/stdlib/wsplitp.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/stdlib/wsplitp.c?rev=30265&view=auto
==============================================================================
--- trunk/reactos/lib/sdk/crt/stdlib/wsplitp.c (original)
+++ trunk/reactos/lib/sdk/crt/stdlib/wsplitp.c (removed)
@@ -1,7 +1,0 @@
-
-#define _UNICODE
-#define UNICODE
-
-#include <tchar.h>
-
-#include "splitp.c"

Removed: trunk/reactos/lib/sdk/crt/stdlib/wtoi.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/stdlib/wtoi.c?rev=30265&view=auto
==============================================================================
--- trunk/reactos/lib/sdk/crt/stdlib/wtoi.c (original)
+++ trunk/reactos/lib/sdk/crt/stdlib/wtoi.c (removed)
@@ -1,6 +1,0 @@
-
-#define _UNICODE
-#define UNICODE
-
-#include "atoi.c"
-

Removed: trunk/reactos/lib/sdk/crt/stdlib/wtoi64.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/stdlib/wtoi64.c?rev=30265&view=auto
==============================================================================
--- trunk/reactos/lib/sdk/crt/stdlib/wtoi64.c (original)
+++ trunk/reactos/lib/sdk/crt/stdlib/wtoi64.c (removed)
@@ -1,39 +1,0 @@
-/*
- * COPYRIGHT:   See COPYING in the top level directory
- * PROJECT:     ReactOS system libraries
- * FILE:        lib/crt/??????
- * PURPOSE:     Unknown
- * PROGRAMER:   Unknown
- * UPDATE HISTORY:
- *              25/11/05: Added license header
- */
-
-#include <precomp.h>
-
-/*
- * @implemented
- */
-__int64 _wtoi64(const wchar_t* nptr)
-{
-    wchar_t* s = (wchar_t*)nptr;
-    __int64 acc = 0;
-    int neg = 0;
-
-    while (iswspace((int)*s))
-        s++;
-    if (*s == '-') {
-        neg = 1;
-        s++;
-    }
-    else if (*s == '+')
-        s++;
-
-    while (iswdigit((int)*s)) {
-        acc = 10 * acc + ((int)*s - '0');
-        s++;
-    }
-
-    if (neg)
-        acc *= -1;
-    return acc;
-}

Removed: trunk/reactos/lib/sdk/crt/stdlib/wtol.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/stdlib/wtol.c?rev=30265&view=auto
==============================================================================
--- trunk/reactos/lib/sdk/crt/stdlib/wtol.c (original)
+++ trunk/reactos/lib/sdk/crt/stdlib/wtol.c (removed)
@@ -1,6 +1,0 @@
-
-#define _UNICODE
-#define UNICODE
-
-#include "atol.c"
-

Removed: trunk/reactos/lib/sdk/crt/string/i386/memchr_asm.s
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/string/i386/memchr_asm.s?rev=30265&view=auto
==============================================================================
--- trunk/reactos/lib/sdk/crt/string/i386/memchr_asm.s (original)
+++ trunk/reactos/lib/sdk/crt/string/i386/memchr_asm.s (removed)
@@ -1,31 +1,0 @@
-/* $Id$
- *
- * COPYRIGHT:       See COPYING in the top level directory
- * PROJECT:         ReactOS kernel
- * FILE:            lib/string/i386/memchr.s
- */
-
-/*
- * void* memchr(const void* s, int c, size_t n)
- */
-
-.globl	_memchr
-
-_memchr:
-	push	%ebp
-	mov	%esp,%ebp
-	push	%edi
-	mov	0x8(%ebp),%edi
-	mov	0xc(%ebp),%eax
-	mov	0x10(%ebp),%ecx
-	cld
-	repne	scasb
-	je	.L1
-	mov	$1,%edi
-.L1:
-	mov	%edi,%eax
-	dec	%eax
-	pop	%edi
-	leave
-	ret
-

Removed: trunk/reactos/lib/sdk/crt/string/i386/memcpy_asm.s
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/string/i386/memcpy_asm.s?rev=30265&view=auto
==============================================================================
--- trunk/reactos/lib/sdk/crt/string/i386/memcpy_asm.s (original)
+++ trunk/reactos/lib/sdk/crt/string/i386/memcpy_asm.s (removed)
@@ -1,48 +1,0 @@
-/*
- * void *memcpy (void *to, const void *from, size_t count)
- *
- * Some optimization research can be found in media/doc/memcpy_optimize.txt
- */
-
-.globl	_memcpy
-
-_memcpy:
-	push	%ebp
-	mov	%esp,%ebp
-	push	%esi
-	push	%edi
-	mov	0x8(%ebp),%edi
-	mov	0xc(%ebp),%esi
-	mov	0x10(%ebp),%ecx
-	cld
-	cmp	$16,%ecx
-	jb	.L1
-	mov	%ecx,%edx
-	test	$3,%edi
-	je	.L2
-/*
- *  Make the destination dword aligned
- */
-        mov	%edi,%ecx
-        and	$3,%ecx
-        sub	$5,%ecx
-        not	%ecx
-        sub	%ecx,%edx
-        rep	movsb
-        mov	%edx,%ecx	
-.L2:
-	shr	$2,%ecx
-	rep	movsl
-	mov	%edx,%ecx
-	and	$3,%ecx
-.L1:	
-	test	%ecx,%ecx
-	je	.L3
-	rep	movsb
-.L3:
-	pop	%edi
-	pop	%esi
-	mov	0x8(%ebp),%eax
-	leave
-	ret
-

Removed: trunk/reactos/lib/sdk/crt/string/i386/memmove_asm.s
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/string/i386/memmove_asm.s?rev=30265&view=auto
==============================================================================
--- trunk/reactos/lib/sdk/crt/string/i386/memmove_asm.s (original)
+++ trunk/reactos/lib/sdk/crt/string/i386/memmove_asm.s (removed)
@@ -1,116 +1,0 @@
-/* 
- * $Id$
- */
-
-/*
- * void *memmove (void *to, const void *from, size_t count)
- */
-
-.globl	_memmove
-
-_memmove:
-	push	%ebp
-	mov	%esp,%ebp
-	
-	push	%esi
-	push	%edi
-	
-	mov	8(%ebp),%edi
-	mov	12(%ebp),%esi
-	mov	16(%ebp),%ecx
-	
-	cmp	%esi,%edi
-	jbe	.CopyUp
-	mov	%ecx,%eax
-	add	%esi,%eax
-	cmp	%eax,%edi
-	jb	.CopyDown
-	
-.CopyUp:	
-	cld
-	
-	cmp	$16,%ecx
-	jb	.L1
-	mov	%ecx,%edx
-	test	$3,%edi
-	je	.L2
-/*
- * Make the destination dword aligned
- */
-        mov	%edi,%ecx
-        and	$3,%ecx
-        sub	$5,%ecx
-        not	%ecx
-        sub	%ecx,%edx
-        rep	movsb
-        mov	%edx,%ecx	
-.L2:
-	shr	$2,%ecx
-	rep	movsl
-	mov	%edx,%ecx
-	and	$3,%ecx
-.L1:	
-	test	%ecx,%ecx
-	je	.L3
-	rep	movsb
-.L3:
-	mov	8(%ebp),%eax
-	pop	%edi
-	pop	%esi
-	leave
-	ret
-
-.CopyDown:
-        std
-        
-	add	%ecx,%edi
-	add	%ecx,%esi
-	
-	cmp	$16,%ecx
-	jb	.L4
-        mov	%ecx,%edx
-	test	$3,%edi
-	je	.L5
-	
-/*
- * Make the destination dword aligned
- */
-	mov	%edi,%ecx
-	and	$3,%ecx
-	sub	%ecx,%edx
-	dec	%esi
-	dec	%edi
-	rep	movsb
-	mov	%edx,%ecx
-	
-	sub	$3,%esi
-	sub	$3,%edi
-.L6:	
-	shr	$2,%ecx
-	rep	movsl
-	mov	%edx,%ecx
-	and	$3,%ecx
-	je	.L7
-	add	$3,%esi
-	add	$3,%edi
-.L8:	
-	rep	movsb
-.L7:
-	cld
-	mov	8(%ebp),%eax
-	pop	%edi
-	pop	%esi
-	leave
-	ret
-.L5:
-	sub	$4,%edi
-	sub	$4,%esi
-	jmp	.L6
-		
-.L4:
-	test	%ecx,%ecx
-	je	.L7	
-	dec	%esi
-	dec	%edi
-	jmp	.L8
-

Removed: trunk/reactos/lib/sdk/crt/string/i386/memset_asm.s
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/string/i386/memset_asm.s?rev=30265&view=auto
==============================================================================
--- trunk/reactos/lib/sdk/crt/string/i386/memset_asm.s (original)
+++ trunk/reactos/lib/sdk/crt/string/i386/memset_asm.s (removed)
@@ -1,47 +1,0 @@
-/* 
- * $Id$
- */
-
-/*
- * void *memset (void *src, int val, size_t count)
- */
-
-.globl	_memset
-
-_memset:
-	push	%ebp
-	mov	%esp,%ebp
-	push	%edi
-	mov	0x8(%ebp),%edi
-	movzb	0xc(%ebp),%eax
-	mov	0x10(%ebp),%ecx
-	cld
-	cmp	$16,%ecx
-	jb	.L1
-	mov	$0x01010101,%edx
-	mul	%edx
-	mov	%ecx,%edx
-	test	$3,%edi
-	je	.L2
-	mov	%edi,%ecx
-	and	$3,%ecx
-	sub	$5,%ecx
-	not	%ecx
-	sub	%ecx,%edx
-	rep	stosb
-	mov	%edx,%ecx
-.L2:
-	shr	$2,%ecx
-	rep	stosl
-	mov	%edx,%ecx
-	and	$3,%ecx
-.L1:	
-	test	%ecx,%ecx
-	je	.L3
-	rep	stosb
-.L3:
-	pop	%edi
-	mov	0x8(%ebp),%eax
-	leave
-	ret
-

Removed: trunk/reactos/lib/sdk/crt/string/memchr.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/string/memchr.c?rev=30265&view=auto
==============================================================================
--- trunk/reactos/lib/sdk/crt/string/memchr.c (original)
+++ trunk/reactos/lib/sdk/crt/string/memchr.c (removed)
@@ -1,18 +1,0 @@
-/*
- * $Id$
- */
-
-#include <string.h>
-
-void* memchr(const void *s, int c, size_t n)
-{
-  if (n)
-  {
-    const char *p = s;
-    do {
-      if (*p++ == c)
-	return (void *)(p-1);
-    } while (--n != 0);
-  }
-  return 0;
-}

Removed: trunk/reactos/lib/sdk/crt/string/memcmp.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/string/memcmp.c?rev=30265&view=auto
==============================================================================
--- trunk/reactos/lib/sdk/crt/string/memcmp.c (original)
+++ trunk/reactos/lib/sdk/crt/string/memcmp.c (removed)
@@ -1,17 +1,0 @@
-/*
- * $Id$
- */
-
-#include <string.h>
-
-int memcmp(const void *s1, const void *s2, size_t n)
-{
-    if (n != 0) {
-        const unsigned char *p1 = s1, *p2 = s2;
-        do {
-            if (*p1++ != *p2++)
-	            return (*--p1 - *--p2);
-        } while (--n != 0);
-    }
-    return 0;
-}

Removed: trunk/reactos/lib/sdk/crt/string/memcpy.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/string/memcpy.c?rev=30265&view=auto
==============================================================================
--- trunk/reactos/lib/sdk/crt/string/memcpy.c (original)
+++ trunk/reactos/lib/sdk/crt/string/memcpy.c (removed)
@@ -1,16 +1,0 @@
-/*
- * $Id$
- */
-
-#include <string.h>
-
-void* memcpy(void* to, const void* from, size_t count)
-{
-  register char *f = (char *)from;
-  register char *t = (char *)to;
-  register int i = count;
-
-  while (i-- > 0)
-    *t++ = *f++;
-  return to;
-}

Removed: trunk/reactos/lib/sdk/crt/string/memicmp.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/string/memicmp.c?rev=30265&view=auto
==============================================================================
--- trunk/reactos/lib/sdk/crt/string/memicmp.c (original)
+++ trunk/reactos/lib/sdk/crt/string/memicmp.c (removed)
@@ -1,22 +1,0 @@
-/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
-#include <precomp.h>
-
-/*
- * @implemented
- */
-int
-_memicmp(const void *s1, const void *s2, size_t n)
-{
-  if (n != 0)
-  {
-    const unsigned char *p1 = s1, *p2 = s2;
-
-    do {
-      if (toupper(*p1) != toupper(*p2))
-	return (*p1 - *p2);
-      p1++;
-      p2++;
-    } while (--n != 0);
-  }
-  return 0;
-}

Removed: trunk/reactos/lib/sdk/crt/string/memmove.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/string/memmove.c?rev=30265&view=auto
==============================================================================
--- trunk/reactos/lib/sdk/crt/string/memmove.c (original)
+++ trunk/reactos/lib/sdk/crt/string/memmove.c (removed)
@@ -1,40 +1,0 @@
-/*
- * $Id$
- */
-
-#include <string.h>
-
-
-void * memmove(void *dest,const void *src,size_t count)
-{
-    char *char_dest = (char *)dest;
-    char *char_src = (char *)src;
-
-    if ((char_dest <= char_src) || (char_dest >= (char_src+count)))
-    {
-        /*  non-overlapping buffers */
-        while(count > 0)
-	{
-            *char_dest = *char_src;
-            char_dest++;
-            char_src++;
-            count--;
-	}
-    }
-    else
-    {
-        /* overlaping buffers */
-        char_dest = (char *)dest + count - 1;
-        char_src = (char *)src + count - 1;
-
-        while(count > 0)
-	{
-           *char_dest = *char_src;
-           char_dest--;
-           char_src--;
-           count--;
-	}
-    }
-
-    return dest;
-}

Removed: trunk/reactos/lib/sdk/crt/string/memset.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/string/memset.c?rev=30265&view=auto
==============================================================================
--- trunk/reactos/lib/sdk/crt/string/memset.c (original)
+++ trunk/reactos/lib/sdk/crt/string/memset.c (removed)
@@ -1,17 +1,0 @@
-/*
- * $Id$
- */
-
-#include <string.h>
-
-void* memset(void* src, int val, size_t count)
-{
-	char *char_src = (char *)src;
-
-	while(count>0) {
-		*char_src = val;
-		char_src++;
-		count--;
-	}
-	return src;
-}




More information about the Ros-diffs mailing list