diff --git a/motorApp/AerotechSrc/concatString.c b/motorApp/AerotechSrc/concatString.c new file mode 100644 index 00000000..2c911a8d --- /dev/null +++ b/motorApp/AerotechSrc/concatString.c @@ -0,0 +1,36 @@ +/* aSub support for concatenating strings into a result longer than a + * DBF_STRING. Used by EnsemblePSOFly.db + */ +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +static long concatString(aSubRecord *pasub) { + /* printf("concatString: entry\n"); */ + if ((strlen(pasub->a) <= 50) && strlen(pasub->b)) { + strcpy(pasub->vala, pasub->a); + strcat(pasub->vala, pasub->b); + /* printf("concatString: vala='%s'\n", (char *)pasub->vala); */ + } + return(0); +} + +#include +#include + +static registryFunctionRef concatStringRef[] = { + {"concatString", (REGISTRYFUNCTION)concatString}, +}; + +static void concatStringRegister(void) { + registryFunctionRefAdd(concatStringRef, NELEMENTS(concatStringRef)); +} + +epicsExportRegistrar(concatStringRegister);