118 " <file.jof> [--headless]\n"
119 " [--dump-ppm PATH [--page N | --dump-tile N]]\n"
120 " window: resizable, fit-to-width, continuous scroll "
121 "(wheel/trackpad/PageUp-Dn/Home/End)\n");
139 const char* operation,
Annotation-attribute framework macros for ra8-firmware.
#define RA8_INTERNAL
Marker that a function is intended to be static (file-local).
Error Code Definitions for ra8-firmware.
@ k_ra8_ok
Success – operation completed with all postconditions satisfied.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
ra8_io targetable byte-stream facade – one writer, many destinations.
ra8_err_t ra8_io_stream_puts(ra8_io_stream_t *s, const char *str)
Write a NUL-terminated string (without the NUL) to the bound sink.
ra8_err_t ra8_io_stream_put_u32(ra8_io_stream_t *s, uint32_t value)
Write value as unsigned decimal ASCII (no leading zeros).
ra8_err_t ra8_io_stream_put_u64(ra8_io_stream_t *s, uint64_t value)
Write value as unsigned 64-bit decimal ASCII without leading zeros.
ra8_err_t ra8_io_stream_put_hex(ra8_io_stream_t *s, uint32_t value, uint8_t min_digits)
Write value as lowercase hex ASCII, zero-padded to min_digits.
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.
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_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_text(ra8_io_stream_t *output, const char *text)
Write one fixed diagnostic without a terminating byte.
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_usage(ra8_io_stream_t *output, const char *executable)
Write the complete command-line usage message.
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.
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.
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.
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.
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.
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.
Private typed diagnostic writers for the host viewer.
Caller-allocated byte-stream handle binding a sink to its context.