X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fdata%2Fsys-file-encoding.pl;h=95860d0e5bf3729fa4f55bd8c70390aa14e6ef09;hb=64ba9bcf7a234b51dbaeac545338981bfc2a700c;hp=812cac1df1f379f9856d9e2f21277a05080080c7;hpb=f27a6796fc45eafdce618237eded1a84cd9955b3;p=pspp
diff --git a/src/data/sys-file-encoding.pl b/src/data/sys-file-encoding.pl
index 812cac1df1..95860d0e5b 100755
--- a/src/data/sys-file-encoding.pl
+++ b/src/data/sys-file-encoding.pl
@@ -1,5 +1,5 @@
#! /usr/bin/perl
-# Copyright (C) 2020 Free Software Foundation
+# 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
@@ -14,24 +14,22 @@
# 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.
@@ -60,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"