mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-07 06:43:00 +03:00
Update.
2000-09-24 Ulrich Drepper <drepper@redhat.com> * libio/genops.c (_IO_doallocbuf): Don't use single byte buffer if stream is in wide mode. * stdio-common/vfprintf.c (buffered_vfprintf): Orient stream. 2000-09-21 Bruno Haible <haible@clisp.cons.org> * iconvdata/iso-2022-cn-ext.c (EMIT_SHIFT_TO_INIT): Shift __count by 3, not 2. (INIT_PARAMS, UPDATE_PARAMS): Likewise. handling. * stdio/tst-printf.sh: Adjust expected results. Reported by Joseph S. Myers <jsm28@cam.ac.uk>.
This commit is contained in:
17
ChangeLog
17
ChangeLog
@@ -1,3 +1,16 @@
|
|||||||
|
2000-09-24 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* libio/genops.c (_IO_doallocbuf): Don't use single byte buffer if
|
||||||
|
stream is in wide mode.
|
||||||
|
|
||||||
|
* stdio-common/vfprintf.c (buffered_vfprintf): Orient stream.
|
||||||
|
|
||||||
|
2000-09-21 Bruno Haible <haible@clisp.cons.org>
|
||||||
|
|
||||||
|
* iconvdata/iso-2022-cn-ext.c (EMIT_SHIFT_TO_INIT): Shift __count
|
||||||
|
by 3, not 2.
|
||||||
|
(INIT_PARAMS, UPDATE_PARAMS): Likewise.
|
||||||
|
|
||||||
2000-09-21 Bruno Haible <haible@clisp.cons.org>
|
2000-09-21 Bruno Haible <haible@clisp.cons.org>
|
||||||
|
|
||||||
* stdio-common/vfscanf.c (__vfscanf, _IO_vfscanf): Fix bugs in
|
* stdio-common/vfscanf.c (__vfscanf, _IO_vfscanf): Fix bugs in
|
||||||
@@ -8,7 +21,9 @@
|
|||||||
* stdio-common/vfprintf.c (process_arg): Handle %hhn.
|
* stdio-common/vfprintf.c (process_arg): Handle %hhn.
|
||||||
Add missing case in va_arg handling for numbers.
|
Add missing case in va_arg handling for numbers.
|
||||||
* stdio-common/tst-printf.c (main): Add tests for %hhu and %hhn
|
* stdio-common/tst-printf.c (main): Add tests for %hhu and %hhn
|
||||||
handling. Reported by Joseph S. Myers <jsm28@cam.ac.uk>.
|
handling.
|
||||||
|
* stdio/tst-printf.sh: Adjust expected results.
|
||||||
|
Reported by Joseph S. Myers <jsm28@cam.ac.uk>.
|
||||||
|
|
||||||
2000-09-20 Bruno Haible <haible@clisp.cons.org>
|
2000-09-20 Bruno Haible <haible@clisp.cons.org>
|
||||||
|
|
||||||
|
@@ -123,12 +123,12 @@ enum
|
|||||||
the output state to the initial state. This has to be done during the
|
the output state to the initial state. This has to be done during the
|
||||||
flushing. */
|
flushing. */
|
||||||
#define EMIT_SHIFT_TO_INIT \
|
#define EMIT_SHIFT_TO_INIT \
|
||||||
if (data->__statep->__count >> 2 != ASCII_set) \
|
if (data->__statep->__count >> 3 != ASCII_set) \
|
||||||
{ \
|
{ \
|
||||||
if (FROM_DIRECTION) \
|
if (FROM_DIRECTION) \
|
||||||
/* It's easy, we don't have to emit anything, we just reset the \
|
/* It's easy, we don't have to emit anything, we just reset the \
|
||||||
state for the input. */ \
|
state for the input. */ \
|
||||||
data->__statep->__count = ASCII_set << 2; \
|
data->__statep->__count = ASCII_set << 3; \
|
||||||
else \
|
else \
|
||||||
{ \
|
{ \
|
||||||
unsigned char *outbuf = data->__outbuf; \
|
unsigned char *outbuf = data->__outbuf; \
|
||||||
@@ -145,7 +145,7 @@ enum
|
|||||||
if (data->__flags & __GCONV_IS_LAST) \
|
if (data->__flags & __GCONV_IS_LAST) \
|
||||||
*irreversible += 1; \
|
*irreversible += 1; \
|
||||||
data->__outbuf = outbuf; \
|
data->__outbuf = outbuf; \
|
||||||
data->__statep->__count = ASCII_set << 2; \
|
data->__statep->__count = ASCII_set << 3; \
|
||||||
} \
|
} \
|
||||||
} \
|
} \
|
||||||
}
|
}
|
||||||
@@ -394,9 +394,9 @@ enum
|
|||||||
*((uint32_t *) outptr)++ = ch; \
|
*((uint32_t *) outptr)++ = ch; \
|
||||||
}
|
}
|
||||||
#define EXTRA_LOOP_DECLS , int *setp
|
#define EXTRA_LOOP_DECLS , int *setp
|
||||||
#define INIT_PARAMS int set = (*setp >> 2) & CURRENT_MASK; \
|
#define INIT_PARAMS int set = (*setp >> 3) & CURRENT_MASK; \
|
||||||
int ann = (*setp >> 2) & ~CURRENT_MASK
|
int ann = (*setp >> 3) & ~CURRENT_MASK
|
||||||
#define UPDATE_PARAMS *setp = (set | ann) << 2
|
#define UPDATE_PARAMS *setp = (set | ann) << 3
|
||||||
#define LOOP_NEED_FLAGS
|
#define LOOP_NEED_FLAGS
|
||||||
#include <iconv/loop.c>
|
#include <iconv/loop.c>
|
||||||
|
|
||||||
@@ -644,9 +644,9 @@ enum
|
|||||||
inptr += 4; \
|
inptr += 4; \
|
||||||
}
|
}
|
||||||
#define EXTRA_LOOP_DECLS , int *setp
|
#define EXTRA_LOOP_DECLS , int *setp
|
||||||
#define INIT_PARAMS int set = (*setp >> 2) & CURRENT_MASK; \
|
#define INIT_PARAMS int set = (*setp >> 3) & CURRENT_MASK; \
|
||||||
int ann = (*setp >> 2) & ~CURRENT_MASK
|
int ann = (*setp >> 3) & ~CURRENT_MASK
|
||||||
#define UPDATE_PARAMS *setp = (set | ann) << 2
|
#define UPDATE_PARAMS *setp = (set | ann) << 3
|
||||||
#define LOOP_NEED_FLAGS
|
#define LOOP_NEED_FLAGS
|
||||||
#include <iconv/loop.c>
|
#include <iconv/loop.c>
|
||||||
|
|
||||||
|
@@ -368,7 +368,7 @@ _IO_doallocbuf (fp)
|
|||||||
{
|
{
|
||||||
if (fp->_IO_buf_base)
|
if (fp->_IO_buf_base)
|
||||||
return;
|
return;
|
||||||
if (!(fp->_flags & _IO_UNBUFFERED))
|
if (!(fp->_flags & _IO_UNBUFFERED) || fp->_mode > 0)
|
||||||
if (_IO_DOALLOCATE (fp) != EOF)
|
if (_IO_DOALLOCATE (fp) != EOF)
|
||||||
return;
|
return;
|
||||||
_IO_setb (fp, fp->_shortbuf, fp->_shortbuf+1, 0);
|
_IO_setb (fp, fp->_shortbuf, fp->_shortbuf+1, 0);
|
||||||
|
@@ -134,6 +134,8 @@ prefix 6d 6o 6x 6X 6u
|
|||||||
0.10000000000000009
|
0.10000000000000009
|
||||||
Test ok.
|
Test ok.
|
||||||
sprintf (buf, "%07Lo", 040000000000ll) = 40000000000
|
sprintf (buf, "%07Lo", 040000000000ll) = 40000000000
|
||||||
|
printf ("%hhu", 257) = 1
|
||||||
|
printf ("%hu", 65537) = 1
|
||||||
--- Should be no further output. ---
|
--- Should be no further output. ---
|
||||||
EOF
|
EOF
|
||||||
cmp - ${common_objpfx}stdio-common/tst-printf.out >& /dev/null ||
|
cmp - ${common_objpfx}stdio-common/tst-printf.out >& /dev/null ||
|
||||||
@@ -243,6 +245,8 @@ prefix 6d 6o 6x 6X 6u
|
|||||||
0.10000000000000009
|
0.10000000000000009
|
||||||
Test ok.
|
Test ok.
|
||||||
sprintf (buf, "%07Lo", 040000000000ll) = 40000000000
|
sprintf (buf, "%07Lo", 040000000000ll) = 40000000000
|
||||||
|
printf ("%hhu", 257) = 1
|
||||||
|
printf ("%hu", 65537) = 1
|
||||||
--- Should be no further output. ---
|
--- Should be no further output. ---
|
||||||
EOF
|
EOF
|
||||||
cmp - ${common_objpfx}stdio-common/tst-printf.out >& /dev/null ||
|
cmp - ${common_objpfx}stdio-common/tst-printf.out >& /dev/null ||
|
||||||
|
@@ -2062,6 +2062,11 @@ buffered_vfprintf (register _IO_FILE *s, const CHAR_T *format,
|
|||||||
register _IO_FILE *hp = (_IO_FILE *) &helper._f;
|
register _IO_FILE *hp = (_IO_FILE *) &helper._f;
|
||||||
int result, to_flush;
|
int result, to_flush;
|
||||||
|
|
||||||
|
/* Orient the stream. */
|
||||||
|
#ifdef ORIENT
|
||||||
|
ORIENT;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Initialize helper. */
|
/* Initialize helper. */
|
||||||
helper._put_stream = s;
|
helper._put_stream = s;
|
||||||
#ifdef COMPILE_WPRINTF
|
#ifdef COMPILE_WPRINTF
|
||||||
@@ -2122,6 +2127,11 @@ buffered_vfprintf (register FILE *s, const CHAR_T *format, va_list args)
|
|||||||
char buf[BUFSIZ];
|
char buf[BUFSIZ];
|
||||||
int result;
|
int result;
|
||||||
|
|
||||||
|
/* Orient the stream. */
|
||||||
|
#ifdef ORIENT
|
||||||
|
ORIENT;
|
||||||
|
#endif
|
||||||
|
|
||||||
s->__bufp = s->__buffer = buf;
|
s->__bufp = s->__buffer = buf;
|
||||||
s->__bufsize = sizeof buf;
|
s->__bufsize = sizeof buf;
|
||||||
s->__put_limit = s->__buffer + s->__bufsize;
|
s->__put_limit = s->__buffer + s->__bufsize;
|
||||||
|
Reference in New Issue
Block a user