SHA256
1
0
forked from pool/xfig
2018-09-06 11:48:47 +00:00
committed by Git OBS Bridge
parent fef7d39412
commit 105ad5af85
4 changed files with 40 additions and 27 deletions

View File

@@ -1,10 +1,10 @@
---
src/main.c | 18 ++++++++++++------
src/main.c | 20 ++++++++++++++------
src/u_print.c | 1 +
2 files changed, 13 insertions(+), 6 deletions(-)
2 files changed, 15 insertions(+), 6 deletions(-)
--- src/main.c
+++ src/main.c 2018-05-07 07:27:07.684524349 +0000
+++ src/main.c 2018-09-06 11:16:21.842867881 +0000
@@ -59,11 +59,13 @@
/* input extensions for an input tablet */
@@ -37,26 +37,28 @@
#ifdef I18N
+ if (NULL == strcasestr(nl_langinfo(CODESET),"ANSI") &&
+ NULL == strcasestr(nl_langinfo(CODESET),"ISO-8859-1"))
+ NULL == strcasestr(nl_langinfo(CODESET),"ISO-8859-"))
+ appres.international = True;
+
/************************************************************/
/* if the international option has been set, set the locale */
/************************************************************/
@@ -1612,6 +1613,11 @@ setup_visual(int *argc_p, char **argv, A
@@ -1612,6 +1613,13 @@ setup_visual(int *argc_p, char **argv, A
*/
tool = XtAppInitialize (&tool_app, "Fig", options, XtNumber (options), argc_p, argv,
(String *) NULL, args, 0);
+#ifdef I18N
+ setlocale(LC_ALL, "");
+ setlocale(LC_NUMERIC, "C");
+ if (strcasestr(nl_langinfo(CODESET),"UTF-8"))
+ setlocale(LC_CTYPE, "C");
+ XtSetLanguageProc(tool_app, NULL, NULL);
+#endif /* I18N */
/* save important info */
tool_d = XtDisplay(tool);
tool_s = XtScreen(tool);
--- src/u_print.c
+++ src/u_print.c 2018-05-07 07:27:07.684524349 +0000
+++ src/u_print.c 2018-09-06 09:47:09.839191953 +0000
@@ -16,6 +16,7 @@
*
*/