From a3805daf7ec14aafbd2a5de42932509c3a4f39d9 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Tue, 16 Jun 2009 16:39:43 +0000 Subject: [PATCH] 2009-06-16 18:39 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * include/hbextern.ch + Added HB_WAEVAL(). * contrib/hbwin/win_prn1.c - Direct procedural Windows printing interface will now only accept real pointers. * WIN_CREATEDC() will now return null pointer instead of NIL. The safest way to check for success is: 'IF ! Empty( win_CreateDC() )' ; With this, only some DLL related functions remain which still use numeric pointers --- harbour/ChangeLog | 12 ++++++++++++ harbour/contrib/hbwin/win_prn1.c | 11 +++-------- harbour/include/hbextern.ch | 1 + 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 032b446780..4207d54e68 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,18 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-06-16 18:39 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * include/hbextern.ch + + Added HB_WAEVAL(). + + * contrib/hbwin/win_prn1.c + - Direct procedural Windows printing interface will now only + accept real pointers. + * WIN_CREATEDC() will now return null pointer instead of NIL. + The safest way to check for success is: 'IF ! Empty( win_CreateDC() )' + ; With this, only some DLL related functions remain which + still use numeric pointers + 2009-06-16 16:59 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * contrib/hbwin/win_misc.c + Added these functions: diff --git a/harbour/contrib/hbwin/win_prn1.c b/harbour/contrib/hbwin/win_prn1.c index 8347c60104..79f6b2d5a1 100644 --- a/harbour/contrib/hbwin/win_prn1.c +++ b/harbour/contrib/hbwin/win_prn1.c @@ -100,14 +100,9 @@ static HB_GARBAGE_FUNC( win_HDC_release ) static HDC win_HDC_par( int iParam ) { - if( HB_ISNUM( iParam ) ) - return ( HDC ) ( HB_PTRDIFF ) hb_parnint( iParam ); - else - { - void ** ph = ( void ** ) hb_parptrGC( win_HDC_release, iParam ); + void ** ph = ( void ** ) hb_parptrGC( win_HDC_release, iParam ); - return ph ? ( HDC ) * ph : ( HDC ) hb_parptr( iParam ); - } + return ph ? ( HDC ) * ph : ( HDC ) hb_parptr( iParam ); } static HB_GARBAGE_FUNC( win_HPEN_release ) @@ -136,7 +131,7 @@ HB_FUNC( WIN_CREATEDC ) HB_TCHAR_FREE( lpText ); } else - hb_ret(); + hb_retptr( NULL ); } HB_FUNC( WIN_STARTDOC ) diff --git a/harbour/include/hbextern.ch b/harbour/include/hbextern.ch index e4817eccf0..1fd3e2bb09 100644 --- a/harbour/include/hbextern.ch +++ b/harbour/include/hbextern.ch @@ -990,6 +990,7 @@ EXTERNAL HB_DBEXISTS EXTERNAL HB_FIELDLEN EXTERNAL HB_FIELDDEC EXTERNAL HB_FIELDTYPE +EXTERNAL HB_WAEVAL EXTERNAL HB_SCRMAXROW EXTERNAL HB_SCRMAXCOL