/*********************************************************
- * Copyright (C) 2007-2017 VMware, Inc. All rights reserved.
+ * Copyright (C) 2007-2017, 2019 VMware, Inc. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
char ***argv, char ***envp);
#endif
+void Unicode_Shutdown(int argc, char **argv, char **envp);
+
StringEncoding Unicode_GetCurrentEncoding(void);
StringEncoding Unicode_ResolveEncoding(StringEncoding encoding);
/*********************************************************
- * Copyright (C) 2007-2018 VMware, Inc. All rights reserved.
+ * Copyright (C) 2007-2019 VMware, Inc. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* native code set name. The cached name is used to resolve references
* to STRING_ENCODING_DEFAULT in unicode functions.
*
+ * argv/envp will be rewritten to point to newly allocated memory. This
+ * memory should be freed by calling Unicode_Shutdown().
+ *
*-----------------------------------------------------------------------------
*/
UnicodeInitInternal(argc, NULL, NULL, NULL, argv, envp);
}
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * Unicode_Shutdown --
+ *
+ * Frees memory allocated by UnicodeInitInternal().
+ *
+ * Results:
+ * None
+ *
+ * Side effects:
+ * None
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+void
+Unicode_Shutdown(int argc, // IN
+ char **argv, // IN (OPT)
+ char **envp) // IN (OPT)
+{
+ if (argv != NULL) {
+ Util_FreeStringList(argv, argc + 1);
+ }
+
+ if (envp != NULL) {
+ Util_FreeStringList(envp, -1);
+ }
+}
+
#ifdef TEST_CUSTOM_ICU_DATA_FILE
/*
*-----------------------------------------------------------------------------