From 26ca5da0dbafecdf851be2e6e8e62cc031837c86 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Wed, 30 Jun 2010 17:18:38 +0000 Subject: [PATCH] 2010-06-30 19:17 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * src/vm/extend.c * include/hbapi.h + Added hb_retclen_const() to return constant byte arrays. * contrib/hbqt/hbmk2_plugin_qt.prg * contrib/hbide/hbide.prg + Implemented pure Harbour .c QT resource support. Commented, waiting for HBQT API to load resources from byte stream. This method will create a pure .c source files from binary QT resource, so it doesn't require QT headers to be present. * contrib/hbqt/hbmk2_plugin_qt.prg * contrib/hbide/idemisc.prg * contrib/hbide/ideskeletons.prg * Changed 'ui' prefix to 'hbqtui_' for compiled .ui file entry function names. * utils/hbmk2/hbmk2.prg + Added hbmk2_FNameToSymbol() plugin function to convert filename to Harbour symbol name. * contrib/hbide/hbide.env - Deleted QT setup from compilers where QT is not supported. --- harbour/ChangeLog | 33 ++++- harbour/contrib/hbide/hbide.env | 4 - harbour/contrib/hbide/hbide.prg | 2 + harbour/contrib/hbide/idemisc.prg | 34 ++--- harbour/contrib/hbide/ideskeletons.prg | 2 +- harbour/contrib/hbqt/hbmk2_plugin_qt.prg | 151 ++++++++++++++++++++--- harbour/include/hbapi.h | 2 + harbour/src/vm/extend.c | 18 ++- harbour/utils/hbmk2/hbmk2.prg | 1 + 9 files changed, 199 insertions(+), 48 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 9eaa666623..508a050cf3 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,33 @@ The license applies to all entries newer than 2009-04-28. */ +2010-06-30 19:17 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * src/vm/extend.c + * include/hbapi.h + + Added hb_retclen_const() to return constant byte arrays. + + * contrib/hbqt/hbmk2_plugin_qt.prg + * contrib/hbide/hbide.prg + + Implemented pure Harbour .c QT resource support. + Commented, waiting for HBQT API to load resources + from byte stream. + This method will create a pure .c source files + from binary QT resource, so it doesn't require + QT headers to be present. + + * contrib/hbqt/hbmk2_plugin_qt.prg + * contrib/hbide/idemisc.prg + * contrib/hbide/ideskeletons.prg + * Changed 'ui' prefix to 'hbqtui_' for compiled .ui + file entry function names. + + * utils/hbmk2/hbmk2.prg + + Added hbmk2_FNameToSymbol() plugin function to convert + filename to Harbour symbol name. + + * contrib/hbide/hbide.env + - Deleted QT setup from compilers where QT is not supported. + 2010-06-30 10:02 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) * contrib/hbqt/hbqt_hbqplaintextedit.cpp ! Fixed: right-button-press was clearing selection. @@ -97,7 +124,7 @@ 2010-06-29 21:02 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * utils/hbmk2/hbmk2.prg - + Addeded support for specifying dependencies in .hbc files. + + Added support for specifying dependencies in .hbc files. * contrib/hbide/hbide.hbp * contrib/hbqt/hbqt.hbc @@ -153,11 +180,11 @@ 2010-06-29 14:56 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * utils/hbmk2/hbmk2.prg - + Will now defined macro __HBSCRIPT__HBMK for all scripts + + Will now define macro __HBSCRIPT__HBMK for all scripts executed in source form. * utils/hbrun/hbrun.prg - + Will now defined macro __HBSCRIPT__HBRUN for all scripts + + Will now define macro __HBSCRIPT__HBRUN for all scripts executed in source form. * contrib/hbqt/hbmk2_plugin_qt.prg diff --git a/harbour/contrib/hbide/hbide.env b/harbour/contrib/hbide/hbide.env index aa77913d4a..b3d201d8f2 100644 --- a/harbour/contrib/hbide/hbide.env +++ b/harbour/contrib/hbide/hbide.env @@ -11,13 +11,9 @@ {content} call "%ProgramFiles%\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" x86 [ BCC 5.5.1 Command Line Tools ] -{content} set HB_WITH_QT=C:\qt\2009.03\qt\include -{content} set PATH=%HB_WITH_QT%\..\bin;%PATH% {content} set PATH=C:\Borland\BCC55\Bin;%PATH% [ Pelles C ] -{content} set HB_WITH_QT=C:\qt\2009.03\qt\include -{content} set PATH=%HB_WITH_QT%\..\bin;%PATH% {content} set PATH=%ProgramFiles%\PellesC\Bin;%PATH% {content} set INCLUDE=%ProgramFiles%\PellesC\Include;%ProgramFiles%\PellesC\Include\Win;%INCLUDE% {content} set LIB=%ProgramFiles%\PellesC\Lib;%ProgramFiles%\PellesC\Lib\Win;%LIB% diff --git a/harbour/contrib/hbide/hbide.prg b/harbour/contrib/hbide/hbide.prg index e346d2ecdc..6a8433b71a 100644 --- a/harbour/contrib/hbide/hbide.prg +++ b/harbour/contrib/hbide/hbide.prg @@ -111,6 +111,8 @@ PROCEDURE Main( ... ) SET CENTURY ON SET EPOCH TO 1970 + /* TODO: activate */ hbqtres_HbIde() + oIde := HbIde():new( hb_aParams() ):create() oIde:destroy() diff --git a/harbour/contrib/hbide/idemisc.prg b/harbour/contrib/hbide/idemisc.prg index 57abb993a1..dd2307e186 100644 --- a/harbour/contrib/hbide/idemisc.prg +++ b/harbour/contrib/hbide/idemisc.prg @@ -2137,55 +2137,55 @@ FUNCTION hbide_getUI( cUI, qParent ) SWITCH cUI CASE "findinfilesex" - oUI := iif( nModeUI == UI_MODE_FUNC, uiFindinfilesex( qParent ), NIL ) + oUI := iif( nModeUI == UI_MODE_FUNC, hbqtui_Findinfilesex( qParent ), NIL ) EXIT CASE "updown" - oUI := iif( nModeUI == UI_MODE_FUNC, uiUpDown( qParent ), NIL ) + oUI := iif( nModeUI == UI_MODE_FUNC, hbqtui_UpDown( qParent ), NIL ) EXIT CASE "searchreplace" - oUI := iif( nModeUI == UI_MODE_FUNC, uiSearchReplace( qParent ), NIL ) + oUI := iif( nModeUI == UI_MODE_FUNC, hbqtui_SearchReplace( qParent ), NIL ) EXIT CASE "finddialog" - oUI := iif( nModeUI == UI_MODE_FUNC, uiFindDialog( qParent ), NIL ) + oUI := iif( nModeUI == UI_MODE_FUNC, hbqtui_FindDialog( qParent ), NIL ) EXIT CASE "environments" - oUI := iif( nModeUI == UI_MODE_FUNC, uiEnvironments( qParent ), NIL ) + oUI := iif( nModeUI == UI_MODE_FUNC, hbqtui_Environments( qParent ), NIL ) EXIT CASE "environ" - oUI := iif( nModeUI == UI_MODE_FUNC, uiEnviron( qParent ), NIL ) + oUI := iif( nModeUI == UI_MODE_FUNC, hbqtui_Environ( qParent ), NIL ) EXIT CASE "shortcuts" - oUI := iif( nModeUI == UI_MODE_FUNC, uiShortcuts( qParent ), NIL ) + oUI := iif( nModeUI == UI_MODE_FUNC, hbqtui_Shortcuts( qParent ), NIL ) EXIT CASE "docwriter" - oUI := iif( nModeUI == UI_MODE_FUNC, uiDocwriter( qParent ), NIL ) + oUI := iif( nModeUI == UI_MODE_FUNC, hbqtui_Docwriter( qParent ), NIL ) EXIT CASE "toolsutilities" - oUI := iif( nModeUI == UI_MODE_FUNC, uiToolsutilities( qParent ), NIL ) + oUI := iif( nModeUI == UI_MODE_FUNC, hbqtui_Toolsutilities( qParent ), NIL ) EXIT CASE "funclist" - oUI := iif( nModeUI == UI_MODE_FUNC, uiFunclist( qParent ), NIL ) + oUI := iif( nModeUI == UI_MODE_FUNC, hbqtui_Funclist( qParent ), NIL ) EXIT CASE "docviewgenerator" - oUI := iif( nModeUI == UI_MODE_FUNC, uiDocviewgenerator( qParent ), NIL ) + oUI := iif( nModeUI == UI_MODE_FUNC, hbqtui_Docviewgenerator( qParent ), NIL ) EXIT CASE "selectproject" - oUI := iif( nModeUI == UI_MODE_FUNC, uiSelectproject( qParent ), NIL ) + oUI := iif( nModeUI == UI_MODE_FUNC, hbqtui_Selectproject( qParent ), NIL ) EXIT CASE "projectpropertiesex" - oUI := iif( nModeUI == UI_MODE_FUNC, uiProjectpropertiesex( qParent ), NIL ) + oUI := iif( nModeUI == UI_MODE_FUNC, hbqtui_Projectpropertiesex( qParent ), NIL ) EXIT CASE "selectionlist" - oUI := iif( nModeUI == UI_MODE_FUNC, uiSelectionlist( qParent ), NIL ) + oUI := iif( nModeUI == UI_MODE_FUNC, hbqtui_Selectionlist( qParent ), NIL ) EXIT CASE "themesex" - oUI := iif( nModeUI == UI_MODE_FUNC, uiThemesex( qParent ), NIL ) + oUI := iif( nModeUI == UI_MODE_FUNC, hbqtui_Themesex( qParent ), NIL ) EXIT CASE "setup" - oUI := iif( nModeUI == UI_MODE_FUNC, uiSetup( qParent ), NIL ) + oUI := iif( nModeUI == UI_MODE_FUNC, hbqtui_Setup( qParent ), NIL ) EXIT CASE "mainwindow" - oUI := iif( nModeUI == UI_MODE_FUNC, uiMainwindow( qParent ), NIL ) + oUI := iif( nModeUI == UI_MODE_FUNC, hbqtui_Mainwindow( qParent ), NIL ) EXIT ENDSWITCH diff --git a/harbour/contrib/hbide/ideskeletons.prg b/harbour/contrib/hbide/ideskeletons.prg index 62b5da4065..662f5e7eec 100644 --- a/harbour/contrib/hbide/ideskeletons.prg +++ b/harbour/contrib/hbide/ideskeletons.prg @@ -157,7 +157,7 @@ METHOD IdeSkeletons:show() IF empty( ::oUI ) // ::oUI := HbQtUI():new( hbide_uic( "skeletons" ) ):build() - ::oUI := uiSkeletons() + ::oUI := hbqtui_Skeletons() ::oSkeltnDock:oWidget:setWidget( ::oUI:oWidget ) diff --git a/harbour/contrib/hbqt/hbmk2_plugin_qt.prg b/harbour/contrib/hbqt/hbmk2_plugin_qt.prg index a7d087760f..3d9c3966de 100644 --- a/harbour/contrib/hbqt/hbmk2_plugin_qt.prg +++ b/harbour/contrib/hbqt/hbmk2_plugin_qt.prg @@ -4,7 +4,7 @@ /* * Copyright 2010 Viktor Szakats (harbour.01 syenar.hu) (plugin) - * Copyright 2010 Pritpal Bedi (uic to prg converter) + * Copyright 2010 Pritpal Bedi (hbq_gen_ui_prg()) * www - http://harbour-project.org * * See COPYING for licensing terms. @@ -77,9 +77,15 @@ FUNCTION hbmk2_plugin_qt( hbmk2 ) NEXT FOR EACH cSrc IN hbmk2[ "vars" ][ "aQRC_Src" ] +#if __OWN_QRC_GENERATOR__ + cDst := hbmk2_FNameDirExtSet( "rcc_" + hbmk2_FNameNameGet( cSrc ), hbmk2[ "cWorkDir" ], ".c" ) + AAdd( hbmk2[ "vars" ][ "aQRC_Dst" ], cDst ) + hbmk2_AddInput_C( hbmk2, cDst ) +#else cDst := hbmk2_FNameDirExtSet( "rcc_" + hbmk2_FNameNameGet( cSrc ), hbmk2[ "cWorkDir" ], ".cpp" ) AAdd( hbmk2[ "vars" ][ "aQRC_Dst" ], cDst ) hbmk2_AddInput_CPP( hbmk2, cDst ) +#endif NEXT EXIT @@ -133,7 +139,7 @@ FUNCTION hbmk2_plugin_qt( hbmk2 ) EXIT ENDIF ELSE - IF ! uic_to_prg( hbmk2, cTmp, cDst, cSrc ) + IF ! uic_to_prg( hbmk2, cTmp, cDst, hbmk2_FNameToSymbol( hbmk2_FNameNameGet( cSrc ) ) ) IF ! hbmk2[ "lIGNOREERROR" ] FErase( cTmp ) cRetVal := "error" @@ -222,6 +228,44 @@ FUNCTION hbmk2_plugin_qt( hbmk2 ) IF lBuildIt +#if __OWN_QRC_GENERATOR__ + FClose( hb_FTempCreateEx( @cTmp ) ) + + cCommand := cRCC_BIN +; + " -binary" +; + " " + hbmk2_FNameEscape( hbmk2_PathSepToTarget( hbmk2, cSrc ), hbmk2[ "nCmd_Esc" ], hbmk2[ "nCmd_FNF" ] ) +; + " -o " + hbmk2_FNameEscape( cTmp, hbmk2[ "nCmd_Esc" ], hbmk2[ "nCmd_FNF" ] ) + + IF hbmk2[ "lTRACE" ] + IF ! hbmk2[ "lQUIET" ] + hbmk2_OutStd( hbmk2, I_( "'rcc' command:" ) ) + ENDIF + hbmk2_OutStdRaw( cCommand ) + ENDIF + + IF ! hbmk2[ "lDONTEXEC" ] + IF ( nError := hb_processRun( cCommand ) ) != 0 + hbmk2_OutErr( hbmk2, hb_StrFormat( I_( "Error: Running 'rcc' executable. %1$s" ), hb_ntos( nError ) ) ) + IF ! hbmk2[ "lQUIET" ] + hbmk2_OutErrRaw( cCommand ) + ENDIF + IF ! hbmk2[ "lIGNOREERROR" ] + FErase( cTmp ) + cRetVal := "error" + EXIT + ENDIF + ELSE + IF ! qrc_bin_to_c( hbmk2, cTmp, cDst, hbmk2_FNameToSymbol( hbmk2_FNameNameGet( cSrc ) ) ) + IF ! hbmk2[ "lIGNOREERROR" ] + FErase( cTmp ) + cRetVal := "error" + EXIT + ENDIF + ENDIF + ENDIF + ENDIF + FErase( cTmp ) +#else cCommand := cRCC_BIN +; " " + hbmk2_FNameEscape( hbmk2_PathSepToTarget( hbmk2, cSrc ), hbmk2[ "nCmd_Esc" ], hbmk2[ "nCmd_FNF" ] ) +; " -o " + hbmk2_FNameEscape( hbmk2_PathSepToTarget( hbmk2, cDst ), hbmk2[ "nCmd_Esc" ], hbmk2[ "nCmd_FNF" ] ) @@ -243,6 +287,7 @@ FUNCTION hbmk2_plugin_qt( hbmk2 ) EXIT ENDIF ENDIF +#endif ENDIF NEXT ENDIF @@ -313,27 +358,48 @@ STATIC FUNCTION qt_tool_detect( hbmk2, cName, cEnvQT, cEnvHB ) #else -/* Standalone test code for .uic to .prg conversion ) */ +/* Standalone test code conversions ) */ PROCEDURE Main( cSrc, cDst ) LOCAL cTmp LOCAL nError + LOCAL cExt + + LOCAL cName IF cSrc != NIL .AND. ; cDst != NIL FClose( hb_FTempCreateEx( @cTmp ) ) - IF ( nError := hb_processRun( "uic " + cSrc + " -o " + cTmp ) ) == 0 - IF ! uic_to_prg( NIL, cTmp, cDst, cSrc ) - nError := 9 + cName := "TEST" + + hb_FNameSplit( cSrc,,, @cExt ) + + SWITCH Lower( cExt ) + CASE ".qrc" + IF ( nError := hb_processRun( "rcc " + cSrc + " -binary -o " + cTmp ) ) == 0 + IF ! qrc_bin_to_c( NIL, cTmp, cDst, cName ) + nError := 9 + ENDIF + ELSE + OutErr( "Error: Calling 'rcc' tool: " + hb_ntos( nError ) + hb_osNewLine() ) ENDIF - ELSE - OutErr( "Error: Calling 'uic' tool: " + hb_ntos( nError ) + hb_osNewLine() ) - ENDIF + EXIT + + CASE ".ui" + IF ( nError := hb_processRun( "uic " + cSrc + " -o " + cTmp ) ) == 0 + IF ! uic_to_prg( NIL, cTmp, cDst, cName ) + nError := 9 + ENDIF + ELSE + OutErr( "Error: Calling 'uic' tool: " + hb_ntos( nError ) + hb_osNewLine() ) + ENDIF + EXIT + ENDSWITCH FErase( cTmp ) ELSE - OutErr( "Missing parameter. Call with: <.ui> <.prg>" + hb_osNewLine() ) + OutErr( "Missing parameter. Call with: <.ui|.qrc> <.prg>" + hb_osNewLine() ) nError := 8 ENDIF @@ -351,17 +417,62 @@ STATIC FUNCTION hbmk2_OutErr( hbmk2, ... ) #endif -/* ----------------------------------------------------------------------- */ - -STATIC FUNCTION uic_to_prg( hbmk2, cFileNameSrc, cFileNameDst, cOriSrc ) - LOCAL aLinesPRG +STATIC FUNCTION qrc_bin_to_c( hbmk2, cFileNameSrc, cFileNameDst, cName ) LOCAL cFile - LOCAL cName + LOCAL cChar + LOCAL cOutput + LOCAL cLine IF hb_FileExists( cFileNameSrc ) - hb_FNameSplit( cOriSrc,, @cName ) - aLinesPRG := hbq_create( hb_MemoRead( cFileNameSrc ), "ui" + Upper( Left( cName, 1 ) ) + Lower( SubStr( cName, 2 ) ) ) + cFile := hb_MemoRead( cFileNameSrc ) + + IF ! Empty( cFile ) + + cOutput := "/* WARNING: Automatically generated source file. DO NOT EDIT! */" + hb_osNewLine() + cOutput += hb_osNewLine() + cOutput += '#include "hbapi.h"' + hb_osNewLine() + cOutput += hb_osNewLine() + cOutput += "HB_FUNC( " + Upper( "hbqtres_" + cName ) + " )" + hb_osNewLine() + cOutput += "{" + hb_osNewLine() + cOutput += Chr( 9 ) + "static const char s_res_data[] =" + hb_osNewLine() + cOutput += Chr( 9 ) + "{" + hb_osNewLine() + + cLine := Chr( 9 ) + Chr( 9 ) + FOR EACH cChar IN cFile + cLine += "0x" + hb_NumToHex( Asc( cChar ) ) + "," + IF Len( cLine ) >= 74 + cOutput += cLine + hb_osNewLine() + cLine := Chr( 9 ) + Chr( 9 ) + ENDIF + NEXT + + cOutput += Chr( 9 ) + "};" + hb_osNewLine() + cOutput += hb_osNewLine() + cOutput += Chr( 9 ) + "hb_retclen_const( s_res_data, sizeof( s_res_data ) );" + hb_osNewLine() + cOutput += "}" + hb_osNewLine() + + IF hb_MemoWrit( cFileNameDst, cOutput ) + RETURN .T. + ELSE + hbmk2_OutErr( hbmk2, hb_StrFormat( "Error: Cannot create file: %1$s", cFileNameDst ) ) + ENDIF + ELSE + hbmk2_OutErr( hbmk2, hb_StrFormat( "Error: Empty intermediate file: %1$s", cFileNameSrc ) ) + ENDIF + ELSE + hbmk2_OutErr( hbmk2, hb_StrFormat( "Error: Cannot find intermediate file: %1$s", cFileNameSrc ) ) + ENDIF + + RETURN .F. + +STATIC FUNCTION uic_to_prg( hbmk2, cFileNameSrc, cFileNameDst, cName ) + LOCAL aLinesPRG + LOCAL cFile + + IF hb_FileExists( cFileNameSrc ) + + aLinesPRG := hbq_gen_ui_prg( hb_MemoRead( cFileNameSrc ), "hbqtui_" + cName ) IF ! Empty( aLinesPRG ) cFile := "" @@ -369,7 +480,7 @@ STATIC FUNCTION uic_to_prg( hbmk2, cFileNameSrc, cFileNameDst, cOriSrc ) IF hb_MemoWrit( cFileNameDst, cFile ) RETURN .T. ELSE - hbmk2_OutErr( hbmk2, hb_StrFormat( "Error: Cannot write file: %1$s", cFileNameDst ) ) + hbmk2_OutErr( hbmk2, hb_StrFormat( "Error: Cannot create file: %1$s", cFileNameDst ) ) ENDIF ELSE hbmk2_OutErr( hbmk2, hb_StrFormat( "Error: Intermediate file (%1$s) is not an .uic file.", cFileNameSrc ) ) @@ -380,11 +491,13 @@ STATIC FUNCTION uic_to_prg( hbmk2, cFileNameSrc, cFileNameDst, cOriSrc ) RETURN .F. +/* ----------------------------------------------------------------------- */ + #define STRINGIFY( cStr ) '"' + cStr + '"' #define PAD_30( cStr ) PadR( cStr, Max( Len( cStr ), 35 ) ) #define STRIP_SQ( cStr ) StrTran( StrTran( StrTran( StrTran( s, "[", " " ), "]", " " ), "\n", " " ), Chr( 10 ), " " ) -STATIC FUNCTION hbq_create( cFile, cFuncName ) +STATIC FUNCTION hbq_gen_ui_prg( cFile, cFuncName ) LOCAL s LOCAL n LOCAL n1 diff --git a/harbour/include/hbapi.h b/harbour/include/hbapi.h index d9a607ecf3..ee2fa36309 100644 --- a/harbour/include/hbapi.h +++ b/harbour/include/hbapi.h @@ -678,6 +678,7 @@ extern HB_EXPORT void hb_retc_buffer( char * szText ); /* sames as above, but extern HB_EXPORT void hb_retc_const( const char * szText ); /* returns a string as a pcode based string */ extern HB_EXPORT void hb_retclen( const char * szText, HB_SIZE ulLen ); /* returns a string with a specific length */ extern HB_EXPORT void hb_retclen_buffer( char * szText, HB_SIZE ulLen ); /* sames as above, but accepts an allocated buffer */ +extern HB_EXPORT void hb_retclen_const( const char * szText, HB_SIZE ulLen ); /* returns a string with a specific length formed from a constant buffer */ extern HB_EXPORT void hb_retds( const char * szDate ); /* returns a date, must use YYYYMMDD format */ extern HB_EXPORT void hb_retd( int iYear, int iMonth, int iDay ); /* returns a date */ extern HB_EXPORT void hb_retdl( long lJulian ); /* returns a long value as a julian date */ @@ -716,6 +717,7 @@ extern HB_EXPORT void hb_retnlllen( HB_LONGLONG lNumber, int iWidth ); /* retu #define hb_retc_const( szText ) hb_itemPutCConst( hb_stackReturnItem(), szText ) #define hb_retclen( szText, ulLen ) hb_itemPutCL( hb_stackReturnItem(), szText, ulLen ) #define hb_retclen_buffer( szText, ulLen ) hb_itemPutCLPtr( hb_stackReturnItem(), szText, ulLen ) +#define hb_retclen_const( szText, ulLen ) hb_itemPutCLConst( hb_stackReturnItem(), szText, ulLen ) #define hb_retds( szDate ) hb_itemPutDS( hb_stackReturnItem(), szDate ) #define hb_retd( iYear, iMonth, iDay ) hb_itemPutD( hb_stackReturnItem(), iYear, iMonth, iDay ) #define hb_retdl( lJulian ) hb_itemPutDL( hb_stackReturnItem(), lJulian ) diff --git a/harbour/src/vm/extend.c b/harbour/src/vm/extend.c index def1d9ed74..2499f78667 100644 --- a/harbour/src/vm/extend.c +++ b/harbour/src/vm/extend.c @@ -1406,7 +1406,7 @@ void * hb_parvptrGC( const HB_GC_FUNCS * pFuncs, int iParam, ... ) } #undef hb_ret -void hb_ret( void ) +void hb_ret( void ) { HB_STACK_TLS_PRELOAD @@ -1416,7 +1416,7 @@ void hb_ret( void ) } #undef hb_reta -void hb_reta( HB_SIZE ulLen ) /* undocumented hb_reta() */ +void hb_reta( HB_SIZE ulLen ) /* undocumented hb_reta() */ { HB_STACK_TLS_PRELOAD @@ -1466,7 +1466,7 @@ void hb_retc_const( const char * szText ) } #undef hb_retclen -void hb_retclen( const char * szText, HB_SIZE ulLen ) +void hb_retclen( const char * szText, HB_SIZE ulLen ) { HB_STACK_TLS_PRELOAD @@ -1476,7 +1476,7 @@ void hb_retclen( const char * szText, HB_SIZE ulLen ) } #undef hb_retclen_buffer -void hb_retclen_buffer( char * szText, HB_SIZE ulLen ) +void hb_retclen_buffer( char * szText, HB_SIZE ulLen ) { HB_STACK_TLS_PRELOAD @@ -1485,6 +1485,16 @@ void hb_retclen_buffer( char * szText, HB_SIZE ulLen ) hb_itemPutCLPtr( hb_stackReturnItem(), szText, ulLen ); } +#undef hb_retclen_const +void hb_retclen_const( const char * szText, HB_SIZE ulLen ) +{ + HB_STACK_TLS_PRELOAD + + HB_TRACE(HB_TR_DEBUG, ("hb_retclen_const(%.*s, %" HB_PFS "u)", ( int ) ulLen, szText, ulLen)); + + hb_itemPutCLConst( hb_stackReturnItem(), szText, ulLen ); +} + /* szDate must have YYYYMMDD format */ #undef hb_retds diff --git a/harbour/utils/hbmk2/hbmk2.prg b/harbour/utils/hbmk2/hbmk2.prg index b5645da41e..7eed59f53f 100644 --- a/harbour/utils/hbmk2/hbmk2.prg +++ b/harbour/utils/hbmk2/hbmk2.prg @@ -6481,6 +6481,7 @@ FUNCTION hbmk2_FNameExtGet( ... ) ; RETURN FN_ExtGet( ... ) FUNCTION hbmk2_FNameExtDef( ... ) ; RETURN FN_ExtDef( ... ) FUNCTION hbmk2_FNameExtSet( ... ) ; RETURN FN_ExtSet( ... ) FUNCTION hbmk2_FNameEscape( ... ) ; RETURN FN_Escape( ... ) +FUNCTION hbmk2_FNameToSymbol( ... ) ; RETURN FuncNameEncode( ... ) FUNCTION hbmk2_StrStripQuote( ... ) ; RETURN StrStripQuote( ... ) FUNCTION hbmk2_OutStdRaw( ... ) ; RETURN ( OutStd( ... ), OutStd( _OUT_EOL ) ) FUNCTION hbmk2_OutErrRaw( ... ) ; RETURN ( OutErr( ... ), OutErr( _OUT_EOL ) )