[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r24896 - gauger/bindings/c
From: |
gnunet |
Subject: |
[GNUnet-SVN] r24896 - gauger/bindings/c |
Date: |
Sun, 11 Nov 2012 00:18:39 +0100 |
Author: LRN
Date: 2012-11-11 00:18:39 +0100 (Sun, 11 Nov 2012)
New Revision: 24896
Modified:
gauger/bindings/c/gauger.h
Log:
C bindings: W32 port
Modified: gauger/bindings/c/gauger.h
===================================================================
--- gauger/bindings/c/gauger.h 2012-11-10 23:18:36 UTC (rev 24895)
+++ gauger/bindings/c/gauger.h 2012-11-10 23:18:39 UTC (rev 24896)
@@ -77,11 +77,32 @@
}\
}
-#else
+#else /* WINDOWS */
-#define GAUGER_ID(category, counter, value, unit, id) {}
-#define GAUGER(category, counter, value, unit) {}
+#include <stdlib.h>
+#include <stdio.h>
+#include <windef.h>
+#define GAUGER(category, counter, value, unit)\
+{\
+ char __gauger_commandline[MAX_PATH];\
+ \
+ snprintf (__gauger_commandline, MAX_PATH, "gauger.py -n %s -d %Lf -u %s -c
%s",\
+ counter, (long double) (value), unit, category);\
+ __gauger_commandline[MAX_PATH - 1] = '\0';\
+ system (__gauger_commandline);\
+}
+
+#define GAUGER_ID(category, counter, value, unit, id)\
+{\
+ char __gauger_commandline[MAX_PATH];\
+ \
+ snprintf (__gauger_commandline, MAX_PATH, "gauger.py -n %s -d %Lf -u %s -i
%s -c %s",\
+ counter, (long double) (value), unit, id, category);\
+ __gauger_commandline[MAX_PATH - 1] = '\0';\
+ system (__gauger_commandline);\
+}
+
#endif // WINDOWS
#endif
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r24896 - gauger/bindings/c,
gnunet <=