Commit Graph

2347 Commits

Author SHA1 Message Date
Przemyslaw Czerpak
1afd3ffcb6 2009-12-12 13:52 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbwinuni.h
    + added new macro HB_ITEMGETSTR()

  * harbour/src/rtl/gtwin/gtwin.c
    * modified to use new UNICODE API instead of HB_TCHAR_*()

  * harbour/contrib/hbwin/win_misc.c
    * rewritten WIN_GETCOMMANDLINEPARAM()
      New version does not use old HB_TCHAR_*() API and respect multiple
      quoting by "" (i.e. .\"myapp"li"cation".exe)

      TOFIX: WIN_ANSITOWIDE() and WIN_WIDETOANSI() are wrong and have
             to be fixed. Please remember that number of character
             after conversion to/from UNICODE can be different then
             original number of chars, i.e. multibyte characters
             can be replaced by single Unicode character or one Unicode
             character may use few bytes representation.
2009-12-12 12:52:56 +00:00
Viktor Szakats
79186f75a5 2009-12-12 02:43 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* src/vm/strapi.c
    % Minor optimization (using cdp variable instead of repeated hb_vmCDP() calls.)

  * include/hbwinuni.h
    + Added HB_ITEMPUTSTR[LEN]() macros.
    + Added HB_STRUNSHARE() macro.
    ! Fixed typos in HB_ARRAYSETSTRLEN() macro values.

  * contrib/hbwin/win_prn2.c
    + Using new HB_ITEMPUTSTR() macro instead of HB_TCHAR*().

  * contrib/hbwin/win_misc.c
    ! WIN_RUNDETACHED(): Fixed to guarantee writable buffer in second 
      parameter of CreateProcess(). I've choosen to always pass a writable
      buffer, although MS requires this only for UNICODE mode.

  * contrib/hbwin/wapi_commctrl.c
    + Using new UNICODE parameter passing macros instead of HB_TCHAR*() ones.
    ! Fixed return values of WAPI_IMAGELIST_GETIMAGEINFO() to be empty
      string instead of unset (NIL) in case of error.

  + contrib/hbqt/filelist.mk
    ! Missed from previous commit.

  * contrib/hbwin/win_regc.c
    * Removed trailing spaces (realized I used a temp instance
      of 64-bit Far Manager for the last couple of days)
      (there will be more)
2009-12-12 02:07:01 +00:00
Przemyslaw Czerpak
51a5487cb8 2009-12-12 01:42 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/vm/strapi.c
  * harbour/include/hbapistr.h
    + added new functions:
         hb_itemPutStr(), hb_itemPutStrUTF8(), hb_itemPutStrU16(),
         hb_arrayGetStr(), hb_arrayGetStrUTF8(), hb_arrayGetStrU16(),
         hb_arraySetStrLen(), hb_arraySetStrLenUTF8(), hb_arraySetStrLenU16(),
         hb_arraySetStr(), hb_arraySetStrUTF8(), hb_arraySetStrU16(),

  * harbour/include/hbwinuni.h
    * removed unnecessary and danger casting in UNICODE version of
      HB_RETSTR(), HB_RETSTRLEN(), HB_STORSTR() and HB_STORSTRLEN() macros
    * modify HB_ARRAYSETSTR() and HB_ARRAYSETSTRLEN() macros to use new
      STR API functions

  * harbour/external/Makefile
    * modified the order of compiled libraries for better performance in
      parallel compilation (-j<N>)
2009-12-12 00:43:01 +00:00
Przemyslaw Czerpak
cb65540d4e 2009-12-11 20:42 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/vm/strapi.c
  * harbour/include/hbapistr.h
    + added new functions to operate on Harbour wide character strings:
         ULONG hb_wstrlen( const HB_WCHAR * szText );
         HB_WCHAR * hb_wstrdup( const HB_WCHAR * szText );
         HB_WCHAR * hb_wstrndup( const HB_WCHAR * szText, ULONG ulLen );
         int hb_wstrcmp( const HB_WCHAR * s1, const HB_WCHAR * s2 );
         int hb_wstrncmp( const HB_WCHAR * s1,
                          const HB_WCHAR * s2, ULONG count );
    + added new functions to convert NULL pointers to empty strings:
         const char * hb_strnull( const char * str );
         const HB_WCHAR * hb_wstrnull( const HB_WCHAR * str );
    + added new functions to convert string buffer returned by Harbour
      string functions to writable state:
         char * hb_strunshare( void ** phStr,
                               const char * pStr, ULONG ulLen );
         HB_WCHAR * hb_wstrunshare( void ** phStr,
                                    const HB_WCHAR * pStr, ULONG ulLen );
  * harbour/include/hbwinuni.h
    ! fixed HB_PARSTRDEF() to return empty string instead of NULL
    ! fixed HB_ARRAYSETSTR() to accept NULL as string parameter
2009-12-11 19:42:40 +00:00
Viktor Szakats
fbafd6c259 2009-12-11 18:17 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* include/hbwinuni.h
    + Added HB_ARRAYSETSTR*(). Based on Przemek's post.

  * contrib/hbwin/wce_simc.c
  * contrib/hbwin/wce_smsc.c
  * contrib/hbwin/win_prn1.c
  * contrib/hbwin/win_prn2.c
  * contrib/hbwin/win_regc.c
    + Using new UNICODE parameter passing macros instead of HB_TCHAR*() ones.
    * Minor rework WIN_TEXTOUT() and WIN_GETTEXTSIZE() to not use hb_parclen() 
      and protect some more against wrong length parameter.
    ; TOFIX: HB_ARRAYSETSTR() usage crashes (tested in non-UNICODE with testprn3)
             I didn't want to undo the whole thing, but can't find the err either.
    ; TOFIX: hb_parclen() usage.
    ; TOFIX: HB_ARRAYSETSTR() with NULL string parameter.
    ; TOFIX: HB_PARSTRDEF() to really default to empty string for non-string params.
    ; TODO: Remaining HB_TCHAR_*() usages.
    ; TODO: Peer-review what I did.

  * contrib/hbwin/wapi_winbase.c
    ! Fixed for WinCE after recent addition of new wrappers.
      This means exclusion of WAPI_WAITFORSINGLEOBJECTEX() and 
      WAPI_WAITFORMULTIPLEOBJECTSEX() for this platform.
    ! Minor fix in size of allocated buffer in WAPI_FORMATMESSAGE().
      (buffer was too large in non-UNICODE).
2009-12-11 17:27:41 +00:00
Viktor Szakats
32bf41944d 2009-12-11 10:59 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* include/hbextern.ch
    + Added HB_THREADONCEINIT().

  * contrib/hbqt/hbqt.ch
  * contrib/hbxbp/xbp.ch
    ! Moved XBP specific macro to HBXBP header.

  * contrib/hbqt/tests/demoqt.prg
    ! Deleted no more needed init calls.

  * contrib/hbqt/hbqt_events.cpp
    + Added TOFIX about GC collected pointer stored in low level 
      structure. (source of GPF).

  * contrib/hbwin/win_misc.c
  * contrib/hbwin/wapi_winbase.c
  * contrib/hbwin/wapi_winuser.c
  * contrib/hbwin/win_regc.c
  * contrib/hbwin/win_prn1.c
  * contrib/hbwin/win_prn3.c
  * contrib/hbwin/wapi_shellapi.c
  * contrib/hbwin/legacyco.c
    - Deleted now unnecessary '( LP[C]TSTR )' casts.
    + Cleaned const usage in WIN_PRINTERSETDEFAULT().
      F.e. OpenPrinter() has apparently wrong winapi declaration, 
      so a cast must have been added.

    ; TOFIX: CreateProcessW() second parameter has to be a read/write 
             buffer. Przemek, do you have an idea how to solve that 
             the cleanest way?
             (for now I kept a cast, assuming that a buffer is 
             created by Harbour conversion API, but that's not 
             something it guarantees in the future.)
2009-12-11 10:01:12 +00:00
Przemyslaw Czerpak
12dc010686 2009-12-11 04:13 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbapiitm.h
  * harbour/src/vm/classes.c
    * added new internal HVM macro

  * harbour/src/vm/thread.c
    + added new function
         hb_threadOnceInit( @<item> <value> ) -> <lInitialized>
      It assigns <value> to <item> if <item> is NIL in MT safe way so it's
      assigned only once. It's reduced but faster version of hb_threadOnce()

  * harbour/include/hbapicdp.h
    * define HB_WCHAR as wchar_t on Windows platforms for compilers which
      refuse to make conversions between types using the same base type.

  * harbour/contrib/hbwin/win_dll.c
    * code cleanup
2009-12-11 03:13:24 +00:00
Przemyslaw Czerpak
b308f56ac2 2009-12-10 21:49 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbatomic.h
    * removed 'static inline' from OpenWatcom ASM functions defined
      by '#pragma aux ...' to make OpenWatcom < 1.8 happy.
      Version 1.8 ignores 'static inline' attributes in such declarations.

  * harbour/config/dos/watcom.mk
  * harbour/utils/hbmk2/hbmk2.prg
    * switched from DOS/4GW to DOS/32A extender. It's faster what is
      noticeable also in final Harbour binaries, does not have DOS4G
      command line limitations and has nice tools which allow to easy
      set different runtime parameters (ss.exe) or compress final
      executable (sc.exe)
      BTW people having problem with maximum command line size in
      OpenWatcom tools can replace DOS/4GW with DOS/32A in this tools
      It can be made also globally by coping dos32a.exe to dos4gw.exe.
      NOTE: I've found why DOS Harbour OpenWatcom application created
            in my Linux box were not working. Just simply the directory
            with DOS extender setup files was not in PATH.
            Creating DOS OpenWatcom applications in other systems (i.e.
            Linux or OS2) do not forget to add directory with DOS binaries
            '%WATCOM%\binw' to PATH after directory with platform native
            OpenWatcom binaries '%WATCOM%\bin*' or copy DOS extender
            (dos32a.exe) to one of PATH directories.

  * harbour/config/dos/watcom.mk
    * added workaround for not included automatically by linker CLIB
      library when Harbour is compiler in pure C mode. I hope it's only
      temporary hack which we can remove in the future. I haven't added
      it to hbmk2 so linking DOS applications using hbmk2 user will have
      to add -lclib3r to hbmk2 parameters.

  * harbour/config/common/watcom.mk
    * disable DOS/32A banner messages
2009-12-10 20:49:23 +00:00
Przemyslaw Czerpak
f674969aba 2009-12-10 10:42 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/contrib/xhb/fparse.c
    * pacified BCC warning

  * harbour/src/rtl/base64c.c
  * harbour/src/rtl/diskspac.c
  * harbour/src/rtl/filesys.c
  * harbour/src/rtl/hbproces.c
  * harbour/src/rtl/gtos2/gtos2.c
  * harbour/src/rdd/dbffpt/dbffpt1.c
  * harbour/contrib/xhb/freadlin.c
  * harbour/contrib/xhb/txtline.c
  * harbour/contrib/hbbtree/hb_btree.c
  * harbour/contrib/rddsql/sqlbase.c
  * harbour/contrib/rddsql/sddodbc/odbcdd.c
    * pacified OpenWatcom C warnings

  * harbour/include/hbatomic.h
    % rewritten OpenWatcom atomic ASM macros.
      Now they precisely informs compiler about used and modified
      registered and also force passing arguments in strictly defined
      what simplify ASM code.
2009-12-10 09:42:34 +00:00
Przemyslaw Czerpak
3700f5f794 2009-12-09 20:40 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/Makefile
    ! added missing newly added header files - thanks to Itamar for
      information about the problem

  * harbour/include/hbmsgreg.h
    ! fixed typo - thanks to Toninho for information about the problem
2009-12-09 19:41:10 +00:00
Przemyslaw Czerpak
094aea1ff3 2009-12-09 15:30 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbapilng.h
  + harbour/include/hbmsgreg.h
    + added common for all Harbour lang modules (msg*.c) header file
      with initialization code

  * harbour/src/lang/msgbe866.c
  * harbour/src/lang/msgbewin.c
  * harbour/src/lang/msgbg866.c
  * harbour/src/lang/msgbgiso.c
  * harbour/src/lang/msgbgmik.c
  * harbour/src/lang/msgbgwin.c
  * harbour/src/lang/msgca.c
  * harbour/src/lang/msgcs852.c
  * harbour/src/lang/msgcsiso.c
  * harbour/src/lang/msgcskam.c
  * harbour/src/lang/msgcswin.c
  * harbour/src/lang/msgde.c
  * harbour/src/lang/msgdewin.c
  * harbour/src/lang/msgel.c
  * harbour/src/lang/msgelwin.c
  * harbour/src/lang/msgeo.c
  * harbour/src/lang/msges.c
  * harbour/src/lang/msgeswin.c
  * harbour/src/lang/msgeu.c
  * harbour/src/lang/msgfr.c
  * harbour/src/lang/msggl.c
  * harbour/src/lang/msghe862.c
  * harbour/src/lang/msghewin.c
  * harbour/src/lang/msghr437.c
  * harbour/src/lang/msghr852.c
  * harbour/src/lang/msghriso.c
  * harbour/src/lang/msghrwin.c
  * harbour/src/lang/msghu852.c
  * harbour/src/lang/msghucwi.c
  * harbour/src/lang/msghuiso.c
  * harbour/src/lang/msghuwin.c
  * harbour/src/lang/msgid.c
  * harbour/src/lang/msgis850.c
  * harbour/src/lang/msgit.c
  * harbour/src/lang/msgko.c
  * harbour/src/lang/msgltwin.c
  * harbour/src/lang/msgnl.c
  * harbour/src/lang/msgpl852.c
  * harbour/src/lang/msgpliso.c
  * harbour/src/lang/msgplmaz.c
  * harbour/src/lang/msgplwin.c
  * harbour/src/lang/msgpt.c
  * harbour/src/lang/msgptiso.c
  * harbour/src/lang/msgro.c
  * harbour/src/lang/msgru866.c
  * harbour/src/lang/msgrukoi.c
  * harbour/src/lang/msgruwin.c
  * harbour/src/lang/msgsk852.c
  * harbour/src/lang/msgskiso.c
  * harbour/src/lang/msgskkam.c
  * harbour/src/lang/msgskwin.c
  * harbour/src/lang/msgsl437.c
  * harbour/src/lang/msgsl852.c
  * harbour/src/lang/msgsliso.c
  * harbour/src/lang/msgslwin.c
  * harbour/src/lang/msgsr852.c
  * harbour/src/lang/msgsriso.c
  * harbour/src/lang/msgsrwin.c
  * harbour/src/lang/msg_tpl.c
  * harbour/src/lang/msgtr857.c
  * harbour/src/lang/msgtrwin.c
  * harbour/src/lang/msgua866.c
  * harbour/src/lang/msguados.c
  * harbour/src/lang/msguakoi.c
  * harbour/src/lang/msguawin.c
  * harbour/src/lang/msgzhb5.c
  * harbour/src/lang/msgzhgb.c
    * modified to use initialization code defined in common for all
      lang modules header file.

  * harbour/contrib/gtwvg/wvggui.c
  * harbour/contrib/hbqt/qtgui/QApplication.cpp
  * harbour/contrib/hbqt/qth/QApplication.qth
    * use default GT startup cvode (#include "hbgtreg.h")

  * harbour/include/hbinit.h
  + harbour/include/hbiniseg.h
    * replaced HB_MSC_STARTUP code with more universal HB_DATASEG_STARTUP
    * moved HB_DATASEG_STARTUP code to separate header file to reduce
      modifications in other files when this code has to be changed or
      extended
    + added support for startup code in OpenWatcom C builds. Now we can
      create OpenWatcom Harbour binaries without forcing C++ mode.
      I've tested Linux and Win32 builds and they works correctly.
      Probably similar solution can be used also for other C compilers
      which do not have native interface to define starup code.

  * harbour/src/compiler/genc.c
  * harbour/utils/hbmk2/hbmk2.prg
  * harbour/include/hbcdpreg.h
  * harbour/include/hbgtreg.h
  * harbour/src/rtl/hbregex.c
  * harbour/src/rdd/dbf1.c
  * harbour/src/rdd/dbfcdx/dbfcdx1.c
  * harbour/src/rdd/dbffpt/dbffpt1.c
  * harbour/src/rdd/dbfnsx/dbfnsx1.c
  * harbour/src/rdd/dbfntx/dbfntx1.c
  * harbour/src/rdd/delim1.c
  * harbour/src/rdd/sdf1.c
  * harbour/src/pp/pplib3.c
  * harbour/contrib/rddads/ads1.c
  * harbour/contrib/rddads/adsx.c
  * harbour/contrib/rddsql/sddfb/fbirddd.c
  * harbour/contrib/rddsql/sddmy/mysqldd.c
  * harbour/contrib/rddsql/sddodbc/odbcdd.c
  * harbour/contrib/rddsql/sddpg/pgsqldd.c
  * harbour/contrib/rddsql/sqlbase.c
  * harbour/contrib/rddsql/sqlmix.c
  * harbour/contrib/hbbmcdx/bmdbfcdx.c
  * harbour/contrib/hbmemio/memio.c
  * harbour/contrib/hbnetio/netiocli.c
  * harbour/contrib/hbbtree/hb_btree.c
  * harbour/contrib/hbwin/olecore.c
  * harbour/contrib/hbwin/win_com.c
    * modified to use HB_DATASEG_STARTUP instead of HB_MSC_STARTUP
      Now HB_MSC_STARTUP is local macro used only in hbinit.h.
      Please make MSVC build tests.

  * harbour/contrib/hbmemio/memio.c
    ! declare s_fileFuncs structure as static
    * removed unnecessary code to directly register HB_MEMIO symbol.
      Mindaugas if you need it for some reasons then I can reactivate it
      but I would like to know why it's necessary for you.

  * harbour/src/vm/task.c
    ! added missing {}

  * harbour/src/vm/fm.c
    * locally disabled "unreachable code" warnings for dlmalloc.c
      compilation by OpenWatcom in pure C mode

  * harbour/src/rtl/hbzlibgz.c
    * minor code cleanup

  * harbour/src/rtl/filesys.c
    * pacified OS/2 warnings

  * harbour/contrib/hbcairo/core.c
    ! fixed casting for C++ builds

  * harbour/contrib/hbwin/wapi_winbase.c
    ! fixed casting

  * harbour/src/Makefile
    * changed the order of compiled libraries to improve little bit
      the speed in concurrent (-j<N>) builds
2009-12-09 14:33:48 +00:00
Viktor Szakats
d7d7523ca7 2009-12-09 04:06 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* include/hbwinuni.h
    + Added HB_PARSTRDEF() macro. So far the same as HB_PARSTR(), but
      it's supposed to mark places where hb_parcx() was used (where
      WinAPI expects non-optional string parameter).

  * contrib/hbwin/wapi_winbase.c
  * contrib/hbwin/wapi_winuser.c
  * contrib/hbwin/wapi_shellapi.c
  * contrib/hbwin/legacyco.c
    + Using new UNICODE parameter passing macros instead of HB_TCHAR*() ones.
    ; NOTE: I'm unsure how to apply the same to wapi_commctrl.c, could anyone help?
            Here the string is assigned to win structure and passed to winapi,
            which may mean that string space should be kept there after
            returning from function.

  * contrib/hbxbp/xbpgeneric.prg
    ! Using HB_SYMBOL_UNUSED() to mark unused parameters, instead of
      local solution.
    % Minor optimizations.
    * MSGBOX() changed to not display all text in bold.
    + Changed <BR> to <br /> in MSGBOX().
2009-12-09 03:09:59 +00:00
Viktor Szakats
e09182ffcd 2009-12-08 13:16 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* include/hbwinuni.h
    ! Fixed two typos in new macros.

  * contrib/hbwin/wapi_shellapi.c
    * Minor formatting.
2009-12-08 12:17:08 +00:00
Viktor Szakats
c5587de21b 2009-12-08 12:02 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* include/Makefile
  + include/hbwinuni.h
  * contrib/hbwin/wapi_shellapi.c
  * include/hbwince.h
    + Moved new UNICODE translation macros to separate header.
2009-12-08 11:03:40 +00:00
Przemyslaw Czerpak
1429103ddd 2009-12-07 18:42 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/pp/ppcore.c
    * strip UTF-8 BOM signature from compiled .prg files

  * harbour/include/hbdefs.h
    + added HB_MACRONAME_JOIN() macro

  * harbour/include/hbinit.h
    ! fixed startup function declaration when HB_STRICT_ANSI_C macro is set

  * harbour/src/rdd/dbfcdx/dbfcdx1.c
    * modified to use unique names for startup functions

  * harbour/include/hbcdpreg.h
    * modified to use unique names in CP startup functions for non #pragma
      based initialization.

  * harbour/include/Makefile
  + harbour/include/hbgtreg.h
    + added default GT startup code in header file which can be
      included by GT drivers. This version uses unique function names
      for non #pragma based initialization.

  * harbour/src/rtl/gt_tpl/gt_tpl.c
  * harbour/src/rtl/gtdos/gtdos.c
  * harbour/src/rtl/gtwin/gtwin.c
  * harbour/src/rtl/gtxwc/gtxwc.c
  * harbour/src/rtl/gtcrs/gtcrs.c
  * harbour/src/rtl/gtstd/gtstd.c
  * harbour/src/rtl/gttrm/gttrm.c
  * harbour/src/rtl/gtcgi/gtcgi.c
  * harbour/src/rtl/gtos2/gtos2.c
  * harbour/src/rtl/gtsln/gtsln.c
  * harbour/src/rtl/gtpca/gtpca.c
  * harbour/src/rtl/gtgui/gtgui.c
  * harbour/src/rtl/gtwvt/gtwvt.c
  * harbour/contrib/gtalleg/gtalleg.c
  * harbour/contrib/gtqtc/gtqtc.cpp
  * harbour/contrib/gtwvg/gtwvg.c
  * harbour/contrib/hbct/ctwin.c
    * use #include "hbgtreg.h" for startup code
2009-12-07 17:42:41 +00:00
Viktor Szakats
66792cd024 2009-12-07 02:58 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* include/hbwince.h
    + Added following macros to help transitioning to new method
      of CP conversion when interfacing with Windows API (both UNICODE
      and non-UNICODE):
         HB_PARSTR( n, h, len )
         HB_RETSTR( str )
         HB_RETSTRLEN( str, len )
         HB_STORSTR( str, n )
         HB_STORSTRLEN( str, len, n )
    ; The goal is to replace HB_TCHAR_*() macros and hb_osEncodeCP()
      call with above ones. This will allow to use any CPs (even UTF8)
      on the .prg level and transparently interface with Windows
      with proper CP translation.
      We will probably need a few more macros to store strings in
      array elements f.e., but this is enough for a start.

  * contrib/hbwin/wapi_shellapi.c
    + Experimental: WAPI_SHELLEXECUTE() converted to use above new
      macros. It results in much cleaner code.
      Minor incompatibility: 3rd parameter is now passed as-is, so
      if non-string is passed it gets passed to Windows as NULL,
      which isn't a valid input parameter.
    ; NOTE: Probably it will useful to have HB_PARSTRDEF() which also
            accepts a default value to be used when non-string
            parameter was passed. (to replace old hb_parcx() calls).
            Is it possible to add such function or any other ways to solve that?
    ; TOFIX: I'm getting this warning:
               warning: implicit declaration of function 'hb_setGetOSCP'
             and it's probably too late, but I couldn't find a way to
             include hbset.h without errors or with least side-effects.
             Przemek, could you help?

  * contrib/hbwin/win_prn1.c
    * Formatting.

  * src/rdd/dbcmd.c
  * src/rdd/wafunc.c
    + Moved recently implemented codepage defaulting logic (_SET_DBCODEPAGE)
      to lower lever functions.
      Please review me.

  * external/libpng/pngrio.c
  * external/libpng/pngerror.c
  * external/libpng/pngconf.h
  * external/libpng/pngwrite.c
  * external/libpng/pngset.c
  * external/libpng/pngpread.c
  * external/libpng/pngwtran.c
  * external/libpng/LICENSE
  * external/libpng/pngwio.c
  * external/libpng/pngrutil.c
  * external/libpng/pngwutil.c
  * external/libpng/pngread.c
  * external/libpng/pngmem.c
  * external/libpng/png.c
  * external/libpng/pngget.c
  * external/libpng/pnggccrd.c
  * external/libpng/png.h
  * external/libpng/pngrtran.c
  * external/libpng/pngtrans.c
    * Updated to 1.2.41 (from 1.2.40)
2009-12-07 02:17:37 +00:00
Viktor Szakats
97e5dce09c 2009-12-06 19:59 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* src/vm/set.c
  * src/rdd/dbcmd.c
  * include/set.ch
  * include/hbset.h
    + Added support for SET( _SET_DBCODEPAGE ). This will set the
      default codepage for RDD operation. It affects following
      functions and everything which is based on them:
         DBUSEAREA()
         DBCREATE()
         HB_DBCREATETEMP()
         __DBOPENSDF()
      IOW every function which accepts current "dirty" Harbour
      extension <cCodePage>.
      This new SET() is useful if someone wants to use a different 
      than app codepage in tables, without modifying every above
      calls to pass the db CP as extra parameter (plus maintaining 
      this global setting in app code).
2009-12-06 19:01:01 +00:00
Viktor Szakats
43ce5eb036 2009-12-04 18:47 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* include/hbsetup.h
    * Marked MSVS 2002 in comment.

  * ChangeLog
    * Minor typo.

  * contrib/hbide/idemisc.prg
    ! Fixed unused variable error.
2009-12-04 17:49:05 +00:00
Viktor Szakats
b7d47cd284 2009-12-02 11:42 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* src/rtl/philes.c
  * include/hbextern.ch
    + Added HB_FISDEVICE()

    ; NOTE: Didn't add anything to hbmk2 yet, as after testing I found it 
            weird and unusual that the output is different when redirected, 
            but we may think of some other solution, like user option or else.
2009-12-02 10:44:06 +00:00
Przemyslaw Czerpak
bd4750043f 2009-12-02 03:12 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/doc/en-EN/hb_apifs.txt
  * harbour/include/hbapifs.h
  * harbour/src/rtl/filesys.c
    * changed:
         BOOL hb_fsSetDevMode( HB_FHANDLE hFileHandle, USHORT uiDevMode )
      to:
         int hb_fsSetDevMode( HB_FHANDLE hFileHandle, int iDevMode )
      Now it returns previous mode for hFileHandle or -1 on error.
      if iDevMode == 0 then it does not change device mode.

  * harbour/src/rtl/philes.c
    * modified HB_FSETDEVMODE() function to work with new hb_fsSetDevMode()
      Current syntax is:
         HB_FSETDEVMODE( <hFile> [, <nNewMode> ] ) -> <nOldMode>
      It may return FD_BINARY, FD_TEXT or FS_ERROR.

  * harbour/src/rtl/philes53.c
    * modified FSETDEVMOD() function to work with new hb_fsSetDevMode()
      It's similar to HB_FSETDEVMODE() but returns FD_BINARY instead of
      FS_ERROR. Such behavior is more closer to CL53.

  * harbour/src/rtl/console.c
    * set also STDIN into binary mode
2009-12-02 02:12:14 +00:00
Viktor Szakats
b69e1a68c2 2009-12-02 01:55 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* src/vm/itemapi.c
  * src/vm/hvm.c
  * src/vm/set.c
  * src/rtl/gtdos/gtdos.c
  * src/rtl/gtwin/gtwin.c
  * src/rtl/gtxwc/gtxwc.h
  * src/rtl/gtxwc/gtxwc.c
  * src/rtl/gtcrs/gtcrs.c
  * src/rtl/gtcrs/gtcrs.h
  * src/rtl/gtstd/gtstd.c
  * src/rtl/gttrm/gttrm.c
  * src/rtl/gtcgi/gtcgi.c
  * src/rtl/hbgtcore.c
  * src/rtl/gtsln/gtsln.c
  * src/rtl/gtsln/kbsln.c
  * src/rtl/gtsln/gtsln.h
  * src/rtl/gtpca/gtpca.c
  * src/rtl/gtwvt/gtwvt.c
  * src/rdd/dbfntx/dbfntx1.c
  * src/rdd/hbdbsort.c
  * src/rdd/sdf1.c
  * src/rdd/dbfnsx/dbfnsx1.c
  * src/rdd/dbfcdx/dbfcdx1.c
  * src/rdd/delim1.c
  * src/rdd/dbf1.c
  * src/rdd/hsx/hsx.c
  * src/rdd/dbffpt/dbffpt1.c
  * doc/en-EN/lang.txt
  * include/hbrdddbf.h
  * include/hbapicdp.h
  * include/hbextern.ch
  * contrib/xhb/dbf2txt.c
  * contrib/gtqtc/gtqtc.cpp
  * contrib/gtwvg/gtwvg.c
  * contrib/gtwvg/wvggui.c
  * contrib/hbbmcdx/bmdbfcdx.c
  * examples/hbdoc/examples/core_es/lang.txt
    - Deleted HB_CDP_SUPPORT_OFF.
2009-12-02 00:57:48 +00:00
Viktor Szakats
f4c1fe62e5 2009-12-01 08:57 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* src/rtl/philes.c
  * src/rtl/philes53.c
  * include/hbextern.ch
    + Added HB_FSETDEVMODE(). Documented, always available
      equivalent of C5.3 undocumented function FSETDEVMOD().

  * utils/hbmk2/hbmk2.prg
    * Changed to use HB_FSETDEVMODE().
2009-12-01 07:58:05 +00:00
Przemyslaw Czerpak
449d3de17d 2009-12-01 01:19 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbwince.h
  * harbour/contrib/hbwin/axcore.c
    * moved HBTEXT macro definition from axcore.c to hbwince.h

  * harbour/contrib/hbwin/wapi_shellapi.c
    ! use HBTEXT() macro for literal constants used as second parameter
      of GetProcAddress(). It fixes WINCE builds where whole API uses
      only UNICODE strings.
2009-12-01 00:19:27 +00:00
Viktor Szakats
344be06577 2009-11-29 20:03 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* utils/hbmk2/hbmk2.prg
    + Added -hbmake=<hbmake file> option which will attempt to 
      read hbmake project file and save it as .hbp file.
      This is experimental and I'd like to ask hbmake users to 
      update/extend this converter code as I'm not hbmake user.
      This feature is to aid users to migrate from hbmake to hbmk2.
      Notice that along the same line converter could be written 
      for .xbp and xMate project files too.

  * src/compiler/Makefile
  - src/compiler/gencobj.c
  * src/compiler/hbmain.c
  * src/compiler/cmdcheck.c
  * src/compiler/hbusage.c
  * include/hbcompdf.h
  * debian/rules
  * mpkg_src.sh
  * mpkg_tgz.sh
  * harbour.spec
    - Deleted support for harbour.cfg / compiler -go mode.
      This was scheduled to be done after release, but since
      hbmk2 seems to be a very solid tool now with visible
      acceptance from users, it seems safe to make the move
      now. This will mean that one less Harbour file will
      "pollute" system locations, which is always a good
      thing. Plus this part had a few bugs, which are now
      also a thing of the past.

  - examples/hbmake
    - Deleted hbmake tool. This wasn't really working anyway,
      and require -go mode, which was deleted.
      Use hbmk2 instead.

  * mpkg_src.sh
  * mpkg_tgz.sh
    ! Fixed indentation to be consistent 4 chars.
2009-11-29 19:04:12 +00:00
Viktor Szakats
4715be9ddc 2009-11-29 07:57 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* include/hbextern.ch
    ! HB_SETCODEPAGE() reference also guarded with HB_LEGACY_LEVEL2.

  * tests/wcecon.prg
  * tests/gtkeys.prg
  * examples/terminal/trm_cli.prg
    * HB_SETCODEPAGE() -> HB_CDPSELECT().

  * contrib/hbwin/win_prn2.c
    + Added comment.

  * contrib/hbwin/legacy.prg
    + Guarded with HB_WIN_LEGACY_LEVEL_OFF.

  * contrib/hbmysql/mysqlold.c
  * contrib/hbodbc/odbcold.c
  * contrib/hbwin/legacycd.c
  * contrib/hbwin/legacyco.c
  * contrib/hbwin/legacycp.c
  * contrib/hbwin/legacycv.c
  * contrib/hbwin/legacy.prg
    + Guarded with HB_LEGACY_LEVEL3.
      This means these will be removed after major release.
      Please upgrade your code to use new function names.
2009-11-29 06:59:59 +00:00
Viktor Szakats
8b8bf4d810 2009-11-28 20:02 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* contrib/hbmisc/spd.c
    * __XHARBOUR__ protected DATETIME part converted to commented code.
    ; TODO: Xavi, pls update this code to build with Harbour, now
            we have DATETIME support as well.

  * utils/hbformat/hbformat.prg
  * src/rdd/usrrdd/rdds/logrdd.prg
  * tests/usrrdd/exlog.prg
  * contrib/gtwvg/wvgutils.c
  * examples/httpsrv/cgifunc.prg
  * examples/httpsrv/session.prg
    - Deleted __XHARBOUR__ protected parts.

  * examples/rddado/adordd.prg
  * examples/httpsrv/uhttpd.prg
    * TRY/CATCH converted to BEGIN SEQUENCE, dropping all __XHARBOUR__
      portected parts.

  * include/hbapi.h
    * TRUE/FALSE -> HB_TRUE/HB_FALSE.
2009-11-28 19:03:00 +00:00
Przemyslaw Czerpak
b8b10faf91 2009-11-28 00:26 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/vm/strapi.c
  * harbour/include/hbapistr.h
    * modified syntax for hb_itemGetStr*() and hb_parstr*() functions as
      suggested by Mindaugas. Now we have:
         const char * hb_itemGetStr( PHB_ITEM pItem, void * cdp,
                                     void ** phString, ULONG * pulLen );
         const char * hb_itemGetStrUTF8( PHB_ITEM pItem,
                                         void ** phString, ULONG * pulLen );
         const HB_WCHAR * hb_itemGetStrU16( PHB_ITEM pItem, int iEndian,
                                            void ** phString, ULONG * pulLen );
      and:
         const char * hb_parstr( int iParam, void * cdp,
                                 void ** phString, ULONG * pulLen );
         const char * hb_parstr_utf8( int iParam,
                                      void ** phString, ULONG * pulLen );
         const HB_WCHAR * hb_parstr_u16( int iParam, int iEndian,
                                         void ** phString, ULONG * pulLen );
2009-11-27 23:26:56 +00:00
Przemyslaw Czerpak
fd4bd6208f 2009-11-27 18:40 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/rtl/cdpapi.c
  * harbour/include/hbextern.ch
    + added new .prg function:
         HB_UTF8ASC( <cUtf8> ) -> <nUnicode>

  * harbour/contrib/hbwin/olecore.c
    % removed redundant call to SafeArrayGetDim()
2009-11-27 17:40:49 +00:00
Przemyslaw Czerpak
5ba8b665f3 2009-11-26 22:26 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/vm/garbage.c
    % small improvement in HB_GC_AUTO code

  * harbour/include/hbdefs.h
    ! reverted the hack which casted file handles to unsigned values
      I added two weeks ago - it was also converting FS_ERROR value
      from -1 to 4294967295. Please remember that on some platforms
      negative handles can exist and are valid. Only -1 indicates an
      error.

  * harbour/utils/hbtest/rt_file.prg
    + added regression test for FOPEN() FS_ERROR value

  * harbour/contrib/hbwin/legacycd.c
  * harbour/contrib/hbwin/legacyco.c
    * added missing EOL at EOF
2009-11-26 21:26:13 +00:00
Przemyslaw Czerpak
e1ba8c6f23 2009-11-26 03:45 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbapi.h
  * harbour/include/hbvm.h
  * harbour/include/hbvmpub.h
  * harbour/include/hbstack.h
  * harbour/src/vm/hvm.c
  * harbour/src/vm/estack.c
  * harbour/src/vm/fm.c
  * harbour/src/vm/garbage.c
    + added new function hb_xclean() executed by GC just before resuming
      suspended threads - it can be used by memory manager to clean
      internal structures and release unused memory to OS.
    % release unused memory to OS in hb_xclean() when DLMALLOC is used
    % release unused memory in all mspaces to OS in hb_xclean() when
      HB_FM_DLMT_ALLOC is used
    % release unused memory in mspace when last thread detach it
    % balance used mspaces between threads in hb_xclean() when
      HB_FM_DLMT_ALLOC is used
2009-11-26 02:46:11 +00:00
Przemyslaw Czerpak
33ac359145 2009-11-24 16:48 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/vm/dlmalloc.c
    % use harbour spin locks if available by default in all builds

  * harbour/include/hbatomic.h
    * removed HB_SPINLOCK_SLEEP macro and enable code to always yield
      the processor in spin locks
    * cover double spin lock setting by HB_SPINLOCK_REPEAT

  * harbour/src/vm/garbage.c
    * removed unused HB_SPINLOCK_SLEEP macro

  * harbour/include/hbstack.h
  * harbour/src/vm/estack.c
    + added new internal function hb_stackAllocator()
    * disable hb_stackTotalItems() stack macro so this function can be
      used also in internal HVM code to check if stack is initialized

  * harbour/src/vm/fm.c
    ! use hb_stackAllocator() to access pointer to DLMALLOC mspace
      It should fix GPF when DLMT was used in OS2 builds - please test.
2009-11-24 15:49:02 +00:00
Przemyslaw Czerpak
151c7d4881 2009-11-24 14:29 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbsetup.h
    * minor extension to CPU detection macros
2009-11-24 13:29:59 +00:00
Viktor Szakats
f6515c6b1d 2009-11-23 00:46 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* src/vm/arrays.c
  * src/debug/dbgentry.c
  * contrib/xhb/xhbarr.c
  * contrib/xhb/xhberrc.c
  * contrib/xhb/cstructc.c
    * Changed to use native Harbour API function names instead of
      xhb compatibility ones:
         hb_itemForwardValue() -> hb_itemMove()
         hb_itemPutCStatic()   -> hb_itemPutCConst()

  * contrib/hbbmcdx/bmdbfcdx.c
  * contrib/rddsql/sqlbase.c
  * contrib/rddads/adsfunc.c
  * contrib/hbwin/wce_simc.c
  * contrib/hbwin/win_prn1.c
  * contrib/hbwin/win_prn2.c
    % hb_itemNew() + hb_arrayNew() combination replaced
      with single hb_itemArrayNew() call.

  * include/hbapi.h
  * include/hbapiitm.h
    * Marked some legacy/compatibility functions with HB_LEGACY_LEVEL2.
      This means they will be deleted in next major release version:
        LEGACY/DEPRECATED        RECOMMENDED EQUIVALENT
        ----------------------   -----------------------
        hb_retcAdopt()           hb_retc_buffer()
        hb_retclenAdopt()        hb_retclen_buffer()
        hb_retcStatic()          hb_retc_const()
        hb_storclenAdopt()       hb_storclen_buffer()
        hb_itemPutCRawStatic()   hb_itemPutCLConst()
        hb_itemForwardValue()    hb_itemMove()
        hb_itemPutCStatic()      hb_itemPutCConst()
        hb_arraySetCPtr()        hb_arraySetCLPtr()

  * contrib/hbwin/win_tprn.prg
    * Minor formatting.

  * contrib/hbwin/win_osc.c
    * Using HB_BOOL.
    * Varible type notation fixed.
2009-11-22 23:46:57 +00:00
Przemyslaw Czerpak
dc9128c46b 2009-11-22 12:38 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
+ harbour/config/linux/clang.mk
    + added support for CLANG in LINUX builds

  * harbour/include/hbatomic.h
    + added assembler code for SPINLOCKs in WATCOM x86 builds

  * harbour/src/vm/fm.c
    * enabled HB_FM_DLMT_ALLOC by default in MT HVM if HB_FM_DL_ALLOC is
      also enabled

  * harbour/src/vm/dlmalloc.c
    * modifications for non MS-Windows WATCOM builds
      TOFIX: now it compiles in Linux and OS2 builds but it still does not
             work
2009-11-22 11:38:17 +00:00
Viktor Szakats
39a66166e0 2009-11-21 11:10 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* include/hbsetup.h
  * utils/hbmk2/hbmk2.prg
  * config/darwin/clang.mk
    + Using __clang__ for Clang detection instead of locally rolled 
      solution.

  * src/common/hbver.c
    + Added Clang compiler detection.
2009-11-21 10:11:32 +00:00
Viktor Szakats
9af63b0e31 2009-11-20 15:04 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* include/hbdefs.h
    * Removed reliance on old type when defining some new types.

  * contrib/hbcurl/hbcurl.c
  * contrib/hbssl/ssl.c
  * contrib/hbssl/evpmd.c
    * Changed ULONG to HB_SIZE.
      (HB_SIZE currently is the same as ULONG)

  * contrib/hbssl/evp.c
    * Changed ULONG to size_t in one place.
2009-11-20 14:06:50 +00:00
Przemyslaw Czerpak
496972d91e 2009-11-20 00:18 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/rtl/gtcrs/gtcrs.c
    * pacified warning caused by wrong tigetnum() declarations in some
      curses versions

  * harbour/src/rtl/gtsln/gtsln.c
    ! fixed non ANSI-C variable declarations

  * harbour/include/hbsetup.h
    + added macros for PURE and CONST function attributes

  * harbour/contrib/hbct/ctc.c
    * modified variable names
2009-11-19 23:18:42 +00:00
Przemyslaw Czerpak
da88410742 2009-11-18 18:48 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbapirdd.h
    ! redefined RDD method table to use HB_ERRCODE instead of USHORT
2009-11-18 17:48:39 +00:00
Przemyslaw Czerpak
f111e35a0c 2009-11-18 16:33 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbthread.h
     * minor cleanup in comment

  * harbour/src/vm/dlmalloc.c
    * use harbour spinlocks in windows builds to eliminate calling
      InterlockedCompareExchange[Pointer]() function

  * harbour/include/hbstack.h
    ! disabled TLS ASM inline code which seems to not work with Win9x.
2009-11-18 15:33:38 +00:00
Viktor Szakats
eb786fe2b4 2009-11-18 16:00 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* include/hbapi.h
    * Changed HB_ERRCODE to be 'insigned int' (was USHORT).
    ; You'll need to rebuild all sources.

  * utils/hbmk2/hbmk2.prg
    % Turned off line numbers (for hbmk2 itself).

  * INSTALL
    * Minor formatting.
2009-11-18 15:09:18 +00:00
Przemyslaw Czerpak
ee46919af2 2009-11-17 19:37 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/Makefile
  + harbour/include/hbapistr.h
  * harbour/src/vm/Makefile
  * harbour/src/vm/hvmall.c
  + harbour/src/vm/strapi.c
    + added new C functions to extract strings in different encoding:
         void * hb_itemGetStr( PHB_ITEM pItem, void * cdp,
                               const char ** pStrPtr, ULONG * pulLen );
         void * hb_itemGetStrUTF8( PHB_ITEM pItem,
                                   const char ** pStrPtr, ULONG * pulLen );
         void * hb_itemGetStrU16( PHB_ITEM pItem, int iEndian,
                                  const HB_WCHAR ** pStrPtr, ULONG * pulLen );
      extract from given item string in requested encoding and store pointer
      to this string and its size in characters in last two parameters.
      These functions return handler which is used to lock memory buffer
      with result or NULL if given item does not contain string. All not NULL
      handles returned by above functions have to be free by hb_strfree()
      function:
         void hb_strfree( void * hString );
      As long as they are not freed memory buffer set in pStrPtr is valid
      even if other code overwrote given item.
      The second parameter in hb_itemGetStr() can specify expected CP
      encoding, i.e.:
         hStr = hb_itemGetStr( pItem, hb_setGetOSCP(), &pszText, &ulLen );
         if( hStr )
         {
            ...
            hb_strfree( hStr );
         }
      extracts string in encoding set by Set( _SET_OSCODEPAGE, <cCPID> )
      The second parameter in hb_itemGetStrU16() define endian encoding
      and can be one of the following values:
         #define HB_CDP_ENDIAN_NATIVE        0
         #define HB_CDP_ENDIAN_LITTLE        1
         #define HB_CDP_ENDIAN_BIG           2
      defined in hbapicdp.h

    + added new C functions to copy part of strings to given buffers in
      different encoding:
         ULONG hb_itemCopyStr( PHB_ITEM pItem, void * cdp,
                               char * pStrBuffer, ULONG ulSize );
         ULONG hb_itemCopyStrUTF8( PHB_ITEM pItem,
                                   char * pStrBuffer, ULONG ulSize );
         ULONG hb_itemCopyStrU16( PHB_ITEM pItem, int iEndian,
                                  HB_WCHAR * pStrBuffer, ULONG ulSize );
      hb_itemCopyStr*() functions works in similar way to hb_itemGetStr*()
      ones but they copy the strings to given buffer and return the number
      of characters (not bytes) copied to the buffer.

    + added new C functions to store given strings in different encoding in
      HVM item:
         PHB_ITEM hb_itemPutStrLen( PHB_ITEM pItem, void * cdp,
                                    const char * pStr, ULONG ulLen );
         PHB_ITEM hb_itemPutStrLenUTF8( PHB_ITEM pItem,
                                        const char * pStr, ULONG ulLen );
         PHB_ITEM hb_itemPutStrLenU16( PHB_ITEM pItem, int iEndian,
                                       const HB_WCHAR * pStr, ULONG ulLen );
      These functions accepts strings in different encoding, made some
      conversions (if necessary and internal string representation in HVM is
      different) and then store them as HVM string items.

    + added few extended API functions to operate on strings in different
      encoding:
         void * hb_parstr( int iParam, void * cdp,
                           const char ** pStrPtr, ULONG * pulLen );
         void * hb_parstr_utf8( int iParam,
                                const char ** pStrPtr, ULONG * pulLen );
         void * hb_parstr_u16( int iParam, int iEndian,
                               const HB_WCHAR ** pStrPtr, ULONG * pulLen );

         void hb_retstr( void * cdp, const char * szText );
         void hb_retstr_utf8( const char * szText );
         void hb_retstr_u16( int iEndian, const HB_WCHAR * szText );

         void hb_retstrlen( void * cdp, const char * szText, ULONG ulLen );
         void hb_retstrlen_utf8( const char * szText, ULONG ulLen );
         void hb_retstrlen_u16( int iEndian,
                                const HB_WCHAR * szText, ULONG ulLen );

         int hb_storstr( void * cdp, const char * szText, int iParam );
         int hb_storstr_utf8( const char * szText, int iParam );
         int hb_storstr_u16( int iEndian,
                             const HB_WCHAR * szText, int iParam );

         int hb_storstrlen( void * cdp,
                            const char * szText, ULONG ulLen, int iParam );
         int hb_storstrlen_utf8( const char * szText, ULONG ulLen, int iParam );
         int hb_storstrlen_u16( int iEndian,
                                const HB_WCHAR * szText, ULONG ulLen, int iParam );

      They can be used instead of hb_parc*()/hb_retc*()/hb_storc*() ones and
      allow to easy create code which operates on strings in different
      encoding, i.e.:

            HB_FUNC( MY_STRTOUTF8 )
            {
               const char * str;
               ULONG len;
               void * h;
               h = hb_parstr_utf8( 1, &str, &len );
               if( h )
               {
                  hb_retclen( str, len );
                  hb_strfree( h );
               }
            }

    The above functions allows to create code which operates on different
    string encoding, i.e. UTF8, UCS2/UTF16, some CPs and such code is
    independent from internal HVM string representation so we can use
    internally Unicode or not and it will not effect existing code.
2009-11-17 18:38:12 +00:00
Przemyslaw Czerpak
1dd0ad3408 2009-11-16 17:44 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/rtl/errapi.c
  * harbour/include/hbapierr.h
    * renamed ulGenCode to errGenCode and ulSubCode to errSubCode
2009-11-16 16:45:11 +00:00
Przemyslaw Czerpak
ba7b29409f 2009-11-16 17:35 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbapierr.h
  * harbour/src/rtl/errint.c
  * harbour/src/rtl/errintlo.c
  * harbour/src/lang/msghuiso.c
  * harbour/src/lang/msgskiso.c
  * harbour/src/lang/msgrukoi.c
  * harbour/src/lang/msghuwin.c
  * harbour/src/lang/msgzhgb.c
  * harbour/src/lang/msgskwin.c
  * harbour/src/lang/msg_tpl.c
  * harbour/src/lang/msgruwin.c
  * harbour/src/lang/msgelwin.c
  * harbour/src/lang/msgro.c
  * harbour/src/lang/msgpt.c
  * harbour/src/lang/msghriso.c
  * harbour/src/lang/msghrwin.c
  * harbour/src/lang/msgsliso.c
  * harbour/src/lang/msgbe866.c
  * harbour/src/lang/msgslwin.c
  * harbour/src/lang/msghe862.c
  * harbour/src/lang/msgcskam.c
  * harbour/src/lang/msggl.c
  * harbour/src/lang/msgtrwin.c
  * harbour/src/lang/msgbgiso.c
  * harbour/src/lang/msgeo.c
  * harbour/src/lang/msgskkam.c
  * harbour/src/lang/msgbgwin.c
  * harbour/src/lang/msges.c
  * harbour/src/lang/msguakoi.c
  * harbour/src/lang/msgzhb5.c
  * harbour/src/lang/msgeu.c
  * harbour/src/lang/msgpl852.c
  * harbour/src/lang/msguados.c
  * harbour/src/lang/msgsr852.c
  * harbour/src/lang/msguawin.c
  * harbour/src/lang/msgde.c
  * harbour/src/lang/msgtr857.c
  * harbour/src/lang/msgru866.c
  * harbour/src/lang/msgcs852.c
  * harbour/src/lang/msgfr.c
  * harbour/src/lang/msgis850.c
  * harbour/src/lang/msgnl.c
  * harbour/src/lang/msghu852.c
  * harbour/src/lang/msgsk852.c
  * harbour/src/lang/msgplmaz.c
  * harbour/src/lang/msgca.c
  * harbour/src/lang/msgpliso.c
  * harbour/src/lang/msgplwin.c
  * harbour/src/lang/msgbgmik.c
  * harbour/src/lang/msgid.c
  * harbour/src/lang/msgbg866.c
  * harbour/src/lang/msgltwin.c
  * harbour/src/lang/msgptiso.c
  * harbour/src/lang/msgsriso.c
  * harbour/src/lang/msgel.c
  * harbour/src/lang/msgsrwin.c
  * harbour/src/lang/msgbewin.c
  * harbour/src/lang/msgdewin.c
  * harbour/src/lang/msghr437.c
  * harbour/src/lang/msghr852.c
  * harbour/src/lang/msgua866.c
  * harbour/src/lang/msgko.c
  * harbour/src/lang/msghewin.c
  * harbour/src/lang/msgsl437.c
  * harbour/src/lang/msgit.c
  * harbour/src/lang/msgsl852.c
  * harbour/src/lang/msghucwi.c
  * harbour/src/lang/msgcsiso.c
  * harbour/src/lang/msgcswin.c
  * harbour/src/lang/msgeswin.c
    * changed ULONG ulIntCode to HB_ERRCODE errCode in internal errors
2009-11-16 16:38:25 +00:00
Viktor Szakats
74004327a9 2009-11-16 14:18 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* include/hbdefs.h
    + Added HB_VMMAX[U]INT. Equivalent to HB_MAX[U]INT.

  * INSTALL
    * Minor.
2009-11-16 13:18:56 +00:00
Viktor Szakats
fdc4505247 2009-11-16 11:26 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* src/common/hbffind.c
  * src/rtl/fscopy.c
  * src/rtl/fserr.c
  * src/rtl/hbfeof.c
  * src/rtl/errapi.c
  * src/rtl/hbsocket.c
  * src/rtl/filesys.c
  * src/rtl/philes.c
  * src/rtl/dirdrive.c
  * src/rtl/filebuf.c
  * src/rtl/hbproces.c
  * include/hbstack.h
  * include/hbapifs.h
  * include/hbapierr.h
    * Changed USHORT type for error codes to HB_ERRCODE.
    + More or less changed int type of Extend/Item API call to 
      long type to prepare for HB_ERRCODE change to ULONG.
    ; TODO: Rename variables to reflect new type.
    ; TODO: Change internal error code from ULONG to HB_ERRCODE.
    ; TODO: Inspect rest of Harbour like above. I've only dealt with 
            rtl, vm.
    ; TODO: hbnetio protocol needs to be modified to pass errcode 
            as 32 bit value.
    ; NOTE: There is still disagreement in code in few places 
            in error type and 'int' is used internally, f.e. 
            sockets, some internal OS code conversion funtions.
    ; TODO: Different topic, but we use a lot of USHORTs to 
            store modes, tries, severity, operation, flags and
            few other things which would better be stored as 
            simple int probably.
    ; Please review me.
2009-11-16 10:32:49 +00:00
Viktor Szakats
43b0619081 2009-11-16 00:01 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* include/hbdefs.h
    - Deleted HB_ERRCODE. It already existed as HB_ERRCODE, 
      mainly used in RDD. That makes this change a bit more 
      complicated than I thought. Plus two more issues:
      1) Some places use ULONG already to pass error code, 
         changing these to HB_ERRCODE will instantly break 
         binary compatibility.
      2) I wonder if DOSERROR() and friends will stay compatible 
         after moving to ULONG HB_ERRCODE.
    ; Please comment.
2009-11-15 23:01:44 +00:00
Viktor Szakats
44ebc84a8b 2009-11-15 23:38 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* include/hbdefs.h
    + Added HB_ERRCODE. Currently the same as USHORT. Will be 
      changed to 'unsigned int' once all USHORT types have been 
      converted to HB_ERRCODE (where applicable).
2009-11-15 22:39:14 +00:00
Przemyslaw Czerpak
4be6249a73 2009-11-14 04:21 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbdefs.h
    * added small hack to eliminate negative handles from 32 bit windows
      builds. Please remember that this trick can work only in 32 bit
      windows version. In 64 bit ones valid handle after casting to integer
      value can give negative 64 bit number so checking for wrong handle
      please compare them with FS_ERROR (-1) instead of using < 0 or sth
      like that. Otherwise your code may not work properly with some new
      windows versions or may even suddenly stop to work with existing
      ones even if they worked for some time without problems.

  * harbour/src/rdd/dbf1.c
    * pacified warning after adding above hack

  * harbour/tests/cpinfo.prg
    ! removed unnecessary EOL reported by Viktor
2009-11-14 03:22:09 +00:00
Przemyslaw Czerpak
aec8ebcb85 2009-11-10 19:31 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbcdpreg.h
    * use macro instead of direct value

  * harbour/tests/cpinfo.prg
    + generate .c files with CP definition in human readable form
      when it's can be safely use or with optional binary table when
      it should be verified if such form is acceptable.
2009-11-10 18:32:19 +00:00
Przemyslaw Czerpak
b7a1bda9c0 2009-11-10 18:24 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/tests/cpinfo.prg
  * harbour/include/hbapicdp.h
  * harbour/include/hbcdpreg.h
    * modified format used for CP definition using binary tables
    + added Latin character striping from non Latin based CPs
    * changed warning message to be more clear. In most of cases when
      this message is shown:
         Warning: irregular CP which needs verification for human
                  readable definition in Harbour
      it should be possible to create human non binary CP definition.
      Usually it should be enough to copy HB_CP_UPPER and HB_CP_LOWER
      strings and verify if final result are compatible by comparing
      automatically generated .c file with binary tables. If you will
      find some CPs where it's not compatible then please inform me
      about it and I'll try to update cpinfo.prg
      When this message is shown:
         Warning: irregular CP which needs special definition in Harbour
                  using binary tables generated by this program
      then binary tables have to be used to replicate exact CP conditions.
      If no warning message is shown then human readable form of CP
      definition can be used without (I hope ;)) additional verification.

  * harbour/src/codepage/cpno865.c
  * harbour/src/codepage/cpit850m.c
  * harbour/src/codepage/cpis850.c
  * harbour/src/codepage/cpfr850.c
  * harbour/src/codepage/cpes850c.c
  * harbour/src/codepage/cpsv850m.c
  * harbour/src/codepage/cpde850m.c
  * harbour/src/codepage/cppt860.c
  * harbour/src/codepage/cpnl850m.c
  * harbour/src/codepage/cpnl850.c
  * harbour/src/codepage/cpde850.c
  * harbour/src/codepage/cpfi850.c
  * harbour/src/codepage/cpit850.c
  * harbour/src/codepage/cpis861.c
  * harbour/src/codepage/cpes850m.c
  * harbour/src/codepage/cpfr850m.c
  * harbour/src/codepage/cpsv437c.c
  * harbour/src/codepage/cpdk865.c
  * harbour/src/codepage/cpgr437.c
    * updated for new format
2009-11-10 17:25:29 +00:00