2016-09-22 12:48:04 +02:00
|
|
|
---
|
|
|
|
src/main.c | 18 ++++++++++++------
|
|
|
|
src/u_print.c | 1 +
|
|
|
|
2 files changed, 13 insertions(+), 6 deletions(-)
|
|
|
|
|
|
|
|
--- src/main.c
|
2017-02-02 14:42:11 +01:00
|
|
|
+++ src/main.c 2017-02-02 13:38:50.542387406 +0000
|
2016-09-22 12:48:04 +02:00
|
|
|
@@ -59,11 +59,13 @@
|
2007-07-27 02:14:11 +02:00
|
|
|
|
|
|
|
/* input extensions for an input tablet */
|
|
|
|
#ifdef USE_TAB
|
|
|
|
-#include "X11/extensions/XInput.h"
|
|
|
|
+#include <X11/extensions/XInput.h>
|
|
|
|
#endif /* USE_TAB */
|
|
|
|
|
|
|
|
#ifdef I18N
|
|
|
|
#include <X11/keysym.h>
|
|
|
|
+#include <locale.h>
|
|
|
|
+#include <langinfo.h>
|
|
|
|
#endif /* I18N */
|
|
|
|
|
2009-12-16 10:58:06 +01:00
|
|
|
#include <X11/IntrinsicP.h>
|
2017-02-02 14:42:11 +01:00
|
|
|
@@ -781,11 +783,6 @@ void main(int argc, char **argv)
|
2007-07-27 02:14:11 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
-#ifdef I18N
|
|
|
|
- setlocale(LC_ALL, "");
|
|
|
|
- XtSetLanguageProc(NULL, NULL, NULL);
|
|
|
|
-#endif /* I18N */
|
|
|
|
-
|
|
|
|
/*
|
|
|
|
* save the command line arguments
|
|
|
|
*/
|
2013-12-10 15:25:41 +01:00
|
|
|
@@ -890,6 +887,10 @@ void main(int argc, char **argv)
|
|
|
|
setup_icons_big();
|
2007-07-27 02:14:11 +02:00
|
|
|
|
|
|
|
#ifdef I18N
|
|
|
|
+ if (NULL == strcasestr(nl_langinfo(CODESET),"ANSI") &&
|
2013-12-10 15:25:41 +01:00
|
|
|
+ NULL == strcasestr(nl_langinfo(CODESET),"ISO-8859-1"))
|
2007-07-27 02:14:11 +02:00
|
|
|
+ appres.international = True;
|
|
|
|
+
|
|
|
|
/************************************************************/
|
|
|
|
/* if the international option has been set, set the locale */
|
|
|
|
/************************************************************/
|
2013-12-10 15:25:41 +01:00
|
|
|
@@ -1612,6 +1613,11 @@ setup_visual(int *argc_p, char **argv, A
|
2007-07-27 02:14:11 +02:00
|
|
|
*/
|
|
|
|
tool = XtAppInitialize (&tool_app, "Fig", options, XtNumber (options), argc_p, argv,
|
|
|
|
(String *) NULL, args, 0);
|
|
|
|
+#ifdef I18N
|
|
|
|
+ setlocale(LC_ALL, "");
|
|
|
|
+ setlocale(LC_NUMERIC, "C");
|
|
|
|
+ XtSetLanguageProc(tool_app, NULL, NULL);
|
|
|
|
+#endif /* I18N */
|
|
|
|
/* save important info */
|
|
|
|
tool_d = XtDisplay(tool);
|
|
|
|
tool_s = XtScreen(tool);
|
2016-09-22 12:48:04 +02:00
|
|
|
--- src/u_print.c
|
2017-02-02 14:42:11 +01:00
|
|
|
+++ src/u_print.c 2017-02-02 13:38:50.542387406 +0000
|
2007-07-27 02:14:11 +02:00
|
|
|
@@ -15,6 +15,7 @@
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
+#include <locale.h>
|
|
|
|
#include "fig.h"
|
|
|
|
#include "resources.h"
|
|
|
|
#include "object.h"
|