do not assume any particualr size of VAL field
This commit is contained in:
@ -273,9 +273,7 @@ static void streamRegistrar ()
|
||||
(REGISTRYFUNCTION)streamReloadSub);
|
||||
}
|
||||
|
||||
extern "C" {
|
||||
epicsExportRegistrar(streamRegistrar);
|
||||
}
|
||||
#endif
|
||||
|
||||
// driver support ////////////////////////////////////////////////////////
|
||||
@ -291,9 +289,7 @@ struct stream_drvsup {
|
||||
};
|
||||
|
||||
#ifndef EPICS_3_13
|
||||
extern "C" {
|
||||
epicsExportAddress(drvet, stream);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef EPICS_3_13
|
||||
|
@ -40,7 +40,7 @@ static long readData (dbCommon *record, format_t *format)
|
||||
else
|
||||
{
|
||||
/* No MASK, (NOBT = 0): use VAL field */
|
||||
mbbiD->val = (unsigned short)val;
|
||||
mbbiD->val = val;
|
||||
return DO_NOT_CONVERT;
|
||||
}
|
||||
}
|
||||
|
@ -46,13 +46,13 @@ static long readData (dbCommon *record, format_t *format)
|
||||
return OK;
|
||||
}
|
||||
}
|
||||
mbbi->val = (short)val;
|
||||
mbbi->val = val;
|
||||
return DO_NOT_CONVERT;
|
||||
}
|
||||
case DBF_ENUM:
|
||||
{
|
||||
if (streamScanf (record, format, &val)) return ERROR;
|
||||
mbbi->val = (short)val;
|
||||
mbbi->val = val;
|
||||
return DO_NOT_CONVERT;
|
||||
}
|
||||
case DBF_STRING:
|
||||
@ -64,7 +64,7 @@ static long readData (dbCommon *record, format_t *format)
|
||||
{
|
||||
if (strcmp ((&mbbi->zrst)[val], buffer) == 0)
|
||||
{
|
||||
mbbi->val = (short)val;
|
||||
mbbi->val = val;
|
||||
return DO_NOT_CONVERT;
|
||||
}
|
||||
}
|
||||
@ -98,7 +98,7 @@ static long writeData (dbCommon *record, format_t *format)
|
||||
}
|
||||
case DBF_ENUM:
|
||||
{
|
||||
return streamPrintf (record, format, (long) mbbi->val);
|
||||
return streamPrintf (record, format, (long)mbbi->val);
|
||||
}
|
||||
case DBF_STRING:
|
||||
{
|
||||
|
@ -42,7 +42,7 @@ static long readData (dbCommon *record, format_t *format)
|
||||
else
|
||||
{
|
||||
/* No MASK, (NOBT = 0): use VAL field */
|
||||
mbboD->val = (short)val;
|
||||
mbboD->val = val;
|
||||
return DO_NOT_CONVERT;
|
||||
}
|
||||
}
|
||||
|
@ -47,13 +47,13 @@ static long readData (dbCommon *record, format_t *format)
|
||||
return OK;
|
||||
}
|
||||
}
|
||||
mbbo->val = (short)val;
|
||||
mbbo->val = val;
|
||||
return DO_NOT_CONVERT;
|
||||
}
|
||||
case DBF_ENUM:
|
||||
{
|
||||
if (streamScanf (record, format, &val)) return ERROR;
|
||||
mbbo->val = (short)val;
|
||||
mbbo->val = val;
|
||||
return DO_NOT_CONVERT;
|
||||
}
|
||||
case DBF_STRING:
|
||||
@ -65,7 +65,7 @@ static long readData (dbCommon *record, format_t *format)
|
||||
{
|
||||
if (strcmp ((&mbbo->zrst)[val], buffer) == 0)
|
||||
{
|
||||
mbbo->val = (short)val;
|
||||
mbbo->val = val;
|
||||
return DO_NOT_CONVERT;
|
||||
}
|
||||
}
|
||||
@ -101,7 +101,7 @@ static long writeData (dbCommon *record, format_t *format)
|
||||
}
|
||||
case DBF_ENUM:
|
||||
{
|
||||
return streamPrintf (record, format, (long) mbbo->val);
|
||||
return streamPrintf (record, format, (long)mbbo->val);
|
||||
}
|
||||
case DBF_STRING:
|
||||
{
|
||||
|
Reference in New Issue
Block a user