48 Commits

Author SHA1 Message Date
Jim Meyering
bbc1bdb771 maint: update copyright dates 2026-01-02 16:52:26 -08:00
Paul Eggert
096a3b29b5 maint: remove po/en.po
* po/en.po: Remove.  It wasn’t being used, and we’re now doing its
intent in a less-hassly way.
2025-09-09 10:23:01 -07:00
Jim Meyering
d65b41664a maint: update all copyright dates via "make update-copyright" 2025-01-03 09:47:07 -08:00
Jim Meyering
6c88db1f7b maint: make update-copyright 2024-01-05 09:01:59 -08:00
Paul Eggert
e016d12581 diff: improve symlink handling, avoiding a race
* bootstrap.conf (gnulib_modules): Add c-file-type
and remove file-type.
* po/POTFILES.in: Add lib/c-file-type.c, remove lib/file-type.c
* src/diff.c (O_PATH_DEFINED): New constant.
(detype_from_mode): Remove; no longer used.
(dir_p): Go back to the old way of using S_ISDIR.
(compare_prepped_files): Use filetype and stat macros, not detype.
Pass symlink fd and "" to careadlinkat if available, as that
avoids a race.  Test for dir vs file earlier, so that a missing
file is treated consistently with dir/file vs file.
(compare_files): New arg DETYPE replacing the old DETYPE0 and DETYPE1.
All uses changed.  st_size for nonexistent files is 0, not -1.
Set up .filetype, not .detype, as .filetype is finer-grained.
Open symlinks with O_PATH on GNU/Linux, since we can then
use readlinkat on the resulting file descriptor and this
avoids a race.
* src/diff.h (struct file_data): Remove detype member.
Add filetype member; it’s finer-grained.  All uses changed.
* tests/no-dereference: Add test that the previous commit failed.
2023-08-14 00:24:02 -07:00
Paul Eggert
69ae797392 cmp,diff,diff3,sdiff: quote more consistently
* lib/diagnose.c, lib/diagnose.h: New files.
* lib/Makefile.am (noinst_HEADERS, libdiffutils_a_SOURCES):
Add them.
* po/POTFILES.in: Add lib/diagnose.c.
* src/analyze.c, src/cmp.c, src/diff3.c, src/dir.c:
* src/sdiff.c, src/util.c:
Include diagnose.h.
* src/analyze.c (briefly_report, diff_2_files):
* src/cmp.c (usage, main, cmp):
* src/diff.c (add_regexp, summarize_regexp_list, main, compare_files):
* src/diff3.c (usage, process_diff, scan_diff_line):
* src/dir.c (diff_dirs):
* src/sdiff.c (usage, ck_fopen, main, edit):
* src/util.c (perror_with_name, begin_output):
Quote file names or regexps with squote.
* src/cmp.c, src/diff.c, src/diff3.c, src/dir.c, src/sdiff.c:
Include quote.h.
* src/cmp.c, src/diff.c, src/diff3.c, src/sdiff.c (try_help):
Remove; now in diagnose.c.
* src/cmp.c (specify_ignore_initial, main, cmp):
* src/diff.c (main, specify_value, specify_colors_style):
* src/diff3.c (main, read_diff):
* src/dir.c (compare_collated):
* src/sdiff.c (check_child_status, main):
* src/util.c (finish_output):
Quote strings with ‘quote’ or ‘quote_n’.
* src/system.h (EXIT_TROUBLE): Remove; now in diagnose.h
and now an enum.
* src/util.c (c_escape_char, c_escape):
Remove, as we now use squote.
* tests/cmp, tests/filename-quoting, tests/invalid-re:
Adjust to match new behavior.
2023-08-08 17:00:19 -07:00
Paul Eggert
615502de3f maint: translate openat-die.c
* po/POTFILES.in: Re-add lib/openat-die.c.
2023-07-25 13:04:17 -07:00
Paul Eggert
753302982b maint: convert source from non-UTF-8
* po/en.po: Convert from Latin-1 to UTF-8.
This was the only remaining file under Git control
that still used an encoding other than UTF-8.
2023-07-18 20:07:13 -07:00
Jim Meyering
5aa5a1cc9b maint: avoid syntax-check failure
* po/POTFILES.in: Remove openat-die.c.
It is no longer used.  Reported by Bruno Haible in
https://lists.gnu.org/r/diffutils-devel/2023-07/msg00018.html
2023-07-18 16:58:08 -07:00
Paul Eggert
df12b2c41c maint: translate lib/openat-die.c
* po/POTFILES.in: Add lib/openat-die.c.
2023-07-17 15:34:05 -07:00
Jim Meyering
47a1f46f08 maint: update copyright dates 2023-01-01 17:19:37 -08:00
Jim Meyering
aec523d3a4 maint: make update-copyright 2022-01-03 11:49:11 -08:00
Jim Meyering
22fb055cca 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.
2021-01-01 17:37:49 -08:00
Jim Meyering
351f87d0c4 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 09:33:03 -08:00
Jim Meyering
a7808608fc maint: avoid syntax-check failure
* po/POTFILES.in: Add argmatch.h; remove xstrtol-error.c
2019-12-29 08:58:09 -08:00
Jim Meyering
0c8f1ff314 build: update gnulib to latest
* gnulib: Update to latest.
* po/POTFILES.in: Add lib/xstdopen.c.
2019-01-20 22:28:39 -08:00
Jim Meyering
197d7d492f maint: update all copyright dates via "make update-copyright"
* gnulib: Also update submodule for its copyright updates.
2019-01-01 19:02:28 -08:00
Jim Meyering
4a38f715f1 maint: update gnulib and copyright dates for 2018
* gnulib: Update to latest.
* all files: Run "make update-copyright".
* bootstrap: Update from gnulib.
2018-01-06 16:51:19 -08:00
Jim Meyering
90106d33ab maint: update gnulib and copyright dates for 2017
* gnulib: Update to latest.
* all files: Run "make update-copyright".
2017-01-01 03:22:44 -08:00
Jim Meyering
7346a03010 maint: update copyright year, bootstrap, init.sh
Run "make update-copyright" and then...

* gnulib: Update to latest.
* tests/init.sh: Update from gnulib.
* bootstrap: Likewise.
2016-01-01 18:00:08 -08:00
Giuseppe Scrivano
04f6d57177 diff: add --palette
* bootstrap (gnulib_modules): Add 'argmatch'.
* doc/diffutils.texi: Add documentation for --palette
* src/diff.h (set_color_palette): New prototype.
* src/diff.c (set_color_palette): New function.
(color_palette): New variable.
* src/utils.c: Include "argmatch.h".
(struct bin_str): New struct.
(struct color_ext_type): New struct.
(color_indicator): New array.
(indicator_name): New array.
(indicator_no): New enum.
(parse_state): New enum.
(put_indicator): New function.
(get_funky_string): New function. Copied from coreutils ls.
(parse_diff_color):  New function. Copied from coreutils ls
"parse_ls_color" function.
(set_color_context): Use put_indicator instead of directly
outputting the sequence.
* po/POTFILES.in: Add 'lib/argmatch.c'
2015-11-29 08:20:53 -08:00
Jim Meyering
29e8de4885 maint: update copyright year ranges to include 2015; update gnulib 2015-01-01 22:31:27 -08:00
Jim Meyering
a0483cb2fc maint: update all copyright year number ranges
Run "make update-copyright".
2013-01-04 11:13:02 +01:00
Paul Eggert
62ca21c8c1 maint: quote 'like this' or "like this", not `like this'
This is in response to a recent change in the GNU coding standards,
which now suggest quoting 'like this' or "like this", instead of
`like this' or ``like this''.
* HACKING, NEWS, README, README-hacking, TODO, doc/diagmeet.note:
* doc/diffutils.texi, ms/config.bat, ms/config.site:
* src/analyze.c, src/cmp.c, src/context.c, src/diff.c:
* src/diff.h, src/diff3.c, src/dir.c, src/ifdef.c, src/io.c:
* src/sdiff.c, src/side.c, src/system.h, src/util.c:
* tests/help-version:
Quote 'like this' or "like this" in commentary.
* cfg.mk (old_NEWS_hash): Adjust to reflect new NEWS quoting.
* man/help2man: Update to 1.40.4 version, with quoting fixed as above.
* po/en.po: Remove translation involving `, as it's no longer needed.
* src/cmp.c (try_help, specify_ignore_initial, usage, main):
* src/diff.c (main, try_help, option_help_msgid, specify_value)
(compare_files):
* src/diff3.c (main, try_help, option_help_msgid, usage)
(read_diff):
* src/dir.c (compare_names):
* src/sdiff.c (try_help, usage, check_child_status, main):
* src/util.c (finish_output):
* tests/help-version:
Quote 'like this' in output.
2012-01-25 23:54:38 -08:00
Jim Meyering
45110a7927 maint: update all copyright year number ranges
Run "make update-copyright".
2012-01-01 09:32:41 +01:00
Jim Meyering
ce5367b6b3 maint: update copyright year ranges to include 2011
Run "make update-copyright", so "make syntax-check" works in 2011.
2011-01-03 22:13:35 +01:00
Jim Meyering
6a44886e24 maint: update all FSF copyright year lists to include 2010
Use this command:
git ls-files |grep -vE '^(\..*|COPYING|gnulib)$' |xargs \
env UPDATE_COPYRIGHT_USE_INTERVALS=1 build-aux/update-copyright
2010-01-01 16:18:27 +01:00
Jim Meyering
4fe5ec326f maint: lib/xfreopen.c contains translatable strings
* po/POTFILES.in: Add lib/xfreopen.c.
2009-11-20 10:26:48 +01:00
Jim Meyering
9bfafb33a6 admin: update all copyright notices to include the year 2009 2009-11-11 22:18:37 +01:00
Jim Meyering
c9893c5553 maint/sc: enable the po check
* cfg.mk (local-checks-to-skip): Add sc_po_check.
* po/POTFILES.in: Update.
2009-11-11 22:18:37 +01:00
Jim Meyering
7e7a52f33b remove many files
Many are now obtained via bootstrap from gnulib.
Others (ms/) were not being maintained.
2009-11-11 14:08:06 +01:00
Paul Eggert
43e4846f11 * COPYING: New file.
* AUTHORS: Update from GPLv2 to GPLv3.
* Makefile.am: Likewise.
* NEWS: Likewise.
* README: Likewise.
* README-hacking: Likewise.
* bootstrap: Likewise.
* bootstrap.conf: Likewise.
* configure.ac: Likewise.
* exgettext: Likewise.
* doc/Makefile.am: Likewise.
* lib/Makefile.am: Likewise.
* lib/cmpbuf.c: Likewise.
* lib/cmpbuf.h: Likewise.
* lib/prepargs.c: Likewise.
* m4/vararrays.m4: Likewise.
* man/Makefile.am: Likewise.
* ms/Makefile.am: Likewise.
* ms/README: Likewise.
* ms/config.bat: Likewise.
* ms/config.sed: Likewise.
* ms/config.site: Likewise.
* po/POTFILES.in: Likewise.
* src/Makefile.am: Likewise.
* src/analyze.c: Likewise.
* src/cmp.c: Likewise.
* src/context.c: Likewise.
* src/diff.c: Likewise.
* src/diff.h: Likewise.
* src/diff3.c: Likewise.
* src/dir.c: Likewise.
* src/ed.c: Likewise.
* src/io.c: Likewise.
* src/normal.c: Likewise.
* src/sdiff.c: Likewise.
* src/system.h: Likewise.
* src/util.c: Likewise.
2007-07-19 17:45:29 +00:00
Paul Eggert
f5c7610983 Update FSF address. 2006-01-05 07:23:55 +00:00
Paul Eggert
55865b500d Use a single locale for both British and American English,
since we don't need to use '-ise' in Britain, says the OED.
2003-07-28 00:57:07 +00:00
Paul Eggert
ee74fb1947 Add en_US. 2002-06-17 07:15:20 +00:00
Paul Eggert
5ac585d8c0 Translate "Torbjorn". 2002-06-17 07:03:37 +00:00
Paul Eggert
00ec5e4806 Initial revision 2002-06-17 07:03:37 +00:00
Paul Eggert
d6a560a408 Remove lib/freesoft.c.
Add lib/file-type.c, lib/version-etc.c, lib/xmalloc.c.
2002-06-17 06:31:13 +00:00
Paul Eggert
1886715b4b Translate (C). 2002-06-11 11:15:03 +00:00
Paul Eggert
5b713e8dd6 Add hu, pt_BR. 2002-06-11 06:06:32 +00:00
Paul Eggert
796ad2bc35 Add zh_TW. 2002-03-11 08:00:47 +00:00
Paul Eggert
e7d9579f6a Add lib/c-stack.c, src/dir.c. 2002-02-28 04:28:07 +00:00
Paul Eggert
58166227e9 Add cs, ja. 2002-02-28 04:28:07 +00:00
Paul Eggert
9c2cd387c7 Don't say "illegal". Fix headers to match recent gettext standards. 2002-01-24 20:35:06 +00:00
Paul Eggert
6580226bf6 Initial revision 2002-01-24 02:10:11 +00:00
Paul Eggert
e48d1026c5 Initial revision 2001-11-23 08:05:29 +00:00
Paul Eggert
851e787576 Don't translate "program" to "programme". 2001-11-23 07:12:27 +00:00
Paul Eggert
6e9a130189 Initial revision 1998-09-14 00:26:54 +00:00