Commit Graph

498 Commits

Author SHA1 Message Date
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
Przemyslaw Czerpak
fe77740954 2010-04-15 08:16 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/rtl/gtos2/gtos2.c
    * small cleanup in TONE code

  * harbour/include/hbvmpub.h
    * removed old and unused macros

  * harbour/external/jpeg/Makefile
    ! added Missing HAVE_PROTOTYPES declaration

  * harbour/src/rtl/hbzlib.c
  * harbour/contrib/hbbz2/hbbz2.c
    * added redundant initialization to pacify MSVC warnings

  * harbour/external/pcre/pcrefinf.c
    * casting to pacify warning

  * harbour/src/macro/macro.yyc
  * harbour/src/macro/macro.yyh
  * harbour/src/compiler/harbour.yyc
  * harbour/src/compiler/harbour.yyh
    * regenerated using bison with some additional patches to pacify
      MSVC warning
2010-04-15 06:16:46 +00:00
Przemyslaw Czerpak
e9b8808971 2010-04-09 14:19 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/macro/macro.y
  * harbour/src/compiler/harbour.y
    * minor cleanup
2010-04-09 12:19:12 +00:00
Viktor Szakats
690dd4c849 2010-04-08 17:10 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* contrib/hbxbp/xbpgra.prg
    ! GraGetRGBIntensity() simplified, optimized and fix to work.

      I'm not XPP user, but returning permanent zero was
      probably not the goal. Pls test it.

  * src/rtl/hbhex.c
    * Minor formatting.

  * contrib/hbssl/Makefile
  * contrib/hbssl/hbssls/Makefile
    - Disabled IDEA subsystem wrappers. IDEA is patented yet, so 
      usually it's better to build OpenSSL without it.
2010-04-08 15:16:16 +00:00
Viktor Szakats
c2c8d35b42 2010-04-07 14:30 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* src/rtl/gtwin/gtwin.c
  * src/rtl/gtwvt/gtwvt.c
    + Added support for setting mouse position.

  * src/rtl/mouseapi.c
    ! Fixed typos in trace messages.
2010-04-07 12:30:36 +00:00
Viktor Szakats
b7d73ce343 2010-04-07 14:05 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* src/rtl/fstemp.c
    ! Fixed HB_DIRTEMP() (and low-level equivalent) returning
      error/empty-string on *nix targets due to typo.
2010-04-07 12:06:04 +00:00
Xavi
29af435a3f 2010-04-06 11:15 UTC+0200 Xavi (jarabal/at/gmail.com)
* harbour/src/rtl/gtwin/gtwin.c
    % Reverted back the changes.
2010-04-06 09:16:30 +00:00
Xavi
39d9df33fc 2010-04-06 04:00 UTC+0200 Xavi (jarabal/at/gmail.com)
* harbour/src/rtl/gtwin/gtwin.c
    % Minor corrections to latest fixing.
2010-04-06 02:01:49 +00:00
Xavi
e2ca2f59aa 2010-04-06 03:00 UTC+0200 Xavi (jarabal/at/gmail.com)
* harbour/src/rtl/gtwin/gtwin.c
    ! Fixed CTRL_CLOSE_EVENT according to present project goals.
2010-04-06 01:01:13 +00:00
Przemyslaw Czerpak
c5aecc9eea 2010-04-03 12:36 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/rdd/wacore.c
    ! fixed GPF when unknown (never used in application code) alias is
      passed to hb_dbRequest() function - thanks to Shum for the info and
      code example
2010-04-03 10:36:27 +00:00
Viktor Szakats
9efec46787 2010-04-02 09:40 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
+ config/ren_sfn.prg
  - external/bzip2/cnv_hb2o.bat
  - external/bzip2/cnv_o2hb.bat
  + external/bzip2/ren_sfn.txt
  - external/libhpdf/cnv_o2hb.bat
  - external/libhpdf/cnv_hb2o.bat
  + external/libhpdf/ren_sfn.txt
  - external/pcre/cnv_o2hb.bat
  - external/pcre/cnv_hb2o.bat
  + external/pcre/ren_sfn.txt
    + Replaced .bat method for converting long filenames to
      short ones to a .prg script and simple text input file.
      Also much of the logic is automatized.

  * src/rtl/gtwvt/gtwvt.c
    * Minor in old comment.

  * INSTALL
    - Deleted no more relevant restriction with HB_BUILD_PKG.

  * contrib/hbwin/wapi_winuser.c
  * contrib/hbwin/hbwin.ch
    + Added WAPI_SETWINDOWPOS() + relevant constants.
    + Added WIN_WS_* constants.
    + Added WAPI_ISICONIC(), WAPI_ISZOOMED().

  * contrib/hbwin/tests/testax.prg
    ! Fixed to compile without warning.
    * Using hbwin.ch.
2010-04-02 07:41:59 +00:00
Przemyslaw Czerpak
9ec9384fa5 2010-04-01 16:44 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/rtl/gtwin/gtwin.c
  * harbour/src/rtl/gtwvt/gtwvt.h
  * harbour/src/rtl/gtwvt/gtwvt.c
    * modified to use in UNICODE builds current HVM CP if user
      has not set display CP using HB_SETTERMCP() or HB_SETDISPCP()

  * harbour/src/rtl/gtwvt/gtwvt.h
  * harbour/src/rtl/gtwvt/gtwvt.c
    * eliminated most of HB_TCHAR_*() translations
    % optimized setting SelectCopy menu item name to avoid unnecessary
      memory allocation and to use hb_str*() API
    ! allow to set window title before displaying the window
      (HB_GTI_WINTITLE)
    % use hb_str*() API for window title setting
    ! removed redundant window title setting just after creating new window
    ! pass pointer to HB_GTWVT structure as lpParam in CreateWindow()
      function to allow WM_CREATE message processing and early window
      handle registration

  * harbour/tests/cpinfo.prg
    * added HB_SETTERMCP() setting

  * harbour/examples/gtwvw/tests/cbtest1.prg
  * harbour/examples/gtwvw/tests/cbtest6.prg
  * harbour/examples/gtwvw/tests/ebtest7.prg
    * small cleanup to compile with Harbour
2010-04-01 14:44:19 +00:00
Xavi
150f18ee67 2010-03-30 05:17 UTC+0200 Xavi (jarabal/at/gmail.com)
* harbour/src/rtl/teditor.prg
    ! Fixed typo in K_CTRL_PGDN.

  * harbour/src/rtl/memoedit.prg
    % Adjust nLineLength, SCOREBOAR to present as Clipper.

      PROCEDURE MAIN
         CLEAR SCREEN
         @ 1,0 TO 5,11
         SET SCOREBOARD ON
         MemoEdit( "12345678901", 2, 1, 4, 10, .T. )
      RETURN
2010-03-30 03:18:17 +00:00
Przemyslaw Czerpak
a6153e5087 2010-03-29 22:42 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbthread.h
  * harbour/src/vm/thread.c
    % use thread local memory to optimize _hb_gettid()
    % use _hb_gettid() instead of _gettid() in OS2 GCC builds

  * harbour/src/vm/hvm.c
    % minor speed improvement

  * harbour/src/vm/memvars.c
    ! cleaned local vars detaching code
2010-03-29 20:43:03 +00:00
Viktor Szakats
41f05c984e 2010-03-27 13:24 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* contrib/hbmisc/Makefile
  * contrib/hbmisc/blinker.prg
  + contrib/hbmisc/blinker.ch
    ! Fixed BLICPUREL().
    + Added blinker.ch header. This contains some stuff missing
      from original Blinker and some runtime mockup/emulation for
      following linker commands:
         BLINKER EXECUTABLE SERIAL <"String"> /* Harbour needs double quotes around the string */
         BLINKER DEMONSTRATION DATE <YYYYDDMM>
         BLINKER DEMONSTRATION MINUTES <minute>

  * src/rtl/tgetlist.prg
    * Minor formatting.
2010-03-27 12:27:08 +00:00
Xavi
383c7d0ff0 2010-03-26 05:05 UTC+0100 Xavi (jarabal/at/gmail.com)
* harbour/src/rtl/teditor.prg
    ! Fixing MemoEdit K_PGDN / K_PGUP calculation.
2010-03-26 04:05:40 +00:00
Przemyslaw Czerpak
9eda0eec26 2010-03-26 00:44 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/vm/hvmall.c
    ! fixed typo in last commit
2010-03-25 23:44:10 +00:00
Przemyslaw Czerpak
8b5b161083 2010-03-26 00:12 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/vm/hvmall.c
  * harbour/include/hbstack.h
    * reactivated for tests inline ASM code which can be used to access
      HVM stack pointer in MT HVM builds. It can be enabled in 32bit
      desktop windows Harbour builds by setting HB_ASM_TLS build time macro.
2010-03-25 23:12:28 +00:00