/*****************************************************************************
*
-* Copyright (C) 1999-2006, International Business Machines
+* Copyright (C) 1999-2008, International Business Machines
* Corporation and others. All Rights Reserved.
*
******************************************************************************/
#include "unicode/uwmsg.h"
+U_NAMESPACE_USE
+
#if (defined(U_WINDOWS) || defined(U_CYGWIN)) && !defined(__STRICT_ANSI__)
#include <io.h>
#include <fcntl.h>
}
if (U_FAILURE(err)) {
u_wmsg(stderr, "cantGetTag", u_wmsg_errorName(err));
- return -1;
+ goto error_cleanup;
}
}
if (canon) {
putchar('\t');
u_wmsg(stderr, "cantGetAliases", str.getTerminatedBuffer(),
u_wmsg_errorName(err));
- return -1;
+ goto error_cleanup;
} else {
uint16_t a, s, t;
putchar('\t');
u_wmsg(stderr, "cantGetAliases", str.getTerminatedBuffer(),
u_wmsg_errorName(err));
- return -1;
+ goto error_cleanup;
}
/* Print the current alias so that it looks right. */
/* Success. */
return 0;
+error_cleanup:
+ uprv_free(stds);
+ return -1;
}
/* Print all available transliterators. If canon is non zero, print