Use Gnulib's `sys_stat' module; update Gnulib.
[bpt/guile.git] / lib / iconv_open.c
index a17df2d..d62dfda 100644 (file)
@@ -67,33 +67,33 @@ rpl_iconv_open (const char *tocode, const char *fromcode)
       && fromcode[3] == '-')
     {
       if (c_toupper (tocode[0]) == 'U'
-         && c_toupper (tocode[1]) == 'T'
-         && c_toupper (tocode[2]) == 'F'
-         && tocode[3] == '-')
-       {
-         if (strcmp (fromcode + 4, "8") == 0)
-           {
-             if (c_strcasecmp (tocode + 4, "16BE") == 0)
-               return _ICONV_UTF8_UTF16BE;
-             if (c_strcasecmp (tocode + 4, "16LE") == 0)
-               return _ICONV_UTF8_UTF16LE;
-             if (c_strcasecmp (tocode + 4, "32BE") == 0)
-               return _ICONV_UTF8_UTF32BE;
-             if (c_strcasecmp (tocode + 4, "32LE") == 0)
-               return _ICONV_UTF8_UTF32LE;
-           }
-         else if (strcmp (tocode + 4, "8") == 0)
-           {
-             if (c_strcasecmp (fromcode + 4, "16BE") == 0)
-               return _ICONV_UTF16BE_UTF8;
-             if (c_strcasecmp (fromcode + 4, "16LE") == 0)
-               return _ICONV_UTF16LE_UTF8;
-             if (c_strcasecmp (fromcode + 4, "32BE") == 0)
-               return _ICONV_UTF32BE_UTF8;
-             if (c_strcasecmp (fromcode + 4, "32LE") == 0)
-               return _ICONV_UTF32LE_UTF8;
-           }
-       }
+          && c_toupper (tocode[1]) == 'T'
+          && c_toupper (tocode[2]) == 'F'
+          && tocode[3] == '-')
+        {
+          if (strcmp (fromcode + 4, "8") == 0)
+            {
+              if (c_strcasecmp (tocode + 4, "16BE") == 0)
+                return _ICONV_UTF8_UTF16BE;
+              if (c_strcasecmp (tocode + 4, "16LE") == 0)
+                return _ICONV_UTF8_UTF16LE;
+              if (c_strcasecmp (tocode + 4, "32BE") == 0)
+                return _ICONV_UTF8_UTF32BE;
+              if (c_strcasecmp (tocode + 4, "32LE") == 0)
+                return _ICONV_UTF8_UTF32LE;
+            }
+          else if (strcmp (tocode + 4, "8") == 0)
+            {
+              if (c_strcasecmp (fromcode + 4, "16BE") == 0)
+                return _ICONV_UTF16BE_UTF8;
+              if (c_strcasecmp (fromcode + 4, "16LE") == 0)
+                return _ICONV_UTF16LE_UTF8;
+              if (c_strcasecmp (fromcode + 4, "32BE") == 0)
+                return _ICONV_UTF32BE_UTF8;
+              if (c_strcasecmp (fromcode + 4, "32LE") == 0)
+                return _ICONV_UTF32LE_UTF8;
+            }
+        }
     }
 #endif
 
@@ -116,20 +116,20 @@ rpl_iconv_open (const char *tocode, const char *fromcode)
 
   /* Convert the encodings to upper case, because
        1. in the arguments of iconv_open() on AIX, HP-UX, and OSF/1 the case
-         matters,
+          matters,
        2. it makes searching in the table faster.  */
   {
     const char *p = fromcode;
     char *q = fromcode_upper;
     while ((*q = c_toupper (*p)) != '\0')
       {
-       p++;
-       q++;
-       if (q == &fromcode_upper[SIZEOF (fromcode_upper)])
-         {
-           errno = EINVAL;
-           return (iconv_t)(-1);
-         }
+        p++;
+        q++;
+        if (q == &fromcode_upper[SIZEOF (fromcode_upper)])
+          {
+            errno = EINVAL;
+            return (iconv_t)(-1);
+          }
       }
     fromcode_upper_end = q;
   }
@@ -139,13 +139,13 @@ rpl_iconv_open (const char *tocode, const char *fromcode)
     char *q = tocode_upper;
     while ((*q = c_toupper (*p)) != '\0')
       {
-       p++;
-       q++;
-       if (q == &tocode_upper[SIZEOF (tocode_upper)])
-         {
-           errno = EINVAL;
-           return (iconv_t)(-1);
-         }
+        p++;
+        q++;
+        if (q == &tocode_upper[SIZEOF (tocode_upper)])
+          {
+            errno = EINVAL;
+            return (iconv_t)(-1);
+          }
       }
     tocode_upper_end = q;
   }