New capability to redirect program output used for toc in sector map file

This commit is contained in:
2008-08-13 19:08:07 +00:00
parent e780ca1dfc
commit 9b7caaafef
6 changed files with 575 additions and 267 deletions

View File

@ -150,6 +150,96 @@ int Xorriso_process_msg_queues(struct XorrisO *xorriso, int flag);
/* The outlist stack allows to redirect the info and result messages from
their normal channels into a pair of string lists which can at some
later time be retrieved by the application.
These redirection caches can be stacked to allow stacked applications.
*/
/* A list item able of forming double chained lists */
struct Xorriso_lsT;
/** Maximum number of stacked redirections */
#define Xorriso_max_outlist_stacK 32
/** Enable a new redirection of info and result channel. The normal message
output and eventual older redirections will not see new messages until
the redirection is ended by a call to Xorriso_pull_outlists() with the
stack_handle value returned by this call.
Redirected output is not written to the files of Xorriso_option_logfile()
and the Xorriso_option_pkt_output() protocol will not be applied.
@param xorriso The environment handle
@param stack_handle returns an id number which is unique as long as
its redirection is stacked. It may be re-used after
its redirection was pulled from the stack.
@param flag unused yet, submit 0
@return 1 on success, <=0 if failure
*/
int Xorriso_push_outlists(struct XorrisO *xorriso, int *stack_handle,
int flag);
/** Disable the redirection given by stack_handle. If it was the current
receiver of messages then switch output to the next older redirection.
The messages collected by the disabled redirection are handed out as
two lists. Both lists have to be disposed via Xorriso_lst_destroy_all()
when they are no longer needed.
The message lists are either NULL or represented by their first
Xorriso_lsT item.
@param xorriso The environment handle
@param stack_handle The id number returned by Xorriso_push_outlists()
@param result_list Result and mark messages (usually directed to stdout)
@param info_list Info and mark messages (usually directed to stderr)
@param flag unused yet, submit 0
@return 1 on success, <=0 if failure
*/
int Xorriso_pull_outlists(struct XorrisO *xorriso, int stack_handle,
struct Xorriso_lsT **result_list,
struct Xorriso_lsT **info_list, int flag);
/** Obtain the text message from the current list item.
@param entry The current list item
@param flag unused yet, submit 0
@return pointer to the text content of the list item.
This pointer does not have to be freed.
*/
char *Xorriso_lst_get_text(struct Xorriso_lsT *entry, int flag);
/** Obtain the address of the next item in the chain of messages.
An iteration over the output of Xorriso_pull_outlists() starts at the
returned result_list resp. info_list and ends when this function returns
NULL.
@param entry The current list item
@param flag unused yet, submit 0
@return pointer to the next list item or NULL if end of list
This pointer does not have to be freed.
*/
struct Xorriso_lsT *Xorriso_lst_get_next(struct Xorriso_lsT *entry, int flag);
/** Obtain the address of the previous item in the chain of messages.
@param entry The current list item
@param flag unused yet, submit 0
@return pointer to the previous list item or NULL if start of list
This pointer does not have to be freed.
*/
struct Xorriso_lsT *Xorriso_lst_get_prev(struct Xorriso_lsT *entry, int flag);
/** Destroy all list items which are directly or indirectly connected to
the given link item.
Apply this to each of the two list handles obtained by
Xorriso_pull_outlists() when the lists are no longer needed.
@param lstring pointer to the pointer to be freed and set to NULL
@param flag unused yet, submit 0
@return 0= *lstring was alredy NULL, 1= ok
*/
int Xorriso_lst_destroy_all(struct Xorriso_lsT **lstring, int flag);
/* ---------------------------- Options API ------------------------ */
/* See man 1 xorriso for explanation of the particular options */
/*