Edinburgh Speech Tools
2.1-release
system.c
Go to the documentation of this file.
1
/*************************************************************************/
2
/* */
3
/* Copyright (c) 1997-98 Richard Tobin, Language Technology Group, HCRC, */
4
/* University of Edinburgh. */
5
/* */
6
/* THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, */
7
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
8
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
9
/* IN NO EVENT SHALL THE AUTHOR OR THE UNIVERSITY OF EDINBURGH BE LIABLE */
10
/* FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF */
11
/* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION */
12
/* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
13
/* */
14
/*************************************************************************/
15
#include <stdlib.h>
16
#include "
stdio16.h
"
17
#include "
system.h
"
18
19
void
*
Malloc
(
int
bytes)
20
{
21
void
*mem = malloc(bytes);
22
if
(!mem)
23
Fprintf
(
Stderr
,
"malloc failed\n"
);
24
return
mem;
25
}
26
27
void
*
Realloc
(
void
*mem,
int
bytes)
28
{
29
mem = mem ? realloc(mem, bytes) : malloc(bytes);
30
if
(!mem)
31
Fprintf
(
Stderr
,
"realloc failed\n"
);
32
return
mem;
33
}
34
35
void
Free
(
void
*mem)
36
{
37
if
(mem != 0) free(mem);
38
}
39
Stderr
STD_API FILE16 * Stderr
Definition:
stdio16.c:123
Realloc
void * Realloc(void *mem, int bytes)
Definition:
system.c:27
Free
void Free(void *mem)
Definition:
system.c:35
stdio16.h
system.h
Malloc
void * Malloc(int bytes)
Definition:
system.c:19
Fprintf
STD_API int Fprintf(FILE16 *file, const char *format,...)
Definition:
stdio16.c:365
rxp
system.c
Generated on Fri Oct 6 2017 18:25:29 for Edinburgh Speech Tools by
1.8.11