# 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
# 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.
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;
TMP=$TMP_BASE-ex
cat > $TMP.1 <<EOF
-Copyright (C) 1990-2005, 2007-2009 Free Software Foundation,
-Inc.
+Copyright @copyright{} 1990-2005, 2007-2009 Free Software
+Foundation, Inc.
EOF
cat > $TMP.2 <<EOF
-# Copyright (c) 1990-2005, 2007-2009 Free Software
+# Copyright (C) 1990-2005, 2007-2009 Free Software
# Foundation, Inc.
EOF
cat > $TMP.3 <<EOF
/*
- * Copyright (C) 90,2005,2007-2009 Free Software
- * Foundation, Inc.
+ * Copyright © 90,2005,2007-2009
+ * Free Software Foundation, Inc.
*/
EOF
cat > $TMP.4 <<EOF
$TMP.5: warning: FSF copyright statement not found
EOF
diff -u - $TMP.1 <<EOF || exit 1
-Copyright (C) 1990-2005, 2007-2009 Free Software Foundation,
-Inc.
+Copyright @copyright{} 1990-2005, 2007-2009 Free Software
+Foundation, Inc.
EOF
diff -u - $TMP.2 <<EOF || exit 1
-# Copyright (c) 1990-2005, 2007-2009 Free Software
+# Copyright (C) 1990-2005, 2007-2009 Free Software
# Foundation, Inc.
EOF
diff -u - $TMP.3 <<EOF || exit 1
/*
- * Copyright (C) 90,2005,2007-2009 Free Software
- * Foundation, Inc.
+ * Copyright © 90,2005,2007-2009
+ * Free Software Foundation, Inc.
*/
EOF
diff -u - $TMP.4 <<EOF || exit 1
$TMP.5: warning: FSF copyright statement not found
EOF
diff -u - $TMP.1 <<EOF || exit 1
-Copyright (C) 1990-2005, 2007-2010 Free Software Foundation, Inc.
+Copyright @copyright{} 1990-2005, 2007-2010 Free Software Foundation,
+Inc.
EOF
diff -u - $TMP.2 <<EOF || exit 1
-# Copyright (c) 1990-2005, 2007-2010 Free Software Foundation, Inc.
+# Copyright (C) 1990-2005, 2007-2010 Free Software Foundation, Inc.
EOF
diff -u - $TMP.3 <<EOF || exit 1
/*
- * Copyright (C) 90, 2005, 2007-2010 Free Software Foundation, Inc.
+ * Copyright © 90, 2005, 2007-2010 Free Software Foundation, Inc.
*/
EOF
diff -u - $TMP.4 <<EOF || exit 1