summaryrefslogtreecommitdiffstats
path: root/bin/ed
diff options
context:
space:
mode:
authorrgrimes <rgrimes@FreeBSD.org>1995-05-30 00:07:29 +0000
committerrgrimes <rgrimes@FreeBSD.org>1995-05-30 00:07:29 +0000
commit188803394908f222ab3ed8ec32331eb6dd00fd2d (patch)
treeac48fd8c79dd9f0b338762a1129b83587ab3a39f /bin/ed
parent8737971a6da37e8fb1df8b8129813b45db5d6261 (diff)
downloadFreeBSD-src-188803394908f222ab3ed8ec32331eb6dd00fd2d.zip
FreeBSD-src-188803394908f222ab3ed8ec32331eb6dd00fd2d.tar.gz
Remove trailing whitespace.
Reviewed by: phk
Diffstat (limited to 'bin/ed')
-rw-r--r--bin/ed/buf.c4
-rw-r--r--bin/ed/glbl.c6
-rw-r--r--bin/ed/main.c30
-rw-r--r--bin/ed/re.c4
-rw-r--r--bin/ed/sub.c8
5 files changed, 26 insertions, 26 deletions
diff --git a/bin/ed/buf.c b/bin/ed/buf.c
index 98d0401..e14a65c 100644
--- a/bin/ed/buf.c
+++ b/bin/ed/buf.c
@@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id$
+ * $Id: buf.c,v 1.6 1994/09/24 02:55:22 davidg Exp $
*/
#ifndef lint
static char *rcsid = "@(#)buf.c,v 1.4 1994/02/01 00:34:35 alm Exp";
@@ -253,7 +253,7 @@ init_buffers()
{
int i = 0;
- /* Read stdin one character at a time to avoid i/o contention
+ /* Read stdin one character at a time to avoid i/o contention
with shell escapes invoked by nonterminal input, e.g.,
ed - <<EOF
!cat
diff --git a/bin/ed/glbl.c b/bin/ed/glbl.c
index 525411d..b9856c3 100644
--- a/bin/ed/glbl.c
+++ b/bin/ed/glbl.c
@@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: glbl.c,v 1.2 1994/09/24 02:55:26 davidg Exp $
+ * $Id: glbl.c,v 1.3 1995/03/19 13:28:27 joerg Exp $
*/
#ifndef lint
@@ -158,7 +158,7 @@ set_active_node(lp)
#if defined(sun) || defined(NO_REALLOC_NULL)
if (active_list != NULL) {
#endif
- if ((ts = (line_t **) realloc(active_list,
+ if ((ts = (line_t **) realloc(active_list,
(ti += MINBUFSZ) * sizeof(line_t **))) == NULL) {
fprintf(stderr, "%s\n", strerror(errno));
sprintf(errmsg, "out of memory");
@@ -167,7 +167,7 @@ set_active_node(lp)
}
#if defined(sun) || defined(NO_REALLOC_NULL)
} else {
- if ((ts = (line_t **) malloc((ti += MINBUFSZ) *
+ if ((ts = (line_t **) malloc((ti += MINBUFSZ) *
sizeof(line_t **))) == NULL) {
fprintf(stderr, "%s\n", strerror(errno));
sprintf(errmsg, "out of memory");
diff --git a/bin/ed/main.c b/bin/ed/main.c
index d43efad..01f30e5 100644
--- a/bin/ed/main.c
+++ b/bin/ed/main.c
@@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: main.c,v 1.3 1994/09/24 02:55:28 davidg Exp $
+ * $Id: main.c,v 1.4 1995/03/19 13:28:34 joerg Exp $
*/
#ifndef lint
@@ -42,7 +42,7 @@ static char *rcsid = "@(#)main.c,v 1.1 1994/02/01 00:34:42 alm Exp";
* CREDITS
*
* This program is based on the editor algorithm described in
- * Brian W. Kernighan and P. J. Plauger's book "Software Tools
+ * Brian W. Kernighan and P. J. Plauger's book "Software Tools
* in Pascal," Addison-Wesley, 1981.
*
* The buffering algorithm is attributed to Rodney Ruddock of
@@ -192,7 +192,7 @@ top:
fputs("?\n", stderr);
sprintf(errmsg, "warning: file modified");
if (!isatty(0)) {
- fprintf(stderr, garrulous ?
+ fprintf(stderr, garrulous ?
"script, line %d: %s\n" :
"", lineno, errmsg);
quit(2);
@@ -213,7 +213,7 @@ top:
isglobal = 0;
if ((status = extract_addr_range()) >= 0 &&
(status = exec_command()) >= 0)
- if (!status ||
+ if (!status ||
(status = display_lines(current_addr, current_addr,
status)) >= 0)
continue;
@@ -225,16 +225,16 @@ top:
fputs("?\n", stderr); /* give warning */
sprintf(errmsg, "warning: file modified");
if (!isatty(0)) {
- fprintf(stderr, garrulous ?
- "script, line %d: %s\n" :
+ fprintf(stderr, garrulous ?
+ "script, line %d: %s\n" :
"", lineno, errmsg);
quit(2);
}
break;
case FATAL:
if (!isatty(0))
- fprintf(stderr, garrulous ?
- "script, line %d: %s\n" : "",
+ fprintf(stderr, garrulous ?
+ "script, line %d: %s\n" : "",
lineno, errmsg);
else
fprintf(stderr, garrulous ? "%s\n" : "",
@@ -243,7 +243,7 @@ top:
default:
fputs("?\n", stderr);
if (!isatty(0)) {
- fprintf(stderr, garrulous ?
+ fprintf(stderr, garrulous ?
"script, line %d: %s\n" : "",
lineno, errmsg);
quit(2);
@@ -256,7 +256,7 @@ top:
long first_addr, second_addr, addr_cnt;
-/* extract_addr_range: get line addresses from the command buffer until an
+/* extract_addr_range: get line addresses from the command buffer until an
illegal address is seen; return status */
int
extract_addr_range()
@@ -548,7 +548,7 @@ exec_command()
GET_COMMAND_SUFFIX();
isglobal++;
if (exec_global(n, gflag) < 0)
- return ERR;
+ return ERR;
break;
case 'h':
if (addr_cnt > 0) {
@@ -691,7 +691,7 @@ exec_command()
sflags |= SGR;
ibufp++;
break;
- case '0': case '1': case '2': case '3': case '4':
+ case '0': case '1': case '2': case '3': case '4':
case '5': case '6': case '7': case '8': case '9':
STRTOL(sgnum, ibufp);
sflags |= SGF;
@@ -802,7 +802,7 @@ exec_command()
return ERR;
}
#endif
- if ((addr = write_file(*fnp ? fnp : old_filename,
+ if ((addr = write_file(*fnp ? fnp : old_filename,
(c == 'W') ? "a" : "w", first_addr, second_addr)) < 0)
return ERR;
else if (addr == addr_last)
@@ -888,7 +888,7 @@ check_addr_range(n, m)
}
-/* get_matching_node_addr: return the address of the next line matching a
+/* get_matching_node_addr: return the address of the next line matching a
pattern in a given direction. wrap around begin/end of editor buffer if
necessary */
long
@@ -1148,7 +1148,7 @@ move_lines(addr)
REQUE(b2, b1->q_forw);
REQUE(a1->q_back, a2);
REQUE(b1, a1);
- current_addr = addr + ((addr < first_addr) ?
+ current_addr = addr + ((addr < first_addr) ?
second_addr - first_addr + 1 : 0);
}
if (isglobal)
diff --git a/bin/ed/re.c b/bin/ed/re.c
index 805f59f..252e8f8 100644
--- a/bin/ed/re.c
+++ b/bin/ed/re.c
@@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: re.c,v 1.8 1994/09/24 02:55:29 davidg Exp $
+ * $Id: re.c,v 1.9 1995/03/19 13:28:36 joerg Exp $
*/
#ifndef lint
@@ -39,7 +39,7 @@ extern int patlock;
char errmsg[MAXPATHLEN + 40] = "";
-/* get_compiled_pattern: return pointer to compiled pattern from command
+/* get_compiled_pattern: return pointer to compiled pattern from command
buffer */
pattern_t *
get_compiled_pattern()
diff --git a/bin/ed/sub.c b/bin/ed/sub.c
index 904bc6a..c61c7e4 100644
--- a/bin/ed/sub.c
+++ b/bin/ed/sub.c
@@ -1,4 +1,4 @@
-/* sub.c: This file contains the substitution routines for the ed
+/* sub.c: This file contains the substitution routines for the ed
line editor */
/*-
* Copyright (c) 1993 Andrew Moore, Talke Studio.
@@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: sub.c,v 1.4 1995/01/14 11:47:16 alm Exp $
+ * $Id: sub.c,v 1.5 1995/03/19 13:28:38 joerg Exp $
*/
#ifndef lint
@@ -188,7 +188,7 @@ substitute_matching_text(pat, lp, gflag, kth)
if ((txt = get_sbuf_line(lp)) == NULL)
return ERR;
- if (isbinary)
+ if (isbinary)
NUL_TO_NEWLINE(txt, lp->len);
eot = txt + lp->len;
if (!regexec(pat, txt, SE_MAX, rm, 0)) {
@@ -213,7 +213,7 @@ substitute_matching_text(pat, lp, gflag, kth)
off += i;
}
txt += rm[0].rm_eo;
- } while (*txt &&
+ } while (*txt &&
(!changed || ((gflag & GSG) && rm[0].rm_eo)) &&
!regexec(pat, txt, SE_MAX, rm, REG_NOTBOL));
i = eot - txt;
OpenPOWER on IntegriCloud