* contrib/hbtip/encqp.prg
* QP decoder will now accept LF EOLs (to work well with
non-compliant mailers).
* external/libhpdf/hpdfpags.h
* external/libhpdf/hpdffdfb.c
* external/libhpdf/hpdfxref.c
* external/libhpdf/hpdfcons.h
* external/libhpdf/hpdfextg.c
* external/libhpdf/hpdfencc.c
* external/libhpdf/hpdffdfj.c
+ external/libhpdf/hpdfpdfa.c
* external/libhpdf/hpdfextg.h
* external/libhpdf/hpdfstre.c
* external/libhpdf/hpdffdfn.c
+ external/libhpdf/hpdfpdfa.h
* external/libhpdf/hpdffdf1.c
* external/libhpdf/hpdfenck.c
* external/libhpdf/hpdfstri.c
* external/libhpdf/hpdfstre.h
* external/libhpdf/hpdffdft.c
* external/libhpdf/hpdfoutl.c
* external/libhpdf/hpdfenco.c
* external/libhpdf/hpdfecyd.c
* external/libhpdf/hpdfimap.c
* external/libhpdf/hpdfoutl.h
* external/libhpdf/hpdfenco.h
* external/libhpdf/Makefile
* external/libhpdf/hpdffond.h
* external/libhpdf/hpdfency.h
* external/libhpdf/hpdffon1.c
* external/libhpdf/hpdffont.c
* external/libhpdf/hpdfcata.c
* external/libhpdf/hpdffont.h
* external/libhpdf/hpdfutil.c
* external/libhpdf/hpdfcata.h
* external/libhpdf/hpdfutil.h
* external/libhpdf/hpdfdict.c
* external/libhpdf/hpdfreal.c
* external/libhpdf/hpdfarra.c
* external/libhpdf/hpdfdocp.c
* external/libhpdf/libhpdf.dif
* external/libhpdf/hpdfconf.h
* external/libhpdf/hpdfinfo.c
* external/libhpdf/hpdfanno.c
* external/libhpdf/hpdfgsta.c
* external/libhpdf/hpdfdest.c
* external/libhpdf/hpdfinfo.h
* external/libhpdf/hpdfanno.h
* external/libhpdf/hpdfnumb.c
* external/libhpdf/hpdffdfc.c
* external/libhpdf/hpdfgsta.h
* external/libhpdf/hpdfdest.h
* external/libhpdf/hpdfdoc.c
* external/libhpdf/hpdferro.c
* external/libhpdf/hpdffdfi.c
* external/libhpdf/hpdfbina.c
* external/libhpdf/hpdfdoc.h
* external/libhpdf/hpdffdfk.c
* external/libhpdf/hpdflist.c
* external/libhpdf/hpdferro.h
* external/libhpdf/hpdfimag.c
* external/libhpdf/hpdfencj.c
* external/libhpdf/hpdflist.h
* external/libhpdf/hpdfecy.c
* external/libhpdf/hpdfimag.h
* external/libhpdf/hpdfencn.c
* external/libhpdf/hpdffonc.c
* external/libhpdf/hpdfu3d.c
* external/libhpdf/hpdfencr.h
* external/libhpdf/hpdffdf.c
* external/libhpdf/hpdfu3d.h
* external/libhpdf/hpdfmmgr.c
* external/libhpdf/hpdfmmgr.h
* external/libhpdf/hpdfnull.c
* external/libhpdf/README
* external/libhpdf/hpdffott.c
* external/libhpdf/hpdfpage.c
+ external/libhpdf/hpdfndic.c
* external/libhpdf/hpdfobje.c
* external/libhpdf/hpdfname.c
* external/libhpdf/hpdfpage.h
+ external/libhpdf/hpdfndic.h
* external/libhpdf/hpdf.h
* external/libhpdf/hpdfobje.h
* external/libhpdf/hpdfvers.h
* external/libhpdf/hpdfpago.c
* external/libhpdf/hpdftype.h
* external/libhpdf/hpdfpags.c
* external/libhpdf/hpdfbool.c
+ libharu updated to official 2.2.0 release (from 2.1.0).
Patch sent by Tamas Tevesz.
* Added new files to Makefile.
119 lines
2.6 KiB
C
119 lines
2.6 KiB
C
/*
|
|
* << Haru Free PDF Library >> -- hpdf_error.c
|
|
*
|
|
* 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.
|
|
*
|
|
*/
|
|
|
|
#include "hpdfconf.h"
|
|
#include "hpdfutil.h"
|
|
#include "hpdferro.h"
|
|
#include "hpdfcons.h"
|
|
#include "hpdf.h"
|
|
|
|
#ifndef HPDF_STDCALL
|
|
#ifdef HPDF_DLL_MAKE
|
|
#define HPDF_STDCALL __stdcall
|
|
#else
|
|
#ifdef HPDF_DLL
|
|
#define HPDF_STDCALL __stdcall
|
|
#else
|
|
#define HPDF_STDCALL
|
|
#endif
|
|
#endif
|
|
#endif
|
|
|
|
void
|
|
HPDF_CopyError (HPDF_Error dst,
|
|
HPDF_Error src);
|
|
|
|
|
|
void
|
|
HPDF_Error_Init (HPDF_Error error,
|
|
void *user_data)
|
|
{
|
|
HPDF_MemSet(error, 0, sizeof(HPDF_Error_Rec));
|
|
|
|
error->user_data = user_data;
|
|
}
|
|
|
|
HPDF_STATUS
|
|
HPDF_Error_GetCode (HPDF_Error error)
|
|
{
|
|
return error->error_no;
|
|
}
|
|
|
|
HPDF_STATUS
|
|
HPDF_Error_GetDetailCode (HPDF_Error error)
|
|
{
|
|
return error->detail_no;
|
|
}
|
|
|
|
void
|
|
HPDF_CopyError (HPDF_Error dst,
|
|
HPDF_Error src)
|
|
{
|
|
dst->error_no = src->error_no;
|
|
dst->detail_no = src->detail_no;
|
|
dst->error_fn = src->error_fn;
|
|
dst->user_data = src->user_data;
|
|
}
|
|
|
|
HPDF_STATUS
|
|
HPDF_SetError (HPDF_Error error,
|
|
HPDF_STATUS error_no,
|
|
HPDF_STATUS detail_no)
|
|
{
|
|
HPDF_PTRACE((" HPDF_SetError: error_no=0x%04X "
|
|
"detail_no=0x%04X\n", (HPDF_UINT)error_no, (HPDF_UINT)detail_no));
|
|
|
|
error->error_no = error_no;
|
|
error->detail_no = detail_no;
|
|
|
|
return error_no;
|
|
}
|
|
|
|
|
|
HPDF_EXPORT(HPDF_STATUS)
|
|
HPDF_CheckError (HPDF_Error error)
|
|
{
|
|
HPDF_PTRACE((" HPDF_CheckError: error_no=0x%04X detail_no=0x%04X\n",
|
|
(HPDF_UINT)error->error_no, (HPDF_UINT)error->detail_no));
|
|
|
|
if (error->error_no != HPDF_OK && error->error_fn)
|
|
error->error_fn (error->error_no, error->detail_no, error->user_data);
|
|
|
|
return error->error_no;
|
|
}
|
|
|
|
|
|
HPDF_STATUS
|
|
HPDF_RaiseError (HPDF_Error error,
|
|
HPDF_STATUS error_no,
|
|
HPDF_STATUS detail_no)
|
|
{
|
|
HPDF_SetError (error, error_no, detail_no);
|
|
|
|
return HPDF_CheckError (error);
|
|
}
|
|
|
|
|
|
void
|
|
HPDF_Error_Reset (HPDF_Error error)
|
|
{
|
|
error->error_no = HPDF_NOERROR;
|
|
error->detail_no = HPDF_NOERROR;
|
|
}
|
|
|
|
|