hpdf_conf.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. /*
  2. * << Haru Free PDF Library >> -- hpdf_conf.h
  3. *
  4. * URL: http://libharu.org
  5. *
  6. * Copyright (c) 1999-2006 Takeshi Kanno <[email protected]>
  7. * Copyright (c) 2007-2009 Antony Dovgal <[email protected]>
  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. #ifndef _HPDF_CONF_H
  18. #define _HPDF_CONF_H
  19. #include <stdlib.h>
  20. #include <stdio.h>
  21. #if defined(_MSC_VER)
  22. #define _USE_MATH_DEFINES 1
  23. #endif
  24. #define __USE_XOPEN /* for M_PI */
  25. #include <math.h>
  26. /*----------------------------------------------------------------------------*/
  27. /*----- standard C library functions -----------------------------------------*/
  28. #define HPDF_FOPEN fopen
  29. #define HPDF_FCLOSE fclose
  30. #define HPDF_FREAD fread
  31. #define HPDF_FWRITE fwrite
  32. #define HPDF_FFLUSH fflush
  33. #define HPDF_FSEEK fseek
  34. #define HPDF_FTELL ftell
  35. #define HPDF_FEOF feof
  36. #define HPDF_FERROR ferror
  37. #define HPDF_MALLOC malloc
  38. #define HPDF_FREE free
  39. #define HPDF_FILEP FILE*
  40. #define HPDF_TIME time
  41. #define HPDF_PRINTF printf
  42. #define HPDF_SIN sin
  43. #define HPDF_COS cos
  44. /*----------------------------------------------------------------------------*/
  45. /*----- parameters in relation to performance --------------------------------*/
  46. /* default buffer size of memory-stream-object */
  47. #define HPDF_STREAM_BUF_SIZ 4096
  48. /* default array size of list-object */
  49. #define HPDF_DEF_ITEMS_PER_BLOCK 20
  50. /* default array size of cross-reference-table */
  51. #define HPDF_DEFALUT_XREF_ENTRY_NUM 1024
  52. /* default array size of widths-table of cid-fontdef */
  53. #define HPDF_DEF_CHAR_WIDTHS_NUM 128
  54. /* default array size of page-list-tablef */
  55. #define HPDF_DEF_PAGE_LIST_NUM 256
  56. /* default array size of range-table of cid-fontdef */
  57. #define HPDF_DEF_RANGE_TBL_NUM 128
  58. /* default buffer size of memory-pool-object */
  59. #define HPDF_MPOOL_BUF_SIZ 8192
  60. #define HPDF_MIN_MPOOL_BUF_SIZ 256
  61. #define HPDF_MAX_MPOOL_BUF_SIZ 1048576
  62. /* alignment size of memory-pool-object
  63. */
  64. #define HPDF_ALIGN_SIZ sizeof int;
  65. #endif /* _HPDF_CONF_H */