Commit Graph

19609 Commits

Author SHA1 Message Date
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
d55bdd18b7 2017-09-07 08:38 UTC Viktor Szakats (vszakats users.noreply.github.com)
* contrib/hbct/charsprd.c
  * contrib/hbct/dattime3.c
  * contrib/hbct/expand.c
  * contrib/hbct/misc2.c
  * contrib/hbct/screen2.c
  * contrib/hbcurl/core.c
  * contrib/hbfship/strpeek.c
  * contrib/hbnetio/netiocli.c
  * contrib/hbwin/olecore.c
  * contrib/rddads/adsx.c
  * contrib/rddads/rddads.h
  * contrib/rddsql/sqlmix.c
  * contrib/sddmy/core.c
  * contrib/sddpg/core.c
  * contrib/xhb/hbcompat.h
  * contrib/xhb/hbxml.c
  * contrib/xhb/xhb.h
  * src/common/hbstr.c
  * src/compiler/harbour.y
  * src/compiler/harbour.yyc
  * src/compiler/hbcmplib.c
  * src/macro/macrolex.c
  * src/rdd/dbffpt/dbffpt1.c
  * src/rdd/hbsix/sxcompr.c
  * src/rdd/hbsix/sxcrypt.c
  * src/rdd/hbsix/sxtable.c
  * src/rdd/hsx/hsx.c
  * src/rtl/cdpapi.c
  * src/rtl/gtcrs/gtcrs.c
  * src/rtl/gtxwc/gtxwc.c
  * src/rtl/hbtoken.c
  * src/rtl/net.c
  * src/rtl/netusr.c
  * src/vm/hvm.c
    * update HB_SIZE variable name prefixes to use `n` instead of `ul`
    % adjust some variables
    % sync variables scopes and some other minor things with 3.4 fork
2017-09-07 08:39:50 +00:00
Pritpal Bedi
f496daa711 2017-08-25 17:57 UTC-0800 Pritpal Bedi (bedipritpal/at/hotmail.com)
* contrib/gtwvg/gtwgud.c
  * contrib/gtwvg/gtwvgd.c
    + Added : hb_gtinfo( HB_GTI_WINTITLE ) now returns Windows handle.
	   Was a missing implementation since long.
2017-08-25 18:01:52 -07:00
Viktor Szakats
86879b8b83 2017-08-13 18:53 UTC Viktor Szakats (vszakats users.noreply.github.com)
* config/global.mk
  * config/postinst.hb
  * debian/copyright
  * doc/oldnews.txt
  * package/mpkg_win.nsi
  * package/winuni/mpkg_win_uni.bat
  * package/winuni/mpkg_win_uni.nsi
  * README.md
  * COPYING.txt -> LICENSE.txt
    * COPYING.txt -> LICENSE.txt
2017-08-13 18:53:52 +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
Przemysław Czerpak
7e482b9011 2017-08-03 20:24 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rtl/dirscan.prg
    ! fixed type in hb_DirRemoveAll() result - it always returned .F.

  * src/rtl/itemseri.c
    ! fixed internal error when HB_SERIALIZE_COMPRESS is passed to
      hb_Serialize() and ZLIB was not linked with application

  * src/rtl/tpersist.prg
    ! fixed deserialization of multidimensional arrays - thanks to Peter

  * contrib/rddads/ads1.c
    * pacified 'fall through' warnings
2017-08-03 20:24:47 +02:00
Przemysław Czerpak
9eccf9414a 2017-07-27 18:57 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbexpat/3rd/expat/_hbconf.h
  * contrib/hbexpat/3rd/expat/xmlparse.c
    ! fixed WINCE builds
    ! fixed OpenWatcom DOS builds
    ! fixed OpenWatcom OS2 builds

  * contrib/hbexpat/3rd/expat/expat.dif
    * rediffed

  * include/harbour.hbx
  * include/hbvm.h
  * src/harbour.def
  * src/vm/hvm.c
  * src/vm/thread.c
    + added new C function
         HB_BOOL hb_vmThreadIsMain( void * );
      it checks if given or current thread is main HVM thread
    + added new PRG function
         hb_threadIsMain( [ <pThID> ] ) -> <lMainHvmThread>
      it returns true if given or current thread is main HVM thread
    + added new PRG function
         hb_mutexExists( <pMtx> ) -> <lExists>
      it returns true if passed <pMtx> parameter is pointer item to
      fully functional mutex

  * src/rtl/tpersist.prg
    ! fixed problem with array item deserialization - many thanks
      to Peter Rees for exact information about the problem.

  * src/rtl/val.c
    * minor simplification
2017-07-27 18:57:32 +02:00
Przemysław Czerpak
b075fccaaf 2017-07-03 18:36 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbwin/olecore.c
    ! reverted order of indexes and dimensions in conversions of
      multidimensional arrays.
      This modification affects both conversions (1) from Harbour array
      to OLE variant SafeArray and (2) from OLE variant SafeArray to Harbour
      array. The first one is new Harbour extension of __oleVariantNew() so
      here above modification should not create any backward compatibility
      problems but the second interacts with code which existed in Harbour
      from early OLE implementation so if someone already encoded hacks
      to revert array indexes and dimensions at .prg level then now he has
      to remove it.
      Please not that above modification affects only for multidimensional
      OLE typed arrays. It does not change anything for single dimension
      arrays or single dimension arrays of variants which contains other
      similar arrays in their items.
2017-07-03 18:36:42 +02:00
Przemysław Czerpak
904a7e07a9 2017-06-27 12:37 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbwin/olecore.c
    + added support for multidimensional typed OLE arrays, now
      __oleVariantNew() accepts the following parameters:
         __oleVariantNew( <nVariantType>, [<xInitValue>], [<nDims,...>] )
               -> <pVariant>
      i.e.:
         pOleArray := __oleVariantNew( WIN_VT_VARIANT, aVal, ;
                                       len( aVal ), len( aVal[ 1 ] ) )
         pOleArray2 := __oleVariantNew( WIN_VT_I4, ;
                                        { { 1, 2, 3 }, { 4, 5, 6 } }, 2, 3 )
      If initialization array is smaller the declared size then in OLE array
      uninitialized items have default value for given type. NIL array items
      are ignored other non array values in nodes generate errors. Strings
      can be used on last level to initialize OLE arrays with ASCII values of
      their characters.
      Please test it in real MS-Window environment.

  * contrib/hbexpat/3rd/expat/_hbconf.h
    ! fixed MS-Windows builds
2017-06-27 12:37:16 +02:00
Aleksander Czajczynski
f840d79c66 2017-06-27 10:43 UTC+0200 Aleksander Czajczynski (hb fki.pl)
+ contrib/hbexpat/3rd/expat/siphash.h
    + new expat file, missing in previous commit by mistake

  * ChangeLog.txt
    * formatting
2017-06-27 10:43:43 +02:00
Aleksander Czajczynski
0181a0f48f 2017-06-26 08:55 UTC+0200 Aleksander Czajczynski (hb fki.pl)
* contrib/hbexpat/3rd/expat/*
     ! updated to 2.2.1 (from 2.1.0) using 3rdpatch.hb, expat.dif(f) from
       Viktor's 3.4 fork was used - but adapted for DOS 8.3 naming
       scheme. According to issue #157, previous revisions of expat have
       security vulnerabilities, for more information refer to:
       https://github.com/libexpat/libexpat/blob/master/expat/Changes
       Many thanks to Sebastian Pipping for the information.

   * contrib/hbexpat/hbexpat.ch
     + new constant HB_XML_ERROR_INVALID_ARGUMENT added
2017-06-26 08:56:14 +02:00
Viktor Szakats
9581c18aea 2017-05-20 02:25 UTC Viktor Szakats (vszakats users.noreply.github.com)
* utils/hbmk2/hbmk2.prg
    * remove `_HBSHELL_EXEC_PRE` macro
    + add `_HBSHELL_EXTRA_HEADER` macro that can be defined to a header
      (.ch) filename which will be included in all dot prompt and script
      execution sessions. The header will also be embedded in
      hbmk2/hbrun at build-time, so it's not necessary to be present at
      runtime. The macro may also be defined in the `hbmk2_extra.prg`
      source.
2017-05-20 02:58:04 +00:00
Viktor Szakats
6fd6209086 2017-05-19 17:03 UTC Viktor Szakats (vszakats users.noreply.github.com)
* utils/hbmk2/hbmk2.prg
    + add ability to inject extra code/directives to the hbmk2/hbrun source
      code at build time. It can be enabled by defining
      `_HBMK2_EXTRA_CODE`, when a source file named `hbmk2_extra.prg` will
      be included between the header and code section of hbmk2.prg.
    + display note when above option is enabled
    + add ability to prepend extra code before the shell execution stub via
      the `_HBSHELL_EXEC_PRE` macro. It's initialized by an empty string in
      a default build. This macro can be redefined at will by
      `hbmk2_extra.prg`.

  ; commit backported to 3.2 from the 3.4 fork:
    2017-05-14 19:35 UTC Viktor Szakats (vszakats users.noreply.github.com)
    1ee9a9c6dc
2017-05-19 17:06:25 +00:00
Przemysław Czerpak
1eb4121bd9 2017-05-19 16:08 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* config/android/gcc.mk
  * config/global.mk
  * config/linux/gcc.mk
  * config/postinst.hb
  * contrib/hbpost.hbm
    ! removed version number from dynamic libraries for Android.
      Pure Linux style dynamic library numbers in Android systems can be used
      only with system libraries but it's not supported inside .apk packages
      so our dynamic libraries were unusable for Android programmers unless
      someone plans to install more then one version of Harbour dynamic
      libraries as Android system libraries. It's rather unusual situation
      and I believe that in such case he can easy create such libraries
      building Harbour for Linux with NDK.
    * enabled by default building contrib dynamic libraries in Harbour
      Android build.
    + added -Wl,--no-undefined to linker parameters when dynamic libraries
      are created to verify if dynamic libraries can be used in Android .apk
      packages during Harbour build process.
    ; After above modification dynamic (*.so) libraries created in Harbour
      build process can be used in .apk packages. It means that projects
      like HDroidGUI do not longer need their own custom versions of
      libharbour.so but can use the one from standard Harbour Android build.
      They can also use Harbour contrib dynamic libraries.
    ; TODO: add support for automatic NDK detection in Harbour build process
    ; TODO: add to HBMK2 basic support for generating .apk packages

  * contrib/gtqtc/gtqtc.hbp
    * disabled dynamic GTQTC library in Android builds until we set explicit
      bindings with QT/C++ dynamic libs
2017-05-19 16:08:57 +02:00
Przemysław Czerpak
640164f606 2017-05-19 00:54 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/rddads/ads1.c
    + added support for "VarCharFox" and "VarBinaryFox" field types.
    ! fixed accessing "VarChar" fields longer then their size defined in
      table header (rest of longer fields is stored in memo file)
    ! do not reduce size of data stored in "VarChar" fields to the size
      of region allocated for them in table record. Such fields allows
      to store up to 64000 bytes and rest is saved in memo file.
    ! fixed RTE when strings longer then 64000 bytes are assigned to
      "VarChar" fields.
    ! fixed RTE when strings longer then declared field size are assigned
      to Unicode character fields (i.e. "nChar" or "C:U")
    ! fixed possible use of memcpy() with the same source and destination
      addresses
2017-05-19 00:54:22 +02:00
Przemysław Czerpak
47ee04a10d 2017-05-15 14:34 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbgs/hbgs.hbp
    ! respect HB_BUILD_3RDEXT=no

  * contrib/hbwin/olecore.c
    ! fixed updating unnamed parameters passed by reference together
      with named parameters
2017-05-15 14:34:33 +02:00
Przemysław Czerpak
c495cba8ca 2017-05-12 22:17 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbwin/olecore.c
    ! do not use SafeArrayGetVartype() with some chosen builds C compilers
      which do not support it
2017-05-12 22:17:36 +02:00
Przemysław Czerpak
099222a923 2017-05-12 21:18 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbwin/olecore.c
    * changed tagVARIANT member used in hack extracting variant value
      address from ullVal to bVal to avoid problems with some old header
      files which do not support LONGLONG values
2017-05-12 21:18:31 +02:00
Przemysław Czerpak
4ac9d09475 2017-05-12 17:37 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbwin/olecore.c
    + added support for typed variant array references created
      by __oleVariantNew()
2017-05-12 17:37:06 +02:00
Przemysław Czerpak
a105eb54cc 2017-05-12 17:21 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbwin/oleauto.prg
  * contrib/hbwin/olecore.c
  * contrib/hbwin/hbwin.hbx
    * code cleanups and some synchronizations with Viktor's branch
    + added new PRG function borrowed from Viktor's branch:
         win_oleClassExists( <cOleName> | <cCLSID> ) -> <lExists>
2017-05-12 17:21:05 +02:00
Przemysław Czerpak
21a7ff7582 2017-05-12 14:12 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbwin/olecore.c
    + added support for typed variant references created by __oleVariantNew()
2017-05-12 14:12:14 +02:00
Przemysław Czerpak
7b8d91e5cd 2017-05-12 09:57 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbwin/olecore.c
    + added support for VT_VARIANT items to __oleVariantNew()
2017-05-12 09:57:22 +02:00
Przemysław Czerpak
e9cb7ffa2f 2017-05-11 18:05 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbwin/olecore.c
    * create resizable array instead of fixed size array when empty OLE
      array is created by __oleVariantNew()
2017-05-11 18:05:43 +02:00
Przemysław Czerpak
b21fa47ec0 2017-05-10 17:21 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbwin/olecore.c
    + added functions which changes default method of NIL conversion to
      OLE variant:
         __oleVariantNil2Null( [<lNewNil2NullFlag>] ) -> <lPrevNil2NullFlag>
      By default NIL values passed to foreign OLE code are converted to
      VT_EMPTY variants. __oleVariantNil2Null( .t. ) changes this behavior
      so NIL values are converted to VT_NULL variants.
    ; Warning: This function was added for tests. Looks that it's expected
               behavior for communication with MS-Excel and allows to use
               NIL as default parameter value but potentially it may create
               problems with some custom OLE interfaces so this modification
               should be widely tested in real life before we change the
               default behavior.
2017-05-10 17:21:27 +02:00
Przemysław Czerpak
79df0b6559 2017-05-10 16:39 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbwin/olecore.c
    - removed support for VT_DECIMAL and VT_PTR arrays from
      __oleVariantNew() - I found in MSDN that such types are
      unsupported in SAFEARRAYs
    ! fixed indexes in array conversion in __oleVariantNew()
    ! fixed conversion to VT_BSTR arrays in __oleVariantNew()
2017-05-10 16:39:38 +02:00
Przemysław Czerpak
a13eebf540 2017-05-10 12:27 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbwin/olecore.c
    + automatically add WIN_VT_ARRAY bit in 1-st parameter of
      __oleVariantNew() when 2-nd parameter is an array
    + added support for typed variant arrays to __oleVariantNew()
      Now it's possible to create strong typed one dimensional arrays and
      pass them as parameters to foreign OLE code, i.e.
         oOle:setArrayOfStrings( ;
               __oleVariantNew( WIN_VT_BSTR, { "1-st", "2-nd", "3-rd" } ) )
         oOle:setArrayOfIntegers( ;
               __oleVariantNew( WIN_VT_INT, { 1, 2, 3, 4 } )
    + added support for array of integers initialization from strings
      passed to __oleVariantNew() in 2-nd parameter.
      Now it's possible to create strong typed one dimensional OLE array
      initialized with string bytes ASCII values, i.e.
         oOle:setUcharStr( ;
               __oleVariantNew( hb_bitOr( WIN_VT_ARRAY, WIN_VT_UI8 ), ;
                                "ABCDEF" ) )
         oOle:setArrayOfIntegers( ;
               __oleVariantNew( hb_bitOr( WIN_VT_ARRAY, WIN_VT_INT ), ;
                                "ABCDEF" ) )
    ; warning: code not tested at all, written in my Linux box,
               please make real life tests in MS-Windows
2017-05-10 12:27:49 +02:00
Przemysław Czerpak
6904545b24 2017-05-10 07:55 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbwin/olecore.c
    * minor modification in order of helper functions
2017-05-10 07:55:37 +02:00
Przemysław Czerpak
568003e11f 2017-05-10 07:50 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbwin/olecore.c
    * added additional protection to reduce hb_oleSafeArrayToString()
      functionality to arrays of VT_I1 and VT_UI1 items so other types
      which may also allocate 1 byte for each item are not converted.
2017-05-10 07:50:03 +02:00
Przemysław Czerpak
fc9066234e 2017-05-09 17:04 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbwin/olecore.c
    % small optimization in hb_oleSafeArrayFromString()
    ! fixed named parameter conversion - the last one was ignored
2017-05-09 17:04:44 +02:00
Przemysław Czerpak
3e3d5b1776 2017-05-09 10:57 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/rddads/ads1.c
  * src/rdd/workarea.c
    * simplified the code and eliminated wrong /* fallthrough */ comments
      inside case block reported by Viktor
2017-05-09 10:57:43 +02:00
Przemysław Czerpak
451ed05cf1 2017-05-09 09:14 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbwin/olecore.c
    + added support for named parameters in OLE method calls,
      named parameters should be passed inside hash array in
      first parameter, i.e.:
         oWorksheets:add( { "Before" => oWS, "Count" => 3 } )
      next parameters if exist are passed as unnamed ones, i.e.
         oOle:add( { "name" => "test", "value" => 12345 }, 1, 2, 3 )
    ; warning: code not tested at all, written in my Linux box,
               please make real life tests in MS-Windows
    ! fixed __oleGetNameId()
2017-05-09 09:14:20 +02:00
Przemysław Czerpak
d1a58966c8 2017-05-09 09:12 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbct/charswap.c
  * contrib/hbct/token1.c
  * contrib/hbnetio/netiosrv.c
  * contrib/hbssl/ssl_sock.c
  * contrib/rddads/ads1.c
  * include/hbexprb.c
  * src/common/hbprintf.c
  * src/compiler/cmdcheck.c
  * src/compiler/complex.c
  * src/compiler/gencc.c
  * src/compiler/hbmain.c
  * src/compiler/hbopt.c
  * src/pp/ppcore.c
  * src/rdd/dbf1.c
  * src/rdd/dbfcdx/dbfcdx1.c
  * src/rdd/dbffpt/dbffpt1.c
  * src/rdd/dbfntx/dbfntx1.c
  * src/rdd/hsx/hsx.c
  * src/rdd/workarea.c
  * src/rtl/dates.c
  * src/rtl/gtclip.c
  * src/rtl/gtwin/gtwin.c
  * src/rtl/gtwvt/gtwvt.c
  * src/rtl/hbgtcore.c
  * src/rtl/itemseri.c
  * src/rtl/strtoexp.c
  * src/vm/classes.c
  * src/vm/task.c
    * added and verified (following Viktor's patch)
      /* fallthrough */ comment for GCC >= 7.
    ; I haven't found any errors in existing code.
      /cc @vszakats

  * src/rdd/dbf1.c
    * minor improvement in dbf1.c
2017-05-09 09:12:35 +02:00
Przemysław Czerpak
4858d23510 2017-05-04 14:48 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/compiler/hbcomp.c
    ! restored protection against multiple free of the same expression
      I removed by mistake in one of my recent commits.
2017-05-04 14:48:39 +02:00
Viktor Szakats
a69b4a58ee 2017-05-03 09:10 UTC Viktor Szakats (vszakats users.noreply.github.com)
* *
    * copyright name cleanups
2017-05-03 09:11:48 +00:00
Przemysław Czerpak
8abcba1bcd 2017-04-26 14:11 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/harbour.def
    ! added missing hb_itemPutNil()
2017-04-26 14:11:26 +02: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
d7193b8e14 2017-04-25 15:59 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/hbexprb.c
    ! added missing code to restore original expression type after
      direct type change in code like:
         <var> := <var> + <exp>
      It created problems when <var> was reused later, i.e. in FOR loop:
         FOR v := v + x TO 3
    * simplified code to restore original expression type and updated
      comments

  * src/compiler/harbour.y
    * minor cleanup
2017-04-25 15:59:35 +02:00
Aleksander Czajczynski
d89e99cbb0 2017-04-22 21:22 UTC+0200 Aleksander Czajczynski (hb fki.pl)
* contrib/hbamf/amfenc.c
    ! fix trivial mistake in AMF3_ENCODE(), which broke string
      deduplication after hash with string-keys was serialized
      in object tree. The hash itself was serialized correctly
      because keys are by definition unique.
2017-04-22 21:24:19 +02:00
Przemysław Czerpak
ad1f113511 2017-04-20 10:01 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/3rd/zlib/*
    * updated to version 1.2.11
2017-04-20 10:01:20 +02:00
Przemysław Czerpak
66ee94abcc 2017-04-20 09:14 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/hbcomp.h
  * src/compiler/hbmain.c
    * removed not longer necessary calls to hb_compExprLstDealloc()

  * src/compiler/hbcomp.c
    ! do not generate internal error when nested expression deallocation
      is activated

  * contrib/rddads/ads1.c
    ! fixed bad typo which effectively completely broke
      AdsTestRecLocks( .t. ) mode
2017-04-20 09:14:04 +02:00
Przemysław Czerpak
6a1f383282 2017-04-19 18:20 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/common/hbdate.c
    ! fixed compilation with HB_TR_LEVEL_DEBUG in C mode
2017-04-19 18:20:43 +02:00
Przemysław Czerpak
76c62a447a 2017-04-15 21:35 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/hbcompdf.h
  * include/hbexprb.c
  * src/common/expropt1.c
    * redefined all HB_ET_MACRO_* macros as bitfields

  * src/compiler/complex.c
    * small modification for future extensions in macro usage

  * src/compiler/hbcomp.c
    ! replaced old temporrary hack with internal error.

  * src/compiler/hbmain.c
    * code reformating

  * src/compiler/harbour.y
    * separated DECLARE tokens

  * src/compiler/harbour.yyc
  * src/compiler/harbour.yyh
    * regenerated

  * src/rdd/dbffpt/dbffpt1.c
    ! fixed possible bad interaction (modified default memo type) due to
      uninitialized item returned by hb_stackAllocItem(). Such items may
      contain any simple value.

  * src/vm/memvars.c
    * minor variable name cleanup

  * utils/hbtest/rt_math.prg
    * repeat tests for macro messages and macro <op>=, pre/post ++/--
      operations with and without pass by reference (-ks) optimization
2017-04-15 21:35:32 +02:00
Przemysław Czerpak
52c588287e 2017-04-15 21:19 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/common/hbdate.c
    * implemented monotonic timers in POSIX and MS-Windows builds

  * config/wce/global.mk
  * config/wce/mingwarm.mk
  * config/win/global.mk
  * utils/hbmk2/hbmk2.prg
    * added winmm/mmtimer to list of system libraries - required
      for timeGetTime()

  * ChangeLog.txt
    ! typos
2017-04-15 21:19:51 +02:00
Przemysław Czerpak
63dbef88f4 2017-04-14 17:17 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/harbour.def
    * removed hb_fsPoll() added by mistake - it's only in *nix builds
2017-04-14 17:17:31 +02:00
Przemysław Czerpak
e150da6f93 2017-04-14 16:36 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/hbapifs.h
  * src/rtl/filesys.c
    + added new C functions for UNIX and DJGPP builds:
         int hb_fsPollFD( PHB_POLLFD pPollSet, int iCount,
                          HB_MAXINT nTimeOut );
         int hb_fsCanRead( HB_FHANDLE hFileHandle, HB_MAXINT nTimeOut );
         int hb_fsCanWrite( HB_FHANDLE hFileHandle, HB_MAXINT nTimeOut );
      These functions should be used instead of select() in C code to hide
      low level access to select()/poll() functionality in *nix builds
      (they are supported by DJGPP only to simplify existing code common
      for DJGPP and *nix builds). Maximum file handle value which can be
      used in select() is limited by FD_SETSIZE. Please note that it's
      file handle value not number of file handles in the set. It creates
      serious problem for applications which operate on great number of
      handles (i.e. servers which have to keep open many sockets, pipes,
      files, etc. for their clients) so the new file/socket/pipe/...
      handle value can easy exceed FD_SETSIZE limit and in such case
      cannot be used with select(). The modification on
         2016-04-05 21:24 UTC+0200 Przemyslaw Czerpak
      resolved the problem only for sockets and pipes in code which uses
      corresponding hb_socket*() and hb_fsPipe*() API but not for all
      other cases. This one is for POSIX compilant code which needs pure
      POSIX select()/poll() functionality.
      Please note that HB_POLLFD structure should is compatible with
      struct pollfd defined by POSIX.1-2001 anyhow not all platforms
      confirm this standard so portable Harbour code should always use
      HB_POLLFD and HB_POLL* constant values instead of POLL* ones.

  * include/hbdate.h
  * src/common/hbdate.c
    + added new C functions to calculate timeouts:
         HB_MAXUINT hb_timerGet( void );
         HB_MAXUINT hb_timerInit( HB_MAXINT nTimeOut );
         HB_MAXINT  hb_timerTest( HB_MAXINT nTimeOut, HB_MAXUINT * pnTimer );
      They are designed to be used instead of direct access to
      hb_dateMilliSeconds(). Now they internally use hb_dateMilliSeconds()
      but it can be easy replaced by any other system monotonic clock by
      one local modification inside hb_timerGet() function.

  * src/rtl/filesys.c
    * use hb_timer*() functions instead of hb_dateMilliSeconds()
    * use hb_fsCanRead()/hb_fsCanWrite() instead of select()/poll()
      It also fixed timeout processing inside hb_fsPipeIsData() and
      hb_fsPipeWrite() in builds using poll()

  * src/rtl/filesys.c
  * src/rtl/gtcrs/gtcrs.h
  * src/rtl/gtcrs/gtcrs.c
  * src/rtl/gtpca/gtpca.c
  * src/rtl/gtsln/gtsln.c
  * src/rtl/gtsln/mousesln.c
  * src/rtl/gtstd/gtstd.c
  * src/rtl/gttrm/gttrm.c
  * src/rtl/gtxwc/gtxwc.c
    * use hb_timer*() functions instead of hb_dateMilliSeconds()
    * use hb_fsCanRead()/hb_fsCanWrite() instead of select()/poll()

  * src/vm/thread.c:
  * src/rtl/gtwin/gtwin.c
  * src/rtl/hbcom.c
  * src/rtl/hbgtcore.c
  * src/rtl/hblpp.c
  * src/rtl/idle.c
  * contrib/hbnetio/netiosrv.c:
  * contrib/hbssl/ssl_sock.c:
    * use hb_timer*() functions instead of hb_dateMilliSeconds()

  * contrib/xhb/hboutdbg.c
    * use hb_fsCanWrite() instead of select()

  * src/rtl/hbsocket.c
    ! repeat select() interrupted by signal inside hb_socketSelect()
      when poll() function is not available

  * src/3rd/hbdossrl/serial.c
    ! fixed -Wshift-negative-value GCC warnings
2017-04-14 16:36:50 +02:00
Viktor Szakats
1938dd0a70 2017-04-14 13:22 UTC+0200 Aleksander Czajczynski (hb fki.pl)
* contrib/hbtip/ccgi.prg
  * contrib/hbtip/client.prg
  * contrib/hbtip/encb64.prg
  * contrib/hbtip/encoder.prg
  * contrib/hbtip/encqp.prg
  * contrib/hbtip/encurl.prg
  * contrib/hbtip/ftpcli.prg
  * contrib/hbtip/hbtip.hbp
  * contrib/hbtip/hbtip.hbx
  * contrib/hbtip/httpcli.prg
  * contrib/hbtip/log.prg
  * contrib/hbtip/mail.prg
  * contrib/hbtip/mime.c
  * contrib/hbtip/misc.c
  * contrib/hbtip/popcli.prg
  * contrib/hbtip/sessid.prg
  * contrib/hbtip/smtpcli.prg
  * contrib/hbtip/thtml.ch
  * contrib/hbtip/thtml.prg
  * contrib/hbtip/tip.ch
  * contrib/hbtip/url.prg
  + contrib/hbtip/base64u.prg
  + contrib/hbtip/mailassy.prg
  * contrib/hbtip/sendmail.prg -> [...]/mailsend.prg
  + contrib/hbtip/WARNING.txt
  * contrib/hbtip/tests/base64.prg
  * contrib/hbtip/tests/dbtohtml.prg
  * contrib/hbtip/tests/dnldftp.prg -> [...]/ftp_dl.prg
  * contrib/hbtip/tests/ftpadv.prg -> [...]/ftp_adv.prg
  + contrib/hbtip/tests/email.prg
  + contrib/hbtip/tests/ftp_ul.prg
  - contrib/hbtip/tests/gmail.hbp
  - contrib/hbtip/tests/gmail.prg
  * contrib/hbtip/tests/hbmk.hbm
  * contrib/hbtip/tests/httpadv.prg -> [...]/http_adv.prg
  * contrib/hbtip/tests/httpcli.prg -> [...]/http_cli.prg
  + contrib/hbtip/tests/http_qry.prg
  - contrib/hbtip/tests/loadhtml.prg
  + contrib/hbtip/tests/test.prg
  + contrib/hbtip/tests/url.prg
    * synced with 3.4 fork by Viktor Szakats
    ; the only difference is slightly edited WARNING.txt

  - contrib/hbtip/credent.prg
    % deleted TIPCredentials() class that was never implemented

  ; changes above come from vast number of commits in 3.4 repository - many
    thanks to Viktor Szakats for maintaining
2017-04-14 13:22:09 +02:00
Aleksander Czajczynski
11d3cbfa0b 2017-04-06 12:05 UTC+0200 Aleksander Czajczynski (hb fki.pl)
* contrib/hbtip/httpcli.prg
    ! fixed uploading binary files with TIPClientHTTP:PostMultiPart()
      Thanks to Alexandre Alencar, who informed about the bug, supplied
      example test code and suggested a patch. This commit simplifies patch
      given by Alexandre.

  * ChangeLog.txt
    % stripped spaces before EOLs
2017-04-06 12:07:24 +02:00
Przemysław Czerpak
9e8e013eb9 2017-03-29 19:50 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/compiler/hbgenerr.c
    * changed "with object" in last error message to upper cases

  * src/rdd/dbf1.c
    + added assigned value to error object ARGS array when data type or
      data width error is generated inside PUTVALUE() method

  * utils/hbtest/hbtest.prg
  * utils/hbtest/rt_array.prg
  * utils/hbtest/rt_hvma.prg
  * utils/hbtest/rt_main.ch
  * utils/hbtest/rt_math.prg
  * utils/hbtest/rt_misc.prg
    + added support for alternative results to HBTEST code.
      It's enabled by default and can be turned off by -noalt hbtest
      parameter.
    + added alternative results for tests which return different then
      Cl*pper results but they are expected and not Harbour bugs.
2017-03-29 19:50:33 +02:00
Przemysław Czerpak
9153285bdf 2017-03-28 23:02 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/hbcomp.h
  * include/hbcompdf.h
  * include/hberrors.h
  * include/hbexprb.c
  * src/common/expropt1.c
  * src/compiler/hbgenerr.c
  * src/compiler/hbmain.c
    + added new macros HB_ET_MACRO_NOLIST and HB_ET_MACRO_NOPARE
    % use new HB_ET_MACRO_* macros
    + added new compile time error:
         "Code block contains both macro and with object messages ':%s'"
      NOTE: -kd compiler switch allows to compile codeblocks with macros
            and declared symbols / with object messages
    * replaced hb_compErrorCodeblock() with hb_compErrorCodeblockDecl() and
      hb_compErrorCodeblockWith()
    + added new C function hb_compPushMacroVar()
    * code simplification
    ; added few comments

  * utils/hbtest/rt_math.prg
    * extended test code for macro messages and macro <op>=, pre/post ++/--
      operations

  * src/vm/hvm.c
    ! protection against executing hb_threadStateNew() during GC pass
      inside hb_vmRequestReenterExt()

  * src/vm/garbage.c
    ! add volatile attribute to s_bCollecting variable
    * small modification in hb_gcAll() parameter

  * src/rtl/errsys.prg
    ; minor comment cleanup

  * doc/xhb-diff.txt
    * extended a little bit section STRONG TYPED VARIABLES
2017-03-28 23:02:28 +02:00
Przemysław Czerpak
5f1da37fd2 2017-03-24 20:02 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/hbcomp.h
  * src/compiler/hbmain.c
    * changed hb_compVariableScope() to static function

  * src/compiler/harbour.y
    ! added protection against GPF when nested function/procedure is
      declared inside extended block code

  * src/compiler/harbour.yyc
  * src/macro/macro.yyc
  * src/macro/macro.yyh
    * regenerated

  * include/hbexprb.c
    * minor simplification

  * include/hbexpra.c
    * use HB_SIZEOFARRAY() macro
2017-03-24 20:02:03 +01:00