2017-09-13 11:40 UTC Viktor Szakats (vszakats users.noreply.github.com)
* config/*/*.mk
* config/*.mk
* config/postinst.hb
* ChangeLog.txt
* src/rdd/usrrdd/rdds/*.prg
* sync with 3.4 fork minor code changes, comments, some strings
This commit is contained in:
206
ChangeLog.txt
206
ChangeLog.txt
@@ -7,6 +7,14 @@
|
||||
Entries may not always be in chronological/commit order.
|
||||
See license at the end of file. */
|
||||
|
||||
2017-09-13 11:40 UTC Viktor Szakats (vszakats users.noreply.github.com)
|
||||
* config/*/*.mk
|
||||
* config/*.mk
|
||||
* config/postinst.hb
|
||||
* ChangeLog.txt
|
||||
* src/rdd/usrrdd/rdds/*.prg
|
||||
* sync with 3.4 fork minor code changes, comments, some strings
|
||||
|
||||
2017-09-12 23:01 UTC Viktor Szakats (vszakats users.noreply.github.com)
|
||||
* utils/hbmk2/hbmk2.prg
|
||||
* sync with 3.4 fork minor code changes, comments, some strings
|
||||
@@ -661,17 +669,17 @@
|
||||
|
||||
2017-05-10 12:27 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
|
||||
* contrib/hbwin/olecore.c
|
||||
+ automatically add WIN_VT_ARRAY bit in 1-st parameter of
|
||||
__oleVariantNew() when 2-nd parameter is an array
|
||||
+ automatically add WIN_VT_ARRAY bit in 1st parameter of
|
||||
__oleVariantNew() when 2nd parameter is an array
|
||||
+ added support for typed variant arrays to __oleVariantNew()
|
||||
Now it's possible to create strong typed one dimensional arrays and
|
||||
pass them as parameters to foreign OLE code, i.e.
|
||||
oOle:setArrayOfStrings( ;
|
||||
__oleVariantNew( WIN_VT_BSTR, { "1-st", "2-nd", "3-rd" } ) )
|
||||
__oleVariantNew( WIN_VT_BSTR, { "1st", "2nd", "3rd" } ) )
|
||||
oOle:setArrayOfIntegers( ;
|
||||
__oleVariantNew( WIN_VT_INT, { 1, 2, 3, 4 } )
|
||||
+ added support for array of integers initialization from strings
|
||||
passed to __oleVariantNew() in 2-nd parameter.
|
||||
passed to __oleVariantNew() in 2nd parameter.
|
||||
Now it's possible to create strong typed one dimensional OLE array
|
||||
initialized with string bytes ASCII values, i.e.
|
||||
oOle:setUcharStr( ;
|
||||
@@ -1313,7 +1321,7 @@
|
||||
* contrib/hbmisc/dates.c
|
||||
! fixed WOY() to return some reasonable results. I have no idea what
|
||||
author wanted to reach but now WOY() be default returns ISO 8601
|
||||
week number and simple week number if 2-nd parameter is .F.
|
||||
week number and simple week number if 2nd parameter is .F.
|
||||
|
||||
2016-12-15 12:51 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
|
||||
* include/harbour.hbx
|
||||
@@ -1354,7 +1362,7 @@
|
||||
|
||||
* src/rdd/dbfntx/dbfntx1.c
|
||||
* discard buffers when next free page is changed even without touching
|
||||
version number - minor protection for potentially broken 3-rd party
|
||||
version number - minor protection for potentially broken 3rd party
|
||||
NTX code or very old [x]Harbour NTX RDDs which do not increment
|
||||
version number on update.
|
||||
|
||||
@@ -1817,8 +1825,8 @@
|
||||
by SSL_up_ref()
|
||||
This modification also fixes possible GPF trap when SSL filter
|
||||
socket was created dynamically from C code without SSL pointer
|
||||
item on HVM stack in 2-nd parameter and removes old hack which
|
||||
saved internally 2-nd HVM stack parameter.
|
||||
item on HVM stack in 2nd parameter and removes old hack which
|
||||
saved internally 2nd HVM stack parameter.
|
||||
+ allow to pass SSL_CTX instead of SSL in "ssl", "ctx" or "key" items
|
||||
of hash array used to initialize SSL socket filter. Using SSL_CTX
|
||||
allows to use the same hash array to set SSL socket filter for
|
||||
@@ -1859,7 +1867,7 @@
|
||||
|
||||
* src/3rd/jpeg/Makefile
|
||||
* src/3rd/jpeg/jconfig.h
|
||||
! moved definitions which interacts with 3-rd party code using libjpeg
|
||||
! moved definitions which interacts with 3rd party code using libjpeg
|
||||
header files to jconfig.h
|
||||
|
||||
2016-09-23 09:47 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
|
||||
@@ -2063,7 +2071,7 @@
|
||||
! fixed yet another RDDI_SETHEADER clearing in internal DBF RDD code
|
||||
* clear few passed variables before internal SELF_INFO() and
|
||||
SELF_RDDINFO() read calls - they were safe in current code but
|
||||
potentially may badly interact with 3-rd party DBF RDD wrappers.
|
||||
potentially may badly interact with 3rd party DBF RDD wrappers.
|
||||
|
||||
2016-06-22 23:58 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
|
||||
* include/dbinfo.ch
|
||||
@@ -2192,7 +2200,7 @@
|
||||
2016-04-18 18:05 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
|
||||
* src/rtl/strrepl.c
|
||||
! fixed hb_strReplace() for strings longer then 1024 bytes and
|
||||
array used in 3-rd parameter.
|
||||
array used in 3rd parameter.
|
||||
|
||||
2016-04-18 17:33 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
|
||||
* contrib/gtqtc/gtqtc1.cpp
|
||||
@@ -2316,7 +2324,7 @@
|
||||
* src/rtl/direct.c
|
||||
! removed set of MS-Windows attributes passed unconditionally to
|
||||
hb_fsFind*() functions in Directory() PRG function.
|
||||
It fixes "L" attribute passed in 2-d parameter of Directory()
|
||||
It fixes "L" attribute passed in 2nd parameter of Directory()
|
||||
function in *nix builds. When "L" is given in attribute list
|
||||
then Directory() do not follow links.
|
||||
|
||||
@@ -3450,7 +3458,7 @@
|
||||
|
||||
2015-12-04 23:05 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
|
||||
* include/hbexpra.c
|
||||
! accept strings passed in 2-nd parameter of _GET_() function
|
||||
! accept strings passed in 2nd parameter of _GET_() function
|
||||
with the highest priority for macro and macroalias expressions
|
||||
! fixed late evaluation of macroalias expressions in GET variables.
|
||||
Thanks to Volodimyr for information about the problem and self
|
||||
@@ -3535,7 +3543,7 @@
|
||||
JSON data. If this parameter is NULL then strings are decoded in raw
|
||||
form and unicode character with code over 255 are converted to '?'
|
||||
char.
|
||||
+ added optional 3-rd parameter with codepage ID to PRG functions
|
||||
+ added optional 3rd parameter with codepage ID to PRG functions
|
||||
hb_jsonEncode() and hb_jsonDecode(). If this parameter is not given
|
||||
then above functions works like before this modification:
|
||||
hb_jsonEncode() uses raw string encoding and hb_jsonDecode() uses
|
||||
@@ -3573,14 +3581,14 @@
|
||||
2015-11-24 09:05 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
|
||||
* include/hbapirdd.h
|
||||
* src/rdd/wacore.c
|
||||
* changed 4-th parameter of hb_rddRequestArea() from HB_BOOL fWait to
|
||||
* changed 4th parameter of hb_rddRequestArea() from HB_BOOL fWait to
|
||||
HB_ULONG ulMilliSec
|
||||
[INCOMPATIBLE]
|
||||
|
||||
* src/rdd/dbdetach.c
|
||||
+ accept optionally as 4-th parameter of hb_dbRequest() numeric value
|
||||
+ accept optionally as 4th parameter of hb_dbRequest() numeric value
|
||||
with timeout in seconds. The previous version using xBase++ compatible
|
||||
parameters (logical value <lWait> in 4-th parameter) is still working.
|
||||
parameters (logical value <lWait> in 4th parameter) is still working.
|
||||
|
||||
; above modifications are based on request and patch sent to harbour-devel
|
||||
list by Rolf (many thanks), ref:
|
||||
@@ -3779,7 +3787,7 @@
|
||||
2015-10-21 19:26 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
|
||||
* contrib/hbfoxpro/hbfoxpro.hbx
|
||||
* contrib/hbfoxpro/occurs.prg
|
||||
+ added FoxPro compatible At() function with 3-rd <nOccurrence>
|
||||
+ added FoxPro compatible At() function with 3rd <nOccurrence>
|
||||
parameter:
|
||||
fox_At( <cSubstr>, <cString>, <nOccurrence> ) -> <nPos>
|
||||
|
||||
@@ -3844,7 +3852,7 @@
|
||||
|
||||
2015-10-12 12:56 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
|
||||
* src/rtl/hbsocket.c
|
||||
! added casting to 2-nd parameter of inet_ntop() as workaround for
|
||||
! added casting to 2nd parameter of inet_ntop() as workaround for
|
||||
wrong declaration inet_ntop() in MSVC header file
|
||||
|
||||
2015-10-09 13:38 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
|
||||
@@ -4005,7 +4013,7 @@
|
||||
* contrib/hbct/files.c
|
||||
! do not allow to remove empty directories by FileDelete() function
|
||||
even if user explicitly sets directory attribute - CT3 compatible fix.
|
||||
! remove READONLY attribute before deleting READONLY files if 2-nd
|
||||
! remove READONLY attribute before deleting READONLY files if 2nd
|
||||
parameter of FileDelete() contains READONLY bit
|
||||
|
||||
* src/rtl/filesys.c
|
||||
@@ -4474,7 +4482,7 @@
|
||||
used to operate on socket filters. At PRG level standard hb_socket*()
|
||||
functions can be used.
|
||||
The following things has been changed in PRG hb_socket*() functions:
|
||||
hb_socketErorrString() can accept <pSocket> as 1-st or 2-nd parameter
|
||||
hb_socketErorrString() can accept <pSocket> as 1st or 2nd parameter
|
||||
and redirect call to socket filter errorStr() method.
|
||||
hb_socketClose() executes automatically shutdown() for connected
|
||||
sockets - it is important in windows only where without explicit
|
||||
@@ -4831,8 +4839,8 @@
|
||||
so it can work like hb_FSize() but for virtual FS not only
|
||||
for local files. Now this function has the following syntax:
|
||||
hb_vfSize( <pHandle> | <cFileName> [, <lUseDirEntry> ] ) -> <nSize>
|
||||
The 2-nd parameter <lUseDirEntry> is significant only when
|
||||
the 1-st one <cFileName> is character value.
|
||||
The 2nd parameter <lUseDirEntry> is significant only when
|
||||
the 1st one <cFileName> is character value.
|
||||
|
||||
* src/rtl/gttrm/gttrm.c
|
||||
* replaced C++ comments with ANSI ones
|
||||
@@ -5561,10 +5569,10 @@
|
||||
[<nFilterOption:ADS_RESPECTFILTERS>], @nCount ) -> <nErrorCode>
|
||||
(From Viktor's branch: 2014-01-19 13:42 UTC+0100 Viktor Szakats)
|
||||
! fixed connection handle parameter position in AdsDDRemoveTable()
|
||||
It was 4-th:
|
||||
It was 4th:
|
||||
AdsDDRemoveTable( <cTableName>, <deleteFile>, , [ <nConnection> ] )
|
||||
-> <lResult>
|
||||
Now is 3-rd:
|
||||
Now is 3rd:
|
||||
AdsDDRemoveTable( <cTableName>, <deleteFile>, [ <nConnection> ] )
|
||||
-> <lResult>
|
||||
(From Viktor's branch: 2014-01-14 23:53 UTC+0100 Viktor Szakats)
|
||||
@@ -6021,8 +6029,8 @@
|
||||
+ added support for SSL/TLS encryption in hb_inet*() sockets.
|
||||
To enable SSL/TLS encryption on such socket it's enough to
|
||||
call hb_inetSSL_connect() or hb_inetSSL_accept() passing as
|
||||
1-st parameter hb_inet socket item with already established
|
||||
connection and in in the 2-nd parameter SSL item. The peer
|
||||
1st parameter hb_inet socket item with already established
|
||||
connection and in in the 2nd parameter SSL item. The peer
|
||||
should call second function. In general hb_inetSSL_connect()
|
||||
should be called by client and hb_inetSSL_accept() by server.
|
||||
To use hb_inetSSL_accept() it's necessary to also set
|
||||
@@ -6126,7 +6134,7 @@
|
||||
still supported but I had to rewrite this code so please make real
|
||||
life test and verify me. In few cases I slightly change the code and
|
||||
now it can be a little bit more restrictive, i.e. typos in "AtutoInc"
|
||||
field type will be detected (previous code checked only for 1-st
|
||||
field type will be detected (previous code checked only for 1st
|
||||
letter "A").
|
||||
|
||||
2015-02-07 21:02 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
|
||||
@@ -6540,7 +6548,7 @@
|
||||
* src/rtl/dirscan.prg
|
||||
* src/rtl/filebuf.c
|
||||
+ added lTime member to HB_FFIND structure
|
||||
+ added 3-rd parmeter to hb_fsDirectory()
|
||||
+ added 3rd parmeter to hb_fsDirectory()
|
||||
+ extended default maximum number of Harbour file IO redirecros to 128
|
||||
* use hb_xgrabz()
|
||||
* formatting
|
||||
@@ -7310,7 +7318,7 @@
|
||||
FieldName() function and in all other cases only HB_SYMBOL_NAME_LEN
|
||||
characters is significant for Harbour so such decision should be
|
||||
well thought by RDD authors because it may confuse users.
|
||||
Warning: all 3-rd party RDDs which need to force shorter names
|
||||
Warning: all 3rd party RDDs which need to force shorter names
|
||||
should update uiMaxFieldNameLength in their NEW() method
|
||||
just after SUPER_NEW() call, i.e. like in core DBF RDD.
|
||||
! respect uiMaxFieldNameLength when new fields are added
|
||||
@@ -7327,9 +7335,9 @@
|
||||
* minor modification in adsFieldName()
|
||||
|
||||
* contrib/hbwin/wapi_winbase.c
|
||||
+ added support for FORMAT_MESSAGE_ALLOCATE_BUFFER and 6-th <nSize>
|
||||
parameter to wapi_FormatMessage() function. The 6-th <nSize> parameter
|
||||
has higher priority than size of string passed in the 5-th parameter.
|
||||
+ added support for FORMAT_MESSAGE_ALLOCATE_BUFFER and 6th <nSize>
|
||||
parameter to wapi_FormatMessage() function. The 6th <nSize> parameter
|
||||
has higher priority than size of string passed in the 5th parameter.
|
||||
! fixed potential memory leak
|
||||
|
||||
2014-10-02 22:55 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
|
||||
@@ -7389,14 +7397,14 @@
|
||||
win_PrintDataRaw( <cPrinter>, <cData> [, <cDocName>] )
|
||||
-> <nBytesPrinted>
|
||||
It's similar to win_PrintFileRaw() but sends to given printer passed
|
||||
in 2-nd parameter <cData> instead of file body.
|
||||
in 2nd parameter <cData> instead of file body.
|
||||
On error it returns negative value.
|
||||
* cleaned casting and minor formatting
|
||||
|
||||
* src/rtl/gtxwc/gtxwc.c
|
||||
+ added support for HB_GTI_DISPIMAGE. It's slightly modified code sent
|
||||
by Rolf to Harbour devel list. In comparison to original version it
|
||||
supports <nDepth> as 4-th item of array with bitmap description to use
|
||||
supports <nDepth> as 4th item of array with bitmap description to use
|
||||
with some other GTs which can support different color depths or can
|
||||
make conversion. It also supports bitmaps passed as strings.
|
||||
% slightly improved HB_GFX_GETPIXEL
|
||||
@@ -7474,7 +7482,7 @@
|
||||
* prepare the code to return error object when evaluated expression
|
||||
fails as proposed by Teo. This functionality is not enabled yet.
|
||||
I'm waiting for information about current public debugger API used
|
||||
in 3-rd party projects before I decide to change it.
|
||||
in 3rd party projects before I decide to change it.
|
||||
|
||||
2014-09-18 00:23 UTC-0800 Pritpal Bedi (bedipritpal/at/hotmail.com)
|
||||
* contrib/gtwvg/gtwgud.c
|
||||
@@ -7549,7 +7557,7 @@
|
||||
exists
|
||||
|
||||
* src/vm/hashfunc.c
|
||||
! set default value before decoding 2-nd logical parameter in
|
||||
! set default value before decoding 2nd logical parameter in
|
||||
hb_HAutoAdd() function. It fixes ambiguity reported by Mindaugas.
|
||||
|
||||
2014-09-11 14:41 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
|
||||
@@ -7576,7 +7584,7 @@
|
||||
This function tries to execute given block or function
|
||||
inside BEGIN SEQUENCE / RECOVER oErr / END SEQUENCE statement.
|
||||
It return HB_TRUE if it was executed without any problem and
|
||||
HB_FALSE otherwise. Result or RTE object is stored in 1-st
|
||||
HB_FALSE otherwise. Result or RTE object is stored in 1st
|
||||
parameter and should be freed by the caller using hb_itemRelese()
|
||||
|
||||
* src/debug/dbgentry.c
|
||||
@@ -7600,7 +7608,7 @@
|
||||
and updating locally any information about debugger state.
|
||||
All such information can be accessed at any time using __dbg*()
|
||||
functions.
|
||||
It should greatly simplify creating 3-rd party debuggers like
|
||||
It should greatly simplify creating 3rd party debuggers like
|
||||
HWDebug or HBQTDebug.
|
||||
|
||||
* src/debug/debugger.prg
|
||||
@@ -7708,7 +7716,7 @@
|
||||
|
||||
2014-08-21 01:11 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
|
||||
* contrib/hbtip/mail.prg
|
||||
! fixed missing 1-st adress in CC and BCC parameters - many
|
||||
! fixed missing 1st adress in CC and BCC parameters - many
|
||||
for information about the bug and patch
|
||||
|
||||
* contrib/hbtip/sendmail.prg
|
||||
@@ -7741,7 +7749,7 @@
|
||||
as used in Cl*pper and Harbour PP.
|
||||
! fixed input line size in SET edit window
|
||||
! fixed validation in some input boxes
|
||||
* process only 1-st parameter in some commands just like Cl*pper does
|
||||
* process only 1st parameter in some commands just like Cl*pper does
|
||||
+ added support for FILE OPEN <name> command
|
||||
! fixed CALLSTACK ON | OFF command
|
||||
! fixed NUM command
|
||||
@@ -8079,7 +8087,7 @@
|
||||
2014-05-20 19:49 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
|
||||
* src/debug/dbgbrwsr.prg
|
||||
! update current row position after resizing
|
||||
It should fix 2-nd problem reported by Rolf.
|
||||
It should fix 2nd problem reported by Rolf.
|
||||
|
||||
2014-05-20 17:03 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
|
||||
* src/debug/debugger.prg
|
||||
@@ -8300,7 +8308,7 @@
|
||||
I do not remember why I added code to remove the STOP signal - probably
|
||||
I was experimenting with some new things working on Harbour MT code
|
||||
and I forgot to deactivate it.
|
||||
NOTE: 3-rd party developers who use GC collectible pointer items
|
||||
NOTE: 3rd party developers who use GC collectible pointer items
|
||||
must not activate any PRG code execution inside their mark
|
||||
functions.
|
||||
|
||||
@@ -8489,7 +8497,7 @@
|
||||
Please remember that redirectors like NETIO can be used as wrapper
|
||||
to other redirectors so code like:
|
||||
pFile := hb_vfOpen( "NET:192.168.0.1:::COM1:9600,8N1" )
|
||||
opens 1-st serial port on the server and
|
||||
opens 1st serial port on the server and
|
||||
pFile := hb_vfOpen( "NET:192.168.0.1:::COM$/dev/ttyUSB0:9600,8N1" )
|
||||
opens "/dev/ttyUSB0" serial device on the server.
|
||||
|
||||
@@ -8577,7 +8585,7 @@
|
||||
|
||||
2014-03-04 19:12 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
|
||||
* contrib/xhb/hbserv.c
|
||||
* pacified CLANG warning reported by Francek
|
||||
* pacified CLANG warning reported by Franček
|
||||
|
||||
2014-03-04 18:15 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
|
||||
* src/debug/debugger.prg
|
||||
@@ -9045,7 +9053,7 @@
|
||||
* src/3rd/png/png.dif
|
||||
* updated libpng 1.6.1 -> 1.6.8
|
||||
; modifications below taken from Viktor branch
|
||||
Warning: some of them may cause problems with 3-rd party
|
||||
Warning: some of them may cause problems with 3rd party
|
||||
code which needs fully functional libpng.
|
||||
* disabled PNG_CONSOLE_IO_SUPPORTED build option.
|
||||
(MSVS 2013 doesn't support 'stderr' constant)
|
||||
@@ -9271,7 +9279,7 @@
|
||||
* variable name synced with Viktor branch
|
||||
|
||||
* contrib/hbct/strswap.c
|
||||
! fixed NULL reference when neither 1-st nor 2-nd parameter is passed
|
||||
! fixed NULL reference when neither 1st nor 2nd parameter is passed
|
||||
by reference
|
||||
|
||||
* contrib/hbct/fcopy.prg
|
||||
@@ -9426,7 +9434,7 @@
|
||||
* include/harbour.hbx
|
||||
* src/rtl/hbdef.c
|
||||
+ added new PRG function hb_defaultValue(). It's similar to hb_default()
|
||||
but it returns expected value instead of setting 1-st parameter.
|
||||
but it returns expected value instead of setting 1st parameter.
|
||||
New function can be used to replace code like:
|
||||
hb_default( @lParam, .T. )
|
||||
IF lParam
|
||||
@@ -9443,7 +9451,7 @@
|
||||
* contrib/hbfship/stroccur.prg
|
||||
! do not generate error when wrong parameters are passed to StrOccurs()
|
||||
function (FS compatible behavior)
|
||||
! set default value of 3-rd parameter in StrOccurs() to .T. only if it's not
|
||||
! set default value of 3rd parameter in StrOccurs() to .T. only if it's not
|
||||
passed at all, otherwise set it to .F. (FS compatible behavior)
|
||||
% small simplification
|
||||
|
||||
@@ -9499,7 +9507,7 @@
|
||||
* include/hbapicdp.h
|
||||
* include/hbapiitm.h
|
||||
* src/rtl/itemseri.c
|
||||
* changed 2-nd parameter in hb_itemSerialize() and hb_itemSerializeCP()
|
||||
* changed 2nd parameter in hb_itemSerialize() and hb_itemSerializeCP()
|
||||
from HB_BOOL fNumSize parameter to int iFlags.
|
||||
Previous fNumSize is replaced by HB_SERIALIZE_NUMSIZE flag.
|
||||
Warning: declaration is not backward compatible though existing code
|
||||
@@ -9507,7 +9515,7 @@
|
||||
without recompilation.
|
||||
+ added support for optional compression of serialized values.
|
||||
It can be enabled in C code by HB_SERIALIZE_COMPRESS flag.
|
||||
+ added support for serialization flags passed in 2-nd parameter to
|
||||
+ added support for serialization flags passed in 2nd parameter to
|
||||
hb_Serialize() PRG function.
|
||||
; Info: support for compression and decompression exists only in
|
||||
programs which are linked with ZLIB library. Programmers
|
||||
@@ -9529,7 +9537,7 @@
|
||||
|
||||
2013-12-20 00:24 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
|
||||
* include/hbexpra.c
|
||||
! fixed silly copy and past typo
|
||||
! fixed silly copy and paste typo
|
||||
|
||||
2013-12-19 09:31 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
|
||||
+ src/rtl/hbzlibc.c
|
||||
@@ -9655,11 +9663,11 @@
|
||||
|
||||
2013-11-28 03:04 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
|
||||
* contrib/hbmxml/3rd/minixml/mxml_fil.c
|
||||
! fixed mxmlLoadString() with top node - patch by Francek Prijatelj
|
||||
! fixed mxmlLoadString() with top node - patch by Franček Prijatelj
|
||||
|
||||
* contrib/hbmxml/core.c
|
||||
! fixed mxml node reference counter in mxmlAdd() - it fixes 2-dn
|
||||
problem reported by Francek Prijatelj
|
||||
! fixed mxml node reference counter in mxmlAdd() - it fixes 2nd
|
||||
problem reported by Franček Prijatelj
|
||||
|
||||
2013-11-27 20:32 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
|
||||
* src/rtl/gtxwc/gtxwc.c
|
||||
@@ -9723,7 +9731,7 @@
|
||||
|
||||
* src/rtl/gtxwc/gtxwc.c
|
||||
* src/rtl/gtxwc/gtxwc.h
|
||||
% use 32 bit screen buffer items also in 64bit systems
|
||||
% use 32-bit screen buffer items also in 64-bit systems
|
||||
! fixed race condition in SetMode()
|
||||
! fixed infinite loop with size updating in fullscreen and
|
||||
maximized modes
|
||||
@@ -9898,7 +9906,7 @@
|
||||
* tests/video.prg
|
||||
! fixed CLIP and xHarbour compilation
|
||||
+ added support for testing UTF8 screen output
|
||||
(non empty 1-st parameter) and HB_GTI_COMPATBUFFER (non empty
|
||||
(non empty 1st parameter) and HB_GTI_COMPATBUFFER (non empty
|
||||
second parameter)
|
||||
|
||||
2013-10-30 23:12 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
|
||||
@@ -10036,7 +10044,7 @@
|
||||
2013-09-24 16:59 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
|
||||
* include/hbvm.h
|
||||
* src/vm/hvm.c
|
||||
* added new 7-th parameter fOverLoad to hb_vmRegisterSymbols() function.
|
||||
* added new 7th parameter fOverLoad to hb_vmRegisterSymbols() function.
|
||||
When it's TRUE then new public function symbols overload existing ones.
|
||||
|
||||
* src/vm/runner.c
|
||||
@@ -10059,7 +10067,8 @@
|
||||
2013-09-19 09:52 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
|
||||
* src/rtl/hbgtcore.c
|
||||
+ added support for GT parameters passed in //GT<NAME>
|
||||
parameter after ":", i.e. //GT<NAME>:<params>
|
||||
parameter after ":", i.e. //GT<NAME>:<params> or
|
||||
--hb:gt<name>:<params>
|
||||
|
||||
* src/rtl/gttrm/gttrm.c
|
||||
+ added new parameters set in //GTTRM:<params>
|
||||
@@ -10147,7 +10156,7 @@
|
||||
2013-08-26 20:56 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
|
||||
* src/compiler/hbdbginf.c
|
||||
! fixed module names generated for debugger line info when user compiles
|
||||
files passing path with drive letters, i.e. hbmk2 c:\temp\test.prg
|
||||
files passing path with drive letters, i.e. hbmk2 C:\temp\test.prg
|
||||
Thanks to Anton Ryzhov for the information about the problem.
|
||||
|
||||
2013-08-26 15:51 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
|
||||
@@ -10188,7 +10197,7 @@
|
||||
|
||||
* src/rtl/mtran.c
|
||||
* updated to show strict Clipper compatible behavior - Clipper
|
||||
ignores 3-rd cSoftCR parameter if 2-nd one cHardCR is not given
|
||||
ignores 3rd cSoftCR parameter if 2nd one cHardCR is not given
|
||||
(strict compatibility is covered by HB_CLP_STRICT macro and
|
||||
disabled by default - undocumented feature which may confuse
|
||||
users)
|
||||
@@ -10266,8 +10275,8 @@
|
||||
! fixed tip_TimeStamp() using hb_timeStampUTCOffset() instead of
|
||||
hb_timeUTCOffset() to correctly calculate UTC offset for dates
|
||||
different then current one.
|
||||
! decode time passed as numeric second() value in 2-nd parameter of
|
||||
tip_TimeStamp() only when the 1-st one contains pure date value.
|
||||
! decode time passed as numeric second() value in 2nd parameter of
|
||||
tip_TimeStamp() only when the 1st one contains pure date value.
|
||||
|
||||
2013-07-08 23:34 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
|
||||
* src/debug/dbgentry.c
|
||||
@@ -10300,7 +10309,7 @@
|
||||
* src/debug/debugger.prg
|
||||
! keep RunAtStartup flag synced with menu
|
||||
! fixed options decoding from init.cld file.
|
||||
Thanks to Francek Prijatelj for locating the problem though fix
|
||||
Thanks to Franček Prijatelj for locating the problem though fix
|
||||
should be a little bit different.
|
||||
|
||||
* src/debug/tbrwtext.prg
|
||||
@@ -10480,12 +10489,13 @@
|
||||
* utils/hbmk2/hbmk2.prg
|
||||
! reverted 2nd hunk of 2013-06-03 16:45 UTC+0200. It
|
||||
introduced unnecessary and confusing disparity between
|
||||
command-line and .hbp/.hbm while they are supposed to
|
||||
command-line and .hbp/.hbm while these are supposed to
|
||||
be working similarly. It also breaks syntax supported
|
||||
in .hbc directives, and it also makes behavior contracting
|
||||
with the way documented in hbmk2 help and hbmk2 examples.
|
||||
in .hbc directives, and it also makes behavior contradicting
|
||||
the way documented in hbmk2 help and hbmk2 examples.
|
||||
All this, to resolve the problem of space containing option
|
||||
values for one specific and rare subcase of reverted apostrophs.
|
||||
values for the one specific and rare subcase of reverted
|
||||
apostrophs.
|
||||
To pass option/directive value containing a space, put
|
||||
the whole option (or the option value) in double quotes
|
||||
(as documented in help), this works equally well on the
|
||||
@@ -10498,7 +10508,7 @@
|
||||
2013-06-12 00:28 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
|
||||
* contrib/gtwvg/wvgcore.c
|
||||
* contrib/gtwvg/wvgcuig.c
|
||||
! Fixed to compile for 64 bits, reported by Maurizio, thanks.
|
||||
! Fixed to compile for 64-bit, reported by Maurizio, thanks.
|
||||
|
||||
2013-06-11 20:26 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
|
||||
* include/hbpp.h
|
||||
@@ -10582,14 +10592,14 @@
|
||||
|
||||
2013-06-05 23:40 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
|
||||
* contrib/gtwvg/wvgcore.c
|
||||
+ Added: function WVT_DRAWPICTUREEX
|
||||
WVT_LOADPICTUREFROMRESOURCEEX
|
||||
+ Added: function WVT_DRAWPICTUREEX()
|
||||
WVT_LOADPICTUREFROMRESOURCEEX()
|
||||
|
||||
* contrib/gtwvg/wvgcuig.c
|
||||
+ Added: function WVG_PICTUREEX
|
||||
+ Added: function WVG_PICTUREEX()
|
||||
|
||||
* contrib/gtwvg/wvgwin.c
|
||||
+ Added: function WVG_FORCEWINDOWTOTOP
|
||||
+ Added: function WVG_FORCEWINDOWTOTOP()
|
||||
|
||||
2013-06-05 19:15 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
|
||||
* contrib/gtqtc/gtqtc1.cpp
|
||||
@@ -10752,12 +10762,12 @@
|
||||
|
||||
2013-05-21 07:55 UTC-0300 Antonio Carlos Pantaglione (toninho/at/fwi.com.br)
|
||||
* contrib/rddads/adsfunc.c
|
||||
+ Enable function ADSSETINDEXDIRECTION only for ADS 9.0 or newer
|
||||
% small optmizations in ADSSETINDEXDIRECTION
|
||||
+ Enable function ADSSETINDEXDIRECTION() only for ADS 9.0 or newer
|
||||
% small optmizations in ADSSETINDEXDIRECTION()
|
||||
|
||||
2013-05-17 14:20 UTC+0200 Jfl mafact (jfl/at/mafact.com)
|
||||
* contrib/rddads/adsfunc.c
|
||||
+ Adding new function ADSSETINDEXDIRECTION
|
||||
+ Adding new function ADSSETINDEXDIRECTION()
|
||||
|
||||
2013-05-17 02:57 UTC+0200 Tamas TEVESZ (ice extreme.hu)
|
||||
* contrib/3rd/sqlite3/sqlite3.c
|
||||
@@ -10778,8 +10788,8 @@
|
||||
|
||||
2013-05-16 17:00 UTC+0200 Jfl mafact (jfl/at/mafact.com)
|
||||
* contrib/rddads/adsfunc.c
|
||||
! Adding 2nd param to function ADSCOPYTABLECONTENT to allow filtering
|
||||
like in ADSCOPYTABLE
|
||||
! Adding 2nd param to function ADSCOPYTABLECONTENT() to allow filtering
|
||||
like in ADSCOPYTABLE()
|
||||
|
||||
2013-05-15 19:54 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
|
||||
* src/pp/hbpp.c
|
||||
@@ -10792,7 +10802,7 @@
|
||||
* src/rtl/hbprocfn.c
|
||||
+ added support merged stdout and stderr output in hb_processRun()
|
||||
PRG function. To extract merged stdin and stdout application output
|
||||
it's enough to pass by reference in 3-rd and 4-th parameters the same
|
||||
it's enough to pass by reference in 3rd and 4th parameters the same
|
||||
variable, i.e.:
|
||||
nResult := hb_processRun( cCommand,, @cOutErr, @cOutErr )
|
||||
|
||||
@@ -10973,7 +10983,7 @@
|
||||
|
||||
2013-04-25 12:18 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
|
||||
* src/rtl/hbgtcore.c
|
||||
! updated INKEYPOOL() code to respect extended key code in ALT+C and
|
||||
! updated INKEYPOLL() code to respect extended key code in ALT+C and
|
||||
ALT+D detection
|
||||
|
||||
2013-04-24 23:58 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
|
||||
@@ -11052,7 +11062,7 @@
|
||||
It's pure QT code so now is the most portable Harbour GT driver which
|
||||
can be used on platforms where we haven't native any GT so far or
|
||||
current GTs like GTXWC do not have native appearance.
|
||||
Because it uses only high level GUI interface then it should be quite
|
||||
Because it uses only high-level GUI interface then it should be quite
|
||||
easy to convert it to other GUI libraries, i.e. GTK.
|
||||
|
||||
2013-04-23 14:00 UTC+0300 Mindaugas Kavaliauskas (dbtopas/at/dbtopas.lt)
|
||||
@@ -11099,7 +11109,7 @@
|
||||
|
||||
* include/hbgtinfo.ch
|
||||
+ added new HB_GTI_* actions:
|
||||
HB_GTI_WINHANDLE - Get console window low level handle
|
||||
HB_GTI_WINHANDLE - Get console window low-level handle
|
||||
HB_GTI_MOUSEPOS_XY - Get mouse position in pixels
|
||||
HB_GTI_DISPIMAGE - Display image with given name
|
||||
|
||||
@@ -11231,7 +11241,7 @@
|
||||
+ added new paragraph: DECLARATION AND INITIALIZATION OF VARIABLES
|
||||
|
||||
* src/rtl/hbcom.c
|
||||
* added 3-rd parameter to TIOCEXCL and TIOCNXCL ioctl() codes
|
||||
* added 3rd parameter to TIOCEXCL and TIOCNXCL ioctl() codes
|
||||
to pacify valgrind warnings
|
||||
|
||||
* include/hbexpra.c
|
||||
@@ -45850,7 +45860,7 @@
|
||||
2011-06-03 13:15 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
|
||||
* contrib/hbide/idebrowse.prg
|
||||
% Set vertical scrollbars of XbpBrowse() class to honor thumb
|
||||
positioning per open index. Pointed out by Francek.
|
||||
positioning per open index. Pointed out by Franček.
|
||||
|
||||
2011-06-03 13:11 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
|
||||
* contrib/hbqt/qtgui/hbqtgui.hbx
|
||||
@@ -90264,7 +90274,7 @@
|
||||
|
||||
2010-02-23 08:26 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
|
||||
* contrib/hbqt/hbqt_hbslots.cpp
|
||||
! Applied patch provided by Francek.
|
||||
! Applied patch provided by Franček.
|
||||
This removes the 128 nesting loop limit in MSVC.
|
||||
|
||||
* contrib/hbide/ideharbourhelp.prg
|
||||
@@ -136430,7 +136440,7 @@
|
||||
subtrees to libpath also.
|
||||
From the user side, it looks like this (without any extra
|
||||
configuration or any path specs):
|
||||
> hbmk2 myprogram.prg hbwin.hbc hbct.hbc
|
||||
$ hbmk2 myprogram.prg hbwin.hbc hbct.hbc
|
||||
; QUESTION: Where such contribs (with libs and headers)
|
||||
could go on a *nix system? While developing
|
||||
above stuff I had the unified Windows installer
|
||||
@@ -141501,10 +141511,10 @@
|
||||
* utils/hbmk2/hbmk2.prg
|
||||
+ Added support for wildcarded project specs:
|
||||
- This command will build each .hbp file found in current dir:
|
||||
> hbmk2 *.hbp
|
||||
$ hbmk2 *.hbp
|
||||
- This command will build all .prg files in current dir,
|
||||
each into a separate executable as separate projects:
|
||||
> hbmk2 -target=*.prg
|
||||
$ hbmk2 -target=*.prg
|
||||
|
||||
2009-05-30 01:12 UTC+0200 Viktor Szakats (vszakats.net/harbour)
|
||||
* INSTALL
|
||||
@@ -144465,9 +144475,9 @@
|
||||
of translation will be attempted from <hbmkdir>hbmk2.<lang>.hbl
|
||||
file (not final name yet). You can compile such .hbl file by using
|
||||
command:
|
||||
> hbi18n -g -ohbmk2.<lang>.hbl hbmk2.<lang>.pot
|
||||
$ hbi18n -g -ohbmk2.<lang>.hbl hbmk2.<lang>.pot
|
||||
You can create .pot using this command:
|
||||
> ..\..\bin\harbour hbmk2.prg /jhbmk2-<lang>.pot /i..\..\include
|
||||
$ ..\..\bin\harbour hbmk2.prg /jhbmk2-<lang>.pot /i..\..\include
|
||||
Where <lang> is preferable the std ISO language ID, like: pt_BR.
|
||||
|
||||
2009-05-02 10:52 UTC+0200 Viktor Szakats (vszakats.net/harbour)
|
||||
@@ -147061,11 +147071,11 @@
|
||||
work as a plugin replacement for clipper, rtlink/blinker/exospace
|
||||
when renamed to these names. Example:
|
||||
---
|
||||
> copy hbmk2.exe clipper.exe
|
||||
> copy hbmk2.exe rtlink.exe
|
||||
> clipper hello.prg
|
||||
> echo OUT myhello FI hello > rtl.lnk
|
||||
> rtlink @rtl.lnk
|
||||
$ copy hbmk2.exe clipper.exe
|
||||
$ copy hbmk2.exe rtlink.exe
|
||||
$ clipper hello.prg
|
||||
$ echo OUT myhello FI hello > rtl.lnk
|
||||
$ rtlink @rtl.lnk
|
||||
---
|
||||
|
||||
2009-04-04 17:06 UTC+0200 Viktor Szakats (vszakats.net/harbour)
|
||||
@@ -148401,9 +148411,9 @@
|
||||
; IOW this means that it's now possible to create a unified,
|
||||
self-contained install kit, which is able to easily build
|
||||
x64, WinCE and x86 executables with command below:
|
||||
> hbmk2 test.prg => test.exe for x86
|
||||
> hbmk2 -comp=mingw64 a.prg => test.exe for x64
|
||||
> hbmk2 -comp=mingwce a.prg => test.exe for ARM/WinCE
|
||||
$ hbmk2 test.prg => test.exe for x86
|
||||
$ hbmk2 -comp=mingw64 a.prg => test.exe for x64
|
||||
$ hbmk2 -comp=mingwce a.prg => test.exe for ARM/WinCE
|
||||
Can it be any simpler than that?
|
||||
|
||||
My sample install .zip is 322 MB and it contains Harbour libs
|
||||
|
||||
@@ -16,7 +16,7 @@ CC_OUT := -o
|
||||
|
||||
CFLAGS += -I. -I$(HB_HOST_INC)
|
||||
|
||||
# uncomment this if you want to force creating 64bit binaries
|
||||
# uncomment this if you want to force creating 64-bit binaries
|
||||
#CFLAGS += -maix64
|
||||
#LDFLAGS += -maix64 -Wl,-b64
|
||||
#DFLAGS += -maix64 -Wl,-b64
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# When compiling and linking with -pthread, the library search path should
|
||||
# include -L/usr/lib/threads at the beginning of the path.
|
||||
# http://www.ibm.com/developerworks/aix/library/au-gnu.html
|
||||
# https://www.ibm.com/developerworks/aix/library/au-gnu.html
|
||||
# (libc is there)
|
||||
ifeq ($(HB_LINKING_VMMT),yes)
|
||||
SYSLIBPATHS := /usr/lib/threads
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# TODO: No autodetection
|
||||
# TODO: No auto-detection
|
||||
|
||||
ifeq ($(HB_BUILD_MODE),cpp)
|
||||
HB_BUILD_MODE := c
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
# GNU Make file for Open Watcom C/C++ compiler
|
||||
# (shell specific rules)
|
||||
|
||||
# ---------------------------------------------------------------
|
||||
# See option docs here:
|
||||
# http://www.users.pjwstk.edu.pl/~jms/qnx/help/watcom/compiler-tools/cpopts.html
|
||||
# http://www.users.pjwstk.edu.pl/~jms/qnx/help/watcom/compiler-tools/wlink.html
|
||||
# http://www.users.pjwstk.edu.pl/~jms/qnx/help/watcom/compiler-tools/wlib.html
|
||||
# ---------------------------------------------------------------
|
||||
# https://users.pjwstk.edu.pl/~jms/qnx/help/watcom/compiler-tools/cpopts.html
|
||||
# https://users.pjwstk.edu.pl/~jms/qnx/help/watcom/compiler-tools/wlink.html
|
||||
# https://users.pjwstk.edu.pl/~jms/qnx/help/watcom/compiler-tools/wlib.html
|
||||
|
||||
# NOTE: Hack to force no extension for Linux binaries created on non-Linux hosts.
|
||||
# Otherwise they become '.elf'. [vszakats]
|
||||
@@ -94,7 +92,7 @@ ifeq ($(ANYDOS),yes)
|
||||
# disable DOS/32A Banner
|
||||
export DOS32A := /NOC
|
||||
|
||||
# work arround to DOS command line size limit
|
||||
# workaround for MS-DOS command-line length limit
|
||||
ifneq ($(findstring wcc386,$(CC)),)
|
||||
export WCC386 := $(strip $(subst $(CC_DIRSEPFROM),$(CC_DIRSEPTO),$(CC_FLAGS)))
|
||||
else
|
||||
|
||||
@@ -74,7 +74,7 @@ _DET_INC_HEAD := /gpm.h
|
||||
|
||||
include $(TOP)$(ROOT)config/detfun.mk
|
||||
|
||||
# Detect slang
|
||||
# Detect s-lang
|
||||
|
||||
_DET_DSP_NAME := slang
|
||||
_DET_VAR_INC_ := HB_INC_SLANG
|
||||
|
||||
@@ -77,7 +77,7 @@ define lib_object
|
||||
endef
|
||||
|
||||
# We have to use script to overcome the MS-DOS limit of max 128 characters
|
||||
# in commmand line
|
||||
# in command-line
|
||||
define create_library
|
||||
@$(ECHO) $(ECHOQUOTE)CREATE $(LIB_DIR)/$@$(ECHOQUOTE) > __lib__.tmp
|
||||
$(foreach file,$(^F),$(lib_object))
|
||||
|
||||
@@ -148,7 +148,7 @@ ifeq ($(HB_INIT_DONE),)
|
||||
export HB_REBUILD_PARSER := no
|
||||
endif
|
||||
|
||||
# Can't build shared tools if we don't create dlls
|
||||
# Cannot build shared tools if we don't create dlls
|
||||
ifeq ($(HB_BUILD_DYN),no)
|
||||
export HB_BUILD_SHARED := no
|
||||
endif
|
||||
@@ -1822,36 +1822,36 @@ ifneq ($(HB_INSTALL_PREFIX),)
|
||||
endif
|
||||
endif
|
||||
|
||||
LIBPOSTFIX :=
|
||||
INCPOSTFIX :=
|
||||
LIBSUFFIX :=
|
||||
INCSUFFIX :=
|
||||
ifeq ($(HB_PLATFORM),beos)
|
||||
ifeq ($(HB_SYSLOC),yes)
|
||||
LIBPOSTFIX := $(DIRSEP)harbour
|
||||
INCPOSTFIX := $(DIRSEP)harbour
|
||||
LIBSUFFIX := $(DIRSEP)harbour
|
||||
INCSUFFIX := $(DIRSEP)harbour
|
||||
endif
|
||||
else
|
||||
ifeq ($(HB_PLATFORM_UNIX),)
|
||||
LIBPOSTFIX := $(DIRSEP)$(subst /,$(DIRSEP),$(PLAT_COMP))
|
||||
LIBSUFFIX := $(DIRSEP)$(subst /,$(DIRSEP),$(PLAT_COMP))
|
||||
else
|
||||
LIBPOSTFIX :=
|
||||
LIBSUFFIX :=
|
||||
# Use 'lib64' instead of 'lib' for 64-bit targets where lib64 dir exists
|
||||
ifneq ($(wildcard $(HB_INSTALL_PREFIX)$(DIRSEP)lib64),)
|
||||
ifneq ($(filter $(HB_CPU),x86_64),)
|
||||
LIBPOSTFIX := 64
|
||||
LIBSUFFIX := 64
|
||||
endif
|
||||
endif
|
||||
# Not perfect, please enhance it.
|
||||
ifneq ($(findstring |/usr,|$(HB_INSTALL_PREFIX)),)
|
||||
ifeq ($(findstring |/usr/home,|$(HB_INSTALL_PREFIX)),)
|
||||
LIBPOSTFIX := $(LIBPOSTFIX)$(DIRSEP)harbour
|
||||
INCPOSTFIX := $(DIRSEP)harbour
|
||||
LIBSUFFIX := $(LIBSUFFIX)$(DIRSEP)harbour
|
||||
INCSUFFIX := $(DIRSEP)harbour
|
||||
endif
|
||||
else
|
||||
ifneq ($(findstring |/opt,|$(HB_INSTALL_PREFIX)),)
|
||||
LIBPOSTFIX := $(LIBPOSTFIX)$(DIRSEP)harbour
|
||||
INCPOSTFIX := $(DIRSEP)harbour
|
||||
LIBSUFFIX := $(LIBSUFFIX)$(DIRSEP)harbour
|
||||
INCSUFFIX := $(DIRSEP)harbour
|
||||
else
|
||||
LIBPOSTFIX :=
|
||||
LIBSUFFIX :=
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
@@ -1863,7 +1863,7 @@ ifneq ($(HB_INSTALL_PREFIX),)
|
||||
endif
|
||||
# Standard name: LIBDIR
|
||||
ifeq ($(HB_INSTALL_LIB),)
|
||||
export HB_INSTALL_LIB := $(HB_INSTALL_PREFIX)$(DIRSEP)lib$(LIBPOSTFIX)
|
||||
export HB_INSTALL_LIB := $(HB_INSTALL_PREFIX)$(DIRSEP)lib$(LIBSUFFIX)
|
||||
endif
|
||||
ifeq ($(HB_INSTALL_DYN),)
|
||||
ifeq ($(HB_PLATFORM_UNIX),)
|
||||
@@ -1878,7 +1878,7 @@ ifneq ($(HB_INSTALL_PREFIX),)
|
||||
endif
|
||||
# Standard name: INCLUDEDIR
|
||||
ifeq ($(HB_INSTALL_INC),)
|
||||
export HB_INSTALL_INC := $(HB_INSTALL_PREFIX)$(DIRSEP)include$(INCPOSTFIX)
|
||||
export HB_INSTALL_INC := $(HB_INSTALL_PREFIX)$(DIRSEP)include$(INCSUFFIX)
|
||||
endif
|
||||
# Standard name: DOCDIR
|
||||
ifeq ($(HB_INSTALL_DOC),)
|
||||
|
||||
@@ -79,8 +79,8 @@ endif
|
||||
|
||||
ifeq ($(HB_SHELL),nt)
|
||||
|
||||
# NOTE: According to http://support.microsoft.com/kb/830473
|
||||
# The command line length limit for cmd.exe is 8191 chars
|
||||
# NOTE: According to https://support.microsoft.com/kb/830473
|
||||
# The command-line length limit for cmd.exe is 8191 chars
|
||||
# for Windows XP and upper and 2047 for Windows NT and 2000.
|
||||
# This is true for commands which are recognized as shell
|
||||
# commands (by using an internal list). For the rest
|
||||
@@ -134,7 +134,7 @@ endif
|
||||
|
||||
ifeq ($(HB_SHELL),os2)
|
||||
|
||||
# NOTE: Maximum size of command line in OS/2 is limited to 1024
|
||||
# NOTE: Maximum size of command-line in OS/2 is limited to 1024
|
||||
# characters.
|
||||
|
||||
# NOTE: Comment on included OS/2 GNU tools:
|
||||
@@ -184,9 +184,9 @@ endif
|
||||
|
||||
ifeq ($(HB_SHELL),dos)
|
||||
|
||||
# NOTE: MS-DOS command line length has a limit of 126 characters.
|
||||
# NOTE: MS-DOS command-line length has a limit of 126 characters.
|
||||
# When using DJGPP GNU Make to invoke other DJGPP tools this limit
|
||||
# is about 13KB, as they do special trick to overcome it.
|
||||
# is about 13 kB, as they do special trick to overcome it.
|
||||
# See these DJGPP FAQs:
|
||||
# http://www.delorie.com/djgpp/v2faq/faq16_4.html
|
||||
# http://www.delorie.com/djgpp/v2faq/faq16_5.html
|
||||
|
||||
@@ -16,7 +16,7 @@ CC_OUT := -o
|
||||
|
||||
CFLAGS += -I. -I$(HB_HOST_INC)
|
||||
|
||||
# uncomment this if you want to force creating 64bit binaries on IA64
|
||||
# uncomment this if you want to force creating 64-bit binaries on IA64
|
||||
#CFLAGS += -mlp64
|
||||
#LDFLAGS += -mlp64
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ CFLAGS += -I. -I$(HB_HOST_INC)
|
||||
ifneq ($(HB_BUILD_OPTIM),no)
|
||||
# Together with $(HB_ISAOPT) above, these are supposed to (somewhat)
|
||||
# conform to the Blastwave build standards, see
|
||||
# http://wiki.blastwave.org/mediawiki/index.php/Build_Standards
|
||||
# https://web.archive.org/web/wiki.blastwave.org/mediawiki/index.php/Build_Standards
|
||||
# Try to keep them this way.
|
||||
CFLAGS += -fast
|
||||
CFLAGS += -xnolibmopt
|
||||
|
||||
@@ -87,7 +87,7 @@ else
|
||||
endef
|
||||
|
||||
# We have to use a script to overcome the AR limit of max 850 characters
|
||||
# in commmand line
|
||||
# in command-line
|
||||
define create_library
|
||||
$(if $(wildcard $(subst /,$(DIRSEP),$(LIB_FILE))),@$(RM) $(subst /,$(DIRSEP),$(LIB_FILE)),)
|
||||
@$(ECHO) $(ECHOQUOTE)CREATE $(LIB_DIR)/$@$(ECHOQUOTE) > __lib__.tmp
|
||||
|
||||
@@ -273,7 +273,7 @@ PROCEDURE Main( ... )
|
||||
ELSEIF Empty( query_stdout( "tar --version" ) )
|
||||
cBin_Tar := ""
|
||||
ELSEIF "bsdtar" $ query_stdout( "tar --version" )
|
||||
/* tar is mapped to bsdtar starting OS X 10.6 */
|
||||
/* tar is mapped to bsdtar starting Mac OS X 10.6 */
|
||||
lGNU_Tar := .F.
|
||||
ENDIF
|
||||
|
||||
@@ -654,7 +654,7 @@ STATIC FUNCTION __hb_extern_get_list( cInputName )
|
||||
hExtern := { => }
|
||||
FOR EACH tmp IN aResult
|
||||
tmp[ 2 ] := hb_asciiUpper( tmp[ 2 ] )
|
||||
IF !( tmp[ 2 ] $ hExtern )
|
||||
IF ! tmp[ 2 ] $ hExtern
|
||||
AAdd( aExtern, tmp[ 2 ] )
|
||||
hExtern[ tmp[ 2 ] ] := NIL
|
||||
ENDIF
|
||||
|
||||
@@ -11,9 +11,9 @@ else
|
||||
endif
|
||||
|
||||
ifeq ($(HB_DYN_COPT),)
|
||||
OBJ_DYN_POSTFIX :=
|
||||
OBJ_DYN_SUFFIX :=
|
||||
else
|
||||
OBJ_DYN_POSTFIX := _dyn
|
||||
OBJ_DYN_SUFFIX := _dyn
|
||||
endif
|
||||
|
||||
# How to run Harbour
|
||||
@@ -34,7 +34,7 @@ ifeq ($(CC_RULE),)
|
||||
ifneq ($(filter $(LIBNAME),$(HB_DYN_LIBS)),)
|
||||
define cc_comp_all
|
||||
$(CC) $(subst $(CC_DIRSEPFROM),$(CC_DIRSEPTO),$(CC_FLAGS) $(HB_USER_CFLAGS) $(CC_OUT)$(<F:.c=$(OBJ_EXT)) $(HB_CFLAGS_STA) $(CC_IN) $<)
|
||||
$(CC) $(subst $(CC_DIRSEPFROM),$(CC_DIRSEPTO),$(CC_FLAGS) $(HB_USER_CFLAGS) $(CC_OUT)$(<F:.c=$(OBJ_DYN_POSTFIX)$(OBJ_EXT)) $(HB_DYN_COPT) $(HB_CFLAGS_DYN) $(CC_IN) $<)
|
||||
$(CC) $(subst $(CC_DIRSEPFROM),$(CC_DIRSEPTO),$(CC_FLAGS) $(HB_USER_CFLAGS) $(CC_OUT)$(<F:.c=$(OBJ_DYN_SUFFIX)$(OBJ_EXT)) $(HB_DYN_COPT) $(HB_CFLAGS_DYN) $(CC_IN) $<)
|
||||
endef
|
||||
CC_RULE = $(cc_comp_all)
|
||||
endif
|
||||
|
||||
@@ -25,14 +25,14 @@ CXX := $(HB_CCACHE) $(HB_CCPATH)$(HB_CCPREFIX)sunCC$(HB_CCSUFFIX)
|
||||
|
||||
CFLAGS += -I. -I$(HB_HOST_INC)
|
||||
|
||||
# try to keep `-fast' as left as possible, as later optim
|
||||
# try to keep `-fast' as left as possible, as later optimization
|
||||
# flags may override values set by `-fast', and this way
|
||||
# no warnings are generated.
|
||||
|
||||
ifneq ($(HB_BUILD_OPTIM),no)
|
||||
# Together with $(HB_ISAOPT) above, these are supposed to (somewhat)
|
||||
# conform to the Blastwave build standards, see
|
||||
# http://wiki.blastwave.org/mediawiki/index.php/Build_Standards
|
||||
# https://web.archive.org/web/wiki.blastwave.org/mediawiki/index.php/Build_Standards
|
||||
# Try to keep them this way.
|
||||
CFLAGS += -fast
|
||||
CFLAGS += -xnolibmopt
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -44,9 +44,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "rddsys.ch"
|
||||
#include "hbusrrdd.ch"
|
||||
#include "dbinfo.ch"
|
||||
#include "hbusrrdd.ch"
|
||||
#include "rddsys.ch"
|
||||
|
||||
/*
|
||||
* DBTCDX RDD
|
||||
@@ -62,7 +62,6 @@ REQUEST DBFFPT
|
||||
ANNOUNCE DBTCDX
|
||||
|
||||
FUNCTION DBTCDX_GETFUNCTABLE( pFuncCount, pFuncTable, pSuperTable, nRddID, pSuperRddID )
|
||||
|
||||
RETURN USRRDD_GETFUNCTABLE( pFuncCount, pFuncTable, pSuperTable, nRddID, ;
|
||||
"DBFCDX", {}, pSuperRddID ) /* We are inheriting from DBFCDX */
|
||||
|
||||
|
||||
@@ -44,9 +44,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "rddsys.ch"
|
||||
#include "hbusrrdd.ch"
|
||||
#include "dbinfo.ch"
|
||||
#include "hbusrrdd.ch"
|
||||
#include "rddsys.ch"
|
||||
|
||||
/*
|
||||
* FPTCDX RDD
|
||||
@@ -58,11 +58,10 @@
|
||||
REQUEST DBFCDX
|
||||
REQUEST DBFFPT
|
||||
|
||||
/* Announce our RDD for forign REQUESTs */
|
||||
/* Announce our RDD for foreign REQUESTs */
|
||||
ANNOUNCE FPTCDX
|
||||
|
||||
FUNCTION FPTCDX_GETFUNCTABLE( pFuncCount, pFuncTable, pSuperTable, nRddID, pSuperRddID )
|
||||
|
||||
RETURN USRRDD_GETFUNCTABLE( pFuncCount, pFuncTable, pSuperTable, nRddID, ;
|
||||
"DBFCDX", {}, pSuperRddID ) /* We are inheriting from DBFCDX */
|
||||
|
||||
|
||||
@@ -46,16 +46,16 @@
|
||||
|
||||
/*
|
||||
* A simple RDD which adds automatically update HSX indexes to DBFCDX
|
||||
* To create new HSX index for current work area use: HSX_CREATE()
|
||||
* To open already existing one use HSX_OPEN(),
|
||||
* To close use: HSX_CLOSE()
|
||||
* To retieve an handle use: HSX_HANDLE()
|
||||
* To create new HSX index for current work area use: hsx_Create()
|
||||
* To open already existing one use hsx_Open(),
|
||||
* To close use: hsx_Close()
|
||||
* To retrieve an handle use: hsx_Handle()
|
||||
*/
|
||||
|
||||
#include "rddsys.ch"
|
||||
#include "hbusrrdd.ch"
|
||||
#include "fileio.ch"
|
||||
#include "dbinfo.ch"
|
||||
#include "fileio.ch"
|
||||
#include "hbusrrdd.ch"
|
||||
#include "rddsys.ch"
|
||||
|
||||
ANNOUNCE HSCDX
|
||||
|
||||
@@ -63,8 +63,8 @@ ANNOUNCE HSCDX
|
||||
* methods: NEW and RELEASE receive pointer to work area structure
|
||||
* not work area number. It's necessary because the can be executed
|
||||
* before work area is allocated
|
||||
* these methods does not have to execute SUPER methods - these is
|
||||
* always done by low level USRRDD code
|
||||
* these methods does not have to execute SUPER methods - this is
|
||||
* always done by low-level USRRDD code
|
||||
*/
|
||||
|
||||
STATIC FUNCTION _HSX_NEW( pWA )
|
||||
@@ -72,7 +72,7 @@ STATIC FUNCTION _HSX_NEW( pWA )
|
||||
LOCAL aWData := { .F., {}, {} }
|
||||
|
||||
/*
|
||||
* Set in our private AREA item the array where we will kepp HSX indexes
|
||||
* Set in our private AREA item the array where we will keep HSX indexes
|
||||
* and HOT buffer flag
|
||||
*/
|
||||
|
||||
@@ -102,8 +102,7 @@ STATIC FUNCTION _HSX_GOCOLD( nWA )
|
||||
|
||||
LOCAL nResult, aWData, nHSX, nRecNo, nKeyNo
|
||||
|
||||
nResult := UR_SUPER_GOCOLD( nWA )
|
||||
IF nResult == HB_SUCCESS
|
||||
IF ( nResult := UR_SUPER_GOCOLD( nWA ) ) == HB_SUCCESS
|
||||
aWData := USRRDD_AREADATA( nWA )
|
||||
IF aWData[ 1 ]
|
||||
IF ! Empty( aWData[ 2 ] )
|
||||
@@ -129,8 +128,7 @@ STATIC FUNCTION _HSX_GOHOT( nWA )
|
||||
|
||||
LOCAL nResult, aWData
|
||||
|
||||
nResult := UR_SUPER_GOHOT( nWA )
|
||||
IF nResult == HB_SUCCESS
|
||||
IF ( nResult := UR_SUPER_GOHOT( nWA ) ) == HB_SUCCESS
|
||||
aWData := USRRDD_AREADATA( nWA )
|
||||
aWData[ 1 ] := .T.
|
||||
ENDIF
|
||||
@@ -141,8 +139,7 @@ STATIC FUNCTION _HSX_APPEND( nWA, lUnlockAll )
|
||||
|
||||
LOCAL nResult, aWData
|
||||
|
||||
nResult := UR_SUPER_APPEND( nWA, lUnlockAll )
|
||||
IF nResult == HB_SUCCESS
|
||||
IF ( nResult := UR_SUPER_APPEND( nWA, lUnlockAll ) ) == HB_SUCCESS
|
||||
aWData := USRRDD_AREADATA( nWA )
|
||||
aWData[ 1 ] := .T.
|
||||
ENDIF
|
||||
@@ -154,7 +151,7 @@ STATIC FUNCTION _HSX_APPEND( nWA, lUnlockAll )
|
||||
* with current work are and automatically updated.
|
||||
*/
|
||||
|
||||
FUNCTION HSX_CREATE( cFile, cExpr, nKeySize, nBufSize, lCase, nFiltSet )
|
||||
FUNCTION hsx_Create( cFile, cExpr, nKeySize, nBufSize, lCase, nFiltSet )
|
||||
|
||||
LOCAL aWData, nHsx := -1, nOpenMode
|
||||
|
||||
@@ -164,9 +161,7 @@ FUNCTION HSX_CREATE( cFile, cExpr, nKeySize, nBufSize, lCase, nFiltSet )
|
||||
aWData := USRRDD_AREADATA( Select() )
|
||||
nOpenMode := iif( dbInfo( DBI_SHARED ), 1, 0 ) + ;
|
||||
iif( dbInfo( DBI_ISREADONLY ), 2, 0 )
|
||||
nHsx := hs_Index( cFile, cExpr, nKeySize, nOpenMode, ;
|
||||
nBufSize, lCase, nFiltSet )
|
||||
IF nHsx >= 0
|
||||
IF ( nHsx := hs_Index( cFile, cExpr, nKeySize, nOpenMode, nBufSize, lCase, nFiltSet ) ) >= 0
|
||||
AAdd( aWData[ 2 ], nHsx )
|
||||
AAdd( aWData[ 3 ], cFile )
|
||||
ENDIF
|
||||
@@ -174,7 +169,7 @@ FUNCTION HSX_CREATE( cFile, cExpr, nKeySize, nBufSize, lCase, nFiltSet )
|
||||
|
||||
RETURN nHsx
|
||||
|
||||
PROCEDURE HSX_OPEN( cFile, nBufSize )
|
||||
PROCEDURE hsx_Open( cFile, nBufSize )
|
||||
|
||||
LOCAL aWData, nHsx, nOpenMode
|
||||
|
||||
@@ -184,8 +179,7 @@ PROCEDURE HSX_OPEN( cFile, nBufSize )
|
||||
aWData := USRRDD_AREADATA( Select() )
|
||||
nOpenMode := iif( dbInfo( DBI_SHARED ), 1, 0 ) + ;
|
||||
iif( dbInfo( DBI_ISREADONLY ), 2, 0 )
|
||||
nHsx := hs_Open( cFile, nBufSize, nOpenMode )
|
||||
IF nHsx >= 0
|
||||
IF ( nHsx := hs_Open( cFile, nBufSize, nOpenMode ) ) >= 0
|
||||
AAdd( aWData[ 2 ], nHsx )
|
||||
AAdd( aWData[ 3 ], cFile )
|
||||
ENDIF
|
||||
@@ -193,20 +187,21 @@ PROCEDURE HSX_OPEN( cFile, nBufSize )
|
||||
|
||||
RETURN
|
||||
|
||||
PROCEDURE HSX_CLOSE( xHSX )
|
||||
PROCEDURE hsx_Close( xHSX )
|
||||
|
||||
LOCAL aWData, nSlot
|
||||
|
||||
IF Used() .AND. rddName() == "HSCDX"
|
||||
aWData := USRRDD_AREADATA( Select() )
|
||||
IF HB_ISNUMERIC( xHSX )
|
||||
DO CASE
|
||||
CASE HB_ISNUMERIC( xHSX )
|
||||
nSlot := AScan( aWData[ 2 ], xHSX )
|
||||
ELSEIF HB_ISSTRING( xHSX )
|
||||
CASE HB_ISSTRING( xHSX )
|
||||
nSlot := AScan( aWData[ 3 ], {| _1 | _1 == xHSX } )
|
||||
ELSE
|
||||
OTHERWISE
|
||||
nSlot := 0
|
||||
ENDIF
|
||||
IF nSlot != 0
|
||||
ENDCASE
|
||||
IF nSlot > 0
|
||||
hb_ADel( aWData[ 2 ], nSlot, .T. )
|
||||
hb_ADel( aWData[ 3 ], nSlot, .T. )
|
||||
ENDIF
|
||||
@@ -214,7 +209,7 @@ PROCEDURE HSX_CLOSE( xHSX )
|
||||
|
||||
RETURN
|
||||
|
||||
FUNCTION HSX_HANDLE( cFile )
|
||||
FUNCTION hsx_Handle( cFile )
|
||||
|
||||
LOCAL aWData, nSlot
|
||||
|
||||
@@ -222,13 +217,13 @@ FUNCTION HSX_HANDLE( cFile )
|
||||
aWData := USRRDD_AREADATA( Select() )
|
||||
nSlot := AScan( aWData[ 3 ], {| _1 | _1 == cFile } )
|
||||
IF nSlot != 0
|
||||
RETURN aWData[ 2, nSlot ]
|
||||
RETURN aWData[ 2 ][ nSlot ]
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
RETURN -1
|
||||
|
||||
FUNCTION HSX_FILE( nHsx )
|
||||
FUNCTION hsx_File( nHsx )
|
||||
|
||||
LOCAL aWData, nSlot
|
||||
|
||||
@@ -236,20 +231,20 @@ FUNCTION HSX_FILE( nHsx )
|
||||
aWData := USRRDD_AREADATA( Select() )
|
||||
nSlot := AScan( aWData[ 3 ], nHsx )
|
||||
IF nSlot != 0
|
||||
RETURN aWData[ 3, nSlot ]
|
||||
RETURN aWData[ 3 ][ nSlot ]
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
RETURN ""
|
||||
|
||||
FUNCTION HSX_GET( nSlot )
|
||||
FUNCTION hsx_Get( nSlot )
|
||||
|
||||
LOCAL aWData
|
||||
|
||||
IF Used() .AND. rddName() == "HSCDX"
|
||||
aWData := USRRDD_AREADATA( Select() )
|
||||
IF nSlot > 0 .AND. nSlot <= Len( aWData[ 2 ] )
|
||||
RETURN aWData[ 2, nSlot ]
|
||||
RETURN aWData[ 2 ][ nSlot ]
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
@@ -269,11 +264,11 @@ FUNCTION HSCDX_GETFUNCTABLE( pFuncCount, pFuncTable, pSuperTable, nRddID, pSuper
|
||||
LOCAL cSuperRDD := "DBFCDX" /* We are inheriting from DBFCDX */
|
||||
LOCAL aMyFunc[ UR_METHODCOUNT ]
|
||||
|
||||
aMyFunc[ UR_NEW ] := ( @_HSX_NEW() )
|
||||
aMyFunc[ UR_CLOSE ] := ( @_HSX_CLOSE() )
|
||||
aMyFunc[ UR_GOCOLD ] := ( @_HSX_GOCOLD() )
|
||||
aMyFunc[ UR_GOHOT ] := ( @_HSX_GOHOT() )
|
||||
aMyFunc[ UR_APPEND ] := ( @_HSX_APPEND() )
|
||||
aMyFunc[ UR_NEW ] := @_HSX_NEW()
|
||||
aMyFunc[ UR_CLOSE ] := @_HSX_CLOSE()
|
||||
aMyFunc[ UR_GOCOLD ] := @_HSX_GOCOLD()
|
||||
aMyFunc[ UR_GOHOT ] := @_HSX_GOHOT()
|
||||
aMyFunc[ UR_APPEND ] := @_HSX_APPEND()
|
||||
|
||||
RETURN USRRDD_GETFUNCTABLE( pFuncCount, pFuncTable, pSuperTable, nRddID, ;
|
||||
cSuperRDD, aMyFunc, pSuperRddID )
|
||||
|
||||
@@ -45,45 +45,43 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* A simple RDD which introduce logging to file. It inheriths from
|
||||
* A simple RDD which introduce logging to file. It inherits from
|
||||
* any existent RDD but if you write / replace / delete something
|
||||
* on tables it writes changes in a log file.
|
||||
*/
|
||||
|
||||
#include "rddsys.ch"
|
||||
#include "hbusrrdd.ch"
|
||||
#include "fileio.ch"
|
||||
#include "dbinfo.ch"
|
||||
#include "fileio.ch"
|
||||
#include "hbusrrdd.ch"
|
||||
#include "rddsys.ch"
|
||||
|
||||
#define ARRAY_FILENAME 1
|
||||
#define ARRAY_FHANDLE 2
|
||||
#define ARRAY_TAG 3
|
||||
#define ARRAY_ACTIVE 4
|
||||
#define ARRAY_RDDNAME 5
|
||||
#define ARRAY_MSGLOGBLOCK 6
|
||||
#define ARRAY_USERLOGBLOCK 7
|
||||
#define ARRAY_FILENAME 1
|
||||
#define ARRAY_FHANDLE 2
|
||||
#define ARRAY_TAG 3
|
||||
#define ARRAY_ACTIVE 4
|
||||
#define ARRAY_RDDNAME 5
|
||||
#define ARRAY_MSGLOGBLOCK 6
|
||||
#define ARRAY_USERLOGBLOCK 7
|
||||
|
||||
ANNOUNCE LOGRDD
|
||||
|
||||
DYNAMIC HB_LOGRDDINHERIT /* To be defined at user level */
|
||||
DYNAMIC hb_LogRddInherit /* To be defined at user level */
|
||||
|
||||
STATIC s_nRddID := -1
|
||||
|
||||
STATIC FUNCTION LOGRDD_INIT( nRDD )
|
||||
|
||||
LOCAL lActive, cFileName, cTag, cRDDName
|
||||
|
||||
/* Defaults */
|
||||
|
||||
cFileName := "changes.log"
|
||||
lActive := .F.
|
||||
cTag := NetName() + "\" + hb_UserName()
|
||||
cRDDName := hb_LogRddInherit()
|
||||
LOCAL cFileName := "changes.log"
|
||||
LOCAL lActive := .F.
|
||||
LOCAL cTag := NetName() + "\" + hb_UserName()
|
||||
LOCAL cRDDName := hb_LogRddInherit()
|
||||
|
||||
/* Log File will be open later so user can change parameters */
|
||||
|
||||
/* Store data in RDD cargo */
|
||||
/* cFileName, nHandle, cTag, lActive, cRDDName, bMsgLogBlock, bUserLogBlock */
|
||||
/* cFileName, hFile, cTag, lActive, cRDDName, bMsgLogBlock, bUserLogBlock */
|
||||
USRRDD_RDDDATA( nRDD, { cFileName, NIL, cTag, lActive, cRDDName, NIL, NIL } )
|
||||
|
||||
RETURN HB_SUCCESS
|
||||
@@ -105,9 +103,9 @@ STATIC FUNCTION LOGRDD_EXIT( nRDD )
|
||||
|
||||
STATIC FUNCTION LOGRDD_CREATE( nWA, aOpenInfo )
|
||||
|
||||
LOCAL nResult := UR_SUPER_CREATE( nWA, aOpenInfo )
|
||||
LOCAL nResult
|
||||
|
||||
IF nResult == HB_SUCCESS
|
||||
IF ( nResult := UR_SUPER_CREATE( nWA, aOpenInfo ) ) == HB_SUCCESS
|
||||
ToLog( "CREATE", nWA, aOpenInfo )
|
||||
ENDIF
|
||||
|
||||
@@ -117,9 +115,9 @@ STATIC FUNCTION LOGRDD_CREATE( nWA, aOpenInfo )
|
||||
|
||||
STATIC FUNCTION LOGRDD_CREATEFIELDS( nWA, aStruct )
|
||||
|
||||
LOCAL nResult := UR_SUPER_CREATEFIELDS( nWA, aStruct )
|
||||
LOCAL nResult
|
||||
|
||||
IF nResult == HB_SUCCESS
|
||||
IF ( nResult := UR_SUPER_CREATEFIELDS( nWA, aStruct ) ) == HB_SUCCESS
|
||||
ToLog( "CREATEFIELDS", nWA, aStruct )
|
||||
ENDIF
|
||||
|
||||
@@ -129,9 +127,9 @@ STATIC FUNCTION LOGRDD_CREATEFIELDS( nWA, aStruct )
|
||||
|
||||
STATIC FUNCTION LOGRDD_OPEN( nWA, aOpenInfo )
|
||||
|
||||
LOCAL nResult := UR_SUPER_OPEN( nWA, aOpenInfo )
|
||||
LOCAL nResult
|
||||
|
||||
IF nResult == HB_SUCCESS
|
||||
IF ( nResult := UR_SUPER_OPEN( nWA, aOpenInfo ) ) == HB_SUCCESS
|
||||
ToLog( "OPEN", nWA, aOpenInfo )
|
||||
ENDIF
|
||||
|
||||
@@ -141,11 +139,11 @@ STATIC FUNCTION LOGRDD_OPEN( nWA, aOpenInfo )
|
||||
|
||||
STATIC FUNCTION LOGRDD_CLOSE( nWA )
|
||||
|
||||
LOCAL cFile := dbInfo( DBI_FULLPATH )
|
||||
LOCAL cAlias := Alias()
|
||||
LOCAL nResult := UR_SUPER_CLOSE( nWA )
|
||||
LOCAL cFile := dbInfo( DBI_FULLPATH )
|
||||
LOCAL cAlias := Alias()
|
||||
LOCAL nResult
|
||||
|
||||
IF nResult == HB_SUCCESS
|
||||
IF ( nResult := UR_SUPER_CLOSE( nWA ) ) == HB_SUCCESS
|
||||
ToLog( "CLOSE", nWA, cFile, cAlias )
|
||||
ENDIF
|
||||
|
||||
@@ -153,9 +151,9 @@ STATIC FUNCTION LOGRDD_CLOSE( nWA )
|
||||
|
||||
STATIC FUNCTION LOGRDD_APPEND( nWA, lUnlockAll )
|
||||
|
||||
LOCAL nResult := UR_SUPER_APPEND( nWA, lUnlockAll )
|
||||
LOCAL nResult
|
||||
|
||||
IF nResult == HB_SUCCESS
|
||||
IF ( nResult := UR_SUPER_APPEND( nWA, lUnlockAll ) ) == HB_SUCCESS
|
||||
ToLog( "APPEND", nWA, lUnlockAll )
|
||||
ENDIF
|
||||
|
||||
@@ -163,9 +161,9 @@ STATIC FUNCTION LOGRDD_APPEND( nWA, lUnlockAll )
|
||||
|
||||
STATIC FUNCTION LOGRDD_DELETE( nWA )
|
||||
|
||||
LOCAL nResult := UR_SUPER_DELETE( nWA )
|
||||
LOCAL nResult
|
||||
|
||||
IF nResult == HB_SUCCESS
|
||||
IF ( nResult := UR_SUPER_DELETE( nWA ) ) == HB_SUCCESS
|
||||
ToLog( "DELETE", nWA )
|
||||
ENDIF
|
||||
|
||||
@@ -173,9 +171,9 @@ STATIC FUNCTION LOGRDD_DELETE( nWA )
|
||||
|
||||
STATIC FUNCTION LOGRDD_RECALL( nWA )
|
||||
|
||||
LOCAL nResult := UR_SUPER_RECALL( nWA )
|
||||
LOCAL nResult
|
||||
|
||||
IF nResult == HB_SUCCESS
|
||||
IF ( nResult := UR_SUPER_RECALL( nWA ) ) == HB_SUCCESS
|
||||
ToLog( "RECALL", nWA )
|
||||
ENDIF
|
||||
|
||||
@@ -186,9 +184,9 @@ STATIC FUNCTION LOGRDD_PUTVALUE( nWA, nField, xValue )
|
||||
LOCAL xOldValue := FieldGet( nField )
|
||||
LOCAL nResult := UR_SUPER_PUTVALUE( nWA, nField, xValue )
|
||||
|
||||
// Log Only Changes
|
||||
// Log changes only
|
||||
|
||||
IF !( xOldValue == xValue )
|
||||
IF ! xOldValue == xValue
|
||||
ToLog( "PUTVALUE", nWA, nField, xValue, xOldValue )
|
||||
ENDIF
|
||||
|
||||
@@ -196,9 +194,9 @@ STATIC FUNCTION LOGRDD_PUTVALUE( nWA, nField, xValue )
|
||||
|
||||
STATIC FUNCTION LOGRDD_ZAP( nWA )
|
||||
|
||||
LOCAL nResult := UR_SUPER_ZAP( nWA )
|
||||
LOCAL nResult
|
||||
|
||||
IF nResult == HB_SUCCESS
|
||||
IF ( nResult := UR_SUPER_ZAP( nWA ) ) == HB_SUCCESS
|
||||
ToLog( "ZAP", nWA )
|
||||
ENDIF
|
||||
|
||||
@@ -220,17 +218,17 @@ FUNCTION LOGRDD_GETFUNCTABLE( pFuncCount, pFuncTable, pSuperTable, nRddID, pSupe
|
||||
|
||||
s_nRddID := nRddID
|
||||
|
||||
aMyFunc[ UR_INIT ] := ( @LOGRDD_INIT() )
|
||||
aMyFunc[ UR_EXIT ] := ( @LOGRDD_EXIT() )
|
||||
aMyFunc[ UR_CREATE ] := ( @LOGRDD_CREATE() )
|
||||
aMyFunc[ UR_CREATEFIELDS ] := ( @LOGRDD_CREATEFIELDS() )
|
||||
aMyFunc[ UR_OPEN ] := ( @LOGRDD_OPEN() )
|
||||
aMyFunc[ UR_CLOSE ] := ( @LOGRDD_CLOSE() )
|
||||
aMyFunc[ UR_APPEND ] := ( @LOGRDD_APPEND() )
|
||||
aMyFunc[ UR_DELETE ] := ( @LOGRDD_DELETE() )
|
||||
aMyFunc[ UR_RECALL ] := ( @LOGRDD_RECALL() )
|
||||
aMyFunc[ UR_PUTVALUE ] := ( @LOGRDD_PUTVALUE() )
|
||||
aMyFunc[ UR_ZAP ] := ( @LOGRDD_ZAP() )
|
||||
aMyFunc[ UR_INIT ] := @LOGRDD_INIT()
|
||||
aMyFunc[ UR_EXIT ] := @LOGRDD_EXIT()
|
||||
aMyFunc[ UR_CREATE ] := @LOGRDD_CREATE()
|
||||
aMyFunc[ UR_CREATEFIELDS ] := @LOGRDD_CREATEFIELDS()
|
||||
aMyFunc[ UR_OPEN ] := @LOGRDD_OPEN()
|
||||
aMyFunc[ UR_CLOSE ] := @LOGRDD_CLOSE()
|
||||
aMyFunc[ UR_APPEND ] := @LOGRDD_APPEND()
|
||||
aMyFunc[ UR_DELETE ] := @LOGRDD_DELETE()
|
||||
aMyFunc[ UR_RECALL ] := @LOGRDD_RECALL()
|
||||
aMyFunc[ UR_PUTVALUE ] := @LOGRDD_PUTVALUE()
|
||||
aMyFunc[ UR_ZAP ] := @LOGRDD_ZAP()
|
||||
|
||||
RETURN USRRDD_GETFUNCTABLE( pFuncCount, pFuncTable, pSuperTable, nRddID, ;
|
||||
cSuperRDD, aMyFunc, pSuperRddID )
|
||||
@@ -241,9 +239,7 @@ INIT PROCEDURE _LOGRDD_INIT()
|
||||
|
||||
RETURN
|
||||
|
||||
/* -------------------------------------------------- */
|
||||
/* USER UTILITY FUNCTIONS */
|
||||
/* -------------------------------------------------- */
|
||||
/* User utility functions */
|
||||
|
||||
FUNCTION hb_LogRddLogFileName( cFileName )
|
||||
|
||||
@@ -259,7 +255,6 @@ FUNCTION hb_LogRddLogFileName( cFileName )
|
||||
IF HB_ISSTRING( cFileName )
|
||||
aRDDData[ ARRAY_FILENAME ] := cFileName
|
||||
ENDIF
|
||||
|
||||
ENDIF
|
||||
|
||||
RETURN cOldFileName
|
||||
@@ -278,7 +273,6 @@ FUNCTION hb_LogRddTag( cTag )
|
||||
IF HB_ISSTRING( cTag )
|
||||
aRDDData[ ARRAY_TAG ] := cTag
|
||||
ENDIF
|
||||
|
||||
ENDIF
|
||||
|
||||
RETURN cOldTag
|
||||
@@ -297,7 +291,6 @@ FUNCTION hb_LogRddActive( lActive )
|
||||
IF HB_ISLOGICAL( lActive )
|
||||
aRDDData[ ARRAY_ACTIVE ] := lActive
|
||||
ENDIF
|
||||
|
||||
ENDIF
|
||||
|
||||
RETURN lOldActive
|
||||
@@ -316,7 +309,6 @@ FUNCTION hb_LogRddMsgLogBlock( bMsgLogBlock )
|
||||
IF HB_ISEVALITEM( bMsgLogBlock )
|
||||
aRDDData[ ARRAY_MSGLOGBLOCK ] := bMsgLogBlock
|
||||
ENDIF
|
||||
|
||||
ENDIF
|
||||
|
||||
RETURN bOldMsgLogBlock
|
||||
@@ -335,114 +327,102 @@ FUNCTION hb_LogRddUserLogBlock( bUserLogBlock )
|
||||
IF HB_ISEVALITEM( bUserLogBlock )
|
||||
aRDDData[ ARRAY_USERLOGBLOCK ] := bUserLogBlock
|
||||
ENDIF
|
||||
|
||||
ENDIF
|
||||
|
||||
RETURN bOldUserLogBlock
|
||||
|
||||
FUNCTION hb_LogRddValueToText( uValue )
|
||||
|
||||
LOCAL cType := ValType( uValue )
|
||||
LOCAL cType
|
||||
LOCAL cText
|
||||
|
||||
DO CASE
|
||||
CASE cType == "C"
|
||||
cText := hb_StrToExp( uValue )
|
||||
|
||||
CASE cType == "N"
|
||||
cText := hb_ntos( uValue )
|
||||
|
||||
CASE cType == "D"
|
||||
cText := DToS( uValue )
|
||||
cText := "0d" + iif( Empty( cText ), "00000000", cText )
|
||||
|
||||
OTHERWISE
|
||||
cText := hb_ValToStr( uValue )
|
||||
ENDCASE
|
||||
SWITCH cType := ValType( uValue )
|
||||
CASE "C" ; cText := hb_StrToExp( uValue ) ; EXIT
|
||||
CASE "N" ; cText := hb_ntos( uValue ) ; EXIT
|
||||
CASE "D" ; cText := DToS( uValue ) ; cText := "0d" + iif( Empty( cText ), "00000000", cText ) ; EXIT
|
||||
OTHERWISE ; cText := hb_ValToStr( uValue )
|
||||
ENDSWITCH
|
||||
|
||||
RETURN "[" + cType + "]>>>" + cText + "<<<"
|
||||
|
||||
/* -------------------------------------------------- */
|
||||
/* LOCAL UTILITY FUNCTIONS */
|
||||
/* -------------------------------------------------- */
|
||||
/* Local utility functions */
|
||||
|
||||
STATIC PROCEDURE OpenLogFile( nWA )
|
||||
|
||||
LOCAL aRDDData := USRRDD_RDDDATA( USRRDD_ID( nWA ) )
|
||||
LOCAL cFileName := aRDDData[ ARRAY_FILENAME ]
|
||||
LOCAL nHandle := aRDDData[ ARRAY_FHANDLE ]
|
||||
LOCAL lActive := aRDDData[ ARRAY_ACTIVE ]
|
||||
LOCAL hFile := aRDDData[ ARRAY_FHANDLE ]
|
||||
LOCAL lActive := aRDDData[ ARRAY_ACTIVE ]
|
||||
|
||||
// TraceLog( "nHandle " + CStr( nHandle ) )
|
||||
#if 0
|
||||
TraceLog( "hFile " + CStr( hFile ) )
|
||||
#endif
|
||||
|
||||
IF lActive .AND. nHandle == NIL
|
||||
IF lActive .AND. hFile == NIL
|
||||
|
||||
/* Open Access Log File */
|
||||
IF hb_FileExists( cFileName )
|
||||
nHandle := FOpen( cFileName, FO_READWRITE + FO_SHARED )
|
||||
hFile := FOpen( cFileName, FO_READWRITE + FO_SHARED )
|
||||
ELSE
|
||||
nHandle := FCreate( cFileName )
|
||||
hFile := FCreate( cFileName )
|
||||
/* Close and reopen in shared mode */
|
||||
IF FError() == 0 .AND. nHandle != F_ERROR
|
||||
FClose( nHandle )
|
||||
nHandle := FOpen( cFileName, FO_READWRITE + FO_SHARED )
|
||||
IF FError() == 0 .AND. hFile != F_ERROR
|
||||
FClose( hFile )
|
||||
hFile := FOpen( cFileName, FO_READWRITE + FO_SHARED )
|
||||
ENDIF
|
||||
ENDIF
|
||||
IF FError() == 0 .AND. nHandle != F_ERROR
|
||||
IF FError() == 0 .AND. hFile != F_ERROR
|
||||
/* Move to end of file */
|
||||
FSeek( nHandle, 0, FS_END )
|
||||
FSeek( hFile, 0, FS_END )
|
||||
ELSE
|
||||
nHandle := NIL
|
||||
hFile := NIL
|
||||
ENDIF
|
||||
|
||||
aRDDData[ ARRAY_FHANDLE ] := nHandle
|
||||
|
||||
aRDDData[ ARRAY_FHANDLE ] := hFile
|
||||
ENDIF
|
||||
|
||||
RETURN
|
||||
|
||||
STATIC FUNCTION ToString( cCmd, nWA, xPar1, xPar2, xPar3 )
|
||||
|
||||
LOCAL cString
|
||||
|
||||
DO CASE
|
||||
CASE cCmd == "CREATE"
|
||||
// Parameters received: xPar1 = aOpenInfo
|
||||
cString := xPar1[ UR_OI_NAME ]
|
||||
CASE cCmd == "CREATEFIELDS"
|
||||
// Parameters received: xPar1 = aStruct
|
||||
cString := hb_ValToExp( xPar1 )
|
||||
CASE cCmd == "OPEN"
|
||||
// Parameters received: xPar1 = aOpenInfo
|
||||
cString := 'Table : "' + xPar1[ UR_OI_NAME ] + '", Alias : "' + Alias() + '", WorkArea : ' + hb_ntos( nWA )
|
||||
CASE cCmd == "CLOSE"
|
||||
// Parameters received: xPar1 = cTableName, xPar2 = cAlias
|
||||
cString := 'Table : "' + xPar1 + '", Alias : "' + xPar2 + '", WorkArea : ' + hb_ntos( nWA )
|
||||
CASE cCmd == "APPEND"
|
||||
// Parameters received: xPar1 = lUnlockAll
|
||||
cString := Alias() + "->RecNo() = " + hb_ntos( RecNo() )
|
||||
CASE cCmd == "DELETE"
|
||||
SWITCH cCmd
|
||||
CASE "CREATE"
|
||||
// Parameters received: xPar1: aOpenInfo
|
||||
RETURN xPar1[ UR_OI_NAME ]
|
||||
CASE "CREATEFIELDS"
|
||||
// Parameters received: xPar1: aStruct
|
||||
RETURN hb_ValToExp( xPar1 )
|
||||
CASE "OPEN"
|
||||
// Parameters received: xPar1: aOpenInfo
|
||||
RETURN 'Table: "' + xPar1[ UR_OI_NAME ] + '", Alias: "' + Alias() + '", WorkArea: ' + hb_ntos( nWA )
|
||||
CASE "CLOSE"
|
||||
// Parameters received: xPar1: cTableName, xPar2: cAlias
|
||||
RETURN 'Table: "' + xPar1 + '", Alias: "' + xPar2 + '", WorkArea: ' + hb_ntos( nWA )
|
||||
CASE "APPEND"
|
||||
// Parameters received: xPar1: lUnlockAll
|
||||
RETURN Alias() + "->RecNo() == " + hb_ntos( RecNo() )
|
||||
CASE "DELETE"
|
||||
// Parameters received: none
|
||||
cString := Alias() + "->RecNo() = " + hb_ntos( RecNo() )
|
||||
CASE cCmd == "RECALL"
|
||||
RETURN Alias() + "->RecNo() == " + hb_ntos( RecNo() )
|
||||
CASE "RECALL"
|
||||
// Parameters received: none
|
||||
cString := Alias() + "->RecNo() = " + hb_ntos( RecNo() )
|
||||
CASE cCmd == "PUTVALUE"
|
||||
// Parameters received: xPar1 = nField, xPar2 = xValue, xPar3 = xOldValue
|
||||
RETURN Alias() + "->RecNo() == " + hb_ntos( RecNo() )
|
||||
CASE "PUTVALUE"
|
||||
// Parameters received: xPar1: nField, xPar2: xValue, xPar3: xOldValue
|
||||
HB_SYMBOL_UNUSED( xPar3 ) // Here don't log previous value
|
||||
cString := Alias() + "(" + hb_ntos( RecNo() ) + ")->" + PadR( FieldName( xPar1 ), 10 ) + " := " + hb_LogRddValueToText( xPar2 )
|
||||
CASE cCmd == "ZAP"
|
||||
RETURN Alias() + "(" + hb_ntos( RecNo() ) + ")->" + PadR( FieldName( xPar1 ), 10 ) + " := " + hb_LogRddValueToText( xPar2 )
|
||||
CASE "ZAP"
|
||||
// Parameters received: none
|
||||
cString := 'Alias : "' + Alias() + ' Table : "' + dbInfo( DBI_FULLPATH ) + '"'
|
||||
ENDCASE
|
||||
RETURN 'Alias: "' + Alias() + ' Table: "' + dbInfo( DBI_FULLPATH ) + '"'
|
||||
ENDSWITCH
|
||||
|
||||
RETURN cString
|
||||
RETURN NIL
|
||||
|
||||
STATIC PROCEDURE ToLog( cCmd, nWA, xPar1, xPar2, xPar3 )
|
||||
|
||||
LOCAL aRDDData := USRRDD_RDDDATA( USRRDD_ID( nWA ) )
|
||||
LOCAL lActive := aRDDData[ ARRAY_ACTIVE ]
|
||||
LOCAL nHandle, cTag, cRDDName, bMsgLogBlock, bUserLogBlock, cLog
|
||||
LOCAL hFile, cTag, cRDDName, bMsgLogBlock, bUserLogBlock, cLog
|
||||
|
||||
// Check if logging system is active
|
||||
|
||||
@@ -455,14 +435,14 @@ STATIC PROCEDURE ToLog( cCmd, nWA, xPar1, xPar2, xPar3 )
|
||||
// If not defined a User codeblock
|
||||
IF ! HB_ISEVALITEM( bUserLogBlock )
|
||||
|
||||
nHandle := aRDDData[ ARRAY_FHANDLE ]
|
||||
hFile := aRDDData[ ARRAY_FHANDLE ]
|
||||
|
||||
// If log file is not already open I open now
|
||||
IF nHandle == NIL
|
||||
IF hFile == NIL
|
||||
OpenLogFile( nWA )
|
||||
ENDIF
|
||||
|
||||
IF nHandle != NIL
|
||||
IF hFile != NIL
|
||||
|
||||
bMsgLogBlock := aRDDData[ ARRAY_MSGLOGBLOCK ]
|
||||
|
||||
@@ -475,17 +455,13 @@ STATIC PROCEDURE ToLog( cCmd, nWA, xPar1, xPar2, xPar3 )
|
||||
ENDIF
|
||||
// Log to file only if cLog is a valid string
|
||||
IF HB_ISSTRING( cLog )
|
||||
FWrite( nHandle, cLog + hb_eol() )
|
||||
FWrite( hFile, cLog + hb_eol() )
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
ELSE
|
||||
|
||||
// Otherwise I send all to user that is responsible to log everywhere
|
||||
Eval( bUserLogBlock, cTag, cRDDName, cCmd, nWA, xPar1, xPar2, xPar3 )
|
||||
|
||||
ENDIF
|
||||
|
||||
ENDIF
|
||||
|
||||
RETURN
|
||||
|
||||
@@ -46,14 +46,14 @@
|
||||
|
||||
/*
|
||||
* A simple RDD which introduce lock counters. It has full DBFCDX
|
||||
* functionality from which it inherits but if you execute dbRLock(100)
|
||||
* twice then you will have to also repeat call to dbRUnlock(100) to
|
||||
* functionality from which it inherits but if you execute dbRLock( 100 )
|
||||
* twice then you will have to also repeat call to dbRUnlock( 100 ) to
|
||||
* really unlock the record 100. The same if for FLock()
|
||||
* This idea comes from one of messages sent by Mindaugas Kavaliauskas.
|
||||
*/
|
||||
|
||||
#include "rddsys.ch"
|
||||
#include "hbusrrdd.ch"
|
||||
#include "rddsys.ch"
|
||||
|
||||
ANNOUNCE RLCDX
|
||||
|
||||
@@ -61,8 +61,8 @@ ANNOUNCE RLCDX
|
||||
* methods: NEW and RELEASE receive pointer to work area structure
|
||||
* not work area number. It's necessary because the can be executed
|
||||
* before work area is allocated
|
||||
* these methods does not have to execute SUPER methods - these is
|
||||
* always done by low level USRRDD code
|
||||
* these methods does not have to execute SUPER methods - this is
|
||||
* always done by low-level USRRDD code
|
||||
*/
|
||||
|
||||
STATIC FUNCTION RLCDX_NEW( pWA )
|
||||
@@ -86,10 +86,8 @@ STATIC FUNCTION RLCDX_LOCK( nWA, aLockInfo )
|
||||
|
||||
/* Convert EXCLUSIVE locks to DBLM_MULTIPLE */
|
||||
IF aLockInfo[ UR_LI_METHOD ] == DBLM_EXCLUSIVE
|
||||
|
||||
aLockInfo[ UR_LI_METHOD ] := DBLM_MULTIPLE
|
||||
aLockInfo[ UR_LI_RECORD ] := RecNo()
|
||||
|
||||
ENDIF
|
||||
|
||||
IF aLockInfo[ UR_LI_METHOD ] == DBLM_MULTIPLE /* RLOCK */
|
||||
@@ -107,14 +105,13 @@ STATIC FUNCTION RLCDX_LOCK( nWA, aLockInfo )
|
||||
IF aWData[ 1 ] > 0
|
||||
aLockInfo[ UR_LI_RESULT ] := .T.
|
||||
RETURN HB_SUCCESS
|
||||
ELSEIF ( i := AScan( aWData[ 2 ], {| x | x[ 1 ] == xRecID } ) ) != 0
|
||||
++aWData[ 2, i, 2 ]
|
||||
ELSEIF ( i := AScan( aWData[ 2 ], {| x | x[ 1 ] == xRecID } ) ) > 0
|
||||
++aWData[ 2 ][ i ][ 2 ]
|
||||
aLockInfo[ UR_LI_RESULT ] := .T.
|
||||
RETURN HB_SUCCESS
|
||||
ENDIF
|
||||
|
||||
nResult := UR_SUPER_LOCK( nWA, aLockInfo )
|
||||
IF nResult == HB_SUCCESS
|
||||
IF ( nResult := UR_SUPER_LOCK( nWA, aLockInfo ) ) == HB_SUCCESS
|
||||
IF aLockInfo[ UR_LI_RESULT ]
|
||||
AAdd( aWData[ 2 ], { xRecID, 1 } )
|
||||
ENDIF
|
||||
@@ -129,8 +126,7 @@ STATIC FUNCTION RLCDX_LOCK( nWA, aLockInfo )
|
||||
RETURN HB_SUCCESS
|
||||
ENDIF
|
||||
|
||||
nResult := UR_SUPER_LOCK( nWA, aLockInfo )
|
||||
IF nResult == HB_SUCCESS
|
||||
IF ( nResult := UR_SUPER_LOCK( nWA, aLockInfo ) ) == HB_SUCCESS
|
||||
|
||||
/* FLOCK always first remove all RLOCKs, even if it fails */
|
||||
ASize( aWData[ 2 ], 0 )
|
||||
@@ -153,8 +149,8 @@ STATIC FUNCTION RLCDX_UNLOCK( nWA, xRecID )
|
||||
LOCAL aWData := USRRDD_AREADATA( nWA ), i
|
||||
|
||||
IF HB_ISNUMERIC( xRecID ) .AND. xRecID > 0
|
||||
IF ( i := AScan( aWData[ 2 ], {| x | x[ 1 ] == xRecID } ) ) != 0
|
||||
IF --aWData[ 2, i, 2 ] > 0
|
||||
IF ( i := AScan( aWData[ 2 ], {| x | x[ 1 ] == xRecID } ) ) > 0
|
||||
IF --aWData[ 2 ][ i ][ 2 ] > 0
|
||||
RETURN HB_SUCCESS
|
||||
ENDIF
|
||||
hb_ADel( aWData[ 2 ], i, .T. )
|
||||
@@ -180,16 +176,15 @@ STATIC FUNCTION RLCDX_APPEND( nWA, lUnlockAll )
|
||||
|
||||
lUnlockAll := .F.
|
||||
|
||||
nResult := UR_SUPER_APPEND( nWA, lUnlockAll )
|
||||
IF nResult == HB_SUCCESS
|
||||
IF ( nResult := UR_SUPER_APPEND( nWA, lUnlockAll ) ) == HB_SUCCESS
|
||||
|
||||
aWData := USRRDD_AREADATA( nWA )
|
||||
IF aWData[ 1 ] == 0
|
||||
xRecId := RecNo()
|
||||
/* Some RDDs may allow to set phantom locks with RLOCK so we should
|
||||
check if it's not the case and increase the counter when it is */
|
||||
IF ( i := AScan( aWData[ 2 ], {| x | x[ 1 ] == xRecID } ) ) != 0
|
||||
++aWData[ 2, i, 2 ]
|
||||
IF ( i := AScan( aWData[ 2 ], {| x | x[ 1 ] == xRecID } ) ) > 0
|
||||
++aWData[ 2 ][ i ][ 2 ]
|
||||
ELSE
|
||||
AAdd( aWData[ 2 ], { xRecID, 1 } )
|
||||
ENDIF
|
||||
@@ -212,10 +207,10 @@ FUNCTION RLCDX_GETFUNCTABLE( pFuncCount, pFuncTable, pSuperTable, nRddID, pSuper
|
||||
LOCAL cSuperRDD := "DBFCDX" /* We are inheriting from DBFCDX */
|
||||
LOCAL aMethods[ UR_METHODCOUNT ]
|
||||
|
||||
aMethods[ UR_NEW ] := ( @RLCDX_NEW() )
|
||||
aMethods[ UR_LOCK ] := ( @RLCDX_LOCK() )
|
||||
aMethods[ UR_UNLOCK ] := ( @RLCDX_UNLOCK() )
|
||||
aMethods[ UR_APPEND ] := ( @RLCDX_APPEND() )
|
||||
aMethods[ UR_NEW ] := @RLCDX_NEW()
|
||||
aMethods[ UR_LOCK ] := @RLCDX_LOCK()
|
||||
aMethods[ UR_UNLOCK ] := @RLCDX_UNLOCK()
|
||||
aMethods[ UR_APPEND ] := @RLCDX_APPEND()
|
||||
|
||||
RETURN USRRDD_GETFUNCTABLE( pFuncCount, pFuncTable, pSuperTable, nRddID, ;
|
||||
cSuperRDD, aMethods, pSuperRddID )
|
||||
|
||||
@@ -50,19 +50,18 @@
|
||||
* set default memo type to SMT
|
||||
*/
|
||||
|
||||
#include "rddsys.ch"
|
||||
#include "hbusrrdd.ch"
|
||||
#include "dbinfo.ch"
|
||||
#include "hbusrrdd.ch"
|
||||
#include "rddsys.ch"
|
||||
|
||||
/* Force linking DBFCDX and DBFFPT from which our RDD inherits */
|
||||
REQUEST DBFCDX
|
||||
REQUEST DBFFPT
|
||||
|
||||
/* Announce our RDD for forign REQUESTs */
|
||||
/* Announce our RDD for foreign REQUESTs */
|
||||
ANNOUNCE SMTCDX
|
||||
|
||||
FUNCTION SMTCDX_GETFUNCTABLE( pFuncCount, pFuncTable, pSuperTable, nRddID, pSuperRddID )
|
||||
|
||||
RETURN USRRDD_GETFUNCTABLE( pFuncCount, pFuncTable, pSuperTable, nRddID, ;
|
||||
"DBFCDX", {}, pSuperRddID ) /* We are inheriting from DBFCDX */
|
||||
|
||||
|
||||
@@ -44,9 +44,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "rddsys.ch"
|
||||
#include "dbinfo.ch"
|
||||
#include "hbusrrdd.ch"
|
||||
#include "rddsys.ch"
|
||||
|
||||
/* Force linking DBFCDX from which our RDD inherits */
|
||||
REQUEST DBFCDX
|
||||
@@ -54,10 +54,8 @@ REQUEST DBFFPT
|
||||
|
||||
ANNOUNCE VFPCDX
|
||||
|
||||
/* We are inheriting from DBFCDX */
|
||||
FUNCTION VFPCDX_GETFUNCTABLE( pFuncCount, pFuncTable, pSuperTable, nRddID, pSuperRddID )
|
||||
|
||||
/* We are inheriting from DBFCDX */
|
||||
|
||||
RETURN USRRDD_GETFUNCTABLE( pFuncCount, pFuncTable, pSuperTable, nRddID, "DBFCDX", {}, pSuperRddID )
|
||||
|
||||
INIT PROCEDURE VFPCDX_INIT()
|
||||
|
||||
Reference in New Issue
Block a user