Commit Graph

36 Commits

Author SHA1 Message Date
Michael Davidsaver
1b23701946 incorrect error check on GetStdHandle()
Likely inconsequential as GetConsoleMode() should
return 0 when given an invalid handle.
2023-12-01 16:47:45 +01:00
AlexWells
680e1734a4 iocsh: Add underline separator between help outputs
Also tweaks the overall format of the message a bit.
Add tests for new help output format
2023-12-01 16:34:04 +01:00
Michael Davidsaver
e291ca0a03 Fix compile w/ vs2012 2023-12-01 15:04:24 +01:00
Emilio Perez
5b84a86ccd Allow adding error symbols after early initialization
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
2023-12-01 15:03:00 +01:00
1d3a2defa2 Merge 7.0 commit 'ca9c95' into PSI-7.0 2023-12-01 14:21:07 +01:00
Michael Davidsaver
fe3ee85aee doc errSymTbl.h 2023-09-05 08:52:58 +02:00
Michael Davidsaver
c8d596034a add missing include 2023-09-01 16:11:50 +02:00
Emilio Perez
9934242ccf Add locking to error symbol table
This protects the cases of:
- simultaneously adding and requesting of an error symbol
- simultaneously adding many error symbols

x
2023-09-01 16:11:50 +02:00
Emilio Perez
e6dab90bf4 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
2023-09-01 16:11:50 +02:00
Emilio Perez
c680b9bebd error: add a constant for the minimum module number 2023-09-01 16:11:50 +02:00
Emilio Perez
9555ca05b8 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
2023-09-01 16:11:49 +02:00
Emilio Perez
0cd56fa40b Allow adding error symbols after early initialization
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
2023-09-01 16:11:49 +02:00
1148931226 On Vxworks clone std* file handles because they are thread specific 2023-09-01 14:15:56 +02:00
Michael Davidsaver
1595ed8860 quieting clang-tidy, non-functional changes
Changes to syntax which should not effect generated code
2023-08-28 14:17:00 +02:00
Eva Lott
b878295d06 Added the new annotation EPICS_PRINTF_FMT 2023-05-01 09:03:45 -07:00
Andrew Johnson
7ef0c80630 errSymLib: status 0 => "Ok" 2022-12-31 19:14:57 -06:00
Michael Davidsaver
49fddaa13e errlogRemoveListeners() handle self-removal
Handle errlogRemoveListeners() during a callback.
2022-12-20 20:12:04 -08:00
Michael Davidsaver
7448a8bfa9 errlog: worker exit when buffer is empty
Allow the worker to flush any buffered messages.
After pvt.atExit, further logging will be synchronous.
Ensure any flusher gets a final wakeup.
2022-12-20 20:12:04 -08:00
Andrew Johnson
e4811d5a28 Documentation updates UNRELEASED => 7.0.7 2022-09-07 12:46:21 -05:00
Jure Varlec
e6b8ecd55e Add space to the message printed by errMessage() 2022-07-28 13:11:29 -07:00
Michael Davidsaver
a44ddd586e errlog: add ANSI_BOLD 2022-05-12 09:01:36 -07:00
Michael Davidsaver
2f51653a9e errlog: try to enable WIN10 terminal escape processing 2021-10-18 08:45:13 -07:00
Michael Davidsaver
0c12b02d4f errlog strip ANSI escapes
Always strip for handlers, and conditionally
if stderr is not a TTY, or $TERM unset/empty.
2021-10-18 08:45:13 -07:00
Michael Davidsaver
ac12ccad38 errlog add ANSI escape macros 2021-10-18 08:45:13 -07:00
Michael Davidsaver
8fdaa13c97 errlog: eltc() re-add flush
Removal upsets dbCaLinkTest on RTEMS, which must not be
synchronizing correctly.  Re-add until this can be corrected.
2021-10-18 08:45:13 -07:00
Michael Davidsaver
29fa0621d7 Com: rewrite errlog
Switch to double buffering to allow errlogThread
to unlock while printing.
2021-10-18 08:45:13 -07:00
Andrew Johnson
7d2ca62a78 Misc doxygen fixes and updates 2021-09-25 22:34:05 -05:00
Michael Davidsaver
e34b6c5c0c Fix spelling in comments
Should be non-functional, except for some error message strings.
2021-08-29 07:27:50 -07:00
Matthew Pearson
ef878808ce errlog.h: added doxygen comments. 2021-03-14 16:30:28 -07:00
Michael Davidsaver
8723d4d9cb include database S_* in error string table 2021-02-08 09:22:27 -08:00
Andrew Johnson
5f0d52cd5c errSymLib Fix from Ivo Hanak
Fixes lp: #1907077
2020-12-08 10:10:03 -06:00
Andrew Johnson
3c99391d93 Added SPDX License ID to all EPICS-original source files
In some cases the license-identification header was missing,
so I added that as well. Replaced the remaining headers that
specifically identified "Versions 3.13.7 and higher".

Makefiles and the build system were deliberately excluded.
2020-08-03 11:53:01 -05:00
36a8b51d8e CleanupWhitespace
removed spaces at end of line

replaced tabs with spaces
2020-05-20 14:48:09 -07:00
Michael Davidsaver
799e72b1e3 libCom: actually use libComAPI.h in libCom 2020-05-20 14:47:51 -07:00
Michael Davidsaver
905ca4b7ac quiet some warnings 2019-11-13 10:17:43 -08:00
Ralph Lange
833648c977 Move all under modules/libcom 2018-06-19 11:25:46 +02:00