Permalink
Browse files

Log management for the gimx libraries

  • Loading branch information...
matlo committed Jan 23, 2018
1 parent 96be881 commit c068ea1591f07c9ff89533e18884f27dd919c120
View
@@ -21,16 +21,16 @@ GIMXCONFIGEDITOR_LDFLAGS = -L../shared/gimxconfigeditor \
$(GIMXCONTROLLER_LDFLAGS)
GIMXCONFIGUPDATER_LDFLAGS = -L../shared/gimxconfigupdater
GIMXCONTROLLER_LDFLAGS = -L../shared/gimxcontroller
GIMXHID_LDFLAGS = -L../shared/gimxhid
GIMXINPUT_LDFLAGS = -L../shared/gimxinput \
$(GIMXHID_LDFLAGS)
GIMXPOLL_LDFLAGS = -L../shared/gimxpoll
GIMXPRIO_LDFLAGS = -L../shared/gimxprio
GIMXSERIAL_LDFLAGS = -L../shared/gimxserial
GIMXTIMER_LDFLAGS = -L../shared/gimxtimer
GIMXUHID_LDFLAGS = -L../shared/gimxuhid
GIMXUSB_LDFLAGS = -L../shared/gimxusb
GIMXGPP_LDFLAGS = -L../shared/gimxgpp
GIMXLOG_LDFLAGS = -L../shared/gimxlog
GIMXHID_LDFLAGS = $(GIMXLOG_LDFLAGS) -L../shared/gimxhid
GIMXINPUT_LDFLAGS = $(GIMXHID_LDFLAGS) -L../shared/gimxinput
GIMXPOLL_LDFLAGS = $(GIMXLOG_LDFLAGS) -L../shared/gimxpoll
GIMXPRIO_LDFLAGS = $(GIMXLOG_LDFLAGS) -L../shared/gimxprio
GIMXSERIAL_LDFLAGS = $(GIMXLOG_LDFLAGS) -L../shared/gimxserial
GIMXTIMER_LDFLAGS = $(GIMXLOG_LDFLAGS) -L../shared/gimxtimer
GIMXUHID_LDFLAGS = $(GIMXLOG_LDFLAGS) -L../shared/gimxuhid
GIMXUSB_LDFLAGS = $(GIMXLOG_LDFLAGS) -L../shared/gimxusb
GIMXGPP_LDFLAGS = $(GIMXLOG_LDFLAGS) -L../shared/gimxgpp
GIMXUPDATER_LDFLAGS = -L../shared/gimxupdater
GIMXCONFIGEDITOR_LDLIBS = -lgimxconfigeditor \
@@ -40,15 +40,16 @@ GIMXCONFIGEDITOR_LDLIBS = -lgimxconfigeditor \
$(GIMXCONTROLLER_LDLIBS)
GIMXCONFIGUPDATER_LDLIBS = -lgimxconfigupdater
GIMXCONTROLLER_LDLIBS = -lgimxcontroller
GIMXHID_LDLIBS = -lgimxhid
GIMXINPUT_LDLIBS = -lgimxinput $(GIMXHID_LDLIBS)
GIMXPOLL_LDLIBS = -lgimxpoll
GIMXPRIO_LDLIBS = -lgimxprio
GIMXSERIAL_LDLIBS = -lgimxserial
GIMXTIMER_LDLIBS = -lgimxtimer
GIMXUHID_LDLIBS = -lgimxuhid
GIMXUSB_LDLIBS = -lgimxusb
GIMXGPP_LDLIBS = -lgimxgpp
GIMXLOG_LDLIBS = -lgimxlog
GIMXHID_LDLIBS = $(GIMXLOG_LDLIBS) -lgimxhid
GIMXINPUT_LDLIBS = $(GIMXHID_LDLIBS) -lgimxinput
GIMXPOLL_LDLIBS = $(GIMXLOG_LDLIBS) -lgimxpoll
GIMXPRIO_LDLIBS = $(GIMXLOG_LDLIBS) -lgimxprio
GIMXSERIAL_LDLIBS = $(GIMXLOG_LDLIBS) -lgimxserial
GIMXTIMER_LDLIBS = $(GIMXLOG_LDLIBS) -lgimxtimer
GIMXUHID_LDLIBS = $(GIMXLOG_LDLIBS) -lgimxuhid
GIMXUSB_LDLIBS = $(GIMXLOG_LDLIBS) -lgimxusb
GIMXGPP_LDLIBS = $(GIMXLOG_LDLIBS) -lgimxgpp
GIMXUPDATER_LDLIBS = -lgimxupdater
ifeq ($(OS),Windows_NT)
View
@@ -26,7 +26,7 @@ $(CLEANDIRS):
ifeq ($(OS),Windows_NT)
DLLS = $(shell ntldd -R {core,config,fpsconfig,launcher}/*.exe | grep mingw | sed "s/.*=> //g" | cut -d' ' -f 1 | sed 's/\\/\\\\/g' | xargs cygpath -u | sort | uniq)\
$(shell ntldd -R {shared/*,shared/*/*/*}/*.dll | grep mingw | sed "s/.*=> //g" | cut -d' ' -f 1 | sed 's/\\/\\\\/g' | xargs cygpath -u | sort | uniq)
$(shell ntldd -R shared/*/*.dll | grep mingw | sed "s/.*=> //g" | cut -d' ' -f 1 | sed 's/\\/\\\\/g' | xargs cygpath -u | sort | uniq)
install: all
mkdir -p setup
for DLL in $(DLLS); \
@@ -15,8 +15,6 @@
#include <string.h>
#include <stdlib.h>
#define PRINT_ERROR_OTHER(msg) gerror("%s:%d %s: %s\n", __FILE__, __LINE__, __func__, msg);
#define REPORTS_MAX 2
static struct
View
@@ -891,7 +891,7 @@ int adapter_start()
adapter->activation_button.index = controller_get_activation_button(adapter->ctype);
if (adapter->activation_button.index != 0)
{
printf(_("Press the %s button to activate the controller.\n"), controller_get_axis_name(adapter->ctype, adapter->activation_button.index));
ginfo(_("Press the %s button to activate the controller.\n"), controller_get_axis_name(adapter->ctype, adapter->activation_button.index));
}
}
}
View
@@ -37,6 +37,7 @@
#include "../directories.h"
#include <gimxprio/include/gprio.h>
#include <gimxusb/include/gusb.h>
#include <gimxlog/include/glog.h>
#define DEFAULT_POSTPONE_COUNT 3 //unit = DEFAULT_REFRESH_PERIOD
@@ -177,7 +178,7 @@ void show_config()
char line[LINE_MAX];
while (fgets(line, sizeof(line), fp))
{
printf(line);
printf("%s", line);
}
fclose(fp);
}
@@ -441,6 +442,7 @@ int main(int argc, char *argv[])
if(gimx_params.curses)
{
glog_set_all_levels(E_GLOG_LEVEL_NONE);
gimx_params.curses_status = 1;
display_init();
stats_init(0);
@@ -7,7 +7,6 @@
#include <gimxhid/include/ghid.h>
#include <gimxcontroller/include/controller.h>
#include <gimxcommon/include/glist.h>
#include <gimxcommon/include/gerror.h>
#include <string.h>
#include <stdlib.h>
#include <haptic/haptic_core.h>
@@ -3,7 +3,6 @@
License: GPLv3
*/
#include <gimxcommon/include/gerror.h>
#include <gimxinput/include/ginput.h>
#include <haptic/haptic_sink.h>
#ifndef WIN32
@@ -3,7 +3,6 @@
License: GPLv3
*/
#include <gimxcommon/include/gerror.h>
#include <string.h>
#include <stdlib.h>
#include <haptic/haptic_source.h>
@@ -13,7 +13,6 @@
#include <controller.h>
#include <gimx.h>
#include <limits.h>
#include <gimxcommon/include/gerror.h>
#include <haptic/haptic_common.h>
#include <haptic/haptic_sink.h>
@@ -5,7 +5,6 @@
#include <stdlib.h>
#include <gimxinput/include/ginput.h>
#include <gimxcommon/include/gerror.h>
#include <haptic/haptic_common.h>
#include <haptic/haptic_sink.h>
@@ -5,7 +5,6 @@
#include <stdlib.h>
#include <gimxinput/include/ginput.h>
#include <gimxcommon/include/gerror.h>
#include <haptic/haptic_common.h>
#include <haptic/haptic_sink.h>
@@ -8,7 +8,6 @@
#include <stdlib.h>
#include <haptic/common/ff_lg.h>
#include <gimxcommon/include/gerror.h>
#include <haptic/haptic_common.h>
#include <haptic/haptic_source.h>
@@ -6,8 +6,8 @@
#include <stdint.h>
#include <stdlib.h>
#include <gimxcontroller/include/controller.h>
#include <gimxcommon/include/gerror.h>
#include <haptic/haptic_source.h>
#include <limits.h>
static struct {
struct {
View
@@ -19,6 +19,10 @@
#include <locale.h>
#define _(STRING) gettext(STRING)
#define PRINT_ERROR_OTHER(msg) fprintf(stderr, "%s:%d %s: %s\n", __FILE__, __LINE__, __func__, msg);
#define PRINT_ERROR_ALLOC_FAILED(func) fprintf(stderr, "%s:%d %s: %s failed\n", __FILE__, __LINE__, __func__, func);
typedef enum {
E_GIMX_STATUS_SUCCESS = 0,
@@ -10,6 +10,4 @@
#define dprintf(...) if(gimx_params.debug.haptic) printf(__VA_ARGS__)
#define PRINT_ERROR_OTHER(msg) fprintf(stderr, "%s:%d %s: %s\n", __FILE__, __LINE__, __func__, msg);
#endif /* HAPTIC_COMMON_H_ */
@@ -10,6 +10,7 @@
#include <stddef.h>
#include "haptic_core.h"
#include "haptic_common.h"
struct haptic_source_state;
View
@@ -983,7 +983,7 @@ static void read_configs_txt(const char* dir_path)
configs_txt_present = 1;
while (fgets(line, LINE_MAX, fp)) {
if (gimx_params.logfile != NULL) {
printf(line);
printf("%s", line);
}
if (line[0] != '#') {
// As file names may contain spaces, use '/' as a separator.
@@ -1154,7 +1154,7 @@ static void read_macros() {
int has_errors = 0;
while (fgets(line, LINE_MAX, fp)) {
if (gimx_params.logfile != NULL) {
printf(line);
printf("%s", line);
}
if (line[0] != '#' && line[0] != '\n' && line[0] != '\r')
{
Submodule gimxlog updated 2 files
+4 −4 Makedefs
+0 −2 include/glog.h
Submodule gimxuhid updated 3 files
+5 −1 Makedefs
+3 −0 Makefile
+6 −1 src/linux/uhidasync.c
Submodule gimxusb updated 3 files
+5 −1 Makedefs
+3 −0 Makefile
+15 −10 src/gusb.c

0 comments on commit c068ea1

Please sign in to comment.