Commit Graph

9 Commits

Author SHA1 Message Date
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
Viktor Szakats
9f16c2bf8e 2017-08-13 18:27 UTC Viktor Szakats (vszakats users.noreply.github.com)
* *
    * update copyright headers with new FSF postal address
    * COPYING.txt -> LICENSE.txt (rest of repo to be synced)
2017-08-13 18:38:59 +00:00
Przemysław Czerpak
8465bce36b 2016-07-04 19:01 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/gtwvg/wvgcore.c
  * contrib/gtwvg/wvgcuig.c
    ! use HB_MIN() macro instead of non-standard min() function
    ! use casting to double instead of float which may strip significant
      bits from 32bit numbers

  * include/hbapicdp.h
    + added hb_cdpGetID() macro
    * formatting

  * src/rtl/hbjson.c
    * modified codepage parameter behavior in JSON encode/decode functions.
      Now they can be used for codepage translation.

  * src/rtl/gtwvt/gtwvt.c
    * ignore national characters when WM_SYSCHAR message is generated.
      It should resolve the problem with Greek keyboard layout reported
      by Pete anyhow it's possible that it may create new problems with
      some other keyboard layouts so please report them if any.
2016-07-04 19:01:10 +02:00
Viktor Szakats
58faf91453 2016-01-14 19:17 UTC+0100 Viktor Szakats (vszakats users.noreply.github.com)
* *
    % remove brandings and homepage [1] from copyright header. Pass 1 - using script.
      [1] nobody has access to it anymore AFAIK - and it's also just
          a redirect since long
    ! update url in copyright header
    ; this should make the diff between 3.4 and 3.2 easier to manage
2016-01-14 19:18:17 +01:00
Przemysław Czerpak
085e7eb3a5 2014-12-03 11:46 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/hbexprb.c
    ! fixed GPF in compilation of this code:
         DO hb_i18n_getText

  * include/achoice.ch
  * include/blob.ch
  * include/dbinfo.ch
  * include/hbapi.h
  * include/hbapicdp.h
  * include/hbatomic.h
  * include/hbclass.ch
  * include/hbinit.h
  * include/hbsetup.ch
  * include/hbsetup.h
  * include/inkey.ch
  * include/ord.ch
  * include/simpleio.ch
  * src/common/hbver.c
  * src/rtl/hbi18n2.prg
  * src/rtl/val.c
    * synced with Viktor's branch (casing, formatting, comment updating,
      clang support, use hb_FReadLen(), use hb_GetStdIn(), removed redundant
      casting)

  * include/fileio.ch
    + added HB_FLX_* constants

  * include/harbour.hbx
    * added __wapi_GetConsoleOutputCP()

  * include/hbapi.h
  * src/common/hbver.c
    + added hb_iswin*() functions borrowed from Viktor's branch
2014-12-03 11:46:13 +01:00
Przemysław Czerpak
da82de17b1 2014-05-06 17:32 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rtl/cdpapi.c
  * src/rtl/iousr.c
  * src/rtl/hbjson.c
  * src/rtl/gtcrs/gtcrs.c
  * src/rtl/gtsln/gtsln.c
  * src/rtl/gttrm/gttrm.c
  * src/rtl/gtxwc/gtxwc.c
  * src/rdd/workarea.c
  * src/rdd/hbsix/sxcompr.c
  * contrib/hbct/token2.c
  * contrib/hbsqlit3/core.c
    * pacified some of -Wshadow warnings

  * include/hbapicdp.h
    ! typo in comment: bytes -> bits

  * src/vm/garbage.c
  * src/vm/thread.c
    * disabled some code with spinlocks when HB_HELGRIND_FRIENDLY macro
      is defined. It causes that final MT HVM code is slower using native
      platform mutexes but only such ones helgrind can recognize so the
      new macro can be useful for people who want to make some tests with
      helgrind. In such case they should rebuild Harbour with
         HB_USER_CFLAGS=HB_HELGRIND_FRIENDLY
      We use spinlocks and atomic integer operations also in few other
      places so it's possible that deeper tests can exploit them and
      we will have to cover them by HB_HELGRIND_FRIENDLY too just to
      easy detect real problems.
2014-05-06 17:32:45 +02:00
Przemysław Czerpak
e34407ad88 2013-12-23 17:11 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/hbapicdp.h
  * include/hbapiitm.h
  * src/rtl/itemseri.c
    * changed 2-nd parameter in hb_itemSerialize() and hb_itemSerializeCP()
      from HB_BOOL fNumSize parameter to int iFlags.
      Previous fNumSize is replaced by HB_SERIALIZE_NUMSIZE flag.
      Warning: declaration is not backward compatible though existing code
               using these functions is binary compatible so it will work
               without recompilation.
    + added support for optional compression of serialized values.
      It can be enabled in C code by HB_SERIALIZE_COMPRESS flag.
    + added support for serialization flags passed in 2-nd parameter to
      hb_Serialize() PRG function.
    ; Info: support for compression and decompression exists only in
            programs which are linked with ZLIB library. Programmers
            which want to use it and so far the haven't used ZLIB functions
            should add to their code REQUEST HB_ZCOMPRESS

  * include/Makefile
  + include/hbserial.ch
    + added header file with Harbour serialization flags.
      Now the following flags are supported:
         HB_SERIALIZE_NUMSIZE
         HB_SERIALIZE_COMPRESS
      I'll add support for HB_SERIALIZE_OBJECTSTRUCT soon.

  * src/rtl/hbi18n1.c
  * contrib/hbnetio/netiocli.c
  * contrib/hbnetio/netiosrv.c
    * updated to use new Harbour serialization flags.
2013-12-23 17:11:36 +01:00
vszakats
9687850865 2013-03-16 02:10 UTC+0100 Viktor Szakats (harbour syenar.net)
* (all files)
    * stripped svn header
    * minor cleanups
    ; use following command to find out the history of files:
       git log
       git log --follow
       git blame
       git annotate
2013-03-16 02:11:42 +01:00
vszakats
a4a357a18b 2013-03-15 11:12 UTC+0100 Viktor Szakats (harbour syenar.net)
* /harbour/* -> /*
    * moved whole Harbour source tree one level up to
      avoid single 'harbour' top dir
2013-03-15 11:13:30 +01:00