File: ocutil.h

package info (click to toggle)
netcdf 1:4.7.4-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 104,952 kB
  • sloc: ansic: 228,683; sh: 10,980; yacc: 2,561; makefile: 1,319; lex: 1,173; xml: 173; awk: 2
file content (59 lines) | stat: -rw-r--r-- 1,857 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/* Copyright 2018, UCAR/Unidata and OPeNDAP, Inc.
   See the COPYRIGHT file for more information. */

#ifndef OCUTIL_H
#define OCUTIL_H 1

/* Forward */
struct OCstate;

#define ocmax(x,y) ((x) > (y) ? (x) : (y))

extern char* ocstrndup(const char* s, size_t len);
extern int ocstrncmp(const char* s1, const char* s2, size_t len);

extern int occopycat(char* dst, size_t size, size_t n, ...);
extern int occoncat(char* dst, size_t size, size_t n, ...);

extern size_t octypesize(OCtype etype);
extern char*  octypetostring(OCtype octype);
extern char*  octypetoddsstring(OCtype octype);
extern char* ocerrstring(int err);
extern OCerror ocsvcerrordata(struct OCstate*,char**,char**,long*);
extern OCerror octypeprint(OCtype etype, void* value, size_t bufsize, char* buf);
extern size_t xxdrsize(OCtype etype);

extern int oc_ispacked(OCnode* node);

extern size_t octotaldimsize(size_t,size_t*);

extern size_t ocarrayoffset(size_t rank, size_t*, const size_t*);
extern void ocarrayindices(size_t index, size_t rank, size_t*, size_t*);
extern size_t ocedgeoffset(size_t rank, size_t*, size_t*);

extern int ocvalidateindices(size_t rank, size_t*, size_t*);

extern void ocmakedimlist(NClist* path, NClist* dims);

extern int ocfindbod(NCbytes* buffer, size_t*, size_t*);

/* Reclaimers*/
extern void ocfreeprojectionclause(OCprojectionclause* clause);

/* Misc. */

/* merge two envv style lists */
extern char** ocmerge(const char** list1, const char** list2);

extern int ocmktmp(const char* base, char** tmpnamep);

extern void ocdataddsmsg(struct OCstate*, struct OCtree*);

extern char* ocdtmodestring(OCDT mode,int compact);

/* Define some classifiers */
#define ociscontainer(t) ((t) == OC_Dataset || (t) == OC_Structure || (t) == OC_Sequence || (t) == OC_Grid || (t) == OC_Attributeset)

#define ocisatomic(t) ((t) == OC_Atomic)

#endif /*UTIL_H*/