[sword-devel] VerseKey.java

Bobby Nations sword-devel@crosswire.org
Wed, 26 Dec 2001 13:09:29 -0600


--------------070000020409010400060104
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Troy,

Thanks for the answers to my question.  I've got some other thoughts and 
responses buried below.

Cheers,

Bobby


Troy A. Griffitts wrote:

>Bobby,
>
>>long         *VerseKey::offsets[2][2]  = {{VerseKey::otbks,
>>VerseKey::otcps}, {VerseKey::ntbks, VerseKey::ntcps}};
>>
>
>long *[][] is 3 dimensional (notice the *) just use long[][][]
>
Doh!  I missed the asterisk entirely.  Shame on me for letting my C/C++ 
skills deteriorate so badly :-(

>
>The first 2 dimensions are constant; the last is different for each
>entry.
>
Uh oh.  This might cause problems since Java arrays are constant size 
once defined.  I'll look at implementing as Vectors instead.

>
>
><snip>
>
>nt.vss is an index file that contains a series of 6 byte records that
>store u32 offset; u16 size;  so it might look something like:
>
>offset	size
>  0	 50
> 50	120
>170	 30
>200	 45
>...
>
Since Java doesn't have unsigned variable types, I'll probably have to 
do something slightly different here.   Shouldn't be too hard, though. 
 "Small hurdle for a high stepper" as my Mom was fond of saying during 
my formative years :-)

>
><snip>
>
>
>Hope this helps.
>	-Troy.
>
Yes, it helps tremendously!  Now, I'll be able to get my arms around the 
rest of the code and at least have a conceptual understanding of what 
the author's intent was.  That's always the toughest challenge, in my 
opinion.

Thanks,

Bobby

--------------070000020409010400060104
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<html>
<head>
</head>
<body>
Troy,<br>
<br>
Thanks for the answers to my question. &nbsp;I've got some other thoughts and
responses buried below.<br>
<br>
Cheers,<br>
<br>
Bobby<br>
<br>
<br>
Troy A. Griffitts wrote:<br>
<blockquote type="cite" cite="mid:3C29937E.A2B8ADB1@crosswire.org">
  <pre wrap="">Bobby,<br><br></pre>
  <blockquote type="cite">
    <pre wrap="">long         *VerseKey::offsets[2][2]  = {{VerseKey::otbks,<br>VerseKey::otcps}, {VerseKey::ntbks, VerseKey::ntcps}};<br></pre>
    </blockquote>
    <pre wrap=""><!----><br>long *[][] is 3 dimensional (notice the *) just use long[][][]</pre>
    </blockquote>
Doh! &nbsp;I missed the asterisk entirely. &nbsp;Shame on me for letting my C/C++ skills
deteriorate so badly :-(<br>
    <blockquote type="cite" cite="mid:3C29937E.A2B8ADB1@crosswire.org">
      <pre wrap=""><br>The first 2 dimensions are constant; the last is different for each<br>entry.</pre>
      </blockquote>
Uh oh. &nbsp;This might cause problems since Java arrays are constant size once
defined. &nbsp;I'll look at implementing as Vectors instead. <br>
      <blockquote type="cite" cite="mid:3C29937E.A2B8ADB1@crosswire.org">
        <pre wrap=""><br><br>&lt;snip&gt;<br><br>nt.vss is an index file that contains a series of 6 byte records that<br>store u32 offset; u16 size;  so it might look something like:<br><br>offset	size<br>  0	 50<br> 50	120<br>170	 30<br>200	 45<br>...<br></pre>
        </blockquote>
Since Java doesn't have unsigned variable types, I'll probably have to do
something slightly different here. &nbsp; Shouldn't be too hard, though. &nbsp;"Small
hurdle for a high stepper" as my Mom was fond of saying during my formative
years :-)<br>
        <blockquote type="cite" cite="mid:3C29937E.A2B8ADB1@crosswire.org">
          <pre wrap=""><br>&lt;snip&gt;<br><br><br>Hope this helps.<br>	-Troy.</pre>
          <blockquote type="cite">
            <pre wrap=""></pre>
            </blockquote>
            </blockquote>
Yes, it helps tremendously! &nbsp;Now, I'll be able to get my arms around the
rest of the code and at least have a conceptual understanding of what the
author's intent was. &nbsp;That's always the toughest challenge, in my opinion.<br>
            <br>
Thanks,<br>
            <br>
Bobby<br>
            </body>
            </html>

--------------070000020409010400060104--