Skip to content

Commit

Permalink
2015-01-19 13:24 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
Browse files Browse the repository at this point in the history
  * 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
  • Loading branch information
druzus committed Jan 19, 2015
1 parent 603063c commit 32b22ec
Show file tree
Hide file tree
Showing 13 changed files with 67 additions and 38 deletions.
24 changes: 24 additions & 0 deletions ChangeLog.txt
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -1954,6 +1954,6 @@ Supported shells per host platforms:
* [Wikipedia](https://en.wikipedia.org/wiki/Harbour_compiler)


This document Copyright &copy; 2009-2013 Viktor Szakáts (vszakats.net/harbour)<br />
This document Copyright &copy; 2009-2015 Viktor Szakáts (vszakats.net/harbour)<br />
Licensed under [Creative Commons Attribution-ShareAlike 3.0](http://creativecommons.org/licenses/by-sa/3.0/)<br />
See [COPYING](COPYING.txt).
2 changes: 1 addition & 1 deletion contrib/hbformat/utils/hbformat.prg
Expand Up @@ -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] <file[s]>" + hb_eol() + ;
Expand Down
31 changes: 12 additions & 19 deletions contrib/hbhpdf/image.c
Expand Up @@ -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 );
Expand All @@ -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 );
Expand Down Expand Up @@ -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 )
Expand Down
2 changes: 1 addition & 1 deletion contrib/hbnetio/utils/hbnetio/hbnetio.prg
Expand Up @@ -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() )

Expand Down
2 changes: 1 addition & 1 deletion contrib/hbnetio/utils/hbnetio/netiomgm.hb
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions contrib/hbwin/hbwin.hbx
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/common/hbver.c
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/hbusage.c
Expand Up @@ -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 );
}
6 changes: 3 additions & 3 deletions src/pp/hbpp.c
Expand Up @@ -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 <druzus / at / priv.onet.pl>\n"
" * Copyright 2006-2015 Przemyslaw Czerpak <druzus / at / priv.onet.pl>\n"
" * www - http://harbour-project.org\n"
" *\n"
" * This file is generated automatically by Harbour preprocessor\n"
Expand Down Expand Up @@ -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 <druzus / at / priv.onet.pl>\n"
" * Copyright 2008-2015 Przemyslaw Czerpak <druzus / at / priv.onet.pl>\n"
" * www - http://harbour-project.org\n"
" *\n"
" * This file is generated automatically by Harbour preprocessor\n"
Expand Down Expand Up @@ -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 )
Expand Down
25 changes: 18 additions & 7 deletions src/rtl/tget.prg
Expand Up @@ -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
Expand Down Expand Up @@ -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, " " )

Expand Down Expand Up @@ -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#$*"
Expand Down
2 changes: 1 addition & 1 deletion utils/hbi18n/hbi18n.prg
Expand Up @@ -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() )

Expand Down
2 changes: 1 addition & 1 deletion utils/hbtest/hbtest.prg
Expand Up @@ -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
Expand Down

0 comments on commit 32b22ec

Please sign in to comment.