# HG changeset patch # User Joel E. Denny # Date 1249355184 14400 # Node ID 3377553a29cfb8d960b6945694be230941839a67 # Parent 431ad142ee5d26f117b40593c7d427ab8d565adf update-copyright: support @copyright{} and © * build-aux/update-copyright: Implement and document. * tests/test-update-copyright.sh: Test. diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-08-03 Joel E. Denny + + update-copyright: support @copyright{} and © + * build-aux/update-copyright: Implement and document. + * tests/test-update-copyright.sh: Test. + 2009-08-04 Jim Meyering update-copyright-tests: correctly test EOL=\r\n handling diff --git a/build-aux/update-copyright b/build-aux/update-copyright --- a/build-aux/update-copyright +++ b/build-aux/update-copyright @@ -46,15 +46,15 @@ # looks like the start of a copyright statement. For example, each of # these by itself is fine: # -# Copyright (C) 1990-2005, 2007-2009 Free Software Foundation, -# Inc. +# Copyright @copyright{} 1990-2005, 2007-2009 Free Software +# Foundation, Inc. # -# # Copyright (c) 1990-2005, 2007-2009 Free Software +# # Copyright (C) 1990-2005, 2007-2009 Free Software # # Foundation, Inc. # # /* -# * Copyright (C) 90,2005,2007-2009 Free Software -# * Foundation, Inc. +# * Copyright © 90,2005,2007-2009 +# * Free Software Foundation, Inc. # */ # # However, the following format is not recognized because the line @@ -77,9 +77,10 @@ # breaks one. The worst that can happen is that a file is not updated # and a warning is issued. # -# 1. The format is "Copyright (C)" (where "(C)" can be "(c)"), then a -# list of copyright years, and then the name of the copyright -# holder, which is "Free Software Foundation, Inc.". +# 1. The format is "Copyright (C)" (where "(C)" can also be "(c)", +# "@copyright{}", or "©"), then a list of copyright years, and +# then the name of the copyright holder, which is "Free Software +# Foundation, Inc.". # 2. "Copyright (C)" appears at the beginning of a line except that it # may be prefixed by any sequence (e.g., a comment) of no more than # 5 characters. @@ -105,7 +106,7 @@ my ($sec, $min, $hour, $mday, $month, $year) = localtime (time ()); $this_year = $year + 1900; } -my $copyright = 'Copyright \([cC]\)'; +my $copyright = 'Copyright (?:\([cC]\)|@copyright{}|©)'; my $holder = 'Free Software Foundation, Inc.'; my $prefix_max = 5; my $margin = 72; diff --git a/tests/test-update-copyright.sh b/tests/test-update-copyright.sh --- a/tests/test-update-copyright.sh +++ b/tests/test-update-copyright.sh @@ -24,17 +24,17 @@ TMP=$TMP_BASE-ex cat > $TMP.1 < $TMP.2 < $TMP.3 < $TMP.4 <