Commit Graph

26 Commits

Author SHA1 Message Date
Andrew Johnson
e95fcb2e06 Merged changes from 3.15 branch, to revno 12807 2017-02-01 11:57:04 -06:00
Andrew Johnson
63b059c35e Resolve additional cppcheck issues; fix iOS build 2016-12-07 17:51:00 -06:00
Keenan Lang
f0b5b52cef Whitespace 2016-03-07 14:14:33 -06:00
Keenan Lang
e0b578aff5 Eliminated @-sign echo disabling, replaced with ability to disable comment echoing with '#-' 2016-03-07 14:12:04 -06:00
Keenan Lang
0fd07d1632 Updated iocsh to allow user to select that lines from included scripts not be echoed. 2016-03-04 16:08:05 -06:00
Andrew Johnson
0a9c5d456b Merged iocshCmd-with-macros branch 2014-10-06 23:39:23 -05:00
Keenan Lang
64a98452e3 epicsEnvSet clears macros before setting environment variable to ensure intuitive use of the function in nested iocsh calls. While adding this functionality, fixed a latent bug in macPutValue where if you tried to NULL a macro with the same name as an environment variable, you would go into an infinite loop. 2014-09-02 16:35:32 -05:00
Keenan Lang
9d0be21cc1 MAC_HANDLE's in iocshBody weren't being created with environment variables. 2014-08-27 13:31:16 -05:00
Keenan Lang
2d3db2036b Updated iocshBody to keep track of macro context to allow scoping of macro variables from iocshRun/Load 2014-08-27 11:33:14 -05:00
Keenan Lang
00bb3d1e67 iocshLoad now works as iocsh with no parameters 2014-08-22 14:25:41 -05:00
Keenan Lang
1ad6ff03b3 Changed iocshLoadFile to iocshLoad and added iocshRun as the macro version of iocshCmd 2014-08-22 11:50:24 -05:00
Keenan Lang
76bd45cb45 Reverted calls that didn't need to use macDefExpand to single parameter 2014-08-21 16:09:21 -05:00
Keenan Lang
6d38cc1f76 Returned iocshCmd to it's original function signature, added iocshLoadFile instead 2014-08-21 15:19:50 -05:00
Keenan Lang
6ebbf0dd8c Whitespace changes snuck in due to editor 2014-08-20 16:58:50 -05:00
Keenan Lang
ab94bb46f2 Changing iocshCmd to idealized syntax 2014-08-19 16:34:41 -05:00
Michael Davidsaver
3ca42fc838 cleanup iocsh 2014-06-23 16:28:22 -04:00
Andrew Johnson
e1e389a2dd Low-memory behaviour fixes.
Fix unchecked buffer allocation in dbChannel.c
Replace calls to epicsStrDup() with checked malloc() for
things that happen often after iocInit.

Michael Davidsaver pointed out this issue.
2014-02-07 17:19:28 -06:00
Andrew Johnson
197e992241 Fixed iocsh stream redirection for several commands
Eric provided the fixes to iocsh (empty commands would not reset
redirected streams), I fixed various commands.
2013-12-11 17:50:29 -06:00
Andrew Johnson
afaebfbeb1 libCom: Fix iocsh comment recognition
Merged J. Lewis Muir's fix for comments introduced by macro.
Added fixes to allow comments to be indented too, which used
to work if the '#' was followed by white-space or any argument
separator character.
2012-01-11 15:12:15 -06:00
J. Lewis Muir
ee2a2dfffc libCom/iocsh: Ignore comment lines after macro expansion
The handling of comment lines is only performed before macro
expansion, thus lines with macros that expand to comment lines will
not be correctly handled as comment lines.

By chance this kind of worked sometimes because a "#" command that
does nothing is internally added to the command registry to make it
show up in the help output.  Relying on this is broken.  Furthermore,
if the line starts with '#' followed by a non-separator character
(e.g. "##", "#whatever", etc.) it will not work (i.e. it will produce
a command-not-found error).

This fix checks to see if the first character of the line after macro
expansion is '#'.  If it is, it considers the line to be a comment.
2012-01-11 11:40:30 -06:00
Andrew Johnson
c71093f47f libCom/iocsh: Oops, allow NULL pathname. 2011-04-26 15:18:30 -05:00
Andrew Johnson
c11a31f549 libCom/iocsh: Set IOCSH_STARTUP_SCRIPT env var. 2011-04-26 14:57:26 -05:00
Andrew Johnson
d192f51858 Don't use back-tick chars as open quotes, they aren't any more. 2010-04-28 17:29:04 -05:00
Janet B. Anderson
519b33e4fb Changes for shared library build using MinGW compiler on win32. 2008-07-29 21:11:56 +00:00
Andrew Johnson
3fa2a79f4f Move static command structures to file scope, needed for vxWorks-x86 targets. 2007-11-27 17:57:25 +00:00
Andrew Johnson
70cc7eaab9 Reorganized iocsh command registration to untangle the build order.
The iocsh core is now part of libCom, and commands are registered locally
with a Register routine for each IOC library.
2007-03-13 17:54:23 +00:00