Skip to content

task.c: make recode_get_bytes read from the input buffer - #76

Merged
rrthomas merged 1 commit into
rrthomas:masterfrom
prownd:task.c-make-recode_get_bytes-read-from-the-input-buffer-s01
Sep 23, 2026
Merged

rrthomas merged 1 commit into
rrthomas:masterfrom
prownd:task.c-make-recode_get_bytes-read-from-the-input-buffer-s01

Conversation

@prownd

@prownd prownd commented Sep 21, 2026

Copy link
Copy Markdown

When the input is a memory buffer, recode_get_bytes copied bytes from the subtask's output buffer, and advanced the output cursor, instead of reading the input text. With an empty output it returned no data at all; otherwise it returned (and consumed) output bytes.

recode(1) only calls it for file input, but it is declared in recodext.h for externally written steps. Read from the input buffer.

When the input is a memory buffer, recode_get_bytes copied bytes from
the subtask's *output* buffer, and advanced the output cursor, instead
of reading the input text.  With an empty output it returned no data
at all; otherwise it returned (and consumed) output bytes.

recode(1) only calls it for file input, but it is declared in
recodext.h for externally written steps.  Read from the input buffer.
@rrthomas
rrthomas merged commit f815163 into rrthomas:master Sep 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants