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); (REGISTRYFUNCTION)streamReloadSub);
} }
extern "C" {
epicsExportRegistrar(streamRegistrar); epicsExportRegistrar(streamRegistrar);
}
#endif #endif
// driver support //////////////////////////////////////////////////////// // driver support ////////////////////////////////////////////////////////
@ -291,9 +289,7 @@ struct stream_drvsup {
}; };
#ifndef EPICS_3_13 #ifndef EPICS_3_13
extern "C" {
epicsExportAddress(drvet, stream); epicsExportAddress(drvet, stream);
}
#endif #endif
#ifdef EPICS_3_13 #ifdef EPICS_3_13

View File

@ -40,7 +40,7 @@ static long readData (dbCommon *record, format_t *format)
else else
{ {
/* No MASK, (NOBT = 0): use VAL field */ /* No MASK, (NOBT = 0): use VAL field */
mbbiD->val = (unsigned short)val; mbbiD->val = val;
return DO_NOT_CONVERT; return DO_NOT_CONVERT;
} }
} }

View File

@ -46,13 +46,13 @@ static long readData (dbCommon *record, format_t *format)
return OK; return OK;
} }
} }
mbbi->val = (short)val; mbbi->val = val;
return DO_NOT_CONVERT; return DO_NOT_CONVERT;
} }
case DBF_ENUM: case DBF_ENUM:
{ {
if (streamScanf (record, format, &val)) return ERROR; if (streamScanf (record, format, &val)) return ERROR;
mbbi->val = (short)val; mbbi->val = val;
return DO_NOT_CONVERT; return DO_NOT_CONVERT;
} }
case DBF_STRING: case DBF_STRING:
@ -64,7 +64,7 @@ static long readData (dbCommon *record, format_t *format)
{ {
if (strcmp ((&mbbi->zrst)[val], buffer) == 0) if (strcmp ((&mbbi->zrst)[val], buffer) == 0)
{ {
mbbi->val = (short)val; mbbi->val = val;
return DO_NOT_CONVERT; return DO_NOT_CONVERT;
} }
} }

View File

@ -42,7 +42,7 @@ static long readData (dbCommon *record, format_t *format)
else else
{ {
/* No MASK, (NOBT = 0): use VAL field */ /* No MASK, (NOBT = 0): use VAL field */
mbboD->val = (short)val; mbboD->val = val;
return DO_NOT_CONVERT; return DO_NOT_CONVERT;
} }
} }

View File

@ -47,13 +47,13 @@ static long readData (dbCommon *record, format_t *format)
return OK; return OK;
} }
} }
mbbo->val = (short)val; mbbo->val = val;
return DO_NOT_CONVERT; return DO_NOT_CONVERT;
} }
case DBF_ENUM: case DBF_ENUM:
{ {
if (streamScanf (record, format, &val)) return ERROR; if (streamScanf (record, format, &val)) return ERROR;
mbbo->val = (short)val; mbbo->val = val;
return DO_NOT_CONVERT; return DO_NOT_CONVERT;
} }
case DBF_STRING: case DBF_STRING:
@ -65,7 +65,7 @@ static long readData (dbCommon *record, format_t *format)
{ {
if (strcmp ((&mbbo->zrst)[val], buffer) == 0) if (strcmp ((&mbbo->zrst)[val], buffer) == 0)
{ {
mbbo->val = (short)val; mbbo->val = val;
return DO_NOT_CONVERT; return DO_NOT_CONVERT;
} }
} }