Page MenuHomeFreeBSD

(RFC) stdio: consolidate the two memstream implementations
Needs ReviewPublic

Authored by kevans on Fri, Jun 5, 1:09 AM.
Tags
None
Referenced Files
F160185404: D57461.id179249.diff
Mon, Jun 22, 12:08 AM
Unknown Object (File)
Sat, Jun 20, 6:00 PM
Unknown Object (File)
Sat, Jun 20, 6:00 PM
Unknown Object (File)
Sat, Jun 20, 3:39 PM
Unknown Object (File)
Sat, Jun 20, 3:14 PM
Unknown Object (File)
Sat, Jun 20, 11:36 AM
Unknown Object (File)
Sat, Jun 20, 5:26 AM
Unknown Object (File)
Sat, Jun 20, 5:22 AM
Subscribers

Details

Reviewers
jhb
des
Group Reviewers
Klara
Summary

Substantial parts of the memstream and wmemstream implementations
overlap, and it's a little laborious to duplicate code between the two.

Abstract the differences out into some streamcfg structs and see if we
can get the arithmetic right and converge on a single implementation.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 73692
Build 70575: arc lint + arc unit

Event Timeline

kevans requested review of this revision.Fri, Jun 5, 1:09 AM
lib/libc/stdio/open_memstream.c
97

is newoff here in bytes or in characters? I think the code might be easier to reason about if everything is in characters.

lib/libc/stdio/open_memstream.c
47

See NLINK_MAX in D57324