From 3d4e4f5baaf5907f5aeb33c41f9d2fff6c5dc4f3 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Tue, 13 Nov 2012 11:37:21 +0000 Subject: [PATCH] 2012-11-13 12:34 UTC+0100 Viktor Szakats (harbour syenar.net) * contrib/hbwin/win_reg.prg ! fixed WIN_REGGET() for WIN_REG_DWORD_BIG_ENDIAN and WIN_REG_QWORD* values in unicode mode. % minor optimization WIN_REG_QWORD part of above --- harbour/ChangeLog | 10 ++++++++-- harbour/contrib/hbwin/win_reg.prg | 6 +++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 91f164b58b..124792bd3b 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,12 @@ The license applies to all entries newer than 2009-04-28. */ +2012-11-13 12:34 UTC+0100 Viktor Szakats (harbour syenar.net) + * contrib/hbwin/win_reg.prg + ! fixed WIN_REGGET() for WIN_REG_DWORD_BIG_ENDIAN and + WIN_REG_QWORD* values in unicode mode. + % minor optimization WIN_REG_QWORD part of above + 2012-11-13 12:16 UTC+0100 Viktor Szakats (harbour syenar.net) * extras/gtwvw/gtwvwd.c ! eliminated HB_TCHAR_*() macros @@ -76,7 +82,7 @@ ! GDIMAGESTRINGFTEX() to allow float numbers for ptsize parameter ! GDIMAGEFILLEDPOLYGON(), GDIMAGEOPENPOLYGON(), GDIMAGEPOLYGON() fixed to not leave uninitialized trash in point coordinates - if wrongly formed parameters is passed + if wrongly formed parameter is passed ! GDIMAGEFILLEDPOLYGON(): fixed buffer overrun if number of points exceeded 50 ; further 700 LOC and 12KB source size reduction @@ -100,7 +106,7 @@ * contrib/hbgd/gd.prg * deleted excessive {} and () operators * eliminated split lines where only one char was present in a line - % replaced RTE generator calls to more compact ones + % replaced RTE generator calls with more compact ones % dropped pcount() checks where HB_IS*() checks were present anyway * merged separate var declarations and initializations in diff --git a/harbour/contrib/hbwin/win_reg.prg b/harbour/contrib/hbwin/win_reg.prg index 8535a46071..951ee6b151 100644 --- a/harbour/contrib/hbwin/win_reg.prg +++ b/harbour/contrib/hbwin/win_reg.prg @@ -199,11 +199,11 @@ FUNCTION win_regGet( nHKEY, cKeyName, cEntryName, xDefault, nRegSam ) nValueType == WIN_REG_DWORD_LITTLE_ENDIAN xRetVal := Bin2U( xRetVal ) CASE nValueType == WIN_REG_DWORD_BIG_ENDIAN - xRetVal := Bin2U( Right( xRetVal, 2 ) + Left( xRetVal, 2 ) ) + xRetVal := Bin2U( hb_BRight( xRetVal, 2 ) + hb_BLeft( xRetVal, 2 ) ) CASE nValueType == WIN_REG_QWORD .OR. ; nValueType == WIN_REG_QWORD_LITTLE_ENDIAN - xRetVal := hb_bitShift( Bin2U( SubStr( xRetVal, 5, 2 ) + SubStr( xRetVal, 7, 2 ) ), 32 ) +; - Bin2U( SubStr( xRetVal, 1, 2 ) + SubStr( xRetVal, 3, 2 ) ) + xRetVal := hb_bitShift( Bin2U( hb_BSubStr( xRetVal, 5, 4 ) ), 32 ) +; + Bin2U( hb_BSubStr( xRetVal, 1, 4 ) ) OTHERWISE /* Strip ending zero byte */ IF hb_BRight( xRetVal, 1 ) == hb_BChar( 0 )