Expand description
C libCom epicsString.c — the escape-translation half.
raw_from_escaped is epicsStrnRawFromEscaped (epicsString.c:49-118),
which is also all that the deprecated dbTranslateEscape (:41-47) does.
It is the SINGLE owner of \-escape translation, because C has exactly one:
every caller that must turn a source-text escape into the byte it denotes
goes through it —
- the
.dbloader, for field and info VALUES (dbLexRoutines.c:1398-1403and:1435-1440, bothdbTranslateEscape(value, value)), and - iocsh
echo(libComRegister.c:84-91).
Record/alias NAMES are deliberately NOT translated: the .db lexer reads
them with a different rule (dbLex.l:88-92), which strips the quotes and
keeps the escape bytes raw. Do not route a name through here.
Verified against softIoc 7.0.10.1-DEV (dbgf re-escapes on print, so these
are the STORED bytes):
field(DESC, "hex\x41end") -> hexAend
field(VAL, "d:\q.") -> d:q. (unknown escape: the char itself)
field(VAL, "u:A.") -> u:u0041. (C has no \u here — the lexer
accepts it, the translation does
not implement it)Functions§
- raw_
from_ escaped - Translate C escape sequences to the bytes they denote — C
epicsStrnRawFromEscaped(epicsString.c:49-118). - raw_
from_ escaped_ bytes raw_from_escapedon bytes — C takes achar *, and so does this.