mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-30 22:43:12 +03:00
Update.
1998-04-21 20:32 Ulrich Drepper <drepper@cygnus.com> * iconv/loop.c: Allow EXTRA_LOOP_DECLS be defined and use it in function declaration. * iconv/skeleton.c: Allow PREPARE_LOOP and EXTRA_LOOP_ARGS be defined and use them in conversion function. * iconvdata/Makefile (modules): Re-add ISO6446. * iconvdata/TEST: Add tests for ASCII variants. * iconvdata/iso646.c: Rewrite to use loop.c and skeleton.c. * iconvdata/testdata/ANSI_X3.4-1968: New file. * iconvdata/testdata/BS_4730: New file. * iconvdata/testdata/BS_4730..UTF8: New file.
This commit is contained in:
12
iconv/loop.c
12
iconv/loop.c
@ -43,6 +43,8 @@
|
||||
|
||||
BODY this is supposed to expand to the body of the loop.
|
||||
The user must provide this.
|
||||
|
||||
EXTRA_LOOP_DECLS Extra arguments passed from converion loop call.
|
||||
*/
|
||||
|
||||
#include <gconv.h>
|
||||
@ -106,11 +108,18 @@
|
||||
#endif
|
||||
|
||||
|
||||
/* If no arguments have to passed to the loop function define the macro
|
||||
as empty. */
|
||||
#ifndef EXTRA_LOOP_DECLS
|
||||
# define EXTRA_LOOP_DECLS
|
||||
#endif
|
||||
|
||||
|
||||
/* The function returns the status, as defined in gconv.h. */
|
||||
static inline int
|
||||
LOOPFCT (const unsigned char **inptrp, const unsigned char *inend,
|
||||
unsigned char **outptrp, unsigned char *outend, mbstate_t *state,
|
||||
void *data, size_t *converted)
|
||||
void *data, size_t *converted EXTRA_LOOP_DECLS)
|
||||
{
|
||||
int result = GCONV_OK;
|
||||
const unsigned char *inptr = *inptrp;
|
||||
@ -222,3 +231,4 @@ LOOPFCT (const unsigned char **inptrp, const unsigned char *inend,
|
||||
#undef COUNT_CONVERTED
|
||||
#undef BODY
|
||||
#undef LOOPFCT
|
||||
#undef EXTRA_LOOP_DECLS
|
||||
|
Reference in New Issue
Block a user