Watt-32 tcp/ip  2.2 dev-rel.10
idna.h
Go to the documentation of this file.
1 
3 #ifndef _w32_IDNA_H
4 #define _w32_IDNA_H
5 
6 typedef long ucs4_t;
7 
8 typedef struct {
9  int istate;
10  } *conv_t;
11 
12 typedef struct {
13  WORD indx; /* index into big table */
14  WORD used; /* bitmask of used entries */
15  } Summary16;
16 
17 #define iconv_init W32_NAMESPACE (iconv_init)
18 #define iconv_strerror W32_NAMESPACE (iconv_strerror)
19 #define IDNA_convert_to_ACE W32_NAMESPACE (IDNA_convert_to_ACE)
20 #define IDNA_convert_from_ACE W32_NAMESPACE (IDNA_convert_from_ACE)
21 
22 extern const char *iconv_strerror (int rc);
23 extern BOOL iconv_init (WORD code_page);
24 
25 extern BOOL IDNA_convert_to_ACE (char *name, size_t *size);
26 extern BOOL IDNA_convert_from_ACE (char *name, size_t *size);
27 
28 #ifndef MAX_LABELS
29 #define MAX_LABELS 8
30 #endif
31 
32 #if defined(USE_DEBUG) || defined(TEST_PROG)
33  #define IDNA_DEBUG(lvl, args) \
34  do { \
35  if (debug_on >= lvl) { \
36  (*_printf) ("%s(%u): ", __FILE__, __LINE__); \
37  (*_printf) args; \
38  fflush (stdout); \
39  } \
40  } while (0)
41 #else
42  #define IDNA_DEBUG(lvl, args) ((void)0)
43 #endif
44 
45 #define RET_ILUNI -1
46 #define RET_ILSEQ -2
47 #define RET_TOOSMALL -3
48 #define RET_TOOFEW(n) (-4-(n))
49 
50 #endif /* _w32_IDNA_H */
51 
Definition: idna.h:8
BOOL IDNA_convert_from_ACE(char *name, size_t *size)
Convert a possibly ACE-encoded name to a name in native codepage.
Definition: idna.c:451
const char * iconv_strerror(int rc)
Return textual error for 'rc'.
Definition: idna.c:181
BOOL IDNA_convert_to_ACE(char *name, size_t *size)
Convert a possibly non-ASCII name into ACE-form.
Definition: idna.c:384
Definition: idna.h:12
BOOL iconv_init(WORD code_page)
Initialise iconv; find codepage and mapping functions to use.
Definition: idna.c:158