9 Commits

Author SHA1 Message Date
Viktor Szakats
5a2a287752 2017-09-08 16:00 UTC Viktor Szakats (vszakats users.noreply.github.com)
* *
    * partial sync with the 3.4 fork codebase. These are the things
      synces for the most part:
      - copyright headers
      - grammar/typos in comments and some readmes
      - comment/whitespace/decorations
      - variable scoping in C files
      - DO CASE/SWITCH and some other alternate syntax usage
      - minimal amount of human readable text in strings
      - minor code updates
      - HB_TRACE() void * casts for pointers and few other changes to
        avoid C compiler warnings
      - various other, minor code cleanups
      - only Harbour/C code/headers were touched in src, utils, contrib,
        include. No 3rd party code, no make files, and with just a few
        exceptions, no 'tests' code was touched.
      - certain components were not touched were 3.4 diverged too much
        already, like f.e. hbmk2, hbssl, hbcurl, hbexpat
      - the goal was that no actual program logic should be altered by
        these changes. Except some possible minor exceptions, any such
        change is probably a bug in this patch.
      It's a massive patch, if you find anything broken after it, please
      open an Issue with the details. Build test was done on macOS.
      The goal is make it easier to see what actual code/logic was changed
      in 3.4 compared to 3.2 and to make patches easier to apply in both
      ways.
2017-09-08 16:25:13 +00:00
Viktor Szakats
9f16c2bf8e 2017-08-13 18:27 UTC Viktor Szakats (vszakats users.noreply.github.com)
* *
    * update copyright headers with new FSF postal address
    * COPYING.txt -> LICENSE.txt (rest of repo to be synced)
2017-08-13 18:38:59 +00:00
Przemysław Czerpak
078899e74c 2016-02-18 17:02 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/fileio.ch
    + added HB_VF_IONAME to hb_vcConfigure() actions

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

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

  * src/rdd/dbfcdx/dbfcdx1.c
  * src/rdd/dbfnsx/dbfnsx1.c
  * src/rdd/dbfntx/dbfntx1.c
    * restored CL5.[23] compatible tag selection - I had to broke
      it when I was adding SIX3 compatibility functions
2016-02-18 17:02:48 +01:00
Viktor Szakats
58faf91453 2016-01-14 19:17 UTC+0100 Viktor Szakats (vszakats users.noreply.github.com)
* *
    % remove brandings and homepage [1] from copyright header. Pass 1 - using script.
      [1] nobody has access to it anymore AFAIK - and it's also just
          a redirect since long
    ! update url in copyright header
    ; this should make the diff between 3.4 and 3.2 easier to manage
2016-01-14 19:18:17 +01:00
Przemysław Czerpak
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
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
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