[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    Re: [calligra/export-mobi-moji] filters/words/mobi: Improve Th generateHeaders and palmDocCompressio
From:       Inge Wallin <inge () lysator ! liu ! se>
Date:       2012-09-15 5:40:30
Message-ID: 201209150740.30758.inge () lysator ! liu ! se
[Download RAW message or body]

On Saturday, September 15, 2012 00:29:35 Mojtaba Shahi Senobari wrote:
> Git commit 2e55c3f2b2981ad11a2ae86d1f547695ddb1fde8 by Mojtaba Shahi
> Senobari. Committed on 15/09/2012 at 00:26.
> Pushed by mojtabashahi into branch 'export-mobi-moji'.
> 
> Improve Th generateHeaders and palmDocCompression.
> 
> M  +4    -2    filters/words/mobi/MobiHeaderGenerator.cpp
> M  +3    -4    filters/words/mobi/PalmDocCompression.cpp
> 
> http://commits.kde.org/calligra/2e55c3f2b2981ad11a2ae86d1f547695ddb1fde8
> 
> diff --git a/filters/words/mobi/MobiHeaderGenerator.cpp
> b/filters/words/mobi/MobiHeaderGenerator.cpp index 7f79666..af3b22d 100644
> --- a/filters/words/mobi/MobiHeaderGenerator.cpp
> +++ b/filters/words/mobi/MobiHeaderGenerator.cpp
> @@ -192,7 +192,7 @@ void MobiHeaderGenerator::generatePalmDataBase()
>          }
>          else {
>              // Our Text has more than one record.
> -            int records = m_rawTextSize / 4;
> +            int records = m_rawTextSize / 4096;
> 

Shouldn't that be:

 int records = (m_rawTextSize + 4095) / 4096;

I mean if it's (say) 100 bytes long it should be 1 record, not 0, right?
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic