do not assume any particualr size of VAL field

This commit is contained in:
2018-05-23 14:36:30 +02:00
parent 7c8388af2f
commit 9a5ac6380d
5 changed files with 10 additions and 14 deletions

View File

@ -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

View File

@ -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;
}
}

View File

@ -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:
{

View File

@ -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;
}
}

View File

@ -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:
{