ELinks 0.18.0
|
A place where dumping functions write their output. More...
Data Fields | |
size_t | bufpos |
How many bytes are in buf already. | |
struct string * | string |
A string to which the buffer should eventually be flushed, or NULL. | |
int | fd |
A file descriptor to which the buffer should eventually be flushed, or -1. | |
unicode_val_T | frame [FRAME_CHARS_END - FRAME_CHARS_BEGIN] |
Mapping of SCREEN_ATTR_FRAME characters. | |
char | buf [D_BUF] |
Bytes waiting to be flushed. |
Related Symbols | |
(Note that these are not member symbols.) | |
static void | dump_output_prepare_frame (struct dump_output *out, int to_cp) |
Initialize dump_output::frame for the specified codepage. | |
static struct dump_output * | dump_output_alloc (int fd, struct string *string, int cp) |
Allocate and initialize a struct dump_output. | |
static int | dump_output_flush (struct dump_output *out) |
Flush buffered output to the file or string. |
A place where dumping functions write their output.
The data first goes to the buffer in this structure. When the buffer is full enough, it is flushed to a file descriptor or to a string.
|
Allocate and initialize a struct dump_output.
The caller should eventually free the structure with mem_free().
fd | The file descriptor to which the output will be written. Use -1 if the output should go to a string instead. |
string | The string to which the output will be appended. Use NULL if the output should go to a file descriptor instead. |
cp | The codepage of the dump. It need not match the codepage of the document. |
|
Flush buffered output to the file or string.
|
Initialize dump_output::frame for the specified codepage.
If the codepage does not support all the box-drawing characters of CP437, then map them to simpler characters, according to frame_simplify.
char dump_output::buf[D_BUF] |
Bytes waiting to be flushed.
size_t dump_output::bufpos |
How many bytes are in buf already.
int dump_output::fd |
A file descriptor to which the buffer should eventually be flushed, or -1.
unicode_val_T dump_output::frame[FRAME_CHARS_END - FRAME_CHARS_BEGIN] |
Mapping of SCREEN_ATTR_FRAME characters.
If the target codepage is UTF-8 (which is possible only if CONFIG_UTF8 is defined), then the values are UTF-32. Otherwise, they are in the target codepage, even though the type may still be unicode_val_T.
struct string* dump_output::string |
A string to which the buffer should eventually be flushed, or NULL.