Commit Graph

386 Commits

Author SHA1 Message Date
Przemysław Czerpak
9a9128ea27 2015-09-01 15:07 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* ChangeLog.txt
    ! fixed typo in ChangeLog entry. I used hb_socketNew() instead of
      hb_socketSetFilter()

  * include/hbapifs.h
  * src/rtl/filebuf.c
    + added helper C function:
         HB_SIZE hb_fileResult( HB_SIZE nSize );
      It converts ( HB_SIZE ) FS_ERROR to 0 so it can be used to wrap
      hb_fileRead()/hb_fileWrite() to force previous results.

  * src/rdd/dbffpt/dbffpt1.c
    * reduced variable scope

  * src/rtl/copyfile.c
    ! fixed typo in last commit - thanks to Viktor.
2015-09-01 15:07:03 +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
b6ddc55575 2015-08-31 16:49 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/harbour.hbx
    + added hb_socketAutoShutdown()

  * src/rtl/vfile.c
    * updated for possible -1 result returned by hb_fileRead()/hb_fileWrite()
2015-08-31 16:49:47 +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
a5b0ab6fc2 2015-08-26 16:21 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rtl/hbzsock.c
    * pacified warning
2015-08-26 16:21:20 +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
8bc6d4a0e9 2015-08-07 16:07 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rtl/filesys.c
    * removed dummy code left by mistake
2015-08-07 16:07:30 +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
7a80a882ab 2015-08-01 13:14 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/vm/asort.c
    * restored original loop and added different workaround which for
      the problem in 64 bit MinGW we exploited. It's dummy function call
      inside a loop so probably link time optimization (LTO is enabled
      by -O4 in the newest GCC versions) ignore it and the problem will
      reappear. Anyhow it only temporary solution which should give time
      to create self contain example and report the problem to MinGW
      authors - it's highly possible that also other code exploited this
      problem so be careful with MinGW64.
    % fixed index range checking to eliminate unnecessary index verification
2015-08-01 13:14:30 +02:00
Przemysław Czerpak
f9dd95c243 2015-08-01 01:28 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/vm/asort.c
    * added workaround for bug in 64 bit MinGW builds
2015-08-01 01:28:33 +02:00
Przemysław Czerpak
748cf7e81f 2015-07-31 17:12 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/vm/asort.c
    ! fixed missing nStart checking during array items reordering

  * utils/hbtest/rt_array.prg
    * updated Harbour specific results - I thought that someone
      invested time to exactly replicate CA-Cl*pper ASort() sorting
      but in fact Harbour specific resutls where hardcoded inside
      HBTEST so previous code was not Cl*pper compatible in the
      same way as current one.
2015-07-31 17:12:25 +02:00
Przemysław Czerpak
964e9a6695 2015-07-31 16:42 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rtl/gtxwc/gtxwc.c
  * src/rtl/mlcfunc.c
    * pacified new GCC C++ warnings

  * src/rtl/hbsocket.c
    * do not execute select() if HVM exception was generated when
      socket handlers are extracted but return an error immediately
2015-07-31 16:42:52 +02:00
Przemysław Czerpak
9e318add44 2015-07-31 16:01 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/vm/asort.c
    % added new code for ASort()
      Warning: new sorting algorithm is stable (does not change the
               order of equal items). It means is not strictly Cl*pper
               compatible and it can be seen some dummy ASort() tests
               in HBTEST results.
2015-07-31 16:01:33 +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
72d3e97284 2015-07-28 01:39 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rtl/padx.c
    ! fixed typo in hb_UPad[LRC]() functions - thanks to Grigory Filatov
2015-07-28 01:39:58 +02:00
Przemysław Czerpak
97c8e95c22 2015-07-27 18:41 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rtl/teditor.prg
    ! fixed hb_ULen() wrongly used instead of Len() for arrays
    % use byte oriented functions (hb_B*()) instead of character
      ones (hb_U*()) to update color strings
2015-07-27 18:41:14 +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
7c7099b6dd 2015-07-24 18:55 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rtl/vfile.c
    ! fixed typo in my last commit (Thanks to Viktor for verification)
2015-07-24 18:55:33 +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
cedddef2b3 2015-07-20 17:02 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rtl/gttrm/gttrm.c
    + added support for aixterm colors escape sequences.
      It can be enabled by //GTTRM:EXCLR=4
2015-07-20 17:02:57 +02:00
Przemysław Czerpak
f68f4fd627 2015-07-16 17:10 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rtl/gttrm/gttrm.c
    * gives the highest priority to terminal type specified by <params>
      in //gttrm:<params> switch
    + added support for extended XTERM colors.
      It can be enabled by EXCLR GTTRM parameter.
      So far GTTRM used only standard 8 ANSI colors combined with BOLD
      and BLINK attributes to highlight text and/or background.
      Such functionality is supported by nearly all color terminals
      so is well portable but in some cases BOLD and BLINK attributes
      where interpreted differently.
      Now for XTERM compatible terminals GTTRM can use also other
      methods of color settings. They can be enabled by //gttrm:exclr<n>
      application command line switch, i.e.:
         //GTTRM:EXCLR=0      - use 8 ANSI colors with BLINK and BOLD
                                attributes (current default behavior)
         //GTTRM:EXCLR=1      - use XTERM 16 extended colors
         //GTTRM:EXCLR=2      - use XTERM 256 extended colors
         //GTTRM:EXCLR=3      - use XTERM RGB colors
      (//GTTRM:EXCLR without number is the same as //GTTRM:EXCLR=1)
      If terminal supports XTERM extended color escape sequences then
      it's possible to enable 16 colors even if BLINK and BOLD does
      not do that and if terminal support XTERM RGB color escape
      sequences then also colors set by HB_GTI_PALETTE will be shown
      (so far HB_GTI_PALETTE in GTTRM was working only for Linux and
      PuTTY which support: ESC ] P <n> <rr> <gg> <bb> escape sequence).
      Warning: I added above modes to test different terminals.
               It's possible that I'll change it after tests.
2015-07-16 17:10:34 +02:00
Przemysław Czerpak
b45d22b385 2015-07-14 17:51 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rtl/gtxwc/gtxwc.c
    ! fixed SetMode() when HB_GTI_RESIZABLE is set to .F.
2015-07-14 17:51:32 +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
732f81f6dc 2015-06-26 14:50 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rtl/cdpapihb.c
    ! typo in parameter number
2015-06-26 14:50:56 +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
6349d223b4 2015-06-25 16:25 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/pp/ppcore.c
    ! fixed compilation of initial files passed without path
      (broken by mistake in recent modifications)
2015-06-25 16:25:14 +02:00
Przemysław Czerpak
db6765d665 2015-06-25 13:49 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/pp/ppcore.c
    ! restored previous algorithm for scanning #included files when included
      file is given without path
      Now the following(Cl*pper compatible)  file search algorithm is used
      for files which are not marked as system headers (system headers are
      enclosed in <>):
         1) if file name contains absolute path then open the file from
            the given location. If path starts with drive letter then
            is always used as absolute path regardless of used path separator
            after drive delimiter: ":"
         2) if file name contains relative path then open then:
            a) try to access included file starting from current directory
            b) try to access included file starting from the path taken from
               the first compiled file in list of included files
            c) check INCLUDE paths (paths specified by -I compile switch and
               taken from INCLUDE envvar)
         3) if file name does not contain any path then open then:
            a) try to access included file starting from the path taken from
               the first compiled file in list of included files (if it does
               not have any path then starting from current directory)
            b) check INCLUDE paths (paths specified by -I compile switch and
               taken from INCLUDE envvar)
      For files marked as system headers in #include directive (enclosed in <>)
      the file name is always used as relative path and Harbour scans only
      INCLUDE paths (-I and INCLUDE envvar). It's Harbour extension, Cl*pper
      does not support system headers.
    ; Maybe we should think about adding yet another step between (b) and (c)
      in case 2 above and between (a) and (b) in case 3:
         - try to access included file starting from the path taken from
           the file with #include directive
      It should help to create nested projects using relative paths. Maybe
      it should even have the highest priority. It could be important only
      in case of file name conflicts.
2015-06-25 13:49:33 +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
f566a9282c 2015-06-24 20:32 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/pp/ppcore.c
    ! fixed directory include precedence in #included files which
      are not marked as system headers (system headers are enclosed in <>)
      Now the following order is used:
         1) try to access included file as is starting from current directory
         2) if included file has relative path then check if the first
            compiled file has path and if yes try to access file using this
            path as start point
         3) check INCLUDE paths (envvar and -I parameter)
      Previous version used: 2 for nested files or 1 for first file or when
      first file was given without path then 3.
      Now we are Cl*pper compatible but such version strongly depends on
      current directory which has the highest priority. Personally I do no
      like such behavior because it may give different results when current
      directory is changed.
2015-06-24 20:32:30 +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
Viktor Szakats
e364f8634b 2015-06-17 12:39 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rtl/filesys.c
    ! fixed FXO_TRUNCATE flag used without FXO_SHARELOCK in POSIX systems

  * src/rtl/net.c
    ! typo in variable name

  * src/vm/task.c
    ! variable scope

  * src/compiler/compi18n.c
    * minor variable type update

  * ChangeLog.txt
    ! formatting
2015-06-17 13:30:50 +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
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
141a288ab7 2015-05-07 13:27 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rtl/itemseri.c
    ! fixed stupid typo which could cause buffer overrun during
      serialization of hash items with default value.
      Tanks to Abe for reporting the problem.
2015-05-07 13:27:18 +02:00
Przemysław Czerpak
bbf3bcf147 2015-05-05 20:06 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rtl/disksphb.c
    * added default path setting in hb_fsDiskSpace()

  * src/rtl/vfile.c
    * removed recent modification - it's not longer necessary
2015-05-05 20:06:34 +02:00
Przemysław Czerpak
93623a1528 2015-05-05 19:50 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rtl/vfile.c
    ! do not pass NULL pointer to hb_fileDirSpace()
2015-05-05 19:50:22 +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
b0b23e0e94 2015-04-27 17:21 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rdd/workarea.c
    ! fixed typo in RDDI_AUTOORDER type - it should be numeric
      just like in  _SET_AUTORDER. Many thanks to Rolf for locating
      the problem
2015-04-27 17:21:07 +02:00
Przemysław Czerpak
0b4ed76c12 2015-04-01 14:59 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/debug/dbgentry.c
    ! fixed typo in my previous commit for AltD() function detection
      Thanks to Franček Prijatelj for reporting the problem and Abe
      for self contain example

  * src/rdd/dbfcdx/dbfcdx1.c
    * reverted byte order in Harbour CDX signature - by mistake I used
      little endian. When existsing index is open then reverted signatures
      are accepted for backward compatiblity though they will be removed
      in the future.

  * src/rdd/workarea.c
    * move results of EVALBLOCK() RDD method from Harbour stack return item
      to workarea valResult item instead of copping it.
    ; Warning: This modification may exploit problems in code which
               wrongly looks for result of EVALBLOCK() RDD method in
               HVM stack return item instead of workarea valResult item.
2015-04-01 14:59:26 +02:00
Przemysław Czerpak
f817310638 2015-03-27 16:21 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/debug/dbgentry.c
    % small optimizations

  * src/rtl/gtwvt/gtwvt.c
    ! fixed extended keycodes generated for ASCII characters

  * src/rtl/gtwin/gtwin.c
    % removed meaningless code

  * src/rtl/inkeyapi.c
    * added translation for extended keycodes to ASCII characters
      in hb_keyChar()
2015-03-27 16:21:38 +01:00
Przemysław Czerpak
4ae0fd9dc6 2015-03-24 14:53 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rtl/hbsocket.c
    * use inet_pton() or inet_aton() if available instead of inet_addr()
2015-03-24 14:53:15 +01: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
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
26c617c979 2015-03-22 17:23 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rdd/dbf1.c
    * pacified warnings
2015-03-22 17:23:43 +01:00
Przemysław Czerpak
3c4c67254c 2015-03-21 12:54 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rdd/dbf1.c
    ! restored the line with initialization of allocated memory buffer
      I deleted by mistake removing my private comments before commit.
      Without this line sort could randomly crash on small tables (less
      then 65537 sorted records)
2015-03-21 12:54:05 +01:00