From 1d0a3ef8b28e212eda4735da66f2f26e6c1a7cc5 Mon Sep 17 00:00:00 2001 From: cnlohr Date: Wed, 30 Nov 2016 02:10:28 -0500 Subject: I'm learning. --- test.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'test.c') diff --git a/test.c b/test.c index b7f9627..2a99d2b 100644 --- a/test.c +++ b/test.c @@ -1,12 +1,17 @@ #include #include - - +#include #include +void survivefault( struct SurviveContext * ctx, const char * fault ) +{ + fprintf( stderr, "Error: %s\n", fault ); + exit( -1 ); +} + int main() { - struct SurviveContext * ctx = survive_init( &ctx ); + struct SurviveContext * ctx = survive_init( &survivefault ); if( !ctx ) { @@ -16,7 +21,7 @@ int main() while(survive_poll(ctx) == 0) { - + //Do stuff. } } -- cgit v1.2.3