Package: manpages-dev
Version: 3.15-1
Severity: normal

The sentence

    The value EOF is returned if the end of input is reached before
    either the first successful conversion or a matching failure
    occurs.

does not look correct English to me. The word "either" may be
misplaced. Anyway, the C standard says something different, e.g.
for fscanf:

    The fscanf function returns the value of the macro EOF if an input
    failure occurs before any conversion.

Matching failures do not seem to be a cause of EOF, but have an
influence on the number of input items assigned. Indeed the C
standard says (and nothing more):

    Otherwise, the function returns the number of input items
    assigned, which can be fewer than provided for, or even zero,
    in the event of an early matching failure.


Also, the scanf(3) man page says:

    EOF is also returned if a read error occurs, in which case the
    error indicator for the stream (see ferror(3)) is set, and
    errno is set indicate the error.

This does not seem to be allowed by the C standard (see the two cited
sentences above). For instance, in

  n = fscanf (stdin, "%d %d", &x, &y);

if there has been at least a conversion, i.e. if x has been modified,
then n must not be EOF, but at least 1, even when there has been a
read error later. Now, I don't know whether this is an error in the
man page or in the glibc itself.

-- System Information:
Debian Release: 5.0
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.26.5-20080922 (SMP w/2 CPU cores; PREEMPT)
Locale: LANG=POSIX, LC_CTYPE=en_US.ISO8859-1 (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/bash

Versions of packages manpages-dev depends on:
ii  manpages                      3.15-1     Manual pages about using a GNU/Lin

manpages-dev recommends no packages.

Versions of packages manpages-dev suggests:
ii  gman [man-browser]            0.9.3-5    small man(1) front-end for X
ii  man-db [man-browser]          2.5.2-3    on-line manual pager

-- no debconf information



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to