From cc33c08f54534b4e7946341bf432536e2b8dcb53 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Fri, 9 Oct 2015 19:47:03 +0000 Subject: 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@ --- bin/ed/sub.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'bin/ed/sub.c') 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 */ -- cgit v1.2.3