MKI_FileReadLine (File I/O)

www.CAD6.com

C++ Syntax

bool

MKI_FileReadLine(

 LPSTR f_pData,

 const size_t f_unSize );

 

Reads from the current position of the read cache to the next end-of-line and copies the data read into a buffer.

 

Parameters

Data

[LPSTR] Address of a text buffer to receive the line read from the file. The line can either be ended by a CR (Ansi 13), a LF (Ansi 10) or a combination of both. This is not influenced by the Newline value of the current MKI_FileReadDelimiters!

Size

[const size_t] Size of the text buffer, i.e. maximum number of characters to read plus one.

 

Return Value

Returns true if the text line has been read successfully, else false (indicating end-of-file or line too long to fit into the buffer). Additionally, the return value of MKI_FileReadError will be set to true if an error occurred.

 

Comment

This procedure relies on a high-performance read cache previously established by either MKI_FileReadInitDisk, MKI_FileReadInitDiskOffset or MKI_FileReadInitMemory. As a result, it will fail if this cache is currently not activated!

 

CAD6interface 2025.0 - Copyright 2025 Malz++Kassner® GmbH