1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439
|
2026-01-03 Antonio Diaz Diaz <antonio@gnu.org>
* Version 1.22.4 released.
* check.sh: Skip check of ISO-8859-1 names on UTF-8-only systems.
(Reported by Michael Daniels and Alexander Jones).
2025-11-27 Antonio Diaz Diaz <antonio@gnu.org>
* Version 1.22.3 released.
* main.c: (show_help): Print "*Exit status*" for section in man page.
(may_access_filename): Reject only control chars 7-13, 27, 127.
* main_loop.c (get_shell_command): Revert to using 'printf'.
(Reported by Sren Tempel).
* check.sh: Check non-ASCII file names coded in ISO-8859-1 and UTF-8.
2025-08-18 Antonio Diaz Diaz <antonio@gnu.org>
* Version 1.22.2 released.
* main.c: (may_access_filename): Reject file names with newlines.
(print_filename): Rename to 'print_escaped'.
(print_escaped): Always check file name for control chars.
* main_loop.c (get_shell_command): Use 'print_escaped'.
2025-08-05 Antonio Diaz Diaz <antonio@gnu.org>
* Version 1.22.1 released.
* signal.c (set_signals): Ignore SIGPIPE. ('w !:' terminated ed).
(Reported by Sergei Trofimovich).
2025-07-20 Antonio Diaz Diaz <antonio@gnu.org>
* Version 1.22 released.
* main_loop.c (command_shell): Implement ex(1) style filter.
(Suggested by Shawn Wagner, Andrew L. Moore, and John Cowan).
* global.c, regex.c, signal.c: Remove unused headers.
(Reported by Alexander Jones).
2025-03-24 Antonio Diaz Diaz <antonio@gnu.org>
* Version 1.21.1 released.
* buffer.c: Remove unused <sys/file.h> and <sys/stat.h>.
(Reported by Michael Mikonos and Alexander Jones).
* signal.c (window_lines): Read initial size from LINES.
(Suggested by Artyom Bologov).
* Rename 'line_t' to 'line_node' and 'undo_t' to 'undo_atom'.
2025-01-05 Antonio Diaz Diaz <antonio@gnu.org>
* Version 1.21 released.
* io.c (read_file, write_file): Ignore exit status of shell command.
Bug introduced in version 1.6. (Reported by Andrew L. Moore).
* ed.h: Replace enum Bool with stdbool.h to fix compilation in C23.
(Reported by Alexander Jones).
* io.c (read_stream): Suppress 'Newline inserted/appended' with '-s'.
(Reported by Artyom Bologov).
* ed.texi: New chapter 'Syntax of command-line arguments'.
2024-04-22 Antonio Diaz Diaz <antonio@gnu.org>
* Version 1.20.2 released.
* main_loop.c (command_s): Fix g/x/s/x/x, which failed to skip the
final newline, printing lines twice. (Reported by Douglas McIlroy).
2024-02-14 Antonio Diaz Diaz <antonio@gnu.org>
* Version 1.20.1 released.
* io.c (write_file): Don't create missing intermediate directories.
2024-01-19 Antonio Diaz Diaz <antonio@gnu.org>
* Version 1.20 released.
* Implement options '+line', '+/RE', and '+?RE'.
(Suggested by Matthew Polk and John Cowan).
* New option '--unsafe-names'.
* main.c: (may_access_filename): Reject file names ending with a slash.
(print_filename): New function for file names with control chars.
* buffer.c (warned, set_warned): New functions.
* main_loop.c: Intervening cmds don't make a second 'e' or 'q' fail.
(get_filename): Add tilde expansion. (Suggested by John Cowan).
Warn on first modification of buffer loaded from read-only file.
(Suggested by Dan Jacobson).
* io.c (write_file): Create missing intermediate directories.
* ed.texi: Improve descriptions of commands 'e', 'f', 'q'.
* main.c, ed.texi: Improve description of exit status.
* configure, Makefile.in: New variable 'MAKEINFO'.
* INSTALL: Document use of CFLAGS+='--std=c99 -D_POSIX_C_SOURCE=2'.
2023-01-11 Antonio Diaz Diaz <antonio@gnu.org>
* Version 1.19 released.
* main_loop.c (exec_command): Fix commands 'e', 'E'; they did set
the 'modified' flag if file not found. (Reported by Harry Graf).
(main_loop): Print script error line to stdout instead of stderr.
* Change long name of option '-s' to '--script'.
(Suggested by Andrew L. Moore).
* Assign short name '-q' to options '--quiet' and '--silent'.
* main.c (show_strerror) Use '!quiet' to enable diagnostics.
* Do not process file names for backslash escapes.
(Suggested by Andrew L. Moore).
* ed.texi: Document 0 as starting point for searches '0;/RE/'.
Document how to achieve the effect of ex style '!' filtering.
2022-02-04 Antonio Diaz Diaz <antonio@gnu.org>
* Version 1.18 released.
* New option '--strip-trailing-cr'.
* main_loop.c (get_shell_command): Flush stdout after printing cmd.
(Reported by Sren Tempel).
Remove backslash from escaped '%'. (Reported by Martin Thomsen).
* signal.c (sighup_handler): Fix a memory leak just before exiting.
* carg_parser.c (ap_init): Likewise.
(Both reported by Xos Vzquez Prez).
* io.c (read_file, write_file): Check ptr returned by strip_escapes.
* main_loop.c (get_shell_command, exec_command): Likewise.
* main_loop.c, regex.c: Implement case-insensitive REs.
* regex.c (compile_regex): Don't overwrite previous regex if error.
* buffer.c (push_undo_atom): Fail if stack grows larger than INT_MAX.
(too_many_lines): Fail if buffer grows larger than INT_MAX lines.
* global.c (set_active_node): Fail if list grows larger than INT_MAX.
* signal.c (resize_buffer): Fail if a line grows longer than INT_MAX.
* io.c (read_file): Return -2 for fatal errors.
* main_loop.c (main_loop): Set error status if fatal error from main.
* main.c [restricted_]: New message "Directory access restricted".
* ed.texi: New chapter "The 's' Command".
* COPYING: Restored. (I forgot to do it in 1.11).
* TODO: Removed.
2021-01-06 Antonio Diaz Diaz <antonio@gnu.org>
* Version 1.17 released.
* main_loop.c (exec_global): Make commands 'q' and 'Q' work in a
global command. (Reported by J. A. Harris).
* New option '-E, --extended-regexp'. (Suggested by Shawn Wagner).
* io.c (read_stream_line, write_stream): Add filename parameter.
Print the file name in case of error. (Reported by Dan Jacobson).
* global.c: Integrate 'resize_line_buffer' into 'set_active_node'.
* buffer.c: Integrate 'resize_undo_buffer' into 'push_undo_atom'.
2020-02-20 Antonio Diaz Diaz <antonio@gnu.org>
* Version 1.16 released.
* regex.c (line_replace): Accept 's/^/#/g' as valid.
(Reported by Bjoern Wibben).
* main_loop.c: Remove length limit of prompt string.
(Reported by Tim Chase).
* main.c: Set a valid invocation_name even if argc == 0.
* ed.texi: Extended operators depend on regex implementation.
(Reported by Brian Zwahr).
* ed.texi: Several fixes and improvements.
2019-01-01 Antonio Diaz Diaz <antonio@gnu.org>
* Version 1.15 released.
* io.c (print_line): Make command 'l' print '\\' before every '$'
within the text. (Reported by Ori Avtalion).
* main_loop.c (extract_addresses): Fix address ',,' to mean '$,$'
instead of '1,$'. (Reported by Matthieu Felix).
* regex.c (extract_replacement): Allow newlines even if global.
* main_loop.c (exec_command): Make command 'c' reject address 0.
* ed.texi: Minor fixes.
* configure: Accept appending to CFLAGS; 'CFLAGS+=OPTIONS'.
2017-02-22 Antonio Diaz Diaz <antonio@gnu.org>
* Version 1.14.2 released.
* main.c (show_strerror) Revert to using '!scripted' instead of
'verbose' to enable diagnostics.
2017-01-10 Antonio Diaz Diaz <antonio@gnu.org>
* Version 1.14.1 released.
* Print counts, messages, '?' and '!' to stdout instead of stderr.
* buffer.c (append_lines): Fix current address after empty 'i'.
* regex.c (get_compiled_regex): Fix crash caused by invalid free
introduced in ed 1.14. (Reported by Hanno Bck).
(set_subst_regex): Treat missing delimiters consistently.
(extract_replacement): Don't replace 'a' with '%' in 's/a/%'.
Fix infinite loop with EOF in the middle of a replacement.
Don't accept newlines in replacement in a global command.
Last delimiter can't be omitted if not last in command list.
(search_and_replace): Set current address to last line modified.
* main_loop.c (extract_addresses): Fix address offsets;
'3 ---- 2' was calculated as -2 instead of 1.
Accept ranges with the first address omitted.
(exec_command): Fix current address after empty replacement text
in command 'c'.
Don't clear the modified status after writing the buffer to a
shell command. (Reported by Jrme Frgacic).
(get_command_suffix): Don't allow repeated print suffixes.
(command_s): Accept suffixes in any order.
Don't allow multiple count suffixes.
'sp' now toggles all print suffixes.
(main_loop): Make EOF on stdin behave as command 'q'.
* ed.texi: Fix the description of commands 'acegijkmqrsuw'.
Document that ed allows any combination of print suffixes.
* testsuite: Improve most tests. Simplify bug reporting.
* configure: Avoid warning on some shells when testing for gcc.
* Makefile.in: Detect the existence of install-info.
2016-01-24 Antonio Diaz Diaz <antonio@gnu.org>
* Version 1.13 released.
* buffer.c (put_sbuf_line): Fix a memory leak.
* io.c (read_file, write_file): Close file on error.
(Both issues reported by Cdric Picard).
2015-07-04 Antonio Diaz Diaz <antonio@gnu.org>
* Version 1.12 released.
* ed.texi: Remove extra spaces from some commands.
2015-03-30 Antonio Diaz Diaz <antonio@gnu.org>
* Version 1.11 released.
* main_loop.c (exec_command): Fix command 'z'.
(zN printed N + 1 lines).
* ed.texi: Document the window size used by the command 'z'.
* Makefile.in: New targets 'install*-compress'.
* Restore original copyright and license notices in the code. I
assigned to the FSF the copyright on changes made to the part of ed
already copyrighted by the FSF, which seems to be just the manual.
2014-01-22 Antonio Diaz Diaz <antonio@gnu.org>
* Version 1.10 released.
* ed.texinfo, fdl.texinfo: Rename to ed.texi, fdl.texi.
2013-06-18 Antonio Diaz Diaz <antonio@gnu.org>
* Version 1.9 released.
* check.sh: Don't feed shell scripts to ed.
* configure: Options now accept a separate argument.
2013-04-23 Antonio Diaz Diaz <antonio@gnu.org>
* Version 1.8 released.
* io.c (get_tty_line): Remove "double EOF" behavior.
2012-10-09 Antonio Diaz Diaz <ant_diaz@teleline.es>
* Version 1.7 released.
* main.c (main): Set invocation_name before calling show_error.
* Change quote characters in messages as advised by GNU Standards.
* ed.texinfo: Fix description of address offsets.
* ed.texinfo: Fix a link to the Bash manual.
* configure: Rename 'datadir' to 'datarootdir'.
* Makefile.in: New target 'install-bin'.
2012-01-01 Antonio Diaz Diaz <ant_diaz@teleline.es>
* Version 1.6 released.
* io.c (put_tty_line): Null characters where incorrectly shown by
the command 'l'. (Reported by Martin Guy).
* io.c (read_stream): Fix the condition deciding when to show the
message "Newline appended".
* main_loop.c (exec_command): The 'modified' flag is now set when
reading a non-empty file into an empty buffer.
* regex.c (translit_text): Fix typo that prevented using NUL
characters in regular expressions.
* main_loop.c (exec_command): Return ERR if 'system' can't create a
shell process.
* main_loop.c (main_loop): Flush stdout/stderr before reading a new
command.
* buffer.c (put_sbuf_line): Add size parameter.
* ed.1: Man page is now generated with 'help2man'.
* ed.1: All command-line options are now documented in the man page.
* Restore copyright notices of Andrew L. Moore. It seems Andrew
granted some permissions but never assigned copyright to the FSF.
2010-08-30 Antonio Diaz Diaz <ant_diaz@teleline.es>
* Version 1.5 released.
* buffer.c (append_lines): Fix commands 'a', 'c', and 'i'.
(When used in a global command list, the commands following them
in the list were ignored).
* main_loop.c (exec_command): Fix command 'e'.
(It quitted when invoked a second time with a modified buffer).
* New option '-r, --restricted'.
* 'red' has been converted to a script invoking 'ed --restricted'.
* Description of ed in the manual has been changed.
* testsuite: Modify some tests and remove obsolete POSIX tests.
* main_loop.c: Make variable 'ibufp' local to main_loop.
* Define type bool to make clear which functions and variables are
Boolean.
* Add 'const' to all pointer declarations accepting it.
* regex.c (replace_matching_text): Make se_max an enum.
* signal.c: Include termios.h.
* Convert C99 style comments '//' to C89 style comments '/* */'.
* ed.texinfo: Fix an erratum.
* Change copyright holder from Andrew, Antonio to the FSF.
(This change was later discovered to be wrong. See 1.6 and 1.11).
2009-07-10 Antonio Diaz Diaz <ant_diaz@teleline.es>
* Version 1.4 released.
* buffer.c, main_loop.c: Undo now restores the modified status.
* regex.c (search_and_replace):
Fix a race condition with user interrupt.
* signal.c: Add new functions 'resize_line_buffer' and
'resize_undo_buffer' to definitively fix the aliasing warnings.
* Some minor corrections have been made to the manual.
2009-05-24 Antonio Diaz Diaz <ant_diaz@teleline.es>
* Version 1.3 released.
* carg_parser.c (ap_resize_buffer): An aliasing related segfault
that only occurs when overoptimizing with GCC on some
architectures (alpha, sparc) has been (hopefully) fixed.
* signal.c (resize_buffer): Likewise.
2009-01-31 Antonio Diaz Diaz <ant_diaz@teleline.es>
* Version 1.2 released.
* configure: Locale has been fixed to 'C'.
* Makefile.in: Man page is now installed by default.
* 'make install-info' should now work on Debian and OS X.
* ed.texinfo: Update license to GFDL version 1.3 or later.
2008-10-14 Antonio Diaz Diaz <ant_diaz@teleline.es>
* Version 1.1 released.
* configure: Quote arguments stored in config.status.
2008-08-21 Antonio Diaz Diaz <ant_diaz@teleline.es>
* Version 1.0 released.
* configure: New option '--program-prefix'.
* signal.c (strip_escapes): Fix a buffer overflow.
* signal.c (resize_buffer): Fix a pointer aliasing warning.
2008-02-24 Antonio Diaz Diaz <ant_diaz@teleline.es>
* Version 0.9 released.
* signal.c (sighup_handler): Return 0 if no error.
* Arg_parser updated to 1.1.
2007-08-18 Antonio Diaz Diaz <ant_diaz@teleline.es>
* Version 0.8 released.
* check.sh: Exit unsuccesfully in case of error.
* ed.1: Fix some minor problems in the manual page.
* ed.texinfo: Add 21 kB of legalese (fdl.texinfo).
2007-07-18 Antonio Diaz Diaz <ant_diaz@teleline.es>
* Version 0.7 released.
* buffer.c (dec_addr): Return correct address when wrapping.
2007-06-29 Antonio Diaz Diaz <ant_diaz@teleline.es>
* Version 0.6 released.
* signal.c (sigwinch_handler, set_signal):
Fix two minor compatibility problems.
* main_loop.c (main_loop):
Fix an infinite loop when reading an empty script.
* Update license to GPL version 3 or later.
(This change was later discovered to be wrong. See 1.5 and 1.18).
2007-03-09 Antonio Diaz Diaz <ant_diaz@teleline.es>
* Version 0.5 released.
* main_loop.c (next_addr): '%' reimplemented as it was in ed 0.2.
2007-01-15 Antonio Diaz Diaz <ant_diaz@teleline.es>
* Version 0.4 released.
* Fix some minor problems in the testsuite.
2006-11-11 Antonio Diaz Diaz <ant_diaz@teleline.es>
* Version 0.3 released.
* buffer.c (open_sbuf): Fix symlink vulnerability using 'tmpfile'.
* signal.c: Fix signal handling for SIGINT.
* main_loop.c (exec_command): Modify commands 'c' and 'i' to treat
address 0 as a synonym for address 1, as per POSIX.
* The pause mode has been removed. (Suggested by Karl Berry).
* New option '-l, --loose-exit-status'. (Suggested by Karl Berry).
* New option '-v, --verbose'.
* carg_parser.c: New argument parser that replaces 'getopt_long'.
* 'configure' and 'Makefile.in' have been replaced.
* Remove recursive make for testsuite.
* Create directory 'doc'.
* Remove all pre ISO C89 code.
* Remove all global variables.
* ed.texinfo: Add the changes from Andrew and some mine.
Sun Jun 26 22:21:59 1994 Andrew L. Moore <alm@worm.talke.org>
* GNU ed 0.2 release.
* main.c (yank_lines): Added yank buffer.
A range of lines may be cut ('d') to or yanked ('y') from
a yank buffer. Lines in the buffer may be put ('x')
after the addressed line (. by default).
* main.c (display_lines): Page output of listed ('l') lines
if isatty(0).
* main.c (main): Replaced isatty(0) with is_regular_file().
Errors in piped scripts, as opposed to regular scripts or
here documents, do not force ed to exit.
* Capitilize error messages per the standard.
Wed Jun 22 01:06:11 1994 Andrew L. Moore <alm@woops.talke.org>
* ed.h: Generic definition of INT_MAX <bson@ai.mit.edu>
* signal.c: Added #ifndef SIG_ERR <assar@stacken.kth.se>
Tue Apr 19 10:52:51 1994 Andrew L. Moore <alm@woops.talke.org>
* Version 0.1. Initial release for GNU.
* main.c (exec_command): Add comment command '#'.
Mon Mar 21 21:58:11 PST 1994 Andrew L. Moore <alm@netcom.com>
* Use umask 077 to open buffer file.
Sat Mar 19 14:06:52 PST 1994 Andrew L. Moore <alm@netcom.com>
* Removed problematic DES and insque support.
Wed Jan 19 20:42:50 PST 1994 Andrew L. Moore <alm@netcom.com>
* Added reliable signal(2) for SysV.
Dec 1993 Franois Pinard <pinard@icule>
* GNUified ed.
Copyright (C) 1993 Franois Pinard
Copyright (C) 1994 Andrew L. Moore
Copyright (C) 2006-2026 Antonio Diaz Diaz.
This file is a collection of facts, and thus it is not copyrightable, but just
in case, you have unlimited permission to copy, distribute, and modify it.
|