This is the mail archive of the cygwin-xfree@sources.redhat.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Getline()


getline() is a traditional, but not a standard, function that returns the
next full line of text from standard input or some other file. There are a
couple of implementations in "The C Programming Language" by Kernigahan and
Ritchie. Look in the index. Most implementations are only a dozen lines or
less and are based on functions in stdio.h. Many implementations use a
#define to wrap fgets() from stdio.h.

Some implementationsof getline() return the terminating newline, and some
don't. Look around in the source code that calls getline() for clues as to
what it expects.

Sam

At 04:12 PM 8/23/00 -0400, you wrote:
>On Wed, Aug 23, 2000 at 11:36:55AM +1000, Robert Collins wrote:
>>This is slightly off-topic, but..
>>I'm working on Gnome for cygwin (ok, glutton for punishment :-])... and
>>gnome-core has a capplet that uses it. Newlib doesn't have getline() in
>>it, does anyone know of a replacement library/source fragment I could
>>use instead?
>
>I don't see a 'getline()' on linux either, or, at least 'man getline'
>doesn't return anything.  If this is supposed to be a system routine I'm
>surprised that Gnome can't cope with it's unavailability since it isn't,
>IMO, a standard routine.
>
>cgf


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]