forked from EarthScope/libmseed
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmsr_init.3
43 lines (33 loc) · 1.27 KB
/
msr_init.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
.TH MSR_INIT 3 2006/02/27 "Libmseed API"
.SH NAME
msr_init - Initializing and freeing MSRecord and related structures
.SH SYNOPSIS
.nf
.B #include <libmseed.h>
.BI "MSRecord *\fBmsr_init\fP ( MSRecord *" msr " );
.BI "void \fBmsr_free\fP ( MSRecord **" ppmsr " );
.BI "void \fBmsr_free_blktchain\fP ( MSRecord *" msr " );
.fi
.SH DESCRIPTION
\fBmsr_init\fP will initialize a MSRecord structure. If the \fImsr\fP
parameter is NULL a new structure will be allocated. If the \fImsr\fP
parameter is not NULL the blockette chain (MSRecord.blkts) will be
freed but any memory allocated for MSRecord.fsdh and
MSRecord.datasamples will be preserved as it will cleanly be re-used
by routines such as \fBmsr_unpack(3)\fP.
\fBmsr_free\fP will free all memory associated with a MSRecord
structure including the blockette chain and set the structure pointer
(*ppmsr) to 0.
\fBmsr_free_blktchain\fP will free all memory associated with the
blockette chain of an MSRecord structure. The shortcut blockette
pointers will also be reset.
.SH RETURN VALUES
\fBmsr_init\fP returns a pointer to the MSRecord structure initialized
on success or NULL on error.
.SH SEE ALSO
\fBms_intro(3)\fP, \fBmsr_pack(3)\fP and \fBmsr_unpack(3)\fP.
.SH AUTHOR
.nf
Chad Trabant
IRIS Data Management Center
.fi