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.
- checksums.yaml +4 -4
- data/BUILD_UNIX-JA +46 -67
- data/BUILD_WIN-JA +106 -63
- data/CMakeLists.txt +40 -15
- data/README +219 -75
- data/README-JA +207 -76
- data/README_ORMSRCGEN +118 -0
- data/README_ORMSRCGEN-JA +115 -0
- data/bin/common/tdclc_32_2_0.dll +0 -0
- data/bin/common/tdclc_64_2_0.dll +0 -0
- data/build/common/check_for_link_iconv.cmake +18 -14
- data/build/common/create_symlink.cmake.in +25 -0
- data/build/common/get_boost_libs.cmake +23 -23
- data/build/common/options.cmake +0 -66
- data/build/common/smart_install.cmake +3 -3
- data/build/common/transactd.rc.in +15 -5
- data/build/common/transactd_cl_common.cmake +37 -18
- data/build/common/transactd_cl_output.cmake +55 -13
- data/build/common/transactd_common.cmake +108 -31
- data/build/swig/php/generate.cmake.in +15 -17
- data/build/swig/php/generate.cmd.in +15 -9
- data/build/swig/php/php.swg +124 -82
- data/build/swig/php/transactd.no_yield.php +4494 -0
- data/build/swig/php/transactd.no_yield.php.git.patch +685 -0
- data/build/swig/php/transactd.no_yield.php.patch +685 -0
- data/build/swig/php/transactd.yield.php +4461 -0
- data/build/swig/php/transactd.yield.php.git.patch +652 -0
- data/build/swig/php/transactd.yield.php.patch +652 -0
- data/build/swig/referencecounter.h +79 -0
- data/build/swig/ruby/ruby.swg +226 -76
- data/build/swig/ruby/threadBlockRegionWrapper.h +71 -0
- data/build/swig/ruby/without_gvl.swg +87 -0
- data/build/swig/tdcl.i +659 -170
- data/build/swig/validatablepointer.h +91 -0
- data/build/tdclc/CMakeLists.txt +49 -34
- data/build/tdclc/{tdclc_64.cbproj → tdclc.cbproj} +65 -20
- data/build/tdclc/tdclc.rc +0 -0
- data/build/tdclcpp/CMakeLists.txt +84 -20
- data/build/tdclcpp/tdclcpp.rc +0 -0
- data/build/tdclcpp/{tdclcpp_bcb_64.cbproj → tdclcpp_bc.cbproj} +168 -44
- data/build/tdclrb/CMakeLists.txt +84 -66
- data/build/tdclrb/bldgem/extconf.rb +28 -3
- data/build/tdclrb/gem/helper.rb +11 -1
- data/build/tdclrb/gem_output.cmake +20 -16
- data/index_ja.html +15 -0
- data/source/bzs/db/IBlobBuffer.h +15 -17
- data/source/bzs/db/blobBuffer.h +186 -140
- data/source/bzs/db/blobStructs.h +37 -37
- data/source/bzs/db/engine/mysql/IReadRecords.h +34 -34
- data/source/bzs/db/engine/mysql/bookmark.h +150 -147
- data/source/bzs/db/engine/mysql/database.cpp +1721 -1526
- data/source/bzs/db/engine/mysql/database.h +608 -370
- data/source/bzs/db/engine/mysql/dbManager.cpp +213 -201
- data/source/bzs/db/engine/mysql/dbManager.h +115 -104
- data/source/bzs/db/engine/mysql/errorMessage.cpp +49 -50
- data/source/bzs/db/engine/mysql/errorMessage.h +25 -26
- data/source/bzs/db/engine/mysql/fieldAccess.h +55 -61
- data/source/bzs/db/engine/mysql/mydebuglog.cpp +326 -292
- data/source/bzs/db/engine/mysql/mydebuglog.h +63 -55
- data/source/bzs/db/engine/mysql/mysqlInternal.h +182 -125
- data/source/bzs/db/engine/mysql/mysqlThd.cpp +121 -121
- data/source/bzs/db/engine/mysql/mysqlThd.h +20 -20
- data/source/bzs/db/engine/mysql/percentageKey.h +241 -228
- data/source/bzs/db/protocol/ICommandExecuter.h +18 -17
- data/source/bzs/db/protocol/hs/hsCommandExecuter.cpp +543 -514
- data/source/bzs/db/protocol/hs/hsCommandExecuter.h +155 -158
- data/source/bzs/db/protocol/tdap/btrDate.cpp +213 -180
- data/source/bzs/db/protocol/tdap/btrDate.h +39 -37
- data/source/bzs/db/protocol/tdap/client/activeTable.cpp +173 -0
- data/source/bzs/db/protocol/tdap/client/activeTable.h +165 -0
- data/source/bzs/db/protocol/tdap/client/activeTableImple.h +370 -0
- data/source/bzs/db/protocol/tdap/client/bulkInsert.h +13 -23
- data/source/bzs/db/protocol/tdap/client/client.cpp +81 -68
- data/source/bzs/db/protocol/tdap/client/client.h +361 -320
- data/source/bzs/db/protocol/tdap/client/connMgr.cpp +17 -22
- data/source/bzs/db/protocol/tdap/client/connMgr.h +17 -19
- data/source/bzs/db/protocol/tdap/client/connectionPool.cpp +243 -0
- data/source/bzs/db/protocol/tdap/client/connectionPool.h +109 -0
- data/source/bzs/db/protocol/tdap/client/database.cpp +327 -219
- data/source/bzs/db/protocol/tdap/client/database.h +141 -118
- data/source/bzs/db/protocol/tdap/client/databaseFactory.cpp +60 -62
- data/source/bzs/db/protocol/tdap/client/databaseManager.h +255 -0
- data/source/bzs/db/protocol/tdap/client/dbDef.cpp +315 -202
- data/source/bzs/db/protocol/tdap/client/dbDef.h +40 -32
- data/source/bzs/db/protocol/tdap/client/dllmain.cpp +390 -371
- data/source/bzs/db/protocol/tdap/client/errorMessage.cpp +148 -56
- data/source/bzs/db/protocol/tdap/client/errorMessage_ja.cpp +149 -57
- data/source/bzs/db/protocol/tdap/client/export.h +35 -0
- data/source/bzs/db/protocol/tdap/client/field.cpp +1985 -0
- data/source/bzs/db/protocol/tdap/client/field.h +393 -0
- data/source/bzs/db/protocol/tdap/client/fieldDDF.cpp +14 -14
- data/source/bzs/db/protocol/tdap/client/fieldDDF.h +11 -14
- data/source/bzs/db/protocol/tdap/client/fieldNameAlias.cpp +123 -0
- data/source/bzs/db/protocol/tdap/client/fieldNameAlias.h +58 -0
- data/source/bzs/db/protocol/tdap/client/fields.h +178 -0
- data/source/bzs/db/protocol/tdap/client/fileDDF.cpp +13 -16
- data/source/bzs/db/protocol/tdap/client/fileDDF.h +11 -17
- data/source/bzs/db/protocol/tdap/client/filter.h +423 -259
- data/source/bzs/db/protocol/tdap/client/groupComp.h +117 -0
- data/source/bzs/db/protocol/tdap/client/groupQuery.cpp +818 -0
- data/source/bzs/db/protocol/tdap/client/groupQuery.h +281 -0
- data/source/bzs/db/protocol/tdap/client/indexDDF.cpp +14 -17
- data/source/bzs/db/protocol/tdap/client/indexDDF.h +11 -14
- data/source/bzs/db/protocol/tdap/client/memRecord.cpp +231 -0
- data/source/bzs/db/protocol/tdap/client/memRecord.h +145 -0
- data/source/bzs/db/protocol/tdap/client/memRecordset.cpp +448 -0
- data/source/bzs/db/protocol/tdap/client/memRecordset.h +159 -0
- data/source/bzs/db/protocol/tdap/client/nsDatabase.cpp +300 -173
- data/source/bzs/db/protocol/tdap/client/nsDatabase.h +53 -36
- data/source/bzs/db/protocol/tdap/client/nsTable.cpp +171 -128
- data/source/bzs/db/protocol/tdap/client/nsTable.h +121 -87
- data/source/bzs/db/protocol/tdap/client/pooledDatabaseManager.h +173 -0
- data/source/bzs/db/protocol/tdap/client/recordset.cpp +209 -0
- data/source/bzs/db/protocol/tdap/client/recordset.h +86 -0
- data/source/bzs/db/protocol/tdap/client/recordsetImple.h +596 -0
- data/source/bzs/db/protocol/tdap/client/request.h +227 -170
- data/source/bzs/db/protocol/tdap/client/serializer.cpp +1288 -0
- data/source/bzs/db/protocol/tdap/client/serializer.h +295 -0
- data/source/bzs/db/protocol/tdap/client/sharedData.cpp +9 -12
- data/source/bzs/db/protocol/tdap/client/sharedData.h +18 -16
- data/source/bzs/db/protocol/tdap/client/sqlBuilder.cpp +494 -473
- data/source/bzs/db/protocol/tdap/client/sqlBuilder.h +51 -53
- data/source/bzs/db/protocol/tdap/client/stringConverter.h +214 -148
- data/source/bzs/db/protocol/tdap/client/table.cpp +929 -1665
- data/source/bzs/db/protocol/tdap/client/table.h +413 -87
- data/source/bzs/db/protocol/tdap/client/trdboostapi.h +642 -534
- data/source/bzs/db/protocol/tdap/client/trdboostapiInternal.h +25 -40
- data/source/bzs/db/protocol/tdap/client/trdclcppautolink.h +11 -15
- data/source/bzs/db/protocol/tdap/client/trdormapi.h +378 -437
- data/source/bzs/db/protocol/tdap/client/trnsctcl.def +1 -1
- data/source/bzs/db/protocol/tdap/fieldComp.h +127 -0
- data/source/bzs/db/protocol/tdap/myDateTime.cpp +352 -345
- data/source/bzs/db/protocol/tdap/mysql/characterset.cpp +75 -78
- data/source/bzs/db/protocol/tdap/mysql/characterset.h +18 -19
- data/source/bzs/db/protocol/tdap/mysql/databaseSchema.cpp +216 -199
- data/source/bzs/db/protocol/tdap/mysql/databaseSchema.h +23 -14
- data/source/bzs/db/protocol/tdap/mysql/debuglog.cpp +354 -314
- data/source/bzs/db/protocol/tdap/mysql/debuglog.h +57 -47
- data/source/bzs/db/protocol/tdap/mysql/recordsetReader.h +905 -739
- data/source/bzs/db/protocol/tdap/mysql/request.h +152 -159
- data/source/bzs/db/protocol/tdap/mysql/tdapCommandExecuter.cpp +1044 -879
- data/source/bzs/db/protocol/tdap/mysql/tdapCommandExecuter.h +87 -81
- data/source/bzs/db/protocol/tdap/tdapRequest.h +162 -130
- data/source/bzs/db/protocol/tdap/tdapSchema.cpp +368 -166
- data/source/bzs/db/protocol/tdap/tdapSchema.h +702 -566
- data/source/bzs/db/protocol/tdap/tdapcapi.h +387 -353
- data/source/bzs/db/transactd/appBuilderImple.h +21 -20
- data/source/bzs/db/transactd/appModule.cpp +350 -98
- data/source/bzs/db/transactd/appModule.h +31 -37
- data/source/bzs/db/transactd/connManager.cpp +138 -135
- data/source/bzs/db/transactd/connManager.h +28 -21
- data/source/bzs/db/transactd/connectionRecord.h +39 -39
- data/source/bzs/db/transactd/transactd.cpp +217 -203
- data/source/bzs/env/boost_bcb_link.h +131 -0
- data/source/bzs/env/compiler.h +136 -79
- data/source/bzs/env/crosscompile.cpp +57 -57
- data/source/bzs/env/crosscompile.h +130 -115
- data/source/bzs/env/fileopen.h +7 -8
- data/source/bzs/env/mbcswchrLinux.cpp +4 -9
- data/source/bzs/env/mbcswchrLinux.h +37 -34
- data/source/bzs/env/tcharMinGW.h +59 -0
- data/source/bzs/env/tstring.h +90 -95
- data/source/bzs/example/changeSchema.cpp +22 -23
- data/source/bzs/example/changeSchema_c.cpp +22 -24
- data/source/bzs/example/connection_pool_c.cpp +49 -104
- data/source/bzs/example/createDatabase.cpp +40 -47
- data/source/bzs/example/createDatabase_c.cpp +38 -43
- data/source/bzs/example/deleteRecords.cpp +10 -15
- data/source/bzs/example/deleteRecords_c.cpp +10 -14
- data/source/bzs/example/dropDatabase.cpp +3 -9
- data/source/bzs/example/dropDatabase_c.cpp +5 -6
- data/source/bzs/example/insertRecords.cpp +37 -29
- data/source/bzs/example/insertRecords_c.cpp +19 -25
- data/source/bzs/example/ormap_c.cpp +621 -0
- data/source/bzs/example/queryData.cpp +371 -0
- data/source/bzs/example/queryData.h +16 -0
- data/source/bzs/example/query_c.cpp +109 -0
- data/source/bzs/example/readRecords.cpp +27 -27
- data/source/bzs/example/readRecords_c.cpp +25 -23
- data/source/bzs/example/updateRecords.cpp +16 -21
- data/source/bzs/example/updateRecords_c.cpp +8 -12
- data/source/bzs/example/update_with_transaction.cpp +21 -24
- data/source/bzs/example/update_with_transaction_c.cpp +12 -15
- data/source/bzs/example/useORMRecord.cpp +177 -0
- data/source/bzs/netsvc/client/tcpClient.cpp +167 -156
- data/source/bzs/netsvc/client/tcpClient.h +541 -489
- data/source/bzs/netsvc/server/IAppModule.h +119 -32
- data/source/bzs/netsvc/server/iserver.h +21 -23
- data/source/bzs/netsvc/server/serverCpt.cpp +421 -391
- data/source/bzs/netsvc/server/serverCpt.h +41 -43
- data/source/bzs/netsvc/server/serverPipe.cpp +580 -565
- data/source/bzs/netsvc/server/serverPipe.h +44 -45
- data/source/bzs/netsvc/server/serverTpool.cpp +333 -303
- data/source/bzs/netsvc/server/serverTpool.h +38 -43
- data/source/bzs/rtl/benchmark.cpp +91 -31
- data/source/bzs/rtl/benchmark.h +76 -22
- data/source/bzs/rtl/datetime.cpp +231 -233
- data/source/bzs/rtl/datetime.h +16 -16
- data/source/bzs/rtl/debuglog.cpp +48 -51
- data/source/bzs/rtl/debuglog.h +55 -44
- data/source/bzs/rtl/exception.h +55 -48
- data/source/bzs/rtl/stl_uty.cpp +27 -28
- data/source/bzs/rtl/stl_uty.h +28 -29
- data/source/bzs/rtl/stringBuffers.cpp +8 -6
- data/source/bzs/rtl/stringBuffers.h +16 -9
- data/source/bzs/rtl/strtrim.cpp +90 -91
- data/source/bzs/rtl/strtrim.h +14 -16
- data/source/bzs/test/tdclatl/bench_query_atl.js +647 -0
- data/source/bzs/test/tdclatl/bench_tdclatl.js +303 -303
- data/source/bzs/test/tdclatl/test_query_atl.js +669 -0
- data/source/bzs/test/tdclphp/bench.php +357 -0
- data/source/bzs/test/tdclphp/transactd_Test.php +907 -303
- data/source/bzs/test/tdclphp/transactd_blob_Test.php +21 -49
- data/source/bzs/test/tdclphp/transactd_datetime_Test.php +41 -75
- data/source/bzs/test/tdclphp/transactd_kanjischema_Test.php +23 -37
- data/source/bzs/test/tdclphp/transactd_pool_Test.php +120 -0
- data/source/bzs/test/tdclrb/bench_tdclcpp.rb +4 -6
- data/source/bzs/test/tdclrb/prepare.rb +15 -12
- data/source/bzs/test/tdclrb/transactd_blob_spec.rb +29 -32
- data/source/bzs/test/tdclrb/transactd_datetime_spec.rb +0 -29
- data/source/bzs/test/tdclrb/transactd_kanjischema_spec.rb +18 -19
- data/source/bzs/test/tdclrb/transactd_pool_spec.rb +107 -0
- data/source/bzs/test/tdclrb/transactd_spec.rb +734 -142
- data/source/bzs/test/transactdBench/query_bench.cpp +156 -0
- data/source/bzs/test/transactdBench/scaling_bench.cpp +265 -0
- data/source/bzs/test/transactdBench/transactdBench.cpp +107 -83
- data/source/bzs/test/transactdBench/transactdBench2.cpp +122 -83
- data/source/bzs/test/transactdBench/workerBase.cpp +5 -0
- data/source/bzs/test/transactdBench/workerBase.h +88 -0
- data/source/bzs/test/transactdBench/workerMySQLImple.h +333 -0
- data/source/bzs/test/transactdBench/workerTransactdImple.h +201 -0
- data/source/bzs/test/trdclengn/test_blob.cpp +121 -73
- data/source/bzs/test/trdclengn/test_trdclengn.cpp +1244 -426
- data/source/global/ormsrcgen/confParam.h +80 -0
- data/source/global/ormsrcgen/fieldName.cpp +77 -0
- data/source/global/ormsrcgen/fieldName.h +43 -0
- data/source/global/ormsrcgen/main.cpp +196 -0
- data/source/global/ormsrcgen/srcgen.cpp +763 -0
- data/source/global/ormsrcgen/srcgen.h +72 -0
- data/source/global/ormsrcgen/template/fieldNameList_sample.txt +2 -0
- data/source/global/ormsrcgen/template/ormDataClass_template.cpp +48 -0
- data/source/global/ormsrcgen/template/ormDataClass_template.h +34 -0
- data/source/global/ormsrcgen/template/ormMapClass_template.cpp +51 -0
- data/source/global/ormsrcgen/template/ormMapClass_template.h +62 -0
- data/source/global/ormsrcgen/template/template.cnf +38 -0
- data/source/global/querystmts/querystmts.cpp +237 -0
- data/source/global/tdclatl/ConnectParams.cpp +77 -0
- data/source/global/tdclatl/ConnectParams.h +70 -0
- data/source/global/tdclatl/Database.cpp +132 -128
- data/source/global/tdclatl/Database.h +60 -49
- data/source/global/tdclatl/DbDef.cpp +68 -64
- data/source/global/tdclatl/DbDef.h +36 -36
- data/source/global/tdclatl/Field.cpp +12 -17
- data/source/global/tdclatl/Field.h +15 -12
- data/source/global/tdclatl/FieldDef.cpp +75 -36
- data/source/global/tdclatl/FieldDef.h +38 -19
- data/source/global/tdclatl/FieldDefs.cpp +74 -0
- data/source/global/tdclatl/FieldDefs.h +56 -0
- data/source/global/tdclatl/FieldNames.cpp +99 -0
- data/source/global/tdclatl/FieldNames.h +66 -0
- data/source/global/tdclatl/Flags.cpp +75 -37
- data/source/global/tdclatl/Flags.h +13 -12
- data/source/global/tdclatl/GroupQuery.cpp +119 -0
- data/source/global/tdclatl/GroupQuery.h +65 -0
- data/source/global/tdclatl/KeyDef.cpp +15 -14
- data/source/global/tdclatl/KeyDef.h +20 -17
- data/source/global/tdclatl/KeySegment.cpp +13 -12
- data/source/global/tdclatl/PooledDbManager.cpp +223 -0
- data/source/global/tdclatl/PooledDbManager.h +76 -0
- data/source/global/tdclatl/QueryBase.cpp +206 -127
- data/source/global/tdclatl/QueryBase.h +55 -59
- data/source/global/tdclatl/Record.cpp +214 -0
- data/source/global/tdclatl/Record.h +96 -0
- data/source/global/tdclatl/Recordset.cpp +278 -0
- data/source/global/tdclatl/Recordset.h +83 -0
- data/source/global/tdclatl/RecordsetQuery.cpp +118 -0
- data/source/global/tdclatl/RecordsetQuery.h +126 -0
- data/source/global/tdclatl/Table.cpp +57 -60
- data/source/global/tdclatl/Table.h +32 -29
- data/source/global/tdclatl/TableDef.cpp +63 -62
- data/source/global/tdclatl/TableDef.h +20 -22
- data/source/global/tdclatl/TdVersion.cpp +3 -3
- data/source/global/tdclatl/TdVersion.h +15 -11
- data/source/global/tdclatl/_IDatabaseEvents_CP.h +99 -92
- data/source/global/tdclatl/activeTable.cpp +355 -0
- data/source/global/tdclatl/activeTable.h +79 -0
- data/source/global/tdclatl/dllmain.cpp +4 -3
- data/source/global/tdclatl/dllmain.h +7 -6
- data/source/global/tdclatl/keySegment.h +22 -18
- data/source/global/tdclatl/resource.h +0 -0
- data/source/global/tdclatl/stdafx.h +6 -4
- data/source/global/tdclatl/targetver.h +0 -1
- data/source/global/tdclatl/tdclatl.cpp +10 -5
- data/source/global/tdclatl/tdclatl.idl +530 -14
- data/source/linux/charsetConvert.h +78 -79
- data/source/linux/linuxTypes.h +9 -12
- data/source/linux/tchar.h +168 -166
- data/transactd.gemspec +24 -16
- metadata +98 -12
- data/bin/common/tdclc_32_1_2.dll +0 -0
- data/bin/common/tdclc_64_1_2.dll +0 -0
- data/build/tdclc/tdclc_32.cbproj +0 -173
- data/build/tdclcpp/tdclcpp_bcb_32.cbproj +0 -232
- data/build/tdclrb/GEM_VERSION +0 -3
- data/source/bzs/db/protocol/tdap/client/filter.cpp +0 -43
- data/source/bzs/example/useORM.cpp +0 -585
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
#ifndef
|
|
2
|
-
#define
|
|
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
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
const char16_t* p = src;
|
|
31
|
+
while (*p)
|
|
32
|
+
++p;
|
|
33
|
+
return p - src;
|
|
34
34
|
}
|
|
35
|
-
|
|
36
|
-
#define ICONV_NO_INIT
|
|
37
|
-
#define ICONV_SUCCESS
|
|
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
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
41
|
+
iconv_t m_cd;
|
|
42
|
+
int m_stat;
|
|
43
|
+
bool m_isOpend;
|
|
44
|
+
|
|
45
45
|
public:
|
|
46
|
-
|
|
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
|
-
|
|
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
|
data/source/linux/linuxTypes.h
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
#ifndef
|
|
2
|
-
#define
|
|
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
|
-
|
|
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
|
|
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
|
|
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
|
-
|
|
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))) ?
|
|
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
|
|
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
|
|
243
|
+
typedef char TCHAR;
|
|
243
244
|
#ifndef _TCHAR
|
|
244
|
-
|
|
245
|
+
typedef char _TCHAR;
|
|
245
246
|
#endif
|
|
246
|
-
typedef char
|
|
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
|
|
259
|
+
#define __TEXT(q) q
|
|
259
260
|
|
|
260
261
|
/* for porting from other Windows compilers */
|
|
261
|
-
#define _tmain
|
|
262
|
-
#define _tWinMain
|
|
263
|
-
#define _tenviron
|
|
264
|
-
#define __targv
|
|
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
|
|
271
|
-
#define _ftprintf
|
|
272
|
-
#define
|
|
273
|
-
#define
|
|
274
|
-
#define
|
|
275
|
-
#define
|
|
276
|
-
#define _vstprintf
|
|
277
|
-
#define
|
|
278
|
-
#define
|
|
279
|
-
#define
|
|
280
|
-
#define
|
|
281
|
-
#define
|
|
282
|
-
#define
|
|
283
|
-
#define
|
|
284
|
-
#define
|
|
285
|
-
#define
|
|
286
|
-
#define
|
|
287
|
-
#define _tfdopen
|
|
288
|
-
#define
|
|
289
|
-
#define
|
|
290
|
-
#define
|
|
291
|
-
#define
|
|
292
|
-
#define
|
|
293
|
-
#define
|
|
294
|
-
#define
|
|
295
|
-
#define
|
|
296
|
-
#define
|
|
297
|
-
#define
|
|
298
|
-
#define
|
|
299
|
-
#define
|
|
300
|
-
#define
|
|
301
|
-
#define
|
|
302
|
-
#define _tcstoul
|
|
303
|
-
#define
|
|
304
|
-
#define
|
|
305
|
-
#define _ltot_s
|
|
306
|
-
#define
|
|
307
|
-
#define
|
|
308
|
-
#define
|
|
309
|
-
#define _ttof
|
|
310
|
-
#define
|
|
311
|
-
#define _tcscat_s
|
|
312
|
-
#define _tcschr
|
|
313
|
-
#define _tcscmp
|
|
314
|
-
#define _tcscpy
|
|
315
|
-
#define _tcscpy_s
|
|
316
|
-
#define _tcscspn
|
|
317
|
-
#define
|
|
318
|
-
#define
|
|
319
|
-
#define
|
|
320
|
-
#define
|
|
321
|
-
#define _tcsncpy_s
|
|
322
|
-
#define
|
|
323
|
-
#define
|
|
324
|
-
#define _tcsspn
|
|
325
|
-
#define
|
|
326
|
-
#define _tcstok
|
|
327
|
-
#define
|
|
328
|
-
#define
|
|
329
|
-
#define
|
|
330
|
-
#define
|
|
331
|
-
#define
|
|
332
|
-
#define _tcsset
|
|
333
|
-
#define
|
|
334
|
-
#define
|
|
335
|
-
#define
|
|
336
|
-
#define
|
|
337
|
-
#define
|
|
338
|
-
#define
|
|
339
|
-
#define
|
|
340
|
-
#define
|
|
341
|
-
#define
|
|
342
|
-
#define
|
|
343
|
-
#define
|
|
344
|
-
#define
|
|
345
|
-
#define
|
|
346
|
-
#define
|
|
347
|
-
#define
|
|
348
|
-
#define
|
|
349
|
-
#define
|
|
350
|
-
#define _totupper
|
|
351
|
-
#define
|
|
352
|
-
#define
|
|
353
|
-
#define
|
|
354
|
-
#define
|
|
355
|
-
#define
|
|
356
|
-
#define
|
|
357
|
-
#define _tcsftime
|
|
358
|
-
/* Macro functions */
|
|
359
|
-
#define _tcsdec
|
|
360
|
-
#define _tcsinc
|
|
361
|
-
#define _tcsnbcnt
|
|
362
|
-
#define _tcsnccnt
|
|
363
|
-
#define _tcsnextc
|
|
364
|
-
#define _tcsninc
|
|
365
|
-
#define _tcsspnp
|
|
366
|
-
#define _strdec(_str1, _str2) ((_str1)>=(_str2) ? NULL : (_str2)-1)
|
|
367
|
-
#define _strinc(_str)
|
|
368
|
-
#define _strnextc(_str) ((unsigned int)
|
|
369
|
-
#define _strninc(_str, _inc) (((_str)+(_inc)))
|
|
370
|
-
#define _strncnt(_str, _cnt) ((strlen(_str)>_cnt) ? _count : strlen(_str))
|
|
371
|
-
#define _strspnp(_str1, _str2)
|
|
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
|
|
374
|
-
#define _tcreat
|
|
375
|
+
#define _tchmod _chmod
|
|
376
|
+
#define _tcreat _creat
|
|
375
377
|
#define _tfindfirst _findfirst
|
|
376
|
-
#define _tfindnext
|
|
377
|
-
#define _tmktemp
|
|
378
|
-
#define _topen
|
|
379
|
-
#define _taccess
|
|
380
|
-
#define _tremove
|
|
381
|
-
#define _trename
|
|
382
|
-
#define _tsopen
|
|
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
|
|
385
|
-
#define _tfinddata_t
|
|
386
|
-
#define _tchdir
|
|
387
|
-
#define _tgetcwd
|
|
388
|
-
#define _tgetdcwd
|
|
389
|
-
#define _tmkdir
|
|
390
|
-
#define _trmdir
|
|
391
|
-
#define _tstat
|
|
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
|
|
395
|
+
#if 1 /* defined __MSVCRT__ */
|
|
394
396
|
/* Not in crtdll.dll. Define macros anyway? */
|
|
395
|
-
#define _ttoi64
|
|
396
|
-
#define _i64tot
|
|
397
|
-
#define
|
|
398
|
-
#define
|
|
399
|
-
#define
|
|
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
|
|
402
|
-
#define _tfindfirsti64
|
|
403
|
-
#define _tfindnexti64
|
|
404
|
+
#define _tcsnicoll _strnicoll
|
|
405
|
+
#define _tfindfirsti64 _findfirsti64
|
|
406
|
+
#define _tfindnexti64 _findnexti64
|
|
404
407
|
#define _tfinddatai64_t _finddatai64_t
|
|
405
|
-
#endif
|
|
408
|
+
#endif /* __MSVCRT__ */
|
|
406
409
|
|
|
407
410
|
/* dirent structures and functions */
|
|
408
|
-
#define _tdirent
|
|
409
|
-
#define _TDIR
|
|
410
|
-
#define _topendir
|
|
411
|
-
#define _tclosedir
|
|
412
|
-
#define _treaddir
|
|
413
|
-
#define _trewinddir
|
|
414
|
-
#define _ttelldir
|
|
415
|
-
#define _tseekdir
|
|
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
|
|
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)
|
|
426
|
+
#define _TEXT(x) __TEXT(x)
|
|
424
427
|
#ifndef _T
|
|
425
|
-
|
|
428
|
+
#define _T(x) __TEXT(x)
|
|
426
429
|
#endif
|
|
427
|
-
#endif
|
|
428
|
-
|
|
430
|
+
#endif // LINUX_TCHAR_H
|