Imported Upstream version 3.2.2
[debian/gnuradio] / gr-gsm-fr-vocoder / src / lib / gsm / gsm_create.c
1 /*
2  * Copyright 1992 by Jutta Degener and Carsten Bormann, Technische
3  * Universitaet Berlin.  See the accompanying file "COPYRIGHT" for
4  * details.  THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.
5  */
6
7 static char const       ident[] = "$Header$";
8
9 #include        "config.h"
10
11 #ifdef  HAS_STRING_H
12 #include        <string.h>
13 #else
14 #       include "proto.h"
15         extern char     * memset P((char *, int, int));
16 #endif
17
18 #ifdef  HAS_STDLIB_H
19 #       include <stdlib.h>
20 #else
21 #       ifdef   HAS_MALLOC_H
22 #               include         <malloc.h>
23 #       else
24                 extern char * malloc();
25 #       endif
26 #endif
27
28 #include <stdio.h>
29
30 #include "gsm.h"
31 #include "private.h"
32 #include "proto.h"
33 #include <strings.h>
34
35 gsm gsm_create P0()
36 {
37         gsm  r;
38
39         r = (gsm)malloc(sizeof(struct gsm_state));
40         if (!r) return r;
41
42         memset((char *)r, 0, sizeof(*r));
43         r->nrp = 40;
44
45         return r;
46 }