Commit Graph

117 Commits

Author SHA1 Message Date
Przemysław Czerpak
1be1c7da9c 2015-08-27 16:46 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/fileio.ch
    + added few HB_VF_* macros for hb_vfConfig() settings

  * contrib/hbcomio/comio.c
  * contrib/hbtcpio/tcpio.c
    + implemented HB_VF_TIMEOUT, HB_VF_PORT, HB_VF_SHUTDOWN, HB_VF_RDHANDLE
      and HB_VF_WRHANDLE hb_vfConfig() settings, i.e. now
         hb_vfConfig( pFile, HB_VF_TIMEOUT, <nTimeOut> ) -> <nTimeOut>
      can be used to change default timeout in TCP and COM Harbour File IO
      handles.
2015-08-27 16:46:12 +02:00
Przemysław Czerpak
41b8ecb6c7 2015-08-26 15:51 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/hbsocket.h
  * src/rtl/hbsockhb.c
    + added socket filters to standard socket API.
      At C level hb_sockex*() function with PHB_SOCKEX handler can be
      used to operate on socket filters. At PRG level standard hb_socket*()
      functions can be used.
      The following things has been changed in PRG hb_socket*() functions:
      hb_socketErorrString() can accept <pSocket> as 1-st or 2-nd parameter
      and redirect call to socket filter errorStr() method.
      hb_socketClose() executes automatically shutdown() for connected
      sockets - it is important in windows only where without explicit
      call to shutdown() before close transmitted data can be lost.
      hb_socketSend() and hb_socketRecv() can be redirected to filter
      streams if filter set such redirection. If filter does not redirect
      them then they operate on raw sockets. If hb_socketSend() is
      redirected then sent data is flushed automatically.
      The following new PRG functions has been added:
      Add/replace socket filter:
         hb_socketSetFilter( <pSocket>, [<cFilterName>], [<hParams>] )
               -> <pSocket> | NIL
            <cFilterName> is filter name, It's possible to set many filters
            in single hb_socketSetFilter() call separating filter names
            with "|" character, i.e.:
               pSock := hb_socketSetFilter( pSock, "ZSOCK|BFSOCK", hParams )
            <hParams> is hash array with initialization parameters used by
            given socket filter. The core implementation recognize the
            following settings:
               "readahead" - numeric value with size of read ahead buffer
               "flush" - numeric value with auto flush parameter (for more
                         information look at hb_socketAutoFlush() below)
               "redir" - logical value which can be use to enable/disable
                         hb_socketSend() and hb_socketRecv() redirection
                         to filter stream.
      Return filter name used by socket:
         hb_socketGetFilter( <pSocket> ) -> <cFilterName>
      Read from socket stream:
         hb_socketRead( <pSocket>, @<cData>, [<nLen> = Len( cData )],
                        [<nTimeout> = FOREVER] ) -> <nRead>
         this function is similar to hb_socketRecv() but is always
         redirected to socket stream filters.
      Write to socket stream:
         hb_socketWrite( <pSocket>, <cData>, [<nLen> = Len( cData )],
                         [<nTimeout> = FOREVER] ) -> <nWritten>
         this function is similar to hb_socketSend() but it is always
         redirected to socket stream filters. Written data is not flushed
         by default and it should be flushed explicitly by hb_socketFlush().
         Automatic flushing can be enabled by hb_socketAutoFlush() function.
      Flush data written to socket:
         hb_socketFlush( <pSocket>, [<nTimeout> = FOREVER], [<lSync>] )
                     -> <nNotFlushed>
            <lSync> parameter is logical value which can be used to force
            special synchronization method in some filters. Usually users
            do not have to use it in normal code.
      Enable/disable automatic flushing of written data.
         hb_socketAutoFlush( <pSocket>, [ <nTimeout> ] ) -> <nTimeout>
            <nTimeout> is timeout for automatic flush operation on written
            data in milliseconds. <nTimeout> = -1 means wait forever and
            <nTimeout> = 0 disables auto flush.
         automatic flushing can help in adopting existing code anyhow it
         may strongly reduce the performance in some filters, i.e.
         compression filters like ZSOCK have to add special data to the
         stream after each flush operation so it's suggested to call
         flush explicitly when we want to force delivering written data
         to the peer.

  * include/hbznet.h
  * src/rtl/hbznet.c
    + added ZNET socket filter - compressed and encrypted streams are
      compatible with hb_znet*() streams. The old hb_znet*() interface
      is obsolete for pure socket communication and if not used as
      hb_inet*() filter then should be replaced by hb_sockex*() in
      user programs.
      ZNET socket filter can be created by new PRG functions:
         hb_socketNewZNet( <pSocket>, [<cPass>], [<nCompressionLevel>], ;
                           [<nStrategy>] ) -> <pSocket> | NIL
      or by standard socket API with "ZNET" as filter name.
      ZNET filter recognize the following settings in initialization
      hash array:
         "key" or "pass" - string with encryption password
         "zlib" - numeric compression level (HB_ZLIB_COMPRESSION_*)
         "zs" - numeric ZLIB compression strategy (HB_ZLIB_STRATEGY_*)
      ZNET filter always disables any other filters and operates on raw
      socket.
      Please remember that it's optional module. If programmer does not
      use hb_socketNewZNet() explicitly and prefers using hb_socketNew()
      then he should force linking this module by REQUEST hb_socketNewZNet

    + added fSync parameter to hb_znetFlush()
      [INCOMPATIBLE]

  * src/rtl/hbinet.c
    * call flush filter function before socket is closed

  * src/rtl/Makefile
  + src/rtl/hbzsock.c
    + added ZSOCK socket filter - ZLIB and GZIP compression for socket
      streams.
      ZSOCK socket filter can be created by new PRG functions:
         hb_socketNewZSock( <pSocket>, [<hParams>] ) -> <pSocket> | NIL
      or by standard socket API with "ZSOCK" as filter name.
      Programmers using hb_socketNew() can force linking this module by
         REQUEST hb_socketNewZSock
      ZSOCK filter can be used with other filters.
      ZSOCK filter recognize the following settings in initialization
      hash array:
         "zlib" - numeric compression level (HB_ZLIB_COMPRESSION_*)
         "zs" - numeric ZLIB compression strategy (HB_ZLIB_STRATEGY_*)
         "zin" - logical value which allow to enable/disable ZLIB
                 decompression on input stream (default)
         "gzin" - logical value which allow to enable/disable GZIP
                  decompression on input stream - it's possible to
                  enable both ZLIB and GZIP decompression together
                  so both streams can be decompress
         "zout" - logical value which allow to enable/disable ZLIB
                  compression on output stream (default)
         "gzout" - logical value which allow to enable/disable GZIP
                   compression on output stream - if both "zout" and
                   "gzout" are enabled GZIP compression is used.

  * src/rtl/Makefile
  + src/rtl/hbbfsock.c
    + added BFSOCK socket filter - BlowFish input and output stream
      encryption in CTR mode.
      BFSOCK socket filter can be created by new PRG functions:
         hb_socketNewBFSock( <pSocket>, [<hParams>] ) -> <pSocket> | NIL
      or by standard socket API with "BFSOCK" as filter name.
      Programmers using hb_socketNew() can force linking this module by
         REQUEST hb_socketNewBFSock
      BFSOCK filter can be used with other filters, i.e. with ZSOCK.
      Please only remember that good encryption algorithms have to
      generate data which cannot be compressed so using "BFSOCK|ZSOCK"
      only wastes resources and correct filter order is "ZSOCK|BFSOCK".
      BFSOCK filter recognize the following settings in initialization
      hash array:
         "key" or "pass" - string with encryption password
         "iv" - string with initialization vector for CTR mode

  * contrib/hbssl/hbssl.ch
  * contrib/hbssl/hbssl.h
  * contrib/hbssl/hbssl.hbm
  * contrib/hbssl/hbssl.hbx
  * contrib/hbssl/ssl.c
  * contrib/hbssl/ssl_inet.c
  + contrib/hbssl/ssl_sock.c
    + added SSL socket filter
      SSL socket filter can be created by new PRG functions:
         hb_socketNewSSL_connect( <pSocket>, <pSSL> [, <nTimeout> ] )
               -> <pSocketSSL> | NIL
         hb_socketNewSSL_accept( <pSocket>, <pSSL> [, <nTimeout> ] )
               -> <pSocketSSL> | NIL
      or by standard socket API with "SSL" as filter name.
      Programmers using hb_socketNew() can force linking this module by
         REQUEST hb_socketNewSSL_connect
      or
         REQUEST hb_socketNewSSL_accept
      SSL filter always disables any other filters and operates on raw
      socket.
      SSL filter recognize the following settings in initialization hash
      array:
         "ctx" or "key" - pointer SSL item <pSSL>
         "timeout" - timeout (numeric)
         "client" - logical value indicating client mode (SSL_connect())
         "server" - logical value indicating server mode (SSL_accept())

  * contrib/hbssl/tests/inetssl.prg
    ! cleaned typo in local function name

  * contrib/hbnetio/netiocli.c
  * contrib/hbnetio/netiosrv.c
    * use new Harbour extended socket API (hb_sockex*()) instead of
      raw sockets and hb_znet*()

  * contrib/hbtcpio/tcpio.c
    * use new Harbour extended socket API (hb_sockex*()) instead of
      raw sockets
    + implemented hb_fileFlush()
2015-08-26 15:51:35 +02:00
Przemysław Czerpak
864a1a106e 2015-08-17 15:39 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/hbznet.h
    + include hbsocket.h

  * src/rtl/hbznet.c
    * set socket error HB_SOCKET_ERR_OTHER if problems with
      ZLIB decompression appear
    * updated headers
2015-08-17 15:39:58 +02:00
Przemysław Czerpak
482e06d0fd 2015-08-17 15:29 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/hbsocket.h
  * src/rtl/hbsocket.c
  * src/rtl/hbsockhb.c
    + added new C functions:
         hb_socketAutoInit( void );
         hb_socketSetError( int iError );

  * contrib/hbtcpio/tcpio.c
    ! initialize socket subsystem - it fixes issue #105
2015-08-17 15:29:43 +02:00
Przemysław Czerpak
dc5937b990 2015-08-07 15:40 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbtcpio/tcpio.c
  * contrib/hbtcpio/hbtcpio.hbx
    + added new PRG function
         hb_vfFromSocket( <pSocket> ) -> <pFile>
      It converts socket created by socket open into TCPIP virtual file
      which works just like files created by hb_vfOpen( "tcp:...", ... )

  * include/hbapifs.h
  * src/rtl/filesys.c
    + added new C function
         HB_SIZE hb_fsPipeWrite( HB_FHANDLE hPipe, const void * buffer,
                                 HB_SIZE nSize, HB_MAXINT nTimeOut );
    + implemented hb_fsPipeUnblock() in OS2 builds
    + set IO error in hb_fsPipeCreate(), hb_fsIsPipeOrSock() and
      hb_fsPipeUnblock()
    * return ( HB_SIZE ) -1 from hb_fsPipeRead() if end of stream is
      reached or read error appears on non empty buffer. This modification
      also change the behavior of PRG hb_PRead() function so now result -1
      can be used to detect end of stream.

  * src/rtl/philes.c
  * include/harbour.hbx
    + added new PRG function:
         hb_PWrite( <nPipeHandle>, <cBuffer>, [<nBytes>], [<nTimeOut>] )
               -> <nBytesWritten>
    % removed unnecessary assignment

  * include/hbapiitm.h
    + added HVM internal macro hb_itemRawSwap()

  * src/vm/asort.c
    % use hb_itemRawSwap()
    * in old code use comparison which prefers < and > operators
      instead of <= and >=
2015-08-07 15:40:40 +02:00
Przemysław Czerpak
78c1d987db 2015-07-31 14:51 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
2015-07-31 14:04 UTC+0200 Viktor Szakats (vszakats users.noreply.github.com)
  * include/hbapifs.h
  * src/rtl/filebuf.c
  * src/rtl/vfile.c
    + add C-level hb_fileSizeGet() function
    * update HB_VFSIZE() to use hb_fileSizeGet() when passed a filename
      It means now HB_VFSIZE() works for non-virtual filenames
      just like HB_FSIZE() did.
2015-07-31 14:51:22 +02:00
Przemysław Czerpak
ddea7f90cb 2015-07-27 16:36 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rtl/chruni.c
    * added new functions hb_BStuff() and hb_UStuff()

  * src/rtl/Makefile
  - src/rtl/padc.c
  - src/rtl/padl.c
  - src/rtl/padr.c
  + src/rtl/padx.c
    * added new functions hb_BPadL(), hb_BPadR(), hb_BPadC(),
      hb_UPadL(), hb_UPadR() and hb_UPadC()

  * include/harbour.hbx
    * updated

  * src/rtl/memoedit.prg
  * src/rtl/teditor.prg
    * use hb_U*() functions for string manipulation - now it works
      correctly with mulitbyte encodings even if HVM CP does enabled
      character indexing, i.e. "UTF8"

  * src/rtl/vfile.c
    * pacified BCC warnin

  * src/rtl/filesys.c
  * src/rtl/fssize.c
    * use GetFileAttributesEx() if available in given windows version
      to get file size and time
2015-07-27 16:36:46 +02:00
Przemysław Czerpak
a173d31af9 2015-07-24 10:28 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/hbapifs.h
  * src/rtl/filebuf.c
  * src/rtl/filebufd.c
  * src/rtl/filesys.c
  * src/rtl/vfile.c
  * src/rtl/iousr.c
  * src/rdd/dbfcdx/dbfcdx1.c
  * src/rdd/dbffpt/dbffpt1.c
  * src/rdd/dbfnsx/dbfnsx1.c
  * src/rdd/dbfntx/dbfntx1.c
  * src/rdd/hsx/hsx.c
  * contrib/hbcomio/comio.c
  * contrib/hbmemio/memio.c
  * contrib/hbtcpio/tcpio.c
  * contrib/hbnetio/netio.h
  * contrib/hbnetio/netiocli.c
  * contrib/hbnetio/netiosrv.c
    * changed HB_USHORT uiAttr parameter to HB_FATTR nAttr
      in hb_fsExtOpen() and hb_fileExtOpen()

  * include/fileio.ch
  * src/rtl/vfile.c
    + added support for FO_DEFAULTS in hb_vfOpen().
      When this flag is used in <nModeAttr> parameters then new
      _SET_DEFAULT is respected when new file is created and
      _SET_DEFAULT + _SET_PATH when file is opened.
    + added support for checking file size by it's in hb_vfSize()
      so it can work like hb_FSize() but for virtual FS not only
      for local files. Now this function has the following syntax:
         hb_vfSize( <pHandle> | <cFileName> [, <lUseDirEntry> ] ) -> <nSize>
      The 2-nd parameter <lUseDirEntry> is significant only when
      the 1-st one <cFileName> is character value.

  * src/rtl/gttrm/gttrm.c
    * replaced C++ comments with ANSI ones

  * src/rtl/vfile.c
    * updated casing of function names in comments
    * return F_ERROR instead of NIL hb_vfHandle() when wrong parameter
      is given (borrowed from Viktor's branch)
    * added C function hb_fileParamGet() borrowed from Viktor's branch

  * src/rtl/filesys.c
    * variable localization (synced with Viktor's branch)

  * src/rtl/disksphb.c
    ! fixed bug with potentially uninitialized buffer
      (fix borrowed from Viktor's branch)
2015-07-24 10:28:12 +02:00
Viktor Szakats
8d8235ecad 2015-07-03 11:22 UTC+0200 Viktor Szakats (vszakats users.noreply.github.com)
* include/harbour.hbx
  * src/rtl/libnamec.c
    + rename HB_LIBPOSTFIX() to HB_LIBSUFFIX()
      old name is still available, but deprecated.
2015-07-03 11:25:13 +02:00
Przemysław Czerpak
aa76a355db 2015-06-26 14:18 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/harbour.hbx
  * src/rtl/cdpapihb.c
    + added new PRG function:
          hb_cdpIsCharIdx( [ <cCdpID> ] [, <lNewMode>] ) -> <lPrevMode>
      It returns .T. when given codepage uses custom character indexes
      instead of byte indexes.
      If <cCdpID> is not specified then current HVM codepage is used.
      Optional logical parameter <lNewMode> allows to enable/disable
      custom character indexes in codepages which have such functionality,
      i.e. UTF8, BIG5, CP950.

  * src/rtl/rtlshort.c
    * removed __QUITCANCEL() - this function does not exist in Cl*pper.
2015-06-26 14:18:23 +02:00
Przemysław Czerpak
5576a9721b 2015-05-19 15:17 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/common/hbprintf.c
    * removed modfl() protection with old HB_OS_IPHONE macro.
      If someone will need it for some old iOS versions then please read
      it protected by HB_OS_IOS and __IPHONE_OS_VERSION_MIN_REQUIRED
      macros or inform me about the exact iOS version which do not support
      modfl() and I'll add it.

  * include/hbatomic.h
    * disable GCC atomic macros for GCC <= 4.5 in OS2 builds.
      They can be manually enabled by users using:
         set HB_USER_CFLAGS=-DHB_USE_GCCATOMIC
2015-05-19 15:17:41 +02:00
Przemysław Czerpak
e8601dacaa 2015-05-18 23:01 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/hbsetup.h
    * set HB_OS_IOS when __IPHONE_OS_VERSION_MIN_REQUIRED is defined

  * include/hbsetup.h
  * src/common/hbver.c
    * detect 64bit ARM CPUs

  * contrib/hbct/envparam.c
  * contrib/hbnf/getenvrn.c
    ! disabled ENVPARAM() and FT_GETE() in iOS builds
    + added support for FT_GETE() in OS2 builds
2015-05-18 23:01:14 +02:00
Przemysław Czerpak
f23cbd0427 2015-05-05 19:35 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rtl/filebuf.c
    ! fixed GPF when NULL filename is passed to Accept() method

  * include/hbclass.ch
    * indenting
2015-05-05 19:35:29 +02:00
Przemysław Czerpak
f7184a48fc 2015-03-24 13:42 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/harbour.hbx
  * src/vm/cmdarg.c
    + added new PRG function
         hb_ACmdLine() -> <array>
      borrowed from Viktor's branch (2015-03-12 03:02 UTC+0100 Viktor Szakats)
      It returns array with all command line parameters. Unlike
          hb_AParams( __dbgProcLevel() - 1 )
      hb_ACmdLine() returns all parameters also hidden ones just like
      hb_CmdLine() function and hb_argv()/hb_argc()
      Please also remember that hb_AParams() returns current value of
      parameters which could be changed bu user code so they can be different
      then original parameters passed to given function.

  * src/rtl/gtchrmap.c
    * casting

  * include/std.ch
    * synced casing with Viktor's branch
2015-03-24 13:42:51 +01:00
Przemysław Czerpak
e54036073c 2015-03-23 21:02 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/hbsix.ch
  * include/std.ch
    * formatting
2015-03-23 21:02:02 +01:00
Przemysław Czerpak
c177fcb7d4 2015-03-23 16:21 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/std.ch
    + added VIA and CODEPAGE parameters to SORT TO and TOTAL TO commands
    * formatting

  * include/hbsix.ch
    * synced SIX3 compatible SORT TO command with core SORT TO parameters
2015-03-23 16:21:50 +01:00
Przemysław Czerpak
c99d950516 2015-03-23 15:03 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/hbapirdd.h
  * include/hbusrrdd.ch
    + added DBTF_RECALL flag which disables transferring record DELETED flag

  * src/rdd/dbcmd.c
  * src/rdd/workarea.c
    ! disable transferring DELETED flag to destination area in SORT TO /
      __dbArrange() operations

  * src/rdd/delim1.c
  * src/rdd/sdf1.c
    + added dummy RECALL() methods - now RECALL() can be executed by workarea
      TRANSREC() method when DBTF_RECALL flag is set
2015-03-23 15:03:27 +01:00
Przemysław Czerpak
db16cc8861 2015-03-20 16:34 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/Makefile
  - include/hbdbsort.h
  * src/rdd/Makefile
  - src/rdd/hbdbsort.c
  * src/rdd/dbf1.c
    - completely removed old code used in DBF* RDDs as low level backend
      for SORT TO ... command and __dbArrange() function.
      It was buggy and extremely inefficient in some cases, i.e. after
      20 hours I killed process which was sorting table with 2'000'000
      records in reverted order so I cannot even say how much time it
      needed.

  * src/rdd/dbf1.c
    + added new code for table sorting in DBF* RDDs
      (SORT TO ... / __dbArrange() backend)
      New code fixes many different problems which existed in previous one
      like missing support for national collation, wrong descending orders,
      wrong sorting of numeric fields with negative values, missing support
      for sorting many field types, missing support for transferring MEMO
      fields, missing support for transferring records to table with different
      field structure or serving by different RDD, etc.
      New code is also many times faster then the old one. In practice it
      means is now usable for tables with more then few thousands records,
      i.e. the test table with 2'000'000 records I used with old code was
      copied in sorted order in 13 secs. when pure COPY TO needed 10 secs.
      Now it's possible to export sorted tables to different RDDs, i.e.
      using DELIM or SDF RDDs in desitnation area.
      New code is written in general form without any local to DBF* RDDs
      extensions so it can be adopted as base in any other RDD. Probably
      I'll move it to default workarea methods so it will be inherited by
      all Harbour RDDs and only if necessary authors of some RDDs may
      overload it, i.e. to move the operation to the server side in remote
      RDDs when source and destination tables are processed by the same
      server.
      This modification closes the last known for years bug or rather bag
      of bugs ;-) in Harbour.
    ; NOTE: For large tables new sorting algorithm may access source records
            more then once. It means that results may be wrongly sorted when
            sorted fields in exported records are modified concurrently by
            other station during exporting. This can be easy eliminated by
            copping source records to temporary file anyhow it will introduce
            additional overhead in all cases and user can easy eliminate the
            problem by simple FLOCK before sort or making export to temporary
            file and then sorting this file or he can simply ignore this
            problem as unimportant in the specific situation so I decided to
            not implement double copping.
            I haven't tested what Cl*pper exactly does in such case so
            I cannot say if current behavior is or isn't Cl*pper compatible.
2015-03-20 16:34:03 +01:00
Przemysław Czerpak
ee5f8ac72f 2015-03-18 23:16 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/hbrddcdx.h
  * src/rdd/dbfcdx/dbfcdx1.c
    % small speed improvement during indexing
    * casting

  * src/rdd/dbfnsx/dbfnsx1.c
  * src/rdd/dbfntx/dbfntx1.c
    * casting
2015-03-18 23:16:36 +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
03e7b6da6e 2015-03-03 16:26 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/rddads/ads1.c
    ! use AdsSetLongLong() (if available) instead of AdsSetDouble() to not
      strip less significant bits from 64bit integer number during conversion
      to double
    * allow ADS to decide if writing into rowver and modtime fields is legal
      instead of generating our own arbitrary RTE

  * include/dbinfo.ch
  * src/rdd/workarea.c
    + added new dbInfo() action DBI_TRANSREC
      It indicates if area is destination table of currently processed COPY TO
      or APPEND FROM operation.

  * include/hbapirdd.h
  * src/rdd/wafunc.c
    + added new C function:
         HB_ERRCODE hb_dbTransCounters( LPDBTRANSINFO lpdbTransInfo );
      It copies field counters from source into destination table used
      in transfer operation.

  * src/rdd/dbcmd.c
  * src/rdd/wafunc.c
    + call DBI_TRANSREC to inform destination area that record transfer
      operation starts and stop. It allows destination RDD to change
      rules used for assign to automatically updated fields, i.e. unblock
      such operation.
    + call hb_dbTransCounters() to update counters in destination table
      after COPY TO operation

  * src/rdd/sdf1.c
  * src/rdd/delim1.c
    * clear AutoInc flag

  * src/rdd/dbf1.c
    + allow to set get and set counter for RowVer fields using DBS_COUNTER
      action
    * return HB_FAILURE for DBS_COUNTER and DBS_STEP if it's not supported
      by given field.
    + added support for DBI_TRANSREC - in case of DBF* RDDs it unblocks
      writing to automatically updated fields
2015-03-03 16:26:28 +01:00
Przemysław Czerpak
418caaac51 2015-02-17 12:06 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbssl/tests/inetssl.prg
  * contrib/rddads/ads1.c
  * src/rtl/teditor.prg
    * formatting of my recent modifications taken from Viktor's branch

  * src/common/hbfsapi.c
  * src/compiler/complex.c
    * formatting

  * include/hbset.h
  * src/vm/set.c
  * src/nortl/nortl.c
    + add new C functions to change HVM set values:
         hb_setSetFileCase(), hb_setSetDirCase(), hb_setSetDirSeparator(),
         hb_setSetTrimFileName()

  * include/hbcomp.h
  * include/hbcompdf.h
  * src/compiler/cmdcheck.c
  * src/compiler/hbmain.c
  * src/compiler/ppcomp.c
  * src/compiler/genc.c
  * src/compiler/hbusage.c
  * src/nortl/nortl.c
    * rewritten code used to parse command line and environment parameters.
      New code is covered by GPL + Harbour exception license.
      All parameters are decoded by only one function and whole code is
      smaller so it's much easier to modify this code.
    ! fixed some small bugs and incompatibilities with Cl*pper in parameter
      parsing
    ! fixed -y undocumented (YYDEBUG) switch
    - removed -x[<prefix>] set symbol init function name prefix (for .c only)
      compiler command line switch
    * moved -fn[:[l|u]|-] -fd[:[l|u]|-] -fp[:<char>] and -fs[-] switches
      parsing to core compiler library. Now these switches are also works
      with compiler library linked with HBMK2.
    ; TOFIX: HBMK2 ignores -fn/-fd switches and allocates temporary names
             which are not compatible with names used later by harbour
             compiler when above switches are activated. HBMK2 should
             parse parameters and update SET FILECASE / SET DIRCASE before
             it creates temporary files.
2015-02-17 12:06:51 +01:00
Przemysław Czerpak
080ab48930 2015-02-11 12:31 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/codepage/l_fr.h
    + added 'Ç' and 'ç' characters to set of french letters
    ; this modification affected "FRISO" and "FRWIN" codepages.
      Users using them and above characters in index field should
      reindex their databases.

  * include/hbcpage.hbx
  * src/codepage/Makefile
  * src/codepage/cpfr850.c
  + src/codepage/cpfr850c.c
    * renamed "FR850" codepage to "FR850C". This is is Cl*pper ntxfre.obj
      compatible codepage.
      If someone uses DBF files with indexes simultaneously with Cl*pper
      applications using collation order defined in ntxfre.obj the he has
      to use "FR850C" codepage in Harbour.
      Warning: Any users using French "FR850" codepage so far should change
               the code to "FR850C".
    + added new French codepage "FR850" with all French characters and
      accented equal collation rules.

   ; above modifications close issue #88
2015-02-11 12:31:48 +01:00
Przemysław Czerpak
7886f9f0ea 2015-02-10 17:23 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/hbznet.h
  * src/rtl/hbinet.c
    + added new C function hb_znetInetTimeout()
    * minor cleanup (local variables localization)

  * contrib/hbssl/hbssl.hbm
  * contrib/hbssl/hbssl.hbx
  + contrib/hbssl/ssl_inet.c
    + added support for SSL/TLS encryption in hb_inet*() sockets.
      To enable SSL/TLS encryption on such socket it's enough to
      call hb_inetSSL_connect() or hb_inetSSL_accept() passing as
      1-st parameter hb_inet socket item with already established
      connection and in in the 2-nd parameter SSL item. The peer
      should call second function. In general hb_inetSSL_connect()
      should be called by client and hb_inetSSL_accept() by server.
      To use hb_inetSSL_accept() it's necessary to also set
      certificated (at least self ;-)) encryption keys. See the
      example I committed to test directory.
      The exact syntax of new functions is:
         hb_inetSSL_connect( <pSocket>, <pSSL> [, <nTimeout> ] )
         hb_inetSSL_accept( <pSocket>, <pSSL> [, <nTimeout> ] )
      To use hb_inet*() functions to connect with SSL/TLS server
      Harbour users only have to call hb_inetSSL_connect() after
      setting connection, i.e.:

         IF !Empty( sock := hb_inetConnect( cServer, nPort ) )
            ssl_ctx := SSL_CTX_new()
            IF hb_inetSSL_connect( sock, SSL_new( ssl_ctx ) ) == 1
               // SSL connection established
               // now user can use all hb_inet*() functions is
               // the same way as for raw TCP connections and
               // all parameters like timeouts are fully supported
               // but transmission is encrypted.
               [...]
            ENDIF
         ENDIF

      It's not longer necessary to use SSL_set_fd() + SSL_connect()
      and then SSL_read() / SSL_write() / hb_SSL_read_line() /
      hb_SSL_read_all().
      BTW hb_SSL_read_line() and hb_SSL_read_all() in HBSSL library
      are broken and have to be fixed.
      TODO: Now HBTIP library can be nicely simplified and additional
            code for SSL/TLS read/write operations removed. It's
            enough to once call hb_inetSSL_connect() if SSL/TLS
            encryption is needed.

  + contrib/hbssl/tests/inetssl.prg
    + added test code for hb_inet*() SSL/TLS connections.
      It's client and server example which also generates self
      certificated encryption keys running openssl command.
      If this code is linked with non console GT then user
      should generated certificates himself (see comment in
      LoadCertificates() function for more information).
2015-02-10 17:23:48 +01:00
Przemysław Czerpak
725384ada6 2015-02-09 09:23 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/hbexpra.c
    * allow to use __BreakBlock() function as static initializer
2015-02-09 09:23:03 +01:00
Przemysław Czerpak
0c1c2ab698 2015-02-08 23:32 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/harbour.hbx
  * src/vm/hvm.c
    + added new PRG function:
         __BreakBlock() -> {|e| Break( e ) }

  * include/hbexprb.c
    % replace {|e| Break( e ) } with __BreakBlock() function call.
      __BreakBlock() returns exactly the same codeblock on each call
      so using it save memory and improve a little bit speed because
      it's not necessary to allocate new GC memory block and register
      it in GC block list. Additionally in MT mode it eliminates mutex
      lock necessary to register new GC block.
2015-02-08 23:32:45 +01:00
Przemysław Czerpak
bcbd37990b 2014-12-29 20:27 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/hbznet.h
  * src/rtl/hbinet.c
  * src/rtl/hbinetz.c
    * moved HB_INET_ERR_* macros to header file
    + added error and errorStr functions to hb_inet*() socket read/write
      wrappers
    ! call close function of hb_inet*() socket read/write wrappers before
      closing the socket
    + added hb_znetInetFD() C function

  * src/rtl/teditor.prg
    ! use hb_ATokens( <cText>, .T. ) and MemoLine() to divide text into lines
      to improve performance and fix TABs decoding

  * src/rtl/memoedit.prg
  * src/rtl/teditor.prg
    * applied recent fixes and cleanups from Viktor's branch.

  * src/rtl/tgetlist.prg
    * applied recent fixes from Viktor's branch:
    ; (2014-12-19 01:00 UTC+0100 Viktor Szakats)
       ! HBGetList():GUIApplyKey(): fixed bug introduced with UNICODE
         support in 93d3a46d84 (upstream).
         That patch had an undocumented workaround for the problem inside
         ListBox():findText(), which was not Cl*pper compatible, so
         it was later removed in 6f8508ff54a3955822b36bf4a65a2775a11bab23.
         This patch hopefully fixes the root cause.
         Reported here: https://groups.google.com/d/msg/harbour-devel/7Cpax5TdHnY/n5XfXX8N9vMJ
2014-12-29 20:27:15 +01:00
Przemysław Czerpak
20ec21c553 2014-12-12 13:30 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/hbcompdf.h
  * include/hbexprb.c
  * src/common/funcid.c
  * src/vm/hvm.c
    % optimize Array() function by replacing function call with HB_P_ARRAYDIM
      PCODE. Because this optimization changes RTE and interacts with broken
      code like
         aVal := Array( 10, 0, "A" )
      then it's not enabled by default. User can enable it by -ko switch.

  * utils/hbtest/rt_array.prg
    * use #pragma -ko- to for tests which interacts with above modification

  * src/rtl/hbproces.c
    % optimize memory allocation for redirected STDOUT and STDERR buffers in
      hb_processRun() function.
      The previous implementation was extremly inneficient when
      hb_processRun() was used to extract very long output from
      child process.

  * src/rtl/hbtoken.c
    + added support for dividing text into lines using EOLs used by different
      platform. To enable it it's enough to specify .T. as delimiter.

  * src/rtl/filesys.c
    * pacified MSVC warning - in fact this modification is significant only
      for bugy code which changes current directory in MT programs. It's bug
      on all platforms using current directory as process not thread
      attribute (common behavior).

  * include/inkey.ch
  * src/rtl/hbgtcore.c
    + added new extended keycodes:
         HB_K_TERMINATE
         HB_K_MENU

  * contrib/gtqtc/gtqtc1.cpp
    + center and rescale to console window dimension keeping aspect size ratio
      picture passed to HB_GTI_DISPIMAGE when second parameter is .T.
    + added support for HB_K_MENU key
    ! fixed dynamic font size modification in fullscreen, maximized and
      HB_GTI_RESIZEMODE_ROWS modes
2014-12-12 13:30:56 +01:00
Przemysław Czerpak
513f8824df 2014-12-05 01:33 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/common/hbffind.c
  * src/common/hbfsapi.c
  * src/rtl/filebuf.c
  * src/rtl/fssize.c
  * contrib/hbmzip/mzip.c
  * contrib/xhb/filestat.c
    ! typo in comment - thanks to Viktor

  * include/hbexprb.c
    * small code reorganization

  * include/hbvmpub.h
  * src/vm/hvm.c
    % use HB_VM_PUSHNIL() macro
    ! generate RTE for code like:
         LOCAL aVar[ 10, -1 ]
      (Cl*pper compatible)
2014-12-05 01:33:30 +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
b9b235cff9 2014-12-03 00:41 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/hbsocket.ch
    + added HB_SOCKET_ERR_NONE

  * src/rtl/hbsocket.c
    * clear socket error when hb_socketRecv*() or hb_socketSend*() returns
      value greater then 0
    % removed unnecessary error code setting in MS-Windows builds
      of hb_socketGetIFaces()

  * src/rtl/filesys.c
    ! allocate dynamically buffer for current directory name if default
      one is too small when current disk is checked

  * src/rtl/hbzlib.c
    * use hb_xalloc()/hb_xfree() to allocate/free memory during
      ZLIB compression and decompression instead of ZLIB default
      ones (finished code started in Viktor's branch)

  * src/rtl/tlabel.prg
  * src/rtl/treport.prg
    % use hb_ATokens() instead of local functions ListAsArray()
    * simplified reading labels and reports from files

  * src/rtl/teditor.prg
  * src/rtl/tget.prg
  * src/rtl/tlabel.prg
  * src/rtl/treport.prg
    * synced with Viktor's branch:
      removed explicit NIL from parameters, formatting, updated comments
      and variable names, use FOR EACH and SWITCH statements,
      use hb_defaultValue(), use hb_StrShrink(), formatting, few fixes

  * src/rtl/langcomp.prg
    * synced with Viktor's branch

  * src/rtl/memoedit.prg
    * synced with Viktor's branch, optimizations, formatting and fixes:
    ; 2014-03-28 13:09 UTC+0100 Viktor Szakats
       + MemoEdit(): allow BLOCK and SYMBOL types for user callbacks
         (only in the default, non-strict mode)
       ! MemoEdit(): fixed to only handle certain types of events in ME_INIT
         stage in harmony with Cl*pper documentation
       ! MemoEdit(): fixed to not get into an infinite loop on initialization
         when user callback is returning unhandled value
         https://github.com/harbour/core/issues/21
       ! MemoEdit()/HBMemoEditor():KeyboardHook(): fixed to fall back to
         default handling of K_ESC if getting called recursively
         https://github.com/harbour/core/issues/21
       + HBMemoEditor():HandleUserKey(): now returns whether the event was
         handled (as logical value) (previously: Self) [INCOMPATIBLE]
       * fixed some misleading variable names
    ; 2014-01-28 03:11 UTC+0100 Viktor Szakáts
       ! MemoEdit() fixed to pass-through without interactivity
         when the user function is a boolean .F.
    ; 2014-01-27 15:15 UTC+0100 Viktor Szakáts
       % abort key checking optimized and made unicode compatible

  * src/rtl/listbox.prg
    * synced with Viktor's branch, optimizations, formatting and fixes:
    ; 2014-07-21 08:56 UTC+0200 Viktor Szakats
       ! ListBox():findData(): fixed to be able to search for non-string
         data, to the same extent Cl*ipper is able to.
       ! ListBox():findData(): fixed exact/case-insensitive regression
         from 6f8508ff54a3955822b36bf4a65a2775a11bab23
    ; 2014-07-21 03:26 UTC+0200 Viktor Szakats
       + LISTBOX object instance area made compatible with Cl*pper
         (relevant when object is accessed as array)
    ; 2014-07-21 01:20 UTC+0200 Viktor Szakats
       * renamed variable and macro to reflect their type
       + ListBox():findData(): documented potential RTE
    ; 2014-07-21 01:04 UTC+0200 Viktor Szakats
       % ListBox():findText(), ListBox():findData(): use hb_LeftEq[I]()
       ! ListBox():findText(), ListBox():findData(): fixed to not RTrim()
         while searching in EXACT mode. Regression from f61409bf19
       + ListBox():findText(), ListBox():findData(): allow to search
         for any type of data in HB_CLP_STRICT mode to mimic Cl*pper behavior
       ! ListBox():findText(): fixed to allow zero length search text,
         like Cl*pper. Regression from 93d3a46d84
       ! ListBox():addItem( cText, cData ): fixed to allow any type for cData,
         not just NIL and string, like Cl*pper
       + ListBox():setData(): documented a Cl*pper bug
    ; 2014-03-09 18:19 UTC+0100 Viktor Szakáts
       ! ListBox():scroll() fixed to ignore non-numeric parameter
         (like Cl*pper) instead of an RTE
2014-12-03 00:41:38 +01:00
Przemysław Czerpak
bc7ff4d5c6 2014-11-29 06:03 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/hbapifs.h
  * src/common/hbffind.c
  * src/rtl/direct.c
  * src/rtl/dirscan.prg
  * src/rtl/filebuf.c
    + added lTime member to HB_FFIND structure
    + added 3-rd parmeter to hb_fsDirectory()
    + extended default maximum number of Harbour file IO redirecros to 128
    * use hb_xgrabz()
    * formatting

  * include/hbcompdf.h
  * include/hbpp.h
  * src/compiler/cmdcheck.c
  * src/compiler/genc.c
  * src/compiler/hbcomp.c
  * src/compiler/hbmain.c
  * src/compiler/ppcomp.c
  * src/pp/hbpp.c
  * src/pp/ppcore.c
  * src/pp/pplib.c
    + added support for -ql compiler switch - it disables displaying PRG line
      numbers during compilation
    + added internal support for switch which disables PRG names from final
      PCODE - it's not active by default

  * src/compiler/ppcomp.c
    + allow to change -gc? switch by #pragma directives

  * src/compiler/hbusage.c
    * present '-' as default option separator for all platforms

  * src/rdd/Makefile
  + src/rdd/rddshort.c
  - src/rdd/dbfuncs.prg
    * moved short function names (10 characters Cl*pper compatible) wrappers
      to rddshort.c

  * src/common/hbhash.c
  * src/compiler/gencc.c
  * src/compiler/hbcomp.c
  * src/compiler/hbdbginf.c
  * src/compiler/hbdead.c
  * src/compiler/hbmain.c
  * src/compiler/hbopt.c
  * src/debug/dbgentry.c
  * src/pp/ppcore.c
  * src/rdd/dbf1.c
  * src/rdd/dbfntx/dbfntx1.c
  * src/rdd/delim1.c
  * src/rdd/sdf1.c
  * src/rdd/hsx/hsx.c
  * src/rdd/usrrdd/usrrdd.c
  * src/rdd/wafunc.c
  * src/rdd/workarea.c
  * src/vm/classes.c
  * src/vm/dynsym.c
  * src/vm/estack.c
  * src/vm/runner.c
  * src/vm/set.c
  * src/vm/task.c
  * src/rtl/cdpapi.c
  * src/rtl/filebuf.c
  * src/rtl/gtcgi/gtcgi.c
  * src/rtl/gtcrs/gtcrs.c
  * src/rtl/gtstd/gtstd.c
  * src/rtl/gttrm/gttrm.c
  * src/rtl/gtxwc/gtxwc.c
  * src/rtl/hbdyn.c
  * src/rtl/hbgtcore.c
  * src/rtl/hbi18n1.c
  * src/rtl/hblpp.c
  * src/rtl/hbznet.c
  * src/rtl/iousr.c
    * use hb_xgrabz()

  * src/common/hbprintf.c
    * formatting
    * reduced variable scope

  * src/rdd/dblist.prg
  * src/rdd/hbsix/sxini.prg
  * src/rtl/hbfilehi.prg
    % use new hb_FName*() functions

  * src/codepage/cp_950.c
  * src/codepage/cp_big5.c
  * src/codepage/cp_gbk.c
  * src/codepage/cp_u16le.c
  * src/codepage/cp_utf8.c
  * src/common/hbfopen.c
  * src/common/hbstr.c
  * src/common/strwild.c
  * src/compiler/complex.c
  * src/compiler/genc.c
  * src/compiler/hbopt.c
  * src/compiler/hbusage.c
  * src/debug/dbghelp.prg
  * src/debug/debugger.prg
  * src/hbextern/hbextern.prg
  * src/main/harbour.1
  * src/pp/ppcore.c
  * src/rdd/dbcmd.c
  * src/rdd/dbcmd53.c
  * src/rdd/dbf1.c
  * src/rdd/dbfcdx/dbfcdx1.c
  * src/rdd/dbfntx/dbfntx1.c
  * src/rdd/dbjoin.prg
  * src/rdd/dbnubs.c
  * src/rdd/dbsort.prg
  * src/rdd/dbstrux.prg
  * src/rdd/dbtotal.prg
  * src/rdd/dbupdat.prg
  * src/rdd/hbsix/sxcompat.prg
  * src/rdd/hbsix/sxcrypt.c
  * src/rdd/hbsix/sxini.prg
  * src/rdd/hsx/hsx.c
  * src/rdd/usrrdd/usrrdd.c
  * src/vm/debug.c
  * src/vm/estack.c
  * src/vm/set.c
  * src/vm/task.c
  * src/rtl/achoice.prg
  * src/rtl/adir.prg
  * src/rtl/alert.prg
  * src/rtl/altd.prg
  * src/rtl/base64d.c
  * src/rtl/browse.prg
  * src/rtl/cdpapi.c
  * src/rtl/checkbox.prg
  * src/rtl/color53.prg
  * src/rtl/dbedit.prg
  * src/rtl/dircmd.prg
  * src/rtl/dirscan.prg
  * src/rtl/errapi.c
  * src/rtl/errsys.prg
  * src/rtl/fnsplit.c
  * src/rtl/gtchrmap.c
  * src/rtl/gtcrs/gtcrs.c
  * src/rtl/gtsln/gtsln.c
  * src/rtl/gtsln/mousesln.c
  * src/rtl/gttrm/gttrm.c
  * src/rtl/gtwin/gtwin.c
  * src/rtl/gtwvt/gtwvt.c
  * src/rtl/gtxwc/gtxwc.c
  * src/rtl/gui.prg
  * src/rtl/hbbfish.c
  * src/rtl/hbdoc.prg
  * src/rtl/hbfilehi.prg
  * src/rtl/hbgtcore.c
  * src/rtl/hbi18n2.prg
  * src/rtl/hbini.prg
  * src/rtl/hblpphb.c
  * src/rtl/hbregexc.c
  * src/rtl/memvarhb.prg
  * src/rtl/menusys.prg
  * src/rtl/menuto.prg
  * src/rtl/objfunc.prg
  * src/rtl/padc.c
  * src/rtl/padl.c
  * src/rtl/padr.c
  * src/rtl/profiler.prg
  * src/rtl/radiobtn.prg
  * src/rtl/radiogrp.prg
  * src/rtl/setcolor.c
  * src/rtl/tbcolumn.prg
  * src/rtl/tbrowse.prg
  * src/rtl/tclass.prg
  * src/rtl/tgetint.prg
  * src/rtl/tgetlist.prg
  * src/rtl/tmenusys.prg
  * src/rtl/tobject.prg
  * src/rtl/tpersist.prg
  * src/rtl/tpopup.prg
  * src/rtl/tpopuphb.prg
  * src/rtl/treport.prg
  * src/rtl/tscalar.prg
  * src/rtl/tsymbol.prg
  * src/rtl/ttextlin.prg
  * src/rtl/typefile.prg
    * formatting, casing, comment updating, removed trailing spaces, casting,
      replace hb_itemType() with HB_IS_*() macros, updated variable and
      function names and scopes, pacified unused result warnings, removed
      redundant castings, use HB_SIZEOFARRAY() and sizeof(), removed explicit
      NIL from parameters, use hb_LeftEq[I](), added supports for symbol items
      used as codeblock replacements, use hb_defaultValue(), use FOR EACH
      statement, use SWITCH statement, replaced SubStr() with Left() or
      Right(), use hb_AScan(), use hb_FReadLen()/hb_VFReadLen(),
      removed FO_READ from FOpen() parameters, use Str() instead of PadL(),
      use hb_StrShrink()

  * src/lang/l_el.c
  * src/lang/l_es_419.c
  * src/lang/l_fr.c
  * src/lang/l_hu.c
  * src/lang/l_pt_br.c
  * src/lang/l_sk.c
  * src/lang/l_tr.c
    * synced with Viktor's branch

  * src/rtl/achoice.prg
  * src/rtl/cdpdet.prg
    * synced with Viktor's branch

  * src/vm/Makefile
  + src/vm/short.c
    + added short function names (10 characters Cl*pper compatible) wrappers

  * src/vm/extrap.c
    * synced with Viktor's branch

  * src/rtl/Makefile
  + src/rtl/rtlshort.c
    + added short function names (10 characters Cl*pper compatible) wrappers

  * src/rtl/cdpdetc.c
  * include/harbour.hbx
    + added __wapi_GetConsoleOutputCP()

  * src/rtl/datec.c
  * include/harbour.hbx
    + added hb_CDay( <nDayOfWeek> ) -> <cDayName>

  * src/rtl/filesys.c
    ! do not check for PIPEs handles in WinCE builds
    ! respect OS returnb code in SystemTimeToFileTime()

  * src/rtl/gete.c
    * covered GetE() function by HB_CLP_UNDOC macro

  * src/rtl/philes53.c
    * covered FSetDevMod() function by HB_CLP_UNDOC macro

  * src/rtl/hbdoc.prg
    * use HB_SERIALIZE_COMPRESS instead of explicit hb_ZCompress()
      (incompatible, .hbd files has to be regenerated)

  * src/rtl/hbjson.c
    * add a newline at EOF in human readable mode

  * src/rtl/hbzlibgz.c
    * disabled GZIP support in MSVC WinCE builds

  * src/rtl/philes.c
  * include/harbour.hbx
    + added hb_FReadLen()

  * src/rtl/vfile.c
  * include/harbour.hbx
    + added hb_VFReadLen()

  * src/rtl/strclear.c
    ! check hb_itemGetWriteCL() result

  ; above modifications borrowed from Viktor's branch with some small
    modifications - many thanks

  * src/rtl/hbinet.c
    * extened readahead buffer from 256 to 1500 bytes
    ! fixed possible wrong result in hb_InetDataReady() and redirected
      sockets (i.e. by hb_InetCompress())

  * src/rtl/hbsocket.c
    ! typo in recent modification for BSD socket less builds

  + src/rtl/strutf8.c
  * include/harbour.hbx
    + added hb_StrIsUTF8() - it should be compatible with similar function
      from Viktor's branch

  * src/rtl/tpersist.prg
    * eliminated oSelf private variable and reduced macro expansion to
      item values

  * src/debug/dbgtmenu.prg
  * src/debug/dbgtwin.prg
  * src/debug/debugger.prg
    ! replaced SaveScreen()/RestScreen() with
      __dbgSaveScreen()/__dbgRestScreen() to fix problems with unicode
      characters which do not exists in HVM CP.

  * src/rdd/hbsix/sxcompat.prg
    + added support for timestamp values to sxChar(), sxNum(), sxDate()
      functions.
2014-11-29 06:03:17 +01:00
Przemysław Czerpak
41ddee0ea9 2014-11-18 14:13 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/dbinfo.ch
    + added new rddInfo() action: RDDI_DECIMALS

  * include/hbrdddbf.h
  * src/rdd/dbf1.c
    + added support for RDDI_DECIMALS - when set it's used as default number
      of decimal places in conversions to string for fields type "B" and "8"
      with 0 number of decimal places in DBF header.
2014-11-18 14:13:03 +01:00
Przemysław Czerpak
c571627e7f 2014-11-12 18:01 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/hbgtinfo.ch
    + added HB_GTI_MINIMIZED

  * contrib/gtqtc/gtqtc.h
  * contrib/gtqtc/gtqtc1.cpp
    + added support for HB_GTI_MINIMIZED

  * src/rtl/gtxwc/gtxwc.c
    + added support for HB_GTI_MINIMIZED and HB_GTI_MAXIMIZED

  ; All above modifications created by Rolf - thanks

  * contrib/hbnetio/netiocli.c
    * updated some RTEs to be a little bit more precise

  * contrib/hbblat/hbblat.hbp
    * disabled unconditional dynamic library build
2014-11-12 18:01:44 +01:00
Przemysław Czerpak
ff1288dc3f 2014-11-04 01:54 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* ChangeLog.txt
  * doc/xhb-diff.txt
    ! typos

  * doc/clipper.txt
    ! removed completely false information about 'LIST &cMacro'
    * updated information about FOR EACH
    ; in general information in this file are outdated and does not
      correctly describe current Harbour behavior. I strongly suggest
      to not use it in any other documentation. In some spare time
      I'll update this file or remove.

  * doc/cmpopt.txt
    + added information about unsupported by Clipper syntax extension:
         iif( <expr1>, <expr2>, <expr3> ) <op>= <expr4>

  * include/hbrddnsx.h
    * minor modification in comment

  * src/macro/macrolex.c
    * accept unconditionally hash 'key => value' operator

  * src/rdd/dbfnsx/dbfnsx1.c
    ! fixed very bad bug in leaf key compression. This problem could be
      exploited by keys containing containing CHR( 255 ) in encoded keys
      just before trailing empty key characters.
      This bug could cause index corruption.
    * use hb_xgrabz()
    * formatting
2014-11-04 01:54:04 +01:00
Przemysław Czerpak
ef962484be 2014-10-24 15:15 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/hbrddntx.h
  * src/rdd/workarea.c
  * src/rdd/dbf1.c
  * src/rdd/delim1.c
  * src/rdd/sdf1.c
  * src/rdd/dbfcdx/dbfcdx1.c
  * src/rdd/dbfnsx/dbfnsx1.c
  * src/rdd/dbfntx/dbfntx1.c
  * src/rdd/dbffpt/dbffpt1.c
  * contrib/rddads/ads1.c
  * contrib/rddads/adsfunc.c
  * contrib/rddads/adsx.c
  * contrib/rddsql/sqlbase.c
  * contrib/rddsql/sqlmix.c
  * contrib/sddfb/core.c
  * contrib/sddmy/core.c
  * contrib/sddoci/core.c
  * contrib/sddodbc/core.c
  * contrib/sddpg/core.c
  * contrib/sddsqlt3/core.c
    * cleaned AREAP casting
    * unified some variable names
    * cleaned some DBOI_* actions
    * allow to call ORDERINFO() method without itmResult item.
    * few other cleanups
2014-10-24 15:15:39 +02:00
Przemysław Czerpak
309dc0a307 2014-10-24 04:13 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/rddads/ads1.c
  * contrib/rddads/adsfunc.c
  * contrib/rddads/rddads.h
    + added support for RDDI_INDEXPAGESIZE in ADI indexes

  * src/rdd/dbf1.c
    * minor cleanup

  * include/hbrddcdx.h
  * src/rdd/dbfcdx/dbfcdx1.c
    + added support for long index keys when bigger pages are used.
      Now maximum index key size is 4082 for 8192 bytes length index pages.
      Indexes are critical for database applications so please make
      tests with current code and report problems if you find any.
2014-10-24 04:13:06 +02:00
Przemysław Czerpak
321df92cbe 2014-10-23 17:58 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/hbrddcdx.h
  * src/rdd/dbfcdx/dbfcdx1.c
    * renamed CDX_TYPE_TEMPORARY to CDX_TYPE_PARTIAL
    * eliminated Temporary member from CDXTAG structure
    * cleaned tag signature flag setting to strictly follow
      CL5.2 (SIx3) and CL5.3 (COMIX)
2014-10-23 17:58:21 +02:00
Przemysław Czerpak
25b36d0e77 2014-10-23 13:20 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/rddads/ads1.c
  * contrib/rddads/adsfunc.c
    ! check if AE_VALUE_OVERFLOW macro exists before use
    ! fixed memory leak
    % use char* instead of UNSIGNED8* to eliminate unnecessary casting
    * use HB_IT_EVALITEM instead of HB_IT_BLOCK
    * formatting and minor cleanups

  * include/hbrddcdx.h
  * src/rdd/dbfcdx/dbfcdx1.c
    * modifications for longer index keys when bigger pages are used
      (work in progress)
2014-10-23 13:20:27 +02:00
Przemysław Czerpak
9492a2e54e 2014-10-22 10:25 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/hbrddcdx.h
  * src/rdd/dbfcdx/dbfcdx1.c
    * modifications for longer index keys when bigger pages are used
      (work in progress)
2014-10-22 10:25:27 +02:00
Przemysław Czerpak
a6b992a722 2014-10-22 02:24 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/hbrddcdx.h
  * src/rdd/dbfcdx/dbfcdx1.c
    * force default index page size when CDX header does not contain
      Harbour signature
    * added RTE when index expression returns item with unsupported
      type during indexing
    * modifications for longer index keys when bigger pages are used
      (work in progress)
    * formatting
2014-10-22 02:24:03 +02:00
Przemysław Czerpak
777e24ee87 2014-10-21 16:40 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/hbrddcdx.h
  * src/rdd/dbfcdx/dbfcdx1.c
    * added support for user defined index page size in DBFCDX.
      To change page size for newly created index it's enough to call:
         hb_rddInfo( RDDI_INDEXPAGESIZE, <nNewSize>,, "DBFCDX" )
      DBFCDX accepts page sizes which are power of 2 in from 512 to 8192.
      The upper range is my personal decision and can be easy changed
      in Harbour source code. 512 is default CDX index page size and
      only such indexes can be read by other RDDs.
      In some cases bigger pages can increase performance and reduce
      index size. In local networks probably 1024 should give optimal
      performance because can be transferred in single ethernet frame.
      Just make a tests.
    ; In next step I plan to add support for longer index keys when
      bigger pages are used.

  * utils/hbmk2/hbmk2.prg
    ! added -stop fix borrowed from Viktor's branch
2014-10-21 16:40:26 +02:00
Przemysław Czerpak
8d8558fbab 2014-10-20 17:33 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* config/lang2po.hb
    ! fixed negative UTC offsets to string conversion

  * include/dbinfo.ch
  * src/rdd/dbfcdx/dbfcdx1.c
  * src/rdd/dbfnsx/dbfnsx1.c
  * src/rdd/dbfntx/dbfntx1.c
    + added DBOI_INDEXPAGESIZE - get index page size

  * include/dbinfo.ch
  * include/hbrdddbf.h
  * src/rdd/dbf1.c
    + added RDDI_INDEXPAGESIZE - get/set default index page size

  * include/hbrddcdx.h
  * src/rdd/dbfcdx/dbfcdx1.c
    * modification for user defined index page size (work in progress)
2014-10-20 17:33:49 +02:00
Przemysław Czerpak
dfc2f42e79 2014-10-17 14:55 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/hbrddcdx.h
  * src/rdd/dbfcdx/dbfcdx1.c
    + added support for large index files over 4GB length.
      These are slightly modified CDX indexes which stores index page numbers
      instead of index page offsets inside index file. This trick increase
      maximum index files size from 2^32 (4GB) to 2^41 (2TB). This index
      format is enabled automatically when DB_DBFLOCK_HB64 is used. This is
      the same behavior as in DBFNTX and DBFNSX for which I added support
      for large indexes (up to 4TB) few years ago.
      Warning: new CDX indexes are not backward compatible and cannot be
               read by other systems or older [x]Harbour versions.
               If you try to open new indexes using older [x]Harbour RDDs
               then RTE "DBFCDX/1012 Corruption detected" is generated.
               When current Harbour *DBFCDX/SIXCDX RDD open index file
               then it automatically recognize type of index file so it
               will work correctly with both versions without any problem.
               In short words: People using DB_DBFLOCK_HB64 should remember
               that after reindexing with new Harbour applications old ones
               cannot read new CDX indexes.
    ; In next step I plan to add support for user defined page size in CDX
      index files.

  * doc/xhb-diff.txt
    * added information about extended CDX format to section "NATIVE RDDs"

  * src/rdd/dbfcdx/dbfcdx1.c
  * src/rdd/dbfnsx/dbfnsx1.c
  * src/rdd/dbfntx/dbfntx1.c
    * disable record readahead buffer used during indexing when only
      one record can be stored inside
    ! generate RTE when data cannot be read into record readahead buffer
      during indexing
2014-10-17 14:55:16 +02:00
Przemysław Czerpak
65dcec9da3 2014-10-08 02:46 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/hbdefs.h
    * minor fix in recently added casting
2014-10-08 02:46:14 +02:00
Przemysław Czerpak
5eede21c67 2014-10-07 22:52 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/hbjson.h
    * exported hb_jsonEncode() and hb_jsonDecode() functions
2014-10-07 22:52:37 +02:00
Przemysław Czerpak
1a78d17f3b 2014-10-07 00:38 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/hbdefs.h
    * use strict aliasing friendly conversions in MSC builds which support
      intrinsic version of _byteswap_*() functions.
      It should also pacify some of MSC warnings.

  * include/hbdefs.h
  * src/rdd/dbffpt/dbffpt1.c
    * minor formatting

  * contrib/gtwvg/wvgcore.c
    ! fixed HANDLE to LONG casting - it's bug in 64 bit builds
2014-10-07 00:38:13 +02:00
Przemysław Czerpak
e2a9cabe96 2014-10-06 22:35 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/hbcomp.h
  * include/hbcompdf.h
  * src/compiler/hbmain.c
  * src/compiler/harbour.y
  * src/compiler/harbour.yyc
    * replaced 'char' type holder with 'HB_BYTE' - this is part of never
      finished code which is completely dummy in current compiler and above
      modification is only to pacify warnings which are real bugs in existing
      implementation. I do not plan to modify or fix this code. I'll remove
      it working on fully functional strong typing implementation.
2014-10-06 22:35:58 +02: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