~ubuntu-branches/ubuntu/vivid/fribidi/vivid

« back to all changes in this revision

Viewing changes to fribidi_mem.h

  • Committer: Bazaar Package Importer
  • Author(s): Lior Kaplan
  • Date: 2006-09-16 10:37:10 UTC
  • mfrom: (3.1.3 edgy)
  • Revision ID: james.westby@ubuntu.com-20060916103710-1ktngzyx9azkujhl
Tags: 0.10.7-4
* Fix manual page name section (Closes: #368632)
* debian/control: Upgrade standards version to 3.7.2 (no changes needed).
* debian/copyright: Update Dov Grobgeld's contact address.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* FriBidi - Library of BiDi algorithm
 
2
 * Copyright (C) 2001,2002 Behdad Esfahbod.
 
3
 * 
 
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.
 
8
 * 
 
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.
 
13
 * 
 
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
 
18
 * 
 
19
 * For licensing issues, contact <fwpg@sharif.edu>.
 
20
 */
 
21
 
 
22
#ifndef FRIBIDI_MEM_H
 
23
#define FRIBIDI_MEM_H
 
24
 
 
25
#include "fribidi_config.h"
 
26
#include "fribidi_types.h"
 
27
 
 
28
#ifdef __cplusplus
 
29
extern "C"
 
30
{
 
31
#endif
 
32
 
 
33
  FriBidiList *fribidi_list_append (FriBidiList *list, void *data);
 
34
 
 
35
  typedef struct _FriBidiMemChunk FriBidiMemChunk;
 
36
 
 
37
#define FRIBIDI_ALLOC_ONLY      1
 
38
#define FRIBIDI_ALLOC_AND_FREE  2
 
39
 
 
40
  FriBidiMemChunk *fribidi_mem_chunk_new (const char *name,
 
41
                                          int atom_size,
 
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);
 
47
 
 
48
#define fribidi_mem_chunk_create(type, pre_alloc, alloc_type) ( \
 
49
  fribidi_mem_chunk_new (#type " mem chunks (" #pre_alloc ")", \
 
50
                   sizeof (type), \
 
51
                   sizeof (type) * (pre_alloc), \
 
52
                   (alloc_type)) \
 
53
)
 
54
#define fribidi_chunk_new(type, chunk)        ( \
 
55
  (type *) fribidi_mem_chunk_alloc (chunk) \
 
56
)
 
57
 
 
58
#ifdef  __cplusplus
 
59
}
 
60
#endif
 
61
 
 
62
#endif                          /* FRIBIDI_MEM_H */