Made centralized call of setlocale() unconditional.
Obsoleted macro Libisofs_setlocale_in_iniT.
This commit is contained in:
parent
e12d409b80
commit
e8fc149423
@ -929,16 +929,7 @@ int ecma119_image_new(IsoImage *src, IsoWriteOpts *opts, Ecma119Image **img)
|
||||
target->eltorito = (src->bootcat == NULL ? 0 : 1);
|
||||
target->catalog = src->bootcat;
|
||||
|
||||
#ifndef Libisofs_setlocale_in_iniT
|
||||
/* default to locale charset */
|
||||
/* ??? ts Nov 25 2008 :
|
||||
Shouldn't this go to library initialization or even to app ?
|
||||
*/
|
||||
setlocale(LC_CTYPE, "");
|
||||
#endif
|
||||
|
||||
target->input_charset = strdup(iso_get_local_charset(0));
|
||||
|
||||
if (target->input_charset == NULL) {
|
||||
iso_image_unref(src);
|
||||
free(target);
|
||||
|
@ -2340,13 +2340,6 @@ int iso_image_filesystem_new(IsoDataSource *src, struct iso_read_opts *opts,
|
||||
data->inode_counter = 0;
|
||||
data->px_ino_status = 0;
|
||||
|
||||
#ifndef Libisofs_setlocale_in_iniT
|
||||
/* ??? ts Nov 25 2008 :
|
||||
Shouldn't this go to library initialization or even to app ?
|
||||
*/
|
||||
setlocale(LC_CTYPE, "");
|
||||
#endif
|
||||
|
||||
data->local_charset = strdup(iso_get_local_charset(0));
|
||||
if (data->local_charset == NULL) {
|
||||
ret = ISO_OUT_OF_MEM;
|
||||
|
@ -5420,11 +5420,6 @@ struct burn_source {
|
||||
/* ---------------------------- Improvements --------------------------- */
|
||||
|
||||
|
||||
/* Cleanup : make call setlocale() at init time resp. never
|
||||
*/
|
||||
#define Libisofs_setlocale_in_iniT yes
|
||||
|
||||
|
||||
/* Protocol Upgrade : change to AAIP-2.0 with field signature "AL"
|
||||
*/
|
||||
#define Libisofs_aaip_2_0 yes
|
||||
|
@ -65,12 +65,9 @@ struct libiso_msgs *libiso_msgr = NULL;
|
||||
int iso_init_with_flag(int flag)
|
||||
{
|
||||
|
||||
#ifdef Libisofs_setlocale_in_iniT
|
||||
if (! (flag & 1)) {
|
||||
iso_init_locale(0);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (libiso_msgr == NULL) {
|
||||
if (libiso_msgs_new(&libiso_msgr, 0) <= 0)
|
||||
return ISO_FATAL_ERROR;
|
||||
|
@ -1585,13 +1585,6 @@ char *ucs2str(const char *buf, size_t len)
|
||||
|
||||
/* convert to local charset */
|
||||
|
||||
#ifndef Libisofs_setlocale_in_iniT
|
||||
/* ??? ts Nov 25 2008 :
|
||||
Shouldn't this go to library initialization or even to app ?
|
||||
*/
|
||||
setlocale(LC_CTYPE, "");
|
||||
#endif
|
||||
|
||||
#ifdef Libisofs_with_iso_iconV
|
||||
conv_ret = iso_iconv_open(&conv, iso_get_local_charset(0), "UCS-2BE", 0);
|
||||
if (conv_ret <= 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user