]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - iconv/gconv.h
Update copyright dates with scripts/update-copyrights.
[thirdparty/glibc.git] / iconv / gconv.h
index 3f9112ef8272f669625f0924e98e3e9411a26df5..8d8ce5813b72b286d9137f49759d8183d4653a01 100644 (file)
@@ -1,4 +1,4 @@
-/* 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
@@ -56,7 +56,8 @@ enum
 {
   __GCONV_IS_LAST = 0x0001,
   __GCONV_IGNORE_ERRORS = 0x0002,
-  __GCONV_SWAP = 0x0004
+  __GCONV_SWAP = 0x0004,
+  __GCONV_TRANSLIT = 0x0008
 };
 
 
@@ -64,7 +65,6 @@ enum
 struct __gconv_step;
 struct __gconv_step_data;
 struct __gconv_loaded_object;
-struct __gconv_trans_data;
 
 
 /* Type of a conversion function.  */
@@ -80,38 +80,6 @@ typedef int (*__gconv_init_fct) (struct __gconv_step *);
 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
 {
@@ -163,9 +131,6 @@ struct __gconv_step_data
   __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;
 };
 
 
@@ -177,4 +142,13 @@ typedef struct __gconv_info
   __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 */