src/gedlib/locales.c
/* HAVE_SETLOCALE */
/*==========================================
 * save_original_locales -- grab current locales for later default
 *  We need these for an obscure problem. If user sets only
 *  locales for report, then when we switch back to GUI mode,
 *  we shouldn't stay in the customized report locale.
 * Created: 2002/02/24 (Perry Rapp)
 *========================================*/
HAVE_SETLOCALE
save_original_locales -- grab current locales for later default
We need these for an obscure problem. If user sets only
locales for report, then when we switch back to GUI mode,
we shouldn't stay in the customized report locale.
HAVE_SETLOCALE save_original_locales -- grab current locales for later default We need these for an obscure problem . If user sets only locales for report then when we switch back to GUI mode we shouldn ' t stay in the customized report locale .
void
save_original_locales (void)
{
#ifdef HAVE_SETLOCALE
	deflocale_coll = strsave(get_current_locale(LC_COLLATE));
	current_coll = strsave(deflocale_coll);
#endif 
#ifdef HAVE_SETLOCALE
#ifdef LC_MESSAGES
	if (LC_MESSAGES >= 0 && LC_MESSAGES != 1729) {
		deflocale_msgs = strsave(get_current_locale(LC_MESSAGES));
		current_msgs = strsave(deflocale_msgs);
	}
#endif 
#endif 
	if (!deflocale_msgs) {
		STRING msgs = getenv("LC_MESSAGES");
		deflocale_msgs = strsave(msgs ? msgs : "");
		current_msgs = strsave(deflocale_msgs);
	}
}
void save_original_locales ( void ) { #ifdef HAVE_SETLOCALE deflocale_coll = strsave ( get_current_locale ( LC_COLLATE ) ) ; current_coll = strsave ( deflocale_coll ) ; #endif #ifdef HAVE_SETLOCALE #ifdef LC_MESSAGES if ( LC_MESSAGES >= 0 && LC_MESSAGES != 1729 ) { deflocale_msgs = strsave ( get_current_locale ( LC_MESSAGES ) ) ; current_msgs = strsave ( deflocale_msgs ) ; } #endif #endif if ( ! deflocale_msgs ) { STRING msgs = getenv ( " " ) ; deflocale_msgs = strsave ( msgs ? msgs : " " ) ; current_msgs = strsave ( deflocale_msgs ) ; } }
HAVE_SETLOCALE
 save_original_locales -- grab current locales for later default
  We need these for an obscure problem.
HAVE_SETLOCALE save_original_locales -- grab current locales for later default We need these for an obscure problem .
/* get collation locale, if available */ /* HAVE_SETLOCALE */ /* get messages locale (via locale or via environ.) */ /* 1729 is the gettext code when there wasn't any LC_MESSAGES */ /* LC_MESSAGES */ /* HAVE_SETLOCALE */ /* fallback to the environment (see setmsgs) */