mirror of
https://gitee.com/acl-dev/acl.git
synced 2024-11-29 18:37:41 +08:00
常规性BUG修复及类功能增加
修复了新加类 scan_dir 的一些问题; string 增加按行读数据功能; http_client/http_request 增加按行读数据功能
This commit is contained in:
parent
1c565c875b
commit
e864adeb9c
@ -231,14 +231,20 @@ EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lib_acl", "lib_acl\lib_acl_vc2003.vcproj", "{B40213C2-507C-4C7F-A6E1-B850C9BDC27B}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lib_protocol", "lib_protocol\lib_protocol_vc2003.vcproj", "{FE724EF7-3763-4E78-BDF5-BCBC075719FD}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lib_acl_cpp", "lib_acl_cpp\lib_acl_cpp_vc2003.vcproj", "{6EC1F44E-6A6A-48E9-B699-D7E89B63C8DC}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "singleton", "lib_acl_cpp\samples\singleton\singleton.vcproj", "{128791D9-6787-471C-9A0C-0DCAE53F4911}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
@ -361,6 +367,9 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "json6", "lib_acl_cpp\sample
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "http_request_manager", "lib_acl_cpp\samples\http_request_manager\http_request_manager.vcproj", "{58FE3581-C997-4BD5-9AC6-AEEB54A43D2C}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{6EC1F44E-6A6A-48E9-B699-D7E89B63C8DC} = {6EC1F44E-6A6A-48E9-B699-D7E89B63C8DC}
|
||||
{B40213C2-507C-4C7F-A6E1-B850C9BDC27B} = {B40213C2-507C-4C7F-A6E1-B850C9BDC27B}
|
||||
{FE724EF7-3763-4E78-BDF5-BCBC075719FD} = {FE724EF7-3763-4E78-BDF5-BCBC075719FD}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "connect_manager", "lib_acl_cpp\samples\connect_manager\connect_manager.vcproj", "{58FE3581-C997-4BD5-9AC6-AEEB54A43D2C}"
|
||||
|
@ -1,5 +1,21 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 10.00
|
||||
# Visual Studio 2008
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{4FE55739-6D3E-4FA7-BC10-05AB84E3D721}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "aio", "aio", "{B8331BFA-4F66-41B8-9A0F-8B7617DC07B8}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "http", "http", "{A5067909-CF04-464D-AE14-FF26459A91D2}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "master", "master", "{760D6431-74CA-434F-AFAA-7816162F9821}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "mime", "mime", "{A5249932-813D-4B64-9307-0EB5FC464705}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "db", "db", "{9FE233BA-6510-4A21-9CB4-C2FF448506A3}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "stream", "stream", "{462CDA64-00AD-4468-B0CD-A24D8897BE04}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "thread", "thread", "{F3E793C9-05F6-46CC-AFC1-6A3590AC2B4F}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lib_protocol", "lib_protocol\lib_protocol_vc2008.vcproj", "{FE724EF7-3763-4E78-BDF5-BCBC075719FD}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "acl_cpp_test", "lib_acl_cpp\samples\acl_cpp_test\acl_cpp_test_vc2008.vcproj", "{C8CED6EB-DCC8-4CEE-921F-3190C879B116}"
|
||||
@ -377,22 +393,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "http_request_manager", "lib
|
||||
{FE724EF7-3763-4E78-BDF5-BCBC075719FD} = {FE724EF7-3763-4E78-BDF5-BCBC075719FD}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{4FE55739-6D3E-4FA7-BC10-05AB84E3D721}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "aio", "aio", "{B8331BFA-4F66-41B8-9A0F-8B7617DC07B8}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "http", "http", "{A5067909-CF04-464D-AE14-FF26459A91D2}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "master", "master", "{760D6431-74CA-434F-AFAA-7816162F9821}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "mime", "mime", "{A5249932-813D-4B64-9307-0EB5FC464705}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "db", "db", "{9FE233BA-6510-4A21-9CB4-C2FF448506A3}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "stream", "stream", "{462CDA64-00AD-4468-B0CD-A24D8897BE04}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "thread", "thread", "{F3E793C9-05F6-46CC-AFC1-6A3590AC2B4F}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "connect_manager", "lib_acl_cpp\samples\connect_manager\connect_manager_vc2008.vcproj", "{F7B28783-B507-42D8-BB2B-4B61E2B49FB7}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{64BF4D83-53BB-4045-8522-9FF9F73B14D4} = {64BF4D83-53BB-4045-8522-9FF9F73B14D4}
|
||||
@ -868,34 +868,35 @@ Global
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
{B8331BFA-4F66-41B8-9A0F-8B7617DC07B8} = {4FE55739-6D3E-4FA7-BC10-05AB84E3D721}
|
||||
{1509DA30-29B0-4B73-921A-BBBD9E5608BE} = {4FE55739-6D3E-4FA7-BC10-05AB84E3D721}
|
||||
{A5067909-CF04-464D-AE14-FF26459A91D2} = {4FE55739-6D3E-4FA7-BC10-05AB84E3D721}
|
||||
{760D6431-74CA-434F-AFAA-7816162F9821} = {4FE55739-6D3E-4FA7-BC10-05AB84E3D721}
|
||||
{A5249932-813D-4B64-9307-0EB5FC464705} = {4FE55739-6D3E-4FA7-BC10-05AB84E3D721}
|
||||
{9FE233BA-6510-4A21-9CB4-C2FF448506A3} = {4FE55739-6D3E-4FA7-BC10-05AB84E3D721}
|
||||
{462CDA64-00AD-4468-B0CD-A24D8897BE04} = {4FE55739-6D3E-4FA7-BC10-05AB84E3D721}
|
||||
{F3E793C9-05F6-46CC-AFC1-6A3590AC2B4F} = {4FE55739-6D3E-4FA7-BC10-05AB84E3D721}
|
||||
{C8CED6EB-DCC8-4CEE-921F-3190C879B116} = {4FE55739-6D3E-4FA7-BC10-05AB84E3D721}
|
||||
{1509DA30-29B0-4B73-921A-BBBD9E5608BE} = {4FE55739-6D3E-4FA7-BC10-05AB84E3D721}
|
||||
{840C2263-DF87-4FD2-8964-EF81B74695FE} = {4FE55739-6D3E-4FA7-BC10-05AB84E3D721}
|
||||
{5F4063AD-B591-4C64-ADEA-609968A83550} = {4FE55739-6D3E-4FA7-BC10-05AB84E3D721}
|
||||
{02B1C8C9-0B52-491D-89D3-8B37CE3A4FE9} = {4FE55739-6D3E-4FA7-BC10-05AB84E3D721}
|
||||
{462CDA64-00AD-4468-B0CD-A24D8897BE04} = {4FE55739-6D3E-4FA7-BC10-05AB84E3D721}
|
||||
{F37E8828-252D-4F3E-A5B6-E3770750042F} = {4FE55739-6D3E-4FA7-BC10-05AB84E3D721}
|
||||
{760D6431-74CA-434F-AFAA-7816162F9821} = {4FE55739-6D3E-4FA7-BC10-05AB84E3D721}
|
||||
{B8029C89-9870-4EE4-ADD0-E7852E0D1810} = {4FE55739-6D3E-4FA7-BC10-05AB84E3D721}
|
||||
{B320FF31-CC9A-41F7-B96D-7DA2FE0B45F2} = {4FE55739-6D3E-4FA7-BC10-05AB84E3D721}
|
||||
{A5249932-813D-4B64-9307-0EB5FC464705} = {4FE55739-6D3E-4FA7-BC10-05AB84E3D721}
|
||||
{90D013A0-4813-4BAB-8155-D175631A695E} = {4FE55739-6D3E-4FA7-BC10-05AB84E3D721}
|
||||
{128791D9-6787-471C-9A0C-0DCAE53F4911} = {4FE55739-6D3E-4FA7-BC10-05AB84E3D721}
|
||||
{C94BEF01-706C-49A7-9FF1-9D87FA5BB8E7} = {4FE55739-6D3E-4FA7-BC10-05AB84E3D721}
|
||||
{F3E793C9-05F6-46CC-AFC1-6A3590AC2B4F} = {4FE55739-6D3E-4FA7-BC10-05AB84E3D721}
|
||||
{143ED97E-1EC6-4821-A5FA-A6728B69273E} = {4FE55739-6D3E-4FA7-BC10-05AB84E3D721}
|
||||
{2DABFAD1-114B-4F96-9185-DC0C56A3662D} = {4FE55739-6D3E-4FA7-BC10-05AB84E3D721}
|
||||
{F6292B2C-2C57-40E1-805F-86D9FB1C3251} = {4FE55739-6D3E-4FA7-BC10-05AB84E3D721}
|
||||
{C8CED6EB-DCC8-4CEE-921F-3190C879B116} = {4FE55739-6D3E-4FA7-BC10-05AB84E3D721}
|
||||
{F7B28783-B507-42D8-BB2B-4B61E2B49FB7} = {4FE55739-6D3E-4FA7-BC10-05AB84E3D721}
|
||||
{9A04F86E-D4CB-45ED-9BB6-9939B9400B6F} = {B8331BFA-4F66-41B8-9A0F-8B7617DC07B8}
|
||||
{BE2DF8B2-2DCD-4F32-99B9-0B0CA24BFAD9} = {B8331BFA-4F66-41B8-9A0F-8B7617DC07B8}
|
||||
{956FA905-A77F-41FE-A4BE-C3BD3B5B3E83} = {B8331BFA-4F66-41B8-9A0F-8B7617DC07B8}
|
||||
{225D0BFA-64D7-4F8F-951E-36A494CF6178} = {B8331BFA-4F66-41B8-9A0F-8B7617DC07B8}
|
||||
{349F7822-A752-42F0-BB13-4A28497D68DF} = {B8331BFA-4F66-41B8-9A0F-8B7617DC07B8}
|
||||
{8CF882F1-3D3C-4233-BCA6-7F90E49B80BE} = {B8331BFA-4F66-41B8-9A0F-8B7617DC07B8}
|
||||
{ADE6F714-BD52-432D-AB86-62FA59AB6746} = {B8331BFA-4F66-41B8-9A0F-8B7617DC07B8}
|
||||
{9A04F86E-D4CB-45ED-9BB6-9939B9400B6F} = {B8331BFA-4F66-41B8-9A0F-8B7617DC07B8}
|
||||
{864A7341-756C-4BF9-A16F-059FDD972D79} = {A5067909-CF04-464D-AE14-FF26459A91D2}
|
||||
{A28B19ED-291C-47C8-BDD5-10BB038C371E} = {A5067909-CF04-464D-AE14-FF26459A91D2}
|
||||
{82B65DCB-D910-4B92-BFDF-15896A575861} = {A5067909-CF04-464D-AE14-FF26459A91D2}
|
||||
{BC32C5A1-CDE1-4872-9CE8-5F3A65D39680} = {A5067909-CF04-464D-AE14-FF26459A91D2}
|
||||
@ -905,28 +906,27 @@ Global
|
||||
{5A189A92-9AF4-49FC-ABF4-8220A26E46D0} = {A5067909-CF04-464D-AE14-FF26459A91D2}
|
||||
{C0A7DB86-EF13-4A3E-9F34-8950521C9675} = {A5067909-CF04-464D-AE14-FF26459A91D2}
|
||||
{5E83EEF1-A13E-4B61-A8DA-8884113C84B4} = {A5067909-CF04-464D-AE14-FF26459A91D2}
|
||||
{864A7341-756C-4BF9-A16F-059FDD972D79} = {A5067909-CF04-464D-AE14-FF26459A91D2}
|
||||
{A804ECF6-59F0-4CCF-8D71-6E44CBCA2796} = {9FE233BA-6510-4A21-9CB4-C2FF448506A3}
|
||||
{20013703-57CC-4821-BF24-129A12490435} = {9FE233BA-6510-4A21-9CB4-C2FF448506A3}
|
||||
{DC7E75E5-FE42-4529-9D9A-19D240B8727B} = {9FE233BA-6510-4A21-9CB4-C2FF448506A3}
|
||||
{82C00ED0-AEF5-4E5B-9581-1EA052CBEA01} = {9FE233BA-6510-4A21-9CB4-C2FF448506A3}
|
||||
{7DA0AC89-62E4-4D02-9BC5-C32E6846E168} = {462CDA64-00AD-4468-B0CD-A24D8897BE04}
|
||||
{41FA5224-3315-4CDA-9C44-19085049F179} = {462CDA64-00AD-4468-B0CD-A24D8897BE04}
|
||||
{B14C93A6-DABE-48F9-A78C-C94049B69984} = {462CDA64-00AD-4468-B0CD-A24D8897BE04}
|
||||
{7680672C-4C9B-4BE8-8BAE-BB23B951AAA0} = {462CDA64-00AD-4468-B0CD-A24D8897BE04}
|
||||
{4B7C83E5-C34F-4C42-9A37-E5F33FBA2EA3} = {760D6431-74CA-434F-AFAA-7816162F9821}
|
||||
{30C232C9-8064-4C45-8030-696F367A1B66} = {760D6431-74CA-434F-AFAA-7816162F9821}
|
||||
{B7EE43F4-7541-48A7-A066-DA60A55E67ED} = {760D6431-74CA-434F-AFAA-7816162F9821}
|
||||
{FA0EEABF-CC21-4A99-89AA-D0379175E55A} = {760D6431-74CA-434F-AFAA-7816162F9821}
|
||||
{80F0213B-A053-4420-BAF9-4657AD8473DA} = {760D6431-74CA-434F-AFAA-7816162F9821}
|
||||
{1DD31312-7815-49A6-AD50-82205FA8C4A5} = {760D6431-74CA-434F-AFAA-7816162F9821}
|
||||
{FCF1825E-6A9C-4621-832C-D7FC6810707D} = {760D6431-74CA-434F-AFAA-7816162F9821}
|
||||
{4B7C83E5-C34F-4C42-9A37-E5F33FBA2EA3} = {760D6431-74CA-434F-AFAA-7816162F9821}
|
||||
{52AA7352-CE48-4F60-B92D-1EB16A79FE54} = {A5249932-813D-4B64-9307-0EB5FC464705}
|
||||
{19CB30E5-2672-4A8B-96FB-9C42970CCF69} = {A5249932-813D-4B64-9307-0EB5FC464705}
|
||||
{5DC79C83-9DE8-46B3-A172-8A4E3371878B} = {A5249932-813D-4B64-9307-0EB5FC464705}
|
||||
{1B51538E-859A-46FE-B423-592D79DEEF63} = {A5249932-813D-4B64-9307-0EB5FC464705}
|
||||
{503AFD46-DF2F-4D2B-8584-60AD2007D2BE} = {A5249932-813D-4B64-9307-0EB5FC464705}
|
||||
{52AA7352-CE48-4F60-B92D-1EB16A79FE54} = {A5249932-813D-4B64-9307-0EB5FC464705}
|
||||
{6319215C-021F-4439-A085-D1F35BF6E85A} = {F3E793C9-05F6-46CC-AFC1-6A3590AC2B4F}
|
||||
{82C00ED0-AEF5-4E5B-9581-1EA052CBEA01} = {9FE233BA-6510-4A21-9CB4-C2FF448506A3}
|
||||
{A804ECF6-59F0-4CCF-8D71-6E44CBCA2796} = {9FE233BA-6510-4A21-9CB4-C2FF448506A3}
|
||||
{20013703-57CC-4821-BF24-129A12490435} = {9FE233BA-6510-4A21-9CB4-C2FF448506A3}
|
||||
{DC7E75E5-FE42-4529-9D9A-19D240B8727B} = {9FE233BA-6510-4A21-9CB4-C2FF448506A3}
|
||||
{7680672C-4C9B-4BE8-8BAE-BB23B951AAA0} = {462CDA64-00AD-4468-B0CD-A24D8897BE04}
|
||||
{7DA0AC89-62E4-4D02-9BC5-C32E6846E168} = {462CDA64-00AD-4468-B0CD-A24D8897BE04}
|
||||
{41FA5224-3315-4CDA-9C44-19085049F179} = {462CDA64-00AD-4468-B0CD-A24D8897BE04}
|
||||
{B14C93A6-DABE-48F9-A78C-C94049B69984} = {462CDA64-00AD-4468-B0CD-A24D8897BE04}
|
||||
{5BE9D250-12FD-48D2-B918-035E079E5BD0} = {F3E793C9-05F6-46CC-AFC1-6A3590AC2B4F}
|
||||
{6319215C-021F-4439-A085-D1F35BF6E85A} = {F3E793C9-05F6-46CC-AFC1-6A3590AC2B4F}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
@ -194,6 +194,13 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "connect_manager", "lib_acl_
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dircopy", "lib_acl_cpp\samples\dircopy\dircopy_vc2012.vcxproj", "{98BB9F33-AFC3-4943-8855-4D253B87F8F1}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "scan_dir", "lib_acl_cpp\samples\scan_dir\scan_dir_vc2012.vcxproj", "{8A5563B4-C546-46D0-9C64-D051CA29F164}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{6EC1F44E-6A6A-48E9-B699-D7E89B63C8DC} = {6EC1F44E-6A6A-48E9-B699-D7E89B63C8DC}
|
||||
{B40213C2-507C-4C7F-A6E1-B850C9BDC27B} = {B40213C2-507C-4C7F-A6E1-B850C9BDC27B}
|
||||
{FE724EF7-3763-4E78-BDF5-BCBC075719FD} = {FE724EF7-3763-4E78-BDF5-BCBC075719FD}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
@ -543,6 +550,16 @@ Global
|
||||
{98BB9F33-AFC3-4943-8855-4D253B87F8F1}.Releasedll|Win32.Build.0 = Releasedll|Win32
|
||||
{98BB9F33-AFC3-4943-8855-4D253B87F8F1}.Template|Win32.ActiveCfg = DebugDll|Win32
|
||||
{98BB9F33-AFC3-4943-8855-4D253B87F8F1}.Template|Win32.Build.0 = DebugDll|Win32
|
||||
{8A5563B4-C546-46D0-9C64-D051CA29F164}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{8A5563B4-C546-46D0-9C64-D051CA29F164}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{8A5563B4-C546-46D0-9C64-D051CA29F164}.DebugDll|Win32.ActiveCfg = DebugDll|Win32
|
||||
{8A5563B4-C546-46D0-9C64-D051CA29F164}.DebugDll|Win32.Build.0 = DebugDll|Win32
|
||||
{8A5563B4-C546-46D0-9C64-D051CA29F164}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{8A5563B4-C546-46D0-9C64-D051CA29F164}.Release|Win32.Build.0 = Release|Win32
|
||||
{8A5563B4-C546-46D0-9C64-D051CA29F164}.Releasedll|Win32.ActiveCfg = Releasedll|Win32
|
||||
{8A5563B4-C546-46D0-9C64-D051CA29F164}.Releasedll|Win32.Build.0 = Releasedll|Win32
|
||||
{8A5563B4-C546-46D0-9C64-D051CA29F164}.Template|Win32.ActiveCfg = DebugDll|Win32
|
||||
{8A5563B4-C546-46D0-9C64-D051CA29F164}.Template|Win32.Build.0 = DebugDll|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
@ -564,6 +581,7 @@ Global
|
||||
{BE48C8C9-2F6D-450B-9D42-4666E9257C8A} = {324E7B70-E11C-4A39-A11F-4BB2A8E70064}
|
||||
{A76344E8-D8EF-4E0D-9A01-73DB25B5B76E} = {324E7B70-E11C-4A39-A11F-4BB2A8E70064}
|
||||
{98BB9F33-AFC3-4943-8855-4D253B87F8F1} = {324E7B70-E11C-4A39-A11F-4BB2A8E70064}
|
||||
{8A5563B4-C546-46D0-9C64-D051CA29F164} = {324E7B70-E11C-4A39-A11F-4BB2A8E70064}
|
||||
{956FA905-A77F-41FE-A4BE-C3BD3B5B3E83} = {02535D96-1693-4AA3-B650-B22DC776FDC2}
|
||||
{225D0BFA-64D7-4F8F-951E-36A494CF6178} = {02535D96-1693-4AA3-B650-B22DC776FDC2}
|
||||
{ADE6F714-BD52-432D-AB86-62FA59AB6746} = {02535D96-1693-4AA3-B650-B22DC776FDC2}
|
||||
|
@ -88,7 +88,7 @@ service master_dispatch {
|
||||
aio_thread_idle_limit = 60
|
||||
|
||||
# 允许访问的客户端IP地址范围
|
||||
aio_access_allow = 127.0.0.1:255.255.255.255, 127.0.0.1:127.0.0.1
|
||||
aio_access_allow = all
|
||||
|
||||
# 当 acl_master 退出时,如果该值置1则该程序不等所有连接处理完毕便立即退出
|
||||
aio_quick_abort = 1
|
||||
@ -102,4 +102,3 @@ service master_dispatch {
|
||||
# 是否发送欢迎信息
|
||||
# send_banner = 0
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,8 @@
|
||||
修改历史列表:
|
||||
------------------------------------------------------------------------
|
||||
70) 2014.5.27
|
||||
70.1) 整理了工程 VC2003, VC2008, VC2010, VC2012
|
||||
|
||||
69) 2014.4.10
|
||||
69.1) VC2008, VC2010, VC2012 工程文件中将例子分类分目录存放
|
||||
|
||||
|
@ -1,6 +1,10 @@
|
||||
修改历史列表:
|
||||
|
||||
------------------------------------------------------------------------
|
||||
444) 2014.5.26
|
||||
444.1) acl_scan_dir.c: 整理了代码,在返回的目录字符串中,最后的字母如果是
|
||||
'/' 或 '\\' (win32),则自动去掉尾部的目录分隔符
|
||||
|
||||
443) 2014.5.20
|
||||
443.1) feature: acl_master 允许以非 root 用户身份运行,需要在其配置文件(main.cf)中
|
||||
的 limit_privilege = 0
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -41,6 +41,10 @@
|
||||
|
||||
#include "dir_sys_patch.h"
|
||||
|
||||
#ifndef MAX_PATH
|
||||
#define MAX_PATH 1024
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The interface is based on an opaque structure, so we don't have to expose
|
||||
* the user to the guts. Subdirectory info sits in front of parent directory
|
||||
@ -83,8 +87,8 @@ ACL_SCAN_DIR *acl_scan_dir_open(const char *path, int recursive)
|
||||
scan->nsize = 0;
|
||||
|
||||
if (acl_scan_dir_push(scan, path) < 0)
|
||||
return (NULL);
|
||||
return (scan);
|
||||
return NULL;
|
||||
return scan;
|
||||
}
|
||||
|
||||
/* acl_scan_dir_close - terminate directory scan */
|
||||
@ -98,9 +102,6 @@ void acl_scan_dir_close(ACL_SCAN_DIR *scan)
|
||||
|
||||
void acl_scan_dir_reset(ACL_SCAN_DIR *scan)
|
||||
{
|
||||
if (scan == NULL)
|
||||
return;
|
||||
|
||||
scan->nfiles = 0;
|
||||
scan->ndirs = 0;
|
||||
scan->nsize = 0;
|
||||
@ -112,8 +113,6 @@ void acl_scan_dir_ctl(ACL_SCAN_DIR *scan, int name, ...)
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
if (scan == NULL)
|
||||
return;
|
||||
va_start(ap, name);
|
||||
|
||||
for (; name != ACL_SCAN_CTL_END; name = va_arg(ap, int)) {
|
||||
@ -136,60 +135,49 @@ void acl_scan_dir_ctl(ACL_SCAN_DIR *scan, int name, ...)
|
||||
|
||||
const char *acl_scan_dir_path(ACL_SCAN_DIR *scan)
|
||||
{
|
||||
if (scan == NULL || scan->current == NULL)
|
||||
return (NULL);
|
||||
return (ACL_SCAN_DIR_PATH(scan));
|
||||
if (scan->current == NULL)
|
||||
return NULL;
|
||||
return ACL_SCAN_DIR_PATH(scan);
|
||||
}
|
||||
|
||||
const char *acl_scan_dir_file(ACL_SCAN_DIR *scan)
|
||||
{
|
||||
if (scan == NULL || scan->current == NULL)
|
||||
return (NULL);
|
||||
if (scan->current == NULL)
|
||||
return NULL;
|
||||
|
||||
return (scan->file_name);
|
||||
return scan->file_name;
|
||||
}
|
||||
|
||||
int acl_scan_dir_ndirs(ACL_SCAN_DIR *scan)
|
||||
{
|
||||
if (scan)
|
||||
return (scan->ndirs);
|
||||
else
|
||||
return (-1);
|
||||
return scan->ndirs;
|
||||
}
|
||||
|
||||
int acl_scan_dir_nfiles(ACL_SCAN_DIR *scan)
|
||||
{
|
||||
if (scan)
|
||||
return (scan->nfiles);
|
||||
else
|
||||
return (-1);
|
||||
return scan->nfiles;
|
||||
}
|
||||
|
||||
acl_int64 acl_scan_dir_nsize(ACL_SCAN_DIR *scan)
|
||||
{
|
||||
if (scan)
|
||||
return (scan->nsize);
|
||||
else
|
||||
return (-1);
|
||||
return scan->nsize;
|
||||
}
|
||||
|
||||
int acl_scan_stat(ACL_SCAN_DIR *scan, struct acl_stat *sbuf)
|
||||
{
|
||||
if (scan == NULL || scan->current == NULL || sbuf == NULL)
|
||||
return (-1);
|
||||
if (scan->current == NULL || sbuf == NULL)
|
||||
return -1;
|
||||
|
||||
memcpy(sbuf, &scan->current->sbuf, sizeof(struct acl_stat));
|
||||
return (0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int acl_scan_dir_end(ACL_SCAN_DIR *scan)
|
||||
{
|
||||
if (scan == NULL)
|
||||
return (-1);
|
||||
if (scan->current == NULL)
|
||||
return (1);
|
||||
return 1;
|
||||
else
|
||||
return (0);
|
||||
return 0;
|
||||
}
|
||||
/* acl_scan_dir_push - enter directory */
|
||||
|
||||
@ -198,26 +186,41 @@ int acl_scan_dir_push(ACL_SCAN_DIR *scan, const char *path)
|
||||
const char *myname = "acl_scan_dir_push";
|
||||
ACL_SCAN_INFO *info;
|
||||
|
||||
if (path == NULL || *path == 0)
|
||||
acl_msg_fatal("%s(%d), %s: path null",
|
||||
__FILE__, __LINE__, myname);
|
||||
|
||||
info = (ACL_SCAN_INFO *) acl_mymalloc(sizeof(*info));
|
||||
if (scan->current) {
|
||||
if (scan->current)
|
||||
info->path = acl_concatenate(ACL_SCAN_DIR_PATH(scan),
|
||||
PATH_SEP_S, path, (char *) 0);
|
||||
} else {
|
||||
info->path = acl_mystrdup(path);
|
||||
else {
|
||||
size_t len = strlen(path);
|
||||
const char *ptr = path + len - 1;
|
||||
|
||||
#ifdef WIN32
|
||||
while (ptr > path && (*ptr == '/' || *ptr == '\\'))
|
||||
#else
|
||||
while (ptr > path && *ptr == '/')
|
||||
ptr--;
|
||||
#endif
|
||||
len = ptr - path + 1;
|
||||
info->path = (char*) acl_mymalloc(len + 1);
|
||||
memcpy(info->path, path, len);
|
||||
info->path[len] = 0;
|
||||
}
|
||||
|
||||
if ((info->dir_name = opendir(info->path)) == 0) {
|
||||
char tbuf[256];
|
||||
acl_msg_error("%s(%d), %s: open directory(%s) error(%s)",
|
||||
__FILE__, __LINE__, myname,
|
||||
info->path, acl_last_strerror(tbuf, sizeof(tbuf)));
|
||||
return (-1);
|
||||
info->path, acl_last_serror());
|
||||
return -1;
|
||||
}
|
||||
if (acl_msg_verbose > 1)
|
||||
acl_msg_info("%s: open %s", myname, info->path);
|
||||
|
||||
info->parent = scan->current;
|
||||
scan->current = info;
|
||||
return (0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* acl_scan_dir_pop - leave directory */
|
||||
@ -229,50 +232,42 @@ ACL_SCAN_DIR *acl_scan_dir_pop(ACL_SCAN_DIR *scan)
|
||||
ACL_SCAN_INFO *parent;
|
||||
|
||||
if (info == NULL)
|
||||
return (NULL);
|
||||
return NULL;
|
||||
|
||||
parent = info->parent;
|
||||
if (closedir(info->dir_name)) {
|
||||
char tbuf[256];
|
||||
acl_msg_fatal("%s(%d), %s: close directory(%s) error(%s)",
|
||||
__FILE__, __LINE__, myname,
|
||||
info->path, acl_last_strerror(tbuf, sizeof(tbuf)));
|
||||
info->path, acl_last_serror());
|
||||
}
|
||||
if (acl_msg_verbose > 1)
|
||||
acl_msg_info("%s: close %s", myname, info->path);
|
||||
|
||||
acl_myfree(info->path);
|
||||
acl_myfree(info);
|
||||
scan->current = parent;
|
||||
return (parent ? scan : NULL);
|
||||
|
||||
return parent ? scan : NULL;
|
||||
}
|
||||
|
||||
/* acl_scan_dir_next - find next entry */
|
||||
|
||||
const char *acl_scan_dir_next(ACL_SCAN_DIR *scan)
|
||||
{
|
||||
const char *myname = "acl_scan_dir_next";
|
||||
ACL_SCAN_INFO *info = scan->current;
|
||||
struct dirent *dp;
|
||||
|
||||
#define STREQ(x,y) (strcmp((x),(y)) == 0)
|
||||
|
||||
if (info == NULL)
|
||||
return (NULL);
|
||||
return NULL;
|
||||
|
||||
while ((dp = readdir(info->dir_name)) != 0) {
|
||||
if (STREQ(dp->d_name, ".") || STREQ(dp->d_name, "..")) {
|
||||
if (acl_msg_verbose > 1)
|
||||
acl_msg_info("%s: skip %s",
|
||||
myname, dp->d_name);
|
||||
if (STREQ(dp->d_name, ".") || STREQ(dp->d_name, ".."))
|
||||
continue;
|
||||
}
|
||||
|
||||
if (acl_msg_verbose > 1)
|
||||
acl_msg_info("%s: found %s", myname, dp->d_name);
|
||||
|
||||
return (dp->d_name);
|
||||
return dp->d_name;
|
||||
}
|
||||
|
||||
return (NULL);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* acl_scan_dir_next_file - find next valid file */
|
||||
@ -281,40 +276,39 @@ const char *acl_scan_dir_next_file(ACL_SCAN_DIR *scan)
|
||||
{
|
||||
const char *myname = "acl_scan_dir_next_file";
|
||||
const char *name;
|
||||
char pathbuf[256];
|
||||
char pathbuf[MAX_PATH];
|
||||
struct acl_stat sbuf;
|
||||
|
||||
for (;;) {
|
||||
if ((name = acl_scan_dir_next(scan)) == NULL) {
|
||||
if (acl_scan_dir_pop(scan) == 0)
|
||||
return (NULL);
|
||||
return NULL;
|
||||
continue;
|
||||
}
|
||||
|
||||
snprintf(pathbuf, sizeof(pathbuf), "%s%c%s",
|
||||
ACL_SCAN_DIR_PATH(scan), PATH_SEP_C, name);
|
||||
|
||||
if (acl_stat(pathbuf, &sbuf) < 0) {
|
||||
char tbuf[256];
|
||||
acl_msg_error("%s(%d), %s: stat file(%s) error(%s)",
|
||||
__FILE__, __LINE__, myname, pathbuf,
|
||||
acl_last_strerror(tbuf, sizeof(tbuf)));
|
||||
return (NULL);
|
||||
acl_last_serror());
|
||||
return NULL;
|
||||
}
|
||||
|
||||
memcpy(&scan->current->sbuf, &sbuf, sizeof(sbuf));
|
||||
|
||||
scan->nsize += sbuf.st_size;
|
||||
|
||||
if (S_ISDIR(sbuf.st_mode)) {
|
||||
scan->ndirs++;
|
||||
if (scan->recursive
|
||||
&& acl_scan_dir_push(scan, name) < 0)
|
||||
{
|
||||
return (NULL);
|
||||
}
|
||||
} else {
|
||||
if (!S_ISDIR(sbuf.st_mode)) {
|
||||
scan->nfiles++;
|
||||
return (name);
|
||||
return name;
|
||||
}
|
||||
|
||||
scan->ndirs++;
|
||||
|
||||
if (scan->recursive && acl_scan_dir_push(scan, name) < 0)
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
@ -324,38 +318,37 @@ const char *acl_scan_dir_next_dir(ACL_SCAN_DIR *scan)
|
||||
{
|
||||
const char *myname = "acl_scan_dir_next_dir";
|
||||
const char *name;
|
||||
char pathbuf[256];
|
||||
char pathbuf[MAX_PATH];
|
||||
struct acl_stat sbuf;
|
||||
|
||||
for (;;) {
|
||||
if ((name = acl_scan_dir_next(scan)) == NULL) {
|
||||
if (acl_scan_dir_pop(scan) == 0)
|
||||
return (NULL);
|
||||
return NULL;
|
||||
continue;
|
||||
}
|
||||
snprintf(pathbuf, sizeof(pathbuf), "%s%c%s",
|
||||
ACL_SCAN_DIR_PATH(scan), PATH_SEP_C, name);
|
||||
if (acl_stat(pathbuf, &sbuf) < 0) {
|
||||
char tbuf[256];
|
||||
acl_msg_error("%s(%d), %s: stat file(%s) error(%s)",
|
||||
__FILE__, __LINE__, myname, pathbuf,
|
||||
acl_last_strerror(tbuf, sizeof(tbuf)));
|
||||
return (NULL);
|
||||
acl_last_serror());
|
||||
return NULL;
|
||||
}
|
||||
|
||||
memcpy(&scan->current->sbuf, &sbuf, sizeof(sbuf));
|
||||
|
||||
scan->nsize += sbuf.st_size;
|
||||
|
||||
if (S_ISDIR(sbuf.st_mode)) {
|
||||
scan->ndirs++;
|
||||
if (scan->recursive
|
||||
&& acl_scan_dir_push(scan, name) < 0)
|
||||
{
|
||||
return (NULL);
|
||||
}
|
||||
return (name);
|
||||
}
|
||||
if (!S_ISDIR(sbuf.st_mode))
|
||||
continue;
|
||||
|
||||
scan->ndirs++;
|
||||
|
||||
if (scan->recursive && acl_scan_dir_push(scan, name) < 0)
|
||||
return NULL;
|
||||
else
|
||||
return name;
|
||||
}
|
||||
}
|
||||
|
||||
@ -363,44 +356,41 @@ const char *acl_scan_dir_next_name(ACL_SCAN_DIR *scan, int *is_file)
|
||||
{
|
||||
const char *myname = "acl_scan_dir_next_name";
|
||||
const char *name;
|
||||
char pathbuf[256];
|
||||
char pathbuf[MAX_PATH];
|
||||
struct acl_stat sbuf;
|
||||
|
||||
for (;;) {
|
||||
if ((name = acl_scan_dir_next(scan)) == NULL) {
|
||||
if (acl_scan_dir_pop(scan) == 0)
|
||||
return (NULL);
|
||||
return NULL;
|
||||
continue;
|
||||
}
|
||||
snprintf(pathbuf, sizeof(pathbuf), "%s%c%s",
|
||||
ACL_SCAN_DIR_PATH(scan), PATH_SEP_C, name);
|
||||
if (acl_stat(pathbuf, &sbuf) < 0) {
|
||||
char tbuf[256];
|
||||
acl_msg_error("%s(%d), %s: stat file(%s) error(%s)",
|
||||
__FILE__, __LINE__, myname, pathbuf,
|
||||
acl_last_strerror(tbuf, sizeof(tbuf)));
|
||||
return (NULL);
|
||||
acl_last_serror());
|
||||
return NULL;
|
||||
}
|
||||
|
||||
memcpy(&scan->current->sbuf, &sbuf, sizeof(sbuf));
|
||||
|
||||
scan->nsize += sbuf.st_size;
|
||||
|
||||
if (S_ISDIR(sbuf.st_mode)) {
|
||||
scan->ndirs++;
|
||||
if (scan->recursive
|
||||
&& acl_scan_dir_push(scan, name) < 0)
|
||||
{
|
||||
return (NULL);
|
||||
}
|
||||
if (is_file)
|
||||
*is_file = 0;
|
||||
return (name);
|
||||
} else {
|
||||
if (!S_ISDIR(sbuf.st_mode)) {
|
||||
if (is_file)
|
||||
*is_file = 1;
|
||||
return (name);
|
||||
return name;
|
||||
}
|
||||
|
||||
scan->ndirs++;
|
||||
|
||||
if (scan->recursive && acl_scan_dir_push(scan, name) < 0)
|
||||
return NULL;
|
||||
if (is_file)
|
||||
*is_file = 0;
|
||||
return name;
|
||||
}
|
||||
}
|
||||
|
||||
@ -408,12 +398,9 @@ acl_int64 acl_scan_dir_size2(ACL_SCAN_DIR *scan, int *nfile, int *ndir)
|
||||
{
|
||||
const char *myname = "acl_scan_dir_size2";
|
||||
const char *name;
|
||||
char pathbuf[256];
|
||||
char pathbuf[MAX_PATH];
|
||||
struct acl_stat sbuf;
|
||||
|
||||
if (scan == NULL)
|
||||
return (-1);
|
||||
|
||||
while (1) {
|
||||
if ((name = acl_scan_dir_next(scan)) == NULL) {
|
||||
if (acl_scan_dir_pop(scan) == NULL)
|
||||
@ -423,10 +410,9 @@ acl_int64 acl_scan_dir_size2(ACL_SCAN_DIR *scan, int *nfile, int *ndir)
|
||||
snprintf(pathbuf, sizeof(pathbuf), "%s%c%s",
|
||||
ACL_SCAN_DIR_PATH(scan), PATH_SEP_C, name);
|
||||
if (acl_stat(pathbuf, &sbuf) < 0) {
|
||||
char tbuf[256];
|
||||
acl_msg_error("%s(%d), %s: stat file(%s) error(%s)",
|
||||
__FILE__, __LINE__, myname, pathbuf,
|
||||
acl_last_strerror(tbuf, sizeof(tbuf)));
|
||||
acl_last_serror());
|
||||
break;
|
||||
}
|
||||
|
||||
@ -435,11 +421,8 @@ acl_int64 acl_scan_dir_size2(ACL_SCAN_DIR *scan, int *nfile, int *ndir)
|
||||
if (S_ISDIR(sbuf.st_mode)) {
|
||||
scan->ndirs++;
|
||||
scan->file_name[0] = 0;
|
||||
if (scan->recursive
|
||||
&& acl_scan_dir_push(scan, name) < 0)
|
||||
{
|
||||
if (scan->recursive && acl_scan_dir_push(scan, name) < 0)
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
ACL_SAFE_STRNCPY(scan->file_name, name,
|
||||
sizeof(scan->file_name));
|
||||
@ -456,25 +439,34 @@ acl_int64 acl_scan_dir_size2(ACL_SCAN_DIR *scan, int *nfile, int *ndir)
|
||||
if (ndir)
|
||||
*ndir = scan->ndirs;
|
||||
|
||||
return (scan->nsize);
|
||||
return scan->nsize;
|
||||
}
|
||||
|
||||
acl_int64 acl_scan_dir_size(const char *pathname, int recursive,
|
||||
int *nfile, int *ndir)
|
||||
{
|
||||
const char *myname = "acl_scan_dir_size";
|
||||
ACL_SCAN_DIR *scan;
|
||||
acl_int64 size;
|
||||
|
||||
if (pathname == NULL || *pathname == 0)
|
||||
return (-1);
|
||||
if (pathname == NULL || *pathname == 0) {
|
||||
acl_msg_error("%s(%d), %s: pathname null",
|
||||
__FILE__, __LINE__, myname);
|
||||
return -1;
|
||||
}
|
||||
|
||||
scan = acl_scan_dir_open(pathname, recursive);
|
||||
if (scan == NULL)
|
||||
return (-1);
|
||||
if (scan == NULL) {
|
||||
acl_msg_error("%s(%d), %s: dir_open error: %s, path: %s",
|
||||
__FILE__, __LINE__, myname,
|
||||
acl_last_serror(), pathname);
|
||||
return -1;
|
||||
}
|
||||
|
||||
size = acl_scan_dir_size2(scan, nfile, ndir);
|
||||
|
||||
acl_scan_dir_close(scan);
|
||||
return (size);
|
||||
|
||||
return size;
|
||||
}
|
||||
|
||||
/* acl_scan_dir_rmall - remove all directoies and file in the dir */
|
||||
@ -483,7 +475,7 @@ acl_int64 acl_scan_dir_rm2(ACL_SCAN_DIR *scan, int *ndir, int *nfile)
|
||||
{
|
||||
const char *myname = "acl_scan_dir_rm2";
|
||||
const char *name;
|
||||
char path[256];
|
||||
char path[MAX_PATH];
|
||||
struct acl_stat sbuf;
|
||||
|
||||
for (;;) {
|
||||
@ -513,33 +505,27 @@ acl_int64 acl_scan_dir_rm2(ACL_SCAN_DIR *scan, int *ndir, int *nfile)
|
||||
ACL_SCAN_DIR_PATH(scan), PATH_SEP_C, name);
|
||||
|
||||
if (acl_stat(path, &sbuf) < 0) {
|
||||
char tbuf[256];
|
||||
acl_msg_error("%s(%d), %s: stat file(%s) error(%s)",
|
||||
__FILE__, __LINE__, myname,
|
||||
path, acl_last_strerror(tbuf, sizeof(tbuf)));
|
||||
path, acl_last_serror());
|
||||
break;
|
||||
}
|
||||
if (S_ISDIR(sbuf.st_mode)) {
|
||||
scan->file_name[0] = 0;
|
||||
if (scan->recursive
|
||||
&& acl_scan_dir_push(scan, name) < 0)
|
||||
{
|
||||
if (scan->recursive && acl_scan_dir_push(scan, name) < 0)
|
||||
break;
|
||||
}
|
||||
if (scan->scan_fn
|
||||
&& scan->scan_fn(scan, scan->scan_ctx) < 0)
|
||||
{
|
||||
if (scan->scan_fn && scan->scan_fn(scan, scan->scan_ctx) < 0)
|
||||
break;
|
||||
}
|
||||
continue;
|
||||
} else
|
||||
ACL_SAFE_STRNCPY(scan->file_name, name,
|
||||
sizeof(scan->file_name));
|
||||
}
|
||||
|
||||
ACL_SAFE_STRNCPY(scan->file_name, name, sizeof(scan->file_name));
|
||||
|
||||
if (scan->scan_fn && scan->scan_fn(scan, scan->scan_ctx) < 0)
|
||||
break;
|
||||
scan->nfiles++;
|
||||
scan->nsize += sbuf.st_size;
|
||||
|
||||
SANE_UNLINK(path);
|
||||
}
|
||||
|
||||
@ -558,7 +544,6 @@ acl_int64 acl_scan_dir_rm(const char *pathname, int recursive,
|
||||
ACL_SCAN_DIR *scan;
|
||||
struct acl_stat sbuf;
|
||||
acl_int64 nsize;
|
||||
char tbuf[256];
|
||||
|
||||
if (ndir)
|
||||
*ndir = 0;
|
||||
@ -568,28 +553,29 @@ acl_int64 acl_scan_dir_rm(const char *pathname, int recursive,
|
||||
if (acl_stat(pathname, &sbuf) < 0) {
|
||||
acl_msg_error("%s(%d), %s: stat pathname(%s) error(%s)",
|
||||
__FILE__, __LINE__, myname, pathname,
|
||||
acl_last_strerror(tbuf, sizeof(tbuf)));
|
||||
return (-1);
|
||||
acl_last_serror());
|
||||
return -1;
|
||||
}
|
||||
if (S_ISDIR(sbuf.st_mode) == 0) {
|
||||
if (nfile)
|
||||
*nfile = 1;
|
||||
SANE_UNLINK(pathname);
|
||||
|
||||
return (1);
|
||||
return 1;
|
||||
}
|
||||
|
||||
scan = acl_scan_dir_open(pathname, recursive);
|
||||
if (scan == NULL) {
|
||||
acl_msg_error("%s(%d), %s: open path(%s) error(%s)",
|
||||
__FILE__, __LINE__, myname,
|
||||
pathname, acl_last_strerror(tbuf, sizeof(tbuf)));
|
||||
return (-1);
|
||||
pathname, acl_last_serror());
|
||||
return -1;
|
||||
}
|
||||
|
||||
acl_scan_dir_rm2(scan, ndir, nfile);
|
||||
|
||||
nsize = scan->nsize;
|
||||
acl_scan_dir_close(scan);
|
||||
return (nsize);
|
||||
|
||||
return nsize;
|
||||
}
|
||||
|
@ -1,5 +1,18 @@
|
||||
修改历史列表:
|
||||
------------------------------------------------------------------------
|
||||
239) 2014.5.27
|
||||
239.1) bugfix: scan_dir 类中的 curr_path() 方法当返回全路径时有问题
|
||||
239.2) feature: string 类增加了 scan_line/scan_move 等函数,方便从缓冲区中提取
|
||||
数据,同时修改了 string::c_str(), string::length(), string::size(),使之能够
|
||||
兼容 scan_xxx 函数的操作行为
|
||||
|
||||
238) 2014.5.26
|
||||
238.1) sample: samples/scan_dir 例子用来测试新增加的类 acl::scan_dir
|
||||
|
||||
237) 2014.5.23
|
||||
237.1) feature: string 类为了使用方便,去掉了多个方法返回值中的限定词 const
|
||||
237.2) bugfix: scan_dir 类中的 curr_path 存在死循环过程
|
||||
|
||||
236) 2014.5.22
|
||||
236.1) bufix: http_client 类的构造函数 http_client() 中没有对 buf_ 赋 NULL,结果
|
||||
导致在 http_client::reset 中对 buf_ 进行 reset 操作时造成了非法指针引用
|
||||
|
@ -30,39 +30,41 @@ public:
|
||||
* 扫描下一个文件(遇到目录会自动跳过),当在 open 指定了允许递归扫描选项
|
||||
* (即 recursive = true),则该函数会递归扫描所打开目录的所有子目录
|
||||
* @param full {bool} 是否需要返回文件全路径
|
||||
* @return {const char*} 非 NULL 表示所扫描到的文件名,否则表示扫描完毕或目录
|
||||
* 还未打开
|
||||
* @return {const char*} 非 NULL 表示所扫描到的文件名,否则表示扫描完毕
|
||||
* 或目录还未打开
|
||||
*/
|
||||
const char* next_file(bool full = false);
|
||||
|
||||
/**
|
||||
* 扫描下一个目录(遇到文件或 "." 或 ".." 会跳过),当在 open 指定允许了允许递归
|
||||
* 扫描项(即 recursive = true),则该函数会递归扫描所开目录的所有子目录
|
||||
* 扫描下一个目录(遇到文件或 "." 或 ".." 会跳过),当在 open 指定允许了
|
||||
* 允许递归扫描项(即 recursive = true),则该函数会递归扫描所开目录的所
|
||||
* 有子目录
|
||||
* @param full {bool} 是否需要返回目录全路径
|
||||
* @return {const char*} 非 NULL 表示所扫描到的目录名,否则表示扫描完毕或目录
|
||||
* 还未打开
|
||||
* @return {const char*} 非 NULL 表示所扫描到的目录名,否则表示扫描完
|
||||
* 毕或目录还未打开
|
||||
*/
|
||||
const char* next_dir(bool full = false);
|
||||
|
||||
/**
|
||||
* 扫描下一个目录或文件,当在 open 指定了允许递归扫描项(即 resursive = true),
|
||||
* 则该函数会递归扫描所打开目录的所有子目录及文件
|
||||
* @param full {bool} 是否需要返回目录或文件的全路径,如果为 true 则返回全路径,
|
||||
* 否则只返回文件名或目录名且都不含路径
|
||||
* @param is_file {bool*} 当返回结果非空时,该地址存储的值表示所扫描到的是否是
|
||||
* 文件,如果为 true 则为文件,否则为目录
|
||||
* @return {const char*} 非 NULL 表示所扫描到的目录名或文件名,否则表示扫描
|
||||
* 完毕或目录还未打开
|
||||
* 扫描下一个目录或文件,当在 open 指定了允许递归扫描项(即 resursive
|
||||
* = true),则该函数会递归扫描所打开目录的所有子目录及文件
|
||||
* @param full {bool} 是否需要返回目录或文件的全路径,如果为 true 则返
|
||||
* 回全路径,否则只返回文件名或目录名且都不含路径
|
||||
* @param is_file {bool*} 当返回结果非空时,该地址存储的值表示所扫描到
|
||||
* 的是否是文件,如果为 true 则为文件,否则为目录
|
||||
* @return {const char*} 非 NULL 表示所扫描到的目录名或文件名,否则表
|
||||
* 示扫描完毕或目录还未打开
|
||||
*/
|
||||
const char* next(bool full = false, bool* is_file = NULL);
|
||||
|
||||
/**
|
||||
* 获得当前扫描过程所在的目录路径
|
||||
* @param full {bool} 为 true 时表示获得扫描程序当前所在的系统绝对路径,否则为
|
||||
* 相对于程序调用 open 函数时的程序运行路径
|
||||
* 获得当前扫描过程所在的目录路径,返回的路径尾部不包含路径分隔符 '/'
|
||||
* 或 '\\' (win32),如对于路径:/home/zsx/,则会返回 /home/zsx,如果
|
||||
* 路径为根路径:/ 则该 '/' 将会保留;在 WIN32 下,返回类似于
|
||||
* C:\Users\zsx 的路径
|
||||
* @return {const char*} 当目录打开时该函数返回非空指针,否则返回 NULL
|
||||
*/
|
||||
const char* curr_path(bool full = false);
|
||||
const char* curr_path();
|
||||
|
||||
/**
|
||||
* 获得当前程序扫描过程所扫到的文件名
|
||||
@ -137,6 +139,13 @@ public:
|
||||
int* nfiles = NULL, int* ndirs = NULL);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* 获得当前程序运行的路径
|
||||
* @param out {string&} 存储结果
|
||||
* @return {bool} 是否成功获得当前程序运行路径
|
||||
*/
|
||||
static bool get_cwd(string& out);
|
||||
|
||||
private:
|
||||
char* path_;
|
||||
ACL_SCAN_DIR* scan_;
|
||||
|
@ -26,13 +26,15 @@ public:
|
||||
|
||||
/**
|
||||
* 构造函数
|
||||
* @param s {const string&} 源字符串对象,初始化后的类对象内部自动复制该字符串
|
||||
* @param s {const string&} 源字符串对象,初始化后的类对象内部自动复制
|
||||
* 该字符串
|
||||
*/
|
||||
string(const string& s);
|
||||
|
||||
/**
|
||||
* 构造函数
|
||||
* @param s {const char*} 内部自动用该字符串初始化类对象,s 必须是以 \0 结尾
|
||||
* @param s {const char*} 内部自动用该字符串初始化类对象,s 必须是
|
||||
* 以 \0 结尾
|
||||
*/
|
||||
string(const char* s);
|
||||
|
||||
@ -46,9 +48,10 @@ public:
|
||||
|
||||
/**
|
||||
* 设置字符串类对象为二进制处理模式
|
||||
* @param bin {bool} 当该值为 true 时,则设置字符串类对象为二进制处理方式;
|
||||
* 否则为文本方式;该值为 true 时,则当调用 += int|int64|short|char
|
||||
* 或调用 << int|int64|short|char 时,则按二进制方式处理,否则按文本方式处理
|
||||
* @param bin {bool} 当该值为 true 时,则设置字符串类对象为二进制处理
|
||||
* 方式;否则为文本方式;该值为 true 时,则当调用 += int|int64|short|char
|
||||
* 或调用 << int|int64|short|char 时,则按二进制方式处理,否则按文本
|
||||
* 方式处理
|
||||
*/
|
||||
void set_bin(bool bin);
|
||||
|
||||
@ -59,15 +62,19 @@ public:
|
||||
bool get_bin() const;
|
||||
|
||||
/**
|
||||
* 根据字符数组下标获得指定位置的字符,输入参数必须为合法值,否则则内部产生断言
|
||||
* @param n {size_t} 指定的位置(该值 >= 0 且 < 字符串长度),如果越界,则产生断言
|
||||
* 根据字符数组下标获得指定位置的字符,输入参数必须为合法值,否则则
|
||||
* 内部产生断言
|
||||
* @param n {size_t} 指定的位置(该值 >= 0 且 < 字符串长度),如果越界
|
||||
* 则产生断言
|
||||
* @return {char} 返回指定位置的字符
|
||||
*/
|
||||
char operator[](size_t n);
|
||||
|
||||
/**
|
||||
* 根据字符数组下标获得指定位置的字符,输入参数必须为合法值,否则则内部产生断言
|
||||
* @param n {int} 指定的位置(该值 >= 0 且 < 字符串长度),如果越界,则产生断言
|
||||
* 根据字符数组下标获得指定位置的字符,输入参数必须为合法值,否则则
|
||||
* 内部产生断言
|
||||
* @param n {int} 指定的位置(该值 >= 0 且 < 字符串长度),如果越界,
|
||||
* 则产生断言
|
||||
* @return {char} 返回指定位置的字符
|
||||
*/
|
||||
char operator[](int n);
|
||||
@ -75,40 +82,42 @@ public:
|
||||
/**
|
||||
* 对目标字符串类对象赋值
|
||||
* @param s {const char*} 源字符串
|
||||
* @return {string&} 返回当前字符串类对象的引用,便于对该类对象连续进行操作
|
||||
* @return {string&} 返回当前对象的引用,便于对该类对象连续进行操作
|
||||
*/
|
||||
string& operator=(const char* s);
|
||||
|
||||
/**
|
||||
* 对目标字符串类对象赋值
|
||||
* @param s {const string&} 源字符串对象
|
||||
* @return {string&} 返回当前字符串类对象的引用,便于对该类对象连续进行操作
|
||||
* @return {string&} 返回当前对象的引用,便于对该类对象连续进行操作
|
||||
*/
|
||||
string& operator=(const string& s);
|
||||
|
||||
/**
|
||||
* 对目标字符串类对象赋值
|
||||
* @param s {const string*} 源字符串对象
|
||||
* @return {string&} 返回当前字符串类对象的引用,便于对该类对象连续进行操作
|
||||
* @return {string&} 返回当前对象的引用,便于对该类对象连续进行操作
|
||||
*/
|
||||
string& operator=(const string* s);
|
||||
|
||||
#ifdef WIN32
|
||||
/**
|
||||
* 对目标字符串类对象赋值
|
||||
* @param n {long long int} 源 64 位符号长整数,若字符串对象的当前状态为
|
||||
* 二进制模式,则该函数便会以二进制方式赋值给字符串对象,否则以文本方式赋值给
|
||||
* 字符串对象;关于二进制模式还是文本方式,其含义参见 set_bin(bool)
|
||||
* @return {string&} 返回当前字符串类对象的引用,便于对该类对象连续进行操作
|
||||
* @param n {long long int} 源 64 位符号长整数,若当前对象的当前状态为
|
||||
* 二进制模式,则该函数便会以二进制方式赋值给字符串对象,否则以文本方
|
||||
* 式赋值给字符串对象;关于二进制模式还是文本方式,其含义参见
|
||||
* set_bin(bool)
|
||||
* @return {string&} 返回当前字对象的引用,便于对该类对象连续进行操作
|
||||
*/
|
||||
string& operator=(__int64 n);
|
||||
|
||||
/**
|
||||
* 对目标字符串类对象赋值
|
||||
* @param n {unsinged long long int} 源 64 位无符号长整数,若字符串对象
|
||||
* 的当前状态为二进制模式,则该函数便会以二进制方式赋值给字符串对象,否则以文本方式
|
||||
* 赋值给字符串对象;关于二进制模式还是文本方式,其含义参见 set_bin(bool)
|
||||
* @return {string&} 返回当前字符串类对象的引用,便于对该类对象连续进行操作
|
||||
* 的当前状态为二进制模式,则该函数便会以二进制方式赋值给字符串对象,
|
||||
* 否则以文本方式赋值给字符串对象;关于二进制模式还是文本方式,其含义
|
||||
* 参见 set_bin(bool)
|
||||
* @return {string&} 返回当前对象的引用,便于对该类对象连续进行操作
|
||||
*/
|
||||
string& operator=(unsigned __int64);
|
||||
#else
|
||||
@ -118,37 +127,37 @@ public:
|
||||
|
||||
/**
|
||||
* 对目标字符串类对象赋值
|
||||
* @param n {char} 源有符号字符;若字符串对象的当前状态为二进制模式,则该函数
|
||||
* 便会以二进制方式赋值给字符串对象,否则以文本方式赋值给字符串对象;关于二进制模
|
||||
* 式还是文本方式,其含义参见 set_bin(bool)
|
||||
* @return {string&} 返回当前字符串类对象的引用,便于对该类对象连续进行操作
|
||||
* @param n {char} 源有符号字符;若字符串对象的当前状态为二进制模式,
|
||||
* 则该函数便会以二进制方式赋值给字符串对象,否则以文本方式赋值给字
|
||||
* 符串对象;关于二进制模式还是文本方式,其含义参见 set_bin(bool)
|
||||
* @return {string&} 返回当前对象的引用,便于对该类对象连续进行操作
|
||||
*/
|
||||
string& operator=(char n);
|
||||
|
||||
/**
|
||||
* 对目标字符串类对象赋值
|
||||
* @param n {char} 源无符号字符;若字符串对象的当前状态为二进制模式,则该函数
|
||||
* 便会以二进制方式赋值给字符串对象,否则以文本方式赋值给字符串对象;关于二进制模
|
||||
* 式还是文本方式,其含义参见 set_bin(bool)
|
||||
* @return {string&} 返回当前字符串类对象的引用,便于对该类对象连续进行操作
|
||||
* @param n {char} 源无符号字符;若对象的当前状态为二进制模式,则该函数
|
||||
* 便会以二进制方式赋值给字符串对象,否则以文本方式赋值给字符串对象;
|
||||
* 关于二进制模式还是文本方式,其含义参见 set_bin(bool)
|
||||
* @return {string&} 返回当前对象的引用,便于对该类对象连续进行操作
|
||||
*/
|
||||
string& operator=(unsigned char n);
|
||||
|
||||
/**
|
||||
* 对目标字符串类对象赋值
|
||||
* @param n {char} 源有符号长整型;若字符串对象的当前状态为二进制模式,则该函数
|
||||
* 便会以二进制方式赋值给字符串对象,否则以文本方式赋值给字符串对象;关于二进制模
|
||||
* 式还是文本方式,其含义参见 set_bin(bool)
|
||||
* @return {string&} 返回当前字符串类对象的引用,便于对该类对象连续进行操作
|
||||
* @param n {char} 源有符号长整型;若对象的当前状态为二进制模式,则该函数
|
||||
* 便会以二进制方式赋值给字符串对象,否则以文本方式赋值给字符串对象;
|
||||
* 关于二进制模式还是文本方式,其含义参见 set_bin(bool)
|
||||
* @return {string&} 返回当前对象的引用,便于对该类对象连续进行操作
|
||||
*/
|
||||
string& operator=(long n);
|
||||
|
||||
/**
|
||||
* 对目标字符串类对象赋值
|
||||
* @param n {char} 源无符号长整型;若字符串对象的当前状态为二进制模式,则该函数
|
||||
* 便会以二进制方式赋值给字符串对象,否则以文本方式赋值给字符串对象;关于二进制模
|
||||
* 式还是文本方式,其含义参见 set_bin(bool)
|
||||
* @return {string&} 返回当前字符串类对象的引用,便于对该类对象连续进行操作
|
||||
* @param n {char} 源无符号长整型;若字对象的当前状态为二进制模式,
|
||||
* 则该函数便会以二进制方式赋值给字符串对象,否则以文本方式赋值给
|
||||
* 字符串对象;关于二进制模式还是文本方式,其含义参见 set_bin(bool)
|
||||
* @return {string&} 返回当前字对象的引用,便于对该类对象连续进行操作
|
||||
*/
|
||||
string& operator=(unsigned long n);
|
||||
|
||||
@ -181,10 +190,10 @@ public:
|
||||
|
||||
/**
|
||||
* 对目标字符串类对象赋值
|
||||
* @param n {char} 源无符号短整型;若字符串对象的当前状态为二进制模式,则该函数
|
||||
* 便会以二进制方式赋值给字符串对象,否则以文本方式赋值给字符串对象;关于二进制模
|
||||
* 式还是文本方式,其含义参见 set_bin(bool)
|
||||
* @return {string&} 返回当前字符串类对象的引用,便于对该类对象连续进行操作
|
||||
* @param n {char} 源无符号短整型;若对象的当前状态为二进制模式,则该
|
||||
* 函数便会以二进制方式赋值给字符串对象,否则以文本方式赋值给字符串
|
||||
* 对象;关于二进制模式还是文本方式,其含义参见 set_bin(bool)
|
||||
* @return {string&} 返回当前对象的引用,便于对该类对象连续进行操作
|
||||
*/
|
||||
string& operator=(unsigned short n);
|
||||
|
||||
@ -587,11 +596,13 @@ public:
|
||||
int ncompare(const char* s, size_t len, bool case_sensitive = true) const;
|
||||
|
||||
/**
|
||||
* 从尾部向前比较当前对象的缓冲区内容是否与所给的缓冲区的内容相同,限定比较数据长度
|
||||
* 从尾部向前比较当前对象的缓冲区内容是否与所给的缓冲区的内容相同,
|
||||
* 限定比较数据长度
|
||||
* @param s {const void*} 输入的缓冲区地址
|
||||
* @param len {size_t} ptr 的缓冲区内数据长度
|
||||
* @param case_sensitive {bool} 为 true 表示区分大小写
|
||||
* @return {int} 0:表示二者相同; > 0:当前对象缓冲区内容大于输入的内容;
|
||||
* @return {int} 0:表示二者相同;
|
||||
* > 0:当前对象缓冲区内容大于输入的内容;
|
||||
* < 0 :当前对象缓冲内容小于输入的内容
|
||||
*/
|
||||
int rncompare(const char* s, size_t len, bool case_sensitive = true) const;
|
||||
@ -607,58 +618,68 @@ public:
|
||||
* 查找指定字符吕在当前对象缓冲区的起始位置(下标从 0 开始)
|
||||
* @param needle {const char*} 要查找的有符号字符串
|
||||
* @param case_sensitive {bool} 为 true 表示区分大小写
|
||||
* @return {const char*} 字符串在缓冲区中的起始位置,若返回值为空指针则表示不存在
|
||||
* @return {char*} 字符串在缓冲区中的起始位置,若返回值为空指针则表示不存在
|
||||
*/
|
||||
const char* find(const char* needle, bool case_sensitive=true) const;
|
||||
char* find(const char* needle, bool case_sensitive=true) const;
|
||||
|
||||
/**
|
||||
* 从尾部向前查找指定字符吕在当前对象缓冲区的起始位置(下标从 0 开始)
|
||||
* @param needle {const char*} 要查找的有符号字符串
|
||||
* @param case_sensitive {bool} 为 true 表示区分大小写
|
||||
* @return {const char*} 字符串在缓冲区中的起始位置,若返回值为空指针则表示不存在
|
||||
* @return {char*} 字符串在缓冲区中的起始位置,若返回值为空指针则表示不存在
|
||||
*/
|
||||
const char* rfind(const char* needle, bool case_sensitive=true) const;
|
||||
char* rfind(const char* needle, bool case_sensitive=true) const;
|
||||
|
||||
/**
|
||||
* 返回从当前字符串对象中缓冲区指定位置以左的内容
|
||||
* @param npos {size_t} 下标位置,当该值大于等于当前字符串的数据长度时,
|
||||
* 则返回整个字符串对象;返回值不包含该值指定位置的字符内容
|
||||
* @return {const string} 返回值为一完整的对象,不需要单独释放,该函数的效率
|
||||
* @return {string} 返回值为一完整的对象,不需要单独释放,该函数的效率
|
||||
* 可能并不太高
|
||||
*/
|
||||
const string left(size_t npos);
|
||||
string left(size_t npos);
|
||||
|
||||
/**
|
||||
* 返回从当前字符串对象中缓冲区指定位置以右的内容
|
||||
* @param npos {size_t} 下标位置,当该值大于等于当前字符串的数据长度时,
|
||||
* 则返回的字符串对象内容为空;返回值不包含该值指定位置的字符内容
|
||||
* @return {const string} 返回值为一完整的对象,不需要单独释放,该函数的效率
|
||||
* 可能并不太高
|
||||
* @return {const string} 返回值为一完整的对象,不需要单独释放,该
|
||||
* 函数的效率可能并不太高
|
||||
*/
|
||||
const string right(size_t npos);
|
||||
string right(size_t npos);
|
||||
|
||||
/**
|
||||
* 将当前对象的缓冲内容拷贝一部分数据至目标缓冲内
|
||||
* @param buf {void*} 目标缓冲区地址
|
||||
* @param size {size_t} buf 缓冲区长度
|
||||
* @param move {bool} 在拷贝完数据后,是否需要将后面的数据向前移动并覆盖前面
|
||||
* 的已拷贝的数据
|
||||
* @param move {bool} 在拷贝完数据后,是否需要将后面的数据向前移动并
|
||||
* 覆盖前面的已拷贝的数据
|
||||
* @return {size_t} 返回拷贝的实际字节数,当 empty() == true 时,则返回 0
|
||||
*/
|
||||
size_t scan_buf(void* buf, size_t size, bool move = false);
|
||||
|
||||
/**
|
||||
* 从当前对象的缓冲区中拷贝一行数据(包含"\r\n")至目标缓冲区内,当数据被拷贝至
|
||||
* 目标缓冲区后,在源缓冲区内未被拷贝的数据会发生移动并覆盖被拷贝的数据区域
|
||||
* @param out {string&} 目标缓冲区
|
||||
* 从当前对象的缓冲区中拷贝一行数据(包含"\r\n")至目标缓冲区内,当数据
|
||||
* 被拷贝至目标缓冲区后,在源缓冲区内未被拷贝的数据会发生移动并覆盖被
|
||||
* 拷贝的数据区域
|
||||
* @param out {string&} 目标缓冲区,函数内部不会先自动清空该缓冲区
|
||||
* @param nonl {bool} 返回的一行数据是否去掉尾部的 "\r\n" 或 "\n"
|
||||
* @param n {size_t*} 该参数为非空指针时,则存储拷贝到的数据长度;当读到一
|
||||
* 个空行且 nonl 为 true 时,则该地址存储 0
|
||||
* @param part_copy {bool} 若当前缓冲区没有一行数据时是否依然拷贝
|
||||
* @return {bool} 是否拷贝了一个完整行数据
|
||||
* @param n {size_t*} 该参数为非空指针时,则存储拷贝到的数据长度;当读
|
||||
* 到一个空行且 nonl 为 true 时,则该地址存储 0
|
||||
* @param move {bool} 在拷贝完数据后,是否需要将后面的数据向前移动并
|
||||
* 覆盖前面的已拷贝的数据
|
||||
* @return {bool} 是否拷贝了一个完整行数据,如果返回 false 还需要根据
|
||||
* empty() == true 来判断当前缓冲区中是否还有数据
|
||||
*/
|
||||
bool scan_line(string& out, bool nonl = true,
|
||||
size_t* n = NULL, bool part_copy = false);
|
||||
bool scan_line(string& out, bool nonl = true, size_t* n = NULL,
|
||||
bool move = false);
|
||||
|
||||
/**
|
||||
* 当使用 scan_xxx 类方法对缓冲区进行操作时未指定 move 动作,则调用本
|
||||
* 函数可以使缓冲区内剩余的数据向前移动至缓冲区首部
|
||||
* @return {size_t} 移动的字节数
|
||||
*/
|
||||
size_t scan_move();
|
||||
|
||||
/**
|
||||
* 返回当前对象缓冲区中第一个不含数据的尾部地址
|
||||
@ -726,24 +747,27 @@ public:
|
||||
/**
|
||||
* 将当前对象存储的字符串进行分割
|
||||
* @param sep {const char*} 进行分割时的分割标记
|
||||
* @return {const std::list<string>&} 返回 list 格式的分割结果
|
||||
* @return {std::list<string>&} 返回 list 格式的分割结果,返回的结果不需要
|
||||
* 释放,其引用了当前对象的一个内部指针
|
||||
*/
|
||||
const std::list<string>& split(const char* sep);
|
||||
std::list<string>& split(const char* sep);
|
||||
|
||||
/**
|
||||
* 将当前对象存储的字符串进行分割
|
||||
* @param sep {const char*} 进行分割时的分割标记
|
||||
* @return {const std::vector<string>&} 返回 vector 格式的分割结果
|
||||
* @return {std::vector<string>&} 返回 vector 格式的分割结果,返回的结果不
|
||||
* 需要释放,其引用了当前对象的一个内部指针
|
||||
*/
|
||||
const std::vector<string>& split2(const char* sep);
|
||||
std::vector<string>& split2(const char* sep);
|
||||
|
||||
/**
|
||||
* 以 '=' 为分隔符将当前对象存储的字符串分割成 name/value 对,分割时会自动
|
||||
* 去掉源字符串的起始处、结尾处以及分隔符 '=' 两边的空格及 TAB
|
||||
* @return {const std::pair<string, string>&} 如果当前对象存储的字符串
|
||||
* 不符合分割条件(即不是严格的 name=value格式),则返回的结果中字符串对象为空串
|
||||
* @return {std::pair<string, string>&} 如果当前对象存储的字符串
|
||||
* 不符合分割条件(即不是严格的 name=value格式),则返回的结果中字符串对象为空串,
|
||||
* 返回的结果不需要释放,其引用了当前对象的一个内部地址
|
||||
*/
|
||||
const std::pair<string, string>& split_nameval(void);
|
||||
std::pair<string, string>& split_nameval(void);
|
||||
|
||||
/**
|
||||
* 将字符串拷贝到当前对象的缓冲区中
|
||||
@ -1012,43 +1036,44 @@ public:
|
||||
/**
|
||||
* 将 32 位有符号整数转为字符串存(内部使用了线程局部变量)
|
||||
* @param n {int} 32 位有符号整数
|
||||
* @return {const string&} 转换结果对象的引用
|
||||
* @return {string&} 转换结果对象的引用,其引用了内部的一个线程局部变量
|
||||
*/
|
||||
static const string& parse_int(int n);
|
||||
static string& parse_int(int n);
|
||||
|
||||
/**
|
||||
* 将 32 位无符号整数转为字符串存(内部使用了线程局部变量)
|
||||
* @param n {int} 32 位无符号整数
|
||||
* @return {const string&} 转换结果对象的引用
|
||||
* @return {string&} 转换结果对象的引用,其引用了内部的一个线程局部变量
|
||||
*/
|
||||
static const string& parse_int(unsigned int n);
|
||||
static string& parse_int(unsigned int n);
|
||||
#ifdef WIN32
|
||||
static const string& parse_int64(__int64 n);
|
||||
static const string& parse_int64(unsigned __int64 n);
|
||||
static string& parse_int64(__int64 n);
|
||||
static string& parse_int64(unsigned __int64 n);
|
||||
#else
|
||||
/**
|
||||
* 将 64 位有符号整数转为字符串存(内部使用了线程局部变量)
|
||||
* @param n {long long int} 64 位有符号整数
|
||||
* @return {const string&} 转换结果对象的引用
|
||||
* @return {string&} 转换结果对象的引用,其引用了内部的一个线程局部变量
|
||||
*/
|
||||
static const string& parse_int64(long long int n);
|
||||
static string& parse_int64(long long int n);
|
||||
|
||||
/**
|
||||
* 将 64 位无符号整数转为字符串存(内部使用了线程局部变量)
|
||||
* @param n {unsigned long long int} 64 位无符号整数
|
||||
* @return {const string&} 转换结果对象的引用
|
||||
* @return {string&} 转换结果对象的引用,其引用了内部的一个线程局部变量
|
||||
*/
|
||||
static const string& parse_int64(unsigned long long int n);
|
||||
static string& parse_int64(unsigned long long int n);
|
||||
#endif
|
||||
|
||||
private:
|
||||
bool m_bin;
|
||||
bool use_bin_;
|
||||
ACL_VSTRING* vbf_;
|
||||
char* scan_ptr_;
|
||||
std::list<string>* list_tmp_;
|
||||
std::vector<string>* vector_tmp_;
|
||||
std::pair<string, string>* pair_tmp_;
|
||||
|
||||
void init(size_t len);
|
||||
ACL_VSTRING* m_pVbf;
|
||||
const char* m_ptr;
|
||||
std::list<string>* m_psList;
|
||||
std::vector<string>* m_psList2;
|
||||
std::pair<string, string>* m_psPair;
|
||||
};
|
||||
|
||||
} // namespce acl
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -825,6 +825,10 @@
|
||||
RelativePath=".\src\stdlib\pipe_stream.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\stdlib\scan_dir.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\stdlib\snprintf.cpp"
|
||||
>
|
||||
@ -964,6 +968,14 @@
|
||||
RelativePath=".\src\acl_stdafx.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\include\acl_cpp\lib_acl.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\resource_vc2008.h"
|
||||
>
|
||||
</File>
|
||||
<Filter
|
||||
Name="beanstalk"
|
||||
>
|
||||
@ -1355,6 +1367,10 @@
|
||||
RelativePath=".\include\acl_cpp\stdlib\pipe_stream.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\include\acl_cpp\stdlib\scan_dir.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\include\acl_cpp\stdlib\singleton.hpp"
|
||||
>
|
||||
@ -1478,6 +1494,10 @@
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\lib_acl_cpp_vc2008.rc"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="doc"
|
||||
|
@ -295,6 +295,7 @@ copy $(TargetName).pdb ..\dist\lib\win32\$(TargetName).pdb /Y
|
||||
<ClCompile Include="src\stdlib\malloc.cpp" />
|
||||
<ClCompile Include="src\stdlib\md5.cpp" />
|
||||
<ClCompile Include="src\stdlib\pipe_stream.cpp" />
|
||||
<ClCompile Include="src\stdlib\scan_dir.cpp" />
|
||||
<ClCompile Include="src\stdlib\snprintf.cpp" />
|
||||
<ClCompile Include="src\stdlib\string.cpp" />
|
||||
<ClCompile Include="src\stdlib\thread.cpp" />
|
||||
@ -410,6 +411,7 @@ copy $(TargetName).pdb ..\dist\lib\win32\$(TargetName).pdb /Y
|
||||
<ClInclude Include="include\acl_cpp\stdlib\md5.hpp" />
|
||||
<ClInclude Include="include\acl_cpp\stdlib\noncopyable.hpp" />
|
||||
<ClInclude Include="include\acl_cpp\stdlib\pipe_stream.hpp" />
|
||||
<ClInclude Include="include\acl_cpp\stdlib\scan_dir.hpp" />
|
||||
<ClInclude Include="include\acl_cpp\stdlib\singleton.hpp" />
|
||||
<ClInclude Include="include\acl_cpp\stdlib\snprintf.hpp" />
|
||||
<ClInclude Include="include\acl_cpp\stdlib\string.hpp" />
|
||||
|
@ -370,6 +370,9 @@
|
||||
<ClCompile Include="src\connpool\connect_monitor.cpp">
|
||||
<Filter>src\connpool</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\stdlib\scan_dir.cpp">
|
||||
<Filter>src\stdlib</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="src\acl_stdafx.hpp">
|
||||
@ -759,6 +762,9 @@
|
||||
<ClInclude Include="include\acl_cpp\connpool\connect_monitor.hpp">
|
||||
<Filter>include\connpool</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\acl_cpp\stdlib\scan_dir.hpp">
|
||||
<Filter>include\stdlib</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="lib_acl_cpp_vc2010.rc" />
|
||||
|
101
lib_acl_cpp/lib_acl_cpp_vc2012.rc
Normal file
101
lib_acl_cpp/lib_acl_cpp_vc2012.rc
Normal file
@ -0,0 +1,101 @@
|
||||
// Microsoft Visual C++ generated resource script.
|
||||
//
|
||||
#include "resource_vc2012.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#include "afxres.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Chinese (Simplified, PRC) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_CHS)
|
||||
LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED
|
||||
#pragma code_page(936)
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE
|
||||
BEGIN
|
||||
"resource_vc2012.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#include ""afxres.h""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE
|
||||
BEGIN
|
||||
"\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Version
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1,1,1,2
|
||||
PRODUCTVERSION 1,1,1,2
|
||||
FILEFLAGSMASK 0x17L
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
#else
|
||||
FILEFLAGS 0x0L
|
||||
#endif
|
||||
FILEOS 0x4L
|
||||
FILETYPE 0x7L
|
||||
FILESUBTYPE 0x0L
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "080404b0"
|
||||
BEGIN
|
||||
VALUE "Comments", "ͨÓõÄC++¿â"
|
||||
VALUE "CompanyName", "zsx"
|
||||
VALUE "FileDescription", "lib_acl_cpp ¿â"
|
||||
VALUE "FileVersion", "1.1.1.2"
|
||||
VALUE "InternalName", "lib_acl_cpp"
|
||||
VALUE "LegalCopyright", "°æȨËùÓÐ (C) 2011"
|
||||
VALUE "OriginalFilename", "lib_acl_cpp.lib"
|
||||
VALUE "ProductName", " lib_acl_cpp ¿â"
|
||||
VALUE "ProductVersion", "1.1.1.2"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x804, 1200
|
||||
END
|
||||
END
|
||||
|
||||
#endif // Chinese (Simplified, PRC) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 3 resource.
|
||||
//
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
|
@ -446,7 +446,7 @@ copy $(TargetName).pdb ..\dist\lib\win32\$(TargetName).pdb /Y
|
||||
<ClInclude Include="include\acl_cpp\stream\socket_stream.hpp" />
|
||||
<ClInclude Include="include\acl_cpp\stream\ssl_aio_stream.hpp" />
|
||||
<ClInclude Include="include\acl_cpp\stream\stream.hpp" />
|
||||
<ClInclude Include="resource_vc2010.h" />
|
||||
<ClInclude Include="resource_vc2012.h" />
|
||||
<ClInclude Include="src\acl_stdafx.hpp" />
|
||||
<ClInclude Include="src\mime\internal\header_opts.hpp" />
|
||||
<ClInclude Include="src\mime\internal\header_token.hpp" />
|
||||
@ -468,7 +468,7 @@ copy $(TargetName).pdb ..\dist\lib\win32\$(TargetName).pdb /Y
|
||||
<None Include="ReadMe.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="lib_acl_cpp_vc2010.rc" />
|
||||
<ResourceCompile Include="lib_acl_cpp_vc2012.rc" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
|
@ -378,9 +378,6 @@
|
||||
<ClInclude Include="src\acl_stdafx.hpp">
|
||||
<Filter>src</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="resource_vc2010.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\mime\internal\trimblanks.hpp">
|
||||
<Filter>src\mime\internal</Filter>
|
||||
</ClInclude>
|
||||
@ -771,9 +768,9 @@
|
||||
<ClInclude Include="include\acl_cpp\stdlib\scan_dir.hpp">
|
||||
<Filter>include\stdlib</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="lib_acl_cpp_vc2010.rc" />
|
||||
<ClInclude Include="resource_vc2012.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="changes.txt" />
|
||||
@ -884,4 +881,7 @@
|
||||
<UniqueIdentifier>{c81440c9-71a3-4a12-b078-f9845c634089}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="lib_acl_cpp_vc2012.rc" />
|
||||
</ItemGroup>
|
||||
</Project>
|
15
lib_acl_cpp/resource_vc2012.h
Normal file
15
lib_acl_cpp/resource_vc2012.h
Normal file
@ -0,0 +1,15 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by lib_acl_cpp_vc2010.rc
|
||||
//
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 101
|
||||
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||
#define _APS_NEXT_CONTROL_VALUE 1001
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
@ -51,6 +51,7 @@ all:
|
||||
@(cd thread_client; make)
|
||||
@(cd http_request_manager; make)
|
||||
@(cd dircopy; make)
|
||||
@(cd scan_dir; make)
|
||||
|
||||
clean:
|
||||
@(cd string; make clean)
|
||||
@ -105,3 +106,4 @@ clean:
|
||||
@(cd thread_client; make clean)
|
||||
@(cd http_request_manager; make clean)
|
||||
@(cd dircopy; make clean)
|
||||
@(cd scan_dir; make clean)
|
||||
|
@ -332,7 +332,7 @@ int main(int argc, char* argv[])
|
||||
|
||||
do_copy(".", path_to);
|
||||
|
||||
logger_error("enter any key to exit");
|
||||
logger("enter any key to exit");
|
||||
getchar();
|
||||
|
||||
return (0);
|
||||
|
3
lib_acl_cpp/samples/http_request2/Makefile
Normal file
3
lib_acl_cpp/samples/http_request2/Makefile
Normal file
@ -0,0 +1,3 @@
|
||||
include ../Makefile.in
|
||||
EXTLIBS = -lz
|
||||
PROG = http_request
|
106
lib_acl_cpp/samples/http_request2/main.cpp
Normal file
106
lib_acl_cpp/samples/http_request2/main.cpp
Normal file
@ -0,0 +1,106 @@
|
||||
// http_servlet.cpp : 定义控制台应用程序的入口点。
|
||||
//
|
||||
#include <assert.h>
|
||||
#include <getopt.h>
|
||||
#include "acl_cpp/lib_acl.hpp"
|
||||
|
||||
using namespace acl;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class http_request_test
|
||||
{
|
||||
public:
|
||||
http_request_test(const char* server_addr,
|
||||
const char* stype, const char* charset)
|
||||
{
|
||||
server_addr_= server_addr;
|
||||
stype_ = stype;
|
||||
charset_ = charset;
|
||||
to_charset_ = "gb2312";
|
||||
}
|
||||
|
||||
~http_request_test() {}
|
||||
|
||||
bool run(void)
|
||||
{
|
||||
http_request req(server_addr_);
|
||||
|
||||
// 添加 HTTP 请求头字段
|
||||
|
||||
string ctype("text/");
|
||||
ctype << stype_ << "; charset=" << charset_;
|
||||
|
||||
http_header& hdr = req.request_header(); // 请求头对象的引用
|
||||
hdr.set_url("/");
|
||||
hdr.set_content_type(ctype);
|
||||
|
||||
// 发送 HTTP 请求数据
|
||||
if (req.request(NULL, 0) == false)
|
||||
{
|
||||
logger_error("send http request to %s error",
|
||||
server_addr_.c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
acl::string line;
|
||||
|
||||
while (true)
|
||||
{
|
||||
if (req.body_gets(line) == false)
|
||||
break;
|
||||
printf(">>>[%s], len: %d\r\n", line.c_str(),
|
||||
(int) line.size());
|
||||
line.clear();
|
||||
}
|
||||
|
||||
if (req.body_gets(line))
|
||||
printf(">>last data: %s\r\n", line.c_str());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private:
|
||||
string server_addr_; // web 服务器地址
|
||||
string stype_; // 请求数据的子数据类型
|
||||
string charset_; // 本地请求数据文件的字符集
|
||||
string to_charset_; // 将服务器响应数据转为本地字符集
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
static void usage(const char* procname)
|
||||
{
|
||||
printf("usage: %s -h[help] -s server_addr\r\n", procname);
|
||||
}
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
int ch;
|
||||
string server_addr("127.0.0.1:8888");
|
||||
string stype("html"), charset("gb2312");
|
||||
|
||||
while ((ch = getopt(argc, argv, "hs:")) > 0)
|
||||
{
|
||||
switch (ch)
|
||||
{
|
||||
case 'h':
|
||||
usage(argv[0]);
|
||||
return 0;
|
||||
case 's':
|
||||
server_addr = optarg;
|
||||
break;
|
||||
default:
|
||||
usage(argv[0]);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
// 开始运行
|
||||
log::stdout_open(true);
|
||||
http_request_test test(server_addr, stype, charset);
|
||||
test.run();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
6
lib_acl_cpp/samples/http_request2/valgrind.sh
Normal file
6
lib_acl_cpp/samples/http_request2/valgrind.sh
Normal file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
#valgrind --tool=memcheck --leak-check=yes --show-reachable=yes -v ./http_request -f xml.txt -t xml
|
||||
valgrind --tool=memcheck --leak-check=yes --show-reachable=yes -v ./http_request -f xml_utf8.txt -t xml -c utf-8
|
||||
#valgrind --tool=memcheck --leak-check=yes --show-reachable=yes -v ./http_request -f json.txt -t json
|
||||
#valgrind --tool=memcheck --leak-check=yes --show-reachable=yes -v ./http_request -f json_utf8.txt -t json -c utf-8
|
@ -172,7 +172,7 @@ copy ..\..\..\dist\lib\win32\lib_protocol.dll $(OutDir)\ /Y
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\..\lib_acl_cpp\include;..\..\..\lib_acl\include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;VC2003;ACL_CPP_DLL"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;VC2003;ACL_CPP_DLL;ACL_DLL;HTTP_DLL"
|
||||
MinimalRebuild="TRUE"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
|
3
lib_acl_cpp/samples/http_servlet2/Makefile
Normal file
3
lib_acl_cpp/samples/http_servlet2/Makefile
Normal file
@ -0,0 +1,3 @@
|
||||
include ../Makefile.in
|
||||
EXTLIBS = -lz
|
||||
PROG = http_servlet2
|
106
lib_acl_cpp/samples/http_servlet2/http_servlet.cpp
Normal file
106
lib_acl_cpp/samples/http_servlet2/http_servlet.cpp
Normal file
@ -0,0 +1,106 @@
|
||||
#include "stdafx.h"
|
||||
#include "http_servlet.h"
|
||||
|
||||
http_servlet::http_servlet(void)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
http_servlet::~http_servlet(void)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool http_servlet::doError(acl::HttpServletRequest&, acl::HttpServletResponse&)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool http_servlet::doUnknown(acl::HttpServletRequest&,
|
||||
acl::HttpServletResponse& res)
|
||||
{
|
||||
res.setStatus(400);
|
||||
res.setContentType("text/html; charset=");
|
||||
// 发送 http 响应头
|
||||
if (res.sendHeader() == false)
|
||||
return false;
|
||||
// 发送 http 响应体
|
||||
acl::string buf("<root error='unkown request method' />\r\n");
|
||||
(void) res.getOutputStream().write(buf);
|
||||
return false;
|
||||
}
|
||||
|
||||
bool http_servlet::doGet(acl::HttpServletRequest& req,
|
||||
acl::HttpServletResponse& res)
|
||||
{
|
||||
return doPost(req, res);
|
||||
}
|
||||
|
||||
bool http_servlet::doPost(acl::HttpServletRequest& req,
|
||||
acl::HttpServletResponse& res)
|
||||
{
|
||||
bool keep_alive = req.isKeepAlive();
|
||||
|
||||
res.setContentType("text/html; charset=utf-8") // 设置响应字符集
|
||||
.setKeepAlive(keep_alive) // 设置是否保持长连接
|
||||
.setChunkedTransferEncoding(true); // chunked 传输模式
|
||||
|
||||
// 发送 http 响应体
|
||||
|
||||
if (res.write("first line\r\nsecond line\r\nthird line\r\n\r\n") == false)
|
||||
{
|
||||
logger_error("write error!");
|
||||
return false;
|
||||
}
|
||||
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
if (res.write("hello") == false)
|
||||
{
|
||||
logger_error("write error!");
|
||||
return false;
|
||||
}
|
||||
if (res.write(" ") == false)
|
||||
{
|
||||
logger_error("write error!");
|
||||
return false;
|
||||
}
|
||||
if (res.write("world") == false)
|
||||
{
|
||||
logger_error("write error!");
|
||||
return false;
|
||||
}
|
||||
if (res.write("\r\n") == false)
|
||||
{
|
||||
logger_error("write error!");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
for (int j = 0; j < 10; j++)
|
||||
{
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
if (res.write("X") == false)
|
||||
{
|
||||
logger_error("write error!");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (res.write("\r\n") == false)
|
||||
{
|
||||
logger_error("write error!");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// 最后一行不写 \r\n
|
||||
if (res.write("Bye") == false)
|
||||
{
|
||||
logger_error("write error!");
|
||||
return false;
|
||||
}
|
||||
|
||||
return res.write(NULL, 0) && keep_alive;
|
||||
}
|
18
lib_acl_cpp/samples/http_servlet2/http_servlet.h
Normal file
18
lib_acl_cpp/samples/http_servlet2/http_servlet.h
Normal file
@ -0,0 +1,18 @@
|
||||
#pragma once
|
||||
|
||||
class http_servlet : public acl::HttpServlet
|
||||
{
|
||||
public:
|
||||
http_servlet();
|
||||
~http_servlet();
|
||||
|
||||
protected:
|
||||
virtual bool doError(acl::HttpServletRequest&,
|
||||
acl::HttpServletResponse& res);
|
||||
virtual bool doUnknown(acl::HttpServletRequest&,
|
||||
acl::HttpServletResponse& res);
|
||||
virtual bool doGet(acl::HttpServletRequest& req,
|
||||
acl::HttpServletResponse& res);
|
||||
virtual bool doPost(acl::HttpServletRequest& req,
|
||||
acl::HttpServletResponse& res);
|
||||
};
|
135
lib_acl_cpp/samples/http_servlet2/http_servlet2.cf
Normal file
135
lib_acl_cpp/samples/http_servlet2/http_servlet2.cf
Normal file
@ -0,0 +1,135 @@
|
||||
|
||||
service http_servlet2 {
|
||||
# 进程是否禁止运行
|
||||
master_disable = no
|
||||
# 服务地址及端口号
|
||||
# for master_type = inet
|
||||
# master_service = 127.0.0.1:5001
|
||||
# for master_type = unix
|
||||
# master_service = echo.sock
|
||||
# for master_type = sock
|
||||
master_service = 127.0.0.1:5001, 5002, :5003, echo.sock, echo2.sock
|
||||
|
||||
# 服务监听为域套接口
|
||||
# master_service = aio_echo.sock
|
||||
# 服务类型
|
||||
# master_type = inet
|
||||
# master_type = unix
|
||||
master_type = sock
|
||||
|
||||
# 当子进程异常退出时,如果该值非空,则将子进程异常退出的消息通知该服务
|
||||
# master_notify_addr = 127.0.0.1:5801
|
||||
# 邮件通知接收者
|
||||
# master_notify_recipients = zhengshuxin@hotmail.com
|
||||
|
||||
# 是否允许延迟接受客户端连接,如果为0则表示关闭该功能,如果大于0则表示打开此功能
|
||||
# 并且此值代表延迟接受连接的超时值,超过此值时如果客户端依然没有发来数据,则操作
|
||||
# 系统会在系统层直接关闭该连接
|
||||
# master_defer_accept = 0
|
||||
# 是否只允许私有访问, 如果为 y, 则域套接口创建在 {install_path}/var/log/private/ 目录下,
|
||||
# 如果为 n, 则域套接口创建在 {install_path}/var/log/public/ 目录下,
|
||||
master_private = n
|
||||
master_unpriv = n
|
||||
# 是否需要 chroot: n -- no, y -- yes
|
||||
master_chroot = n
|
||||
# 每隔多长时间触发一次,单位为秒(仅对 trigger 模式有效)
|
||||
master_wakeup = -
|
||||
# 最大进程数
|
||||
master_maxproc = 1
|
||||
# 预启动进程数,该值不得大于 master_maxproc
|
||||
# master_prefork = 0
|
||||
# 进程程序名
|
||||
master_command = http_servlet2
|
||||
# 进程日志记录文件
|
||||
master_log = {install_path}/var/log/http_servlet2
|
||||
# 调试日志方式,格式:tag:level; tag:level; tab:level, 如:all:1; 101:2
|
||||
# master_debug =
|
||||
# 进程启动参数,只能为: -u [是否允许以某普通用户的身份运行]
|
||||
# master_args =
|
||||
# 传递给服务子进程的环境变量, 可以通过 getenv("SERVICE_ENV") 获得此值
|
||||
# master_env = mempool_limit:512000000
|
||||
# master_env = logme:FALSE, priority:E_LOG_INFO, action:E_LOG_PER_DAY, flush:sync_flush, imit_size:512,\
|
||||
# sync_action:E_LOG_SEM, sem_name:/tmp/ioctl_echo.sem
|
||||
|
||||
# 当启动多个子进程实例时,该开关控制多个子进程在接收连接时是否向 acl_master 发送消息报告自己的状态
|
||||
# master_status_notify = 1
|
||||
# 是否允许产生 core 文件
|
||||
# ioctl_enable_core = 1
|
||||
# 每个进程实例处理连接数的最大次数,超过此值后进程实例主动退出
|
||||
ioctl_use_limit = 100
|
||||
# 每个进程实例的空闲超时时间,超过此值后进程实例主动退出
|
||||
ioctl_idle_limit = 120
|
||||
# 记录进程PID的位置(对于多进程实例来说没有意义)
|
||||
ioctl_pid_dir = {install_path}/var/pid
|
||||
# 进程运行时所在的路径
|
||||
ioctl_queue_dir = {install_path}/var
|
||||
# 读写超时时间, 单位为秒
|
||||
ioctl_rw_timeout = 120
|
||||
# 读缓冲区的缓冲区大小
|
||||
ioctl_buf_size = 8192
|
||||
# 每次 accept 时的循环接收的最大次数
|
||||
ioctl_max_accept = 25
|
||||
# 在并发访问量非常低的情况下,如访问量在 10 次/秒 以下时,可以找开此值(即赋为1),
|
||||
# 以加速事件循环过程, 从而防止服务进程阻塞在 select 上的时间过长而影响访问速度
|
||||
# ioctl_enable_dog = 1
|
||||
# 进程运行时的用户身份
|
||||
ioctl_owner = root
|
||||
|
||||
# 用 select 进行循环时的时间间隔
|
||||
# 单位为秒
|
||||
ioctl_delay_sec = 1
|
||||
# 单位为微秒
|
||||
ioctl_delay_usec = 500
|
||||
|
||||
# 采用事件循环的方式: select(default), poll, kernel(epoll/devpoll/kqueue)
|
||||
ioctl_event_mode = kernel
|
||||
# 事件引擎检查所有空闲描述符的时间间隔(毫秒)
|
||||
# ioctl_check_inter = 100
|
||||
# 当启用 master_dispatch 连接分开服务后,该配置指定 master_dispatch 所监听的
|
||||
# 域套接口的全路径,这样本子进程就可以从 master_dispatch 获得客户端连接
|
||||
# ioctl_dispatch_addr = {install_path}/var/private/dispatch.sock
|
||||
# 当 ioctl_dispatch_addr 开启后,下面参数控制本服务进程发给前端 master_dispatch 的服务标识信息
|
||||
# ioctl_dispatch_type = default
|
||||
|
||||
# 线程池的最大线程数
|
||||
ioctl_max_threads = 250
|
||||
# 线程池中工作线程等待任务时间间隔(毫秒)
|
||||
# ioctl_schedule_wait = 50
|
||||
# 线程任务调度的时间间隔大于此值(毫秒)后记警告日志
|
||||
# ioctl_schedule_warn = 100
|
||||
# 线程处理任务拥堵数超过此阀值后记警告日志,设为 0 则内部只有当拥堵任务数超过总线程数的 10 倍时才报警
|
||||
# ioctl_qlen_warn = 0
|
||||
# 线程的堆栈空间大小,单位为字节,0表示使用系统缺省值
|
||||
ioctl_stacksize = 0
|
||||
# 允许访问 udserver 的客户端IP地址范围
|
||||
ioctl_access_allow = 127.0.0.1:255.255.255.255, 127.0.0.1:127.0.0.1
|
||||
|
||||
# 当 acl_master 退出时,如果该值置1则该程序不等所有连接处理完毕便立即退出
|
||||
ioctl_quick_abort = 1
|
||||
|
||||
############################################################################
|
||||
# 应用自己的配置选项
|
||||
|
||||
# mysql 服务地址
|
||||
# mysql_dbaddr = /tmp/mysql.sock
|
||||
# mysql_dbaddr = 10.0.250.199:3306
|
||||
# 连接 mysql 数据库的连接池的最大值
|
||||
# mysql_dbmax = 200
|
||||
# ping mysql 连接的间隔时间, 以秒为单位
|
||||
# mysql_dbping = 10
|
||||
# mysql 连接空闲的时间间隔, 以秒为单位
|
||||
# mysql_dbtimeout = 30
|
||||
|
||||
# 数据库名称
|
||||
# mysql_dbname = ioctl_db
|
||||
# 数据库访问用户
|
||||
# mysql_dbuser = ioctl_user
|
||||
# 数据库用户访问密码
|
||||
# mysql_dbpass = 111111
|
||||
|
||||
# 是否输出当前内存的状态信息
|
||||
# debug_mem = 1
|
||||
# 是否在一个线程中连接读
|
||||
# loop_read = 1
|
||||
}
|
||||
|
289
lib_acl_cpp/samples/http_servlet2/http_servlet2.vcproj
Normal file
289
lib_acl_cpp/samples/http_servlet2/http_servlet2.vcproj
Normal file
@ -0,0 +1,289 @@
|
||||
<?xml version="1.0" encoding="gb2312"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.10"
|
||||
Name="http_servlet2"
|
||||
ProjectGUID="{58FE3581-C997-4BD5-9AC6-AEEB54A43D2C}"
|
||||
Keyword="Win32Proj">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="Debug"
|
||||
IntermediateDirectory="Debug"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\..\lib_acl_cpp\include;..\..\..\lib_acl\include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;VC2003"
|
||||
MinimalRebuild="TRUE"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
UsePrecompiledHeader="3"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="4"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="lib_acl_cpp_vc2003d.lib lib_acl_vc2003d.lib lib_protocol_vc2003d.lib"
|
||||
OutputFile="$(OutDir)/http_servlet2.exe"
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories="..\..\..\dist\lib\win32"
|
||||
GenerateDebugInformation="TRUE"
|
||||
ProgramDatabaseFile="$(OutDir)/http_servlet2.pdb"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="Release"
|
||||
IntermediateDirectory="Release"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\..\lib_acl_cpp\include;..\..\..\lib_acl\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;VC2003"
|
||||
RuntimeLibrary="0"
|
||||
UsePrecompiledHeader="3"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="3"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="lib_acl_cpp_vc2003.lib lib_acl_vc2003.lib lib_protocol_vc2003.lib"
|
||||
OutputFile="$(OutDir)/http_servlet2.exe"
|
||||
LinkIncremental="1"
|
||||
AdditionalLibraryDirectories="..\..\..\dist\lib\win32"
|
||||
GenerateDebugInformation="TRUE"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="ReleaseDll|Win32"
|
||||
OutputDirectory="$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\..\lib_acl_cpp\include;..\..\..\lib_acl\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;VC2003;ACL_CPP_DLL"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="3"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="3"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="lib_acl_cpp.lib lib_acl.lib lib_protocol.lib"
|
||||
OutputFile="$(OutDir)/http_servlet2.exe"
|
||||
LinkIncremental="1"
|
||||
AdditionalLibraryDirectories="..\..\..\dist\lib\win32"
|
||||
GenerateDebugInformation="TRUE"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
CommandLine="copy ..\..\..\dist\lib\win32\lib_acl.dll $(OutDir)\ /Y
|
||||
copy ..\..\..\dist\lib\win32\lib_acl_cpp.dll $(OutDir)\ /Y
|
||||
copy ..\..\..\dist\lib\win32\lib_protocol.dll $(OutDir)\ /Y"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="DebugDll|Win32"
|
||||
OutputDirectory="$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\..\lib_acl_cpp\include;..\..\..\lib_acl\include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;VC2003;ACL_CPP_DLL"
|
||||
MinimalRebuild="TRUE"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="3"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="4"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="lib_acl_cpp_d.lib lib_acl_d.lib lib_protocol_d.lib"
|
||||
OutputFile="$(OutDir)/http_servlet2.exe"
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories="..\..\..\dist\lib\win32"
|
||||
GenerateDebugInformation="TRUE"
|
||||
ProgramDatabaseFile="$(OutDir)/http_servlet2.pdb"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
CommandLine="copy ..\..\..\dist\lib\win32\lib_acl_d.dll $(OutDir)\ /Y
|
||||
copy ..\..\..\dist\lib\win32\lib_acl_cpp.dll $(OutDir)\ /Y
|
||||
copy ..\..\..\dist\lib\win32\lib_protocol_d.dll $(OutDir)\ /Y"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Ô´Îļþ"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
|
||||
<File
|
||||
RelativePath=".\http_servlet.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\main.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\master_service.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\stdafx.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="ReleaseDll|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="DebugDll|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Í·Îļþ"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
|
||||
<File
|
||||
RelativePath=".\http_servlet.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\master_service.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\stdafx.h">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="×ÊÔ´Îļþ"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
|
||||
</Filter>
|
||||
<File
|
||||
RelativePath=".\ReadMe.txt">
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
203
lib_acl_cpp/samples/http_servlet2/http_servlet2_vc2012.vcxproj
Normal file
203
lib_acl_cpp/samples/http_servlet2/http_servlet2_vc2012.vcxproj
Normal file
@ -0,0 +1,203 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="DebugDll|Win32">
|
||||
<Configuration>DebugDll</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="ReleaseDll|Win32">
|
||||
<Configuration>ReleaseDll</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{58FE3581-C997-4BD5-9AC6-AEEB54A43D2C}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<ProjectName>http_servlet2</ProjectName>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugDll|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseDll|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugDll|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseDll|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>11.0.50727.1</_ProjectFileVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<OutDir>Debug\</OutDir>
|
||||
<IntDir>Debug\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<OutDir>Release\</OutDir>
|
||||
<IntDir>Release\</IntDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseDll|Win32'">
|
||||
<OutDir>$(Configuration)\</OutDir>
|
||||
<IntDir>$(Configuration)\</IntDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugDll|Win32'">
|
||||
<OutDir>$(Configuration)\</OutDir>
|
||||
<IntDir>$(Configuration)\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..\lib_acl_cpp\include;..\..\..\lib_acl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>lib_acl_cpp_vc2012d.lib;lib_acl_vc2012d.lib;lib_protocol_vc2012d.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)http_servlet2.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\..\dist\lib\win32;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(OutDir)http_servlet2.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>..\..\..\lib_acl_cpp\include;..\..\..\lib_acl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>lib_acl_cpp_vc2012.lib;lib_acl_vc2012.lib;lib_protocol_vc2012.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)http_servlet2.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\..\dist\lib\win32;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseDll|Win32'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>..\..\..\lib_acl_cpp\include;..\..\..\lib_acl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;ACL_CPP_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>lib_acl_cpp.lib;lib_acl.lib;lib_protocol.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)http_servlet2.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\..\dist\lib\win32;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>copy ..\..\..\dist\lib\win32\lib_acl.dll $(OutDir) /Y
|
||||
copy ..\..\..\dist\lib\win32\lib_acl_cpp.dll $(OutDir) /Y
|
||||
copy ..\..\..\dist\lib\win32\lib_protocol.dll $(OutDir) /Y</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugDll|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..\lib_acl_cpp\include;..\..\..\lib_acl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;ACL_CPP_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>lib_acl_cpp_d.lib;lib_acl_d.lib;lib_protocol_d.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)http_servlet2.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\..\dist\lib\win32;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(OutDir)http_servlet2.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>copy ..\..\..\dist\lib\win32\lib_acl_d.dll $(OutDir) /Y
|
||||
copy ..\..\..\dist\lib\win32\lib_acl_cpp.dll $(OutDir) /Y
|
||||
copy ..\..\..\dist\lib\win32\lib_protocol_d.dll $(OutDir) /Y</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="http_servlet.cpp" />
|
||||
<ClCompile Include="main.cpp" />
|
||||
<ClCompile Include="master_service.cpp" />
|
||||
<ClCompile Include="stdafx.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='DebugDll|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='ReleaseDll|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="http_servlet.h" />
|
||||
<ClInclude Include="master_service.h" />
|
||||
<ClInclude Include="stdafx.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Text Include="ReadMe.txt" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="源文件">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="头文件">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="资源文件">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="http_servlet.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="main.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="master_service.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="stdafx.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="http_servlet.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="master_service.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="stdafx.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Text Include="ReadMe.txt" />
|
||||
</ItemGroup>
|
||||
</Project>
|
36
lib_acl_cpp/samples/http_servlet2/main.cpp
Normal file
36
lib_acl_cpp/samples/http_servlet2/main.cpp
Normal file
@ -0,0 +1,36 @@
|
||||
#include "stdafx.h"
|
||||
#include "master_service.h"
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
// 初始化 acl 库
|
||||
acl::acl_cpp_init();
|
||||
|
||||
master_service& ms = acl::singleton2<master_service>::get_instance();
|
||||
|
||||
// 设置配置参数表
|
||||
ms.set_cfg_int(var_conf_int_tab);
|
||||
ms.set_cfg_int64(var_conf_int64_tab);
|
||||
ms.set_cfg_str(var_conf_str_tab);
|
||||
ms.set_cfg_bool(var_conf_bool_tab);
|
||||
|
||||
// 开始运行
|
||||
|
||||
if (argc >= 2 && strcmp(argv[1], "alone") == 0)
|
||||
{
|
||||
acl::log::stdout_open(true); // 日志输出至标准输出
|
||||
const char* addr = "127.0.0.1:8888";
|
||||
printf("listen on: %s\r\n", addr);
|
||||
if (argc >= 3)
|
||||
ms.run_alone(addr, argv[2], 5); // 单独运行方式
|
||||
else
|
||||
ms.run_alone(addr, NULL, 5); // 单独运行方式
|
||||
|
||||
printf("Enter any key to exit now\r\n");
|
||||
getchar();
|
||||
}
|
||||
else
|
||||
ms.run_daemon(argc, argv); // acl_master 控制模式运行
|
||||
|
||||
return 0;
|
||||
}
|
98
lib_acl_cpp/samples/http_servlet2/master_service.cpp
Normal file
98
lib_acl_cpp/samples/http_servlet2/master_service.cpp
Normal file
@ -0,0 +1,98 @@
|
||||
#include "stdafx.h"
|
||||
#include "http_servlet.h"
|
||||
#include "master_service.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// ÅäÖÃÄÚÈÝÏî
|
||||
|
||||
char *var_cfg_str;
|
||||
acl::master_str_tbl var_conf_str_tab[] = {
|
||||
{ "str", "test_msg", &var_cfg_str },
|
||||
|
||||
{ 0, 0, 0 }
|
||||
};
|
||||
|
||||
int var_cfg_bool;
|
||||
acl::master_bool_tbl var_conf_bool_tab[] = {
|
||||
{ "bool", 1, &var_cfg_bool },
|
||||
|
||||
{ 0, 0, 0 }
|
||||
};
|
||||
|
||||
int var_cfg_int;
|
||||
acl::master_int_tbl var_conf_int_tab[] = {
|
||||
{ "int", 120, &var_cfg_int, 0, 0 },
|
||||
|
||||
{ 0, 0 , 0 , 0, 0 }
|
||||
};
|
||||
|
||||
long long int var_cfg_int64;
|
||||
acl::master_int64_tbl var_conf_int64_tab[] = {
|
||||
{ "int64", 120, &var_cfg_int64, 0, 0 },
|
||||
|
||||
{ 0, 0 , 0 , 0, 0 }
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
master_service::master_service()
|
||||
{
|
||||
}
|
||||
|
||||
master_service::~master_service()
|
||||
{
|
||||
}
|
||||
|
||||
bool master_service::thread_on_read(acl::socket_stream* conn)
|
||||
{
|
||||
http_servlet* servlet = (http_servlet*) conn->get_ctx();
|
||||
if (servlet == NULL)
|
||||
logger_fatal("servlet null!");
|
||||
|
||||
return servlet->doRun("127.0.0.1:11211", conn);
|
||||
}
|
||||
|
||||
bool master_service::thread_on_accept(acl::socket_stream* conn)
|
||||
{
|
||||
logger("connect from %s, fd: %d", conn->get_peer(true),
|
||||
conn->sock_handle());
|
||||
conn->set_rw_timeout(5);
|
||||
|
||||
http_servlet* servlet = new http_servlet();
|
||||
conn->set_ctx(servlet);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool master_service::thread_on_timeout(acl::socket_stream* conn)
|
||||
{
|
||||
logger("read timeout from %s, fd: %d", conn->get_peer(),
|
||||
conn->sock_handle());
|
||||
return false;
|
||||
}
|
||||
|
||||
void master_service::thread_on_close(acl::socket_stream* conn)
|
||||
{
|
||||
logger("disconnect from %s, fd: %d", conn->get_peer(),
|
||||
conn->sock_handle());
|
||||
|
||||
http_servlet* servlet = (http_servlet*) conn->get_ctx();
|
||||
if (servlet)
|
||||
delete servlet;
|
||||
}
|
||||
|
||||
void master_service::thread_on_init()
|
||||
{
|
||||
}
|
||||
|
||||
void master_service::thread_on_exit()
|
||||
{
|
||||
}
|
||||
|
||||
void master_service::proc_on_init()
|
||||
{
|
||||
}
|
||||
|
||||
void master_service::proc_on_exit()
|
||||
{
|
||||
}
|
81
lib_acl_cpp/samples/http_servlet2/master_service.h
Normal file
81
lib_acl_cpp/samples/http_servlet2/master_service.h
Normal file
@ -0,0 +1,81 @@
|
||||
#pragma once
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// 配置内容项
|
||||
|
||||
extern char *var_cfg_str;
|
||||
extern acl::master_str_tbl var_conf_str_tab[];
|
||||
|
||||
extern int var_cfg_bool;
|
||||
extern acl::master_bool_tbl var_conf_bool_tab[];
|
||||
|
||||
extern int var_cfg_int;
|
||||
extern acl::master_int_tbl var_conf_int_tab[];
|
||||
|
||||
extern long long int var_cfg_int64;
|
||||
extern acl::master_int64_tbl var_conf_int64_tab[];
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//class acl::socket_stream;
|
||||
|
||||
class master_service : public acl::master_threads
|
||||
{
|
||||
public:
|
||||
master_service();
|
||||
~master_service();
|
||||
|
||||
protected:
|
||||
/**
|
||||
* 纯虚函数:当某个客户端连接有数据可读或关闭或出错时调用此函数
|
||||
* @param stream {socket_stream*}
|
||||
* @return {bool} 返回 false 则表示当函数返回后需要关闭连接,
|
||||
* 否则表示需要保持长连接,如果该流出错,则应用应该返回 false
|
||||
*/
|
||||
virtual bool thread_on_read(acl::socket_stream* stream);
|
||||
|
||||
/**
|
||||
* 当线程池中的某个线程获得一个连接时的回调函数,
|
||||
* 子类可以做一些初始化工作
|
||||
* @param stream {socket_stream*}
|
||||
* @return {bool} 如果返回 false 则表示子类要求关闭连接,而不
|
||||
* 必将该连接再传递至 thread_main 过程
|
||||
*/
|
||||
virtual bool thread_on_accept(acl::socket_stream* stream);
|
||||
|
||||
/**
|
||||
* 当某个网络连接的 IO 读写超时时的回调函数,如果该函数返回 true 则表示继续等待下一次
|
||||
* 读写,否则则希望关闭该连接
|
||||
* @param stream {socket_stream*}
|
||||
* @return {bool} 如果返回 false 则表示子类要求关闭连接,而不
|
||||
* 必将该连接再传递至 thread_main 过程
|
||||
*/
|
||||
virtual bool thread_on_timeout(acl::socket_stream* stream);
|
||||
|
||||
/**
|
||||
* 当与某个线程绑定的连接关闭时的回调函数
|
||||
* @param stream {socket_stream*}
|
||||
*/
|
||||
virtual void thread_on_close(acl::socket_stream* stream);
|
||||
|
||||
/**
|
||||
* 当线程池中一个新线程被创建时的回调函数
|
||||
*/
|
||||
virtual void thread_on_init();
|
||||
|
||||
/**
|
||||
* 当线程池中一个线程退出时的回调函数
|
||||
*/
|
||||
virtual void thread_on_exit();
|
||||
|
||||
/**
|
||||
* 当进程切换用户身份后调用的回调函数,此函数被调用时,进程
|
||||
* 的权限为普通受限级别
|
||||
*/
|
||||
virtual void proc_on_init();
|
||||
|
||||
/**
|
||||
* 当进程退出前调用的回调函数
|
||||
*/
|
||||
virtual void proc_on_exit();
|
||||
};
|
8
lib_acl_cpp/samples/http_servlet2/stdafx.cpp
Normal file
8
lib_acl_cpp/samples/http_servlet2/stdafx.cpp
Normal file
@ -0,0 +1,8 @@
|
||||
// stdafx.cpp : 只包括标准包含文件的源文件
|
||||
// master_threads.pch 将成为预编译头
|
||||
// stdafx.obj 将包含预编译类型信息
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
// TODO: 在 STDAFX.H 中
|
||||
//引用任何所需的附加头文件,而不是在此文件中引用
|
19
lib_acl_cpp/samples/http_servlet2/stdafx.h
Normal file
19
lib_acl_cpp/samples/http_servlet2/stdafx.h
Normal file
@ -0,0 +1,19 @@
|
||||
// stdafx.h : 标准系统包含文件的包含文件,
|
||||
// 或是常用但不常更改的项目特定的包含文件
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
//#include <iostream>
|
||||
//#include <tchar.h>
|
||||
|
||||
// TODO: 在此处引用程序要求的附加头文件
|
||||
|
||||
#include "acl_cpp/lib_acl.hpp"
|
||||
#include "lib_acl.h"
|
||||
|
||||
#ifdef WIN32
|
||||
#define snprintf _snprintf
|
||||
#endif
|
||||
|
3
lib_acl_cpp/samples/http_servlet2/valgrind.sh
Normal file
3
lib_acl_cpp/samples/http_servlet2/valgrind.sh
Normal file
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
valgrind --tool=memcheck --leak-check=yes -v ./http_servlet2 alone http_servlet2.cf
|
2
lib_acl_cpp/samples/scan_dir/Makefile
Normal file
2
lib_acl_cpp/samples/scan_dir/Makefile
Normal file
@ -0,0 +1,2 @@
|
||||
include ../Makefile.in
|
||||
PROG = scan_dir
|
139
lib_acl_cpp/samples/scan_dir/main.cpp
Normal file
139
lib_acl_cpp/samples/scan_dir/main.cpp
Normal file
@ -0,0 +1,139 @@
|
||||
#include <map>
|
||||
#include "lib_acl.h"
|
||||
#include "acl_cpp/lib_acl.hpp"
|
||||
|
||||
static void ls_file(acl::scan_dir& scan, const char* path, bool recursive,
|
||||
bool fullpath)
|
||||
{
|
||||
if (scan.open(path, recursive) == false)
|
||||
{
|
||||
logger_error("open path: %s error: %s",
|
||||
path, acl::last_serror());
|
||||
return;
|
||||
}
|
||||
|
||||
int nfiles = 0;
|
||||
const char* filename;
|
||||
|
||||
while ((filename = scan.next_file(fullpath)) != NULL)
|
||||
{
|
||||
logger("filename: %s, path: %s", filename, scan.curr_path());
|
||||
nfiles++;
|
||||
}
|
||||
|
||||
logger("===========================================================");
|
||||
logger("total file count: %d", nfiles);
|
||||
}
|
||||
|
||||
static void ls_dir(acl::scan_dir& scan, const char* path, bool recursive,
|
||||
bool fullpath)
|
||||
{
|
||||
if (scan.open(path, recursive) == false)
|
||||
{
|
||||
logger_error("open path: %s error: %s",
|
||||
path, acl::last_serror());
|
||||
return;
|
||||
}
|
||||
|
||||
int ndirs = 0;
|
||||
const char* dirname;
|
||||
|
||||
while ((dirname = scan.next_dir(fullpath)) != NULL)
|
||||
{
|
||||
logger("dirname: %s, path: %s", dirname, scan.curr_path());
|
||||
ndirs++;
|
||||
}
|
||||
|
||||
logger("===========================================================");
|
||||
logger("total dir count: %d", ndirs);
|
||||
}
|
||||
|
||||
static void ls_all(acl::scan_dir& scan, const char* path, bool recursive,
|
||||
bool fullpath)
|
||||
{
|
||||
if (scan.open(path, recursive) == false)
|
||||
{
|
||||
logger_error("open path: %s error: %s",
|
||||
path, acl::last_serror());
|
||||
return;
|
||||
}
|
||||
|
||||
int ndirs = 0, nfiles = 0;
|
||||
const char* name;
|
||||
bool is_file;
|
||||
|
||||
while ((name = scan.next(fullpath, &is_file)) != NULL)
|
||||
{
|
||||
logger("%s: %s, path: %s", is_file ? "filename" : "dirname",
|
||||
name, scan.curr_path());
|
||||
if (is_file)
|
||||
nfiles++;
|
||||
else
|
||||
ndirs++;
|
||||
}
|
||||
|
||||
logger("===========================================================");
|
||||
logger("total dir count: %d, file count: %d", ndirs, nfiles);
|
||||
}
|
||||
|
||||
static void usage(const char* procname)
|
||||
{
|
||||
logger("usage: %s -h [help] -d path -t type[dir|file|all] "
|
||||
"-r [if recursive, default: false] "
|
||||
"-a [if get fullpath, default: false]", procname);
|
||||
}
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
int ch;
|
||||
bool recursive = false, fullpath = false;
|
||||
acl::string path, mode;
|
||||
acl::log::stdout_open(true);
|
||||
|
||||
while ((ch = getopt(argc, argv, "hd:t:ra")) > 0)
|
||||
{
|
||||
switch (ch)
|
||||
{
|
||||
case 'h':
|
||||
usage(argv[0]);
|
||||
return 0;
|
||||
case 'd':
|
||||
path = optarg;
|
||||
break;
|
||||
case 't':
|
||||
mode = optarg;
|
||||
break;
|
||||
case 'r':
|
||||
recursive = true;
|
||||
break;
|
||||
case 'a':
|
||||
fullpath = true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (path.empty())
|
||||
{
|
||||
usage(argv[0]);
|
||||
return 1;
|
||||
}
|
||||
|
||||
acl::scan_dir scan;
|
||||
|
||||
if (mode == "dir")
|
||||
ls_dir(scan, path, recursive, fullpath);
|
||||
else if (mode == "file")
|
||||
ls_file(scan, path, recursive, fullpath);
|
||||
else
|
||||
ls_all(scan, path, recursive, fullpath);
|
||||
|
||||
#ifdef WIN32
|
||||
logger("===========================================================");
|
||||
logger("enter any key to exit");
|
||||
getchar();
|
||||
#endif
|
||||
|
||||
return (0);
|
||||
}
|
240
lib_acl_cpp/samples/scan_dir/scan_dir.vcproj
Normal file
240
lib_acl_cpp/samples/scan_dir/scan_dir.vcproj
Normal file
@ -0,0 +1,240 @@
|
||||
<?xml version="1.0" encoding="gb2312"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.10"
|
||||
Name="scan_dir"
|
||||
ProjectGUID="{7680672C-4C9B-4BE8-8BAE-BB23B951AAA0}"
|
||||
Keyword="Win32Proj">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="Debug"
|
||||
IntermediateDirectory="Debug"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\include;..\..\..\lib_acl\include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;VC2003"
|
||||
MinimalRebuild="TRUE"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="3"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="lib_acl_vc2003d.lib ws2_32.lib"
|
||||
OutputFile="scan_dir.exe"
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories="..\..\..lib\win32;..\..\..\dist\lib\win32"
|
||||
GenerateDebugInformation="TRUE"
|
||||
ProgramDatabaseFile="$(OutDir)/scan_dir.pdb"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="Release"
|
||||
IntermediateDirectory="Release"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\include;..\..\..\lib_acl\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;VC2003"
|
||||
RuntimeLibrary="0"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="3"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="ws2_32.lib wsock32.lib lib_acl_vc2003.lib"
|
||||
OutputFile="$(OutDir)/scan_dir.exe"
|
||||
LinkIncremental="1"
|
||||
AdditionalLibraryDirectories="..\..\..\lib\win32;..\..\..\dist\lib\win32"
|
||||
GenerateDebugInformation="TRUE"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="DebugDll|Win32"
|
||||
OutputDirectory="$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\include;..\..\..\lib_acl\include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;VC2003;ACL_CPP_DLL;ACL_DLL"
|
||||
MinimalRebuild="TRUE"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="3"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="ws2_32.lib"
|
||||
OutputFile="scan_dir.exe"
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories="..\..\..\lib\win32"
|
||||
GenerateDebugInformation="TRUE"
|
||||
ProgramDatabaseFile="$(OutDir)/scan_dir.pdb"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Releasedll|Win32"
|
||||
OutputDirectory="$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\include;..\..\..\lib_acl\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;VC2003;ACL_CPP_DLL;ACL_DLL"
|
||||
MinimalRebuild="TRUE"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="3"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="ws2_32.lib"
|
||||
OutputFile="scan_dir.exe"
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories="..\..\..\lib\win32"
|
||||
GenerateDebugInformation="TRUE"
|
||||
ProgramDatabaseFile="$(OutDir)/scan_dir.pdb"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Ô´Îļþ"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
|
||||
<File
|
||||
RelativePath=".\main.cpp">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Í·Îļþ"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="×ÊÔ´Îļþ"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
189
lib_acl_cpp/samples/scan_dir/scan_dir.vcxproj
Normal file
189
lib_acl_cpp/samples/scan_dir/scan_dir.vcxproj
Normal file
@ -0,0 +1,189 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="DebugDll|Win32">
|
||||
<Configuration>DebugDll</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Releasedll|Win32">
|
||||
<Configuration>Releasedll</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{7680672C-4C9B-4BE8-8BAE-BB23B951AAA0}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Releasedll|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugDll|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Releasedll|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugDll|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='DebugDll|Win32'">$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='DebugDll|Win32'">$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DebugDll|Win32'">true</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Releasedll|Win32'">$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Releasedll|Win32'">$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Releasedll|Win32'">true</LinkIncremental>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='DebugDll|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='DebugDll|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='DebugDll|Win32'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Releasedll|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Releasedll|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Releasedll|Win32'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\include;..\..\..\lib_acl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>ws2_32.lib;lib_acl_vc2010d.lib;lib_acl_cpp_vc2010d.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)scan_dir.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\..\lib\win32;..\..\..\dist\lib\win32;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(OutDir)scan_dir.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<IgnoreSpecificDefaultLibraries>
|
||||
</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>..\..\include;..\..\..\lib_acl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>ws2_32.lib;wsock32.lib;lib_acl_vc2010.lib;lib_acl_cpp_vc2010.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)scan_dir.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\lib;..\..\..\dist\lib\win32;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<IgnoreSpecificDefaultLibraries>
|
||||
</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugDll|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\include;..\..\..\lib_acl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;ACL_CPP_DLL;ACL_DLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>lib_acl_d.lib;lib_acl_cpp_d.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)scan_dir.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\lib;..\..\..\dist\lib\win32;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(OutDir)scan_dir.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Releasedll|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\include;..\..\..\lib_acl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;ACL_CPP_DLL;ACL_DLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>lib_acl.lib;lib_acl_cpp.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)scan_dir.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\lib;..\..\..\dist\lib\win32;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(OutDir)scan_dir.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="main.cpp" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
365
lib_acl_cpp/samples/scan_dir/scan_dir_vc2008.vcproj
Normal file
365
lib_acl_cpp/samples/scan_dir/scan_dir_vc2008.vcproj
Normal file
@ -0,0 +1,365 @@
|
||||
<?xml version="1.0" encoding="gb2312"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9.00"
|
||||
Name="scan_dir"
|
||||
ProjectGUID="{7680672C-4C9B-4BE8-8BAE-BB23B951AAA0}"
|
||||
Keyword="Win32Proj"
|
||||
TargetFrameworkVersion="131072"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="Debug"
|
||||
IntermediateDirectory="Debug"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\include;..\..\..\lib_acl\include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="ws2_32.lib"
|
||||
OutputFile="scan_dir.exe"
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories="..\..\..lib\win32;..\..\..\dist\lib\win32"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="$(OutDir)/scan_dir.pdb"
|
||||
SubSystem="1"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="Release"
|
||||
IntermediateDirectory="Release"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\include;..\..\..\lib_acl\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
|
||||
RuntimeLibrary="0"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="ws2_32.lib wsock32.lib"
|
||||
OutputFile="$(OutDir)/scan_dir.exe"
|
||||
LinkIncremental="1"
|
||||
AdditionalLibraryDirectories="..\..\..\lib\win32;..\..\..\dist\lib\win32"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="DebugDll|Win32"
|
||||
OutputDirectory="$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\include;..\..\..\lib_acl\include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;VC2003;ACL_CPP_DLL;ACL_DLL"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="ws2_32.lib"
|
||||
OutputFile="scan_dir.exe"
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories="..\..\..\lib\win32"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="$(OutDir)/scan_dir.pdb"
|
||||
SubSystem="1"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Releasedll|Win32"
|
||||
OutputDirectory="$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\include;..\..\..\lib_acl\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;VC2003;ACL_CPP_DLL;ACL_DLL"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="ws2_32.lib"
|
||||
OutputFile="scan_dir.exe"
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories="..\..\..\lib\win32"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="$(OutDir)/scan_dir.pdb"
|
||||
SubSystem="1"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Ô´Îļþ"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\main.cpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Í·Îļþ"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="×ÊÔ´Îļþ"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||
>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
194
lib_acl_cpp/samples/scan_dir/scan_dir_vc2012.vcxproj
Normal file
194
lib_acl_cpp/samples/scan_dir/scan_dir_vc2012.vcxproj
Normal file
@ -0,0 +1,194 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="DebugDll|Win32">
|
||||
<Configuration>DebugDll</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Releasedll|Win32">
|
||||
<Configuration>Releasedll</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{8A5563B4-C546-46D0-9C64-D051CA29F164}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<ProjectName>scan_dir</ProjectName>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Releasedll|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugDll|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Releasedll|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugDll|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='DebugDll|Win32'">$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='DebugDll|Win32'">$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DebugDll|Win32'">true</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Releasedll|Win32'">$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Releasedll|Win32'">$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Releasedll|Win32'">true</LinkIncremental>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='DebugDll|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='DebugDll|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='DebugDll|Win32'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Releasedll|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Releasedll|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Releasedll|Win32'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\include;..\..\..\lib_acl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>ws2_32.lib;lib_acl_vc2012d.lib;lib_acl_cpp_vc2012d.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)scan_dir.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\..\lib\win32;..\..\..\dist\lib\win32;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(OutDir)scan_dir.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<IgnoreSpecificDefaultLibraries>
|
||||
</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>..\..\include;..\..\..\lib_acl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>ws2_32.lib;wsock32.lib;lib_acl_vc2012.lib;lib_acl_cpp_vc2012.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)scan_dir.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\lib;..\..\..\dist\lib\win32;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<IgnoreSpecificDefaultLibraries>
|
||||
</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugDll|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\include;..\..\..\lib_acl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;ACL_CPP_DLL;ACL_DLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>lib_acl_d.lib;lib_acl_cpp_d.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)scan_dir.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\lib;..\..\..\dist\lib\win32;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(OutDir)scan_dir.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Releasedll|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\include;..\..\..\lib_acl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;ACL_CPP_DLL;ACL_DLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>lib_acl.lib;lib_acl_cpp.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)scan_dir.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\lib;..\..\..\dist\lib\win32;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(OutDir)scan_dir.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="main.cpp" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
3
lib_acl_cpp/samples/scan_dir/valgrind.sh
Normal file
3
lib_acl_cpp/samples/scan_dir/valgrind.sh
Normal file
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
valgrind --tool=memcheck --leak-check=yes -v ./scan_dir -d ../../../lib_acl/src -r -t all -a
|
2
lib_acl_cpp/samples/string2/Makefile
Normal file
2
lib_acl_cpp/samples/string2/Makefile
Normal file
@ -0,0 +1,2 @@
|
||||
include ../Makefile.in
|
||||
PROG = string
|
84
lib_acl_cpp/samples/string2/main.cpp
Normal file
84
lib_acl_cpp/samples/string2/main.cpp
Normal file
@ -0,0 +1,84 @@
|
||||
#include "lib_acl.h"
|
||||
#include "acl_cpp/stream/ofstream.hpp"
|
||||
#include "acl_cpp/stdlib/string.hpp"
|
||||
#include <stdio.h>
|
||||
#include <string>
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
static void test_main(bool move)
|
||||
{
|
||||
acl::string s("hello world!\r\n"
|
||||
"you're welcome\r\n"
|
||||
"what's your name\r\n"
|
||||
"happy new year");
|
||||
acl::string line;
|
||||
|
||||
while (true)
|
||||
{
|
||||
if (s.scan_line(line, true, NULL) == true)
|
||||
{
|
||||
printf(">>line: %s, rest len: %d\r\n",
|
||||
line.c_str(), (int) s.length());
|
||||
line.clear();
|
||||
|
||||
if (move)
|
||||
s.scan_move();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (s.empty())
|
||||
break;
|
||||
|
||||
printf(">>last: %s, len: %d\r\n",
|
||||
s.c_str(), (int) s.length());
|
||||
|
||||
acl_assert(strlen(s.c_str()) == s.length());
|
||||
|
||||
if (move)
|
||||
s.scan_move();
|
||||
|
||||
printf("=======================================\r\n");
|
||||
printf(">>string len: %d, buf len: %d, buf: \r\n%s\r\n",
|
||||
(int) s.length(), (int) strlen((char*) s.buf()),
|
||||
(char*) s.buf());
|
||||
printf("=======================================\r\n");
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void usage(const char* procname)
|
||||
{
|
||||
printf("usage: %s -h [help] -m [move buf after scan]\r\n", procname);
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
int ch;
|
||||
bool move = false;
|
||||
|
||||
while ((ch = getopt(argc, argv, "hm")) > 0)
|
||||
{
|
||||
switch (ch)
|
||||
{
|
||||
case 'h':
|
||||
usage(argv[0]);
|
||||
return 0;
|
||||
case 'm':
|
||||
move = true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
test_main(move);
|
||||
|
||||
#ifdef WIN32
|
||||
printf("enter any key to exit\r\n");
|
||||
getchar();
|
||||
#endif
|
||||
return (0);
|
||||
}
|
240
lib_acl_cpp/samples/string2/string.vcproj
Normal file
240
lib_acl_cpp/samples/string2/string.vcproj
Normal file
@ -0,0 +1,240 @@
|
||||
<?xml version="1.0" encoding="gb2312"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.10"
|
||||
Name="string"
|
||||
ProjectGUID="{C94BEF01-706C-49A7-9FF1-9D87FA5BB8E7}"
|
||||
Keyword="Win32Proj">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="Debug"
|
||||
IntermediateDirectory="Debug"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\include;..\..\..\lib_acl\include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
|
||||
MinimalRebuild="TRUE"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="3"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="lib_acl_vc2003d.lib ws2_32.lib"
|
||||
OutputFile="$(OutDir)/string.exe"
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories="..\..\..\lib\win32;..\..\..\dist\lib\win32"
|
||||
GenerateDebugInformation="TRUE"
|
||||
ProgramDatabaseFile="$(OutDir)/string.pdb"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="Release"
|
||||
IntermediateDirectory="Release"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\include;..\..\..\lib_acl\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;VC2003"
|
||||
RuntimeLibrary="0"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="3"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="ws2_32.lib wsock32.lib lib_acl_vc2003.lib"
|
||||
OutputFile="$(OutDir)/string.exe"
|
||||
LinkIncremental="1"
|
||||
AdditionalLibraryDirectories="..\..\..\lib\win32;..\..\..\dist\lib\win32"
|
||||
GenerateDebugInformation="TRUE"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="DebugDll|Win32"
|
||||
OutputDirectory="$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\include;..\..\..\lib_acl\include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;VC2003;ACL_CPP_DLL;ACL_DLL"
|
||||
MinimalRebuild="TRUE"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="3"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="ws2_32.lib"
|
||||
OutputFile="$(OutDir)/string.exe"
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories="..\..\..\lib\win32"
|
||||
GenerateDebugInformation="TRUE"
|
||||
ProgramDatabaseFile="$(OutDir)/string.pdb"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Releasedll|Win32"
|
||||
OutputDirectory="$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\include;..\..\..\lib_acl\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;VC2003;ACL_CPP_DLL;ACL_DLL"
|
||||
MinimalRebuild="TRUE"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="3"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="ws2_32.lib"
|
||||
OutputFile="$(OutDir)/string.exe"
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories="..\..\..\lib\win32"
|
||||
GenerateDebugInformation="TRUE"
|
||||
ProgramDatabaseFile="$(OutDir)/string.pdb"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Ô´Îļþ"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
|
||||
<File
|
||||
RelativePath=".\main.cpp">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Í·Îļþ"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="×ÊÔ´Îļþ"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
189
lib_acl_cpp/samples/string2/string.vcxproj
Normal file
189
lib_acl_cpp/samples/string2/string.vcxproj
Normal file
@ -0,0 +1,189 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="DebugDll|Win32">
|
||||
<Configuration>DebugDll</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Releasedll|Win32">
|
||||
<Configuration>Releasedll</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{C94BEF01-706C-49A7-9FF1-9D87FA5BB8E7}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Releasedll|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugDll|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Releasedll|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugDll|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='DebugDll|Win32'">$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='DebugDll|Win32'">$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DebugDll|Win32'">true</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Releasedll|Win32'">$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Releasedll|Win32'">$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Releasedll|Win32'">true</LinkIncremental>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='DebugDll|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='DebugDll|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='DebugDll|Win32'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Releasedll|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Releasedll|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Releasedll|Win32'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\include;..\..\..\lib_acl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>lib_acl_vc2010d.lib;lib_acl_cpp_vc2010d.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)string.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\..\lib\win32;..\..\..\dist\lib\win32;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(OutDir)string.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<IgnoreSpecificDefaultLibraries>
|
||||
</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>..\..\include;..\..\..\lib_acl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>ws2_32.lib;wsock32.lib;lib_acl_vc2010.lib;lib_acl_cpp_vc2010.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)string.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\lib;..\..\..\dist\lib\win32;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<IgnoreSpecificDefaultLibraries>
|
||||
</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugDll|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\include;..\..\..\lib_acl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;ACL_CPP_DLL;ACL_DLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>lib_acl_d.lib;lib_acl_cpp_d.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)string.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\lib;..\..\..\dist\lib\win32;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(OutDir)string.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Releasedll|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\include;..\..\..\lib_acl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;ACL_CPP_DLL;ACL_DLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>lib_acl.lib;lib_acl_cpp.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)string.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\lib;..\..\..\dist\lib\win32;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(OutDir)string.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="main.cpp" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
365
lib_acl_cpp/samples/string2/string_vc2008.vcproj
Normal file
365
lib_acl_cpp/samples/string2/string_vc2008.vcproj
Normal file
@ -0,0 +1,365 @@
|
||||
<?xml version="1.0" encoding="gb2312"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9.00"
|
||||
Name="string"
|
||||
ProjectGUID="{C94BEF01-706C-49A7-9FF1-9D87FA5BB8E7}"
|
||||
Keyword="Win32Proj"
|
||||
TargetFrameworkVersion="131072"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="Debug"
|
||||
IntermediateDirectory="Debug"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\include;..\..\..\lib_acl\include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="ws2_32.lib"
|
||||
OutputFile="$(OutDir)/string.exe"
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories="..\..\..\lib\win32;..\..\..\dist\lib\win32"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="$(OutDir)/string.pdb"
|
||||
SubSystem="1"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="Release"
|
||||
IntermediateDirectory="Release"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\include;..\..\..\lib_acl\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
|
||||
RuntimeLibrary="0"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="ws2_32.lib wsock32.lib"
|
||||
OutputFile="$(OutDir)/string.exe"
|
||||
LinkIncremental="1"
|
||||
AdditionalLibraryDirectories="..\..\..\lib\win32;..\..\..\dist\lib\win32"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="DebugDll|Win32"
|
||||
OutputDirectory="$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\include;..\..\..\lib_acl\include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;VC2003;ACL_CPP_DLL;ACL_DLL"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="ws2_32.lib"
|
||||
OutputFile="$(OutDir)/string.exe"
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories="..\..\..\lib\win32"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="$(OutDir)/string.pdb"
|
||||
SubSystem="1"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Releasedll|Win32"
|
||||
OutputDirectory="$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\include;..\..\..\lib_acl\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;VC2003;ACL_CPP_DLL;ACL_DLL"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="ws2_32.lib"
|
||||
OutputFile="$(OutDir)/string.exe"
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories="..\..\..\lib\win32"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="$(OutDir)/string.pdb"
|
||||
SubSystem="1"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Ô´Îļþ"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\main.cpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Í·Îļþ"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="×ÊÔ´Îļþ"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||
>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
194
lib_acl_cpp/samples/string2/string_vc2012.vcxproj
Normal file
194
lib_acl_cpp/samples/string2/string_vc2012.vcxproj
Normal file
@ -0,0 +1,194 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="DebugDll|Win32">
|
||||
<Configuration>DebugDll</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Releasedll|Win32">
|
||||
<Configuration>Releasedll</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{C94BEF01-706C-49A7-9FF1-9D87FA5BB8E7}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<ProjectName>string</ProjectName>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Releasedll|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugDll|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Releasedll|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugDll|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='DebugDll|Win32'">$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='DebugDll|Win32'">$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='DebugDll|Win32'">true</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Releasedll|Win32'">$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Releasedll|Win32'">$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Releasedll|Win32'">true</LinkIncremental>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='DebugDll|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='DebugDll|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='DebugDll|Win32'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Releasedll|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Releasedll|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Releasedll|Win32'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\include;..\..\..\lib_acl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>lib_acl_vc2012d.lib;lib_acl_cpp_vc2012d.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)string.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\..\lib\win32;..\..\..\dist\lib\win32;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(OutDir)string.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<IgnoreSpecificDefaultLibraries>
|
||||
</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>..\..\include;..\..\..\lib_acl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>ws2_32.lib;wsock32.lib;lib_acl_vc2012.lib;lib_acl_cpp_vc2012.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)string.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\lib;..\..\..\dist\lib\win32;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<IgnoreSpecificDefaultLibraries>
|
||||
</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugDll|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\include;..\..\..\lib_acl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;ACL_CPP_DLL;ACL_DLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>lib_acl_d.lib;lib_acl_cpp_d.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)string.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\lib;..\..\..\dist\lib\win32;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(OutDir)string.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Releasedll|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\include;..\..\..\lib_acl\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;ACL_CPP_DLL;ACL_DLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>lib_acl.lib;lib_acl_cpp.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)string.exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>..\..\lib;..\..\..\dist\lib\win32;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(OutDir)string.pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="main.cpp" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
3
lib_acl_cpp/samples/string2/valgrind.sh
Normal file
3
lib_acl_cpp/samples/string2/valgrind.sh
Normal file
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
valgrind --tool=memcheck --leak-check=yes --show-reachable=yes -v ./string
|
@ -708,32 +708,73 @@ bool http_client::body_gets(string& out, bool nonl /* = true */,
|
||||
size_t* size /* = NULL */)
|
||||
{
|
||||
if (buf_ == NULL)
|
||||
buf_ = new string(1024);
|
||||
buf_ = new string(4096);
|
||||
|
||||
size_t len, size_saved = out.length();
|
||||
|
||||
while (true)
|
||||
// 首先判断是否已经读完 HTTP 数据体
|
||||
if (body_finish_)
|
||||
{
|
||||
if (!buf_->empty() && buf_->scan_line(out, nonl, &len, true))
|
||||
if (buf_->empty())
|
||||
{
|
||||
if (size)
|
||||
*size = 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
// 当读缓冲区数据非空时,先尝试从中获取一行数据
|
||||
if (buf_->scan_line(out, nonl, &len) == true)
|
||||
{
|
||||
if (size)
|
||||
*size = out.length() - size_saved;
|
||||
return true;
|
||||
}
|
||||
|
||||
// 如果不能读到完整行数据且 HTTP 数据体读完的情况下则将读
|
||||
// 缓冲区内的数据都拷贝至目标缓冲区
|
||||
out.append(buf_);
|
||||
buf_->clear();
|
||||
|
||||
if (size)
|
||||
*size = out.length() - size_saved;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// 继续读 HTTP 数据体,并尝试从中读取一行数据
|
||||
|
||||
len = 0;
|
||||
|
||||
while (true)
|
||||
{
|
||||
if (!buf_->empty())
|
||||
{
|
||||
if (buf_->scan_line(out, nonl, &len) == true)
|
||||
{
|
||||
if (size)
|
||||
*size = out.length() - size_saved;
|
||||
return true;
|
||||
}
|
||||
|
||||
// 为了减少下次循环时调用 scan_line 的字符串查找次数,
|
||||
// 将读缓冲区中的数据先拷贝至目标缓冲区中
|
||||
|
||||
len += buf_->length();
|
||||
out.append(buf_);
|
||||
buf_->clear();
|
||||
}
|
||||
|
||||
if (body_finish_)
|
||||
{
|
||||
if (size)
|
||||
*size = out.length() - size_saved;
|
||||
return false;
|
||||
*size = len;
|
||||
return len > 0 ? true : false;
|
||||
}
|
||||
|
||||
if (read_body(*buf_, false) <= 0 && buf_->empty())
|
||||
{
|
||||
if (size)
|
||||
*size = out.length() - size_saved;
|
||||
return false;
|
||||
}
|
||||
if (read_body(*buf_, false) <= 0)
|
||||
body_finish_ = true;
|
||||
else
|
||||
body_finish_ = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -72,13 +72,22 @@ const char* scan_dir::next_file(bool full /* = false */)
|
||||
if (!full)
|
||||
return file;
|
||||
|
||||
const char* path = curr_path(true);
|
||||
const char* path = curr_path();
|
||||
if (path == NULL)
|
||||
return NULL;
|
||||
|
||||
if (file_buf_ == NULL)
|
||||
file_buf_ = NEW string(256);
|
||||
|
||||
|
||||
#ifdef WIN32
|
||||
file_buf_->format("%s%c%s", path, PATH_SEP_C, file);
|
||||
#else
|
||||
if (*path == '/' && *(path + 1) == 0)
|
||||
file_buf_->format("%s%s", path, file);
|
||||
else
|
||||
file_buf_->format("%s%c%s", path, PATH_SEP_C, file);
|
||||
#endif
|
||||
|
||||
return file_buf_->c_str();
|
||||
}
|
||||
@ -94,13 +103,21 @@ const char* scan_dir::next_dir(bool full /* = false */)
|
||||
if (!full)
|
||||
return dir;
|
||||
|
||||
const char* path = curr_path(true);
|
||||
const char* path = curr_path();
|
||||
if (path == NULL)
|
||||
return NULL;
|
||||
|
||||
if (file_buf_ == NULL)
|
||||
file_buf_ = NEW string(256);
|
||||
|
||||
#ifdef WIN32
|
||||
file_buf_->format("%s%c%s", path, PATH_SEP_C, dir);
|
||||
#else
|
||||
if (*path == '/' && *(path + 1) == 0)
|
||||
file_buf_->format("%s%s", path, dir);
|
||||
else
|
||||
file_buf_->format("%s%c%s", path, PATH_SEP_C, dir);
|
||||
#endif
|
||||
|
||||
return file_buf_->c_str();
|
||||
}
|
||||
@ -114,33 +131,42 @@ const char* scan_dir::next(bool full /* = false */, bool* is_file /* = NULL */)
|
||||
const char* name = acl_scan_dir_next_name(scan_, &res);
|
||||
if (name == NULL || *name == 0)
|
||||
return NULL;
|
||||
|
||||
if (is_file)
|
||||
*is_file = res ? true : false;
|
||||
if (!full)
|
||||
return name;
|
||||
|
||||
const char* path = curr_path(true);
|
||||
const char* path = curr_path();
|
||||
if (path == NULL)
|
||||
return NULL;
|
||||
|
||||
if (file_buf_ == NULL)
|
||||
file_buf_ = NEW string(256);
|
||||
|
||||
|
||||
#ifdef WIN32
|
||||
file_buf_->format("%s%c%s", path, PATH_SEP_C, name);
|
||||
#else
|
||||
if (*path == '/' && *(path + 1) == 0)
|
||||
file_buf_->format("%s%s", path, name);
|
||||
else
|
||||
file_buf_->format("%s%c%s", path, PATH_SEP_C, name);
|
||||
#endif
|
||||
|
||||
return file_buf_->c_str();
|
||||
}
|
||||
|
||||
const char* scan_dir::curr_path(bool full /* = false */)
|
||||
const char* scan_dir::curr_path()
|
||||
{
|
||||
if (scan_ == NULL)
|
||||
return NULL;
|
||||
|
||||
const char* rpath = acl_scan_dir_path(scan_);
|
||||
return acl_scan_dir_path(scan_);
|
||||
}
|
||||
|
||||
if (rpath == NULL || *rpath == 0)
|
||||
return rpath;
|
||||
if (!full)
|
||||
return rpath;
|
||||
bool scan_dir::get_cwd(string& out)
|
||||
{
|
||||
|
||||
#ifndef MAX_PATH
|
||||
#define MAX_PATH 1024
|
||||
@ -148,23 +174,24 @@ const char* scan_dir::curr_path(bool full /* = false */)
|
||||
char buf[MAX_PATH];
|
||||
|
||||
#ifdef WIN32
|
||||
if (GetCurrentDirectory(MAX_PATH, buf) == 0)
|
||||
if (::GetCurrentDirectory(MAX_PATH, buf) == 0)
|
||||
{
|
||||
logger_error("can't get process path: %s", last_serror());
|
||||
return NULL;
|
||||
return false;
|
||||
}
|
||||
#else
|
||||
if (getcwd(buf, sizeof(buf)) == NULL)
|
||||
if (::getcwd(buf, sizeof(buf)) == NULL)
|
||||
{
|
||||
logger_error("can't get process path: %s", last_serror());
|
||||
return NULL;
|
||||
return false;
|
||||
}
|
||||
#endif // WIN32
|
||||
|
||||
// xxx: can this happen ?
|
||||
if (buf[0] == 0)
|
||||
return NULL;
|
||||
return false;
|
||||
|
||||
// È¥µôβ²¿µÄ '/'
|
||||
char* end = buf + strlen(buf) - 1;
|
||||
while (end > buf)
|
||||
{
|
||||
@ -175,13 +202,12 @@ const char* scan_dir::curr_path(bool full /* = false */)
|
||||
if (*end == '/')
|
||||
end--;
|
||||
#endif
|
||||
else
|
||||
break;
|
||||
}
|
||||
|
||||
if (path_buf_ == NULL)
|
||||
path_buf_ = NEW string(256);
|
||||
path_buf_->format("%s%c%s", buf, PATH_SEP_C, rpath);
|
||||
|
||||
return path_buf_->c_str();
|
||||
out = buf;
|
||||
return true;
|
||||
}
|
||||
|
||||
const char* scan_dir::curr_file(bool full /* = false */)
|
||||
@ -194,7 +220,7 @@ const char* scan_dir::curr_file(bool full /* = false */)
|
||||
if (!full)
|
||||
return ptr;
|
||||
|
||||
const char* path = curr_path(true);
|
||||
const char* path = curr_path();
|
||||
if (path == NULL)
|
||||
return NULL;
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,116 +1,73 @@
|
||||
<?xml version="1.0" encoding="gb2312"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9.00"
|
||||
Version="7.10"
|
||||
Name="lib_protocol"
|
||||
ProjectGUID="{FE724EF7-3763-4E78-BDF5-BCBC075719FD}"
|
||||
RootNamespace="lib_protocol"
|
||||
Keyword="Win32Proj"
|
||||
TargetFrameworkVersion="131072"
|
||||
>
|
||||
Keyword="Win32Proj">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="."
|
||||
IntermediateDirectory="Debug"
|
||||
ConfigurationType="4"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
CharacterSet="2"
|
||||
DeleteExtensionsOnClean="*.obj;*.ilk;*.pdb;*.tlb;*.tli;*.tlh;*.tmp;*.rsp;*.bat;*.map;*.pch;$(TargetPath)"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
DeleteExtensionsOnClean="*.obj;*.ilk;*.pdb;*.tlb;*.tli;*.tlh;*.tmp;*.rsp;*.bat;*.map;*.pch;$(TargetPath)">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
FavorSizeOrSpeed="2"
|
||||
AdditionalIncludeDirectories=".\include;.\src;..\lib_acl\include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_LIB"
|
||||
MinimalRebuild="true"
|
||||
MinimalRebuild="TRUE"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
UsePrecompiledHeader="2"
|
||||
UsePrecompiledHeader="3"
|
||||
ProgramDataBaseFileName="$(ProjectName)_vc2003d.pdb"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="3"
|
||||
CompileAs="0"
|
||||
/>
|
||||
CompileAs="0"/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
AdditionalOptions="/MACHINE:X86"
|
||||
OutputFile="$(ProjectName)_vc2003d.lib"
|
||||
/>
|
||||
OutputFile="$(ProjectName)_vc2003d.lib"/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
CommandLine="copy $(TargetName).lib ..\dist\lib\win32\$(TargetName).lib /Y
copy $(TargetName).pdb ..\dist\lib\win32\$(TargetName).pdb /Y
"
|
||||
/>
|
||||
CommandLine="copy $(TargetName).lib ..\dist\lib\win32\$(TargetName).lib /Y
|
||||
copy $(TargetName).pdb ..\dist\lib\win32\$(TargetName).pdb /Y
|
||||
"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="."
|
||||
IntermediateDirectory="Release"
|
||||
ConfigurationType="4"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
CharacterSet="2"
|
||||
DeleteExtensionsOnClean="*.obj;*.ilk;*.pdb;*.tlb;*.tli;*.tlh;*.tmp;*.rsp;*.bat;*.map;*.pch;$(TargetPath)"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
DeleteExtensionsOnClean="*.obj;*.ilk;*.pdb;*.tlb;*.tli;*.tlh;*.tmp;*.rsp;*.bat;*.map;*.pch;$(TargetPath)">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="1"
|
||||
@ -118,140 +75,93 @@
|
||||
AdditionalIncludeDirectories=".\include;.\src;..\lib_acl\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
|
||||
RuntimeLibrary="0"
|
||||
EnableFunctionLevelLinking="false"
|
||||
UsePrecompiledHeader="2"
|
||||
EnableFunctionLevelLinking="FALSE"
|
||||
UsePrecompiledHeader="3"
|
||||
ProgramDataBaseFileName="$(ProjectName)_vc2003.pdb"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="3"/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
AdditionalOptions="/MACHINE:X86"
|
||||
OutputFile="$(ProjectName)_vc2003.lib"
|
||||
/>
|
||||
OutputFile="$(ProjectName)_vc2003.lib"/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
CommandLine="copy $(TargetName).lib ..\dist\lib\win32\$(TargetName).lib /Y
copy $(TargetName).pdb ..\dist\lib\win32\$(TargetName).pdb /Y
"
|
||||
/>
|
||||
CommandLine="copy $(TargetName).lib ..\dist\lib\win32\$(TargetName).lib /Y
|
||||
copy $(TargetName).pdb ..\dist\lib\win32\$(TargetName).pdb /Y
|
||||
"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="ReleaseDll|Win32"
|
||||
OutputDirectory="."
|
||||
IntermediateDirectory="ReleaseDll"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
DeleteExtensionsOnClean="*.obj;*.ilk;*.pdb;*.tlb;*.tli;*.tlh;*.tmp;*.rsp;*.bat;*.map;*.pch;$(TargetPath)"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
DeleteExtensionsOnClean="*.obj;*.ilk;*.pdb;*.tlb;*.tli;*.tlh;*.tmp;*.rsp;*.bat;*.map;*.pch;$(TargetPath)">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories=".\include;.\src;..\lib_acl\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;ACL_DLL;HTTP_DLL;HTTP_EXPORTS;ICMP_DLL;ICMP_EXPORTS;SMTP_DLL;SMTP_EXPORTS"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="2"
|
||||
UsePrecompiledHeader="3"
|
||||
ProgramDataBaseFileName="$(ProjectName).pdb"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
DebugInformationFormat="3"/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="ws2_32.lib lib_acl.lib"
|
||||
OutputFile="$(ProjectName).dll"
|
||||
AdditionalLibraryDirectories="..\lib_acl"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
CommandLine="copy $(TargetName).lib ..\dist\lib\win32\$(TargetName).lib /Y
copy $(TargetName).dll ..\dist\lib\win32\$(TargetName).dll /Y
copy $(TargetName).pdb ..\dist\lib\win32\$(TargetName).pdb /Y
"
|
||||
/>
|
||||
CommandLine="copy $(TargetName).lib ..\dist\lib\win32\$(TargetName).lib /Y
|
||||
copy $(TargetName).dll ..\dist\lib\win32\$(TargetName).dll /Y
|
||||
copy $(TargetName).pdb ..\dist\lib\win32\$(TargetName).pdb /Y
|
||||
"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="DebugDll|Win32"
|
||||
OutputDirectory="."
|
||||
IntermediateDirectory="DebugDll"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
DeleteExtensionsOnClean="*.obj;*.ilk;*.pdb;*.tlb;*.tli;*.tlh;*.tmp;*.rsp;*.bat;*.map;*.pch;$(TargetPath)"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
DeleteExtensionsOnClean="*.obj;*.ilk;*.pdb;*.tlb;*.tli;*.tlh;*.tmp;*.rsp;*.bat;*.map;*.pch;$(TargetPath)">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
@ -259,58 +169,50 @@
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;ACL_DLL;HTTP_DLL;HTTP_EXPORTS;ICMP_DLL;ICMP_EXPORTS;SMTP_DLL;SMTP_EXPORTS"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="2"
|
||||
UsePrecompiledHeader="3"
|
||||
ProgramDataBaseFileName="$(ProjectName)_d.pdb"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
DebugInformationFormat="3"/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="ws2_32.lib lib_acl_d.lib"
|
||||
AdditionalDependencies="ws2_32.lib lib_acl_d.lib"
|
||||
OutputFile="$(ProjectName)_d.dll"
|
||||
LinkIncremental="1"
|
||||
AdditionalLibraryDirectories="..\lib_acl"
|
||||
GenerateDebugInformation="true"
|
||||
GenerateDebugInformation="TRUE"
|
||||
AssemblyDebug="1"
|
||||
GenerateMapFile="true"
|
||||
MapExports="false"
|
||||
GenerateMapFile="TRUE"
|
||||
MapExports="FALSE"
|
||||
MapLines="FALSE"
|
||||
OptimizeReferences="0"
|
||||
EnableCOMDATFolding="0"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
ImportLibrary="$(OutDir)/$(TargetName).lib"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
CommandLine="copy $(TargetName).lib ..\dist\lib\win32\$(TargetName).lib /Y
copy $(TargetName).dll ..\dist\lib\win32\$(TargetName).dll /Y
copy $(TargetName).pdb ..\dist\lib\win32\$(TargetName).pdb /Y
"
|
||||
/>
|
||||
CommandLine="copy $(TargetName).lib ..\dist\lib\win32\$(TargetName).lib /Y
|
||||
copy $(TargetName).dll ..\dist\lib\win32\$(TargetName).dll /Y
|
||||
copy $(TargetName).pdb ..\dist\lib\win32\$(TargetName).pdb /Y
|
||||
"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
@ -319,241 +221,190 @@
|
||||
<Filter
|
||||
Name="×ÊÔ´Îļþ"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||
>
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
|
||||
<File
|
||||
RelativePath=".\lib_protocol.rc"
|
||||
>
|
||||
RelativePath=".\lib_protocol.rc">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
>
|
||||
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
|
||||
<File
|
||||
RelativePath=".\src\proto_snprintf.c"
|
||||
>
|
||||
RelativePath=".\src\proto_snprintf.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\StdAfx.c"
|
||||
>
|
||||
RelativePath=".\src\StdAfx.c">
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="1"
|
||||
/>
|
||||
UsePrecompiledHeader="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="1"
|
||||
/>
|
||||
UsePrecompiledHeader="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="ReleaseDll|Win32"
|
||||
>
|
||||
Name="ReleaseDll|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="1"
|
||||
/>
|
||||
UsePrecompiledHeader="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="DebugDll|Win32"
|
||||
>
|
||||
Name="DebugDll|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="1"
|
||||
/>
|
||||
UsePrecompiledHeader="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\StdAfx.h"
|
||||
>
|
||||
RelativePath=".\src\StdAfx.h">
|
||||
</File>
|
||||
<Filter
|
||||
Name="http"
|
||||
>
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath=".\src\http\http.h"
|
||||
>
|
||||
RelativePath=".\src\http\http.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\http\http_chat_async.c"
|
||||
>
|
||||
RelativePath=".\src\http\http_chat_async.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\http\http_chat_sync.c"
|
||||
>
|
||||
RelativePath=".\src\http\http_chat_sync.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\http\http_hdr.c"
|
||||
>
|
||||
RelativePath=".\src\http\http_hdr.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\http\http_hdr_build.c"
|
||||
>
|
||||
RelativePath=".\src\http\http_hdr_build.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\http\http_hdr_req.c"
|
||||
>
|
||||
RelativePath=".\src\http\http_hdr_req.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\http\http_hdr_res.c"
|
||||
>
|
||||
RelativePath=".\src\http\http_hdr_res.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\http\http_init.c"
|
||||
>
|
||||
RelativePath=".\src\http\http_init.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\http\http_req.c"
|
||||
>
|
||||
RelativePath=".\src\http\http_req.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\http\http_res.c"
|
||||
>
|
||||
RelativePath=".\src\http\http_res.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\http\http_rfc1123.c"
|
||||
>
|
||||
RelativePath=".\src\http\http_rfc1123.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\http\http_status.c"
|
||||
>
|
||||
RelativePath=".\src\http\http_status.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\http\http_tmpl.c"
|
||||
>
|
||||
RelativePath=".\src\http\http_tmpl.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\http\http_util.c"
|
||||
>
|
||||
RelativePath=".\src\http\http_util.c">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="icmp"
|
||||
>
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath=".\src\icmp\icmp_chat.c"
|
||||
>
|
||||
RelativePath=".\src\icmp\icmp_chat.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\icmp\icmp_chat_aio.c"
|
||||
>
|
||||
RelativePath=".\src\icmp\icmp_chat_aio.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\icmp\icmp_chat_sio.c"
|
||||
>
|
||||
RelativePath=".\src\icmp\icmp_chat_sio.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\icmp\icmp_host.c"
|
||||
>
|
||||
RelativePath=".\src\icmp\icmp_host.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\icmp\icmp_ping.c"
|
||||
>
|
||||
RelativePath=".\src\icmp\icmp_ping.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\icmp\icmp_pkt.c"
|
||||
>
|
||||
RelativePath=".\src\icmp\icmp_pkt.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\icmp\icmp_private.h"
|
||||
>
|
||||
RelativePath=".\src\icmp\icmp_private.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\icmp\icmp_stat.c"
|
||||
>
|
||||
RelativePath=".\src\icmp\icmp_stat.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\icmp\icmp_stream.c"
|
||||
>
|
||||
RelativePath=".\src\icmp\icmp_stream.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\icmp\icmp_struct.h"
|
||||
>
|
||||
RelativePath=".\src\icmp\icmp_struct.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\icmp\icmp_timer.c"
|
||||
>
|
||||
RelativePath=".\src\icmp\icmp_timer.c">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="smtp"
|
||||
>
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath=".\src\smtp\smtp_client.c"
|
||||
>
|
||||
RelativePath=".\src\smtp\smtp_client.c">
|
||||
</File>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="doc"
|
||||
>
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath=".\changes.txt"
|
||||
>
|
||||
RelativePath=".\changes.txt">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
>
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath=".\include\lib_protocol.h"
|
||||
>
|
||||
RelativePath=".\include\lib_protocol.h">
|
||||
</File>
|
||||
<Filter
|
||||
Name="http"
|
||||
>
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath=".\include\http\lib_http.h"
|
||||
>
|
||||
RelativePath=".\include\http\lib_http.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\include\http\lib_http_status.h"
|
||||
>
|
||||
RelativePath=".\include\http\lib_http_status.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\include\http\lib_http_struct.h"
|
||||
>
|
||||
RelativePath=".\include\http\lib_http_struct.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\include\http\lib_http_util.h"
|
||||
>
|
||||
RelativePath=".\include\http\lib_http_util.h">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="icmp"
|
||||
>
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath=".\include\icmp\lib_icmp.h"
|
||||
>
|
||||
RelativePath=".\include\icmp\lib_icmp.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\include\icmp\lib_icmp_type.h"
|
||||
>
|
||||
RelativePath=".\include\icmp\lib_icmp_type.h">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="smtp"
|
||||
>
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath=".\include\smtp\smtp_client.h"
|
||||
>
|
||||
RelativePath=".\include\smtp\smtp_client.h">
|
||||
</File>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<File
|
||||
RelativePath=".\ReadMe.txt"
|
||||
>
|
||||
RelativePath=".\ReadMe.txt">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\resource.h"
|
||||
>
|
||||
RelativePath=".\resource.h">
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
|
Loading…
Reference in New Issue
Block a user