Module Name: src
Committed By: christos
Date: Mon Apr 18 17:01:19 UTC 2016
Modified Files:
src/lib/libedit: Makefile chared.c common.c el.h emacs.c keymacro.c
makelist map.c map.h read.c readline.c search.c terminal.c tty.c
vi.c
Added Files:
src/lib/libedit: editline.c historyn.c tokenizern.c
Log Message:
>From Ingo Schwarze:
* Replace fcns.c by a shorter and simpler func.h
and include it only in the one file needing it, map.c.
* Combine help.h and help.c into a simplified help.h
and include it only in the one file needing it, map.c.
* Check the very simple, static files editline.c, historyn.c, and
tokenizern.c into CVS rather than needlessly generating them.
* So we no longer autogenerate any C files. :-)
* Shorten and simplify makelist by deleting the options -n, -e, -bc,
and -m; the latter was unused and useless in the first place.
* Move the declaration of el_func_t from fcns.h to the header
actually needing it, map.h. Since that header is already
included by el.h for unrelated reasons, that makes el_func_t
just as globally available as before.
* No longer include the simplified fcns.h into el.h,
include it directly into the *.c files needing it.
To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.58 src/lib/libedit/Makefile
cvs rdiff -u -r1.53 -r1.54 src/lib/libedit/chared.c
cvs rdiff -u -r1.44 -r1.45 src/lib/libedit/common.c src/lib/libedit/search.c
cvs rdiff -u -r0 -r1.1 src/lib/libedit/editline.c src/lib/libedit/historyn.c \
src/lib/libedit/tokenizern.c
cvs rdiff -u -r1.36 -r1.37 src/lib/libedit/el.h
cvs rdiff -u -r1.34 -r1.35 src/lib/libedit/emacs.c
cvs rdiff -u -r1.20 -r1.21 src/lib/libedit/keymacro.c
cvs rdiff -u -r1.27 -r1.28 src/lib/libedit/makelist
cvs rdiff -u -r1.49 -r1.50 src/lib/libedit/map.c
cvs rdiff -u -r1.11 -r1.12 src/lib/libedit/map.h
cvs rdiff -u -r1.93 -r1.94 src/lib/libedit/read.c
cvs rdiff -u -r1.127 -r1.128 src/lib/libedit/readline.c
cvs rdiff -u -r1.29 -r1.30 src/lib/libedit/terminal.c
cvs rdiff -u -r1.63 -r1.64 src/lib/libedit/tty.c
cvs rdiff -u -r1.60 -r1.61 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/Makefile
diff -u src/lib/libedit/Makefile:1.57 src/lib/libedit/Makefile:1.58
--- src/lib/libedit/Makefile:1.57 Wed Mar 23 18:27:48 2016
+++ src/lib/libedit/Makefile Mon Apr 18 13:01:19 2016
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.57 2016/03/23 22:27:48 christos Exp $
+# $NetBSD: Makefile,v 1.58 2016/04/18 17:01:19 christos Exp $
# @(#)Makefile 8.1 (Berkeley) 6/4/93
USE_SHLIBDIR= yes
@@ -14,7 +14,7 @@ COPTS+= -Wunused-parameter
CWARNFLAGS.gcc+= -Wconversion
CWARNFLAGS.clang+= -Wno-cast-qual
-OSRCS= chared.c common.c el.c eln.c emacs.c fcns.c filecomplete.c help.c \
+OSRCS= chared.c common.c el.c eln.c emacs.c filecomplete.c \
hist.c keymacro.c map.c chartype.c \
parse.c prompt.c read.c refresh.c search.c sig.c terminal.c tty.c vi.c
@@ -31,22 +31,20 @@ MLINKS= editline.3 el_init.3 editline.3
editline.3 tok_line.3 editline.3 tok_str.3
# For speed and debugging
-#SRCS= ${OSRCS} readline.c tokenizer.c history.c
+#SRCS= ${OSRCS}
# For protection
-SRCS= editline.c readline.c tokenizer.c history.c
+SRCS= editline.c
-SRCS += tokenizern.c historyn.c
-CLEANFILES+=tokenizern.c.tmp tokenizern.c historyn.c.tmp historyn.c
+SRCS += history.c historyn.c tokenizer.c tokenizern.c readline.c
LIBEDITDIR?=${.CURDIR}
INCS= histedit.h
INCSDIR=/usr/include
-CLEANFILES+=editline.c
-CLEANFILES+=common.h.tmp editline.c.tmp emacs.h.tmp fcns.c.tmp fcns.h.tmp
-CLEANFILES+=help.c.tmp help.h.tmp vi.h.tmp tc1.o tc1
-CLEANFILES+=tokenizern.c.tmp tokenizern.c tokenizerw.c.tmp tokenizerw.c
+CLEANFILES+=common.h.tmp emacs.h.tmp fcns.h.tmp func.h.tmp
+CLEANFILES+=help.h.tmp vi.h.tmp tc1.o tc1 .depend
+
CPPFLAGS+=-I. -I${LIBEDITDIR}
CPPFLAGS+=-I. -I${.CURDIR}
#CPPFLAGS+=-DDEBUG_TTY -DDEBUG_KEY -DDEBUG_READ -DDEBUG -DDEBUG_REFRESH
@@ -55,11 +53,13 @@ CPPFLAGS+=-I. -I${.CURDIR}
AHDR=vi.h emacs.h common.h
ASRC=${LIBEDITDIR}/vi.c ${LIBEDITDIR}/emacs.c ${LIBEDITDIR}/common.c
-DPSRCS+= ${AHDR} fcns.h help.h fcns.c help.c
-CLEANFILES+= ${AHDR} fcns.h help.h fcns.c help.c
+DPSRCS+= ${AHDR} fcns.h func.h help.h
+CLEANFILES+= ${AHDR} fcns.h func.h help.h
SUBDIR= readline
+.depend: ${AHDR} fcns.h func.h help.h
+
vi.h: vi.c makelist Makefile
${_MKTARGET_CREATE}
${HOST_SH} ${LIBEDITDIR}/makelist -h ${LIBEDITDIR}/vi.c \
@@ -83,36 +83,16 @@ fcns.h: ${AHDR} makelist Makefile
${HOST_SH} ${LIBEDITDIR}/makelist -fh ${AHDR} > ${.TARGET}.tmp && \
mv ${.TARGET}.tmp ${.TARGET}
-fcns.c: ${AHDR} fcns.h help.h makelist Makefile
+func.h: ${AHDR} makelist Makefile
${_MKTARGET_CREATE}
${HOST_SH} ${LIBEDITDIR}/makelist -fc ${AHDR} > ${.TARGET}.tmp && \
mv ${.TARGET}.tmp ${.TARGET}
-help.c: ${ASRC} makelist Makefile
- ${_MKTARGET_CREATE}
- ${HOST_SH} ${LIBEDITDIR}/makelist -bc ${ASRC} > ${.TARGET}.tmp && \
- mv ${.TARGET}.tmp ${.TARGET}
-
help.h: ${ASRC} makelist Makefile
${_MKTARGET_CREATE}
${HOST_SH} ${LIBEDITDIR}/makelist -bh ${ASRC} > ${.TARGET}.tmp && \
mv ${.TARGET}.tmp ${.TARGET}
-editline.c: ${OSRCS} makelist Makefile
- ${_MKTARGET_CREATE}
- ${HOST_SH} ${LIBEDITDIR}/makelist -e ${OSRCS:T} > ${.TARGET}.tmp && \
- mv ${.TARGET}.tmp ${.TARGET}
-
-tokenizern.c: makelist Makefile
- ${_MKTARGET_CREATE}
- ${HOST_SH} ${LIBEDITDIR}/makelist -n tokenizer.c > ${.TARGET}.tmp && \
- mv ${.TARGET}.tmp ${.TARGET}
-
-historyn.c: makelist Makefile
- ${_MKTARGET_CREATE}
- ${HOST_SH} ${LIBEDITDIR}/makelist -n history.c > ${.TARGET}.tmp && \
- mv ${.TARGET}.tmp ${.TARGET}
-
tc1.o: ${LIBEDITDIR}/TEST/tc1.c
tc1: libedit.a tc1.o
Index: src/lib/libedit/chared.c
diff -u src/lib/libedit/chared.c:1.53 src/lib/libedit/chared.c:1.54
--- src/lib/libedit/chared.c:1.53 Mon Apr 11 14:56:31 2016
+++ src/lib/libedit/chared.c Mon Apr 18 13:01:19 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: chared.c,v 1.53 2016/04/11 18:56:31 christos Exp $ */
+/* $NetBSD: chared.c,v 1.54 2016/04/18 17:01:19 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.53 2016/04/11 18:56:31 christos Exp $");
+__RCSID("$NetBSD: chared.c,v 1.54 2016/04/18 17:01:19 christos Exp $");
#endif
#endif /* not lint && not SCCSID */
@@ -50,6 +50,7 @@ __RCSID("$NetBSD: chared.c,v 1.53 2016/0
#include "el.h"
#include "common.h"
+#include "fcns.h"
static void ch__clearmacro (EditLine *);
Index: src/lib/libedit/common.c
diff -u src/lib/libedit/common.c:1.44 src/lib/libedit/common.c:1.45
--- src/lib/libedit/common.c:1.44 Sun Apr 17 14:39:14 2016
+++ src/lib/libedit/common.c Mon Apr 18 13:01:19 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: common.c,v 1.44 2016/04/17 18:39:14 christos Exp $ */
+/* $NetBSD: common.c,v 1.45 2016/04/18 17:01:19 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.44 2016/04/17 18:39:14 christos Exp $");
+__RCSID("$NetBSD: common.c,v 1.45 2016/04/18 17:01:19 christos Exp $");
#endif
#endif /* not lint && not SCCSID */
@@ -49,6 +49,7 @@ __RCSID("$NetBSD: common.c,v 1.44 2016/0
#include "el.h"
#include "common.h"
+#include "fcns.h"
#include "parse.h"
#include "vi.h"
Index: src/lib/libedit/search.c
diff -u src/lib/libedit/search.c:1.44 src/lib/libedit/search.c:1.45
--- src/lib/libedit/search.c:1.44 Mon Apr 11 14:56:31 2016
+++ src/lib/libedit/search.c Mon Apr 18 13:01:19 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: search.c,v 1.44 2016/04/11 18:56:31 christos Exp $ */
+/* $NetBSD: search.c,v 1.45 2016/04/18 17:01:19 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.44 2016/04/11 18:56:31 christos Exp $");
+__RCSID("$NetBSD: search.c,v 1.45 2016/04/18 17:01:19 christos Exp $");
#endif
#endif /* not lint && not SCCSID */
@@ -54,6 +54,7 @@ __RCSID("$NetBSD: search.c,v 1.44 2016/0
#include "el.h"
#include "common.h"
+#include "fcns.h"
/*
* Adjust cursor in vi mode to include the character under it
Index: src/lib/libedit/el.h
diff -u src/lib/libedit/el.h:1.36 src/lib/libedit/el.h:1.37
--- src/lib/libedit/el.h:1.36 Sun Apr 10 20:50:13 2016
+++ src/lib/libedit/el.h Mon Apr 18 13:01:19 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: el.h,v 1.36 2016/04/11 00:50:13 christos Exp $ */
+/* $NetBSD: el.h,v 1.37 2016/04/18 17:01:19 christos Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -100,7 +100,6 @@ typedef struct el_state_t {
#include "chared.h"
#include "search.h"
#include "hist.h"
-#include "fcns.h" /* el_func_t is needed for map.h */
#include "map.h"
#include "sig.h"
#include "read.h"
Index: src/lib/libedit/emacs.c
diff -u src/lib/libedit/emacs.c:1.34 src/lib/libedit/emacs.c:1.35
--- src/lib/libedit/emacs.c:1.34 Sun Apr 10 20:50:13 2016
+++ src/lib/libedit/emacs.c Mon Apr 18 13:01:19 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: emacs.c,v 1.34 2016/04/11 00:50:13 christos Exp $ */
+/* $NetBSD: emacs.c,v 1.35 2016/04/18 17:01:19 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.34 2016/04/11 00:50:13 christos Exp $");
+__RCSID("$NetBSD: emacs.c,v 1.35 2016/04/18 17:01:19 christos Exp $");
#endif
#endif /* not lint && not SCCSID */
@@ -48,6 +48,7 @@ __RCSID("$NetBSD: emacs.c,v 1.34 2016/04
#include "el.h"
#include "emacs.h"
+#include "fcns.h"
/* em_delete_or_list():
* Delete character under cursor or list completions if at end of line
Index: src/lib/libedit/keymacro.c
diff -u src/lib/libedit/keymacro.c:1.20 src/lib/libedit/keymacro.c:1.21
--- src/lib/libedit/keymacro.c:1.20 Mon Apr 11 20:16:06 2016
+++ src/lib/libedit/keymacro.c Mon Apr 18 13:01:19 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: keymacro.c,v 1.20 2016/04/12 00:16:06 christos Exp $ */
+/* $NetBSD: keymacro.c,v 1.21 2016/04/18 17:01:19 christos Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)key.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: keymacro.c,v 1.20 2016/04/12 00:16:06 christos Exp $");
+__RCSID("$NetBSD: keymacro.c,v 1.21 2016/04/18 17:01:19 christos Exp $");
#endif
#endif /* not lint && not SCCSID */
@@ -67,6 +67,7 @@ __RCSID("$NetBSD: keymacro.c,v 1.20 2016
#include <string.h>
#include "el.h"
+#include "fcns.h"
/*
* The Nodes of the el->el_keymacro.map. The el->el_keymacro.map is a
Index: src/lib/libedit/makelist
diff -u src/lib/libedit/makelist:1.27 src/lib/libedit/makelist:1.28
--- src/lib/libedit/makelist:1.27 Mon Apr 11 14:56:31 2016
+++ src/lib/libedit/makelist Mon Apr 18 13:01:19 2016
@@ -1,5 +1,5 @@
#!/bin/sh -
-# $NetBSD: makelist,v 1.27 2016/04/11 18:56:31 christos Exp $
+# $NetBSD: makelist,v 1.28 2016/04/18 17:01:19 christos Exp $
#
# Copyright (c) 1992, 1993
# The Regents of the University of California. All rights reserved.
@@ -36,7 +36,7 @@
# makelist.sh: Automatically generate header files...
AWK=awk
-USAGE="Usage: $0 -n|-h|-e|-fc|-fh|-bc|-bh|-m <filenames>"
+USAGE="Usage: $0 -h|-fc|-fh|-bh <filenames>"
if [ "x$1" = "x" ]
then
@@ -51,16 +51,6 @@ FILES="$@"
case $FLAG in
-# generate foo.h file from foo.c
-#
--n)
- cat << _EOF
-#include "config.h"
-#define NARROWCHAR
-#include "${FILES}"
-_EOF
- ;;
-
-h)
set - `echo $FILES | sed -e 's/\\./_/g'`
hdr="_h_`basename $1`"
@@ -86,14 +76,12 @@ _EOF
}'
;;
-# generate help.c from various .c files
+# generate help.h from various .c files
#
--bc)
+-bh)
cat $FILES | $AWK '
BEGIN {
printf("/* Automatically generated file, do not edit */\n");
- printf("#include \"config.h\"\n#include \"el.h\"\n");
- printf("#include \"help.h\"\n");
printf("static const struct el_bindings_t el_func_help[] = {\n");
low = "abcdefghijklmnopqrstuvwxyz_";
high = "ABCDEFGHIJKLMNOPQRSTUVWXYZ_";
@@ -129,23 +117,9 @@ _EOF
}
END {
printf("};\n");
- printf("\nprotected const el_bindings_t* help__get(void)");
- printf("{ return el_func_help; }\n");
}'
;;
-# generate help.h from various .c files
-#
--bh)
- $AWK '
- BEGIN {
- printf("/* Automatically generated file, do not edit */\n");
- printf("#ifndef _h_help_c\n#define _h_help_c\n");
- printf("protected const el_bindings_t *help__get(void);\n");
- printf("#endif /* _h_help_c */\n");
- }' /dev/null
- ;;
-
# generate fcns.h from various .h files
#
-fh)
@@ -153,7 +127,6 @@ _EOF
sort | tr '[:lower:]' '[:upper:]' | $AWK '
BEGIN {
printf("/* Automatically generated file, do not edit */\n");
- printf("#ifndef _h_fcns_c\n#define _h_fcns_c\n");
count = 0;
}
{
@@ -161,23 +134,15 @@ _EOF
}
END {
printf("#define\t%-30.30s\t%3d\n", "EL_NUM_FCNS", count);
-
- printf("typedef el_action_t (*el_func_t)(EditLine *, wint_t);");
- printf("\nprotected const el_func_t* func__get(void);\n");
- printf("#endif /* _h_fcns_c */\n");
}'
;;
-# generate fcns.c from various .h files
+# generate func.h from various .h files
#
-fc)
cat $FILES | $AWK '/el_action_t/ { print $3 }' | sort | $AWK '
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("static const el_func_t el_func[] = {");
maxlen = 80;
needn = 1;
@@ -198,59 +163,6 @@ _EOF
}
END {
printf("\n};\n");
- printf("\nprotected const el_func_t* func__get(void) { return el_func; }\n");
- }'
- ;;
-
-# generate editline.c from various .c files
-#
--e)
- echo "$FILES" | tr ' ' '\012' | $AWK '
- BEGIN {
- printf("/* Automatically generated file, do not edit */\n");
- printf("#define protected static\n");
- printf("#define SCCSID\n");
- }
- {
- printf("#include \"%s\"\n", $1);
- }'
- ;;
-
-# generate man page fragment from various .c files
-#
--m)
- cat $FILES | $AWK '
- BEGIN {
- printf(".\\\" Section automatically generated with makelist\n");
- printf(".Bl -tag -width 4n\n");
- }
- /\(\):/ {
- pr = substr($2, 1, 2);
- if (pr == "vi" || pr == "em" || pr == "ed") {
- name = substr($2, 1, length($2) - 3);
- fname = "";
- for (i = 1; i <= length(name); i++) {
- s = substr(name, i, 1);
- if (s == "_")
- s = "-";
- fname = fname s;
- }
-
- printf(".It Ic %s\n", fname);
- ok = 1;
- }
- }
- /^ \*/ {
- if (ok) {
- for (i = 2; i < NF; i++)
- printf("%s ", $i);
- printf("%s.\n", $i);
- ok = 0;
- }
- }
- END {
- printf(".El\n");
- printf(".\\\" End of section automatically generated with makelist\n");
}'
;;
Index: src/lib/libedit/map.c
diff -u src/lib/libedit/map.c:1.49 src/lib/libedit/map.c:1.50
--- src/lib/libedit/map.c:1.49 Sun Apr 17 14:39:14 2016
+++ src/lib/libedit/map.c Mon Apr 18 13:01:19 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: map.c,v 1.49 2016/04/17 18:39:14 christos Exp $ */
+/* $NetBSD: map.c,v 1.50 2016/04/18 17:01:19 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.49 2016/04/17 18:39:14 christos Exp $");
+__RCSID("$NetBSD: map.c,v 1.50 2016/04/18 17:01:19 christos Exp $");
#endif
#endif /* not lint && not SCCSID */
@@ -49,6 +49,11 @@ __RCSID("$NetBSD: map.c,v 1.49 2016/04/1
#include <string.h>
#include "el.h"
+#include "common.h"
+#include "emacs.h"
+#include "vi.h"
+#include "fcns.h"
+#include "func.h"
#include "help.h"
#include "parse.h"
@@ -920,12 +925,12 @@ map_init(EditLine *el)
el->el_map.help = el_malloc(sizeof(*el->el_map.help) * EL_NUM_FCNS);
if (el->el_map.help == NULL)
return -1;
- (void) memcpy(el->el_map.help, help__get(),
+ (void) memcpy(el->el_map.help, el_func_help,
sizeof(*el->el_map.help) * EL_NUM_FCNS);
el->el_map.func = el_malloc(sizeof(*el->el_map.func) * EL_NUM_FCNS);
if (el->el_map.func == NULL)
return -1;
- memcpy(el->el_map.func, func__get(), sizeof(*el->el_map.func)
+ memcpy(el->el_map.func, el_func, sizeof(*el->el_map.func)
* EL_NUM_FCNS);
el->el_map.nfunc = EL_NUM_FCNS;
Index: src/lib/libedit/map.h
diff -u src/lib/libedit/map.h:1.11 src/lib/libedit/map.h:1.12
--- src/lib/libedit/map.h:1.11 Sun Apr 10 20:50:13 2016
+++ src/lib/libedit/map.h Mon Apr 18 13:01:19 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: map.h,v 1.11 2016/04/11 00:50:13 christos Exp $ */
+/* $NetBSD: map.h,v 1.12 2016/04/18 17:01:19 christos Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -40,13 +40,14 @@
#ifndef _h_el_map
#define _h_el_map
+typedef el_action_t (*el_func_t)(EditLine *, wint_t);
+
typedef struct el_bindings_t { /* for the "bind" shell command */
const wchar_t *name; /* function name for bind command */
int func; /* function numeric value */
const wchar_t *description; /* description of function */
} el_bindings_t;
-
typedef struct el_map_t {
el_action_t *alt; /* The current alternate key map */
el_action_t *key; /* The current normal key map */
Index: src/lib/libedit/read.c
diff -u src/lib/libedit/read.c:1.93 src/lib/libedit/read.c:1.94
--- src/lib/libedit/read.c:1.93 Tue Apr 12 07:15:46 2016
+++ src/lib/libedit/read.c Mon Apr 18 13:01:19 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: read.c,v 1.93 2016/04/12 11:15:46 christos Exp $ */
+/* $NetBSD: read.c,v 1.94 2016/04/18 17:01:19 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.93 2016/04/12 11:15:46 christos Exp $");
+__RCSID("$NetBSD: read.c,v 1.94 2016/04/18 17:01:19 christos Exp $");
#endif
#endif /* not lint && not SCCSID */
@@ -54,6 +54,7 @@ __RCSID("$NetBSD: read.c,v 1.93 2016/04/
#include <unistd.h>
#include "el.h"
+#include "fcns.h"
static int read__fixio(int, int);
static int read_char(EditLine *, wchar_t *);
Index: src/lib/libedit/readline.c
diff -u src/lib/libedit/readline.c:1.127 src/lib/libedit/readline.c:1.128
--- src/lib/libedit/readline.c:1.127 Wed Mar 23 18:27:48 2016
+++ src/lib/libedit/readline.c Mon Apr 18 13:01:19 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: readline.c,v 1.127 2016/03/23 22:27:48 christos Exp $ */
+/* $NetBSD: readline.c,v 1.128 2016/04/18 17:01:19 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.127 2016/03/23 22:27:48 christos Exp $");
+__RCSID("$NetBSD: readline.c,v 1.128 2016/04/18 17:01:19 christos Exp $");
#endif /* not lint && not SCCSID */
#include <sys/types.h>
@@ -52,6 +52,7 @@ __RCSID("$NetBSD: readline.c,v 1.127 201
#include "readline/readline.h"
#include "el.h"
+#include "fcns.h"
#include "filecomplete.h"
void rl_prep_terminal(int);
Index: src/lib/libedit/terminal.c
diff -u src/lib/libedit/terminal.c:1.29 src/lib/libedit/terminal.c:1.30
--- src/lib/libedit/terminal.c:1.29 Mon Apr 11 14:56:31 2016
+++ src/lib/libedit/terminal.c Mon Apr 18 13:01:19 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: terminal.c,v 1.29 2016/04/11 18:56:31 christos Exp $ */
+/* $NetBSD: terminal.c,v 1.30 2016/04/18 17:01:19 christos Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)term.c 8.2 (Berkeley) 4/30/95";
#else
-__RCSID("$NetBSD: terminal.c,v 1.29 2016/04/11 18:56:31 christos Exp $");
+__RCSID("$NetBSD: terminal.c,v 1.30 2016/04/18 17:01:19 christos Exp $");
#endif
#endif /* not lint && not SCCSID */
@@ -73,6 +73,7 @@ __RCSID("$NetBSD: terminal.c,v 1.29 2016
#endif
#include "el.h"
+#include "fcns.h"
/*
* IMPORTANT NOTE: these routines are allowed to look at the current screen
Index: src/lib/libedit/tty.c
diff -u src/lib/libedit/tty.c:1.63 src/lib/libedit/tty.c:1.64
--- src/lib/libedit/tty.c:1.63 Mon Apr 11 14:56:31 2016
+++ src/lib/libedit/tty.c Mon Apr 18 13:01:19 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: tty.c,v 1.63 2016/04/11 18:56:31 christos Exp $ */
+/* $NetBSD: tty.c,v 1.64 2016/04/18 17:01:19 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.63 2016/04/11 18:56:31 christos Exp $");
+__RCSID("$NetBSD: tty.c,v 1.64 2016/04/18 17:01:19 christos Exp $");
#endif
#endif /* not lint && not SCCSID */
@@ -52,6 +52,7 @@ __RCSID("$NetBSD: tty.c,v 1.63 2016/04/1
#include <unistd.h> /* for isatty */
#include "el.h"
+#include "fcns.h"
#include "parse.h"
typedef struct ttymodes_t {
Index: src/lib/libedit/vi.c
diff -u src/lib/libedit/vi.c:1.60 src/lib/libedit/vi.c:1.61
--- src/lib/libedit/vi.c:1.60 Mon Apr 11 14:56:31 2016
+++ src/lib/libedit/vi.c Mon Apr 18 13:01:19 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: vi.c,v 1.60 2016/04/11 18:56:31 christos Exp $ */
+/* $NetBSD: vi.c,v 1.61 2016/04/18 17:01:19 christos Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)vi.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: vi.c,v 1.60 2016/04/11 18:56:31 christos Exp $");
+__RCSID("$NetBSD: vi.c,v 1.61 2016/04/18 17:01:19 christos Exp $");
#endif
#endif /* not lint && not SCCSID */
@@ -54,6 +54,7 @@ __RCSID("$NetBSD: vi.c,v 1.60 2016/04/11
#include "el.h"
#include "common.h"
#include "emacs.h"
+#include "fcns.h"
#include "vi.h"
static el_action_t cv_action(EditLine *, wint_t);
Added files:
Index: src/lib/libedit/editline.c
diff -u /dev/null src/lib/libedit/editline.c:1.1
--- /dev/null Mon Apr 18 13:01:20 2016
+++ src/lib/libedit/editline.c Mon Apr 18 13:01:19 2016
@@ -0,0 +1,21 @@
+#define protected static
+#define SCCSID
+#include "chared.c"
+#include "common.c"
+#include "el.c"
+#include "eln.c"
+#include "emacs.c"
+#include "filecomplete.c"
+#include "hist.c"
+#include "keymacro.c"
+#include "map.c"
+#include "chartype.c"
+#include "parse.c"
+#include "prompt.c"
+#include "read.c"
+#include "refresh.c"
+#include "search.c"
+#include "sig.c"
+#include "terminal.c"
+#include "tty.c"
+#include "vi.c"
Index: src/lib/libedit/historyn.c
diff -u /dev/null src/lib/libedit/historyn.c:1.1
--- /dev/null Mon Apr 18 13:01:20 2016
+++ src/lib/libedit/historyn.c Mon Apr 18 13:01:19 2016
@@ -0,0 +1,3 @@
+#include "config.h"
+#define NARROWCHAR
+#include "history.c"
Index: src/lib/libedit/tokenizern.c
diff -u /dev/null src/lib/libedit/tokenizern.c:1.1
--- /dev/null Mon Apr 18 13:01:20 2016
+++ src/lib/libedit/tokenizern.c Mon Apr 18 13:01:19 2016
@@ -0,0 +1,3 @@
+#include "config.h"
+#define NARROWCHAR
+#include "tokenizer.c"