Re: [Harbour] HBMK2 problem

2010-05-28 Thread Mindaugas Kavaliauskas

Hi,


On 2010.05.28 14:28, Horodyski Marek (PZUZ) wrote:

Mindaugas, I link APP with MinGW and use CAIRIO with libcairo-2.dll.
What compiler made this dll ?


MinGW latest TDM build (if you are talking about lib build by me, from 
www.dbtopas.lt/hrb



Regards,
Mindaugas
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] SF.net SVN: harbour-project:[14614] trunk/harbour

2010-05-27 Thread Mindaugas Kavaliauskas

Hi,



   + contrib/xhb/hbcompat.prg
 + Added equivalent function wrappers for all hbcompat.ch
   translations where such was possible (everywhere besides
   dirty extensions of original Clipper functions)


FUNCTION SubscribeNow( ... )
   RETURN {| mtx, nTimeOut, lSubscribed |
local xSubscribed
lSubscribed := hb_mutexSubscribeNow( mtx, iif( 
hb_isNumeric( nTimeOut ), nTimeOut / 1000, ), @xSubscribed )

return xSubscribed
  }:eval( ... )

Why this code is written in such complicated way???


Regards,
Mindaugas
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] Problem with upper and lower based on CDP

2010-05-20 Thread Mindaugas Kavaliauskas

Hi,



We have also debuged the cdp-lower and cdp-upper members and they are
empty, so it is not a matter of hb_storvc usage.
Can somebody check if we are missing something or if it is a harbour bug?


Nothing missing nor bug. UPPER(CHR(0)) ir CHR(0), and CHR(0) is end of 
string symbol.


Regards,
Mindaugas
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] New page in PDF file with cairo.

2010-05-19 Thread Mindaugas Kavaliauskas

Hi,


On 2010.05.19 19:40, Horodyski Marek (PZUZ) wrote:

In c:\harbour\contrib\hbhpdf\ is class :

pdf := HPDF_New()

and in this class is :
page   := HPDF_AddPage( pdf)

Cairo is nice, but in cairo we are do not can make this (adds page).


Why not to look at lightning.prg that produces 20 pages pdf file.



This is probably function : cairo_pdf_surface_create_for_stream.
I do not know if I have understood instructions from :
http://cairographics.org/manual/cairo-pdf-surface.html

Can anyone adds this (or other appropriate) function to Harbour


I can add, but do you really need a stream instead of file?



(and to
libcairo-2.dll) ?


You should apply to cairo developers if you want extend functionality of 
cairo.




Regards,
Mindaugas
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] SF.net SVN: harbour-project:[14518] trunk/harbour

2010-05-18 Thread Mindaugas Kavaliauskas

Hi,


On 2010.05.18 10:11, Viktor Szakáts wrote:

What is the reason you want to handle line
selection separately from stream selection?

Line selection looks like a stream which ends
and begins at column zero.

Could be much simpler with two modes: stream and block.


Yes, line mode is a similar to stream mode, but you do not have to move 
to beginning of line (that's simple, just press [Home]) and latter you 
do not have to move back to the same position (that's a lot of cursor 
movements). I find this very useful. The examples of typical usage are:

1) duplicate line
::startLineMarking()
::stopMarking()
::copyBlock()
it's 3 key strokes (two of them are the same key, so, it's very fast): 
F7 F7 F8


Try to compare to standard Windows behaviour without persistent blocks:
Home
Shift+Down
Ctrl+C
Up
Ctrl+V
Left
Left
Left
(and more 30 times Left to position cursor to the same column)

2) swap to lines
::startLineMarking()
::stopMarking()
Up
::moveBlock()
keystokes
 F7 F7 Up Shift+F8


3) almost any copy-paste code is duplicated using line block, because 
you do not need to care about cursor position. Usually you need to 
change some characters in the middle of line (but not in the first 
column), so you save a lot of cursor positioning movements using line block.



I thing, those, who is happy with two selection modes, can do not bind 
additional key to ::toggleLineSelectionMode() and have only two of them.



Regards,
Mindaugas
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] SF.net SVN: harbour-project:[14518] trunk/harbour

2010-05-18 Thread Mindaugas Kavaliauskas

Viktor,



So, I never in the last 15 years missed this feature.
Stream handles the matter just fine:
   Home, Shift+Up/Down,copy, PgUp/PgDn/Up/Down
   to proper place,paste, bingo.


That's because you've never tried line selection mode. After you'll try 
it, you'll miss it. I promise you :)




Seems much simpler than selecting between 3 different
selection modes, keeping them in mind, mousing in
between and pressing out of reach keys like F11, let
alone Shift+F11.


You do not need to keep them in mind and you do not need use mouse. 
Usually I can keep mouse upside down. That's only the problem of current 
hbide behaviour. In current hbide code exists application state active 
selection mode, but it should be implemented a different way: a 
different keys should start a different types of selections, and no 
active selection mode status at all. That's why I'm asking about 
::startColumnSelection() instead of current ::toggleColumnSelectionMode().



Regards,
Mindaugas
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] SF.net SVN: harbour-project:[14518] trunk/harbour

2010-05-18 Thread Mindaugas Kavaliauskas

On 2010.05.18 11:12, Viktor Szakáts wrote:

That's because you've never tried line selection mode. After you'll try it, 
you'll miss it. I promise you :)


I'm copying lines by the thousands since long time
using stream method, and it causes no perceivable
overhead, so most probably I will not miss it in
my lifetime anymore. One less feature to worry about,
and this is always a good thing :)


I can only repeat myself: because you've never tried :)



I absolutely agree, but can't this be made into
HBIDE in a simple way?

For example:
Shift+cursor: stream selection
Alt+cursor: block selection
Ctrl+cursor: line selection


For me the expected behaviour are:
  Ctrl+Left,Right  word left, word right
  Ctrl+Up Down scroll text up, down

Possiblity to not keep pressed Shift/Alt/Ctrl is very useful if large 
blocks should be copied. Let's say I need to mark the whole text from 
the current line to the end of file.

   F7
   Ctrl+PgDown
   F7
is very easy to press. Correct handling of Shift+Ctrl+PgDown helps here, 
but not all functionality works if I need to keep some key pressed all 
the time.



Regards,
Mindaugas
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


[Harbour] Database close during index open failure

2010-05-18 Thread Mindaugas Kavaliauskas

Hi,


3 similar samples with different error, so, perhaps we have memory 
corruption here.



Regards,
Mindaugas


C:\cawi32\sample\testcat test203.prg
STATIC indexBlocks := {}
PROC MAIN()
  DBCREATE(test203.dbf, {{F, C, 1, 0}}, DBFCDX, .T.)
  FERASE(tmp.cdx)
  AADD(indexBlocks, {|| FIELD-F})
  OrdCreate(tmp, f, IndexFunc())
  DBCLOSEALL()
  indexBlocks := {}
BEGIN SEQUENCE WITH {|| err()}
  DbUseArea(.T., DBFCDX, test203,, .T., .F.)
  OrdListAdd(tmp.cdx)
END SEQUENCE
  DBCLOSEALL()
RETURN

FUNC err()
  DBCLOSEAREA()
RETURN NIL

FUNC IndexFunc()
RETURN EVAL(indexBlocks[1])


C:\cawi32\sample\testhbrun test203.prg

Unrecoverable error 9104: hb_cdxIndexFree: index file still locked.
Called from DBCLOSEAREA(0)
Called from ERR(17) in pcode.hrb
Called from (b)MAIN(9) in pcode.hrb
Called from INDEXFUNC(21) in pcode.hrb
Called from ORDLISTADD(0)
Called from MAIN(11) in pcode.hrb
Called from HB_HRBRUN(0)
Called from _APPMAIN(0) in ../../../hbrun.prg

C:\cawi32\sample\testcat test204.prg
STATIC indexBlocks := {}
PROC MAIN()
  DBCREATE(test204.dbf, {{F, C, 1, 0}}, DBFCDX, .T.)
  FERASE(tmp.cdx)
  AADD(indexBlocks, {|| FIELD-F})
  OrdCreate(tmp, f, IndexFunc())
  DBCLOSEALL()
  indexBlocks := {}
BEGIN SEQUENCE WITH {|| err()}
  DbUseArea(.T., DBFCDX, test204,, .F., .F.)
  OrdListAdd(tmp.cdx)
END SEQUENCE
  DBCLOSEALL()
RETURN

FUNC err()
  DBCLOSEAREA()
RETURN NIL

FUNC IndexFunc()
RETURN EVAL(indexBlocks[1])

C:\cawi32\sample\testhbrun test204.prg

Unrecoverable error 9001: Error recovery failure
Called from INDEXFUNC(21) in pcode.hrb
Called from ORDLISTADD(0)
Called from MAIN(11) in pcode.hrb
Called from HB_HRBRUN(0)
Called from _APPMAIN(0) in ../../../hbrun.prg

C:\cawi32\sample\testcat test205.prg
STATIC indexBlock

PROC MAIN()
  DBCREATE(test205.dbf, {{F, C, 1, 0}}, DBFCDX, .T.)
  FERASE(tmp.cdx)
  indexBlock := {|| FIELD-F}
  OrdCreate(tmp, block, IndexFunc())
  DBCLOSEALL()
  indexBlock := NIL
BEGIN SEQUENCE WITH {|| err()}
  DbUseArea(.T., DBFCDX, test205,, .F., .F.)
  OrdListAdd(tmp.cdx)
END SEQUENCE
  DBCLOSEALL()
RETURN

FUNC err()
  DBCLOSEAREA()
RETURN NIL

FUNC IndexFunc()
RETURN EVAL(indexBlock)

C:\cawi32\sample\testhbrun test205.prg

Unrecoverable error 6005: Exception error:

Exception Code:C005
Exception Address:00545F65
EAX:0018F5D8  EBX:0006  ECX:002BDCBC  EDX:0028B95F
ESI:0001  EDI:0001  EBP:0018F618
CS:EIP:0023:00545F65  SS:ESP:002B:0018F5D0
DS:002B  ES:002B  FS:0053  GS:002B
Flags:00010202
CS:EIP: 8B 43 0C 50 E8 86 7E F0 FF 59 8B D0 8D 45 C0 8A
SS:ESP: 000C 0028B954 45444E49 4E554658 00292843  
     000


C stack:
EIP: EBP:   Frame: OldEBP, RetAddr, Params...
00545F65 0018F618   0018F67C 00546116 002BDCBC 0028B954 0001 
000C 0028B874 0020 0002 0001
00546116 0018F67C   0018FA9C 00573115 002BDCBC 0028B954 0028B70C 
0600 0028B874 0A00  
00573115 0018FA9C   0018FAC0 0057338D 0028B874 0028B784 0028B70C 
0018FAE4 434F4C42 004B 
0057338D 0018FAC0   0018FAE8 00574A5B 0028B70C 0028B85C 0600 
0028B70C 002BDE18 002BDCBC 0001 
00574A5B 0018FAE8   0018FC20 005780BE 0028B70C 0018FC0C 0028B127 
0001 002BDCBC 2E706D74 00786463 
005780BE 0018FC20   0018FC64 00540B3A 002BDCBC 0018FC30 00240564 
  0028B6AC  
00540B3A 0018FC64   0018FD6C 0043A6DF 0001 0028AFF4  
 0010 000A  0028B2A8
0043A6DF 0018FD6C   0018FD90 004404C8 0028B064 002BDB6C 0006 
 0028120C  000C
004404C8 0018FD90   0018FDA8 00464E8E 0024 0028AE1C 0028AFF4 
0001



Modules:
0x0040 0x00279000 c:\bin\hbrun.exe
0x7763 0x0018 C:\Windows\SysWOW64\ntdll.dll
0x7666 0x0010 C:\Windows\syswow64\kernel32.dll
0x7520 0x00046000 C:\Windows\syswow64\KERNELBASE.dll
0x7676 0x0010 C:\Windows\syswow64\USER32.DLL
0x75F6 0x0009 C:\Windows\syswow64\GDI32.dll
0x7696 0xA000 C:\Windows\syswow64\LPK.dll
0x75EC 0x0009D000 C:\Windows\syswow64\USP10.dll
0x76D4 0x000AC000 C:\Windows\syswow64\msvcrt.dll
0x76A4 0x000A C:\Windows\syswow64\ADVAPI32.dll
0x76C6 0x00019000 C:\Windows\SysWOW64\sechost.dll
0x76AE 0x000F C:\Windows\syswow64\RPCRT4.dll
0x751A 0x0006 C:\Windows\syswow64\SspiCli.dll
0x7519 0xC000 C:\Windows\syswow64\CRYPTBASE.dll
0x7600 0x00035000 C:\Windows\syswow64\WS2_32.DLL
0x75FF 0x6000 C:\Windows\syswow64\NSI.dll
0x76FD 0x0006 C:\Windows\system32\IMM32.DLL
0x7697 0x000CC000 C:\Windows\syswow64\MSCTF.dll
0x1000 0x00015000 c:\devel\Trmsv\trmglob.dll

Called from ORDLISTADD(0)
Called from MAIN(12) in pcode.hrb
Called from HB_HRBRUN(0)
Called from _APPMAIN(0) in ../../../hbrun.prg
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org

Re: [Harbour] Cairo test.

2010-05-18 Thread Mindaugas Kavaliauskas

On 2010.05.18 14:04, Horodyski Marek (PZUZ) wrote:

To test this lib, I had to download from internet following dlls :
...
These dlls are incompatybile. Has anyone links to correct dlls or may
send on priv these dlls (on WinXP) ?


Some time ago I've compiled .dlll that does not depend on other non 
system dlls: www.dbtopas.lt/hrb/libcairo-2.dll


Regards,
Mindaugas
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] Database close during index open failure

2010-05-18 Thread Mindaugas Kavaliauskas

Hi,


On 2010.05.18 15:00, Przemysław Czerpak wrote:

3 similar samples with different error, so, perhaps we have memory
corruption here.


This is expected and documented few times on this list behavior.
Of course it's a bug but it cannot be well fixed without very serious
modifications in RDD code and all code (also 3-rd part one) which
access any RDD methods.
It's necessary to introduce sth like:

pArea = hb_rddLockCurrentArea();
[...] // any RDD methods
hb_rddFreeArea( pArea );

hb_rddLockCurrentArea()/hb_rddLockArea(iArea) will increase
reference counter and hb_rddFreeArea() will decrease it.
non zero reference counter will delay releasing the pArea
structure until hb_rddFreeArea() will set it to 0.


Thank You. I though it could something like:

2010-03-15 14:04 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
  * harbour/src/rdd/dbfcdx/dbfcdx1.c
! fixed bad copy and past typo which could cause internal error when
  new index using existing order (subindex) was created without 
ADDITIVE

  clause. Bug reported by Mindaugas - many thanks for the information.

because we found this bug in a similar way in the same project.


Regards,
Mindaugas
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] Re: SF.net SVN: harbour-project:[14519] trunk/harbour

2010-05-18 Thread Mindaugas Kavaliauskas

Hi.


 + Finalized: all the three modes of selection programatically.
 ::toggleStreamSelection()No Key
 ::toggleColumnSelection()No Key
 ::toggleLineSelection()   == F11
 ::clearSelection()== Sh+F11
   If a selection mode is initiated by above three methods,
   it can only be exited by calling the same method again.


F11
Down
Down
F11 does not stop selection, though text above says can be exited :(
Down
Down

Sh+F11 also do not stop selection, but unselects current selection. So, 
I still do not know how can I implement ::stopSelection()


Regards,
Mindaugas
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] Re: SF.net SVN: harbour-project:[14519] trunk/harbour

2010-05-18 Thread Mindaugas Kavaliauskas

On 2010.05.18 20:06, Mindaugas Kavaliauskas wrote:

Hi.


+ Finalized: all the three modes of selection programatically.
::toggleStreamSelection() No Key
::toggleColumnSelection() No Key
::toggleLineSelection() == F11
::clearSelection() == Sh+F11
If a selection mode is initiated by above three methods,
it can only be exited by calling the same method again.


F11
Down
Down
F11 does not stop selection, though text above says can be exited :(
Down
Down

Sh+F11 also do not stop selection, but unselects current selection. So,
I still do not know how can I implement ::stopSelection()


Also:

1)
::toggleStreamSelectionMode()
Down
Down (do not select text - bad)

2)
::toggleColumnSelectionMode()
Down
Left (do not select text - bad)

3) Public methods in Keyboard Macros has names ::...SelectionMode(), but 
you've wrote ::...Selection() in the text above, so it's completely not 
clear that is right names.


So, the only method that really works is ::clearSelection(). And I'm 
getting a little tired of testing code that almost never do what is 
expected. It seems that code is never tried to run and test by 
developer. Code fixing is a kind of random movement with probability 0 
to reach the goal.
I'm also a little tired of explaining (again and again) the idea of 
three selection modes what I've seen in MultiEdit, and what I'd like to use.


If I'll find more regressions than fixes in a few next tests, I'll drop 
the idea of using hbide until I will not find time to develop it myself. 
Though I'm not sure if it will ever happen.



Regards,
Mindaugas
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] Database close during index open failure

2010-05-18 Thread Mindaugas Kavaliauskas

Hi,



Not this time. We do not have any protection against closing WA
from any user code (i.e. key/for/filter/relation expressions or
from error handler) when it's used by RDD code :-(


Yes, I understand the problem. I've used to call DBCLOSEAREA() in my 
error block. This exploits the problem of WA protection against close.


Usually (in applications I've ever developed) the lack of WA protection 
is not a big problem. Do you think it's worth to add WA locking to Harbour?




Anyhow looking at your example I can see that one of them generates
internal error due to illegal value returned by error block.
This is also expected and Clipper compatible behavior.
Here is reduced example you can test also in Clipper:

PROC MAIN()
   ErrorBlock( {|| NIL } )
   BEGIN SEQUENCE
  ? array(0)[1]
   END SEQUENCE
RETURN


I've just used this error block behavior in make a small self contained 
sample. But the only the difference between test203 and test204 was open 
mode (shared vs exclusive), and this difference generates very different 
internal error, so, I've send both sample to indicate memory corruption 
problem.


Since array access is not recoverable error, block should not return at 
all, i.e., it should call BREAK() or __QUIT(). Am I right?



Thanks for your deep tests, regards,
Mindaugas
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] Re: SF.net SVN: harbour-project:[14519] trunk/harbour

2010-05-18 Thread Mindaugas Kavaliauskas

On 2010.05.18 21:12, Pritpal Bedi wrote:

This itiration has caused by not compiling hbQT.


Hmm... Some problem on my side, though recompiling hbqt did not helped. 
Recompiling all Harbour helped. I'm not sure that was the reason of 
this... Sorry.



Some more tests:
1)
   ::toggleColumnSelectionMode()
   Down
   Down
   Right
   Right
   ::toggleColumnSelectionMode()   (cursor changes position!)

2)
   ::toggleColumnSelectionMode()
   Down
   Down
   Right
   Right
   ::toggleColumnSelectionMode()
   Down
   Down
   Down
   Down
   ::toggleStreamSelectionMode()  (cursor jumps a selects blocks)

3)
   ::toggleColumnSelectionMode()
   Down
   Down
   Right
   Right
   ::toggleColumnSelectionMode()
   X (the whole block is filled by character X)

4)
   ::toggleColumnSelectionMode()
   ::clearSelection() (cursor remains unvisible, text not editable. 
Perhaps ::clearSelection shold stop selection process if it is started)



Regards,
Mindaugas
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] Re: SF.net SVN: harbour-project:[14519] trunk/harbour

2010-05-18 Thread Mindaugas Kavaliauskas

On 2010.05.18 21:55, Pritpal Bedi wrote:

Some more tests:
1)
 ...


Once selection process is okayed, I will concentrate on the positioning
of cursor, which, in column selection mode specifically, is out or
order right now.

Please confirm that selection process, programatically and visually,
is correct in every respect.


Negative. See 2) and 4).

Regards,
Mindaugas
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] Re: SF.net SVN: harbour-project:[14476] trunk/harbour

2010-05-17 Thread Mindaugas Kavaliauskas

Hi,



I still can. Screencast at www.dbtopas.lt/hrb/f11.avi



f11.avi clearly indicates that your claim is valid.
But for mysterious reasons I cannot reproduce
it on my machine.

Can you so test after hbQT rebuild ?


It seems hbqt clean rebuild helped. Thank You.



I want implement the following key bindings:
F8
==
   IF ::isMarking()
 ::stopMarking()
   ELSE
 ::setLineSelectionMode()
 ::startMarking()
   ENDIF
 ...

This is possible.
I have tried to compile a macro as above
but probably macro compiler does not support
extended codeblocks, I may be wrong though.

   IF ::isMarking()
 ::stopMarking()
   ELSE
 ::setColumnSelectionMode()
 ::startMarking()
   ENDIF

can be defined as

iif( ::isMarking, ::stopMarking(), ::setColumnSelectionMode() .and.
::startMarking() )
This is not an elegant solution but it can work.


OK, I can write inline IF. I do not care about elegance, but I will not 
use editor until it does not have the functionality I need.
What are the method names in hbide editor, to reach the required 
functionality?



Regards,
Mindaugas
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] SF.net SVN: harbour-project:[14511] trunk/harbour

2010-05-17 Thread Mindaugas Kavaliauskas

Hi,


On 2010.05.17 14:37, dru...@users.sourceforge.net wrote:

 + added to C functions:
  int hb_dynsymToNum( PHB_DYNS pDynSym );
  PHB_DYNS hb_dynsymFromNum( int iSymNum );
   which can be used to make conversion between dynamic symbols and
   numbers


It is interesting, what new code is behind this modifications? :) Remote 
function/method execution or that? :)



Regards,
Mindaugas
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] Re: SF.net SVN: harbour-project:[14476] trunk/harbour

2010-05-17 Thread Mindaugas Kavaliauskas

Hi,


On 2010.05.17 17:05, Pritpal Bedi wrote:

Please examineKeyboad MappingsPublic Methods.
Alternatively you can look into ideshortcuts.prg.
Let me know it more constructs are needed.


I do not find:
  ::startSelection()
  ::stopSelection()
  ::toggleColumnSelectionMode()


Regards,
Mindaugas
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] Re: SF.net SVN: harbour-project:[14476] trunk/harbour

2010-05-17 Thread Mindaugas Kavaliauskas

On 2010.05.17 17:43, Pritpal Bedi wrote:



Mindaugas Kavaliauskas wrote:


I do not find:
::startSelection()
::stopSelection()
::toggleColumnSelectionMode()



There are three methods:

::toggleColumnSelectionMode()
::toggleLineSelectionMode()
::clearSelection()

toggle does not require start/stop constructs.


So, how can I start and end selection?



It manipulated a logical instance variable to switch on/off.

Tell me if it is not sufficient.


No, it's not sufficient:
1)
   ::toggleLineSelectionMode() (starts selection - ok)
   Down
   Down
   ::clearSelection()   (does not stop selection - bad)
   Down

2)
   ::toggleColumnSelectionMode() (selection is not started - bad)
   Down
   Down

3)
   ::toggleSelectionMode() (selection is not started - bad)
   Down
   Down


So, none of 3 selection mode work the way you've suggested, and I want 
to have methods:

  ::startSlection()
  ::stopSelection()
  ::setLineSelectionMode()
  ::setColumnSelectionMode()
  ::setStreamSelectionMode()
or some way to make these actions using existing methods.


Regards,
Mindaugas
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] SF.net SVN: harbour-project:[14511] trunk/harbour

2010-05-17 Thread Mindaugas Kavaliauskas

Hi,



It is interesting, what new code is behind this modifications? :)
Remote function/method execution or that? :)


Yes. I've wrote inproc OLE server for Harbour and it uses above
functions to convert function/method/memvar symbols to DISPID in
GetIDsOfNames() dispatch method and they are later converted back
to symbols in Invoke() method.
I've finished the code but I have no idea if it works or not.
I've wrote everything using only documentation in the internet
and haven't made any real life test so far so I do not want to
make it public it yet.


Perhaps one of the most amazing things is how can you write software 
without testing!!! :) Usualy I can not write more than 30 lines of code 
without trying to run it.




The idea is to create library which can be used by users to
easy create own OLE servers. My current code should fully
emulate the xHarbour.com ole server API:
http://xharbour.com/index.asp?page=add_on_oleservershow_sub=7show_i=1


Very old time ago, after I've seen it. It looked a little strange to me. 
Why the whole application is presented as a single object? This allows 
to call all public functions from external code. I thought it is more 
common to create some Harbour level object and share it via OLE server, 
thus making methods and properties of OLE object to be methods and 
properties of Harbour object (instead of public functions and memvars of 
Harbour application).



Regards,
Mindaugas
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] SF.net SVN: harbour-project:[14482] trunk/harbour

2010-05-15 Thread Mindaugas Kavaliauskas

Hi,

On 2010.05.15 11:32, dru...@users.sourceforge.net wrote:

 * use hb_oleDispInvoke() - please test if activex controls still work
   correctly


I do not use ActiveX, so no chance to test, but line olecore.c#1091 
could be changed to:

  if( pParams-rgvarg[ iCount - i ].n1.n2.vt  VT_BYREF  ii  iRef )
for additional protection in case of more than 32 parameters by reference.


Regards,
Mindaugas
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] SF.net SVN: harbour-project:[14476] trunk/harbour

2010-05-15 Thread Mindaugas Kavaliauskas

Hi,


On 2010.05.15 00:36, vouch...@users.sourceforge.net wrote:

 % Many artifacts belonging to horizontal scroll while
   text is selected. Also few aspects are optimized.

 To me it appears as if selection protocol in hbIDE is OK.
 Please post your experiences if something is not upto the
 expectations.


1) Line selection mode excludes last line after selection is finished. Test:
  F11
  Down
(two lines are marked - it's OK)
  F11
(Last line is not marked any more - bad)

2) line marking display artifact
  In previous test after making is ended pressing F11, selection 
indication is changed: blue selection area starts not from start of line 
(a few pixels right), on last line there is a few pixel selection before 
the first character of the line. Maybe it is intentional and I do not 
understand the idea, but I expect selection to remain indicated the same 
way as during marking, i.e. F11 press (ending marking) should not 
visually change selection. Though I can live with this.


3) Block forget about makting mode on paste
Test (continuation of previous test):
  Ctrl+C  (one line copied to clipboard)
  move cursor to the middle of any line
  Ctrl+V (line is pasted in a stream mode instead of line mode - bad)

4) Persistent selection does not work if a use a mouse to position 
cursor. Test:

   F11
   Down
   Down
   F11
   Position cursor before the block using mouse
   Position cursor after the block using mouse
(block is not selected any more - bad)

5) Block selection does not work. Test:
   Position cursor using mouse somewhere in the top of the visible text 
page

   F11
   Down
   Down
   F11 (block is not selected - bad)

6) Could not find a button to start column block marking

7) Stream selection changes selection end position
   Shift (press and do not release)
   Up
   Up
   Right
   Right
   Right
   ...  (end of selection is changed, right arrow changes not only 
start selection by one character to right, but also end of selection - bad)



I guess I can find many more. It seams that code was not tested at all 
(all these there found just by trying to mark any block the most simple 
way without any deeper tests).



Thank You, for your efforts,
Regards,
Mindaugas
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] Re: SF.net SVN: harbour-project:[14476] trunk/harbour

2010-05-15 Thread Mindaugas Kavaliauskas

Hi,



Can you please check after r14491.



3) Block forget about makting mode on paste
Test (continuation of previous test):
Ctrl+C  (one line copied to clipboard)
move cursor to the middle of any line
Ctrl+V (line is pasted in a stream mode instead of line mode - bad)


Now line block remembers its mode, but Ctrl+C, Ctrl+V overwrites lines 
on paste. Normally Paste operation inserts new text, but do not 
overwrites text.



4) Persistent selection does not work if a use a mouse to position
cursor. Test:
 F11
 Down
 Down
 F11
 Position cursor before the block using mouse
 Position cursor after the block using mouse
  (block is not selected any more - bad)


Same problem remains.



6) Could not find a button to start column block marking

It is Toggle Selection Mode icon on the main toolbar.
It toggle between Stream and Column/Line.


But I want to have 3 different buttons to start 3 different marking 
modes. Can I do it using Setup-Key mappings? Actually, I do not 
understand why 3 modes is switched using 2 state button. Read my 
previous mail about expected block marking behaviour.



7) Stream selection changes selection end position
 Shift (press and do not release)
 Up
 Up
 Right
 Right
 Right
 ...  (end of selection is changed, right arrow changes not only
start selection by one character to right, but also end of selection -
bad)


This now make even more strange selection and select not continuous 
block of text. X character indicate selected text:


XXX
XXX
XXX
  X

8) Two selections:
  F11
  Down
  F11
  Down
  Down
  Shift + Down


Regards,
Mindaugas
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] Re: SF.net SVN: harbour-project:[14476] trunk/harbour

2010-05-15 Thread Mindaugas Kavaliauskas

Hi,

On 2010.05.16 02:13, Pritpal Bedi wrote:

4) Persistent selection does not work if a use a mouse to position
cursor. Test:
  F11
  Down
  Down
  F11
  Position cursor before the block using mouse
  Position cursor after the block using mouse
   (block is not selected any more - bad)


Same problem remains.


I cannot reproduce. Can you try again after r14500 ?


I still can. Screencast at www.dbtopas.lt/hrb/f11.avi



6) Could not find a button to start column block marking

It is Toggle Selection Mode icon on the main toolbar.
It toggle between Stream and Column/Line.


But I want to have 3 different buttons to start 3 different marking
modes. Can I do it using Setup-Key mappings? Actually, I do not
understand why 3 modes is switched using 2 state button. Read my
previous mail about expected block marking behaviour.



As I stated in the ChangeLog earlier, I want to keep affinity
with xMate rather than MultiEdit and has informed that this toggling
I will retain as is implemented now. However a function is provided
already in public API ::toggleCurrentLineHilight().


Great, but I would like to have a possibility to implement MultiEdit way 
using key binding macro. I guess hbide should be flexible enough to do 
this.


In the code below I've used method with descriptive names. Can you tell 
me is such methods exists in current hbide code, or can you implement 
such basic methods for managing marking operations?


I want implement the following key bindings:
F8
==
 IF ::isMarking()
   ::stopMarking()
 ELSE
   ::setLineSelectionMode()
   ::startMarking()
 ENDIF

Ctrl+F8
===
 IF ::isMarking()
   ::stopMarking()
 ELSE
   ::setStreamSelectionMode()
   ::startMarking()
 ENDIF

Shift+F8

 IF ::isMarking()
   ::stopMarking()
 ELSE
   ::setColumnSelectionMode()
   ::startMarking()
 ENDIF


9) Two selections are joined
   Shift press
   Down
   Down
   Shift release
   Down
   Down
   Shift press
   Down
   Down
   Shift release


Regards,
Mindaugas
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] SF.net SVN: harbour-project:[14461] trunk/harbour

2010-05-12 Thread Mindaugas Kavaliauskas

Hi,


On 2010.05.12 03:27, dru...@users.sourceforge.net wrote:

   + harbour/src/rtl/hbcom.c
 + added Harbour multiplatform serial port C API (hb_com*() functions).
   implemented code for *nixes, MS-Windows and OS2. DOS is not supported
   yet. Please make test on different platforms.


Thanks for one more great piece of code!!! I didn't know than COM port 
has so many flowcontrol options!


I has a code that seems does not fit under the new code. I have a simple 
button (well, there is a RS-latch to avoid contact bouncing) and I need 
to record time when the button is pressed. Button is connected to DSR 
(or CTS), so I need some way to monitor this register and obtain some 
kind of interrupt on delta DSR (or CTS). I do this using SetCommMask() 
and WaitCommEvent() under Win32. Is it possible to have some 
multiplatform way to get this functionality?



Regards,
Mindaugas
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


[Harbour] :__enumKey()

2010-05-12 Thread Mindaugas Kavaliauskas

Hi,


perhaps this is a known issue, but looks like a strange limitation of 
__enumKey() message. This code could not be compiled because of:


test202.prg(5) Warning W0031  Invalid variable 'XVALUE' for enumerator 
message


FUNC main()
LOCAL xValue
  FOR EACH xValue IN {'a'='A', 'b'='B'}
? xValue:__enumKey()
? EVAL({|| xValue:__enumKey()})
  NEXT
RETURN NIL


Regards,
Mindaugas
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] SF.net SVN: harbour-project:[14461] trunk/harbour

2010-05-12 Thread Mindaugas Kavaliauskas

Hi,


On 2010.05.12 16:04, Przemysław Czerpak wrote:

I has a code that seems does not fit under the new code. I have a
simple button (well, there is a RS-latch to avoid contact bouncing)
and I need to record time when the button is pressed. Button is
connected to DSR (or CTS), so I need some way to monitor this
register and obtain some kind of interrupt on delta DSR (or CTS).
I do this using SetCommMask() and WaitCommEvent() under Win32. Is it
possible to have some multiplatform way to get this functionality?


I'm afraid it will be hard to implement it for all platforms.
It needs direct hardware access to set interrupt on DSR (or CTS) line
...
I do not see
any way to make implement it for POSIX systems using termios.
Such extension had to be implemented in non standard way sometimes
even using root privileges.


I've very surprised :( I expected to be some way to wait for line change 
event in POSIX/UNIX/Linux. I just guessed that there is a way to make 
line change to emit error condition, ex.,

   ioctl(fd, TIO_ERROR_ON_CHANGE, TIO_DSR));
and use select(,,, efds). After select returns you can check the new 
state of lines and decide which lines was changed.


So, what could be an effective way to implement a simple button on RS232 
DSR pin? I still could not imagine that polling MSR every 0.01 second is 
the recommended way...



Regards,
Mindaugas
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] SF.net SVN: harbour-project:[14461] trunk/harbour

2010-05-12 Thread Mindaugas Kavaliauskas

Hi,


On 2010.05.12 16:21, Mindaugas Kavaliauskas wrote:

I've very surprised :( I expected to be some way to wait for line change
event in POSIX/UNIX/Linux. I just guessed that there is a way to make
line change to emit error condition, ex.,
ioctl(fd, TIO_ERROR_ON_CHANGE, TIO_DSR));


Looking to Wine source I found some text about TIOCMIWAIT, the sad part 
of story is that it says: TIOCMIWAIT is not adequate and Wine uses 
10ms pooling to emulate Windows behaviour, see: 
dlls/ntdll/serial.c:wait_for_event()


Google finds some samples of code that implements
   ioctl( fd, TIOCMIWAIT, wait_mask ),
ex.:
http://www.linuxquestions.org/questions/programming-9/serial-port-programming-285597/
http://www.dslreports.com/forum/r21801613-Linux-Interrupt-based-on-serial-port-pin


Regards,
Mindaugas
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] [r|s]ddoci

2010-05-12 Thread Mindaugas Kavaliauskas

Hi,


On 2010.05.12 17:11, Horodyski Marek (PZUZ) wrote:

When I try mix link ODBC and OCI i one app ( via ODBC still connet to 
MSSqlServer) :

REQUEST SDDODBC, SDDOCI, SQLMIX

libs=sddoci sddodbc

Have I :

Generating C source output to 'C:\TEMP\test1.c'... Done.
c:/harbour/lib/win/mingw/libsddodbc.a(sddodbc.o):sddodbc.c:(.text+0xc4): 
undefined reference to `sqlfe...@4'


And what errors do you get with sddodbc and without sddoci?



Can I mix this lib ?


Yes.


Regards,
Mindaugas

___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] Slow create index under threads

2010-05-11 Thread Mindaugas Kavaliauskas

Hi,



Please could you tell me how to create the index in memory and then
flush to disk?


OrdCreate(mem:file.ext, ...)

I've sent C code for copying file from/to memory a few days ago.



These crea() threads do not help to do any valuable job. Function
aCreateIndexe() starts a separate crea() thread for each index tag,
but indexes are not created in parallel, because only one thread has
attached area.


Is it possible to improve this aspect?


You can copy body of crea() into aCreateIndexe() and do not create a 
separate thread. It will save a small overhead of thread 
creation/synchronization, but it will be not significant.




Under Windows, usndo ProcessXP, I could see the threads of the indices
only run one at a time, while the rest is waiting 


Of cause. Did you expect your code to behave in a different way?...


Regards,
Mindaugas
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] Slow create index under threads

2010-05-11 Thread Mindaugas Kavaliauskas

Hi,


On 2010.05.11 18:52, rafa wrote:

Second;
A question
What advantages are there in using indexes MEMORY?


Rafa, you've completely changed the original idea:
 OrdCreate(mem:file.ext, ...)
 I've sent C code for copying file from/to memory a few days ago.
 Ok, thanks!
 I add MEMORY a command INDEX , And I'll post later the results on
 indices of memory.

INDEX ... MEMORY is completely different thing from 
OrdCreate(mem:file.ext)



Regards,
Mindaugas


___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] Slow create index under threads

2010-05-10 Thread Mindaugas Kavaliauskas

Hi,


On 2010.05.10 12:20, rafa wrote:

Well, times;
1 thread= 29 minutes THE WINNER!
4 threads  = 93 minutes WoW!
7 threads  = 68 minutes
5 Threads = 64 minutes


It seems disk io is the bottle neck. You can try to use memio driver to 
create index in memory, and later write it back to disk.




aadd( aThreads, hb_threadStart( @crea(), cAlias,cExpr,
cFileNtx, cFor, nPos, nPosLinea ) )
...
proc crea( cAlias, cExpr, cFileNtx, cFor, nPos, nPosLinea )
   Local nContador := 1

hb_dbRequest( cAlias, , , .T.)  // Restaura el alias
if empty( cfor )
INDEX ON(cExpr) TO(cFileNtx) ;
...
endif
hb_dbDetach( cAlias )  // Libera el alias
return


These crea() threads do not help to do any valuable job. Function 
aCreateIndexe() starts a separate crea() thread for each index tag, but 
indexes are not created in parallel, because only one thread has 
attached area.



Regards,
Mindaugas
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] Re: SF.net SVN: harbour-project:[14434] trunk/harbour

2010-05-07 Thread Mindaugas Kavaliauskas

Hi,


On 2010.05.06 21:46, Pritpal Bedi wrote:

I need your valuable input exactly how must these behave in
different circumstances. You also update me if the selection behavior is
upto expectations or not. Also please check for all three variants
I committed r14440.

Also explain a little why these copy operation must not be
posted to clipboad. I am in a position to keep copy information
to me only but before I proceed I should know the relevant facts.


I'll try to define, the way it works in MultiEdit:

There is one global setting, that affects block behaviour of all tree 
block types:

  [x] Persistent blocks
Of cause we can implement persistent a separate persistent option for 
each type (line, stream, column) of blocks, but I do not thing anyone 
will need it.


There are separate operations (I also indicate default key shortcut for 
it, but all these shortcuts can be redefined):

  Mark Line(F7, starts line block marking)
  Mark Stream  (Ctrl+F7, starts stream block marking)
  Mark Column  (Shift+F7, starts column block marking)
  End Marking  (any of keys F7, Ctrl+F7, Alt+F7 ends marking)
  Marking Off  (Ctrl+Shift+F7)

  Copy block   (F8, copies block to current position)
  Move block   (Shift+F8, moves block to current position)
  Delete block (Ctrl+F8, deletes block)
  Copy (Ctrl+C, copies block to clipboard)
  Cut  (Ctrl+X, moves block to clipboard)
  Paste(Ctrl+V, pastes from clipboard to current position)

That's all basic idea.

More advanced settings:
[x] Turn block highlight off after paste   (default: checked)
[ ] Turn block highlight off after copy(default: unchecked)
[x] Shift+Up/Down begins line block(default: checked, i.e., 
Shift+Up/Down starts line block marking, Shift+Left/Right starts stream 
block marking. Otherwise (if unchecked) all Shift+Arrows starts stream 
block marking)


and many more.


Mouse marking: in the process of marking, before left mouse button is 
released, the right button changes block type: 
stream-line-column-stream-...


The wrong concept of current behaviour:
  - there is no concept of current marking mode for keyboard 
operations before marking is started (only mouse marking remembers the 
last marked block type). Different marking modes are selected by 
different keys. So, there is no need to have toolbar button Column 
blocks (or we should have 3 buttons: Mark line, Mark Stream, Mark Column).
  - block is copied (including copy-paste operations via clipboard) in 
the same mode as was created, i.e., column blocks are pasted as column 
blocks, etc.

  - all block markings has the same blue color
  - line and stream blocks are hilited beyond end of line, not until 
the last character of line (this is not very important)




Regards,
Mindaugas
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] SF.net SVN: harbour-project:[14434] trunk/harbour

2010-05-06 Thread Mindaugas Kavaliauskas

Hello,



 + Implemented: line selection mode. Designated key is F11.
   It is still a work in progress but a working prototype is there and
   currently selection is available and paste behaves the standard way.

   Mindagaus, please explore as the artifacts are OK.


My name is Mindaugas.


The most strange behaviour is that block forget about its mode. I mean, 
line blocks usually are pasted as line blocks, stream blocks as stream 
block, and column blocks as column.


In current code paste depends on toolbar button, but not on the block 
creation mode.


This should be very easy to implement for copy block and move block 
operations. Since you do not need to copy block to clipboard at all. I 
do not know how this is solved in MultiEdit in case of clipboard 
copy-paste. Maybe ME saves block mode to some variable and uses 
SetClipboardData(, NULL), WM_RENDERFORMAL way to determine, if pasted 
block is copied to clipboard by itself.



Regards,
Mindaugas
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] SF.net SVN: harbour-project:[14426] trunk/harbour

2010-05-04 Thread Mindaugas Kavaliauskas

Hi,


On 2010.05.04 13:35, Viktor Szakáts wrote:

but not change the clipboard !


I agree.

Though it's even better to make the error text selectable and
copiable. This is how it's done in all modern tools. No need
to reinvent anything here.


Do you know that Windows' MessageBox has copy function? Just press 
Ctrl+C. This works in Qt also. The error message I've sent a few days ago:


---
Run-time Error!
---
Error BASE/1132  Bound error: array access
Called from HBQTUI:Q_TABLEFUNCLIST(0)
Called from IDEFUNCTIONS:BUILDHEADER(210)
Called from IDEFUNCTIONS:CREATE(146)
Called from HBIDE:CREATE(356)
Called from MAIN(102)
---
OK
---


was copy-pasted.


Regards,
Mindaugas
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] Re: SF.net SVN: harbour-project:[14417] trunk/harbour

2010-05-04 Thread Mindaugas Kavaliauskas

Hi,



I have just realized that blocks are not copyable to other file.
Will fix in a while. Moving the block is something new to me and is easy.
Which key should be designated to move, Ctrl+M ?


I do not know the correct key mappings for various operations. It is a 
question of mappings, but I think it's enough to make all actions 
mappable and prepare a few sets of mappings. Let's say: MultiEdit 
compatible, xMate compatible, and common Windows key mapping. If move 
block has not key in common windows applications (because native windows 
controls does not have persistent blocks), we can leave move block 
operation unassigned.




One block per file can remain persistent until a navigation key is not
presses.


The idea of persistent block is that block remains marked after 
navigation keys are pressed!




Line blocks marks whole lines, so, you do not need to move cursor to the
first column.


Ok, got it. Is easy to implement. But again it is an issue when to
deactivate.
I will think over this issue.


If persistent block mode is switched off, blocks is deactivated/unmarked 
after any cursor movement. If persistent block mode is switch on, there 
is a special unmark operation. If is Ctrl+Shift+F7 in standard MultiEdit 
key mapping. But I usually unmark block by Shift+Up,Down, i.e. by 
marking another empty block.




  * contrib/hbqt/hbqt_hbqplaintextedit.cpp
  * contrib/hbqt/hbqt_hbqplaintextedit.h
  * contrib/hbide/ideeditor.prg
  * contrib/hbide/ideshortcuts.prg
+ Implemented: persistent blocks and cut/copy/paste operations
  across files and locations within the same file.


Perhaps this is implemented in .cpp level only yet. I can not find a way 
to switch persistent block mode on.



Thanks, regards,
Mindaugas

___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] Re: SF.net SVN: harbour-project:[14417] trunk/harbour

2010-05-04 Thread Mindaugas Kavaliauskas

Hi,


On 2010.05.04 16:31, Pritpal Bedi wrote:

 + Implemented: persistent blocks and cut/copy/paste operations
   across files and locations within the same file.


Perhaps this is implemented in .cpp level only yet. I can not find a way
to switch persistent block mode on.


If I am taking it in right perspective, persistent block means a selected
area
remains selected until another block operation is initiated, right ?
If yes, then this is exactly how it is implemented now.

To illustrate:
1. Select a block either with Sh+NavableKeys or mouse.


OK.


2. Get cursor out of this area either by clicking at the other row or with
arrows keys.


After any cursor movement, block is not marked any more :( I've rebuild 
the whole contrib, and hbide. Maybe I have to do something more?



Regards,
Mindaugas


___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] Re: SF.net SVN: harbour-project:[14417] trunk/harbour

2010-05-04 Thread Mindaugas Kavaliauskas

Hi,

On 2010.05.04 16:58, Pritpal Bedi wrote:

After any cursor movement, block is not marked any more :( I've rebuild
the whole contrib, and hbide. Maybe I have to do something more?

This is valid for block selection mode.
Stream selection does not have it.
If it is block selection mode, it is persistent, I have again checked it,
and behaves correct. No other setting is required except that
Toggle Selection Mode icon should be visible depressed.

Please let me know my observation is ok or not.


OK, I've understood the misunderstanding.

I just call selection modes:
1) Line
2) Stream
3) Column

In all 3 cases the selected part of is called block. In this case 
selection is a synonym to selected block or just block. Just look 
at Menu-Edit-Block. I expect these actions to be valid for all 
selection modes, not only column blocks. I guess you understand word 
block the same way, because these menu items were implemented before 
column blocks.


So, it would nice to have persistent blocks for all three selection 
modes. Though, I guess, this requires some tricks like subclassing at 
C++ level, etc.



Regards,
Mindaugas
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] Re: SF.net SVN: harbour-project:[14417] trunk/harbour

2010-05-04 Thread Mindaugas Kavaliauskas

On 2010.05.04 18:02, Pritpal Bedi wrote:

Line Block:  does it pertains to a single line always ?


Yes, if I understand your question. Starting and ending line selection 
mark (without any cursor movement), marks current line.
If DOWN (or UP) is pressed between start mark and end mark, then two 
lines are selected.



Regards,
Mindaugas
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] HBNetIO file functions

2010-05-04 Thread Mindaugas Kavaliauskas

Hi,

On 2010.05.04 17:30, Alex Strickland wrote:

Maybe this small test will help someone to see how easy it is to read
and write non DBF files using netio RPC.


The primary purpose of NETIO was file sharing, so, it supports this 
functionality even without RPC and without any Harbour level overhead.


Here is a sample code, how I copy data.dbf to MEMIO for a much faster 
report generation using memory file instead of (possibly remote) file. 
If you change data.dbf to net:data.dbf you'll have a function to 
NETIO file to MEMIO file.



   pFile = hb_fileExtOpen( data.dbf, NULL, FO_READ | FO_DENYNONE | 
FXO_DEFAULTS, NULL, NULL );

   if( pFile )
   {
  if( hb_fileLock( pFile, 0, ( HB_FOFFSET ) -1, FL_LOCK | 
FLX_EXCLUSIVE ) )

  {
 pFileTo = hb_fileExtOpen( mem:data.dbf, NULL, FO_READWRITE | 
FO_EXCLUSIVE | FXO_TRUNCATE | FXO_DEFAULTS, NULL, NULL );

 if( pFileTo )
 {
ulPos = 0;
pBuffer = hb_xgrab( 1048576 );
while( ( ulCount = hb_fileReadAt( pFile, pBuffer, 1048576, 
ulPos ) )  0 )

{
   hb_fileWriteAt( pFileTo, pBuffer, ulCount, ulPos );
   if( ulCount != 1048576 )
  break;
   ulPos += 1048576;
}
hb_fileClose( pFileTo );
 }
 hb_fileLock( pFile, 0, ( HB_FOFFSET ) -1, FL_UNLOCK );
  }
  hb_fileClose( pFile );
   }


If your next question is about, why IO API is not directly accessible 
via Harbour level functions, the answer is: because IO API functionality 
is not as wide as all Harbour level functions. So, many Harbour 
functions could not be redirected via IO API.



Regards,
Mindaugas
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] SF.net SVN: harbour-project:[14417] trunk/harbour

2010-05-03 Thread Mindaugas Kavaliauskas

Hi,


thanks for this feature. It made me try to compile hbide after long 
time, but:

---
Run-time Error!
---
Error BASE/1132  Bound error: array access
Called from HBQTUI:Q_TABLEFUNCLIST(0)
Called from IDEFUNCTIONS:BUILDHEADER(210)
Called from IDEFUNCTIONS:CREATE(146)
Called from HBIDE:CREATE(356)
Called from MAIN(102)
---
OK
---


Regards,
Mindaugas


On 2010.05.03 01:36, vouch...@users.sourceforge.net wrote:

   * contrib/hbide/ideeditor.prg
 + Implemented: much-awaited and extremely-required feature - block 
copy/paste.

___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] Re: SF.net SVN: harbour-project:[14417] trunk/harbour

2010-05-03 Thread Mindaugas Kavaliauskas

Hi,



This error can only be there if hbide/resources/funclist.uic
is missing. I know your uncanny attention to details and hence
assume that you have compiled hbIDE at its standard location.
OR you are executing hbIDE from location without resources
subfolder and contents to from hbIDE.exe.


Yes, I've just copied hbide.exe into qt bin directory, because this 
directory is not in the path and qt*.dlls are not found otherwise. Long 
time ago this worked for me. I see no problem, that hbide requires some 
more external resources, but infomative message would be better than 
RTE. I guess Viktor has just committed the fix.


Thanks, for column blocks! Do you have plans for doing blocks persistent 
and implementing line blocks? :)


Ok, I can live without persistent blocks and line blocks, but a few 
things is very uncomfortable (or I do not know how to configure it):


1) ESC closes current window. Can I attach Ctrl+F4 for this action 
instead of ESC?
2) I'm trying to use Setup-Keyboard mappings, but unable to find a way 
to assign key for many toolbar buttons. I want to add key for Toggle 
selection mode button.
3) I want to be able to move cursor beyond end of line, i.e., I do not 
want to jump cursor to first column on empty lines and I do not want to 
enter a lot of spaces for indented source code lines. END key could be 
used, to position cursor at the exact end of line.



Regards,
Mindaugas
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] Re: SF.net SVN: harbour-project:[14417] trunk/harbour

2010-05-03 Thread Mindaugas Kavaliauskas

Hi,


On 2010.05.04 00:07, Pritpal Bedi wrote:

Thanks, for column blocks! Do you have plans for doing blocks persistent
and implementing line blocks? :)

Can you please explain a little about your idea of persistency and line
blocks.


Persistent blocks remains marked after you move a cursor to another 
place. You can mark block. Move cursor to another place and copy (or 
move) block here without intermediate storage to clipboard. You can have 
marked blocks in various open files and do inter-window block copy/move 
of blocks.


Line blocks marks whole lines, so, you do not need to move cursor to the 
first column.


MultiEdit has tree types of blocks: Line, Stream, Column. It also 
supports persistent blocks.


Let's say I need to change code:
   CASE 'a':
  ::doA()
  EXIT
  ::doB()
  EXIT
to:
   CASE 'a':
  ::doA()
  EXIT
   CASE 'b':
  ::doB()
  EXIT
and my cursor is at letter 'a':

In MultiEdit I would do:
  F7 (start line block mark)
  F7 (end line block mark) (current line remains marked)
  Down
  Down
  Down
  F8 (copy block)
  b
  Del

Using stream blocks:
  Home
  Shift + Down
  Ctrl + C
  Down
  Down
  Ctrl + V
  End
  Left
  Left
  Left (position restored to letter 'a')
  b
  Del

I think MultiEdit has free 30-days evaluation. I really like 
functionality of this editor. Default functional keys mappings can seem 
unusual, but later you find it comfortable.




2) I'm trying to use Setup-Keyboard mappings, but unable to find a way
to assign key for many toolbar buttons. I want to add key for Toggle
selection mode button.

Ok, it is also a candidate for public methods API.
It will and some others will be committed today.


I've managed to bind keystoke to script:
  ::execAction(SelectionMode)
Though I expect a litte different logic for block marking. It would be 
nice to have a separate keys, to start different type marking. But I can 
live with current behaviour.




3) I want to be able to move cursor beyond end of line, i.e., I do not
want to jump cursor to first column on empty lines and I do not want to
enter a lot of spaces for indented source code lines. END key could be
used, to position cursor at the exact end of line.


This is a very tough request. Only for this reason, block copy/paste
eluded me so long. I still do not know how to handle it unless QDocument
is also sub-classed. This is on my todo list but am still at loss how to.
Probably I have to spend more time on this feature.


Thank, you for your efforts. After I look to C++ code, magic QT 
signal/slot binding, moc_*.cpp files, I start to think I know nothing 
about C++. Plain C is much more clear to me.




This can be achived right now:
Name: Close
Key:   F4
CtrlChecked
Script:  ::close() [ Or double click on Close() 'Public methods' list. ]

Click on New

To test:
Click inside an editing instance; press Ctrl+F4
You are done with.


But this does not disables ESC action. Sometimes I press extra ESC then 
closing a few level modal dialogs, etc. And this ESC closes open files.



Thanks, regards,
Mindaugas
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] Removal of non-UNICODE Windows codepath?

2010-04-30 Thread Mindaugas Kavaliauskas

Hi,


I see no problem for Win 3.x and Win32s, we still have customers with 
Win9x. Many of the projects are contained in the only .exe file, so 
requirement of extra .dll is not nice. One more thing is that my 
libraries are non-UNICODE, but I do not see a big reason to do rewrite a 
working piece of code until HVM internals does not allow to contain 
multi-language strings and rewrite do not add new fuctionality.


Maybe some macros like HB_PARSTR() can help to implement a good layer 
for UNICODE/non-UNICODE versions of app. It can help to make code clean 
and easy maintainable.



Regards,
Mindaugas


On 2010.04.29 15:13, Viktor Szakáts wrote:

If that simplifies things (which it definitely does), and
the majority of developers agree with it, we can drop
non-UNICODE mode altogether from Harbour source code.

It's unlikely we shall ever support Windows 3.x or Win32s,
and unicows solution works just perfect now to cover Win9x/ME
host versions, so I can see no hard reason to maintain duplicate
code paths for both UNICODE and non-UNICODE Windows API
support.

Having only UNICODE path could greatly simplify code in
many crucial points, making it easier to maintain,
extend, debug and keep bug free. Especially if we want
to move towards internal (HVM) unicode support in the
future.

Any opinions on this?

___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] SF.net SVN: harbour-project:[14415] trunk/harbour

2010-04-30 Thread Mindaugas Kavaliauskas

Hi,


On 2010.04.30 12:39, dru...@users.sourceforge.net wrote:

 + added support for communication streams/channels which allow to
   send asynchronously data from server to client.
   The following client side functions had been added:
  NETIO_OPENDATASTREAM(cStreamFuncName  [,params,...] )
 -  nStreamID
  NETIO_OPENITEMSTREAM(cStreamFuncName  [,params,...] )
 -  nStreamID
  NETIO_CLOSESTREAM(nStreamID, [cServer], [nPort] )
 -  lOK
  NETIO_GETDATA(nStreamID, [cServer], [nPort] )
 -  aData  |cData  | NIL
   The following server side functions had been added:
  NETIO_SRVSTATUS(pConnectionSocket  [,nStreamID] )
 -  nStatus
  NETIO_SRVSENDITEM(pConnectionSocket,nStreamID,xData  )
 -  lSent
  NETIO_SRVSENDDATA(pConnectionSocket,nStreamID,cData  )
 -  lSent


Thank You for another great piece of code. I'm trying to understand the 
ideas of this.


In case of item stream, received items are buffered on client side and 
NETIO_GETDATA() return array of items. In case of char stream, data is 
concatenated and NETIO_GETDATA() return a single stream. Function 
NETIO_GETDATA() is not blocking function and returns NIL if no data are 
received. Am I right?


You've mentioned in the past, that these communication streams allows 
server application to give access to local resources like COM ports, 
etc. In most cases, f.e. COM port, communication is bidirectional, but I 
found communication stream unidirectional (from server to client). How 
do you suggest to do data transfer in the opposite direction?


In the sample code, the communication streams are closed after 
NETIO_DISCONNECT(). Is data transfer allowed in between of 
NETIO_DISCONNECT() and NETIO_CLOSESTREAM() calls?


Are connection stream ids unique among multiple connection? As far as I 
can see, each connection has it's own connection ideas, and this 
requires to use additional cServer and nPort parameters to distinguish 
different connections.
I see s_fileGetConnParam(), hb_socketResolveAddr(), s_fileConFind() in 
NETIO_GETDATA(). Isn't this a bottleneck for applications what needs a 
lot of data transfers? The same question for RPC calls.



Thanks again, regards,
Mindaugas
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] Re: CLASSES - Instance Variable as Object - Access/Assign Elsewhere

2010-04-23 Thread Mindaugas Kavaliauskas

Hi,


On 2010.04.23 20:45, Pritpal Bedi wrote:

I am just asking, which ChangeLog entry after 15 Mar
highlighted this difference.


Any. Any entry can change code size, this affect memory allocation, 
addresses of functions, and makes bug be visible or hidden.




Based on this alone, I am about to remove a lot of INLINE calls
from hbXBP.


It's good practice to save one more Harbour VM stack frame, but it has 
nothing to GPF.




I already told, I have removed all calls to inline access/assign and
everything is working fine without changing anything in other C code.


So, you've just hidden the bug instead of trying to find it. One more 
time bomb.
Try to not forget about this change. It is possible that after two years 
you'll be able to solve one more (actually the same) GPF problem by 
reintroducing INLINE methods :)



Regards,
Mindaugas
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] SF.net SVN: harbour-project:[14363] trunk/harbour

2010-04-22 Thread Mindaugas Kavaliauskas

Hi,


thanks for suggestion. The previous code was based on ADS documentation. 
It does not mention that VFP supports D,4 fields.



Regards,
Mindaugas


ADS should support in DBF (at least in VFP mode) julian date fields
as 32bit little endian integer values {D, 4, 0} which do not use
string representation.
As I can see your modification effected also such fields.
I think that you should change the condition from:

pArea-iFileType != ADS_ADT

to:
pField-uiLen == 8

or
pField-uiLen != 4

(AFAIR uiLen == 3 in ADS DBFs is SIX3 packed date with the same
restrictions as string version)

___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] Error with dBUseArea(...) with rddsql (sddodbc) withmysql ???

2010-04-08 Thread Mindaugas Kavaliauskas

On 2010.04.08 12:56, Horodyski Marek (PZUZ) wrote:

I continue to test sddodbc with mysql  for adding a BIGINT field ...but
error comes out :
*-
Hi Shum,

I too have trouble with new type in MS SQl.
Advice from Mindaugas, try change in fil\harbour\contrib\rddsql\sddodbc\odbcdd.c

Fe.:
║319│  switch( iDataType )
║320│  {
║321│ case SQL_CHAR:
║322│ case SQL_VARCHAR:
║323│ case SQL_LONGVARCHAR:
║324│ case -8:
║325│ case -9:
║326│   pFieldInfo.uiType = HB_FT_STRING;
║327│   break;


Hi,


1) -8 and -9 are SQL_WCHAR and SQL_WVARCHAR. It is not related to BIGINT.

2) BIGINT support was added 2010-04-07.

3) SQL_WCHAR and SQL_WVARCHAR are already in SVN from 2009-11-17, so, no 
changes are required.



Regards,
Mindaugas
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] Error with ODBC under rddsql (sddodbc) ...

2010-04-06 Thread Mindaugas Kavaliauskas

I try to test dBUseArea() with DBFCDX RDD  and  SQLMIX RDD ...
Since I cannot test the test2.prg under \hb20\contrib\rddsql\sddodbc\tests
I modify test2.prg into tstmysql.prg as follow:
However the line:   ? dBUseArea( .T., sqlmix, SELECT * FROM country,
country, .T., .F.)
with error comes out :
http://www.mingyik.com/dnload/tstodbc10.jpg
http://www.mingyik.com/dnload/tstodbc20.jpg


Hi,


you error screen shows the reason of error. SDDODBC/1906 means statement 
allocation error. Your sample generates error on dbusearea(), but does 
not generates error on RDDINFO(RDDI_EXECUTE,), though both actions do 
statement allocation. Current code uses mixed statement allocation:

  SQLAllocStmt() in RDDI_EXECUTE
and
  SQLAllocHandle( SQL_HANDLE_STMT, )  in DBUSEAREA()

Microsoft says: In ODBC 3.x, the ODBC 2.x function SQLAllocStmt  has 
been replaced by SQLAllocHandle.


Can you test sddodbc.c, by changing line #339 from
   if ( ! SQL_SUCCEEDED( SQLAllocHandle( SQL_HANDLE_STMT, 
pSDDConn-hConn, hStmt ) ) )

to
   if ( ! SQL_SUCCEEDED( SQLAllocStmt( pSDDConn-hConn, hStmt ) ) )
?

If this helps, we will need some additional compile switches to use 
different ODBC API version.




Regards,
Mindaugas
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] mingw MT mode performance

2010-04-01 Thread Mindaugas Kavaliauskas

Mindaugas any chance that you can check the code generated by MSVC
which access thread local variables for wi...@32 and Win64?


I do not have any Win64 disassembler, but I think I can do some reverse
engineering by hand (and brain) :)


http://en.wikipedia.org/wiki/X86-64
Instead of FS segment descriptor on x86 versions of the Windows NT 
family, GS segment descriptor is used to point to two operating system 
defined structures: Thread Information Block (NT_TIB) in user mode and 
Processor Control Region (KPCR) in kernel mode. Thus, for example, in 
user mode GS:0 is the address of the first member of the Thread 
Information Block. Maintaining this convention made the x86-64 port 
easier, but required AMD to retain the function of the FS and GS 
segments in long mode — even though segmented addressing per se is not 
really used by any modern operating system


Send me some MSVC samples, that accesses TLS, because I do not have this 
compiler.



Regards,
Mindaugas
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] WMF to PDF

2010-03-30 Thread Mindaugas Kavaliauskas

Rossine wrote:

Is possible converter wmf to pdf through the harbour ?


Hi,


Two ways comes to my mind, though non of it is directly related to 
harbour and requires more or less C knowledge:


1) You can try to play metafile on PDFCreator printing device (perhaps 
can be done in Harbour or a few Win API wrapper functions are required).


2) if you need a complete solution (without separate product 
installation), you can try to use hbcairo library. You'll need to write 
wmf file record enumerator and convert each record from wmf to cairo 
call. This seems to be a longer way, than 1).



Regards,
Mindaugas
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] mingw 4.5.0 benchmarks

2010-03-29 Thread Mindaugas Kavaliauskas

You can also try to reduce the optimization level, i.e. you can use -Os
in MinGW flags. It should reduce the compilation time and final binaries
will be slower then the one created by BCC though still faster.


I'm trying another approach :) Upgrading from Celeron to Core i5. It 
should help a little. :)



Hi,


in ChangeLog I found some -jn option for parallel compile jobs. How 
can it use it?


I'm trying:
  win-make.exe -j4
but I see no compile speed improvement.


Regards,
Mindaugas

___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] mingw 4.5.0 benchmarks

2010-03-29 Thread Mindaugas Kavaliauskas

Przemysław Czerpak wrote:

This option enables simultaneous compilation of different files.
It means that it will not change the compilation of single file
at all but when many files have to be compiled and -jn is passed
as GNU make parameter then it creates upto n processes and each
of them is used to compile different files. So the total compilation
time of is greatly reduced on multi CPU machine.
Personally I'm using -j4 or -j5 on my 3 CPU machine and it reduces
total Harbour compilation time about 3 times.


Hi,


I'm trying to compile the whole Harbour on Core i5 (2 cores + 
hyper-threading, so, 4 virtual CPU are visible to the system). But I see 
no speed improvement of -j4 using:

  win-make.exe -j4
Is this correct way to pass -j4 option? I though, that maybe I need to 
pass in a different way:

  set HB_MAKE_OPTIONS=-j4
or something like that, to make -j work


Regards,
Mindaugas
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] mingw MT mode performance

2010-03-26 Thread Mindaugas Kavaliauskas

Hi,



I suggest to start with small test to check the code produced by
MS for thread local variables. Knowing MS I will not be very surprised
if it's already well tuned code which does not call internally TlsGetValue()
at all so there is not place for noticeable improvement.
I think that we need Mindaugas help here. In the past he checked
code generated by BCC and created ASM inline macros for BCC builds.
The MinGW inline ASM function I added later is only translation of
initial Mindaugas code.
Mindaugas any chance that you can check the code generated by MSVC
which access thread local variables for wi...@32 and Win64?


I do not have any Win64 disassembler, but I think I can do some reverse 
engineering by hand (and brain) :)


Regards,
Mindaugas

___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] mingw 4.5.0 benchmarks

2010-03-26 Thread Mindaugas Kavaliauskas

Hi,


Przemysław Czerpak wrote:

It's important only if you have to often recompile very big C files
which can be hardly optimized.


It happens if you develop and compile Harbour itself, but not the final 
application only.



You can also try to reduce the optimization level, i.e. you can use -Os
in MinGW flags. It should reduce the compilation time and final binaries
will be slower then the one created by BCC though still faster.


I'm trying another approach :) Upgrading from Celeron to Core i5. It 
should help a little. :) Though, many new features of Win 7 is 
annoying. Trying to switch of everything. Does anyone know how to remove 
Favorites and Libraries entries form navigation panel of Explorer. I 
also want to remove this Organize/Include in library/Share with/New 
folder toolbar line. Any suggestions?


Classic style start menu seems to be gone forever...


Regards,
Mindaugas
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] SF.net SVN: harbour-project:[14219] trunk/harbour

2010-03-23 Thread Mindaugas Kavaliauskas

Hi,


snaipe...@users.sourceforge.net wrote:

2010-03-23 12:55 UTC+0200 Mindaugas Kavaliauskas (dbtopas/at/dbtopas.lt)
  * harbour/contrib/rddsql/sddfb/sddfb.c


I've committed, but some requested things does not work, i.e. sddfb.

   isc_start_transaction( status, hTrans, 1, hDb, 0, NULL ) returns 
error and does not create transaction handle, though, value of hTrans is 
changed. status array has number in status[0] that is not equal to any 
error code and are different on different function calls, status[1] is 
equal 0. In case of real error reporting firebird status[0] is equal 1, 
and status[1] contains error code. I've spend half of a day trying to 
find a reason yesterday, but without any success.


Perhaps, I'll try to reinstall new version of FB, unless someone more 
familiar with FB will solve the issue.



Regards,
Mindaugas

___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] SF.net SVN: harbour-project:[14219] trunk/harbour

2010-03-23 Thread Mindaugas Kavaliauskas

Viktor Szakáts wrote:

Can you test if hbfbird works with similar SQL command?
They are using the same API, so if that one works, it's 
only a matter of finding the difference.


Hi,


I have not noticed we have one more firebird contrib. Samples of hbfbird 
do not work for me.


---
C:\harbour\contrib\hbfbird\testssimple.exe

  -904
Connecting...
can't format message 13:98 -- message file 
C:\harbour\contrib\hbfbird\firebird.msg not found

---
C:\harbour\contrib\hbfbird\teststest.exe

  -904 can't format message 13:96 -- message file 
C:\harbour\contrib\hbfbird\firebird.msg not fo

und
Error:   -902 can't format message 13:98 -- message file 
C:\harbour\contrib\hbfbird\firebird.msg

 not found
---

Please, tell is anyone can run it without error - I'll try reinstall FB.


BTW, the following commit
2010-03-11 23:27 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
  * contrib/rddsql/sddfb/sddfb.c
! Few cleanups in the FB RDDSQL interface (macro and type usage).

was not a macro/type cleanup only, but also changed error codes.
Of cause, usage of status[1] looks a little ugly, but these errors are 
defined in firebird/include/iberror.h and are much more informative. 
See, http://www.firebirdsql.org/doc/contrib/fb_1_5_errorcodes.pdf
one SQL error code returned by isc_sqlcode() corresponds to many 
firebird error codes.


So, I'm going to revert this, but put error code processing into 
separate function, to keep code clear and be easy updateable.


[ In case isc_start_transaction() these error codes do not help, because 
error returned in status does not follow the standard way errors are 
returned. isc_sqlcode() returns -999, which actually means something 
like unknown error. ]



Regards,
Mindaugas
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] field-(name) in a macro

2010-03-21 Thread Mindaugas Kavaliauskas

Alexandr Okhotnikov wrote:

Can an example of effective solutions?
And why this decision is not effective?

FieldGet (fieldnum ()) - a very cumbersome
example:
1. ALIAS1-  ( NAME1) + = ALIAS2-  ( NAME2)
2. ALIAS1- (FIELDPUT (FIELDNUM ( NAME1), FIELDGET (FIELDNUM (
NAME1) + ALIAS2- (FIELDGET (FIELDNUM ( NAME2
(easily be mistaken with brackets)


Hi,

These are more clear without  :
1) alias1-NAME1 += alias2-NAME2
2) alias1-(NAME1 := NAME1 + alias2-NAME2)
(I assumed FIELDNUM() means FIELDPOS())

Regards,
Mindaugas


P.S. homework test the speed of 1) and 2) in proposed syntax above and 
with macro compiler syntax in a loop FOR nI := 1 TO 1000 and compare 
execution time.

___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] Error in SDDFB

2010-03-21 Thread Mindaugas Kavaliauskas

Jacek Kubica wrote:

Any chance for it on this weekend ??


Almost finished. Compiles without error, but have not tested any SQL 
backed yet.



Regards,
Mindaugas
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] field-(name) in a macro

2010-03-21 Thread Mindaugas Kavaliauskas

Alexandr Okhotnikov wrote:

These are more clear without  :
1) alias1-NAME1 += alias2-NAME2
2) alias1-(NAME1 := NAME1 + alias2-NAME2)
(I assumed FIELDNUM() means FIELDPOS())


NAME1 - is a variable, not a field name
therefore, this example is invalid


So, all discussion about ALIAS2- (FIELDGET (FIELDNUM ( NAME2))) is 
also invalid, because it will return value of field NAME2.



Regards,
Mindaugas
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] Error in SDDFB

2010-03-21 Thread Mindaugas Kavaliauskas

Massimo Belgrano wrote:

Hello Mindaugas
What dou you think of integrate a ORM mapper to allow programm written
using sqlmix to be indipendent from sql string


Hi,


I suggest you to write down your idea in C or PRG code and share it on 
mailing list.



Regards,
Mindaugas
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] About message WM_CREATE in gtwvt.c

2010-03-20 Thread Mindaugas Kavaliauskas

Saulius Zrelskis wrote:

Before returning, CreateWindow sends a WM_CREATE message to the window
procedure.
So this message _never_ processed in hb_gt_wvt_WndProc, because window handle
is still unknown for hb_gt_wvt_Find.
This also appends to messages WM_GETMINMAXINFO, WM_NCCREATE and WM_NCCALCSIZE.

Any hint how to resolve this?


Hi,


Warning: I do not know anything about WVT, so, my answer will be more 
generic, but could not fit in case of WVT.


I understand the main problem is binding the hWnd to some internal 
window structure/object representing hWnd in application. Before 
CreateWindow returns (and hWnd is obtained and bound), event handler 
receives some messages and it is unable to locate window structure.


I use the following method: before CreateWindow() call I put structure 
pointer into static variable. After first (any) message is received I do 
hWnd and structure binding, and forward message to real handler.


To isolate this binding functionality and avoid situation then message 
for a different (not the one that was just created) window will be 
dequeued, I use a separate window procedure for binding purpose. After 
hWnd and structure is bound, I set the real window handler using 
SetWindowLong(hWnd, GWL_WNDPROC, ...) and forward event to real handler.


Is it clear?


Regards,
Mindaugas

___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] About message WM_CREATE in gtwvt.c

2010-03-20 Thread Mindaugas Kavaliauskas

Saulius Zrelskis wrote:
  I try to use CreateWindow(Ex) parameter LPVOID lpParam.

There can be address of memory or any value
  ( LPVOID ) 0x12345678
and messages WM_NCCREATE, WM_CREATE receives in lParam
structure CREATESTRUCT address, where member lpCreateParams
have value passed through lpParam in CreateWindow(Ex).

Have you experience on this?


lpCreateParams can be used to pass windows structure/object, but this 
does not help if you want to have hWnd and windows structure binding in 
 WM_GETMINMAXINFO, since this message does not have CREATESTRUCT 
parameter. WM_GETMINMAXINFO processing could be useful if window size 
should depend on its child controls size and you want to avoid flicker 
caused by multiple resize.



Regards,
Mindaugas
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] SF.net SVN: harbour-project:[14179] trunk/harbour

2010-03-18 Thread Mindaugas Kavaliauskas

Hi,


vszak...@users.sourceforge.net wrote:

  - external/bzip2/bzip2.c
- Deleted accindentally included bzip2 tool.


Thank, You. Now I'm able to test bzip2 library.

PROC main()
LOCAL nResult
  ? Len:, HB_BZ2_UNCOMPRESSLEN(HB_BZ2_COMPRESS(), @nResult)
  ? nResult:, nResult
RETURN

prints:
Len:  0
nResult:  0

So I suggest change:
 HB_BZ2_UNCOMPRESSLEN( cCompressedData, [@nResult] )
  - nUnCompressedDataLen or 0 on error
to:
 HB_BZ2_UNCOMPRESSLEN( cCompressedData, [@nResult] )
  - nUnCompressedDataLen or -1 on error

Any objections?


Regards,
Mindaugas

___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


[Harbour] IE9104

2010-03-15 Thread Mindaugas Kavaliauskas

Hi,


the following sample generates IE9104:
===
PROC MAIN()
  DBCREATE(bandom.dbf, {{NR, N, 8, 0}, {TEXT, C, 8, 0}, 
{TEXT2, C, 4, 0}}, DBFCDX)

  DbUseArea(.T., DBFCDX, bandom.dbf, pirma, .T., .F.)
  OrdCreate(bandom.cdx, pirmas, STR(NR)+TEXT)
  OrdCreate(antras.cdx, antras, TEXT)
  DBCLOSEALL()
  DbUseArea(.T., DBFCDX, bandom.dbf, pirma, .T., .F.)
  OrdListAdd(antras.cdx)
  OrdSetFocus(pirmas)
  OrdCondSet(,, RecNo() .T.,,, .T.,,)
  OrdCreate(antras.cdx, a102, TEXT2)  // IE9104
  DBCLOSEALL()
RETURN
===
Unrecoverable error 9104: hb_cdxIndexFree: index file still locked.
Called from ORDCREATE(0)
Called from MAIN(11) in pcode.hrb
Called from HB_HRBRUN(0)
Called from _APPMAIN(0) in ../../../hbrun.prg


Regards,
Mindaugas

___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] SF.net SVN: harbour-project:[14170] trunk/harbour

2010-03-15 Thread Mindaugas Kavaliauskas

Hi,



  * harbour/src/rdd/dbfcdx/dbfcdx1.c
! fixed bad copy and past typo which could cause internal error when
  new index using existing order (subindex) was created without ADDITIVE
  clause. Bug reported by Mindaugas - many thanks for the information.


Thanks! Actually, you've found a bug in our code :) We've forgot to set 
lAdditive = .T. :)



Regards,
Mindaugas
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] MT statics vs public

2010-03-15 Thread Mindaugas Kavaliauskas

Hi,


Lorenzo Fiorini wrote:

I've successfully implemented MT in my httpserver and the results are
great, but http apps are made to be ( almost ) stateless while desktop
apps are full of vars that remember selections, global and user
setting, preferences and so on.

Following the CL5 guidelines I've heavily used module wide static vars
and set/get functions to access them but in a MT statics are difficult
to share so the idea is to use a big public hash as a session
holder where every static become a key with a value and share it
between threads.

What do you think?
Do you see other paths?


Unfortunately, HTTP is stateless and session key stored in cookie is the 
key to solve a problem (still not very comfortable...).


Here I see the main difference between web application and GUI remote 
application.



Pritpal Bedi wrote:

Static variable as declared as STATIC are shared among threads.
Static variables declared as THREAD STATIC have thread wide scope.


Static thread variables helps only in case you bind a thread to a 
session. It also solves the problem of reopening aliases, etc. It was 
implemented in my uhttpd, but late I dropped such thread-session binding 
because of bad thread reusage and uncommon application architecture. 
It's very easy to make 1000 or much more open http sessions (imagine 20 
minutes session timeout) and waste all system resources.



Regards,
Mindaugas
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] Re: SqlMix and dbcreated

2010-03-15 Thread Mindaugas Kavaliauskas

Hi,


Shum wrote:

It possible to implement the database connection number as a class ...
like the DacSession class in Xbase++ ...??


I know nothing about DacSession, but I guess it could be implemented on 
the top of current code.



Regards,
Mindaugas
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] Re: MT workareas cloning

2010-03-15 Thread Mindaugas Kavaliauskas

Hi,


Support for ZEROSPACE in WorkSpaceList() is trivial but can be implemented 
only in C. I can add it in necessary. BTW please check above two example 
with xbase++. 



Would you please implement the WorkSpaceList() with ZEROSPACE  ...
I need to obtain all alias within ZEROSPACE 

Or any way to get a list of all alias within the ZeroSpace ???


I have a related question/problem. Let's say I want to transfer areas 
among threads (that's the purpose of alias detaching). I'm missing two 
functions:

1) to attach alias within another thread using a different alias name;
2) to search a zerospace for a specific area having some dbf file, 
some open mode, index, etc.


These missing functionality could be reached by function which renames 
current alias. F.e.:


  USE items NEW ORDER number READONLY ALIAS items1
  
  HB_DBSETALIAS(items_number_RO)
  HB_DBDETACH()

Another thread:
  HB_DBREQUEST(items_number_RO,,, .T.)
  HB_DBSETALIAS(items_ro)
  ...

This could be a waste dynsym table if I want add a random HTTP session 
number to a database name before detaching it (let's say I want to cache 
opened tables for HTTP session). It this case I find a useful solution 
to store a required (for reattaching) data in cargo field. F.e.:


  USE items NEW ORDER number READONLY ALIAS items1
  
  HB_DBDETACH(, items_ + cSession)

Another thread:
  HB_DBREQUEST({|alias,cargo| IIF(cargo == items_ + cSession, (alias 
:= items_ro, .T.), .F.)},,, .T.)

  ...
  /* Here block is a kind of search block. It also assigns a new alias 
name */


The second proposed solution is more flexible, but is not optimal 
because it keeps a long mutex lock on zerospace internals.



Regards,
Mindaugas
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] recommended C compiler for Win

2010-03-15 Thread Mindaugas Kavaliauskas

Hi,



../../../sddfb.c: In function ‘fbDisconnect’:
../../../sddfb.c:181:4: warning: dereferencing type-punned pointer will break 
strict-aliasing rules
../../../sddfb.c: In function ‘fbOpen’:
../../../sddfb.c:209:4: warning: dereferencing type-punned pointer will break 
strict-aliasing rules
../../../sddfb.c:219:4: warning: dereferencing type-punned pointer will break 
strict-aliasing rules

This is also danger casting though it should work if void * is large enough
to hold FB handlers. Anyhow it's potential problem so it should be fixed.


I've added protection for this, see line 100, but I'm going to fix this 
(and other similar issues) in the nearest future.



Regards,
Mindaugas
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] ADS error codes

2010-03-04 Thread Mindaugas Kavaliauskas

Hi,

Przemysław Czerpak wrote:

I have a proposal to move ads error value to osCode and leave
subCode zero, if we do not return a dbf compatible error. This
change also allows to get more precise error description by using
AdsGetErrorString(), since we will know ads error in all cases.
Any objections?


For me it's very good idea.


But one problem we have... There is code:

/* 1001 and 7008 are standard ADS Open Errors that will usually be 
sharing issues */

HB_ERRCODE errOsCode = u32RetVal == 1001 || u32RetVal == 7008 ? 32 : 0;
fRetry = commonError( pArea, EG_OPEN, ( HB_ERRCODE ) u32RetVal, 
errOsCode, ( const char * ) pOpenInfo-abName, EF_CANRETRY | 
EF_CANDEFAULT, pError ) == E_RETRY;


This interacts with default error handler behavior in errorsys.

Sharing violation is not indicated by some error subCode and general 
EDBF_OPEN_DBF is returned in dbf rdd. So, osCode is the only way to 
detect sharing violation and it is hardcoded to DOS error codes.


Perhaps we must leave this hack, or... extend default error handler to 
adapt to rddads. It is also not a nice solution, because ADS is not even 
in core code.


Any proposal on this issue?


Regards,
Mindaugas
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] ADS error codes

2010-03-04 Thread Mindaugas Kavaliauskas

Hi,

Przemysław Czerpak wrote:

Perhaps we must leave this hack, or... extend default error handler

Here is the problem with custom user code using own error handlers.
I'm afraid it's hard to change it because it may introduce very serious
bugs to valid Clipper code.
I also do not like it but I'm afraid we have to leave it.


Viktor wrote:
IOW to me the real solution looks rather like 
to use subCode only to return ADS specific error 
codes. subCode is a private matter of any given 
RDD (or library), so we don't need to be compatible 
with anything here.


So we have two choices:
1) osCode=AdsError and hack for sharing violation (osCode=32, 
subCode=AdsError);
2) subCode=AdsError and not Clipper compatible subcodes for not ADS 
errors like EDBF_DATAWIDTH, etc. One of ways to solve ambiguity in this 
case is error code ranges. ADS uses error codes  1000. Not ADS errors 
can be used from interval 1...999. We can even use semi-compatible DBF 
error in some cases, using EDBF_* - 1000, because all EDBF_* are below 
2000.


What solution do you prefer?


Regards,
Mindaugas

___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [SPAM] Re: [Harbour] What is Valtype = S ?

2010-03-03 Thread Mindaugas Kavaliauskas

Hi,


Viktor Szakáts wrote:
The only thing I wonder is why all this is important 
for a normal user application...? Perhaps because I never 
needed such thing, but if the goal is to check the 
arguments involved in an RTE, we have oError:args 
(just like Clipper).


I find it also very useful. I dump function parameters and locals for a 
the whole HVM stack in case of RTE. If bug is not in the caller 
function, but a few functions up, oError:args is not enough to find a bug.



Regards,
Mindaugas
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] New Windows unicode support for dummies thread

2010-03-03 Thread Mindaugas Kavaliauskas

Hi,


Viktor Szakáts wrote:

The _default_ Harbour build will need unicows.dll.
Anyone, anytime may create a non-UNICODE Harbour build 
by using HB_BUILD_UNICODE=no.


Is UNICODE the default setting now? Ups! I haven't noticed this fact. 
Many of our customers still use Win95.



Regards,
Mindaugas
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] New Windows unicode support for dummies thread

2010-03-03 Thread Mindaugas Kavaliauskas

Hi,


Viktor Szakáts wrote:

Is UNICODE the default setting now? Ups! I haven't noticed this fact. Many of 
our customers still use Win95.


I've been asking about this on this list and waiting 
for opinions. There was none, so I made the step.


Sorry. I haven't noticed. Perhaps it's too much information to read in 
all mailing list I'm subscribed.



Regards,
Mindaugas
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] RDDSQL Question.

2010-03-03 Thread Mindaugas Kavaliauskas

Hi,


Itamar Lins wrote:
Can you create examples of creating, 


RDDINFO( RDDI_EXECUTE, CREATE TABLE test (id int, txt char(20)))

adding, 


RDDINFO( RDDI_EXECUTE, INSERT INTO test (id,txt) VALUES(1,'abc'), (2, 
'def')))



modifying fields of the tables via rddsql.


RDDINFO( RDDI_EXECUTE, UPDATE test SET txt='ghi' WHERE id=1)



For tables mdb via ado and other if possible.


Sorry, I know nothing about .mdb and ado, but above should work for MySql.


Regards,
Mindaugas
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] Re: RDDSQL Question.

2010-03-03 Thread Mindaugas Kavaliauskas

Hi,



But if I for example use:
My Browse() function and modify a field?
Because I change only in temporary cache query.
How to proceed for commit?


In my code on edit dialog OK button, o do both actions: execute query 
and set field values.


There is also my primary idea to store dirty flag for records, and 
later (ex. on browse close) iterate these dirty records and execute 
SQL update queries. I have not implemented this yet, since, I'm using 
another way to update DB. This dirty flag way has also some drawbacks, 
so, I do not want to do implementation until I do not use it and find it 
really a good solution for final application.



Regards,
Mindaugas

___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] Re: RDDSQL Question.

2010-03-03 Thread Mindaugas Kavaliauskas

Hi,


Bruno Luciani wrote:

May be could you post a working sample using this mix way of work
using a browse etc etc


Sorry, I do not use browse(). I use our own GUI.


Regards,
Mindaugas
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] Re: RDDSQL Question.

2010-03-03 Thread Mindaugas Kavaliauskas

Bruno Luciani wrote:

well , some code sample would be usefull


This sample is 73 files with implementation of all GUI app development 
environment. It will not work together, if you delete one file. I can 
send some 20 lines sample, but it gives nothing to you. But I won't 
share the whole code because: it's not multiplatform, not enough 
portable, contains lithuanian function names, etc, etc. We can manage to 
use it in very comfortable way in a small group of programmers. But it 
is not what I want to see in Harbour project.



Regards,
Mindaugas
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] Re: RDDSQL Question.

2010-03-03 Thread Mindaugas Kavaliauskas

Itamar Lins wrote:

Yes, I understand.
Another problem we consider a table with 3Gib for example how to work 
with it via browse? because my system is 100% via browse style excel.


This is syntaxe below is impraticable.

 DBUSEAREA(, select * from my_table)

How to calculate end of query and run SQL again using browse ?

 DBUSEAREA(, select * from my_table limit 100)


Let's say table has unique numeric id column (auto_increment or 
similar). We use two techniques to solve the problem:

1) even if database is large (but not huge), you can try to do:
  select id from * mytable order by id;
MySql returns 5 ids very quickly. Later on page down/page up action 
you just do subqueries:

  select * from mytable where id in (...) order by id;
... is a list of first, second, third, ... rowcount numbers of ids 
from the ids query.


2) if table is huge the second technique is better:
First page:
  select * from mytable order by id limit 20
Next page (after page down):
  select * from mytable where id  nPrevQueryLastId order by id limit 20


Please, do not ask how to use it browse. We are doing it by MoveTo(), 
LineTo(), TextOut(), etc and a lot of code on the top of it.



Regards,
Mindaugas
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] Re: RDDSQL Question.

2010-03-03 Thread Mindaugas Kavaliauskas

Hi,


Jacek Kubica wrote:

May be could you post a working sample using this mix way of work
using a browse etc etc

MK Sorry, I do not use browse(). I use our own GUI.

OK, but how do you reaslise datacommits to database ??


Using RDDINFO( RDDI_EXECUTE, UPDATE ...)



Using ODBC, native client or something else ??


Using rddsql, sddmy.



BTW. sddoci works very well here ! Thanks Viktor !


+2 :)


Regards,
Mindaugas

___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


[Harbour] OrdLiistAdd() bug

2010-03-02 Thread Mindaugas Kavaliauskas

Hi,


the following sample prints:
C:\cawi32\sample\testhbrun test194.prg

ORDNAME(0), ORDKEY(0): F F

---  code 
REQUEST DBFCDX
PROC MAIN()
  RDDSETDEFAULT(DBFCDX)
  DBCREATE(test194, {{F, C, 10, 0}},, .T.)
  OrdCreate(test194x, F, F)
  DBCLOSEALL()
  DBUSEAREA(.T.,, test194,, .T., .F.)
  ORDLISTADD(test194x)
  ? ORDNAME(0), ORDKEY(0):, ORDNAME(0), ORDKEY(0)
  DBCLOSEALL()
RETURN


Regards,
Mindaugas
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] OrdLiistAdd() bug

2010-03-02 Thread Mindaugas Kavaliauskas

Hi,


Przemysław Czerpak wrote:

the following sample prints:
C:\cawi32\sample\testhbrun test194.prg
ORDNAME(0), ORDKEY(0): F F


Looks correct for me.
What is the bug?


As far as I understand zero order means no order, and should return an 
empty key and empty order name.


Code:
  FOR nI := 0 TO ORDCOUNT()
? nI, ORDNAME(nI), ORDKEY(nI), ORDNUMBER(ORDNAME(nI))
  NEXT
executed before OrdCreate() prints correct result for zero order:
 00
but the same code executed after OrdListAdd() returns key 'F' for both 
zero and first index:

 0 F F  1
 1 F F  1


Regards,
Mindaugas
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] OrdLiistAdd() bug

2010-03-02 Thread Mindaugas Kavaliauskas

Hi,


Przemysław Czerpak wrote:

As far as I understand zero order means no order, and should return
an empty key and empty order name.

0 given as tag number in above ord*() functions means current index.
It's Clipper compatible behavior. Just test your code with Clipper.
I do no think I can change it and drop Clipper compatibility. Seems
that it may interact with existing Clipper code.


Thank You. I was sure that OrdSetFocus(0) understand zero the same way 
as OrdName(0), and I have not tested Clipper. Sorry, for wrong bug report.



Regards,
Mindaugas
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] SF.net SVN: harbour-project:[14022] trunk/harbour

2010-03-01 Thread Mindaugas Kavaliauskas

Hi,


vszak...@users.sourceforge.net wrote:

  + contrib/rddsql/sddoci/sddoci.c
  + contrib/rddsql/sddsq3/sddsq3.c



Thank You, for you new SDD. I've started Oracle development some time 
ago, but never fixed because lack of time, motivation (I do not need it 
for my own projects), and test environment. I see you current code is 
much more complete, than my. It also uses some more nice API than I was 
trying to use. I was using OCI*() functions (not OCI_*()), i.e. 
OCIHandleAlloc() was used to allocate server, context, environment, 
error, and session handles. It seemed very stange...


BTW, in the OCI*() API, transaction management is done using API 
functions, but not 'BEGIN', 'ROLLBACK', 'COMMIT' queries (like in 
MySql). If this is also true for OCI_*() API, perhaps we need to SDD and 
introduce new methods. For MySql and similar query based transactions 
we need to do queries on transaction method calls.




  ; TOFIX: To Mindaugas: Current SDD architecture will crash with GPF
   if dbUseArea() is attempted after a failed RDDI_CONNECT
   call. You can check it f.e. with sddodbc's test1.prg, by
   modifying test.mdb to test_.mdb, and simply run it.


I've tried to, but I guess you've already fixed it. But I see a lot of 
? characters in test1.prg table browse (in BCC). Something wrong with 
UNICODE support, though I do not see error code. Maybe some hidden 
#define UNICODE exists...


!!! This  0 is dangerous, not compatible with next #if defined

#if defined( UNICODE )  0
   iTargetType = SQL_C_WCHAR;
   iLen *= 2;
#else
   iTargetType = SQL_C_CHAR;
#endif
   val = ( SQLPOINTER * ) hb_xgrab( iLen );
   if( SQL_SUCCEEDED( res = SQLGetData( hStmt, ui, 
iTargetType, val, iLen, iLen ) ) )

   {
  if( iLen  0 )
  {
#if defined( UNICODE )
 iLen /= 2;
#endif
 pItem = O_HB_ITEMPUTSTRLEN( NULL, ( O_HB_CHAR * ) 
val, ( HB_SIZE ) iLen );

  }
   }
   hb_xfree( val );


Regards,
Mindaugas

___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


[Harbour] sddodbc

2010-03-01 Thread Mindaugas Kavaliauskas

Hi,


It seems sddodbc.c line #603 should be changed to:
  pItem = O_HB_ITEMPUTSTRLEN( NULL, ( O_HB_CHAR * ) val, ( HB_SIZE 
) iLen - 1 );


otherwise test1.prg returns chr(0) in the end of every string.


Regards,
Mindaugas


P.S. I see we have some serious problems with mailing list. 
lists.harbour-project.org is not resolved by DNS.

___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] Trouble with SqlRdd

2010-02-26 Thread Mindaugas Kavaliauskas

Horodyski Marek (PZUZ) wrote:

I use Harbour 2.0.0beta3 (Rev. 12489) on WinXP SP3 and both ODBC client
(Oracle and Microsoft).
I could not use the current version, as I have in the GPF.
How this can somehow improve in the sqlrdd?



Hm, mostly I have in harbor\odbc zero when count(*) or sum( ...) are in
the query.
In sql tools (toad, sql developer etc.) I see correctly value.
The problem of care for converting query (numeric fields) into the text
- but it's only a workaround, and this should fix it somehow.




Hi, Marek,


for sure I can help you but I need a self contained sample that does not 
require installation of servers I do not have. Can you made a sample 
like contrib/rddsql/sddodbc/test/test1.prg and attach .mdb file if it is 
a problem Microsoft DB?


If I do not have self contained sample I need a precise debug info about 
field types and other field parameters both in SQL language and ODBC API 
presentation.



Regards,
Mindaugas
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] Re: Switch to detect undeclared vars being used

2010-02-26 Thread Mindaugas Kavaliauskas

Hi,


Przemysław Czerpak wrote:

In class implementation we are using:
   _HB_CLASS className [,classFuncName] // new class
   _HB_MEMBER messageName [ AS type ]
   _HB_MEMBER { [ AS type ] varName,... }
Of course this is also [x]Harbour only extension and it's hidden for
users by PP rules in hbclass.ch so I think that only few people knows
about such syntax extension.


I've seen it a lot of times in .ch and .ppo. I've even tried to look 
into .y for exact meaning of this, but I failed to find a good answer in 
compiler source.




But for variable declaration in [x]Harbour AS type can be used after
each variable, i.e.:
   LOCAL cVar AS CHARACTER, nVar AS NUMERIC, lVar AS LOGICAL
This is incompatible with other xbase dialects which allow to use
AS type only at the end and it describes type for all vairables
in given declaration, i.e.:
   LOCAL nVar1, nVar2, nVar3 AS NUMERIC
In FlagShip and VO declares 3 numeric variables but in [x]Harbour
only nVar3 is declared as numeric variable but nVar1 and nVar2 do
not have strong type, they are AS USUAL.
I do not like this difference and it may cause serious problems
with code portability.
Clipper uses very similar syntax when fields are declared:
   FIELD fieldName, ... IN alias
and IN alias is used for all fields not only for the last one
so this [x]Harbour extension looks ugly even if compared with only
other Clipper commands.


I think we must be compatible with majority here. Unless we see a 
drawbacks in majority syntax.




The most natural seems to be using pseudo functions like:

   asCharacter( exp )
   asNumeric( exp )
   asLogical( exp )

other method is using some new operator which will work well with PP.
I.e. instead of 'AS' we can use '.AS.' because expressions like
exp .AS. type are recognized by PP s single expression, i.e.

   ? x .as. numeric

is well preprocessed by PP to:

   QOUT( x .as. numeric )

Please think about it.


I remember I had some problems in the past introducing new operators. 
AFAIR, it was because PP do not know anything about operator 
precendence. Do we have a same situation here?


Pseudo functions looks like a good solution if we do not want to invent 
a new syntax like var.type . New syntax sometimes has a hidden drawbacks 
if you do not have the whole picture of lexer-PP-Compiler in your head. 
Of cause, I'm sure Przemek has it in his head :) But var.type looks a 
little alien for me.




One more thing is very interesting to me: how can we optimize code using 
strong typing? It would be nice, if we can reach a speed of C language 
here :) But we have some problems, f.e., our numeric type actually are 3 
different types in VM: int, HB_LONG (or some new type name to be exact), 
and double. This disables:

  LOCAL n1, n2, n3 AS NUMERIC
  n1 := n2 + n3
to be optimized to C level + operation, because additional type and 
parameter range checking is required. I've done some comparison of 
different languages (Harbour, Ruby, PHP, Java, etc) in the past. 
Languages that have separate double and integer types has much better 
performance for a simple arithmetic operations.

  LOCAL n1, n2, n3 AS INTEGER
could be useful.


I also want to answer here to a topic from another thread. This is 
related to Harbour syntax.



Example:

with object MyObject
( {|| x := :MyMethod() } )
end
It gives a syntax error 

...
In next commit I'll add only protection for such GPF (it will work
like in xHarbour) and we can try to talk about the future of WITH OBJECT.
Here is the code which illustrates the problem:
   proc main()
  local cb
  with object .F.
 with object 0
cb := {|| :className }
? eval( cb )// NUMERIC
 end
 ? eval( cb )   // LOGICAL
  end
  ? eval( cb )  // GPF or NIL after incomming commit.
   return

As you can see codeblock is created inside 'with object 0' statement but
can be used outside this statement when the given object does not longer
exist so it does not confirm WITH OBJECT specification and has to be fixed.
We have two choices:
   1) detach WITH OBJECT variable lust like local variables
  and add code which will resolve references in each :msg code.
  It will cause some small speed overhead but it will work
   2) forbid using :msg in nested code blocks at compile time.
If we want to add support for macrocompiler then we can chose only
method one.
But method one except some small speed overhead has yet another drawback.
It needs to keep current code which uses additional HVM stack register
(lWithObject) to store offset of WITH OBJECT value. Such implementation
needs additional code to update lWithObject register at the beginning and
end of WITH OBJECT statement (additional speed overhead which can be
eliminated and reduces this feature to only single WITH OBJECT variable
and this is sth what I would like to eliminate in the future.


I know my opinion will be not popular, but I think the best choice is 

Re: [Harbour] For Przemek: SIXCDX difference found with examples

2010-02-26 Thread Mindaugas Kavaliauskas

Hi,


smu johnson wrote:
With a Roll-your-own index open, when you use a dbgoto(), the record 
pointer is moved to the correct row in the table but the pointer in the 
index file is not positioned to the corresponding row, even though the 
record is in the index.  With a regular cdx index, the index pointer is 
always positioned after a dbgoto().


Perhaps the reason for not positioning the index pointer in an ryo index 
is that an ryo index can contain multiple entries for a single table 
row, and as such, positioning the index pointer would be ambiguous 
action (pick one?) and could therefore cause unpredictable results.  Am 
I correct in that thinking?


DBF can be positioned by record number. Index can be positioned by key 
value. Since in RYO indices keyvalue could not be calculated using 
record data, index can not be positioned. You can think that DBGOTO() 
call also executes DBSEEK((ORDKEY())) to position index. In case of 
RYO, ORDKEY() has no meaning.



Regards,
Mindaugas
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] Re: Przemyslaw, I need to know your position about HB_PP_MULTILINE support

2010-02-25 Thread Mindaugas Kavaliauskas

Viktor Szakáts wrote:

Thanks, so the same extension exist as in xhb.
I'll update SVN.


IFAIR, xHarbour allows off-limit indices to return an empty string. That 
was the main drawback, that does not help to find buggy code by RTE. 
F.e. 'abc'[1, 2, 3, 4, 5, 6] does not RTE.



Regards,
Mindaugas

___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] Doc format #1

2010-02-21 Thread Mindaugas Kavaliauskas

Hi,



Subsystem is a very difficult thing to decide on.
...
My definite vote to avoid this confusion and use 
simple beginning of filename scheme. It IMO cannot 
be simpler, cleaner than that.


Do you suggest to use the same scheme for C functions? I think 
extend.txt, item.txt (or extend_api.txt, item_api.txt) is much more 
clear than hb_p.txt for hb_parc() and hb_s.txt for hb_storclen(), etc.



Regards,
Mindaugas
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] Re: About Harbour Documentation

2010-02-21 Thread Mindaugas Kavaliauskas

Hi,


  $HEADERSFILES$  = Only names separated with , 
   = if it depends on many or only one with
primary dependance 


This is already included in $SYNTAX$ section, I 
think it's fine as it is:

---
 *  $SYNTAX$
 *  C Prototype
 *
 *  #include hbapifs.h
 *  hb_fsChDir( BYTE * pszDirName ) -- ( HB_BOOL ) bResult
---


I think $SYTAX$ is enough. Though, I prefer a common C syntax:
  HB_BOOL hb_fsChDir( BYTE * pszDirName )


  $LIB$ = only name without suffix.


I was thinking about it, but I'd rather vote 
to keep Harbour as easy to use as possible, so 
that users don't have to worry about lib names at 
all.


I find it useful (but not critical).



2. $SEAALSO#  must also follow a certain pattern, say, separated with spaces
or comma.


Definitely. I think it's already defined as comma. 
If not, we should now define it as comma. Space 
is not good, as commands may have spaces in them.


I guess we have same functions that has the same C and PRG names. It 
will be impossible to link see also pages. Though, case sensitive link 
names and upper case names for PRG functions can solve majority of the 
problem.



Regards,
Mindaugas

___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] SF.net SVN: harbour-project:[13937] trunk/harbour

2010-02-20 Thread Mindaugas Kavaliauskas

Hi,



+ added new C function:
 PHB_ITEM hb_socketGetIFaces( int af, HB_BOOL fNoAliases );
  it returns array with existing interfaces description.
  This code was added for non MS-Windows based platforms only.
  Support for MS-Windows has to be added yet.


Xavi has mentioned a popular GetAdaptersInfo() way to get interface 
list. Windows also support another method that is more similar to your 
implementation (but less info could be obtained using with method):


http://tangentsoft.net/wskfaq/examples/getifaces.html
http://msdn.microsoft.com/en-us/library/ms741621(VS.85).aspx
http://msdn.microsoft.com/en-us/library/ms738568(VS.85).aspx



Regards,
Mindaugas
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] hb_InetAddress()

2010-02-18 Thread Mindaugas Kavaliauskas

Hi,

Maurilio Longo wrote:

Testing hb_InetAddress() on a listening socket I get back 0.0.0.0 while
hb_InetPort() works as expected.

hb_InetAddress() works when called on a connected socket where it returns the
caller IP address.

Is this the correct behavior?


Perhaps, yes. I guess you have not specified the listen address, so, 
socket is listening on all available interfaces (eg. 127.0.0.1, 
192.168.1.1, and so on on multihomed machine) and hb_InetAddress() 
returns 0.0.0.0 (=INADDR_ANY).



Regards,
Mindaugas


___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] FPT corruption

2010-02-12 Thread Mindaugas Kavaliauskas

Hi,


Przemysław Czerpak wrote:

memo file size and block offset. For relatively small memo files it
may help to early detect corruption but it will not help for big files
and for sure in all cases it will cause performance reduction because
we will have to add additional IO call to check current file size.
To reduce the overhead we can add such verification only for blocks
bigger then some arbitrary chosen by us limit i.e. 4MB.

If you think it's worth to implement then I can do that.


Since this is not the first and only time we have such situation, I 
found it useful. It could be even bigger limit, ex., 16MB or more, but 
should be less than OS available memory size - otherwise app is halted. 
Adaptive algorithm that stores FPT size in memory and rechecks file size 
if this block size is larger than this value is the best solution, but I 
this requires FPT AREA structure change, etc.


The other solution could be reading not the whole block, but beginning 
of it (if it is very big). If block has a huge size, perhaps, a few 
other bytes (like field type) in the beginning of the block will show 
that field is invalid. (I do not know fpt stucture, so, this is only guess).




I can also enable strict TYPE verification but it may cause
problems when some extended types stored by program compiled
by other languages are used. There are many local extensions
to FPT format. Now Harbour returns NIL for such fields.


This could be useful to detect extended FPT files and implement such 
extensions in Harbour.




Regards,
Mindaugas

___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] Re: FPT corruption

2010-02-12 Thread Mindaugas Kavaliauskas

Hi,


David Arturo Macias Corona wrote:

Now that you are safe, why these FPT corruption happen ?
 ( ... corrupted .ftp blocks contains huge size values ... )


Perhaps it was file system crash because power supply lost or something 
like this. We can find HTML, Javascript code in .fpt file.



Regards,
Mindaugas
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


[Harbour] FPT corruption

2010-02-11 Thread Mindaugas Kavaliauskas

Hi,


few times per year we find corrupted .fpt files in databeses of our 
customers. The problem is that this corruption is not detected by driver 
and causes strange behavior. For example, application hangs-up, but do 
not GPFs. After some tests we found, that it hangs-up because it uses 
a huge amount of memory (ex. = 1GB) and OS do a lot of disk swap thus 
stops application and system. This memory usage is caused by reading 
some memo value. Total memo file length is not big (1MB), but corrupted 
.ftp blocks contains huge size values. I've wrote some code to test for 
such memofields, but it would be nice to have some corruption detection 
code  in fpt driver.



Regards,
Mindaugas


#include hbapi.h
#include hbrddfpt.h

HB_FUNC( FPTTESTFIELD )
{
   DBFAREAP pArea = ( DBFAREAP ) hb_rddGetCurrentWorkAreaPointer();
   USHORT   uiField = hb_parni( 1 );
   ULONGulBlock, ulSize, ulType;
   BOOL bDeleted;

   if( !pArea || !uiField || uiField  pArea-uiFieldCount ||
   !pArea-fHasMemo || pArea-bMemoType != DB_MEMO_FPT )
   {
  hb_retl( FALSE );
  return;
   }

   /* Force record read */
   SELF_DELETED( pArea, bDeleted );

   if( hb_dbfGetMemoData( ( DBFAREAP ) pArea, uiField - 1, ulBlock, 
ulSize, ulType ) != SUCCESS )

   {
  hb_retl( FALSE );
  return;
   }
   if( ulBlock  0 )
   {
  FPTBLOCK   fptBlock;
  if( hb_fileReadAt( pArea-pMemoFile, ( BYTE * ) fptBlock, 
sizeof( FPTBLOCK ),
 ( HB_FOFFSET ) ulBlock * ( HB_FOFFSET ) 
pArea-uiMemoBlockSize ) != sizeof( FPTBLOCK ) )

  {
 hb_retl( FALSE );
 return;
  }
  ulType = HB_GET_BE_UINT32( fptBlock.type );
  ulSize = HB_GET_BE_UINT32( fptBlock.size );

  if( ( ulType  FPTIT_TEXT  ulType  FPTIT_FLEX_GC ) ||
  ulType  FPTIT_FLEX_COMPRCH ||
  ulSize  1048576 )
  {
 hb_retl( FALSE );
 return;
  }
   }
   hb_retl( TRUE );
}
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] FPT corruption

2010-02-11 Thread Mindaugas Kavaliauskas

Hi,


Alex Strickland wrote:

USHORT uiField = hb_parni( 1 );
ULONG ulBlock, ulSize, ulType;
BOOL bDeleted;


Viktor will kill you if he sees these :)


I have alibi. This code is created half year ago :)


Regards,
Mindaugas
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] SF.net SVN: harbour-project:[13811] trunk/harbour

2010-02-09 Thread Mindaugas Kavaliauskas

Hi,


Viktor Szakáts wrote:
Or, we can keep HB_BYTE and HB_SCHAR. (and drop 
HB_CHAR and HB_UCHAR)


Any further elaboration?


I'm a little lost on the whole idea of type name change. I guess we have 
two purposes:

1) drop Windows specific defines, like LONG, ULONG, BYTE, etc.
2) solve some platform limit problems like array limit, string limit 
problems. We are using long type for this, but 64-bit windows uses 
32-bit long values. So, we need to change index to have a size of pointer.


I guess the first problem could be solved just replacing LONG, ULONG, 
SHORT, USORT by long, unsigned long, short, unsigned short. Why do we 
define a new types like HB_LONG, HB_ULONG, HB_SCHAR? Just to have a 
shorter type name?


So solve the second problem, we need to define the expected limits of 
some values, like expected function parameter count, expected dynamic 
symbol table item count, expected array size, expected string size.
F.e., if the decide we need to have strings as big as memory can 
contain, we need string length to have a size of pointer. In most 
platforms long (or unsigned long) is OK, but on 64-bit Win it is to 
small, so we define a new type HB_SIZE and use it address all string, 
array, hash, etc, item count.
If we are satisfied with some existing type we do not need a new harbour 
type. F.e, if int type fits function parameter count (it can be 
negative, because -1 means return value, it is enough width on DOS, 
32-bit, 64-bit platforms), we can use int to store param count/number. 
If we want to have another type like HB_PARAMCOUNT we can have it, but 
it could be a big job to find all variables that stores param count.


I'm not a guru of different OSes, and I do not imaging how character and 
byte types can have width different from 8-bit. So, I have no comments 
on topics like:

- Deleted HB_I8 and HB_U8 types. Practice shows that
  HB_UCHAR and HB_SCHAR are used instead of these.


Does it mean that we decided to definitely drop support for platforms
which do not use 8 bit characters?




Regards,
Mindaugas


P.S. perhaps I had to start a message from this, but I see Viktor is 
making a huge worik on type name change, and I see Przemek is a little 
sceptical, because he sees some bad sides of this change. I guess we 
should discuss/deside, what do we want to do, and what are the ways to 
reach our goal.



___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


Re: [Harbour] SF.net SVN: harbour-project:[13783] trunk/harbour

2010-02-06 Thread Mindaugas Kavaliauskas

Hi,



  * contrib/hbmzip/hbmzip.c
; QUESTION: Is there any reason why we're not using the hb_fs*() functions
in hb_zipGetFileInfo()?


Can not find a reason.


Regards,
Mindaugas
___
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour


  1   2   3   4   5   6   7   >