Made centralized call of setlocale() unconditional.

Obsoleted macro Libisofs_setlocale_in_iniT.
This commit is contained in:
Thomas Schmitt 2009-05-26 18:13:15 +02:00
parent e12d409b80
commit e8fc149423
5 changed files with 0 additions and 31 deletions

View File

@ -929,16 +929,7 @@ int ecma119_image_new(IsoImage *src, IsoWriteOpts *opts, Ecma119Image **img)
target->eltorito = (src->bootcat == NULL ? 0 : 1); target->eltorito = (src->bootcat == NULL ? 0 : 1);
target->catalog = src->bootcat; 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)); target->input_charset = strdup(iso_get_local_charset(0));
if (target->input_charset == NULL) { if (target->input_charset == NULL) {
iso_image_unref(src); iso_image_unref(src);
free(target); free(target);

View File

@ -2340,13 +2340,6 @@ int iso_image_filesystem_new(IsoDataSource *src, struct iso_read_opts *opts,
data->inode_counter = 0; data->inode_counter = 0;
data->px_ino_status = 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)); data->local_charset = strdup(iso_get_local_charset(0));
if (data->local_charset == NULL) { if (data->local_charset == NULL) {
ret = ISO_OUT_OF_MEM; ret = ISO_OUT_OF_MEM;

View File

@ -5420,11 +5420,6 @@ struct burn_source {
/* ---------------------------- Improvements --------------------------- */ /* ---------------------------- 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" /* Protocol Upgrade : change to AAIP-2.0 with field signature "AL"
*/ */
#define Libisofs_aaip_2_0 yes #define Libisofs_aaip_2_0 yes

View File

@ -65,12 +65,9 @@ struct libiso_msgs *libiso_msgr = NULL;
int iso_init_with_flag(int flag) int iso_init_with_flag(int flag)
{ {
#ifdef Libisofs_setlocale_in_iniT
if (! (flag & 1)) { if (! (flag & 1)) {
iso_init_locale(0); iso_init_locale(0);
} }
#endif
if (libiso_msgr == NULL) { if (libiso_msgr == NULL) {
if (libiso_msgs_new(&libiso_msgr, 0) <= 0) if (libiso_msgs_new(&libiso_msgr, 0) <= 0)
return ISO_FATAL_ERROR; return ISO_FATAL_ERROR;

View File

@ -1585,13 +1585,6 @@ char *ucs2str(const char *buf, size_t len)
/* convert to local charset */ /* 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 #ifdef Libisofs_with_iso_iconV
conv_ret = iso_iconv_open(&conv, iso_get_local_charset(0), "UCS-2BE", 0); conv_ret = iso_iconv_open(&conv, iso_get_local_charset(0), "UCS-2BE", 0);
if (conv_ret <= 0) { if (conv_ret <= 0) {