Email List: Xaustin-group-lX
[All Lists]

Re: Proposed submissions for the revision from The Open Group

To: yyyyyyy@xxxxxxx, yyyyyyyyyyyyyy@xxxxxxxxxxxxx
Subject: Re: Proposed submissions for the revision from The Open Group
From: Joerg Schilling <yyyyyyyyy@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 11 Jan 2006 18:25:44 +0100
References: <1060109184758.ZM17257@skye.rdg.opengroup.org><17346.48571.685761.731503@khavrinen.csail.mit.edu><43c3f58c.DCRQQCxQd+2zWxCK%gunnarr@acm.org>
Gunnar Ritter <yyyyyyy@xxxxxxx> wrote:

> Garrett Wollman <yyyyyyy@xxxxxxxxxxxxx> wrote:
>
> > > getline()
> >
> > The interface seems reasonable, if a bit baroque.  Will there be
> > wide-character versions of these interfaces as well?  And why these
> > and not the much simpler fgetln() interface from 4.4BSD?
>
> The fgetln() interface may be simpler, but it is inferior since it
> does not allow the programmer to allocate the buffer on his own,

Maybe, I should mention again (I did this already a long time ago)
the interface of getline()/fgetline() that was in use on a UNIX clone
since at least 19812?

    int getline(char * buffer, int length)

    Returns either the number of bytes in the buffer or EOF (-1)


    int fgetline(FILE *f, char * buffer, int length)

RETURNS
     >=0  the number of bytes read.

     EOF (-1)  if an error occurred.


Jörg

-- 
 EMail:yyyyy@xxxxxxxxxxxxxxxxxxxxxxxxxxx (home) Jörg Schilling D-13353 Berlin
       yy@xxxxxxxxxxxxxxx               (uni)  
       yyyyyyyyy@xxxxxxxxxxxxxxxxxxx    (work) Blog: http://schily.blogspot.com/
 URL:  http://cdrecord.berlios.de/old/private/ ftp://ftp.berlios.de/pub/schily

<Prev in Thread] Current Thread [Next in Thread>