Support variable array size
Added LEN field and get_array_info() routine. Removed len arg from device support write_string() routine. Modified device support to match.
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
#include "printfRecord.h"
|
||||
#include "epicsExport.h"
|
||||
|
||||
static long write_string(printfRecord *prec, size_t len)
|
||||
static long write_string(printfRecord *prec)
|
||||
{
|
||||
struct link *plink = &prec->out;
|
||||
int dtyp = dbGetLinkDBFtype(plink);
|
||||
@@ -23,7 +23,7 @@ static long write_string(printfRecord *prec, size_t len)
|
||||
return 0; /* Not connected */
|
||||
|
||||
if (dtyp == DBR_CHAR || dtyp == DBF_UCHAR)
|
||||
return dbPutLink(plink, dtyp, prec->val, len);
|
||||
return dbPutLink(plink, dtyp, prec->val, prec->len);
|
||||
|
||||
return dbPutLink(plink, DBR_STRING, prec->val, 1);
|
||||
}
|
||||
|
||||
@@ -16,10 +16,11 @@
|
||||
#include "printfRecord.h"
|
||||
#include "epicsExport.h"
|
||||
|
||||
static long write_string(printfRecord *prec, size_t len)
|
||||
static long write_string(printfRecord *prec)
|
||||
{
|
||||
struct link *plink = &prec->out;
|
||||
int dtyp = dbGetLinkDBFtype(plink);
|
||||
long len = prec->len;
|
||||
long status;
|
||||
|
||||
if (prec->pact || dtyp < 0)
|
||||
|
||||
@@ -90,7 +90,7 @@ static long init(int pass)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static long write_string(printfRecord *prec, size_t len)
|
||||
static long write_string(printfRecord *prec)
|
||||
{
|
||||
struct outStream *pstream = (struct outStream *)prec->dpvt;
|
||||
if (pstream)
|
||||
|
||||
Reference in New Issue
Block a user