summaryrefslogtreecommitdiff
path: root/xclock.c
diff options
context:
space:
mode:
authorAlan Coopersmith <Alan.Coopersmith@sun.com>2004-10-30 20:33:44 +0000
committerAlan Coopersmith <Alan.Coopersmith@sun.com>2004-10-30 20:33:44 +0000
commitca43036f8cdd456ebff29860fd514248b3699bcf (patch)
tree0c171a494549023b1482adfbbcad2581474e7e75 /xclock.c
parent3f3b1fbe531e0c1ab3b74396bf4e78db861c8bbc (diff)
lists themselves. To use with the Sun compilers, add to host.def: # define UseCCMakeDepend YES # define DependFlags -cc $(CC) -d -xM (Sun bug id #4245688 - fix by Alan Coopersmith) Add Solaris to the platforms on which mprotect is run to set execute permissions when necessary. (Sun bug id #6175128 - fix by Alan Coopersmith) Internationalize digital output (Sun bug id #4119396 - fix by Steve Swales), add -bgpixmap option to set XPM file as background (originally from STSF project version of xclock by Alan Coopersmith) xc/programs/xmodmap/handle.c,pf.c xmodmap was printing line numbers which are one too low in error messages (Xorg bugzilla #1739, Sun bug id 4637857 - fix by Sam Lau)
Diffstat (limited to 'xclock.c')
-rw-r--r--xclock.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/xclock.c b/xclock.c
index 9f637db..9091c57 100644
--- a/xclock.c
+++ b/xclock.c
@@ -46,6 +46,10 @@ in this Software without prior written authorization from The Open Group.
#include <X11/extensions/XKBbells.h>
#endif
+#ifndef NO_I18N
+#include <locale.h> /* for setlocale() */
+Boolean no_locale = True; /* if True, use old behavior */
+#endif
/* Command line options table. Only resources are entered here...there is a
pass over the remaining options after XtParseCommand is let loose. */
@@ -145,6 +149,18 @@ main(int argc, char *argv[])
Pixmap icon_pixmap = None;
XtAppContext app_con;
+#ifndef NO_I18N
+ char *locale_name = setlocale(LC_ALL,"");
+ XtSetLanguageProc ( NULL, NULL, NULL );
+
+ if(!locale_name || 0 == strcmp(locale_name,"C")) {
+ no_locale = True;
+ }
+ else {
+ no_locale = False;
+ }
+#endif
+
toplevel = XtOpenApplication(&app_con, "XClock",
options, XtNumber(options), &argc, argv, NULL,
sessionShellWidgetClass, NULL, ZERO);