diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 79c5699014..70e9cfdf5d 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,13 @@ 2008-12-31 13:59 UTC+0100 Foo Bar */ +2008-05-19 00:53 UTC+0100 Viktor Szakats (harbour.01 syenar hu) + * contrib/hbhpdf/harupdf.c + ! Fixed HPDF_READFROMSTREAM() to not directly write into + the variable buffer. The function will now return the + status code instead of buffer length. The latter can + be determined using Len(). + 2008-05-19 00:07 UTC+0100 Viktor Szakats (harbour.01 syenar hu) * contrib/hbhpdf/harupdf.c ! Fixed to use garbage collector to automatically free diff --git a/harbour/contrib/hbhpdf/harupdf.c b/harbour/contrib/hbhpdf/harupdf.c index f337b088fa..82c7f6cb57 100644 --- a/harbour/contrib/hbhpdf/harupdf.c +++ b/harbour/contrib/hbhpdf/harupdf.c @@ -53,6 +53,7 @@ // // HaruLib (x)Harbour Wrappers // . +// http://www.libharu.org/ // http://sourceforge.net/projects/libharu/ // // Pritpal Bedi @@ -70,7 +71,6 @@ // #include "hpdf.h" - static HB_GARBAGE_FUNC( HPDF_Doc_release ) { void ** ph = ( void ** ) Cargo; @@ -168,9 +168,12 @@ HB_FUNC( HPDF_GETSTREAMSIZE ) // HB_FUNC( HPDF_READFROMSTREAM ) { - HPDF_UINT32 size = strlen( hb_parc( 2 ) ); - HPDF_ReadFromStream( HPDF_Doc_par( 1 ), (HPDF_BYTE*) hb_parc( 2 ), &size ); - hb_retnl( ( long ) size ); + HPDF_UINT32 size = hb_parclen( 2 ); + HPDF_BYTE * buffer = ( HPDF_BYTE * ) hb_xgrab( size ); + + hb_retnl( (long) HPDF_ReadFromStream( HPDF_Doc_par( 1 ), buffer, &size ) ); + + hb_storclen_buffer( ( char * ) buffer, size, 2 ); } //----------------------------------------------------------------------// // HPdf_ResetStream( hDoc ) -> hStatus diff --git a/harbour/contrib/rddads/readme.txt b/harbour/contrib/rddads/readme.txt index b71dfc45d0..b71abf8f63 100644 --- a/harbour/contrib/rddads/readme.txt +++ b/harbour/contrib/rddads/readme.txt @@ -21,7 +21,7 @@ You need also to include to your prg file following lines: - REQUEST _ADS + REQUEST ADS rddRegister( "ADS", 1 ) rddsetdefault( "ADS" ) @@ -29,6 +29,6 @@ change this you may use commands, defined in ads.ch: SET SERVER LOCAL - SET FILETYPE TO NTX ( SET FILETYPE TO ADT ) + SET FILETYPE TO NTX / SET FILETYPE TO ADT or functions AdsSetServerType(), AdsSetFileType().