Index: trunk/src/helpers/dosh.c
===================================================================
--- trunk/src/helpers/dosh.c	(revision 191)
+++ trunk/src/helpers/dosh.c	(revision 192)
@@ -3296,5 +3296,5 @@
     {
         path[cbPath] = '\\';
-        path[cbPath+1] = 0;
+        path[cbPath + 1] = 0;
     }
 
@@ -3331,4 +3331,5 @@
         cp++;
     }
+
     return (arc0);
 }
Index: trunk/src/helpers/encodings.c
===================================================================
--- trunk/src/helpers/encodings.c	(revision 191)
+++ trunk/src/helpers/encodings.c	(revision 192)
@@ -3,5 +3,5 @@
  *@@sourcefile encodings.c:
  *      character encoding support. Handles all kinds
- *      of legacy codepages (including most OS/2 codepage)
+ *      of legacy codepages (including most OS/2 codepages)
  *      and Unicode in the form of UTF-8 and translations
  *      between then.
@@ -10,5 +10,5 @@
  *
  *      Be warned, compilation of this file takes a long
- *      file because this includes all the complex codepage
+ *      file because this includes all the complex codepages
  *      from include\encodings.
  *
@@ -163,9 +163,9 @@
             *ppMap = G_aEncodings[ul].pMap;
             *pcEntries = G_aEncodings[ul].cEntries;
-            return (1);
+            return 1;
         }
     }
 
-    return (0);
+    return 0;
 }
 
@@ -198,5 +198,5 @@
     }
 
-    return (UNSUPPORTED);
+    return UNSUPPORTED;
 }
 
@@ -330,5 +330,5 @@
                     }
 
-                    return (pTableNew);
+                    return pTableNew;
                 }
 
@@ -385,7 +385,7 @@
          && (c <= pTable->usHighestCP)
        )
-        return (pTable->ausEntriesUniFromCP[c]);
-
-    return (0xFFFF);
+        return pTable->ausEntriesUniFromCP[c];
+
+    return 0xFFFF;
 }
 
@@ -410,7 +410,7 @@
          && (ulUni <= pTable->usHighestUni)
        )
-        return (pTable->ausEntriesCPFromUni[ulUni]);
-
-    return (0xFFFF);
+        return pTable->ausEntriesCPFromUni[ulUni];
+
+    return 0xFFFF;
 }
 
@@ -445,4 +445,6 @@
 {
     unsigned long   ulChar;
+    unsigned long   ulCount;
+    int             fIllegal;
 
     if (!(ulChar = **ppch))
@@ -455,87 +457,85 @@
     {
         (*ppch)++;
-        return (ulChar);
+        return ulChar;
+    }
+
+    ulCount = 1;
+    fIllegal = 0;
+
+    // note: 0xc0 and 0xc1 are reserved and
+    // cannot appear as the first UTF-8 byte
+
+    if (    (ulChar >= 0xc2)
+         && (ulChar < 0xe0)
+       )
+    {
+        // that's two bytes
+        ulCount = 2;
+        ulChar &= 0x1f;
+    }
+    else if ((ulChar & 0xf0) == 0xe0)
+    {
+        // three bytes
+        ulCount = 3;
+        ulChar &= 0x0f;
+    }
+    else if ((ulChar & 0xf8) == 0xf0)
+    {
+        // four bytes
+        ulCount = 4;
+        ulChar &= 0x07;
+    }
+    else if ((ulChar & 0xfc) == 0xf8)
+    {
+        // five bytes
+        ulCount = 5;
+        ulChar &= 0x03;
+    }
+    else if ((ulChar & 0xfe) == 0xfc)
+    {
+        // six bytes
+        ulCount = 6;
+        ulChar &= 0x01;
     }
     else
-    {
-        unsigned long ulCount = 1;
-        int fIllegal = 0;
-
-        // note: 0xc0 and 0xc1 are reserved and
-        // cannot appear as the first UTF-8 byte
-
-        if (    (ulChar >= 0xc2)
-             && (ulChar < 0xe0)
-           )
+        ++fIllegal;
+
+    if (!fIllegal)
+    {
+        // go for the second and more bytes then
+        int ul2;
+
+        for (ul2 = 1;
+             ul2 < ulCount;
+             ++ul2)
         {
-            // that's two bytes
-            ulCount = 2;
-            ulChar &= 0x1f;
+            unsigned long ulChar2 = *((*ppch) + ul2);
+
+            if (!(ulChar2 & 0xc0)) //  != 0x80)
+            {
+                ++fIllegal;
+                break;
+            }
+
+            ulChar <<= 6;
+            ulChar |= ulChar2 & 0x3f;
         }
-        else if ((ulChar & 0xf0) == 0xe0)
+    }
+
+    if (fIllegal)
+    {
+        // skip all the following characters
+        // until we find something with bit 7 off
+        do
         {
-            // three bytes
-            ulCount = 3;
-            ulChar &= 0x0f;
-        }
-        else if ((ulChar & 0xf8) == 0xf0)
-        {
-            // four bytes
-            ulCount = 4;
-            ulChar &= 0x07;
-        }
-        else if ((ulChar & 0xfc) == 0xf8)
-        {
-            // five bytes
-            ulCount = 5;
-            ulChar &= 0x03;
-        }
-        else if ((ulChar & 0xfe) == 0xfc)
-        {
-            // six bytes
-            ulCount = 6;
-            ulChar &= 0x01;
-        }
-        else
-            ++fIllegal;
-
-        if (!fIllegal)
-        {
-            // go for the second and more bytes then
-            int ul2;
-
-            for (ul2 = 1;
-                 ul2 < ulCount;
-                 ++ul2)
-            {
-                unsigned long ulChar2 = *((*ppch) + ul2);
-
-                if (!(ulChar2 & 0xc0)) //  != 0x80)
-                {
-                    ++fIllegal;
-                    break;
-                }
-
-                ulChar <<= 6;
-                ulChar |= ulChar2 & 0x3f;
-            }
-        }
-
-        if (fIllegal)
-        {
-            // skip all the following characters
-            // until we find something with bit 7 off
-            do
-            {
-                ulChar = *(++(*ppch));
-                if (!ulChar)
-                    break;
-            } while (ulChar & 0x80);
-        }
-        else
-            *ppch += ulCount;
-    }
-
-    return (ulChar);
+            ulChar = *(++(*ppch));
+            if (!ulChar)
+                break;
+        } while (ulChar & 0x80);
+    }
+    else
+        *ppch += ulCount;
+
+    return ulChar;
 }
 
