* Varian and Versatec queue
static char vpqSCCSid
[] = "@(#)vpq.c 1.2\t%G%";
while (argc
> 0 && argv
[0][0] == '-') {
case 'W': /* Wide: the versatec. */
fprintf(stderr
, "usage: vpq [ -W ] [ -b ]\n");
queue("/dev/va0", "Varian", "/usr/spool/vad", "/usr/lib/vad");
queue("/dev/vp0", "Versatec", "/usr/spool/vpd", "/usr/lib/vpd");
queue(device
, devname
, spooldir
, daemon
)
char *device
, *devname
, *spooldir
, *daemon
;
printf("not available\n");
printf("ready and idle.\n");
printf("Daemon is disabled.\n");
if (chdir(spooldir
) < 0) {
while (fread(&dirent
, sizeof dirent
, 1, df
) == 1) {
if (dirent
.d_name
[0] != 'd')
if (dirent
.d_name
[1] != 'f')
if (stat(dirent
.d_name
, &stbuf
) < 0)
printf("Owner\t Id Chars Filename\n");
printf("Queue is empty.\n");
jf
= fopen(dirent
.d_name
, "r");
strcpy(username
, line
+1);
if (stat(line
+1, &stbuf
) < 0)
printf("%-10s%5s%8d %s\n", username
, dirent
.d_name
+3,
while ((c
= getc(jf
)) != '\n') {