ml_fatfs.h 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. /* Copyright (C) 2016 RDA Technologies Limited and/or its affiliates("RDA").
  2. * All rights reserved.
  3. *
  4. * This software is supplied "AS IS" without any warranties.
  5. * RDA assumes no responsibility or liability for the use of the software,
  6. * conveys no license or title under any patent, copyright, or mask work
  7. * right to the product. RDA reserves the right to make changes in the
  8. * software without notification. RDA also make no representation or
  9. * warranty that such application will be suitable for the specified use
  10. * without further testing or modification.
  11. */
  12. #ifndef __ML_H__
  13. #define __ML_H__
  14. #include "ts.h"
  15. #include "cos.h"
  16. #ifdef _FS_SIMULATOR_
  17. #include "dsm_cf.h"
  18. //#define NULL ((void*)0)
  19. //#include "ts.h"
  20. #define CSW_ML_FREE DSM_Free
  21. #define CSW_ML_MALLOC DSM_MAlloc
  22. #define __func__ "func"
  23. #define SUL_StrCopy DSM_StrCpy
  24. #define SUL_MemSet8 DSM_MemSet
  25. #define SUL_StrCaselessCompare DSM_StrCaselessCmp
  26. struct ML_Table
  27. {
  28. UINT8 *charset;
  29. INT32(*uni2char)
  30. (UINT16 uni, UINT8 *out, UINT32 boundlen);
  31. INT32(*char2uni)
  32. (UINT8 *rawstring, UINT32 boundlen, UINT16 *uni);
  33. UINT8 *charset2lower;
  34. UINT8 *charset2upper;
  35. struct ML_Table *next;
  36. };
  37. UINT32 ML_RegisterTable(struct ML_Table *ML);
  38. UINT32 ML_UnRegisterTable(struct ML_Table *ML);
  39. #define CP936
  40. #define CP0
  41. #define CP1256
  42. #define CP1258
  43. #define CP874
  44. //#define ISO8859_1
  45. #define ISO8859_5
  46. #define ISO8859_6
  47. #define ML_DEF
  48. #else
  49. #include "cfw.h"
  50. struct ML_Table
  51. {
  52. UINT8 *charset;
  53. INT32(*uni2char)
  54. (UINT16 uni, UINT8 *out, UINT32 boundlen);
  55. INT32(*char2uni)
  56. (UINT8 *rawstring, UINT32 boundlen, UINT16 *uni);
  57. UINT8 *charset2lower;
  58. UINT8 *charset2upper;
  59. struct ML_Table *next;
  60. };
  61. UINT32 ML_RegisterTable(struct ML_Table *ML);
  62. UINT32 ML_UnRegisterTable(struct ML_Table *ML);
  63. #ifdef ML_SUPPORT_CP0
  64. #define CP0
  65. #endif
  66. #ifdef ML_SUPPORT_CP437
  67. #define CP437
  68. #endif
  69. #ifdef ML_SUPPORT_CP737
  70. #define CP737
  71. #endif
  72. #ifdef ML_SUPPORT_CP775
  73. #define CP775
  74. #endif
  75. #ifdef ML_SUPPORT_CP850
  76. #define CP850
  77. #endif
  78. #ifdef ML_SUPPORT_CP852
  79. #define CP852
  80. #endif
  81. #ifdef ML_SUPPORT_CP855
  82. #define CP855
  83. #endif
  84. #ifdef ML_SUPPORT_CP857
  85. #define CP857
  86. #endif
  87. #ifdef ML_SUPPORT_CP860
  88. #define CP860
  89. #endif
  90. #ifdef ML_SUPPORT_CP861
  91. #define CP861
  92. #endif
  93. #ifdef ML_SUPPORT_CP862
  94. #define CP862
  95. #endif
  96. #ifdef ML_SUPPORT_CP863
  97. #define CP863
  98. #endif
  99. #ifdef ML_SUPPORT_CP864
  100. #define CP864
  101. #endif
  102. #ifdef ML_SUPPORT_CP865
  103. #define CP865
  104. #endif
  105. #ifdef ML_SUPPORT_CP869
  106. #define CP869
  107. #endif
  108. #ifdef ML_SUPPORT_CP874
  109. #define CP874
  110. #endif
  111. #ifdef ML_SUPPORT_CP932
  112. #define CP932
  113. #endif
  114. #ifdef ML_SUPPORT_CP936
  115. #define CP936
  116. #endif
  117. #ifdef ML_SUPPORT_CP950
  118. #define CP950
  119. #endif
  120. #ifdef ML_SUPPORT_CP1250
  121. #define CP1250
  122. #endif
  123. #ifdef ML_SUPPORT_CP1251
  124. #define CP1251
  125. #endif
  126. #ifdef ML_SUPPORT_CP1255
  127. #define CP1255
  128. #endif
  129. #ifdef ML_SUPPORT_CP1256
  130. #define CP1256
  131. #endif
  132. #ifdef ML_SUPPORT_CP1258
  133. #define CP1258
  134. #endif
  135. #ifdef ML_SUPPORT_ISO8859_1
  136. #define ISO8859_1
  137. #endif
  138. #ifdef ML_SUPPORT_ISO8859_2
  139. #define ISO8859_2
  140. #endif
  141. #ifdef ML_SUPPORT_ISO8859_3
  142. #define ISO8859_3
  143. #endif
  144. #ifdef ML_SUPPORT_ISO8859_4
  145. #define ISO8859_4
  146. #endif
  147. #ifdef ML_SUPPORT_ISO8859_5
  148. #define ISO8859_5
  149. #endif
  150. #ifdef ML_SUPPORT_ISO8859_6
  151. #define ISO8859_6
  152. #endif
  153. #ifdef ML_SUPPORT_ISO8859_7
  154. #define ISO8859_7
  155. #endif
  156. #ifdef ML_SUPPORT_ISO8859_9
  157. #define ISO8859_9
  158. #endif
  159. #ifdef ML_SUPPORT_ISO8859_13
  160. #define ISO8859_13
  161. #endif
  162. #ifdef ML_SUPPORT_ISO8859_14
  163. #define ISO8859_14
  164. #endif
  165. #ifdef ML_SUPPORT_ISO8859_15
  166. #define ISO8859_15
  167. #endif
  168. #endif
  169. #endif