aboutsummaryrefslogtreecommitdiff
path: root/test.c
diff options
context:
space:
mode:
authorcnlohr <lohr85@gmail.com>2016-12-03 18:02:20 -0500
committercnlohr <lohr85@gmail.com>2016-12-03 18:02:20 -0500
commit684b109e8cd3246c93fdec3e63157bbd11bb359a (patch)
tree22bb039638bda9a6329615db9e2bd01162ab9b8e /test.c
parent00f9c8d9a66ffad686bd09041894ba6c25264665 (diff)
downloadlibsurvive-684b109e8cd3246c93fdec3e63157bbd11bb359a.tar.gz
libsurvive-684b109e8cd3246c93fdec3e63157bbd11bb359a.tar.bz2
first stab at trying to pull off config data, didn't work.
Diffstat (limited to 'test.c')
-rw-r--r--test.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/test.c b/test.c
index 0977d3d..8017872 100644
--- a/test.c
+++ b/test.c
@@ -1,6 +1,7 @@
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
+#include <stdint.h>
#include <survive.h>
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" );