Lines Matching defs:TBLOCK
127 #define TBLOCK 512 /* tape block size--should be universal */
165 #define TBLOCKS(bytes) (((bytes) + TBLOCK - 1) / TBLOCK)
348 char dummy[TBLOCK];
1673 char buf[TBLOCK];
2381 (nblock * TBLOCK));
2383 maxread = TBLOCK;
2388 read(infile, bigbuf, min((hint*TBLOCK), maxread))) > 0) &&
2392 nblks = ((i-1)/TBLOCK)+1;
2591 char buf[TBLOCK];
2648 s = (off_t)(blocklim - tapepos - 1) * TBLOCK;
2655 s = (off_t)(blocklim - 1)*TBLOCK; /* all */
2670 while (blocks && read(ifd, buf, TBLOCK) > 0) {
3707 char buf[TBLOCK];
3742 if (bytes <= TBLOCK) {
3748 TBLOCK);
3749 tp += TBLOCK;
3751 bytes -= TBLOCK;
3895 if (issysattr || (bytes <= TBLOCK)) {
3910 piosize = TBLOCK;
3918 * to the nearest TBLOCK since readtape reads one block at a time.
3920 if ((buf = malloc(TBLOCKS(maxwrite) * TBLOCK)) == NULL) {
3927 * readtape() obtains one block (TBLOCK) of data at a time.
3931 for (bytesread = 0; bytesread < maxwrite; bytesread += TBLOCK) {
4155 #if SYS_BLOCK > TBLOCK
4156 nblock = SYS_BLOCK / TBLOCK;
4306 char buf[TBLOCK];
4309 for (cp = buf; cp < &buf[TBLOCK]; )
4606 bzero(dblock.dummy, TBLOCK);
4669 for (cp = dblockp->dummy; cp < &(dblockp->dummy[TBLOCK]); cp++)
4692 cp < (unsigned char *) &(dblockp->dummy[TBLOCK]); cp++)
5062 #if SYS_BLOCK > TBLOCK
5077 #if SYS_BLOCK > TBLOCK
5078 nxb = (blkcnt_t)(seekval % (off_t)(SYS_BLOCK / TBLOCK));
5085 if (lseek(mt, (off_t)(TBLOCK * seekval), 1) == (off_t)-1) {
5090 #if SYS_BLOCK > TBLOCK
5095 if (read(mt, tbuf, TBLOCK*nblock) < 0) {
5125 if ((i = read(mt, tbuf, TBLOCK*j)) < 0) {
5148 } else if ((!first || Bflag) && i != TBLOCK*j) {
5153 int remaining = (TBLOCK * j) - i;
5169 if ((i % TBLOCK) != 0) {
5174 i /= TBLOCK;
5212 i = write(mt, (char *)tbuf, TBLOCK*nblock);
5213 if (i != TBLOCK*nblock)
5225 i = (int)write(mt, buffer, TBLOCK*nblock);
5226 if (i != TBLOCK*nblock)
5229 buffer += (nblock * TBLOCK);
5233 (void) memcpy((char *)&tbuf[recno++], buffer, TBLOCK);
5234 buffer += TBLOCK;
5236 i = (int)write(mt, (char *)tbuf, TBLOCK*nblock);
5237 if (i != TBLOCK*nblock)
5280 if (lseek(mt, (off_t)(TBLOCK*(tapepos-recno)), SEEK_SET) ==
5328 #if SYS_BLOCK > TBLOCK
5337 if ((i = recno % (SYS_BLOCK / TBLOCK)) != 0) {
5347 (blkcnt_t)(NotTape ? recno : nblock) * TBLOCK);
5349 (size_t)(NotTape ? recno : nblock) * TBLOCK) < 0) {
5361 (void) memcpy(dst, src, TBLOCK);
5393 return (kval * 1024 / TBLOCK); /* convert to TBLOCKS */
5409 if ((bval <= 0) || (bval > INT_MAX / TBLOCK)) {
5802 while ((sz = read(mt, tbuf, TBLOCK*nblock)) > 0) {
5858 st->st_size += TBLOCK + Xtarhdr.x_filesz;
6437 (void) bcopy(dblock.dummy, xhdr_buf.dummy, TBLOCK);
6875 bufneeded = nblocks * TBLOCK;
6887 lineloc += TBLOCK;
7580 #define ROUNDTOTBLOCK(a) ((a + (TBLOCK -1)) & ~(TBLOCK -1))
7646 * Now add padding to end to fill out TBLOCK
8220 char buf[TBLOCK];
8244 if (bytes <= TBLOCK) {
8248 (void) memcpy(tp, buf, TBLOCK);
8249 tp += TBLOCK;
8251 bytes -= TBLOCK;