Re: Bug in SosMan's getline_test



On Wed, 12 Sep 2007 19:59:32 +0200 (CEST), in comp.lang.c , Friar Tuck
<nospam@xxxxxxxxxxx> wrote:

On 11 Sep 2007 at 23:30, Ben Pfaff wrote:
Friar Tuck <nospam@xxxxxxxxxxx> writes:

I believe I have found a bug in Dr Sosman's getline_test program, which
is one of the official newsgroup programs.

There is no such thing as an "official newsgroup program", at
least not in comp.lang.c

Well, it's listed on the group website, so I'd say that's official.

There /is/ no group website. Do you mean the CLC wiki? Thats an
unofficial effort maintained by some of the regulars here, but by no
means officially sanctioned (how could it be, there's no elected
officers of this unmoderated group).

GNU lib'c getline and Eric's getline evidently have different
interfaces, judging from the line of source code above.

I don't believe there's a standard library function called getline.

Correct. However what Ben said was "GNU libc's getline". GNU evidently
provide a nonstandard 'getline' function with different semantics to
Eric's.

--
Mark McIntyre

"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan
.



Relevant Pages

  • Re: Bug in SosMans getline_test
    ... is one of the official newsgroup programs. ... Well, it's listed on the group website, so I'd say that's official. ... I don't believe there's a standard library function called getline. ... But there is a GNU version that is very popular among ...
    (comp.lang.c)
  • Re: Bug in SosMans getline_test
    ... is one of the official newsgroup programs. ... GNU lib'c getline and Eric's getline evidently have different ... judging from the line of source code above. ...
    (comp.lang.c)
  • Re: Bug in SosMans getline_test
    ... is one of the official newsgroup programs. ... with somebody else's getline() function. ... portability and an emphasis on ease of use. ... My father was a doctor, and his father was a doctor, and ...
    (comp.lang.c)
  • Re: Bug in SosMans getline_test
    ... is one of the official newsgroup programs. ... GNU lib'c getline and Eric's getline evidently have different ... interfaces, judging from the line of source code above. ... I don't believe there's a standard library function called getline. ...
    (comp.lang.c)
  • Re: Segmentation fault on end of loop... (getline)
    ... >> using GNU C: ... > See what the others have said, plus, use fgets instead of getline. ...
    (comp.lang.c)