* Varian and Versatec queue
static char vpqSCCSid
[] = "@(#)vpq.c 1.3\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
;
register struct direct
*dirp
;
printf("not available\n");
printf("ready and idle.\n");
printf("Daemon is disabled.\n");
if (chdir(spooldir
) < 0) {
while ((dirp
= readdir(df
)) != NULL
) {
if (dirp
->d_name
[0] != 'd')
if (dirp
->d_name
[1] != 'f')
if (stat(dirp
->d_name
, &stbuf
) < 0)
printf("Owner\t Id Chars Filename\n");
printf("Queue is empty.\n");
register struct direct
*dirp
;
jf
= fopen(dirp
->d_name
, "r");
strcpy(username
, line
+1);
if (stat(line
+1, &stbuf
) < 0)
printf("%-10s%5s%8d %s\n", username
,
&(dirp
->d_name
[3]), stbuf
.st_size
, line
+1);
while ((c
= getc(jf
)) != '\n') {