<< Previous | Next >>

log_next

int log_next( LogDest ldst, LogEntry * le );

Description

Retrieve next log entry. You must call log_seek() before calling this function the first time. Retrieval of stored log messages proceeds, for example, as follows:

   

log_seek(ldst, 0);     // seek to start
log_next(ldst, &L);    // get 1st entry
log_next(ldst, &L);    // get 2nd entry
log_prev(ldst, &L);    // get 2nd entry again
log_prev(ldst, &L);    // get 1st entry
log_prev(ldst, &L);    // returns -1
NOTE Please see the comments at the top of log.lib for a description of the message logging subsystem.

Parameters

ldst
Destination class and stream. Use one of the constants LOG_DEST_FS2 or LOG_DEST_XMEM, then OR in the stream number (0-63).

le
Storage for result.

Return Value

non-negative: length of log entry data
-1: End of log or not open
-2: Not a readable log destination class

Library

log.lib

See Also

log_seek, log_prev


Dynamic C Functions << Previous | Next >> rabbit.com