mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-04-06 18:00:24 +08:00
externl'ize
This commit is contained in:
parent
dd0609b153
commit
58fe869139
@ -15,6 +15,7 @@ See COPYRIGHT for license information.
|
||||
|
||||
#include "nclist.h"
|
||||
#include "nchashmap.h" /* Also includes name map and id map */
|
||||
#include "ncexternl.h"
|
||||
|
||||
/* Forward (see nc4internal.h)*/
|
||||
struct NC_OBJ;
|
||||
@ -44,50 +45,50 @@ typedef struct NCindex {
|
||||
} NCindex;
|
||||
|
||||
/* Locate object by name in an NCindex */
|
||||
extern struct NC_OBJ* ncindexlookup(NCindex* index, const char* name);
|
||||
EXTERNL struct NC_OBJ* ncindexlookup(NCindex* index, const char* name);
|
||||
|
||||
/* Get ith object in the index vector */
|
||||
extern struct NC_OBJ* ncindexith(NCindex* index, size_t i);
|
||||
EXTERNL struct NC_OBJ* ncindexith(NCindex* index, size_t i);
|
||||
|
||||
/* See if x is contained in the index and return its vector permission*/
|
||||
extern int ncindexfind(NCindex* index, struct NC_OBJ* o);
|
||||
EXTERNL int ncindexfind(NCindex* index, struct NC_OBJ* o);
|
||||
|
||||
/* Add object to the end of the vector, also insert into the hashmaps; */
|
||||
/* Return 1 if ok, 0 otherwise.*/
|
||||
extern int ncindexadd(NCindex* index, struct NC_OBJ* obj);
|
||||
EXTERNL int ncindexadd(NCindex* index, struct NC_OBJ* obj);
|
||||
|
||||
/* Insert object at ith position of the vector, also insert into the hashmaps; */
|
||||
/* Return 1 if ok, 0 otherwise.*/
|
||||
extern int ncindexset(NCindex* index, size_t i, struct NC_OBJ* obj);
|
||||
EXTERNL int ncindexset(NCindex* index, size_t i, struct NC_OBJ* obj);
|
||||
|
||||
/* Get a copy of the vector contents */
|
||||
extern struct NC_OBJ** ncindexdup(NCindex* index);
|
||||
EXTERNL struct NC_OBJ** ncindexdup(NCindex* index);
|
||||
|
||||
/* Count the non-null entries in an NCindex */
|
||||
extern int ncindexcount(NCindex* index);
|
||||
EXTERNL int ncindexcount(NCindex* index);
|
||||
|
||||
/* Rebuild index using all objects in the vector */
|
||||
/* Return 1 if ok, 0 otherwise.*/
|
||||
extern int ncindexrebuild(NCindex* index);
|
||||
EXTERNL int ncindexrebuild(NCindex* index);
|
||||
|
||||
/* "Remove" ith object from the index;
|
||||
WARNING: Replaces it with NULL in the list.
|
||||
*/
|
||||
/* Return 1 if ok, 0 otherwise.*/
|
||||
extern int ncindexidel(NCindex* index,size_t i);
|
||||
EXTERNL int ncindexidel(NCindex* index,size_t i);
|
||||
|
||||
/* Free an index. */
|
||||
/* Return 1 if ok; 0 otherwise */
|
||||
extern int ncindexfree(NCindex* index);
|
||||
EXTERNL int ncindexfree(NCindex* index);
|
||||
|
||||
/* Create an index: size == 0 => use defaults */
|
||||
/* Return index if ok; NULL otherwise */
|
||||
extern NCindex* ncindexnew(size_t initsize);
|
||||
EXTERNL NCindex* ncindexnew(size_t initsize);
|
||||
|
||||
extern int ncindexverify(NCindex* lm, int dump);
|
||||
EXTERNL int ncindexverify(NCindex* lm, int dump);
|
||||
|
||||
/* Lookup object in index; return NULL if not found */
|
||||
extern struct NC_OBJ* ncindexlookup(NCindex*, const char* name);
|
||||
EXTERNL struct NC_OBJ* ncindexlookup(NCindex*, const char* name);
|
||||
|
||||
/* Inline functions */
|
||||
|
||||
|
@ -6,6 +6,7 @@
|
||||
#ifndef NCURI_H
|
||||
#define NCURI_H
|
||||
|
||||
#include "ncexternl.h"
|
||||
|
||||
/* Define flags to control what is included by ncuribuild*/
|
||||
#define NCURIPATH 1
|
||||
@ -39,6 +40,7 @@ typedef struct NCURI {
|
||||
#endif
|
||||
} NCURI;
|
||||
|
||||
#if 0
|
||||
/* Declaration modifiers for DLL support (MSC et al) */
|
||||
#if defined(DLL_NETCDF) /* define when library is a DLL */
|
||||
# if defined(DLL_EXPORT) /* define when building the library */
|
||||
@ -52,6 +54,7 @@ typedef struct NCURI {
|
||||
#endif /* defined(DLL_NETCDF) */
|
||||
|
||||
#define EXTERNL MSC_EXTRA extern /**< Needed for DLL build. */
|
||||
#endif
|
||||
|
||||
#if defined(_CPLUSPLUS_) || defined(__CPLUSPLUS__) || defined(__CPLUSPLUS)
|
||||
extern "C" {
|
||||
|
Loading…
x
Reference in New Issue
Block a user