aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorcnlohr <lohr85@gmail.com>2017-03-08 01:01:42 -0500
committercnlohr <lohr85@gmail.com>2017-03-08 01:01:42 -0500
commit2a4a803b2f162692ca11e700b32da0a77049bfd2 (patch)
tree0f4580ce91c8e43a1c692948010402abcfacf075 /src
parenta087915c5dd8c356911453a019723ebaa9904a36 (diff)
downloadlibsurvive-2a4a803b2f162692ca11e700b32da0a77049bfd2.tar.gz
libsurvive-2a4a803b2f162692ca11e700b32da0a77049bfd2.tar.bz2
cleaning up more header stuff
Diffstat (limited to 'src')
-rw-r--r--src/survive.c1
-rw-r--r--src/survive_driverman.c2
-rw-r--r--src/survive_driverman.h22
-rw-r--r--src/survive_internal.h10
-rw-r--r--src/survive_vive.c8
5 files changed, 9 insertions, 34 deletions
diff --git a/src/survive.c b/src/survive.c
index 9bc1a2c..e1ab943 100644
--- a/src/survive.c
+++ b/src/survive.c
@@ -3,7 +3,6 @@
#include <survive.h>
#include "survive_internal.h"
-#include "survive_driverman.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/src/survive_driverman.c b/src/survive_driverman.c
index 8cdfb71..d694e64 100644
--- a/src/survive_driverman.c
+++ b/src/survive_driverman.c
@@ -3,7 +3,7 @@
// See notice in survive_driverman.h
//
-#include "survive_driverman.h"
+#include "survive_internal.h"
#include <string.h>
#include <stdio.h>
diff --git a/src/survive_driverman.h b/src/survive_driverman.h
deleted file mode 100644
index 216333a..0000000
--- a/src/survive_driverman.h
+++ /dev/null
@@ -1,22 +0,0 @@
-// (C) 2017 <>< C. N. Lohr, Under MIT/x11 License.
-//
-// This file is intended to be used for self-registering functions. By using
-// this it means that you do not need to have complicated switch statements or
-// #defines for dfferent inclusion of drivers/other code. You can simply
-// register your function and it will be put into a list.
-//
-//
-
-#ifndef SURVIVE_DRIVERMAN_H
-#define SURVIVE_DRIVERMAN_H
-
-#include "survive.h"
-
-//Very little here. Mostly included in survive.h.
-
-//Driver registration
-#define MAX_DRIVERS 32
-
-
-#endif
-
diff --git a/src/survive_internal.h b/src/survive_internal.h
index ff156ad..392104a 100644
--- a/src/survive_internal.h
+++ b/src/survive_internal.h
@@ -7,16 +7,16 @@
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
-#include "survive_driverman.h"
#include <zlib.h>
#include <survive.h>
-#define SV_INFO( x... ) { char stbuff[1024]; sprintf( stbuff, x ); ctx->notefunction( ctx, stbuff ); }
-#define SV_ERROR( x... ) { char stbuff[1024]; sprintf( stbuff, x ); ctx->faultfunction( ctx, stbuff ); }
-//XXX TODO This one needs to be rewritten.
-#define SV_KILL() exit(0)
+//Driver registration
+#define MAX_DRIVERS 32
+void * GetDriver( const char * name );
+const char * GetDriverNameMatching( const char * prefix, int place );
+void ListDrivers();
#endif
diff --git a/src/survive_vive.c b/src/survive_vive.c
index 6be5114..61716d3 100644
--- a/src/survive_vive.c
+++ b/src/survive_vive.c
@@ -10,14 +10,12 @@
//If there are portions of the code too similar to the original, I would like to know so they can be re-written.
//All MIT/x11 Licensed Code in this file may be relicensed freely under the GPL or LGPL licenses.
-#include "survive_internal.h"
-#include "survive_driverman.h"
+#include <survive.h>
#include <jsmn.h>
-
-#include "survive_internal.h"
#include <libusb-1.0/libusb.h>
#include <stdio.h>
-#include <unistd.h> //sleep if I ever use it.
+#include <stdlib.h>
+#include <unistd.h>
#include <errno.h>
#include <string.h>
#include <sys/stat.h>