-/* Copyright (C) 1997-1999, 2000-2002, 2007, 2011 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2016 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
{
__GCONV_IS_LAST = 0x0001,
__GCONV_IGNORE_ERRORS = 0x0002,
- __GCONV_SWAP = 0x0004
+ __GCONV_SWAP = 0x0004,
+ __GCONV_TRANSLIT = 0x0008
};
struct __gconv_step;
struct __gconv_step_data;
struct __gconv_loaded_object;
-struct __gconv_trans_data;
/* Type of a conversion function. */
typedef void (*__gconv_end_fct) (struct __gconv_step *);
-/* Type of a transliteration/transscription function. */
-typedef int (*__gconv_trans_fct) (struct __gconv_step *,
- struct __gconv_step_data *, void *,
- const unsigned char *,
- const unsigned char **,
- const unsigned char *, unsigned char **,
- size_t *);
-
-/* Function to call to provide transliteration module with context. */
-typedef int (*__gconv_trans_context_fct) (void *, const unsigned char *,
- const unsigned char *,
- unsigned char *, unsigned char *);
-
-/* Function to query module about supported encoded character sets. */
-typedef int (*__gconv_trans_query_fct) (const char *, const char ***,
- size_t *);
-
-/* Constructor and destructor for local data for transliteration. */
-typedef int (*__gconv_trans_init_fct) (void **, const char *);
-typedef void (*__gconv_trans_end_fct) (void *);
-
-struct __gconv_trans_data
-{
- /* Transliteration/Transscription function. */
- __gconv_trans_fct __trans_fct;
- __gconv_trans_context_fct __trans_context_fct;
- __gconv_trans_end_fct __trans_end_fct;
- void *__data;
- struct __gconv_trans_data *__next;
-};
-
-
/* Description of a conversion step. */
struct __gconv_step
{
__mbstate_t *__statep;
__mbstate_t __state; /* This element must not be used directly by
any module; always use STATEP! */
-
- /* Transliteration information. */
- struct __gconv_trans_data *__trans;
};
__extension__ struct __gconv_step_data __data __flexarr;
} *__gconv_t;
+/* Transliteration using the locale's data. */
+extern int __gconv_transliterate (struct __gconv_step *step,
+ struct __gconv_step_data *step_data,
+ const unsigned char *inbufstart,
+ const unsigned char **inbufp,
+ const unsigned char *inbufend,
+ unsigned char **outbufstart,
+ size_t *irreversible);
+
#endif /* gconv.h */