1 /*
2  * << Haru Free PDF Library >> -- hpdf_conf.h
3  *
4  * URL: http://libharu.org
5  *
6  * Copyright (c) 1999-2006 Takeshi Kanno <takeshi_kanno@est.hi-ho.ne.jp>
7  * Copyright (c) 2007-2009 Antony Dovgal <tony@daylessday.org>
8  *
9  * Permission to use, copy, modify, distribute and sell this software
10  * and its documentation for any purpose is hereby granted without fee,
11  * provided that the above copyright notice appear in all copies and
12  * that both that copyright notice and this permission notice appear
13  * in supporting documentation.
14  * It is provided "as is" without express or implied warranty.
15  *
16  */
17 
18 #ifndef _HPDF_CONF_H
19 #define _HPDF_CONF_H
20 
21 #include <stdlib.h>
22 #include <stdio.h>
23 #if defined(_MSC_VER)
24 #ifndef _USE_MATH_DEFINES
25 #define _USE_MATH_DEFINES 1
26 #endif /* _USE_MATH_DEFINES */
27 #endif
28 #ifndef __USE_XOPEN
29 #define __USE_XOPEN /* for M_PI */
30 #endif /* __USE_XOPEN */
31 #include <math.h>
32 
33 /*----------------------------------------------------------------------------*/
34 /*----- standard C library functions -----------------------------------------*/
35 
36 #define HPDF_FOPEN                  fopen
37 #define HPDF_FCLOSE                 fclose
38 #define HPDF_FREAD                  fread
39 #define HPDF_FWRITE                 fwrite
40 #define HPDF_FFLUSH                 fflush
41 #define HPDF_FSEEK                  fseek
42 #define HPDF_FTELL                  ftell
43 #define HPDF_FEOF                   feof
44 #define HPDF_FERROR                 ferror
45 #define HPDF_MALLOC                 malloc
46 #define HPDF_FREE                   free
47 #define HPDF_FILEP                  FILE*
48 #define HPDF_TIME                   time
49 #define HPDF_PRINTF                 printf
50 #define HPDF_SIN                    sin
51 #define HPDF_COS                    cos
52 
53 /*----------------------------------------------------------------------------*/
54 /*----- parameters in relation to performance --------------------------------*/
55 
56 /* default buffer size of memory-stream-object */
57 #define HPDF_STREAM_BUF_SIZ         4096
58 
59 /* default array size of list-object */
60 #define HPDF_DEF_ITEMS_PER_BLOCK    20
61 
62 /* default array size of cross-reference-table */
63 #define HPDF_DEFALUT_XREF_ENTRY_NUM 1024
64 
65 /* default array size of widths-table of cid-fontdef */
66 #define HPDF_DEF_CHAR_WIDTHS_NUM    128
67 
68 /* default array size of page-list-tablef */
69 #define HPDF_DEF_PAGE_LIST_NUM      256
70 
71 /* default array size of range-table of cid-fontdef */
72 #define HPDF_DEF_RANGE_TBL_NUM      128
73 
74 /* default buffer size of memory-pool-object */
75 #define HPDF_MPOOL_BUF_SIZ          8192
76 #define HPDF_MIN_MPOOL_BUF_SIZ      256
77 #define HPDF_MAX_MPOOL_BUF_SIZ      1048576
78 
79 /* alignment size of memory-pool-object
80  */
81 #define HPDF_ALIGN_SIZ              sizeof int;
82 
83 
84 #endif /* _HPDF_CONF_H */
85 
86