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.

110 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. SHORT msg_no ;
  67. SHORT value ;
  68. } searchlist_data ;
  69. /* associate search strings with values - eg. "Friday" has value 5 */
  70. typedef struct search_list {
  71. char * s_str ;
  72. SHORT val ;
  73. } searchlist ;
  74. /*-- function prototypes for search lists --*/
  75. USHORT ILUI_setup_list(
  76. char *buffer,
  77. USHORT bufsiz,
  78. USHORT offset,
  79. PUSHORT bytesread,
  80. searchlist_data sdata[],
  81. searchlist slist[]
  82. ) ;
  83. USHORT ILUI_traverse_slist(
  84. PCHAR pszStr,
  85. searchlist * slist,
  86. SHORT * pusVal) ;
  87. USHORT LUI_GetMsgIns(
  88. PCHAR *istrings,
  89. USHORT nstrings,
  90. PSZ msgbuf,
  91. USHORT bufsize,
  92. ULONG msgno,
  93. unsigned int *msglen );