Rename `callback` to `call` to e consistent with recent naming changes.
data.program.output.custom = (void *) &data;
data.program.warning.custom = (void *) &data;
- data.callback.load_objects_content_pipe = &iki_write_eki_load_objects_content_pipe;
- data.callback.print_help = &iki_write_eki_print_message_help;
- data.callback.process_objects_content = &iki_write_eki_process_objects_content;
+ data.call.load_objects_content_pipe = &iki_write_eki_load_objects_content_pipe;
+ data.call.print_help = &iki_write_eki_print_message_help;
+ data.call.process_objects_content = &iki_write_eki_process_objects_content;
f_console_parameter_t parameters[] = iki_write_console_parameter_t_initialize;
data.program.parameters.array = parameters;
#endif // _di_iki_write_eki_print_error_objects_not_valid_
#ifndef _di_iki_write_eki_print_message_help_
- void iki_write_eki_print_message_help(fl_print_t * const print) {
+ f_status_t iki_write_eki_print_message_help(fl_print_t * const print) {
- if (!print) return;
+ if (!print) return F_status_set_error(F_output_not);
f_file_stream_lock(print->to);
f_file_stream_flush(print->to);
f_file_stream_unlock(print->to);
+
+ return F_okay;
}
#endif // _di_iki_write_eki_print_message_help_
* The output structure to print to.
*
* This does not alter print.custom.setting.state.status.
+ *
+ * @return
+ * F_okay on success.
+ * F_output_not on success, but no printing is performed.
+ *
+ * F_output_not (with error bit) if setting is NULL.
*/
#ifndef _di_iki_write_eki_print_message_help_
- extern void iki_write_eki_print_message_help(fl_print_t * const print);
+ extern f_status_t iki_write_eki_print_message_help(fl_print_t * const print);
#endif // _di_iki_write_eki_print_message_help_
/**
#endif
#ifndef _di_iki_write_eki_load_objects_content_pipe_
- void iki_write_eki_load_objects_content_pipe(void * const void_main, const f_range_t range, uint8_t * const pipe_state) {
+ void iki_write_eki_load_objects_content_pipe(iki_write_main_t * const main, const f_range_t range, uint8_t * const pipe_state) {
- if (!void_main) return;
+ if (!main) return;
- iki_write_main_t * const main = (iki_write_main_t *) void_main;
-
- if (!pipe_state || !main->callback.process_objects_content) {
+ if (!pipe_state || !main->call.process_objects_content) {
main->setting.state.status = F_status_set_error(F_parameter);
iki_write_print_error(&main->program.error, macro_iki_write_f(iki_write_callback_load_objects_content_pipe));
}
}
- main->callback.process_objects_content((void *) main, main->cache.objects, main->cache.content);
+ main->call.process_objects_content((void *) main, main->cache.objects, main->cache.content);
if (F_status_is_error(main->setting.state.status)) return;
fll_print_dynamic_raw(f_string_eol_s, main->program.output.to);
#endif // _di_iki_write_eki_load_objects_content_pipe_
#ifndef _di_iki_write_eki_process_objects_content_
- void iki_write_eki_process_objects_content(void * const void_main, const f_string_statics_t objects, const f_string_static_t content) {
-
- if (!void_main) return;
+ void iki_write_eki_process_objects_content(iki_write_main_t * const main, const f_string_statics_t objects, const f_string_static_t content) {
- iki_write_main_t * const main = (iki_write_main_t *) void_main;
+ if (!main) return;
{
f_number_unsigned_t i = 0;
* @see f_iki_write()
*/
#ifndef _di_iki_write_eki_load_objects_content_pipe_
- extern void iki_write_eki_load_objects_content_pipe(void * const main, const f_range_t range, uint8_t * const pipe_state);
+ extern void iki_write_eki_load_objects_content_pipe(iki_write_main_t * const main, const f_range_t range, uint8_t * const pipe_state);
#endif // _di_iki_write_eki_load_objects_content_pipe_
/**
* @see f_iki_eki_write()
*/
#ifndef _di_iki_write_eki_process_objects_content_
- extern void iki_write_eki_process_objects_content(void * const main, const f_string_statics_t objects, const f_string_static_t content);
+ extern void iki_write_eki_process_objects_content(iki_write_main_t * const main, const f_string_statics_t objects, const f_string_static_t content);
#endif // _di_iki_write_eki_process_objects_content_
#ifdef __cplusplus
data.program.output.custom = (void *) &data;
data.program.warning.custom = (void *) &data;
- data.callback.load_objects_content_pipe = &iki_write_iki_load_objects_content_pipe;
- data.callback.print_help = &iki_write_iki_print_message_help;
- data.callback.process_objects_content = &iki_write_iki_process_objects_content;
+ data.call.load_objects_content_pipe = &iki_write_iki_load_objects_content_pipe;
+ data.call.print_help = &iki_write_iki_print_message_help;
+ data.call.process_objects_content = &iki_write_iki_process_objects_content;
f_console_parameter_t parameters[] = iki_write_console_parameter_t_initialize;
data.program.parameters.array = parameters;
#endif // _di_iki_write_iki_print_error_object_not_valid_
#ifndef _di_iki_write_iki_print_message_help_
- void iki_write_iki_print_message_help(fl_print_t * const print) {
+ f_status_t iki_write_iki_print_message_help(fl_print_t * const print) {
- if (!print) return;
+ if (!print) return F_status_set_error(F_output_not);
f_file_stream_lock(print->to);
f_file_stream_flush(print->to);
f_file_stream_unlock(print->to);
+
+ return F_okay;
}
#endif // _di_iki_write_iki_print_message_help_
* The output structure to print to.
*
* This does not alter print.custom.setting.state.status.
+ *
+ * @return
+ * F_okay on success.
+ * F_output_not on success, but no printing is performed.
+ *
+ * F_output_not (with error bit) if setting is NULL.
*/
#ifndef _di_iki_write_iki_print_message_help_
- extern void iki_write_iki_print_message_help(fl_print_t * const print);
+ extern f_status_t iki_write_iki_print_message_help(fl_print_t * const print);
#endif // _di_iki_write_iki_print_message_help_
/**
#endif
#ifndef _di_iki_write_iki_load_objects_content_pipe_
- void iki_write_iki_load_objects_content_pipe(void * const void_main, const f_range_t range, uint8_t * const pipe_state) {
+ void iki_write_iki_load_objects_content_pipe(iki_write_main_t * const main, const f_range_t range, uint8_t * const pipe_state) {
- if (!void_main) return;
+ if (!main) return;
- iki_write_main_t * const main = (iki_write_main_t *) void_main;
-
- if (!pipe_state || !main->callback.process_objects_content) {
+ if (!pipe_state || !main->call.process_objects_content) {
main->setting.state.status = F_status_set_error(F_parameter);
iki_write_print_error(&main->program.error, macro_iki_write_f(iki_write_callback_load_objects_content_pipe));
}
}
- main->callback.process_objects_content((void *) main, main->cache.objects, main->cache.content);
+ main->call.process_objects_content((void *) main, main->cache.objects, main->cache.content);
if (F_status_is_error(main->setting.state.status)) return;
fll_print_dynamic_raw(f_string_eol_s, main->program.output.to);
#endif // _di_iki_write_iki_load_objects_content_pipe_
#ifndef _di_iki_write_iki_process_objects_content_
- void iki_write_iki_process_objects_content(void * const void_main, const f_string_statics_t objects, const f_string_static_t content) {
-
- if (!void_main) return;
+ void iki_write_iki_process_objects_content(iki_write_main_t * const main, const f_string_statics_t objects, const f_string_static_t content) {
- iki_write_main_t * const main = (iki_write_main_t *) void_main;
+ if (!main) return;
// Only the first index is used because IKI only supports one Object (Vocabulary).
if (!objects.used || !objects.array[0].used) {
* @see f_iki_write()
*/
#ifndef _di_iki_write_iki_load_objects_content_pipe_
- extern void iki_write_iki_load_objects_content_pipe(void * const main, const f_range_t range, uint8_t * const pipe_state);
+ extern void iki_write_iki_load_objects_content_pipe(iki_write_main_t * const main, const f_range_t range, uint8_t * const pipe_state);
#endif // _di_iki_write_iki_load_objects_content_pipe_
/**
* @see f_iki_write()
*/
#ifndef _di_iki_write_iki_process_objects_content_
- extern void iki_write_iki_process_objects_content(void * const main, const f_string_statics_t objects, const f_string_static_t content);
+ extern void iki_write_iki_process_objects_content(iki_write_main_t * const main, const f_string_statics_t objects, const f_string_static_t content);
#endif // _di_iki_write_iki_process_objects_content_
#ifdef __cplusplus
*/
#ifndef _di_iki_write_call_t_
typedef void (*iki_write_settings_load_call_t)(const f_console_arguments_t arguments, iki_write_main_t * const main);
- typedef void (*iki_write_load_objects_content_pipe_call_t)(void * const main, const f_range_t range, uint8_t * const pipe_state);
- typedef void (*iki_write_process_objects_content_call_t)(void * const main, const f_string_statics_t objects, const f_string_static_t content);
+ typedef void (*iki_write_load_objects_content_pipe_call_t)(iki_write_main_t * const main, const f_range_t range, uint8_t * const pipe_state);
+ typedef void (*iki_write_process_objects_content_call_t)(iki_write_main_t * const main, const f_string_statics_t objects, const f_string_static_t content);
typedef struct {
iki_write_load_objects_content_pipe_call_t load_objects_content_pipe;