diff --git a/documentation/RELEASE_NOTES.html b/documentation/RELEASE_NOTES.html index 8bf2162d0..91a84f214 100644 --- a/documentation/RELEASE_NOTES.html +++ b/documentation/RELEASE_NOTES.html @@ -3,16 +3,38 @@ - EPICS Base R3.14.12.2 Release Notes + EPICS Base R3.14.12.2-DEV Release Notes -

EPICS Base Release 3.14.12.2

+

EPICS Base Release 3.14.12.2-DEV

-

Changes between 3.14.12.1 and 3.14.12.2

+

Changes between 3.14.12.2 and 3.14.12.3

+

Comments in iocsh scripts

+ +

The IOC shell was very particular about comments in previous versions of +Base. If the # character was indented using white-space characters it +had to be followed immediately by a white-space, comma or parenthesis character, +and macLib would report errors if the rest of the comment contained any +undefined macros. These restrictions have now been removed. The comment +character can come from expanding a macro without it having to be followed by +white-space, although in this case macLib will still report errors due to +undefined or circular macro definitions.

+ +

MacOS-X: Don't use Ports/Fink unless configured

+ +

Previous releases would automatically use headers and link to libraries found +in the DarwinPorts and Fink installation directories. This is now controlled by +entries in the CONFIG_SITE.darwinCommon.darwinCommon file in the +configure/os directory, which are commented out by default. Recent +versions of MacOS-X come with an implementation of readline, so those additional +code repositories are no longer required.

+ +

Changes between 3.14.12.1 and 3.14.12.2

+

Path for Cap5 loadable library changed

The perl CA module makes use of a loadable library, which used to be loaded diff --git a/src/libCom/iocsh/iocsh.cpp b/src/libCom/iocsh/iocsh.cpp index a3cbd22a1..c140e56a9 100644 --- a/src/libCom/iocsh/iocsh.cpp +++ b/src/libCom/iocsh/iocsh.cpp @@ -545,10 +545,19 @@ iocshBody (const char *pathname, const char *commandLine) lineno++; /* - * Ignore comment lines other than to echo - * them if they came from a script. + * Skip leading white-space */ - if (*raw == '#') { + icin = 0; + while ((c = raw[icin]) && isspace(c)) { + icin++; + } + + /* + * Ignore comment lines other than to echo + * them if they came from a script. This + * avoids macLib errors from comments. + */ + if (c == '#') { if ((prompt == NULL) && (commandLine == NULL)) puts(raw); continue; @@ -562,15 +571,28 @@ iocshBody (const char *pathname, const char *commandLine) continue; /* - * Echo commands read from scripts + * Skip leading white-space coming from a macro + */ + while ((c = line[icin]) && isspace(c)) { + icin++; + } + + /* + * Echo non-empty lines read from a script */ if ((prompt == NULL) && *line && (commandLine == NULL)) puts(line); + /* + * Ignore lines that became a comment or empty after macro expansion + */ + if (!c || c == '#') + continue; + /* * Break line into words */ - icout = icin = 0; + icout = 0; inword = 0; argc = 0; quote = EOF;