2009-06-25 14:37 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)

* include/hbapi.h
  * source/vm/maindllp.c
  * source/vm/extend.c
  * contrib/gtwvg/gtwvg.h
  * contrib/gtwvg/wvgutils.c
    * Changed hb_parv*() function return value to 'const char *'.
This commit is contained in:
Viktor Szakats
2009-06-26 12:37:23 +00:00
parent d4e0e04f3a
commit 83a6162d7f
6 changed files with 23 additions and 15 deletions

View File

@@ -17,6 +17,14 @@
past entries belonging to author(s): Viktor Szakats.
*/
2009-06-25 14:37 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* include/hbapi.h
* source/vm/maindllp.c
* source/vm/extend.c
* contrib/gtwvg/gtwvg.h
* contrib/gtwvg/wvgutils.c
* Changed hb_parv*() function return value to 'const char *'.
2009-06-25 13:52 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* contrib/hbxbp/tests/demoxbp.prg
! Fixed the same warning again.

View File

@@ -606,7 +606,7 @@ void HB_EXPORT hb_wvt_GetStringAttrib( USHORT top, USHORT left, USHORT
void HB_EXPORT hb_wvt_PutStringAttrib( USHORT top, USHORT left, USHORT bottom, USHORT right, BYTE * sBuffer, BYTE * sAttrib );
LPWORD HB_EXPORT lpwAlign( LPWORD lpIn );
int HB_EXPORT nCopyAnsiToWideChar( LPWORD lpWCStr, LPSTR lpAnsiIn );
int HB_EXPORT nCopyAnsiToWideChar( LPWORD lpWCStr, LPCSTR lpAnsiIn );
BOOL HB_EXPORT CALLBACK hb_wvt_gtDlgProcMLess( HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam );
BOOL HB_EXPORT CALLBACK hb_wvt_gtDlgProcModal( HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam );

View File

@@ -1184,7 +1184,7 @@ HB_FUNC( WVT__MAKEDLGTEMPLATE )
if ( hb_parinfa( 1,11 ) == HB_IT_STRING )
{
nchar = nCopyAnsiToWideChar( p, (LPSTR) hb_parvc( 1,11 ) ) ;
nchar = nCopyAnsiToWideChar( p, (LPCSTR) hb_parvc( 1,11 ) ) ;
p += nchar ;
}
else
@@ -1199,7 +1199,7 @@ HB_FUNC( WVT__MAKEDLGTEMPLATE )
*p++ = (short) hb_parvni(1,13) ;
*p++ = (short) hb_parvni(1,14) ;
nchar = nCopyAnsiToWideChar( p, (LPSTR) hb_parvc( 1,15 ) ) ;
nchar = nCopyAnsiToWideChar( p, (LPCSTR) hb_parvc( 1,15 ) ) ;
p += nchar ;
} ;
@@ -1226,7 +1226,7 @@ HB_FUNC( WVT__MAKEDLGTEMPLATE )
if ( hb_parinfa( 10,i ) == HB_IT_STRING )
{
nchar = nCopyAnsiToWideChar( p, (LPSTR) hb_parvc( 10,i ) ) ; /* class */
nchar = nCopyAnsiToWideChar( p, (LPCSTR) hb_parvc( 10,i ) ) ; /* class */
p += nchar ;
}
else
@@ -1237,7 +1237,7 @@ HB_FUNC( WVT__MAKEDLGTEMPLATE )
if ( hb_parinfa( 11,i ) == HB_IT_STRING )
{
nchar = nCopyAnsiToWideChar( p, (LPSTR) hb_parvc( 11,i ) ) ; /* text */
nchar = nCopyAnsiToWideChar( p, (LPCSTR) hb_parvc( 11,i ) ) ; /* text */
p += nchar ;
}
else
@@ -1273,7 +1273,7 @@ LPWORD lpwAlign( LPWORD lpIn )
/*----------------------------------------------------------------------*/
int nCopyAnsiToWideChar( LPWORD lpWCStr, LPSTR lpAnsiIn )
int nCopyAnsiToWideChar( LPWORD lpWCStr, LPCSTR lpAnsiIn )
{
int nChar = 0;

View File

@@ -629,8 +629,8 @@ extern HB_EXPORT void * hb_parptrGC( HB_GARBAGE_FUNC_PTR pFunc, int iParam
extern HB_EXPORT LONGLONG hb_parnll( int iParam ); /* retrieve a numeric parameter as a long long */
#endif
extern HB_EXPORT char * hb_parvc( int iParam, ... ); /* retrieve a string parameter */
extern HB_EXPORT char * hb_parvcx( int iParam, ... ); /* retrieve a string parameter */
extern HB_EXPORT const char * hb_parvc( int iParam, ... ); /* retrieve a string parameter */
extern HB_EXPORT const char * hb_parvcx( int iParam, ... ); /* retrieve a string parameter */
extern HB_EXPORT ULONG hb_parvclen( int iParam, ... ); /* retrieve a string parameter length */
extern HB_EXPORT ULONG hb_parvcsiz( int iParam, ... ); /* retrieve a by-reference string parameter length, including terminator */
extern HB_EXPORT char * hb_parvds( int iParam, ... ); /* retrieve a date as a string yyyymmdd */

View File

@@ -610,7 +610,7 @@ void * hb_parptrGC( HB_GARBAGE_FUNC_PTR pFunc, int iParam )
/* NOTE: Caller should not modify the buffer returned by this function.
[vszakats] */
char * hb_parvc( int iParam, ... )
const char * hb_parvc( int iParam, ... )
{
HB_STACK_TLS_PRELOAD
@@ -635,14 +635,14 @@ char * hb_parvc( int iParam, ... )
va_end( va );
pItem = hb_arrayGetItemPtr( pItem, ulArrayIndex );
return pItem && HB_IS_STRING( pItem ) ? ( char * ) hb_itemGetCPtr( pItem ) : NULL;
return pItem && HB_IS_STRING( pItem ) ? hb_itemGetCPtr( pItem ) : NULL;
}
}
return ( char * ) NULL;
return NULL;
}
char * hb_parvcx( int iParam, ... )
const char * hb_parvcx( int iParam, ... )
{
HB_STACK_TLS_PRELOAD
@@ -666,11 +666,11 @@ char * hb_parvcx( int iParam, ... )
ulArrayIndex = va_arg( va, ULONG );
va_end( va );
return ( char * ) hb_arrayGetCPtr( pItem, ulArrayIndex );
return hb_arrayGetCPtr( pItem, ulArrayIndex );
}
}
return ( char * ) "";
return "";
}
ULONG hb_parvclen( int iParam, ... )

View File

@@ -182,7 +182,7 @@ void hb_vmExecute( const BYTE * pCode, PHB_SYMB pSymbols )
/* extend API implementation for pcode DLLs */
char * hb_parvc( int iParam, ... )
const char * hb_parvc( int iParam, ... )
{
FARPROC pExtIsArray = GetProcAddress( GetModuleHandle( NULL ), HBTEXT( "_hb_extIsArray" ) );
FARPROC pParC = GetProcAddress( GetModuleHandle( NULL ), HBTEXT( "_hb_parvc" ) );