Deleted Added
full compact
jobs.c (200998) jobs.c (201053)
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

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

31 */
32
33#ifndef lint
34#if 0
35static char sccsid[] = "@(#)jobs.c 8.5 (Berkeley) 5/4/95";
36#endif
37#endif /* not lint */
38#include <sys/cdefs.h>
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

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

31 */
32
33#ifndef lint
34#if 0
35static char sccsid[] = "@(#)jobs.c 8.5 (Berkeley) 5/4/95";
36#endif
37#endif /* not lint */
38#include <sys/cdefs.h>
39__FBSDID("$FreeBSD: head/bin/sh/jobs.c 200998 2009-12-25 20:21:35Z jilles $");
39__FBSDID("$FreeBSD: head/bin/sh/jobs.c 201053 2009-12-27 18:04:05Z jilles $");
40
41#include <fcntl.h>
42#include <signal.h>
43#include <errno.h>
44#include <paths.h>
45#include <unistd.h>
46#include <stdlib.h>
47#include <sys/param.h>

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

87#if JOBS
88STATIC void restartjob(struct job *);
89#endif
90STATIC void freejob(struct job *);
91STATIC struct job *getjob(char *);
92STATIC pid_t dowait(int, struct job *);
93STATIC pid_t waitproc(int, int *);
94STATIC void cmdtxt(union node *);
40
41#include <fcntl.h>
42#include <signal.h>
43#include <errno.h>
44#include <paths.h>
45#include <unistd.h>
46#include <stdlib.h>
47#include <sys/param.h>

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

87#if JOBS
88STATIC void restartjob(struct job *);
89#endif
90STATIC void freejob(struct job *);
91STATIC struct job *getjob(char *);
92STATIC pid_t dowait(int, struct job *);
93STATIC pid_t waitproc(int, int *);
94STATIC void cmdtxt(union node *);
95STATIC void cmdputs(char *);
95STATIC void cmdputs(const char *);
96#if JOBS
97STATIC void setcurjob(struct job *);
98STATIC void deljob(struct job *);
99STATIC struct job *getcurjob(struct job *);
100#endif
101STATIC void showjob(struct job *, pid_t, int);
102
103

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

1078}
1079
1080
1081STATIC void
1082cmdtxt(union node *n)
1083{
1084 union node *np;
1085 struct nodelist *lp;
96#if JOBS
97STATIC void setcurjob(struct job *);
98STATIC void deljob(struct job *);
99STATIC struct job *getcurjob(struct job *);
100#endif
101STATIC void showjob(struct job *, pid_t, int);
102
103

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

1078}
1079
1080
1081STATIC void
1082cmdtxt(union node *n)
1083{
1084 union node *np;
1085 struct nodelist *lp;
1086 char *p;
1086 const char *p;
1087 int i;
1088 char s[2];
1089
1090 if (n == NULL)
1091 return;
1092 switch (n->type) {
1093 case NSEMI:
1094 cmdtxt(n->nbinary.ch1);

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

1207 cmdputs("???");
1208 break;
1209 }
1210}
1211
1212
1213
1214STATIC void
1087 int i;
1088 char s[2];
1089
1090 if (n == NULL)
1091 return;
1092 switch (n->type) {
1093 case NSEMI:
1094 cmdtxt(n->nbinary.ch1);

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

1207 cmdputs("???");
1208 break;
1209 }
1210}
1211
1212
1213
1214STATIC void
1215cmdputs(char *s)
1215cmdputs(const char *s)
1216{
1216{
1217 char *p, *q;
1217 const char *p;
1218 char *q;
1218 char c;
1219 int subtype = 0;
1220
1221 if (cmdnleft <= 0)
1222 return;
1223 p = s;
1224 q = cmdnextc;
1225 while ((c = *p++) != '\0') {

--- 25 unchanged lines hidden ---
1219 char c;
1220 int subtype = 0;
1221
1222 if (cmdnleft <= 0)
1223 return;
1224 p = s;
1225 q = cmdnextc;
1226 while ((c = *p++) != '\0') {

--- 25 unchanged lines hidden ---