Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

80 lines
1.9 KiB

  1. /*++
  2. Copyright (c) 1995 Microsoft Corporation
  3. Module Name:
  4. jpnldraw.c
  5. Abstract:
  6. Line-draw related stuff for FarEast locale-specific
  7. setupdd.sys support module.
  8. Author:
  9. Ted Miller (tedm) 04-July-1995
  10. Revision History:
  11. --*/
  12. #include <precomp.h>
  13. #pragma hdrstop
  14. //
  15. // Define mapping from line draw character index enum to
  16. // unicode value.
  17. //
  18. WCHAR LineCharIndexToUnicodeValue[LineCharMax] = {
  19. 0x0001, // DoubleUpperLeft
  20. 0x0002, // DoubleUpperRight
  21. 0x0003, // DoubleLowerLeft
  22. 0x0004, // DoubleLowerRight
  23. 0x0006, // DoubleHorizontal
  24. 0x0005, // DoubleVertical
  25. 0x0001, // SingleUpperLeft
  26. 0x0002, // SingleUpperRight
  27. 0x0003, // SingleLowerLeft
  28. 0x0004, // SingleLowerRight
  29. 0x0006, // SingleHorizontal
  30. 0x0005, // SingleVertical
  31. 0x0019, // DoubleVerticalToSingleHorizontalRight,
  32. 0x0017 // DoubleVerticalToSingleHorizontalLeft,
  33. };
  34. WCHAR
  35. FEGetLineDrawChar(
  36. IN LineCharIndex WhichChar
  37. )
  38. /*++
  39. Routine Description:
  40. Retreive a unicode value corresponsing to a particular desired linedraw
  41. character. The FarEast font we use during Setup does not have these chars
  42. so they are actually hand-placed into the in-memory image of the font
  43. and we assign fake values that work during setup.
  44. Arguments:
  45. WhichChar - indicates which line draw character's unicode value
  46. is desired.
  47. Return Value:
  48. Unicode value for desired line draw character.
  49. --*/
  50. {
  51. ASSERT((ULONG)WhichChar < (ULONG)LineCharMax);
  52. return( ((ULONG)WhichChar < (ULONG)LineCharMax)
  53. ? LineCharIndexToUnicodeValue[WhichChar] : L' '
  54. );
  55. }