#!/usr/local/bin/perl -w
#
-# Copyright (C) 1998, 1999, 2000 Internet Software Consortium.
+# Copyright (C) 1998-2000 Internet Software Consortium.
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
%file_types = ();
%file_years = ();
-open(COPYRIGHTS, "<util/copyrights") || die "can't open copyrights: $!";
+open(COPYRIGHTS, "<util/copyrights") || die "can't open ./util/copyrights: $!";
while (<COPYRIGHTS>) {
chomp;
($file, $type, $years) = split;
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time());
$year += 1900;
-open(FILES, "<util/files") || die "can't open files: $!";
+$find = "find . -type f -print";
+
+open(FILES, "$find | sort |") || die "can't start \"$find\": $!";
while (<FILES>) {
chomp;
+
+ next if (m%/\.\# | # CVS old conflict file
+ /CVS/ | # CVS directory
+ \.bak$ | # created by update_copyrights
+ /(dnssafe|openssl)/.*\.[ch]$ | # imported
+ doc/(draft|expired|rfc)/ # imported
+ %x);
+
if (!$file_types{$_}) {
- if ($_ =~ /\.[chy]$/) {
+ if ($_ =~ /\.(c|h|css)$/) {
$file_types{$_} = "C";
+ } elsif ($_ =~ /\.y$/) {
+ $file_types{$_} = "YACC";
+ } elsif ($_ =~ /\.pl$/i) {
+ $file_types{$_} = "PERL";
+ } elsif ($_ =~ /\.sh$/) {
+ $file_types{$_} = "SH";
+ } elsif ($_ =~ /\.html$/) {
+ $file_types{$_} = "HTML";
+ } elsif ($_ =~ /\.man$/) {
+ $file_types{$_} = "MAN";
} elsif ($_ =~ /\/Makefile\.in$/) {
$file_types{$_} = "MAKE";
- } elsif ($_ =~ /\/\.cvsignore$/) {
+ } elsif ($_ =~ /\/named.?\.conf$/) {
+ $file_types{$_} = "CONF-C";
+ } elsif ($_ =~ /\.(db|hint)(\.in)?$/) {
+ $file_types{$_} = "ZONE";
+ } elsif ($_ =~ /(\/\.cvsignore|\.gif|\.jpg)$/i) {
$file_types{$_} = "X";
} else {
$file_types{$_} = "?";