[BACK]Return to fwrite.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / lib / libc / stdio

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/lib/libc/stdio/fwrite.c between version 1.16 and 1.16.44.1

version 1.16, 2005/11/29 03:12:00 version 1.16.44.1, 2012/04/17 00:05:24
Line 53  __RCSID("$NetBSD$");
Line 53  __RCSID("$NetBSD$");
  * Return the number of whole objects written.   * Return the number of whole objects written.
  */   */
 size_t  size_t
 fwrite(buf, size, count, fp)  fwrite(const void *buf, size_t size, size_t count, FILE *fp)
         const void *buf;  
         size_t size, count;  
         FILE *fp;  
 {  {
         size_t n;          size_t n;
         struct __suio uio;          struct __suio uio;
Line 67  fwrite(buf, size, count, fp)
Line 64  fwrite(buf, size, count, fp)
          * SUSv2 requires a return value of 0 for a count or a size of 0.           * SUSv2 requires a return value of 0 for a count or a size of 0.
          */           */
         if ((n = count * size) == 0)          if ((n = count * size) == 0)
                 return (0);                  return 0;
         _DIAGASSERT(buf != NULL);          _DIAGASSERT(buf != NULL);
   
         iov.iov_base = __UNCONST(buf);          iov.iov_base = __UNCONST(buf);
Line 84  fwrite(buf, size, count, fp)
Line 81  fwrite(buf, size, count, fp)
         if (__sfvwrite(fp, &uio) != 0)          if (__sfvwrite(fp, &uio) != 0)
                 count = ((n - uio.uio_resid) / size);                  count = ((n - uio.uio_resid) / size);
         FUNLOCKFILE(fp);          FUNLOCKFILE(fp);
         return (count);          return count;
 }  }

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.16.44.1

CVSweb <webmaster@jp.NetBSD.org>