diff --git a/ChangeLog.txt b/ChangeLog.txt
index 9e5ef0782d..13c92a3269 100644
--- a/ChangeLog.txt
+++ b/ChangeLog.txt
@@ -10,6 +10,30 @@
* Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment
*/
+2015-01-19 13:24 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
+ * contrib/hbwin/hbwin.hbx
+ + added __oleVariantNullDate()
+
+ * src/common/hbver.c
+ * src/rtl/tget.prg
+ ! applied Get():end() Cl*pper compatibility fix by Rolf.
+ * synced with Viktor's branch
+
+ * contrib/hbhpdf/image.c
+ ! applied fixes sent by Peter Rees
+ ! protection against GPF when wrong parameter is passed to
+ HPDF_Image_GetColorSpace() (borrowed from Viktor's branch)
+
+ * README.md
+ * src/compiler/hbusage.c
+ * src/pp/hbpp.c
+ * utils/hbi18n/hbi18n.prg
+ * utils/hbtest/hbtest.prg
+ * contrib/hbformat/utils/hbformat.prg
+ * contrib/hbnetio/utils/hbnetio/hbnetio.prg
+ * contrib/hbnetio/utils/hbnetio/netiomgm.hb
+ * bumped copyright year to 2015
+
2015-01-14 13:00 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbwin/olecore.c
+ added new PRG function to control empty date conversion to OLE variant:
diff --git a/README.md b/README.md
index d28653be47..f8aa0cda62 100644
--- a/README.md
+++ b/README.md
@@ -1954,6 +1954,6 @@ Supported shells per host platforms:
* [Wikipedia](https://en.wikipedia.org/wiki/Harbour_compiler)
-This document Copyright © 2009-2013 Viktor Szakáts (vszakats.net/harbour)
+This document Copyright © 2009-2015 Viktor Szakáts (vszakats.net/harbour)
Licensed under [Creative Commons Attribution-ShareAlike 3.0](http://creativecommons.org/licenses/by-sa/3.0/)
See [COPYING](COPYING.txt).
diff --git a/contrib/hbformat/utils/hbformat.prg b/contrib/hbformat/utils/hbformat.prg
index cc523738b5..9ef0943af8 100644
--- a/contrib/hbformat/utils/hbformat.prg
+++ b/contrib/hbformat/utils/hbformat.prg
@@ -155,7 +155,7 @@ STATIC PROCEDURE About()
OutStd( ;
"Harbour Source Formatter " + HBRawVersion() + hb_eol() + ;
- "Copyright (c) 2009-2013, Alexander S.Kresin" + hb_eol() + ;
+ "Copyright (c) 2009-2015, Alexander S.Kresin" + hb_eol() + ;
"http://harbour-project.org/" + hb_eol() + ;
hb_eol() + ;
"Syntax: hbformat [options] [@config] " + hb_eol() + ;
diff --git a/contrib/hbhpdf/image.c b/contrib/hbhpdf/image.c
index 5b6b8169ca..5d7b6dc177 100644
--- a/contrib/hbhpdf/image.c
+++ b/contrib/hbhpdf/image.c
@@ -93,15 +93,9 @@ HB_FUNC( HPDF_LOADJPEGIMAGEFROMFILE )
HB_FUNC( HPDF_LOADPNGIMAGEFROMMEM )
{
#if HB_HPDF_VERS( 2, 2, 0 )
- HPDF_UINT size = ( HPDF_UINT ) hb_parclen( 2 );
- HPDF_BYTE * buffer;
-
- buffer = ( HPDF_BYTE * ) hb_xgrab( size + 1 );
-
- hb_retptr( ( HPDF_Image ) HPDF_LoadPngImageFromMem( hb_HPDF_Doc_par( 1 ), buffer, size ) );
-
- if( ! hb_storclen_buffer( ( char * ) buffer, size, 2 ) )
- hb_xfree( buffer );
+ hb_retptr( ( HPDF_Image ) HPDF_LoadPngImageFromMem( hb_HPDF_Doc_par( 1 ),
+ ( const HPDF_BYTE * ) hb_parcx( 2 ),
+ ( HPDF_UINT ) hb_parclen( 2 ) ) );
#else
hb_storc( NULL, 2 );
hb_retptr( NULL );
@@ -116,15 +110,9 @@ HB_FUNC( HPDF_LOADPNGIMAGEFROMMEM )
HB_FUNC( HPDF_LOADJPEGIMAGEFROMMEM )
{
#if HB_HPDF_VERS( 2, 2, 0 )
- HPDF_UINT size = ( HPDF_UINT ) hb_parclen( 2 );
- HPDF_BYTE * buffer;
-
- buffer = ( HPDF_BYTE * ) hb_xgrab( size + 1 );
-
- hb_retptr( ( HPDF_Image ) HPDF_LoadJpegImageFromMem( hb_HPDF_Doc_par( 1 ), buffer, size ) );
-
- if( ! hb_storclen_buffer( ( char * ) buffer, size, 2 ) )
- hb_xfree( buffer );
+ hb_retptr( ( HPDF_Image ) HPDF_LoadJpegImageFromMem( hb_HPDF_Doc_par( 1 ),
+ ( const HPDF_BYTE * ) hb_parcx( 2 ),
+ ( HPDF_UINT ) hb_parclen( 2 ) ) );
#else
hb_storc( NULL, 2 );
hb_retptr( NULL );
@@ -171,7 +159,12 @@ HB_FUNC( HPDF_IMAGE_GETBITSPERCOMPONENT )
*/
HB_FUNC( HPDF_IMAGE_GETCOLORSPACE )
{
- hb_retc( HPDF_Image_GetColorSpace( ( HPDF_Image ) hb_parptr( 1 ) ) );
+ HPDF_Image image = ( HPDF_Image ) hb_parptr( 1 );
+
+ if( image )
+ hb_retc( HPDF_Image_GetColorSpace( image ) );
+ else
+ hb_retc_null();
}
/* HPDF_Image_SetColorMask( hImage, nRGB_R_Min, nRGB_R_Max, nRGB_G_Min, nRGB_G_Max, nRGB_B_Min, nRGB_B_Max )
diff --git a/contrib/hbnetio/utils/hbnetio/hbnetio.prg b/contrib/hbnetio/utils/hbnetio/hbnetio.prg
index be53d4955b..2c66a2145a 100644
--- a/contrib/hbnetio/utils/hbnetio/hbnetio.prg
+++ b/contrib/hbnetio/utils/hbnetio/hbnetio.prg
@@ -835,7 +835,7 @@ STATIC PROCEDURE HB_Logo()
OutStd( ;
"Harbour NETIO Server " + StrTran( Version(), "Harbour " ) + hb_eol() + ;
- "Copyright (c) 2009-2013, Przemyslaw Czerpak, Viktor Szakats" + hb_eol() + ;
+ "Copyright (c) 2009-2015, Przemyslaw Czerpak, Viktor Szakats" + hb_eol() + ;
"http://harbour-project.org/" + hb_eol() + ;
hb_eol() )
diff --git a/contrib/hbnetio/utils/hbnetio/netiomgm.hb b/contrib/hbnetio/utils/hbnetio/netiomgm.hb
index 4c9b903c32..d60f2b924a 100644
--- a/contrib/hbnetio/utils/hbnetio/netiomgm.hb
+++ b/contrib/hbnetio/utils/hbnetio/netiomgm.hb
@@ -331,7 +331,7 @@ STATIC FUNCTION XToStrX( xValue )
STATIC PROCEDURE cmdAbout( netiocli )
hbnetiocon_dispevent( netiocli, "Harbour NETIO Server Management Console " + StrTran( Version(), "Harbour " ) )
- hbnetiocon_dispevent( netiocli, "Copyright (c) 2009-2013, Viktor Szakats" )
+ hbnetiocon_dispevent( netiocli, "Copyright (c) 2009-2015, Viktor Szakats" )
hbnetiocon_dispevent( netiocli, "http://harbour-project.org/" )
RETURN
diff --git a/contrib/hbwin/hbwin.hbx b/contrib/hbwin/hbwin.hbx
index b5b869f8c9..b2baf4bcaf 100644
--- a/contrib/hbwin/hbwin.hbx
+++ b/contrib/hbwin/hbwin.hbx
@@ -430,6 +430,7 @@ DYNAMIC __oleIsDisp
DYNAMIC __oleVariantGetType
DYNAMIC __oleVariantGetValue
DYNAMIC __oleVariantNew
+DYNAMIC __oleVariantNullDate
DYNAMIC __wapi_DEVMODE_Get
DYNAMIC __wapi_DEVMODE_New
DYNAMIC __wapi_DEVMODE_Set
diff --git a/src/common/hbver.c b/src/common/hbver.c
index 087975cd3a..db93194f7e 100644
--- a/src/common/hbver.c
+++ b/src/common/hbver.c
@@ -664,10 +664,10 @@ HB_BOOL hb_iswinver( int iMajorVersion, int iMinorVersion, int iType, HB_BOOL fO
WORD wSuiteMask;
BYTE wProductType;
BYTE wReserved;
- } OSVERSIONINFOEXW;
+ } OSVERSIONINFOEXW, * LPOSVERSIONINFOEXW;
#endif
- typedef BOOL ( WINAPI * _HB_VERIFYVERSIONINFO )( LPOSVERSIONINFOEX, DWORD, DWORDLONG );
+ typedef BOOL ( WINAPI * _HB_VERIFYVERSIONINFO )( LPOSVERSIONINFOEXW, DWORD, DWORDLONG );
typedef ULONGLONG ( WINAPI * _HB_VERSETCONDITIONMASK )( ULONGLONG, DWORD, BYTE );
static _HB_VERIFYVERSIONINFO s_pVerifyVersionInfo = NULL;
diff --git a/src/compiler/hbusage.c b/src/compiler/hbusage.c
index 6e5b811c8c..11c8c60898 100644
--- a/src/compiler/hbusage.c
+++ b/src/compiler/hbusage.c
@@ -274,6 +274,6 @@ void hb_compPrintLogo( HB_COMP_DECL )
hb_compOutStd( HB_COMP_PARAM, szVer );
hb_compOutStd( HB_COMP_PARAM,
- "\nCopyright (c) 1999-2014, http://harbour-project.org/\n" );
+ "\nCopyright (c) 1999-2015, http://harbour-project.org/\n" );
hb_xfree( szVer );
}
diff --git a/src/pp/hbpp.c b/src/pp/hbpp.c
index de00e5dc1a..6088627bd4 100644
--- a/src/pp/hbpp.c
+++ b/src/pp/hbpp.c
@@ -199,7 +199,7 @@ static void hb_pp_generateRules( FILE * fout, PHB_PP_STATE pState, const char *
" * Harbour Project source code:\n"
" * Build in preprocessor rules.\n"
" *\n"
- " * Copyright 2006-2014 Przemyslaw Czerpak \n"
+ " * Copyright 2006-2015 Przemyslaw Czerpak \n"
" * www - http://harbour-project.org\n"
" *\n"
" * This file is generated automatically by Harbour preprocessor\n"
@@ -344,7 +344,7 @@ static int hb_pp_generateVerInfo( char * szVerFile, int iRevID, char * szChangeL
" * Harbour Project source code:\n"
" * Version information and build time switches.\n"
" *\n"
- " * Copyright 2008-2014 Przemyslaw Czerpak \n"
+ " * Copyright 2008-2015 Przemyslaw Czerpak \n"
" * www - http://harbour-project.org\n"
" *\n"
" * This file is generated automatically by Harbour preprocessor\n"
@@ -792,7 +792,7 @@ int main( int argc, char * argv[] )
{
printf( "Harbour Preprocessor %d.%d.%d%s\n",
HB_VER_MAJOR, HB_VER_MINOR, HB_VER_RELEASE, HB_VER_STATUS );
- printf( "Copyright (c) 1999-2014, http://harbour-project.org/\n" );
+ printf( "Copyright (c) 1999-2015, http://harbour-project.org/\n" );
}
if( szFile )
diff --git a/src/rtl/tget.prg b/src/rtl/tget.prg
index 759e72ece1..3a745b6311 100644
--- a/src/rtl/tget.prg
+++ b/src/rtl/tget.prg
@@ -372,8 +372,21 @@ METHOD end() CLASS Get
LOCAL nFor
IF ::hasFocus
- nLastCharPos := Min( Len( RTrim( ::cBuffer ) ) + 1, ::nMaxEdit )
- IF ::nPos != nLastCharPos
+ nLastCharPos := Len( RTrim( ::cBuffer ) ) + 1
+ /* check for spaces before non-template chars */
+ IF nLastCharPos > 2 .AND. ! ::IsEditable( nLastCharPos - 1 )
+ FOR nFor := nLastCharPos - 2 TO ::FirstEditable() STEP -1
+ IF ::IsEditable( nFor )
+ IF Empty( SubStr( ::cBuffer, nFor, 1 ) )
+ nLastCharPos := nFor
+ ELSE
+ EXIT
+ ENDIF
+ ENDIF
+ NEXT
+ ENDIF
+ nLastCharPos := Min( nLastCharPos, ::nMaxEdit )
+ IF ::nPos < nLastCharPos .OR. ::nPos == ::LastEditable()
nPos := nLastCharPos
ELSE
nPos := ::nMaxEdit
@@ -1586,9 +1599,8 @@ METHOD backSpaceLow() CLASS Get
/* To delete the parenthesis (negative indicator) in a non editable position */
- nMinus := At( "(", SubStr( ::cBuffer, 1, nPos - 1 ) )
-
- IF nMinus > 0 .AND. !( SubStr( ::cPicMask, nMinus, 1 ) == "(" )
+ IF ( nMinus := At( "(", Left( ::cBuffer, nPos - 1 ) ) ) > 0 .AND. ;
+ !( SubStr( ::cPicMask, nMinus, 1 ) == "(" )
::cBuffer := Stuff( ::cBuffer, nMinus, 1, " " )
@@ -1686,9 +1698,8 @@ METHOD IsEditable( nPos ) CLASS Get
RETURN .T.
ENDIF
- cChar := SubStr( ::cPicMask, nPos, 1 )
-
IF ::cType != NIL
+ cChar := SubStr( ::cPicMask, nPos, 1 )
SWITCH ::cType
CASE "C" ; RETURN hb_asciiUpper( cChar ) $ "!ANX9#LY"
CASE "N" ; RETURN cChar $ "9#$*"
diff --git a/utils/hbi18n/hbi18n.prg b/utils/hbi18n/hbi18n.prg
index c78ee2de57..46139f0c51 100644
--- a/utils/hbi18n/hbi18n.prg
+++ b/utils/hbi18n/hbi18n.prg
@@ -165,7 +165,7 @@ STATIC PROCEDURE Logo()
OutStd( ;
"Harbour i18n .pot/.hbl file manager " + HBRawVersion() + hb_eol() + ;
- "Copyright (c) 2009-2013, Przemyslaw Czerpak" + hb_eol() + ;
+ "Copyright (c) 2009-2015, Przemyslaw Czerpak" + hb_eol() + ;
"http://harbour-project.org/" + hb_eol() + ;
hb_eol() )
diff --git a/utils/hbtest/hbtest.prg b/utils/hbtest/hbtest.prg
index 6893c5f871..98d9c0d5f8 100644
--- a/utils/hbtest/hbtest.prg
+++ b/utils/hbtest/hbtest.prg
@@ -104,7 +104,7 @@ STATIC s_lDBFAvail := .F.
PROCEDURE Main( cPar1, cPar2 )
OutStd( "Harbour Regression Test Suite" + hb_eol() +;
- "Copyright (c) 1999-2013, Viktor Szakats" + hb_eol() +;
+ "Copyright (c) 1999-2015, Viktor Szakats" + hb_eol() +;
"http://harbour-project.org/" + hb_eol() )
IF cPar1 == NIL