Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Dec 1997 06:32:42 -0800 (PST)
From:      "Andrey A. Chernov" <ache@FreeBSD.ORG>
To:        cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG, cvs-lib@FreeBSD.ORG
Subject:   cvs commit: src/lib/libc/stdio snprintf.c vsnprintf.c
Message-ID:  <199712241432.GAA19823@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
ache        1997/12/24 06:32:41 PST

  Modified files:
    lib/libc/stdio       snprintf.c vsnprintf.c 
  Log:
  Back out part related to "return 0 if n == 0" and return EOF as before.
  
  The main argument is that it is impossible to determine if %n evaluated or not
  when snprintf return 0, because it can happens for both n == 0 and n == 1.
  Although EOF here is good indication of the end of process, if n is
  decreased in the loop...
  Since it is already supposed in many places that EOF *is* negative, f.e.
  from Single Unix specs for snprintf
  "return ... a negative value if an output error was encountered"
  this not makes situation worse.
  
  Revision  Changes    Path
  1.7       +1 -3      src/lib/libc/stdio/snprintf.c
  1.7       +1 -3      src/lib/libc/stdio/vsnprintf.c



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199712241432.GAA19823>