Define {FROM,TO}_LOOP_{MIN,MAX}_NEEDED_{FROM,TO} instead of
authordrepper <drepper>
Wed, 15 May 2002 05:29:06 +0000 (05:29 +0000)
committerdrepper <drepper>
Wed, 15 May 2002 05:29:06 +0000 (05:29 +0000)
{MIN,MAX}_NEEDED_{FROM,TO}. Set FROM_LOOP_MAX_NEEDED_TO to 4, not 8.

iconvdata/cp1255.c
iconvdata/cp1258.c

index f8a7695..af69e83 100644 (file)
@@ -1,5 +1,5 @@
 /* Conversion from and to CP1255.
-   Copyright (C) 1998, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1998, 2001, 2002 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998,
    and Bruno Haible <haible@clisp.cons.org>, 2001.
 #define TO_LOOP                        to_cp1255
 #define DEFINE_INIT            1
 #define DEFINE_FINI            1
-#define MIN_NEEDED_FROM                1
-#define MAX_NEEDED_FROM                1
-#define MIN_NEEDED_TO          4
-#define MAX_NEEDED_TO          4
+#define FROM_LOOP_MIN_NEEDED_FROM      1
+#define FROM_LOOP_MAX_NEEDED_FROM      1
+#define FROM_LOOP_MIN_NEEDED_TO                4
+#define FROM_LOOP_MAX_NEEDED_TO                4
+#define TO_LOOP_MIN_NEEDED_FROM                4
+#define TO_LOOP_MAX_NEEDED_FROM                4
+#define TO_LOOP_MIN_NEEDED_TO          1
+#define TO_LOOP_MAX_NEEDED_TO          3
 #define PREPARE_LOOP \
   int saved_state;                                                           \
   int *statep = &data->__statep->__count;
@@ -183,9 +187,10 @@ static const struct { unsigned int idx; unsigned int len; } comp_table[8] = {
   { COMP_TABLE_IDX_05C2, COMP_TABLE_LEN_05C2 },
 };
 
-#define MIN_NEEDED_INPUT       MIN_NEEDED_FROM
-#define MIN_NEEDED_OUTPUT      MIN_NEEDED_TO
-#define MAX_NEEDED_OUTPUT      8
+#define MIN_NEEDED_INPUT       FROM_LOOP_MIN_NEEDED_FROM
+#define MAX_NEEDED_INPUT       FROM_LOOP_MAX_NEEDED_FROM
+#define MIN_NEEDED_OUTPUT      FROM_LOOP_MIN_NEEDED_TO
+#define MAX_NEEDED_OUTPUT      FROM_LOOP_MAX_NEEDED_TO
 #define LOOPFCT                        FROM_LOOP
 #define BODY \
   {                                                                          \
@@ -417,9 +422,10 @@ static const struct {
   { 0xFB4E, 0x05E4, 5, -1 },
 };
 
-#define MIN_NEEDED_INPUT       MIN_NEEDED_TO
-#define MIN_NEEDED_OUTPUT      MIN_NEEDED_FROM
-#define MAX_NEEDED_OUTPUT      3
+#define MIN_NEEDED_INPUT       TO_LOOP_MIN_NEEDED_FROM
+#define MAX_NEEDED_INPUT       TO_LOOP_MAX_NEEDED_FROM
+#define MIN_NEEDED_OUTPUT      TO_LOOP_MIN_NEEDED_TO
+#define MAX_NEEDED_OUTPUT      TO_LOOP_MAX_NEEDED_TO
 #define LOOPFCT                        TO_LOOP
 #define BODY \
   {                                                                          \
index 8351f27..af206a2 100644 (file)
@@ -1,5 +1,5 @@
 /* Conversion from and to CP1258.
-   Copyright (C) 1998, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1998, 2001, 2002 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998,
    and Bruno Haible <haible@clisp.cons.org>, 2001.
 #define TO_LOOP                        to_cp1258
 #define DEFINE_INIT            1
 #define DEFINE_FINI            1
-#define MIN_NEEDED_FROM                1
-#define MAX_NEEDED_FROM                1
-#define MIN_NEEDED_TO          4
-#define MAX_NEEDED_TO          4
+#define FROM_LOOP_MIN_NEEDED_FROM      1
+#define FROM_LOOP_MAX_NEEDED_FROM      1
+#define FROM_LOOP_MIN_NEEDED_TO                4
+#define FROM_LOOP_MAX_NEEDED_TO                4
+#define TO_LOOP_MIN_NEEDED_FROM                4
+#define TO_LOOP_MAX_NEEDED_FROM                4
+#define TO_LOOP_MIN_NEEDED_TO          1
+#define TO_LOOP_MAX_NEEDED_TO          2
 #define PREPARE_LOOP \
   int saved_state;                                                           \
   int *statep = &data->__statep->__count;
@@ -358,9 +362,10 @@ static const struct
     { COMP_TABLE_IDX_0323, COMP_TABLE_LEN_0323 }
   };
 
-#define MIN_NEEDED_INPUT       MIN_NEEDED_FROM
-#define MIN_NEEDED_OUTPUT      MIN_NEEDED_TO
-#define MAX_NEEDED_OUTPUT      8
+#define MIN_NEEDED_INPUT       FROM_LOOP_MIN_NEEDED_FROM
+#define MAX_NEEDED_INPUT       FROM_LOOP_MAX_NEEDED_FROM
+#define MIN_NEEDED_OUTPUT      FROM_LOOP_MIN_NEEDED_TO
+#define MAX_NEEDED_OUTPUT      FROM_LOOP_MAX_NEEDED_TO
 #define LOOPFCT                        FROM_LOOP
 #define BODY \
   {                                                                          \
@@ -748,9 +753,10 @@ static const struct
     { 0x1fee, 0xa8, 0xec },
   };
 
-#define MIN_NEEDED_INPUT       MIN_NEEDED_TO
-#define MIN_NEEDED_OUTPUT      MIN_NEEDED_FROM
-#define MAX_NEEDED_OUTPUT      2
+#define MIN_NEEDED_INPUT       TO_LOOP_MIN_NEEDED_FROM
+#define MAX_NEEDED_INPUT       TO_LOOP_MAX_NEEDED_FROM
+#define MIN_NEEDED_OUTPUT      TO_LOOP_MIN_NEEDED_TO
+#define MAX_NEEDED_OUTPUT      TO_LOOP_MAX_NEEDED_TO
 #define LOOPFCT                        TO_LOOP
 #define BODY \
   {                                                                          \