]> arthur.barton.de Git - netatalk.git/blobdiff - libatalk/unicode/charcnv.c
autoconf: Indentation fixes
[netatalk.git] / libatalk / unicode / charcnv.c
index d3b5fee6e8bd1156b3ca57ef45ab74e05516d78d..785e47720f1d7ab2e74ce2be611c93164386fdb9 100644 (file)
@@ -67,7 +67,7 @@
 #define CHECK_FLAGS(a,b) (((a)!=NULL) ? (*(a) & (b)) : 0 )
 
 static atalk_iconv_t conv_handles[MAX_CHARSETS][MAX_CHARSETS];
-char* charset_names[MAX_CHARSETS];
+static char* charset_names[MAX_CHARSETS];
 static struct charset_functions* charsets[MAX_CHARSETS];
 static char hexdig[] = "0123456789abcdef";
 #define hextoint( c )   ( isdigit( c ) ? c - '0' : c + 10 - 'a' )
@@ -87,6 +87,14 @@ static const char *charset_name(charset_t ch)
     return ret;
 }
 
+int set_charset_name(charset_t ch, const char *name)
+{
+    if (ch >= NUM_CHARSETS)
+        return -1;
+    charset_names[ch] = strdup(name);
+    return 0;
+}
+
 static struct charset_functions* get_charset_functions (charset_t ch)
 {
     if (charsets[ch] != NULL)
@@ -858,6 +866,7 @@ static size_t push_charset_flags (charset_t to_set, charset_t cap_set, char* src
                 i_len = i;
                 break;
             case 0x002f: /* 0x002f = '/' */
+                if (option & CONV_ALLOW_SLASH) break;
                 escch = c;
                 j = i_len - i;
                 i_len = i;