Lines Matching refs:TBLOCK

129 #define	TBLOCK	512	/* tape block size--should be universal */  macro
167 #define TBLOCKS(bytes) (((bytes) + TBLOCK - 1) / TBLOCK)
350 char dummy[TBLOCK];
1676 char buf[TBLOCK]; in passtape()
2384 (nblock * TBLOCK)); in putfile()
2386 maxread = TBLOCK; in putfile()
2391 read(infile, bigbuf, min((hint*TBLOCK), maxread))) > 0) && in putfile()
2395 nblks = ((i-1)/TBLOCK)+1; in putfile()
2594 char buf[TBLOCK]; in splitfile()
2651 s = (off_t)(blocklim - tapepos - 1) * TBLOCK; in splitfile()
2658 s = (off_t)(blocklim - 1)*TBLOCK; /* all */ in splitfile()
2673 while (blocks && read(ifd, buf, TBLOCK) > 0) { in splitfile()
3710 char buf[TBLOCK]; in doxtract()
3745 if (bytes <= TBLOCK) { in doxtract()
3751 TBLOCK); in doxtract()
3752 tp += TBLOCK; in doxtract()
3754 bytes -= TBLOCK; in doxtract()
3898 if (issysattr || (bytes <= TBLOCK)) { in xblocks()
3913 piosize = TBLOCK; in xblocks()
3923 if ((buf = malloc(TBLOCKS(maxwrite) * TBLOCK)) == NULL) { in xblocks()
3934 for (bytesread = 0; bytesread < maxwrite; bytesread += TBLOCK) { in xblocks()
4158 #if SYS_BLOCK > TBLOCK in dotable()
4159 nblock = SYS_BLOCK / TBLOCK; in dotable()
4309 char buf[TBLOCK]; in putempty()
4312 for (cp = buf; cp < &buf[TBLOCK]; ) in putempty()
4609 bzero(dblock.dummy, TBLOCK); in tomodes()
4672 for (cp = dblockp->dummy; cp < &(dblockp->dummy[TBLOCK]); cp++) in checksum_signed()
4695 cp < (unsigned char *) &(dblockp->dummy[TBLOCK]); cp++) in checksum()
5065 #if SYS_BLOCK > TBLOCK in seekdisk()
5080 #if SYS_BLOCK > TBLOCK in seekdisk()
5081 nxb = (blkcnt_t)(seekval % (off_t)(SYS_BLOCK / TBLOCK)); in seekdisk()
5088 if (lseek(mt, (off_t)(TBLOCK * seekval), 1) == (off_t)-1) { in seekdisk()
5093 #if SYS_BLOCK > TBLOCK in seekdisk()
5098 if (read(mt, tbuf, TBLOCK*nblock) < 0) { in seekdisk()
5128 if ((i = read(mt, tbuf, TBLOCK*j)) < 0) { in readtape()
5151 } else if ((!first || Bflag) && i != TBLOCK*j) { in readtape()
5156 int remaining = (TBLOCK * j) - i; in readtape()
5172 if ((i % TBLOCK) != 0) { in readtape()
5177 i /= TBLOCK; in readtape()
5215 i = write(mt, (char *)tbuf, TBLOCK*nblock); in writetbuf()
5216 if (i != TBLOCK*nblock) in writetbuf()
5228 i = (int)write(mt, buffer, TBLOCK*nblock); in writetbuf()
5229 if (i != TBLOCK*nblock) in writetbuf()
5232 buffer += (nblock * TBLOCK); in writetbuf()
5236 (void) memcpy((char *)&tbuf[recno++], buffer, TBLOCK); in writetbuf()
5237 buffer += TBLOCK; in writetbuf()
5239 i = (int)write(mt, (char *)tbuf, TBLOCK*nblock); in writetbuf()
5240 if (i != TBLOCK*nblock) in writetbuf()
5283 if (lseek(mt, (off_t)(TBLOCK*(tapepos-recno)), SEEK_SET) == in backtape()
5331 #if SYS_BLOCK > TBLOCK in flushtape()
5340 if ((i = recno % (SYS_BLOCK / TBLOCK)) != 0) { in flushtape()
5350 (blkcnt_t)(NotTape ? recno : nblock) * TBLOCK); in flushtape()
5352 (size_t)(NotTape ? recno : nblock) * TBLOCK) < 0) { in flushtape()
5364 (void) memcpy(dst, src, TBLOCK); in copy()
5396 return (kval * 1024 / TBLOCK); /* convert to TBLOCKS */ in kcheck()
5412 if ((bval <= 0) || (bval > INT_MAX / TBLOCK)) { in bcheck()
5805 while ((sz = read(mt, tbuf, TBLOCK*nblock)) > 0) { in wantit()
5861 st->st_size += TBLOCK + Xtarhdr.x_filesz; in setbytes_to_skip()
6441 (void) bcopy(dblock.dummy, xhdr_buf.dummy, TBLOCK); in build_dblock()
6890 bufneeded = nblocks * TBLOCK; in get_xdata()
6902 lineloc += TBLOCK; in get_xdata()
7595 #define ROUNDTOTBLOCK(a) ((a + (TBLOCK -1)) & ~(TBLOCK -1))
8235 char buf[TBLOCK]; in read_xattr_hdr()
8259 if (bytes <= TBLOCK) { in read_xattr_hdr()
8263 (void) memcpy(tp, buf, TBLOCK); in read_xattr_hdr()
8264 tp += TBLOCK; in read_xattr_hdr()
8266 bytes -= TBLOCK; in read_xattr_hdr()