summaryrefslogtreecommitdiff
path: root/apps/plugins/puzzles/lz4tiny.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/puzzles/lz4tiny.c')
-rw-r--r--apps/plugins/puzzles/lz4tiny.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/apps/plugins/puzzles/lz4tiny.c b/apps/plugins/puzzles/lz4tiny.c
index 8244ede1cc..8badbbb72c 100644
--- a/apps/plugins/puzzles/lz4tiny.c
+++ b/apps/plugins/puzzles/lz4tiny.c
@@ -188,6 +188,8 @@ void LZ4_decompress_tiny(const char* const source, char* const dest, int outputS
188 188
189/* testing code */ 189/* testing code */
190#ifndef ROCKBOX 190#ifndef ROCKBOX
191#define LZ4TINY
192
191#include "help.h" 193#include "help.h"
192#include <stdlib.h> 194#include <stdlib.h>
193#include <stdio.h> 195#include <stdio.h>
@@ -195,7 +197,13 @@ int main()
195{ 197{
196 char *buf = malloc(help_text_len); 198 char *buf = malloc(help_text_len);
197 LZ4_decompress_tiny(help_text, buf, help_text_len); 199 LZ4_decompress_tiny(help_text, buf, help_text_len);
198 puts(buf); 200 int col = 0;
201 for(int i = 0; i < help_text_len; ++i)
202 {
203 char c = buf[i];
204 printf("%c", (col++, !c ? (col >= 80 ? (col = 0, '\n') : ' ') : c));
205 }
206 puts("");
199 free(buf); 207 free(buf);
200} 208}
201#endif 209#endif