Index: alloc.c
===================================================================
RCS file: /cvs/src/bin/csh/alloc.c,v
retrieving revision 1.17
diff -u -p -u -r1.17 alloc.c
--- alloc.c 26 Dec 2015 13:48:38 -0000 1.17
+++ alloc.c 16 Mar 2016 22:47:56 -0000
@@ -30,12 +30,18 @@
* SUCH DAMAGE.
*/
+#include <sys/resource.h>
#include <sys/types.h>
-#include <unistd.h>
-#include <stdlib.h>
+
+#include <setjmp.h>
+#include <signal.h>
#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
#include "csh.h"
+#include "error.h"
#include "extern.h"
void *
Index: char.h
===================================================================
RCS file: /cvs/src/bin/csh/char.h,v
retrieving revision 1.5
diff -u -p -u -r1.5 char.h
--- char.h 26 Oct 2015 15:01:15 -0000 1.5
+++ char.h 15 Mar 2016 02:20:05 -0000
@@ -32,8 +32,6 @@
* @(#)char.h 8.1 (Berkeley) 5/31/93
*/
-#include <ctype.h>
-
extern unsigned short _cmap[];
#define _QF 0x0001 /* '" (Forward quotes) */
Index: const.c
===================================================================
RCS file: /cvs/src/bin/csh/const.c,v
retrieving revision 1.8
diff -u -p -u -r1.8 const.c
--- const.c 26 Oct 2015 16:27:04 -0000 1.8
+++ const.c 15 Mar 2016 01:56:33 -0000
@@ -34,6 +34,13 @@
* tc.const.c: String constants for csh.
*/
+#include <sys/resource.h>
+#include <sys/types.h>
+
+#include <setjmp.h>
+#include <signal.h>
+#include <stdio.h>
+
#include "csh.h"
Char STR0[] = { '0', '\0' };
Index: csh.c
===================================================================
RCS file: /cvs/src/bin/csh/csh.c,v
retrieving revision 1.37
diff -u -p -u -r1.37 csh.c
--- csh.c 26 Dec 2015 13:48:38 -0000 1.37
+++ csh.c 16 Mar 2016 22:49:38 -0000
@@ -30,24 +30,33 @@
* SUCH DAMAGE.
*/
-#include <sys/types.h>
#include <sys/ioctl.h>
+#include <sys/resource.h>
#include <sys/stat.h>
-#include <fcntl.h>
+#include <sys/types.h>
+
#include <errno.h>
+#include <fcntl.h>
+#include <limits.h>
+#include <locale.h>
+#include <paths.h>
#include <pwd.h>
+#include <setjmp.h>
+#include <signal.h>
+#include <stdarg.h>
#include <stdlib.h>
+#include <stdio.h>
#include <string.h>
-#include <locale.h>
#include <unistd.h>
-#include <limits.h>
#include <vis.h>
-#include <stdarg.h>
#include "csh.h"
-#include "proc.h"
+#include "const.h"
+#include "dir.h"
+#include "error.h"
#include "extern.h"
#include "pathnames.h"
+#include "proc.h"
/*
* C Shell
Index: csh.h
===================================================================
RCS file: /cvs/src/bin/csh/csh.h,v
retrieving revision 1.28
diff -u -p -u -r1.28 csh.h
--- csh.h 26 Dec 2015 13:48:38 -0000 1.28
+++ csh.h 15 Mar 2016 01:46:58 -0000
@@ -65,15 +65,10 @@ typedef short Char;
typedef void *ioctl_t; /* Third arg of ioctl */
-#include "const.h"
-#include "char.h"
-#include "error.h"
-
#define xmalloc(i) Malloc(i)
#define xreallocarray(p, i, j) Reallocarray(p, i, j)
#define xcalloc(n, s) Calloc(n, s)
-#include <stdio.h>
FILE *cshin, *cshout, *csherr;
#define isdir(d) (S_ISDIR(d.st_mode))
@@ -118,10 +113,6 @@ Char *ffile; /* Name of shell file f
char *seterr; /* Error message from scanner/parser */
-#include <sys/types.h>
-#include <sys/time.h>
-#include <sys/resource.h>
-
struct timeval time0; /* Time at which the shell started */
struct rusage ru0;
@@ -160,7 +151,6 @@ int OLDSTD; /* Old standard input (d
* Because of source commands and .cshrc we need nested error catches.
*/
-#include <setjmp.h>
jmp_buf reslab;
int exitset;
@@ -172,7 +162,6 @@ int exitset;
Char *gointr; /* Label for an onintr transfer */
-#include <signal.h>
sig_t parintr; /* Parents interrupt catch */
sig_t parterm; /* Parents terminate catch */
@@ -476,7 +465,6 @@ Char *word_chars;
Char *STR_SHELLPATH;
-#include <paths.h>
Char *STR_BSHELL;
Char *STR_WORD_CHARS;
Char **STR_environ;
Index: dir.c
===================================================================
RCS file: /cvs/src/bin/csh/dir.c,v
retrieving revision 1.21
diff -u -p -u -r1.21 dir.c
--- dir.c 26 Dec 2015 13:48:38 -0000 1.21
+++ dir.c 16 Mar 2016 22:50:15 -0000
@@ -30,16 +30,25 @@
* SUCH DAMAGE.
*/
+#include <sys/resource.h>
#include <sys/stat.h>
+
+#include <ctype.h>
#include <errno.h>
+#include <limits.h>
+#include <setjmp.h>
+#include <signal.h>
+#include <stdarg.h>
#include <stdlib.h>
+#include <stdio.h>
#include <string.h>
#include <unistd.h>
-#include <limits.h>
-#include <stdarg.h>
#include "csh.h"
+#include "char.h"
+#include "const.h"
#include "dir.h"
+#include "error.h"
#include "extern.h"
/* Directory management. */
Index: dol.c
===================================================================
RCS file: /cvs/src/bin/csh/dol.c,v
retrieving revision 1.20
diff -u -p -u -r1.20 dol.c
--- dol.c 26 Dec 2015 13:48:38 -0000 1.20
+++ dol.c 16 Mar 2016 22:50:51 -0000
@@ -30,15 +30,24 @@
* SUCH DAMAGE.
*/
+#include <sys/resource.h>
#include <sys/types.h>
-#include <fcntl.h>
+
+#include <ctype.h>
#include <errno.h>
+#include <fcntl.h>
+#include <setjmp.h>
+#include <signal.h>
+#include <stdarg.h>
#include <stdlib.h>
+#include <stdio.h>
#include <string.h>
#include <unistd.h>
-#include <stdarg.h>
+#include "char.h"
#include "csh.h"
+#include "const.h"
+#include "error.h"
#include "extern.h"
/*
Index: error.c
===================================================================
RCS file: /cvs/src/bin/csh/error.c,v
retrieving revision 1.12
diff -u -p -u -r1.12 error.c
--- error.c 26 Dec 2015 13:48:38 -0000 1.12
+++ error.c 16 Mar 2016 22:51:14 -0000
@@ -30,12 +30,18 @@
* SUCH DAMAGE.
*/
+#include <sys/resource.h>
#include <sys/types.h>
+
+#include <setjmp.h>
+#include <signal.h>
+#include <stdarg.h>
#include <stdlib.h>
+#include <stdio.h>
#include <unistd.h>
-#include <stdarg.h>
#include "csh.h"
+#include "const.h"
#include "extern.h"
char *seterr = NULL; /* Holds last error if there was one */
Index: exec.c
===================================================================
RCS file: /cvs/src/bin/csh/exec.c,v
retrieving revision 1.19
diff -u -p -u -r1.19 exec.c
--- exec.c 26 Dec 2015 13:48:38 -0000 1.19
+++ exec.c 16 Mar 2016 22:52:10 -0000
@@ -30,18 +30,27 @@
* SUCH DAMAGE.
*/
+#include <sys/resource.h>
+#include <sys/stat.h>
#include <sys/types.h>
+
+#include <ctype.h>
#include <dirent.h>
-#include <fcntl.h>
-#include <sys/stat.h>
#include <errno.h>
+#include <fcntl.h>
+#include <limits.h>
+#include <setjmp.h>
+#include <signal.h>
+#include <stdarg.h>
#include <stdlib.h>
+#include <stdio.h>
#include <string.h>
#include <unistd.h>
-#include <limits.h>
-#include <stdarg.h>
+#include "char.h"
#include "csh.h"
+#include "const.h"
+#include "error.h"
#include "extern.h"
/*
Index: exp.c
===================================================================
RCS file: /cvs/src/bin/csh/exp.c,v
retrieving revision 1.16
diff -u -p -u -r1.16 exp.c
--- exp.c 26 Dec 2015 13:48:38 -0000 1.16
+++ exp.c 16 Mar 2016 22:52:45 -0000
@@ -30,14 +30,23 @@
* SUCH DAMAGE.
*/
-#include <sys/types.h>
+#include <sys/resource.h>
#include <sys/stat.h>
+#include <sys/types.h>
+
+#include <ctype.h>
#include <limits.h>
+#include <setjmp.h>
+#include <signal.h>
+#include <stdarg.h>
#include <stdlib.h>
+#include <stdio.h>
#include <unistd.h>
-#include <stdarg.h>
+#include "char.h"
#include "csh.h"
+#include "const.h"
+#include "error.h"
#include "extern.h"
#define IGNORE 1 /* in ignore, it means to ignore value, just
parse */
Index: file.c
===================================================================
RCS file: /cvs/src/bin/csh/file.c,v
retrieving revision 1.23
diff -u -p -u -r1.23 file.c
--- file.c 26 Dec 2015 13:48:38 -0000 1.23
+++ file.c 16 Mar 2016 22:53:57 -0000
@@ -30,19 +30,24 @@
* SUCH DAMAGE.
*/
-
-#include <sys/types.h>
#include <sys/ioctl.h>
+#include <sys/resource.h>
#include <sys/stat.h>
-#include <termios.h>
+#include <sys/types.h>
+
#include <dirent.h>
+#include <limits.h>
#include <pwd.h>
+#include <setjmp.h>
+#include <signal.h>
+#include <stdarg.h>
#include <stdlib.h>
+#include <stdio.h>
+#include <termios.h>
#include <unistd.h>
-#include <limits.h>
-#include <stdarg.h>
#include "csh.h"
+#include "const.h"
#include "extern.h"
/*
Index: func.c
===================================================================
RCS file: /cvs/src/bin/csh/func.c,v
retrieving revision 1.32
diff -u -p -u -r1.32 func.c
--- func.c 26 Dec 2015 13:48:38 -0000 1.32
+++ func.c 16 Mar 2016 22:54:50 -0000
@@ -30,16 +30,24 @@
* SUCH DAMAGE.
*/
-#include <sys/types.h>
+#include <sys/resource.h>
#include <sys/stat.h>
-#include <signal.h>
+#include <sys/types.h>
+
+#include <ctype.h>
#include <locale.h>
+#include <setjmp.h>
+#include <signal.h>
+#include <stdarg.h>
#include <stdlib.h>
+#include <stdio.h>
#include <string.h>
#include <unistd.h>
-#include <stdarg.h>
+#include "char.h"
#include "csh.h"
+#include "const.h"
+#include "error.h"
#include "extern.h"
#include "pathnames.h"
Index: glob.c
===================================================================
RCS file: /cvs/src/bin/csh/glob.c,v
retrieving revision 1.22
diff -u -p -u -r1.22 glob.c
--- glob.c 26 Dec 2015 13:48:38 -0000 1.22
+++ glob.c 16 Mar 2016 22:55:40 -0000
@@ -30,16 +30,24 @@
* SUCH DAMAGE.
*/
+#include <sys/resource.h>
#include <sys/types.h>
-#include <glob.h>
+
#include <errno.h>
+#include <glob.h>
+#include <limits.h>
+#include <setjmp.h>
+#include <signal.h>
+#include <stdarg.h>
#include <stdlib.h>
+#include <stdio.h>
#include <string.h>
#include <unistd.h>
-#include <limits.h>
-#include <stdarg.h>
+#include "char.h"
#include "csh.h"
+#include "const.h"
+#include "error.h"
#include "extern.h"
static int noglob;
Index: hist.c
===================================================================
RCS file: /cvs/src/bin/csh/hist.c,v
retrieving revision 1.10
diff -u -p -u -r1.10 hist.c
--- hist.c 26 Dec 2015 13:48:38 -0000 1.10
+++ hist.c 16 Mar 2016 22:56:02 -0000
@@ -30,11 +30,20 @@
* SUCH DAMAGE.
*/
+#include <sys/resource.h>
#include <sys/types.h>
-#include <stdlib.h>
+
+#include <ctype.h>
+#include <setjmp.h>
+#include <signal.h>
#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include "char.h"
#include "csh.h"
+#include "const.h"
+#include "error.h"
#include "extern.h"
static void hfree(struct Hist *);
Index: init.c
===================================================================
RCS file: /cvs/src/bin/csh/init.c,v
retrieving revision 1.8
diff -u -p -u -r1.8 init.c
--- init.c 16 Oct 2014 18:23:26 -0000 1.8
+++ init.c 16 Mar 2016 22:56:16 -0000
@@ -30,7 +30,12 @@
* SUCH DAMAGE.
*/
+#include <sys/resource.h>
+
+#include <setjmp.h>
+#include <signal.h>
#include <stdarg.h>
+#include <stdio.h>
#include "csh.h"
#include "extern.h"
Index: lex.c
===================================================================
RCS file: /cvs/src/bin/csh/lex.c,v
retrieving revision 1.21
diff -u -p -u -r1.21 lex.c
--- lex.c 26 Dec 2015 13:48:38 -0000 1.21
+++ lex.c 16 Mar 2016 22:57:27 -0000
@@ -30,16 +30,25 @@
* SUCH DAMAGE.
*/
-#include <sys/types.h>
#include <sys/ioctl.h>
-#include <termios.h>
+#include <sys/resource.h>
+#include <sys/types.h>
+
+#include <ctype.h>
#include <errno.h>
+#include <setjmp.h>
+#include <signal.h>
+#include <stdarg.h>
#include <stdlib.h>
+#include <stdio.h>
#include <string.h>
+#include <termios.h>
#include <unistd.h>
-#include <stdarg.h>
#include "csh.h"
+#include "char.h"
+#include "const.h"
+#include "error.h"
#include "extern.h"
/*
Index: misc.c
===================================================================
RCS file: /cvs/src/bin/csh/misc.c,v
retrieving revision 1.18
diff -u -p -u -r1.18 misc.c
--- misc.c 26 Dec 2015 13:48:38 -0000 1.18
+++ misc.c 16 Mar 2016 22:58:02 -0000
@@ -30,12 +30,20 @@
* SUCH DAMAGE.
*/
+#include <sys/resource.h>
#include <sys/types.h>
+
+#include <ctype.h>
+#include <setjmp.h>
+#include <signal.h>
+#include <stdarg.h>
#include <stdlib.h>
+#include <stdio.h>
#include <unistd.h>
-#include <stdarg.h>
#include "csh.h"
+#include "char.h"
+#include "error.h"
#include "extern.h"
static int renum(int, int);
Index: parse.c
===================================================================
RCS file: /cvs/src/bin/csh/parse.c,v
retrieving revision 1.12
diff -u -p -u -r1.12 parse.c
--- parse.c 26 Dec 2015 13:48:38 -0000 1.12
+++ parse.c 16 Mar 2016 22:58:33 -0000
@@ -30,12 +30,19 @@
* SUCH DAMAGE.
*/
+#include <sys/resource.h>
#include <sys/types.h>
+
+#include <setjmp.h>
+#include <signal.h>
+#include <stdarg.h>
#include <stdlib.h>
+#include <stdio.h>
#include <string.h>
-#include <stdarg.h>
#include "csh.h"
+#include "const.h"
+#include "error.h"
#include "extern.h"
static void asyntax(struct wordent *, struct wordent *);
Index: proc.c
===================================================================
RCS file: /cvs/src/bin/csh/proc.c,v
retrieving revision 1.30
diff -u -p -u -r1.30 proc.c
--- proc.c 26 Dec 2015 13:48:38 -0000 1.30
+++ proc.c 16 Mar 2016 22:59:23 -0000
@@ -30,18 +30,27 @@
* SUCH DAMAGE.
*/
+#include <sys/resource.h>
#include <sys/types.h>
#include <sys/wait.h>
+
+#include <ctype.h>
#include <errno.h>
-#include <unistd.h>
#include <limits.h>
+#include <setjmp.h>
+#include <signal.h>
+#include <stdarg.h>
#include <stdlib.h>
+#include <stdio.h>
#include <string.h>
-#include <stdarg.h>
+#include <unistd.h>
#include "csh.h"
+#include "char.h"
+#include "const.h"
#include "dir.h"
#include "proc.h"
+#include "error.h"
#include "extern.h"
#define BIGINDEX 9 /* largest desirable job index */
Index: sem.c
===================================================================
RCS file: /cvs/src/bin/csh/sem.c,v
retrieving revision 1.21
diff -u -p -u -r1.21 sem.c
--- sem.c 26 Dec 2015 13:48:38 -0000 1.21
+++ sem.c 16 Mar 2016 23:00:17 -0000
@@ -30,19 +30,28 @@
* SUCH DAMAGE.
*/
-#include <sys/types.h>
#include <sys/ioctl.h>
+#include <sys/resource.h>
#include <sys/stat.h>
+#include <sys/types.h>
+
#include <errno.h>
#include <fcntl.h>
+#include <limits.h>
+#include <paths.h>
+#include <setjmp.h>
+#include <signal.h>
+#include <stdarg.h>
#include <stdlib.h>
+#include <stdio.h>
#include <string.h>
#include <unistd.h>
-#include <limits.h>
-#include <stdarg.h>
#include "csh.h"
+#include "const.h"
+#include "char.h"
#include "proc.h"
+#include "error.h"
#include "extern.h"
static void vffree(int);
Index: set.c
===================================================================
RCS file: /cvs/src/bin/csh/set.c,v
retrieving revision 1.19
diff -u -p -u -r1.19 set.c
--- set.c 26 Dec 2015 13:48:38 -0000 1.19
+++ set.c 16 Mar 2016 23:01:09 -0000
@@ -30,11 +30,20 @@
* SUCH DAMAGE.
*/
+#include <sys/resource.h>
#include <sys/types.h>
-#include <stdlib.h>
+
+#include <ctype.h>
+#include <setjmp.h>
+#include <signal.h>
#include <stdarg.h>
+#include <stdlib.h>
+#include <stdio.h>
#include "csh.h"
+#include "const.h"
+#include "char.h"
+#include "error.h"
#include "extern.h"
static Char *getinx(Char *, int *);
Index: str.c
===================================================================
RCS file: /cvs/src/bin/csh/str.c,v
retrieving revision 1.19
diff -u -p -u -r1.19 str.c
--- str.c 26 Oct 2015 16:31:09 -0000 1.19
+++ str.c 16 Mar 2016 22:44:35 -0000
@@ -37,11 +37,18 @@
* This has been a lesson of how to write buggy code!
*/
+#include <sys/resource.h>
#include <sys/types.h>
+
+#include <setjmp.h>
+#include <signal.h>
#include <stdarg.h>
+#include <stdio.h>
#include <vis.h>
#include "csh.h"
+#include "const.h"
+#include "char.h"
#include "extern.h"
Char **
Index: time.c
===================================================================
RCS file: /cvs/src/bin/csh/time.c,v
retrieving revision 1.14
diff -u -p -u -r1.14 time.c
--- time.c 22 Aug 2013 04:43:40 -0000 1.14
+++ time.c 16 Mar 2016 22:47:01 -0000
@@ -30,10 +30,17 @@
* SUCH DAMAGE.
*/
+#include <sys/resource.h>
#include <sys/types.h>
+
+#include <setjmp.h>
+#include <signal.h>
#include <stdarg.h>
+#include <stdio.h>
#include "csh.h"
+#include "const.h"
+#include "char.h"
#include "extern.h"
/*