- if (cartridge) {
- /* Estimate number of tapes, assuming streaming stops at
- the end of each block written, and not in mid-block.
- Assume no erroneous blocks; this can be compensated for
- with an artificially low tape size. */
- fetapes =
- ( esize /* blocks */
- * TP_BSIZE /* bytes/block */
- * (1.0/density) /* 0.1" / byte */
- +
- esize /* blocks */
- * (1.0/ntrec) /* streaming-stops per block */
- * 15.48 /* 0.1" / streaming-stop */
- ) * (1.0 / tsize ); /* tape / 0.1" */
- } else {
- /* Estimate number of tapes, for old fashioned 9-track tape */
- int tenthsperirg = (density == 625) ? 3 : 7;
- fetapes =
- ( esize /* blocks */
- * TP_BSIZE /* bytes / block */
- * (1.0/density) /* 0.1" / byte */
- +
- esize /* blocks */
- * (1.0/ntrec) /* IRG's / block */
- * tenthsperirg /* 0.1" / IRG */
- ) * (1.0 / tsize ); /* tape / 0.1" */
+ if (pipeout)
+ esize += 10; /* 10 trailer blocks */
+ else {
+ if (blocksperfile)
+ fetapes = esize / blocksperfile;
+ else if (cartridge) {
+ /* Estimate number of tapes, assuming streaming stops at
+ the end of each block written, and not in mid-block.
+ Assume no erroneous blocks; this can be compensated
+ for with an artificially low tape size. */
+ fetapes =
+ ( esize /* blocks */
+ * TP_BSIZE /* bytes/block */
+ * (1.0/density) /* 0.1" / byte */
+ +
+ esize /* blocks */
+ * (1.0/ntrec) /* streaming-stops per block */
+ * 15.48 /* 0.1" / streaming-stop */
+ ) * (1.0 / tsize ); /* tape / 0.1" */
+ } else {
+ /* Estimate number of tapes, for old fashioned 9-track
+ tape */
+ int tenthsperirg = (density == 625) ? 3 : 7;
+ fetapes =
+ ( esize /* blocks */
+ * TP_BSIZE /* bytes / block */
+ * (1.0/density) /* 0.1" / byte */
+ +
+ esize /* blocks */
+ * (1.0/ntrec) /* IRG's / block */
+ * tenthsperirg /* 0.1" / IRG */
+ ) * (1.0 / tsize ); /* tape / 0.1" */
+ }
+ etapes = fetapes; /* truncating assignment */
+ etapes++;
+ /* count the nodemap on each additional tape */
+ for (i = 1; i < etapes; i++)
+ bmapest(nodmap);
+ esize += i + 10; /* headers + 10 trailer blocks */