develop.uap-core.de/git
/
uwplayer.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
use unix domain socket for communication with mpv
[uwplayer.git]
/
application
/
main.c
diff --git
a/application/main.c
b/application/main.c
index
6dcca3b
..
8a43d19
100644
(file)
--- a/
application/main.c
+++ b/
application/main.c
@@
-23,6
+23,9
@@
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
+#include <locale.h>
+#include <time.h>
+#include <inttypes.h>
#include "window.h"
#include "main.h"
#include "window.h"
#include "main.h"
@@
-56,14
+59,20
@@
static String fallback[] = {
NULL
};
NULL
};
-int main(int argc, char** argv) {
+static String langProc(Display *dp, String xnl, XtPointer closure) {
+ setlocale(LC_ALL, xnl);
+ setlocale(LC_NUMERIC, "C");
+ return setlocale(LC_ALL, NULL);
+}
+
+int main(int argc, char** argv) {
// disable stdout buffering, because the netbeans's internal terminal
// has a bug on freebsd and doesn't flush the output after a newline
setvbuf(stdout, NULL, _IONBF, 0);
// disable stdout buffering, because the netbeans's internal terminal
// has a bug on freebsd and doesn't flush the output after a newline
setvbuf(stdout, NULL, _IONBF, 0);
-
+
// initialize toolkit
XtToolkitInitialize();
// initialize toolkit
XtToolkitInitialize();
- XtSetLanguageProc(NULL,
NULL
, NULL);
+ XtSetLanguageProc(NULL,
langProc
, NULL);
app = XtCreateApplicationContext();
XtAppSetFallbackResources(app, fallback);
app = XtCreateApplicationContext();
XtAppSetFallbackResources(app, fallback);
@@
-76,6
+85,9
@@
int main(int argc, char** argv) {
MainWindow *window = WindowCreate(display);
MainWindow *window = WindowCreate(display);
+ // random numbers only used for creating tmp dirs
+ srand(time(NULL));
+
WindowShow(window);
XtAppMainLoop(app);
WindowShow(window);
XtAppMainLoop(app);