Page MenuHomeFreeBSD

Add HISTORY section to getc(3) man page
Needs RevisionPublic

Authored by carlavilla on Sun, Mar 22, 11:38 AM.

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
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

carlavilla created this revision.Sun, Mar 22, 11:38 AM
bcr accepted this revision.Sun, Mar 22, 11:55 AM

Good to go!

This revision is now accepted and ready to land.Sun, Mar 22, 11:55 AM
imp requested changes to this revision.Sun, Mar 22, 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.Sun, Mar 22, 1:52 PM
imp added a comment.Sun, Mar 22, 2:12 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.

imp added a comment.Sun, Mar 22, 3:36 PM

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...