File: d4bytes.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 (31 lines) | stat: -rw-r--r-- 758 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
/* Copyright 2018, UCAR/Unidata and OPeNDAP, Inc.
   See the COPYRIGHT file for more information. */

#ifndef D4BYTES_H
#define D4BYTES_H 1

typedef struct D4bytes {
  size_t alloc;
  size_t used;
  void* memory;
} D4bytes;

#if defined(_CPLUSPLUS_) || defined(__CPLUSPLUS__) || defined(__CPLUSPLUS)
extern "C" {
#endif

extern D4bytes* d4bytesnew(void);
extern void d4bytesfree(D4bytes*);
extern void* d4bytesalloc(D4bytes*,size_t);
extern void* d4byteszero(D4bytes*,size_t);
extern D4bytes* d4bytesconcat(D4bytes*,D4bytes*);

#define d4byteslength(d4) ((d4)->used)
#define d4bytesmemory(d4) ((d4)->memory)
#define d4bytesreset(d4) {(d4)->used = 0;}

#if defined(_CPLUSPLUS_) || defined(__CPLUSPLUS__) || defined(__CPLUSPLUS)
}
#endif

#endif /*D4BYTES_H*/