From 684b109e8cd3246c93fdec3e63157bbd11bb359a Mon Sep 17 00:00:00 2001 From: cnlohr Date: Sat, 3 Dec 2016 18:02:20 -0500 Subject: first stab at trying to pull off config data, didn't work. --- test.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'test.c') diff --git a/test.c b/test.c index 0977d3d..8017872 100644 --- a/test.c +++ b/test.c @@ -1,6 +1,7 @@ #include #include #include +#include #include void survivefault( struct SurviveContext * ctx, const char * fault ) @@ -16,8 +17,24 @@ void survivenote( struct SurviveContext * ctx, const char * fault ) int main() { +/* int i; + uint8_t input[] = { 0x7a, 0x01, 0x48, 0xc4, 0x1e, 0x1a, 0xfe, 0x6f, 0x6a, 0xf7, 0x25, 0x34 }; +// uint8_t input[] = { 0x1f, 0x8b, 0x08, 0x00, 0xc2, 0x45, 0x43, 0x58, 0x00, 0x03, 0xcb, 0xc8, 0xe4, 0x02, 0x00, 0x7a, 0x7a, 0x6f, 0xed, 0x03, 0x00, 0x00, 0x00 }; +// uint8_t input[] = { 0x78, 0xda, 0xcb, 0xc8, 0x04, 0x00, 0x01, 0x3b, 0x00, 0xd2 }; + + uint8_t output[1024]; + + int r = survive_simple_inflate( 0, input, sizeof( input ), output, sizeof(output) ); + + printf( "%d: ", r ); + for( i = 0 ;i < r; i++ ) + { + printf( "%02x ", output[i] ); + } + return 0;*/ struct SurviveContext * ctx = survive_init( &survivefault, &survivenote ); + if( !ctx ) { fprintf( stderr, "Fatal. Could not start\n" ); -- cgit v1.2.3