diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 566c08e922..8ecbde0b5a 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,23 @@ The license applies to all entries newer than 2009-04-28. */ +2011-04-27 17:46 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * contrib/hbmxml/3rd/minixml/config.h + ! yet another bcc problem. my last after the last. + anyone to pick up fixing bcc bugs? + + * config/detect.mk + - exclude slang/curses/x11 for android + + * contrib/hbct/strdiff.c + * contrib/hbct/dattime3.c + * uncrustified + + * contrib/hbct/misc2.c + * contrib/hbct/token1.c + * contrib/hbct/print.c + * formatted + 2011-04-27 11:59 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * contrib/hbqt/hbmk2_qt.hbs * contrib/hbqt/qtgui/hbqtgui.h diff --git a/harbour/config/detect.mk b/harbour/config/detect.mk index 59a560d290..a755ff3724 100644 --- a/harbour/config/detect.mk +++ b/harbour/config/detect.mk @@ -83,7 +83,7 @@ include $(TOP)$(ROOT)config/detfun.mk _DET_DSP_NAME := slang _DET_VAR_INC_ := HB_INC_SLANG _DET_VAR_HAS_ := HB_HAS_SLANG -_DET_FLT_PLAT := +_DET_FLT_PLAT := !android _DET_FLT_COMP := _DET_INC_DEFP := _DET_INC_HEAD := /slang.h @@ -101,7 +101,7 @@ include $(TOP)$(ROOT)config/detfun.mk _DET_DSP_NAME := curses _DET_VAR_INC_ := HB_INC_CURSES _DET_VAR_HAS_ := HB_HAS_CURSES -_DET_FLT_PLAT := !os2 !minix +_DET_FLT_PLAT := !os2 !minix !android _DET_FLT_COMP := _DET_INC_DEFP := /usr/include /usr/include/ncurses /usr/local/include /sw/include /opt/local/include /boot/develop/headers/3rdparty _DET_INC_HEAD := /curses.h @@ -117,7 +117,7 @@ include $(TOP)$(ROOT)config/detfun.mk _DET_DSP_NAME := x11 _DET_VAR_INC_ := HB_INC_X11 _DET_VAR_HAS_ := HB_HAS_X11 -_DET_FLT_PLAT := +_DET_FLT_PLAT := !android _DET_FLT_COMP := _DET_INC_DEFP := /usr/include /usr/local/include /usr/X11R6/include /usr/pkg/include /usr/pkg/X11R6/include _DET_INC_HEAD := /X11/Xlib.h diff --git a/harbour/contrib/hbct/dattime3.c b/harbour/contrib/hbct/dattime3.c index f1095ed492..2ed03481d1 100644 --- a/harbour/contrib/hbct/dattime3.c +++ b/harbour/contrib/hbct/dattime3.c @@ -65,8 +65,8 @@ #include /* TODO: make it MT safe */ -static double s_dTimeSet = 0; -static double s_dTimeCounter = 0; +static double s_dTimeSet = 0; +static double s_dTimeCounter = 0; HB_FUNC( WAITPERIOD ) { @@ -74,8 +74,8 @@ HB_FUNC( WAITPERIOD ) if( hb_pcount() > 0 ) { - s_dTimeSet = d; - s_dTimeCounter = d + hb_parnd( 1 ) / 100.0; + s_dTimeSet = d; + s_dTimeCounter = d + hb_parnd( 1 ) / 100.0; } if( d < s_dTimeSet ) @@ -90,22 +90,22 @@ static HB_BOOL _hb_timeValid( const char * szTime, HB_SIZE nLen, int * piDecode if( nLen == 2 || nLen == 5 || nLen == 8 || nLen == 11 ) { - static const int s_iMax[] = { 23, 59, 59, 99 }; - int i, iVal; - HB_SIZE ul; + static const int s_iMax[] = { 23, 59, 59, 99 }; + int i, iVal; + HB_SIZE ul; fValid = HB_TRUE; for( ul = 0; fValid && ul < nLen; ++ul ) { - fValid = ul % 3 == 2 ? szTime[ul] == ':' : - ( szTime[ul] >= '0' && szTime[ul] <= '9' ); + fValid = ul % 3 == 2 ? szTime[ ul ] == ':' : + ( szTime[ ul ] >= '0' && szTime[ ul ] <= '9' ); } for( ul = 0, i = 0; fValid && ul < nLen; ul += 3, ++i ) { - iVal = 10 * ( szTime[ul] - '0' ) + ( szTime[ul + 1] - '0' ); - fValid = iVal <= s_iMax[i]; + iVal = 10 * ( szTime[ ul ] - '0' ) + ( szTime[ ul + 1 ] - '0' ); + fValid = iVal <= s_iMax[ i ]; if( piDecode ) - piDecode[i] = iVal; + piDecode[ i ] = iVal; } } @@ -119,29 +119,29 @@ HB_FUNC( TIMEVALID ) HB_FUNC( SETTIME ) { - HB_BOOL fResult = HB_FALSE; - int iTime[4]; + HB_BOOL fResult = HB_FALSE; + int iTime[ 4 ]; - iTime[0] = iTime[1] = iTime[2] = iTime[3] = 0; + iTime[ 0 ] = iTime[ 1 ] = iTime[ 2 ] = iTime[ 3 ] = 0; if( _hb_timeValid( hb_parc( 1 ), hb_parclen( 1 ), iTime ) ) { #if defined( HB_OS_WIN ) SYSTEMTIME st; GetLocalTime( &st ); - st.wHour = ( WORD ) iTime[0]; - st.wMinute = ( WORD ) iTime[1]; - st.wSecond = ( WORD ) iTime[2]; - st.wMilliseconds = ( WORD ) iTime[3] * 10; - fResult = SetLocalTime( &st ); -#elif defined( HB_OS_LINUX ) && !defined( HB_OS_ANDROID ) && !defined( __WATCOMC__ ) + st.wHour = ( WORD ) iTime[ 0 ]; + st.wMinute = ( WORD ) iTime[ 1 ]; + st.wSecond = ( WORD ) iTime[ 2 ]; + st.wMilliseconds = ( WORD ) iTime[ 3 ] * 10; + fResult = SetLocalTime( &st ); +#elif defined( HB_OS_LINUX ) && ! defined( HB_OS_ANDROID ) && ! defined( __WATCOMC__ ) /* stime exists only in SVr4, SVID, X/OPEN and Linux */ HB_ULONG lNewTime; - time_t tm; + time_t tm; - lNewTime = iTime[0] * 3600 + iTime[1] * 60 + iTime[2]; - tm = time( NULL ); - tm += lNewTime - ( tm % 86400 ); - fResult = stime( &tm ) == 0; + lNewTime = iTime[ 0 ] * 3600 + iTime[ 1 ] * 60 + iTime[ 2 ]; + tm = time( NULL ); + tm += lNewTime - ( tm % 86400 ); + fResult = stime( &tm ) == 0; #endif } @@ -150,8 +150,8 @@ HB_FUNC( SETTIME ) HB_FUNC( SETDATE ) { - HB_BOOL fResult = HB_FALSE; - long lDate = hb_pardl( 1 ); + HB_BOOL fResult = HB_FALSE; + long lDate = hb_pardl( 1 ); if( lDate ) { @@ -167,16 +167,16 @@ HB_FUNC( SETDATE ) st.wMonth = ( WORD ) iMonth; st.wDay = ( WORD ) iDay; st.wDayOfWeek = ( WORD ) hb_dateJulianDOW( lDate ); - fResult = SetLocalTime( &st ); -#elif defined( HB_OS_LINUX ) && !defined( HB_OS_ANDROID ) && !defined( __WATCOMC__ ) + fResult = SetLocalTime( &st ); +#elif defined( HB_OS_LINUX ) && ! defined( HB_OS_ANDROID ) && ! defined( __WATCOMC__ ) /* stime exists only in SVr4, SVID, X/OPEN and Linux */ - long lNewDate; - time_t tm; + long lNewDate; + time_t tm; - lNewDate = lDate - hb_dateEncode( 1970, 1, 1 ); - tm = time( NULL ); - tm = lNewDate * 86400 + ( tm % 86400 ); - fResult = stime( &tm ) == 0; + lNewDate = lDate - hb_dateEncode( 1970, 1, 1 ); + tm = time( NULL ); + tm = lNewDate * 86400 + ( tm % 86400 ); + fResult = stime( &tm ) == 0; #endif } } diff --git a/harbour/contrib/hbct/misc2.c b/harbour/contrib/hbct/misc2.c index 50f68ea7b4..de27ab017c 100644 --- a/harbour/contrib/hbct/misc2.c +++ b/harbour/contrib/hbct/misc2.c @@ -69,7 +69,7 @@ HB_FUNC( COMPLEMENT ) char *szBuffer = ( char * ) hb_xgrab( nLen + 1 ); for( ulPos = 0; ulPos < nLen; ulPos++ ) - szBuffer[ulPos] = ~szSrc[ulPos]; + szBuffer[ ulPos ] = ~szSrc[ ulPos ]; hb_retclen_buffer( szBuffer, nLen ); } else diff --git a/harbour/contrib/hbct/print.c b/harbour/contrib/hbct/print.c index 2e79a7e093..72f351d781 100644 --- a/harbour/contrib/hbct/print.c +++ b/harbour/contrib/hbct/print.c @@ -120,7 +120,7 @@ HB_FUNC( PRINTSEND ) r.h.ah = 0; for( i = 0; i < len && !( r.h.ah & 1 ); i++ ) { - r.h.al = string[i]; + r.h.al = string[ i ]; __dpmi_int( 0x17, &r ); } if( r.h.ah & 1 ) diff --git a/harbour/contrib/hbct/strdiff.c b/harbour/contrib/hbct/strdiff.c index a19cc098bf..dd295f7ac9 100644 --- a/harbour/contrib/hbct/strdiff.c +++ b/harbour/contrib/hbct/strdiff.c @@ -55,14 +55,14 @@ #include "ct.h" #include -#define MATRIXELEMENT(__row,__col) *(piPenalty+((__row)*(sStrLen2+1))+(__col)) +#define MATRIXELEMENT( __row, __col ) *( piPenalty + ( ( __row ) * ( sStrLen2 + 1 ) ) + ( __col ) ) static int min3( int a, int b, int c ) { if( a < b ) - return ( a < c ? a : c ); + return a < c ? a : c; - return ( b < c ? b : c ); + return b < c ? b : c; } HB_FUNC( STRDIFF ) @@ -71,34 +71,34 @@ HB_FUNC( STRDIFF ) if( HB_ISCHAR( 1 ) || HB_ISCHAR( 2 ) ) { /* get parameters */ - const char *pcStr1, *pcStr2; - HB_SIZE sStrLen1, sStrLen2; - int iReplace, iDelete, iInsert; - int iAtLike = ct_getatlike(); - char cAtLike = ct_getatlikechar(); - int *piPenalty; - HB_SIZE sRowCnt, sColCnt; + const char * pcStr1, * pcStr2; + HB_SIZE sStrLen1, sStrLen2; + int iReplace, iDelete, iInsert; + int iAtLike = ct_getatlike(); + char cAtLike = ct_getatlikechar(); + int * piPenalty; + HB_SIZE sRowCnt, sColCnt; if( HB_ISCHAR( 1 ) ) { - pcStr1 = hb_parc( 1 ); - sStrLen1 = hb_parclen( 1 ); + pcStr1 = hb_parc( 1 ); + sStrLen1 = hb_parclen( 1 ); } else { - pcStr1 = ""; - sStrLen1 = 0; + pcStr1 = ""; + sStrLen1 = 0; } if( HB_ISCHAR( 2 ) ) { - pcStr2 = hb_parc( 2 ); - sStrLen2 = hb_parclen( 2 ); + pcStr2 = hb_parc( 2 ); + sStrLen2 = hb_parclen( 2 ); } else { - pcStr2 = ""; - sStrLen2 = 0; + pcStr2 = ""; + sStrLen2 = 0; } /* check for memory consumption */ @@ -133,10 +133,10 @@ HB_FUNC( STRDIFF ) else iInsert = 1; - piPenalty = ( int * ) hb_xgrab( ( sStrLen1 + 1 ) * - ( sStrLen2 + 1 ) * sizeof( int ) ); + piPenalty = ( int * ) hb_xgrab( ( sStrLen1 + 1 ) * + ( sStrLen2 + 1 ) * sizeof( int ) ); - MATRIXELEMENT( 0, 0 ) = 0; + MATRIXELEMENT( 0, 0 ) = 0; for( sColCnt = 0; sColCnt <= sStrLen2 - 1; sColCnt++ ) { MATRIXELEMENT( 0, sColCnt + 1 ) = MATRIXELEMENT( 0, sColCnt ) + iInsert; @@ -149,10 +149,10 @@ HB_FUNC( STRDIFF ) { int iReplaceCost; - if( pcStr1[sRowCnt] == pcStr2[sColCnt] || + if( pcStr1[ sRowCnt ] == pcStr2[ sColCnt ] || ( iAtLike == CT_SETATLIKE_WILDCARD && - ( pcStr1[sRowCnt] == cAtLike || - pcStr2[sColCnt] == cAtLike ) ) ) + ( pcStr1[ sRowCnt ] == cAtLike || + pcStr2[ sColCnt ] == cAtLike ) ) ) iReplaceCost = 0; else iReplaceCost = iReplace; @@ -169,8 +169,8 @@ HB_FUNC( STRDIFF ) } else /* HB_ISCHAR( 1 ) || HB_ISCHAR( 2 ) */ { - PHB_ITEM pSubst = NULL; - int iArgErrorMode = ct_getargerrormode(); + PHB_ITEM pSubst = NULL; + int iArgErrorMode = ct_getargerrormode(); if( iArgErrorMode != CT_ARGERR_IGNORE ) { diff --git a/harbour/contrib/hbct/token1.c b/harbour/contrib/hbct/token1.c index 54e3191459..75f2035f4d 100644 --- a/harbour/contrib/hbct/token1.c +++ b/harbour/contrib/hbct/token1.c @@ -185,7 +185,7 @@ static void do_token1( int iSwitch ) { s_iPreSeparator = s_iPostSeparator; if( sMatchedPos < sSeparatorStrLen ) - s_iPostSeparator = pcSeparatorStr[sMatchedPos]; + s_iPostSeparator = pcSeparatorStr[ sMatchedPos ]; else s_iPostSeparator = -1; } diff --git a/harbour/contrib/hbmxml/3rd/minixml/config.h b/harbour/contrib/hbmxml/3rd/minixml/config.h index e711b4fdd0..5e4fe1f879 100644 --- a/harbour/contrib/hbmxml/3rd/minixml/config.h +++ b/harbour/contrib/hbmxml/3rd/minixml/config.h @@ -54,7 +54,9 @@ * Long long support... */ +#ifndef __BORLANDC__ #define HAVE_LONG_LONG 1 +#endif /*