Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libedit more include file cleanup (Ingo Schwarze)



details:   https://anonhg.NetBSD.org/src/rev/fd36fc22d0ea
branches:  trunk
changeset: 813751:fd36fc22d0ea
user:      christos <christos%NetBSD.org@localhost>
date:      Tue Feb 16 19:08:41 2016 +0000

description:
more include file cleanup (Ingo Schwarze)

diffstat:

 lib/libedit/chared.c       |   6 ++++--
 lib/libedit/chared.h       |   8 +-------
 lib/libedit/common.c       |   7 +++++--
 lib/libedit/el.c           |   5 +++--
 lib/libedit/el.h           |   6 ++----
 lib/libedit/emacs.c        |   5 +++--
 lib/libedit/filecomplete.c |   5 ++---
 lib/libedit/makelist       |   6 +++++-
 lib/libedit/map.c          |   7 +++++--
 lib/libedit/parse.c        |   8 +++++---
 lib/libedit/readline.c     |   5 ++---
 lib/libedit/search.c       |   6 ++++--
 lib/libedit/sig.c          |  10 ++++++----
 lib/libedit/tty.c          |   5 +++--
 lib/libedit/vi.c           |   7 +++++--
 15 files changed, 55 insertions(+), 41 deletions(-)

diffs (truncated from 407 to 300 lines):

diff -r 4b7a92b827b8 -r fd36fc22d0ea lib/libedit/chared.c
--- a/lib/libedit/chared.c      Tue Feb 16 15:54:15 2016 +0000
+++ b/lib/libedit/chared.c      Tue Feb 16 19:08:41 2016 +0000
@@ -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 @@
  * chared.c: Character editor utilities
  */
 #include <stdlib.h>
+
 #include "el.h"
+#include "common.h"
 
 private void ch__clearmacro (EditLine *);
 
diff -r 4b7a92b827b8 -r fd36fc22d0ea lib/libedit/chared.h
--- a/lib/libedit/chared.h      Tue Feb 16 15:54:15 2016 +0000
+++ b/lib/libedit/chared.h      Tue Feb 16 19:08:41 2016 +0000
@@ -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 @@
 #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);
diff -r 4b7a92b827b8 -r fd36fc22d0ea lib/libedit/common.c
--- a/lib/libedit/common.c      Tue Feb 16 15:54:15 2016 +0000
+++ b/lib/libedit/common.c      Tue Feb 16 19:08:41 2016 +0000
@@ -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 @@
  * 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
diff -r 4b7a92b827b8 -r fd36fc22d0ea lib/libedit/el.c
--- a/lib/libedit/el.c  Tue Feb 16 15:54:15 2016 +0000
+++ b/lib/libedit/el.c  Tue Feb 16 19:08:41 2016 +0000
@@ -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 @@
 #endif
 
 #include "el.h"
+#include "parse.h"
 
 /* el_init():
  *     Initialize editline and set default parameters.
diff -r 4b7a92b827b8 -r fd36fc22d0ea lib/libedit/el.h
--- a/lib/libedit/el.h  Tue Feb 16 15:54:15 2016 +0000
+++ b/lib/libedit/el.h  Tue Feb 16 19:08:41 2016 +0000
@@ -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 @@
 #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 {
diff -r 4b7a92b827b8 -r fd36fc22d0ea lib/libedit/emacs.c
--- a/lib/libedit/emacs.c       Tue Feb 16 15:54:15 2016 +0000
+++ b/lib/libedit/emacs.c       Tue Feb 16 19:08:41 2016 +0000
@@ -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 @@
  * 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
diff -r 4b7a92b827b8 -r fd36fc22d0ea lib/libedit/filecomplete.c
--- a/lib/libedit/filecomplete.c        Tue Feb 16 15:54:15 2016 +0000
+++ b/lib/libedit/filecomplete.c        Tue Feb 16 19:08:41 2016 +0000
@@ -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 @@
 #include <fcntl.h>
 
 #include "el.h"
-#include "fcns.h"              /* for EL_NUM_FCNS */
 #include "filecomplete.h"
 
 static const Char break_chars[] = { ' ', '\t', '\n', '"', '\\', '\'', '`', '@',
diff -r 4b7a92b827b8 -r fd36fc22d0ea lib/libedit/makelist
--- a/lib/libedit/makelist      Tue Feb 16 15:54:15 2016 +0000
+++ b/lib/libedit/makelist      Tue Feb 16 19:08:41 2016 +0000
@@ -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 @@
        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 @@
        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;
diff -r 4b7a92b827b8 -r fd36fc22d0ea lib/libedit/map.c
--- a/lib/libedit/map.c Tue Feb 16 15:54:15 2016 +0000
+++ b/lib/libedit/map.c Tue Feb 16 19:08:41 2016 +0000
@@ -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 @@
  * 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);
diff -r 4b7a92b827b8 -r fd36fc22d0ea lib/libedit/parse.c
--- a/lib/libedit/parse.c       Tue Feb 16 15:54:15 2016 +0000
+++ b/lib/libedit/parse.c       Tue Feb 16 19:08:41 2016 +0000
@@ -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,8 +54,10 @@
  *     settc
  *     setty
  */
+#include <stdlib.h>
+
 #include "el.h"
-#include <stdlib.h>
+#include "parse.h"
 
 private const struct {
        const Char *name;
diff -r 4b7a92b827b8 -r fd36fc22d0ea lib/libedit/readline.c
--- a/lib/libedit/readline.c    Tue Feb 16 15:54:15 2016 +0000
+++ b/lib/libedit/readline.c    Tue Feb 16 19:08:41 2016 +0000
@@ -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 @@
 
 #include "readline/readline.h"
 #include "el.h"
-#include "fcns.h"              /* for EL_NUM_FCNS */
 #include "filecomplete.h"
 
 void rl_prep_terminal(int);
diff -r 4b7a92b827b8 -r fd36fc22d0ea lib/libedit/search.c
--- a/lib/libedit/search.c      Tue Feb 16 15:54:15 2016 +0000
+++ b/lib/libedit/search.c      Tue Feb 16 19:08:41 2016 +0000
@@ -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 $     */
 



Home | Main Index | Thread Index | Old Index