From ac128fc048456675435cd4f6b19db351c7a39576 Mon Sep 17 00:00:00 2001 From: "W. Eric Norum" Date: Tue, 8 Jul 2003 20:14:54 +0000 Subject: [PATCH] Add iocshArgPersistentString type. --- src/iocsh/iocsh.cpp | 5 +++++ src/iocsh/iocsh.h | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/iocsh/iocsh.cpp b/src/iocsh/iocsh.cpp index 62e352c87..5ed55c18c 100644 --- a/src/iocsh/iocsh.cpp +++ b/src/iocsh/iocsh.cpp @@ -21,6 +21,7 @@ #include "errlog.h" #include "dbAccess.h" +#include "epicsString.h" #include "epicsThread.h" #include "epicsMutex.h" #include "registry.h" @@ -179,6 +180,10 @@ cvtArg (const char *filename, int lineno, char *arg, iocshArgBuf *argBuf, const argBuf->sval = arg; break; + case iocshArgPersistentString: + argBuf->sval = epicsStrDup(arg); + break; + case iocshArgPdbbase: /* Argument must be missing or 0 or pdbbase */ if(!arg || !*arg || (*arg == '0') || (strcmp(arg, "pdbbase") == 0)) { diff --git a/src/iocsh/iocsh.h b/src/iocsh/iocsh.h index 263c316dd..3a8754691 100644 --- a/src/iocsh/iocsh.h +++ b/src/iocsh/iocsh.h @@ -25,7 +25,8 @@ typedef enum { iocshArgDouble, iocshArgString, iocshArgPdbbase, - iocshArgArgv + iocshArgArgv, + iocshArgPersistentString }iocshArgType; typedef union iocshArgBuf {