added header file & consolodated source

This commit is contained in:
Jeff Hill
1998-11-10 21:20:28 +00:00
parent d1d589da72
commit c266df258b
5 changed files with 94 additions and 45 deletions

View File

@@ -1,7 +1,10 @@
TOP = ../../..
include $(TOP)/config/CONFIG_BASE
SRCS.c = ../iocLogClient.c ../veclist.c
SRCS.c = ../iocLogClient.c ../veclist.c \
../epicsDynLink.c
INC += epicsDynLink.h
#
# Tornado supplies this
@@ -11,7 +14,7 @@ SRCS.c += ../ldpp.c
endif
LIBOBJS = veclist.o iocLogClient.o \
symFindByNameEPICS.o symFindByNameAndTypeEPICS.o
epicsDynLink.o
#
# Tornado supplies this

View File

@@ -0,0 +1,33 @@
/*
* These routines will eventually need to be made OS independent
* (currently this is vxWorks specific)
*/
#ifndef epicsDynLinkh
#define epicsDynLinkh
#ifdef symFindByName
#undef symFindByName
#endif
#include "vxWorks.h"
#include "symLib.h"
#include "sysSymTbl.h"
STATUS symFindByNameEPICS(
SYMTAB_ID symTblId,
char *name,
char **pvalue,
SYM_TYPE *pType);
STATUS symFindByNameAndTypeEPICS(
SYMTAB_ID symTblId,
char *name,
char **pvalue,
SYM_TYPE *pType,
SYM_TYPE sType,
SYM_TYPE mask);
#endif /* ifdef epicsDynLinkh */

View File

@@ -1,4 +1,4 @@
/* $Id$
/* $Id $
*
* Comments from original version:
* On the MIPS processor, all symbols do not have the prepended underscore.
@@ -14,13 +14,8 @@
* 02a,03apr97,npr changed from mips.h into symFindByNameMips.c
* 03a,03jun98,wfl changed Mips -> EPICS and avoid architecture knowledge
*/
#ifdef symFindByName
#undef symFindByName
#endif
#include "vxWorks.h"
#include "symLib.h"
#include "epicsDynLink.h"
STATUS symFindByNameEPICS( SYMTAB_ID symTblId,
char *name,
@@ -36,3 +31,23 @@ STATUS symFindByNameEPICS( SYMTAB_ID symTblId,
return status;
}
STATUS symFindByNameAndTypeEPICS(
SYMTAB_ID symTblId,
char *name,
char **pvalue,
SYM_TYPE *pType,
SYM_TYPE sType,
SYM_TYPE mask )
{
STATUS status;
status = symFindByNameAndType( symTblId, name, pvalue,
pType, sType, mask );
if ( status == ERROR && name[0] == '_' )
status = symFindByNameAndType( symTblId, (name+1), pvalue,
pType, sType, mask );
return status;
}

View File

@@ -1,35 +0,0 @@
/* $Id$
*
* On various RISC processors (at least MIPS and PPC), symbols do not have
* the prepended underscore. Here we redefine symFindByNameAndType so that,
* if the name lookup fails and if the first character of the name is "_",
* the lookup is repeated starting at the second character of the name string.
*
* 01a,03jun98,wfl created (from symFindByNameEPICS.c).
*/
#ifdef symFindByNameAndType
#undef symFindByNameAndType
#endif
#include "vxWorks.h"
#include "symLib.h"
STATUS symFindByNameAndTypeEPICS( SYMTAB_ID symTblId,
char *name,
char **pvalue,
SYM_TYPE *pType,
SYM_TYPE sType,
SYM_TYPE mask )
{
STATUS status;
status = symFindByNameAndType( symTblId, name, pvalue,
pType, sType, mask );
if ( status == ERROR && name[0] == '_' )
status = symFindByNameAndType( symTblId, (name+1), pvalue,
pType, sType, mask );
return status;
}

View File

@@ -0,0 +1,33 @@
/*
* These routines will eventually need to be made OS independent
* (currently this is vxWorks specific)
*/
#ifndef epicsDynLinkh
#define epicsDynLinkh
#ifdef symFindByName
#undef symFindByName
#endif
#include "vxWorks.h"
#include "symLib.h"
#include "sysSymTbl.h"
STATUS symFindByNameEPICS(
SYMTAB_ID symTblId,
char *name,
char **pvalue,
SYM_TYPE *pType);
STATUS symFindByNameAndTypeEPICS(
SYMTAB_ID symTblId,
char *name,
char **pvalue,
SYM_TYPE *pType,
SYM_TYPE sType,
SYM_TYPE mask);
#endif /* ifdef epicsDynLinkh */