Use new helper.

This commit is contained in:
Andrew Johnson
2012-11-30 16:48:58 -06:00
parent f2716f88f3
commit 01819b0b02

View File

@@ -2,7 +2,7 @@
* Copyright (c) 2012 UChicago Argonne LLC, as Operator of Argonne
* National Laboratory.
* EPICS BASE is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
* in file LICENSE that is included with this distribution.
\*************************************************************************/
/* Long String Input soft device support
@@ -11,34 +11,16 @@
* Date: 2012-11-28
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "alarm.h"
#include "dbDefs.h"
#include "dbAccess.h"
#include "epicsTime.h"
#include "recGbl.h"
#include "devSup.h"
#include "link.h"
#include "lsiRecord.h"
#include "epicsExport.h"
static long init_record(lsiRecord *prec)
{
/* Handle CONSTANT links */
if (prec->inp.type == CONSTANT) {
char tmp[MAX_STRING_SIZE];
dbLoadLinkLS(&prec->inp, prec->val, prec->sizv, &prec->len);
if (recGblInitConstantLink(&prec->inp, DBF_STRING, tmp)) {
long len = prec->sizv;
strncpy(prec->val, tmp, len);
prec->len = strlen(prec->val) + 1;
prec->udf = FALSE;
}
}
return 0;
}