27 Commits

Author SHA1 Message Date
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
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
Przemysław Czerpak
2975eadbba 2023-01-15 11:17 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbwin/win_prn1.c
    ! fixed parameter type in font enum callback

  * include/harbour.hbx
  * src/harbour.def
  * src/rtl/hbgtcore.c
    + added two new PRG functions:
         hb_gtExists( <cGtName> ) -> <lExists>
         hb_gtList() -> <aGtNames>

  * src/rtl/hbgtcore.c
    * changed the order of defualt GT initialization. Now GT specified by -gt*
      hbmk2 option has higher priority then GT chosen by
         request HB_GT_<name>_DEFAULT

  * include/hbapi.h
  * src/vm/set.c
    + added two C functions for OS codepage translations:
         char * hb_osStrEncode2( const char * pszName,
                                 char * pszBuffer, HB_SIZE nSize );
         HB_WCHAR * hb_osStrU16Encode2( const char * pszName,
                                        HB_WCHAR * pszBufferW, HB_SIZE nSize );

  * include/hbwinuni.h
    + added HB_CHARDUP2() macro for UNICODE/ANSI OS codepage translation

  * src/common/hbgete.c
    ! fixed memory allocation in MS-Windows version of hb_getenv_buffer()

  * src/pp/hbpp.c
    ! added integer range to HB_VER_REVID definition to pacify warning

  * src/rtl/cdpapi.c
    * minor simplification
2023-01-15 11:17:33 +01:00
Przemysław Czerpak
889ef46369 2022-11-25 18:14 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/hbapi.h
  * src/vm/cmdarg.c
    ! changed returned type in hb_verSvnID() form int to HB_MAXINT

  * src/nortl/nortl.c
    ! fixed void* pointer incrementation
    ! pacified warnings

  * src/rdd/dbcmd.c
    * accept NIL value in hb_FieldPut() according to Aleksander recommendation
2022-11-25 18:14:56 +01:00
Przemysław Czerpak
580ee59412 2022-11-11 20:47 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/hbapi.h
  * src/common/hbver.c
  * src/main/harbour.c
  * src/pp/hbpp.c
  * src/rtl/version.c
  * src/vm/cmdarg.c
    ! fixed integer overflow in revision number calculated from
      the last ChangeLog entry date
2022-11-11 20:47:55 +01:00
Przemysław Czerpak
49a289a1a3 2020-03-24 23:34 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* config/linux/clang.mk
    ! fixed rule for dynamic library

  * src/3rd/png/Makefile
    + added -DPNG_ARM_NEON_OPT=0 to build flags

  * contrib/3rd/sqlite3/sqlite3.c
  * contrib/3rd/sqlite3/sqlite3.diff
    ! pacified warning

  * contrib/gtwvg/gtwvgd.c
  * contrib/gtwvg/wvgwing.c
    ! fixed missing break/return in case statements - please verify it.

  * contrib/hbct/dattime3.c
    * added #define _DEFAULT_SOURCE necessay in new Linux distors

  * contrib/hblzf/3rd/liblzf/liblzf.diff
  * contrib/hblzf/3rd/liblzf/lzfP.h
    * do not use nested #define in #if statements - some C compilers do not
      support it

  * contrib/hbssl/bio.c
    ! tuned #if condition

  * contrib/hbmisc/hbeditc.c
    * simpliefied for condition and pacified warning

  * contrib/hbodbc/hbodbc.hbp
  * contrib/sddodbc/sddodbc.hbp
    + added check for iodbc library

  * utils/hbmk2/hbmk2.prg
    + added support for clang in android builds

  * include/hbdefs.h
    + added check for __BYTE_ORDER__ macro used in some new lib C
      implementations

  * include/hbapi.h
  * include/hbdefs.h
  * include/hbstack.h
  * include/hbvmpub.h
  * src/vm/classes.c
  * src/vm/dynsym.c
  * src/vm/estack.c
  * src/vm/memvars.c
    + extended the size of dynamic symbol table from 65535 to 4294967295.
      Adopting class code I decided to keep current algorithm of method indexes
      hashing with only some minor modifications. It's very fast anyhow it may
      cause noticeable (though static) quite big memory allocation for class
      definitions in applications using millions of symbols and which increase
      dynamic symbol table at runtime loading new classes dynamically form .hrb,
      .dll, .so or other dynamic libraries supported by Harbour. It's random
      and rather impossible to exploit situation in real life anyhow I cannot
      exclude it so I'd like to report it in ChangeLog. The solution is very
      simple, i.e. it's enough to use classic divide et impera algorithm using
      symbol numbers to find method definition anyhow it will be slower then
      current one and address only very seldom hypothetical situations so I
      decided to not implement it. Such static memory cost begins to be
      completely unimportant in the world of 64-bit architectures and extremely
      big memory address space.
      The modification was sponsored by TRES company.

  * src/vm/estack.c
    ! fixed __mvClear() in MT builds - due to stupid typo GetList variable
      was removed in MT programs by CLEAR MEMORY command (__mvClear())
      So far noone reported it and I've found it analyzing the code before
      increasing symbol table size.

  * contrib/hbwin/hbolesrv.c
    * updated for new size of dynamic symbol table
2020-03-24 23:34:35 +01:00
Aleksander Czajczynski
8545d4b8b6 2018-02-11 23:40 UTC+0100 Aleksander Czajczynski (hb fki.pl)
* include/hbapi.h
  * src/common/hbver.c
  * src/harbour.def
  * contrib/hbwin/win_osc.c
    * synced Windows version detection code with Viktor's work in 3.4

  * src/main/Makefile
  + src/main/harbour.rc
    * include Windows manifest in standalone compiler - "harbour.exe /build"
      should now correctly report Windows 10. "yourapp.exe //build" plus
      in-app results still depend on manual manifest inclusion within .rc
2018-02-11 23:40:11 +01:00
Przemysław Czerpak
2b4c4b3b5f 2017-12-12 12:26 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbnf/fttext.c
  * contrib/hbnf/hbnf.hbx
    * synced with Viktor's modifications:
         - use FILE API instead of FS API
         - protection against GPF when FT area has no valid file handle
         - alternative function names which exceeds 10 character Cl*pper limit
    ! fixed handle and memory leak when new file is open in FT area which
      already has open file

  * include/harbour.hbx
  * src/harbour.def
  * src/vm/hvm.c
    + added new PRG function: __vmItemRefs( <xVal> ) -> <nRefs>
      Please remember that passed <xVal> parameter increases the counter so
      if you want to eliminate it then pass it by reference, i,e.:
         aVal := {}
         ? __vmItemRefs( aVal ), __vmItemRefs( @aVal )

  * include/hbapi.h
  * src/harbour.def
  * src/vm/arrays.c
  * src/vm/codebloc.c
  * src/vm/hashes.c
    + added new C functions:
         HB_COUNTER hb_arrayRefs( PHB_ITEM pArray );
         HB_COUNTER hb_hashRefs( PHB_ITEM pHash );
         HB_COUNTER hb_codeblockRefs( PHB_ITEM pItem );

  * src/rtl/itemseri.c
    * added new internal function to replace 3 times repeated code for
      resizing array of references.
    % use new functions to check number of references to hashes, arrays and
      objects to ignore in system detecting multiple references the items
      which have reference counter smaller then 2. Such items cannot have
      multiple references.
      In practice this modification resolves the time problem when very big
      items are serialized to the level comparable to HB_SERIALIZE_IGNOREREF
      so now this flag is useless though I'll keep it because only in such
      mode serialization code can be used as filter in streams.
      I also created binary tree to store references but after this
      modifications it is not necessary so I decided to not commit it yet.
      Please only remember that practice limit of such serialization code
      is created by physical memory attached by OS to the process. When this
      limit is exceed then swap is actively used what completely kill the
      performance. The CPU usage is reduced to less then 1% because it waits
      for restoring swapped memory pages by extremely heavy used disks. In
      such case I cannot help.
2017-12-12 12:26:24 +01:00
Viktor Szakats
5a2a287752 2017-09-08 16:00 UTC Viktor Szakats (vszakats users.noreply.github.com)
* *
    * partial sync with the 3.4 fork codebase. These are the things
      synces for the most part:
      - copyright headers
      - grammar/typos in comments and some readmes
      - comment/whitespace/decorations
      - variable scoping in C files
      - DO CASE/SWITCH and some other alternate syntax usage
      - minimal amount of human readable text in strings
      - minor code updates
      - HB_TRACE() void * casts for pointers and few other changes to
        avoid C compiler warnings
      - various other, minor code cleanups
      - only Harbour/C code/headers were touched in src, utils, contrib,
        include. No 3rd party code, no make files, and with just a few
        exceptions, no 'tests' code was touched.
      - certain components were not touched were 3.4 diverged too much
        already, like f.e. hbmk2, hbssl, hbcurl, hbexpat
      - the goal was that no actual program logic should be altered by
        these changes. Except some possible minor exceptions, any such
        change is probably a bug in this patch.
      It's a massive patch, if you find anything broken after it, please
      open an Issue with the details. Build test was done on macOS.
      The goal is make it easier to see what actual code/logic was changed
      in 3.4 compared to 3.2 and to make patches easier to apply in both
      ways.
2017-09-08 16:25:13 +00: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
Viktor Szakats
4a4f2c30ae 2017-04-25 17:45 UTC+0200 Aleksander Czajczynski (hb fki.pl)
* src/harbour.def
    ! add hb_rand*() functions, fixing hbtip regression (#154) after
      1938dd0a70

  ; import of 2014-12-10 14:38 UTC+0100 functions from Viktor's 3.4 fork
  * src/rtl/hbrand.c
    ! hb_randStr(): fixed possible GPF and other errors when passing
       negative size

  * include/harbour.hbx
  * include/hbapi.h
  * src/rtl/hbrandom.c
    + added C level hb_random_num_secure() which works like hb_random_num()
      but uses arc4 internally
    + added hb_randInt() which works the same as hb_RandomInt() but uses
      arc4 internally
    + added hb_randNum() which works the same as hb_Random() but uses
      arc4 internally
2017-04-25 17:47:05 +02:00
Przemysław Czerpak
72016f2bc3 2016-09-22 15:47 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/hbapi.h
  * include/hbvmpub.h
    * removed casting C style casting from commonly used macros

  * contrib/gtqtc/gtqtc1.cpp
    * use C++ casting instead of C casting

  * contrib/rddads/ads1.c
  * contrib/rddads/adsx.c
  * contrib/rddsql/sqlmix.c
  * src/rdd/dbfcdx/dbfcdx1.c
  * src/rdd/dbfnsx/dbfnsx1.c
  * src/rdd/dbfntx/dbfntx1.c
  * src/rdd/dbsql.c
  * src/rdd/workarea.c
    * cleaned HB_IT_* usage

  * contrib/rddads/ads1.c
    ! fixed typo in low level code of ordDescend() / DBOI_ISDESC,
      now ordDescend() should work with ADS* RDDs just like with
      native RDDs

  * contrib/hbfoxpro/relfunc.c
    ! fixed typo in Between() function - thanks to Petr Chorney

  * src/rtl/gtwvt/gtwvt.c
    ! added workaround for keyboard drivers which sets CTRL key modifier
      flag when only ALTGR is pressed - thanks to Maurizio la Cecilia
2016-09-22 15:47:08 +02:00
Przemysław Czerpak
6df7fc6132 2016-06-20 21:59 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* doc/cmpopt.txt
    * enumeration
    ! typos

  * src/codepage/uckam.c
    + added info about Kamenicky codepage number: CP895

  * include/hbapi.h
  * src/common/hbstr.c
    + added new C function:
         char * hb_dblToStr( char * szBuf, HB_SIZE nSize,
                             double dNumber, int iMaxDec );
      it converts numeric value to string trying to keep all significant
      digits in double numbers

  * include/harbour.hbx
  * src/rtl/hbntos.c
    + added new PRG function:
         hb_ntoc( <nValue> ) -> cValue
      it converts numeric value to string trying to keep all significant
      digits in double numbers

  * src/rtl/hbsocket.c
    + added support for error codes returned by
      getaddrinfo() / getnameinfo() and gethostbyname() / gethostbyaddr()

  * src/rtl/hbinet.c
    + set HB_SOCKET_ERR_WRONGADDR error code if hb_socketResolveAddr()
      returns NULL without setting error code

  * src/vm/arrays.c
  * src/vm/hashfunc.c
    ! fix hb_HScan(), AScan(), hb_AScan() and hb_RAScan() for very large
      integers with more then 53 significant bits. Such bits were lost
      after conversion to double value used in scan process

  * src/vm/itemapi.c
    * formatting

  * src/rtl/gtwvt/gtwvt.c
    ! do not convert characters received with ALTGR or ALT+CTRL flags to
      extended keycodes - some national keyboards may use such combination
      for national characters and even pure ASCII ones
2016-06-20 21:59:34 +02:00
Przemysław Czerpak
ae90545eb1 2016-01-21 20:42 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/gtalleg/gtallegd.c
  * contrib/hbamf/amfdec.c
  * contrib/hbamf/amfenc.c
  * contrib/hbbz2/core.c
  * contrib/hbbz2io/bz2io.c
  * contrib/hbct/atrepl.c
  * contrib/hbct/charrepl.c
  * contrib/hbct/envparam.c
  * contrib/hbct/pack.c
  * contrib/hbct/token2.c
  * contrib/hbfimage/fi_wrp.c
  * contrib/hbgd/gdwrp.c
  * contrib/hbgs/core.c
  * contrib/hbgzio/gzio.c
  * contrib/hbhpdf/core.c
  * contrib/hbhpdf/image.c
  * contrib/hbmlzo/core.c
  * contrib/hbmxml/core.c
  * contrib/hbodbc/odbc.c
  * contrib/hbsqlit3/core.c
  * contrib/hbssl/bio.c
  * contrib/hbssl/ssl.c
  * contrib/rddads/ads1.c
  * contrib/rddads/adsfunc.c
  * contrib/rddads/adsmgmnt.c
  * contrib/rddads/adsx.c
  * contrib/rddads/rddads.h
  * contrib/sddodbc/core.c
  * contrib/xhb/cstructc.c
  * include/hbapi.h
  * include/hbdefs.h
  * src/common/expropt1.c
  * src/common/expropt2.c
  * src/common/hbmem.c
  * src/compiler/complex.c
  * src/compiler/harbour.y
  * src/compiler/harbour.yyc
  * src/compiler/harbour.yyh
  * src/compiler/hbident.c
  * src/macro/macrolex.c
  * src/nortl/nortl.c
  * src/pp/ppcore.c
  * src/rdd/hbsix/sxcompr.c
  * src/rdd/hbsix/sxfname.c
  * src/rdd/usrrdd/usrrdd.c
  * src/rtl/cdpapi.c
  * src/rtl/filebuf.c
  * src/rtl/filesys.c
  * src/rtl/fslink.c
  * src/rtl/gtcrs/gtcrs.c
  * src/rtl/gtsln/gtsln.c
  * src/rtl/gtsln/mousesln.c
  * src/rtl/gtxwc/gtxwc.c
  * src/rtl/hbbfsock.c
  * src/rtl/hbgtcore.c
  * src/rtl/hbsocket.c
  * src/rtl/hbzlib.c
  * src/rtl/hbznet.c
  * src/rtl/hbzsock.c
  * src/rtl/iousr.c
  * src/rtl/langapi.c
  * src/vm/cmdarg.c
  * src/vm/codebloc.c
  * src/vm/hvm.c
  * src/vm/itemapi.c
  * src/vm/macro.c
  * src/vm/set.c
  * src/vm/strapi.c
    * cleaned const qualifier dropping
    ! fixed few bugs I found analyzing related code
    ; I left untouched two places in HBSSL which IMO should be fixed yet
2016-01-21 20:42:30 +01: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
74c4b51266 2015-03-05 20:46 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/hbapi.h
  * src/vm/garbage.c
    + added hb_gcDummyClear() function

  * include/hbapirdd.h
  * include/hbusrrdd.ch
    + added DBTF_CPYCTR constant value - when set in dbTransInfo.uiFlags
      then after record transfer field counters should to be copied from
      source to destination area

  * include/hbapirdd.h
  * src/rdd/wafunc.c
    + added new C functions hb_dbTransInfoPut() and hb_dbTransInfoGet()
      which allow to store and retrieve pointer to DBTRANSINFO structure
      into/from HB_ITEM with strict type verification.

  * src/rdd/wafunc.c
    * pass pointer to DBTRANSINFO structure as argument of DBI_TRANSREC
      action. It allows RDD serving destination area to decide which
      fields and how should be transferred updating uiFlags, uiItemCount
      and lpTransItems members of DBTRANSINFO.
      If RDD removes all fields from DBTRANSINFO structure (uiItemCount==0)
      or does not return HB_SUCCESS for DBI_TRANSREC action (default WA
      implementation returns HB_SUCCESS so it's not necessary to overload
      it if RDD does not make any additional operations) then record
      transfer is interrupted.
    * copy field counters only when destination area asked about it setting
      DBTF_CPYCTR in dbTransInfo.uiFlags in DBI_TRANSREC action.

  * src/rdd/dbf1.c
    * do not copy automatically updated fields when destination area
      is not empty
    * set DBTF_CPYCTR to indicate that counters should be copied from
      source to destination area when original value of automatically
      updated fields are transferred
    ; Now DBF* RDDs in Harbour respects the following rules for record
      transfer operations (COPY TO / APPEND FROM) with automatically
      updated fields:
         - COPY TO transfers original values to destination table and
           finally copy counters from the source table to destination one
           so autoincrement fields in both tables after next append will be
           initialized with the same values regardless of number of copied
           records - even if only single record is copied then counters in
           destination table will inherit next values for new record from
           the source table. Also values of RowVer and ModTime fields are
           copied from source to destination table and not updated during
           transfer operation.
         - APPEND FROM works like COPY TO (original field values and then
           counters are copied to destination table) if the source table
           supports counters and destination table is empty and FLocked()
           or opened in exclusive mode.
           If source table does not support counters for given fields, i.e.
           it is processed by transfer RDD like DELIM or SDF (RDT_TRANSFER)
           or destination table is not empty or opened in shared mode and
           FLock is not set when APPEND FROM is executed then automatically
           updated fields (counters, RowVer, ModTime) are not copied and
           initialized with new values like for each new record added to
           destination table.

  * ChangeLog.txt
    ! typo in last ChangeLog entry
2015-03-05 20:46:23 +01:00
Przemysław Czerpak
6df9526b8d 2015-03-04 11:18 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/hbapi.h
    ! fixed HB_ISMEMO() macro, original version was accepting the same
      items as HB_ISCHAR() so it was not compatible with ISMEMO() macro
      in Cl*pper.

  * src/rtl/valtype.c
    * use HB_ISMEMO() macro
2015-03-04 11:18:45 +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
36973e8622 2014-10-01 22:24 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/hbapi.h
  * src/common/hbstr.c
    + added new function hb_strAtI() - it works like hb_strAt() but it
      ignores the case of the ASCII characters

  * src/rtl/ati.c
    * renamed local static function hb_strAtI() to s_strAtI() to avoid
      conflict with new public hb_strAtI() function.

  * contrib/xhb/xhbat.c
    - removed local static function hb_strAtI() - current public hb_strAtI()
      is compatible with it.

  * contrib/sddsqlt3/core.c
    + added new code to set column type giving the highest priority SQLITE3
      declared column types.
      Please test - I haven't made any.
    ! do not cast floating point values to integer

  * contrib/hbwin/hbwin.hbx
  * contrib/hbwin/win_prn2.c
    ! fixed win_printerGetDefault() in Win9x builds - fix and some
      formatting and casting borrowed from Viktor's fork.
    + added new PRG function:
         win_PrintDataRaw( <cPrinter>, <cData> [, <cDocName>] )
                           -> <nBytesPrinted>
      It's similar to win_PrintFileRaw() but sends to given printer passed
      in 2-nd parameter <cData> instead of file body.
      On error it returns negative value.
    * cleaned casting and minor formatting

  * src/rtl/gtxwc/gtxwc.c
    + added support for HB_GTI_DISPIMAGE. It's slightly modified code sent
      by Rolf to Harbour devel list. In comparison to original version it
      supports <nDepth> as 4-th item of array with bitmap description to use
      with some other GTs which can support different color depths or can
      make conversion. It also supports bitmaps passed as strings.
    % slightly improved HB_GFX_GETPIXEL
2014-10-01 22:24:56 +02:00
Przemysław Czerpak
2e65a28363 2014-08-27 18:19 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/hbserial.ch
  * src/rtl/itemseri.c
    + added HB_SERIALIZE_IGNOREREF flag.
      This flag fully disables logic used to detect multireferences to the
      same complex (sub)items like arrays or hashes. It increses the speed
      of serialization but serialized data does not contain any information
      about refences, i.e. aVal[ 1 ] and aVal[ 2 ] in code below:
         aSub := { 1, 2, 3 }
         aVal := { aSub, aSub }
      are serialized as separated arrays. Additionally items with cyclic
      references like:
         aSub[ 2 ] := aSub
      cannot be serialized at all with HB_SERIALIZE_IGNOREREF flag because
      it will create infinite serialization loop and crash with out of
      memory message.

  * src/rtl/itemseri.c
    % rewritten algorithm used to detect cyclic and multi references in
      serialized items. The original algorithm has very high overhead when
      huge arrays were serialized, i.e. serialization of array with 1'000'000
      of subarrays needed about 30 minutes on my i5@3.30GHz. Now it needs
      less then a second and this time is only a little bit bigger then
      used by serialization with HB_SERIALIZE_IGNOREREF flag.
      This modification improve performance also in other code using Harbour
      serialization mechanism like I18N files, HBNETIO, GTNET, ... when large
      arrays or hashes are saved or transmitted.

  * include/hbapi.h
  * include/hbapicls.h
  * src/vm/arrays.c
  * src/vm/classes.c
  * src/vm/hashes.c
  * src/vm/itemapi.c
    * replaced algorithm used to detect cyclic and multi references in
      array and hash clone operations with new one similar to current
      item serial code. The speed improvement for very large arrays is
      the same as in case of serialization code.

  * src/rtl/gtsln/mousesln.c
    ! typo in while loop - synced with Viktor's branch
2014-08-27 18:19:36 +02:00
Przemysław Czerpak
7349602fcb 2014-04-01 12:33 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rtl/filebuf.c
    ! unlock HVM stack before locking local mutex and calling hb_fs*()
      functions which also unlocks HVM. It fixes possible deadlock condition
      when hb_gcAll( .T. ) is executed.

  * include/hbapi.h
  * src/vm/garbage.c
    ! changed mark function semantic.
      Adding support for user defined mark function I created race condition
      in MT GC code. It happens because blocks marked as deleted were not
      scanned by GC mark code so their subitems where not accessible.
      To fix it we have to change mark function semantic. Now mark function
      can be executed also for blocks currently deleted. It means that GC
      block destructor should clean references to just removed items and
      subblocks. The best place to make it is clearing pointers to GC blocks
      just after hb_itemRelease() or hb_gcRefFree().
      It is save to clean the reference just before hb_itemRelease() or
      hb_gcRefFree() but only for the single block passed to these functions.
      It is not save to clear reference to more then one block and then
      execute above functions.
    + check reference count after destructor execution for all blocks
      not only arrays - warning it may exploit some wrong C code.
    - removed not longer used hb_gcRefCheck() function.

  * include/hbvm.h
  * src/vm/hvm.c
    + added new internal function hb_vmLockForce()
    ! fixed to mark GC blocks with active threads

  * src/vm/thread.c
  * include/hbthread.h
    % modified sync mutexes used by xBase++ signal class emulation
      to not use item array internally
    * updated mutex destructor to new GC mark semantic
    ! mark GT items if GT is bound with thread item
    ! fixed mutex notify/subscribe code to not change GC items
      when HVM stack is unlocked
    ! use hb_vmLockForce() to eliminate potential deadlock
    + added new C function hb_threadEnterCriticalSectionGC().
      It should be used instead of hb_threadEnterCriticalSection()
      in code which manipulates GC items inside critical section.
      It's slower but eliminates possible deadlock condition.
      Please remember that remember that both functions cannot
      be used for the same mutex. So if it's necessary to use
      hb_threadEnterCriticalSectionGC() in one place then it
      has to be used in all others when the same mutex is locked.

  * src/vm/arrays.c
  * src/vm/codebloc.c
  * src/vm/hashes.c
  * src/rtl/hbgtcore.c
  * contrib/hbcurl/core.c
  * contrib/hbexpat/core.c
    * updated destructors to new GC mark semantic

  * contrib/hbxpp/dllx.c
    ! fixed destructor for pointer item created by DllPrepareCall()
      Now it respects reference counter.
    ; added note about real behavior of library handle destructor,
      I haven't changed existing code behavior but maybe it should
      be done.

  * contrib/xhb/hbserv.c
  * src/debug/dbgentry.c
  * src/rdd/wacore.c
    ! fixed possible deadlocks by using hb_threadEnterCriticalSectionGC()
      instead of hb_threadEnterCriticalSection().

  * contrib/hbmemio/memio.c
    ! slightly modified hb_memfsDirectory() code to avoid race condition
      without using hb_threadEnterCriticalSectionGC()

  * src/vm/fm.c
    % reduce the lock range in HB_FM_STAT builds

  * src/rtl/hbsocket.c
    ! added missing HVM stack unlocking in hb_socketSelect() function

  * src/rtl/gtxwc/gtxwc.c
    ! added few missing locks for version compiled with HB_XWC_XLIB_NEEDLOCKS

  * src/rdd/dbtotal.prg
    * allow to use symbols instead of codeblocks
    * modified Harbour extension which uses ordKey() as default group
      signature to work also without index. In such case all records
      are summarized into single one.

  ; Most of above modifications were critical for stability of MT programs.
    They should allow to activate GC in any place.
2014-04-01 12:33:17 +02:00
Przemysław Czerpak
45a2a56a69 2014-03-27 15:03 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/rddads/ads1.c
    * do not call memset() with zero length

  * include/hbapi.h
  * src/vm/fm.c
    + added new FM statistic C function:
         const char * hb_xinfo( void * pMem, HB_USHORT * puiLine );

  * src/rtl/filebufd.c
  * src/rtl/iousr.c
    * modified casting to pacify more restrictive strict aliasing warnings

  * src/vm/garbage.c
    * minor formatting
2014-03-27 15:03:58 +01:00
Przemysław Czerpak
3713e7046e 2013-05-23 18:16 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/hbapi.h
  * src/vm/hvm.c
    * keep natural internal order in newly created hashes
2013-05-23 18:16:04 +02:00
Przemysław Czerpak
b9a30a4577 2013-03-05 11:53 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/hbapi.h
  * include/hbapigt.h
  * include/hbvm.h
  * src/rtl/inkeyapi.c
  * src/vm/cmdarg.c
  * src/vm/hvm.c
    * replaced hb_cmdargProcessVM() with hb_cmdargProcess() and removed
      unused for long time custom user cancel key functionality.
    - removed dummy hb_inkeySetCancelKeys() C function.
    - removed not used for long time HVM C functions and macros:
         hb_vmFlagEnabled(), hb_vmFlagSet(), hb_vmFlagClear(),
         HB_VMFLAG_HARBOUR, HB_VMFLAG_ARRSTR

  * include/hbgtinfo.ch
    + added new HB_GTI_* actions:
         HB_GTI_WINHANDLE   - Get console window low level handle
         HB_GTI_MOUSEPOS_XY - Get mouse position in pixels
         HB_GTI_DISPIMAGE   - Display image with given name

  * include/hbapigt.h
  * src/rtl/inkeyapi.c
    + added new C function: int hb_inkeyKeyMod( int iKey )
    + added code for translation from extended key codes to
      standard Clipper ones

  * include/harbour.hbx
  * src/rtl/inkey.c
    + added new PRG function hb_keyMod( <nExtKey> ) -> <nModifiers>
      It extract keyboard modifiers (HB_KF_*) from extended key code.

  * include/hbgtcore.h
  * src/rtl/hbgtcore.c
    + added new macros for generating extended key codes with keyboard
      modifiers for ASCII and UNICODE characters
    % strip repeated extended key codes for mouse move
    ! use standard key codes in extended ALERT() GT method

  * include/inkey.ch
    + added key modifiers/flags for extended key codes: HB_KF_*
    + added extended key codes: HB_KX_*
    - removed unused HB_K_MULTICODE macro

  * src/rtl/gttrm/gttrm.c
    * replaced old keyboard and mouse code with new one using
      extended key codes for keyboard and mouse
    + added support for keyboard modifiers in GPM events
    + added support for keyboard modifiers in terminal mouse events

  * src/rtl/gtwvt/gtwvt.h
  * src/rtl/gtwvt/gtwvt.c
    ! invert selection region in WinCE builds
    ! fixed selection in fullscreen or maximized modes with margins
    * do not add EOL to one line selections
    + added support for painting box drawing characters.
      This mode can be enabled by:
         hb_gtInfo( HB_GTI_FONTATTRIBUTE, HB_GTI_FONTA_DRAWBOX )
      and it causes that GTWVT draws all box characters as pixmap
      regardles of used font.
      So far this functionality existed only in GTXWC.
    + added support for HB_GTI_FONTA_FIXMETRIC and HB_GTI_FONTA_CLRBKG
      So far this functionality existed only in GTXWC.
    + added support for HB_GTI_WINHANDLE
    ! do not add EOL at the end of one line selection

  * src/rtl/gtxwc/gtxwc.h
  * src/rtl/gtxwc/gtxwc.c
    * replaced old keyboard and mouse code with new one using
      extended key codes for keyboard and mouse
    * renamed HB_GTXWC_* box drawing macros to HB_BOXCH_* ones
    * do not add EOL to one line selections
    ! fixed few keypad keycodes
    * use cursor blinking rate HB_GTI_CURSORBLINKRATE for whole
      show/hide period not only half of them. If someone use this
      GTI action in his code then now he should double passed
      value. [incompatible]
    ! fixed return value for HB_GTI_SETPOS_ROWCOL
    * few minor cleanups

  * tests/gtkeys.prg
    * replaced old keyboard and mouse code with new one using
      extended key codes for keyboard and mouse
    + added description for some key codes
    + added some initial HB_GTI_* actions
    + change cursor size by K_INS
    + display terminal size after HB_K_RESIZE
    + display mouse position after mouse key codes
    ! display all characters created by hb_keyChar()
    ! fixed formatting

  * src/rdd/dbf1.c
    * added more general protection against GPF in not fully
      initialized workarea
2013-04-22 15:38:35 +02:00
Viktor Szakats
b414d00664 2013-04-05 16:24 UTC+0200 Viktor Szakats (harbour syenar.net)
* bin/check.hb
  * tests/fixcase.hb
    + some exceptions for casing
    * deleted one file exception (a readme)

  * contrib/gtwvg/gtwvgd.c
  * contrib/gtwvg/wvgcore.c
  * contrib/gtwvg/wvgcuig.c
  * contrib/gtwvg/wvgwin.c
  * contrib/gtwvg/wvgwing.c
  * contrib/hbamf/amfenc.c
  * contrib/hbbz2/core.c
  * contrib/hbct/ctcom1.c
  * contrib/hbct/ctcom2.c
  * contrib/hbct/ctnet.c
  * contrib/hbct/ctstr.c
  * contrib/hbct/ctwfunc.c
  * contrib/hbct/ctwin.c
  * contrib/hbct/disk.c
  * contrib/hbct/finan.c
  * contrib/hbct/screen2.c
  * contrib/hbct/token1.c
  * contrib/hbct/token2.c
  * contrib/hbct/trig.c
  * contrib/hbgd/gdwrp.c
  * contrib/hbhpdf/image.c
  * contrib/hbmisc/irm.c
  * contrib/hbnetio/netiocli.c
  * contrib/hbnetio/netiosrv.c
  * contrib/hbnetio/readme.txt
  * contrib/hbnf/dispc.c
  * contrib/hbnf/ftattr.c
  * contrib/hbnf/origin.c
  * contrib/hbssl/ssl.c
  * contrib/hbwin/wapi_commctrl.c
  * contrib/hbwin/wapi_winuser.c
  * contrib/hbwin/win_dlg.c
  * contrib/hbwin/win_prn2.c
  * contrib/hbwin/win_shell.c
  * contrib/rddads/ads1.c
  * contrib/rddads/adsfunc.c
  * contrib/xhb/fparse.c
  * contrib/xhb/hbcrypt.c
  * contrib/xhb/hbserv.c
  * contrib/xhb/hbxml.c
  * contrib/xhb/txtline.c
  * contrib/xhb/xhbarr.c
  * contrib/xhb/xhbarrex.c
  * extras/gfspell/spellc.c
  * extras/gtwvw/gtwvwd.c
  * extras/gtwvw/hbgtwvw.h
  * extras/gtwvw/wvwcheck.c
  * extras/gtwvw/wvwdraw.c
  * extras/gtwvw/wvwedit.c
  * extras/gtwvw/wvwfuncs.c
  * extras/gtwvw/wvwmenu.c
  * extras/gtwvw/wvwpush.c
  * extras/gtwvw/wvwstbar.c
  * extras/gtwvw/wvwtbar.c
  * include/hbapi.h
  * include/hbapirdd.h
  * include/hbdefs.h
  * include/hbexpra.c
  * include/hbexprb.c
  * include/hbpcode.h
  * include/hbpp.h
  * include/hbrddcdx.h
  * include/hbrddnsx.h
  * src/codepage/cp_utf8.c
  * src/common/expropt1.c
  * src/common/expropt2.c
  * src/compiler/cmdcheck.c
  * src/compiler/genc.c
  * src/compiler/gencc.c
  * src/compiler/hbfunchk.c
  * src/compiler/hbopt.c
  * src/pp/pplib.c
  * src/rdd/dbcmd.c
  * src/rdd/dbf1.c
  * src/rdd/dbfcdx/dbfcdx1.c
  * src/rdd/hbsix/sxcompr.c
  * src/rdd/hbsix/sxord.c
  * src/rdd/hsx/hsx.c
  * src/rtl/chruni.c
  * src/rtl/cputime.c
  * src/rtl/dateshb.c
  * src/rtl/filehb.c
  * src/rtl/filesys.c
  * src/rtl/gtsln/gtsln.c
  * src/rtl/gtwvt/gtwvt.c
  * src/rtl/gtxwc/gtxwc.c
  * src/rtl/hbgtcore.c
  * src/rtl/hbinet.c
  * src/rtl/hblpphb.c
  * src/rtl/hbmd5.c
  * src/rtl/hbproces.c
  * src/rtl/hbsocket.c
  * src/rtl/hbsockhb.c
  * src/rtl/hbtoken.c
  * src/rtl/hbzlib.c
  * src/rtl/hbzlibgz.c
  * src/rtl/langapi.c
  * src/rtl/mlcfunc.c
  * src/rtl/philes.c
  * src/rtl/soundex.c
  * src/rtl/strzero.c
  * src/rtl/transfrm.c
  * src/vm/arrayshb.c
  * src/vm/classes.c
  * src/vm/dynsym.c
  * src/vm/eval.c
  * src/vm/garbage.c
  * src/vm/hvm.c
  * src/vm/macro.c
  * src/vm/memvars.c
  * src/vm/runner.c
  * src/vm/set.c
  * src/vm/thread.c
    * run tests/fixcase.hb now that it's able to fixup casing
      inside all comments
2013-04-05 16:27:40 +02: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