Subject: Re: Slightly modifying fgetln(3) semantics
To: J.T. Conklin <jtc@NetBSD.ORG>
From: Luke Mewburn <>
List: tech-userlevel
Date: 09/19/1997 10:35:14
"J.T. Conklin" writes:
> > Greetings.
> > 
> > fgetln(3) reads a line from stdin (upto newline or EOF), and returns a
> > pointer to this string, along with its length.  The string is not NUL
> > terminated.
> The history of fgetln / fgetline includes at least two libc shared
> library major number bumps.  I don't recall, but I wouldn't be
> surprised if one of the past versions NUL terminated the string.

Here's the relevant log messages from libc/shlib_version:

revision 1.8
date: 1994/01/04 05:15:30;  author: cgd;  state: Exp;  lines: +2 -2
bump shlib version so people don't get screwed again by fgetline()
revision 1.7
date: 1993/12/22 07:09:11;  author: cgd;  state: Exp;  lines: +1 -1
don't squish newline at end of fgetline()...  from bostic

I expect that rev 1.8 was for when fgetline() was renamed to fgetln()