comparison libgsmfrp/state.c @ 3:3cd5ad24b1d4

libgsmfrp: implement internal state
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 19 Nov 2022 09:03:57 +0000
parents
children 286d5f097eb4
comparison
equal deleted inserted replaced
2:2b5770c715ee 3:3cd5ad24b1d4
1 /*
2 * In this module we implement allocation and initialization
3 * of state structures for our GSM FR preprocessor.
4 */
5
6 #include <stdlib.h>
7 #include <string.h>
8 #include "gsm_fr_preproc.h"
9 #include "internal.h"
10
11 struct gsmfr_preproc_state *gsmfr_preproc_create(void)
12 {
13 struct gsmfr_preproc_state *st;
14
15 st = malloc(sizeof(struct gsmfr_preproc_state));
16 if (st)
17 gsmfr_preproc_reset(st);
18 return st;
19 }
20
21 void gsmfr_preproc_reset(struct gsmfr_preproc_state *st)
22 {
23 memset(st, 0, sizeof(struct gsmfr_preproc_state));
24 }