EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: a question for msi
From: Andrew Johnson <[email protected]>
To: <[email protected]>
Date: Fri, 10 Aug 2018 11:43:23 -0500
Hi Han,

The change to macLib I discussed is attached should you wish to apply it
to your copy of Base; I am committing this to the Base-3.15 branch so it
will appear in the next release.

- Andrew


On 07/31/2018 07:48 PM, Jeong Han Lee wrote:
> Hi Bruce and Andrew,
> 
>   My intention isn't in EPICS IOC DB, I would like to use msi to handle
> many configuration files instead of m4 in specifically ESS EPICS
> building environment and my own EPICS building environment as well. I
> would like to stay within existent epics applications as much as possible.
> 
>   I didn't look at its source codes, but it's better to have a flag to
> turn ".undefined" or ",recursive" warning texts.
> 
>   However, you can simply ignore my question if you don't have any
> resources. Maybe I can spend some time later to implement this feature
> by myself.
> 
>   Thanks for everything!
> 
>   Han
> 
> 
> 
> 
> On 08/01/2018 02:04 AM, Bruce Hill wrote:
>> I'd be in favor of removing them unless the -V flag was set.
>>
>> Most of our msi use is intended to be loaded w/ macro definitions in
>> our st.cmd
>> file, so it's just annoying to see ",undefined" in files we've built
>> up from templates
>> when we know we'll define those macros later.
>>
>> We set the -V flag only for those few msi uses where the files need to
>> have
>> all macros expanded.   For those cases it would still be helpful to see
>> the ",undefined" or ",recursive" warning text in the msi output file
>> as we do now.
>>
>> Cheers,
>> - Bruce
>>
>> On 07/31/2018 02:57 PM, Andrew Johnson wrote:
>>> If there is a consensus that they are not useful I have a modification
>>> that removes the ",undefined" error indicator from the output generated
>>> by macLib (and hence the output from msi as long as the -V flag is used)
>>> when it encounters a $(macro) that it doesn't have a value for. There is
>>> also a ",recursive" marker for macros that are defined in a substitution
>>> file using themselves.
>>>
>>> As Bruce said, these markers don't change how a file is interpreted by
>>> an IOC when they are present, but if you feed the output into some other
>>> tool that doesn't understand them they might be annoying.
>>>
>>> Please discuss here if you particularly like or dislike these markers.
>>>
>>> - Andrew
>>>
>>>
>>> On 07/30/2018 04:23 PM, Jeong Han Lee wrote:
>>>> Hi,
>>>>
>>>>    Is there any other way to suppress or omit (,undefined) in the
>>>> output
>>>> file by using MSI?
>>>>
>>>>    Thanks,
>>>>    Han
>>

-- 
Arguing for surveillance because you have nothing to hide is no
different than making the claim, "I don't care about freedom of
speech because I have nothing to say." -- Edward Snowdon
diff --git a/src/libCom/macLib/macCore.c b/src/libCom/macLib/macCore.c
index 55d3171..6a69a8a 100644
--- a/src/libCom/macLib/macCore.c
+++ b/src/libCom/macLib/macCore.c
@@ -902,11 +902,15 @@ static void refer ( MAC_HANDLE *handle, MAC_ENTRY *entry, int level,
         }
     }
 
-    /* Bad reference, insert $(name,errval) */
+    /* Bad reference, insert either $(name,<error>) or $(name) */
     if ( v < valend ) *v++ = '$';
     if ( v < valend ) *v++ = '(';
     cpy2val( refname, &v, valend );
-    cpy2val( errval, &v, valend );
+    if (handle->flags & FLAG_SUPPRESS_WARNINGS) {
+        if ( v < valend ) *v++ = ')';
+    }
+    else
+        cpy2val( errval, &v, valend );
 
 cleanup:
     if (pop) {

Replies:
Re: a question for msi Andrew Johnson
References:
a question for msi Jeong Han Lee
Re: a question for msi Andrew Johnson
Re: a question for msi Bruce Hill
Re: a question for msi Jeong Han Lee

Navigate by Date:
Prev: Re: mrfioc2 Linux driver Michael Davidsaver
Next: Re: a question for msi Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: a question for msi Jeong Han Lee
Next: Re: a question for msi Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021  2022  2023  2024 
ANJ, 10 Aug 2018 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·