~ubuntu-dev/ubuntu/lucid/mutt/lucid-201002110857

« back to all changes in this revision

Viewing changes to mutt_idna.h

  • Committer: Bazaar Package Importer
  • Author(s): Bhavani Shankar
  • Date: 2009-06-07 17:30:03 UTC
  • mto: (16.2.1 experimental) (2.3.1 squeeze)
  • mto: This revision was merged to the branch mainline in revision 21.
  • Revision ID: james.westby@ubuntu.com-20090607173003-rg37ui3h2bbv7wl0
Tags: upstream-1.5.19
ImportĀ upstreamĀ versionĀ 1.5.19

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * Copyright (C) 2003 Thomas Roessler <roessler@does-not-exist.org>
 
2
 * Copyright (C) 2003,2005 Thomas Roessler <roessler@does-not-exist.org>
3
3
 * 
4
4
 *     This program is free software; you can redistribute it and/or modify
5
5
 *     it under the terms of the GNU General Public License as published by
28
28
 
29
29
#define MI_MAY_BE_IRREVERSIBLE          (1 << 0)
30
30
 
31
 
int mutt_idna_to_local (const char *, char **, int);
32
 
int mutt_local_to_idna (const char *, char **);
 
31
/* Work around incompatibilities in the libidn API */
33
32
 
 
33
#ifdef HAVE_LIBIDN
34
34
int mutt_addrlist_to_idna (ADDRESS *, char **);
35
35
int mutt_addrlist_to_local (ADDRESS *);
36
36
 
39
39
 
40
40
const char *mutt_addr_for_display (ADDRESS *a);
41
41
 
42
 
/* Work around incompatibilities in the libidn API */
43
 
 
44
 
#ifdef HAVE_LIBIDN
45
42
# if (!defined(HAVE_IDNA_TO_ASCII_8Z) && defined(HAVE_IDNA_TO_ASCII_FROM_UTF8))
46
43
#  define idna_to_ascii_8z(a,b,c) idna_to_ascii_from_utf8(a,b,(c)&1,((c)&2)?1:0)
47
44
# endif
51
48
# if (!defined(HAVE_IDNA_TO_UNICODE_8Z8Z) && defined(HAVE_IDNA_TO_UNICODE_UTF8_FROM_UTF8))
52
49
#  define idna_to_unicode_8z8z(a,b,c) idna_to_unicode_utf8_from_utf8(a,b,(c)&1,((c)&2)?1:0)
53
50
# endif
54
 
#endif
 
51
#else
 
52
 
 
53
static inline int mutt_addrlist_to_idna (ADDRESS *addr, char **err)
 
54
{
 
55
  return 0;
 
56
}
 
57
 
 
58
static inline int mutt_addrlist_to_local (ADDRESS *addr)
 
59
{
 
60
  return 0;
 
61
}
 
62
 
 
63
static inline void mutt_env_to_local (ENVELOPE *env)
 
64
{
 
65
  return;
 
66
}
 
67
 
 
68
static inline int mutt_env_to_idna (ENVELOPE *env, char **tag, char **err)
 
69
{
 
70
  return 0;
 
71
}
 
72
 
 
73
static inline const char *mutt_addr_for_display (ADDRESS *a)
 
74
{
 
75
  return a->mailbox;
 
76
}
 
77
 
 
78
#endif /* HAVE_LIBIDN */
55
79
 
56
80
#endif