Lines Matching refs:TBLOCK
134 #define TBLOCK 512 /* tape block size--should be universal */ macro
172 #define TBLOCKS(bytes) (((bytes) + TBLOCK - 1) / TBLOCK)
355 char dummy[TBLOCK];
1615 char buf[TBLOCK]; in passtape()
2314 (nblock * TBLOCK)); in putfile()
2316 maxread = TBLOCK; in putfile()
2321 read(infile, bigbuf, min((hint*TBLOCK), maxread))) > 0) && in putfile()
2325 nblks = ((i-1)/TBLOCK)+1; in putfile()
2535 char buf[TBLOCK]; in splitfile()
2592 s = (off_t)(blocklim - tapepos - 1) * TBLOCK; in splitfile()
2599 s = (off_t)(blocklim - 1)*TBLOCK; /* all */ in splitfile()
2614 while (blocks && read(ifd, buf, TBLOCK) > 0) { in splitfile()
3651 char buf[TBLOCK]; in doxtract()
3686 if (bytes <= TBLOCK) { in doxtract()
3692 TBLOCK); in doxtract()
3693 tp += TBLOCK; in doxtract()
3695 bytes -= TBLOCK; in doxtract()
3839 if (issysattr || (bytes <= TBLOCK)) { in xblocks()
3854 piosize = TBLOCK; in xblocks()
3864 if ((buf = malloc(TBLOCKS(maxwrite) * TBLOCK)) == NULL) { in xblocks()
3875 for (bytesread = 0; bytesread < maxwrite; bytesread += TBLOCK) { in xblocks()
4099 #if SYS_BLOCK > TBLOCK in dotable()
4100 nblock = SYS_BLOCK / TBLOCK; in dotable()
4250 char buf[TBLOCK]; in putempty()
4253 for (cp = buf; cp < &buf[TBLOCK]; ) in putempty()
4550 bzero(dblock.dummy, TBLOCK); in tomodes()
4613 for (cp = dblockp->dummy; cp < &(dblockp->dummy[TBLOCK]); cp++) in checksum_signed()
4636 cp < (unsigned char *) &(dblockp->dummy[TBLOCK]); cp++) in checksum()
5010 #if SYS_BLOCK > TBLOCK in seekdisk()
5027 #if SYS_BLOCK > TBLOCK in seekdisk()
5028 nxb = (blkcnt_t)(seekval % (off_t)(SYS_BLOCK / TBLOCK)); in seekdisk()
5037 if (lseek(mt, (off_t)(TBLOCK * seekval), 1) == (off_t)-1) { in seekdisk()
5042 #if SYS_BLOCK > TBLOCK in seekdisk()
5049 if (read(mt, tbuf, TBLOCK*nblock) < 0) { in seekdisk()
5079 if ((i = read(mt, tbuf, TBLOCK*j)) < 0) { in readtape()
5102 } else if ((!first || Bflag) && i != TBLOCK*j) { in readtape()
5107 int remaining = (TBLOCK * j) - i; in readtape()
5123 if ((i % TBLOCK) != 0) { in readtape()
5128 i /= TBLOCK; in readtape()
5166 i = write(mt, (char *)tbuf, TBLOCK*nblock); in writetbuf()
5167 if (i != TBLOCK*nblock) in writetbuf()
5179 i = (int)write(mt, buffer, TBLOCK*nblock); in writetbuf()
5180 if (i != TBLOCK*nblock) in writetbuf()
5183 buffer += (nblock * TBLOCK); in writetbuf()
5187 (void) memcpy((char *)&tbuf[recno++], buffer, TBLOCK); in writetbuf()
5188 buffer += TBLOCK; in writetbuf()
5190 i = (int)write(mt, (char *)tbuf, TBLOCK*nblock); in writetbuf()
5191 if (i != TBLOCK*nblock) in writetbuf()
5236 if (lseek(mt, (off_t)(TBLOCK*(tapepos-recno)), SEEK_SET) == in backtape()
5286 #if SYS_BLOCK > TBLOCK in flushtape()
5295 if ((i = recno % (SYS_BLOCK / TBLOCK)) != 0) { in flushtape()
5308 (blkcnt_t)(NotTape ? recno : nblock) * TBLOCK); in flushtape()
5311 (size_t)(NotTape ? recno : nblock) * TBLOCK) < 0) { in flushtape()
5323 (void) memcpy(dst, src, TBLOCK); in copy()
5355 return (kval * 1024 / TBLOCK); /* convert to TBLOCKS */ in kcheck()
5371 if ((bval <= 0) || (bval > INT_MAX / TBLOCK)) { in bcheck()
5763 while (read(mt, tbuf, TBLOCK*nblock) > 0) { in wantit()
5816 st->st_size += TBLOCK + Xtarhdr.x_filesz; in setbytes_to_skip()
6395 (void) bcopy(dblock.dummy, xhdr_buf.dummy, TBLOCK); in build_dblock()
6833 bufneeded = nblocks * TBLOCK; in get_xdata()
6845 lineloc += TBLOCK; in get_xdata()
7538 #define ROUNDTOTBLOCK(a) ((a + (TBLOCK -1)) & ~(TBLOCK -1))
8180 char buf[TBLOCK]; in read_xattr_hdr()
8204 if (bytes <= TBLOCK) { in read_xattr_hdr()
8208 (void) memcpy(tp, buf, TBLOCK); in read_xattr_hdr()
8209 tp += TBLOCK; in read_xattr_hdr()
8211 bytes -= TBLOCK; in read_xattr_hdr()