diff --git a/examples/mares_nemo_test.c b/examples/mares_nemo_test.c index cdb3649..9052b09 100644 --- a/examples/mares_nemo_test.c +++ b/examples/mares_nemo_test.c @@ -24,11 +24,6 @@ #include "mares_nemo.h" #include "utils.h" -#define WARNING(expr) \ -{ \ - message ("%s:%d: %s\n", __FILE__, __LINE__, expr); \ -} - device_status_t test_dump_memory (const char* name, const char* filename) { diff --git a/examples/mares_puck_test.c b/examples/mares_puck_test.c index 394ba22..1a1dd0b 100644 --- a/examples/mares_puck_test.c +++ b/examples/mares_puck_test.c @@ -24,11 +24,6 @@ #include "mares_puck.h" #include "utils.h" -#define WARNING(expr) \ -{ \ - message ("%s:%d: %s\n", __FILE__, __LINE__, expr); \ -} - device_status_t test_dump_memory (const char* name, const char* filename) { diff --git a/examples/oceanic_atom2_test.c b/examples/oceanic_atom2_test.c index 978b98a..b53437b 100644 --- a/examples/oceanic_atom2_test.c +++ b/examples/oceanic_atom2_test.c @@ -24,11 +24,6 @@ #include "oceanic_atom2.h" #include "utils.h" -#define WARNING(expr) \ -{ \ - message ("%s:%d: %s\n", __FILE__, __LINE__, expr); \ -} - device_status_t test_dump_memory (const char* name, const char* filename) { diff --git a/examples/oceanic_veo250_test.c b/examples/oceanic_veo250_test.c index 54f6f91..48c7e25 100644 --- a/examples/oceanic_veo250_test.c +++ b/examples/oceanic_veo250_test.c @@ -24,11 +24,6 @@ #include "oceanic_veo250.h" #include "utils.h" -#define WARNING(expr) \ -{ \ - message ("%s:%d: %s\n", __FILE__, __LINE__, expr); \ -} - device_status_t test_dump_memory (const char* name, const char* filename) { diff --git a/examples/oceanic_vtpro_test.c b/examples/oceanic_vtpro_test.c index 508b67a..16dafb2 100644 --- a/examples/oceanic_vtpro_test.c +++ b/examples/oceanic_vtpro_test.c @@ -24,11 +24,6 @@ #include "oceanic_vtpro.h" #include "utils.h" -#define WARNING(expr) \ -{ \ - message ("%s:%d: %s\n", __FILE__, __LINE__, expr); \ -} - device_status_t test_dump_memory (const char* name, const char* filename) { diff --git a/examples/reefnet_sensus_test.c b/examples/reefnet_sensus_test.c index 7eb2811..5eedbae 100644 --- a/examples/reefnet_sensus_test.c +++ b/examples/reefnet_sensus_test.c @@ -25,11 +25,6 @@ #include "reefnet_sensus.h" #include "utils.h" -#define WARNING(expr) \ -{ \ - message ("%s:%d: %s\n", __FILE__, __LINE__, expr); \ -} - device_status_t test_dump_memory (const char* name, const char* filename) { diff --git a/examples/reefnet_sensuspro_test.c b/examples/reefnet_sensuspro_test.c index b8e4867..ca8f677 100644 --- a/examples/reefnet_sensuspro_test.c +++ b/examples/reefnet_sensuspro_test.c @@ -25,11 +25,6 @@ #include "reefnet_sensuspro.h" #include "utils.h" -#define WARNING(expr) \ -{ \ - message ("%s:%d: %s\n", __FILE__, __LINE__, expr); \ -} - device_status_t test_dump_memory (const char* name, const char* filename) { diff --git a/examples/reefnet_sensusultra_test.c b/examples/reefnet_sensusultra_test.c index b9f0d88..993e4cc 100644 --- a/examples/reefnet_sensusultra_test.c +++ b/examples/reefnet_sensusultra_test.c @@ -25,12 +25,6 @@ #include "reefnet_sensusultra.h" #include "utils.h" -#define WARNING(expr) \ -{ \ - message ("%s:%d: %s\n", __FILE__, __LINE__, expr); \ -} - - device_status_t test_dump_memory_dives (const char* name, const char* filename) { diff --git a/examples/suunto_d9_test.c b/examples/suunto_d9_test.c index a42bc41..f08084e 100644 --- a/examples/suunto_d9_test.c +++ b/examples/suunto_d9_test.c @@ -24,11 +24,6 @@ #include "suunto_d9.h" #include "utils.h" -#define WARNING(expr) \ -{ \ - message ("%s:%d: %s\n", __FILE__, __LINE__, expr); \ -} - device_status_t test_dump_sdm (const char* name) { diff --git a/examples/suunto_eon_test.c b/examples/suunto_eon_test.c index c438c4f..bd8a9c2 100644 --- a/examples/suunto_eon_test.c +++ b/examples/suunto_eon_test.c @@ -24,11 +24,6 @@ #include "suunto_eon.h" #include "utils.h" -#define WARNING(expr) \ -{ \ - message ("%s:%d: %s\n", __FILE__, __LINE__, expr); \ -} - device_status_t test_dump_memory (const char* name, const char* filename) { diff --git a/examples/suunto_solution_test.c b/examples/suunto_solution_test.c index 781bfe3..0b9caa0 100644 --- a/examples/suunto_solution_test.c +++ b/examples/suunto_solution_test.c @@ -3,11 +3,6 @@ #include "suunto.h" #include "utils.h" -#define WARNING(expr) \ -{ \ - message ("%s:%d: %s\n", __FILE__, __LINE__, expr); \ -} - device_status_t test_dump_memory (const char* name, const char* filename) { diff --git a/examples/suunto_vyper2_test.c b/examples/suunto_vyper2_test.c index e32ea13..51c9fa6 100644 --- a/examples/suunto_vyper2_test.c +++ b/examples/suunto_vyper2_test.c @@ -24,12 +24,6 @@ #include "suunto_vyper2.h" #include "utils.h" -#define WARNING(expr) \ -{ \ - message ("%s:%d: %s\n", __FILE__, __LINE__, expr); \ -} - - device_status_t test_dump_sdm (const char* name) { diff --git a/examples/suunto_vyper_test.c b/examples/suunto_vyper_test.c index 799c318..e3d65ad 100644 --- a/examples/suunto_vyper_test.c +++ b/examples/suunto_vyper_test.c @@ -25,11 +25,6 @@ #include "suunto_vyper.h" #include "utils.h" -#define WARNING(expr) \ -{ \ - message ("%s:%d: %s\n", __FILE__, __LINE__, expr); \ -} - device_status_t test_dump_sdm (const char* name, unsigned int delay) { diff --git a/examples/uwatec_aladin_test.c b/examples/uwatec_aladin_test.c index b8fb82a..ef2500e 100644 --- a/examples/uwatec_aladin_test.c +++ b/examples/uwatec_aladin_test.c @@ -3,12 +3,6 @@ #include "uwatec_aladin.h" #include "utils.h" -#define WARNING(expr) \ -{ \ - message ("%s:%d: %s\n", __FILE__, __LINE__, expr); \ -} - - device_status_t test_dump_memory (const char* name, const char* filename) { diff --git a/examples/uwatec_memomouse_test.c b/examples/uwatec_memomouse_test.c index 170a2cb..e7d773b 100644 --- a/examples/uwatec_memomouse_test.c +++ b/examples/uwatec_memomouse_test.c @@ -24,12 +24,6 @@ #include "uwatec_memomouse.h" #include "utils.h" -#define WARNING(expr) \ -{ \ - message ("%s:%d: %s\n", __FILE__, __LINE__, expr); \ -} - - device_status_t test_dump_memory (const char* name, const char* filename) { diff --git a/examples/uwatec_smart_test.c b/examples/uwatec_smart_test.c index 84c6c17..e2b0cbe 100644 --- a/examples/uwatec_smart_test.c +++ b/examples/uwatec_smart_test.c @@ -26,12 +26,6 @@ #include "uwatec_smart.h" #include "utils.h" -#define WARNING(expr) \ -{ \ - message ("%s:%d: %s\n", __FILE__, __LINE__, expr); \ -} - - device_status_t test_dump_memory (const char* filename) { diff --git a/src/mares_nemo.c b/src/mares_nemo.c index 12ea878..554a4e1 100644 --- a/src/mares_nemo.c +++ b/src/mares_nemo.c @@ -30,11 +30,6 @@ #include "checksum.h" #include "array.h" -#define WARNING(expr) \ -{ \ - message ("%s:%d: %s\n", __FILE__, __LINE__, expr); \ -} - #define EXITCODE(rc) \ ( \ rc == -1 ? DEVICE_STATUS_IO : DEVICE_STATUS_TIMEOUT \ diff --git a/src/mares_nemo_parser.c b/src/mares_nemo_parser.c index 97a28a5..772b083 100644 --- a/src/mares_nemo_parser.c +++ b/src/mares_nemo_parser.c @@ -28,11 +28,6 @@ #include "utils.h" #include "array.h" -#define WARNING(expr) \ -{ \ - message ("%s:%d: %s\n", __FILE__, __LINE__, expr); \ -} - typedef struct mares_nemo_parser_t mares_nemo_parser_t; struct mares_nemo_parser_t { diff --git a/src/mares_puck.c b/src/mares_puck.c index 042447e..8eb1eb0 100644 --- a/src/mares_puck.c +++ b/src/mares_puck.c @@ -30,11 +30,6 @@ #include "checksum.h" #include "array.h" -#define WARNING(expr) \ -{ \ - message ("%s:%d: %s\n", __FILE__, __LINE__, expr); \ -} - #define EXITCODE(rc) \ ( \ rc == -1 ? DEVICE_STATUS_IO : DEVICE_STATUS_TIMEOUT \ diff --git a/src/oceanic_atom2.c b/src/oceanic_atom2.c index 13df24b..263bb74 100644 --- a/src/oceanic_atom2.c +++ b/src/oceanic_atom2.c @@ -33,11 +33,6 @@ #define MAXRETRIES 2 -#define WARNING(expr) \ -{ \ - message ("%s:%d: %s\n", __FILE__, __LINE__, expr); \ -} - #define EXITCODE(rc) \ ( \ rc == -1 ? DEVICE_STATUS_IO : DEVICE_STATUS_TIMEOUT \ diff --git a/src/oceanic_common.c b/src/oceanic_common.c index 2307bee..372a09c 100644 --- a/src/oceanic_common.c +++ b/src/oceanic_common.c @@ -29,11 +29,6 @@ #include "array.h" #include "utils.h" -#define WARNING(expr) \ -{ \ - message ("%s:%d: %s\n", __FILE__, __LINE__, expr); \ -} - #define PAGESIZE 0x10 #define RB_LOGBOOK_DISTANCE(a,b,l) ringbuffer_distance (a, b, l->rb_logbook_begin, l->rb_logbook_end) diff --git a/src/oceanic_veo250.c b/src/oceanic_veo250.c index 7cc420c..8a5093b 100644 --- a/src/oceanic_veo250.c +++ b/src/oceanic_veo250.c @@ -33,11 +33,6 @@ #define MAXRETRIES 2 -#define WARNING(expr) \ -{ \ - message ("%s:%d: %s\n", __FILE__, __LINE__, expr); \ -} - #define EXITCODE(rc) \ ( \ rc == -1 ? DEVICE_STATUS_IO : DEVICE_STATUS_TIMEOUT \ diff --git a/src/oceanic_vtpro.c b/src/oceanic_vtpro.c index 9ee198a..4faa02f 100644 --- a/src/oceanic_vtpro.c +++ b/src/oceanic_vtpro.c @@ -33,11 +33,6 @@ #define MAXRETRIES 2 -#define WARNING(expr) \ -{ \ - message ("%s:%d: %s\n", __FILE__, __LINE__, expr); \ -} - #define EXITCODE(rc) \ ( \ rc == -1 ? DEVICE_STATUS_IO : DEVICE_STATUS_TIMEOUT \ diff --git a/src/reefnet_sensus.c b/src/reefnet_sensus.c index 4f69054..5557280 100644 --- a/src/reefnet_sensus.c +++ b/src/reefnet_sensus.c @@ -31,11 +31,6 @@ #include "utils.h" #include "array.h" -#define WARNING(expr) \ -{ \ - message ("%s:%d: %s\n", __FILE__, __LINE__, expr); \ -} - #define EXITCODE(rc) \ ( \ rc == -1 ? DEVICE_STATUS_IO : DEVICE_STATUS_TIMEOUT \ diff --git a/src/reefnet_sensus_parser.c b/src/reefnet_sensus_parser.c index b3a9bc4..d649970 100644 --- a/src/reefnet_sensus_parser.c +++ b/src/reefnet_sensus_parser.c @@ -27,11 +27,6 @@ #include "units.h" #include "utils.h" -#define WARNING(expr) \ -{ \ - message ("%s:%d: %s\n", __FILE__, __LINE__, expr); \ -} - #define SAMPLE_DEPTH_ADJUST 13 typedef struct reefnet_sensus_parser_t reefnet_sensus_parser_t; diff --git a/src/reefnet_sensuspro.c b/src/reefnet_sensuspro.c index 1174fe6..08d66c5 100644 --- a/src/reefnet_sensuspro.c +++ b/src/reefnet_sensuspro.c @@ -30,11 +30,6 @@ #include "utils.h" #include "array.h" -#define WARNING(expr) \ -{ \ - message ("%s:%d: %s\n", __FILE__, __LINE__, expr); \ -} - #define EXITCODE(rc) \ ( \ rc == -1 ? DEVICE_STATUS_IO : DEVICE_STATUS_TIMEOUT \ diff --git a/src/reefnet_sensuspro_parser.c b/src/reefnet_sensuspro_parser.c index 979bdbb..acd8a07 100644 --- a/src/reefnet_sensuspro_parser.c +++ b/src/reefnet_sensuspro_parser.c @@ -29,11 +29,6 @@ #include "utils.h" #include "array.h" -#define WARNING(expr) \ -{ \ - message ("%s:%d: %s\n", __FILE__, __LINE__, expr); \ -} - typedef struct reefnet_sensuspro_parser_t reefnet_sensuspro_parser_t; struct reefnet_sensuspro_parser_t { diff --git a/src/reefnet_sensusultra.c b/src/reefnet_sensusultra.c index 44cf7e7..82bd14f 100644 --- a/src/reefnet_sensusultra.c +++ b/src/reefnet_sensusultra.c @@ -31,11 +31,6 @@ #include "utils.h" #include "array.h" -#define WARNING(expr) \ -{ \ - message ("%s:%d: %s\n", __FILE__, __LINE__, expr); \ -} - #define EXITCODE(rc) \ ( \ rc == -1 ? DEVICE_STATUS_IO : DEVICE_STATUS_TIMEOUT \ diff --git a/src/reefnet_sensusultra_parser.c b/src/reefnet_sensusultra_parser.c index 82605c8..2dcb74f 100644 --- a/src/reefnet_sensusultra_parser.c +++ b/src/reefnet_sensusultra_parser.c @@ -29,11 +29,6 @@ #include "utils.h" #include "array.h" -#define WARNING(expr) \ -{ \ - message ("%s:%d: %s\n", __FILE__, __LINE__, expr); \ -} - typedef struct reefnet_sensusultra_parser_t reefnet_sensusultra_parser_t; struct reefnet_sensusultra_parser_t { diff --git a/src/suunto_common2.c b/src/suunto_common2.c index 646188c..461b1f5 100644 --- a/src/suunto_common2.c +++ b/src/suunto_common2.c @@ -28,11 +28,6 @@ #include "checksum.h" #include "array.h" -#define WARNING(expr) \ -{ \ - message ("%s:%d: %s\n", __FILE__, __LINE__, expr); \ -} - #define MAXRETRIES 2 #define SZ_VERSION 0x04 diff --git a/src/suunto_d9.c b/src/suunto_d9.c index ae3f08b..d0449f0 100644 --- a/src/suunto_d9.c +++ b/src/suunto_d9.c @@ -30,11 +30,6 @@ #include "checksum.h" #include "array.h" -#define WARNING(expr) \ -{ \ - message ("%s:%d: %s\n", __FILE__, __LINE__, expr); \ -} - #define EXITCODE(rc) \ ( \ rc == -1 ? DEVICE_STATUS_IO : DEVICE_STATUS_TIMEOUT \ diff --git a/src/suunto_d9_parser.c b/src/suunto_d9_parser.c index 53b528b..d8e6d0b 100644 --- a/src/suunto_d9_parser.c +++ b/src/suunto_d9_parser.c @@ -28,11 +28,6 @@ #include "utils.h" #include "array.h" -#define WARNING(expr) \ -{ \ - message ("%s:%d: %s\n", __FILE__, __LINE__, expr); \ -} - #define SKIP 4 typedef struct suunto_d9_parser_t suunto_d9_parser_t; diff --git a/src/suunto_eon.c b/src/suunto_eon.c index a332e55..178dcb7 100644 --- a/src/suunto_eon.c +++ b/src/suunto_eon.c @@ -31,11 +31,6 @@ #include "utils.h" #include "array.h" -#define WARNING(expr) \ -{ \ - message ("%s:%d: %s\n", __FILE__, __LINE__, expr); \ -} - #define EXITCODE(rc) \ ( \ rc == -1 ? DEVICE_STATUS_IO : DEVICE_STATUS_TIMEOUT \ diff --git a/src/suunto_solution.c b/src/suunto_solution.c index 0769eab..148e660 100644 --- a/src/suunto_solution.c +++ b/src/suunto_solution.c @@ -29,11 +29,6 @@ #include "utils.h" #include "array.h" -#define WARNING(expr) \ -{ \ - message ("%s:%d: %s\n", __FILE__, __LINE__, expr); \ -} - #define EXITCODE(rc) \ ( \ rc == -1 ? DEVICE_STATUS_IO : DEVICE_STATUS_TIMEOUT \ diff --git a/src/suunto_solution_parser.c b/src/suunto_solution_parser.c index c761902..1029fd0 100644 --- a/src/suunto_solution_parser.c +++ b/src/suunto_solution_parser.c @@ -27,11 +27,6 @@ #include "units.h" #include "utils.h" -#define WARNING(expr) \ -{ \ - message ("%s:%d: %s\n", __FILE__, __LINE__, expr); \ -} - typedef struct suunto_solution_parser_t suunto_solution_parser_t; struct suunto_solution_parser_t { diff --git a/src/suunto_spyder_parser.c b/src/suunto_spyder_parser.c index 3b4a07d..f6dde6b 100644 --- a/src/suunto_spyder_parser.c +++ b/src/suunto_spyder_parser.c @@ -27,11 +27,6 @@ #include "units.h" #include "utils.h" -#define WARNING(expr) \ -{ \ - message ("%s:%d: %s\n", __FILE__, __LINE__, expr); \ -} - typedef struct suunto_spyder_parser_t suunto_spyder_parser_t; struct suunto_spyder_parser_t { diff --git a/src/suunto_vyper.c b/src/suunto_vyper.c index 08cdd7f..22401e4 100644 --- a/src/suunto_vyper.c +++ b/src/suunto_vyper.c @@ -34,11 +34,6 @@ #define MIN(a,b) (((a) < (b)) ? (a) : (b)) #define MAX(a,b) (((a) > (b)) ? (a) : (b)) -#define WARNING(expr) \ -{ \ - message ("%s:%d: %s\n", __FILE__, __LINE__, expr); \ -} - #define HDR_DEVINFO_VYPER 0x24 #define HDR_DEVINFO_SPYDER 0x16 #define HDR_DEVINFO_BEGIN (HDR_DEVINFO_SPYDER) diff --git a/src/suunto_vyper2.c b/src/suunto_vyper2.c index 956e727..b8eaf98 100644 --- a/src/suunto_vyper2.c +++ b/src/suunto_vyper2.c @@ -30,11 +30,6 @@ #include "checksum.h" #include "array.h" -#define WARNING(expr) \ -{ \ - message ("%s:%d: %s\n", __FILE__, __LINE__, expr); \ -} - #define EXITCODE(rc) \ ( \ rc == -1 ? DEVICE_STATUS_IO : DEVICE_STATUS_TIMEOUT \ diff --git a/src/suunto_vyper_parser.c b/src/suunto_vyper_parser.c index e6a8ad0..56a356b 100644 --- a/src/suunto_vyper_parser.c +++ b/src/suunto_vyper_parser.c @@ -27,11 +27,6 @@ #include "units.h" #include "utils.h" -#define WARNING(expr) \ -{ \ - message ("%s:%d: %s\n", __FILE__, __LINE__, expr); \ -} - typedef struct suunto_vyper_parser_t suunto_vyper_parser_t; struct suunto_vyper_parser_t { diff --git a/src/utils.h b/src/utils.h index 6c587da..7005c1f 100644 --- a/src/utils.h +++ b/src/utils.h @@ -26,6 +26,8 @@ extern "C" { #endif /* __cplusplus */ +#define WARNING(expr) message ("%s:%d: %s\n", __FILE__, __LINE__, expr) + int message (const char* fmt, ...); void message_set_logfile (const char* filename); diff --git a/src/uwatec_aladin.c b/src/uwatec_aladin.c index 9d094d6..569dcf6 100644 --- a/src/uwatec_aladin.c +++ b/src/uwatec_aladin.c @@ -32,11 +32,6 @@ #include "checksum.h" #include "array.h" -#define WARNING(expr) \ -{ \ - message ("%s:%d: %s\n", __FILE__, __LINE__, expr); \ -} - #define EXITCODE(rc) \ ( \ rc == -1 ? DEVICE_STATUS_IO : DEVICE_STATUS_TIMEOUT \ diff --git a/src/uwatec_memomouse.c b/src/uwatec_memomouse.c index accf88e..0f2e2f2 100644 --- a/src/uwatec_memomouse.c +++ b/src/uwatec_memomouse.c @@ -31,11 +31,6 @@ #include "array.h" #include "utils.h" -#define WARNING(expr) \ -{ \ - message ("%s:%d: %s\n", __FILE__, __LINE__, expr); \ -} - #define EXITCODE(rc) \ ( \ rc == -1 ? DEVICE_STATUS_IO : DEVICE_STATUS_TIMEOUT \ diff --git a/src/uwatec_memomouse_parser.c b/src/uwatec_memomouse_parser.c index d4e8b0c..8a55d4b 100644 --- a/src/uwatec_memomouse_parser.c +++ b/src/uwatec_memomouse_parser.c @@ -27,11 +27,6 @@ #include "utils.h" #include "array.h" -#define WARNING(expr) \ -{ \ - message ("%s:%d: %s\n", __FILE__, __LINE__, expr); \ -} - typedef struct uwatec_memomouse_parser_t uwatec_memomouse_parser_t; struct uwatec_memomouse_parser_t { diff --git a/src/uwatec_smart.c b/src/uwatec_smart.c index 0e38914..b767f45 100644 --- a/src/uwatec_smart.c +++ b/src/uwatec_smart.c @@ -30,11 +30,6 @@ #include "array.h" #include "utils.h" -#define WARNING(expr) \ -{ \ - message ("%s:%d: %s\n", __FILE__, __LINE__, expr); \ -} - #define EXITCODE(rc) \ ( \ rc == -1 ? DEVICE_STATUS_IO : DEVICE_STATUS_TIMEOUT \ diff --git a/src/uwatec_smart_parser.c b/src/uwatec_smart_parser.c index 3777386..963c4ba 100644 --- a/src/uwatec_smart_parser.c +++ b/src/uwatec_smart_parser.c @@ -28,11 +28,6 @@ #include "units.h" #include "utils.h" -#define WARNING(expr) \ -{ \ - message ("%s:%d: %s\n", __FILE__, __LINE__, expr); \ -} - #define NBITS 8 #define NELEMENTS(x) ( sizeof(x) / sizeof((x)[0]) )