|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
Typed allocation-free diagnostic writers for the host viewer. More...
#include <stddef.h>#include <stdint.h>#include "ra8_attributes.h"#include "ra8_err.h"#include "ra8_io_stream.h"#include "ra8_viewer_output_internal.h"Go to the source code of this file.
Functions | |
| static ra8_err_t | internal_put_text (ra8_io_stream_t *output, ra8_err_t current, const char *text) |
| Append text only while an output sequence remains successful. | |
| static ra8_err_t | internal_put_u32 (ra8_io_stream_t *output, ra8_err_t current, uint32_t value) |
| Append a decimal 32-bit value while a sequence remains successful. | |
| static ra8_err_t | internal_put_u64 (ra8_io_stream_t *output, ra8_err_t current, uint64_t value) |
| Append a decimal 64-bit value while a sequence remains successful. | |
| static ra8_err_t | internal_put_hex (ra8_io_stream_t *output, ra8_err_t current, uint32_t value) |
| Append an unpadded hexadecimal value while a sequence remains successful. | |
| ra8_err_t | priv_viewer_output_usage (ra8_io_stream_t *output, const char *executable) |
| Write the complete command-line usage message. | |
| ra8_err_t | priv_viewer_output_capacity (ra8_io_stream_t *output, const char *subject, size_t required, size_t supplied) |
| Write an exact workspace requirement diagnostic. | |
| ra8_err_t | priv_viewer_output_index_error (ra8_io_stream_t *output, const char *operation, uint32_t index, ra8_err_t error_code) |
| Write a numbered operation failure and hexadecimal status. | |
| ra8_err_t | priv_viewer_output_error (ra8_io_stream_t *output, const char *operation, ra8_err_t error_code) |
| Write an unnumbered operation failure and hexadecimal status. | |
| ra8_err_t | priv_viewer_output_open_error (ra8_io_stream_t *output, const char *path, ra8_err_t error_code) |
| Write a document-open failure with its path and status. | |
| ra8_err_t | priv_viewer_output_opened (ra8_io_stream_t *output, const char *path, uint32_t page_count) |
| Write a successful document-open diagnostic. | |
| ra8_err_t | priv_viewer_output_wrote (ra8_io_stream_t *output, const char *path) |
| Write a successful path-publication diagnostic. | |
| ra8_err_t | priv_viewer_output_tile (ra8_io_stream_t *output, uint32_t tile, uint32_t width, uint32_t height, const char *path) |
| Write a successful tile-publication diagnostic. | |
| ra8_err_t | priv_viewer_output_text (ra8_io_stream_t *output, const char *text) |
| Write one fixed diagnostic without a terminating byte. | |
Typed allocation-free diagnostic writers for the host viewer.
Composes the viewer's exact messages from bounded stream primitives, propagating the first short or failed write without varargs or hosted I/O.
Definition in file ra8_viewer_output.c.
|
static |
Append an unpadded hexadecimal value while a sequence remains successful.
Preserves a preceding failure or delegates one bounded lowercase hexadecimal rendering to the portable stream facade.
| [in,out] | output | Bound byte stream. |
| [in] | current | Status from the preceding fragment. |
| [in] | value | Value to append. |
| k_ra8_ok | The complete hexadecimal value was appended. |
| other | A preceding or current stream operation failed. |
output is bound. current is a canonical stream status. Definition at line 107 of file ra8_viewer_output.c.
References k_ra8_ok, and ra8_io_stream_put_hex().
Referenced by priv_viewer_output_error(), priv_viewer_output_index_error(), and priv_viewer_output_open_error().
|
static |
Append text only while an output sequence remains successful.
Preserves a preceding failure without touching the destination; otherwise delegates the fragment to the portable stream facade.
| [in,out] | output | Bound byte stream. |
| [in] | current | Status from the preceding fragment. |
| [in] | text | NUL-terminated fragment. |
| k_ra8_ok | The fragment was appended completely. |
| other | A preceding or current stream operation failed. |
output is bound and text is NUL-terminated. current is a canonical stream status. Definition at line 37 of file ra8_viewer_output.c.
References k_ra8_ok, and ra8_io_stream_puts().
Referenced by priv_viewer_output_capacity(), priv_viewer_output_error(), priv_viewer_output_index_error(), priv_viewer_output_open_error(), priv_viewer_output_opened(), priv_viewer_output_tile(), priv_viewer_output_usage(), and priv_viewer_output_wrote().
|
static |
Append a decimal 32-bit value while a sequence remains successful.
Preserves a preceding failure or delegates one bounded decimal rendering to the portable stream facade.
| [in,out] | output | Bound byte stream. |
| [in] | current | Status from the preceding fragment. |
| [in] | value | Value to append. |
| k_ra8_ok | The complete decimal value was appended. |
| other | A preceding or current stream operation failed. |
output is bound. current is a canonical stream status. Definition at line 60 of file ra8_viewer_output.c.
References k_ra8_ok, and ra8_io_stream_put_u32().
Referenced by priv_viewer_output_index_error(), priv_viewer_output_opened(), and priv_viewer_output_tile().
|
static |
Append a decimal 64-bit value while a sequence remains successful.
Preserves a preceding failure or delegates one bounded decimal rendering to the portable stream facade.
| [in,out] | output | Bound byte stream. |
| [in] | current | Status from the preceding fragment. |
| [in] | value | Value to append. |
| k_ra8_ok | The complete decimal value was appended. |
| other | A preceding or current stream operation failed. |
output is bound. current is a canonical stream status. Definition at line 83 of file ra8_viewer_output.c.
References k_ra8_ok, and ra8_io_stream_put_u64().
Referenced by priv_viewer_output_capacity().
|
nodiscard |
Write an exact workspace requirement diagnostic.
Definition at line 125 of file ra8_viewer_output.c.
References internal_put_text(), internal_put_u64(), and ra8_io_stream_puts().
Referenced by internal_report_capacity().
|
nodiscard |
Write an unnumbered operation failure and hexadecimal status.
Definition at line 151 of file ra8_viewer_output.c.
References internal_put_hex(), internal_put_text(), and ra8_io_stream_puts().
Referenced by internal_dump_tile().
|
nodiscard |
Write a numbered operation failure and hexadecimal status.
Definition at line 138 of file ra8_viewer_output.c.
References internal_put_hex(), internal_put_text(), internal_put_u32(), and ra8_io_stream_puts().
Referenced by internal_dump_tile(), and internal_render_page().
|
nodiscard |
Write a document-open failure with its path and status.
Definition at line 160 of file ra8_viewer_output.c.
References internal_put_hex(), internal_put_text(), and ra8_io_stream_puts().
Referenced by main().
|
nodiscard |
Write a successful document-open diagnostic.
Definition at line 169 of file ra8_viewer_output.c.
References internal_put_text(), internal_put_u32(), and ra8_io_stream_puts().
Referenced by main().
|
nodiscard |
Write one fixed diagnostic without a terminating byte.
Definition at line 202 of file ra8_viewer_output.c.
References ra8_io_stream_puts().
Referenced by internal_render_page(), and internal_run_window().
|
nodiscard |
Write a successful tile-publication diagnostic.
Definition at line 185 of file ra8_viewer_output.c.
References internal_put_text(), internal_put_u32(), and ra8_io_stream_puts().
Referenced by internal_dump_tile().
|
nodiscard |
Write the complete command-line usage message.
Definition at line 112 of file ra8_viewer_output.c.
References internal_put_text(), and ra8_io_stream_puts().
Referenced by internal_usage().
|
nodiscard |
Write a successful path-publication diagnostic.
Definition at line 178 of file ra8_viewer_output.c.
References internal_put_text(), and ra8_io_stream_puts().
Referenced by internal_render_page().