./editors/ed, GNU version of line-oriented text editor

[ Image CVSweb ] [ Image Homepage ] [ Image RSS ] [ Image Required by ]


Branch: CURRENT, Version: 1.22.5, Package name: ed-1.22.5, Maintainer: drixter

This is the GNU version of ed(1).

ed is a line-oriented text editor. It is used to create, display,
modify and otherwise manipulate text files.

This also includes a restricted ed, which can only edit files in the
current directory and cannot execute shell commands.


Required to build:
[pkgtools/cwrappers]

Master sites: (Expand)

Filesize: 69.841 KB

Version history: (Expand)


CVS history: (Expand)


   2026-08-04 22:29:21 by Thomas Klausner | Files touched by this commit (336)
Log message:
*: add LDFLAGS overide that was previously in mk

This is a workaround and should be fixed properly per-package - they
should use the pkgsrc LDFLAGS, but this restores what happened
before the mk/ cleanup.

Fixes relro build for packages that do not honor LDFLAGS.

Package list provided by mef@, thanks!

Workaround commit requested by bsiegert on tech-pkg.
   2026-07-14 20:58:35 by Marcin Gondek | Files touched by this commit (3)
Log message:
ed: Update to 1.22.5

2026-02-06  Antonio Diaz Diaz  <antonio@gnu.org>

        * Version 1.22.5 released.
        * global.c (set_active_node): Use 'sizeof active_list[0]' instead of
          'sizeof (line_node **)'. (Reported by Mikel Olasagasti Uranga).
        * main.c: (may_access_filename): s/Is a directory/Invalid filename/.
          (Reported by Douglas McIlroy).

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 S-ren 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 S-ren 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- V-zquez P-rez).
        * 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.
   2022-01-21 03:27:05 by Wen Heping | Files touched by this commit (2)
Log message:
Update to 1.17

Upstream changes:
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).
        * main.c: 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.
   2021-10-26 12:21:45 by Nia Alarie | Files touched by this commit (160)
Log message:
editors: Replace RMD160 checksums with BLAKE2s checksums

All checksums have been double-checked against existing RMD160 and
SHA512 hashes
   2021-10-07 15:47:53 by Nia Alarie | Files touched by this commit (160)
Log message:
editors: Remove SHA1 hashes for distfiles
   2020-01-19 00:36:14 by Roland Illig | Files touched by this commit (3046)
Log message:
all: migrate several HOMEPAGEs to https

pkglint --only "https instead of http" -r -F

With manual adjustments afterwards since pkglint 19.4.4 fixed a few
indentations in unrelated lines.

This mainly affects projects hosted at SourceForce, as well as
freedesktop.org, CTAN and GNU.
   2017-01-12 12:20:02 by Thomas Klausner | Files touched by this commit (2)
Log message:
Updated ed to 1.14.1.

Changes in version 1.14:

Version 1.14 is the largest bug hunt ever attempted in GNU ed. Other
goals of version 1.14 are to complete the documentation and to remove
any gratuitous incompatibilities with the POSIX standard. Thanks to Ori
Avtalion for initiating all this with a couple bug reports. ;-)

Byte counts, informative messages, command error messages, and the '?'
and '!' prompts are now written to stdout instead of to stderr. The
standard error (stderr) is now used only for diagnostic messages.

The current address is now correctly set to the addressed line after an
empty insert command.

Fixed inconsistent behavior of the substitute command. It incorrectly
reported 'Invalid pattern delimiter' when the two last delimiters were
omitted after a null regular expression. Now it consistently reports
'Missing pattern delimiter' if the two last delimiters are omitted after
any regular expression (null or not).

's/a/%' has been fixed. It incorrectly replaced 'a' with '%' instead of
using the replacement from the last substitution.

An infinite loop, happening when EOF was found in the middle of a
replacement string, has been fixed.

Ed no longer accepts newlines in the replacement of a 's' command if it
is part of the command list of a global command, because in this case
the meaning of the newline becomes ambiguous. For the same reason, the
last delimiter can't be omitted if the 's' command is not the last
command in the command list.

The substitute command now correctly sets the current address to the
address of the last line on which a substitution occurred, and leaves it
unchanged if no substitution is performed.

A bug in the calculation of address offsets has been fixed. '3 ---- 2'
was calculated as address -2 instead of the correct address 1.

Address ranges with the first address omitted are now accepted.

The current address is now correctly set to the addressed line (or to
the new last line if at EOF) after an empty replacement text in the
change command.

Repeated print suffixes are now rejected. It has been documented that ed
allows any combination of non-repeated print suffixes and combines their
effects.

The substitute command now accepts suffixes in any order.

The 'repeat substitution' command now rejects multiple count suffixes.

The 'p' suffix of the 'repeat substitution' command now toggles all the
print suffixes of the last substitution.

End of file on standard input now behaves as a 'q' command.

The modified status is no longer cleared after writing the buffer to the
standard input of a shell command. (Reported by Jérôme Frgacic).

The descriptions of the 'a', 'c', 'e', 'g', 'i', 'j', 'k', 'm', 'q',
'r', 's', 'u' and 'w' commands in the manual have been fixed.

Most tests in the testsuite have been improved. Bug reporting has been
simplified; only the failed logs and results are kept in the test
directory, which can then be (tarred, compressed, and) attached to the
bug report.
   2016-03-05 15:43:14 by Benny Siegert | Files touched by this commit (2)
Log message:
Update GNU ed to 1.13.

2016-01-24  Antonio Diaz Diaz  <antonio@gnu.org>

        * Version 1.13 released.
        * buffer.c (put_sbuf_line): Fixed a memory leak.
        * io.c (read_file, write_file): Close file on error.
          (Both issues reported by Cédric Picard).