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.

482 lines
17 KiB

  1. /*++
  2. Copyright (c) 1990-1998 Microsoft Corporation, All Rights Reserved
  3. Module Name:
  4. FAKEIME.H
  5. ++*/
  6. #include <indicml.h>
  7. /**********************************************************************/
  8. /* */
  9. /* DebugOptions */
  10. /* */
  11. /**********************************************************************/
  12. #define DEBF_THREADID 0x00000001
  13. #define DEBF_GUIDELINE 0x00000002
  14. #define LOGF_ENTRY 0x00000001
  15. #define LOGF_API 0x00000002
  16. #define LOGF_APIOUT 0x00000004
  17. #define LOGF_KEY 0x00000008
  18. /**********************************************************************/
  19. /* */
  20. /* Define */
  21. /* */
  22. /**********************************************************************/
  23. /* for Unicode FAKEIME */
  24. #ifdef FAKEIMEM
  25. typedef LPWSTR LPMYSTR;
  26. typedef WCHAR MYCHAR;
  27. #define MYTEXT(x) L ## x
  28. #define Mylstrlen(x) lstrlenW(x)
  29. #define Mylstrcpy(x, y) MylstrcpyW((x), (y))
  30. #define Mylstrcmp(x, y) MylstrcmpW((x), (y))
  31. #define MyCharPrev(x, y) MyCharPrevW((x), (y))
  32. #define MyCharNext(x) MyCharNextW(x)
  33. #include <string.h>
  34. #define Mystrtok wcstok
  35. #define Mylstrcpyn MylstrcpynW
  36. #define Mystrchr wcschr
  37. #define MyTextOut TextOutW
  38. #define MyGetTextExtentPoint GetTextExtentPointW
  39. #define LPMYIMEMENUITEMINFO LPIMEMENUITEMINFOW
  40. #define MyImmRequestMessage ImmRequestMessageW
  41. #define MyOutputDebugString MyOutputDebugStringW
  42. #define MyFileName "fakeimem.ime"
  43. #else
  44. typedef LPTSTR LPMYSTR;
  45. typedef TCHAR MYCHAR;
  46. #define MYTEXT(x) TEXT(x)
  47. #define Mylstrlen(x) lstrlen(x)
  48. #ifdef UNICODE
  49. #define Mylstrcpy(x, y) MylstrcpyW((x), (y))
  50. #define Mylstrcmp(x, y) MylstrcmpW((x), (y))
  51. #define MyCharPrev(x, y) MyCharPrevW((x), (y))
  52. #define MyCharPrev(x, y) MyCharPrevW((x), (y))
  53. #define MyCharNext(x) MyCharNextW(x)
  54. #include <string.h>
  55. #define Mystrtok wcstok
  56. #define Mystrchr wcschr
  57. #else
  58. #define Mylstrcpy(x, y) lstrcpy((x), (y))
  59. #define Mylstrcmp(x, y) lstrcmp((x), (y))
  60. #define MyCharPrev(x, y) AnsiPrev((x), (y))
  61. #define MyCharNext(x) AnsiNext(x)
  62. #include <mbstring.h>
  63. #define Mystrtok _mbstrtok
  64. #define Mystrchr _mbschr
  65. #endif
  66. #define Mylstrcpyn lstrcpyn
  67. #define MyTextOut TextOut
  68. #define MyGetTextExtentPoint GetTextExtentPoint
  69. #define LPMYIMEMENUITEMINFO LPIMEMENUITEMINFO
  70. #define MyImmRequestMessage ImmRequestMessage
  71. #define MyOutputDebugString OutputDebugString
  72. #ifdef UNICODE
  73. #define MyFileName TEXT("fakeimeu.ime")
  74. #else
  75. #define MyFileName TEXT("fakeime.ime")
  76. #endif
  77. #endif
  78. /* for limit of FAKEIME */
  79. #define MAXCOMPWND 10
  80. #define MAXCOMPSIZE 128
  81. #define MAXCLAUSESIZE 16
  82. #define MAXCANDPAGESIZE 9
  83. #define MAXCANDSTRSIZE 16
  84. #define MAXGLCHAR 32
  85. #define MAXCANDSTRNUM 32
  86. /* for GlobalAlloc */
  87. #define GHIME (GHND | GMEM_SHARE)
  88. /* special messages */
  89. #define WM_UI_UPDATE (WM_USER+500)
  90. #define WM_UI_HIDE (WM_USER+501)
  91. #define WM_UI_STATEMOVE (WM_USER+601)
  92. #define WM_UI_DEFCOMPMOVE (WM_USER+602)
  93. #define WM_UI_CANDMOVE (WM_USER+603)
  94. #define WM_UI_GUIDEMOVE (WM_USER+604)
  95. /* Escape Functions */
  96. #define IME_ESC_PRI_GETDWORDTEST (IME_ESC_PRIVATE_FIRST + 0)
  97. /* special style */
  98. #define WS_COMPDEFAULT (WS_DISABLED | WS_POPUP)
  99. #define WS_COMPNODEFAULT (WS_DISABLED | WS_POPUP)
  100. /* macro for me! */
  101. #define IsCTLPushed(x) ((x)[VK_CONTROL] & 0x80)
  102. #define IsSHFTPushed(x) ((x)[VK_SHIFT] & 0x80)
  103. #define IsALTPushed(x) ((x)[VK_ALT] & 0x80)
  104. /* update context */
  105. #define UPDATE_MODE 0x01
  106. #define UPDATE_SYSTEM 0x02
  107. #define UPDATE_TEXT 0x04
  108. #define UPDATE_FORCE 0x08
  109. #define UPDATE_ALL ( UPDATE_MODE | UPDATE_SYSTEM | UPDATE_TEXT )
  110. /* advise context */
  111. #define ADVISE_MODE 0x0001 /* advise about Mode requested */
  112. #define ADVISE_ISOPEN 0x0002 /* advise about IsOpen requested */
  113. /* key state context */
  114. #define KS_SHIFT 0x01
  115. #define KS_CONTROL 0x02
  116. /* ID of guideline table */
  117. #define MYGL_NODICTIONARY 0
  118. #define MYGL_TYPINGERROR 1
  119. #define MYGL_TESTGUIDELINE 2
  120. /* Change Mode index */
  121. #define TO_CMODE_ALPHANUMERIC 0x0001
  122. #define TO_CMODE_KATAKANA 0x0002
  123. #define TO_CMODE_HIRAGANA 0x0003
  124. #define TO_CMODE_FULLSHAPE 0x0008
  125. #define TO_CMODE_ROMAN 0x0010
  126. #define TO_CMODE_CHARCODE 0x0020
  127. #define TO_CMODE_TOOLBAR 0x0100
  128. /* WndExtra of child UI windows */
  129. #define FIGWL_MOUSE 0
  130. #define FIGWL_SVRWND (FIGWL_MOUSE+sizeof(LONG))
  131. #define FIGWL_FONT (FIGWL_SVRWND+sizeof(LONG_PTR))
  132. #define FIGWL_COMPSTARTSTR (FIGWL_FONT+sizeof(LONG_PTR))
  133. #define FIGWL_COMPSTARTNUM (FIGWL_COMPSTARTSTR+sizeof(LONG))
  134. #define FIGWL_STATUSBMP (FIGWL_COMPSTARTNUM+sizeof(LONG))
  135. #define FIGWL_CLOSEBMP (FIGWL_STATUSBMP+sizeof(LONG_PTR))
  136. #define FIGWL_PUSHSTATUS (FIGWL_CLOSEBMP+sizeof(LONG_PTR))
  137. #define FIGWL_CHILDWND (FIGWL_PUSHSTATUS+sizeof(LONG))
  138. #define UIEXTRASIZE (FIGWL_CHILDWND+sizeof(LONG_PTR))
  139. /* The flags of FIGWL_MOUSE */
  140. #define FIM_CAPUTURED 0x01
  141. #define FIM_MOVED 0x02
  142. /* The flags of the button of Status Window */
  143. #define PUSHED_STATUS_HDR 0x01
  144. #define PUSHED_STATUS_MODE 0x02
  145. #define PUSHED_STATUS_ROMAN 0x04
  146. #define PUSHED_STATUS_CLOSE 0x08
  147. /* Status Button Pos */
  148. #define BTX 20
  149. #define BTY 20
  150. #define BTFHIRA 20
  151. #define BTFKATA 40
  152. #define BTFALPH 60
  153. #define BTHKATA 80
  154. #define BTHALPH 100
  155. #define BTROMA 120
  156. #define BTEMPT 140
  157. /* Statue Close Button */
  158. #define STCLBT_X (BTX*2+3)
  159. #define STCLBT_Y 1
  160. #define STCLBT_DX 12
  161. #define STCLBT_DY 12
  162. /* define Shift Arrow right-left */
  163. #define ARR_RIGHT 1
  164. #define ARR_LEFT 2
  165. /* Init or Clear Structure Flag */
  166. #define CLR_RESULT 1
  167. #define CLR_UNDET 2
  168. #define CLR_RESULT_AND_UNDET 3
  169. /* define GET LP for COMPOSITIONSTRING members. */
  170. #define GETLPCOMPREADATTR(lpcs) (LPBYTE)((LPBYTE)(lpcs) + (lpcs)->dwCompReadAttrOffset)
  171. #define GETLPCOMPREADCLAUSE(lpcs) (LPDWORD)((LPBYTE)(lpcs) + (lpcs)->dwCompReadClauseOffset)
  172. #define GETLPCOMPREADSTR(lpcs) (LPMYSTR)((LPBYTE)(lpcs) + (lpcs)->dwCompReadStrOffset)
  173. #define GETLPCOMPATTR(lpcs) (LPBYTE)((LPBYTE)(lpcs) + (lpcs)->dwCompAttrOffset)
  174. #define GETLPCOMPCLAUSE(lpcs) (LPDWORD)((LPBYTE)(lpcs) + (lpcs)->dwCompClauseOffset)
  175. #define GETLPCOMPSTR(lpcs) (LPMYSTR)((LPBYTE)(lpcs) + (lpcs)->dwCompStrOffset)
  176. #define GETLPRESULTREADCLAUSE(lpcs) (LPDWORD)((LPBYTE)(lpcs) + (lpcs)->dwResultReadClauseOffset)
  177. #define GETLPRESULTREADSTR(lpcs) (LPMYSTR)((LPBYTE)(lpcs) + (lpcs)->dwResultReadStrOffset)
  178. #define GETLPRESULTCLAUSE(lpcs) (LPDWORD)((LPBYTE)(lpcs) + (lpcs)->dwResultClauseOffset)
  179. #define GETLPRESULTSTR(lpcs) (LPMYSTR)((LPBYTE)(lpcs) + (lpcs)->dwResultStrOffset)
  180. #define SetClause(lpdw,num) {*((LPDWORD)(lpdw)) = 0;*((LPDWORD)(lpdw)+1) = num;}
  181. #define GCS_COMPALL ( GCS_COMPSTR | GCS_COMPATTR | GCS_COMPREADSTR | GCS_COMPREADATTR | GCS_COMPCLAUSE | GCS_COMPREADCLAUSE)
  182. #define GCS_RESULTALL ( GCS_RESULTSTR | GCS_RESULTREADSTR | GCS_RESULTCLAUSE | GCS_RESULTREADCLAUSE)
  183. // ImeMenu Define
  184. #define NUM_ROOT_MENU_L 3
  185. #define NUM_ROOT_MENU_R 3
  186. #define NUM_SUB_MENU_L 2
  187. #define NUM_SUB_MENU_R 2
  188. #define IDIM_ROOT_ML_1 0x10
  189. #define IDIM_ROOT_ML_2 0x11
  190. #define IDIM_ROOT_ML_3 0x12
  191. #define IDIM_SUB_ML_1 0x20
  192. #define IDIM_SUB_ML_2 0x21
  193. #define IDIM_ROOT_MR_1 0x30
  194. #define IDIM_ROOT_MR_2 0x31
  195. #define IDIM_ROOT_MR_3 0x32
  196. #define IDIM_SUB_MR_1 0x40
  197. #define IDIM_SUB_MR_2 0x41
  198. #define NATIVE_CHARSET SHIFTJIS_CHARSET
  199. /**********************************************************************/
  200. /* */
  201. /* Structures */
  202. /* */
  203. /**********************************************************************/
  204. typedef struct _tagMYCOMPSTR{
  205. COMPOSITIONSTRING cs;
  206. MYCHAR szCompReadStr[MAXCOMPSIZE];
  207. BYTE bCompReadAttr[MAXCOMPSIZE];
  208. DWORD dwCompReadClause[MAXCLAUSESIZE];
  209. MYCHAR szCompStr[MAXCOMPSIZE];
  210. BYTE bCompAttr[MAXCOMPSIZE];
  211. DWORD dwCompClause[MAXCLAUSESIZE];
  212. char szTypeInfo[MAXCOMPSIZE];
  213. MYCHAR szResultReadStr[MAXCOMPSIZE];
  214. DWORD dwResultReadClause[MAXCOMPSIZE];
  215. MYCHAR szResultStr[MAXCOMPSIZE];
  216. DWORD dwResultClause[MAXCOMPSIZE];
  217. } MYCOMPSTR, NEAR *PMYCOMPSTR, FAR *LPMYCOMPSTR;
  218. typedef struct _tagMYCAND{
  219. CANDIDATEINFO ci;
  220. CANDIDATELIST cl;
  221. DWORD offset[MAXCANDSTRNUM];
  222. TCHAR szCand[MAXCANDSTRNUM][MAXCANDSTRSIZE];
  223. } MYCAND, NEAR *PMYCAND, FAR *LPMYCAND;
  224. typedef struct _tagUICHILD{
  225. HWND hWnd;
  226. BOOL bShow;
  227. POINT pt;
  228. } UICHILD, NEAR *PUICHILD, FAR *LPUICHILD;
  229. typedef struct _tagUICHILD2{
  230. HWND hWnd;
  231. BOOL bShow;
  232. RECT rc;
  233. } UICHILD2, NEAR *PUICHILD2, FAR *LPUICHILD2;
  234. typedef struct _tagUIEXTRA{
  235. HIMC hIMC;
  236. UICHILD uiStatus;
  237. UICHILD uiCand;
  238. DWORD dwCompStyle;
  239. HFONT hFont;
  240. BOOL bVertical;
  241. UICHILD uiDefComp;
  242. UICHILD2 uiComp[MAXCOMPWND];
  243. UICHILD uiGuide;
  244. } UIEXTRA, NEAR *PUIEXTRA, FAR *LPUIEXTRA;
  245. typedef struct _tagMYGUIDELINE{
  246. DWORD dwLevel;
  247. DWORD dwIndex;
  248. DWORD dwStrID;
  249. DWORD dwPrivateID;
  250. } MYGUIDELINE, NEAR *PMYGUIDELINE, FAR *LPMYGUIDELINE;
  251. /**********************************************************************/
  252. /* */
  253. /* Externs */
  254. /* */
  255. /**********************************************************************/
  256. #ifndef _NO_EXTERN_
  257. extern HINSTANCE hInst;
  258. extern HKL hMyKL;
  259. extern LPTRANSMSGLIST lpCurTransKey;
  260. extern UINT uNumTransKey;
  261. extern BOOL fOverTransKey;
  262. #ifdef FAKEIMEM
  263. extern WCHAR wszUIClassName[];
  264. #endif
  265. extern TCHAR szUIClassName[];
  266. extern TCHAR szCompStrClassName[];
  267. extern TCHAR szCandClassName[];
  268. extern TCHAR szStatusClassName[];
  269. extern TCHAR szGuideClassName[];
  270. extern MYGUIDELINE glTable[];
  271. extern TCHAR szDicFileName[];
  272. extern BYTE bComp[];
  273. extern BYTE bCompCtl[];
  274. extern BYTE bCompSht[];
  275. extern BYTE bCompAlt[];
  276. extern BYTE bNoComp[];
  277. extern BYTE bNoCompCtl[];
  278. extern BYTE bNoCompSht[];
  279. extern BYTE bNoCompAlt[];
  280. extern DWORD dwLogFlag;
  281. extern DWORD dwDebugFlag;
  282. #endif //_NO_EXTERN_
  283. /**********************************************************************/
  284. /* */
  285. /* Functions */
  286. /* */
  287. /**********************************************************************/
  288. /* fakeime.c */
  289. int PASCAL Init(void);
  290. /* subs.c */
  291. void PASCAL InitCompStr(LPCOMPOSITIONSTRING lpCompStr,DWORD dwClrFlag);
  292. void PASCAL ClearCompStr(LPCOMPOSITIONSTRING lpCompStr,DWORD dwClrFlag);
  293. void PASCAL ClearCandidate(LPCANDIDATEINFO lpCandInfo);
  294. void PASCAL ChangeMode(HIMC hIMC,DWORD dwToMode);
  295. void PASCAL ChangeCompStr(HIMC hIMC,DWORD dwToMode);
  296. BOOL PASCAL IsCompStr(HIMC hIMC);
  297. BOOL PASCAL IsConvertedCompStr(HIMC hIMC);
  298. BOOL PASCAL IsCandidate(LPINPUTCONTEXT lpIMC);
  299. void PASCAL UpdateIndicIcon(HIMC hIMC);
  300. void PASCAL lmemset(LPBYTE,BYTE,UINT);
  301. #if defined(FAKEIMEM) || defined(UNICODE)
  302. int PASCAL MylstrcmpW(LPWSTR lp0, LPWSTR lp1);
  303. int PASCAL MylstrcpyW(LPWSTR lp0, LPWSTR lp1);
  304. LPWSTR PASCAL MyCharPrevW(LPWSTR lpStart, LPWSTR lpCur);
  305. LPWSTR PASCAL MyCharNextW(LPWSTR lp);
  306. LPWSTR PASCAL MylstrcpynW(LPWSTR lp0, LPWSTR lp1, int nCount);
  307. #endif
  308. HFONT CheckNativeCharset(HDC hDC);
  309. /* toascii.c */
  310. BOOL PASCAL GenerateMessageToTransKey(LPTRANSMSGLIST lpTrabsKey,LPTRANSMSG lpGeneMsg);
  311. BOOL PASCAL GenerateOverFlowMessage(LPTRANSMSGLIST lpTransKey);
  312. /* notify.c */
  313. BOOL PASCAL NotifyUCSetOpen(HIMC hIMC);
  314. BOOL PASCAL NotifyUCConversionMode(HIMC hIMC);
  315. BOOL PASCAL NotifyUCSetCompositionWindow(HIMC hIMC);
  316. /* input.c */
  317. BOOL PASCAL IMEKeydownHandler(HIMC,WPARAM,LPARAM,LPBYTE);
  318. BOOL PASCAL IMEKeyupHandler(HIMC,WPARAM,LPARAM,LPBYTE);
  319. /* ui.c */
  320. BOOL IMERegisterClass(HANDLE hInstance);
  321. LRESULT CALLBACK FAKEIMEWndProc(HWND,UINT,WPARAM,LPARAM);
  322. LONG PASCAL NotifyCommand(HIMC hUICurIMC, HWND hWnd,UINT message,WPARAM wParam,LPARAM lParam);
  323. LONG PASCAL ControlCommand(HIMC hUICurIMC, HWND hWnd,UINT message,WPARAM wParam,LPARAM lParam);
  324. void PASCAL DrawUIBorder( LPRECT lprc );
  325. void PASCAL DragUI(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
  326. /* uistate.c */
  327. LRESULT CALLBACK StatusWndProc(HWND,UINT,WPARAM,LPARAM);
  328. void PASCAL PaintStatus(HWND hStatusWnd , HDC hDC, LPPOINT lppt,DWORD dwPushedStatus);
  329. void PASCAL ButtonStatus(HWND hWnd, UINT message,WPARAM wParam,LPARAM lParam);
  330. BOOL PASCAL MyIsIMEMessage(UINT message);
  331. void PASCAL UpdateStatusWindow(LPUIEXTRA lpUIExtra);
  332. /* uicand.c */
  333. LRESULT CALLBACK CandWndProc(HWND,UINT,WPARAM,LPARAM);
  334. void PASCAL PaintCandWindow(HWND hCandWnd);
  335. BOOL PASCAL GetCandPosFromComp(LPINPUTCONTEXT lpIMC, LPUIEXTRA lpUIExtra,LPPOINT lppt);
  336. void PASCAL CreateCandWindow(HWND hUIWnd,LPUIEXTRA lpUIExtra, LPINPUTCONTEXT lpIMC);
  337. void PASCAL ResizeCandWindow(LPUIEXTRA lpUIExtra,LPINPUTCONTEXT lpIMC);
  338. void PASCAL HideCandWindow( LPUIEXTRA lpUIExtra);
  339. void PASCAL MoveCandWindow(HWND hUIWnd, LPINPUTCONTEXT lpIMC, LPUIEXTRA lpUIExtra, BOOL fForceComp);
  340. /* uicomp.c */
  341. LRESULT CALLBACK CompStrWndProc(HWND,UINT,WPARAM,LPARAM);
  342. void PASCAL PaintCompWindow(HWND hCompWnd);
  343. void PASCAL CreateCompWindow(HWND hUIWnd, LPUIEXTRA lpUIExtra,LPINPUTCONTEXT lpIMC);
  344. void PASCAL MoveCompWindow(LPUIEXTRA lpUIExtra,LPINPUTCONTEXT lpIMC);
  345. void PASCAL HideCompWindow(LPUIEXTRA lpUIExtra);
  346. void PASCAL SetFontCompWindow(LPUIEXTRA lpUIExtra);
  347. /* uiguide.c */
  348. LRESULT CALLBACK GuideWndProc(HWND,UINT,WPARAM,LPARAM);
  349. void PASCAL PaintGuide(HWND hGuideWnd , HDC hDC, LPPOINT lppt,DWORD dwPushedGuide);
  350. void PASCAL ButtonGuide(HWND hWnd, UINT message,WPARAM wParam,LPARAM lParam);
  351. void PASCAL UpdateGuideWindow(LPUIEXTRA lpUIExtra);
  352. LRESULT CALLBACK LineWndProc(HWND,UINT,WPARAM,LPARAM);
  353. /* config.c */
  354. INT_PTR CALLBACK RegWordDlgProc(HWND hDlg, UINT message , WPARAM wParam, LPARAM lParam);
  355. INT_PTR CALLBACK SelectDictionaryDlgProc(HWND hDlg, UINT message , WPARAM wParam, LPARAM lParam);
  356. INT_PTR CALLBACK AboutDlgProc(HWND hDlg, UINT message , WPARAM wParam, LPARAM lParam);
  357. INT_PTR CALLBACK GeneralDlgProc(HWND hDlg, UINT message , WPARAM wParam, LPARAM lParam);
  358. INT_PTR CALLBACK DebugOptionDlgProc(HWND hDlg, UINT message , WPARAM wParam, LPARAM lParam);
  359. /* DIC.C */
  360. BOOL PASCAL IsEat(WORD);
  361. BOOL PASCAL DicKeydownHandler(HIMC,UINT,LPARAM,LPBYTE);
  362. void PASCAL DeleteChar( HIMC hIMC ,UINT uVKey);
  363. void PASCAL FlushText();
  364. void PASCAL RevertText(HIMC hIMC);
  365. void PASCAL AddChar(HIMC,WORD);
  366. BOOL PASCAL ConvKanji(HIMC);
  367. BOOL WINAPI MakeResultString(HIMC,BOOL);
  368. BOOL PASCAL MakeGuideLine(HIMC, DWORD);
  369. BOOL PASCAL GenerateMessage(HIMC,LPINPUTCONTEXT,LPTRANSMSGLIST,LPTRANSMSG);
  370. BOOL PASCAL CheckAttr( LPCOMPOSITIONSTRING lpCompStr);
  371. void PASCAL MakeAttrClause( LPCOMPOSITIONSTRING lpCompStr);
  372. void PASCAL HandleShiftArrow( HIMC hIMC, BOOL fArrow);
  373. /* DIC2.C */
  374. #if defined(FAKEIMEM) || defined(UNICODE)
  375. BOOL OneCharZenToHan(WCHAR ,WCHAR* ,WCHAR* );
  376. WORD PASCAL HanToZen(WORD,WORD,DWORD);
  377. #else
  378. WORD PASCAL HanToZen(WORD,DWORD);
  379. #endif
  380. WORD PASCAL ZenToHan(WORD);
  381. int PASCAL IsFirst(WORD);
  382. int PASCAL IsSecond(WORD);
  383. WORD PASCAL ConvChar(HIMC,WORD,WORD);
  384. BOOL PASCAL IsTenten(WORD);
  385. WORD PASCAL ConvTenten(WORD);
  386. BOOL PASCAL IsMaru(WORD);
  387. WORD PASCAL ConvMaru(WORD);
  388. WORD PASCAL HiraToKata(WORD);
  389. WORD PASCAL KataToHira(WORD);
  390. void PASCAL lZenToHan(LPMYSTR,LPMYSTR);
  391. void PASCAL lHanToZen(LPMYSTR,LPMYSTR,DWORD);
  392. /* DIC3.C */
  393. WORD PASCAL AddWord(LPSTR,LPSTR);
  394. WORD PASCAL GetWord(LPSTR,LPSTR,WORD,WORD);
  395. WORD PASCAL GetWordCount(LPSTR);
  396. WORD PASCAL GetWordNum(LPSTR);
  397. WORD PASCAL DeleteWord(LPSTR,LPSTR);
  398. /* FDEBUG.C */
  399. #ifdef DEBUG
  400. #define MyDebugPrint(x) DebugPrint x
  401. int DebugPrint(LPCTSTR lpszFormat, ...);
  402. void SetDwordToSetting(LPCTSTR lpszFlag, DWORD dwFlag);
  403. void PASCAL SetGlobalFlags();
  404. void PASCAL ImeLog(DWORD dwFlag, LPTSTR lpStr);
  405. #ifdef FAKEIMEM
  406. void PASCAL MyOutputDebugStringW(LPWSTR lpw);
  407. #endif
  408. #else
  409. #define MyDebugPrint(x)
  410. #define SetDwordToSetting() FALSE
  411. //#define SetDwordToSetting(lpszFlag, dwFlag) FALSE
  412. #define SetGlobalFlags() FALSE
  413. //#define ImeLog() FALSE
  414. #define ImeLog(dwFlag, lpStr) FALSE
  415. #ifdef FAKEIMEM
  416. #define MyOutputDebugStringW() FALSE
  417. //#define MyOutputDebugStringW(lpw) FALSE
  418. #endif
  419. #endif