10 Commits

Author SHA1 Message Date
Jim Meyering
03ec9a1080 maint: update copyright dates 2026-01-02 17:33:20 -08:00
Jim Meyering
d3456f4482 maint: update all copyright dates via "make update-copyright" 2025-01-03 09:56:57 -08:00
Jim Meyering
2037812a6d maint: update copyright dates 2024-01-05 08:44:01 -08:00
Jim Meyering
d81710cc8d maint: update copyright dates 2023-01-01 17:19:34 -08:00
Jim Meyering
0c8d88bc61 maint: make update-copyright 2022-01-01 15:00:18 -08:00
Assaf Gordon
71de42fd34 maint: update all copyright year number ranges
Run "make update-copyright" and then...
* gnulib: Update to latest with copyright year adjusted.
* bootstrap.conf (gnulib_modules): Remove getopt module, depracated in
https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=0abc38bd2a1398f0
* po/POTFILES.in: Remove getopt.c
* sed/utils.h (panic): Rename _GL_ATTRIBUTE_FORMAT_PRINTF to
_GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD following gnulib's change:
https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=387d654cabd7bc15
* tests/init.sh: Sync with gnulib to pick up copyright year.
* bootstrap: Likewise.
2021-01-05 17:02:10 -07:00
Jim Meyering
623f5cd2f9 maint: update all copyright year number ranges
Run "make update-copyright" and then...
* gnulib: Update to latest with copyright year adjusted.
* tests/init.sh: Sync with gnulib to pick up copyright year.
* bootstrap: Likewise.
2020-01-01 11:38:46 -08:00
Assaf Gordon
07df2c2e61 maint: update copyright dates for 2019
* all files: Run "make update-copyright".
2019-01-01 14:46:27 -07:00
Jim Meyering
1c0866b1d3 tests: avoid unnecessary dependency on Data::Dump
* testsuite/debug.pl: Don't use Data::Dump.  Unnecessary.
That package, perl-Data-Dump, appear not to be default-installed
on at least a Fedora 29 beta system.
2018-10-27 15:53:03 -07:00
Assaf Gordon
3ac640ce3b sed: add --debug feature
$ seq 3 | sed --debug -e 's/./--&--/ ; 2d'
    SED PROGRAM:
      s/./--&--/
      2 d
    INPUT:   'STDIN' line 1
    PATTERN: 1
    COMMAND: s/./--&--/
    MATCHED REGEX REGISTERS
      regex[0] = 0-1 '1'
    PATTERN: --1--
    COMMAND: 2 d
    END-OF-CYCLE:
    --1--
    INPUT:   'STDIN' line 2
    PATTERN: 2
    COMMAND: s/./--&--/
    MATCHED REGEX REGISTERS
      regex[0] = 0-1 '2'
    PATTERN: --2--
    COMMAND: 2 d
    END-OF-CYCLE:
    INPUT:   'STDIN' line 3
    PATTERN: 3
    COMMAND: s/./--&--/
    MATCHED REGEX REGISTERS
      regex[0] = 0-1 '3'
    PATTERN: --3--
    COMMAND: 2 d
    END-OF-CYCLE:
    --3--

Discussed in https://lists.gnu.org/r/sed-devel/2018-07/msg00006.html
and https://lists.gnu.org/r/sed-devel/2018-10/msg00007.html .

* NEWS: Mention new option.
* doc/sed.texi (Program options): Mention new option.
* sed/debug.c: New unit with debug printing functions.
* sed/sed.h (debug_print_command, debug_print_char, debug_print_program,
debug): Declare functions and global variable.
(struct sed_cmd): Add label_name member variable.
* sed/compile.c (compile_program): Save the label's name.
(cleanup_program_filenames): extracted function to free filenames.
(check_final_program) Don't delete the filenames, instead move it to ...
(finish_program) ... here.
* sed/execute.c (debug_print_end_of_cycle, debug_print_input,
debug_print_line): New debug functions (cannot be defined in debug.c as
execute's structures are private).
(execute_program, process_files): Call debug functions.
* sed/sed.c: (DEBUG_OPTION): New option for getoptlong.
(debug): New global variable.
(usage): Mention new option.
(main): Process new option and call debug functions if needed.
* testsuite/debug.pl: New tests.
* testsuite/local.mk (T): Add new tests.
2018-10-24 14:00:23 -06:00