Sebastian Kuschel reports that pfd_closing can be called for a socket
[u/mdw/putty] / charset / charset.h
index e3067f8..bc5ae3a 100644 (file)
@@ -32,6 +32,8 @@ typedef enum {
     CS_ISO8859_16,
     CS_CP437,
     CS_CP850,
+    CS_CP852,
+    CS_CP866,
     CS_CP1250,
     CS_CP1251,
     CS_CP1252,
@@ -44,6 +46,25 @@ typedef enum {
     CS_KOI8_R,
     CS_KOI8_U,
     CS_MAC_ROMAN,
+    CS_MAC_TURKISH,
+    CS_MAC_CROATIAN,
+    CS_MAC_ICELAND,
+    CS_MAC_ROMANIAN,
+    CS_MAC_GREEK,
+    CS_MAC_CYRILLIC,
+    CS_MAC_THAI,
+    CS_MAC_CENTEURO,
+    CS_MAC_SYMBOL,
+    CS_MAC_DINGBATS,
+    CS_MAC_ROMAN_OLD,
+    CS_MAC_CROATIAN_OLD,
+    CS_MAC_ICELAND_OLD,
+    CS_MAC_ROMANIAN_OLD,
+    CS_MAC_GREEK_OLD,
+    CS_MAC_CYRILLIC_OLD,
+    CS_MAC_UKRAINE,
+    CS_MAC_VT100,
+    CS_MAC_VT100_OLD,
     CS_VISCII,
     CS_HP_ROMAN8,
     CS_DEC_MCS,
@@ -78,7 +99,8 @@ typedef struct {
  * U+FFFD (REPLACEMENT CHARACTER).
  */
 
-int charset_to_unicode(char **input, int *inlen, wchar_t *output, int outlen,
+int charset_to_unicode(const char **input, int *inlen,
+                       wchar_t *output, int outlen,
                       int charset, charset_state *state,
                       const wchar_t *errstr, int errlen);
 
@@ -101,7 +123,8 @@ int charset_to_unicode(char **input, int *inlen, wchar_t *output, int outlen,
  * output charset).
  */
 
-int charset_from_unicode(wchar_t **input, int *inlen, char *output, int outlen,
+int charset_from_unicode(const wchar_t **input, int *inlen,
+                         char *output, int outlen,
                         int charset, charset_state *state,
                         const char *errstr, int errlen);
 
@@ -117,4 +140,18 @@ int charset_from_xenc(const char *name);
 const char *charset_to_mimeenc(int charset);
 int charset_from_mimeenc(const char *name);
 
+/*
+ * Convert our own encoding names to and from our charset
+ * identifiers.
+ */
+const char *charset_to_localenc(int charset);
+int charset_from_localenc(const char *name);
+int charset_localenc_nth(int n);
+
+/*
+ * Convert Mac OS script/region/font to our charset identifiers.
+ */
+int charset_from_macenc(int script, int region, int sysvers,
+                       const char *fontname);
+
 #endif /* charset_charset_h */