summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bin/ed/buf.c9
-rw-r--r--bin/ed/cbc.c9
-rw-r--r--bin/ed/ed.h18
-rw-r--r--bin/ed/glbl.c9
-rw-r--r--bin/ed/io.c9
-rw-r--r--bin/ed/main.c16
-rw-r--r--bin/ed/re.c9
-rw-r--r--bin/ed/sub.c9
-rw-r--r--bin/ed/undo.c9
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 <sys/cdefs.h>
-#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 <sys/file.h>
#include <sys/stat.h>
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 <sys/cdefs.h>
-#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 <sys/types.h>
#include <ctype.h>
#include <errno.h>
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 <sys/param.h> /* for MAXPATHLEN */
#endif
#include <errno.h>
-#if defined(sun) || defined(__NetBSD__) || defined(__APPLE__)
-# include <limits.h>
-#endif
+#include <limits.h>
#include <regex.h>
#include <signal.h>
#include <stdio.h>
@@ -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 <sys/cdefs.h>
-#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 <sys/ioctl.h>
#include <sys/wait.h>
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 <sys/cdefs.h>
-#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 <sys/cdefs.h>
-#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 <ctype.h>
#include <setjmp.h>
#include <pwd.h>
+#include <bsd/stdlib.h>
#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 <sys/cdefs.h>
-#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 <stdarg.h>
#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 <sys/cdefs.h>
-#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 <sys/cdefs.h>
-#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"