diff --git a/harbour/ChangeLog b/harbour/ChangeLog index f24b7af7f5..c38c2513ec 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,11 @@ +20000414-17:57 GMT-8 Ron Pinkas + + * source/compiler/harbour.c + * Corrected few Compiler warnings about type format + + * source/compiler/genc.c + * Corrected few Compiler warnings about possible unitilized iBytes. + 20000415-00:57 GMT+1 Victor Szakats * include/hbapilng.h @@ -56,15 +64,15 @@ * utils/hbtest/makefile ! runner lib removed from the GNU-make system + New dynamic Language API added. Runtime selection of language, compile - time selection of the default language, multiple language support in + time selection of the default language, multiple language support in the same executable. + NATMSG API now uses the Language API. + HBTEST is now setting the language to EN before doing the tests. * English and Hungarian 852 message modules converted to the new format, and added to the makefiles. - ; ! WARNING ! Please convert your language to the new format. Follow - MSG_TPL.C as a template. There are also some new items which should + ; ! WARNING ! Please convert your language to the new format. Follow + MSG_TPL.C as a template. There are also some new items which should be translated or adapted to your language. (Don't forget to add a comma after each string item) diff --git a/harbour/source/compiler/genc.c b/harbour/source/compiler/genc.c index 03e08886bf..9e930ffcde 100644 --- a/harbour/source/compiler/genc.c +++ b/harbour/source/compiler/genc.c @@ -363,7 +363,7 @@ void hb_compGenCCode( PHB_FNAME pFileName ) /* generates the C language ou fprintf( yyc, "\tHB_P_JUMP, %i, %i,", pFunc->pCode[ lPCodePos + 1 ], pFunc->pCode[ lPCodePos + 2 ] ); - if( hb_comp_bGenCVerbose ) fprintf( yyc, "\t/* %i (abs: %05li) */", sPos, lPCodePos + ( sPos ? sPos : 3 ) ); + if( hb_comp_bGenCVerbose ) fprintf( yyc, "\t/* %li (abs: %05li) */", sPos, lPCodePos + ( sPos ? sPos : 3 ) ); fprintf( yyc, "\n" ); } lPCodePos += 3; @@ -374,7 +374,7 @@ void hb_compGenCCode( PHB_FNAME pFileName ) /* generates the C language ou fprintf( yyc, "\tHB_P_JUMPFALSE, %i, %i,", pFunc->pCode[ lPCodePos + 1 ], pFunc->pCode[ lPCodePos + 2 ] ); - if( hb_comp_bGenCVerbose ) fprintf( yyc, "\t/* %i (abs: %05li) */", w, lPCodePos + ( w ? w : 3 ) ); + if( hb_comp_bGenCVerbose ) fprintf( yyc, "\t/* %li (abs: %05li) */", w, lPCodePos + ( w ? w : 3 ) ); fprintf( yyc, "\n" ); lPCodePos += 3; break; @@ -384,7 +384,7 @@ void hb_compGenCCode( PHB_FNAME pFileName ) /* generates the C language ou fprintf( yyc, "\tHB_P_JUMPTRUE, %i, %i,", pFunc->pCode[ lPCodePos + 1 ], pFunc->pCode[ lPCodePos + 2 ] ); - if( hb_comp_bGenCVerbose ) fprintf( yyc, "\t/* %i (abs: %05li) */", w, lPCodePos + ( w ? w : 3 ) ); + if( hb_comp_bGenCVerbose ) fprintf( yyc, "\t/* %li (abs: %05li) */", w, lPCodePos + ( w ? w : 3 ) ); fprintf( yyc, "\n" ); lPCodePos += 3; break; @@ -397,7 +397,7 @@ void hb_compGenCCode( PHB_FNAME pFileName ) /* generates the C language ou pFunc->pCode[ lPCodePos + 1 ], pFunc->pCode[ lPCodePos + 2 ], pFunc->pCode[ lPCodePos + 3 ] ); - if( hb_comp_bGenCVerbose ) fprintf( yyc, "\t/* %i (abs: %05li) */", lPos, lPCodePos + ( lPos ? lPos : 4 ) ); + if( hb_comp_bGenCVerbose ) fprintf( yyc, "\t/* %li (abs: %05li) */", lPos, lPCodePos + ( lPos ? lPos : 4 ) ); fprintf( yyc, "\n" ); } lPCodePos += 4; @@ -410,7 +410,7 @@ void hb_compGenCCode( PHB_FNAME pFileName ) /* generates the C language ou pFunc->pCode[ lPCodePos + 1 ], pFunc->pCode[ lPCodePos + 2 ], pFunc->pCode[ lPCodePos + 3 ] ); - if( hb_comp_bGenCVerbose ) fprintf( yyc, "\t/* %i (abs: %05li) */", lPos, lPCodePos + ( lPos ? lPos : 4 ) ); + if( hb_comp_bGenCVerbose ) fprintf( yyc, "\t/* %li (abs: %05li) */", lPos, lPCodePos + ( lPos ? lPos : 4 ) ); fprintf( yyc, "\n" ); } lPCodePos += 4; @@ -423,7 +423,7 @@ void hb_compGenCCode( PHB_FNAME pFileName ) /* generates the C language ou pFunc->pCode[ lPCodePos + 1 ], pFunc->pCode[ lPCodePos + 2 ], pFunc->pCode[ lPCodePos + 3 ] ); - if( hb_comp_bGenCVerbose ) fprintf( yyc, "\t/* %i (abs: %05li) */", lPos, lPCodePos + ( lPos ? lPos : 4 ) ); + if( hb_comp_bGenCVerbose ) fprintf( yyc, "\t/* %li (abs: %05li) */", lPos, lPCodePos + ( lPos ? lPos : 4 ) ); fprintf( yyc, "\n" ); } lPCodePos += 4; diff --git a/harbour/source/compiler/harbour.c b/harbour/source/compiler/harbour.c index ce7fc009d6..85b250a486 100644 --- a/harbour/source/compiler/harbour.c +++ b/harbour/source/compiler/harbour.c @@ -1244,14 +1244,13 @@ USHORT hb_compFunctionGetPos( char * szFunctionName ) /* return 0 if not found o ULONG hb_compGenJump( LONG lOffset ) { - int iBytes; + int iBytes = 3; /* Just a place holder, it might be a far jump...*/ if ( lOffset == 0 ) { hb_compGenPCode3( HB_P_JUMPFAR, 0, 0 ); hb_compGenPCode1( 0 ); - iBytes = 3; } else if ( lOffset >= SHRT_MIN && lOffset <= SHRT_MAX ) { @@ -1262,7 +1261,6 @@ ULONG hb_compGenJump( LONG lOffset ) { hb_compGenPCode3( HB_P_JUMPFAR, HB_LOBYTE( lOffset ), HB_HIBYTE( lOffset ) ); hb_compGenPCode1( ( BYTE ) ( ( ( USHORT ) ( lOffset ) >> 16 ) & 0xFF ) ); - iBytes = 3; } else { @@ -1274,14 +1272,13 @@ ULONG hb_compGenJump( LONG lOffset ) ULONG hb_compGenJumpFalse( LONG lOffset ) { - int iBytes; + int iBytes = 3; /* Just a place holder, it might be a far jump...*/ if ( lOffset == 0 ) { hb_compGenPCode3( HB_P_JUMPFARFALSE, 0, 0 ); hb_compGenPCode1( 0 ); - iBytes = 3; } else if ( lOffset >= SHRT_MIN && lOffset <= SHRT_MAX ) { @@ -1292,7 +1289,6 @@ ULONG hb_compGenJumpFalse( LONG lOffset ) { hb_compGenPCode3( HB_P_JUMPFARFALSE, HB_LOBYTE( lOffset ), HB_HIBYTE( lOffset ) ); hb_compGenPCode1( ( BYTE ) ( ( ( USHORT ) ( lOffset ) >> 16 ) & 0xFF ) ); - iBytes = 3; } else { @@ -1383,14 +1379,13 @@ void hb_compGenJumpHere( ULONG ulOffset ) ULONG hb_compGenJumpTrue( LONG lOffset ) { - int iBytes; + int iBytes = 3; /* Just a place holder, it might be a far jump...*/ if ( lOffset == 0 ) { hb_compGenPCode3( HB_P_JUMPFARTRUE, 0, 0 ); hb_compGenPCode1( 0 ); - iBytes = 3; } if ( lOffset >= SHRT_MIN && lOffset <= SHRT_MAX ) { @@ -1401,7 +1396,6 @@ ULONG hb_compGenJumpTrue( LONG lOffset ) { hb_compGenPCode3( HB_P_JUMPFARTRUE, HB_LOBYTE( lOffset ), HB_HIBYTE( lOffset ) ); hb_compGenPCode1( ( BYTE ) ( ( ( USHORT ) ( lOffset ) >> 16 ) & 0xFF ) ); - iBytes = 3; } else {