transactd 1.2.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (306) hide show
  1. checksums.yaml +4 -4
  2. data/BUILD_UNIX-JA +46 -67
  3. data/BUILD_WIN-JA +106 -63
  4. data/CMakeLists.txt +40 -15
  5. data/README +219 -75
  6. data/README-JA +207 -76
  7. data/README_ORMSRCGEN +118 -0
  8. data/README_ORMSRCGEN-JA +115 -0
  9. data/bin/common/tdclc_32_2_0.dll +0 -0
  10. data/bin/common/tdclc_64_2_0.dll +0 -0
  11. data/build/common/check_for_link_iconv.cmake +18 -14
  12. data/build/common/create_symlink.cmake.in +25 -0
  13. data/build/common/get_boost_libs.cmake +23 -23
  14. data/build/common/options.cmake +0 -66
  15. data/build/common/smart_install.cmake +3 -3
  16. data/build/common/transactd.rc.in +15 -5
  17. data/build/common/transactd_cl_common.cmake +37 -18
  18. data/build/common/transactd_cl_output.cmake +55 -13
  19. data/build/common/transactd_common.cmake +108 -31
  20. data/build/swig/php/generate.cmake.in +15 -17
  21. data/build/swig/php/generate.cmd.in +15 -9
  22. data/build/swig/php/php.swg +124 -82
  23. data/build/swig/php/transactd.no_yield.php +4494 -0
  24. data/build/swig/php/transactd.no_yield.php.git.patch +685 -0
  25. data/build/swig/php/transactd.no_yield.php.patch +685 -0
  26. data/build/swig/php/transactd.yield.php +4461 -0
  27. data/build/swig/php/transactd.yield.php.git.patch +652 -0
  28. data/build/swig/php/transactd.yield.php.patch +652 -0
  29. data/build/swig/referencecounter.h +79 -0
  30. data/build/swig/ruby/ruby.swg +226 -76
  31. data/build/swig/ruby/threadBlockRegionWrapper.h +71 -0
  32. data/build/swig/ruby/without_gvl.swg +87 -0
  33. data/build/swig/tdcl.i +659 -170
  34. data/build/swig/validatablepointer.h +91 -0
  35. data/build/tdclc/CMakeLists.txt +49 -34
  36. data/build/tdclc/{tdclc_64.cbproj → tdclc.cbproj} +65 -20
  37. data/build/tdclc/tdclc.rc +0 -0
  38. data/build/tdclcpp/CMakeLists.txt +84 -20
  39. data/build/tdclcpp/tdclcpp.rc +0 -0
  40. data/build/tdclcpp/{tdclcpp_bcb_64.cbproj → tdclcpp_bc.cbproj} +168 -44
  41. data/build/tdclrb/CMakeLists.txt +84 -66
  42. data/build/tdclrb/bldgem/extconf.rb +28 -3
  43. data/build/tdclrb/gem/helper.rb +11 -1
  44. data/build/tdclrb/gem_output.cmake +20 -16
  45. data/index_ja.html +15 -0
  46. data/source/bzs/db/IBlobBuffer.h +15 -17
  47. data/source/bzs/db/blobBuffer.h +186 -140
  48. data/source/bzs/db/blobStructs.h +37 -37
  49. data/source/bzs/db/engine/mysql/IReadRecords.h +34 -34
  50. data/source/bzs/db/engine/mysql/bookmark.h +150 -147
  51. data/source/bzs/db/engine/mysql/database.cpp +1721 -1526
  52. data/source/bzs/db/engine/mysql/database.h +608 -370
  53. data/source/bzs/db/engine/mysql/dbManager.cpp +213 -201
  54. data/source/bzs/db/engine/mysql/dbManager.h +115 -104
  55. data/source/bzs/db/engine/mysql/errorMessage.cpp +49 -50
  56. data/source/bzs/db/engine/mysql/errorMessage.h +25 -26
  57. data/source/bzs/db/engine/mysql/fieldAccess.h +55 -61
  58. data/source/bzs/db/engine/mysql/mydebuglog.cpp +326 -292
  59. data/source/bzs/db/engine/mysql/mydebuglog.h +63 -55
  60. data/source/bzs/db/engine/mysql/mysqlInternal.h +182 -125
  61. data/source/bzs/db/engine/mysql/mysqlThd.cpp +121 -121
  62. data/source/bzs/db/engine/mysql/mysqlThd.h +20 -20
  63. data/source/bzs/db/engine/mysql/percentageKey.h +241 -228
  64. data/source/bzs/db/protocol/ICommandExecuter.h +18 -17
  65. data/source/bzs/db/protocol/hs/hsCommandExecuter.cpp +543 -514
  66. data/source/bzs/db/protocol/hs/hsCommandExecuter.h +155 -158
  67. data/source/bzs/db/protocol/tdap/btrDate.cpp +213 -180
  68. data/source/bzs/db/protocol/tdap/btrDate.h +39 -37
  69. data/source/bzs/db/protocol/tdap/client/activeTable.cpp +173 -0
  70. data/source/bzs/db/protocol/tdap/client/activeTable.h +165 -0
  71. data/source/bzs/db/protocol/tdap/client/activeTableImple.h +370 -0
  72. data/source/bzs/db/protocol/tdap/client/bulkInsert.h +13 -23
  73. data/source/bzs/db/protocol/tdap/client/client.cpp +81 -68
  74. data/source/bzs/db/protocol/tdap/client/client.h +361 -320
  75. data/source/bzs/db/protocol/tdap/client/connMgr.cpp +17 -22
  76. data/source/bzs/db/protocol/tdap/client/connMgr.h +17 -19
  77. data/source/bzs/db/protocol/tdap/client/connectionPool.cpp +243 -0
  78. data/source/bzs/db/protocol/tdap/client/connectionPool.h +109 -0
  79. data/source/bzs/db/protocol/tdap/client/database.cpp +327 -219
  80. data/source/bzs/db/protocol/tdap/client/database.h +141 -118
  81. data/source/bzs/db/protocol/tdap/client/databaseFactory.cpp +60 -62
  82. data/source/bzs/db/protocol/tdap/client/databaseManager.h +255 -0
  83. data/source/bzs/db/protocol/tdap/client/dbDef.cpp +315 -202
  84. data/source/bzs/db/protocol/tdap/client/dbDef.h +40 -32
  85. data/source/bzs/db/protocol/tdap/client/dllmain.cpp +390 -371
  86. data/source/bzs/db/protocol/tdap/client/errorMessage.cpp +148 -56
  87. data/source/bzs/db/protocol/tdap/client/errorMessage_ja.cpp +149 -57
  88. data/source/bzs/db/protocol/tdap/client/export.h +35 -0
  89. data/source/bzs/db/protocol/tdap/client/field.cpp +1985 -0
  90. data/source/bzs/db/protocol/tdap/client/field.h +393 -0
  91. data/source/bzs/db/protocol/tdap/client/fieldDDF.cpp +14 -14
  92. data/source/bzs/db/protocol/tdap/client/fieldDDF.h +11 -14
  93. data/source/bzs/db/protocol/tdap/client/fieldNameAlias.cpp +123 -0
  94. data/source/bzs/db/protocol/tdap/client/fieldNameAlias.h +58 -0
  95. data/source/bzs/db/protocol/tdap/client/fields.h +178 -0
  96. data/source/bzs/db/protocol/tdap/client/fileDDF.cpp +13 -16
  97. data/source/bzs/db/protocol/tdap/client/fileDDF.h +11 -17
  98. data/source/bzs/db/protocol/tdap/client/filter.h +423 -259
  99. data/source/bzs/db/protocol/tdap/client/groupComp.h +117 -0
  100. data/source/bzs/db/protocol/tdap/client/groupQuery.cpp +818 -0
  101. data/source/bzs/db/protocol/tdap/client/groupQuery.h +281 -0
  102. data/source/bzs/db/protocol/tdap/client/indexDDF.cpp +14 -17
  103. data/source/bzs/db/protocol/tdap/client/indexDDF.h +11 -14
  104. data/source/bzs/db/protocol/tdap/client/memRecord.cpp +231 -0
  105. data/source/bzs/db/protocol/tdap/client/memRecord.h +145 -0
  106. data/source/bzs/db/protocol/tdap/client/memRecordset.cpp +448 -0
  107. data/source/bzs/db/protocol/tdap/client/memRecordset.h +159 -0
  108. data/source/bzs/db/protocol/tdap/client/nsDatabase.cpp +300 -173
  109. data/source/bzs/db/protocol/tdap/client/nsDatabase.h +53 -36
  110. data/source/bzs/db/protocol/tdap/client/nsTable.cpp +171 -128
  111. data/source/bzs/db/protocol/tdap/client/nsTable.h +121 -87
  112. data/source/bzs/db/protocol/tdap/client/pooledDatabaseManager.h +173 -0
  113. data/source/bzs/db/protocol/tdap/client/recordset.cpp +209 -0
  114. data/source/bzs/db/protocol/tdap/client/recordset.h +86 -0
  115. data/source/bzs/db/protocol/tdap/client/recordsetImple.h +596 -0
  116. data/source/bzs/db/protocol/tdap/client/request.h +227 -170
  117. data/source/bzs/db/protocol/tdap/client/serializer.cpp +1288 -0
  118. data/source/bzs/db/protocol/tdap/client/serializer.h +295 -0
  119. data/source/bzs/db/protocol/tdap/client/sharedData.cpp +9 -12
  120. data/source/bzs/db/protocol/tdap/client/sharedData.h +18 -16
  121. data/source/bzs/db/protocol/tdap/client/sqlBuilder.cpp +494 -473
  122. data/source/bzs/db/protocol/tdap/client/sqlBuilder.h +51 -53
  123. data/source/bzs/db/protocol/tdap/client/stringConverter.h +214 -148
  124. data/source/bzs/db/protocol/tdap/client/table.cpp +929 -1665
  125. data/source/bzs/db/protocol/tdap/client/table.h +413 -87
  126. data/source/bzs/db/protocol/tdap/client/trdboostapi.h +642 -534
  127. data/source/bzs/db/protocol/tdap/client/trdboostapiInternal.h +25 -40
  128. data/source/bzs/db/protocol/tdap/client/trdclcppautolink.h +11 -15
  129. data/source/bzs/db/protocol/tdap/client/trdormapi.h +378 -437
  130. data/source/bzs/db/protocol/tdap/client/trnsctcl.def +1 -1
  131. data/source/bzs/db/protocol/tdap/fieldComp.h +127 -0
  132. data/source/bzs/db/protocol/tdap/myDateTime.cpp +352 -345
  133. data/source/bzs/db/protocol/tdap/mysql/characterset.cpp +75 -78
  134. data/source/bzs/db/protocol/tdap/mysql/characterset.h +18 -19
  135. data/source/bzs/db/protocol/tdap/mysql/databaseSchema.cpp +216 -199
  136. data/source/bzs/db/protocol/tdap/mysql/databaseSchema.h +23 -14
  137. data/source/bzs/db/protocol/tdap/mysql/debuglog.cpp +354 -314
  138. data/source/bzs/db/protocol/tdap/mysql/debuglog.h +57 -47
  139. data/source/bzs/db/protocol/tdap/mysql/recordsetReader.h +905 -739
  140. data/source/bzs/db/protocol/tdap/mysql/request.h +152 -159
  141. data/source/bzs/db/protocol/tdap/mysql/tdapCommandExecuter.cpp +1044 -879
  142. data/source/bzs/db/protocol/tdap/mysql/tdapCommandExecuter.h +87 -81
  143. data/source/bzs/db/protocol/tdap/tdapRequest.h +162 -130
  144. data/source/bzs/db/protocol/tdap/tdapSchema.cpp +368 -166
  145. data/source/bzs/db/protocol/tdap/tdapSchema.h +702 -566
  146. data/source/bzs/db/protocol/tdap/tdapcapi.h +387 -353
  147. data/source/bzs/db/transactd/appBuilderImple.h +21 -20
  148. data/source/bzs/db/transactd/appModule.cpp +350 -98
  149. data/source/bzs/db/transactd/appModule.h +31 -37
  150. data/source/bzs/db/transactd/connManager.cpp +138 -135
  151. data/source/bzs/db/transactd/connManager.h +28 -21
  152. data/source/bzs/db/transactd/connectionRecord.h +39 -39
  153. data/source/bzs/db/transactd/transactd.cpp +217 -203
  154. data/source/bzs/env/boost_bcb_link.h +131 -0
  155. data/source/bzs/env/compiler.h +136 -79
  156. data/source/bzs/env/crosscompile.cpp +57 -57
  157. data/source/bzs/env/crosscompile.h +130 -115
  158. data/source/bzs/env/fileopen.h +7 -8
  159. data/source/bzs/env/mbcswchrLinux.cpp +4 -9
  160. data/source/bzs/env/mbcswchrLinux.h +37 -34
  161. data/source/bzs/env/tcharMinGW.h +59 -0
  162. data/source/bzs/env/tstring.h +90 -95
  163. data/source/bzs/example/changeSchema.cpp +22 -23
  164. data/source/bzs/example/changeSchema_c.cpp +22 -24
  165. data/source/bzs/example/connection_pool_c.cpp +49 -104
  166. data/source/bzs/example/createDatabase.cpp +40 -47
  167. data/source/bzs/example/createDatabase_c.cpp +38 -43
  168. data/source/bzs/example/deleteRecords.cpp +10 -15
  169. data/source/bzs/example/deleteRecords_c.cpp +10 -14
  170. data/source/bzs/example/dropDatabase.cpp +3 -9
  171. data/source/bzs/example/dropDatabase_c.cpp +5 -6
  172. data/source/bzs/example/insertRecords.cpp +37 -29
  173. data/source/bzs/example/insertRecords_c.cpp +19 -25
  174. data/source/bzs/example/ormap_c.cpp +621 -0
  175. data/source/bzs/example/queryData.cpp +371 -0
  176. data/source/bzs/example/queryData.h +16 -0
  177. data/source/bzs/example/query_c.cpp +109 -0
  178. data/source/bzs/example/readRecords.cpp +27 -27
  179. data/source/bzs/example/readRecords_c.cpp +25 -23
  180. data/source/bzs/example/updateRecords.cpp +16 -21
  181. data/source/bzs/example/updateRecords_c.cpp +8 -12
  182. data/source/bzs/example/update_with_transaction.cpp +21 -24
  183. data/source/bzs/example/update_with_transaction_c.cpp +12 -15
  184. data/source/bzs/example/useORMRecord.cpp +177 -0
  185. data/source/bzs/netsvc/client/tcpClient.cpp +167 -156
  186. data/source/bzs/netsvc/client/tcpClient.h +541 -489
  187. data/source/bzs/netsvc/server/IAppModule.h +119 -32
  188. data/source/bzs/netsvc/server/iserver.h +21 -23
  189. data/source/bzs/netsvc/server/serverCpt.cpp +421 -391
  190. data/source/bzs/netsvc/server/serverCpt.h +41 -43
  191. data/source/bzs/netsvc/server/serverPipe.cpp +580 -565
  192. data/source/bzs/netsvc/server/serverPipe.h +44 -45
  193. data/source/bzs/netsvc/server/serverTpool.cpp +333 -303
  194. data/source/bzs/netsvc/server/serverTpool.h +38 -43
  195. data/source/bzs/rtl/benchmark.cpp +91 -31
  196. data/source/bzs/rtl/benchmark.h +76 -22
  197. data/source/bzs/rtl/datetime.cpp +231 -233
  198. data/source/bzs/rtl/datetime.h +16 -16
  199. data/source/bzs/rtl/debuglog.cpp +48 -51
  200. data/source/bzs/rtl/debuglog.h +55 -44
  201. data/source/bzs/rtl/exception.h +55 -48
  202. data/source/bzs/rtl/stl_uty.cpp +27 -28
  203. data/source/bzs/rtl/stl_uty.h +28 -29
  204. data/source/bzs/rtl/stringBuffers.cpp +8 -6
  205. data/source/bzs/rtl/stringBuffers.h +16 -9
  206. data/source/bzs/rtl/strtrim.cpp +90 -91
  207. data/source/bzs/rtl/strtrim.h +14 -16
  208. data/source/bzs/test/tdclatl/bench_query_atl.js +647 -0
  209. data/source/bzs/test/tdclatl/bench_tdclatl.js +303 -303
  210. data/source/bzs/test/tdclatl/test_query_atl.js +669 -0
  211. data/source/bzs/test/tdclphp/bench.php +357 -0
  212. data/source/bzs/test/tdclphp/transactd_Test.php +907 -303
  213. data/source/bzs/test/tdclphp/transactd_blob_Test.php +21 -49
  214. data/source/bzs/test/tdclphp/transactd_datetime_Test.php +41 -75
  215. data/source/bzs/test/tdclphp/transactd_kanjischema_Test.php +23 -37
  216. data/source/bzs/test/tdclphp/transactd_pool_Test.php +120 -0
  217. data/source/bzs/test/tdclrb/bench_tdclcpp.rb +4 -6
  218. data/source/bzs/test/tdclrb/prepare.rb +15 -12
  219. data/source/bzs/test/tdclrb/transactd_blob_spec.rb +29 -32
  220. data/source/bzs/test/tdclrb/transactd_datetime_spec.rb +0 -29
  221. data/source/bzs/test/tdclrb/transactd_kanjischema_spec.rb +18 -19
  222. data/source/bzs/test/tdclrb/transactd_pool_spec.rb +107 -0
  223. data/source/bzs/test/tdclrb/transactd_spec.rb +734 -142
  224. data/source/bzs/test/transactdBench/query_bench.cpp +156 -0
  225. data/source/bzs/test/transactdBench/scaling_bench.cpp +265 -0
  226. data/source/bzs/test/transactdBench/transactdBench.cpp +107 -83
  227. data/source/bzs/test/transactdBench/transactdBench2.cpp +122 -83
  228. data/source/bzs/test/transactdBench/workerBase.cpp +5 -0
  229. data/source/bzs/test/transactdBench/workerBase.h +88 -0
  230. data/source/bzs/test/transactdBench/workerMySQLImple.h +333 -0
  231. data/source/bzs/test/transactdBench/workerTransactdImple.h +201 -0
  232. data/source/bzs/test/trdclengn/test_blob.cpp +121 -73
  233. data/source/bzs/test/trdclengn/test_trdclengn.cpp +1244 -426
  234. data/source/global/ormsrcgen/confParam.h +80 -0
  235. data/source/global/ormsrcgen/fieldName.cpp +77 -0
  236. data/source/global/ormsrcgen/fieldName.h +43 -0
  237. data/source/global/ormsrcgen/main.cpp +196 -0
  238. data/source/global/ormsrcgen/srcgen.cpp +763 -0
  239. data/source/global/ormsrcgen/srcgen.h +72 -0
  240. data/source/global/ormsrcgen/template/fieldNameList_sample.txt +2 -0
  241. data/source/global/ormsrcgen/template/ormDataClass_template.cpp +48 -0
  242. data/source/global/ormsrcgen/template/ormDataClass_template.h +34 -0
  243. data/source/global/ormsrcgen/template/ormMapClass_template.cpp +51 -0
  244. data/source/global/ormsrcgen/template/ormMapClass_template.h +62 -0
  245. data/source/global/ormsrcgen/template/template.cnf +38 -0
  246. data/source/global/querystmts/querystmts.cpp +237 -0
  247. data/source/global/tdclatl/ConnectParams.cpp +77 -0
  248. data/source/global/tdclatl/ConnectParams.h +70 -0
  249. data/source/global/tdclatl/Database.cpp +132 -128
  250. data/source/global/tdclatl/Database.h +60 -49
  251. data/source/global/tdclatl/DbDef.cpp +68 -64
  252. data/source/global/tdclatl/DbDef.h +36 -36
  253. data/source/global/tdclatl/Field.cpp +12 -17
  254. data/source/global/tdclatl/Field.h +15 -12
  255. data/source/global/tdclatl/FieldDef.cpp +75 -36
  256. data/source/global/tdclatl/FieldDef.h +38 -19
  257. data/source/global/tdclatl/FieldDefs.cpp +74 -0
  258. data/source/global/tdclatl/FieldDefs.h +56 -0
  259. data/source/global/tdclatl/FieldNames.cpp +99 -0
  260. data/source/global/tdclatl/FieldNames.h +66 -0
  261. data/source/global/tdclatl/Flags.cpp +75 -37
  262. data/source/global/tdclatl/Flags.h +13 -12
  263. data/source/global/tdclatl/GroupQuery.cpp +119 -0
  264. data/source/global/tdclatl/GroupQuery.h +65 -0
  265. data/source/global/tdclatl/KeyDef.cpp +15 -14
  266. data/source/global/tdclatl/KeyDef.h +20 -17
  267. data/source/global/tdclatl/KeySegment.cpp +13 -12
  268. data/source/global/tdclatl/PooledDbManager.cpp +223 -0
  269. data/source/global/tdclatl/PooledDbManager.h +76 -0
  270. data/source/global/tdclatl/QueryBase.cpp +206 -127
  271. data/source/global/tdclatl/QueryBase.h +55 -59
  272. data/source/global/tdclatl/Record.cpp +214 -0
  273. data/source/global/tdclatl/Record.h +96 -0
  274. data/source/global/tdclatl/Recordset.cpp +278 -0
  275. data/source/global/tdclatl/Recordset.h +83 -0
  276. data/source/global/tdclatl/RecordsetQuery.cpp +118 -0
  277. data/source/global/tdclatl/RecordsetQuery.h +126 -0
  278. data/source/global/tdclatl/Table.cpp +57 -60
  279. data/source/global/tdclatl/Table.h +32 -29
  280. data/source/global/tdclatl/TableDef.cpp +63 -62
  281. data/source/global/tdclatl/TableDef.h +20 -22
  282. data/source/global/tdclatl/TdVersion.cpp +3 -3
  283. data/source/global/tdclatl/TdVersion.h +15 -11
  284. data/source/global/tdclatl/_IDatabaseEvents_CP.h +99 -92
  285. data/source/global/tdclatl/activeTable.cpp +355 -0
  286. data/source/global/tdclatl/activeTable.h +79 -0
  287. data/source/global/tdclatl/dllmain.cpp +4 -3
  288. data/source/global/tdclatl/dllmain.h +7 -6
  289. data/source/global/tdclatl/keySegment.h +22 -18
  290. data/source/global/tdclatl/resource.h +0 -0
  291. data/source/global/tdclatl/stdafx.h +6 -4
  292. data/source/global/tdclatl/targetver.h +0 -1
  293. data/source/global/tdclatl/tdclatl.cpp +10 -5
  294. data/source/global/tdclatl/tdclatl.idl +530 -14
  295. data/source/linux/charsetConvert.h +78 -79
  296. data/source/linux/linuxTypes.h +9 -12
  297. data/source/linux/tchar.h +168 -166
  298. data/transactd.gemspec +24 -16
  299. metadata +98 -12
  300. data/bin/common/tdclc_32_1_2.dll +0 -0
  301. data/bin/common/tdclc_64_1_2.dll +0 -0
  302. data/build/tdclc/tdclc_32.cbproj +0 -173
  303. data/build/tdclcpp/tdclcpp_bcb_32.cbproj +0 -232
  304. data/build/tdclrb/GEM_VERSION +0 -3
  305. data/source/bzs/db/protocol/tdap/client/filter.cpp +0 -43
  306. data/source/bzs/example/useORM.cpp +0 -585
@@ -1,5 +1,5 @@
1
- #ifndef CHARSET_CONVERT_H
2
- #define CHARSET_CONVERT_H
1
+ #ifndef LINUX_CHARSET_CONVERT_H
2
+ #define LINUX_CHARSET_CONVERT_H
3
3
 
4
4
  /*=================================================================
5
5
  Copyright (C) 2013 BizStation Corp All rights reserved.
@@ -15,8 +15,8 @@
15
15
  GNU General Public License for more details.
16
16
 
17
17
  You should have received a copy of the GNU General Public License
18
- along with this program; if not, write to the Free Software
19
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
18
+ along with this program; if not, write to the Free Software
19
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
20
20
  02111-1307, USA.
21
21
  =================================================================*/
22
22
 
@@ -27,86 +27,85 @@
27
27
 
28
28
  inline size_t strlen16(const char16_t* src)
29
29
  {
30
- const char16_t* p = src;
31
- while(*p)
32
- ++p;
33
- return p - src;
30
+ const char16_t* p = src;
31
+ while (*p)
32
+ ++p;
33
+ return p - src;
34
34
  }
35
-
36
- #define ICONV_NO_INIT -1
37
- #define ICONV_SUCCESS 0
35
+
36
+ #define ICONV_NO_INIT -1
37
+ #define ICONV_SUCCESS 0
38
38
  #define ICONV_OPENRRROR 1
39
39
  class cvt
40
40
  {
41
- iconv_t m_cd;
42
- int m_stat;
43
- bool m_isOpend;
44
-
41
+ iconv_t m_cd;
42
+ int m_stat;
43
+ bool m_isOpend;
44
+
45
45
  public:
46
- cvt():m_stat(ICONV_NO_INIT),m_isOpend(false)
47
- {
48
-
49
- }
50
-
51
- cvt(const char* to, const char* from)
52
- :m_stat(ICONV_NO_INIT),m_isOpend(false)
53
- {
54
- setCharset(to, from);
55
- }
56
-
57
- ~cvt()
58
- {
59
- if (m_isOpend)
60
- iconv_close(m_cd);
61
- }
62
-
63
- int setCharset(const char* to, const char* from)
64
- {
65
- m_cd = iconv_open(to, from);
66
- if (m_cd == (iconv_t)-1)
67
- m_stat = ICONV_OPENRRROR;
68
- else
69
- m_stat = ICONV_SUCCESS;
70
- m_isOpend = (m_stat == ICONV_SUCCESS);
71
- return m_stat;
72
- }
73
-
74
- size_t conv(const char* src, size_t inszie, char* outbuf, size_t outbufsize)
75
- {
76
- if (inszie == -1)
77
- inszie = strlen(src);
78
- char* pout = outbuf;
79
-
80
- size_t len = iconv(m_cd, (char**)&src, &inszie, &pout, &outbufsize);
81
- if (outbufsize)
82
- *pout = 0x00;
83
- return pout - outbuf;
84
- }
85
-
86
- size_t conv(const char* src, size_t inszie, char16_t* outbuf, size_t outbufsize)
87
- {
88
- if (inszie == -1)
89
- inszie = strlen(src);
90
- char* pout = (char*)outbuf;
91
- size_t len = iconv(m_cd, (char**)&src, &inszie, &pout, &outbufsize);
92
-
93
- if (outbufsize)
94
- *pout = 0x00;
95
- return (char16_t*)pout - outbuf;
96
- }
97
-
98
- size_t conv(const char16_t* src, size_t inszie, char* outbuf, size_t outbufsize)
99
- {
100
- if (inszie == -1)
101
- inszie = strlen16(src)*sizeof(char16_t);
102
- char* pout = outbuf;
103
- size_t len = iconv(m_cd, (char**)&src, &inszie, &pout, &outbufsize);
104
- if (outbufsize)
105
- *pout = 0x00;
106
- return pout - outbuf;
107
- }
46
+ cvt() : m_stat(ICONV_NO_INIT), m_isOpend(false) {}
108
47
 
109
- };
48
+ cvt(const char* to, const char* from)
49
+ : m_stat(ICONV_NO_INIT), m_isOpend(false)
50
+ {
51
+ setCharset(to, from);
52
+ }
53
+
54
+ ~cvt()
55
+ {
56
+ if (m_isOpend)
57
+ iconv_close(m_cd);
58
+ }
59
+
60
+ int setCharset(const char* to, const char* from)
61
+ {
62
+ m_cd = iconv_open(to, from);
63
+ if (m_cd == (iconv_t)-1)
64
+ m_stat = ICONV_OPENRRROR;
65
+ else
66
+ m_stat = ICONV_SUCCESS;
67
+ m_isOpend = (m_stat == ICONV_SUCCESS);
68
+ return m_stat;
69
+ }
110
70
 
111
- #endif //CHARSET_CONVERT_H
71
+ size_t conv(const char* src, size_t inszie, char* outbuf, size_t outbufsize)
72
+ {
73
+ if ((int)inszie == -1)
74
+ inszie = strlen(src);
75
+ char* pout = outbuf;
76
+
77
+ /*size_t len =*/iconv(m_cd, (char**)&src, &inszie, &pout, &outbufsize);
78
+ if (outbufsize)
79
+ *pout = 0x00;
80
+ return pout - outbuf;
81
+ }
82
+
83
+ size_t conv(const char* src, size_t inszie, char16_t* outbuf,
84
+ size_t outbufsize)
85
+ {
86
+ if ((int)inszie == -1)
87
+ inszie = strlen(src);
88
+ char* pout = (char*)outbuf;
89
+ /*size_t len = */ iconv(m_cd, (char**)&src, &inszie, &pout,
90
+ &outbufsize);
91
+
92
+ if (outbufsize)
93
+ *pout = 0x00;
94
+ return (char16_t*)pout - outbuf;
95
+ }
96
+
97
+ size_t conv(const char16_t* src, size_t inszie, char* outbuf,
98
+ size_t outbufsize)
99
+ {
100
+ if ((int)inszie == -1)
101
+ inszie = strlen16(src) * sizeof(char16_t);
102
+ char* pout = outbuf;
103
+ /*size_t len = */ iconv(m_cd, (char**)&src, &inszie, &pout,
104
+ &outbufsize);
105
+ if (outbufsize)
106
+ *pout = 0x00;
107
+ return pout - outbuf;
108
+ }
109
+ };
112
110
 
111
+ #endif // LINUX_CHARSET_CONVERT_H
@@ -1,5 +1,5 @@
1
- #ifndef LINUX_TYPES_H
2
- #define LINUX_TYPES_H
1
+ #ifndef LINUX_LINUX_TYPES_H
2
+ #define LINUX_LINUX_TYPES_H
3
3
  /*=================================================================
4
4
  Copyright (C) 2013 BizStation Corp All rights reserved.
5
5
 
@@ -14,20 +14,17 @@
14
14
  GNU General Public License for more details.
15
15
 
16
16
  You should have received a copy of the GNU General Public License
17
- along with this program; if not, write to the Free Software
18
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
17
+ along with this program; if not, write to the Free Software
18
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
19
19
  02111-1307, USA.
20
20
  =================================================================*/
21
21
 
22
-
23
-
24
22
  #ifndef WCHAR
25
-
26
- typedef unsigned short char16_t;
27
- typedef char16_t WCHAR;
28
-
23
+ #if (!(__APPLE__ && (__BORLANDC__ || __clang__)))
24
+ typedef unsigned short char16_t;
29
25
  #endif
26
+ typedef char16_t WCHAR;
30
27
 
28
+ #endif
31
29
 
32
- #endif //LINUX_TYPES_H
33
-
30
+ #endif // LINUX_LINUX_TYPES_H
data/source/linux/tchar.h CHANGED
@@ -1,4 +1,6 @@
1
- /*
1
+ #ifndef LINUX_TCHAR_H
2
+ #define LINUX_TCHAR_H
3
+ /*
2
4
  * tchar.h
3
5
  *
4
6
  * Unicode mapping layer for the standard C library. By including this
@@ -35,9 +37,6 @@
35
37
  *
36
38
  */
37
39
 
38
- #ifndef _TCHAR_H_
39
- #define _TCHAR_H_
40
-
41
40
  #define _tcsclen _tcslen
42
41
  #define _tcsnccpy _tcsncpy
43
42
 
@@ -46,8 +45,8 @@
46
45
  * used to differentiate Win32 API calls.
47
46
  */
48
47
 
49
- #ifdef _UNICODE
50
- /*
48
+ #ifdef _UNICODE
49
+ /*
51
50
 
52
51
 
53
52
  // Use TCHAR instead of char or wchar_t. It will be appropriately translated
@@ -57,10 +56,10 @@
57
56
  #ifndef RC_INVOKED
58
57
  typedef wchar_t TCHAR;
59
58
  #ifndef _TCHAR
60
- typedef wchar_t _TCHAR;
59
+ typedef wchar_t _TCHAR;
61
60
  #endif
62
61
  typedef wchar_t _TUCHAR;
63
- #endif // Not RC_INVOKED
62
+ #endif // Not RC_INVOKED
64
63
  #define _TCHAR_DEFINED
65
64
  #endif
66
65
 
@@ -70,10 +69,10 @@ typedef wchar_t _TUCHAR;
70
69
  // macro passed as an argument to the macros _T or _TEXT. DO NOT use this
71
70
  // macro within your programs. It's name and function could change without
72
71
  // notice.
73
-
72
+
74
73
  #define __TEXT(q) L##q
75
74
 
76
- // for porting from other Windows compilers
75
+ // for porting from other Windows compilers
77
76
  #if 0 // no wide startup module
78
77
  #define _tmain wmain
79
78
  #define _tWinMain wWinMain
@@ -83,7 +82,7 @@ typedef wchar_t _TUCHAR;
83
82
 
84
83
 
85
84
  // Unicode functions
86
-
85
+
87
86
  #define _tprintf wprintf
88
87
  #define _ftprintf fwprintf
89
88
  #define _stprintf swprintf
@@ -157,7 +156,7 @@ typedef wchar_t _TUCHAR;
157
156
  #define _totupper towupper
158
157
  #define _totlower towlower
159
158
  #define _tcsftime wcsftime
160
- // Macro functions
159
+ // Macro functions
161
160
  #define _tcsdec _wcsdec
162
161
  #define _tcsinc _wcsinc
163
162
  #define _tcsnbcnt _wcsncnt
@@ -170,7 +169,8 @@ typedef wchar_t _TUCHAR;
170
169
  #define _wcsnextc(_wcs) ((unsigned int) *(_wcs))
171
170
  #define _wcsninc(_wcs, _inc) (((_wcs)+(_inc)))
172
171
  #define _wcsncnt(_wcs, _cnt) ((wcslen(_wcs)>_cnt) ? _count : wcslen(_wcs))
173
- #define _wcsspnp(_wcs1, _wcs2) ((*((_wcs1)+wcsspn(_wcs1,_wcs2))) ? ((_wcs1)+wcsspn(_wcs1,_wcs2)) : NULL)
172
+ #define _wcsspnp(_wcs1, _wcs2) ((*((_wcs1)+wcsspn(_wcs1,_wcs2))) ?
173
+ ((_wcs1)+wcsspn(_wcs1,_wcs2)) : NULL)
174
174
 
175
175
  #if 1 // defined __MSVCRT__
176
176
 
@@ -179,6 +179,7 @@ typedef wchar_t _TUCHAR;
179
179
 
180
180
  #define _ttoi64 _wtoi64
181
181
  #define _i64tot _i64tow
182
+ #define _i64tot_s _i64tow_s
182
183
  #define _ui64tot _ui64tow
183
184
  #define _tasctime _wasctime
184
185
  #define _tctime _wctime
@@ -219,9 +220,9 @@ typedef wchar_t _TUCHAR;
219
220
  #define _tmkdir _wmkdir
220
221
  #define _trmdir _wrmdir
221
222
  #define _tstat _wstat
222
- #endif // __MSVCRT__
223
+ #endif // __MSVCRT__
223
224
 
224
- // dirent structures and functions
225
+ // dirent structures and functions
225
226
  #define _tdirent _wdirent
226
227
  #define _TDIR _WDIR
227
228
  #define _topendir _wopendir
@@ -232,18 +233,18 @@ typedef wchar_t _TUCHAR;
232
233
  #define _tseekdir _wseekdir
233
234
  #define _stprintf_s swprintf_s
234
235
  */
235
- #else // Not _UNICODE
236
+ #else // Not _UNICODE
236
237
 
237
238
  /*
238
239
  * TCHAR, the type you should use instead of char.
239
240
  */
240
241
  #ifndef _TCHAR_DEFINED
241
242
  #ifndef RC_INVOKED
242
- typedef char TCHAR;
243
+ typedef char TCHAR;
243
244
  #ifndef _TCHAR
244
- typedef char _TCHAR;
245
+ typedef char _TCHAR;
245
246
  #endif
246
- typedef char _TUCHAR;
247
+ typedef char _TUCHAR;
247
248
 
248
249
  #endif
249
250
  #define _TCHAR_DEFINED
@@ -255,174 +256,175 @@ typedef char _TUCHAR;
255
256
  * macro within your programs. It's name and function could change without
256
257
  * notice.
257
258
  */
258
- #define __TEXT(q) q
259
+ #define __TEXT(q) q
259
260
 
260
261
  /* for porting from other Windows compilers */
261
- #define _tmain main
262
- #define _tWinMain WinMain
263
- #define _tenviron _environ
264
- #define __targv __argv
262
+ #define _tmain main
263
+ #define _tWinMain WinMain
264
+ #define _tenviron _environ
265
+ #define __targv __argv
265
266
 
266
267
  /*
267
268
  * Non-unicode (standard) functions
268
269
  */
269
270
 
270
- #define _tprintf printf
271
- #define _ftprintf fprintf
272
- #define _stprintf sprintf
273
- #define _sntprintf _snprintf
274
- #define _vtprintf vprintf
275
- #define _vftprintf vfprintf
276
- #define _vstprintf vsprintf
277
- #define _vsntprintf _vsnprintf
278
- #define _tscanf scanf
279
- #define _ftscanf fscanf
280
- #define _stscanf sscanf
281
- #define _fgettc fgetc
282
- #define _fgettchar _fgetchar
283
- #define _fgetts fgets
284
- #define _fputtc fputc
285
- #define _fputtchar _fputchar
286
- #define _fputts fputs
287
- #define _tfdopen _fdopen
288
- #define _tfopen fopen
289
- #define _tgetenv getenv
290
- #define _tputenv _putenv
291
- #define _tsearchenv _searchenv
292
- #define _tmakepath _makepath
293
- #define _tsplitpath _splitpath
294
- #define _tfullpath _fullpath
295
- #define _gettc getc
296
- #define _getts gets
297
- #define _puttc putc
298
- #define _putts puts
299
- #define _ungettc ungetc
300
- #define _tcstod strtod
301
- #define _tcstol strtol
302
- #define _tcstoul strtoul
303
- #define _itot _itoa
304
- #define _ltot _ltoa
305
- #define _ltot_s _ltoa_s
306
- #define _ultot _ultoa
307
- #define _ttoi atoi
308
- #define _ttol atol
309
- #define _ttof atof
310
- #define _tcscat strcat
311
- #define _tcscat_s strcat_s
312
- #define _tcschr strchr
313
- #define _tcscmp strcmp
314
- #define _tcscpy strcpy
315
- #define _tcscpy_s strcpy_s
316
- #define _tcscspn strcspn
317
- #define _tcslen strlen
318
- #define _tcsncat strncat
319
- #define _tcsncmp strncmp
320
- #define _tcsncpy strncpy
321
- #define _tcsncpy_s strncpy_s
322
- #define _tcspbrk strpbrk
323
- #define _tcsrchr strrchr
324
- #define _tcsspn strspn
325
- #define _tcsstr strstr
326
- #define _tcstok strtok
327
- #define _tcsdup _strdup
328
- #define _tcsicmp _stricmp
329
- #define _tcsnicmp _strnicmp
330
- #define _tcsnset _strnset
331
- #define _tcsrev _strrev
332
- #define _tcsset _strset
333
- #define _tcslwr _strlwr
334
- #define _tcsupr _strupr
335
- #define _tcsxfrm strxfrm
336
- #define _tcscoll strcoll
337
- #define _tcsicoll _stricoll
338
- #define _istalpha isalpha
339
- #define _istupper isupper
340
- #define _istlower islower
341
- #define _istdigit isdigit
342
- #define _istxdigit isxdigit
343
- #define _istspace isspace
344
- #define _istpunct ispunct
345
- #define _istalnum isalnum
346
- #define _istprint isprint
347
- #define _istgraph isgraph
348
- #define _istcntrl iscntrl
349
- #define _istascii isascii
350
- #define _totupper toupper
351
- #define _totlower tolower
352
- #define _tasctime asctime
353
- #define _tctime ctime
354
- #define _tstrdate _strdate
355
- #define _tstrtime _strtime
356
- #define _tutime _utime
357
- #define _tcsftime strftime
358
- /* Macro functions */
359
- #define _tcsdec _strdec
360
- #define _tcsinc _strinc
361
- #define _tcsnbcnt _strncnt
362
- #define _tcsnccnt _strncnt
363
- #define _tcsnextc _strnextc
364
- #define _tcsninc _strninc
365
- #define _tcsspnp _strspnp
366
- #define _strdec(_str1, _str2) ((_str1)>=(_str2) ? NULL : (_str2)-1)
367
- #define _strinc(_str) ((_str)+1)
368
- #define _strnextc(_str) ((unsigned int) *(_str))
369
- #define _strninc(_str, _inc) (((_str)+(_inc)))
370
- #define _strncnt(_str, _cnt) ((strlen(_str)>_cnt) ? _count : strlen(_str))
371
- #define _strspnp(_str1, _str2) ((*((_str1)+strspn(_str1,_str2))) ? ((_str1)+strspn(_str1,_str2)) : NULL)
271
+ #define _tprintf printf
272
+ #define _ftprintf fprintf
273
+ #define _stprintf sprintf
274
+ #define _sntprintf _snprintf
275
+ #define _vtprintf vprintf
276
+ #define _vftprintf vfprintf
277
+ #define _vstprintf vsprintf
278
+ #define _vsntprintf _vsnprintf
279
+ #define _tscanf scanf
280
+ #define _ftscanf fscanf
281
+ #define _stscanf sscanf
282
+ #define _fgettc fgetc
283
+ #define _fgettchar _fgetchar
284
+ #define _fgetts fgets
285
+ #define _fputtc fputc
286
+ #define _fputtchar _fputchar
287
+ #define _fputts fputs
288
+ #define _tfdopen _fdopen
289
+ #define _tfopen fopen
290
+ #define _tgetenv getenv
291
+ #define _tputenv _putenv
292
+ #define _tsearchenv _searchenv
293
+ #define _tmakepath _makepath
294
+ #define _tsplitpath _splitpath
295
+ #define _tfullpath _fullpath
296
+ #define _gettc getc
297
+ #define _getts gets
298
+ #define _puttc putc
299
+ #define _putts puts
300
+ #define _ungettc ungetc
301
+ #define _tcstod strtod
302
+ #define _tcstol strtol
303
+ #define _tcstoul strtoul
304
+ #define _itot _itoa
305
+ #define _ltot _ltoa
306
+ #define _ltot_s _ltoa_s
307
+ #define _ultot _ultoa
308
+ #define _ttoi atoi
309
+ #define _ttol atol
310
+ #define _ttof atof
311
+ #define _tcscat strcat
312
+ #define _tcscat_s strcat_s
313
+ #define _tcschr strchr
314
+ #define _tcscmp strcmp
315
+ #define _tcscpy strcpy
316
+ #define _tcscpy_s strcpy_s
317
+ #define _tcscspn strcspn
318
+ #define _tcslen strlen
319
+ #define _tcsncat strncat
320
+ #define _tcsncmp strncmp
321
+ #define _tcsncpy strncpy
322
+ #define _tcsncpy_s strncpy_s
323
+ #define _tcspbrk strpbrk
324
+ #define _tcsrchr strrchr
325
+ #define _tcsspn strspn
326
+ #define _tcsstr strstr
327
+ #define _tcstok strtok
328
+ #define _tcsdup _strdup
329
+ #define _tcsicmp strcasecmp
330
+ #define _tcsnicmp strncasecmp
331
+ #define _tcsnset _strnset
332
+ #define _tcsrev _strrev
333
+ #define _tcsset _strset
334
+ #define _tcslwr _strlwr
335
+ #define _tcsupr _strupr
336
+ #define _tcsxfrm strxfrm
337
+ #define _tcscoll strcoll
338
+ #define _tcsicoll _stricoll
339
+ #define _istalpha isalpha
340
+ #define _istupper isupper
341
+ #define _istlower islower
342
+ #define _istdigit isdigit
343
+ #define _istxdigit isxdigit
344
+ #define _istspace isspace
345
+ #define _istpunct ispunct
346
+ #define _istalnum isalnum
347
+ #define _istprint isprint
348
+ #define _istgraph isgraph
349
+ #define _istcntrl iscntrl
350
+ #define _istascii isascii
351
+ #define _totupper toupper
352
+ #define _totlower tolower
353
+ #define _tasctime asctime
354
+ #define _tctime ctime
355
+ #define _tstrdate _strdate
356
+ #define _tstrtime _strtime
357
+ #define _tutime _utime
358
+ #define _tcsftime strftime
359
+ /* Macro functions */
360
+ #define _tcsdec _strdec
361
+ #define _tcsinc _strinc
362
+ #define _tcsnbcnt _strncnt
363
+ #define _tcsnccnt _strncnt
364
+ #define _tcsnextc _strnextc
365
+ #define _tcsninc _strninc
366
+ #define _tcsspnp _strspnp
367
+ #define _strdec(_str1, _str2) ((_str1) >= (_str2) ? NULL : (_str2)-1)
368
+ #define _strinc(_str) ((_str)+1)
369
+ #define _strnextc(_str) ((unsigned int)*(_str))
370
+ #define _strninc(_str, _inc) (((_str) + (_inc)))
371
+ #define _strncnt(_str, _cnt) ((strlen(_str) > _cnt) ? _count : strlen(_str))
372
+ #define _strspnp(_str1, _str2) \
373
+ ((*((_str1)+strspn(_str1, _str2))) ? ((_str1)+strspn(_str1, _str2)) : NULL)
372
374
 
373
- #define _tchmod _chmod
374
- #define _tcreat _creat
375
+ #define _tchmod _chmod
376
+ #define _tcreat _creat
375
377
  #define _tfindfirst _findfirst
376
- #define _tfindnext _findnext
377
- #define _tmktemp _mktemp
378
- #define _topen _open
379
- #define _taccess _access
380
- #define _tremove remove
381
- #define _trename rename
382
- #define _tsopen _sopen
378
+ #define _tfindnext _findnext
379
+ #define _tmktemp _mktemp
380
+ #define _topen _open
381
+ #define _taccess _access
382
+ #define _tremove remove
383
+ #define _trename rename
384
+ #define _tsopen _sopen
383
385
  #define _tsetlocale setlocale
384
- #define _tunlink _unlink
385
- #define _tfinddata_t _finddata_t
386
- #define _tchdir _chdir
387
- #define _tgetcwd _getcwd
388
- #define _tgetdcwd _getdcwd
389
- #define _tmkdir _mkdir
390
- #define _trmdir _rmdir
391
- #define _tstat _stat
386
+ #define _tunlink _unlink
387
+ #define _tfinddata_t _finddata_t
388
+ #define _tchdir _chdir
389
+ #define _tgetcwd _getcwd
390
+ #define _tgetdcwd _getdcwd
391
+ #define _tmkdir _mkdir
392
+ #define _trmdir _rmdir
393
+ #define _tstat _stat
392
394
 
393
- #if 1 /* defined __MSVCRT__ */
395
+ #if 1 /* defined __MSVCRT__ */
394
396
  /* Not in crtdll.dll. Define macros anyway? */
395
- #define _ttoi64 _atoi64
396
- #define _i64tot _i64toa
397
- #define _ui64tot _ui64toa
398
- #define _tcsnccoll _strncoll
399
- #define _tcsncoll _strncoll
397
+ #define _ttoi64 _atoi64
398
+ #define _i64tot _i64toa
399
+ #define _i64tot_s _i64toa_s
400
+ #define _ui64tot _ui64toa
401
+ #define _tcsnccoll _strncoll
402
+ #define _tcsncoll _strncoll
400
403
  #define _tcsncicoll _strnicoll
401
- #define _tcsnicoll _strnicoll
402
- #define _tfindfirsti64 _findfirsti64
403
- #define _tfindnexti64 _findnexti64
404
+ #define _tcsnicoll _strnicoll
405
+ #define _tfindfirsti64 _findfirsti64
406
+ #define _tfindnexti64 _findnexti64
404
407
  #define _tfinddatai64_t _finddatai64_t
405
- #endif /* __MSVCRT__ */
408
+ #endif /* __MSVCRT__ */
406
409
 
407
410
  /* dirent structures and functions */
408
- #define _tdirent dirent
409
- #define _TDIR DIR
410
- #define _topendir opendir
411
- #define _tclosedir closedir
412
- #define _treaddir readdir
413
- #define _trewinddir rewinddir
414
- #define _ttelldir telldir
415
- #define _tseekdir seekdir
411
+ #define _tdirent dirent
412
+ #define _TDIR DIR
413
+ #define _topendir opendir
414
+ #define _tclosedir closedir
415
+ #define _treaddir readdir
416
+ #define _trewinddir rewinddir
417
+ #define _ttelldir telldir
418
+ #define _tseekdir seekdir
416
419
  #define _stprintf_s snprintf
417
- #endif /* Not _UNICODE */
420
+ #endif /* Not _UNICODE */
418
421
 
419
422
  /*
420
423
  * UNICODE a constant string when _UNICODE is defined else returns the string
421
424
  * unmodified. Also defined in w32api/winnt.h.
422
425
  */
423
- #define _TEXT(x) __TEXT(x)
426
+ #define _TEXT(x) __TEXT(x)
424
427
  #ifndef _T
425
- #define _T(x) __TEXT(x)
428
+ #define _T(x) __TEXT(x)
426
429
  #endif
427
- #endif /* Not _TCHAR_H_ */
428
-
430
+ #endif // LINUX_TCHAR_H