Define USE_TYPED_DRVET, use drvet * instead of struct drvet *

This commit is contained in:
Andrew Johnson
2023-12-24 18:01:37 +00:00
parent 2f730b8e9f
commit 918a188285
9 changed files with 13 additions and 10 deletions

View File

@ -680,7 +680,7 @@ long dbtpf(const char *pname, const char *pvalue)
long dbior(const char *pdrvName,int interest_level) long dbior(const char *pdrvName,int interest_level)
{ {
drvSup *pdrvSup; drvSup *pdrvSup;
struct drvet *pdrvet; drvet *pdrvet;
dbRecordType *pdbRecordType; dbRecordType *pdbRecordType;
if (!pdbbase) { if (!pdbbase) {

View File

@ -11,6 +11,8 @@
SRC_DIRS += $(IOCDIR)/dbStatic SRC_DIRS += $(IOCDIR)/dbStatic
USR_CFLAGS += -DUSE_TYPED_DRVET
INC += dbBase.h INC += dbBase.h
INC += dbFldTypes.h INC += dbFldTypes.h
INC += dbStaticLib.h INC += dbStaticLib.h

View File

@ -21,6 +21,7 @@
#include "dbDefs.h" #include "dbDefs.h"
#include "recSup.h" #include "recSup.h"
#include "devSup.h" #include "devSup.h"
#include "drvSup.h"
typedef struct dbMenu { typedef struct dbMenu {
ELLNODE node; ELLNODE node;
@ -33,7 +34,7 @@ typedef struct dbMenu {
typedef struct drvSup { typedef struct drvSup {
ELLNODE node; ELLNODE node;
char *name; char *name;
struct drvet *pdrvet; drvet *pdrvet;
}drvSup; }drvSup;
typedef struct devSup { typedef struct devSup {

View File

@ -188,8 +188,8 @@ union value {
struct vxiio vxiio; /* vxi io */ struct vxiio vxiio; /* vxi io */
}; };
struct dbCommon;
struct lset; struct lset;
struct link { struct link {
struct dbCommon *precord; /* Pointer to record owning link */ struct dbCommon *precord; /* Pointer to record owning link */
short type; short type;

View File

@ -388,7 +388,7 @@ static void initDrvSup(void) /* Locate all driver support entry tables */
for (pdrvSup = (drvSup *)ellFirst(&pdbbase->drvList); pdrvSup; for (pdrvSup = (drvSup *)ellFirst(&pdbbase->drvList); pdrvSup;
pdrvSup = (drvSup *)ellNext(&pdrvSup->node)) { pdrvSup = (drvSup *)ellNext(&pdrvSup->node)) {
struct drvet *pdrvet = registryDriverSupportFind(pdrvSup->name); drvet *pdrvet = registryDriverSupportFind(pdrvSup->name);
if (!pdrvet) { if (!pdrvet) {
errlogPrintf("iocInit: driver %s not found\n", pdrvSup->name); errlogPrintf("iocInit: driver %s not found\n", pdrvSup->name);

View File

@ -65,7 +65,7 @@ void registerDevices(DBBASE *pbase, int nDevices,
} }
void registerDrivers(DBBASE *pbase, int nDrivers, void registerDrivers(DBBASE *pbase, int nDrivers,
const char * const * driverSupportNames, struct drvet * const *drvsl) const char * const * driverSupportNames, drvet * const *drvsl)
{ {
int i; int i;
for (i = 0; i < nDrivers; i++) { for (i = 0; i < nDrivers; i++) {

View File

@ -29,7 +29,7 @@ DBCORE_API void registerDevices(
const char * const *deviceSupportNames, const dset * const *devsl); const char * const *deviceSupportNames, const dset * const *devsl);
DBCORE_API void registerDrivers( DBCORE_API void registerDrivers(
DBBASE *pbase, int nDrivers, DBBASE *pbase, int nDrivers,
const char * const *driverSupportNames, struct drvet * const *drvsl); const char * const *driverSupportNames, drvet * const *drvsl);
DBCORE_API void registerJLinks( DBCORE_API void registerJLinks(
DBBASE *pbase, int nDrivers, jlif * const *jlifsl); DBBASE *pbase, int nDrivers, jlif * const *jlifsl);

View File

@ -18,12 +18,12 @@ static void *registryID = "driver support";
DBCORE_API int registryDriverSupportAdd( DBCORE_API int registryDriverSupportAdd(
const char *name, struct drvet *pdrvet) const char *name, drvet *pdrvet)
{ {
return registryAdd(registryID, name, pdrvet); return registryAdd(registryID, name, pdrvet);
} }
DBCORE_API struct drvet * registryDriverSupportFind( DBCORE_API drvet * registryDriverSupportFind(
const char *name) const char *name)
{ {
return registryFind(registryID, name); return registryFind(registryID, name);

View File

@ -19,8 +19,8 @@ extern "C" {
#endif #endif
DBCORE_API int registryDriverSupportAdd( DBCORE_API int registryDriverSupportAdd(
const char *name, struct drvet *pdrvet); const char *name, drvet *pdrvet);
DBCORE_API struct drvet * registryDriverSupportFind( DBCORE_API drvet * registryDriverSupportFind(
const char *name); const char *name);
#ifdef __cplusplus #ifdef __cplusplus