* include/hbdefs.h
* include/hbthread.h
* added HB_OS_SUNOS to be able to build under OpenSolaris 2008.11
using pthreads.
* source/common/hbprintf.c
* include ieeefp.h under OpenSolaris 2008.11
* harbour/source/vm/fm.c
! fixed typo in default FM module setting/
* harbour/include/hbapicls.h
* harbour/source/vm/classes.c
* harbour/source/debug/dbgentry.c
* renamed hb_dbgObjSendMessage() to hb_dbg_objSendMessage() to keep
naming convention used for other C debugger functions
* harbour/source/vm/debug.c
* added information about existing debugger functions and where they
are used.
* harbour/include/hbvm.h
* harbour/include/hbapidbg.h
* harbour/include/hbvmpub.h
* harbour/include/hbstack.h
* harbour/include/hbapi.h
* harbour/source/vm/codebloc.c
* harbour/source/vm/estack.c
* harbour/source/vm/hvm.c
* harbour/source/debug/dbgentry.c
* changed the method of static variable handling. Now we do not
have centralized array of all statics used by application (s_aStatics)
but each module uses it's own array to keep statics. The old
s_aStatics has been removed. It means that loading new PCODE module
from .hrb file or shared/dynamic library does not cause any static
table reallocation so it does not creates potential GPF trap for MT
code which may operate on static vars.
This modification changed a little bit the debugger interface.
I also updated some unused by us debug functions like __DBGVMVARSLIST()
or __DBGVMVARSLEN() anyhow any 3-rd party debuggers should be
updated for new API and modified hb_dbgEntry() syntax.
* harbour/include/hbdefs.h
* include stdint.h in DJGPP >= 2.4
* harbour/source/common/hbprintf.c
! fixed DJGPP <= 2.3 compilation
* harbour/source/common/hbstr.c
* force buffer ending in DJGPP <= 2.3 when vsprintf() is used
* harbour/source/rtl/hbproces.c
! fixed typo in HB_SYMBOL_UNUSED() variable name
* harbour/config/dos/global.cf
! fixed for GNU make ports which prefer COMSPEC before SHELL
* harbour/include/hbdefs.h
* added some C compilers which supports stdint.h
* harbour/source/common/hbprintf.c
* eliminated non portable GCC only C syntax.
* updated to compile with other C compilers.
Now only GNUC with C99 support and BORLAND C gives all
+inf/-inf/NaN values for [long] double conversions.
Other compilers uses NaN also for infinite numbers or nothing.
Please add full support for them. See TODO notes I left.
For compilers which supports C99 floating point macros should
be enough to enable the same macros used for GNUC && _ISOC99_SOURCE.
* harbour/contrib/hbcrypt/sha2.h
* harbour/contrib/hbcrypt/sha2.c
! fixed BCC5.5 compilation
TOFIX: harbour/contrib/hbssl/ssl.c[631], sslctx.c[268], sslctx.c[281]
error: invalid conversion from ‘void*’ to ‘const char*’
I do not know if SSL_get_ex_data()/SSL_CTX_get_app_data()
returns valid ASCIIZ string so I cannot decide if simple casting
is safe and to pacify above errors.
Viktor, can you look at it?
* common.mak
* include/hbextern.ch
* source/rtl/Makefile
+ source/rtl/strxor.c
+ Added HB_STRXOR() (work of Mindaugas Kavaliauskas)
* common.mak
* source/common/Makefile
+ source/common/hbprintf.c
+ Added hb_snprintf_c() (temp name, untested) (work of Przemyslaw Czerpak)
[ I've added a normal Harbour license, as per your permission
on the list. Pls give me feedback is this is wrong. ]
* source/rdd/usrrdd/example/exlog.prg
! Fixed missing #includes.
* source/rdd/usrrdd/example/hbmk_b32.bat
+ source/rdd/usrrdd/example/hbmk_vc.bat
+ Added MSVC make file.
! Added EOL to the last line to hbmk_b32.bat.
! xhb.lib dependency removed. It was not needed anyway.
; TOFIX: When compiling exhsx.prg, this happens:
exhsx.obj : error LNK2001: unresolved external symbol _HB_FUN_HSXRDD
* contrib/hbssl/sslsess.c
* contrib/hbssl/sslctx.c
* contrib/hbssl/sslciph.c
* Minor changes.
* harbour/config/darwin/gcc.cf
! changed CCACHE to HB_CCACHE
* harbour/include/hbatomic.h
! removed unnecessary volatile casting in Darwin atomic function
parameters
* harbour/source/compiler/harbour.y
! cleaned one untyped expression assign
(by Phil Krylov borrowed from xHarbour)
* harbour/bin/hb-func.sh
* updated contrib library last
* harbour/common.mak
* harbour/source/rtl/Makefile
- harbour/source/rtl/hbi18n.c
+ harbour/source/rtl/hbi18n1.c
* renamed hbi18n.c to hbi18n1.c to avoid conflicts with hbi18n
program - non GNU make files needs unique file names
! fixed bug in internal function __I18N_HASHTABLE()
* harbour/common.mak
* harbour/source/rtl/Makefile
+ harbour/source/rtl/hbi18n2.prg
+ added new I18N functions to manage .pot files and generate .hbl ones.
public functions:
HB_I18N_loadPot( <cFile>, [<pI18N>] [, @<cErrorMsg>] ) -> <pI18N> | NIL
Reads .pot file and returns Harbour translation set or NIL when
error appears. In such case <cErrorMsg> is contains error message
string. If second parameter [<pI18N>] is given then translation
items read from .pot file are added to this set. Otherwise new
Harbour translation set is created.
HB_I18N_savePot( <cFile>, <pI18N> [, @<cErrorMsg>] ) -> <lSuccess>
Generates .pot file from Harbour translation set. Please note
that Harbour translation set does not contain additional
information which exists in original .pot files like source
code numbers or alternative plural forms.
internal functions for Harbour developers which will work on I18N
tools:
__I18N_potArrayLoad( <cFile> [, @<cErrorMsg>] ) -> <aTrans> | NIL
Reads .pot file and returns array with translation items or
NIL when error appears. In such case <cErrorMsg> is contains
error message string.
<aTrans> is an array with translation items containing additional
informations from .pot file which are not necessary in final
translation sets used at runtime. It's designed for I18N tools
written in Harbour to manage .pot files and/or create .hbl ones.
__I18N_potArraySave( <cFile>, <aTrans> [, @<cErrorMsg>] ) -> <lSuccess>
Generates .pot file from array with translations items.
__I18N_potArrayJoin( <aTrans>, <aTrans2> ) -> <aTrans>
Join two arrays with translation items. Items from <aTrans2>
are added to <aTrans>. If given translation item already exists
in <aTrans> (the same msgctxt and msgid) then source code references
are merged and translations from <aTrans2> are added only if
<aTrans> does not have it.
__I18N_potArrayToHash( <aTrans>, [<lEmpty>] [, <hI18N>] ) -> <hI18N>
Converts array with translation items to hash table in the format
used internally by Harbour translation sets. It's the same format
as used __I18N_hashTable() function. The conversion removes data
which is not necessary for runtime translations like source code
references or alternative source plural forms.
If second parameter <hI18N> is given then translation items form
<aTrans> are added to it. Otherwise new hash table with is created.
If <lEmpty> is .T. then also items with empty translation are added
but source strings are used instead of missing destination ones.
* harbour/include/hbextern.ch
+ added new I18N functions
* harbour/harbour-win-spec
* harbour/harbour-wce-spec
* harbour/harbour.spec
* harbour/mpkg_tgz.sh
* harbour/make_b32.mak
* harbour/make_vc.mak
* harbour/make_gcc.mak
* harbour/common.mak
* harbour/utils/Makefile
+ harbour/utils/hbi18n
+ harbour/utils/hbi18n/hbi18n.prg
+ harbour/utils/hbi18n/Makefile
+ added very simple application to manage .pot/.hbl files
Syntax: hbi18n -m | -g [-o<outfile>] [-e] [-q] <files1[.pot] ...>
-m merge given .pot files
-g generate .hbl file from given .pot files
-o<outfile> output file name
default is first .pot file name with
.po_ (merge) or .hbl extension
-e do not strip empty translation rules from .hbl files
-q quiet mode
TODO: extend it and add support for interactive mode which will
allow to edit translations.
* harbour/include/hbgtcore.h
* harbour/source/rtl/hbgtcore.c
+ added two new methods:
TOUCHLINE() - marks line as modified
REDRAWDIFF() - it contains REFRESH() from which is now called so
it's possible to overload this method by upper level RDDs without
touching REFRESH() method which can be overloaded by intermediate
RDDs
* harbour/contrib/hbct/ctwin.c
% do not use EXPOSEAREA() and TOUCHCELL() methods but TOUCHLINE()
only and overloaded REDRAWDIFF() - it should gives noticeable
speed improvement in some where cost of screen update is very
big and GT does not calculate minimal update area.
* harbour/source/rdd/dbfnsx/dbfnsx1.c
% minor speed improvement in key decoding
* source/rtl/net.c
* contrib/hbziparc/hbziparc.prg
* contrib/hbct/files.c
* Minor formatting.
* source/rtl/gtxwc/gtxwc.c
! Fix to recent fix. An '!' was missing, Przemek pls check me.
* source/rtl/philes.c
+ HB_PROGNAME() now returns absolute path in *NIX systems, too.
(please test and refine)
* source/lang/msgca.c
! Fixes from xhb.
* contrib/hbziparc/hbziparc.prg
* Minor correction ( = -> := )
* source/rtl/gtwin/gtwin.c
+ Added HB_GTI_CODEPAGE support.
As per MS docs, this works only when non-raster font is used
in the console window. Notice that the accepted CP values are
different from the GTWVT ones (GTWIN being the more "logical"
one, since it's a newer API). Currently, Harbour doesn't try
to hide these interface details.
; TODO: UNICODE and BOX char support for GTWIN mode.
* source/rtl/tbrowse.prg
* Using HB_DISPOUTATBOX() to draw column/header/footer separators.
; NOTE: This may cause problems if someone wants to use native
CP (accented or other special CP specific) chars to draw
these screen elements. Maybe an option should be added,
or some sort of markings in the separator strings to
control that.
Pls REVIEW.
* include/hbextern.ch
* source/rtl/console.c
+ Added HB_DISPOUTATBOX() which is similar to HB_DISPOUTAT(),
but marks the text drawn as HB_GT_ATTR_BOX, so these chars
can be properly displayed as drawing chars, regardless of
the selected codepage. Another difference is that this
function only supports strings to be printed. Other types
don't print anything.
; NOTE: Maybe this function could use a better name, pls
review and decide.
* source/rtl/gtwvt/gtwvt.c
* source/rtl/gtwvt/gtwvt.h
! Fixed not accepting zero as a HB_GTI_CODEPAGE value.
! Fixed HB_GTI_CODEPAGE to change the codepage.
+ Added box char support in Unicode mode.
For chars marked as HB_GT_ATTR_BOX, chars will be
mapped to Unicode according to CP437.
+ Added box char support in non-Unicode mode.
For chars marked as HB_GT_ATTR_BOX, OEM_CHARSET will
always be used.
; NOTE: This way it's possible to use ISO/WIN codepages with
GTWVT, while still being able to use various drawing
chars (lines, blocks, arrows).
; NOTE: The available set of drawing chars depends on the
OS OEM_CHARSET mapping _for non-Unicode Harbour_.
For Unicode Harbour, full CP437 codepage is
always available.
; NOTE: This solution doesn't go as far as (GTWXC) to
graphically draw / emulate these chars.
; TODO: Add HB_GTI_BOXCP support to change hard-wired "EN" CP.
* include/hbapigt.h
* include/hbgtcore.h
! Moved HB_GT_ATTR_* macros to public headers, because they
are needed for public API functions.
* contrib/hbwin/win_reg.prg
+ w32_regRead(): Added second parameter to specify the default
value returned in case the reg entry doesn't exist.
If not specified, NIL will be returned, just like before.
+ GetRegistry(): Added 4th parameter with same purpose as above.
* source/rtl/hbregex.c
* Minor opt.
* contrib/hbwin/win_misc.c
* Added command line option parameter to WIN_RUNDETACHED().
* include/hbapi.h
+ HB_ERRCODE (to replace ERRCODE)
+ HB_SUCCESS (to replace SUCCESS)
+ HB_FAILURE (to replace FAILURE)
+ contrib/hbwin/win_misc.c
* contrib/hbwin/common.mak
* contrib/hbwin/Makefile
+ WIN_SHELLEXECUTE()
WIN_RUNDETACHED()
WIN_LOADRESOURCE()
Added some new Windows API wrappers.
; TODO: Add hb_osEncode() to them.
* source/rtl/diskspac.c
* source/rtl/disksphb.c
! Fixed DISKSPACE() and HB_DISKSPACE() for Darwin.
Previously they had returned erroneous values.
; TOFIX: Probably HB_DISKSPACE() should be implemented for Watcom and CEGCC,
just like DISKSPACE() is.
* source/rtl/filesys.c
! hb_fsGetAttr() to set the returned attribute to zero
in case of error.
* include/hbextern.ch
* source/rtl/philes.c
+ HB_FSETATTR( <cFileName>, @<nAttr> ) -> <lSuccess>
+ HB_FGETATTR( <cFileName>, <nAttr> ) -> <lSuccess>
+ HB_FSETDATETIME( <cFileName>, [<dDate>], [<cTime HH:MM:SS>] ) -> <lSuccess>
* source/rtl/direct.c
! Fixed DIRECTORY() when called with "V" (label) parameter.
Tested under Windows. Please test/correct for other platforms.
On Windows, the dirspec should not contain a filemask in order
to work.
* contrib/hbtip/base64x.c
% HB_BASE64(): Optimized, cleaned.
! HB_BASE64(): Removed second parameter allowing to pass the length of
the string. This could cause GPF if passed incorrectly. Now length
is simply determined using hb_parclen().
; TOFIX: Input string size limit checking.
* include/hbdefs.h
+ HB_SIZEOFARRAY() macro, which does: ( sizeof( var ) / sizeof( *var ) )
To be really precise, f.e. all hb_strncpy() calls should use
'hb_strncpy( d, s, HB_SIZEOFARRAY( d ) );' instead of:
'hb_strncpy( d, s, sizeof( d ) );' (given that 'd' is allocated at compile time).
So that the code adapts to changing character sizes (like UTF-16/32).
It's useful in some other places, too.
* contrib/hbct/dattime2.c
* 0 -> FALSE for BOOL types.
* include/hbextern.ch
* source/rtl/strmatch.c
+ HB_WILDMATCHI(). Case-instenstive, exact match. First
two parameters and return value are the same as for
HB_WILDMATCH().
* include/hbextern.ch
* source/rtl/cdpapi.c
+ HB_CDPSELECT() which does the same as HB_SETCODEPAGE(), but
aligns well with function naming rules and namespace.
HB_SETCODEPAGE() still works, but usage is not recommended.
+ Added HB_CDPUNIID( <cHarbourCP> ) -> <cCPName>
This will return the std CP ID of a Harbour CP, or empty
if the Harbour CP isn't linked.
* include/hbapi.h
* source/rtl/is.c
! Fixed compile error when HB_CDP_SUPPORT_OFF is defined.
+ Added following functions:
hb_charIsDigit()
hb_charIsAlpha()
hb_charIsLower()
hb_charIsUpper()
* include/hbapi.h
- hb_strUpperCopy() removed. Implementation was missing.
* source/rtl/strcase.c
* Minor formatting.
* source/rtl/filesys.c
! hb_fsCurDirBuff() fixed potential buffer overrun by one byte.
* source/rtl/hbrunfun.c
* source/rtl/run.c
! Fixed missing header hbapiitm.h (after previous local change).
* include/hbapi.h
* include/hbset.h
* include/hbapifs.h
* include/set.ch
* source/rtl/hbffind.c
* source/rtl/gete.c
* source/rtl/filesys.c
* source/rtl/hbrunfun.c
* source/rtl/run.c
* source/rtl/philes.c
* source/vm/set.c
* source/vm/cmdarg.c
+ Added file system CP translation.
Set( _SET_FNAMECP[, <cCPID> ] ) -> <cOldCPID>
All operations passing filenames to/from the
OS will convert them to/from the host CP from/to
the FS CP specified using _SET_FNAMECP.
* hb_fsNameConv() extended to deal with CP
conversion, if requested by the app.
+ hb_fsNameConvFrom() (exported) added to deal
with CP conversions for filenames received from OS.
+ hb_fsNameConvTo() (exported) added to deal
with CP conversions for filenames/string sent to the OS.
+ Added hb_setGetFNAMECP() (exported) function.
+ Added hb_setGetFileCPTransTo(), hb_setGetFileCPTransFrom()
(non-exported) functions.
+ hb_fsCurDirBuff() and hb_fsFindNextLow() extended
to use hb_fsNameConvFrom().
+ Added hb_fsBaseDirBuff() to return the base
directory on the C level (based on argv[0]).
+ Added HB_PROGNAME() to return the executable
program name (based on argv[0]).
+ Added HB_DIRBASE() to return the executable
base directory (based on argv[0]).
* Renames done regarding OS/FS CP conversion:
hb_fsNameConvFrom() -> hb_osDecode()
hb_fsNameConvTo() -> hb_osEncode()
hb_setGetFileCPTransTo() -> -
hb_setGetFileCPTransFrom() -> -
hb_setGetFNAMECP() -> hb_setGetOSCODEPAGE()
_SET_FNAMECP -> _SET_OSCODEPAGE
* hb_osDecode()/hb_osEncode() extended to have a second
parameter BOOL * fFree.
Changed all calls to handle the case when fFree is set
to TRUE by hb_osDecode()/hb_osEncode().
+ HB_GETENV(): Added 3rd logical parameter to control wether
to convert the returned value from OS CP to Harbour CP.
The default is TRUE to be in sync with GETE[NV]() and the
rest of core.
* hb_fsNameConv() is now doing OS CP conversion using std APIs,
rather than duplicating such logic. I've traded some speed
for modularity.
* hb_osDecode/hb_osEncode() function declarations moved to hbapi.h
* hb_osDecode/hb_osEncode() function definitions moved to set.c
; NOTE: None of these were extensively tested, and I tend
to make mistakes when dealing with pointers.
It compiles cleanly with BCC, and some basic tests
worked, but bFree = TRUE codepaths are not yet
working so this needs more review.
* source/rtl/teditor.prg
* source/rtl/tpersist.prg
* utils/hbmake/hbmake.prg
* MemoRead() -> hb_MemoRead()
* contrib/hbct/files.c
; TOFIX: Many functions here are possibly not thread safe.
; TOFIX: Calling hb_fsFindClose() at app exit (and thus keeping
the FF handles open for the whole app lifetime) doesn't
play well with server side apps (as the app may run for
months or even longer), and even worse, they
will lock the passed directory so that they cannot be
removed (maybe even renamed), until the app exists.
At least on Windows.
* source/rtl/dirdrive.c
! Fixed to use F_ERROR instead of -1.
* include/hbextern.ch
! Added missing HB_GCSTEP().
* source/vm/extrap.c
+ Added CPU dump code for Windows x64.
+ Enabled module listing for Windows 64-bit platforms.
% Minor cleanup in Windows x86 CPU dump code.
+ Added TODO for Windows IA64 CPU dump.
+ Added TODO for Windows x64 stack walk, with pointers.
+ Added TOFIX regarding displaying module names in Windows x64 mode.
* source/rtl/fstemp.c
! Minor formatting.
* source/rtl/gete.c
* source/rtl/run.c
* source/rtl/hbrunfun.c
* source/vm/cmdarg.c
+ Added CP conversion to:
GETE[NV](), HB_GETENV(), __RUN(), HB_RUN(),
HB_ARGSTRING(), HB_CMDLINE().
; TODO: dbCreateTemp( <cAlias>, <aStruct>, <cRDD>, <cDelimArg>, <nConnection> ) -> <lSuccess>
Generates and opens a new dbf with a temporary filename
in exclusive mode, deletes it automatically when closed.
All indexes created for this table, should ideally have
the temporary flag on, so those get deleted too, when closed.
; TOFIX: hb_regex*() functions will not honor Harbour CP setting,
when case insensitivity is selected.
; TOFIX: hbct / SetFDaTi() to move any local logic into Harbour core
functions and use a simple Harbour API call only.
I'm not sure what is the reason with keeping the logic
duplicated here; if this isn't by intent, this function
could be much simplified.
; TOFIX: Avoid using C level toupper()/tolower()/islower()/isupper()
; TOFIX: hb_regexMatch()'s 3rd parameter has a double meaning.
It controls case-sensitivity (in sync with the documentation),
but it also controls if hb_regexMatch() behaves like
hb_regexLike() (.T.), or hb_regexHas() (.F.). This means
that hb_regexMatch(,, .T.) == hb_regexLike(,, .T.) (case-sensitive) and
hb_regexMatch(,, .F.) == hb_regexHas(,, .F.) (case-insensitive)
Maybe this was the intent of the original developers, but
to me it looks a rather strange behaviour which was added by
accidentally forgetting about the 3rd parameter already being
utilized. This either needs to be fixed, or properly documented.
; NOTE: Noteworthy links:
http://docs.python.org/3.0/whatsnew/3.0.html
- Unicode/text section
- Removed <> (use != instead)
http://sphinx.pocoo.org/
- Documentation format
http://fredeaker.blogspot.com/2007/01/character-encoding-detection.html
- Character encoding detection
* harbour/source/rtl/gtxwc/gtxwc.c
! added protection against inaccessible character cell value
what could cause accessing uninitialized memory and GPF
* harbour/include/hbrdddbf.h
! fixed HB_DIRTYREAD() macro not updated when RDDI_* settings were
converted from global to thread local
* harbour/source/rdd/dbf1.c
* harbour/source/rdd/dbfntx/dbfntx1.c
* harbour/source/rdd/dbfnsx/dbfnsx1.c
* harbour/source/rdd/dbfcdx/dbfcdx1.c
* harbour/source/rdd/dbffpt/dbffpt1.c
% replaced <RDD>NODE_DATA() and <RDD>AREA_DATA() macros defined
in each RDD by common for all DBF bases RDDs DBFNODE_DATA() and
DBFAREA_DATA() macros defined in hbrdddbf.h to reduce possible
mistakes in code updating in the future
* harbour/common.mak
* harbour/source/rtl/Makefile
* harbour/include/hbapifs.h
* harbour/include/hbextern.ch
+ harbour/source/rtl/hbproces.c
+ harbour/source/rtl/hbprocfn.c
+ added C functions hb_fsOpenProcess(), hb_fsProcessValue(),
hb_fsCloseProcess()
+ added .prg functions HB_OPENPROCESS(), HB_PROCESSVALUE(),
HB_CLOSEPROCESS()
Based on xHarbour code by Giancarlo Niccolai.
Warning: it's possible that they will be changed in the future.
Please test current implementation. Now few notes about it.
Each handle returned by HB_OPENPROCESS() have to be closed
by HB_PROCESSVALUE(). Even if process is killed by HB_CLOSEPROCESS()
its handle is still open and HB_PROCESSVALUE() has to be executed.
Type of handle depends on OS. In *nixes it's process PID. In MS-Windows
it's HANDLE. HB_PROCESSVALUE() attach process exit result in *nixes
cleaning zombie processes and in Windows closing the HANDLE. If you
do not call this function then you will have resource leak.
HB_CLOSEPROCESS() only sends quite request to the process but does
not execute any cleanup code.
All communication handles returned in parameters by reference by
HB_OPENPROCESS() function have to be closed using FCLOSE() function.
If hStdOut and hStdErr are references to the same variables then
executing process stdout and stderr is redirected to the only one
pipe. When handles for stdout, stderr and stdin are not given then
executed process inherits them from parent process unless <lDetach>
parameter is not given. In such case they are redirected to null
device (/dev/null or NUL).
The OS2 version is not tested. Please make tests.
There is no support for DOS which is single process OS.
In WinCE builds std{out,err,in} redirecting and process detaching does
not work too.
The parameters parsing should be updated. Now MS-Windows version uses
native OS command line parsing and quoting by "" can be used for
parameters with blank characters. I do not know any escape character
which can be used to pass (") as parameter to MS-Windows application.
In all other OS-es standard bourne shell rules are used. Parameters can
be quoted by "" or '' and escape character is \. Quoting by '' disables
special meaning of escape character. In OS2 where \ is path separator
escaping and '' quoting is disabled so it works like in MS-Windows
but I do not know if parameters divided by calling process are fully
respected by low level API calls in this system.
* harbour/source/rtl/cdpapi.c
* harbour/source/rtl/langapi.c
* increase maximum number of lang and codepage modules from 64 to 128
(we already have more then 64)
* harbour/include/hbgtinfo.ch
+ added HB_GTI_BOXCP - it allows to chose CP for given characters put
by DISPBOX() and similar box drawing functions.
* harbour/source/rtl/gttrm/gttrm.c
+ added support for HB_GTI_BOXCP. Now it's possible to change the CP
used for box drawing characters. Before this modification is was
hardcoded to "EN"
* use codepage set by HB_SET{DISP|TERM}CP() also for box characters
if last parameter <lBox> is true
This functionality (using different CP for box drawing characters)
is available only if terminal works in Unicode mode (UTF8).
* harbour/source/vm/fm.c
* harbour/include/hbwmain.c
* use HeapAlloc( GetProcessHeap(), ... ) instead of LocalAlloc()
when HB_FM_WIN32_ALLOC macro is set - Toninho's tests show that
it's a little bit more efficient - thanks.
* harbour/include/hbgtcore.h
* harbour/source/rtl/hbgtcore.c
* changed BYTE bClearColor to USHORT uiClearColor
The following modifications were made by Viktor Szakats,
(2008-11-22 16:15 UTC+0100 - 2008-12-19 12:56 UTC+0100)
Many thanks. It's the first part without CP conversions in OS calls which
I will want to check yet. Please tests MS-Windows only modifications.
* harbour/make_vc.mak
* harbour/contrib/mtpl_vc.mak
+ Added support for A_USR.
* harbour/include/set.ch
* harbour/include/hbextern.ch
* harbour/source/vm/cmdarg.c
* harbour/source/vm/set.c
* harbour/source/rtl/tgetlist.prg
* harbour/source/rtl/gete.c
* harbour/contrib/hbhpdf/harupdf.c
* formatting
* harbour/source/rtl/hbffind.c
* Changed few places to use sizeof() instead of
explicit size macro.
* harbour/source/vm/extrap.c
+ Added module listing. (also supports Win64)
* harbour/source/common/hbver.c
+ Added Intel C compiler detection. (from xhb)
+ Added Wine detection (unofficial but stable looking
detection method. There intentionally doesn't exist
an official method to do this detection, yet there
are cases when this is necessary. It's also essential
for error reports.)
See also:
http://www.mail-archive.com/wine-devel@winehq.org/msg48659.html
* harbour/source/common/hbfopen.c
! Reverted recent change to use fopen_s(). fopen_s()
will always open in exclusive mode, so it could create
incompatibilities.
* harbour/source/codepage/cpbgmik.c
! Fixed BGMIK collation encoding. Someone familiar with
BG CPs please confirm this, but previously it was
almost certainly broken, as the collation was identical
to BG866.
* harbour/source/rtl/diskspac.c
* harbour/source/rtl/disksphb.c
! GetModuleHandleA() -> GetModuleHandle()
; NOTE: GetModuleHandleA() WinCE emulation in
source/common/wince.c might be unnecessary
after this change.
* harbour/source/rtl/memoedit.prg
* harbour/source/rtl/teditor.prg
! Cleaned insert handling. It now won't anymore mess up
the cursor on instantiation (in New() method). Internal
:lInsert state replaced by Set( _SET_INSERT ). Cursor
is only touched in the editing loop.
* harbour/source/rtl/version.c
! HB_VERSION( HB_VERSION_BUILD_DATE ): Fixed month
being off by one.
* harbour/contrib/hbmzip/hbmzip.c
! Fixed typo which caused timestamps stored in .zip files
to be wrong.
* harbour/contrib/hbhpdf/tests/harupdf.prg
! Minor typo in code.
* harbour/contrib/rddads/rddads.h
+ Added detection for ACE 9.10.
* harbour/contrib/hbtip/sendmail.prg
! Stricter parameter checking in hb_SendMail().
* harbour/contrib/examples/dbu/hb_dbu.dif
+ Added SET DATE ANSI and SET CENTURY ON
* harbour/source/rtl/gtxwc/gtxwc.c
+ Generating HB_K_RESIZE keystrokes on screen resize.
This way it's working similarly to gtwvt.
! Typos in comments.
* harbour/source/rtl/gtwin/gtwin.c
! Fixed HB_GTI_KBDSHIFTS not working in console mode.
Replaced GetKeyboardState() call with GetKeyState() calls.
* harbour/source/rtl/gtwvt/gtwvt.c
+ Added 'layered' window support. It's enabled on W2K
and above (and only when not in Terminal Services
environment, because it makes it perform worse). This
way the screen is also properly displayed regardless
of what the Harbour application does. It also fixes
numerous paint artifacts, when GTWVT window was in
the background and another window is moved in front
of it.
! Fixed only generate HB_K_RESIZE keystrokes when
resize mode is HB_GTI_RESIZEMODE_ROWS.
* harbour/include/hbexprb.c
+ added optimizations for var := var <op> <exp> => var <op>= <exp>
when <op> is +, -, *, / %, ^ operator
% cleanup up checking if message can be used as LValue
* harbour/include/hbcomp.h
* harbour/include/hbmacro.ch
* harbour/source/compiler/ppcomp.c
* harbour/source/compiler/hbusage.c
* harbour/source/compiler/cmdcheck.c
+ added -ko (allow operator optimizations) compiler switch
It's disabled by default.
* harbour/include/hbexprb.c
* removed HB_ADD_SUB_ONE_OPT macro and enable optimizations covered
by it when -ko switch is used.
* harbour/source/common/expropt2.c
* disabled <exp> + 0 => <exp>, <exp> + "" => <exp>, - - <exp> => <exp>
optimizations for default compiler settings. They can be enabled by
-ko compiler switch
+ added optimizations for numeric values and + operator which uses
standard mathematical + behavior for real numbers:
a + b + c == a + ( b + c )
a + b == b + a
It's disabled by default and can be enabled by -ko compiler switch.
There are also other similar optimizations which can be added in
this way.
* harbour/include/hbapi.h
* harbour/source/vm/itemapi.c
* harbour/source/vm/fm.c
! fixed redundant call to hb_xrealloc() in string resize operation.
Thanks to Mindaugas for locating it.
* harbour/include/hbstack.h
* harbour/include/hbapi.h
* harbour/include/hbapiitm.h
* harbour/source/vm/hashes.c
* small modifications in order of some structure members for better
alignment
* harbour/source/vm/hvm.c
* pacified BCC warnings
* harbour/contrib/rddsql/Makefile
* harbour/contrib/rddsql/sddpg/Makefile
+ harbour/contrib/rddsql/sddfb/Makefile
* updated GNU make files for new SQL RDDs - many thanks to
Mindaugas
* include/hbextern.ch
* source/rtl/seconds.c
+ implemented hb_milliseconds(). This function returns time value
from some moment in the past (not midnigth!). It does not start
to cound from zero in midnight, thus, can be safetly used to
measure time intervals.
+ tests/ticktime.c
+ Added nice test for hb_milliseconds().
Results on WinXP:
Ticks per second: 63.595
Min/avg/max interval (ms): 15.000 / 15.724 / 47.000
Loops per tick: 13035.09
Results on openSUSE on VirtualBox on WinXP:
Ticks per second: 384306.138
Min/avg/max interval (ms): 0.001 / 0.003 / 11.112
Loops per tick: 1.04
+ harbour/include/hbrddnsx.h
+ harbour/source/rdd/dbfnsx
+ harbour/source/rdd/dbfnsx/dbfnsx1.c
+ harbour/source/rdd/dbfnsx/Makefile
* harbour/config/global.cf
* harbour/make_b32.mak
* harbour/make_vc.mak
* harbour/make_gcc.mak
* harbour/common.mak
+ added new DBFNSX RDD. Those of you who knows SIX3 should also
know NSX index format. It's very interesting format and in some
cases much better then CDX. I hope you will find it interesting.
In hbrddnsx.h you can find detail information about Harbour NSX
implementation.
It's a small gift from me for Christmas ;-)
I would like to wish all of you Marry Christmas and Happy new Year.
best regards,
Przemek
* include/hberrors.h
* source/compiler/hbgenerr.c
* source/compiler/hbopt.c
+ implemented warning: Variable '%s' is never assigned in function %s(%d).
This variable can be replaced by value NIL
* source/rtl/treport.prg
% removed never assigned variable
* harbour/source/common/expropt1.c
* harbour/source/common/expropt2.c
! fixed wrongly modified expression during optimization for
( <numConst> / 0.0 )
* cleaned bDec/bWidth updating in compile time optimizations
* harbour/tests/speedtst.prg
! fixed possible race condition in initialization
+ added set workarea private for xHarbour builds - thanks to Phil
* harbour/doc/cmpopt.txt
* small cleanup
* harbour/include/hbvmpub.h
* harbour/source/vm/hvm.c
% some optimizations mostly for MT mode or compilers which do
not support function autoinline optimization
* harbour/include/hbsetup.h
* temporary disabled noreturn function attributes - we have some
code which puts references to some functions after hb_errInternal()
call to force link bindings which is fully optimized if hb_errInternal
is declared with noreturn attribute so we cannot use it as long as we
will not clean them.
* harbour/tests/speedtst.prg
* build default xHarbour binaries without support.
xHarbour needs separated version for MT and ST mode
because standard MT functions are not available in
ST libraries.
* harbour/ChangeLog
! cleaned some typos in my recent ChangeLog entries
* harbour/include/hbvm.h
* harbour/include/hbvmpub.h
* harbour/include/hbsetup.h
* harbour/include/hbapi.h
* harbour/include/hbapierr.h
* added some function attributes which can improve code optimization
or introduce some additional warnings.
Now it works only in GCC builds.
* harbour/source/vm/hvm.c
! fixed missing double decimal places initialization in some number
negating
! fixed setting number of decimal places in plus and minus operations
if integer overflow forces conversion to double item
* some minor optimizations
* harbour/source/rtl/rat.c
* formatting
* harbour/contrib/hbmysql/tmysql.prg
* harbour/contrib/hbpgsql/pgrdd.prg
* harbour/contrib/hbpgsql/tpostgre.prg
! fixed unused variables and meaningless assignment detected by new
compiler extension - many thanks to Mindaugas for it.
* harbour/include/hbsetup.h
+ added macros for some function attributes which can be used in
the future for optimizations
* harbour/source/rtl/filesys.c
* formatting
* harbour/source/rtl/hbtoken.c
* changed the behavior of " " token delimiter - now it works as
any other tokens. The old behavior can be still reach using empty
string "" as token delimiter. "" is not default token.
* harbour/utils/hbtest/hbtest.prg
* change error object to text conversion in hbtest so now it detects also
differences which were ignored by previous version, f.e. OPERATION
wrongly used instead of FILENAME or wrongly set TRIES flag.
* harbour/utils/hbtest/hbtest.prg
* harbour/utils/hbtest/rt_trans.prg
* harbour/utils/hbtest/rt_math.prg
* harbour/utils/hbtest/rt_hvm.prg
* harbour/utils/hbtest/rt_misc.prg
* harbour/utils/hbtest/rt_hvma.prg
* harbour/utils/hbtest/rt_class.prg
* harbour/utils/hbtest/rt_str.prg
* harbour/utils/hbtest/rt_stra.prg
* harbour/utils/hbtest/rt_date.prg
* harbour/utils/hbtest/rt_array.prg
* updated for extended error messages, tested with Harbour, Cl52/53
* harbour/include/hbapierr.h
* harbour/source/rtl/errorapi.c
+ added hb_errRT_FileError() used in file errors
! fixed TRIES counter updating when RETRY flag is set - it should
be done before calling error block not after - detected by new
hbtest error messages
; TOFIX: in practice all errors with RETRY flag generated by
other hb_errRT_*() functions have to be fixed because
new error object is created each time and informations
from previous one are lost, f.e. TRIES counter or CARGO
value set by user. They should be reimplemented in similar
way to hb_errRT_FileError()
* harbour/source/vm/memvars.c
* harbour/source/rtl/copyfile.c
* harbour/source/vm/set.c
! fixed wrong error messages detected by new hbtest in _SET_PRINTFILE,
_SET_ALTFILE and _SET_EXTRAFILE
; TOCHECK - Does CA-Cl*pper respect _SET_DEFAULT in above SETs?
* source/compiler/hbopt.c
! one more try to fix passing informatino about redundant variable
assignment by preprocessor rules, i.e., _nowarn_* hack removed,
using HB_SYMBOL_UNUSED() technique
* include/hbclass.ch
* include/std.ch
! fixed redundant nScope and GetList assignment
* contrib/rddado/adordd.prg
* contrib/xhb/cstruct.prg
* contrib/xhb/hblog.prg
* contrib/xhb/sprintf.prg
! fixed assigned but not used variable
* include/hbcomp.h
* source/compiler/hbmain.c
* source/compiler/hbopt.c
! fixed warnings of last commit
* contrib/hbpgsql/tpostgre.prg
! fixed assigned but not used variable
* include/hbclass.ch
* include/hbcomp.ch
* include/hberrors.h
* include/hbgenerr.c
* include/hbmain.c
* include/hbopt.c
+ PCode optimizations:
1) Self := QSELF(), Self:method -> QSELF():method
2) Declared, but unused variables are removed from code
These optimizations are enabled if jump optimizations are enabled.
+ added recursive pcode tree tracer. It is capable to generate new
warning: Variable %s is assigned, but not used.
Warning is not generated in these cases:
1) unoptimal Self := QSELF() pcode [generated by preprocessor rules]
2) if variable name starts with '_nowarn_'. This allows to
suppress warning in case unoptimal pcode is generated by
preprocessor rules
3) assigned value is NIL. This let us force garbage collection
using oVar := NIL
Warning has warning level 3.
; NOTE: if you are using -w3 -es2 in makefiles, you'll need to fix your
redundant code to compile the project
* source/rtl/achoice.prg
* source/rtl/browse.prg
* source/rtl/tbrowse.prg
* source/rtl/teditor.prg
* source/rtl/tget.prg
* source/rtl/tgetlist.prg
* source/rtl/tlabel.prg
* source/rtl/tmenusys.prg
* source/rtl/tpersist.prg
* source/rtl/treport.prg
* source/debug/dbgtmenu.prg
* source/debug/debugger.prg
* source/debug/dbgtobj.prg
* fixed 'assigned but not used' warnings
* utils/hbdoc/hbdoc.prg
* utils/hbdoc/genasc.prg
* utils/hbdoc/genhpc.prg
* utils/hbdoc/genhtm.prg
* utils/hbdoc/genchm.prg
* utils/hbdoc/genng.prg
* utils/hbdoc/genos2.prg
* utils/hbdoc/genrtf.prg
* utils/hbdoc/gentrf.prg
* utils/hbdoc/ft_funcs.prg
* utils/hbmake/hbmake.prg
* #pragma -w2
; NOTE: I've been fixing warnings in utils/hbdoc/* for 2 hours,
but only fixed half of files. There are a lot of garbage code here.
I do not thing this code is working...
I used fallback method: restored original files and used -w2
; NOTE: hbmake.prg has about 140 unused assignments.
I've also fallback to -w2, because some of unused code is complex,
ex., ASCAN() with block parameters. I'm not using hbmake, and I'm
affraid to break something important.
* compiler/hbpcode.c
- removed Ron's copyright on hb_compStrongType(). We do not have this
functions in the compiler at all. I guess this text is just a result
of .c header copy-paste from xHarbour's hbstrong.c some time ago.
* harbour/include/hbapicls.h
* harbour/source/vm/codebloc.c
* harbour/source/vm/proc.c
* harbour/source/vm/classes.c
+ added support for messages in PROCFILE()
* modified PROCFILE() and HB_METHODNAME() output - PROCFILE()
should be fully Clipper compatible and HB_METHODNAME() works
in a little bit different way for evaluated codeblocks created
in methods or associated with method and returns (b)<class>:<msg>
instead of (b)<method> so the output is more similar to xHarbour.
* harbour/contrib/gtwvg/gtwvg.h
! disabled NONAMELESSUNION - wvgwin.c uses TVINSERTSTRUCT item
member without union name what breaks MINGW compilation
* added hardcoded TVIS_EXPANDPARTIAL when it does not exist
in header files - MINGW 3.4 does not have it.
* harbour/include/hbthread.h
* harbour/source/vm/thread.c
+ added hb_atomic_set(), hb_atomic_get(), hb_atomic_inc() and
hb_atomic_dec() functions which operates on HB_COUNTER or smaller
type if it's necessary for some platforms which can be access/assign
increment/decrement in MT safe atom operations.
hb_atomic_dec() returns true if counter is 0 after decrementation
* harbour/include/hbatomic.h
! fixed compilation in Linux and OpenWatcom
* harbour/include/hbapiitm.h
* harbour/source/rtl/itemseri.c
+ make hb_itemSerialize() and hb_itemDeserialize() public functions
! fixed serialization items with internal item references
* harbour/source/vm/hvm.c
* release memvars after closing RDDs
* harbour/source/debug/dbgentry.c
! fixed buffer overflow reported by Rodrigo
* harbour/source/vm/macro.c
* harbour/source/compiler/hbmain.c
* formatting
* harbour/include/hbexprb.c
! fixed wrongly recognized functions with HB_I18N_ prefix as
HB_I18N_GETTEXT()
* harbour/include/hbapi.h
* harbour/include/hbstack.h
* harbour/include/hbthread.h
* harbour/source/vm/estack.c
* harbour/source/vm/thread.c
* harbour/source/vm/hvm.c
+ added support for I18N in HVM.
Each thread can have it's own i18n set.
When new thread is created then it inherits i18n set from parent
thread and both uses the same set (please remember about it if you
will want to make some direct modifications on active i18n set
internals).
When thread change active i18n set then it effects only this thread
and new threads which will be create later. It does not change i18n
in other existing threads.
+ added functions to set/get pointer to active i18n set in HVM
void * hb_vmI18N( void )
void hb_vmSetI18N( void * )
* harbour/include/hbapi.h
* harbour/source/rtl/hbi18n.c
+ added i18n module. Now only for internal Harbour usage without support
for optional switching to alternative implementations.
I'll add such functionality later when I will work on native gettext
support.
The following public .prg functions has been added:
HB_I18N_GETTEXT[_STRICT]( <cMsgID> [, <cContext> ] )
-> <cTranslatedMsgID> | <cMsgID>
HB_I18N_NGETTEXT[_STRICT]( <nValue>, <cMsgID> | <acMsgID> ;
[, <cContext> ] )
-> <cTranslatedMsgID> | <cMsgID> | <acMsgID>[ <nIndex> ]
This is minimal support necessary for .prg code which has to exists
in each i18n module working with Harbour.
The following functions had been added as public C API:
PHB_ITEM hb_i18n_gettext( PHB_ITEM pMsgID, PHB_ITEM pContext )
PHB_ITEM hb_i18n_ngettext( PHB_ITEM pNum,
PHB_ITEM pMsgID, PHB_ITEM pContext )
The following functions had been added as private HVM C API:
void hb_i18n_init( void )
void hb_i18n_exit( void )
void hb_i18n_release( void * cargo )
void * hb_i18n_alloc( void * cargo )
They have to be supported by alternative i18n modules
The following functions has been added to manage Harbour i18n
translations sets:
HB_I18N_CREATE()
-> <pI18N>
Creates new empty I18N translation set
HB_I18N_CODEPAGE( [<pI18N>,] [<cNewCP>], [<lBase>], [<lTranslate>] )
-> <cOldCP>
Gets or sets Harbour codepage used by translation set
<pI18N> - I18N translation set,
if it's not given then currently active I18N set is used
<cNewCP> - new CP ID. Must be linked with application
<lBase> - when it's .T. then get/set base massages CP instead of
translated massages CP
<lTranslate> - if it's .T. then translate base (<lBase>==.T.) or
final messages in I18N set from previous CP to
given one. Base messages translation in synced
with context ID translation.
HB_I18N_PLURALFORM( [<pI18N>,] [<cNewForm>|<bNewForm>], [<lBase>] )
-> <cOldForm>|<bOldForm>
Gets or sets plural form used for final or base messages
<pI18N> - I18N translation set,
if it's not given then currently active I18N set is used
<cNewForm> - language ID of plural form, f.e.: "EN", "PL", "LT".
Now only three above are supported. Please add rules
for other languages to source/rtl/hbi18n.c.
<bNewForm> - codeblock used to calculate plural form indexes.
can be used instead of character representation but
it's not storred in serialized I18N set
<lBase> - when it's .T. then get/set base massages plural form
instead of translated massages one.
HB_I18N_DESCRIPTION( [<pI18N>,] [<cNewDescription>] )
-> <cOldDescription>
Gets or sets translation set description. After serialization
up to 32 bytes is stored in header which can be easy used to
determinate type of translation file.
<pI18N> - I18N translation set,
if it's not given then currently active I18N set is used
<cNewDescription> - new description
HB_I18N_ADDTEXT( <pI18N>, <cMsgID>, <cTrans> | <acTrans> [, <cContext> ] )
-> NIL
Adds new message with translation to i18n translation set
<pI18N> - I18N translation set
<cMsgID> - original message
<cTrans> - translated message
<acTrans> - array with translated messages used for plural forms
<cContext> - message context
HB_I18N_SET( [ <pI18N> | NIL ] )
-> <lActive>
Sets given I18N translation set as default one used by
HB_I18N_[N]GETTEXT[_STRICT]() functions or remove translation
set for calling thread when passed parameter is NIL
<pI18N> - I18N translation set
Returns logical value which is .T. when i18n set is active
HB_I18N_SAVETABLE( [<pI18N>] )
-> <cTable>
Returns I18N translation as string item which can be stored
in file or database
<pI18N> - I18N translation set, if it's not given then currently
active I18N set is used
HB_I18N_RESTORETABLE( <cTable> )
-> <pI18N> | NIL
Restores I18N translation set from strin item.
<cTable> - I18N translation set in string representation
On success it returns new <pI18N> set otherwise NIL if <cTable>
is not valid item created by HB_I18N_SAVETABLE() or it's corrupted.
HB_I18N_HEADERSIZE()
-> <nHeaderSize>
Returns size of header used by i18n serialized version
HB_I18N_CHEK( <cTable> | <cHeader> [, @<cDescription> ] )
-> <lValid>
<cTable> - i18n translation set serialized by HB_I18N_SAVETABLE
<cHeader> - header of i18n translation set
( LEFT( <cTable>, HB_I18N_HEADERSIZE() )
<cDescription> - optional parameter passed by reference where
will be sored i18n translation set description
extracted from valid header
Returns logical value indicating if given table or header is
valid serialized by HB_I18N_SAVETABLE() data. It does not
decode the table though it validates size and control sums.
These functions are optional and some future alternative implementations
may not support all of them and/or may provide some other functions.
+ added unofficial .prg function __I18N_HASHTABLE() which allows to
access hash table used by i18n translation set or create new translation
set with given hash table. It's helper functions for developers which
will work on Harbour i18n tools and should not be used by Harbour users.
Unlike original gettext Harbour allows to use language with many
plural forms as base one. In such case programmer should activate
at application startup default i18n translation set with base plural
form valid for base application language, f.e. by:
pI18N := hb_i18n_create()
hb_i18n_pluralForm( pI18N, <cLangID> | <bForm>, .t. )
hb_i18n_set( pI18N )
.prg code example:
#xtranslate _( <x,...> ) => hb_i18n_gettext_strict( <x> )
#xtranslate _N( <x,...> ) => hb_i18n_ngettext_strict( <x> )
proc main()
local pI18N, i
pI18N := hb_i18n_create()
hb_i18n_pluralForm( pI18N, "PL", .t. )
hb_i18n_set( pI18N )
for i := 0 to 30
? i, _N( i, {"grosz", "grosze", "groszy"} )
if i > 0 .and. i % 10 == 0
wait
endif
next
return
In .pot files created during compilation by Harbour with -j option
for above code we have the following entries for message with plural
forms:
msgid "grosz"
msgid_plural "grosze"
msgid_plural2 "groszy"
msgstr[0] ""
The msgid_plural2 (and others if language has more plural forms)
is Harbour extension which is not gettext compatible.
The above implementation is base version but should be fully functional.
Now we will need functions to safe/read i18n files and tools to mange
.pot files: merge them, edit translations, create final binary i18n
translation sets. Because we are using gettext compatible .pot files
then for some of such jobs we can use original gettext tools but we
need at least function which will create translation set from one or
more .pot files.
We should also agree some default localization(s) for files containing
translated data, their name convention and environment variable(s)
to set default language. It's not strictly necessary and each user
can have his own implementation but it would help in adding new
translations by final users to any Harbour application which will
respect them. We can use LANG envvar to extract preferred language
and use the same path as executed application looking for files
<appname>-<lang>.hil files though it may create some problems for
OSes which support only 8.3 file names so we can also define that
HB_I18N envvar has higher priority and points to expected translation
file.
* harbour/include/hbextern.ch
- removed old __i18n_*() functions
+ added current i18n functions
* harbour/contrib/xhb/Makefile
* harbour/contrib/xhb/common.mak
+ harbour/contrib/xhb/xhbarr.c
+ added aSplice(), aRemove() and aMerge() functions - code borrowed
from xHarbour by Ron Pinkas.
! fixed GPF trap in these functions
* harbour/contrib/xhb/xhbfunc.c
+ added CSTR()
* harbour/contrib/xhb/hbcompat.ch
! changed name of xHarbour include files - they where changed few
months ago and now they are the same as in Harbour.
To xHarbour users: please update hbcompat.ch in xHarbour CVS
* harbour/contrib/xhb/filestat.c
! fixed UNICODE compilation
* harbour/contrib/xhb/hblognet.prg
* harbour/contrib/xhb/hblog.prg
* formatting
* harbour/contrib/hbnf/tempfile.prg
! do not use HB_ISBYREF() .prg function - this function does not
exist in Harbour and does not work correctly in xHarbour
* harbour/include/hbapiitm.h
* harbour/source/vm/macro.c
* harbour/source/vm/codebloc.c
* harbour/source/vm/hashes.c
* harbour/source/vm/garbage.c
* harbour/source/vm/itemapi.c
* harbour/source/vm/memvars.c
* cleanup
* harbour/contrib/gtwvg/Makefile
! fixed typo
* harbour/contrib/gtwvg/hbgtwvg.ch
* added new line at the end of file and changed non ANSI C // comments
to /* */ - this file is included by C code too.
* harbour/contrib/gtwvg/wvgwin.c
* harbour/contrib/gtwvg/wincallb.c
* pacified some warnings and fixed possible access to uninitialized data
* harbour/source/compiler/harbour.y
* harbour/source/compiler/harbour.yyc
! fixed possible double freeing of memory blocks in #line directives
TOMERGE[1.0]
* harbour/common.mak
* harbour/source/compiler/hbmain.c
+ harbour/source/compiler/compi18n.c
* moved hb_compI18n*() functions to separate file covered by GPL with
Harbour exception - Thank to Mindaugas
* harbour/include/hbcomp.h
* harbour/include/hbcompdf.h
* harbour/include/hbexpra.c
* harbour/include/hbexprop.h
* harbour/include/hbexprb.c
* harbour/source/common/expropt1.c
* harbour/source/compiler/Makefile
* harbour/source/compiler/ppcomp.c
* added support for plural forms:
hb_i18n_ngettext[_noop|_strict]( <nExp>, <cText> | <acText> ;
[, <cContext> )
<acText> is accepted only as array of literal strings even if
_strict suffix is missing - if it's a problem then we can change it.
hb_i18n_ngettext_noop() is reduced only when it has valid parameters
The default plural index expression used for reduction at compile
time is: iif( <nExp> == 1, 1, 2 )
If second parameter of hb_i18n_ngettext_noop() is <cText> or <acText>
length is 1 then it's reduced to <cText> or acText[1] else if second
parameter is <acText> with more then 1 item then it's reduced to
<acText>[ iif( <nExp> == 1, 1, 2 ) ]
and if <nExp> is literal numeric expression is farther reduced to
given array item. Otherwise is not reduced and warning is generated.
The plural forms in .pot files are generated as:
msgid ""
msgid_plural ""
msgid_plural2 ""
[...]
msgid_pluralN ""
msgstr[0] ""
Then real message ID is only msgid (with context if any) and
msgid_plural* is used only for information. When the same msgid
is used more then once in different hb_i18n_ngettext*() calls then
plural messages are merged.
Please remember that for strict gettext compatibility only two plural
forms are allowed.
* extended i18n warnings for simple types validation, f.e.:
hb_i18n_gettext( .t. )
* do not generate empty .pot file when source code does not contain any
hb_i18n_*() functions
* store in .pot files references to real source file names with paths
respecting #include directives
* use hb_compIdentifierNew() to hash i18n messages at compile time
! fixed possible bad escape encoding of i18n strings
+ added support to control -j[01] flag using #pragma directive
Before I'll begin to work on runtime support please test these
modifications and inform me about problems you can see with the
above version and missing functionality.
* include/hbapi.h
* source/vm/extend.c
+ Added hb_stordl() which is similar to hb_stords() but
accepts a Julian date in long numeric format similarly
to hb_retdl().
* contrib/xhb/Makefile
* contrib/xhb/common.mak
+ contrib/xhb/filestat.c
+ Added FILESTATS() function.
Work of Giancarlo Niccolai / xhb.
Minor cleanups made.
; Please test. (Only Win32/BCC platform was tested.)
* harbour/include/hbatomic.h
+ added support for built in GCC atomic functions: __sync_*()
They are present in GCC >= 4.1 if given CPU supports them. For
x86 CPU family the ones we use need at least i486 CPU. Please make
tests with other CPUs like PPC. If given platform/CPU does not support
them then GCC generate call to function __sync_*_<N>() where <N>
is size of given type used in atomic operation instead of storing
inlined assembler code.
* source/common/hbverdsp.c
* Streamlined the /build information screen. It's now
more compact and now show if tracing is enabled. Max
symbol length got removed, ANSI C startup also, because
it needs a custom C flag anyway.
* include/hbvmpub.h
* include/hbsetup.h
* HB_SYMBOL_NAME_LEN moved away from custom setup.
This isn't an option users should normally tinker.
* tests/run_prg.bat
* Minor.
* harbour/include/hbcompdf.h
* harbour/source/compiler/harbour.yyc
* harbour/source/compiler/harbour.y
! fixed compile time warnings for __enum* messages used in
simpled code block variables inside FOR EACH statement,
* harbour/include/hbapi.h
* harbour/source/common/hbstr.c
+ added hb_numToStr()
* harbour/source/vm/estack.c
* harbour/source/compiler/genc.c
* harbour/source/compiler/gencc.c
* use hb_numToStr() for integer number conversions
* harbour/source/vm/dlmalloc.c
* disable #pragma warning ... in MinGW builds. If some newer MinGW
versions support it and it's useful then it can be enabled after
checking MinGW version
* include/hbmath.h
! Fixed Pelles C 5.00 not having an 'inf' (HUGE_VAL) symbol
when in -Tarm-coff (~WinCE) mode. Pelles C bug (?).
; NOTE: Now core fully compiles in WinCE mode. So we have
a new port.
; TOFIX: (this is a complete list of all Pelles C WinCE problems)
[except hbmysql errors]
--- WARNINGS
POLINK: warning: Multiple '.rdata' sections found with different flags (0x40000040 and 0xc0000040).
POLINK: warning: Multiple '.rdata' sections found with different flags (0x40000040 and 0xc0000040).
../../ctnet.c(119): warning #2027: Missing prototype for 'WNetGetLastError'.
../../ctnet.c(167): warning #2027: Missing prototype for 'WNetCancelConnection'.
../../ctnet.c(208): warning #2027: Missing prototype for 'WNetAddConnection'.
../../ctnet.c(210): warning #2027: Missing prototype for 'WNetAddConnection'.
../../ctnet.c(251): warning #2027: Missing prototype for 'WNetGetProviderName'.
../../ctnet.c(271): warning #2027: Missing prototype for 'WNetGetProviderName'.
../../disk.c(127): warning #2027: Missing prototype for 'GetDriveType'.
../../disk.c(244): warning #2027: Missing prototype for 'SetVolumeLabel'.
../../disk.c(270): warning #2027: Missing prototype for 'GetVolumeInformation'.
../../disk.c(307): warning #2027: Missing prototype for 'GetVolumeInformation'.
../../disk.c(337): warning #2027: Missing prototype for 'GetFullPathName'.
../../winapi.c(194): warning #2027: Missing prototype for 'InsertMenuItem'.
../../winapi.c(219): warning #2027: Missing prototype for 'SetMenu'.
../../getenvrn.c(177): warning #2027: Missing prototype for 'GetEnvironmentStrings'.
../../getenvrn.c(246): warning #2027: Missing prototype for 'FreeEnvironmentStrings'.
contrib\hbsqlit3\sqlite3\sqlite3.c(9936): warning #2027: Missing prototype for 'localtime'.
../../tpwin32.c(75): warning #2027: Missing prototype for 'BuildCommDCB'.
../../wincorec.c(164): warning #2027: Missing prototype for 'CreateMDIWindow'.
../../fi_winfu.c(97): warning #2027: Missing prototype for 'CreateDIBitmap'.
../../fi_winfu.c(147): warning #2027: Missing prototype for 'GetDIBits'.
../../sqlbase.c(509): warning #2130: Result of unsigned comparison is constant.
--- ERRORS
contrib\gtwvg\gtwvg.h(78): fatal error #1035: Can't find include file <olectl.h>.
../../ctnet.c(119): warning #2027: Missing prototype for 'WNetGetLastError'.
../../disk.c(129): error #2048: Undeclared identifier 'DRIVE_RAMDISK'.
../../disk.c(129): error #2045: Case label must be a constant integer expression.
../../disk.c(132): error #2048: Undeclared identifier 'DRIVE_REMOVABLE'.
../../disk.c(132): error #2045: Case label must be a constant integer expression.
../../disk.c(135): error #2048: Undeclared identifier 'DRIVE_FIXED'.
../../disk.c(135): error #2045: Case label must be a constant integer expression.
../../disk.c(138): error #2048: Undeclared identifier 'DRIVE_CDROM'.
../../disk.c(138): error #2045: Case label must be a constant integer expression.
../../disk.c(141): error #2048: Undeclared identifier 'DRIVE_REMOTE'.
../../disk.c(141): error #2045: Case label must be a constant integer expression.
../../winapi.c(70): error #2048: Undeclared identifier 'CS_OWNDC'.
../../winapi.c(75): error #2048: Undeclared identifier 'IDI_APPLICATION'.
../../winapi.c(75): error #2140: Type error in argument 2 to 'LoadIconW'; found 'int', expected 'const wchar_t *'.
../../winapi.c(181): error #2048: Undeclared identifier 'MFS_DISABLED'.
../../getenvrn.c(177): error #2168: Operands of = have incompatible types 'wchar_t *' and 'int'.
../../odbc.c(94): fatal error #1035: Can't find include file <sql.h>.
contrib\hbsqlit3\sqlite3\sqlite3.c(9936): error #2168: Operands of = have incompatible types '(incomplete) struct tm *' and 'int'.
contrib\hbsqlit3\sqlite3\sqlite3.c(9937): error #2152: Unknown field 'tm_year' of '(incomplete) struct tm'.
contrib\hbsqlit3\sqlite3\sqlite3.c(9938): error #2152: Unknown field 'tm_mon' of '(incomplete) struct tm'.
contrib\hbsqlit3\sqlite3\sqlite3.c(9939): error #2152: Unknown field 'tm_mday' of '(incomplete) struct tm'.
contrib\hbsqlit3\sqlite3\sqlite3.c(9940): error #2152: Unknown field 'tm_hour' of '(incomplete) struct tm'.
contrib\hbsqlit3\sqlite3\sqlite3.c(9941): error #2152: Unknown field 'tm_min' of '(incomplete) struct tm'.
contrib\hbsqlit3\sqlite3\sqlite3.c(9942): error #2152: Unknown field 'tm_sec' of '(incomplete) struct tm'.
contrib\hbsqlit3\sqlite3\sqlite3.c(22136): error #2120: Redeclaration of 'localtime' previously declared at contrib\hbsqlit3\sqlite3\sqlite3.c(9936): found '(incomplete) struct tm * __cdecl function(const unsigned long int *)', expected 'int __cdecl function()'.
contrib\hbsqlit3\sqlite3\sqlite3.c(22137): error #2149: Undefined size for 'y' with type '(incomplete) struct tm'.
contrib\hbsqlit3\sqlite3\sqlite3.c(22137): error #2149: Undefined size for 'y' with type '(incomplete) struct tm'.
contrib\hbsqlit3\sqlite3\sqlite3.c(22147): error #2152: Unknown field 'tm_year' of '(incomplete) struct tm'.
contrib\hbsqlit3\sqlite3\sqlite3.c(22148): error #2152: Unknown field 'tm_mon' of '(incomplete) struct tm'.
contrib\hbsqlit3\sqlite3\sqlite3.c(22149): error #2152: Unknown field 'tm_wday' of '(incomplete) struct tm'.
contrib\hbsqlit3\sqlite3\sqlite3.c(22150): error #2152: Unknown field 'tm_mday' of '(incomplete) struct tm'.
contrib\hbsqlit3\sqlite3\sqlite3.c(22151): error #2152: Unknown field 'tm_hour' of '(incomplete) struct tm'.
contrib\hbsqlit3\sqlite3\sqlite3.c(22152): error #2152: Unknown field 'tm_min' of '(incomplete) struct tm'.
contrib\hbsqlit3\sqlite3\sqlite3.c(22153): error #2152: Unknown field 'tm_sec' of '(incomplete) struct tm'.
../../win_ole.c(77): fatal error #1035: Can't find include file <olectl.h>.
../../wincorec.c(150): error #2048: Undeclared identifier 'WS_MAXIMIZE'.
../../wincorec.c(166): error #2168: Operands of = have incompatible types 'HWND' and 'int'.
C:\devl\allegro-4.2.2\include\allegro\platform\almsvc.h(23): fatal error #1035: Can't find include file <malloc.h>.
../../firebird.c(456): error #2149: Undefined size for 'times' with type '(incomplete) struct tm'.
../../firebird.c(487): error #2152: Unknown field 'tm_year' of '(incomplete) struct tm'.
../../firebird.c(488): error #2152: Unknown field 'tm_mon' of '(incomplete) struct tm'.
../../firebird.c(489): error #2152: Unknown field 'tm_mday' of '(incomplete) struct tm'.
../../firebird.c(490): error #2152: Unknown field 'tm_hour' of '(incomplete) struct tm'.
../../firebird.c(491): error #2152: Unknown field 'tm_min' of '(incomplete) struct tm'.
../../firebird.c(492): error #2152: Unknown field 'tm_sec' of '(incomplete) struct tm'.
../../firebird.c(501): error #2152: Unknown field 'tm_year' of '(incomplete) struct tm'.
../../firebird.c(501): error #2152: Unknown field 'tm_mon' of '(incomplete) struct tm'.
../../firebird.c(501): error #2152: Unknown field 'tm_mday' of '(incomplete) struct tm'.
../../firebird.c(510): error #2152: Unknown field 'tm_hour' of '(incomplete) struct tm'.
../../firebird.c(511): error #2152: Unknown field 'tm_min' of '(incomplete) struct tm'.
../../firebird.c(512): error #2152: Unknown field 'tm_sec' of '(incomplete) struct tm'.
../../fi_winfu.c(98): error #2048: Undeclared identifier 'CBM_INIT'.
../../fi_winfu.c(99): error #2168: Operands of = have incompatible types 'HBITMAP' and 'int'.
* make_b32.mak
* make_vc.mak
! Added hbpp.lib and hbcommon.lib to HBRUN_DLL liblist.
* include/hbapi.h
* source/vm/cmdarg.c
* source/common/hbver.c
* source/common/hbverdsp.c
* source/rtl/console.c
* source/rtl/setcolor.c
* source/rtl/setcurs.c
+ Added HB_EXPORT to some functions to make it possible
to build hbrun-dll.exe.
For other reasons, it only works if Harbour built with
set C_USR=-DHB_DYNLIB.
; TODO: Make HB_DYNLIB the default build mode, do gradual
steps to remove separate DLL building pass, and
finally to remove HB_BUILD_DLL option.
The only drawback will be about 10-100K
(currently) overhead in final executable size due
to included export table for BCC and MSVC builds.