1
/* FriBidi - Library of BiDi algorithm
2
* Copyright (C) 2001,2002 Behdad Esfahbod.
4
* This library is free software; you can redistribute it and/or
5
* modify it under the terms of the GNU Lesser FriBidieneral Public
6
* License as published by the Free Software Foundation; either
7
* version 2.1 of the License, or (at your option) any later version.
9
* This library is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
* Lesser FriBidieneral Public License for more details.
14
* You should have received a copy of the GNU Lesser FriBidieneral Public License
15
* along with this library, in a file named COPYING; if not, write to the
16
* Free Software Foundation, Inc., 59 Temple Place, Suite 330,
17
* Boston, MA 02111-1307, USA
19
* For licensing issues, contact <fwpg@sharif.edu>.
25
#include "fribidi_config.h"
26
#include "fribidi_types.h"
33
FriBidiList *fribidi_list_append (FriBidiList *list, void *data);
35
typedef struct _FriBidiMemChunk FriBidiMemChunk;
37
#define FRIBIDI_ALLOC_ONLY 1
38
#define FRIBIDI_ALLOC_AND_FREE 2
40
FriBidiMemChunk *fribidi_mem_chunk_new (const char *name,
42
unsigned long area_size, int type);
43
void fribidi_mem_chunk_destroy (FriBidiMemChunk *mem_chunk);
44
void *fribidi_mem_chunk_alloc (FriBidiMemChunk *mem_chunk);
45
void *fribidi_mem_chunk_alloc0 (FriBidiMemChunk *mem_chunk);
46
void fribidi_mem_chunk_free (FriBidiMemChunk *mem_chunk, void *mem);
48
#define fribidi_mem_chunk_create(type, pre_alloc, alloc_type) ( \
49
fribidi_mem_chunk_new (#type " mem chunks (" #pre_alloc ")", \
51
sizeof (type) * (pre_alloc), \
54
#define fribidi_chunk_new(type, chunk) ( \
55
(type *) fribidi_mem_chunk_alloc (chunk) \
62
#endif /* FRIBIDI_MEM_H */