summaryrefslogtreecommitdiffstats
path: root/bin/ed
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2012-10-19 14:49:42 +0000
committered <ed@FreeBSD.org>2012-10-19 14:49:42 +0000
commitaf31e8843c2cc0ba388a33f341de8da1b50de433 (patch)
treeddffe542a2e921ec48c73d322a2046f559a9d74f /bin/ed
parentb1462253851ab8c1f6dde48bb7796b15d3f38253 (diff)
downloadFreeBSD-src-af31e8843c2cc0ba388a33f341de8da1b50de433.zip
FreeBSD-src-af31e8843c2cc0ba388a33f341de8da1b50de433.tar.gz
More -Wmissing-variable-declarations fixes.
In addition to adding `static' where possible: - bin/date: Move `retval' into extern.h to make it visible to date.c. - bin/ed: Move globally used variables into ed.h. - sbin/camcontrol: Move `verbose' into camcontrol.h and fix shadow warnings. - usr.bin/calendar: Remove unneeded variables. - usr.bin/chat: Make `line' local instead of global. - usr.bin/elfdump: Comment out unneeded function. - usr.bin/rlogin: Use _Noreturn instead of __dead2. - usr.bin/tset: Pull `Ospeed' into extern.h. - usr.sbin/mfiutil: Put global variables in mfiutil.h. - usr.sbin/pkg: Remove unused `os_corres'. - usr.sbin/quotaon, usr.sbin/repquota: Remove unused `qfname'.
Diffstat (limited to 'bin/ed')
-rw-r--r--bin/ed/buf.c3
-rw-r--r--bin/ed/ed.h6
-rw-r--r--bin/ed/io.c9
-rw-r--r--bin/ed/re.c3
4 files changed, 6 insertions, 15 deletions
diff --git a/bin/ed/buf.c b/bin/ed/buf.c
index 2f3559a..6d8a6ed 100644
--- a/bin/ed/buf.c
+++ b/bin/ed/buf.c
@@ -185,9 +185,6 @@ get_addressed_line_node(long n)
return lp;
}
-
-extern int newline_added;
-
static char sfn[15] = ""; /* scratch file name */
/* open_sbuf: open scratch file */
diff --git a/bin/ed/ed.h b/bin/ed/ed.h
index 2021232..8cb8cec 100644
--- a/bin/ed/ed.h
+++ b/bin/ed/ed.h
@@ -277,3 +277,9 @@ extern int lineno;
extern long second_addr;
extern long u_addr_last;
extern long u_current_addr;
+extern long rows;
+extern int cols;
+extern int newline_added;
+extern int des;
+extern int scripted;
+extern int patlock;
diff --git a/bin/ed/io.c b/bin/ed/io.c
index 29c5612..cf2e959 100644
--- a/bin/ed/io.c
+++ b/bin/ed/io.c
@@ -30,9 +30,6 @@ __FBSDID("$FreeBSD$");
#include "ed.h"
-
-extern int scripted;
-
/* read_file: read a named file/pipe into the buffer; return line count */
long
read_file(char *fn, long n)
@@ -58,9 +55,6 @@ read_file(char *fn, long n)
return current_addr - n;
}
-
-extern int des;
-
static char *sbuf; /* file i/o buffer */
static int sbufsz; /* file i/o buffer size */
int newline_added; /* if set, newline appended to input file */
@@ -298,9 +292,6 @@ get_tty_line(void)
#define ESCAPES "\a\b\f\n\r\t\v\\"
#define ESCCHARS "abfnrtv\\"
-extern int rows;
-extern int cols;
-
/* put_tty_line: print text to stdout */
int
put_tty_line(const char *s, int l, long n, int gflag)
diff --git a/bin/ed/re.c b/bin/ed/re.c
index f89ecf9..08a330d 100644
--- a/bin/ed/re.c
+++ b/bin/ed/re.c
@@ -31,9 +31,6 @@ __FBSDID("$FreeBSD$");
#include "ed.h"
-
-extern int patlock;
-
const char *errmsg = "";
/* get_compiled_pattern: return pointer to compiled pattern from command
OpenPOWER on IntegriCloud