Commit Graph

17 Commits

Author SHA1 Message Date
Przemysław Czerpak
33f5c0eef4 2019-04-11 17:23 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/dbinfo.ch
  * src/rdd/dbf1.c
    + added DB_SETHEADER_EOL flag, it's used to force setting EOL marker
      when header is written. In Harbour's DBF* RDDs is set in CLOSE()
      method so just like in Clipper when DBF is closed and header has to
      be updated the EOL() marker is set.
      As side effect reducing header updates to minimal level (in such
      case DBF header is not updated after APPEND what is safe for Harbour,
      Clipper and compatible RDDs because they use file size to calculate
      number of records but some other DBF drivers may be confused)
      increase the APPEND speed and also forces EOL setting in all cases
      when CLOSE() method is called. Header updates can be reduce to minimal
      level by:
         hb_rddInfo( RDDI_SETHEADER, DB_SETHEADER_MINIMAL )

  * src/rdd/usrrdd/usrrdd.c
    ! fixed GPF in UsrRDD redirector for DROP(), EXISTS() and RENAME() methods

  * src/vm/cmdarg.c
    * use HB_MEM_STATISTICS instead of HB_MEM_USEDMAX to check if memory
      statistic module is enabled in //info message
2019-04-11 17:23:41 +02:00
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
Mindaugas Kavaliauskas
6a6f4d962d 2016-08-10 20:12 UTC+0300 Mindaugas Kavaliauskas (dbtopas/at/dbtopas.lt)
* contrib/rddads/ads.ch
    + 64bit server type constants included

  * include/dbinfo.ch
  * contrib/rddsql/hbrddsql.h
  * contrib/rddsql/rddsql.hbc
  - contrib/rddsql/hbrddsql.ch
    * definitions of SQL related RDDI_*, DBI_* constants moved from RDDSQL
      to core code
  * include/dbinfo.ch
  * contrib/rddsql/sqlbase.c
    * RDDI_NEWID renamed to more informative RDDI_INSERTID

  * contrib/rddads/ads1.c
  * contrib/rddads/adsfunc.c
  * contrib/rddads/rddads.h
    + RDDI_CONNECT, RDDI_DISCONNECT implemented. RDDINFO() can be used instead
      of RDD specific AdsConnect*() calls
    + other SQL related RDDINFO(), DBINFO() capabilities implemented
    + DBUSEAREA() accepts prefixes "SQL:" and "TABLE:" to indicate if
      given table name should be treated as SQL query or table file name.
      If these prefixes are omitted, function parameter is treated as table
      file name except in case it begins with "SELECT " (compatibility).
2016-08-10 20:13:37 +03:00
Przemysław Czerpak
7bc80aaf1d 2016-06-22 23:58 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/dbinfo.ch
    * updated few comments

  * src/rdd/dbf1.c
  * src/rdd/delim1.c
    ! fixed dbInfo( DBI_SETHEADER ) and hb_rddInfo( RDDI_SETHEADER )
      to not changer previous settings
    ! set DB_SETHEADER_APPENDSYNC as default update header mode
2016-06-22 23:58:12 +02: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
ea09561adf 2015-12-09 14:22 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/dbinfo.ch
  * include/hbrdddbf.h
  * src/rdd/dbf1.c
    + added new RDD switch RDDI_SETHEADER
      It allows to define how DBF header is updated in tables which
      will be opened later, i.e.:
         // maximize performance reducing number of DBF header updating
         // header is updated only when table is closed if before new
         // record was added
         hb_rddInfo( RDDI_SETHEADER, DB_SETHEADER_MINIMAL )
      or:
         // update header in the same moment as Clipper and xBase++
         // and store only last two digit from the year for compatibility
         // with old dBase and FoxPro versions
         hb_rddInfo( RDDI_SETHEADER, ;
                     hb_bitOr( DB_SETHEADER_CLIPPER, DB_SETHEADER_YYEAR ) )
         // DB_SETHEADER_CLIPPER
      By default Harbour uses DB_SETHEADER_APPENDSYNC.
      For more information look at comments for DB_SETHEADER_* switches
      in dbinfo.ch
    + added new table switch DBI_SETHEADER
      It has the same meaning as RDDI_SETHEADER but changes the header
      updated mode of already open table by dbInfo() function.

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

  * src/rtl/hbproces.c
    ! fixed sysconf() emulation for OpenWatcom 1.9 and earlier to work with
      _SC_PAGESIZE
2015-12-09 14:22:57 +01:00
Przemysław Czerpak
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
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
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
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
a767a89aa0 2014-01-21 20:35 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbct/ctnet.c
    ! fixed copy and past typo in previous commit

  * src/rdd/hbsix/sxcompat.prg
    ! fixed sx_Compress() and sx_Decompress() used with arrays

  ; modifications below comes from Viktor fork:

  * include/dbinfo.ch
  * src/rdd/workarea.c
    + added support for new dbInfo() action: DBI_CODEPAGE
      It returns Harbour CP used by current work area.

  * src/common/expropt2.c
    * change instruction order to protect against NULL references
      if we ever add support for dummy lists

  * src/common/hbver.c
    ! CLANG detection

  * src/lang/l_fr.c
  * src/lang/l_hu.c
    * updated translations

  * src/rtl/cdpapihb.c
  * include/harbour.hbx
    + added function hb_cdpExists( <cCDP> ) -> <lExists>
      it returns .T. if the passed codepage is supported
      and linked, .F. otherwise

  * src/rtl/hbrand.c
  * include/harbour.hbx
    + added hb_randStr( <nLen> ) -> <cBytes> which returns a strong
      random stream of bytes of requested length

  * src/vm/hashfunc.c
  * include/harbour.hbx
    + New hash function to easily check for the existence
      of a key and at the same time retrieving its corresponding
      value:
         hb_HGetRef( <hHash>, <xKey>[, <@xValue> ] ) -> <lFound>
      If the key is not found, <xValue> is also reset to NIL.
      Useful to replace hb_HPos()/hb_HValueAt() call pairs and
      associated temp variable, or to avoid multiple hash lookups
      for the cost of one temp variable.

  * src/rtl/copyfile.c
    % use 64KB buffer

  * src/rtl/tget.prg
    ! Get():Insert()/Get():OverStrike() GET freeze fix reworked
      using better solution by Heinz.

  * src/rtl/tgetlist.prg
  * src/rtl/tmenuitm.prg
  * src/rtl/tmenusys.prg
  * src/rtl/tpopup.prg
    ! fixed to precisely verify against multiple expected class names
      previously a custom class named f.e. 'LIST' was accepted in some
      places for LISTBOX
    ! fixed TOFIX where CP/encoding dependent string was
      used to determine whether a menu item is separator
      throughout the lifetime of the menu.

  * src/common/hbdate.c
  * src/common/hbprintf.c
  * src/common/hbtrace.c
  * src/common/hbver.c
  * src/compiler/compi18n.c
  * src/compiler/genc.c
  * src/compiler/gencc.c
  * src/compiler/hbusage.c
  * src/debug/dbgthsh.prg
  * src/debug/dbgtmenu.prg
  * src/debug/debugger.prg
  * src/debug/tbrwtext.prg
  * src/pp/hbpp.c
  * src/rdd/dbfcdx/dbfcdx1.c
  * src/rdd/dbfuncs.prg
  * src/rdd/dbtotal.prg
  * src/rdd/hbsix/sxcompat.prg
  * src/rdd/hbsix/sxini.prg
  * src/rdd/usrrdd/rdds/arrayrdd.prg
  * src/rdd/usrrdd/rdds/hscdx.prg
  * src/rtl/adir.prg
  * src/rtl/arc4.c
  * src/rtl/cdpdet.prg
  * src/rtl/dbedit.prg
  * src/rtl/dircmd.prg
  * src/rtl/diskspac.c
  * src/rtl/disksphb.c
  * src/rtl/errint.c
  * src/rtl/errintlo.c
  * src/rtl/errsys.prg
  * src/rtl/filesys.c
  * src/rtl/fslink.c
  * src/rtl/gtkbstat.c
  * src/rtl/gtwin/gtwin.c
  * src/rtl/gtwvt/gtwvt.c
  * src/rtl/hbbffnc.c
  * src/rtl/hbi18n1.c
  * src/rtl/hbi18n2.prg
  * src/rtl/hbini.prg
  * src/rtl/hbjson.c
  * src/rtl/listbox.prg
  * src/rtl/menusys.prg
  * src/rtl/mtran.c
  * src/rtl/radiogrp.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/ttopbar.prg
  * src/rtl/tget.prg
  * src/rtl/tlabel.prg
  * src/rtl/tmenuitm.prg
  * src/rtl/valtoexp.prg
  * src/rtl/valtype.c
  * src/vm/dlmalloc.c
  * src/vm/fm.c
    ! check module handle returned by GetModuleHandle() in MS-Windows
      builds
    ! use %u for unsigned printf formatting
    * casting, formatting, casing and some modifications in names
    * use #if 0 / #endif to mark commented blocks
    * updated year to 2014
    % use FOR EACH, SWITCH, DO CASE statements
    % use :__enumFirst() / :__enumLast()
    % eliminated some local variables and redundant declarations
    % use hb_defaultValue()
    % use $ operator instead of At() and hb_HHasKey()
    % use hb_ADel() instead of ADel()+ASize()
    * replace some functions with procedures
    * pacified some MSC warnings
    * use hb_StrFormat() for user messages
    * use :: instead of Self:
    * use ANSI date delimiters
2014-01-21 20:35:51 +01:00
Mindaugas Kavaliauskas
4f0e0e0347 Revert "2013-10-24 15:34 UTC+0300 Mindaugas Kavaliauskas (dbtopas/at/dbtopas.lt)" 2013-10-24 23:40:10 +03:00
Mindaugas Kavaliauskas
5c3ea08121 2013-10-24 15:34 UTC+0300 Mindaugas Kavaliauskas (dbtopas/at/dbtopas.lt)
* include/dbinfo.ch
  * include/hbrdddbf.h
  * src/rdd/dbf1.c
    + added default codepage setting RDDI_CODEPAGE for DBF RDD (and all
      inherited RDDs). This helps to do an easy migration of application
      to unicode, using existing dbf files:
         HB_CDPSELECT("UTF8EX")
         RDDINFO(RDDI_CODEPAGE, <codepage_used_in_dbf>)
2013-10-24 15:35:53 +03:00
Viktor Szakats
35300e401d minor doc/comment/test cleanups 2013-03-31 21:35:57 +02:00
vszakats
9687850865 2013-03-16 02:10 UTC+0100 Viktor Szakats (harbour syenar.net)
* (all files)
    * stripped svn header
    * minor cleanups
    ; use following command to find out the history of files:
       git log
       git log --follow
       git blame
       git annotate
2013-03-16 02:11:42 +01:00
vszakats
a4a357a18b 2013-03-15 11:12 UTC+0100 Viktor Szakats (harbour syenar.net)
* /harbour/* -> /*
    * moved whole Harbour source tree one level up to
      avoid single 'harbour' top dir
2013-03-15 11:13:30 +01:00