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.

61 lines
2.0 KiB

  1. // File Name: status.c
  2. // Owner: Masahiro Teragawa
  3. // Revision: 1.00 08/23/'95 Masahiro Teragawa
  4. // Made it thread safe 2/23/96 yutakan
  5. //
  6. #include "pch_c.h"
  7. #include "fechrcnv.h"
  8. #if 0 // yutakan: will be initialized anyway.
  9. #ifdef DBCS_DIVIDE
  10. DBCS_STATUS dStatus0 = { CODE_UNKNOWN, '\0', FALSE };
  11. BOOL blkanji0 = FALSE; // Kanji In Mode
  12. DBCS_STATUS dStatus = { CODE_UNKNOWN, '\0', FALSE };
  13. BOOL blkanji = FALSE; // Kanji In Mode
  14. BOOL blkana = FALSE; // Kana Mode
  15. #endif // DBCS_DIVIDE
  16. int nCurrentCodeSet = CODE_UNKNOWN;
  17. #endif
  18. /*********************************************************************/
  19. /* Function: FCC_Init */
  20. /*********************************************************************/
  21. void WINAPI FCC_Init( PVOID pcontext )
  22. {
  23. if (!pcontext)
  24. return;
  25. #ifdef DBCS_DIVIDE
  26. ((CONV_CONTEXT *)pcontext)->dStatus0.nCodeSet = CODE_UNKNOWN;
  27. ((CONV_CONTEXT *)pcontext)->dStatus0.cSavedByte = '\0';
  28. ((CONV_CONTEXT *)pcontext)->dStatus0.fESC = FALSE;
  29. ((CONV_CONTEXT *)pcontext)->blkanji0 = FALSE;
  30. ((CONV_CONTEXT *)pcontext)->dStatus.nCodeSet = CODE_UNKNOWN;
  31. ((CONV_CONTEXT *)pcontext)->dStatus.cSavedByte = '\0';
  32. ((CONV_CONTEXT *)pcontext)->dStatus.fESC = FALSE;
  33. ((CONV_CONTEXT *)pcontext)->blkanji = FALSE;
  34. ((CONV_CONTEXT *)pcontext)->blkana = FALSE;
  35. #endif // DBCS_DIVIDE
  36. ((CONV_CONTEXT *)pcontext)->nCurrentCodeSet = CODE_UNKNOWN;
  37. ((CONV_CONTEXT *)pcontext)->pIncc0 = NULL;
  38. ((CONV_CONTEXT *)pcontext)->pIncc = NULL;
  39. return;
  40. }
  41. /*********************************************************************/
  42. /* Function: FCC_GetCurrentEncodingMode */
  43. /*********************************************************************/
  44. int WINAPI FCC_GetCurrentEncodingMode(void * pcontext )
  45. {
  46. return pcontext?((CONV_CONTEXT *)pcontext)->nCurrentCodeSet:0;
  47. }