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.

100 lines
3.3 KiB

  1. //#pragma once
  2. #include <time.h>
  3. #define MAX_HISTORY 10
  4. #define STATVERSION 249
  5. /*typedef struct Statistics {
  6. short version;
  7. short index;
  8. time_t begTime[MAX_HISTORY];
  9. time_t endTime[MAX_HISTORY];
  10. short realKeys[MAX_HISTORY];
  11. short postKeys[MAX_HISTORY];
  12. short newDicts[MAX_HISTORY];
  13. short newWords[MAX_HISTORY];
  14. short newNexts[MAX_HISTORY];
  15. short hitWords[MAX_HISTORY];
  16. short hitAbbrs[MAX_HISTORY];
  17. short mouseDowns[MAX_HISTORY];
  18. short switches[MAX_HISTORY];
  19. } Statistics;
  20. */
  21. typedef struct TSDict {
  22. // short version;
  23. // structure version
  24. char name[32]; // name of this topic
  25. //flags
  26. // unsigned DICT_LRNNEW : 1; // learn new words
  27. // unsigned DICT_LRNNEXT : 1; // learn next words
  28. // unsigned DICT_LRNFREQ : 1; // adjust word freq
  29. // unsigned DICT_SYMBOL : 1; // Symbolic dictionary (ie: Minspeak)
  30. // unsigned DICT_2BYTE : 1; // Two byte symbols (ie: Kanji)
  31. // unsigned DICT_REVERSE : 1; // Runs right to left (ie: Hebrew)
  32. // unsigned DICT_PREDICT : 1; // Use for predictions
  33. // unsigned DICT_PURGAUTO: 1; // Autopurge if too full?
  34. // unsigned DICT_PURGASK : 1; // Ask before purging
  35. // unsigned DICT_CURRENT : 1; // current option item
  36. // unsigned DICT_LRNNUM : 1; // learn number
  37. // unsigned CAP : 1; // capitialize new sentence
  38. // short maxWords; // words per topic
  39. // short minLength; // minimum word length
  40. // short weight; // how much to weight the probs
  41. // short space; //how many space after sentence
  42. short tnmbr[256]; // how many in chain
  43. struct TSFreq *atops[256]; // first word in alpha chain
  44. struct TSFreq *ftops[256]; // first word in freq chain
  45. // struct TSFreq *dtops[256]; // first word in disamb chain
  46. // short indx; // TSFreq Group selected
  47. // short nmbr; // how many in chain?
  48. struct TSFreq *last; // last word seen
  49. // struct TSFreq *nearest; // word nearest to word to insert
  50. } TSDict;
  51. extern struct TSDict *dp;
  52. typedef struct TSFreq
  53. {
  54. // flags
  55. // unsigned WORD_SLCT :1; // this word was selected in last match
  56. unsigned WORD_LOCK :1; // never delete word
  57. // unsigned WORD_CASE :1; // word is case sensitive
  58. unsigned WORD_ABBR :1; // word is an abbreviation
  59. // unsigned WORD_IGNR :1; // ignore this word
  60. // unsigned WORD_SAY :1; // say this word
  61. unsigned WORD_TYPE :1; // type this word
  62. // unsigned WORD_NNXT :1; // don't learn next words
  63. // unsigned WORD_SCRIPT :1; // word data is a script
  64. // unsigned WORD_FPROB :1; // don't change freq
  65. // unsigned WORD_PREV :1; // this word was previously shown
  66. // unsigned WORD_HELD :1; // this word was held over for next
  67. // unsigned WORD_DELETED :1; // this word was deleted
  68. // unsigned WORD_BIAS :1; // this is a preferred word in this session
  69. // unsigned WORD_VOICE :1; // the word/abbr special pronounciation
  70. short freq; // freq for this word
  71. struct TSNext *nhead; // head of next word list for this word
  72. struct TSFreq *anext; // next entry alphabetical
  73. struct TSFreq *fnext; // next entry frequency
  74. // struct TSFreq *dnext; // next entry disambiguation
  75. char *word; // actual data
  76. char *abbr; // actual data
  77. } TSFreq;
  78. extern struct TSFreq *wordCur, *abbrCur;
  79. typedef struct TSNext
  80. {
  81. short freq; // this word pair's freq
  82. struct TSFreq *nword; // next word
  83. struct TSNext *nnext; // next word pair in chain
  84. } TSNext;
  85. //extern void *MemPool;
  86. //extern BYTE *MemPoolPtr;