Skip to content

Commit

Permalink
Merge branch 'upstream/0.63'
Browse files Browse the repository at this point in the history
Conflicts:
	WINDOWS/WINDOW.C
  • Loading branch information
rmcardle committed Oct 1, 2013
2 parents e36b0e2 + dd94134 commit 374e3b8
Show file tree
Hide file tree
Showing 179 changed files with 14,205 additions and 9,885 deletions.
39 changes: 39 additions & 0 deletions BUILDSCR.CV
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# -*- sh -*-

# Build script to scan PuTTY with the downloadable Coverity scanner
# and generate a tar file to upload to their open-source scanning
# service.

module putty

# Preparations.
in putty do ./mkfiles.pl
in putty do ./mkauto.sh
in putty/doc do make

# Scan the Unix build, on a 64-bit system to differentiate as much as
# possible from the other scan of the cross-platform files.
delegate covscan64
in putty do ./configure
in putty do cov-build --dir cov-int make
in putty do tar czvf cov-int.tar.gz cov-int
return putty/cov-int.tar.gz
enddelegate

# Scan the Windows build, by means of building with Winelib (since as
# of 2013-07-22, the Coverity Scan website doesn't offer a 32-bit
# Windows scanner for download).
delegate covscan32wine
in putty do tar xzvf cov-int.tar.gz
in putty/windows do cov-build --dir ../cov-int make -f Makefile.cyg CC=winegcc RC=wrc
in putty do tar czvf cov-int.tar.gz cov-int
return putty/cov-int.tar.gz
enddelegate

# Provide the revision number as one of the build outputs, to make it
# easy to construct a curl upload command which will annotate it
# appropriately when uploaded.
in putty do echo $(revision) > revision.txt

deliver putty/revision.txt $@
deliver putty/cov-int.tar.gz $@
7 changes: 5 additions & 2 deletions CHARSET/CHARSET.H
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ typedef enum {
CS_ISO8859_16,
CS_CP437,
CS_CP850,
CS_CP852,
CS_CP866,
CS_CP1250,
CS_CP1251,
Expand Down Expand Up @@ -98,7 +99,8 @@ typedef struct {
* U+FFFD (REPLACEMENT CHARACTER).
*/

int charset_to_unicode(char **input, int *inlen, wchar_t *output, int outlen,
int charset_to_unicode(const char **input, int *inlen,
wchar_t *output, int outlen,
int charset, charset_state *state,
const wchar_t *errstr, int errlen);

Expand All @@ -121,7 +123,8 @@ int charset_to_unicode(char **input, int *inlen, wchar_t *output, int outlen,
* output charset).
*/

int charset_from_unicode(wchar_t **input, int *inlen, char *output, int outlen,
int charset_from_unicode(const wchar_t **input, int *inlen,
char *output, int outlen,
int charset, charset_state *state,
const char *errstr, int errlen);

Expand Down
3 changes: 2 additions & 1 deletion CHARSET/FROMUCS.C
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ static void charset_emit(void *ctx, long int output)
}
}

int charset_from_unicode(wchar_t **input, int *inlen, char *output, int outlen,
int charset_from_unicode(const wchar_t **input, int *inlen,
char *output, int outlen,
int charset, charset_state *state,
const char *errstr, int errlen)
{
Expand Down
3 changes: 2 additions & 1 deletion CHARSET/LOCALENC.C
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ static const struct {
int return_in_enum; /* enumeration misses some charsets */
} localencs[] = {
{ "<UNKNOWN>", CS_NONE, 0 },
{ "UTF-8", CS_UTF8, 1 },
{ "ISO-8859-1", CS_ISO8859_1, 1 },
{ "ISO-8859-1 with X11 line drawing", CS_ISO8859_1_X11, 0 },
{ "ISO-8859-2", CS_ISO8859_2, 1 },
Expand All @@ -39,6 +40,7 @@ static const struct {
{ "ISO-8859-16", CS_ISO8859_16, 1 },
{ "CP437", CS_CP437, 1 },
{ "CP850", CS_CP850, 1 },
{ "CP852", CS_CP852, 1 },
{ "CP866", CS_CP866, 1 },
{ "CP1250", CS_CP1250, 1 },
{ "CP1251", CS_CP1251, 1 },
Expand Down Expand Up @@ -74,7 +76,6 @@ static const struct {
{ "VISCII", CS_VISCII, 1 },
{ "HP ROMAN8", CS_HP_ROMAN8, 1 },
{ "DEC MCS", CS_DEC_MCS, 1 },
{ "UTF-8", CS_UTF8, 1 },
};

const char *charset_to_localenc(int charset)
Expand Down
5 changes: 5 additions & 0 deletions CHARSET/MIMEENC.C
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,11 @@ static const struct {
{ "850", CS_CP850 },
{ "csPC850Multilingual", CS_CP850 },

{ "IBM852", CS_CP852 },
{ "cp852", CS_CP852 },
{ "852", CS_CP852 },
{ "csIBM852", CS_CP852 },

{ "IBM866", CS_CP866 },
{ "cp866", CS_CP866 },
{ "866", CS_CP866 },
Expand Down
22 changes: 22 additions & 0 deletions CHARSET/SBCS.DAT
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,28 @@ charset CS_CP866
0440 0441 0442 0443 0444 0445 0446 0447 0448 0449 044a 044b 044c 044d 044e 044f
0401 0451 0404 0454 0407 0457 040e 045e 00b0 2219 00b7 221a 2116 00a4 25a0 00a0

Another old DOS code page, submitted by a user and checked against
the translation table at
http://msdn.microsoft.com/en-us/goglobal/cc305161.aspx .

charset CS_CP852
0000 0001 0002 0003 0004 0005 0006 0007 0008 0009 000a 000b 000c 000d 000e 000f
0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 001a 001b 001c 001d 001e 001f
0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 002a 002b 002c 002d 002e 002f
0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 003a 003b 003c 003d 003e 003f
0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 004a 004b 004c 004d 004e 004f
0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 005a 005b 005c 005d 005e 005f
0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 006a 006b 006c 006d 006e 006f
0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 007a 007b 007c 007d 007e 007f
00c7 00fc 00e9 00e2 00e4 016f 0107 00e7 0142 00eb 0150 0151 00ee 0179 00c4 0106
00c9 0139 013a 00f4 00f6 013d 013e 015a 015b 00d6 00dc 0164 0165 0141 00d7 010d
00e1 00ed 00f3 00fa 0104 0105 017d 017e 0118 0119 00ac 017a 010c 015f 00ab 00bb
2591 2592 2593 2502 2524 00c1 00c2 011a 015e 2563 2551 2557 255d 017b 017c 2510
2514 2534 252c 251c 2500 253c 0102 0103 255a 2554 2569 2566 2560 2550 256c 00a4
0111 0110 010e 00cb 010f 0147 00cd 00ce 011b 2518 250c 2588 2584 0162 016e 2580
00d3 00df 00d4 0143 0144 0148 0160 0161 0154 00da 0155 0170 00fd 00dd 0163 00b4
00ad 02dd 02db 02c7 02d8 00a7 00f7 00b8 00b0 00a8 02d9 0171 0158 0159 25a0 00a0

Here are some Windows code pages, generated by this piece of
Bourne shell:

Expand Down
76 changes: 76 additions & 0 deletions CHARSET/SBCSDAT.C
Original file line number Diff line number Diff line change
Expand Up @@ -1425,6 +1425,81 @@ const charset_spec charset_CS_CP866 = {
CS_CP866, read_sbcs, write_sbcs, &data_CS_CP866
};

static const sbcs_data data_CS_CP852 = {
{
0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f,
0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f,
0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f,
0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f,
0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f,
0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f,
0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f,
0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x007f,
0x00c7, 0x00fc, 0x00e9, 0x00e2, 0x00e4, 0x016f, 0x0107, 0x00e7,
0x0142, 0x00eb, 0x0150, 0x0151, 0x00ee, 0x0179, 0x00c4, 0x0106,
0x00c9, 0x0139, 0x013a, 0x00f4, 0x00f6, 0x013d, 0x013e, 0x015a,
0x015b, 0x00d6, 0x00dc, 0x0164, 0x0165, 0x0141, 0x00d7, 0x010d,
0x00e1, 0x00ed, 0x00f3, 0x00fa, 0x0104, 0x0105, 0x017d, 0x017e,
0x0118, 0x0119, 0x00ac, 0x017a, 0x010c, 0x015f, 0x00ab, 0x00bb,
0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x00c1, 0x00c2, 0x011a,
0x015e, 0x2563, 0x2551, 0x2557, 0x255d, 0x017b, 0x017c, 0x2510,
0x2514, 0x2534, 0x252c, 0x251c, 0x2500, 0x253c, 0x0102, 0x0103,
0x255a, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256c, 0x00a4,
0x0111, 0x0110, 0x010e, 0x00cb, 0x010f, 0x0147, 0x00cd, 0x00ce,
0x011b, 0x2518, 0x250c, 0x2588, 0x2584, 0x0162, 0x016e, 0x2580,
0x00d3, 0x00df, 0x00d4, 0x0143, 0x0144, 0x0148, 0x0160, 0x0161,
0x0154, 0x00da, 0x0155, 0x0170, 0x00fd, 0x00dd, 0x0163, 0x00b4,
0x00ad, 0x02dd, 0x02db, 0x02c7, 0x02d8, 0x00a7, 0x00f7, 0x00b8,
0x00b0, 0x00a8, 0x02d9, 0x0171, 0x0158, 0x0159, 0x25a0, 0x00a0
},
{
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
0x10,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x98, 0xb8, 0xad, 0xe6, 0xe7,
0xdd, 0xee, 0x9b, 0x9c, 0xde, 0x85, 0xeb, 0xfb,
0x8d, 0xab, 0xbd, 0xbe, 0xa6, 0xa7, 0xf3, 0xf4,
0xfa, 0xf2, 0xf1, 0xc4, 0xb3, 0xda, 0xbf, 0xc0,
0xd9, 0xc3, 0xb4, 0xc2, 0xc1, 0xc5, 0xcd, 0xba,
0xc9, 0xbb, 0xc8, 0xbc, 0xcc, 0xb9, 0xcb, 0xca,
0xce, 0xdf, 0xdc, 0xdb, 0xb0, 0xb1, 0xb2, 0xfe
},
256
};
const charset_spec charset_CS_CP852 = {
CS_CP852, read_sbcs, write_sbcs, &data_CS_CP852
};

static const sbcs_data data_CS_CP1250 = {
{
0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
Expand Down Expand Up @@ -3980,6 +4055,7 @@ ENUM_CHARSET(CS_ISO8859_1_X11)
ENUM_CHARSET(CS_CP437)
ENUM_CHARSET(CS_CP850)
ENUM_CHARSET(CS_CP866)
ENUM_CHARSET(CS_CP852)
ENUM_CHARSET(CS_CP1250)
ENUM_CHARSET(CS_CP1251)
ENUM_CHARSET(CS_CP1252)
Expand Down
3 changes: 2 additions & 1 deletion CHARSET/TOUCS.C
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ static void unicode_emit(void *ctx, long int output)
}
}

int charset_to_unicode(char **input, int *inlen, wchar_t *output, int outlen,
int charset_to_unicode(const char **input, int *inlen,
wchar_t *output, int outlen,
int charset, charset_state *state,
const wchar_t *errstr, int errlen)
{
Expand Down
1 change: 1 addition & 0 deletions CHARSET/XENC.C
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ static const struct {
{ "koi8-u", CS_KOI8_U },
{ "ibm-cp437", CS_CP437 },
{ "ibm-cp850", CS_CP850 },
{ "ibm-cp852", CS_CP852 },
{ "ibm-cp866", CS_CP866 },
{ "microsoft-cp1250", CS_CP1250 },
{ "microsoft-cp1251", CS_CP1251 },
Expand Down
Loading

0 comments on commit 374e3b8

Please sign in to comment.