]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Remove debug code for Mac OS.
authorMichihiro NAKAJIMA <ggcueroad@gmail.com>
Wed, 18 May 2011 05:13:01 +0000 (01:13 -0400)
committerMichihiro NAKAJIMA <ggcueroad@gmail.com>
Wed, 18 May 2011 05:13:01 +0000 (01:13 -0400)
SVN-Revision: 3360

libarchive/archive_string.c

index ca88dde8dcc12363eb53495074b63755ba037341..3f98b20b3b4a109a6a09b4aa997da8cce8ce77eb 100644 (file)
@@ -854,7 +854,6 @@ add_sconv_object(struct archive *a, struct archive_string_conv *sc)
 }
 
 #if defined(__APPLE__)
-static OSStatus err_createUniInfo = 0;/* Debug */
 
 static int
 createUniInfo(struct archive_string_conv *sconv)
@@ -870,7 +869,6 @@ createUniInfo(struct archive_string_conv *sconv)
 
        sconv->uniInfo = NULL;
        err = CreateUnicodeToTextInfo(&map, &(sconv->uniInfo));
-       err_createUniInfo = err;/* Debug */
        return ((err == noErr)? 0: -1);
 }
 
@@ -1014,14 +1012,7 @@ create_sconv_object(const char *fc, const char *tc,
                sc->cd = (iconv_t)-1;
                if (flag & SCONV_NORMALIZATION_D) {
                        if (createUniInfo(sc) != 0)
-#if 0
                                flag &= ~SCONV_NORMALIZATION_D;
-#else
-                       {/* This is Debug code */
-                               free_sconv_object(sc);
-                               return (NULL);
-                       }
-#endif
                }
        } else if (flag & SCONV_FROM_UTF8) {
                sc->cd = iconv_open(tc, "UTF-8-MAC");
@@ -1399,14 +1390,6 @@ get_sconv_object(struct archive *a, const char *fc, const char *tc, int flag)
                current_codepage = a->current_codepage;
        sc = create_sconv_object(fc, tc, current_codepage, flag);
        if (sc == NULL) {
-#if defined(__APPLE__) /* Debug */
-               if (err_createUniInfo != 0) {
-                       archive_set_error(a, (int)err_createUniInfo,
-                           "createUniInfo failed = %d",
-                           (int)err_createUniInfo);
-                       return (NULL);
-               }
-#endif
                if (a != NULL)
                        archive_set_error(a, ENOMEM,
                            "Could not allocate memory for "