This was acomplished by making errSymbolAdd add the error symbol directly
into the global hash table and removing errnumlist which is not needed
anymore.
Unit tests were added for checking the following cases:
- Adding a valid symbol and checking that it exists (fixed by this change)
- Getting an existing error symbol
- Getting a non existing error symbol
- Adding an invalid error symbol (fixed by this change)
- Adding an error symbol with a code that already
exists (fixed by this change)
Therefore, issue #268 was fixed
error: statically allocate error symbol hash table
This will allow calling errSymbolAdd before errSymBld, therefore, a
function adding error symbols can now be run before iocInit or errlogInit
error: add a constant for the minimum module number
Make adding an identical error symbol not fail
A test case was also added which test that adding an error symbol
with same error code and message as one added before will not fail
Add locking to error symbol table
This protects the cases of:
- simultaneously adding and requesting of an error symbol
- simultaneously adding many error symbols
Update release notes regarding adding error symbols
Replace epicsThreadSleep() with proper thread synchronization.
The main thread was reading runCount without taking lock first.
Taking the lock before accessing doneCount might not be necessary
given the epicsEventMustWait(), but not 100% sure.
Re-implement around epicsTimeStamp (C API)
with class epicsTime becoming a wrapper.
Prefer epicsInt64 arithmetic.
Remove opaque struct l_fp (NTP time conversion)
Add proper CLRF-LF rules to .gitattributes.
Renormalize the bat files to LF in the repo and CRLF on disk.
Remove executable bit of files which shouldn't have it set
These changes to the functions epicsStrnRawFromEscaped() and
epicsStrnEscapedFromRaw() were prompted by the addition of JSON5
support to the dbStatic parser.
* \0 now represents a zero byte
* Unprintable characters are now escaped in hex
Tests for the octal escapes have been removed.
\x only takes 2 hex digits now, and the octal parser ignores a 3rd
digit if it would take the value over 0xff:
"\400" => ' ' then '0'
"\x088" => '\b' then '8'
With additional tests.
Teach the lexer/parser to recognize and decode them in JSON5 mode.
Teach the encoder to use them in JSON5 mode.
Add another error message for bad hex digits.
Test cases to show they work, and that the bad-digit check fires.
Any character other than the digits 1-9 may be preceded by a
reverse solidus '\', and unless the combination has an explicitly
defined expansion the character is included without the solidus.
JSON5 adds \', \0 and \v to the set of defined escapes, and an
escaped newline is omitted from a string.
In the test case Perl uses \13 instead of \v in the output
but it is the correct character (13 octal = 11 decimal = '\v').
Adds another lexer entry point for lexing map keys only,
adjust parser to use this instead of the general lexer.
Also defines another lexer token for internal use only.