5 if ((status = extract_addr_range ()) < 0 ||
6 (status = exec_command ()) < 0 ||
7 - status > 0 && (status = display_lines (
8 - current_addr, current_addr, status)) < 0)
9 + (status > 0 && (status = display_lines (
10 + current_addr, current_addr, status)) < 0))
18 if (o_n && appended && size && o_isbinary && o_newline_added)
19 fputs ("Newline inserted\n", stderr);
20 - else if (newline_added && (!appended || !isbinary && !o_isbinary))
21 + else if (newline_added && (!appended || (!isbinary && !o_isbinary)))
22 fputs ("Newline appended\n", stderr);
23 if (isbinary && newline_added && !appended)
29 - while (((c = getc (fp)) != EOF || !feof (fp) &&
30 - !ferror (fp)) && c != '\n')
31 + while (((c = getc (fp)) != EOF || (!feof (fp) &&
32 + !ferror (fp))) && c != '\n')
34 REALLOC (sbuf, sbufsz, i + 1, ERR);
36 --- ed-0.2.orig/main.c
47 program_name = argv[0];
48 red = (n = strlen (argv[0])) > 2 && argv[0][n - 3] == 'r';
51 reliable_signal (SIGQUIT, SIG_IGN);
52 reliable_signal (SIGINT, signal_int);
54 - if (status = sigsetjmp (env, 1))
55 + if ((status = sigsetjmp (env, 1)))
57 if (status = setjmp (env))
61 else if (build_active_list (c == 'g' || c == 'G') < 0)
63 - else if (n = (c == 'G' || c == 'V'))
64 + else if ((n = (c == 'G' || c == 'V')))
65 GET_COMMAND_SUFFIX ();
67 if (exec_global (n, gflag) < 0)
72 - if (n = dir ? INC_MOD (n, addr_last) : DEC_MOD (n, addr_last))
73 + if ((n = dir ? INC_MOD (n, addr_last) : DEC_MOD (n, addr_last)))
75 lp = get_addressed_line_node (n);
76 if ((s = get_sbuf_line (lp)) == NULL)
79 REALLOC (file, filesz, PATH_MAX + 1, NULL);
80 /* assert: no trailing escape */
81 - while (file[i++] = (*s == '\\') ? *++s : *s)
82 + while ((file[i++] = (*s == '\\') ? *++s : *s))
92 - if (n = regcomp (exp, exps, 0))
93 + if ((n = regcomp (exp, exps, 0)))
95 regerror (n, exp, errmsg, ERRSZ);
102 while ((n = get_tty_line ()) == 0 ||
103 - n > 0 && ibuf[n - 1] != '\n')
104 + (n > 0 && ibuf[n - 1] != '\n'))
112 - while (*txt && (!changed || (gflag & GSG) && rm[0].rm_eo) &&
113 + while (*txt && (!changed || ((gflag & GSG) && rm[0].rm_eo)) &&
114 !regexec (pat, txt, SE_MAX, rm, REG_NOTBOL));
116 REALLOC (rbuf, rbufsz, off + i + 2, ERR);
117 --- ed-0.2.orig/Makefile.in
118 +++ ed-0.2/Makefile.in
123 -ed: $(OBJECTS) libed.a
124 - $(CC) $(LDFLAGS) -o ed $(OBJECTS) libed.a $(LIBS)
126 + $(CC) $(LDFLAGS) -o ed $(OBJECTS) $(LIBS)
128 buf.o: ed.h config.h regex.h
129 ed.o: ed.h config.h regex.h
132 @@ -196,14 +196,14 @@
133 The last line in the buffer.
143 is a number in the range
150 and may be repeated with cumulative effect.
170 @@ -253,16 +253,16 @@
172 The first through last lines in the buffer. This is equivalent to
179 The current through last lines in the buffer. This is equivalent to
188 next line containing the regular expression
191 // repeats the last search.
197 previous line containing the regular expression
200 ?? repeats the last search.
206 line previously marked by a
214 Matches any single character.
219 Matches the single character regular expression or subexpression
220 immediately preceding it one or more times. So the regular expression
221 -`a+' is shorthand for `aa*'. If \e+ occurs at the beginning of a
222 +`a\e+' is shorthand for `aa*'. If \e+ occurs at the beginning of a
223 regular expression or subexpression, then it matches a literal `+'.
227 The current address is set to the last line read.
232 Edits the standard output of
236 The current address is set to the last line read.
242 to after the addressed line
243 the standard output of
245 suffix toggles the global suffix of the last substitution.
248 -suffix toggles the print suffix of the last substitution
249 +suffix toggles the print suffix of the last substitution.
250 The current address is set to the last line affected.
257 -.RI (1,$)w \ !command
258 +(1,$)w !\fIcommand\fR
259 Writes the addressed lines to the standard input of