X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=src%2Fdata%2Fsys-file-encoding.pl;h=95860d0e5bf3729fa4f55bd8c70390aa14e6ef09;hb=ba40b77bcc033a8be5c339f503e386b19ca3d032;hp=b49c654b68bf194891c800884c4cd54b434cfa53;hpb=fe8dc2171009e90d2335f159d05f7e6660e24780;p=pspp
diff --git a/src/data/sys-file-encoding.pl b/src/data/sys-file-encoding.pl
index b49c654b68..95860d0e5b 100755
--- a/src/data/sys-file-encoding.pl
+++ b/src/data/sys-file-encoding.pl
@@ -1,22 +1,35 @@
#! /usr/bin/perl
+# Copyright (C) 2020, 2021Free Software Foundation
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
use strict;
use warnings;
-if (-t 0 || @ARGV) {
- print < sys-file-encoding.c
+usage: $0 CONVRTRS-TXT > sys-file-encoding.c
-To regenerate the encoding data, get the latest ICU encoding data from:
-http://source.icu-project.org/repos/icu/icu/trunk/source/data/mappings/convrtrs.txt
-then convert it with this script using the command above.
+To update the encoding data, get the latest ICU encoding data from:
+https://raw.githubusercontent.com/unicode-org/icu/main/icu4c/source/data/mappings/convrtrs.txt
EOF
exit (@ARGV && $ARGV[0] eq '--help' ? 0 : 1);
}
-open (CONVERTERS, '<', 'convrtrs.txt')
- or die "convrtrs.txt: open failed ($!)\n";
+open (CONVERTERS, '<', $ARGV[0])
+ or die "$ARGV[0]: open failed ($!)\n";
our $WINDOWS = 3; # Windows code pages.
our $IBM = 2; # IBM code pages.
@@ -45,6 +58,24 @@ print <<'EOF';
Generated by sys-file-encoding.pl. Do not modify!
*/
+/*
+PSPP - a program for statistical analysis.
+Copyright (C) 2017 Free Software Foundation, Inc.
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see .
+*/
+
#include
#include "data/sys-file-private.h"