Update.
authorUlrich Drepper <drepper@redhat.com>
Fri, 7 Apr 2000 07:40:43 +0000 (07:40 +0000)
committerUlrich Drepper <drepper@redhat.com>
Fri, 7 Apr 2000 07:40:43 +0000 (07:40 +0000)
2000-04-07  Ulrich Drepper  <drepper@redhat.com>

* wcsmbs/wchar.h (__mbstate_t): Rename elements.  Make __value
element a union to allow byte access.
* iconvdata/iso-2022-cn.c: Adjust for change of element name in
mbstate_t.
* iconvdata/iso-2022-jp.c: Likewise.
* iconvdata/iso-2022-kr.c: Likewise.

ChangeLog
iconvdata/iso-2022-cn.c
iconvdata/iso-2022-jp.c
iconvdata/iso-2022-kr.c
wcsmbs/wchar.h

index 0b8ec99..9e90ee8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2000-04-07  Ulrich Drepper  <drepper@redhat.com>
+
+       * wcsmbs/wchar.h (__mbstate_t): Rename elements.  Make __value
+       element a union to allow byte access.
+       * iconvdata/iso-2022-cn.c: Adjust for change of element name in
+       mbstate_t.
+       * iconvdata/iso-2022-jp.c: Likewise.
+       * iconvdata/iso-2022-kr.c: Likewise.
+
 2000-04-06  Ulrich Drepper  <drepper@redhat.com>
 
        * sysdeps/unix/sysv/linux/getdents.c (__getdents): The Linux
index 1b0eefb..cadebe9 100644 (file)
@@ -50,7 +50,7 @@
 #define MAX_NEEDED_TO          4
 #define PREPARE_LOOP \
   int save_set;                                                                      \
-  int *setp = &data->__statep->count;
+  int *setp = &data->__statep->__count;
 #define EXTRA_LOOP_ARGS                , setp
 
 
@@ -73,12 +73,12 @@ enum
    the output state to the initial state.  This has to be done during the
    flushing.  */
 #define EMIT_SHIFT_TO_INIT \
-  if (data->__statep->count != ASCII_set)                                    \
+  if (data->__statep->__count != ASCII_set)                                  \
     {                                                                        \
       if (FROM_DIRECTION)                                                    \
        /* It's easy, we don't have to emit anything, we just reset the       \
           state for the input.  */                                           \
-       data->__statep->count = ASCII_set;                                    \
+       data->__statep->__count = ASCII_set;                                  \
       else                                                                   \
        {                                                                     \
          unsigned char *outbuf = data->__outbuf;                             \
@@ -95,7 +95,7 @@ enum
              if (data->__is_last)                                            \
                *written += 1;                                                \
              data->__outbuf = outbuf;                                        \
-             data->__statep->count = ASCII_set;                              \
+             data->__statep->__count = ASCII_set;                            \
            }                                                                 \
        }                                                                     \
     }
index decb6c1..99f45da 100644 (file)
@@ -56,7 +56,7 @@ struct gap
   enum direction dir = ((struct iso2022jp_data *) step->__data)->dir;        \
   enum variant var = ((struct iso2022jp_data *) step->__data)->var;          \
   int save_set;                                                                      \
-  int *setp = &data->__statep->count;
+  int *setp = &data->__statep->__count;
 #define EXTRA_LOOP_ARGS                , var, setp
 
 
@@ -188,7 +188,7 @@ gconv_end (struct __gconv_step *data)
    the output state to the initial state.  This has to be done during the
    flushing.  */
 #define EMIT_SHIFT_TO_INIT \
-  if (data->__statep->count != ASCII_set)                                    \
+  if (data->__statep->__count != ASCII_set)                                  \
     {                                                                        \
       enum direction dir = ((struct iso2022jp_data *) step->__data)->dir;     \
                                                                              \
@@ -196,7 +196,7 @@ gconv_end (struct __gconv_step *data)
        /* It's easy, we don't have to emit anything, we just reset the       \
           state for the input.  Note that this also clears the G2            \
           designation.  */                                                   \
-       data->__statep->count = ASCII_set;                                    \
+       data->__statep->__count = ASCII_set;                                  \
       else                                                                   \
        {                                                                     \
          unsigned char *outbuf = data->__outbuf;                             \
@@ -216,7 +216,7 @@ gconv_end (struct __gconv_step *data)
                *written += 3;                                                \
              data->__outbuf = outbuf;                                        \
              /* Note that this also clears the G2 designation.  */           \
-             data->__statep->count = ASCII_set;                              \
+             data->__statep->__count = ASCII_set;                            \
            }                                                                 \
        }                                                                     \
     }
index ea03353..11811d0 100644 (file)
@@ -44,7 +44,7 @@
 #define MAX_NEEDED_TO          4
 #define PREPARE_LOOP \
   int save_set;                                                                      \
-  int *setp = &data->__statep->count;                                        \
+  int *setp = &data->__statep->__count;                                              \
   if (!FROM_DIRECTION && !data->__internal_use                               \
       && data->__invocation_counter == 0)                                    \
     {                                                                        \
@@ -73,12 +73,12 @@ enum
    the output state to the initial state.  This has to be done during the
    flushing.  */
 #define EMIT_SHIFT_TO_INIT \
-  if (data->__statep->count != ASCII_set)                                    \
+  if (data->__statep->__count != ASCII_set)                                  \
     {                                                                        \
       if (FROM_DIRECTION)                                                    \
        /* It's easy, we don't have to emit anything, we just reset the       \
           state for the input.  */                                           \
-       data->__statep->count = ASCII_set;                                    \
+       data->__statep->__count = ASCII_set;                                  \
       else                                                                   \
        {                                                                     \
          unsigned char *outbuf = data->__outbuf;                             \
@@ -95,7 +95,7 @@ enum
              if (data->__is_last)                                            \
                *written += 1;                                                \
              data->__outbuf = outbuf;                                        \
-             data->__statep->count = ASCII_set;                              \
+             data->__statep->__count = ASCII_set;                            \
            }                                                                 \
        }                                                                     \
     }
index 0903b55..66e7290 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1995-1999, 2000 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -61,8 +61,12 @@ typedef unsigned int wint_t;
 /* Conversion state information.  */
 typedef struct
 {
-  int count;           /* Number of bytes needed for the current character. */
-  wint_t value;                /* Value so far.  */
+  int __count;
+  union
+  {
+    wint_t __wch;
+    char __wchb[4];
+  } __value;           /* Value so far.  */
 } __mbstate_t;
 #endif
 #undef __need_mbstate_t