diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 1ab970badb..8a829e77d4 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,18 @@ 2008-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org) */ +2009-01-20 17:29 UTC+0100 Viktor Szakats (harbour.01 syenar hu) + * contrib/hbhpdf/harupdf.c + ! HPDF_SETINFODATEATTR() fixed taking date/time from the wrong + parameter. + ! HPDF_SETINFODATEATTR() fixed to initialize the date structure + passed to libharu. + + ; NOTE: I've changed my editor config to automatically clean line + ending spaces. This may cause larger diffs even for + small modifications until all these spaces are cleaned + from the sources. FYI. + 2009-01-20 00:20 UTC+0100 Francesco Saverio Giudice (info/at/fsgiudice.com) + harbour/contrib/examples/uhttpd/modules/info.prg + New sample showing server variables diff --git a/harbour/contrib/hbhpdf/harupdf.c b/harbour/contrib/hbhpdf/harupdf.c index afb7238b8f..74e9c8d509 100644 --- a/harbour/contrib/hbhpdf/harupdf.c +++ b/harbour/contrib/hbhpdf/harupdf.c @@ -202,7 +202,7 @@ HB_FUNC( HPDF_HASDOC ) */ HB_FUNC( HPDF_SETERRORHANDLER ) { - /* TOFIX: This should be extended to pass a wrapper which calls a + /* TOFIX: This should be extended to pass a wrapper which calls a user defined codeblock. */ hb_retnl( ( long ) HPDF_SetErrorHandler( HPDF_Doc_par( 1 ), ( HPDF_Error_Handler ) hb_parptr( 2 ) ) ); @@ -520,12 +520,15 @@ HB_FUNC( HPDF_SETINFODATEATTR ) { HPDF_Date date; - date.year = hb_parni( 2,1 ); - date.month = hb_parni( 2,2 ); - date.day = hb_parni( 2,3 ); - date.hour = hb_parni( 2,4 ); - date.minutes = hb_parni( 2,5 ); - date.seconds = hb_parni( 2,6 ); + memset( &date, 0, sizeof( date ) ); + + date.year = hb_parni( 3, 1 ); + date.month = hb_parni( 3, 2 ); + date.day = hb_parni( 3, 3 ); + date.hour = hb_parni( 3, 4 ); + date.minutes = hb_parni( 3, 5 ); + date.seconds = hb_parni( 3, 6 ); + date.ind = ' '; hb_retnl( ( long ) HPDF_SetInfoDateAttr( HPDF_Doc_par( 1 ), ( HPDF_InfoType ) hb_parni( 2 ), date ) ); } @@ -712,12 +715,12 @@ HB_FUNC( HPDF_PAGE_GETCURRENTPOS ) { HPDF_Point pt; PHB_ITEM info = hb_itemArrayNew( 2 ); - + HPDF_Page_GetCurrentPos2( ( HPDF_Page ) hb_parptr( 1 ), &pt ); - + hb_arraySetND( info, 1, pt.x ); hb_arraySetND( info, 2, pt.y ); - + hb_itemReturnRelease( info ); } /*----------------------------------------------------------------------*/