mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 12:45:47 +00:00
Remove unncessary method
This commit is contained in:
1 parent
6ca5d51782
commit
173380b9c7
1 file changed
-86
@@ -2716,92 +2716,6 @@ namespace Microsoft.PowerShell
|
||||
|
||||
#endif
|
||||
#region Dealing with CJK
|
||||
#if !UNIX
|
||||
|
||||
/// <summary>
|
||||
/// From IsConsoleFullWidth in \windows\core\ntcon\server\dbcs.c
|
||||
/// Precondition: the current code page needs to be a Far East code page.
|
||||
///
|
||||
/// char F8F8 makes this function return 1 while in CHT, CHS, and KOR it takes 2 cells.
|
||||
/// I don't think we should special-case this because that ought to be a bug outside of
|
||||
/// this code.
|
||||
/// </summary>
|
||||
/// <param name="c"></param>
|
||||
/// <param name="hwnd">window handle</param>
|
||||
/// <param name="hDC">handle to DC; it is not released by this method</param>
|
||||
/// <param name="istmInitialized"></param>
|
||||
/// <param name="tm"></param>
|
||||
/// <returns></returns>
|
||||
private static int LengthInBufferCellsFE(char c, ref HWND hwnd, ref HDC hDC, ref bool istmInitialized, ref TEXTMETRIC tm)
|
||||
{
|
||||
if (0x20 <= c && c <= 0x7e)
|
||||
{
|
||||
/* ASCII */
|
||||
return 1;
|
||||
}
|
||||
else if (0x3041 <= c && c <= 0x3094)
|
||||
{
|
||||
/* Hiragana */
|
||||
return 2;
|
||||
}
|
||||
else if (0x30a1 <= c && c <= 0x30f6)
|
||||
{
|
||||
/* Katakana */
|
||||
return 2;
|
||||
}
|
||||
else if (0x3105 <= c && c <= 0x312c)
|
||||
{
|
||||
/* Bopomofo */
|
||||
return 2;
|
||||
}
|
||||
else if (0x3131 <= c && c <= 0x318e)
|
||||
{
|
||||
/* Hangul Elements */
|
||||
return 2;
|
||||
}
|
||||
else if (0xac00 <= c && c <= 0xd7a3)
|
||||
{
|
||||
/* Korean Hangul Syllables */
|
||||
return 2;
|
||||
}
|
||||
else if (0xff01 <= c && c <= 0xff5e)
|
||||
{
|
||||
/* Fullwidth ASCII variants */
|
||||
return 2;
|
||||
}
|
||||
else if (0xff61 <= c && c <= 0xff9f)
|
||||
{
|
||||
/* Halfwidth Katakana variants */
|
||||
return 1;
|
||||
}
|
||||
else if ((0xffa0 <= c && c <= 0xffbe) ||
|
||||
(0xffc2 <= c && c <= 0xffc7) ||
|
||||
(0xffca <= c && c <= 0xffcf) ||
|
||||
(0xffd2 <= c && c <= 0xffd7) ||
|
||||
(0xffda <= c && c <= 0xffdc))
|
||||
{
|
||||
/* Halfwidth Hangul variants */
|
||||
return 1;
|
||||
}
|
||||
else if (0xffe0 <= c && c <= 0xffe6)
|
||||
{
|
||||
/* Fullwidth symbol variants */
|
||||
return 2;
|
||||
}
|
||||
else if (0x4e00 <= c && c <= 0x9fa5)
|
||||
{
|
||||
/* Han Ideographic */
|
||||
return 2;
|
||||
}
|
||||
else if (0xf900 <= c && c <= 0xfa2d)
|
||||
{
|
||||
/* Han Compatibility Ideographs */
|
||||
return 2;
|
||||
}
|
||||
tracer.WriteLine("failed to locate char {0}, return 1", (int)c);
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
// Return the length of a VT100 control sequence character in str starting
|
||||
// at the given offset.
|
||||
|
||||
Reference in new issue
Block a user