libCom: actually use libComAPI.h in libCom

This commit is contained in:
Michael Davidsaver
2020-05-20 13:38:09 -07:00
parent b2750bbe93
commit 799e72b1e3
250 changed files with 1286 additions and 1434 deletions
+9 -10
View File
@@ -25,7 +25,6 @@
#include <stdlib.h>
#include <string.h>
#define epicsExportSharedSymbols
#include "dbDefs.h"
#include "errlog.h"
#include "dbmf.h"
@@ -98,7 +97,7 @@ static char *Strdup( const char *string );
* of macro definitions
*/
long /* 0 = OK; <0 = ERROR */
epicsShareAPI macCreateHandle(
epicsStdCall macCreateHandle(
MAC_HANDLE **pHandle, /* address of variable to receive pointer */
/* to new macro substitution context */
@@ -152,7 +151,7 @@ epicsShareAPI macCreateHandle(
* for the given handle
*/
void
epicsShareAPI macSuppressWarning(
epicsStdCall macSuppressWarning(
MAC_HANDLE *handle, /* opaque handle */
int suppress /* 0 means issue, 1 means suppress */
)
@@ -172,7 +171,7 @@ epicsShareAPI macSuppressWarning(
*/
long /* strlen(dest), <0 if any macros are */
/* undefined */
epicsShareAPI macExpandString(
epicsStdCall macExpandString(
MAC_HANDLE *handle, /* opaque handle */
const char *src, /* source string */
@@ -231,7 +230,7 @@ epicsShareAPI macExpandString(
* already existed
*/
long /* strlen(value) */
epicsShareAPI macPutValue(
epicsStdCall macPutValue(
MAC_HANDLE *handle, /* opaque handle */
const char *name, /* macro name */
@@ -299,7 +298,7 @@ epicsShareAPI macPutValue(
* Return the value of a macro
*/
long /* strlen(value), <0 if undefined */
epicsShareAPI macGetValue(
epicsStdCall macGetValue(
MAC_HANDLE *handle, /* opaque handle */
const char *name, /* macro name or reference */
@@ -358,7 +357,7 @@ epicsShareAPI macGetValue(
* context
*/
long /* 0 = OK; <0 = ERROR */
epicsShareAPI macDeleteHandle(
epicsStdCall macDeleteHandle(
MAC_HANDLE *handle ) /* opaque handle */
{
MAC_ENTRY *entry, *nextEntry;
@@ -390,7 +389,7 @@ epicsShareAPI macDeleteHandle(
* Mark the start of a new scoping level
*/
long /* 0 = OK; <0 = ERROR */
epicsShareAPI macPushScope(
epicsStdCall macPushScope(
MAC_HANDLE *handle ) /* opaque handle */
{
MAC_ENTRY *entry;
@@ -425,7 +424,7 @@ epicsShareAPI macPushScope(
* Pop all macros defined since the last call to macPushScope()
*/
long /* 0 = OK; <0 = ERROR */
epicsShareAPI macPopScope(
epicsStdCall macPopScope(
MAC_HANDLE *handle ) /* opaque handle */
{
MAC_ENTRY *entry, *nextEntry;
@@ -469,7 +468,7 @@ epicsShareAPI macPopScope(
* Report macro details to standard output
*/
long /* 0 = OK; <0 = ERROR */
epicsShareAPI macReportMacros(
epicsStdCall macReportMacros(
MAC_HANDLE *handle ) /* opaque handle */
{
const char *format = "%-1s %-16s %-16s %s\n";
+2 -3
View File
@@ -12,18 +12,17 @@
#include <stdlib.h>
#include <string.h>
#define epicsExportSharedSymbols
#include "errlog.h"
#include "epicsString.h"
#include "macLib.h"
char * epicsShareAPI
char * epicsStdCall
macEnvExpand(const char *str)
{
return macDefExpand(str, NULL);
}
char * epicsShareAPI
char * epicsStdCall
macDefExpand(const char *str, MAC_HANDLE *macros)
{
MAC_HANDLE *handle;
+27 -27
View File
@@ -25,7 +25,7 @@
#define INCmacLibH
#include "ellLib.h"
#include "shareLib.h"
#include "libComAPI.h"
#ifdef __cplusplus
extern "C" {
@@ -57,8 +57,8 @@ typedef struct {
* \brief Creates a new macro substitution context.
* \return 0 = OK; <0 = ERROR
*/
epicsShareFunc long
epicsShareAPI macCreateHandle(
LIBCOM_API long
epicsStdCall macCreateHandle(
MAC_HANDLE **handle, /**< pointer to variable to receive pointer
to new macro substitution context */
@@ -75,8 +75,8 @@ epicsShareAPI macCreateHandle(
* suppress the warning messages from subsequent library routines given the
* same \c handle.
*/
epicsShareFunc void
epicsShareAPI macSuppressWarning(
LIBCOM_API void
epicsStdCall macSuppressWarning(
MAC_HANDLE *handle, /**< opaque handle */
int falseTrue /**< 0 means issue, 1 means suppress*/
@@ -94,8 +94,8 @@ epicsShareAPI macSuppressWarning(
* value is the number of characters copied to \c dest. If the return value
* is negative, at least one undefined macro was left unexpanded.
*/
epicsShareFunc long
epicsShareAPI macExpandString(
LIBCOM_API long
epicsStdCall macExpandString(
MAC_HANDLE *handle, /**< opaque handle */
const char *src, /**< source string */
@@ -112,8 +112,8 @@ epicsShareAPI macExpandString(
* all scoping levels (the named macro doesn't have to exist in this case).
* Macros referenced in \c value need not be defined at this point.
*/
epicsShareFunc long
epicsShareAPI macPutValue(
LIBCOM_API long
epicsStdCall macPutValue(
MAC_HANDLE *handle, /**< opaque handle */
const char *name, /**< macro name */
@@ -149,8 +149,8 @@ epicsShareAPI macPutValue(
* the named macro is undefined at the moment of expansion. A reference
* is terminated by the matching ")" or "}" character.
*/
epicsShareFunc long
epicsShareAPI macGetValue(
LIBCOM_API long
epicsStdCall macGetValue(
MAC_HANDLE *handle, /**< opaque handle */
const char *name, /**< macro name or reference */
@@ -167,8 +167,8 @@ epicsShareAPI macGetValue(
* been returned. Macro values are always returned into strings which
* were pre-allocated by the caller.
*/
epicsShareFunc long
epicsShareAPI macDeleteHandle(
LIBCOM_API long
epicsStdCall macDeleteHandle(
MAC_HANDLE *handle /**< opaque handle */
);
/**
@@ -179,8 +179,8 @@ epicsShareAPI macDeleteHandle(
* to another scope. These macros will be lost on a macPopScope()
* call and those at the current scope will be re-instated.
*/
epicsShareFunc long
epicsShareAPI macPushScope(
LIBCOM_API long
epicsStdCall macPushScope(
MAC_HANDLE *handle /**< opaque handle */
);
/**
@@ -189,8 +189,8 @@ epicsShareAPI macPushScope(
*
* See macPushScope()
*/
epicsShareFunc long
epicsShareAPI macPopScope(
LIBCOM_API long
epicsStdCall macPopScope(
MAC_HANDLE *handle /**< opaque handle */
);
/**
@@ -199,8 +199,8 @@ epicsShareAPI macPopScope(
* This sends details of current definitions to standard output,
* and is intended purely for debugging purposes.
*/
epicsShareFunc long
epicsShareAPI macReportMacros(
LIBCOM_API long
epicsStdCall macReportMacros(
MAC_HANDLE *handle /**< opaque handle */
);
/** @} */
@@ -236,8 +236,8 @@ epicsShareAPI macReportMacros(
* The function returns the number of definitions encountered, or -1 if
* the supplied string is invalid.
*/
epicsShareFunc long
epicsShareAPI macParseDefns(
LIBCOM_API long
epicsStdCall macParseDefns(
MAC_HANDLE *handle, /**< opaque handle; may be NULL if debug
messages are not required. */
@@ -258,8 +258,8 @@ epicsShareAPI macParseDefns(
* definitions by calling macPutValue(). The pairs array is terminated
* by a NULL pointer.
*/
epicsShareFunc long
epicsShareAPI macInstallMacros(
LIBCOM_API long
epicsStdCall macInstallMacros(
MAC_HANDLE *handle, /**< opaque handle */
char *pairs[] /**< pointer to NULL-terminated array of
@@ -279,8 +279,8 @@ epicsShareAPI macInstallMacros(
* pointer to this null-terminated string. It returns NULL if the source
* string contains any undefined references.
*/
epicsShareFunc char *
epicsShareAPI macEnvExpand(
LIBCOM_API char *
epicsStdCall macEnvExpand(
const char *str /**< string to be expanded */
);
@@ -293,8 +293,8 @@ epicsShareAPI macEnvExpand(
* These macros are appended to the set of macros from environment
* variables when expanding the string.
*/
epicsShareFunc char *
epicsShareAPI macDefExpand(
LIBCOM_API char *
epicsStdCall macDefExpand(
const char *str, /**< string to be expanded */
MAC_HANDLE *macros /**< opaque handle; may be NULL if only
environment variables are to be used */
+2 -3
View File
@@ -17,7 +17,6 @@
#include <stdlib.h>
#include <string.h>
#define epicsExportSharedSymbols
#include "dbDefs.h"
#include "errlog.h"
#include "macLib.h"
@@ -30,7 +29,7 @@
* values)
*/
long /* #defns encountered; <0 = ERROR */
epicsShareAPI macParseDefns(
epicsStdCall macParseDefns(
MAC_HANDLE *handle, /* opaque handle; can be NULL if default */
/* special characters are to be used */
@@ -251,7 +250,7 @@ error:
* one (preferably two) NULL pointers
*/
long /* #macros defined; <0 = ERROR */
epicsShareAPI macInstallMacros(
epicsStdCall macInstallMacros(
MAC_HANDLE *handle, /* opaque handle */
char *pairs[] ) /* pointer to NULL-terminated array of */