Windows NT 4.0 source code leak
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.

934 lines
34 KiB

4 years ago
  1. /**************************************************************************
  2. * *
  3. * winnls.h -- NLS procedure declarations, constant definitions and macros *
  4. * *
  5. * Copyright (c) 1991-1996, Microsoft Corp. All rights reserved. *
  6. * *
  7. **************************************************************************/
  8. /*++ BUILD Version: 0003 // Increment this if a change has global effects ;internal_NT
  9. ;internal_NT
  10. Copyright (c) 1991-1996, Microsoft Corporation ;internal_NT
  11. ;internal_NT
  12. Module Name: ;internal_NT
  13. ;internal_NT
  14. winnlsp.h ;internal_NT
  15. ;internal_NT
  16. Abstract: ;internal_NT
  17. ;internal_NT
  18. Procedure declarations, constant definitions, and macros for the ;internal_NT
  19. NLS component. ;internal_NT
  20. ;internal_NT
  21. --*/ ;internal_NT
  22. #ifndef _WINNLS_
  23. #define _WINNLS_
  24. #ifndef _WINNLSP_ ;internal_NT
  25. #define _WINNLSP_ ;internal_NT
  26. ;begin_both
  27. #ifdef __cplusplus
  28. extern "C" {
  29. #endif
  30. ;end_both
  31. #ifndef NONLS
  32. /***************************************************************************\
  33. * Constants
  34. *
  35. * Define all constants for the NLS component here.
  36. \***************************************************************************/
  37. /*
  38. * String Length Maximums.
  39. */
  40. #define MAX_LEADBYTES 12 /* 5 ranges, 2 bytes ea., 0 term. */
  41. #define MAX_DEFAULTCHAR 2 /* single or double byte */
  42. /*
  43. * MBCS and Unicode Translation Flags.
  44. */
  45. #define MB_PRECOMPOSED 0x00000001 /* use precomposed chars */
  46. #define MB_COMPOSITE 0x00000002 /* use composite chars */
  47. #define MB_USEGLYPHCHARS 0x00000004 /* use glyph chars, not ctrl chars */
  48. #define MB_ERR_INVALID_CHARS 0x00000008 /* error for invalid chars */
  49. #define WC_DEFAULTCHECK 0x00000100 /* check for default char */
  50. #define WC_COMPOSITECHECK 0x00000200 /* convert composite to precomposed */
  51. #define WC_DISCARDNS 0x00000010 /* discard non-spacing chars */
  52. #define WC_SEPCHARS 0x00000020 /* generate separate chars */
  53. #define WC_DEFAULTCHAR 0x00000040 /* replace w/ default char */
  54. /*
  55. * Character Type Flags.
  56. */
  57. #define CT_CTYPE1 0x00000001 /* ctype 1 information */
  58. #define CT_CTYPE2 0x00000002 /* ctype 2 information */
  59. #define CT_CTYPE3 0x00000004 /* ctype 3 information */
  60. /*
  61. * CType 1 Flag Bits.
  62. */
  63. #define C1_UPPER 0x0001 /* upper case */
  64. #define C1_LOWER 0x0002 /* lower case */
  65. #define C1_DIGIT 0x0004 /* decimal digits */
  66. #define C1_SPACE 0x0008 /* spacing characters */
  67. #define C1_PUNCT 0x0010 /* punctuation characters */
  68. #define C1_CNTRL 0x0020 /* control characters */
  69. #define C1_BLANK 0x0040 /* blank characters */
  70. #define C1_XDIGIT 0x0080 /* other digits */
  71. #define C1_ALPHA 0x0100 /* any linguistic character */
  72. /*
  73. * CType 2 Flag Bits.
  74. */
  75. #define C2_LEFTTORIGHT 0x0001 /* left to right */
  76. #define C2_RIGHTTOLEFT 0x0002 /* right to left */
  77. #define C2_EUROPENUMBER 0x0003 /* European number, digit */
  78. #define C2_EUROPESEPARATOR 0x0004 /* European numeric separator */
  79. #define C2_EUROPETERMINATOR 0x0005 /* European numeric terminator */
  80. #define C2_ARABICNUMBER 0x0006 /* Arabic number */
  81. #define C2_COMMONSEPARATOR 0x0007 /* common numeric separator */
  82. #define C2_BLOCKSEPARATOR 0x0008 /* block separator */
  83. #define C2_SEGMENTSEPARATOR 0x0009 /* segment separator */
  84. #define C2_WHITESPACE 0x000A /* white space */
  85. #define C2_OTHERNEUTRAL 0x000B /* other neutrals */
  86. #define C2_NOTAPPLICABLE 0x0000 /* no implicit directionality */
  87. /*
  88. * CType 3 Flag Bits.
  89. */
  90. #define C3_NONSPACING 0x0001 /* nonspacing character */
  91. #define C3_DIACRITIC 0x0002 /* diacritic mark */
  92. #define C3_VOWELMARK 0x0004 /* vowel mark */
  93. #define C3_SYMBOL 0x0008 /* symbols */
  94. #define C3_KATAKANA 0x0010 /* katakana character */
  95. #define C3_HIRAGANA 0x0020 /* hiragana character */
  96. #define C3_HALFWIDTH 0x0040 /* half width character */
  97. #define C3_FULLWIDTH 0x0080 /* full width character */
  98. #define C3_IDEOGRAPH 0x0100 /* ideographic character */
  99. #define C3_KASHIDA 0x0200 /* Arabic kashida character */
  100. #define C3_LEXICAL 0x0400 /* lexical character */
  101. #define C3_ALPHA 0x8000 /* any linguistic char (C1_ALPHA) */
  102. #define C3_NOTAPPLICABLE 0x0000 /* ctype 3 is not applicable */
  103. /*
  104. * String Flags.
  105. */
  106. #define NORM_IGNORECASE 0x00000001 /* ignore case */
  107. #define NORM_IGNORENONSPACE 0x00000002 /* ignore nonspacing chars */
  108. #define NORM_IGNORESYMBOLS 0x00000004 /* ignore symbols */
  109. #define NORM_IGNOREKANATYPE 0x00010000 /* ignore kanatype */
  110. #define NORM_IGNOREWIDTH 0x00020000 /* ignore width */
  111. #define NORM_STOP_ON_NULL 0x10000000 /* stop at the null termination */ ;internal_NT
  112. /*
  113. * Locale Independent Mapping Flags.
  114. */
  115. #define MAP_FOLDCZONE 0x00000010 /* fold compatibility zone chars */
  116. #define MAP_PRECOMPOSED 0x00000020 /* convert to precomposed chars */
  117. #define MAP_COMPOSITE 0x00000040 /* convert to composite chars */
  118. #define MAP_FOLDDIGITS 0x00000080 /* all digits to ASCII 0-9 */
  119. /*
  120. * Locale Dependent Mapping Flags.
  121. */
  122. #define LCMAP_LOWERCASE 0x00000100 /* lower case letters */
  123. #define LCMAP_UPPERCASE 0x00000200 /* upper case letters */
  124. #define LCMAP_SORTKEY 0x00000400 /* WC sort key (normalize) */
  125. #define LCMAP_BYTEREV 0x00000800 /* byte reversal */
  126. #define LCMAP_HIRAGANA 0x00100000 /* map katakana to hiragana */
  127. #define LCMAP_KATAKANA 0x00200000 /* map hiragana to katakana */
  128. #define LCMAP_HALFWIDTH 0x00400000 /* map double byte to single byte */
  129. #define LCMAP_FULLWIDTH 0x00800000 /* map single byte to double byte */
  130. #define LCMAP_LINGUISTIC_CASING 0x01000000 /* use linguistic rules for casing */
  131. #define LCMAP_SIMPLIFIED_CHINESE 0x02000000 /* map traditional chinese to simplified chinese */
  132. #define LCMAP_TRADITIONAL_CHINESE 0x04000000 /* map simplified chinese to traditional chinese */
  133. #define LCMAP_IGNOREDBCS 0x01000000 /* don't casemap DBCS characters */ ;internal_win40
  134. /*
  135. * Locale Enumeration Flags.
  136. */
  137. #define LCID_INSTALLED 0x00000001 /* installed locale ids */
  138. #define LCID_SUPPORTED 0x00000002 /* supported locale ids */
  139. /*
  140. * Code Page Enumeration Flags.
  141. */
  142. #define CP_INSTALLED 0x00000001 /* installed code page ids */
  143. #define CP_SUPPORTED 0x00000002 /* supported code page ids */
  144. /*
  145. * Sorting Flags.
  146. *
  147. * WORD Sort: culturally correct sort
  148. * hyphen and apostrophe are special cased
  149. * example: "coop" and "co-op" will sort together in a list
  150. *
  151. * co_op <------- underscore (symbol)
  152. * coat
  153. * comb
  154. * coop
  155. * co-op <------- hyphen (punctuation)
  156. * cork
  157. * went
  158. * were
  159. * we're <------- apostrophe (punctuation)
  160. *
  161. *
  162. * STRING Sort: hyphen and apostrophe will sort with all other symbols
  163. *
  164. * co-op <------- hyphen (punctuation)
  165. * co_op <------- underscore (symbol)
  166. * coat
  167. * comb
  168. * coop
  169. * cork
  170. * we're <------- apostrophe (punctuation)
  171. * went
  172. * were
  173. */
  174. #define SORT_STRINGSORT 0x00001000 /* use string sort method */
  175. /*
  176. * Code Page Default Values.
  177. */
  178. #define CP_ACP 0 /* default to ANSI code page */
  179. #define CP_OEMCP 1 /* default to OEM code page */
  180. #define CP_MACCP 2 /* default to MAC code page */
  181. #define CP_UTF7 65000 /* UTF-7 translation */
  182. #define CP_UTF8 65001 /* UTF-8 translation */
  183. /*
  184. * Country Codes.
  185. */
  186. #define CTRY_DEFAULT 0
  187. #define CTRY_AUSTRALIA 61 /* Australia */
  188. #define CTRY_AUSTRIA 43 /* Austria */
  189. #define CTRY_BELGIUM 32 /* Belgium */
  190. #define CTRY_BRAZIL 55 /* Brazil */
  191. #define CTRY_BULGARIA 359 /* Bulgaria */
  192. #define CTRY_CANADA 2 /* Canada */
  193. #define CTRY_CROATIA 385 /* Croatia */
  194. #define CTRY_CZECH 42 /* Czech Republic */
  195. #define CTRY_DENMARK 45 /* Denmark */
  196. #define CTRY_FINLAND 358 /* Finland */
  197. #define CTRY_FRANCE 33 /* France */
  198. #define CTRY_GERMANY 49 /* Germany */
  199. #define CTRY_GREECE 30 /* Greece */
  200. #define CTRY_HONG_KONG 852 /* Hong Kong */
  201. #define CTRY_HUNGARY 36 /* Hungary */
  202. #define CTRY_ICELAND 354 /* Iceland */
  203. #define CTRY_IRELAND 353 /* Ireland */
  204. #define CTRY_ITALY 39 /* Italy */
  205. #define CTRY_JAPAN 81 /* Japan */
  206. #define CTRY_MEXICO 52 /* Mexico */
  207. #define CTRY_NETHERLANDS 31 /* Netherlands */
  208. #define CTRY_NEW_ZEALAND 64 /* New Zealand */
  209. #define CTRY_NORWAY 47 /* Norway */
  210. #define CTRY_POLAND 48 /* Poland */
  211. #define CTRY_PORTUGAL 351 /* Portugal */
  212. #define CTRY_PRCHINA 86 /* Peoples' Republic of China */
  213. #define CTRY_ROMANIA 40 /* Romania */
  214. #define CTRY_RUSSIA 7 /* Russia */
  215. #define CTRY_SINGAPORE 65 /* Singapore */
  216. #define CTRY_SLOVAK 42 /* Slovak Republic */
  217. #define CTRY_SLOVENIA 386 /* Slovenia */
  218. #define CTRY_SOUTH_KOREA 82 /* South Korea */
  219. #define CTRY_SPAIN 34 /* Spain */
  220. #define CTRY_SWEDEN 46 /* Sweden */
  221. #define CTRY_SWITZERLAND 41 /* Switzerland */
  222. #define CTRY_TAIWAN 886 /* Taiwan */
  223. #define CTRY_TURKEY 90 /* Turkey */
  224. #define CTRY_UNITED_KINGDOM 44 /* United Kingdom */
  225. #define CTRY_UNITED_STATES 1 /* United States */
  226. /*
  227. * Locale Types.
  228. *
  229. * These types are used for the GetLocaleInfoW NLS API routine.
  230. *
  231. * LOCALE_NOUSEROVERRIDE is also used in GetTimeFormatW and GetDateFormatW.
  232. *
  233. * LOCALE_USE_CP_ACP is used in many of the A (Ansi) apis that need to do
  234. * string translation.
  235. */
  236. #define LOCALE_NOUSEROVERRIDE 0x80000000 /* do not use user overrides */
  237. #define LOCALE_USE_CP_ACP 0x40000000 /* use the system ACP */
  238. #define LOCALE_RETURN_NUMBER 0x20000000 /* return number instead of string */ ;internal_NT
  239. #define LOCALE_ILANGUAGE 0x00000001 /* language id */
  240. #define LOCALE_SLANGUAGE 0x00000002 /* localized name of language */
  241. #define LOCALE_SENGLANGUAGE 0x00001001 /* English name of language */
  242. #define LOCALE_SABBREVLANGNAME 0x00000003 /* abbreviated language name */
  243. #define LOCALE_SNATIVELANGNAME 0x00000004 /* native name of language */
  244. #define LOCALE_ICOUNTRY 0x00000005 /* country code */
  245. #define LOCALE_SCOUNTRY 0x00000006 /* localized name of country */
  246. #define LOCALE_SENGCOUNTRY 0x00001002 /* English name of country */
  247. #define LOCALE_SABBREVCTRYNAME 0x00000007 /* abbreviated country name */
  248. #define LOCALE_SNATIVECTRYNAME 0x00000008 /* native name of country */
  249. #define LOCALE_IDEFAULTLANGUAGE 0x00000009 /* default language id */
  250. #define LOCALE_IDEFAULTCOUNTRY 0x0000000A /* default country code */
  251. #define LOCALE_IDEFAULTCODEPAGE 0x0000000B /* default oem code page */
  252. #define LOCALE_IDEFAULTANSICODEPAGE 0x00001004 /* default ansi code page */
  253. #define LOCALE_IDEFAULTMACCODEPAGE 0x00001011 /* default mac code page */
  254. #define LOCALE_SLIST 0x0000000C /* list item separator */
  255. #define LOCALE_IMEASURE 0x0000000D /* 0 = metric, 1 = US */
  256. #define LOCALE_SDECIMAL 0x0000000E /* decimal separator */
  257. #define LOCALE_STHOUSAND 0x0000000F /* thousand separator */
  258. #define LOCALE_SGROUPING 0x00000010 /* digit grouping */
  259. #define LOCALE_IDIGITS 0x00000011 /* number of fractional digits */
  260. #define LOCALE_ILZERO 0x00000012 /* leading zeros for decimal */
  261. #define LOCALE_INEGNUMBER 0x00001010 /* negative number mode */
  262. #define LOCALE_SNATIVEDIGITS 0x00000013 /* native ascii 0-9 */
  263. #define LOCALE_SCURRENCY 0x00000014 /* local monetary symbol */
  264. #define LOCALE_SINTLSYMBOL 0x00000015 /* intl monetary symbol */
  265. #define LOCALE_SMONDECIMALSEP 0x00000016 /* monetary decimal separator */
  266. #define LOCALE_SMONTHOUSANDSEP 0x00000017 /* monetary thousand separator */
  267. #define LOCALE_SMONGROUPING 0x00000018 /* monetary grouping */
  268. #define LOCALE_ICURRDIGITS 0x00000019 /* # local monetary digits */
  269. #define LOCALE_IINTLCURRDIGITS 0x0000001A /* # intl monetary digits */
  270. #define LOCALE_ICURRENCY 0x0000001B /* positive currency mode */
  271. #define LOCALE_INEGCURR 0x0000001C /* negative currency mode */
  272. #define LOCALE_SDATE 0x0000001D /* date separator */
  273. #define LOCALE_STIME 0x0000001E /* time separator */
  274. #define LOCALE_SSHORTDATE 0x0000001F /* short date format string */
  275. #define LOCALE_SLONGDATE 0x00000020 /* long date format string */
  276. #define LOCALE_STIMEFORMAT 0x00001003 /* time format string */
  277. #define LOCALE_IDATE 0x00000021 /* short date format ordering */
  278. #define LOCALE_ILDATE 0x00000022 /* long date format ordering */
  279. #define LOCALE_ITIME 0x00000023 /* time format specifier */
  280. #define LOCALE_ITIMEMARKPOSN 0x00001005 /* time marker position */
  281. #define LOCALE_ICENTURY 0x00000024 /* century format specifier (short date) */
  282. #define LOCALE_ITLZERO 0x00000025 /* leading zeros in time field */
  283. #define LOCALE_IDAYLZERO 0x00000026 /* leading zeros in day field (short date) */
  284. #define LOCALE_IMONLZERO 0x00000027 /* leading zeros in month field (short date) */
  285. #define LOCALE_S1159 0x00000028 /* AM designator */
  286. #define LOCALE_S2359 0x00000029 /* PM designator */
  287. #define LOCALE_ICALENDARTYPE 0x00001009 /* type of calendar specifier */
  288. #define LOCALE_IOPTIONALCALENDAR 0x0000100B /* additional calendar types specifier */
  289. #define LOCALE_IFIRSTDAYOFWEEK 0x0000100C /* first day of week specifier */
  290. #define LOCALE_IFIRSTWEEKOFYEAR 0x0000100D /* first week of year specifier */
  291. #define LOCALE_SDAYNAME1 0x0000002A /* long name for Monday */
  292. #define LOCALE_SDAYNAME2 0x0000002B /* long name for Tuesday */
  293. #define LOCALE_SDAYNAME3 0x0000002C /* long name for Wednesday */
  294. #define LOCALE_SDAYNAME4 0x0000002D /* long name for Thursday */
  295. #define LOCALE_SDAYNAME5 0x0000002E /* long name for Friday */
  296. #define LOCALE_SDAYNAME6 0x0000002F /* long name for Saturday */
  297. #define LOCALE_SDAYNAME7 0x00000030 /* long name for Sunday */
  298. #define LOCALE_SABBREVDAYNAME1 0x00000031 /* abbreviated name for Monday */
  299. #define LOCALE_SABBREVDAYNAME2 0x00000032 /* abbreviated name for Tuesday */
  300. #define LOCALE_SABBREVDAYNAME3 0x00000033 /* abbreviated name for Wednesday */
  301. #define LOCALE_SABBREVDAYNAME4 0x00000034 /* abbreviated name for Thursday */
  302. #define LOCALE_SABBREVDAYNAME5 0x00000035 /* abbreviated name for Friday */
  303. #define LOCALE_SABBREVDAYNAME6 0x00000036 /* abbreviated name for Saturday */
  304. #define LOCALE_SABBREVDAYNAME7 0x00000037 /* abbreviated name for Sunday */
  305. #define LOCALE_SMONTHNAME1 0x00000038 /* long name for January */
  306. #define LOCALE_SMONTHNAME2 0x00000039 /* long name for February */
  307. #define LOCALE_SMONTHNAME3 0x0000003A /* long name for March */
  308. #define LOCALE_SMONTHNAME4 0x0000003B /* long name for April */
  309. #define LOCALE_SMONTHNAME5 0x0000003C /* long name for May */
  310. #define LOCALE_SMONTHNAME6 0x0000003D /* long name for June */
  311. #define LOCALE_SMONTHNAME7 0x0000003E /* long name for July */
  312. #define LOCALE_SMONTHNAME8 0x0000003F /* long name for August */
  313. #define LOCALE_SMONTHNAME9 0x00000040 /* long name for September */
  314. #define LOCALE_SMONTHNAME10 0x00000041 /* long name for October */
  315. #define LOCALE_SMONTHNAME11 0x00000042 /* long name for November */
  316. #define LOCALE_SMONTHNAME12 0x00000043 /* long name for December */
  317. #define LOCALE_SMONTHNAME13 0x0000100E /* long name for 13th month (if exists) */
  318. #define LOCALE_SABBREVMONTHNAME1 0x00000044 /* abbreviated name for January */
  319. #define LOCALE_SABBREVMONTHNAME2 0x00000045 /* abbreviated name for February */
  320. #define LOCALE_SABBREVMONTHNAME3 0x00000046 /* abbreviated name for March */
  321. #define LOCALE_SABBREVMONTHNAME4 0x00000047 /* abbreviated name for April */
  322. #define LOCALE_SABBREVMONTHNAME5 0x00000048 /* abbreviated name for May */
  323. #define LOCALE_SABBREVMONTHNAME6 0x00000049 /* abbreviated name for June */
  324. #define LOCALE_SABBREVMONTHNAME7 0x0000004A /* abbreviated name for July */
  325. #define LOCALE_SABBREVMONTHNAME8 0x0000004B /* abbreviated name for August */
  326. #define LOCALE_SABBREVMONTHNAME9 0x0000004C /* abbreviated name for September */
  327. #define LOCALE_SABBREVMONTHNAME10 0x0000004D /* abbreviated name for October */
  328. #define LOCALE_SABBREVMONTHNAME11 0x0000004E /* abbreviated name for November */
  329. #define LOCALE_SABBREVMONTHNAME12 0x0000004F /* abbreviated name for December */
  330. #define LOCALE_SABBREVMONTHNAME13 0x0000100F /* abbreviated name for 13th month (if exists) */
  331. #define LOCALE_SPOSITIVESIGN 0x00000050 /* positive sign */
  332. #define LOCALE_SNEGATIVESIGN 0x00000051 /* negative sign */
  333. #define LOCALE_IPOSSIGNPOSN 0x00000052 /* positive sign position */
  334. #define LOCALE_INEGSIGNPOSN 0x00000053 /* negative sign position */
  335. #define LOCALE_IPOSSYMPRECEDES 0x00000054 /* mon sym precedes pos amt */
  336. #define LOCALE_IPOSSEPBYSPACE 0x00000055 /* mon sym sep by space from pos amt */
  337. #define LOCALE_INEGSYMPRECEDES 0x00000056 /* mon sym precedes neg amt */
  338. #define LOCALE_INEGSEPBYSPACE 0x00000057 /* mon sym sep by space from neg amt */
  339. ;begin_winver_400
  340. #define LOCALE_FONTSIGNATURE 0x00000058 /* font signature */
  341. #define LOCALE_SISO639LANGNAME 0x00000059 /* ISO abbreviated language name */
  342. #define LOCALE_SISO3166CTRYNAME 0x0000005A /* ISO abbreviated country name */
  343. ;end_winver_400
  344. /*
  345. * Time Flags for GetTimeFormatW.
  346. */
  347. #define TIME_NOMINUTESORSECONDS 0x00000001 /* do not use minutes or seconds */
  348. #define TIME_NOSECONDS 0x00000002 /* do not use seconds */
  349. #define TIME_NOTIMEMARKER 0x00000004 /* do not use time marker */
  350. #define TIME_FORCE24HOURFORMAT 0x00000008 /* always use 24 hour format */
  351. /*
  352. * Date Flags for GetDateFormatW.
  353. */
  354. #define DATE_SHORTDATE 0x00000001 /* use short date picture */
  355. #define DATE_LONGDATE 0x00000002 /* use long date picture */
  356. #define DATE_USE_ALT_CALENDAR 0x00000004 /* use alternate calendar (if any) */
  357. /*
  358. * Calendar Types.
  359. *
  360. * These types are used for the GetALTCalendarInfoW NLS API routine.
  361. */
  362. #define CAL_ICALINTVALUE 0x00000001 /* calendar type */
  363. #define CAL_SCALNAME 0x00000002 /* native name of calendar */
  364. #define CAL_IYEAROFFSETRANGE 0x00000003 /* starting years of eras */
  365. #define CAL_SERASTRING 0x00000004 /* era name for IYearOffsetRanges */
  366. #define CAL_SSHORTDATE 0x00000005 /* short date format string */
  367. #define CAL_SLONGDATE 0x00000006 /* long date format string */
  368. #define CAL_SDAYNAME1 0x00000007 /* native name for Monday */
  369. #define CAL_SDAYNAME2 0x00000008 /* native name for Tuesday */
  370. #define CAL_SDAYNAME3 0x00000009 /* native name for Wednesday */
  371. #define CAL_SDAYNAME4 0x0000000a /* native name for Thursday */
  372. #define CAL_SDAYNAME5 0x0000000b /* native name for Friday */
  373. #define CAL_SDAYNAME6 0x0000000c /* native name for Saturday */
  374. #define CAL_SDAYNAME7 0x0000000d /* native name for Sunday */
  375. #define CAL_SABBREVDAYNAME1 0x0000000e /* abbreviated name for Monday */
  376. #define CAL_SABBREVDAYNAME2 0x0000000f /* abbreviated name for Tuesday */
  377. #define CAL_SABBREVDAYNAME3 0x00000010 /* abbreviated name for Wednesday */
  378. #define CAL_SABBREVDAYNAME4 0x00000011 /* abbreviated name for Thursday */
  379. #define CAL_SABBREVDAYNAME5 0x00000012 /* abbreviated name for Friday */
  380. #define CAL_SABBREVDAYNAME6 0x00000013 /* abbreviated name for Saturday */
  381. #define CAL_SABBREVDAYNAME7 0x00000014 /* abbreviated name for Sunday */
  382. #define CAL_SMONTHNAME1 0x00000015 /* native name for January */
  383. #define CAL_SMONTHNAME2 0x00000016 /* native name for February */
  384. #define CAL_SMONTHNAME3 0x00000017 /* native name for March */
  385. #define CAL_SMONTHNAME4 0x00000018 /* native name for April */
  386. #define CAL_SMONTHNAME5 0x00000019 /* native name for May */
  387. #define CAL_SMONTHNAME6 0x0000001a /* native name for June */
  388. #define CAL_SMONTHNAME7 0x0000001b /* native name for July */
  389. #define CAL_SMONTHNAME8 0x0000001c /* native name for August */
  390. #define CAL_SMONTHNAME9 0x0000001d /* native name for September */
  391. #define CAL_SMONTHNAME10 0x0000001e /* native name for October */
  392. #define CAL_SMONTHNAME11 0x0000001f /* native name for November */
  393. #define CAL_SMONTHNAME12 0x00000020 /* native name for December */
  394. #define CAL_SMONTHNAME13 0x00000021 /* native name for 13th month (if any) */
  395. #define CAL_SABBREVMONTHNAME1 0x00000022 /* abbreviated name for January */
  396. #define CAL_SABBREVMONTHNAME2 0x00000023 /* abbreviated name for February */
  397. #define CAL_SABBREVMONTHNAME3 0x00000024 /* abbreviated name for March */
  398. #define CAL_SABBREVMONTHNAME4 0x00000025 /* abbreviated name for April */
  399. #define CAL_SABBREVMONTHNAME5 0x00000026 /* abbreviated name for May */
  400. #define CAL_SABBREVMONTHNAME6 0x00000027 /* abbreviated name for June */
  401. #define CAL_SABBREVMONTHNAME7 0x00000028 /* abbreviated name for July */
  402. #define CAL_SABBREVMONTHNAME8 0x00000029 /* abbreviated name for August */
  403. #define CAL_SABBREVMONTHNAME9 0x0000002a /* abbreviated name for September */
  404. #define CAL_SABBREVMONTHNAME10 0x0000002b /* abbreviated name for October */
  405. #define CAL_SABBREVMONTHNAME11 0x0000002c /* abbreviated name for November */
  406. #define CAL_SABBREVMONTHNAME12 0x0000002d /* abbreviated name for December */
  407. #define CAL_SABBREVMONTHNAME13 0x0000002e /* abbreviated name for 13th month (if any) */
  408. /*
  409. * Calendar Enumeration Value.
  410. */
  411. #define ENUM_ALL_CALENDARS 0xffffffff /* enumerate all calendars */
  412. /*
  413. * Calendar ID Values.
  414. */
  415. #define CAL_GREGORIAN 1 /* Gregorian (localized) calendar */
  416. #define CAL_GREGORIAN_US 2 /* Gregorian (U.S.) calendar */
  417. #define CAL_JAPAN 3 /* Japanese Emperor Era calendar */
  418. #define CAL_TAIWAN 4 /* Republic of China Era calendar */
  419. #define CAL_KOREA 5 /* Korean Tangun Era calendar */
  420. #define CAL_HIJRI 6 /* Hijri (Arabic Lunar) calendar */
  421. #define CAL_THAI 7 /* Thai calendar */
  422. #define CAL_HEBREW 8 /* Hebrew calendar */
  423. /***************************************************************************\
  424. * Typedefs
  425. *
  426. * Define all types for the NLS component here.
  427. \***************************************************************************/
  428. /*
  429. * Locale type constant.
  430. */
  431. typedef DWORD LCTYPE;
  432. /*
  433. * Calendar type constant.
  434. */
  435. typedef DWORD CALTYPE;
  436. /*
  437. * Calendar ID.
  438. */
  439. typedef DWORD CALID;
  440. /*
  441. * CP Info.
  442. */
  443. typedef struct _cpinfo {
  444. UINT MaxCharSize; /* max length (bytes) of a char */
  445. BYTE DefaultChar[MAX_DEFAULTCHAR]; /* default character */
  446. BYTE LeadByte[MAX_LEADBYTES]; /* lead byte ranges */
  447. } CPINFO, *LPCPINFO;
  448. /*
  449. * Number format.
  450. */
  451. typedef struct _numberfmt% {
  452. UINT NumDigits; /* number of decimal digits */
  453. UINT LeadingZero; /* if leading zero in decimal fields */
  454. UINT Grouping; /* group size left of decimal */
  455. LPTSTR% lpDecimalSep; /* ptr to decimal separator string */
  456. LPTSTR% lpThousandSep; /* ptr to thousand separator string */
  457. UINT NegativeOrder; /* negative number ordering */
  458. } NUMBERFMT%, *LPNUMBERFMT%;
  459. /*
  460. * Currency format.
  461. */
  462. typedef struct _currencyfmt% {
  463. UINT NumDigits; /* number of decimal digits */
  464. UINT LeadingZero; /* if leading zero in decimal fields */
  465. UINT Grouping; /* group size left of decimal */
  466. LPTSTR% lpDecimalSep; /* ptr to decimal separator string */
  467. LPTSTR% lpThousandSep; /* ptr to thousand separator string */
  468. UINT NegativeOrder; /* negative currency ordering */
  469. UINT PositiveOrder; /* positive currency ordering */
  470. LPTSTR% lpCurrencySymbol; /* ptr to currency symbol string */
  471. } CURRENCYFMT%, *LPCURRENCYFMT%;
  472. /*
  473. * Enumeration function constants.
  474. */
  475. #ifdef STRICT
  476. typedef BOOL (CALLBACK* LOCALE_ENUMPROCA)(LPSTR);
  477. typedef BOOL (CALLBACK* CODEPAGE_ENUMPROCA)(LPSTR);
  478. typedef BOOL (CALLBACK* DATEFMT_ENUMPROCA)(LPSTR);
  479. typedef BOOL (CALLBACK* TIMEFMT_ENUMPROCA)(LPSTR);
  480. typedef BOOL (CALLBACK* CALINFO_ENUMPROCA)(LPSTR);
  481. typedef BOOL (CALLBACK* LOCALE_ENUMPROCW)(LPWSTR);
  482. typedef BOOL (CALLBACK* CODEPAGE_ENUMPROCW)(LPWSTR);
  483. typedef BOOL (CALLBACK* DATEFMT_ENUMPROCW)(LPWSTR);
  484. typedef BOOL (CALLBACK* TIMEFMT_ENUMPROCW)(LPWSTR);
  485. typedef BOOL (CALLBACK* CALINFO_ENUMPROCW)(LPWSTR);
  486. #else /* !STRICT */
  487. typedef FARPROC LOCALE_ENUMPROCA;
  488. typedef FARPROC CODEPAGE_ENUMPROCA;
  489. typedef FARPROC DATEFMT_ENUMPROCA;
  490. typedef FARPROC TIMEFMT_ENUMPROCA;
  491. typedef FARPROC CALINFO_ENUMPROCA;
  492. typedef FARPROC LOCALE_ENUMPROCW;
  493. typedef FARPROC CODEPAGE_ENUMPROCW;
  494. typedef FARPROC DATEFMT_ENUMPROCW;
  495. typedef FARPROC TIMEFMT_ENUMPROCW;
  496. typedef FARPROC CALINFO_ENUMPROCW;
  497. #endif /* !STRICT */
  498. #ifdef UNICODE
  499. #define LOCALE_ENUMPROC LOCALE_ENUMPROCW
  500. #define CODEPAGE_ENUMPROC CODEPAGE_ENUMPROCW
  501. #define DATEFMT_ENUMPROC DATEFMT_ENUMPROCW
  502. #define TIMEFMT_ENUMPROC TIMEFMT_ENUMPROCW
  503. #define CALINFO_ENUMPROC CALINFO_ENUMPROCW
  504. #else
  505. #define LOCALE_ENUMPROC LOCALE_ENUMPROCA
  506. #define CODEPAGE_ENUMPROC CODEPAGE_ENUMPROCA
  507. #define DATEFMT_ENUMPROC DATEFMT_ENUMPROCA
  508. #define TIMEFMT_ENUMPROC TIMEFMT_ENUMPROCA
  509. #define CALINFO_ENUMPROC CALINFO_ENUMPROCA
  510. #endif // !UNICODE
  511. /***************************************************************************\
  512. * Macros
  513. *
  514. * Define all macros for the NLS component here.
  515. \***************************************************************************/
  516. /***************************************************************************\
  517. * Function Prototypes
  518. *
  519. * Only prototypes for the NLS APIs should go here.
  520. \***************************************************************************/
  521. /*
  522. * Code Page Dependent APIs.
  523. */
  524. WINBASEAPI
  525. BOOL
  526. WINAPI
  527. IsValidCodePage(
  528. UINT CodePage);
  529. WINBASEAPI
  530. UINT
  531. WINAPI
  532. GetACP(void);
  533. WINBASEAPI
  534. UINT
  535. WINAPI
  536. GetOEMCP(void);
  537. WINBASEAPI
  538. BOOL
  539. WINAPI
  540. GetCPInfo(
  541. UINT CodePage,
  542. LPCPINFO lpCPInfo);
  543. WINBASEAPI
  544. BOOL
  545. WINAPI
  546. IsDBCSLeadByte(
  547. BYTE TestChar);
  548. WINBASEAPI
  549. BOOL
  550. WINAPI
  551. IsDBCSLeadByteEx(
  552. UINT CodePage,
  553. BYTE TestChar);
  554. WINBASEAPI
  555. int
  556. WINAPI
  557. MultiByteToWideChar(
  558. UINT CodePage,
  559. DWORD dwFlags,
  560. LPCSTR lpMultiByteStr,
  561. int cchMultiByte,
  562. LPWSTR lpWideCharStr,
  563. int cchWideChar);
  564. WINBASEAPI
  565. int
  566. WINAPI
  567. WideCharToMultiByte(
  568. UINT CodePage,
  569. DWORD dwFlags,
  570. LPCWSTR lpWideCharStr,
  571. int cchWideChar,
  572. LPSTR lpMultiByteStr,
  573. int cchMultiByte,
  574. LPCSTR lpDefaultChar,
  575. LPBOOL lpUsedDefaultChar);
  576. /*
  577. * Locale Dependent APIs.
  578. */
  579. WINBASEAPI
  580. int
  581. WINAPI
  582. CompareString%(
  583. LCID Locale,
  584. DWORD dwCmpFlags,
  585. LPCTSTR% lpString1,
  586. int cchCount1,
  587. LPCTSTR% lpString2,
  588. int cchCount2);
  589. WINBASEAPI
  590. int
  591. WINAPI
  592. LCMapString%(
  593. LCID Locale,
  594. DWORD dwMapFlags,
  595. LPCTSTR% lpSrcStr,
  596. int cchSrc,
  597. LPTSTR% lpDestStr,
  598. int cchDest);
  599. WINBASEAPI
  600. int
  601. WINAPI
  602. GetLocaleInfo%(
  603. LCID Locale,
  604. LCTYPE LCType,
  605. LPTSTR% lpLCData,
  606. int cchData);
  607. WINBASEAPI
  608. BOOL
  609. WINAPI
  610. SetLocaleInfo%(
  611. LCID Locale,
  612. LCTYPE LCType,
  613. LPCTSTR% lpLCData);
  614. WINBASEAPI
  615. int
  616. WINAPI
  617. GetTimeFormat%(
  618. LCID Locale,
  619. DWORD dwFlags,
  620. CONST SYSTEMTIME *lpTime,
  621. LPCTSTR% lpFormat,
  622. LPTSTR% lpTimeStr,
  623. int cchTime);
  624. WINBASEAPI
  625. int
  626. WINAPI
  627. GetDateFormat%(
  628. LCID Locale,
  629. DWORD dwFlags,
  630. CONST SYSTEMTIME *lpDate,
  631. LPCTSTR% lpFormat,
  632. LPTSTR% lpDateStr,
  633. int cchDate);
  634. WINBASEAPI
  635. int
  636. WINAPI
  637. GetNumberFormat%(
  638. LCID Locale,
  639. DWORD dwFlags,
  640. LPCTSTR% lpValue,
  641. CONST NUMBERFMT% *lpFormat,
  642. LPTSTR% lpNumberStr,
  643. int cchNumber);
  644. WINBASEAPI
  645. int
  646. WINAPI
  647. GetCurrencyFormat%(
  648. LCID Locale,
  649. DWORD dwFlags,
  650. LPCTSTR% lpValue,
  651. CONST CURRENCYFMT% *lpFormat,
  652. LPTSTR% lpCurrencyStr,
  653. int cchCurrency);
  654. WINBASEAPI
  655. BOOL
  656. WINAPI
  657. EnumCalendarInfo%(
  658. CALINFO_ENUMPROC% lpCalInfoEnumProc,
  659. LCID Locale,
  660. CALID Calendar,
  661. CALTYPE CalType);
  662. WINBASEAPI
  663. BOOL
  664. WINAPI
  665. EnumTimeFormats%(
  666. TIMEFMT_ENUMPROC% lpTimeFmtEnumProc,
  667. LCID Locale,
  668. DWORD dwFlags);
  669. WINBASEAPI
  670. BOOL
  671. WINAPI
  672. EnumDateFormats%(
  673. DATEFMT_ENUMPROC% lpDateFmtEnumProc,
  674. LCID Locale,
  675. DWORD dwFlags);
  676. WINBASEAPI
  677. BOOL
  678. WINAPI
  679. IsValidLocale(
  680. LCID Locale,
  681. DWORD dwFlags);
  682. WINBASEAPI
  683. LCID
  684. WINAPI
  685. ConvertDefaultLocale(
  686. LCID Locale);
  687. WINBASEAPI
  688. LCID
  689. WINAPI
  690. GetThreadLocale(void);
  691. WINBASEAPI
  692. BOOL
  693. WINAPI
  694. SetThreadLocale(
  695. LCID Locale
  696. );
  697. WINBASEAPI
  698. LANGID
  699. WINAPI
  700. GetSystemDefaultLangID(void);
  701. WINBASEAPI
  702. LANGID
  703. WINAPI
  704. GetUserDefaultLangID(void);
  705. WINBASEAPI
  706. LCID
  707. WINAPI
  708. GetSystemDefaultLCID(void);
  709. WINBASEAPI
  710. LCID
  711. WINAPI
  712. GetUserDefaultLCID(void);
  713. WINBASEAPI ;internal_win40
  714. WINAPI ;internal_win40
  715. InvalidateNLSCache(void); ;internal_win40
  716. ;internal_win40
  717. /*
  718. * Locale Independent APIs.
  719. */
  720. WINBASEAPI
  721. BOOL
  722. WINAPI
  723. GetStringTypeEx%(
  724. LCID Locale,
  725. DWORD dwInfoType,
  726. LPCTSTR% lpSrcStr,
  727. int cchSrc,
  728. LPWORD lpCharType);
  729. /*
  730. * NOTE: The parameters for GetStringTypeA and GetStringTypeW are
  731. * NOT the same. The W version was shipped in NT 3.1. The
  732. * A version was then shipped in 16-bit OLE with the wrong
  733. * parameters (ported from Win95). To be compatible, we
  734. * must break the relationship between the A and W versions
  735. * of GetStringType. There will be NO function call for the
  736. * generic GetStringType.
  737. *
  738. * GetStringTypeEx (above) should be used instead.
  739. */
  740. WINBASEAPI
  741. BOOL
  742. WINAPI
  743. GetStringTypeA(
  744. LCID Locale,
  745. DWORD dwInfoType,
  746. LPCSTR lpSrcStr,
  747. int cchSrc,
  748. LPWORD lpCharType);
  749. WINBASEAPI
  750. BOOL
  751. WINAPI
  752. GetStringTypeW(
  753. DWORD dwInfoType,
  754. LPCWSTR lpSrcStr,
  755. int cchSrc,
  756. LPWORD lpCharType);
  757. WINBASEAPI
  758. int
  759. WINAPI
  760. FoldString%(
  761. DWORD dwMapFlags,
  762. LPCTSTR% lpSrcStr,
  763. int cchSrc,
  764. LPTSTR% lpDestStr,
  765. int cchDest);
  766. WINBASEAPI
  767. BOOL
  768. WINAPI
  769. EnumSystemLocales%(
  770. LOCALE_ENUMPROC% lpLocaleEnumProc,
  771. DWORD dwFlags);
  772. WINBASEAPI
  773. BOOL
  774. WINAPI
  775. EnumSystemCodePages%(
  776. CODEPAGE_ENUMPROC% lpCodePageEnumProc,
  777. DWORD dwFlags);
  778. #endif // NONLS
  779. #ifdef __cplusplus ;both
  780. } ;both
  781. #endif ;both
  782. #endif // _WINNLS_
  783. #endif // _WINNLSP_ ;internal_NT