EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  <20212022  2023  2024  Index 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  <20212022  2023  2024 
<== Date ==> <== Thread ==>

Subject: [Bug 1950300] Re: Cannot use hex numbers in HW links in EPICS 7
From: mdavidsaver via Core-talk <core-talk at aps.anl.gov>
To: core-talk at aps.anl.gov
Date: Tue, 09 Nov 2021 15:16:51 -0000
I hadn't known about '%i' with scanf().

Are you (Dirk) going to create a github PR so that new test case is run
through CI?

Have you investigated portability?  Is '%i' mentioned in the C89 spec.?

A quick search finds that '%i' is documented by MS [1].  And [2] claims
it is "... supported by the latest C and C++ standards (both published
in 2011) ...".  So this looks fine going forward.

[1] https://docs.microsoft.com/en-us/cpp/c-runtime-library/scanf-type-field-characters?view=msvc-170
[2] https://www.cplusplus.com/reference/cstdio/scanf/?kw=scanf

-- 
You received this bug notification because you are a member of EPICS
Core Developers, which is subscribed to EPICS Base.
Matching subscriptions: epics-core-list-subscription
https://bugs.launchpad.net/bugs/1950300

Title:
  Cannot use hex numbers in HW links in EPICS 7

Status in EPICS Base:
  New

Bug description:
  In EPICS 3.14.12, it was possible to use hex numbers in hardware links
  of type VME_IO and others like "#C0 S0x8b". (The parser used the
  function cvtDecimalOrHexToShort for this.) In EPICS 7 this does not
  work any longer because the string is parsed with %d instead of %i. As
  many of our existing IOCs use hex numbers here, this makes transition
  to EPICS 7 unnecessary hard.

  Changing to %i will allow hex numbers, but will also allow octal
  numbers.  That may a problem as C011 uses to mean 11 in 3.14, not 9.

  In that case, parsing with a single sscanf is not sufficient.

To manage notifications about this bug go to:
https://bugs.launchpad.net/epics-base/+bug/1950300/+subscriptions


References:
[Bug 1950300] [NEW] Cannot use hex numbers in HW links in EPICS 7 Dirk Zimoch via Core-talk

Navigate by Date:
Prev: [Bug 1950300] Re: Cannot use hex numbers in HW links in EPICS 7 Dirk Zimoch via Core-talk
Next: [Bug 1950300] Re: Cannot use hex numbers in HW links in EPICS 7 Dirk Zimoch via Core-talk
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  <20212022  2023  2024 
Navigate by Thread:
Prev: [Bug 1950300] Re: Cannot use hex numbers in HW links in EPICS 7 Dirk Zimoch via Core-talk
Next: [Bug 1950300] Re: Cannot use hex numbers in HW links in EPICS 7 Dirk Zimoch via Core-talk
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  <20212022  2023  2024 
ANJ, 09 Nov 2021 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·