static char sccsid
[] = "@(#)vpr.c 1.4 (Berkeley) %G%";
* vpr -- varian and versatec (as printers) spooler
#define VAD "/usr/lib/vad"
#define VPD "/usr/lib/vpd"
char VAtfname
[] = "/usr/spool/vad/tfaXXXXX";
char VAcfname
[] = "/usr/spool/vad/cfaXXXXX";
char VAdfname
[] = "/usr/spool/vad/dfaXXXXX";
char VPtfname
[] = "/usr/spool/vpd/tfaXXXXX";
char VPcfname
[] = "/usr/spool/vpd/cfaXXXXX";
char VPdfname
[] = "/usr/spool/vpd/dfaXXXXX";
register char *arg
, *remote
;
if (signal(SIGINT
, SIG_IGN
) == SIG_DFL
)
if (signal(SIGQUIT
, SIG_IGN
) == SIG_DFL
)
if (signal(SIGHUP
, SIG_IGN
) == SIG_DFL
)
if (signal(SIGTERM
, SIG_IGN
) == SIG_DFL
)
remote
= "$ remote **,onl";
while (argc
>1 && (arg
= argv
[1])[0]=='-') {
fonts
[arg
[1] - '1'] = argv
[2];
literal
++; /* Pass control chars through. */
if (!wide
) /* varian doesn't use sidebyside. */
* This may not work because the daemon runs as someone else, so don't bother
if(*arg == '/' && flag != '-') {
card(literal ? 'G' : 'F', arg);
if(link(arg, lfname) < 0)
card(literal ? 'G' : 'F', lfname);
printf("Cannot open %s\n", arg
);
printf("Cannot open %s\n", arg
);
printf("Versaplot requires parm and vector file\n");
printf("Cannot remove %s\n", arg
);
f
= link(tfname
, dfname
);
printf("Cannot rename %s\n", dfname
);
execl(VPD
, "vpd", "-n", "-3", 0);
execl(VAD
, "vad", "-n", "-3", 0);
printf("Daemon doesn't exist\n");
card(literal
? 'G' : 'F', cfname
);
printf("No more processes\n");
execl("/usr/lib/sidebyside", "sidebyside", width
, 0);
perror("/usr/lib/sidebyside");
while((i
= read(f
, buf
, BUFSIZ
)) > 0) {
printf("Copy file is too large\n");
while((c
= *p2
++) != '\0') {
register char *b1p
, *pp
, *b2p
;
static char b1
[100], b2
[100];
if(getpw(getuid(), b1p
)) {
b1p
= "pdp::::m0000,m000:";
while(*b2p
++ = "$ ident "[n
++]);
while(--n
) while(*b1p
++ != ':');
while((*b2p
++ = *b1p
++) != ':');
while((c
= *b1p
++) != ':') {
printf("Cannot create %s\n", name
);
signal(SIGQUIT
, SIG_IGN
);
signal(SIGTERM
, SIG_IGN
);
while(tfname
[i
] != 'a') {
while(cfname
[i
] != 'a') {
while(lfname[i] != 'a') {
while(dfname
[i
] != 'a') {