Files
harbour-core/harbour/contrib/hbhpdf/3rd/libhpdf/hpdfutil.h
Viktor Szakats 855b43fd69 2010-11-07 17:12 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* contrib/hbhpdf/hbhpdf.hbp
  * contrib/hbhpdf/hbhpdf.hbc

  * contrib/hbexpat/3rd/expat/expat.hbc
    ! Fixed for 'HB_BUILD_CONTRIB_DYN=yes'

  * external/Makefile
  - external/libhpdf
  + contrib/hbhpdf/3rd
  + contrib/hbhpdf/3rd/libhpdf
  * contrib/hbhpdf/3rd/libhpdf/libhpdf.hbc
  * contrib/hbhpdf/3rd/libhpdf/libhpdf.hbp
    * Moved to contrib local dir.
    + Added support for 'HB_BUILD_CONTRIB_DYN=yes'

  * contrib/hbhpdf/3rd/libhpdf/hpdf.h
    ! Fixed for dynamic build.
    ; TODO: Regenerate .dif. For me it restored original copy for some reason :(

  * contrib/hbsqlit3/hbsqlit3.hbc
  * contrib/sddsqlt3/sddsqlt3.hbc
    * Using .hbc file for 3rd party lib.

  * contrib/3rd/sqlite3/sqlite3.hbp
  * contrib/hbhpdf/3rd/libhpdf/libhpdf.hbp
  * contrib/hbmzip/3rd/minizip/minizip.hbp
  * contrib/hbexpat/3rd/expat/expat.hbp
    ! Changed -warn=no to -warn=low, which is equivalent to 'HB_BUILD_WARN := no'
      in Makefile.
2010-11-07 16:14:20 +00:00

166 lines
3.8 KiB
C

/*
* << Haru Free PDF Library >> -- fpdf_utils.h
*
* URL: http://libharu.org
*
* Copyright (c) 1999-2006 Takeshi Kanno <takeshi_kanno@est.hi-ho.ne.jp>
* Copyright (c) 2007-2009 Antony Dovgal <tony@daylessday.org>
*
* Permission to use, copy, modify, distribute and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appear in all copies and
* that both that copyright notice and this permission notice appear
* in supporting documentation.
* It is provided "as is" without express or implied warranty.
*
*/
#ifndef _HPDF_UTILS_H
#define _HPDF_UTILS_H
#include "hpdfcfg.h"
#include "hpdftype.h"
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
HPDF_INT
HPDF_AToI (const char* s);
HPDF_DOUBLE
HPDF_AToF (const char* s);
char*
HPDF_IToA (char* s,
HPDF_INT32 val,
char* eptr);
char*
HPDF_IToA2 (char *s,
HPDF_UINT32 val,
HPDF_UINT len);
char*
HPDF_FToA (char *s,
HPDF_REAL val,
char *eptr);
HPDF_BYTE*
HPDF_MemCpy (HPDF_BYTE* out,
const HPDF_BYTE* in,
HPDF_UINT n);
HPDF_BYTE*
HPDF_StrCpy (char* out,
const char* in,
char* eptr);
HPDF_INT
HPDF_MemCmp (const HPDF_BYTE* s1,
const HPDF_BYTE* s2,
HPDF_UINT n);
HPDF_INT
HPDF_StrCmp (const char* s1,
const char* s2);
const char*
HPDF_StrStr (const char *s1,
const char *s2,
HPDF_UINT maxlen);
void*
HPDF_MemSet (void* s,
HPDF_BYTE c,
HPDF_UINT n);
HPDF_UINT
HPDF_StrLen (const char* s,
HPDF_INT maxlen);
HPDF_Box
HPDF_ToBox (HPDF_INT16 left,
HPDF_INT16 bottom,
HPDF_INT16 right,
HPDF_INT16 top);
HPDF_Point
HPDF_ToPoint (HPDF_INT16 x,
HPDF_INT16 y);
HPDF_Rect
HPDF_ToRect (HPDF_REAL left,
HPDF_REAL bottom,
HPDF_REAL right,
HPDF_REAL top);
void
HPDF_UInt16Swap (HPDF_UINT16 *value);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#define HPDF_NEEDS_ESCAPE(c) (c < 0x20 || \
c > 0x7e || \
c == '\\' || \
c == '%' || \
c == '#' || \
c == '/' || \
c == '(' || \
c == ')' || \
c == '<' || \
c == '>' || \
c == '[' || \
c == ']' || \
c == '{' || \
c == '}' ) \
#define HPDF_IS_WHITE_SPACE(c) (c == 0x00 || \
c == 0x09 || \
c == 0x0A || \
c == 0x0C || \
c == 0x0D || \
c == 0x20 ) \
/*----------------------------------------------------------------------------*/
/*----- macros for debug -----------------------------------------------------*/
#ifdef LIBHPDF_DEBUG_TRACE
#ifndef HPDF_PTRACE_ON
#define HPDF_PTRACE_ON
#endif /* HPDF_PTRACE_ON */
#endif /* LIBHPDF_DEBUG_TRACE */
#ifdef HPDF_PTRACE_ON
#define HPDF_PTRACE(ARGS) HPDF_PRINTF ARGS
#else
#define HPDF_PTRACE(ARGS) /* do nothing */
#endif /* HPDF_PTRACE */
#ifdef LIBHPDF_DEBUG
#define HPDF_PRINT_BINARY(BUF, LEN, CAPTION) HPDF_PrintBinary(BUF, LEN, CAPTION)
#else
#define HPDF_PRINT_BINARY(BUF, LEN, CAPTION) /* do nothing */
#endif
#endif /* _HPDF_UTILS_H */