xorriso  1.5.4.pl02
About: GNU xorriso creates, loads, manipulates and writes ISO 9660 filesystem images with Rock Ridge extensions. It is suitable for incremental data backup and for production of bootable ISO 9660 images. GNU xorriso is a statical compilation of the libraries libburn, libisofs, libisoburn, and libjte.
  Fossies Dox: xorriso-1.5.4.pl02.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

text_io.c File Reference
#include <ctype.h>
#include <sys/types.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <time.h>
#include <errno.h>
#include <signal.h>
#include <pthread.h>
#include <fcntl.h>
#include <iconv.h>
#include <langinfo.h>
#include <locale.h>
#include "xorriso.h"
#include "xorriso_private.h"
#include "xorrisoburn.h"
Include dependency graph for text_io.c:

Go to the source code of this file.

Data Structures

struct  Xorriso_msg_filteR
 
struct  Xorriso_msg_sievE
 

Macros

#define O_BINARY   0
 

Functions

int Xorriso_protect_stdout (struct XorrisO *xorriso, int flag)
 
int Xorriso_dialog_input (struct XorrisO *xorriso, char line[], int linesize, int flag)
 
int Xorriso_request_confirmation (struct XorrisO *xorriso, int flag)
 
int Xorriso_read_lines (struct XorrisO *xorriso, FILE *fp, int *linecount, int *argc, char ***argv, int flag)
 
int Xorriso_predict_linecount (struct XorrisO *xorriso, char *line, int *linecount, int flag)
 
int Xorriso_pager (struct XorrisO *xorriso, char *line, int flag)
 
static int Xorriso_obtain_lock (struct XorrisO *xorriso, pthread_mutex_t *lock_handle, char *purpose, int flag)
 
static int Xorriso_release_lock (struct XorrisO *xorriso, pthread_mutex_t *lock_handle, char *purpose, int flag)
 
static int Xorriso_lock_outlists (struct XorrisO *xorriso, int flag)
 
static int Xorriso_unlock_outlists (struct XorrisO *xorriso, int flag)
 
static int Xorriso_write_to_msglist (struct XorrisO *xorriso, struct Xorriso_lsT **xorriso_msglist, char *text, int flag)
 
int Xorriso_write_to_channel (struct XorrisO *xorriso, char *in_text, int channel_no, int flag)
 
int Xorriso_push_outlists (struct XorrisO *xorriso, int *stack_handle, int flag)
 
int Xorriso_fetch_outlists (struct XorrisO *xorriso, int stack_handle, struct Xorriso_lsT **result_list, struct Xorriso_lsT **info_list, int flag)
 
int Xorriso_peek_outlists (struct XorrisO *xorriso, int stack_handle, int timeout, int flag)
 
int Xorriso_pull_outlists (struct XorrisO *xorriso, int stack_handle, struct Xorriso_lsT **result_list, struct Xorriso_lsT **info_list, int flag)
 
int Xorriso_info_handler_stderr (void *handle, char *text)
 
int Xorriso_result_handler_stdout (void *handle, char *text)
 
int Xorriso_result_handler_pkt (void *handle, char *text)
 
int Xorriso_process_msg_lists (struct XorrisO *xorriso, struct Xorriso_lsT *result_list, struct Xorriso_lsT *info_list, int *line_count, int flag)
 
static void * Xorriso_msg_watcher (void *state_pt)
 
int Xorriso_start_msg_watcher (struct XorrisO *xorriso, int(*result_handler)(void *handle, char *text), void *result_handle, int(*info_handler)(void *handle, char *text), void *info_handle, int flag)
 
int Xorriso_stop_msg_watcher (struct XorrisO *xorriso, int flag)
 
int Xorriso_msg_filter_destroy (struct Xorriso_msg_filteR **o, int flag)
 
int Xorriso_msg_filter_new (struct Xorriso_msg_filteR **o, char *name, struct Xorriso_msg_filteR *prev, struct Xorriso_msg_filteR *next, int flag)
 
int Xorriso_msg_filter_set_words (struct Xorriso_msg_filteR *m, int num_words, int *word_idx, int flag)
 
int Xorriso_msg_sieve_new (struct Xorriso_msg_sievE **o, int flag)
 
int Xorriso_msg_sieve_destroy (struct Xorriso_msg_sievE **o, int flag)
 
int Xorriso_sieve_add_filter (struct XorrisO *xorriso, char *name, int channels, char *prefix, char *separators, int num_words, int *word_idx, int max_results, int flag)
 
int Xorriso_sieve_dispose (struct XorrisO *xorriso, int flag)
 
int Xorriso_sieve_clear_results (struct XorrisO *xorriso, int flag)
 
int Xorriso_sieve_get_result (struct XorrisO *xorriso, char *name, int *argc, char ***argv, int *available, int flag)
 
int Xorriso_sieve_big (struct XorrisO *xorriso, int flag)
 
int Xorriso_sieve_filter_msg (struct XorrisO *xorriso, char *msg, int flag)
 
int Xorriso_result (struct XorrisO *xorriso, int flag)
 
int Xorriso_info (struct XorrisO *xorriso, int flag)
 
int Xorriso_mark (struct XorrisO *xorriso, int flag)
 
int Xorriso_restxt (struct XorrisO *xorriso, char *text)
 
int Xorriso_process_errfile (struct XorrisO *xorriso, int error_code, char msg_text[], int os_errno, int flag)
 
int Xorriso_msgs_submit (struct XorrisO *xorriso, int error_code, char msg_text[], int os_errno, char severity[], int flag)
 
int Xorriso_msgs_submit_void (void *xorriso, int error_code, char msg_text[], int os_errno, char severity[], int flag)
 
int Xorriso_reassure (struct XorrisO *xorriso, char *cmd, char *which_will, int flag)
 
int Xorriso_write_session_log (struct XorrisO *xorriso, int flag)
 
int Xorriso_status_filter (struct XorrisO *xorriso, char *filter, char *line, int flag)
 
int Xorriso_status_result (struct XorrisO *xorriso, char *filter, FILE *fp, int flag)
 
int Xorriso_boot_status_sysarea (struct XorrisO *xorriso, char *filter, FILE *fp, int flag)
 
static char * Xorriso__speedname (int speed)
 
int Xorriso_status (struct XorrisO *xorriso, char *filter, FILE *fp, int flag)
 
int Xorriso_pacifier_reset (struct XorrisO *xorriso, int flag)
 
int Xorriso_pacifier_callback (struct XorrisO *xorriso, char *what_done, off_t count, off_t todo, char *current_object, int flag)
 
int Xorriso_reset_counters (struct XorrisO *xorriso, int flag)
 
int Xorriso_no_malloc_memory (struct XorrisO *xorriso, char **to_free, int flag)
 
int Xorriso_much_too_long (struct XorrisO *xorriso, int len, int flag)
 
int Xorriso_no_findjob (struct XorrisO *xorriso, char *cmd, int flag)
 
int Xorriso_report_md5_outcome (struct XorrisO *xorriso, char *severity, int flag)
 
int Xorriso_msg_op_parse (struct XorrisO *xorriso, char *line, char *prefix, char *separators, int max_words, int pflag, int input_lines, int flag)
 
int Xorriso_msg_op_parse_bulk (struct XorrisO *xorriso, char *prefix, char *separators, int max_words, int pflag, int bulk_lines, int flag)
 
int Xorriso_launch_frontend (struct XorrisO *xorriso, int argc, char **argv, char *cmd_pipe_adr, char *reply_pipe_adr, int flag)
 
int Xorriso_open_named_pipe (struct XorrisO *xorriso, char fd_names[3][20], int mem_fds[], char *pipe_paths[], int pipe_fds[], int i, int flag)
 
int Xorriso_named_pipe_loop (struct XorrisO *xorriso, char *pipe_paths[3], int flag)
 
char * Xorriso_esc_filepath (struct XorrisO *xorriso, char *in_text, char *out_text, int flag)
 
int Xorriso_set_info_text (struct XorrisO *xorriso, char *text, size_t trunc_len, int flag)
 

Macro Definition Documentation

◆ O_BINARY

#define O_BINARY   0

Definition at line 31 of file text_io.c.

Function Documentation

◆ Xorriso__speedname()

static char* Xorriso__speedname ( int  speed)
static

Definition at line 2745 of file text_io.c.

Referenced by Xorriso_status().

◆ Xorriso_boot_status_sysarea()

int Xorriso_boot_status_sysarea ( struct XorrisO xorriso,
char *  filter,
FILE *  fp,
int  flag 
)

◆ Xorriso_dialog_input()

◆ Xorriso_esc_filepath()

char* Xorriso_esc_filepath ( struct XorrisO xorriso,
char *  in_text,
char *  out_text,
int  flag 
)

◆ Xorriso_fetch_outlists()

int Xorriso_fetch_outlists ( struct XorrisO xorriso,
int  stack_handle,
struct Xorriso_lsT **  result_list,
struct Xorriso_lsT **  info_list,
int  flag 
)

Obtain the currently collected text messages of redirected info and result channel. The messages 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.

This call is safe for being used by a concurrent thread while a xorriso API call is being executed on the same struct XorrisO. In such a situation, it should not be used with high frequency in order not to hamper the ongoing xorriso operation by blocking its message output facility. A hundred times per second should be enough.

Since
1.2.6
Parameters
xorrisoThe environment handle
stack_handleAn id number returned by Xorriso_push_outlists() and not yet revoked by Xorriso_pull_outlists(). Submit -1 to address the most recent valid id.
result_listResult and mark messages (usually directed to stdout)
info_listInfo and mark messages (usually directed to stderr)
flagBitfield for control purposes bit0= fetch result channel bit1= fetch info channel If bit0 and bit1 are 0, both channels get fetched.
Returns
1 on success, <=0 if failure

Definition at line 1206 of file text_io.c.

References XorrisO::info_msglists, XorrisO::msglist_stackfill, XorrisO::result_msglists, Xorriso_lock_outlists(), Xorriso_msgs_submit(), Xorriso_process_msg_queues(), and Xorriso_unlock_outlists().

Referenced by Xorriso_interpreter(), and Xorriso_msg_watcher().

◆ Xorriso_info()

int Xorriso_info ( struct XorrisO xorriso,
int  flag 
)

Definition at line 2367 of file text_io.c.

References XorrisO::bar_is_fresh, XorrisO::info_text, XorrisO::request_to_abort, Xorriso__text_to_sev(), Xorriso_pager(), and Xorriso_write_to_channel().

Referenced by Xorriso_aquire_drive(), Xorriso_blank_media(), Xorriso_burn_track(), Xorriso_cdrskin(), Xorriso_cdrskin_help(), Xorriso_check_session_md5(), Xorriso_clone_tree(), Xorriso_dialog(), Xorriso_dialog_input(), Xorriso_eval_problem_status(), Xorriso_execute_option(), Xorriso_extract_boot_images(), Xorriso_format_media(), Xorriso_genisofs(), Xorriso_genisofs_help(), Xorriso_give_up_drive(), Xorriso_ls(), Xorriso_ls_filev(), Xorriso_lsx_filev(), Xorriso_mark(), Xorriso_mkdir(), Xorriso_mount(), Xorriso_msg_op_parse(), Xorriso_msg_op_parse_bulk(), Xorriso_msgs_submit(), Xorriso_option_add(), Xorriso_option_cdi(), Xorriso_option_cdx(), Xorriso_option_check_media(), Xorriso_option_cpri(), Xorriso_option_cpx(), Xorriso_option_extract(), Xorriso_option_file_size_limit(), Xorriso_option_map(), Xorriso_option_mvi(), Xorriso_option_not_list(), Xorriso_option_options_from_file(), Xorriso_option_osirrox(), Xorriso_option_path_list(), Xorriso_option_print(), Xorriso_option_pwdi(), Xorriso_option_pwdx(), Xorriso_option_rmi(), Xorriso_option_update(), Xorriso_pager(), Xorriso_process_errfile(), Xorriso_process_msg_queues(), Xorriso_read_file_data(), Xorriso_reassure(), Xorriso_reassure_restore(), Xorriso_request_confirmation(), Xorriso_rmi(), Xorriso_show_devices(), Xorriso_toc_line(), and Xorriso_write_session().

◆ Xorriso_info_handler_stderr()

int Xorriso_info_handler_stderr ( void *  handle,
char *  text 
)

Definition at line 1354 of file text_io.c.

References XorrisO::stderr_fp.

Referenced by Xorriso_process_msg_lists().

◆ Xorriso_launch_frontend()

int Xorriso_launch_frontend ( struct XorrisO xorriso,
int  argc,
char **  argv,
char *  cmd_pipe_adr,
char *  reply_pipe_adr,
int  flag 
)

◆ Xorriso_lock_outlists()

static int Xorriso_lock_outlists ( struct XorrisO xorriso,
int  flag 
)
static

◆ Xorriso_mark()

◆ Xorriso_msg_filter_destroy()

◆ Xorriso_msg_filter_new()

◆ Xorriso_msg_filter_set_words()

int Xorriso_msg_filter_set_words ( struct Xorriso_msg_filteR m,
int  num_words,
int *  word_idx,
int  flag 
)

◆ Xorriso_msg_op_parse()

int Xorriso_msg_op_parse ( struct XorrisO xorriso,
char *  line,
char *  prefix,
char *  separators,
int  max_words,
int  pflag,
int  input_lines,
int  flag 
)

◆ Xorriso_msg_op_parse_bulk()

int Xorriso_msg_op_parse_bulk ( struct XorrisO xorriso,
char *  prefix,
char *  separators,
int  max_words,
int  pflag,
int  bulk_lines,
int  flag 
)

◆ Xorriso_msg_sieve_destroy()

int Xorriso_msg_sieve_destroy ( struct Xorriso_msg_sievE **  o,
int  flag 
)

◆ Xorriso_msg_sieve_new()

int Xorriso_msg_sieve_new ( struct Xorriso_msg_sievE **  o,
int  flag 
)

◆ Xorriso_msg_watcher()

◆ Xorriso_msgs_submit()

int Xorriso_msgs_submit ( struct XorrisO xorriso,
int  error_code,
char  msg_text[],
int  os_errno,
char  severity[],
int  flag 
)

Submit a problem message to the xorriso problem reporting and handling system. This will eventually increase problem status rank, which may at certain stages in the program be pardoned and reset to 0. The pardon is governed by Xorriso_option_abort_on() and by the anger of the affected program part. If no pardon has been given, then the problem status reaches the caller of option functions. Problem status should be inquired by Xorriso_eval_problem_status() and be reset before next option execution by Xorriso_set_problem_status(). The problem status itself does not cause the failure of option functions. But in case of failures for other reasons, a remnant overly severe problem status can cause overly harsh program reactions.

Parameters
xorrisoThe environment handle
error_codeThe unique error code of your message. Submit 0 if you do not have reserved error codes within the libburnia project.
msg_textNot more than 8196 characters of message text. A final newline character gets appended automatically.
os_errnoEventual errno related to the message. Submit 0 if the message is not related to a operating system error.
severityOne of "ABORT", "FATAL", "FAILURE", "MISHAP", "SORRY", "WARNING", "HINT", "NOTE", "UPDATE", "DEBUG". Defaults to "FATAL".
flagBitfield for control purposes bit0= use pager (as with result) bit1= permission to suppress output
Returns
1 if message was delivered, <=0 if failure

Definition at line 2504 of file text_io.c.

References XorrisO::info_text, XorrisO::problem_status, Xorriso_lsT::text, Xorriso__text_to_sev(), Xorriso_alloc_meM, Xorriso_free_meM, Xorriso_info(), Xorriso_process_errfile(), Xorriso_process_msg_queues(), Xorriso_set_problem_status(), and Xorriso_write_to_channel().

Referenced by Permstack_pop(), Sfile_prepend_path(), Xoriso_handle_collision(), Xorriso_add_mips_boot_file(), Xorriso_add_tree(), Xorriso_adjust_session_size(), Xorriso_afile_fopen(), Xorriso_alloc_pattern_mem(), Xorriso_append_extattr_comp(), Xorriso_append_scdbackup_record(), Xorriso_apply_sort_file(), Xorriso_aquire_drive(), Xorriso_assert_volid(), Xorriso_atip(), Xorriso_attach_boot_image(), Xorriso_auto_chmod(), Xorriso_auto_driveadr(), Xorriso_auto_format(), Xorriso_blank_as_needed(), Xorriso_blank_media(), Xorriso_burn_track(), Xorriso_cannot_clone(), Xorriso_cannot_create_iter(), Xorriso_cdrskin(), Xorriso_check_burn_abort(), Xorriso_check_for_abort(), Xorriso_check_for_root_pattern(), Xorriso_check_interval(), Xorriso_check_intvl_string(), Xorriso_check_matchcount(), Xorriso_check_md5(), Xorriso_check_media(), Xorriso_check_media_setup_job(), Xorriso_check_multi(), Xorriso_check_session_md5(), Xorriso_check_temp_mem_limit(), Xorriso_check_thing_len(), Xorriso_chunk_md5(), Xorriso_clone_tree(), Xorriso_clone_under(), Xorriso_close_damaged(), Xorriso_compare_2_files(), Xorriso_concat(), Xorriso_convert_datestring(), Xorriso_convert_gidstring(), Xorriso_convert_modstring(), Xorriso_convert_uidstring(), Xorriso_coordinate_system_area(), Xorriso_copy_implicit_properties(), Xorriso_count_args(), Xorriso_cpmv_args(), Xorriso_cut_out(), Xorriso_decode_load_adr(), Xorriso_dialog_input(), Xorriso_dir_from_path(), Xorriso_execv(), Xorriso_expand_disk_pattern(), Xorriso_expand_pattern(), Xorriso_external_filter(), Xorriso_external_filter_banned(), Xorriso_extract_boot_images(), Xorriso_extract_cut(), Xorriso_fetch_outlists(), Xorriso_findi_action(), Xorriso_findi_iter(), Xorriso_findx(), Xorriso_findx_action(), Xorriso_format_media(), Xorriso_genisofs(), Xorriso_genisofs_fused_options(), Xorriso_genisofs_hide_list(), Xorriso_genisofs_ignore(), Xorriso_genisofs_platform(), Xorriso_get_attrs(), Xorriso_get_drive_handles(), Xorriso_get_volume(), Xorriso_getfacl(), Xorriso_give_up_drive(), Xorriso_gpt_crc(), Xorriso_graft_in(), Xorriso_graft_split(), Xorriso_graftable_pathspec(), Xorriso_handle_collision(), Xorriso_hfsplus_bless(), Xorriso_hfsplus_file_creator_type(), Xorriso_hop_link(), Xorriso_interpreter(), Xorriso_is_concat_target(), Xorriso_iso_file_open(), Xorriso_iso_file_to_fd(), Xorriso_jigdo_interpreter(), Xorriso_launch_frontend(), Xorriso_list_formats(), Xorriso_list_speeds(), Xorriso_list_speeds_sub(), Xorriso_ls_filev(), Xorriso_lsx_filev(), Xorriso_make_iso_write_opts(), Xorriso_make_mount_cmd(), Xorriso_make_return_value(), Xorriso_make_tmp_path(), Xorriso_make_write_options(), Xorriso_may_burn(), Xorriso_mkdir(), Xorriso_mount(), Xorriso_msgs_submit_void(), Xorriso_msinfo(), Xorriso_much_too_long(), Xorriso_named_pipe_loop(), Xorriso_no_findjob(), Xorriso_no_malloc_memory(), Xorriso_no_pattern_memory(), Xorriso_node_from_path(), Xorriso_normalize_acl_text(), Xorriso_normalize_img_path(), Xorriso_obtain_pattern_files_x(), Xorriso_open_job_data_to(), Xorriso_open_named_pipe(), Xorriso_opt_args(), Xorriso_option_abort_on(), Xorriso_option_acl(), Xorriso_option_add(), Xorriso_option_add_plainly(), Xorriso_option_append_partition(), Xorriso_option_application_use(), Xorriso_option_as(), Xorriso_option_assert_volid(), Xorriso_option_auto_charset(), Xorriso_option_backslash_codes(), Xorriso_option_blank(), Xorriso_option_boot_image(), Xorriso_option_cdi(), Xorriso_option_cdx(), Xorriso_option_changes_pending(), Xorriso_option_charset(), Xorriso_option_check_md5(), Xorriso_option_check_media(), Xorriso_option_close_damaged(), Xorriso_option_commit(), Xorriso_option_compare(), Xorriso_option_concat(), Xorriso_option_cp_clone(), Xorriso_option_cpri(), Xorriso_option_cpx(), Xorriso_option_cut_out(), Xorriso_option_dev(), Xorriso_option_devices(), Xorriso_option_dialog(), Xorriso_option_disk_dev_ino(), Xorriso_option_disk_pattern(), Xorriso_option_displacement(), Xorriso_option_drive_access(), Xorriso_option_drive_class(), Xorriso_option_dvd_obs(), Xorriso_option_early_stdio_test(), Xorriso_option_ecma119_map(), Xorriso_option_eject(), Xorriso_option_errfile_log(), Xorriso_option_error_behavior(), Xorriso_option_external_filter(), Xorriso_option_extract(), Xorriso_option_extract_boot_images(), Xorriso_option_extract_cut(), Xorriso_option_file_name_limit(), Xorriso_option_file_size_limit(), Xorriso_option_find(), Xorriso_option_follow(), Xorriso_option_fs(), Xorriso_option_hardlinks(), Xorriso_option_hfsplus(), Xorriso_option_hide(), Xorriso_option_iso_nowtime(), Xorriso_option_iso_rr_pattern(), Xorriso_option_joliet(), Xorriso_option_joliet_map(), Xorriso_option_launch_frontend(), Xorriso_option_list_delimiter(), Xorriso_option_lnsi(), Xorriso_option_load(), Xorriso_option_logfile(), Xorriso_option_lsi(), Xorriso_option_lsx(), Xorriso_option_map(), Xorriso_option_map_l(), Xorriso_option_md5(), Xorriso_option_modesty_on_drive(), Xorriso_option_mount(), Xorriso_option_mount_opts(), Xorriso_option_msg_op(), Xorriso_option_mvi(), Xorriso_option_named_pipe_loop(), Xorriso_option_not_leaf(), Xorriso_option_not_list(), Xorriso_option_not_mgt(), Xorriso_option_not_paths(), Xorriso_option_options_from_file(), Xorriso_option_osirrox(), Xorriso_option_overwrite(), Xorriso_option_pacifier(), Xorriso_option_padding(), Xorriso_option_page(), Xorriso_option_paste_in(), Xorriso_option_path_list(), Xorriso_option_pathspecs(), Xorriso_option_print(), Xorriso_option_print_size(), Xorriso_option_prog(), Xorriso_option_read_fs(), Xorriso_option_reassure(), Xorriso_option_report_about(), Xorriso_option_return_with(), Xorriso_option_rmi(), Xorriso_option_rockridge(), Xorriso_option_rom_toc_scan(), Xorriso_option_rr_reloc_dir(), Xorriso_option_scdbackup_tag(), Xorriso_option_scsi_dev_family(), Xorriso_option_scsi_log(), Xorriso_option_setfacl_listi(), Xorriso_option_setfacli(), Xorriso_option_setfattr_listi(), Xorriso_option_sh_style_result(), Xorriso_option_signal_handling(), Xorriso_option_sleep(), Xorriso_option_speed(), Xorriso_option_split_size(), Xorriso_option_stdio_sync(), Xorriso_option_tell_media_space(), Xorriso_option_temp_mem_limit(), Xorriso_option_toc_of(), Xorriso_option_update(), Xorriso_option_use_immed_bit(), Xorriso_option_volid(), Xorriso_option_volume_date(), Xorriso_option_write_type(), Xorriso_option_xattr(), Xorriso_option_zisofs(), Xorriso_overwrite_dest(), Xorriso_overwrite_iso_head(), Xorriso_pacifier_callback(), Xorriso_pacifier_loop(), Xorriso_parse_guid(), Xorriso_parse_line(), Xorriso_paste_in(), Xorriso_path_is_excluded(), Xorriso_path_is_hidden(), Xorriso_path_setfattr(), Xorriso_pipe_open(), Xorriso_prepare_expansion_pattern(), Xorriso_prepare_regex(), Xorriso_prescan_args(), Xorriso_pretend_full_disc(), Xorriso_process_msg_queues(), Xorriso_pull_outlists(), Xorriso_push_outlists(), Xorriso_read_file_data(), Xorriso_read_lines(), Xorriso_reaquire_outdev(), Xorriso_reassure(), Xorriso_reassure_restore(), Xorriso_refresh_ts_tags(), Xorriso_register_matched_adr(), Xorriso_register_node_target(), Xorriso_relax_compliance(), Xorriso_rename(), Xorriso_rename_suffix(), Xorriso_report_iso_error(), Xorriso_report_md5_outcome(), Xorriso_report_system_area(), Xorriso_resolve_link(), Xorriso_restore(), Xorriso_restore_disk_object(), Xorriso_restore_implicit_properties(), Xorriso_restore_is_identical(), Xorriso_restore_make_hl(), Xorriso_restore_node_array(), Xorriso_restore_overwrite(), Xorriso_restore_properties(), Xorriso_restore_tree(), Xorriso_retry_burn_track(), Xorriso_retry_write_session(), Xorriso_rmi(), Xorriso_rmx(), Xorriso_sanitize_image_size(), Xorriso_scan_report_lines(), Xorriso_sectormap_to_spotlist(), Xorriso_set_file_name_limit(), Xorriso_set_filter(), Xorriso_set_hfsplus_crtp(), Xorriso_set_hppa_boot_parm(), Xorriso_set_isolinux_options(), Xorriso_set_local_charset(), Xorriso_set_signal_handling(), Xorriso_set_st_mode(), Xorriso_set_system_area(), Xorriso_set_system_area_path(), Xorriso_set_volid(), Xorriso_setfacl(), Xorriso_setfattr(), Xorriso_show_devices(), Xorriso_show_dux_subs(), Xorriso_sieve_get_result(), Xorriso_sorted_node_array(), Xorriso_source_date_epoch(), Xorriso_split_report_line(), Xorriso_start_chunk_md5(), Xorriso_start_msg_watcher(), Xorriso_startup_libraries(), Xorriso_stop_msg_watcher(), Xorriso_toc(), Xorriso_tree_graft_node(), Xorriso_tree_restore_node(), Xorriso_truncate_const_find_name(), Xorriso_truncate_overwritable(), Xorriso_truncate_uniquely(), Xorriso_update_interpreter(), Xorriso_update_iso_lba0(), Xorriso_verify_sb_tag(), Xorriso_warn_of_wildcards(), Xorriso_write_application_use(), Xorriso_write_session(), and Xorriso_write_session_log().

◆ Xorriso_msgs_submit_void()

int Xorriso_msgs_submit_void ( void *  xorriso,
int  error_code,
char  msg_text[],
int  os_errno,
char  severity[],
int  flag 
)

Alternative call interface of Xorriso_msgs_submit with void* instead of struct XorrisO*

Definition at line 2595 of file text_io.c.

References Xorriso_msgs_submit().

Referenced by Xorriso_startup_libraries().

◆ Xorriso_much_too_long()

◆ Xorriso_named_pipe_loop()

◆ Xorriso_no_findjob()

◆ Xorriso_no_malloc_memory()

◆ Xorriso_obtain_lock()

static int Xorriso_obtain_lock ( struct XorrisO xorriso,
pthread_mutex_t *  lock_handle,
char *  purpose,
int  flag 
)
static

◆ Xorriso_open_named_pipe()

int Xorriso_open_named_pipe ( struct XorrisO xorriso,
char  fd_names[3][20],
int  mem_fds[],
char *  pipe_paths[],
int  pipe_fds[],
int  i,
int  flag 
)

Definition at line 4505 of file text_io.c.

References XorrisO::info_text, O_BINARY, Text_shellsafe(), and Xorriso_msgs_submit().

Referenced by Xorriso_named_pipe_loop().

◆ Xorriso_pacifier_callback()

◆ Xorriso_pacifier_reset()

◆ Xorriso_pager()

◆ Xorriso_peek_outlists()

int Xorriso_peek_outlists ( struct XorrisO xorriso,
int  stack_handle,
int  timeout,
int  flag 
)

Inquire whether messages are pending in redirected result and info channel. This may be used to determine whether a concurrent message watcher already has obtained all pending messages.

Since
1.2.6
Parameters
xorrisoThe environment handle
stack_handleAn id number returned by Xorriso_push_outlists() and not yet revoked by Xorriso_pull_outlists(). Submit -1 to address the most recent valid id.
timeoutNumber of seconds after which to return despite flag bit 2
flagBitfield for control purposes bit0= fetch result channel bit1= fetch info channel bit2= wait and retry until return is 0 or -1 If bit0 and bit1 are 0, both channels get fetched.
Returns
If > 0: bit0= messages are pending in outlists bit1= message watcher is processing fetched messages Else: 0= no messages are pending anywhere -1= inappropriate stack_handle -2= locking failed

Definition at line 1256 of file text_io.c.

References XorrisO::info_msglists, XorrisO::msg_watcher_state, XorrisO::msglist_stackfill, XorrisO::msgw_fetch_lock, XorrisO::msgw_msg_pending, XorrisO::result_msglists, Xorriso_obtain_lock(), and Xorriso_release_lock().

Referenced by Xorriso_interpreter().

◆ Xorriso_predict_linecount()

int Xorriso_predict_linecount ( struct XorrisO xorriso,
char *  line,
int *  linecount,
int  flag 
)

Definition at line 742 of file text_io.c.

References XorrisO::result_open_line_len, and XorrisO::result_page_width.

Referenced by Xorriso_pager().

◆ Xorriso_process_errfile()

int Xorriso_process_errfile ( struct XorrisO xorriso,
int  error_code,
char  msg_text[],
int  os_errno,
int  flag 
)

Write a message for option -errfile_log.

Parameters
xorrisoThe environment handle
error_codeThe unique error code of your message. Submit 0 if you do not have reserved error codes within the libburnia project.
msg_textNot more than 8196 characters of message text.
os_errnoEventual errno related to the message. Submit 0 if the message is not related to a operating system error.
flagbit0-7= meaning of msg_text ( 0= ERRFILE path , for internal use mainly ) 1= mark line text (only to be put out if enabled)
Returns
<=0 error , >0 success

Definition at line 2438 of file text_io.c.

References XorrisO::errfile_fp, XorrisO::errfile_log, XorrisO::errfile_mode, Ftimetxt(), XorrisO::info_text, XorrisO::result_line, SfileadrL, Xorriso_info(), and Xorriso_result().

Referenced by main(), Xorriso_msgs_submit(), Xorriso_option_commit(), and Xorriso_option_errfile_log().

◆ Xorriso_process_msg_lists()

◆ Xorriso_protect_stdout()

int Xorriso_protect_stdout ( struct XorrisO xorriso,
int  flag 
)

Definition at line 63 of file text_io.c.

References XorrisO::dev_fd_1.

Referenced by Xorriso_new(), and Xorriso_prescan_args().

◆ Xorriso_pull_outlists()

int Xorriso_pull_outlists ( struct XorrisO xorriso,
int  stack_handle,
struct Xorriso_lsT **  result_list,
struct Xorriso_lsT **  info_list,
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, or to the normal channels if no redirections are stacked any more. 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.

Parameters
xorrisoThe environment handle
stack_handleAn id number returned by Xorriso_push_outlists() and not yet revoked by Xorriso_pull_outlists(). This handle is invalid after the call. Submit -1 to address the most recent valid id.
result_listResult and mark messages (usually directed to stdout)
info_listInfo and mark messages (usually directed to stderr)
flagunused yet, submit 0
Returns
1 on success, <=0 if failure

Definition at line 1309 of file text_io.c.

References XorrisO::info_msglists, XorrisO::msglist_stackfill, XorrisO::result_msglists, Xorriso_lock_outlists(), Xorriso_lst_concat(), Xorriso_msgs_submit(), and Xorriso_unlock_outlists().

Referenced by Xorriso_interpreter(), Xorriso_start_msg_watcher(), Xorriso_stop_msg_watcher(), and Xorriso_toc_to_string().

◆ Xorriso_push_outlists()

int Xorriso_push_outlists ( struct XorrisO xorriso,
int *  stack_handle,
int  flag 
)

Enable a new redirection of info and/or 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. If Xorriso_option_pkt_output() is set to "on", then it will consolidate output in the result_list of Xorriso_fetch_outlists() and Xorriso_pull_outlists().

Parameters
xorrisoThe environment handle
stack_handlereturns an id number which is unique as long as its redirection is stacked. Do not interpret it and do not use it after its redirection was pulled from the stack.
flagBitfield for control purposes bit0= redirect result channel bit1= redirect info channel If bit0 and bit1 are 0, both channels get redirected.
Returns
1 on success, <=0 if failure

Definition at line 1174 of file text_io.c.

References XorrisO::info_msglists, XorrisO::msglist_flags, XorrisO::msglist_stackfill, XorrisO::result_msglists, Xorriso_lock_outlists(), Xorriso_max_outlist_stacK, Xorriso_msgs_submit(), and Xorriso_unlock_outlists().

Referenced by Xorriso_interpreter(), Xorriso_start_msg_watcher(), and Xorriso_toc_to_string().

◆ Xorriso_read_lines()

int Xorriso_read_lines ( struct XorrisO xorriso,
FILE *  fp,
int *  linecount,
int *  argc,
char ***  argv,
int  flag 
)

◆ Xorriso_reassure()

◆ Xorriso_release_lock()

static int Xorriso_release_lock ( struct XorrisO xorriso,
pthread_mutex_t *  lock_handle,
char *  purpose,
int  flag 
)
static

◆ Xorriso_report_md5_outcome()

int Xorriso_report_md5_outcome ( struct XorrisO xorriso,
char *  severity,
int  flag 
)

◆ Xorriso_request_confirmation()

◆ Xorriso_reset_counters()

int Xorriso_reset_counters ( struct XorrisO xorriso,
int  flag 
)

◆ Xorriso_restxt()

int Xorriso_restxt ( struct XorrisO xorriso,
char *  text 
)

Definition at line 2423 of file text_io.c.

References XorrisO::result_line, Xorriso_lsT::text, and Xorriso_result().

Referenced by Xorriso_option_help().

◆ Xorriso_result()

int Xorriso_result ( struct XorrisO xorriso,
int  flag 
)

Definition at line 2337 of file text_io.c.

References XorrisO::bar_is_fresh, XorrisO::msglist_flags, XorrisO::msglist_stackfill, XorrisO::request_to_abort, XorrisO::result_line, XorrisO::result_page_length, Xorriso_pager(), and Xorriso_write_to_channel().

Referenced by Xorriso_atip(), Xorriso_cdrskin(), Xorriso_check_md5(), Xorriso_check_session_md5(), Xorriso_cmd_sorting_rank(), Xorriso_compare_2_contents(), Xorriso_compare_2_files(), Xorriso_exec_args_sorted(), Xorriso_findi_action(), Xorriso_findi_headline(), Xorriso_findx_action(), Xorriso_getfacl(), Xorriso_getfattr(), Xorriso_getfname(), Xorriso_gpt_crc(), Xorriso_list_extattr(), Xorriso_list_extras(), Xorriso_list_extras_result(), Xorriso_list_formats(), Xorriso_list_profiles(), Xorriso_list_speeds_sub(), Xorriso_ls(), Xorriso_ls_filev(), Xorriso_lsx_filev(), Xorriso_mark(), Xorriso_mount(), Xorriso_msg_op_parse(), Xorriso_option_boot_image(), Xorriso_option_cdi(), Xorriso_option_cdx(), Xorriso_option_changes_pending(), Xorriso_option_check_md5(), Xorriso_option_check_media(), Xorriso_option_compare(), Xorriso_option_find(), Xorriso_option_help(), Xorriso_option_msg_op(), Xorriso_option_print(), Xorriso_option_print_size(), Xorriso_option_prompt(), Xorriso_option_pwdi(), Xorriso_option_pwdx(), Xorriso_option_tell_media_space(), Xorriso_option_toc(), Xorriso_option_version(), Xorriso_process_errfile(), Xorriso_pvd_info(), Xorriso_report_damage(), Xorriso_report_lba(), Xorriso_report_lib_versions(), Xorriso_report_lines(), Xorriso_report_md5_outcome(), Xorriso_report_pvd_time(), Xorriso_report_system_area(), Xorriso_restxt(), Xorriso_show_devices(), Xorriso_show_du_subs(), Xorriso_show_dux_subs(), Xorriso_show_stream(), Xorriso_status_result(), Xorriso_test_outchar(), and Xorriso_toc_line().

◆ Xorriso_result_handler_pkt()

int Xorriso_result_handler_pkt ( void *  handle,
char *  text 
)

◆ Xorriso_result_handler_stdout()

int Xorriso_result_handler_stdout ( void *  handle,
char *  text 
)

Definition at line 1370 of file text_io.c.

Referenced by Xorriso_result_handler_pkt().

◆ Xorriso_set_info_text()

int Xorriso_set_info_text ( struct XorrisO xorriso,
char *  text,
size_t  trunc_len,
int  flag 
)

Definition at line 4768 of file text_io.c.

References XorrisO::info_text, and Xorriso_lsT::text.

Referenced by Xorriso_option_setfacli().

◆ Xorriso_sieve_add_filter()

int Xorriso_sieve_add_filter ( struct XorrisO xorriso,
char *  name,
int  channels,
char *  prefix,
char *  separators,
int  num_words,
int *  word_idx,
int  max_results,
int  flag 
)

Add a filter rule to the message sieve. Start watching output messages, if this is not already enabled.

Since
1.2.6
Parameters
xorrisoThe environment handle
nameThe filter name by which its recorded results shall be inquired via Xorriso_sieve_get_result()
channelsWhich of the output channels the filter shall watch bit0= result channel bit1= info channel bit2= mark channel
prefixThe line start to watch for. Will also be handed over to Xorriso_parse_line(). Empty text matches all lines. If the prefix begins by '?' characters, then these match any character at the beginning of a message. The prefix of the filter rule will then be adapted to really match the line, before it gets handed over to Xorriso_parse_line().
separatorsList of separator characters for Xorriso_parse_line()
num_wordsNumber of word indice in word_idx
word_idxArray with the argv indice to be picked from the the result of Xorriso_parse_line(). Must at least contain num_words elements.
max_resultsIf not 0, then the maximum number of line results that shall be recorded by the filter. When this number is exceeded, then results of older lines get discarded when new results get recorded.
flagBitfield for control purposes bit0= Last result word shall contain the remainder of the message line
Returns
<=0 error , >0 success

Definition at line 1851 of file text_io.c.

References Xorriso_msg_filteR::channels, Xorriso_msg_sievE::first_filter, Xorriso_msg_filteR::max_results, XorrisO::msg_sieve, Xorriso_msg_filteR::name, Xorriso_msg_sievE::num_filters, Xorriso_msg_filteR::num_words, Xorriso_msg_filteR::prefix, Xorriso_msg_filteR::separators, Xorriso_msg_filteR::word_idx, Xorriso_msg_filter_new(), Xorriso_msg_filter_set_words(), Xorriso_msg_sieve_destroy(), Xorriso_msg_sieve_new(), and Xorriso_no_malloc_memory().

Referenced by Xorriso_sieve_big().

◆ Xorriso_sieve_big()

int Xorriso_sieve_big ( struct XorrisO xorriso,
int  flag 
)

Install a large sieve with filters for about any interesting message of xorriso. The filter rule names are mostly the same as the prefixes they search for. If you do not find the message prefix of your desire, then you may add a filter rule by Xorriso_sieve_add_filter(). If you do not want all these filter any more, call Xorriso_sieve_dispose().

You should obtain your recorded data often and then call Xorriso_sieve_clear_results(). It is nevertheless ok to perform several different xorriso information commands and to then obtain results from the sieve.

The installed filters in particular:

Name Recorded values, returned by Xorriso_sieve_get_result()

"-changes_pending" up to 1 result from -changes_pending show_status argv[0]= "yes" or "no" "? -dev" up to 10 results from -devices or -device_links (records drives with single digit index number) argv[0]= drive address argv[1]= permissions argv[2]= drive vendor argv[3]= product id "?? -dev" up to 90 results from -devices or -device_links (records drives with double digit index number) argv[0]= drive address argv[1]= permissions argv[2]= drive vendor argv[3]= product id "Abstract File:" up to 1 result from -pvd_info argv[0]= file name (Note: prefix is "Abstract File: ") "After commit :" up to 1 result from -tell_media_space argv[0]= number of blocks with "s" appended "App Id :" up to 1 result from -pvd_info argv[0]= id (Note: prefix is "App Id : ") "Biblio File :" up to 1 result from -pvd_info argv[0]= file name (Note: prefix is "Biblio File : ") "Build timestamp :" up to 1 result from -version argv[0]= timestamp (Note: prefix is "Build timestamp : ") "CopyrightFile:" up to 1 result from -pvd_info argv[0]= file name (Note: prefix is "CopyrightFile: ") "Creation Time:" up to 1 result from -pvd_info argv[0]= YYYYMMDDhhmmsscc (Note: prefix is "Creation Time: ") "DVD obs 64 kB:" up to 1 result from -list_extras argv[0]= "yes" or "no" "Drive access: " up to 2 result from -dev, -indev, -toc argv[0]= "exclusive", "shared" argv[1]= "readonly","restricted" "Drive current:" up to 2 results from -dev, -indev, -toc, others argv[0]= command ("-dev", "-outdev", "-indev") argv[1]= drive address "Drive type :" up to 2 results from -toc argv[0]= vendor argv[1]= product argv[2]= revision "Eff. Time :" up to 1 result from -pvd_info argv[0]= YYYYMMDDhhmmsscc (Note: prefix is "EffectiveTime: ") "Expir. Time :" up to 1 result from -pvd_info argv[0]= YYYYMMDDhhmmsscc (Note: prefix is "Expir. Time : ") "Ext. filters :" up to 1 result from -list_extras argv[0]= "yes" or "no" , possibly more info (Note: prefix is "Ext. filters : ") "File damaged :" up to 10000 results from -find ... -exec report_damage argv[0]= damage start byte in file argv[1]= damage range size in file argv[2]= file size argv[3]= path in ISO image "File data lba:" up to 10000 results from -find ... -exec report_lba argv[0]= extent number (all extents of same path together are the content of one file) argv[1]= start block number of extent argv[2]= number of blocks of extent argv[3]= overall file content size in all extents argv[4]= path in ISO image "Format idx :" up to 100 results from -list_formats argv[0]= index argv[1]= MMC code argv[2]= number of blocks with "s" appended argv[3]= roughly the size in MiB (Note: prefix is "Format idx ") "Format status:" up to 1 result from -list_formats argv[0]= status argv[1]= capacity "ISO session :" up to 10000 results from -toc argv[0]= Idx argv[1]= sbsector argv[2]= Size argv[3]= Volume Id "Image size :" up to 1 result from -print_size argv[0]= number of blocks with "s" appended "Jigdo files :" up to 1 result from -list_extras argv[0]= "yes" or "no" "Local ACL :" up to 1 result from -list_extras argv[0]= "yes" or "no" "Local xattr :" up to 1 result from -list_extras argv[0]= "yes" or "no" "MD5 MISMATCH:" up to 10000 results from -check_md5* argv[0]= path of mismatching file "MD5 tag range:" up to 10000 results from -check_media argv[0]= lba argv[1]= size in blocks argv[2]= result text (starting with "+", "-", or "0") "Media blocks :" up to 2 results from -toc argv[0]= readable argv[1]= writable argv[2]= overall "Media current:" up to 2 results from -dev, -indev, -toc, others argv[0]= media type / MMC profile name (Note: prefix is "Media current: " which eats extra blank) "Media nwa :" up to 1 result from -toc argv[0]= next writable address "Media product:" up to 2 results from -toc argv[0]= product id argv[1]= manufacturer "Media region :" up to 10000 results from -check_media argv[0]= lba argv[1]= size in blocks argv[2]= quality text (starting with "+", "-", or "0") "Media space :" up to 1 result from -tell_media_space argv[0]= number of blocks with "s" appended "Media status :" up to 2 results from -dev, -indev, -toc, others argv[0]= status description (Note: prefix is "Media status : ") "Media summary:" up to 2 results from -dev, -indev, -toc, others argv[0]= sessions argv[1]= data blocks (full count) argv[2]= data (with unit letter k,m,g) argv[3]= free (with unit letter k,m,g) "Modif. Time :" up to 1 result from -pvd_info argv[0]= YYYYMMDDhhmmsscc (Note: prefix is "Modif. Time : ") "PVD address :" up to 1 result from -pvd_info argv[0]= block address with "s" appended "Preparer Id :" up to 1 result from -pvd_info argv[0]= id (Note: prefix is "Preparer Id : ") "Profile :" up to 256 results from -list_profiles argv[0]= MMC code argv[1]= profile name in round brackets possibly appended: " (current)" "Publisher Id :" up to 1 result from -pvd_info argv[0]= id (Note: prefix is "Publisher Id : ") "Readline :" up to 1 result from -list_extras argv[0]= "yes" or "no" "Size lower :" up to 1 result from -findx ... -exec estimate_size argv[0]= size with appended "s" "Size upper :" up to 1 result from -findx ... -exec estimate_size argv[0]= size with appended "s" "System Id :" up to 1 result from -pvd_info argv[0]= id (Note: prefix is "System Id : ") "Version timestamp :" up to 1 result from -version argv[0]= timestamp "Volume Id :" up to 1 result from -pvd_info argv[0]= id (Note: Not output from -dev or -toc but from -pvd_info) "Volume Set Id:" up to 1 result from -pvd_info argv[0]= id (Note: prefix is "Volume Set Id: ") "Volume id :" up to 2 results from -dev, -indev, -toc, others argv[0]= volume id (Note: Not output from -pvd_info but from -dev or -toc) "Write speed :" up to 100 results from -list_speeds argv[0]= kilobytes per second argv[1]= speed factor "Write speed H:" up to 1 result from -list_speeds see "Write speed :" "Write speed L:" up to 1 result from -list_speeds see "Write speed :" "Write speed h:" up to 1 result from -list_speeds see "Write speed :" "Write speed l:" up to 1 result from -list_speeds see "Write speed :" "libburn in use :" up to 1 result from -version argv[0]= version text argv[1]= minimum version requirement "libburn OS adapter:" up to 1 result from -version argv[0]= adapter description (Note: prefix is "libburn OS adapter: ") "libisoburn in use :" up to 1 result from -version argv[0]= version text argv[1]= minimum version requirement "libisofs in use :" up to 1 result from -version argv[0]= version text argv[1]= minimum version requirement "libjte in use :" up to 1 result from -version argv[0]= version text argv[1]= minimum version requirement "xorriso version :" up to 1 result from -version argv[0]= version text "zisofs :" up to 1 result from -list_extras

argv[0]= "yes" or "no"

Since
1.2.6
Parameters
xorrisoThe environment handle
flagUnused yet. Submit 0.
Returns
<=0 error , >0 success

Definition at line 2026 of file text_io.c.

References Xorriso_sieve_add_filter(), and Xorriso_sieve_dispose().

Referenced by Xorriso_option_msg_op().

◆ Xorriso_sieve_clear_results()

int Xorriso_sieve_clear_results ( struct XorrisO xorriso,
int  flag 
)

Dispose all recorded results. Keep filter rules. Continue watching and recording.

Since
1.2.6
Parameters
xorrisoThe environment handle
flagUnused yet. Submit 0.
Returns
<=0 error , >0 success

Definition at line 1900 of file text_io.c.

References Xorriso_msg_sievE::first_filter, XorrisO::msg_sieve, Xorriso_msg_filteR::next, Xorriso_msg_filteR::next_to_deliver, Xorriso_msg_filteR::num_delivered, Xorriso_msg_filteR::num_results, Xorriso_msg_filteR::results, and Xorriso_lst_destroy_all().

Referenced by Xorriso_option_msg_op().

◆ Xorriso_sieve_dispose()

int Xorriso_sieve_dispose ( struct XorrisO xorriso,
int  flag 
)

Dispose all filter rules. End watching and recording. This is the default state at library startup.

Since
1.2.6
Parameters
xorrisoThe environment handle
flagUnused yet. Submit 0.
Returns
<=0 error , >0 success

Definition at line 1892 of file text_io.c.

References XorrisO::msg_sieve, and Xorriso_msg_sieve_destroy().

Referenced by Xorriso_destroy(), Xorriso_option_msg_op(), and Xorriso_sieve_big().

◆ Xorriso_sieve_filter_msg()

◆ Xorriso_sieve_get_result()

int Xorriso_sieve_get_result ( struct XorrisO xorriso,
char *  name,
int *  argc,
char ***  argv,
int *  available,
int  flag 
)

Inquire recorded results from a particular filter rule.

Parameters
xorrisoThe environment handle
nameThe filter name as given by Xorriso_sieve_add_filter()
argcWill return the number of allocated and filled word strings.
argvWill return the array of word strings. Do not forget to dispose the allocated memory by a call to Xorriso__dispose_words().
availableWill return the number of results which are still available for further calls of Xorriso_sieve_get_result() with the given name.
flagBitfield for control purposes: bit0= Reset reading to first matching result. bit1= Only inquire number of available results. Do not allocate memory. bit2= If *argv is not NULL, then free it before attaching new memory. bit3= Do not read recorded data but rather list all filter names.
Returns
<0 error: -1 = memory shortage -2 = no filter rule found 0 No more data available for the given name With bit3: No filter rules installed. >0 argc and argv are valid

Definition at line 1925 of file text_io.c.

References Xorriso_msg_sievE::first_filter, XorrisO::msg_sieve, Xorriso_msg_filteR::name, Xorriso_msg_filteR::next, Xorriso_msg_filteR::next_to_deliver, Xorriso_msg_filteR::num_delivered, Xorriso_msg_sievE::num_filters, Xorriso_msg_filteR::num_results, Xorriso_msg_filteR::num_words, Xorriso_msg_filteR::results, Xorriso__dispose_words(), Xorriso_lst_get_next(), Xorriso_lst_get_text(), Xorriso_msgs_submit(), and Xorriso_no_malloc_memory().

Referenced by Xorriso_option_msg_op().

◆ Xorriso_start_msg_watcher()

int Xorriso_start_msg_watcher ( struct XorrisO xorriso,
int(*)(void *handle, char *text)  result_handler,
void *  result_handle,
int(*)(void *handle, char *text)  info_handler,
void *  info_handle,
int  flag 
)

Redirect output by Xorriso_push_outlists() and start a thread which fetches this output and performs a call of a given function with each message that is obtained.

Since
1.2.6
Parameters
xorrisoThe environment handle
result_handlerPointer to the function which shall be called with each result message. A NULL pointer causes output to be directed to stdout or to be interpreted as -pkt_output format if this is enabled by Xorriso_option_pkt_output(). The function should return 1. A return value of -1 urges not to call again with further lines.
result_handleThe first argument of (*result_handler)(). It shall point to a memory object that knows all necessary external parameters for running (*result_handler)(). Submit NULL if result_handler is NULL.
info_handlerPointer to the function which shall be called with each info message. A NULL pointer causes output to be directed to stderr or to -as mkisofs -log-file. The function should return 1. A return value of -1 urges not to call again with further lines.
info_handleThe first argument of (*info_handler)(). It shall point to a memory object that knows all necessary external parameters for running (*info_handler)(). Submit NULL if info_handler is NULL.
flagunused yet, submit 0
Returns
1 on success, <=0 if failure (e.g. there is already a watcher active)

Definition at line 1523 of file text_io.c.

References XorrisO::info_text, XorrisO::msg_watcher_lock, XorrisO::msg_watcher_state, XorrisO::msgw_info_handle, XorrisO::msgw_info_handler, XorrisO::msgw_result_handle, XorrisO::msgw_result_handler, XorrisO::msgw_stack_handle, Xorriso_lst_destroy_all(), Xorriso_msg_watcher(), Xorriso_msgs_submit(), Xorriso_process_msg_lists(), Xorriso_pull_outlists(), and Xorriso_push_outlists().

Referenced by Xorriso_interpreter().

◆ Xorriso_status()

int Xorriso_status ( struct XorrisO xorriso,
char *  filter,
FILE *  fp,
int  flag 
)

Definition at line 2764 of file text_io.c.

References XorrisO::abort_on_text, XorrisO::abstract_file, XorrisO::add_plainly, XorrisO::all_file_dates, XorrisO::allow_graft_points, XorrisO::allow_restore, XorrisO::apm_block_size, XorrisO::appended_as_apm, XorrisO::appended_as_gpt, XorrisO::application_id, XorrisO::application_use, XorrisO::assert_volid, XorrisO::assert_volid_sev, XorrisO::auto_close, XorrisO::ban_stdio_write, XorrisO::biblio_file, XorrisO::boot_image_isohybrid, XorrisO::bsl_interpretation, XorrisO::buffer_timeout_sec, XorrisO::cache_default, XorrisO::cache_num_tiles, XorrisO::cache_tile_blocks, XorrisO::check_media_default, XorrisO::copyright_file, XorrisO::dialog, XorrisO::disk_excl_mode, XorrisO::disk_exclusions, XorrisO::displacement, XorrisO::displacement_sign, XorrisO::do_aaip, XorrisO::do_auto_chmod, XorrisO::do_calm_drive, XorrisO::do_close, XorrisO::do_concat_split, XorrisO::do_disk_pattern, XorrisO::do_dummy, XorrisO::do_follow_concat, XorrisO::do_follow_links, XorrisO::do_follow_mount, XorrisO::do_follow_param, XorrisO::do_follow_pattern, XorrisO::do_global_gid, XorrisO::do_global_uid, XorrisO::do_hfsplus, XorrisO::do_iso_rr_pattern, XorrisO::do_joliet, XorrisO::do_md5, XorrisO::do_override_now_time, XorrisO::do_overwrite, XorrisO::do_padding_by_libisofs, XorrisO::do_reassure, XorrisO::do_restore_sort_lba, XorrisO::do_rockridge, XorrisO::do_stream_recording, XorrisO::do_strict_acl, XorrisO::do_tao, XorrisO::drive_blacklist, XorrisO::drive_greylist, XorrisO::drive_whitelist, XorrisO::drives_access, XorrisO::drives_exclusive, XorrisO::dvd_obs, XorrisO::early_stdio_test, XorrisO::ecma119_map, XorrisO::efi_boot_partition, XorrisO::errfile_log, Exclusions_get_descrs(), XorrisO::extract_error_mode, XorrisO::file_name_limit, XorrisO::file_size_limit, XorrisO::follow_link_limit, XorrisO::fs, Ftimetxt(), XorrisO::global_gid, XorrisO::global_uid, XorrisO::gpt_guid, XorrisO::gpt_guid_mode, XorrisO::grow_blindly_msc2, XorrisO::hfsp_block_size, XorrisO::hfsp_serial_number, XorrisO::image_start_mode, XorrisO::image_start_value, XorrisO::img_read_error_mode, XorrisO::in_charset, XorrisO::indev, XorrisO::indev_access, XorrisO::indev_is_exclusive, XorrisO::ino_behavior, XorrisO::iso_gpt_type_guid, XorrisO::iso_mbr_part_flag, XorrisO::iso_mbr_part_type, XorrisO::jigdo_params, XorrisO::jigdo_values, XorrisO::joliet_map, XorrisO::linux_scsi_dev_family, XorrisO::list_delimiter, XorrisO::loaded_volid, XorrisO::logfile, XorrisO::mark_text, XorrisO::max_buffer_percent, XorrisO::max_buffer_usec, XorrisO::min_buffer_percent, XorrisO::min_buffer_usec, XorrisO::modesty_on_drive, XorrisO::mount_opts_flag, Xorriso_lsT::next, XorrisO::no_rc, XorrisO::now_time_override, XorrisO::out_charset, XorrisO::outdev, XorrisO::outdev_access, XorrisO::outdev_is_exclusive, XorrisO::pacifier_interval, XorrisO::pacifier_style, XorrisO::packet_output, XorrisO::padding, XorrisO::part_like_isohybrid, XorrisO::partition_heads_per_cyl, XorrisO::partition_offset, XorrisO::partition_secs_per_head, XorrisO::prep_partition, XorrisO::preparer_id, XorrisO::progname, XorrisO::publisher, XorrisO::read_fs, XorrisO::read_speed, XorrisO::read_speed_corr, XorrisO::read_speed_force, XorrisO::report_about_text, XorrisO::result_line, XorrisO::result_page_length, XorrisO::result_page_width, XorrisO::return_with_text, XorrisO::return_with_value, XorrisO::rr_reloc_dir, XorrisO::scdbackup_tag_listname, XorrisO::scdbackup_tag_name, XorrisO::scsi_log, XorrisO::session_logfile, Sfile_off_t_text(), SfileadrL, XorrisO::sh_style_result, XorrisO::sparse_min_gap, XorrisO::split_size, XorrisO::status_history_max, XorrisO::stdio_sync, XorrisO::system_area_disk_path, XorrisO::system_area_options, XorrisO::system_id, XorrisO::temp_mem_limit, Xorriso_lsT::text, Text_shellsafe(), XorrisO::toc_emulation_flag, XorrisO::use_immed_bit, XorrisO::use_immed_bit_default, XorrisO::use_stdin, XorrisO::vol_creation_time, XorrisO::vol_effective_time, XorrisO::vol_expiration_time, XorrisO::vol_modification_time, XorrisO::vol_uuid, XorrisO::volid, XorrisO::volid_default, XorrisO::volset_id, XorrisO::wdi, XorrisO::wdx, XorrisO::write_speed, Xorriso__format_guid(), Xorriso__get_signal_behavior(), Xorriso__speedname(), Xorriso_alloc_meM, Xorriso_boot_image_status(), Xorriso_boot_status_sysarea(), Xorriso_check_media_list_job(), Xorriso_default_file_size_limiT, Xorriso_free_meM, Xorriso_get_local_charset(), Xorriso_get_pattern(), Xorriso_get_relax_text(), Xorriso_lst_get_last(), Xorriso_lst_get_next(), Xorriso_lst_get_prev(), Xorriso_lst_get_text(), Xorriso_preparer_string(), Xorriso_status_extf(), Xorriso_status_filter(), Xorriso_status_history_maX, Xorriso_status_result(), and Xorriso_status_zisofs().

Referenced by Xorriso_option_boot_image(), and Xorriso_option_status().

◆ Xorriso_status_filter()

int Xorriso_status_filter ( struct XorrisO xorriso,
char *  filter,
char *  line,
int  flag 
)

Definition at line 2676 of file text_io.c.

Referenced by Xorriso_status(), and Xorriso_status_result().

◆ Xorriso_status_result()

◆ Xorriso_stop_msg_watcher()

int Xorriso_stop_msg_watcher ( struct XorrisO xorriso,
int  flag 
)

Revoke output redirection by Xorriso_start_msg_watcher() and end the watcher thread. If text messages are delivered when Xorriso_pull_outlists() is called, then they get put out through the active handler functions.

Since
1.2.6
Parameters
xorrisoThe environment handle
flagBitfield for control purposes: bit0= do not issue SORRY message if no message watcher is active
Returns
1 on success, <=0 if failure

Definition at line 1614 of file text_io.c.

References XorrisO::info_text, XorrisO::msg_watcher_lock, XorrisO::msg_watcher_state, XorrisO::msgw_fetch_lock, XorrisO::msgw_info_handler, XorrisO::msgw_msg_pending, XorrisO::msgw_result_handler, XorrisO::msgw_stack_handle, Xorriso_lst_destroy_all(), Xorriso_msgs_submit(), Xorriso_obtain_lock(), Xorriso_process_msg_lists(), Xorriso_pull_outlists(), and Xorriso_release_lock().

Referenced by main(), and Xorriso_interpreter().

◆ Xorriso_unlock_outlists()

static int Xorriso_unlock_outlists ( struct XorrisO xorriso,
int  flag 
)
static

◆ Xorriso_write_session_log()

◆ Xorriso_write_to_channel()

◆ Xorriso_write_to_msglist()

static int Xorriso_write_to_msglist ( struct XorrisO xorriso,
struct Xorriso_lsT **  xorriso_msglist,
char *  text,
int  flag 
)
static