tape
const char *tape;
if ((tape = getenv("TAPE")) == NULL)
tape = _PATH_DEFTAPE;
tape = optarg;
if ((mtfd = open(tape, flags)) < 0)
err(2, "%s", tape);
err(2, "%s", tape);
err(2, "%s", tape);
err(2, "%s: %s", tape, comp->c_name);
err(2, "%s: %s", tape, comp->c_name);
err(2, "%s", tape);
printf("%s: block location %u\n", tape, (unsigned int) count);
err(2, "%s", tape);
static const char *tape = iotape; /* pointer to encryption tape */
if (*tape == 0)
tape = iotape; /* rewind encryption tape */
*inptr = ch ^ *tape++; /* re-encrypt and replace value */
tape = iotape; /* restart encryption tape */
tape = iotape; /* restart decryption tape */
while ((*s++ ^ *tape++) != TAB); /* read past loc num */
if ((*s ^ *tape) == '>' &&
(*(s + 1) ^ *(tape + 1)) == '$' &&
(*(s + 2) ^ *(tape + 2)) == '<')
if (*tape == 0)
tape = iotape; /* rewind decryp tape */
putchar(*s ^ *tape);
} while ((*s++ ^ *tape++) != LF); /* better end with LF */
tape = iotape; /* restart decryption tape */
for (numst = s; (*s ^= *tape++) != TAB; s++); /* get number */
while ((*s++ ^ *tape++) != LF) /* flush the line */
if (*tape == 0)
tape = iotape;
if ((*s ^ *tape) == '>' && (*(s + 1) ^ *(tape + 1)) == '$' &&
(*(s + 2) ^ *(tape + 2)) == '<')
if (*tape == 0)
tape = iotape;
putchar(*s ^ *tape);
} while ((*s++ ^ *tape++) != LF); /* better end with LF */
extern const char *tape; /* name of the tape file */
if ((tape = getenv("TAPE")) == NULL)
tape = _PATH_DEFTAPE;
tape = optarg;
if (strcmp(tape, "-") == 0) {
tape = "standard output";
if ((cp = strchr(tape, ':')) != NULL) {
host = tape;
tape = cp;
msgtail("to %s on host %s\n", tape, host);
msgtail("to %s\n", tape);
const char *tape;
msg("write error on %s\n", tape);
msg("Closing %s\n", tape);
while (rmtopen(tape, 0, 0) < 0)
msg("Ejecting %s\n", tape);
while ((f = open(tape, 0)) < 0)
msg("Ejecting %s\n", tape);
if (rmtopen(tape, 0, 0) >= 0) {
if ((f = open(tape, 0)) >= 0) {
if (nexttape || strchr(tape, ',')) {
tape = nexttape;
if ((p = strchr(tape, ',')) != NULL) {
msg("Dumping volume %d on %s\n", tapeno, tape);
while ((tapefd = (host ? rmtopen(tape, 2, 1) :
pipeout ? 1 : open(tape, O_WRONLY|O_CREAT, 0666))) < 0)
open(tape, O_WRONLY|O_CREAT, 0666))) < 0)
msg("Cannot open output \"%s\".\n", tape);
{ "tape", tape },
{ "tp", tape },
int tape(int, char **);
TAILQ_ENTRY(tape) link;
TAILQ_HEAD(tapelist_head, tape); /* the tapelist is a TAILQ */
if (tape >= 0)
(void) close(tape);
tape = open(device, atoi(mode),
if (tape < 0)
if (close(tape) < 0)
tape = -1;
rval = lseek(tape, (off_t)strtoll(count, NULL, 10), atoi(pos));
rval = write(tape, record, n);
rval = read(tape, record, n);
if (ioctl(tape, MTIOCTOP, (char *)&mtop) < 0)
if (ioctl(tape, MTIOCGET, (char *)&mtget) < 0)
int tape = -1;