Maurilio,

I strongly suspect your MT version of hvm.lib was not recompiled,  
because it does NOT make any sense. The correction has nothing to do  
with ST/MT.

Ron

On Jun 20, 2008, at 8:34 AM, Maurilio Longo wrote:

> Ron,
>
> on OS/2, gcc, it still returns 0 bytes read in MT.
>
> -------8<-----------------------
> (E:\repos2\xharbour\tests)set HB_MT=MT
>
> (E:\repos2\xharbour\tests)del ref2.exe && make ref2.exe
> e:\harbour\bin/harbour -Ie:\harbour\include  -n ref2.prg
> xHarbour Compiler build 1.1.0 (SimpLex) (Rev. 6146)
> Copyright 1999-2008, http://www.xharbour.org http://www.harbour- 
> project.org/
> Compiling 'ref2.prg'...
> Lines 32, Functions/Procedures 2
> Generating C source output to 'ref2.c'...
> Done.
> gcc  -Ie:\harbour\include -c -o ref2.o ref2.c
> gcc -o ref2.exe ref2.o  -Le:\harbour\lib -ldebug -lvmmt -lrtlmt - 
> lrddmt -lrtlmt
> -ldbfntx -ldbfcdx -ldbffpt -lhbsix -lrtlmt -lvmmt -lmacromt - 
> lpcrepos -lct -lpp
> -llang -lcommon -lgtos2 -lgtpca -lsocket -lrtlmt -lm
> rm ref2.o ref2.c
>
> (E:\repos2\xharbour\tests)ref2
>
>         99
>          0
> (E:\repos2\xharbour\tests)
> -----------------------
>
> Maurilio.
>
> Ron Pinkas wrote:
>> Maurilio,
>>
>> Works perfect for me, also in MT. What problem did you have?
>>
>> Ron
>>
>> On Jun 20, 2008, at 8:29 AM, Maurilio Longo wrote:
>>
>>> Ron,
>>>
>>> I can confirm that it is fixed for ST mode after your last commit.
>>>
>>> It still does not work in MT mode.
>>>
>>> Thanks a lot!
>>>
>>> Maurilio.
>>>
>>>
>>> Ron Pinkas wrote:
>>>> Maurilio,
>>>>
>>>> Should be fixed after: 2008-06-20 10:25 UTC-0430 Ron Pinkas <ron/ 
>>>> at/
>>>> xharbour.com>
>>>>
>>>> Ron
>>>>
>>>> On Jun 20, 2008, at 8:03 AM, Maurilio Longo wrote:
>>>>
>>>>> And I can add that
>>>>>
>>>>> ISBYREF() fails, hb_parcsiz() returns 0 (zero).
>>>>>
>>>>> Best regards.
>>>>>
>>>>> Maurilio.
>>>>>
>>>>> Maurilio Longo wrote:
>>>>>> Ron,
>>>>>>
>>>>>> even worse, with latest cvs I get back garbage in ST mode and a
>>>>>> series of Chr(
>>>>>> 7 ) in MT ?!
>>>>>>
>>>>>>
>>>>>> ST mode follows
>>>>>>
>>>>>> -----------8<---------------------
>>>>>> (E:\repos2\xharbour\tests)ref2
>>>>>>
>>>>>>
>>>>>>         99
>>>>>>          0        ÓïR ªR`¬RÓ¬R`®RáïR
>>>>>> ░Rá®Rá░R`░RáñRáÑRÓ»RáÄRáöRáù
>>>>>> RÓûR òR -Rá»Rá8R`»R`%R
>>>>>> ------------------------------------
>>>>>>
>>>>>> Best regards.
>>>>>>
>>>>>> Maurilio.
>>>>>>
>>>>>> Ron Pinkas wrote:
>>>>>>> Maurilio,
>>>>>>>
>>>>>>> The only problem I see is in the sample code - it had a memory
>>>>>>> overrun and memory leaks. Here is the corrected sample:
>>>>>>>
>>>>>>> //-------------------------------------------------------------- 
>>>>>>> --
>>>>>>> --
>>>>>>> ----
>>>>>>> ------------//
>>>>>>> PROCEDURE main()
>>>>>>>
>>>>>>>     LOCAL cStr := "Hello"
>>>>>>>
>>>>>>>     MemoWrit( "test.txt", Replicate( "0", 2048 ) )
>>>>>>>
>>>>>>>     ? Test()
>>>>>>>
>>>>>>>     fErase( "test.txt" )
>>>>>>>
>>>>>>> RETURN
>>>>>>>
>>>>>>>
>>>>>>> PROCEDURE Called( cStr )
>>>>>>>
>>>>>>>     LOCAL nHandle
>>>>>>>
>>>>>>>     nHandle := fOpen( "test.txt" )
>>>>>>>
>>>>>>>     ? Len( cStr )
>>>>>>>     ? fRead( nHandle, @cStr, Len( cStr ) )
>>>>>>>
>>>>>>>     fClose( nHandle )
>>>>>>>
>>>>>>> RETURN
>>>>>>>
>>>>>>>
>>>>>>> #pragma begindump
>>>>>>>
>>>>>>> #include <hbapi.h>
>>>>>>> #include <hbapiitm.h>
>>>>>>> #include <hbvm.h>
>>>>>>>
>>>>>>>
>>>>>>> HB_FUNC( TEST )
>>>>>>> {
>>>>>>>     PHB_DYNS pSym = hb_dynsymFindName( "CALLED" );
>>>>>>>     PHB_ITEM pItem = hb_itemNew( NULL );
>>>>>>>     char * pBuffer = NULL;
>>>>>>>
>>>>>>>     pBuffer = (char *) hb_xgrab( 100 );
>>>>>>>     hb_itemPutCPtr( pItem, pBuffer, 99 ); // NOTE!
>>>>>>>
>>>>>>>     hb_vmPushSymbol( hb_dynsymSymbol( pSym ) );
>>>>>>>     hb_vmPushNil();
>>>>>>>     hb_vmPushItemRef( pItem );
>>>>>>>     hb_vmDo( 1 );
>>>>>>>
>>>>>>>     hb_itemReturnForward( pItem ); //NOTE!
>>>>>>>     hb_itemRelease( pItem ); //NOTE!
>>>>>>> }
>>>>>>>
>>>>>>> #pragma enddump
>>>>>>> //-------------------------------------------------------------- 
>>>>>>> --
>>>>>>> --
>>>>>>> ----
>>>>>>> ------------//
>>>>>>>
>>>>>>> Ron
>>>>>>>
>>>>>>> On Jun 20, 2008, at 4:51 AM, Maurilio Longo wrote:
>>>>>>>
>>>>>>>> Ron,
>>>>>>>>
>>>>>>>> fRead() has problems when some C code tries to pass to it a
>>>>>>>> variable by-reference.
>>>>>>>>
>>>>>>>> See attached sample, I think this is strictly correlated to my
>>>>>>>> previous posts
>>>>>>>> about similar issues.
>>>>>>>>
>>>>>>>> Can this be solved?
>>>>>>>>
>>>>>>>> Can someone help me find the source of this issue so that I
>>>>>>>> can try
>>>>>>>> to fix it
>>>>>>>> by myself?
>>>>>>>>
>>>>>>>> TIA.
>>>>>>>>
>>>>>>>> Maurilio.
>>>>>>>>
>>>>>>>>
>>>>>>>> -- 
>>>>>>>>  __________
>>>>>>>> |  |  | |__| Maurilio Longo
>>>>>>>> |_|_|_|____| farmaconsult s.r.l.
>>>>>>>>
>>>>>>>> <ref.prg>----------------------------------------------------- 
>>>>>>>> --
>>>>>>>> --
>>>>>>>> ---
>>>>>>>> -------------
>>>>>>>> Check out the new SourceForge.net Marketplace.
>>>>>>>> It's the best place to buy or sell services for
>>>>>>>> just about anything Open Source.
>>>>>>>> http://sourceforge.net/services/buy/
>>>>>>>> index.php_______________________________________________
>>>>>>>> xHarbour-developers mailing list
>>>>>>>> xHarbour-developers@lists.sourceforge.net
>>>>>>>> https://lists.sourceforge.net/lists/listinfo/xharbour- 
>>>>>>>> developers
>>>>>>> ---------------------------------------------------------------- 
>>>>>>> --
>>>>>>> --
>>>>>>> -----
>>>>>>> Check out the new SourceForge.net Marketplace.
>>>>>>> It's the best place to buy or sell services for
>>>>>>> just about anything Open Source.
>>>>>>> http://sourceforge.net/services/buy/index.php
>>>>>>> _______________________________________________
>>>>>>> xHarbour-developers mailing list
>>>>>>> xHarbour-developers@lists.sourceforge.net
>>>>>>> https://lists.sourceforge.net/lists/listinfo/xharbour-developers
>>>>>>>
>>>>> -- 
>>>>>  __________
>>>>> |  |  | |__| Maurilio Longo
>>>>> |_|_|_|____| farmaconsult s.r.l.
>>>>>
>>>>> 
>>>>>
>>>>> ------------------------------------------------------------------ 
>>>>> --
>>>>> --
>>>>> ---
>>>>> Check out the new SourceForge.net Marketplace.
>>>>> It's the best place to buy or sell services for
>>>>> just about anything Open Source.
>>>>> http://sourceforge.net/services/buy/index.php
>>>>> _______________________________________________
>>>>> xHarbour-developers mailing list
>>>>> xHarbour-developers@lists.sourceforge.net
>>>>> https://lists.sourceforge.net/lists/listinfo/xharbour-developers
>>>>
>>>>
>>>> ------------------------------------------------------------------- 
>>>> --
>>>> ----
>>>> Check out the new SourceForge.net Marketplace.
>>>> It's the best place to buy or sell services for
>>>> just about anything Open Source.
>>>> http://sourceforge.net/services/buy/index.php
>>>> _______________________________________________
>>>> xHarbour-developers mailing list
>>>> xHarbour-developers@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/xharbour-developers
>>> -- 
>>>  __________
>>> |  |  | |__| Maurilio Longo
>>> |_|_|_|____| farmaconsult s.r.l.
>>>
>>> 
>>>
>>> -------------------------------------------------------------------- 
>>> --
>>> ---
>>> Check out the new SourceForge.net Marketplace.
>>> It's the best place to buy or sell services for
>>> just about anything Open Source.
>>> http://sourceforge.net/services/buy/index.php
>>> _______________________________________________
>>> xHarbour-developers mailing list
>>> xHarbour-developers@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/xharbour-developers
>>
>>
>>
>> --------------------------------------------------------------------- 
>> ----
>> Check out the new SourceForge.net Marketplace.
>> It's the best place to buy or sell services for
>> just about anything Open Source.
>> http://sourceforge.net/services/buy/index.php
>> _______________________________________________
>> xHarbour-developers mailing list
>> xHarbour-developers@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/xharbour-developers
>
> -- 
>  __________
> |  |  | |__| Maurilio Longo
> |_|_|_|____| farmaconsult s.r.l.
>
> 
>
> ---------------------------------------------------------------------- 
> ---
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php
> _______________________________________________
> xHarbour-developers mailing list
> xHarbour-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/xharbour-developers



-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
xHarbour-developers mailing list
xHarbour-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xharbour-developers

Reply via email to