Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Edited by sciSpider v2.1 (sch jbop) (X_X)@==(Q_Q)@

...

An obvious alternative is to leave room in the buffer for one more character, and when no newline is transferred, append a newline followed by a NULLnull-termination character. This approach is unsafe, because it quietly accepts an input that is not what was actually intended, with unknown consequences.

...

Wiki Markup
\[[Lai 06|AA. C References#Lai 06]\]
\[[Seacord 05|AA. C References#Seacord 05]\] Chapter 2, "Strings"
\[[ISO/IEC 9899-:1999|AA. C References#ISO/IEC 9899-1999]\] Section 7.19.7.2, "The fgets function"

...