summaryrefslogtreecommitdiffstats
path: root/bin/ed
diff options
context:
space:
mode:
authorjmallett <jmallett@FreeBSD.org>2002-06-20 05:28:02 +0000
committerjmallett <jmallett@FreeBSD.org>2002-06-20 05:28:02 +0000
commit368a18f96bfd614efb90acc5c4dfdfdbb8b0d530 (patch)
tree6c06a46f9f50fe0b9cd3be183adb7706270215cc /bin/ed
parent0c56b95c324d4cd1ff24935365b5c55175efce8e (diff)
downloadFreeBSD-src-368a18f96bfd614efb90acc5c4dfdfdbb8b0d530.zip
FreeBSD-src-368a18f96bfd614efb90acc5c4dfdfdbb8b0d530.tar.gz
We have a place for extern declarations of global variables in ed.h, do not
use main() to do it locally.
Diffstat (limited to 'bin/ed')
-rw-r--r--bin/ed/ed.h2
-rw-r--r--bin/ed/main.c3
2 files changed, 2 insertions, 3 deletions
diff --git a/bin/ed/ed.h b/bin/ed/ed.h
index 1a03bb1..aaa63f9 100644
--- a/bin/ed/ed.h
+++ b/bin/ed/ed.h
@@ -270,3 +270,5 @@ extern const char *errmsg;
extern long first_addr;
extern int lineno;
extern long second_addr;
+extern long u_addr_last;
+extern long u_current_addr;
diff --git a/bin/ed/main.c b/bin/ed/main.c
index 54a5a35..13e0b8a 100644
--- a/bin/ed/main.c
+++ b/bin/ed/main.c
@@ -449,9 +449,6 @@ long rows = 22; /* scroll length: ws_row - 2 */
int
exec_command(void)
{
- extern long u_current_addr;
- extern long u_addr_last;
-
static pattern_t *pat = NULL;
static int sgflag = 0;
static long sgnum = 0;
OpenPOWER on IntegriCloud