2017-09-12 15:13 UTC Viktor Szakats (vszakats users.noreply.github.com)
* bin/check.hb
* config/*/*.mk
* contrib/gtwvg/wvgwing.c
* contrib/hbcomm/comm.prg
* contrib/hbfbird/tfirebrd.prg
* contrib/hbfimage/fi_wrp.c
* contrib/hbformat/hbfmtcls.prg
* contrib/hbformat/utils/hbformat.prg
* contrib/hbhttpd/core.prg
* contrib/hbnetio/utils/hbnetio/hbnetio.prg
* contrib/hbnetio/utils/hbnetio/netiomgm.hb
* contrib/hbsqlit3/hdbc.prg
* contrib/hbwin/win_bmp.c
* contrib/xhb/htmutil.prg
* contrib/xhb/thtm.prg
* contrib/xhb/xhbarr.c
* contrib/xhb/xhbtedit.prg
* ChangeLog.txt
* debian/control
* debian/copyright
* doc/*.txt
* LICENSE.txt
* package/harbour.spec
* README.md
* src/compiler/hbusage.c
* src/pp/hbpp.c
* src/rtl/memoedit.prg
* src/rtl/teditor.prg
* src/rtl/tget.prg
* src/rtl/version.c
* utils/hbi18n/hbi18n.prg
* utils/hbmk2/hbmk2.prg
* utils/hbmk2/po/hbmk2.hu.po
* utils/hbtest/hbtest.prg
* sync with 3.4 fork (no change in functionality)
CC3 -> CC4 license, copyright banners, some strings, minor
code changes, doc folder, TOFIX -> FIXME
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
https://en.wikipedia.org/wiki/C_standard_library
|
||||
|
||||
+++Date last modified: 1997-07-05
|
||||
|
||||
|
||||
|
||||
@@ -59,43 +59,43 @@ Note:
|
||||
to enumerator item changes the original string only if it was passed
|
||||
to FOR EACH statement by reference, i.e.:
|
||||
FOR EACH c IN @string
|
||||
IF ! isAlpha( c )
|
||||
c := "*"
|
||||
IF IsAlpha( c )
|
||||
c := Upper( c )
|
||||
ELSE
|
||||
c := upper( c )
|
||||
c := "*"
|
||||
ENDIF
|
||||
NEXT
|
||||
- after the loop the controlling variable(s) restore the value which
|
||||
they had before entering the loop
|
||||
- the enumerator variable supports the following properties
|
||||
:__enumIndex - the loop counter for variable
|
||||
:__enumKey - the hash key value of traversed hash item pair
|
||||
:__enumBase - the value that is being traversed
|
||||
:__enumValue - the value of variable
|
||||
:__enumIsFirst - is it the first enumerated item?
|
||||
:__enumIsLast - is it the last enumerated item?
|
||||
:__enumIndex() - the loop counter for variable
|
||||
:__enumKey() - the hash key value of traversed hash item pair
|
||||
:__enumBase() - the value that is being traversed
|
||||
:__enumValue() - the value of variable
|
||||
:__enumIsFirst() - is it the first enumerated item?
|
||||
:__enumIsLast() - is it the last enumerated item?
|
||||
- defining new class or overloading existing one user can define
|
||||
his own behavior of FOR EACH iterating overloading chosen of above
|
||||
methods and/or the following ones:
|
||||
:__enumStart
|
||||
:__enumSkip
|
||||
:__enumStop
|
||||
:__enumStart()
|
||||
:__enumSkip()
|
||||
:__enumStop()
|
||||
By default FOR EACH iterate all object instance variables
|
||||
|
||||
for example:
|
||||
a := 'A'
|
||||
b := 'B'
|
||||
a := "A"
|
||||
b := "B"
|
||||
FOR EACH a, b IN { 1, 2, 3, 4 }, "abcd"
|
||||
? a, b //prints: 1 a
|
||||
// 2 b
|
||||
// 3 c
|
||||
// 4 d
|
||||
? a, b // prints: 1 a
|
||||
// 2 b
|
||||
// 3 c
|
||||
// 4 d
|
||||
NEXT
|
||||
? a, b //prints: A B
|
||||
? a, b // prints: A B
|
||||
|
||||
// you can use EXIT statement inside the loop
|
||||
FOR EACH a IN { 1, 2, 3, 4 }
|
||||
IF a:__enumindex == 3
|
||||
IF a:__enumIndex() == 3
|
||||
? a
|
||||
EXIT
|
||||
ENDIF
|
||||
@@ -107,13 +107,13 @@ for example:
|
||||
a *= 2
|
||||
str := Upper( str )
|
||||
NEXT
|
||||
// now 'arr' stores { 2, 4, 6 }
|
||||
// howerer 'str' still stores "abc"
|
||||
// now `arr` stores { 2, 4, 6 }
|
||||
// however `str` still stores "abc"
|
||||
|
||||
Notice the difference:
|
||||
FOR EACH a IN someValue
|
||||
? a:__enumindex //prints current value of the index
|
||||
? (a):__enumindex //sends '__enumindex' message to the current value
|
||||
? a:__enumIndex() // prints current value of the index
|
||||
? ( a ):__enumIndex() // sends `__enumindex()` message to the current value
|
||||
NEXT
|
||||
|
||||
|
||||
@@ -129,7 +129,7 @@ Harbour supports the following statement:
|
||||
form of sending messages to the object. You can use the syntax
|
||||
:message( [params] )
|
||||
:property
|
||||
to send messages to the object specified by 'expression'
|
||||
to send messages to the object specified by `expression`
|
||||
|
||||
for example:
|
||||
WITH OBJECT myobj:a[ 1 ]:myitem
|
||||
@@ -142,7 +142,7 @@ for example:
|
||||
myobj:a[ 1 ]:myitem:value := 9
|
||||
|
||||
Inside WITH OBJECT/END you can access (or even assign a new object)
|
||||
using a special reserved property :__withobject
|
||||
using a special reserved property :__withObject()
|
||||
|
||||
The runtime error will be generated at the time of message
|
||||
sending (or property access/assign) if <objexpression>
|
||||
@@ -150,16 +150,16 @@ for example:
|
||||
|
||||
for example:
|
||||
CREATE CLASS foo
|
||||
VAR name INIT 'FOO'
|
||||
VAR name INIT "FOO"
|
||||
ENDCLASS
|
||||
|
||||
CREATE CLASS bar
|
||||
VAR name INIT 'BAR'
|
||||
VAR name INIT "BAR"
|
||||
ENDCLASS
|
||||
|
||||
WITH OBJECT foo():new()
|
||||
? :name //prints 'FOO'
|
||||
? :__withobject:name //also prints 'FOO'
|
||||
? :__withobject := bar():new()
|
||||
? :name //prints 'BAR'
|
||||
? :name // prints `FOO`
|
||||
? :__withObject():name // also prints `FOO`
|
||||
? :__withObject := bar():new()
|
||||
? :name // prints `BAR`
|
||||
ENDWITH
|
||||
|
||||
@@ -93,6 +93,6 @@ Exceptions:
|
||||
|
||||
|
||||
[ Copyright (c) 1999-2009 Viktor Szakats (vszakats.net/harbour)
|
||||
Licensed under Creative Commons Attribution-ShareAlike 3.0:
|
||||
http://creativecommons.org/licenses/by-sa/3.0/
|
||||
See COPYING.txt. ]
|
||||
Licensed under Creative Commons Attribution-ShareAlike 4.0:
|
||||
<https://creativecommons.org/licenses/by-sa/4.0/>
|
||||
See LICENSE.txt ]
|
||||
|
||||
@@ -47,9 +47,9 @@ optimized at compile time:
|
||||
hb_mutexCreate()
|
||||
|
||||
|
||||
2. Expresion optimization:
|
||||
2. Expression optimization:
|
||||
|
||||
Just like Clipper Harbour compiler can optimize some expresions if
|
||||
Just like Clipper Harbour compiler can optimize some expressions if
|
||||
arguments are well known and can be calculated at compile time:
|
||||
|
||||
- Clipper compatible:
|
||||
@@ -144,7 +144,7 @@ arguments are well known and can be calculated at compile time:
|
||||
<nConst1> ^ <nConst2> => <nConst>
|
||||
<aValue> [ <nConst> ] => <xArrayItem>
|
||||
( <expr> ) => <expr> // it allows to optimize
|
||||
// expresions like: 1+(2)
|
||||
// expressions like: 1+(2)
|
||||
|
||||
- Harbour syntax extensions not supported by Clipper, enabled by -ko
|
||||
compiler switch:
|
||||
@@ -157,8 +157,8 @@ arguments are well known and can be calculated at compile time:
|
||||
i.e.:
|
||||
iif( dData == NIL, dDate, aVal[ 1 ] ) := date()
|
||||
iif( empty( x ), aVal[ 2 ], nTmp ) += 10
|
||||
? iif( f1(), nVal1, nVal2 ) ++
|
||||
? -- iif( f2(), aVal[ 1 ], hVal[ "abc" ] )
|
||||
? iif( f1(), nVal1, nVal2 )++
|
||||
? --iif( f2(), aVal[ 1 ], hVal[ "abc" ] )
|
||||
|
||||
- Harbour extensions which may disable RT errors in wrong expressions
|
||||
or can change used operators using basic math rules. Enabled by -ko
|
||||
@@ -198,11 +198,11 @@ Unlike Clipper Harbour tries to optimize all expressions.
|
||||
If some code needs strict Clipper behavior then it can be forced by using
|
||||
-kc Harbour compiler switch. It disables Harbour extensions and enables
|
||||
replicating some Clipper bugs like optimizing "" $ <cConst> to .T. at
|
||||
compile time (at runtime and in macrocompiler it's always .F. in Clipper
|
||||
compile time (at runtime and in macro-compiler it's always .F. in Clipper
|
||||
and Harbour).
|
||||
|
||||
Expressions fully optimized to constant values at compile time can be used
|
||||
to intialize static variables, f.e.:
|
||||
to initialize static variables, f.e.:
|
||||
static s_var := ( 1 + 2 / 3 )
|
||||
|
||||
Clipper does not optimize expression used in LOCAL, PRIVATE and
|
||||
@@ -233,11 +233,11 @@ or:
|
||||
or:
|
||||
? &cLocalPref.func&cPriv1( cPriv2, &cStatic )
|
||||
etc.
|
||||
If possible then for macrocodeblocks Harbour compiler tries to
|
||||
If possible then for macro-codeblocks Harbour compiler tries to
|
||||
generate early eval code in which macros are expanded when codeblock
|
||||
is created. Otherwise macros are expanded each time codeblock is
|
||||
evaluated.
|
||||
This feature can be useful also in porting some other xbase compatible
|
||||
This feature can be useful also in porting some other xBase compatible
|
||||
code to Harbour because some compilers just like xHarbour accepted
|
||||
in some limited way officially unsupported syntax with macros using
|
||||
declared symbols.
|
||||
@@ -247,7 +247,7 @@ declared symbols.
|
||||
Harbour has additional optimization phase which operates on generated PCODE.
|
||||
It can also reduce expressions, joins jumps, removes death or meaningless
|
||||
code which can appear after all other optimizations and were not optimized
|
||||
by expression optimizer. It can also optimize readonly local variables
|
||||
by expression optimizer. It can also optimize read-only local variables
|
||||
keeping the QSelf() value. QSelf() is not real function call but very fast
|
||||
single PCODE often used in OOP code. Harbour can replace local variables
|
||||
keeping it by direct QSelf() usage.
|
||||
|
||||
@@ -48,14 +48,18 @@ to it. This is caused by the fact that a inner codeblock can be created during
|
||||
evaluation of outer codeblock when local variables don't exist like in this
|
||||
example:
|
||||
|
||||
PROCEDUE Main()
|
||||
PROCEDURE Main()
|
||||
|
||||
PRIVATE foo, bar
|
||||
|
||||
Test()
|
||||
Eval( foo )
|
||||
Eval( bar )
|
||||
|
||||
RETURN
|
||||
|
||||
PROCEDURE Test()
|
||||
|
||||
LOCAL a := "FOO", b := "BAR"
|
||||
|
||||
foo := {|| a + ( bar := Eval( {|| b } ) ) }
|
||||
@@ -73,14 +77,15 @@ used. The negative value is used as an index to distinguish it from the
|
||||
reference to a codeblock parameter.
|
||||
|
||||
|
||||
Incompatbility with the Clipper.
|
||||
Incompatibility with the Clipper.
|
||||
|
||||
1) Detached locals passed by reference
|
||||
1. Detached locals passed by reference
|
||||
There is a little difference between the handling of variables passed by
|
||||
the reference in a codeblock.
|
||||
The following code explains it (thanks to David G. Holm)
|
||||
|
||||
PROCEDURE Main()
|
||||
|
||||
LOCAL nTest
|
||||
LOCAL bBlock1 := MakeBlock()
|
||||
LOCAL bBlock2 := {|| DoThing( @nTest ), QOut( "From Main: ", nTest ) }
|
||||
@@ -91,14 +96,16 @@ PROCEDURE Main()
|
||||
RETURN
|
||||
|
||||
FUNCTION MakeBlock()
|
||||
|
||||
LOCAL nTest
|
||||
|
||||
RETURN {|| DoThing( @nTest ), QOut( "From MakeBlock: ", nTest ) }
|
||||
|
||||
FUNCTION DoThing( n )
|
||||
PROCEDURE DoThing( n )
|
||||
|
||||
n := 42
|
||||
|
||||
RETURN NIL
|
||||
RETURN
|
||||
|
||||
|
||||
In Clipper it produces:
|
||||
@@ -109,18 +116,22 @@ From Main: 42
|
||||
From MakeBlock: 42
|
||||
From Main: 42
|
||||
|
||||
2) Scope of undeclared variables
|
||||
2. Scope of undeclared variables
|
||||
Consider the following code:
|
||||
|
||||
PROCEDURE Main()
|
||||
LOCAL cb
|
||||
cb := Detach()
|
||||
|
||||
LOCAL cb := Detach()
|
||||
|
||||
? Eval( cb, 10 )
|
||||
|
||||
RETURN
|
||||
|
||||
FUNCTION Detach()
|
||||
|
||||
LOCAL b := {| x | x + a }
|
||||
LOCAL a := 0
|
||||
|
||||
RETURN b
|
||||
|
||||
In Clipper the 'a' variable in a codeblock has the *local* scope however in
|
||||
@@ -130,10 +141,13 @@ this code will print 10 and in Harbour it will raise 'argument error' in
|
||||
This will be true also when the 'a' variable will be declared as PRIVATE
|
||||
|
||||
PROCEDURE Main()
|
||||
|
||||
LOCAL cb
|
||||
PRIVATE a
|
||||
|
||||
cb := Detach()
|
||||
? Eval( cb, 10 )
|
||||
|
||||
RETURN
|
||||
|
||||
The above code also prints 10 in Clipper (even if compiled with -a or -v
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/* Please note the following comments we may use everywhere
|
||||
NOTE: Notes
|
||||
TODO: something should be added here
|
||||
TOFIX: something needs to be fixed
|
||||
FIXME: something needs to be fixed
|
||||
OBSOLETE: something could be removed from here
|
||||
QUESTION: I had some questions at this point but I could not get an answer
|
||||
OPT: something is commented out to improve performance
|
||||
@@ -76,13 +76,7 @@ Code Implementation
|
||||
Function calls in assert conditions may also cause this problem, if
|
||||
they modify one of their arguments or global variables.
|
||||
|
||||
[7] When commenting out code using a #if statement, do NOT use 0 only. Instead
|
||||
use "<cvs username here>_0". For example, #if FOO_0, where FOO is your
|
||||
cvs user foo. This allows easier tracking of why code was commented out,
|
||||
especially in bundled libraries.
|
||||
|
||||
|
||||
[8] Use hb_xgrab()/hb_xalloc(), hb_xfree(), hb_xrealloc(), hb_xsize() to
|
||||
[7] Use hb_xgrab()/hb_xalloc(), hb_xfree(), hb_xrealloc(), hb_xsize() to
|
||||
manage memory allocations. These functions implement an internal
|
||||
"safety-net" mechanism that ensures the deallocation of any unfreed
|
||||
memory at the end of an application. They also provide useful
|
||||
@@ -113,7 +107,7 @@ Naming Conventions
|
||||
|
||||
[4] Static variables should be prefixed with 's_'
|
||||
|
||||
[5] Global variables (variables shared beetwen modules) should be
|
||||
[5] Global variables (variables shared between modules) should be
|
||||
prefixed with 'hb_<module_prefix>', e.g. hb_vm_bDebug, hb_gc_pStart
|
||||
|
||||
|
||||
@@ -126,7 +120,7 @@ Syntax and indentation
|
||||
accept C++-style comments in C code, you have to ensure that your
|
||||
code would compile with other compilers as well.
|
||||
|
||||
[2] Don't use K&R-style. Of course, we can't and don't want to
|
||||
[2] Do not use K&R-style. Of course, we cannot and do not want to
|
||||
force anybody to use a style he or she is not used to, but,
|
||||
at the very least, when you write code that goes into the core
|
||||
of Harbour or one of its standard modules, please don't use the K&R
|
||||
@@ -169,8 +163,8 @@ Documentation
|
||||
[1] Whenever be possible document yourself functions you developed.
|
||||
Usually it's hard to understand code written by other person, moreover
|
||||
when it involves some obscure algorithm, system's vars or attributes
|
||||
or data unavailable for the documentator.
|
||||
This is particularly evident for low level functions.
|
||||
or data unavailable for the documentation writers.
|
||||
This is particularly evident for low-level functions.
|
||||
|
||||
[2] After some time function was written, work becomes more difficult because
|
||||
it's needed to read the code several times (even for the own developer).
|
||||
@@ -192,11 +186,11 @@ Documentation
|
||||
|
||||
[6] If you are the developer of the function, and you are using system's
|
||||
functions or vars undocumented, please explain it as much as possible.
|
||||
If you use a obscure or strange algorithm (i.e md5 ) please explain what
|
||||
it does and how it works.
|
||||
If you use a obscure or strange algorithm please explain what it does
|
||||
and how it works.
|
||||
|
||||
[7] Notes, remarks and explainings enclose always between the /* */ pair,
|
||||
please don't use the double bar // because it difficults portability.
|
||||
[7] Notes, remarks and explaining enclose always between the /* */ pair,
|
||||
please don't use the double bar // because it may break portability.
|
||||
|
||||
[8] Remember... documentation it's a much time consuming work, usually
|
||||
takes more time writing the documentation of a function that writing
|
||||
|
||||
@@ -38,25 +38,25 @@ destroyed by Garbage Collector in a special way. GC scans all items known
|
||||
to HVM and marks them as used, then destroys all items which are not marked.
|
||||
The reference counters in such items are greater then zero and cannot
|
||||
be directly used to detect bugs in a user code. So GC collects all
|
||||
unaccessible items and then executes cleanup functions for each of them,
|
||||
inaccessible items and then executes cleanup functions for each of them,
|
||||
and finally checks if reference counters reached zero before it will
|
||||
free the memory blocks. If they didn't then RT error is generated for
|
||||
the first memory block. All items which are still accessible, are not
|
||||
freed and if GC can recognize a type of an item then it will also try to
|
||||
convert it to some empty form (f.e. empty array).
|
||||
The destructors are executed from cleanup functions so they all will be
|
||||
executed and then, if there is sth wrong, RT error will be generated for
|
||||
the first memory block which was copied to some external structures.
|
||||
executed and then, if there is something wrong, RT error will be generated
|
||||
for the first memory block which was copied to some external structures.
|
||||
Please note that the order in which destructors are executed by GC
|
||||
can be diffrent then some logical order defined by an application. HVM
|
||||
can be different then some logical order defined by an application. HVM
|
||||
does not know anything about programmer's ideas so a programmer has to
|
||||
create a code which will be safe for such situations. HVM only guaranties
|
||||
that destructors will be executed only once for each object.
|
||||
This also cannot break HVM integrity for standard object items which are
|
||||
represented as arrays. But if the problem is inside cleanup function of
|
||||
a GC POINTER item, which has a structure unknown to HVM, then any further
|
||||
behavior can be unpredictible if a programmer, who created such pointer
|
||||
items, doesn't support such situation himslef in his C code. It's a good
|
||||
behavior can be unpredictable if a programmer, who created such pointer
|
||||
items, doesn't support such situation himself in his C code. It's a good
|
||||
practice to add some type of marker to body of memory allocated by
|
||||
hb_gcAlloc() to detect bugs in .prg code destructors which may keep
|
||||
pointers to freed POINTER item (these could be destructors of differ
|
||||
@@ -71,7 +71,7 @@ situation.
|
||||
|
||||
In summary, Harbour destructor implementation should be able to detect
|
||||
bugs in destructor and keep HVM integrity. But we are not able to
|
||||
guarantiee that nothing wrong will happen with 3-rd party code which
|
||||
guarantee that nothing wrong will happen with 3rd party code which
|
||||
uses POINTER items scanned by GC, which are not safe for .prg code
|
||||
bugs in destructors and repeated cleanup function execution.
|
||||
|
||||
@@ -88,9 +88,9 @@ some other structures, the object destructors will not be executed.
|
||||
Clearing STATIC variables before closing classy subsystem will not help
|
||||
because STATIC variables are integral part of this subsystem.
|
||||
|
||||
Anomalies and excpetions
|
||||
Anomalies and exceptions
|
||||
------------------------
|
||||
In some situations HVM may clear items when exception apear, f.e.
|
||||
In some situations HVM may clear items when exception appear, f.e.
|
||||
BREAK or QUIT request. In such case executing the exception type
|
||||
is stored and destructors are executed and finally the exception
|
||||
restored. But in destructors code new exception can appear. In such
|
||||
|
||||
@@ -4,11 +4,11 @@ Harbour directory structure
|
||||
Follow are the various directories that exist under the Harbour tree.
|
||||
|
||||
|
||||
<harbour> - Main Harbour directory. Contain all the various
|
||||
| make file and Changelog (=changes history) files.
|
||||
<root> - Main Harbour directory. Contains all the various
|
||||
| make file and Changelog (=changes history) file.
|
||||
|
|
||||
+---bin - Executable and build scripts.
|
||||
| Should contain harbour and other executables. (*)
|
||||
+---bin - Executable and helper scripts.
|
||||
| Should contain Harbour and other executables. (*)
|
||||
|
|
||||
+---config - Configuration Files (.mk) for the GNU Make system.
|
||||
| |
|
||||
@@ -32,7 +32,7 @@ Follow are the various directories that exist under the Harbour tree.
|
||||
|
|
||||
+---debian - Packaging information for Debian GNU/Linux.
|
||||
|
|
||||
+---doc - Documentation and white-paper.
|
||||
+---doc - Documentation and white-papers.
|
||||
| |
|
||||
| +---en - English documentation.
|
||||
|
|
||||
@@ -44,7 +44,7 @@ Follow are the various directories that exist under the Harbour tree.
|
||||
| |
|
||||
| +---codepage - National codepage collection.
|
||||
| |
|
||||
| +---common - Common function and Expression Optimizer.
|
||||
| +---common - Common function and expression optimizer.
|
||||
| |
|
||||
| +---compiler - Harbour compiler module.
|
||||
| |
|
||||
@@ -53,11 +53,10 @@ Follow are the various directories that exist under the Harbour tree.
|
||||
| +---hbextern - Library with all function binding available for
|
||||
| | .prg code
|
||||
| |
|
||||
| +---3rd/pcre - Harbour implementation of the Perl Compatible
|
||||
| | Regular Expressions (PCRE) library.
|
||||
| |
|
||||
| +---3rd/zlib - Harbour implementation of the ZLIB data
|
||||
| | compression library.
|
||||
| +---3rd - Locally hosted copies of 3rd party libraries
|
||||
| | required by core code or deemed important enough
|
||||
| | to be provided as part of core.
|
||||
| | (plays a role primarily on non-*nix systems)
|
||||
| |
|
||||
| +---lang - National language message support files.
|
||||
| |
|
||||
@@ -65,7 +64,7 @@ Follow are the various directories that exist under the Harbour tree.
|
||||
| |
|
||||
| +---main - Harbour compiler main source.
|
||||
| |
|
||||
| +---pp - Harbour Preprocessor.
|
||||
| +---pp - Harbour preprocessor.
|
||||
| |
|
||||
| +---rdd - Replaceable Database Driver (RDD).
|
||||
| | |
|
||||
@@ -77,7 +76,7 @@ Follow are the various directories that exist under the Harbour tree.
|
||||
| | |
|
||||
| | +---dbfntx - DBFNTX RDD.
|
||||
| | |
|
||||
| | +---hbsix - SIX compatible functions.
|
||||
| | +---hbsix - SIx compatible functions.
|
||||
| | |
|
||||
| | +---hsx - HiPer-SEEK / CFTS compatible library.
|
||||
| | |
|
||||
@@ -87,7 +86,7 @@ Follow are the various directories that exist under the Harbour tree.
|
||||
| | |
|
||||
| | +---example - Usage examples.
|
||||
| | |
|
||||
| | +---rdds - A set of simple RDD's all written in PRG.
|
||||
| | +---rdds - A set of simple RDDs all written in PRG.
|
||||
| |
|
||||
| +---rtl - Run-Time libraries functions and various General
|
||||
| | | Terminal (GT) implementation
|
||||
@@ -96,11 +95,11 @@ Follow are the various directories that exist under the Harbour tree.
|
||||
| | |
|
||||
| | +---gtcrs - GT subsystem based on ncurses.
|
||||
| | |
|
||||
| | +---gtdos - GT subsystem for MS-DOS compilers.
|
||||
| | +---gtdos - GT subsystem for MS-DOS platform.
|
||||
| | |
|
||||
| | +---gtgui - Minimal GT for Windows GUI programs.
|
||||
| | |
|
||||
| | +---gtos2 - GT subsystem for OS/2 compilers.
|
||||
| | +---gtos2 - GT subsystem for OS/2 platform.
|
||||
| | |
|
||||
| | +---gtpca - GT subsystem for ANSI terminals.
|
||||
| | |
|
||||
@@ -124,11 +123,11 @@ Follow are the various directories that exist under the Harbour tree.
|
||||
| +---vm - Harbour Virtual Machine and internal Run-Time
|
||||
| | library functions.
|
||||
| |
|
||||
| +---mainstd - mainstd library for MinGW build.
|
||||
| +---mainstd - mainstd helper library.
|
||||
| |
|
||||
| +---mainwin - mainwin library for MinGW build.
|
||||
| +---mainwin - mainwin helper library.
|
||||
| |
|
||||
| +---vmmt - GNU Makefile for creating the multithreaded version
|
||||
| +---vmmt - GNU Makefile for creating the multi-threaded version
|
||||
| of the VM library.
|
||||
|
|
||||
+---tests - Test programs.
|
||||
@@ -138,7 +137,7 @@ Follow are the various directories that exist under the Harbour tree.
|
||||
| |
|
||||
| +---hbpptest - Regression tests for the preprocessor.
|
||||
| |
|
||||
| +---mt - Various multithreading tests.
|
||||
| +---mt - Various multi-threading tests.
|
||||
| |
|
||||
| +---multifnc - Overloading C functions test.
|
||||
| |
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
INTRODUCTION
|
||||
============
|
||||
|
||||
This file explains the philosophy for the GNU-make based build system
|
||||
This file explains the philosophy for the GNU Make based build system
|
||||
for Harbour, and gives instructions on how to use it.
|
||||
|
||||
|
||||
PHILOSOPHY
|
||||
==========
|
||||
|
||||
This build system is based on GNU-make, the idea being that GNU-make
|
||||
is freely available for every platform you can dream up, and it is
|
||||
This build system is based on GNU Make, the idea being that GNU Make
|
||||
is free software, available for every platform you can dream up, and it is
|
||||
usually more powerful than any native make.
|
||||
|
||||
Each directory in the project contains one makefile, called Makefile,
|
||||
Each directory in the project contains one Makefile, called Makefile,
|
||||
which lists the data (file names, directory names, etc.) that is used
|
||||
to determine how to bring every target up to date within that
|
||||
directory. There are no rules in the Makefiles, to keep them
|
||||
@@ -23,13 +23,12 @@ For example, the following was the Makefile for an early version
|
||||
of the VM library:
|
||||
|
||||
-- Cut here ---------------------------------------
|
||||
|
||||
ROOT := ../../
|
||||
|
||||
C_SOURCES := \
|
||||
dynsym.c \
|
||||
hvm.c \
|
||||
initsymb.c \
|
||||
dynsym.c \
|
||||
hvm.c \
|
||||
initsymb.c \
|
||||
|
||||
LIB := vm
|
||||
|
||||
@@ -51,7 +50,6 @@ What this means is:
|
||||
Let's look at another Makefile, this one for the Harbour compiler:
|
||||
|
||||
-- Cut here ---------------------------------------
|
||||
|
||||
ROOT := ../../
|
||||
|
||||
YACC_SOURCE := harbour.y
|
||||
@@ -59,7 +57,7 @@ YACC_SOURCE := harbour.y
|
||||
LEX_SOURCE := harbour.l
|
||||
|
||||
C_SOURCES := \
|
||||
genobj32.c \
|
||||
genobj32.c \
|
||||
|
||||
C_MAIN=harbour.c
|
||||
|
||||
@@ -79,12 +77,12 @@ One final Makefile, this one from the source directory:
|
||||
ROOT := ../
|
||||
|
||||
DIRS := \
|
||||
compiler \
|
||||
hbpp \
|
||||
rtl \
|
||||
vm \
|
||||
rdd \
|
||||
tools \
|
||||
compiler \
|
||||
hbpp \
|
||||
rtl \
|
||||
vm \
|
||||
rdd \
|
||||
tools \
|
||||
|
||||
include $(TOP)$(ROOT)config/dir.mk
|
||||
-- Cut here ---------------------------------------
|
||||
@@ -113,8 +111,8 @@ files compiled with gcc). This has two advantages:
|
||||
USAGE
|
||||
=====
|
||||
|
||||
To use the system, you need to install GNU-make 3.81 or later on your
|
||||
system. To check this, type "make -v"; you should see
|
||||
To use the system, you need to install GNU Make 3.81 or later on your
|
||||
system. To check this, type `make -v`; you should see
|
||||
|
||||
GNU Make 3.81
|
||||
Copyright (C) 2006 Free Software Foundation, Inc.
|
||||
@@ -123,63 +121,47 @@ system. To check this, type "make -v"; you should see
|
||||
Then, you must set a couple of environment variables that indicate
|
||||
your platform and compiler.
|
||||
|
||||
For gcc on Windows with the Cygwin library:
|
||||
Notes: The CYGWIN environment variable must include "noglob" in order
|
||||
to avoid having Harbour or programs created with Harbour expand
|
||||
wildcard command line arguments (this is checked at run-time!)
|
||||
HB_PLATFORM win
|
||||
HB_COMPILER gcc
|
||||
CYGWIN noglob
|
||||
|
||||
For gcc on Windows with the MinGW library:
|
||||
For MinGW (GCC port for Windows):
|
||||
HB_PLATFORM win
|
||||
HB_COMPILER mingw
|
||||
|
||||
For MSVC on Windows:
|
||||
Notes: gnu make is case sensitive! If your editor converts
|
||||
harbour.c to HARBOUR.C when it saves the file, then gnu make
|
||||
Notes: GNU Make is case sensitive! If your editor converts
|
||||
harbour.c to HARBOUR.C when it saves the file, then GNU Make
|
||||
_will_not_work.
|
||||
If you have MAKE_MODE in your dos environment, make sure it is
|
||||
not set to unix
|
||||
not set to Unix
|
||||
|
||||
For best results, also set:
|
||||
HB_PLATFORM win
|
||||
HB_COMPILER msvc
|
||||
|
||||
For GCC on BSD:
|
||||
HB_PLATFORM bsd
|
||||
HB_COMPILER gcc
|
||||
Notes:
|
||||
1) You have to have bison and gmake installed in order to build
|
||||
Harbour for BSD. The file doc/howtobsd.txt gives an overview
|
||||
of what is required.
|
||||
|
||||
For GCC on Linux:
|
||||
HB_PLATFORM linux
|
||||
HB_COMPILER gcc
|
||||
Notes:
|
||||
1) If you want to take advantage of compiler cache programs
|
||||
(such as http://ccaache.samba.org), you may set environment
|
||||
|
||||
Note: If you want to take advantage of compiler cache programs
|
||||
(such as https://ccache.samba.org), you may set environment
|
||||
variable HB_CCACHE with the value containing the name of program.
|
||||
|
||||
For GCC on BSD:
|
||||
HB_PLATFORM bsd
|
||||
HB_COMPILER gcc
|
||||
|
||||
Note: You have to have bison and gmake installed in order to build
|
||||
Harbour for BSD. The file doc/howtobsd.txt gives an overview
|
||||
of what is required.
|
||||
|
||||
For GCC on OS/2 for VIO mode:
|
||||
Note: You must point C_INCLUDE_PATH to the EMX include directory and
|
||||
you must also point LIBRARY_PATH to the EMX library directory.
|
||||
HB_PLATFORM os2
|
||||
HB_COMPILER gcc
|
||||
|
||||
For Borland C++
|
||||
HB_PLATFORM win
|
||||
HB_COMPILER bcc
|
||||
|
||||
For DJGPP (GCC port for MS-DOS)
|
||||
HB_PLATFORM dos
|
||||
HB_COMPILER djgpp
|
||||
|
||||
For Watcom C/C++ 10.x (default Makefile creates DOS4G extender executables)
|
||||
HB_PLATFORM dos
|
||||
HB_COMPILER watcom
|
||||
|
||||
The most used targets are these:
|
||||
|
||||
* all: Same as typing "make" without arguments. It will usually try to
|
||||
@@ -197,8 +179,8 @@ See README.md about details.
|
||||
|
||||
|
||||
You can build and/or run any program in tests/working by using hbmk2
|
||||
and hbrun. For example, 'hbmk2 scroll.prg -run' will build the scroll.prg
|
||||
program and then run it. 'hbrun scroll.prg' will run the program as
|
||||
and hbrun. For example, `hbmk2 scroll.prg -run` will build the scroll.prg
|
||||
program and then run it. `hbrun scroll.prg` will run the program as
|
||||
a script. You can also pass parameters to the program. For example,
|
||||
'hbrun readfile.prg harbour.ini' will rebuild the readfile.prg program
|
||||
and run it with 'harbour.ini' as a command line parameter.
|
||||
`hbrun readfile.prg harbour.ini` will rebuild the readfile.prg program
|
||||
and run it with `harbour.ini` as a command-line parameter.
|
||||
|
||||
@@ -14,7 +14,7 @@ implementation of the _gt functions. These are functions named with
|
||||
gtxxxxxx convention and are called by the _gt functions in gtapi.c.
|
||||
I've provided the following files to implement the console functions:
|
||||
|
||||
gtdos.c - MS-DOS implemenation
|
||||
gtdos.c - MS-DOS implementation
|
||||
gtwin.c - Windows implementation
|
||||
gtos2.c - OS/2 implementation
|
||||
gtxxx.c - Generic template for implementation
|
||||
@@ -22,7 +22,7 @@ gtxxx.c - Generic template for implementation
|
||||
If you wish to port the gt functions to another platform, just take the
|
||||
gtxxx.c and populate it with calls to your OSes functions. Call the file
|
||||
something appropriate (gtmac.c, gtnext.c or whatever) and add it to
|
||||
that platforms makefile.
|
||||
that platforms Makefile.
|
||||
|
||||
The API supports a dozen or so compilers on three platforms. You only
|
||||
have to change the gtxxx.c files to implement your platform.
|
||||
@@ -40,19 +40,19 @@ directly anyway. Just compile gtapi.c alone with a #define of TEST to see
|
||||
the output (or build a PRG test if you want).
|
||||
|
||||
You must include gtapi.c and one of the platform implementation files
|
||||
to compile sucessfully!
|
||||
to compile successfully!
|
||||
|
||||
There are exceptions for various compilers in the platform implementation
|
||||
files so if you're using a compiler that doesn't support certain routines
|
||||
or syntax just stick in your changes and surround it with an
|
||||
#if defined(__XXX__) call.
|
||||
`#if defined( __XXX__ )` call.
|
||||
|
||||
This is a complete set of gt functions as defined by Clipper. That is
|
||||
there are no new _gt functions added. But this is not a complete
|
||||
implementation. I do not know what _gtBegin or _gtEnd will do for
|
||||
implementation. I do not know what _gtBegin() or _gtEnd() will do for
|
||||
instance. Yes, they buffer the display but what does that really mean
|
||||
under the covers? Perhaps someone needs to implement a screen buffer
|
||||
to write to in order to achive this but the issue that immediately comes
|
||||
to write to in order to achieve this but the issue that immediately comes
|
||||
to mind is how to initialize the size of this buffer?
|
||||
|
||||
The files are attached but I will NOT be checking them into cvs for the
|
||||
@@ -63,20 +63,20 @@ overwrite someones code. If the author wants to remove his file and check
|
||||
this in then be my guest.
|
||||
|
||||
2. This is my vision of how "I" think the gt API should be implemented.
|
||||
Perhaps it isn't Antonio's or anyone elses so review it and if you feel
|
||||
Perhaps it isn't Antonio's or anyone else's so review it and if you feel
|
||||
that it deserves being put into Harbour I'll leave that up to you.
|
||||
|
||||
TODO:
|
||||
The following functions are not implemented in gtapi.c:
|
||||
_gtPostExt
|
||||
_gtPreExt
|
||||
_gtScroll
|
||||
_gtSetBlink
|
||||
_gtSetMode
|
||||
_gtPostExt()
|
||||
_gtPreExt()
|
||||
_gtScroll()
|
||||
_gtSetBlink()
|
||||
_gtSetMode()
|
||||
|
||||
The following functions don't work in gtapi.c:
|
||||
_gtSave
|
||||
_gtRestore
|
||||
_gtSave()
|
||||
_gtRestore()
|
||||
|
||||
Two Harbour functions are included in the gtapi.c file,
|
||||
Row() and Col() to get started.
|
||||
@@ -171,12 +171,15 @@ For example, compile this code:
|
||||
/*** t.prg ***/
|
||||
REQUEST HB_GT_WIN
|
||||
REQUEST HB_GT_WVT
|
||||
|
||||
PROCEDURE Main()
|
||||
|
||||
? hb_gtVersion(), hb_gtVersion( 1 )
|
||||
Tone( 200, 3 )
|
||||
Tone( 300, 3 )
|
||||
Tone( 500, 3 )
|
||||
Inkey( 0 )
|
||||
|
||||
RETURN
|
||||
|
||||
and link it as Windows GUI application. Then simply execute:
|
||||
@@ -213,19 +216,19 @@ driver in GUI application. You can even create mixed GUI/CUI code in one
|
||||
program.
|
||||
|
||||
And finally, the Tone() function problem.
|
||||
Low level TONE code is part of GT driver. In the past, GUI libraries in
|
||||
Windows were linked the whole GTWIN driver and only TONE were used. It
|
||||
Low-level Tone() code is part of GT driver. In the past, GUI libraries in
|
||||
Windows were linked the whole GTWIN driver and only Tone() were used. It
|
||||
was possible because someone blocked GTWIN to work with application
|
||||
linked as Windows GUI programs. Now, GTWIN can be used with any
|
||||
applications, and I do not want reduce its functionality. So GUI
|
||||
libraries which needs TONE should have their own GT driver which will
|
||||
libraries which needs Tone() should have their own GT driver which will
|
||||
support it. Now, such GT driver can also give much more features for
|
||||
final users, because it allow to integrate GUI library with standard
|
||||
Clipper screen functions.
|
||||
|
||||
How to create such base GUI GT driver?
|
||||
See as example GTGUI in src/rtl/gtgui/gtgui.c
|
||||
It supports only TONE and CLIPBOARD operations.
|
||||
It supports only Tone() and CLIPBOARD operations.
|
||||
GUI libraries can use it or create other GT driver inheriting from
|
||||
this one.
|
||||
|
||||
@@ -237,16 +240,16 @@ gtnul - base GT driver from which each other inherits.
|
||||
It's present on all platforms and i always linked.
|
||||
|
||||
gtcgi - very simple GT driver which does not make any output
|
||||
formatting and simply send it as to stdout.
|
||||
formatting and simply send it as to STDOUT.
|
||||
Supported by all platforms.
|
||||
|
||||
gtstd - it uses stdout output but tries to support full screen output but
|
||||
without collor support and cursor shape. It format text to number
|
||||
gtstd - it uses STDOUT output but tries to support full screen output but
|
||||
without color support and cursor shape. It format text to number
|
||||
of row and columns if is able to detect these values on given
|
||||
platform.
|
||||
Supported by all platforms.
|
||||
|
||||
gtpca - It's PCANSI terminal GT - it works in similar way to ANSI GT
|
||||
gtpca - It's PC-ANSI terminal GT - it works in similar way to ANSI GT
|
||||
driver in Clipper though keyboard input is not fully supported.
|
||||
Now GTTRM can make all GTPCA job and much more.
|
||||
Supported by all platforms.
|
||||
@@ -258,7 +261,7 @@ gtdos - GT driver for MS-DOS - it uses BIOS and direct hardware screen output
|
||||
Clipper compatible.
|
||||
Supported only by MS-DOS builds.
|
||||
|
||||
gtos2 - GT driver for OS/2 - It's sth like GTWIN but for other OS.
|
||||
gtos2 - GT driver for OS/2 - It's similar to GTWIN but for another OS.
|
||||
Supported only by OS/2 builds.
|
||||
|
||||
gtwin - GT driver for MS-Windows console window.
|
||||
@@ -302,14 +305,14 @@ gtwvt - GT driver for MS-Windows. It creates its own GUI window
|
||||
gtwvg - GUI emulation of GTWVT. It implements itself on top of GTWVT.
|
||||
GTWVG ( WVTGUI in xHarbour ) offers functions and classes to
|
||||
present a console application look like a windows one.
|
||||
It renderes GUI elements on top of Clipper elements
|
||||
It renders GUI elements on top of Clipper elements
|
||||
( GETS, BROWSERS, BOXES, LINES ) which makes them
|
||||
feel like a Windows element. GTWVG can be used with existing
|
||||
code just adding some more code but without sacrificing or
|
||||
modifying old one.
|
||||
Also all IO commands can be rendered on top of the GUI elements
|
||||
gtxwc - GT driver for X-Window. It's like GTWVT but for nixes.
|
||||
Additionaly it has set of predefined vector characters
|
||||
Additionally it has set of predefined vector characters
|
||||
(box and arrow drawing characters) which can be used
|
||||
instead of the one defined in font. It means that you
|
||||
will have all boxes and arrows you know from MS-DOS and CP437
|
||||
@@ -318,12 +321,12 @@ gtxwc - GT driver for X-Window. It's like GTWVT but for nixes.
|
||||
for simple program which demonstrates it.
|
||||
Supported by POSIX systems (mostly different *nixes)
|
||||
|
||||
gtalleg- GT driver which uses alegro library for input/output.
|
||||
gtalleg- GT driver which uses Allegro library for input/output.
|
||||
It's also GUI driver which support HB_GFX*() drawing.
|
||||
Multi platform, works on all platforms for which allegro
|
||||
library has been ported: MS-Win, MS-DOS, VESA, X11, FB, SDL, ...
|
||||
library has been ported: MS-Windows, MS-DOS, VESA, X11, FB, SDL, ...
|
||||
|
||||
gtgui - pseudo GT driver which adds to GTNUL Clipboard and Tone
|
||||
gtgui - pseudo GT driver which adds to GTNUL Clipboard and Tone()
|
||||
functionality. If you are using some MS-Windows GUI library
|
||||
and you still want to use Tone() function or HB_GTI_CLIPBOARD
|
||||
actions then link this GT driver with your application.
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
|
||||
A GT Slang driver for Harbour (gtsln) is based on a S-Lang library written
|
||||
by John E. Davis. It was developed using Slang version 1.41, although prior
|
||||
versions of Slang up to 1.22 should also work, but they are not recomended
|
||||
versions of Slang up to 1.22 should also work, but they are not recommended
|
||||
because of some bugs they have.
|
||||
|
||||
The main OS it is developed to be used on is Linux. Slang was ported to
|
||||
other OSes so it should be possible to use it on other systems too. I've
|
||||
also successfully compiled and testd gtsln under MS-DOS but I don't think it
|
||||
also successfully compiled and tested gtsln under MS-DOS but I don't think it
|
||||
makes any sense to use it on that system instead of gtdos, due to its
|
||||
limitations and incompatibilities with CA-Cl*pper (see below), so I removed
|
||||
MS-DOS support.
|
||||
@@ -16,7 +16,7 @@ MS-DOS support.
|
||||
A gt Slang driver is a second driver which can be used on Unix based OSes.
|
||||
The first one is a gt driver based on a curses library (gtcrs). Due to the
|
||||
fact that curses is a standard library on Unix like systems, gtcrs should
|
||||
be considerd as a primary gt driver for such OSes.
|
||||
be considered as a primary gt driver for such OSes.
|
||||
|
||||
|
||||
|
||||
@@ -24,12 +24,12 @@ Compiling a gt slang driver ...
|
||||
--------------------------------
|
||||
|
||||
|
||||
The driver should be automaticly compiled when you build Harbour from
|
||||
sourcees, regardless of what gt driver you've chosen by setting HB_GT_LIB.
|
||||
Succesfull compilation requires Slang library and Slang header files
|
||||
The driver should be automatically compiled when you build Harbour from
|
||||
sources, regardless of what gt driver you've chosen by setting HB_GT_LIB.
|
||||
Successful compilation requires Slang library and Slang header files
|
||||
properly installed on your system. The driver expects Slang header files
|
||||
to be placed in <system_default_inc_dir>/slang/ directory on Linux based
|
||||
systems ( this usualy means /usr/include/slang on most of them ) and
|
||||
systems ( this usually means /usr/include/slang on most of them ) and
|
||||
<system_default_inc_dir> on other systems (which is usually /usr/include).
|
||||
|
||||
To build programs (by using a bld.sh script from Harbour sources), which
|
||||
@@ -54,25 +54,25 @@ It assumes national characters are placed in an upper 128 bytes of ASCII
|
||||
table from a normal character set. "Normal" means not "alternate character
|
||||
set" here, because "alternate character set" is generally used to display
|
||||
graphics characters. It also assumes national characters can be entered
|
||||
for example by pressing an ALTR key and a particular key on a keyboard to
|
||||
get a desired national character. If this is impossible on some terminals
|
||||
due to their lack of posibilities, an alternate method which uses Dead
|
||||
for example by pressing an <AltR> key and a particular key on a keyboard
|
||||
to get a desired national character. If this is impossible on some terminals
|
||||
due to their lack of possibilities, an alternate method which uses Dead
|
||||
keys, is implemented. To be able to see and to enter national characters
|
||||
one should :
|
||||
|
||||
- have a proper font table loaded
|
||||
- optionaly have a software installed to allow enter national characters
|
||||
- optionally have a software installed to allow enter national characters
|
||||
in whatever way they should be entered
|
||||
- have an environment variable HRBNATIONCHARS properly set (see below)
|
||||
- optionaly have a HRBNATIONDEADKEY defined (see below)
|
||||
- optionally have a HRBNATIONDEADKEY defined (see below)
|
||||
|
||||
An environment variable HRBNATIONCHARS should contain a list of character
|
||||
pairs. A first character from each pair sholud be a character from a lower
|
||||
pairs. A first character from each pair should be a character from a lower
|
||||
128 bytes of ASCII table, which should be pressed after a Dead Key was
|
||||
pressed, to get a desired national character. The second character is a
|
||||
national character itself. Those pairs should be defined even if a Dead
|
||||
key is not used (because a terminal supports other method of entering
|
||||
national characters - for example ALTR+letter).
|
||||
national characters - for example <AltR + letter>).
|
||||
|
||||
If a terminal does not support entering national characters by using an
|
||||
ALT key (or the other similar) an environment variable HRBNATIONDEADKEY
|
||||
@@ -81,7 +81,7 @@ can be defined. It should contain a character which should be pressed
|
||||
national character.
|
||||
|
||||
The reason I am using HRBNATIONCHARS envvar is simple. I want to give a
|
||||
better graphics chars support when the same code is ocupied by a nation
|
||||
better graphics chars support when the same code is occupied by a nation
|
||||
char and by a graphics char. Because on terminals there are usually two
|
||||
glyph's character sets (normal and alternate) knowing nation's characters
|
||||
codes, I can switch to normal character set when a nation character code
|
||||
@@ -104,7 +104,7 @@ This implementation works better than it would ever work in MS-DOS where
|
||||
there is no way to do such tricks (because there is only one glyph's
|
||||
character set without VGA tricks).
|
||||
|
||||
Using environment variables gives a configuration fexibility to Harbour
|
||||
Using environment variables gives a configuration flexibility to Harbour
|
||||
programs for different users and different code pages. To change a code
|
||||
page one should only change HRBNATIONCHARS var (if a Dead key is used)
|
||||
and this can be done from a script which runs a Harbour program.
|
||||
@@ -123,8 +123,8 @@ HRBNATIONCHARS should be defined as :
|
||||
where AĄ is a first pair, CĆ is a second pair and so on
|
||||
|
||||
Suppose also we are working on a terminal which does not allow to enter
|
||||
national characters by pressing ALTR+A, ALTR+C, ALTR+E. Because we like
|
||||
a character '`' (\140 in octal), we arbitrary choose it as a Dead key.
|
||||
national characters by pressing <AltR+A>, <AltR+C>, <AltR+E>. Because we
|
||||
like a character '`' (\140 in octal), we arbitrary choose it as a Dead key.
|
||||
|
||||
So we define HRBNATIONDEADKEY as :
|
||||
|
||||
@@ -139,13 +139,13 @@ and so on. To get '`' character we need to double press `.
|
||||
|
||||
|
||||
|
||||
Limitations, incomatibilities with CA-Cl*pper, errors ...
|
||||
Limitations, incompatibilities with CA-Cl*pper, errors ...
|
||||
--------------------------------------------------------
|
||||
|
||||
|
||||
The driver is rather limited in comparison to other Harbour gt drivers and
|
||||
has many incompatibilities with CA-Cl*pper. Some of those limitations and in-
|
||||
compatibilities are caused by an Unix behavior, others are caused by a Slang
|
||||
has many incompatibilities with CA-Cl*pper. Some of those limitations and
|
||||
incompatibilities are caused by an Unix behavior, others are caused by a Slang
|
||||
implementation. There are also some caused by a gt layer design. Not to
|
||||
mention that there are probably some caused by my lack of knowledge.
|
||||
|
||||
@@ -158,17 +158,17 @@ Here is a (probably not complete) list of them :
|
||||
fact the previous problem, just worded differently)
|
||||
|
||||
- you can't display characters with values below 32 (control characters).
|
||||
It is a very important limitation because you can't use many usefull
|
||||
It is a very important limitation because you can't use many useful
|
||||
chars which you used under CA-Cl*pper. This is an OS limitation which
|
||||
Slang also inherits
|
||||
|
||||
- displaying chars above 128 widely depends on terminal posibilities.
|
||||
- displaying chars above 128 widely depends on terminal possibilities.
|
||||
Because of this on xterm I set all frame chars to a single frame
|
||||
(this means - double and mixed frames are shown as a single frame).
|
||||
You should not expect to see chars above 128 shown properly in all
|
||||
cases.
|
||||
|
||||
- a screen is automaticly cleared on program's startup (you can't inherit
|
||||
- a screen is automatically cleared on program's startup (you can't inherit
|
||||
it from a system) and a cursor is set at 0,0
|
||||
|
||||
- when you run external programs a screen is restored after execution so
|
||||
@@ -176,8 +176,8 @@ Here is a (probably not complete) list of them :
|
||||
programs
|
||||
|
||||
- you can't expect cursor hiding and cursor style changing to work at
|
||||
all. Although on a textmode Linux console it works, this is a Linux
|
||||
textmode hack only and it is hardcoded. For example on xterm only
|
||||
all. Although on a text-mode Linux console it works, this is a Linux
|
||||
text-mode hack only and it is hardcoded. For example on xterm only
|
||||
cursor hiding works well.
|
||||
|
||||
- it is not guaranteed that programs which use DispBegin() and DispEnd()
|
||||
@@ -195,7 +195,7 @@ Here is a (probably not complete) list of them :
|
||||
|
||||
- keyboard handling is VERY LIMITED. Generally you should not expect
|
||||
ALT+key, CTRL+F<n> and CTRL+<specialkeys> combinations to work at all
|
||||
although they work on a textmode Linux console. This is a very big
|
||||
although they work on a text-mode Linux console. This is a very big
|
||||
problem and at least any solution should be developed to emulate this.
|
||||
One attempt is a Dead key workaround I've implemented for national
|
||||
characters and a Meta key to simulate Alt key. By default as a Meta
|
||||
@@ -209,7 +209,7 @@ Here is a (probably not complete) list of them :
|
||||
- currently there is no mouse support. This is a TODO item
|
||||
|
||||
- Out<XXX>() functions do not work well. This is caused by a design of
|
||||
a gt layer where writing directly to stdout is done outside Slang,
|
||||
a gt layer where writing directly to STDOUT is done outside Slang,
|
||||
so Slang can't maintain screen changes properly.
|
||||
|
||||
- redirecting Out<XXX>() to a file results in writing control chars
|
||||
@@ -226,9 +226,9 @@ Terminfo database ...
|
||||
Slang gt driver is based on a terminfo database so it is very important to
|
||||
have it properly set. Most problems are related to a broken terminfo file.
|
||||
I don't have general advice about that. You are supposed to help yourself.
|
||||
The only thing you should know is that you must not have sequences for F11
|
||||
and F12 function keys set in a terminfo file if you want to use SHFT+F<n>
|
||||
and CTRL+F<n> keys (of course they all should be defined there).
|
||||
The only thing you should know is that you must not have sequences for <F11>
|
||||
and <F12> function keys set in a terminfo file if you want to use <Shift+Fn>
|
||||
and <Ctrl+Fn> keys (of course they all should be defined there).
|
||||
|
||||
|
||||
|
||||
@@ -236,7 +236,7 @@ Why use gt slang driver ...
|
||||
-----------------------------
|
||||
|
||||
|
||||
Well, personaly I find only two reasons. When CA-Cl*pper compatibility and
|
||||
Well, personally I find only two reasons. When CA-Cl*pper compatibility and
|
||||
current limitations are not a problem, gtsln is a little bit faster than
|
||||
gtcrs and my experiences show that sometimes it works a little bit better
|
||||
than gtcrs on real terminals (tested on wy60 where gtcrs did not handle
|
||||
@@ -247,14 +247,14 @@ the keyboard well).
|
||||
TODO
|
||||
------
|
||||
|
||||
- keyboard emulation on terminals with lack of posibilities
|
||||
- keyboard emulation on terminals with lack of possibilities
|
||||
- support for mouse on Linux text console and on xterm
|
||||
- fix a problem with redirecting output to a file or a pipe
|
||||
- find a way to inherit screen from a system at startup
|
||||
(is it possible at all ?)
|
||||
- sound support on Linux using native sound system (Alsa ?)
|
||||
- support for sound on other systems than Linux
|
||||
- fix working on monochorme terminals
|
||||
- fix working on monochrome terminals
|
||||
- add a PC video card hardware emulation
|
||||
|
||||
|
||||
@@ -263,5 +263,5 @@ TODO
|
||||
|
||||
|
||||
PS.
|
||||
I want to appologize for any english errors
|
||||
I want to apologize for any English errors
|
||||
and any technical errors in this text.
|
||||
|
||||
@@ -12,7 +12,7 @@ FUNCTION HEADER TEMPLATE
|
||||
$AUTHOR$
|
||||
Copyright YYYY FirstName LastName <me@example.org>
|
||||
$NAME$
|
||||
StartHere()
|
||||
StartHere()
|
||||
$CATEGORY$
|
||||
|
||||
$SUBCATEGORY$
|
||||
@@ -40,7 +40,7 @@ FUNCTION HEADER TEMPLATE
|
||||
$FILES$
|
||||
|
||||
$SEEALSO$
|
||||
Comma separated list of references
|
||||
Comma separated list of references
|
||||
$END$
|
||||
*/
|
||||
|
||||
@@ -48,77 +48,81 @@ HEADER EXAMPLES
|
||||
===============
|
||||
|
||||
/* $DOC$
|
||||
$AUTHOR$
|
||||
Copyright YYYY FirstName LastName <me@example.org>
|
||||
$NAME$
|
||||
IsLeapYr()
|
||||
IsLeapYr()
|
||||
$CATEGORY$
|
||||
Date functions
|
||||
Date functions
|
||||
$ONELINER$
|
||||
Test if a date falls in a leap year.
|
||||
Test if a date falls in a leap year.
|
||||
$SYNTAX$
|
||||
IsLeapYr( [<dDate>] ) --> <lIsLeap>
|
||||
IsLeapYr( [<dDate>] ) --> <lIsLeap>
|
||||
$ARGUMENTS$
|
||||
<dDate> is an optional date. If not supplied is defaults to the
|
||||
value returned from Date().
|
||||
<dDate> is an optional date. If not supplied is defaults to the
|
||||
value returned from Date().
|
||||
$RETURNS$
|
||||
.T. if <dDate> falls in a leap year, .F. if not.
|
||||
.T. if <dDate> falls in a leap year, .F. if not.
|
||||
$DESCRIPTION$
|
||||
IsLeapYr() can be used to check if a given year is a leap year.
|
||||
IsLeapYr() can be used to check if a given year is a leap year.
|
||||
$EXAMPLES$
|
||||
/* Check if it's a leap year. */
|
||||
/* Check if it's a leap year. */
|
||||
|
||||
IF IsLeapYr()
|
||||
? "One extra day before you get paid this Feb!!"
|
||||
ELSE
|
||||
? "A normal year"
|
||||
ENDIF
|
||||
IF IsLeapYr()
|
||||
? "One extra day before you get paid this Feb!!"
|
||||
ELSE
|
||||
? "A normal year"
|
||||
ENDIF
|
||||
$STATUS$
|
||||
C
|
||||
C
|
||||
$COMPLIANCE$
|
||||
IsLeapYr() works exactly like CA-Cl*pper's IsLeapYr(), if your
|
||||
CA-Cl*pper doesn't have such a function you're probably in a
|
||||
different universe from the author of this function.
|
||||
IsLeapYr() works exactly like CA-Cl*pper's IsLeapYr(), if your
|
||||
CA-Cl*pper doesn't have such a function you're probably in a
|
||||
different universe from the author of this function.
|
||||
$PLATFORMS$
|
||||
All
|
||||
All
|
||||
$FILES$
|
||||
|
||||
$SEEALSO$
|
||||
Date(), IsWeekend(), IsHarbourFinished(), IsApocalypse(), SET DATE
|
||||
Date(), IsWeekend(), IsHarbourFinished(), IsApocalypse(), SET DATE
|
||||
$END$
|
||||
*/
|
||||
|
||||
/* $DOC$
|
||||
$AUTHOR$
|
||||
Copyright YYYY FirstName LastName <me@example.org>
|
||||
$TEMPLATE$
|
||||
Function
|
||||
Function
|
||||
$NAME$
|
||||
hb_dateEncStr()
|
||||
hb_dateEncStr()
|
||||
$CATEGORY$
|
||||
C level API
|
||||
C level API
|
||||
$SUBCATEGORY$
|
||||
Date/Time
|
||||
Date/Time
|
||||
$ONELINER$
|
||||
|
||||
$SYNTAX$
|
||||
C Prototype
|
||||
C Prototype
|
||||
|
||||
#include <hbdate.h>
|
||||
long hb_dateEncStr( char * szDate )
|
||||
#include <hbdate.h>
|
||||
long hb_dateEncStr( char * szDate )
|
||||
$ARGUMENTS$
|
||||
<szDate>
|
||||
<szDate>
|
||||
$RETURNS$
|
||||
<lResult>
|
||||
<lResult>
|
||||
$DESCRIPTION$
|
||||
|
||||
$EXAMPLES$
|
||||
|
||||
$STATUS$
|
||||
R
|
||||
R
|
||||
$COMPLIANCE$
|
||||
NA
|
||||
NA
|
||||
$FILES$
|
||||
$PLATFORMS$
|
||||
All
|
||||
All
|
||||
$VERSION$
|
||||
1.0
|
||||
1.0
|
||||
$SEEALSO$
|
||||
|
||||
$END$
|
||||
|
||||
@@ -8,13 +8,13 @@ By Przemyslaw Czerpak (druzus/at/priv.onet.pl)
|
||||
with the above unused empty directories will be removed
|
||||
from your repository copy.
|
||||
Please check if all your files are unmodified. You can redirect
|
||||
stdout output from cvs command to a file to see if all files are
|
||||
STDOUT output from cvs command to a file to see if all files are
|
||||
exactly the same.
|
||||
2. Update files which contain harbour release number. Now these are:
|
||||
2. Update files which contain Harbour release number. Now these are:
|
||||
harbour.spec
|
||||
include/hbver.h
|
||||
3. Set proper release date in NEWS (found as doc/oldnews.txt) and
|
||||
if necessary update release informations. Also add the exact
|
||||
if necessary update release information. Also add the exact
|
||||
tag name to this file, for example "tag: build46".
|
||||
4. Update ChangeLog.txt and commit your modifications.
|
||||
5. Update hbver.h with ChangeLog.txt file ID and your last entry ID.
|
||||
|
||||
@@ -14,36 +14,40 @@ Content
|
||||
=========================================================
|
||||
by Viktor Szakats
|
||||
|
||||
1) Read the Harbour README.md, monitor the development mailing list,
|
||||
1. Read the Harbour README.md, monitor the development mailing list,
|
||||
consult with the developers, make contributions. This way your chances
|
||||
are high to get a R/W access to the repository.
|
||||
2) Before uploading anything you'll need push permission for the
|
||||
2. Before uploading anything you'll need push permission for the
|
||||
Harbour Git server. To get this please make a request on the development
|
||||
list. Note that getting Developer status is not an automatic process.
|
||||
3) You'll need an Git client for your platform.
|
||||
4) Do a 'git clone' to get your own local development Git repository.
|
||||
2. You'll need an Git client for your platform.
|
||||
3. Do a 'git clone' to get your own local development Git repository.
|
||||
|
||||
1.2 Here's how to upload your changes to the Git server
|
||||
=======================================================
|
||||
by Viktor Szakats
|
||||
|
||||
1) Make the changes in the source
|
||||
2) Do a 'git pull'
|
||||
3) Resolve any conflicts
|
||||
4) Run 'hbrun bin/commit' to check any commit pre-checks
|
||||
1. Make the changes in the source
|
||||
2. Do a 'git pull'
|
||||
3. Resolve any conflicts
|
||||
4. Run 'hbrun bin/commit' to check any commit pre-checks
|
||||
and to create new ChangeLog.txt entry template
|
||||
5) Edit ChangeLog.txt with a text editor (do not use notepad.exe)
|
||||
6) Copy the last ChangeLog.txt entry to the clipboard
|
||||
5. Edit ChangeLog.txt with a text editor (do not use notepad.exe)
|
||||
6. Copy the last ChangeLog.txt entry to the clipboard
|
||||
If it's a single atomic change, it's better to copy only
|
||||
the description itself without the entry header and list
|
||||
of files.
|
||||
7) Do a 'git commit [-a]'
|
||||
8) Paste clipboard content to the text editor that popped up
|
||||
9) Save and exit in editor
|
||||
10) Git is now committing
|
||||
11) Do a 'git push' to publish your changes online to the
|
||||
7. Do a 'git commit [-a]'
|
||||
8. Paste clipboard content to the text editor that popped up
|
||||
9. Save and exit in editor
|
||||
10. Git is now committing
|
||||
11. Do a 'git push' to publish your changes online to the
|
||||
master repository
|
||||
|
||||
NOTE:
|
||||
- Run once 'git config --global core.autocrlf true' on Windows
|
||||
- Run once 'git config --global core.autocrlf input' on *nix
|
||||
|
||||
1.3 Here's how to format your ChangeLog.txt entries
|
||||
===================================================
|
||||
by Viktor Szakats
|
||||
@@ -54,11 +58,24 @@ by Viktor Szakats
|
||||
Describe what you've changed, the reasons, and other comments
|
||||
and explanations you find useful.
|
||||
|
||||
- To refer to a commit, simply include the commit hash in the
|
||||
text. If you refer to a commit in another fork,
|
||||
include the whole (GitHub) URL of the commit.
|
||||
|
||||
- To refer to an issue, include issue number prefixed with
|
||||
a # character. If you include the word "fixes", "fixed"
|
||||
or similar, the issue will automatically be closed.
|
||||
See more here:
|
||||
https://help.github.com/articles/writing-on-github#references
|
||||
|
||||
- In case of incompatible changes visible on the user-level,
|
||||
add the word 'INCOMPATIBLE' to the text.
|
||||
|
||||
- Mark comments suggesting further fixes with 'TOFIX: ', further
|
||||
todos as 'TODO: ', and update these to '[DONE]' when implemented.
|
||||
- In case some translatable strings have changed,
|
||||
add the word '[TRANSLATION]' to the text.
|
||||
|
||||
- Mark comments suggesting further fixes with 'FIXME: ', further
|
||||
TODOs as 'TODO: ', and update these to '[DONE]' when implemented.
|
||||
|
||||
- Mark changes to merge with different branch as '[TOMERGE x.0]'.
|
||||
Changes these to '[MERGED x.0]' when merge is completed.
|
||||
@@ -68,13 +85,13 @@ by Viktor Szakats
|
||||
1.4 Here's how to use the Git server in read-only mode
|
||||
======================================================
|
||||
|
||||
git clone git://github.com/harbour/core.git harbour-core
|
||||
git clone https://github.com/harbour/core.git harbour-core
|
||||
|
||||
1.5 Things to do to avoid damaging the Git repository
|
||||
=====================================================
|
||||
by David G. Holm
|
||||
|
||||
1) Always do your Harbour development using your local source tree. Do not
|
||||
1. Always do your Harbour development using your local source tree. Do not
|
||||
do your development outside your local source tree and then copy your
|
||||
changes into your local source tree to commit them, because that leads
|
||||
easily to accidentally overwriting changes made by others, because
|
||||
@@ -83,7 +100,7 @@ by David G. Holm
|
||||
your local source tree, changes made by others will be merged with your
|
||||
changes and you only need to recompile and retest before committing.
|
||||
|
||||
2) Always run 'git pull' from the 'harbour' directory before you run
|
||||
2. Always run 'git pull' from the 'harbour' directory before you run
|
||||
'git commit'. Run 'hbmk2 bin/commit' before committing, which will
|
||||
create a new entry at the top of ChangeLog.txt, which you can then
|
||||
edit with the description of changes.
|
||||
@@ -99,7 +116,7 @@ by David G. Holm
|
||||
and the commit.
|
||||
|
||||
|
||||
[ Copyright (c) 1999-2013 Viktor Szakats (vszakats.net/harbour)
|
||||
Licensed under Creative Commons Attribution-ShareAlike 3.0:
|
||||
http://creativecommons.org/licenses/by-sa/3.0/
|
||||
See COPYING.txt. ]
|
||||
[ Copyright (c) 1999-2014 Viktor Szakats (vszakats.net/harbour)
|
||||
Licensed under Creative Commons Attribution-ShareAlike 4.0:
|
||||
https://creativecommons.org/licenses/by-sa/4.0/
|
||||
See LICENSE.txt. ]
|
||||
|
||||
@@ -10,7 +10,7 @@ They can be emulated by fcntl() or flock() locks. Harbour uses flock()
|
||||
in systems where it does not create conflicts with fcntl() locks used
|
||||
to synchronize file access by different processes in shared mode.
|
||||
Currently it's enabled by default only in Linux (tests with *BSD systems
|
||||
and MacOSX showed that it interacts with fcntl locks causing deadlocks).
|
||||
and macOS showed that it interacts with fcntl locks causing deadlocks).
|
||||
On other POSIX systems Harbour uses fcntl() read and write locks at
|
||||
address 0x7fffffff (size 1) to simulate shared and exclusive mode.
|
||||
|
||||
@@ -126,13 +126,13 @@ CDX WRITE LOCK: @0xfffeffff : 0x10001
|
||||
prepare the index modification in memory and before writing to
|
||||
index file lock @0xffff0000 : 0x10000
|
||||
to eliminate starvation effect caused by many readers
|
||||
on each 16-th read lock reading process tries to lock write
|
||||
on each 16th read lock reading process tries to lock write
|
||||
area @0xfffeffff : 1 instead and then sets normal read lock
|
||||
|
||||
In Harbour it's DB_DBFLOCK_COMIX.
|
||||
|
||||
|
||||
HARBOUR 32-bit locking
|
||||
Harbour 32-bit locking
|
||||
======================
|
||||
all locks are exclusive (*), in index shared locks are emulated
|
||||
|
||||
@@ -148,13 +148,13 @@ CDX WRITE LOCK: @0xfffeffff : 0x10001
|
||||
prepare the index modification in memory and before writing to
|
||||
index file lock @0xffff0000 : 0x10000
|
||||
to eliminate starvation effect caused by many readers
|
||||
on each 16-th read lock reading process tries to lock write
|
||||
on each 16th read lock reading process tries to lock write
|
||||
area @0xfffeffff : 1 instead and then sets normal read lock
|
||||
|
||||
In Harbour it's DB_DBFLOCK_HB32.
|
||||
|
||||
|
||||
HARBOUR 64-bit locking
|
||||
Harbour 64-bit locking
|
||||
======================
|
||||
all locks are exclusive (*), in index shared locks are emulated
|
||||
|
||||
@@ -170,7 +170,7 @@ CDX WRITE LOCK: @0x7fffffff00000000 : 0x10001
|
||||
prepare the index modification in memory and before writing to
|
||||
index file lock @0x7fffffff00000001 : 0x10000
|
||||
to eliminate starvation effect caused by many readers
|
||||
on each 16-th read lock reading process tries to lock write
|
||||
on each 16th read lock reading process tries to lock write
|
||||
area @0x7fffffff00000000 : 1 instead and then sets normal read lock
|
||||
|
||||
In Harbour it's DB_DBFLOCK_HB64.
|
||||
|
||||
151
doc/oldnews.txt
151
doc/oldnews.txt
@@ -1,12 +1,11 @@
|
||||
/* This work is licensed under the Creative Commons Attribution-ShareAlike
|
||||
License. To view a copy of this license, visit
|
||||
http://creativecommons.org/licenses/by-sa/3.0/ or send a letter to
|
||||
4.0 International License. To view a copy of this license, visit
|
||||
https://creativecommons.org/licenses/by-sa/4.0/ or send a letter to
|
||||
Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305,
|
||||
USA. A summary of the license and the full legal text is included
|
||||
in file: LICENSE.txt. If you wish to distribute some or all of this
|
||||
work under different terms, please contact respective author(s).
|
||||
The license applies to all entries on or after Version 1.1.0.
|
||||
*/
|
||||
The license applies to all entries on or after Version 1.1.0. */
|
||||
|
||||
Version 3.0.0 (2011-07-17)
|
||||
|
||||
@@ -61,7 +60,7 @@ General
|
||||
- HB_PLATFORM=w32 -> HB_PLATFORM=win
|
||||
- CCPATH -> HB_CCPREFIX
|
||||
- CCPREFIX -> HB_CCPATH
|
||||
- GNU-make system revised to give optimal support -j<n>
|
||||
- GNU Make system revised to give optimal support -j<n>
|
||||
multi-threaded parallel builds, which can dramatically
|
||||
increase build speed in multi-core/multi-CPU systems.
|
||||
- HB_WINCE -> HB_OS_WIN_CE
|
||||
@@ -76,7 +75,7 @@ General
|
||||
(old ones still work for compatibility, but please
|
||||
switch your code to use the new ones)
|
||||
- Fixed dynamic library creation on Solaris OSes.
|
||||
- hbrun will now open .dbf files when passed on the command line.
|
||||
- hbrun will now open .dbf files when passed on the command-line.
|
||||
- Added web-server written in Harbour: uHTTPD
|
||||
- POCC WinCE builds are now supported.
|
||||
- Open Watcom 1.8 (RC3) compiler is now supported.
|
||||
@@ -91,7 +90,6 @@ General
|
||||
compatibility, you can turn it off manually by #defining
|
||||
HB_LEGACY_OFF. (HB_USER_CFLAGS=-DHB_LEGACY_OFF)
|
||||
- New Harbour homepage, thanks to Vailton Renato.
|
||||
http://harbour-project.org/
|
||||
- GNU Make system now supports parallel builds.
|
||||
(needs GNU Make newer than 3.79.1)
|
||||
- GNU Make system allows to install in Harbour source tree on all platforms.
|
||||
@@ -110,7 +108,7 @@ General
|
||||
Harbour on Windows, so this is now a requirement for a proper build.
|
||||
- hb-mkslib.sh renamed to hb-mkdyn.sh. Old name stil works, but it's
|
||||
now deprecated.
|
||||
- x64 msvc compiler got a distinct HB_COMPILER value: msvc64.
|
||||
- x86_64 msvc compiler got a distinct HB_COMPILER value: msvc64.
|
||||
- msvcce compiler made compatible with older MSVC/WinCE versions.
|
||||
- Added support for Intel(R) C++ compiler (icc) on Linux and Windows.
|
||||
- Added new README.md document giving a quick describing of the build
|
||||
@@ -127,7 +125,7 @@ General
|
||||
- Cygwin renamed from gcc to cygwin. (NOTE: Cygwin doesn't work since
|
||||
some versions, and support may be removed in the future.)
|
||||
- Fixed #pragma -k? options to be case-insensitive.
|
||||
- Explicitly bind system libraries with harbour shared library.
|
||||
- Explicitly bind system libraries with Harbour shared library.
|
||||
RPM/DEB packages should automatically detect these dependencies.
|
||||
- Warning cleanup (minors) for Intel compiler.
|
||||
- Pelles C workarounds for compiler bugs.
|
||||
@@ -211,8 +209,8 @@ Core
|
||||
- Added hb_osDecode(), hb_osEncode() C APIs.
|
||||
- hb_GetEnv() extended with 3rd parameter to control OS codepage
|
||||
conversion (on by default).
|
||||
- Added CPU dump support for AMD64/x64.
|
||||
- Added module listing on GPF for x86 and x64.
|
||||
- Added CPU dump support for AMD64/x86_64.
|
||||
- Added module listing on GPF for x86 and x86_64.
|
||||
- GTXWC potential GPF fixed.
|
||||
- Added process handling:
|
||||
hb_processOpen(), hb_processValue(), hb_processClose()
|
||||
@@ -263,7 +261,7 @@ Core
|
||||
- Added Windows 7 and Server 2008 R2 version detection.
|
||||
- Replaced old hbmk.bat, hbmk bash script and Harbour Make tool with
|
||||
portable make tool written in Harbour: hbmk. This tool can create
|
||||
a Harbour executable on any platforms using minimal effort. It autodetects
|
||||
a Harbour executable on any platforms using minimal effort. It auto-detects
|
||||
OS and compiler environment. Support script and parameter files,
|
||||
can act as a linker, C compiler, Harbour compiler, static and dynamic
|
||||
library creator, resource compiler (on Windows). Core features are
|
||||
@@ -284,7 +282,7 @@ Core
|
||||
Harbour help screen.
|
||||
- Added support for reading FoxPro .mem files - Clipper compatibility.
|
||||
- Fixed very old bug which disabled writing to .mem files strings
|
||||
longer then 32Kb.
|
||||
longer then 32 KiB.
|
||||
- hbrun now accepts .dbf file as paramater, which it will open after startup.
|
||||
- hbrun now accepts -v option which makes it display its own version after
|
||||
startup.
|
||||
@@ -294,7 +292,7 @@ Core
|
||||
- Fixed __M[V]CLEAR()/ __M[V]RESTORE() to be exactly Clipper compatible
|
||||
and do not release PUBLIC GetList value.
|
||||
- bcc compiler in GNU Make now supports older Windows NT with limited
|
||||
command line length.
|
||||
command-line length.
|
||||
- Removed support for following compilers:
|
||||
dos/bcc16, dos/rsx32, win/dmc, win/rsxnt, os2/icc, win/icc (IBM).
|
||||
- Fixed static variables indexes in the generated PCODE when static
|
||||
@@ -307,10 +305,10 @@ Core
|
||||
In such case "(_INITSTATICS)" is used as function name.
|
||||
Without it debugger does not register entering such codeblocks and
|
||||
GPFs.
|
||||
- Added support for automatic adding 1-st function with the same name
|
||||
as compiled .prg file if some code statements are used before 1-st
|
||||
- Added support for automatic adding 1st function with the same name
|
||||
as compiled .prg file if some code statements are used before 1st
|
||||
function/procedure declared explicitly in .prg file. Such mode can
|
||||
be enabled by -n2 new harbour compiler switch. This switch is used
|
||||
be enabled by -n2 new Harbour compiler switch. This switch is used
|
||||
by default by new hbmk tool.
|
||||
- speedtst updated to work with CA-Cl*pper.
|
||||
- Added protection against pushing new private variable on HVM stack
|
||||
@@ -351,8 +349,8 @@ Contrib
|
||||
- hbtip FTP handling fixed some accidental typos.
|
||||
- hbtip new MIME types.
|
||||
- hbtip fixes and optimization to HB_BASE64().
|
||||
- rddads now autodetects version 9.10.
|
||||
- hbct XToC(), FToC() and CToF() fixed to be properly multiplatform.
|
||||
- rddads now auto-detects version 9.10.
|
||||
- hbct XToC(), FToC() and CToF() fixed to be properly multi-platform.
|
||||
- hbct unbuffered drawing speed improvement in windowing code.
|
||||
- hbct DirName() fixed.
|
||||
- hbct other fixes.
|
||||
@@ -361,7 +359,7 @@ Contrib
|
||||
- hbwin made steps towards creating a unified Windows API wrapper layer.
|
||||
- Added hbcrypt, hbssl and rddsql (with mysql, pgsql, fbsql plugins)
|
||||
to contribs.
|
||||
- hbct windowing extended with new low level API, better shadow
|
||||
- hbct windowing extended with new low-level API, better shadow
|
||||
handling.
|
||||
- gtwvg lots of improvements.
|
||||
- gtwvg Xbase++ compatible UI objects.
|
||||
@@ -469,7 +467,7 @@ General
|
||||
- Several code quality enhancements, warning fixes.
|
||||
- Doc quality fixes, formatting.
|
||||
- Fixed so that build-time PRG_USR always overrides default
|
||||
options in GNU-make.
|
||||
options in GNU Make.
|
||||
- Added openSUSE package requirements to doc/linux1st.txt.
|
||||
- Unnecessary compiler options and lib dependencies cleaned
|
||||
from build processes.
|
||||
@@ -508,14 +506,14 @@ General
|
||||
instructions in make_vc.bat, how to initiate a WinCE build.
|
||||
- Now Harbour is able to build and run properly in MSVC C mode
|
||||
in AMD64 (64-bit) mode.
|
||||
- Added experimental Pelles C WinCE GNU-make file. It doesn't
|
||||
- Added experimental Pelles C WinCE GNU Make file. It doesn't
|
||||
yet work properly.
|
||||
- Post batch file called from core non-GNU make files was
|
||||
renamed, please update your system if you're using them:
|
||||
exit_err.bat -> hbmkpost.bat
|
||||
- Added experimental MSVC WinCE GNU-make file.
|
||||
- Added Darwin autodetection to non-GNU .sh make files.
|
||||
- Changed GNU-make name of MinGW WinCE compiler (HB_COMPILER)
|
||||
- Added experimental MSVC WinCE GNU Make file.
|
||||
- Added Darwin auto-detection to non-GNU .sh make files.
|
||||
- Changed GNU Make name of MinGW WinCE compiler (HB_COMPILER)
|
||||
from 'cemgw' to 'mingwce'. Please update your system, if
|
||||
you've been using this directly (and not via make_*ce.sh scripts).
|
||||
- Memory statistics module now turned off by default for optimal
|
||||
@@ -602,7 +600,7 @@ Core
|
||||
- Fixed GPFs and leaks when using Harbour compiler -w3 switch.
|
||||
- Bad workaround added for Pelles C 5.00.1 in AMD64 mode to
|
||||
compile the Harbour 'inet' subsystem. It won't properly
|
||||
work, but it lets build the rest of Harbour (like hbrun.exe).
|
||||
work, but it lets build the rest of Harbour (like hbrun executable).
|
||||
- PCRE lib upgraded to 7.8 (from 7.7)
|
||||
- Fixed dbInfo( DBI_POSITIONED ) returned value.
|
||||
- Fixed internal error in dirty index reading.
|
||||
@@ -623,7 +621,7 @@ Contrib
|
||||
- gtalleg fixed to compile under several non-*nix platforms
|
||||
(still needs more work).
|
||||
- xhb: hb_ArrayBlock() compatibility function added.
|
||||
- hbnf ft_GetE() function bad leak fixed on Win32 systems,
|
||||
- hbnf ft_GetE() function bad leak fixed on Windows systems,
|
||||
and potential GPF on all systems.
|
||||
- hbwhat32 removed wintypes.ch header. Header with the same
|
||||
name and identical content can be found in xhb contrib.
|
||||
@@ -665,7 +663,7 @@ Contrib
|
||||
other when building them using the non-GNU make system.
|
||||
- Former hbwhat32 lib added to the default contrib list
|
||||
under the name of hbwhat, compilation was fully cleaned
|
||||
and fixed to support Win64 platform. INTERNETREADFILE(),
|
||||
and fixed to support Windows 64-bit platform. INTERNETREADFILE(),
|
||||
INTERNETWRITEFILE() functions were fixed. what32.ch renamed
|
||||
to hbwhat.ch.
|
||||
- hbhpdf fixed HPDF_AddPageLabel().
|
||||
@@ -886,7 +884,7 @@ Portability
|
||||
- added support for shared libraries (.sl) in HPUX builds
|
||||
- added large file support (64-bit) in HPUX builds
|
||||
- disabled in default BSD* builds DOS/Windows DENY_* flags emulation
|
||||
implemented by BSD locks - tests on FreeBSD 6.2 and MacOSX shows
|
||||
implemented by BSD locks - tests on FreeBSD 6.2 and OS X shows
|
||||
that it badly interacts with POSIX locks and it's possible to create
|
||||
deadlock.
|
||||
|
||||
@@ -940,7 +938,7 @@ internals:
|
||||
- added support for dynamically set during compilation ChangeLog entry,
|
||||
ChangeLog ID, SVN revision and compilation flags.
|
||||
Update Harbour logo message to show the exact revision number and
|
||||
- removed non-working compiler frontends: .NET CLI and JAVA.
|
||||
- removed non-working compiler frontends: .NET CLI and Java.
|
||||
- added support for i18n into compiler (-j[<filename>] switch)
|
||||
gettext compatible .pot files are generated
|
||||
|
||||
@@ -970,7 +968,7 @@ API
|
||||
- added C functions to access SET values (hb_setGet*()) which should be used
|
||||
instead of direct accessing HB_SET structure
|
||||
- added hb_fsFileExists() and hb_fsDirExists()
|
||||
- added hb_arraySet*() functions - they should help 3-rd party developers
|
||||
- added hb_arraySet*() functions - they should help 3rd party developers
|
||||
to eliminate using C stack level HB_ITEM and reduce usage of potentially
|
||||
danger function like hb_arrayGetItemPtr()
|
||||
- added hb_itemParamStore[Forward]() functions
|
||||
@@ -1007,8 +1005,8 @@ DEBUGGER
|
||||
|
||||
RTL
|
||||
---
|
||||
- added functions for translation to/from UTF8 mode and operations
|
||||
on UTF8 strings
|
||||
- added functions for translation to/from UTF-8 mode and operations
|
||||
on UTF-8 strings
|
||||
- added functions for bit manipulations: HB_BIT*() and for conversions
|
||||
to/from hexadecimal format
|
||||
- added set of functions with hb_ prefix supported extended parameters,
|
||||
@@ -1028,7 +1026,7 @@ RTL
|
||||
objects also with active exceptions
|
||||
- added missing support for _SET_FILECASE, _SET_DIRCASE switches in some
|
||||
functions
|
||||
- added _SET_TRIMFILENAME - when enabled low level hb_fs*() functions strip
|
||||
- added _SET_TRIMFILENAME - when enabled low-level hb_fs*() functions strip
|
||||
trailing and leading spaces from file names to emulate DOS like behavior
|
||||
- added support for _SET_DEFEXTENSIONS to native all RDDs
|
||||
- many fixes in Transform() function and fixed 64-bit integer transformation.
|
||||
@@ -1062,7 +1060,7 @@ GT:
|
||||
terminfo). It has hard coded support only for few terminals (Linux,ANSI,
|
||||
XTERM) but because uses only very limited set of escape sequences then
|
||||
on most currently used terminals it works better then curses or slang
|
||||
based programs. GTTRM automatically detects ISO/UTF8 terminal mode at
|
||||
based programs. GTTRM automatically detects ISO/UTF-8 terminal mode at
|
||||
startup and chose valid output what should also help *nix users - it
|
||||
resolves problems with some box drawing characters and others which
|
||||
are not accessible in ISO mode. It also respects /etc/harbour/hb-charmap.def
|
||||
@@ -1082,7 +1080,7 @@ GT:
|
||||
- fixed color string decoding to be fully Clipper compatible
|
||||
- OutStd()/OutErr() respects automatic CP translation when they
|
||||
are not redirected to GT screen
|
||||
- added common for all GTs CLIPBOARD support. If possible low level GT
|
||||
- added common for all GTs CLIPBOARD support. If possible low-level GT
|
||||
drivers uses system clipboard otherwise they emulate it for Harbour
|
||||
application only
|
||||
|
||||
@@ -1165,7 +1163,7 @@ Version 1.1.1 Devel Build (2007-06-14) tag: build48
|
||||
constructions
|
||||
- added BEGIN SEQUENCE [WITH <bErrorBlock>] / RECOVER [USING <oErr>] /
|
||||
ALWAYS / END
|
||||
- new debugger code with low level C interface borrowed from xHarbour
|
||||
- new debugger code with low-level C interface borrowed from xHarbour
|
||||
- added hash tables
|
||||
- speed improvement
|
||||
- added regular expressions
|
||||
@@ -1260,7 +1258,7 @@ syntax:
|
||||
(FLEX version only).
|
||||
- Added new compiler switch -gc3 to generate real C code output
|
||||
(instead of PCODE array called by a C wrapper).
|
||||
- Added new command line switch -r=<max_recursive_preprocessor_passes>
|
||||
- Added new command-line switch -r=<max_recursive_preprocessor_passes>
|
||||
- Added -undef: compiler switch (borrowed from xHarbour).
|
||||
- Added support for @filelst[.clp] - partially borrowed from xHarbour.
|
||||
It's not exactly the same as in Clipper because Clipper creates one
|
||||
@@ -1339,12 +1337,12 @@ API
|
||||
such code may stop to work with next Harbour versions. Without
|
||||
hbvmopt.h the internal structures like HB_ITEM, HB_DYNS, ... are
|
||||
mapped to 'void' so there is no way to access their members so we
|
||||
can modify them in the future without afford for 3-rd party code.
|
||||
can modify them in the future without afford for 3rd party code.
|
||||
- Remove default API and stack macros. Now API/stack macros can be
|
||||
enabled by including hb_vmopt.h file. This file should be included
|
||||
ONLY by core code because binary object/libraries generated after
|
||||
can work only with EXACTLY the same HVM compiled the same C
|
||||
alignment switches. 3-rd party code should include hbvmpub.h only.
|
||||
alignment switches. 3rd party code should include hbvmpub.h only.
|
||||
- Added support to passing function references as HB_IT_SYMBOL.
|
||||
- hb_itemType() return "S" for HB_IT_SYMBOL.
|
||||
- Message symbols are not function symbols, cleaned the HB_FS_MESSAGE
|
||||
@@ -1400,7 +1398,7 @@ API
|
||||
- Use hb_fileNameConv() instead of hb_filecase(), hb_fileNameConv()
|
||||
is the only one function to make file name conversions dependent on
|
||||
some SETs.
|
||||
- HB_MATHERRMODE() input validation logic moved to the lower level
|
||||
- HB_MATHERRMODE() input validation logic moved to the lower-level
|
||||
function. This is a step to make this a simple Set().
|
||||
- Added STRPEEK and STRPOKE FS functions covered by HB_COMPAT_FLAGSHIP
|
||||
macro.
|
||||
@@ -1426,7 +1424,7 @@ GT:
|
||||
- Added GTI_* defintions for hb_gtInfo() function. This function
|
||||
works in similar way to dbInfo() in RDD.
|
||||
- New driver GTCRS based on xHarbour and Flagship curses code.
|
||||
- New driver GTWVT for Win32 using GUI window instead of console.
|
||||
- New driver GTWVT for Windows using GUI window instead of console.
|
||||
- New driver GTXWC for XWindow Console.
|
||||
- New driver GTALLEG for Allegro cross platform graphic libraries.
|
||||
- Respect pure REQUEST HB_GT_NUL as user GT choice if only GTNUL
|
||||
@@ -1439,7 +1437,7 @@ Multilangual:
|
||||
- Codepage: Updated UNICODE values for characters in range 1-31 to
|
||||
keep DOS compatibility.
|
||||
- Codepage: Renamed files (cdp*.c -> cd*.c).
|
||||
- Codepage: Added UTF8 related functions: hb_cdpUTF8StringLength(),
|
||||
- Codepage: Added UTF-8 related functions: hb_cdpUTF8StringLength(),
|
||||
hb_cdpStringInUTF8Length(), hb_cdpUTF8ToStrn().
|
||||
- Moved EN lang definitions to core lang code so we always have
|
||||
- HU sorting order fixed to be more compatible with Clipper.
|
||||
@@ -1456,7 +1454,7 @@ RDD
|
||||
- Rewritten DBFNTX, now it supports in practice all CDX features with
|
||||
multi tags and many others. With rddInfo() some important new
|
||||
features in DBFNTX can be enabled like increased maximum NTX file
|
||||
size up to 4TB, support structural/autoopen indexes, bounding record
|
||||
size up to 4 TiB, support structural/autoopen indexes, bounding record
|
||||
number with index key (like in CDX format what resaolves the
|
||||
performance problem with indexes which have a lot of non unique
|
||||
keys, etc.)
|
||||
@@ -1506,7 +1504,7 @@ Contrib
|
||||
- ADS: Added ADSCDX, ADSNTX and ADT RDDs. ADS RDD should not be longer
|
||||
used, it's only for backward compatibility.
|
||||
- ADS: Call AdsFlushFileBuffers() only when _SET_HARDCOMMIT is set.
|
||||
- ADS: Added possibility to save memo fields > 64K.
|
||||
- ADS: Added possibility to save memo fields > 64 KiB.
|
||||
- ADS: Added support for relations in ADS* RDDs which are not
|
||||
supported directly by ADS or are for other non ADS* tables.
|
||||
- ADS: Synced base RDD with xHarbour.
|
||||
@@ -1604,7 +1602,7 @@ The runtime modules
|
||||
- Added Spanish Modern codepage
|
||||
- Synced HB CDP API with xHarbour - added basic Unicode support
|
||||
- Added functions hb_fsLockLarge() and hb_fsSeekLarge() which uses 64-bit
|
||||
offsets in filesys.c for files larger than 2Gb
|
||||
offsets in filesys.c for files larger than 2GB
|
||||
|
||||
RDD
|
||||
---
|
||||
@@ -1623,7 +1621,7 @@ General
|
||||
-------
|
||||
- Updated build process for Debian Linux distribution (.deb) packages.
|
||||
Now hb* scripts and shared libs are created by standard make install
|
||||
- Added support for Solaris (SunOS) and Darwin (Mac OS X).
|
||||
- Added support for Solaris (SunOS) and Darwin (OS X).
|
||||
- Added support for Hewlett Packard Unix (HP_UX) and ALPHA DEC.
|
||||
- Many adds and fix in compilation scripts on all platforms.
|
||||
- Fixed some error messages
|
||||
@@ -1641,7 +1639,7 @@ The compiler
|
||||
- New compiler flag -ks was added to enable support for
|
||||
strings as array of bytes. (Notice that support for strings
|
||||
as array of bytes is disabled by default both in the Harbour compiler
|
||||
and in harbour's runtime modules)
|
||||
and in Harbour's runtime modules)
|
||||
- Added a new compiler switch -kJ to disable jump optimalization and
|
||||
NOOP pcode removal (optimalization is enabled by default).
|
||||
- When Xbase++ mode is not used (-kc or -kch) then compiler doesn't
|
||||
@@ -1651,7 +1649,7 @@ The compiler
|
||||
- Enabled support for break[].
|
||||
- Fixed optimalization of far jumps (this fixes generation of pcode
|
||||
for abnormally large (DO CASE/IF/ELSEIF statements)
|
||||
- Added support to OpenWatcom DOS/Win32.
|
||||
- Added support to OpenWatcom DOS/Windows.
|
||||
- Fixed compilation of &(exp) in normal stringify
|
||||
markers (this fixes INDEX ON bug).
|
||||
- Added missing support for @¯o and @M->memvar (aAdded a new
|
||||
@@ -1661,7 +1659,7 @@ The compiler
|
||||
passed argument has the same name as declared parameter.
|
||||
- Fixed parsing of nested #defines in command/translate
|
||||
- Macro - Added HB_SM_ARRSTR support.
|
||||
- Clipper preproceses '**' into '^' - harbour too
|
||||
- Clipper preproceses '**' into '^' - Harbour too
|
||||
- Added HB_COUNTER and HB_PTRDIFF types - first for reference counters and
|
||||
second for any pointer differences and pointer to integer conversions.
|
||||
- HB_EXPORT is added to ITEM API, FILE API and some other function
|
||||
@@ -1688,7 +1686,7 @@ The runtime modules
|
||||
- Added possibility to load a character mapping using HB_GT_CHARMAP()
|
||||
(ncurses GT only)
|
||||
- Improved recognition of xterm compatible terminals (ncurses GT only)
|
||||
- New internal command line arguments were added to control
|
||||
- New internal command-line arguments were added to control
|
||||
application at runtime:
|
||||
//FLAGS:switches
|
||||
this flag controls compatibility issues of the virtual
|
||||
@@ -1734,14 +1732,14 @@ The runtime modules
|
||||
- Fixed to correctly return the procedure name where the codeblock was created.
|
||||
- Greek and Serbian language codepage files added.
|
||||
- fixed to use 'mkstemp' on Unix (no more GCC linker warnings)
|
||||
- Fixed file find API to be compatible with CA-Cl*pper on the lower level.
|
||||
- Fixed file find API to be compatible with CA-Cl*pper on the lower-level.
|
||||
- Fixes in TBColumn class
|
||||
|
||||
RDD
|
||||
---
|
||||
- Latest RDD changes synced with xHarbour.
|
||||
- Fixed dbCreate() bug that closed an open dbf with same name as newly
|
||||
created dbf in a different folder.
|
||||
created dbf in a different directory.
|
||||
- FieldPut() Fixed to accept and ignore field NIL values
|
||||
without runtime error. C52 compatible.
|
||||
- Added scopped relations. Now ordSetRelation() works with DBFCDX like
|
||||
@@ -1832,7 +1830,7 @@ Version 0.38 Alpha Build 38 (2001-12-15) tag: build38
|
||||
- ::Super(::oneVar) is now correctly interpreted
|
||||
- Freezed Scooping because it was not anymore working after the
|
||||
previous fix. Waiting after Alpha build 38 to fix and re-enable it
|
||||
- HGF (Harbour GUI multiplatform Framework) started
|
||||
- HGF (Harbour GUI multi-platform Framework) started
|
||||
- Class HBPersistent added to RTL to provide Harbour objects persistence
|
||||
- New PROPERTY | PERSISTENT clause added as a DATA feature
|
||||
- New function __clsGetProperties() added. Syntax:
|
||||
@@ -1864,7 +1862,7 @@ Version 0.38 Alpha Build 38 (2001-12-15) tag: build38
|
||||
- Hbzlib enhacements
|
||||
- Some debugger fixes - it is now really usable.
|
||||
- Hbmake enhacements
|
||||
- On Win32 platforms, Harbour now supports the ability to create and
|
||||
- On Windows platforms, Harbour now supports the ability to create and
|
||||
use .dll files. These .dll files can be used as pcode storage,
|
||||
Harbour Runtime storage, or both, and if both, can be made callable
|
||||
from other languages that use .dll's as fully functional standalone
|
||||
@@ -1926,9 +1924,10 @@ Version 0.35 Alpha Build 35 (2000-08-15)
|
||||
- MySQL database access contribution started
|
||||
- ADS RDD encryption/decryption functions added
|
||||
- New GTCGI driver
|
||||
- Improved command line parsing
|
||||
- Alternate Lexer (SimpLex), utilizes less memory, smaller Harbour.exe
|
||||
as well as smaller compiled applications (due to smaller macro compiler)
|
||||
- Improved command-line parsing
|
||||
- Alternate Lexer (SimpLex), utilizes less memory, smaller harbour
|
||||
executables as well as smaller compiled applications (due to smaller
|
||||
macro compiler)
|
||||
|
||||
----------------------------------------------------------------------
|
||||
Version 0.34 Alpha Build 34 (2000-06-02)
|
||||
@@ -1937,7 +1936,7 @@ Version 0.34 Alpha Build 34 (2000-06-02)
|
||||
- Linux/Unix ncurses screen output and xterm mouse input support
|
||||
- MEMOEDIT support started
|
||||
- CONTRIBs better separated from core Harbour (TOOLS moved there)
|
||||
- Simplified and enhanced base for multiplatform coding
|
||||
- Simplified and enhanced base for multi-platform coding
|
||||
- Language API (link/compile time language module selection)
|
||||
- Several small optimizations, enhancements and fixes (compiler, macro, GT,
|
||||
inkey, make and build systems, more strict compiler warnings)
|
||||
@@ -1997,10 +1996,10 @@ Version 0.33 Alpha Build 33 (2000-04-07)
|
||||
- Make and build files further cleaned up, enhanced, optimized, synchronized
|
||||
etc...
|
||||
- Compiler and platform detection enhanced, some hacks removed,
|
||||
multiplatform cleanups and fixes.
|
||||
multi-platform cleanups and fixes.
|
||||
- Warning levels upped, warnings fixed, code quality raised
|
||||
- Version numbering standardized
|
||||
- Multiple source file support in Harbour command line
|
||||
- Multiple source file support in Harbour command-line
|
||||
- HBCLIP and RUNJAVA contribution dirs added
|
||||
- HBDOC Enhacements: New subtags for better output: <par>,</par> for paragraph
|
||||
<b></b> for bold, <i></i> for italic, <em></em> for bold italic font
|
||||
@@ -2013,7 +2012,7 @@ Version 0.32 Alpha Build 32 (2000-03-07)
|
||||
|
||||
- New Borland make files
|
||||
- Many make and build processes fixes, enhancements, warning fixes
|
||||
- Borland, MSVC and GNU-make processes don't collide anymore
|
||||
- Borland, MSVC and GNU Make processes don't collide anymore
|
||||
- PP now supports code in header files
|
||||
- Docs separated from the source
|
||||
- Docs enhanced
|
||||
@@ -2041,7 +2040,7 @@ Version 0.31 Alpha Build 31 (2000-01-27) tag: build31
|
||||
- Many changes, fixes, and enhancements to the GT API system
|
||||
- Improved SetCursor() and Set( _SET_CURSOR )
|
||||
- Added FieldBlock() and FieldWBlock()
|
||||
- The Harbour '-w' command line option can set the maximal level of reported
|
||||
- The Harbour '-w' command-line option can set the maximal level of reported
|
||||
warnings. The following levels are supported currently:
|
||||
'-w0' - no warnings
|
||||
'-w' or '-w1' - Clipper compatible warnings
|
||||
@@ -2099,7 +2098,7 @@ Version 0.31 Alpha Build 31 (2000-01-27) tag: build31
|
||||
- Added HARBOURCMD/CLIPPERCMD environment variables
|
||||
- Added support for #pragma directives
|
||||
- Enhanced GetEnv() function
|
||||
- Added //BUILD app command line option
|
||||
- Added //BUILD app command-line option
|
||||
|
||||
----------------------------------------------------------------------
|
||||
Version 0.30 Alpha Build 30 (1999-09-30)
|
||||
@@ -2114,20 +2113,20 @@ Version 0.30 Alpha Build 30 (1999-09-30)
|
||||
- Support for FIELD variables
|
||||
- Support for canceling the application by pressing Alt-C
|
||||
- Enhanced ITEM API
|
||||
- Support for internal command line options '//'
|
||||
- Support for internal command-line options '//'
|
||||
- Severe speed improvement
|
||||
- Better Directory() compatibility
|
||||
- Redirected output works now
|
||||
- Even more Preprocessor compatibility
|
||||
- Set HARBOUR= in environment to override Set CLIPPER= settings
|
||||
- Rudimentary Unix keyboard support added
|
||||
- Tone support added
|
||||
- Tone() support added
|
||||
- SET KEY support was added
|
||||
- Extensive regression test suite added (RTL_TEST)
|
||||
- Array handling fixed and made Clipper compatible
|
||||
- Ragged array declaration and initialization support added
|
||||
- FileSys API extensions, more C5.3 compatible functions added
|
||||
- Compiler command line compatibility enhanced
|
||||
- Compiler command-line compatibility enhanced
|
||||
- Internal errors made uniform
|
||||
- Source code cleanup and formatting
|
||||
- Many new functions, samples and bug fixes
|
||||
@@ -2141,7 +2140,7 @@ Version 0.29 Alpha Build 29 (1999-07-27)
|
||||
MacIntosh
|
||||
BC 3.1, 4.0, 4.5, 5.2
|
||||
GCC OS/2
|
||||
GCC Win32
|
||||
GCC Windows
|
||||
MS VC
|
||||
GCC Linux / Unix
|
||||
IBM C
|
||||
@@ -2174,8 +2173,8 @@ Version 0.28 Alpha Build 28 (1999-07-18)
|
||||
----------------------------------------------------------------------
|
||||
Version 0.27a Alpha Build 27a (1999-06-19)
|
||||
|
||||
- Corrected build numbers in Harbour.exe
|
||||
- Corrected a little bug in HScript.prg
|
||||
- Corrected build numbers in harbour executable
|
||||
- Corrected a little bug in hscript.prg
|
||||
|
||||
----------------------------------------------------------------------
|
||||
Version 0.27 Alpha Build 27 (1999-06-18)
|
||||
@@ -2226,9 +2225,9 @@ Version 0.24 Alpha Build 24 (1999-06-03)
|
||||
----------------------------------------------------------------------
|
||||
Version 0.23 Alpha Build 23 (1999-05-19)
|
||||
|
||||
- Harbour.exe for DOS/Windows is included now
|
||||
- The Windows libs are also included (hbw.bat to build Windows .exe's)
|
||||
- .hrb files! These files can be run with the runner.exe (Source included)
|
||||
- harbour executable for DOS/Windows is included now
|
||||
- The Windows libs are also included (hbw.bat to build Windows executables)
|
||||
- .hrb files! These files can be run with runner.exe (Source included)
|
||||
- No need for a C compiler anymore to run Harbour source!
|
||||
- New MAKE and BUILD files for IBM C++ 3.0 for OS/2
|
||||
- Many fixes, Many enhancements (See ChangeLog in the Harbour directory)
|
||||
@@ -2238,7 +2237,7 @@ Version 0.23 Alpha Build 23 (1999-05-19)
|
||||
----------------------------------------------------------------------
|
||||
Version 0.21-2 Alpha Build 21-2 (1999-05-13)
|
||||
|
||||
- 32 bits OBJ's generation
|
||||
- 32-bit OBJ's generation
|
||||
- More Clipper language compatibility
|
||||
- New object oriented features
|
||||
|
||||
@@ -2281,7 +2280,7 @@ Version 0.17 Alpha Build 17 (1999-04-20)
|
||||
Version 0.16 Alpha Build 16 (1999-04-17)
|
||||
|
||||
- New project directories structure
|
||||
- Added support for command line parameters
|
||||
- Added support for command-line parameters
|
||||
- Compiler /o options changed to /g
|
||||
- /gc added (default option)
|
||||
- Changes on types.h
|
||||
@@ -2322,7 +2321,7 @@ OpenClipper #9 Alpha build 9 (1999-04-01)
|
||||
- Bison 1.24 is used now instead of byacc as byacc were returning
|
||||
a 'Out of space' error (parser execution is faster now!)
|
||||
- We are linking using huge memory model now cause DGROUP was already
|
||||
over 64Kb
|
||||
over 64 KiB
|
||||
|
||||
----------------------------------------------------------------------
|
||||
OpenClipper #8 Alpha build 8 (1999-03-29)
|
||||
|
||||
14
doc/pp.txt
14
doc/pp.txt
@@ -332,7 +332,7 @@ making in last days.
|
||||
to macro tokens expressions starting with '&' followed by '('.
|
||||
The macro tokens are stringify in differ way. If macro
|
||||
does not have any internal '&' characters and has at most
|
||||
one '.' as last character then as result non quited keyword
|
||||
one '.' as last character then as result non quoted keyword
|
||||
is generated. Otherwise it generate strings with stripped first
|
||||
'&' character.
|
||||
If expression starts with '&' token followed by single
|
||||
@@ -450,7 +450,7 @@ making in last days.
|
||||
The optional match patterns are one of the weakest point of current PP.
|
||||
Even such simple code:
|
||||
#xcommand CMD <x> [IN [GET] [PUT]] => ? #<x>
|
||||
CMD sth IN PUT GET
|
||||
CMD something IN PUT GET
|
||||
Is not well preprocessed.
|
||||
|
||||
20. rule have to begin with non empty token or the rule will never be used.
|
||||
@@ -492,7 +492,7 @@ making in last days.
|
||||
If anything substituted
|
||||
continue
|
||||
|
||||
Do While 1-st token match some #[x]command pattern
|
||||
Do While 1st token match some #[x]command pattern
|
||||
substitute
|
||||
EndDo
|
||||
|
||||
@@ -500,7 +500,7 @@ making in last days.
|
||||
|
||||
Output processed token until the last one or ; token
|
||||
|
||||
If 1-st token is '#'
|
||||
If 1st token is '#'
|
||||
continue
|
||||
|
||||
Remove all tokens in the list until the last one or ; token
|
||||
@@ -647,15 +647,15 @@ making in last days.
|
||||
Such special status can be added automatically when ; token is followed
|
||||
by # or ; is quoted by \
|
||||
d. already existing xHarbour extensions:
|
||||
#[x]unTrasnslate, #[x]unCommand
|
||||
#[x]untranslate, #[x]uncommand
|
||||
but modified to locate match pattern which can cover exactly the same
|
||||
data.
|
||||
#if
|
||||
but working with integer to allow using 64bit ones which are broken
|
||||
due to conversion to double. The semantic for expressions will be
|
||||
similar to C one with the exception to ! (not) operator precedence.
|
||||
I do not think that Clipper/xbase users are familiar with the exact
|
||||
not operator precedence in C which is differ then the one in xbase
|
||||
I do not think that Clipper/xBase users are familiar with the exact
|
||||
not operator precedence in C which is differ then the one in xBase
|
||||
world.
|
||||
e. modified version of Harbour's
|
||||
#pragma {__text, __stream, __cstream, __endtext}
|
||||
|
||||
@@ -3,32 +3,32 @@ Przemyslaw Czerpak (druzus/at/priv.onet.pl)
|
||||
In Harbour preprocessor can be used in PRG code.
|
||||
This is list of PRG functions available for programmer.
|
||||
|
||||
REQUEST __PP_STDRULES
|
||||
REQUEST __pp_StdRules
|
||||
It forces including standard std.ch rules in static binaries.
|
||||
Dynamic binaries linked with harbour dynamic library always
|
||||
Dynamic binaries linked with Harbour dynamic library always
|
||||
includes standard PP rules.
|
||||
|
||||
|
||||
__PP_INIT( [<cIncludePath>] [, <cStdChFile> ] ) -> <pPP>
|
||||
__pp_Init( [<cIncludePath>] [, <cStdChFile> ] ) -> <pPP>
|
||||
Initialize new PP context and return pointer to it.
|
||||
when <cStdChFile> is empty string ("") then no default rules are
|
||||
used and only the dynamically created #defines like __HARBOUR__,
|
||||
__DATE__, __TIME__, __PLATFORM__* are registered.
|
||||
If <cStdChFile> is missing or NIL and standard PP rules from
|
||||
std.ch are included in binaries (REQUEST __PP_STDRULES) then
|
||||
std.ch are included in binaries (REQUEST __pp_StdRules) then
|
||||
they are used.
|
||||
|
||||
__PP_PATH( <pPP>, <cPath> [, <lClearPrev>] ) -> NIL
|
||||
__pp_Path( <pPP>, <cPath> [, <lClearPrev>] ) -> NIL
|
||||
Add new (or replace previous) include paths.
|
||||
|
||||
__PP_RESET( <pPP> )
|
||||
__pp_Reset( <pPP> )
|
||||
Reset the PP context (remove all rules added by user or
|
||||
preprocessed code)
|
||||
|
||||
__PP_ADDRULE( <pPP>, <cDirective> )
|
||||
__pp_AddRule( <pPP>, <cDirective> )
|
||||
Preprocess and execute new preprocessor directive
|
||||
|
||||
__PP_PROCESS( <pPP>, <cCode> ) -> <cPreprocessedCode>
|
||||
__pp_Process( <pPP>, <cCode> ) -> <cPreprocessedCode>
|
||||
Preprocess given code and return result
|
||||
|
||||
User can create more then one PP context and then use each of them
|
||||
@@ -56,25 +56,28 @@ it's lines by macro compiler:
|
||||
? "pow =", pow
|
||||
? "value * pow =", VALUE * pow
|
||||
WAIT
|
||||
? VALUE2 // generate RTE
|
||||
? VALUE2 // generate RTE
|
||||
|
||||
|
||||
/*** testpp.prg ***/
|
||||
REQUEST __PP_STDRULES
|
||||
REQUEST __WAIT
|
||||
PROC Main()
|
||||
local cLine, pPP, oErr
|
||||
pPP := __PP_INIT()
|
||||
BEGIN SEQUENCE WITH {|oErr| BREAK( oErr ) }
|
||||
FOR EACH cLine IN hb_ATokens( StrTran( __PP_Process( pPP, ;
|
||||
hb_MemoRead( "macro.dat" ) ), Chr( 13 ) ), Chr( 10 ) )
|
||||
REQUEST __pp_StdRules
|
||||
REQUEST __Wait
|
||||
|
||||
PROCEDURE Main()
|
||||
|
||||
LOCAL cLine, pPP, oErr
|
||||
|
||||
pPP := __pp_Init()
|
||||
BEGIN SEQUENCE WITH __BreakBlock()
|
||||
FOR EACH cLine IN hb_ATokens( __pp_Process( pPP, ;
|
||||
hb_MemoRead( "macro.dat" ) ), .T. )
|
||||
BEGIN SEQUENCE
|
||||
IF !Empty( cLine )
|
||||
IF ! Empty( cLine )
|
||||
&cLine
|
||||
ENDIF
|
||||
RECOVER USING oErr
|
||||
? "MacroCompiler error at line:", ;
|
||||
hb_ntos( cLine:__enumIndex() )
|
||||
hb_ntos( cLine:__enumIndex() )
|
||||
? cLine
|
||||
? ErrMsg( oErr )
|
||||
END SEQUENCE
|
||||
@@ -83,17 +86,18 @@ it's lines by macro compiler:
|
||||
? ErrMsg( oErr )
|
||||
END SEQUENCE
|
||||
?
|
||||
RETURN
|
||||
|
||||
RETURN
|
||||
|
||||
STATIC FUNCTION ErrMsg( oErr )
|
||||
RETURN "Error " + ;
|
||||
iif( HB_ISSTRING( oErr:subsystem ), ;
|
||||
oErr:subsystem, "???" ) + ;
|
||||
iif( HB_ISNUMERIC( oErr:subCode ), ;
|
||||
"/" + hb_ntos( oErr:subCode ), "/???" ) + ;
|
||||
iif( HB_ISSTRING( oErr:description ), ;
|
||||
" " + oErr:description, "" ) + ;
|
||||
iif( ! Empty( oErr:filename ), ;
|
||||
" " + oErr:filename, ;
|
||||
iif( ! Empty( oErr:operation ), ;
|
||||
" " + oErr:operation, "" ) )
|
||||
RETURN "Error " + ;
|
||||
iif( HB_ISSTRING( oErr:subsystem ), ;
|
||||
oErr:subsystem, "???" ) + ;
|
||||
iif( HB_ISNUMERIC( oErr:subCode ), ;
|
||||
"/" + hb_ntos( oErr:subCode ), "/???" ) + ;
|
||||
iif( HB_ISSTRING( oErr:description ), ;
|
||||
" " + oErr:description, "" ) + ;
|
||||
iif( ! oErr:filename == "", ;
|
||||
" " + oErr:filename, ;
|
||||
iif( ! Empty( oErr:operation ), ;
|
||||
" " + oErr:operation, "" ) )
|
||||
|
||||
@@ -75,7 +75,7 @@ EXAMPLES
|
||||
#pragma linenumber=off
|
||||
/* #pragma -l */
|
||||
|
||||
This is the same as calling Harbour with the -l switch in the command line,
|
||||
This is the same as calling Harbour with the -l switch in the command-line,
|
||||
but with the great benefit that if you forgot to pass the switch, it will
|
||||
be used anyway because it is included inside the source.
|
||||
|
||||
@@ -89,7 +89,7 @@ SPECIAL PRAGMAS
|
||||
===============
|
||||
These pragmas allows to control the processing of PRG source within
|
||||
the preprocessor. The special handling is done with a text enclosed
|
||||
betwen the '#pragma <type>' and '#pragma __endtext'
|
||||
between the '#pragma <type>' and '#pragma __endtext'
|
||||
|
||||
#pragma __text
|
||||
--------------
|
||||
@@ -97,10 +97,10 @@ Syntax:
|
||||
#pragma __text '|' [LineOutputCode] '|' [FinallyCode] '|' [StartupCode]
|
||||
|
||||
Every line of text is stringified using '[' and ']' markers and is
|
||||
passed to 'LineOutputCode' using C '%s' formating code. The result
|
||||
passed to 'LineOutputCode' using C '%s' formatting code. The result
|
||||
text is passed further to the syntax analyzer. The 'StartupCode'
|
||||
is returned at the very beginning of procesing. The 'FinallyCode'
|
||||
is returned at the end. If 'LineOutputCode' is ommited then all
|
||||
is returned at the very beginning of processing. The 'FinallyCode'
|
||||
is returned at the end. If 'LineOutputCode' is omitted then all
|
||||
lines are ignored.
|
||||
|
||||
For example, this pragma is used to implement TEXT/ENDTEXT command
|
||||
@@ -136,19 +136,19 @@ Syntax:
|
||||
?
|
||||
|
||||
TEXT TO VAR v
|
||||
This is 'example' text with ''""[] embeded
|
||||
This is 'example' text with ''""[] embedded
|
||||
ENDTEXT
|
||||
|
||||
The above example is preprocessed into:
|
||||
v:=[This is 'example' text with ''""[] embeded]
|
||||
v:=[This is 'example' text with ''""[] embedded]
|
||||
|
||||
#pragma __cstream
|
||||
----------------
|
||||
Syntax:
|
||||
#pragma __cstream '|' [JoinLineCode] '|' [EndingCode] '|' [StartingCode]
|
||||
|
||||
This is simmilar to '#pragma __stream' with the additional convertion
|
||||
of C esc sequences e.g \n \t \r \b
|
||||
This is similar to '#pragma __stream' with the additional conversion
|
||||
of C Esc sequences e.g \n \t \r \b
|
||||
|
||||
For example:
|
||||
|
||||
@@ -156,18 +156,18 @@ Syntax:
|
||||
#pragma __cstream|%s||<var>:=
|
||||
|
||||
TEXT TO VAR v
|
||||
This is 'example' text with ''""[] embeded and C \n
|
||||
This is 'example' text with ''""[] embedded and C \n
|
||||
sequence
|
||||
ENDTEXT
|
||||
? v
|
||||
|
||||
The above example is preprocessed into:
|
||||
v:=[This is 'example' text with ''""[] embeded and C \nsequence]
|
||||
v:=[This is 'example' text with ''""[] embedded and C \nsequence]
|
||||
QOut(v)
|
||||
|
||||
and at runtime the following is printed:
|
||||
|
||||
This is 'example' text with ''""[] embeded and C
|
||||
This is 'example' text with ''""[] embedded and C
|
||||
sequence
|
||||
|
||||
#pragma __endtext
|
||||
@@ -189,7 +189,7 @@ Syntax:
|
||||
|
||||
This pragma sets the maximum number of preprocess iterations during
|
||||
the source code translation. The default value is 1024.
|
||||
This is the same as /r= command line switch
|
||||
This is the same as /r= command-line switch
|
||||
|
||||
For example:
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ does not generate the proper pcode for them).
|
||||
So I would like to make an introduction to static variables management as
|
||||
it is a sophisticated system that Harbour is going to implement.
|
||||
|
||||
It is something publically known that Clipper static variables are
|
||||
It is something publicly known that Clipper static variables are
|
||||
located at the bottom of the data segment. This has caused all kinds of
|
||||
troubles. This is why when I designed Five I did it in a way that could not
|
||||
cause any trouble in the future.
|
||||
|
||||
32
doc/todo.txt
32
doc/todo.txt
@@ -3,8 +3,8 @@
|
||||
Harbour TODO list
|
||||
|
||||
=======================================================================
|
||||
Tasks for after v.1 release:
|
||||
----------------------------
|
||||
Tasks for after v1.0 release:
|
||||
-----------------------------
|
||||
|
||||
Assign to: Ryszard
|
||||
Detail...: SQLRDD.
|
||||
@@ -12,26 +12,6 @@ Status...: Working on it.
|
||||
|
||||
***
|
||||
|
||||
Assign to: <nobody>
|
||||
Detail...: Add support for virtual file handles and registering some
|
||||
meta handles so it will be possible to make:
|
||||
h := FOpen( "gzip:/tmp/myarchive.gz", FO_WRITE )
|
||||
FWrite( h, cData )
|
||||
FClose( h )
|
||||
or:
|
||||
h := FOpen( "tcp:some.host:port", FO_WRITE )
|
||||
...
|
||||
or:
|
||||
h := FOpen( "|lpr -PLaserJet", FO_WRITE )
|
||||
...
|
||||
or:
|
||||
h := FOpen( "gunzip /tmp/myarchive.gz|", FO_READ )
|
||||
...
|
||||
etc.
|
||||
Status...: Open.
|
||||
|
||||
***
|
||||
|
||||
Assign to: Przemek
|
||||
Detail...: Define multi platform platform API for GTs which can mix
|
||||
graphics objects with standard text output. Now it's
|
||||
@@ -52,7 +32,7 @@ Assign to: <nobody>
|
||||
Detail...: Add NETRDD - meta RDD which will allow transport layer
|
||||
between client application and server application with any
|
||||
other chosen RDD driver. Idea similar to GTNET but for RDD
|
||||
drivers - it's sth like ADS does.
|
||||
drivers - it's something like ADS does.
|
||||
Status...: Open.
|
||||
|
||||
***
|
||||
@@ -62,7 +42,7 @@ Detail...: Extended HB_IT_POINTER. In practice we can give them the
|
||||
same functionality as for objects and use them for fast
|
||||
creation objects at C level. We can also add HB_VALTYPE()
|
||||
function which will return the extended type name, f.e.
|
||||
"WINDOW", "FONT", "SOCKET" or anything what 3-rd party
|
||||
"WINDOW", "FONT", "SOCKET" or anything what 3rd party
|
||||
programmers may want to use. It will greatly simplify
|
||||
writing some libraries.
|
||||
Status...: Open.
|
||||
@@ -77,14 +57,14 @@ Status...: Open.
|
||||
***
|
||||
|
||||
Assign to: Ryszard
|
||||
Detail...: Real strong typing in the compiler.
|
||||
Detail...: Static/gradual ("strong") typing in the compiler.
|
||||
Status...: Open.
|
||||
|
||||
***
|
||||
|
||||
=======================================================================
|
||||
|
||||
Harbour TOFIX list
|
||||
Harbour FIXME list
|
||||
|
||||
=======================================================================
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ the C code:
|
||||
|
||||
HB_TRACE( level, ( "printf-style parameters", arg1, arg2 ) );
|
||||
|
||||
The level specified for the HB_TRACE call affects harbour in two ways:
|
||||
The level specified for the HB_TRACE call affects Harbour in two ways:
|
||||
compilation time and run time.
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ one of
|
||||
|
||||
with the following effect: any calls to HB_TRACE that were left by the
|
||||
compiler and which have a level lower or equal to HB_TR_LEVEL will
|
||||
print its arguments on stderr.
|
||||
print its arguments on STDERR.
|
||||
|
||||
|
||||
EXAMPLES
|
||||
@@ -91,7 +91,7 @@ usually set the HB_USER_CFLAGS environment variable like this:
|
||||
|
||||
export HB_USER_CFLAGS='-DHB_TR_LEVEL=HB_TR_INFO'
|
||||
|
||||
or for other OS (eg: MS-DOS, Windows)
|
||||
or for other OS (e.g.: MS-DOS, Windows)
|
||||
|
||||
SET HB_USER_CFLAGS=-DHB_TR_LEVEL_INFO
|
||||
|
||||
@@ -101,7 +101,7 @@ can set an environment variable like this:
|
||||
|
||||
export HB_TR_LEVEL=HB_TR_WARNING
|
||||
|
||||
or for other OS (eg: MS-DOS, Windows)
|
||||
or for other OS (e.g.: MS-DOS, Windows)
|
||||
|
||||
SET HB_TR_LEVEL=HB_TR_WARNING
|
||||
|
||||
@@ -115,8 +115,8 @@ USAGE
|
||||
|
||||
When Harbour is compiled/run with some level of tracing and then used
|
||||
to compile a regular Harbour application, the app will output LOTS of
|
||||
tracing information to stderr. If you are using a sensible command
|
||||
shell (such as bash) you can redirect stderr to a file like this:
|
||||
tracing information to STDERR. If you are using a sensible command
|
||||
shell (such as bash) you can redirect STDERR to a file like this:
|
||||
|
||||
my_app 2> trace.txt
|
||||
|
||||
@@ -124,18 +124,18 @@ shell (such as bash) you can redirect stderr to a file like this:
|
||||
REDIRECTION
|
||||
===========
|
||||
|
||||
The output generated while tracing goes to stderr by default. You can
|
||||
The output generated while tracing goes to STDERR by default. You can
|
||||
control this at run-time by setting the environment variable
|
||||
HB_TR_OUTPUT to the name of a file where you would like the tracing
|
||||
output to be directed. If there is any problem opening the file for
|
||||
writing, the output reverts to stderr.
|
||||
writing, the output reverts to STDERR.
|
||||
|
||||
When it happens an error and the controller of errors of harbour cannot
|
||||
intercept it (eg: GPF), it can happen that part of information of tracing
|
||||
When it happens an error and the controller of errors of Harbour cannot
|
||||
intercept it (e.g.: GPF), it can happen that part of information of tracing
|
||||
it is not written. This problem is avoided setting the environment
|
||||
variable HB_TR_FLUSH to 1 (one). This makes that every time that one
|
||||
record is sent to write, don't remain in the buffer, but rather it is
|
||||
writen in the file before continuing with the execution.
|
||||
written in the file before continuing with the execution.
|
||||
This set can produce an important reduction of speed of execution.
|
||||
|
||||
TRACING THE PREPROCESSOR AND COMPILER
|
||||
|
||||
@@ -69,5 +69,5 @@ The following functions mean something :
|
||||
date format is British, using @E displays the date in
|
||||
American. Harbour always treats @E as British.
|
||||
|
||||
So is Harbour's behaviour a bug fix or a bug?
|
||||
So is Harbour's behavior a bug fix or a bug?
|
||||
*/
|
||||
|
||||
38
doc/vm.txt
38
doc/vm.txt
@@ -1,13 +1,13 @@
|
||||
The Harbour virtual machine (VM)
|
||||
|
||||
Question :
|
||||
Question:
|
||||
|
||||
If a VM description is desirable, how should it be structured? (I
|
||||
propose plain text, with two main sections: VM description, Opcodes. The
|
||||
"Opcodes" section would describe every opcode: mnemonic, code, operands,
|
||||
description. I think I can maintain this section.)
|
||||
|
||||
Answer :
|
||||
Answer:
|
||||
|
||||
The VM is formed by the main execution loop and several subsystems, each of
|
||||
which could be theoretically replaced, supposing that you respect the
|
||||
@@ -47,9 +47,9 @@ will be optimized by the dynamic symbol table.
|
||||
|
||||
The dynamic symbol table: Dynamically generated from the startup subsystem
|
||||
at the beginning of the application. It organizes in an efficient way the
|
||||
static symbol table creating an alphabetical index that allows a dicotomic
|
||||
static symbol table creating an alphabetical index that allows a dichotomic
|
||||
search of symbols. This subsystem is responsible for quick access to symbols
|
||||
(functions, variables, fields and workareas aliases).
|
||||
(functions, variables, fields and work areas aliases).
|
||||
|
||||
The static and public variables: Responsible for storing public and static
|
||||
variables.
|
||||
@@ -58,7 +58,7 @@ The memory: Responsible for allocating, reallocating, locking, unlocking and
|
||||
freeing memory.
|
||||
|
||||
The extend system: Defines the interface (_parc(), ..., _retc() ) from low
|
||||
level (C language) to high level (Clipper language). This subsystem is
|
||||
level (C language) to high-level (Clipper language). This subsystem is
|
||||
responsible for connecting in a proper way C language functions to the
|
||||
entire application.
|
||||
|
||||
@@ -74,14 +74,14 @@ runtime.
|
||||
|
||||
The macro subsystem: it implements a reduced compiler that may be used at
|
||||
runtime to generate pcode to be used by the application. In fact it is a
|
||||
portion of the harbour yacc specifications.
|
||||
portion of the Harbour yacc specifications.
|
||||
|
||||
The workareas subsystem: Responsible for databases management. It defines
|
||||
the locations where the used workareas will be stored and provides all the
|
||||
functions to access those workareas. It also implements the interface to the
|
||||
The work areas subsystem: Responsible for databases management. It defines
|
||||
the locations where the used work areas will be stored and provides all the
|
||||
functions to access those work areas. It also implements the interface to the
|
||||
replaceable database drivers.
|
||||
|
||||
Question :
|
||||
Question:
|
||||
|
||||
Will Harbour opcodes mimic the Clipper ones? (will there be a 1:1
|
||||
relation between them?) If so, are Clipper opcodes described somewhere?
|
||||
@@ -89,7 +89,7 @@ relation between them?) If so, are Clipper opcodes described somewhere?
|
||||
Answer:
|
||||
|
||||
Clipper language pcode opcodes
|
||||
DEFINE NAME VALOR BYTES
|
||||
DEFINE NAME VALUE BYTES
|
||||
#define NOP 0x00 1
|
||||
#define PUSHC 0x01 3 + literal
|
||||
#define PUSHN 0x05 3
|
||||
@@ -277,7 +277,7 @@ Answer:
|
||||
#define SETPOSBS 0xCF 1
|
||||
|
||||
Harbour will not implement all of them as we want to provide the highest
|
||||
freedom to programers to extend and modify Harbour as needed. In example:
|
||||
freedom to programmers to extend and modify Harbour as needed. In example:
|
||||
Clipper language uses opcodes for: Row(), Col(), Upper(), Space(),
|
||||
Replicate(), Inkey(), Year(), Month(), etc... where we may just call a
|
||||
standard C function, that uses the standard extend system and that may be
|
||||
@@ -285,15 +285,15 @@ easily modified. So Harbour will use much less opcodes than the Clipper
|
||||
language. This will also help to have a simpler and easier to maintain
|
||||
compiler and VM.
|
||||
|
||||
Question :
|
||||
Question:
|
||||
|
||||
I see that, for example, Harbour has an opcode named "PUSHWORD"(06),
|
||||
while Valkyre calls it "PUSHW"(3B): Different names, different codes.
|
||||
Isn't it desirable that Harbour pCode be binary-compatible with Clipper? I
|
||||
mean, by doing so, Harbour VM could interpret Clipper pCode and
|
||||
vice-versa.
|
||||
while Valkyrie calls it "PUSHW"(3B): Different names, different codes.
|
||||
Isn't it desirable that Harbour pcode be binary-compatible with Clipper? I
|
||||
mean, by doing so, Harbour VM could interpret Clipper pcode and
|
||||
vice versa.
|
||||
|
||||
Answer :
|
||||
Answer:
|
||||
|
||||
Harbour opcodes are defined in hbpcode.h. We are trying to use very easy to
|
||||
remember mnemonics, so PUSHWORD seems easier than PUSHW. The opcodes values
|
||||
@@ -304,7 +304,7 @@ speed may increase. Clipper uses it).
|
||||
|
||||
We are not fully implementing the Clipper language OBJs model (i.e. to
|
||||
provide identifiers names length higher than 10 chars) so Harbour OBJs will
|
||||
not be supported by Clipper and viceversa.
|
||||
not be supported by Clipper and vice versa.
|
||||
|
||||
sorry for such a long message :-)
|
||||
|
||||
|
||||
@@ -1,84 +1,77 @@
|
||||
Windows DLLs with Harbour code
|
||||
==============================
|
||||
# Windows DLLs with Harbour code
|
||||
|
||||
Programs created with Clipper or Harbour are traditionally a
|
||||
monolithic EXE containing all executable code. This includes
|
||||
the Virtual Machine (VM) and the RunTime Library (RTL) as well as
|
||||
your own code. Running under Windows with Harbour, you
|
||||
monolithic executable containing all executable code. This includes
|
||||
the Virtual Machine (VM) and the Runtime Library (RTL) as well as
|
||||
your own code. Running under Windows with Harbour, you
|
||||
can now also create and use Windows DLLs that contain PRG code.
|
||||
|
||||
Harbour supports Windows DLLs in 3 ways.
|
||||
|
||||
1) Self-contained DLLs containing functions from any platform.
|
||||
1. Self-contained DLLs containing functions from any platform.
|
||||
(These are not what we call a "harbour.dll", although they may
|
||||
be named that. The DLL entry points are different.)
|
||||
These have the VM/RTL inside them and can be used by any other
|
||||
Windows program. You can create a .lib for static linking,
|
||||
or use GetProcAddress as in any standard Windows DLL.
|
||||
Calling Harbour/Prg functions directly is limited to
|
||||
Windows program. You can create a library for static linking,
|
||||
or use GetProcAddress() as in any standard Windows DLL.
|
||||
Calling Harbour/.prg functions directly is limited to
|
||||
those that take no parameters unless you include C functions
|
||||
in the DLL that take parameters and then call the PRG-level
|
||||
code.
|
||||
|
||||
To do static linking, do this to create the .lib:
|
||||
implib harbour.lib harbour.dll
|
||||
For the Borland C platform, use that library and import32.lib
|
||||
and cw32.lib from Borland, and you are ready to go.
|
||||
To do static linking, do this to create the library:
|
||||
hbmk2 -hbimplib harbour.dll
|
||||
|
||||
2. PCode executables using a harbour.dll
|
||||
|
||||
2) PCode EXEs using a Harbour.dll
|
||||
|
||||
A Harbour.dll is designed to be called from a Harbour app.
|
||||
A pcode EXE is a small Harbour executable that does not contain the
|
||||
VM/RTL. To execute its functions, it must load and access a
|
||||
Harbour.dll.
|
||||
A harbour.dll is designed to be called from a Harbour app.
|
||||
A pcode executable is a small Harbour executable that does not
|
||||
contain the VM/RTL. To execute its functions, it must load and access
|
||||
a harbour.dll.
|
||||
If you want dynamic linking, then use this to execute a Harbour
|
||||
dynamically loaded pcode DLL function or procedure:
|
||||
HB_DllDo( <cFuncName> [,<params...>] ) --> [<uResult>]
|
||||
hb_LibDo( <cFuncName>[, <params...>] ) --> [<uResult>]
|
||||
|
||||
This lets you have all your common code in a DLL, and have lots
|
||||
of small EXEs that use it. Realize however that, even though this
|
||||
may be a nice way to manage your code, each EXE may
|
||||
load its own image of the Harbour.dll into memory at runtime.
|
||||
of small executables that use it. Realize however that, even though
|
||||
this may be a nice way to manage your code, each executable may
|
||||
load its own image of the harbour.dll into memory at runtime.
|
||||
In terms of Windows memory, there may not be a benefit to using pcode
|
||||
EXEs over monolithic EXEs. But it may be a worthwhile maintenance
|
||||
benefit to have lots of replaceable small exes.
|
||||
executables over monolithic executables. But it may be a worthwhile
|
||||
maintenance benefit to have lots of replaceable small exes.
|
||||
|
||||
3) PCode DLLs used from traditional EXEs
|
||||
3. PCode DLLs used from traditional executables
|
||||
A pcode DLL does not contain the VM/RTL.
|
||||
It is a library of Harbour-compiled PRG code that uses the VM/RTL
|
||||
of the EXE that calls it. This has the benefit of having
|
||||
of the executable that calls it. This has the benefit of having
|
||||
replaceable modules in DLLs that don't necessarily require updating
|
||||
your EXE.
|
||||
your executable.
|
||||
|
||||
|
||||
The following is clipped from a msg by Antonio Linares to the Harbour
|
||||
developer list explaining some of the details:
|
||||
|
||||
Please notice that there are three different Windows DLL entry points:
|
||||
+ src/vm/
|
||||
* maindll.c Windows self-contained DLL entry point
|
||||
* maindllh.c Windows Harbour DLL entry point (harbour.dll)
|
||||
* maindllp.c Windows pcode DLL entry point and VM/RTL routing functions
|
||||
|
||||
> * maindll.c Windows self-contained DLL entry point
|
||||
To produce Harbour code, as DLLs, that may be used
|
||||
from other programming languages applications (as VB,
|
||||
Delphi, C++, etc...)
|
||||
* src/vm/maindll.c Windows self-contained DLL entry point
|
||||
|
||||
> * maindllh.c Windows Harbour DLL entry point (harbour.dll)
|
||||
To produce Harbour.dll, to be just used from small pcode Harbour EXEs
|
||||
To produce Harbour code, as DLLs, that may be used from other
|
||||
programming languages applications (as VB, Delphi, C++, etc...)
|
||||
|
||||
> * maindllp.c Windows pcode DLL entry point and VM/RTL routing
|
||||
To produce small pcode DLLs, to be used just from Harbour EXE apps.
|
||||
maindllp.c is the entry point for the Harbour pcode DLLs. pcode DLLs
|
||||
are quite small DLLs, that just contain pcode and/or C (using extend
|
||||
api) functions.
|
||||
* src/vm/maindllh.c Windows Harbour DLL entry point (harbour.dll)
|
||||
|
||||
mainwin.c is the entry point for Windows EXEs, not for DLLs.
|
||||
To produce harbour.dll, to be just used from small pcode Harbour
|
||||
executables.
|
||||
|
||||
You may use maindll.c, maindllh.c or maindllp.c based on
|
||||
your needs.
|
||||
* src/vm/maindllp.c Windows pcode DLL entry point and VM/RTL routing functions
|
||||
|
||||
If you are looking to build a Harbour.dll, then you must use
|
||||
maindllh.c
|
||||
To produce small pcode DLLs, to be used just from Harbour executable
|
||||
apps. maindllp.c is the entry point for the Harbour pcode DLLs. pcode
|
||||
DLLs are quite small DLLs, that just contain pcode and/or C (using
|
||||
Extend API) functions.
|
||||
|
||||
mainwin.c is the entry point for Windows executables, not for DLLs.
|
||||
|
||||
You may use maindll.c, maindllh.c or maindllp.c based on your needs.
|
||||
|
||||
If you are looking to build a harbour.dll, then you must use maindllh.c.
|
||||
|
||||
Reference in New Issue
Block a user