Modify printfdset, set USE_TYPED_DSET
This commit is contained in:
@@ -36,6 +36,7 @@ stdRecords += mbbiDirectRecord
|
||||
stdRecords += mbboRecord
|
||||
stdRecords += mbboDirectRecord
|
||||
stdRecords += permissiveRecord
|
||||
printfRecord_CFLAGS += -DUSE_TYPED_DSET
|
||||
stdRecords += printfRecord
|
||||
stdRecords += selRecord
|
||||
stdRecords += seqRecord
|
||||
|
||||
@@ -336,13 +336,13 @@ static long init_record(struct dbCommon *pcommon, int pass)
|
||||
if (!pdset)
|
||||
return 0; /* Device support is optional */
|
||||
|
||||
if (pdset->number < 5) {
|
||||
if (pdset->common.number < 5) {
|
||||
recGblRecordError(S_dev_missingSup, prec, "printf::init_record");
|
||||
return S_dev_missingSup;
|
||||
}
|
||||
|
||||
if (pdset->init_record) {
|
||||
long status = pdset->init_record(prec);
|
||||
if (pdset->common.init_record) {
|
||||
long status = pdset->common.init_record(pcommon);
|
||||
if (status)
|
||||
return status;
|
||||
}
|
||||
@@ -368,7 +368,7 @@ static long process(struct dbCommon *pcommon)
|
||||
/* Call device support */
|
||||
pdset = (printfdset *) prec->dset;
|
||||
if (pdset &&
|
||||
pdset->number >= 5 &&
|
||||
pdset->common.number >= 5 &&
|
||||
pdset->write_string) {
|
||||
status = pdset->write_string(prec);
|
||||
|
||||
|
||||
@@ -10,13 +10,10 @@ recordtype(printf) {
|
||||
%#include "devSup.h"
|
||||
%
|
||||
%/* Declare Device Support Entry Table */
|
||||
%struct printfRecord;
|
||||
%typedef struct printfdset {
|
||||
% long number;
|
||||
% DEVSUPFUN report;
|
||||
% DEVSUPFUN init;
|
||||
% DEVSUPFUN init_record;
|
||||
% DEVSUPFUN get_ioint_info;
|
||||
% DEVSUPFUN write_string;
|
||||
% dset common;
|
||||
% long (*write_string)(struct printfRecord *prec);
|
||||
%} printfdset;
|
||||
%
|
||||
field(VAL,DBF_NOACCESS) {
|
||||
|
||||
Reference in New Issue
Block a user