Commit Graph

223 Commits

Author SHA1 Message Date
Przemyslaw Czerpak
45232282b9 2010-01-08 18:28 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/vm/dynsym.c
    + accept also function name (not only symbol index) as parameter
      of __DYNSISFUN()

  * harbour/src/rtl/hbznet.c
    * pacified BCC warnings
2010-01-08 17:28:54 +00:00
Przemyslaw Czerpak
25de114b61 2010-01-08 14:00 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/contrib/hbnetio/netiocli.c
    * pacified BCC warning

  * harbour/include/hbznet.h
  * harbour/src/rtl/hbznet.c
    + added support for blowfish encryption in HB_ZNETSTREAM
    + added C function
         void hb_znetEncryptKey( PHB_ZNETSTREAM pStream,
                                 const void * keydata, int keylen );
      which enables data encryption in HB_ZNETSTREAM
    + added 4-th parameter to <cPass> to .PRG HB_INETCOMPRESS() function:
         HB_INETCOMPRESS( <pSocket>, [<nCompressionLevel>], [<nStrategy>],
                          [<cPass>] )
         <cPass> is initial value to create blowfish key.
      Please test.
2010-01-08 13:00:37 +00:00
Viktor Szakats
23ac606bcc 2010-01-08 01:02 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* src/vm/dlmalloc.c
    ! Fixed two potentially uninitialized variables, signaled by MSVC.

  * src/common/hbgete.c
    + Changed to use native SetEnvironmentVariable() API instead of
      forced ANSI one.

  * src/common/hbwince.c
  * include/hbwince.h
    % Deleted unused ANSI Windows API stubs.
    + Added empty SetEnvironmentVariable() stub for WinCE
      builds where it's missing.
    * Reconfigured these stubs:
        SetCurrentDirectory()
        GetCurrentDirectory()
        GetComputerName()
        GetUserName()

  * config/win/global.mk
    * Comment updated.

  * config/win/msvc.mk
    + Added -nxcompat and -dynamicbase to .dll link command.
      (I'm unsure what -dynamicbase is good for in a .dll, but it's
      accepted and set)
    ! Fixed to add -nxcompat/-dynamicbase for MSVC 2008 and upper.
      (it's also possible to use it with MSVS 2005 SP1 though, but
      build won't detect this case)
2010-01-08 00:14:19 +00:00
Viktor Szakats
dd570d683c 2010-01-07 21:10 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* INSTALL
    + Added free SVN book link.

  * src/vm/extrap.c
    % Marked exception filter callback as 'static'
    ; TOCHECK: Please verify that OS/2 still works this way.

  * src/rtl/oemansi.c
    ! Fixed two tabs.

  * src/rtl/gtwvt/gtwvt.c
  * contrib/gtwvg/gtwvg.c
  * contrib/rddads/adsfunc.c
    ! Fixed to not use unsafe/ANSI CharToOemBuffA() API.
    ; Please review me.

  * config/win/mingw.mk
    + Added information about MinGW alternatives for MSVC
      security features. Unfortunately they need Cygwin
      binary plus some depend on MinGW host platform
      and/or version.

  * include/hbwince.h
  * src/common/hbwince.c
    - Deleted CharToOemBuffA(), OemToCharBuffA(). No longer
      needed by Harbour.
    ; TODO: Delete rest of not anymore used ANSI WinAPI
            functions. Now Harbour never uses ANSI
            WinAPI functions in UNICODE mode.

  * config/win/global.mk
    - Deleted reference to CharToOemBuffA(), OemToCharBuffA().
2010-01-07 20:59:38 +00:00
Viktor Szakats
472c3592ed 2010-01-07 18:16 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* src/vm/extrap.c
  * contrib/hbwin/win_prn3.c
    + Added TOFIXes for unsafe function usage:
       IsBadWritePtr(), IsBadReadPtr(), lstrlen(), lstrcpy(), lstrcat()
    ; QUESTION: Any idea how to fix that? win_prn3.c can
                probably be fixed with some good general coding
                idea.

  * contrib/hbwin/wce_smsc.c
    ! Fixed to not use unsafe CRTL functions.

  * src/rtl/oemansi.c
    ! Rewritten HB_OEMTOANSI() and HB_ANSITOOEM() to not use
      Windows API functions marked as unsafe. New version is a bit
      slower but won't mark Harbour apps as unsafe in an audit.
    ; Please test and review.

  * utils/hbmk2/hbmk2.prg
  * config/wce/msvcarm.mk
  * config/win/msvc.mk
    % Deleted -Gs MSVC option. Testing with MSVC 2008 I've found
      this have no effect on x86 builds, and it makes x64 builds
      slighly less efficient by forcing stack checks in each function
      call. This seems to contradict MSDN, which doesn't suggest such
      difference between x86 and x64:
         http://msdn.microsoft.com/en-us/library/9598wk25.aspx
    % Deleted -GS- MSVC option used for wce targets for MSVC >= 8.00.
      '-GS-' will disable stack cookies (on by default), thus trading
      app size/speed for security. Maybe this is preferred for wce
      users, but in Harbour I'd rather opt to pass this decision to users
      for all targets.
         Enable with: HB_USER_CFLAGS=-GS- / -cflag={allmsvc}-GS-
      MSDN:
         http://msdn.microsoft.com/en-us/library/8dbf701c.aspx
2010-01-07 17:17:24 +00:00
Przemyslaw Czerpak
4e02eab09f 2010-01-07 14:07 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/rtl/hbznet.c
  * harbour/include/hbznet.h
    * added new optional parameter to hb_znetWrite() function which allow
      to catch result of last hb_socketSend() operation
    * removed automatic flushing from hb_znetWrite() function,
      it should help in implementing more efficient C code using
      hb_znet*() functions

  * harbour/src/rtl/hbinet.c
    * flush HB_ZNETSTREAM output after write operation
    % small optimization in internal inet error setting
2010-01-07 13:07:54 +00:00
Przemyslaw Czerpak
0d4b626818 2010-01-06 17:15 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/rtl/hbznet.c
    ! do not use DEF_MEM_LEVEL to avoid potential problems when <zutil.h>
      is not available

  * harbour/contrib/hbnetio/netio.h
  * harbour/contrib/hbnetio/netiocli.c
  * harbour/contrib/hbnetio/netiosrv.c
    + implemented RPC in HBNETIO protocol
    + added the following client functions:
      check if function/procedure exists on the server side:
         NETIO_PROCEXISTS( <cProcName> ) -> <lExists>
      execute function/procedure on server the side,
      do not wait for confirmation:
         NETIO_PROCEXEC( <cProcName> [, <params,...>] ) -> <lSent>
      execute function/procedure on the server side and wait for
      confirmation:
         NETIO_PROCEXECW( <cProcName> [, <params,...>] ) -> <lExecuted>
      execute function on the server side and wait for its return value:
         NETIO_FUNCEXEC( <cFuncName> [, <params,...>] ) -> <xFuncRetVal>
      All above functions use default connection set by NETIO_CONNECT()
      for RPCs but it's also possible to specify server address and port
      in <cProcName>/<cFuncName> just like in <cFileName> parameter in RDD
      functions, i.e.:
         NETIO_PROCEXISTS( "192.168.0.1:10005:MYFUNC" )
    + added new server side functions to enable/disable/check RPC support:
         NETIO_RPC( <pListenSocket> | <pConnectionSocket> [, <lEnable> ] )
               -> <lEnabled>
      if RPC is enabled for listen socket then connection sockets inherit
      this setting.
    + added 4-th parameter <lRPC> to NETIO_LISTEN() function. .T. enable
      RPC support in returned listen socket which is later inherited by
      connection sockets
    * changed protocol version ID - current NETIO clients and servers
      cannot be used with old code

  * harbour/contrib/hbnetio/utils/netiosrv.prg
    * added option to enable RPC support in NETIO server

   If you want to make some test then you can execute netiosrv with
   non empty 4-th parameter as server, i.e.:
      ./netiosrv "" "" "" 1
   and try this code as client:

      proc main()
         // pass server address to netio_connect() for non localhost tests
         ? "NETIO_CONNECT():", netio_connect()
         ?
         ? "DATE() function is supported:", netio_procexists( "DATE" )
         ? "QOUT() function is supported:", netio_procexists( "DATE" )
         ? "HB_DATETIME() function is supported:", ;
           netio_procexists( "HB_DATETIME" )
         ?
         ? netio_procexec( "QOUT", repl( "=", 50 ) )
         ? netio_procexec( "QOUT", "This is RPC TEST", date(), hb_datetime() )
         ? netio_procexecw( "QOUT", repl( "=", 50 ) )
         ? 
         ? "SERVER DATE:", netio_funcexec( "DATE" )
         ? "SERVER TIME:", netio_funcexec( "TIME" )
         ? "SERVER DATETIME:", netio_funcexec( "HB_DATETIME" )
         ?
         ? netio_funcexec( "upper", "hello world !!!" )
      return

   Please remember that only functions linked with server are available.
   If you want to enabled all core functions in netiosrv then please
   uncomment this line in netiosrv.prg:
      REQUEST __HB_EXTERN__


   Have a fun with a new toy. I hope that many Harbour user will find it
   very interesting. Please only be careful !!!. This feature allows to
   execute remotely _ANY_ code on the server side. _NEVER_ leave open ports
   with RPC support for untrusted access.
2010-01-06 16:16:22 +00:00
Przemyslaw Czerpak
86c9511f2f 2010-01-06 07:27 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/rtl/gtwin/gtwin.c
    + added support for HB_GTI_ISUNICODE

  * harbour/include/hbapifs.h
    * added missing 'extern' in some declarations

  * harbour/include/hbzlib.ch
    + added HB_ZLIB_STRATEGY_* constants
    + added HB_ZLIB_COMPRESSION_DISABLE

  * harbour/include/Makefile
  + harbour/include/hbznet.h
  * harbour/include/hbextern.ch
  * harbour/src/rtl/Makefile
  * harbour/src/rtl/hbinet.c
  + harbour/src/rtl/hbznet.c
    + added support for ZLIB compression in stream sockets.
    + added .prg function:
         HB_INETCOMPRESS( <pSocket>, [<nCompressionLevel>], [<nStrategy>] )
      which enables ZLIB compression for given HB_INET*() socket.
      <pSocket> is a socket created by one of HB_INET*() functions
      <nCompressionLevel> is compression factor between 1 (fastest) and
                          9 (best) (see HB_ZLIB_COMPRESSION_*)
                          0 (none) disable compression on output data
                          but decompression is still working.
      <nStrategy> is used to tune compression algorithm,
                  see HB_ZLIB_STRATEGY_*
      The compression must be enabled on both connection sides, i.e.
      on the server side:
         conn := hb_inetAccept( sock )
         hb_inetCompress( conn )
      and on the client side:
         sock := hb_inetConnect( cServer, nPort )
         hb_inetCompress( sock )
      in the same moment but it's not necessary to enable it at the
      beginning of connection. It can be done later, i.e. when both
      sides agree to enable connection using some custom protocol.
      The compression has effect only on stream connections, i.e.
      TCP and it's ignored in datagram connections like UDP.
      This function can be executed more then once changing the compression
      parameters but it causes that all data in readahead decompression
      buffer is discarded. When called with HB_ZLIB_COMPRESSION_DISABLE
      as <nCompressionLevel> then support for stream compression is removed
      and sockets works again in raw mode.
      The compression level and strategy do not have to be the same on both
      connection sides. Each side can chose the best settings for data it's
      going to send.

      This code was written in a way which allows to easy implement
      alternative compression methods or other extensions like encryption
      in existing HB_INET*() sockets also by non core code. The public C
      functions declared in hbznet.h allows to use this extension with raw
      harbour sockets two.
2010-01-06 06:27:38 +00:00
Viktor Szakats
1cf66dcc83 2010-01-05 18:48 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* utils/hbmk2/hbmk2.pt_BR.po
  * utils/hbmk2/hbmk2.hu_HU.po
  * utils/hbmk2/hbmk2.prg
    + Added support for C++ input files. Now C++ files will be compiled
      in a separate pass where native C++ compiler is used, which
      means that C++ compilation mode is now enforced by using .cpp
      extension. This also means that it's now possible to build
      mixed mode projects with both C and C++ input files.
      Enable with option: -hbcppmm (cmdline) or hbcppmm=yes (in .hbc files)
         NOTE: Suggestions for better names are welcome.
      In general, this feature makes -cpp option unnecessary, its
      only purpose now is to override default mode.
    ; Please test.

  * utils/hbmk2/hbmk2.prg
    - Deleted support for link-related macros in C compilation phase,
      these weren't used anymore inside current hbmk2, so it seems safe,
      but it's possible nevertheless that it will cause regressions in
      some exotic use cases.

  * utils/hbmk2/hbmk2.prg
    ! Fixed parsing -warn option on the commandline and .hbm/.hbp files.
      [TOMERGE 2.0]

  * contrib/hbqt/generator/hbmk.hbm
    ! Deleted xhb lib. It's not required and was probably added for
      "outdebug" stuff.

  * contrib/hbqt/hbqt.hbc
  * contrib/hbqt/hbqts.hbc
  * contrib/gtqtc/gtqtcs.hbc
  * contrib/gtqtc/gtqtc.hbc
    + Added hbcppmm=yes option. This will force C++ memory allocation
      functions to be overridden by Harbour mm functions.

  * src/vm/fm.c
    - Deleted C++ memory allocation functions. This feature now
      lives inside hbmk2, and it now doesn't require whole Harbour
      to be built in C++ mode.

  * contrib/hbqt/*
    * Regenerated.
2010-01-05 18:04:12 +00:00
Przemyslaw Czerpak
c02e6f1616 2010-01-05 14:03 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/contrib/hbct/video.c
    % use hb_gtColorToN() function instead of own code to decode Clipper
      color in VGAPALETTE()
    ! added protection against possible transfer buffer overflow in
      SETFONT() function
    ! return -2 when SETFONT() is not implemented

    TODO: clean these functions, add support for other DOS compilers,
          add some missing functions and redirect few of them like
          VGAPALETTE() to hb_gtInfo() in non DOS builds

  * harbour/src/rtl/hbgtcore.c
    ! fixed missing ';' => CHR( 13 ) translation in __KEYBOARD() function
      [TOMERGE 2.0]
2010-01-05 13:03:37 +00:00
Przemyslaw Czerpak
6e527f2ed1 2010-01-05 02:39 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/common/hbtrace.c
    ! fixed casting for C++ mode in my recent modification
2010-01-05 01:39:48 +00:00
Przemyslaw Czerpak
70b39211bb 2010-01-04 19:01 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/ChangeLog
    ! fixed typo in my recent ChangeLog entry

  * harbour/src/vm/fm.c
    % minor simplification

  * harbour/src/common/hbtrace.c
    ! fixed possible recursive call reported by Istvan
2010-01-04 18:02:29 +00:00
Przemyslaw Czerpak
c8e91323cd 2010-01-04 13:10 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/rtl/gtxwc/gtxwc.c
    ! cleaned a little bit hack with euro sign support
    + added optional support for input respecting locale settings
      To enable it it's necessary to recompile GTXWC with HB_XWC_USE_LOCALE
      macro. It can be done globally using
         export UH_USER_CFLAGS=-DHB_XWC_USE_LOCALE
      and recompiling Harbour core code.
      When enabled GTXWC initialize locale at startup (LC_CTYPE only) what
      enable national keyboard layout support in default input context
      (XLookupString()). Current Harbour core code does not use any
      <ctype.h> functions so enabling locale should not effect user
      national settings in HVM.
      Please test.
2010-01-04 12:11:08 +00:00
Viktor Szakats
cf4a9008cc 2010-01-03 01:30 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* contrib/hbqt/tests/demoqt.prg
    ! Possible fix for leaks in this .prg code.
      Added these two calls before exit:
         QT_EVENTS_DESTROY()
         QT_SLOTS_DESTROY()

  * contrib/hbqt/filelist.mk
  - contrib/hbqt/hbqt_events.h
  + contrib/hbqt/hbqt_hbevents.h
  - contrib/hbqt/hbqt_events.cpp
  + contrib/hbqt/hbqt_hbevents.cpp
  - contrib/hbqt/hbqt_slots.h
  + contrib/hbqt/hbqt_hbslots.h
  - contrib/hbqt/hbqt_slots.cpp
  + contrib/hbqt/hbqt_hbslots.cpp
    * Renamed Events class to HBEvents.
    * Renamed Slots class to HBSlots.

  * src/vm/fm.c
    % Deleted unnecessary guard added in prev commit.
2010-01-03 00:31:09 +00:00
Viktor Szakats
2d3bb88d50 2010-01-03 00:28 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* src/vm/fm.c
    + Overriding some additional C++ memory allocation operators
      to cover the full set required by QT, according to this document:
         http://doc.trolltech.com/4.5/qt-performance.html#alternative-memory-allocation
    ; Please report if it causes problem in other areas, also 
      retest HBQT memory allocation after change.
2010-01-02 23:29:42 +00:00
Viktor Szakats
7806656acb 2010-01-03 00:11 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* src/vm/fm.c
    ! Fixed to not display "Warning, memory allocated but not released" 
      message for non-fmstat builds.
    ! Fixed to display "Memory allocated but not released: none" message
      (without 'warning' sign) when built with fmstat and there was no 
      unrelease blocks.
2010-01-02 23:14:10 +00:00
Istvan Bisz
4d4aeeb407 2009-01-02 21:59 UTC+0100 Istvan Bisz (istvan.bisz/at/t-online.hu)
* /src/vm/fm.c
    * Not adequate defitions of the subsequent CRT functions for the MinGW implemetations:
      #ifndef USE_DL_PREFIX
      #define dlcalloc               calloc 
      #define dlfree                 free
      #define dlmalloc               malloc
      ...
      #endif /* USE_DL_PREFIX */
      The malloc/free CRT functions should'nt be redefined in this way.
    * The mesage: "Warning, memory allocated but not released..." is sent on request (//INFO cmdarg).
2010-01-02 21:41:36 +00:00
Przemyslaw Czerpak
cbce7fc1f4 2009-12-31 13:24 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/codepage/Makefile
    ! added missing cphriso.c
2009-12-31 12:24:29 +00:00
Przemyslaw Czerpak
e4ec9850aa 2009-12-31 12:43 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbextcdp.ch
  * harbour/include/hbextlng.ch
  * harbour/src/lang/Makefile
  - harbour/src/lang/msghr437.c
  + harbour/src/lang/msghr646.c
  - harbour/src/codepage/cphr437.c
  + harbour/src/codepage/cphr646.c
    * renamed HR437 CP and LANG modules to HR646 (CROSCII / ISO-646-YU)

  * harbour/include/hbextcdp.ch
  * harbour/include/hbextlng.ch
  * harbour/src/codepage/Makefile
  - harbour/src/lang/msgsl437.c
  + harbour/src/lang/msgsl646.c
  - harbour/src/codepage/cpsl437.c
  + harbour/src/codepage/cpsl646.c
    * renamed CL437 CP and LANG modules to CL646 (SLOSCII / ISO-646-YU)

  * harbour/src/lang/msghriso.c
    ! fixed language ID

  + harbour/src/codepage/cphr646.c
  * harbour/src/codepage/cphr852.c
  * harbour/src/codepage/cphrwin.c
  + harbour/src/codepage/cpsl646.c
  * harbour/src/codepage/cpsliso.c
  * harbour/src/codepage/cpslwin.c
  * harbour/src/codepage/cpsl852.c
    ! changed the collation order so X and Y characters are sorted before Z
      It's CL5.2 ntxcro.obj compatible behavior. Now HR646 and SL646 Harbour
      CPs can be used to share data with Clipper application linked with
      ntxcro.obj.

  * harbour/include/hbextcdp.ch
  * harbour/src/codepage/Makefile
  + harbour/src/codepage/cphriso.c
    + added HRISO (ISO-8859-2) Harbour CP module

   Please test all these modifications.
   [TOMERGE 2.0]
2009-12-31 11:44:26 +00:00
Przemyslaw Czerpak
8075ce48bf 2009-12-31 03:17 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbapicdp.h
  * harbour/src/codepage/Makefile
  - harbour/src/codepage/ucyuscii.c
  + harbour/src/codepage/uc646_yu.c
  * harbour/src/codepage/cphr437.c
  * harbour/src/codepage/cpsl437.c
    * renamed internal unicode table name YUSCII->ISO-646-YU
2009-12-31 02:18:15 +00:00
Przemyslaw Czerpak
bbd5bcb2e2 2009-12-30 21:22 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/nortl/nortl.c
    ! added hb_xtraced()

  * harbour/src/common/hbstr.c
    * do not fill unused part of buffer with '\0' bytes in
      hb_strncpy(), hb_strncpyLower(), hb_strncpyUpper(),
      hb_strncpyUpperTrim(), hb_strncpyTrim()

  * harbour/src/common/hbtrace.c
    % small optimization in building Unicode OutputDebugString() message

  * harbour/src/codepage/Makefile
  * harbour/include/hbapicdp.h
  + harbour/src/codepage/ucyuscii.c
    + added YUSCII unicode table

  * harbour/src/codepage/cphr437.c
  * harbour/src/codepage/cpsl437.c
    ! fixed unicode table used in HR437 and SL437 Harbour CPs.
      It's not CP-437 but YUSCII
    - removed my old note "TOFIX: is it really CP-437?"
    TOFIX: change Harbour names of above CPs, i.e. to HRYU and SLYU

  * harbour/src/codepage/uckam.c
    * removed TOFIX note I forgot to remove when committed correct
      Kamenicky Unicode table.

  * harbour/src/codepage/uckoi8.c
  * harbour/src/codepage/uc857.c
  * harbour/src/codepage/uc1250.c
  * harbour/src/codepage/uc1254.c
  * harbour/src/codepage/uc866.c
  * harbour/src/codepage/uc850.c
  * harbour/src/codepage/uc1251.c
  * harbour/src/codepage/ucmaz.c
  * harbour/src/codepage/uc1252.c
  * harbour/src/codepage/uc8859_1.c
  * harbour/src/codepage/uc88591b.c
  * harbour/src/codepage/uc852.c
  * harbour/src/codepage/uc737.c
  * harbour/src/codepage/uc1253.c
  * harbour/src/codepage/uc1257.c
  * harbour/src/codepage/uc8859_2.c
    * updated some of my old copyright messages
2009-12-30 20:23:35 +00:00
Przemyslaw Czerpak
1b181e9773 2009-12-29 14:34 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbapi.h
  * harbour/src/common/hbprintf.c
    + added new function 'int hb_printf_params( const char * format )' which
      returns number of parameters necessary for format string

  * harbour/src/common/hbtrace.c
    * added protection against recursive calls when number of parameters
      used by HB_TRACE message us bigger then 16 and fm.c module was compiled
      with HB_TR_DEBUG macro
    % use the same number of characters for unicode and byte string buffers
    % use common memory area (union) for unicode and byte messages to reduce
      C stack usage
    Please test these modifications in real MS-Windows systems.
2009-12-29 13:34:19 +00:00
Viktor Szakats
3f05b7156c 2009-12-28 20:48 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* src/vm/fm.c
  * include/hbapi.h
    + Added hb_xtraced(). Please check it might be wrong.

  * src/common/hbtrace.c
    - Deleted hack to disable winout to avoid recursive calls.
    + Added TOFIX to avoid recursive calls with some clever 
      detection on error case (hb_xtracd() && no_of_formatt_strings > 16)
      I didn't implement it, pls do so if interested.
    ! Fixed MultiByteToWideChar sizeof() to HB_SIZEOFARRAY().
2009-12-28 19:49:43 +00:00
Viktor Szakats
36a5b42ac2 2009-12-28 10:11 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* src/common/hbtrace.c
    * Deleted TOFIX for va_end(). It's not required (and wasn't 
      ever required there) since there is no va_start() call in 
      hb_tracelog_() function at all.
2009-12-28 09:14:41 +00:00
Viktor Szakats
af310bf016 2009-12-28 10:01 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* src/common/hbtrace.c
    ! Fixed some leftover causing error on non-win.
    % Replaces \r\n with \n in printf() calls.
      [TOMERGE 2.0]

  * config/win/bcc.mk
    + Added -CP437 bcc option as default, so that it fixes compilation
      on windows systems are setup to use certain (f.e. far east)
      multibytes codepages as default non-Unicode CP.
2009-12-28 09:04:16 +00:00
Viktor Szakats
4b58831a0a 2009-12-28 02:36 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* src/common/hbtrace.c
    ! Readded hack to disable reentrancy for win specific trace logic
      until we clear up the issue with some Harbour API calls used from
      win specific trace code are calling back to the trace engine.
2009-12-28 01:38:22 +00:00
Viktor Szakats
97b26b2ed3 2009-12-28 01:56 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* src/common/hbtrace.c
    ! Fixed to not call hb_xgrab() via HB_TRACE_CONVTO() causing
      infinite recursion into trace engine. This replaces previously
      committed trick to avoid the same thing in a generic manner.
      It was a bug in previous Windows-support addition, which is now fixed.
    * Adding \r\n for OutputDebugString() text to make WinDbg display
      look readable, this time by simply extending printf() mask.
    - Deleted space trimming from OutputDebugString() passed text.
      Such issues should be fixed in high level code, it's not trace
      engine's job to make cosmetic corrections on trace text content.
    ; Tested with both WinDbg and DbgView.
      [TOMERGE 2.0]

    ; TOFIX:
         va_end() has been commented for all platforms, although
         it's required by all documentation I could verify.
         If this causes problems for specific platforms/compilers,
         we should only add this hack for those targets, and only
         when HB_TR_WINOUT is enabled.
         Now every non-Windows and Windows non-HB_TR_WINOUT
         setups are not complying with CRTL documentation.
         Could someone help here?
2009-12-28 01:04:24 +00:00
Viktor Szakats
0447b6eaa2 2009-12-27 22:44 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* src/common/hbtrace.c
    ! Formatting.
    ! Fixed to use HB_ISSPACE().
    ; NOTE/TOFIX: Anyhow I think last patch should be reverted to not manipulate
                  passed by user string before passing it to Windows.
                  Plus current anti-reentrancy logic should be changed to something
                  robust, as current solution drops trace messages which is a very
                  dangerous thing to do if we want to rely on trace output for
                  debugging. It's not clear what "stack overflow events" are.

  * doc/codestyl.txt
    ! Fixed link. Thanks Vailton.
      [TOMERGE 2.0]
2009-12-27 21:46:57 +00:00
Istvan Bisz
e7a95d507c 2009-12-27 16:30 UTC+0100 Istvan Bisz (istvan.bisz/at/t-online.hu)
* harbour/src/common/hbtrace.c
    * early va_end( ap ) elimination, to avoid access violation generation in a subsequent hb_vsnprintf
    * fix nested HB_TRACE calls handlig to avoid stack overflow events
    * normalized debug info sending to OutputDebugString with ending CR/LF/NUL to ensure a correct view in windbg.
2009-12-27 16:24:45 +00:00
Przemyslaw Czerpak
6b2f6bd054 2009-12-26 14:12 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/Makefile
  * harbour/include/hbmath.h
  + harbour/include/hbmather.h
  * harbour/include/hbsetup.h
  * harbour/include/hbapi.h
    * moved math error handler definitions and settings separate header file
    * moved hb_random_num() declaration from hbmath.h to hbapi.h

    After above modification hbmath file should be use only by code which
    wants to use math functions declared usually in math.h

  + harbour/include/hbfloat.h
    + added header file with test macros for floating point numbers
      this file should be included before any other files

  * harbour/src/vm/hvmall.c
  * harbour/src/vm/itemapi.c
  * harbour/src/common/hbprintf.c
  * harbour/src/rtl/math.c
    * use new macros from hbfloat.h

  * harbour/src/rtl/math.c
    + include "hbmather.h"

  * harbour/src/rtl/hbrandom.c
  * harbour/src/rdd/dbf1.c
  * harbour/contrib/xhb/hboutdbg.c
    - removed not longer necessary include "hbmath.h"

  * harbour/contrib/hbct/ctmath.h
    - do not include <float.h> and <limits.h>

  * harbour/contrib/hbct/ct.h
    - do not include "hbmath.h" and "ctmath.h"

  * harbour/contrib/hbct/ctmath.c
  * harbour/contrib/hbct/exponent.c
  * harbour/contrib/hbct/ctc.c
    + include "ctmath.h"

  * harbour/contrib/hbct/trig.c
  * harbour/contrib/hbct/finan.c
  * harbour/contrib/hbct/ctmath2.c
    + include "ctmath.h"
    + include "hbmather.h"

  * harbour/contrib/hbct/num1.c
    + include "ctmath.h"
    + include <float.h>

  * harbour/include/hbinit.h
  * harbour/src/rtl/hbsocket.c
    * added patches from Tamas - thanks

  * harbour/bin/hb-func.sh
  * harbour/harbour.spec
    + create /etc/ld.so.conf.d/harbour.conf with Harbour shared lib directory
      if /etc/ld.so.conf.d directory exists and user has sufficient write
      permission or install package is created.
      This modification allows to install Harbour anywhere and in modern
      distros using /etc/ld.so.conf.d/ harbour shared libraries will be
      always available for all programs

   [TOMERGE 2.0]
2009-12-26 13:13:02 +00:00
Przemyslaw Czerpak
541341709b 2009-12-23 12:31 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbmath.h
    ! enable HB_MATH_ERRNO in all *unix builds not only in GCC ones

  * harbour/src/vm/itemapi.c
    ! use finite() to check for valid double values - looks that SunCC
      does not report iDODO warnings so we were not informed about the
      problem

  * harbour/include/hbdefs.h
  * harbour/src/common/hbprintf.c
    % use also _STDC_C99 macro not only _ISOC99_SOURCE to detect C99 mode
      and do not reduce such detection to GCC

   [TOMERGE 2.0]
2009-12-23 11:31:15 +00:00
Przemyslaw Czerpak
bb05aaa0e0 2009-12-23 05:36 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/rtl/gtwin/gtwin.c
    ! applied a little bit modified the patch from Jacek Potempa for
      setmode() in GTWIN - many thanks. Please test.
2009-12-23 04:37:00 +00:00
Viktor Szakats
5274553789 2009-12-22 23:47 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* src/vm/thread.c
  * src/vm/dynlibhb.c
  * src/common/hbgete.c
  * src/common/hbffind.c
  * src/common/hbfsapi.c
  * src/rtl/gtstd/gtstd.c
  * src/rtl/hbsocket.c
  * src/rtl/filesys.c
  * src/rtl/gtpca/gtpca.c
  * src/rtl/hbproces.c
    * 'int TODO' -> 'int iTODO' patch from Tamas Tevesz. Thank you.
2009-12-22 22:48:08 +00:00
Przemyslaw Czerpak
36a54f98fc 2009-12-22 11:05 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/config/bsd/gcc.mk
    + added c i s to ar parameters

  * harbour/src/vm/estack.c
    * formatting

  * harbour/include/hbtypes.h
    % replaced #ifdef ... / #undef ... with simple #undef
2009-12-22 10:06:40 +00:00
Viktor Szakats
a5a304efc2 2009-12-22 03:47 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* src/rtl/gtwvt/gtwvt.c
    % Deleted unnecessary cast.

  * utils/hbmk2/hbmk2.pt_BR.po
    + Uploaded new version received from Vailton Renato. Thanks!

  * utils/hbmk2/hbmk2.hu_HU.po
    + Updated.
    + Added some new translations.

  * utils/hbmk2/hbmk2.prg
    * Minor formatting.
    ! Fixed typo in one of the displayed texts.

  + examples/gtwvw
  + examples/gtwvw/Makefile
  + examples/gtwvw/hbgtwvw.h
  + examples/gtwvw/hbole.h
  + examples/gtwvw/gtwvw.c
  + examples/gtwvw/wvwdraw.c
  + examples/gtwvw/wvwmenu.c
  + examples/gtwvw/wvwstbar.c
  + examples/gtwvw/wvwcheck.c
  + examples/gtwvw/wvwfuncs.c
  + examples/gtwvw/wvwpush.c
  + examples/gtwvw/wvwedit.c
  + examples/gtwvw/wvwtbar.c
  + examples/gtwvw/gtwvw.hbc
  + examples/gtwvw/gtwvw.hbp
  + examples/gtwvw/readme.txt
  + examples/gtwvw/tests
  + examples/gtwvw/tests/wvwtest9.rc
  + examples/gtwvw/tests/prog1.prg
  + examples/gtwvw/tests/prog2.prg
  + examples/gtwvw/tests/dia_excl.ico
  + examples/gtwvw/tests/drawimg.prg
  + examples/gtwvw/tests/vouch1.bmp
  + examples/gtwvw/tests/wvwmouse.prg
  + examples/gtwvw/tests/wvwtest9.hbp
  + examples/gtwvw/tests/hbmk.hbm
  + examples/gtwvw/tests/cbtest1.prg
  + examples/gtwvw/tests/def2.bmp
  + examples/gtwvw/tests/maincoor.prg
  + examples/gtwvw/tests/wvt2wvw.ch
  + examples/gtwvw/tests/cbtest6.prg
  + examples/gtwvw/tests/wvwtest9.prg
  + examples/gtwvw/tests/ebtest7.prg
  + examples/gtwvw/tests/vouch1.gif
  + examples/gtwvw/tests/maximize.prg
  + examples/gtwvw/tests/readme.txt
  + examples/gtwvw/tests/wvwtest9.xml
  + examples/gtwvw/tests/inpfocus.prg
  + examples/gtwvw/tests/prog0.prg
  + examples/gtwvw/docs
  + examples/gtwvw/docs/funclist.txt
  + examples/gtwvw/docs/gtwvw.txt
  + examples/gtwvw/docs/whatsnew.txt
    + Added rudimentary port of GTWVW to Harbour.
      (The source was current xhb CVS repository.)
      The port is very very (very) far from anything else
      than can be found in Harbour, this port involved making
      all the minimum required steps to build and link under
      Harbour, plus some extra cleanups.
    ! Lots of cleanups and fixes.
    + Added Harbour make files (both GNU make and hbmk2)
    + Cleaned tests to avoid multiple symbols and much simpler
      interdependencies.
    ! Removed extra test.dbf and what32 dependency.
    ; TOFIX: Due to public symbol collisions, this GTWVW it's
             probably not possible to use it with gtwin lib.
    ; NOTE: GTWVW is limited to non-UNICODE, non-C++, 32-bit
            Windows (no WinCE) builds, and for a clean compiler
            I had to suppress Harbour standard warning levels.
            Anyway, not basic tests program seems to work,
            although I didn't dig into them very deeply.
            We will see if this contrib turns out to be useful
            or not, and we can decide to drop it or maybe
            moving it to contrib once it has been brought up
            to Harbour standards. Although the code is huge,
            so don't expect to happen this very soon.
2009-12-22 02:50:24 +00:00
Przemyslaw Czerpak
a30828ee08 2009-12-21 23:29 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbapi.h
  * harbour/src/vm/garbage.c
    - removed function hb_gcRefDec()
    * functions hb_gcRefInc() and hb_gcRefFree() moved to public API
      After recent modifications in GC which introduced user defined
      mark functions it's reasonable to make these function public to
      extend functionality and give GC full interface to user defined
      blocks.
2009-12-21 22:29:58 +00:00
Przemyslaw Czerpak
bd6abe80e1 2009-12-21 22:18 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/rdd/wafunc.c
  * harbour/contrib/rddsql/hbrddsql.h
  * harbour/contrib/rddsql/sqlbase.c
    ! casting fod C++ builds

  * harbour/contrib/hbcairo/paths.c
    ! fixed very bad typo which probably cause GPF in function
      CAIRO_GET_CURRENT_POINT()
2009-12-21 21:19:44 +00:00
Przemyslaw Czerpak
3428da4554 2009-12-21 20:33 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/rtl/sha2.h
    * use '__int64' instead of 'long long' in MSC builds - older MSC versions
      do not support 'long long'

  * harbour/utils/hbmk2/hbmk2.prg
    * use cleaner method proposed by Viktor for adding 'clib3r' to linked
      library list in DOS OpenWatcom builds.
2009-12-21 19:34:25 +00:00
Przemyslaw Czerpak
9ffccdcdf0 2009-12-21 15:46 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/vm/Makefile
    * enable HB_HVM_ALL=yes in OpenWatcom C builds - it does not cause such
      huge compile time overheads as in C++ mode

  * harbour/src/vm/dynlibhb.c
    * generate TODO warning also in DOS builds when HB_LIBLOAD()/HB_LIBFREE()
      is unsupported

  * harbour/include/hbwince.h
    ! fixed recent modification
2009-12-21 14:46:41 +00:00
Przemyslaw Czerpak
f26d65e22a 2009-12-21 14:38 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbwince.h
    + added hack for missing GetEnvironmentVariable?() declarations in
      POCC header files for WinCE.

  * harbour/src/common/hbwince.c
    * minor simplification

  * harbour/src/pp/pplib.c
    * workaround for MSVC6 errors
2009-12-21 13:38:40 +00:00
Przemyslaw Czerpak
bdfb6a9e93 2009-12-21 08:21 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbgtcore.h
  * harbour/include/hbapigt.h
    * moved declaration of hb_gtSetDefault() from hbgtcore.h to hbapigt.h

  * harbour/include/hbapi.h
  * harbour/src/vm/hvm.c
    + added new function hb_vmSetDefaultGT()

  * harbour/bin/hb-func.sh
  * harbour/utils/hbmk2/hbmk2.prg
    * use hb_vmSetDefaultGT() to set default GT
    * removed extern declarations for functions defined in hbapi.h

  * harbour/src/vm/dynlibhb.c
    + added support for HB_LIBLOAD()/HB_LIBFREE() in DJGPP 2.04 builds

  * harbour/config/global.mk
    * use 8.3 names for harbour dynamic libraries in all DOS builds

  * harbour/config/dos/djgpp.mk
    + added support for dynamic libraries (DXE) in DJGPP builds.
      DXE is sth similar to DLL in Windows and can be used with
      DJGPP 2.04. I had to make some modifications in DXE header
      files to make it working so it will not work in default DJGPP
      installation. I'll document these modifications in the future.

  * harbour/config/dos/watcom.mk
    * enable creating of harbour dynamic libraries only when HB_BUILD_DLL
      is explictly set by user to 'yes'. In DOS DJGPP and OpenWatcom builds
      DLLs support is not functional yet.

  * harbour/config/dyn.mk
    * added an option to create harbour dynamic libraries from static
      ones instead of .o|.obj files. It's necessary for DXE3GEN which
      internally calls LD which has some limited on maximum size of passed
      parameters.
      TODO: make HB_DYN_LIBS definition common for dyn.mk and lib.mk
2009-12-21 07:22:14 +00:00
Przemyslaw Czerpak
e7cb8c45a1 2009-12-20 22:12 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/Makefile
  + harbour/include/hbtrace.ch
  * harbour/include/hbtrace.h
  * harbour/src/rtl/trace.c
  * harbour/src/common/hbtrace.c
    ! fixed hb_tracelevel() C function to change trace filter instead of
      last message level. It also fixed .prg function HB_TRACELEVEL().
    + added new C function:
         void hb_tracelog( int level, const char * file, int line,
                           const char * proc, const char * fmt, ... )
    + added new .prg functions:
         hb_traceLogLevel( <nNewLevel> ) -> <nPrevLevel>
         hb_traceLog( <xMsgItems,...> ) // generate message at
                                        // hb_traceLogLevel()
         hb_traceLogAt( <nLevel>, <msg,...> )
    + added support for HB_TRACE() messages in .prg code with the same
      functionality as in C code:
         HB_TRACE( <level>, <msg,...> )
      HB_TRACE() code if filtered at compile time by HB_TR_LEVEL_* macros
      i.e. -DHB_TR_LEVEL_INFO used as harbour compiler parameter
      and at runtime by HB_TR_LEVEL=<level> envvar (set HB_TR_LEVEL=DEBUG)
      or by hb_traceLevel( <nLevel> ) function (hb_traceLevel( HB_TR_DEBUG ))
      Default compile time and runtime trace level for C and .prg code
      is HB_TR_WARNING.
2009-12-20 21:12:54 +00:00
Viktor Szakats
60fbf7ba1d 2009-12-20 05:01 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* src/vm/dynlibhb.c
  * src/rtl/hbinet.c
  * src/compiler/hbcmplib.c
  * contrib/hbpgsql/postgres.c
    ! Suppressing MSVC C mode warnings by ( void * ) casting 
      in hb_xfree() calls.
2009-12-20 04:01:34 +00:00
Przemyslaw Czerpak
04c7d04111 2009-12-19 16:52 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/vm/thread.c
    * added hb_threadOnceInit() to .prg function list

  * harbour/include/hbinit.h
    * use HB_STATIC_STARTUP as default initialization method of all
      C++ compilers
2009-12-19 15:53:07 +00:00
Viktor Szakats
5907e1d204 2009-12-19 13:34 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* src/rtl/sha2.c
    ! Added trick to make it compile with Pelles C 6.00.6.
      Without this trick Pelles C compiler exits with internal error.

  * doc/whatsnew.txt
    + Added NOTE about Pelles C 6.
2009-12-19 12:34:45 +00:00
Viktor Szakats
233edaf32f 2009-12-19 12:46 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* src/codepage/Makefile
  + src/codepage/cpel437.c
  - src/codepage/cpgr437.c
  * include/hbextcdp.ch
    * Renamed GR437 codepage to EL437. EL is the ISO language code for Greek.
2009-12-19 11:47:47 +00:00
Przemyslaw Czerpak
d92d3a6116 2009-12-19 11:22 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/rtl/gtwin/gtwin.c
    ! applied Xavi's patch fixing CTRL+C error handler setting in newly
      allocated consoles
2009-12-19 10:22:38 +00:00
Viktor Szakats
28c5ea5d32 2009-12-18 12:54 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* src/rtl/gtxwc/gtxwc.c
    * Prefixed static vars with s_.
2009-12-18 11:55:16 +00:00
Przemyslaw Czerpak
5a20374203 2009-12-18 11:20 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/rtl/gtxwc/gtxwc.c
    + accept "TEXT" selections is better forms cannot be found
    * removed hack not necessary after recent code cleanup
2009-12-18 10:21:06 +00:00
Przemyslaw Czerpak
ab6d1e7a9f 2009-12-18 04:08 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/rtl/gtxwc/gtxwc.c
    ! fixed yet another one memory leak
2009-12-18 03:08:30 +00:00