mirror of
https://gitea.psi.ch/ELOG/mxml.git
synced 2026-09-09 01:23:22 +00:00
Added C++ support
This commit is contained in:
parent
e7e0170dab
commit
d4de46a3d8
18
mxml.h
18
mxml.h
@ -58,6 +58,19 @@ typedef struct mxml_struct {
|
||||
|
||||
/*------------------------------------------------------------------*/
|
||||
|
||||
/* make functions callable from a C++ program */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef EXPRT
|
||||
#if defined(EXPORT_DLL)
|
||||
#define EXPRT __declspec(dllexport)
|
||||
#else
|
||||
#define EXPRT
|
||||
#endif
|
||||
#endif
|
||||
|
||||
MXML_WRITER *mxml_open_file(const char *file_name);
|
||||
MXML_WRITER *mxml_open_buffer(void);
|
||||
int mxml_set_translate(MXML_WRITER *writer, int flag);
|
||||
@ -107,4 +120,9 @@ void mxml_free_tree(PMXML_NODE tree);
|
||||
|
||||
void mxml_dirname(char* path);
|
||||
void mxml_basename(char *path);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/*------------------------------------------------------------------*/
|
||||
|
||||
10
strlcpy.h
10
strlcpy.h
@ -5,10 +5,14 @@
|
||||
|
||||
Contents: Header file for strlcpy.c
|
||||
|
||||
$Id:$
|
||||
$Id$
|
||||
|
||||
\********************************************************************/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef EXPRT
|
||||
#if defined(EXPORT_DLL)
|
||||
#define EXPRT __declspec(dllexport)
|
||||
@ -19,3 +23,7 @@
|
||||
|
||||
size_t EXPRT strlcpy(char *dst, const char *src, size_t size);
|
||||
size_t EXPRT strlcat(char *dst, const char *src, size_t size);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user