#include <stddef.h>
#include "libComAPI.h"
#include "epicsTypes.h"
Go to the source code of this file.
LIBCOM_API int errSymBld |
( |
void |
| ) |
|
Definition at line 55 of file errSymLib.c.
70 modnum = errArray->
errNum >> 16;
72 fprintf(
stderr,
"errSymBld: ERROR - Module number in errSymTbl < 501 was Module=%lx Name=%s\n",
77 fprintf(
stderr,
"errSymBld: ERROR - errSymbolAdd() failed \n");
91 pNextNode = *phashnode;
93 *phashnode = perrNumNode;
unsigned short epicsUInt16
#define ellNext(PNODE)
Find the next node in list.
LIBCOM_API void * callocMustSucceed(size_t count, size_t size, const char *msg)
A calloc() that never returns NULL.
int errSymbolAdd(long errNum, const char *name)
struct errnumnode * hashnode
#define ellFirst(PLIST)
Find the first node in list.
LIBCOM_API int errSymbolAdd |
( |
long |
errNum, |
|
|
const char * |
name |
|
) |
| |
Definition at line 118 of file errSymLib.c.
void ellAdd(ELLLIST *pList, ELLNODE *pNode)
Adds a node to the end of a list.
LIBCOM_API void * callocMustSucceed(size_t count, size_t size, const char *msg)
A calloc() that never returns NULL.
LIBCOM_API void errSymDump |
( |
void |
| ) |
|
Definition at line 204 of file errSymLib.c.
212 printf(
"errSymDump: number of hash slots = %d\n",
NHASH);
213 for (i = 0; i <
NHASH; i++) {
219 int modnum = pNextNode->
errNum >> 16;
220 int errnum = pNextNode->
errNum & 0xffff;
223 printf(
"HASHNODE = %d\n", i);
225 printf(
"\tmod %d num %d \"%s\"\n",
226 modnum , errnum , pNextNode->
message);
228 pNextNode = *phashnode;
232 printf(
"\nerrSymDump: total number of error messages = %d\n", msgcount);
struct errnumnode * hashnode
LIBCOM_API void errSymLookup |
( |
long |
status, |
|
|
char * |
pBuf, |
|
|
size_t |
bufLength |
|
) |
| |
Definition at line 190 of file errSymLib.c.
192 const char* msg = errSymLookupInternal(
status);
194 strncpy(pBuf, msg, bufLength-1);
195 pBuf[bufLength-1] =
'\0';
198 errRawCopy(
status, pBuf, bufLength);
LIBCOM_API const char* errSymMsg |
( |
long |
status | ) |
|
Definition at line 181 of file errSymLib.c.
183 const char* msg = errSymLookupInternal(
status);
184 return msg ? msg :
"<Unknown code>";
Definition at line 265 of file errSymLib.c.
276 for (errnum = begErrNum; errnum <= endErrNum; errnum++) {
277 errNum = modnum << 16;
278 errNum |= (errnum & 0xffff);
void errSymTestPrint(long errNum)
unsigned short epicsUInt16
LIBCOM_API void errSymTestPrint |
( |
long |
errNum | ) |
|
Definition at line 239 of file errSymLib.c.
251 fprintf(
stderr,
"Usage: errSymTestPrint(long errNum) \n");
252 fprintf(
stderr,
"errSymTestPrint: module number < 501 \n");
256 if ( message[0] ==
'\0' )
return;
257 printf(
"module %hu number %hu message=\"%s\"\n",
258 modnum, errnum, message);
unsigned short epicsUInt16
void errSymLookup(long status, char *pBuf, size_t bufLength)