Index: trunk/src/NTDLL/arith64.h
===================================================================
--- trunk/src/NTDLL/arith64.h	(revision 2176)
+++ 	(revision )
@@ -1,7 +1,0 @@
-// $Id: arith64.h,v 1.1 1999-12-20 11:47:20 sandervl Exp $
-#ifndef __ARITH64_H__
-#define __ARITH64_H__
-
-void CDECL POP_FPU(double &fpval);
-
-#endif
Index: trunk/src/NTDLL/crt.cpp
===================================================================
--- trunk/src/NTDLL/crt.cpp	(revision 2176)
+++ 	(revision )
@@ -1,2047 +1,0 @@
-/* $Id: crt.cpp,v 1.13 1999-12-20 11:47:00 sandervl Exp $ */
-
-/*
- * Project Odin Software License can be found in LICENSE.TXT
- * Win32 NT Runtime / NTDLL for OS/2
- * Copyright 1999 Patrick Haller (phaller@gmx.net)
- */
-
-/****************************************************************************
- * Include                                                                  *
- ****************************************************************************/
-
-#include <odin.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <math.h>
-#include <ctype.h>
-#include <wchar.h>
-#include <wcstr.h>
-#include <wctype.h>
-
-#include "ntdll.h"
-#include <heapstring.h>
-#include "arith64.h"
-
-/*
-NTDLL.sprintf
-NTDLL._wcsicmp
-*/
-
-
-/****************************************************************************
- * Local Prototypes                                                         *
- ****************************************************************************/
-
-
-LPWSTR CDECL OS2_wcsupr(LPWSTR str);
-int    CDECL OS2_wcsnicmp(LPWSTR str1, LPWSTR str2, long l);
-
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.879
- * Status    :
- *
- * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
- *****************************************************************************/
-
-int CDECL OS2_wcsicmp(LPWSTR str1, LPWSTR str2)
-{
-  dprintf(("NTDLL: _wcsicmp(%08xh,%08xh)\n",
-           str1,
-           str2));
-
-  return (OS2_wcsnicmp(str1,
-                       str2,
-                       wcslen((wchar_t*) str1)));
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.880
- * Status    :
- *
- * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
- *****************************************************************************/
-
-LPWSTR CDECL OS2_wcslwr(LPWSTR str)
-{
-  DWORD dwIndex;
-
-  dprintf(("NTDLL: _wcslwr(%08xh)\n",
-           str));
-
-  for (dwIndex = wcslen((const wchar_t*)str);
-       dwIndex;
-       dwIndex--)
-  {
-    towlower(str[dwIndex]);
-  }
-
-  return (str);
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.881
- * Status    :
- *
- * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
- *****************************************************************************/
-
-int CDECL OS2_wcsnicmp(LPWSTR str1, LPWSTR str2, long l)
-{
-  LPWSTR w1;
-  LPWSTR w2;
-
-  dprintf(("NTDLL: _wcsnicmp(%08xh,%08xh,%08xh)\n",
-           str1,
-           str2,
-           l));
-
-  w1 = HEAP_strdupW(GetProcessHeap(),0,str1);
-  w2 = HEAP_strdupW(GetProcessHeap(),0,str2);
-  OS2_wcsupr(w1);
-  OS2_wcsupr(w2);
-
-  return (wcsncmp((wchar_t*)w1,
-                  (wchar_t*)w2,
-                  l));
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.882
- * Status    :
- *
- * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
- *****************************************************************************/
-
-LPWSTR CDECL OS2_wcsupr(LPWSTR str)
-{
-  DWORD dwIndex;
-
-  dprintf(("NTDLL: _wcsupr(%08xh)\n",
-           str));
-
-  for (dwIndex = wcslen((const wchar_t*)str);
-       dwIndex;
-       dwIndex--)
-  {
-    towupper(str[dwIndex]);
-  }
-
-  return (str);
-}
-
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.883
- * Status    :
- *
- * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
- *****************************************************************************/
-
-double CDECL OS2abs(double d)
-{
-  dprintf(("NTDLL: abs(%f)\n",
-           d));
-
-  return (abs(d));
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.884
- * Status    :
- *
- * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
- *****************************************************************************/
-
-double CDECL OS2atan(double d)
-{
-  dprintf(("NTDLL: atan(%f)\n",
-           d));
-
-  return (atan(d));
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.885
- * Status    :
- *
- * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
- *****************************************************************************/
-
-int CDECL OS2atoi(LPSTR str)
-{
-  dprintf(("NTDLL: atoi(%s)\n",
-           str));
-
-  return (atoi(str));
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.886
- * Status    :
- *
- * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
- *****************************************************************************/
-
-long CDECL OS2atol(LPSTR str)
-{
-  dprintf(("NTDLL: atol(%s)\n",
-           str));
-
-  return (atol(str));
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.887
- * Status    :
- *
- * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
- *****************************************************************************/
-
-double CDECL OS2ceil(double d)
-{
-  dprintf(("NTDLL: ceil(%f)\n",
-           d));
-
-  return (ceil(d));
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.888
- * Status    :
- *
- * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
- *****************************************************************************/
-
-double CDECL OS2cos(double d)
-{
-  dprintf(("NTDLL: cos(%f)\n",
-           d));
-
-  return (cos(d));
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.889
- * Status    :
- *
- * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
- *****************************************************************************/
-
-double CDECL OS2fabs(double d)
-{
-  dprintf(("NTDLL: fabs(%f)\n",
-           d));
-
-  return (fabs(d));
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.890
- * Status    :
- *
- * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
- *****************************************************************************/
-
-double CDECL OS2floor(double d)
-{
-  dprintf(("NTDLL: floor(%f)\n",
-           d));
-
-  return (floor(d));
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.891
- * Status    :
- *
- * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
- *****************************************************************************/
-
-int CDECL OS2isalpha(int i)
-{
-  dprintf(("NTDLL: isalpha(%08xh)\n",
-           i));
-
-  return (isalpha(i));
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.892
- * Status    :
- *
- * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
- *****************************************************************************/
-
-int CDECL OS2isdigit(int i)
-{
-  dprintf(("NTDLL: isdigit(%08xh)\n",
-           i));
-
-  return (isdigit(i));
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.893
- * Status    :
- *
- * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
- *****************************************************************************/
-
-int CDECL OS2islower(int i)
-{
-  dprintf(("NTDLL: islower(%08xh)\n",
-           i));
-
-  return (islower(i));
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.894
- * Status    :
- *
- * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
- *****************************************************************************/
-
-int CDECL OS2isprint(int i)
-{
-  dprintf(("NTDLL: isprint(%08xh)\n",
-           i));
-
-  return (isprint(i));
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.895
- * Status    :
- *
- * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
- *****************************************************************************/
-
-int CDECL OS2isspace(int i)
-{
-  dprintf(("NTDLL: isspace(%08xh)\n",
-           i));
-
-  return (isspace(i));
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.896
- * Status    :
- *
- * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
- *****************************************************************************/
-
-int CDECL OS2isupper(int i)
-{
-  dprintf(("NTDLL: isupper(%08xh)\n",
-           i));
-
-  return (isupper(i));
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.911
- * Status    :
- *
- * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
- *****************************************************************************/
-
-LPSTR CDECL OS2sprintf(LPSTR lpstrBuffer,
-                       LPSTR lpstrFormat,
-                       ...)
-{
-  va_list argptr;                          /* -> variable argument list */
-
-  dprintf(("NTDLL: sprintf(%08xh,%s)\n",
-           lpstrBuffer,
-           lpstrFormat));
-
-  va_start(argptr,
-           lpstrFormat);                   /* get pointer to argument list */
-  vsprintf(lpstrBuffer,
-           lpstrFormat,
-           argptr);
-  va_end(argptr);                          /* done with variable arguments */
-
-  return (lpstrBuffer);
-}
-
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.914
- * Status    :
- *
- * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
- *****************************************************************************/
-
-LPSTR CDECL OS2strcat(      LPSTR str1,
-                      const LPSTR str2)
-{
-  dprintf(("NTDLL: strcat\n"));
-
-  return (strcat(str1, str2));
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.915
- * Status    :
- *
- * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
- *****************************************************************************/
-
-LPSTR CDECL OS2strchr(const LPSTR str,
-                       int         i)
-{
-  dprintf(("NTDLL: strchr(%s,%08xh)\n",
-           str,
-           i));
-
-  return (strchr(str, i));
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.916
- * Status    :
- *
- * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
- *****************************************************************************/
-
-int CDECL OS2strcmp(const LPSTR str1,
-                      const LPSTR str2)
-{
-  dprintf(("NTDLL: strcmp(%s,%s)\n",
-           str1,
-           str2));
-
-  return (strcmp(str1, str2));
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.?
- * Status    :
- *
- * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
- *****************************************************************************/
-
-int CDECL OS2_stricmp(const LPSTR str1,
-                      const LPSTR str2)
-{
-  dprintf(("NTDLL: _stricmp(%s,%s)\n",
-           str1,
-           str2));
-
-  return (stricmp(str1, str2));
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.917
- * Status    :
- *
- * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
- *****************************************************************************/
-
-LPSTR CDECL OS2strcpy(      LPSTR str1,
-                       const LPSTR str2)
-{
-  dprintf(("NTDLL: strcpy\n"));
-
-  return (strcpy(str1, str2));
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.918
- * Status    :
- *
- * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
- *****************************************************************************/
-
-size_t CDECL OS2strcspn(const LPSTR str1,
-                                LPSTR str2)
-{
-  dprintf(("NTDLL: strcspn(%s,%s)\n",
-           str1,
-           str2));
-
-  return (strcspn(str1, str2));
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.919
- * Status    :
- *
- * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
- *****************************************************************************/
-
-size_t CDECL OS2strlen(const LPSTR str)
-{
-  dprintf(("NTDLL: strlen(%s)\n",
-           str));
-
-  return (strlen(str));
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.920
- * Status    :
- *
- * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
- *****************************************************************************/
-
-LPSTR CDECL OS2strncat(      LPSTR str1,
-                        const LPSTR str2,
-                        size_t      i)
-{
-  dprintf(("NTDLL: strncat(%s,%s,%08xh)\n",
-           str1,
-           str2,
-           i));
-
-  return (strncat(str1, str2, i));
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.921
- * Status    :
- *
- * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
- *****************************************************************************/
-
-int CDECL OS2strncmp(const LPSTR str1,
-                       const LPSTR str2,
-                       size_t      i)
-{
-  dprintf(("NTDLL: strncmp(%s,%s,%08xh)\n",
-           str1,
-           str2,
-           i));
-
-  return (strncmp(str1, str2, i));
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.922
- * Status    :
- *
- * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
- *****************************************************************************/
-
-LPSTR CDECL OS2strncpy(const LPSTR str1,
-                        const LPSTR str2,
-                        size_t      i)
-{
-  dprintf(("NTDLL: strncpy(%s,%s,%08xh)\n",
-           str1,
-           str2,
-           i));
-
-  return (strncpy(str1, str2, i));
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.923
- * Status    :
- *
- * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
- *****************************************************************************/
-
-LPSTR CDECL OS2strpbrk(const LPSTR str1,
-                      const LPSTR str2)
-{
-  dprintf(("NTDLL: strpbrk(%s,%s)\n",
-           str1,
-           str2));
-
-  return (strpbrk(str1, str2));
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.924
- * Status    :
- *
- * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
- *****************************************************************************/
-
-LPSTR CDECL OS2strrchr(const LPSTR str,
-                        size_t      i)
-{
-  dprintf(("NTDLL: strrchr(%s,%08xh)\n",
-           str,
-           i));
-
-  return (strrchr(str, i));
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.925
- * Status    :
- *
- * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
- *****************************************************************************/
-
-size_t CDECL OS2strspn(const LPSTR str1,
-                       const LPSTR str2)
-{
-  dprintf(("NTDLL: strspn(%s,%s)\n",
-           str1,
-           str2));
-
-  return (strspn(str1, str2));
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.926
- * Status    :
- *
- * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
- *****************************************************************************/
-
-LPSTR CDECL OS2strstr(const LPSTR str1,
-                       const LPSTR str2)
-{
-  dprintf(("NTDLL: strstr(%s,%s)\n",
-           str1,
-           str2));
-
-  return (strstr(str1, str2));
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.927
- * Status    :
- *
- * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
- *****************************************************************************/
-
-int CDECL OS2swprintf(const LPWSTR str,
-                      int   i,
-                      const LPWSTR format,
-                      ...)
-{
-  va_list valist;
-  int     rc;
-
-  dprintf(("NTDLL: swprintf(%s,%d,%s)\n",
-           str,
-           i,
-           format));
-
-  va_start( valist, format );
-  rc = vswprintf( (wchar_t*)str,
-                  i,
-                  (wchar_t*)format,
-                  valist );
-  va_end( valist );
-  return rc;
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.928
- * Status    :
- *
- * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
- *****************************************************************************/
-
-double CDECL OS2tan(double d)
-{
-  dprintf(("NTDLL: tan(%f)\n",
-           d));
-
-  return (tan(d));
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.929
- * Status    :
- *
- * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
- *****************************************************************************/
-
-int CDECL OS2toupper(int c)
-{
-  dprintf(("NTDLL: toupper(%c)\n",
-           c));
-
-  return (toupper(c));
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.930
- * Status    :
- *
- * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
- *****************************************************************************/
-
-int CDECL OS2tolower(int c)
-{
-  dprintf(("NTDLL: tolower(%c)\n",
-           c));
-
-  return (tolower(c));
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.931
- * Status    :
- *
- * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
- *****************************************************************************/
-
-int CDECL OS2towupper(int c)
-{
-  dprintf(("NTDLL: towupper(%c)\n",
-           c));
-
-  return (towupper(c));
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.932
- * Status    :
- *
- * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
- *****************************************************************************/
-
-int CDECL OS2towlower(int c)
-{
-  dprintf(("NTDLL: towlower(%c)\n",
-           c));
-
-  return (towlower(c));
-}
-
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.934
- * Status    :
- *
- * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
- *****************************************************************************/
-
-wchar_t* CDECL OS2wcscat(      wchar_t* str1,
-                       const wchar_t* str2)
-{
-  dprintf(("NTDLL: wcscat(%08xh,%08xh)\n",
-           str1,
-           str2));
-
-  return (wcscat(str1, str2));
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.935
- * Status    :
- *
- * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
- *****************************************************************************/
-
-wchar_t* CDECL OS2wcschr(const wchar_t* str,
-                       int          i)
-{
-  dprintf(("NTDLL: wcschr(%08xh,%08xh)\n",
-           str,
-           i));
-
-  return (wcschr(str, i));
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.936
- * Status    :
- *
- * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
- *****************************************************************************/
-
-int CDECL OS2wcscmp(const wchar_t* str1,
-                    const wchar_t* str2)
-{
-  dprintf(("NTDLL: wcscmp(%08xh,%08xh)\n",
-           str1,
-           str2));
-
-  return (wcscmp(str1, str2));
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.937
- * Status    :
- *
- * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
- *****************************************************************************/
-
-wchar_t* CDECL OS2wcscpy(      wchar_t* str1,
-                       const wchar_t* str2)
-{
-  dprintf(("NTDLL: wcscpy(%08xh,%08xh)\n",
-           str1,
-           str2));
-
-  return (wcscpy(str1, str2));
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.938
- * Status    :
- *
- * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
- *****************************************************************************/
-
-size_t CDECL OS2wcscspn(const wchar_t* str1,
-                              wchar_t* str2)
-{
-  dprintf(("NTDLL: wcscspn(%08xh,%08xh)\n",
-           str1,
-           str2));
-
-  return (wcscspn(str1, str2));
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.939
- * Status    :
- *
- * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
- *****************************************************************************/
-
-size_t CDECL OS2wcslen(const wchar_t* str)
-{
-  dprintf(("NTDLL: wcslen(%08xh)\n",
-           str));
-
-  return (wcslen(str));
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.940
- * Status    :
- *
- * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
- *****************************************************************************/
-
-wchar_t* CDECL OS2wcsncat(      wchar_t* str1,
-                        const wchar_t* str2,
-                        size_t      i)
-{
-  dprintf(("NTDLL: wcsncat(%08xh,%08xh,%08xh)\n",
-           str1,
-           str2,
-           i));
-
-  return (wcsncat(str1, str2, i));
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.941
- * Status    :
- *
- * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
- *****************************************************************************/
-
-int CDECL OS2wcsncmp(const wchar_t* str1,
-                     const wchar_t* str2,
-                     size_t      i)
-{
-  dprintf(("NTDLL: wcsncmp(%08xh,%08xh,%08xh)\n",
-           str1,
-           str2,
-           i));
-
-  return (wcsncmp(str1, str2, i));
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.942
- * Status    :
- *
- * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
- *****************************************************************************/
-
-wchar_t* CDECL OS2wcsncpy(      wchar_t* str1,
-                          const wchar_t* str2,
-                          size_t       i)
-{
-  dprintf(("NTDLL: wcsncpy(%s,%s,%08xh)\n",
-           str1,
-           str2,
-           i));
-
-  return (wcsncpy(str1, str2, i));
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.943
- * Status    :
- *
- * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
- *****************************************************************************/
-
-wchar_t* CDECL OS2wcspbrk(const wchar_t* str1,
-                        const wchar_t* str2)
-{
-  dprintf(("NTDLL: wcspbrk(%08xh,%08xh)\n",
-           str1,
-           str2));
-
-  return (wcspbrk(str1, str2));
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.944
- * Status    :
- *
- * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
- *****************************************************************************/
-
-wchar_t* CDECL OS2wcsrchr(const wchar_t* str,
-                        size_t       i)
-{
-  dprintf(("NTDLL: wcsrchr(%08xh,%08xh)\n",
-           str,
-           i));
-
-  return (wcsrchr(str, i));
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.945
- * Status    :
- *
- * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
- *****************************************************************************/
-
-size_t CDECL OS2wcsspn(const wchar_t* str1,
-                       const wchar_t* str2)
-{
-  dprintf(("NTDLL: wcsspn(%08xh,%08xh)\n",
-           str1,
-           str2));
-
-  return (wcsspn(str1, str2));
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.946
- * Status    :
- *
- * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
- *****************************************************************************/
-
-wchar_t* CDECL OS2wcsstr(const wchar_t* str1,
-                         const wchar_t* str2)
-{
-  dprintf(("NTDLL: wcsstr(%s,%s)\n",
-           str1,
-           str2));
-
-  return (wcsstr(str1, str2));
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.?
- * Status    :
- *
- * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
- *****************************************************************************/
-
-char * CDECL OS2_itoa(int i, char *s, int r)
-{
-  dprintf(("NTDLL: _itoa(%08xh, %08xh, %08xh)\n",
-           i,
-           s,
-           r));
-
-  return (_itoa(i,s,r));
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.?
- * Status    :
- *
- * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
- *****************************************************************************/
-
-char * CDECL OS2_itow(int i, char *s, int r)
-{
-  dprintf(("NTDLL: _itow(%08xh, %08xh, %08xh) no unicode support !\n",
-           i,
-           s,
-           r));
-
-  return (_itoa(i,s,r));
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.749
- * Status    :
- *
- * Author    : Jens Wiessner
- *****************************************************************************/
-
-LONG CDECL NTDLL__CIpow()
-{
-	double x,y;
-	POP_FPU(y);
-	POP_FPU(x);
-	return pow(x,y);
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.864
- * Status    :
- *
- * Author    : Jens Wiessner
- *****************************************************************************/
-
-LONG CDECL NTDLL__ftol(void)
-{
-	/* don't just do DO_FPU("fistp",retval), because the rounding
-	 * mode must also be set to "round towards zero"... */
-	double fl;
-	POP_FPU(fl);
-	return (LONG)fl;
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.866
- * Status    :
- *
- * Author    : Jens Wiessner
- *****************************************************************************/
-
-LPSTR  CDECL NTDLL__ltoa(long x,LPSTR buf,INT radix)
-{
-    return ltoa(x,buf,radix);
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.868
- * Status    :
- *
- * Author    : Jens Wiessner
- *****************************************************************************/
-
-INT CDECL NTDLL__memicmp(
-	LPCSTR s1,	/* [in] first string */
-	LPCSTR s2,	/* [in] second string */
-	DWORD len	/* [in] length to compare */ )
-{
-	dprintf(("NTDLL: memicmp(%08xh, %08xh, %08xh)\n",s1,s2,len));
-	int	i;
-
-	for (i=0;i<len;i++) {
-		if (tolower(s1[i])<tolower(s2[i]))
-			return -1;
-		if (tolower(s1[i])>tolower(s2[i]))
-			return  1;
-	}
-	return 0;
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.869
- * Status    :
- *
- * Author    : Jens Wiessner
- *****************************************************************************/
-
-int  CDECL NTDLL__snprintf( char *buf, size_t bufsize, const char *fmt, ... )
-{
-  dprintf(("NTDLL: _snprintf(%08xh, %08xh, %08xh) not implemented\n",
-           buf,
-           bufsize,
-           fmt));
-
-  return 0;
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.870
- * Status    :
- *
- * Author    : Jens Wiessner
- *****************************************************************************/
-
-int  CDECL NTDLL__snwprintf( wchar_t *buf, size_t bufsize, const wchar_t *fmt, ... )
-{
-  dprintf(("NTDLL: _snwprintf(%08xh, %08xh, %08xh) not implemented\n",
-           buf,
-           bufsize,
-           fmt));
-
-  return 0;
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.871
- * Status    :
- *
- * Author    : Jens Wiessner
- *****************************************************************************/
-
-void CDECL NTDLL__splitpath( const char *path, char *drive, char *dir, char *fname, char *ext )
-{
-	dprintf(("NTDLL: _splitpath"));
-
-	char *tmp_drive;
-	char *tmp_dir;
-	char *tmp_ext;
-
-	tmp_drive = (char *)strchr(path,':');
-	if ( tmp_drive != (char *)NULL ) {
-		strncpy(drive,tmp_drive-1,1);
-		*(drive+1) = 0;
-	}
-	else {
-		*drive = 0;
-		tmp_drive = (char *)path;
-	}
-
-	tmp_dir = (char *)strrchr(path,'\\');
-	if( tmp_dir != NULL && tmp_dir != tmp_drive + 1 ) {
-		strncpy(dir,tmp_drive+1,tmp_dir - tmp_drive);
-		*(dir + (tmp_dir - tmp_drive)) = 0;
-	}
-	else 	
-		*dir =0;
-
-	tmp_ext = ( char *)strrchr(path,'.');
-	if ( tmp_ext != NULL ) {
-		strcpy(ext,tmp_ext);
-	}
-	else
-		*ext = 0;
-    if ( tmp_dir != NULL ) {
-		strncpy(fname,tmp_dir+1,tmp_ext - tmp_dir - 1);
-		*(fname + (tmp_ext - tmp_dir -1)) = 0;
-	}
-	else
-		strncpy(fname,path,tmp_ext - path);
-
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.872
- * Status    :
- *
- * Author    : Jens Wiessner
- *****************************************************************************/
-
-void CDECL NTDLL__strcmpi( LPCSTR s1, LPCSTR s2 )
-{
-  dprintf(("NTDLL: _strcmpi(%08xh, %08xh)\n",
-           s1,
-           s2));
-
-  lstrcmpiA( s1, s2 );
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.874
- * Status    :
- *
- * Author    : Jens Wiessner
- *****************************************************************************/
-
-CHAR * CDECL NTDLL__strlwr(char *x)
-{
-  char *y =x;
-
-  dprintf(("NTDLL: _strlwr got %s\n", x));
-  while (*y) {
-    if ((*y > 0x40) && (*y< 0x5b))
-      *y = *y + 0x20;
-    y++;
-  }
-  dprintf(("   returned %s\n", x));
-		
-  return x;
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.875
- * Status    :
- *
- * Author    : Jens Wiessner
- *****************************************************************************/
-
-int  CDECL NTDLL__strnicmp( LPCSTR s1, LPCSTR s2, INT n )
-{
-  dprintf(("NTDLL: _strnicmp (%s,%s,%d)\n",
-           s1,
-           s2,
-           n));
-
-  // @@@PH: sure it's not a UNICODE API?
-  return (lstrncmpiA(s1,s2,n));
-
-/*
-  if (n == 0)
-    return 0;
-  do {
-    if (toupper(*s1) != toupper(*s2++))
-      return toupper(*(unsigned const char *)s1) - toupper(*(unsigned const char *)--s2);
-    if (*s1++ == 0)
-      break;
-  } while (--n != 0);
-  return 0;
-*/
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.876
- * Status    :
- *
- * Author    : Jens Wiessner
- *****************************************************************************/
-
-LPSTR CDECL NTDLL__strupr(LPSTR x)
-{
-  dprintf(("NTDLL: _strupr(%s)\n",
-           x));
-
-  LPSTR y=x;
-
-  while (*y)
-  {
-    *y=toupper(*y);
-    y++;
-  }
-  return x;
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.877
- * Status    :
- *
- * Author    : Jens Wiessner
- *****************************************************************************/
-
-LPSTR  CDECL NTDLL__ultoa(long x,LPSTR buf,INT radix)
-{
-    return ultoa(x,buf,radix);
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.878
- * Status    :
- *
- * Author    : Jens Wiessner
- *****************************************************************************/
-
-int CDECL NTDLL__vsnprintf( char *s, size_t bufsize, const char *format, va_list arg )
-{
-  dprintf(("NTDLL: _ultoa(%08xh, %08xh, %08xh)\n",
-           s,
-           bufsize,
-           format));
-
-  return wvsnprintfA(s, bufsize, format, arg);
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.897
- * Status    :
- *
- * Author    : Jens Wiessner
- *****************************************************************************/
-
-int CDECL NTDLL_iswalpha(wint_t i)
-{
-  dprintf(("NTDLL: iswalpha(%08xh)\n", i));
-
-  return (iswalpha(i));
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.898
- * Status    :
- *
- * Author    : Jens Wiessner
- *****************************************************************************/
-
-int CDECL NTDLL_iswctype(wint_t i, wctype_t wct)
-{
-  dprintf(("NTDLL: iswctype(%08xh, %08xh)\n", i, wct));
-
-  return (iswctype(i, wct));
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.899
- * Status    :
- *
- * Author    : Jens Wiessner
- *****************************************************************************/
-
-int CDECL NTDLL_isxdigit(int i)
-{
-  dprintf(("NTDLL: isxdigit(%08xh)\n", i));
-
-  return (isxdigit(i));
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.900
- * Status    :
- *
- * Author    : Jens Wiessner
- *****************************************************************************/
-
-long int CDECL NTDLL_labs( long int j )
-{
-  dprintf(("NTDLL: labs(%08xh)\n", j));
-
-  return (labs(j));
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.901
- * Status    :
- *
- * Author    : Jens Wiessner
- *****************************************************************************/
-
-double CDECL NTDLL_log( double x )
-{
-  dprintf(("NTDLL: log(%08xh)\n", x));
-  return (log(x));
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.902
- * Status    :
- *
- * Author    : Jens Wiessner
- *****************************************************************************/
-
-size_t CDECL NTDLL_mbstowcs( wchar_t *pwcs, const char *s, size_t n )
-{
-      dprintf(("NTDLL: mbstowcs(%08xh, %08xh, %08xh)\n", pwcs, s, n));
-      return (mbstowcs(pwcs, s, n));
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.903
- * Status    :
- *
- * Author    : Jens Wiessner
- *****************************************************************************/
-
-void * CDECL NTDLL_memchr( const void *s, int c, size_t n )
-{
-    dprintf(("NTDLL: memchr(%08xh, %08xh, %08xh)\n", s, c, n));
-    return memchr( s, c, n );
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.904
- * Status    :
- *
- * Author    : Jens Wiessner
- *****************************************************************************/
-
-int CDECL NTDLL_memcmp( const void * c1, const void * c2, size_t n )
-{
-    dprintf(("NTDLL: memcmp(%08xh, %08xh, %08xh)\n", c1, c2, n));
-    return memcmp( c1, c2, n );
-}
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.905
- * Status    :
- *
- * Author    : Jens Wiessner
- *****************************************************************************/
-
-void * CDECL NTDLL_memcpy( void *s1, const void *s2, size_t n )
-{
-    dprintf(("NTDLL: memcpy(%08xh, %08xh, %08xh)\n", s1, s2, n));
-    return memcpy( s1, s2, n );
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.907
- * Status    :
- *
- * Author    : Jens Wiessner
- *****************************************************************************/
-
-void * CDECL NTDLL_memset( void *s, int i, size_t n )
-{
-    dprintf(("NTDLL: memset(%08xh, %08xh, %08xh)\n", s, i, n));
-    return memset( s, i, n );
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.908
- * Status    :
- *
- * Author    : Jens Wiessner
- *****************************************************************************/
-
-double CDECL NTDLL_pow( double x, double y )	
-{
-    dprintf(("NTDLL: pow(%08xh, %08xh)\n",x, y));
-    return pow( x, y );
-}
-
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.910
- * Status    :
- *
- * Author    : Jens Wiessner
- *****************************************************************************/
-
-double CDECL NTDLL_sin( double x )
-{
-  dprintf(("NTDLL: sin(%08xh)\n", x));
-  return (sin(x));
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.912
- * Status    :
- *
- * Author    : Jens Wiessner
- *****************************************************************************/
-
-double CDECL NTDLL_sqrt( double x )
-{
-  dprintf(("NTDLL: sqrt(%08xh)\n", x));
-  return (sqrt(x));
-}
-
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.913
- * Status    :
- *
- * Author    : Jens Wiessner
- *****************************************************************************/
-
-int CDECL NTDLL_sscanf( const char *s, const char *format, ... )
-{
-  dprintf(("NTDLL: sscanf(%08xh, %08xh) not implemented.\n"));
-  return 0;
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.933
- * Status    :
- *
- * Author    : Jens Wiessner
- *****************************************************************************/
-
-int CDECL NTDLL_vsprintf( char *s, const char *format, va_list arg )
-{
-  dprintf(("NTDLL: vsprintf(%08xh, %08xh)\n", s, format));
-  return (vsprintf(s, format, arg));
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.947
- * Status    :
- *
- * Author    : Jens Wiessner
- *****************************************************************************/
-
-wchar_t * CDECL NTDLL_wcstok( wchar_t *s1, const wchar_t *s2, wchar_t **ptr )
-{
-  dprintf(("NTDLL: wcstok(%08xh, %08xh, %08xh)\n",s1,s2,ptr));
-  return (wcstok(s1, s2, ptr));
-}
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.948
- * Status    :
- *
- * Author    : Jens Wiessner
- *****************************************************************************/
-
-long int CDECL NTDLL_wcstol( const wchar_t *s1, wchar_t **s2, int i )
-{
-  dprintf(("NTDLL: wcstol(%08xh, %08xh, %08xh)\n",s1,s2,i));
-  return (wcstol(s1, s2, i));
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.949
- * Status    :
- *
- * Author    : Jens Wiessner
- *****************************************************************************/
-
-size_t CDECL NTDLL_wcstombs( char *s, const wchar_t *pwcs, size_t n )
-{
-  dprintf(("NTDLL: wcstombs(%08xh, %08xh, %08xh)\n",s,pwcs,n));
-  return (wcstombs(s, pwcs, n));
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.950
- * Status    :
- *
- * Author    : Jens Wiessner
- *****************************************************************************/
-
-unsigned long int CDECL NTDLL_wcstoul( const wchar_t *s1, wchar_t **s2, int i )
-{
-  dprintf(("NTDLL: wcstoul(%08xh, %08xh, %08xh)\n",s1,s2,i));
-  return (wcstoul(s1, s2, i));
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.983
- * Status    :
- *
- * Author    : Jens Wiessner
- *****************************************************************************/
-
-int CDECL NTDLL__wtoi( const wchar_t *s )
-{
-  dprintf(("NTDLL: _wtoi(%08xh) not implemented.\n"));
-  return 0;
-}
-
-
-/*****************************************************************************
- * Name      :
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : NTDLL.984
- * Status    :
- *
- * Author    : Jens Wiessner
- *****************************************************************************/
-
-long int CDECL NTDLL__wtol( const wchar_t *s )
-{
-  dprintf(("NTDLL: _wtol(%08xh) not implemented.\n"));
-  return 0;
-}
Index: trunk/src/NTDLL/makefile
===================================================================
--- trunk/src/NTDLL/makefile	(revision 2176)
+++ trunk/src/NTDLL/makefile	(revision 2177)
@@ -1,3 +1,3 @@
-# $Id: makefile,v 1.15 1999-12-20 11:47:01 sandervl Exp $
+# $Id: makefile,v 1.16 1999-12-21 12:24:22 sandervl Exp $
 
 #
@@ -31,9 +31,8 @@
        sync.obj\
        initterm.obj\
-       crt.obj\
        time.obj\
        unknown.obj\
        arith64.obj\
-       regfunc.obj qsort.obj
+       regfunc.obj 
 
 
@@ -44,5 +43,5 @@
 
 $(TARGET).dll: $(OBJS) $(TARGET).def
-        $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) sbsstub.obj $(TARGET).def $(PDWIN32_LIB)\kernel32.lib $(PDWIN32_LIB)\user32.lib $(PDWIN32_LIB)/kernel32.lib $(PDWIN32_LIB)/odincrt.lib OS2386.LIB $(RTLLIB_O)
+        $(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) sbsstub.obj $(TARGET).def $(PDWIN32_LIB)\kernel32.lib $(PDWIN32_LIB)\user32.lib $(PDWIN32_LIB)/kernel32.lib $(PDWIN32_LIB)/crtdll.lib $(PDWIN32_LIB)/odincrt.lib OS2386.LIB $(RTLLIB_O)
 # PMWINX.LIB LIBULS.LIB LIBCONV.LIB
         $(CP) $@ $(PDWIN32_BIN)
Index: trunk/src/NTDLL/ntdll.def
===================================================================
--- trunk/src/NTDLL/ntdll.def	(revision 2176)
+++ trunk/src/NTDLL/ntdll.def	(revision 2177)
@@ -1,3 +1,3 @@
-; $Id: ntdll.def,v 1.30 1999-12-20 11:47:01 sandervl Exp $
+; $Id: ntdll.def,v 1.31 1999-12-21 12:24:22 sandervl Exp $
 
 ;Created by BLAST for IBM's compiler
@@ -360,96 +360,96 @@
 ; Note: CDECL does not decorate the function names with parameter bytes!
 
-    _CIpow                       = _NTDLL__CIpow                     @349
-    _ftol                        = _NTDLL__ftol                      @864
-    _ltoa                        = _NTDLL__ltoa                      @866
-    _memicmp                     = _NTDLL__memicmp                   @868
-    _snprintf                    = _NTDLL__snprintf                  @869
-    _snwprintf                   = _NTDLL__snwprintf                 @870
-    _splitpath                   = _NTDLL__splitpath                 @871
-    _strcmpi                     = _NTDLL__strcmpi                   @872
-    _strlwr                      = _NTDLL__strlwr                    @874
-    _strnicmp                    = _NTDLL__strnicmp                  @875
-    _strupr                      = _NTDLL__strupr                    @876
-    _ultoa                       = _NTDLL__ultoa                     @877
-    _vsnprintf                   = _NTDLL__vsnprintf                 @878
-    _wcsicmp                      = _OS2_wcsicmp                      @879
-    _wcslwr                       = _OS2_wcslwr                       @880
-    _wcsnicmp                     = _OS2_wcsnicmp                     @881
-    _wcsupr                       = _OS2_wcsupr                       @882
-    abs                           = _OS2abs                           @883
-    atan                          = _OS2atan                          @884
-    atoi                          = _OS2atoi                          @885
-    atol                          = _OS2atol                          @886
-    ceil                          = _OS2ceil                          @887
-    cos                           = _OS2cos                           @888
-    fabs                          = _OS2fabs                          @889
-    floor                         = _OS2floor                         @890
-    isalpha                       = _OS2isalpha                       @891
-    isdigit                       = _OS2isdigit                       @892
-    islower                       = _OS2islower                       @893
-    isprint                       = _OS2isprint                       @894
-    isspace                       = _OS2isspace                       @895
-    isupper                       = _OS2isupper                       @896
-    iswalpha                     = _NTDLL_iswalpha                   @897
-    iswctype                     = _NTDLL_iswctype                   @898
-    isxdigit                     = _NTDLL_isxdigit                   @899
-
-    labs                          = _NTDLL_labs                              @900
-    log                           = _NTDLL_log                       @901
-    mbstowcs                      = _NTDLL_mbstowcs                  @902
-    memchr                        = _NTDLL_memchr                    @903
-    memcmp                        = _NTDLL_memcmp                    @904
-    memcpy                        = _NTDLL_memcpy                    @905
-    memmove                       = _OS2memmove                              @906
-    memset                        = _NTDLL_memset                    @907
-    pow                           = _NTDLL_pow                       @908
-    qsort                         = _qsort                           @909
-    sin                           = _NTDLL_sin                       @910
-    sprintf                       = _OS2sprintf                       @911
-    sqrt                         = _NTDLL_sqrt                       @912
-    sscanf                       = _NTDLL_sscanf                     @913
-    strcat                        = _OS2strcat                        @914
-    strchr                        = _OS2strchr                        @915
-    strcmp                        = _OS2strcmp                        @916
-    strcpy                        = _OS2strcpy                        @917
-    strcspn                       = _OS2strcspn                       @918
-    strlen                        = _OS2strlen                        @919
-    strncat                       = _OS2strcat                        @920
-    strncmp                       = _OS2strncmp                       @921
-    strncpy                       = _OS2strncpy                       @922
-    strpbrk                       = _OS2strpbrk                       @923
-    strrchr                       = _OS2strrchr                       @924
-    strspn                        = _OS2strspn                        @925
-    strstr                        = _OS2strstr                        @926
-    swprintf                      = _OS2swprintf                      @927
-    tan                           = _OS2tan                           @928
-    toupper                       = _OS2toupper                       @929
-    tolower                       = _OS2tolower                       @930
-    towlower                      = _OS2towlower                      @931
-    towupper                      = _OS2towupper                      @932
-    vsprintf                     = _NTDLL_vsprintf                   @933
-    wcscat                        = _OS2wcscat                        @934
-    wcschr                        = _OS2wcschr                        @935
-    wcscmp                        = _OS2wcscmp                        @936
-    wcscpy                        = _OS2wcscpy                        @937
-    wcscspn                       = _OS2wcscspn
-    wcslen                        = _OS2wcslen                        @939
-    wcsncat                       = _OS2wcscat                        @940
-    wcsncmp                       = _OS2wcsncmp                       @941
-    wcsncpy                       = _OS2wcsncpy                       @942
-    wcspbrk                       = _OS2wcspbrk                       @943
-    wcsrchr                       = _OS2wcsrchr                       @944
-    wcsspn                        = _OS2wcsspn                        @945
-    wcsstr                        = _OS2wcsstr
-    wcstok                        = _NTDLL_wcstok                     @947
-    wcstol                        = _NTDLL_wcstol                     @948
-    wcstombs                      = _NTDLL_wcstombs                   @949
-    wcstoul                       = _NTDLL_wcstoul                    @950
-
-    _wtoi                        = _NTDLL__wtoi                      @983
-    _wtol                        = _NTDLL__wtol                      @984
-
-    _stricmp                      = _OS2_stricmp
-    _itoa                         = _OS2_itoa
-    _itow                         = _OS2_itow
-
+    _CIpow                        = _CRTDLL__CIpow                     @349
+    _ftol                         = _CRTDLL__ftol                      @864
+    _ltoa                         = _CRTDLL__ltoa                      @866
+    _memicmp                      = _CRTDLL__memicmp                   @868
+    _snprintf                     = _CRTDLL__snprintf                  @869
+    _snwprintf                    = _CRTDLL__snwprintf                 @870
+    _splitpath                    = _CRTDLL__splitpath                 @871
+    _strcmpi                      = _CRTDLL__strcmpi                   @872
+    _strlwr                       = _CRTDLL__strlwr                    @874
+    _strnicmp                     = _CRTDLL__strnicmp                  @875
+    _strupr                       = _CRTDLL__strupr                    @876
+    _ultoa                        = _CRTDLL__ultoa                     @877
+    _vsnprintf                    = _CRTDLL__vsnprintf                 @878
+    _wcsicmp                      = _CRTDLL__wcsicmp                      @879
+    _wcslwr                       = _CRTDLL__wcslwr                       @880
+    _wcsnicmp                     = _CRTDLL__wcsnicmp                     @881
+    _wcsupr                       = _CRTDLL__wcsupr                       @882
+    abs                           = _CRTDLL_abs                           @883
+    atan                          = _CRTDLL_atan                          @884
+    atoi                          = _CRTDLL_atoi                          @885
+    atol                          = _CRTDLL_atol                          @886
+    ceil                          = _CRTDLL_ceil                          @887
+    cos                           = _CRTDLL_cos                           @888
+    fabs                          = _CRTDLL_fabs                          @889
+    floor                         = _CRTDLL_floor                         @890
+    isalpha                       = _CRTDLL_isalpha                       @891
+    isdigit                       = _CRTDLL_isdigit                       @892
+    islower                       = _CRTDLL_islower                       @893
+    isprint                       = _CRTDLL_isprint                       @894
+    isspace                       = _CRTDLL_isspace                       @895
+    isupper                       = _CRTDLL_isupper                       @896
+    iswalpha                      = _CRTDLL_iswalpha                   @897
+    iswctype                      = _CRTDLL_iswctype                   @898
+    isxdigit                      = _CRTDLL_isxdigit                   @899
+
+    labs                          = _CRTDLL_labs                              @900
+    log                           = _CRTDLL_log                       @901
+    mbstowcs                      = _CRTDLL_mbstowcs                  @902
+    memchr                        = _CRTDLL_memchr                    @903
+    memcmp                        = _CRTDLL_memcmp                    @904
+    memcpy                        = _CRTDLL_memcpy                    @905
+    memmove                       = _CRTDLL_memmove                              @906
+    memset                        = _CRTDLL_memset                    @907
+    pow                           = _CRTDLL_pow                       @908
+    qsort                         = _CRTDLL_qsort                           @909
+    sin                           = _CRTDLL_sin                       @910
+    sprintf                       = _CRTDLL_sprintf                       @911
+    sqrt                          = _CRTDLL_sqrt                       @912
+    sscanf                        = _CRTDLL_sscanf                     @913
+    strcat                        = _CRTDLL_strcat                        @914
+    strchr                        = _CRTDLL_strchr                        @915
+    strcmp                        = _CRTDLL_strcmp                        @916
+    strcpy                        = _CRTDLL_strcpy                        @917
+    strcspn                       = _CRTDLL_strcspn                       @918
+    strlen                        = _CRTDLL_strlen                        @919
+    strncat                       = _CRTDLL_strcat                        @920
+    strncmp                       = _CRTDLL_strncmp                       @921
+    strncpy                       = _CRTDLL_strncpy                       @922
+    strpbrk                       = _CRTDLL_strpbrk                       @923
+    strrchr                       = _CRTDLL_strrchr                       @924
+    strspn                        = _CRTDLL_strspn                        @925
+    strstr                        = _CRTDLL_strstr                        @926
+    swprintf                      = _CRTDLL_swprintf                      @927
+    tan                           = _CRTDLL_tan                           @928
+    toupper                       = _CRTDLL_toupper                       @929
+    tolower                       = _CRTDLL_tolower                       @930
+    towlower                      = _CRTDLL_towlower                      @931
+    towupper                      = _CRTDLL_towupper                      @932
+    vsprintf                      = _CRTDLL_vsprintf                   @933
+    wcscat                        = _CRTDLL_wcscat                        @934
+    wcschr                        = _CRTDLL_wcschr                        @935
+    wcscmp                        = _CRTDLL_wcscmp                        @936
+    wcscpy                        = _CRTDLL_wcscpy                        @937
+    wcscspn                       = _CRTDLL_wcscspn
+    wcslen                        = _CRTDLL_wcslen                        @939
+    wcsncat                       = _CRTDLL_wcscat                        @940
+    wcsncmp                       = _CRTDLL_wcsncmp                       @941
+    wcsncpy                       = _CRTDLL_wcsncpy                       @942
+    wcspbrk                       = _CRTDLL_wcspbrk                       @943
+    wcsrchr                       = _CRTDLL_wcsrchr                       @944
+    wcsspn                        = _CRTDLL_wcsspn                        @945
+    wcsstr                        = _CRTDLL_wcsstr
+    wcstok                        = _CRTDLL_wcstok                     @947
+    wcstol                        = _CRTDLL_wcstol                     @948
+    wcstombs                      = _CRTDLL_wcstombs                   @949
+    wcstoul                       = _CRTDLL_wcstoul                    @950
+
+    _wtoi                         = _CRTDLL__wtoi                      @983
+    _wtol                         = _CRTDLL__wtol                      @984
+
+    _stricmp                      = _CRTDLL__stricmp
+    _itoa                         = _CRTDLL__itoa
+    _itow                         = _CRTDLL__itow
+
Index: trunk/src/NTDLL/ntdllexp.def
===================================================================
--- trunk/src/NTDLL/ntdllexp.def	(revision 2176)
+++ trunk/src/NTDLL/ntdllexp.def	(revision 2177)
@@ -231,2 +231,6 @@
     _RtlConvertLongToLargeInteger@4           @316
     _RtlConvertUlongToLargeInteger@4          @320
+    _RtlDeleteCriticalSection@4               @327
+    _RtlLeaveCriticalSection@4                @426
+    _RtlEnterCriticalSection@4                @344
+    _RtlInitializeCriticalSection@4           @406
Index: trunk/src/NTDLL/qsort.c
===================================================================
--- trunk/src/NTDLL/qsort.c	(revision 2176)
+++ 	(revision )
@@ -1,86 +1,0 @@
-/* qsort.c (emx+gcc) -- Copyright (c) 1990-1994 by Eberhard Mattes */
-
-#include <odin.h>
-#include <memory.h>
-#include <string.h>
-
- void _memswap (void *s1, void *s2, size_t n)
- {
-   char *c1, *c2, c;
-   int *i1, *i2, i;
- 
-   i1 = s1; i2 = s2;
-   while (n >= sizeof (int))
-     {
-       i = *i1; *i1++ = *i2; *i2++ = i;
-       n -= sizeof (int);
-       }
-   c1 = (char *)i1; c2 = (char *)i2;
-   while (n >= 1)
-     {
-       c = *c1; *c1++ = *c2; *c2++ = c;
-       --n;
-     }
- }
-
-static void qsort1 (char *l, char *r, size_t width,
-                    int (* CDECL compare)(const void *x1, const void *x2));
-
-void CDECL qsort (void *base, size_t num, size_t width,
-                  int (*CDECL compare)(const void *x1, const void *x2))
-{
-  if (width > 0 && num > 1 && base != 0)
-    qsort1 ((char *)base, (char *)base+(num-1)*width, width, compare);
-}
-
-
-static void qsort1 (char *l, char *r, size_t width,
-                    int (* CDECL compare)(const void *x1, const void *x2))
-{
-  char *i, *j, *x;
-
-redo:
-  i = l; j = r;
-  x = l + width * (((r-l) / width) >> 1);
-  do
-    {
-      while (i != x && compare ((void *)i, (void *)x) < 0)
-        i += width;
-      while (j != x && compare ((void *)j, (void *)x) > 0)
-        j -= width;
-      if (i < j)
-        {
-          _memswap (i, j, width);
-          if (x == i)
-            x = j;
-          else if (x == j)
-            x = i;
-        }
-      if (i <= j)
-        {
-          i += width;           /* (almost) no danger */
-          if (j > l)
-            j -= width;         /* avoid wrap-around */
-        }
-    } while (i <= j);
-  if (j-l < r-i)
-    {
-      if (l < j)
-        qsort1 (l, j, width, compare);
-      if (i < r)
-        {
-          l = i;
-          goto redo;            /* qsort1 (i, r, width, compare) */
-        }
-    }
-  else
-    {
-      if (i < r)
-        qsort1 (i, r, width, compare);
-      if (l < j)
-        {
-          r = j;                /* qsort1 (l, j, width, compare) */
-          goto redo;
-        }
-    }
-}
Index: trunk/src/crtdll/asmhlp.asm
===================================================================
--- trunk/src/crtdll/asmhlp.asm	(revision 2177)
+++ trunk/src/crtdll/asmhlp.asm	(revision 2177)
@@ -0,0 +1,18 @@
+; $Id: asmhlp.asm,v 1.1 1999-12-21 12:27:11 sandervl Exp $
+
+.586P
+               NAME    asmhlp
+
+CODE32         SEGMENT DWORD PUBLIC USE32 'CODE'
+               align 4
+
+PUBLIC 		_POP_FPU
+_POP_FPU proc near
+	mov	eax, [esp+4]
+	fstp	qword ptr [eax]
+	ret
+_POP_FPU endp
+
+CODE32          ENDS
+
+                END
Index: trunk/src/crtdll/asmhlp.h
===================================================================
--- trunk/src/crtdll/asmhlp.h	(revision 2177)
+++ trunk/src/crtdll/asmhlp.h	(revision 2177)
@@ -0,0 +1,7 @@
+// $Id: asmhlp.h,v 1.1 1999-12-21 12:27:11 sandervl Exp $
+#ifndef __ASMHLP_H__
+#define __ASMHLP_H__
+
+void CDECL POP_FPU(double &fpval);
+
+#endif
Index: trunk/src/crtdll/bsearch.c
===================================================================
--- trunk/src/crtdll/bsearch.c	(revision 2176)
+++ trunk/src/crtdll/bsearch.c	(revision 2177)
@@ -1,3 +1,3 @@
-/* $Id: bsearch.c,v 1.1 1999-12-20 11:09:41 sandervl Exp $ */
+/* $Id: bsearch.c,v 1.2 1999-12-21 12:27:11 sandervl Exp $ */
 /* bsearch.c (emx+gcc) -- Copyright (c) 1990-1995 by Eberhard Mattes */
 
@@ -5,5 +5,9 @@
 #include <builtin.h>
 
-void *CDECL bsearch (const void *key, const void *base, size_t num, size_t width,
+/*********************************************************************
+ *                  bsearch	(CRTDLL.346)
+ */
+
+void *CDECL CRTDLL_bsearch (const void *key, const void *base, size_t num, size_t width,
                      int (* CDECL compare)(const void *key, const void *element))
 {
Index: trunk/src/crtdll/crt.cpp
===================================================================
--- trunk/src/crtdll/crt.cpp	(revision 2177)
+++ trunk/src/crtdll/crt.cpp	(revision 2177)
@@ -0,0 +1,2052 @@
+/* $Id: crt.cpp,v 1.1 1999-12-21 12:27:11 sandervl Exp $ */
+
+/*
+ * Project Odin Software License can be found in LICENSE.TXT
+ * Win32 NT Runtime / NTDLL for OS/2
+ * Copyright 1999 Patrick Haller (phaller@gmx.net)
+ */
+
+/****************************************************************************
+ * Include                                                                  *
+ ****************************************************************************/
+
+#include <odin.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <math.h>
+#include <ctype.h>
+#include <wchar.h>
+#include <wcstr.h>
+#include <wctype.h>
+
+#include <os2win.h>
+#include <misc.h>
+
+#include <ntdef.h>
+#include <winnt.h>
+#include "winbase.h"                     /* fixme: should be taken out sometimes */
+#include <heapstring.h>
+#include "asmhlp.h"
+
+
+/****************************************************************************
+ * Local Prototypes                                                         *
+ ****************************************************************************/
+
+
+LPWSTR CDECL CRTDLL__wcsupr(LPWSTR str);
+int    CDECL CRTDLL__wcsnicmp(LPWSTR str1, LPWSTR str2, long l);
+
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.879
+ * Status    :
+ *
+ * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
+ *****************************************************************************/
+
+int CDECL CRTDLL__wcsicmp(LPWSTR str1, LPWSTR str2)
+{
+  dprintf(("CRTDLL: _wcsicmp(%08xh,%08xh)\n",
+           str1,
+           str2));
+
+  return (CRTDLL__wcsnicmp(str1,
+                       str2,
+                       wcslen((wchar_t*) str1)));
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.880
+ * Status    :
+ *
+ * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
+ *****************************************************************************/
+
+LPWSTR CDECL CRTDLL__wcslwr(LPWSTR str)
+{
+  DWORD dwIndex;
+
+  dprintf(("CRTDLL: _wcslwr(%08xh)\n",
+           str));
+
+  for (dwIndex = wcslen((const wchar_t*)str);
+       dwIndex;
+       dwIndex--)
+  {
+    towlower(str[dwIndex]);
+  }
+
+  return (str);
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.881
+ * Status    :
+ *
+ * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
+ *****************************************************************************/
+
+int CDECL CRTDLL__wcsnicmp(LPWSTR str1, LPWSTR str2, long l)
+{
+  LPWSTR w1;
+  LPWSTR w2;
+
+  dprintf(("CRTDLL: _wcsnicmp(%08xh,%08xh,%08xh)\n",
+           str1,
+           str2,
+           l));
+
+  w1 = HEAP_strdupW(GetProcessHeap(),0,str1);
+  w2 = HEAP_strdupW(GetProcessHeap(),0,str2);
+  CRTDLL__wcsupr(w1);
+  CRTDLL__wcsupr(w2);
+
+  return (wcsncmp((wchar_t*)w1,
+                  (wchar_t*)w2,
+                  l));
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.882
+ * Status    :
+ *
+ * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
+ *****************************************************************************/
+
+LPWSTR CDECL CRTDLL__wcsupr(LPWSTR str)
+{
+  DWORD dwIndex;
+
+  dprintf(("CRTDLL: _wcsupr(%08xh)\n",
+           str));
+
+  for (dwIndex = wcslen((const wchar_t*)str);
+       dwIndex;
+       dwIndex--)
+  {
+    towupper(str[dwIndex]);
+  }
+
+  return (str);
+}
+
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.883
+ * Status    :
+ *
+ * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
+ *****************************************************************************/
+
+double CDECL CRTDLL_abs(double d)
+{
+  dprintf(("CRTDLL: abs(%f)\n",
+           d));
+
+  return (abs(d));
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.884
+ * Status    :
+ *
+ * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
+ *****************************************************************************/
+
+double CDECL CRTDLL_atan(double d)
+{
+  dprintf(("CRTDLL: atan(%f)\n",
+           d));
+
+  return (atan(d));
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.885
+ * Status    :
+ *
+ * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
+ *****************************************************************************/
+
+int CDECL CRTDLL_atoi(LPSTR str)
+{
+  dprintf(("CRTDLL: atoi(%s)\n",
+           str));
+
+  return (atoi(str));
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.886
+ * Status    :
+ *
+ * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
+ *****************************************************************************/
+
+long CDECL CRTDLL_atol(LPSTR str)
+{
+  dprintf(("CRTDLL: atol(%s)\n",
+           str));
+
+  return (atol(str));
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.887
+ * Status    :
+ *
+ * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
+ *****************************************************************************/
+
+double CDECL CRTDLL_ceil(double d)
+{
+  dprintf(("CRTDLL: ceil(%f)\n",
+           d));
+
+  return (ceil(d));
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.888
+ * Status    :
+ *
+ * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
+ *****************************************************************************/
+
+double CDECL CRTDLL_cos(double d)
+{
+  dprintf(("CRTDLL: cos(%f)\n",
+           d));
+
+  return (cos(d));
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.889
+ * Status    :
+ *
+ * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
+ *****************************************************************************/
+
+double CDECL CRTDLL_fabs(double d)
+{
+  dprintf(("CRTDLL: fabs(%f)\n",
+           d));
+
+  return (fabs(d));
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.890
+ * Status    :
+ *
+ * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
+ *****************************************************************************/
+
+double CDECL CRTDLL_floor(double d)
+{
+  dprintf(("CRTDLL: floor(%f)\n",
+           d));
+
+  return (floor(d));
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.891
+ * Status    :
+ *
+ * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
+ *****************************************************************************/
+
+int CDECL CRTDLL_isalpha(int i)
+{
+  dprintf(("CRTDLL: isalpha(%08xh)\n",
+           i));
+
+  return (isalpha(i));
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.892
+ * Status    :
+ *
+ * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
+ *****************************************************************************/
+
+int CDECL CRTDLL_isdigit(int i)
+{
+  dprintf(("CRTDLL: isdigit(%08xh)\n",
+           i));
+
+  return (isdigit(i));
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.893
+ * Status    :
+ *
+ * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
+ *****************************************************************************/
+
+int CDECL CRTDLL_islower(int i)
+{
+  dprintf(("CRTDLL: islower(%08xh)\n",
+           i));
+
+  return (islower(i));
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.894
+ * Status    :
+ *
+ * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
+ *****************************************************************************/
+
+int CDECL CRTDLL_isprint(int i)
+{
+  dprintf(("CRTDLL: isprint(%08xh)\n",
+           i));
+
+  return (isprint(i));
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.895
+ * Status    :
+ *
+ * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
+ *****************************************************************************/
+
+int CDECL CRTDLL_isspace(int i)
+{
+  dprintf(("CRTDLL: isspace(%08xh)\n",
+           i));
+
+  return (isspace(i));
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.896
+ * Status    :
+ *
+ * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
+ *****************************************************************************/
+
+int CDECL CRTDLL_isupper(int i)
+{
+  dprintf(("CRTDLL: isupper(%08xh)\n",
+           i));
+
+  return (isupper(i));
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.911
+ * Status    :
+ *
+ * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
+ *****************************************************************************/
+
+LPSTR CDECL CRTDLL_sprintf(LPSTR lpstrBuffer,
+                       LPSTR lpstrFormat,
+                       ...)
+{
+  va_list argptr;                          /* -> variable argument list */
+
+  dprintf(("CRTDLL: sprintf(%08xh,%s)\n",
+           lpstrBuffer,
+           lpstrFormat));
+
+  va_start(argptr,
+           lpstrFormat);                   /* get pointer to argument list */
+  vsprintf(lpstrBuffer,
+           lpstrFormat,
+           argptr);
+  va_end(argptr);                          /* done with variable arguments */
+
+  return (lpstrBuffer);
+}
+
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.914
+ * Status    :
+ *
+ * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
+ *****************************************************************************/
+
+LPSTR CDECL CRTDLL_strcat(      LPSTR str1,
+                      const LPSTR str2)
+{
+  dprintf(("CRTDLL: strcat\n"));
+
+  return (strcat(str1, str2));
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.915
+ * Status    :
+ *
+ * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
+ *****************************************************************************/
+
+LPSTR CDECL CRTDLL_strchr(const LPSTR str,
+                       int         i)
+{
+  dprintf(("CRTDLL: strchr(%s,%08xh)\n",
+           str,
+           i));
+
+  return (strchr(str, i));
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.916
+ * Status    :
+ *
+ * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
+ *****************************************************************************/
+
+int CDECL CRTDLL_strcmp(const LPSTR str1,
+                      const LPSTR str2)
+{
+  dprintf(("CRTDLL: strcmp(%s,%s)\n",
+           str1,
+           str2));
+
+  return (strcmp(str1, str2));
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.?
+ * Status    :
+ *
+ * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
+ *****************************************************************************/
+
+int CDECL CRTDLL__stricmp(const LPSTR str1,
+                      const LPSTR str2)
+{
+  dprintf(("CRTDLL: _stricmp(%s,%s)\n",
+           str1,
+           str2));
+
+  return (stricmp(str1, str2));
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.917
+ * Status    :
+ *
+ * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
+ *****************************************************************************/
+
+LPSTR CDECL CRTDLL_strcpy(      LPSTR str1,
+                       const LPSTR str2)
+{
+  dprintf(("CRTDLL: strcpy\n"));
+
+  return (strcpy(str1, str2));
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.918
+ * Status    :
+ *
+ * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
+ *****************************************************************************/
+
+size_t CDECL CRTDLL_strcspn(const LPSTR str1,
+                                LPSTR str2)
+{
+  dprintf(("CRTDLL: strcspn(%s,%s)\n",
+           str1,
+           str2));
+
+  return (strcspn(str1, str2));
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.919
+ * Status    :
+ *
+ * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
+ *****************************************************************************/
+
+size_t CDECL CRTDLL_strlen(const LPSTR str)
+{
+  dprintf(("CRTDLL: strlen(%s)\n",
+           str));
+
+  return (strlen(str));
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.920
+ * Status    :
+ *
+ * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
+ *****************************************************************************/
+
+LPSTR CDECL CRTDLL_strncat(      LPSTR str1,
+                        const LPSTR str2,
+                        size_t      i)
+{
+  dprintf(("CRTDLL: strncat(%s,%s,%08xh)\n",
+           str1,
+           str2,
+           i));
+
+  return (strncat(str1, str2, i));
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.921
+ * Status    :
+ *
+ * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
+ *****************************************************************************/
+
+int CDECL CRTDLL_strncmp(const LPSTR str1,
+                       const LPSTR str2,
+                       size_t      i)
+{
+  dprintf(("CRTDLL: strncmp(%s,%s,%08xh)\n",
+           str1,
+           str2,
+           i));
+
+  return (strncmp(str1, str2, i));
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.922
+ * Status    :
+ *
+ * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
+ *****************************************************************************/
+
+LPSTR CDECL CRTDLL_strncpy(const LPSTR str1,
+                        const LPSTR str2,
+                        size_t      i)
+{
+  dprintf(("CRTDLL: strncpy(%s,%s,%08xh)\n",
+           str1,
+           str2,
+           i));
+
+  return (strncpy(str1, str2, i));
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.923
+ * Status    :
+ *
+ * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
+ *****************************************************************************/
+
+LPSTR CDECL CRTDLL_strpbrk(const LPSTR str1,
+                      const LPSTR str2)
+{
+  dprintf(("CRTDLL: strpbrk(%s,%s)\n",
+           str1,
+           str2));
+
+  return (strpbrk(str1, str2));
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.924
+ * Status    :
+ *
+ * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
+ *****************************************************************************/
+
+LPSTR CDECL CRTDLL_strrchr(const LPSTR str,
+                        size_t      i)
+{
+  dprintf(("CRTDLL: strrchr(%s,%08xh)\n",
+           str,
+           i));
+
+  return (strrchr(str, i));
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.925
+ * Status    :
+ *
+ * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
+ *****************************************************************************/
+
+size_t CDECL CRTDLL_strspn(const LPSTR str1,
+                       const LPSTR str2)
+{
+  dprintf(("CRTDLL: strspn(%s,%s)\n",
+           str1,
+           str2));
+
+  return (strspn(str1, str2));
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.926
+ * Status    :
+ *
+ * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
+ *****************************************************************************/
+
+LPSTR CDECL CRTDLL_strstr(const LPSTR str1,
+                       const LPSTR str2)
+{
+  dprintf(("CRTDLL: strstr(%s,%s)\n",
+           str1,
+           str2));
+
+  return (strstr(str1, str2));
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.927
+ * Status    :
+ *
+ * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
+ *****************************************************************************/
+
+int CDECL CRTDLL_swprintf(const LPWSTR str,
+                      int   i,
+                      const LPWSTR format,
+                      ...)
+{
+  va_list valist;
+  int     rc;
+
+  dprintf(("CRTDLL: swprintf(%s,%d,%s)\n",
+           str,
+           i,
+           format));
+
+  va_start( valist, format );
+  rc = vswprintf( (wchar_t*)str,
+                  i,
+                  (wchar_t*)format,
+                  valist );
+  va_end( valist );
+  return rc;
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.928
+ * Status    :
+ *
+ * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
+ *****************************************************************************/
+
+double CDECL CRTDLL_tan(double d)
+{
+  dprintf(("CRTDLL: tan(%f)\n",
+           d));
+
+  return (tan(d));
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.929
+ * Status    :
+ *
+ * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
+ *****************************************************************************/
+
+int CDECL CRTDLL_toupper(int c)
+{
+  dprintf(("CRTDLL: toupper(%c)\n",
+           c));
+
+  return (toupper(c));
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.930
+ * Status    :
+ *
+ * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
+ *****************************************************************************/
+
+int CDECL CRTDLL_tolower(int c)
+{
+  dprintf(("CRTDLL: tolower(%c)\n",
+           c));
+
+  return (tolower(c));
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.931
+ * Status    :
+ *
+ * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
+ *****************************************************************************/
+
+int CDECL CRTDLL_towupper(int c)
+{
+  dprintf(("CRTDLL: towupper(%c)\n",
+           c));
+
+  return (towupper(c));
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.932
+ * Status    :
+ *
+ * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
+ *****************************************************************************/
+
+int CDECL CRTDLL_towlower(int c)
+{
+  dprintf(("CRTDLL: towlower(%c)\n",
+           c));
+
+  return (towlower(c));
+}
+
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.934
+ * Status    :
+ *
+ * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
+ *****************************************************************************/
+
+wchar_t* CDECL CRTDLL_wcscat(      wchar_t* str1,
+                       const wchar_t* str2)
+{
+  dprintf(("CRTDLL: wcscat(%08xh,%08xh)\n",
+           str1,
+           str2));
+
+  return (wcscat(str1, str2));
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.935
+ * Status    :
+ *
+ * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
+ *****************************************************************************/
+
+wchar_t* CDECL CRTDLL_wcschr(const wchar_t* str,
+                       int          i)
+{
+  dprintf(("CRTDLL: wcschr(%08xh,%08xh)\n",
+           str,
+           i));
+
+  return (wcschr(str, i));
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.936
+ * Status    :
+ *
+ * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
+ *****************************************************************************/
+
+int CDECL CRTDLL_wcscmp(const wchar_t* str1,
+                    const wchar_t* str2)
+{
+  dprintf(("CRTDLL: wcscmp(%08xh,%08xh)\n",
+           str1,
+           str2));
+
+  return (wcscmp(str1, str2));
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.937
+ * Status    :
+ *
+ * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
+ *****************************************************************************/
+
+wchar_t* CDECL CRTDLL_wcscpy(      wchar_t* str1,
+                       const wchar_t* str2)
+{
+  dprintf(("CRTDLL: wcscpy(%08xh,%08xh)\n",
+           str1,
+           str2));
+
+  return (wcscpy(str1, str2));
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.938
+ * Status    :
+ *
+ * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
+ *****************************************************************************/
+
+size_t CDECL CRTDLL_wcscspn(const wchar_t* str1,
+                              wchar_t* str2)
+{
+  dprintf(("CRTDLL: wcscspn(%08xh,%08xh)\n",
+           str1,
+           str2));
+
+  return (wcscspn(str1, str2));
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.939
+ * Status    :
+ *
+ * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
+ *****************************************************************************/
+
+size_t CDECL CRTDLL_wcslen(const wchar_t* str)
+{
+  dprintf(("CRTDLL: wcslen(%08xh)\n",
+           str));
+
+  return (wcslen(str));
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.940
+ * Status    :
+ *
+ * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
+ *****************************************************************************/
+
+wchar_t* CDECL CRTDLL_wcsncat(      wchar_t* str1,
+                        const wchar_t* str2,
+                        size_t      i)
+{
+  dprintf(("CRTDLL: wcsncat(%08xh,%08xh,%08xh)\n",
+           str1,
+           str2,
+           i));
+
+  return (wcsncat(str1, str2, i));
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.941
+ * Status    :
+ *
+ * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
+ *****************************************************************************/
+
+int CDECL CRTDLL_wcsncmp(const wchar_t* str1,
+                     const wchar_t* str2,
+                     size_t      i)
+{
+  dprintf(("CRTDLL: wcsncmp(%08xh,%08xh,%08xh)\n",
+           str1,
+           str2,
+           i));
+
+  return (wcsncmp(str1, str2, i));
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.942
+ * Status    :
+ *
+ * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
+ *****************************************************************************/
+
+wchar_t* CDECL CRTDLL_wcsncpy(      wchar_t* str1,
+                          const wchar_t* str2,
+                          size_t       i)
+{
+  dprintf(("CRTDLL: wcsncpy(%s,%s,%08xh)\n",
+           str1,
+           str2,
+           i));
+
+  return (wcsncpy(str1, str2, i));
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.943
+ * Status    :
+ *
+ * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
+ *****************************************************************************/
+
+wchar_t* CDECL CRTDLL_wcspbrk(const wchar_t* str1,
+                        const wchar_t* str2)
+{
+  dprintf(("CRTDLL: wcspbrk(%08xh,%08xh)\n",
+           str1,
+           str2));
+
+  return (wcspbrk(str1, str2));
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.944
+ * Status    :
+ *
+ * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
+ *****************************************************************************/
+
+wchar_t* CDECL CRTDLL_wcsrchr(const wchar_t* str,
+                        size_t       i)
+{
+  dprintf(("CRTDLL: wcsrchr(%08xh,%08xh)\n",
+           str,
+           i));
+
+  return (wcsrchr(str, i));
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.945
+ * Status    :
+ *
+ * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
+ *****************************************************************************/
+
+size_t CDECL CRTDLL_wcsspn(const wchar_t* str1,
+                       const wchar_t* str2)
+{
+  dprintf(("CRTDLL: wcsspn(%08xh,%08xh)\n",
+           str1,
+           str2));
+
+  return (wcsspn(str1, str2));
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.946
+ * Status    :
+ *
+ * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
+ *****************************************************************************/
+
+wchar_t* CDECL CRTDLL_wcsstr(const wchar_t* str1,
+                         const wchar_t* str2)
+{
+  dprintf(("CRTDLL: wcsstr(%s,%s)\n",
+           str1,
+           str2));
+
+  return (wcsstr(str1, str2));
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.?
+ * Status    :
+ *
+ * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
+ *****************************************************************************/
+
+char * CDECL CRTDLL__itoa(int i, char *s, int r)
+{
+  dprintf(("CRTDLL: _itoa(%08xh, %08xh, %08xh)\n",
+           i,
+           s,
+           r));
+
+  return (itoa(i,s,r));
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.?
+ * Status    :
+ *
+ * Author    : Patrick Haller [Thu, 1999/06/22 20:44]
+ *****************************************************************************/
+
+char * CDECL CRTDLL__itow(int i, char *s, int r)
+{
+  dprintf(("CRTDLL: _itow(%08xh, %08xh, %08xh) no unicode support !\n",
+           i,
+           s,
+           r));
+
+  return (itoa(i,s,r));
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.749
+ * Status    :
+ *
+ * Author    : Jens Wiessner
+ *****************************************************************************/
+
+LONG CDECL CRTDLL__CIpow()
+{
+	double x,y;
+	POP_FPU(y);
+	POP_FPU(x);
+	return pow(x,y);
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.864
+ * Status    :
+ *
+ * Author    : Jens Wiessner
+ *****************************************************************************/
+
+LONG CDECL CRTDLL__ftol(void)
+{
+	/* don't just do DO_FPU("fistp",retval), because the rounding
+	 * mode must also be set to "round towards zero"... */
+	double fl;
+	POP_FPU(fl);
+	return (LONG)fl;
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.866
+ * Status    :
+ *
+ * Author    : Jens Wiessner
+ *****************************************************************************/
+
+LPSTR  CDECL CRTDLL__ltoa(long x,LPSTR buf,INT radix)
+{
+    return ltoa(x,buf,radix);
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.868
+ * Status    :
+ *
+ * Author    : Jens Wiessner
+ *****************************************************************************/
+
+INT CDECL CRTDLL__memicmp(
+	LPCSTR s1,	/* [in] first string */
+	LPCSTR s2,	/* [in] second string */
+	DWORD len	/* [in] length to compare */ )
+{
+	dprintf(("CRTDLL: memicmp(%08xh, %08xh, %08xh)\n",s1,s2,len));
+	int	i;
+
+	for (i=0;i<len;i++) {
+		if (tolower(s1[i])<tolower(s2[i]))
+			return -1;
+		if (tolower(s1[i])>tolower(s2[i]))
+			return  1;
+	}
+	return 0;
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.869
+ * Status    :
+ *
+ * Author    : Jens Wiessner
+ *****************************************************************************/
+
+int  CDECL CRTDLL__snprintf( char *buf, size_t bufsize, const char *fmt, ... )
+{
+  dprintf(("CRTDLL: _snprintf(%08xh, %08xh, %08xh) not implemented\n",
+           buf,
+           bufsize,
+           fmt));
+
+  return 0;
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.870
+ * Status    :
+ *
+ * Author    : Jens Wiessner
+ *****************************************************************************/
+
+int  CDECL CRTDLL__snwprintf( wchar_t *buf, size_t bufsize, const wchar_t *fmt, ... )
+{
+  dprintf(("CRTDLL: _snwprintf(%08xh, %08xh, %08xh) not implemented\n",
+           buf,
+           bufsize,
+           fmt));
+
+  return 0;
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.871
+ * Status    :
+ *
+ * Author    : Jens Wiessner
+ *****************************************************************************/
+
+void CDECL CRTDLL__splitpath( const char *path, char *drive, char *dir, char *fname, char *ext )
+{
+	dprintf(("CRTDLL: _splitpath"));
+
+	char *tmp_drive;
+	char *tmp_dir;
+	char *tmp_ext;
+
+	tmp_drive = (char *)strchr(path,':');
+	if ( tmp_drive != (char *)NULL ) {
+		strncpy(drive,tmp_drive-1,1);
+		*(drive+1) = 0;
+	}
+	else {
+		*drive = 0;
+		tmp_drive = (char *)path;
+	}
+
+	tmp_dir = (char *)strrchr(path,'\\');
+	if( tmp_dir != NULL && tmp_dir != tmp_drive + 1 ) {
+		strncpy(dir,tmp_drive+1,tmp_dir - tmp_drive);
+		*(dir + (tmp_dir - tmp_drive)) = 0;
+	}
+	else 	
+		*dir =0;
+
+	tmp_ext = ( char *)strrchr(path,'.');
+	if ( tmp_ext != NULL ) {
+		strcpy(ext,tmp_ext);
+	}
+	else
+		*ext = 0;
+    if ( tmp_dir != NULL ) {
+		strncpy(fname,tmp_dir+1,tmp_ext - tmp_dir - 1);
+		*(fname + (tmp_ext - tmp_dir -1)) = 0;
+	}
+	else
+		strncpy(fname,path,tmp_ext - path);
+
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.872
+ * Status    :
+ *
+ * Author    : Jens Wiessner
+ *****************************************************************************/
+
+void CDECL CRTDLL__strcmpi( LPCSTR s1, LPCSTR s2 )
+{
+  dprintf(("CRTDLL: _strcmpi(%08xh, %08xh)\n",
+           s1,
+           s2));
+
+  lstrcmpiA( s1, s2 );
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.874
+ * Status    :
+ *
+ * Author    : Jens Wiessner
+ *****************************************************************************/
+
+CHAR * CDECL CRTDLL__strlwr(char *x)
+{
+  char *y =x;
+
+  dprintf(("CRTDLL: _strlwr got %s\n", x));
+  while (*y) {
+    if ((*y > 0x40) && (*y< 0x5b))
+      *y = *y + 0x20;
+    y++;
+  }
+  dprintf(("   returned %s\n", x));
+		
+  return x;
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.875
+ * Status    :
+ *
+ * Author    : Jens Wiessner
+ *****************************************************************************/
+
+int  CDECL CRTDLL__strnicmp( LPCSTR s1, LPCSTR s2, INT n )
+{
+  dprintf(("CRTDLL: _strnicmp (%s,%s,%d)\n",
+           s1,
+           s2,
+           n));
+
+  // @@@PH: sure it's not a UNICODE API?
+  return (lstrncmpiA(s1,s2,n));
+
+/*
+  if (n == 0)
+    return 0;
+  do {
+    if (toupper(*s1) != toupper(*s2++))
+      return toupper(*(unsigned const char *)s1) - toupper(*(unsigned const char *)--s2);
+    if (*s1++ == 0)
+      break;
+  } while (--n != 0);
+  return 0;
+*/
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.876
+ * Status    :
+ *
+ * Author    : Jens Wiessner
+ *****************************************************************************/
+
+LPSTR CDECL CRTDLL__strupr(LPSTR x)
+{
+  dprintf(("CRTDLL: _strupr(%s)\n",
+           x));
+
+  LPSTR y=x;
+
+  while (*y)
+  {
+    *y=toupper(*y);
+    y++;
+  }
+  return x;
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.877
+ * Status    :
+ *
+ * Author    : Jens Wiessner
+ *****************************************************************************/
+
+LPSTR  CDECL CRTDLL__ultoa(long x,LPSTR buf,INT radix)
+{
+    return ultoa(x,buf,radix);
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.878
+ * Status    :
+ *
+ * Author    : Jens Wiessner
+ *****************************************************************************/
+
+int CDECL CRTDLL__vsnprintf( char *s, size_t bufsize, const char *format, va_list arg )
+{
+  dprintf(("CRTDLL: _vsnprintf(%08xh, %08xh, %08xh)\n",
+           s,
+           bufsize,
+           format));
+
+  return wvsnprintfA(s, bufsize, format, arg);
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.897
+ * Status    :
+ *
+ * Author    : Jens Wiessner
+ *****************************************************************************/
+
+int CDECL CRTDLL_iswalpha(wint_t i)
+{
+  dprintf(("CRTDLL: iswalpha(%08xh)\n", i));
+
+  return (iswalpha(i));
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.898
+ * Status    :
+ *
+ * Author    : Jens Wiessner
+ *****************************************************************************/
+
+int CDECL CRTDLL_iswctype(wint_t i, wctype_t wct)
+{
+  dprintf(("CRTDLL: iswctype(%08xh, %08xh)\n", i, wct));
+
+  return (iswctype(i, wct));
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.899
+ * Status    :
+ *
+ * Author    : Jens Wiessner
+ *****************************************************************************/
+
+int CDECL CRTDLL_isxdigit(int i)
+{
+  dprintf(("CRTDLL: isxdigit(%08xh)\n", i));
+
+  return (isxdigit(i));
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.900
+ * Status    :
+ *
+ * Author    : Jens Wiessner
+ *****************************************************************************/
+
+long int CDECL CRTDLL_labs( long int j )
+{
+  dprintf(("CRTDLL: labs(%08xh)\n", j));
+
+  return (labs(j));
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.901
+ * Status    :
+ *
+ * Author    : Jens Wiessner
+ *****************************************************************************/
+
+double CDECL CRTDLL_log( double x )
+{
+  dprintf(("CRTDLL: log(%08xh)\n", x));
+  return (log(x));
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.902
+ * Status    :
+ *
+ * Author    : Jens Wiessner
+ *****************************************************************************/
+
+size_t CDECL CRTDLL_mbstowcs( wchar_t *pwcs, const char *s, size_t n )
+{
+      dprintf(("CRTDLL: mbstowcs(%08xh, %08xh, %08xh)\n", pwcs, s, n));
+      return (mbstowcs(pwcs, s, n));
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.903
+ * Status    :
+ *
+ * Author    : Jens Wiessner
+ *****************************************************************************/
+
+void * CDECL CRTDLL_memchr( const void *s, int c, size_t n )
+{
+    dprintf(("CRTDLL: memchr(%08xh, %08xh, %08xh)\n", s, c, n));
+    return memchr( s, c, n );
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.904
+ * Status    :
+ *
+ * Author    : Jens Wiessner
+ *****************************************************************************/
+
+int CDECL CRTDLL_memcmp( const void * c1, const void * c2, size_t n )
+{
+    dprintf(("CRTDLL: memcmp(%08xh, %08xh, %08xh)\n", c1, c2, n));
+    return memcmp( c1, c2, n );
+}
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.905
+ * Status    :
+ *
+ * Author    : Jens Wiessner
+ *****************************************************************************/
+
+void * CDECL CRTDLL_memcpy( void *s1, const void *s2, size_t n )
+{
+    dprintf(("CRTDLL: memcpy(%08xh, %08xh, %08xh)\n", s1, s2, n));
+    return memcpy( s1, s2, n );
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.907
+ * Status    :
+ *
+ * Author    : Jens Wiessner
+ *****************************************************************************/
+
+void * CDECL CRTDLL_memset( void *s, int i, size_t n )
+{
+    dprintf(("CRTDLL: memset(%08xh, %08xh, %08xh)\n", s, i, n));
+    return memset( s, i, n );
+}
+//******************************************************************************
+VOID CDECL CRTDLL_memmove(VOID UNALIGNED *Destination, CONST VOID UNALIGNED *Source, DWORD Length)
+{
+  memmove(Destination, Source, Length);
+}
+//******************************************************************************
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.908
+ * Status    :
+ *
+ * Author    : Jens Wiessner
+ *****************************************************************************/
+
+double CDECL CRTDLL_pow( double x, double y )	
+{
+    dprintf(("CRTDLL: pow(%08xh, %08xh)\n",x, y));
+    return pow( x, y );
+}
+
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.910
+ * Status    :
+ *
+ * Author    : Jens Wiessner
+ *****************************************************************************/
+
+double CDECL CRTDLL_sin( double x )
+{
+  dprintf(("CRTDLL: sin(%08xh)\n", x));
+  return (sin(x));
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.912
+ * Status    :
+ *
+ * Author    : Jens Wiessner
+ *****************************************************************************/
+
+double CDECL CRTDLL_sqrt( double x )
+{
+  dprintf(("CRTDLL: sqrt(%08xh)\n", x));
+  return (sqrt(x));
+}
+
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.913
+ * Status    :
+ *
+ * Author    : Jens Wiessner
+ *****************************************************************************/
+
+int CDECL CRTDLL_sscanf( const char *s, const char *format, ... )
+{
+  dprintf(("CRTDLL: sscanf(%08xh, %08xh) not implemented.\n"));
+  return 0;
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.933
+ * Status    :
+ *
+ * Author    : Jens Wiessner
+ *****************************************************************************/
+
+int CDECL CRTDLL_vsprintf( char *s, const char *format, va_list arg )
+{
+  dprintf(("CRTDLL: vsprintf(%08xh, %08xh)\n", s, format));
+  return (vsprintf(s, format, arg));
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.947
+ * Status    :
+ *
+ * Author    : Jens Wiessner
+ *****************************************************************************/
+
+wchar_t * CDECL CRTDLL_wcstok( wchar_t *s1, const wchar_t *s2, wchar_t **ptr )
+{
+  dprintf(("CRTDLL: wcstok(%08xh, %08xh, %08xh)\n",s1,s2,ptr));
+  return (wcstok(s1, s2, ptr));
+}
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.948
+ * Status    :
+ *
+ * Author    : Jens Wiessner
+ *****************************************************************************/
+
+long int CDECL CRTDLL_wcstol( const wchar_t *s1, wchar_t **s2, int i )
+{
+  dprintf(("CRTDLL: wcstol(%08xh, %08xh, %08xh)\n",s1,s2,i));
+  return (wcstol(s1, s2, i));
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.949
+ * Status    :
+ *
+ * Author    : Jens Wiessner
+ *****************************************************************************/
+
+size_t CDECL CRTDLL_wcstombs( char *s, const wchar_t *pwcs, size_t n )
+{
+  dprintf(("CRTDLL: wcstombs(%08xh, %08xh, %08xh)\n",s,pwcs,n));
+  return (wcstombs(s, pwcs, n));
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.950
+ * Status    :
+ *
+ * Author    : Jens Wiessner
+ *****************************************************************************/
+
+unsigned long int CDECL CRTDLL_wcstoul( const wchar_t *s1, wchar_t **s2, int i )
+{
+  dprintf(("CRTDLL: wcstoul(%08xh, %08xh, %08xh)\n",s1,s2,i));
+  return (wcstoul(s1, s2, i));
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.983
+ * Status    :
+ *
+ * Author    : Jens Wiessner
+ *****************************************************************************/
+
+int CDECL CRTDLL__wtoi( const wchar_t *s )
+{
+  dprintf(("CRTDLL: _wtoi(%08xh) not implemented.\n"));
+  return 0;
+}
+
+
+/*****************************************************************************
+ * Name      :
+ * Purpose   :
+ * Parameters:
+ * Variables :
+ * Result    :
+ * Remark    : NTDLL.984
+ * Status    :
+ *
+ * Author    : Jens Wiessner
+ *****************************************************************************/
+
+long int CDECL CRTDLL__wtol( const wchar_t *s )
+{
+  dprintf(("CRTDLL: _wtol(%08xh) not implemented.\n"));
+  return 0;
+}
Index: trunk/src/crtdll/crtdll.cpp
===================================================================
--- trunk/src/crtdll/crtdll.cpp	(revision 2176)
+++ trunk/src/crtdll/crtdll.cpp	(revision 2177)
@@ -1,3 +1,3 @@
-/* $Id: crtdll.cpp,v 1.16 1999-12-18 14:32:23 sandervl Exp $ */
+/* $Id: crtdll.cpp,v 1.17 1999-12-21 12:27:11 sandervl Exp $ */
 
 /*
@@ -108,5 +108,5 @@
 double CDECL CRTDLL__CIacos( double x )
 {
-  dprintf(("NTDLL: _CIacos\n"));
+  dprintf(("CRTDLL: _CIacos\n"));
   dprintf(("should be register function\n"));
   return acos(x);
@@ -119,5 +119,5 @@
 double CDECL CRTDLL__CIasin( double x )
 {
-  dprintf(("NTDLL: _CIasin\n"));
+  dprintf(("CRTDLL: _CIasin\n"));
   dprintf(("should be register function\n"));
   return asin(x);
@@ -130,5 +130,5 @@
 double CDECL CRTDLL__CIatan( double x )
 {
-  dprintf(("NTDLL: _CIatan\n"));
+  dprintf(("CRTDLL: _CIatan\n"));
   dprintf(("should be register function\n"));
   return atan(x);
@@ -141,5 +141,5 @@
 double CDECL CRTDLL__CIatan2( double x, double y )
 {
-  dprintf(("NTDLL: _CIatan2\n"));
+  dprintf(("CRTDLL: _CIatan2\n"));
   dprintf(("should be register function\n"));
   return atan2(x,y);
@@ -152,5 +152,5 @@
 double CDECL CRTDLL__CIcos( double x )
 {
-  dprintf(("NTDLL: _CIcos\n"));
+  dprintf(("CRTDLL: _CIcos\n"));
   dprintf(("should be register function\n"));
   return cos(x);
@@ -163,5 +163,5 @@
 double CDECL CRTDLL__CIcosh( double x )
 {
-  dprintf(("NTDLL: _CIcosh\n"));
+  dprintf(("CRTDLL: _CIcosh\n"));
   dprintf(("should be register function\n"));
   return cosh(x);
@@ -174,5 +174,5 @@
 double CDECL CRTDLL__CIexp( double x )
 {
-  dprintf(("NTDLL: _CIexp\n"));
+  dprintf(("CRTDLL: _CIexp\n"));
   dprintf(("should be register function\n"));
   return exp(x);
@@ -185,5 +185,5 @@
 double CDECL CRTDLL__CIfmod( double x, double y )
 {
-  dprintf(("NTDLL: _CIfmod\n"));
+  dprintf(("CRTDLL: _CIfmod\n"));
   dprintf(("should be register function\n"));
   return fmod(x,y);
@@ -196,5 +196,5 @@
 double CDECL CRTDLL__CIlog( double x )
 {
-  dprintf(("NTDLL: _CIlog\n"));
+  dprintf(("CRTDLL: _CIlog\n"));
   dprintf(("should be register function\n"));
   return log(x);
@@ -207,5 +207,5 @@
 double CDECL CRTDLL__CIlog10( double x )
 {
-  dprintf(("NTDLL: _CIlog10\n"));
+  dprintf(("CRTDLL: _CIlog10\n"));
   dprintf(("should be register function\n"));
   return log10(x);
@@ -218,5 +218,5 @@
 double CDECL CRTDLL__CIsin( double x )
 {
-  dprintf(("NTDLL: _CIsin\n"));
+  dprintf(("CRTDLL: _CIsin\n"));
   dprintf(("should be register function\n"));
   return sin(x);
@@ -229,5 +229,5 @@
 double CDECL CRTDLL__CIsinh( double x )
 {
-  dprintf(("NTDLL: _CIsinh\n"));
+  dprintf(("CRTDLL: _CIsinh\n"));
   dprintf(("should be register function\n"));
   return sinh(x);
@@ -240,5 +240,5 @@
 double CDECL CRTDLL__CIsqrt( double x )
 {
-  dprintf(("NTDLL: _CIsqrt\n"));
+  dprintf(("CRTDLL: _CIsqrt\n"));
   dprintf(("should be register function\n"));
   return acos(x);
@@ -251,5 +251,5 @@
 double CDECL CRTDLL__CItan( double x )
 {
-  dprintf(("NTDLL: _CItan\n"));
+  dprintf(("CRTDLL: _CItan\n"));
   dprintf(("should be register function\n"));
   return tan(x);
@@ -262,5 +262,5 @@
 double CDECL CRTDLL__CItanh( double x )
 {
-  dprintf(("NTDLL: _CItanh\n"));
+  dprintf(("CRTDLL: _CItanh\n"));
   dprintf(("should be register function\n"));
   return tanh(x);
@@ -4021,5 +4021,5 @@
 {
   dprintf(("CRTDLL: _wcsicoll\n"));
-  return NTDLL__wcsicmp( str1, str2 );
+  return CRTDLL__wcsicmp( str1, str2 );
 }
 
@@ -4187,32 +4187,4 @@
 }
 
-
-/*********************************************************************
- *                  bsearch	(CRTDLL.346)
- */
-void * CDECL CRTDLL_bsearch( const void *key, const void *base0,  size_t nelem,
-	 size_t size, int (*cmp)(const void *ck, const void *ce))
-{
-  dprintf(("CRTDLL: bsearch\n"));
-  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;
-}
-
-
 /*********************************************************************
  *                  calloc	(CRTDLL.347)
@@ -4992,5 +4964,5 @@
 int CDECL CRTDLL_rand( void )
 {
-    dprintf(("CRTDLL: rand\n"));
+//    dprintf(("CRTDLL: rand\n"));
     return (rand());
 }
@@ -5271,5 +5243,4 @@
   return (ungetwc(wc, strm));
 }
-
 
 /*********************************************************************
Index: trunk/src/crtdll/crtdll.def
===================================================================
--- trunk/src/crtdll/crtdll.def	(revision 2176)
+++ trunk/src/crtdll/crtdll.def	(revision 2177)
@@ -1,3 +1,3 @@
-; $Id: crtdll.def,v 1.9 1999-12-20 11:09:41 sandervl Exp $
+; $Id: crtdll.def,v 1.10 1999-12-21 12:27:12 sandervl Exp $
 
 ;Created by BLAST for IBM's compiler
@@ -7,96 +7,4 @@
 IMPORTS
 	_RtlUnwind@16		= NTDLL.RtlUnwind
-
-; Forwarded APIs
-	KERNEL32_memmove	= KERNEL32.memmove
-	NTDLL__CIpow		= NTDLL._CIpow	
-	NTDLL__ftol		= NTDLL._ftol
-	NTDLL__itoa		= NTDLL._itoa
-	NTDLL__ltoa		= NTDLL._ltoa
-	NTDLL__memicmp		= NTDLL._memicmp
-	NTDLL__snprintf		= NTDLL._snprintf
-	NTDLL__snwprintf	= NTDLL._snwprintf
-	NTDLL__splitpath	= NTDLL._splitpath
-	NTDLL__strcmpi		= NTDLL._strcmpi
-	NTDLL__stricmp		= NTDLL._stricmp
-	NTDLL__strlwr		= NTDLL._strlwr
-	NTDLL__strnicmp		= NTDLL._strnicmp
-	NTDLL__strupr		= NTDLL._strupr
-	NTDLL__ultoa		= NTDLL._ultoa
-	NTDLL__vsnprintf	= NTDLL._vsnprintf
-	_NTDLL__wcsicmp		= NTDLL._wcsicmp
-	NTDLL__wcslwr		= NTDLL._wcslwr
-	NTDLL__wcsnicmp		= NTDLL._wcsnicmp
-	NTDLL__wcsupr		= NTDLL._wcsupr
-	NTDLL__wtoi		= NTDLL._wtoi
-	NTDLL__wtol		= NTDLL._wtol
-	NTDLL_abs		= NTDLL.abs
-	NTDLL_atan		= NTDLL.atan
-	NTDLL_atoi		= NTDLL.atoi
-	NTDLL_atol		= NTDLL.atol
-	NTDLL_ceil		= NTDLL.ceil
-	NTDLL_cos		= NTDLL.cos
-	NTDLL_fabs		= NTDLL.fabs
-	NTDLL_floor		= NTDLL.floor
-	NTDLL_isalpha		= NTDLL.isalpha
-	NTDLL_isdigit		= NTDLL.isdigit
-	NTDLL_islower		= NTDLL.islower
-	NTDLL_isprint		= NTDLL.isprint
-	NTDLL_isspace		= NTDLL.isspace
-	NTDLL_isupper		= NTDLL.isupper
-	NTDLL_iswalpha		= NTDLL.iswalpha
-	NTDLL_iswctype		= NTDLL.iswctype
-	NTDLL_isxdigit		= NTDLL.isxdigit
-	NTDLL_labs		= NTDLL.labs
-	NTDLL_log		= NTDLL.log
-	NTDLL_mbstowcs		= NTDLL.mbstowcs
-	NTDLL_memchr		= NTDLL.memchr
-	NTDLL_memcmp		= NTDLL.memcmp
-	NTDLL_memcpy		= NTDLL.memcpy
-	NTDLL_memset		= NTDLL.memset
-	NTDLL_pow		= NTDLL.pow
-	NTDLL_qsort		= NTDLL.qsort	
-	NTDLL_sin		= NTDLL.sin
-	NTDLL_sprintf		= NTDLL.sprintf
-	NTDLL_sqrt		= NTDLL.sqrt
-	NTDLL_sscanf		= NTDLL.sscanf
-	NTDLL_strcat		= NTDLL.strcat
-	NTDLL_strchr		= NTDLL.strchr
-	NTDLL_strcmp		= NTDLL.strcmp
-	NTDLL_strcpy		= NTDLL.strcpy
-	NTDLL_strcspn		= NTDLL.strcspn
-	NTDLL_strlen		= NTDLL.strlen
-	NTDLL_strncat		= NTDLL.strncat
-	NTDLL_strncmp		= NTDLL.strncmp
-	NTDLL_strncpy		= NTDLL.strncpy
-	NTDLL_strpbrk		= NTDLL.strpbrk
-	NTDLL_strrchr		= NTDLL.strrchr
-	NTDLL_strspn		= NTDLL.strspn
-	NTDLL_strstr		= NTDLL.strstr
-	NTDLL_swprintf		= NTDLL.swprintf
-	NTDLL_tan		= NTDLL.tan	
-	NTDLL_tolower		= NTDLL.tolower	
-	NTDLL_toupper		= NTDLL.toupper	
-	NTDLL_towlower		= NTDLL.towlower
-	NTDLL_towupper		= NTDLL.towupper
-	NTDLL_vsprintf		= NTDLL.vsprintf
-	NTDLL_wcscat		= NTDLL.wcscat	
-	NTDLL_wcschr		= NTDLL.wcschr	
-	NTDLL_wcscmp		= NTDLL.wcscmp	
-	NTDLL_wcscpy		= NTDLL.wcscpy	
-	NTDLL_wcscspn		= NTDLL.wcscspn	
-	NTDLL_wcslen		= NTDLL.wcslen	
-	NTDLL_wcsncat		= NTDLL.wcsncat	
-	NTDLL_wcsncmp		= NTDLL.wcsncmp	
-	NTDLL_wcsncpy		= NTDLL.wcsncpy	
-	NTDLL_wcspbrk		= NTDLL.wcspbrk	
-	NTDLL_wcsrchr		= NTDLL.wcsrchr	
-	NTDLL_wcsspn		= NTDLL.wcsspn	
-	NTDLL_wcsstr		= NTDLL.wcsstr	
-	NTDLL_wcstok		= NTDLL.wcstok
-	NTDLL_wcstol		= NTDLL.wcstol
-	NTDLL_wcstombs		= NTDLL.wcstombs
-	NTDLL_wcstoul		= NTDLL.wcstoul
-
 
 EXPORTS
@@ -114,5 +22,5 @@
     _CIlog			= _CRTDLL__CIlog		@12
     _CIlog10			= _CRTDLL__CIlog10		@13
-    _CIpow			= NTDLL__CIpow			@14
+    _CIpow			= _CRTDLL__CIpow			@14
     _CIsin			= _CRTDLL__CIsin		@15
     _CIsinh			= _CRTDLL__CIsinh		@16
@@ -214,5 +122,5 @@
     _fstat			= _CRTDLL__fstat		@111
     _ftime			= _CRTDLL__ftime		@112
-    _ftol			= NTDLL__ftol			@113
+    _ftol			= _CRTDLL__ftol			@113
     _fullpath			= _CRTDLL__fullpath		@114
     _futime			= _CRTDLL__futime		@115
@@ -266,5 +174,5 @@
     _ismbstrail			= _CRTDLL__ismbstrail		@163
     _isnan			= _CRTDLL__isnan		@164
-    _itoa			= NTDLL__itoa			@165
+    _itoa			= _CRTDLL__itoa			@165
     _j0				= _CRTDLL__j0			@166
     _j1				= _CRTDLL__j1			@167
@@ -280,5 +188,5 @@
     _lsearch			= _CRTDLL__lsearch		@177
     _lseek			= _CRTDLL__lseek		@178
-    _ltoa			= NTDLL__ltoa			@179
+    _ltoa			= _CRTDLL__ltoa			@179
     _makepath			= _CRTDLL__makepath		@180
     _matherr			= _CRTDLL__matherr		@181
@@ -333,5 +241,5 @@
     _mbsupr			= _CRTDLL__mbsupr		@229
     _memccpy			= _CRTDLL__memccpy		@230
-    _memicmp			= NTDLL__memicmp		@231
+    _memicmp			= _CRTDLL__memicmp		@231
     _mkdir			= _CRTDLL__mkdir		@232
     _mktemp			= _CRTDLL__mktemp		@233
@@ -368,6 +276,6 @@
     _setsystime			= _CRTDLL__setsystime		@264
     _sleep			= _CRTDLL__sleep		@265
-    _snprintf			= NTDLL__snprintf		@266
-    _snwprintf			= NTDLL__snwprintf		@267
+    _snprintf			= _CRTDLL__snprintf		@266
+    _snwprintf			= _CRTDLL__snwprintf		@267
     _sopen			= _CRTDLL__sopen		@268
     _spawnl			= _CRTDLL__spawnl		@269
@@ -379,19 +287,19 @@
     _spawnvp			= _CRTDLL__spawnvp		@275
     _spawnvpe			= _CRTDLL__spawnvpe		@276
-    _splitpath			= NTDLL__splitpath		@277
+    _splitpath			= _CRTDLL__splitpath		@277
     _stat			= _CRTDLL__stat			@278
     _statusfp			= _CRTDLL__statusfp		@279
-    _strcmpi			= NTDLL__strcmpi		@280
+    _strcmpi			= _CRTDLL__strcmpi		@280
     _strdate			= _CRTDLL__strdate		@281
     _strdec			= _CRTDLL__strdec		@282
     _strdup			= _CRTDLL__strdup		@283
     _strerror			= _CRTDLL__strerror		@284
-    _stricmp			= NTDLL__stricmp		@285
+    _stricmp			= _CRTDLL__stricmp		@285
     _stricoll			= _CRTDLL__stricoll		@286
     _strinc			= _CRTDLL__strinc		@287
-    _strlwr			= NTDLL__strlwr			@288
+    _strlwr			= _CRTDLL__strlwr			@288
     _strncnt			= _CRTDLL__strncnt		@289
     _strnextc			= _CRTDLL__strnextc		@290
-    _strnicmp			= NTDLL__strnicmp		@291
+    _strnicmp			= _CRTDLL__strnicmp		@291
     _strninc			= _CRTDLL__strninc		@292
     _strnset			= _CRTDLL__strnset		@293
@@ -400,5 +308,5 @@
     _strspnp			= _CRTDLL__strspnp		@296
     _strtime			= _CRTDLL__strtime		@297
-    _strupr			= NTDLL__strupr			@298
+    _strupr			= _CRTDLL__strupr			@298
     _swab			= _CRTDLL__swab			@299
 
@@ -412,5 +320,5 @@
     _tzname			= CRTDLL_tzname			@307
     _tzset			= _CRTDLL__tzset		@308
-    _ultoa			= NTDLL__ultoa			@309
+    _ultoa			= _CRTDLL__ultoa			@309
     _umask			= _CRTDLL__umask		@310
     _ungetch			= _CRTDLL__ungetch		@311
@@ -418,41 +326,41 @@
     _unloaddll			= _CRTDLL__unloaddll		@313
     _utime			= _CRTDLL__utime		@314
-    _vsnprintf			= NTDLL__vsnprintf		@315
+    _vsnprintf			= _CRTDLL__vsnprintf		@315
     _vsnwprintf			= _CRTDLL__vsnwprintf		@316
     _wcsdup			= _CRTDLL__wcsdup		@317
-    _wcsicmp			= _NTDLL__wcsicmp		@318
+    _wcsicmp			= _CRTDLL__wcsicmp		@318
     _wcsicoll			= _CRTDLL__wcsicoll		@319
-    _wcslwr			= NTDLL__wcslwr			@320
-    _wcsnicmp			= NTDLL__wcsnicmp		@321
+    _wcslwr			= _CRTDLL__wcslwr			@320
+    _wcsnicmp			= _CRTDLL__wcsnicmp		@321
     _wcsnset			= _CRTDLL__wcsnset		@322
     _wcsrev			= _CRTDLL__wcsrev		@323
     _wcsset			= _CRTDLL__wcsset		@324
-    _wcsupr			= NTDLL__wcsupr			@325
+    _wcsupr			= _CRTDLL__wcsupr			@325
     _winmajor_dll		= CRTDLL_winmajor_dll		@326
     _winminor_dll 		= CRTDLL_winminor_dll		@327
     _winver_dll 		= CRTDLL_winver_dll		@328
     _write			= _CRTDLL__write		@329
-    _wtoi			= NTDLL__wtoi			@330
-    _wtol			= NTDLL__wtol			@331
+    _wtoi			= _CRTDLL__wtoi			@330
+    _wtol			= _CRTDLL__wtol			@331
     _y0				= _CRTDLL__y0			@332
     _y1				= _CRTDLL__y1			@333
     _yn				= _CRTDLL__yn			@334
     abort			= _CRTDLL_abort			@335
-    abs				= NTDLL_abs			@336
+    abs				= _CRTDLL_abs			@336
     acos			= _CRTDLL_acos	 		@337
     asctime			= _CRTDLL_asctime		@338
     asin			= _CRTDLL_asin			@339
-    atan			= NTDLL_atan			@340
+    atan			= _CRTDLL_atan			@340
     atan2			= _CRTDLL_atan2			@341
     atexit			= _CRTDLL_atexit		@342
     atof			= _CRTDLL_atof			@343
-    atoi			= NTDLL_atoi			@344
-    atol			= NTDLL_atol			@345
-    bsearch                     = _bsearch							@346
+    atoi			= _CRTDLL_atoi			@344
+    atol			= _CRTDLL_atol			@345
+    bsearch                     = _CRTDLL_bsearch		@346
     calloc			= _CRTDLL_calloc		@347
-    ceil			= NTDLL_ceil			@348
+    ceil			= _CRTDLL_ceil			@348
     clearerr			= _CRTDLL_clearerr		@349
     clock			= _CRTDLL_clock			@350
-    cos				= NTDLL_cos			@351
+    cos				= _CRTDLL_cos			@351
     cosh			= _CRTDLL_cosh			@352
     ctime			= _CRTDLL_ctime			@353
@@ -461,5 +369,5 @@
     exit			= _CRTDLL_exit			@356
     exp				= _CRTDLL_exp			@357
-    fabs			= NTDLL_fabs			@358
+    fabs			= _CRTDLL_fabs			@358
     fclose			= _CRTDLL_fclose		@359
     feof			= _CRTDLL_feof			@360
@@ -470,5 +378,5 @@
     fgets			= _CRTDLL_fgets			@365
     fgetwc			= _CRTDLL_fgetwc		@366
-    floor			= NTDLL_floor			@367
+    floor			= _CRTDLL_floor			@367
     fmod			= _CRTDLL_fmod			@368
     fopen			= _CRTDLL_fopen			@369
@@ -495,20 +403,20 @@
     is_wctype			= _CRTDLL_is_wctype		@390
     isalnum			= _CRTDLL_isalnum		@391
-    isalpha			= NTDLL_isalpha			@392
+    isalpha			= _CRTDLL_isalpha			@392
     iscntrl			= _CRTDLL_iscntrl		@393
-    isdigit			= NTDLL_isdigit			@394
+    isdigit			= _CRTDLL_isdigit			@394
     isgraph			= _CRTDLL_isgraph		@395
     isleadbyte			= _CRTDLL_isleadbyte		@396
-    islower			= NTDLL_islower			@397
-    isprint			= NTDLL_isprint			@398
+    islower			= _CRTDLL_islower			@397
+    isprint			= _CRTDLL_isprint			@398
     ispunct			= _CRTDLL_ispunct		@399
 
-    isspace			= NTDLL_isspace			@400
-    isupper			= NTDLL_isupper			@401
+    isspace			= _CRTDLL_isspace			@400
+    isupper			= _CRTDLL_isupper			@401
     iswalnum			= _CRTDLL_iswalnum		@402
-    iswalpha			= NTDLL_iswalpha		@403
+    iswalpha			= _CRTDLL_iswalpha		@403
     iswascii			= _CRTDLL_iswascii		@404
     iswcntrl			= _CRTDLL_iswcntrl		@405
-    iswctype			= NTDLL_iswctype		@406
+    iswctype			= _CRTDLL_iswctype		@406
     iswdigit			= _CRTDLL_iswdigit		@407
     iswgraph			= _CRTDLL_iswgraph		@408
@@ -519,31 +427,31 @@
     iswupper			= _CRTDLL_iswupper		@413
     iswxdigit			= _CRTDLL_iswxdigit		@414
-    isxdigit			= NTDLL_isxdigit		@415
-    labs			= NTDLL_labs			@416
+    isxdigit			= _CRTDLL_isxdigit		@415
+    labs			= _CRTDLL_labs			@416
     ldexp			= _CRTDLL_ldexp			@417
     ldiv			= _CRTDLL_ldiv			@418
     localeconv			= _CRTDLL_localeconv		@419
     localtime			= _CRTDLL_localtime		@420
-    log				= NTDLL_log			@421
+    log				= _CRTDLL_log			@421
     log10			= _CRTDLL_log10			@422
     longjmp		        = _CRTDLL_longjmp		@423
     malloc		        = _CRTDLL_malloc		@424
     mblen			= _CRTDLL_mblen			@425
-    mbstowcs			= NTDLL_mbstowcs		@426
+    mbstowcs			= _CRTDLL_mbstowcs		@426
     mbtowc			= _CRTDLL_mbtowc		@427
-    memchr			= NTDLL_memchr			@428
-    memcmp		        = NTDLL_memcmp			@429
-    memcpy		        = NTDLL_memcpy			@430
-    memmove			= KERNEL32_memmove		@431
-    memset		        = NTDLL_memset			@432
+    memchr			= _CRTDLL_memchr			@428
+    memcmp		        = _CRTDLL_memcmp			@429
+    memcpy		        = _CRTDLL_memcpy			@430
+    memmove			= _CRTDLL_memmove		@431
+    memset		        = _CRTDLL_memset			@432
     mktime			= _CRTDLL_mktime		@433
     modf			= _CRTDLL_modf			@434
     perror			= _CRTDLL_perror		@435
-    pow				= NTDLL_pow			@436
+    pow				= _CRTDLL_pow			@436
     printf			= _CRTDLL_printf		@437
     putc			= _CRTDLL_putc			@438
     putchar			= _CRTDLL_putchar		@439
     puts			= _CRTDLL_puts			@440
-    qsort			= NTDLL_qsort			@441
+    qsort			= _CRTDLL_qsort			@441
     raise			= _CRTDLL_raise			@442
     rand		        = _CRTDLL_rand  		@443
@@ -557,26 +465,26 @@
     setvbuf			= _CRTDLL_setvbuf		@451
     signal			= _CRTDLL_signal		@452
-    sin				= NTDLL_sin			@453
+    sin				= _CRTDLL_sin			@453
     sinh			= _CRTDLL_sinh			@454
-    sprintf			= NTDLL_sprintf			@455
-    sqrt			= NTDLL_sqrt			@456
+    sprintf			= _CRTDLL_sprintf			@455
+    sqrt			= _CRTDLL_sqrt			@456
     srand 			= _CRTDLL_srand 		@457
-    sscanf			= NTDLL_sscanf			@458
-    strcat			= NTDLL_strcat			@459
-    strchr			= NTDLL_strchr			@460
-    strcmp			= NTDLL_strcmp			@461
+    sscanf			= _CRTDLL_sscanf			@458
+    strcat			= _CRTDLL_strcat			@459
+    strchr			= _CRTDLL_strchr			@460
+    strcmp			= _CRTDLL_strcmp			@461
     strcoll			= _CRTDLL_strcoll		@462
-    strcpy			= NTDLL_strcpy			@463
-    strcspn			= NTDLL_strcspn			@464
+    strcpy			= _CRTDLL_strcpy			@463
+    strcspn			= _CRTDLL_strcspn			@464
     strerror			= _CRTDLL_strerror		@465
     strftime			= _CRTDLL_strftime		@466
-    strlen			= NTDLL_strlen			@467
-    strncat			= NTDLL_strncat			@468
-    strncmp			= NTDLL_strncmp			@469
-    strncpy			= NTDLL_strncpy			@470
-    strpbrk			= NTDLL_strpbrk			@471
-    strrchr			= NTDLL_strrchr			@472
-    strspn			= NTDLL_strspn			@473
-    strstr			= NTDLL_strstr			@474
+    strlen			= _CRTDLL_strlen			@467
+    strncat			= _CRTDLL_strncat			@468
+    strncmp			= _CRTDLL_strncmp			@469
+    strncpy			= _CRTDLL_strncpy			@470
+    strpbrk			= _CRTDLL_strpbrk			@471
+    strrchr			= _CRTDLL_strrchr			@472
+    strspn			= _CRTDLL_strspn			@473
+    strstr			= _CRTDLL_strstr			@474
     strtod			= _CRTDLL_strtod		@475
     strtok			= _CRTDLL_strtok		@476
@@ -584,16 +492,16 @@
     strtoul			= _CRTDLL_strtoul		@478
     strxfrm			= _CRTDLL_strxfrm		@479
-    swprintf			= NTDLL_swprintf		@480
+    swprintf			= _CRTDLL_swprintf		@480
     swscanf			= _CRTDLL_swscanf		@481
     system			= _CRTDLL_system		@482
-    tan				= NTDLL_tan			@483
+    tan				= _CRTDLL_tan			@483
     tanh			= _CRTDLL_tanh			@484
     time			= _CRTDLL_time			@485
     tmpfile			= _CRTDLL_tmpfile		@486
     tmpnam			= _CRTDLL_tmpnam		@487
-    tolower			= NTDLL_tolower			@488
-    toupper			= NTDLL_toupper			@489
-    towlower			= NTDLL_towlower		@490
-    towupper			= NTDLL_towupper		@491
+    tolower			= _CRTDLL_tolower			@488
+    toupper			= _CRTDLL_toupper			@489
+    towlower			= _CRTDLL_towlower		@490
+    towupper			= _CRTDLL_towupper		@491
     ungetc  		        = _CRTDLL_ungetc  		@492
     ungetwc  		        = _CRTDLL_ungetwc  		@493
@@ -601,30 +509,32 @@
     vfwprintf		        = _CRTDLL_vfwprintf		@495
     vprintf		        = _CRTDLL_vprintf		@496
-    vsprintf			= NTDLL_vsprintf		@497
+    vsprintf			= _CRTDLL_vsprintf		@497
     vswprintf			= _CRTDLL_vswprintf		@498
     vwprintf		        = _CRTDLL_vwprintf		@499
 
-    wcscat			= NTDLL_wcscat			@500
-    wcschr			= NTDLL_wcschr			@501
-    wcscmp			= NTDLL_wcscmp			@502
+    wcscat			= _CRTDLL_wcscat			@500
+    wcschr			= _CRTDLL_wcschr			@501
+    wcscmp			= _CRTDLL_wcscmp			@502
     wcscoll			= _CRTDLL_wcscoll		@503
-    wcscpy			= NTDLL_wcscpy			@504
-    wcscspn			= NTDLL_wcscspn			@505
+    wcscpy			= _CRTDLL_wcscpy			@504
+    wcscspn			= _CRTDLL_wcscspn			@505
     wcsftime			= _CRTDLL_wcsftime		@506
-    wcslen			= NTDLL_wcslen			@507
-    wcsncat			= NTDLL_wcsncat			@508
-    wcsncmp			= NTDLL_wcsncmp			@509
-    wcsncpy			= NTDLL_wcsncpy			@510
-    wcspbrk			= NTDLL_wcspbrk			@511
-    wcsrchr			= NTDLL_wcsrchr			@512
-    wcsspn			= NTDLL_wcsspn			@513
-    wcsstr			= NTDLL_wcsstr			@514
+    wcslen			= _CRTDLL_wcslen			@507
+    wcsncat			= _CRTDLL_wcsncat			@508
+    wcsncmp			= _CRTDLL_wcsncmp			@509
+    wcsncpy			= _CRTDLL_wcsncpy			@510
+    wcspbrk			= _CRTDLL_wcspbrk			@511
+    wcsrchr			= _CRTDLL_wcsrchr			@512
+    wcsspn			= _CRTDLL_wcsspn			@513
+    wcsstr			= _CRTDLL_wcsstr			@514
     wcstod			= _CRTDLL_wcstod		@515
-    wcstok			= NTDLL_wcstok         	        @516
-    wcstol			= NTDLL_wcstol 			@517
-    wcstombs			= NTDLL_wcstombs		@518
-    wcstoul			= NTDLL_wcstoul			@519
+    wcstok			= _CRTDLL_wcstok         	        @516
+    wcstol			= _CRTDLL_wcstol 			@517
+    wcstombs			= _CRTDLL_wcstombs		@518
+    wcstoul			= _CRTDLL_wcstoul			@519
     wcsxfrm			= _CRTDLL_wcsxfrm		@520
     wctomb			= _CRTDLL_wctomb		@521
     wprintf			= _CRTDLL_wprintf		@522
     wscanf			= _CRTDLL_wscanf		@523
+
+    _itow			= _CRTDLL__itow			@600
Index: trunk/src/crtdll/crtinc.h
===================================================================
--- trunk/src/crtdll/crtinc.h	(revision 2176)
+++ trunk/src/crtdll/crtinc.h	(revision 2177)
@@ -1,3 +1,3 @@
-/* $Id: crtinc.h,v 1.11 1999-12-18 14:32:24 sandervl Exp $ */
+/* $Id: crtinc.h,v 1.12 1999-12-21 12:27:12 sandervl Exp $ */
 
 /* Definitions for the CRTDLL library (CRTDLL.DLL)
@@ -145,5 +145,5 @@
 // CRTDLL Functions
 CRTDLL_FILE * 	CDECL CRTDLL__fdopen(INT handle, LPCSTR mode);
-INT 		CDECL NTDLL__wcsicmp( LPCWSTR str1, LPCWSTR str2 );
+INT 		CDECL CRTDLL__wcsicmp( LPCWSTR str1, LPCWSTR str2 );
 INT 		CDECL CRTDLL_vfprintf( CRTDLL_FILE *file, LPSTR format, va_list args );
 VOID *		CDECL CRTDLL_malloc(DWORD size);
Index: trunk/src/crtdll/makefile
===================================================================
--- trunk/src/crtdll/makefile	(revision 2176)
+++ trunk/src/crtdll/makefile	(revision 2177)
@@ -1,3 +1,3 @@
-# $Id: makefile,v 1.4 1999-12-20 11:09:41 sandervl Exp $
+# $Id: makefile,v 1.5 1999-12-21 12:27:12 sandervl Exp $
 
 #
@@ -22,5 +22,5 @@
 TARGET = crtdll
 
-OBJS =  crtdll.obj bsearch.obj initterm.obj
+OBJS =  crtdll.obj bsearch.obj initterm.obj qsort.obj crt.obj asmhlp.obj
 
 all: $(TARGET).dll $(TARGET).lib
@@ -30,11 +30,14 @@
 	$(LD) $(LDFLAGS) -Fm -Fe$@ $(OBJS) $(TARGET).def \
               $(PDWIN32_LIB)/pmwinx.lib $(PDWIN32_LIB)/kernel32.lib \
-	       $(PDWIN32_LIB)/odincrt.lib OS2386.LIB $(RTLLIB_O)
+	       $(PDWIN32_LIB)/odincrt.lib $(PDWIN32_LIB)/user32.lib OS2386.LIB $(RTLLIB_O) 
 	$(CP) $@ $(PDWIN32_BIN)
 
 
-$(TARGET).lib: $(TARGET).def
-	$(IMPLIB) $(IMPLIBFLAGS) $@ $**
-	$(CP) $@ $(PDWIN32_LIB)
+$(TARGET).LIB: $(TARGET)exp.def
+        $(IMPLIB) $(IMPLIBFLAGS) $@ $(TARGET)exp.def
+        $(CP) $@ $(PDWIN32_LIB)
+
+$(TARGET)exp.def: $(TARGET).def
+        $(IMPDEF) $** $@
 
 
@@ -42,4 +45,7 @@
 crtdll.obj: crtdll.cpp
 bsearch.obj: bsearch.c
+qsort.obj:    qsort.c
+crt.obj:	crt.cpp
+asmhlp.obj: asmhlp.asm
 
 clean:
Index: trunk/src/crtdll/qsort.c
===================================================================
--- trunk/src/crtdll/qsort.c	(revision 2177)
+++ trunk/src/crtdll/qsort.c	(revision 2177)
@@ -0,0 +1,86 @@
+/* qsort.c (emx+gcc) -- Copyright (c) 1990-1994 by Eberhard Mattes */
+
+#include <odin.h>
+#include <memory.h>
+#include <string.h>
+
+ void _memswap (void *s1, void *s2, size_t n)
+ {
+   char *c1, *c2, c;
+   int *i1, *i2, i;
+ 
+   i1 = s1; i2 = s2;
+   while (n >= sizeof (int))
+     {
+       i = *i1; *i1++ = *i2; *i2++ = i;
+       n -= sizeof (int);
+       }
+   c1 = (char *)i1; c2 = (char *)i2;
+   while (n >= 1)
+     {
+       c = *c1; *c1++ = *c2; *c2++ = c;
+       --n;
+     }
+ }
+
+static void qsort1 (char *l, char *r, size_t width,
+                    int (* CDECL compare)(const void *x1, const void *x2));
+
+void CDECL CRTDLL_qsort (void *base, size_t num, size_t width,
+                         int (*CDECL compare)(const void *x1, const void *x2))
+{
+  if (width > 0 && num > 1 && base != 0)
+    qsort1 ((char *)base, (char *)base+(num-1)*width, width, compare);
+}
+
+
+static void qsort1 (char *l, char *r, size_t width,
+                    int (* CDECL compare)(const void *x1, const void *x2))
+{
+  char *i, *j, *x;
+
+redo:
+  i = l; j = r;
+  x = l + width * (((r-l) / width) >> 1);
+  do
+    {
+      while (i != x && compare ((void *)i, (void *)x) < 0)
+        i += width;
+      while (j != x && compare ((void *)j, (void *)x) > 0)
+        j -= width;
+      if (i < j)
+        {
+          _memswap (i, j, width);
+          if (x == i)
+            x = j;
+          else if (x == j)
+            x = i;
+        }
+      if (i <= j)
+        {
+          i += width;           /* (almost) no danger */
+          if (j > l)
+            j -= width;         /* avoid wrap-around */
+        }
+    } while (i <= j);
+  if (j-l < r-i)
+    {
+      if (l < j)
+        qsort1 (l, j, width, compare);
+      if (i < r)
+        {
+          l = i;
+          goto redo;            /* qsort1 (i, r, width, compare) */
+        }
+    }
+  else
+    {
+      if (i < r)
+        qsort1 (i, r, width, compare);
+      if (l < j)
+        {
+          r = j;                /* qsort1 (l, j, width, compare) */
+          goto redo;
+        }
+    }
+}
