Module Name:    src
Committed By:   christos
Date:           Tue Feb 16 19:08:41 UTC 2016

Modified Files:
        src/lib/libedit: chared.c chared.h common.c el.c el.h emacs.c
            filecomplete.c makelist map.c parse.c readline.c search.c sig.c
            tty.c vi.c

Log Message:
more include file cleanup (Ingo Schwarze)


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/lib/libedit/chared.c
cvs rdiff -u -r1.25 -r1.26 src/lib/libedit/chared.h
cvs rdiff -u -r1.34 -r1.35 src/lib/libedit/common.c
cvs rdiff -u -r1.80 -r1.81 src/lib/libedit/el.c
cvs rdiff -u -r1.29 -r1.30 src/lib/libedit/el.h
cvs rdiff -u -r1.30 -r1.31 src/lib/libedit/emacs.c
cvs rdiff -u -r1.37 -r1.38 src/lib/libedit/filecomplete.c
cvs rdiff -u -r1.22 -r1.23 src/lib/libedit/makelist
cvs rdiff -u -r1.40 -r1.41 src/lib/libedit/map.c
cvs rdiff -u -r1.32 -r1.33 src/lib/libedit/parse.c
cvs rdiff -u -r1.123 -r1.124 src/lib/libedit/readline.c
cvs rdiff -u -r1.36 -r1.37 src/lib/libedit/search.c
cvs rdiff -u -r1.23 -r1.24 src/lib/libedit/sig.c
cvs rdiff -u -r1.54 -r1.55 src/lib/libedit/tty.c
cvs rdiff -u -r1.51 -r1.52 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.44 src/lib/libedit/chared.c:1.45
--- src/lib/libedit/chared.c:1.44	Tue Feb 16 10:53:48 2016
+++ src/lib/libedit/chared.c	Tue Feb 16 14:08:41 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: chared.c,v 1.44 2016/02/16 15:53:48 christos Exp $	*/
+/*	$NetBSD: chared.c,v 1.45 2016/02/16 19:08:41 christos Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)chared.c	8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: chared.c,v 1.44 2016/02/16 15:53:48 christos Exp $");
+__RCSID("$NetBSD: chared.c,v 1.45 2016/02/16 19:08:41 christos Exp $");
 #endif
 #endif /* not lint && not SCCSID */
 
@@ -45,7 +45,9 @@ __RCSID("$NetBSD: chared.c,v 1.44 2016/0
  * chared.c: Character editor utilities
  */
 #include <stdlib.h>
+
 #include "el.h"
+#include "common.h"
 
 private void ch__clearmacro (EditLine *);
 

Index: src/lib/libedit/chared.h
diff -u src/lib/libedit/chared.h:1.25 src/lib/libedit/chared.h:1.26
--- src/lib/libedit/chared.h:1.25	Tue Feb 16 10:53:48 2016
+++ src/lib/libedit/chared.h	Tue Feb 16 14:08:41 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: chared.h,v 1.25 2016/02/16 15:53:48 christos Exp $	*/
+/*	$NetBSD: chared.h,v 1.26 2016/02/16 19:08:41 christos Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -137,12 +137,6 @@ typedef struct el_chared_t {
 #define	MODE_REPLACE	1
 #define	MODE_REPLACE_1	2
 
-#include "common.h"
-#include "vi.h"
-#include "emacs.h"
-#include "search.h"
-#include "fcns.h"
-
 
 protected int	 cv__isword(wint_t);
 protected int	 cv__isWord(wint_t);

Index: src/lib/libedit/common.c
diff -u src/lib/libedit/common.c:1.34 src/lib/libedit/common.c:1.35
--- src/lib/libedit/common.c:1.34	Tue Feb 16 10:53:48 2016
+++ src/lib/libedit/common.c	Tue Feb 16 14:08:41 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: common.c,v 1.34 2016/02/16 15:53:48 christos Exp $	*/
+/*	$NetBSD: common.c,v 1.35 2016/02/16 19:08:41 christos Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)common.c	8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: common.c,v 1.34 2016/02/16 15:53:48 christos Exp $");
+__RCSID("$NetBSD: common.c,v 1.35 2016/02/16 19:08:41 christos Exp $");
 #endif
 #endif /* not lint && not SCCSID */
 
@@ -45,6 +45,9 @@ __RCSID("$NetBSD: common.c,v 1.34 2016/0
  * common.c: Common Editor functions
  */
 #include "el.h"
+#include "common.h"
+#include "parse.h"
+#include "vi.h"
 
 /* ed_end_of_file():
  *	Indicate end of file

Index: src/lib/libedit/el.c
diff -u src/lib/libedit/el.c:1.80 src/lib/libedit/el.c:1.81
--- src/lib/libedit/el.c:1.80	Tue Feb 16 10:53:48 2016
+++ src/lib/libedit/el.c	Tue Feb 16 14:08:41 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: el.c,v 1.80 2016/02/16 15:53:48 christos Exp $	*/
+/*	$NetBSD: el.c,v 1.81 2016/02/16 19:08:41 christos Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)el.c	8.2 (Berkeley) 1/3/94";
 #else
-__RCSID("$NetBSD: el.c,v 1.80 2016/02/16 15:53:48 christos Exp $");
+__RCSID("$NetBSD: el.c,v 1.81 2016/02/16 19:08:41 christos Exp $");
 #endif
 #endif /* not lint && not SCCSID */
 
@@ -56,6 +56,7 @@ __RCSID("$NetBSD: el.c,v 1.80 2016/02/16
 #endif
 
 #include "el.h"
+#include "parse.h"
 
 /* el_init():
  *	Initialize editline and set default parameters.

Index: src/lib/libedit/el.h
diff -u src/lib/libedit/el.h:1.29 src/lib/libedit/el.h:1.30
--- src/lib/libedit/el.h:1.29	Tue Feb 16 10:53:48 2016
+++ src/lib/libedit/el.h	Tue Feb 16 14:08:41 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: el.h,v 1.29 2016/02/16 15:53:48 christos Exp $	*/
+/*	$NetBSD: el.h,v 1.30 2016/02/16 19:08:41 christos Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -103,13 +103,11 @@ typedef struct el_state_t {
 #include "terminal.h"
 #include "refresh.h"
 #include "chared.h"
-#include "common.h"
 #include "search.h"
 #include "hist.h"
+#include "fcns.h"	/* el_func_t is needed for map.h */
 #include "map.h"
-#include "parse.h"
 #include "sig.h"
-#include "help.h"
 #include "read.h"
 
 struct editline {

Index: src/lib/libedit/emacs.c
diff -u src/lib/libedit/emacs.c:1.30 src/lib/libedit/emacs.c:1.31
--- src/lib/libedit/emacs.c:1.30	Tue Feb 16 10:53:48 2016
+++ src/lib/libedit/emacs.c	Tue Feb 16 14:08:41 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: emacs.c,v 1.30 2016/02/16 15:53:48 christos Exp $	*/
+/*	$NetBSD: emacs.c,v 1.31 2016/02/16 19:08:41 christos Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)emacs.c	8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: emacs.c,v 1.30 2016/02/16 15:53:48 christos Exp $");
+__RCSID("$NetBSD: emacs.c,v 1.31 2016/02/16 19:08:41 christos Exp $");
 #endif
 #endif /* not lint && not SCCSID */
 
@@ -45,6 +45,7 @@ __RCSID("$NetBSD: emacs.c,v 1.30 2016/02
  * emacs.c: Emacs functions
  */
 #include "el.h"
+#include "emacs.h"
 
 /* em_delete_or_list():
  *	Delete character under cursor or list completions if at end of line

Index: src/lib/libedit/filecomplete.c
diff -u src/lib/libedit/filecomplete.c:1.37 src/lib/libedit/filecomplete.c:1.38
--- src/lib/libedit/filecomplete.c:1.37	Tue Feb 16 10:53:48 2016
+++ src/lib/libedit/filecomplete.c	Tue Feb 16 14:08:41 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: filecomplete.c,v 1.37 2016/02/16 15:53:48 christos Exp $	*/
+/*	$NetBSD: filecomplete.c,v 1.38 2016/02/16 19:08:41 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.37 2016/02/16 15:53:48 christos Exp $");
+__RCSID("$NetBSD: filecomplete.c,v 1.38 2016/02/16 19:08:41 christos Exp $");
 #endif /* not lint && not SCCSID */
 
 #include <sys/types.h>
@@ -48,7 +48,6 @@ __RCSID("$NetBSD: filecomplete.c,v 1.37 
 #include <fcntl.h>
 
 #include "el.h"
-#include "fcns.h"		/* for EL_NUM_FCNS */
 #include "filecomplete.h"
 
 static const Char break_chars[] = { ' ', '\t', '\n', '"', '\\', '\'', '`', '@',

Index: src/lib/libedit/makelist
diff -u src/lib/libedit/makelist:1.22 src/lib/libedit/makelist:1.23
--- src/lib/libedit/makelist:1.22	Tue Feb 16 10:53:48 2016
+++ src/lib/libedit/makelist	Tue Feb 16 14:08:41 2016
@@ -1,5 +1,5 @@
 #!/bin/sh -
-#	$NetBSD: makelist,v 1.22 2016/02/16 15:53:48 christos Exp $
+#	$NetBSD: makelist,v 1.23 2016/02/16 19:08:41 christos Exp $
 #
 # Copyright (c) 1992, 1993
 #	The Regents of the University of California.  All rights reserved.
@@ -94,6 +94,7 @@ _EOF
 	BEGIN {
 	    printf("/* Automatically generated file, do not edit */\n");
 	    printf("#include \"config.h\"\n#include \"el.h\"\n");
+	    printf("#include \"help.h\"\n");
 	    printf("private const struct el_bindings_t el_func_help[] = {\n");
 	    low = "abcdefghijklmnopqrstuvwxyz_";
 	    high = "ABCDEFGHIJKLMNOPQRSTUVWXYZ_";
@@ -175,6 +176,9 @@ _EOF
 	BEGIN {
 	    printf("/* Automatically generated file, do not edit */\n");
 	    printf("#include \"config.h\"\n#include \"el.h\"\n");
+	    printf("#include \"common.h\"\n");
+	    printf("#include \"emacs.h\"\n");
+	    printf("#include \"vi.h\"\n");
 	    printf("private const el_func_t el_func[] = {");
 	    maxlen = 80;
 	    needn = 1;

Index: src/lib/libedit/map.c
diff -u src/lib/libedit/map.c:1.40 src/lib/libedit/map.c:1.41
--- src/lib/libedit/map.c:1.40	Tue Feb 16 10:53:48 2016
+++ src/lib/libedit/map.c	Tue Feb 16 14:08:41 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: map.c,v 1.40 2016/02/16 15:53:48 christos Exp $	*/
+/*	$NetBSD: map.c,v 1.41 2016/02/16 19:08:41 christos Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)map.c	8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: map.c,v 1.40 2016/02/16 15:53:48 christos Exp $");
+__RCSID("$NetBSD: map.c,v 1.41 2016/02/16 19:08:41 christos Exp $");
 #endif
 #endif /* not lint && not SCCSID */
 
@@ -45,7 +45,10 @@ __RCSID("$NetBSD: map.c,v 1.40 2016/02/1
  * map.c: Editor function definitions
  */
 #include <stdlib.h>
+
 #include "el.h"
+#include "help.h"
+#include "parse.h"
 
 private void	map_print_key(EditLine *, el_action_t *, const Char *);
 private void	map_print_some_keys(EditLine *, el_action_t *, wint_t, wint_t);

Index: src/lib/libedit/parse.c
diff -u src/lib/libedit/parse.c:1.32 src/lib/libedit/parse.c:1.33
--- src/lib/libedit/parse.c:1.32	Tue Feb 16 10:53:48 2016
+++ src/lib/libedit/parse.c	Tue Feb 16 14:08:41 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: parse.c,v 1.32 2016/02/16 15:53:48 christos Exp $	*/
+/*	$NetBSD: parse.c,v 1.33 2016/02/16 19:08:41 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.32 2016/02/16 15:53:48 christos Exp $");
+__RCSID("$NetBSD: parse.c,v 1.33 2016/02/16 19:08:41 christos Exp $");
 #endif
 #endif /* not lint && not SCCSID */
 
@@ -54,9 +54,11 @@ __RCSID("$NetBSD: parse.c,v 1.32 2016/02
  *	settc
  *	setty
  */
-#include "el.h"
 #include <stdlib.h>
 
+#include "el.h"
+#include "parse.h"
+
 private const struct {
 	const Char *name;
 	int (*func)(EditLine *, int, const Char **);

Index: src/lib/libedit/readline.c
diff -u src/lib/libedit/readline.c:1.123 src/lib/libedit/readline.c:1.124
--- src/lib/libedit/readline.c:1.123	Tue Feb 16 10:53:48 2016
+++ src/lib/libedit/readline.c	Tue Feb 16 14:08:41 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: readline.c,v 1.123 2016/02/16 15:53:48 christos Exp $	*/
+/*	$NetBSD: readline.c,v 1.124 2016/02/16 19:08:41 christos Exp $	*/
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include "config.h"
 #if !defined(lint) && !defined(SCCSID)
-__RCSID("$NetBSD: readline.c,v 1.123 2016/02/16 15:53:48 christos Exp $");
+__RCSID("$NetBSD: readline.c,v 1.124 2016/02/16 19:08:41 christos Exp $");
 #endif /* not lint && not SCCSID */
 
 #include <sys/types.h>
@@ -52,7 +52,6 @@ __RCSID("$NetBSD: readline.c,v 1.123 201
 
 #include "readline/readline.h"
 #include "el.h"
-#include "fcns.h"		/* for EL_NUM_FCNS */
 #include "filecomplete.h"
 
 void rl_prep_terminal(int);

Index: src/lib/libedit/search.c
diff -u src/lib/libedit/search.c:1.36 src/lib/libedit/search.c:1.37
--- src/lib/libedit/search.c:1.36	Tue Feb 16 10:53:48 2016
+++ src/lib/libedit/search.c	Tue Feb 16 14:08:41 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: search.c,v 1.36 2016/02/16 15:53:48 christos Exp $	*/
+/*	$NetBSD: search.c,v 1.37 2016/02/16 19:08:41 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.36 2016/02/16 15:53:48 christos Exp $");
+__RCSID("$NetBSD: search.c,v 1.37 2016/02/16 19:08:41 christos Exp $");
 #endif
 #endif /* not lint && not SCCSID */
 
@@ -50,7 +50,9 @@ __RCSID("$NetBSD: search.c,v 1.36 2016/0
 #elif defined(REGEXP)
 #include <regexp.h>
 #endif
+
 #include "el.h"
+#include "common.h"
 
 /*
  * Adjust cursor in vi mode to include the character under it

Index: src/lib/libedit/sig.c
diff -u src/lib/libedit/sig.c:1.23 src/lib/libedit/sig.c:1.24
--- src/lib/libedit/sig.c:1.23	Tue Feb 16 10:54:15 2016
+++ src/lib/libedit/sig.c	Tue Feb 16 14:08:41 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: sig.c,v 1.23 2016/02/16 15:54:15 christos Exp $	*/
+/*	$NetBSD: sig.c,v 1.24 2016/02/16 19:08:41 christos Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)sig.c	8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: sig.c,v 1.23 2016/02/16 15:54:15 christos Exp $");
+__RCSID("$NetBSD: sig.c,v 1.24 2016/02/16 19:08:41 christos Exp $");
 #endif
 #endif /* not lint && not SCCSID */
 
@@ -46,9 +46,11 @@ __RCSID("$NetBSD: sig.c,v 1.23 2016/02/1
  *	  our policy is to trap all signals, set a good state
  *	  and pass the ball to our caller.
  */
-#include "el.h"
-#include <stdlib.h>
 #include <errno.h>
+#include <stdlib.h>
+
+#include "el.h"
+#include "common.h"
 
 private EditLine *sel = NULL;
 

Index: src/lib/libedit/tty.c
diff -u src/lib/libedit/tty.c:1.54 src/lib/libedit/tty.c:1.55
--- src/lib/libedit/tty.c:1.54	Tue Feb 16 10:53:48 2016
+++ src/lib/libedit/tty.c	Tue Feb 16 14:08:41 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: tty.c,v 1.54 2016/02/16 15:53:48 christos Exp $	*/
+/*	$NetBSD: tty.c,v 1.55 2016/02/16 19:08:41 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.54 2016/02/16 15:53:48 christos Exp $");
+__RCSID("$NetBSD: tty.c,v 1.55 2016/02/16 19:08:41 christos Exp $");
 #endif
 #endif /* not lint && not SCCSID */
 
@@ -51,6 +51,7 @@ __RCSID("$NetBSD: tty.c,v 1.54 2016/02/1
 #include <stdlib.h>	/* for abort */
 
 #include "el.h"
+#include "parse.h"
 
 typedef struct ttymodes_t {
 	const char *m_name;

Index: src/lib/libedit/vi.c
diff -u src/lib/libedit/vi.c:1.51 src/lib/libedit/vi.c:1.52
--- src/lib/libedit/vi.c:1.51	Tue Feb 16 10:53:48 2016
+++ src/lib/libedit/vi.c	Tue Feb 16 14:08:41 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: vi.c,v 1.51 2016/02/16 15:53:48 christos Exp $	*/
+/*	$NetBSD: vi.c,v 1.52 2016/02/16 19:08:41 christos Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -42,7 +42,7 @@
 #if 0
 static char sccsid[] = "@(#)vi.c	8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: vi.c,v 1.51 2016/02/16 15:53:48 christos Exp $");
+__RCSID("$NetBSD: vi.c,v 1.52 2016/02/16 19:08:41 christos Exp $");
 #endif
 #endif /* not lint && not SCCSID */
 
@@ -50,6 +50,9 @@ __RCSID("$NetBSD: vi.c,v 1.51 2016/02/16
  * vi.c: Vi mode commands.
  */
 #include "el.h"
+#include "common.h"
+#include "emacs.h"
+#include "vi.h"
 
 private el_action_t	cv_action(EditLine *, wint_t);
 private el_action_t	cv_paste(EditLine *, wint_t);

Reply via email to