This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug manual/20640] New: Errors in example for WEOF macro


https://sourceware.org/bugzilla/show_bug.cgi?id=20640

            Bug ID: 20640
           Summary: Errors in example for WEOF macro
           Product: glibc
           Version: 2.23
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: manual
          Assignee: unassigned at sourceware dot org
          Reporter: igor.liferenko at gmail dot com
                CC: mtk.manpages at gmail dot com, roland at gnu dot org
  Target Milestone: ---

Hi all,

In the following extract from libc reference "< 0" must be changed to "> 0" and
"wgetc" must be changed to "getwc":

    In other words, sloppy code like
    {
      int c;
      ...
      while ((c = getc (fp)) < 0)
      ...
    }
    has to be rewritten to use WEOF explicitly when wide characters are used:
    {
      wint_t c;
      ...
      while ((c = wgetc (fp)) != WEOF)
      ...
    }

Regards,
Igor

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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