forked from len0rd/rockbox
puzzles: update help text, make generation and testing cleaner
This includes an upstream change to the Galaxies help text. `genhelp.sh' no longer leaves temporary files sitting around, and the self-test feature of lz4tiny.c works again. Change-Id: I787f4cb3c258baade31638d6be18f95b7aa0705e
This commit is contained in:
parent
8f23493e08
commit
b29611fe2c
42 changed files with 238 additions and 209 deletions
|
@ -188,6 +188,8 @@ void LZ4_decompress_tiny(const char* const source, char* const dest, int outputS
|
|||
|
||||
/* testing code */
|
||||
#ifndef ROCKBOX
|
||||
#define LZ4TINY
|
||||
|
||||
#include "help.h"
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
@ -195,7 +197,13 @@ int main()
|
|||
{
|
||||
char *buf = malloc(help_text_len);
|
||||
LZ4_decompress_tiny(help_text, buf, help_text_len);
|
||||
puts(buf);
|
||||
int col = 0;
|
||||
for(int i = 0; i < help_text_len; ++i)
|
||||
{
|
||||
char c = buf[i];
|
||||
printf("%c", (col++, !c ? (col >= 80 ? (col = 0, '\n') : ' ') : c));
|
||||
}
|
||||
puts("");
|
||||
free(buf);
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue