mirror of
git://git.sv.gnu.org/sed
synced 2026-11-21 01:43:22 +03:00
35b30b124c6f05fcfdd09a2dadabcfe570856c79
Under normal operation there is no need for explicit freeing, as all memory will be released when sed terminates. During development (and specifically, valgrind and address-sanitizing) enabling lint prevents false-positive warnings about memory leaks. Lint mode can be enabled with CFLAGS="-Dlint". It is also automatically enabled by default when building from git (as opposed to tarball). For consistency all instances of "#ifdef DEBUG_LEAKS" are replaced with "#ifdef lint". * sed/sed.h (struct subst): Add member variable to keep the address of allocated buffer in compile.c:setup_replacement(). (release_regex): Add declaration. (finish_program): Function now takes an argument: the sed program vector. * sed/sed.c (main): Adjust call to finish_program. * sed/compile.c (finish_program): Release program allocations. (setup_replacement): Remember the allocated buffer address. (compile_program): Free temporary array in 'y' command. * sed/execute.c (execute_program): Free allocated but unused buffer in 'R' command when reaching EOF. * sed/regexp.c (release_regex): Remove 'static', free the allocated dfa struct. * sed/utils.c (panic): Free open files linked-list elements.
This is the GNU implementation of sed, the Unix stream editor. GNU Sed website: https://www.gnu.org/software/sed/ See the NEWS file for a brief summary and the ChangeLog for more detailed descriptions of changes. If you obtained this file as part of a "git clone", then see the README-hacking file. If this file came to you as part of a tar archive, then see the file INSTALL for compilation and installation instructions. See the file BUGS for instructions about reporting bugs. See the files AUTHORS and THANKS for a list of authors and other contributors. After installation run 'sed --help' or 'man sed' for short usage information, and 'info sed' for the complete manual. The manual is also available on sed's website.
Description
SED (stream editor) - неинтерактивный текстовый редактор командной строки
https://www.gnu.org/software/sed/
3 MiB
0 Stars
1 Watchers
0 Forks
Languages
Shell
43%
C
26.4%
Perl
16.5%
sed
7.3%
Makefile
5.2%
Other
1.6%