Lines Matching refs:TBLOCK

127 #define	TBLOCK	512	/* tape block size--should be universal */  macro
165 #define TBLOCKS(bytes) (((bytes) + TBLOCK - 1) / TBLOCK)
348 char dummy[TBLOCK];
1673 char buf[TBLOCK]; in passtape()
2381 (nblock * TBLOCK)); in putfile()
2383 maxread = TBLOCK; in putfile()
2388 read(infile, bigbuf, min((hint*TBLOCK), maxread))) > 0) && in putfile()
2392 nblks = ((i-1)/TBLOCK)+1; in putfile()
2591 char buf[TBLOCK]; in splitfile()
2648 s = (off_t)(blocklim - tapepos - 1) * TBLOCK; in splitfile()
2655 s = (off_t)(blocklim - 1)*TBLOCK; /* all */ in splitfile()
2670 while (blocks && read(ifd, buf, TBLOCK) > 0) { in splitfile()
3707 char buf[TBLOCK]; in doxtract()
3742 if (bytes <= TBLOCK) { in doxtract()
3748 TBLOCK); in doxtract()
3749 tp += TBLOCK; in doxtract()
3751 bytes -= TBLOCK; in doxtract()
3895 if (issysattr || (bytes <= TBLOCK)) { in xblocks()
3910 piosize = TBLOCK; in xblocks()
3920 if ((buf = malloc(TBLOCKS(maxwrite) * TBLOCK)) == NULL) { in xblocks()
3931 for (bytesread = 0; bytesread < maxwrite; bytesread += TBLOCK) { in xblocks()
4155 #if SYS_BLOCK > TBLOCK in dotable()
4156 nblock = SYS_BLOCK / TBLOCK; in dotable()
4306 char buf[TBLOCK]; in putempty()
4309 for (cp = buf; cp < &buf[TBLOCK]; ) in putempty()
4606 bzero(dblock.dummy, TBLOCK); in tomodes()
4669 for (cp = dblockp->dummy; cp < &(dblockp->dummy[TBLOCK]); cp++) in checksum_signed()
4692 cp < (unsigned char *) &(dblockp->dummy[TBLOCK]); cp++) in checksum()
5062 #if SYS_BLOCK > TBLOCK in seekdisk()
5077 #if SYS_BLOCK > TBLOCK in seekdisk()
5078 nxb = (blkcnt_t)(seekval % (off_t)(SYS_BLOCK / TBLOCK)); in seekdisk()
5085 if (lseek(mt, (off_t)(TBLOCK * seekval), 1) == (off_t)-1) { in seekdisk()
5090 #if SYS_BLOCK > TBLOCK in seekdisk()
5095 if (read(mt, tbuf, TBLOCK*nblock) < 0) { in seekdisk()
5125 if ((i = read(mt, tbuf, TBLOCK*j)) < 0) { in readtape()
5148 } else if ((!first || Bflag) && i != TBLOCK*j) { in readtape()
5153 int remaining = (TBLOCK * j) - i; in readtape()
5169 if ((i % TBLOCK) != 0) { in readtape()
5174 i /= TBLOCK; in readtape()
5212 i = write(mt, (char *)tbuf, TBLOCK*nblock); in writetbuf()
5213 if (i != TBLOCK*nblock) in writetbuf()
5225 i = (int)write(mt, buffer, TBLOCK*nblock); in writetbuf()
5226 if (i != TBLOCK*nblock) in writetbuf()
5229 buffer += (nblock * TBLOCK); in writetbuf()
5233 (void) memcpy((char *)&tbuf[recno++], buffer, TBLOCK); in writetbuf()
5234 buffer += TBLOCK; in writetbuf()
5236 i = (int)write(mt, (char *)tbuf, TBLOCK*nblock); in writetbuf()
5237 if (i != TBLOCK*nblock) in writetbuf()
5280 if (lseek(mt, (off_t)(TBLOCK*(tapepos-recno)), SEEK_SET) == in backtape()
5328 #if SYS_BLOCK > TBLOCK in flushtape()
5337 if ((i = recno % (SYS_BLOCK / TBLOCK)) != 0) { in flushtape()
5347 (blkcnt_t)(NotTape ? recno : nblock) * TBLOCK); in flushtape()
5349 (size_t)(NotTape ? recno : nblock) * TBLOCK) < 0) { in flushtape()
5361 (void) memcpy(dst, src, TBLOCK); in copy()
5393 return (kval * 1024 / TBLOCK); /* convert to TBLOCKS */ in kcheck()
5409 if ((bval <= 0) || (bval > INT_MAX / TBLOCK)) { in bcheck()
5802 while ((sz = read(mt, tbuf, TBLOCK*nblock)) > 0) { in wantit()
5858 st->st_size += TBLOCK + Xtarhdr.x_filesz; in setbytes_to_skip()
6437 (void) bcopy(dblock.dummy, xhdr_buf.dummy, TBLOCK); in build_dblock()
6875 bufneeded = nblocks * TBLOCK; in get_xdata()
6887 lineloc += TBLOCK; in get_xdata()
7580 #define ROUNDTOTBLOCK(a) ((a + (TBLOCK -1)) & ~(TBLOCK -1))
8220 char buf[TBLOCK]; in read_xattr_hdr()
8244 if (bytes <= TBLOCK) { in read_xattr_hdr()
8248 (void) memcpy(tp, buf, TBLOCK); in read_xattr_hdr()
8249 tp += TBLOCK; in read_xattr_hdr()
8251 bytes -= TBLOCK; in read_xattr_hdr()