Index: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	(revision 324)
+++ trunk/ChangeLog	(revision 325)
@@ -1,3 +1,8 @@
 /* $Id$ */
+
+2005-10-03: bird
+    - src/kDepPre/kDepPre.c, kBuild/bin/x86.win32/kDepPre.exe:
+        o Fixed stupid stupid bug in the win32 case correcting code.
+          Rebuilt the win32 binary.
 
 2005-08-11: bird
Index: trunk/src/kDepPre/kDepPre.c
===================================================================
--- trunk/src/kDepPre/kDepPre.c	(revision 324)
+++ trunk/src/kDepPre/kDepPre.c	(revision 325)
@@ -32,15 +32,15 @@
 #ifdef __WIN32__
 #include <windows.h>
-#endif 
-
-#ifdef HAVE_FGETC_UNLOCKED 
+#endif
+
+#ifdef HAVE_FGETC_UNLOCKED
 # define FGETC(s)   getc_unlocked(s)
 #else
 # define FGETC(s)   fgetc(s)
-#endif 
+#endif
 
 #ifdef NEED_ISBLANK
 # define isblank(ch) ( (unsigned char)(ch) == ' ' || (unsigned char)(ch) == '\t' )
-#endif 
+#endif
 
 
@@ -56,7 +56,7 @@
     struct DEP *pNext;
     /** The filename hash. */
-    unsigned    uHash; 
+    unsigned    uHash;
     /** The length of the filename. */
-    size_t      cchFilename;    
+    size_t      cchFilename;
     /** The filename. */
     char        szFilename[4];
@@ -75,5 +75,5 @@
  * Corrects the case of a path.
  * Expects a fullpath!
- * 
+ *
  * @param   pszPath     Pointer to the path, both input and output.
  *                      The buffer must be able to hold one more byte than the string length.
@@ -90,5 +90,5 @@
         } \
     } while (0)
-    
+
     char *psz = pszPath;
     if (*psz == '/' || *psz == '\\')
@@ -189,10 +189,10 @@
 }
 
-#endif 
+#endif
 
 
 /**
  * Prints the dependency chain.
- * 
+ *
  * @returns Pointer to the allocated dependency.
  * @param   pOutput     Output stream.
@@ -203,5 +203,5 @@
     for (pDep = g_pDeps; pDep; pDep = pDep->pNext)
     {
-        /* 
+        /*
          * Skip some fictive names like <built-in> and <command line>.
          */
@@ -214,9 +214,9 @@
         if (_fullpath(szFilename, pDep->szFilename, sizeof(szFilename)))
             w32_fixcase(szFilename);
+        fprintf(pOutput, " \\\n\t%s", szFilename);
+        }
+#else
         fprintf(pOutput, " \\\n\t%s", pDep->szFilename);
-        }
-#else        
-        fprintf(pOutput, " \\\n\t%s", pDep->szFilename);
-#endif        
+#endif
     }
     fprintf(pOutput, "\n\n");
@@ -249,5 +249,5 @@
 /**
  * Adds a dependency.
- * 
+ *
  * @returns Pointer to the allocated dependency.
  * @param   pszFilename     The filename.
@@ -265,5 +265,5 @@
     pDepPrev = NULL;
     for (pDep = g_pDeps; pDep; pDepPrev = pDep, pDep = pDep->pNext)
-        if (    pDep->uHash == uHash 
+        if (    pDep->uHash == uHash
             &&  pDep->cchFilename == cchFilename
             &&  !memcmp(pDep->szFilename, pszFilename, cchFilename))
@@ -300,5 +300,5 @@
 /**
  * Parses the output from a preprocessor of a C-style language.
- * 
+ *
  * @returns 0 on success.
  * @returns 1 or other approriate exit code on failure.
@@ -307,5 +307,5 @@
 static int ParseCPrecompiler(FILE *pInput)
 {
-    enum 
+    enum
     {
         C_DISCOVER = 0,
@@ -416,5 +416,5 @@
                 /* retreive and unescape the filename. */
                 char   *psz = &szBuf[0];
-                while (     (ch = FGETC(pInput)) != EOF 
+                while (     (ch = FGETC(pInput)) != EOF
                        &&   psz < &szBuf[sizeof(szBuf) - 1])
                 {
@@ -432,5 +432,5 @@
                                 fprintf(stderr, "warning: unknown escape char '%c'\n", ch);
                                 continue;
-                                
+
                         }
                         *psz++ = ch == '\\' ? '/' : ch;
@@ -443,5 +443,5 @@
                         *psz = '\0';
                         /* compare with current dep, add & switch on mismatch. */
-                        if (    !pDep 
+                        if (    !pDep
                             ||  pDep->cchFilename != cchFilename
                             ||  memcmp(pDep->szFilename, szBuf, cchFilename))
@@ -479,5 +479,5 @@
 {
     int         i;
-    
+
     /* Arguments. */
     int         iExec = 0;
