FreeBSD/usr.sbin/kgzip/xio.c
/*
 * Write binary zeroes to a file.
 */
Write binary zeroes to a file.
Write binary zeroes to a file .
void
xzero(const struct iodesc * id, size_t nbyte)
{
    char buf[8192];
    size_t n;
    memset(buf, 0, sizeof(buf));
    while (nbyte) {
	if ((n = sizeof(buf)) > nbyte)
	    n = nbyte;
	xwrite(id, buf, n);
	nbyte -= n;
    }
}
void xzero ( const struct iodesc * id , size_t nbyte ) { char buf [ 8192 ] ; size_t n ; memset ( buf , 0 , sizeof ( buf ) ) ; while ( nbyte ) { if ( ( n = sizeof ( buf ) ) > nbyte ) n = nbyte ; xwrite ( id , buf , n ) ; nbyte -= n ; } }
Write binary zeroes to a file.
Write binary zeroes to a file .