Page MenuHomeFreeBSD

Add HISTORY section to getc(3) man page
AbandonedPublic

Authored by carlavilla on Mar 22 2020, 11:38 AM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 24 2024, 11:42 AM
Unknown Object (File)
Dec 22 2023, 10:52 PM
Unknown Object (File)
Dec 14 2023, 10:37 PM
Unknown Object (File)
Sep 25 2023, 9:24 PM
Unknown Object (File)
Sep 19 2023, 3:53 PM
Unknown Object (File)
Aug 5 2023, 8:08 PM
Subscribers

Details

Reviewers
bcr
imp
Group Reviewers
manpages
Summary

Add HISTORY section to getc(3) man page

MFC: 2 days

PR: 240269

Test Plan

Compile the manpage

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

This revision is now accepted and ready to land.Mar 22 2020, 11:55 AM
imp requested changes to this revision.Mar 22 2020, 1:52 PM

I don't think this is right. Can you cite your sourse? Stdio didn't happen until V7. And the earlier io library was V6. And we don't have good sources pre v5.

This revision now requires changes to proceed.Mar 22 2020, 1:52 PM

getc and getw first appear in the V1 man page.
but they aren't in what little v1 sources we have.
They are in the unix-72 which is closer to a v2 or v3 system.
And getc/getw aren't the current modern ones, but took an argument that was an iobuf, not a FILE* They didn't become the modern form until V7 with stdio.
They also changed between v1 and v2 (the buffer size rose from 128 bytes to 512 bytes).
So it's likely better to say 'routines of the same name, but different calling conventions, originated in v1'.
I can't find getchar in the V2 man page, nor v3. But it is in the v4 man pages (man page is named getchr.3, but documents getchar()).
fgetc.c first appears in stdio in V7.

Hi @imp,

as the author of the original PR, I try to clarify the sources in question. The newly introduces HISTORY section comes from OpenBSD, which originates from http://minnie.tuhs.org/cgi-bin/utree.pl. Jörg Schwarze did some research and pointed out that these functions actually predate 2BSD and the mentioned UNIX versions are the nearest version to match for the HISTORY section. However, if you think that this HISTORY section needs an update I am willing to refresh it.

To sum it up, would it be okay to say that the getc and getw functions first appeared in AT&T Unix V1 and that they changed their buffer size around AT&T V7? I'll also update getchar() first appearance from AT&T V2 to V4.

In D24147#531117, @gbergling_gmail.com wrote:

Hi @imp,

as the author of the original PR, I try to clarify the sources in question. The newly introduces HISTORY section comes from OpenBSD, which originates from http://minnie.tuhs.org/cgi-bin/utree.pl. Jörg Schwarze did some research and pointed out that these functions actually predate 2BSD and the mentioned UNIX versions are the nearest version to match for the HISTORY section. However, if you think that this HISTORY section needs an update I am willing to refresh it.

Yea. I think it's sufficient to say "getc and getw appeared, in a similar form in V1 and were integrated into stdio in V7" That's likely enough history for the man page... the buffer sizes and stuff was me just taking notes what I saw.

To sum it up, would it be okay to say that the getc and getw functions first appeared in AT&T Unix V1 and that they changed their buffer size around AT&T V7? I'll also update getchar() first appearance from AT&T V2 to V4.

Yea, updating that to v4 is likely enough. It never took an arg, and was silently migrated to stdio in v7, but the underlying mechanism likely isn't of much interest.

I've used TUHS a lot, as well as given a couple of history of early unix talks recently...