<< Previous | Next >>

log_prev

int log_prev( LogDest ldst, LogEntry * le );

Description

Retrieve previous 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, 1);     // seek to end
log_prev(ldst, &L);    // get last entry
log_prev(ldst, &L);    // get 2nd last entry
log_next(ldst, &L);    // get 2nd last entry again
log_next(ldst, &L);    // get last entry
log_next(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 = Start of log or not open
-2 = Not a readable log destination class

Library

log.lib

See Also

log_seek, log_next


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