equal
deleted
inserted
replaced
150 // cast that to TInt* |
150 // cast that to TInt* |
151 TUint32* ptr_as_tint = reinterpret_cast< TUint32* >( ptr_in_chunk ); |
151 TUint32* ptr_as_tint = reinterpret_cast< TUint32* >( ptr_in_chunk ); |
152 // assign the addres to TInt |
152 // assign the addres to TInt |
153 TUint32 new_value = reinterpret_cast< TUint32 >( aValue ); |
153 TUint32 new_value = reinterpret_cast< TUint32 >( aValue ); |
154 // ensure we're byte aligned - ARM requires 32 bit alignment to machine word |
154 // ensure we're byte aligned - ARM requires 32 bit alignment to machine word |
155 // boundary!! |
155 // boundary |
156 TInt remainder = new_value % KBytesInAWord; |
156 TInt remainder = new_value % KBytesInAWord; |
157 if ( remainder > 0 ) |
157 if ( remainder > 0 ) |
158 { |
158 { |
159 new_value += ( KBytesInAWord - remainder ); |
159 new_value += ( KBytesInAWord - remainder ); |
160 } |
160 } |
189 // cast that to TInt* |
189 // cast that to TInt* |
190 TUint32* ptr_as_tint = reinterpret_cast< TUint32* >( ptr_in_chunk ); |
190 TUint32* ptr_as_tint = reinterpret_cast< TUint32* >( ptr_in_chunk ); |
191 // assign the addres to TInt |
191 // assign the addres to TInt |
192 TUint32 new_value = reinterpret_cast< TUint32 >( aValue ); |
192 TUint32 new_value = reinterpret_cast< TUint32 >( aValue ); |
193 // ensure we're byte aligned - ARM requires 32 bit alignment to machine word |
193 // ensure we're byte aligned - ARM requires 32 bit alignment to machine word |
194 // boundary!! |
194 // boundary |
195 TInt remainder = new_value % KBytesInAWord; |
195 TInt remainder = new_value % KBytesInAWord; |
196 if ( remainder > 0 ) |
196 if ( remainder > 0 ) |
197 { |
197 { |
198 new_value += ( KBytesInAWord - remainder ); |
198 new_value += ( KBytesInAWord - remainder ); |
199 } |
199 } |
238 if ( id == TObjectId( 0 ) ) |
238 if ( id == TObjectId( 0 ) ) |
239 { |
239 { |
240 // no id set, so reserve this for us and use this chunk |
240 // no id set, so reserve this for us and use this chunk |
241 iLogUtility.SetId( aId ); |
241 iLogUtility.SetId( aId ); |
242 } |
242 } |
243 // check if our id was there? |
243 // check if our id was there |
244 else if( id != aId ) |
244 else if( id != aId ) |
245 { |
245 { |
246 // not our chunk, try second chunk in read-write mode |
246 // not our chunk, try second chunk in read-write mode |
247 err = iLogUtility.Open( KLogChunk2Name(), EFalse ); |
247 err = iLogUtility.Open( KLogChunk2Name(), EFalse ); |
248 if ( err != KErrNone ) |
248 if ( err != KErrNone ) |
395 TInt err = aFile.Seek( ESeekEnd, pos ); |
395 TInt err = aFile.Seek( ESeekEnd, pos ); |
396 User::LeaveIfError( err ); |
396 User::LeaveIfError( err ); |
397 TPtr8 logEntryPtr( 0, 0 ); |
397 TPtr8 logEntryPtr( 0, 0 ); |
398 TInt logEntrySize = 0; |
398 TInt logEntrySize = 0; |
399 |
399 |
400 // what's previously been logged to the file? |
400 // Holds what's previously been logged to the file |
401 TUint8* lastLoggedAddress = aUtility.LastLoggedAddress(); |
401 TUint8* lastLoggedAddress = aUtility.LastLoggedAddress(); |
402 |
402 |
403 // how much more has been added to the chunk? |
403 // Holds how much more has been added to the chunk |
404 TUint8* currentAddress = aUtility.CurrentAddress(); |
404 TUint8* currentAddress = aUtility.CurrentAddress(); |
405 |
405 |
406 // write each of the chunk's logged entries to the file |
406 // write each of the chunk's logged entries to the file |
407 TInt32* sizePtr = NULL; |
407 TInt32* sizePtr = NULL; |
408 while ( currentAddress != lastLoggedAddress && err == KErrNone ) |
408 while ( currentAddress != lastLoggedAddress && err == KErrNone ) |