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.

165 lines
6.2 KiB

  1. /***********************************************************************
  2. // INTERNAT.H
  3. //
  4. // Copyright (c) 1992, 1993 - Microsoft Corp.
  5. // All rights reserved.
  6. // Microsoft Confidential
  7. //
  8. // Include file for international specific options.
  9. //
  10. // Johnhe 03-10-92
  11. // TABS = 3
  12. ***********************************************************************/
  13. #ifndef INTERNAT_INC
  14. #define INTERNAT_INC 1 // INTERNAT.H signature
  15. #ifdef DBCS
  16. #define SkipDBCSLeadByte( x ) {if IsDBCLeadByte( szPtr ) szPtr++;}
  17. #else
  18. #define SkipDBCSLeadByte( x )
  19. #endif
  20. //**********************************************************************
  21. // BUGBUG - need to move to resource file
  22. //**********************************************************************
  23. #define AM_PM_STRINGS { "A", "AM", "P", "PM", NULL }
  24. #define PM_CHAR 'P'
  25. #define AM_CHAR 'A'
  26. #define AMPM_TRAIL_CHAR 'M'
  27. #define DATE_DELIMITER_STR "-/." // Date seperators ('-' is replaced)
  28. //**********************************************************************
  29. // Command line delimiters
  30. //**********************************************************************
  31. #define CHAR_COMMA ','
  32. #define CHAR_EOL '\0'
  33. #define CHAR_PLUS '+'
  34. #define CHAR_MINUS '-'
  35. #define CHAR_SIMICOLON ';'
  36. #define CHAR_SRCHSTR '"'
  37. #define CHAR_SWITCH '/'
  38. #define CHAR_QUOTE '"'
  39. #define CHAR_SPC ' '
  40. #define CHAR_TAB '\t'
  41. #define DOUBLE_SLASH 0x2f2f // Double slash chars "//"
  42. #define UNC_WORD 0x5c5c // UNC specifier ("\\\\")
  43. #define CUR_DIR_STR "."
  44. #define PARENT_DIR_STR ".."
  45. #define PATH_CHAR_STR "\\"
  46. #define PATH_CHAR '\\'
  47. #define DRIVE_DELIMITER ':'
  48. #define WILD_NAME_CHAR '*' // All remaining wildcarc
  49. #define WILD_CHAR '?' // Single wildcard character
  50. #define MULTI_WILDCARDS 1 // Allow multiple wildcards filenames
  51. #define FILE_EXT_CHAR '.' // File extension seperator
  52. #define CHAR_NOT_ATTRIB '-' // Invert attribute switch
  53. //***********************************************************************
  54. //***********************************************************************
  55. #define GET_EXTINFO 1 // Fill in extended info structure
  56. #define GET_CASEMAP 2 // Get ptr to case map table
  57. #define GET_FNCASEMAP 4 // Get ptr to filename case map table
  58. #define GET_FNAME_CHARS 5 // Get ptr to filename character table
  59. #define GET_COLLATE 6 // Get ptr to collate table
  60. #define GET_DBYTE_SET 7 // Get ptr to double-byte char set
  61. #define DEFAULT_CODEPAGE 0xffff
  62. #define DEFAULT_COUNTRY 0xffff
  63. #define USA_CNTRY_ID 1 // Default country ID
  64. #define USA_CODE_PAGE 437 // Default country code page
  65. #define ASCII_LEN 256 // # of ASCII characters
  66. #define NON_EXT_LEN (ASCII_LEN / 2) // # of non-ext ASCII chars
  67. #define EXT_ASCII_LEN (ASCII_LEN / 2) // # of ext ASCII chars
  68. #define COLLATE_TABLE_LEN ASCII_LEN
  69. //***********************************************************************
  70. // CntryTable_s is a structure which is filled in by DOS function 65xxh
  71. //***********************************************************************
  72. #ifndef CntryTable_s
  73. typedef struct CntryTable_s
  74. {
  75. char IdByte;
  76. unsigned char far *fpAddr;
  77. } CNTRY_TABLE;
  78. #endif
  79. //**********************************************************************
  80. // COUNTRY_INFO is the structure of the data returned by DOS function
  81. // 0x38.
  82. //**********************************************************************
  83. #ifndef COUNTRY_DEFINED
  84. struct COUNTRY_INFO
  85. {
  86. char ccSetCountryInfo; // SetCountryInfo
  87. unsigned ccCountryInfoLen; // length of country info
  88. unsigned ccDosCountry; // active country code id
  89. unsigned ccDosCodePage; // active code page id
  90. unsigned ccDFormat; // date format
  91. char ccCurSymbol[ 5 ]; // 5 byte of (currency symbol+0)
  92. char cc1000Sep[ 2 ]; // 2 byte of (1000 sep. + 0)
  93. char ccDecSep[ 2 ]; // 2 byte of (Decimal sep. + 0)
  94. char ccDateSep[ 2 ]; // 2 byte of (date sep. + 0)
  95. char ccTimeSep[ 2 ]; // 2 byte of (time sep. + 0)
  96. char ccCFormat; // currency format flags
  97. char ccCSigDigits; // # of digits in currency
  98. char ccTFormat; // time format
  99. char far *ccMono_Ptr; // monocase routine entry point
  100. char ccListSep[ 2 ]; // data list separator
  101. unsigned ccReserved_area[ 5 ]; // reserved
  102. };
  103. #define COUNTRY_DEFINED 1
  104. #endif
  105. //**********************************************************************
  106. // Global country specific tables.
  107. //**********************************************************************
  108. extern unsigned char near CollateTable[ ASCII_LEN ];
  109. extern unsigned char near CaseMap[ ASCII_LEN ];
  110. extern unsigned char near FnameCharTable[ ASCII_LEN ];
  111. extern unsigned char near DBCSLeadByteTable[ ASCII_LEN ];
  112. extern struct COUNTRY_INFO near Cntry; // DOS country info structure
  113. //**********************************************************************
  114. // Function prototypes.
  115. //**********************************************************************
  116. extern void GetCountryInfo ( struct COUNTRY_INFO *Cntry );
  117. extern int GetExtCountryInfo( unsigned InfoType, unsigned CodePage,
  118. unsigned CountryCode,
  119. struct COUNTRY_INFO *pTable );
  120. extern void InitCountryInfo ( void );
  121. #ifdef DBCS
  122. int IsDBCSLeadByte ( unsigned char c );
  123. int CheckDBCSTailByte( unsigned char *str, unsigned char *point );
  124. unsigned char *DBCSstrupr ( unsigned char *str );
  125. unsigned char *DBCSstrchr( unsigned char *str, unsigned char c );
  126. #endif
  127. //***************************************************************************
  128. //
  129. // End of INTERNAT.H
  130. //
  131. //***************************************************************************
  132. #endif // INTERNAT_INC