diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2015-10-09 19:47:03 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2015-10-09 19:47:03 +0000 |
commit | cc33c08f54534b4e7946341bf432536e2b8dcb53 (patch) | |
tree | fec5e40ae015d0d32b214278080239f94b87c125 /bin/ed/sub.c | |
parent | 8594b981c567f80885e46649303e812f14ea6b08 (diff) |
Mark static globals that are only used in their respective .c files.
Also make stdin unbuffered since that is the same as using a
single-byte buffer. OK tobias@
Diffstat (limited to 'bin/ed/sub.c')
-rw-r--r-- | bin/ed/sub.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/bin/ed/sub.c b/bin/ed/sub.c index 3e293d1cec9..18d5b701bb2 100644 --- a/bin/ed/sub.c +++ b/bin/ed/sub.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sub.c,v 1.12 2015/10/04 15:23:24 millert Exp $ */ +/* $OpenBSD: sub.c,v 1.13 2015/10/09 19:47:02 millert Exp $ */ /* $NetBSD: sub.c,v 1.4 1995/03/21 09:04:50 cgd Exp $ */ /* sub.c: This file contains the substitution routines for the ed @@ -32,9 +32,9 @@ #include "ed.h" -char *rhbuf; /* rhs substitution buffer */ -int rhbufsz; /* rhs substitution buffer size */ -int rhbufi; /* rhs substitution buffer index */ +static char *rhbuf; /* rhs substitution buffer */ +static int rhbufsz; /* rhs substitution buffer size */ +static int rhbufi; /* rhs substitution buffer index */ /* extract_subst_tail: extract substitution tail from the command buffer */ int @@ -105,8 +105,8 @@ extract_subst_template(void) } -char *rbuf; /* substitute_matching_text buffer */ -int rbufsz; /* substitute_matching_text buffer size */ +static char *rbuf; /* substitute_matching_text buffer */ +static int rbufsz; /* substitute_matching_text buffer size */ /* search_and_replace: for each line in a range, change text matching a pattern according to a substitution template; return status */ |