From 9fbfdbc5316981cdd27525320c0fe3740e9d086f Mon Sep 17 00:00:00 2001 From: Kiyoshi Aman Date: Fri, 19 Jul 2019 20:24:05 -0500 Subject: bin/ed: make buildable with libbsd --- bin/ed/buf.c | 9 --------- bin/ed/cbc.c | 9 --------- bin/ed/ed.h | 18 ++++++------------ bin/ed/glbl.c | 9 --------- bin/ed/io.c | 9 --------- bin/ed/main.c | 16 +--------------- bin/ed/re.c | 9 --------- bin/ed/sub.c | 9 --------- bin/ed/undo.c | 9 --------- 9 files changed, 7 insertions(+), 90 deletions(-) diff --git a/bin/ed/buf.c b/bin/ed/buf.c index f824f75..73e0bed 100644 --- a/bin/ed/buf.c +++ b/bin/ed/buf.c @@ -28,15 +28,6 @@ * SUCH DAMAGE. */ -#include -#ifndef lint -#if 0 -static char *rcsid = "@(#)buf.c,v 1.4 1994/02/01 00:34:35 alm Exp"; -#else -__RCSID("$NetBSD: buf.c,v 1.27 2014/03/23 05:06:42 dholland Exp $"); -#endif -#endif /* not lint */ - #include #include diff --git a/bin/ed/cbc.c b/bin/ed/cbc.c index 7d20c6c..467a7a1 100644 --- a/bin/ed/cbc.c +++ b/bin/ed/cbc.c @@ -67,15 +67,6 @@ * from: @(#)bdes.c 5.5 (Berkeley) 6/27/91 */ -#include -#ifndef lint -#if 0 -static char *rcsid = "@(#)cbc.c,v 1.2 1994/02/01 00:34:36 alm Exp"; -#else -__RCSID("$NetBSD: cbc.c,v 1.25 2018/02/08 09:05:16 dholland Exp $"); -#endif -#endif /* not lint */ - #include #include #include diff --git a/bin/ed/ed.h b/bin/ed/ed.h index 4f397c4..3c84761 100644 --- a/bin/ed/ed.h +++ b/bin/ed/ed.h @@ -33,9 +33,7 @@ # include /* for MAXPATHLEN */ #endif #include -#if defined(sun) || defined(__NetBSD__) || defined(__APPLE__) -# include -#endif +#include #include #include #include @@ -53,11 +51,7 @@ #define MINBUFSZ 512 /* minimum buffer size - must be > 0 */ #define SE_MAX 30 /* max subexpressions in a regular expression */ -#ifdef INT_MAX -# define LINECHARS INT_MAX /* max chars per line */ -#else -# define LINECHARS MAXINT /* max chars per line */ -#endif +#define LINECHARS INT_MAX /* max chars per line */ /* gflags */ #define GLB 001 /* global command */ @@ -195,8 +189,8 @@ char *get_sbuf_line(line_t *); int get_shell_command(void); int get_stream_line(FILE *); int get_tty_line(void); -__dead void handle_hup(int); -__dead void handle_int(int); +void handle_hup(int); +void handle_int(int); void handle_winch(int); int has_trailing_escape(char *, char *); void init_buffers(void); @@ -215,7 +209,7 @@ int put_des_char(int, FILE *); char *put_sbuf_line(char *); int put_stream_line(FILE *, char *, int); int put_tty_line(char *, int, long, int); -__dead void quit(int); +void quit(int); long read_file(char *, long); long read_stream(FILE *, long); int search_and_replace(pattern_t *, int, int); @@ -229,7 +223,7 @@ void unmark_line_node(line_t *); void unset_active_nodes(line_t *, line_t *); long write_file(const char *, const char *, long, long); long write_stream(FILE *, long, long); -void seterrmsg(const char *, ...) __printflike(1, 2); +void seterrmsg(const char *, ...); /* global buffers */ extern char stdinbuf[]; diff --git a/bin/ed/glbl.c b/bin/ed/glbl.c index d79675d..b3bece5 100644 --- a/bin/ed/glbl.c +++ b/bin/ed/glbl.c @@ -28,15 +28,6 @@ * SUCH DAMAGE. */ -#include -#ifndef lint -#if 0 -static char *rcsid = "@(#)glob.c,v 1.1 1994/02/01 00:34:40 alm Exp"; -#else -__RCSID("$NetBSD: glbl.c,v 1.10 2019/01/04 19:13:58 maya Exp $"); -#endif -#endif /* not lint */ - #include #include diff --git a/bin/ed/io.c b/bin/ed/io.c index 7ef23b4..9a1a4bc 100644 --- a/bin/ed/io.c +++ b/bin/ed/io.c @@ -27,15 +27,6 @@ * SUCH DAMAGE. */ -#include -#ifndef lint -#if 0 -static char *rcsid = "@(#)io.c,v 1.1 1994/02/01 00:34:41 alm Exp"; -#else -__RCSID("$NetBSD: io.c,v 1.10 2014/03/23 05:06:42 dholland Exp $"); -#endif -#endif /* not lint */ - #include "ed.h" diff --git a/bin/ed/main.c b/bin/ed/main.c index f86148a..36d111b 100644 --- a/bin/ed/main.c +++ b/bin/ed/main.c @@ -28,21 +28,6 @@ * SUCH DAMAGE. */ -#include -#ifndef lint -__COPYRIGHT( -"@(#) Copyright (c) 1993 Andrew Moore, Talke Studio.\ - All rights reserved."); -#endif /* not lint */ - -#ifndef lint -#if 0 -static char *rcsid = "@(#)main.c,v 1.1 1994/02/01 00:34:42 alm Exp"; -#else -__RCSID("$NetBSD: main.c,v 1.30 2018/06/18 14:56:24 christos Exp $"); -#endif -#endif /* not lint */ - /* * CREDITS * @@ -65,6 +50,7 @@ __RCSID("$NetBSD: main.c,v 1.30 2018/06/18 14:56:24 christos Exp $"); #include #include #include +#include #include "ed.h" diff --git a/bin/ed/re.c b/bin/ed/re.c index bc4abc9..ed3cf9f 100644 --- a/bin/ed/re.c +++ b/bin/ed/re.c @@ -28,15 +28,6 @@ * SUCH DAMAGE. */ -#include -#ifndef lint -#if 0 -static char *rcsid = "@(#)re.c,v 1.6 1994/02/01 00:34:43 alm Exp"; -#else -__RCSID("$NetBSD: re.c,v 1.21 2014/03/23 05:06:42 dholland Exp $"); -#endif -#endif /* not lint */ - #include #include "ed.h" diff --git a/bin/ed/sub.c b/bin/ed/sub.c index 933c6b9..8374c08 100644 --- a/bin/ed/sub.c +++ b/bin/ed/sub.c @@ -28,15 +28,6 @@ * SUCH DAMAGE. */ -#include -#ifndef lint -#if 0 -static char *rcsid = "@(#)sub.c,v 1.1 1994/02/01 00:34:44 alm Exp"; -#else -__RCSID("$NetBSD: sub.c,v 1.7 2014/03/23 05:06:42 dholland Exp $"); -#endif -#endif /* not lint */ - #include "ed.h" diff --git a/bin/ed/undo.c b/bin/ed/undo.c index b17eac9..5dc3768 100644 --- a/bin/ed/undo.c +++ b/bin/ed/undo.c @@ -27,15 +27,6 @@ * SUCH DAMAGE. */ -#include -#ifndef lint -#if 0 -static char *rcsid = "@(#)undo.c,v 1.1 1994/02/01 00:34:44 alm Exp"; -#else -__RCSID("$NetBSD: undo.c,v 1.7 2019/01/04 19:13:58 maya Exp $"); -#endif -#endif /* not lint */ - #include "ed.h" -- cgit v1.2.3-60-g2f50