Module Name: src
Committed By: christos
Date: Tue Feb 16 22:53:14 UTC 2016
Modified Files:
src/lib/libedit: chared.c chared.h chartype.c common.c el.h emacs.c
filecomplete.c hist.c map.c parse.c read.c refresh.c search.c tty.c
vi.c
Log Message:
More header cleanups from Ingo Schwarze.
To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/lib/libedit/chared.c
cvs rdiff -u -r1.26 -r1.27 src/lib/libedit/chared.h
cvs rdiff -u -r1.17 -r1.18 src/lib/libedit/chartype.c
cvs rdiff -u -r1.36 -r1.37 src/lib/libedit/common.c
cvs rdiff -u -r1.31 -r1.32 src/lib/libedit/el.h src/lib/libedit/emacs.c
cvs rdiff -u -r1.38 -r1.39 src/lib/libedit/filecomplete.c
cvs rdiff -u -r1.23 -r1.24 src/lib/libedit/hist.c
cvs rdiff -u -r1.41 -r1.42 src/lib/libedit/map.c
cvs rdiff -u -r1.33 -r1.34 src/lib/libedit/parse.c
cvs rdiff -u -r1.80 -r1.81 src/lib/libedit/read.c
cvs rdiff -u -r1.42 -r1.43 src/lib/libedit/refresh.c
cvs rdiff -u -r1.37 -r1.38 src/lib/libedit/search.c
cvs rdiff -u -r1.55 -r1.56 src/lib/libedit/tty.c
cvs rdiff -u -r1.52 -r1.53 src/lib/libedit/vi.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libedit/chared.c
diff -u src/lib/libedit/chared.c:1.45 src/lib/libedit/chared.c:1.46
--- src/lib/libedit/chared.c:1.45 Tue Feb 16 14:08:41 2016
+++ src/lib/libedit/chared.c Tue Feb 16 17:53:14 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: chared.c,v 1.45 2016/02/16 19:08:41 christos Exp $ */
+/* $NetBSD: chared.c,v 1.46 2016/02/16 22:53:14 christos Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -37,14 +37,16 @@
#if 0
static char sccsid[] = "@(#)chared.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: chared.c,v 1.45 2016/02/16 19:08:41 christos Exp $");
+__RCSID("$NetBSD: chared.c,v 1.46 2016/02/16 22:53:14 christos Exp $");
#endif
#endif /* not lint && not SCCSID */
/*
* chared.c: Character editor utilities
*/
+#include <ctype.h>
#include <stdlib.h>
+#include <string.h>
#include "el.h"
#include "common.h"
Index: src/lib/libedit/chared.h
diff -u src/lib/libedit/chared.h:1.26 src/lib/libedit/chared.h:1.27
--- src/lib/libedit/chared.h:1.26 Tue Feb 16 14:08:41 2016
+++ src/lib/libedit/chared.h Tue Feb 16 17:53:14 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: chared.h,v 1.26 2016/02/16 19:08:41 christos Exp $ */
+/* $NetBSD: chared.h,v 1.27 2016/02/16 22:53:14 christos Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -40,9 +40,6 @@
#ifndef _h_el_chared
#define _h_el_chared
-#include <ctype.h>
-#include <string.h>
-
#define EL_MAXMACRO 10
/*
Index: src/lib/libedit/chartype.c
diff -u src/lib/libedit/chartype.c:1.17 src/lib/libedit/chartype.c:1.18
--- src/lib/libedit/chartype.c:1.17 Tue Feb 16 10:53:48 2016
+++ src/lib/libedit/chartype.c Tue Feb 16 17:53:14 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: chartype.c,v 1.17 2016/02/16 15:53:48 christos Exp $ */
+/* $NetBSD: chartype.c,v 1.18 2016/02/16 22:53:14 christos Exp $ */
/*-
* Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -38,10 +38,14 @@
*/
#include "config.h"
#if !defined(lint) && !defined(SCCSID)
-__RCSID("$NetBSD: chartype.c,v 1.17 2016/02/16 15:53:48 christos Exp $");
+__RCSID("$NetBSD: chartype.c,v 1.18 2016/02/16 22:53:14 christos Exp $");
#endif /* not lint && not SCCSID */
-#include "el.h"
+
+#include <ctype.h>
#include <stdlib.h>
+#include <string.h>
+
+#include "el.h"
#define CT_BUFSIZ ((size_t)1024)
Index: src/lib/libedit/common.c
diff -u src/lib/libedit/common.c:1.36 src/lib/libedit/common.c:1.37
--- src/lib/libedit/common.c:1.36 Tue Feb 16 14:11:25 2016
+++ src/lib/libedit/common.c Tue Feb 16 17:53:14 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: common.c,v 1.36 2016/02/16 19:11:25 christos Exp $ */
+/* $NetBSD: common.c,v 1.37 2016/02/16 22:53:14 christos Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -37,13 +37,16 @@
#if 0
static char sccsid[] = "@(#)common.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: common.c,v 1.36 2016/02/16 19:11:25 christos Exp $");
+__RCSID("$NetBSD: common.c,v 1.37 2016/02/16 22:53:14 christos Exp $");
#endif
#endif /* not lint && not SCCSID */
/*
* common.c: Common Editor functions
*/
+#include <ctype.h>
+#include <string.h>
+
#include "el.h"
#include "common.h"
#include "parse.h"
Index: src/lib/libedit/el.h
diff -u src/lib/libedit/el.h:1.31 src/lib/libedit/el.h:1.32
--- src/lib/libedit/el.h:1.31 Tue Feb 16 14:11:25 2016
+++ src/lib/libedit/el.h Tue Feb 16 17:53:14 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: el.h,v 1.31 2016/02/16 19:11:25 christos Exp $ */
+/* $NetBSD: el.h,v 1.32 2016/02/16 22:53:14 christos Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -48,8 +48,6 @@
#include "histedit.h"
#include "chartype.h"
-#include <stdio.h>
-#include <sys/types.h>
#define EL_BUFSIZ ((size_t)1024) /* Maximum line size */
Index: src/lib/libedit/emacs.c
diff -u src/lib/libedit/emacs.c:1.31 src/lib/libedit/emacs.c:1.32
--- src/lib/libedit/emacs.c:1.31 Tue Feb 16 14:08:41 2016
+++ src/lib/libedit/emacs.c Tue Feb 16 17:53:14 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: emacs.c,v 1.31 2016/02/16 19:08:41 christos Exp $ */
+/* $NetBSD: emacs.c,v 1.32 2016/02/16 22:53:14 christos Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -37,13 +37,15 @@
#if 0
static char sccsid[] = "@(#)emacs.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: emacs.c,v 1.31 2016/02/16 19:08:41 christos Exp $");
+__RCSID("$NetBSD: emacs.c,v 1.32 2016/02/16 22:53:14 christos Exp $");
#endif
#endif /* not lint && not SCCSID */
/*
* emacs.c: Emacs functions
*/
+#include <ctype.h>
+
#include "el.h"
#include "emacs.h"
Index: src/lib/libedit/filecomplete.c
diff -u src/lib/libedit/filecomplete.c:1.38 src/lib/libedit/filecomplete.c:1.39
--- src/lib/libedit/filecomplete.c:1.38 Tue Feb 16 14:08:41 2016
+++ src/lib/libedit/filecomplete.c Tue Feb 16 17:53:14 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: filecomplete.c,v 1.38 2016/02/16 19:08:41 christos Exp $ */
+/* $NetBSD: filecomplete.c,v 1.39 2016/02/16 22:53:14 christos Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
#include "config.h"
#if !defined(lint) && !defined(SCCSID)
-__RCSID("$NetBSD: filecomplete.c,v 1.38 2016/02/16 19:08:41 christos Exp $");
+__RCSID("$NetBSD: filecomplete.c,v 1.39 2016/02/16 22:53:14 christos Exp $");
#endif /* not lint && not SCCSID */
#include <sys/types.h>
@@ -40,7 +40,6 @@ __RCSID("$NetBSD: filecomplete.c,v 1.38
#include <dirent.h>
#include <string.h>
#include <pwd.h>
-#include <ctype.h>
#include <stdlib.h>
#include <unistd.h>
#include <limits.h>
Index: src/lib/libedit/hist.c
diff -u src/lib/libedit/hist.c:1.23 src/lib/libedit/hist.c:1.24
--- src/lib/libedit/hist.c:1.23 Tue Feb 16 10:53:48 2016
+++ src/lib/libedit/hist.c Tue Feb 16 17:53:14 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: hist.c,v 1.23 2016/02/16 15:53:48 christos Exp $ */
+/* $NetBSD: hist.c,v 1.24 2016/02/16 22:53:14 christos Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)hist.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: hist.c,v 1.23 2016/02/16 15:53:48 christos Exp $");
+__RCSID("$NetBSD: hist.c,v 1.24 2016/02/16 22:53:14 christos Exp $");
#endif
#endif /* not lint && not SCCSID */
@@ -45,6 +45,8 @@ __RCSID("$NetBSD: hist.c,v 1.23 2016/02/
* hist.c: History access functions
*/
#include <stdlib.h>
+#include <string.h>
+
#include "el.h"
/* hist_init():
Index: src/lib/libedit/map.c
diff -u src/lib/libedit/map.c:1.41 src/lib/libedit/map.c:1.42
--- src/lib/libedit/map.c:1.41 Tue Feb 16 14:08:41 2016
+++ src/lib/libedit/map.c Tue Feb 16 17:53:14 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: map.c,v 1.41 2016/02/16 19:08:41 christos Exp $ */
+/* $NetBSD: map.c,v 1.42 2016/02/16 22:53:14 christos Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -37,14 +37,16 @@
#if 0
static char sccsid[] = "@(#)map.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: map.c,v 1.41 2016/02/16 19:08:41 christos Exp $");
+__RCSID("$NetBSD: map.c,v 1.42 2016/02/16 22:53:14 christos Exp $");
#endif
#endif /* not lint && not SCCSID */
/*
* map.c: Editor function definitions
*/
+#include <ctype.h>
#include <stdlib.h>
+#include <string.h>
#include "el.h"
#include "help.h"
Index: src/lib/libedit/parse.c
diff -u src/lib/libedit/parse.c:1.33 src/lib/libedit/parse.c:1.34
--- src/lib/libedit/parse.c:1.33 Tue Feb 16 14:08:41 2016
+++ src/lib/libedit/parse.c Tue Feb 16 17:53:14 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: parse.c,v 1.33 2016/02/16 19:08:41 christos Exp $ */
+/* $NetBSD: parse.c,v 1.34 2016/02/16 22:53:14 christos Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)parse.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: parse.c,v 1.33 2016/02/16 19:08:41 christos Exp $");
+__RCSID("$NetBSD: parse.c,v 1.34 2016/02/16 22:53:14 christos Exp $");
#endif
#endif /* not lint && not SCCSID */
@@ -55,6 +55,7 @@ __RCSID("$NetBSD: parse.c,v 1.33 2016/02
* setty
*/
#include <stdlib.h>
+#include <string.h>
#include "el.h"
#include "parse.h"
Index: src/lib/libedit/read.c
diff -u src/lib/libedit/read.c:1.80 src/lib/libedit/read.c:1.81
--- src/lib/libedit/read.c:1.80 Tue Feb 16 10:53:48 2016
+++ src/lib/libedit/read.c Tue Feb 16 17:53:14 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: read.c,v 1.80 2016/02/16 15:53:48 christos Exp $ */
+/* $NetBSD: read.c,v 1.81 2016/02/16 22:53:14 christos Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)read.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: read.c,v 1.80 2016/02/16 15:53:48 christos Exp $");
+__RCSID("$NetBSD: read.c,v 1.81 2016/02/16 22:53:14 christos Exp $");
#endif
#endif /* not lint && not SCCSID */
@@ -45,11 +45,14 @@ __RCSID("$NetBSD: read.c,v 1.80 2016/02/
* read.c: Clean this junk up! This is horrible code.
* Terminal read functions
*/
+#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdlib.h>
+#include <string.h>
#include <limits.h>
+
#include "el.h"
#define OKCMD -1 /* must be -1! */
Index: src/lib/libedit/refresh.c
diff -u src/lib/libedit/refresh.c:1.42 src/lib/libedit/refresh.c:1.43
--- src/lib/libedit/refresh.c:1.42 Tue Feb 16 10:53:48 2016
+++ src/lib/libedit/refresh.c Tue Feb 16 17:53:14 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: refresh.c,v 1.42 2016/02/16 15:53:48 christos Exp $ */
+/* $NetBSD: refresh.c,v 1.43 2016/02/16 22:53:14 christos Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)refresh.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: refresh.c,v 1.42 2016/02/16 15:53:48 christos Exp $");
+__RCSID("$NetBSD: refresh.c,v 1.43 2016/02/16 22:53:14 christos Exp $");
#endif
#endif /* not lint && not SCCSID */
@@ -45,7 +45,6 @@ __RCSID("$NetBSD: refresh.c,v 1.42 2016/
* refresh.c: Lower level screen refreshing functions
*/
#include <stdio.h>
-#include <ctype.h>
#include <unistd.h>
#include <string.h>
Index: src/lib/libedit/search.c
diff -u src/lib/libedit/search.c:1.37 src/lib/libedit/search.c:1.38
--- src/lib/libedit/search.c:1.37 Tue Feb 16 14:08:41 2016
+++ src/lib/libedit/search.c Tue Feb 16 17:53:14 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: search.c,v 1.37 2016/02/16 19:08:41 christos Exp $ */
+/* $NetBSD: search.c,v 1.38 2016/02/16 22:53:14 christos Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)search.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: search.c,v 1.37 2016/02/16 19:08:41 christos Exp $");
+__RCSID("$NetBSD: search.c,v 1.38 2016/02/16 22:53:14 christos Exp $");
#endif
#endif /* not lint && not SCCSID */
@@ -45,6 +45,7 @@ __RCSID("$NetBSD: search.c,v 1.37 2016/0
* search.c: History and character search functions
*/
#include <stdlib.h>
+#include <string.h>
#if defined(REGEX)
#include <regex.h>
#elif defined(REGEXP)
Index: src/lib/libedit/tty.c
diff -u src/lib/libedit/tty.c:1.55 src/lib/libedit/tty.c:1.56
--- src/lib/libedit/tty.c:1.55 Tue Feb 16 14:08:41 2016
+++ src/lib/libedit/tty.c Tue Feb 16 17:53:14 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: tty.c,v 1.55 2016/02/16 19:08:41 christos Exp $ */
+/* $NetBSD: tty.c,v 1.56 2016/02/16 22:53:14 christos Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)tty.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: tty.c,v 1.55 2016/02/16 19:08:41 christos Exp $");
+__RCSID("$NetBSD: tty.c,v 1.56 2016/02/16 22:53:14 christos Exp $");
#endif
#endif /* not lint && not SCCSID */
@@ -49,6 +49,7 @@ __RCSID("$NetBSD: tty.c,v 1.55 2016/02/1
#include <unistd.h> /* for isatty */
#include <strings.h> /* for ffs */
#include <stdlib.h> /* for abort */
+#include <string.h>
#include "el.h"
#include "parse.h"
Index: src/lib/libedit/vi.c
diff -u src/lib/libedit/vi.c:1.52 src/lib/libedit/vi.c:1.53
--- src/lib/libedit/vi.c:1.52 Tue Feb 16 14:08:41 2016
+++ src/lib/libedit/vi.c Tue Feb 16 17:53:14 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: vi.c,v 1.52 2016/02/16 19:08:41 christos Exp $ */
+/* $NetBSD: vi.c,v 1.53 2016/02/16 22:53:14 christos Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -33,22 +33,24 @@
*/
#include "config.h"
-#include <stdlib.h>
-#include <unistd.h>
-#include <limits.h>
-#include <sys/wait.h>
-
#if !defined(lint) && !defined(SCCSID)
#if 0
static char sccsid[] = "@(#)vi.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: vi.c,v 1.52 2016/02/16 19:08:41 christos Exp $");
+__RCSID("$NetBSD: vi.c,v 1.53 2016/02/16 22:53:14 christos Exp $");
#endif
#endif /* not lint && not SCCSID */
/*
* vi.c: Vi mode commands.
*/
+#include <sys/wait.h>
+#include <ctype.h>
+#include <limits.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
#include "el.h"
#include "common.h"
#include "emacs.h"