Commit Graph

319 Commits

Author SHA1 Message Date
Przemysław Czerpak
7d513fad62 2016-04-19 14:49 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rtl/gtwin/gtwin.c
    ! fixed wrong translation in my previous commit
2016-04-19 14:49:11 +02:00
Przemysław Czerpak
7d2caa12d3 2016-04-18 18:41 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/gtqtc/gtqtc1.cpp
  * src/rtl/gtwin/gtwin.c
  * src/rtl/gtwvt/gtwvt.c
    ! fixed stupid C&P typo in my previous modification - thanks to Lorenzo.
2016-04-18 18:41:39 +02:00
Przemysław Czerpak
836e6420ba 2016-04-18 18:05 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rtl/strrepl.c
    ! fixed hb_strReplace() for strings longer then 1024 bytes and
      array used in 3-rd parameter.
2016-04-18 18:05:02 +02:00
Przemysław Czerpak
7d1b59482d 2016-04-18 17:33 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/gtqtc/gtqtc1.cpp
  * src/rtl/gtwin/gtwin.c
  * src/rtl/gtwvt/gtwvt.c
    ! changed extended keycodes generated for ASCII characters
      combined with ALT and/or CTRL flags. It fixes problems with
      code giving the highest priority for:
         ! hb_keyChar( nKey ) == ""
      i.e. MemoEdit()

  * contrib/hbmzip/mziperr.prg
    % replaced DO CASE / ENDCASE with SWITCH / ENDSWITCH
    ! fixed repeated error codes
2016-04-18 17:33:43 +02:00
Przemysław Czerpak
7ab8ae631d 2016-04-08 14:30 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/hbsocket.ch
  * src/rtl/hbsocket.c
    + added support for high-priority/out-of-bound data in select()
      emulated by poll()
    + added macros for socket send()/recv() flags: HB_SOCKET_MSG_*

  * src/rtl/filesys.c
  * src/rtl/hbcom.c
  * src/rtl/hbproces.c
    * include <poll.h> when HB_HAS_POLL macro is set manually by user
      (thanks to Teo)

  * contrib/hbnetio/netiosrv.c
    * minor optimization
2016-04-08 14:30:05 +02:00
Przemysław Czerpak
2f1bf5ee72 2016-04-07 18:34 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/common/hbprintf.c
    * pacified warning

  * src/rtl/filesys.c
    ! return -1 instead of from hb_fsPipeIsData() when poll() detects
      error or end of stream - 0 should indicate timeout only.

  * src/rtl/hbcom.c
    ! fixed bad typo which blocked hb_comSend() in *nixes
      using select() instead of poll()

  * src/rtl/filesys.c
  * src/rtl/hbcom.c
  * src/rtl/hbproces.c
  * src/rtl/hbsocket.c
    ; updated #if/#else/#endif comments
2016-04-07 18:34:30 +02:00
Przemysław Czerpak
d2cfbe3d56 2016-04-06 15:18 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/common/hbstr.c
  * src/rtl/hbcom.c
  * src/rtl/hbproces.c
    * pacified few warnings - thanks to Viktor

  * contrib/sddfb/core.c
    ! fixed code which extracted float number from uninitialized memory.
      On some systems it could even cause GPF or other (ie. FPE) exception.
2016-04-06 15:18:50 +02:00
Przemysław Czerpak
97fd742f71 2016-04-06 13:11 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rtl/hbproces.c
    ! fixed infinite loop due to ignored POLLHUP errors reported by poll()
    ! fixed stupid typo

  * src/rtl/hbproces.c
  * src/rtl/hbsocket.c
  * src/rtl/filesys.c
  * src/rtl/hbcom.c
    * emulate read access when poll() used instead of select() reports
      POLLHUP - this poll() behavior is neither consistent within a
      single implementation, nor between different versions of the same
      implementation, and certainly not across platforms
    % optimize read/write access using extended (in comparison to select())
      information reported by poll()
    ; TODO: emulate select() behavior for high priority data.
2016-04-06 13:11:20 +02:00
Przemysław Czerpak
5a2af0b426 2016-04-05 21:24 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rtl/gttone.c
    ! use asm {} directive only in CLANG BCC builds - asm {} needs TASM
      so using it breaks Harbour compilation with free BorlandC command
      line tools which do not contain TASM.

  * src/rtl/hbsocket.c
  * src/rtl/hbproces.c
  * src/rtl/filesys.c
  * src/rtl/hbcom.c
    ! use poll() instead of select() in POSIX.1-2001 compliant *nix builds
      It fixes the problem with file handles >= 1024
      Please make tests in different *nix builds. It affects sockets, pipes
      and serial ports.
2016-04-05 21:24:05 +02:00
Przemysław Czerpak
5fbaa12158 2016-04-01 00:28 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rtl/direct.c
    ! removed set of MS-Windows attributes passed unconditionally to
      hb_fsFind*() functions in Directory() PRG function.
      It fixes "L" attribute passed in 2-d parameter of Directory()
      function in *nix builds. When "L" is given in attribute list
      then Directory() do not follow links.

  * src/common/strwild.c
    * removed FNM_PERIOD from fnmatch() parameters in *nix builds

  * src/common/hbffind.c
    * in * nix builds set hidden attribute for file and directory
      names starting with "." except "." and ".." which are reported
      as is for Cl*pper and Harbour multiplatform compatibility.
2016-04-01 00:28:27 +02:00
Przemysław Czerpak
7af9c8c8ef 2016-03-30 16:10 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rtl/gttone.c
    * applied patch from Andi Jahja for new BCC versions - many thanks

  * src/rtl/strrepl.c
    % added optimization code for strings longer then 1024 bytes
      For very long strings it can improve replace performance 20 or
      even more times.

  * src/rtl/sha2.c
  * src/rtl/val.c
  * src/vm/dynsym.c
  * src/vm/eval.c
  * src/vm/thread.c
    * formatting
2016-03-30 16:10:34 +02:00
Przemysław Czerpak
5e6ff840e6 2016-03-10 12:52 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rtl/langcomp.prg
    ! added missing de-AT lang mapping
2016-03-10 12:52:52 +01:00
Przemysław Czerpak
fb2004d566 2016-03-08 22:10 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rtl/isprint.c
    ! HB_ISPRINTER(), ISPRINTER() fix to open the port name with CREATE
      flag (= CREATE_ALWAYS on Windows). It may fix port detection in
      certain situations. Tested on Windows 7 x86 and x64, whereas it
      will now return .T. if the port is associated with a queue,
      and .F. if it isn't. It seems to cause no harm on OS X. Please
      test it on other systems and other LPT scenarios (f.e. with real
      hardware device attached).
    ; borrowed from Viktor's fork: 2016-03-08 18:19 UTC+0100 Viktor Szakats

  * ChangeLog.txt
    ; hide e-mail addresses
2016-03-08 22:10:30 +01:00
Przemysław Czerpak
207ab1cbfd 2016-03-01 16:11 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rtl/gttrm/gttrm.c
    + added support for CYGWIN ssh terminal
      (i.e. ssh.exe included in github for MS-Windows)
    ! fixed support for terminals which always scrolls when the most
      upper/right character is written.
      In current version GTTRM simply ignores this character cell.
      On such terminals it can be shown by writing the last character
      one cell before then sending escape sequences to move cursor back,
      insert one space and finally restoring overwritten character
      cell value. Anyhow it increases number of used escape sequences
      so I decided to not implement it yet.
2016-03-01 16:11:53 +01:00
Przemysław Czerpak
078899e74c 2016-02-18 17:02 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/fileio.ch
    + added HB_VF_IONAME to hb_vcConfigure() actions

  * contrib/hbbz2io/bz2io.c
  * contrib/hbcomio/comio.c
  * contrib/hbgzio/gzio.c
  * contrib/hbmemio/memio.c
  * contrib/hbnetio/netio.h
  * contrib/hbnetio/netiocli.c
  * contrib/hbpipeio/pipeio.c
  * contrib/hbtcpio/tcpio.c
  * src/rtl/filebuf.c
    + implemented HB_VF_IONAME

  * contrib/hbnetio/netiosrv.c
    ! added protection against possible buffer overflow

  * src/rdd/dbfcdx/dbfcdx1.c
  * src/rdd/dbfnsx/dbfnsx1.c
  * src/rdd/dbfntx/dbfntx1.c
    * restored CL5.[23] compatible tag selection - I had to broke
      it when I was adding SIX3 compatibility functions
2016-02-18 17:02:48 +01:00
Przemysław Czerpak
e8469028d1 2016-02-16 15:44 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rtl/hbgtcore.c
    ! fill whole box area in DispBpx() when 0 length string or string with
      Chr( 0 ) at the beginning is used as box frame - Cl*pper compatible
      behavior
2016-02-16 15:44:20 +01:00
Przemysław Czerpak
41bf5f231d 2016-02-11 11:54 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* ChangeLog.txt
  * include/hbapifs.h
  * src/rtl/filesys.c
    * cleaned hb_fsOpenEx() parameters order

  * src/common/hbprintf.c
    ! typo in comment
2016-02-11 11:54:08 +01:00
Przemysław Czerpak
8fa0037801 2016-02-10 17:17 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rtl/filesys.c
    * replaced hb_fsCreate() and hb_fsCreateEx() with wrappers
      to hb_fsOpenEx()
2016-02-10 17:17:40 +01:00
Przemysław Czerpak
5c6e06122f 2016-02-09 20:16 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rtl/filesys.c
    ! pacified BCC warning - thanks to Grigory
2016-02-09 20:16:49 +01:00
Przemysław Czerpak
119c842a5b 2016-02-04 17:02 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/hbapifs.h
  * src/rtl/filesys.c
    + added new C function:
         HB_FOFFSET hb_fsGetSize( HB_FHANDLE hFileHandle );
    ! fixed SetFilePointer() error detecting - it was broken
      and we returned wrong results for offset 0xFFFFFFFF
  * src/rtl/filebuf.c
    * use hb_fsGetSize()
2016-02-04 17:02:32 +01:00
Przemysław Czerpak
d668f50eeb 2016-01-29 00:33 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rtl/hbsocket.c
    ! pacified 64bit MSC warnings
2016-01-29 00:33:41 +01:00
Przemysław Czerpak
301e4553a9 2016-01-28 13:20 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rtl/hbsocket.c
    * enabled new socket functions in MSC 18.0 (before was MSC 19.0)
      If someone uses this compiler and this modification created problem
      then please let me now.
2016-01-28 13:20:03 +01:00
Przemysław Czerpak
ffd3bf50e5 2016-01-28 13:00 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rtl/gtxwc/gtxwc.c
    ! fixed buffer overflow in HB_GTI_FONTATTRIBUTE used after
      after console window initialization
    ! set XLib mutex when font size is changed by HB_GTI_FONTSIZE
      after console window initialization (for MT programs using
      more then one GTXWC console simultaneously).
    ! allow HB_GTI_FONTSIZE to change font created by HB_GTI_FONTSEL
      using before console window is created
    % do not create new console window pixmap if old one has the
      same dimensions
2016-01-28 13:00:23 +01:00
Przemysław Czerpak
c6316a4578 2016-01-26 15:44 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/hbapierr.h
  * include/hbdefs.h
  * src/debug/dbgentry.c
  * src/rtl/filesys.c
  * src/rtl/gtcgi/gtcgi.c
  * src/rtl/gtcrs/gtcrs.c
  * src/rtl/gtos2/gtos2.c
  * src/rtl/gtpca/gtpca.c
  * src/rtl/gtsln/gtsln.c
  * src/rtl/gtstd/gtstd.c
  * src/rtl/gttrm/gttrm.c
  * src/rtl/gtwin/gtwin.c
  * src/rtl/gtwvt/gtwvt.c
  * src/rtl/gtxwc/gtxwc.c
  * src/rtl/hbhex.c
  * src/rtl/hbproces.c
  * src/rtl/hbsocket.c
  * src/vm/classes.c
  * src/vm/extrap.c
  * src/vm/itemapi.c
  * src/vm/runner.c
  * src/vm/task.c
  * contrib/gtalleg/gtallegd.c
  * contrib/gtqtc/gtqtc1.cpp
  * contrib/gtwvg/gtwgud.c
  * contrib/gtwvg/gtwvgd.c
  * contrib/gtwvg/wvgcore.c
  * contrib/gtwvg/wvgcuig.c
  * contrib/gtwvg/wvgutils.c
  * contrib/gtwvg/wvgwin.c
  * contrib/gtwvg/wvgwing.c
  * contrib/hbfbird/firebird.c
  * contrib/hbwin/axcore.c
  * contrib/hbwin/wapi_commctrl.c
  * contrib/hbwin/wapi_shellapi.c
  * contrib/hbwin/wapi_winbase.c
  * contrib/hbwin/wapi_wingdi.c
  * contrib/hbwin/win_misc.c
  * contrib/hbxdiff/core.c
  * contrib/rddads/ads1.c
  * contrib/rddads/adsx.c
  * contrib/xhb/cstructc.c
  * contrib/xhb/freadlin.c
  * extras/gtwvw/gtwvwd.c
  * extras/gtwvw/wvwfuncs.c
    * use HB_PTRUINT instead of HB_PTRDIFF in castings between pointers
      and numbers - it makes some C compilers happy and in few cases it
      also fixed bugs
2016-01-26 15:45:00 +01:00
Przemysław Czerpak
fdd75b00bf 2016-01-22 16:55 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/rddads/ads1.c
  * src/rdd/hbsix/sxcompr.c
  * src/rtl/gtxwc/gtxwc.c
    ! cleaned C++ casting
2016-01-22 16:55:41 +01: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
Przemysław Czerpak
682d8e32e3 2016-01-15 16:02 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/hbapifs.h
  * src/common/hbfsapi.c
    + added automatic file handle table resizing to hb_fsOS2DosOpenL()
    + added new C function: hb_fsOS2DosOpen() which is wrapper to DosOpen()
      with automatic file handle table resizing.
      Please remember that unlike hb_fsOS2DosOpenL() this function is
      pure wrapper to DosOpen() so it does not make file name conversions
      and does not set hb_fsError().

  * src/rtl/filesys.c
  * src/rtl/hbcom.c
  * src/rtl/hbproces.c
    * use hb_fsOS2DosOpen() instead of DosOpen()

  * src/vm/cmdarg.c
    * set the initial size of file handle table to 256 in OS2 OpenWatcom
      builds if user does not set it explicitly by //F:<n> switch

  * config/global.mk
    - removed set HARBOUR=F:100 - it's not necessary with automatic FHT
      resizing

  ; Please test it in real OS2 environment
2016-01-15 16:02:45 +01:00
Przemysław Czerpak
70d3fbee3a 2016-01-15 14:50 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rtl/filesys.c
    ! _A_READONLY -> _A_RDONLY
2016-01-15 14:50:14 +01:00
Przemysław Czerpak
bd92a307f5 2016-01-15 11:15 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/gtqtc/gtqtc.h
  * contrib/gtqtc/gtqtc1.cpp
    * renamed few variables to avoid -Wshadow warnings

  * contrib/hbfimage/fi_wrp.c
    * removed unnecessary ;

  * contrib/hbodbc/odbc.c
    ! replaced '\0' with NULL in pointer initialization

  * src/3rd/jpeg/Makefile
    % added missing HAVE_UNSIGNED_CHAR build macro. Without it LIBJPEG
      uses SHORT to hold unsigned 8 bit integers what increases memory
      usage and reduces the speed.

  * src/pp/hbpp.c
    * minor modification to keep string constant C90 comnpatible

  * src/rtl/filesys.c
    * simplified DOS to POSIX file attribute translation
    + respect hidden and system file attribute in DOS builds of hb_fsOpenEx()

  * src/vm/fm.c
    ! added yet another missing HB_STACK_TLS_PRELOAD
2016-01-15 11:15:55 +01:00
Viktor Szakats
3ed9fa0f45 2016-01-14 19:33 UTC+0100 Viktor Szakats (vszakats users.noreply.github.com)
* *
    % remove brandings and homepage from copyright header. Pass 2 - semi-auto.
    * project homepage and name is described in README, amongst others
    ; this should make the diff between 3.4 and 3.2 easier to manage
2016-01-14 19:35:07 +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
04283dd94f 2016-01-14 11:02 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* config/global.mk
    * set HARBOUR=F:100 during build process in OS2 builds - it increases
      maximum number of open handles per process from 20 to 100 so it should
      be possible to use -j<n> switch during Harbour compilation - please
      test, i.e.:
         os2-make -j3

  * contrib/xhb/hbcompat.ch
    ! fixed pp rules for Str(,,, <lStrip> ) translation

  * include/hbapifs.h
  * src/rtl/filesys.c
    + added new C function:
         HB_FHANDLE hb_fsOpenEx( const char * pszFileName, HB_FATTR nAttr,
                                 HB_USHORT uiFlags );
    * minor cleanup

  * include/hbmemory.ch
  * src/vm/fm.c
    + added two new actions for Memory() function:
         HB_MEM_STATISTICS - return non 0 value if FM statistic is enabled
         HB_MEM_ISLIMIT    - return non 0 value if used memory limit is
                             supported
    + added new PRG function:
         __fm_allocLimit( [ <nNewLimit> ] ) -> <nPrevLimit>
      It allows to set limit for maximum used memory in some memory
      managers, -1 means no limit.
      Now it works with DLMALLOC and in ST mode it's limit for memory
      allocated from system for whole application. In MT mode when
      HB_FM_DLMT_ALLOC (default for DLMALLOC) is enabled it's limit for
      single MSPACE (Harbour allocates 16 MSPACES and balance them
      between threads to improve scalability) so it's rather per thread
      limit. If memory statistic module is enabled during Harbour build
      process then this limit works with any memory manager and defines
      limit for total memory allocated by Harbour application regardles
      of MT or ST mode.

  * src/vm/hvm.c
    * use HB_MEM_STATISTICS instead of HB_MEM_USEDMAX to check if memory
      statistic module is enabled
2016-01-14 11:02:51 +01:00
Przemysław Czerpak
ca9bb39a23 2016-01-13 15:25 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbtip/encurlc.c
    ! fixed C&P typos in tip_URLEncode() and tip_URLDecode() in may
      previous commit

  * src/pp/ppcore.c
    * pacified warning

  * src/common/hbver.c
  * src/rtl/hbsocket.c
    * updated for Digital Mars C compilation
2016-01-13 15:25:21 +01:00
Przemysław Czerpak
05bbf52617 2016-01-13 11:08 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/hbsocket.h
  * src/rtl/hbsockhb.c
    + added new C function:
         HB_BOOL hb_sockexItemReplace( PHB_ITEM pItem, PHB_SOCKEX pSock );

  * contrib/hbssl/ssl_sock.c
    + replace passed socket structure to hb_socketNewSSL_connect() and
      hb_socketNewSSL_accept() with new one using SSL filter if it was
      passed by reference, current syntax is:
         hb_socketNewSSL_connect( [@]<pSocket>, <pSSL> [, <nTimeout> ] )
                     -> <pSocketSSL>
         hb_socketNewSSL_accept( [@]<pSocket>, <pSSL> [, <nTimeout> ] )
                     -> <pSocketSSL>

  * contrib/hbssl/hbssl.hbm
  * contrib/hbssl/hbssl.hbx
  + contrib/hbssl/ssl_hbcon.prg
    + added new PRG functions which can be used for fast initialization of
      SSL connection:
         hb_SSL_new() -> <pSSL>
         hb_SSL_connect_inet( <pSocket>, [ <nTimeOut> ], [ @<cInfo> ] )
                     -> <lConnected>
         hb_SSL_connect_socket( <pSocket>, [ <nTimeOut> ], [ @<cInfo> ] )
                     -> <lConnected>
      They do not need any addiitonal initialization code and can be called
      as first and the only SSL functions in user code.

  * contrib/hbtip/mail.prg
    ! fixed bug reported by Lorenzo - thanks
    * use hb_MemoWrit() in :detachFile() to honor Harbour File IO API
    * cleanup

  * src/common/hbffind.c
  * src/rtl/gtos2/gtos2.c
  * src/rtl/hbproces.c
    * cleaned DosAllocMem() flags

  * src/common/hbfsapi.c
  * src/rtl/hbproces.c
    * pacified OS2 GCC warnings

  * config/global.mk
    * show information about HB_MT build parameter if set by user
2016-01-13 11:08:23 +01:00
Przemysław Czerpak
6be1156f7c 2016-01-12 21:13 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbtip/encurlc.c
    ! fixed url decoding - thanks to Lorenzo for reporting the problem
    * small simplification of url encoding code

  * src/rtl/hbproces.c
    ! use DosAllocMem() instead of hb_xgrab() to allocate memory for
      DosExecPgm() parameters - it should fix the problem with random
      build crashes when pipes are used for redirection of child
      process standard IO handles - please test in real OS2 environment.
2016-01-12 21:13:30 +01:00
Przemysław Czerpak
b5a02bcab4 2016-01-11 17:12 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rtl/spfiles.c
    ! typo in HB_TR_DEBUG message

  * src/rtl/hbproces.c
    - removed unnecessary call to hb_fsSetIOError()
    % variable localization
    ! fixed wrongly located hb_vmLock() - it was not called if
      hb_fsProcessOpen() failed.
2016-01-11 17:12:51 +01:00
Przemysław Czerpak
c5758d9b83 2016-01-05 10:04 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/hbapigt.h
  * src/rtl/gttrm/gttrm.c
    * modified GTTRM to generate HB_K_CLOSE if input stream is closed and
      then HB_K_TERMINATE on next inkey calls.
2016-01-05 10:04:37 +01:00
Przemysław Czerpak
aae691a434 2016-01-04 21:25 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rtl/hbznet.c
  * src/rtl/hbzsock.c
    ! cleanup

  * include/hbrdddel.h
  * include/hbrddsdf.h
  * src/rdd/delim1.c
  * src/rdd/sdf1.c
    + added support for any standard EOL combination to DELIM and SDF RDDs,
      Now LF, CRLF, CR and LFCR EOLs are supported and automatically
      recognized during import if one of such EOLs is also set in HVM by
      _SET_EOL.
    % use 8192 bytes read ahead buffer to speed up import from DELIM and
      SDF RDDs
    + modified file IO operations to work with stream only (no support for
      file seek) Harbour File IO drivers
    % optimized some File IO operations
    * strip all EOF (^Z) characters from imported data. It's not strictly
      Cl*pper compatible because Cl*pper interrupts import on first ^Z
      character anyhow it was always the source of problems when .txt
      files are concatenated by tools like 'cat' in *nixes so I decided
      to change it.
    + added support RECORD clause command in commands like:
         APPEND FROM "data.txt" RECORD (nRec) DELIMITED
         APPEND FROM "data.txt" RECORD (nRec) SDF
      It's Harbour extension - Cl*pper does not support it.
    + generate RTE when some unsupported in transfer RDDs methods are
      called
2016-01-04 21:25:29 +01:00
Przemysław Czerpak
c559d7409b 2015-12-29 17:03 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
+ src/3rd/hbdossrl/Makefile
  + src/3rd/hbdossrl/serial.c
  + src/3rd/hbdossrl/serial.h
  + src/3rd/hbdossrl/README
    + added DOS Serial Library - it's much cleaner and simpler then COMLib
      we used so far in DOS builds. It also supports hardware and software
      flow control. Many thanks for Karl Stenerud for his wonderful job.

  * src/rtl/hbcom.c
    + added support for DOS Serial Library used as low level backend in
      Harbour DOS builds.

  * config/dos/djgpp.mk
  * config/dos/watcom.mk
  * config/dyn.mk
  * config/lib.mk
  * src/3rd/Makefile
  * src/Makefile
  * utils/hbmk2/hbmk2.hbp
  * utils/hbmk2/hbmk2.prg
    * use DOS Serial Library (hbdossrl) instead of COMLib (hbpmcom)
2015-12-29 17:03:40 +01:00
Przemysław Czerpak
9e04ac8ad3 2015-12-14 14:34 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rtl/hbproces.c
    + protect DosExecPgm() and standard file IO redirection in OS2 builds
      by GT mutex
2015-12-14 14:34:51 +01:00
Przemysław Czerpak
7b7ac86752 2015-12-10 17:24 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rtl/filesys.c
    * added HB_OS2_NONAMEDPIPES macro for OS2 build tests
  * src/rtl/hbproces.c
    * formatting
2015-12-10 17:24:10 +01:00
Przemysław Czerpak
ea09561adf 2015-12-09 14:22 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/dbinfo.ch
  * include/hbrdddbf.h
  * src/rdd/dbf1.c
    + added new RDD switch RDDI_SETHEADER
      It allows to define how DBF header is updated in tables which
      will be opened later, i.e.:
         // maximize performance reducing number of DBF header updating
         // header is updated only when table is closed if before new
         // record was added
         hb_rddInfo( RDDI_SETHEADER, DB_SETHEADER_MINIMAL )
      or:
         // update header in the same moment as Clipper and xBase++
         // and store only last two digit from the year for compatibility
         // with old dBase and FoxPro versions
         hb_rddInfo( RDDI_SETHEADER, ;
                     hb_bitOr( DB_SETHEADER_CLIPPER, DB_SETHEADER_YYEAR ) )
         // DB_SETHEADER_CLIPPER
      By default Harbour uses DB_SETHEADER_APPENDSYNC.
      For more information look at comments for DB_SETHEADER_* switches
      in dbinfo.ch
    + added new table switch DBI_SETHEADER
      It has the same meaning as RDDI_SETHEADER but changes the header
      updated mode of already open table by dbInfo() function.

  * src/rtl/filebuf.c
    ! added missing redirection for Configure() method.

  * src/rtl/hbproces.c
    ! fixed sysconf() emulation for OpenWatcom 1.9 and earlier to work with
      _SC_PAGESIZE
2015-12-09 14:22:57 +01:00
Przemysław Czerpak
071cdda627 2015-12-05 10:05 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rtl/gtos2/gtos2.c
    ! fixed GCC builds - many thanks to David Macias
2015-12-05 10:05:59 +01:00
Przemysław Czerpak
43006ae7e9 2015-12-01 22:46 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rdd/dbf1.c
    * update DBF header only after modification in COMMIT and CLOSE methods.
      It's Cl*pper and xBase++ compatible behavior anyhow it also means that
      number of records in DBF header is not modified just after APPEND
      so it cannot be used to synchronization in concurrent file access.

  * src/rtl/hbproces.c
    ! safe and restore hb_fsError() when unused pipe handles are closed
      in hb_fsProcessOpen()
    ! add extension (.com or .exe) in hb_fsProcessOpen()/hb_fsProcessRun()
      when executed command is given with PATH part and without extension.
      It's documented that DosExecPgm() needs full filename in such case.
      It fixes problem with contrib/make.hb which calls hbmk2 with directory
      part but without extension.
    ! enabled pipes instead of temporary files for stdio redirection in OS2
      builds of hb_fsProcessRun() - now it should work correctly.

  * src/rtl/hbprocfn.c
    + update FError() in hb_Proces*() functions
2015-12-01 22:46:39 +01:00
Przemysław Czerpak
f55c0a997a 2015-11-30 14:56 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/hbjson.h
  * src/rtl/hbjson.c
    + added new C function:
         char * hb_jsonEncodeCP( PHB_ITEM pValue, HB_SIZE * pnLen,
                                 HB_BOOL fHuman, PHB_CODEPAGE cdp );
      It allows to pass explicitly codepage in which strings inside pValue
      are encoded. If cdp parameter is not NULL then it's used to extract
      unicode character values from passed strings and this values is used
      to encode to encode non ASCII characters as "\uXXXX" where XXXX is
      unicode character value. Data serialized in such way is 7bit clean.
      If this parameter is NULL then strings are encoded in raw form just
      like in hb_jsonEncode().
    + added new C function:
         HB_SIZE hb_jsonDecodeCP( const char * szSource, PHB_ITEM pValue,
                                  PHB_CODEPAGE cdp );
      It allows to pass explicitly codepage used for strings decoded from
      JSON data. If this parameter is NULL then strings are decoded in raw
      form and unicode character with code over 255 are converted to '?'
      char.
    + added optional 3-rd parameter with codepage ID to PRG functions
      hb_jsonEncode() and hb_jsonDecode(). If this parameter is not given
      then above functions works like before this modification:
      hb_jsonEncode() uses raw string encoding and hb_jsonDecode() uses
      current HVM CP to decode characters encoded as \uXXXX.
    + modified PRG function hb_jsonDecode() to return decoded data
      instead of length of decoded data when second parameter is not
      passed by reference.
2015-11-30 14:56:10 +01:00
Przemysław Czerpak
706a75cece 2015-11-25 15:06 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/harbour.hbx
  * src/rtl/dateshb.c
    + added two new PRG functions:
         hb_SecToT( <nSeconds> ) -> <tTime>
         hb_MSecToT( <nMilliseconds> ) -> <tTime>

  * include/hbset.h
  * src/vm/set.c
    + added new C function:
         int hb_setUpdateEpoch( int iYear );
      if necessary it converts year respecting _SET_EPOCH settings

  * src/rtl/dates.c
    * use hb_setUpdateEpoch() instead of local code

  * src/rdd/dbf1.c
    ! respect _SET_EPOCH decoding DBF update time from DBF HEADER
      (LUpdate() function).
      It's not Cl*pper compatible anyhow looks that most of tools
      stores only last two digits from the year (just like in the
      DBF documentation) and -1900 trick is not used so it helps
      to decode correct update date.
    * store 'year % 100' instead of 'year - 1900' in DBF header
      when DBF table with VFP signature is used (DB_DBF_VFP).
2015-11-25 15:06:44 +01:00
Przemysław Czerpak
7340d7a5cd 2015-11-14 13:19 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rtl/filebuf.c
    ! restored _SET_DEFAULT and _SET_PATH functionality
2015-11-14 13:19:16 +01:00
Przemysław Czerpak
debf33a962 2015-11-13 14:03 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rtl/filebuf.c
    * removed unused after last modification assignment
2015-11-13 14:03:45 +01:00
Przemysław Czerpak
30d0f5bd78 2015-11-13 10:29 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rtl/filebuf.c
    ! fixed file handle sharing in POSIX systems when writeonly mode is used
    ! fixed accessing files in writeonly mode in POSIX systems which use
      fcntl() locks for DENY_* flag emulation.
    ! added for POSIX systems protection against potential race condition in
      MT programs and file open and close operations. Now the whole low level
      open and close operations are covered by mutex. It means that they are
      fully serialized so in case of remote file access (i.e. NFS or SMBFS)
      it may reduce the performance in applications which simultaneously open
      and closes many different files in different threads but its necessary.
      For local file access it should not create noticeable scalability
      problems. In my Linux box Harbour can open and close in MT mode more
      then 250000 files per second.
    % use different mutexes for file open/close and file lock operations to
      not reduce the lock performance by potentially slow open() operation
      in POSIX systems.
    ; NOTE: please remember that DENY_* flag emulation in POSIX systems
            emulates only shared and exclusive modes so if any of
            FO_DENYREAD, FO_DENYWRITE or FO_EXCLUSIVE flag is used then
            it effectively works like FO_EXCLUSIVE in POSIX system and
            is not mandatory for other processes so it blocks only
            other Harbour applications which use Harbour virtual handles
            (RDD code, hb_vf*() functions)

  * src/rtl/filesys.c
    * do not convert exclusive lock to shared one when file is open in
      readonly mode on POSIX system using flock() for DENY_* flag emulation.
      Now HB_USE_BSDLOCKS is enabled only for Linux and it's documented that
      this implementation allow to use shared and exclusive locks regardless of
      file open mode.
    % do not create file name copy in hb_fsExtOpen() when passed parameters
      does not force file name modification
2015-11-13 10:29:25 +01:00
Przemysław Czerpak
9c5f875a7a 2015-11-03 10:44 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rtl/gtwin/gtwin.c
    * added workaround for compilers which do not have MOUSE_HWHEELED macro
      (thanks to Alexey)

  * src/rtl/gtwvt/gtwvt.c
    * do not use LR_DEFAULTSIZE in WinCE builds (synced with Viktor's branch)

  * tests/gtkeys.prg
    * casing
2015-11-03 10:44:29 +01:00