]> Pileus Git - ~andy/fetchmail/commitdiff
Provide iana_charset, a normalized IANA charmap name.
authorMatthias Andree <matthias.andree@gmx.de>
Sun, 7 Nov 2004 23:50:34 +0000 (23:50 -0000)
committerMatthias Andree <matthias.andree@gmx.de>
Sun, 7 Nov 2004 23:50:34 +0000 (23:50 -0000)
svn path=/trunk/; revision=3980

Makefile.am
fetchmail.c
fetchmail.h

index cc8cbd15cb27d64ca5024269e31dc345341e9c72..bbd82289d0a1156b9649504201ee51dff89c57ff 100644 (file)
@@ -36,7 +36,7 @@ fetchmail_SOURCES=    fetchmail.h getopt.h \
                opie.c rpa.c interface.c netrc.c \
                unmime.c conf.c checkalias.c smbdes.c smbencrypt.c \
                smbmd4.c smbutil.c ipv6-connect.c lock.c \
-               rcfile_l.l rcfile_y.y
+               rcfile_l.l rcfile_y.y ucs/norm_charmap.c
 
 check_PROGRAMS=        rfc822 unmime netrc rfc2047e
 
@@ -64,7 +64,7 @@ DISTDOCS=     FAQ FEATURES NOTES fetchmail-man.html fetchmail-FAQ.html \
 # extra directories to ship
 distdirs = rh-config contrib beos
 
-EXTRA_DIST= $(DISTDOCS) fetchmail.spec $(distdirs)
+EXTRA_DIST= $(DISTDOCS) fetchmail.spec $(distdirs) ucs/README.svn
 
 FAQ: fetchmail-FAQ.html
        AWK=$(AWK) $(SHELL) $(srcdir)/html2txt.sh $(srcdir)/fetchmail-FAQ.html >$@ || { rm -f $@ ; exit 1 ; }
index 1756c73fce34639fbbbd89f675e0638555b42c32..07ca6eb89bbc1b58f565788073bd7c2bcae08f67 100644 (file)
 #endif /* HAVE_SETRLIMIT */
 #include <sys/utsname.h>
 
+#ifdef HAVE_LANGINFO_H
+#include <langinfo.h>
+#endif
+
 #include "fetchmail.h"
 #include "socket.h"
 #include "tunable.h"
@@ -120,6 +124,8 @@ static RETSIGTYPE donothing(int sig)
     lastsig = sig;
 }
 
+char *iana_charset;
+
 int main(int argc, char **argv)
 {
     int bkgd = FALSE;
@@ -139,6 +145,11 @@ int main(int argc, char **argv)
     setlocale (LC_ALL, "");
     bindtextdomain(PACKAGE, LOCALEDIR);
     textdomain(PACKAGE);
+    iana_charset = norm_charmap(nl_langinfo(CODESET)); /* normalize local
+                                                         charset to
+                                                         IANA charset. */
+#else
+    iana_charset = "US-ASCII";
 #endif
 
     /*
index a4d5662209575c6696c168673a9480f87151efcc..8b14e918d9d0c3102707ac22707d27019839f17a 100644 (file)
@@ -420,6 +420,11 @@ extern char *sdps_envfrom;
 extern char *sdps_envto;
 #endif /* SDPS_ENABLE */
 
+extern char *iana_charset;     /* IANA assigned charset name */
+
+/* from ucs/norm_charmap.c */
+const char *norm_charmap(const char *name);
+
 /* prototypes for globally callable functions */
 
 /* from /usr/include/sys/cdefs.h */