Index: trunk/src/crtdll/dir.c
===================================================================
--- trunk/src/crtdll/dir.c	(revision 7519)
+++ trunk/src/crtdll/dir.c	(revision 7521)
@@ -1,5 +1,5 @@
 /*
  * CRTDLL drive/directory functions
- * 
+ *
  * Copyright 1996,1998 Marcus Meissner
  * Copyright 1996 Jukka Iivonen
@@ -19,4 +19,5 @@
 
 #include <string.h>
+#include <ctype.h>                      /* toupper proto */
 
 DEFAULT_DEBUG_CHANNEL(crtdll);
@@ -57,5 +58,5 @@
  * RETURNS
  * Sucess:  0
- * 
+ *
  * Failure: -1
  */
@@ -64,5 +65,5 @@
   dprintf(("CRTDLL: _chdir(%s)\n",
           newdir));
-  
+
   if (!SetCurrentDirectoryA(newdir))
   {
@@ -84,6 +85,6 @@
  * RETURNS
  * Sucess:  0
- * 
- * Failure: 1 
+ *
+ * Failure: 1
  */
 BOOL CDECL CRTDLL__chdrive(INT newdrive)
@@ -91,8 +92,8 @@
   char buffer[3] = "A:";
   buffer[0] += newdrive - 1;
-  
+
   dprintf(("CRTDLL: _chdrive(%s)\n",
           buffer));
-  
+
   if (!SetCurrentDirectoryA( buffer ))
   {
@@ -108,5 +109,5 @@
 /*********************************************************************
  *                  _findclose     (CRTDLL.098)
- * 
+ *
  * Free the resources from a search handle created from _findfirst.
  *
@@ -123,5 +124,5 @@
   dprintf(("CRTDLL: _findclose(%08xh)\n",
           hand));
-  
+
   if (!FindClose((HANDLE)hand))
   {
@@ -141,5 +142,5 @@
  * PARAMS
  *   fspec [in]  File specification string for search, e.g "C:\*.BAT"
- * 
+ *
  *   ft [out]    A pointer to a find_t structure to populate.
  *
@@ -155,5 +156,5 @@
   WIN32_FIND_DATAA find_data;
   HANDLE hfind;
-  
+
   dprintf(("CRTDLL: _findfirst(%s)\n",
           fspec));
@@ -173,10 +174,10 @@
 /*********************************************************************
  *                  _findnext     (CRTDLL.100)
- * 
+ *
  * Return the next matching file/directory from a search hadle.
  *
  * PARAMS
  *   hand [in] Search handle from a pervious call to _findfirst
- * 
+ *
  *   ft [out]  A pointer to a find_t structure to populate.
  *
@@ -190,8 +191,8 @@
 {
   WIN32_FIND_DATAA find_data;
-  
+
   dprintf(("CRTDLL: _findnext(%08xh)\n",
           hand));
-  
+
   if (!FindNextFileA(hand, &find_data))
   {
@@ -224,10 +225,10 @@
 {
   // return (_getcwd(buf, size));
-  
+
   char dir[_MAX_PATH];
   int dir_len = GetCurrentDirectoryA(_MAX_PATH,dir);
-  
+
   dprintf(("CRTDLL: _getcwd()\n"));
-  
+
   if (dir_len < 1)
     return NULL; /* FIXME: Real return value untested */
@@ -258,9 +259,9 @@
 {
   // return (_getdcwd(drive, buffer, maxlen));
-  
+
   static CHAR* dummy;
-  
+
   dprintf(("CRTDLL: _getdcwd()\n"));
-  
+
   if (!drive || drive == CRTDLL__getdrive())
     return CRTDLL__getcwd(buf,size); /* current */
@@ -305,7 +306,7 @@
   DWORD ret[4];
   UINT err;
-  
+
   dprintf(("CRTDLL: _getdiskfree(%08xh)\n", disk));
-  
+
   if (disk > 26)
     return ERROR_INVALID_PARAMETER; /* CRTDLL doesn't set errno here */
@@ -335,12 +336,12 @@
 {
   // return DRIVE_GetCurrentDrive() + 1;
-  
+
   char buffer[MAX_PATH];
-  
+
   dprintf(("CRTDLL: _getdrive()\n"));
 
-  if (!GetCurrentDirectoryA( sizeof(buffer), buffer )) 
-    return 0;
-  if (buffer[1] != ':') 
+  if (!GetCurrentDirectoryA( sizeof(buffer), buffer ))
+    return 0;
+  if (buffer[1] != ':')
     return 0;
   return toupper(buffer[0]) - 'A' + 1;
@@ -357,5 +358,5 @@
   dprintf(("CRTDLL: _mkdir(%s)\n",
           newdir));
-  
+
   if (CreateDirectoryA(newdir,NULL))
     return 0;
@@ -368,5 +369,5 @@
  *                  _rmdir           (CRTDLL.255)
  *
- * Delete a directory 
+ * Delete a directory
  *
  */
@@ -375,5 +376,5 @@
   dprintf(("CRTDLL: _rmdir(%s)\n",
           dir));
-  
+
   if (RemoveDirectoryA(dir))
     return 0;
Index: trunk/src/crtdll/string.c
===================================================================
--- trunk/src/crtdll/string.c	(revision 7519)
+++ trunk/src/crtdll/string.c	(revision 7521)
@@ -1,7 +1,7 @@
-/* $Id: string.c,v 1.1 2000-11-22 01:11:01 phaller Exp $ */
+/* $Id: string.c,v 1.2 2001-12-01 23:06:23 bird Exp $ */
 
 /*
  * The C RunTime DLL
- * 
+ *
  * Implements C run-time functionality as known from UNIX.
  *
@@ -19,5 +19,5 @@
 //#include <odin.h>
 //#include <os2win.h>
-//#include <ctype.h>
+#include <ctype.h>                      /* toupper proto */
 //#include <heapstring.h>
 #include <string.h>
@@ -129,5 +129,5 @@
 {
   LPSTR y=x;
-  
+
   dprintf2(("CRTDLL: _strupr(%s)\n",
            x));
@@ -342,5 +342,5 @@
   return (strstr(str1, str2));
 }
- 
+
 
 /*********************************************************************
@@ -416,5 +416,5 @@
  *                  _strdec           (CRTDLL.282)
  *
- * Return the byte before str2 while it is >= to str1. 
+ * Return the byte before str2 while it is >= to str1.
  *
  * PARAMS
@@ -509,5 +509,5 @@
   LPSTR p1;
   LPSTR p2;
- 
+
   if (str && *str)
     for (p1 = str, p2 = str + strlen(str) - 1; p2 > p1; ++p1, --p2)
@@ -569,5 +569,5 @@
 {
   //_swab(s1, s2, i);
-  
+
   if (len > 1)
   {
