MISR Toolkit
1.5.1
Util
src
MtkDataBufferFree3D.c
Go to the documentation of this file.
1
/*===========================================================================
2
= =
3
= MtkDataBufferFree3D =
4
= =
5
=============================================================================
6
7
Jet Propulsion Laboratory
8
MISR
9
MISR Toolkit
10
11
Copyright 2005, California Institute of Technology.
12
ALL RIGHTS RESERVED.
13
U.S. Government Sponsorship acknowledged.
14
15
============================================================================*/
16
17
#include "
MisrUtil.h
"
18
#include "
MisrError.h
"
19
#include <stdlib.h>
20
33
MTKt_status
MtkDataBufferFree3D
(
34
MTKt_DataBuffer3D
*databuf )
35
{
36
MTKt_DataBuffer3D
dbuf =
MTKT_DATABUFFER3D_INIT
;
37
/* Data buffer structure */
38
39
if
(databuf == NULL)
40
return
MTK_SUCCESS
;
41
42
/* Free 3D buffer */
43
if
(databuf->
dataptr
!= NULL)
44
free(databuf->
dataptr
);
45
46
/* Free Illiffe vectors */
47
if
(databuf->
vdata
!= NULL) {
48
if
(databuf->
vdata
[0] != NULL) {
49
/* Free 2D Illiffe vector */
50
free(databuf->
vdata
[0]);
51
}
52
/* Free 1D Illiffe vector */
53
free(databuf->
vdata
);
54
}
55
56
*databuf = dbuf;
57
58
return
MTK_SUCCESS
;
59
}
MTKt_DataBuffer3D::dataptr
void * dataptr
Definition:
MisrUtil.h:137
MTKt_DataBuffer3D::vdata
void *** vdata
Definition:
MisrUtil.h:136
MTKt_DataBuffer3D
3-dimensional Data Buffer
Definition:
MisrUtil.h:129
MtkDataBufferFree3D
MTKt_status MtkDataBufferFree3D(MTKt_DataBuffer3D *databuf)
Free 3-dimensional data buffer (a buffer stack)
Definition:
MtkDataBufferFree3D.c:33
MTK_SUCCESS
Definition:
MisrError.h:12
MisrError.h
MTKT_DATABUFFER3D_INIT
#define MTKT_DATABUFFER3D_INIT
Definition:
MisrUtil.h:140
MisrUtil.h
MTKt_status
MTKt_status
Definition:
MisrError.h:11
MISR Toolkit - Copyright © 2005 - 2020 Jet Propulsion Laboratory
Generated on Fri Jun 19 2020 22:49:51