aboutsummaryrefslogtreecommitdiff
path: root/test.c
diff options
context:
space:
mode:
authorcnlohr <lohr85@gmail.com>2016-11-30 02:10:28 -0500
committercnlohr <lohr85@gmail.com>2016-11-30 02:10:28 -0500
commit1d0a3ef8b28e212eda4735da66f2f26e6c1a7cc5 (patch)
tree855a316ba979742543dd5122faaa80c7b50ba498 /test.c
parent8388ca81fbc6c0a840e81f6fd805b897d378556b (diff)
downloadlibsurvive-1d0a3ef8b28e212eda4735da66f2f26e6c1a7cc5.tar.gz
libsurvive-1d0a3ef8b28e212eda4735da66f2f26e6c1a7cc5.tar.bz2
I'm learning.
Diffstat (limited to 'test.c')
-rw-r--r--test.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/test.c b/test.c
index b7f9627..2a99d2b 100644
--- a/test.c
+++ b/test.c
@@ -1,12 +1,17 @@
#include <unistd.h>
#include <stdio.h>
-
-
+#include <stdlib.h>
#include <survive.h>
+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.
}
}