I think I understand the reason for the buggy line break.
The wrap() documentation says: "When words that are longer than $columns are encountered, they are broken up."
But there are spaces where the line could be broken. Why are they not used?
Because the part "epicsShareExtern reg_func " is the $initial_tab and thus not considered for line break. After that, "pvar_func_register_func_abcdefghijklmnopqrstuvwxyz0123456789" has no space, thus it is broken up.
The solution is:
$Text::Wrap::huge = "overflow";
--
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/1995728
Title:
registerRecordDeviceDriver.pl bug
Status in EPICS Base:
New
Bug description:
In EPICS 7, when processing a dbd file with a long function name (> 24
chars), registerRecordDeviceDriver.pl generates buggy output.
With the following file test.dbd:
function(abcdefghijklmnopqrstuvwxyz0123456789)
The command perl registerRecordDeviceDriver.pl test.dbd generates code with a line break in the middle of a variable name:
epicsShareExtern reg_func pvar_func_register_func_abcdefghijklmnopqrstuvwx
yz0123456789;
I suspect the error is in line 191 caused by the usage of wrap().
I have tested this with perl v5.16.3 and v5.26.3.
To manage notifications about this bug go to:
https://bugs.launchpad.net/epics-base/+bug/1995728/+subscriptions
- References:
- [Bug 1995728] [NEW] registerRecordDeviceDriver.pl bug Dirk Zimoch via Core-talk
- Navigate by Date:
- Prev:
[Bug 1995728] [NEW] registerRecordDeviceDriver.pl bug Dirk Zimoch via Core-talk
- Next:
[Bug 1995728] Re: registerRecordDeviceDriver.pl bug Andrew Johnson via Core-talk
- Index:
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
<2022>
2023
2024
- Navigate by Thread:
- Prev:
[Bug 1995728] [NEW] registerRecordDeviceDriver.pl bug Dirk Zimoch via Core-talk
- Next:
[Bug 1995728] Re: registerRecordDeviceDriver.pl bug Andrew Johnson via Core-talk
- Index:
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
<2022>
2023
2024
|