From 41fb98f2e9ca44671ad4a6fa908f636c0c38ba16 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Tue, 1 Dec 2009 15:09:59 +0000 Subject: [PATCH] 2009-12-01 16:10 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * bin/hb-mkimp.bat * Minor. * contrib/hbwin/win_dll.c * contrib/hbcairo/paths.c * contrib/hbcairo/text.c * contrib/hbcairo/core.c * contrib/hbcairo/Makefile * Minor cleanups. ! Fixed minor typo. --- harbour/ChangeLog | 12 ++++++++++++ harbour/bin/hb-mkimp.bat | 4 ++-- harbour/contrib/hbcairo/Makefile | 2 -- harbour/contrib/hbcairo/core.c | 20 +++++++++----------- harbour/contrib/hbcairo/paths.c | 2 +- harbour/contrib/hbcairo/text.c | 11 +++++------ harbour/contrib/hbwin/win_dll.c | 1 - 7 files changed, 29 insertions(+), 23 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index f24fc323be..ba363eb8f5 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,18 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-12-01 16:10 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) + * bin/hb-mkimp.bat + * Minor. + + * contrib/hbwin/win_dll.c + * contrib/hbcairo/paths.c + * contrib/hbcairo/text.c + * contrib/hbcairo/core.c + * contrib/hbcairo/Makefile + * Minor cleanups. + ! Fixed minor typo. + 2009-12-01 16:56 UTC+0200 Mindaugas Kavaliauskas (dbtopas/at/dbtopas.lt) * harbour/contrib/hbcairo/context.c * harbour/contrib/hbcairo/paths.c diff --git a/harbour/bin/hb-mkimp.bat b/harbour/bin/hb-mkimp.bat index 1b46ab7ac4..1b335375b4 100644 --- a/harbour/bin/hb-mkimp.bat +++ b/harbour/bin/hb-mkimp.bat @@ -209,11 +209,11 @@ rem --------------------------------------------------------------- echo s/^^[ \t]\+[0-9]\+[ \t]\+[0-9A-Fa-f]\+[ \t]\+[0-9A-Fa-f]\+[ \t]\+\(.*\)/\1/p>> _hbtemp.sed echo }>> _hbtemp.sed echo }>> _hbtemp.sed - dumpbin /exports "%2" > _dump.tmp + dumpbin -exports "%2" > _dump.tmp echo LIBRARY "%~n2" > _temp.def echo EXPORTS >> _temp.def sed -nf _hbtemp.sed < _dump.tmp >> _temp.def - lib /nologo /machine:%1 /def:_temp.def /out:"%3" + lib -nologo -machine:%1 -def:_temp.def -out:"%3" del _dump.tmp del _temp.def del _hbtemp.sed diff --git a/harbour/contrib/hbcairo/Makefile b/harbour/contrib/hbcairo/Makefile index ac6ef31da2..0f1ca5165c 100644 --- a/harbour/contrib/hbcairo/Makefile +++ b/harbour/contrib/hbcairo/Makefile @@ -17,8 +17,6 @@ C_SOURCES := \ png.c \ text.c \ -PRG_SOURCES := \ - PRG_HEADERS := \ hbcairo.ch \ diff --git a/harbour/contrib/hbcairo/core.c b/harbour/contrib/hbcairo/core.c index 10592fae93..7aa171f315 100644 --- a/harbour/contrib/hbcairo/core.c +++ b/harbour/contrib/hbcairo/core.c @@ -317,12 +317,11 @@ static const HB_GC_FUNCS s_gcIteratorFuncs = HB_FUNC( CAIRO_PATH_ITERATOR_CREATE ) { - PHB_CAIRO_PATH_ITERATOR pIterator; cairo_path_t * pPath = hb_cairo_path_param( 1 ); if( pPath ) { - pIterator = ( PHB_CAIRO_PATH_ITERATOR ) hb_gcAllocate( sizeof( PHB_CAIRO_PATH_ITERATOR ), &s_gcIteratorFuncs ); + PHB_CAIRO_PATH_ITERATOR pIterator = ( PHB_CAIRO_PATH_ITERATOR ) hb_gcAllocate( sizeof( PHB_CAIRO_PATH_ITERATOR ), &s_gcIteratorFuncs ); #ifdef HB_USE_ITEM pIterator->pPath = hb_itemNew( hb_param( 1, HB_IT_POINTER ) ); #else @@ -332,7 +331,6 @@ HB_FUNC( CAIRO_PATH_ITERATOR_CREATE ) pIterator->iPos = -1; hb_itemPutPtrGC( hb_stackReturnItem(), pIterator ); } - } @@ -348,9 +346,9 @@ HB_FUNC( CAIRO_PATH_ITERATOR_DESTROY ) hb_gcRefDec( pIterator->pPath ); #endif pIterator->pPath = NULL; - return; } - hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); + else + hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); } @@ -379,9 +377,9 @@ HB_FUNC( CAIRO_PATH_ITERATOR_NEXT ) hb_retni( pPath->data[ pIterator->iPos ].header.type ); else hb_ret(); - return; } - hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); + else + hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); } @@ -416,9 +414,9 @@ HB_FUNC( CAIRO_PATH_ITERATOR_GET_POINTS ) } else hb_ret(); - return; } - hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); + else + hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); } @@ -465,7 +463,7 @@ HB_FUNC( CAIRO_PATH_ITERATOR_SET_POINTS ) } else hb_retl( 0 ); - return; } - hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); + else + hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); } diff --git a/harbour/contrib/hbcairo/paths.c b/harbour/contrib/hbcairo/paths.c index c1a3cf43f8..b1e7053a1e 100644 --- a/harbour/contrib/hbcairo/paths.c +++ b/harbour/contrib/hbcairo/paths.c @@ -154,10 +154,10 @@ HB_FUNC( CAIRO_REL_MOVE_TO ) HB_FUNC( CAIRO_TEXT_PATH ) { - void * hText; cairo_t * pCairo = hb_cairo_param( 1 ); if( pCairo ) { + void * hText; cairo_text_path( pCairo, hb_parstr_utf8( 2, &hText, NULL ) ); hb_strfree( hText ); } diff --git a/harbour/contrib/hbcairo/text.c b/harbour/contrib/hbcairo/text.c index f9e57d7fd8..550e617940 100644 --- a/harbour/contrib/hbcairo/text.c +++ b/harbour/contrib/hbcairo/text.c @@ -57,10 +57,10 @@ HB_FUNC( CAIRO_SELECT_FONT_FACE ) { - void * hFamily; cairo_t * pCairo = hb_cairo_param( 1 ); if( pCairo ) { + void * hFamily; cairo_select_font_face( pCairo, hb_parstr_utf8( 2, &hFamily, NULL ), ( cairo_font_slant_t ) hb_parni( 3 ), ( cairo_font_weight_t ) hb_parni( 4 ) ); hb_strfree( hFamily ); } @@ -77,10 +77,10 @@ HB_FUNC( CAIRO_SET_FONT_SIZE ) HB_FUNC( CAIRO_SHOW_TEXT ) { - void * hText; cairo_t * pCairo = hb_cairo_param( 1 ); if( pCairo ) { + void * hText; cairo_show_text( pCairo, hb_parstr_utf8( 2, &hText, NULL ) ); hb_strfree( hText ); } @@ -89,16 +89,16 @@ HB_FUNC( CAIRO_SHOW_TEXT ) HB_FUNC( CAIRO_TEXT_EXTENTS ) { - void * hText; cairo_t * pCairo = hb_cairo_param( 1 ); - cairo_text_extents_t te; if( pCairo ) { + void * hText; PHB_ITEM pItem = hb_stackReturnItem(); + cairo_text_extents_t te; cairo_text_extents( pCairo, hb_parstr_utf8( 2, &hText, NULL ), &te ); hb_strfree( hText ); - hb_arrayNew( pItem, 6 ) + hb_arrayNew( pItem, 6 ); hb_arraySetND( pItem, 1, te.x_bearing ); hb_arraySetND( pItem, 2, te.y_bearing ); hb_arraySetND( pItem, 3, te.width ); @@ -107,4 +107,3 @@ HB_FUNC( CAIRO_TEXT_EXTENTS ) hb_arraySetND( pItem, 6, te.y_advance ); } } - diff --git a/harbour/contrib/hbwin/win_dll.c b/harbour/contrib/hbwin/win_dll.c index 3bbe1e9034..4312fb3330 100644 --- a/harbour/contrib/hbwin/win_dll.c +++ b/harbour/contrib/hbwin/win_dll.c @@ -606,7 +606,6 @@ static void DllExec( int iFlags, int iRtype, LPVOID lpFunction, PXPP_DLLEXEC xec default: hb_errRT_BASE( EG_ARG, 2010, "Unknown return type from DLL function", HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); - break; } }