fwrite.c (e74101e4eff767325553039def89de70b70f36d3) fwrite.c (54e4e385de33a961e801ceeea8146437e25edd88)
1/*-
2 * Copyright (c) 1990, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Chris Torek.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 39 unchanged lines hidden (view full) ---

48#include "libc_private.h"
49
50/*
51 * Write `count' objects (each size `size') from memory to the given file.
52 * Return the number of whole objects written.
53 */
54size_t
55fwrite(buf, size, count, fp)
1/*-
2 * Copyright (c) 1990, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Chris Torek.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 39 unchanged lines hidden (view full) ---

48#include "libc_private.h"
49
50/*
51 * Write `count' objects (each size `size') from memory to the given file.
52 * Return the number of whole objects written.
53 */
54size_t
55fwrite(buf, size, count, fp)
56 const void *buf;
56 const void * __restrict buf;
57 size_t size, count;
57 size_t size, count;
58 FILE *fp;
58 FILE * __restrict fp;
59{
60 size_t n;
61 struct __suio uio;
62 struct __siov iov;
63
64 iov.iov_base = (void *)buf;
65 uio.uio_resid = iov.iov_len = n = count * size;
66 uio.uio_iov = &iov;

--- 14 unchanged lines hidden ---
59{
60 size_t n;
61 struct __suio uio;
62 struct __siov iov;
63
64 iov.iov_base = (void *)buf;
65 uio.uio_resid = iov.iov_len = n = count * size;
66 uio.uio_iov = &iov;

--- 14 unchanged lines hidden ---