Commit Graph

726 Commits

Author SHA1 Message Date
Przemysław Czerpak
aa81797e35 2025-09-09 16:36 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/3rd/png/LICENSE
  * src/3rd/png/Makefile
  * src/3rd/png/png.c
  * src/3rd/png/png.diff
  * src/3rd/png/png.h
  * src/3rd/png/pngconf.h
  * src/3rd/png/pngdebug.h
  * src/3rd/png/pngerror.c
  * src/3rd/png/pngget.c
  * src/3rd/png/pnginfo.h
  * src/3rd/png/pnglconf.h
  * src/3rd/png/pngmem.c
  * src/3rd/png/pngpread.c
  * src/3rd/png/pngpriv.h
  * src/3rd/png/pngread.c
  * src/3rd/png/pngrio.c
  * src/3rd/png/pngrtran.c
  * src/3rd/png/pngrutil.c
  * src/3rd/png/pngset.c
  * src/3rd/png/pngstru.h
  * src/3rd/png/pngtrans.c
  * src/3rd/png/pngwio.c
  * src/3rd/png/pngwrite.c
  * src/3rd/png/pngwtran.c
  * src/3rd/png/pngwutil.c
    * updated to version 1.6.50

  * contrib/hbmlzo/3rd/minilzo/minilzo.c
  + contrib/hbmlzo/3rd/minilzo/minilzo.diff
    ! fixed compilation with ISO C++ 17 compilers
2025-09-09 16:36:53 +02:00
Przemysław Czerpak
75ff90a49d 2025-09-09 13:50 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/hbdefs.h
    + added new types HB_WCHAR16 and HB_WCHAR32, existing type HB_WCHAR
      is mapped to HB_WCHAR16 (just like before)

  * include/hbapicdp.h
  * src/harbour.def
  * src/rtl/cdpapi.c
    + added new C functions for encoding and decoding UTF-8 string using
      which HB_WCHAR32:
         int hb_cdpU32CharToUTF8( char * szUTF8, HB_WCHAR32 wc );
         HB_BOOL hb_cdpUTF8GetU32( const char * pSrc, HB_SIZE nLen,
                                   HB_SIZE * pnIndex, HB_WCHAR32 * pWC );
         HB_BOOL hb_cdpUTF8GetUCS( const char * pSrc, HB_SIZE nLen,
                                   HB_SIZE * pnIndex, HB_WCHAR32 * pWC );
         HB_BOOL hb_cdpUTF8GetU16( const char * pSrc, HB_SIZE nLen,
                                   HB_SIZE * pnIndex, HB_WCHAR16 * pWC );
         HB_BOOL hb_cdpUTF8Validate( const char * pSrc, HB_SIZE nLen );
      They support full UCS and are much more restrictive against errors and
      wrong UTF-8 encoding, i.e. now overlong encoding is forbidden.
      The wrong characters are translated to 0xFFFD and later if such
      character does not exist in final CP to '?' ASCII character.
    * declaration of the following UTF-8 C functions have been changed to
      operate on HB_WCHAR32 instead of HB_WCHAR:
         int hb_cdpUTF8CharSize( HB_WCHAR32 wc );
         HB_WCHAR32 hb_cdpUTF8StringPeek( const char * pSrc, HB_SIZE nLen,
                                          HB_SIZE nPos );
    * the following C functions have been changed to internally operate on
      HB_WCHAR32 instead of HB_WCHAR:
         hb_cdpUTF8StringLength()
         hb_cdpUTF8StringAt()
         hb_cdpUTF8StringSubstr()
    * the following C functions have been changed to use new hb_cdpUTF8GetU*()
      instead of step by step decoding with hb_cdpUTF8ToU16NextChar()
         hb_cdpStrToUTF8Disp()
         hb_cdpUTF8AsStrLen()
         hb_cdpUTF8ToStr()
         hb_cdpStrToU16()
         hb_cdpUtf8Char()
    * use HB_CDP_ERROR_* macros to mark wrong encoding

  * src/rtl/cdpapihb.c
    * the following UTF-8 C functions have been changed to operate on
      HB_WCHAR32 instead of HB_WCHAR:
         hb_utf8Chr()
         hb_utf8Asc()
         hb_utf8Poke()
         hb_utf8Peek()
      Other UTF-8 PRG functions have been adopted to HB_WCHAR32 by changes
      in corresponding C functions.

  * src/codepage/cp_utf8.c
    * use new function hb_cdpUTF8GetU16() to decode UTF-8 strings in UTF8EX CP

  * src/rtl/arc4.c
    + added new macro HB_NO_SYSCTL which allow to disable sysctl() in Linux
      builds for GLIBC < 2.30
2025-09-09 13:50:42 +02:00
Przemysław Czerpak
315887a395 2025-09-03 12:21 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rtl/cdpapi.c
    + added fallback translation table for different variants of Latin
      character, now when translation is made between different encoding
      and the variant of Latin character does not exist in destination
      code page then it's translated to their base Latin form, i.e.:
         hb_utf8ToStr( "ĄĆĘŁŃÓŚŹŻąćęłńóśźż", "EN" ) -> "ACELNOSZZacelnószz"

  * tests/uc16_gen.prg
    ; updated comment
2025-09-03 12:21:01 +02:00
Przemysław Czerpak
c4b2a030c4 2025-08-29 12:49 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbbmp/core.c
  * contrib/hbbmp/hbbmp.ch
  * contrib/hbbmp/hbbmp.h
  * contrib/hbbmp/hbbmp.hbx
    + added new PRG functions:
         hb_bmp_frombitmap( <cBitMap>, <nAlign>, <nWidth>, <nHeight>, ;
                            [<nDepth>=1], [<nDPI>=72], [<aPalette>], ;
                            [@<nError>] ) -> <pBMP> | NIL
         hb_bmp_colorreset( <pBMP> )

  * contrib/hbct/dattime3.c
    ! struct timespec initialization

  * contrib/hbplist.txt
    + added hbbmp library

  * contrib/hbzebra/coredraw.c
  * contrib/hbzebra/hbzebra.hbx
    + added new PRG function:
         hb_zebra_getbitmap( <hZebra>, <nAlign>=8, <lBottomUp>=.F., ;
                             @<nWidth>, @<nHeight>, <nScaleX>, <nScaleY>, ;
                             <nBorder> ) -> <cBitMap> | NIL

  * contrib/hbzebra/tests/bmp.prg
    + added example for much faster BMP creation using hb_zebra_getbitmap() and
      hb_bmp_frombitmap() functions

  * src/rtl/filebuf.c
    ! casting

  * src/vm/extrap.c
    * allocate stack buffer dynamically, in new Linux version IGSTKSZ is
      defined as sysconf( _SC_SIGSTKSZ ) so it cannot be used as legal size
      for static arrays
2025-08-29 12:49:40 +02:00
Przemysław Czerpak
188c206440 2025-08-22 12:00 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbzebra/coredraw.c
  * contrib/hbzebra/hbzebra.hbx
    + added new PRG function:
         hb_zebra_getsize( <hZebra>, @<nWidth>, @<nHeight> ) -> <nError>
      it calculates size in points of the created barcode and returns 0 on
      success or error code

  + contrib/hbzebra/tests/gtgfx.prg
    + borrowed from Viktor's fork, thanks
      2014-09-18 22:32 UTC+0200 Viktor Szakats (vszakats users.noreply.github.com)
       + added on-screen barcode example, created by elch
         (with some minor cleanups)
         https://groups.google.com/d/msg/harbour-users/_Wht51JZGgE/ZXyvaJNH9ggJ
         feb4fc0e20

  * contrib/sddoci/core.c
    * map ostrlen() to strlen() or wcslen() in OCI_CHARSET_UNICODE builds
    ; TOFIX: this library uses wchar_t for unicode strings, it means that
             in *nixes where wchar_t is 32-bit integer mapping to Harbour
             HB_WCHAR is wrong and has to be fixed

  * include/hbapifs.h
  * src/harbour.def
  * src/rtl/filebuf.c
   + added new C function:
         HB_BOOL hb_fileSave( const char * pszFileName,
                              const void * buffer, HB_SIZE nSize );

  * include/harbour.hbx
  * src/harbour.def
  * src/rtl/vfile.c
    + added new PRG function:
         hb_vfSave(  <cFileName>, <cFileBody> ) --> <lOK>

  * src/rtl/vfile.c
    * set FError() code in hb_vfLoad()
2025-08-22 12:00:07 +02:00
Przemysław Czerpak
1b633cd242 2025-08-17 18:27 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/gtqtc/gtqtc.h
  * contrib/gtqtc/gtqtc1.cpp
    + added support for disabling title and frames of console window by
         hb_gtInfo( HB_GTI_WINTITLE, <lNoFrame> )

  * src/rtl/transfrm.c
    ! fixed bug in "@S<n>" transformation when multibyte CDP is used
2025-08-17 18:27:35 +02:00
Aleksander Czajczynski
57c06eb936 2025-07-19 19:44 UTC+0200 Aleksander Czajczynski (hb fki.pl)
* contrib/hbhpdf/core.c
    + HPDF_GetPageByIndex( hDoc, nIndex ) --> hPage / NIL
      suggested by Luigi Ferraris

  * contrib/hbhpdf/tests/harupdf.prg
    + test the above (disabled by default)

  * README.md
    * updated CI badge(s) to GitHub Actions - they also cover
      the strict compilation mode, definitions are currently
      located in the same file as normal

    ! cleaned up links, mostly in tools section, some were
      broken, for others switched to https where applicable

    * mention HB_CCPREFIX= support for clang

  * contrib/hbdoc/hbdoc.prg
  * contrib/hbformat/utils/hbformat.prg
  * contrib/hbnetio/utils/hbnetio/hbnetio.prg
  * package/harbour.mft
  * package/harbour.rc
  * src/compiler/hbusage.c
  * utils/hbi18n/hbi18n.prg
  * utils/hbtest/hbtest.prg
    * bumped copyright year to 2025
2025-07-19 19:44:04 +02:00
Aleksander Czajczynski
a5c88273b4 2025-07-05 20:20 UTC+0200 Aleksander Czajczynski (hb fki.pl)
+ config/wasm/global.mk
  + config/wasm/libs.mk
  + config/wasm/emcc.mk
  * utils/hbmk2/hbmk2.prg
  * contrib/hbrun/hbrun.hbp
    + add basic support for build Harbour into JS/WebAssembly using
      emscripten, using these settings:
        HB_PLATFORM=wasm HB_COMPILER=emcc HB_BUILD_3RDEXT=no

    * {abstr} is now a hbmk2 keyword to possibly group all
      toolsets similar in flavour: WASI/clang, JS/emscripten
      These most likely will be targeting plaforms which are not
      full operating-systems, they are also commonly qualified as
      sandbox solutions.

    * introduced __PLATFORM__WASM and __PLATFORM__ABSTRACT .prg defines

  * utils/hbmk2/hbmk2.prg
    + allow to specify hb_ProgName() value at build-time for platforms
      where the function cannot return a meaningful value (f.e.
      JS/WebAssembly)
    ; TODO: Add support for passing hb_ProgName() value command-line
            parameter, f.e. `--hb:self=hbrun`

  * config/global.mk
  * include/hbsetup.h
    * consider abstract/emscripten targets similar to linux-like

  * src/rtl/arc4.c
    ! fix to build under emscripten (which is assumed to be a
      linux-like environment)

  ; though platform/compiler names are not currently compatible
    with origin, this WebAssembly platform support was guided by
    Harbour 3.4:
    2017-06-09 01:10 UTC Viktor Szakats (vszakats users.noreply.github.com)
    as usual Viktor was here before, many thanks!

  ; example project, how to make a multi-platform GUI application which
    also targets WebAssembly, can be found here:
    https://github.com/alcz/harbour-cimgui-sokol-starterkit/
2025-07-05 20:20:38 +02:00
Przemysław Czerpak
9e783a1319 2025-03-20 06:30 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rtl/cdpapihb.c
    ! fixed hb_transalte() to not clear passed string
      when neither CPIN nor CPOUT is set

  * src/rtl/hbgtcore.c
    ! fixed hb_gtAttach() to properly work with empty GT pointer
2025-03-20 06:30:10 +01:00
Detlef Riekenberg
ac61cb1635 hbver: Fix displayed OpenWatcom and TinyC version
Regards ... Detlef
2025-02-03 00:44:52 +01:00
Przemysław Czerpak
06d4e4c6ae 2025-01-30 16:19 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbcurl/core.c
    ! casting

  * include/hbcompdf.h
    * removed unnecassary parenthesies and indenting

  * src/rtl/errint.c
    * added
         #pragma GCC diagnostic ignored "-Wnull-dereference"

  * src/vm/dlmalloc.c
    - removed
         #pragma GCC diagnostic ignored "-Wnull-dereference"

  * src/vm/fm.c
    + added
         #pragma clang diagnostic ignored "-Wgnu-null-pointer-arithmetic"
         #pragma GCC diagnostic ignored "-Warray-bounds"
         #pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
         #pragma GCC diagnostic ignored "-Walloc-size"
2025-01-30 16:19:59 +01:00
Przemysław Czerpak
418f1b6e46 2025-01-30 11:54 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/vm/Makefile
  * src/vm/vmmt/Makefile
  * src/vm/dlmalloc.c
    * In GCC builds >= 6.1 use
         #pragma GCC diagnostic ignored "-Wnull-dereference"
      instead of foringg HB_FM_STD_ALLOC
2025-01-30 11:54:03 +01:00
Przemysław Czerpak
37ed9d7680 2025-01-30 03:51 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/vm/hvm.c
    * changed returned type of hb_vmCalcIntWidth() to avoid casting
2025-01-30 03:51:51 +01:00
Przemysław Czerpak
e66aab7eff 2025-01-30 02:48 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/sddsqlt3/core.c
  * include/hbdefs.h
  * src/compiler/gencc.c
  * src/rtl/abs.c
  * src/vm/hvm.c
    * added workarounds for OpenWatcom 2.0 bug in 64bit expressions used
      in #[el]if statements
2025-01-30 02:48:48 +01:00
Przemysław Czerpak
1d0c512822 2025-01-29 13:50 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbssl/bio.c
    ! respect OPENSSL_NO_SOCK macro

  * contrib/hbssl/bio.c
  * contrib/hbssl/err.c
  * contrib/hbssl/evp.c
  * contrib/hbssl/pem.c
    * disabled deprecated functions which do nothinng in OpenSSL 3.0

  * src/rtl/filesys.c
  * src/rtl/hbcom.c
  * src/rtl/hbproces.c
  * src/rtl/hbsocket.c
  * src/rtl/net.c
  * src/rtl/netusr.c
  * src/vm/dynlibhb.c
    * updated for OpenWatcom 2.0 builds
2025-01-29 13:50:06 +01:00
Aleksander Czajczynski
a30e2091db 2025-01-24 15:02 UTC+0100 Aleksander Czajczynski (hb fki.pl)
* contrib/hbct/dattime3.c
    ! fixed in block variable declaration for strict ANSI C compat
    * code formatting
    ; both borrowed from Viktor's fork, thanks
      aa4665f16f
      d9f37296b0

  * src/rdd/dbcmd.c
    * note about C5.3/5.2 DBAPPEND( [<lUnlockAll>=.t.] ) updated again
      upon Przemek notification, thanks
2025-01-24 15:02:38 +01:00
Przemysław Czerpak
bf146ab5ee 2025-01-24 12:32 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbwin/olecore.c
    * pacified false MSVC warning. It's very seldom situation that I'm adding
      code to pacify false compiler warnings anyhow in this case it cost in
      practice nothing so I decided to do that.

  * contrib/xhb/hboutdbg.c
  * src/rtl/gtcrs/gtcrs.c
    * NULL pointer casting to pacify warning

  * src/pp/hbpp.c
    % do not created new iLen variable but reuse the one previously declared

  * src/vm/classes.c
    % allocate puiMsgIdx as array of HB_USHORT items instead of HB_SYMCNT.
      This modification only reduces the memory usage and has no effect on
      number of accepted symbols.
    * changed 'HB_SYMCNT uiHashKey' to 'HB_SIZE nHashKey' to avoid explicit
      casting in the code
2025-01-24 12:32:32 +01:00
Przemysław Czerpak
b3ee8c65fb 2025-01-23 17:45 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/hbdate.h
  * src/common/hbdate.c
  * src/harbour.def
    + added new C functions:
         HB_BOOL hb_timeStrGetUTC( const char * szTime,
                                   int * piHour, int * piMinutes,
                                   int * piSeconds, int * piMSec,
                                   int * piUTCOffset );
         HB_BOOL hb_timeStampStrGetUTC( const char * szDateTime,
                                        int * piYear, int * piMonth,
                                        int * piDay, int * piHour,
                                        int * piMinutes, int * piSeconds,
                                        int * piMSec, int * piUTCOffset );
      They can decode timestamp value with ISO 8601 UTC offset.

  * src/common/hbdate.c
    * use hb_timeStampStrGetUTC() in hb_timeStampStrGetDT() and return UTC
      time if it was with UTC offset
      Now Harbour compiler accept timestamp strings with with UTC offset, i.e.
         ? t"2025-01-22 00:45 UTC+0100" // => 2025-01-21 23:45:00.000
      Also HB_StrToTS() supports it.

  * src/pp/hbpp.c
    * use new hb_timeStampStrGetDT() to decode timestamp from ChangeLog to
      build revision number. It also fixes bug with decoding negative UTC
      offsets.
2025-01-23 17:45:49 +01:00
Aleksander Czajczynski
4a4691653b 2025-01-23 11:47 UTC+0100 Aleksander Czajczynski (hb fki.pl)
* contrib/hbcurl/core.c
  * contrib/hbcurl/hbcurl.ch
  * contrib/hbcurl/hbcurl.hbx
    * applied more cleanups, following Viktor Szakats guidance in hisrepo:
      6127603217
      - add `HB_CURLM_ERROR` to indicate error in hbcurl wrapper.
      - replace use of `HB_CURLM_INTERNAL_ERROR` with `HB_CURLM_ERROR`.
      - sync Harbour variable integer sizes with curl ones.
      - tidy up a variable scopes.
      - drop unused variable.
      - omit `hb_ret()` (it's a no-op).
      - formatting.
      - add functions to `hbcurl.hbx`.

    + add curl_ws_send()/curl_ws_recv() - WebSocket connectivity,
      borrowed from Viktor's fork, thanks again!
      2c71a5c940

  * src/rdd/dbcmd.c
    * note about C5.3 and Harbour extensions to
      DBAPPEND( [<lUnlockAll>=.t.] ), thanks Viktor

  * ChangeLog.txt
    ! typos
2025-01-23 11:48:57 +01:00
Przemysław Czerpak
9e86079873 2025-01-21 08:12 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* .github/workflows/linux-ci.yml
    * reenabled hbfimage contrinb library

  * src/vm/Makefile
  * src/vm/vmmt/Makefile
    * set -DHB_FM_STD_ALLOC C compiler parameter for HB_BUILD_TEST='strict'
2025-01-21 08:12:22 +01:00
Przemysław Czerpak
b33cb05de5 2025-01-21 01:11 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/hbapigt.h
    ! removed dummy declaration for hb_inkeyExit()

  * include/hbexprop.h
    ! removed dummy declarations for hb_compExprNewCodeblockExpr(),
      hb_compExprNewAssign() and hb_compExprEqual()
    ; marked compiler only hb_compExpr*() functions

  * include/hbgtcore.h
    ! removed dummy declaration for hb_gt_gcMark()

  * include/hbxvm.h
    ! removed dummy declarations for hb_xvmPushBlockLarge() and
      hb_xvmMacroPushArg()

  * src/harbour.def
    + added hb_iswinbuild()
    + added exported PCRE variable pcre_stack_guard
    + added exported ZLIB functions: gzfread(), gzwrite(),
      adler32_z(), crc32_z(), crc32_combine_gen(),
      crc32_combine_gen64(), crc32_combine_op(),
      uncompress2(), deflateGetDictionary(),
      inflateValidate(), inflateCodesUsed()
2025-01-21 01:11:37 +01:00
Przemysław Czerpak
248979e15b 2025-01-20 10:43 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/hbapifs.h
    ! added missing declaration for hb_fileParamGet()

  * include/hbgtcore.h
    * added HB_EXPORT attribute for hb_gt_getClipboard(), hb_gt_setClipboard()
      and hb_gt_dos_keyCodeTranslate()

  * include/hbrdddbf.h
    ! removed declaration for hb_dbfTranslateRec() function - this functions
      was removed many years ago

  * include/harbour.hbx
  * src/harbour.def
    ! fixed order of declared functions - they should be sorted.
2025-01-20 10:43:30 +01:00
Przemysław Czerpak
8ef93ac2a1 2025-01-19 14:33 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rdd/dbfcdx/dbfcdx1.c
    % Removed always false dummy condition. For
         pPage->TagParent->MaxKeys >= 2 &&
         ( ( iKeys + pPage->TagParent->MaxKeys - 1 )
                   / pPage->TagParent->MaxKeys ) == 1
      the expression
         iKeys > ( ( pPage->TagParent->MaxKeys * 3 ) >> 1 )
      was alwas false.
      As side effect this modification pacifies the buggy GCC warnings.
2025-01-19 14:33:34 +01:00
Przemysław Czerpak
60e9a0e663 2025-01-18 05:03 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rdd/dbfnsx/dbfnsx1.c
  * src/rtl/dates.c
  * src/rtl/hbtoken.c
    ! pacified few stupid warnings
2025-01-18 05:03:36 +01:00
Aleksander Czajczynski
bdc240ed99 2025-01-10 10:15 UTC+0100 Aleksander Czajczynski (hb fki.pl)
* src/rtl/listbox.prg
    * merged #371 from Kamil, thanks for the patch.
      Applied minor reformat .NOT. -> ! and added a comment
      about buggy ListBox:hitTest() on no-box dropdown in
      Cl*pper 5.3.
2025-01-10 10:15:24 +01:00
Kamil Przybylski
9fe5df8f5c 2025-01-09 12:00 UTC+0100 Kamil Przybylski (kprzybylski quay.pl)
* src/rtl/listbox.prg
    ! fixed nTop not being incremented in ListBox:hitTest() for no-box dropdown
    * replaced inconsistent references to ::nTop with nTop
    * renamed variables to better reflect their role
2025-01-09 12:00:03 +01:00
Kamil Przybylski
2b6acca9ca 2025-01-08 13:14 UTC+0100 Kamil Przybylski (kprzybylski quay.pl)
* src/rtl/listbox.prg
    ! fixed nTop variable not being assigned properly in ListBox:hitTest()
2025-01-08 13:14:11 +01:00
Aleksander Czajczynski
cb9888c76d 2025-01-07 12:24 UTC+0100 Aleksander Czajczynski (hb fki.pl)
* src/common/hbver.c
    * indent cleanup

  * src/rtl/filesys.c
  * src/rtl/fssize.c
    ! restore dynamic calling of GetFileAttributesEx() on
      Windows (significant only on very old systems)
2025-01-07 12:24:59 +01:00
Aleksander Czajczynski
a23ea4904f 2024-12-29 00:28 UTC+0100 Aleksander Czajczynski (hb fki.pl)
* src/rtl/hbproces.c
    ! in process creating functions like hb_processRun(), *Open(),
      on Android: don't use setuid( getuid() ) method for resetting
      attributes as it rises "Bad system call" and the process is not
      executed. This fixes building Harbour in hbmk2 stage on Android
      device itself (for example using Termux) and can fix deploying
      multi-process Android apps. For devices older than Android 8,
      where the kernel was not hardened, please report any regresions,
      if you have such multi-process deployments.

  * ChangeLog.txt
    % stripped spaces before EOLs
2024-12-29 00:27:36 +01:00
Przemysław Czerpak
1b57427dff 2024-12-13 09:06 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/compiler/harbour.y
  * src/macro/macro.y
    * replaced depreciated bison macro %pure-parser with %define api.pure

  * src/compiler/complex.c
  * src/macro/macrolex.c
  * src/compiler/harbour.y
  * src/macro/macro.y
    * replaced depreciated bison macro %name-prefix with %define api.prefix

  ; Warning: now Bison 2.6 or newer is required to regenerate Harbour grammar
             files. If someone wants/needs to work with older bison versions
             then it's enough to restore depreciated macros, Harbour compiler
             and macros lexers will work with both versions.

  * src/compiler/harbour.yyc
  * src/compiler/harbour.yyh
  * src/macro/macro.yyc
  * src/macro/macro.yyh
    * regenerated with Bison 3.02 (the same as before)
    * re-added HB_SYMBOL_UNUSED( yynerrs ) to pacify some compilers warnings
2024-12-13 09:06:17 +01:00
Przemysław Czerpak
68af17b1c4 2024-12-12 21:30 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/compiler/genc.c
    ! fixed detection of C function written in C inside
      #pragma BEGINDUMP / #pragma ENDDUMP
2024-12-12 21:30:39 +01:00
Przemysław Czerpak
733cf0e675 2024-12-12 21:18 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* ChangeLog.txt
  * contrib/gtqtc/gtqtc.h
  * contrib/gtqtc/gtqtc1.cpp
  * contrib/hbzebra/datamtrx.c
  * contrib/sddoci/core.c
  * src/compiler/genc.c
    ! reverted my unintentional commit from dummy branch
2024-12-12 21:18:01 +01:00
Przemysław Czerpak
0ef2032e51 Reapply "2024-12-12 20:46 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)"
This reverts commit af7b3d23ba.
2024-12-12 20:51:11 +01:00
Przemysław Czerpak
af7b3d23ba Revert "2024-12-12 20:46 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)"
This reverts commit 72d0775509.
2024-12-12 20:51:02 +01:00
Przemysław Czerpak
72d0775509 2024-12-12 20:46 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/xhb/hbcompat.ch
    ! fixed HSetAACompatibility() #xtranslate

  * contrib/hbzebra/code39.c
    * pacified warning, it's also fix for possible buffer overflow.

  * include/hbcomp.h
  * src/compiler/genc.c
  * src/compiler/hbmain.c
    * replaced function hb_compFunctionMarkStatic() with
      hb_compFunctionSetScope()

  * src/compiler/genc.c
    * detect public prg functions written in C inside
      #pragma BEGINDUMP / #pragma ENDDUMP and mark them as LOCAL ones

  * src/vm/hvm.c
    ! removed my pseudo fix from 2023-01-30 15:18 UTC+0100 Przemyslaw Czerpak.
      It was ugly hack which can work only with some linkers.
      This modification fixes FILE() function used with C functions written
      without own symbol table

  * src/rdd/dbf1.c
    * minor code formatting
2024-12-12 20:46:23 +01:00
Przemysław Czerpak
683b4763bd 2024-12-11 19:35 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/xhb/hbcompat.ch
    ! fixed HSetAACompatibility() #xtranslate

  * contrib/hbzebra/code39.c
    * pacified warning, it's also fix for possible buffer overflow.

  * include/hbcomp.h
  * src/compiler/genc.c
  * src/compiler/hbmain.c
    * replaced function hb_compFunctionMarkStatic() with
      hb_compFunctionSetScope()

  * src/compiler/genc.c
    * detect public prg functions written in C inside
      #pragma BEGINDUMP / #pragma ENDDUMP and mark them as LOCAL ones

  * src/vm/hvm.c
    ! removed my pseudo fix from 2023-01-30 15:18 UTC+0100 Przemyslaw Czerpak.
      It was ugly hack which can work only with some linkers.
      This modification fixes FILE() function used with C functions written
      without own symbol table

  * src/rdd/dbf1.c
    * minor code formatting
2024-12-11 19:35:25 +01:00
Aleksander Czajczynski
b547517db1 2024-12-04 15:25 UTC+0100 Aleksander Czajczynski (hb fki.pl)
* src/common/hbver.c
    ! added lacking VER_BUILDNUMBER definition that is missing
      in very old compiler sets/SDKs (pre Windows 2000),
      noticed by DF7BE - Wilfried Brunken in #362

  * README.md
    * slightly updated list of supported compilers and
      examples to mention MSVC for ARM64 and Clang

  * ChangeLog.txt
    * hb_scan -> hb_hscan in prev
2024-12-04 15:25:32 +01:00
Lailton
ccbf3a75ba 2024-12-03 01:27 UTC-0300 Lailton Fernando Mariano (lailton/at/paysoft.com.br)
* src/vm/hashfunc.c
    ! fixed issue hb_scan when we are looking for a logical value as true.
      Many thanks to Marcos Gambeta who found the problem.
2024-12-03 01:35:51 -03:00
mdlugosz65
4ae51516c2 2024-10-28 16:57 UTC+0100 Aleksander Czajczynski (hb fki.pl)
* src/rdd/dbf1.c
    ! reading varchar binary field ("Q:B") from a .dbf
      could free a wrong pointer in the record buffer.
      Bug located and fixed by Marek.
2024-10-28 16:57:47 +01:00
Aleksander Czajczynski
a8693f92df 2024-10-18 07:56 UTC+0200 Aleksander Czajczynski (hb fki.pl)
* src/common/hbver.c
    * guard Win10 build number getter from the unknown,
      using old Win32 API that is not going to be deprecated.
2024-10-18 07:57:08 +02:00
Aleksander Czajczynski
c88029eee9 2024-10-17 15:04 UTC+0200 Aleksander Czajczynski (hb fki.pl)
* .github/workflows/windows-ci.yml
    * update windows MSYS2 integration runner set of
      requested packages. PGSQL, Firebird and MariaDB libs
      are no longer available in the 32-bit environment

    + add clang x86_64 compiler for testing under this CI

  * include/harbour.hbx
  * include/hbapi.h
  * src/common/hbver.c
  * src/harbour.def
  * src/rtl/version.c
    ! fixed Windows 11 detection, by vendor likings it has
      NT Kernel Version stamped with 10.0, so now Build Number
      is more significant as a recognition factor.

    + new C helper functions hb_winisbuild(), hb_iswin11()

    + added PRG function hb_osIsWin11()

    * also try to detect new Windows Server versions

  * config/win/clang.mk
  * utils/hbmk2/hbmk2.prg
  * ChangeLog.txt
    ! recursion happening in the Makefiles rendered recently
      introduced compatibility option unreliable. Changed to
      use separate variable: HB_USER_FIXES=--mingw-script
      You don't need it, the problem shouldn't exist, but
      anyway...
2024-10-17 15:04:53 +02:00
Aleksander Czajczynski
77d37481be 2024-10-07 11:40 UTC+0200 Aleksander Czajczynski (hb fki.pl)
* config/global.mk
    ! detect ARM64 CPU on Windows also under non-native shell (MSYS2 sh)

    * on unix also recognize aarch64 from uname

  * include/hbsetup.h
    * __MINGW64__ define is not x86_64 specific anymore

  * config/win/clang.mk
  * utils/hbmk2/hbmk2.prg
    * reworked Clang on Windows detection (ARM64, x86_64, x86),
      now it recognizes those flavours in PATH as distributed
      by MSYS2 project and also Visual Studio 2022 Build tools.

      Starting Harbour build process should be now possible
      both from MSYS2 shell (with the special note to use "make"
      command instead of "win-make" from sh) and regular batch
      script/cmd shell.

      Building on Clang distributed by MS x86_64:
      PATH=<InstallPath>\BuildTools\VC\Tools\Llvm\x64\bin;%PATH%
      win-make

      Clang/MS ARM64:
      PATH=<InstallPath>\BuildTools\VC\Tools\Llvm\ARM64\bin;%PATH%
      win-make

      Building on Clang x86_64 distributed by MSYS2 from cmd:
      PATH=C:\msys64\clang64\bin;%PATH%
      win-make

      Clang/MSYS ARM64 called from cmd:
      PATH=C:\msys64\clangarm64\bin;%PATH%
      win-make

  * src/common/hbver.c
    * patched clang version string builder to skip duplicate version
      number in some builds

    * append processor architecture to clang compiler string
      on non-Intel systems
2024-10-07 11:40:17 +02:00
Aleksander Czajczynski
1044334a0d 2024-09-14 21:26 UTC+0200 Aleksander Czajczynski (hb fki.pl)
* tests/speedtst.prg
    ! fix recursion bug i've made

  * contrib/hbdoc/hbdoc.prg
  * contrib/hbformat/utils/hbformat.prg
  * contrib/hbnetio/utils/hbnetio/hbnetio.prg
  * package/harbour.mft
  * package/harbour.rc
  * src/compiler/hbusage.c
  * utils/hbi18n/hbi18n.prg
  * utils/hbtest/hbtest.prg
    * bumped copyright year to 2024
2024-09-14 21:26:30 +02:00
Aleksander Czajczynski
26849d3292 2024-09-14 18:36 UTC+0200 Aleksander Czajczynski (hb fki.pl)
+ config/win/msvcarm.mk
  + config/win/msvcarm64.mk
  * config/global.mk
  * include/hbsetup.h
  * utils/hbmk2/hbmk2.prg
    + introduced support for Windows (10,11) ARM 64-bit platform
      native compilers using Visual Studio 2022 Build Tools

      before calling win-make, setup environment with:
      <InstallPath>\BuildTools\VC\Auxiliary\Build\vcvarsarm64.bat

      toolchain should be autodetected as following:
      ! HB_HOST_PLAT: win (arm64)  HB_SHELL: nt
      ! HB_PLATFORM: win (arm64) (auto-detected)
      ! HB_COMPILER: msvcarm64 (auto-detected: C:/Program[...]/ARM64/)

      to build final application with hbmk2 adding a valid Windows
      Platform SDK / CRT paths to INCLUDE= and/or LIB= variable
      is needed

    ; cross compilation from AMD64 hosts is possible:
      vcvars64.bat
      win-make (build Harbour for your host first)
      set HB_HOST_BIN=<HarbourPath>\bin\win\msvc64
      vcvarsamd64_arm64.bat
      win-make

    + also added support for Windows for ARM 32-bit

      before calling win-make, setup environment using:
      <InstallPath>\BuildTools\VC\Auxiliary\Build\vcvarsarm.bat
      or when cross compiling from ARM64 host:
      <InstallPath>\BuildTools\VC\Auxiliary\Build\vcvarsarm64_arm.bat

    ; please test Windows CE builds if you're using compiler newer
      than VC2003 for ARM for possible regressions

  * contrib/hbmlzo/3rd/minilzo/lzodefs.h
    ! recognize ARM64 architecture on Windows to fix build error

    ; consider updating to upstream minilzo 2.10, issue is fixed there

  * src/common/hbver.c
    * changed to add processor architecture for MSVC compiler string
      on non-Intel systems, as exposed by hb_compiler(), harbour /build,
      finalapp.exe //build

  * tests/speedtst.prg
    * workaround that processor architecture can now appear
      in hb_compiler(), so it's not printed by speed test twice
2024-09-14 18:35:40 +02:00
Przemysław Czerpak
368508e403 2024-08-17 17:37 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/xhb/xhberror.c
    % cleaned code] to overload ERRORNEW() with XHB_ERRORNEW()

  * src/rtl/fscopy.c
    % removed unnecessary code

  * src/rtl/vfile.c
    ! fixed typo in comment

  * src/vm/dynsym.c
    + allow to use symbol items as parameter in functions:
      hb_IsFunction(), __dynsGetIndex(), __dynsIsFun()
2024-08-17 17:37:12 +02:00
Przemysław Czerpak
96c050bafd 2024-07-22 13:37 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/xhb/xhberror.c
    ! fixed very bad bug introduced in this modification:
         2023-01-31 23:19 UTC+0100 Przemyslaw Czerpak
      It corrupted dynamic symbol table due to stupid mistake.
      I overloaded whole function symbol instead of its address only.
      Many thanks to Juan Gálvez who found the problem.

  * include/hbdefs.h
    ! fixed INT64_MIN definition

  * src/vm/dynsym.c
    * minor change in function order

  * src/vm/memvars.c
    + allow to use symbol items in the following functions:
      __mvScope(), __mvExist(), __mvGet(), __mvGetDef(), __mvPut()
2024-07-22 13:37:46 +02:00
Przemysław Czerpak
a10feba63c 2024-05-13 02:39 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* ChangeLog.txt
  * src/rtl/fscopy.c
    ! fixed typos, thanks to Grigory Filatov and Pete

  * include/harbour.hbx
  * src/harbour.def
    ! added hb_vfCopyFileEx() and hb_fileCopyEx()
2024-05-13 02:39:42 +02:00
Przemysław Czerpak
1c70367da5 2024-05-09 23:23 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/hbapifs.h
  * src/rtl/fscopy.c
    + added new C function:
         HB_BOOL hb_fileCopyEx( const char * pszSource, const char * pszDest,
                                HB_SIZE nBufSize, HB_BOOL fTime,
                                PHB_ITEM pCallBack );
      Unlike hb_fileCopy() it is never redirected to remote server and copy
      operation is always done locally.
      pCallBack is codeblock or function symbol, it's executed at the
      beginning and then on each nBufSize bytes written and receives two
      parameters: nBytesWritten, nTotalSize.
      Warning: nTotalSize could be 0 when non regular files like pipes or
               sockets are copied.

  * src/rtl/vfile.c
    + added new PRG function:
         hb_vfCopyFile( <cFileSrc>, <cFileDst>, [<nBufSize>=65536], ;
                        [<lTimePreserve>=.t.], [<bCallBack>] ) --> <nResult>
      It's wrapper to hb_fileCopyEx() C function.
      For very big files setting <nBufSize> to greater value, i.e. 16777216
      may increase performance.
2024-05-09 23:23:26 +02:00
Przemysław Czerpak
a5ad762cb0 2024-03-07 13:41 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/gtqtc/gtqtc.hbp
    ! do not detect QT5 when HB_BUILD_3RDEXT=no is set

  * debian/rules
    * removed LD_LIBRARY_PATH setting

  * src/rdd/dbcmd.c
  * src/rdd/wacore.c
    ! moved code checking WA number from DbSelectArea() PRG function
      to hb_rddSelectWorkAreaNumber() C function. It fixes few things
      like:
         DbSelectArea( 0 )
      and also:
         ? ( 0 )->( select() )
2024-03-07 13:41:15 +01:00
Przemysław Czerpak
050666d2d9 2024-02-16 18:23 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbexpat/3rd/expat/expat.diff
  * contrib/hbexpat/3rd/expat/loadlibr.c
    ! use HB_WINAPI_GETPROCADDRESS() instead of GetProcAddress()
      in WinCE builds

  * contrib/hbhpdf/3rd/libhpdf/hpdfstre.c
  * contrib/hbhpdf/3rd/libhpdf/libhpdf.diff
    ! include <windows.h> in WinCE builds, it's necessary for GetLastError()

  * src/3rd/jpeg/Makefile
    ! do not use getenv() in all WinCE builds

  * src/common/hbver.c
    * cast revision number to HB_ULONG to pacify warning

  * src/vm/extrap.c
    ! do not compile unused in WinCE builds hb_winExceptionHandler()

  * include/hbapi.h
    * added HB_EXPORT attribute to hb_macroTextValue() function

  * include/hbvm.h
  * src/vm/hvm.c
    + added C function:
         PHB_ITEM hb_vmCompileMacro( const char * szExpr, PHB_ITEM pDest );
      It returns Harbour item or NULL at error (wrong macro text).
      The result should be used with hb_vmEvalBlockOrMacro() and then freed
      by hb_vmDestroyBlockOrMacro(). It hides low level macro representation
      so we can change it in the future. Now it's still simple pointer item
      without autodestructor.

  * src/rdd/hsx/hsx.c
  * src/rdd/workarea.c
    * use hb_vmCompileMacro() instead of hb_macroCompile()

  * src/vm/runner.c
    * changed 6101 error message for "Unknown or unregistered symbol"
      to "Unknown or unregistered function symbol".
    * report above error when HRB module is loaded and its external function
      is not registered or not marked as DYNAMIC by earlier registered modules
      in HVM symbol table.
      Warning. This modification may exploit problems in code loading HRB files
      with cross references which has worked so far. In such case user should
      pass to hb_hrbLoad()/hb_hrbRun() as first parameters flags containing
      HB_HRB_BIND_LAZY or declare the problematic function in his main code
      as dynamic, i.e.:
         DYNAMIC <funcName>

  * src/rdd/dbf1.c
    * declare internal function hb_dbfTransCheckCounters() as static one

  * src/harbour.def
    ! added missing exported Harbour functions
2024-02-16 18:23:21 +01:00