diff options
-rw-r--r-- | lib/rbcodec/platform.h | 4 | ||||
-rw-r--r-- | lib/rbcodec/rbcodecplatform-unix.h | 6 | ||||
-rw-r--r-- | lib/rbcodec/test/SOURCES | 3 | ||||
-rw-r--r-- | lib/rbcodec/test/warble.c | 12 |
4 files changed, 25 insertions, 0 deletions
diff --git a/lib/rbcodec/platform.h b/lib/rbcodec/platform.h index 7a0c87fa9c..febda44ca0 100644 --- a/lib/rbcodec/platform.h +++ b/lib/rbcodec/platform.h | |||
@@ -66,6 +66,10 @@ size_t strlcpy(char *dst, const char *src, size_t siz); | |||
66 | # define logf(...) do { } while (0) | 66 | # define logf(...) do { } while (0) |
67 | # endif | 67 | # endif |
68 | 68 | ||
69 | # ifndef panicf | ||
70 | # define panicf(...) do { } while (0) | ||
71 | # endif | ||
72 | |||
69 | #endif | 73 | #endif |
70 | 74 | ||
71 | #ifndef ATTRIBUTE_PRINTF | 75 | #ifndef ATTRIBUTE_PRINTF |
diff --git a/lib/rbcodec/rbcodecplatform-unix.h b/lib/rbcodec/rbcodecplatform-unix.h index 4ed25f44e8..2df0a50221 100644 --- a/lib/rbcodec/rbcodecplatform-unix.h +++ b/lib/rbcodec/rbcodecplatform-unix.h | |||
@@ -64,6 +64,12 @@ off_t filesize(int fd); | |||
64 | putc('\n', stderr); \ | 64 | putc('\n', stderr); \ |
65 | } while (0) | 65 | } while (0) |
66 | #endif | 66 | #endif |
67 | #ifndef panicf | ||
68 | #define panicf(...) do { fprintf(stderr, __VA_ARGS__); \ | ||
69 | putc('\n', stderr); \ | ||
70 | exit(-1); \ | ||
71 | } while (0) | ||
72 | #endif | ||
67 | #endif | 73 | #endif |
68 | */ | 74 | */ |
69 | 75 | ||
diff --git a/lib/rbcodec/test/SOURCES b/lib/rbcodec/test/SOURCES index 7afee84ae6..7b535f0fe0 100644 --- a/lib/rbcodec/test/SOURCES +++ b/lib/rbcodec/test/SOURCES | |||
@@ -3,3 +3,6 @@ warble.c | |||
3 | ../../../firmware/common/unicode.c | 3 | ../../../firmware/common/unicode.c |
4 | ../../../firmware/common/structec.c | 4 | ../../../firmware/common/structec.c |
5 | ../../../firmware/common/pathfuncs.c | 5 | ../../../firmware/common/pathfuncs.c |
6 | ../../../firmware/common/crc32.c | ||
7 | ../../../firmware/buflib.c | ||
8 | ../../../firmware/core_alloc.c | ||
diff --git a/lib/rbcodec/test/warble.c b/lib/rbcodec/test/warble.c index 8f11b9b56e..9cb7cdfe07 100644 --- a/lib/rbcodec/test/warble.c +++ b/lib/rbcodec/test/warble.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <unistd.h> | 33 | #include <unistd.h> |
34 | #include "buffering.h" /* TYPE_PACKET_AUDIO */ | 34 | #include "buffering.h" /* TYPE_PACKET_AUDIO */ |
35 | #include "kernel.h" | 35 | #include "kernel.h" |
36 | #include "core_alloc.h" | ||
36 | #include "codecs.h" | 37 | #include "codecs.h" |
37 | #include "dsp_core.h" | 38 | #include "dsp_core.h" |
38 | #include "metadata.h" | 39 | #include "metadata.h" |
@@ -70,6 +71,16 @@ void debugf(const char *fmt, ...) | |||
70 | va_end(ap); | 71 | va_end(ap); |
71 | } | 72 | } |
72 | 73 | ||
74 | void panicf(const char *fmt, ...) | ||
75 | { | ||
76 | va_list ap; | ||
77 | va_start(ap, fmt); | ||
78 | vfprintf(stderr, fmt, ap); | ||
79 | va_end(ap); | ||
80 | |||
81 | exit (-1); | ||
82 | } | ||
83 | |||
73 | int find_first_set_bit(uint32_t value) | 84 | int find_first_set_bit(uint32_t value) |
74 | { | 85 | { |
75 | if (value == 0) | 86 | if (value == 0) |
@@ -888,6 +899,7 @@ int main(int argc, char **argv) | |||
888 | print_help(argv[0]); | 899 | print_help(argv[0]); |
889 | exit(1); | 900 | exit(1); |
890 | } | 901 | } |
902 | core_allocator_init(); | ||
891 | playback_init(); | 903 | playback_init(); |
892 | } else { | 904 | } else { |
893 | if (argc > 1) | 905 | if (argc > 1) |