axl main logo
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Modules Pages
const char * axl_stream_get_near_to ( axlStream stream,
int  count 

Allows to get current status of the given stream, taking the current index, getting an amount of count bytes before and after the given index.

This function is mainly used to get a piece of the stream at the given position while reporting errors. This allows to show the piece of xml that is failing.

The string return must not be deallocated. Value returned is actually managed by the stream object associated.

streamThe stream where the near to operation will be performed.
countThe amount of bytes to take.
A string that is taken counting bytes with provided count value starting from the index. Stream provided must be not NULL and count value must be greater than 0.

References axl_free(), axl_new, and axl_return_val_if_fail.

Referenced by axl_error_new().