|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
Private bounded text helpers over the portable byte-stream contract. More...
#include "mdl_stream_internal.h"Go to the source code of this file.
Enumerations | |
| enum | mdl_stream_limit_t : uint8_t { k_mdl_stream_repeat_max = 64 } |
| Maximum repeated byte count accepted by one helper call. More... | |
Functions | |
| ra8_err_t | priv_mdl_stream_text (ra8_err_t prior, ra8_io_stream_t *stream, const char *text) |
| Append text unless an earlier operation already failed. | |
| ra8_err_t | priv_mdl_stream_u64 (ra8_err_t prior, ra8_io_stream_t *stream, uint64_t value) |
| Append one unsigned integer unless an earlier append failed. | |
| ra8_err_t | priv_mdl_stream_hex (ra8_err_t prior, ra8_io_stream_t *stream, uint32_t value) |
| Append one hexadecimal error/status value after prior success. | |
| ra8_err_t | priv_mdl_stream_repeat (ra8_err_t prior, ra8_io_stream_t *stream, char byte, size_t count) |
| Append a bounded repeated byte after prior success. | |
| ra8_err_t | priv_mdl_stream_flush (ra8_err_t prior, ra8_io_stream_t *stream) |
| Flush a stream only when every earlier append succeeded. | |
Private bounded text helpers over the portable byte-stream contract.
Chains exact fragments and bounded numeric rendering while retaining the first sink error without allocation or variadic formatting.
Definition in file mdl_stream.c.
| enum mdl_stream_limit_t : uint8_t |
Maximum repeated byte count accepted by one helper call.
| Enumerator | |
|---|---|
| k_mdl_stream_repeat_max | Fixed loop bound for presenter fragments. |
Definition at line 12 of file mdl_stream.c.
| ra8_err_t priv_mdl_stream_flush | ( | ra8_err_t | prior, |
| ra8_io_stream_t * | stream ) |
Flush a stream only when every earlier append succeeded.
| [in] | prior | Status from the preceding append. |
| [in,out] | stream | Bound destination stream. |
prior when failed, otherwise the flush status. stream remains bound and exclusively owned. prior is a canonical status. Performs one synchronous operation against the injected stream. An earlier error is returned unchanged and prevents later stream access.
| k_ra8_ok | The operation completed successfully. |
| other | The originating validation, storage, stream, or network error. |
Definition at line 52 of file mdl_stream.c.
References k_ra8_ok, ra8_io_stream_flush(), and RA8_PRIV.
Referenced by mdl_report_progress_bar().
| ra8_err_t priv_mdl_stream_hex | ( | ra8_err_t | prior, |
| ra8_io_stream_t * | stream, | ||
| uint32_t | value ) |
Append one hexadecimal error/status value after prior success.
| [in] | prior | Status from the preceding append. |
| [in,out] | stream | Bound destination stream. |
| [in] | value | Unsigned value rendered without a prefix. |
prior when failed, otherwise the current append status. stream remains bound and exclusively owned. prior is a canonical status. Performs one synchronous operation against the injected stream. An earlier error is returned unchanged and prevents later stream access.
| k_ra8_ok | The operation completed successfully. |
| other | The originating validation, storage, stream, or network error. |
Definition at line 26 of file mdl_stream.c.
References k_ra8_ok, ra8_io_stream_put_hex(), and RA8_PRIV.
Referenced by internal_direct_pack_failure(), internal_pack_report_combine_failure(), internal_pack_report_failure(), internal_report_cover_failure(), and internal_run_series_paths().
| ra8_err_t priv_mdl_stream_repeat | ( | ra8_err_t | prior, |
| ra8_io_stream_t * | stream, | ||
| char | byte, | ||
| size_t | count ) |
Append a bounded repeated byte after prior success.
| [in] | prior | Status from the preceding append. |
| [in,out] | stream | Bound destination stream. |
| [in] | byte | Byte repeated in the destination. |
| [in] | count | Repetition count, at most 64. |
prior when failed, otherwise the append status. | k_ra8_err_invalid_size | count exceeded the fixed bound. |
stream remains bound and exclusively owned. prior is a canonical status. count copies of byte. Performs one synchronous operation against the injected stream. An earlier error is returned unchanged and prevents later stream access.
Definition at line 31 of file mdl_stream.c.
References k_mdl_stream_repeat_max, k_ra8_err_invalid_size, k_ra8_ok, ra8_io_stream_putc(), RA8_LOOP_BOUND, and RA8_PRIV.
Referenced by mdl_report_progress_bar().
| ra8_err_t priv_mdl_stream_text | ( | ra8_err_t | prior, |
| ra8_io_stream_t * | stream, | ||
| const char * | text ) |
Append text unless an earlier operation already failed.
| [in] | prior | Status from the preceding append. |
| [in,out] | stream | Bound destination stream. |
| [in] | text | NUL-terminated text fragment. |
prior when failed, otherwise the current append status. text is NUL-terminated and stream remains bound. prior is a canonical status. Performs one synchronous operation against the injected stream. An earlier error is returned unchanged and prevents later stream access.
| k_ra8_ok | The operation completed successfully. |
| other | The originating validation, storage, stream, or network error. |
Definition at line 16 of file mdl_stream.c.
References k_ra8_ok, ra8_io_stream_puts(), and RA8_PRIV.
Referenced by internal_admin_text3(), internal_apply_order(), internal_cover_finish(), internal_credential_capacity_error(), internal_direct_pack_failure(), internal_direct_text3(), internal_discover_text3(), internal_download_page_image(), internal_download_page_images(), internal_export_after(), internal_extract_cover(), internal_extract_optional_metadata(), internal_extract_page_images(), internal_extract_series_metadata(), internal_fetch_artifact(), internal_finish_artifact_fetch(), internal_init_site_identity(), internal_library_report(), internal_library_text3(), internal_list_cb(), internal_mdl_fetch_diag3(), internal_mdl_fetch_select_chapter_number(), internal_mdl_fetch_select_chapter_title(), internal_pack_combined_dir(), internal_pack_combined_dir_output(), internal_pack_dir_output(), internal_pack_directory_output(), internal_pack_file_output(), internal_pack_report_combine_failure(), internal_pack_report_failure(), internal_pack_text3(), internal_prepare_diag3(), internal_present_and_pick(), internal_print_header(), internal_print_hits(), internal_print_zero(), internal_publish_page_image(), internal_reconcile_series_state(), internal_report_cover_failure(), internal_report_position(), internal_report_robots_disallow(), internal_report_robots_unavailable(), internal_report_stats(), internal_run_series_network(), internal_run_series_paths(), internal_select_hit(), internal_select_run_window(), internal_series_text3(), internal_verify_artifact_entry(), internal_verify_print_summary(), internal_warn_no_contact(), mdl_app_run_artifact(), mdl_app_run_discover(), mdl_app_run_init_site(), mdl_app_run_pack(), mdl_app_run_page(), mdl_app_run_series(), mdl_app_run_update_all(), mdl_discover_run(), mdl_pack_combined_meta(), mdl_pack_one_meta(), mdl_report_failures(), mdl_report_progress(), mdl_report_progress_bar(), mdl_session_url_allowed(), and priv_mdl_app_report_cache().
| ra8_err_t priv_mdl_stream_u64 | ( | ra8_err_t | prior, |
| ra8_io_stream_t * | stream, | ||
| uint64_t | value ) |
Append one unsigned integer unless an earlier append failed.
| [in] | prior | Status from the preceding append. |
| [in,out] | stream | Bound destination stream. |
| [in] | value | Unsigned value rendered in decimal. |
prior when failed, otherwise the current append status. stream remains bound and exclusively owned. prior is a canonical status. Performs one synchronous operation against the injected stream. An earlier error is returned unchanged and prevents later stream access.
| k_ra8_ok | The operation completed successfully. |
| other | The originating validation, storage, stream, or network error. |
Definition at line 21 of file mdl_stream.c.
References k_ra8_ok, ra8_io_stream_put_u64(), and RA8_PRIV.
Referenced by internal_cover_finish(), internal_credential_capacity_error(), internal_download_page_image(), internal_download_page_images(), internal_library_report(), internal_present_and_pick(), internal_print_header(), internal_print_hits(), internal_print_zero(), internal_publish_page_image(), internal_report_position(), internal_report_stats(), internal_run_series_network(), internal_select_hit(), internal_verify_artifact_entry(), internal_verify_print_summary(), mdl_app_run_artifact(), mdl_app_run_page(), mdl_app_run_update_all(), mdl_pack_combined_meta(), mdl_report_failures(), mdl_report_progress_bar(), and priv_mdl_app_report_cache().