Merge branch 'upstream'

Former-commit-id: eb4ffcc258add52149f1f8185bc7875a5c1e434f
This commit is contained in:
Xamarin Public Jenkins (auto-signing) 2018-04-13 09:08:04 +00:00
commit 3d68f96c20
158 changed files with 79 additions and 47 deletions

View File

@ -1 +1 @@
9bb02a39e534d005ff5e3e260b6b2210003116a8
d805dea65c76dadcaeb5ce9ed065f20fc867972c

View File

@ -1 +1 @@
49f41b415babe32ea76d20bcaa224782a74ce8ab
3c0157cb68c0196416c7eeed8250b5af75916e0a

View File

@ -34,11 +34,11 @@ static class Consts
// Use these assembly version constants to make code more maintainable.
//
public const string MonoVersion = "5.10.1.44";
public const string MonoVersion = "5.10.1.45";
public const string MonoCompany = "Mono development team";
public const string MonoProduct = "Mono Common Language Infrastructure";
public const string MonoCopyright = "(c) Various Mono authors";
public const int MonoCorlibVersion = 1051000003;
public const int MonoCorlibVersion = 1051000004;
#if MOBILE
// Versions of .NET Framework for Silverlight 4.0

View File

@ -32,7 +32,8 @@ using System.IO;
using System.Text;
namespace System {
// This class reads data from a byte array or file containing the terminfo capabilities
// information for any given terminal. The maximum allowed size is 4096 bytes.
// information for any given terminal. The maximum allowed size is 4096 (or
// 32768 for terminfo2) bytes.
//
// Terminfo database files are divided in the following sections:
//
@ -45,7 +46,7 @@ namespace System {
//
// The header is as follows:
//
// Magic number (0x1 and 0x1A)
// Magic number (0x11A/0432 or 0x21e/01036 for terminfo2)
// Terminal names size
// Boolean section size
// Numeric section size
@ -58,8 +59,9 @@ namespace System {
// The boolean capabilities section has bytes that are set to 1 if the capability is supported
// and 0 otherwise. If the index of a capability is greater than the section size, 0 is assumed.
//
// The numeric capabilities section holds 2-byte integers in little endian format. No negative
// values are allowed and the absence of a capability is marked as two 0xFF.
// The numeric capabilities section holds 2-byte integers (4-byte integers for terminfo2) in
// little endian format. No negative values are allowed and the absence of a capability is marked
// as two 0xFF (four 0xFF for terminfo2).
//
// The string offsets section contains 2-byte integer offsets into the string capabilies section.
// If the capability is not supported, the index will be two 0xFF bytes.
@ -72,17 +74,17 @@ namespace System {
//
class TermInfoReader {
//short nameSize;
short boolSize;
short numSize;
short strOffsets;
//short strSize;
int boolSize;
int numSize;
int strOffsets;
//string [] names; // Last one is the description
byte [] buffer;
int booleansOffset;
//string term;
int intOffset;
public TermInfoReader (string term, string filename)
{
using (FileStream st = File.OpenRead (filename)) {
@ -114,12 +116,21 @@ namespace System {
// get { return term; }
// }
void DetermineVersion (short magic)
{
if (magic == 0x11a)
intOffset = 2;
else if (magic == 0x21e)
intOffset = 4;
else
throw new Exception (String.Format ("Magic number is unexpected: {0}", magic));
}
void ReadHeader (byte [] buffer, ref int position)
{
short magic = GetInt16 (buffer, position);
position += 2;
if (magic != 282)
throw new Exception (String.Format ("Magic number is wrong: {0}", magic));
DetermineVersion (magic);
/*nameSize =*/ GetInt16 (buffer, position);
position += 2;
@ -161,8 +172,8 @@ namespace System {
if ((offset % 2) == 1)
offset++;
offset += ((int) number) * 2;
return GetInt16 (buffer, offset);
offset += ((int) number) * intOffset;
return GetInteger (buffer, offset);
}
public string Get (TermInfoStrings tstr)
@ -175,7 +186,7 @@ namespace System {
if ((offset % 2) == 1)
offset++;
offset += numSize * 2;
offset += numSize * intOffset;
int off2 = GetInt16 (buffer, offset + (int) tstr * 2);
if (off2 == -1)
return null;
@ -193,7 +204,7 @@ namespace System {
if ((offset % 2) == 1)
offset++;
offset += numSize * 2;
offset += numSize * intOffset;
int off2 = GetInt16 (buffer, offset + (int) tstr * 2);
if (off2 == -1)
return null;
@ -211,6 +222,27 @@ namespace System {
return (short) (uno + dos * 256);
}
int GetInt32 (byte [] buffer, int offset)
{
int b1 = (int) buffer [offset];
int b2 = (int) buffer [offset + 1];
int b3 = (int) buffer [offset + 2];
int b4 = (int) buffer [offset + 3];
if (b1 == 255 && b2 == 255 && b3 == 255 && b4 == 255)
return -1;
return b1 + b2 << 8 + b3 << 16 + b4 << 24;
}
int GetInteger (byte [] buffer, int offset)
{
if (intOffset == 2)
return GetInt16 (buffer, offset);
else
// intOffset == 4
return GetInt32 (buffer, offset);
}
string GetString (byte [] buffer, int offset)
{
int length = 0;

View File

@ -1 +0,0 @@
7f3956a38fc30a20d67dd64e0b6bac56a0da3a12

View File

@ -1 +0,0 @@
b66d7510400bed180d41a8e44f014209f6d77457

View File

@ -1 +0,0 @@
60c8bd1b4fedd5dc9c48a621bac289331d9bff35

View File

@ -1 +0,0 @@
526fe91dc9658ddbc48931ce553219531f6d0543

View File

@ -1 +0,0 @@
7924bd9c428a3dc109a34fda105b8f89733384a1

View File

@ -1 +0,0 @@
835eae43cf0fc7b136f954ef37ec0a39386af603

View File

@ -1 +0,0 @@
3c28ce1891b374af30d85cbff00538afe12c1406

View File

@ -0,0 +1 @@
eb1aa43b2db8bdc6f06b36843442b9f87152a27f

View File

@ -0,0 +1 @@
15f85c493215c454ea19a0bb151089eacb9e64e7

View File

@ -0,0 +1 @@
55225a94085398051f1c6b4d43d8e80408f1d1d9

View File

@ -0,0 +1 @@
45f35e56c8bc39c87432a9489c94f101b07f80c5

View File

@ -0,0 +1 @@
2dca4cdcec0bb2a1c9ddbf3f46a65b2932981f97

View File

@ -0,0 +1 @@
52fa999963ef008044f2a7eb6f458199e2442332

View File

@ -0,0 +1 @@
6087c6b887144d04408f0f1c5148a01c32668a47

View File

@ -1 +0,0 @@
7f3956a38fc30a20d67dd64e0b6bac56a0da3a12

View File

@ -1 +0,0 @@
b66d7510400bed180d41a8e44f014209f6d77457

View File

@ -1 +0,0 @@
60c8bd1b4fedd5dc9c48a621bac289331d9bff35

View File

@ -1 +0,0 @@
526fe91dc9658ddbc48931ce553219531f6d0543

View File

@ -1 +0,0 @@
7924bd9c428a3dc109a34fda105b8f89733384a1

View File

@ -1 +0,0 @@
835eae43cf0fc7b136f954ef37ec0a39386af603

View File

@ -1 +0,0 @@
3c28ce1891b374af30d85cbff00538afe12c1406

View File

@ -0,0 +1 @@
eb1aa43b2db8bdc6f06b36843442b9f87152a27f

View File

@ -0,0 +1 @@
15f85c493215c454ea19a0bb151089eacb9e64e7

View File

@ -0,0 +1 @@
55225a94085398051f1c6b4d43d8e80408f1d1d9

View File

@ -0,0 +1 @@
45f35e56c8bc39c87432a9489c94f101b07f80c5

View File

@ -0,0 +1 @@
2dca4cdcec0bb2a1c9ddbf3f46a65b2932981f97

View File

@ -0,0 +1 @@
52fa999963ef008044f2a7eb6f458199e2442332

View File

@ -0,0 +1 @@
6087c6b887144d04408f0f1c5148a01c32668a47

Some files were not shown because too many files have changed in this diff Show More