netcdf-c/liblib/stub.c

72 lines
1.3 KiB
C
Raw Normal View History

2010-06-03 21:24:43 +08:00
/*********************************************************************
* Copyright 2010, UCAR/Unidata
* See netcdf/COPYRIGHT file for copying and redistribution conditions.
*********************************************************************/
#include "config.h"
#include "ncdispatch.h"
2010-06-03 21:24:43 +08:00
extern int NC3_initialize(void);
2011-09-21 04:39:04 +08:00
2010-06-03 21:24:43 +08:00
#ifdef USE_NETCDF4
extern int NC4_initialize(void);
#endif
#ifdef USE_DAP
extern int NCD3_initialize(void);
#ifdef USE_NETCDF4
extern int NCD4_initialize(void);
#endif
#endif
2011-04-17 04:56:36 +08:00
#ifdef USE_CDMREMOTE
2010-12-16 05:45:05 +08:00
extern int NCCR_initialize(void);
#endif
2011-09-21 04:39:04 +08:00
#ifdef BUILD_RPC
extern int NCRPC_initialize(void);
#endif
2010-06-03 21:24:43 +08:00
int
NC_initialize(void)
{
int stat = NC_NOERR;
2011-09-19 04:57:51 +08:00
/* Allow libdispatch to do initialization */
if((stat = NCDISPATCH_initialize())) return stat;
/* Initialize each active protocol */
2010-06-03 21:24:43 +08:00
if((stat = NC3_initialize())) return stat;
#ifdef USE_DAP
if((stat = NCD3_initialize())) return stat;
#endif
2011-09-21 04:39:04 +08:00
#ifdef USE_NETCDF4
if((stat = NC4_initialize())) return stat;
/* if((stat = NCD_initialize())) return stat; */
2011-09-21 04:39:04 +08:00
#ifdef USE_DAP
#ifdef NOTUSED
2010-06-03 21:24:43 +08:00
if((stat = NCD4_initialize())) return stat;
#endif
#endif
2010-06-03 21:24:43 +08:00
2011-04-17 04:56:36 +08:00
#ifdef USE_CDMREMOTE
2010-12-16 05:45:05 +08:00
if((stat = NCCR_initialize())) return stat;
#endif
2011-09-21 04:39:04 +08:00
#ifdef USE_RPC
if((stat = NCRPC_initialize())) return stat;
#endif
#endif /* USE_NETCDF4 */
2010-06-03 21:24:43 +08:00
return NC_NOERR;
}