2022-10-17 20:11 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)

260 views
Skip to first unread message

Przemyslaw Czerpak

unread,
Oct 17, 2022, 2:11:39 PM10/17/22
to harbou...@googlegroups.com
2022-10-17 20:11 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/harbour.hbx
* src/harbour.def
* src/rdd/dbcmd.c
+ added two new functions:
hb_FieldGet( <cFieldName> | <nFieldPos> )
-> <xFieldValue> | NIL
hb_FieldPut( <cFieldName> | <nFieldPos>, <xFieldValue> )
-> <xFieldValue> | NIL
They works like FieldGet() and FieldPut() but allows to use field
name instead of field index.

best regards
Przemek

oleksa

unread,
Oct 17, 2022, 2:16:19 PM10/17/22
to harbou...@googlegroups.com
Hi!

Incorrect sequence of entries in the data log

...
2020-01-13 19:15 UTC+0100 Aleksander Czajczynski (hb fki.pl)
 * src/rtl/gtwin/gtwin.c
 * src/rtl/gtwvt/gtwvt.c
   ! hopefully make left ALT+[Y/Z] WM_SYSCHAR values handling aware
     of QWERTZ layout. Should fix issues with Serbian Latin and similar
     keyboards, while still retain the original fix for Greek layout.
     References:
     2016-07-04 19:01 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)

2022-10-17 19:57 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
...

Thanks.

Regards,
Oleksii Myronenko

17 жовтня 2022, 21:11:40, від "Przemyslaw Czerpak" <dru...@poczta.onet.pl>:

)
  * include/harbour.hbx
  * src/harbour.def
  * src/rdd/dbcmd.c
    + added two new functions:
         hb_FieldGet( <cFieldName> | <nFieldPos> )
               -> <xFieldValue> | NIL
         hb_FieldPut( <cFieldName> | <nFieldPos>, <xFieldValue> )
               -> <xFieldValue> | NIL
      They works like FieldGet() and FieldPut() but allows to use field
      name instead of field index.

best regards
Przemek

-- 
You received this message because you are subscribed to the Google Groups "Harbour Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-deve...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/harbour-devel/20221017181131.GA22517%40druzus-T1.

Lorenzo Fiorini

unread,
Oct 18, 2022, 3:07:05 AM10/18/22
to harbou...@googlegroups.com
Many thanks Przemyslaw.

Regards,
Lorenzo

Pete

unread,
Oct 18, 2022, 6:50:42 AM10/18/22
to Harbour Developers
Hello,
Many thanks for the updates!  Seeing, after a long time, new update(s)
is always a welcome event. I've just made a rather strange observation,
regarding the displayed version. Please see below:
Version: Harbour 3.2.0dev (r-2084795468)
(Platform: Windows 10 64bits)

I did try a new/clean checkout and build, on a different machine.
Same result: Version: Harbour 3.2.0dev (r-2084795468)
(Platform: Windows 7 32bits)

In previous builds was displaying the well known (and human friendly)
date-number like: Version: Harbour 3.2.0dev (r2104281802)
...

The only toolset change, compared to older builds is the version of C compiler used:
current MinGW 12.1 - previous was MinGW 10.2 (but I don't think this could make any difference.)

Anyhow, it's not a big problem, just a little bit confusing.

regards,
Pete

Aleksander Czajczynski

unread,
Nov 8, 2022, 5:45:03 PM11/8/22
to harbou...@googlegroups.com
Hello!

Not the fault of toolchain. Something in here overflows "integer" on present date.
https://github.com/harbour/core/blob/master/src/pp/hbpp.c#L611-L620

During the build process hbpp is used to make some defines:
hbpp ../include/hbstdgen.ch -opptable.c -q -c../ -vtest.h

Best regards, Aleksander

Pete

unread,
Nov 11, 2022, 10:07:27 AM11/11/22
to Harbour Developers
Hi,

On Wednesday, 9 November 2022 at 00:45:03 UTC+2 Aleksander Czajczynski wrote:
Hello!

Not the fault of toolchain. Something in here overflows "integer" on present date.
https://github.com/harbour/core/blob/master/src/pp/hbpp.c#L611-L620


Yes, that was what I thought about, but why now? the relevant code  in hbpp.c
is five years old and had never showed such an 'overflow' vulnerability .
Just a shot in the dark: might it be that something is wrong with changelog.txt ?
(as far as i can see,  it's used in determination of release number while is the part
of the process that has changed during last commits).

regards,
Pete

Pete

unread,
Nov 12, 2022, 2:34:48 AM11/12/22
to Harbour Developers
Thanks!

regards,
Pete

Aleksander Czajczynski

unread,
Nov 25, 2022, 4:53:36 AM11/25/22
to harbou...@googlegroups.com
Przemek, if you have no objections, i'd make such change in your recent
addition.

--- b/src/rdd/dbcmd.c
+++ b/src/rdd/dbcmd.c
@@ -2323,7 +2323,7 @@ HB_FUNC( HB_FIELDPUT )
if( uiField > 0 )
{
PHB_ITEM pItem = hb_param( 2, HB_IT_ANY );
- if( pItem && ! HB_IS_NIL( pItem ) )
+ if( pItem )
{
if( SELF_PUTVALUE( pArea, uiField, pItem ) == HB_SUCCESS )
hb_itemReturn( pItem );

It is not Clipper compatible - FieldPut() ignores NIL - but it's
necessary to allow setting NIL/NULL value in SDD SQL areas or DBF SMT
memo fields: HB_FieldPut( 1/"FIELD", NIL ). ALIAS->FIELD := NIL was
always ok and Harbour 3.4 already has NIL allowing HB_FieldPut() i think.

Best regards, Aleksander
Reply all
Reply to author
Forward
0 new messages