[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdegraphics/kghostview
From: Luís Pedro Coelho <luis () luispedro ! org>
Date: 2004-05-16 23:44:53
Message-ID: 20040516234453.4B7032299 () office ! kde ! org
[Download RAW message or body]
CVS commit by luis_pedro:
Clean up and use the correct buffer size (probably speeds things up too):
char buf[256];
-while( ( count = fread( buf, 1, 1, fp ) ) != 0 )
+while( ( count = fread( buf, 1, sizeof( buf ), fp ) ) != 0 )
M +2 -2 kgvdocument.cpp 1.27
--- kdegraphics/kghostview/kgvdocument.cpp #1.26:1.27
@@ -307,5 +307,5 @@ void KGVDocument::scanDSC()
clock.start();
*/
- while( ( count = fread( buf, sizeof(char), 4096, _psFile ) ) != 0 )
+ while( ( count = fread( buf, sizeof(char), sizeof( buf ), _psFile ) ) != 0 )
{
_dsc->scanData( buf, count );
@@ -677,5 +677,5 @@ bool KGVDocument::psCopyDoc( const QStri
int count;
dsc = dsc_init( 0 );
- while( ( count = fread( buf, 1, 1, fp ) ) != 0 )
+ while( ( count = fread( buf, 1, sizeof( buf ), fp ) ) != 0 )
dsc_scan_data( dsc, buf, count );
dsc_fixup( dsc );
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic