Source code of Windows XP (NT5)
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.

115 lines
3.0 KiB

  1. /*++ BUILD Version: 0001 // Increment this if a change has global effects
  2. Copyright (c) 1991 Microsoft Corporation
  3. Module Name:
  4. luiint.h
  5. Abstract:
  6. This file contains the prototypes/manifests used internally by the LUI
  7. library.
  8. Author:
  9. Dan Hinsley (danhi) 8-Jun-1991
  10. Environment:
  11. User Mode - Win32
  12. Portable to any flat, 32-bit environment. (Uses Win32 typedefs.)
  13. Requires ANSI C extensions: slash-slash comments.
  14. --*/
  15. ///////////////////////////////// search lists //////////////////////////////
  16. // USAGE
  17. // we typically declare a data list associating message numbers with
  18. // data values, and partially initialize a search list associating
  19. // strings with data values. We then complete this search list by passing
  20. // it together with the data list to a 'setup' function (see SERACH.C).
  21. //
  22. // CONVENTIONS
  23. // the data lists are terminated with a zero message number, search lists
  24. // terminated with a NULL search string.
  25. //
  26. // EXAMPLE of USE (for weeks)
  27. //
  28. // static searchlist_data week_data[] = { /* strings from message file */
  29. // {APE2_GEN_SUNDAY_ABBREV, 0},
  30. // {APE2_GEN_MONDAY_ABBREV, 1},
  31. // {APE2_GEN_TUESDAY_ABBREV, 2},
  32. // {APE2_GEN_WEDNSDAY_ABBREV, 3},
  33. // {APE2_GEN_THURSDAY_ABBREV, 4},
  34. // {APE2_GEN_FRIDAY_ABBREV, 5},
  35. // {APE2_GEN_SATURDAY_ABBREV, 6},
  36. // {APE2_GEN_SUNDAY, 0},
  37. // {APE2_GEN_MONDAY, 1},
  38. // {APE2_GEN_TUESDAY, 2},
  39. // {APE2_GEN_WEDNSDAY, 3},
  40. // {APE2_GEN_THURSDAY, 4},
  41. // {APE2_GEN_FRIDAY, 5},
  42. // {APE2_GEN_SATURDAY, 6},
  43. // {0,0}
  44. // } ;
  45. //
  46. // #define DAYS_IN_WEEK (7)
  47. // #define NUM_DAYS_LIST (sizeof(week_data)/sizeof(week_data[0])+
  48. // DAYS_IN_WEEK)
  49. //
  50. // /*
  51. // * NOTE - we init the first 7 always recognised days
  52. // * and get the rest from the message file
  53. // */
  54. // static searchlist week_list[NUM_DAYS_LIST + DAYS_IN_WEEK] = {
  55. // {LUI_txt_sunday,0},
  56. // {LUI_txt_monday,1},
  57. // {LUI_txt_tuesday,2},
  58. // {LUI_txt_wednesday,3},
  59. // {LUI_txt_thursday,4},
  60. // {LUI_txt_friday,5},
  61. // {LUI_txt_saturday,6},
  62. // } ;
  63. /*-- types for search lists --*/
  64. /* asssociate message number with value - eg. APE2_GEN_FRIDAY has value 5 */
  65. typedef struct search_list_data {
  66. LONG msg_no ;
  67. LONG value ;
  68. } searchlist_data ;
  69. /* associate search strings with values - eg. "Friday" has value 5 */
  70. typedef struct search_list {
  71. LPTSTR s_str ;
  72. LONG val ;
  73. } searchlist ;
  74. /*-- function prototypes for search lists --*/
  75. DWORD
  76. ILUI_setup_listW(
  77. LPTSTR buffer,
  78. DWORD bufsiz,
  79. DWORD offset,
  80. PDWORD bytesread,
  81. searchlist_data sdata[],
  82. searchlist slist[]
  83. );
  84. DWORD
  85. ILUI_traverse_slistW(
  86. LPTSTR pszStr,
  87. searchlist *slist,
  88. PLONG pusVal
  89. );
  90. DWORD
  91. LUI_GetMsgInsW(
  92. LPTSTR *istrings,
  93. DWORD nstrings,
  94. LPTSTR msgbuf,
  95. DWORD bufsize,
  96. DWORD msgno,
  97. unsigned int *msglen
  98. );