Commit Graph

515 Commits

Author SHA1 Message Date
Viktor Szakats
3458d7e9e7 2010-05-25 21:12 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* utils/hbmk2/hbmk2.prg
    * '-plug=' option renamed to '-plugin='
    + Added support for 'plugins=' line in .hbc files.
    % Plugins are now fully loaded just once at the beginning
      of hbmk2. (as opposed to every invocation)
    + Plugins are now automatically treated as .hrb or .prg
      based on _file content_. This means that any extension
      can be used for plugins for both .prg and .hrb code.
      When .prg or .hrb extension is used there isn't any
      extra trial made on the file content, it will be load
      as source or HRB respectively.
      Maybe we should find a new distinctive extension for 
      hbmk2 plugins.
    * Default extension for -plugin= option changed to .prg
      (was: .hrb)
    + Showing type of input plugin in -trace mode.
      ('source' or 'compiled')

  * config/detect.mk
    ! Applied fix to DragonFly patch, submitted by Tamas Tevesz.

  * src/vm/runner.c
    * Minor formatting.
2010-05-25 19:20:38 +00:00
Viktor Szakats
c95a4f9edc 2010-05-25 16:21 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* src/common/hbprintf.c
  * include/hbsetup.h
  * config/global.mk
  * config/bsd/libs.mk
  * config/detect.mk
    + Applied patch by Tamas Tevesz, making it possible to build
      Harbour for DragonFly BSD systems.
      Thanks a bunch.

  * utils/hbmk2/hbmk2.prg
    + Applied above change to hbmk2 code, so now it should also
      support DragonFly BSD. (pls test it)
2010-05-25 14:22:11 +00:00
Viktor Szakats
79ba9da837 2010-05-25 15:01 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* src/rtl/tobject.prg
  * src/rtl/tpersist.prg
  * src/rtl/memoedit.prg
  * src/rtl/teditor.prg
  * contrib/hbmysql/tmysql.prg
  * contrib/hbmysql/tsqlbrw.prg
  * contrib/hbodbc/todbc.prg
  * contrib/hbfbird/tfirebrd.prg
  * contrib/hbpgsql/tpostgre.prg
  * contrib/hbmisc/hbedit.prg
  * contrib/hbtip/smtpcli.prg
  * contrib/hbtip/mail.prg
  * contrib/hbwin/win_reg.prg
  * contrib/hbwin/win_os.prg
  * contrib/hbwin/win_tprn.prg
  * contrib/hbwin/wce_sim.prg
    ! Fixed to check for proper type instead of using
      'DEFAULT ... TO'

  * contrib/hbct/ct.prg
    % EXIT/INIT FUNCTION -> EXIT/INIT PROCEDURE
2010-05-25 13:04:58 +00:00
Przemyslaw Czerpak
91cf12d405 2010-05-25 13:20 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbapi.h
  * harbour/src/vm/hashes.c
  * harbour/src/vm/hashfunc.c
    + added support for keeping strict assign order in hash arrays. It's
      enabled optionally by setting HB_HASH_KEEPORDER hash array flag.
      It gives the same functionality as associative arrays in xHarbour
      (enabled by HSETAACOMPATIBILITY()) but this implementation is
      internally completely different. It does not introduce linear
      scan in add operation so enabling it should not reduce the
      performance in this operation. It can even improve it on some
      hardware reducing number of memory bytes which have to be moved.
      Only delete operation will force linear index scan. The most
      important in this implementation is that it does not need any
      additional functions like HAA*() in xHarbour. Just simply all
      existing functions operating on position indexes like HB_HPOS(),
      HB_HKEYAT(), HB_HVALUEAT(), HB_HPAIRAT(), HB_HDELAT(), HB_HSCAN()
      use as index natural order in which items were added to hash array.
      Also HB_HKEYS(), HB_HVALUES() and FOR EACH iterations respect it.
    + added new PRG functions
         HB_HKEEPORDER( <hValue> [, <lNewSetting> ] ) -> <lPrevSetting>
         HB_HSETORDER( <hValue> [, <lNewSetting> ] ) -> <hValue>
      which cam be used to enable/disable strict order in hash array.
      Enabling strict order for non empty hash arrays accept the order
      created after sorting existing item not the original assign order.
      Disabling strict order for non empty hash arrays may change the
      items order.
    ; TODO: add translation for xHarbour's HAA*() functions to hbcompat.ch
            and/or xhb library.

  * harbour/contrib/hbnetio/netiocli.c
  * harbour/contrib/hbnetio/netiosrv.c
    % reenabled TCP_NODELAY on client and server side
      I had to be really tired when I was making tests and I mixed
      hb_socketSetNoDelay() with hb_socketSetBlockingIO().
      Thanks to Aleksander Czajczynski who noticed the delay in his
      tests.

  * harbour/contrib/hbwin/olecore.c
    * minor cleanup
2010-05-25 11:20:34 +00:00
Przemyslaw Czerpak
4481de3e73 2010-05-24 21:11 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/vm/hashes.c
    * do not clone preallocated unused area

  * harbour/contrib/hbnetio/netiocli.c
    * disabled RT errors inside NETIO_CONNECT() and NETIO_GETCONNECTION()
      when wrong password or NETIO server is used but return .F.
2010-05-24 19:11:15 +00:00
Viktor Szakats
e8aec4dff4 2010-05-24 18:45 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* utils/hbmk2/hbmk2.prg
  * utils/hbmk2/examples/plug_moc.prg
    * Minor cleanups to plugin API.

  * src/rtl/typefile.prg
    ! Typo in comment.
2010-05-24 16:45:51 +00:00
Przemyslaw Czerpak
dbcd987a99 2010-05-24 11:38 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbapi.h
  * harbour/include/hbvmint.h
  * harbour/include/hbvmopt.h
  * harbour/include/hbstack.h
  * harbour/include/hbvmpub.h
  * harbour/include/hbtypes.h
  * harbour/src/vm/estack.c
  * harbour/src/vm/hvmall.c
    * slightly modified the names of HB_{API|STACK}_MACROS.
      These are internal macros in current Harbour code but they are
      still defined in some old user build scripts used to compiled
      user or core code what could cause unpredictable results for
      final binaries. AFAIR default xMate configuration enables them.
2010-05-24 09:39:17 +00:00
Viktor Szakats
d8d5c8c4b2 2010-05-21 17:06 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* src/compiler/genhrb.c
    ! Fixed very old copy paste error in .hrb generation feedback 
      text.
2010-05-21 15:06:56 +00:00
Przemyslaw Czerpak
54b5e1564a 2010-05-20 19:49 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/rdd/dbf1.c
    * minor cleanup

  * harbour/include/hbapi.h
    + added new macro HB_IS_EVALITEM() - returns true for items which can
      understand EVAL message i.e. CODEBLOCK and SYMBOL items.

  * harbour/contrib/hbwin/axcore.c
  * harbour/contrib/hbwin/olecore.c
  * harbour/contrib/hbwin/hbwinole.h
    * modified hb_oleDispInvoke() function to accept as additional
      parameter pointer to HVM item instead of pointer to DISPID.
      Such version is more universal.
2010-05-20 17:50:09 +00:00
Przemyslaw Czerpak
dd2ee1d1a5 2010-05-20 01:42 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbapi.h
  * harbour/src/vm/hashes.c
    + added new C function hb_hashGetCItemPos()

  * harbour/src/rtl/hbcom.c
    ! fixed typo located by Bisz István
2010-05-19 23:42:29 +00:00
Viktor Szakats
1581b2ae9b 2010-05-18 09:19 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* src/rtl/memvarhb.prg
    * HB_MVSAVE(): reset to be a FUNCTION to avoid the "volatile"
      return value and better imitate __MVSAVE() behavior.
    % HB_MVSAVE(): deleted unnecessary UPPER().
    - Deleted TODO.

  * ChangeLog
    * Marked TODOs as done. (Thanks Przemek)
2010-05-18 07:20:20 +00:00
Przemyslaw Czerpak
8c8aadfc3b 2010-05-18 02:42 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbvm.h
  * harbour/src/vm/hvm.c
    + added new C function hb_vmIsActive()

  * harbour/src/rtl/memvarhb.prg
    ! fixed procedure returning value
    ! store only simple variables in HB_MVSAVE() just like __MSAVE()
      Possible extension: add option to store also NIL, arrays, hashes
      and maybe object variables.
    ! restore variables in HB_MVRESTORE() as private ones just like
      __MVRESTORE()

  * harbour/contrib/hbwin/oleinit.c
  * harbour/contrib/hbwin/olecore.c
    * updated to compile and link in WinCE builds. Now code using OLE
      can be linked with MinGWCE builds without any errors but I have
      no idea if it works. Can someone check it?
2010-05-18 00:42:51 +00:00
Viktor Szakats
8f6b341a49 2010-05-18 02:25 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* utils/hbmk2/hbmk2.pt_BR.po
  * utils/hbmk2/hbmk2.hu_HU.po
  * utils/hbmk2/hbmk2.prg
    + Added experimental -hbdynvm mode.
    + Added support for .def input file in -hbdyn/-hbdynvm modes.
    ; TODO: Couldn't find how to pass .def files to Open Watcom wlink.
            Anybody with an experience here?

  * src/rtl/memvarhb.prg
    + Added one initialization to NIL.
2010-05-18 00:26:06 +00:00
Przemyslaw Czerpak
7574349fe6 2010-05-17 22:34 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/vm/dynsym.c
    ! casting for C++ mode
2010-05-17 20:34:13 +00:00
Viktor Szakats
e4196785d1 2010-05-17 20:47 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* include/hbextern.ch
  * src/rtl/Makefile
  + src/rtl/memvarhb.prg
    + Added:
        HB_MVSAVE( <cFileName>, [<cMask>], [<lIncludeMask>] )
        HB_MVRESTORE( <cFileName>, [<lAdditive>], [<cMask>], [<lIncludeMask>] )

      They serve the same purpose with same interface
      and similar behavior to __MVSAVE()/__MVRESTORE()
      (and __MSAVE()/__MRESTORE(), and 'SAVE TO' command),
      only that they support longer than 10 char variable names.
      It is not possible to add such support in Clipper-style
      .mem files, so these functions will create an incompatible
      file format with default '.hbv' extension.

    ; TOFIX: __MVRESTORE() restores variables as PRIVATEs
             while HB_MVRESTORE() as PUBLIC.
    ; NOTE: GETLIST exclusion is solved with simple trick,
            as I couldn't find how it's solved in __MVSAVE().
    ; Consider this experimental solution to the problem.

  * contrib/hbmysql/tmysql.prg
    % STOD( "" ) -> STOD()

  * contrib/hbide/ideprojmanager.prg
    ! -hbexec -> -hbexe

  * src/rtl/typefile.prg
    ! __TYPEFILE(): Fixed both RTEs to be Clipper compatible.
2010-05-17 18:49:23 +00:00
Przemyslaw Czerpak
1820ba8248 2010-05-17 13:37 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbapi.h
  * harbour/src/vm/dynsym.c
    + added to C functions:
         int hb_dynsymToNum( PHB_DYNS pDynSym );
         PHB_DYNS hb_dynsymFromNum( int iSymNum );
      which can be used to make conversion between dynamic symbols and
      numbers
2010-05-17 11:37:27 +00:00
Viktor Szakats
967945e86e 2010-05-17 00:59 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* contrib/sddfb/sddfb.hbi
    ! Sync with recent fix in contrib/hbfbird/hbfbird.hbi.

  * src/vm/memvars.c
    * Minor typo in comment.
    * Formatting.
2010-05-16 23:01:55 +00:00
Viktor Szakats
cafd33d5d9 2010-05-15 15:17 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* src/rtl/gtwvt/gtwvt.c
    - Deleted notifierblock/fireevent support.
      Light is green to add threaded screen refresh and event
      handling. This could enhance performance and fix the
      frozen screen refresh in Harbour app loops.
    ; INCOMPATIBLE: Switch to HB_INKEY_GTEVENT + HB_K_* solution.
2010-05-15 13:19:51 +00:00
Viktor Szakats
d9df31830f 2010-05-15 14:56 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* src/rtl/gtwvt/gtwvt.c
    * Changed HB_GTI_CLOSABLE to not cause any visible change on the UI.
      Setting HB_GTI_CLOSABLE to .F., will now cause that a HB_K_CLOSE
      event is returned to application by INKEY(), and app can decide
      whether to ignore it or QUIT.
      This also means that the feedback is now not an async event in
      HB_GTI_CLOSABLE .F. mode, IOW if the app is in a loop without
      reading keys, close button won't work, which is IMO closer to 
      how apps are supposed to behave. It also won't grey out the 
      close buttong anymore which is also a unusual thing to do 
      amongst apps.
    ; TODO: If this turns out to be good solution, sync this behavior
            with HBWIN.
    ; TODO: Delete old "fireevent" async even handling using notifier
            callback codeblock.
2010-05-15 12:58:03 +00:00
Viktor Szakats
348c736aa1 2010-05-15 14:03 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* src/rtl/gtwvt/gtwvt.c
    ! Internal change slipped into prev.
2010-05-15 12:03:46 +00:00
Viktor Szakats
b0c5f58a09 2010-05-15 13:55 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* include/inkey.ch
    + Added new special GT events (over existing HB_K_RESIZE):
        HB_K_CLOSE
        HB_K_GOTFOCUS
        HB_K_LOSTFOCUS
    + Added new Harbour specific INKEY() event filter:
        HB_INKEY_GTEVENT
    * INKEY() codes below marked as compatibility:
        K_MMLEFTDOWN, K_MMRIGHTDOWN, K_MMMIDDLEDOWN

  * src/rtl/hbgtcore.c
    ! Fixed to only return HB_K_RESIZE/CLOSE/GOTFOCUS/LOSTFOCUS
      events when allowed via HB_INKEY_GTEVENT filter.
    ; INCOMPATIBILITY: HB_K_RESIZE will now only be returned
      by INKEY() if this filter is added.

  * src/rtl/gtwvt/gtwvt.c
    - Deleted code protected by __HB_GTWVT_GEN_K_MMDOWN_EVENTS guard.
    + Will now generate INKEY() event:
        HB_K_LOSTFOCUS
        HB_K_GOTFOCUS
      and
        HB_K_CLOSE.
    ; TOFIX: HB_K_CLOSE doesn't work yet. Probably some rearrengement
             of window close control will be needed.

  ; The goal is to be able to keep "fireevent" feature in a Clipper/Harbour
    and thread friendly manner, so it becomes possible to move OS level
    UI event into separate thread.
2010-05-15 11:57:34 +00:00
Przemyslaw Czerpak
2bf6bbd4b8 2010-05-15 09:43 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/rtl/hbcom.c
  * harbour/contrib/hbct/ctcom1.c
  * harbour/contrib/hbct/ctcom2.c
    * removed unused code and added parenthesis to pacify warning

  * harbour/contrib/gtwvg/gtwvg.h
  * harbour/contrib/gtwvg/wvggui.h
  * harbour/contrib/hbwin/win_dlg.c
    * updated included header files
      (it fixes problem with BCC5.5 and POCC/XCC builds)
2010-05-15 07:43:37 +00:00
Viktor Szakats
1e64482697 2010-05-14 23:50 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* src/rtl/tget.prg
    ! Fixed "@RE" picture mask handling in GETs.
      Thanks to Aleksander Czajczynski for reporting the
      issue with clear example.
      The fix applied is a de-hacked version of the one
      sent to the list. What's simply done is 'R' being
      disabled when used in conjunction with 'E'.
2010-05-14 21:52:26 +00:00
Przemyslaw Czerpak
477a505359 2010-05-14 18:33 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbapi.h
  * harbour/src/vm/dynsym.c
    + added new function hb_dynsymIsMemvar()
2010-05-14 16:33:56 +00:00
Przemyslaw Czerpak
8993f567a9 2010-05-14 15:12 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbapicom.h
    * minor modification in defined names

  * harbour/src/rtl/hbcom.c
    + added some very seldom (in practice only on Linux kernels >= 2.4
      and not by all hardware drivers) supported termios extensions

  * harbour/include/hbatomic.h
    ! fixed typo in non x86 and non MinGW GCC>=4.1 builds reported
      on SF bug tracker
2010-05-14 13:12:13 +00:00
Viktor Szakats
88a247ea23 2010-05-12 16:58 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
+ contrib/gtalleg/gtalleg.hbi
  + contrib/hbblat/hbblat.hbi
  + contrib/hbcairo/hbcairo.hbi
  + contrib/hbcurl/hbcurl.hbi
  + contrib/hbfbird/hbfbird.hbi
  + contrib/hbfimage/hbfimage.hbi
  + contrib/hbgd/hbgd.hbi
  + contrib/hbhpdf/hbhpdf.hbi
  + contrib/hbmysql/hbmysql.hbi
  + contrib/hbpgsql/hbpgsql.hbi
  + contrib/hbssl/hbssl.hbi
  + contrib/rddads/rddads.hbi
  + contrib/sddfb/sddfb.hbi
  + contrib/sddmy/sddmy.hbi
  + contrib/sddoci/sddoci.hbi
  + contrib/sddpg/sddpg.hbi
    + Added local import library generation hbmk2 make files
      to each contrib which requires it.

  * config/postinst.prg
    + Changed to use contrib local implib creation hbmk2 scripts to
      create import libraries.
    - Deleted mingw exception for ocilib to use the static library.
      Static lib is definitely better, but if someone would like to
      use it, it should be done locally/manually, just like for any
      other dependency.
    + Solved firebird implib creation hack/exception in contrib
      local .hbi file.
    ; These fix the last "centralization" issues in Harbour make system.
      Still remains documentation problem (everything is in INSTALL),
      and *nix .deb/.rpm centralized solution for contrib dependencies
      and contrib names in general.

  * utils/hbmk2/hbmk2.prg
    + Combining multiple -o options (one with name, one with directory)
      is now supported in -hbimplib mode. This makes it work like in
      other existing modes.
    ! Fixes regarding -o option combining and dir inheritance.
      (beware of regressions here)

  * contrib/gtalleg/gtalleg.hbc
    * Changed to use import library on Windows with an unmodified name
      (containing version).

  * src/rtl/hbcom.c
    ! Fixed one non-ANSI comment.

  * ChangeLog
    + Added two changes missed from prev entry:
      * utils/hbmk2/hbmk2.prg
        + In -hbimplib mode any options are automatically passed to
          import library creation command (so -iflag option is not
          absultely needed)
        - Deleted -mkimplibms option now replaces by generic -iflag
          solution.
    ! Stripped UTF-8 char from a recent entry.
2010-05-12 15:02:01 +00:00
Viktor Szakats
2fed94876d 2010-05-12 09:20 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* utils/hbmk2/hbmk2.pt_BR.po
  * utils/hbmk2/hbmk2.hu_HU.po
  * utils/hbmk2/hbmk2.prg
    - Deleted 'experimental' flags from all features.
    * Finalized import lib creation feature in hbmk2.
      + Added -hbimplib mode switch (this replaces -mkimplib= option)
      + Input source files (.dlls) now should be passed to
        hbmk2 as simple source filenames (without option prefix).
      + Multiple input source files are now supported.
      + Added -iflag= option to pass flags to import library creation
        command directly.
      * Changed so that target import library name/dir can now be
        specified using -o option (like in other modes).
      + Filenames/dirs are now all normalized.
      + Some warnings are now only shown in -info mode.
      ; F.e.:
          'hbmk2 -hbimplib mydll1 mydll2 -omydir -iflag={bcc}-a'
        This also means that a simple .hbp file can be created
        to solve the import library needs for a given dependency.

  * config/postinst.prg
    * Adapted to use new import library creation hbmk2 commands.

  * src/rtl/hbcom.c
    ! Fixed minor typo.
2010-05-12 07:24:05 +00:00
Przemyslaw Czerpak
9d13008427 2010-05-12 02:26 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/external/minizip/ioapi.h
    ! fixed FreeBSD and HAIKU builds

  * harbour/src/rtl/fserr.c
    * added translation for EPERM

  * harbour/include/Makefile
  + harbour/include/hbapicom.h
  * harbour/src/rtl/Makefile
  + harbour/src/rtl/hbcom.c
    + added Harbour multiplatform serial port C API (hb_com*() functions).
      implemented code for *nixes, MS-Windows and OS2. DOS is not supported
      yet. Please make test on different platforms.
    ; few notes about this code:
      termios (*nix) based builds:
         - reading LSR is not supported
         - duration in break signal is fixed (at least 0.25 seconds, and not
           more that 0.5 seconds)
         - DTR/DSR hardware flow control is not supported
         - setting error character is not supported
         - discard card is supported only on few platforms
         - checking input/output flow state is not supported
         - if some platforms do not support some termio extensions then
           compile time warnings TODO_* should be generated.
      MS-Windows builds:
         - discard card is not supported
      OS2 builds:
         - checking for input flow state is not supported
         - discard card is not supported
      In all builds not all RS-232 hardware flags/state are available.
      OS2 build supports most of them,

      This code needs to be extensively tested. I wrote it without any
      serious tests. Especially OS2 builds should be verified by OS2
      users. I wrote this port using only documentation which OS2 API
      available in the Internet.

      DOS is not supported yet though it's possible to compile termio code
      for *nixes with DJGPP. Anyhow it would be very nice if we can add
      our own DOS serial port code. I would like to ask if any of you
      has low level serial port code in C for DOS (i.e. used with Clipper)
      and can send it to us so we can use it with Harbour. I have my
      own serial port library for Clipper but it's written in assembler
      and it's much wider then sth what we need so it cannot be easy
      adopted for Harbour.

  * harbour/contrib/hbct/Makefile
  + harbour/contrib/hbct/ctcom1.c
  + harbour/contrib/hbct/ctcom.ch
  + harbour/contrib/hbct/ctcom2.c
    + added CT3 compatible COM_*() functions.
    + added CT3 compatible XMOBLOCK(), XMOCHECK(), ZEROINSERT() and
      ZEROREMOVE() functions.
    + added new CT COM function:
         COM_DEVNAME( <nComPort> [, <cNewName> ] ) -> <cPrevName>
      which can be used to specify device name for given port in modern
      systems which do not give direct hardware access for the process.
    ; few notes about CT3 COM_*() functions in Harbour.
      In COM_OPEN() only 1-st parameter is significant, input/output buffer
      sizes and trap mode parameters are ignored. In modern OS-es such
      functionality is controlled by OS and usually buffered read/write
      is always enabled. The sizes of IO buffers can be used only as
      suggested IO buffer size for OS in some systems. It's possible that
      these additional parameters will be used in DOS builds in the future.
      COM_READ() does not support 2-nd parameter <lNoDelete>. It can be
      implemented but because we do not have direct access to OS buffers
      then we will have to emulate it ourselves what is rather inefficient.
      Anyhow I can implement it if users think it's critical.
      In COM_CRC() I fixed few CT3 bugs so it's not bug compatible with CT3,
      i.e. it works correctly for 8 bit and smaller polynomials instead of
      returning 0 or supports much larger polynomials up to 64bits.
      For 16/17 bit polynomials it gives the same results as CT3 so for most
      common usage it should be binary compatible with CT3.
      In ZEROREMOVE() I fixed decoding some wrong CCITT strings which does
      not have trailing 0 so it returns empty string "" for such corrupted
      data. If someone needs original CT3 behavior for some broken code then
      is can be enabled by HB_CT3_ZEROREMOVE_BUG macro.

      I haven't implemented few functions.
      COM_GETIO(), COM_SETIO(), COM_GETIRQ(), COM_SETIRQ() are not portable
      and can be implemented only for really few platforms, i.e. for DOS
      when/if we add support for serial ports to Harbour DOS builds.
      Similar functionality for all other platforms gives our new function
      COM_DEVNAME().
      COM_KEY(), COM_SKEY() and COM_EVENT() are also not implemented.
      To make them well we should add support for asynchronous events to HVM
      and such extension is still unavailable. Some simulation can be
      implemented using idle tasks but this can be done also by final
      Harbour users so I decided to not make it.

      Please test it - I've never used CT3 COM_*() API with Clipper.

  * harbour/contrib/hbct/dummy.c
    * removed dummy CT3 serial communication functions
    ; such files with dummy functions introduces very serious problems for
      user code because they do not respect original module granularity
      effectively breaking overloading only chosen functions so it breaks
      also some real Clipper code.
2010-05-12 00:27:04 +00:00
Viktor Szakats
d1fa4c942b 2010-05-08 09:32 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* include/hbsetup.h
    + Added detection for HB_OS_IPHONE. Name tentative,
      completely experimental.
    + Minor addition to ARM CPU detection.

  * src/common/hbprintf.c
    ! Config modfl() accordingly when HB_OS_IPHONE is detected.
2010-05-08 07:33:14 +00:00
Przemyslaw Czerpak
fec547542c 2010-05-06 21:33 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/rtl/Makefile
  * harbour/src/rtl/hbznet.c
  + harbour/src/rtl/hbinetz.c
    * moved HB_INETCOMPRESS() function to separate file

  * harbour/include/hbexprb.c
    ! fixed my very bad C&P typo (2010-02-04 19:14 UTC+0100) which caused
      that dummy value was left on HVM stack after post decrementation used
      as statement. This dummy value could break construciton like FOR EACH,
      WITH OBJECT, BEGIN SEQUENCE. Here is self contain example which can
      be used to exploit the problem:
            proc main()
               begin sequence
                  p()
               end sequence
            return
            proc p()
               local nTemp := 0
               begin sequence
                  nTemp--
               end sequence
            return
      Many thanks to Heinz Bergen who reduced his code to similar small
      example.
2010-05-06 19:34:02 +00:00
Przemyslaw Czerpak
5605b7cb1f 2010-05-06 16:08 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/rtl/hbsocket.c
    ! enabled domain and protocol constant values translation in
      SunOS builds

  * harbour/src/rtl/hbznet.c
    ! fixed to return error on some wrong input data for which ZLIB
      permanently returns Z_STREAM_END - thanks to Aleksander Czajczynski
      for the information and self contain example.
2010-05-06 14:08:53 +00:00
Viktor Szakats
481875eefd 2010-05-06 08:32 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* src/common/hbgete.c
    ! Fixed hb_setenv() to not crash on NULL szName parameter.
    ! Fixed hb_setenv() to handle NULL szValue parameter on 
      win platforms.
2010-05-06 06:33:13 +00:00
Przemyslaw Czerpak
0c0fd9a15e 2010-05-05 09:58 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/compiler/gencc.c
    ! fixed possible HVM stack corruption by dummy (alias->field) code
      which does not store the result. The problem was exploited by
      code generated for -gc3 mode only. Here is self contain example:
            proc main()
            begin sequence with {||break()}
               p()
            end sequence
            proc p()
               (test->name)
               (test->name)
            return
2010-05-05 07:58:32 +00:00
Viktor Szakats
2f5d29aff5 2010-05-05 08:02 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* src/rtl/achoice.prg
    ! Added patch by Jerry Finuliar to fine tune cursor
      positioning behavior.

  * contrib/hbmysql/mysql.c
    + Added MYSQL_REAL_ESCAPE_STRING() function.
    ! Fixed some types to be in sync with actual MYSQL implementation
      (int -> unsigned int, int -> unsigned long)
      in MYSQL_ESCAPE_STRING(), MYSQL_ESCAPE_STRING_FROM_FILE(),
      MYSQL_FETCH_ROW() functions.

  * utils/hbmk2/hbmk2.prg
    + Added comment on dbfnsx lib availability in xhb.
2010-05-05 06:06:26 +00:00
Przemyslaw Czerpak
0ae64fb856 2010-05-04 14:10 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/vm/thread.c
    ! fixed problem with OS2 GCC builds reported by David.
2010-05-04 12:10:25 +00:00
Viktor Szakats
6e251b1d4b 2010-05-02 12:29 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* config/darwin/libs.mk
    ! Fixed to include MacPorts and Fink lib paths only if 
      they exist. This fixes potential warnings with latest 
      release of clang.

  * config/linux/libs.mk
    ! Minor in comment.

  * src/rtl/achoice.prg
    ! Added patch by Jerry Finuliar to refix dbu menu hang.
2010-05-02 10:30:19 +00:00
Przemyslaw Czerpak
bfd863c576 2010-04-30 11:39 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/rtl/hbznet.c
    ! fixed stupid typo which caused that hb_znetFlush() in encrypted
      buffers never returned 0 (the returned value was increased by 4)

  * harbour/contrib/hbnetio/netio.h
  * harbour/contrib/hbnetio/netiocli.c
  * harbour/contrib/hbnetio/netiosrv.c
  * harbour/contrib/hbnetio/readme.txt
    + added support for communication streams/channels which allow to
      send asynchronously data from server to client.
      The following client side functions had been added:
         NETIO_OPENDATASTREAM( <cStreamFuncName> [, <params,...>] )
            -> <nStreamID>
         NETIO_OPENITEMSTREAM( <cStreamFuncName> [, <params,...>] )
            -> <nStreamID>
         NETIO_CLOSESTREAM( <nStreamID>, [<cServer>], [<nPort>] )
            -> <lOK>
         NETIO_GETDATA( <nStreamID>, [<cServer>], [<nPort>] )
            -> <aData> | <cData> | NIL
      The following server side functions had been added:
         NETIO_SRVSTATUS( <pConnectionSocket> [, <nStreamID>] )
            -> <nStatus>
         NETIO_SRVSENDITEM( <pConnectionSocket>, <nStreamID>, <xData> )
            -> <lSent>
         NETIO_SRVSENDDATA( <pConnectionSocket>, <nStreamID>, <cData> )
            -> <lSent>
    + added RT errors to the netio client code. They should help to early
      detect any communication problems
    ! disabled hb_socketSetNoDelay() in client and server code.
      I enabled it for some local tests and by mistake committed to SVN
      and I didn't noticed it. It could cause serious problems in some cases
      i.e. with slow WiFi or WAN connections.

      Warning: server signature changed due to extensions in protocol.
               both client and server side has to be updated and use
               current SVN code.

  + harbour/contrib/hbnetio/tests/netiot03.prg
    + added demonstration/test code for alternative RDD IO API, RPC and
      asynchronous data streams in HBNETIO
2010-04-30 09:39:25 +00:00
Przemyslaw Czerpak
ee2d00f19a 2010-04-29 10:51 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/vm/strapi.c
  * harbour/include/hbapistr.h
    + added new C function hb_wstrnlen()

  * harbour/include/hbdefs.h
  * harbour/src/common/hbwin.c
    ! fixed possible buffer overflows in hb_mb*() and hb_wc*() functions
    * removed danger hb_mb*() and hb_wc*() functions which were wrongly
      used in core code and corresponding HB_TCHAR_*() macros
    + added hb_mbntowccpy() function and HB_TCHAR_COPYTO() macro
      it always sets trailing 0 after passed buffer just like hb_strncpy()
    + added hb_wcntombcpy() function and HB_TCHAR_COPYFROM() macro
      it always sets trailing 0 after passed buffer just like hb_strncpy()

  * harbour/src/rtl/gtclip.c
    ! fixed wrongly calculated size of string extracted from clipboard
      (when unicode string was in clipboard then number of unicode characters
      were used instead of number of multibyte ones)
    ! added protection against possible memory corruption if some external
      process sets clipboard text without trailing 0
    * changed hb_gt_winapi_[sg]etClipboard() functions parameters to use
      PHB_ITEM as buffer
    Question to windows users: different Win GTs use different encoding
    for the clipboard buffer. Maybe you want to normalize it?

  * harbour/src/vm/cmdarg.c
  * harbour/src/vm/extrap.c
  * harbour/src/common/hbgete.c
  * harbour/src/common/hbffind.c
  * harbour/src/common/hbtrace.c
  * harbour/src/rtl/gtwin/gtwin.c
  * harbour/src/rtl/fstemp.c
  * harbour/src/rtl/filesys.c
  * harbour/src/rtl/gtgui/gtgui.c
  * harbour/src/rtl/gtwvt/gtwvt.c
  * harbour/include/hbgtcore.h
  * harbour/include/hbapistr.h
  * harbour/include/hbwmain.c
  * harbour/contrib/gtwvg/gtwvg.c
  * harbour/contrib/gtwvg/wvggui.c
  * harbour/contrib/gtwvg/wvgcuig.c
  * harbour/contrib/gtwvg/wvgutils.c
  * harbour/contrib/gtwvg/wvgcore.c
  * harbour/contrib/gtwvg/wvgwing.c
  * harbour/examples/gtwvw/gtwvw.c
    ! fixed possible buffer overflows and GPF traps due to wrongly used
      HB_TCHAR_*() macros and/or corresponding hb_mb*()/hb_wc*() functions
      Seems that some problems were potentially exploited even in non UNICODE
      builds.
2010-04-29 08:51:41 +00:00
Viktor Szakats
ed13cecdf3 2010-04-29 09:18 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* src/common/hbver.c
    + Now able to distinguish between XP x64 and Server 2003.
    + Now able to distinguish between Server 2003 and Server 2003 R2
      (borrowed from Peter Rees/xhb, with typo fixed)
    (please test on these platforms)

  * ChangeLog
    + Marked some changes as [DONE].
2010-04-29 07:25:47 +00:00
Viktor Szakats
4d1a8cc1a3 2010-04-28 19:05 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* src/rtl/Makefile
  * src/rtl/getsys.prg
  + src/rtl/getsyshb.prg
    ! Moved HB_GETREADVAR() to separate source file.
    ! HB_GETREADVAR() fixed to use HB_ASCIIUPPER() like
      TGETLIST():GETREADVAR() instead of UPPER().

  * src/rtl/tgetlist.prg
    % TGETLIST():GETREADVAR() now can use HB_GETREADVAR()
      instead of duplicating the code locally.

  * INSTALL
    + Added sort of "disclaimer" note to HB_BUILD_IMPLIB option.

  * include/hbextern.ch
    + Added missing TBREADER().
2010-04-28 17:06:52 +00:00
Przemyslaw Czerpak
1dc08dcbf2 2010-04-28 01:39 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/rtl/cdpapi.c
  * harbour/src/rtl/cdpapihb.c
    + added support for UTF8 Harbour pseudo CP in UTF8 and U16
      conversion functions
2010-04-27 23:39:18 +00:00
Przemyslaw Czerpak
13989a2521 2010-04-26 11:44 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/common/hbtrace.c
    ! fixed potential GPF/memory corruption due to direct passing formatted
      string as format to syslog() function. Please remember to never create
      code like 'printf( str );' if str can contain printf escape characters
      because it may cause any unpredictable results. Always use
      'printf( "%s", str);' in such context.
      BTW It's one of the most common bug used by hackers in buffer/stack
      overflow attacks, i.e. using str with %n conversion specifier.
    % eliminated unnecessary buffer conversion in *nix builds
2010-04-26 09:44:13 +00:00
Viktor Szakats
c6bef5ae3e 2010-04-24 13:35 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* src/rtl/achoice.prg
    ! REVERTED: Fixed typo in ACHOICE() K_UP handling, which caused a
      bogus line to appear below the bottom when the height of the
      achoice area was only one line. Pls verify me for regressions.
      [ It did cause regression. So now the original bug is present
      again. ]
      TOFIX: ---
             #include "inkey.ch"
             CLS
             hb_keyPut( K_DOWN )
             hb_keyPut( K_UP ) /* bogus '2' appears out of the area here. */
             AChoice( 0, 0, 0, 0, { "1", "2" } )
             ---
2010-04-24 11:37:11 +00:00
Przemyslaw Czerpak
51ed6c3ebe 2010-04-23 00:49 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/common/hbtrace.c
    ! fixed potential GPF due to reused va_list parameter which can be
      exploited with some calling conventions
    ! fixed potential memory leak due to missing va_end() for va_list
      parameter initialized with va_copy() which can be exploited with
      some calling conventions
    * simplified a little bit the code by eliminating repeated code in
      Windows and *nix #if branches.

  * harbour/src/rdd/dbf1.c
    ! added protection against GPF when user creates DBF table with
      total record size greater then 65535 bytes.
      Now RTE CREATE 1021 is generated in such case.
    ! added protection against potential GPF when corrupted DBF file
      is open and total field length in DBF header file gives more then
      65535. RTE CORRUPT 1012 is generated in such case.
2010-04-22 22:49:11 +00:00
Viktor Szakats
d308cb7a32 2010-04-22 18:32 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* src/common/hbtrace.c
    ! Fixed another typo in recent modifications.
      [Too bad syslog() is missing from watcom. Makes testing
      much painful.]
      Please test.
2010-04-22 16:33:17 +00:00
Viktor Szakats
232f888088 2010-04-22 17:31 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* src/common/hbtrace.c
    ! Deleted just added va_copy() trick from non-*nix OSes.
2010-04-22 15:31:52 +00:00
Viktor Szakats
62ba429c07 2010-04-22 13:48 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* src/common/hbtrace.c
  * INSTALL
    + Added trace output support to syslog() for *nix systems
      (except watcom builds).
      It's enabled by HB_TR_SYSOUT=yes envvar, which now
      supercedes previous HB_TR_WINOUT setting.
      Windows users pls change HB_TR_WINOUT to HB_TR_SYSOUT.
    ! Fixed potential problem in HB_TR_WINOUT code, where
      the same vararg holder variable was used multiple
      times. On *nix this caused GPF. The safest is to make
      a copy of it for each usage.

  * contrib/hbwin/hbwin.ch
  * contrib/hbwin/Makefile
  + contrib/hbwin/tests/testevnt.prg
  + contrib/hbwin/win_evnt.c
    + Added function to add a new event to the Windows event log:
        WIN_REPORTEVENT( [<cServerName]>, <cEventLog>,
                             <nType>, [<nCategory>], [<nEventID>],
                                <cString> | <acString>, [<cRawData>] ) -> <lSuccess>

  * contrib/hbwin/win_prn2.c
    ! Fixed wce warning.

  * utils/hbmk2/examples/contribf.hbc
  * utils/hbmk2/examples/contrib.hbc
    + Added minizip lib.
2010-04-22 11:49:30 +00:00
Viktor Szakats
971d0da25c 2010-04-22 03:37 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* src/rtl/achoice.prg
    ! Fixed to be more compatible with Clipper when passed wrong
      parameter types to ACHOICE(). (replacing DEFAULT TO usage
      with foolproof method)
    ! ACHOCIE() fixed to default dimensions to 0,0,0,0 like in Clipper.
    ! Fixed typo in ACHOICE() K_UP handling, which caused a bogus line
      to appear below the bottom when the height of the achoice area
      was only one line. Pls verify me for regressions.
    ! ACHOICE() fixed to immediately return zero (and position
      cursor) when wrong type or empty array was received as
      value array.
    ! Fixed minor inefficiency caused by wrongly calculated display
      area width when rightmost colums was out of screen in ACHOICE()
      call.

  * src/rtl/alert.prg
    + HB_ALERT() extended to support all variables types (not
      just strings) when an array is passed as first parameter:
        F.e.: HB_ALERT( { "hello", 100, .T. } )
    % Optimized out two local variables along the way.
2010-04-22 01:38:57 +00:00
Viktor Szakats
2db36d6772 2010-04-19 14:03 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* src/rtl/hbini.prg
    ! Added proper type checks for all accepted parameters to avoid
      (sometimes obscure) RTEs when passing wrong parameters.

  * src/rtl/profiler.prg
  * src/rtl/hbi18n2.prg
    + Added proper type checks instead of "DEFAULT .. TO' method.
2010-04-19 12:03:51 +00:00
Viktor Szakats
369c110efe 2010-04-16 11:27 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* src/rtl/gtclip.c
    + Added parenthesis.

  * contrib/hbmisc/hbeditc.c
    ! Pacified uninit variable MSVC warning.
2010-04-16 09:27:32 +00:00