Cannot use hex numbers in HW links in EPICS 7
Bug #1950300 reported by
Dirk Zimoch
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
EPICS Base |
New
|
Undecided
|
Unassigned |
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 cvtDecimalOrHex
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.
description: | updated |
To post a comment you must log in.
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-character s?view= msvc-170 /www.cplusplus. com/reference/ cstdio/ scanf/? kw=scanf
[2] https:/