Deleted Added
full compact
jobs.c (8855) jobs.c (10934)
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: jobs.c,v 1.2 1994/09/24 02:57:41 davidg Exp $
36 * $Id: jobs.c,v 1.3 1995/05/30 00:07:18 rgrimes Exp $
37 */
38
39#ifndef lint
40static char sccsid[] = "@(#)jobs.c 8.1 (Berkeley) 5/31/93";
41#endif /* not lint */
42
43#include "shell.h"
44#if JOBS

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

454 struct job *jp;
455
456 for (i = njobs, jp = jobtab ; ; jp++) {
457 if (--i < 0) {
458 INTOFF;
459 if (njobs == 0) {
460 jobtab = ckmalloc(4 * sizeof jobtab[0]);
461 } else {
37 */
38
39#ifndef lint
40static char sccsid[] = "@(#)jobs.c 8.1 (Berkeley) 5/31/93";
41#endif /* not lint */
42
43#include "shell.h"
44#if JOBS

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

454 struct job *jp;
455
456 for (i = njobs, jp = jobtab ; ; jp++) {
457 if (--i < 0) {
458 INTOFF;
459 if (njobs == 0) {
460 jobtab = ckmalloc(4 * sizeof jobtab[0]);
461 } else {
462 struct job *ojp;
463
462 jp = ckmalloc((njobs + 4) * sizeof jobtab[0]);
464 jp = ckmalloc((njobs + 4) * sizeof jobtab[0]);
465 for (i = njobs, ojp = jobtab; --i >= 0;
466 jp++, ojp++)
467 if (ojp->ps == &ojp->ps0)
468 ojp->ps = &jp->ps0;
469 jp -= njobs;
463 bcopy(jobtab, jp, njobs * sizeof jp[0]);
464 ckfree(jobtab);
465 jobtab = jp;
466 }
467 jp = jobtab + njobs;
468 for (i = 4 ; --i >= 0 ; jobtab[njobs++].used = 0);
469 INTON;
470 break;

--- 578 unchanged lines hidden ---
470 bcopy(jobtab, jp, njobs * sizeof jp[0]);
471 ckfree(jobtab);
472 jobtab = jp;
473 }
474 jp = jobtab + njobs;
475 for (i = 4 ; --i >= 0 ; jobtab[njobs++].used = 0);
476 INTON;
477 break;

--- 578 unchanged lines hidden ---