summaryrefslogtreecommitdiffstats
path: root/mutt_idna.h
diff options
context:
space:
mode:
authorKevin McCarthy <kevin@8t8.us>2015-11-24 15:49:26 -0800
committerKevin McCarthy <kevin@8t8.us>2015-11-24 15:49:26 -0800
commit0e0520faf7a96e2cc0efa49eced65adb4e5acfe6 (patch)
treee0ffd51e41bfef7c2023e83fcf3de9eed54145ec /mutt_idna.h
parent0864167e8a6ba598cf919fb26c242997518f7386 (diff)
Rename idna functions and bits for smtputf8 changes.
This is patch 1 of 4 implementing support for SMTPUTF8 (RFC 6531). Change mutt_idna.c to be always compiled. Remove the stub functions in mutt_idna.h. Instead, put #ifdefs around the idna function calls. The conversion functions will be fixed up in the next patch. Rename the conversion functions to mutt_addrlist_to_intl() and mutt_env_to_intl(). Rename the ADDRESS idna status bits to "intl" status bits.
Diffstat (limited to 'mutt_idna.h')
-rw-r--r--mutt_idna.h37
1 files changed, 6 insertions, 31 deletions
diff --git a/mutt_idna.h b/mutt_idna.h
index 1d51806a..48236a26 100644
--- a/mutt_idna.h
+++ b/mutt_idna.h
@@ -33,14 +33,6 @@
/* Work around incompatibilities in the libidn API */
#ifdef HAVE_LIBIDN
-int mutt_addrlist_to_idna (ADDRESS *, char **);
-int mutt_addrlist_to_local (ADDRESS *);
-
-void mutt_env_to_local (ENVELOPE *);
-int mutt_env_to_idna (ENVELOPE *, char **, char **);
-
-const char *mutt_addr_for_display (ADDRESS *a);
-
# if (!defined(HAVE_IDNA_TO_ASCII_8Z) && defined(HAVE_IDNA_TO_ASCII_FROM_UTF8))
# define idna_to_ascii_8z(a,b,c) idna_to_ascii_from_utf8(a,b,(c)&1,((c)&2)?1:0)
# endif
@@ -50,33 +42,16 @@ const char *mutt_addr_for_display (ADDRESS *a);
# if (!defined(HAVE_IDNA_TO_UNICODE_8Z8Z) && defined(HAVE_IDNA_TO_UNICODE_UTF8_FROM_UTF8))
# define idna_to_unicode_8z8z(a,b,c) idna_to_unicode_utf8_from_utf8(a,b,(c)&1,((c)&2)?1:0)
# endif
-#else
-
-static inline int mutt_addrlist_to_idna (ADDRESS *addr, char **err)
-{
- return 0;
-}
+#endif /* HAVE_LIBIDN */
-static inline int mutt_addrlist_to_local (ADDRESS *addr)
-{
- return 0;
-}
-static inline void mutt_env_to_local (ENVELOPE *env)
-{
- return;
-}
+int mutt_addrlist_to_intl (ADDRESS *, char **);
+int mutt_addrlist_to_local (ADDRESS *);
-static inline int mutt_env_to_idna (ENVELOPE *env, char **tag, char **err)
-{
- return 0;
-}
+void mutt_env_to_local (ENVELOPE *);
+int mutt_env_to_intl (ENVELOPE *, char **, char **);
-static inline const char *mutt_addr_for_display (ADDRESS *a)
-{
- return a->mailbox;
-}
+const char *mutt_addr_for_display (ADDRESS *a);
-#endif /* HAVE_LIBIDN */
#endif