(BODY for FROM_LOOP): Don't advance inptr when there is not enough room in the
authordrepper <drepper>
Wed, 15 May 2002 05:36:28 +0000 (05:36 +0000)
committerdrepper <drepper>
Wed, 15 May 2002 05:36:28 +0000 (05:36 +0000)
output buffer.

iconvdata/euc-jisx0213.c
iconvdata/shift_jisx0213.c

index f3f48a5..7f56f3c 100644 (file)
                break;                                                        \
              }                                                               \
                                                                              \
                break;                                                        \
              }                                                               \
                                                                              \
-           inptr = endp;                                                     \
-                                                                             \
            if (ch < 0x80)                                                    \
              {                                                               \
                /* It's a combining character.  */                            \
            if (ch < 0x80)                                                    \
              {                                                               \
                /* It's a combining character.  */                            \
                /* See whether we have room for two characters.  */           \
                if (outptr + 8 <= outend)                                     \
                  {                                                           \
                /* See whether we have room for two characters.  */           \
                if (outptr + 8 <= outend)                                     \
                  {                                                           \
+                   inptr = endp;                                             \
                    put32 (outptr, u1);                                       \
                    outptr += 4;                                              \
                    put32 (outptr, u2);                                       \
                    put32 (outptr, u1);                                       \
                    outptr += 4;                                              \
                    put32 (outptr, u2);                                       \
                    break;                                                    \
                  }                                                           \
              }                                                               \
                    break;                                                    \
                  }                                                           \
              }                                                               \
+                                                                             \
+           inptr = endp;                                                     \
          }                                                                   \
       }                                                                              \
     else                                                                     \
          }                                                                   \
       }                                                                              \
     else                                                                     \
index 3a62724..79ea071 100644 (file)
            break;                                                            \
          }                                                                   \
                                                                              \
            break;                                                            \
          }                                                                   \
                                                                              \
-       inptr += 2;                                                           \
-                                                                             \
        if (ch < 0x80)                                                        \
          {                                                                   \
            /* It's a combining character.  */                                \
        if (ch < 0x80)                                                        \
          {                                                                   \
            /* It's a combining character.  */                                \
            /* See whether we have room for two characters.  */               \
            if (outptr + 8 <= outend)                                         \
              {                                                               \
            /* See whether we have room for two characters.  */               \
            if (outptr + 8 <= outend)                                         \
              {                                                               \
+               inptr += 2;                                                   \
                put32 (outptr, u1);                                           \
                outptr += 4;                                                  \
                put32 (outptr, u2);                                           \
                put32 (outptr, u1);                                           \
                outptr += 4;                                                  \
                put32 (outptr, u2);                                           \
                break;                                                        \
              }                                                               \
          }                                                                   \
                break;                                                        \
              }                                                               \
          }                                                                   \
+                                                                             \
+       inptr += 2;                                                           \
       }                                                                              \
     else                                                                     \
       {                                                                              \
       }                                                                              \
     else                                                                     \
       {                                                                              \