Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mRemoteNG/PuTTYNG.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'CHARSET')
-rw-r--r--CHARSET/LOCALENC.C4
-rw-r--r--CHARSET/MIMEENC.C2
-rw-r--r--CHARSET/SBCSGEN.PL14
-rw-r--r--CHARSET/XENC.C2
4 files changed, 15 insertions, 7 deletions
diff --git a/CHARSET/LOCALENC.C b/CHARSET/LOCALENC.C
index 4aa4ae66..49719fbe 100644
--- a/CHARSET/LOCALENC.C
+++ b/CHARSET/LOCALENC.C
@@ -1,5 +1,5 @@
/*
- * local.c - translate our internal character set codes to and from
+ * localenc.c - translate our internal character set codes to and from
* our own set of plausibly legible character-set names. Also
* provides a canonical name for each encoding (useful for software
* announcing what character set it will be using), and a set of
@@ -103,7 +103,7 @@ int charset_from_localenc(const char *name)
p = name;
q = localencs[i].name;
while (*p || *q) {
- if (tolower((unsigned char)*p) != tolower((unsigned char)*q))
+ if (tolower((unsigned char)*p) != tolower((unsigned char)*q))
break;
p++; q++;
}
diff --git a/CHARSET/MIMEENC.C b/CHARSET/MIMEENC.C
index 2fec6d26..8a0203b3 100644
--- a/CHARSET/MIMEENC.C
+++ b/CHARSET/MIMEENC.C
@@ -207,7 +207,7 @@ int charset_from_mimeenc(const char *name)
p = name;
q = mimeencs[i].name;
while (*p || *q) {
- if (tolower((unsigned char)*p) != tolower((unsigned char)*q))
+ if (tolower((unsigned char)*p) != tolower((unsigned char)*q))
break;
p++; q++;
}
diff --git a/CHARSET/SBCSGEN.PL b/CHARSET/SBCSGEN.PL
index 078aebf7..6012c933 100644
--- a/CHARSET/SBCSGEN.PL
+++ b/CHARSET/SBCSGEN.PL
@@ -1,11 +1,19 @@
-#!/usr/bin/env perl -w
+#!/usr/bin/env perl
# This script generates sbcsdat.c (the data for all the SBCSes) from its
# source form sbcs.dat.
-$infile = "sbcs.dat";
+use warnings;
+use Getopt::Long;
+use File::Basename;
+
+$infile = (dirname __FILE__) . "/sbcs.dat";
$outfile = "sbcsdat.c";
+my $usage = "usage: sbcsgen.pl [-o OUTFILE]\n";
+GetOptions("o|output=s" => \$outfile)
+ or die $usage;
+
open FOO, $infile;
open BAR, ">$outfile";
select BAR;
@@ -30,7 +38,7 @@ my @charsetnames = ();
my @sortpriority = ();
while (<FOO>) {
- chomp;
+ chomp; y/\r//d;
if (/^charset (.*)$/) {
$charsetname = $1;
@vals = ();
diff --git a/CHARSET/XENC.C b/CHARSET/XENC.C
index 964ca6ff..24592ad1 100644
--- a/CHARSET/XENC.C
+++ b/CHARSET/XENC.C
@@ -82,7 +82,7 @@ int charset_from_xenc(const char *name)
p = name;
q = xencs[i].name;
while (*p || *q) {
- if (tolower((unsigned char)*p) != tolower((unsigned char)*q))
+ if (tolower((unsigned char)*p) != tolower((unsigned char)*q))
break;
p++; q++;
}