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

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

38 The Regents of the University of California. All rights reserved.\n";
39#endif /* not lint */
40
41#ifndef lint
42#if 0
43static char sccsid[] = "@(#)lprm.c 8.1 (Berkeley) 6/6/93";
44#endif
45static const char rcsid[] =
1/*
2 * Copyright (c) 1983, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

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

38 The Regents of the University of California. All rights reserved.\n";
39#endif /* not lint */
40
41#ifndef lint
42#if 0
43static char sccsid[] = "@(#)lprm.c 8.1 (Berkeley) 6/6/93";
44#endif
45static const char rcsid[] =
46 "$FreeBSD: head/usr.sbin/lpr/lprm/lprm.c 50479 1999-08-28 01:35:59Z peter $";
46 "$FreeBSD: head/usr.sbin/lpr/lprm/lprm.c 78146 2001-06-12 16:38:20Z gad $";
47#endif /* not lint */
48
49/*
50 * lprm - remove the current user's spool entry
51 *
52 * lprm [-] [[job #] [user] ...]
53 *
54 * Using information in the lock file, lprm will kill the

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

77int requ[MAXREQUESTS]; /* job number of spool entries */
78int requests; /* # of spool requests */
79char *user[MAXUSERS]; /* users to process */
80int users; /* # of users in user array */
81uid_t uid, euid; /* real and effective user id's */
82
83static char luser[16]; /* buffer for person */
84
47#endif /* not lint */
48
49/*
50 * lprm - remove the current user's spool entry
51 *
52 * lprm [-] [[job #] [user] ...]
53 *
54 * Using information in the lock file, lprm will kill the

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

77int requ[MAXREQUESTS]; /* job number of spool entries */
78int requests; /* # of spool requests */
79char *user[MAXUSERS]; /* users to process */
80int users; /* # of users in user array */
81uid_t uid, euid; /* real and effective user id's */
82
83static char luser[16]; /* buffer for person */
84
85int main __P((int, char *[]));
86static void usage __P((void));
85int main(int argc, char *_argv[]);
86static void usage(void);
87
88int
87
88int
89main(argc, argv)
90 int argc;
91 char *argv[];
89main(int argc, char *argv[])
92{
90{
93 char *arg, *printer;
91 char *arg;
92 const char *printer;
94 struct passwd *p;
95 static char root[] = "root";
96
97 printer = NULL;
98 uid = getuid();
99 euid = geteuid();
100 seteuid(uid); /* be safe */
101 name = argv[0];

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

153 if (printer == NULL && (printer = getenv("PRINTER")) == NULL)
154 printer = DEFLP;
155
156 rmjob(printer);
157 exit(0);
158}
159
160static void
93 struct passwd *p;
94 static char root[] = "root";
95
96 printer = NULL;
97 uid = getuid();
98 euid = geteuid();
99 seteuid(uid); /* be safe */
100 name = argv[0];

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

152 if (printer == NULL && (printer = getenv("PRINTER")) == NULL)
153 printer = DEFLP;
154
155 rmjob(printer);
156 exit(0);
157}
158
159static void
161usage()
160usage(void)
162{
163 fprintf(stderr, "usage: lprm [-] [-Pprinter] [[job #] [user] ...]\n");
164 exit(2);
165}
161{
162 fprintf(stderr, "usage: lprm [-] [-Pprinter] [[job #] [user] ...]\n");
163 exit(2);
164}