equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2000, 2004 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2000, 2004, 2010 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of "Eclipse Public License v1.0" |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
517 |
517 |
518 HBufC8* tempBuf = HBufC8::NewL(neededLengthToFind); |
518 HBufC8* tempBuf = HBufC8::NewL(neededLengthToFind); |
519 TDes8 tempDes = tempBuf->Des(); |
519 TDes8 tempDes = tempBuf->Des(); |
520 |
520 |
521 // Read data to a buffer from iPointer to end of file |
521 // Read data to a buffer from iPointer to end of file |
522 Read(currentPlace, tempDes, neededLengthToFind); |
522 TInt readErr = Read(currentPlace, tempDes, neededLengthToFind); |
|
523 if (readErr) |
|
524 { |
|
525 delete tempBuf; |
|
526 tempBuf = NULL; |
|
527 return readErr; |
|
528 } |
523 |
529 |
524 // Find the next new line character |
530 // Find the next new line character |
525 newLinePlace = tempDes.Find(newLine); |
531 newLinePlace = tempDes.Find(newLine); |
526 // If not found, return the whole area. |
532 // If not found, return the whole area. |
527 if (newLinePlace == KErrNotFound) |
533 if (newLinePlace == KErrNotFound) |