Deleted Added
full compact
displayq.c (68101) displayq.c (68401)
1/*
2 * Copyright (c) 1983, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 22 unchanged lines hidden (view full) ---

31 * SUCH DAMAGE.
32 */
33
34#ifndef lint
35/*
36static char sccsid[] = "@(#)displayq.c 8.4 (Berkeley) 4/28/95";
37*/
38static const char rcsid[] =
1/*
2 * Copyright (c) 1983, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 22 unchanged lines hidden (view full) ---

31 * SUCH DAMAGE.
32 */
33
34#ifndef lint
35/*
36static char sccsid[] = "@(#)displayq.c 8.4 (Berkeley) 4/28/95";
37*/
38static const char rcsid[] =
39 "$FreeBSD: head/usr.sbin/lpr/common_source/displayq.c 68101 2000-10-31 20:11:30Z gad $";
39 "$FreeBSD: head/usr.sbin/lpr/common_source/displayq.c 68401 2000-11-06 19:36:38Z gad $";
40#endif /* not lint */
41
42#include <sys/param.h>
43#include <sys/stat.h>
44
45#include <ctype.h>
46#include <dirent.h>
47#include <errno.h>

--- 42 unchanged lines hidden (view full) ---

90/*
91 * Display the current state of the queue. Format = 1 if long format.
92 */
93void
94displayq(pp, format)
95 struct printer *pp;
96 int format;
97{
40#endif /* not lint */
41
42#include <sys/param.h>
43#include <sys/stat.h>
44
45#include <ctype.h>
46#include <dirent.h>
47#include <errno.h>

--- 42 unchanged lines hidden (view full) ---

90/*
91 * Display the current state of the queue. Format = 1 if long format.
92 */
93void
94displayq(pp, format)
95 struct printer *pp;
96 int format;
97{
98 register struct queue *q;
98 register struct jobqueue *q;
99 register int i, nitems, fd, ret;
100 register char *cp;
99 register int i, nitems, fd, ret;
100 register char *cp;
101 struct queue **queue;
101 struct jobqueue **queue;
102 struct stat statb;
103 FILE *fp;
104 void (*savealrm)(int);
105
106 lflag = format;
107 totsize = 0;
108 rank = -1;
109

--- 88 unchanged lines hidden (view full) ---

198 /*
199 * Now, examine the control files and print out the jobs to
200 * be done for each user.
201 */
202 if (!lflag)
203 header();
204 for (i = 0; i < nitems; i++) {
205 q = queue[i];
102 struct stat statb;
103 FILE *fp;
104 void (*savealrm)(int);
105
106 lflag = format;
107 totsize = 0;
108 rank = -1;
109

--- 88 unchanged lines hidden (view full) ---

198 /*
199 * Now, examine the control files and print out the jobs to
200 * be done for each user.
201 */
202 if (!lflag)
203 header();
204 for (i = 0; i < nitems; i++) {
205 q = queue[i];
206 inform(pp, q->q_name);
206 inform(pp, q->job_cfname);
207 free(q);
208 }
209 free(queue);
210 }
211 if (!pp->remote) {
212 if (nitems == 0)
213 puts("no entries");
214 return;

--- 335 unchanged lines hidden ---
207 free(q);
208 }
209 free(queue);
210 }
211 if (!pp->remote) {
212 if (nitems == 0)
213 puts("no entries");
214 return;

--- 335 unchanged lines hidden ---