+ s/^(manpage\([^)]+\)\(\d+\)\()[^)]+(\).*)/$1$today$2/m
+ or die "Unable to update date in manpage() header in $fn\n";
+ s/^(This man ?page is current for version) \S+ (of rsync)/$1 $version $2/m
+ or die "Unable to update current version info in $fn\n";
+ } elsif ($fn eq 'rsync.h') {
+ s/(#define\s+SUBPROTOCOL_VERSION)\s+\d+/$1 0/
+ or die "Unable to find SUBPROTOCOL_VERSION define in $fn\n";
+ next if $pre;
+ } elsif ($fn eq 'NEWS') {
+ s/^(NEWS for rsync \Q$finalversion\E) \(UNRELEASED\)\s*\n/$1 ($today)\n/mi
+ or die "The first line of $fn is not in the right format. It must be:\n"
+ . "NEWS for rsync $finalversion (UNRELEASED)\n";
+ next if $pre;
+ } elsif ($fn eq 'OLDNEWS') {
+ s/^\t\S\S\s\S\S\S\s\d\d\d\d(\t\Q$finalversion\E)/\t$ztoday$1/m
+ or die "Unable to find \"?? ??? $year\t$finalversion\" line in $fn\n";
+ next if $pre;
+ } elsif ($fn eq 'options.c') {
+ if (s/(Copyright \(C\) 2002-)(\d+)( Wayne Davison)/$1$year$3/
+ && $2 ne $year) {
+ die "Copyright comments need to be updated to $year in all files!\n";
+ }
+ # Adjust the year in the --version output.
+ s/(rprintf\(f, "Copyright \(C\) 1996-)(\d+)/$1$year/
+ or die "Unable to find Copyright string in --version output of $fn\n";
+ next if $2 eq $year;