PureBytes Links
Trading Reference Links
|
Hello,
Since Joe does not seem to be available as of now,
I have added 2-line bug fix to the Osaka plugin source code,
compiled and posted it to ambroker-dll list as well
as to 3rd party zone at <A
href="">http://www.amibroker.net/3rdparty.php
<FONT
face=Arial size=2>
BTW: the constructor code you mention is correct
and does not need to be changed.
In fact it should NOT be changed here because it
would extremely increase the initial memory allocation.
The 128 column here is just initial value that is
dynamically increased when necessary.
Dynamic growing worked everywhere except osTabLoad
(it was simply not called there by mistake),
what I have done is just added table growing in
osTabLoad
BOOL COsakaTable::Load(LPCTSTR
pszFileName){ FILE *fh = fopen( pszFileName, "rb" );
if( fh ) { char
buffer[ 8 ];
fread( buffer, 8, 1, fh ); // read
header signature
if( strncmp( buffer, "OSAKTABL", 8 )
) { // invalid
header fclose( fh ); return
FALSE; }
FreeEntries();
// read table
information fread( &m_iNumColumns, sizeof( m_iNumColumns ),
1, fh ); fread( &m_iCurRowLen, sizeof( m_iCurRowLen ), 1, fh
);
// TJ: added
growing if necessary if( m_iNumColumns >= m_iMaxColumns )
{ AllocColumnStorage( m_iNumColumns
); }
Best regards,Tomasz Janeczkoamibroker.com
<BLOCKQUOTE
>
----- Original Message -----
<DIV
>From:
Dave Merrill
To: <A title=amibroker@xxxxxxxxxxxxxxx
href="">amibroker@xxxxxxxxxxxxxxx
Sent: Monday, June 21, 2004 2:32 PM
Subject: RE: [amibroker] Osaka plugin
crash loading saved table with > 128 columns (not an AB bug)
<SPAN
class=641025011-21062004>Hi Stephan, I'm waiting to be approved by the dll
group moderator, but dingo kindly sent me the files
yesterday.
<SPAN
class=641025011-21062004>
<SPAN
class=641025011-21062004>And thanks for the info on how to increase the number
of columns, but I'm confused. Here's that section of code, from the souce
dingo sent:
<SPAN
class=641025011-21062004>
<SPAN
class=641025011-21062004>COsakaTable::COsakaTable(){ m_aiColumnOffsets
= NULL; m_aiColumnTypes = NULL; m_aiColumnSizes =
NULL; m_iCurRowLen = 0; m_iNumColumns =
0; m_iMaxColumns = 0; AllocColumnStorage( 128
);}
<SPAN
class=641025011-21062004>
<SPAN
class=641025011-21062004>What's confusing is that as I've said, Osaka 104 can
*already* have an unlimited number of columns; I've actually tested with
10,000. How can that be, given this line, if, as you suggest, it controls the
maximum number of columns:
<SPAN
class=641025011-21062004>
<SPAN
class=641025011-21062004> AllocColumnStorage( 128
)
<SPAN
class=641025011-21062004>
<SPAN
class=641025011-21062004>The only problem I'm aware of is in loading a table
saved with more than 128 columns. Saving doesn't crash by itself, but could
still be doing something incorrectly that causes the crash on load. I don't
see anything in either the save or load routines that obviously assumes 128
columns max, but as I've said, I'm not a C++ programmer.
<SPAN
class=641025011-21062004>
<SPAN
class=641025011-21062004>(I have to admit, having the source in hand almost
makes me want to learn at least enough to get this fixed, and to add those
Find runctions I mentioned. And maybe add osTabSetRowArray, to load an entire
table row from an AB array in one shot, at compiled C++ speed instead of an AB
loop over each element. Does this download:
<SPAN
class=641025011-21062004> <FONT
face="Courier New" color=#0000ff size=2><A
href="">http://msdn.microsoft.com/visualc/vctoolkit2003/
<SPAN
class=641025011-21062004>contain a compatible and free compiler, without going
to BitTorrent?)
<SPAN
class=641025011-21062004>
<SPAN
class=641025011-21062004>Thanks again,
<SPAN
class=641025011-21062004>
<SPAN
class=641025011-21062004>Dave
<BLOCKQUOTE
>
Hi Dave, the workspace of asaka plugin is in
the file section of ami dll group
once you have download it
you can recompile it with microsoft visual c++
that you can download for free with bittorrent at <A
href="">http://www.suprnova.org/
you can modify it and increase the number of
columns in osakatable.cpp
where you can read the
declarations
just change AllocColumnStorage( 2147483647
);
to the maximum value for int is 2147483647
<FONT face=Arial
size=2>////////////////////////////////////////////////////////////////////////
Construction/Destruction//////////////////////////////////////////////////////////////////////
<FONT face=Arial
size=2>COsakaTable::COsakaTable(){ m_aiColumnOffsets =
NULL; m_aiColumnTypes = NULL; m_aiColumnSizes =
NULL; m_iCurRowLen = 0; m_iNumColumns =
0; m_iMaxColumns = 0; AllocColumnStorage( 2147483647
);}
COsakaTable::~COsakaTable(){ free(
m_aiColumnOffsets ); free( m_aiColumnTypes ); free(
m_aiColumnSizes );
FreeEntries();
<FONT face=Arial
size=2>}Check
AmiBroker web page at:<A
href="">http://www.amibroker.com/Check
group FAQ at: <A
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Check AmiBroker web page at:
http://www.amibroker.com/
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Yahoo! Groups Sponsor
ADVERTISEMENT
Yahoo! Groups Links
To visit your group on the web, go to:http://groups.yahoo.com/group/amibroker/
To unsubscribe from this group, send an email to:amibroker-unsubscribe@xxxxxxxxxxxxxxx
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
|