Commit Graph

326 Commits

Author SHA1 Message Date
Przemysław Czerpak
b66470b9a5 2015-10-21 19:26 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbfoxpro/hbfoxpro.hbx
  * contrib/hbfoxpro/occurs.prg
    + added FoxPro compatible At() function with 3-rd <nOccurrence>
      parameter:
            fox_At( <cSubstr>, <cString>, <nOccurrence> ) -> <nPos>

  * contrib/hbfoxpro/hbfoxpro.ch
    + added PP rule for At() with FoxPro like 3 parameters,
      please remember that such At() extension is not compatible with
      xHarbour one so do not include hbcompat.ch or xhb.ch - they
      redefines At() with 3 or more parameters to xHarbour compatible
      function: hb_At()
2015-10-21 19:26:38 +02:00
Przemysław Czerpak
62f2ca6ee6 2015-10-13 13:16 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbnetio/netiocli.c
    * strip connection parameters (server name, port, password,...) from
      second parameter of hb_vfRename(), hb_vfLink() and hb_vfSymLink()
      functions redirected to HBNETIO if it's the same as in the first
      parameter.
      Now it's possible to use above functions with path containing connection
      parameters in second argument. Please only remember that both parameters
      have to point to the same server in above functions. If not then DOS
      error 2 is set.
      In case of hb_vfCopy() the parameters can point to different servers
      so it's possible to copy files between different HBNETIO servers or
      even different Harbour File IO redirectors.
2015-10-13 13:16:06 +02:00
Przemysław Czerpak
6458e3a963 2015-09-30 10:55 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/harbour.hbx
  * src/vm/hvm.c
    + added internal PRG function to test number of HVM threads and stacks
         __vmCountThreads( [ @<nStacks> ], [ @<nThreads> ] ) -> <nThreads>

  * src/rtl/filesys.c
  * contrib/gtqtc/gtqtc1.cpp
  * contrib/gtwvg/gtwvgd.c
  * contrib/gtwvg/wvgcore.c
  * contrib/hbamf/amfdec.c
  * contrib/xhb/fparse.c
  * contrib/xhb/hbserv.c
  * contrib/xhb/hbxml.c
    * cleaned ;; usage in C code
2015-09-30 10:55:41 +02:00
Przemysław Czerpak
7c0914cd43 2015-09-25 11:41 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rtl/filebuf.c
    ! removed unnecessary HB_EXPORT attribute

  * contrib/hbwin/oleuuid.c
    ! added missing HB_EXPORT attrinute for OpenWatcom builds

  * contrib/hbcomio/comio.c
  * contrib/hbpipeio/pipeio.c
  * contrib/hbtcpio/tcpio.c
  * src/rtl/hbsockhb.c
    ! cleaned integer types and casting
2015-09-25 11:41:09 +02:00
Przemysław Czerpak
004399c75d 2015-09-24 22:14 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rtl/hbcom.c
  * src/rtl/gtcrs/gtcrs.c
  * src/rtl/gtpca/gtpca.c
  * src/rtl/gtstd/gtstd.c
  * src/rtl/gttrm/gttrm.c
    * added workaround for bug in some Linux kernels (i.e.
      3.13.0-64-generic Ubuntu) in which select() unconditionally
      accepts terminal device for reading if c_cc[ VMIN ] = 0
      It's very serious problem, i.e. in GTTRM no input is possible
      in such kernels without this workaround.

  * src/rtl/dirscan.prg
    * modified hb_DirScan() and hb_DirRemoveAll() to work with Harbour
      File IO API (hb_vf*() functions)
    + added new PRG function:
         hb_FileDelete( <cFileMask> [, <cAttr> ] ) -> <lResult>
      this function removes files which match given <cFileMask>
      (it may contain path) and returns .T. if at least one file
      was deleted. Optional <cAttr> parameter can be used to include
      system ("S") and hidden ("H") files. If <cAttr> contains "R"
      letter then before deleting READONLY attribute is removed from
      files (it's necessary to remove files with READONLY attribute
      in systems like DOS, MS-Windows or OS2). This function uses
      Harbour File IO API (hb_vf*() functions)
    * remove READONLY attribute from files in hb_DirRemoveAll()

 * include/harbour.hbx
    + added hb_DirRemoveAll() and hb_FileDelete()

  * contrib/hbct/files.c
    ! do not allow to remove empty directories by FileDelete() function
      even if user explicitly sets directory attribute - CT3 compatible fix.
    ! remove READONLY attribute before deleting READONLY files if 2-nd
      parameter of FileDelete() contains READONLY bit

  * src/rtl/filesys.c
    * formatting

  * ChangeLog.txt
    ! typo
2015-09-24 22:14:14 +02:00
Tamas TEVESZ
026408a2bb 2015-09-17 10:58 UTC+0200 Tamas TEVESZ (ice extreme.hu)
* contrib/gtqtc/gtqtc.hbp
    + Qt5 include path on FreeBSD
2015-09-17 10:58:50 +02:00
Przemysław Czerpak
dc326d6f4a 2015-09-09 23:16 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbhpdf/3rd/libhpdf/hpdfimac.c
    ! removed obsolete memory.h

  * contrib/hbhpdf/3rd/libhpdf/libhpdf.dif
    * rediffed

  * include/hbdate.h
    * enabled reentrant safe version of localtime() and gmtime() in all
      OpenWatcom builds
2015-09-09 23:16:24 +02:00
Przemysław Czerpak
38af08e97d 2015-09-02 15:54 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/hbapifs.h
  * src/rtl/filebuf.c
    * added new C function hb_fileLoadData() - it can be used to load data
      from already opened regular files and streams

  * include/harbour.hbx
  * src/rtl/vfile.c
    + added new PRG function:
         hb_vfLoad( <cFileName>, [ <nMaxSize> ] ) -> <cFileBody> | NIL

  * src/vm/runner.c
    * use hb_fileLoadData()

  * contrib/hbwin/win_bmp.c
    * use hb_fileLoad()
2015-09-02 15:54:08 +02:00
Przemysław Czerpak
118ab63dc9 2015-09-01 22:16 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbplist.txt
    + added hbpipeio to list of contrib libraries
2015-09-01 22:16:18 +02:00
Przemysław Czerpak
00246c9048 2015-09-01 17:05 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/hbapifs.h
  * src/rtl/filebufd.c
    * moved HB_FILE_ERR_UNSUPPORTED macro to header file

  * include/hbapifs.h
  * src/rtl/filebuf.c
    * added new C function hb_fileLoad() - it can be used to load data
      from regular files and streams

  * src/rtl/memofile.c
    * modified [hb_]Memo{Read|Writ}() to work with streams, i.e. now
      this code works:

         REQUEST HB_PIPEIO
         cDir := hb_memoRead( "|ls -la" )
         ? upper( cDir )

      or:

         cData := hb_memoRead( "|xz -c data.gz" )
         ? hb_memoWrit( "data2.txt", cData )
         ? hb_memoWrit( "|sh -c 'xz -9 -e > data2.xz'", cData )

  * src/rtl/fscopy.c
    * removed not used in current code unix header files
2015-09-01 17:05:30 +02:00
Przemysław Czerpak
310e2134bd 2015-08-31 23:48 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbnetio/netiosrv.c
    ! removed unnecessary casting (c&p typo)
2015-08-31 23:48:08 +02:00
Przemysław Czerpak
db3fe4b8d4 2015-08-31 23:43 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbmzip/mzip.c
  * contrib/hbnetio/netiocli.c
  * contrib/hbnetio/netiosrv.c
  * contrib/hbwin/win_prn2.c
  * contrib/xhb/xhbcopyf.c
  * src/rdd/dbffpt/dbffpt1.c
  * src/rdd/dbfnsx/dbfnsx1.c
  * src/rdd/delim1.c
  * src/rdd/hbsix/sxcompr.c
  * src/rdd/sdf1.c
  * src/rtl/copyfile.c
  * src/rtl/filesys.c
  * src/rtl/fscopy.c
  * src/rtl/hbmd5.c
  * src/rtl/memofile.c
  * src/rtl/philes.c
  * src/rtl/vfile.c
    * updated for possible -1 result returned by hb_fileRead()/hb_fileWrite()
2015-08-31 23:43:30 +02:00
Przemysław Czerpak
f90e0be4fd 2015-08-31 13:26 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rtl/hbsockhb.c
    + added new PRG function:
         hb_socketAutoShutdown( hSocket, [ lNewSetting ] ) --> lPrevSetting
      it allows to enable/disable automatic shutdown when connected socket
      is closed.

  * contrib/hbpipeio/pipeio.c
    * removed trailing space

  * contrib/hbpipeio/tests/test.prg
    * cleaned the code and messages
2015-08-31 13:26:26 +02:00
Przemysław Czerpak
2606996d15 2015-08-31 12:45 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbtcpio/tcpio.c
  * contrib/hbpipeio/pipeio.c
    * modified hb_fileWrite() to return 0 in case of timeout or unblocking
      write and -1 on other errors.

  * contrib/hbcomio/comio.c
    * modified hb_fileRead() to return 0 in case of timeout or unblocking
      read and -1 on other errors.

  * src/rtl/filesys.c
    * return -1 instead of 0 from hb_fsPipeWrite() in MS-Windows and OS2
      builds if PIPE state cannot be read

  * ChangeLog.txt
    ! c&p typo in previous ChangeLog entry
2015-08-31 12:45:47 +02:00
Przemysław Czerpak
ce68e02a15 2015-08-27 17:49 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
+ contrib/hbpipeio/hbpipeio.hbc
  + contrib/hbpipeio/hbpipeio.hbp
  + contrib/hbpipeio/hbpipeio.hbx
  + contrib/hbpipeio/pipeio.c
  + contrib/hbpipeio/tests/hbmk.hbm
  + contrib/hbpipeio/tests/test.prg
    + added PIPEIO new Harbour FILE IO redirector
      As file name prefix "PIPE:" and "|" can be used.
      This redirector executes command passed as file name with its
      stdin and stdout handles redirected to Harbour FILE handle, i.e.:

         REQUEST HB_PIPEIO
         pFile := hb_vfOpen( "PIPE:ls -la", 0 )
         ? upper( hb_vfReadLen( pFile, 10000 ) )
         hb_vfClose( pFile )

      PIPEIO has also two new PRG functions:
         hb_vfFromPipes( [<hReads>], [<hWrite>], [<hProcess>], ;
                         [<nTimeout>] -> <pHandle> | NIL
         hb_vfOpenProcess( <cCommand>, [<nMode>=FO_READ], ;
                           [<nTimeout>], [<lDetach>] ) -> <pHandle> | NIL
      The first one can be used to create Harbour file redirector for
      process created by hb_processOpen(), i.e.:
            hProcess := hb_processOpen( cCommand, @hStdIn, @hStdOut )
            pFile := hb_vfFromPipes( hStdOut, hStdIn, hProcess, 5000 )
      The second one can be used directly:
            pFile := hb_vfFromPipes( cCommand, FO_READWRITE, 5000 )
      Usually process which reads from its stdin works until its input
      stream is closed by other process. If user wants to close input
      stream for command redirected to Harbour PIPE FILE IO then he can
      execute:
         hb_vfConfig( pFile, HB_VF_SHUTDOWN, FO_WRITE )
      Look at the test code for real life example. It opens 'gzip' command
      in FO_READWRITE mode, sends data to gzip, reads gzip output and finally
      decompress it using hb_ZUncompress() to check if result is equal to
      initial data.
2015-08-27 17:49:32 +02:00
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
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
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
Przemysław Czerpak
cc1c87e756 2015-06-24 21:09 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbmzip/mzip.c
  * src/rtl/filesys.c
    ! initialize tm_isdst member of tm structure with -1 to force correct
      local time to UTC conversion in mktime()
2015-06-24 21:09:58 +02:00
Przemysław Czerpak
c67ac9166a 2015-06-24 00:33 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/vm/classes.c
    ! fixed __objGetIVars() to correctly serialize objects without any own
      and inherited instance variables

  * contrib/hbhpdf/3rd/libhpdf/hpdfimac.c
    ! include string.h
  * contrib/hbhpdf/3rd/libhpdf/libhpdf.dif
    * rediffed
2015-06-24 00:33:01 +02:00
Przemysław Czerpak
a7ad431c1d 2015-06-02 13:31 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbtip/client.prg
    * eliminated hb_UserName() from initial random seed

  * contrib/hbwin/win_prn2.c
    ! fixed memory leak and potentially wrong handle usage
      fix borrowed from Viktor's branch:
      2015-06-02 12:39-57 UTC+0200 Viktor Szakats

  * src/rdd/dbf1.c
    * variable localization
2015-06-02 13:31:31 +02:00
Przemysław Czerpak
c402ce1350 2015-05-27 13:56 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rtl/Makefile
  * src/rtl/net.c
  + src/rtl/netusr.c
    * moved hb_UserName() to separate file. It uses internally getpwuid()
      in *nix builds and access to this function adds additional library
      dependency which may block static builds in some cases.
      TODO: eliminate hb_UserName() from things like initial random seed
            to not create unnecessary dependency.

  * contrib/gtqtc/gtqtc1.cpp
    + enable software input panel (virtual keyboard) in iOS builds
2015-05-27 13:56:31 +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
c3f0ae6015 2015-05-13 16:59 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbct/ctwin.c
    ! added protection against GPF in hb_ctwGetPosWindow() called before
      any window is open. It's correct version of this fix.

  * contrib/hbmemio/memio.c
  * contrib/xhb/xhbfunc.c
    ! fixed size of filename buffer - it should be exactly HB_PATH_MAX
2015-05-13 16:59:44 +02:00
Przemysław Czerpak
bec3dd7749 2015-05-04 12:41 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbmemio/memio.c
    ! fixed GPF in hb_VFDirectory( "mem:..." ) - many thanks to Rolf for
      locating the problem and fix.
2015-05-04 12:41:25 +02:00
Przemysław Czerpak
5d691b9923 2015-04-09 00:20 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbnetio/netiosrv.c
  * contrib/hbtcpio/tcpio.c
    * call hb_socketShutdown() before hb_socketClose() to force output
      buffer flush in systems like MS-Windows.
2015-04-09 00:20:40 +02:00
Przemysław Czerpak
11e823dba2 2015-03-16 23:00 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbtip/smtpcli.prg
    ! do not execute STARTTLS command if server does not report it's supported
      (issue #90)

  * src/rdd/dbcmd.c
    * use DBI_TRANSREC in __dbTrans() and __dbArrange() (pure record copping
      without sorting)
2015-03-16 23:00:13 +01:00
Przemysław Czerpak
f090e652cd 2015-03-13 18:56 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbwin/win_bmp.c
    ! fixed copy and past typo in my last modification - thanks to
      Juan Francolino for reporting the problem and to Alexander
      Czjczyński for locating the reason. It closes issue #91.

  * contrib/hbtip/smtpcli.prg
    * be sure that server answer after HELO command (:open() method) is
      fully consumed

  * contrib/hbtip/sendmail.prg
    ! removed redundant waiting for sever answer after opening connection
      without authentication - it fixes timeout delay in such case
    ! do not create TIPClientSMTP() object twice when it's not necessary
    % small code simplification
2015-03-13 18:56:10 +01:00
Przemysław Czerpak
58bc2c6f00 2015-03-12 09:41 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbtip/sendmail.prg
    ! fixed wrong login conditions - AICS it's old problem which had existed
      from very long time.

  * contrib/hbtip/smtpcli.prg
    ! eliminated redundant processing EHLO processing
2015-03-12 09:41:38 +01:00
Przemysław Czerpak
6c9d48495f 2015-03-11 16:23 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbtip/hbtip.hbx
  * contrib/hbtip/httpcli.prg
  * contrib/hbtip/log.prg
  * contrib/hbtip/sessid.prg
  * contrib/hbtip/smtpcli.prg
  * contrib/hbtip/thtml.ch
  * contrib/hbtip/tip.ch
  * contrib/hbtip/url.prg
    * synced with Viktor's branch.
2015-03-11 16:23:04 +01:00
Przemysław Czerpak
7f80c2e286 2015-03-10 18:06 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbtip/cgi.prg
  * contrib/hbtip/client.prg
  * contrib/hbtip/encb64.prg
  * contrib/hbtip/encoder.prg
  * contrib/hbtip/encqp.prg
  * contrib/hbtip/mail.prg
  * contrib/hbtip/sendmail.prg
    * synced manually with Viktor's branch (not all things).

  * doc/xhb-diff.txt
    ! fixed few typos
2015-03-10 18:06:11 +01:00
Przemysław Czerpak
f832dbe9a4 2015-03-09 19:16 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbtip/smtpcli.prg
    ! consume whole EHLO output after STARTTLS
2015-03-09 19:16:12 +01:00
Przemysław Czerpak
acc1a252e8 2015-03-09 18:33 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbtip/smtpcli.prg
    ! added missing space after AUTH PLAIN
    ! resend EHLO command after STARTTLS
    ; Thanks to Rolf for information about both problems.
2015-03-09 18:33:06 +01:00
Przemysław Czerpak
00717d90b1 2015-03-09 18:17 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbtip/client.prg
    * removed trailing spaces

  * contrib/hbtip/hbtip.hbp
  * contrib/hbtip/encurlc.c
  + contrib/hbtip/mime.c
  + contrib/hbtip/misc.c
  - contrib/hbtip/utils.c
    * synced with Viktor's branch
    * renamed some variables to follow rules used by Harbour
    % use binary search to locate mime extension
    * some minor cleanups and fixes
2015-03-09 18:17:39 +01:00
Przemysław Czerpak
54a8c06190 2015-03-09 15:08 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbtip/smtpcli.prg
    ! fixed typo in my previous commit
2015-03-09 15:08:50 +01:00
Przemysław Czerpak
eaa87a3be9 2015-03-07 20:16 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbtip/smtpcli.prg
    * synced with Viktor's branch - it should fix the problem with
      unconditional bind with HBSSL library after last Jean's patch.
2015-03-07 20:16:55 +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
4617ba29d7 2015-03-03 15:57 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/gtalleg/gtallegd.c
  * contrib/gtqtc/gtqtc1.cpp
  * contrib/hbblink/blinker.prg
  * contrib/hbbz2/core.c
  * contrib/hbcomio/comio.c
  * contrib/hbsqlit3/core.c
  * contrib/hbtcpio/tcpio.c
  * contrib/rddads/adsfunc.c
    * synced with Viktor's branch
      (formatting, macros instead of constant values, protection against
      wrong paramters, use *EVALITEM macros, use HB_ERR_ARGS_BASEPARAMS, ...)

  * contrib/hbsqlit3/core.c
  * contrib/hbsqlit3/hbsqlit3.hbx
    + add sqlite3_load_extension( <db>, <cModule>, [<cProc>], [@<cError>] )
                  -> <nResult>
      (borowed from Viktor's branch 2015-02-15 19:18 UTC+0100 Viktor Szakats)
2015-03-03 15:57:48 +01:00
Przemysław Czerpak
24ebd4b617 2015-03-02 18:01 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbssl/ssl_inet.c
    ! restored comment begin token removed by mistake in my last commit
2015-03-02 18:01:12 +01:00
Przemysław Czerpak
a6c8ffc884 2015-03-02 16:08 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rtl/hbinet.c
  * contrib/hbssl/ssl_inet.c
    ! fixed unfinished code with error code translation - thanks to Abe
2015-03-02 16:08:37 +01:00
Przemysław Czerpak
d976db49c9 2015-02-26 09:36 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/rddads/ads1.c
    * removed unnecessary casting

  * contrib/rddads/adsx.c
    ! fixed to work with ACE < 6.1
2015-02-26 09:37:00 +01:00
Przemysław Czerpak
5ac8fc0d4a 2015-02-25 22:06 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbodbc/odbc.c
  * contrib/hbodbc/sql.ch
    * minor formatting to sync with Viktor's branch
    + added missing defines from Viktor's branch

  * contrib/rddads/ads.ch
  * contrib/rddads/adsfunc.c
    + added AdsStmtSetTableReadOnly( <nMode> ) -> <lSuccess>
      (From Viktor's branch: 2015-01-21 18:43 UTC+0100 Viktor Szakats)
    + added ADS_REFRESHCOUNT constant and
         AdsGetRecordCount( [<nHandleType:ADS_TABLE>], ;
               [<nFilterOption:ADS_RESPECTFILTERS>], @nCount ) -> <nErrorCode>
      (From Viktor's branch: 2014-01-19 13:42 UTC+0100 Viktor Szakats)
    ! fixed connection handle parameter position in AdsDDRemoveTable()
      It was 4-th:
         AdsDDRemoveTable( <cTableName>, <deleteFile>, , [ <nConnection> ] )
               -> <lResult>
      Now is 3-rd:
         AdsDDRemoveTable( <cTableName>, <deleteFile>, [ <nConnection> ] )
               -> <lResult>
      (From Viktor's branch: 2014-01-14 23:53 UTC+0100 Viktor Szakats)

  * contrib/rddads/rddads.h
    + autodetection support for 11.10
      (From Viktor's branch: 2013-12-26 01:22 UTC+0100 Viktor Szakáts)

  * contrib/rddads/adsx.c
    * use hb_xgrabz()
    * formatting

  * contrib/rddsql/hbrddsql.h
  * contrib/rddsql/sqlbase.c
    * added const qualifier to SDD method pointer in SQLBASEAREA
    * declare default SDD method table with const qualifier
    * added s_ prefix to the name of static variable with SDD methods
    % optimized GOHOT() method
    * use hb_xgrab() instead of hb_xalloc() to force error when out of memory
    * use hb_xgrabz()

  * contrib/rddsql/sqlmix.c
    * use hb_xgrabz()

  * contrib/sddfb/core.c
    * added s_ prefix to the name of static variable with SDD methods
    % removed unnecessary memset()
    % optimized GOTO() method
    ! fixed very bad typo in record set resizing - for each record 64 dummy
      items were added to array with records so finally this array was 64
      times longer then necessary.

  * contrib/sddmy/core.c
    * added s_ prefix to the name of static variable with SDD methods
    + added new field types from from Viktor's branch
    * use hb_xgrabz()
    % removed redundant comparison to NULL

  * contrib/sddoci/core.c
    * added s_ prefix to the name of static variable with SDD methods
    * check OCI_Initialize() result and generate error if fails
      (synced with Viktor's branch)
    * minor formatting to sync with Viktor's branch
    % removed unnecessary memset()
    % optimized GOTO() method
    ! fixed very bad typo in record set resizing - for each record 64 dummy
      items were added to array with records so finally this array was 64
      times longer then necessary.

  * contrib/sddodbc/core.c
    * replaced unnecessary hb_xgrabz() with hb_xgrab()
    ! fixed very bad typo in record set resizing - for each record 64 dummy
      items were added to array with records so finally this array was 64
      times longer then necessary.

  * contrib/sddpg/core.c
    * added s_ prefix to the name of static variable with SDD methods
    * use hb_xgrabz()

  * contrib/sddsqlt3/core.c
    * added s_ prefix to the name of static variable with SDD methods
    * minor formatting to sync with Viktor's branch
    ! fixed memory leak when RTE ESQLDD_STMTALLOC is generated
      (fix from Viktor's branch)
    % removed unnecessary memset()
    ! fixed very bad typo in record set resizing - for each record 64 dummy
      items were added to array with records so finally this array was 64
      times longer then necessary.
2015-02-25 22:06:51 +01:00
Przemysław Czerpak
0198c7a729 2015-02-24 17:49 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/sddfb/core.c
  * contrib/sddmy/core.c
  * contrib/sddoci/core.c
  * contrib/sddodbc/core.c
  * contrib/sddpg/core.c
  * contrib/sddsqlt3/core.c
    ! clear dbFieldInfo structure before use - it resolves problems with
      random field flags caused by uninitialized uiFlags member
    * minor cleanup in variable names
    * use hb_xgrabz()

  * contrib/sddodbc/core.c
    + added support for NULLABLE, UNICODE and BINARY field flags
    + added support for SQL_BINARY fields
    ! fixed SQL_TIME mapping to Harbour field types.
      It was mapped as HB_FT_DATE instead of HB_FT_TIME.
    ! fixed extracting integer values on on platforms where long int is
      64 bit integer (in practice all 64bit *nixes). SQL_C_LONG should be
      used with SQLINTEGER not 'long int'.

  * contrib/hbodbc/odbc.c
    + add support for different data types in SQLGetData()
      The original version was returning different types in their binary
      representation. Current implementation is based on similar one from
      Viktor's branch (2014-07-06 16:40 UTC+0200 Viktor Szakats) with
      small but important fixes.
    ! modified hb_odbcNumSetLen() to not break 64bit integers by casting
      to double value

  * contrib/hbodbc/sql.ch
    + added SQL_WCHAR

  * contrib/hbodbc/todbc.prg
    + use extended SQLGetData() and hb_odbcNumSetLen() functionality to
      extract ODBC data
    % few small optimization and casing usually based on Viktor's branch
      BTW pre incrementations/decrementations used in PUSH context are
      faster then post ones.
2015-02-24 17:49:04 +01:00
Przemysław Czerpak
0bcc223b14 2015-02-23 17:47 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbodbc/odbc.c
    * rewritten function SQLGetData() - new code is much simpler and
      fixes few bugs

  * contrib/hbodbc/todbc.prg
    % eliminated unnecessary AAdd() when final array size is already known
    ! do not round numbers read number to default number of decimal places
2015-02-23 17:47:54 +01:00
Przemysław Czerpak
c8a04734fd 2015-02-20 11:40 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbssl/bio.c
  * contrib/hbssl/err.c
  * contrib/hbssl/evpciph.c
  * contrib/hbssl/evpmd.c
  * contrib/hbssl/hbssl.ch
  * contrib/hbssl/hbssl.hbc
  * contrib/hbssl/hbssl.hbm
  * contrib/hbssl/hbssl.hbx
  * contrib/hbssl/pem.c
  * contrib/hbssl/rand.c
  * contrib/hbssl/ssl.c
  * contrib/hbssl/ssl_hb.c
  * contrib/hbssl/sslctx.c
  * contrib/hbssl/x509.c
    ; synced with Viktor's branch:
    * favor openssl over libressl on darwin (2015-01-22 03:24 UTC+0100)
    * build against libressl on darwin, if installed
      (2015-01-22 03:24 UTC+0100)
    * deleted custom openssl option 'OPENSSL_NO_SEED' on darwin.
      (2015-01-22 03:24 UTC+0100)
    + AES/GCM ciphers added (couldn't make them work)
      (2014-12-26 01:53 UTC+0100)
    + added BIO_GET_CONN_INT_PORT()
      It's now fixed in OpenSSL, available in hbssl with OpenSSL 1.0.1 or upper
      (2014-03-03 00:45 UTC+0100)
    ! BIO object is now GC collected, solving the leak and hopefully
      some remaining memory problems around BIO_NEW_MEM_BUF()
      (2014-02-26 04:54 UTC+0100)
    ! SSL_SET_BIO(): fixed 3rd parameter
      (2014-02-26 04:54 UTC+0100)
    ! BIO_NEW_MEM_BUF(): fixed potential use-after-free.
      (2014-02-24 16:02)
    * formating and comments
2015-02-20 11:40:52 +01:00
Przemysław Czerpak
b0054466a3 2015-02-20 10:53 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbodbc/odbc.c
  * contrib/sddodbc/core.c
    * updated to compile with UnixODBC 2.2.0
      I slightly changed one #if condition used to define SQLTCHAR.
      If it interacts with some other old UnixODBC version then
      please let me know.
2015-02-20 10:53:05 +01:00
Przemysław Czerpak
056afec314 2015-02-19 23:10 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbssl/hbssl.h
    * added HB_SSL_CONST macro which can be used instead of 'const'
      qualifier to pacify "discards qualifier 'const'" warnings in
      OpenSSL versions prior 0.9.8

  * contrib/hbssl/evp.c
  * contrib/hbssl/evpciph.c
  * contrib/hbssl/evpenc.c
  * contrib/hbssl/evpmd.c
  * contrib/hbssl/ssl.c
  * contrib/hbssl/sslctx.c
    * use HB_SSL_CONST macro to pacify warnings in 0.9.6 and 0.9.7
      OpenSSL versions

   ; Now HBSSL compiles cleanly without any warnings with different
     OpenSSL final versions starting with 0.9.6
2015-02-19 23:10:19 +01:00
Pritpal Bedi
fdb77bb7f2 2015-02-19 13:15 UTC-0800 Pritpal Bedi (bedipritpal/at/hotmail.com)
* contrib/hbtop/popcli.prg
    ! Fixed: METHOD top( nMsgId )
	   ::inetSendAll( ::SocketCon, "TOP " + hb_ntos( nMsgId ) + " 0 " + ::cCRLF )
	      =>
	   ::inetSendAll( ::SocketCon, "TOP " + hb_ntos( nMsgId ) + " 0" + ::cCRLF )

	+ Added: following convinient methods:
       METHOD getTop( nMsgId, lAsArray ) -> arrayOrStringOfHeaderOF_nMsgId
       METHOD getMessageRaw( nMsgId, lAsArray ) -> arrayOrStringOfEntireMessageOF_nMsgId
       METHOD getBody( nMsgId, lAsArray ) -> arrayOrStringOfMessageBodyOF_nMsgId
       METHOD getSubject( nMsgId ) -> cSubjectLineOF_nMsgId
2015-02-19 13:24:04 -08:00