Word Unperfect
public
Read
Owner: themaster
Branch: main
Commits: 0
Git CLI clone URL
git clone https://www.xt-emporium.com/git/word-unperfect.git
Fullscreen desktop URL
Code
Commits
History
Branches
Bug Reports
Discussions
Compare
Settings
word-unperfect
/
rev
/
wp_text_export.h
File editor
#ifndef WP_TEXT_EXPORT_H #define WP_TEXT_EXPORT_H #include "wp_file_format.h" #include "wp_layout_shared.h" #include <stdbool.h> #include <stddef.h> #include <stdint.h> typedef struct WpTextExportOptions { bool preserve_tabs; /* true: emit \t; false: expand to spaces. */ bool emit_form_feed; /* true: hard/soft page codes become \f. */ bool emit_code_markers; /* true: include visible labels for non-text codes. */ } WpTextExportOptions; typedef struct WpTextExportStats { size_t records_seen; size_t bytes_consumed; size_t text_bytes_written; /* Excludes the terminating NUL. */ size_t text_chars_emitted; /* Logical text characters, not UTF-8 bytes. */ size_t format_codes_seen; size_t extended_chars_emitted; size_t code_markers_emitted; size_t fixed_packets_seen; size_t variable_packets_seen; size_t incomplete_records; size_t mismatched_trailers; bool output_truncated; } WpTextExportStats; void wp_text_export_default_options(WpTextExportOptions *options); void wp_text_export_clear_stats(WpTextExportStats *stats); /* Export the remaining primary stream to a NUL-terminated host UTF-8 string. * The input stream is snapshotted, so the caller's WpLayoutGlobals cursor is * not advanced. Returns false only for invalid arguments or truncation. */ bool wp_text_export_stream(WpLayoutGlobals *wl, char *out, size_t out_capacity, size_t *out_len, const WpTextExportOptions *options, WpTextExportStats *stats); bool wp_text_export_loaded_file(WpLoadedFile *file, char *out, size_t out_capacity, size_t *out_len, const WpTextExportOptions *options, WpTextExportStats *stats); bool wp_text_export_file_to_buffer(const char *filename, char *out, size_t out_capacity, size_t *out_len, const WpTextExportOptions *options, WpTextExportStats *stats); #endif
Commit message
This repository is read-only for this account.
Repository snapshot
Current branch
main
Visibility
public
Your access
Read
Remote
None
File activity
View file history