2009-06-25 17:43 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* utils/hbmk2/hbmk2.prg
! Fixed to not add dirs empty after normalization to dirlists.
+ Now dirs passed through the command line or .hbm files are
also normalized (incpath, libpath, inctrypath).
* include/hbdate.h
* source/rtl/console.c
* source/rtl/philes.c
* source/rtl/box.c
* source/rtl/filebuf.c
* source/rtl/inkey.c
* source/rtl/datec.c
* source/rtl/langapi.c
* source/rtl/errapi.c
* source/rtl/memofile.c
* source/rtl/saverest.c
* contrib/hbct/screen2.c
* contrib/hbct/tab.c
* contrib/hbct/dattime2.c
* contrib/hbct/replace.c
* contrib/hbct/remove.c
* contrib/hbclipsm/gauge.c
* contrib/hbmisc/dates2.c
* examples/hbdoc/hbdfrdln.c
* examples/hbmake/hbmakec.c
* examples/hbsqlit2/hbsqlit2.c
* 'const' cleanup.
* hb_dateCMonth() retval changed to const.
* hb_dateCDOW() retval changed to const.
This commit is contained in:
@@ -17,6 +17,37 @@
|
||||
past entries belonging to author(s): Viktor Szakats.
|
||||
*/
|
||||
|
||||
2009-06-25 17:43 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* utils/hbmk2/hbmk2.prg
|
||||
! Fixed to not add dirs empty after normalization to dirlists.
|
||||
+ Now dirs passed through the command line or .hbm files are
|
||||
also normalized (incpath, libpath, inctrypath).
|
||||
|
||||
* include/hbdate.h
|
||||
* source/rtl/console.c
|
||||
* source/rtl/philes.c
|
||||
* source/rtl/box.c
|
||||
* source/rtl/filebuf.c
|
||||
* source/rtl/inkey.c
|
||||
* source/rtl/datec.c
|
||||
* source/rtl/langapi.c
|
||||
* source/rtl/errapi.c
|
||||
* source/rtl/memofile.c
|
||||
* source/rtl/saverest.c
|
||||
* contrib/hbct/screen2.c
|
||||
* contrib/hbct/tab.c
|
||||
* contrib/hbct/dattime2.c
|
||||
* contrib/hbct/replace.c
|
||||
* contrib/hbct/remove.c
|
||||
* contrib/hbclipsm/gauge.c
|
||||
* contrib/hbmisc/dates2.c
|
||||
* examples/hbdoc/hbdfrdln.c
|
||||
* examples/hbmake/hbmakec.c
|
||||
* examples/hbsqlit2/hbsqlit2.c
|
||||
* 'const' cleanup.
|
||||
* hb_dateCMonth() retval changed to const.
|
||||
* hb_dateCDOW() retval changed to const.
|
||||
|
||||
2009-06-26 17:06 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
|
||||
* harbour/include/hbrddnsx.h
|
||||
* harbour/include/hbrddcdx.h
|
||||
|
||||
@@ -90,14 +90,14 @@ static void hb_gaugeUpdate( PHB_ITEM pArray, float fPercent )
|
||||
hb_snprintf( szPct, sizeof( szPct ), "%3.0f%%", fPercent * 100 );
|
||||
hb_gtWriteAt( ( SHORT ) hb_arrayGetNI( pArray, B_TOP ),
|
||||
iCenter + 2,
|
||||
( BYTE * ) szPct, 4 );
|
||||
( const BYTE * ) szPct, 4 );
|
||||
}
|
||||
|
||||
hb_gtBox( ( SHORT ) hb_arrayGetNI( pArray, B_TOP ) + 1,
|
||||
( SHORT ) hb_arrayGetNI( pArray, B_LEFT ) + 1,
|
||||
( SHORT ) hb_arrayGetNI( pArray, B_BOTTOM ) - 1,
|
||||
( SHORT ) hb_arrayGetNI( pArray, B_RIGHT ) - 1,
|
||||
( BYTE * ) szStr );
|
||||
( const BYTE * ) szStr );
|
||||
|
||||
iMax = ( SHORT ) ( hb_arrayGetNI( pArray, B_BOTTOM ) - hb_arrayGetNI( pArray, B_TOP ) - 1 );
|
||||
for( iRow = 1; iRow <= iMax; iRow++ )
|
||||
@@ -132,9 +132,9 @@ HB_FUNC( GAUGENEW )
|
||||
hb_parni( B_LEFT ) + 4 : hb_parni( B_RIGHT ) ) : 0 );
|
||||
hb_arraySetC( pReturn, B_BACKCOLOR, HB_ISCHAR( B_BACKCOLOR ) ? hb_parc( B_BACKCOLOR ) : "W/N" );
|
||||
hb_arraySetC( pReturn, B_BARCOLOR, HB_ISCHAR( B_BARCOLOR ) ? hb_parc( B_BARCOLOR ) : "W+/N" );
|
||||
hb_arraySetL( pReturn, B_DISPLAYNUM,
|
||||
!( HB_ISNUM( B_RIGHT ) &&
|
||||
HB_ISNUM( B_LEFT ) &&
|
||||
hb_arraySetL( pReturn, B_DISPLAYNUM,
|
||||
!( HB_ISNUM( B_RIGHT ) &&
|
||||
HB_ISNUM( B_LEFT ) &&
|
||||
( hb_parni( B_RIGHT ) < hb_parni( B_LEFT ) + 9 ) ) );
|
||||
hb_arraySetC( pReturn, B_BARCHAR, HB_ISCHAR( B_BARCHAR ) ? hb_parc( B_BARCHAR ) : "\xdb" );
|
||||
hb_arraySetNL( pReturn, B_PERCENT, 0 );
|
||||
@@ -161,18 +161,18 @@ HB_FUNC( GAUGEDISPLAY )
|
||||
( SHORT) hb_arrayGetNI( pArray, B_LEFT ),
|
||||
( SHORT) hb_arrayGetNI( pArray, B_BOTTOM ),
|
||||
( SHORT) hb_arrayGetNI( pArray, B_RIGHT ),
|
||||
( BYTE * ) szStr );
|
||||
( const BYTE * ) szStr );
|
||||
|
||||
hb_gtBox( ( SHORT ) hb_arrayGetNI( pArray, B_TOP ),
|
||||
( SHORT ) hb_arrayGetNI( pArray, B_LEFT ),
|
||||
( SHORT ) hb_arrayGetNI( pArray, B_BOTTOM ),
|
||||
( SHORT ) hb_arrayGetNI( pArray, B_RIGHT ),
|
||||
( BYTE * ) B_BOXLINES );
|
||||
( const BYTE * ) B_BOXLINES );
|
||||
|
||||
if( hb_arrayGetL( pArray, B_DISPLAYNUM ) )
|
||||
hb_gtWriteAt( ( SHORT ) hb_arrayGetNI( pArray, B_TOP ),
|
||||
iCenter,
|
||||
( BYTE * ) "[ ]", 8 );
|
||||
( const BYTE * ) "[ ]", 8 );
|
||||
|
||||
hb_gtSetColorStr( szOldColor );
|
||||
|
||||
|
||||
@@ -257,7 +257,7 @@ HB_FUNC( DMY )
|
||||
|
||||
if( iMonth >= 1 && iMonth <= 12 )
|
||||
{
|
||||
char *szMonth = ( char * ) hb_langDGetItem( HB_LANG_ITEM_BASE_MONTH + iMonth - 1 );
|
||||
const char *szMonth = hb_langDGetItem( HB_LANG_ITEM_BASE_MONTH + iMonth - 1 );
|
||||
int iMonLen = strlen( szMonth );
|
||||
int iLen = 0, iBufLen = iMonLen + 10;
|
||||
char *szMDY = ( char * ) hb_xgrab( iBufLen );
|
||||
@@ -351,7 +351,7 @@ HB_FUNC( MDY )
|
||||
|
||||
if( iMonth >= 1 && iMonth <= 12 )
|
||||
{
|
||||
char *szMonth = ( char * ) hb_langDGetItem( HB_LANG_ITEM_BASE_MONTH + iMonth - 1 );
|
||||
const char *szMonth = hb_langDGetItem( HB_LANG_ITEM_BASE_MONTH + iMonth - 1 );
|
||||
int iLen = strlen( szMonth );
|
||||
int iBufLen = iLen + 9;
|
||||
char *szMDY = ( char * ) hb_xgrab( iBufLen );
|
||||
|
||||
@@ -123,7 +123,7 @@ static void do_remove( int iSwitch )
|
||||
{
|
||||
pSubst = ct_error_subst( ( USHORT ) iArgErrorMode, EG_ARG,
|
||||
sulErrorSubcodes[iSwitch],
|
||||
NULL, ( char * ) HB_ERR_FUNCNAME, 0,
|
||||
NULL, HB_ERR_FUNCNAME, 0,
|
||||
EF_CANSUBSTITUTE, HB_ERR_ARGS_BASEPARAMS );
|
||||
}
|
||||
|
||||
|
||||
@@ -94,10 +94,10 @@ static void do_replace( int iSwitch )
|
||||
if( HB_ISNUM( 2 ) )
|
||||
cReplace = ( char ) ( hb_parnl( 2 ) % 256 );
|
||||
else
|
||||
cReplace = *( ( char * ) hb_parc( 2 ) );
|
||||
cReplace = *( ( const char * ) hb_parc( 2 ) );
|
||||
|
||||
if( hb_parclen( 3 ) > 0 )
|
||||
cSearch = *( ( char * ) hb_parc( 3 ) );
|
||||
cSearch = *( ( const char * ) hb_parc( 3 ) );
|
||||
else if( HB_ISNUM( 3 ) )
|
||||
cSearch = ( char ) ( hb_parnl( 3 ) % 256 );
|
||||
else
|
||||
|
||||
@@ -62,7 +62,7 @@ HB_FUNC( SAYDOWN )
|
||||
|
||||
if( ulLen )
|
||||
{
|
||||
UCHAR * szText = ( UCHAR * ) hb_parc( 1 );
|
||||
const UCHAR * szText = ( const UCHAR * ) hb_parc( 1 );
|
||||
SHORT sRow, sCol;
|
||||
int iRow, iCol, iMaxRow, iMaxCol;
|
||||
long lDelay;
|
||||
@@ -106,7 +106,7 @@ HB_FUNC( SAYSPREAD )
|
||||
|
||||
if( ulLen )
|
||||
{
|
||||
UCHAR * szText = ( UCHAR * ) hb_parc( 1 );
|
||||
const UCHAR * szText = ( const UCHAR * ) hb_parc( 1 );
|
||||
ULONG ulPos, ul;
|
||||
SHORT sRow, sCol;
|
||||
int iRow, iCol, iMaxRow, iMaxCol;
|
||||
@@ -160,7 +160,7 @@ HB_FUNC( SAYMOVEIN )
|
||||
|
||||
if( ulLen )
|
||||
{
|
||||
UCHAR * szText = ( UCHAR * ) hb_parc( 1 );
|
||||
const UCHAR * szText = ( const UCHAR * ) hb_parc( 1 );
|
||||
ULONG ulChars, ul;
|
||||
SHORT sRow, sCol;
|
||||
int iRow, iCol, iMaxRow, iMaxCol;
|
||||
@@ -363,7 +363,7 @@ HB_FUNC( STRSCREEN )
|
||||
|
||||
if( ulLen )
|
||||
{
|
||||
UCHAR * szText = ( UCHAR * ) hb_parc( 1 );
|
||||
const UCHAR * szText = ( const UCHAR * ) hb_parc( 1 );
|
||||
SHORT sRow, sCol, sMaxRow, sMaxCol, sC;
|
||||
|
||||
hb_gtGetPos( &sRow, &sCol );
|
||||
@@ -442,5 +442,5 @@ HB_FUNC( _HB_CTDSPTIME )
|
||||
if( szTime[0] == '0' )
|
||||
szTime[0] = ' ';
|
||||
|
||||
hb_gtPutText( sRow, sCol, ( BYTE * ) szTime, iLen, iColor );
|
||||
hb_gtPutText( sRow, sCol, ( const BYTE * ) szTime, iLen, iColor );
|
||||
}
|
||||
|
||||
@@ -136,7 +136,7 @@ HB_FUNC( TABEXPAND )
|
||||
|
||||
if( HB_ISCHAR( 4 ) && hb_parclen( 4 ) > 0 )
|
||||
{
|
||||
pcNewLine = ( char * ) hb_parc( 4 );
|
||||
pcNewLine = hb_parc( 4 );
|
||||
sNewLineLen = hb_parclen( 4 );
|
||||
}
|
||||
else
|
||||
@@ -336,7 +336,7 @@ HB_FUNC( TABPACK )
|
||||
|
||||
sNewLineLen = hb_parclen( 4 );
|
||||
if( sNewLineLen > 0 )
|
||||
pcNewLine = ( char * ) hb_parc( 4 );
|
||||
pcNewLine = hb_parc( 4 );
|
||||
else
|
||||
{
|
||||
pcNewLine = hb_conNewLine();
|
||||
|
||||
@@ -140,7 +140,7 @@ HB_FUNC( AMONTHS )
|
||||
|
||||
for( i = 0; i < 12; i++ )
|
||||
{
|
||||
PHB_ITEM pString = hb_itemPutC( NULL, ( char * ) hb_langDGetItem( HB_LANG_ITEM_BASE_MONTH + i ) );
|
||||
PHB_ITEM pString = hb_itemPutC( NULL, hb_langDGetItem( HB_LANG_ITEM_BASE_MONTH + i ) );
|
||||
hb_itemArrayPut( pReturn, i+1, pString );
|
||||
hb_itemRelease( pString );
|
||||
}
|
||||
@@ -155,7 +155,7 @@ HB_FUNC( ADAYS )
|
||||
|
||||
for( i = 0; i < 7; i++ )
|
||||
{
|
||||
PHB_ITEM pString = hb_itemPutC( NULL, ( char * ) hb_langDGetItem( HB_LANG_ITEM_BASE_DAY + i ) );
|
||||
PHB_ITEM pString = hb_itemPutC( NULL, hb_langDGetItem( HB_LANG_ITEM_BASE_DAY + i ) );
|
||||
hb_itemArrayPut( pReturn, i + 1, pString );
|
||||
hb_itemRelease( pString );
|
||||
}
|
||||
|
||||
@@ -214,7 +214,7 @@ HB_FUNC( HB_FREADLINE )
|
||||
pTerm1 = hb_param( 3, HB_IT_STRING );
|
||||
Term = ( char ** ) hb_xgrab( sizeof( char * ) );
|
||||
iTermSizes = ( int * ) hb_xgrab( sizeof( int ) );
|
||||
Term[ 0 ] = ( char * ) hb_itemGetCPtr( pTerm1 );
|
||||
Term[ 0 ] = hb_itemGetCPtr( pTerm1 );
|
||||
iTermSizes[ 0 ] = hb_itemGetCLen( pTerm1 );
|
||||
iTerms = 1;
|
||||
}
|
||||
|
||||
@@ -97,14 +97,14 @@ static void hb_gaugeUpdate( PHB_ITEM pArray, float fPercent )
|
||||
hb_snprintf( szPct, sizeof( szPct ), "%3.0f%%", fPercent * 100 );
|
||||
hb_gtWriteAt( ( SHORT ) hb_arrayGetNI( pArray, B_TOP ),
|
||||
iCenter + 2,
|
||||
( BYTE * ) szPct, 4 );
|
||||
( const BYTE * ) szPct, 4 );
|
||||
}
|
||||
|
||||
hb_gtBox( ( SHORT ) hb_arrayGetNI( pArray, B_TOP ) + 1,
|
||||
( SHORT ) hb_arrayGetNI( pArray, B_LEFT ) + 1,
|
||||
( SHORT ) hb_arrayGetNI( pArray, B_BOTTOM ) - 1,
|
||||
( SHORT ) hb_arrayGetNI( pArray, B_RIGHT ) - 1,
|
||||
( BYTE * ) szStr );
|
||||
( const BYTE * ) szStr );
|
||||
|
||||
iMax = ( SHORT ) ( hb_arrayGetNI( pArray, B_BOTTOM ) - hb_arrayGetNI( pArray, B_TOP ) - 1 );
|
||||
for( iRow = 1; iRow <= iMax; iRow++ )
|
||||
@@ -168,18 +168,18 @@ HB_FUNC( GAUGEDISPLAY )
|
||||
( SHORT) hb_arrayGetNI( pArray, B_LEFT ),
|
||||
( SHORT) hb_arrayGetNI( pArray, B_BOTTOM ),
|
||||
( SHORT) hb_arrayGetNI( pArray, B_RIGHT ),
|
||||
( BYTE * ) szStr );
|
||||
( const BYTE * ) szStr );
|
||||
|
||||
hb_gtBox( ( SHORT ) hb_arrayGetNI( pArray, B_TOP ),
|
||||
( SHORT ) hb_arrayGetNI( pArray, B_LEFT ),
|
||||
( SHORT ) hb_arrayGetNI( pArray, B_BOTTOM ),
|
||||
( SHORT ) hb_arrayGetNI( pArray, B_RIGHT ),
|
||||
( BYTE * ) B_BOXLINES );
|
||||
( const BYTE * ) B_BOXLINES );
|
||||
|
||||
if( hb_arrayGetL( pArray, B_DISPLAYNUM ) )
|
||||
hb_gtWriteAt( ( SHORT ) hb_arrayGetNI( pArray, B_TOP ),
|
||||
iCenter,
|
||||
( BYTE * ) "[ ]", 8 );
|
||||
( const BYTE * ) "[ ]", 8 );
|
||||
|
||||
hb_gtSetColorStr( szOldColor );
|
||||
|
||||
@@ -361,7 +361,7 @@ HB_FUNC( HB_FREADLINE )
|
||||
pTerm1 = hb_param( 3, HB_IT_STRING );
|
||||
Term = ( char ** ) hb_xgrab( sizeof( char * ) );
|
||||
iTermSizes = ( int * ) hb_xgrab( sizeof( int ) );
|
||||
Term[ 0 ] = ( char * ) hb_itemGetCPtr( pTerm1 );
|
||||
Term[ 0 ] = hb_itemGetCPtr( pTerm1 );
|
||||
iTermSizes[ 0 ] = hb_itemGetCLen( pTerm1 );
|
||||
iTerms = 1;
|
||||
}
|
||||
|
||||
@@ -52,9 +52,9 @@ int hb_sqlite2_iDataCols = 0; /* fields */
|
||||
HB_FUNC( SQLITE_INFO )
|
||||
{
|
||||
hb_reta( 3 );
|
||||
hb_storc( ( char * ) SQLITE_VERSION , -1, 1 );
|
||||
hb_storc( ( char * ) sqlite_libversion() , -1, 2 );
|
||||
hb_storc( ( char * ) sqlite_libencoding(), -1, 3 );
|
||||
hb_storc( SQLITE_VERSION , -1, 1 );
|
||||
hb_storc( sqlite_libversion() , -1, 2 );
|
||||
hb_storc( sqlite_libencoding(), -1, 3 );
|
||||
}
|
||||
|
||||
/* Open a database file (in SQLite format) and set a public structure */
|
||||
|
||||
@@ -78,10 +78,10 @@ extern HB_EXPORT int hb_dateDOW( int iYear, int iMonth, int iDay );
|
||||
extern HB_EXPORT int hb_dateJulianDOW( LONG lJulian );
|
||||
|
||||
/* RTL functions */
|
||||
extern HB_EXPORT char * hb_dateCMonth( int iMonth );
|
||||
extern HB_EXPORT char * hb_dateCDOW( int iDay );
|
||||
extern HB_EXPORT char * hb_dateFormat( const char * szDate, char * szFormattedDate, const char * szDateFormat );
|
||||
extern HB_EXPORT long hb_dateUnformat( const char * szDate, const char * szDateFormat );
|
||||
extern HB_EXPORT const char * hb_dateCMonth( int iMonth );
|
||||
extern HB_EXPORT const char * hb_dateCDOW( int iDay );
|
||||
extern HB_EXPORT char * hb_dateFormat( const char * szDate, char * szFormattedDate, const char * szDateFormat );
|
||||
extern HB_EXPORT long hb_dateUnformat( const char * szDate, const char * szDateFormat );
|
||||
|
||||
/* functions to operate on time values */
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ HB_FUNC( DISPBOX )
|
||||
hb_itemGetNI( pLeft),
|
||||
hb_itemGetNI( pBottom ),
|
||||
hb_itemGetNI( pRight ),
|
||||
( BYTE * ) ( *pszBox ? pszBox : " " ),
|
||||
( const BYTE * ) ( *pszBox ? pszBox : " " ),
|
||||
iColor );
|
||||
}
|
||||
else
|
||||
@@ -135,7 +135,7 @@ HB_FUNC( HB_DISPBOX )
|
||||
( SHORT ) hb_itemGetNI( pLeft),
|
||||
( SHORT ) hb_itemGetNI( pBottom ),
|
||||
( SHORT ) hb_itemGetNI( pRight ),
|
||||
( BYTE * ) ( *pszBox ? pszBox : " " ),
|
||||
( const BYTE * ) ( *pszBox ? pszBox : " " ),
|
||||
iColor );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -208,7 +208,7 @@ void hb_conOutStd( const char * pStr, ULONG ulLen )
|
||||
ulLen = strlen( pStr );
|
||||
|
||||
if( ulLen > 0 )
|
||||
hb_gtOutStd( ( BYTE * ) pStr, ulLen );
|
||||
hb_gtOutStd( ( const BYTE * ) pStr, ulLen );
|
||||
}
|
||||
|
||||
/* Output an item to STDERR */
|
||||
@@ -220,7 +220,7 @@ void hb_conOutErr( const char * pStr, ULONG ulLen )
|
||||
ulLen = strlen( pStr );
|
||||
|
||||
if( ulLen > 0 )
|
||||
hb_gtOutErr( ( BYTE * ) pStr, ulLen );
|
||||
hb_gtOutErr( ( const BYTE * ) pStr, ulLen );
|
||||
}
|
||||
|
||||
/* Output an item to the screen and/or printer and/or alternate */
|
||||
@@ -231,24 +231,24 @@ void hb_conOutAlt( const char * pStr, ULONG ulLen )
|
||||
HB_TRACE(HB_TR_DEBUG, ("hb_conOutAlt(%s, %lu)", pStr, ulLen));
|
||||
|
||||
if( hb_setGetConsole() )
|
||||
hb_gtWriteCon( ( BYTE * ) pStr, ulLen );
|
||||
hb_gtWriteCon( ( const BYTE * ) pStr, ulLen );
|
||||
|
||||
if( hb_setGetAlternate() && ( hFile = hb_setGetAltHan() ) != FS_ERROR )
|
||||
{
|
||||
/* Print to alternate file if SET ALTERNATE ON and valid alternate file */
|
||||
hb_fsWriteLarge( hFile, ( BYTE * ) pStr, ulLen );
|
||||
hb_fsWriteLarge( hFile, ( const BYTE * ) pStr, ulLen );
|
||||
}
|
||||
|
||||
if( ( hFile = hb_setGetExtraHan() ) != FS_ERROR )
|
||||
{
|
||||
/* Print to extra file if valid alternate file */
|
||||
hb_fsWriteLarge( hFile, ( BYTE * ) pStr, ulLen );
|
||||
hb_fsWriteLarge( hFile, ( const BYTE * ) pStr, ulLen );
|
||||
}
|
||||
|
||||
if( ( hFile = hb_setGetPrinterHandle( HB_SET_PRN_CON ) ) != FS_ERROR )
|
||||
{
|
||||
/* Print to printer if SET PRINTER ON and valid printer file */
|
||||
hb_fsWriteLarge( hFile, ( BYTE * ) pStr, ulLen );
|
||||
hb_fsWriteLarge( hFile, ( const BYTE * ) pStr, ulLen );
|
||||
hb_prnPos()->col += ( USHORT ) ulLen;
|
||||
}
|
||||
}
|
||||
@@ -263,12 +263,12 @@ static void hb_conOutDev( const char * pStr, ULONG ulLen )
|
||||
if( ( hFile = hb_setGetPrinterHandle( HB_SET_PRN_DEV ) ) != FS_ERROR )
|
||||
{
|
||||
/* Display to printer if SET DEVICE TO PRINTER and valid printer file */
|
||||
hb_fsWriteLarge( hFile, ( BYTE * ) pStr, ulLen );
|
||||
hb_fsWriteLarge( hFile, ( const BYTE * ) pStr, ulLen );
|
||||
hb_prnPos()->col += ( USHORT ) ulLen;
|
||||
}
|
||||
else
|
||||
/* Otherwise, display to console */
|
||||
hb_gtWrite( ( BYTE * ) pStr, ulLen );
|
||||
hb_gtWrite( ( const BYTE * ) pStr, ulLen );
|
||||
}
|
||||
|
||||
static char * hb_itemStringCon( PHB_ITEM pItem, ULONG * pulLen, BOOL * pfFreeReq )
|
||||
@@ -539,7 +539,7 @@ HB_FUNC( DISPOUT ) /* writes a single value to the screen, but is not affected b
|
||||
|
||||
pszString = hb_itemStringCon( hb_param( 1, HB_IT_ANY ), &ulLen, &bFreeReq );
|
||||
|
||||
hb_gtWrite( ( BYTE * ) pszString, ulLen );
|
||||
hb_gtWrite( ( const BYTE * ) pszString, ulLen );
|
||||
|
||||
if( bFreeReq )
|
||||
hb_xfree( pszString );
|
||||
@@ -550,7 +550,7 @@ HB_FUNC( DISPOUT ) /* writes a single value to the screen, but is not affected b
|
||||
{
|
||||
pszString = hb_itemStringCon( hb_param( 1, HB_IT_ANY ), &ulLen, &bFreeReq );
|
||||
|
||||
hb_gtWrite( ( BYTE * ) pszString, ulLen );
|
||||
hb_gtWrite( ( const BYTE * ) pszString, ulLen );
|
||||
|
||||
if( bFreeReq )
|
||||
hb_xfree( pszString );
|
||||
@@ -576,7 +576,7 @@ HB_FUNC( DISPOUTAT ) /* writes a single value to the screen at speficic position
|
||||
|
||||
pszString = hb_itemStringCon( hb_param( 3, HB_IT_ANY ), &ulLen, &bFreeReq );
|
||||
|
||||
hb_gtWriteAt( ( USHORT ) hb_parni( 1 ), ( USHORT ) hb_parni( 2 ), ( BYTE * ) pszString, ulLen );
|
||||
hb_gtWriteAt( ( USHORT ) hb_parni( 1 ), ( USHORT ) hb_parni( 2 ), ( const BYTE * ) pszString, ulLen );
|
||||
|
||||
if( bFreeReq )
|
||||
hb_xfree( pszString );
|
||||
@@ -587,7 +587,7 @@ HB_FUNC( DISPOUTAT ) /* writes a single value to the screen at speficic position
|
||||
{
|
||||
pszString = hb_itemStringCon( hb_param( 3, HB_IT_ANY ), &ulLen, &bFreeReq );
|
||||
|
||||
hb_gtWriteAt( ( USHORT ) hb_parni( 1 ), ( USHORT ) hb_parni( 2 ), ( BYTE * ) pszString, ulLen );
|
||||
hb_gtWriteAt( ( USHORT ) hb_parni( 1 ), ( USHORT ) hb_parni( 2 ), ( const BYTE * ) pszString, ulLen );
|
||||
|
||||
if( bFreeReq )
|
||||
hb_xfree( pszString );
|
||||
@@ -614,7 +614,7 @@ HB_FUNC( HB_DISPOUTAT )
|
||||
else
|
||||
iColor = -1;
|
||||
|
||||
hb_gtPutText( ( USHORT ) hb_parni( 1 ), ( USHORT ) hb_parni( 2 ), ( BYTE * ) pszString, ulLen, iColor );
|
||||
hb_gtPutText( ( USHORT ) hb_parni( 1 ), ( USHORT ) hb_parni( 2 ), ( const BYTE * ) pszString, ulLen, iColor );
|
||||
|
||||
if( bFreeReq )
|
||||
hb_xfree( pszString );
|
||||
|
||||
@@ -56,18 +56,18 @@
|
||||
#include "hbapilng.h"
|
||||
#include "hbdate.h"
|
||||
|
||||
char * hb_dateCMonth( int iMonth )
|
||||
const char * hb_dateCMonth( int iMonth )
|
||||
{
|
||||
HB_TRACE(HB_TR_DEBUG, ("hb_dateCMonth(%d)", iMonth));
|
||||
|
||||
return ( iMonth >= 1 && iMonth <= 12 ) ? ( char * ) hb_langDGetItem( HB_LANG_ITEM_BASE_MONTH + iMonth - 1 ) : ( char * ) "";
|
||||
return ( iMonth >= 1 && iMonth <= 12 ) ? hb_langDGetItem( HB_LANG_ITEM_BASE_MONTH + iMonth - 1 ) : "";
|
||||
}
|
||||
|
||||
char * hb_dateCDOW( int iDay )
|
||||
const char * hb_dateCDOW( int iDay )
|
||||
{
|
||||
HB_TRACE(HB_TR_DEBUG, ("hb_dateCDOW(%d)", iDay));
|
||||
|
||||
return ( iDay >= 1 && iDay <= 7 ) ? ( char * ) hb_langDGetItem( HB_LANG_ITEM_BASE_DAY + iDay - 1 ) : ( char * ) "";
|
||||
return ( iDay >= 1 && iDay <= 7 ) ? hb_langDGetItem( HB_LANG_ITEM_BASE_DAY + iDay - 1 ) : "";
|
||||
}
|
||||
|
||||
HB_FUNC( CMONTH )
|
||||
|
||||
@@ -948,7 +948,7 @@ PHB_ITEM hb_errRT_New(
|
||||
hb_errPutSubSystem( pError, szSubSystem ? szSubSystem : HB_ERR_SS_BASE );
|
||||
hb_errPutGenCode( pError, ( USHORT ) ulGenCode );
|
||||
hb_errPutSubCode( pError, ( USHORT ) ulSubCode );
|
||||
hb_errPutDescription( pError, szDescription ? szDescription : ( const char * ) hb_langDGetItem( HB_LANG_ITEM_BASE_ERRDESC + ulGenCode ) );
|
||||
hb_errPutDescription( pError, szDescription ? szDescription : hb_langDGetItem( HB_LANG_ITEM_BASE_ERRDESC + ulGenCode ) );
|
||||
hb_errPutOperation( pError, szOperation ? szOperation : "" );
|
||||
hb_errPutOsCode( pError, uiOsCode );
|
||||
hb_errPutFlags( pError, uiFlags );
|
||||
@@ -972,7 +972,7 @@ PHB_ITEM hb_errRT_New_Subst(
|
||||
hb_errPutSubSystem( pError, szSubSystem ? szSubSystem : HB_ERR_SS_BASE );
|
||||
hb_errPutGenCode( pError, ( USHORT ) ulGenCode );
|
||||
hb_errPutSubCode( pError, ( USHORT ) ulSubCode );
|
||||
hb_errPutDescription( pError, szDescription ? szDescription : ( const char * ) hb_langDGetItem( HB_LANG_ITEM_BASE_ERRDESC + ulGenCode ) );
|
||||
hb_errPutDescription( pError, szDescription ? szDescription : hb_langDGetItem( HB_LANG_ITEM_BASE_ERRDESC + ulGenCode ) );
|
||||
hb_errPutOperation( pError, szOperation ? szOperation : "" );
|
||||
hb_errPutOsCode( pError, uiOsCode );
|
||||
hb_errPutFlags( pError, ( USHORT ) ( uiFlags | EF_CANSUBSTITUTE ) );
|
||||
|
||||
@@ -353,7 +353,7 @@ PHB_FILE hb_fileExtOpen( const char * pFilename, const char * pDefExt,
|
||||
|
||||
if( pError )
|
||||
{
|
||||
hb_errPutFileName( pError, ( char * ) pszFile );
|
||||
hb_errPutFileName( pError, pszFile );
|
||||
if( !fResult )
|
||||
{
|
||||
hb_errPutOsCode( pError, hb_fsError() );
|
||||
|
||||
@@ -204,7 +204,7 @@ HB_FUNC( HB_KEYPUT )
|
||||
}
|
||||
else if( type & HB_IT_STRING )
|
||||
{
|
||||
hb_inkeySetText( ( const char * ) hb_arrayGetCPtr( pArray, ulIndex ), hb_arrayGetCLen( pArray, ulIndex ) );
|
||||
hb_inkeySetText( hb_arrayGetCPtr( pArray, ulIndex ), hb_arrayGetCLen( pArray, ulIndex ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -236,7 +236,7 @@ HB_FUNC( HB_KEYINS )
|
||||
}
|
||||
else if( type & HB_IT_STRING )
|
||||
{
|
||||
hb_inkeySetText( ( const char * ) hb_arrayGetCPtr( pArray, ulIndex ), hb_arrayGetCLen( pArray, ulIndex ) );
|
||||
hb_inkeySetText( hb_arrayGetCPtr( pArray, ulIndex ), hb_arrayGetCLen( pArray, ulIndex ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -345,9 +345,9 @@ char * hb_langName( void )
|
||||
{
|
||||
pszName = ( char * ) hb_xgrab( 128 );
|
||||
hb_snprintf( pszName, 128, "Harbour Language: %s %s (%s)",
|
||||
( const char * ) hb_langDGetItem( HB_LANG_ITEM_BASE_ID + HB_LANG_ITEM_ID_ID ),
|
||||
( const char * ) hb_langDGetItem( HB_LANG_ITEM_BASE_ID + HB_LANG_ITEM_ID_NAME ),
|
||||
( const char * ) hb_langDGetItem( HB_LANG_ITEM_BASE_ID + HB_LANG_ITEM_ID_NAMENAT ) );
|
||||
hb_langDGetItem( HB_LANG_ITEM_BASE_ID + HB_LANG_ITEM_ID_ID ),
|
||||
hb_langDGetItem( HB_LANG_ITEM_BASE_ID + HB_LANG_ITEM_ID_NAME ),
|
||||
hb_langDGetItem( HB_LANG_ITEM_BASE_ID + HB_LANG_ITEM_ID_NAMENAT ) );
|
||||
}
|
||||
else
|
||||
pszName = hb_strdup( "Harbour Language: (not installed)" );
|
||||
|
||||
@@ -134,7 +134,7 @@ static BOOL hb_memowrit( BOOL bHandleEOF )
|
||||
{
|
||||
ULONG ulSize = hb_itemGetCLen( pString );
|
||||
|
||||
bRetVal = ( hb_fsWriteLarge( fhnd, ( BYTE * ) hb_itemGetCPtr( pString ), ulSize ) == ulSize );
|
||||
bRetVal = ( hb_fsWriteLarge( fhnd, ( const BYTE * ) hb_itemGetCPtr( pString ), ulSize ) == ulSize );
|
||||
|
||||
/* NOTE: CA-Cl*pper will add the EOF even if the write failed. [vszakats] */
|
||||
/* NOTE: CA-Cl*pper will not return .F. when the EOF could not be written. [vszakats] */
|
||||
|
||||
@@ -242,15 +242,15 @@ HB_FUNC( FREADSTR )
|
||||
if( ulToRead > 0 )
|
||||
{
|
||||
HB_FHANDLE fhnd = ( HB_FHANDLE ) hb_parni( 1 );
|
||||
BYTE * buffer = ( BYTE * ) hb_xgrab( ulToRead + 1 );
|
||||
char * buffer = ( char * ) hb_xgrab( ulToRead + 1 );
|
||||
ULONG ulRead;
|
||||
|
||||
ulRead = hb_fsReadLarge( fhnd, buffer, ulToRead );
|
||||
ulRead = hb_fsReadLarge( fhnd, ( BYTE * ) buffer, ulToRead );
|
||||
uiError = hb_fsError();
|
||||
buffer[ ulRead ] = '\0';
|
||||
|
||||
/* NOTE: Clipper will not return zero chars from this functions. */
|
||||
hb_retc_buffer( ( char * ) buffer );
|
||||
hb_retc_buffer( buffer );
|
||||
}
|
||||
else
|
||||
hb_retc( NULL );
|
||||
|
||||
@@ -120,6 +120,6 @@ HB_FUNC( RESTSCREEN )
|
||||
hb_getScreenRange( &uiTop, &uiBottom, fNoCheck, TRUE );
|
||||
hb_getScreenRange( &uiLeft, &uiRight, fNoCheck, FALSE );
|
||||
|
||||
hb_gtRest( uiTop, uiLeft, uiBottom, uiRight, ( void * ) hb_parc( 5 ) );
|
||||
hb_gtRest( uiTop, uiLeft, uiBottom, uiRight, ( const void * ) hb_parc( 5 ) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1601,41 +1601,40 @@ FUNCTION hbmk( aArgs, /* @ */ lPause, /* @ */ lUTF8 )
|
||||
CASE Left( cParamL, Len( "-instpath=" ) ) == "-instpath=" .AND. ;
|
||||
Len( cParamL ) > Len( "-instpath=" )
|
||||
|
||||
cParam := PathProc( MacroProc( hbmk, tmp := ArchCompFilter( hbmk, SubStr( cParam, Len( "-instpath=" ) + 1 ) ), aParam[ _PAR_cFileName ] ), aParam[ _PAR_cFileName ] )
|
||||
cParam := PathNormalize( PathSepToSelf( PathProc( MacroProc( hbmk, tmp := ArchCompFilter( hbmk, SubStr( cParam, Len( "-instpath=" ) + 1 ) ), aParam[ _PAR_cFileName ] ), aParam[ _PAR_cFileName ] ) ) )
|
||||
IF ! Empty( cParam )
|
||||
AAdd( hbmk[ _HBMK_aINSTPATH ], PathSepToTarget( hbmk, cParam ) )
|
||||
IF AScan( hbmk[ _HBMK_aINSTPATH ], {|tmp| tmp == cParam } ) == 0
|
||||
AAdd( hbmk[ _HBMK_aINSTPATH ], PathSepToTarget( hbmk, cParam ) )
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
CASE Left( cParamL, Len( "-incpath=" ) ) == "-incpath=" .AND. ;
|
||||
Len( cParamL ) > Len( "-incpath=" )
|
||||
|
||||
cParam := PathProc( MacroProc( hbmk, tmp := ArchCompFilter( hbmk, SubStr( cParam, Len( "-incpath=" ) + 1 ) ), aParam[ _PAR_cFileName ] ), aParam[ _PAR_cFileName ] )
|
||||
cParam := PathNormalize( PathSepToSelf( PathProc( MacroProc( hbmk, tmp := ArchCompFilter( hbmk, SubStr( cParam, Len( "-incpath=" ) + 1 ) ), aParam[ _PAR_cFileName ] ), aParam[ _PAR_cFileName ] ) ) )
|
||||
IF ! Empty( cParam )
|
||||
cParam := PathSepToTarget( hbmk, cParam )
|
||||
IF AScan( hbmk[ _HBMK_aINCPATH ], {|tmp| tmp == cParam } ) == 0
|
||||
AAdd( hbmk[ _HBMK_aINCPATH ], cParam )
|
||||
AAdd( hbmk[ _HBMK_aINCPATH ], PathSepToTarget( hbmk, cParam ) )
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
CASE Left( cParamL, Len( "-inctrypath=" ) ) == "-inctrypath=" .AND. ;
|
||||
Len( cParamL ) > Len( "-inctrypath=" )
|
||||
|
||||
cParam := PathProc( MacroProc( hbmk, tmp := ArchCompFilter( hbmk, SubStr( cParam, Len( "-inctrypath=" ) + 1 ) ), aParam[ _PAR_cFileName ] ), aParam[ _PAR_cFileName ] )
|
||||
cParam := PathNormalize( PathSepToSelf( PathProc( MacroProc( hbmk, tmp := ArchCompFilter( hbmk, SubStr( cParam, Len( "-inctrypath=" ) + 1 ) ), aParam[ _PAR_cFileName ] ), aParam[ _PAR_cFileName ] ) ) )
|
||||
IF ! Empty( cParam )
|
||||
cParam := PathSepToTarget( hbmk, cParam )
|
||||
IF AScan( hbmk[ _HBMK_aINCTRYPATH ], {|tmp| tmp == cParam } ) == 0
|
||||
AAdd( hbmk[ _HBMK_aINCTRYPATH ], cParam )
|
||||
AAdd( hbmk[ _HBMK_aINCTRYPATH ], PathSepToTarget( hbmk, cParam ) )
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
CASE Left( cParamL, 2 ) == "-i" .AND. ;
|
||||
Len( cParamL ) > 2
|
||||
|
||||
cParam := PathProc( MacroProc( hbmk, tmp := ArchCompFilter( hbmk, SubStr( cParam, 3 ) ), aParam[ _PAR_cFileName ] ), aParam[ _PAR_cFileName ] )
|
||||
cParam := PathNormalize( PathSepToSelf( PathProc( MacroProc( hbmk, tmp := ArchCompFilter( hbmk, SubStr( cParam, 3 ) ), aParam[ _PAR_cFileName ] ), aParam[ _PAR_cFileName ] ) ) )
|
||||
IF ! Empty( cParam )
|
||||
cParam := PathSepToTarget( hbmk, cParam )
|
||||
IF AScan( hbmk[ _HBMK_aINCPATH ], {|tmp| tmp == cParam } ) == 0
|
||||
AAdd( hbmk[ _HBMK_aINCPATH ], cParam )
|
||||
AAdd( hbmk[ _HBMK_aINCPATH ], PathSepToTarget( hbmk, cParam ) )
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
@@ -5103,9 +5102,8 @@ STATIC FUNCTION HBC_ProcessOne( hbmk, cFileName, nNestingLevel )
|
||||
|
||||
CASE Lower( Left( cLine, Len( "libpaths=" ) ) ) == "libpaths=" ; cLine := SubStr( cLine, Len( "libpaths=" ) + 1 )
|
||||
FOR EACH cItem IN hb_ATokens( cLine,, .T. )
|
||||
cItem := PathProc( MacroProc( hbmk, StrStripQuote( cItem ), cFileName ), FN_DirGet( cFileName ) )
|
||||
cItem := PathNormalize( PathSepToSelf( PathProc( MacroProc( hbmk, StrStripQuote( cItem ), cFileName ), FN_DirGet( cFileName ) ) ) )
|
||||
IF ! Empty( cItem )
|
||||
cItem := PathNormalize( PathSepToSelf( cItem ) )
|
||||
IF AScan( hbmk[ _HBMK_aLIBPATH ], {|tmp| tmp == cItem } ) == 0
|
||||
AAdd( hbmk[ _HBMK_aLIBPATH ], PathSepToTarget( hbmk, cItem ) )
|
||||
ENDIF
|
||||
@@ -5114,9 +5112,8 @@ STATIC FUNCTION HBC_ProcessOne( hbmk, cFileName, nNestingLevel )
|
||||
|
||||
CASE Lower( Left( cLine, Len( "incpaths=" ) ) ) == "incpaths=" ; cLine := SubStr( cLine, Len( "incpaths=" ) + 1 )
|
||||
FOR EACH cItem IN hb_ATokens( cLine,, .T. )
|
||||
cItem := PathProc( MacroProc( hbmk, StrStripQuote( cItem ), cFileName ), FN_DirGet( cFileName ) )
|
||||
cItem := PathNormalize( PathSepToSelf( PathProc( MacroProc( hbmk, StrStripQuote( cItem ), cFileName ), FN_DirGet( cFileName ) ) ) )
|
||||
IF ! Empty( cItem )
|
||||
cItem := PathNormalize( PathSepToSelf( cItem ) )
|
||||
IF AScan( hbmk[ _HBMK_aINCPATH ], {|tmp| tmp == cItem } ) == 0
|
||||
AAdd( hbmk[ _HBMK_aINCPATH ], PathSepToTarget( hbmk, cItem ) )
|
||||
ENDIF
|
||||
@@ -5125,9 +5122,8 @@ STATIC FUNCTION HBC_ProcessOne( hbmk, cFileName, nNestingLevel )
|
||||
|
||||
CASE Lower( Left( cLine, Len( "inctrypaths=" ) ) ) == "inctrypaths=" ; cLine := SubStr( cLine, Len( "inctrypaths=" ) + 1 )
|
||||
FOR EACH cItem IN hb_ATokens( cLine,, .T. )
|
||||
cItem := PathProc( MacroProc( hbmk, StrStripQuote( cItem ), cFileName ), FN_DirGet( cFileName ) )
|
||||
cItem := PathNormalize( PathSepToSelf( PathProc( MacroProc( hbmk, StrStripQuote( cItem ), cFileName ), FN_DirGet( cFileName ) ) ) )
|
||||
IF ! Empty( cItem )
|
||||
cItem := PathNormalize( PathSepToSelf( cItem ) )
|
||||
IF AScan( hbmk[ _HBMK_aINCTRYPATH ], {|tmp| tmp == cItem } ) == 0
|
||||
AAdd( hbmk[ _HBMK_aINCTRYPATH ], PathSepToTarget( hbmk, cItem ) )
|
||||
ENDIF
|
||||
@@ -5136,9 +5132,8 @@ STATIC FUNCTION HBC_ProcessOne( hbmk, cFileName, nNestingLevel )
|
||||
|
||||
CASE Lower( Left( cLine, Len( "instpaths=" ) ) ) == "instpaths=" ; cLine := SubStr( cLine, Len( "instpaths=" ) + 1 )
|
||||
FOR EACH cItem IN hb_ATokens( cLine,, .T. )
|
||||
cItem := PathProc( MacroProc( hbmk, StrStripQuote( cItem ), cFileName ), FN_DirGet( cFileName ) )
|
||||
cItem := PathNormalize( PathSepToSelf( PathProc( MacroProc( hbmk, StrStripQuote( cItem ), cFileName ), FN_DirGet( cFileName ) ) ) )
|
||||
IF ! Empty( cItem )
|
||||
cItem := PathNormalize( PathSepToSelf( cItem ) )
|
||||
IF AScan( hbmk[ _HBMK_aINSTPATH ], {|tmp| tmp == cItem } ) == 0
|
||||
AAdd( hbmk[ _HBMK_aINSTPATH ], PathSepToTarget( hbmk, cItem ) )
|
||||
ENDIF
|
||||
|
||||
Reference in New Issue
Block a user