diff --git a/ark_log/1.0.0/AIX-00FB437F4C00/AIX-00FB437F4C00.tar b/ark_log/1.0.0/AIX-00FB437F4C00/AIX-00FB437F4C00.tar old mode 100755 new mode 100644 index bbe2f11fb9167fc2af44f4e33b4a60c6a4d68467..cc41063a4234ef3000545bcd9d4eb2ec6dde2c94 Binary files a/ark_log/1.0.0/AIX-00FB437F4C00/AIX-00FB437F4C00.tar and b/ark_log/1.0.0/AIX-00FB437F4C00/AIX-00FB437F4C00.tar differ diff --git a/ark_log/1.0.0/AIX-00FB437F4C00/libarklog.a b/ark_log/1.0.0/AIX-00FB437F4C00/libarklog.a old mode 100644 new mode 100755 index 69ad83982d7d3a6d9121c5aedd373e00a1188c57..9c13e32a1f1bd6d15152750658ef2a494731f4ce Binary files a/ark_log/1.0.0/AIX-00FB437F4C00/libarklog.a and b/ark_log/1.0.0/AIX-00FB437F4C00/libarklog.a differ diff --git a/ark_log/1.0.0/AIX-00FB437F4C00/libarklog.so b/ark_log/1.0.0/AIX-00FB437F4C00/libarklog.so deleted file mode 100644 index df5a0e7a0ee901efa6aa8f46aa6d4f358663ba03..0000000000000000000000000000000000000000 Binary files a/ark_log/1.0.0/AIX-00FB437F4C00/libarklog.so and /dev/null differ diff --git a/ark_log/1.0.0/AIX-00FB437F4C00/libspdlog.a b/ark_log/1.0.0/AIX-00FB437F4C00/libspdlog.a old mode 100644 new mode 100755 index 0e6e5626a3fd775e43def92839bc98cdb2ebc4c3..f9cb9ebc167ed7cdf0cb5330ec0d8ce013559d00 Binary files a/ark_log/1.0.0/AIX-00FB437F4C00/libspdlog.a and b/ark_log/1.0.0/AIX-00FB437F4C00/libspdlog.a differ diff --git a/ark_log/1.0.0/AIX-00FB437F4C00/libspdlog.so.1 b/ark_log/1.0.0/AIX-00FB437F4C00/libspdlog.so.1 old mode 100644 new mode 100755 index 025321042dc47ed99e0ece6faac6e7ddbe0dd8fe..c35b04314aa97c0c188d68cdfc8596eebc00db8c Binary files a/ark_log/1.0.0/AIX-00FB437F4C00/libspdlog.so.1 and b/ark_log/1.0.0/AIX-00FB437F4C00/libspdlog.so.1 differ diff --git a/ark_log/1.0.0/AIX-00FB90154C00/AIX-00FB90154C00.tar b/ark_log/1.0.0/AIX-00FB90154C00/AIX-00FB90154C00.tar index 95a697ca82a4cd761e08eeb168a396617c0087b1..316903ba3964c7d30463e146c18114cbba82ab62 100755 Binary files a/ark_log/1.0.0/AIX-00FB90154C00/AIX-00FB90154C00.tar and b/ark_log/1.0.0/AIX-00FB90154C00/AIX-00FB90154C00.tar differ diff --git a/ark_log/1.0.0/AIX-00FB90154C00/libarklog.so b/ark_log/1.0.0/AIX-00FB90154C00/libarklog.so deleted file mode 100755 index 41ee62160fd4b26444fd7af3489e36c67683eb19..0000000000000000000000000000000000000000 Binary files a/ark_log/1.0.0/AIX-00FB90154C00/libarklog.so and /dev/null differ diff --git a/ark_log/1.0.0/AIX-7.2/libarklog.so b/ark_log/1.0.0/AIX-7.2/libarklog.so deleted file mode 100755 index 31bde599afa04456d061a02c357f8dea08fcb16f..0000000000000000000000000000000000000000 Binary files a/ark_log/1.0.0/AIX-7.2/libarklog.so and /dev/null differ diff --git a/ark_log/1.0.0/HP-UX-ia64/HP-UX-ia64.tar b/ark_log/1.0.0/HP-UX-ia64/HP-UX-ia64.tar index 4ec244072130c1fbcf228bf2c7fa24258c503019..9d06caac52d27ebf0234d05b14bb9fea76ef40b9 100644 Binary files a/ark_log/1.0.0/HP-UX-ia64/HP-UX-ia64.tar and b/ark_log/1.0.0/HP-UX-ia64/HP-UX-ia64.tar differ diff --git a/ark_log/1.0.0/HP-UX-ia64/libarklog.so b/ark_log/1.0.0/HP-UX-ia64/libarklog.so old mode 100755 new mode 100644 index 5bdd26f1ed37e7ce9a3a35cba1063ab202bb20a9..71e55c71daf51f2ffe81ea85c53f8a78b085309b Binary files a/ark_log/1.0.0/HP-UX-ia64/libarklog.so and b/ark_log/1.0.0/HP-UX-ia64/libarklog.so differ diff --git a/ark_log/1.0.0/Linux-x86_64/Linux-x86_64.tar b/ark_log/1.0.0/Linux-x86_64/Linux-x86_64.tar index 3c9d43e1d8c214a2fa3a487c5adb140776903946..870a968a02e967d0721ab9e3a9d8e520368d663b 100644 Binary files a/ark_log/1.0.0/Linux-x86_64/Linux-x86_64.tar and b/ark_log/1.0.0/Linux-x86_64/Linux-x86_64.tar differ diff --git a/ark_log/1.0.0/Linux-x86_64/libarklog.so b/ark_log/1.0.0/Linux-x86_64/libarklog.so index fcc5656ec04c3fb83b07a1ddf9f3013e71de8f15..5d5cc5a092ff49b0ded3067166a99ee22a491f90 100755 Binary files a/ark_log/1.0.0/Linux-x86_64/libarklog.so and b/ark_log/1.0.0/Linux-x86_64/libarklog.so differ diff --git a/ark_log/1.0.0/Linux-x86_64_6/Linux-x86_64_6.tar b/ark_log/1.0.0/Linux-x86_64_6/Linux-x86_64_6.tar index 13dc821c4e6f978e0bf785f049586029036a042f..2ebc4bacee90a764da15df2eaeb057ea63ca07e3 100644 Binary files a/ark_log/1.0.0/Linux-x86_64_6/Linux-x86_64_6.tar and b/ark_log/1.0.0/Linux-x86_64_6/Linux-x86_64_6.tar differ diff --git a/ark_log/1.0.0/Linux-x86_64_6/libarklog.so b/ark_log/1.0.0/Linux-x86_64_6/libarklog.so old mode 100644 new mode 100755 index ad4f953445a9f5d44e75168222869195d9248326..732bf1ed9bd02272045b94ed56548e92ead26f37 Binary files a/ark_log/1.0.0/Linux-x86_64_6/libarklog.so and b/ark_log/1.0.0/Linux-x86_64_6/libarklog.so differ diff --git a/ark_log/1.0.0/Linux-x86_64_6/libspdlog.so b/ark_log/1.0.0/Linux-x86_64_6/libspdlog.so new file mode 120000 index 0000000000000000000000000000000000000000..1ad8068fc66bbb7d4dc0dd2498b4cae173f7ac40 --- /dev/null +++ b/ark_log/1.0.0/Linux-x86_64_6/libspdlog.so @@ -0,0 +1 @@ +libspdlog.so.1 \ No newline at end of file diff --git a/ark_log/1.0.0/Linux-x86_64_6/libspdlog.so.1 b/ark_log/1.0.0/Linux-x86_64_6/libspdlog.so.1 new file mode 120000 index 0000000000000000000000000000000000000000..c4addf538f66e0d532e181cf3f8a4db560238647 --- /dev/null +++ b/ark_log/1.0.0/Linux-x86_64_6/libspdlog.so.1 @@ -0,0 +1 @@ +libspdlog.so.1.8.5 \ No newline at end of file diff --git a/ark_log/1.0.0/Linux-x86_64_6/libspdlog.so.1.8.5 b/ark_log/1.0.0/Linux-x86_64_6/libspdlog.so.1.8.5 new file mode 100755 index 0000000000000000000000000000000000000000..344cb91ceb957bd642adf738244c340e1c3246ca Binary files /dev/null and b/ark_log/1.0.0/Linux-x86_64_6/libspdlog.so.1.8.5 differ diff --git a/ark_log/1.0.0/Linux-x86_64_8/Linux-x86_64_8.tar b/ark_log/1.0.0/Linux-x86_64_8/Linux-x86_64_8.tar index 3c9d43e1d8c214a2fa3a487c5adb140776903946..3a68638f59fa2583940a6527204289fcf5291666 100644 Binary files a/ark_log/1.0.0/Linux-x86_64_8/Linux-x86_64_8.tar and b/ark_log/1.0.0/Linux-x86_64_8/Linux-x86_64_8.tar differ diff --git a/ark_log/1.0.0/Linux-x86_64_8/libarklog.so b/ark_log/1.0.0/Linux-x86_64_8/libarklog.so index fcc5656ec04c3fb83b07a1ddf9f3013e71de8f15..a7db70893e644be19bcd23b9fb61ee2e58315100 100755 Binary files a/ark_log/1.0.0/Linux-x86_64_8/libarklog.so and b/ark_log/1.0.0/Linux-x86_64_8/libarklog.so differ diff --git a/ark_log/1.0.0/SunOS-5.10/SunOS-5.10.tar b/ark_log/1.0.0/SunOS-5.10/SunOS-5.10.tar index 7d7487c2e2d0af59ecd180f657c34fcb5859b79e..9609922fe07bb6f528d28845102106e2bc02e5e6 100644 Binary files a/ark_log/1.0.0/SunOS-5.10/SunOS-5.10.tar and b/ark_log/1.0.0/SunOS-5.10/SunOS-5.10.tar differ diff --git a/ark_log/1.0.0/SunOS-5.10/libarklog.so b/ark_log/1.0.0/SunOS-5.10/libarklog.so old mode 100644 new mode 100755 index b68f2a14f030a6b3802d1aee2ee88e1f558e9aae..2cc6a4938f9bb8a027185ca0d2cdf47ed1ff8a6f Binary files a/ark_log/1.0.0/SunOS-5.10/libarklog.so and b/ark_log/1.0.0/SunOS-5.10/libarklog.so differ diff --git a/ark_log/1.0.0/SunOS-5.10/libspdlog.so.1.8.5 b/ark_log/1.0.0/SunOS-5.10/libspdlog.so.1.8.5 old mode 100644 new mode 100755 diff --git a/ark_log/1.0.0/SunOS-sun4v/SunOS-sun4v.tar b/ark_log/1.0.0/SunOS-sun4v/SunOS-sun4v.tar index 9f05d9d7d9bf9f336da11135c0eae352e6cbcb14..844ee1aca656c343c98039e14019d7913ffd14cd 100644 Binary files a/ark_log/1.0.0/SunOS-sun4v/SunOS-sun4v.tar and b/ark_log/1.0.0/SunOS-sun4v/SunOS-sun4v.tar differ diff --git a/ark_log/1.0.0/SunOS-sun4v/libarklog.so b/ark_log/1.0.0/SunOS-sun4v/libarklog.so index 49f86635573966821d23406676b1df566854936c..f7ef60b9e0a25ed64231ce0c965d632428049947 100644 Binary files a/ark_log/1.0.0/SunOS-sun4v/libarklog.so and b/ark_log/1.0.0/SunOS-sun4v/libarklog.so differ diff --git a/jansson/2.1.2/AIX-00FB437F4C00/AIX-00FB437F4C00.tar b/jansson/2.1.2/AIX-00FB437F4C00/AIX-00FB437F4C00.tar index 4d8bcd84f239560c68a1f8fd2d4401e54a65bb31..e7c7a953a653ea6baf25ed90b71e69cc523c4e93 100644 Binary files a/jansson/2.1.2/AIX-00FB437F4C00/AIX-00FB437F4C00.tar and b/jansson/2.1.2/AIX-00FB437F4C00/AIX-00FB437F4C00.tar differ diff --git a/jansson/2.1.2/AIX-00FB437F4C00/libark_jansson.a.1 b/jansson/2.1.2/AIX-00FB437F4C00/libark_jansson.a.1 index befa70e093d6f5390791fb4cc2667dda2afac8f4..ff4936fa90a90af8046718a656ca71cae924e308 100755 Binary files a/jansson/2.1.2/AIX-00FB437F4C00/libark_jansson.a.1 and b/jansson/2.1.2/AIX-00FB437F4C00/libark_jansson.a.1 differ diff --git a/jansson/2.1.2/AIX-00FB90154C00/AIX-00FB90154C00.tar b/jansson/2.1.2/AIX-00FB90154C00/AIX-00FB90154C00.tar index ad18754de97f7e808b2a389ae1cd39d32033223e..fc17eb601b0ad8600ac2d32b745ebccbb7f8642e 100644 Binary files a/jansson/2.1.2/AIX-00FB90154C00/AIX-00FB90154C00.tar and b/jansson/2.1.2/AIX-00FB90154C00/AIX-00FB90154C00.tar differ diff --git a/jansson/2.1.2/AIX-00FB90154C00/libark_jansson.a.1 b/jansson/2.1.2/AIX-00FB90154C00/libark_jansson.a.1 index befa70e093d6f5390791fb4cc2667dda2afac8f4..4afbb825c992309c320010f25a8f115391fb5110 100755 Binary files a/jansson/2.1.2/AIX-00FB90154C00/libark_jansson.a.1 and b/jansson/2.1.2/AIX-00FB90154C00/libark_jansson.a.1 differ diff --git a/jansson/2.1.2/HP-UX-ia64/HP-UX-ia64.tar b/jansson/2.1.2/HP-UX-ia64/HP-UX-ia64.tar index 312d77da544ed4eff4f5228b4c0e5fe88ad68c06..71f406fb69abad9f995fa1e03cb28f0cf6630984 100644 Binary files a/jansson/2.1.2/HP-UX-ia64/HP-UX-ia64.tar and b/jansson/2.1.2/HP-UX-ia64/HP-UX-ia64.tar differ diff --git a/jansson/2.1.2/HP-UX-ia64/libark_jansson.so.1 b/jansson/2.1.2/HP-UX-ia64/libark_jansson.so.1 index f36d1e6ce34854ead2cc7a78c1fc510ea3dee4c1..d9a587ef3cc4d2078440ea20090ed7bc92ed3098 100755 Binary files a/jansson/2.1.2/HP-UX-ia64/libark_jansson.so.1 and b/jansson/2.1.2/HP-UX-ia64/libark_jansson.so.1 differ diff --git a/qlibc/2.4.8/AIX-00FB437F4C00/AIX-00FB437F4C00.tar b/qlibc/2.4.8/AIX-00FB437F4C00/AIX-00FB437F4C00.tar new file mode 100644 index 0000000000000000000000000000000000000000..8ea744c543f1a0ecb641f2682881c1cd95d250f1 Binary files /dev/null and b/qlibc/2.4.8/AIX-00FB437F4C00/AIX-00FB437F4C00.tar differ diff --git a/qlibc/2.4.8/AIX-00FB437F4C00/libqlibc.a b/qlibc/2.4.8/AIX-00FB437F4C00/libqlibc.a new file mode 120000 index 0000000000000000000000000000000000000000..a974ff0ee0067d48b2f0aeaeb9d74560e9024b1d --- /dev/null +++ b/qlibc/2.4.8/AIX-00FB437F4C00/libqlibc.a @@ -0,0 +1 @@ +libqlibc.so.2.4.8 \ No newline at end of file diff --git a/qlibc/2.4.8/AIX-00FB437F4C00/libqlibc.so b/qlibc/2.4.8/AIX-00FB437F4C00/libqlibc.so new file mode 120000 index 0000000000000000000000000000000000000000..a974ff0ee0067d48b2f0aeaeb9d74560e9024b1d --- /dev/null +++ b/qlibc/2.4.8/AIX-00FB437F4C00/libqlibc.so @@ -0,0 +1 @@ +libqlibc.so.2.4.8 \ No newline at end of file diff --git a/qlibc/2.4.8/AIX-00FB437F4C00/libqlibc.so.2.4.8 b/qlibc/2.4.8/AIX-00FB437F4C00/libqlibc.so.2.4.8 new file mode 100755 index 0000000000000000000000000000000000000000..eee595bf1f4906c335dac8eb46fa59be987a8aa5 Binary files /dev/null and b/qlibc/2.4.8/AIX-00FB437F4C00/libqlibc.so.2.4.8 differ diff --git a/qlibc/2.4.8/AIX-00FB437F4C00/libqlibcext.a b/qlibc/2.4.8/AIX-00FB437F4C00/libqlibcext.a new file mode 120000 index 0000000000000000000000000000000000000000..53318c5e0c49b1775ab068502dbd00ff3855b64d --- /dev/null +++ b/qlibc/2.4.8/AIX-00FB437F4C00/libqlibcext.a @@ -0,0 +1 @@ +libqlibcext.so.2.4.8 \ No newline at end of file diff --git a/qlibc/2.4.8/AIX-00FB437F4C00/libqlibcext.so b/qlibc/2.4.8/AIX-00FB437F4C00/libqlibcext.so new file mode 120000 index 0000000000000000000000000000000000000000..53318c5e0c49b1775ab068502dbd00ff3855b64d --- /dev/null +++ b/qlibc/2.4.8/AIX-00FB437F4C00/libqlibcext.so @@ -0,0 +1 @@ +libqlibcext.so.2.4.8 \ No newline at end of file diff --git a/qlibc/2.4.8/AIX-00FB437F4C00/libqlibcext.so.2.4.8 b/qlibc/2.4.8/AIX-00FB437F4C00/libqlibcext.so.2.4.8 new file mode 100755 index 0000000000000000000000000000000000000000..25cfc77da926a21cf24578a17c2e0d0d147b5366 Binary files /dev/null and b/qlibc/2.4.8/AIX-00FB437F4C00/libqlibcext.so.2.4.8 differ diff --git a/qlibc/2.4.8/AIX-00FB90154C00/AIX-00FB90154C00.tar b/qlibc/2.4.8/AIX-00FB90154C00/AIX-00FB90154C00.tar new file mode 100644 index 0000000000000000000000000000000000000000..ceda31d04884a3f904305725ff82cd36079e0f83 Binary files /dev/null and b/qlibc/2.4.8/AIX-00FB90154C00/AIX-00FB90154C00.tar differ diff --git a/qlibc/2.4.8/AIX-00FB90154C00/libqlibc.a b/qlibc/2.4.8/AIX-00FB90154C00/libqlibc.a new file mode 120000 index 0000000000000000000000000000000000000000..a974ff0ee0067d48b2f0aeaeb9d74560e9024b1d --- /dev/null +++ b/qlibc/2.4.8/AIX-00FB90154C00/libqlibc.a @@ -0,0 +1 @@ +libqlibc.so.2.4.8 \ No newline at end of file diff --git a/qlibc/2.4.8/AIX-00FB90154C00/libqlibc.so b/qlibc/2.4.8/AIX-00FB90154C00/libqlibc.so new file mode 120000 index 0000000000000000000000000000000000000000..a974ff0ee0067d48b2f0aeaeb9d74560e9024b1d --- /dev/null +++ b/qlibc/2.4.8/AIX-00FB90154C00/libqlibc.so @@ -0,0 +1 @@ +libqlibc.so.2.4.8 \ No newline at end of file diff --git a/qlibc/2.4.8/AIX-00FB90154C00/libqlibc.so.2.4.8 b/qlibc/2.4.8/AIX-00FB90154C00/libqlibc.so.2.4.8 new file mode 100755 index 0000000000000000000000000000000000000000..ba09780d27c420ca91284ba17e1f897783417021 Binary files /dev/null and b/qlibc/2.4.8/AIX-00FB90154C00/libqlibc.so.2.4.8 differ diff --git a/qlibc/2.4.8/AIX-00FB90154C00/libqlibcext.a b/qlibc/2.4.8/AIX-00FB90154C00/libqlibcext.a new file mode 120000 index 0000000000000000000000000000000000000000..53318c5e0c49b1775ab068502dbd00ff3855b64d --- /dev/null +++ b/qlibc/2.4.8/AIX-00FB90154C00/libqlibcext.a @@ -0,0 +1 @@ +libqlibcext.so.2.4.8 \ No newline at end of file diff --git a/qlibc/2.4.8/AIX-00FB90154C00/libqlibcext.so b/qlibc/2.4.8/AIX-00FB90154C00/libqlibcext.so new file mode 120000 index 0000000000000000000000000000000000000000..53318c5e0c49b1775ab068502dbd00ff3855b64d --- /dev/null +++ b/qlibc/2.4.8/AIX-00FB90154C00/libqlibcext.so @@ -0,0 +1 @@ +libqlibcext.so.2.4.8 \ No newline at end of file diff --git a/qlibc/2.4.8/AIX-00FB90154C00/libqlibcext.so.2.4.8 b/qlibc/2.4.8/AIX-00FB90154C00/libqlibcext.so.2.4.8 new file mode 100755 index 0000000000000000000000000000000000000000..e972b3b62f0e745140ad226707e72f3f2a7dbfdf Binary files /dev/null and b/qlibc/2.4.8/AIX-00FB90154C00/libqlibcext.so.2.4.8 differ diff --git a/qlibc/2.4.8/HP-UX-ia64/HP-UX-ia64.tar b/qlibc/2.4.8/HP-UX-ia64/HP-UX-ia64.tar new file mode 100644 index 0000000000000000000000000000000000000000..04f5ba4c34fa2e3a3fdf0709cfae0706ecd45b26 Binary files /dev/null and b/qlibc/2.4.8/HP-UX-ia64/HP-UX-ia64.tar differ diff --git a/qlibc/2.4.8/HP-UX-ia64/libqlibc.sl b/qlibc/2.4.8/HP-UX-ia64/libqlibc.sl new file mode 120000 index 0000000000000000000000000000000000000000..4608007f847b07d2e94eeb1ea65a4130384384b1 --- /dev/null +++ b/qlibc/2.4.8/HP-UX-ia64/libqlibc.sl @@ -0,0 +1 @@ +libqlibc.sl.1 \ No newline at end of file diff --git a/qlibc/2.4.8/HP-UX-ia64/libqlibc.sl.1 b/qlibc/2.4.8/HP-UX-ia64/libqlibc.sl.1 new file mode 100755 index 0000000000000000000000000000000000000000..0c8c20890cc1946d53e95eb7c3b650253ccb47f9 Binary files /dev/null and b/qlibc/2.4.8/HP-UX-ia64/libqlibc.sl.1 differ diff --git a/qlibc/2.4.8/HP-UX-ia64/libqlibcext.sl b/qlibc/2.4.8/HP-UX-ia64/libqlibcext.sl new file mode 120000 index 0000000000000000000000000000000000000000..e9cb1af793b8799357ddb1123af8918f15623247 --- /dev/null +++ b/qlibc/2.4.8/HP-UX-ia64/libqlibcext.sl @@ -0,0 +1 @@ +libqlibcext.sl.1 \ No newline at end of file diff --git a/qlibc/2.4.8/HP-UX-ia64/libqlibcext.sl.1 b/qlibc/2.4.8/HP-UX-ia64/libqlibcext.sl.1 new file mode 100755 index 0000000000000000000000000000000000000000..51af8003cc810e538c3e5839fb45651bf0f40463 Binary files /dev/null and b/qlibc/2.4.8/HP-UX-ia64/libqlibcext.sl.1 differ diff --git a/qlibc/2.4.8/Linux-x86_64/Linux-x86_64.tar b/qlibc/2.4.8/Linux-x86_64/Linux-x86_64.tar new file mode 100644 index 0000000000000000000000000000000000000000..fb7025cf9186770a87fb8bc81ae35f13232e109c Binary files /dev/null and b/qlibc/2.4.8/Linux-x86_64/Linux-x86_64.tar differ diff --git a/qlibc/2.4.8/Linux-x86_64/libqlibc.so b/qlibc/2.4.8/Linux-x86_64/libqlibc.so new file mode 120000 index 0000000000000000000000000000000000000000..8bbd7c5ffe0fbe0b21642855e09c650459a72607 --- /dev/null +++ b/qlibc/2.4.8/Linux-x86_64/libqlibc.so @@ -0,0 +1 @@ +libqlibc.so.2 \ No newline at end of file diff --git a/qlibc/2.4.8/Linux-x86_64/libqlibc.so.2 b/qlibc/2.4.8/Linux-x86_64/libqlibc.so.2 new file mode 100755 index 0000000000000000000000000000000000000000..cc715b376a6712795cbdf2ccf74064615cfaf0a4 Binary files /dev/null and b/qlibc/2.4.8/Linux-x86_64/libqlibc.so.2 differ diff --git a/qlibc/2.4.8/Linux-x86_64/libqlibcext.so b/qlibc/2.4.8/Linux-x86_64/libqlibcext.so new file mode 120000 index 0000000000000000000000000000000000000000..2dffc966962521cea0fa85c9ecf2cc3de99b2e0a --- /dev/null +++ b/qlibc/2.4.8/Linux-x86_64/libqlibcext.so @@ -0,0 +1 @@ +libqlibcext.so.2 \ No newline at end of file diff --git a/qlibc/2.4.8/Linux-x86_64/libqlibcext.so.2 b/qlibc/2.4.8/Linux-x86_64/libqlibcext.so.2 new file mode 100755 index 0000000000000000000000000000000000000000..c6fb8087a13c99beaf66fd2c4c1bfed77036d524 Binary files /dev/null and b/qlibc/2.4.8/Linux-x86_64/libqlibcext.so.2 differ diff --git a/qlibc/2.4.8/Linux-x86_64_6/Linux-x86_64_6.tar b/qlibc/2.4.8/Linux-x86_64_6/Linux-x86_64_6.tar new file mode 100644 index 0000000000000000000000000000000000000000..4a10b3500a7c882e0b496f9cefeebc6d93aa8637 Binary files /dev/null and b/qlibc/2.4.8/Linux-x86_64_6/Linux-x86_64_6.tar differ diff --git a/qlibc/2.4.8/Linux-x86_64_6/libqlibc.so b/qlibc/2.4.8/Linux-x86_64_6/libqlibc.so new file mode 120000 index 0000000000000000000000000000000000000000..8bbd7c5ffe0fbe0b21642855e09c650459a72607 --- /dev/null +++ b/qlibc/2.4.8/Linux-x86_64_6/libqlibc.so @@ -0,0 +1 @@ +libqlibc.so.2 \ No newline at end of file diff --git a/qlibc/2.4.8/Linux-x86_64_6/libqlibc.so.2 b/qlibc/2.4.8/Linux-x86_64_6/libqlibc.so.2 new file mode 100755 index 0000000000000000000000000000000000000000..04542ca32f0c12a598305d46197dfd8b444bda9d Binary files /dev/null and b/qlibc/2.4.8/Linux-x86_64_6/libqlibc.so.2 differ diff --git a/qlibc/2.4.8/Linux-x86_64_6/libqlibcext.so b/qlibc/2.4.8/Linux-x86_64_6/libqlibcext.so new file mode 120000 index 0000000000000000000000000000000000000000..2dffc966962521cea0fa85c9ecf2cc3de99b2e0a --- /dev/null +++ b/qlibc/2.4.8/Linux-x86_64_6/libqlibcext.so @@ -0,0 +1 @@ +libqlibcext.so.2 \ No newline at end of file diff --git a/qlibc/2.4.8/Linux-x86_64_6/libqlibcext.so.2 b/qlibc/2.4.8/Linux-x86_64_6/libqlibcext.so.2 new file mode 100755 index 0000000000000000000000000000000000000000..e848fc43773a6dcb302e0615fbd6cec4836c63a3 Binary files /dev/null and b/qlibc/2.4.8/Linux-x86_64_6/libqlibcext.so.2 differ diff --git a/qlibc/2.4.8/Linux-x86_64_8/Linux-x86_64_8.tar b/qlibc/2.4.8/Linux-x86_64_8/Linux-x86_64_8.tar new file mode 100644 index 0000000000000000000000000000000000000000..6396927d45a5fd207515ae4dabc862ecc7e2f03b Binary files /dev/null and b/qlibc/2.4.8/Linux-x86_64_8/Linux-x86_64_8.tar differ diff --git a/qlibc/2.4.8/Linux-x86_64_8/libqlibc.so b/qlibc/2.4.8/Linux-x86_64_8/libqlibc.so new file mode 120000 index 0000000000000000000000000000000000000000..8bbd7c5ffe0fbe0b21642855e09c650459a72607 --- /dev/null +++ b/qlibc/2.4.8/Linux-x86_64_8/libqlibc.so @@ -0,0 +1 @@ +libqlibc.so.2 \ No newline at end of file diff --git a/qlibc/2.4.8/Linux-x86_64_8/libqlibc.so.2 b/qlibc/2.4.8/Linux-x86_64_8/libqlibc.so.2 new file mode 100755 index 0000000000000000000000000000000000000000..d98b2eb0d22b8cd96ed484374e843706025c2a7f Binary files /dev/null and b/qlibc/2.4.8/Linux-x86_64_8/libqlibc.so.2 differ diff --git a/qlibc/2.4.8/Linux-x86_64_8/libqlibcext.so b/qlibc/2.4.8/Linux-x86_64_8/libqlibcext.so new file mode 120000 index 0000000000000000000000000000000000000000..2dffc966962521cea0fa85c9ecf2cc3de99b2e0a --- /dev/null +++ b/qlibc/2.4.8/Linux-x86_64_8/libqlibcext.so @@ -0,0 +1 @@ +libqlibcext.so.2 \ No newline at end of file diff --git a/qlibc/2.4.8/Linux-x86_64_8/libqlibcext.so.2 b/qlibc/2.4.8/Linux-x86_64_8/libqlibcext.so.2 new file mode 100755 index 0000000000000000000000000000000000000000..3f888c204cd3a592e8c46b49535edd81f4af0511 Binary files /dev/null and b/qlibc/2.4.8/Linux-x86_64_8/libqlibcext.so.2 differ diff --git a/qlibc/2.4.8/SunOS-5.10/SunOS-5.10.tar b/qlibc/2.4.8/SunOS-5.10/SunOS-5.10.tar new file mode 100644 index 0000000000000000000000000000000000000000..e03b4db86592027a45a79e56365a107b5b9750d1 Binary files /dev/null and b/qlibc/2.4.8/SunOS-5.10/SunOS-5.10.tar differ diff --git a/qlibc/2.4.8/SunOS-5.10/libqlibc.so b/qlibc/2.4.8/SunOS-5.10/libqlibc.so new file mode 120000 index 0000000000000000000000000000000000000000..8bbd7c5ffe0fbe0b21642855e09c650459a72607 --- /dev/null +++ b/qlibc/2.4.8/SunOS-5.10/libqlibc.so @@ -0,0 +1 @@ +libqlibc.so.2 \ No newline at end of file diff --git a/qlibc/2.4.8/SunOS-5.10/libqlibc.so.2 b/qlibc/2.4.8/SunOS-5.10/libqlibc.so.2 new file mode 100755 index 0000000000000000000000000000000000000000..5196ba692eae323652a4a904f9bcff1df57bc23b Binary files /dev/null and b/qlibc/2.4.8/SunOS-5.10/libqlibc.so.2 differ diff --git a/qlibc/2.4.8/SunOS-5.10/libqlibcext.so b/qlibc/2.4.8/SunOS-5.10/libqlibcext.so new file mode 120000 index 0000000000000000000000000000000000000000..2dffc966962521cea0fa85c9ecf2cc3de99b2e0a --- /dev/null +++ b/qlibc/2.4.8/SunOS-5.10/libqlibcext.so @@ -0,0 +1 @@ +libqlibcext.so.2 \ No newline at end of file diff --git a/qlibc/2.4.8/SunOS-5.10/libqlibcext.so.2 b/qlibc/2.4.8/SunOS-5.10/libqlibcext.so.2 new file mode 100755 index 0000000000000000000000000000000000000000..2c410dafe6833038744d3a42181524c8983af7ed Binary files /dev/null and b/qlibc/2.4.8/SunOS-5.10/libqlibcext.so.2 differ diff --git a/qlibc/2.4.8/SunOS-sun4v/SunOS-sun4v.tar b/qlibc/2.4.8/SunOS-sun4v/SunOS-sun4v.tar new file mode 100644 index 0000000000000000000000000000000000000000..2f12b03e3bbc52c64b6cf9b4a21831eddfd18f61 Binary files /dev/null and b/qlibc/2.4.8/SunOS-sun4v/SunOS-sun4v.tar differ diff --git a/qlibc/2.4.8/SunOS-sun4v/libqlibc.so b/qlibc/2.4.8/SunOS-sun4v/libqlibc.so new file mode 120000 index 0000000000000000000000000000000000000000..8bbd7c5ffe0fbe0b21642855e09c650459a72607 --- /dev/null +++ b/qlibc/2.4.8/SunOS-sun4v/libqlibc.so @@ -0,0 +1 @@ +libqlibc.so.2 \ No newline at end of file diff --git a/qlibc/2.4.8/SunOS-sun4v/libqlibc.so.2 b/qlibc/2.4.8/SunOS-sun4v/libqlibc.so.2 new file mode 100755 index 0000000000000000000000000000000000000000..869b73db2fc51d70807cee43119f8491ac336fe2 Binary files /dev/null and b/qlibc/2.4.8/SunOS-sun4v/libqlibc.so.2 differ diff --git a/qlibc/2.4.8/SunOS-sun4v/libqlibcext.so b/qlibc/2.4.8/SunOS-sun4v/libqlibcext.so new file mode 120000 index 0000000000000000000000000000000000000000..2dffc966962521cea0fa85c9ecf2cc3de99b2e0a --- /dev/null +++ b/qlibc/2.4.8/SunOS-sun4v/libqlibcext.so @@ -0,0 +1 @@ +libqlibcext.so.2 \ No newline at end of file diff --git a/qlibc/2.4.8/SunOS-sun4v/libqlibcext.so.2 b/qlibc/2.4.8/SunOS-sun4v/libqlibcext.so.2 new file mode 100755 index 0000000000000000000000000000000000000000..55961c1483eb317a08adaf6e03f89f2cc9acad64 Binary files /dev/null and b/qlibc/2.4.8/SunOS-sun4v/libqlibcext.so.2 differ diff --git a/qlibc/2.4.8/include.tar b/qlibc/2.4.8/include.tar new file mode 100644 index 0000000000000000000000000000000000000000..864d9aca3e115fb866d3d18868d5c27fb6a0d1e1 Binary files /dev/null and b/qlibc/2.4.8/include.tar differ diff --git a/qlibc/2.4.8/include/qlibc/containers/qgrow.h b/qlibc/2.4.8/include/qlibc/containers/qgrow.h new file mode 100644 index 0000000000000000000000000000000000000000..b34d9b1ae4d70666a65eb2043fa89d5fb06589cb --- /dev/null +++ b/qlibc/2.4.8/include/qlibc/containers/qgrow.h @@ -0,0 +1,99 @@ +/****************************************************************************** + * qLibc + * + * Copyright (c) 2010-2015 Seungyoung Kim. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +/** + * Grow container that handles growable objects. + * + * @file qgrow.h + */ + +#ifndef QGROW_H +#define QGROW_H + +#include +#include +#include +#include "qlist.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* types */ +typedef struct qgrow_s qgrow_t; + +/* public functions */ +enum { + QGROW_THREADSAFE = (QLIST_THREADSAFE) /*!< make it thread-safe */ +}; + +extern qgrow_t *qgrow(int options); + +extern bool qgrow_add(qgrow_t *grow, const void *object, size_t size); +extern bool qgrow_addstr(qgrow_t *grow, const char *str); +extern bool qgrow_addstrf(qgrow_t *grow, const char *format, ...); + +extern size_t qgrow_size(qgrow_t *grow); +extern size_t qgrow_datasize(qgrow_t *grow); + +extern void *qgrow_toarray(qgrow_t *grow, size_t *size); +extern char *qgrow_tostring(qgrow_t *grow); + +extern void qgrow_clear(qgrow_t *grow); +extern bool qgrow_debug(qgrow_t *grow, FILE *out); +extern void qgrow_free(qgrow_t *grow); + +/** + * qgrow container object + */ +struct qgrow_s { + /* capsulated member functions */ + bool (*add) (qgrow_t *grow, const void *data, size_t size); + bool (*addstr) (qgrow_t *grow, const char *str); + bool (*addstrf) (qgrow_t *grow, const char *format, ...); + + size_t (*size) (qgrow_t *grow); + size_t (*datasize) (qgrow_t *grow); + + void *(*toarray) (qgrow_t *grow, size_t *size); + char *(*tostring) (qgrow_t *grow); + + void (*clear) (qgrow_t *grow); + bool (*debug) (qgrow_t *grow, FILE *out); + + void (*free) (qgrow_t *grow); + + /* private variables - do not access directly */ + qlist_t *list; /*!< data container */ +}; + +#ifdef __cplusplus +} +#endif + +#endif /* QGROW_H */ diff --git a/qlibc/2.4.8/include/qlibc/containers/qhasharr.h b/qlibc/2.4.8/include/qlibc/containers/qhasharr.h new file mode 100644 index 0000000000000000000000000000000000000000..4d4c0908864c212b4ae23cc1b3f659bd4414c522 --- /dev/null +++ b/qlibc/2.4.8/include/qlibc/containers/qhasharr.h @@ -0,0 +1,173 @@ +/****************************************************************************** + * qLibc + * + * Copyright (c) 2010-2015 Seungyoung Kim. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +/** + * Static Hash Table container that works in preallocated fixed size memory. + * + * @file qhasharr.h + */ + +#ifndef QHASHARR_H +#define QHASHARR_H + +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* tunable knobs */ +#define Q_HASHARR_NAMESIZE (16) /*!< knob for maximum key size. */ +#define Q_HASHARR_DATASIZE (32) /*!< knob for maximum data size in a slot. */ + +/* types */ +typedef struct qhasharr_s qhasharr_t; +typedef struct qhasharr_slot_s qhasharr_slot_t; +typedef struct qhasharr_data_s qhasharr_data_t; +typedef struct qhasharr_obj_s qhasharr_obj_t; + +/* member functions + * + * All the member functions can be accessed in both ways: + * - tbl->put(tbl, ...); // easier to switch the container type to other kinds. + * - qhasharr_put(tbl, ...); // where avoiding pointer overhead is preferred. + */ +extern qhasharr_t *qhasharr(void *memory, size_t memsize); +extern size_t qhasharr_calculate_memsize(int max); + +extern bool qhasharr_put(qhasharr_t *tbl, const char *key, const void *value, + size_t size); +extern bool qhasharr_putstr(qhasharr_t *tbl, const char *key, const char *str); +extern bool qhasharr_putstrf(qhasharr_t *tbl, const char *key, const char *format, ...); +extern bool qhasharr_put_by_obj(qhasharr_t *tbl, const void *name, size_t namesize, + const void *data, size_t datasize); + +extern void *qhasharr_get(qhasharr_t *tbl, const char *key, size_t *size); +extern char *qhasharr_getstr(qhasharr_t *tbl, const char *key); +extern void *qhasharr_get_by_obj(qhasharr_t *tbl, const void *name, size_t namesize, + size_t *datasize); + +extern bool qhasharr_remove(qhasharr_t *tbl, const char *key); +extern bool qhasharr_remove_by_obj(qhasharr_t *tbl, const char *name, size_t namesize); +extern bool qhasharr_remove_by_idx(qhasharr_t *tbl, int idx); + +extern bool qhasharr_getnext(qhasharr_t *tbl, qhasharr_obj_t *obj, int *idx); + +extern int qhasharr_size(qhasharr_t *tbl, int *maxslots, int *usedslots); +extern void qhasharr_clear(qhasharr_t *tbl); +extern bool qhasharr_debug(qhasharr_t *tbl, FILE *out); + +extern void qhasharr_free(qhasharr_t *tbl); + + +/** + * qhasharr container object + */ +struct qhasharr_s { + /* encapsulated member functions */ + bool (*put) (qhasharr_t *tbl, const char *key, const void *value, + size_t size); + bool (*putstr) (qhasharr_t *tbl, const char *key, const char *str); + bool (*putstrf) (qhasharr_t *tbl, const char *key, const char *format, ...); + bool (*put_by_obj) (qhasharr_t *tbl, const void *name, size_t namesize, + const void *data, size_t datasize); + + void *(*get) (qhasharr_t *tbl, const char *key, size_t *size); + char *(*getstr) (qhasharr_t *tbl, const char *key); + void *(*get_by_obj) (qhasharr_t *tbl, const void *name, size_t namesize, + size_t *datasize); + + bool (*remove) (qhasharr_t *tbl, const char *key); + bool (*remove_by_obj) (qhasharr_t *tbl, const char *name, size_t namesize); + bool (*remove_by_idx) (qhasharr_t *tbl, int idx); + + bool (*getnext) (qhasharr_t *tbl, qhasharr_obj_t *obj, int *idx); + + int (*size) (qhasharr_t *tbl, int *maxslots, int *usedslots); + void (*clear) (qhasharr_t *tbl); + bool (*debug) (qhasharr_t *tbl, FILE *out); + + void (*free) (qhasharr_t *tbl); + + /* private variables */ + qhasharr_data_t *data; +}; + +/** + * qhasharr internal data slot structure + */ +struct qhasharr_slot_s { + short count; /*!< hash collision counter. 0 indicates empty slot, + -1 is used for collision resolution, -2 is used for + indicating linked block */ + uint32_t hash; /*!< key hash */ + uint8_t datasize; /*!< value size in this slot*/ + int link; /*!< next link */ + + union { + /*!< key/value data */ + struct Q_HASHARR_SLOT_KEYVAL { + uint8_t data[Q_HASHARR_DATASIZE]; /*!< value */ + uint8_t name[Q_HASHARR_NAMESIZE]; /*!< key string, can be cut */ + uint16_t namesize; /*!< original key length */ + uint8_t namemd5[16]; /*!< md5 hash of the key */ + } pair; + + /*!< extended data block, used only when the count value is -2 */ + struct Q_HASHARR_SLOT_EXT { + uint8_t data[sizeof(struct Q_HASHARR_SLOT_KEYVAL)]; + } ext; + } data; +}; + +/** + * qhasharr memory structure + */ +struct qhasharr_data_s { + int maxslots; /*!< number of maximum slots */ + int usedslots; /*!< number of used slots */ + int num; /*!< number of stored keys */ +}; + +/** + * qhasharr named-object data structure for user return + */ +struct qhasharr_obj_s { + void *name; /*!< name */ + size_t namesize; /*!< name size */ + void *data; /*!< data */ + size_t datasize; /*!< data size */ +}; + +#ifdef __cplusplus +} +#endif + +#endif /* QHASHARR_H */ diff --git a/qlibc/2.4.8/include/qlibc/containers/qhashtbl.h b/qlibc/2.4.8/include/qlibc/containers/qhashtbl.h new file mode 100644 index 0000000000000000000000000000000000000000..1e16f977c0507cb465e37063467207884d7957cc --- /dev/null +++ b/qlibc/2.4.8/include/qlibc/containers/qhashtbl.h @@ -0,0 +1,135 @@ +/****************************************************************************** + * qLibc + * + * Copyright (c) 2010-2015 Seungyoung Kim. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +/** + * Hash Table container. + * + * @file qhashtbl.h + */ + +#ifndef QHASHTBL_H +#define QHASHTBL_H + +#include +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* types */ +typedef struct qhashtbl_s qhashtbl_t; +typedef struct qhashtbl_obj_s qhashtbl_obj_t; + +enum { + QHASHTBL_THREADSAFE = (0x01) /*!< make it thread-safe */ +}; + +/* member functions + * + * All the member functions can be accessed in both ways: + * - tbl->put(tbl, ...); // easier to switch the container type to other kinds. + * - qhashtbl_put(tbl, ...); // where avoiding pointer overhead is preferred. + */ +extern qhashtbl_t *qhashtbl(size_t range, int options); /*!< qhashtbl constructor */ + +extern bool qhashtbl_put(qhashtbl_t *tbl, const char *name, const void *data, size_t size); +extern bool qhashtbl_putstr(qhashtbl_t *tbl, const char *name, const char *str); +extern bool qhashtbl_putstrf(qhashtbl_t *tbl, const char *name, const char *format, ...); +extern bool qhashtbl_putint(qhashtbl_t *tbl, const char *name, int64_t num); + +extern void *qhashtbl_get(qhashtbl_t *tbl, const char *name, size_t *size, bool newmem); +extern char *qhashtbl_getstr(qhashtbl_t *tbl, const char *name, bool newmem); +extern int64_t qhashtbl_getint(qhashtbl_t *tbl, const char *name); + +extern bool qhashtbl_remove(qhashtbl_t *tbl, const char *name); + +extern bool qhashtbl_getnext(qhashtbl_t *tbl, qhashtbl_obj_t *obj, bool newmem); + +extern size_t qhashtbl_size(qhashtbl_t *tbl); +extern void qhashtbl_clear(qhashtbl_t *tbl); +extern bool qhashtbl_debug(qhashtbl_t *tbl, FILE *out); + +extern void qhashtbl_lock(qhashtbl_t *tbl); +extern void qhashtbl_unlock(qhashtbl_t *tbl); + +extern void qhashtbl_free(qhashtbl_t *tbl); + +/** + * qhashtbl container object structure + */ +struct qhashtbl_s { + /* encapsulated member functions */ + bool (*put) (qhashtbl_t *tbl, const char *name, const void *data, size_t size); + bool (*putstr) (qhashtbl_t *tbl, const char *name, const char *str); + bool (*putstrf) (qhashtbl_t *tbl, const char *name, const char *format, ...); + bool (*putint) (qhashtbl_t *tbl, const char *name, const int64_t num); + + void *(*get) (qhashtbl_t *tbl, const char *name, size_t *size, bool newmem); + char *(*getstr) (qhashtbl_t *tbl, const char *name, bool newmem); + int64_t (*getint) (qhashtbl_t *tbl, const char *name); + + bool (*remove) (qhashtbl_t *tbl, const char *name); + + bool (*getnext) (qhashtbl_t *tbl, qhashtbl_obj_t *obj, bool newmem); + + size_t (*size) (qhashtbl_t *tbl); + void (*clear) (qhashtbl_t *tbl); + bool (*debug) (qhashtbl_t *tbl, FILE *out); + + void (*lock) (qhashtbl_t *tbl); + void (*unlock) (qhashtbl_t *tbl); + + void (*free) (qhashtbl_t *tbl); + + /* private variables - do not access directly */ + void *qmutex; /*!< initialized when QHASHTBL_THREADSAFE is given */ + size_t num; /*!< number of objects in this table */ + size_t range; /*!< hash range, vertical number of slots */ + qhashtbl_obj_t **slots; /*!< slot pointer container */ +}; + +/** + * qhashtbl object data structure + */ +struct qhashtbl_obj_s { + uint32_t hash; /*!< 32bit-hash value of object name */ + char *name; /*!< object name */ + void *data; /*!< data */ + size_t size; /*!< data size */ + + qhashtbl_obj_t *next; /*!< for chaining next collision object */ +}; + +#ifdef __cplusplus +} +#endif + +#endif /* QHASHTBL_H */ diff --git a/qlibc/2.4.8/include/qlibc/containers/qlist.h b/qlibc/2.4.8/include/qlibc/containers/qlist.h new file mode 100644 index 0000000000000000000000000000000000000000..a0a276d9e7af43e875d29865d9779d2dceb09dcc --- /dev/null +++ b/qlibc/2.4.8/include/qlibc/containers/qlist.h @@ -0,0 +1,161 @@ +/****************************************************************************** + * qLibc + * + * Copyright (c) 2010-2015 Seungyoung Kim. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +/** + * Doubly Linked-list container. + * + * @file qlist.h + */ + +#ifndef QLIST_H +#define QLIST_H + +#include +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* types */ +typedef struct qlist_s qlist_t; +typedef struct qlist_obj_s qlist_obj_t; + +enum { + QLIST_THREADSAFE = (0x01) /*!< make it thread-safe */ +}; + +/* member functions + * + * All the member functions can be accessed in both ways: + * - tbl->addlast(tbl, ...); // easier to switch the container type to other kinds. + * - qlist_addlast(tbl, ...); // where avoiding pointer overhead is preferred. + */ +extern qlist_t *qlist(int options); /*!< qlist constructor */ +extern size_t qlist_setsize(qlist_t *list, size_t max); + +extern bool qlist_addfirst(qlist_t *list, const void *data, size_t size); +extern bool qlist_addlast(qlist_t *list, const void *data, size_t size); +extern bool qlist_addat(qlist_t *list, int index, const void *data, size_t size); + +extern void *qlist_getfirst(qlist_t *list, size_t *size, bool newmem); +extern void *qlist_getlast(qlist_t *list, size_t *size, bool newmem); +extern void *qlist_getat(qlist_t *list, int index, size_t *size, bool newmem); + +extern void *qlist_popfirst(qlist_t *list, size_t *size); +extern void *qlist_poplast(qlist_t *list, size_t *size); +extern void *qlist_popat(qlist_t *list, int index, size_t *size); + +extern bool qlist_removefirst(qlist_t *list); +extern bool qlist_removelast(qlist_t *list); +extern bool qlist_removeat(qlist_t *list, int index); + +extern bool qlist_getnext(qlist_t *list, qlist_obj_t *obj, bool newmem); + +extern size_t qlist_size(qlist_t *list); +extern size_t qlist_datasize(qlist_t *list); +extern void qlist_reverse(qlist_t *list); +extern void qlist_clear(qlist_t *list); + +extern void *qlist_toarray(qlist_t *list, size_t *size); +extern char *qlist_tostring(qlist_t *list); +extern bool qlist_debug(qlist_t *list, FILE *out); + +extern void qlist_lock(qlist_t *list); +extern void qlist_unlock(qlist_t *list); + +extern void qlist_free(qlist_t *list); + +/** + * qlist container object + */ +struct qlist_s { + /* encapsulated member functions */ + size_t (*setsize)(qlist_t *list, size_t max); + + bool (*addfirst)(qlist_t *list, const void *data, size_t size); + bool (*addlast)(qlist_t *list, const void *data, size_t size); + bool (*addat)(qlist_t *list, int index, const void *data, size_t size); + + void *(*getfirst)(qlist_t *list, size_t *size, bool newmem); + void *(*getlast)(qlist_t *list, size_t *size, bool newmem); + void *(*getat)(qlist_t *list, int index, size_t *size, bool newmem); + + void *(*popfirst)(qlist_t *list, size_t *size); + void *(*poplast)(qlist_t *list, size_t *size); + void *(*popat)(qlist_t *list, int index, size_t *size); + + bool (*removefirst)(qlist_t *list); + bool (*removelast)(qlist_t *list); + bool (*removeat)(qlist_t *list, int index); + + bool (*getnext)(qlist_t *list, qlist_obj_t *obj, bool newmem); + + void (*reverse)(qlist_t *list); + void (*clear)(qlist_t *list); + + size_t (*size)(qlist_t *list); + size_t (*datasize)(qlist_t *list); + + void *(*toarray)(qlist_t *list, size_t *size); + char *(*tostring)(qlist_t *list); + bool (*debug)(qlist_t *list, FILE *out); + + void (*lock)(qlist_t *list); + void (*unlock)(qlist_t *list); + + void (*free)(qlist_t *list); + + /* private variables - do not access directly */ + void *qmutex; /*!< initialized when QLIST_OPT_THREADSAFE is given */ + size_t num; /*!< number of elements */ + size_t max; /*!< maximum number of elements. 0 means no limit */ + size_t datasum; /*!< total sum of data size, does not include name size */ + + qlist_obj_t *first; /*!< first object pointer */ + qlist_obj_t *last; /*!< last object pointer */ +}; + +/** + * qlist node data structure. + */ +struct qlist_obj_s { + void *data; /*!< data */ + size_t size; /*!< data size */ + + qlist_obj_t *prev; /*!< previous link */ + qlist_obj_t *next; /*!< next link */ +}; + +#ifdef __cplusplus +} +#endif + +#endif /* QLIST_H */ diff --git a/qlibc/2.4.8/include/qlibc/containers/qlisttbl.h b/qlibc/2.4.8/include/qlibc/containers/qlisttbl.h new file mode 100644 index 0000000000000000000000000000000000000000..ece47f6e554de36f8f43d2bdb4501b2a246fa299 --- /dev/null +++ b/qlibc/2.4.8/include/qlibc/containers/qlisttbl.h @@ -0,0 +1,179 @@ +/****************************************************************************** + * qLibc + * + * Copyright (c) 2010-2015 Seungyoung Kim. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +/** + * List container with key/value pair in doubly linked data structure. + * + * @file qlisttbl.h + */ + +#ifndef QLISTTBL_H +#define QLISTTBL_H + +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* types */ +typedef struct qlisttbl_s qlisttbl_t; +typedef struct qlisttbl_obj_s qlisttbl_obj_t; +typedef struct qlisttbl_data_s qlisttbl_data_t; + +enum { + QLISTTBL_THREADSAFE = (0x01), /*!< make it thread-safe */ + QLISTTBL_UNIQUE = (0x01 << 1), /*!< keys are unique */ + QLISTTBL_CASEINSENSITIVE = (0x01 << 2), /*!< keys are case insensitive */ + QLISTTBL_INSERTTOP = (0x01 << 3), /*!< insert new key at the top */ + QLISTTBL_LOOKUPFORWARD = (0x01 << 4), /*!< find key from the top (default: backward) */ +}; + +/* member functions + * + * All the member functions can be accessed in both ways: + * - tbl->put(tbl, ...); // easier to switch the container type to other kinds. + * - qlisttbl_put(tbl, ...); // where avoiding pointer overhead is preferred. + */ +extern qlisttbl_t *qlisttbl(int options); /*!< qlisttbl constructor */ + +extern bool qlisttbl_put(qlisttbl_t *tbl, const char *name, const void *data, size_t size); +extern bool qlisttbl_putstr(qlisttbl_t *tbl, const char *name, const char *str); +extern bool qlisttbl_putstrf(qlisttbl_t *tbl, const char *name, const char *format, ...); +extern bool qlisttbl_putint(qlisttbl_t *tbl, const char *name, int64_t num); + +extern void *qlisttbl_get(qlisttbl_t *tbl, const char *name, size_t *size, bool newmem); +extern char *qlisttbl_getstr(qlisttbl_t *tbl, const char *name, bool newmem); +extern int64_t qlisttbl_getint(qlisttbl_t *tbl, const char *name); + +extern qlisttbl_data_t *qlisttbl_getmulti(qlisttbl_t *tbl, const char *name, bool newmem, size_t *numobjs); +extern void qlisttbl_freemulti(qlisttbl_data_t *objs); + +extern size_t qlisttbl_remove(qlisttbl_t *tbl, const char *name); +extern bool qlisttbl_removeobj(qlisttbl_t *tbl, const qlisttbl_obj_t *obj); + +extern bool qlisttbl_getnext(qlisttbl_t *tbl, qlisttbl_obj_t *obj, const char *name, bool newmem); + +extern size_t qlisttbl_size(qlisttbl_t *tbl); +extern void qlisttbl_sort(qlisttbl_t *tbl); +extern void qlisttbl_clear(qlisttbl_t *tbl); +extern bool qlisttbl_save(qlisttbl_t *tbl, const char *filepath, char sepchar, bool encode); +extern ssize_t qlisttbl_load(qlisttbl_t *tbl, const char *filepath, char sepchar, bool decode); + +extern bool qlisttbl_debug(qlisttbl_t *tbl, FILE *out); + +extern void qlisttbl_lock(qlisttbl_t *tbl); +extern void qlisttbl_unlock(qlisttbl_t *tbl); + +extern void qlisttbl_free(qlisttbl_t *tbl); + + + +/** + * qlisttbl container structure + */ +struct qlisttbl_s { + /* capsulated member functions */ + bool (*put) (qlisttbl_t *tbl, const char *name, const void *data, size_t size); + bool (*putstr) (qlisttbl_t *tbl, const char *name, const char *str); + bool (*putstrf) (qlisttbl_t *tbl, const char *name, const char *format, ...); + bool (*putint) (qlisttbl_t *tbl, const char *name, int64_t num); + + void *(*get) (qlisttbl_t *tbl, const char *name, size_t *size, bool newmem); + char *(*getstr) (qlisttbl_t *tbl, const char *name, bool newmem); + int64_t (*getint) (qlisttbl_t *tbl, const char *name); + + qlisttbl_data_t *(*getmulti) (qlisttbl_t *tbl, const char *name, bool newmem, size_t *numobjs); + void (*freemulti) (qlisttbl_data_t *objs); + + size_t (*remove) (qlisttbl_t *tbl, const char *name); + bool (*removeobj) (qlisttbl_t *tbl, const qlisttbl_obj_t *obj); + + bool (*getnext) (qlisttbl_t *tbl, qlisttbl_obj_t *obj, const char *name, bool newmem); + + size_t (*size) (qlisttbl_t *tbl); + void (*sort) (qlisttbl_t *tbl); + void (*clear) (qlisttbl_t *tbl); + + bool (*save) (qlisttbl_t *tbl, const char *filepath, char sepchar, + bool encode); + ssize_t (*load) (qlisttbl_t *tbl, const char *filepath, char sepchar, + bool decode); + bool (*debug) (qlisttbl_t *tbl, FILE *out); + + void (*lock) (qlisttbl_t *tbl); + void (*unlock) (qlisttbl_t *tbl); + + void (*free) (qlisttbl_t *tbl); + + /* private methods */ + bool (*namematch) (qlisttbl_obj_t *obj, const char *name, uint32_t hash); + int (*namecmp) (const char *s1, const char *s2); + + /* private variables - do not access directly */ + bool unique; /*!< keys are unique */ + bool caseinsensitive; /*!< case insensitive key comparison */ + bool keepsorted; /*!< keep table in sorted (default: insertion order) */ + bool inserttop; /*!< add new key at the top. (default: bottom) */ + bool lookupforward; /*!< find keys from the top. (default: backward) */ + + void *qmutex; /*!< initialized when QLISTTBL_OPT_THREADSAFE is given */ + size_t num; /*!< number of elements */ + qlisttbl_obj_t *first; /*!< first object pointer */ + qlisttbl_obj_t *last; /*!< last object pointer */ +}; + +/** + * qlisttbl node object data structure + */ +struct qlisttbl_obj_s { + uint32_t hash; /*!< 32bit-hash value of object name */ + char *name; /*!< object name */ + void *data; /*!< data */ + size_t size; /*!< data size */ + + qlisttbl_obj_t *prev; /*!< previous link */ + qlisttbl_obj_t *next; /*!< next link */ +}; + +/** + * qlisttbl value data structure for user return + */ +struct qlisttbl_data_s { + void *data; /*!< data */ + size_t size; /*!< data size */ + uint8_t type; /*!< data type, internal use */ +}; + +#ifdef __cplusplus +} +#endif + +#endif /* QLISTTBL_H */ diff --git a/qlibc/2.4.8/include/qlibc/containers/qqueue.h b/qlibc/2.4.8/include/qlibc/containers/qqueue.h new file mode 100644 index 0000000000000000000000000000000000000000..b087b58e3a6706b810d4f6ccbfb912402cb2365c --- /dev/null +++ b/qlibc/2.4.8/include/qlibc/containers/qqueue.h @@ -0,0 +1,116 @@ +/****************************************************************************** + * qLibc + * + * Copyright (c) 2010-2015 Seungyoung Kim. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +/** + * Queue container. + * + * @file qqueue.h + */ + +#ifndef QQUEUE_H +#define QQUEUE_H + +#include +#include +#include +#include "qlist.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* types */ +typedef struct qqueue_s qqueue_t; + +enum { + QQUEUE_THREADSAFE = (QLIST_THREADSAFE) /*!< make it thread-safe */ +}; + +/* member functions + * + * All the member functions can be accessed in both ways: + * - tbl->push(tbl, ...); // easier to switch the container type to other kinds. + * - qqueue_push(tbl, ...); // where avoiding pointer overhead is preferred. + */ +extern qqueue_t *qqueue(int options); +extern size_t qqueue_setsize(qqueue_t *queue, size_t max); + +extern bool qqueue_push(qqueue_t *queue, const void *data, size_t size); +extern bool qqueue_pushstr(qqueue_t *queue, const char *str); +extern bool qqueue_pushint(qqueue_t *queue, int64_t num); + +extern void *qqueue_pop(qqueue_t *queue, size_t *size); +extern char *qqueue_popstr(qqueue_t *queue); +extern int64_t qqueue_popint(qqueue_t *queue); +extern void *qqueue_popat(qqueue_t *queue, int index, size_t *size); + +extern void *qqueue_get(qqueue_t *queue, size_t *size, bool newmem); +extern char *qqueue_getstr(qqueue_t *queue); +extern int64_t qqueue_getint(qqueue_t *queue); +extern void *qqueue_getat(qqueue_t *queue, int index, size_t *size, bool newmem); + +extern size_t qqueue_size(qqueue_t *queue); +extern void qqueue_clear(qqueue_t *queue); +extern bool qqueue_debug(qqueue_t *queue, FILE *out); +extern void qqueue_free(qqueue_t *queue); + +/** + * qqueue container object structure + */ +struct qqueue_s { + /* encapsulated member functions */ + size_t (*setsize) (qqueue_t *stack, size_t max); + + bool (*push) (qqueue_t *stack, const void *data, size_t size); + bool (*pushstr) (qqueue_t *stack, const char *str); + bool (*pushint) (qqueue_t *stack, int64_t num); + + void *(*pop) (qqueue_t *stack, size_t *size); + char *(*popstr) (qqueue_t *stack); + int64_t (*popint) (qqueue_t *stack); + void *(*popat) (qqueue_t *stack, int index, size_t *size); + + void *(*get) (qqueue_t *stack, size_t *size, bool newmem); + char *(*getstr) (qqueue_t *stack); + int64_t (*getint) (qqueue_t *stack); + void *(*getat) (qqueue_t *stack, int index, size_t *size, bool newmem); + + size_t (*size) (qqueue_t *stack); + void (*clear) (qqueue_t *stack); + bool (*debug) (qqueue_t *stack, FILE *out); + void (*free) (qqueue_t *stack); + + /* private variables - do not access directly */ + qlist_t *list; /*!< data container */ +}; + +#ifdef __cplusplus +} +#endif + +#endif /* QQUEUE_H */ diff --git a/qlibc/2.4.8/include/qlibc/containers/qstack.h b/qlibc/2.4.8/include/qlibc/containers/qstack.h new file mode 100644 index 0000000000000000000000000000000000000000..8afb711960008b9e028767b7a2e09c5de5332243 --- /dev/null +++ b/qlibc/2.4.8/include/qlibc/containers/qstack.h @@ -0,0 +1,116 @@ +/****************************************************************************** + * qLibc + * + * Copyright (c) 2010-2015 Seungyoung Kim. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +/** + * LIFO Stack container. + * + * @file qstack.h + */ + +#ifndef QSTACK_H +#define QSTACK_H + +#include +#include +#include +#include "qlist.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* types */ +typedef struct qstack_s qstack_t; + +enum { + QSTACK_THREADSAFE = (QLIST_THREADSAFE) /*!< make it thread-safe */ +}; + +/* member functions + * + * All the member functions can be accessed in both ways: + * - tbl->push(tbl, ...); // easier to switch the container type to other kinds. + * - qstack_push(tbl, ...); // where avoiding pointer overhead is preferred. + */ +extern qstack_t *qstack(int options); +extern size_t qstack_setsize(qstack_t *stack, size_t max); + +extern bool qstack_push(qstack_t *stack, const void *data, size_t size); +extern bool qstack_pushstr(qstack_t *stack, const char *str); +extern bool qstack_pushint(qstack_t *stack, int64_t num); + +extern void *qstack_pop(qstack_t *stack, size_t *size); +extern char *qstack_popstr(qstack_t *stack); +extern int64_t qstack_popint(qstack_t *stack); +extern void *qstack_popat(qstack_t *stack, int index, size_t *size); + +extern void *qstack_get(qstack_t *stack, size_t *size, bool newmem); +extern char *qstack_getstr(qstack_t *stack); +extern int64_t qstack_getint(qstack_t *stack); +extern void *qstack_getat(qstack_t *stack, int index, size_t *size, bool newmem); + +extern size_t qstack_size(qstack_t *stack); +extern void qstack_clear(qstack_t *stack); +extern bool qstack_debug(qstack_t *stack, FILE *out); +extern void qstack_free(qstack_t *stack); + +/** + * qstack container object structure + */ +struct qstack_s { + /* encapsulated member functions */ + size_t (*setsize) (qstack_t *stack, size_t max); + + bool (*push) (qstack_t *stack, const void *data, size_t size); + bool (*pushstr) (qstack_t *stack, const char *str); + bool (*pushint) (qstack_t *stack, int64_t num); + + void *(*pop) (qstack_t *stack, size_t *size); + char *(*popstr) (qstack_t *stack); + int64_t (*popint) (qstack_t *stack); + void *(*popat) (qstack_t *stack, int index, size_t *size); + + void *(*get) (qstack_t *stack, size_t *size, bool newmem); + char *(*getstr) (qstack_t *stack); + int64_t (*getint) (qstack_t *stack); + void *(*getat) (qstack_t *stack, int index, size_t *size, bool newmem); + + size_t (*size) (qstack_t *stack); + void (*clear) (qstack_t *stack); + bool (*debug) (qstack_t *stack, FILE *out); + void (*free) (qstack_t *stack); + + /* private variables - do not access directly */ + qlist_t *list; /*!< data container */ +}; + +#ifdef __cplusplus +} +#endif + +#endif /* QSTACK_H */ diff --git a/qlibc/2.4.8/include/qlibc/containers/qtreetbl.h b/qlibc/2.4.8/include/qlibc/containers/qtreetbl.h new file mode 100644 index 0000000000000000000000000000000000000000..13c071ccb8b5e3ad7515ef29ca5b27fad8fba60b --- /dev/null +++ b/qlibc/2.4.8/include/qlibc/containers/qtreetbl.h @@ -0,0 +1,183 @@ +/****************************************************************************** + * qLibc + * + * Copyright (c) 2010-2015 Seungyoung Kim. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +/** + * Tree Table container that implements "Left-Leaning Red-Black" Binary Search Tree algorithm. + * + * @file qtreetbl.h + */ + +#ifndef QTREETBL_H +#define QTREETBL_H + +#include +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* types */ +typedef struct qtreetbl_s qtreetbl_t; +typedef struct qtreetbl_obj_s qtreetbl_obj_t; + +/* public functions */ +enum { + QTREETBL_THREADSAFE = (0x01) /*!< make it thread-safe */ +}; + +extern qtreetbl_t *qtreetbl(int options); /*!< qtreetbl constructor */ + +/* member functions + * + * All the member functions can be accessed in both ways: + * - tbl->put(tbl, ...); // easier to switch the container type to other kinds. + * - qtreetbl_put(tbl, ...); // where avoiding pointer overhead is preferred. + */ +extern void qtreetbl_set_compare( + qtreetbl_t *tbl, + int (*cmp)(const void *name1, size_t namesize1, const void *name2, + size_t namesize2)); + +extern bool qtreetbl_put(qtreetbl_t *tbl, const char *name, const void *data, + size_t datasize); +extern bool qtreetbl_putstr(qtreetbl_t *tbl, const char *name, const char *str); +extern bool qtreetbl_putstrf(qtreetbl_t *tbl, const char *name, + const char *format, ...); +extern bool qtreetbl_put_by_obj(qtreetbl_t *tbl, const void *name, + size_t namesize, const void *data, + size_t datasize); + +extern void *qtreetbl_get(qtreetbl_t *tbl, const char *name, size_t *datasize, +bool newmem); +extern char *qtreetbl_getstr(qtreetbl_t *tbl, const char *name, + const bool newmem); +extern void *qtreetbl_get_by_obj(qtreetbl_t *tbl, const char *name, + size_t namesize, size_t *datasize, bool newmem); + +extern bool qtreetbl_remove(qtreetbl_t *tbl, const char *name); +extern bool qtreetbl_remove_by_obj(qtreetbl_t *tbl, const void *name, + size_t namesize); + +extern bool qtreetbl_getnext(qtreetbl_t *tbl, qtreetbl_obj_t *obj, + const bool newmem); + +extern void *qtreetbl_find_min(qtreetbl_t *tbl, size_t *namesize); +extern void *qtreetbl_find_max(qtreetbl_t *tbl, size_t *namesize); +extern qtreetbl_obj_t qtreetbl_find_nearest(qtreetbl_t *tbl, const void *name, + size_t namesize, bool newmem); + +extern size_t qtreetbl_size(qtreetbl_t *tbl); +extern void qtreetbl_clear(qtreetbl_t *tbl); + +extern void qtreetbl_lock(qtreetbl_t *tbl); +extern void qtreetbl_unlock(qtreetbl_t *tbl); + +extern void qtreetbl_free(qtreetbl_t *tbl); + +extern int qtreetbl_byte_cmp(const void *name1, size_t namesize1, + const void *name2, size_t namesize2); +extern bool qtreetbl_debug(qtreetbl_t *tbl, FILE *out); +extern int qtreetbl_check(qtreetbl_t *tbl); + +/** + * qtreetbl container object + */ +struct qtreetbl_s { + /* encapsulated member functions */ + void (*set_compare)( + qtreetbl_t *tbl, + int (*cmp)(const void *name1, size_t namesize1, const void *name2, + size_t namesize2)); + bool (*put)(qtreetbl_t *tbl, const char *name, const void *data, + size_t size); + bool (*putstr)(qtreetbl_t *tbl, const char *name, const char *str); + bool (*putstrf)(qtreetbl_t *tbl, const char *name, const char *format, ...); + bool (*put_by_obj)(qtreetbl_t *tbl, const void *name, size_t namesize, + const void *data, size_t datasize); + + void *(*get)(qtreetbl_t *tbl, const char *name, size_t *datasize, + bool newmem); + char *(*getstr)(qtreetbl_t *tbl, const char *name, bool newmem); + void *(*get_by_obj)(qtreetbl_t *tbl, const char *name, size_t namesize, + size_t *datasize, bool newmem); + + bool (*remove)(qtreetbl_t *tbl, const char *name); + bool (*remove_by_obj)(qtreetbl_t *tbl, const void *name, size_t namesize); + + bool (*getnext)(qtreetbl_t *tbl, qtreetbl_obj_t *obj, const bool newmem); + + void *(*find_min)(qtreetbl_t *tbl, size_t *namesize); + void *(*find_max)(qtreetbl_t *tbl, size_t *namesize); + qtreetbl_obj_t (*find_nearest)(qtreetbl_t *tbl, const void *name, + size_t namesize, bool newmem); + + size_t (*size)(qtreetbl_t *tbl); + void (*clear)(qtreetbl_t *tbl); + bool (*debug)(qtreetbl_t *tbl, FILE *out); + + void (*lock)(qtreetbl_t *tbl); + void (*unlock)(qtreetbl_t *tbl); + + void (*free)(qtreetbl_t *tbl); + + /* private member functions */ + int (*compare)(const void *name1, size_t namesize1, const void *name2, + size_t namesize2); + + /* private variables - do not access directly */ + void *qmutex; /*!< initialized when QTREETBL_THREADSAFE is given */ + qtreetbl_obj_t *root; /*!< root node */ + size_t num; /*!< number of objects */ + uint8_t tid; /*!< travel id sequencer */ +}; + +/** + * qtreetbl object data structure + */ +struct qtreetbl_obj_s { + void *name; /*!< name of key */ + size_t namesize; /*!< name size */ + void *data; /*!< data */ + size_t datasize; /*!< data size */ + + bool red; /*!< true if upper link is red */ + qtreetbl_obj_t *left; /*!< left node */ + qtreetbl_obj_t *right; /*!< right node */ + + qtreetbl_obj_t *next; /*!< temporary use for tree traversal */ + uint8_t tid; /*!< temporary use for tree traversal */ +}; + +#ifdef __cplusplus +} +#endif + +#endif /* QTREETBL_H */ diff --git a/qlibc/2.4.8/include/qlibc/containers/qvector.h b/qlibc/2.4.8/include/qlibc/containers/qvector.h new file mode 100644 index 0000000000000000000000000000000000000000..1fdbb1d349cbf5a29700eabce2efee0aecc22b97 --- /dev/null +++ b/qlibc/2.4.8/include/qlibc/containers/qvector.h @@ -0,0 +1,159 @@ +/****************************************************************************** + * qLibc + * + * Copyright (c) 2010-2015 Seungyoung Kim. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ +/* This code is written and updated by following people and released under + * the same license as above qLibc license. + * Copyright (c) 2015 Zhenjiang Xie - https://github.com/Charles0429 + *****************************************************************************/ + +/** + * Vector container. + * + * @file qvector.h + */ + +#ifndef QVECTOR_H +#define QVECTOR_H + +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* types */ +typedef struct qvector_s qvector_t; +typedef struct qvector_obj_s qvector_obj_t; + +/* public functions */ +enum { + QVECTOR_THREADSAFE = (0x01), /*!< make it thread-safe */ + QVECTOR_RESIZE_DOUBLE = (0x02), /*!< double the size when vector is full*/ + QVECTOR_RESIZE_LINEAR = (0x04), /*!< add the size with initial num when vector is full*/ + QVECTOR_RESIZE_EXACT = (0x08) /*!< add up as much as needed*/ +}; + +extern qvector_t *qvector(size_t max, size_t objsize, int options); + +extern bool qvector_addfirst(qvector_t *vector, const void *data); +extern bool qvector_addlast(qvector_t *vector, const void *data); +extern bool qvector_addat(qvector_t *vector, int index, const void *data); + +extern void *qvector_getfirst(qvector_t *vector, bool newmem); +extern void *qvector_getlast(qvector_t *vector, bool newmem); +extern void *qvector_getat(qvector_t *vector, int index, bool newmem); + +extern bool qvector_setfirst(qvector_t *vector, const void *data); +extern bool qvector_setlast(qvector_t *vector, const void *data); +extern bool qvector_setat(qvector_t *vector, int index, const void *data); + +extern void *qvector_popfirst(qvector_t *vector); +extern void *qvector_poplast(qvector_t *vector); +extern void *qvector_popat(qvector_t *vector, int index); + +extern bool qvector_removefirst(qvector_t *vector); +extern bool qvector_removelast(qvector_t *vector); +extern bool qvector_removeat(qvector_t *vector, int index); + +extern size_t qvector_size(qvector_t *vector); +extern bool qvector_resize(qvector_t *vector, size_t newmax); + +extern void *qvector_toarray(qvector_t *vector, size_t *size); + +extern void qvector_lock(qvector_t *vector); +extern void qvector_unlock(qvector_t *vector); + +extern void qvector_clear(qvector_t *vector); +extern bool qvector_debug(qvector_t *vector, FILE *out); +extern void qvector_free(qvector_t *vector); + +extern void qvector_reverse(qvector_t *vector); +extern bool qvector_getnext(qvector_t *vector, qvector_obj_t *obj, bool newmem); + +/** + * qvector container object + */ +struct qvector_s { + /* capsulated member functions */ + + bool (*addfirst)(qvector_t *vector, const void *object); + bool (*addlast)(qvector_t *vector, const void *data); + bool (*addat)(qvector_t *vector, int index, const void *data); + + void *(*getfirst)(qvector_t *vector, bool newmem); + void *(*getlast)(qvector_t *vector, bool newmem); + void *(*getat)(qvector_t *vector, int index, bool newmem); + + bool (*setfirst)(qvector_t *vector, const void *data); + bool (*setlast)(qvector_t *vector, const void *data); + bool (*setat)(qvector_t *vector, int index, const void *data); + + void *(*popfirst)(qvector_t *vector); + void *(*poplast)(qvector_t *vector); + void *(*popat)(qvector_t *vector, int index); + + bool (*removefirst)(qvector_t *vector); + bool (*removelast)(qvector_t *vector); + bool (*removeat)(qvector_t *vector, int index); + + size_t (*size)(qvector_t *vector); + bool (*resize)(qvector_t *vector, size_t newmax); + + void *(*toarray)(qvector_t *vector, size_t *size); + + void (*lock)(qvector_t *vector); + void (*unlock)(qvector_t *vector); + + void (*clear)(qvector_t *vector); + bool (*debug)(qvector_t *vector, FILE *out); + void (*free)(qvector_t *vector); + + void (*reverse)(qvector_t *vector); + bool (*getnext)(qvector_t *vector, qvector_obj_t *obj, bool newmem); + + /* private variables - do not access directly */ + void *qmutex; + void *data; + size_t num; /*number of elements*/ + size_t objsize; /*the size of each element*/ + size_t max; /*allocated number of elements*/ + int options; + size_t initnum; +}; + +struct qvector_obj_s { + void *data; + int index; +}; + +#ifdef __cplusplus +} +#endif + +#endif /* QVECTOR_H */ diff --git a/qlibc/2.4.8/include/qlibc/extensions/qaconf.h b/qlibc/2.4.8/include/qlibc/extensions/qaconf.h new file mode 100644 index 0000000000000000000000000000000000000000..53e6a58ceeaabdecd9a4bd06d2a598a547678de3 --- /dev/null +++ b/qlibc/2.4.8/include/qlibc/extensions/qaconf.h @@ -0,0 +1,229 @@ +/****************************************************************************** + * qLibc + * + * Copyright (c) 2010-2015 Seungyoung Kim. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + ******************************************************************************/ + +/** + * Apache-style Configuration File Parser. + * + * This is a qLibc extension implementing Apache-style configuration file + * parser. + * + * @file qaconf.h + */ + +#ifndef QACONF_H +#define QACONF_H + +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* types */ +typedef struct qaconf_s qaconf_t; +typedef struct qaconf_option_s qaconf_option_t; +typedef struct qaconf_cbdata_s qaconf_cbdata_t; +typedef char *(qaconf_cb_t) (qaconf_cbdata_t *data, void *userdata); + +/* public functions */ +extern qaconf_t *qaconf(void); + +/* user's callback function prototype */ +#define QAC_CB(func) char *func(qaconf_cbdata_t *data, void *userdata) +#define QAC_TAKEn(n) (n) + +/* parser option flags */ +enum { + QAC_CASEINSENSITIVE = (1), + QAC_IGNOREUNKNOWN = (2), // Ignore unknown option directives. +}; + +/** + * Argument type check + * + * uint32_t type 32bit variable is used for passing argument types. + * notused bool float int #arg + * ---- ---====== ---- --== ==== ---- ---- + * rrrr rrBb bbbb Ffff ffIi iiii aaaa aaaa (32bit mask) + * (6bit) (6bit) (6bit) (6bit) (8bit) + * + * r : Not Used + * B : Consider all arguments as BOOL type unless individually specified. + * b : Flaged argument(1~5) must be bool type. + * F : Consider all arguments as FLOAT type unless individually specified. + * f : Flaged argument(1~5) must be float type. + * I : Consider all arguments as INTEGER type unless individually specified. + * i : Flaged argument(1~5) must be integer type. + * a : Number of arguments (0~254). + * Value 255 means take any number of arguments. + * + * An option takes 1 argument. + * QAC_TAKE_STR <= String(any) type + * QAC_TAKE_INT <= Integer type + * QAC_TAKE_FLOAT <= Float type + * QAC_TAKE_BOOL <= Bool type + * + * QAC_TAKE1 <= equivalent to QAC_TAKE_STR + * QAC_TAKE1 | QAC_A1_BOOL <= equivalent to QAC_TAKE_BOOL + * + * An option takes 2 arguments, bool and float. + * QAC_TAKE2 | QAC_A1_BOOL | QAC_A2_FLOAT + * + * An option takes any number of arguments in any type. + * QAC_TAKEALL + * + * An option takes any number of arguments but 1st one must be bool and + * 2nd one must be integer and rest of them must be float. + * QAC_TAKEALL | QAC_A1_BOOL | QAC_A2_INT | QAC_AA_FLOAT + */ +enum qaconf_take { + // Define string(any) type argument. + QAC_A1_STR = 0, + QAC_A2_STR = 0, + QAC_A3_STR = 0, + QAC_A4_STR = 0, + QAC_A5_STR = 0, + QAC_AA_STR = 0, // All string unless individually specified. + + // Define integer type argument. + QAC_A1_INT = (1 << 8), + QAC_A2_INT = (QAC_A1_INT << 1), + QAC_A3_INT = (QAC_A1_INT << 2), + QAC_A4_INT = (QAC_A1_INT << 3), + QAC_A5_INT = (QAC_A1_INT << 4), + QAC_AA_INT = (QAC_A1_INT << 5), // All integer unless specified. + + // Define floating point type argument. + QAC_A1_FLOAT = (1 << 16), + QAC_A2_FLOAT = (QAC_A1_FLOAT << 1), + QAC_A3_FLOAT = (QAC_A1_FLOAT << 2), + QAC_A4_FLOAT = (QAC_A1_FLOAT << 3), + QAC_A5_FLOAT = (QAC_A1_FLOAT << 4), + QAC_AA_FLOAT = (QAC_A1_FLOAT << 5), // All float unless specified. + + // Define bool(true/false, yes/no, on/off, 1/0) type argument. + QAC_A1_BOOL = (1 << 24), + QAC_A2_BOOL = (QAC_A1_BOOL << 1), + QAC_A3_BOOL = (QAC_A1_BOOL << 2), + QAC_A4_BOOL = (QAC_A1_BOOL << 3), + QAC_A5_BOOL = (QAC_A1_BOOL << 4), + QAC_AA_BOOL = (QAC_A1_BOOL << 5), // All bool unless specified. + + // Number of arguments to take + QAC_TAKENONE = QAC_TAKEn(0), + QAC_TAKE0 = QAC_TAKENONE, + QAC_TAKE1 = QAC_TAKEn(1), + QAC_TAKE2 = QAC_TAKEn(2), + QAC_TAKE3 = QAC_TAKEn(3), + QAC_TAKE4 = QAC_TAKEn(4), + QAC_TAKE5 = QAC_TAKEn(5), + // use QAC_TAKEn(N) macro for 6~254 arguments. + QAC_TAKEALL = 0xFF, // Take any number of elements. (0 ~ INT_MAX) + + // Convenient synonyms + QAC_TAKE_STR = (QAC_TAKE1 | QAC_A1_STR), + QAC_TAKE_INT = (QAC_TAKE1 | QAC_A1_INT), + QAC_TAKE_FLOAT = (QAC_TAKE1 | QAC_A1_FLOAT), + QAC_TAKE_BOOL = (QAC_TAKE1 | QAC_A1_BOOL), +}; +#define QAC_TAKEn(n) (n) + +/* pre-defined sections */ +enum qaconf_section { + QAC_SECTION_ALL = (0), /* pre-defined */ + QAC_SECTION_ROOT = (1) /* pre-defined */ +}; + +/* option type */ +enum qaconf_otype { + QAC_OTYPE_OPTION = 0, /* general option */ + QAC_OTYPE_SECTIONOPEN = 1, /* section open */ + QAC_OTYPE_SECTIONCLOSE = 2 /* section close */ +}; + +/** + * qaconf_t object. + */ +struct qaconf_s { + /* capsulated member functions */ + int (*addoptions) (qaconf_t *qaconf, const qaconf_option_t *options); + void (*setdefhandler) (qaconf_t *qaconf, qaconf_cb_t *callback); + void (*setuserdata) (qaconf_t *qaconf, const void *userdata); + int (*parse) (qaconf_t *qaconf, const char *filepath, uint8_t flags); + const char *(*errmsg) (qaconf_t *qaconf); + void (*reseterror) (qaconf_t *qaconf); + void (*free) (qaconf_t *qaconf); + + /* private variables - do not access directly */ + int numoptions; /*!< a number of user defined options */ + qaconf_option_t *options; /*!< option data */ + + qaconf_cb_t *defcb; /*!< default callback for unregistered option */ + void *userdata; /*!< userdata */ + + char *filepath; /*!< current processing file's path */ + int lineno; /*!< current processing line number */ + + char *errstr; /*!< last error string */ +}; + +/** + * structure for user option definition. + */ +struct qaconf_option_s { + char *name; /*!< name of option. */ + uint32_t take; /*!< number of arguments and type checking */ + qaconf_cb_t *cb; /*!< callback function */ + uint64_t sectionid; /*!< sectionid if this is a section */ + uint64_t sections; /*!< ORed sectionid(s) where this option is allowed */ +}; +#define QAC_OPTION_END {NULL, 0, NULL, 0, 0} + +/** + * callback data structure. + */ +struct qaconf_cbdata_s { + enum qaconf_otype otype; /*!< option type */ + uint64_t section; /*!< current section where this option is located */ + uint64_t sections; /*!< ORed all parent's sectionid(s) including current sections */ + uint8_t level; /*!< number of parents(level), root level is 0 */ + qaconf_cbdata_t *parent; /*!< upper parent link */ + + int argc; /*!< number arguments. always equal or greater than 1. */ + char **argv; /*!< argument pointers. argv[0] is option name. */ + + void *data; /*!< where actual data is stored */ +}; + +#ifdef __cplusplus +} +#endif + +#endif /* QACONF_H */ diff --git a/qlibc/2.4.8/include/qlibc/extensions/qconfig.h b/qlibc/2.4.8/include/qlibc/extensions/qconfig.h new file mode 100644 index 0000000000000000000000000000000000000000..feea277987655034e2023fdd7f31af16dee6003c --- /dev/null +++ b/qlibc/2.4.8/include/qlibc/extensions/qconfig.h @@ -0,0 +1,57 @@ +/****************************************************************************** + * qLibc + * + * Copyright (c) 2010-2015 Seungyoung Kim. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + ******************************************************************************/ + +/** + * INI-style Configuration File Parser. + * + * This is a qLibc extension implementing INI-style configuration file parser. + * + * @file qconfig.h + */ + +#ifndef QCONFIG_H +#define QCONFIG_H + +#include +#include +#include +#include "../containers/qlisttbl.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* public functions */ +extern qlisttbl_t *qconfig_parse_file(qlisttbl_t *tbl, const char *filepath, char sepchar); +extern qlisttbl_t *qconfig_parse_str(qlisttbl_t *tbl, const char *str, char sepchar); + +#ifdef __cplusplus +} +#endif + +#endif /* QCONFIG_H */ diff --git a/qlibc/2.4.8/include/qlibc/extensions/qdatabase.h b/qlibc/2.4.8/include/qlibc/extensions/qdatabase.h new file mode 100644 index 0000000000000000000000000000000000000000..1101731dcac72376b82ac0f07aada1cd59952b4b --- /dev/null +++ b/qlibc/2.4.8/include/qlibc/extensions/qdatabase.h @@ -0,0 +1,140 @@ +/****************************************************************************** + * qLibc + * + * Copyright (c) 2010-2015 Seungyoung Kim. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + ******************************************************************************/ + +/** + * Generic database interface. + * + * This is a qLibc extension implementing generic database interface. + * For now, it supports only MySQL database. + * + * @file qdatabase.h + */ + +#ifndef QDATABASE_H +#define QDATABASE_H + +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* database header files should be included before this header file. */ +#ifdef _mysql_h +#define Q_ENABLE_MYSQL (1) +#endif /* _mysql_h */ + +/* types */ +typedef struct qdbresult_s qdbresult_t; +typedef struct qdb_s qdb_t; + +/* public functions */ +extern qdb_t *qdb(const char *dbtype, + const char *addr, int port, const char *database, + const char *username, const char *password, bool autocommit); + +/** + * qdbresult object structure + */ +struct qdbresult_s { + /* encapsulated member functions */ + const char *(*getstr) (qdbresult_t *result, const char *field); + const char *(*get_str_at) (qdbresult_t *result, int idx); + int (*getint) (qdbresult_t *result, const char *field); + int (*get_int_at) (qdbresult_t *result, int idx); + bool (*getnext) (qdbresult_t *result); + + int (*get_cols) (qdbresult_t *result); + int (*get_rows) (qdbresult_t *result); + int (*get_row) (qdbresult_t *result); + + void (*free) (qdbresult_t *result); + +#ifdef Q_ENABLE_MYSQL + /* private variables for mysql database - do not access directly */ + bool fetchtype; + MYSQL_RES *rs; + MYSQL_FIELD *fields; + MYSQL_ROW row; + int cols; + int cursor; +#endif +}; + +/* qdb object structure */ +struct qdb_s { + /* encapsulated member functions */ + bool (*open) (qdb_t *db); + bool (*close) (qdb_t *db); + + int (*execute_update) (qdb_t *db, const char *query); + int (*execute_updatef) (qdb_t *db, const char *format, ...); + + qdbresult_t *(*execute_query) (qdb_t *db, const char *query); + qdbresult_t *(*execute_queryf) (qdb_t *db, const char *format, ...); + + bool (*begin_tran) (qdb_t *db); + bool (*end_tran) (qdb_t *db, bool commit); + bool (*commit) (qdb_t *db); + bool (*rollback) (qdb_t *db); + + bool (*set_fetchtype) (qdb_t *db, bool fromdb); + bool (*get_conn_status) (qdb_t *db); + bool (*ping) (qdb_t *db); + const char *(*get_error) (qdb_t *db, unsigned int *errorno); + void (*free) (qdb_t *db); + + /* private variables - do not access directly */ + void *qmutex; + + bool connected; /*!< if opened true, if closed false */ + + struct { + char *dbtype; + char *addr; + int port; + char *username; + char *password; + char *database; + bool autocommit; + bool fetchtype; + } info; /*!< database connection information */ + +#ifdef Q_ENABLE_MYSQL + /* private variables for mysql database - do not access directly */ + MYSQL *mysql; +#endif +}; + +#ifdef __cplusplus +} +#endif + +#endif /* QDATABASE_H */ diff --git a/qlibc/2.4.8/include/qlibc/extensions/qhttpclient.h b/qlibc/2.4.8/include/qlibc/extensions/qhttpclient.h new file mode 100644 index 0000000000000000000000000000000000000000..3883d02f1dc70bd945d71cf6c52f862d431a3b76 --- /dev/null +++ b/qlibc/2.4.8/include/qlibc/extensions/qhttpclient.h @@ -0,0 +1,121 @@ +/****************************************************************************** + * qLibc + * + * Copyright (c) 2010-2015 Seungyoung Kim. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + ******************************************************************************/ + +/** + * HTTP client. + * + * This is a qLibc extension implementing HTTP client. + * + * @file qhttpclient.h + */ + +#ifndef QHTTPCLIENT_H +#define QHTTPCLIENT_H + +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* types */ +typedef struct qhttpclient_s qhttpclient_t; + +/* constants */ +#define QHTTPCLIENT_NAME "qLibc" + +/* public functions */ +extern qhttpclient_t *qhttpclient(const char *hostname, int port); + +/** + * qhttpclient object structure + */ +struct qhttpclient_s { + /* encapsulated member functions */ + bool (*setssl) (qhttpclient_t *client); + void (*settimeout) (qhttpclient_t *client, int timeoutms); + void (*setkeepalive) (qhttpclient_t *client, bool keepalive); + void (*setuseragent) (qhttpclient_t *client, const char *useragent); + + bool (*open) (qhttpclient_t *client); + + bool (*head) (qhttpclient_t *client, const char *uri, int *rescode, + qlisttbl_t *reqheaders, qlisttbl_t *resheaders); + bool (*get) (qhttpclient_t *client, const char *uri, int fd, + off_t *savesize, int *rescode, + qlisttbl_t *reqheaders, qlisttbl_t *resheaders, + bool (*callback) (void *userdata, off_t recvbytes), + void *userdata); + bool (*put) (qhttpclient_t *client, const char *uri, int fd, + off_t length, int *retcode, qlisttbl_t *userheaders, + qlisttbl_t *resheaders, + bool (*callback) (void *userdata, off_t sentbytes), + void *userdata); + void *(*cmd) (qhttpclient_t *client, + const char *method, const char *uri, + void *data, size_t size, int *rescode, + size_t *contentslength, + qlisttbl_t *reqheaders, qlisttbl_t *resheaders); + + bool (*sendrequest) (qhttpclient_t *client, const char *method, + const char *uri, qlisttbl_t *reqheaders); + int (*readresponse) (qhttpclient_t *client, qlisttbl_t *resheaders, + off_t *contentlength); + + ssize_t (*gets) (qhttpclient_t *client, char *buf, size_t bufsize); + ssize_t (*read) (qhttpclient_t *client, void *buf, size_t nbytes); + ssize_t (*write) (qhttpclient_t *client, const void *buf, + size_t nbytes); + off_t (*recvfile) (qhttpclient_t *client, int fd, off_t nbytes); + off_t (*sendfile) (qhttpclient_t *client, int fd, off_t nbytes); + + bool (*close) (qhttpclient_t *client); + void (*free) (qhttpclient_t *client); + + /* private variables - do not access directly */ + int socket; /*!< socket descriptor */ + void *ssl; /*!< will be used if SSL has been enabled at compile time */ + + struct sockaddr_in addr; + char *hostname; + int port; + + int timeoutms; /*< wait timeout milliseconds*/ + bool keepalive; /*< keep-alive flag */ + char *useragent; /*< user-agent name */ + + bool connclose; /*< response keep-alive flag for a last request */ +}; + +#ifdef __cplusplus +} +#endif + +#endif /* QHTTPCLIENT_H */ diff --git a/qlibc/2.4.8/include/qlibc/extensions/qlog.h b/qlibc/2.4.8/include/qlibc/extensions/qlog.h new file mode 100644 index 0000000000000000000000000000000000000000..89f0b96f2a59831f72b30b30bc85c679a7f88f52 --- /dev/null +++ b/qlibc/2.4.8/include/qlibc/extensions/qlog.h @@ -0,0 +1,91 @@ +/****************************************************************************** + * qLibc + * + * Copyright (c) 2010-2015 Seungyoung Kim. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + ******************************************************************************/ + +/** + * Rotating file logger. + * + * This is a qLibc extension implementing application level auto-rotating file + * logger. + * + * @file qlog.h + */ + +#ifndef QLOG_H +#define QLOG_H + +#include +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* types */ +typedef struct qlog_s qlog_t; + +/* constants */ +#define QLOG_OPT_THREADSAFE (0x01) +#define QLOG_OPT_FLUSH (0x01 << 1) + +/* public functions */ +extern qlog_t *qlog(const char *filepathfmt, mode_t mode, int rotateinterval, int options); + +/** + * qlog structure object structure + */ +struct qlog_s { + /* encapsulated member functions */ + bool (*write) (qlog_t *log, const char *str); + bool (*writef) (qlog_t *log, const char *format, ...); + bool (*duplicate) (qlog_t *log, FILE *outfp, bool flush); + bool (*flush) (qlog_t *log); + void (*free) (qlog_t *log); + + /* private variables - do not access directly */ + void *qmutex; /*!< activated if compiled with --enable-threadsafe */ + + char filepathfmt[PATH_MAX]; /*!< file file naming format like + /somepath/daily-%Y%m%d.log */ + char filepath[PATH_MAX]; /*!< generated system path of log file */ + FILE *fp; /*!< file pointer of logpath */ + mode_t mode; /*!< file mode */ + int rotateinterval; /*!< log file will be rotate in this interval seconds */ + int nextrotate; /*!< next rotate universal time, seconds */ + bool logflush; /*!< flag for immediate flushing */ + + FILE *outfp; /*!< stream pointer for duplication */ + bool outflush; /*!< flag for immediate flushing for duplicated stream */ +}; + +#ifdef __cplusplus +} +#endif + +#endif /* QLOG_H */ diff --git a/qlibc/2.4.8/include/qlibc/extensions/qtokenbucket.h b/qlibc/2.4.8/include/qlibc/extensions/qtokenbucket.h new file mode 100644 index 0000000000000000000000000000000000000000..1402cc9ecd85ff4cae27836a5d72cc800828a0fe --- /dev/null +++ b/qlibc/2.4.8/include/qlibc/extensions/qtokenbucket.h @@ -0,0 +1,70 @@ +/****************************************************************************** + * qLibc + * + * Copyright (c) 2010-2015 Seungyoung Kim. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + ******************************************************************************/ + +/** + * Rotating file logger. + * + * This is a qLibc extension implementing application level auto-rotating file + * logger. + * + * @file qtokenbucket.h + */ + +#ifndef QTOKENBUCKET_H +#define QTOKENBUCKET_H + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* types */ +typedef struct qtokenbucket_s qtokenbucket_t; + +/* public functions */ +extern void qtokenbucket_init(qtokenbucket_t *bucket, int init_tokens, + int max_tokens, int tokens_per_sec); +extern bool qtokenbucket_consume(qtokenbucket_t *bucket, int tokens); +extern long qtokenbucket_waittime(qtokenbucket_t *bucket, int tokens); + +/** + * qtokenbucket internal data structure + */ +struct qtokenbucket_s { + double tokens; /*!< current number of tokens. */ + int max_tokens; /*!< maximum number of tokens. */ + int tokens_per_sec; /*!< fill rate per second. */ + long last_fill; /*!< last refill time in Millisecond. */ +}; + +#ifdef __cplusplus +} +#endif + +#endif /* QTOKENBUCKET_H */ diff --git a/qlibc/2.4.8/include/qlibc/ipc/qsem.h b/qlibc/2.4.8/include/qlibc/ipc/qsem.h new file mode 100644 index 0000000000000000000000000000000000000000..892b68d1dbed0b4439c4355f5ddd13a50dd4563d --- /dev/null +++ b/qlibc/2.4.8/include/qlibc/ipc/qsem.h @@ -0,0 +1,56 @@ +/****************************************************************************** + * qLibc + * + * Copyright (c) 2010-2015 Seungyoung Kim. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +/** + * qsem header file. + * + * @file qsem.h + */ + +#ifndef QSEM_H +#define QSEM_H + +#ifdef __cplusplus +extern "C" { +#endif + +extern int qsem_init(const char *keyfile, int keyid, int nsems, bool recreate); +extern int qsem_getid(const char *keyfile, int keyid); +extern bool qsem_enter(int semid, int semno); +extern bool qsem_enter_nowait(int semid, int semno); +extern bool qsem_enter_force(int semid, int semno, int maxwaitms, + bool *forceflag); +extern bool qsem_leave(int semid, int semno); +extern bool qsem_check(int semid, int semno); +extern bool qsem_free(int semid); + +#ifdef __cplusplus +} +#endif + +#endif /* QSEM_H */ diff --git a/qlibc/2.4.8/include/qlibc/ipc/qshm.h b/qlibc/2.4.8/include/qlibc/ipc/qshm.h new file mode 100644 index 0000000000000000000000000000000000000000..4ae39ad6bb7a0fc0b8433ba0aae3811c73da70fb --- /dev/null +++ b/qlibc/2.4.8/include/qlibc/ipc/qshm.h @@ -0,0 +1,52 @@ +/****************************************************************************** + * qLibc + * + * Copyright (c) 2010-2015 Seungyoung Kim. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +/** + * qshm header file. + * + * @file qshm.h + */ + +#ifndef QSHM_H +#define QSHM_H + +#ifdef __cplusplus +extern "C" { +#endif + +extern int qshm_init(const char *keyfile, int keyid, size_t size, + bool recreate); +extern int qshm_getid(const char *keyfile, int keyid); +extern void *qshm_get(int shmid); +extern bool qshm_free(int shmid); + +#ifdef __cplusplus +} +#endif + +#endif /* QSHM_H */ diff --git a/qlibc/2.4.8/include/qlibc/qlibc.h b/qlibc/2.4.8/include/qlibc/qlibc.h new file mode 100644 index 0000000000000000000000000000000000000000..d8d18876e8b16a982dbad311cf13d02c8c514307 --- /dev/null +++ b/qlibc/2.4.8/include/qlibc/qlibc.h @@ -0,0 +1,65 @@ +/****************************************************************************** + * qLibc + * + * Copyright (c) 2010-2015 Seungyoung Kim. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +/** + * qlibc header file. + * + * @file qlibc.h + */ + +#ifndef QLIBC_H +#define QLIBC_H + +/* containers */ +#include "containers/qtreetbl.h" +#include "containers/qhashtbl.h" +#include "containers/qhasharr.h" +#include "containers/qlisttbl.h" +#include "containers/qlist.h" +#include "containers/qvector.h" +#include "containers/qqueue.h" +#include "containers/qstack.h" +#include "containers/qgrow.h" + +/* utilities */ +#include "utilities/qcount.h" +#include "utilities/qencode.h" +#include "utilities/qfile.h" +#include "utilities/qhash.h" +#include "utilities/qio.h" +#include "utilities/qsocket.h" +#include "utilities/qstring.h" +#include "utilities/qsystem.h" +#include "utilities/qtime.h" + +/* ipc */ +#include "ipc/qsem.h" +#include "ipc/qshm.h" + +#endif /* QLIBC_H */ + diff --git a/qlibc/2.4.8/include/qlibc/qlibcext.h b/qlibc/2.4.8/include/qlibc/qlibcext.h new file mode 100644 index 0000000000000000000000000000000000000000..42c922a270eae5ce8ff7a4c4388f7d5dc7933d1b --- /dev/null +++ b/qlibc/2.4.8/include/qlibc/qlibcext.h @@ -0,0 +1,45 @@ +/****************************************************************************** + * qLibc + * + * Copyright (c) 2010-2015 Seungyoung Kim. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +/** + * qlibc extension header file. + * + * @file qlibcext.h + */ + +#ifndef QLIBCEXT_H +#define QLIBCEXT_H + +#include "extensions/qconfig.h" +#include "extensions/qaconf.h" +#include "extensions/qlog.h" +#include "extensions/qhttpclient.h" +#include "extensions/qdatabase.h" +#include "extensions/qtokenbucket.h" + +#endif /* QLIBCEXT_H */ diff --git a/qlibc/2.4.8/include/qlibc/utilities/qcount.h b/qlibc/2.4.8/include/qlibc/utilities/qcount.h new file mode 100644 index 0000000000000000000000000000000000000000..f110cb4d1edc8d1243dc86354ca08c14d474831d --- /dev/null +++ b/qlibc/2.4.8/include/qlibc/utilities/qcount.h @@ -0,0 +1,54 @@ +/****************************************************************************** + * qLibc + * + * Copyright (c) 2010-2015 Seungyoung Kim. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +/** + * qcount header file. + * + * @file qcount.h + */ + +#ifndef QCOUNT_H +#define QCOUNT_H + +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +extern int64_t qcount_read(const char *filepath); +extern bool qcount_save(const char *filepath, int64_t number); +extern int64_t qcount_update(const char *filepath, int64_t number); + +#ifdef __cplusplus +} +#endif + +#endif /* QCOUNT_H */ diff --git a/qlibc/2.4.8/include/qlibc/utilities/qencode.h b/qlibc/2.4.8/include/qlibc/utilities/qencode.h new file mode 100644 index 0000000000000000000000000000000000000000..4c8305e76fee45f51231effe134495cb2d75b8ae --- /dev/null +++ b/qlibc/2.4.8/include/qlibc/utilities/qencode.h @@ -0,0 +1,59 @@ +/****************************************************************************** + * qLibc + * + * Copyright (c) 2010-2015 Seungyoung Kim. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +/** + * qencode header file. + * + * @file qencode.h + */ + +#ifndef QENCODE_H +#define QENCODE_H + +#include +#include +#include "../containers/qlisttbl.h" + +#ifdef __cplusplus +extern "C" { +#endif + +extern qlisttbl_t *qparse_queries(qlisttbl_t *tbl, const char *query, + char equalchar, char sepchar, int *count); +extern char *qurl_encode(const void *bin, size_t size); +extern size_t qurl_decode(char *str); +extern char *qbase64_encode(const void *bin, size_t size); +extern size_t qbase64_decode(char *str); +extern char *qhex_encode(const void *bin, size_t size); +extern size_t qhex_decode(char *str); + +#ifdef __cplusplus +} +#endif + +#endif /* QENCODE_H */ diff --git a/qlibc/2.4.8/include/qlibc/utilities/qfile.h b/qlibc/2.4.8/include/qlibc/utilities/qfile.h new file mode 100644 index 0000000000000000000000000000000000000000..d1121b52a49e7cc298c41b49b0953ac00ed26656 --- /dev/null +++ b/qlibc/2.4.8/include/qlibc/utilities/qfile.h @@ -0,0 +1,68 @@ +/****************************************************************************** + * qLibc + * + * Copyright (c) 2010-2015 Seungyoung Kim. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +/** + * qfile header file. + * + * @file qfile.h + */ + +#ifndef QFILE_H +#define QFILE_H + +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +extern bool qfile_lock(int fd); +extern bool qfile_unlock(int fd); +extern bool qfile_exist(const char *filepath); +extern void *qfile_load(const char *filepath, size_t *nbytes); +extern void *qfile_read(FILE *fp, size_t *nbytes); +extern ssize_t qfile_save(const char *filepath, const void *buf, size_t size, + bool append); +extern bool qfile_mkdir(const char *dirpath, mode_t mode, bool recursive); + +extern char *qfile_get_name(const char *filepath); +extern char *qfile_get_dir(const char *filepath); +extern char *qfile_get_ext(const char *filepath); +extern off_t qfile_get_size(const char *filepath); + +extern bool qfile_check_path(const char *path); +extern char *qfile_correct_path(char *path); +extern char *qfile_abspath(char *buf, size_t bufsize, const char *path); + +#ifdef __cplusplus +} +#endif + +#endif /* QFILE_H */ diff --git a/qlibc/2.4.8/include/qlibc/utilities/qhash.h b/qlibc/2.4.8/include/qlibc/utilities/qhash.h new file mode 100644 index 0000000000000000000000000000000000000000..251759ce3657ad7a890d612270c1c67df094027f --- /dev/null +++ b/qlibc/2.4.8/include/qlibc/utilities/qhash.h @@ -0,0 +1,61 @@ +/****************************************************************************** + * qLibc + * + * Copyright (c) 2010-2015 Seungyoung Kim. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +/** + * qhash header file. + * + * @file qhash.h + */ + +#ifndef QHASH_H +#define QHASH_H + +#include +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +extern bool qhashmd5(const void *data, size_t nbytes, void *retbuf); +extern bool qhashmd5_file(const char *filepath, off_t offset, ssize_t nbytes, + void *retbuf); + +extern uint32_t qhashfnv1_32(const void *data, size_t nbytes); +extern uint64_t qhashfnv1_64(const void *data, size_t nbytes); + +extern uint32_t qhashmurmur3_32(const void *data, size_t nbytes); +extern bool qhashmurmur3_128(const void *data, size_t nbytes, void *retbuf); + +#ifdef __cplusplus +} +#endif + +#endif /* QHASH_H */ diff --git a/qlibc/2.4.8/include/qlibc/utilities/qio.h b/qlibc/2.4.8/include/qlibc/utilities/qio.h new file mode 100644 index 0000000000000000000000000000000000000000..f26e734e4aa924f8f86cca0e3538afae44dbb112 --- /dev/null +++ b/qlibc/2.4.8/include/qlibc/utilities/qio.h @@ -0,0 +1,60 @@ +/****************************************************************************** + * qLibc + * + * Copyright (c) 2010-2015 Seungyoung Kim. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +/** + * qio header file. + * + * @file qio.h + */ + +#ifndef QIO_H +#define QIO_H + +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +extern int qio_wait_readable(int fd, int timeoutms); +extern int qio_wait_writable(int fd, int timeoutms); +extern ssize_t qio_read(int fd, void *buf, size_t nbytes, int timeoutms); +extern ssize_t qio_write(int fd, const void *data, size_t nbytes, + int timeoutms); +extern off_t qio_send(int outfd, int infd, off_t nbytes, int timeoutms); +extern ssize_t qio_gets(int fd, char *buf, size_t bufsize, int timeoutms); +extern ssize_t qio_puts(int fd, const char *str, int timeoutms); +extern ssize_t qio_printf(int fd, int timeoutms, const char *format, ...); + +#ifdef __cplusplus +} +#endif + +#endif /* QIO_H */ diff --git a/qlibc/2.4.8/include/qlibc/utilities/qsocket.h b/qlibc/2.4.8/include/qlibc/utilities/qsocket.h new file mode 100644 index 0000000000000000000000000000000000000000..700e3ddea4f492154d1feca81a5f50b51d539da7 --- /dev/null +++ b/qlibc/2.4.8/include/qlibc/utilities/qsocket.h @@ -0,0 +1,56 @@ +/****************************************************************************** + * qLibc + * + * Copyright (c) 2010-2015 Seungyoung Kim. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +/** + * qsocket header file. + * + * @file qsocket.h + */ + +#ifndef QSOCKET_H +#define QSOCKET_H + +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +extern int qsocket_open(const char *hostname, int port, int timeoutms); +extern bool qsocket_close(int sockfd, int timeoutms); +extern bool qsocket_get_addr(struct sockaddr_in *addr, const char *hostname, + int port); +extern char *qsocket_get_localaddr(char *buf, size_t bufsize); + +#ifdef __cplusplus +} +#endif + +#endif /* QSOCKET_H */ diff --git a/qlibc/2.4.8/include/qlibc/utilities/qstring.h b/qlibc/2.4.8/include/qlibc/utilities/qstring.h new file mode 100644 index 0000000000000000000000000000000000000000..3d4c16d840e2c8825f7e38f3d6f4a1a583e5e3a4 --- /dev/null +++ b/qlibc/2.4.8/include/qlibc/utilities/qstring.h @@ -0,0 +1,78 @@ +/****************************************************************************** + * qLibc + * + * Copyright (c) 2010-2015 Seungyoung Kim. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +/** + * qstring header file. + * + * @file qstring.h + */ + +#ifndef QSTRING_H +#define QSTRING_H + +#include +#include +#include "../containers/qlist.h" + +#ifdef __cplusplus +extern "C" { +#endif + +extern char *qstrtrim(char *str); +extern char *qstrtrim_head(char *str); +extern char *qstrtrim_tail(char *str); +extern char *qstrunchar(char *str, char head, char tail); +extern char *qstrreplace(const char *mode, char *srcstr, const char *tokstr, + const char *word); +extern char *qstrcpy(char *dst, size_t size, const char *src); +extern char *qstrncpy(char *dst, size_t size, const char *src, size_t nbytes); +extern char *qstrdupf(const char *format, ...); +extern char *qstrdup_between(const char *str, const char *start, + const char *end); +extern void *qmemdup(const void *data, size_t size); +extern char *qstrcatf(char *str, const char *format, ...); +extern char *qstrgets(char *buf, size_t size, char **offset); +extern char *qstrrev(char *str); +extern char *qstrupper(char *str); +extern char *qstrlower(char *str); +extern char *qstrtok(char *str, const char *delimiters, char *retstop, + int *offset); +extern qlist_t *qstrtokenizer(const char *str, const char *delimiters); +extern char *qstrunique(const char *seed); +extern char *qstr_comma_number(int number); +extern bool qstrtest(int (*testfunc)(int), const char *str); +extern bool qstr_is_email(const char *email); +extern bool qstr_is_ip4addr(const char *str); +extern char *qstr_conv_encoding(const char *fromstr, const char *fromcode, + const char *tocode, float mag); + +#ifdef __cplusplus +} +#endif + +#endif /* QSTRING_H */ diff --git a/qlibc/2.4.8/include/qlibc/utilities/qsystem.h b/qlibc/2.4.8/include/qlibc/utilities/qsystem.h new file mode 100644 index 0000000000000000000000000000000000000000..129eb626d8cb85bd90a14a18731eca5211055991 --- /dev/null +++ b/qlibc/2.4.8/include/qlibc/utilities/qsystem.h @@ -0,0 +1,49 @@ +/****************************************************************************** + * qLibc + * + * Copyright (c) 2010-2015 Seungyoung Kim. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +/** + * qsystem header file. + * + * @file qsystem.h + */ + +#ifndef QSYSTEM_H +#define QSYSTEM_H + +#ifdef __cplusplus +extern "C" { +#endif + +extern const char *qgetenv(const char *envname, const char *nullstr); +extern char *qsyscmd(const char *cmd); + +#ifdef __cplusplus +} +#endif + +#endif /* QSYSTEM_H */ diff --git a/qlibc/2.4.8/include/qlibc/utilities/qtime.h b/qlibc/2.4.8/include/qlibc/utilities/qtime.h new file mode 100644 index 0000000000000000000000000000000000000000..ecd2d588d2944f6ec989c9ccb920ca50e06b7ef3 --- /dev/null +++ b/qlibc/2.4.8/include/qlibc/utilities/qtime.h @@ -0,0 +1,67 @@ +/****************************************************************************** + * qLibc + * + * Copyright (c) 2010-2015 Seungyoung Kim. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +/** + * qtime header file. + * + * @file qtime.h + */ + +#ifndef QTIME_H +#define QTIME_H + +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +extern void qtime_timespec_diff(struct timespec t1, struct timespec t2, + struct timespec *diff); +extern void qtime_timeval_diff(struct timeval t1, struct timeval t2, + struct timeval *diff); + +extern long qtime_current_milli(void); + +extern char *qtime_localtime_strf(char *buf, int size, time_t utctime, + const char *format); +extern char *qtime_localtime_str(time_t utctime); +extern const char *qtime_localtime_staticstr(time_t utctime); +extern char *qtime_gmt_strf(char *buf, int size, time_t utctime, + const char *format); +extern char *qtime_gmt_str(time_t utctime); +extern const char *qtime_gmt_staticstr(time_t utctime); +extern time_t qtime_parse_gmtstr(const char *gmtstr); + +#ifdef __cplusplus +} +#endif + +#endif /* QTIME_H */ diff --git a/rsync/3.2.3/Linux-x86_64/Linux-x86_64.tar b/rsync/3.2.3/Linux-x86_64/Linux-x86_64.tar new file mode 100755 index 0000000000000000000000000000000000000000..200314a2a9037d28183fcc23e7521ea732d1516b Binary files /dev/null and b/rsync/3.2.3/Linux-x86_64/Linux-x86_64.tar differ diff --git a/rsync/3.2.3/Linux-x86_64/rsync b/rsync/3.2.3/Linux-x86_64/rsync new file mode 100755 index 0000000000000000000000000000000000000000..3a3f41dd1ddd54acc7b59908fb50ab5aa50823d1 Binary files /dev/null and b/rsync/3.2.3/Linux-x86_64/rsync differ diff --git a/rsync/3.2.3/Linux-x86_64_8/Linux-x86_64_8.tar b/rsync/3.2.3/Linux-x86_64_8/Linux-x86_64_8.tar new file mode 100644 index 0000000000000000000000000000000000000000..12be7875d20cd528e57d633081f311e3b6eb430a Binary files /dev/null and b/rsync/3.2.3/Linux-x86_64_8/Linux-x86_64_8.tar differ diff --git a/rsync/3.2.3/Linux-x86_64_8/rsync b/rsync/3.2.3/Linux-x86_64_8/rsync new file mode 100755 index 0000000000000000000000000000000000000000..d9d4675129096c1bbfe0e34930d9e7c432701d1b Binary files /dev/null and b/rsync/3.2.3/Linux-x86_64_8/rsync differ diff --git a/zmq/4.3.2/SunOS-sun4v/SunOS-sun4v.tar b/zmq/4.3.2/SunOS-sun4v/SunOS-sun4v.tar index de6de5a783b783c9be4ccd1b5827dbd4f2b7af85..35bae90ed7be85f292c9ceee2571ef44cca2f00b 100644 Binary files a/zmq/4.3.2/SunOS-sun4v/SunOS-sun4v.tar and b/zmq/4.3.2/SunOS-sun4v/SunOS-sun4v.tar differ diff --git a/zmq/4.3.2/SunOS-sun4v/libzmq.so.4.3.5 b/zmq/4.3.2/SunOS-sun4v/libzmq.so.4.3.5 deleted file mode 100755 index 0688fed5df451d7a6025a48a6cb47e2128400ba8..0000000000000000000000000000000000000000 Binary files a/zmq/4.3.2/SunOS-sun4v/libzmq.so.4.3.5 and /dev/null differ diff --git a/zmq/4.3.2/SunOS-sun4v/libzmq.so.5 b/zmq/4.3.2/SunOS-sun4v/libzmq.so.5 index b3d4b4e77df62679121c72b7785afce1fb4e5e38..973c25c985ca63735fe3be2f081bb1b6de5e12a2 120000 --- a/zmq/4.3.2/SunOS-sun4v/libzmq.so.5 +++ b/zmq/4.3.2/SunOS-sun4v/libzmq.so.5 @@ -1 +1 @@ -libzmq.so.4.3.5 \ No newline at end of file +libzmq.so.5.1.3 \ No newline at end of file diff --git a/zmq/4.3.2/SunOS-sun4v/libzmq.so.5.1.3 b/zmq/4.3.2/SunOS-sun4v/libzmq.so.5.1.3 new file mode 100755 index 0000000000000000000000000000000000000000..61f64333df4539880fe7166c8f03fff468fdacef Binary files /dev/null and b/zmq/4.3.2/SunOS-sun4v/libzmq.so.5.1.3 differ