Joel E. Denny [Fri, 14 Aug 2009 05:10:08 +0000 (01:10 -0400)]
update-copyright: much ado about intervals
* build-aux/update-copyright: Implement and document
UPDATE_COPYRIGHT_USE_INTERVALS to control expansion and collapse
of copyright year intervals.
Also, document UPDATE_COPYRIGHT_YEAR.
* tests/test-update-copyright.sh: Test it.
Optimize exclude: use hash tables for non-wildcard patterns.
* lib/exclude.c: Include hash.h and mbuiter.h
(struct exclude_pattern, exclude_segment): New data types.
(struct exclude): Rewrite.
(fnmatch_pattern_has_wildcards): New function.
(new_exclude_segment, free_exclude_segment): New functions.
(excluded_file_pattern_p, excluded_file_name_p): New functions.
(excluded_file_name, add_exclude): Rewrite using new struct exclude.
* lib/exclude.h (is_fnmatch_pattern): New prototype.
* modules/exclude: Depend on hash and mbuiter.
* modules/exclude-tests: New file.
* tests/test-exclude.c: New file.
* tests/test-exclude1.sh: New file.
* tests/test-exclude2.sh: New file.
* tests/test-exclude3.sh: New file.
* tests/test-exclude4.sh: New file.
* tests/test-exclude5.sh: New file.
* tests/test-exclude6.sh: New file.
* tests/test-exclude7.sh: New file.
* modules/selinux-at (configure.ac): Remove redundant code.
LIB_SELINUX is already set via the dependent module, selinux-h.
(Include): Add quotes around selinux-at.h.
* lib/selinux-at.h: Add documentation.
Reported by Bruno Haible in
http://marc.info/?l=gnulib-bug&m=124958988300749
Jim Meyering [Thu, 6 Aug 2009 12:15:23 +0000 (14:15 +0200)]
selinux-at: new module
Initially written for coreutils, this module will soon be
used by findutils, too.
* MODULES.html.sh [Misc]: Add selinux-at.
* lib/selinux-at.h: New file, from coreutils.
* lib/selinux-at.c: Likewise.
* modules/selinux-at: Likewise.
(License): Change from LGPL to GPL, since it depends
on the GPL'd openat module.
Joel E. Denny [Wed, 5 Aug 2009 20:52:24 +0000 (16:52 -0400)]
update-copyright: don't trip on non-FSF copyright statements
* build-aux/update-copyright: Fix so that the first correctly
formatted FSF copyright statement is recognized no matter what
appears before it. Update documentation.
* tests/test-update-copyright.sh: Test that.
Joel E. Denny [Wed, 5 Aug 2009 19:31:15 +0000 (15:31 -0400)]
update-copyright: clean up code a little
* build-aux/update-copyright: Append "_re" to the name of any
variable holding a regular expression.
Replace "old" and "new" with "stmt" in variable names.
Do not accept 2-digit UPDATE_COPYRIGHT_YEAR, which was not
handled correctly.
Format code more consistently.
Joel E. Denny [Tue, 4 Aug 2009 00:05:50 +0000 (20:05 -0400)]
update-copyright: fix bug for 2-digit last year and add tests
* build-aux/update-copyright: Fix bug.
Use UPDATE_COPYRIGHT_YEAR from environment as current year if
specified.
* modules/update-copyright-tests: New
* tests/test-update-copyright.sh: New.
Joel E. Denny [Fri, 31 Jul 2009 13:38:05 +0000 (09:38 -0400)]
update-copyright: handle leading tabs in line prefix
* build-aux/update-copyright: Count leading tabs as 8 spaces
when computing margin. This helps with the formatting of
ChangeLogs, for example.
Fix documentation a little.
Joel E. Denny [Fri, 31 Jul 2009 13:11:53 +0000 (09:11 -0400)]
update-copyright: automatically format copyright statements
* build-aux/update-copyright: Implement that.
Also, be a little more predictable and safer by always failing
when the full copyright format is not perfectly recognized as an
unbroken whole. Discussed at
<http://lists.gnu.org/archive/html/bug-gnulib/2009-07/msg00131.html>.
Rewrite documentation.
Jim Meyering [Fri, 31 Jul 2009 16:16:54 +0000 (18:16 +0200)]
getloadavg: fix symbol name in comment
* lib/getloadavg.c: Correct a typo I introduced when adding
comments to Matt's change: s/NLIST_POINTER/N_NAME_POINTER/.
Matt Kraai spotted the problem.
Matt Kraai [Wed, 29 Jul 2009 15:33:59 +0000 (08:33 -0700)]
getloadavg: check whether n_name is a pointer, for QNX 6.4.1
* lib/getloadavg.c (getloadavg): Use the strcpy-into-nlist.n_name
code also if ! defined N_NAME_POINTER.
* m4/getloadavg.m4 (gl_GETLOADAVG): Add a link-test for N_NAME_POINTER.
This is required on QNX 6.4.1, where /usr/include/nlist.h exists,
but the n_name member is a 12-byte array.
Joel E. Denny [Wed, 29 Jul 2009 19:17:53 +0000 (15:17 -0400)]
update-copyright: generalize comment handling
* build-aux/update-copyright: Handle copyright statements
within more comment styles.
Document usage.
Report any file with an external copyright holder or parse failure.
Jim Meyering [Sat, 25 Jul 2009 13:43:11 +0000 (15:43 +0200)]
maint.mk: avoid warnings about missing files
* top/maint.mk (PREV_VERSION): Suppress stderr, to hide a
diagnostic when .prev-version does not exist.
(_cfg_mk): Define, so it can be empty when cfg.mk does not exist.
(syntax-check-rules): Use $(_cfg_mk) to avoid a diagnostic about
nonexistent cfg.mk.
Suggestions from Simon Josefsson.