Commit Graph

343 Commits

Author SHA1 Message Date
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
Przemysław Czerpak
db16cc8861 2015-03-20 16:34 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/Makefile
  - include/hbdbsort.h
  * src/rdd/Makefile
  - src/rdd/hbdbsort.c
  * src/rdd/dbf1.c
    - completely removed old code used in DBF* RDDs as low level backend
      for SORT TO ... command and __dbArrange() function.
      It was buggy and extremely inefficient in some cases, i.e. after
      20 hours I killed process which was sorting table with 2'000'000
      records in reverted order so I cannot even say how much time it
      needed.

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

  * src/rdd/dbfnsx/dbfnsx1.c
  * src/rdd/dbfntx/dbfntx1.c
    * casting
2015-03-18 23:16:36 +01:00
Przemysław Czerpak
97d161c683 2015-03-18 13:25 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rtl/teditor.prg
    ! resize missing text on line wrapping (issue #92)
2015-03-18 13:25:45 +01:00
Przemysław Czerpak
c98c7b1597 2015-03-17 13:35 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rdd/workarea.c
    % small simplification
2015-03-17 13:35:57 +01:00
Przemysław Czerpak
66bf4f5867 2015-03-17 12:55 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rdd/dbcmd.c
    ! fixed __dbArrange() to allow record transfer with the same conditions
      as __dbTrans() just like Cl*pper does.
      Low level RDD code should respect it, i.e. it should be possible to
      sort using fields which exist only in source workarea, the order
      and number of fields in source and destination workareas can be
      completely different, etc.
      Low level DBF* SORT() method is completely broken in such cases and
      has to be rewritten.
2015-03-17 12:55:32 +01: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
b0e3afcdda 2015-03-05 22:35 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rdd/dbf1.c
    ! do not refresh ModTime and RowVer fields just copied during transfer
      operation
2015-03-05 22:35:11 +01:00
Przemysław Czerpak
74c4b51266 2015-03-05 20:46 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/hbapi.h
  * src/vm/garbage.c
    + added hb_gcDummyClear() function

  * include/hbapirdd.h
  * include/hbusrrdd.ch
    + added DBTF_CPYCTR constant value - when set in dbTransInfo.uiFlags
      then after record transfer field counters should to be copied from
      source to destination area

  * include/hbapirdd.h
  * src/rdd/wafunc.c
    + added new C functions hb_dbTransInfoPut() and hb_dbTransInfoGet()
      which allow to store and retrieve pointer to DBTRANSINFO structure
      into/from HB_ITEM with strict type verification.

  * src/rdd/wafunc.c
    * pass pointer to DBTRANSINFO structure as argument of DBI_TRANSREC
      action. It allows RDD serving destination area to decide which
      fields and how should be transferred updating uiFlags, uiItemCount
      and lpTransItems members of DBTRANSINFO.
      If RDD removes all fields from DBTRANSINFO structure (uiItemCount==0)
      or does not return HB_SUCCESS for DBI_TRANSREC action (default WA
      implementation returns HB_SUCCESS so it's not necessary to overload
      it if RDD does not make any additional operations) then record
      transfer is interrupted.
    * copy field counters only when destination area asked about it setting
      DBTF_CPYCTR in dbTransInfo.uiFlags in DBI_TRANSREC action.

  * src/rdd/dbf1.c
    * do not copy automatically updated fields when destination area
      is not empty
    * set DBTF_CPYCTR to indicate that counters should be copied from
      source to destination area when original value of automatically
      updated fields are transferred
    ; Now DBF* RDDs in Harbour respects the following rules for record
      transfer operations (COPY TO / APPEND FROM) with automatically
      updated fields:
         - COPY TO transfers original values to destination table and
           finally copy counters from the source table to destination one
           so autoincrement fields in both tables after next append will be
           initialized with the same values regardless of number of copied
           records - even if only single record is copied then counters in
           destination table will inherit next values for new record from
           the source table. Also values of RowVer and ModTime fields are
           copied from source to destination table and not updated during
           transfer operation.
         - APPEND FROM works like COPY TO (original field values and then
           counters are copied to destination table) if the source table
           supports counters and destination table is empty and FLocked()
           or opened in exclusive mode.
           If source table does not support counters for given fields, i.e.
           it is processed by transfer RDD like DELIM or SDF (RDT_TRANSFER)
           or destination table is not empty or opened in shared mode and
           FLock is not set when APPEND FROM is executed then automatically
           updated fields (counters, RowVer, ModTime) are not copied and
           initialized with new values like for each new record added to
           destination table.

  * ChangeLog.txt
    ! typo in last ChangeLog entry
2015-03-05 20:46:23 +01:00
Przemysław Czerpak
6df9526b8d 2015-03-04 11:18 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/hbapi.h
    ! fixed HB_ISMEMO() macro, original version was accepting the same
      items as HB_ISCHAR() so it was not compatible with ISMEMO() macro
      in Cl*pper.

  * src/rtl/valtype.c
    * use HB_ISMEMO() macro
2015-03-04 11:18:45 +01:00
Przemysław Czerpak
d3a947bc6f 2015-03-04 09:18 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rdd/dbf1.c
  * src/rtl/hbinet.c
    * pacified warnings (Thanks to Grigory)

  * src/rdd/dbcmd.c
  * src/rdd/wafunc.c
    * small code simplification and cleanup
    ! protection against GPF when wrong parameters are passed to __dbArrange()
    + added support for transferring records using __dbArrange() to area with
      different fields order (low level driver may refuse to finish such
      operation but not it's possible.
2015-03-04 09:18:13 +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
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
0abd7da585 2015-02-24 11:14 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rtl/gtxwc/gtxwc.c
    ! fixed GPF when empty window title is set and then retrieve - thanks
      to Teo.
2015-02-24 11:14:51 +01:00
Przemysław Czerpak
86d8fd5915 2015-02-21 15:33 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* ChangeLog.txt
  * src/compiler/hbmain.c
  * src/nortl/nortl.c
    ! save and restore SETs which can be modified by -fn[:[l|u]|-],
      -fd[:[l|u]|-], -fp[:<char>] and -fs[-] compiler flags.
      It fixes problem with HBMK2 so now above switches can be used
      with HBMK2.
2015-02-21 15:33:22 +01:00
Przemysław Czerpak
fff0da51ab 2015-02-21 14:34 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rdd/delim1.c
  * src/rdd/sdf1.c
    ! disabled code which allows to delete just added record.
      It was not Cl*pper compatible and caused bad side effects
      in COPY TO ... DELIM | SDF - deleted records were nor
      copied
2015-02-21 14:34:17 +01:00
Przemysław Czerpak
ea82ac86f6 2015-02-17 18:47 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rtl/gtwin/gtwin.c
    * use VK_MENU macro instead of direct value and do not check
      VirtualScanCode in hack for ALT+<keypadnums,...> input
2015-02-17 18:47:54 +01:00
Przemysław Czerpak
094b3e6faa 2015-02-17 17:22 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rdd/dbf1.c
    * modified code which tries to detect if field flags were used in DBF
      header for autoinc numeric fields
2015-02-17 17:22:57 +01:00
Przemysław Czerpak
9347e5ab4e 2015-02-17 16:35 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rdd/dbf1.c
    + added support for autoincrement fields with counter longer then 4 bytes
      Warning: if someone created tables with such fields i.e. { "I:+", 8, 0 }
               after my modification which added support for AutoInc flags in
               all numeric DBF fields then he should update counters manually
               using DBS_COUNTER flag. New code uses 64bit counters for such
               field located in different part of DBFFIELD structure.
2015-02-17 16:35:17 +01:00
Przemysław Czerpak
9ed0347914 2015-02-17 13:28 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/compiler/cmdcheck.c
    ! fixed error messages when wrong parameters are passed.
      When wrong parameters are taken from HARBOURCMD or CLIPPERCMD
         "Bad command line option '%s'"
      error is generated and
         "Bad command line parameter '%s'"
      when wrong parameters are from command line.
      New behavior is Cl*pper compatible.
2015-02-17 13:28:11 +01:00
Przemysław Czerpak
418caaac51 2015-02-17 12:06 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbssl/tests/inetssl.prg
  * contrib/rddads/ads1.c
  * src/rtl/teditor.prg
    * formatting of my recent modifications taken from Viktor's branch

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

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

  * include/hbcomp.h
  * include/hbcompdf.h
  * src/compiler/cmdcheck.c
  * src/compiler/hbmain.c
  * src/compiler/ppcomp.c
  * src/compiler/genc.c
  * src/compiler/hbusage.c
  * src/nortl/nortl.c
    * rewritten code used to parse command line and environment parameters.
      New code is covered by GPL + Harbour exception license.
      All parameters are decoded by only one function and whole code is
      smaller so it's much easier to modify this code.
    ! fixed some small bugs and incompatibilities with Cl*pper in parameter
      parsing
    ! fixed -y undocumented (YYDEBUG) switch
    - removed -x[<prefix>] set symbol init function name prefix (for .c only)
      compiler command line switch
    * moved -fn[:[l|u]|-] -fd[:[l|u]|-] -fp[:<char>] and -fs[-] switches
      parsing to core compiler library. Now these switches are also works
      with compiler library linked with HBMK2.
    ; TOFIX: HBMK2 ignores -fn/-fd switches and allocates temporary names
             which are not compatible with names used later by harbour
             compiler when above switches are activated. HBMK2 should
             parse parameters and update SET FILECASE / SET DIRCASE before
             it creates temporary files.
2015-02-17 12:06:51 +01:00
Przemysław Czerpak
be90db3802 2015-02-15 21:31 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rdd/dbf1.c
    * slightly modified code which tries to detect if field flags were
      used in DBF header
2015-02-15 21:31:12 +01:00
Przemysław Czerpak
f4026e5441 2015-02-15 20:44 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/common/hbdate.c
    ! fixed rounding negative UTC offsets in MS-Windows builds.
      It should fix issue #89.
2015-02-15 20:44:41 +01:00
Przemysław Czerpak
bbfe7a6a00 2015-02-15 20:23 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rtl/gtwin/gtwin.c
    * added hack to process characters generated without keydown event.
      It should fix issue #86.
2015-02-15 20:23:15 +01:00
Przemysław Czerpak
25b2825ee9 2015-02-13 17:08 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rtl/mlcfunc.c
    ! fixed MPosToLC() results for position in last line which have to
      be moved after analyzing rest of line due to word wrapping.

  * src/rtl/teditor.prg
    * rewritten whole internal code critical for basic functionality.
    + resolved the problem with keycode conflicts for GTs which
      support extended keycodes.
    + added support missing MemoEdit() editor functionality.
    ; Number of bugs and mistakes was to big to try to update it.
      New code is smaller and simpler. I tried to keep compatibility
      with previous version and added to new version most of "helper"
      methods which are not used in MemoEdit() at all anyhow I cannot
      guaranty that all existing code using TEditor will work without
      modifications, i.e. I had to remove :SetPos() and all logic bound
      with it because it was to hard for my brain to understand this
      idea and/or functionality.
      If someone needs strict compatibility with previous version then
      he should add to his source code copy of old code.
      Current code should addressed most of MemoEdit() problems with
      text formatting and editing reported in the past though probably
      not all. I have no spare time for precise tests of Cl*pper's
      MemoEdit().

  * src/rtl/memoedit.prg
    * overload :InsertState() method to show <insert> SCOREBOARD message
    * changed "Abort Edit? (Y/N)" message position to be Clipper compatible
    * removed redundant keycode comparison
    * do not ::SetPos HBEditor method - this method has been removed
2015-02-13 17:08:09 +01:00
Przemysław Czerpak
403decab13 2015-02-11 18:48 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rtl/mlcfunc.c
    * modified unpadded MemoLine() mode to return last blank
      character in the line

  * src/rtl/teditor.prg
    ! fixed typo in MemoLine() parameters
    + added lSoftCR parameter to GetText() - when it's true returned
      text contains SoftCRs

  * src/rtl/memoedit.prg
    ! return text with SoftCRs - Cl*pper compatible

  ; Above modifications fix initial and result text formatting
    in MemoEdit() (#33)
2015-02-11 18:48:48 +01:00
Przemysław Czerpak
080ab48930 2015-02-11 12:31 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/codepage/l_fr.h
    + added 'Ç' and 'ç' characters to set of french letters
    ; this modification affected "FRISO" and "FRWIN" codepages.
      Users using them and above characters in index field should
      reindex their databases.

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

   ; above modifications close issue #88
2015-02-11 12:31:48 +01:00
Przemysław Czerpak
238f2b606c 2015-02-11 09:49 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rdd/dbf1.c
    * moved AutoInc field initialization to separate function
    % removed unnecessary AutoInc initialization from RowVer fields
    * cleanup few static function names
2015-02-11 09:50:00 +01:00
Przemysław Czerpak
64b5a2586f 2015-02-11 09:26 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rdd/dbf1.c
    + finished support for AutoInc flag (+) for all numeric fields (N, F, I, B)
      in DBF* RDDs. Now user can define field like:
            { "COUNTER", "I:+", 4, 0 }
      and they will work like autoincrement fields but without any assign
      restrictions.
2015-02-11 09:26:33 +01:00
Przemysław Czerpak
7886f9f0ea 2015-02-10 17:23 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/hbznet.h
  * src/rtl/hbinet.c
    + added new C function hb_znetInetTimeout()
    * minor cleanup (local variables localization)

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

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

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

  + contrib/hbssl/tests/inetssl.prg
    + added test code for hb_inet*() SSL/TLS connections.
      It's client and server example which also generates self
      certificated encryption keys running openssl command.
      If this code is linked with non console GT then user
      should generated certificates himself (see comment in
      LoadCertificates() function for more information).
2015-02-10 17:23:48 +01:00
Przemysław Czerpak
2c23828109 2015-02-09 00:22 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rtl/hardcr.c
    ! fixed HardCR() to work with codepages using custom character encoding
      in which SoftCR can be part of valid character, i.e. UTF8.

  * ChangeLog.txt
    * typos in prev my entry
2015-02-09 00:22:36 +01:00
Przemysław Czerpak
0c1c2ab698 2015-02-08 23:32 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/harbour.hbx
  * src/vm/hvm.c
    + added new PRG function:
         __BreakBlock() -> {|e| Break( e ) }

  * include/hbexprb.c
    % replace {|e| Break( e ) } with __BreakBlock() function call.
      __BreakBlock() returns exactly the same codeblock on each call
      so using it save memory and improve a little bit speed because
      it's not necessary to allocate new GC memory block and register
      it in GC block list. Additionally in MT mode it eliminates mutex
      lock necessary to register new GC block.
2015-02-08 23:32:45 +01:00
Przemysław Czerpak
11156a9563 2015-02-08 13:19 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rdd/workarea.c
    + added support for field flags in dbCreate()/dbStruct().
      Flags can be passed in string with field type after ":", i.e.
         "C:U"
      means Unicode character field.
      The following flags are recognized:
         "N" - column can store null values
         "B" - binary column
         "+" - column is autoincrementing
         "Z" - column is compressed
         "E" - column is encrypted
         "U" - column stores Unicode strings

  * src/rdd/dbf1.c
    + added support for field flags in core DBF* RDDs.
    ; In core DBF* RDDs "N", "B", "U" and "+" flags are supported.
      When "N" flag is used then special hidden field with NULL bits
      is created. Such implementation is compatible with DBF created
      by VFP.

  * contrib/rddads/ads1.c
    + added support for field flags in ADS* RDDs
    ! added missing RTE when wrong field types are passed to dbCreate()
    ; The old format with long field names corresponding to ADS types is
      still supported but I had to rewrite this code so please make real
      life test and verify me. In few cases I slightly change the code and
      now it can be a little bit more restrictive, i.e. typos in "AtutoInc"
      field type will be detected (previous code checked only for 1-st
      letter "A").
2015-02-08 13:19:07 +01:00
Przemysław Czerpak
a10bfbda40 2015-02-06 15:00 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rtl/hbsocket.c
    * added support MAC addreses array returned by hb_socketGetIFaces()
      in BSD based systems like FreeBSD or Darwin (Mac OS X)

  * src/vm/hvm.c
    % small simplification i FOR EACH initial code

  * contrib/hbwin/win_bmp.c
  * contrib/hbwin/win_prn2.c
    * use Harbour FILE IO API instead of local file access

  * contrib/hbct/ctstrfil.c
    * formatting

  * contrib/gtqtc/gtqtc1.cpp
    ! fixed possible missing initialization for drawing character images
2015-02-06 15:00:31 +01:00
Przemysław Czerpak
32b22ec738 2015-01-19 13:24 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbwin/hbwin.hbx
    + added __oleVariantNullDate()

  * src/common/hbver.c
  * src/rtl/tget.prg
    ! applied Get():end() Cl*pper compatibility fix by Rolf.
    * synced with Viktor's branch

  * contrib/hbhpdf/image.c
    ! applied fixes sent by Peter Rees
    ! protection against GPF when wrong parameter is passed to
      HPDF_Image_GetColorSpace() (borrowed from Viktor's branch)

  * README.md
  * src/compiler/hbusage.c
  * src/pp/hbpp.c
  * utils/hbi18n/hbi18n.prg
  * utils/hbtest/hbtest.prg
  * contrib/hbformat/utils/hbformat.prg
  * contrib/hbnetio/utils/hbnetio/hbnetio.prg
  * contrib/hbnetio/utils/hbnetio/netiomgm.hb
    * bumped copyright year to 2015
2015-01-19 13:24:33 +01:00
Przemysław Czerpak
603063cd0d 2015-01-14 13:00 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbwin/olecore.c
    + added new PRG function to control empty date conversion to OLE variant:
         __oleVariantNullDate( [<lNewNullFlag>] ) -> <lPrevNullFlag>
      This is per thread switch and by default initialized to .F. for each
      new thread. When set to .T. Harbour empty dates are translated to
      VT_NULL.
      Warning: it's possible that this function will be removed or replaced
               by other solution in the future.

  * contrib/gtqtc/gtqtc1.cpp
    * emulate CTRL by setting SHIFT + ALT in Android builds
      (It's temporary solution - my patch with support for CTRL in
      Android QT builds has been accepted so it should be included
      in next Qt releases)
    % set Qt::WA_NoSystemBackground
    * do not change number of rows and cols in maximized and fullscreen mode
      when font is changed and resize mode set to HB_GTI_RESIZEMODE_FONT.
      It was creating problems when user switched to fullscreen/maximized
      mode and application was not ready to dynamically update screen
      dimensions.
    * activate virtual keyboard on double click instead of click.
      It allows to hide virtual keyboard and control program using mouse
      and touch events.

  * src/rtl/gtwvt/gtwvt.c
    + added support for HB_K_MENU

  * src/rtl/gtxwc/gtxwc.c
    * use macros instead of constant values
    + added support for HB_K_MENU
    * reload font after HB_GTI_FONTSIZE (compatible with other graphic GTs)
    * eliminated recursive mutex XLIB locks in HB_GTI_FONTSEL
    * discard existing graphics characters and redraw console window contents
      after HB_GTI_FONTATTRIBUTE

  * tests/gtkeys.prg
    + added support for HB_K_MENU and HB_K_TERMINATE
2015-01-14 13:00:13 +01:00
Przemysław Czerpak
6f3cc11e48 2015-01-09 19:19 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rdd/dbf1.c
    * minor foramtting

  * src/rtl/gtwvt/gtwvt.c
    ! do not generate K_MOUSEMOVE during marking phase

  * src/rtl/gtxwc/gtxwc.c
    ! fixed mapping XWindow mouse buttons to Harbour buttons
      (MRightDown() and MMiddleDown() were reverted)

  * src/rtl/memoedit.prg
    ! fixed processing unicode characters

  * src/rtl/teditor.prg
    * synced with Viktor's branch
2015-01-09 19:19:09 +01:00
Przemysław Czerpak
786b91612b 2014-12-31 01:45 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rtl/memoedit.prg
    ! fixed repeat condition for ME_INIT initial user function call
      (correctly fixes #21)

  * src/rtl/mlcfunc.c
    * added temporary extension to MemoLine() which will be removed and
      replaced in the future

  * src/rtl/teditor.prg
    ! use temporary MemoLine() extension to fix problem with line trailing
      spaces I introduced with previous modification

  * src/rtl/replic.c
    % optimization for Replicate( <cStr>, 1 )
2014-12-31 01:45:42 +01:00
Pritpal Bedi
1913612f5b 2014-12-30 01:19 UTC-0800 Pritpal Bedi (bedipritpal/at/hotmail.com)
* src/rtl/memoedit.prg
    ! Fixed: nUdfReturn value ME_UNKEY (1-31) were not being processed.
2014-12-30 01:24:12 -08:00
Przemysław Czerpak
bcbd37990b 2014-12-29 20:27 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/hbznet.h
  * src/rtl/hbinet.c
  * src/rtl/hbinetz.c
    * moved HB_INET_ERR_* macros to header file
    + added error and errorStr functions to hb_inet*() socket read/write
      wrappers
    ! call close function of hb_inet*() socket read/write wrappers before
      closing the socket
    + added hb_znetInetFD() C function

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

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

  * src/rtl/tgetlist.prg
    * applied recent fixes from Viktor's branch:
    ; (2014-12-19 01:00 UTC+0100 Viktor Szakats)
       ! HBGetList():GUIApplyKey(): fixed bug introduced with UNICODE
         support in 93d3a46d84 (upstream).
         That patch had an undocumented workaround for the problem inside
         ListBox():findText(), which was not Cl*pper compatible, so
         it was later removed in 6f8508ff54a3955822b36bf4a65a2775a11bab23.
         This patch hopefully fixes the root cause.
         Reported here: https://groups.google.com/d/msg/harbour-devel/7Cpax5TdHnY/n5XfXX8N9vMJ
2014-12-29 20:27:15 +01:00
Przemysław Czerpak
8eb8cf62a7 2014-12-15 15:48 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rtl/hbtoken.c
    * cleaner version of recent hb_tokenPtr() fix which works correctly
      also with active delimiters
2014-12-15 15:48:22 +01:00
Przemysław Czerpak
309c71ba23 2014-12-13 10:17 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rtl/hbtoken.c
    ! fixed hb_tokenPtr() to work correctly with new EOLs
      Thanks to Viktor for information about the problem.
2014-12-13 10:17:37 +01:00
Przemysław Czerpak
a7e7b14b46 2014-12-12 16:03 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rtl/hbini.prg
    ! use hb_ATokens( <cData>, .T. ) to divide .ini file to lines
      It's much faster and fixes problem existing from initial version
      of this code that .ini files with mixed EOLs cannot be correctly
      decoded, i.e. .ini files with LF EOLs was couldn't be decoded if
      someone added even single line with CRLF.
    * small .ini read code reorganization
2014-12-12 16:03:16 +01:00
Przemysław Czerpak
20ec21c553 2014-12-12 13:30 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/hbcompdf.h
  * include/hbexprb.c
  * src/common/funcid.c
  * src/vm/hvm.c
    % optimize Array() function by replacing function call with HB_P_ARRAYDIM
      PCODE. Because this optimization changes RTE and interacts with broken
      code like
         aVal := Array( 10, 0, "A" )
      then it's not enabled by default. User can enable it by -ko switch.

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

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

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

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

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

  * contrib/gtqtc/gtqtc1.cpp
    + center and rescale to console window dimension keeping aspect size ratio
      picture passed to HB_GTI_DISPIMAGE when second parameter is .T.
    + added support for HB_K_MENU key
    ! fixed dynamic font size modification in fullscreen, maximized and
      HB_GTI_RESIZEMODE_ROWS modes
2014-12-12 13:30:56 +01:00