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)
{
drvSup *pdrvSup;
struct drvet *pdrvet;
drvet *pdrvet;
dbRecordType *pdbRecordType;
if (!pdbbase) {

View File

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

View File

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

View File

@ -188,8 +188,8 @@ union value {
struct vxiio vxiio; /* vxi io */
};
struct dbCommon;
struct lset;
struct link {
struct dbCommon *precord; /* Pointer to record owning link */
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;
pdrvSup = (drvSup *)ellNext(&pdrvSup->node)) {
struct drvet *pdrvet = registryDriverSupportFind(pdrvSup->name);
drvet *pdrvet = registryDriverSupportFind(pdrvSup->name);
if (!pdrvet) {
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,
const char * const * driverSupportNames, struct drvet * const *drvsl)
const char * const * driverSupportNames, drvet * const *drvsl)
{
int 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);
DBCORE_API void registerDrivers(
DBBASE *pbase, int nDrivers,
const char * const *driverSupportNames, struct drvet * const *drvsl);
const char * const *driverSupportNames, drvet * const *drvsl);
DBCORE_API void registerJLinks(
DBBASE *pbase, int nDrivers, jlif * const *jlifsl);

View File

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

View File

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