Read all 32K out of the file into a record. Then remove the last several
bytes (up to 100), storing them in a buffer. For the next record, start by
emptying this buffer, and then read more from the file. Theoretically, you
could use another file stream for the buffer, but since it's limited to <=
100 bytes, you don't really need to. I'd use a MemPtrNew'ed chunk for the
buffer.
--
Danny Epstein
OS Engineer, Palm Inc.
"Paul Nevai" <[EMAIL PROTECTED]> wrote in message
news:37598@palm-dev-forum...
>
> I have a file which is open in the fileOpDestructiveReadMode and I want to
> split it up into several regular 32K sized Palm records using FileDmRead.
> This is easy.
>
> The trick is that I want to split it up into approximately 32K sized
records
> so that the split happens exactly which we have a space character
"chrSpace"
> within 32K plus at most 100, or, if not, then we split it at exactly 32K.
>
> Is this doable? How? I must have fileOpDestructiveReadMode.
>
> I see one rather cumbersome solution. 1st spilt it up into 32K records and
> then adjust the records which are not split exactly at space characters.
>
> Is there a more elegant way of doing it? How could I read ahead and the
> rewind if I am in fileOpDestructiveReadMode?
>
> Thanks! Best regards, Paul
>
>
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/