miscbltin.c (afb033d5c4f01a464f57fe8e68d741246d9df492) miscbltin.c (e7a0b0244d302e1d3c199fd760f49c3dfdfd3ca9)
1/*-
2 * Copyright (c) 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Kenneth Almquist.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * SUCH DAMAGE.
35 *
1/*-
2 * Copyright (c) 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Kenneth Almquist.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * SUCH DAMAGE.
35 *
36 * $Id: miscbltin.c,v 1.11 1997/02/22 13:58:35 peter Exp $
36 * $Id: miscbltin.c,v 1.12 1997/04/28 03:06:36 steve Exp $
37 */
38
39#ifndef lint
40static char const sccsid[] = "@(#)miscbltin.c 8.4 (Berkeley) 5/4/95";
41#endif /* not lint */
42
43/*
44 * Miscelaneous builtins.

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

70 * The read builtin. The -e option causes backslashes to escape the
71 * following character.
72 *
73 * This uses unbuffered input, which may be avoidable in some cases.
74 */
75
76int
77readcmd(argc, argv)
37 */
38
39#ifndef lint
40static char const sccsid[] = "@(#)miscbltin.c 8.4 (Berkeley) 5/4/95";
41#endif /* not lint */
42
43/*
44 * Miscelaneous builtins.

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

70 * The read builtin. The -e option causes backslashes to escape the
71 * following character.
72 *
73 * This uses unbuffered input, which may be avoidable in some cases.
74 */
75
76int
77readcmd(argc, argv)
78 int argc;
79 char **argv;
78 int argc __unused;
79 char **argv __unused;
80{
81 char **ap;
82 int backslash;
83 char c;
84 int eflag;
85 char *prompt;
86 char *ifs;
87 char *p;

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

154 setvar(*ap, nullstr, 0);
155 return status;
156}
157
158
159
160int
161umaskcmd(argc, argv)
80{
81 char **ap;
82 int backslash;
83 char c;
84 int eflag;
85 char *prompt;
86 char *ifs;
87 char *p;

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

154 setvar(*ap, nullstr, 0);
155 return status;
156}
157
158
159
160int
161umaskcmd(argc, argv)
162 int argc;
162 int argc __unused;
163 char **argv;
164{
165 char *ap;
166 int mask;
167 int i;
168 int symbolic_mode = 0;
169
170 while ((i = nextopt("S")) != '\0') {

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

284#ifdef RLIMIT_SWAP
285 { "swap limit", "kbytes", RLIMIT_SWAP, 1024, 'w' },
286#endif
287 { (char *) 0, (char *)0, 0, 0, '\0' }
288};
289
290int
291ulimitcmd(argc, argv)
163 char **argv;
164{
165 char *ap;
166 int mask;
167 int i;
168 int symbolic_mode = 0;
169
170 while ((i = nextopt("S")) != '\0') {

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

284#ifdef RLIMIT_SWAP
285 { "swap limit", "kbytes", RLIMIT_SWAP, 1024, 'w' },
286#endif
287 { (char *) 0, (char *)0, 0, 0, '\0' }
288};
289
290int
291ulimitcmd(argc, argv)
292 int argc;
293 char **argv;
292 int argc __unused;
293 char **argv __unused;
294{
295 int c;
296 quad_t val = 0;
297 enum { SOFT = 0x1, HARD = 0x2 }
298 how = SOFT | HARD;
299 const struct limits *l;
300 int set, all = 0;
301 int optc, what;

--- 98 unchanged lines hidden ---
294{
295 int c;
296 quad_t val = 0;
297 enum { SOFT = 0x1, HARD = 0x2 }
298 how = SOFT | HARD;
299 const struct limits *l;
300 int set, all = 0;
301 int optc, what;

--- 98 unchanged lines hidden ---