source: XIOS/branchs/xios-1.0/extern/src_netcdf4/daputil.h @ 2100

Last change on this file since 2100 was 409, checked in by ymipsl, 12 years ago

Add improved nectdf internal library src

YM

  • Property svn:eol-style set to native
File size: 3.0 KB
Line 
1/*********************************************************************
2 *   Copyright 1993, UCAR/Unidata
3 *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
4 *   $Header: /upc/share/CVS/netcdf-3/libncdap3/daputil.h,v 1.25 2010/05/05 22:15:16 dmh Exp $
5 *********************************************************************/
6#ifndef DAPUTIL_H
7#define DAPUTIL_H 1
8
9/* Define a set of flags to control path construction */
10#define PATHNC    1 /*Use ->ncname*/
11#define PATHELIDE 2 /*Leave out elided nodes*/
12
13/* mnemonic */
14#define WITHDATASET 1
15#define WITHOUTDATASET 0
16
17/* sigh!, Forwards */
18struct CDFnode;
19struct NCTMODEL;
20struct NCDAPCOMMON;
21
22extern nc_type nctypeconvert(struct NCDAPCOMMON*, nc_type);
23extern nc_type octypetonc(OCtype);
24extern OCtype nctypetodap(nc_type);
25extern size_t nctypesizeof(nc_type);
26extern char* nctypetostring(nc_type);
27extern char* maketmppath(char* path, char* prefix);
28
29extern void collectnodepath3(struct CDFnode*, NClist* path, int dataset);
30extern void collectocpath(OCconnection conn, OCobject node, NClist* path);
31
32extern char* makecdfpathstring3(struct CDFnode*,const char*);
33extern void clonenodenamepath3(struct CDFnode*, NClist*, int);
34extern char* makepathstring3(NClist* path, const char* separator, int flags);
35
36extern char* makeocpathstring3(OCconnection, OCobject, const char*);
37
38extern char* cdflegalname3(char* dapname);
39
40/* Given a param string; return its value or null if not found*/
41extern const char* paramvalue34(struct NCDAPCOMMON* drno, const char* param);
42/* Given a param string; check for a given substring */
43extern int paramcheck34(struct NCDAPCOMMON* drno, const char* param, const char* substring);
44
45extern int nclistconcat(NClist* l1, NClist* l2);
46extern int nclistminus(NClist* l1, NClist* l2);
47extern int nclistdeleteall(NClist* l1, ncelem);
48
49extern char* getvaraprint(void* gv);
50
51extern int dapinsequence(struct CDFnode* node);
52extern int daptopgrid(struct CDFnode* node);
53extern int daptopseq(struct CDFnode* node);
54extern int daptoplevel(struct CDFnode* node);
55extern int dapgridmap(struct CDFnode* node);
56extern int dapgridarray(struct CDFnode* node);
57extern int dapgridelement(struct CDFnode* node);
58
59extern unsigned int modeldecode(int, const char*, const struct NCTMODEL*, unsigned int);
60extern unsigned long getlimitnumber(const char* limit);
61
62extern void dapexpandescapes(char *termstring);
63
64/* Only used by libncdap4 */
65extern int alignbuffer3(NCbytes*, int alignment);
66extern size_t dimproduct3(NClist* dimensions);
67
68#if defined(DLL_NETCDF)
69# if defined(DLL_EXPORT)
70#  define NCC_EXTRA __declspec(dllexport)
71#else
72#  define NCC_EXTRA __declspec(dllimport)
73# endif
74NCC_EXTRA extern int nc__testurl(const char* path, char** basename);
75#else
76extern int nc__testurl(const char* parth, char** basename);
77#endif
78
79
80/* Provide a wrapper for oc_fetch so we can log what it does */
81extern OCerror dap_fetch(struct NCDAPCOMMON*,OCconnection,const char*,OCdxd,OCobject*);
82
83extern int dap_badname(char* name);
84extern char* dap_repairname(char* name);
85
86#endif /*DAPUTIL_H*/
Note: See TracBrowser for help on using the repository browser.