Elektrine lite

← Feed

@dougmerritt@mathstodon.xyz

Post #2135314

2026-05-06 18:57 UTC

@thalia > stdio did not exist yet But it at least had the Portable I/O Library, yes? @lindsey @regehr @dan

Replies (1)

  • @thalia@discuss.systems 2026-05-06 23:02

    @lindsey @dougmerritt @dan @regehr FILE and the associated buffered I/O methods were introduced in V7. Before then, you’d restate the buffer struct definition instead of including a header, often naming only the fields you use. Here’s an example from diff in V5: struct buf { int fdes; char data[516]; } *buf1, *buf2; The buffer is actually only 512 bytes; the other 4 bytes that are lumped in are fields they don’t use here. https://github.com/dspinellis/unix-history-repo/blob/Research-V5/usr/source/s1/diff1.c#L66

    Open ##2135315