From 2a4a803b2f162692ca11e700b32da0a77049bfd2 Mon Sep 17 00:00:00 2001 From: cnlohr Date: Wed, 8 Mar 2017 01:01:42 -0500 Subject: cleaning up more header stuff --- src/survive.c | 1 - src/survive_driverman.c | 2 +- src/survive_driverman.h | 22 ---------------------- src/survive_internal.h | 10 +++++----- src/survive_vive.c | 8 +++----- 5 files changed, 9 insertions(+), 34 deletions(-) delete mode 100644 src/survive_driverman.h (limited to 'src') 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 #include "survive_internal.h" -#include "survive_driverman.h" #include #include #include 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 #include 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 #include #include -#include "survive_driverman.h" #include #include -#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 #include - -#include "survive_internal.h" #include #include -#include //sleep if I ever use it. +#include +#include #include #include #include -- cgit v1.2.3