Imported Upstream version 4.0.0~alpha1

Former-commit-id: 806294f5ded97629b74c85c09952f2a74fe182d9
This commit is contained in:
Jo Shields
2015-04-07 09:35:12 +01:00
parent 283343f570
commit 3c1f479b9d
22469 changed files with 2931443 additions and 869343 deletions

View File

@@ -140,9 +140,7 @@ public class CP1251 : ByteEncoding
int ch;
int charIndex = 0;
int byteIndex = 0;
#if NET_2_0
EncoderFallbackBuffer buffer = null;
#endif
while (charCount > 0)
{
ch = (int)(chars[charIndex]);

View File

@@ -140,9 +140,7 @@ public class CP1257 : ByteEncoding
int ch;
int charIndex = 0;
int byteIndex = 0;
#if NET_2_0
EncoderFallbackBuffer buffer = null;
#endif
while (charCount > 0)
{
ch = (int)(chars[charIndex]);

View File

@@ -140,9 +140,7 @@ public class CP1258 : ByteEncoding
int ch;
int charIndex = 0;
int byteIndex = 0;
#if NET_2_0
EncoderFallbackBuffer buffer = null;
#endif
while (charCount > 0)
{
ch = (int)(chars[charIndex]);

View File

@@ -140,9 +140,7 @@ public class CP20866 : ByteEncoding
int ch;
int charIndex = 0;
int byteIndex = 0;
#if NET_2_0
EncoderFallbackBuffer buffer = null;
#endif
while (charCount > 0)
{
ch = (int)(chars[charIndex]);

View File

@@ -140,9 +140,7 @@ public class CP21866 : ByteEncoding
int ch;
int charIndex = 0;
int byteIndex = 0;
#if NET_2_0
EncoderFallbackBuffer buffer = null;
#endif
while (charCount > 0)
{
ch = (int)(chars[charIndex]);

View File

@@ -140,9 +140,7 @@ public class CP28594 : ByteEncoding
int ch;
int charIndex = 0;
int byteIndex = 0;
#if NET_2_0
EncoderFallbackBuffer buffer = null;
#endif
while (charCount > 0)
{
ch = (int)(chars[charIndex]);

View File

@@ -140,9 +140,7 @@ public class CP28595 : ByteEncoding
int ch;
int charIndex = 0;
int byteIndex = 0;
#if NET_2_0
EncoderFallbackBuffer buffer = null;
#endif
while (charCount > 0)
{
ch = (int)(chars[charIndex]);

View File

@@ -89,7 +89,6 @@ public abstract class ISCIIEncoding : MonoEncoding
public unsafe override int GetByteCountImpl (char* chars, int count)
{
#if NET_2_0
int index = 0;
int length = 0;
char ch;
@@ -124,16 +123,11 @@ public abstract class ISCIIEncoding : MonoEncoding
// Return the final length of the output.
return length;
#else
return count;
#endif
}
public unsafe override int GetBytesImpl (char* chars, int charCount, byte* bytes, int byteCount)
{
#if NET_2_0
EncoderFallbackBuffer buffer = null;
#endif
//int charIndex = 0;
int byteIndex = 0;
int end = charCount;
@@ -173,12 +167,8 @@ public abstract class ISCIIEncoding : MonoEncoding
}
else
{
#if NET_2_0
HandleFallback (ref buffer, chars, ref i, ref charCount, bytes, ref posn, ref byteCount);
continue;
#else
bytes[posn++] = (byte)'?';
#endif
}
byteCount--;
}

View File

@@ -140,9 +140,7 @@ public class CP874 : ByteEncoding
int ch;
int charIndex = 0;
int byteIndex = 0;
#if NET_2_0
EncoderFallbackBuffer buffer = null;
#endif
while (charCount > 0)
{
ch = (int)(chars[charIndex]);