From 0d2990d729820906ea66ec237c5378bed4843733 Mon Sep 17 00:00:00 2001 From: Growtopia Noobs Date: Mon, 24 Sep 2018 19:02:44 +0200 Subject: [PATCH] Adding all files --- README.md | 19 + enet server test.sln | 28 + enet server test/ReadMe.txt | 40 + enet server test/bcrypt.c | 206 + enet server test/bcrypt.h | 97 + enet server test/crypt_blowfish/LINKS | 29 + enet server test/crypt_blowfish/Makefile | 77 + enet server test/crypt_blowfish/PERFORMANCE | 30 + enet server test/crypt_blowfish/README | 68 + enet server test/crypt_blowfish/crypt.3 | 575 + enet server test/crypt_blowfish/crypt.h | 24 + .../crypt_blowfish/crypt_blowfish.c | 907 + .../crypt_blowfish/crypt_blowfish.h | 27 + .../crypt_blowfish/crypt_gensalt.c | 124 + .../crypt_blowfish/crypt_gensalt.h | 30 + .../crypt_blowfish/glibc-2.1.3-crypt.diff | 53 + .../crypt_blowfish/glibc-2.14-crypt.diff | 55 + .../crypt_blowfish/glibc-2.3.6-crypt.diff | 52 + enet server test/crypt_blowfish/ow-crypt.h | 43 + enet server test/crypt_blowfish/wrapper.c | 551 + enet server test/crypt_blowfish/x86.S | 203 + enet server test/enet server test.cpp | 3322 +++ enet server test/enet server test.vcxproj | 177 + .../enet server test.vcxproj.filters | 36 + enet server test/enet.lib | Bin 0 -> 51152 bytes enet server test/enet/callbacks.h | 27 + enet server test/enet/enet.h | 592 + enet server test/enet/list.h | 43 + enet server test/enet/protocol.h | 198 + enet server test/enet/time.h | 18 + enet server test/enet/types.h | 13 + enet server test/enet/unix.h | 47 + enet server test/enet/utility.h | 12 + enet server test/enet/win32.h | 57 + enet server test/enet2/CMakeLists.txt | 57 + enet server test/enet2/ChangeLog | 177 + enet server test/enet2/Doxyfile | 2303 ++ enet server test/enet2/DoxygenLayout.xml | 191 + enet server test/enet2/LICENSE | 7 + enet server test/enet2/Makefile.am | 22 + enet server test/enet2/Makefile.in | 884 + enet server test/enet2/README | 15 + enet server test/enet2/aclocal.m4 | 1154 + enet server test/enet2/callbacks.c | 53 + enet server test/enet2/compile | 347 + enet server test/enet2/compress.c | 654 + enet server test/enet2/config.guess | 1420 ++ enet server test/enet2/config.sub | 1799 ++ enet server test/enet2/configure | 13739 +++++++++++ enet server test/enet2/configure.ac | 26 + enet server test/enet2/depcomp | 791 + enet server test/enet2/docs/FAQ.dox | 24 + enet server test/enet2/docs/design.dox | 126 + .../enet2/docs/html/Downloads.html | 100 + enet server test/enet2/docs/html/FAQ.html | 103 + .../enet2/docs/html/FAQ_8dox.html | 105 + .../enet2/docs/html/Features.html | 131 + .../enet2/docs/html/IRCChannel.html | 98 + .../enet2/docs/html/Installation.html | 120 + enet server test/enet2/docs/html/License.html | 101 + .../enet2/docs/html/MailingList.html | 98 + .../enet2/docs/html/Tutorial.html | 327 + .../enet2/docs/html/annotated.html | 137 + enet server test/enet2/docs/html/bc_s.png | Bin 0 -> 642 bytes enet server test/enet2/docs/html/bdwn.png | Bin 0 -> 144 bytes .../enet2/docs/html/callbacks_8c.html | 146 + .../enet2/docs/html/callbacks_8h.html | 131 + enet server test/enet2/docs/html/closed.png | Bin 0 -> 134 bytes .../enet2/docs/html/compress_8c.html | 1007 + .../enet2/docs/html/design_8dox.html | 105 + .../dir_d44c64559bbebec7f509842c48db8b23.html | 107 + .../dir_fd6c3a2b8754f03ff2a62b53108cf6e2.html | 132 + enet server test/enet2/docs/html/doxygen.css | 1440 ++ enet server test/enet2/docs/html/doxygen.png | Bin 0 -> 3802 bytes .../enet2/docs/html/dynsections.js | 97 + enet server test/enet2/docs/html/enet_8h.html | 1201 + enet server test/enet2/docs/html/files.html | 129 + .../enet2/docs/html/ftv2blank.png | Bin 0 -> 86 bytes enet server test/enet2/docs/html/ftv2doc.png | Bin 0 -> 837 bytes .../enet2/docs/html/ftv2folderclosed.png | Bin 0 -> 621 bytes .../enet2/docs/html/ftv2folderopen.png | Bin 0 -> 673 bytes .../enet2/docs/html/ftv2lastnode.png | Bin 0 -> 86 bytes enet server test/enet2/docs/html/ftv2link.png | Bin 0 -> 837 bytes .../enet2/docs/html/ftv2mlastnode.png | Bin 0 -> 242 bytes .../enet2/docs/html/ftv2mnode.png | Bin 0 -> 242 bytes enet server test/enet2/docs/html/ftv2node.png | Bin 0 -> 86 bytes .../enet2/docs/html/ftv2plastnode.png | Bin 0 -> 221 bytes .../enet2/docs/html/ftv2pnode.png | Bin 0 -> 221 bytes .../enet2/docs/html/ftv2splitbar.png | Bin 0 -> 308 bytes .../enet2/docs/html/ftv2vertline.png | Bin 0 -> 86 bytes enet server test/enet2/docs/html/globals.html | 958 + .../enet2/docs/html/globals_defs.html | 311 + .../enet2/docs/html/globals_enum.html | 140 + .../enet2/docs/html/globals_eval.html | 426 + .../enet2/docs/html/globals_func.html | 408 + .../enet2/docs/html/globals_m.html | 125 + .../enet2/docs/html/globals_s.html | 125 + .../enet2/docs/html/globals_type.html | 148 + .../enet2/docs/html/group__Address.html | 263 + .../enet2/docs/html/group__Packet.html | 253 + .../enet2/docs/html/group__callbacks.html | 145 + .../enet2/docs/html/group__global.html | 219 + .../enet2/docs/html/group__host.html | 612 + .../enet2/docs/html/group__list.html | 231 + .../enet2/docs/html/group__peer.html | 852 + .../enet2/docs/html/group__private.html | 108 + .../enet2/docs/html/group__socket.html | 559 + enet server test/enet2/docs/html/host_8c.html | 160 + enet server test/enet2/docs/html/index.html | 108 + .../enet2/docs/html/install_8dox.html | 105 + enet server test/enet2/docs/html/jquery.js | 31 + .../enet2/docs/html/license_8dox.html | 105 + enet server test/enet2/docs/html/list_8c.html | 146 + enet server test/enet2/docs/html/list_8h.html | 289 + .../enet2/docs/html/mainpage_8dox.html | 105 + enet server test/enet2/docs/html/modules.html | 118 + enet server test/enet2/docs/html/nav_f.png | Bin 0 -> 179 bytes enet server test/enet2/docs/html/nav_g.png | Bin 0 -> 95 bytes enet server test/enet2/docs/html/nav_h.png | Bin 0 -> 101 bytes enet server test/enet2/docs/html/open.png | Bin 0 -> 118 bytes .../enet2/docs/html/packet_8c.html | 148 + enet server test/enet2/docs/html/peer_8c.html | 187 + .../enet2/docs/html/protocol_8c.html | 168 + .../enet2/docs/html/protocol_8h.html | 348 + .../enet2/docs/html/search/all_0.html | 26 + .../enet2/docs/html/search/all_0.js | 7 + .../enet2/docs/html/search/all_1.html | 26 + .../enet2/docs/html/search/all_1.js | 8 + .../enet2/docs/html/search/all_10.html | 26 + .../enet2/docs/html/search/all_10.js | 11 + .../enet2/docs/html/search/all_11.html | 26 + .../enet2/docs/html/search/all_11.js | 4 + .../enet2/docs/html/search/all_12.html | 26 + .../enet2/docs/html/search/all_12.js | 6 + .../enet2/docs/html/search/all_2.html | 26 + .../enet2/docs/html/search/all_2.js | 21 + .../enet2/docs/html/search/all_3.html | 26 + .../enet2/docs/html/search/all_3.js | 14 + .../enet2/docs/html/search/all_4.html | 26 + .../enet2/docs/html/search/all_4.js | 290 + .../enet2/docs/html/search/all_5.html | 26 + .../enet2/docs/html/search/all_5.js | 15 + .../enet2/docs/html/search/all_6.html | 26 + .../enet2/docs/html/search/all_6.js | 8 + .../enet2/docs/html/search/all_7.html | 26 + .../enet2/docs/html/search/all_7.js | 18 + .../enet2/docs/html/search/all_8.html | 26 + .../enet2/docs/html/search/all_8.js | 12 + .../enet2/docs/html/search/all_9.html | 26 + .../enet2/docs/html/search/all_9.js | 10 + .../enet2/docs/html/search/all_a.html | 26 + .../enet2/docs/html/search/all_a.js | 7 + .../enet2/docs/html/search/all_b.html | 26 + .../enet2/docs/html/search/all_b.js | 14 + .../enet2/docs/html/search/all_c.html | 26 + .../enet2/docs/html/search/all_c.js | 30 + .../enet2/docs/html/search/all_d.html | 26 + .../enet2/docs/html/search/all_d.js | 18 + .../enet2/docs/html/search/all_e.html | 26 + .../enet2/docs/html/search/all_e.js | 17 + .../enet2/docs/html/search/all_f.html | 26 + .../enet2/docs/html/search/all_f.js | 18 + .../enet2/docs/html/search/classes_0.html | 26 + .../enet2/docs/html/search/classes_0.js | 31 + .../enet2/docs/html/search/close.png | Bin 0 -> 273 bytes .../enet2/docs/html/search/defines_0.html | 26 + .../enet2/docs/html/search/defines_0.js | 58 + .../enet2/docs/html/search/defines_1.html | 26 + .../enet2/docs/html/search/defines_1.js | 4 + .../enet2/docs/html/search/enums_0.html | 26 + .../enet2/docs/html/search/enums_0.js | 12 + .../enet2/docs/html/search/enumvalues_0.html | 26 + .../enet2/docs/html/search/enumvalues_0.js | 105 + .../enet2/docs/html/search/files_0.html | 26 + .../enet2/docs/html/search/files_0.js | 6 + .../enet2/docs/html/search/files_1.html | 26 + .../enet2/docs/html/search/files_1.js | 4 + .../enet2/docs/html/search/files_2.html | 26 + .../enet2/docs/html/search/files_2.js | 4 + .../enet2/docs/html/search/files_3.html | 26 + .../enet2/docs/html/search/files_3.js | 4 + .../enet2/docs/html/search/files_4.html | 26 + .../enet2/docs/html/search/files_4.js | 4 + .../enet2/docs/html/search/files_5.html | 26 + .../enet2/docs/html/search/files_5.js | 4 + .../enet2/docs/html/search/files_6.html | 26 + .../enet2/docs/html/search/files_6.js | 6 + .../enet2/docs/html/search/files_7.html | 26 + .../enet2/docs/html/search/files_7.js | 4 + .../enet2/docs/html/search/files_8.html | 26 + .../enet2/docs/html/search/files_8.js | 7 + .../enet2/docs/html/search/files_9.html | 26 + .../enet2/docs/html/search/files_9.js | 6 + .../enet2/docs/html/search/files_a.html | 26 + .../enet2/docs/html/search/files_a.js | 6 + .../enet2/docs/html/search/files_b.html | 26 + .../enet2/docs/html/search/files_b.js | 5 + .../enet2/docs/html/search/functions_0.html | 26 + .../enet2/docs/html/search/functions_0.js | 75 + .../enet2/docs/html/search/groups_0.html | 26 + .../enet2/docs/html/search/groups_0.js | 12 + .../enet2/docs/html/search/mag_sel.png | Bin 0 -> 563 bytes .../enet2/docs/html/search/nomatches.html | 12 + .../enet2/docs/html/search/pages_0.html | 26 + .../enet2/docs/html/search/pages_0.js | 4 + .../enet2/docs/html/search/pages_1.html | 26 + .../enet2/docs/html/search/pages_1.js | 4 + .../enet2/docs/html/search/pages_2.html | 26 + .../enet2/docs/html/search/pages_2.js | 5 + .../enet2/docs/html/search/pages_3.html | 26 + .../enet2/docs/html/search/pages_3.js | 5 + .../enet2/docs/html/search/pages_4.html | 26 + .../enet2/docs/html/search/pages_4.js | 4 + .../enet2/docs/html/search/pages_5.html | 26 + .../enet2/docs/html/search/pages_5.js | 4 + .../enet2/docs/html/search/pages_6.html | 26 + .../enet2/docs/html/search/pages_6.js | 4 + .../enet2/docs/html/search/search.css | 271 + .../enet2/docs/html/search/search.js | 813 + .../enet2/docs/html/search/search_l.png | Bin 0 -> 604 bytes .../enet2/docs/html/search/search_m.png | Bin 0 -> 158 bytes .../enet2/docs/html/search/search_r.png | Bin 0 -> 612 bytes .../enet2/docs/html/search/typedefs_0.html | 26 + .../enet2/docs/html/search/typedefs_0.js | 13 + .../enet2/docs/html/search/typedefs_1.html | 26 + .../enet2/docs/html/search/typedefs_1.js | 4 + .../enet2/docs/html/search/variables_0.html | 26 + .../enet2/docs/html/search/variables_0.js | 7 + .../enet2/docs/html/search/variables_1.html | 26 + .../enet2/docs/html/search/variables_1.js | 8 + .../enet2/docs/html/search/variables_10.html | 26 + .../enet2/docs/html/search/variables_10.js | 8 + .../enet2/docs/html/search/variables_11.html | 26 + .../enet2/docs/html/search/variables_11.js | 4 + .../enet2/docs/html/search/variables_12.html | 26 + .../enet2/docs/html/search/variables_12.js | 4 + .../enet2/docs/html/search/variables_2.html | 26 + .../enet2/docs/html/search/variables_2.js | 18 + .../enet2/docs/html/search/variables_3.html | 26 + .../enet2/docs/html/search/variables_3.js | 12 + .../enet2/docs/html/search/variables_4.html | 26 + .../enet2/docs/html/search/variables_4.js | 5 + .../enet2/docs/html/search/variables_5.html | 26 + .../enet2/docs/html/search/variables_5.js | 12 + .../enet2/docs/html/search/variables_6.html | 26 + .../enet2/docs/html/search/variables_6.js | 7 + .../enet2/docs/html/search/variables_7.html | 26 + .../enet2/docs/html/search/variables_7.js | 15 + .../enet2/docs/html/search/variables_8.html | 26 + .../enet2/docs/html/search/variables_8.js | 8 + .../enet2/docs/html/search/variables_9.html | 26 + .../enet2/docs/html/search/variables_9.js | 7 + .../enet2/docs/html/search/variables_a.html | 26 + .../enet2/docs/html/search/variables_a.js | 7 + .../enet2/docs/html/search/variables_b.html | 26 + .../enet2/docs/html/search/variables_b.js | 14 + .../enet2/docs/html/search/variables_c.html | 26 + .../enet2/docs/html/search/variables_c.js | 26 + .../enet2/docs/html/search/variables_d.html | 26 + .../enet2/docs/html/search/variables_d.js | 18 + .../enet2/docs/html/search/variables_e.html | 26 + .../enet2/docs/html/search/variables_e.js | 16 + .../enet2/docs/html/search/variables_f.html | 26 + .../enet2/docs/html/search/variables_f.js | 14 + .../docs/html/structENetAcknowledgement.html | 159 + .../enet2/docs/html/structENetAddress.html | 151 + .../enet2/docs/html/structENetBuffer.html | 146 + .../enet2/docs/html/structENetCallbacks.html | 159 + .../enet2/docs/html/structENetChannel.html | 229 + .../enet2/docs/html/structENetCompressor.html | 194 + .../enet2/docs/html/structENetEvent.html | 208 + .../enet2/docs/html/structENetHost.html | 693 + .../docs/html/structENetIncomingCommand.html | 229 + .../enet2/docs/html/structENetList.html | 131 + .../enet2/docs/html/structENetListNode.html | 145 + .../docs/html/structENetOutgoingCommand.html | 271 + .../enet2/docs/html/structENetPacket.html | 229 + .../enet2/docs/html/structENetPeer.html | 984 + .../html/structENetProtocolAcknowledge.html | 159 + .../structENetProtocolBandwidthLimit.html | 159 + .../html/structENetProtocolCommandHeader.html | 159 + .../docs/html/structENetProtocolConnect.html | 313 + .../html/structENetProtocolDisconnect.html | 145 + .../docs/html/structENetProtocolHeader.html | 145 + .../docs/html/structENetProtocolPing.html | 131 + .../html/structENetProtocolSendFragment.html | 215 + .../html/structENetProtocolSendReliable.html | 145 + .../structENetProtocolSendUnreliable.html | 159 + .../structENetProtocolSendUnsequenced.html | 159 + .../structENetProtocolThrottleConfigure.html | 173 + .../html/structENetProtocolVerifyConnect.html | 299 + enet server test/enet2/docs/html/sync_off.png | Bin 0 -> 848 bytes enet server test/enet2/docs/html/sync_on.png | Bin 0 -> 842 bytes enet server test/enet2/docs/html/tab_a.png | Bin 0 -> 124 bytes enet server test/enet2/docs/html/tab_b.png | Bin 0 -> 183 bytes enet server test/enet2/docs/html/tab_h.png | Bin 0 -> 177 bytes enet server test/enet2/docs/html/tab_s.png | Bin 0 -> 190 bytes enet server test/enet2/docs/html/tabs.css | 60 + enet server test/enet2/docs/html/time_8h.html | 275 + .../enet2/docs/html/tutorial_8dox.html | 105 + .../enet2/docs/html/types_8h.html | 172 + .../enet2/docs/html/unionENetProtocol.html | 285 + enet server test/enet2/docs/html/unix_8c.html | 285 + enet server test/enet2/docs/html/unix_8h.html | 394 + .../enet2/docs/html/usergroup0.html | 111 + .../enet2/docs/html/utility_8h.html | 177 + .../enet2/docs/html/win32_8c.html | 110 + .../enet2/docs/html/win32_8h.html | 378 + enet server test/enet2/docs/install.dox | 63 + enet server test/enet2/docs/license.dox | 26 + enet server test/enet2/docs/mainpage.dox | 59 + enet server test/enet2/docs/tutorial.dox | 366 + enet server test/enet2/enet.dsp | 168 + enet server test/enet2/enet.lib | Bin 0 -> 51152 bytes enet server test/enet2/enet64.lib | Bin 0 -> 55890 bytes enet server test/enet2/enet_dll.cbp | 86 + enet server test/enet2/host.c | 492 + .../enet2/include/enet/callbacks.h | 27 + enet server test/enet2/include/enet/enet.h | 592 + enet server test/enet2/include/enet/list.h | 43 + .../enet2/include/enet/protocol.h | 198 + enet server test/enet2/include/enet/time.h | 18 + enet server test/enet2/include/enet/types.h | 13 + enet server test/enet2/include/enet/unix.h | 47 + enet server test/enet2/include/enet/utility.h | 12 + enet server test/enet2/include/enet/win32.h | 57 + enet server test/enet2/install-sh | 527 + enet server test/enet2/libenet.pc.in | 10 + enet server test/enet2/list.c | 75 + enet server test/enet2/ltmain.sh | 9661 ++++++++ enet server test/enet2/m4/.keep | 0 enet server test/enet2/m4/libtool.m4 | 7997 +++++++ enet server test/enet2/m4/ltoptions.m4 | 384 + enet server test/enet2/m4/ltsugar.m4 | 123 + enet server test/enet2/m4/ltversion.m4 | 23 + enet server test/enet2/m4/lt~obsolete.m4 | 98 + enet server test/enet2/missing | 215 + enet server test/enet2/packet.c | 165 + enet server test/enet2/peer.c | 1004 + enet server test/enet2/premake4.lua | 59 + enet server test/enet2/protocol.c | 1913 ++ enet server test/enet2/unix.c | 557 + enet server test/enet2/win32.c | 422 + enet server test/json.hpp | 18912 ++++++++++++++++ enet server test/stdafx.cpp | 8 + enet server test/stdafx.h | 15 + enet server test/targetver.h | 8 + enet.lib | Bin 0 -> 51152 bytes 348 files changed, 102323 insertions(+) create mode 100644 enet server test.sln create mode 100644 enet server test/ReadMe.txt create mode 100644 enet server test/bcrypt.c create mode 100644 enet server test/bcrypt.h create mode 100644 enet server test/crypt_blowfish/LINKS create mode 100644 enet server test/crypt_blowfish/Makefile create mode 100644 enet server test/crypt_blowfish/PERFORMANCE create mode 100644 enet server test/crypt_blowfish/README create mode 100644 enet server test/crypt_blowfish/crypt.3 create mode 100644 enet server test/crypt_blowfish/crypt.h create mode 100644 enet server test/crypt_blowfish/crypt_blowfish.c create mode 100644 enet server test/crypt_blowfish/crypt_blowfish.h create mode 100644 enet server test/crypt_blowfish/crypt_gensalt.c create mode 100644 enet server test/crypt_blowfish/crypt_gensalt.h create mode 100644 enet server test/crypt_blowfish/glibc-2.1.3-crypt.diff create mode 100644 enet server test/crypt_blowfish/glibc-2.14-crypt.diff create mode 100644 enet server test/crypt_blowfish/glibc-2.3.6-crypt.diff create mode 100644 enet server test/crypt_blowfish/ow-crypt.h create mode 100644 enet server test/crypt_blowfish/wrapper.c create mode 100644 enet server test/crypt_blowfish/x86.S create mode 100644 enet server test/enet server test.cpp create mode 100644 enet server test/enet server test.vcxproj create mode 100644 enet server test/enet server test.vcxproj.filters create mode 100644 enet server test/enet.lib create mode 100644 enet server test/enet/callbacks.h create mode 100644 enet server test/enet/enet.h create mode 100644 enet server test/enet/list.h create mode 100644 enet server test/enet/protocol.h create mode 100644 enet server test/enet/time.h create mode 100644 enet server test/enet/types.h create mode 100644 enet server test/enet/unix.h create mode 100644 enet server test/enet/utility.h create mode 100644 enet server test/enet/win32.h create mode 100644 enet server test/enet2/CMakeLists.txt create mode 100644 enet server test/enet2/ChangeLog create mode 100644 enet server test/enet2/Doxyfile create mode 100644 enet server test/enet2/DoxygenLayout.xml create mode 100644 enet server test/enet2/LICENSE create mode 100644 enet server test/enet2/Makefile.am create mode 100644 enet server test/enet2/Makefile.in create mode 100644 enet server test/enet2/README create mode 100644 enet server test/enet2/aclocal.m4 create mode 100644 enet server test/enet2/callbacks.c create mode 100644 enet server test/enet2/compile create mode 100644 enet server test/enet2/compress.c create mode 100644 enet server test/enet2/config.guess create mode 100644 enet server test/enet2/config.sub create mode 100644 enet server test/enet2/configure create mode 100644 enet server test/enet2/configure.ac create mode 100644 enet server test/enet2/depcomp create mode 100644 enet server test/enet2/docs/FAQ.dox create mode 100644 enet server test/enet2/docs/design.dox create mode 100644 enet server test/enet2/docs/html/Downloads.html create mode 100644 enet server test/enet2/docs/html/FAQ.html create mode 100644 enet server test/enet2/docs/html/FAQ_8dox.html create mode 100644 enet server test/enet2/docs/html/Features.html create mode 100644 enet server test/enet2/docs/html/IRCChannel.html create mode 100644 enet server test/enet2/docs/html/Installation.html create mode 100644 enet server test/enet2/docs/html/License.html create mode 100644 enet server test/enet2/docs/html/MailingList.html create mode 100644 enet server test/enet2/docs/html/Tutorial.html create mode 100644 enet server test/enet2/docs/html/annotated.html create mode 100644 enet server test/enet2/docs/html/bc_s.png create mode 100644 enet server test/enet2/docs/html/bdwn.png create mode 100644 enet server test/enet2/docs/html/callbacks_8c.html create mode 100644 enet server test/enet2/docs/html/callbacks_8h.html create mode 100644 enet server test/enet2/docs/html/closed.png create mode 100644 enet server test/enet2/docs/html/compress_8c.html create mode 100644 enet server test/enet2/docs/html/design_8dox.html create mode 100644 enet server test/enet2/docs/html/dir_d44c64559bbebec7f509842c48db8b23.html create mode 100644 enet server test/enet2/docs/html/dir_fd6c3a2b8754f03ff2a62b53108cf6e2.html create mode 100644 enet server test/enet2/docs/html/doxygen.css create mode 100644 enet server test/enet2/docs/html/doxygen.png create mode 100644 enet server test/enet2/docs/html/dynsections.js create mode 100644 enet server test/enet2/docs/html/enet_8h.html create mode 100644 enet server test/enet2/docs/html/files.html create mode 100644 enet server test/enet2/docs/html/ftv2blank.png create mode 100644 enet server test/enet2/docs/html/ftv2doc.png create mode 100644 enet server test/enet2/docs/html/ftv2folderclosed.png create mode 100644 enet server test/enet2/docs/html/ftv2folderopen.png create mode 100644 enet server test/enet2/docs/html/ftv2lastnode.png create mode 100644 enet server test/enet2/docs/html/ftv2link.png create mode 100644 enet server test/enet2/docs/html/ftv2mlastnode.png create mode 100644 enet server test/enet2/docs/html/ftv2mnode.png create mode 100644 enet server test/enet2/docs/html/ftv2node.png create mode 100644 enet server test/enet2/docs/html/ftv2plastnode.png create mode 100644 enet server test/enet2/docs/html/ftv2pnode.png create mode 100644 enet server test/enet2/docs/html/ftv2splitbar.png create mode 100644 enet server test/enet2/docs/html/ftv2vertline.png create mode 100644 enet server test/enet2/docs/html/globals.html create mode 100644 enet server test/enet2/docs/html/globals_defs.html create mode 100644 enet server test/enet2/docs/html/globals_enum.html create mode 100644 enet server test/enet2/docs/html/globals_eval.html create mode 100644 enet server test/enet2/docs/html/globals_func.html create mode 100644 enet server test/enet2/docs/html/globals_m.html create mode 100644 enet server test/enet2/docs/html/globals_s.html create mode 100644 enet server test/enet2/docs/html/globals_type.html create mode 100644 enet server test/enet2/docs/html/group__Address.html create mode 100644 enet server test/enet2/docs/html/group__Packet.html create mode 100644 enet server test/enet2/docs/html/group__callbacks.html create mode 100644 enet server test/enet2/docs/html/group__global.html create mode 100644 enet server test/enet2/docs/html/group__host.html create mode 100644 enet server test/enet2/docs/html/group__list.html create mode 100644 enet server test/enet2/docs/html/group__peer.html create mode 100644 enet server test/enet2/docs/html/group__private.html create mode 100644 enet server test/enet2/docs/html/group__socket.html create mode 100644 enet server test/enet2/docs/html/host_8c.html create mode 100644 enet server test/enet2/docs/html/index.html create mode 100644 enet server test/enet2/docs/html/install_8dox.html create mode 100644 enet server test/enet2/docs/html/jquery.js create mode 100644 enet server test/enet2/docs/html/license_8dox.html create mode 100644 enet server test/enet2/docs/html/list_8c.html create mode 100644 enet server test/enet2/docs/html/list_8h.html create mode 100644 enet server test/enet2/docs/html/mainpage_8dox.html create mode 100644 enet server test/enet2/docs/html/modules.html create mode 100644 enet server test/enet2/docs/html/nav_f.png create mode 100644 enet server test/enet2/docs/html/nav_g.png create mode 100644 enet server test/enet2/docs/html/nav_h.png create mode 100644 enet server test/enet2/docs/html/open.png create mode 100644 enet server test/enet2/docs/html/packet_8c.html create mode 100644 enet server test/enet2/docs/html/peer_8c.html create mode 100644 enet server test/enet2/docs/html/protocol_8c.html create mode 100644 enet server test/enet2/docs/html/protocol_8h.html create mode 100644 enet server test/enet2/docs/html/search/all_0.html create mode 100644 enet server test/enet2/docs/html/search/all_0.js create mode 100644 enet server test/enet2/docs/html/search/all_1.html create mode 100644 enet server test/enet2/docs/html/search/all_1.js create mode 100644 enet server test/enet2/docs/html/search/all_10.html create mode 100644 enet server test/enet2/docs/html/search/all_10.js create mode 100644 enet server test/enet2/docs/html/search/all_11.html create mode 100644 enet server test/enet2/docs/html/search/all_11.js create mode 100644 enet server test/enet2/docs/html/search/all_12.html create mode 100644 enet server test/enet2/docs/html/search/all_12.js create mode 100644 enet server test/enet2/docs/html/search/all_2.html create mode 100644 enet server test/enet2/docs/html/search/all_2.js create mode 100644 enet server test/enet2/docs/html/search/all_3.html create mode 100644 enet server test/enet2/docs/html/search/all_3.js create mode 100644 enet server test/enet2/docs/html/search/all_4.html create mode 100644 enet server test/enet2/docs/html/search/all_4.js create mode 100644 enet server test/enet2/docs/html/search/all_5.html create mode 100644 enet server test/enet2/docs/html/search/all_5.js create mode 100644 enet server test/enet2/docs/html/search/all_6.html create mode 100644 enet server test/enet2/docs/html/search/all_6.js create mode 100644 enet server test/enet2/docs/html/search/all_7.html create mode 100644 enet server test/enet2/docs/html/search/all_7.js create mode 100644 enet server test/enet2/docs/html/search/all_8.html create mode 100644 enet server test/enet2/docs/html/search/all_8.js create mode 100644 enet server test/enet2/docs/html/search/all_9.html create mode 100644 enet server test/enet2/docs/html/search/all_9.js create mode 100644 enet server test/enet2/docs/html/search/all_a.html create mode 100644 enet server test/enet2/docs/html/search/all_a.js create mode 100644 enet server test/enet2/docs/html/search/all_b.html create mode 100644 enet server test/enet2/docs/html/search/all_b.js create mode 100644 enet server test/enet2/docs/html/search/all_c.html create mode 100644 enet server test/enet2/docs/html/search/all_c.js create mode 100644 enet server test/enet2/docs/html/search/all_d.html create mode 100644 enet server test/enet2/docs/html/search/all_d.js create mode 100644 enet server test/enet2/docs/html/search/all_e.html create mode 100644 enet server test/enet2/docs/html/search/all_e.js create mode 100644 enet server test/enet2/docs/html/search/all_f.html create mode 100644 enet server test/enet2/docs/html/search/all_f.js create mode 100644 enet server test/enet2/docs/html/search/classes_0.html create mode 100644 enet server test/enet2/docs/html/search/classes_0.js create mode 100644 enet server test/enet2/docs/html/search/close.png create mode 100644 enet server test/enet2/docs/html/search/defines_0.html create mode 100644 enet server test/enet2/docs/html/search/defines_0.js create mode 100644 enet server test/enet2/docs/html/search/defines_1.html create mode 100644 enet server test/enet2/docs/html/search/defines_1.js create mode 100644 enet server test/enet2/docs/html/search/enums_0.html create mode 100644 enet server test/enet2/docs/html/search/enums_0.js create mode 100644 enet server test/enet2/docs/html/search/enumvalues_0.html create mode 100644 enet server test/enet2/docs/html/search/enumvalues_0.js create mode 100644 enet server test/enet2/docs/html/search/files_0.html create mode 100644 enet server test/enet2/docs/html/search/files_0.js create mode 100644 enet server test/enet2/docs/html/search/files_1.html create mode 100644 enet server test/enet2/docs/html/search/files_1.js create mode 100644 enet server test/enet2/docs/html/search/files_2.html create mode 100644 enet server test/enet2/docs/html/search/files_2.js create mode 100644 enet server test/enet2/docs/html/search/files_3.html create mode 100644 enet server test/enet2/docs/html/search/files_3.js create mode 100644 enet server test/enet2/docs/html/search/files_4.html create mode 100644 enet server test/enet2/docs/html/search/files_4.js create mode 100644 enet server test/enet2/docs/html/search/files_5.html create mode 100644 enet server test/enet2/docs/html/search/files_5.js create mode 100644 enet server test/enet2/docs/html/search/files_6.html create mode 100644 enet server test/enet2/docs/html/search/files_6.js create mode 100644 enet server test/enet2/docs/html/search/files_7.html create mode 100644 enet server test/enet2/docs/html/search/files_7.js create mode 100644 enet server test/enet2/docs/html/search/files_8.html create mode 100644 enet server test/enet2/docs/html/search/files_8.js create mode 100644 enet server test/enet2/docs/html/search/files_9.html create mode 100644 enet server test/enet2/docs/html/search/files_9.js create mode 100644 enet server test/enet2/docs/html/search/files_a.html create mode 100644 enet server test/enet2/docs/html/search/files_a.js create mode 100644 enet server test/enet2/docs/html/search/files_b.html create mode 100644 enet server test/enet2/docs/html/search/files_b.js create mode 100644 enet server test/enet2/docs/html/search/functions_0.html create mode 100644 enet server test/enet2/docs/html/search/functions_0.js create mode 100644 enet server test/enet2/docs/html/search/groups_0.html create mode 100644 enet server test/enet2/docs/html/search/groups_0.js create mode 100644 enet server test/enet2/docs/html/search/mag_sel.png create mode 100644 enet server test/enet2/docs/html/search/nomatches.html create mode 100644 enet server test/enet2/docs/html/search/pages_0.html create mode 100644 enet server test/enet2/docs/html/search/pages_0.js create mode 100644 enet server test/enet2/docs/html/search/pages_1.html create mode 100644 enet server test/enet2/docs/html/search/pages_1.js create mode 100644 enet server test/enet2/docs/html/search/pages_2.html create mode 100644 enet server test/enet2/docs/html/search/pages_2.js create mode 100644 enet server test/enet2/docs/html/search/pages_3.html create mode 100644 enet server test/enet2/docs/html/search/pages_3.js create mode 100644 enet server test/enet2/docs/html/search/pages_4.html create mode 100644 enet server test/enet2/docs/html/search/pages_4.js create mode 100644 enet server test/enet2/docs/html/search/pages_5.html create mode 100644 enet server test/enet2/docs/html/search/pages_5.js create mode 100644 enet server test/enet2/docs/html/search/pages_6.html create mode 100644 enet server test/enet2/docs/html/search/pages_6.js create mode 100644 enet server test/enet2/docs/html/search/search.css create mode 100644 enet server test/enet2/docs/html/search/search.js create mode 100644 enet server test/enet2/docs/html/search/search_l.png create mode 100644 enet server test/enet2/docs/html/search/search_m.png create mode 100644 enet server test/enet2/docs/html/search/search_r.png create mode 100644 enet server test/enet2/docs/html/search/typedefs_0.html create mode 100644 enet server test/enet2/docs/html/search/typedefs_0.js create mode 100644 enet server test/enet2/docs/html/search/typedefs_1.html create mode 100644 enet server test/enet2/docs/html/search/typedefs_1.js create mode 100644 enet server test/enet2/docs/html/search/variables_0.html create mode 100644 enet server test/enet2/docs/html/search/variables_0.js create mode 100644 enet server test/enet2/docs/html/search/variables_1.html create mode 100644 enet server test/enet2/docs/html/search/variables_1.js create mode 100644 enet server test/enet2/docs/html/search/variables_10.html create mode 100644 enet server test/enet2/docs/html/search/variables_10.js create mode 100644 enet server test/enet2/docs/html/search/variables_11.html create mode 100644 enet server test/enet2/docs/html/search/variables_11.js create mode 100644 enet server test/enet2/docs/html/search/variables_12.html create mode 100644 enet server test/enet2/docs/html/search/variables_12.js create mode 100644 enet server test/enet2/docs/html/search/variables_2.html create mode 100644 enet server test/enet2/docs/html/search/variables_2.js create mode 100644 enet server test/enet2/docs/html/search/variables_3.html create mode 100644 enet server test/enet2/docs/html/search/variables_3.js create mode 100644 enet server test/enet2/docs/html/search/variables_4.html create mode 100644 enet server test/enet2/docs/html/search/variables_4.js create mode 100644 enet server test/enet2/docs/html/search/variables_5.html create mode 100644 enet server test/enet2/docs/html/search/variables_5.js create mode 100644 enet server test/enet2/docs/html/search/variables_6.html create mode 100644 enet server test/enet2/docs/html/search/variables_6.js create mode 100644 enet server test/enet2/docs/html/search/variables_7.html create mode 100644 enet server test/enet2/docs/html/search/variables_7.js create mode 100644 enet server test/enet2/docs/html/search/variables_8.html create mode 100644 enet server test/enet2/docs/html/search/variables_8.js create mode 100644 enet server test/enet2/docs/html/search/variables_9.html create mode 100644 enet server test/enet2/docs/html/search/variables_9.js create mode 100644 enet server test/enet2/docs/html/search/variables_a.html create mode 100644 enet server test/enet2/docs/html/search/variables_a.js create mode 100644 enet server test/enet2/docs/html/search/variables_b.html create mode 100644 enet server test/enet2/docs/html/search/variables_b.js create mode 100644 enet server test/enet2/docs/html/search/variables_c.html create mode 100644 enet server test/enet2/docs/html/search/variables_c.js create mode 100644 enet server test/enet2/docs/html/search/variables_d.html create mode 100644 enet server test/enet2/docs/html/search/variables_d.js create mode 100644 enet server test/enet2/docs/html/search/variables_e.html create mode 100644 enet server test/enet2/docs/html/search/variables_e.js create mode 100644 enet server test/enet2/docs/html/search/variables_f.html create mode 100644 enet server test/enet2/docs/html/search/variables_f.js create mode 100644 enet server test/enet2/docs/html/structENetAcknowledgement.html create mode 100644 enet server test/enet2/docs/html/structENetAddress.html create mode 100644 enet server test/enet2/docs/html/structENetBuffer.html create mode 100644 enet server test/enet2/docs/html/structENetCallbacks.html create mode 100644 enet server test/enet2/docs/html/structENetChannel.html create mode 100644 enet server test/enet2/docs/html/structENetCompressor.html create mode 100644 enet server test/enet2/docs/html/structENetEvent.html create mode 100644 enet server test/enet2/docs/html/structENetHost.html create mode 100644 enet server test/enet2/docs/html/structENetIncomingCommand.html create mode 100644 enet server test/enet2/docs/html/structENetList.html create mode 100644 enet server test/enet2/docs/html/structENetListNode.html create mode 100644 enet server test/enet2/docs/html/structENetOutgoingCommand.html create mode 100644 enet server test/enet2/docs/html/structENetPacket.html create mode 100644 enet server test/enet2/docs/html/structENetPeer.html create mode 100644 enet server test/enet2/docs/html/structENetProtocolAcknowledge.html create mode 100644 enet server test/enet2/docs/html/structENetProtocolBandwidthLimit.html create mode 100644 enet server test/enet2/docs/html/structENetProtocolCommandHeader.html create mode 100644 enet server test/enet2/docs/html/structENetProtocolConnect.html create mode 100644 enet server test/enet2/docs/html/structENetProtocolDisconnect.html create mode 100644 enet server test/enet2/docs/html/structENetProtocolHeader.html create mode 100644 enet server test/enet2/docs/html/structENetProtocolPing.html create mode 100644 enet server test/enet2/docs/html/structENetProtocolSendFragment.html create mode 100644 enet server test/enet2/docs/html/structENetProtocolSendReliable.html create mode 100644 enet server test/enet2/docs/html/structENetProtocolSendUnreliable.html create mode 100644 enet server test/enet2/docs/html/structENetProtocolSendUnsequenced.html create mode 100644 enet server test/enet2/docs/html/structENetProtocolThrottleConfigure.html create mode 100644 enet server test/enet2/docs/html/structENetProtocolVerifyConnect.html create mode 100644 enet server test/enet2/docs/html/sync_off.png create mode 100644 enet server test/enet2/docs/html/sync_on.png create mode 100644 enet server test/enet2/docs/html/tab_a.png create mode 100644 enet server test/enet2/docs/html/tab_b.png create mode 100644 enet server test/enet2/docs/html/tab_h.png create mode 100644 enet server test/enet2/docs/html/tab_s.png create mode 100644 enet server test/enet2/docs/html/tabs.css create mode 100644 enet server test/enet2/docs/html/time_8h.html create mode 100644 enet server test/enet2/docs/html/tutorial_8dox.html create mode 100644 enet server test/enet2/docs/html/types_8h.html create mode 100644 enet server test/enet2/docs/html/unionENetProtocol.html create mode 100644 enet server test/enet2/docs/html/unix_8c.html create mode 100644 enet server test/enet2/docs/html/unix_8h.html create mode 100644 enet server test/enet2/docs/html/usergroup0.html create mode 100644 enet server test/enet2/docs/html/utility_8h.html create mode 100644 enet server test/enet2/docs/html/win32_8c.html create mode 100644 enet server test/enet2/docs/html/win32_8h.html create mode 100644 enet server test/enet2/docs/install.dox create mode 100644 enet server test/enet2/docs/license.dox create mode 100644 enet server test/enet2/docs/mainpage.dox create mode 100644 enet server test/enet2/docs/tutorial.dox create mode 100644 enet server test/enet2/enet.dsp create mode 100644 enet server test/enet2/enet.lib create mode 100644 enet server test/enet2/enet64.lib create mode 100644 enet server test/enet2/enet_dll.cbp create mode 100644 enet server test/enet2/host.c create mode 100644 enet server test/enet2/include/enet/callbacks.h create mode 100644 enet server test/enet2/include/enet/enet.h create mode 100644 enet server test/enet2/include/enet/list.h create mode 100644 enet server test/enet2/include/enet/protocol.h create mode 100644 enet server test/enet2/include/enet/time.h create mode 100644 enet server test/enet2/include/enet/types.h create mode 100644 enet server test/enet2/include/enet/unix.h create mode 100644 enet server test/enet2/include/enet/utility.h create mode 100644 enet server test/enet2/include/enet/win32.h create mode 100644 enet server test/enet2/install-sh create mode 100644 enet server test/enet2/libenet.pc.in create mode 100644 enet server test/enet2/list.c create mode 100644 enet server test/enet2/ltmain.sh create mode 100644 enet server test/enet2/m4/.keep create mode 100644 enet server test/enet2/m4/libtool.m4 create mode 100644 enet server test/enet2/m4/ltoptions.m4 create mode 100644 enet server test/enet2/m4/ltsugar.m4 create mode 100644 enet server test/enet2/m4/ltversion.m4 create mode 100644 enet server test/enet2/m4/lt~obsolete.m4 create mode 100644 enet server test/enet2/missing create mode 100644 enet server test/enet2/packet.c create mode 100644 enet server test/enet2/peer.c create mode 100644 enet server test/enet2/premake4.lua create mode 100644 enet server test/enet2/protocol.c create mode 100644 enet server test/enet2/unix.c create mode 100644 enet server test/enet2/win32.c create mode 100644 enet server test/json.hpp create mode 100644 enet server test/stdafx.cpp create mode 100644 enet server test/stdafx.h create mode 100644 enet server test/targetver.h create mode 100644 enet.lib diff --git a/README.md b/README.md index bfdbce5..343fef1 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,21 @@ # GrowtopiaServer First Growtopia Private Server made with ENet. + +This project has been compiled with Visual Studio 2015 (Visual Studio 2013 or older won't work!) and newer versions of VS or other compilers weren't been tested. + +This project has been published under GNU AFFERO GPL license, so you need to **publish whole source code and citate orginal authors name, even if you are using your server as service**! + +**TODO list:** +1. Refactor whole code, it is very hard readable and there might be problems with maintaining it +2. Try get some normal DB working or atleast save all files as BSON or some binary format +3. Write load balancer, it is very CPU expensive part because it calculates BCrypt hashes and access to database +4. Try possible to write multiple servers which only share between themselves possibly world list, player list and boradcast queue +5. Extend data which are saved now - there should be saved current clothes, inventory, login time, register time and maybe tracing hashes if you want to do proper ban system also in worlds there should be saved block extras (enabled, water, fire, etc.) and dropped items +6. Write event pool - this is needed to make delayed actions like respawning +7. Make heavy events asynchronous with possibly some good thread count (probably one or two) and connect them to event pool or use callbacks +8. Daily news (Growtopia Gazzete) should be saved to external file and not in source for easier modifying +9. Disable all loging to console and log everything to file, this will free up console for CLI + +If you want to support development of this server, then make sure you contribute to this repo! + +Make that sure that you subscribe my channel https://www.youtube.com/channel/UCLXtuoBlrXFDRtFU8vPy35g and enjoy :+1: \ No newline at end of file diff --git a/enet server test.sln b/enet server test.sln new file mode 100644 index 0000000..59ebab9 --- /dev/null +++ b/enet server test.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.25420.1 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "enet server test", "enet server test\enet server test.vcxproj", "{0F151D58-FD96-4DD5-A8D9-02A5F1D781D3}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {0F151D58-FD96-4DD5-A8D9-02A5F1D781D3}.Debug|Win32.ActiveCfg = Debug|Win32 + {0F151D58-FD96-4DD5-A8D9-02A5F1D781D3}.Debug|Win32.Build.0 = Debug|Win32 + {0F151D58-FD96-4DD5-A8D9-02A5F1D781D3}.Debug|x64.ActiveCfg = Debug|x64 + {0F151D58-FD96-4DD5-A8D9-02A5F1D781D3}.Debug|x64.Build.0 = Debug|x64 + {0F151D58-FD96-4DD5-A8D9-02A5F1D781D3}.Release|Win32.ActiveCfg = Release|Win32 + {0F151D58-FD96-4DD5-A8D9-02A5F1D781D3}.Release|Win32.Build.0 = Release|Win32 + {0F151D58-FD96-4DD5-A8D9-02A5F1D781D3}.Release|x64.ActiveCfg = Release|x64 + {0F151D58-FD96-4DD5-A8D9-02A5F1D781D3}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/enet server test/ReadMe.txt b/enet server test/ReadMe.txt new file mode 100644 index 0000000..7da2ff0 --- /dev/null +++ b/enet server test/ReadMe.txt @@ -0,0 +1,40 @@ +======================================================================== + CONSOLE APPLICATION : enet server test Project Overview +======================================================================== + +AppWizard has created this enet server test application for you. + +This file contains a summary of what you will find in each of the files that +make up your enet server test application. + + +enet server test.vcxproj + This is the main project file for VC++ projects generated using an Application Wizard. + It contains information about the version of Visual C++ that generated the file, and + information about the platforms, configurations, and project features selected with the + Application Wizard. + +enet server test.vcxproj.filters + This is the filters file for VC++ projects generated using an Application Wizard. + It contains information about the association between the files in your project + and the filters. This association is used in the IDE to show grouping of files with + similar extensions under a specific node (for e.g. ".cpp" files are associated with the + "Source Files" filter). + +enet server test.cpp + This is the main application source file. + +///////////////////////////////////////////////////////////////////////////// +Other standard files: + +StdAfx.h, StdAfx.cpp + These files are used to build a precompiled header (PCH) file + named enet server test.pch and a precompiled types file named StdAfx.obj. + +///////////////////////////////////////////////////////////////////////////// +Other notes: + +AppWizard uses "TODO:" comments to indicate parts of the source code you +should add to or customize. + +///////////////////////////////////////////////////////////////////////////// diff --git a/enet server test/bcrypt.c b/enet server test/bcrypt.c new file mode 100644 index 0000000..74f4b81 --- /dev/null +++ b/enet server test/bcrypt.c @@ -0,0 +1,206 @@ +/* + * bcrypt wrapper library + * + * Written in 2011, 2013, 2014, 2015 by Ricardo Garcia + * + * To the extent possible under law, the author(s) have dedicated all copyright + * and related and neighboring rights to this software to the public domain + * worldwide. This software is distributed without any warranty. + * + * You should have received a copy of the CC0 Public Domain Dedication along + * with this software. If not, see + * . + */ +#include +#include +#include +#include +//#include +#ifndef _UNISTD_H +#define _UNISTD_H 1 + +/* This is intended as a drop-in replacement for unistd.h on Windows. +* Please add functionality as neeeded. +* https://stackoverflow.com/a/826027/1202830 +*/ + +#include +#include +//#include /* getopt at: https://gist.github.com/ashelly/7776712 */ +#include /* for getpid() and the exec..() family */ +#include /* for _getcwd() and _chdir() */ + +#define srandom srand +#define random rand + +/* Values for the second argument to access. +These may be OR'd together. */ +#define R_OK 4 /* Test for read permission. */ +#define W_OK 2 /* Test for write permission. */ +//#define X_OK 1 /* execute permission - unsupported in windows*/ +#define F_OK 0 /* Test for existence. */ + +#define access _access +#define dup2 _dup2 +#define execve _execve +#define ftruncate _chsize +#define unlink _unlink +#define fileno _fileno +#define getcwd _getcwd +#define chdir _chdir +#define isatty _isatty +#define lseek _lseek +/* read, write, and close are NOT being #defined here, because while there are file handle specific versions for Windows, they probably don't work for sockets. You need to look at your app and consider whether to call e.g. closesocket(). */ + +#ifdef _WIN64 +#define ssize_t __int64 +#else +#define ssize_t long +#endif + +#define STDIN_FILENO 0 +#define STDOUT_FILENO 1 +#define STDERR_FILENO 2 +/* should be in some equivalent to */ +//typedef __int8 int8_t; +typedef __int16 int16_t; +typedef __int32 int32_t; +typedef __int64 int64_t; +typedef unsigned __int8 uint8_t; +typedef unsigned __int16 uint16_t; +typedef unsigned __int32 uint32_t; +typedef unsigned __int64 uint64_t; + +#endif /* unistd.h */ + +#include + +#include "bcrypt.h" +#include "crypt_blowfish/ow-crypt.h" + +#define RANDBYTES (16) + +/* + * This is a best effort implementation. Nothing prevents a compiler from + * optimizing this function and making it vulnerable to timing attacks, but + * this method is commonly used in crypto libraries like NaCl. + * + * Return value is zero if both strings are equal and nonzero otherwise. +*/ +static int timing_safe_strcmp(const char *str1, const char *str2) +{ + const unsigned char *u1; + const unsigned char *u2; + int ret; + int i; + + int len1 = strlen(str1); + int len2 = strlen(str2); + + /* In our context both strings should always have the same length + * because they will be hashed passwords. */ + if (len1 != len2) + return 1; + + /* Force unsigned for bitwise operations. */ + u1 = (const unsigned char *)str1; + u2 = (const unsigned char *)str2; + + ret = 0; + for (i = 0; i < len1; ++i) + ret |= (u1[i] ^ u2[i]); + + return ret; +} + +int bcrypt_gensalt(int factor, char salt[BCRYPT_HASHSIZE]) +{ + int fd; + char input[RANDBYTES]; + int workf; + char *aux; + + for (int i = 0; i < RANDBYTES; i++) + { + input[i] = rand(); + } + + /* Generate salt. */ + workf = (factor < 4 || factor > 31)?12:factor; + aux = crypt_gensalt_rn("$2a$", workf, input, RANDBYTES, + salt, BCRYPT_HASHSIZE); + return (aux == NULL)?5:0; +} + +int bcrypt_hashpw(const char *passwd, const char salt[BCRYPT_HASHSIZE], char hash[BCRYPT_HASHSIZE]) +{ + char *aux; + aux = crypt_rn(passwd, salt, hash, BCRYPT_HASHSIZE); + return (aux == NULL)?1:0; +} + +int bcrypt_checkpw(const char *passwd, const char hash[BCRYPT_HASHSIZE]) +{ + int ret; + char outhash[BCRYPT_HASHSIZE]; + + ret = bcrypt_hashpw(passwd, hash, outhash); + if (ret != 0) + return -1; + + return timing_safe_strcmp(hash, outhash); +} + +#ifdef TEST_BCRYPT +#include +#include +#include +#include + +int main(void) +{ + clock_t before; + clock_t after; + char salt[BCRYPT_HASHSIZE]; + char hash[BCRYPT_HASHSIZE]; + int ret; + + const char pass[] = "hi,mom"; + const char hash1[] = "$2a$10$VEVmGHy4F4XQMJ3eOZJAUeb.MedU0W10pTPCuf53eHdKJPiSE8sMK"; + const char hash2[] = "$2a$10$3F0BVk5t8/aoS.3ddaB3l.fxg5qvafQ9NybxcpXLzMeAt.nVWn.NO"; + + ret = bcrypt_gensalt(12, salt); + assert(ret == 0); + printf("Generated salt: %s\n", salt); + before = clock(); + ret = bcrypt_hashpw("testtesttest", salt, hash); + assert(ret == 0); + after = clock(); + printf("Hashed password: %s\n", hash); + printf("Time taken: %f seconds\n", + (double)(after - before) / CLOCKS_PER_SEC); + + ret = bcrypt_hashpw(pass, hash1, hash); + assert(ret == 0); + printf("First hash check: %s\n", (strcmp(hash1, hash) == 0)?"OK":"FAIL"); + ret = bcrypt_hashpw(pass, hash2, hash); + assert(ret == 0); + printf("Second hash check: %s\n", (strcmp(hash2, hash) == 0)?"OK":"FAIL"); + + before = clock(); + ret = (bcrypt_checkpw(pass, hash1) == 0); + after = clock(); + printf("First hash check with bcrypt_checkpw: %s\n", ret?"OK":"FAIL"); + printf("Time taken: %f seconds\n", + (double)(after - before) / CLOCKS_PER_SEC); + + before = clock(); + ret = (bcrypt_checkpw(pass, hash2) == 0); + after = clock(); + printf("Second hash check with bcrypt_checkpw: %s\n", ret?"OK":"FAIL"); + printf("Time taken: %f seconds\n", + (double)(after - before) / CLOCKS_PER_SEC); + + return 0; +} +#endif diff --git a/enet server test/bcrypt.h b/enet server test/bcrypt.h new file mode 100644 index 0000000..e45b3ca --- /dev/null +++ b/enet server test/bcrypt.h @@ -0,0 +1,97 @@ +#ifndef BCRYPT_H_ +#define BCRYPT_H_ +/* + * bcrypt wrapper library + * + * Written in 2011, 2013, 2014, 2015 by Ricardo Garcia + * + * To the extent possible under law, the author(s) have dedicated all copyright + * and related and neighboring rights to this software to the public domain + * worldwide. This software is distributed without any warranty. + * + * You should have received a copy of the CC0 Public Domain Dedication along + * with this software. If not, see + * . + */ + +#define BCRYPT_HASHSIZE (64) + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * This function expects a work factor between 4 and 31 and a char array to + * store the resulting generated salt. The char array should typically have + * BCRYPT_HASHSIZE bytes at least. If the provided work factor is not in the + * previous range, it will default to 12. + * + * The return value is zero if the salt could be correctly generated and + * nonzero otherwise. + * + */ +int bcrypt_gensalt(int workfactor, char salt[BCRYPT_HASHSIZE]); + +/* + * This function expects a password to be hashed, a salt to hash the password + * with and a char array to leave the result. Both the salt and the hash + * parameters should have room for BCRYPT_HASHSIZE characters at least. + * + * It can also be used to verify a hashed password. In that case, provide the + * expected hash in the salt parameter and verify the output hash is the same + * as the input hash. However, to avoid timing attacks, it's better to use + * bcrypt_checkpw when verifying a password. + * + * The return value is zero if the password could be hashed and nonzero + * otherwise. + */ +int bcrypt_hashpw(const char *passwd, const char salt[BCRYPT_HASHSIZE], + char hash[BCRYPT_HASHSIZE]); + +/* + * This function expects a password and a hash to verify the password against. + * The internal implementation is tuned to avoid timing attacks. + * + * The return value will be -1 in case of errors, zero if the provided password + * matches the given hash and greater than zero if no errors are found and the + * passwords don't match. + * + */ +int bcrypt_checkpw(const char *passwd, const char hash[BCRYPT_HASHSIZE]); + +/* + * Brief Example + * ------------- + * + * Hashing a password: + * + * char salt[BCRYPT_HASHSIZE]; + * char hash[BCRYPT_HASHSIZE]; + * int ret; + * + * ret = bcrypt_gensalt(12, salt); + * assert(ret == 0); + * ret = bcrypt_hashpw("thepassword", salt, hash); + * assert(ret == 0); + * + * + * Verifying a password: + * + * int ret; + * + * ret = bcrypt_checkpw("thepassword", "expectedhash"); + * assert(ret != -1); + * + * if (ret == 0) { + * printf("The password matches\n"); + * } else { + * printf("The password does NOT match\n"); + * } + * + */ + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/enet server test/crypt_blowfish/LINKS b/enet server test/crypt_blowfish/LINKS new file mode 100644 index 0000000..a6cb7e1 --- /dev/null +++ b/enet server test/crypt_blowfish/LINKS @@ -0,0 +1,29 @@ +New versions of this package (crypt_blowfish): + + http://www.openwall.com/crypt/ + +A paper on the algorithm that explains its design decisions: + + http://www.usenix.org/events/usenix99/provos.html + +Unix Seventh Edition Manual, Volume 2: the password scheme (1978): + + http://plan9.bell-labs.com/7thEdMan/vol2/password + +The Openwall GNU/*/Linux (Owl) tcb suite implementing the alternative +password shadowing scheme. This includes a PAM module which +supersedes pam_unix and uses the password hashing framework provided +with crypt_blowfish when setting new passwords. + + http://www.openwall.com/tcb/ + +pam_passwdqc, a password strength checking and policy enforcement +module for PAM-aware password changing programs: + + http://www.openwall.com/passwdqc/ + +John the Ripper password cracker: + + http://www.openwall.com/john/ + +$Owl: Owl/packages/glibc/crypt_blowfish/LINKS,v 1.4 2005/11/16 13:09:47 solar Exp $ diff --git a/enet server test/crypt_blowfish/Makefile b/enet server test/crypt_blowfish/Makefile new file mode 100644 index 0000000..c162adc --- /dev/null +++ b/enet server test/crypt_blowfish/Makefile @@ -0,0 +1,77 @@ +# +# Written and revised by Solar Designer in 2000-2011. +# No copyright is claimed, and the software is hereby placed in the public +# domain. In case this attempt to disclaim copyright and place the software +# in the public domain is deemed null and void, then the software is +# Copyright (c) 2000-2011 Solar Designer and it is hereby released to the +# general public under the following terms: +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted. +# +# There's ABSOLUTELY NO WARRANTY, express or implied. +# +# See crypt_blowfish.c for more information. +# + +CC = gcc +AS = $(CC) +LD = $(CC) +RM = rm -f +CFLAGS = -W -Wall -Wbad-function-cast -Wcast-align -Wcast-qual -Wmissing-prototypes -Wstrict-prototypes -Wshadow -Wundef -Wpointer-arith -O2 -fomit-frame-pointer -funroll-loops +ASFLAGS = -c +LDFLAGS = -s + +BLOWFISH_OBJS = \ + crypt_blowfish.o x86.o + +CRYPT_OBJS = \ + $(BLOWFISH_OBJS) crypt_gensalt.o wrapper.o + +TEST_OBJS = \ + $(BLOWFISH_OBJS) crypt_gensalt.o crypt_test.o + +TEST_THREADS_OBJS = \ + $(BLOWFISH_OBJS) crypt_gensalt.o crypt_test_threads.o + +EXTRA_MANS = \ + crypt_r.3 crypt_rn.3 crypt_ra.3 \ + crypt_gensalt.3 crypt_gensalt_rn.3 crypt_gensalt_ra.3 + +all: $(CRYPT_OBJS) man + +check: crypt_test + ./crypt_test + +crypt_test: $(TEST_OBJS) + $(LD) $(LDFLAGS) $(TEST_OBJS) -o $@ + +crypt_test.o: wrapper.c ow-crypt.h crypt_blowfish.h crypt_gensalt.h + $(CC) -c $(CFLAGS) wrapper.c -DTEST -o $@ + +check_threads: crypt_test_threads + ./crypt_test_threads + +crypt_test_threads: $(TEST_THREADS_OBJS) + $(LD) $(LDFLAGS) $(TEST_THREADS_OBJS) -lpthread -o $@ + +crypt_test_threads.o: wrapper.c ow-crypt.h crypt_blowfish.h crypt_gensalt.h + $(CC) -c $(CFLAGS) wrapper.c -DTEST -DTEST_THREADS=4 -o $@ + +man: $(EXTRA_MANS) + +$(EXTRA_MANS): + echo '.so man3/crypt.3' > $@ + +crypt_blowfish.o: crypt_blowfish.h +crypt_gensalt.o: crypt_gensalt.h +wrapper.o: crypt.h ow-crypt.h crypt_blowfish.h crypt_gensalt.h + +.c.o: + $(CC) -c $(CFLAGS) $*.c + +.S.o: + $(AS) $(ASFLAGS) $*.S + +clean: + $(RM) crypt_test crypt_test_threads *.o $(EXTRA_MANS) core diff --git a/enet server test/crypt_blowfish/PERFORMANCE b/enet server test/crypt_blowfish/PERFORMANCE new file mode 100644 index 0000000..9d6fe4e --- /dev/null +++ b/enet server test/crypt_blowfish/PERFORMANCE @@ -0,0 +1,30 @@ +These numbers are for 32 iterations ("$2a$05"): + + OpenBSD 3.0 bcrypt(*) crypt_blowfish 0.4.4 +Pentium III, 840 MHz 99 c/s 121 c/s (+22%) +Alpha 21164PC, 533 MHz 55.5 c/s 76.9 c/s (+38%) +UltraSparc IIi, 400 MHz 49.9 c/s 52.5 c/s (+5%) +Pentium, 120 MHz 8.8 c/s 20.1 c/s (+128%) +PA-RISC 7100LC, 80 MHz 8.5 c/s 16.3 c/s (+92%) + +(*) built with -fomit-frame-pointer -funroll-loops, which I don't +think happens for libcrypt. + +Starting with version 1.1 released in June 2011, default builds of +crypt_blowfish invoke a quick self-test on every hash computation. +This has roughly a 4.8% performance impact at "$2a$05", but only a 0.6% +impact at a more typical setting of "$2a$08". + +The large speedup for the original Pentium is due to the assembly +code and the weird optimizations this processor requires. + +The numbers for password cracking are 2 to 10% higher than those for +crypt_blowfish as certain things may be done out of the loop and the +code doesn't need to be reentrant. + +Recent versions of John the Ripper (1.6.25-dev and newer) achieve an +additional 15% speedup on the Pentium Pro family of processors (which +includes Pentium III) with a separate version of the assembly code and +run-time CPU detection. + +$Owl: Owl/packages/glibc/crypt_blowfish/PERFORMANCE,v 1.6 2011/06/21 12:09:20 solar Exp $ diff --git a/enet server test/crypt_blowfish/README b/enet server test/crypt_blowfish/README new file mode 100644 index 0000000..e95da23 --- /dev/null +++ b/enet server test/crypt_blowfish/README @@ -0,0 +1,68 @@ +This is an implementation of a password hashing method, provided via the +crypt(3) and a reentrant interface. It is fully compatible with +OpenBSD's bcrypt.c for prefix "$2b$", originally by Niels Provos and +David Mazieres. (Please refer to the included crypt(3) man page for +information on minor compatibility issues for other bcrypt prefixes.) + +I've placed this code in the public domain, with fallback to a +permissive license. Please see the comment in crypt_blowfish.c for +more information. + +You can use the provided routines in your own packages, or link them +into a C library. I've provided hooks for linking into GNU libc, but +it shouldn't be too hard to get this into another C library. Note +that simply adding this code into your libc is probably not enough to +make your system use the new password hashing algorithm. Changes to +passwd(1), PAM modules, or whatever else your system uses will likely +be needed as well. These are not a part of this package, but see +LINKS for a pointer to our tcb suite. + +Instructions on using the routines in one of the two common ways are +given below. It is recommended that you test the routines on your +system before you start. Type "make check" or "make check_threads" +(if you have the POSIX threads library), then "make clean". + + +1. Using the routines in your programs. + +The available interfaces are in ow-crypt.h, and this is the file you +should include. You won't need crypt.h. When linking, add all of the +C files and x86.S (you can compile and link it even on a non-x86, it +will produce no code in this case). + + +2. Building the routines into GNU C library. + +For versions 2.13 and 2.14 (and likely other nearby ones), extract the +library sources as usual. Apply the patch for glibc 2.14 provided in +this package. Enter crypt/ and rename crypt.h to gnu-crypt.h within +that directory. Copy the C sources, header, and assembly (x86.S) files +from this package in there as well (but be sure you don't overwrite the +Makefile). Configure, build, and install the library as usual. + +For versions 2.2 to 2.3.6 (and likely also for some newer ones), +extract the library sources and maybe its optional add-ons as usual. +Apply the patch for glibc 2.3.6 provided in this package. Enter +crypt/ and rename crypt.h to gnu-crypt.h within that directory. Copy +the C sources, header, and assembly (x86.S) files from this package in +there as well (but be sure you don't overwrite the Makefile). +Configure, build, and install the library as usual. + +For versions 2.1 to 2.1.3, extract the library sources and the crypt +and linuxthreads add-ons as usual. Apply the patch for glibc 2.1.3 +provided in this package. Enter crypt/sysdeps/unix/, and rename +crypt.h to gnu-crypt.h within that directory. Copy C sources, header, +and assembly (x86.S) files from this package in there as well (but be +sure you don't overwrite the Makefile). Configure, build, and install +the library as usual. + +Programs that want to use the provided interfaces will need to include +crypt.h (but not ow-crypt.h directly). By default, prototypes for the +new routines aren't defined (but the extra functionality of crypt(3) +is indeed available). You need to define _OW_SOURCE to obtain the new +routines as well. + +-- +Solar Designer + +$Owl: Owl/packages/glibc/crypt_blowfish/README,v 1.10 2014/07/07 15:19:04 solar Exp $ diff --git a/enet server test/crypt_blowfish/crypt.3 b/enet server test/crypt_blowfish/crypt.3 new file mode 100644 index 0000000..b4c0895 --- /dev/null +++ b/enet server test/crypt_blowfish/crypt.3 @@ -0,0 +1,575 @@ +.\" Written and revised by Solar Designer in 2000-2011. +.\" No copyright is claimed, and this man page is hereby placed in the public +.\" domain. In case this attempt to disclaim copyright and place the man page +.\" in the public domain is deemed null and void, then the man page is +.\" Copyright (c) 2000-2011 Solar Designer and it is hereby released to the +.\" general public under the following terms: +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted. +.\" +.\" There's ABSOLUTELY NO WARRANTY, express or implied. +.\" +.\" This manual page in its current form is intended for use on systems +.\" based on the GNU C Library with crypt_blowfish patched into libcrypt. +.\" +.TH CRYPT 3 "July 7, 2014" "Openwall Project" "Library functions" +.ad l +.\" No macros in NAME to keep makewhatis happy. +.SH NAME +\fBcrypt\fR, \fBcrypt_r\fR, \fBcrypt_rn\fR, \fBcrypt_ra\fR, +\fBcrypt_gensalt\fR, \fBcrypt_gensalt_rn\fR, \fBcrypt_gensalt_ra\fR +\- password hashing +.SH SYNOPSIS +.B #define _XOPEN_SOURCE +.br +.B #include +.sp +.in +8 +.ti -8 +.BI "char *crypt(const char *" key ", const char *" setting ); +.in -8 +.sp +.B #define _GNU_SOURCE +.br +.B #include +.sp +.in +8 +.ti -8 +.BI "char *crypt_r(const char *" key ", const char *" setting ", struct crypt_data *" data ); +.in -8 +.sp +.B #define _OW_SOURCE +.br +.B #include +.sp +.in +8 +.ti -8 +.BI "char *crypt_rn(const char *" key ", const char *" setting ", void *" data ", int " size ); +.ti -8 +.BI "char *crypt_ra(const char *" key ", const char *" setting ", void **" data ", int *" size ); +.ti -8 +.BI "char *crypt_gensalt(const char *" prefix ", unsigned long " count ", const char *" input ", int " size ); +.ti -8 +.BI "char *crypt_gensalt_rn(const char *" prefix ", unsigned long " count ", const char *" input ", int " size ", char *" output ", int " output_size ); +.ti -8 +.BI "char *crypt_gensalt_ra(const char *" prefix ", unsigned long " count ", const char *" input ", int " size ); +.ad b +.de crypt +.BR crypt , +.BR crypt_r , +.BR crypt_rn ", \\$1" +.ie "\\$2"" .B crypt_ra +.el .BR crypt_ra "\\$2" +.. +.de crypt_gensalt +.BR crypt_gensalt , +.BR crypt_gensalt_rn ", \\$1" +.ie "\\$2"" .B crypt_gensalt_ra +.el .BR crypt_gensalt_ra "\\$2" +.. +.SH DESCRIPTION +The +.crypt and +functions calculate a cryptographic hash function of +.I key +with one of a number of supported methods as requested with +.IR setting , +which is also used to pass a salt and possibly other parameters to +the chosen method. +The hashing methods are explained below. +.PP +Unlike +.BR crypt , +the functions +.BR crypt_r , +.BR crypt_rn " and" +.B crypt_ra +are reentrant. +They place their result and possibly their private data in a +.I data +area of +.I size +bytes as passed to them by an application and/or in memory they +allocate dynamically. Some hashing algorithms may use the data area to +cache precomputed intermediate values across calls. Thus, applications +must properly initialize the data area before its first use. +.B crypt_r +requires that only +.I data->initialized +be reset to zero; +.BR crypt_rn " and " crypt_ra +require that either the entire data area is zeroed or, in the case of +.BR crypt_ra , +.I *data +is NULL. When called with a NULL +.I *data +or insufficient +.I *size +for the requested hashing algorithm, +.B crypt_ra +uses +.BR realloc (3) +to allocate the required amount of memory dynamically. Thus, +.B crypt_ra +has the additional requirement that +.IR *data , +when non-NULL, must point to an area allocated either with a previous +call to +.B crypt_ra +or with a +.BR malloc (3) +family call. +The memory allocated by +.B crypt_ra +should be freed with +.BR free "(3)." +.PP +The +.crypt_gensalt and +functions compile a string for use as +.I setting +\- with the given +.I prefix +(used to choose a hashing method), the iteration +.I count +(if supported by the chosen method) and up to +.I size +cryptographically random +.I input +bytes for use as the actual salt. +If +.I count +is 0, a low default will be picked. +The random bytes may be obtained from +.BR /dev/urandom . +Unlike +.BR crypt_gensalt , +the functions +.BR crypt_gensalt_rn " and " crypt_gensalt_ra +are reentrant. +.B crypt_gensalt_rn +places its result in the +.I output +buffer of +.I output_size +bytes. +.B crypt_gensalt_ra +allocates memory for its result dynamically. The memory should be +freed with +.BR free "(3)." +.SH RETURN VALUE +Upon successful completion, the functions +.crypt and +return a pointer to a string containing the setting that was actually used +and a printable encoding of the hash function value. +The entire string is directly usable as +.I setting +with other calls to +.crypt and +and as +.I prefix +with calls to +.crypt_gensalt and . +.PP +The behavior of +.B crypt +on errors isn't well standardized. Some implementations simply can't fail +(unless the process dies, in which case they obviously can't return), +others return NULL or a fixed string. Most implementations don't set +.IR errno , +but some do. SUSv2 specifies only returning NULL and setting +.I errno +as a valid behavior, and defines only one possible error +.RB "(" ENOSYS , +"The functionality is not supported on this implementation.") +Unfortunately, most existing applications aren't prepared to handle +NULL returns from +.BR crypt . +The description below corresponds to this implementation of +.BR crypt " and " crypt_r +only, and to +.BR crypt_rn " and " crypt_ra . +The behavior may change to match standards, other implementations or +existing applications. +.PP +.BR crypt " and " crypt_r +may only fail (and return) when passed an invalid or unsupported +.IR setting , +in which case they return a pointer to a magic string that is +shorter than 13 characters and is guaranteed to differ from +.IR setting . +This behavior is safe for older applications which assume that +.B crypt +can't fail, when both setting new passwords and authenticating against +existing password hashes. +.BR crypt_rn " and " crypt_ra +return NULL to indicate failure. All four functions set +.I errno +when they fail. +.PP +The functions +.crypt_gensalt and +return a pointer to the compiled string for +.IR setting , +or NULL on error in which case +.I errno +is set. +.SH ERRORS +.TP +.B EINVAL +.crypt "" : +.I setting +is invalid or not supported by this implementation; +.sp +.crypt_gensalt "" : +.I prefix +is invalid or not supported by this implementation; +.I count +is invalid for the requested +.IR prefix ; +the input +.I size +is insufficient for the smallest valid salt with the requested +.IR prefix ; +.I input +is NULL. +.TP +.B ERANGE +.BR crypt_rn : +the provided data area +.I size +is insufficient for the requested hashing algorithm; +.sp +.BR crypt_gensalt_rn : +.I output_size +is too small to hold the compiled +.I setting +string. +.TP +.B ENOMEM +.B crypt +(original glibc only): +failed to allocate memory for the output buffer (which subsequent calls +would re-use); +.sp +.BR crypt_ra : +.I *data +is NULL or +.I *size +is insufficient for the requested hashing algorithm and +.BR realloc (3) +failed; +.sp +.BR crypt_gensalt_ra : +failed to allocate memory for the compiled +.I setting +string. +.TP +.B ENOSYS +.B crypt +(SUSv2): +the functionality is not supported on this implementation; +.sp +.BR crypt , +.B crypt_r +(glibc 2.0 to 2.0.1 only): +.de no-crypt-add-on +the crypt add-on is not compiled in and +.I setting +requests something other than the MD5-based algorithm. +.. +.no-crypt-add-on +.TP +.B EOPNOTSUPP +.BR crypt , +.B crypt_r +(glibc 2.0.2 to 2.1.3 only): +.no-crypt-add-on +.SH HASHING METHODS +The implemented hashing methods are intended specifically for processing +user passwords for storage and authentication; +they are at best inefficient for most other purposes. +.PP +It is important to understand that password hashing is not a replacement +for strong passwords. +It is always possible for an attacker with access to password hashes +to try guessing candidate passwords against the hashes. +There are, however, certain properties a password hashing method may have +which make these key search attacks somewhat harder. +.PP +All of the hashing methods use salts such that the same +.I key +may produce many possible hashes. +Proper use of salts may defeat a number of attacks, including: +.TP +1. +The ability to try candidate passwords against multiple hashes at the +price of one. +.TP +2. +The use of pre-hashed lists of candidate passwords. +.TP +3. +The ability to determine whether two users (or two accounts of one user) +have the same or different passwords without actually having to guess +one of the passwords. +.PP +The key search attacks depend on computing hashes of large numbers of +candidate passwords. +Thus, the computational cost of a good password hashing method must be +high \- but of course not too high to render it impractical. +.PP +All hashing methods implemented within the +.crypt and +interfaces use multiple iterations of an underlying cryptographic +primitive specifically in order to increase the cost of trying a +candidate password. +Unfortunately, due to hardware improvements, the hashing methods which +have a fixed cost become increasingly less secure over time. +.PP +In addition to salts, modern password hashing methods accept a variable +iteration +.IR count . +This makes it possible to adapt their cost to the hardware improvements +while still maintaining compatibility. +.PP +The following hashing methods are or may be implemented within the +described interfaces: +.PP +.de hash +.ad l +.TP +.I prefix +.ie "\\$1"" \{\ +"" (empty string); +.br +a string matching ^[./0-9A-Za-z]{2} (see +.BR regex (7)) +.\} +.el "\\$1" +.TP +.B Encoding syntax +\\$2 +.TP +.B Maximum password length +\\$3 (uses \\$4-bit characters) +.TP +.B Effective key size +.ie "\\$5"" limited by the hash size only +.el up to \\$5 bits +.TP +.B Hash size +\\$6 bits +.TP +.B Salt size +\\$7 bits +.TP +.B Iteration count +\\$8 +.ad b +.. +.ti -2 +.B Traditional DES-based +.br +This method is supported by almost all implementations of +.BR crypt . +Unfortunately, it no longer offers adequate security because of its many +limitations. +Thus, it should not be used for new passwords unless you absolutely have +to be able to migrate the password hashes to other systems. +.hash "" "[./0-9A-Za-z]{13}" 8 7 56 64 12 25 +.PP +.ti -2 +.B Extended BSDI-style DES-based +.br +This method is used on BSDI and is also available on at least NetBSD, +OpenBSD, and FreeBSD due to the use of David Burren's FreeSec library. +.hash _ "_[./0-9A-Za-z]{19}" unlimited 7 56 64 24 "1 to 2**24-1 (must be odd)" +.PP +.ti -2 +.B FreeBSD-style MD5-based +.br +This is Poul-Henning Kamp's MD5-based password hashing method originally +developed for FreeBSD. +It is currently supported on many free Unix-like systems, on Solaris 10 +and newer, and it is part of the official glibc. +Its main disadvantage is the fixed iteration count, which is already +too low for the currently available hardware. +.hash "$1$" "\e$1\e$[^$]{1,8}\e$[./0-9A-Za-z]{22}" unlimited 8 "" 128 "6 to 48" 1000 +.PP +.ti -2 +.BR "OpenBSD-style Blowfish-based" " (" bcrypt ) +.br +.B bcrypt +was originally developed by Niels Provos and David Mazieres for OpenBSD +and is also supported on recent versions of FreeBSD and NetBSD, +on Solaris 10 and newer, and on several GNU/*/Linux distributions. +It is, however, not part of the official glibc. +.PP +While both +.B bcrypt +and the BSDI-style DES-based hashing offer a variable iteration count, +.B bcrypt +may scale to even faster hardware, doesn't allow for certain optimizations +specific to password cracking only, doesn't have the effective key size +limitation, and uses 8-bit characters in passwords. +.hash "$2b$" "\e$2[abxy]\e$[0-9]{2}\e$[./A-Za-z0-9]{53}" 72 8 "" 184 128 "2**4 to 2**99 (current implementations are limited to 2**31 iterations)" +.PP +With +.BR bcrypt , +the +.I count +passed to +.crypt_gensalt and +is the base-2 logarithm of the actual iteration count. +.PP +.B bcrypt +hashes used the "$2a$" prefix since 1997. +However, in 2011 an implementation bug was discovered in crypt_blowfish +(versions up to 1.0.4 inclusive) affecting handling of password characters with +the 8th bit set. +Besides fixing the bug, +to provide for upgrade strategies for existing systems, two new prefixes were +introduced: "$2x$", which fully re-introduces the bug, and "$2y$", which +guarantees correct handling of both 7- and 8-bit characters. +OpenBSD 5.5 introduced the "$2b$" prefix for behavior that exactly matches +crypt_blowfish's "$2y$", and current crypt_blowfish supports it as well. +Unfortunately, the behavior of "$2a$" on password characters with the 8th bit +set has to be considered system-specific. +When generating new password hashes, the "$2b$" or "$2y$" prefix should be used. +(If such hashes ever need to be migrated to a system that does not yet support +these new prefixes, the prefix in migrated copies of the already-generated +hashes may be changed to "$2a$".) +.PP +.crypt_gensalt and +support the "$2b$", "$2y$", and "$2a$" prefixes (the latter for legacy programs +or configurations), but not "$2x$" (which must not be used for new hashes). +.crypt and +support all four of these prefixes. +.SH PORTABILITY NOTES +Programs using any of these functions on a glibc 2.x system must be +linked against +.BR libcrypt . +However, many Unix-like operating systems and older versions of the +GNU C Library include the +.BR crypt " function in " libc . +.PP +The +.BR crypt_r , +.BR crypt_rn , +.BR crypt_ra , +.crypt_gensalt and +functions are very non-portable. +.PP +The set of supported hashing methods is implementation-dependent. +.SH CONFORMING TO +The +.B crypt +function conforms to SVID, X/OPEN, and is available on BSD 4.3. +The strings returned by +.B crypt +are not required to be portable among conformant systems. +.PP +.B crypt_r +is a GNU extension. +There's also a +.B crypt_r +function on HP-UX and MKS Toolkit, but the prototypes and semantics differ. +.PP +.B crypt_gensalt +is an Openwall extension. +There's also a +.B crypt_gensalt +function on Solaris 10 and newer, but the prototypes and semantics differ. +.PP +.BR crypt_rn , +.BR crypt_ra , +.BR crypt_gensalt_rn , +and +.B crypt_gensalt_ra +are Openwall extensions. +.SH HISTORY +A rotor-based +.B crypt +function appeared in Version 6 AT&T UNIX. +The "traditional" +.B crypt +first appeared in Version 7 AT&T UNIX. +.PP +The +.B crypt_r +function was introduced during glibc 2.0 development. +.SH BUGS +The return values of +.BR crypt " and " crypt_gensalt +point to static buffers that are overwritten by subsequent calls. +These functions are not thread-safe. +.RB ( crypt +on recent versions of Solaris uses thread-specific data and actually is +thread-safe.) +.PP +The strings returned by certain other implementations of +.B crypt +on error may be stored in read-only locations or only initialized once, +which makes it unsafe to always attempt to zero out the buffer normally +pointed to by the +.B crypt +return value as it would otherwise be preferable for security reasons. +The problem could be avoided with the use of +.BR crypt_r , +.BR crypt_rn , +or +.B crypt_ra +where the application has full control over output buffers of these functions +(and often over some of their private data as well). +Unfortunately, the functions aren't (yet?) available on platforms where +.B crypt +has this undesired property. +.PP +Applications using the thread-safe +.B crypt_r +need to allocate address space for the large (over 128 KB) +.I struct crypt_data +structure. Each thread needs a separate instance of the structure. The +.B crypt_r +interface makes it impossible to implement a hashing algorithm which +would need to keep an even larger amount of private data, without breaking +binary compatibility. +.B crypt_ra +allows for dynamically increasing the allocation size as required by the +hashing algorithm that is actually used. Unfortunately, +.B crypt_ra +is even more non-portable than +.BR crypt_r . +.PP +Multi-threaded applications or library functions which are meant to be +thread-safe should use +.BR crypt_gensalt_rn " or " crypt_gensalt_ra +rather than +.BR crypt_gensalt . +.SH SEE ALSO +.BR login (1), +.BR passwd (1), +.BR crypto (3), +.BR encrypt (3), +.BR free (3), +.BR getpass (3), +.BR getpwent (3), +.BR malloc (3), +.BR realloc (3), +.BR shadow (3), +.BR passwd (5), +.BR shadow (5), +.BR regex (7), +.BR pam (8) +.sp +Niels Provos and David Mazieres. A Future-Adaptable Password Scheme. +Proceedings of the 1999 USENIX Annual Technical Conference, June 1999. +.br +http://www.usenix.org/events/usenix99/provos.html +.sp +Robert Morris and Ken Thompson. Password Security: A Case History. +Unix Seventh Edition Manual, Volume 2, April 1978. +.br +http://plan9.bell-labs.com/7thEdMan/vol2/password diff --git a/enet server test/crypt_blowfish/crypt.h b/enet server test/crypt_blowfish/crypt.h new file mode 100644 index 0000000..12e6705 --- /dev/null +++ b/enet server test/crypt_blowfish/crypt.h @@ -0,0 +1,24 @@ +/* + * Written by Solar Designer in 2000-2002. + * No copyright is claimed, and the software is hereby placed in the public + * domain. In case this attempt to disclaim copyright and place the software + * in the public domain is deemed null and void, then the software is + * Copyright (c) 2000-2002 Solar Designer and it is hereby released to the + * general public under the following terms: + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted. + * + * There's ABSOLUTELY NO WARRANTY, express or implied. + * + * See crypt_blowfish.c for more information. + */ + +#include + +#if defined(_OW_SOURCE) || defined(__USE_OW) +#define __SKIP_GNU +#undef __SKIP_OW +#include +#undef __SKIP_GNU +#endif diff --git a/enet server test/crypt_blowfish/crypt_blowfish.c b/enet server test/crypt_blowfish/crypt_blowfish.c new file mode 100644 index 0000000..9d3f3be --- /dev/null +++ b/enet server test/crypt_blowfish/crypt_blowfish.c @@ -0,0 +1,907 @@ +/* + * The crypt_blowfish homepage is: + * + * http://www.openwall.com/crypt/ + * + * This code comes from John the Ripper password cracker, with reentrant + * and crypt(3) interfaces added, but optimizations specific to password + * cracking removed. + * + * Written by Solar Designer in 1998-2014. + * No copyright is claimed, and the software is hereby placed in the public + * domain. In case this attempt to disclaim copyright and place the software + * in the public domain is deemed null and void, then the software is + * Copyright (c) 1998-2014 Solar Designer and it is hereby released to the + * general public under the following terms: + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted. + * + * There's ABSOLUTELY NO WARRANTY, express or implied. + * + * It is my intent that you should be able to use this on your system, + * as part of a software package, or anywhere else to improve security, + * ensure compatibility, or for any other purpose. I would appreciate + * it if you give credit where it is due and keep your modifications in + * the public domain as well, but I don't require that in order to let + * you place this code and any modifications you make under a license + * of your choice. + * + * This implementation is fully compatible with OpenBSD's bcrypt.c for prefix + * "$2b$", originally by Niels Provos , and it uses + * some of his ideas. The password hashing algorithm was designed by David + * Mazieres . For information on the level of + * compatibility for bcrypt hash prefixes other than "$2b$", please refer to + * the comments in BF_set_key() below and to the included crypt(3) man page. + * + * There's a paper on the algorithm that explains its design decisions: + * + * http://www.usenix.org/events/usenix99/provos.html + * + * Some of the tricks in BF_ROUND might be inspired by Eric Young's + * Blowfish library (I can't be sure if I would think of something if I + * hadn't seen his code). + */ + +#include + +#include +#ifndef __set_errno +#define __set_errno(val) errno = (val) +#endif + +/* Just to make sure the prototypes match the actual definitions */ +#include "crypt_blowfish.h" + +#ifdef __i386__ +#define BF_ASM 1 +#define BF_SCALE 1 +#elif defined(__x86_64__) || defined(__alpha__) || defined(__hppa__) +#define BF_ASM 0 +#define BF_SCALE 1 +#else +#define BF_ASM 0 +#define BF_SCALE 0 +#endif + +typedef unsigned int BF_word; +typedef signed int BF_word_signed; + +/* Number of Blowfish rounds, this is also hardcoded into a few places */ +#define BF_N 16 + +typedef BF_word BF_key[BF_N + 2]; + +typedef struct { + BF_word S[4][0x100]; + BF_key P; +} BF_ctx; + +/* + * Magic IV for 64 Blowfish encryptions that we do at the end. + * The string is "OrpheanBeholderScryDoubt" on big-endian. + */ +static BF_word BF_magic_w[6] = { + 0x4F727068, 0x65616E42, 0x65686F6C, + 0x64657253, 0x63727944, 0x6F756274 +}; + +/* + * P-box and S-box tables initialized with digits of Pi. + */ +static BF_ctx BF_init_state = { + { + { + 0xd1310ba6, 0x98dfb5ac, 0x2ffd72db, 0xd01adfb7, + 0xb8e1afed, 0x6a267e96, 0xba7c9045, 0xf12c7f99, + 0x24a19947, 0xb3916cf7, 0x0801f2e2, 0x858efc16, + 0x636920d8, 0x71574e69, 0xa458fea3, 0xf4933d7e, + 0x0d95748f, 0x728eb658, 0x718bcd58, 0x82154aee, + 0x7b54a41d, 0xc25a59b5, 0x9c30d539, 0x2af26013, + 0xc5d1b023, 0x286085f0, 0xca417918, 0xb8db38ef, + 0x8e79dcb0, 0x603a180e, 0x6c9e0e8b, 0xb01e8a3e, + 0xd71577c1, 0xbd314b27, 0x78af2fda, 0x55605c60, + 0xe65525f3, 0xaa55ab94, 0x57489862, 0x63e81440, + 0x55ca396a, 0x2aab10b6, 0xb4cc5c34, 0x1141e8ce, + 0xa15486af, 0x7c72e993, 0xb3ee1411, 0x636fbc2a, + 0x2ba9c55d, 0x741831f6, 0xce5c3e16, 0x9b87931e, + 0xafd6ba33, 0x6c24cf5c, 0x7a325381, 0x28958677, + 0x3b8f4898, 0x6b4bb9af, 0xc4bfe81b, 0x66282193, + 0x61d809cc, 0xfb21a991, 0x487cac60, 0x5dec8032, + 0xef845d5d, 0xe98575b1, 0xdc262302, 0xeb651b88, + 0x23893e81, 0xd396acc5, 0x0f6d6ff3, 0x83f44239, + 0x2e0b4482, 0xa4842004, 0x69c8f04a, 0x9e1f9b5e, + 0x21c66842, 0xf6e96c9a, 0x670c9c61, 0xabd388f0, + 0x6a51a0d2, 0xd8542f68, 0x960fa728, 0xab5133a3, + 0x6eef0b6c, 0x137a3be4, 0xba3bf050, 0x7efb2a98, + 0xa1f1651d, 0x39af0176, 0x66ca593e, 0x82430e88, + 0x8cee8619, 0x456f9fb4, 0x7d84a5c3, 0x3b8b5ebe, + 0xe06f75d8, 0x85c12073, 0x401a449f, 0x56c16aa6, + 0x4ed3aa62, 0x363f7706, 0x1bfedf72, 0x429b023d, + 0x37d0d724, 0xd00a1248, 0xdb0fead3, 0x49f1c09b, + 0x075372c9, 0x80991b7b, 0x25d479d8, 0xf6e8def7, + 0xe3fe501a, 0xb6794c3b, 0x976ce0bd, 0x04c006ba, + 0xc1a94fb6, 0x409f60c4, 0x5e5c9ec2, 0x196a2463, + 0x68fb6faf, 0x3e6c53b5, 0x1339b2eb, 0x3b52ec6f, + 0x6dfc511f, 0x9b30952c, 0xcc814544, 0xaf5ebd09, + 0xbee3d004, 0xde334afd, 0x660f2807, 0x192e4bb3, + 0xc0cba857, 0x45c8740f, 0xd20b5f39, 0xb9d3fbdb, + 0x5579c0bd, 0x1a60320a, 0xd6a100c6, 0x402c7279, + 0x679f25fe, 0xfb1fa3cc, 0x8ea5e9f8, 0xdb3222f8, + 0x3c7516df, 0xfd616b15, 0x2f501ec8, 0xad0552ab, + 0x323db5fa, 0xfd238760, 0x53317b48, 0x3e00df82, + 0x9e5c57bb, 0xca6f8ca0, 0x1a87562e, 0xdf1769db, + 0xd542a8f6, 0x287effc3, 0xac6732c6, 0x8c4f5573, + 0x695b27b0, 0xbbca58c8, 0xe1ffa35d, 0xb8f011a0, + 0x10fa3d98, 0xfd2183b8, 0x4afcb56c, 0x2dd1d35b, + 0x9a53e479, 0xb6f84565, 0xd28e49bc, 0x4bfb9790, + 0xe1ddf2da, 0xa4cb7e33, 0x62fb1341, 0xcee4c6e8, + 0xef20cada, 0x36774c01, 0xd07e9efe, 0x2bf11fb4, + 0x95dbda4d, 0xae909198, 0xeaad8e71, 0x6b93d5a0, + 0xd08ed1d0, 0xafc725e0, 0x8e3c5b2f, 0x8e7594b7, + 0x8ff6e2fb, 0xf2122b64, 0x8888b812, 0x900df01c, + 0x4fad5ea0, 0x688fc31c, 0xd1cff191, 0xb3a8c1ad, + 0x2f2f2218, 0xbe0e1777, 0xea752dfe, 0x8b021fa1, + 0xe5a0cc0f, 0xb56f74e8, 0x18acf3d6, 0xce89e299, + 0xb4a84fe0, 0xfd13e0b7, 0x7cc43b81, 0xd2ada8d9, + 0x165fa266, 0x80957705, 0x93cc7314, 0x211a1477, + 0xe6ad2065, 0x77b5fa86, 0xc75442f5, 0xfb9d35cf, + 0xebcdaf0c, 0x7b3e89a0, 0xd6411bd3, 0xae1e7e49, + 0x00250e2d, 0x2071b35e, 0x226800bb, 0x57b8e0af, + 0x2464369b, 0xf009b91e, 0x5563911d, 0x59dfa6aa, + 0x78c14389, 0xd95a537f, 0x207d5ba2, 0x02e5b9c5, + 0x83260376, 0x6295cfa9, 0x11c81968, 0x4e734a41, + 0xb3472dca, 0x7b14a94a, 0x1b510052, 0x9a532915, + 0xd60f573f, 0xbc9bc6e4, 0x2b60a476, 0x81e67400, + 0x08ba6fb5, 0x571be91f, 0xf296ec6b, 0x2a0dd915, + 0xb6636521, 0xe7b9f9b6, 0xff34052e, 0xc5855664, + 0x53b02d5d, 0xa99f8fa1, 0x08ba4799, 0x6e85076a + }, { + 0x4b7a70e9, 0xb5b32944, 0xdb75092e, 0xc4192623, + 0xad6ea6b0, 0x49a7df7d, 0x9cee60b8, 0x8fedb266, + 0xecaa8c71, 0x699a17ff, 0x5664526c, 0xc2b19ee1, + 0x193602a5, 0x75094c29, 0xa0591340, 0xe4183a3e, + 0x3f54989a, 0x5b429d65, 0x6b8fe4d6, 0x99f73fd6, + 0xa1d29c07, 0xefe830f5, 0x4d2d38e6, 0xf0255dc1, + 0x4cdd2086, 0x8470eb26, 0x6382e9c6, 0x021ecc5e, + 0x09686b3f, 0x3ebaefc9, 0x3c971814, 0x6b6a70a1, + 0x687f3584, 0x52a0e286, 0xb79c5305, 0xaa500737, + 0x3e07841c, 0x7fdeae5c, 0x8e7d44ec, 0x5716f2b8, + 0xb03ada37, 0xf0500c0d, 0xf01c1f04, 0x0200b3ff, + 0xae0cf51a, 0x3cb574b2, 0x25837a58, 0xdc0921bd, + 0xd19113f9, 0x7ca92ff6, 0x94324773, 0x22f54701, + 0x3ae5e581, 0x37c2dadc, 0xc8b57634, 0x9af3dda7, + 0xa9446146, 0x0fd0030e, 0xecc8c73e, 0xa4751e41, + 0xe238cd99, 0x3bea0e2f, 0x3280bba1, 0x183eb331, + 0x4e548b38, 0x4f6db908, 0x6f420d03, 0xf60a04bf, + 0x2cb81290, 0x24977c79, 0x5679b072, 0xbcaf89af, + 0xde9a771f, 0xd9930810, 0xb38bae12, 0xdccf3f2e, + 0x5512721f, 0x2e6b7124, 0x501adde6, 0x9f84cd87, + 0x7a584718, 0x7408da17, 0xbc9f9abc, 0xe94b7d8c, + 0xec7aec3a, 0xdb851dfa, 0x63094366, 0xc464c3d2, + 0xef1c1847, 0x3215d908, 0xdd433b37, 0x24c2ba16, + 0x12a14d43, 0x2a65c451, 0x50940002, 0x133ae4dd, + 0x71dff89e, 0x10314e55, 0x81ac77d6, 0x5f11199b, + 0x043556f1, 0xd7a3c76b, 0x3c11183b, 0x5924a509, + 0xf28fe6ed, 0x97f1fbfa, 0x9ebabf2c, 0x1e153c6e, + 0x86e34570, 0xeae96fb1, 0x860e5e0a, 0x5a3e2ab3, + 0x771fe71c, 0x4e3d06fa, 0x2965dcb9, 0x99e71d0f, + 0x803e89d6, 0x5266c825, 0x2e4cc978, 0x9c10b36a, + 0xc6150eba, 0x94e2ea78, 0xa5fc3c53, 0x1e0a2df4, + 0xf2f74ea7, 0x361d2b3d, 0x1939260f, 0x19c27960, + 0x5223a708, 0xf71312b6, 0xebadfe6e, 0xeac31f66, + 0xe3bc4595, 0xa67bc883, 0xb17f37d1, 0x018cff28, + 0xc332ddef, 0xbe6c5aa5, 0x65582185, 0x68ab9802, + 0xeecea50f, 0xdb2f953b, 0x2aef7dad, 0x5b6e2f84, + 0x1521b628, 0x29076170, 0xecdd4775, 0x619f1510, + 0x13cca830, 0xeb61bd96, 0x0334fe1e, 0xaa0363cf, + 0xb5735c90, 0x4c70a239, 0xd59e9e0b, 0xcbaade14, + 0xeecc86bc, 0x60622ca7, 0x9cab5cab, 0xb2f3846e, + 0x648b1eaf, 0x19bdf0ca, 0xa02369b9, 0x655abb50, + 0x40685a32, 0x3c2ab4b3, 0x319ee9d5, 0xc021b8f7, + 0x9b540b19, 0x875fa099, 0x95f7997e, 0x623d7da8, + 0xf837889a, 0x97e32d77, 0x11ed935f, 0x16681281, + 0x0e358829, 0xc7e61fd6, 0x96dedfa1, 0x7858ba99, + 0x57f584a5, 0x1b227263, 0x9b83c3ff, 0x1ac24696, + 0xcdb30aeb, 0x532e3054, 0x8fd948e4, 0x6dbc3128, + 0x58ebf2ef, 0x34c6ffea, 0xfe28ed61, 0xee7c3c73, + 0x5d4a14d9, 0xe864b7e3, 0x42105d14, 0x203e13e0, + 0x45eee2b6, 0xa3aaabea, 0xdb6c4f15, 0xfacb4fd0, + 0xc742f442, 0xef6abbb5, 0x654f3b1d, 0x41cd2105, + 0xd81e799e, 0x86854dc7, 0xe44b476a, 0x3d816250, + 0xcf62a1f2, 0x5b8d2646, 0xfc8883a0, 0xc1c7b6a3, + 0x7f1524c3, 0x69cb7492, 0x47848a0b, 0x5692b285, + 0x095bbf00, 0xad19489d, 0x1462b174, 0x23820e00, + 0x58428d2a, 0x0c55f5ea, 0x1dadf43e, 0x233f7061, + 0x3372f092, 0x8d937e41, 0xd65fecf1, 0x6c223bdb, + 0x7cde3759, 0xcbee7460, 0x4085f2a7, 0xce77326e, + 0xa6078084, 0x19f8509e, 0xe8efd855, 0x61d99735, + 0xa969a7aa, 0xc50c06c2, 0x5a04abfc, 0x800bcadc, + 0x9e447a2e, 0xc3453484, 0xfdd56705, 0x0e1e9ec9, + 0xdb73dbd3, 0x105588cd, 0x675fda79, 0xe3674340, + 0xc5c43465, 0x713e38d8, 0x3d28f89e, 0xf16dff20, + 0x153e21e7, 0x8fb03d4a, 0xe6e39f2b, 0xdb83adf7 + }, { + 0xe93d5a68, 0x948140f7, 0xf64c261c, 0x94692934, + 0x411520f7, 0x7602d4f7, 0xbcf46b2e, 0xd4a20068, + 0xd4082471, 0x3320f46a, 0x43b7d4b7, 0x500061af, + 0x1e39f62e, 0x97244546, 0x14214f74, 0xbf8b8840, + 0x4d95fc1d, 0x96b591af, 0x70f4ddd3, 0x66a02f45, + 0xbfbc09ec, 0x03bd9785, 0x7fac6dd0, 0x31cb8504, + 0x96eb27b3, 0x55fd3941, 0xda2547e6, 0xabca0a9a, + 0x28507825, 0x530429f4, 0x0a2c86da, 0xe9b66dfb, + 0x68dc1462, 0xd7486900, 0x680ec0a4, 0x27a18dee, + 0x4f3ffea2, 0xe887ad8c, 0xb58ce006, 0x7af4d6b6, + 0xaace1e7c, 0xd3375fec, 0xce78a399, 0x406b2a42, + 0x20fe9e35, 0xd9f385b9, 0xee39d7ab, 0x3b124e8b, + 0x1dc9faf7, 0x4b6d1856, 0x26a36631, 0xeae397b2, + 0x3a6efa74, 0xdd5b4332, 0x6841e7f7, 0xca7820fb, + 0xfb0af54e, 0xd8feb397, 0x454056ac, 0xba489527, + 0x55533a3a, 0x20838d87, 0xfe6ba9b7, 0xd096954b, + 0x55a867bc, 0xa1159a58, 0xcca92963, 0x99e1db33, + 0xa62a4a56, 0x3f3125f9, 0x5ef47e1c, 0x9029317c, + 0xfdf8e802, 0x04272f70, 0x80bb155c, 0x05282ce3, + 0x95c11548, 0xe4c66d22, 0x48c1133f, 0xc70f86dc, + 0x07f9c9ee, 0x41041f0f, 0x404779a4, 0x5d886e17, + 0x325f51eb, 0xd59bc0d1, 0xf2bcc18f, 0x41113564, + 0x257b7834, 0x602a9c60, 0xdff8e8a3, 0x1f636c1b, + 0x0e12b4c2, 0x02e1329e, 0xaf664fd1, 0xcad18115, + 0x6b2395e0, 0x333e92e1, 0x3b240b62, 0xeebeb922, + 0x85b2a20e, 0xe6ba0d99, 0xde720c8c, 0x2da2f728, + 0xd0127845, 0x95b794fd, 0x647d0862, 0xe7ccf5f0, + 0x5449a36f, 0x877d48fa, 0xc39dfd27, 0xf33e8d1e, + 0x0a476341, 0x992eff74, 0x3a6f6eab, 0xf4f8fd37, + 0xa812dc60, 0xa1ebddf8, 0x991be14c, 0xdb6e6b0d, + 0xc67b5510, 0x6d672c37, 0x2765d43b, 0xdcd0e804, + 0xf1290dc7, 0xcc00ffa3, 0xb5390f92, 0x690fed0b, + 0x667b9ffb, 0xcedb7d9c, 0xa091cf0b, 0xd9155ea3, + 0xbb132f88, 0x515bad24, 0x7b9479bf, 0x763bd6eb, + 0x37392eb3, 0xcc115979, 0x8026e297, 0xf42e312d, + 0x6842ada7, 0xc66a2b3b, 0x12754ccc, 0x782ef11c, + 0x6a124237, 0xb79251e7, 0x06a1bbe6, 0x4bfb6350, + 0x1a6b1018, 0x11caedfa, 0x3d25bdd8, 0xe2e1c3c9, + 0x44421659, 0x0a121386, 0xd90cec6e, 0xd5abea2a, + 0x64af674e, 0xda86a85f, 0xbebfe988, 0x64e4c3fe, + 0x9dbc8057, 0xf0f7c086, 0x60787bf8, 0x6003604d, + 0xd1fd8346, 0xf6381fb0, 0x7745ae04, 0xd736fccc, + 0x83426b33, 0xf01eab71, 0xb0804187, 0x3c005e5f, + 0x77a057be, 0xbde8ae24, 0x55464299, 0xbf582e61, + 0x4e58f48f, 0xf2ddfda2, 0xf474ef38, 0x8789bdc2, + 0x5366f9c3, 0xc8b38e74, 0xb475f255, 0x46fcd9b9, + 0x7aeb2661, 0x8b1ddf84, 0x846a0e79, 0x915f95e2, + 0x466e598e, 0x20b45770, 0x8cd55591, 0xc902de4c, + 0xb90bace1, 0xbb8205d0, 0x11a86248, 0x7574a99e, + 0xb77f19b6, 0xe0a9dc09, 0x662d09a1, 0xc4324633, + 0xe85a1f02, 0x09f0be8c, 0x4a99a025, 0x1d6efe10, + 0x1ab93d1d, 0x0ba5a4df, 0xa186f20f, 0x2868f169, + 0xdcb7da83, 0x573906fe, 0xa1e2ce9b, 0x4fcd7f52, + 0x50115e01, 0xa70683fa, 0xa002b5c4, 0x0de6d027, + 0x9af88c27, 0x773f8641, 0xc3604c06, 0x61a806b5, + 0xf0177a28, 0xc0f586e0, 0x006058aa, 0x30dc7d62, + 0x11e69ed7, 0x2338ea63, 0x53c2dd94, 0xc2c21634, + 0xbbcbee56, 0x90bcb6de, 0xebfc7da1, 0xce591d76, + 0x6f05e409, 0x4b7c0188, 0x39720a3d, 0x7c927c24, + 0x86e3725f, 0x724d9db9, 0x1ac15bb4, 0xd39eb8fc, + 0xed545578, 0x08fca5b5, 0xd83d7cd3, 0x4dad0fc4, + 0x1e50ef5e, 0xb161e6f8, 0xa28514d9, 0x6c51133c, + 0x6fd5c7e7, 0x56e14ec4, 0x362abfce, 0xddc6c837, + 0xd79a3234, 0x92638212, 0x670efa8e, 0x406000e0 + }, { + 0x3a39ce37, 0xd3faf5cf, 0xabc27737, 0x5ac52d1b, + 0x5cb0679e, 0x4fa33742, 0xd3822740, 0x99bc9bbe, + 0xd5118e9d, 0xbf0f7315, 0xd62d1c7e, 0xc700c47b, + 0xb78c1b6b, 0x21a19045, 0xb26eb1be, 0x6a366eb4, + 0x5748ab2f, 0xbc946e79, 0xc6a376d2, 0x6549c2c8, + 0x530ff8ee, 0x468dde7d, 0xd5730a1d, 0x4cd04dc6, + 0x2939bbdb, 0xa9ba4650, 0xac9526e8, 0xbe5ee304, + 0xa1fad5f0, 0x6a2d519a, 0x63ef8ce2, 0x9a86ee22, + 0xc089c2b8, 0x43242ef6, 0xa51e03aa, 0x9cf2d0a4, + 0x83c061ba, 0x9be96a4d, 0x8fe51550, 0xba645bd6, + 0x2826a2f9, 0xa73a3ae1, 0x4ba99586, 0xef5562e9, + 0xc72fefd3, 0xf752f7da, 0x3f046f69, 0x77fa0a59, + 0x80e4a915, 0x87b08601, 0x9b09e6ad, 0x3b3ee593, + 0xe990fd5a, 0x9e34d797, 0x2cf0b7d9, 0x022b8b51, + 0x96d5ac3a, 0x017da67d, 0xd1cf3ed6, 0x7c7d2d28, + 0x1f9f25cf, 0xadf2b89b, 0x5ad6b472, 0x5a88f54c, + 0xe029ac71, 0xe019a5e6, 0x47b0acfd, 0xed93fa9b, + 0xe8d3c48d, 0x283b57cc, 0xf8d56629, 0x79132e28, + 0x785f0191, 0xed756055, 0xf7960e44, 0xe3d35e8c, + 0x15056dd4, 0x88f46dba, 0x03a16125, 0x0564f0bd, + 0xc3eb9e15, 0x3c9057a2, 0x97271aec, 0xa93a072a, + 0x1b3f6d9b, 0x1e6321f5, 0xf59c66fb, 0x26dcf319, + 0x7533d928, 0xb155fdf5, 0x03563482, 0x8aba3cbb, + 0x28517711, 0xc20ad9f8, 0xabcc5167, 0xccad925f, + 0x4de81751, 0x3830dc8e, 0x379d5862, 0x9320f991, + 0xea7a90c2, 0xfb3e7bce, 0x5121ce64, 0x774fbe32, + 0xa8b6e37e, 0xc3293d46, 0x48de5369, 0x6413e680, + 0xa2ae0810, 0xdd6db224, 0x69852dfd, 0x09072166, + 0xb39a460a, 0x6445c0dd, 0x586cdecf, 0x1c20c8ae, + 0x5bbef7dd, 0x1b588d40, 0xccd2017f, 0x6bb4e3bb, + 0xdda26a7e, 0x3a59ff45, 0x3e350a44, 0xbcb4cdd5, + 0x72eacea8, 0xfa6484bb, 0x8d6612ae, 0xbf3c6f47, + 0xd29be463, 0x542f5d9e, 0xaec2771b, 0xf64e6370, + 0x740e0d8d, 0xe75b1357, 0xf8721671, 0xaf537d5d, + 0x4040cb08, 0x4eb4e2cc, 0x34d2466a, 0x0115af84, + 0xe1b00428, 0x95983a1d, 0x06b89fb4, 0xce6ea048, + 0x6f3f3b82, 0x3520ab82, 0x011a1d4b, 0x277227f8, + 0x611560b1, 0xe7933fdc, 0xbb3a792b, 0x344525bd, + 0xa08839e1, 0x51ce794b, 0x2f32c9b7, 0xa01fbac9, + 0xe01cc87e, 0xbcc7d1f6, 0xcf0111c3, 0xa1e8aac7, + 0x1a908749, 0xd44fbd9a, 0xd0dadecb, 0xd50ada38, + 0x0339c32a, 0xc6913667, 0x8df9317c, 0xe0b12b4f, + 0xf79e59b7, 0x43f5bb3a, 0xf2d519ff, 0x27d9459c, + 0xbf97222c, 0x15e6fc2a, 0x0f91fc71, 0x9b941525, + 0xfae59361, 0xceb69ceb, 0xc2a86459, 0x12baa8d1, + 0xb6c1075e, 0xe3056a0c, 0x10d25065, 0xcb03a442, + 0xe0ec6e0e, 0x1698db3b, 0x4c98a0be, 0x3278e964, + 0x9f1f9532, 0xe0d392df, 0xd3a0342b, 0x8971f21e, + 0x1b0a7441, 0x4ba3348c, 0xc5be7120, 0xc37632d8, + 0xdf359f8d, 0x9b992f2e, 0xe60b6f47, 0x0fe3f11d, + 0xe54cda54, 0x1edad891, 0xce6279cf, 0xcd3e7e6f, + 0x1618b166, 0xfd2c1d05, 0x848fd2c5, 0xf6fb2299, + 0xf523f357, 0xa6327623, 0x93a83531, 0x56cccd02, + 0xacf08162, 0x5a75ebb5, 0x6e163697, 0x88d273cc, + 0xde966292, 0x81b949d0, 0x4c50901b, 0x71c65614, + 0xe6c6c7bd, 0x327a140a, 0x45e1d006, 0xc3f27b9a, + 0xc9aa53fd, 0x62a80f00, 0xbb25bfe2, 0x35bdd2f6, + 0x71126905, 0xb2040222, 0xb6cbcf7c, 0xcd769c2b, + 0x53113ec0, 0x1640e3d3, 0x38abbd60, 0x2547adf0, + 0xba38209c, 0xf746ce76, 0x77afa1c5, 0x20756060, + 0x85cbfe4e, 0x8ae88dd8, 0x7aaaf9b0, 0x4cf9aa7e, + 0x1948c25c, 0x02fb8a8c, 0x01c36ae4, 0xd6ebe1f9, + 0x90d4f869, 0xa65cdea0, 0x3f09252d, 0xc208e69f, + 0xb74e6132, 0xce77e25b, 0x578fdfe3, 0x3ac372e6 + } + }, { + 0x243f6a88, 0x85a308d3, 0x13198a2e, 0x03707344, + 0xa4093822, 0x299f31d0, 0x082efa98, 0xec4e6c89, + 0x452821e6, 0x38d01377, 0xbe5466cf, 0x34e90c6c, + 0xc0ac29b7, 0xc97c50dd, 0x3f84d5b5, 0xb5470917, + 0x9216d5d9, 0x8979fb1b + } +}; + +static unsigned char BF_itoa64[64 + 1] = + "./ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; + +static unsigned char BF_atoi64[0x60] = { + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 0, 1, + 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 64, 64, 64, 64, 64, + 64, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, + 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 64, 64, 64, 64, 64, + 64, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, + 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 64, 64, 64, 64, 64 +}; + +#define BF_safe_atoi64(dst, src) \ +{ \ + tmp = (unsigned char)(src); \ + if ((unsigned int)(tmp -= 0x20) >= 0x60) return -1; \ + tmp = BF_atoi64[tmp]; \ + if (tmp > 63) return -1; \ + (dst) = tmp; \ +} + +static int BF_decode(BF_word *dst, const char *src, int size) +{ + unsigned char *dptr = (unsigned char *)dst; + unsigned char *end = dptr + size; + const unsigned char *sptr = (const unsigned char *)src; + unsigned int tmp, c1, c2, c3, c4; + + do { + BF_safe_atoi64(c1, *sptr++); + BF_safe_atoi64(c2, *sptr++); + *dptr++ = (c1 << 2) | ((c2 & 0x30) >> 4); + if (dptr >= end) break; + + BF_safe_atoi64(c3, *sptr++); + *dptr++ = ((c2 & 0x0F) << 4) | ((c3 & 0x3C) >> 2); + if (dptr >= end) break; + + BF_safe_atoi64(c4, *sptr++); + *dptr++ = ((c3 & 0x03) << 6) | c4; + } while (dptr < end); + + return 0; +} + +static void BF_encode(char *dst, const BF_word *src, int size) +{ + const unsigned char *sptr = (const unsigned char *)src; + const unsigned char *end = sptr + size; + unsigned char *dptr = (unsigned char *)dst; + unsigned int c1, c2; + + do { + c1 = *sptr++; + *dptr++ = BF_itoa64[c1 >> 2]; + c1 = (c1 & 0x03) << 4; + if (sptr >= end) { + *dptr++ = BF_itoa64[c1]; + break; + } + + c2 = *sptr++; + c1 |= c2 >> 4; + *dptr++ = BF_itoa64[c1]; + c1 = (c2 & 0x0f) << 2; + if (sptr >= end) { + *dptr++ = BF_itoa64[c1]; + break; + } + + c2 = *sptr++; + c1 |= c2 >> 6; + *dptr++ = BF_itoa64[c1]; + *dptr++ = BF_itoa64[c2 & 0x3f]; + } while (sptr < end); +} + +static void BF_swap(BF_word *x, int count) +{ + static int endianness_check = 1; + char *is_little_endian = (char *)&endianness_check; + BF_word tmp; + + if (*is_little_endian) + do { + tmp = *x; + tmp = (tmp << 16) | (tmp >> 16); + *x++ = ((tmp & 0x00FF00FF) << 8) | ((tmp >> 8) & 0x00FF00FF); + } while (--count); +} + +#if BF_SCALE +/* Architectures which can shift addresses left by 2 bits with no extra cost */ +#define BF_ROUND(L, R, N) \ + tmp1 = L & 0xFF; \ + tmp2 = L >> 8; \ + tmp2 &= 0xFF; \ + tmp3 = L >> 16; \ + tmp3 &= 0xFF; \ + tmp4 = L >> 24; \ + tmp1 = data.ctx.S[3][tmp1]; \ + tmp2 = data.ctx.S[2][tmp2]; \ + tmp3 = data.ctx.S[1][tmp3]; \ + tmp3 += data.ctx.S[0][tmp4]; \ + tmp3 ^= tmp2; \ + R ^= data.ctx.P[N + 1]; \ + tmp3 += tmp1; \ + R ^= tmp3; +#else +/* Architectures with no complicated addressing modes supported */ +#define BF_INDEX(S, i) \ + (*((BF_word *)(((unsigned char *)S) + (i)))) +#define BF_ROUND(L, R, N) \ + tmp1 = L & 0xFF; \ + tmp1 <<= 2; \ + tmp2 = L >> 6; \ + tmp2 &= 0x3FC; \ + tmp3 = L >> 14; \ + tmp3 &= 0x3FC; \ + tmp4 = L >> 22; \ + tmp4 &= 0x3FC; \ + tmp1 = BF_INDEX(data.ctx.S[3], tmp1); \ + tmp2 = BF_INDEX(data.ctx.S[2], tmp2); \ + tmp3 = BF_INDEX(data.ctx.S[1], tmp3); \ + tmp3 += BF_INDEX(data.ctx.S[0], tmp4); \ + tmp3 ^= tmp2; \ + R ^= data.ctx.P[N + 1]; \ + tmp3 += tmp1; \ + R ^= tmp3; +#endif + +/* + * Encrypt one block, BF_N is hardcoded here. + */ +#define BF_ENCRYPT \ + L ^= data.ctx.P[0]; \ + BF_ROUND(L, R, 0); \ + BF_ROUND(R, L, 1); \ + BF_ROUND(L, R, 2); \ + BF_ROUND(R, L, 3); \ + BF_ROUND(L, R, 4); \ + BF_ROUND(R, L, 5); \ + BF_ROUND(L, R, 6); \ + BF_ROUND(R, L, 7); \ + BF_ROUND(L, R, 8); \ + BF_ROUND(R, L, 9); \ + BF_ROUND(L, R, 10); \ + BF_ROUND(R, L, 11); \ + BF_ROUND(L, R, 12); \ + BF_ROUND(R, L, 13); \ + BF_ROUND(L, R, 14); \ + BF_ROUND(R, L, 15); \ + tmp4 = R; \ + R = L; \ + L = tmp4 ^ data.ctx.P[BF_N + 1]; + +#if BF_ASM +#define BF_body() \ + _BF_body_r(&data.ctx); +#else +#define BF_body() \ + L = R = 0; \ + ptr = data.ctx.P; \ + do { \ + ptr += 2; \ + BF_ENCRYPT; \ + *(ptr - 2) = L; \ + *(ptr - 1) = R; \ + } while (ptr < &data.ctx.P[BF_N + 2]); \ +\ + ptr = data.ctx.S[0]; \ + do { \ + ptr += 2; \ + BF_ENCRYPT; \ + *(ptr - 2) = L; \ + *(ptr - 1) = R; \ + } while (ptr < &data.ctx.S[3][0xFF]); +#endif + +static void BF_set_key(const char *key, BF_key expanded, BF_key initial, + unsigned char flags) +{ + const char *ptr = key; + unsigned int bug, i, j; + BF_word safety, sign, diff, tmp[2]; + +/* + * There was a sign extension bug in older revisions of this function. While + * we would have liked to simply fix the bug and move on, we have to provide + * a backwards compatibility feature (essentially the bug) for some systems and + * a safety measure for some others. The latter is needed because for certain + * multiple inputs to the buggy algorithm there exist easily found inputs to + * the correct algorithm that produce the same hash. Thus, we optionally + * deviate from the correct algorithm just enough to avoid such collisions. + * While the bug itself affected the majority of passwords containing + * characters with the 8th bit set (although only a percentage of those in a + * collision-producing way), the anti-collision safety measure affects + * only a subset of passwords containing the '\xff' character (not even all of + * those passwords, just some of them). This character is not found in valid + * UTF-8 sequences and is rarely used in popular 8-bit character encodings. + * Thus, the safety measure is unlikely to cause much annoyance, and is a + * reasonable tradeoff to use when authenticating against existing hashes that + * are not reliably known to have been computed with the correct algorithm. + * + * We use an approach that tries to minimize side-channel leaks of password + * information - that is, we mostly use fixed-cost bitwise operations instead + * of branches or table lookups. (One conditional branch based on password + * length remains. It is not part of the bug aftermath, though, and is + * difficult and possibly unreasonable to avoid given the use of C strings by + * the caller, which results in similar timing leaks anyway.) + * + * For actual implementation, we set an array index in the variable "bug" + * (0 means no bug, 1 means sign extension bug emulation) and a flag in the + * variable "safety" (bit 16 is set when the safety measure is requested). + * Valid combinations of settings are: + * + * Prefix "$2a$": bug = 0, safety = 0x10000 + * Prefix "$2b$": bug = 0, safety = 0 + * Prefix "$2x$": bug = 1, safety = 0 + * Prefix "$2y$": bug = 0, safety = 0 + */ + bug = (unsigned int)flags & 1; + safety = ((BF_word)flags & 2) << 15; + + sign = diff = 0; + + for (i = 0; i < BF_N + 2; i++) { + tmp[0] = tmp[1] = 0; + for (j = 0; j < 4; j++) { + tmp[0] <<= 8; + tmp[0] |= (unsigned char)*ptr; /* correct */ + tmp[1] <<= 8; + tmp[1] |= (BF_word_signed)(signed char)*ptr; /* bug */ +/* + * Sign extension in the first char has no effect - nothing to overwrite yet, + * and those extra 24 bits will be fully shifted out of the 32-bit word. For + * chars 2, 3, 4 in each four-char block, we set bit 7 of "sign" if sign + * extension in tmp[1] occurs. Once this flag is set, it remains set. + */ + if (j) + sign |= tmp[1] & 0x80; + if (!*ptr) + ptr = key; + else + ptr++; + } + diff |= tmp[0] ^ tmp[1]; /* Non-zero on any differences */ + + expanded[i] = tmp[bug]; + initial[i] = BF_init_state.P[i] ^ tmp[bug]; + } + +/* + * At this point, "diff" is zero iff the correct and buggy algorithms produced + * exactly the same result. If so and if "sign" is non-zero, which indicates + * that there was a non-benign sign extension, this means that we have a + * collision between the correctly computed hash for this password and a set of + * passwords that could be supplied to the buggy algorithm. Our safety measure + * is meant to protect from such many-buggy to one-correct collisions, by + * deviating from the correct algorithm in such cases. Let's check for this. + */ + diff |= diff >> 16; /* still zero iff exact match */ + diff &= 0xffff; /* ditto */ + diff += 0xffff; /* bit 16 set iff "diff" was non-zero (on non-match) */ + sign <<= 9; /* move the non-benign sign extension flag to bit 16 */ + sign &= ~diff & safety; /* action needed? */ + +/* + * If we have determined that we need to deviate from the correct algorithm, + * flip bit 16 in initial expanded key. (The choice of 16 is arbitrary, but + * let's stick to it now. It came out of the approach we used above, and it's + * not any worse than any other choice we could make.) + * + * It is crucial that we don't do the same to the expanded key used in the main + * Eksblowfish loop. By doing it to only one of these two, we deviate from a + * state that could be directly specified by a password to the buggy algorithm + * (and to the fully correct one as well, but that's a side-effect). + */ + initial[0] ^= sign; +} + +static const unsigned char flags_by_subtype[26] = + {2, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 4, 0}; + +static char *BF_crypt(const char *key, const char *setting, + char *output, int size, + BF_word min) +{ +#if BF_ASM + extern void _BF_body_r(BF_ctx *ctx); +#endif + struct { + BF_ctx ctx; + BF_key expanded_key; + union { + BF_word salt[4]; + BF_word output[6]; + } binary; + } data; + BF_word L, R; + BF_word tmp1, tmp2, tmp3, tmp4; + BF_word *ptr; + BF_word count; + int i; + + if (size < 7 + 22 + 31 + 1) { + __set_errno(ERANGE); + return NULL; + } + + if (setting[0] != '$' || + setting[1] != '2' || + setting[2] < 'a' || setting[2] > 'z' || + !flags_by_subtype[(unsigned int)(unsigned char)setting[2] - 'a'] || + setting[3] != '$' || + setting[4] < '0' || setting[4] > '3' || + setting[5] < '0' || setting[5] > '9' || + (setting[4] == '3' && setting[5] > '1') || + setting[6] != '$') { + __set_errno(EINVAL); + return NULL; + } + + count = (BF_word)1 << ((setting[4] - '0') * 10 + (setting[5] - '0')); + if (count < min || BF_decode(data.binary.salt, &setting[7], 16)) { + __set_errno(EINVAL); + return NULL; + } + BF_swap(data.binary.salt, 4); + + BF_set_key(key, data.expanded_key, data.ctx.P, + flags_by_subtype[(unsigned int)(unsigned char)setting[2] - 'a']); + + memcpy(data.ctx.S, BF_init_state.S, sizeof(data.ctx.S)); + + L = R = 0; + for (i = 0; i < BF_N + 2; i += 2) { + L ^= data.binary.salt[i & 2]; + R ^= data.binary.salt[(i & 2) + 1]; + BF_ENCRYPT; + data.ctx.P[i] = L; + data.ctx.P[i + 1] = R; + } + + ptr = data.ctx.S[0]; + do { + ptr += 4; + L ^= data.binary.salt[(BF_N + 2) & 3]; + R ^= data.binary.salt[(BF_N + 3) & 3]; + BF_ENCRYPT; + *(ptr - 4) = L; + *(ptr - 3) = R; + + L ^= data.binary.salt[(BF_N + 4) & 3]; + R ^= data.binary.salt[(BF_N + 5) & 3]; + BF_ENCRYPT; + *(ptr - 2) = L; + *(ptr - 1) = R; + } while (ptr < &data.ctx.S[3][0xFF]); + + do { + int done; + + for (i = 0; i < BF_N + 2; i += 2) { + data.ctx.P[i] ^= data.expanded_key[i]; + data.ctx.P[i + 1] ^= data.expanded_key[i + 1]; + } + + done = 0; + do { + BF_body(); + if (done) + break; + done = 1; + + tmp1 = data.binary.salt[0]; + tmp2 = data.binary.salt[1]; + tmp3 = data.binary.salt[2]; + tmp4 = data.binary.salt[3]; + for (i = 0; i < BF_N; i += 4) { + data.ctx.P[i] ^= tmp1; + data.ctx.P[i + 1] ^= tmp2; + data.ctx.P[i + 2] ^= tmp3; + data.ctx.P[i + 3] ^= tmp4; + } + data.ctx.P[16] ^= tmp1; + data.ctx.P[17] ^= tmp2; + } while (1); + } while (--count); + + for (i = 0; i < 6; i += 2) { + L = BF_magic_w[i]; + R = BF_magic_w[i + 1]; + + count = 64; + do { + BF_ENCRYPT; + } while (--count); + + data.binary.output[i] = L; + data.binary.output[i + 1] = R; + } + + memcpy(output, setting, 7 + 22 - 1); + output[7 + 22 - 1] = BF_itoa64[(int) + BF_atoi64[(int)setting[7 + 22 - 1] - 0x20] & 0x30]; + +/* This has to be bug-compatible with the original implementation, so + * only encode 23 of the 24 bytes. :-) */ + BF_swap(data.binary.output, 6); + BF_encode(&output[7 + 22], data.binary.output, 23); + output[7 + 22 + 31] = '\0'; + + return output; +} + +int _crypt_output_magic(const char *setting, char *output, int size) +{ + if (size < 3) + return -1; + + output[0] = '*'; + output[1] = '0'; + output[2] = '\0'; + + if (setting[0] == '*' && setting[1] == '0') + output[1] = '1'; + + return 0; +} + +/* + * Please preserve the runtime self-test. It serves two purposes at once: + * + * 1. We really can't afford the risk of producing incompatible hashes e.g. + * when there's something like gcc bug 26587 again, whereas an application or + * library integrating this code might not also integrate our external tests or + * it might not run them after every build. Even if it does, the miscompile + * might only occur on the production build, but not on a testing build (such + * as because of different optimization settings). It is painful to recover + * from incorrectly-computed hashes - merely fixing whatever broke is not + * enough. Thus, a proactive measure like this self-test is needed. + * + * 2. We don't want to leave sensitive data from our actual password hash + * computation on the stack or in registers. Previous revisions of the code + * would do explicit cleanups, but simply running the self-test after hash + * computation is more reliable. + * + * The performance cost of this quick self-test is around 0.6% at the "$2a$08" + * setting. + */ +char *_crypt_blowfish_rn(const char *key, const char *setting, + char *output, int size) +{ + const char *test_key = "8b \xd0\xc1\xd2\xcf\xcc\xd8"; + const char *test_setting = "$2a$00$abcdefghijklmnopqrstuu"; + static const char * const test_hashes[2] = + {"i1D709vfamulimlGcq0qq3UvuUasvEa\0\x55", /* 'a', 'b', 'y' */ + "VUrPmXD6q/nVSSp7pNDhCR9071IfIRe\0\x55"}; /* 'x' */ + const char *test_hash = test_hashes[0]; + char *retval; + const char *p; + int save_errno, ok; + struct { + char s[7 + 22 + 1]; + char o[7 + 22 + 31 + 1 + 1 + 1]; + } buf; + +/* Hash the supplied password */ + _crypt_output_magic(setting, output, size); + retval = BF_crypt(key, setting, output, size, 16); + save_errno = errno; + +/* + * Do a quick self-test. It is important that we make both calls to BF_crypt() + * from the same scope such that they likely use the same stack locations, + * which makes the second call overwrite the first call's sensitive data on the + * stack and makes it more likely that any alignment related issues would be + * detected by the self-test. + */ + memcpy(buf.s, test_setting, sizeof(buf.s)); + if (retval) { + unsigned int flags = flags_by_subtype[ + (unsigned int)(unsigned char)setting[2] - 'a']; + test_hash = test_hashes[flags & 1]; + buf.s[2] = setting[2]; + } + memset(buf.o, 0x55, sizeof(buf.o)); + buf.o[sizeof(buf.o) - 1] = 0; + p = BF_crypt(test_key, buf.s, buf.o, sizeof(buf.o) - (1 + 1), 1); + + ok = (p == buf.o && + !memcmp(p, buf.s, 7 + 22) && + !memcmp(p + (7 + 22), test_hash, 31 + 1 + 1 + 1)); + + { + const char *k = "\xff\xa3" "34" "\xff\xff\xff\xa3" "345"; + BF_key ae, ai, ye, yi; + BF_set_key(k, ae, ai, 2); /* $2a$ */ + BF_set_key(k, ye, yi, 4); /* $2y$ */ + ai[0] ^= 0x10000; /* undo the safety (for comparison) */ + ok = ok && ai[0] == 0xdb9c59bc && ye[17] == 0x33343500 && + !memcmp(ae, ye, sizeof(ae)) && + !memcmp(ai, yi, sizeof(ai)); + } + + __set_errno(save_errno); + if (ok) + return retval; + +/* Should not happen */ + _crypt_output_magic(setting, output, size); + __set_errno(EINVAL); /* pretend we don't support this hash type */ + return NULL; +} + +char *_crypt_gensalt_blowfish_rn(const char *prefix, unsigned long count, + const char *input, int size, char *output, int output_size) +{ + if (size < 16 || output_size < 7 + 22 + 1 || + (count && (count < 4 || count > 31)) || + prefix[0] != '$' || prefix[1] != '2' || + (prefix[2] != 'a' && prefix[2] != 'b' && prefix[2] != 'y')) { + if (output_size > 0) output[0] = '\0'; + __set_errno((output_size < 7 + 22 + 1) ? ERANGE : EINVAL); + return NULL; + } + + if (!count) count = 5; + + output[0] = '$'; + output[1] = '2'; + output[2] = prefix[2]; + output[3] = '$'; + output[4] = '0' + count / 10; + output[5] = '0' + count % 10; + output[6] = '$'; + + BF_encode(&output[7], (const BF_word *)input, 16); + output[7 + 22] = '\0'; + + return output; +} diff --git a/enet server test/crypt_blowfish/crypt_blowfish.h b/enet server test/crypt_blowfish/crypt_blowfish.h new file mode 100644 index 0000000..2ee0d8c --- /dev/null +++ b/enet server test/crypt_blowfish/crypt_blowfish.h @@ -0,0 +1,27 @@ +/* + * Written by Solar Designer in 2000-2011. + * No copyright is claimed, and the software is hereby placed in the public + * domain. In case this attempt to disclaim copyright and place the software + * in the public domain is deemed null and void, then the software is + * Copyright (c) 2000-2011 Solar Designer and it is hereby released to the + * general public under the following terms: + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted. + * + * There's ABSOLUTELY NO WARRANTY, express or implied. + * + * See crypt_blowfish.c for more information. + */ + +#ifndef _CRYPT_BLOWFISH_H +#define _CRYPT_BLOWFISH_H + +extern int _crypt_output_magic(const char *setting, char *output, int size); +extern char *_crypt_blowfish_rn(const char *key, const char *setting, + char *output, int size); +extern char *_crypt_gensalt_blowfish_rn(const char *prefix, + unsigned long count, + const char *input, int size, char *output, int output_size); + +#endif diff --git a/enet server test/crypt_blowfish/crypt_gensalt.c b/enet server test/crypt_blowfish/crypt_gensalt.c new file mode 100644 index 0000000..73c15a1 --- /dev/null +++ b/enet server test/crypt_blowfish/crypt_gensalt.c @@ -0,0 +1,124 @@ +/* + * Written by Solar Designer in 2000-2011. + * No copyright is claimed, and the software is hereby placed in the public + * domain. In case this attempt to disclaim copyright and place the software + * in the public domain is deemed null and void, then the software is + * Copyright (c) 2000-2011 Solar Designer and it is hereby released to the + * general public under the following terms: + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted. + * + * There's ABSOLUTELY NO WARRANTY, express or implied. + * + * See crypt_blowfish.c for more information. + * + * This file contains salt generation functions for the traditional and + * other common crypt(3) algorithms, except for bcrypt which is defined + * entirely in crypt_blowfish.c. + */ + +#include + +#include +#ifndef __set_errno +#define __set_errno(val) errno = (val) +#endif + +/* Just to make sure the prototypes match the actual definitions */ +#include "crypt_gensalt.h" + +unsigned char _crypt_itoa64[64 + 1] = + "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; + +char *_crypt_gensalt_traditional_rn(const char *prefix, unsigned long count, + const char *input, int size, char *output, int output_size) +{ + (void) prefix; + + if (size < 2 || output_size < 2 + 1 || (count && count != 25)) { + if (output_size > 0) output[0] = '\0'; + __set_errno((output_size < 2 + 1) ? ERANGE : EINVAL); + return NULL; + } + + output[0] = _crypt_itoa64[(unsigned int)input[0] & 0x3f]; + output[1] = _crypt_itoa64[(unsigned int)input[1] & 0x3f]; + output[2] = '\0'; + + return output; +} + +char *_crypt_gensalt_extended_rn(const char *prefix, unsigned long count, + const char *input, int size, char *output, int output_size) +{ + unsigned long value; + + (void) prefix; + +/* Even iteration counts make it easier to detect weak DES keys from a look + * at the hash, so they should be avoided */ + if (size < 3 || output_size < 1 + 4 + 4 + 1 || + (count && (count > 0xffffff || !(count & 1)))) { + if (output_size > 0) output[0] = '\0'; + __set_errno((output_size < 1 + 4 + 4 + 1) ? ERANGE : EINVAL); + return NULL; + } + + if (!count) count = 725; + + output[0] = '_'; + output[1] = _crypt_itoa64[count & 0x3f]; + output[2] = _crypt_itoa64[(count >> 6) & 0x3f]; + output[3] = _crypt_itoa64[(count >> 12) & 0x3f]; + output[4] = _crypt_itoa64[(count >> 18) & 0x3f]; + value = (unsigned long)(unsigned char)input[0] | + ((unsigned long)(unsigned char)input[1] << 8) | + ((unsigned long)(unsigned char)input[2] << 16); + output[5] = _crypt_itoa64[value & 0x3f]; + output[6] = _crypt_itoa64[(value >> 6) & 0x3f]; + output[7] = _crypt_itoa64[(value >> 12) & 0x3f]; + output[8] = _crypt_itoa64[(value >> 18) & 0x3f]; + output[9] = '\0'; + + return output; +} + +char *_crypt_gensalt_md5_rn(const char *prefix, unsigned long count, + const char *input, int size, char *output, int output_size) +{ + unsigned long value; + + (void) prefix; + + if (size < 3 || output_size < 3 + 4 + 1 || (count && count != 1000)) { + if (output_size > 0) output[0] = '\0'; + __set_errno((output_size < 3 + 4 + 1) ? ERANGE : EINVAL); + return NULL; + } + + output[0] = '$'; + output[1] = '1'; + output[2] = '$'; + value = (unsigned long)(unsigned char)input[0] | + ((unsigned long)(unsigned char)input[1] << 8) | + ((unsigned long)(unsigned char)input[2] << 16); + output[3] = _crypt_itoa64[value & 0x3f]; + output[4] = _crypt_itoa64[(value >> 6) & 0x3f]; + output[5] = _crypt_itoa64[(value >> 12) & 0x3f]; + output[6] = _crypt_itoa64[(value >> 18) & 0x3f]; + output[7] = '\0'; + + if (size >= 6 && output_size >= 3 + 4 + 4 + 1) { + value = (unsigned long)(unsigned char)input[3] | + ((unsigned long)(unsigned char)input[4] << 8) | + ((unsigned long)(unsigned char)input[5] << 16); + output[7] = _crypt_itoa64[value & 0x3f]; + output[8] = _crypt_itoa64[(value >> 6) & 0x3f]; + output[9] = _crypt_itoa64[(value >> 12) & 0x3f]; + output[10] = _crypt_itoa64[(value >> 18) & 0x3f]; + output[11] = '\0'; + } + + return output; +} diff --git a/enet server test/crypt_blowfish/crypt_gensalt.h b/enet server test/crypt_blowfish/crypt_gensalt.h new file mode 100644 index 0000000..457bbfe --- /dev/null +++ b/enet server test/crypt_blowfish/crypt_gensalt.h @@ -0,0 +1,30 @@ +/* + * Written by Solar Designer in 2000-2011. + * No copyright is claimed, and the software is hereby placed in the public + * domain. In case this attempt to disclaim copyright and place the software + * in the public domain is deemed null and void, then the software is + * Copyright (c) 2000-2011 Solar Designer and it is hereby released to the + * general public under the following terms: + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted. + * + * There's ABSOLUTELY NO WARRANTY, express or implied. + * + * See crypt_blowfish.c for more information. + */ + +#ifndef _CRYPT_GENSALT_H +#define _CRYPT_GENSALT_H + +extern unsigned char _crypt_itoa64[]; +extern char *_crypt_gensalt_traditional_rn(const char *prefix, + unsigned long count, + const char *input, int size, char *output, int output_size); +extern char *_crypt_gensalt_extended_rn(const char *prefix, + unsigned long count, + const char *input, int size, char *output, int output_size); +extern char *_crypt_gensalt_md5_rn(const char *prefix, unsigned long count, + const char *input, int size, char *output, int output_size); + +#endif diff --git a/enet server test/crypt_blowfish/glibc-2.1.3-crypt.diff b/enet server test/crypt_blowfish/glibc-2.1.3-crypt.diff new file mode 100644 index 0000000..415e5b4 --- /dev/null +++ b/enet server test/crypt_blowfish/glibc-2.1.3-crypt.diff @@ -0,0 +1,53 @@ +--- glibc-2.1.3.orig/crypt/sysdeps/unix/Makefile 1997-03-05 00:33:59 +0000 ++++ glibc-2.1.3/crypt/sysdeps/unix/Makefile 2000-06-11 03:13:41 +0000 +@@ -1,4 +1,4 @@ + ifeq ($(subdir),md5-crypt) +-libcrypt-routines += crypt crypt_util +-dont_distribute += crypt.c crypt_util.c ++libcrypt-routines += crypt crypt_util crypt_blowfish x86 crypt_gensalt wrapper ++dont_distribute += crypt.c crypt_util.c crypt_blowfish.c x86.S crypt_gensalt.c wrapper.c + endif +--- glibc-2.1.3.orig/crypt/sysdeps/unix/crypt-entry.c 1998-12-10 12:49:04 +0000 ++++ glibc-2.1.3/crypt/sysdeps/unix/crypt-entry.c 2000-06-11 03:14:57 +0000 +@@ -70,7 +70,7 @@ extern struct crypt_data _ufc_foobar; + */ + + char * +-__crypt_r (key, salt, data) ++__des_crypt_r (key, salt, data) + const char *key; + const char *salt; + struct crypt_data * __restrict data; +@@ -115,6 +115,7 @@ __crypt_r (key, salt, data) + _ufc_output_conversion_r (res[0], res[1], salt, data); + return data->crypt_3_buf; + } ++#if 0 + weak_alias (__crypt_r, crypt_r) + + char * +@@ -147,3 +148,4 @@ __fcrypt (key, salt) + return crypt (key, salt); + } + #endif ++#endif +--- glibc-2.1.3.orig/md5-crypt/Makefile 1998-07-02 22:46:47 +0000 ++++ glibc-2.1.3/md5-crypt/Makefile 2000-06-11 03:12:34 +0000 +@@ -21,7 +21,7 @@ + # + subdir := md5-crypt + +-headers := crypt.h ++headers := crypt.h gnu-crypt.h ow-crypt.h + + distribute := md5.h + +--- glibc-2.1.3.orig/md5-crypt/Versions 1998-07-02 22:32:07 +0000 ++++ glibc-2.1.3/md5-crypt/Versions 2000-06-11 09:11:03 +0000 +@@ -1,5 +1,6 @@ + libcrypt { + GLIBC_2.0 { + crypt; crypt_r; encrypt; encrypt_r; fcrypt; setkey; setkey_r; ++ crypt_rn; crypt_ra; crypt_gensalt; crypt_gensalt_rn; crypt_gensalt_ra; + } + } diff --git a/enet server test/crypt_blowfish/glibc-2.14-crypt.diff b/enet server test/crypt_blowfish/glibc-2.14-crypt.diff new file mode 100644 index 0000000..bacd12e --- /dev/null +++ b/enet server test/crypt_blowfish/glibc-2.14-crypt.diff @@ -0,0 +1,55 @@ +diff -urp glibc-2.14.orig/crypt/Makefile glibc-2.14/crypt/Makefile +--- glibc-2.14.orig/crypt/Makefile 2011-05-31 04:12:33 +0000 ++++ glibc-2.14/crypt/Makefile 2011-07-16 21:40:56 +0000 +@@ -22,6 +22,7 @@ + subdir := crypt + + headers := crypt.h ++headers += gnu-crypt.h ow-crypt.h + + extra-libs := libcrypt + extra-libs-others := $(extra-libs) +@@ -29,6 +30,8 @@ extra-libs-others := $(extra-libs) + libcrypt-routines := crypt-entry md5-crypt sha256-crypt sha512-crypt crypt \ + crypt_util + ++libcrypt-routines += crypt_blowfish x86 crypt_gensalt wrapper ++ + tests := cert md5c-test sha256c-test sha512c-test + + distribute := ufc-crypt.h crypt-private.h ufc.c speeds.c README.ufc-crypt \ +diff -urp glibc-2.14.orig/crypt/Versions glibc-2.14/crypt/Versions +--- glibc-2.14.orig/crypt/Versions 2011-05-31 04:12:33 +0000 ++++ glibc-2.14/crypt/Versions 2011-07-16 21:40:56 +0000 +@@ -1,5 +1,6 @@ + libcrypt { + GLIBC_2.0 { + crypt; crypt_r; encrypt; encrypt_r; fcrypt; setkey; setkey_r; ++ crypt_rn; crypt_ra; crypt_gensalt; crypt_gensalt_rn; crypt_gensalt_ra; + } + } +diff -urp glibc-2.14.orig/crypt/crypt-entry.c glibc-2.14/crypt/crypt-entry.c +--- glibc-2.14.orig/crypt/crypt-entry.c 2011-05-31 04:12:33 +0000 ++++ glibc-2.14/crypt/crypt-entry.c 2011-07-16 21:40:56 +0000 +@@ -82,7 +82,7 @@ extern struct crypt_data _ufc_foobar; + */ + + char * +-__crypt_r (key, salt, data) ++__des_crypt_r (key, salt, data) + const char *key; + const char *salt; + struct crypt_data * __restrict data; +@@ -137,6 +137,7 @@ __crypt_r (key, salt, data) + _ufc_output_conversion_r (res[0], res[1], salt, data); + return data->crypt_3_buf; + } ++#if 0 + weak_alias (__crypt_r, crypt_r) + + char * +@@ -177,3 +178,4 @@ __fcrypt (key, salt) + return crypt (key, salt); + } + #endif ++#endif diff --git a/enet server test/crypt_blowfish/glibc-2.3.6-crypt.diff b/enet server test/crypt_blowfish/glibc-2.3.6-crypt.diff new file mode 100644 index 0000000..4471054 --- /dev/null +++ b/enet server test/crypt_blowfish/glibc-2.3.6-crypt.diff @@ -0,0 +1,52 @@ +--- glibc-2.3.6.orig/crypt/Makefile 2001-07-06 04:54:45 +0000 ++++ glibc-2.3.6/crypt/Makefile 2004-02-27 00:23:48 +0000 +@@ -21,14 +21,14 @@ + # + subdir := crypt + +-headers := crypt.h ++headers := crypt.h gnu-crypt.h ow-crypt.h + + distribute := md5.h + + extra-libs := libcrypt + extra-libs-others := $(extra-libs) + +-libcrypt-routines := crypt-entry md5-crypt md5 crypt crypt_util ++libcrypt-routines := crypt-entry md5-crypt md5 crypt crypt_util crypt_blowfish x86 crypt_gensalt wrapper + + tests = cert md5test md5c-test + +--- glibc-2.3.6.orig/crypt/Versions 2000-03-04 00:47:30 +0000 ++++ glibc-2.3.6/crypt/Versions 2004-02-27 00:25:15 +0000 +@@ -1,5 +1,6 @@ + libcrypt { + GLIBC_2.0 { + crypt; crypt_r; encrypt; encrypt_r; fcrypt; setkey; setkey_r; ++ crypt_rn; crypt_ra; crypt_gensalt; crypt_gensalt_rn; crypt_gensalt_ra; + } + } +--- glibc-2.3.6.orig/crypt/crypt-entry.c 2001-07-06 05:18:49 +0000 ++++ glibc-2.3.6/crypt/crypt-entry.c 2004-02-27 00:12:32 +0000 +@@ -70,7 +70,7 @@ extern struct crypt_data _ufc_foobar; + */ + + char * +-__crypt_r (key, salt, data) ++__des_crypt_r (key, salt, data) + const char *key; + const char *salt; + struct crypt_data * __restrict data; +@@ -115,6 +115,7 @@ __crypt_r (key, salt, data) + _ufc_output_conversion_r (res[0], res[1], salt, data); + return data->crypt_3_buf; + } ++#if 0 + weak_alias (__crypt_r, crypt_r) + + char * +@@ -147,3 +148,4 @@ __fcrypt (key, salt) + return crypt (key, salt); + } + #endif ++#endif diff --git a/enet server test/crypt_blowfish/ow-crypt.h b/enet server test/crypt_blowfish/ow-crypt.h new file mode 100644 index 0000000..2e48794 --- /dev/null +++ b/enet server test/crypt_blowfish/ow-crypt.h @@ -0,0 +1,43 @@ +/* + * Written by Solar Designer in 2000-2011. + * No copyright is claimed, and the software is hereby placed in the public + * domain. In case this attempt to disclaim copyright and place the software + * in the public domain is deemed null and void, then the software is + * Copyright (c) 2000-2011 Solar Designer and it is hereby released to the + * general public under the following terms: + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted. + * + * There's ABSOLUTELY NO WARRANTY, express or implied. + * + * See crypt_blowfish.c for more information. + */ + +#ifndef _OW_CRYPT_H +#define _OW_CRYPT_H + +#ifndef __GNUC__ +#undef __const +#define __const const +#endif + +#ifndef __SKIP_GNU +extern char *crypt(__const char *key, __const char *setting); +extern char *crypt_r(__const char *key, __const char *setting, void *data); +#endif + +#ifndef __SKIP_OW +extern char *crypt_rn(__const char *key, __const char *setting, + void *data, int size); +extern char *crypt_ra(__const char *key, __const char *setting, + void **data, int *size); +extern char *crypt_gensalt(__const char *prefix, unsigned long count, + __const char *input, int size); +extern char *crypt_gensalt_rn(__const char *prefix, unsigned long count, + __const char *input, int size, char *output, int output_size); +extern char *crypt_gensalt_ra(__const char *prefix, unsigned long count, + __const char *input, int size); +#endif + +#endif diff --git a/enet server test/crypt_blowfish/wrapper.c b/enet server test/crypt_blowfish/wrapper.c new file mode 100644 index 0000000..d8b0592 --- /dev/null +++ b/enet server test/crypt_blowfish/wrapper.c @@ -0,0 +1,551 @@ +/* + * Written by Solar Designer in 2000-2014. + * No copyright is claimed, and the software is hereby placed in the public + * domain. In case this attempt to disclaim copyright and place the software + * in the public domain is deemed null and void, then the software is + * Copyright (c) 2000-2014 Solar Designer and it is hereby released to the + * general public under the following terms: + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted. + * + * There's ABSOLUTELY NO WARRANTY, express or implied. + * + * See crypt_blowfish.c for more information. + */ + +#include +#include + +#include +#ifndef __set_errno +#define __set_errno(val) errno = (val) +#endif + +#ifdef TEST +#include +#include +#include +#include +#include +#include +#ifdef TEST_THREADS +#include +#endif +#endif + +#define CRYPT_OUTPUT_SIZE (7 + 22 + 31 + 1) +#define CRYPT_GENSALT_OUTPUT_SIZE (7 + 22 + 1) + +#if defined(__GLIBC__) && defined(_LIBC) +#define __SKIP_GNU +#endif +#include "ow-crypt.h" + +#include "crypt_blowfish.h" +#include "crypt_gensalt.h" + +#if defined(__GLIBC__) && defined(_LIBC) +/* crypt.h from glibc-crypt-2.1 will define struct crypt_data for us */ +#include "crypt.h" +extern char *__md5_crypt_r(const char *key, const char *salt, + char *buffer, int buflen); +/* crypt-entry.c needs to be patched to define __des_crypt_r rather than + * __crypt_r, and not define crypt_r and crypt at all */ +extern char *__des_crypt_r(const char *key, const char *salt, + struct crypt_data *data); +extern struct crypt_data _ufc_foobar; +#endif + +static int _crypt_data_alloc(void **data, int *size, int need) +{ + void *updated; + + if (*data && *size >= need) return 0; + + updated = realloc(*data, need); + + if (!updated) { +#ifndef __GLIBC__ + /* realloc(3) on glibc sets errno, so we don't need to bother */ + __set_errno(ENOMEM); +#endif + return -1; + } + +#if defined(__GLIBC__) && defined(_LIBC) + if (need >= sizeof(struct crypt_data)) + ((struct crypt_data *)updated)->initialized = 0; +#endif + + *data = updated; + *size = need; + + return 0; +} + +static char *_crypt_retval_magic(char *retval, const char *setting, + char *output, int size) +{ + if (retval) + return retval; + + if (_crypt_output_magic(setting, output, size)) + return NULL; /* shouldn't happen */ + + return output; +} + +#if defined(__GLIBC__) && defined(_LIBC) +/* + * Applications may re-use the same instance of struct crypt_data without + * resetting the initialized field in order to let crypt_r() skip some of + * its initialization code. Thus, it is important that our multiple hashing + * algorithms either don't conflict with each other in their use of the + * data area or reset the initialized field themselves whenever required. + * Currently, the hashing algorithms simply have no conflicts: the first + * field of struct crypt_data is the 128-byte large DES key schedule which + * __des_crypt_r() calculates each time it is called while the two other + * hashing algorithms use less than 128 bytes of the data area. + */ + +char *__crypt_rn(__const char *key, __const char *setting, + void *data, int size) +{ + if (setting[0] == '$' && setting[1] == '2') + return _crypt_blowfish_rn(key, setting, (char *)data, size); + if (setting[0] == '$' && setting[1] == '1') + return __md5_crypt_r(key, setting, (char *)data, size); + if (setting[0] == '$' || setting[0] == '_') { + __set_errno(EINVAL); + return NULL; + } + if (size >= sizeof(struct crypt_data)) + return __des_crypt_r(key, setting, (struct crypt_data *)data); + __set_errno(ERANGE); + return NULL; +} + +char *__crypt_ra(__const char *key, __const char *setting, + void **data, int *size) +{ + if (setting[0] == '$' && setting[1] == '2') { + if (_crypt_data_alloc(data, size, CRYPT_OUTPUT_SIZE)) + return NULL; + return _crypt_blowfish_rn(key, setting, (char *)*data, *size); + } + if (setting[0] == '$' && setting[1] == '1') { + if (_crypt_data_alloc(data, size, CRYPT_OUTPUT_SIZE)) + return NULL; + return __md5_crypt_r(key, setting, (char *)*data, *size); + } + if (setting[0] == '$' || setting[0] == '_') { + __set_errno(EINVAL); + return NULL; + } + if (_crypt_data_alloc(data, size, sizeof(struct crypt_data))) + return NULL; + return __des_crypt_r(key, setting, (struct crypt_data *)*data); +} + +char *__crypt_r(__const char *key, __const char *setting, + struct crypt_data *data) +{ + return _crypt_retval_magic( + __crypt_rn(key, setting, data, sizeof(*data)), + setting, (char *)data, sizeof(*data)); +} + +char *__crypt(__const char *key, __const char *setting) +{ + return _crypt_retval_magic( + __crypt_rn(key, setting, &_ufc_foobar, sizeof(_ufc_foobar)), + setting, (char *)&_ufc_foobar, sizeof(_ufc_foobar)); +} +#else +char *crypt_rn(const char *key, const char *setting, void *data, int size) +{ + return _crypt_blowfish_rn(key, setting, (char *)data, size); +} + +char *crypt_ra(const char *key, const char *setting, + void **data, int *size) +{ + if (_crypt_data_alloc(data, size, CRYPT_OUTPUT_SIZE)) + return NULL; + return _crypt_blowfish_rn(key, setting, (char *)*data, *size); +} + +char *crypt_r(const char *key, const char *setting, void *data) +{ + return _crypt_retval_magic( + crypt_rn(key, setting, data, CRYPT_OUTPUT_SIZE), + setting, (char *)data, CRYPT_OUTPUT_SIZE); +} + +char *crypt(const char *key, const char *setting) +{ + static char output[CRYPT_OUTPUT_SIZE]; + + return _crypt_retval_magic( + crypt_rn(key, setting, output, sizeof(output)), + setting, output, sizeof(output)); +} + +#define __crypt_gensalt_rn crypt_gensalt_rn +#define __crypt_gensalt_ra crypt_gensalt_ra +#define __crypt_gensalt crypt_gensalt +#endif + +char *__crypt_gensalt_rn(const char *prefix, unsigned long count, + const char *input, int size, char *output, int output_size) +{ + char *(*use)(const char *_prefix, unsigned long _count, + const char *_input, int _size, + char *_output, int _output_size); + + /* This may be supported on some platforms in the future */ + if (!input) { + __set_errno(EINVAL); + return NULL; + } + + if (!strncmp(prefix, "$2a$", 4) || !strncmp(prefix, "$2b$", 4) || + !strncmp(prefix, "$2y$", 4)) + use = _crypt_gensalt_blowfish_rn; + else + if (!strncmp(prefix, "$1$", 3)) + use = _crypt_gensalt_md5_rn; + else + if (prefix[0] == '_') + use = _crypt_gensalt_extended_rn; + else + if (!prefix[0] || + (prefix[0] && prefix[1] && + memchr(_crypt_itoa64, prefix[0], 64) && + memchr(_crypt_itoa64, prefix[1], 64))) + use = _crypt_gensalt_traditional_rn; + else { + __set_errno(EINVAL); + return NULL; + } + + return use(prefix, count, input, size, output, output_size); +} + +char *__crypt_gensalt_ra(const char *prefix, unsigned long count, + const char *input, int size) +{ + char output[CRYPT_GENSALT_OUTPUT_SIZE]; + char *retval; + + retval = __crypt_gensalt_rn(prefix, count, + input, size, output, sizeof(output)); + + if (retval) { + retval = _strdup(retval); +#ifndef __GLIBC__ + /* strdup(3) on glibc sets errno, so we don't need to bother */ + if (!retval) + __set_errno(ENOMEM); +#endif + } + + return retval; +} + +char *__crypt_gensalt(const char *prefix, unsigned long count, + const char *input, int size) +{ + static char output[CRYPT_GENSALT_OUTPUT_SIZE]; + + return __crypt_gensalt_rn(prefix, count, + input, size, output, sizeof(output)); +} + +#if defined(__GLIBC__) && defined(_LIBC) +weak_alias(__crypt_rn, crypt_rn) +weak_alias(__crypt_ra, crypt_ra) +weak_alias(__crypt_r, crypt_r) +weak_alias(__crypt, crypt) +weak_alias(__crypt_gensalt_rn, crypt_gensalt_rn) +weak_alias(__crypt_gensalt_ra, crypt_gensalt_ra) +weak_alias(__crypt_gensalt, crypt_gensalt) +weak_alias(crypt, fcrypt) +#endif + +#ifdef TEST +static const char *tests[][3] = { + {"$2a$05$CCCCCCCCCCCCCCCCCCCCC.E5YPO9kmyuRGyh0XouQYb4YMJKvyOeW", + "U*U"}, + {"$2a$05$CCCCCCCCCCCCCCCCCCCCC.VGOzA784oUp/Z0DY336zx7pLYAy0lwK", + "U*U*"}, + {"$2a$05$XXXXXXXXXXXXXXXXXXXXXOAcXxm9kjPGEMsLznoKqmqw7tc8WCx4a", + "U*U*U"}, + {"$2a$05$abcdefghijklmnopqrstuu5s2v8.iXieOjg/.AySBTTZIIVFJeBui", + "0123456789abcdefghijklmnopqrstuvwxyz" + "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" + "chars after 72 are ignored"}, + {"$2x$05$/OK.fbVrR/bpIqNJ5ianF.CE5elHaaO4EbggVDjb8P19RukzXSM3e", + "\xa3"}, + {"$2x$05$/OK.fbVrR/bpIqNJ5ianF.CE5elHaaO4EbggVDjb8P19RukzXSM3e", + "\xff\xff\xa3"}, + {"$2y$05$/OK.fbVrR/bpIqNJ5ianF.CE5elHaaO4EbggVDjb8P19RukzXSM3e", + "\xff\xff\xa3"}, + {"$2a$05$/OK.fbVrR/bpIqNJ5ianF.nqd1wy.pTMdcvrRWxyiGL2eMz.2a85.", + "\xff\xff\xa3"}, + {"$2b$05$/OK.fbVrR/bpIqNJ5ianF.CE5elHaaO4EbggVDjb8P19RukzXSM3e", + "\xff\xff\xa3"}, + {"$2y$05$/OK.fbVrR/bpIqNJ5ianF.Sa7shbm4.OzKpvFnX1pQLmQW96oUlCq", + "\xa3"}, + {"$2a$05$/OK.fbVrR/bpIqNJ5ianF.Sa7shbm4.OzKpvFnX1pQLmQW96oUlCq", + "\xa3"}, + {"$2b$05$/OK.fbVrR/bpIqNJ5ianF.Sa7shbm4.OzKpvFnX1pQLmQW96oUlCq", + "\xa3"}, + {"$2x$05$/OK.fbVrR/bpIqNJ5ianF.o./n25XVfn6oAPaUvHe.Csk4zRfsYPi", + "1\xa3" "345"}, + {"$2x$05$/OK.fbVrR/bpIqNJ5ianF.o./n25XVfn6oAPaUvHe.Csk4zRfsYPi", + "\xff\xa3" "345"}, + {"$2x$05$/OK.fbVrR/bpIqNJ5ianF.o./n25XVfn6oAPaUvHe.Csk4zRfsYPi", + "\xff\xa3" "34" "\xff\xff\xff\xa3" "345"}, + {"$2y$05$/OK.fbVrR/bpIqNJ5ianF.o./n25XVfn6oAPaUvHe.Csk4zRfsYPi", + "\xff\xa3" "34" "\xff\xff\xff\xa3" "345"}, + {"$2a$05$/OK.fbVrR/bpIqNJ5ianF.ZC1JEJ8Z4gPfpe1JOr/oyPXTWl9EFd.", + "\xff\xa3" "34" "\xff\xff\xff\xa3" "345"}, + {"$2y$05$/OK.fbVrR/bpIqNJ5ianF.nRht2l/HRhr6zmCp9vYUvvsqynflf9e", + "\xff\xa3" "345"}, + {"$2a$05$/OK.fbVrR/bpIqNJ5ianF.nRht2l/HRhr6zmCp9vYUvvsqynflf9e", + "\xff\xa3" "345"}, + {"$2a$05$/OK.fbVrR/bpIqNJ5ianF.6IflQkJytoRVc1yuaNtHfiuq.FRlSIS", + "\xa3" "ab"}, + {"$2x$05$/OK.fbVrR/bpIqNJ5ianF.6IflQkJytoRVc1yuaNtHfiuq.FRlSIS", + "\xa3" "ab"}, + {"$2y$05$/OK.fbVrR/bpIqNJ5ianF.6IflQkJytoRVc1yuaNtHfiuq.FRlSIS", + "\xa3" "ab"}, + {"$2x$05$6bNw2HLQYeqHYyBfLMsv/OiwqTymGIGzFsA4hOTWebfehXHNprcAS", + "\xd1\x91"}, + {"$2x$05$6bNw2HLQYeqHYyBfLMsv/O9LIGgn8OMzuDoHfof8AQimSGfcSWxnS", + "\xd0\xc1\xd2\xcf\xcc\xd8"}, + {"$2a$05$/OK.fbVrR/bpIqNJ5ianF.swQOIzjOiJ9GHEPuhEkvqrUyvWhEMx6", + "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" + "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" + "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" + "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" + "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" + "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa" + "chars after 72 are ignored as usual"}, + {"$2a$05$/OK.fbVrR/bpIqNJ5ianF.R9xrDjiycxMbQE2bp.vgqlYpW5wx2yy", + "\xaa\x55\xaa\x55\xaa\x55\xaa\x55\xaa\x55\xaa\x55" + "\xaa\x55\xaa\x55\xaa\x55\xaa\x55\xaa\x55\xaa\x55" + "\xaa\x55\xaa\x55\xaa\x55\xaa\x55\xaa\x55\xaa\x55" + "\xaa\x55\xaa\x55\xaa\x55\xaa\x55\xaa\x55\xaa\x55" + "\xaa\x55\xaa\x55\xaa\x55\xaa\x55\xaa\x55\xaa\x55" + "\xaa\x55\xaa\x55\xaa\x55\xaa\x55\xaa\x55\xaa\x55"}, + {"$2a$05$/OK.fbVrR/bpIqNJ5ianF.9tQZzcJfm3uj2NvJ/n5xkhpqLrMpWCe", + "\x55\xaa\xff\x55\xaa\xff\x55\xaa\xff\x55\xaa\xff" + "\x55\xaa\xff\x55\xaa\xff\x55\xaa\xff\x55\xaa\xff" + "\x55\xaa\xff\x55\xaa\xff\x55\xaa\xff\x55\xaa\xff" + "\x55\xaa\xff\x55\xaa\xff\x55\xaa\xff\x55\xaa\xff" + "\x55\xaa\xff\x55\xaa\xff\x55\xaa\xff\x55\xaa\xff" + "\x55\xaa\xff\x55\xaa\xff\x55\xaa\xff\x55\xaa\xff"}, + {"$2a$05$CCCCCCCCCCCCCCCCCCCCC.7uG0VCzI2bS7j6ymqJi9CdcdxiRTWNy", + ""}, + {"*0", "", "$2a$03$CCCCCCCCCCCCCCCCCCCCC."}, + {"*0", "", "$2a$32$CCCCCCCCCCCCCCCCCCCCC."}, + {"*0", "", "$2c$05$CCCCCCCCCCCCCCCCCCCCC."}, + {"*0", "", "$2z$05$CCCCCCCCCCCCCCCCCCCCC."}, + {"*0", "", "$2`$05$CCCCCCCCCCCCCCCCCCCCC."}, + {"*0", "", "$2{$05$CCCCCCCCCCCCCCCCCCCCC."}, + {"*1", "", "*0"}, + {NULL} +}; + +#define which tests[0] + +static volatile sig_atomic_t running; + +static void handle_timer(int signum) +{ + (void) signum; + running = 0; +} + +static void *run(void *arg) +{ + unsigned long count = 0; + int i = 0; + void *data = NULL; + int size = 0x12345678; + + do { + const char *hash = tests[i][0]; + const char *key = tests[i][1]; + const char *setting = tests[i][2]; + + if (!tests[++i][0]) + i = 0; + + if (setting && strlen(hash) < 30) /* not for benchmark */ + continue; + + if (strcmp(crypt_ra(key, hash, &data, &size), hash)) { + printf("%d: FAILED (crypt_ra/%d/%lu)\n", + (int)((char *)arg - (char *)0), i, count); + free(data); + return NULL; + } + count++; + } while (running); + + free(data); + return count + (char *)0; +} + +int main(void) +{ + struct itimerval it; + struct tms buf; + clock_t clk_tck, start_real, start_virtual, end_real, end_virtual; + unsigned long count; + void *data; + int size; + char *setting1, *setting2; + int i; +#ifdef TEST_THREADS + pthread_t t[TEST_THREADS]; + void *t_retval; +#endif + + data = NULL; + size = 0x12345678; + + for (i = 0; tests[i][0]; i++) { + const char *hash = tests[i][0]; + const char *key = tests[i][1]; + const char *setting = tests[i][2]; + const char *p; + int ok = !setting || strlen(hash) >= 30; + int o_size; + char s_buf[30], o_buf[61]; + if (!setting) { + memcpy(s_buf, hash, sizeof(s_buf) - 1); + s_buf[sizeof(s_buf) - 1] = 0; + setting = s_buf; + } + + __set_errno(0); + p = crypt(key, setting); + if ((!ok && !errno) || strcmp(p, hash)) { + printf("FAILED (crypt/%d)\n", i); + return 1; + } + + if (ok && strcmp(crypt(key, hash), hash)) { + printf("FAILED (crypt/%d)\n", i); + return 1; + } + + for (o_size = -1; o_size <= (int)sizeof(o_buf); o_size++) { + int ok_n = ok && o_size == (int)sizeof(o_buf); + const char *x = "abc"; + strcpy(o_buf, x); + if (o_size >= 3) { + x = "*0"; + if (setting[0] == '*' && setting[1] == '0') + x = "*1"; + } + __set_errno(0); + p = crypt_rn(key, setting, o_buf, o_size); + if ((ok_n && (!p || strcmp(p, hash))) || + (!ok_n && (!errno || p || strcmp(o_buf, x)))) { + printf("FAILED (crypt_rn/%d)\n", i); + return 1; + } + } + + __set_errno(0); + p = crypt_ra(key, setting, &data, &size); + if ((ok && (!p || strcmp(p, hash))) || + (!ok && (!errno || p || strcmp((char *)data, hash)))) { + printf("FAILED (crypt_ra/%d)\n", i); + return 1; + } + } + + setting1 = crypt_gensalt(which[0], 12, data, size); + if (!setting1 || strncmp(setting1, "$2a$12$", 7)) { + puts("FAILED (crypt_gensalt)\n"); + return 1; + } + + setting2 = crypt_gensalt_ra(setting1, 12, data, size); + if (strcmp(setting1, setting2)) { + puts("FAILED (crypt_gensalt_ra/1)\n"); + return 1; + } + + (*(char *)data)++; + setting1 = crypt_gensalt_ra(setting2, 12, data, size); + if (!strcmp(setting1, setting2)) { + puts("FAILED (crypt_gensalt_ra/2)\n"); + return 1; + } + + free(setting1); + free(setting2); + free(data); + +#if defined(_SC_CLK_TCK) || !defined(CLK_TCK) + clk_tck = sysconf(_SC_CLK_TCK); +#else + clk_tck = CLK_TCK; +#endif + + running = 1; + signal(SIGALRM, handle_timer); + + memset(&it, 0, sizeof(it)); + it.it_value.tv_sec = 5; + setitimer(ITIMER_REAL, &it, NULL); + + start_real = times(&buf); + start_virtual = buf.tms_utime + buf.tms_stime; + + count = (char *)run((char *)0) - (char *)0; + + end_real = times(&buf); + end_virtual = buf.tms_utime + buf.tms_stime; + if (end_virtual == start_virtual) end_virtual++; + + printf("%.1f c/s real, %.1f c/s virtual\n", + (float)count * clk_tck / (end_real - start_real), + (float)count * clk_tck / (end_virtual - start_virtual)); + +#ifdef TEST_THREADS + running = 1; + it.it_value.tv_sec = 60; + setitimer(ITIMER_REAL, &it, NULL); + start_real = times(&buf); + + for (i = 0; i < TEST_THREADS; i++) + if (pthread_create(&t[i], NULL, run, i + (char *)0)) { + perror("pthread_create"); + return 1; + } + + for (i = 0; i < TEST_THREADS; i++) { + if (pthread_join(t[i], &t_retval)) { + perror("pthread_join"); + continue; + } + if (!t_retval) continue; + count = (char *)t_retval - (char *)0; + end_real = times(&buf); + printf("%d: %.1f c/s real\n", i, + (float)count * clk_tck / (end_real - start_real)); + } +#endif + + return 0; +} +#endif diff --git a/enet server test/crypt_blowfish/x86.S b/enet server test/crypt_blowfish/x86.S new file mode 100644 index 0000000..b0f1cd2 --- /dev/null +++ b/enet server test/crypt_blowfish/x86.S @@ -0,0 +1,203 @@ +/* + * Written by Solar Designer in 1998-2010. + * No copyright is claimed, and the software is hereby placed in the public + * domain. In case this attempt to disclaim copyright and place the software + * in the public domain is deemed null and void, then the software is + * Copyright (c) 1998-2010 Solar Designer and it is hereby released to the + * general public under the following terms: + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted. + * + * There's ABSOLUTELY NO WARRANTY, express or implied. + * + * See crypt_blowfish.c for more information. + */ + +#ifdef __i386__ + +#if defined(__OpenBSD__) && !defined(__ELF__) +#define UNDERSCORES +#define ALIGN_LOG +#endif + +#if defined(__CYGWIN32__) || defined(__MINGW32__) +#define UNDERSCORES +#endif + +#ifdef __DJGPP__ +#define UNDERSCORES +#define ALIGN_LOG +#endif + +#ifdef UNDERSCORES +#define _BF_body_r __BF_body_r +#endif + +#ifdef ALIGN_LOG +#define DO_ALIGN(log) .align (log) +#elif defined(DUMBAS) +#define DO_ALIGN(log) .align 1 << log +#else +#define DO_ALIGN(log) .align (1 << (log)) +#endif + +#define BF_FRAME 0x200 +#define ctx %esp + +#define BF_ptr (ctx) + +#define S(N, r) N+BF_FRAME(ctx,r,4) +#ifdef DUMBAS +#define P(N) 0x1000+N+N+N+N+BF_FRAME(ctx) +#else +#define P(N) 0x1000+4*N+BF_FRAME(ctx) +#endif + +/* + * This version of the assembly code is optimized primarily for the original + * Intel Pentium but is also careful to avoid partial register stalls on the + * Pentium Pro family of processors (tested up to Pentium III Coppermine). + * + * It is possible to do 15% faster on the Pentium Pro family and probably on + * many non-Intel x86 processors, but, unfortunately, that would make things + * twice slower for the original Pentium. + * + * An additional 2% speedup may be achieved with non-reentrant code. + */ + +#define L %esi +#define R %edi +#define tmp1 %eax +#define tmp1_lo %al +#define tmp2 %ecx +#define tmp2_hi %ch +#define tmp3 %edx +#define tmp3_lo %dl +#define tmp4 %ebx +#define tmp4_hi %bh +#define tmp5 %ebp + +.text + +#define BF_ROUND(L, R, N) \ + xorl L,tmp2; \ + xorl tmp1,tmp1; \ + movl tmp2,L; \ + shrl $16,tmp2; \ + movl L,tmp4; \ + movb tmp2_hi,tmp1_lo; \ + andl $0xFF,tmp2; \ + movb tmp4_hi,tmp3_lo; \ + andl $0xFF,tmp4; \ + movl S(0,tmp1),tmp1; \ + movl S(0x400,tmp2),tmp5; \ + addl tmp5,tmp1; \ + movl S(0x800,tmp3),tmp5; \ + xorl tmp5,tmp1; \ + movl S(0xC00,tmp4),tmp5; \ + addl tmp1,tmp5; \ + movl 4+P(N),tmp2; \ + xorl tmp5,R + +#define BF_ENCRYPT_START \ + BF_ROUND(L, R, 0); \ + BF_ROUND(R, L, 1); \ + BF_ROUND(L, R, 2); \ + BF_ROUND(R, L, 3); \ + BF_ROUND(L, R, 4); \ + BF_ROUND(R, L, 5); \ + BF_ROUND(L, R, 6); \ + BF_ROUND(R, L, 7); \ + BF_ROUND(L, R, 8); \ + BF_ROUND(R, L, 9); \ + BF_ROUND(L, R, 10); \ + BF_ROUND(R, L, 11); \ + BF_ROUND(L, R, 12); \ + BF_ROUND(R, L, 13); \ + BF_ROUND(L, R, 14); \ + BF_ROUND(R, L, 15); \ + movl BF_ptr,tmp5; \ + xorl L,tmp2; \ + movl P(17),L + +#define BF_ENCRYPT_END \ + xorl R,L; \ + movl tmp2,R + +DO_ALIGN(5) +.globl _BF_body_r +_BF_body_r: + movl 4(%esp),%eax + pushl %ebp + pushl %ebx + pushl %esi + pushl %edi + subl $BF_FRAME-8,%eax + xorl L,L + cmpl %esp,%eax + ja BF_die + xchgl %eax,%esp + xorl R,R + pushl %eax + leal 0x1000+BF_FRAME-4(ctx),%eax + movl 0x1000+BF_FRAME-4(ctx),tmp2 + pushl %eax + xorl tmp3,tmp3 +BF_loop_P: + BF_ENCRYPT_START + addl $8,tmp5 + BF_ENCRYPT_END + leal 0x1000+18*4+BF_FRAME(ctx),tmp1 + movl tmp5,BF_ptr + cmpl tmp5,tmp1 + movl L,-8(tmp5) + movl R,-4(tmp5) + movl P(0),tmp2 + ja BF_loop_P + leal BF_FRAME(ctx),tmp5 + xorl tmp3,tmp3 + movl tmp5,BF_ptr +BF_loop_S: + BF_ENCRYPT_START + BF_ENCRYPT_END + movl P(0),tmp2 + movl L,(tmp5) + movl R,4(tmp5) + BF_ENCRYPT_START + BF_ENCRYPT_END + movl P(0),tmp2 + movl L,8(tmp5) + movl R,12(tmp5) + BF_ENCRYPT_START + BF_ENCRYPT_END + movl P(0),tmp2 + movl L,16(tmp5) + movl R,20(tmp5) + BF_ENCRYPT_START + addl $32,tmp5 + BF_ENCRYPT_END + leal 0x1000+BF_FRAME(ctx),tmp1 + movl tmp5,BF_ptr + cmpl tmp5,tmp1 + movl P(0),tmp2 + movl L,-8(tmp5) + movl R,-4(tmp5) + ja BF_loop_S + movl 4(%esp),%esp + popl %edi + popl %esi + popl %ebx + popl %ebp + ret + +BF_die: +/* Oops, need to re-compile with a larger BF_FRAME. */ + hlt + jmp BF_die + +#endif + +#if defined(__ELF__) && defined(__linux__) +.section .note.GNU-stack,"",@progbits +#endif diff --git a/enet server test/enet server test.cpp b/enet server test/enet server test.cpp new file mode 100644 index 0000000..9f5e325 --- /dev/null +++ b/enet server test/enet server test.cpp @@ -0,0 +1,3322 @@ +/********************************************************************************** + First Growtopia Private Server made with ENet. + Copyright (C) 2018 Growtopia Noobs + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published + by the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +**********************************************************************************/ + + +#include "stdafx.h" +#include + +#include "enet/enet.h" +#include +#include +#include +#include +#include +#include +#include "json.hpp" +#include "bcrypt.h" +#include "crypt_blowfish/crypt_gensalt.c" +#include "crypt_blowfish/crypt_blowfish.h" +#include "crypt_blowfish/crypt_blowfish.c" +#include "crypt_blowfish/wrapper.c" +#include "bcrypt.c" +#include +#include // TODO +#include // TODO + +using namespace std; +using json = nlohmann::json; + +//#define TOTAL_LOG +#define REGISTRATION + +ENetHost * server; +int cId = 1; +BYTE* itemsDat = 0; +int itemsDatSize = 0; + +/***bcrypt***/ + +bool verifyPassword(string password, string hash) { + int ret; + + ret = bcrypt_checkpw(password.c_str(), hash.c_str()); + assert(ret != -1); + + return !ret; +} + +string hashPassword(string password) { + char salt[BCRYPT_HASHSIZE]; + char hash[BCRYPT_HASHSIZE]; + int ret; + + ret = bcrypt_gensalt(12, salt); + assert(ret == 0); + ret = bcrypt_hashpw(password.c_str(), salt, hash); + assert(ret == 0); + return hash; +} + +/***bcrypt**/ + +void sendData(ENetPeer* peer, int num, char* data, int len) +{ + /* Create a reliable packet of size 7 containing "packet\0" */ + ENetPacket * packet = enet_packet_create(0, + len + 5, + ENET_PACKET_FLAG_RELIABLE); + /* Extend the packet so and append the string "foo", so it now */ + /* contains "packetfoo\0" */ + /* Send the packet to the peer over channel id 0. */ + /* One could also broadcast the packet by */ + /* enet_host_broadcast (host, 0, packet); */ + memcpy(packet->data, &num, 4); + if (data != NULL) + { + memcpy(packet->data+4, data, len); + } + char zero = 0; + memcpy(packet->data + 4 + len, &zero, 1); + enet_peer_send(peer, 0, packet); + enet_host_flush(server); +} + +int getPacketId(char* data) +{ + return *data; +} + +char* getPacketData(char* data) +{ + return data + 4; +} + +string text_encode(char* text) +{ + string ret = ""; + while (text[0] != 0) + { + switch (text[0]) + { + case '\n': + ret += "\\n"; + break; + case '\t': + ret += "\\t"; + break; + case '\b': + ret += "\\b"; + break; + case '\\': + ret += "\\\\"; + break; + case '\r': + ret += "\\r"; + break; + default: + ret += text[0]; + break; + } + text++; + } + return ret; +} + +int ch2n(char x) +{ + switch (x) + { + case '0': + return 0; + case '1': + return 1; + case '2': + return 2; + case '3': + return 3; + case '4': + return 4; + case '5': + return 5; + case '6': + return 6; + case '7': + return 7; + case '8': + return 8; + case '9': + return 9; + case 'A': + return 10; + case 'B': + return 11; + case 'C': + return 12; + case 'D': + return 13; + case 'E': + return 14; + case 'F': + return 15; + default: + break; + } +} + + +char* GetTextPointerFromPacket(ENetPacket* packet) +{ + char zero = 0; + memcpy(packet->data + packet->dataLength - 1, &zero, 1); + return (char*)(packet->data + 4); +} + +BYTE* GetStructPointerFromTankPacket(ENetPacket* packet) +{ + unsigned int packetLenght = packet->dataLength; + BYTE* result = NULL; + if (packetLenght >= 0x3C) + { + BYTE* packetData = packet->data; + result = packetData + 4; + if (*(BYTE*)(packetData + 16) & 8) + { + if (packetLenght < *(int*)(packetData + 56) + 60) + { + cout << "Packet too small for extended packet to be valid" << endl; + cout << "Sizeof float is 4. TankUpdatePacket size: 56" << endl; + result = 0; + } + } + else + { + int zero = 0; + memcpy(packetData + 56, &zero, 4); + } + } + return result; +} + +int GetMessageTypeFromPacket(ENetPacket* packet) +{ + int result; + + if (packet->dataLength > 3u) + { + result = *(packet->data); + } + else + { + cout << "Bad packet length, ignoring message" << endl; + result = 0; + } + return result; +} + + +vector explode(const string &delimiter, const string &str) +{ + vector arr; + + int strleng = str.length(); + int delleng = delimiter.length(); + if (delleng == 0) + return arr;//no change + + int i = 0; + int k = 0; + while (i 61 * 2) throw 0; + } + GamePacket packet; + packet.data = data; + packet.len = 61; + packet.indexes = 0; + return packet; +} + +GamePacket packetEnd(GamePacket p) +{ + BYTE* n = new BYTE[p.len + 1]; + memcpy(n, p.data, p.len); + delete p.data; + p.data = n; + char zero = 0; + memcpy(p.data+p.len, &zero, 1); + p.len += 1; + //*(int*)(p.data + 52) = p.len; + *(int*)(p.data + 56) = p.indexes;//p.len-60;//p.indexes; + *(BYTE*)(p.data + 60) = p.indexes; + //*(p.data + 57) = p.indexes; + return p; +} + +struct InventoryItem { + __int16 itemID; + __int8 itemCount; +}; + +struct PlayerInventory { + vector items; + int inventorySize = 100; +}; + +#define cloth0 cloth_hair +#define cloth1 cloth_shirt +#define cloth2 cloth_pants +#define cloth3 cloth_feet +#define cloth4 cloth_face +#define cloth5 cloth_hand +#define cloth6 cloth_back +#define cloth7 cloth_mask +#define cloth8 cloth_necklace + +struct PlayerInfo { + bool isIn = false; + int netID; + bool haveGrowId = false; + string tankIDName = ""; + string tankIDPass = ""; + string requestedName = ""; + string rawName = ""; + string displayName = ""; + string country = ""; + int adminLevel = 0; + string currentWorld = "EXIT"; + bool radio = true; + int x; + int y; + bool isRotatedLeft = false; + + bool isUpdating = false; + bool joinClothesUpdated = false; + + int cloth_hair = 0; // 0 + int cloth_shirt = 0; // 1 + int cloth_pants = 0; // 2 + int cloth_feet = 0; // 3 + int cloth_face = 0; // 4 + int cloth_hand = 0; // 5 + int cloth_back = 0; // 6 + int cloth_mask = 0; // 7 + int cloth_necklace = 0; // 8 + + bool canWalkInBlocks = false; // 1 + bool canDoubleJump = false; // 2 + bool isInvisible = false; // 4 + bool noHands = false; // 8 + bool noEyes = false; // 16 + bool noBody = false; // 32 + bool devilHorns = false; // 64 + bool goldenHalo = false; // 128 + bool isFrozen = false; // 2048 + bool isCursed = false; // 4096 + bool isDuctaped = false; // 8192 + bool haveCigar = false; // 16384 + bool isShining = false; // 32768 + bool isZombie = false; // 65536 + bool isHitByLava = false; // 131072 + bool haveHauntedShadows = false; // 262144 + bool haveGeigerRadiation = false; // 524288 + bool haveReflector = false; // 1048576 + bool isEgged = false; // 2097152 + bool havePineappleFloag = false; // 4194304 + bool haveFlyingPineapple = false; // 8388608 + bool haveSuperSupporterName = false; // 16777216 + bool haveSupperPineapple = false; // 33554432 + //bool + int skinColor = 0x268DAFFF; + + PlayerInventory inventory; + + long long int lastSB = 0; +}; + + +int getState(PlayerInfo* info) { + int val = 0; + val |= info->canWalkInBlocks << 0; + val |= info->canDoubleJump << 1; + val |= info->isInvisible << 2; + val |= info->noHands << 3; + val |= info->noEyes << 4; + val |= info->noBody << 5; + val |= info->devilHorns << 6; + val |= info->goldenHalo << 7; + return val; +} + + +struct WorldItem { + __int16 foreground = 0; + __int16 background = 0; + int breakLevel = 0; + long long int breakTime = 0; + bool water = false; + bool fire = false; + bool glue = false; + bool red = false; + bool green = false; + bool blue = false; + +}; + +struct WorldInfo { + int width = 100; + int height = 60; + string name = "TEST"; + WorldItem* items; + string owner = ""; + bool isPublic=false; +}; + +WorldInfo generateWorld(string name, int width, int height) +{ + WorldInfo world; + world.name = name; + world.width = width; + world.height = height; + world.items = new WorldItem[world.width*world.height]; + for (int i = 0; i < world.width*world.height; i++) + { + if (i >= 3800 && i<5400 && !(rand() % 50)) + world.items[i].foreground = 10; + else if (i >= 3700 && i<5400) + { + world.items[i].foreground = 2; + } + else if (i >= 5400) { + world.items[i].foreground = 8; + } + if (i >= 3700) + world.items[i].background = 14; + if (i == 3650) + world.items[i].foreground = 6; + else if (i >= 3600 && i<3700) + world.items[i].foreground = 16; + if (i == 3750) + world.items[i].foreground = 8; + } + return world; +} + + +class PlayerDB { +public: + static string getProperName(string name); + static string PlayerDB::fixColors(string text); + static int playerLogin(ENetPeer* peer, string username, string password); + static int playerRegister(string username, string password); +}; + +string PlayerDB::getProperName(string name) { + string newS; + for (char c : name) newS+=(c >= 'A' && c <= 'Z') ? c-('A'-'a') : c; + string ret; + for (int i = 0; i < newS.length(); i++) + { + if (newS[i] == '`') i++; else ret += newS[i]; + } + string ret2; + for (char c : ret) if ((c >= 'a' && c <= 'z') || (c >= '0' && c <= '9')) ret2 += c; + return ret2; +} + +string PlayerDB::fixColors(string text) { + string ret = ""; + int colorLevel = 0; + for (int i = 0; i < text.length(); i++) + { + if (text[i] == '`') + { + ret += text[i]; + if (i + 1 < text.length()) + ret += text[i + 1]; + + + if (i+1 < text.length() && text[i + 1] == '`') + { + colorLevel--; + } + else { + colorLevel++; + } + i++; + } else { + ret += text[i]; + } + } + for (int i = 0; i < colorLevel; i++) { + ret += "``"; + } + for (int i = 0; i > colorLevel; i--) { + ret += "`w"; + } + return ret; +} + +int PlayerDB::playerLogin(ENetPeer* peer, string username, string password) { + std::ifstream ifs("players/" + PlayerDB::getProperName(username) + ".json"); + if (ifs.is_open()) { + json j; + ifs >> j; + string pss = j["password"]; + if (verifyPassword(password, pss)) { + ENetPeer * currentPeer; + + for (currentPeer = server->peers; + currentPeer < &server->peers[server->peerCount]; + ++currentPeer) + { + if (currentPeer->state != ENET_PEER_STATE_CONNECTED) + continue; + if (currentPeer == peer) + continue; + if (((PlayerInfo*)(currentPeer->data))->rawName == PlayerDB::getProperName(username)) + { + { + GamePacket p = packetEnd(appendString(appendString(createPacket(), "OnConsoleMessage"), "Someone else logged to this account!")); + ENetPacket * packet = enet_packet_create(p.data, + p.len, + ENET_PACKET_FLAG_RELIABLE); + enet_peer_send(currentPeer, 0, packet); + delete p.data; + } + { + GamePacket p = packetEnd(appendString(appendString(createPacket(), "OnConsoleMessage"), "Someone else was logged to this account! He was kicked out now.")); + ENetPacket * packet = enet_packet_create(p.data, + p.len, + ENET_PACKET_FLAG_RELIABLE); + enet_peer_send(peer, 0, packet); + delete p.data; + } + //enet_host_flush(server); + enet_peer_disconnect_later(currentPeer, 0); + } + } + return 1; + } + else { + return -1; + } + } + else { + return -2; + } +} + +int PlayerDB::playerRegister(string username, string password) { + username = PlayerDB::getProperName(username); + if (username.length() < 3) return -2; + std::ifstream ifs("players/" + username + ".json"); + if (ifs.is_open()) { + return -1; + } + + std::ofstream o("players/" + username + ".json"); + if (!o.is_open()) { + cout << GetLastError() << endl; + _getch(); + } + json j; + j["username"] = username; + j["password"] = hashPassword(password); + j["adminLevel"] = 0; + o << j << std::endl; + return 1; +} + +struct AWorld { + WorldInfo* ptr; + WorldInfo info; + int id; +}; + +class WorldDB { +public: + WorldInfo get(string name); + AWorld get2(string name); + void flush(WorldInfo info); + void flush2(AWorld info); + void save(AWorld info); + void saveAll(); + void saveRedundant(); + vector getRandomWorlds(); + WorldDB(); +private: + vector worlds; +}; + +WorldDB::WorldDB() { + // Constructor +} + +string getStrUpper(string txt) { + string ret; + for (char c : txt) ret += toupper(c); + return ret; +} + +AWorld WorldDB::get2(string name) { + if (worlds.size() > 200) { +#ifdef TOTAL_LOG + cout << "Saving redundant worlds!" << endl; +#endif + saveRedundant(); +#ifdef TOTAL_LOG + cout << "Redundant worlds are saved!" << endl; +#endif + } + AWorld ret; + name = getStrUpper(name); + if (name.length() < 1) throw 1; // too short name + for (char c : name) { + if ((c<'A' || c>'Z') && (c<'0' || c>'9')) + throw 2; // wrong name + } + if (name == "EXIT") { + throw 3; + } + for (int i = 0; i < worlds.size(); i++) { + if (worlds.at(i).name == name) + { + ret.id = i; + ret.info = worlds.at(i); + ret.ptr = &worlds.at(i); + return ret; + } + + } + std::ifstream ifs("worlds/" + name + ".json"); + if (ifs.is_open()) { + + json j; + ifs >> j; + WorldInfo info; + info.name = j["name"]; + info.width = j["width"]; + info.height = j["height"]; + info.owner = j["owner"]; + info.isPublic = j["isPublic"]; + json tiles = j["tiles"]; + int square = info.width*info.height; + info.items = new WorldItem[square]; + for (int i = 0; i < square; i++) { + info.items[i].foreground = tiles[i]["fg"]; + info.items[i].background = tiles[i]["bg"]; + } + worlds.push_back(info); + ret.id = worlds.size() - 1; + ret.info = info; + ret.ptr = &worlds.at(worlds.size() - 1); + return ret; + } + else { + WorldInfo info = generateWorld(name, 100, 60); + + worlds.push_back(info); + ret.id = worlds.size() - 1; + ret.info = info; + ret.ptr = &worlds.at(worlds.size() - 1); + return ret; + } + throw 1; +} + +WorldInfo WorldDB::get(string name) { + + return this->get2(name).info; +} + +void WorldDB::flush(WorldInfo info) +{ + std::ofstream o("worlds/" + info.name + ".json"); + if (!o.is_open()) { + cout << GetLastError() << endl; + } + json j; + j["name"] = info.name; + j["width"] = info.width; + j["height"] = info.height; + j["owner"] = info.owner; + j["isPublic"] = info.isPublic; + json tiles = json::array(); + int square = info.width*info.height; + + for (int i = 0; i < square; i++) + { + json tile; + tile["fg"] = info.items[i].foreground; + tile["bg"] = info.items[i].background; + tiles.push_back(tile); + } + j["tiles"] = tiles; + o << j << std::endl; +} + +void WorldDB::flush2(AWorld info) +{ + this->flush(info.info); +} + +void WorldDB::save(AWorld info) +{ + flush2(info); + delete info.info.items; + worlds.erase(worlds.begin() + info.id); +} + +void WorldDB::saveAll() +{ + for (int i = 0; i < worlds.size(); i++) { + flush(worlds.at(i)); + delete worlds.at(i).items; + } + worlds.clear(); +} + +vector WorldDB::getRandomWorlds() { + vector ret; + for (int i = 0; i < ((worlds.size() < 10) ? worlds.size() : 10); i++) + { // load first four worlds, it is excepted that they are special + ret.push_back(worlds.at(i)); + } + // and lets get up to 6 random + if (worlds.size() > 4) { + for (int j = 0; j < 6; j++) + { + bool isPossible = true; + WorldInfo world = worlds.at(rand() % (worlds.size() - 4)); + for (int i = 0; i < ret.size(); i++) + { + if (world.name == ret.at(i).name || world.name == "EXIT") + { + isPossible = false; + } + } + if (isPossible) + ret.push_back(world); + } + } + return ret; +} + +void WorldDB::saveRedundant() +{ + for (int i = 4; i < worlds.size(); i++) { + bool canBeFree = true; + ENetPeer * currentPeer; + + for (currentPeer = server->peers; + currentPeer < &server->peers[server->peerCount]; + ++currentPeer) + { + if (currentPeer->state != ENET_PEER_STATE_CONNECTED) + continue; + if (((PlayerInfo*)(currentPeer->data))->currentWorld == worlds.at(i).name) + canBeFree = false; + } + if (canBeFree) + { + flush(worlds.at(i)); + delete worlds.at(i).items; + worlds.erase(worlds.begin() + i); + i--; + } + } +} + +//WorldInfo world; +//vector worlds; +WorldDB worldDB; + +void saveAllWorlds() // atexit hack plz fix +{ + cout << "Saving worlds..." << endl; + worldDB.saveAll(); + cout << "Worlds saved!" << endl; +} + +WorldInfo* getPlyersWorld(ENetPeer* peer) +{ + try { + return worldDB.get2(((PlayerInfo*)(peer->data))->currentWorld).ptr; + } catch(int e) { + return NULL; + } +} + +struct PlayerMoving { + int packetType; + int netID; + float x; + float y; + int characterState; + int plantingTree; + float XSpeed; + float YSpeed; + int punchX; + int punchY; + +}; + + +enum ClothTypes { + HAIR, + SHIRT, + PANTS, + FEET, + FACE, + HAND, + BACK, + MASK, + NECKLACE, + NONE +}; + +enum BlockTypes { + FOREGROUND, + BACKGROUND, + SEED, + PAIN_BLOCK, + BEDROCK, + MAIN_DOOR, + SIGN, + DOOR, + CLOTHING, + FIST, + UNKNOWN +}; + +struct ItemDefinition { + int id; + string name; + int rarity; + int breakHits; + int growTime; + ClothTypes clothType; + BlockTypes blockType; + string description = "This item has no description."; +}; + +vector itemDefs; + +struct DroppedItem { // TODO + int id; + int uid; + int count; +}; + +vector droppedItems; + +ItemDefinition getItemDef(int id) +{ + if (id < itemDefs.size() && id > -1) + return itemDefs.at(id); + /*for (int i = 0; i < itemDefs.size(); i++) + { + if (id == itemDefs.at(i).id) + { + return itemDefs.at(i); + } + }*/ + throw 0; + return itemDefs.at(0); +} + +void craftItemDescriptions() { + int current = -1; + std::ifstream infile("Descriptions.txt"); + for (std::string line; getline(infile, line);) + { + if (line.length() > 3 && line[0] != '/' && line[1] != '/') + { + vector ex = explode("|", line); + ItemDefinition def; + if (atoi(ex[0].c_str()) + 1 < itemDefs.size()) + { + itemDefs.at(atoi(ex[0].c_str())).description = ex[1]; + if (!(atoi(ex[0].c_str()) % 2)) + itemDefs.at(atoi(ex[0].c_str()) + 1).description = "This is tree."; + } + } + } +} + +void buildItemsDatabase() +{ + int current = -1; + std::ifstream infile("CoreData.txt"); + for (std::string line; getline(infile, line);) + { + if (line.length() > 8 && line[0] != '/' && line[1] != '/') + { + vector ex = explode("|", line); + ItemDefinition def; + def.id = atoi(ex[0].c_str()); + def.name = ex[1]; + def.rarity = atoi(ex[2].c_str()); + string bt = ex[4]; + if (bt == "Foreground_Block") { + def.blockType = BlockTypes::FOREGROUND; + } + else if(bt == "Seed") { + def.blockType = BlockTypes::SEED; + } + else if (bt == "Pain_Block") { + def.blockType = BlockTypes::PAIN_BLOCK; + } + else if (bt == "Main_Door") { + def.blockType = BlockTypes::MAIN_DOOR; + } + else if (bt == "Bedrock") { + def.blockType = BlockTypes::BEDROCK; + } + else if (bt == "Door") { + def.blockType = BlockTypes::DOOR; + } + else if (bt == "Fist") { + def.blockType = BlockTypes::FIST; + } + else if (bt == "Sign") { + def.blockType = BlockTypes::SIGN; + } + else if (bt == "Background_Block") { + def.blockType = BlockTypes::BACKGROUND; + } + else { + def.blockType = BlockTypes::UNKNOWN; + } + def.breakHits = atoi(ex[7].c_str()); + def.growTime = atoi(ex[8].c_str()); + string cl = ex[9]; + if (cl == "None") { + def.clothType = ClothTypes::NONE; + } + else if(cl == "Hat") { + def.clothType = ClothTypes::HAIR; + } + else if(cl == "Shirt") { + def.clothType = ClothTypes::SHIRT; + } + else if(cl == "Pants") { + def.clothType = ClothTypes::PANTS; + } + else if (cl == "Feet") { + def.clothType = ClothTypes::FEET; + } + else if (cl == "Face") { + def.clothType = ClothTypes::FACE; + } + else if (cl == "Hand") { + def.clothType = ClothTypes::HAND; + } + else if (cl == "Back") { + def.clothType = ClothTypes::BACK; + } + else if (cl == "Hair") { + def.clothType = ClothTypes::MASK; + } + else if (cl == "Chest") { + def.clothType = ClothTypes::NECKLACE; + } + else { + def.clothType = ClothTypes::NONE; + } + + if (++current != def.id) + { + cout << "Critical error! Unordered database at item "<< std::to_string(current) <<"/"<< std::to_string(def.id) <<"!" << endl; + } + + itemDefs.push_back(def); + } + } + craftItemDescriptions(); +} + +struct Admin { + string username; + string password; + int level = 0; + long long int lastSB = 0; +}; + +vector admins; + +void addAdmin(string username, string password, int level) +{ + Admin admin; + admin.username = username; + admin.password = password; + admin.level = level; + admins.push_back(admin); +} + +int getAdminLevel(string username, string password) { + for (int i = 0; i < admins.size(); i++) { + Admin admin = admins[i]; + if (admin.username == username && admin.password == password) { + return admin.level; + } + } + return 0; +} + +bool canSB(string username, string password) { + for (int i = 0; i < admins.size(); i++) { + Admin admin = admins[i]; + if (admin.username == username && admin.password == password && admin.level>1) { + using namespace std::chrono; + if (admin.lastSB + 900000 < (duration_cast(system_clock::now().time_since_epoch())).count() || admin.level == 999) + { + admins[i].lastSB = (duration_cast(system_clock::now().time_since_epoch())).count(); + return true; + } + else { + return false; + } + } + } + return false; +} + +bool canClear(string username, string password) { + for (int i = 0; i < admins.size(); i++) { + Admin admin = admins[i]; + if (admin.username == username && admin.password == password) { + return admin.level > 0; + } + } + return false; +} + +bool isSuperAdmin(string username, string password) { + for (int i = 0; i < admins.size(); i++) { + Admin admin = admins[i]; + if (admin.username == username && admin.password == password && admin.level == 999) { + return true; + } + } + return false; +} + +bool isHere(ENetPeer* peer, ENetPeer* peer2) +{ + return ((PlayerInfo*)(peer->data))->currentWorld == ((PlayerInfo*)(peer2->data))->currentWorld; +} + +void sendInventory(ENetPeer* peer, PlayerInventory inventory) +{ + string asdf2 = "0400000009A7379237BB2509E8E0EC04F8720B050000000000000000FBBB0000010000007D920100FDFDFDFD04000000040000000000000000000000000000000000"; + int inventoryLen = inventory.items.size(); + int packetLen = (asdf2.length() / 2) + (inventoryLen * 4) + 4; + BYTE* data2 = new BYTE[packetLen]; + for (int i = 0; i < asdf2.length(); i += 2) + { + char x = ch2n(asdf2[i]); + x = x << 4; + x += ch2n(asdf2[i + 1]); + memcpy(data2 + (i / 2), &x, 1); + } + int endianInvVal = _byteswap_ulong(inventoryLen); + memcpy(data2 + (asdf2.length() / 2) - 4, &endianInvVal, 4); + endianInvVal = _byteswap_ulong(inventory.inventorySize); + memcpy(data2 + (asdf2.length() / 2) - 8, &endianInvVal, 4); + int val = 0; + for (int i = 0; i < inventoryLen; i++) + { + val = 0; + val |= inventory.items.at(i).itemID; + val |= inventory.items.at(i).itemCount << 16; + val &= 0x00FFFFFF; + val |= 0x00 << 24; + memcpy(data2 + (i*4) + (asdf2.length() / 2), &val, 4); + } + ENetPacket * packet3 = enet_packet_create(data2, + packetLen, + ENET_PACKET_FLAG_RELIABLE); + enet_peer_send(peer, 0, packet3); + delete data2; + //enet_host_flush(server); +} + +BYTE* packPlayerMoving(PlayerMoving* dataStruct) +{ + BYTE* data = new BYTE[56]; + for (int i = 0; i < 56; i++) + { + data[i] = 0; + } + memcpy(data, &dataStruct->packetType, 4); + memcpy(data + 4, &dataStruct->netID, 4); + memcpy(data + 12, &dataStruct->characterState, 4); + memcpy(data + 20, &dataStruct->plantingTree, 4); + memcpy(data + 24, &dataStruct->x, 4); + memcpy(data + 28, &dataStruct->y, 4); + memcpy(data + 32, &dataStruct->XSpeed, 4); + memcpy(data + 36, &dataStruct->YSpeed, 4); + memcpy(data + 44, &dataStruct->punchX, 4); + memcpy(data + 48, &dataStruct->punchY, 4); + return data; +} + +PlayerMoving* unpackPlayerMoving(BYTE* data) +{ + PlayerMoving* dataStruct = new PlayerMoving; + memcpy(&dataStruct->packetType, data, 4); + memcpy(&dataStruct->netID, data + 4, 4); + memcpy(&dataStruct->characterState, data + 12, 4); + memcpy(&dataStruct->plantingTree, data + 20, 4); + memcpy(&dataStruct->x, data + 24, 4); + memcpy(&dataStruct->y, data + 28, 4); + memcpy(&dataStruct->XSpeed, data + 32, 4); + memcpy(&dataStruct->YSpeed, data + 36, 4); + memcpy(&dataStruct->punchX, data + 44, 4); + memcpy(&dataStruct->punchY, data + 48, 4); + return dataStruct; +} + +void SendPacket(int a1, string a2, ENetPeer* enetPeer) +{ + if (enetPeer) + { + ENetPacket* v3 = enet_packet_create(0, a2.length() + 5, 1); + memcpy(v3->data, &a1, 4); + //*(v3->data) = (DWORD)a1; + memcpy((v3->data) + 4, a2.c_str(), a2.length()); + + //cout << std::hex << (int)(char)v3->data[3] << endl; + enet_peer_send(enetPeer, 0, v3); + } +} + +void SendPacketRaw(int a1, void *packetData, size_t packetDataSize, void *a4, ENetPeer* peer, int packetFlag) +{ + ENetPacket *p; + + if (peer) // check if we have it setup + { + if (a1 == 4 && *((BYTE *)packetData + 12) & 8) + { + p = enet_packet_create(0, packetDataSize + *((DWORD *)packetData + 13) + 5, packetFlag); + int four = 4; + memcpy(p->data, &four, 4); + memcpy((char *)p->data + 4, packetData, packetDataSize); + memcpy((char *)p->data + packetDataSize + 4, a4, *((DWORD *)packetData + 13)); + enet_peer_send(peer, 0, p); + } + else + { + p = enet_packet_create(0, packetDataSize + 5, packetFlag); + memcpy(p->data, &a1, 4); + memcpy((char *)p->data + 4, packetData, packetDataSize); + enet_peer_send(peer, 0, p); + } + } + delete packetData; +} + + + void onPeerConnect(ENetPeer* peer) + { + ENetPeer * currentPeer; + + for (currentPeer = server->peers; + currentPeer < &server->peers[server->peerCount]; + ++currentPeer) + { + if (currentPeer->state != ENET_PEER_STATE_CONNECTED) + continue; + if (peer != currentPeer) + { + if (isHere(peer, currentPeer)) + { + string netIdS = std::to_string(((PlayerInfo*)(currentPeer->data))->netID); + GamePacket p = packetEnd(appendString(appendString(createPacket(), "OnSpawn"), "spawn|avatar\nnetID|" + netIdS + "\nuserID|" + netIdS + "\ncolrect|0|0|20|30\nposXY|" + std::to_string(((PlayerInfo*)(currentPeer->data))->x) + "|" + std::to_string(((PlayerInfo*)(currentPeer->data))->y) + "\nname|``" + ((PlayerInfo*)(currentPeer->data))->displayName + "``\ncountry|" + ((PlayerInfo*)(currentPeer->data))->country + "\ninvis|0\nmstate|0\nsmstate|0\n")); // ((PlayerInfo*)(server->peers[i].data))->tankIDName + ENetPacket * packet = enet_packet_create(p.data, + p.len, + ENET_PACKET_FLAG_RELIABLE); + + enet_peer_send(peer, 0, packet); + delete p.data; + string netIdS2 = std::to_string(((PlayerInfo*)(peer->data))->netID); + GamePacket p2 = packetEnd(appendString(appendString(createPacket(), "OnSpawn"), "spawn|avatar\nnetID|" + netIdS2 + "\nuserID|" + netIdS2 + "\ncolrect|0|0|20|30\nposXY|" + std::to_string(((PlayerInfo*)(peer->data))->x) + "|" + std::to_string(((PlayerInfo*)(peer->data))->y) + "\nname|``" + ((PlayerInfo*)(peer->data))->displayName + "``\ncountry|" + ((PlayerInfo*)(peer->data))->country + "\ninvis|0\nmstate|0\nsmstate|0\n")); // ((PlayerInfo*)(server->peers[i].data))->tankIDName + ENetPacket * packet2 = enet_packet_create(p2.data, + p2.len, + ENET_PACKET_FLAG_RELIABLE); + enet_peer_send(currentPeer, 0, packet2); + delete p2.data; + //enet_host_flush(server); + } + } + } + + } + + void updateAllClothes(ENetPeer* peer) + { + ENetPeer * currentPeer; + for (currentPeer = server->peers; + currentPeer < &server->peers[server->peerCount]; + ++currentPeer) + { + if (currentPeer->state != ENET_PEER_STATE_CONNECTED) + continue; + if (isHere(peer, currentPeer)) + { + GamePacket p3 = packetEnd(appendFloat(appendIntx(appendFloat(appendFloat(appendFloat(appendString(createPacket(), "OnSetClothing"), ((PlayerInfo*)(peer->data))->cloth_hair, ((PlayerInfo*)(peer->data))->cloth_shirt, ((PlayerInfo*)(peer->data))->cloth_pants), ((PlayerInfo*)(peer->data))->cloth_feet, ((PlayerInfo*)(peer->data))->cloth_face, ((PlayerInfo*)(peer->data))->cloth_hand), ((PlayerInfo*)(peer->data))->cloth_back, ((PlayerInfo*)(peer->data))->cloth_mask, ((PlayerInfo*)(peer->data))->cloth_necklace), ((PlayerInfo*)(peer->data))->skinColor), 0.0f, 0.0f, 0.0f)); + memcpy(p3.data + 8, &(((PlayerInfo*)(peer->data))->netID), 4); // ffloor + ENetPacket * packet3 = enet_packet_create(p3.data, + p3.len, + ENET_PACKET_FLAG_RELIABLE); + + enet_peer_send(currentPeer, 0, packet3); + delete p3.data; + //enet_host_flush(server); + GamePacket p4 = packetEnd(appendFloat(appendIntx(appendFloat(appendFloat(appendFloat(appendString(createPacket(), "OnSetClothing"), ((PlayerInfo*)(currentPeer->data))->cloth_hair, ((PlayerInfo*)(currentPeer->data))->cloth_shirt, ((PlayerInfo*)(currentPeer->data))->cloth_pants), ((PlayerInfo*)(currentPeer->data))->cloth_feet, ((PlayerInfo*)(currentPeer->data))->cloth_face, ((PlayerInfo*)(currentPeer->data))->cloth_hand), ((PlayerInfo*)(currentPeer->data))->cloth_back, ((PlayerInfo*)(currentPeer->data))->cloth_mask, ((PlayerInfo*)(currentPeer->data))->cloth_necklace), ((PlayerInfo*)(currentPeer->data))->skinColor), 0.0f, 0.0f, 0.0f)); + memcpy(p4.data + 8, &(((PlayerInfo*)(currentPeer->data))->netID), 4); // ffloor + ENetPacket * packet4 = enet_packet_create(p4.data, + p4.len, + ENET_PACKET_FLAG_RELIABLE); + enet_peer_send(peer, 0, packet4); + delete p4.data; + //enet_host_flush(server); + } + } + } + + void sendClothes(ENetPeer* peer) + { + ENetPeer * currentPeer; + GamePacket p3 = packetEnd(appendFloat(appendIntx(appendFloat(appendFloat(appendFloat(appendString(createPacket(), "OnSetClothing"), ((PlayerInfo*)(peer->data))->cloth_hair, ((PlayerInfo*)(peer->data))->cloth_shirt, ((PlayerInfo*)(peer->data))->cloth_pants), ((PlayerInfo*)(peer->data))->cloth_feet, ((PlayerInfo*)(peer->data))->cloth_face, ((PlayerInfo*)(peer->data))->cloth_hand), ((PlayerInfo*)(peer->data))->cloth_back, ((PlayerInfo*)(peer->data))->cloth_mask, ((PlayerInfo*)(peer->data))->cloth_necklace), ((PlayerInfo*)(peer->data))->skinColor), 0.0f, 0.0f, 0.0f)); + for (currentPeer = server->peers; + currentPeer < &server->peers[server->peerCount]; + ++currentPeer) + { + if (currentPeer->state != ENET_PEER_STATE_CONNECTED) + continue; + if (isHere(peer, currentPeer)) + { + + memcpy(p3.data + 8, &(((PlayerInfo*)(peer->data))->netID), 4); // ffloor + ENetPacket * packet3 = enet_packet_create(p3.data, + p3.len, + ENET_PACKET_FLAG_RELIABLE); + + enet_peer_send(currentPeer, 0, packet3); + } + + } + //enet_host_flush(server); + delete p3.data; + } + + void sendPData(ENetPeer* peer, PlayerMoving* data) + { + ENetPeer * currentPeer; + + for (currentPeer = server->peers; + currentPeer < &server->peers[server->peerCount]; + ++currentPeer) + { + if (currentPeer->state != ENET_PEER_STATE_CONNECTED) + continue; + if (peer != currentPeer) + { + if (isHere(peer, currentPeer)) + { + data->netID = ((PlayerInfo*)(peer->data))->netID; + + SendPacketRaw(4, packPlayerMoving(data), 56, 0, currentPeer, ENET_PACKET_FLAG_RELIABLE); + } + } + } + } + + int getPlayersCountInWorld(string name) + { + int count = 0; + ENetPeer * currentPeer; + for (currentPeer = server->peers; + currentPeer < &server->peers[server->peerCount]; + ++currentPeer) + { + if (currentPeer->state != ENET_PEER_STATE_CONNECTED) + continue; + if (((PlayerInfo*)(currentPeer->data))->currentWorld == name) + count++; + } + return count; + } + + void sendRoulete(ENetPeer* peer, int x, int y) + { + ENetPeer* currentPeer; + int val = rand() % 37; + for (currentPeer = server->peers; + currentPeer < &server->peers[server->peerCount]; + ++currentPeer) + { + if (currentPeer->state != ENET_PEER_STATE_CONNECTED) + continue; + if (isHere(peer, currentPeer)) + { + GamePacket p2 = packetEnd(appendIntx(appendString(appendIntx(appendString(createPacket(), "OnTalkBubble"), ((PlayerInfo*)(peer->data))->netID), "Your number is "+std::to_string(val)+"."), 0)); + ENetPacket * packet2 = enet_packet_create(p2.data, + p2.len, + ENET_PACKET_FLAG_RELIABLE); + enet_peer_send(currentPeer, 0, packet2); + delete p2.data; + } + + + //cout << "Tile update at: " << data2->punchX << "x" << data2->punchY << endl; + } + } + + void sendNothingHappened(ENetPeer* peer, int x, int y) { + PlayerMoving data; + data.netID = ((PlayerInfo*)(peer->data))->netID; + data.packetType = 0x8; + data.plantingTree = 0; + data.netID = -1; + data.x = x; + data.y = y; + data.punchX = x; + data.punchY = y; + SendPacketRaw(4, packPlayerMoving(&data), 56, 0, peer, ENET_PACKET_FLAG_RELIABLE); + } + + void sendTileUpdate(int x, int y, int tile, int causedBy, ENetPeer* peer) + { + PlayerMoving data; + //data.packetType = 0x14; + data.packetType = 0x3; + + //data.characterState = 0x924; // animation + data.characterState = 0x0; // animation + data.x = x; + data.y = y; + data.punchX = x; + data.punchY = y; + data.XSpeed = 0; + data.YSpeed = 0; + data.netID = causedBy; + data.plantingTree = tile; + + WorldInfo *world = getPlyersWorld(peer); + + if (world == NULL) return; + if (x<0 || y<0 || x>world->width || y>world->height) return; + sendNothingHappened(peer,x,y); + if (!isSuperAdmin(((PlayerInfo*)(peer->data))->rawName, ((PlayerInfo*)(peer->data))->tankIDPass)) + { + if (world->items[x + (y*world->width)].foreground == 6 || world->items[x + (y*world->width)].foreground == 8 || world->items[x + (y*world->width)].foreground == 3760) + return; + if (tile == 6 || tile == 8 || tile == 3760) + return; + } + if (world->name == "ADMIN" && !getAdminLevel(((PlayerInfo*)(peer->data))->rawName, ((PlayerInfo*)(peer->data))->tankIDPass)) + { + if (world->items[x + (y*world->width)].foreground == 758) + sendRoulete(peer, x, y); + return; + } + if (world->name != "ADMIN") { + if (world->owner != "") { + if (((PlayerInfo*)(peer->data))->rawName == world->owner) { + // WE ARE GOOD TO GO + if (tile == 32) { + GamePacket p = packetEnd(appendString(appendString(createPacket(), "OnDialogRequest"), "set_default_color|`o\n\nadd_label_with_icon|big|`wShould this world be publicly breakable?``|left|242|\n\nadd_spacer|small|\nadd_button_with_icon|worldPublic|Public|noflags|2408||\nadd_button_with_icon|worldPrivate|Private|noflags|202||\nadd_spacer|small|\nadd_quick_exit|\nadd_button|chc0|Close|noflags|0|0|\nnend_dialog|gazette||OK|")); + ENetPacket * packet = enet_packet_create(p.data, + p.len, + ENET_PACKET_FLAG_RELIABLE); + enet_peer_send(peer, 0, packet); + + //enet_host_flush(server); + delete p.data; + } + } + else if (world->isPublic) + { + if (world->items[x + (y*world->width)].foreground == 242) + { + return; + } + } + else { + return; + } + if (tile == 242) { + return; + } + } + } + if (tile == 32) { + // TODO + return; + } + if (tile == 822) { + world->items[x + (y*world->width)].water = !world->items[x + (y*world->width)].water; + return; + } + if (tile == 3062) + { + world->items[x + (y*world->width)].fire = !world->items[x + (y*world->width)].fire; + return; + } + if (tile == 1866) + { + world->items[x + (y*world->width)].glue = !world->items[x + (y*world->width)].glue; + return; + } + ItemDefinition def; + try { + def = getItemDef(tile); + if (def.clothType != ClothTypes::NONE) return; + } + catch (int e) { + def.breakHits = 4; + def.blockType = BlockTypes::UNKNOWN; +#ifdef TOTAL_LOG + cout << "Ugh, unsupported item " << tile << endl; +#endif + } + + if (tile == 544 || tile == 546 || tile == 4520 || tile == 382 || tile == 3116 || tile == 4520 || tile == 1792 || tile == 5666 || tile==2994 || tile==4368) return; + if (tile == 5708 || tile == 5709 || tile == 5780 || tile == 5781 || tile == 5782 || tile == 5783 || tile == 5784 || tile == 5785 || tile == 5710 || tile == 5711 || tile == 5786 || tile == 5787 || tile == 5788 || tile == 5789 || tile == 5790 || tile == 5791 || tile == 6146 || tile == 6147 || tile == 6148 || tile == 6149 || tile == 6150 || tile == 6151 || tile == 6152 || tile == 6153 || tile == 5670 || tile == 5671 || tile == 5798 || tile == 5799 || tile == 5800 || tile == 5801 || tile == 5802 || tile == 5803 || tile == 5668 || tile == 5669 || tile == 5792 || tile == 5793 || tile == 5794 || tile == 5795 || tile == 5796 || tile == 5797 || tile == 544 || tile == 546 || tile == 4520 || tile == 382 || tile == 3116 || tile == 1792 || tile == 5666 || tile == 2994 || tile == 4368) return; + if(tile == 1902 || tile == 1508 || tile == 428) return; + if (tile == 410 || tile == 1770 || tile == 4720 || tile == 4882 || tile == 6392 || tile == 3212 || tile == 1832 || tile == 4742 || tile == 3496 || tile == 3270 || tile == 4722) return; + if (tile >= 7068) return; + if (tile == 0 || tile == 18) { + //data.netID = -1; + data.packetType = 0x8; + data.plantingTree = 4; + using namespace std::chrono; + //if (world->items[x + (y*world->width)].foreground == 0) return; + if ((duration_cast(system_clock::now().time_since_epoch())).count() - world->items[x + (y*world->width)].breakTime >= 4000) + { + world->items[x + (y*world->width)].breakTime = (duration_cast(system_clock::now().time_since_epoch())).count(); + world->items[x + (y*world->width)].breakLevel = 4; // TODO + if (world->items[x + (y*world->width)].foreground == 758) + sendRoulete(peer, x, y); + } + else + if (y < world->height && world->items[x + (y*world->width)].breakLevel + 4 >= def.breakHits * 4) { // TODO + data.packetType = 0x3;// 0xC; // 0xF // World::HandlePacketTileChangeRequest + data.netID = -1; + data.plantingTree = 0; + world->items[x + (y*world->width)].breakLevel = 0; + if (world->items[x + (y*world->width)].foreground != 0) + { + if (world->items[x + (y*world->width)].foreground == 242) + { + world->owner = ""; + world->isPublic = false; + } + world->items[x + (y*world->width)].foreground = 0; + } + else { + world->items[x + (y*world->width)].background = 0; + } + + } + else + if (y < world->height) + { + world->items[x + (y*world->width)].breakTime = (duration_cast(system_clock::now().time_since_epoch())).count(); + world->items[x + (y*world->width)].breakLevel += 4; // TODO + if (world->items[x + (y*world->width)].foreground == 758) + sendRoulete(peer, x, y); + } + + } + else { + for (int i = 0; i < ((PlayerInfo*)(peer->data))->inventory.items.size(); i++) + { + if (((PlayerInfo*)(peer->data))->inventory.items.at(i).itemID == tile) + { + if ((unsigned int)((PlayerInfo*)(peer->data))->inventory.items.at(i).itemCount>1) + { + ((PlayerInfo*)(peer->data))->inventory.items.at(i).itemCount--; + } + else { + ((PlayerInfo*)(peer->data))->inventory.items.erase(((PlayerInfo*)(peer->data))->inventory.items.begin() + i); + + } + } + } + if (def.blockType == BlockTypes::BACKGROUND) + { + world->items[x + (y*world->width)].background = tile; + } + else { + world->items[x + (y*world->width)].foreground = tile; + if (tile == 242) { + world->owner = ((PlayerInfo*)(peer->data))->rawName; + world->isPublic = false; + } + } + + world->items[x + (y*world->width)].breakLevel = 0; + } + + ENetPeer * currentPeer; + + for (currentPeer = server->peers; + currentPeer < &server->peers[server->peerCount]; + ++currentPeer) + { + if (currentPeer->state != ENET_PEER_STATE_CONNECTED) + continue; + if (isHere(peer, currentPeer)) + SendPacketRaw(4, packPlayerMoving(&data), 56, 0, currentPeer, ENET_PACKET_FLAG_RELIABLE); + + //cout << "Tile update at: " << data2->punchX << "x" << data2->punchY << endl; + } + } + + void sendPlayerLeave(ENetPeer* peer, PlayerInfo* player) + { + ENetPeer * currentPeer; + GamePacket p = packetEnd(appendString(appendString(createPacket(), "OnRemove"), "netID|" + std::to_string(player->netID) + "\n")); // ((PlayerInfo*)(server->peers[i].data))->tankIDName + GamePacket p2 = packetEnd(appendString(appendString(createPacket(), "OnConsoleMessage"), "`5<`w" + player->displayName + "`` left, `w" + std::to_string(getPlayersCountInWorld(player->currentWorld)) + "`` others here>``")); + for (currentPeer = server->peers; + currentPeer < &server->peers[server->peerCount]; + ++currentPeer) + { + if (currentPeer->state != ENET_PEER_STATE_CONNECTED) + continue; + if (isHere(peer, currentPeer)) { + { + + ENetPacket * packet = enet_packet_create(p.data, + p.len, + ENET_PACKET_FLAG_RELIABLE); + enet_peer_send(peer, 0, packet); + + } + { + + ENetPacket * packet2 = enet_packet_create(p2.data, + p2.len, + ENET_PACKET_FLAG_RELIABLE); + + enet_peer_send(currentPeer, 0, packet2); + + } + } + } + delete p.data; + delete p2.data; + } + + void sendChatMessage(ENetPeer* peer, int netID, string message) + { + if (message.length() == 0) return; + ENetPeer * currentPeer; + string name = ""; + for (currentPeer = server->peers; + currentPeer < &server->peers[server->peerCount]; + ++currentPeer) + { + if (currentPeer->state != ENET_PEER_STATE_CONNECTED) + continue; + if (((PlayerInfo*)(currentPeer->data))->netID == netID) + name = ((PlayerInfo*)(currentPeer->data))->displayName; + + } + GamePacket p = packetEnd(appendString(appendString(createPacket(), "OnConsoleMessage"), "`o<" + name + "`o> " + message)); + GamePacket p2 = packetEnd(appendIntx(appendString(appendIntx(appendString(createPacket(), "OnTalkBubble"), netID), message), 0)); + for (currentPeer = server->peers; + currentPeer < &server->peers[server->peerCount]; + ++currentPeer) + { + if (currentPeer->state != ENET_PEER_STATE_CONNECTED) + continue; + if (isHere(peer, currentPeer)) + { + + ENetPacket * packet = enet_packet_create(p.data, + p.len, + ENET_PACKET_FLAG_RELIABLE); + + enet_peer_send(currentPeer, 0, packet); + + //enet_host_flush(server); + + ENetPacket * packet2 = enet_packet_create(p2.data, + p2.len, + ENET_PACKET_FLAG_RELIABLE); + enet_peer_send(currentPeer, 0, packet2); + + //enet_host_flush(server); + } + } + delete p.data; + delete p2.data; + } + + void sendWho(ENetPeer* peer) + { + ENetPeer * currentPeer; + string name = ""; + for (currentPeer = server->peers; + currentPeer < &server->peers[server->peerCount]; + ++currentPeer) + { + if (currentPeer->state != ENET_PEER_STATE_CONNECTED) + continue; + if (isHere(peer, currentPeer)) + { + GamePacket p2 = packetEnd(appendIntx(appendString(appendIntx(appendString(createPacket(), "OnTalkBubble"), ((PlayerInfo*)(currentPeer->data))->netID), ((PlayerInfo*)(currentPeer->data))->displayName), 1)); + ENetPacket * packet2 = enet_packet_create(p2.data, + p2.len, + ENET_PACKET_FLAG_RELIABLE); + + enet_peer_send(peer, 0, packet2); + delete p2.data; + //enet_host_flush(server); + } + } + } + + void sendWorld(ENetPeer* peer, WorldInfo* worldInfo) + { +#ifdef TOTAL_LOG + cout << "Entering some world..." << endl; +#endif + ((PlayerInfo*)(peer->data))->joinClothesUpdated = false; + string asdf = "0400000004A7379237BB2509E8E0EC04F8720B050000000000000000FBBB0000010000007D920100FDFDFDFD04000000040000000000000000000000070000000000"; // 0400000004A7379237BB2509E8E0EC04F8720B050000000000000000FBBB0000010000007D920100FDFDFDFD04000000040000000000000000000000080000000000000000000000000000000000000000000000000000000000000048133A0500000000BEBB0000070000000000 + string worldName = worldInfo->name; + int xSize = worldInfo->width; + int ySize = worldInfo->height; + int square = xSize*ySize; + __int16 nameLen = worldName.length(); + int payloadLen = asdf.length() / 2; + int dataLen = payloadLen + 2 + nameLen + 12 + (square * 8) + 4; + int allocMem = payloadLen + 2 + nameLen + 12 + (square * 8) + 4 + 16000; + BYTE* data = new BYTE[allocMem]; + for (int i = 0; i < asdf.length(); i += 2) + { + char x = ch2n(asdf[i]); + x = x << 4; + x += ch2n(asdf[i + 1]); + memcpy(data + (i / 2), &x, 1); + } + int zero = 0; + __int16 item = 0; + int smth = 0; + for (int i = 0; i < square * 8; i += 4) memcpy(data + payloadLen + i + 14 + nameLen, &zero, 4); + for (int i = 0; i < square * 8; i += 8) memcpy(data + payloadLen + i + 14 + nameLen, &item, 2); + memcpy(data + payloadLen, &nameLen, 2); + memcpy(data + payloadLen + 2, worldName.c_str(), nameLen); + memcpy(data + payloadLen + 2 + nameLen, &xSize, 4); + memcpy(data + payloadLen + 6 + nameLen, &ySize, 4); + memcpy(data + payloadLen + 10 + nameLen, &square, 4); + BYTE* blockPtr = data + payloadLen + 14 + nameLen; + for (int i = 0; i < square; i++) { + if ((worldInfo->items[i].foreground == 0) || (worldInfo->items[i].foreground == 2) || (worldInfo->items[i].foreground == 8) || (worldInfo->items[i].foreground == 100)/* || (worldInfo->items[i].foreground%2)*/) + { + memcpy(blockPtr, &worldInfo->items[i].foreground, 2); + int type = 0x00000000; + // type 1 = locked + if (worldInfo->items[i].water) + type |= 0x04000000; + if (worldInfo->items[i].glue) + type |= 0x08000000; + if (worldInfo->items[i].fire) + type |= 0x10000000; + if (worldInfo->items[i].red) + type |= 0x20000000; + if (worldInfo->items[i].green) + type |= 0x40000000; + if (worldInfo->items[i].blue) + type |= 0x80000000; + + // int type = 0x04000000; = water + // int type = 0x08000000 = glue + // int type = 0x10000000; = fire + // int type = 0x20000000; = red color + // int type = 0x40000000; = green color + // int type = 0x80000000; = blue color + memcpy(blockPtr + 4, &type, 4); + /*if (worldInfo->items[i].foreground % 2) + { + blockPtr += 6; + }*/ + } + else + { + memcpy(blockPtr, &zero, 2); + } + memcpy(blockPtr + 2, &worldInfo->items[i].background, 2); + blockPtr += 8; + /*if (blockPtr - data < allocMem - 2000) // realloc + { + int wLen = blockPtr - data; + BYTE* oldData = data; + + data = new BYTE[allocMem + 16000]; + memcpy(data, oldData, allocMem); + allocMem += 16000; + delete oldData; + blockPtr = data + wLen; + + }*/ + } + memcpy(data + dataLen - 4, &smth, 4); + ENetPacket * packet2 = enet_packet_create(data, + dataLen, + ENET_PACKET_FLAG_RELIABLE); + enet_peer_send(peer, 0, packet2); + //enet_host_flush(server); + for (int i = 0; i < square; i++) { + if ((worldInfo->items[i].foreground == 0) || (worldInfo->items[i].foreground == 2) || (worldInfo->items[i].foreground == 8) || (worldInfo->items[i].foreground == 100)) + ; // nothing + else + { + PlayerMoving data; + //data.packetType = 0x14; + data.packetType = 0x3; + + //data.characterState = 0x924; // animation + data.characterState = 0x0; // animation + data.x = i%worldInfo->width; + data.y = i/worldInfo->height; + data.punchX = i%worldInfo->width; + data.punchY = i / worldInfo->width; + data.XSpeed = 0; + data.YSpeed = 0; + data.netID = -1; + data.plantingTree = worldInfo->items[i].foreground; + SendPacketRaw(4, packPlayerMoving(&data), 56, 0, peer, ENET_PACKET_FLAG_RELIABLE); + } + } + ((PlayerInfo*)(peer->data))->currentWorld = worldInfo->name; + delete data; + + } + + void sendAction(ENetPeer* peer, int netID, string action) + { + ENetPeer * currentPeer; + string name = ""; + GamePacket p2 = packetEnd(appendString(appendString(createPacket(), "OnAction"), action)); + for (currentPeer = server->peers; + currentPeer < &server->peers[server->peerCount]; + ++currentPeer) + { + if (currentPeer->state != ENET_PEER_STATE_CONNECTED) + continue; + if (isHere(peer, currentPeer)) { + + memcpy(p2.data + 8, &netID, 4); + ENetPacket * packet2 = enet_packet_create(p2.data, + p2.len, + ENET_PACKET_FLAG_RELIABLE); + + enet_peer_send(currentPeer, 0, packet2); + + //enet_host_flush(server); + } + } + delete p2.data; + } + + + // droping items WorldObjectMap::HandlePacket + void sendDrop(ENetPeer* peer, int netID, int x, int y, int item, int count, BYTE specialEffect) + { + if (item >= 7068) return; + if (item < 0) return; + ENetPeer * currentPeer; + string name = ""; + for (currentPeer = server->peers; + currentPeer < &server->peers[server->peerCount]; + ++currentPeer) + { + if (currentPeer->state != ENET_PEER_STATE_CONNECTED) + continue; + if (isHere(peer, currentPeer)) { + PlayerMoving data; + data.packetType = 14; + data.x = x; + data.y = y; + data.netID = netID; + data.plantingTree = item; + float val = count; // item count + BYTE val2 = specialEffect; + + BYTE* raw = packPlayerMoving(&data); + memcpy(raw + 16, &val, 4); + memcpy(raw + 1, &val2, 1); + + SendPacketRaw(4, raw, 56, 0, currentPeer, ENET_PACKET_FLAG_RELIABLE); + } + } + } + + void sendState(ENetPeer* peer) { + //return; // TODO + PlayerInfo* info = ((PlayerInfo*)(peer->data)); + int netID = info->netID; + ENetPeer * currentPeer; + int state = getState(info); + for (currentPeer = server->peers; + currentPeer < &server->peers[server->peerCount]; + ++currentPeer) + { + if (currentPeer->state != ENET_PEER_STATE_CONNECTED) + continue; + if (isHere(peer, currentPeer)) { + PlayerMoving data; + data.packetType = 0x14; + data.characterState = 0; // animation + data.x = 1000; + data.y = 100; + data.punchX = 0; + data.punchY = 0; + data.XSpeed = 300; + data.YSpeed = 600; + data.netID = netID; + data.plantingTree = state; + BYTE* raw = packPlayerMoving(&data); + int var = 0x808000; // placing and breking + memcpy(raw+1, &var, 3); + SendPacketRaw(4, raw, 56, 0, currentPeer, ENET_PACKET_FLAG_RELIABLE); + } + } + // TODO + } + + + + void sendWorldOffers(ENetPeer* peer) + { + if (!((PlayerInfo*)(peer->data))->isIn) return; + vector worlds = worldDB.getRandomWorlds(); + string worldOffers = "default|"; + if (worlds.size() > 0) { + worldOffers += worlds[0].name; + } + + worldOffers += "\nadd_button|Showing: `wBest Worlds``|_catselect_|0.6|3529161471|\n"; + for (int i = 0; i < worlds.size(); i++) { + worldOffers += "add_floater|"+worlds[i].name+"|"+std::to_string(getPlayersCountInWorld(worlds[i].name))+"|0.55|3529161471\n"; + } + //GamePacket p3 = packetEnd(appendString(appendString(createPacket(), "OnRequestWorldSelectMenu"), "default|GO FOR IT\nadd_button|Showing: `wFake Worlds``|_catselect_|0.6|3529161471|\nadd_floater|Subscribe|5|0.55|3529161471\nadd_floater|Growtopia|4|0.52|4278190335\nadd_floater|Noobs|150|0.49|3529161471\nadd_floater|...|3|0.49|3529161471\nadd_floater|`6:O :O :O``|2|0.46|3529161471\nadd_floater|SEEMS TO WORK|2|0.46|3529161471\nadd_floater|?????|1|0.43|3529161471\nadd_floater|KEKEKEKEK|13|0.7|3417414143\n")); + //for (int i = 0; i < p.len; i++) cout << (int)*(p.data + i) << " "; + GamePacket p3 = packetEnd(appendString(appendString(createPacket(), "OnRequestWorldSelectMenu"), worldOffers)); + ENetPacket * packet3 = enet_packet_create(p3.data, + p3.len, + ENET_PACKET_FLAG_RELIABLE); + enet_peer_send(peer, 0, packet3); + delete p3.data; + //enet_host_flush(server); + } + + + + + + BOOL WINAPI HandlerRoutine(DWORD dwCtrlType) + { + saveAllWorlds(); + return FALSE; + } + + /* + action|log +msg|`4UPDATE REQUIRED!`` : The `$V2.981`` update is now available for your device. Go get it! You'll need to install it before you can play online. +[DBG] Some text is here: action|set_url +url|http://ubistatic-a.akamaihd.net/0098/20180909/GrowtopiaInstaller.exe +label|Download Latest Version + */ +int _tmain(int argc, _TCHAR* argv[]) +{ + cout << "Growtopia private server (c) Growtopia Noobs" << endl; + enet_initialize(); + if (atexit(saveAllWorlds)) { + cout << "Worlds won't be saved for this session..." << endl; + } + /*if (RegisterApplicationRestart(L" -restarted", 0) == S_OK) + { + cout << "Autorestart is ready" << endl; + } + else { + cout << "Binding autorestart failed!" << endl; + } + Sleep(65000); + int* p = NULL; + *p = 5;*/ + SetConsoleCtrlHandler(HandlerRoutine, true); + + // load items.dat + { + std::ifstream file("items.dat", std::ios::binary | std::ios::ate); + itemsDatSize = file.tellg(); + + + itemsDat = new BYTE[60 + itemsDatSize]; + string asdf = "0400000010000000FFFFFFFF000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000"; + for (int i = 0; i < asdf.length(); i += 2) + { + char x = ch2n(asdf[i]); + x = x << 4; + x += ch2n(asdf[i + 1]); + memcpy(itemsDat + (i / 2), &x, 1); + if (asdf.length() > 60 * 2) throw 0; + } + memcpy(itemsDat + 56, &itemsDatSize, 4); + file.seekg(0, std::ios::beg); + + if (file.read((char*)(itemsDat + 60), itemsDatSize)) + { + cout << "Updating items data suecess!" << endl; + + } + else { + cout << "Updating items data failed!" << endl; + } + } + + + //world = generateWorld(); + worldDB.get("TEST"); + worldDB.get("MAIN"); + worldDB.get("NEW"); + worldDB.get("ADMIN"); + ENetAddress address; + /* Bind the server to the default localhost. */ + /* A specific host address can be specified by */ + enet_address_set_host (&address, "0.0.0.0"); + //address.host = ENET_HOST_ANY; + /* Bind the server to port 1234. */ + address.port = 17091; + server = enet_host_create(&address /* the address to bind the server host to */, + 1024 /* allow up to 32 clients and/or outgoing connections */, + 10 /* allow up to 2 channels to be used, 0 and 1 */, + 0 /* assume any amount of incoming bandwidth */, + 0 /* assume any amount of outgoing bandwidth */); + if (server == NULL) + { + fprintf(stderr, + "An error occurred while trying to create an ENet server host.\n"); + while (1); + exit(EXIT_FAILURE); + } + server->checksum = enet_crc32; + enet_host_compress_with_range_coder(server); + + cout << "Building items database..." << endl; + buildItemsDatabase(); + cout << "Database is built!" << endl; + + ENetEvent event; + /* Wait up to 1000 milliseconds for an event. */ + while (true) + while (enet_host_service(server, &event, 1000) > 0) + { + ENetPeer* peer = event.peer; + switch (event.type) + { + case ENET_EVENT_TYPE_CONNECT: + { +#ifdef TOTAL_LOG + printf("A new client connected.\n"); +#endif + /* Store any relevant client information here. */ + //event.peer->data = "Client information"; + ENetPeer * currentPeer; + int count = 0; + for (currentPeer = server->peers; + currentPeer < &server->peers[server->peerCount]; + ++currentPeer) + { + if (currentPeer->state != ENET_PEER_STATE_CONNECTED) + continue; + if (currentPeer->address.host == peer->address.host) + count++; + } + + event.peer->data = new PlayerInfo; + if (count > 3) + { + GamePacket p = packetEnd(appendString(appendString(createPacket(), "OnConsoleMessage"), "`rToo much accounts are logged on from this IP. If you don't think so, then please let server relax and connect again in half minute or so.``")); + ENetPacket * packet = enet_packet_create(p.data, + p.len, + ENET_PACKET_FLAG_RELIABLE); + enet_peer_send(peer, 0, packet); + delete p.data; + //enet_host_flush(server); + enet_peer_disconnect_later(peer, 0); + } + else { + sendData(peer, 1, 0, 0); + } + + + continue; + } + case ENET_EVENT_TYPE_RECEIVE: + { + if (((PlayerInfo*)(peer->data))->isUpdating) + { + cout << "packet drop" << endl; + continue; + } + /*printf("A packet of length %u containing %s was received from %s on channel %u.\n", + event.packet->dataLength, + event.packet->data, + event.peer->data, + event.channelID); + cout << (int)*event.packet->data << endl;*/ + //cout << text_encode(getPacketData((char*)event.packet->data)); + /*for (int i = 0; i < event.packet->dataLength; i++) + { + cout << event.packet->data[i]; + } + sendData(7, 0, 0); + string x = "eventType|0\neventName|102_PLAYER.AUTHENTICATION\nAuthenticated|0\nAuthentication_error|6\nDevice_Id|^^\nGrow_Id|0\nName|^^Elektronik\nWordlock_balance|0\n"; + //string x = "eventType | 0\neventName | 102_PLAYER.AUTHENTICATION\nAuthenticated | 0\nAuthentication_error | 6\nDevice_Id | ^^\nGrow_Id | 0\nName | ^^Elektronik\nWorldlock_balance | 0\n"; + sendData(6, (char*)x.c_str(), x.length()); + string y = "action|quit\n"; + sendData(3, (char*)y.c_str(), y.length()); + cout << endl; + string asdf = "0400000001000000FFFFFFFF0000000008000000000000000000000000000000000000000000000000000000000000000000000000000000400000000600020E0000004F6E53656E64546F5365727665720109ED4200000209834CED00030910887F0104020D0000003230392E35392E3139302E347C05090100000000C"; + //asdf = "0400000001000000FFFFFFFF000000000800000000000000000000000000000000000000000000000000000000000000000000000000000040000000060002220000004F6E53757065724D61696E53746172744163636570744C6F676F6E464232313131330109ED4200000209834CED00030910887F0104020D0000003230392E35392E3139302E347C05090100000000C"; + ENetPacket * packet = enet_packet_create(0, + asdf.length()/2, + ENET_PACKET_FLAG_RELIABLE); + for (int i = 0; i < asdf.length(); i += 2) + { + char x = ch2n(asdf[i]); + x = x << 4; + x += ch2n(asdf[i + 1]); + memcpy(packet->data + (i / 2), &x, 1); + } + enet_peer_send(peer, 0, packet); + enet_host_flush(server); + /* Clean up the packet now that we're done using it. */ + //enet_packet_destroy(event.packet); + //sendData(7, 0, 0); + int messageType = GetMessageTypeFromPacket(event.packet); + //cout << "Packet type is " << messageType << endl; + //cout << (event->packet->data+4) << endl; + WorldInfo* world = getPlyersWorld(peer); + switch (messageType) { + case 2: + { + //cout << GetTextPointerFromPacket(event.packet) << endl; + string cch = GetTextPointerFromPacket(event.packet); + string str = cch.substr(cch.find("text|") + 5, cch.length() - cch.find("text|") - 1); + if (cch.find("action|respawn") == 0) + { + int x = 3040; + int y = 736; + + if (!world) continue; + + for (int i = 0; i < world->width*world->height; i++) + { + if (world->items[i].foreground == 6) { + x = (i%world->width) * 32; + y = (i / world->width) * 32; + } + } + { + PlayerMoving data; + data.packetType = 0x0; + data.characterState = 0x924; // animation + data.x = x; + data.y = y; + data.punchX = -1; + data.punchY = -1; + data.XSpeed = 0; + data.YSpeed = 0; + data.netID = ((PlayerInfo*)(peer->data))->netID; + data.plantingTree = 0x0; + SendPacketRaw(4, packPlayerMoving(&data), 56, 0, peer, ENET_PACKET_FLAG_RELIABLE); + } + + { + int x = 3040; + int y = 736; + + for (int i = 0; i < world->width*world->height; i++) + { + if (world->items[i].foreground == 6) { + x = (i%world->width) * 32; + y = (i / world->width) * 32; + } + } + GamePacket p2 = packetEnd(appendFloat(appendString(createPacket(), "OnSetPos"), x,y)); + memcpy(p2.data + 8, &(((PlayerInfo*)(peer->data))->netID), 4); + ENetPacket * packet2 = enet_packet_create(p2.data, + p2.len, + ENET_PACKET_FLAG_RELIABLE); + + enet_peer_send(peer, 0, packet2); + delete p2.data; + //enet_host_flush(server); + } + { + int x = 3040; + int y = 736; + + for (int i = 0; i < world->width*world->height; i++) + { + if (world->items[i].foreground == 6) { + x = (i%world->width) * 32; + y = (i / world->width) * 32; + } + } + GamePacket p2 = packetEnd(appendIntx(appendString(createPacket(), "OnSetFreezeState"), 0)); + memcpy(p2.data + 8, &(((PlayerInfo*)(peer->data))->netID), 4); + ENetPacket * packet2 = enet_packet_create(p2.data, + p2.len, + ENET_PACKET_FLAG_RELIABLE); + + enet_peer_send(peer, 0, packet2); + delete p2.data; + //enet_host_flush(server); + } +#ifdef TOTAL_LOG + cout << "Respawning... " << endl; +#endif + } + if (cch.find("action|growid") == 0) + { +#ifndef REGISTRATION + { + GamePacket p = packetEnd(appendString(appendString(createPacket(), "OnConsoleMessage"), "Registration is not supported yet!")); + ENetPacket * packet = enet_packet_create(p.data, + p.len, + ENET_PACKET_FLAG_RELIABLE); + enet_peer_send(peer, 0, packet); + delete p.data; + //enet_host_flush(server); + } +#endif +#ifdef REGISTRATION + //GamePacket p = packetEnd(appendString(appendString(createPacket(), "OnDialogRequest"), "set_default_color|`o\n\nadd_label_with_icon|big|`w" + itemDefs.at(id).name + "``|left|" + std::to_string(id) + "|\n\nadd_spacer|small|\nadd_textbox|" + itemDefs.at(id).description + "|left|\nadd_spacer|small|\nadd_quick_exit|\nadd_button|chc0|Close|noflags|0|0|\nnend_dialog|gazette||OK|")); + GamePacket p = packetEnd(appendString(appendString(createPacket(), "OnDialogRequest"), "set_default_color|`o\n\nadd_label_with_icon|big|`wGet your GrowID Now!``|left|32|\n\nadd_spacer|small|\nadd_text_input|username|GrowID: ||15|\nadd_text_input|password|Password: ||100|\nend_dialog|register|Cancel|OK|\n")); + ENetPacket * packet = enet_packet_create(p.data, + p.len, + ENET_PACKET_FLAG_RELIABLE); + enet_peer_send(peer, 0, packet); + + enet_host_flush(server); + delete p.data; +#endif + } + if (cch.find("action|store") == 0) + { + GamePacket p2 = packetEnd(appendString(appendString(createPacket(), "OnStoreRequest"), "set_description_text|Welcome to the `2Growtopia Store``! Tap the item you'd like more info on.`o `wWant to get `5Supporter`` status? Any Gem purchase (or `57,000`` Gems earned with free `5Tapjoy`` offers) will make you one. You'll get new skin colors, the `5Recycle`` tool to convert unwanted items into Gems, and more bonuses!\nadd_button|iap_menu|Buy Gems|interface/large/store_buttons5.rttex||0|2|0|0||\nadd_button|subs_menu|Subscriptions|interface/large/store_buttons22.rttex||0|1|0|0||\nadd_button|token_menu|Growtoken Items|interface/large/store_buttons9.rttex||0|0|0|0||\nadd_button|pristine_forceps|`oAnomalizing Pristine Bonesaw``|interface/large/store_buttons20.rttex|Built to exacting specifications by GrowTech engineers to find and remove temporal anomalies from infected patients, and with even more power than Delicate versions! Note : The fragile anomaly - seeking circuitry in these devices is prone to failure and may break (though with less of a chance than a Delicate version)! Use with care!|0|3|3500|0||\nadd_button|itemomonth|`oItem Of The Month``|interface/large/store_buttons16.rttex|`2September 2018:`` `9Sorcerer's Tunic of Mystery!`` Capable of reflecting the true colors of the world around it, this rare tunic is made of captured starlight and aether. If you think knitting with thread is hard, just try doing it with moonbeams and magic! The result is worth it though, as these clothes won't just make you look amazing - you'll be able to channel their inherent power into blasts of cosmic energy!``|0|3|200000|0||\nadd_button|contact_lenses|`oContact Lens Pack``|interface/large/store_buttons22.rttex|Need a colorful new look? This pack includes 10 random Contact Lens colors (and may include Contact Lens Cleaning Solution, to return to your natural eye color)!|0|7|15000|0||\nadd_button|locks_menu|Locks And Stuff|interface/large/store_buttons3.rttex||0|4|0|0||\nadd_button|itempack_menu|Item Packs|interface/large/store_buttons3.rttex||0|3|0|0||\nadd_button|bigitems_menu|Awesome Items|interface/large/store_buttons4.rttex||0|6|0|0||\nadd_button|weather_menu|Weather Machines|interface/large/store_buttons5.rttex|Tired of the same sunny sky? We offer alternatives within...|0|4|0|0||\n")); + ENetPacket * packet2 = enet_packet_create(p2.data, + p2.len, + ENET_PACKET_FLAG_RELIABLE); + + enet_peer_send(peer, 0, packet2); + delete p2.data; + //enet_host_flush(server); + } + if (cch.find("action|info") == 0) + { + std::stringstream ss(cch); + std::string to; + int id = -1; + int count = -1; + while (std::getline(ss, to, '\n')) { + vector infoDat = explode("|", to); + if (infoDat.size() == 3) { + if (infoDat[1] == "itemID") id = atoi(infoDat[2].c_str()); + if (infoDat[1] == "count") count = atoi(infoDat[2].c_str()); + } + } + if (id == -1 || count == -1) continue; + if (itemDefs.size() < id || id < 0) continue; + GamePacket p = packetEnd(appendString(appendString(createPacket(), "OnDialogRequest"), "set_default_color|`o\n\nadd_label_with_icon|big|`w"+ itemDefs.at(id).name +"``|left|"+std::to_string(id)+"|\n\nadd_spacer|small|\nadd_textbox|"+ itemDefs.at(id).description +"|left|\nadd_spacer|small|\nadd_quick_exit|\nadd_button|chc0|Close|noflags|0|0|\nnend_dialog|gazette||OK|")); + ENetPacket * packet = enet_packet_create(p.data, + p.len, + ENET_PACKET_FLAG_RELIABLE); + enet_peer_send(peer, 0, packet); + + //enet_host_flush(server); + delete p.data; + } + if (cch.find("action|dialog_return") == 0) + { + std::stringstream ss(cch); + std::string to; + string btn = ""; + bool isRegisterDialog = false; + string username = ""; + string password = ""; + while (std::getline(ss, to, '\n')) { + vector infoDat = explode("|", to); + if (infoDat.size() == 2) { + if (infoDat[0] == "buttonClicked") btn = infoDat[1]; + if (infoDat[0] == "dialog_name" && infoDat[1] == "register") + { + isRegisterDialog = true; + } + if (isRegisterDialog) { + if (infoDat[0] == "username") username = infoDat[1]; + if (infoDat[0] == "password") password = infoDat[1]; + } + } + } + if (btn == "worldPublic") if (((PlayerInfo*)(peer->data))->rawName == getPlyersWorld(peer)->owner) getPlyersWorld(peer)->isPublic = true; + if(btn == "worldPrivate") if (((PlayerInfo*)(peer->data))->rawName == getPlyersWorld(peer)->owner) getPlyersWorld(peer)->isPublic = false; +#ifdef REGISTRATION + if (isRegisterDialog) { + + int regState = PlayerDB::playerRegister(username, password); + if (regState == 1) { + GamePacket p = packetEnd(appendString(appendString(createPacket(), "OnConsoleMessage"), "`rYour account was created!``")); + ENetPacket * packet = enet_packet_create(p.data, + p.len, + ENET_PACKET_FLAG_RELIABLE); + enet_peer_send(peer, 0, packet); + delete p.data; + GamePacket p2 = packetEnd(appendString(appendString(appendInt(appendString(createPacket(), "SetHasGrowID"), 1), username), password)); + ENetPacket * packet2 = enet_packet_create(p2.data, + p2.len, + ENET_PACKET_FLAG_RELIABLE); + enet_peer_send(peer, 0, packet2); + + //enet_host_flush(server); + delete p2.data; + enet_peer_disconnect_later(peer, 0); + } + else if(regState==-1) { + GamePacket p = packetEnd(appendString(appendString(createPacket(), "OnConsoleMessage"), "`rCreation of account failed, because it already exists!``")); + ENetPacket * packet = enet_packet_create(p.data, + p.len, + ENET_PACKET_FLAG_RELIABLE); + enet_peer_send(peer, 0, packet); + delete p.data; + } + else if (regState == -2) { + GamePacket p = packetEnd(appendString(appendString(createPacket(), "OnConsoleMessage"), "`rCreation of account failed, because name is too short!``")); + ENetPacket * packet = enet_packet_create(p.data, + p.len, + ENET_PACKET_FLAG_RELIABLE); + enet_peer_send(peer, 0, packet); + delete p.data; + } + } +#endif + } + string dropText = "action|drop\n|itemID|"; + if (cch.find(dropText) == 0) + { + sendDrop(peer, -1, ((PlayerInfo*)(peer->data))->x + (32 * (((PlayerInfo*)(peer->data))->isRotatedLeft?-1:1)), ((PlayerInfo*)(peer->data))->y, atoi(cch.substr(dropText.length(), cch.length() - dropText.length() - 1).c_str()), 1, 0); + /*int itemID = atoi(cch.substr(dropText.length(), cch.length() - dropText.length() - 1).c_str()); + PlayerMoving data; + data.packetType = 14; + data.x = ((PlayerInfo*)(peer->data))->x; + data.y = ((PlayerInfo*)(peer->data))->y; + data.netID = -1; + data.plantingTree = itemID; + float val = 1; // item count + BYTE val2 = 0; // if 8, then geiger effect + + BYTE* raw = packPlayerMoving(&data); + memcpy(raw + 16, &val, 4); + memcpy(raw + 1, &val2, 1); + SendPacketRaw(4, raw, 56, 0, peer, ENET_PACKET_FLAG_RELIABLE);*/ + } + if (cch.find("text|") != std::string::npos){ + if (str == "/mod") + { + ((PlayerInfo*)(peer->data))->canWalkInBlocks = true; + sendState(peer); + /*PlayerMoving data; + data.packetType = 0x14; + data.characterState = 0x0; // animation + data.x = 1000; + data.y = 1; + data.punchX = 0; + data.punchY = 0; + data.XSpeed = 300; + data.YSpeed = 600; + data.netID = ((PlayerInfo*)(peer->data))->netID; + data.plantingTree = 0xFF; + SendPacketRaw(4, packPlayerMoving(&data), 56, 0, peer, ENET_PACKET_FLAG_RELIABLE);*/ + } + else if (str.substr(0, 7) == "/state ") + { + PlayerMoving data; + data.packetType = 0x14; + data.characterState = 0x0; // animation + data.x = 1000; + data.y = 0; + data.punchX = 0; + data.punchY = 0; + data.XSpeed = 300; + data.YSpeed = 600; + data.netID = ((PlayerInfo*)(peer->data))->netID; + data.plantingTree = atoi(str.substr(7, cch.length() - 7 - 1).c_str()); + SendPacketRaw(4, packPlayerMoving(&data), 56, 0, peer, ENET_PACKET_FLAG_RELIABLE); + } + else if (str == "/help"){ + GamePacket p = packetEnd(appendString(appendString(createPacket(), "OnConsoleMessage"), "Supporteds comands are: /help, /mod, /unmod, /inventory, /item id, /team id, /color number, /who, /state number, /count, /sb message, /alt, /radio")); + ENetPacket * packet = enet_packet_create(p.data, + p.len, + ENET_PACKET_FLAG_RELIABLE); + enet_peer_send(peer, 0, packet); + delete p.data; + //enet_host_flush(server); + } + else if (str == "/count"){ + int count = 0; + ENetPeer * currentPeer; + string name = ""; + for (currentPeer = server->peers; + currentPeer < &server->peers[server->peerCount]; + ++currentPeer) + { + if (currentPeer->state != ENET_PEER_STATE_CONNECTED) + continue; + count++; + } + GamePacket p = packetEnd(appendString(appendString(createPacket(), "OnConsoleMessage"), "There is "+std::to_string(count)+" people out of 1024 limit.")); + ENetPacket * packet = enet_packet_create(p.data, + p.len, + ENET_PACKET_FLAG_RELIABLE); + enet_peer_send(peer, 0, packet); + delete p.data; + //enet_host_flush(server); + } + else if (str.substr(0, 5) == "/asb "){ + if (!canSB(((PlayerInfo*)(peer->data))->rawName, ((PlayerInfo*)(peer->data))->tankIDPass)) continue; + cout << "ASB from " << ((PlayerInfo*)(peer->data))->rawName << "in world " << ((PlayerInfo*)(peer->data))->currentWorld << "with IP " << std::hex << peer->address.host << std::dec << " with message " << str.substr(5, cch.length() - 5 - 1) << endl; + GamePacket p = packetEnd(appendInt(appendString(appendString(appendString(appendString(createPacket(), "OnAddNotification"), "interface/atomic_button.rttex"), str.substr(4, cch.length() - 4 - 1).c_str()), "audio/hub_open.wav"), 0)); + ENetPacket * packet = enet_packet_create(p.data, + p.len, + ENET_PACKET_FLAG_RELIABLE); + ENetPeer * currentPeer; + for (currentPeer = server->peers; + currentPeer < &server->peers[server->peerCount]; + ++currentPeer) + { + if (currentPeer->state != ENET_PEER_STATE_CONNECTED) + continue; + enet_peer_send(currentPeer, 0, packet); + } + + //enet_host_flush(server); + delete p.data; + } + else if (str.substr(0, 4) == "/sb ") { + using namespace std::chrono; + if (((PlayerInfo*)(peer->data))->lastSB + 45000 < (duration_cast(system_clock::now().time_since_epoch())).count()) + { + ((PlayerInfo*)(peer->data))->lastSB = (duration_cast(system_clock::now().time_since_epoch())).count(); + } + else { + GamePacket p = packetEnd(appendString(appendString(createPacket(), "OnConsoleMessage"), "You are spamming sb too fast, calm down.")); + ENetPacket * packet = enet_packet_create(p.data, + p.len, + ENET_PACKET_FLAG_RELIABLE); + + enet_peer_send(peer, 0, packet); + delete p.data; + //enet_host_flush(server); + continue; + } + + string name = ((PlayerInfo*)(peer->data))->displayName; + GamePacket p = packetEnd(appendString(appendString(createPacket(), "OnConsoleMessage"), "`w** `5Super-Broadcast`` from `$`2" + name + "```` (in `$" + ((PlayerInfo*)(peer->data))->currentWorld + "``) ** :`` `# " + str.substr(4, cch.length() - 4 - 1))); + string text = "action|play_sfx\nfile|audio/beep.wav\ndelayMS|0\n"; + BYTE* data = new BYTE[5 + text.length()]; + BYTE zero = 0; + int type = 3; + memcpy(data, &type, 4); + memcpy(data + 4, text.c_str(), text.length()); + memcpy(data + 4 + text.length(), &zero, 1); + ENetPeer * currentPeer; + + for (currentPeer = server->peers; + currentPeer < &server->peers[server->peerCount]; + ++currentPeer) + { + if (currentPeer->state != ENET_PEER_STATE_CONNECTED) + continue; + if (!((PlayerInfo*)(currentPeer->data))->radio) + continue; + ENetPacket * packet = enet_packet_create(p.data, + p.len, + ENET_PACKET_FLAG_RELIABLE); + + enet_peer_send(currentPeer, 0, packet); + + + + + ENetPacket * packet2 = enet_packet_create(data, + 5+text.length(), + ENET_PACKET_FLAG_RELIABLE); + + enet_peer_send(currentPeer, 0, packet2); + + //enet_host_flush(server); + } + delete data; + delete p.data; + } + else if (str.substr(0, 6) == "/radio") { + GamePacket p; + if (((PlayerInfo*)(peer->data))->radio) { + p = packetEnd(appendString(appendString(createPacket(), "OnConsoleMessage"), "You now won't recieve broadcast anymore.")); + ((PlayerInfo*)(peer->data))->radio = false; + } else { + p = packetEnd(appendString(appendString(createPacket(), "OnConsoleMessage"), "You will now recieve broadcasts again.")); + ((PlayerInfo*)(peer->data))->radio = true; + } + + ENetPacket * packet = enet_packet_create(p.data, + p.len, + ENET_PACKET_FLAG_RELIABLE); + + enet_peer_send(peer, 0, packet); + delete p.data; + //enet_host_flush(server); + } + else if (str.substr(0, 6) == "/reset"){ + if (!isSuperAdmin(((PlayerInfo*)(peer->data))->rawName, ((PlayerInfo*)(peer->data))->tankIDPass)) break; + cout << "Restart from " << ((PlayerInfo*)(peer->data))->displayName << endl; + GamePacket p = packetEnd(appendInt(appendString(appendString(appendString(appendString(createPacket(), "OnAddNotification"), "interface/science_button.rttex"), "Restarting soon!"), "audio/mp3/suspended.mp3"), 0)); + ENetPacket * packet = enet_packet_create(p.data, + p.len, + ENET_PACKET_FLAG_RELIABLE); + ENetPeer * currentPeer; + for (currentPeer = server->peers; + currentPeer < &server->peers[server->peerCount]; + ++currentPeer) + { + if (currentPeer->state != ENET_PEER_STATE_CONNECTED) + continue; + enet_peer_send(currentPeer, 0, packet); + } + delete p.data; + //enet_host_flush(server); + } + + /*else if (str.substr(0, 7) == "/clear "){ + if (!canClear(((PlayerInfo*)(peer->data))->rawName, ((PlayerInfo*)(peer->data))->tankIDPass)) continue; + cout << "World cleared by " << ((PlayerInfo*)(peer->data))->tankIDName << endl; + WorldInfo* wrld = getPlyersWorld(peer); + string wName = str.substr(4, cch.length() - 4 - 1); + for (auto & c : wName) c = toupper(c); + for (int i = 0; i < worlds.size(); i++) + { + if (wrld == NULL) continue; + if (wName == wrld->name) + { + worlds.at(i) = generateWorld(wrld->name, wrld->width, wrld->height); + ENetPeer * currentPeer; + for (currentPeer = server->peers; + currentPeer < &server->peers[server->peerCount]; + ++currentPeer) + { + if (currentPeer->state != ENET_PEER_STATE_CONNECTED) + continue; + if (((PlayerInfo*)(currentPeer->data))->currentWorld == wrld->name) + { + sendWorld(currentPeer, &worlds.at(i)); + + int x = 3040; + int y = 736; + + for (int j = 0; j < worlds.at(i).width*worlds.at(i).height; j++) + { + if (worlds.at(i).items[j].foreground == 6) { + x = (j%worlds.at(i).width) * 32; + y = (j / worlds.at(i).width) * 32; + } + } + GamePacket p = packetEnd(appendString(appendString(createPacket(), "OnSpawn"), "spawn|avatar\nnetID|" + std::to_string(cId) + "\nuserID|" + std::to_string(cId) + "\ncolrect|0|0|20|30\nposXY|" + std::to_string(x) + "|" + std::to_string(y) + "\nname|``" + ((PlayerInfo*)(currentPeer->data))->tankIDName + "``\ncountry|" + ((PlayerInfo*)(currentPeer->data))->country + "\ninvis|0\nmstate|0\nsmstate|0\ntype|local\n")); + //for (int i = 0; i < p.len; i++) cout << (int)*(p.data + i) << " "; + ENetPacket * packet = enet_packet_create(p.data, + p.len, + ENET_PACKET_FLAG_RELIABLE); + enet_peer_send(currentPeer, 0, packet); + + enet_host_flush(server); + delete p.data; + ((PlayerInfo*)(currentPeer->data))->netID = cId; + onPeerConnect(currentPeer); + cId++; + + sendInventory(((PlayerInfo*)(event.peer->data))->inventory); + } + + } + enet_host_flush(server); + } + } + } + else if (str.substr(0, 6) == "/clear"){ + if (!canClear(((PlayerInfo*)(peer->data))->rawName, ((PlayerInfo*)(peer->data))->tankIDPass)) continue; + cout << "World cleared by " << ((PlayerInfo*)(peer->data))->tankIDName << endl; + WorldInfo* wrld = getPlyersWorld(peer); + for (int i = 0; i < worlds.size(); i++) + { + if (wrld == NULL) continue; + if (&worlds.at(i) == wrld) + { + worlds.at(i) = generateWorld(wrld->name, wrld->width, wrld->height); + ENetPeer * currentPeer; + for (currentPeer = server->peers; + currentPeer < &server->peers[server->peerCount]; + ++currentPeer) + { + if (currentPeer->state != ENET_PEER_STATE_CONNECTED) + continue; + if (((PlayerInfo*)(currentPeer->data))->currentWorld == wrld->name) + { + sendWorld(currentPeer, &worlds.at(i)); + + int x = 3040; + int y = 736; + + for (int j = 0; j < worlds.at(i).width*worlds.at(i).height; j++) + { + if (worlds.at(i).items[j].foreground == 6) { + x = (j%worlds.at(i).width) * 32; + y = (j / worlds.at(i).width) * 32; + } + } + GamePacket p = packetEnd(appendString(appendString(createPacket(), "OnSpawn"), "spawn|avatar\nnetID|" + std::to_string(cId) + "\nuserID|" + std::to_string(cId) + "\ncolrect|0|0|20|30\nposXY|" + std::to_string(x) + "|" + std::to_string(y) + "\nname|``" + ((PlayerInfo*)(currentPeer->data))->tankIDName + "``\ncountry|" + ((PlayerInfo*)(currentPeer->data))->country + "\ninvis|0\nmstate|0\nsmstate|0\ntype|local\n")); + //for (int i = 0; i < p.len; i++) cout << (int)*(p.data + i) << " "; + ENetPacket * packet = enet_packet_create(p.data, + p.len, + ENET_PACKET_FLAG_RELIABLE); + enet_peer_send(currentPeer, 0, packet); + + enet_host_flush(server); + delete p.data; + ((PlayerInfo*)(currentPeer->data))->netID = cId; + onPeerConnect(currentPeer); + cId++; + + sendInventory(((PlayerInfo*)(event.peer->data))->inventory); + } + + } + enet_host_flush(server); + } + } + }*/ + else if (str == "/unmod") + { + ((PlayerInfo*)(peer->data))->canWalkInBlocks = false; + sendState(peer); + /*PlayerMoving data; + data.packetType = 0x14; + data.characterState = 0x0; // animation + data.x = 1000; + data.y = 1; + data.punchX = 0; + data.punchY = 0; + data.XSpeed = 300; + data.YSpeed = 600; + data.netID = ((PlayerInfo*)(peer->data))->netID; + data.plantingTree = 0x0; + SendPacketRaw(4, packPlayerMoving(&data), 56, 0, peer, ENET_PACKET_FLAG_RELIABLE);*/ + } + else if (str == "/alt") { + GamePacket p2 = packetEnd(appendInt(appendString(createPacket(), "OnSetBetaMode"), 1)); + ENetPacket * packet2 = enet_packet_create(p2.data, + p2.len, + ENET_PACKET_FLAG_RELIABLE); + enet_peer_send(peer, 0, packet2); + delete p2.data; + //enet_host_flush(server); + } + else + if (str == "/inventory") + { + sendInventory(peer, ((PlayerInfo*)(peer->data))->inventory); + } else + if (str.substr(0,6) == "/item ") + { + PlayerInventory inventory; + InventoryItem item; + item.itemID = atoi(str.substr(6, cch.length() - 6 - 1).c_str()); + item.itemCount = 200; + inventory.items.push_back(item); + item.itemCount = 1; + item.itemID = 18; + inventory.items.push_back(item); + item.itemID = 32; + inventory.items.push_back(item); + sendInventory(peer, inventory); + } else + if (str.substr(0, 6) == "/team ") + { + int val = 0; + val = atoi(str.substr(6, cch.length() - 6 - 1).c_str()); + PlayerMoving data; + //data.packetType = 0x14; + data.packetType = 0x1B; + //data.characterState = 0x924; // animation + data.characterState = 0x0; // animation + data.x = 0; + data.y = 0; + data.punchX = val; + data.punchY = 0; + data.XSpeed = 0; + data.YSpeed = 0; + data.netID = ((PlayerInfo*)(peer->data))->netID; + data.plantingTree = 0; + SendPacketRaw(4, packPlayerMoving(&data), 56, 0, peer, ENET_PACKET_FLAG_RELIABLE); + + } else + if (str.substr(0, 7) == "/color ") + { + ((PlayerInfo*)(peer->data))->skinColor = atoi(str.substr(6, cch.length() - 6 - 1).c_str()); + sendClothes(peer); + } + if (str.substr(0, 4) == "/who") + { + sendWho(peer); + + } + if (str.length() && str[0] == '/') + { + sendAction(peer, ((PlayerInfo*)(peer->data))->netID, str); + } else if (str.length()>0) + { + sendChatMessage(peer, ((PlayerInfo*)(peer->data))->netID, str); + } + + } + if (!((PlayerInfo*)(event.peer->data))->isIn) + { + GamePacket p = packetEnd(appendString(appendString(appendString(appendString(appendInt(appendString(createPacket(), "OnSuperMainStartAcceptLogonFB211131ddf"), -407289376), "cdn.growtopiagame.com"), "cache/"), "cc.cz.madkite.freedom org.aqua.gg idv.aqua.bulldog com.cih.gamecih2 com.cih.gamecih com.cih.game_cih cn.maocai.gamekiller com.gmd.speedtime org.dax.attack com.x0.strai.frep com.x0.strai.free org.cheatengine.cegui org.sbtools.gamehack com.skgames.traffikrider org.sbtoods.gamehaca com.skype.ralder org.cheatengine.cegui.xx.multi1458919170111 com.prohiro.macro me.autotouch.autotouch com.cygery.repetitouch.free com.cygery.repetitouch.pro com.proziro.zacro com.slash.gamebuster"), "proto=42|choosemusic=audio/mp3/about_theme.mp3|active_holiday=0|")); + //for (int i = 0; i < p.len; i++) cout << (int)*(p.data + i) << " "; + ENetPacket * packet = enet_packet_create(p.data, + p.len, + ENET_PACKET_FLAG_RELIABLE); + enet_peer_send(peer, 0, packet); + + //enet_host_flush(server); + delete p.data; + std::stringstream ss(GetTextPointerFromPacket(event.packet)); + std::string to; + while (std::getline(ss, to, '\n')){ + string id = to.substr(0, to.find("|")); + string act = to.substr(to.find("|") + 1, to.length() - to.find("|") - 1); + if (id == "tankIDName") + { + ((PlayerInfo*)(event.peer->data))->tankIDName = act; + ((PlayerInfo*)(event.peer->data))->haveGrowId = true; + } + else if(id == "tankIDPass") + { + ((PlayerInfo*)(event.peer->data))->tankIDPass = act; + } + else if(id == "requestedName") + { + ((PlayerInfo*)(event.peer->data))->requestedName = act; + } + else if (id == "country") + { + ((PlayerInfo*)(event.peer->data))->country = act; + } + } + if (!((PlayerInfo*)(event.peer->data))->haveGrowId) + { + ((PlayerInfo*)(event.peer->data))->rawName = ""; + ((PlayerInfo*)(event.peer->data))->displayName = "Fake " + PlayerDB::fixColors(((PlayerInfo*)(event.peer->data))->requestedName.substr(0, ((PlayerInfo*)(event.peer->data))->requestedName.length()>15?15:((PlayerInfo*)(event.peer->data))->requestedName.length())); + } + else { + ((PlayerInfo*)(event.peer->data))->rawName = PlayerDB::getProperName(((PlayerInfo*)(event.peer->data))->tankIDName); +#ifdef REGISTRATION + int logStatus = PlayerDB::playerLogin(peer, ((PlayerInfo*)(event.peer->data))->rawName, ((PlayerInfo*)(event.peer->data))->tankIDPass); + if (logStatus == 1) { + GamePacket p = packetEnd(appendString(appendString(createPacket(), "OnConsoleMessage"), "`rYou has successfully logged to your account!``")); + ENetPacket * packet = enet_packet_create(p.data, + p.len, + ENET_PACKET_FLAG_RELIABLE); + enet_peer_send(peer, 0, packet); + delete p.data; + ((PlayerInfo*)(event.peer->data))->displayName = ((PlayerInfo*)(event.peer->data))->tankIDName; + } + else { + GamePacket p = packetEnd(appendString(appendString(createPacket(), "OnConsoleMessage"), "`rWrong username or password!``")); + ENetPacket * packet = enet_packet_create(p.data, + p.len, + ENET_PACKET_FLAG_RELIABLE); + enet_peer_send(peer, 0, packet); + delete p.data; + enet_peer_disconnect_later(peer, 0); + } +#else + + ((PlayerInfo*)(event.peer->data))->displayName = PlayerDB::fixColors(((PlayerInfo*)(event.peer->data))->tankIDName.substr(0, ((PlayerInfo*)(event.peer->data))->tankIDName.length()>18 ? 18 : ((PlayerInfo*)(event.peer->data))->tankIDName.length())); + if (((PlayerInfo*)(event.peer->data))->displayName.length() < 3) ((PlayerInfo*)(event.peer->data))->displayName = "Person that don't know how name looks!"; +#endif + } + for (char c : ((PlayerInfo*)(event.peer->data))->displayName) if (c < 0x20 || c>0x7A) ((PlayerInfo*)(event.peer->data))->displayName = "Bad characters in name, remove them!"; + + if (((PlayerInfo*)(event.peer->data))->country.length() > 4) + { + ((PlayerInfo*)(event.peer->data))->country = "us"; + } + if (getAdminLevel(((PlayerInfo*)(event.peer->data))->rawName, ((PlayerInfo*)(event.peer->data))->tankIDPass) > 0) + { + ((PlayerInfo*)(event.peer->data))->country = "../cash_icon_overlay"; + } + /*GamePacket p3= packetEnd(appendString(appendString(createPacket(), "OnRequestWorldSelectMenu"), "default|GO FOR IT\nadd_button|Showing: `wFake Worlds``|_catselect_|0.6|3529161471|\nadd_floater|Subscribe|5|0.55|3529161471\nadd_floater|Growtopia|4|0.52|4278190335\nadd_floater|Noobs|150|0.49|3529161471\nadd_floater|...|3|0.49|3529161471\nadd_floater|`6:O :O :O``|2|0.46|3529161471\nadd_floater|SEEMS TO WORK|2|0.46|3529161471\nadd_floater|?????|1|0.43|3529161471\nadd_floater|KEKEKEKEK|13|0.7|3417414143\n")); + //for (int i = 0; i < p.len; i++) cout << (int)*(p.data + i) << " "; + ENetPacket * packet3 = enet_packet_create(p3.data, + p3.len, + ENET_PACKET_FLAG_RELIABLE); + enet_peer_send(peer, 0, packet3); + enet_host_flush(server);*/ + + GamePacket p2 = packetEnd(appendString(appendString(appendInt(appendString(createPacket(), "SetHasGrowID"), ((PlayerInfo*)(event.peer->data))->haveGrowId), ((PlayerInfo*)(peer->data))->tankIDName), ((PlayerInfo*)(peer->data))->tankIDPass)); + ENetPacket * packet2 = enet_packet_create(p2.data, + p2.len, + ENET_PACKET_FLAG_RELIABLE); + enet_peer_send(peer, 0, packet2); + delete p2.data; + + + } + string pStr = GetTextPointerFromPacket(event.packet); + //if (strcmp(GetTextPointerFromPacket(event.packet), "action|enter_game\n") == 0 && !((PlayerInfo*)(event.peer->data))->isIn) + if(pStr.substr(0, 17) == "action|enter_game" && !((PlayerInfo*)(event.peer->data))->isIn) + { +#ifdef TOTAL_LOG + cout << "And we are in!" << endl; +#endif + ENetPeer* currentPeer; + ((PlayerInfo*)(event.peer->data))->isIn = true; + /*for (currentPeer = server->peers; + currentPeer < &server->peers[server->peerCount]; + ++currentPeer) + { + if (currentPeer->state != ENET_PEER_STATE_CONNECTED) + continue; + + GamePacket p = packetEnd(appendString(appendString(createPacket(), "OnConsoleMessage"), "Player `o" + ((PlayerInfo*)(event.peer->data))->tankIDName + "`o just entered game...")); + ENetPacket * packet = enet_packet_create(p.data, + p.len, + ENET_PACKET_FLAG_RELIABLE); + enet_peer_send(currentPeer, 0, packet); + + enet_host_flush(server); + delete p.data; + }*/ + sendWorldOffers(peer); + GamePacket p = packetEnd(appendString(appendString(createPacket(), "OnConsoleMessage"), "Server made by Growtopia Noobs, hosted by FakeHax and items from Nenkai.")); + ENetPacket * packet = enet_packet_create(p.data, + p.len, + ENET_PACKET_FLAG_RELIABLE); + enet_peer_send(peer, 0, packet); + + //enet_host_flush(server); + delete p.data; + PlayerInventory inventory; + for (int i = 0; i < 200; i++) + { + InventoryItem it; + it.itemID = (i * 2) + 2; + it.itemCount = 200; + inventory.items.push_back(it); + } + ((PlayerInfo*)(event.peer->data))->inventory = inventory; + + { + //GamePacket p = packetEnd(appendString(appendString(createPacket(), "OnDialogRequest"), "set_default_color|`o\n\nadd_label_with_icon|big|`wThe Growtopia Gazette``|left|5016|\n\nadd_spacer|small|\n\nadd_image_button|banner|interface/large/news_banner.rttex|noflags|||\n\nadd_spacer|small|\n\nadd_textbox|`wSeptember 10:`` `5Surgery Stars end!``|left|\n\nadd_spacer|small|\n\n\n\nadd_textbox|Hello Growtopians,|left|\n\nadd_spacer|small|\n\n\n\nadd_textbox|Surgery Stars is over! We hope you enjoyed it and claimed all your well-earned Summer Tokens!|left|\n\nadd_spacer|small|\n\nadd_spacer|small|\n\nadd_textbox|As we announced earlier, this month we are releasing the feature update a bit later, as we're working on something really cool for the monthly update and we're convinced that the wait will be worth it!|left|\n\nadd_spacer|small|\n\nadd_textbox|Check the Forum here for more information!|left|\n\nadd_spacer|small|\n\nadd_url_button|comment|`wSeptember Updates Delay``|noflags|https://www.growtopiagame.com/forums/showthread.php?510657-September-Update-Delay&p=3747656|Open September Update Delay Announcement?|0|0|\n\nadd_spacer|small|\n\nadd_spacer|small|\n\nadd_textbox|Also, we're glad to invite you to take part in our official Growtopia survey!|left|\n\nadd_spacer|small|\n\nadd_url_button|comment|`wTake Survey!``|noflags|https://ubisoft.ca1.qualtrics.com/jfe/form/SV_1UrCEhjMO7TKXpr?GID=26674|Open the browser to take the survey?|0|0|\n\nadd_spacer|small|\n\nadd_textbox|Click on the button above and complete the survey to contribute your opinion to the game and make Growtopia even better! Thanks in advance for taking the time, we're looking forward to reading your feedback!|left|\n\nadd_spacer|small|\n\nadd_spacer|small|\n\nadd_textbox|And for those who missed PAW, we made a special video sneak peek from the latest PAW fashion show, check it out on our official YouTube channel! Yay!|left|\n\nadd_spacer|small|\n\nadd_url_button|comment|`wPAW 2018 Fashion Show``|noflags|https://www.youtube.com/watch?v=5i0IcqwD3MI&feature=youtu.be|Open the Growtopia YouTube channel for videos and tutorials?|0|0|\n\nadd_spacer|small|\n\nadd_textbox|Lastly, check out other September updates:|left|\n\nadd_spacer|small|\n\nadd_label_with_icon|small|IOTM: The Sorcerer's Tunic of Mystery|left|24|\n\nadd_label_with_icon|small|New Legendary Summer Clash Branch|left|24|\n\nadd_spacer|small|\n\nadd_textbox|`$- The Growtopia Team``|left|\n\nadd_spacer|small|\n\nadd_spacer|small|\n\n\n\n\n\nadd_url_button|comment|`wOfficial YouTube Channel``|noflags|https://www.youtube.com/c/GrowtopiaOfficial|Open the Growtopia YouTube channel for videos and tutorials?|0|0|\n\nadd_url_button|comment|`wSeptember's IOTM: `8Sorcerer's Tunic of Mystery!````|noflags|https://www.growtopiagame.com/forums/showthread.php?450065-Item-of-the-Month&p=3392991&viewfull=1#post3392991|Open the Growtopia website to see item of the month info?|0|0|\n\nadd_spacer|small|\n\nadd_label_with_icon|small|`4WARNING:`` `5Drop games/trust tests`` and betting games (like `5Casinos``) are not allowed and will result in a ban!|left|24|\n\nadd_label_with_icon|small|`4WARNING:`` Using any kind of `5hacked client``, `5spamming/text pasting``, or `5bots`` (even with an alt) will likely result in losing `5ALL`` your accounts. Seriously.|left|24|\n\nadd_label_with_icon|small|`4WARNING:`` `5NEVER enter your GT password on a website (fake moderator apps, free gemz, etc) - it doesn't work and you'll lose all your stuff!|left|24|\n\nadd_spacer|small|\n\nadd_url_button|comment|`wGrowtopia on Facebook``|noflags|http://growtopiagame.com/facebook|Open the Growtopia Facebook page in your browser?|0|0|\n\nadd_spacer|small|\n\nadd_button|rules|`wHelp - Rules - Privacy Policy``|noflags|0|0|\n\n\nadd_quick_exit|\n\nadd_spacer|small|\nadd_url_button|comment|`wVisit Growtopia Forums``|noflags|http://www.growtopiagame.com/forums|Visit the Growtopia forums?|0|0|\nadd_spacer|small|\nadd_url_button||`wWOTD: `1THELOSTGOLD`` by `#iWasToD````|NOFLAGS|OPENWORLD|THELOSTGOLD|0|0|\nadd_spacer|small|\nadd_url_button||`wVOTW: `1Yodeling Kid - Growtopia Animation``|NOFLAGS|https://www.youtube.com/watch?v=UMoGmnFvc58|Watch 'Yodeling Kid - Growtopia Animation' by HyerS on YouTube?|0|0|\nend_dialog|gazette||OK|")); + GamePacket p = packetEnd(appendString(appendString(createPacket(), "OnDialogRequest"), "set_default_color|`o\n\nadd_label_with_icon|big|`wThe Growtopia Gazette``|left|5016|\n\nadd_spacer|small|\nadd_label_with_icon|small|`4WARNING:`` `5Worlds (and accounts)`` might be deleted at any time if database issues appear (once per day or week).|left|4|\nadd_label_with_icon|small|`4WARNING:`` `5Accounts`` are in beta, bugs may appear and they will be probably deleted often, because of new accounts updates, which will cause database incompatibility.|left|4|\nadd_spacer|small|\n\nadd_url_button||``Watch: `1Watch newsest video about GT Private Server``|NOFLAGS|https://www.youtube.com/watch?v=_3avlDDYBBY|Open link?|0|0|\nadd_url_button||``Channel: `1Watch Growtopia Noobs channel``|NOFLAGS|https://www.youtube.com/channel/UCLXtuoBlrXFDRtFU8vPy35g|Open link?|0|0|\nadd_url_button||``Items: `1Items database by Nenkai``|NOFLAGS|https://raw.githubusercontent.com/Nenkai/GrowtopiaItemDatabase/master/GrowtopiaItemDatabase/CoreData.txt|Open link?|0|0|\nadd_url_button||``Discord: `1Community discord about GT Private Server``|NOFLAGS|https://discord.gg/8WUTs4v|Open link?|0|0|\nadd_quick_exit|\nadd_button|chc0|Close|noflags|0|0|\nnend_dialog|gazette||OK|")); + ENetPacket * packet = enet_packet_create(p.data, + p.len, + ENET_PACKET_FLAG_RELIABLE); + enet_peer_send(peer, 0, packet); + + //enet_host_flush(server); + delete p.data; + } + } + if (strcmp(GetTextPointerFromPacket(event.packet), "action|refresh_item_data\n") == 0) + { + if (itemsDat != NULL) { + ENetPacket * packet = enet_packet_create(itemsDat, + itemsDatSize + 60, + ENET_PACKET_FLAG_RELIABLE); + enet_peer_send(peer, 0, packet); + ((PlayerInfo*)(peer->data))->isUpdating = true; + enet_peer_disconnect_later(peer, 0); + //enet_host_flush(server); + } + // TODO FIX refresh_item_data ^^^^^^^^^^^^^^ + } + break; + } + default: + cout << "Unknown packet type " << messageType << endl; + break; + case 3: + { + //cout << GetTextPointerFromPacket(event.packet) << endl; + std::stringstream ss(GetTextPointerFromPacket(event.packet)); + std::string to; + bool isJoinReq = false; + while (std::getline(ss, to, '\n')) { + string id = to.substr(0, to.find("|")); + string act = to.substr(to.find("|") + 1, to.length() - to.find("|") - 1); + if (id == "name" && isJoinReq) + { +#ifdef TOTAL_LOG + cout << "Entering some world..." << endl; +#endif + try { + WorldInfo info = worldDB.get(act); + sendWorld(peer, &info); + /*string asdf = "0400000004A7379237BB2509E8E0EC04F8720B050000000000000000FBBB0000010000007D920100FDFDFDFD04000000040000000000000000000000070000000000"; // 0400000004A7379237BB2509E8E0EC04F8720B050000000000000000FBBB0000010000007D920100FDFDFDFD04000000040000000000000000000000080000000000000000000000000000000000000000000000000000000000000048133A0500000000BEBB0000070000000000 + string worldName = "TEST"; + int xSize=100; + int ySize=60; + int square = xSize*ySize; + __int16 nameLen = worldName.length(); + int payloadLen = asdf.length() / 2; + int dataLen = payloadLen + 2 + nameLen + 12 + (square * 8)+4; + BYTE* data = new BYTE[dataLen]; + for (int i = 0; i < asdf.length(); i += 2) + { + char x = ch2n(asdf[i]); + x = x << 4; + x += ch2n(asdf[i + 1]); + memcpy(data + (i / 2), &x, 1); + } + int zero = 0; + __int16 item = 0; + int smth = 0; + for (int i = 0; i < square * 8; i += 4) memcpy(data + payloadLen + i + 14 + nameLen, &zero, 4); + for (int i = 0; i < square * 8; i += 8) memcpy(data + payloadLen + i + 14 + nameLen, &item, 2); + memcpy(data + payloadLen, &nameLen, 2); + memcpy(data + payloadLen + 2, worldName.c_str(), nameLen); + memcpy(data + payloadLen + 2 + nameLen, &xSize, 4); + memcpy(data + payloadLen + 6 + nameLen, &ySize, 4); + memcpy(data + payloadLen + 10 + nameLen, &square, 4); + for (int i = 0; i < 1700; i++) { + __int16 bed = 100; + memcpy(data + payloadLen + (i * 8) + 14 + nameLen + (8 * 100 * 37), &bed, 2); + } + for (int i = 0; i < 600; i++) { + __int16 bed = 8; + memcpy(data + payloadLen + (i*8) + 14 + nameLen + (8*100*54), &bed, 2); + } + memcpy(data + dataLen-4, &smth, 4); + ENetPacket * packet2 = enet_packet_create(data, + dataLen, + ENET_PACKET_FLAG_RELIABLE); + enet_peer_send(peer, 0, packet2); + enet_host_flush(server);*/ + + int x = 3040; + int y = 736; + + for (int j = 0; j < info.width*info.height; j++) + { + if (info.items[j].foreground == 6) { + x = (j%info.width) * 32; + y = (j / info.width) * 32; + } + } + GamePacket p = packetEnd(appendString(appendString(createPacket(), "OnSpawn"), "spawn|avatar\nnetID|" + std::to_string(cId) + "\nuserID|" + std::to_string(cId) + "\ncolrect|0|0|20|30\nposXY|" + std::to_string(x) + "|" + std::to_string(y) + "\nname|``" + ((PlayerInfo*)(event.peer->data))->displayName + "``\ncountry|" + ((PlayerInfo*)(event.peer->data))->country + "\ninvis|0\nmstate|0\nsmstate|0\ntype|local\n")); + //for (int i = 0; i < p.len; i++) cout << (int)*(p.data + i) << " "; + ENetPacket * packet = enet_packet_create(p.data, + p.len, + ENET_PACKET_FLAG_RELIABLE); + enet_peer_send(peer, 0, packet); + //enet_host_flush(server); + delete p.data; + ((PlayerInfo*)(event.peer->data))->netID = cId; + onPeerConnect(peer); + cId++; + + sendInventory(peer, ((PlayerInfo*)(event.peer->data))->inventory); + + + + /*int resx = 95; + int resy = 23;*/ + + /*for (int i = 0; i < world.width*world.height; i++) + { + if (world.items[i].foreground == 6) { + resx = i%world.width; + resy = i / world.width; + } + } + + GamePacket p2 = packetEnd(appendInt(appendString(createPacket(), "SetRespawnPos"), resx + (world.width*resy))); + memcpy(p2.data + 8, &(((PlayerInfo*)(event.peer->data))->netID), 4); + ENetPacket * packet2 = enet_packet_create(p2.data, + p2.len, + ENET_PACKET_FLAG_RELIABLE); + enet_peer_send(peer, 0, packet); + enet_host_flush(server);*/ + } + catch (int e) { + if (e == 1) { + ((PlayerInfo*)(peer->data))->currentWorld = "EXIT"; + GamePacket p = packetEnd(appendString(appendString(createPacket(), "OnConsoleMessage"), "You are in EXIT!")); + ENetPacket * packet = enet_packet_create(p.data, + p.len, + ENET_PACKET_FLAG_RELIABLE); + enet_peer_send(peer, 0, packet); + delete p.data; + //enet_host_flush(server); + } + else if (e == 2) { + ((PlayerInfo*)(peer->data))->currentWorld = "EXIT"; + GamePacket p = packetEnd(appendString(appendString(createPacket(), "OnConsoleMessage"), "You have entered bad characters to world name!")); + ENetPacket * packet = enet_packet_create(p.data, + p.len, + ENET_PACKET_FLAG_RELIABLE); + enet_peer_send(peer, 0, packet); + delete p.data; + //enet_host_flush(server); + } + else if (e == 3) { + ((PlayerInfo*)(peer->data))->currentWorld = "EXIT"; + GamePacket p = packetEnd(appendString(appendString(createPacket(), "OnConsoleMessage"), "You can't go to EXIT!")); + ENetPacket * packet = enet_packet_create(p.data, + p.len, + ENET_PACKET_FLAG_RELIABLE); + enet_peer_send(peer, 0, packet); + delete p.data; + //enet_host_flush(server); + } + else { + ((PlayerInfo*)(peer->data))->currentWorld = "EXIT"; + GamePacket p = packetEnd(appendString(appendString(createPacket(), "OnConsoleMessage"), "Unknown error while entering world!")); + ENetPacket * packet = enet_packet_create(p.data, + p.len, + ENET_PACKET_FLAG_RELIABLE); + enet_peer_send(peer, 0, packet); + delete p.data; + //enet_host_flush(server); + } + } + } + if (id == "action") + { + + if (act == "join_request") + { + isJoinReq = true; + } + if (act == "quit_to_exit") + { + sendPlayerLeave(peer, (PlayerInfo*)(event.peer->data)); + ((PlayerInfo*)(peer->data))->currentWorld = "EXIT"; + sendWorldOffers(peer); + + } + if (act == "quit") + { + enet_peer_disconnect_later(peer, 0); + } + } + } + break; + } + case 4: + { + { + BYTE* tankUpdatePacket = GetStructPointerFromTankPacket(event.packet); + + if (tankUpdatePacket) + { + PlayerMoving* pMov = unpackPlayerMoving(tankUpdatePacket); + switch (pMov->packetType) + { + case 0: + ((PlayerInfo*)(event.peer->data))->x = pMov->x; + ((PlayerInfo*)(event.peer->data))->y = pMov->y; + ((PlayerInfo*)(event.peer->data))->isRotatedLeft = pMov->characterState & 0x10; + sendPData(peer, pMov); + if (!((PlayerInfo*)(peer->data))->joinClothesUpdated) + { + ((PlayerInfo*)(peer->data))->joinClothesUpdated = true; + updateAllClothes(peer); + } + break; + + default: + break; + } + PlayerMoving *data2 = unpackPlayerMoving(tankUpdatePacket); + //cout << data2->packetType << endl; + if (data2->packetType == 11) + { + //cout << pMov->x << ";" << pMov->y << ";" << pMov->plantingTree << ";" << pMov->punchX << endl; + //sendDrop(((PlayerInfo*)(event.peer->data))->netID, ((PlayerInfo*)(event.peer->data))->x, ((PlayerInfo*)(event.peer->data))->y, pMov->punchX, 1, 0); + // lets take item + } + if (data2->packetType == 7) + { + //cout << pMov->x << ";" << pMov->y << ";" << pMov->plantingTree << ";" << pMov->punchX << endl; + /*GamePacket p3 = packetEnd(appendString(appendString(createPacket(), "OnRequestWorldSelectMenu"), "default|GO FOR IT\nadd_button|Showing: `wFake Worlds``|_catselect_|0.6|3529161471|\nadd_floater|Subscribe|5|0.55|3529161471\nadd_floater|Growtopia|4|0.52|4278190335\nadd_floater|Noobs|150|0.49|3529161471\nadd_floater|...|3|0.49|3529161471\nadd_floater|`6:O :O :O``|2|0.46|3529161471\nadd_floater|SEEMS TO WORK|2|0.46|3529161471\nadd_floater|?????|1|0.43|3529161471\nadd_floater|KEKEKEKEK|13|0.7|3417414143\n")); + //for (int i = 0; i < p.len; i++) cout << (int)*(p.data + i) << " "; + ENetPacket * packet3 = enet_packet_create(p3.data, + p3.len, + ENET_PACKET_FLAG_RELIABLE); + enet_peer_send(peer, 0, packet3); + enet_host_flush(server);*/ + sendWorldOffers(peer); + // lets take item + } + if (data2->packetType == 10) + { + //cout << pMov->x << ";" << pMov->y << ";" << pMov->plantingTree << ";" << pMov->punchX << ";" << pMov->punchY << ";" << pMov->characterState << endl; + ItemDefinition def; + try { + def = getItemDef(pMov->plantingTree); + } + catch (int e) { + goto END_CLOTHSETTER_FORCE; + } + + switch (def.clothType) { + case 0: + if (((PlayerInfo*)(event.peer->data))->cloth0 == pMov->plantingTree) + { + ((PlayerInfo*)(event.peer->data))->cloth0 = 0; + break; + } + ((PlayerInfo*)(event.peer->data))->cloth0 = pMov->plantingTree; + break; + case 1: + if (((PlayerInfo*)(event.peer->data))->cloth1 == pMov->plantingTree) + { + ((PlayerInfo*)(event.peer->data))->cloth1 = 0; + break; + } + ((PlayerInfo*)(event.peer->data))->cloth1 = pMov->plantingTree; + break; + case 2: + if (((PlayerInfo*)(event.peer->data))->cloth2 == pMov->plantingTree) + { + ((PlayerInfo*)(event.peer->data))->cloth2 = 0; + break; + } + ((PlayerInfo*)(event.peer->data))->cloth2 = pMov->plantingTree; + break; + case 3: + if (((PlayerInfo*)(event.peer->data))->cloth3 == pMov->plantingTree) + { + ((PlayerInfo*)(event.peer->data))->cloth3 = 0; + break; + } + ((PlayerInfo*)(event.peer->data))->cloth3 = pMov->plantingTree; + break; + case 4: + if (((PlayerInfo*)(event.peer->data))->cloth4 == pMov->plantingTree) + { + ((PlayerInfo*)(event.peer->data))->cloth4 = 0; + break; + } + ((PlayerInfo*)(event.peer->data))->cloth4 = pMov->plantingTree; + break; + case 5: + if (((PlayerInfo*)(event.peer->data))->cloth5 == pMov->plantingTree) + { + ((PlayerInfo*)(event.peer->data))->cloth5 = 0; + break; + } + ((PlayerInfo*)(event.peer->data))->cloth5 = pMov->plantingTree; + break; + case 6: + if (((PlayerInfo*)(event.peer->data))->cloth6 == pMov->plantingTree) + { + ((PlayerInfo*)(event.peer->data))->cloth6 = 0; + ((PlayerInfo*)(event.peer->data))->canDoubleJump = false; + sendState(peer); + break; + } + { + ((PlayerInfo*)(event.peer->data))->cloth6 = pMov->plantingTree; + int item = pMov->plantingTree; + if (item == 156 || item == 362 || item == 678 || item == 736 || item == 818 || item == 1206 || item == 1460 || item == 1550 || item == 1574 || item == 1668 || item == 1672 || item == 1674 || item == 1784 || item == 1824 || item == 1936 || item == 1938 || item == 1970 || item == 2254 || item == 2256 || item == 2258 || item == 2260 || item == 2262 || item == 2264 || item == 2390 || item == 2392 || item == 3120 || item == 3308 || item == 3512 || item == 4534 || item == 4986 || item == 5754 || item == 6144 || item == 6334 || item == 6694 || item == 6818 || item == 6842 || item == 1934 || item == 3134 || item == 6004 || item == 1780 || item == 2158 || item == 2160 || item == 2162 || item == 2164 || item == 2166 || item == 2168 || item == 2438 || item == 2538 || item == 2778 || item == 3858 || item == 350 || item == 998 || item == 1738 || item == 2642 || item == 2982 || item == 3104 || item == 3144 || item == 5738 || item == 3112 || item == 2722 || item == 3114 || item == 4970 || item == 4972 || item == 5020 || item == 6284 || item == 4184 || item == 4628 || item == 5322 || item == 4112 || item == 4114 || item == 3442) { + ((PlayerInfo*)(event.peer->data))->canDoubleJump = true; + } + else { + ((PlayerInfo*)(event.peer->data))->canDoubleJump = false; + } + // ^^^^ wings + sendState(peer); + } + break; + case 7: + if (((PlayerInfo*)(event.peer->data))->cloth7 == pMov->plantingTree) + { + ((PlayerInfo*)(event.peer->data))->cloth7 = 0; + break; + } + ((PlayerInfo*)(event.peer->data))->cloth7 = pMov->plantingTree; + break; + case 8: + if (((PlayerInfo*)(event.peer->data))->cloth8 == pMov->plantingTree) + { + ((PlayerInfo*)(event.peer->data))->cloth8 = 0; + break; + } + ((PlayerInfo*)(event.peer->data))->cloth8 = pMov->plantingTree; + break; + default: +#ifdef TOTAL_LOG + cout << "Invalid item activated: " << pMov->plantingTree << " by " << ((PlayerInfo*)(event.peer->data))->displayName << endl; +#endif + break; + } + sendClothes(peer); + // activate item + END_CLOTHSETTER_FORCE:; + } + if (data2->packetType == 18) + { + sendPData(peer, pMov); + // add talk buble + } + if (data2->punchX != -1 && data2->punchY != -1) { + //cout << data2->packetType << endl; + if (data2->packetType == 3) + { + sendTileUpdate(data2->punchX, data2->punchY, data2->plantingTree, ((PlayerInfo*)(event.peer->data))->netID, peer); + } + else { + + } + /*PlayerMoving data; + //data.packetType = 0x14; + data.packetType = 0x3; + //data.characterState = 0x924; // animation + data.characterState = 0x0; // animation + data.x = data2->punchX; + data.y = data2->punchY; + data.punchX = data2->punchX; + data.punchY = data2->punchY; + data.XSpeed = 0; + data.YSpeed = 0; + data.netID = ((PlayerInfo*)(event.peer->data))->netID; + data.plantingTree = data2->plantingTree; + SendPacketRaw(4, packPlayerMoving(&data), 56, 0, peer, ENET_PACKET_FLAG_RELIABLE); + cout << "Tile update at: " << data2->punchX << "x" << data2->punchY << endl;*/ + + } + delete data2; + delete pMov; + } + + else { + cout << "Got bad tank packet"; + } + /*char buffer[2048]; + for (int i = 0; i < event->packet->dataLength; i++) + { + sprintf(&buffer[2 * i], "%02X", event->packet->data[i]); + } + cout << buffer;*/ + } + } + break; + case 5: + break; + case 6: + //cout << GetTextPointerFromPacket(event.packet) << endl; + break; + } + enet_packet_destroy(event.packet); + break; + } + case ENET_EVENT_TYPE_DISCONNECT: +#ifdef TOTAL_LOG + printf("Peer disconnected.\n"); +#endif + /* Reset the peer's client information. */ + /*ENetPeer* currentPeer; + for (currentPeer = server->peers; + currentPeer < &server->peers[server->peerCount]; + ++currentPeer) + { + if (currentPeer->state != ENET_PEER_STATE_CONNECTED) + continue; + + GamePacket p = packetEnd(appendString(appendString(createPacket(), "OnConsoleMessage"), "Player `o" + ((PlayerInfo*)(event.peer->data))->tankIDName + "`o just left game...")); + ENetPacket * packet = enet_packet_create(p.data, + p.len, + ENET_PACKET_FLAG_RELIABLE); + enet_peer_send(currentPeer, 0, packet); + enet_host_flush(server); + }*/ + sendPlayerLeave(peer, (PlayerInfo*)(event.peer->data)); + ((PlayerInfo*)(event.peer->data))->inventory.items.clear(); + delete event.peer->data; + event.peer->data = NULL; + } + } + cout << "Program ended??? Huh?" << endl; + while (1); + return 0; +} + diff --git a/enet server test/enet server test.vcxproj b/enet server test/enet server test.vcxproj new file mode 100644 index 0000000..1f9adf3 --- /dev/null +++ b/enet server test/enet server test.vcxproj @@ -0,0 +1,177 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {0F151D58-FD96-4DD5-A8D9-02A5F1D781D3} + Win32Proj + enetservertest + + + + Application + true + v140 + Unicode + + + Application + true + v140 + Unicode + + + Application + false + v140 + true + Unicode + + + Application + false + v140 + true + Unicode + + + + + + + + + + + + + + + + + + + true + $(VC_LibraryPath_x86);$(WindowsSDK_LibraryPath_x86);C:\Users\AMD\Documents\Visual Studio 2013\Projects\enet server test\enet server test\enet; + $(VC_IncludePath);$(WindowsSDK_IncludePath);C:\Users\AMD\Documents\Visual Studio 2013\Projects\enet server test\enet server test\enet; + $(VC_ReferencesPath_x86);C:\Users\AMD\Documents\Visual Studio 2013\Projects\enet server test\enet server test\enet; + + + true + $(VC_LibraryPath_x86);$(WindowsSDK_LibraryPath_x86);C:\Users\AMD\Documents\Visual Studio 2013\Projects\enet server test\enet server test\enet; + $(VC_IncludePath);$(WindowsSDK_IncludePath);C:\Users\AMD\Documents\Visual Studio 2013\Projects\enet server test\enet server test\enet; + $(VC_ReferencesPath_x86);C:\Users\AMD\Documents\Visual Studio 2013\Projects\enet server test\enet server test\enet; + + + false + + + false + + + + Use + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) + true + + + Console + true + enet.lib;ws2_32.lib;winmm.lib;%(AdditionalDependencies) + + + + + Use + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) + true + + + Console + true + enet.lib;ws2_32.lib;winmm.lib;%(AdditionalDependencies) + + + + + Level3 + Use + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) + true + Speed + + + Console + true + true + true + enet.lib;ws2_32.lib;winmm.lib;%(AdditionalDependencies) + false + true + false + + + + + Level3 + Use + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) + true + + + Console + true + true + true + enet.lib;ws2_32.lib;winmm.lib;%(AdditionalDependencies) + false + true + false + + + + + + + + + + + + + Create + Create + Create + Create + + + + + + \ No newline at end of file diff --git a/enet server test/enet server test.vcxproj.filters b/enet server test/enet server test.vcxproj.filters new file mode 100644 index 0000000..a2f8be8 --- /dev/null +++ b/enet server test/enet server test.vcxproj.filters @@ -0,0 +1,36 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + + + + Header Files + + + Header Files + + + + + Source Files + + + Source Files + + + \ No newline at end of file diff --git a/enet server test/enet.lib b/enet server test/enet.lib new file mode 100644 index 0000000000000000000000000000000000000000..6ce8caad104d70dbfeb6ef990b83082043a5e2fa GIT binary patch literal 51152 zcmeFa3wTu3y*Iok8Nv`FJKAW|Hr3HiX`-o3G}=swcF5#bKn+)EMFB}hC=p^Z0jg*N zdnUe$`+96^FXz;^H$AN-XuV_-$snyYfC65Nw$+T0irPZJOWxmat-bfmkf5IS zeDCvp&-2dn%-;XK_PYMp|F+ipueHypTGqCF#YMSa@MiwXE6yvcC@U{7Ki}&uldsaR zUT?Yoyb6_KX|ASe4VpH2SLQ#jP}7e6f9@BW_Cf#YCu`cV|BE(gTKd2CF-`lQ{I6N4 zY3cv}a%gMp0m8(~VS1xN=d0q38bt}UwmMmY^(sI?Z<*V8?^}c20>Q&86 zOV&2GwXa;W+6ue|k=87?9zt!+%@)|UZ1vU6OO~%`YHnN7)Z89!Tl0+x-Yj2pO>0|o zyIn$Nq7Qhvysddz*e+_tn)WbCQaP!rr)6Z7sv?a`mRU6`r`4;Qmxt5SUDdW`S<~`m z?HPe~iRlrSuULk}ElXNfUb8YI@>R=LH?3RQ1gw6*tMH1pHQ{iJ-L96EY*$P3vNo#- z8L)D7dvlwew+v}(zGltZj6}yix1&$3JX+DA=<5swT49;EumaILsl?0MmY;X7ol!G- z)~+$ozdE$?>W((2nDn>lDcYKsH?MSR+sbGt0yVm}qq(EmCIlJ2W;L@->kB)yX=VEa zFJw09MYXP6eKm+W+}yTySxfqh@XBkN*L2u8l)1{%mjE}b*Q{%4Zo0bpn&#CR5m3dB z)+I=F^%`c2&c6m-nw~3*OMjlYma3o+%BQ_KGv8D`OHjFqOIXqZcCg7rHVCO&mxY(F z00K}~R=Hz!TXW0GWmmP3EoJR9usuG(2S!)za56szAE4tk%h$Bn1uaRVA<1K*mX7un zR#Ozyt!Q4pYDx22VBM~j3FzY-?LNcS0gPUz( zYDLaqPAiNxThkg&3Es4fCkoGG5G(Ss<;$B}?Z(*|ujmLjtyyeOSWkavyHbntB?H4FFuyKRWJ(lIt%o?9(t>4U#?h2Qh z4esdU;Zku5BZ?ED`86}(iS~sj{n!II$>7bg`={}4HoB2y|JE`524ZWqttV!?Gy<`Q zKF9aQ>!rxLOt^hxGCSmwXFOIqV5b)~zM`>Hm@T3e@r{+SmHvk;eQf_``^P-(Uwtt6 zC2w*4B@0Tt73cWRDQEbn@u%sPqkYDKzTiMD4%Fp9KXf3XHXncDO4CllKSyKnFuwq? zjvtfIIiZ!%mFoBYn5JFrN>SHxE1b8}EZBt}0g5O5U1WuVv^3I!rhNtfM*L+e2548} zzZCye$SOSD?S!P$B8$m({S;SHVCt7nhq5deDN&VZ$4aL`zClk;_*-j*k}I-Z#MAiS zMkfeu*Opk;nhKO5(qywE$&h7Nt$}@E{TT9ZfMwgx=~&&ea#eH7H?(uw$WOlOuDi~X zW+^c|&USP<#fth7&BzZZLW8!EW}_uUyp9w(FHL?ZSt6y#7o}w3h+t{1EkzDt1fVEv zycFsCxRN6GAr61XlOpPE=Jo%S6uHZ)n_W7k2zb{G&h|*r0Oo)D7%pCLS^2Jo^F+dU zy$THP3yJx@vqnCfk`f_TjqfbIw>~En?b9Q7g81V5-L8b#;PdHQ>RqCL=(Um|z4tPA zPrXau(ial-Ss{p>?Rsy2`2j=?i56d}YZQ5VMSP@aGxICeduOQpK5OL{7qfj{eaj3d zzd7!n87jXSsr<%dej9w}xVBR`iNwem=4@XPvpmPi@?P)|tH>;i#FHOX$$nPykjymf zE0&ckL?u7P42zu%8`3f?{Lnf+C$n4ZJ5|;(A9a-3o$8=)4_KG=BMS3BsCL`qFT2Yh zcO4C(AqD6bkJxMBufWNyDJ?V4hi2Bt%xZi&BWI-gSMROP3Ar}-RDZk)(qZNL^)1yd z5g$sHY}dDp_EftN4PAL1`l2uV2gE2JLyhucrCH){BdAVYj_VCcAQTMDU{K#uheTJp zRVJb6bNZIyo;p`Ztj-EQ8UM4p{DAB2k&{E4UEB2DAPWx%nQlPe5_E`Qp1UWgh#)A5 zU^n^;kz(%b;oA4c#zNV_EZ4S>2xeJXbUYl&UX2H(EQCHc}Y_z~?EL)>T zb-vx;^XR?6ODG$}i@q-)727zD-t|7B%tl`!N{9cc42bH6COQU0Y z4pz~6Aj{awi$Da~sF2v^Z}BaSAplkM=#i-?OZ;B%UEqNT(xWrj3{><% z+_hMP%T6^L#IR+y4^?W+l6A-elvBP7*WB`5Js#YrmOn1~Q4@E`Yphj+Cw>&X2p}&c z7I;Me+4Fr%fgz94HZAhGif9V&h})0_7FcKr*4jgr)lD# z5qHI3^~8q@~C@X?pjkVGD}GhySGaj`?@C{h_?icx<+0 zgV1KAA4p3doG|?(#DJB4ciSIE9!beZC4^s-i2PDkd#euC+~txu&r>t>j-i|sUQt>qm*J0 zmWx7Q&QsB6uKwgwV1aZ;`rB;8CmH>dL*inYJBS3Fb!uqiQEg1``aSXmxk(y`{4YE( z{qXRS!((H~@8Xg8{(qxIImsQ6Pq8g%h=v~bLK#GM0y!wlXSDddE_0FF=<^8hd-ful z3O;~^$s7tb=pi-%CdkYz@PCQKLP=b}z(A-g?!1i6$RbCEM0FNBtHkKbg5DBCXM^O7 z{;5=;pi;#%ApzY4MvGi5<>n4C3dVdBLBJu)+Ook{;@SaHBuOf2EVKqcABmodk!>11 zC07Bt;u)}OsY~yALNYysmSmj$lxW#g*{q8o1@hk0HEr!&U6Apdyvw${5i;3C0SQMnl^$27W*zTAVOWq|2Qf;T?$XAS}^99vfEcfeF8DT ztZXT7klGRscr9K717t(m^<-_OoEWTjWfR5aeYm>iHAh}O@|r8JdGb0{43+F7%0k}TH36UlvdHMm zrqFdC1%n3j*5!sSB!hg7S{zaJULZBPt79c3Rj$|<+BsY@Aoei>#LkUHvM}J236sT0 z0o0bdl3xZCJtUq8m-wj+A;H$2m~2CP{ZH$Wuj4KbLVy|DT##hZLp`-)9j}OC5NB)h zQX&N!0xHQ8!o#7zORE4vmDNdhki%gZ#Tvm3^Qi>qWr?RtwuM|R5D8mWxnkAmm0(t^ zHe2s)@zHEL8%ooLUTNOtivX530j-06&rUts z0@-TCRR(}-U->Seus9@E<~*#_`?Vm+Z@9}3JqolStCe}>2mAwrE^TlI_4^zU=(V8m zZ{+Hmu3>HwUnk-{h(>`cK;S+m!@UwW4VL9@WM7I{H{%gtMRvruS%FnRN2y<>*CU_C zz+ViCed6s@`}E%S+)(sTcpY$*7xM23i2`5y*NHT+c$imqzZfnV#gixG9~Aw1S26V= zg7w}#CPo7Kz5OGfvH5-U@IJk_FaB4L|IK!o*e5|9O?f)L-vgZ#E2u0#O7ub(y?7y2 z(OL|J=1m12J5gV7j%&AH!FqH#TMKn72CVk$y{&nu&A!8jLL%%dE#GC{FO%uLYjcI$ zC#zWD3;7S~n|{QG_FL&n-g5MK3C8)LO5Y=7&7S$bse>@pG_j9lq>w}#to%?wN5=-W#Lq7Zl2`kI-qGS1PcU;*e9() zrR`y#4nnYa^n2Yt{oW#9NL2WUO;=)MTB?77HIb3OoXx zf7%G9AU;9aR>kyQU;}Il!IP(V??sb4H=wn8^bY{_-mve=_$zML9zQxcR^z)8DAXgP z&@vcjd4c#cakHdujz?kW`m9c(B{((tE8tJ*Cow9`MLBjg5-!(13S1gPD{vI0tb$9Y}C=1HMQ}PxmnKHu*(H)+RY)Qkjf!hX%hvzI*Q}Ik?&*1Vb=%q$> z!xNCMP|=HAu00`imbV9LzYPPYMvMY?bp&a=wMgSl+JEdH482|~`8|dMWss2pJ!V3P z82zX<^671KBU$)ypg@-78XEZlU{+@;;P2>LJ|^O^pez1zp+7F3*1O)C1SC_I&dZAL z&!4gl#(LLZRajPRUN$&eh3!;f*~Wl-%C=+!$Whg&t5=d6M$J%KbN+`=o0I&5Wq+}U z`jcf)CW;>M+yk@5b#Qp@->3utC-)()Z69(X2AZ=JVxSCU?S-hO3^zgjKs@-q41%o! zd{_lRV*G&Ws?P;Wq|yb+i8nL?ruNi9`9&q|fO9N{N6C6`O^!58u7s}i(KOM!e!|=% zzE0f042O;t-|Q3!56D>x5jCu8^*llePi~>8QC7+!$4a4v0`5g^N|RnlQ!95z%AG_e zek(LdbA@)kRdlcQ3jqA6&DB?w3EPQkV$*x)N;$u(kt z>KCGmb_*mZjX+#5udwC3Sd~k>i5{35oBc)1MYOv@{vEVA^V>dd%{qj?ikw4I${cYG zj3mUH`j$6im%zdV{xR5N>_Ex;U|o-X%gG=f+8%1s0;G#cwLaiRA{(V5gD%(;m9FGX z=qlMckj$v4)vvLdeAii&y!|kSr=n|psb=-$%b^^x&tAyv0fazk$v%O|q9Q1H7BTar zXquOEw(3z!C|U@X+Jt%(ItwLH?8iskVB-9Av7dCK&ty%d8cM6IYbdM67dU=(DMVYz z#x}KJN&q3WY4adf56K!rGog-_<^ui9b0;sQ$a8vDH zEJ{M3x|6X{))J!$DH_?^e2T5e62szYj1)>9;svVD7nD{ z9&3;ek=$L2@T4CX%E2;y%Y1TM*mnv0eYW_8VnYZ-tLMaSDKGUc`8`n79Q2l1G7ORk z+#Bd=bXmQi%n%HD-KZu=sK$3m=xoyEy)VKPaSg$^gpD!?#ro;ZY5H_0?UN7Fr+TlO zS{dW5EH=pd4w_n*w{9vmE5b|luHOMs=U{Fl=`2LeFfS|`z|>Z7z9TUA^Dv_+9$y*vCqOp2m^-z z>lrvI^*D(OIH61{g9!t)dG$Mh8Co&Kdkt`A;hPzj5`W1ijBmw2GWrkPb|-JdjRRe0 z6|5-X_HhMg7`4%i$BG7&;C0@YTJIt0xCBK*RW1_XF6Y~EFJib%4{dlM3yt9~BSKX% zVm{V%?1*^J`4FzW$u!h>&f=O}uH&<{tTxd~+Syo(;L2Blw#tFN31|w!a8fL}2IoXbp{)V|`z9H{34TZtPZ`hF3n^-+{ojVo43b3{&j3KN+ zT=+hsW7LN_h;J6j7G&2Ki6zB}dL@kOy@;SC>I>I{dlTIaIea8E-(y3IEGXWWpXhEW zwu8eKB^J=pL-ReMh0%G@y`aDDrB)acXud))| zcRSExk6oFi79{HP%li`DP1a*bbhjdQtiB@Ay~2rnGlKXN7CD&p#pV)U%pHjDpX}P_ zAJC2O@$IviA-Uc&7(8XHWN0v0FqQ~-(@?u`9!_2XZH|vVcD{YLRyV{r7b55CvL$rl1a^YV>1LE0{$7uR2xJ*vev05#rn*Xyb ze&m^VA$uY8=$NM0jk1cX?Xrjc+uA;sbOTcxx3OFO+jQd)?&bm?2JR!P5>==KxVThS z0J3O6)E4WJ-HZ~E=CHV-G*K&O`{0~pYNEE#tSb@=ia3D;pf=yE%jbxQ!;AQEetbVF zBL|(|MZkqL6dvS7ukRPp`$++meFvx+Nw8sWB8p+IUwpqI&EkdIi?aYiY->l6?0gKQZH)p*+ z$PoA+ggXTyLCqT>UYYeEsbBFQ#tPs;pJ`akqnqE6%(E*ziCEhO<}3ko%GYL{TNsqZ zW}QbEl)~%_gYgwBC1fI*tN#$y{KBFuVnQxyF`U0eoXG=_UA@8x}%<-e^@Y(p|S{#4Kis6|AK_A0n+?I#@e zm0^ai6p4zxsNq^&94y}z-#_Uv0+FbgGW}9t`GHtbApYmcuHXBgX*+S`x0^S{JCWM| zO#9Ew89rlpk}>L9H)75xLnr-(UEsgAD*T*&FNJmg*4-Chm4EnURHInzG3V68|CWR4 z_xSK6|6qHsI4GW01^$C#;Z|a4Myr2D%i3%)qlGO_%m^S*ldE5e88w8B7GH&{1XUL^ zs&Fe!UW4|^(jK(Rs`tfT%i*9M)DtV3%c>9f_vuC>L|gfxktvg8_4l=Z+-&q2uT3(J zy4Jm(-CAP>w4vqg1F zqB?*~wM4aSw4J2w3A5fyT#a)2V@+N{*+uBx=tGFj4qHPmFJoGC8(5_jYyYUi2vl-c zKT?Tpn7fujEEe_!;J&mOsg%UGOp75({ySJet=+xPgVrDl12^F^L&`%-#5J&&{I!*O zwOD?p?yD0f+-Wf=3rIc!axiPDVr=nUlROQzMhi=c>*P&X6aIiP{bvw|Znyem_0|jMlQLd4pifC?K4_lP z7X{k)9O&l`L>C72HsL@|JJ6pU=uJQ*nF8(e5J;RcD9|baoi3q(14RI-x_sY(xUQ_i zb~#WsMh7aFvjC}_mjY7xy#z?%>RK54s(u?BXb&Le4g4oS93A9nz0mbuS(h42ADkhf zFF=@oMnXS2FYO>|o(iFNaVzSR3i&2N_Gg6Li4eL(r{equ0bVC${H)3mw3=h*)Ni~` za_XH8ebiZ%omK*L#&Ks=p0_i_9i)Wch`g$c3gJA8`f=uE$u-T_aI;1#gwSNrwffn! zGoKn4^7(Ng)O(q!xQ>Is9V0&{=Cc_oy|+RtkQpHmaVef+6bFA z%eEQxB^9wYY25yqyTJ(Q{7Js}|Jp3u28TabJIosU!x-ZPfroyo`EczN zE_g7d?T5iTx9P#aROFf-F~>bHa-zMpMcx4c2e72m_V%-{c{u4uQiKAx_)5$``t@{MCr8SqcnJ1Sr|2ND4oBN)1%xfsy3 zyE#9Zmk3G$lnBxi!>BqRLs*-WxWX6ojQr7_AG78Fk$cb+{w!G1i_zA7yki-jQ(+j~ zsribL?_xYv-ZyfuJ!b&;$C&pj#N<2tP{S2w5MyM_02KMgh7JYY?hf4yazmXn_lV_g zukl#n<#HxL4fFXpkhX@X+Rq&2=(attJ%?F^^F%vbA+4r})Es>xJk6Y!hjK8P$(2it zQdDgjWXals%bJ zen_tMV(UO+r3swUqG{{G$J3)_=T~AgIDXWl7!c!k*O_2v35{PD?!<%v zS1a$g2<{5R`&TU1PFYUo<-emxl?jnbUj#6Mx-CQ-_`~pBqaK}TXZYPV)5w@Ap3(=U zYLX5!>H#Q)2B@CdkXAL~h7IDkorodUrTQU0-Hngdjfjo+X&-6vXBuy1kl9=n|Ao3UJv)QL{P0dC{q9nIj33XfO$Tm z%9Rs1bO+C5o?JnR8!zddM<$1_>O3-~1O9k2M`|&~!v0hlE7AuQUK6`*A97fq6T59c zbDHl97>|{5mR#y}b5g>#)2TR9eZsJ6bdDGpv`nRv0H62@#)_&5Q*^)hTgPe&rzt-x1M$F_~`PW)t zujDn9_hD;7-rBd#>K5~+PL=L6CEGEXEX@bRxqli$HM6=EVOZUDJU+9FT_3xhSN~8r2>dH*dQK$5Ir^5si9Olok_NNB#yH!RVOd#boEgk3>EZ}Z z?6Yho7-|1Vv#)G=4};RX4x$(s0MREQGtI6(JjK4xtAAhk4BI}mZ76$Pyh}ysc*X46 zj;OKk^XlK%Q8-e=V(c2Lx5(%mC#0bfbnz#n#MSYv$m8mq@;xvCjBI!8t*#-NE3e44 zVB{hvy?lclOP!Dp%u&&o*+p87eV^B3^HX8t@-zLh%f_O+#7P}bjjLzB*|lHh$Lq2A zsjzYR9jC=s{l3o*j{S;P{|gJu-h(%%Vx#=JsvRuV35KyU73+x`G7$tWZJSl^KORm9d;$ovBTYJRKg zN~_?+TU2E(ESA+DLiIP*K`hvfPSh2nFNVqmv7RE~AsHgf3^Re`frww+GTv+@n(5BU4!Xei;&YoC5SN z&SE0}2e=krK9;D?XVtJ%F)vZ=BN)4B6xT#`86OhW73x;0ZdK|QP`4U&Yf!h@>ei@k z)I&(VNZl5z+fsFFQnwZA*5buIQQfL;VHLPu-8MijXo*doxGE?Ds0Ze5Vp9*GzoRXQ zO*aGb;-A>G8CUi8RzPJP47(GMig%X--3^Gp#HODp0MI>v7|#q~)9iy(39$#?m2rOI z#M$aV_e;p78Lz%8Hr`o8dX6E z3tMmB{y7JbOOnsPi`LomeZ1~Xeu)Z2u0MMoWW~W|HELm6;>MQ$3+FxJMM;?E%7=jG z8g&6!1R7GW`6FbEN$fp9r0F#~!MNWc4j&}ykee`wM^1u4uv+wLjbD)$HzIJG0(=1G zxu!2HZ9i|-uBz;X#nRcncjmNEd^j(*B46wX#b3kjty$RLu`4z+N3X^y0e$|se)C3T z4uhi#w_*HgvTO@qXVld|`;KiK>_d=P?=iDQEymYwdX!*DU0VPZLuZp!jEWdPQxi8T5(TGBa2#YB4KNDrzgSIO?`}QVbiGdqHTk(eLpO>E8;2 zp`oc>b^IHw_R;PzR~PGBu0O+;`f#Ezat*oaEW7AAR&x|Mz?m0)ka4cz$S%F-9|$#G zhKcko0Oe!Yeq(ewCermVkyd@6iF6@SNfT*rx{1_pysUQ~ogBWr^QbhDWR9rT7-MCa zNELbyyKdv)e&&OIvKpLbAbmw{-RTAI&r_CB3s4Y(GYo8_pJ&)NWQOts%B&&m*hi~! zlV6nfQA1X24veG5tdU>oy`J(hJjtEV@ZEtQ{XFz%KaIlV6vW;*xNm|wIrMJN=g>2O>1f=BQ^b0lA`QVO`IGT|;p98vxH6AgJX6aqO zK|-pgpR+bdv7DaeFr`mnjv|4Wuu83>rQbu=Ck`2}1dPENi&&v&-(*$J80%^9iuJzZ zSLPlruOmO{J+b!F=`%xeLWLj**lf>0rOt$)M@%Vr zy3wjESTX?CtifQS!7*~waNtjn6J}2IfB;d$D+VS%Tw;R7^oI$S(j_TaX4VymV1-#% zD1w!A=n7Vub(pXVm~}o8gxgZF2sS{ei&c#x$T7-n5tIjI6oD#=!fvBh!_FFHzXm+h zek{+_TRihBQGD=No^hdel4tJ3YYZ#EGu;l)a9HudJaax$jUQInJae_hGcrf=%(!8N zTkp9WIc!Yq$5mMNEX`Osw6Nu=8ePmjmU%d=koJt^pC6?2Pj?#sNI0E;&OU~Jeop>5 zG$H?BH1Zy(dSgQJk5xa^PVAEoLbks|Uveh$bofch>lU~-M9?g2`z1UCsXxUiJlTpV zy!uw{tIGabv2mSmk{&qZ^ zTq9|zDq^$YQiGlBwn58O$jAkUrY;^6RqbRZrUOr|1gW>c& zy2p;67z=Jp{-KV)!0k_s19{4fML)nHJEkkWs>%Tp+oqsN=!l+2YyrdE8N)3+Za5)! zG6-e0V7nerdutyu2VGr$c%RHXZM=;0f8Y?TM;buPAJ%Dk$vVWcJBVfoTIqG=u$^qL zwZ{!j{@k(SMGRXw6<<1PVMeuif6CQSnc-~gSCSo&(CYazNYnYSZk9q|lSCc>+Nm;L zeov472Cx$1dY8^2YY@8bL1{_DU3Fe+*~159Xo+B%x>cxKrMl7F!MlLE)u>y8y3JNM zsmT(-`RZwrx-C|>rRvtCZY$JH+0a2{LkGhuaJ{-I8`|i^leD1?$^mI58$E!eZEVmA z^x~f|Hsh+^(twaQv~edO74I$wx*HIG3F9XU0CW!^#*;Sm@BWUb*zexOH6+Z3_+XCW znlOHWD}OMa6UJ5rBlvy^xwMia!k~n~Y76aXBV|V$jvZ|{cC^7f`AZmK6wM#(Xz26r zyg`rj`Ij#l;8PS&Aebg}x3>nDGsZxyDb@o6gOU%PK9iD|%eP2OsdXJk zr|aEsN)Q3&(OIx0SycSvH6>EG4?udHV|3V42RYG%-WY^77QQ{NWC~Vi;Jz>35 zm4KY`>RopurLjE#$?p9qO?n7skCVmPYtvfC;vadFNL+Mz>I|ybclMzGzr2Qd5>XQ@ z6Hem_**h|F>^u8q99}z~k9}vmeB!m^kI9oEs*LTO$;)y7aC;|tBcp9WQZ4oA zeW+>V1S*Wd3jaa$P=Ov9An{>`t{B)DA4X*C)-8mUktgluDSG50zTe=h!PF*f(#xjt zbf?HC5h$L-KK=L`d7=0L3{`OC(`ONAB(Pue0LCK5wjBR^dW?F}Ji)&YxuPs4Gv~Rb z_``rouKn5C1h5f%?2;382QBUr)OT&BmFGvm?@e+a*F10VNcOKDhmy8p%T9Ojvqa%k?3TJC=B&Y z@+<=O&#FN5K!+cL9*h#;=lv-;C7QBtLjE^&<7o(K2Q$%E@Fcb;bCE%4Gv>>xJ_t=) zWh2MJX9GoxeFe#fH9q926E#Gcxu!I>j{ehy{(tBZa6K=w3Fr^A$}bE67{asUf?Bo1a$%I%6u!j;%iy@6@|goxw05Vjx{I(GS+b(K=0gllo!ge^F(1`?)kK(tL41A_67 z(`I(AEA;PG)@U2{fH&q&$J~nEwFZlkX26X;+$ZgoT94Vu-C_PHb(U@{0b8K-MwIHo zeKzit0S&@peK~uI`fy|oYmX)YB?D(i5|C|pLmk0M77z!d7#ag07wm&wX_zLdm(wKJ zUVv$mdO1yky>OT&srPc4q+U*wfT%D{0;?3$B=vHdq+U*wT-uPRmllbruSA{Zqs;m$ zQ6JDFbTXDExZd>!ipTH>{gf{&hDzm|SPamk5%P{T7mFUSwv_nyuJb7b!F|3!H!dNf zi6A}lCnQkF+|jmA3?`o>%c)n7*qU6Zl?sSD7(b3Ip&o|C4PO zu)iD7H#^pO5XoRwRbLE4l^5ViORhpfzT8(Uon}}Jj_gId)oyRRkF{1Lr?Vj7 zf^->cJU#x}r1;BOkfxB?g?7i(*PvR^34di=grhJw3qzk$wA*MZFkCKkMxIMj0_}Wk zQL%d6;+LH8rB$BrEY<-N-6W0S6OI6>qsg;qp(^{Agj-CxsCP|5XtE9$hadb;ib1`5 zDu^dJOfPjXDF~u8)?SL^k(eg(9vj{m;Hipl0mNy2(|EW`AS_JFa1ayXPPr+&uJ zixLxdlg;l*$@N@#4ik#e*t`n=yb3)M;DKvATuCAze>hiJ@cGHl;RSijE=P=Z+?qTY zfut+8dNbhUTNr>)R+_aq7|c;`iKwmGM!pSfK95MsA+YRInzj@!>%4y(|9ZguGi)MX zjVWlsnfT{u^Ks=8TY+{vuAh_8-*Np6{y7>qa`a+!6aoy)%iQe{ks`-p-j>-O7u4%7zd^D@6D z0IAaUJJ4GWl%22kx94b|0HpG(0;H&<36R273n0}W-vjg+KtehAgcy|&Xy@6fK*Kn15&xvVN;3< zYjdEgLi_EVfYjUbz$0{N$kAp4Dw5DjK%bS+iP)a<1zE;t0Vy0j0!Y>BDL|?QkAUmc z+rI)TlPR*1nJVKDAXTg7pSHs;fihBW*MK4vl#M=D5HiqEMbrwUYe60d0vT9gK)nS4 zkru>sD(wV*Q1oz${wUh$AC3;@X)J!i*1Qgj~;RRX=5DlQYvHGSF};gu5p01MQ_k3V|D**PaUbl0u~h z(TD$dudwStFIV7Q>i5rih0RW7U_t3VKoDKn2}9bSJT4wB9sbZk$K5USRVxnTDR9NO z5FXxO{}k9YF61^R#HKN7Aoa6D9vK%hG%n=jaUloBg=7)s@@MDFgDo;csNph0Dl$UG z@A+xK`w#VhOaJZ=KOgjeze=?F|9+KdNmIu)*L)+WzIt@d1!WgpQ29Zwj498?v|UN7 z!)sQ^T}kRKALZNeo0M8V;Oj>pWqU&U{-KF>1IgV=>0eNqcoRh0N5C?@Lhbt5UYQ@d zv*ChsD=WSHr93iud~1bd-|-%q2g{X5X3u$wzgOb+uXtptTr#hn|BY|(q)TJw(ux1y z;d=a|FY-zGItR3+6MAHZtv0Bb&}P<&J~-}T56{`}UkzwN_&jOhxYm3a3tI_|W- zGz?XW*I3wJ%>hUTu5Q>lFWnWUvk=m&odh3xJ@fvHqK1|Qe4jI>-rgf|d z{jV{d2OU2b3+kAD!C`ANa>n#^zO7@3`v47|l4r!W-S3HKcJCL-DRGX}Fqm{lg92bZ5QAB0bnM`g(5dE3denUxkxHY_btKHL`|(!q{Tj~0 zuWQNv{#HC;^Z)d&`xsm;Z~lR`Ix)wR%#%lM!$cyE?!yTkI;K}DOm{SZ7s$I%H*Q57 zRM3ml#NiKFg}_SP_$C8UDO2WVULL@arZ3=>{6f9E39nEcHF;FBFO)sADCFO+Z<@^{ zoTJE!K8{Sv(3I1{r}M$qI5)5Q?P1!KuwPbYat3L*j>e#AIL{_jscztWVfAcI?a02VH>(S?XLyVOEbYIGhGRW{)KwdBb+K>Jn)tz z#3+sxRwoe&gS-@Hennewr3;Lrsdr6UYr~8EE9liNrwoa`kq;M8W|gVR$-b zaS*LYB*Pb$A4tA~*(mVW#s)X6W@|30K-CX5lN0T!9e@`kc%*zq_B6t%2LHl#{5Z*OG)Slj}@*T377;gp`CsldQN!v2IHYmc?WY zahRNqszV6gk9tZ^Z-@h&`(lX$-FO_~v2`9CyIP5f;tJj1hyfJmGZzNLPLx}UW_!(F zQ_zUF5T&?e2Qc4FM*?#egp?lnPrTB5+lyR-{k(!&jtzh%-#u0s0ARZ1VZD(NE^kUnxX(nqdA`pC_Oj~ocrrf!h+ zSAmG^Mvq+cf+O8!?~3|S7YYN@Lr%CS4WaIKWsPlRM1pK+bT+6=ypQz|-$;d;F{F?K zp5%G@Xogb`1pLTj(nHrL-cJOia!68PWsLQ{9DdtQ zeG`Q8LnJ1VY5d*1cKlV0qVOXB*8P0iiblk+s*FvAPMvsXwEHLKXO0hPn`5z zW&XMkk?^L#q30rto)^37%#BjB{~~VDGvmrBRj(eoobJflN+96iH9wA4HBwiXjrpfEbFuG~JkkGDI@PpFB8c6boHI-j)g+T zvFLte>6cfl>|!_{nzysYJcd3&3aVXXUQ)(YolYbX7cUAKH`ZwIC}G`pl8*uOZLx8yCcVBSs{`>m66ZI_@7sOx6o3fqZ zQ~G0%uu5<^264er%WK|FZ#7BBXaUv;>rGi{I9%adQoybk3lC6>#oX-hrk!!ia? z<$nkJO9GHa!$hMB_rHT3D|SeIBYN;prYAOs`$6(Mo=WL*nPkK|fy|43>baN*riAS3 zEC#)~x_IKHc?onR#wT+(%47c2A#B_9P4y(Ux+?Jmd-&scFdkbh-3TF{W27Z0(Nf^0 zEV-3cyJ0@RC3Z3zD)yATzwv!ZdEHrjenuQEIa2cM#v|I|X_N59uHdu&@7;pmIRULqo_L8BJ9T&3cI2LYtw1-XG z^zVEhrQAKcE?|si>s^s`Zy3G~2Zs-}D*I!nYD@SBNW`z~hP9#mHPs)Gp;MIYriw3|RhL@>_V2@))oI z*s)hYnG5FY5q{<%`FGTH<58<>@?%z^&6(I-ij}wIqqG@p4`wMt^xnsX+>_;%UYkm! zP&jg+IWzfFq=KAf=NO||YbPh_ycDRw?K+-F*Rc$}T?JlgPbfLG!kys6G!SVYJcjqC zhjQpO)E&f53ldu!_<6l&OZtHg;0OS;3o(*RqK1qG+89%@(lWx3@ZRK)YjYTEvajRlsJXFM?#<)PiJkk*bk>0wbD2U1}M>1D40hY_xr;ObLD# zb!D+G>Mxu*3jCC2YAJbI?46(;@r+!-h37f-({hARw_J`pT=b1T)X^`mA#r2PMEWYF zpPq$&dg>4wVNf>s||%&hU#_j-IKs^~}2nH@Wpp#wdm-EtSnty^D3B#LLIsQ8xGnk*#cI zr7Igt%{=WWnbO^+}2`NqUJE=$JDNO_44zx&$O2?_d{JD$)LFs>^o~a@$ zNuJ0Cr&*Dan~W?=MM`UfgN=_^j4%B13Yy2X!KG*?sHhML$pA7PT$h5FB<22Xh=L*& zJ&_F?iKWQ=!#_?5VJVs|vn#zw^gs07I^^Q?_wVp9mgET_il68axAFCdkg@p--&4HZ zmwD{W+MB$I47LFp~k<)=vd4=>W z)gxa;TgmN+nvUOE;P)cFLL|S8j*KOOZ*c1oP9G<_528>>2He$9p_-RueyQ=3Y%)Id zLCq5TPAjw;KDa_WVmFd_0mvk5y!$=#l3E#G)-8bO;Pf)=;Q&&_0-dJWw7`F@`(q5rHFW z&JOYL-1XRo!gq9PDuw~Mff&J|#dhD(5}(P6MAjjqc^l7lcSR$(8d07u?-IWaGxsP@ zriXSYHY2LBigw3#$%=ZAgRJOobQBnc$x-jF{qj*}fN_l8%VK|s%CSa)u_5>}COF91 z_>$Ha+W6|2u0OhyUo)zrSLG#`uG%Sfn-6m+6hCr${QcA8@0=b#db;t_`^GEp8-LC+ zUe4MWe;@8F8wZc#Y7FGyt2WUwWKg5m;FFp-u~n~mHUzxudZYtY!55LH-+(EHuKVN74L#;&?;)@gx0t#CYbN}u$ALB#Ut` zz=P=IDrEI5yc_d9jH{O7r;SHaj1W0Y-C!yFBu!s>>Q1jMZC{%@?{^ilmp-z{9vQ17kSD&3T}2E`@8a&SbwTrXq90%7^=IEsEWic!3n08ap1F=G7FGlIe2H&x2pnT#aM8PqOIWEaXu7%dqot=5rZ#i*-sB2>B~*@Z?!|qvS1$sA5sc zzd{S!&G~7nId`EsG=YdMt2wti%|Ue+%O-778``+()!ZbT71uXiiKpyMvT1R>yAe;= z_=^dzU>43sSvAHrs7BZOG!ua^er!yYqW4}hjckY4^Qn9B!7K4c`Z?3jwBclQP9v7t z24N=}eL0|sn?DVr*Lx8gXLvL+RmaJsN6W8szTWjNX%Y^+_C(xeh}5L^W~iCDxmYjZ zN5J9OYsZ;`xm0{$lpCY%pt(5lyGb{?A?CEB zjn>!Ih#m00jTLN`DsK1wD7a%c;u)(0F66m*N|ssIfGRIF*XOx*mh7G0kcZ%B&AxTkk#*Bnqc&=#E9~ls)PkA9N(hMFrGuKtJ10yhl4xozCf)VB3k=QgDal zmz&jXF&MH_%D``vN|U#!aj~^2t^51n8S~;YENxA-5?Y&xS%>qHFZBg#Q461MrwZnR zGL~CgVI`qN`aOiLbpVAKz!In)c?=;S-Fh77&Tl!WZ#Gz8bXW*waUsM7=6r%^zx4?L zJgeh#l*G{ujkQbR=1tU{tO{ZZuv&Xj3(B4hW^F_dR!z5<^-;FgVb=e`Q;J!C%-m2C z_8{QP4j`-fl1ZI>M@=#(&S==+TY>Ed;*VgqY52}L&L$u`+=u4Ht_7Fk<7hYvCBiSbZp72?E?^mY5!+Qs|++c(`a+3du z-n9>qqRA#Q+9lkY(Dq8~Azvr@`vJ~^h!@}f4{GlfsAOJDsX$v$JIn_~2?hw^dy1Qo zge?Har!(RV)`;8%M%)=sPKs6aNJbPp!HSdhXai{7V#S&%lgWx3e2tiYb3I8!;RDj! zv0b7L5|q*-Hmgv64|#F+dJh`sL0N8L+uxEakC0l}XK6-#@-LYr^egzrCx;MbsR7-% z3n6JV7Q^Fs8arrFx(oVV(${@T87yI9$zJG>O>_99h%rTGRVqWtynA65{2jO=_arF% zA;9}$J!AxMN_9MTlhz5QiR)dTM-^$0;mde^dhe4Mfj&u#jC%?iG2Ia9L@%9aS=GvA(B@+Tz0TAYC}Dt8{&;*Rwyg^1mW6lRR+R4Ng>8?Y_RK@fBGEwf;g4Pjsx ze*t~700Ry9Z_Gxv#!-9*?M(^5Hs}Q_aP~dgjioT-A!%{i3N=NoSnh&Tvud>(iY3(i z1?u<|N=|^CQI{2NHD4iSWT00D&Y51jL61HqLwt6$PPRPyC3vD!RN|ig52-XN5_vsW5YMfZIkAhSU14V()#YZeZ zlHppAip1Z9yYY@2yUM`AShhM9BDUes06r{yQqOJ7RFD1+1tICfw9wQD-;8p!O^E_e znjjW^_(|GJG+n%nISJGpWB7nQv@qA4Yd*$sGu{CQZ}~$gp^J*z*!u0W%!?8W zio=)UiznDd*MOdr8HsU|P*~zd0qgSAMAQq(R+-n7jzN3wWW<^POWuMv@NENvDlk*a zS(>$rVqsrcJULReSsVfO-H^&*7%o~#+?vLzqaTkab0#IK0ZWGv(~ToT5Ls2MA0$?C zR4s?C`!5{cJC$u2H*3XjBLTz5&RTI+kW#_nwLzu6f%tO1IC_AFkREZN_bo~7zwb_F(e<~32nv)^ zSHn!G<4)AYVh|=QIsx!}nKOn#{PbEs;)2H^oT&b#<4?XV_&2jgW+ycXzQ6|0pEOB8 zK>+5YUZe0)?3sGPzRx1(Ny;Vo7dZhOoscM1(rBkFna7@30aWIcG6<;xb!EFDgZo^@ z{_HQwucXyLU187<;X@h37>{#e%ZkD8sR1uP<+MOYF$9%~Cc6&eV^RDB9NhBiu#-0= z@SW&7xfQyuIEI6VEb`=Xng!w$a0_!2^uFN~O`SVdmy@VFlTVm6EPuQNej{)&#V6n( zau61G`{VKxaP#>IxWOv_VB2O}HliI;JSypUqLhvhj%Z}vkcDhZI;v4oH~IqOCk~nX z0R8=X-2?-q?(g7T>ceVwuLa~8G~57Ujj0B0nd={%t9PFTyg*Z9Z1pH>uy!hk@Gd;y zqSw7YsO)$H_l;;4Xfw@m2klV9mXI|Y#zSmsdLq6qL?zq^xEpZlGj{NIrUj1pJF)ee9HgjX&eY=%(xiR zgER8e2eiqv7-e3u9}_mw8?fLh-b*%8m_gLT$?YT|1-&`{gm=aK>F=Hmf5ehET`wB1 zylcGg);GB@LIR9WRxOs>?;FjclYqQRQIv1s!-H?Ny#YUi8iX_^_dr*vsl?=OP(eQg zN3gamqbhwEPo;<^nS`VXK@V-(Pr36;REh^xY}&=ATGZOOp-k)OO&fdPCg&bx2SJI$ zW|*sY?EzvQAps@t#anC4-U1MICMGZ_h~$_K^DG$DMdWYhKUuBjNZd( zWl1K-R_zkDbt&{irrW|QoWqjtH>F3vDnquT7XB!&dbFNrwaD=esnVgtG6Z9JsS1-o zRo3)pqKkr)KVhwj7>^v}W1>#_4CvA4UPE3;5UZt_qr#N6O`XV)d;l@FQZOXjL8lz7 zMSp-G+vKv)YuQ`jc04O<7UG81>@ofk$(t-H$EVg$cpqQ4pZ^l9H z59II}>_VKTY5ULAw7bvHv=^~Mbp^s2Psi!wc)ss6O`C!LFA@LPp9cYD_?O~O7P=--%QHJq3{WsAr^BX}Pm_J1xbfRK`1=?kRiX=1@*{iTG1NyWK`x78k4)J0z zPgU9qs6-X73XqC-Eg%)|b?5DAlkJ@615)u`1B8Ynzwe?EDwiJtQg69W8{0EczY+(U z1;{H?gaN6VejYl+`4b%VJEJT7RgO4Mj zs@2*8y9T!bQfUh?qoLw`5zuF4&Nl&4b?FB*O@_S(NY&-WQ|%N#1f){D4M?Rp6WOX1 zR{&Bet_7s({3Vdh=VX5W1&A~R+=D`~-5Su>0jXC0+JT-1R4h}>K{ZPxv>Dl|6hCyJ z`yD9ZKvAGVrFa$4Su(8)s5o0f&j3=nob0ussX(JjaRVTg;toKiGQ}2jpL+WaAUg9D zXw_)8YWX7ERDS<(Afo3S8SfAvg{v;jy}cO_HnSn@M`+l&68fbB^`YvjrymCdWCG6vsQP&_-lZtsE1_=yQaQio zgv~-l6!%;UNX5Gokc#&vAl35AP`rA(5s-TOpHA4r4z$mKP^9(s4z~k=Ev+!Hkp<;D z5D3-^Bh`SZ&<>WQAg==vCn}6oqagO4f>31(nqX(VwIecfcRV?VKNngkT|v}i#`R)6 z1@NDQe>VQ`S-`&)piCu0x^eX)LMmh{LJmScr9xgn$o?tmAuO>INMM{Sna}A6*_;tl zhL9nkCl#jwA!Xo56*7KL`7runrOeH~{BwKC?bNAz`YuL^4ObX1iTlhSw;J%5gMYT` zBncmT30ZL%uG-!)E+jH8((?|0W|2cdL*8e#_Gtaad}OB4R*xE6yJmLO*Tw zv*Roq7qV$w$gSf-emE}V*BK#C;ps#7)7yKQ+nZN6Eop0RS;_CfEIIaLhVA%9jM`m2 z51*64liU?;Z!|_aZbn{$Ji@6wtOUo#l?8RI{-B~VGnWalPkQy5buGVSU$Xqy5ef?hiK5TD)McD<6hTl?rZHX3xrftVRS3={z z4=RI?xp=j*rRiGknAgr@0DJb+za#9tI0opPU~fNdl>3i~hx`H)jg7|J9}+9e)02oZco1@`-Ge^!8A=P85f^>Ac`a3{Rw$X+0_p@4N20>(aq>D_5U)Zd#W*J$gQR zw`}}(D9``m7xBjKQCb0-_BWUbGbA+rw1%bVYI?xkjgc6CFkqmY8vp4YRWu~CaxN3~ zsPi%n@RE|+nwEu^r2=VdHlc1eS*8vtlRZDt_p@%c+F++v@r zVxR1buRn@`j#-%0@a1@5u_Eksgc%pRfA_ah_{{PElS{!+EMM zCt&sV1>y&gA!q63UeBDhnhMfs_9LG@HJ}uVh!kmv!E)yw-J~k?TM@cZu8~^hVuCz;ky(gF4YMLR^RRO5 zX_#z8R1eCokY%TpTWq)G?@oC*7ZX$08SQx9uBy!Mk7x&1o<@G9+AlXG{OOYRU8IxSn)8)b4eG9Ur;K(S?Yn5a3JJYdzPN0iaw-t8#!{ zNnu|`=I$c!kIeR?a-E9rWwYhdjxBM>Tg(s5TLjEEahuP5C|~vlDivU5aIfK=T@fJ4 z5zt`0n9X}yZQT!o3}nn|DadL-CIR*V?p44J54rU+4enAH;vKoO<$rf}b)j)oQFu~y zE%w1sf-fp;A(aRUNsTeJsje|e6(R(8ODjm%$?n*$Y^jT zfJYr4I^+rEl~mby!i@9pBk?Y*7Z2r7ar*j)4=FCKpSN)tytFpRZyQL=(CDy z2U#!n!>pbU^1p{YlsTAc`Y_V-OvhfDjjo`H{FViu?^a#7P19iu&tblQ?@Zf=<=l_X zjfq)|ruwMN0-6|^T`utrCVkdq|9)xm*j#*w&5-^nYmM*TKLMj{e>1RZ^1OOZ?l-O^ z*E1Zym%o2ux*HeqNpyh@Kkw96n>WyWKJ}^&)-Qg|K|zdC0b{lAZsOh*F{+{P@VB*V zjPv9SbH{6v#y)#^GB|ih70*|iMsOO(Lr{mg`>40X-C{4_utdFmtoQ1>vXGN*!s$Dt z;=EL7D!RaTEqmjgrxx*Cf0Bvk^$Xiz!}3~9ALHml{_Ll!%(ExeB16(WYGe3%Y_heW^L`$0T(v;r;=FlN+f$7(zI-fyzK|V*@pTo&v(G z5YW>K{RH%gO1+t+-i2|KRC?Vc?=X<$<%$-MsvMVr=#|fTe8URvZlK*j{R$lc;{S`B zHxERAIy~k;d4>K0qVGKC4PfjB6?z>=xESO3xZ+lTq_$0HMT14znyZM)}k>tinP?+jFG|KQx-ahy~;(xdkNbDHp?6%jQ~YzZ+!%`g3ZdjgV;ufIgi*BEX~SX z0<(}|u2BZIWo1^uT+c9nf+?VCE5n<^nGEv)n1u{82&Nx)WOH#nxN{lCrwlB|%FtiF zlwnST*~l<+V7g&PHrFLEoa(g6i3g1|n9;n~>)fklULSHFGRk$K-?<{joU zhxyuJRvqRKhtY`8iF3oCKm5!DrDMYTDkO2kke z2;xb<6^} + +typedef struct _ENetCallbacks +{ + void * (ENET_CALLBACK * malloc) (size_t size); + void (ENET_CALLBACK * free) (void * memory); + void (ENET_CALLBACK * no_memory) (void); +} ENetCallbacks; + +/** @defgroup callbacks ENet internal callbacks + @{ + @ingroup private +*/ +extern void * enet_malloc (size_t); +extern void enet_free (void *); + +/** @} */ + +#endif /* __ENET_CALLBACKS_H__ */ + diff --git a/enet server test/enet/enet.h b/enet server test/enet/enet.h new file mode 100644 index 0000000..5e21ee8 --- /dev/null +++ b/enet server test/enet/enet.h @@ -0,0 +1,592 @@ +/** + @file enet.h + @brief ENet public header file +*/ +#ifndef __ENET_ENET_H__ +#define __ENET_ENET_H__ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include + +#ifdef _WIN32 +#include "enet/win32.h" +#else +#include "enet/unix.h" +#endif + +#include "enet/types.h" +#include "enet/protocol.h" +#include "enet/list.h" +#include "enet/callbacks.h" + +#define ENET_VERSION_MAJOR 1 +#define ENET_VERSION_MINOR 3 +#define ENET_VERSION_PATCH 13 +#define ENET_VERSION_CREATE(major, minor, patch) (((major)<<16) | ((minor)<<8) | (patch)) +#define ENET_VERSION_GET_MAJOR(version) (((version)>>16)&0xFF) +#define ENET_VERSION_GET_MINOR(version) (((version)>>8)&0xFF) +#define ENET_VERSION_GET_PATCH(version) ((version)&0xFF) +#define ENET_VERSION ENET_VERSION_CREATE(ENET_VERSION_MAJOR, ENET_VERSION_MINOR, ENET_VERSION_PATCH) + +typedef enet_uint32 ENetVersion; + +struct _ENetHost; +struct _ENetEvent; +struct _ENetPacket; + +typedef enum _ENetSocketType +{ + ENET_SOCKET_TYPE_STREAM = 1, + ENET_SOCKET_TYPE_DATAGRAM = 2 +} ENetSocketType; + +typedef enum _ENetSocketWait +{ + ENET_SOCKET_WAIT_NONE = 0, + ENET_SOCKET_WAIT_SEND = (1 << 0), + ENET_SOCKET_WAIT_RECEIVE = (1 << 1), + ENET_SOCKET_WAIT_INTERRUPT = (1 << 2) +} ENetSocketWait; + +typedef enum _ENetSocketOption +{ + ENET_SOCKOPT_NONBLOCK = 1, + ENET_SOCKOPT_BROADCAST = 2, + ENET_SOCKOPT_RCVBUF = 3, + ENET_SOCKOPT_SNDBUF = 4, + ENET_SOCKOPT_REUSEADDR = 5, + ENET_SOCKOPT_RCVTIMEO = 6, + ENET_SOCKOPT_SNDTIMEO = 7, + ENET_SOCKOPT_ERROR = 8, + ENET_SOCKOPT_NODELAY = 9 +} ENetSocketOption; + +typedef enum _ENetSocketShutdown +{ + ENET_SOCKET_SHUTDOWN_READ = 0, + ENET_SOCKET_SHUTDOWN_WRITE = 1, + ENET_SOCKET_SHUTDOWN_READ_WRITE = 2 +} ENetSocketShutdown; + +#define ENET_HOST_ANY 0 +#define ENET_HOST_BROADCAST 0xFFFFFFFFU +#define ENET_PORT_ANY 0 + +/** + * Portable internet address structure. + * + * The host must be specified in network byte-order, and the port must be in host + * byte-order. The constant ENET_HOST_ANY may be used to specify the default + * server host. The constant ENET_HOST_BROADCAST may be used to specify the + * broadcast address (255.255.255.255). This makes sense for enet_host_connect, + * but not for enet_host_create. Once a server responds to a broadcast, the + * address is updated from ENET_HOST_BROADCAST to the server's actual IP address. + */ +typedef struct _ENetAddress +{ + enet_uint32 host; + enet_uint16 port; +} ENetAddress; + +/** + * Packet flag bit constants. + * + * The host must be specified in network byte-order, and the port must be in + * host byte-order. The constant ENET_HOST_ANY may be used to specify the + * default server host. + + @sa ENetPacket +*/ +typedef enum _ENetPacketFlag +{ + /** packet must be received by the target peer and resend attempts should be + * made until the packet is delivered */ + ENET_PACKET_FLAG_RELIABLE = (1 << 0), + /** packet will not be sequenced with other packets + * not supported for reliable packets + */ + ENET_PACKET_FLAG_UNSEQUENCED = (1 << 1), + /** packet will not allocate data, and user must supply it instead */ + ENET_PACKET_FLAG_NO_ALLOCATE = (1 << 2), + /** packet will be fragmented using unreliable (instead of reliable) sends + * if it exceeds the MTU */ + ENET_PACKET_FLAG_UNRELIABLE_FRAGMENT = (1 << 3), + + /** whether the packet has been sent from all queues it has been entered into */ + ENET_PACKET_FLAG_SENT = (1<<8) +} ENetPacketFlag; + +typedef void (ENET_CALLBACK * ENetPacketFreeCallback) (struct _ENetPacket *); + +/** + * ENet packet structure. + * + * An ENet data packet that may be sent to or received from a peer. The shown + * fields should only be read and never modified. The data field contains the + * allocated data for the packet. The dataLength fields specifies the length + * of the allocated data. The flags field is either 0 (specifying no flags), + * or a bitwise-or of any combination of the following flags: + * + * ENET_PACKET_FLAG_RELIABLE - packet must be received by the target peer + * and resend attempts should be made until the packet is delivered + * + * ENET_PACKET_FLAG_UNSEQUENCED - packet will not be sequenced with other packets + * (not supported for reliable packets) + * + * ENET_PACKET_FLAG_NO_ALLOCATE - packet will not allocate data, and user must supply it instead + + @sa ENetPacketFlag + */ +typedef struct _ENetPacket +{ + size_t referenceCount; /**< internal use only */ + enet_uint32 flags; /**< bitwise-or of ENetPacketFlag constants */ + enet_uint8 * data; /**< allocated data for packet */ + size_t dataLength; /**< length of data */ + ENetPacketFreeCallback freeCallback; /**< function to be called when the packet is no longer in use */ + void * userData; /**< application private data, may be freely modified */ +} ENetPacket; + +typedef struct _ENetAcknowledgement +{ + ENetListNode acknowledgementList; + enet_uint32 sentTime; + ENetProtocol command; +} ENetAcknowledgement; + +typedef struct _ENetOutgoingCommand +{ + ENetListNode outgoingCommandList; + enet_uint16 reliableSequenceNumber; + enet_uint16 unreliableSequenceNumber; + enet_uint32 sentTime; + enet_uint32 roundTripTimeout; + enet_uint32 roundTripTimeoutLimit; + enet_uint32 fragmentOffset; + enet_uint16 fragmentLength; + enet_uint16 sendAttempts; + ENetProtocol command; + ENetPacket * packet; +} ENetOutgoingCommand; + +typedef struct _ENetIncomingCommand +{ + ENetListNode incomingCommandList; + enet_uint16 reliableSequenceNumber; + enet_uint16 unreliableSequenceNumber; + ENetProtocol command; + enet_uint32 fragmentCount; + enet_uint32 fragmentsRemaining; + enet_uint32 * fragments; + ENetPacket * packet; +} ENetIncomingCommand; + +typedef enum _ENetPeerState +{ + ENET_PEER_STATE_DISCONNECTED = 0, + ENET_PEER_STATE_CONNECTING = 1, + ENET_PEER_STATE_ACKNOWLEDGING_CONNECT = 2, + ENET_PEER_STATE_CONNECTION_PENDING = 3, + ENET_PEER_STATE_CONNECTION_SUCCEEDED = 4, + ENET_PEER_STATE_CONNECTED = 5, + ENET_PEER_STATE_DISCONNECT_LATER = 6, + ENET_PEER_STATE_DISCONNECTING = 7, + ENET_PEER_STATE_ACKNOWLEDGING_DISCONNECT = 8, + ENET_PEER_STATE_ZOMBIE = 9 +} ENetPeerState; + +#ifndef ENET_BUFFER_MAXIMUM +#define ENET_BUFFER_MAXIMUM (1 + 2 * ENET_PROTOCOL_MAXIMUM_PACKET_COMMANDS) +#endif + +enum +{ + ENET_HOST_RECEIVE_BUFFER_SIZE = 256 * 1024, + ENET_HOST_SEND_BUFFER_SIZE = 256 * 1024, + ENET_HOST_BANDWIDTH_THROTTLE_INTERVAL = 1000, + ENET_HOST_DEFAULT_MTU = 1400, + ENET_HOST_DEFAULT_MAXIMUM_PACKET_SIZE = 32 * 1024 * 1024, + ENET_HOST_DEFAULT_MAXIMUM_WAITING_DATA = 32 * 1024 * 1024, + + ENET_PEER_DEFAULT_ROUND_TRIP_TIME = 500, + ENET_PEER_DEFAULT_PACKET_THROTTLE = 32, + ENET_PEER_PACKET_THROTTLE_SCALE = 32, + ENET_PEER_PACKET_THROTTLE_COUNTER = 7, + ENET_PEER_PACKET_THROTTLE_ACCELERATION = 2, + ENET_PEER_PACKET_THROTTLE_DECELERATION = 2, + ENET_PEER_PACKET_THROTTLE_INTERVAL = 5000, + ENET_PEER_PACKET_LOSS_SCALE = (1 << 16), + ENET_PEER_PACKET_LOSS_INTERVAL = 10000, + ENET_PEER_WINDOW_SIZE_SCALE = 64 * 1024, + ENET_PEER_TIMEOUT_LIMIT = 32, + ENET_PEER_TIMEOUT_MINIMUM = 5000, + ENET_PEER_TIMEOUT_MAXIMUM = 30000, + ENET_PEER_PING_INTERVAL = 500, + ENET_PEER_UNSEQUENCED_WINDOWS = 64, + ENET_PEER_UNSEQUENCED_WINDOW_SIZE = 1024, + ENET_PEER_FREE_UNSEQUENCED_WINDOWS = 32, + ENET_PEER_RELIABLE_WINDOWS = 16, + ENET_PEER_RELIABLE_WINDOW_SIZE = 0x1000, + ENET_PEER_FREE_RELIABLE_WINDOWS = 8 +}; + +typedef struct _ENetChannel +{ + enet_uint16 outgoingReliableSequenceNumber; + enet_uint16 outgoingUnreliableSequenceNumber; + enet_uint16 usedReliableWindows; + enet_uint16 reliableWindows [ENET_PEER_RELIABLE_WINDOWS]; + enet_uint16 incomingReliableSequenceNumber; + enet_uint16 incomingUnreliableSequenceNumber; + ENetList incomingReliableCommands; + ENetList incomingUnreliableCommands; +} ENetChannel; + +/** + * An ENet peer which data packets may be sent or received from. + * + * No fields should be modified unless otherwise specified. + */ +typedef struct _ENetPeer +{ + ENetListNode dispatchList; + struct _ENetHost * host; + enet_uint16 outgoingPeerID; + enet_uint16 incomingPeerID; + enet_uint32 connectID; + enet_uint8 outgoingSessionID; + enet_uint8 incomingSessionID; + ENetAddress address; /**< Internet address of the peer */ + void * data; /**< Application private data, may be freely modified */ + ENetPeerState state; + ENetChannel * channels; + size_t channelCount; /**< Number of channels allocated for communication with peer */ + enet_uint32 incomingBandwidth; /**< Downstream bandwidth of the client in bytes/second */ + enet_uint32 outgoingBandwidth; /**< Upstream bandwidth of the client in bytes/second */ + enet_uint32 incomingBandwidthThrottleEpoch; + enet_uint32 outgoingBandwidthThrottleEpoch; + enet_uint32 incomingDataTotal; + enet_uint32 outgoingDataTotal; + enet_uint32 lastSendTime; + enet_uint32 lastReceiveTime; + enet_uint32 nextTimeout; + enet_uint32 earliestTimeout; + enet_uint32 packetLossEpoch; + enet_uint32 packetsSent; + enet_uint32 packetsLost; + enet_uint32 packetLoss; /**< mean packet loss of reliable packets as a ratio with respect to the constant ENET_PEER_PACKET_LOSS_SCALE */ + enet_uint32 packetLossVariance; + enet_uint32 packetThrottle; + enet_uint32 packetThrottleLimit; + enet_uint32 packetThrottleCounter; + enet_uint32 packetThrottleEpoch; + enet_uint32 packetThrottleAcceleration; + enet_uint32 packetThrottleDeceleration; + enet_uint32 packetThrottleInterval; + enet_uint32 pingInterval; + enet_uint32 timeoutLimit; + enet_uint32 timeoutMinimum; + enet_uint32 timeoutMaximum; + enet_uint32 lastRoundTripTime; + enet_uint32 lowestRoundTripTime; + enet_uint32 lastRoundTripTimeVariance; + enet_uint32 highestRoundTripTimeVariance; + enet_uint32 roundTripTime; /**< mean round trip time (RTT), in milliseconds, between sending a reliable packet and receiving its acknowledgement */ + enet_uint32 roundTripTimeVariance; + enet_uint32 mtu; + enet_uint32 windowSize; + enet_uint32 reliableDataInTransit; + enet_uint16 outgoingReliableSequenceNumber; + ENetList acknowledgements; + ENetList sentReliableCommands; + ENetList sentUnreliableCommands; + ENetList outgoingReliableCommands; + ENetList outgoingUnreliableCommands; + ENetList dispatchedCommands; + int needsDispatch; + enet_uint16 incomingUnsequencedGroup; + enet_uint16 outgoingUnsequencedGroup; + enet_uint32 unsequencedWindow [ENET_PEER_UNSEQUENCED_WINDOW_SIZE / 32]; + enet_uint32 eventData; + size_t totalWaitingData; +} ENetPeer; + +/** An ENet packet compressor for compressing UDP packets before socket sends or receives. + */ +typedef struct _ENetCompressor +{ + /** Context data for the compressor. Must be non-NULL. */ + void * context; + /** Compresses from inBuffers[0:inBufferCount-1], containing inLimit bytes, to outData, outputting at most outLimit bytes. Should return 0 on failure. */ + size_t (ENET_CALLBACK * compress) (void * context, const ENetBuffer * inBuffers, size_t inBufferCount, size_t inLimit, enet_uint8 * outData, size_t outLimit); + /** Decompresses from inData, containing inLimit bytes, to outData, outputting at most outLimit bytes. Should return 0 on failure. */ + size_t (ENET_CALLBACK * decompress) (void * context, const enet_uint8 * inData, size_t inLimit, enet_uint8 * outData, size_t outLimit); + /** Destroys the context when compression is disabled or the host is destroyed. May be NULL. */ + void (ENET_CALLBACK * destroy) (void * context); +} ENetCompressor; + +/** Callback that computes the checksum of the data held in buffers[0:bufferCount-1] */ +typedef enet_uint32 (ENET_CALLBACK * ENetChecksumCallback) (const ENetBuffer * buffers, size_t bufferCount); + +/** Callback for intercepting received raw UDP packets. Should return 1 to intercept, 0 to ignore, or -1 to propagate an error. */ +typedef int (ENET_CALLBACK * ENetInterceptCallback) (struct _ENetHost * host, struct _ENetEvent * event); + +/** An ENet host for communicating with peers. + * + * No fields should be modified unless otherwise stated. + + @sa enet_host_create() + @sa enet_host_destroy() + @sa enet_host_connect() + @sa enet_host_service() + @sa enet_host_flush() + @sa enet_host_broadcast() + @sa enet_host_compress() + @sa enet_host_compress_with_range_coder() + @sa enet_host_channel_limit() + @sa enet_host_bandwidth_limit() + @sa enet_host_bandwidth_throttle() + */ +typedef struct _ENetHost +{ + ENetSocket socket; + ENetAddress address; /**< Internet address of the host */ + enet_uint32 incomingBandwidth; /**< downstream bandwidth of the host */ + enet_uint32 outgoingBandwidth; /**< upstream bandwidth of the host */ + enet_uint32 bandwidthThrottleEpoch; + enet_uint32 mtu; + enet_uint32 randomSeed; + int recalculateBandwidthLimits; + ENetPeer * peers; /**< array of peers allocated for this host */ + size_t peerCount; /**< number of peers allocated for this host */ + size_t channelLimit; /**< maximum number of channels allowed for connected peers */ + enet_uint32 serviceTime; + ENetList dispatchQueue; + int continueSending; + size_t packetSize; + enet_uint16 headerFlags; + ENetProtocol commands [ENET_PROTOCOL_MAXIMUM_PACKET_COMMANDS]; + size_t commandCount; + ENetBuffer buffers [ENET_BUFFER_MAXIMUM]; + size_t bufferCount; + ENetChecksumCallback checksum; /**< callback the user can set to enable packet checksums for this host */ + ENetCompressor compressor; + enet_uint8 packetData [2][ENET_PROTOCOL_MAXIMUM_MTU]; + ENetAddress receivedAddress; + enet_uint8 * receivedData; + size_t receivedDataLength; + enet_uint32 totalSentData; /**< total data sent, user should reset to 0 as needed to prevent overflow */ + enet_uint32 totalSentPackets; /**< total UDP packets sent, user should reset to 0 as needed to prevent overflow */ + enet_uint32 totalReceivedData; /**< total data received, user should reset to 0 as needed to prevent overflow */ + enet_uint32 totalReceivedPackets; /**< total UDP packets received, user should reset to 0 as needed to prevent overflow */ + ENetInterceptCallback intercept; /**< callback the user can set to intercept received raw UDP packets */ + size_t connectedPeers; + size_t bandwidthLimitedPeers; + size_t duplicatePeers; /**< optional number of allowed peers from duplicate IPs, defaults to ENET_PROTOCOL_MAXIMUM_PEER_ID */ + size_t maximumPacketSize; /**< the maximum allowable packet size that may be sent or received on a peer */ + size_t maximumWaitingData; /**< the maximum aggregate amount of buffer space a peer may use waiting for packets to be delivered */ +} ENetHost; + +/** + * An ENet event type, as specified in @ref ENetEvent. + */ +typedef enum _ENetEventType +{ + /** no event occurred within the specified time limit */ + ENET_EVENT_TYPE_NONE = 0, + + /** a connection request initiated by enet_host_connect has completed. + * The peer field contains the peer which successfully connected. + */ + ENET_EVENT_TYPE_CONNECT = 1, + + /** a peer has disconnected. This event is generated on a successful + * completion of a disconnect initiated by enet_pper_disconnect, if + * a peer has timed out, or if a connection request intialized by + * enet_host_connect has timed out. The peer field contains the peer + * which disconnected. The data field contains user supplied data + * describing the disconnection, or 0, if none is available. + */ + ENET_EVENT_TYPE_DISCONNECT = 2, + + /** a packet has been received from a peer. The peer field specifies the + * peer which sent the packet. The channelID field specifies the channel + * number upon which the packet was received. The packet field contains + * the packet that was received; this packet must be destroyed with + * enet_packet_destroy after use. + */ + ENET_EVENT_TYPE_RECEIVE = 3 +} ENetEventType; + +/** + * An ENet event as returned by enet_host_service(). + + @sa enet_host_service + */ +typedef struct _ENetEvent +{ + ENetEventType type; /**< type of the event */ + ENetPeer * peer; /**< peer that generated a connect, disconnect or receive event */ + enet_uint8 channelID; /**< channel on the peer that generated the event, if appropriate */ + enet_uint32 data; /**< data associated with the event, if appropriate */ + ENetPacket * packet; /**< packet associated with the event, if appropriate */ +} ENetEvent; + +/** @defgroup global ENet global functions + @{ +*/ + +/** + Initializes ENet globally. Must be called prior to using any functions in + ENet. + @returns 0 on success, < 0 on failure +*/ +ENET_API int enet_initialize (void); + +/** + Initializes ENet globally and supplies user-overridden callbacks. Must be called prior to using any functions in ENet. Do not use enet_initialize() if you use this variant. Make sure the ENetCallbacks structure is zeroed out so that any additional callbacks added in future versions will be properly ignored. + + @param version the constant ENET_VERSION should be supplied so ENet knows which version of ENetCallbacks struct to use + @param inits user-overridden callbacks where any NULL callbacks will use ENet's defaults + @returns 0 on success, < 0 on failure +*/ +ENET_API int enet_initialize_with_callbacks (ENetVersion version, const ENetCallbacks * inits); + +/** + Shuts down ENet globally. Should be called when a program that has + initialized ENet exits. +*/ +ENET_API void enet_deinitialize (void); + +/** + Gives the linked version of the ENet library. + @returns the version number +*/ +ENET_API ENetVersion enet_linked_version (void); + +/** @} */ + +/** @defgroup private ENet private implementation functions */ + +/** + Returns the wall-time in milliseconds. Its initial value is unspecified + unless otherwise set. + */ +ENET_API enet_uint32 enet_time_get (void); +/** + Sets the current wall-time in milliseconds. + */ +ENET_API void enet_time_set (enet_uint32); + +/** @defgroup socket ENet socket functions + @{ +*/ +ENET_API ENetSocket enet_socket_create (ENetSocketType); +ENET_API int enet_socket_bind (ENetSocket, const ENetAddress *); +ENET_API int enet_socket_get_address (ENetSocket, ENetAddress *); +ENET_API int enet_socket_listen (ENetSocket, int); +ENET_API ENetSocket enet_socket_accept (ENetSocket, ENetAddress *); +ENET_API int enet_socket_connect (ENetSocket, const ENetAddress *); +ENET_API int enet_socket_send (ENetSocket, const ENetAddress *, const ENetBuffer *, size_t); +ENET_API int enet_socket_receive (ENetSocket, ENetAddress *, ENetBuffer *, size_t); +ENET_API int enet_socket_wait (ENetSocket, enet_uint32 *, enet_uint32); +ENET_API int enet_socket_set_option (ENetSocket, ENetSocketOption, int); +ENET_API int enet_socket_get_option (ENetSocket, ENetSocketOption, int *); +ENET_API int enet_socket_shutdown (ENetSocket, ENetSocketShutdown); +ENET_API void enet_socket_destroy (ENetSocket); +ENET_API int enet_socketset_select (ENetSocket, ENetSocketSet *, ENetSocketSet *, enet_uint32); + +/** @} */ + +/** @defgroup Address ENet address functions + @{ +*/ +/** Attempts to resolve the host named by the parameter hostName and sets + the host field in the address parameter if successful. + @param address destination to store resolved address + @param hostName host name to lookup + @retval 0 on success + @retval < 0 on failure + @returns the address of the given hostName in address on success +*/ +ENET_API int enet_address_set_host (ENetAddress * address, const char * hostName); + +/** Gives the printable form of the IP address specified in the address parameter. + @param address address printed + @param hostName destination for name, must not be NULL + @param nameLength maximum length of hostName. + @returns the null-terminated name of the host in hostName on success + @retval 0 on success + @retval < 0 on failure +*/ +ENET_API int enet_address_get_host_ip (const ENetAddress * address, char * hostName, size_t nameLength); + +/** Attempts to do a reverse lookup of the host field in the address parameter. + @param address address used for reverse lookup + @param hostName destination for name, must not be NULL + @param nameLength maximum length of hostName. + @returns the null-terminated name of the host in hostName on success + @retval 0 on success + @retval < 0 on failure +*/ +ENET_API int enet_address_get_host (const ENetAddress * address, char * hostName, size_t nameLength); + +/** @} */ + +ENET_API ENetPacket * enet_packet_create (const void *, size_t, enet_uint32); +ENET_API void enet_packet_destroy (ENetPacket *); +ENET_API int enet_packet_resize (ENetPacket *, size_t); +ENET_API enet_uint32 enet_crc32 (const ENetBuffer *, size_t); + +ENET_API ENetHost * enet_host_create (const ENetAddress *, size_t, size_t, enet_uint32, enet_uint32); +ENET_API void enet_host_destroy (ENetHost *); +ENET_API ENetPeer * enet_host_connect (ENetHost *, const ENetAddress *, size_t, enet_uint32); +ENET_API int enet_host_check_events (ENetHost *, ENetEvent *); +ENET_API int enet_host_service (ENetHost *, ENetEvent *, enet_uint32); +ENET_API void enet_host_flush (ENetHost *); +ENET_API void enet_host_broadcast (ENetHost *, enet_uint8, ENetPacket *); +ENET_API void enet_host_compress (ENetHost *, const ENetCompressor *); +ENET_API int enet_host_compress_with_range_coder (ENetHost * host); +ENET_API void enet_host_channel_limit (ENetHost *, size_t); +ENET_API void enet_host_bandwidth_limit (ENetHost *, enet_uint32, enet_uint32); +extern void enet_host_bandwidth_throttle (ENetHost *); +extern enet_uint32 enet_host_random_seed (void); + +ENET_API int enet_peer_send (ENetPeer *, enet_uint8, ENetPacket *); +ENET_API ENetPacket * enet_peer_receive (ENetPeer *, enet_uint8 * channelID); +ENET_API void enet_peer_ping (ENetPeer *); +ENET_API void enet_peer_ping_interval (ENetPeer *, enet_uint32); +ENET_API void enet_peer_timeout (ENetPeer *, enet_uint32, enet_uint32, enet_uint32); +ENET_API void enet_peer_reset (ENetPeer *); +ENET_API void enet_peer_disconnect (ENetPeer *, enet_uint32); +ENET_API void enet_peer_disconnect_now (ENetPeer *, enet_uint32); +ENET_API void enet_peer_disconnect_later (ENetPeer *, enet_uint32); +ENET_API void enet_peer_throttle_configure (ENetPeer *, enet_uint32, enet_uint32, enet_uint32); +extern int enet_peer_throttle (ENetPeer *, enet_uint32); +extern void enet_peer_reset_queues (ENetPeer *); +extern void enet_peer_setup_outgoing_command (ENetPeer *, ENetOutgoingCommand *); +extern ENetOutgoingCommand * enet_peer_queue_outgoing_command (ENetPeer *, const ENetProtocol *, ENetPacket *, enet_uint32, enet_uint16); +extern ENetIncomingCommand * enet_peer_queue_incoming_command (ENetPeer *, const ENetProtocol *, const void *, size_t, enet_uint32, enet_uint32); +extern ENetAcknowledgement * enet_peer_queue_acknowledgement (ENetPeer *, const ENetProtocol *, enet_uint16); +extern void enet_peer_dispatch_incoming_unreliable_commands (ENetPeer *, ENetChannel *); +extern void enet_peer_dispatch_incoming_reliable_commands (ENetPeer *, ENetChannel *); +extern void enet_peer_on_connect (ENetPeer *); +extern void enet_peer_on_disconnect (ENetPeer *); + +ENET_API void * enet_range_coder_create (void); +ENET_API void enet_range_coder_destroy (void *); +ENET_API size_t enet_range_coder_compress (void *, const ENetBuffer *, size_t, size_t, enet_uint8 *, size_t); +ENET_API size_t enet_range_coder_decompress (void *, const enet_uint8 *, size_t, enet_uint8 *, size_t); + +extern size_t enet_protocol_command_size (enet_uint8); + +#ifdef __cplusplus +} +#endif + +#endif /* __ENET_ENET_H__ */ + diff --git a/enet server test/enet/list.h b/enet server test/enet/list.h new file mode 100644 index 0000000..d7b2600 --- /dev/null +++ b/enet server test/enet/list.h @@ -0,0 +1,43 @@ +/** + @file list.h + @brief ENet list management +*/ +#ifndef __ENET_LIST_H__ +#define __ENET_LIST_H__ + +#include + +typedef struct _ENetListNode +{ + struct _ENetListNode * next; + struct _ENetListNode * previous; +} ENetListNode; + +typedef ENetListNode * ENetListIterator; + +typedef struct _ENetList +{ + ENetListNode sentinel; +} ENetList; + +extern void enet_list_clear (ENetList *); + +extern ENetListIterator enet_list_insert (ENetListIterator, void *); +extern void * enet_list_remove (ENetListIterator); +extern ENetListIterator enet_list_move (ENetListIterator, void *, void *); + +extern size_t enet_list_size (ENetList *); + +#define enet_list_begin(list) ((list) -> sentinel.next) +#define enet_list_end(list) (& (list) -> sentinel) + +#define enet_list_empty(list) (enet_list_begin (list) == enet_list_end (list)) + +#define enet_list_next(iterator) ((iterator) -> next) +#define enet_list_previous(iterator) ((iterator) -> previous) + +#define enet_list_front(list) ((void *) (list) -> sentinel.next) +#define enet_list_back(list) ((void *) (list) -> sentinel.previous) + +#endif /* __ENET_LIST_H__ */ + diff --git a/enet server test/enet/protocol.h b/enet server test/enet/protocol.h new file mode 100644 index 0000000..f8c73d8 --- /dev/null +++ b/enet server test/enet/protocol.h @@ -0,0 +1,198 @@ +/** + @file protocol.h + @brief ENet protocol +*/ +#ifndef __ENET_PROTOCOL_H__ +#define __ENET_PROTOCOL_H__ + +#include "enet/types.h" + +enum +{ + ENET_PROTOCOL_MINIMUM_MTU = 576, + ENET_PROTOCOL_MAXIMUM_MTU = 4096, + ENET_PROTOCOL_MAXIMUM_PACKET_COMMANDS = 32, + ENET_PROTOCOL_MINIMUM_WINDOW_SIZE = 4096, + ENET_PROTOCOL_MAXIMUM_WINDOW_SIZE = 65536, + ENET_PROTOCOL_MINIMUM_CHANNEL_COUNT = 1, + ENET_PROTOCOL_MAXIMUM_CHANNEL_COUNT = 255, + ENET_PROTOCOL_MAXIMUM_PEER_ID = 0xFFF, + ENET_PROTOCOL_MAXIMUM_FRAGMENT_COUNT = 1024 * 1024 +}; + +typedef enum _ENetProtocolCommand +{ + ENET_PROTOCOL_COMMAND_NONE = 0, + ENET_PROTOCOL_COMMAND_ACKNOWLEDGE = 1, + ENET_PROTOCOL_COMMAND_CONNECT = 2, + ENET_PROTOCOL_COMMAND_VERIFY_CONNECT = 3, + ENET_PROTOCOL_COMMAND_DISCONNECT = 4, + ENET_PROTOCOL_COMMAND_PING = 5, + ENET_PROTOCOL_COMMAND_SEND_RELIABLE = 6, + ENET_PROTOCOL_COMMAND_SEND_UNRELIABLE = 7, + ENET_PROTOCOL_COMMAND_SEND_FRAGMENT = 8, + ENET_PROTOCOL_COMMAND_SEND_UNSEQUENCED = 9, + ENET_PROTOCOL_COMMAND_BANDWIDTH_LIMIT = 10, + ENET_PROTOCOL_COMMAND_THROTTLE_CONFIGURE = 11, + ENET_PROTOCOL_COMMAND_SEND_UNRELIABLE_FRAGMENT = 12, + ENET_PROTOCOL_COMMAND_COUNT = 13, + + ENET_PROTOCOL_COMMAND_MASK = 0x0F +} ENetProtocolCommand; + +typedef enum _ENetProtocolFlag +{ + ENET_PROTOCOL_COMMAND_FLAG_ACKNOWLEDGE = (1 << 7), + ENET_PROTOCOL_COMMAND_FLAG_UNSEQUENCED = (1 << 6), + + ENET_PROTOCOL_HEADER_FLAG_COMPRESSED = (1 << 14), + ENET_PROTOCOL_HEADER_FLAG_SENT_TIME = (1 << 15), + ENET_PROTOCOL_HEADER_FLAG_MASK = ENET_PROTOCOL_HEADER_FLAG_COMPRESSED | ENET_PROTOCOL_HEADER_FLAG_SENT_TIME, + + ENET_PROTOCOL_HEADER_SESSION_MASK = (3 << 12), + ENET_PROTOCOL_HEADER_SESSION_SHIFT = 12 +} ENetProtocolFlag; + +#ifdef _MSC_VER +#pragma pack(push, 1) +#define ENET_PACKED +#elif defined(__GNUC__) || defined(__clang__) +#define ENET_PACKED __attribute__ ((packed)) +#else +#define ENET_PACKED +#endif + +typedef struct _ENetProtocolHeader +{ + enet_uint16 peerID; + enet_uint16 sentTime; +} ENET_PACKED ENetProtocolHeader; + +typedef struct _ENetProtocolCommandHeader +{ + enet_uint8 command; + enet_uint8 channelID; + enet_uint16 reliableSequenceNumber; +} ENET_PACKED ENetProtocolCommandHeader; + +typedef struct _ENetProtocolAcknowledge +{ + ENetProtocolCommandHeader header; + enet_uint16 receivedReliableSequenceNumber; + enet_uint16 receivedSentTime; +} ENET_PACKED ENetProtocolAcknowledge; + +typedef struct _ENetProtocolConnect +{ + ENetProtocolCommandHeader header; + enet_uint16 outgoingPeerID; + enet_uint8 incomingSessionID; + enet_uint8 outgoingSessionID; + enet_uint32 mtu; + enet_uint32 windowSize; + enet_uint32 channelCount; + enet_uint32 incomingBandwidth; + enet_uint32 outgoingBandwidth; + enet_uint32 packetThrottleInterval; + enet_uint32 packetThrottleAcceleration; + enet_uint32 packetThrottleDeceleration; + enet_uint32 connectID; + enet_uint32 data; +} ENET_PACKED ENetProtocolConnect; + +typedef struct _ENetProtocolVerifyConnect +{ + ENetProtocolCommandHeader header; + enet_uint16 outgoingPeerID; + enet_uint8 incomingSessionID; + enet_uint8 outgoingSessionID; + enet_uint32 mtu; + enet_uint32 windowSize; + enet_uint32 channelCount; + enet_uint32 incomingBandwidth; + enet_uint32 outgoingBandwidth; + enet_uint32 packetThrottleInterval; + enet_uint32 packetThrottleAcceleration; + enet_uint32 packetThrottleDeceleration; + enet_uint32 connectID; +} ENET_PACKED ENetProtocolVerifyConnect; + +typedef struct _ENetProtocolBandwidthLimit +{ + ENetProtocolCommandHeader header; + enet_uint32 incomingBandwidth; + enet_uint32 outgoingBandwidth; +} ENET_PACKED ENetProtocolBandwidthLimit; + +typedef struct _ENetProtocolThrottleConfigure +{ + ENetProtocolCommandHeader header; + enet_uint32 packetThrottleInterval; + enet_uint32 packetThrottleAcceleration; + enet_uint32 packetThrottleDeceleration; +} ENET_PACKED ENetProtocolThrottleConfigure; + +typedef struct _ENetProtocolDisconnect +{ + ENetProtocolCommandHeader header; + enet_uint32 data; +} ENET_PACKED ENetProtocolDisconnect; + +typedef struct _ENetProtocolPing +{ + ENetProtocolCommandHeader header; +} ENET_PACKED ENetProtocolPing; + +typedef struct _ENetProtocolSendReliable +{ + ENetProtocolCommandHeader header; + enet_uint16 dataLength; +} ENET_PACKED ENetProtocolSendReliable; + +typedef struct _ENetProtocolSendUnreliable +{ + ENetProtocolCommandHeader header; + enet_uint16 unreliableSequenceNumber; + enet_uint16 dataLength; +} ENET_PACKED ENetProtocolSendUnreliable; + +typedef struct _ENetProtocolSendUnsequenced +{ + ENetProtocolCommandHeader header; + enet_uint16 unsequencedGroup; + enet_uint16 dataLength; +} ENET_PACKED ENetProtocolSendUnsequenced; + +typedef struct _ENetProtocolSendFragment +{ + ENetProtocolCommandHeader header; + enet_uint16 startSequenceNumber; + enet_uint16 dataLength; + enet_uint32 fragmentCount; + enet_uint32 fragmentNumber; + enet_uint32 totalLength; + enet_uint32 fragmentOffset; +} ENET_PACKED ENetProtocolSendFragment; + +typedef union _ENetProtocol +{ + ENetProtocolCommandHeader header; + ENetProtocolAcknowledge acknowledge; + ENetProtocolConnect connect; + ENetProtocolVerifyConnect verifyConnect; + ENetProtocolDisconnect disconnect; + ENetProtocolPing ping; + ENetProtocolSendReliable sendReliable; + ENetProtocolSendUnreliable sendUnreliable; + ENetProtocolSendUnsequenced sendUnsequenced; + ENetProtocolSendFragment sendFragment; + ENetProtocolBandwidthLimit bandwidthLimit; + ENetProtocolThrottleConfigure throttleConfigure; +} ENET_PACKED ENetProtocol; + +#ifdef _MSC_VER +#pragma pack(pop) +#endif + +#endif /* __ENET_PROTOCOL_H__ */ + diff --git a/enet server test/enet/time.h b/enet server test/enet/time.h new file mode 100644 index 0000000..c82a546 --- /dev/null +++ b/enet server test/enet/time.h @@ -0,0 +1,18 @@ +/** + @file time.h + @brief ENet time constants and macros +*/ +#ifndef __ENET_TIME_H__ +#define __ENET_TIME_H__ + +#define ENET_TIME_OVERFLOW 86400000 + +#define ENET_TIME_LESS(a, b) ((a) - (b) >= ENET_TIME_OVERFLOW) +#define ENET_TIME_GREATER(a, b) ((b) - (a) >= ENET_TIME_OVERFLOW) +#define ENET_TIME_LESS_EQUAL(a, b) (! ENET_TIME_GREATER (a, b)) +#define ENET_TIME_GREATER_EQUAL(a, b) (! ENET_TIME_LESS (a, b)) + +#define ENET_TIME_DIFFERENCE(a, b) ((a) - (b) >= ENET_TIME_OVERFLOW ? (b) - (a) : (a) - (b)) + +#endif /* __ENET_TIME_H__ */ + diff --git a/enet server test/enet/types.h b/enet server test/enet/types.h new file mode 100644 index 0000000..ab010a4 --- /dev/null +++ b/enet server test/enet/types.h @@ -0,0 +1,13 @@ +/** + @file types.h + @brief type definitions for ENet +*/ +#ifndef __ENET_TYPES_H__ +#define __ENET_TYPES_H__ + +typedef unsigned char enet_uint8; /**< unsigned 8-bit type */ +typedef unsigned short enet_uint16; /**< unsigned 16-bit type */ +typedef unsigned int enet_uint32; /**< unsigned 32-bit type */ + +#endif /* __ENET_TYPES_H__ */ + diff --git a/enet server test/enet/unix.h b/enet server test/enet/unix.h new file mode 100644 index 0000000..a59e340 --- /dev/null +++ b/enet server test/enet/unix.h @@ -0,0 +1,47 @@ +/** + @file unix.h + @brief ENet Unix header +*/ +#ifndef __ENET_UNIX_H__ +#define __ENET_UNIX_H__ + +#include +#include +#include +#include +#include +#include + +#ifdef MSG_MAXIOVLEN +#define ENET_BUFFER_MAXIMUM MSG_MAXIOVLEN +#endif + +typedef int ENetSocket; + +#define ENET_SOCKET_NULL -1 + +#define ENET_HOST_TO_NET_16(value) (htons (value)) /**< macro that converts host to net byte-order of a 16-bit value */ +#define ENET_HOST_TO_NET_32(value) (htonl (value)) /**< macro that converts host to net byte-order of a 32-bit value */ + +#define ENET_NET_TO_HOST_16(value) (ntohs (value)) /**< macro that converts net to host byte-order of a 16-bit value */ +#define ENET_NET_TO_HOST_32(value) (ntohl (value)) /**< macro that converts net to host byte-order of a 32-bit value */ + +typedef struct +{ + void * data; + size_t dataLength; +} ENetBuffer; + +#define ENET_CALLBACK + +#define ENET_API extern + +typedef fd_set ENetSocketSet; + +#define ENET_SOCKETSET_EMPTY(sockset) FD_ZERO (& (sockset)) +#define ENET_SOCKETSET_ADD(sockset, socket) FD_SET (socket, & (sockset)) +#define ENET_SOCKETSET_REMOVE(sockset, socket) FD_CLR (socket, & (sockset)) +#define ENET_SOCKETSET_CHECK(sockset, socket) FD_ISSET (socket, & (sockset)) + +#endif /* __ENET_UNIX_H__ */ + diff --git a/enet server test/enet/utility.h b/enet server test/enet/utility.h new file mode 100644 index 0000000..e48a476 --- /dev/null +++ b/enet server test/enet/utility.h @@ -0,0 +1,12 @@ +/** + @file utility.h + @brief ENet utility header +*/ +#ifndef __ENET_UTILITY_H__ +#define __ENET_UTILITY_H__ + +#define ENET_MAX(x, y) ((x) > (y) ? (x) : (y)) +#define ENET_MIN(x, y) ((x) < (y) ? (x) : (y)) + +#endif /* __ENET_UTILITY_H__ */ + diff --git a/enet server test/enet/win32.h b/enet server test/enet/win32.h new file mode 100644 index 0000000..e73ca9d --- /dev/null +++ b/enet server test/enet/win32.h @@ -0,0 +1,57 @@ +/** + @file win32.h + @brief ENet Win32 header +*/ +#ifndef __ENET_WIN32_H__ +#define __ENET_WIN32_H__ + +#ifdef _MSC_VER +#ifdef ENET_BUILDING_LIB +#pragma warning (disable: 4267) // size_t to int conversion +#pragma warning (disable: 4244) // 64bit to 32bit int +#pragma warning (disable: 4018) // signed/unsigned mismatch +#pragma warning (disable: 4146) // unary minus operator applied to unsigned type +#endif +#endif + +#include +#include + +typedef SOCKET ENetSocket; + +#define ENET_SOCKET_NULL INVALID_SOCKET + +#define ENET_HOST_TO_NET_16(value) (htons (value)) +#define ENET_HOST_TO_NET_32(value) (htonl (value)) + +#define ENET_NET_TO_HOST_16(value) (ntohs (value)) +#define ENET_NET_TO_HOST_32(value) (ntohl (value)) + +typedef struct +{ + size_t dataLength; + void * data; +} ENetBuffer; + +#define ENET_CALLBACK __cdecl + +#ifdef ENET_DLL +#ifdef ENET_BUILDING_LIB +#define ENET_API __declspec( dllexport ) +#else +#define ENET_API __declspec( dllimport ) +#endif /* ENET_BUILDING_LIB */ +#else /* !ENET_DLL */ +#define ENET_API extern +#endif /* ENET_DLL */ + +typedef fd_set ENetSocketSet; + +#define ENET_SOCKETSET_EMPTY(sockset) FD_ZERO (& (sockset)) +#define ENET_SOCKETSET_ADD(sockset, socket) FD_SET (socket, & (sockset)) +#define ENET_SOCKETSET_REMOVE(sockset, socket) FD_CLR (socket, & (sockset)) +#define ENET_SOCKETSET_CHECK(sockset, socket) FD_ISSET (socket, & (sockset)) + +#endif /* __ENET_WIN32_H__ */ + + diff --git a/enet server test/enet2/CMakeLists.txt b/enet server test/enet2/CMakeLists.txt new file mode 100644 index 0000000..ce6dc8f --- /dev/null +++ b/enet server test/enet2/CMakeLists.txt @@ -0,0 +1,57 @@ +cmake_minimum_required(VERSION 2.6) + +project(enet) + +# The "configure" step. +include(CheckFunctionExists) +include(CheckStructHasMember) +include(CheckTypeSize) +check_function_exists("fcntl" HAS_FCNTL) +check_function_exists("poll" HAS_POLL) +check_function_exists("gethostbyname_r" HAS_GETHOSTBYNAME_R) +check_function_exists("gethostbyaddr_r" HAS_GETHOSTBYADDR_R) +check_function_exists("inet_pton" HAS_INET_PTON) +check_function_exists("inet_ntop" HAS_INET_NTOP) +check_struct_has_member("struct msghdr" "msg_flags" "sys/types.h;sys/socket.h" HAS_MSGHDR_FLAGS) +set(CMAKE_EXTRA_INCLUDE_FILES "sys/types.h" "sys/socket.h") +check_type_size("socklen_t" HAS_SOCKLEN_T BUILTIN_TYPES_ONLY) +unset(CMAKE_EXTRA_INCLUDE_FILES) + +if(HAS_FCNTL) + add_definitions(-DHAS_FCNTL=1) +endif() +if(HAS_POLL) + add_definitions(-DHAS_POLL=1) +endif() +if(HAS_GETHOSTBYNAME_R) + add_definitions(-DHAS_GETHOSTBYNAME_R=1) +endif() +if(HAS_GETHOSTBYADDR_R) + add_definitions(-DHAS_GETHOSTBYADDR_R=1) +endif() +if(HAS_INET_PTON) + add_definitions(-DHAS_INET_PTON=1) +endif() +if(HAS_INET_NTOP) + add_definitions(-DHAS_INET_NTOP=1) +endif() +if(HAS_MSGHDR_FLAGS) + add_definitions(-DHAS_MSGHDR_FLAGS=1) +endif() +if(HAS_SOCKLEN_T) + add_definitions(-DHAS_SOCKLEN_T=1) +endif() + +include_directories(${PROJECT_SOURCE_DIR}/include) + +add_library(enet STATIC + callbacks.c + compress.c + host.c + list.c + packet.c + peer.c + protocol.c + unix.c + win32.c + ) diff --git a/enet server test/enet2/ChangeLog b/enet server test/enet2/ChangeLog new file mode 100644 index 0000000..9386a01 --- /dev/null +++ b/enet server test/enet2/ChangeLog @@ -0,0 +1,177 @@ +ENet 1.3.13 (April 30, 2015): + +* miscellaneous bug fixes +* added premake and cmake support +* miscellaneous documentation cleanups + +ENet 1.3.12 (April 24, 2014): + +* added maximumPacketSize and maximumWaitingData fields to ENetHost to limit the amount of +data waiting to be delivered on a peer (beware that the default maximumPacketSize is +32MB and should be set higher if desired as should maximumWaitingData) + +ENet 1.3.11 (December 26, 2013): + +* allow an ENetHost to connect to itself +* fixed possible bug with disconnect notifications during connect attempts +* fixed some preprocessor definition bugs + +ENet 1.3.10 (October 23, 2013); + +* doubled maximum reliable window size +* fixed RCVTIMEO/SNDTIMEO socket options and also added NODELAY + +ENet 1.3.9 (August 19, 2013): + +* added duplicatePeers option to ENetHost which can limit the number of peers from duplicate IPs +* added enet_socket_get_option() and ENET_SOCKOPT_ERROR +* added enet_host_random_seed() platform stub + +ENet 1.3.8 (June 2, 2013): + +* added enet_linked_version() for checking the linked version +* added enet_socket_get_address() for querying the local address of a socket +* silenced some debugging prints unless ENET_DEBUG is defined during compilation +* handle EINTR in enet_socket_wait() so that enet_host_service() doesn't propagate errors from signals +* optimized enet_host_bandwidth_throttle() to be less expensive for large numbers of peers + +ENet 1.3.7 (March 6, 2013): + +* added ENET_PACKET_FLAG_SENT to indicate that a packet is being freed because it has been sent +* added userData field to ENetPacket +* changed how random seed is generated on Windows to avoid import warnings +* fixed case where disconnects could be generated with no preceding connect event + +ENet 1.3.6 (December 11, 2012): + +* added support for intercept callback in ENetHost that can be used to process raw packets before ENet +* added enet_socket_shutdown() for issuing shutdown on a socket +* fixed enet_socket_connect() to not error on non-blocking connects +* fixed bug in MTU negotiation during connections + +ENet 1.3.5 (July 31, 2012): + +* fixed bug in unreliable packet fragment queuing + +ENet 1.3.4 (May 29, 2012): + +* added enet_peer_ping_interval() for configuring per-peer ping intervals +* added enet_peer_timeout() for configuring per-peer timeouts +* added protocol packet size limits + +ENet 1.3.3 (June 28, 2011): + +* fixed bug with simultaneous disconnects not dispatching events + +ENet 1.3.2 (May 31, 2011): + +* added support for unreliable packet fragmenting via the packet flag +ENET_PACKET_FLAG_UNRELIABLE_FRAGMENT +* fixed regression in unreliable packet queuing +* added check against received port to limit some forms of IP-spoofing + +ENet 1.3.1 (February 10, 2011): + +* fixed bug in tracking of reliable data in transit +* reliable data window size now scales with the throttle +* fixed bug in fragment length calculation when checksums are used + +ENet 1.3.0 (June 5, 2010): + +* enet_host_create() now requires the channel limit to be specified as +a parameter +* enet_host_connect() now accepts a data parameter which is supplied +to the receiving receiving host in the event data field for a connect event +* added an adaptive order-2 PPM range coder as a built-in compressor option +which can be set with enet_host_compress_with_range_coder() +* added support for packet compression configurable with a callback +* improved session number handling to not rely on the packet checksum +field, saving 4 bytes per packet unless the checksum option is used +* removed the dependence on the rand callback for session number handling + +Caveats: This version is not protocol compatible with the 1.2 series or +earlier. The enet_host_connect and enet_host_create API functions require +supplying additional parameters. + +ENet 1.2.5 (June 28, 2011): + +* fixed bug with simultaneous disconnects not dispatching events + +ENet 1.2.4 (May 31, 2011): + +* fixed regression in unreliable packet queuing +* added check against received port to limit some forms of IP-spoofing + +ENet 1.2.3 (February 10, 2011): + +* fixed bug in tracking reliable data in transit + +ENet 1.2.2 (June 5, 2010): + +* checksum functionality is now enabled by setting a checksum callback +inside ENetHost instead of being a configure script option +* added totalSentData, totalSentPackets, totalReceivedData, and +totalReceivedPackets counters inside ENetHost for getting usage +statistics +* added enet_host_channel_limit() for limiting the maximum number of +channels allowed by connected peers +* now uses dispatch queues for event dispatch rather than potentially +unscalable array walking +* added no_memory callback that is called when a malloc attempt fails, +such that if no_memory returns rather than aborts (the default behavior), +then the error is propagated to the return value of the API calls +* now uses packed attribute for protocol structures on platforms with +strange alignment rules +* improved autoconf build system contributed by Nathan Brink allowing +for easier building as a shared library + +Caveats: If you were using the compile-time option that enabled checksums, +make sure to set the checksum callback inside ENetHost to enet_crc32 to +regain the old behavior. The ENetCallbacks structure has added new fields, +so make sure to clear the structure to zero before use if +using enet_initialize_with_callbacks(). + +ENet 1.2.1 (November 12, 2009): + +* fixed bug that could cause disconnect events to be dropped +* added thin wrapper around select() for portable usage +* added ENET_SOCKOPT_REUSEADDR socket option +* factored enet_socket_bind()/enet_socket_listen() out of enet_socket_create() +* added contributed Code::Blocks build file + +ENet 1.2 (February 12, 2008): + +* fixed bug in VERIFY_CONNECT acknowledgement that could cause connect +attempts to occasionally timeout +* fixed acknowledgements to check both the outgoing and sent queues +when removing acknowledged packets +* fixed accidental bit rot in the MSVC project file +* revised sequence number overflow handling to address some possible +disconnect bugs +* added enet_host_check_events() for getting only local queued events +* factored out socket option setting into enet_socket_set_option() so +that socket options are now set separately from enet_socket_create() + +Caveats: While this release is superficially protocol compatible with 1.1, +differences in the sequence number overflow handling can potentially cause +random disconnects. + +ENet 1.1 (June 6, 2007): + +* optional CRC32 just in case someone needs a stronger checksum than UDP +provides (--enable-crc32 configure option) +* the size of packet headers are half the size they used to be (so less +overhead when sending small packets) +* enet_peer_disconnect_later() that waits till all queued outgoing +packets get sent before issuing an actual disconnect +* freeCallback field in individual packets for notification of when a +packet is about to be freed +* ENET_PACKET_FLAG_NO_ALLOCATE for supplying pre-allocated data to a +packet (can be used in concert with freeCallback to support some custom +allocation schemes that the normal memory allocation callbacks would +normally not allow) +* enet_address_get_host_ip() for printing address numbers +* promoted the enet_socket_*() functions to be part of the API now +* a few stability/crash fixes + + diff --git a/enet server test/enet2/Doxyfile b/enet server test/enet2/Doxyfile new file mode 100644 index 0000000..597ef1a --- /dev/null +++ b/enet server test/enet2/Doxyfile @@ -0,0 +1,2303 @@ +# Doxyfile 1.8.6 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project. +# +# All text after a double hash (##) is considered a comment and is placed in +# front of the TAG it is preceding. +# +# All text after a single hash (#) is considered a comment and will be ignored. +# The format is: +# TAG = value [value, ...] +# For lists, items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (\" \"). + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all text +# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv +# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv +# for the list of possible encodings. +# The default value is: UTF-8. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by +# double-quotes, unless you are using Doxywizard) that should identify the +# project for which the documentation is generated. This name is used in the +# title of most generated pages and in a few other places. +# The default value is: My Project. + +PROJECT_NAME = "ENet" + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. This +# could be handy for archiving the generated documentation or if some version +# control system is used. + +PROJECT_NUMBER = v1.3.13 + +# Using the PROJECT_BRIEF tag one can provide an optional one line description +# for a project that appears at the top of each page and should give viewer a +# quick idea about the purpose of the project. Keep the description short. + +PROJECT_BRIEF = "Reliable UDP networking library" + +# With the PROJECT_LOGO tag one can specify an logo or icon that is included in +# the documentation. The maximum height of the logo should not exceed 55 pixels +# and the maximum width should not exceed 200 pixels. Doxygen will copy the logo +# to the output directory. + +PROJECT_LOGO = + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path +# into which the generated documentation will be written. If a relative path is +# entered, it will be relative to the location where doxygen was started. If +# left blank the current directory will be used. + +OUTPUT_DIRECTORY = docs + +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub- +# directories (in 2 levels) under the output directory of each output format and +# will distribute the generated files over these directories. Enabling this +# option can be useful when feeding doxygen a huge amount of source files, where +# putting all generated files in the same directory would otherwise causes +# performance problems for the file system. +# The default value is: NO. + +CREATE_SUBDIRS = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, +# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), +# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, +# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), +# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, +# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, +# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, +# Ukrainian and Vietnamese. +# The default value is: English. + +OUTPUT_LANGUAGE = English + +# If the BRIEF_MEMBER_DESC tag is set to YES doxygen will include brief member +# descriptions after the members that are listed in the file and class +# documentation (similar to Javadoc). Set to NO to disable this. +# The default value is: YES. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES doxygen will prepend the brief +# description of a member or function before the detailed description +# +# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. +# The default value is: YES. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator that is +# used to form the text in various listings. Each string in this list, if found +# as the leading text of the brief description, will be stripped from the text +# and the result, after processing the whole list, is used as the annotated +# text. Otherwise, the brief description is used as-is. If left blank, the +# following values are used ($name is automatically replaced with the name of +# the entity):The $name class, The $name widget, The $name file, is, provides, +# specifies, contains, represents, a, an and the. + +ABBREVIATE_BRIEF = + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# doxygen will generate a detailed section even if there is only a brief +# description. +# The default value is: NO. + +ALWAYS_DETAILED_SEC = YES + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. +# The default value is: NO. + +INLINE_INHERITED_MEMB = YES + +# If the FULL_PATH_NAMES tag is set to YES doxygen will prepend the full path +# before files name in the file list and in the header files. If set to NO the +# shortest path that makes the file name unique will be used +# The default value is: YES. + +FULL_PATH_NAMES = YES + +# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. +# Stripping is only done if one of the specified strings matches the left-hand +# part of the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the path to +# strip. +# +# Note that you can specify absolute paths here, but also relative paths, which +# will be relative from the directory where doxygen is started. +# This tag requires that the tag FULL_PATH_NAMES is set to YES. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the +# path mentioned in the documentation of a class, which tells the reader which +# header file to include in order to use a class. If left blank only the name of +# the header file containing the class definition is used. Otherwise one should +# specify the list of include paths that are normally passed to the compiler +# using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but +# less readable) file names. This can be useful is your file systems doesn't +# support long names like on DOS, Mac, or CD-ROM. +# The default value is: NO. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the +# first line (until the first dot) of a Javadoc-style comment as the brief +# description. If set to NO, the Javadoc-style will behave just like regular Qt- +# style comments (thus requiring an explicit @brief command for a brief +# description.) +# The default value is: NO. + +JAVADOC_AUTOBRIEF = YES + +# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first +# line (until the first dot) of a Qt-style comment as the brief description. If +# set to NO, the Qt-style will behave just like regular Qt-style comments (thus +# requiring an explicit \brief command for a brief description.) +# The default value is: NO. + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a +# multi-line C++ special comment block (i.e. a block of //! or /// comments) as +# a brief description. This used to be the default behavior. The new default is +# to treat a multi-line C++ comment block as a detailed description. Set this +# tag to YES if you prefer the old behavior instead. +# +# Note that setting this tag to YES also means that rational rose comments are +# not recognized any more. +# The default value is: NO. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the +# documentation from any documented member that it re-implements. +# The default value is: YES. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce a +# new page for each member. If set to NO, the documentation of a member will be +# part of the file/class/namespace that contains it. +# The default value is: NO. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen +# uses this value to replace tabs by spaces in code fragments. +# Minimum value: 1, maximum value: 16, default value: 4. + +TAB_SIZE = 4 + +# This tag can be used to specify a number of aliases that act as commands in +# the documentation. An alias has the form: +# name=value +# For example adding +# "sideeffect=@par Side Effects:\n" +# will allow you to put the command \sideeffect (or @sideeffect) in the +# documentation, which will result in a user-defined paragraph with heading +# "Side Effects:". You can put \n's in the value part of an alias to insert +# newlines. + +ALIASES = + +# This tag can be used to specify a number of word-keyword mappings (TCL only). +# A mapping has the form "name=value". For example adding "class=itcl::class" +# will allow you to use the command class in the itcl::class meaning. + +TCL_SUBST = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources +# only. Doxygen will then generate output that is more tailored for C. For +# instance, some of the names that are used will be different. The list of all +# members will be omitted, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_FOR_C = YES + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or +# Python sources only. Doxygen will then generate output that is more tailored +# for that language. For instance, namespaces will be presented as packages, +# qualified scopes will look different, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources. Doxygen will then generate output that is tailored for Fortran. +# The default value is: NO. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for VHDL. +# The default value is: NO. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Doxygen selects the parser to use depending on the extension of the files it +# parses. With this tag you can assign which parser to use for a given +# extension. Doxygen has a built-in mapping, but you can override or extend it +# using this tag. The format is ext=language, where ext is a file extension, and +# language is one of the parsers supported by doxygen: IDL, Java, Javascript, +# C#, C, C++, D, PHP, Objective-C, Python, Fortran, VHDL. For instance to make +# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C +# (default is Fortran), use: inc=Fortran f=C. +# +# Note For files without extension you can use no_extension as a placeholder. +# +# Note that for custom extensions you also need to set FILE_PATTERNS otherwise +# the files are not read by doxygen. + +EXTENSION_MAPPING = + +# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments +# according to the Markdown format, which allows for more readable +# documentation. See http://daringfireball.net/projects/markdown/ for details. +# The output of markdown processing is further processed by doxygen, so you can +# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in +# case of backward compatibilities issues. +# The default value is: YES. + +MARKDOWN_SUPPORT = YES + +# When enabled doxygen tries to link words that correspond to documented +# classes, or namespaces to their corresponding documentation. Such a link can +# be prevented in individual cases by by putting a % sign in front of the word +# or globally by setting AUTOLINK_SUPPORT to NO. +# The default value is: YES. + +AUTOLINK_SUPPORT = YES + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should set this +# tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); +# versus func(std::string) {}). This also make the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. +# The default value is: NO. + +BUILTIN_STL_SUPPORT = NO + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. +# The default value is: NO. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: +# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen +# will parse them like normal C++ but will assume all classes use public instead +# of private inheritance when no explicit protection keyword is present. +# The default value is: NO. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate +# getter and setter methods for a property. Setting this option to YES will make +# doxygen to replace the get and set methods by a property in the documentation. +# This will only work if the methods are indeed getting or setting a simple +# type. If this is not the case, or you want to show the methods anyway, you +# should set this option to NO. +# The default value is: YES. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. +# The default value is: NO. + +DISTRIBUTE_GROUP_DOC = YES + +# Set the SUBGROUPING tag to YES to allow class member groups of the same type +# (for instance a group of public functions) to be put as a subgroup of that +# type (e.g. under the Public Functions section). Set it to NO to prevent +# subgrouping. Alternatively, this can be done per class using the +# \nosubgrouping command. +# The default value is: YES. + +SUBGROUPING = YES + +# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions +# are shown inside the group in which they are included (e.g. using \ingroup) +# instead of on a separate page (for HTML and Man pages) or section (for LaTeX +# and RTF). +# +# Note that this feature does not work in combination with +# SEPARATE_MEMBER_PAGES. +# The default value is: NO. + +INLINE_GROUPED_CLASSES = YES + +# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions +# with only public data fields or simple typedef fields will be shown inline in +# the documentation of the scope in which they are defined (i.e. file, +# namespace, or group documentation), provided this scope is documented. If set +# to NO, structs, classes, and unions are shown on a separate page (for HTML and +# Man pages) or section (for LaTeX and RTF). +# The default value is: NO. + +INLINE_SIMPLE_STRUCTS = NO + +# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or +# enum is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically be +# useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. +# The default value is: NO. + +TYPEDEF_HIDES_STRUCT = YES + +# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This +# cache is used to resolve symbols given their name and scope. Since this can be +# an expensive process and often the same symbol appears multiple times in the +# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small +# doxygen will become slower. If the cache is too large, memory is wasted. The +# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range +# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 +# symbols. At the end of a run doxygen will report the cache usage and suggest +# the optimal cache size from a speed point of view. +# Minimum value: 0, maximum value: 9, default value: 0. + +LOOKUP_CACHE_SIZE = 0 + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. Private +# class members and static file members will be hidden unless the +# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. +# Note: This will also disable the warnings about undocumented members that are +# normally produced when WARNINGS is set to YES. +# The default value is: NO. + +EXTRACT_ALL = YES + +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class will +# be included in the documentation. +# The default value is: NO. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal +# scope will be included in the documentation. +# The default value is: NO. + +EXTRACT_PACKAGE = NO + +# If the EXTRACT_STATIC tag is set to YES all static members of a file will be +# included in the documentation. +# The default value is: NO. + +EXTRACT_STATIC = NO + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) defined +# locally in source files will be included in the documentation. If set to NO +# only classes defined in header files are included. Does not have any effect +# for Java sources. +# The default value is: YES. + +EXTRACT_LOCAL_CLASSES = NO + +# This flag is only useful for Objective-C code. When set to YES local methods, +# which are defined in the implementation section but not in the interface are +# included in the documentation. If set to NO only methods in the interface are +# included. +# The default value is: NO. + +EXTRACT_LOCAL_METHODS = NO + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base name of +# the file that contains the anonymous namespace. By default anonymous namespace +# are hidden. +# The default value is: NO. + +EXTRACT_ANON_NSPACES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all +# undocumented members inside documented classes or files. If set to NO these +# members will be included in the various overviews, but no documentation +# section is generated. This option has no effect if EXTRACT_ALL is enabled. +# The default value is: NO. + +HIDE_UNDOC_MEMBERS = YES + +# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. If set +# to NO these classes will be included in the various overviews. This option has +# no effect if EXTRACT_ALL is enabled. +# The default value is: NO. + +HIDE_UNDOC_CLASSES = YES + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend +# (class|struct|union) declarations. If set to NO these declarations will be +# included in the documentation. +# The default value is: NO. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any +# documentation blocks found inside the body of a function. If set to NO these +# blocks will be appended to the function's detailed documentation block. +# The default value is: NO. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation that is typed after a +# \internal command is included. If the tag is set to NO then the documentation +# will be excluded. Set it to YES to include the internal documentation. +# The default value is: NO. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file +# names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. +# The default value is: system dependent. + +CASE_SENSE_NAMES = YES + +# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with +# their full class and namespace scopes in the documentation. If set to YES the +# scope will be hidden. +# The default value is: NO. + +HIDE_SCOPE_NAMES = NO + +# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of +# the files that are included by a file in the documentation of that file. +# The default value is: YES. + +SHOW_INCLUDE_FILES = YES + +# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each +# grouped member an include statement to the documentation, telling the reader +# which file to include in order to use the member. +# The default value is: NO. + +SHOW_GROUPED_MEMB_INC = YES + +# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include +# files with double quotes in the documentation rather than with sharp brackets. +# The default value is: NO. + +FORCE_LOCAL_INCLUDES = NO + +# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the +# documentation for inline members. +# The default value is: YES. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the +# (detailed) documentation of file and class members alphabetically by member +# name. If set to NO the members will appear in declaration order. +# The default value is: YES. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief +# descriptions of file, namespace and class members alphabetically by member +# name. If set to NO the members will appear in declaration order. Note that +# this will also influence the order of the classes in the class list. +# The default value is: NO. + +SORT_BRIEF_DOCS = YES + +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the +# (brief and detailed) documentation of class members so that constructors and +# destructors are listed first. If set to NO the constructors will appear in the +# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. +# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief +# member documentation. +# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting +# detailed member documentation. +# The default value is: NO. + +SORT_MEMBERS_CTORS_1ST = YES + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy +# of group names into alphabetical order. If set to NO the group names will +# appear in their defined order. +# The default value is: NO. + +SORT_GROUP_NAMES = YES + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by +# fully-qualified names, including namespaces. If set to NO, the class list will +# be sorted only by class name, not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the alphabetical +# list. +# The default value is: NO. + +SORT_BY_SCOPE_NAME = YES + +# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper +# type resolution of all parameters of a function it will reject a match between +# the prototype and the implementation of a member function even if there is +# only one candidate or it is obvious which candidate to choose by doing a +# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still +# accept a match between prototype and implementation in such cases. +# The default value is: NO. + +STRICT_PROTO_MATCHING = NO + +# The GENERATE_TODOLIST tag can be used to enable ( YES) or disable ( NO) the +# todo list. This list is created by putting \todo commands in the +# documentation. +# The default value is: YES. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable ( YES) or disable ( NO) the +# test list. This list is created by putting \test commands in the +# documentation. +# The default value is: YES. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable ( YES) or disable ( NO) the bug +# list. This list is created by putting \bug commands in the documentation. +# The default value is: YES. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable ( YES) or disable ( NO) +# the deprecated list. This list is created by putting \deprecated commands in +# the documentation. +# The default value is: YES. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional documentation +# sections, marked by \if ... \endif and \cond +# ... \endcond blocks. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the +# initial value of a variable or macro / define can have for it to appear in the +# documentation. If the initializer consists of more lines than specified here +# it will be hidden. Use a value of 0 to hide initializers completely. The +# appearance of the value of individual variables and macros / defines can be +# controlled using \showinitializer or \hideinitializer command in the +# documentation regardless of this setting. +# Minimum value: 0, maximum value: 10000, default value: 30. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at +# the bottom of the documentation of classes and structs. If set to YES the list +# will mention the files that were used to generate the documentation. +# The default value is: YES. + +SHOW_USED_FILES = YES + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This +# will remove the Files entry from the Quick Index and from the Folder Tree View +# (if specified). +# The default value is: YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces +# page. This will remove the Namespaces entry from the Quick Index and from the +# Folder Tree View (if specified). +# The default value is: YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command command input-file, where command is the value of the +# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided +# by doxygen. Whatever the program writes to standard output is used as the file +# version. For an example see the documentation. + +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed +# by doxygen. The layout file controls the global structure of the generated +# output files in an output format independent way. To create the layout file +# that represents doxygen's defaults, run doxygen with the -l option. You can +# optionally specify a file name after the option, if omitted DoxygenLayout.xml +# will be used as the name of the layout file. +# +# Note that if you run doxygen from a directory containing a file called +# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE +# tag is left empty. + +LAYOUT_FILE = DoxygenLayout.xml + +# The CITE_BIB_FILES tag can be used to specify one or more bib files containing +# the reference definitions. This must be a list of .bib files. The .bib +# extension is automatically appended if omitted. This requires the bibtex tool +# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. +# For LaTeX the style of the bibliography can be controlled using +# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the +# search path. Do not use file names with spaces, bibtex cannot handle them. See +# also \cite for info how to create references. + +CITE_BIB_FILES = + +#--------------------------------------------------------------------------- +# Configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated to +# standard output by doxygen. If QUIET is set to YES this implies that the +# messages are off. +# The default value is: NO. + +QUIET = NO + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated to standard error ( stderr) by doxygen. If WARNINGS is set to YES +# this implies that the warnings are on. +# +# Tip: Turn warnings on while writing the documentation. +# The default value is: YES. + +WARNINGS = YES + +# If the WARN_IF_UNDOCUMENTED tag is set to YES, then doxygen will generate +# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag +# will automatically be disabled. +# The default value is: YES. + +WARN_IF_UNDOCUMENTED = YES + +# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some parameters +# in a documented function, or documenting parameters that don't exist or using +# markup commands wrongly. +# The default value is: YES. + +WARN_IF_DOC_ERROR = YES + +# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that +# are documented, but have no documentation for their parameters or return +# value. If set to NO doxygen will only warn about wrong or incomplete parameter +# documentation, but not about the absence of documentation. +# The default value is: NO. + +WARN_NO_PARAMDOC = YES + +# The WARN_FORMAT tag determines the format of the warning messages that doxygen +# can produce. The string should contain the $file, $line, and $text tags, which +# will be replaced by the file and line number from which the warning originated +# and the warning text. Optionally the format may contain $version, which will +# be replaced by the version of the file (if it could be obtained via +# FILE_VERSION_FILTER) +# The default value is: $file:$line: $text. + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning and error +# messages should be written. If left blank the output is written to standard +# error (stderr). + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# Configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag is used to specify the files and/or directories that contain +# documented source files. You may enter file names like myfile.cpp or +# directories like /usr/src/myproject. Separate the files or directories with +# spaces. +# Note: If this tag is empty the current directory is searched. + +INPUT = + +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses +# libiconv (or the iconv built into libc) for the transcoding. See the libiconv +# documentation (see: http://www.gnu.org/software/libiconv) for the list of +# possible encodings. +# The default value is: UTF-8. + +INPUT_ENCODING = UTF-8 + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and +# *.h) to filter out the source-files in the directories. If left blank the +# following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii, +# *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp, +# *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown, +# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf, +# *.qsf, *.as and *.js. + +FILE_PATTERNS = *.c *.h *.dox + +# The RECURSIVE tag can be used to specify whether or not subdirectories should +# be searched for input files as well. +# The default value is: NO. + +RECURSIVE = YES + +# The EXCLUDE tag can be used to specify files and/or directories that should be +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. +# +# Note that relative paths are relative to the directory from which doxygen is +# run. + +EXCLUDE = + +# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or +# directories that are symbolic links (a Unix file system feature) are excluded +# from the input. +# The default value is: NO. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories for example use the pattern */test/* + +EXCLUDE_PATTERNS = + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories use the pattern */test/* + +EXCLUDE_SYMBOLS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or directories +# that contain example code fragments that are included (see the \include +# command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and +# *.h) to filter out the source-files in the directories. If left blank all +# files are included. + +EXAMPLE_PATTERNS = + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude commands +# irrespective of the value of the RECURSIVE tag. +# The default value is: NO. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or directories +# that contain images that are to be included in the documentation (see the +# \image command). + +IMAGE_PATH = ${CMAKE_CURRENT_SOURCE_DIR} + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command: +# +# +# +# where is the value of the INPUT_FILTER tag, and is the +# name of an input file. Doxygen will then use the output that the filter +# program writes to standard output. If FILTER_PATTERNS is specified, this tag +# will be ignored. +# +# Note that the filter must not add or remove lines; it is applied before the +# code is scanned, but not when the output code is generated. If lines are added +# or removed, the anchors will not be placed correctly. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: pattern=filter +# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how +# filters are used. If the FILTER_PATTERNS tag is empty or if none of the +# patterns match the file name, INPUT_FILTER is applied. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER ) will also be used to filter the input files that are used for +# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). +# The default value is: NO. + +FILTER_SOURCE_FILES = NO + +# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file +# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and +# it is also possible to disable source filtering for a specific pattern using +# *.ext= (so without naming a filter). +# This tag requires that the tag FILTER_SOURCE_FILES is set to YES. + +FILTER_SOURCE_PATTERNS = + +# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that +# is part of the input, its contents will be placed on the main page +# (index.html). This can be useful if you have a project on for instance GitHub +# and want to reuse the introduction page also for the doxygen output. + +USE_MDFILE_AS_MAINPAGE = + +#--------------------------------------------------------------------------- +# Configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will be +# generated. Documented entities will be cross-referenced with these sources. +# +# Note: To get rid of all source code in the generated output, make sure that +# also VERBATIM_HEADERS is set to NO. +# The default value is: NO. + +SOURCE_BROWSER = NO + +# Setting the INLINE_SOURCES tag to YES will include the body of functions, +# classes and enums directly into the documentation. +# The default value is: NO. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any +# special comment blocks from generated source code fragments. Normal C, C++ and +# Fortran comments will always remain visible. +# The default value is: YES. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES then for each documented +# function all documented functions referencing it will be listed. +# The default value is: NO. + +REFERENCED_BY_RELATION = NO + +# If the REFERENCES_RELATION tag is set to YES then for each documented function +# all documented entities called/used by that function will be listed. +# The default value is: NO. + +REFERENCES_RELATION = NO + +# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set +# to YES, then the hyperlinks from functions in REFERENCES_RELATION and +# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will +# link to the documentation. +# The default value is: YES. + +REFERENCES_LINK_SOURCE = NO + +# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the +# source code will show a tooltip with additional information such as prototype, +# brief description and links to the definition and documentation. Since this +# will make the HTML file larger and loading of large files a bit slower, you +# can opt to disable this feature. +# The default value is: YES. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +SOURCE_TOOLTIPS = YES + +# If the USE_HTAGS tag is set to YES then the references to source code will +# point to the HTML generated by the htags(1) tool instead of doxygen built-in +# source browser. The htags tool is part of GNU's global source tagging system +# (see http://www.gnu.org/software/global/global.html). You will need version +# 4.8.6 or higher. +# +# To use it do the following: +# - Install the latest version of global +# - Enable SOURCE_BROWSER and USE_HTAGS in the config file +# - Make sure the INPUT points to the root of the source tree +# - Run doxygen as normal +# +# Doxygen will invoke htags (and that will in turn invoke gtags), so these +# tools must be available from the command line (i.e. in the search path). +# +# The result: instead of the source browser generated by doxygen, the links to +# source code will now point to the output of htags. +# The default value is: NO. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a +# verbatim copy of the header file for each class for which an include is +# specified. Set to NO to disable this. +# See also: Section \class. +# The default value is: YES. + +VERBATIM_HEADERS = NO + +#--------------------------------------------------------------------------- +# Configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all +# compounds will be generated. Enable this if the project contains a lot of +# classes, structs, unions or interfaces. +# The default value is: YES. + +ALPHABETICAL_INDEX = YES + +# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in +# which the alphabetical index list will be split. +# Minimum value: 1, maximum value: 20, default value: 5. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. + +COLS_IN_ALPHA_INDEX = 1 + +# In case all classes in a project start with a common prefix, all classes will +# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag +# can be used to specify a prefix (or a list of prefixes) that should be ignored +# while generating the index headers. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES doxygen will generate HTML output +# The default value is: YES. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a +# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of +# it. +# The default directory is: html. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each +# generated HTML page (for example: .htm, .php, .asp). +# The default value is: .html. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a user-defined HTML header file for +# each generated HTML page. If the tag is left blank doxygen will generate a +# standard header. +# +# To get valid HTML the header file that includes any scripts and style sheets +# that doxygen needs, which is dependent on the configuration options used (e.g. +# the setting GENERATE_TREEVIEW). It is highly recommended to start with a +# default header using +# doxygen -w html new_header.html new_footer.html new_stylesheet.css +# YourConfigFile +# and then modify the file new_header.html. See also section "Doxygen usage" +# for information on how to generate the default header that doxygen normally +# uses. +# Note: The header is subject to change so you typically have to regenerate the +# default header when upgrading to a newer version of doxygen. For a description +# of the possible markers and block names see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each +# generated HTML page. If the tag is left blank doxygen will generate a standard +# footer. See HTML_HEADER for more information on how to generate a default +# footer and what special commands can be used inside the footer. See also +# section "Doxygen usage" for information on how to generate the default footer +# that doxygen normally uses. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style +# sheet that is used by each HTML page. It can be used to fine-tune the look of +# the HTML output. If left blank doxygen will generate a default style sheet. +# See also section "Doxygen usage" for information on how to generate the style +# sheet that doxygen normally uses. +# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as +# it is more robust and this tag (HTML_STYLESHEET) will in the future become +# obsolete. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_STYLESHEET = + +# The HTML_EXTRA_STYLESHEET tag can be used to specify an additional user- +# defined cascading style sheet that is included after the standard style sheets +# created by doxygen. Using this option one can overrule certain style aspects. +# This is preferred over using HTML_STYLESHEET since it does not replace the +# standard style sheet and is therefor more robust against future updates. +# Doxygen will copy the style sheet file to the output directory. For an example +# see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_STYLESHEET = + +# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or +# other source files which should be copied to the HTML output directory. Note +# that these files will be copied to the base HTML output directory. Use the +# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these +# files. In the HTML_STYLESHEET file, use the file name only. Also note that the +# files will be copied as-is; there are no commands or markers available. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_FILES = + +# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen +# will adjust the colors in the stylesheet and background images according to +# this color. Hue is specified as an angle on a colorwheel, see +# http://en.wikipedia.org/wiki/Hue for more information. For instance the value +# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 +# purple, and 360 is red again. +# Minimum value: 0, maximum value: 359, default value: 220. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_HUE = 118 + +# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors +# in the HTML output. For a value of 0 the output will use grayscales only. A +# value of 255 will produce the most vivid colors. +# Minimum value: 0, maximum value: 255, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_SAT = 100 + +# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the +# luminance component of the colors in the HTML output. Values below 100 +# gradually make the output lighter, whereas values above 100 make the output +# darker. The value divided by 100 is the actual gamma applied, so 80 represents +# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not +# change the gamma. +# Minimum value: 40, maximum value: 240, default value: 80. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_GAMMA = 240 + +# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML +# page will contain the date and time when the page was generated. Setting this +# to NO can help when comparing the output of multiple runs. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_TIMESTAMP = YES + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_DYNAMIC_SECTIONS = NO + +# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries +# shown in the various tree structured indices initially; the user can expand +# and collapse entries dynamically later on. Doxygen will expand the tree to +# such a level that at most the specified number of entries are visible (unless +# a fully collapsed tree already exceeds this amount). So setting the number of +# entries 1 will produce a full collapsed tree by default. 0 is a special value +# representing an infinite number of entries and will result in a full expanded +# tree by default. +# Minimum value: 0, maximum value: 9999, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_INDEX_NUM_ENTRIES = 0 + +# If the GENERATE_DOCSET tag is set to YES, additional index files will be +# generated that can be used as input for Apple's Xcode 3 integrated development +# environment (see: http://developer.apple.com/tools/xcode/), introduced with +# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a +# Makefile in the HTML output directory. Running make will produce the docset in +# that directory and running make install will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at +# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html +# for more information. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_DOCSET = NO + +# This tag determines the name of the docset feed. A documentation feed provides +# an umbrella under which multiple documentation sets from a single provider +# (such as a company or product suite) can be grouped. +# The default value is: Doxygen generated docs. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# This tag specifies a string that should uniquely identify the documentation +# set bundle. This should be a reverse domain-name style string, e.g. +# com.mycompany.MyDocSet. Doxygen will append .docset to the name. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_BUNDLE_ID = org.doxygen.Project + +# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify +# the documentation publisher. This should be a reverse domain-name style +# string, e.g. com.mycompany.MyDocSet.documentation. +# The default value is: org.doxygen.Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_PUBLISHER_ID = org.doxygen.Publisher + +# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. +# The default value is: Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_PUBLISHER_NAME = Publisher + +# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three +# additional HTML index files: index.hhp, index.hhc, and index.hhk. The +# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop +# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on +# Windows. +# +# The HTML Help Workshop contains a compiler that can convert all HTML output +# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML +# files are now used as the Windows 98 help format, and will replace the old +# Windows help format (.hlp) on all Windows platforms in the future. Compressed +# HTML files also contain an index, a table of contents, and you can search for +# words in the documentation. The HTML workshop also contains a viewer for +# compressed HTML files. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_HTMLHELP = NO + +# The CHM_FILE tag can be used to specify the file name of the resulting .chm +# file. You can add a path in front of the file if the result should not be +# written to the html output directory. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +CHM_FILE = + +# The HHC_LOCATION tag can be used to specify the location (absolute path +# including file name) of the HTML help compiler ( hhc.exe). If non-empty +# doxygen will try to run the HTML help compiler on the generated index.hhp. +# The file has to be specified with full path. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +HHC_LOCATION = + +# The GENERATE_CHI flag controls if a separate .chi index file is generated ( +# YES) or that it should be included in the master .chm file ( NO). +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +GENERATE_CHI = NO + +# The CHM_INDEX_ENCODING is used to encode HtmlHelp index ( hhk), content ( hhc) +# and project file content. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +CHM_INDEX_ENCODING = + +# The BINARY_TOC flag controls whether a binary table of contents is generated ( +# YES) or a normal table of contents ( NO) in the .chm file. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members to +# the table of contents of the HTML help documentation and to the tree view. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +TOC_EXPAND = YES + +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and +# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that +# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help +# (.qch) of the generated HTML documentation. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify +# the file name of the resulting .qch file. The path specified is relative to +# the HTML output folder. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help +# Project output. For more information please see Qt Help Project / Namespace +# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace). +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_NAMESPACE = org.doxygen.Project + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt +# Help Project output. For more information please see Qt Help Project / Virtual +# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual- +# folders). +# The default value is: doc. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_VIRTUAL_FOLDER = doc + +# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom +# filter to add. For more information please see Qt Help Project / Custom +# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- +# filters). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the +# custom filter to add. For more information please see Qt Help Project / Custom +# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- +# filters). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this +# project's filter section matches. Qt Help Project / Filter Attributes (see: +# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_SECT_FILTER_ATTRS = + +# The QHG_LOCATION tag can be used to specify the location of Qt's +# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the +# generated .qhp file. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHG_LOCATION = + +# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be +# generated, together with the HTML files, they form an Eclipse help plugin. To +# install this plugin and make it available under the help contents menu in +# Eclipse, the contents of the directory containing the HTML and XML files needs +# to be copied into the plugins directory of eclipse. The name of the directory +# within the plugins directory should be the same as the ECLIPSE_DOC_ID value. +# After copying Eclipse needs to be restarted before the help appears. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_ECLIPSEHELP = NO + +# A unique identifier for the Eclipse help plugin. When installing the plugin +# the directory name containing the HTML and XML files should also have this +# name. Each documentation set should have its own identifier. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. + +ECLIPSE_DOC_ID = org.doxygen.Project + +# If you want full control over the layout of the generated HTML pages it might +# be necessary to disable the index and replace it with your own. The +# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top +# of each HTML page. A value of NO enables the index and the value YES disables +# it. Since the tabs in the index contain the same information as the navigation +# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +DISABLE_INDEX = NO + +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. If the tag +# value is set to YES, a side panel will be generated containing a tree-like +# index structure (just like the one that is generated for HTML Help). For this +# to work a browser that supports JavaScript, DHTML, CSS and frames is required +# (i.e. any modern browser). Windows users are probably better off using the +# HTML help feature. Via custom stylesheets (see HTML_EXTRA_STYLESHEET) one can +# further fine-tune the look of the index. As an example, the default style +# sheet generated by doxygen has an example that shows how to put an image at +# the root of the tree instead of the PROJECT_NAME. Since the tree basically has +# the same information as the tab index, you could consider setting +# DISABLE_INDEX to YES when enabling this option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_TREEVIEW = NO + +# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that +# doxygen will group on one line in the generated HTML documentation. +# +# Note that a value of 0 will completely suppress the enum values from appearing +# in the overview section. +# Minimum value: 0, maximum value: 20, default value: 4. +# This tag requires that the tag GENERATE_HTML is set to YES. + +ENUM_VALUES_PER_LINE = 1 + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used +# to set the initial width (in pixels) of the frame in which the tree is shown. +# Minimum value: 0, maximum value: 1500, default value: 250. +# This tag requires that the tag GENERATE_HTML is set to YES. + +TREEVIEW_WIDTH = 250 + +# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open links to +# external symbols imported via tag files in a separate window. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +EXT_LINKS_IN_WINDOW = NO + +# Use this tag to change the font size of LaTeX formulas included as images in +# the HTML documentation. When you change the font size after a successful +# doxygen run you need to manually remove any form_*.png images from the HTML +# output directory to force them to be regenerated. +# Minimum value: 8, maximum value: 50, default value: 10. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FORMULA_FONTSIZE = 10 + +# Use the FORMULA_TRANPARENT tag to determine whether or not the images +# generated for formulas are transparent PNGs. Transparent PNGs are not +# supported properly for IE 6.0, but are supported on all modern browsers. +# +# Note that when changing this option you need to delete any form_*.png files in +# the HTML output directory before the changes have effect. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FORMULA_TRANSPARENT = YES + +# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see +# http://www.mathjax.org) which uses client side Javascript for the rendering +# instead of using prerendered bitmaps. Use this if you do not have LaTeX +# installed or if you want to formulas look prettier in the HTML output. When +# enabled you may also need to install MathJax separately and configure the path +# to it using the MATHJAX_RELPATH option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +USE_MATHJAX = NO + +# When MathJax is enabled you can set the default output format to be used for +# the MathJax output. See the MathJax site (see: +# http://docs.mathjax.org/en/latest/output.html) for more details. +# Possible values are: HTML-CSS (which is slower, but has the best +# compatibility), NativeMML (i.e. MathML) and SVG. +# The default value is: HTML-CSS. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_FORMAT = HTML-CSS + +# When MathJax is enabled you need to specify the location relative to the HTML +# output directory using the MATHJAX_RELPATH option. The destination directory +# should contain the MathJax.js script. For instance, if the mathjax directory +# is located at the same level as the HTML output directory, then +# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax +# Content Delivery Network so you can quickly see the result without installing +# MathJax. However, it is strongly recommended to install a local copy of +# MathJax from http://www.mathjax.org before deployment. +# The default value is: http://cdn.mathjax.org/mathjax/latest. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest + +# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax +# extension names that should be enabled during MathJax rendering. For example +# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_EXTENSIONS = + +# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces +# of code that will be used on startup of the MathJax code. See the MathJax site +# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an +# example see the documentation. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_CODEFILE = + +# When the SEARCHENGINE tag is enabled doxygen will generate a search box for +# the HTML output. The underlying search engine uses javascript and DHTML and +# should work on any modern browser. Note that when using HTML help +# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) +# there is already a search function so this one should typically be disabled. +# For large projects the javascript based search engine can be slow, then +# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to +# search using the keyboard; to jump to the search box use + S +# (what the is depends on the OS and browser, but it is typically +# , / +
+
+
Downloads
+
+
+

You can retrieve the source to ENet by downloading it in either .tar.gz form or accessing the github distribution directly.

+

The most recent stable release (1.3.13) can be downloaded here. The last release that is protocol compatible with the 1.2 series or earlier (1.2.5) can be downloaded here.

+

You can find the most recent ENet source at the github repository.

+
+ + + + diff --git a/enet server test/enet2/docs/html/FAQ.html b/enet server test/enet2/docs/html/FAQ.html new file mode 100644 index 0000000..ed19d26 --- /dev/null +++ b/enet server test/enet2/docs/html/FAQ.html @@ -0,0 +1,103 @@ + + + + + + +ENet: Frequently Answered Questions + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + + + + + +
+ +
+ +
+
+
+
Frequently Answered Questions
+
+
+

+Is ENet thread-safe?

+

ENet does not use any significant global variables, the vast majority of state is encapsulated in the ENetHost structure. As such, as long as the application guards access to this structure, then ENet should operate fine in a multi-threaded environment.

+

+Isn't ENet just re-inventing TCP?! What's the point?

+

In a perfect world, that would be true. But as many have found, using TCP either in lieu of or in conjunction with UDP can lead to all kinds of nightmares. TCP is a good, solid protocol, however it simply isn't up to the task of real-time games. Too much of TCP's implementation dictates a policy that isn't practical for games. If you want to use TCP, then do so – this library is for people that either don't want to use TCP or have tried and ended up being discouraged with the performance.

+
+ + + + diff --git a/enet server test/enet2/docs/html/FAQ_8dox.html b/enet server test/enet2/docs/html/FAQ_8dox.html new file mode 100644 index 0000000..7ed4412 --- /dev/null +++ b/enet server test/enet2/docs/html/FAQ_8dox.html @@ -0,0 +1,105 @@ + + + + + + +ENet: docs/FAQ.dox File Reference + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + + + + + + +
+ +
+ +
+
+
+
docs/FAQ.dox File Reference
+
+
+
+ + + + diff --git a/enet server test/enet2/docs/html/Features.html b/enet server test/enet2/docs/html/Features.html new file mode 100644 index 0000000..a79160d --- /dev/null +++ b/enet server test/enet2/docs/html/Features.html @@ -0,0 +1,131 @@ + + + + + + +ENet: Features and Architecture + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + + + + + +
+ +
+ +
+
+
+
Features and Architecture
+
+
+

ENet evolved specifically as a UDP networking layer for the multiplayer first person shooter Cube.

+

Cube necessitated low latency communication with data sent out very frequently, so TCP was an unsuitable choice due to its high latency and stream orientation. UDP, however, lacks many sometimes necessary features from TCP such as reliability, sequencing, unrestricted packet sizes, and connection management. So UDP by itself was not suitable as a network protocol either. No suitable freely available networking libraries existed at the time of ENet's creation to fill this niche.

+

UDP and TCP could have been used together in Cube to benefit somewhat from both of their features, however, the resulting combinations of protocols still leaves much to be desired. TCP lacks multiple streams of communication without resorting to opening many sockets and complicates delineation of packets due to its buffering behavior. UDP lacks sequencing, connection management, management of bandwidth resources, and imposes limitations on the size of packets. A significant investment is required to integrate these two protocols, and the end result is worse off in features and performance than the uniform protocol presented by ENet.

+

ENet thus attempts to address these issues and provide a single, uniform protocol layered over UDP to the developer with the best features of UDP and TCP as well as some useful features neither provide, with a much cleaner integration than any resulting from a mixture of UDP and TCP.

+

+Connection Management

+

ENet provides a simple connection interface over which to communicate with a foreign host. The liveness of the connection is actively monitored by pinging the foreign host at frequent intervals, and also monitors the network conditions from the local host to the foreign host such as the mean round trip time and packet loss in this fashion.

+

+Sequencing

+

Rather than a single byte stream that complicates the delineation of packets, ENet presents connections as multiple, properly sequenced packet streams that simplify the transfer of various types of data.

+

ENet provides sequencing for all packets by assigning to each sent packet a sequence number that is incremented as packets are sent. ENet guarantees that no packet with a higher sequence number will be delivered before a packet with a lower sequence number, thus ensuring packets are delivered exactly in the order they are sent.

+

For unreliable packets, ENet will simply discard the lower sequence number packet if a packet with a higher sequence number has already been delivered. This allows the packets to be dispatched immediately as they arrive, and reduce latency of unreliable packets to an absolute minimum. For reliable packets, if a higher sequence number packet arrives, but the preceding packets in the sequence have not yet arrived, ENet will stall delivery of the higher sequence number packets until its predecessors have arrived.

+

+Channels

+

Since ENet will stall delivery of reliable packets to ensure proper sequencing, and consequently any packets of higher sequence number whether reliable or unreliable, in the event the reliable packet's predecessors have not yet arrived, this can introduce latency into the delivery of other packets which may not need to be as strictly ordered with respect to the packet that stalled their delivery.

+

To combat this latency and reduce the ordering restrictions on packets, ENet provides multiple channels of communication over a given connection. Each channel is independently sequenced, and so the delivery status of a packet in one channel will not stall the delivery of other packets in another channel.

+

+Reliability

+

ENet provides optional reliability of packet delivery by ensuring the foreign host acknowledges receipt of all reliable packets. ENet will attempt to resend the packet up to a reasonable amount of times, if no acknowledgement of the packet's receipt happens within a specified timeout. Retry timeouts are progressive and become more lenient with every failed attempt to allow for temporary turbulence in network conditions.

+

+Fragmentation and Reassembly

+

ENet will send and deliver packets regardless of size. Large packets are fragmented into many smaller packets of suitable size, and reassembled on the foreign host to recover the original packet for delivery. The process is entirely transparent to the developer.

+

+Aggregation

+

ENet aggregates all protocol commands, including acknowledgements and packet transfer, into larger protocol packets to ensure the proper utilization of the connection and to limit the opportunities for packet loss that might otherwise result in further delivery latency.

+

+Adaptability

+

ENet provides an in-flight data window for reliable packets to ensure connections are not overwhelmed by volumes of packets. It also provides a static bandwidth allocation mechanism to ensure the total volume of packets sent and received to a host don't exceed the host's capabilities. Further, ENet also provides a dynamic throttle that responds to deviations from normal network connections to rectify various types of network congestion by further limiting the volume of packets sent.

+

+Portability

+

ENet works on Windows and any other Unix or Unix-like platform providing a BSD sockets interface. The library has a small and stable code base that can easily be extended to support other platforms and integrates easily. ENet makes no assumptions about the underlying platform's endianess or word size.

+

+Freedom

+

ENet demands no royalties and doesn't carry a viral license that would restrict you in how you might use it in your programs. ENet is licensed under a short-and-sweet MIT-style license, which gives you the freedom to do anything you want with it (well, almost anything).

+
+ + + + diff --git a/enet server test/enet2/docs/html/IRCChannel.html b/enet server test/enet2/docs/html/IRCChannel.html new file mode 100644 index 0000000..d7babc8 --- /dev/null +++ b/enet server test/enet2/docs/html/IRCChannel.html @@ -0,0 +1,98 @@ + + + + + + +ENet: IRC Channel + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + + + + + +
+ +
+ +
+
+
+
IRC Channel
+
+
+

Join the #enet channel on the freenode IRC network (irc.freenode.net) for real-time discussion about the ENet library.

+
+ + + + diff --git a/enet server test/enet2/docs/html/Installation.html b/enet server test/enet2/docs/html/Installation.html new file mode 100644 index 0000000..8525f39 --- /dev/null +++ b/enet server test/enet2/docs/html/Installation.html @@ -0,0 +1,120 @@ + + + + + + +ENet: Installation + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + + + + + +
+ +
+ +
+
+
+
Installation
+
+
+

ENet should be trivially simple to integrate with most applications.

+

First, make sure you download the latest source distribution at Downloads.

+

+Unix-like Operating Systems

+

If you are using an ENet release, then you should simply be able to build it by doing the following:

+

./configure && make && make install

+

If you obtained the package from github, you must have automake and autoconf available to generate the build system first by doing the following command before using the above mentioned build procedure:

+

autoreconf -vfi

+

+Solaris and BSD

+

When building ENet under Solaris, you must specify the -lsocket and -lnsl parameters to your compiler to ensure that the sockets library is linked in.

+

+Microsoft Windows

+

You may simply use the included "enet.lib" or "enet64.lib" static libraries. However, if you wish to build the library yourself, then the following instructions apply:

+

There is an included MSVC 6 project (enet.dsp) which you may use to build a suitable library file. Alternatively, you may simply drag all the ENet source files into your main project.

+

You will have to link to the Winsock2 libraries, so make sure to add ws2_32.lib and winmm.lib to your library list (Project Settings | Link | Object/library modules).

+

+

+

Load the included enet.dsp. MSVC may ask you to convert it if you are on a newer version of MSVC - just allow the conversion and save the resulting project as "enet" or similar. After you build this project, it will output an "enet.lib" file to either the "Debug/" or "Release/" directory, depending on which configuration you have selected to build. By default, it should produce "Debug/enet.lib".

+

You may then copy the resulting "enet.lib" file and the header files found in the "include/" directory to your other projects and add it to their library lists. Make sure to also link against "ws2_32.lib" and "winmm.lib" as described above.

+

+DLL

+

If you wish to build ENet as a DLL you must first define ENET_DLL within the project (Project Settings | C/C++ | Preprocessor | Preprocessor definitions) or, more invasively, simply define ENET_DLL at the top of enet.h.

+
+ + + + diff --git a/enet server test/enet2/docs/html/License.html b/enet server test/enet2/docs/html/License.html new file mode 100644 index 0000000..0f77095 --- /dev/null +++ b/enet server test/enet2/docs/html/License.html @@ -0,0 +1,101 @@ + + + + + + +ENet: License + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + + + + + +
+ +
+ +
+
+
+
License
+
+
+

Copyright (c) 2002-2015 Lee Salzman

+

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

+

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

+

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+
+ + + + diff --git a/enet server test/enet2/docs/html/MailingList.html b/enet server test/enet2/docs/html/MailingList.html new file mode 100644 index 0000000..dfa1a11 --- /dev/null +++ b/enet server test/enet2/docs/html/MailingList.html @@ -0,0 +1,98 @@ + + + + + + +ENet: Mailing List + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + + + + + +
+ +
+ +
+
+
+
Mailing List
+
+
+

The enet-discuss list is for discussion of ENet, including bug reports or feature requests.

+
+ + + + diff --git a/enet server test/enet2/docs/html/Tutorial.html b/enet server test/enet2/docs/html/Tutorial.html new file mode 100644 index 0000000..9f3a18d --- /dev/null +++ b/enet server test/enet2/docs/html/Tutorial.html @@ -0,0 +1,327 @@ + + + + + + +ENet: Tutorial + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + + + + + +
+ +
+ +
+
+
+
Tutorial
+
+
+

Initialization

+

Creating an ENet server

+

Creating an ENet client

+

Managing an ENet host

+

Sending a packet to an ENet peer

+

Disconnecting an ENet peer

+

Connecting to an ENet host

+

+Initialization

+

You should include the file <enet/enet.h> when using ENet. Do not include <enet.h> without the directory prefix, as this may cause file name conflicts on some systems.

+

Before using ENet, you must call enet_initialize() to initialize the library. Upon program exit, you should call enet_deinitialize() so that the library may clean up any used resources.

+
#include <enet/enet.h>
+
+
int
+
main (int argc, char ** argv)
+
{
+
if (enet_initialize () != 0)
+
{
+
fprintf (stderr, "An error occurred while initializing ENet.\n");
+
return EXIT_FAILURE;
+
}
+ +
...
+
...
+
...
+
}
+

+Creating an ENet server

+

Servers in ENet are constructed with enet_host_create(). You must specify an address on which to receive data and new connections, as well as the maximum allowable numbers of connected peers. You may optionally specify the incoming and outgoing bandwidth of the server in bytes per second so that ENet may try to statically manage bandwidth resources among connected peers in addition to its dynamic throttling algorithm; specifying 0 for these two options will cause ENet to rely entirely upon its dynamic throttling algorithm to manage bandwidth.

+

When done with a host, the host may be destroyed with enet_host_destroy(). All connected peers to the host will be reset, and the resources used by the host will be freed.

+
ENetAddress address;
+
ENetHost * server;
+
+
/* Bind the server to the default localhost. */
+
/* A specific host address can be specified by */
+
/* enet_address_set_host (& address, "x.x.x.x"); */
+
+
address.host = ENET_HOST_ANY;
+
/* Bind the server to port 1234. */
+
address.port = 1234;
+
+
server = enet_host_create (& address /* the address to bind the server host to */,
+
32 /* allow up to 32 clients and/or outgoing connections */,
+
2 /* allow up to 2 channels to be used, 0 and 1 */,
+
0 /* assume any amount of incoming bandwidth */,
+
0 /* assume any amount of outgoing bandwidth */);
+
if (server == NULL)
+
{
+
fprintf (stderr,
+
"An error occurred while trying to create an ENet server host.\n");
+
exit (EXIT_FAILURE);
+
}
+
...
+
...
+
...
+
enet_host_destroy(server);
+

+Creating an ENet client

+

Clients in ENet are similarly constructed with enet_host_create() when no address is specified to bind the host to. Bandwidth may be specified for the client host as in the above example. The peer count controls the maximum number of connections to other server hosts that may be simultaneously open.

+
ENetHost * client;
+
+
client = enet_host_create (NULL /* create a client host */,
+
1 /* only allow 1 outgoing connection */,
+
2 /* allow up 2 channels to be used, 0 and 1 */,
+
57600 / 8 /* 56K modem with 56 Kbps downstream bandwidth */,
+
14400 / 8 /* 56K modem with 14 Kbps upstream bandwidth */);
+
+
if (client == NULL)
+
{
+
fprintf (stderr,
+
"An error occurred while trying to create an ENet client host.\n");
+
exit (EXIT_FAILURE);
+
}
+
...
+
...
+
...
+
enet_host_destroy(client);
+

+Managing an ENet host

+

ENet uses a polled event model to notify the programmer of significant events. ENet hosts are polled for events with enet_host_service(), where an optional timeout value in milliseconds may be specified to control how long ENet will poll; if a timeout of 0 is specified, enet_host_service() will return immediately if there are no events to dispatch. enet_host_service() will return 1 if an event was dispatched within the specified timeout.

+

Beware that most processing of the network with the ENet stack is done inside enet_host_service(). Both hosts that make up the sides of a connection must regularly call this function to ensure packets are actually sent and received. A common symptom of not actively calling enet_host_service() on both ends is that one side receives events while the other does not. The best way to schedule this activity to ensure adequate service is, for example, to call enet_host_service() with a 0 timeout (meaning non-blocking) at the beginning of every frame in a game loop.

+

Currently there are only four types of significant events in ENet:

+

An event of type ENET_EVENT_TYPE_NONE is returned if no event occurred within the specified time limit. enet_host_service() will return 0 with this event.

+

An event of type ENET_EVENT_TYPE_CONNECT is returned when either a new client host has connected to the server host or when an attempt to establish a connection with a foreign host has succeeded. Only the "peer" field of the event structure is valid for this event and contains the newly connected peer.

+

An event of type ENET_EVENT_TYPE_RECEIVE is returned when a packet is received from a connected peer. The "peer" field contains the peer the packet was received from, "channelID" is the channel on which the packet was sent, and "packet" is the packet that was sent. The packet contained in the "packet" field must be destroyed with enet_packet_destroy() when you are done inspecting its contents.

+

An event of type ENET_EVENT_TYPE_DISCONNECT is returned when a connected peer has either explicitly disconnected or timed out. Only the "peer" field of the event structure is valid for this event and contains the peer that disconnected. Only the "data" field of the peer is still valid on a disconnect event and must be explicitly reset.

+
ENetEvent event;
+
+
/* Wait up to 1000 milliseconds for an event. */
+
while (enet_host_service (client, & event, 1000) > 0)
+
{
+
switch (event.type)
+
{
+ +
printf ("A new client connected from %x:%u.\n",
+
event.peer -> address.host,
+
event.peer -> address.port);
+
+
/* Store any relevant client information here. */
+
event.peer -> data = "Client information";
+
+
break;
+
+ +
printf ("A packet of length %u containing %s was received from %s on channel %u.\n",
+
event.packet -> dataLength,
+
event.packet -> data,
+
event.peer -> data,
+
event.channelID);
+
+
/* Clean up the packet now that we're done using it. */
+ +
+
break;
+
+ +
printf ("%s disconnected.\n", event.peer -> data);
+
+
/* Reset the peer's client information. */
+
+
event.peer -> data = NULL;
+
}
+
}
+
...
+
...
+
...
+

+Sending a packet to an ENet peer

+

Packets in ENet are created with enet_packet_create(), where the size of the packet must be specified. Optionally, initial data may be specified to copy into the packet.

+

Certain flags may also be supplied to enet_packet_create() to control various packet features:

+

ENET_PACKET_FLAG_RELIABLE specifies that the packet must use reliable delivery. A reliable packet is guaranteed to be delivered, and a number of retry attempts will be made until an acknowledgement is received from the foreign host the packet is sent to. If a certain number of retry attempts is reached without any acknowledgement, ENet will assume the peer has disconnected and forcefully reset the connection. If this flag is not specified, the packet is assumed an unreliable packet, and no retry attempts will be made nor acknowledgements generated.

+

A packet may be resized (extended or truncated) with enet_packet_resize().

+

A packet is sent to a foreign host with enet_peer_send(). enet_peer_send() accepts a channel id over which to send the packet to a given peer. Once the packet is handed over to ENet with enet_peer_send(), ENet will handle its deallocation and enet_packet_destroy() should not be used upon it.

+

One may also use enet_host_broadcast() to send a packet to all connected peers on a given host over a specified channel id, as with enet_peer_send().

+

Queued packets will be sent on a call to enet_host_service(). Alternatively, enet_host_flush() will send out queued packets without dispatching any events.

+
/* Create a reliable packet of size 7 containing "packet\0" */
+
ENetPacket * packet = enet_packet_create ("packet",
+
strlen ("packet") + 1,
+ +
+
/* Extend the packet so and append the string "foo", so it now */
+
/* contains "packetfoo\0" */
+
enet_packet_resize (packet, strlen ("packetfoo") + 1);
+
strcpy (& packet -> data [strlen ("packet")], "foo");
+
+
/* Send the packet to the peer over channel id 0. */
+
/* One could also broadcast the packet by */
+
/* enet_host_broadcast (host, 0, packet); */
+
enet_peer_send (peer, 0, packet);
+
...
+
...
+
...
+
/* One could just use enet_host_service() instead. */
+
enet_host_flush (host);
+

+Disconnecting an ENet peer

+

Peers may be gently disconnected with enet_peer_disconnect(). A disconnect request will be sent to the foreign host, and ENet will wait for an acknowledgement from the foreign host before finally disconnecting. An event of type ENET_EVENT_TYPE_DISCONNECT will be generated once the disconnection succeeds. Normally timeouts apply to the disconnect acknowledgement, and so if no acknowledgement is received after a length of time the peer will be forcefully disconnected.

+

enet_peer_reset() will forcefully disconnect a peer. The foreign host will get no notification of a disconnect and will time out on the foreign host. No event is generated.

+
ENetEvent event;
+
+ +
+
/* Allow up to 3 seconds for the disconnect to succeed
+
* and drop any packets received packets.
+
*/
+
while (enet_host_service (client, & event, 3000) > 0)
+
{
+
switch (event.type)
+
{
+ + +
break;
+
+ +
puts ("Disconnection succeeded.");
+
return;
+
...
+
...
+
...
+
}
+
}
+
+
/* We've arrived here, so the disconnect attempt didn't */
+
/* succeed yet. Force the connection down. */
+ +
...
+
...
+
...
+

+Connecting to an ENet host

+

A connection to a foreign host is initiated with enet_host_connect(). It accepts the address of a foreign host to connect to, and the number of channels that should be allocated for communication. If N channels are allocated for use, their channel ids will be numbered 0 through N-1. A peer representing the connection attempt is returned, or NULL if there were no available peers over which to initiate the connection. When the connection attempt succeeds, an event of type ENET_EVENT_TYPE_CONNECT will be generated. If the connection attempt times out or otherwise fails, an event of type ENET_EVENT_TYPE_DISCONNECT will be generated.

+
ENetAddress address;
+
ENetEvent event;
+
ENetPeer *peer;
+
+
/* Connect to some.server.net:1234. */
+
enet_address_set_host (& address, "some.server.net");
+
address.port = 1234;
+
+
/* Initiate the connection, allocating the two channels 0 and 1. */
+
peer = enet_host_connect (client, & address, 2, 0);
+
+
if (peer == NULL)
+
{
+
fprintf (stderr,
+
"No available peers for initiating an ENet connection.\n");
+
exit (EXIT_FAILURE);
+
}
+
+
/* Wait up to 5 seconds for the connection attempt to succeed. */
+
if (enet_host_service (client, & event, 5000) > 0 &&
+ +
{
+
puts ("Connection to some.server.net:1234 succeeded.");
+
...
+
...
+
...
+
}
+
else
+
{
+
/* Either the 5 seconds are up or a disconnect event was */
+
/* received. Reset the peer in the event the 5 seconds */
+
/* had run out without any significant event. */
+ +
+
puts ("Connection to some.server.net:1234 failed.");
+
}
+
...
+
...
+
...
+
+ + + + diff --git a/enet server test/enet2/docs/html/annotated.html b/enet server test/enet2/docs/html/annotated.html new file mode 100644 index 0000000..e608429 --- /dev/null +++ b/enet server test/enet2/docs/html/annotated.html @@ -0,0 +1,137 @@ + + + + + + +ENet: Data Structures + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + + +
+ + + + +
+ +
+ +
+
+
Data Structures
+
+
+
Here are the data structures with brief descriptions:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 CENetAcknowledgement
 CENetAddressPortable internet address structure
 CENetBuffer
 CENetCallbacks
 CENetChannel
 CENetCompressorAn ENet packet compressor for compressing UDP packets before socket sends or receives
 CENetEventAn ENet event as returned by enet_host_service()
 CENetHostAn ENet host for communicating with peers
 CENetIncomingCommand
 CENetList
 CENetListNode
 CENetOutgoingCommand
 CENetPacketENet packet structure
 CENetPeerAn ENet peer which data packets may be sent or received from
 CENetProtocol
 CENetProtocolAcknowledge
 CENetProtocolBandwidthLimit
 CENetProtocolCommandHeader
 CENetProtocolConnect
 CENetProtocolDisconnect
 CENetProtocolHeader
 CENetProtocolPing
 CENetProtocolSendFragment
 CENetProtocolSendReliable
 CENetProtocolSendUnreliable
 CENetProtocolSendUnsequenced
 CENetProtocolThrottleConfigure
 CENetProtocolVerifyConnect
+
+
+ + + + diff --git a/enet server test/enet2/docs/html/bc_s.png b/enet server test/enet2/docs/html/bc_s.png new file mode 100644 index 0000000000000000000000000000000000000000..a2a4e344807b0cac7ff9b6fec17f292fe161dff2 GIT binary patch literal 642 zcmV-|0)737P)Nklf%;VuR6Kd{q*ujb zp;9P#(o+;HRI3y$SOg`|L%WITB^rqrK@gl5vP*XHUl``c+Zl$Ld2eR#WXGjUD{{CW zP!bzuwE+MIC7FxqIscHDu}k)a&9eFk01QgDUl`nDby#1>qrpFD$2MQ7e+>cYb18a$ z2#y5Y)?Vvf^>y`ScYvjHK5cEZ?s&7_Yxr#lAcJR<^t2I%R6}Dj%UGDA`lk9-4@jM9 z2T*z7R)iz2aPNw`Si7#LNS;ZkI?* z#kvEEHkWPQpBI0Bds|oj7eM7x-)_mpa+a(0<$9UKC!+vh(30J6zal7ty7hi*ibRhM z0DwVz7?#wfg2XTuvWrBIMgRcJJmd%XBF<-tbS4P^2A$-1+YL|3U1Nnf4*+219zIxv z<=A(me>@BT2IYZ3RT}oUcLc%*LuO|11=k8Uhn`cLgvNpZV9?K=w8x3*FE`d2iy-e0 zbTf)g*YeZ3b&o{p zKc49eBNf`$p;8eNLJvOg`DW$kvfi?PSfq?&`YP71bZi|E^CD#)hqj9MpXt~-Anx>u z_~W#arxFwo+SI25xMH_M2jq{+iTJFT^MM)gWxeZ|z7{_o8}VhmV1{)Boh8o2HSx!} c4*+21AFMf;0OP}C82|tP07*qoM6N<$f^gp`zyJUM literal 0 HcmV?d00001 diff --git a/enet server test/enet2/docs/html/bdwn.png b/enet server test/enet2/docs/html/bdwn.png new file mode 100644 index 0000000000000000000000000000000000000000..274b008ef1c870a105d8a0c0cf525ee22ea3a138 GIT binary patch literal 144 zcmeAS@N?(olHy`uVBq!ia0vp^>_E)H!3HEvS)PKZa8DP^lyy7HvD}C^Vxn);J-PNv!JS-YDJ!)|aj3ZOvoc_d)(yxZnZjeR|FMBC@*@-$_s0 rG(9?9W#aNk+2ys?i(1zuH16T + + + + + +ENet: callbacks.c File Reference + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + + + + + + +
+ +
+ +
+
+ +
+
callbacks.c File Reference
+
+
+ +

ENet callback functions. +More...

+
#include "enet/enet.h"
+
+ + + +

+Macros

#define ENET_BUILDING_LIB   1
 
+ + + + + + + + + + + +

+Functions

void enet_free (void *memory)
 
int enet_initialize_with_callbacks (ENetVersion version, const ENetCallbacks *inits)
 Initializes ENet globally and supplies user-overridden callbacks. More...
 
ENetVersion enet_linked_version (void)
 Gives the linked version of the ENet library. More...
 
void * enet_malloc (size_t size)
 
+

Detailed Description

+

ENet callback functions.

+

Macro Definition Documentation

+ +
+
+ + + + +
#define ENET_BUILDING_LIB   1
+
+ +
+
+
+ + + + diff --git a/enet server test/enet2/docs/html/callbacks_8h.html b/enet server test/enet2/docs/html/callbacks_8h.html new file mode 100644 index 0000000..8385f57 --- /dev/null +++ b/enet server test/enet2/docs/html/callbacks_8h.html @@ -0,0 +1,131 @@ + + + + + + +ENet: include/enet/callbacks.h File Reference + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
callbacks.h File Reference
+
+
+ +

ENet callbacks. +More...

+
#include <stdlib.h>
+
+ + + +

+Data Structures

struct  ENetCallbacks
 
+ + + + + +

+Functions

void enet_free (void *)
 
void * enet_malloc (size_t)
 
+

Detailed Description

+

ENet callbacks.

+
+ + + + diff --git a/enet server test/enet2/docs/html/closed.png b/enet server test/enet2/docs/html/closed.png new file mode 100644 index 0000000000000000000000000000000000000000..7fdcfcb4a5c91cae30201f9889602c15f2578c2f GIT binary patch literal 134 zcmeAS@N?(olHy`uVBq!ia0vp^oFL4>1|%O$WD@{VzMd|QAr*{o?;hlBFyL{%7~a-6 zamK`n36cR51$;$Qn@`w1RsY5zu;=aT-UX~_=M$VSaLhUW_1$Iv&yGJ=zA^FZ*IBq; inC1Hp9ijb34;XzfiC8)KeyRi-%;4$j=d#Wzp$Pz~iZ84H literal 0 HcmV?d00001 diff --git a/enet server test/enet2/docs/html/compress_8c.html b/enet server test/enet2/docs/html/compress_8c.html new file mode 100644 index 0000000..4945bd0 --- /dev/null +++ b/enet server test/enet2/docs/html/compress_8c.html @@ -0,0 +1,1007 @@ + + + + + + +ENet: compress.c File Reference + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + + + + + + +
+ +
+ +
+
+ +
+
compress.c File Reference
+
+
+ +

An adaptive order-2 PPM range coder. +More...

+
#include <string.h>
+#include "enet/enet.h"
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Macros

#define ENET_BUILDING_LIB   1
 
#define ENET_CONTEXT_CREATE(context, escapes_, minimum)
 
#define ENET_CONTEXT_DECODE(context, symbol_, code, value_, under_, count_, update, minimum, createRoot, visitNode, createRight, createLeft)
 
#define ENET_CONTEXT_ENCODE(context, symbol_, value_, under_, count_, update, minimum)
 
#define ENET_CONTEXT_NOT_EXCLUDED(value_, after, before)
 
#define ENET_CONTEXT_RESCALE(context, minimum)
 
#define ENET_CONTEXT_ROOT_DECODE(context, symbol_, code, value_, under_, count_, update, minimum, exclude)
 
#define ENET_CONTEXT_TRY_DECODE(context, symbol_, code, value_, under_, count_, update, minimum, exclude)   ENET_CONTEXT_DECODE (context, symbol_, code, value_, under_, count_, update, minimum, return 0, exclude (node -> value, after, before), return 0, return 0)
 
#define ENET_RANGE_CODER_DECODE(under, count, total)
 
#define ENET_RANGE_CODER_ENCODE(under, count, total)
 
#define ENET_RANGE_CODER_FLUSH
 
#define ENET_RANGE_CODER_FREE_SYMBOLS
 
#define ENET_RANGE_CODER_OUTPUT(value)
 
#define ENET_RANGE_CODER_READ(total)   ((decodeCode - decodeLow) / (decodeRange /= (total)))
 
#define ENET_RANGE_CODER_SEED
 
#define ENET_SYMBOL_CREATE(symbol, value_, count_)
 
+ + + +

+Enumerations

enum  {
+  ENET_RANGE_CODER_TOP = 1<<24, +
+  ENET_RANGE_CODER_BOTTOM = 1<<16, +
+  ENET_CONTEXT_SYMBOL_DELTA = 3, +
+  ENET_CONTEXT_SYMBOL_MINIMUM = 1, +
+  ENET_CONTEXT_ESCAPE_MINIMUM = 1, +
+  ENET_SUBCONTEXT_ORDER = 2, +
+  ENET_SUBCONTEXT_SYMBOL_DELTA = 2, +
+  ENET_SUBCONTEXT_ESCAPE_DELTA = 5 +
+ }
 
+ + + + + + + + + + + + +

+Functions

int enet_host_compress_with_range_coder (ENetHost *host)
 Sets the packet compressor the host should use to the default range coder. More...
 
size_t enet_range_coder_compress (void *context, const ENetBuffer *inBuffers, size_t inBufferCount, size_t inLimit, enet_uint8 *outData, size_t outLimit)
 
void * enet_range_coder_create (void)
 
size_t enet_range_coder_decompress (void *context, const enet_uint8 *inData, size_t inLimit, enet_uint8 *outData, size_t outLimit)
 
void enet_range_coder_destroy (void *context)
 
+

Detailed Description

+

An adaptive order-2 PPM range coder.

+

Macro Definition Documentation

+ +
+
+ + + + +
#define ENET_BUILDING_LIB   1
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
#define ENET_CONTEXT_CREATE( context,
 escapes_,
 minimum 
)
+
+Value:
{ \
+
ENET_SYMBOL_CREATE (context, 0, 0); \
+
(context) -> escapes = escapes_; \
+
(context) -> total = escapes_ + 256*minimum; \
+
(context) -> symbols = 0; \
+
}
+
#define ENET_SYMBOL_CREATE(symbol, value_, count_)
Definition: compress.c:68
+
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#define ENET_CONTEXT_DECODE( context,
 symbol_,
 code,
 value_,
 under_,
 count_,
 update,
 minimum,
 createRoot,
 visitNode,
 createRight,
 createLeft 
)
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#define ENET_CONTEXT_ENCODE( context,
 symbol_,
 value_,
 under_,
 count_,
 update,
 minimum 
)
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
#define ENET_CONTEXT_NOT_EXCLUDED( value_,
 after,
 before 
)
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
#define ENET_CONTEXT_RESCALE( context,
 minimum 
)
+
+Value:
{ \
+
(context) -> total = (context) -> symbols ? enet_symbol_rescale ((context) + (context) -> symbols) : 0; \
+
(context) -> escapes -= (context) -> escapes >> 1; \
+
(context) -> total += (context) -> escapes + 256*minimum; \
+
}
+
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#define ENET_CONTEXT_ROOT_DECODE( context,
 symbol_,
 code,
 value_,
 under_,
 count_,
 update,
 minimum,
 exclude 
)
+
+Value:
ENET_CONTEXT_DECODE (context, symbol_, code, value_, under_, count_, update, minimum, \
+
{ \
+
value_ = code / minimum; \
+
under_ = code - code%minimum; \
+
ENET_SYMBOL_CREATE (symbol_, value_, update); \
+
(context) -> symbols = symbol_ - (context); \
+
}, \
+
exclude (node -> value, after, before), \
+
{ \
+
value_ = node->value + 1 + (code - after)/minimum; \
+
under_ = code - (code - after)%minimum; \
+
ENET_SYMBOL_CREATE (symbol_, value_, update); \
+
node -> right = symbol_ - node; \
+
}, \
+
{ \
+
value_ = node->value - 1 - (after - before - code - 1)/minimum; \
+
under_ = code - (after - before - code - 1)%minimum; \
+
ENET_SYMBOL_CREATE (symbol_, value_, update); \
+
node -> left = symbol_ - node; \
+
}) \
+
#define ENET_SYMBOL_CREATE(symbol, value_, count_)
Definition: compress.c:68
+
#define ENET_CONTEXT_DECODE(context, symbol_, code, value_, under_, count_, update, minimum, createRoot, visitNode, createRight, createLeft)
Definition: compress.c:373
+
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#define ENET_CONTEXT_TRY_DECODE( context,
 symbol_,
 code,
 value_,
 under_,
 count_,
 update,
 minimum,
 exclude 
)   ENET_CONTEXT_DECODE (context, symbol_, code, value_, under_, count_, update, minimum, return 0, exclude (node -> value, after, before), return 0, return 0)
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
#define ENET_RANGE_CODER_DECODE( under,
 count,
 total 
)
+
+Value:
{ \
+
decodeLow += (under) * decodeRange; \
+
decodeRange *= (count); \
+
for (;;) \
+
{ \
+
if((decodeLow ^ (decodeLow + decodeRange)) >= ENET_RANGE_CODER_TOP) \
+
{ \
+
if(decodeRange >= ENET_RANGE_CODER_BOTTOM) break; \
+
decodeRange = -decodeLow & (ENET_RANGE_CODER_BOTTOM - 1); \
+
} \
+
decodeCode <<= 8; \
+
if (inData < inEnd) \
+
decodeCode |= * inData ++; \
+
decodeRange <<= 8; \
+
decodeLow <<= 8; \
+
} \
+
}
+
Definition: compress.c:28
+
Definition: compress.c:27
+
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
#define ENET_RANGE_CODER_ENCODE( under,
 count,
 total 
)
+
+Value:
{ \
+
encodeRange /= (total); \
+
encodeLow += (under) * encodeRange; \
+
encodeRange *= (count); \
+
for (;;) \
+
{ \
+
if((encodeLow ^ (encodeLow + encodeRange)) >= ENET_RANGE_CODER_TOP) \
+
{ \
+
if(encodeRange >= ENET_RANGE_CODER_BOTTOM) break; \
+
encodeRange = -encodeLow & (ENET_RANGE_CODER_BOTTOM - 1); \
+
} \
+
ENET_RANGE_CODER_OUTPUT (encodeLow >> 24); \
+
encodeRange <<= 8; \
+
encodeLow <<= 8; \
+
} \
+
}
+
Definition: compress.c:28
+
Definition: compress.c:27
+
#define ENET_RANGE_CODER_OUTPUT(value)
Definition: compress.c:114
+
+
+
+ +
+
+ + + + +
#define ENET_RANGE_CODER_FLUSH
+
+Value:
{ \
+
while (encodeLow) \
+
{ \
+
ENET_RANGE_CODER_OUTPUT (encodeLow >> 24); \
+
encodeLow <<= 8; \
+
} \
+
}
+
#define ENET_RANGE_CODER_OUTPUT(value)
Definition: compress.c:114
+
+
+
+ +
+
+ + + + +
#define ENET_RANGE_CODER_FREE_SYMBOLS
+
+Value:
{ \
+
if (nextSymbol >= sizeof (rangeCoder -> symbols) / sizeof (ENetSymbol) - ENET_SUBCONTEXT_ORDER ) \
+
{ \
+
nextSymbol = 0; \
+ +
predicted = 0; \
+
order = 0; \
+
} \
+
}
+
#define ENET_CONTEXT_CREATE(context, escapes_, minimum)
Definition: compress.c:82
+
Definition: compress.c:31
+
Definition: compress.c:34
+
Definition: compress.c:32
+
+
+
+ +
+
+ + + + + + + + +
#define ENET_RANGE_CODER_OUTPUT( value)
+
+Value:
{ \
+
if (outData >= outEnd) \
+
return 0; \
+
* outData ++ = value; \
+
}
+
+
+
+ +
+
+ + + + + + + + +
#define ENET_RANGE_CODER_READ( total)   ((decodeCode - decodeLow) / (decodeRange /= (total)))
+
+ +
+
+ +
+
+ + + + +
#define ENET_RANGE_CODER_SEED
+
+Value:
{ \
+
if (inData < inEnd) decodeCode |= * inData ++ << 24; \
+
if (inData < inEnd) decodeCode |= * inData ++ << 16; \
+
if (inData < inEnd) decodeCode |= * inData ++ << 8; \
+
if (inData < inEnd) decodeCode |= * inData ++; \
+
}
+
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
#define ENET_SYMBOL_CREATE( symbol,
 value_,
 count_ 
)
+
+Value:
{ \
+
symbol = & rangeCoder -> symbols [nextSymbol ++]; \
+
symbol -> value = value_; \
+
symbol -> count = count_; \
+
symbol -> under = count_; \
+
symbol -> left = 0; \
+
symbol -> right = 0; \
+
symbol -> symbols = 0; \
+
symbol -> escapes = 0; \
+
symbol -> total = 0; \
+
symbol -> parent = 0; \
+
}
+
+
+
+

Enumeration Type Documentation

+ +
+
+ + + + +
anonymous enum
+
+ + + + + + + + + +
Enumerator
ENET_RANGE_CODER_TOP  +
ENET_RANGE_CODER_BOTTOM  +
ENET_CONTEXT_SYMBOL_DELTA  +
ENET_CONTEXT_SYMBOL_MINIMUM  +
ENET_CONTEXT_ESCAPE_MINIMUM  +
ENET_SUBCONTEXT_ORDER  +
ENET_SUBCONTEXT_SYMBOL_DELTA  +
ENET_SUBCONTEXT_ESCAPE_DELTA  +
+ +
+
+

Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
size_t enet_range_coder_compress (void * context,
const ENetBufferinBuffers,
size_t inBufferCount,
size_t inLimit,
enet_uint8outData,
size_t outLimit 
)
+
+ +
+
+ +
+
+ + + + + + + + +
void* enet_range_coder_create (void )
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
size_t enet_range_coder_decompress (void * context,
const enet_uint8inData,
size_t inLimit,
enet_uint8outData,
size_t outLimit 
)
+
+ +
+
+ +
+
+ + + + + + + + +
void enet_range_coder_destroy (void * context)
+
+ +
+
+
+ + + + diff --git a/enet server test/enet2/docs/html/design_8dox.html b/enet server test/enet2/docs/html/design_8dox.html new file mode 100644 index 0000000..418437f --- /dev/null +++ b/enet server test/enet2/docs/html/design_8dox.html @@ -0,0 +1,105 @@ + + + + + + +ENet: docs/design.dox File Reference + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + + + + + + +
+ +
+ +
+
+
+
docs/design.dox File Reference
+
+
+
+ + + + diff --git a/enet server test/enet2/docs/html/dir_d44c64559bbebec7f509842c48db8b23.html b/enet server test/enet2/docs/html/dir_d44c64559bbebec7f509842c48db8b23.html new file mode 100644 index 0000000..b58a610 --- /dev/null +++ b/enet server test/enet2/docs/html/dir_d44c64559bbebec7f509842c48db8b23.html @@ -0,0 +1,107 @@ + + + + + + +ENet: include Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + + + + + +
+ +
+ + +
+
+
+
include Directory Reference
+
+
+ + + + +

+Directories

directory  enet
 
+
+ + + + diff --git a/enet server test/enet2/docs/html/dir_fd6c3a2b8754f03ff2a62b53108cf6e2.html b/enet server test/enet2/docs/html/dir_fd6c3a2b8754f03ff2a62b53108cf6e2.html new file mode 100644 index 0000000..89ff9d0 --- /dev/null +++ b/enet server test/enet2/docs/html/dir_fd6c3a2b8754f03ff2a62b53108cf6e2.html @@ -0,0 +1,132 @@ + + + + + + +ENet: include/enet Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + + + + + +
+ +
+ + +
+
+
+
enet Directory Reference
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Files

file  callbacks.h
 ENet callbacks.
 
file  enet.h
 ENet public header file.
 
file  list.h
 ENet list management.
 
file  protocol.h
 ENet protocol.
 
file  time.h
 ENet time constants and macros.
 
file  types.h
 type definitions for ENet
 
file  unix.h
 ENet Unix header.
 
file  utility.h
 ENet utility header.
 
file  win32.h
 ENet Win32 header.
 
+
+ + + + diff --git a/enet server test/enet2/docs/html/doxygen.css b/enet server test/enet2/docs/html/doxygen.css new file mode 100644 index 0000000..3cb10b3 --- /dev/null +++ b/enet server test/enet2/docs/html/doxygen.css @@ -0,0 +1,1440 @@ +/* The standard CSS for doxygen 1.8.8 */ + +body, table, div, p, dl { + font: 400 14px/22px Roboto,sans-serif; +} + +/* @group Heading Levels */ + +h1.groupheader { + font-size: 150%; +} + +.title { + font: 400 14px/28px Roboto,sans-serif; + font-size: 150%; + font-weight: bold; + margin: 10px 2px; +} + +h2.groupheader { + border-bottom: 1px solid #2F682D; + color: #060E06; + font-size: 150%; + font-weight: normal; + margin-top: 1.75em; + padding-top: 8px; + padding-bottom: 4px; + width: 100%; +} + +h3.groupheader { + font-size: 100%; +} + +h1, h2, h3, h4, h5, h6 { + -webkit-transition: text-shadow 0.5s linear; + -moz-transition: text-shadow 0.5s linear; + -ms-transition: text-shadow 0.5s linear; + -o-transition: text-shadow 0.5s linear; + transition: text-shadow 0.5s linear; + margin-right: 15px; +} + +h1.glow, h2.glow, h3.glow, h4.glow, h5.glow, h6.glow { + text-shadow: 0 0 15px cyan; +} + +dt { + font-weight: bold; +} + +div.multicol { + -moz-column-gap: 1em; + -webkit-column-gap: 1em; + -moz-column-count: 3; + -webkit-column-count: 3; +} + +p.startli, p.startdd { + margin-top: 2px; +} + +p.starttd { + margin-top: 0px; +} + +p.endli { + margin-bottom: 0px; +} + +p.enddd { + margin-bottom: 4px; +} + +p.endtd { + margin-bottom: 2px; +} + +/* @end */ + +caption { + font-weight: bold; +} + +span.legend { + font-size: 70%; + text-align: center; +} + +h3.version { + font-size: 90%; + text-align: center; +} + +div.qindex, div.navtab{ + background-color: #C9E7C8; + border: 1px solid #42913F; + text-align: center; +} + +div.qindex, div.navpath { + width: 100%; + line-height: 140%; +} + +div.navtab { + margin-right: 15px; +} + +/* @group Link Styling */ + +a { + color: #0A1509; + font-weight: normal; + text-decoration: none; +} + +.contents a:visited { + color: #0F220E; +} + +a:hover { + text-decoration: underline; +} + +a.qindex { + font-weight: bold; +} + +a.qindexHL { + font-weight: bold; + background-color: #3D863A; + color: #ffffff; + border: 1px double #2E662C; +} + +.contents a.qindexHL:visited { + color: #ffffff; +} + +a.el { + font-weight: bold; +} + +a.elRef { +} + +a.code, a.code:visited, a.line, a.line:visited { + color: #4665A2; +} + +a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited { + color: #4665A2; +} + +/* @end */ + +dl.el { + margin-left: -1cm; +} + +pre.fragment { + border: 1px solid #C4CFE5; + background-color: #FBFCFD; + padding: 4px 6px; + margin: 4px 8px 4px 2px; + overflow: auto; + word-wrap: break-word; + font-size: 9pt; + line-height: 125%; + font-family: monospace, fixed; + font-size: 105%; +} + +div.fragment { + padding: 4px 6px; + margin: 4px 8px 4px 2px; + background-color: #F5FAF5; + border: 1px solid #6EBE6B; +} + +div.line { + font-family: monospace, fixed; + font-size: 13px; + min-height: 13px; + line-height: 1.0; + text-wrap: unrestricted; + white-space: -moz-pre-wrap; /* Moz */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + white-space: pre-wrap; /* CSS3 */ + word-wrap: break-word; /* IE 5.5+ */ + text-indent: -53px; + padding-left: 53px; + padding-bottom: 0px; + margin: 0px; + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} + +div.line.glow { + background-color: cyan; + box-shadow: 0 0 10px cyan; +} + + +span.lineno { + padding-right: 4px; + text-align: right; + border-right: 2px solid #0F0; + background-color: #E8E8E8; + white-space: pre; +} +span.lineno a { + background-color: #D8D8D8; +} + +span.lineno a:hover { + background-color: #C8C8C8; +} + +div.ah { + background-color: black; + font-weight: bold; + color: #ffffff; + margin-bottom: 3px; + margin-top: 3px; + padding: 0.2em; + border: solid thin #333; + border-radius: 0.5em; + -webkit-border-radius: .5em; + -moz-border-radius: .5em; + box-shadow: 2px 2px 3px #999; + -webkit-box-shadow: 2px 2px 3px #999; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; + background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444)); + background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000); +} + +div.groupHeader { + margin-left: 16px; + margin-top: 12px; + font-weight: bold; +} + +div.groupText { + margin-left: 16px; + font-style: italic; +} + +body { + background-color: white; + color: black; + margin: 0; +} + +div.contents { + margin-top: 10px; + margin-left: 12px; + margin-right: 8px; +} + +td.indexkey { + background-color: #C9E7C8; + font-weight: bold; + border: 1px solid #6EBE6B; + margin: 2px 0px 2px 0; + padding: 2px 10px; + white-space: nowrap; + vertical-align: top; +} + +td.indexvalue { + background-color: #C9E7C8; + border: 1px solid #6EBE6B; + padding: 2px 10px; + margin: 2px 0px; +} + +tr.memlist { + background-color: #CFEACE; +} + +p.formulaDsp { + text-align: center; +} + +img.formulaDsp { + +} + +img.formulaInl { + vertical-align: middle; +} + +div.center { + text-align: center; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; +} + +div.center img { + border: 0px; +} + +address.footer { + text-align: right; + padding-right: 12px; +} + +img.footer { + border: 0px; + vertical-align: middle; +} + +/* @group Code Colorization */ + +span.keyword { + color: #008000 +} + +span.keywordtype { + color: #604020 +} + +span.keywordflow { + color: #e08000 +} + +span.comment { + color: #800000 +} + +span.preprocessor { + color: #806020 +} + +span.stringliteral { + color: #002080 +} + +span.charliteral { + color: #008080 +} + +span.vhdldigit { + color: #ff00ff +} + +span.vhdlchar { + color: #000000 +} + +span.vhdlkeyword { + color: #700070 +} + +span.vhdllogic { + color: #ff0000 +} + +blockquote { + background-color: #E8F4E8; + border-left: 2px solid #3D863A; + margin: 0 24px 0 4px; + padding: 0 12px 0 16px; +} + +/* @end */ + +/* +.search { + color: #003399; + font-weight: bold; +} + +form.search { + margin-bottom: 0px; + margin-top: 0px; +} + +input.search { + font-size: 75%; + color: #000080; + font-weight: normal; + background-color: #e8eef2; +} +*/ + +td.tiny { + font-size: 75%; +} + +.dirtab { + padding: 4px; + border-collapse: collapse; + border: 1px solid #42913F; +} + +th.dirtab { + background: #C9E7C8; + font-weight: bold; +} + +hr { + height: 0px; + border: none; + border-top: 1px solid #112711; +} + +hr.footer { + height: 1px; +} + +/* @group Member Descriptions */ + +table.memberdecls { + border-spacing: 0px; + padding: 0px; +} + +.memberdecls td, .fieldtable tr { + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} + +.memberdecls td.glow, .fieldtable tr.glow { + background-color: cyan; + box-shadow: 0 0 15px cyan; +} + +.mdescLeft, .mdescRight, +.memItemLeft, .memItemRight, +.memTemplItemLeft, .memTemplItemRight, .memTemplParams { + background-color: #EEF7EE; + border: none; + margin: 4px; + padding: 1px 0 0 8px; +} + +.mdescLeft, .mdescRight { + padding: 0px 8px 4px 8px; + color: #555; +} + +.memSeparator { + border-bottom: 1px solid #DEE4F0; + line-height: 1px; + margin: 0px; + padding: 0px; +} + +.memItemLeft, .memTemplItemLeft { + white-space: nowrap; +} + +.memItemRight { + width: 100%; +} + +.memTemplParams { + color: #0F220E; + white-space: nowrap; + font-size: 80%; +} + +/* @end */ + +/* @group Member Details */ + +/* Styles for detailed member documentation */ + +.memtemplate { + font-size: 80%; + color: #0F220E; + font-weight: normal; + margin-left: 9px; +} + +.memnav { + background-color: #C9E7C8; + border: 1px solid #42913F; + text-align: center; + margin: 2px; + margin-right: 15px; + padding: 2px; +} + +.mempage { + width: 100%; +} + +.memitem { + padding: 0; + margin-bottom: 10px; + margin-right: 5px; + -webkit-transition: box-shadow 0.5s linear; + -moz-transition: box-shadow 0.5s linear; + -ms-transition: box-shadow 0.5s linear; + -o-transition: box-shadow 0.5s linear; + transition: box-shadow 0.5s linear; + display: table !important; + width: 100%; +} + +.memitem.glow { + box-shadow: 0 0 15px cyan; +} + +.memname { + font-weight: bold; + margin-left: 6px; +} + +.memname td { + vertical-align: bottom; +} + +.memproto, dl.reflist dt { + border-top: 1px solid #469943; + border-left: 1px solid #469943; + border-right: 1px solid #469943; + padding: 6px 0px 6px 0px; + color: #020402; + font-weight: bold; + text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); + background-image:url('nav_f.png'); + background-repeat:repeat-x; + background-color: #B2DCB1; + /* opera specific markup */ + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + border-top-right-radius: 4px; + border-top-left-radius: 4px; + /* firefox specific markup */ + -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + -moz-border-radius-topright: 4px; + -moz-border-radius-topleft: 4px; + /* webkit specific markup */ + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + -webkit-border-top-right-radius: 4px; + -webkit-border-top-left-radius: 4px; + +} + +.memdoc, dl.reflist dd { + border-bottom: 1px solid #469943; + border-left: 1px solid #469943; + border-right: 1px solid #469943; + padding: 6px 10px 2px 10px; + background-color: #F5FAF5; + border-top-width: 0; + background-image:url('nav_g.png'); + background-repeat:repeat-x; + background-color: #FFFFFF; + /* opera specific markup */ + border-bottom-left-radius: 4px; + border-bottom-right-radius: 4px; + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + /* firefox specific markup */ + -moz-border-radius-bottomleft: 4px; + -moz-border-radius-bottomright: 4px; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + /* webkit specific markup */ + -webkit-border-bottom-left-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); +} + +dl.reflist dt { + padding: 5px; +} + +dl.reflist dd { + margin: 0px 0px 10px 0px; + padding: 5px; +} + +.paramkey { + text-align: right; +} + +.paramtype { + white-space: nowrap; +} + +.paramname { + color: #602020; + white-space: nowrap; +} +.paramname em { + font-style: normal; +} +.paramname code { + line-height: 14px; +} + +.params, .retval, .exception, .tparams { + margin-left: 0px; + padding-left: 0px; +} + +.params .paramname, .retval .paramname { + font-weight: bold; + vertical-align: top; +} + +.params .paramtype { + font-style: italic; + vertical-align: top; +} + +.params .paramdir { + font-family: "courier new",courier,monospace; + vertical-align: top; +} + +table.mlabels { + border-spacing: 0px; +} + +td.mlabels-left { + width: 100%; + padding: 0px; +} + +td.mlabels-right { + vertical-align: bottom; + padding: 0px; + white-space: nowrap; +} + +span.mlabels { + margin-left: 8px; +} + +span.mlabel { + background-color: #234E22; + border-top:1px solid #163115; + border-left:1px solid #163115; + border-right:1px solid #6EBE6B; + border-bottom:1px solid #6EBE6B; + text-shadow: none; + color: white; + margin-right: 4px; + padding: 2px 3px; + border-radius: 3px; + font-size: 7pt; + white-space: nowrap; + vertical-align: middle; +} + + + +/* @end */ + +/* these are for tree view inside a (index) page */ + +div.directory { + margin: 10px 0px; + border-top: 1px solid #3D863A; + border-bottom: 1px solid #3D863A; + width: 100%; +} + +.directory table { + border-collapse:collapse; +} + +.directory td { + margin: 0px; + padding: 0px; + vertical-align: top; +} + +.directory td.entry { + white-space: nowrap; + padding-right: 6px; + padding-top: 3px; +} + +.directory td.entry a { + outline:none; +} + +.directory td.entry a img { + border: none; +} + +.directory td.desc { + width: 100%; + padding-left: 6px; + padding-right: 6px; + padding-top: 3px; + border-left: 1px solid rgba(0,0,0,0.05); +} + +.directory tr.even { + padding-left: 6px; + background-color: #E8F4E8; +} + +.directory img { + vertical-align: -30%; +} + +.directory .levels { + white-space: nowrap; + width: 100%; + text-align: right; + font-size: 9pt; +} + +.directory .levels span { + cursor: pointer; + padding-left: 2px; + padding-right: 2px; + color: #0A1509; +} + +.arrow { + color: #3D863A; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + cursor: pointer; + font-size: 80%; + display: inline-block; + width: 16px; + height: 22px; +} + +.icon { + font-family: Arial, Helvetica; + font-weight: bold; + font-size: 12px; + height: 14px; + width: 16px; + display: inline-block; + background-color: #234E22; + color: white; + text-align: center; + border-radius: 4px; + margin-left: 2px; + margin-right: 2px; +} + +.icona { + width: 24px; + height: 22px; + display: inline-block; +} + +.iconfopen { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:url('ftv2folderopen.png'); + background-position: 0px -4px; + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +.iconfclosed { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:url('ftv2folderclosed.png'); + background-position: 0px -4px; + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +.icondoc { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:url('ftv2doc.png'); + background-position: 0px -4px; + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +table.directory { + font: 400 14px Roboto,sans-serif; +} + +/* @end */ + +div.dynheader { + margin-top: 8px; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +address { + font-style: normal; + color: #030703; +} + +table.doxtable { + border-collapse:collapse; + margin-top: 4px; + margin-bottom: 4px; +} + +table.doxtable td, table.doxtable th { + border: 1px solid #040803; + padding: 3px 7px 2px; +} + +table.doxtable th { + background-color: #071007; + color: #FFFFFF; + font-size: 110%; + padding-bottom: 4px; + padding-top: 5px; +} + +table.fieldtable { + /*width: 100%;*/ + margin-bottom: 10px; + border: 1px solid #469943; + border-spacing: 0px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; + -webkit-box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); + box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); +} + +.fieldtable td, .fieldtable th { + padding: 3px 7px 2px; +} + +.fieldtable td.fieldtype, .fieldtable td.fieldname { + white-space: nowrap; + border-right: 1px solid #469943; + border-bottom: 1px solid #469943; + vertical-align: top; +} + +.fieldtable td.fieldname { + padding-top: 3px; +} + +.fieldtable td.fielddoc { + border-bottom: 1px solid #469943; + /*width: 100%;*/ +} + +.fieldtable td.fielddoc p:first-child { + margin-top: 0px; +} + +.fieldtable td.fielddoc p:last-child { + margin-bottom: 2px; +} + +.fieldtable tr:last-child td { + border-bottom: none; +} + +.fieldtable th { + background-image:url('nav_f.png'); + background-repeat:repeat-x; + background-color: #B2DCB1; + font-size: 90%; + color: #020402; + padding-bottom: 4px; + padding-top: 5px; + text-align:left; + -moz-border-radius-topleft: 4px; + -moz-border-radius-topright: 4px; + -webkit-border-top-left-radius: 4px; + -webkit-border-top-right-radius: 4px; + border-top-left-radius: 4px; + border-top-right-radius: 4px; + border-bottom: 1px solid #469943; +} + + +.tabsearch { + top: 0px; + left: 10px; + height: 36px; + background-image: url('tab_b.png'); + z-index: 101; + overflow: hidden; + font-size: 13px; +} + +.navpath ul +{ + font-size: 11px; + background-image:url('tab_b.png'); + background-repeat:repeat-x; + background-position: 0 -5px; + height:30px; + line-height:30px; + color:#306B2E; + border:solid 1px #69BC66; + overflow:hidden; + margin:0px; + padding:0px; +} + +.navpath li +{ + list-style-type:none; + float:left; + padding-left:10px; + padding-right:15px; + background-image:url('bc_s.png'); + background-repeat:no-repeat; + background-position:right; + color:#070F06; +} + +.navpath li.navelem a +{ + height:32px; + display:block; + text-decoration: none; + outline: none; + color: #020602; + font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; + text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); + text-decoration: none; +} + +.navpath li.navelem a:hover +{ + color:#1E431D; +} + +.navpath li.footer +{ + list-style-type:none; + float:right; + padding-left:10px; + padding-right:15px; + background-image:none; + background-repeat:no-repeat; + background-position:right; + color:#070F06; + font-size: 8pt; +} + + +div.summary +{ + float: right; + font-size: 8pt; + padding-right: 5px; + width: 50%; + text-align: right; +} + +div.summary a +{ + white-space: nowrap; +} + +div.ingroups +{ + font-size: 8pt; + width: 50%; + text-align: left; +} + +div.ingroups a +{ + white-space: nowrap; +} + +div.header +{ + background-image:url('nav_h.png'); + background-repeat:repeat-x; + background-color: #EEF7EE; + margin: 0px; + border-bottom: 1px solid #6EBE6B; +} + +div.headertitle +{ + padding: 5px 5px 5px 10px; +} + +dl +{ + padding: 0 0 0 10px; +} + +/* dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug */ +dl.section +{ + margin-left: 0px; + padding-left: 0px; +} + +dl.note +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #D0C000; +} + +dl.warning, dl.attention +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #FF0000; +} + +dl.pre, dl.post, dl.invariant +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #00D000; +} + +dl.deprecated +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #505050; +} + +dl.todo +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #00C0E0; +} + +dl.test +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #3030E0; +} + +dl.bug +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #C08050; +} + +dl.section dd { + margin-bottom: 6px; +} + + +#projectlogo +{ + text-align: center; + vertical-align: bottom; + border-collapse: separate; +} + +#projectlogo img +{ + border: 0px none; +} + +#projectname +{ + font: 300% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 2px 0px; +} + +#projectbrief +{ + font: 120% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 0px; +} + +#projectnumber +{ + font: 50% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 0px; +} + +#titlearea +{ + padding: 0px; + margin: 0px; + width: 100%; + border-bottom: 1px solid #163115; +} + +.image +{ + text-align: center; +} + +.dotgraph +{ + text-align: center; +} + +.mscgraph +{ + text-align: center; +} + +.diagraph +{ + text-align: center; +} + +.caption +{ + font-weight: bold; +} + +div.zoom +{ + border: 1px solid #347332; +} + +dl.citelist { + margin-bottom:50px; +} + +dl.citelist dt { + color:#050C05; + float:left; + font-weight:bold; + margin-right:10px; + padding:5px; +} + +dl.citelist dd { + margin:2px 0; + padding:5px 0; +} + +div.toc { + padding: 14px 25px; + background-color: #E2F2E1; + border: 1px solid #99D197; + border-radius: 7px 7px 7px 7px; + float: right; + height: auto; + margin: 0 20px 10px 10px; + width: 200px; +} + +div.toc li { + background: url("bdwn.png") no-repeat scroll 0 5px transparent; + font: 10px/1.2 Verdana,DejaVu Sans,Geneva,sans-serif; + margin-top: 5px; + padding-left: 10px; + padding-top: 2px; +} + +div.toc h3 { + font: bold 12px/1.2 Arial,FreeSans,sans-serif; + color: #0F220E; + border-bottom: 0 none; + margin: 0; +} + +div.toc ul { + list-style: none outside none; + border: medium none; + padding: 0px; +} + +div.toc li.level1 { + margin-left: 0px; +} + +div.toc li.level2 { + margin-left: 15px; +} + +div.toc li.level3 { + margin-left: 30px; +} + +div.toc li.level4 { + margin-left: 45px; +} + +.inherit_header { + font-weight: bold; + color: gray; + cursor: pointer; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.inherit_header td { + padding: 6px 0px 2px 5px; +} + +.inherit { + display: none; +} + +tr.heading h2 { + margin-top: 12px; + margin-bottom: 4px; +} + +/* tooltip related style info */ + +.ttc { + position: absolute; + display: none; +} + +#powerTip { + cursor: default; + white-space: nowrap; + background-color: white; + border: 1px solid gray; + border-radius: 4px 4px 4px 4px; + box-shadow: 1px 1px 7px gray; + display: none; + font-size: smaller; + max-width: 80%; + opacity: 0.9; + padding: 1ex 1em 1em; + position: absolute; + z-index: 2147483647; +} + +#powerTip div.ttdoc { + color: grey; + font-style: italic; +} + +#powerTip div.ttname a { + font-weight: bold; +} + +#powerTip div.ttname { + font-weight: bold; +} + +#powerTip div.ttdeci { + color: #006318; +} + +#powerTip div { + margin: 0px; + padding: 0px; + font: 12px/16px Roboto,sans-serif; +} + +#powerTip:before, #powerTip:after { + content: ""; + position: absolute; + margin: 0px; +} + +#powerTip.n:after, #powerTip.n:before, +#powerTip.s:after, #powerTip.s:before, +#powerTip.w:after, #powerTip.w:before, +#powerTip.e:after, #powerTip.e:before, +#powerTip.ne:after, #powerTip.ne:before, +#powerTip.se:after, #powerTip.se:before, +#powerTip.nw:after, #powerTip.nw:before, +#powerTip.sw:after, #powerTip.sw:before { + border: solid transparent; + content: " "; + height: 0; + width: 0; + position: absolute; +} + +#powerTip.n:after, #powerTip.s:after, +#powerTip.w:after, #powerTip.e:after, +#powerTip.nw:after, #powerTip.ne:after, +#powerTip.sw:after, #powerTip.se:after { + border-color: rgba(255, 255, 255, 0); +} + +#powerTip.n:before, #powerTip.s:before, +#powerTip.w:before, #powerTip.e:before, +#powerTip.nw:before, #powerTip.ne:before, +#powerTip.sw:before, #powerTip.se:before { + border-color: rgba(128, 128, 128, 0); +} + +#powerTip.n:after, #powerTip.n:before, +#powerTip.ne:after, #powerTip.ne:before, +#powerTip.nw:after, #powerTip.nw:before { + top: 100%; +} + +#powerTip.n:after, #powerTip.ne:after, #powerTip.nw:after { + border-top-color: #ffffff; + border-width: 10px; + margin: 0px -10px; +} +#powerTip.n:before { + border-top-color: #808080; + border-width: 11px; + margin: 0px -11px; +} +#powerTip.n:after, #powerTip.n:before { + left: 50%; +} + +#powerTip.nw:after, #powerTip.nw:before { + right: 14px; +} + +#powerTip.ne:after, #powerTip.ne:before { + left: 14px; +} + +#powerTip.s:after, #powerTip.s:before, +#powerTip.se:after, #powerTip.se:before, +#powerTip.sw:after, #powerTip.sw:before { + bottom: 100%; +} + +#powerTip.s:after, #powerTip.se:after, #powerTip.sw:after { + border-bottom-color: #ffffff; + border-width: 10px; + margin: 0px -10px; +} + +#powerTip.s:before, #powerTip.se:before, #powerTip.sw:before { + border-bottom-color: #808080; + border-width: 11px; + margin: 0px -11px; +} + +#powerTip.s:after, #powerTip.s:before { + left: 50%; +} + +#powerTip.sw:after, #powerTip.sw:before { + right: 14px; +} + +#powerTip.se:after, #powerTip.se:before { + left: 14px; +} + +#powerTip.e:after, #powerTip.e:before { + left: 100%; +} +#powerTip.e:after { + border-left-color: #ffffff; + border-width: 10px; + top: 50%; + margin-top: -10px; +} +#powerTip.e:before { + border-left-color: #808080; + border-width: 11px; + top: 50%; + margin-top: -11px; +} + +#powerTip.w:after, #powerTip.w:before { + right: 100%; +} +#powerTip.w:after { + border-right-color: #ffffff; + border-width: 10px; + top: 50%; + margin-top: -10px; +} +#powerTip.w:before { + border-right-color: #808080; + border-width: 11px; + top: 50%; + margin-top: -11px; +} + +@media print +{ + #top { display: none; } + #side-nav { display: none; } + #nav-path { display: none; } + body { overflow:visible; } + h1, h2, h3, h4, h5, h6 { page-break-after: avoid; } + .summary { display: none; } + .memitem { page-break-inside: avoid; } + #doc-content + { + margin-left:0 !important; + height:auto !important; + width:auto !important; + overflow:inherit; + display:inline; + } +} + diff --git a/enet server test/enet2/docs/html/doxygen.png b/enet server test/enet2/docs/html/doxygen.png new file mode 100644 index 0000000000000000000000000000000000000000..26229e8acfce6c3cade8aa07418f730c53a6d8ab GIT binary patch literal 3802 zcmV<04khu4P)&;0)0_kI4g z(CKsl&aO>6BZVh769-hPy&z-EdVqF0DeE}YU=>NEUW?G36RjrqgA+k zqU=Ul61^gu3IG7j0D#|zCnYHSe*S#`(y+9$WWpi=pcw%0@4=H2gsR#q0B8Vn^8nBc z0C+rXt!x3nES{L4YBNNbn+Jeq0Knt%dkAtOgb|eb|E&6xQVjqNU^?HvReQGeAt>}y zdF-ROtT@?3kK^KE}VIud- zE6QK?<~DhPJRQB}bFbL-G%wzG7C{~{01i&MZZY}_pYxcT_=iDXzykZ zKpGEkK4iT?q;p>HGr^&w1NS;FwOfuGE}wk_VAoOLBjGo~oW9-O=Wm zHbRaUcl{h@>YM+`t~c3#MRe+!RP=W3EzJ%mBmfnUDgdAX zc)pu!_gJ=7r!U7u?@0h;gY6ds`>%YdhzVS>l9F}4eCL;CWTPFv%1^m=)F+~9$nw{5 zc5QYz`JBr>-Ck@Te&VYWqCDqL4kq@Rg#M8}NS?VxoDT>Iz_qXQ!^ke4Pk$$+7mn^e zD$2t)&%p6TC&DOpE-lm%zZFA_>(T4RRa&v*~x zy(a=dlX%|kd4AauCRp29?M^xO8G5?Nhy?%>T)LZsDgCD6QAKSC|5MD}yZ`mMk)8ig zf0SM>jU%7YrapaN@I`rHd7NAS_R;Bwz82@#o{PuUF*~w;y!oRq<)s<3BT)I_sE-GRZlNdiG7}t(ok0HPDKxm#5F`R*kwi+m4vFW!Yq zFBiyV{0#9NY9L4xxOt><+2~kNwjp~R4n-ajzQ-nv#+(=CNq6XxWk{d-PwmNq6G7x7 z*2&v3T60We6!-0cv+%~ASB>mKBSUd{Z*CHOF5}H~;#vj(X$a(*a|(Ph z5amS=`B;?LI<`g^+=hjqGGO zyBi3~S@_KY#TdmHDY=Q0aVz_F9DQ;{nt%Q(?O1+BKJzlagrd_g)sw-`<&w*YcySIp zkIVX#riG&5*o_#+E{^JbTIqzuY>C0C_fK(}VUs~=# zq0->4<6fpY)sh)YMIE-emv`TX?6~>H=N`Bk{>fVjc)QQ6`bON^%P5!qZyn^%B=VWB zpWmCa^P;NazofVxLpt(e^z$0-X_Qayfh+uC5|peXmt}7fP7dd)r96G0GpUpQ^-sTc zeO!%X_U-K8Im|;vpA6w?*Qc$KPLEf+aZXAm$kcb%zs?Ed&@~oB{U-C1tOOrJ{qop+ zf|T~{?KE4DNli2H&_;Y4mBB>?8Tk48#a#fT@kX!7!bb8K;;vr3d9^sdVCDkcI9V7& z`a)wRy{IS932o7)MdHrW+X27`dfhnE6*r6Crf|h6wUf7#w{+^CdlPRTnt_p>0*vPP zs-Vx5;qiXTh_SOp*>wLIcvxH!M836;%ah49wFQ8tAX~?Hb8D<8NMkNHfgn3F-f(oC zbP6{6k*g9;BOZ5`TT~sXfCMMlTfSmM>Cc$w$1N_0OufRml15QZm`j zZOs3ifO)8(MIgEMad|R9rnUgk6lCidZ*GkZ1ewc?uQ=g2RmzT^uC@*Uj3AfGADyYK z{%D%cJx*tKzqzq(I=5C%9yQrWucLzpItO^+*RS%UXg(5vd}s?YZiH1Xkn~@PRvFoo zT+lPjab0q`eOo(T1cfL!lV@YLaqq@)UI6eoFgZz2vc{(VY6xX&l(<1-%tkcM6!WY@N(=KVvl;{3j}ecU{?q%WL4(o1 zal0~zbhIR&K=F6a*33euHk|>W0p5RQIUZauiz9ubYmRIS=N+Bx)R2^YLSF+Q4gDH$^80ubzxT~j0Mhtk+ZXt0`$Z;! z*QrF<@m3Z}r>;&Ix_mIseDs6CKFc&V$34B`dyyd1HCQojB`WSn1g-Bn(K{?8>U99p z$oMWpc>BHN2LMJ;`>hnX<4>>Qo>9}5za?AH>(Iu1D|{=XhZA{TqHOz;ow)vOK~hY{ zyOHE0p?$x0;o%9=0&~pc|8o-F~Kuv3dZ&6iJbrQGD)J4Ec!XT&d1*d7bi{D{fZ^-+{q_4eXhq zmPF9P{qHoW$3W1)Mg5g>+f@_Spi)LqU#k|Dr(fAK37)My0l)|aWd#l9S1S_?1a+ca z^YakeF#}&3003rj=DY84a>*&7>C>-@7I)>mf6N9TjdkNU^685ppNWBg8;NJ1c~+F| zT#$lW*|(DxXd}gbM0wv6uRC$B*tFNXZY zlPzBn(OrTSVG|dO2Y@DFuonn&X{njLXO<{CcJMgPuE`P!>i>?9(tq4AQNHojPf>YS zB8Z<@CvV5-5%K=ioI8q&nFmhce9{H{MH3D{8XI2TBoH*`>%Z`KDEUcLjOmOq^G5?f z0~}s^1bK(AL06}Xpx^zZUl_1q1iE+aF6yK%+=E*`-cBN)k>qo}jf2g~@cm%`q>(f+ z88ziKzN8~uzoe(}nftubcfw$!SXVW_CXRbz@?W9 zUSIX9X+AOJN4T!ZwlBTHX|cn&R%Pf20BC^hQ`y3`$v$hV>x3S}1cm)Q)M#C^*8eCH zWLiV=8`~NXB#>m;!ZO;WhqLfQO$z0O<$SH=a$*4FBZ&|>^T>4JXY=T-Lh@uE*4nc* zY#gkG`I_=acu?>Fb=7srY(x6z_4@PmJ{2ZDmynKdg^>;)(*|)#E}S5eD=1#hjDJi6 zAdS!7{G5ub3L-tu9e^~*h8gFW+%uH=X(n6wQp`Y~=Y~orao6-zu73*o5wA(T54K}J zD%wP_vb7Xt6xZO7V<(eso|#%$o0H%6Sx|2ZGuymLH{;_=P}APv$F zb5yih@6f>>cP^Enszg{!5Xo@q?hLsfes%<>@QHUPUt9wKGywVZp;!Hmu3wJ^n*spL zVe6(1XNvf`wTF(0(!t8g3IH0#g>65fIQtfV zF4j-EI@1YraCZQJe>?8w-N%D`;g*L;5CHsH(4vhE6Ew`eot;JQmsjYHs=ubI?^mO) zrWSRN>i9(p-i5&kwiW~q&L%iZzINJWHuDI%ZRVg|hx={XurE2JO)auUA!XBl+&Qz0l zy&0aW(yCAB6#0_fi+qygwiZ?vu(Y;BU3G0V&HO@$A|HML@JEB{6RtP|LEO~40>J+R zT-U$70N{7xG{KGV3;_IxkV^z + + + + + +ENet: include/enet/enet.h File Reference + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
enet.h File Reference
+
+
+ +

ENet public header file. +More...

+
#include <stdlib.h>
+#include "enet/unix.h"
+#include "enet/types.h"
+#include "enet/protocol.h"
+#include "enet/list.h"
+#include "enet/callbacks.h"
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Data Structures

struct  ENetAcknowledgement
 
struct  ENetAddress
 Portable internet address structure. More...
 
struct  ENetChannel
 
struct  ENetCompressor
 An ENet packet compressor for compressing UDP packets before socket sends or receives. More...
 
struct  ENetEvent
 An ENet event as returned by enet_host_service(). More...
 
struct  ENetHost
 An ENet host for communicating with peers. More...
 
struct  ENetIncomingCommand
 
struct  ENetOutgoingCommand
 
struct  ENetPacket
 ENet packet structure. More...
 
struct  ENetPeer
 An ENet peer which data packets may be sent or received from. More...
 
+ + + + + + + + + + + + + + + + + + + + + + + + + +

+Macros

#define ENET_BUFFER_MAXIMUM   (1 + 2 * ENET_PROTOCOL_MAXIMUM_PACKET_COMMANDS)
 
#define ENET_HOST_ANY   0
 
#define ENET_HOST_BROADCAST   0xFFFFFFFFU
 
#define ENET_PORT_ANY   0
 
#define ENET_VERSION   ENET_VERSION_CREATE(ENET_VERSION_MAJOR, ENET_VERSION_MINOR, ENET_VERSION_PATCH)
 
#define ENET_VERSION_CREATE(major, minor, patch)   (((major)<<16) | ((minor)<<8) | (patch))
 
#define ENET_VERSION_GET_MAJOR(version)   (((version)>>16)&0xFF)
 
#define ENET_VERSION_GET_MINOR(version)   (((version)>>8)&0xFF)
 
#define ENET_VERSION_GET_PATCH(version)   ((version)&0xFF)
 
#define ENET_VERSION_MAJOR   1
 
#define ENET_VERSION_MINOR   3
 
#define ENET_VERSION_PATCH   13
 
+ + + + + + + + + + + +

+Typedefs

typedef enet_uint32(* ENetChecksumCallback )(const ENetBuffer *buffers, size_t bufferCount)
 Callback that computes the checksum of the data held in buffers[0:bufferCount-1]. More...
 
typedef int(* ENetInterceptCallback )(struct _ENetHost *host, struct _ENetEvent *event)
 Callback for intercepting received raw UDP packets. More...
 
typedef void(* ENetPacketFreeCallback )(struct _ENetPacket *)
 
typedef enet_uint32 ENetVersion
 
+ + + + + + + + + + + + + + + + + + + +

+Enumerations

enum  {
+  ENET_HOST_RECEIVE_BUFFER_SIZE = 256 * 1024, +
+  ENET_HOST_SEND_BUFFER_SIZE = 256 * 1024, +
+  ENET_HOST_BANDWIDTH_THROTTLE_INTERVAL = 1000, +
+  ENET_HOST_DEFAULT_MTU = 1400, +
+  ENET_HOST_DEFAULT_MAXIMUM_PACKET_SIZE = 32 * 1024 * 1024, +
+  ENET_HOST_DEFAULT_MAXIMUM_WAITING_DATA = 32 * 1024 * 1024, +
+  ENET_PEER_DEFAULT_ROUND_TRIP_TIME = 500, +
+  ENET_PEER_DEFAULT_PACKET_THROTTLE = 32, +
+  ENET_PEER_PACKET_THROTTLE_SCALE = 32, +
+  ENET_PEER_PACKET_THROTTLE_COUNTER = 7, +
+  ENET_PEER_PACKET_THROTTLE_ACCELERATION = 2, +
+  ENET_PEER_PACKET_THROTTLE_DECELERATION = 2, +
+  ENET_PEER_PACKET_THROTTLE_INTERVAL = 5000, +
+  ENET_PEER_PACKET_LOSS_SCALE = (1 << 16), +
+  ENET_PEER_PACKET_LOSS_INTERVAL = 10000, +
+  ENET_PEER_WINDOW_SIZE_SCALE = 64 * 1024, +
+  ENET_PEER_TIMEOUT_LIMIT = 32, +
+  ENET_PEER_TIMEOUT_MINIMUM = 5000, +
+  ENET_PEER_TIMEOUT_MAXIMUM = 30000, +
+  ENET_PEER_PING_INTERVAL = 500, +
+  ENET_PEER_UNSEQUENCED_WINDOWS = 64, +
+  ENET_PEER_UNSEQUENCED_WINDOW_SIZE = 1024, +
+  ENET_PEER_FREE_UNSEQUENCED_WINDOWS = 32, +
+  ENET_PEER_RELIABLE_WINDOWS = 16, +
+  ENET_PEER_RELIABLE_WINDOW_SIZE = 0x1000, +
+  ENET_PEER_FREE_RELIABLE_WINDOWS = 8 +
+ }
 
enum  ENetEventType {
+  ENET_EVENT_TYPE_NONE = 0, +
+  ENET_EVENT_TYPE_CONNECT = 1, +
+  ENET_EVENT_TYPE_DISCONNECT = 2, +
+  ENET_EVENT_TYPE_RECEIVE = 3 +
+ }
 An ENet event type, as specified in ENetEvent. More...
 
enum  ENetPacketFlag {
+  ENET_PACKET_FLAG_RELIABLE = (1 << 0), +
+  ENET_PACKET_FLAG_UNSEQUENCED = (1 << 1), +
+  ENET_PACKET_FLAG_NO_ALLOCATE = (1 << 2), +
+  ENET_PACKET_FLAG_UNRELIABLE_FRAGMENT = (1 << 3), +
+  ENET_PACKET_FLAG_SENT = (1<<8) +
+ }
 Packet flag bit constants. More...
 
enum  ENetPeerState {
+  ENET_PEER_STATE_DISCONNECTED = 0, +
+  ENET_PEER_STATE_CONNECTING = 1, +
+  ENET_PEER_STATE_ACKNOWLEDGING_CONNECT = 2, +
+  ENET_PEER_STATE_CONNECTION_PENDING = 3, +
+  ENET_PEER_STATE_CONNECTION_SUCCEEDED = 4, +
+  ENET_PEER_STATE_CONNECTED = 5, +
+  ENET_PEER_STATE_DISCONNECT_LATER = 6, +
+  ENET_PEER_STATE_DISCONNECTING = 7, +
+  ENET_PEER_STATE_ACKNOWLEDGING_DISCONNECT = 8, +
+  ENET_PEER_STATE_ZOMBIE = 9 +
+ }
 
enum  ENetSocketOption {
+  ENET_SOCKOPT_NONBLOCK = 1, +
+  ENET_SOCKOPT_BROADCAST = 2, +
+  ENET_SOCKOPT_RCVBUF = 3, +
+  ENET_SOCKOPT_SNDBUF = 4, +
+  ENET_SOCKOPT_REUSEADDR = 5, +
+  ENET_SOCKOPT_RCVTIMEO = 6, +
+  ENET_SOCKOPT_SNDTIMEO = 7, +
+  ENET_SOCKOPT_ERROR = 8, +
+  ENET_SOCKOPT_NODELAY = 9 +
+ }
 
enum  ENetSocketShutdown {
+  ENET_SOCKET_SHUTDOWN_READ = 0, +
+  ENET_SOCKET_SHUTDOWN_WRITE = 1, +
+  ENET_SOCKET_SHUTDOWN_READ_WRITE = 2 +
+ }
 
enum  ENetSocketType {
+  ENET_SOCKET_TYPE_STREAM = 1, +
+  ENET_SOCKET_TYPE_DATAGRAM = 2 +
+ }
 
enum  ENetSocketWait {
+  ENET_SOCKET_WAIT_NONE = 0, +
+  ENET_SOCKET_WAIT_SEND = (1 << 0), +
+  ENET_SOCKET_WAIT_RECEIVE = (1 << 1), +
+  ENET_SOCKET_WAIT_INTERRUPT = (1 << 2) +
+ }
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

int enet_address_get_host (const ENetAddress *address, char *hostName, size_t nameLength)
 Attempts to do a reverse lookup of the host field in the address parameter. More...
 
int enet_address_get_host_ip (const ENetAddress *address, char *hostName, size_t nameLength)
 Gives the printable form of the IP address specified in the address parameter. More...
 
int enet_address_set_host (ENetAddress *address, const char *hostName)
 Attempts to resolve the host named by the parameter hostName and sets the host field in the address parameter if successful. More...
 
enet_uint32 enet_crc32 (const ENetBuffer *, size_t)
 
void enet_deinitialize (void)
 Shuts down ENet globally. More...
 
void enet_host_bandwidth_limit (ENetHost *, enet_uint32, enet_uint32)
 Adjusts the bandwidth limits of a host. More...
 
void enet_host_bandwidth_throttle (ENetHost *)
 
void enet_host_broadcast (ENetHost *, enet_uint8, ENetPacket *)
 Queues a packet to be sent to all peers associated with the host. More...
 
void enet_host_channel_limit (ENetHost *, size_t)
 Limits the maximum allowed channels of future incoming connections. More...
 
int enet_host_check_events (ENetHost *, ENetEvent *)
 Checks for any queued events on the host and dispatches one if available. More...
 
void enet_host_compress (ENetHost *, const ENetCompressor *)
 Sets the packet compressor the host should use to compress and decompress packets. More...
 
int enet_host_compress_with_range_coder (ENetHost *host)
 Sets the packet compressor the host should use to the default range coder. More...
 
ENetPeerenet_host_connect (ENetHost *, const ENetAddress *, size_t, enet_uint32)
 Initiates a connection to a foreign host. More...
 
ENetHostenet_host_create (const ENetAddress *, size_t, size_t, enet_uint32, enet_uint32)
 Creates a host for communicating to peers. More...
 
void enet_host_destroy (ENetHost *)
 Destroys the host and all resources associated with it. More...
 
void enet_host_flush (ENetHost *)
 Sends any queued packets on the host specified to its designated peers. More...
 
enet_uint32 enet_host_random_seed (void)
 
int enet_host_service (ENetHost *, ENetEvent *, enet_uint32)
 Waits for events on the host specified and shuttles packets between the host and its peers. More...
 
int enet_initialize (void)
 Initializes ENet globally. More...
 
int enet_initialize_with_callbacks (ENetVersion version, const ENetCallbacks *inits)
 Initializes ENet globally and supplies user-overridden callbacks. More...
 
ENetVersion enet_linked_version (void)
 Gives the linked version of the ENet library. More...
 
ENetPacketenet_packet_create (const void *, size_t, enet_uint32)
 Creates a packet that may be sent to a peer. More...
 
void enet_packet_destroy (ENetPacket *)
 Destroys the packet and deallocates its data. More...
 
int enet_packet_resize (ENetPacket *, size_t)
 Attempts to resize the data in the packet to length specified in the dataLength parameter. More...
 
void enet_peer_disconnect (ENetPeer *, enet_uint32)
 Request a disconnection from a peer. More...
 
void enet_peer_disconnect_later (ENetPeer *, enet_uint32)
 Request a disconnection from a peer, but only after all queued outgoing packets are sent. More...
 
void enet_peer_disconnect_now (ENetPeer *, enet_uint32)
 Force an immediate disconnection from a peer. More...
 
void enet_peer_dispatch_incoming_reliable_commands (ENetPeer *, ENetChannel *)
 
void enet_peer_dispatch_incoming_unreliable_commands (ENetPeer *, ENetChannel *)
 
void enet_peer_on_connect (ENetPeer *)
 
void enet_peer_on_disconnect (ENetPeer *)
 
void enet_peer_ping (ENetPeer *)
 Sends a ping request to a peer. More...
 
void enet_peer_ping_interval (ENetPeer *, enet_uint32)
 Sets the interval at which pings will be sent to a peer. More...
 
ENetAcknowledgementenet_peer_queue_acknowledgement (ENetPeer *, const ENetProtocol *, enet_uint16)
 
ENetIncomingCommandenet_peer_queue_incoming_command (ENetPeer *, const ENetProtocol *, const void *, size_t, enet_uint32, enet_uint32)
 
ENetOutgoingCommandenet_peer_queue_outgoing_command (ENetPeer *, const ENetProtocol *, ENetPacket *, enet_uint32, enet_uint16)
 
ENetPacketenet_peer_receive (ENetPeer *, enet_uint8 *channelID)
 Attempts to dequeue any incoming queued packet. More...
 
void enet_peer_reset (ENetPeer *)
 Forcefully disconnects a peer. More...
 
void enet_peer_reset_queues (ENetPeer *)
 
int enet_peer_send (ENetPeer *, enet_uint8, ENetPacket *)
 Queues a packet to be sent. More...
 
void enet_peer_setup_outgoing_command (ENetPeer *, ENetOutgoingCommand *)
 
int enet_peer_throttle (ENetPeer *, enet_uint32)
 
void enet_peer_throttle_configure (ENetPeer *, enet_uint32, enet_uint32, enet_uint32)
 Configures throttle parameter for a peer. More...
 
void enet_peer_timeout (ENetPeer *, enet_uint32, enet_uint32, enet_uint32)
 Sets the timeout parameters for a peer. More...
 
size_t enet_protocol_command_size (enet_uint8)
 
size_t enet_range_coder_compress (void *, const ENetBuffer *, size_t, size_t, enet_uint8 *, size_t)
 
void * enet_range_coder_create (void)
 
size_t enet_range_coder_decompress (void *, const enet_uint8 *, size_t, enet_uint8 *, size_t)
 
void enet_range_coder_destroy (void *)
 
ENetSocket enet_socket_accept (ENetSocket, ENetAddress *)
 
int enet_socket_bind (ENetSocket, const ENetAddress *)
 
int enet_socket_connect (ENetSocket, const ENetAddress *)
 
ENetSocket enet_socket_create (ENetSocketType)
 
void enet_socket_destroy (ENetSocket)
 
int enet_socket_get_address (ENetSocket, ENetAddress *)
 
int enet_socket_get_option (ENetSocket, ENetSocketOption, int *)
 
int enet_socket_listen (ENetSocket, int)
 
int enet_socket_receive (ENetSocket, ENetAddress *, ENetBuffer *, size_t)
 
int enet_socket_send (ENetSocket, const ENetAddress *, const ENetBuffer *, size_t)
 
int enet_socket_set_option (ENetSocket, ENetSocketOption, int)
 
int enet_socket_shutdown (ENetSocket, ENetSocketShutdown)
 
int enet_socket_wait (ENetSocket, enet_uint32 *, enet_uint32)
 
int enet_socketset_select (ENetSocket, ENetSocketSet *, ENetSocketSet *, enet_uint32)
 
enet_uint32 enet_time_get (void)
 Returns the wall-time in milliseconds. More...
 
void enet_time_set (enet_uint32)
 Sets the current wall-time in milliseconds. More...
 
+

Detailed Description

+

ENet public header file.

+

Macro Definition Documentation

+ +
+
+ + + + +
#define ENET_BUFFER_MAXIMUM   (1 + 2 * ENET_PROTOCOL_MAXIMUM_PACKET_COMMANDS)
+
+ +
+
+ +
+
+ + + + +
#define ENET_HOST_ANY   0
+
+ +
+
+ +
+
+ + + + +
#define ENET_HOST_BROADCAST   0xFFFFFFFFU
+
+ +
+
+ +
+
+ + + + +
#define ENET_PORT_ANY   0
+
+ +
+
+ +
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
#define ENET_VERSION_CREATE( major,
 minor,
 patch 
)   (((major)<<16) | ((minor)<<8) | (patch))
+
+ +
+
+ +
+
+ + + + + + + + +
#define ENET_VERSION_GET_MAJOR( version)   (((version)>>16)&0xFF)
+
+ +
+
+ +
+
+ + + + + + + + +
#define ENET_VERSION_GET_MINOR( version)   (((version)>>8)&0xFF)
+
+ +
+
+ +
+
+ + + + + + + + +
#define ENET_VERSION_GET_PATCH( version)   ((version)&0xFF)
+
+ +
+
+ +
+
+ + + + +
#define ENET_VERSION_MAJOR   1
+
+ +
+
+ +
+
+ + + + +
#define ENET_VERSION_MINOR   3
+
+ +
+
+ +
+
+ + + + +
#define ENET_VERSION_PATCH   13
+
+ +
+
+

Typedef Documentation

+ +
+
+ + + + +
typedef enet_uint32( * ENetChecksumCallback)(const ENetBuffer *buffers, size_t bufferCount)
+
+ +

Callback that computes the checksum of the data held in buffers[0:bufferCount-1].

+ +
+
+ +
+
+ + + + +
typedef int( * ENetInterceptCallback)(struct _ENetHost *host, struct _ENetEvent *event)
+
+ +

Callback for intercepting received raw UDP packets.

+

Should return 1 to intercept, 0 to ignore, or -1 to propagate an error.

+ +
+
+ +
+
+ + + + +
typedef void( * ENetPacketFreeCallback)(struct _ENetPacket *)
+
+ +
+
+ +
+
+ + + + +
typedef enet_uint32 ENetVersion
+
+ +
+
+

Enumeration Type Documentation

+ +
+
+ + + + +
anonymous enum
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
Enumerator
ENET_HOST_RECEIVE_BUFFER_SIZE  +
ENET_HOST_SEND_BUFFER_SIZE  +
ENET_HOST_BANDWIDTH_THROTTLE_INTERVAL  +
ENET_HOST_DEFAULT_MTU  +
ENET_HOST_DEFAULT_MAXIMUM_PACKET_SIZE  +
ENET_HOST_DEFAULT_MAXIMUM_WAITING_DATA  +
ENET_PEER_DEFAULT_ROUND_TRIP_TIME  +
ENET_PEER_DEFAULT_PACKET_THROTTLE  +
ENET_PEER_PACKET_THROTTLE_SCALE  +
ENET_PEER_PACKET_THROTTLE_COUNTER  +
ENET_PEER_PACKET_THROTTLE_ACCELERATION  +
ENET_PEER_PACKET_THROTTLE_DECELERATION  +
ENET_PEER_PACKET_THROTTLE_INTERVAL  +
ENET_PEER_PACKET_LOSS_SCALE  +
ENET_PEER_PACKET_LOSS_INTERVAL  +
ENET_PEER_WINDOW_SIZE_SCALE  +
ENET_PEER_TIMEOUT_LIMIT  +
ENET_PEER_TIMEOUT_MINIMUM  +
ENET_PEER_TIMEOUT_MAXIMUM  +
ENET_PEER_PING_INTERVAL  +
ENET_PEER_UNSEQUENCED_WINDOWS  +
ENET_PEER_UNSEQUENCED_WINDOW_SIZE  +
ENET_PEER_FREE_UNSEQUENCED_WINDOWS  +
ENET_PEER_RELIABLE_WINDOWS  +
ENET_PEER_RELIABLE_WINDOW_SIZE  +
ENET_PEER_FREE_RELIABLE_WINDOWS  +
+ +
+
+ +
+
+ + + + +
enum ENetEventType
+
+ +

An ENet event type, as specified in ENetEvent.

+ + + + + +
Enumerator
ENET_EVENT_TYPE_NONE  +

no event occurred within the specified time limit

+
ENET_EVENT_TYPE_CONNECT  +

a connection request initiated by enet_host_connect has completed.

+

The peer field contains the peer which successfully connected.

+
ENET_EVENT_TYPE_DISCONNECT  +

a peer has disconnected.

+

This event is generated on a successful completion of a disconnect initiated by enet_pper_disconnect, if a peer has timed out, or if a connection request intialized by enet_host_connect has timed out. The peer field contains the peer which disconnected. The data field contains user supplied data describing the disconnection, or 0, if none is available.

+
ENET_EVENT_TYPE_RECEIVE  +

a packet has been received from a peer.

+

The peer field specifies the peer which sent the packet. The channelID field specifies the channel number upon which the packet was received. The packet field contains the packet that was received; this packet must be destroyed with enet_packet_destroy after use.

+
+ +
+
+ +
+
+ + + + +
enum ENetPacketFlag
+
+ +

Packet flag bit constants.

+

The host must be specified in network byte-order, and the port must be in host byte-order. The constant ENET_HOST_ANY may be used to specify the default server host.

+
See also
ENetPacket
+ + + + + + +
Enumerator
ENET_PACKET_FLAG_RELIABLE  +

packet must be received by the target peer and resend attempts should be made until the packet is delivered

+
ENET_PACKET_FLAG_UNSEQUENCED  +

packet will not be sequenced with other packets not supported for reliable packets

+
ENET_PACKET_FLAG_NO_ALLOCATE  +

packet will not allocate data, and user must supply it instead

+
ENET_PACKET_FLAG_UNRELIABLE_FRAGMENT  +

packet will be fragmented using unreliable (instead of reliable) sends if it exceeds the MTU

+
ENET_PACKET_FLAG_SENT  +

whether the packet has been sent from all queues it has been entered into

+
+ +
+
+ +
+
+ + + + +
enum ENetPeerState
+
+ + + + + + + + + + + +
Enumerator
ENET_PEER_STATE_DISCONNECTED  +
ENET_PEER_STATE_CONNECTING  +
ENET_PEER_STATE_ACKNOWLEDGING_CONNECT  +
ENET_PEER_STATE_CONNECTION_PENDING  +
ENET_PEER_STATE_CONNECTION_SUCCEEDED  +
ENET_PEER_STATE_CONNECTED  +
ENET_PEER_STATE_DISCONNECT_LATER  +
ENET_PEER_STATE_DISCONNECTING  +
ENET_PEER_STATE_ACKNOWLEDGING_DISCONNECT  +
ENET_PEER_STATE_ZOMBIE  +
+ +
+
+ +
+
+ + + + +
enum ENetSocketOption
+
+ + + + + + + + + + +
Enumerator
ENET_SOCKOPT_NONBLOCK  +
ENET_SOCKOPT_BROADCAST  +
ENET_SOCKOPT_RCVBUF  +
ENET_SOCKOPT_SNDBUF  +
ENET_SOCKOPT_REUSEADDR  +
ENET_SOCKOPT_RCVTIMEO  +
ENET_SOCKOPT_SNDTIMEO  +
ENET_SOCKOPT_ERROR  +
ENET_SOCKOPT_NODELAY  +
+ +
+
+ +
+
+ + + + +
enum ENetSocketShutdown
+
+ + + + +
Enumerator
ENET_SOCKET_SHUTDOWN_READ  +
ENET_SOCKET_SHUTDOWN_WRITE  +
ENET_SOCKET_SHUTDOWN_READ_WRITE  +
+ +
+
+ +
+
+ + + + +
enum ENetSocketType
+
+ + + +
Enumerator
ENET_SOCKET_TYPE_STREAM  +
ENET_SOCKET_TYPE_DATAGRAM  +
+ +
+
+ +
+
+ + + + +
enum ENetSocketWait
+
+ + + + + +
Enumerator
ENET_SOCKET_WAIT_NONE  +
ENET_SOCKET_WAIT_SEND  +
ENET_SOCKET_WAIT_RECEIVE  +
ENET_SOCKET_WAIT_INTERRUPT  +
+ +
+
+

Function Documentation

+ +
+
+ + + + + + + + +
enet_uint32 enet_host_random_seed (void )
+
+ +
+
+ +
+
+ + + + + + + + +
size_t enet_protocol_command_size (enet_uint8 )
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
size_t enet_range_coder_compress (void * ,
const ENetBuffer,
size_t ,
size_t ,
enet_uint8,
size_t  
)
+
+ +
+
+ +
+
+ + + + + + + + +
void* enet_range_coder_create (void )
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
size_t enet_range_coder_decompress (void * ,
const enet_uint8,
size_t ,
enet_uint8,
size_t  
)
+
+ +
+
+ +
+
+ + + + + + + + +
void enet_range_coder_destroy (void * )
+
+ +
+
+ +
+
+ + + + + + + + +
enet_uint32 enet_time_get (void )
+
+ +

Returns the wall-time in milliseconds.

+

Its initial value is unspecified unless otherwise set.

+ +
+
+ +
+
+ + + + + + + + +
void enet_time_set (enet_uint32 )
+
+ +

Sets the current wall-time in milliseconds.

+ +
+
+
+ + + + diff --git a/enet server test/enet2/docs/html/files.html b/enet server test/enet2/docs/html/files.html new file mode 100644 index 0000000..428b102 --- /dev/null +++ b/enet server test/enet2/docs/html/files.html @@ -0,0 +1,129 @@ + + + + + + +ENet: Files + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + + +
+ + + + +
+ +
+ +
+
+
Files
+
+
+
Here is a list of all files with brief descriptions:
+
[detail level 123]
+ + + + + + + + + + + + + + + + + + + + +
  include
  enet
 callbacks.hENet callbacks
 enet.hENet public header file
 list.hENet list management
 protocol.hENet protocol
 time.hENet time constants and macros
 types.hType definitions for ENet
 unix.hENet Unix header
 utility.hENet utility header
 win32.hENet Win32 header
 callbacks.cENet callback functions
 compress.cAn adaptive order-2 PPM range coder
 host.cENet host management functions
 list.cENet linked list functions
 packet.cENet packet management functions
 peer.cENet peer management functions
 protocol.cENet protocol functions
 unix.cENet Unix system specific functions
 win32.cENet Win32 system specific functions
+
+
+ + + + diff --git a/enet server test/enet2/docs/html/ftv2blank.png b/enet server test/enet2/docs/html/ftv2blank.png new file mode 100644 index 0000000000000000000000000000000000000000..63c605bb4c3d941c921a4b6cfa74951e946bcb48 GIT binary patch literal 86 zcmeAS@N?(olHy`uVBq!ia0vp^0zfRr!3HExu9B$%QnH>djv*C{Z|`mdau^P8_z}#X h?B8GEpdi4(BFDx$je&7RrDQEg&ePS;Wt~$(69Dh@6T1Ka literal 0 HcmV?d00001 diff --git a/enet server test/enet2/docs/html/ftv2doc.png b/enet server test/enet2/docs/html/ftv2doc.png new file mode 100644 index 0000000000000000000000000000000000000000..270862529494244182c2b347c107a6e9bd1d0680 GIT binary patch literal 837 zcmV-L1G@Z)P)Q~yDkgZrsN2W_ zn*`Kk$!5@}xn&PLY;iaeHCb3<=7YFwSw_ML7SNW~a}LG?dfJzThrRTClJkG)|C8VU z`~A1CnoK4Guxw}nmXl={=mC~;^}*%LOmc>)m;Wkj`F(tPoW!3AtUfCavx5>bKyC33 z!le-nKrU1#`1!AU6bpXVdp0Okd)Bknw~eYbRm@GyVK>^T@owSs(H?I8c0F&1ssfYF zgi&X}pf#e?=#&j*pws3Rw27_Y*IVHMSEC#TMJ5PpUZxy~R z2@Gg7T1BGQ>J_m@`rN;JpXN{t<<1J6qKg|32k|@ov7kNJ0W5lQhHTNB6$FFr^}7X^ z$%W76qhPIz+URyRzqg5V16|DiGt21TzW`*BQ(!X)n59i0O*~@q#UyTvTMGIqD{L!h z+SN?>K$z8yl@x98Fe3>@q}%|OqS~T`2`uQeI_{2qOD3Hm8fxR#@HZqANyL>Rdb6JT z$_D;;{*1BeF=i8U09oXmz$gc;HF2S_o4vLBa9iEP8$0>r&}SU4JHgqyE*gR%O6_H= z^R6Q~lLW{jk3edWG{NcNcKZAJiGLsC{fkkKe0rEeZ3p@2yQ6fD#FhI{A_Pb!QUF=x zy~!r2rhVaSw6~q&e59NHj|XVo-^x#e_h^6Tw0z0%TD??AZ30jur$8@NQ=Z_9UwgSa zbcKVLn%IBrU3zZ!aPr6FeAxQ|@vgX(l~pQ$2SAmaAv;V?=F{^;%Jv`{MQVIol(k?K zn0hfq!Nx+YQV{_1k@twK2FpSQU-on6hYr;Y)XTxgtB=X5F!kcFxsl};f# zMQmmpf<<_P!|GHh6bcoJ#3DR`hk!4D;1>Y0P!0L3$k!UC0scGx|G&&v#X{Fpq}ESm P00000NkvXXu0mjfk_3_C literal 0 HcmV?d00001 diff --git a/enet server test/enet2/docs/html/ftv2folderclosed.png b/enet server test/enet2/docs/html/ftv2folderclosed.png new file mode 100644 index 0000000000000000000000000000000000000000..bf0db4799c31ae5d4416b84b921ecadc38efc987 GIT binary patch literal 621 zcmV-z0+RiSP)LIX}Q7L(i#^R>(*{vZ_!w9 z(7f8Tx^}rn{YqWy6;`yp+FWJt#U6KV@7(*}5`Fpk8KI=Lr4qVCzST!jA77WttPPT5 zyB^D!p%}7IUH~YdKwwICI5^Y+rLDcuW(ZA?$i&(vpqn%62K~4XP{7m-%&tr@Ly%@6 zN5R~>vrT3$TYyOvnq1qupjzA4I6f(XBQPV;fn6{m1WJs3y|TxC_kd5`gItq~CDKm4 zuxEpsli}vvNs);hog}wz2@+427a)%*J9((E1Z0-b^O0dg|6$w{aiH%!tUYbWcR32JRU2jt|BGB6`Lijc85aRMm9 z3(~TUo9qJ=Q0#$u7G9;#LiTCMerI=^?N6n81|Ww5!NUiS9veMK280G8Bo;A|jO_V0 zwz(g3{v2hmY*7j3nGY)Vt^heH5Zqec+yVGo`1k+OW=`-6?e;wJ_sP5W00000NkvXX Hu0mjf_nRM} literal 0 HcmV?d00001 diff --git a/enet server test/enet2/docs/html/ftv2folderopen.png b/enet server test/enet2/docs/html/ftv2folderopen.png new file mode 100644 index 0000000000000000000000000000000000000000..9af34004589ea36d7fb9ee009e0a0e284e4b9efc GIT binary patch literal 673 zcmV;S0$%-zP)_&Xd;oiA3@1FacH(P;H3IHnx z5dc;a|1iN!_C7uM_y8S!l%gYWba{1D2ae40NE{b+x2JH z@bGztlTeL95Cw=Xk>kn4Qvm>KA*reg05;rweM4<_dmxD}XjFsTBqI??Ai5@scqE3l za0shHtx$pra-VWIy7kxv0H}pfJEq$&ZllGI-(cGHNDawQ(s-G5ZvWJN`}yWXgpF~8alJFj40FftaKY3M!;60o~{ zfZ}2i^AFxNCg>PhPnC#b*<7tV-J7ehSU@(jV0lpYORjcM&v|ulPK0#{adjv*C{Z|`mdau^P8_z}#X h?B8GEpdi4(BFDx$je&7RrDQEg&ePS;Wt~$(69Dh@6T1Ka literal 0 HcmV?d00001 diff --git a/enet server test/enet2/docs/html/ftv2link.png b/enet server test/enet2/docs/html/ftv2link.png new file mode 100644 index 0000000000000000000000000000000000000000..270862529494244182c2b347c107a6e9bd1d0680 GIT binary patch literal 837 zcmV-L1G@Z)P)Q~yDkgZrsN2W_ zn*`Kk$!5@}xn&PLY;iaeHCb3<=7YFwSw_ML7SNW~a}LG?dfJzThrRTClJkG)|C8VU z`~A1CnoK4Guxw}nmXl={=mC~;^}*%LOmc>)m;Wkj`F(tPoW!3AtUfCavx5>bKyC33 z!le-nKrU1#`1!AU6bpXVdp0Okd)Bknw~eYbRm@GyVK>^T@owSs(H?I8c0F&1ssfYF zgi&X}pf#e?=#&j*pws3Rw27_Y*IVHMSEC#TMJ5PpUZxy~R z2@Gg7T1BGQ>J_m@`rN;JpXN{t<<1J6qKg|32k|@ov7kNJ0W5lQhHTNB6$FFr^}7X^ z$%W76qhPIz+URyRzqg5V16|DiGt21TzW`*BQ(!X)n59i0O*~@q#UyTvTMGIqD{L!h z+SN?>K$z8yl@x98Fe3>@q}%|OqS~T`2`uQeI_{2qOD3Hm8fxR#@HZqANyL>Rdb6JT z$_D;;{*1BeF=i8U09oXmz$gc;HF2S_o4vLBa9iEP8$0>r&}SU4JHgqyE*gR%O6_H= z^R6Q~lLW{jk3edWG{NcNcKZAJiGLsC{fkkKe0rEeZ3p@2yQ6fD#FhI{A_Pb!QUF=x zy~!r2rhVaSw6~q&e59NHj|XVo-^x#e_h^6Tw0z0%TD??AZ30jur$8@NQ=Z_9UwgSa zbcKVLn%IBrU3zZ!aPr6FeAxQ|@vgX(l~pQ$2SAmaAv;V?=F{^;%Jv`{MQVIol(k?K zn0hfq!Nx+YQV{_1k@twK2FpSQU-on6hYr;Y)XTxgtB=X5F!kcFxsl};f# zMQmmpf<<_P!|GHh6bcoJ#3DR`hk!4D;1>Y0P!0L3$k!UC0scGx|G&&v#X{Fpq}ESm P00000NkvXXu0mjfk_3_C literal 0 HcmV?d00001 diff --git a/enet server test/enet2/docs/html/ftv2mlastnode.png b/enet server test/enet2/docs/html/ftv2mlastnode.png new file mode 100644 index 0000000000000000000000000000000000000000..955e9f0fc907953567db356ec8766f9312c5b1df GIT binary patch literal 242 zcmVgbRUSb9i sqYz>c=t$i&fEdY(^lfqTnCfEi275X#XUnZnV*mgE07*qoM6N<$f~9I)1poj5 literal 0 HcmV?d00001 diff --git a/enet server test/enet2/docs/html/ftv2mnode.png b/enet server test/enet2/docs/html/ftv2mnode.png new file mode 100644 index 0000000000000000000000000000000000000000..955e9f0fc907953567db356ec8766f9312c5b1df GIT binary patch literal 242 zcmVgbRUSb9i sqYz>c=t$i&fEdY(^lfqTnCfEi275X#XUnZnV*mgE07*qoM6N<$f~9I)1poj5 literal 0 HcmV?d00001 diff --git a/enet server test/enet2/docs/html/ftv2node.png b/enet server test/enet2/docs/html/ftv2node.png new file mode 100644 index 0000000000000000000000000000000000000000..63c605bb4c3d941c921a4b6cfa74951e946bcb48 GIT binary patch literal 86 zcmeAS@N?(olHy`uVBq!ia0vp^0zfRr!3HExu9B$%QnH>djv*C{Z|`mdau^P8_z}#X h?B8GEpdi4(BFDx$je&7RrDQEg&ePS;Wt~$(69Dh@6T1Ka literal 0 HcmV?d00001 diff --git a/enet server test/enet2/docs/html/ftv2plastnode.png b/enet server test/enet2/docs/html/ftv2plastnode.png new file mode 100644 index 0000000000000000000000000000000000000000..29d3231d8a34761754775d71e732f143d2a39ca9 GIT binary patch literal 221 zcmeAS@N?(olHy`uVBq!ia0vp^0zfRr!3HExu9B$%QcFBt978G?-`?HGdB{Pe{iDBN zjI+1nNv1+3!Q&e?`o07*wg+6{oa5lP;fiTc?7yXQ-{AmhX=Jf@Vh8$DwSCE6dd z=c`Rn*yY4#uwcd^r3BTKhC6C^Ch!z(c0R#0EsV`D`3~<9t+h)JCjT^j`6jMnfBeS} z`h0U(!_se0p1u11`|HQu=kwj0_g-FB{@uYn8izEx47!wh7I7>lhFRtMtMqU2&ExII zQ}63+zZG4(^G;3O_I*44S8U!_y3O|H-@CfM-{x(8b4h!D)z5Xy>-|sH{r_Bgli%L& rcc!3QU`wD#qKK=6D{;&(@>Og`UM_e21l*4UgMq=*)z4*}Q$iB}0R4T- literal 0 HcmV?d00001 diff --git a/enet server test/enet2/docs/html/ftv2vertline.png b/enet server test/enet2/docs/html/ftv2vertline.png new file mode 100644 index 0000000000000000000000000000000000000000..63c605bb4c3d941c921a4b6cfa74951e946bcb48 GIT binary patch literal 86 zcmeAS@N?(olHy`uVBq!ia0vp^0zfRr!3HExu9B$%QnH>djv*C{Z|`mdau^P8_z}#X h?B8GEpdi4(BFDx$je&7RrDQEg&ePS;Wt~$(69Dh@6T1Ka literal 0 HcmV?d00001 diff --git a/enet server test/enet2/docs/html/globals.html b/enet server test/enet2/docs/html/globals.html new file mode 100644 index 0000000..e1d7fed --- /dev/null +++ b/enet server test/enet2/docs/html/globals.html @@ -0,0 +1,958 @@ + + + + + + +ENet: Globals + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + + + + +
+ + + + +
+ +
+ +
+
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:
+ +

- e -

+
+ + + + diff --git a/enet server test/enet2/docs/html/globals_defs.html b/enet server test/enet2/docs/html/globals_defs.html new file mode 100644 index 0000000..87e0931 --- /dev/null +++ b/enet server test/enet2/docs/html/globals_defs.html @@ -0,0 +1,311 @@ + + + + + + +ENet: Globals + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + + + + +
+ + + + +
+ +
+ +
+  + +

- e -

+ + +

- m -

+
+ + + + diff --git a/enet server test/enet2/docs/html/globals_enum.html b/enet server test/enet2/docs/html/globals_enum.html new file mode 100644 index 0000000..b72bbb8 --- /dev/null +++ b/enet server test/enet2/docs/html/globals_enum.html @@ -0,0 +1,140 @@ + + + + + + +ENet: Globals + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + + + +
+ + + + +
+ +
+ +
+
+ + + + diff --git a/enet server test/enet2/docs/html/globals_eval.html b/enet server test/enet2/docs/html/globals_eval.html new file mode 100644 index 0000000..7143eb0 --- /dev/null +++ b/enet server test/enet2/docs/html/globals_eval.html @@ -0,0 +1,426 @@ + + + + + + +ENet: Globals + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + + + + +
+ + + + +
+ +
+ +
+  + +

- e -

    +
  • ENET_CONTEXT_ESCAPE_MINIMUM +: compress.c +
  • +
  • ENET_CONTEXT_SYMBOL_DELTA +: compress.c +
  • +
  • ENET_CONTEXT_SYMBOL_MINIMUM +: compress.c +
  • +
  • ENET_EVENT_TYPE_CONNECT +: enet.h +
  • +
  • ENET_EVENT_TYPE_DISCONNECT +: enet.h +
  • +
  • ENET_EVENT_TYPE_NONE +: enet.h +
  • +
  • ENET_EVENT_TYPE_RECEIVE +: enet.h +
  • +
  • ENET_HOST_BANDWIDTH_THROTTLE_INTERVAL +: enet.h +
  • +
  • ENET_HOST_DEFAULT_MAXIMUM_PACKET_SIZE +: enet.h +
  • +
  • ENET_HOST_DEFAULT_MAXIMUM_WAITING_DATA +: enet.h +
  • +
  • ENET_HOST_DEFAULT_MTU +: enet.h +
  • +
  • ENET_HOST_RECEIVE_BUFFER_SIZE +: enet.h +
  • +
  • ENET_HOST_SEND_BUFFER_SIZE +: enet.h +
  • +
  • ENET_PACKET_FLAG_NO_ALLOCATE +: enet.h +
  • +
  • ENET_PACKET_FLAG_RELIABLE +: enet.h +
  • +
  • ENET_PACKET_FLAG_SENT +: enet.h +
  • +
  • ENET_PACKET_FLAG_UNRELIABLE_FRAGMENT +: enet.h +
  • +
  • ENET_PACKET_FLAG_UNSEQUENCED +: enet.h +
  • +
  • ENET_PEER_DEFAULT_PACKET_THROTTLE +: enet.h +
  • +
  • ENET_PEER_DEFAULT_ROUND_TRIP_TIME +: enet.h +
  • +
  • ENET_PEER_FREE_RELIABLE_WINDOWS +: enet.h +
  • +
  • ENET_PEER_FREE_UNSEQUENCED_WINDOWS +: enet.h +
  • +
  • ENET_PEER_PACKET_LOSS_INTERVAL +: enet.h +
  • +
  • ENET_PEER_PACKET_LOSS_SCALE +: enet.h +
  • +
  • ENET_PEER_PACKET_THROTTLE_ACCELERATION +: enet.h +
  • +
  • ENET_PEER_PACKET_THROTTLE_COUNTER +: enet.h +
  • +
  • ENET_PEER_PACKET_THROTTLE_DECELERATION +: enet.h +
  • +
  • ENET_PEER_PACKET_THROTTLE_INTERVAL +: enet.h +
  • +
  • ENET_PEER_PACKET_THROTTLE_SCALE +: enet.h +
  • +
  • ENET_PEER_PING_INTERVAL +: enet.h +
  • +
  • ENET_PEER_RELIABLE_WINDOW_SIZE +: enet.h +
  • +
  • ENET_PEER_RELIABLE_WINDOWS +: enet.h +
  • +
  • ENET_PEER_STATE_ACKNOWLEDGING_CONNECT +: enet.h +
  • +
  • ENET_PEER_STATE_ACKNOWLEDGING_DISCONNECT +: enet.h +
  • +
  • ENET_PEER_STATE_CONNECTED +: enet.h +
  • +
  • ENET_PEER_STATE_CONNECTING +: enet.h +
  • +
  • ENET_PEER_STATE_CONNECTION_PENDING +: enet.h +
  • +
  • ENET_PEER_STATE_CONNECTION_SUCCEEDED +: enet.h +
  • +
  • ENET_PEER_STATE_DISCONNECT_LATER +: enet.h +
  • +
  • ENET_PEER_STATE_DISCONNECTED +: enet.h +
  • +
  • ENET_PEER_STATE_DISCONNECTING +: enet.h +
  • +
  • ENET_PEER_STATE_ZOMBIE +: enet.h +
  • +
  • ENET_PEER_TIMEOUT_LIMIT +: enet.h +
  • +
  • ENET_PEER_TIMEOUT_MAXIMUM +: enet.h +
  • +
  • ENET_PEER_TIMEOUT_MINIMUM +: enet.h +
  • +
  • ENET_PEER_UNSEQUENCED_WINDOW_SIZE +: enet.h +
  • +
  • ENET_PEER_UNSEQUENCED_WINDOWS +: enet.h +
  • +
  • ENET_PEER_WINDOW_SIZE_SCALE +: enet.h +
  • +
  • ENET_PROTOCOL_COMMAND_ACKNOWLEDGE +: protocol.h +
  • +
  • ENET_PROTOCOL_COMMAND_BANDWIDTH_LIMIT +: protocol.h +
  • +
  • ENET_PROTOCOL_COMMAND_CONNECT +: protocol.h +
  • +
  • ENET_PROTOCOL_COMMAND_COUNT +: protocol.h +
  • +
  • ENET_PROTOCOL_COMMAND_DISCONNECT +: protocol.h +
  • +
  • ENET_PROTOCOL_COMMAND_FLAG_ACKNOWLEDGE +: protocol.h +
  • +
  • ENET_PROTOCOL_COMMAND_FLAG_UNSEQUENCED +: protocol.h +
  • +
  • ENET_PROTOCOL_COMMAND_MASK +: protocol.h +
  • +
  • ENET_PROTOCOL_COMMAND_NONE +: protocol.h +
  • +
  • ENET_PROTOCOL_COMMAND_PING +: protocol.h +
  • +
  • ENET_PROTOCOL_COMMAND_SEND_FRAGMENT +: protocol.h +
  • +
  • ENET_PROTOCOL_COMMAND_SEND_RELIABLE +: protocol.h +
  • +
  • ENET_PROTOCOL_COMMAND_SEND_UNRELIABLE +: protocol.h +
  • +
  • ENET_PROTOCOL_COMMAND_SEND_UNRELIABLE_FRAGMENT +: protocol.h +
  • +
  • ENET_PROTOCOL_COMMAND_SEND_UNSEQUENCED +: protocol.h +
  • +
  • ENET_PROTOCOL_COMMAND_THROTTLE_CONFIGURE +: protocol.h +
  • +
  • ENET_PROTOCOL_COMMAND_VERIFY_CONNECT +: protocol.h +
  • +
  • ENET_PROTOCOL_HEADER_FLAG_COMPRESSED +: protocol.h +
  • +
  • ENET_PROTOCOL_HEADER_FLAG_MASK +: protocol.h +
  • +
  • ENET_PROTOCOL_HEADER_FLAG_SENT_TIME +: protocol.h +
  • +
  • ENET_PROTOCOL_HEADER_SESSION_MASK +: protocol.h +
  • +
  • ENET_PROTOCOL_HEADER_SESSION_SHIFT +: protocol.h +
  • +
  • ENET_PROTOCOL_MAXIMUM_CHANNEL_COUNT +: protocol.h +
  • +
  • ENET_PROTOCOL_MAXIMUM_FRAGMENT_COUNT +: protocol.h +
  • +
  • ENET_PROTOCOL_MAXIMUM_MTU +: protocol.h +
  • +
  • ENET_PROTOCOL_MAXIMUM_PACKET_COMMANDS +: protocol.h +
  • +
  • ENET_PROTOCOL_MAXIMUM_PEER_ID +: protocol.h +
  • +
  • ENET_PROTOCOL_MAXIMUM_WINDOW_SIZE +: protocol.h +
  • +
  • ENET_PROTOCOL_MINIMUM_CHANNEL_COUNT +: protocol.h +
  • +
  • ENET_PROTOCOL_MINIMUM_MTU +: protocol.h +
  • +
  • ENET_PROTOCOL_MINIMUM_WINDOW_SIZE +: protocol.h +
  • +
  • ENET_RANGE_CODER_BOTTOM +: compress.c +
  • +
  • ENET_RANGE_CODER_TOP +: compress.c +
  • +
  • ENET_SOCKET_SHUTDOWN_READ +: enet.h +
  • +
  • ENET_SOCKET_SHUTDOWN_READ_WRITE +: enet.h +
  • +
  • ENET_SOCKET_SHUTDOWN_WRITE +: enet.h +
  • +
  • ENET_SOCKET_TYPE_DATAGRAM +: enet.h +
  • +
  • ENET_SOCKET_TYPE_STREAM +: enet.h +
  • +
  • ENET_SOCKET_WAIT_INTERRUPT +: enet.h +
  • +
  • ENET_SOCKET_WAIT_NONE +: enet.h +
  • +
  • ENET_SOCKET_WAIT_RECEIVE +: enet.h +
  • +
  • ENET_SOCKET_WAIT_SEND +: enet.h +
  • +
  • ENET_SOCKOPT_BROADCAST +: enet.h +
  • +
  • ENET_SOCKOPT_ERROR +: enet.h +
  • +
  • ENET_SOCKOPT_NODELAY +: enet.h +
  • +
  • ENET_SOCKOPT_NONBLOCK +: enet.h +
  • +
  • ENET_SOCKOPT_RCVBUF +: enet.h +
  • +
  • ENET_SOCKOPT_RCVTIMEO +: enet.h +
  • +
  • ENET_SOCKOPT_REUSEADDR +: enet.h +
  • +
  • ENET_SOCKOPT_SNDBUF +: enet.h +
  • +
  • ENET_SOCKOPT_SNDTIMEO +: enet.h +
  • +
  • ENET_SUBCONTEXT_ESCAPE_DELTA +: compress.c +
  • +
  • ENET_SUBCONTEXT_ORDER +: compress.c +
  • +
  • ENET_SUBCONTEXT_SYMBOL_DELTA +: compress.c +
  • +
+
+ + + + diff --git a/enet server test/enet2/docs/html/globals_func.html b/enet server test/enet2/docs/html/globals_func.html new file mode 100644 index 0000000..faa070a --- /dev/null +++ b/enet server test/enet2/docs/html/globals_func.html @@ -0,0 +1,408 @@ + + + + + + +ENet: Globals + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + + + + +
+ + + + +
+ +
+ +
+  + +

- e -

+
+ + + + diff --git a/enet server test/enet2/docs/html/globals_m.html b/enet server test/enet2/docs/html/globals_m.html new file mode 100644 index 0000000..5acdca5 --- /dev/null +++ b/enet server test/enet2/docs/html/globals_m.html @@ -0,0 +1,125 @@ + + + + + + +ENet: Globals + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + + + + +
+ + + + +
+ +
+ +
+
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:
+ +

- m -

+
+ + + + diff --git a/enet server test/enet2/docs/html/globals_s.html b/enet server test/enet2/docs/html/globals_s.html new file mode 100644 index 0000000..b9112d8 --- /dev/null +++ b/enet server test/enet2/docs/html/globals_s.html @@ -0,0 +1,125 @@ + + + + + + +ENet: Globals + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + + + + +
+ + + + +
+ +
+ +
+
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:
+ +

- s -

+
+ + + + diff --git a/enet server test/enet2/docs/html/globals_type.html b/enet server test/enet2/docs/html/globals_type.html new file mode 100644 index 0000000..cb9e95c --- /dev/null +++ b/enet server test/enet2/docs/html/globals_type.html @@ -0,0 +1,148 @@ + + + + + + +ENet: Globals + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + + + +
+ + + + +
+ +
+ +
+
+ + + + diff --git a/enet server test/enet2/docs/html/group__Address.html b/enet server test/enet2/docs/html/group__Address.html new file mode 100644 index 0000000..32e4e27 --- /dev/null +++ b/enet server test/enet2/docs/html/group__Address.html @@ -0,0 +1,263 @@ + + + + + + +ENet: ENet address functions + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + +
+ + + + +
+ +
+ +
+ +
+
ENet address functions
+
+
+ + + + + + + + + + + +

+Functions

int enet_address_get_host (const ENetAddress *address, char *hostName, size_t nameLength)
 Attempts to do a reverse lookup of the host field in the address parameter. More...
 
int enet_address_get_host_ip (const ENetAddress *address, char *hostName, size_t nameLength)
 Gives the printable form of the IP address specified in the address parameter. More...
 
int enet_address_set_host (ENetAddress *address, const char *hostName)
 Attempts to resolve the host named by the parameter hostName and sets the host field in the address parameter if successful. More...
 
+

Detailed Description

+

Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
int enet_address_get_host (const ENetAddressaddress,
char * hostName,
size_t nameLength 
)
+
+ +

#include <include/enet/enet.h>

+ +

Attempts to do a reverse lookup of the host field in the address parameter.

+
Parameters
+ + + + +
addressaddress used for reverse lookup
hostNamedestination for name, must not be NULL
nameLengthmaximum length of hostName.
+
+
+
Returns
the null-terminated name of the host in hostName on success
+
Return values
+ + + +
0on success
<0 on failure
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
int enet_address_get_host_ip (const ENetAddressaddress,
char * hostName,
size_t nameLength 
)
+
+ +

#include <include/enet/enet.h>

+ +

Gives the printable form of the IP address specified in the address parameter.

+
Parameters
+ + + + +
addressaddress printed
hostNamedestination for name, must not be NULL
nameLengthmaximum length of hostName.
+
+
+
Returns
the null-terminated name of the host in hostName on success
+
Return values
+ + + +
0on success
<0 on failure
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
int enet_address_set_host (ENetAddressaddress,
const char * hostName 
)
+
+ +

#include <include/enet/enet.h>

+ +

Attempts to resolve the host named by the parameter hostName and sets the host field in the address parameter if successful.

+
Parameters
+ + + +
addressdestination to store resolved address
hostNamehost name to lookup
+
+
+
Return values
+ + + +
0on success
<0 on failure
+
+
+
Returns
the address of the given hostName in address on success
+ +
+
+
+ + + + diff --git a/enet server test/enet2/docs/html/group__Packet.html b/enet server test/enet2/docs/html/group__Packet.html new file mode 100644 index 0000000..cf93ef2 --- /dev/null +++ b/enet server test/enet2/docs/html/group__Packet.html @@ -0,0 +1,253 @@ + + + + + + +ENet: ENet packet functions + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + +
+ + + + +
+ +
+ +
+ +
+
ENet packet functions
+
+
+ + + + + + + + + + + + + +

+Functions

enet_uint32 enet_crc32 (const ENetBuffer *buffers, size_t bufferCount)
 
ENetPacketenet_packet_create (const void *data, size_t dataLength, enet_uint32 flags)
 Creates a packet that may be sent to a peer. More...
 
void enet_packet_destroy (ENetPacket *packet)
 Destroys the packet and deallocates its data. More...
 
int enet_packet_resize (ENetPacket *packet, size_t dataLength)
 Attempts to resize the data in the packet to length specified in the dataLength parameter. More...
 
+

Detailed Description

+

Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
enet_uint32 enet_crc32 (const ENetBufferbuffers,
size_t bufferCount 
)
+
+ +

#include <packet.c>

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
ENetPacket* enet_packet_create (const void * data,
size_t dataLength,
enet_uint32 flags 
)
+
+ +

#include <packet.c>

+ +

Creates a packet that may be sent to a peer.

+
Parameters
+ + + + +
datainitial contents of the packet's data; the packet's data will remain uninitialized if data is NULL.
dataLengthsize of the data allocated for this packet
flagsflags for this packet as described for the ENetPacket structure.
+
+
+
Returns
the packet on success, NULL on failure
+ +
+
+ +
+
+ + + + + + + + +
void enet_packet_destroy (ENetPacketpacket)
+
+ +

#include <packet.c>

+ +

Destroys the packet and deallocates its data.

+
Parameters
+ + +
packetpacket to be destroyed
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
int enet_packet_resize (ENetPacketpacket,
size_t dataLength 
)
+
+ +

#include <packet.c>

+ +

Attempts to resize the data in the packet to length specified in the dataLength parameter.

+
Parameters
+ + + +
packetpacket to resize
dataLengthnew size for the packet data
+
+
+
Returns
0 on success, < 0 on failure
+ +
+
+
+ + + + diff --git a/enet server test/enet2/docs/html/group__callbacks.html b/enet server test/enet2/docs/html/group__callbacks.html new file mode 100644 index 0000000..ab819d5 --- /dev/null +++ b/enet server test/enet2/docs/html/group__callbacks.html @@ -0,0 +1,145 @@ + + + + + + +ENet: ENet internal callbacks + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + +
+ + + + +
+ +
+ +
+ +
+
+
+
+ + + + + + +

+Functions

void enet_free (void *)
 
void * enet_malloc (size_t)
 
+

Detailed Description

+

Function Documentation

+ +
+
+ + + + + + + + +
void enet_free (void * )
+
+ +

#include <include/enet/callbacks.h>

+ +
+
+ +
+
+ + + + + + + + +
void* enet_malloc (size_t )
+
+ +

#include <include/enet/callbacks.h>

+ +
+
+
+ + + + diff --git a/enet server test/enet2/docs/html/group__global.html b/enet server test/enet2/docs/html/group__global.html new file mode 100644 index 0000000..9c49252 --- /dev/null +++ b/enet server test/enet2/docs/html/group__global.html @@ -0,0 +1,219 @@ + + + + + + +ENet: ENet global functions + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + +
+ + + + +
+ +
+ +
+ +
+
ENet global functions
+
+
+ + + + + + + + + + + + + + +

+Functions

void enet_deinitialize (void)
 Shuts down ENet globally. More...
 
int enet_initialize (void)
 Initializes ENet globally. More...
 
int enet_initialize_with_callbacks (ENetVersion version, const ENetCallbacks *inits)
 Initializes ENet globally and supplies user-overridden callbacks. More...
 
ENetVersion enet_linked_version (void)
 Gives the linked version of the ENet library. More...
 
+

Detailed Description

+

Function Documentation

+ +
+
+ + + + + + + + +
void enet_deinitialize (void )
+
+ +

#include <include/enet/enet.h>

+ +

Shuts down ENet globally.

+

Should be called when a program that has initialized ENet exits.

+ +
+
+ +
+
+ + + + + + + + +
int enet_initialize (void )
+
+ +

#include <include/enet/enet.h>

+ +

Initializes ENet globally.

+

Must be called prior to using any functions in ENet.

Returns
0 on success, < 0 on failure
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
int enet_initialize_with_callbacks (ENetVersion version,
const ENetCallbacksinits 
)
+
+ +

#include <include/enet/enet.h>

+ +

Initializes ENet globally and supplies user-overridden callbacks.

+

Must be called prior to using any functions in ENet. Do not use enet_initialize() if you use this variant. Make sure the ENetCallbacks structure is zeroed out so that any additional callbacks added in future versions will be properly ignored.

+
Parameters
+ + + +
versionthe constant ENET_VERSION should be supplied so ENet knows which version of ENetCallbacks struct to use
initsuser-overridden callbacks where any NULL callbacks will use ENet's defaults
+
+
+
Returns
0 on success, < 0 on failure
+ +
+
+ +
+
+ + + + + + + + +
ENetVersion enet_linked_version (void )
+
+ +

#include <include/enet/enet.h>

+ +

Gives the linked version of the ENet library.

+
Returns
the version number
+ +
+
+
+ + + + diff --git a/enet server test/enet2/docs/html/group__host.html b/enet server test/enet2/docs/html/group__host.html new file mode 100644 index 0000000..1ab3a8f --- /dev/null +++ b/enet server test/enet2/docs/html/group__host.html @@ -0,0 +1,612 @@ + + + + + + +ENet: ENet host functions + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + +
+ + + + +
+ +
+ +
+ +
+
ENet host functions
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

void enet_host_bandwidth_limit (ENetHost *host, enet_uint32 incomingBandwidth, enet_uint32 outgoingBandwidth)
 Adjusts the bandwidth limits of a host. More...
 
void enet_host_bandwidth_throttle (ENetHost *host)
 
void enet_host_broadcast (ENetHost *host, enet_uint8 channelID, ENetPacket *packet)
 Queues a packet to be sent to all peers associated with the host. More...
 
void enet_host_channel_limit (ENetHost *host, size_t channelLimit)
 Limits the maximum allowed channels of future incoming connections. More...
 
int enet_host_check_events (ENetHost *host, ENetEvent *event)
 Checks for any queued events on the host and dispatches one if available. More...
 
void enet_host_compress (ENetHost *host, const ENetCompressor *compressor)
 Sets the packet compressor the host should use to compress and decompress packets. More...
 
int enet_host_compress_with_range_coder (ENetHost *host)
 Sets the packet compressor the host should use to the default range coder. More...
 
ENetPeerenet_host_connect (ENetHost *host, const ENetAddress *address, size_t channelCount, enet_uint32 data)
 Initiates a connection to a foreign host. More...
 
ENetHostenet_host_create (const ENetAddress *address, size_t peerCount, size_t channelLimit, enet_uint32 incomingBandwidth, enet_uint32 outgoingBandwidth)
 Creates a host for communicating to peers. More...
 
void enet_host_destroy (ENetHost *host)
 Destroys the host and all resources associated with it. More...
 
void enet_host_flush (ENetHost *host)
 Sends any queued packets on the host specified to its designated peers. More...
 
int enet_host_service (ENetHost *host, ENetEvent *event, enet_uint32 timeout)
 Waits for events on the host specified and shuttles packets between the host and its peers. More...
 
+

Detailed Description

+

Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void enet_host_bandwidth_limit (ENetHosthost,
enet_uint32 incomingBandwidth,
enet_uint32 outgoingBandwidth 
)
+
+ +

#include <host.c>

+ +

Adjusts the bandwidth limits of a host.

+
Parameters
+ + + + +
hosthost to adjust
incomingBandwidthnew incoming bandwidth
outgoingBandwidthnew outgoing bandwidth
+
+
+
Remarks
the incoming and outgoing bandwidth parameters are identical in function to those specified in enet_host_create().
+ +
+
+ +
+
+ + + + + + + + +
void enet_host_bandwidth_throttle (ENetHosthost)
+
+ +

#include <host.c>

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void enet_host_broadcast (ENetHosthost,
enet_uint8 channelID,
ENetPacketpacket 
)
+
+ +

#include <host.c>

+ +

Queues a packet to be sent to all peers associated with the host.

+
Parameters
+ + + + +
hosthost on which to broadcast the packet
channelIDchannel on which to broadcast
packetpacket to broadcast
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void enet_host_channel_limit (ENetHosthost,
size_t channelLimit 
)
+
+ +

#include <host.c>

+ +

Limits the maximum allowed channels of future incoming connections.

+
Parameters
+ + + +
hosthost to limit
channelLimitthe maximum number of channels allowed; if 0, then this is equivalent to ENET_PROTOCOL_MAXIMUM_CHANNEL_COUNT
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
int enet_host_check_events (ENetHosthost,
ENetEventevent 
)
+
+ +

#include <protocol.c>

+ +

Checks for any queued events on the host and dispatches one if available.

+
Parameters
+ + + +
hosthost to check for events
eventan event structure where event details will be placed if available
+
+
+
Return values
+ + + + +
>0 if an event was dispatched
0if no events are available
<0 on failure
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void enet_host_compress (ENetHosthost,
const ENetCompressorcompressor 
)
+
+ +

#include <host.c>

+ +

Sets the packet compressor the host should use to compress and decompress packets.

+
Parameters
+ + + +
hosthost to enable or disable compression for
compressorcallbacks for for the packet compressor; if NULL, then compression is disabled
+
+
+ +
+
+ +
+
+ + + + + + + + +
int enet_host_compress_with_range_coder (ENetHosthost)
+
+ +

#include <compress.c>

+ +

Sets the packet compressor the host should use to the default range coder.

+
Parameters
+ + +
hosthost to enable the range coder for
+
+
+
Returns
0 on success, < 0 on failure
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ENetPeer* enet_host_connect (ENetHosthost,
const ENetAddressaddress,
size_t channelCount,
enet_uint32 data 
)
+
+ +

#include <host.c>

+ +

Initiates a connection to a foreign host.

+
Parameters
+ + + + + +
hosthost seeking the connection
addressdestination for the connection
channelCountnumber of channels to allocate
datauser data supplied to the receiving host
+
+
+
Returns
a peer representing the foreign host on success, NULL on failure
+
Remarks
The peer returned will have not completed the connection until enet_host_service() notifies of an ENET_EVENT_TYPE_CONNECT event for the peer.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ENetHost* enet_host_create (const ENetAddressaddress,
size_t peerCount,
size_t channelLimit,
enet_uint32 incomingBandwidth,
enet_uint32 outgoingBandwidth 
)
+
+ +

#include <host.c>

+ +

Creates a host for communicating to peers.

+
Parameters
+ + + + + + +
addressthe address at which other peers may connect to this host. If NULL, then no peers may connect to the host.
peerCountthe maximum number of peers that should be allocated for the host.
channelLimitthe maximum number of channels allowed; if 0, then this is equivalent to ENET_PROTOCOL_MAXIMUM_CHANNEL_COUNT
incomingBandwidthdownstream bandwidth of the host in bytes/second; if 0, ENet will assume unlimited bandwidth.
outgoingBandwidthupstream bandwidth of the host in bytes/second; if 0, ENet will assume unlimited bandwidth.
+
+
+
Returns
the host on success and NULL on failure
+
Remarks
ENet will strategically drop packets on specific sides of a connection between hosts to ensure the host's bandwidth is not overwhelmed. The bandwidth parameters also determine the window size of a connection which limits the amount of reliable packets that may be in transit at any given time.
+ +
+
+ +
+
+ + + + + + + + +
void enet_host_destroy (ENetHosthost)
+
+ +

#include <host.c>

+ +

Destroys the host and all resources associated with it.

+
Parameters
+ + +
hostpointer to the host to destroy
+
+
+ +
+
+ +
+
+ + + + + + + + +
void enet_host_flush (ENetHosthost)
+
+ +

#include <protocol.c>

+ +

Sends any queued packets on the host specified to its designated peers.

+
Parameters
+ + +
hosthost to flush
+
+
+
Remarks
this function need only be used in circumstances where one wishes to send queued packets earlier than in a call to enet_host_service().
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
int enet_host_service (ENetHosthost,
ENetEventevent,
enet_uint32 timeout 
)
+
+ +

#include <protocol.c>

+ +

Waits for events on the host specified and shuttles packets between the host and its peers.

+
Parameters
+ + + + +
hosthost to service
eventan event structure where event details will be placed if one occurs if event == NULL then no events will be delivered
timeoutnumber of milliseconds that ENet should wait for events
+
+
+
Return values
+ + + + +
>0 if an event occurred within the specified time limit
0if no event occurred
<0 on failure
+
+
+
Remarks
enet_host_service should be called fairly regularly for adequate performance
+ +
+
+
+ + + + diff --git a/enet server test/enet2/docs/html/group__list.html b/enet server test/enet2/docs/html/group__list.html new file mode 100644 index 0000000..fd49945 --- /dev/null +++ b/enet server test/enet2/docs/html/group__list.html @@ -0,0 +1,231 @@ + + + + + + +ENet: ENet linked list utility functions + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + +
+ + + + +
+ +
+ +
+ +
+
ENet linked list utility functions
+
+
+ + + + + + + + + + + + +

+Functions

void enet_list_clear (ENetList *list)
 
ENetListIterator enet_list_insert (ENetListIterator position, void *data)
 
ENetListIterator enet_list_move (ENetListIterator position, void *dataFirst, void *dataLast)
 
void * enet_list_remove (ENetListIterator position)
 
size_t enet_list_size (ENetList *list)
 
+

Detailed Description

+

Function Documentation

+ +
+
+ + + + + + + + +
void enet_list_clear (ENetListlist)
+
+ +

#include <list.c>

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
ENetListIterator enet_list_insert (ENetListIterator position,
void * data 
)
+
+ +

#include <list.c>

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
ENetListIterator enet_list_move (ENetListIterator position,
void * dataFirst,
void * dataLast 
)
+
+ +

#include <list.c>

+ +
+
+ +
+
+ + + + + + + + +
void* enet_list_remove (ENetListIterator position)
+
+ +

#include <list.c>

+ +
+
+ +
+
+ + + + + + + + +
size_t enet_list_size (ENetListlist)
+
+ +

#include <list.c>

+ +
+
+
+ + + + diff --git a/enet server test/enet2/docs/html/group__peer.html b/enet server test/enet2/docs/html/group__peer.html new file mode 100644 index 0000000..0a65c4c --- /dev/null +++ b/enet server test/enet2/docs/html/group__peer.html @@ -0,0 +1,852 @@ + + + + + + +ENet: ENet peer functions + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + +
+ + + + +
+ +
+ +
+ +
+
ENet peer functions
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

void enet_peer_disconnect (ENetPeer *peer, enet_uint32 data)
 Request a disconnection from a peer. More...
 
void enet_peer_disconnect_later (ENetPeer *peer, enet_uint32 data)
 Request a disconnection from a peer, but only after all queued outgoing packets are sent. More...
 
void enet_peer_disconnect_now (ENetPeer *peer, enet_uint32 data)
 Force an immediate disconnection from a peer. More...
 
void enet_peer_dispatch_incoming_reliable_commands (ENetPeer *peer, ENetChannel *channel)
 
void enet_peer_dispatch_incoming_unreliable_commands (ENetPeer *peer, ENetChannel *channel)
 
void enet_peer_on_connect (ENetPeer *peer)
 
void enet_peer_on_disconnect (ENetPeer *peer)
 
void enet_peer_ping (ENetPeer *peer)
 Sends a ping request to a peer. More...
 
void enet_peer_ping_interval (ENetPeer *peer, enet_uint32 pingInterval)
 Sets the interval at which pings will be sent to a peer. More...
 
ENetAcknowledgementenet_peer_queue_acknowledgement (ENetPeer *peer, const ENetProtocol *command, enet_uint16 sentTime)
 
ENetIncomingCommandenet_peer_queue_incoming_command (ENetPeer *peer, const ENetProtocol *command, const void *data, size_t dataLength, enet_uint32 flags, enet_uint32 fragmentCount)
 
ENetOutgoingCommandenet_peer_queue_outgoing_command (ENetPeer *peer, const ENetProtocol *command, ENetPacket *packet, enet_uint32 offset, enet_uint16 length)
 
ENetPacketenet_peer_receive (ENetPeer *peer, enet_uint8 *channelID)
 Attempts to dequeue any incoming queued packet. More...
 
void enet_peer_reset (ENetPeer *peer)
 Forcefully disconnects a peer. More...
 
void enet_peer_reset_queues (ENetPeer *peer)
 
int enet_peer_send (ENetPeer *peer, enet_uint8 channelID, ENetPacket *packet)
 Queues a packet to be sent. More...
 
void enet_peer_setup_outgoing_command (ENetPeer *peer, ENetOutgoingCommand *outgoingCommand)
 
int enet_peer_throttle (ENetPeer *peer, enet_uint32 rtt)
 
void enet_peer_throttle_configure (ENetPeer *peer, enet_uint32 interval, enet_uint32 acceleration, enet_uint32 deceleration)
 Configures throttle parameter for a peer. More...
 
void enet_peer_timeout (ENetPeer *peer, enet_uint32 timeoutLimit, enet_uint32 timeoutMinimum, enet_uint32 timeoutMaximum)
 Sets the timeout parameters for a peer. More...
 
+

Detailed Description

+

Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
void enet_peer_disconnect (ENetPeerpeer,
enet_uint32 data 
)
+
+ +

#include <peer.c>

+ +

Request a disconnection from a peer.

+
Parameters
+ + + +
peerpeer to request a disconnection
datadata describing the disconnection
+
+
+
Remarks
An ENET_EVENT_DISCONNECT event will be generated by enet_host_service() once the disconnection is complete.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void enet_peer_disconnect_later (ENetPeerpeer,
enet_uint32 data 
)
+
+ +

#include <peer.c>

+ +

Request a disconnection from a peer, but only after all queued outgoing packets are sent.

+
Parameters
+ + + +
peerpeer to request a disconnection
datadata describing the disconnection
+
+
+
Remarks
An ENET_EVENT_DISCONNECT event will be generated by enet_host_service() once the disconnection is complete.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void enet_peer_disconnect_now (ENetPeerpeer,
enet_uint32 data 
)
+
+ +

#include <peer.c>

+ +

Force an immediate disconnection from a peer.

+
Parameters
+ + + +
peerpeer to disconnect
datadata describing the disconnection
+
+
+
Remarks
No ENET_EVENT_DISCONNECT event will be generated. The foreign peer is not guaranteed to receive the disconnect notification, and is reset immediately upon return from this function.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void enet_peer_dispatch_incoming_reliable_commands (ENetPeerpeer,
ENetChannelchannel 
)
+
+ +

#include <peer.c>

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void enet_peer_dispatch_incoming_unreliable_commands (ENetPeerpeer,
ENetChannelchannel 
)
+
+ +

#include <peer.c>

+ +
+
+ +
+
+ + + + + + + + +
void enet_peer_on_connect (ENetPeerpeer)
+
+ +

#include <peer.c>

+ +
+
+ +
+
+ + + + + + + + +
void enet_peer_on_disconnect (ENetPeerpeer)
+
+ +

#include <peer.c>

+ +
+
+ +
+
+ + + + + + + + +
void enet_peer_ping (ENetPeerpeer)
+
+ +

#include <peer.c>

+ +

Sends a ping request to a peer.

+
Parameters
+ + +
peerdestination for the ping request
+
+
+
Remarks
ping requests factor into the mean round trip time as designated by the roundTripTime field in the ENetPeer structure. ENet automatically pings all connected peers at regular intervals, however, this function may be called to ensure more frequent ping requests.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void enet_peer_ping_interval (ENetPeerpeer,
enet_uint32 pingInterval 
)
+
+ +

#include <peer.c>

+ +

Sets the interval at which pings will be sent to a peer.

+

Pings are used both to monitor the liveness of the connection and also to dynamically adjust the throttle during periods of low traffic so that the throttle has reasonable responsiveness during traffic spikes.

+
Parameters
+ + + +
peerthe peer to adjust
pingIntervalthe interval at which to send pings; defaults to ENET_PEER_PING_INTERVAL if 0
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
ENetAcknowledgement* enet_peer_queue_acknowledgement (ENetPeerpeer,
const ENetProtocolcommand,
enet_uint16 sentTime 
)
+
+ +

#include <peer.c>

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ENetIncomingCommand* enet_peer_queue_incoming_command (ENetPeerpeer,
const ENetProtocolcommand,
const void * data,
size_t dataLength,
enet_uint32 flags,
enet_uint32 fragmentCount 
)
+
+ +

#include <peer.c>

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ENetOutgoingCommand* enet_peer_queue_outgoing_command (ENetPeerpeer,
const ENetProtocolcommand,
ENetPacketpacket,
enet_uint32 offset,
enet_uint16 length 
)
+
+ +

#include <peer.c>

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
ENetPacket* enet_peer_receive (ENetPeerpeer,
enet_uint8channelID 
)
+
+ +

#include <peer.c>

+ +

Attempts to dequeue any incoming queued packet.

+
Parameters
+ + + +
peerpeer to dequeue packets from
channelIDholds the channel ID of the channel the packet was received on success
+
+
+
Returns
a pointer to the packet, or NULL if there are no available incoming queued packets
+ +
+
+ +
+
+ + + + + + + + +
void enet_peer_reset (ENetPeerpeer)
+
+ +

#include <peer.c>

+ +

Forcefully disconnects a peer.

+
Parameters
+ + +
peerpeer to forcefully disconnect
+
+
+
Remarks
The foreign host represented by the peer is not notified of the disconnection and will timeout on its connection to the local host.
+ +
+
+ +
+
+ + + + + + + + +
void enet_peer_reset_queues (ENetPeerpeer)
+
+ +

#include <peer.c>

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
int enet_peer_send (ENetPeerpeer,
enet_uint8 channelID,
ENetPacketpacket 
)
+
+ +

#include <peer.c>

+ +

Queues a packet to be sent.

+
Parameters
+ + + + +
peerdestination for the packet
channelIDchannel on which to send
packetpacket to send
+
+
+
Return values
+ + + +
0on success
<0 on failure
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void enet_peer_setup_outgoing_command (ENetPeerpeer,
ENetOutgoingCommandoutgoingCommand 
)
+
+ +

#include <peer.c>

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
int enet_peer_throttle (ENetPeerpeer,
enet_uint32 rtt 
)
+
+ +

#include <peer.c>

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void enet_peer_throttle_configure (ENetPeerpeer,
enet_uint32 interval,
enet_uint32 acceleration,
enet_uint32 deceleration 
)
+
+ +

#include <peer.c>

+ +

Configures throttle parameter for a peer.

+

Unreliable packets are dropped by ENet in response to the varying conditions of the Internet connection to the peer. The throttle represents a probability that an unreliable packet should not be dropped and thus sent by ENet to the peer. The lowest mean round trip time from the sending of a reliable packet to the receipt of its acknowledgement is measured over an amount of time specified by the interval parameter in milliseconds. If a measured round trip time happens to be significantly less than the mean round trip time measured over the interval, then the throttle probability is increased to allow more traffic by an amount specified in the acceleration parameter, which is a ratio to the ENET_PEER_PACKET_THROTTLE_SCALE constant. If a measured round trip time happens to be significantly greater than the mean round trip time measured over the interval, then the throttle probability is decreased to limit traffic by an amount specified in the deceleration parameter, which is a ratio to the ENET_PEER_PACKET_THROTTLE_SCALE constant. When the throttle has a value of ENET_PEER_PACKET_THROTTLE_SCALE, no unreliable packets are dropped by ENet, and so 100% of all unreliable packets will be sent. When the throttle has a value of 0, all unreliable packets are dropped by ENet, and so 0% of all unreliable packets will be sent. Intermediate values for the throttle represent intermediate probabilities between 0% and 100% of unreliable packets being sent. The bandwidth limits of the local and foreign hosts are taken into account to determine a sensible limit for the throttle probability above which it should not raise even in the best of conditions.

+
Parameters
+ + + + + +
peerpeer to configure
intervalinterval, in milliseconds, over which to measure lowest mean RTT; the default value is ENET_PEER_PACKET_THROTTLE_INTERVAL.
accelerationrate at which to increase the throttle probability as mean RTT declines
decelerationrate at which to decrease the throttle probability as mean RTT increases
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void enet_peer_timeout (ENetPeerpeer,
enet_uint32 timeoutLimit,
enet_uint32 timeoutMinimum,
enet_uint32 timeoutMaximum 
)
+
+ +

#include <peer.c>

+ +

Sets the timeout parameters for a peer.

+

The timeout parameter control how and when a peer will timeout from a failure to acknowledge reliable traffic. Timeout values use an exponential backoff mechanism, where if a reliable packet is not acknowledge within some multiple of the average RTT plus a variance tolerance, the timeout will be doubled until it reaches a set limit. If the timeout is thus at this limit and reliable packets have been sent but not acknowledged within a certain minimum time period, the peer will be disconnected. Alternatively, if reliable packets have been sent but not acknowledged for a certain maximum time period, the peer will be disconnected regardless of the current timeout limit value.

+
Parameters
+ + + + + +
peerthe peer to adjust
timeoutLimitthe timeout limit; defaults to ENET_PEER_TIMEOUT_LIMIT if 0
timeoutMinimumthe timeout minimum; defaults to ENET_PEER_TIMEOUT_MINIMUM if 0
timeoutMaximumthe timeout maximum; defaults to ENET_PEER_TIMEOUT_MAXIMUM if 0
+
+
+ +
+
+
+ + + + diff --git a/enet server test/enet2/docs/html/group__private.html b/enet server test/enet2/docs/html/group__private.html new file mode 100644 index 0000000..77ad23c --- /dev/null +++ b/enet server test/enet2/docs/html/group__private.html @@ -0,0 +1,108 @@ + + + + + + +ENet: ENet private implementation functions + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + +
+ + + + +
+ +
+ +
+ +
+
ENet private implementation functions
+
+
+ + + + + + +

+Modules

 ENet internal callbacks
 
 ENet linked list utility functions
 
+

Detailed Description

+
+ + + + diff --git a/enet server test/enet2/docs/html/group__socket.html b/enet server test/enet2/docs/html/group__socket.html new file mode 100644 index 0000000..a63699e --- /dev/null +++ b/enet server test/enet2/docs/html/group__socket.html @@ -0,0 +1,559 @@ + + + + + + +ENet: ENet socket functions + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + +
+ + + + +
+ +
+ +
+ +
+
ENet socket functions
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

ENetSocket enet_socket_accept (ENetSocket, ENetAddress *)
 
int enet_socket_bind (ENetSocket, const ENetAddress *)
 
int enet_socket_connect (ENetSocket, const ENetAddress *)
 
ENetSocket enet_socket_create (ENetSocketType)
 
void enet_socket_destroy (ENetSocket)
 
int enet_socket_get_address (ENetSocket, ENetAddress *)
 
int enet_socket_get_option (ENetSocket, ENetSocketOption, int *)
 
int enet_socket_listen (ENetSocket, int)
 
int enet_socket_receive (ENetSocket, ENetAddress *, ENetBuffer *, size_t)
 
int enet_socket_send (ENetSocket, const ENetAddress *, const ENetBuffer *, size_t)
 
int enet_socket_set_option (ENetSocket, ENetSocketOption, int)
 
int enet_socket_shutdown (ENetSocket, ENetSocketShutdown)
 
int enet_socket_wait (ENetSocket, enet_uint32 *, enet_uint32)
 
int enet_socketset_select (ENetSocket, ENetSocketSet *, ENetSocketSet *, enet_uint32)
 
+

Detailed Description

+

Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
ENetSocket enet_socket_accept (ENetSocket ,
ENetAddress 
)
+
+ +

#include <include/enet/enet.h>

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
int enet_socket_bind (ENetSocket ,
const ENetAddress 
)
+
+ +

#include <include/enet/enet.h>

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
int enet_socket_connect (ENetSocket ,
const ENetAddress 
)
+
+ +

#include <include/enet/enet.h>

+ +
+
+ +
+
+ + + + + + + + +
ENetSocket enet_socket_create (ENetSocketType )
+
+ +

#include <include/enet/enet.h>

+ +
+
+ +
+
+ + + + + + + + +
void enet_socket_destroy (ENetSocket )
+
+ +

#include <include/enet/enet.h>

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
int enet_socket_get_address (ENetSocket ,
ENetAddress 
)
+
+ +

#include <include/enet/enet.h>

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
int enet_socket_get_option (ENetSocket ,
ENetSocketOption ,
int *  
)
+
+ +

#include <include/enet/enet.h>

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
int enet_socket_listen (ENetSocket ,
int  
)
+
+ +

#include <include/enet/enet.h>

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
int enet_socket_receive (ENetSocket ,
ENetAddress,
ENetBuffer,
size_t  
)
+
+ +

#include <include/enet/enet.h>

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
int enet_socket_send (ENetSocket ,
const ENetAddress,
const ENetBuffer,
size_t  
)
+
+ +

#include <include/enet/enet.h>

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
int enet_socket_set_option (ENetSocket ,
ENetSocketOption ,
int  
)
+
+ +

#include <include/enet/enet.h>

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
int enet_socket_shutdown (ENetSocket ,
ENetSocketShutdown  
)
+
+ +

#include <include/enet/enet.h>

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
int enet_socket_wait (ENetSocket ,
enet_uint32,
enet_uint32  
)
+
+ +

#include <include/enet/enet.h>

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
int enet_socketset_select (ENetSocket ,
ENetSocketSet,
ENetSocketSet,
enet_uint32  
)
+
+ +

#include <include/enet/enet.h>

+ +
+
+
+ + + + diff --git a/enet server test/enet2/docs/html/host_8c.html b/enet server test/enet2/docs/html/host_8c.html new file mode 100644 index 0000000..2d8e0ff --- /dev/null +++ b/enet server test/enet2/docs/html/host_8c.html @@ -0,0 +1,160 @@ + + + + + + +ENet: host.c File Reference + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + + + + + + +
+ +
+ +
+
+ +
+
host.c File Reference
+
+
+ +

ENet host management functions. +More...

+
#include <string.h>
+#include "enet/enet.h"
+
+ + + +

+Macros

#define ENET_BUILDING_LIB   1
 
+ + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

void enet_host_bandwidth_limit (ENetHost *host, enet_uint32 incomingBandwidth, enet_uint32 outgoingBandwidth)
 Adjusts the bandwidth limits of a host. More...
 
void enet_host_bandwidth_throttle (ENetHost *host)
 
void enet_host_broadcast (ENetHost *host, enet_uint8 channelID, ENetPacket *packet)
 Queues a packet to be sent to all peers associated with the host. More...
 
void enet_host_channel_limit (ENetHost *host, size_t channelLimit)
 Limits the maximum allowed channels of future incoming connections. More...
 
void enet_host_compress (ENetHost *host, const ENetCompressor *compressor)
 Sets the packet compressor the host should use to compress and decompress packets. More...
 
ENetPeerenet_host_connect (ENetHost *host, const ENetAddress *address, size_t channelCount, enet_uint32 data)
 Initiates a connection to a foreign host. More...
 
ENetHostenet_host_create (const ENetAddress *address, size_t peerCount, size_t channelLimit, enet_uint32 incomingBandwidth, enet_uint32 outgoingBandwidth)
 Creates a host for communicating to peers. More...
 
void enet_host_destroy (ENetHost *host)
 Destroys the host and all resources associated with it. More...
 
+

Detailed Description

+

ENet host management functions.

+

Macro Definition Documentation

+ +
+
+ + + + +
#define ENET_BUILDING_LIB   1
+
+ +
+
+
+ + + + diff --git a/enet server test/enet2/docs/html/index.html b/enet server test/enet2/docs/html/index.html new file mode 100644 index 0000000..6c43bcf --- /dev/null +++ b/enet server test/enet2/docs/html/index.html @@ -0,0 +1,108 @@ + + + + + + +ENet: ENet + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + +
+ + + + +
+ +
+ +
+
+
ENet
+
+
+

ENet's purpose is to provide a relatively thin, simple and robust network communication layer on top of UDP (User Datagram Protocol).The primary feature it provides is optional reliable, in-order delivery of packets.

+

ENet omits certain higher level networking features such as authentication, lobbying, server discovery, encryption, or other similar tasks that are particularly application specific so that the library remains flexible, portable, and easily embeddable.

+

Features and Architecture

+

Downloads

+

Installation

+

Tutorial

+

Mailing List

+

IRC Channel

+

Frequently Answered Questions

+

License

+

Documentation

+
+ + + + diff --git a/enet server test/enet2/docs/html/install_8dox.html b/enet server test/enet2/docs/html/install_8dox.html new file mode 100644 index 0000000..5fc6991 --- /dev/null +++ b/enet server test/enet2/docs/html/install_8dox.html @@ -0,0 +1,105 @@ + + + + + + +ENet: docs/install.dox File Reference + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + + + + + + +
+ +
+ +
+
+
+
docs/install.dox File Reference
+
+
+
+ + + + diff --git a/enet server test/enet2/docs/html/jquery.js b/enet server test/enet2/docs/html/jquery.js new file mode 100644 index 0000000..92dbb49 --- /dev/null +++ b/enet server test/enet2/docs/html/jquery.js @@ -0,0 +1,31 @@ +/* + * jQuery JavaScript Library v1.7.1 + * http://jquery.com/ + * + * Copyright 2011, John Resig + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * Copyright 2011, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * + * Date: Mon Nov 21 21:11:03 2011 -0500 + */ +(function(bb,L){var av=bb.document,bu=bb.navigator,bl=bb.location;var b=(function(){var bF=function(b0,b1){return new bF.fn.init(b0,b1,bD)},bU=bb.jQuery,bH=bb.$,bD,bY=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,bM=/\S/,bI=/^\s+/,bE=/\s+$/,bA=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,bN=/^[\],:{}\s]*$/,bW=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,bP=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,bJ=/(?:^|:|,)(?:\s*\[)+/g,by=/(webkit)[ \/]([\w.]+)/,bR=/(opera)(?:.*version)?[ \/]([\w.]+)/,bQ=/(msie) ([\w.]+)/,bS=/(mozilla)(?:.*? rv:([\w.]+))?/,bB=/-([a-z]|[0-9])/ig,bZ=/^-ms-/,bT=function(b0,b1){return(b1+"").toUpperCase()},bX=bu.userAgent,bV,bC,e,bL=Object.prototype.toString,bG=Object.prototype.hasOwnProperty,bz=Array.prototype.push,bK=Array.prototype.slice,bO=String.prototype.trim,bv=Array.prototype.indexOf,bx={};bF.fn=bF.prototype={constructor:bF,init:function(b0,b4,b3){var b2,b5,b1,b6;if(!b0){return this}if(b0.nodeType){this.context=this[0]=b0;this.length=1;return this}if(b0==="body"&&!b4&&av.body){this.context=av;this[0]=av.body;this.selector=b0;this.length=1;return this}if(typeof b0==="string"){if(b0.charAt(0)==="<"&&b0.charAt(b0.length-1)===">"&&b0.length>=3){b2=[null,b0,null]}else{b2=bY.exec(b0)}if(b2&&(b2[1]||!b4)){if(b2[1]){b4=b4 instanceof bF?b4[0]:b4;b6=(b4?b4.ownerDocument||b4:av);b1=bA.exec(b0);if(b1){if(bF.isPlainObject(b4)){b0=[av.createElement(b1[1])];bF.fn.attr.call(b0,b4,true)}else{b0=[b6.createElement(b1[1])]}}else{b1=bF.buildFragment([b2[1]],[b6]);b0=(b1.cacheable?bF.clone(b1.fragment):b1.fragment).childNodes}return bF.merge(this,b0)}else{b5=av.getElementById(b2[2]);if(b5&&b5.parentNode){if(b5.id!==b2[2]){return b3.find(b0)}this.length=1;this[0]=b5}this.context=av;this.selector=b0;return this}}else{if(!b4||b4.jquery){return(b4||b3).find(b0)}else{return this.constructor(b4).find(b0)}}}else{if(bF.isFunction(b0)){return b3.ready(b0)}}if(b0.selector!==L){this.selector=b0.selector;this.context=b0.context}return bF.makeArray(b0,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return bK.call(this,0)},get:function(b0){return b0==null?this.toArray():(b0<0?this[this.length+b0]:this[b0])},pushStack:function(b1,b3,b0){var b2=this.constructor();if(bF.isArray(b1)){bz.apply(b2,b1)}else{bF.merge(b2,b1)}b2.prevObject=this;b2.context=this.context;if(b3==="find"){b2.selector=this.selector+(this.selector?" ":"")+b0}else{if(b3){b2.selector=this.selector+"."+b3+"("+b0+")"}}return b2},each:function(b1,b0){return bF.each(this,b1,b0)},ready:function(b0){bF.bindReady();bC.add(b0);return this},eq:function(b0){b0=+b0;return b0===-1?this.slice(b0):this.slice(b0,b0+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(bK.apply(this,arguments),"slice",bK.call(arguments).join(","))},map:function(b0){return this.pushStack(bF.map(this,function(b2,b1){return b0.call(b2,b1,b2)}))},end:function(){return this.prevObject||this.constructor(null)},push:bz,sort:[].sort,splice:[].splice};bF.fn.init.prototype=bF.fn;bF.extend=bF.fn.extend=function(){var b9,b2,b0,b1,b6,b7,b5=arguments[0]||{},b4=1,b3=arguments.length,b8=false;if(typeof b5==="boolean"){b8=b5;b5=arguments[1]||{};b4=2}if(typeof b5!=="object"&&!bF.isFunction(b5)){b5={}}if(b3===b4){b5=this;--b4}for(;b40){return}bC.fireWith(av,[bF]);if(bF.fn.trigger){bF(av).trigger("ready").off("ready")}}},bindReady:function(){if(bC){return}bC=bF.Callbacks("once memory");if(av.readyState==="complete"){return setTimeout(bF.ready,1)}if(av.addEventListener){av.addEventListener("DOMContentLoaded",e,false);bb.addEventListener("load",bF.ready,false)}else{if(av.attachEvent){av.attachEvent("onreadystatechange",e);bb.attachEvent("onload",bF.ready);var b0=false;try{b0=bb.frameElement==null}catch(b1){}if(av.documentElement.doScroll&&b0){bw()}}}},isFunction:function(b0){return bF.type(b0)==="function"},isArray:Array.isArray||function(b0){return bF.type(b0)==="array"},isWindow:function(b0){return b0&&typeof b0==="object"&&"setInterval" in b0},isNumeric:function(b0){return !isNaN(parseFloat(b0))&&isFinite(b0)},type:function(b0){return b0==null?String(b0):bx[bL.call(b0)]||"object"},isPlainObject:function(b2){if(!b2||bF.type(b2)!=="object"||b2.nodeType||bF.isWindow(b2)){return false}try{if(b2.constructor&&!bG.call(b2,"constructor")&&!bG.call(b2.constructor.prototype,"isPrototypeOf")){return false}}catch(b1){return false}var b0;for(b0 in b2){}return b0===L||bG.call(b2,b0)},isEmptyObject:function(b1){for(var b0 in b1){return false}return true},error:function(b0){throw new Error(b0)},parseJSON:function(b0){if(typeof b0!=="string"||!b0){return null}b0=bF.trim(b0);if(bb.JSON&&bb.JSON.parse){return bb.JSON.parse(b0)}if(bN.test(b0.replace(bW,"@").replace(bP,"]").replace(bJ,""))){return(new Function("return "+b0))()}bF.error("Invalid JSON: "+b0)},parseXML:function(b2){var b0,b1;try{if(bb.DOMParser){b1=new DOMParser();b0=b1.parseFromString(b2,"text/xml")}else{b0=new ActiveXObject("Microsoft.XMLDOM");b0.async="false";b0.loadXML(b2)}}catch(b3){b0=L}if(!b0||!b0.documentElement||b0.getElementsByTagName("parsererror").length){bF.error("Invalid XML: "+b2)}return b0},noop:function(){},globalEval:function(b0){if(b0&&bM.test(b0)){(bb.execScript||function(b1){bb["eval"].call(bb,b1)})(b0)}},camelCase:function(b0){return b0.replace(bZ,"ms-").replace(bB,bT)},nodeName:function(b1,b0){return b1.nodeName&&b1.nodeName.toUpperCase()===b0.toUpperCase()},each:function(b3,b6,b2){var b1,b4=0,b5=b3.length,b0=b5===L||bF.isFunction(b3);if(b2){if(b0){for(b1 in b3){if(b6.apply(b3[b1],b2)===false){break}}}else{for(;b40&&b0[0]&&b0[b1-1])||b1===0||bF.isArray(b0));if(b3){for(;b21?aJ.call(arguments,0):bG;if(!(--bw)){bC.resolveWith(bC,bx)}}}function bz(bF){return function(bG){bB[bF]=arguments.length>1?aJ.call(arguments,0):bG;bC.notifyWith(bE,bB)}}if(e>1){for(;bv
a";bI=bv.getElementsByTagName("*");bF=bv.getElementsByTagName("a")[0];if(!bI||!bI.length||!bF){return{}}bG=av.createElement("select");bx=bG.appendChild(av.createElement("option"));bE=bv.getElementsByTagName("input")[0];bJ={leadingWhitespace:(bv.firstChild.nodeType===3),tbody:!bv.getElementsByTagName("tbody").length,htmlSerialize:!!bv.getElementsByTagName("link").length,style:/top/.test(bF.getAttribute("style")),hrefNormalized:(bF.getAttribute("href")==="/a"),opacity:/^0.55/.test(bF.style.opacity),cssFloat:!!bF.style.cssFloat,checkOn:(bE.value==="on"),optSelected:bx.selected,getSetAttribute:bv.className!=="t",enctype:!!av.createElement("form").enctype,html5Clone:av.createElement("nav").cloneNode(true).outerHTML!=="<:nav>",submitBubbles:true,changeBubbles:true,focusinBubbles:false,deleteExpando:true,noCloneEvent:true,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableMarginRight:true};bE.checked=true;bJ.noCloneChecked=bE.cloneNode(true).checked;bG.disabled=true;bJ.optDisabled=!bx.disabled;try{delete bv.test}catch(bC){bJ.deleteExpando=false}if(!bv.addEventListener&&bv.attachEvent&&bv.fireEvent){bv.attachEvent("onclick",function(){bJ.noCloneEvent=false});bv.cloneNode(true).fireEvent("onclick")}bE=av.createElement("input");bE.value="t";bE.setAttribute("type","radio");bJ.radioValue=bE.value==="t";bE.setAttribute("checked","checked");bv.appendChild(bE);bD=av.createDocumentFragment();bD.appendChild(bv.lastChild);bJ.checkClone=bD.cloneNode(true).cloneNode(true).lastChild.checked;bJ.appendChecked=bE.checked;bD.removeChild(bE);bD.appendChild(bv);bv.innerHTML="";if(bb.getComputedStyle){bA=av.createElement("div");bA.style.width="0";bA.style.marginRight="0";bv.style.width="2px";bv.appendChild(bA);bJ.reliableMarginRight=(parseInt((bb.getComputedStyle(bA,null)||{marginRight:0}).marginRight,10)||0)===0}if(bv.attachEvent){for(by in {submit:1,change:1,focusin:1}){bB="on"+by;bw=(bB in bv);if(!bw){bv.setAttribute(bB,"return;");bw=(typeof bv[bB]==="function")}bJ[by+"Bubbles"]=bw}}bD.removeChild(bv);bD=bG=bx=bA=bv=bE=null;b(function(){var bM,bU,bV,bT,bN,bO,bL,bS,bR,e,bP,bQ=av.getElementsByTagName("body")[0];if(!bQ){return}bL=1;bS="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;";bR="visibility:hidden;border:0;";e="style='"+bS+"border:5px solid #000;padding:0;'";bP="
";bM=av.createElement("div");bM.style.cssText=bR+"width:0;height:0;position:static;top:0;margin-top:"+bL+"px";bQ.insertBefore(bM,bQ.firstChild);bv=av.createElement("div");bM.appendChild(bv);bv.innerHTML="
t
";bz=bv.getElementsByTagName("td");bw=(bz[0].offsetHeight===0);bz[0].style.display="";bz[1].style.display="none";bJ.reliableHiddenOffsets=bw&&(bz[0].offsetHeight===0);bv.innerHTML="";bv.style.width=bv.style.paddingLeft="1px";b.boxModel=bJ.boxModel=bv.offsetWidth===2;if(typeof bv.style.zoom!=="undefined"){bv.style.display="inline";bv.style.zoom=1;bJ.inlineBlockNeedsLayout=(bv.offsetWidth===2);bv.style.display="";bv.innerHTML="
";bJ.shrinkWrapBlocks=(bv.offsetWidth!==2)}bv.style.cssText=bS+bR;bv.innerHTML=bP;bU=bv.firstChild;bV=bU.firstChild;bN=bU.nextSibling.firstChild.firstChild;bO={doesNotAddBorder:(bV.offsetTop!==5),doesAddBorderForTableAndCells:(bN.offsetTop===5)};bV.style.position="fixed";bV.style.top="20px";bO.fixedPosition=(bV.offsetTop===20||bV.offsetTop===15);bV.style.position=bV.style.top="";bU.style.overflow="hidden";bU.style.position="relative";bO.subtractsBorderForOverflowNotVisible=(bV.offsetTop===-5);bO.doesNotIncludeMarginInBodyOffset=(bQ.offsetTop!==bL);bQ.removeChild(bM);bv=bM=null;b.extend(bJ,bO)});return bJ})();var aS=/^(?:\{.*\}|\[.*\])$/,aA=/([A-Z])/g;b.extend({cache:{},uuid:0,expando:"jQuery"+(b.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},hasData:function(e){e=e.nodeType?b.cache[e[b.expando]]:e[b.expando];return !!e&&!S(e)},data:function(bx,bv,bz,by){if(!b.acceptData(bx)){return}var bG,bA,bD,bE=b.expando,bC=typeof bv==="string",bF=bx.nodeType,e=bF?b.cache:bx,bw=bF?bx[bE]:bx[bE]&&bE,bB=bv==="events";if((!bw||!e[bw]||(!bB&&!by&&!e[bw].data))&&bC&&bz===L){return}if(!bw){if(bF){bx[bE]=bw=++b.uuid}else{bw=bE}}if(!e[bw]){e[bw]={};if(!bF){e[bw].toJSON=b.noop}}if(typeof bv==="object"||typeof bv==="function"){if(by){e[bw]=b.extend(e[bw],bv)}else{e[bw].data=b.extend(e[bw].data,bv)}}bG=bA=e[bw];if(!by){if(!bA.data){bA.data={}}bA=bA.data}if(bz!==L){bA[b.camelCase(bv)]=bz}if(bB&&!bA[bv]){return bG.events}if(bC){bD=bA[bv];if(bD==null){bD=bA[b.camelCase(bv)]}}else{bD=bA}return bD},removeData:function(bx,bv,by){if(!b.acceptData(bx)){return}var bB,bA,bz,bC=b.expando,bD=bx.nodeType,e=bD?b.cache:bx,bw=bD?bx[bC]:bC;if(!e[bw]){return}if(bv){bB=by?e[bw]:e[bw].data;if(bB){if(!b.isArray(bv)){if(bv in bB){bv=[bv]}else{bv=b.camelCase(bv);if(bv in bB){bv=[bv]}else{bv=bv.split(" ")}}}for(bA=0,bz=bv.length;bA-1){return true}}return false},val:function(bx){var e,bv,by,bw=this[0];if(!arguments.length){if(bw){e=b.valHooks[bw.nodeName.toLowerCase()]||b.valHooks[bw.type];if(e&&"get" in e&&(bv=e.get(bw,"value"))!==L){return bv}bv=bw.value;return typeof bv==="string"?bv.replace(aU,""):bv==null?"":bv}return}by=b.isFunction(bx);return this.each(function(bA){var bz=b(this),bB;if(this.nodeType!==1){return}if(by){bB=bx.call(this,bA,bz.val())}else{bB=bx}if(bB==null){bB=""}else{if(typeof bB==="number"){bB+=""}else{if(b.isArray(bB)){bB=b.map(bB,function(bC){return bC==null?"":bC+""})}}}e=b.valHooks[this.nodeName.toLowerCase()]||b.valHooks[this.type];if(!e||!("set" in e)||e.set(this,bB,"value")===L){this.value=bB}})}});b.extend({valHooks:{option:{get:function(e){var bv=e.attributes.value;return !bv||bv.specified?e.value:e.text}},select:{get:function(e){var bA,bv,bz,bx,by=e.selectedIndex,bB=[],bC=e.options,bw=e.type==="select-one";if(by<0){return null}bv=bw?by:0;bz=bw?by+1:bC.length;for(;bv=0});if(!e.length){bv.selectedIndex=-1}return e}}},attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(bA,bx,bB,bz){var bw,e,by,bv=bA.nodeType; +if(!bA||bv===3||bv===8||bv===2){return}if(bz&&bx in b.attrFn){return b(bA)[bx](bB)}if(typeof bA.getAttribute==="undefined"){return b.prop(bA,bx,bB)}by=bv!==1||!b.isXMLDoc(bA);if(by){bx=bx.toLowerCase();e=b.attrHooks[bx]||(ao.test(bx)?aY:be)}if(bB!==L){if(bB===null){b.removeAttr(bA,bx);return}else{if(e&&"set" in e&&by&&(bw=e.set(bA,bB,bx))!==L){return bw}else{bA.setAttribute(bx,""+bB);return bB}}}else{if(e&&"get" in e&&by&&(bw=e.get(bA,bx))!==null){return bw}else{bw=bA.getAttribute(bx);return bw===null?L:bw}}},removeAttr:function(bx,bz){var by,bA,bv,e,bw=0;if(bz&&bx.nodeType===1){bA=bz.toLowerCase().split(af);e=bA.length;for(;bw=0)}}})});var bd=/^(?:textarea|input|select)$/i,n=/^([^\.]*)?(?:\.(.+))?$/,J=/\bhover(\.\S+)?\b/,aO=/^key/,bf=/^(?:mouse|contextmenu)|click/,T=/^(?:focusinfocus|focusoutblur)$/,U=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,Y=function(e){var bv=U.exec(e);if(bv){bv[1]=(bv[1]||"").toLowerCase();bv[3]=bv[3]&&new RegExp("(?:^|\\s)"+bv[3]+"(?:\\s|$)")}return bv},j=function(bw,e){var bv=bw.attributes||{};return((!e[1]||bw.nodeName.toLowerCase()===e[1])&&(!e[2]||(bv.id||{}).value===e[2])&&(!e[3]||e[3].test((bv["class"]||{}).value)))},bt=function(e){return b.event.special.hover?e:e.replace(J,"mouseenter$1 mouseleave$1")};b.event={add:function(bx,bC,bJ,bA,by){var bD,bB,bK,bI,bH,bF,e,bG,bv,bz,bw,bE;if(bx.nodeType===3||bx.nodeType===8||!bC||!bJ||!(bD=b._data(bx))){return}if(bJ.handler){bv=bJ;bJ=bv.handler}if(!bJ.guid){bJ.guid=b.guid++}bK=bD.events;if(!bK){bD.events=bK={}}bB=bD.handle;if(!bB){bD.handle=bB=function(bL){return typeof b!=="undefined"&&(!bL||b.event.triggered!==bL.type)?b.event.dispatch.apply(bB.elem,arguments):L};bB.elem=bx}bC=b.trim(bt(bC)).split(" ");for(bI=0;bI=0){bG=bG.slice(0,-1);bw=true}if(bG.indexOf(".")>=0){bx=bG.split(".");bG=bx.shift();bx.sort()}if((!bA||b.event.customEvent[bG])&&!b.event.global[bG]){return}bv=typeof bv==="object"?bv[b.expando]?bv:new b.Event(bG,bv):new b.Event(bG);bv.type=bG;bv.isTrigger=true;bv.exclusive=bw;bv.namespace=bx.join(".");bv.namespace_re=bv.namespace?new RegExp("(^|\\.)"+bx.join("\\.(?:.*\\.)?")+"(\\.|$)"):null;by=bG.indexOf(":")<0?"on"+bG:"";if(!bA){e=b.cache;for(bC in e){if(e[bC].events&&e[bC].events[bG]){b.event.trigger(bv,bD,e[bC].handle.elem,true)}}return}bv.result=L;if(!bv.target){bv.target=bA}bD=bD!=null?b.makeArray(bD):[];bD.unshift(bv);bF=b.event.special[bG]||{};if(bF.trigger&&bF.trigger.apply(bA,bD)===false){return}bB=[[bA,bF.bindType||bG]];if(!bJ&&!bF.noBubble&&!b.isWindow(bA)){bI=bF.delegateType||bG;bH=T.test(bI+bG)?bA:bA.parentNode;bz=null;for(;bH;bH=bH.parentNode){bB.push([bH,bI]);bz=bH}if(bz&&bz===bA.ownerDocument){bB.push([bz.defaultView||bz.parentWindow||bb,bI])}}for(bC=0;bCbA){bH.push({elem:this,matches:bz.slice(bA)})}for(bC=0;bC0?this.on(e,null,bx,bw):this.trigger(e)};if(b.attrFn){b.attrFn[e]=true}if(aO.test(e)){b.event.fixHooks[e]=b.event.keyHooks}if(bf.test(e)){b.event.fixHooks[e]=b.event.mouseHooks}}); +/* + * Sizzle CSS Selector Engine + * Copyright 2011, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * More information: http://sizzlejs.com/ + */ +(function(){var bH=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,bC="sizcache"+(Math.random()+"").replace(".",""),bI=0,bL=Object.prototype.toString,bB=false,bA=true,bK=/\\/g,bO=/\r\n/g,bQ=/\W/;[0,0].sort(function(){bA=false;return 0});var by=function(bV,e,bY,bZ){bY=bY||[];e=e||av;var b1=e;if(e.nodeType!==1&&e.nodeType!==9){return[]}if(!bV||typeof bV!=="string"){return bY}var bS,b3,b6,bR,b2,b5,b4,bX,bU=true,bT=by.isXML(e),bW=[],b0=bV;do{bH.exec("");bS=bH.exec(b0);if(bS){b0=bS[3];bW.push(bS[1]);if(bS[2]){bR=bS[3];break}}}while(bS);if(bW.length>1&&bD.exec(bV)){if(bW.length===2&&bE.relative[bW[0]]){b3=bM(bW[0]+bW[1],e,bZ)}else{b3=bE.relative[bW[0]]?[e]:by(bW.shift(),e);while(bW.length){bV=bW.shift();if(bE.relative[bV]){bV+=bW.shift()}b3=bM(bV,b3,bZ)}}}else{if(!bZ&&bW.length>1&&e.nodeType===9&&!bT&&bE.match.ID.test(bW[0])&&!bE.match.ID.test(bW[bW.length-1])){b2=by.find(bW.shift(),e,bT);e=b2.expr?by.filter(b2.expr,b2.set)[0]:b2.set[0]}if(e){b2=bZ?{expr:bW.pop(),set:bF(bZ)}:by.find(bW.pop(),bW.length===1&&(bW[0]==="~"||bW[0]==="+")&&e.parentNode?e.parentNode:e,bT);b3=b2.expr?by.filter(b2.expr,b2.set):b2.set;if(bW.length>0){b6=bF(b3)}else{bU=false}while(bW.length){b5=bW.pop();b4=b5;if(!bE.relative[b5]){b5=""}else{b4=bW.pop()}if(b4==null){b4=e}bE.relative[b5](b6,b4,bT)}}else{b6=bW=[]}}if(!b6){b6=b3}if(!b6){by.error(b5||bV)}if(bL.call(b6)==="[object Array]"){if(!bU){bY.push.apply(bY,b6)}else{if(e&&e.nodeType===1){for(bX=0;b6[bX]!=null;bX++){if(b6[bX]&&(b6[bX]===true||b6[bX].nodeType===1&&by.contains(e,b6[bX]))){bY.push(b3[bX])}}}else{for(bX=0;b6[bX]!=null;bX++){if(b6[bX]&&b6[bX].nodeType===1){bY.push(b3[bX])}}}}}else{bF(b6,bY)}if(bR){by(bR,b1,bY,bZ);by.uniqueSort(bY)}return bY};by.uniqueSort=function(bR){if(bJ){bB=bA;bR.sort(bJ);if(bB){for(var e=1;e0};by.find=function(bX,e,bY){var bW,bS,bU,bT,bV,bR;if(!bX){return[]}for(bS=0,bU=bE.order.length;bS":function(bW,bR){var bV,bU=typeof bR==="string",bS=0,e=bW.length;if(bU&&!bQ.test(bR)){bR=bR.toLowerCase();for(;bS=0)){if(!bS){e.push(bV)}}else{if(bS){bR[bU]=false}}}}return false},ID:function(e){return e[1].replace(bK,"")},TAG:function(bR,e){return bR[1].replace(bK,"").toLowerCase()},CHILD:function(e){if(e[1]==="nth"){if(!e[2]){by.error(e[0])}e[2]=e[2].replace(/^\+|\s*/g,"");var bR=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(e[2]==="even"&&"2n"||e[2]==="odd"&&"2n+1"||!/\D/.test(e[2])&&"0n+"+e[2]||e[2]);e[2]=(bR[1]+(bR[2]||1))-0;e[3]=bR[3]-0}else{if(e[2]){by.error(e[0])}}e[0]=bI++;return e},ATTR:function(bU,bR,bS,e,bV,bW){var bT=bU[1]=bU[1].replace(bK,"");if(!bW&&bE.attrMap[bT]){bU[1]=bE.attrMap[bT]}bU[4]=(bU[4]||bU[5]||"").replace(bK,"");if(bU[2]==="~="){bU[4]=" "+bU[4]+" "}return bU},PSEUDO:function(bU,bR,bS,e,bV){if(bU[1]==="not"){if((bH.exec(bU[3])||"").length>1||/^\w/.test(bU[3])){bU[3]=by(bU[3],null,null,bR)}else{var bT=by.filter(bU[3],bR,bS,true^bV);if(!bS){e.push.apply(e,bT)}return false}}else{if(bE.match.POS.test(bU[0])||bE.match.CHILD.test(bU[0])){return true}}return bU},POS:function(e){e.unshift(true);return e}},filters:{enabled:function(e){return e.disabled===false&&e.type!=="hidden"},disabled:function(e){return e.disabled===true},checked:function(e){return e.checked===true},selected:function(e){if(e.parentNode){e.parentNode.selectedIndex}return e.selected===true},parent:function(e){return !!e.firstChild},empty:function(e){return !e.firstChild},has:function(bS,bR,e){return !!by(e[3],bS).length},header:function(e){return(/h\d/i).test(e.nodeName)},text:function(bS){var e=bS.getAttribute("type"),bR=bS.type;return bS.nodeName.toLowerCase()==="input"&&"text"===bR&&(e===bR||e===null)},radio:function(e){return e.nodeName.toLowerCase()==="input"&&"radio"===e.type},checkbox:function(e){return e.nodeName.toLowerCase()==="input"&&"checkbox"===e.type},file:function(e){return e.nodeName.toLowerCase()==="input"&&"file"===e.type},password:function(e){return e.nodeName.toLowerCase()==="input"&&"password"===e.type},submit:function(bR){var e=bR.nodeName.toLowerCase();return(e==="input"||e==="button")&&"submit"===bR.type},image:function(e){return e.nodeName.toLowerCase()==="input"&&"image"===e.type},reset:function(bR){var e=bR.nodeName.toLowerCase();return(e==="input"||e==="button")&&"reset"===bR.type},button:function(bR){var e=bR.nodeName.toLowerCase();return e==="input"&&"button"===bR.type||e==="button"},input:function(e){return(/input|select|textarea|button/i).test(e.nodeName)},focus:function(e){return e===e.ownerDocument.activeElement}},setFilters:{first:function(bR,e){return e===0},last:function(bS,bR,e,bT){return bR===bT.length-1},even:function(bR,e){return e%2===0},odd:function(bR,e){return e%2===1 +},lt:function(bS,bR,e){return bRe[3]-0},nth:function(bS,bR,e){return e[3]-0===bR},eq:function(bS,bR,e){return e[3]-0===bR}},filter:{PSEUDO:function(bS,bX,bW,bY){var e=bX[1],bR=bE.filters[e];if(bR){return bR(bS,bW,bX,bY)}else{if(e==="contains"){return(bS.textContent||bS.innerText||bw([bS])||"").indexOf(bX[3])>=0}else{if(e==="not"){var bT=bX[3];for(var bV=0,bU=bT.length;bV=0)}}},ID:function(bR,e){return bR.nodeType===1&&bR.getAttribute("id")===e},TAG:function(bR,e){return(e==="*"&&bR.nodeType===1)||!!bR.nodeName&&bR.nodeName.toLowerCase()===e},CLASS:function(bR,e){return(" "+(bR.className||bR.getAttribute("class"))+" ").indexOf(e)>-1},ATTR:function(bV,bT){var bS=bT[1],e=by.attr?by.attr(bV,bS):bE.attrHandle[bS]?bE.attrHandle[bS](bV):bV[bS]!=null?bV[bS]:bV.getAttribute(bS),bW=e+"",bU=bT[2],bR=bT[4];return e==null?bU==="!=":!bU&&by.attr?e!=null:bU==="="?bW===bR:bU==="*="?bW.indexOf(bR)>=0:bU==="~="?(" "+bW+" ").indexOf(bR)>=0:!bR?bW&&e!==false:bU==="!="?bW!==bR:bU==="^="?bW.indexOf(bR)===0:bU==="$="?bW.substr(bW.length-bR.length)===bR:bU==="|="?bW===bR||bW.substr(0,bR.length+1)===bR+"-":false},POS:function(bU,bR,bS,bV){var e=bR[2],bT=bE.setFilters[e];if(bT){return bT(bU,bS,bR,bV)}}}};var bD=bE.match.POS,bx=function(bR,e){return"\\"+(e-0+1)};for(var bz in bE.match){bE.match[bz]=new RegExp(bE.match[bz].source+(/(?![^\[]*\])(?![^\(]*\))/.source));bE.leftMatch[bz]=new RegExp(/(^(?:.|\r|\n)*?)/.source+bE.match[bz].source.replace(/\\(\d+)/g,bx))}var bF=function(bR,e){bR=Array.prototype.slice.call(bR,0);if(e){e.push.apply(e,bR);return e}return bR};try{Array.prototype.slice.call(av.documentElement.childNodes,0)[0].nodeType}catch(bP){bF=function(bU,bT){var bS=0,bR=bT||[];if(bL.call(bU)==="[object Array]"){Array.prototype.push.apply(bR,bU)}else{if(typeof bU.length==="number"){for(var e=bU.length;bS";e.insertBefore(bR,e.firstChild);if(av.getElementById(bS)){bE.find.ID=function(bU,bV,bW){if(typeof bV.getElementById!=="undefined"&&!bW){var bT=bV.getElementById(bU[1]);return bT?bT.id===bU[1]||typeof bT.getAttributeNode!=="undefined"&&bT.getAttributeNode("id").nodeValue===bU[1]?[bT]:L:[]}};bE.filter.ID=function(bV,bT){var bU=typeof bV.getAttributeNode!=="undefined"&&bV.getAttributeNode("id");return bV.nodeType===1&&bU&&bU.nodeValue===bT}}e.removeChild(bR);e=bR=null})();(function(){var e=av.createElement("div");e.appendChild(av.createComment(""));if(e.getElementsByTagName("*").length>0){bE.find.TAG=function(bR,bV){var bU=bV.getElementsByTagName(bR[1]);if(bR[1]==="*"){var bT=[];for(var bS=0;bU[bS];bS++){if(bU[bS].nodeType===1){bT.push(bU[bS])}}bU=bT}return bU}}e.innerHTML="";if(e.firstChild&&typeof e.firstChild.getAttribute!=="undefined"&&e.firstChild.getAttribute("href")!=="#"){bE.attrHandle.href=function(bR){return bR.getAttribute("href",2)}}e=null})();if(av.querySelectorAll){(function(){var e=by,bT=av.createElement("div"),bS="__sizzle__";bT.innerHTML="

";if(bT.querySelectorAll&&bT.querySelectorAll(".TEST").length===0){return}by=function(b4,bV,bZ,b3){bV=bV||av;if(!b3&&!by.isXML(bV)){var b2=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b4);if(b2&&(bV.nodeType===1||bV.nodeType===9)){if(b2[1]){return bF(bV.getElementsByTagName(b4),bZ)}else{if(b2[2]&&bE.find.CLASS&&bV.getElementsByClassName){return bF(bV.getElementsByClassName(b2[2]),bZ)}}}if(bV.nodeType===9){if(b4==="body"&&bV.body){return bF([bV.body],bZ)}else{if(b2&&b2[3]){var bY=bV.getElementById(b2[3]);if(bY&&bY.parentNode){if(bY.id===b2[3]){return bF([bY],bZ)}}else{return bF([],bZ)}}}try{return bF(bV.querySelectorAll(b4),bZ)}catch(b0){}}else{if(bV.nodeType===1&&bV.nodeName.toLowerCase()!=="object"){var bW=bV,bX=bV.getAttribute("id"),bU=bX||bS,b6=bV.parentNode,b5=/^\s*[+~]/.test(b4);if(!bX){bV.setAttribute("id",bU)}else{bU=bU.replace(/'/g,"\\$&")}if(b5&&b6){bV=bV.parentNode}try{if(!b5||b6){return bF(bV.querySelectorAll("[id='"+bU+"'] "+b4),bZ)}}catch(b1){}finally{if(!bX){bW.removeAttribute("id")}}}}}return e(b4,bV,bZ,b3)};for(var bR in e){by[bR]=e[bR]}bT=null})()}(function(){var e=av.documentElement,bS=e.matchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.msMatchesSelector;if(bS){var bU=!bS.call(av.createElement("div"),"div"),bR=false;try{bS.call(av.documentElement,"[test!='']:sizzle")}catch(bT){bR=true}by.matchesSelector=function(bW,bY){bY=bY.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!by.isXML(bW)){try{if(bR||!bE.match.PSEUDO.test(bY)&&!/!=/.test(bY)){var bV=bS.call(bW,bY);if(bV||!bU||bW.document&&bW.document.nodeType!==11){return bV}}}catch(bX){}}return by(bY,null,null,[bW]).length>0}}})();(function(){var e=av.createElement("div");e.innerHTML="
";if(!e.getElementsByClassName||e.getElementsByClassName("e").length===0){return}e.lastChild.className="e";if(e.getElementsByClassName("e").length===1){return}bE.order.splice(1,0,"CLASS");bE.find.CLASS=function(bR,bS,bT){if(typeof bS.getElementsByClassName!=="undefined"&&!bT){return bS.getElementsByClassName(bR[1])}};e=null})();function bv(bR,bW,bV,bZ,bX,bY){for(var bT=0,bS=bZ.length;bT0){bU=e;break}}}e=e[bR]}bZ[bT]=bU}}}if(av.documentElement.contains){by.contains=function(bR,e){return bR!==e&&(bR.contains?bR.contains(e):true)}}else{if(av.documentElement.compareDocumentPosition){by.contains=function(bR,e){return !!(bR.compareDocumentPosition(e)&16)}}else{by.contains=function(){return false}}}by.isXML=function(e){var bR=(e?e.ownerDocument||e:0).documentElement;return bR?bR.nodeName!=="HTML":false};var bM=function(bS,e,bW){var bV,bX=[],bU="",bY=e.nodeType?[e]:e;while((bV=bE.match.PSEUDO.exec(bS))){bU+=bV[0];bS=bS.replace(bE.match.PSEUDO,"")}bS=bE.relative[bS]?bS+"*":bS;for(var bT=0,bR=bY.length;bT0){for(bB=bA;bB=0:b.filter(e,this).length>0:this.filter(e).length>0)},closest:function(by,bx){var bv=[],bw,e,bz=this[0];if(b.isArray(by)){var bB=1;while(bz&&bz.ownerDocument&&bz!==bx){for(bw=0;bw-1:b.find.matchesSelector(bz,by)){bv.push(bz);break}else{bz=bz.parentNode;if(!bz||!bz.ownerDocument||bz===bx||bz.nodeType===11){break}}}}bv=bv.length>1?b.unique(bv):bv;return this.pushStack(bv,"closest",by)},index:function(e){if(!e){return(this[0]&&this[0].parentNode)?this.prevAll().length:-1}if(typeof e==="string"){return b.inArray(this[0],b(e))}return b.inArray(e.jquery?e[0]:e,this)},add:function(e,bv){var bx=typeof e==="string"?b(e,bv):b.makeArray(e&&e.nodeType?[e]:e),bw=b.merge(this.get(),bx);return this.pushStack(C(bx[0])||C(bw[0])?bw:b.unique(bw))},andSelf:function(){return this.add(this.prevObject)}});function C(e){return !e||!e.parentNode||e.parentNode.nodeType===11}b.each({parent:function(bv){var e=bv.parentNode;return e&&e.nodeType!==11?e:null},parents:function(e){return b.dir(e,"parentNode")},parentsUntil:function(bv,e,bw){return b.dir(bv,"parentNode",bw)},next:function(e){return b.nth(e,2,"nextSibling")},prev:function(e){return b.nth(e,2,"previousSibling")},nextAll:function(e){return b.dir(e,"nextSibling")},prevAll:function(e){return b.dir(e,"previousSibling")},nextUntil:function(bv,e,bw){return b.dir(bv,"nextSibling",bw)},prevUntil:function(bv,e,bw){return b.dir(bv,"previousSibling",bw)},siblings:function(e){return b.sibling(e.parentNode.firstChild,e)},children:function(e){return b.sibling(e.firstChild)},contents:function(e){return b.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:b.makeArray(e.childNodes)}},function(e,bv){b.fn[e]=function(by,bw){var bx=b.map(this,bv,by);if(!ab.test(e)){bw=by}if(bw&&typeof bw==="string"){bx=b.filter(bw,bx)}bx=this.length>1&&!ay[e]?b.unique(bx):bx;if((this.length>1||a9.test(bw))&&aq.test(e)){bx=bx.reverse()}return this.pushStack(bx,e,P.call(arguments).join(","))}});b.extend({filter:function(bw,e,bv){if(bv){bw=":not("+bw+")"}return e.length===1?b.find.matchesSelector(e[0],bw)?[e[0]]:[]:b.find.matches(bw,e)},dir:function(bw,bv,by){var e=[],bx=bw[bv];while(bx&&bx.nodeType!==9&&(by===L||bx.nodeType!==1||!b(bx).is(by))){if(bx.nodeType===1){e.push(bx)}bx=bx[bv]}return e},nth:function(by,e,bw,bx){e=e||1;var bv=0;for(;by;by=by[bw]){if(by.nodeType===1&&++bv===e){break}}return by},sibling:function(bw,bv){var e=[];for(;bw;bw=bw.nextSibling){if(bw.nodeType===1&&bw!==bv){e.push(bw)}}return e}});function aG(bx,bw,e){bw=bw||0;if(b.isFunction(bw)){return b.grep(bx,function(bz,by){var bA=!!bw.call(bz,by,bz);return bA===e})}else{if(bw.nodeType){return b.grep(bx,function(bz,by){return(bz===bw)===e})}else{if(typeof bw==="string"){var bv=b.grep(bx,function(by){return by.nodeType===1});if(bp.test(bw)){return b.filter(bw,bv,!e)}else{bw=b.filter(bw,bv)}}}}return b.grep(bx,function(bz,by){return(b.inArray(bz,bw)>=0)===e})}function a(e){var bw=aR.split("|"),bv=e.createDocumentFragment();if(bv.createElement){while(bw.length){bv.createElement(bw.pop())}}return bv}var aR="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",ag=/ jQuery\d+="(?:\d+|null)"/g,ar=/^\s+/,R=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,d=/<([\w:]+)/,w=/",""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},ac=a(av); +ax.optgroup=ax.option;ax.tbody=ax.tfoot=ax.colgroup=ax.caption=ax.thead;ax.th=ax.td;if(!b.support.htmlSerialize){ax._default=[1,"div
","
"]}b.fn.extend({text:function(e){if(b.isFunction(e)){return this.each(function(bw){var bv=b(this);bv.text(e.call(this,bw,bv.text()))})}if(typeof e!=="object"&&e!==L){return this.empty().append((this[0]&&this[0].ownerDocument||av).createTextNode(e))}return b.text(this)},wrapAll:function(e){if(b.isFunction(e)){return this.each(function(bw){b(this).wrapAll(e.call(this,bw))})}if(this[0]){var bv=b(e,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){bv.insertBefore(this[0])}bv.map(function(){var bw=this;while(bw.firstChild&&bw.firstChild.nodeType===1){bw=bw.firstChild}return bw}).append(this)}return this},wrapInner:function(e){if(b.isFunction(e)){return this.each(function(bv){b(this).wrapInner(e.call(this,bv))})}return this.each(function(){var bv=b(this),bw=bv.contents();if(bw.length){bw.wrapAll(e)}else{bv.append(e)}})},wrap:function(e){var bv=b.isFunction(e);return this.each(function(bw){b(this).wrapAll(bv?e.call(this,bw):e)})},unwrap:function(){return this.parent().each(function(){if(!b.nodeName(this,"body")){b(this).replaceWith(this.childNodes)}}).end()},append:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1){this.appendChild(e)}})},prepend:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1){this.insertBefore(e,this.firstChild)}})},before:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(bv){this.parentNode.insertBefore(bv,this)})}else{if(arguments.length){var e=b.clean(arguments);e.push.apply(e,this.toArray());return this.pushStack(e,"before",arguments)}}},after:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(bv){this.parentNode.insertBefore(bv,this.nextSibling)})}else{if(arguments.length){var e=this.pushStack(this,"after",arguments);e.push.apply(e,b.clean(arguments));return e}}},remove:function(e,bx){for(var bv=0,bw;(bw=this[bv])!=null;bv++){if(!e||b.filter(e,[bw]).length){if(!bx&&bw.nodeType===1){b.cleanData(bw.getElementsByTagName("*"));b.cleanData([bw])}if(bw.parentNode){bw.parentNode.removeChild(bw)}}}return this},empty:function(){for(var e=0,bv;(bv=this[e])!=null;e++){if(bv.nodeType===1){b.cleanData(bv.getElementsByTagName("*"))}while(bv.firstChild){bv.removeChild(bv.firstChild)}}return this},clone:function(bv,e){bv=bv==null?false:bv;e=e==null?bv:e;return this.map(function(){return b.clone(this,bv,e)})},html:function(bx){if(bx===L){return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(ag,""):null}else{if(typeof bx==="string"&&!ae.test(bx)&&(b.support.leadingWhitespace||!ar.test(bx))&&!ax[(d.exec(bx)||["",""])[1].toLowerCase()]){bx=bx.replace(R,"<$1>");try{for(var bw=0,bv=this.length;bw1&&bw0?this.clone(true):this).get();b(bC[bA])[bv](by);bz=bz.concat(by)}return this.pushStack(bz,e,bC.selector)}}});function bg(e){if(typeof e.getElementsByTagName!=="undefined"){return e.getElementsByTagName("*")}else{if(typeof e.querySelectorAll!=="undefined"){return e.querySelectorAll("*")}else{return[]}}}function az(e){if(e.type==="checkbox"||e.type==="radio"){e.defaultChecked=e.checked}}function E(e){var bv=(e.nodeName||"").toLowerCase();if(bv==="input"){az(e)}else{if(bv!=="script"&&typeof e.getElementsByTagName!=="undefined"){b.grep(e.getElementsByTagName("input"),az)}}}function al(e){var bv=av.createElement("div");ac.appendChild(bv);bv.innerHTML=e.outerHTML;return bv.firstChild}b.extend({clone:function(by,bA,bw){var e,bv,bx,bz=b.support.html5Clone||!ah.test("<"+by.nodeName)?by.cloneNode(true):al(by);if((!b.support.noCloneEvent||!b.support.noCloneChecked)&&(by.nodeType===1||by.nodeType===11)&&!b.isXMLDoc(by)){ai(by,bz);e=bg(by);bv=bg(bz);for(bx=0;e[bx];++bx){if(bv[bx]){ai(e[bx],bv[bx])}}}if(bA){t(by,bz);if(bw){e=bg(by);bv=bg(bz);for(bx=0;e[bx];++bx){t(e[bx],bv[bx])}}}e=bv=null;return bz},clean:function(bw,by,bH,bA){var bF;by=by||av;if(typeof by.createElement==="undefined"){by=by.ownerDocument||by[0]&&by[0].ownerDocument||av}var bI=[],bB;for(var bE=0,bz;(bz=bw[bE])!=null;bE++){if(typeof bz==="number"){bz+=""}if(!bz){continue}if(typeof bz==="string"){if(!W.test(bz)){bz=by.createTextNode(bz)}else{bz=bz.replace(R,"<$1>");var bK=(d.exec(bz)||["",""])[1].toLowerCase(),bx=ax[bK]||ax._default,bD=bx[0],bv=by.createElement("div");if(by===av){ac.appendChild(bv)}else{a(by).appendChild(bv)}bv.innerHTML=bx[1]+bz+bx[2];while(bD--){bv=bv.lastChild}if(!b.support.tbody){var e=w.test(bz),bC=bK==="table"&&!e?bv.firstChild&&bv.firstChild.childNodes:bx[1]===""&&!e?bv.childNodes:[];for(bB=bC.length-1;bB>=0;--bB){if(b.nodeName(bC[bB],"tbody")&&!bC[bB].childNodes.length){bC[bB].parentNode.removeChild(bC[bB])}}}if(!b.support.leadingWhitespace&&ar.test(bz)){bv.insertBefore(by.createTextNode(ar.exec(bz)[0]),bv.firstChild)}bz=bv.childNodes}}var bG;if(!b.support.appendChecked){if(bz[0]&&typeof(bG=bz.length)==="number"){for(bB=0;bB=0){return bx+"px"}}else{return bx}}}});if(!b.support.opacity){b.cssHooks.opacity={get:function(bv,e){return au.test((e&&bv.currentStyle?bv.currentStyle.filter:bv.style.filter)||"")?(parseFloat(RegExp.$1)/100)+"":e?"1":""},set:function(by,bz){var bx=by.style,bv=by.currentStyle,e=b.isNumeric(bz)?"alpha(opacity="+bz*100+")":"",bw=bv&&bv.filter||bx.filter||"";bx.zoom=1;if(bz>=1&&b.trim(bw.replace(ak,""))===""){bx.removeAttribute("filter");if(bv&&!bv.filter){return}}bx.filter=ak.test(bw)?bw.replace(ak,e):bw+" "+e}}}b(function(){if(!b.support.reliableMarginRight){b.cssHooks.marginRight={get:function(bw,bv){var e;b.swap(bw,{display:"inline-block"},function(){if(bv){e=Z(bw,"margin-right","marginRight")}else{e=bw.style.marginRight}});return e}}}});if(av.defaultView&&av.defaultView.getComputedStyle){aI=function(by,bw){var bv,bx,e;bw=bw.replace(z,"-$1").toLowerCase();if((bx=by.ownerDocument.defaultView)&&(e=bx.getComputedStyle(by,null))){bv=e.getPropertyValue(bw);if(bv===""&&!b.contains(by.ownerDocument.documentElement,by)){bv=b.style(by,bw)}}return bv}}if(av.documentElement.currentStyle){aX=function(bz,bw){var bA,e,by,bv=bz.currentStyle&&bz.currentStyle[bw],bx=bz.style;if(bv===null&&bx&&(by=bx[bw])){bv=by}if(!bc.test(bv)&&bn.test(bv)){bA=bx.left;e=bz.runtimeStyle&&bz.runtimeStyle.left;if(e){bz.runtimeStyle.left=bz.currentStyle.left}bx.left=bw==="fontSize"?"1em":(bv||0);bv=bx.pixelLeft+"px";bx.left=bA;if(e){bz.runtimeStyle.left=e}}return bv===""?"auto":bv}}Z=aI||aX;function p(by,bw,bv){var bA=bw==="width"?by.offsetWidth:by.offsetHeight,bz=bw==="width"?an:a1,bx=0,e=bz.length; +if(bA>0){if(bv!=="border"){for(;bx)<[^<]*)*<\/script>/gi,q=/^(?:select|textarea)/i,h=/\s+/,br=/([?&])_=[^&]*/,K=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,A=b.fn.load,aa={},r={},aE,s,aV=["*/"]+["*"];try{aE=bl.href}catch(aw){aE=av.createElement("a");aE.href="";aE=aE.href}s=K.exec(aE.toLowerCase())||[];function f(e){return function(by,bA){if(typeof by!=="string"){bA=by;by="*"}if(b.isFunction(bA)){var bx=by.toLowerCase().split(h),bw=0,bz=bx.length,bv,bB,bC;for(;bw=0){var e=bw.slice(by,bw.length);bw=bw.slice(0,by)}var bx="GET";if(bz){if(b.isFunction(bz)){bA=bz;bz=L}else{if(typeof bz==="object"){bz=b.param(bz,b.ajaxSettings.traditional);bx="POST"}}}var bv=this;b.ajax({url:bw,type:bx,dataType:"html",data:bz,complete:function(bC,bB,bD){bD=bC.responseText;if(bC.isResolved()){bC.done(function(bE){bD=bE});bv.html(e?b("
").append(bD.replace(a6,"")).find(e):bD)}if(bA){bv.each(bA,[bD,bB,bC])}}});return this},serialize:function(){return b.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?b.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||q.test(this.nodeName)||aZ.test(this.type))}).map(function(e,bv){var bw=b(this).val();return bw==null?null:b.isArray(bw)?b.map(bw,function(by,bx){return{name:bv.name,value:by.replace(bs,"\r\n")}}):{name:bv.name,value:bw.replace(bs,"\r\n")}}).get()}});b.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,bv){b.fn[bv]=function(bw){return this.on(bv,bw)}});b.each(["get","post"],function(e,bv){b[bv]=function(bw,by,bz,bx){if(b.isFunction(by)){bx=bx||bz;bz=by;by=L}return b.ajax({type:bv,url:bw,data:by,success:bz,dataType:bx})}});b.extend({getScript:function(e,bv){return b.get(e,L,bv,"script")},getJSON:function(e,bv,bw){return b.get(e,bv,bw,"json")},ajaxSetup:function(bv,e){if(e){am(bv,b.ajaxSettings)}else{e=bv;bv=b.ajaxSettings}am(bv,e);return bv},ajaxSettings:{url:aE,isLocal:aM.test(s[1]),global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":aV},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":bb.String,"text html":true,"text json":b.parseJSON,"text xml":b.parseXML},flatOptions:{context:true,url:true}},ajaxPrefilter:f(aa),ajaxTransport:f(r),ajax:function(bz,bx){if(typeof bz==="object"){bx=bz;bz=L}bx=bx||{};var bD=b.ajaxSetup({},bx),bS=bD.context||bD,bG=bS!==bD&&(bS.nodeType||bS instanceof b)?b(bS):b.event,bR=b.Deferred(),bN=b.Callbacks("once memory"),bB=bD.statusCode||{},bC,bH={},bO={},bQ,by,bL,bE,bI,bA=0,bw,bK,bJ={readyState:0,setRequestHeader:function(bT,bU){if(!bA){var e=bT.toLowerCase();bT=bO[e]=bO[e]||bT;bH[bT]=bU}return this},getAllResponseHeaders:function(){return bA===2?bQ:null},getResponseHeader:function(bT){var e;if(bA===2){if(!by){by={};while((e=aD.exec(bQ))){by[e[1].toLowerCase()]=e[2]}}e=by[bT.toLowerCase()]}return e===L?null:e},overrideMimeType:function(e){if(!bA){bD.mimeType=e}return this},abort:function(e){e=e||"abort";if(bL){bL.abort(e)}bF(0,e);return this}};function bF(bZ,bU,b0,bW){if(bA===2){return}bA=2;if(bE){clearTimeout(bE)}bL=L;bQ=bW||"";bJ.readyState=bZ>0?4:0;var bT,b4,b3,bX=bU,bY=b0?bj(bD,bJ,b0):L,bV,b2;if(bZ>=200&&bZ<300||bZ===304){if(bD.ifModified){if((bV=bJ.getResponseHeader("Last-Modified"))){b.lastModified[bC]=bV}if((b2=bJ.getResponseHeader("Etag"))){b.etag[bC]=b2}}if(bZ===304){bX="notmodified";bT=true}else{try{b4=G(bD,bY);bX="success";bT=true}catch(b1){bX="parsererror";b3=b1}}}else{b3=bX;if(!bX||bZ){bX="error";if(bZ<0){bZ=0}}}bJ.status=bZ;bJ.statusText=""+(bU||bX);if(bT){bR.resolveWith(bS,[b4,bX,bJ])}else{bR.rejectWith(bS,[bJ,bX,b3])}bJ.statusCode(bB);bB=L;if(bw){bG.trigger("ajax"+(bT?"Success":"Error"),[bJ,bD,bT?b4:b3])}bN.fireWith(bS,[bJ,bX]);if(bw){bG.trigger("ajaxComplete",[bJ,bD]);if(!(--b.active)){b.event.trigger("ajaxStop")}}}bR.promise(bJ);bJ.success=bJ.done;bJ.error=bJ.fail;bJ.complete=bN.add;bJ.statusCode=function(bT){if(bT){var e;if(bA<2){for(e in bT){bB[e]=[bB[e],bT[e]]}}else{e=bT[bJ.status];bJ.then(e,e)}}return this};bD.url=((bz||bD.url)+"").replace(bq,"").replace(c,s[1]+"//");bD.dataTypes=b.trim(bD.dataType||"*").toLowerCase().split(h);if(bD.crossDomain==null){bI=K.exec(bD.url.toLowerCase());bD.crossDomain=!!(bI&&(bI[1]!=s[1]||bI[2]!=s[2]||(bI[3]||(bI[1]==="http:"?80:443))!=(s[3]||(s[1]==="http:"?80:443))))}if(bD.data&&bD.processData&&typeof bD.data!=="string"){bD.data=b.param(bD.data,bD.traditional)}aW(aa,bD,bx,bJ);if(bA===2){return false}bw=bD.global;bD.type=bD.type.toUpperCase();bD.hasContent=!aQ.test(bD.type);if(bw&&b.active++===0){b.event.trigger("ajaxStart")}if(!bD.hasContent){if(bD.data){bD.url+=(M.test(bD.url)?"&":"?")+bD.data;delete bD.data}bC=bD.url;if(bD.cache===false){var bv=b.now(),bP=bD.url.replace(br,"$1_="+bv);bD.url=bP+((bP===bD.url)?(M.test(bD.url)?"&":"?")+"_="+bv:"")}}if(bD.data&&bD.hasContent&&bD.contentType!==false||bx.contentType){bJ.setRequestHeader("Content-Type",bD.contentType)}if(bD.ifModified){bC=bC||bD.url;if(b.lastModified[bC]){bJ.setRequestHeader("If-Modified-Since",b.lastModified[bC])}if(b.etag[bC]){bJ.setRequestHeader("If-None-Match",b.etag[bC])}}bJ.setRequestHeader("Accept",bD.dataTypes[0]&&bD.accepts[bD.dataTypes[0]]?bD.accepts[bD.dataTypes[0]]+(bD.dataTypes[0]!=="*"?", "+aV+"; q=0.01":""):bD.accepts["*"]);for(bK in bD.headers){bJ.setRequestHeader(bK,bD.headers[bK])}if(bD.beforeSend&&(bD.beforeSend.call(bS,bJ,bD)===false||bA===2)){bJ.abort();return false}for(bK in {success:1,error:1,complete:1}){bJ[bK](bD[bK])}bL=aW(r,bD,bx,bJ);if(!bL){bF(-1,"No Transport")}else{bJ.readyState=1;if(bw){bG.trigger("ajaxSend",[bJ,bD])}if(bD.async&&bD.timeout>0){bE=setTimeout(function(){bJ.abort("timeout")},bD.timeout)}try{bA=1;bL.send(bH,bF)}catch(bM){if(bA<2){bF(-1,bM)}else{throw bM}}}return bJ},param:function(e,bw){var bv=[],by=function(bz,bA){bA=b.isFunction(bA)?bA():bA;bv[bv.length]=encodeURIComponent(bz)+"="+encodeURIComponent(bA)};if(bw===L){bw=b.ajaxSettings.traditional}if(b.isArray(e)||(e.jquery&&!b.isPlainObject(e))){b.each(e,function(){by(this.name,this.value)})}else{for(var bx in e){v(bx,e[bx],bw,by)}}return bv.join("&").replace(k,"+")}});function v(bw,by,bv,bx){if(b.isArray(by)){b.each(by,function(bA,bz){if(bv||ap.test(bw)){bx(bw,bz)}else{v(bw+"["+(typeof bz==="object"||b.isArray(bz)?bA:"")+"]",bz,bv,bx)}})}else{if(!bv&&by!=null&&typeof by==="object"){for(var e in by){v(bw+"["+e+"]",by[e],bv,bx)}}else{bx(bw,by)}}}b.extend({active:0,lastModified:{},etag:{}});function bj(bD,bC,bz){var bv=bD.contents,bB=bD.dataTypes,bw=bD.responseFields,by,bA,bx,e;for(bA in bw){if(bA in bz){bC[bw[bA]]=bz[bA]}}while(bB[0]==="*"){bB.shift();if(by===L){by=bD.mimeType||bC.getResponseHeader("content-type")}}if(by){for(bA in bv){if(bv[bA]&&bv[bA].test(by)){bB.unshift(bA);break}}}if(bB[0] in bz){bx=bB[0]}else{for(bA in bz){if(!bB[0]||bD.converters[bA+" "+bB[0]]){bx=bA;break}if(!e){e=bA}}bx=bx||e}if(bx){if(bx!==bB[0]){bB.unshift(bx)}return bz[bx]}}function G(bH,bz){if(bH.dataFilter){bz=bH.dataFilter(bz,bH.dataType)}var bD=bH.dataTypes,bG={},bA,bE,bw=bD.length,bB,bC=bD[0],bx,by,bF,bv,e;for(bA=1;bA=bw.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();bw.animatedProperties[this.prop]=true;for(bA in bw.animatedProperties){if(bw.animatedProperties[bA]!==true){e=false}}if(e){if(bw.overflow!=null&&!b.support.shrinkWrapBlocks){b.each(["","X","Y"],function(bC,bD){bz.style["overflow"+bD]=bw.overflow[bC]})}if(bw.hide){b(bz).hide()}if(bw.hide||bw.show){for(bA in bw.animatedProperties){b.style(bz,bA,bw.orig[bA]);b.removeData(bz,"fxshow"+bA,true);b.removeData(bz,"toggle"+bA,true)}}bv=bw.complete;if(bv){bw.complete=false;bv.call(bz)}}return false}else{if(bw.duration==Infinity){this.now=bx}else{bB=bx-this.startTime;this.state=bB/bw.duration;this.pos=b.easing[bw.animatedProperties[this.prop]](this.state,bB,0,1,bw.duration);this.now=this.start+((this.end-this.start)*this.pos)}this.update()}return true}};b.extend(b.fx,{tick:function(){var bw,bv=b.timers,e=0;for(;e").appendTo(e),bw=bv.css("display");bv.remove();if(bw==="none"||bw===""){if(!a8){a8=av.createElement("iframe");a8.frameBorder=a8.width=a8.height=0}e.appendChild(a8);if(!m||!a8.createElement){m=(a8.contentWindow||a8.contentDocument).document;m.write((av.compatMode==="CSS1Compat"?"":"")+"");m.close()}bv=m.createElement(bx);m.body.appendChild(bv);bw=b.css(bv,"display");e.removeChild(a8)}Q[bx]=bw}return Q[bx]}var V=/^t(?:able|d|h)$/i,ad=/^(?:body|html)$/i;if("getBoundingClientRect" in av.documentElement){b.fn.offset=function(bI){var by=this[0],bB;if(bI){return this.each(function(e){b.offset.setOffset(this,bI,e)})}if(!by||!by.ownerDocument){return null}if(by===by.ownerDocument.body){return b.offset.bodyOffset(by)}try{bB=by.getBoundingClientRect()}catch(bF){}var bH=by.ownerDocument,bw=bH.documentElement;if(!bB||!b.contains(bw,by)){return bB?{top:bB.top,left:bB.left}:{top:0,left:0}}var bC=bH.body,bD=aK(bH),bA=bw.clientTop||bC.clientTop||0,bE=bw.clientLeft||bC.clientLeft||0,bv=bD.pageYOffset||b.support.boxModel&&bw.scrollTop||bC.scrollTop,bz=bD.pageXOffset||b.support.boxModel&&bw.scrollLeft||bC.scrollLeft,bG=bB.top+bv-bA,bx=bB.left+bz-bE;return{top:bG,left:bx}}}else{b.fn.offset=function(bF){var bz=this[0];if(bF){return this.each(function(bG){b.offset.setOffset(this,bF,bG)})}if(!bz||!bz.ownerDocument){return null}if(bz===bz.ownerDocument.body){return b.offset.bodyOffset(bz)}var bC,bw=bz.offsetParent,bv=bz,bE=bz.ownerDocument,bx=bE.documentElement,bA=bE.body,bB=bE.defaultView,e=bB?bB.getComputedStyle(bz,null):bz.currentStyle,bD=bz.offsetTop,by=bz.offsetLeft;while((bz=bz.parentNode)&&bz!==bA&&bz!==bx){if(b.support.fixedPosition&&e.position==="fixed"){break}bC=bB?bB.getComputedStyle(bz,null):bz.currentStyle;bD-=bz.scrollTop;by-=bz.scrollLeft;if(bz===bw){bD+=bz.offsetTop;by+=bz.offsetLeft;if(b.support.doesNotAddBorder&&!(b.support.doesAddBorderForTableAndCells&&V.test(bz.nodeName))){bD+=parseFloat(bC.borderTopWidth)||0;by+=parseFloat(bC.borderLeftWidth)||0}bv=bw;bw=bz.offsetParent}if(b.support.subtractsBorderForOverflowNotVisible&&bC.overflow!=="visible"){bD+=parseFloat(bC.borderTopWidth)||0;by+=parseFloat(bC.borderLeftWidth)||0}e=bC}if(e.position==="relative"||e.position==="static"){bD+=bA.offsetTop;by+=bA.offsetLeft}if(b.support.fixedPosition&&e.position==="fixed"){bD+=Math.max(bx.scrollTop,bA.scrollTop);by+=Math.max(bx.scrollLeft,bA.scrollLeft)}return{top:bD,left:by}}}b.offset={bodyOffset:function(e){var bw=e.offsetTop,bv=e.offsetLeft;if(b.support.doesNotIncludeMarginInBodyOffset){bw+=parseFloat(b.css(e,"marginTop"))||0;bv+=parseFloat(b.css(e,"marginLeft"))||0}return{top:bw,left:bv}},setOffset:function(bx,bG,bA){var bB=b.css(bx,"position");if(bB==="static"){bx.style.position="relative"}var bz=b(bx),bv=bz.offset(),e=b.css(bx,"top"),bE=b.css(bx,"left"),bF=(bB==="absolute"||bB==="fixed")&&b.inArray("auto",[e,bE])>-1,bD={},bC={},bw,by;if(bF){bC=bz.position();bw=bC.top;by=bC.left}else{bw=parseFloat(e)||0;by=parseFloat(bE)||0}if(b.isFunction(bG)){bG=bG.call(bx,bA,bv)}if(bG.top!=null){bD.top=(bG.top-bv.top)+bw}if(bG.left!=null){bD.left=(bG.left-bv.left)+by}if("using" in bG){bG.using.call(bx,bD)}else{bz.css(bD)}}};b.fn.extend({position:function(){if(!this[0]){return null}var bw=this[0],bv=this.offsetParent(),bx=this.offset(),e=ad.test(bv[0].nodeName)?{top:0,left:0}:bv.offset();bx.top-=parseFloat(b.css(bw,"marginTop"))||0;bx.left-=parseFloat(b.css(bw,"marginLeft"))||0;e.top+=parseFloat(b.css(bv[0],"borderTopWidth"))||0;e.left+=parseFloat(b.css(bv[0],"borderLeftWidth"))||0;return{top:bx.top-e.top,left:bx.left-e.left}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||av.body;while(e&&(!ad.test(e.nodeName)&&b.css(e,"position")==="static")){e=e.offsetParent}return e})}});b.each(["Left","Top"],function(bv,e){var bw="scroll"+e;b.fn[bw]=function(bz){var bx,by;if(bz===L){bx=this[0];if(!bx){return null}by=aK(bx);return by?("pageXOffset" in by)?by[bv?"pageYOffset":"pageXOffset"]:b.support.boxModel&&by.document.documentElement[bw]||by.document.body[bw]:bx[bw]}return this.each(function(){by=aK(this);if(by){by.scrollTo(!bv?bz:b(by).scrollLeft(),bv?bz:b(by).scrollTop())}else{this[bw]=bz}})}});function aK(e){return b.isWindow(e)?e:e.nodeType===9?e.defaultView||e.parentWindow:false}b.each(["Height","Width"],function(bv,e){var bw=e.toLowerCase();b.fn["inner"+e]=function(){var bx=this[0];return bx?bx.style?parseFloat(b.css(bx,bw,"padding")):this[bw]():null};b.fn["outer"+e]=function(by){var bx=this[0];return bx?bx.style?parseFloat(b.css(bx,bw,by?"margin":"border")):this[bw]():null};b.fn[bw]=function(bz){var bA=this[0];if(!bA){return bz==null?null:this}if(b.isFunction(bz)){return this.each(function(bE){var bD=b(this);bD[bw](bz.call(this,bE,bD[bw]()))})}if(b.isWindow(bA)){var bB=bA.document.documentElement["client"+e],bx=bA.document.body;return bA.document.compatMode==="CSS1Compat"&&bB||bx&&bx["client"+e]||bB}else{if(bA.nodeType===9){return Math.max(bA.documentElement["client"+e],bA.body["scroll"+e],bA.documentElement["scroll"+e],bA.body["offset"+e],bA.documentElement["offset"+e])}else{if(bz===L){var bC=b.css(bA,bw),by=parseFloat(bC);return b.isNumeric(by)?by:bC}else{return this.css(bw,typeof bz==="string"?bz:bz+"px")}}}}});bb.jQuery=bb.$=b;if(typeof define==="function"&&define.amd&&define.amd.jQuery){define("jquery",[],function(){return b +})}})(window); diff --git a/enet server test/enet2/docs/html/license_8dox.html b/enet server test/enet2/docs/html/license_8dox.html new file mode 100644 index 0000000..019704e --- /dev/null +++ b/enet server test/enet2/docs/html/license_8dox.html @@ -0,0 +1,105 @@ + + + + + + +ENet: docs/license.dox File Reference + + + + + + + + + +
+
+
+ + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+ + + + + + + + + + +
+ +
+ + +
+
+
docs/license.dox File Reference
+
+
+
+ + + + diff --git a/enet server test/enet2/docs/html/list_8c.html b/enet server test/enet2/docs/html/list_8c.html new file mode 100644 index 0000000..fdb7770 --- /dev/null +++ b/enet server test/enet2/docs/html/list_8c.html @@ -0,0 +1,146 @@ + + + + + + +ENet: list.c File Reference + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + + + + + + +
+ +
+ +
+
+ +
+
list.c File Reference
+
+
+ +

ENet linked list functions. +More...

+
#include "enet/enet.h"
+
+ + + +

+Macros

#define ENET_BUILDING_LIB   1
 
+ + + + + + + + + + + +

+Functions

void enet_list_clear (ENetList *list)
 
ENetListIterator enet_list_insert (ENetListIterator position, void *data)
 
ENetListIterator enet_list_move (ENetListIterator position, void *dataFirst, void *dataLast)
 
void * enet_list_remove (ENetListIterator position)
 
size_t enet_list_size (ENetList *list)
 
+

Detailed Description

+

ENet linked list functions.

+

Macro Definition Documentation

+ +
+
+ + + + +
#define ENET_BUILDING_LIB   1
+
+ +
+
+
+ + + + diff --git a/enet server test/enet2/docs/html/list_8h.html b/enet server test/enet2/docs/html/list_8h.html new file mode 100644 index 0000000..40fc33c --- /dev/null +++ b/enet server test/enet2/docs/html/list_8h.html @@ -0,0 +1,289 @@ + + + + + + +ENet: include/enet/list.h File Reference + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
list.h File Reference
+
+
+ +

ENet list management. +More...

+
#include <stdlib.h>
+
+ + + + + +

+Data Structures

struct  ENetList
 
struct  ENetListNode
 
+ + + + + + + + + + + + + + + +

+Macros

#define enet_list_back(list)   ((void *) (list) -> sentinel.previous)
 
#define enet_list_begin(list)   ((list) -> sentinel.next)
 
#define enet_list_empty(list)   (enet_list_begin (list) == enet_list_end (list))
 
#define enet_list_end(list)   (& (list) -> sentinel)
 
#define enet_list_front(list)   ((void *) (list) -> sentinel.next)
 
#define enet_list_next(iterator)   ((iterator) -> next)
 
#define enet_list_previous(iterator)   ((iterator) -> previous)
 
+ + + +

+Typedefs

typedef ENetListNodeENetListIterator
 
+ + + + + + + + + + + +

+Functions

void enet_list_clear (ENetList *)
 
ENetListIterator enet_list_insert (ENetListIterator, void *)
 
ENetListIterator enet_list_move (ENetListIterator, void *, void *)
 
void * enet_list_remove (ENetListIterator)
 
size_t enet_list_size (ENetList *)
 
+

Detailed Description

+

ENet list management.

+

Macro Definition Documentation

+ +
+
+ + + + + + + + +
#define enet_list_back( list)   ((void *) (list) -> sentinel.previous)
+
+ +
+
+ +
+
+ + + + + + + + +
#define enet_list_begin( list)   ((list) -> sentinel.next)
+
+ +
+
+ +
+
+ + + + + + + + +
#define enet_list_empty( list)   (enet_list_begin (list) == enet_list_end (list))
+
+ +
+
+ +
+
+ + + + + + + + +
#define enet_list_end( list)   (& (list) -> sentinel)
+
+ +
+
+ +
+
+ + + + + + + + +
#define enet_list_front( list)   ((void *) (list) -> sentinel.next)
+
+ +
+
+ +
+
+ + + + + + + + +
#define enet_list_next( iterator)   ((iterator) -> next)
+
+ +
+
+ +
+
+ + + + + + + + +
#define enet_list_previous( iterator)   ((iterator) -> previous)
+
+ +
+
+

Typedef Documentation

+ +
+
+ + + + +
typedef ENetListNode* ENetListIterator
+
+ +
+
+
+ + + + diff --git a/enet server test/enet2/docs/html/mainpage_8dox.html b/enet server test/enet2/docs/html/mainpage_8dox.html new file mode 100644 index 0000000..3d83680 --- /dev/null +++ b/enet server test/enet2/docs/html/mainpage_8dox.html @@ -0,0 +1,105 @@ + + + + + + +ENet: docs/mainpage.dox File Reference + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + + + + + + +
+ +
+ +
+
+
+
docs/mainpage.dox File Reference
+
+
+
+ + + + diff --git a/enet server test/enet2/docs/html/modules.html b/enet server test/enet2/docs/html/modules.html new file mode 100644 index 0000000..7cf0616 --- /dev/null +++ b/enet server test/enet2/docs/html/modules.html @@ -0,0 +1,118 @@ + + + + + + +ENet: Functions + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + + +
+ + + + +
+ +
+ +
+
+
Functions
+
+ + + + + diff --git a/enet server test/enet2/docs/html/nav_f.png b/enet server test/enet2/docs/html/nav_f.png new file mode 100644 index 0000000000000000000000000000000000000000..9f29407b924364ef2a9dd83f8067406bc27bde9e GIT binary patch literal 179 zcmeAS@N?(olHy`uVBq!ia0vp^j6iI`!2~2XGqLUlQdOQVjv*C{Z|6GlH5rJw*w;?K zY`dsKsY_wSQWM|H1<8C57*m#)KIK%)H>@-+pYYQ(dHKXbBc4QucJ=Qc7JRpz`#z)A z`SH3d>z+M27qab9inmwwlLRiV&Fbcs)_YYiOG?k(v~TT{jz6tl9afz|N%?v$!_7kAdQ}`elF{r5}E+&ejXhF literal 0 HcmV?d00001 diff --git a/enet server test/enet2/docs/html/open.png b/enet server test/enet2/docs/html/open.png new file mode 100644 index 0000000000000000000000000000000000000000..e86581272098bb3e2403c0000bd9dd0ac584c73f GIT binary patch literal 118 zcmeAS@N?(olHy`uVBq!ia0vp^oFL4>1|%O$WD@{Vww^AIAr*{o=N{x_P~c%+&$n3F zazopr0P}4mO#lD@ literal 0 HcmV?d00001 diff --git a/enet server test/enet2/docs/html/packet_8c.html b/enet server test/enet2/docs/html/packet_8c.html new file mode 100644 index 0000000..518b962 --- /dev/null +++ b/enet server test/enet2/docs/html/packet_8c.html @@ -0,0 +1,148 @@ + + + + + + +ENet: packet.c File Reference + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + + + + + + +
+ +
+ +
+
+ +
+
packet.c File Reference
+
+
+ +

ENet packet management functions. +More...

+
#include <string.h>
+#include "enet/enet.h"
+
+ + + +

+Macros

#define ENET_BUILDING_LIB   1
 
+ + + + + + + + + + + + +

+Functions

enet_uint32 enet_crc32 (const ENetBuffer *buffers, size_t bufferCount)
 
ENetPacketenet_packet_create (const void *data, size_t dataLength, enet_uint32 flags)
 Creates a packet that may be sent to a peer. More...
 
void enet_packet_destroy (ENetPacket *packet)
 Destroys the packet and deallocates its data. More...
 
int enet_packet_resize (ENetPacket *packet, size_t dataLength)
 Attempts to resize the data in the packet to length specified in the dataLength parameter. More...
 
+

Detailed Description

+

ENet packet management functions.

+

Macro Definition Documentation

+ +
+
+ + + + +
#define ENET_BUILDING_LIB   1
+
+ +
+
+
+ + + + diff --git a/enet server test/enet2/docs/html/peer_8c.html b/enet server test/enet2/docs/html/peer_8c.html new file mode 100644 index 0000000..bd33b4f --- /dev/null +++ b/enet server test/enet2/docs/html/peer_8c.html @@ -0,0 +1,187 @@ + + + + + + +ENet: peer.c File Reference + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + + + + + + +
+ +
+ +
+
+ +
+
peer.c File Reference
+
+
+ +

ENet peer management functions. +More...

+
#include <string.h>
+#include "enet/enet.h"
+
+ + + +

+Macros

#define ENET_BUILDING_LIB   1
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

void enet_peer_disconnect (ENetPeer *peer, enet_uint32 data)
 Request a disconnection from a peer. More...
 
void enet_peer_disconnect_later (ENetPeer *peer, enet_uint32 data)
 Request a disconnection from a peer, but only after all queued outgoing packets are sent. More...
 
void enet_peer_disconnect_now (ENetPeer *peer, enet_uint32 data)
 Force an immediate disconnection from a peer. More...
 
void enet_peer_dispatch_incoming_reliable_commands (ENetPeer *peer, ENetChannel *channel)
 
void enet_peer_dispatch_incoming_unreliable_commands (ENetPeer *peer, ENetChannel *channel)
 
void enet_peer_on_connect (ENetPeer *peer)
 
void enet_peer_on_disconnect (ENetPeer *peer)
 
void enet_peer_ping (ENetPeer *peer)
 Sends a ping request to a peer. More...
 
void enet_peer_ping_interval (ENetPeer *peer, enet_uint32 pingInterval)
 Sets the interval at which pings will be sent to a peer. More...
 
ENetAcknowledgementenet_peer_queue_acknowledgement (ENetPeer *peer, const ENetProtocol *command, enet_uint16 sentTime)
 
ENetIncomingCommandenet_peer_queue_incoming_command (ENetPeer *peer, const ENetProtocol *command, const void *data, size_t dataLength, enet_uint32 flags, enet_uint32 fragmentCount)
 
ENetOutgoingCommandenet_peer_queue_outgoing_command (ENetPeer *peer, const ENetProtocol *command, ENetPacket *packet, enet_uint32 offset, enet_uint16 length)
 
ENetPacketenet_peer_receive (ENetPeer *peer, enet_uint8 *channelID)
 Attempts to dequeue any incoming queued packet. More...
 
void enet_peer_reset (ENetPeer *peer)
 Forcefully disconnects a peer. More...
 
void enet_peer_reset_queues (ENetPeer *peer)
 
int enet_peer_send (ENetPeer *peer, enet_uint8 channelID, ENetPacket *packet)
 Queues a packet to be sent. More...
 
void enet_peer_setup_outgoing_command (ENetPeer *peer, ENetOutgoingCommand *outgoingCommand)
 
int enet_peer_throttle (ENetPeer *peer, enet_uint32 rtt)
 
void enet_peer_throttle_configure (ENetPeer *peer, enet_uint32 interval, enet_uint32 acceleration, enet_uint32 deceleration)
 Configures throttle parameter for a peer. More...
 
void enet_peer_timeout (ENetPeer *peer, enet_uint32 timeoutLimit, enet_uint32 timeoutMinimum, enet_uint32 timeoutMaximum)
 Sets the timeout parameters for a peer. More...
 
+

Detailed Description

+

ENet peer management functions.

+

Macro Definition Documentation

+ +
+
+ + + + +
#define ENET_BUILDING_LIB   1
+
+ +
+
+
+ + + + diff --git a/enet server test/enet2/docs/html/protocol_8c.html b/enet server test/enet2/docs/html/protocol_8c.html new file mode 100644 index 0000000..206ae11 --- /dev/null +++ b/enet server test/enet2/docs/html/protocol_8c.html @@ -0,0 +1,168 @@ + + + + + + +ENet: protocol.c File Reference + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + + + + + + +
+ +
+ +
+
+ +
+
protocol.c File Reference
+
+
+ +

ENet protocol functions. +More...

+
#include <stdio.h>
+#include <string.h>
+#include "enet/utility.h"
+#include "enet/time.h"
+#include "enet/enet.h"
+
+ + + +

+Macros

#define ENET_BUILDING_LIB   1
 
+ + + + + + + + + + + + +

+Functions

int enet_host_check_events (ENetHost *host, ENetEvent *event)
 Checks for any queued events on the host and dispatches one if available. More...
 
void enet_host_flush (ENetHost *host)
 Sends any queued packets on the host specified to its designated peers. More...
 
int enet_host_service (ENetHost *host, ENetEvent *event, enet_uint32 timeout)
 Waits for events on the host specified and shuttles packets between the host and its peers. More...
 
size_t enet_protocol_command_size (enet_uint8 commandNumber)
 
+

Detailed Description

+

ENet protocol functions.

+

Macro Definition Documentation

+ +
+
+ + + + +
#define ENET_BUILDING_LIB   1
+
+ +
+
+

Function Documentation

+ +
+
+ + + + + + + + +
size_t enet_protocol_command_size (enet_uint8 commandNumber)
+
+ +
+
+
+ + + + diff --git a/enet server test/enet2/docs/html/protocol_8h.html b/enet server test/enet2/docs/html/protocol_8h.html new file mode 100644 index 0000000..5185004 --- /dev/null +++ b/enet server test/enet2/docs/html/protocol_8h.html @@ -0,0 +1,348 @@ + + + + + + +ENet: include/enet/protocol.h File Reference + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
protocol.h File Reference
+
+
+ +

ENet protocol. +More...

+
#include "enet/types.h"
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Data Structures

union  ENetProtocol
 
struct  ENetProtocolAcknowledge
 
struct  ENetProtocolBandwidthLimit
 
struct  ENetProtocolCommandHeader
 
struct  ENetProtocolConnect
 
struct  ENetProtocolDisconnect
 
struct  ENetProtocolHeader
 
struct  ENetProtocolPing
 
struct  ENetProtocolSendFragment
 
struct  ENetProtocolSendReliable
 
struct  ENetProtocolSendUnreliable
 
struct  ENetProtocolSendUnsequenced
 
struct  ENetProtocolThrottleConfigure
 
struct  ENetProtocolVerifyConnect
 
+ + + +

+Macros

#define ENET_PACKED
 
+ + + + + + + +

+Enumerations

enum  {
+  ENET_PROTOCOL_MINIMUM_MTU = 576, +
+  ENET_PROTOCOL_MAXIMUM_MTU = 4096, +
+  ENET_PROTOCOL_MAXIMUM_PACKET_COMMANDS = 32, +
+  ENET_PROTOCOL_MINIMUM_WINDOW_SIZE = 4096, +
+  ENET_PROTOCOL_MAXIMUM_WINDOW_SIZE = 65536, +
+  ENET_PROTOCOL_MINIMUM_CHANNEL_COUNT = 1, +
+  ENET_PROTOCOL_MAXIMUM_CHANNEL_COUNT = 255, +
+  ENET_PROTOCOL_MAXIMUM_PEER_ID = 0xFFF, +
+  ENET_PROTOCOL_MAXIMUM_FRAGMENT_COUNT = 1024 * 1024 +
+ }
 
enum  ENetProtocolCommand {
+  ENET_PROTOCOL_COMMAND_NONE = 0, +
+  ENET_PROTOCOL_COMMAND_ACKNOWLEDGE = 1, +
+  ENET_PROTOCOL_COMMAND_CONNECT = 2, +
+  ENET_PROTOCOL_COMMAND_VERIFY_CONNECT = 3, +
+  ENET_PROTOCOL_COMMAND_DISCONNECT = 4, +
+  ENET_PROTOCOL_COMMAND_PING = 5, +
+  ENET_PROTOCOL_COMMAND_SEND_RELIABLE = 6, +
+  ENET_PROTOCOL_COMMAND_SEND_UNRELIABLE = 7, +
+  ENET_PROTOCOL_COMMAND_SEND_FRAGMENT = 8, +
+  ENET_PROTOCOL_COMMAND_SEND_UNSEQUENCED = 9, +
+  ENET_PROTOCOL_COMMAND_BANDWIDTH_LIMIT = 10, +
+  ENET_PROTOCOL_COMMAND_THROTTLE_CONFIGURE = 11, +
+  ENET_PROTOCOL_COMMAND_SEND_UNRELIABLE_FRAGMENT = 12, +
+  ENET_PROTOCOL_COMMAND_COUNT = 13, +
+  ENET_PROTOCOL_COMMAND_MASK = 0x0F +
+ }
 
enum  ENetProtocolFlag {
+  ENET_PROTOCOL_COMMAND_FLAG_ACKNOWLEDGE = (1 << 7), +
+  ENET_PROTOCOL_COMMAND_FLAG_UNSEQUENCED = (1 << 6), +
+  ENET_PROTOCOL_HEADER_FLAG_COMPRESSED = (1 << 14), +
+  ENET_PROTOCOL_HEADER_FLAG_SENT_TIME = (1 << 15), +
+  ENET_PROTOCOL_HEADER_FLAG_MASK = ENET_PROTOCOL_HEADER_FLAG_COMPRESSED | ENET_PROTOCOL_HEADER_FLAG_SENT_TIME, +
+  ENET_PROTOCOL_HEADER_SESSION_MASK = (3 << 12), +
+  ENET_PROTOCOL_HEADER_SESSION_SHIFT = 12 +
+ }
 
+

Detailed Description

+

ENet protocol.

+

Macro Definition Documentation

+ +
+
+ + + + +
#define ENET_PACKED
+
+ +
+
+

Enumeration Type Documentation

+ +
+
+ + + + +
anonymous enum
+
+ + + + + + + + + + +
Enumerator
ENET_PROTOCOL_MINIMUM_MTU  +
ENET_PROTOCOL_MAXIMUM_MTU  +
ENET_PROTOCOL_MAXIMUM_PACKET_COMMANDS  +
ENET_PROTOCOL_MINIMUM_WINDOW_SIZE  +
ENET_PROTOCOL_MAXIMUM_WINDOW_SIZE  +
ENET_PROTOCOL_MINIMUM_CHANNEL_COUNT  +
ENET_PROTOCOL_MAXIMUM_CHANNEL_COUNT  +
ENET_PROTOCOL_MAXIMUM_PEER_ID  +
ENET_PROTOCOL_MAXIMUM_FRAGMENT_COUNT  +
+ +
+
+ +
+
+ + + + +
enum ENetProtocolCommand
+
+ + + + + + + + + + + + + + + + +
Enumerator
ENET_PROTOCOL_COMMAND_NONE  +
ENET_PROTOCOL_COMMAND_ACKNOWLEDGE  +
ENET_PROTOCOL_COMMAND_CONNECT  +
ENET_PROTOCOL_COMMAND_VERIFY_CONNECT  +
ENET_PROTOCOL_COMMAND_DISCONNECT  +
ENET_PROTOCOL_COMMAND_PING  +
ENET_PROTOCOL_COMMAND_SEND_RELIABLE  +
ENET_PROTOCOL_COMMAND_SEND_UNRELIABLE  +
ENET_PROTOCOL_COMMAND_SEND_FRAGMENT  +
ENET_PROTOCOL_COMMAND_SEND_UNSEQUENCED  +
ENET_PROTOCOL_COMMAND_BANDWIDTH_LIMIT  +
ENET_PROTOCOL_COMMAND_THROTTLE_CONFIGURE  +
ENET_PROTOCOL_COMMAND_SEND_UNRELIABLE_FRAGMENT  +
ENET_PROTOCOL_COMMAND_COUNT  +
ENET_PROTOCOL_COMMAND_MASK  +
+ +
+
+ +
+
+ + + + +
enum ENetProtocolFlag
+
+ + + + + + + + +
Enumerator
ENET_PROTOCOL_COMMAND_FLAG_ACKNOWLEDGE  +
ENET_PROTOCOL_COMMAND_FLAG_UNSEQUENCED  +
ENET_PROTOCOL_HEADER_FLAG_COMPRESSED  +
ENET_PROTOCOL_HEADER_FLAG_SENT_TIME  +
ENET_PROTOCOL_HEADER_FLAG_MASK  +
ENET_PROTOCOL_HEADER_SESSION_MASK  +
ENET_PROTOCOL_HEADER_SESSION_SHIFT  +
+ +
+
+
+ + + + diff --git a/enet server test/enet2/docs/html/search/all_0.html b/enet server test/enet2/docs/html/search/all_0.html new file mode 100644 index 0000000..6f4ddc3 --- /dev/null +++ b/enet server test/enet2/docs/html/search/all_0.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/enet server test/enet2/docs/html/search/all_0.js b/enet server test/enet2/docs/html/search/all_0.js new file mode 100644 index 0000000..c6ad75d --- /dev/null +++ b/enet server test/enet2/docs/html/search/all_0.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['acknowledge',['acknowledge',['../unionENetProtocol.html#a30482b928c5695a9b06b3c168f385605',1,'ENetProtocol']]], + ['acknowledgementlist',['acknowledgementList',['../structENetAcknowledgement.html#aaf33be5414673ff9bf830f871bcc0d65',1,'ENetAcknowledgement']]], + ['acknowledgements',['acknowledgements',['../structENetPeer.html#ad0e3bd1e4538ed15b2fd2d1cb85f663a',1,'ENetPeer']]], + ['address',['address',['../structENetPeer.html#a768b9ac6a9b3bfba0d36aa1c719359b9',1,'ENetPeer::address()'],['../structENetHost.html#aea7ae36e8589a52fe7322bcc26351e71',1,'ENetHost::address()']]] +]; diff --git a/enet server test/enet2/docs/html/search/all_1.html b/enet server test/enet2/docs/html/search/all_1.html new file mode 100644 index 0000000..fce68bd --- /dev/null +++ b/enet server test/enet2/docs/html/search/all_1.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/enet server test/enet2/docs/html/search/all_1.js b/enet server test/enet2/docs/html/search/all_1.js new file mode 100644 index 0000000..18cab3d --- /dev/null +++ b/enet server test/enet2/docs/html/search/all_1.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['bandwidthlimit',['bandwidthLimit',['../unionENetProtocol.html#aafd0984623506e6a675fa94c268aa73d',1,'ENetProtocol']]], + ['bandwidthlimitedpeers',['bandwidthLimitedPeers',['../structENetHost.html#a62b9c59f5d05482bc1fc01e08af8c0c3',1,'ENetHost']]], + ['bandwidththrottleepoch',['bandwidthThrottleEpoch',['../structENetHost.html#a0d85f7ef4e6cf67b741745f164cf43f2',1,'ENetHost']]], + ['buffercount',['bufferCount',['../structENetHost.html#aed737c71970c018eb4b97c70732b1098',1,'ENetHost']]], + ['buffers',['buffers',['../structENetHost.html#a1eda9709ab5cf576a04d76b601a457c2',1,'ENetHost']]] +]; diff --git a/enet server test/enet2/docs/html/search/all_10.html b/enet server test/enet2/docs/html/search/all_10.html new file mode 100644 index 0000000..a960bb8 --- /dev/null +++ b/enet server test/enet2/docs/html/search/all_10.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/enet server test/enet2/docs/html/search/all_10.js b/enet server test/enet2/docs/html/search/all_10.js new file mode 100644 index 0000000..10e1d3d --- /dev/null +++ b/enet server test/enet2/docs/html/search/all_10.js @@ -0,0 +1,11 @@ +var searchData= +[ + ['unix_2ec',['unix.c',['../unix_8c.html',1,'']]], + ['unix_2eh',['unix.h',['../unix_8h.html',1,'']]], + ['unreliablesequencenumber',['unreliableSequenceNumber',['../structENetOutgoingCommand.html#a8d7cf412de3b1ce53147becc1476d7da',1,'ENetOutgoingCommand::unreliableSequenceNumber()'],['../structENetIncomingCommand.html#a6e31e6e0ea7bf56f255d21b58285f003',1,'ENetIncomingCommand::unreliableSequenceNumber()'],['../structENetProtocolSendUnreliable.html#a0f03505c1afe4d4b7cc32229b6442c0b',1,'ENetProtocolSendUnreliable::unreliableSequenceNumber()']]], + ['unsequencedgroup',['unsequencedGroup',['../structENetProtocolSendUnsequenced.html#a099dfce39def998b61285ef9cb5e3f84',1,'ENetProtocolSendUnsequenced']]], + ['unsequencedwindow',['unsequencedWindow',['../structENetPeer.html#aadd45fdbc347e69b55820927d38197cd',1,'ENetPeer']]], + ['usedreliablewindows',['usedReliableWindows',['../structENetChannel.html#adf6ee9725fb99751f778a97d2473a204',1,'ENetChannel']]], + ['userdata',['userData',['../structENetPacket.html#a588f6c3be6263ecc7ed8d3412c3e47ea',1,'ENetPacket']]], + ['utility_2eh',['utility.h',['../utility_8h.html',1,'']]] +]; diff --git a/enet server test/enet2/docs/html/search/all_11.html b/enet server test/enet2/docs/html/search/all_11.html new file mode 100644 index 0000000..fda6861 --- /dev/null +++ b/enet server test/enet2/docs/html/search/all_11.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/enet server test/enet2/docs/html/search/all_11.js b/enet server test/enet2/docs/html/search/all_11.js new file mode 100644 index 0000000..1e20db7 --- /dev/null +++ b/enet server test/enet2/docs/html/search/all_11.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['verifyconnect',['verifyConnect',['../unionENetProtocol.html#af89fdeed1763f038c37286652f8a8605',1,'ENetProtocol']]] +]; diff --git a/enet server test/enet2/docs/html/search/all_12.html b/enet server test/enet2/docs/html/search/all_12.html new file mode 100644 index 0000000..fe96a79 --- /dev/null +++ b/enet server test/enet2/docs/html/search/all_12.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/enet server test/enet2/docs/html/search/all_12.js b/enet server test/enet2/docs/html/search/all_12.js new file mode 100644 index 0000000..dd61a32 --- /dev/null +++ b/enet server test/enet2/docs/html/search/all_12.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['win32_2ec',['win32.c',['../win32_8c.html',1,'']]], + ['win32_2eh',['win32.h',['../win32_8h.html',1,'']]], + ['windowsize',['windowSize',['../structENetPeer.html#aa900e45d419db8b7a692086ec867a883',1,'ENetPeer::windowSize()'],['../structENetProtocolConnect.html#ac42fa69f46a37c56ff32f9baf05c5dd5',1,'ENetProtocolConnect::windowSize()'],['../structENetProtocolVerifyConnect.html#aa5b48a1dbb9755c1fb7dbd32ac182e22',1,'ENetProtocolVerifyConnect::windowSize()']]] +]; diff --git a/enet server test/enet2/docs/html/search/all_2.html b/enet server test/enet2/docs/html/search/all_2.html new file mode 100644 index 0000000..1ee90b9 --- /dev/null +++ b/enet server test/enet2/docs/html/search/all_2.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/enet server test/enet2/docs/html/search/all_2.js b/enet server test/enet2/docs/html/search/all_2.js new file mode 100644 index 0000000..448c742 --- /dev/null +++ b/enet server test/enet2/docs/html/search/all_2.js @@ -0,0 +1,21 @@ +var searchData= +[ + ['callbacks_2ec',['callbacks.c',['../callbacks_8c.html',1,'']]], + ['callbacks_2eh',['callbacks.h',['../callbacks_8h.html',1,'']]], + ['channelcount',['channelCount',['../structENetPeer.html#a10514f51617f947505d190be1068416e',1,'ENetPeer::channelCount()'],['../structENetProtocolConnect.html#a35fed3f08d03fd566780966ad9b96f6d',1,'ENetProtocolConnect::channelCount()'],['../structENetProtocolVerifyConnect.html#ac919178152ca3c5a7c651c447733d963',1,'ENetProtocolVerifyConnect::channelCount()']]], + ['channelid',['channelID',['../structENetEvent.html#acb5dbd1069138e561e310bc4a3e4d861',1,'ENetEvent::channelID()'],['../structENetProtocolCommandHeader.html#a2ec7e1f192df3a449db67f3528ef877d',1,'ENetProtocolCommandHeader::channelID()']]], + ['channellimit',['channelLimit',['../structENetHost.html#a1876000cbf52f8b8667e6d4882d23cb1',1,'ENetHost']]], + ['channels',['channels',['../structENetPeer.html#a099b261d578e2f096132214877e84385',1,'ENetPeer']]], + ['checksum',['checksum',['../structENetHost.html#acf22123cd131746367bc4111470fc596',1,'ENetHost']]], + ['command',['command',['../structENetAcknowledgement.html#adaedb41c2536f0e886bbbbeca9035731',1,'ENetAcknowledgement::command()'],['../structENetOutgoingCommand.html#ac29d1868027d963ebb23666f419eb982',1,'ENetOutgoingCommand::command()'],['../structENetIncomingCommand.html#ac20d496fa0e1f155b46bffe3a4d47365',1,'ENetIncomingCommand::command()'],['../structENetProtocolCommandHeader.html#a9ee2cae57bf786e03f9e3bba651467f1',1,'ENetProtocolCommandHeader::command()']]], + ['commandcount',['commandCount',['../structENetHost.html#a118c74489b3f7f75d77f469709fda24f',1,'ENetHost']]], + ['commands',['commands',['../structENetHost.html#ab7ca5451e9b1c0152ce4a02c2292a3c3',1,'ENetHost']]], + ['compress',['compress',['../structENetCompressor.html#a54c4b6e40e7f4fb1303d19c4e747e81c',1,'ENetCompressor']]], + ['compress_2ec',['compress.c',['../compress_8c.html',1,'']]], + ['compressor',['compressor',['../structENetHost.html#ab87717c9898c01920151df8152fbc0cb',1,'ENetHost']]], + ['connect',['connect',['../unionENetProtocol.html#a018e71efe7c4f1d697ae827f6329fcbd',1,'ENetProtocol']]], + ['connectedpeers',['connectedPeers',['../structENetHost.html#a83ecae43b7fb248f5403e6448f687572',1,'ENetHost']]], + ['connectid',['connectID',['../structENetPeer.html#a2a0fe042c431e3b6250e86b8774b3481',1,'ENetPeer::connectID()'],['../structENetProtocolConnect.html#a76ff292f727b86eb08c93d235b19322e',1,'ENetProtocolConnect::connectID()'],['../structENetProtocolVerifyConnect.html#ae2f2c11239b7c31ddb901aaec2e77915',1,'ENetProtocolVerifyConnect::connectID()']]], + ['context',['context',['../structENetCompressor.html#ae01e244e126a66702e489c9c6f68a4fc',1,'ENetCompressor']]], + ['continuesending',['continueSending',['../structENetHost.html#a8c9eef8e7c918c8bd5f8070b584c72b1',1,'ENetHost']]] +]; diff --git a/enet server test/enet2/docs/html/search/all_3.html b/enet server test/enet2/docs/html/search/all_3.html new file mode 100644 index 0000000..85c4a81 --- /dev/null +++ b/enet server test/enet2/docs/html/search/all_3.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/enet server test/enet2/docs/html/search/all_3.js b/enet server test/enet2/docs/html/search/all_3.js new file mode 100644 index 0000000..a926aac --- /dev/null +++ b/enet server test/enet2/docs/html/search/all_3.js @@ -0,0 +1,14 @@ +var searchData= +[ + ['data',['data',['../structENetPacket.html#a6343ca4cac69351d1a29ab4239b0bb18',1,'ENetPacket::data()'],['../structENetPeer.html#a1873959810db7ac7a02da90469ee384e',1,'ENetPeer::data()'],['../structENetEvent.html#a78c116a5ab40ebfeca7032f1f15a41e9',1,'ENetEvent::data()'],['../structENetProtocolConnect.html#a8853ff683f023ef4e5dc8bb619294c06',1,'ENetProtocolConnect::data()'],['../structENetProtocolDisconnect.html#afa4e84666dfd7929f2f8a3bd50598f7a',1,'ENetProtocolDisconnect::data()'],['../structENetBuffer.html#a9195f47c4247dd4380df190933aca738',1,'ENetBuffer::data()']]], + ['datalength',['dataLength',['../structENetPacket.html#a8a0d8b423000898a46076a4a7ab2a38d',1,'ENetPacket::dataLength()'],['../structENetProtocolSendReliable.html#abb88deaa23f9a028c36201f776777f37',1,'ENetProtocolSendReliable::dataLength()'],['../structENetProtocolSendUnreliable.html#a3e4fdfba42935e1a384a4d1b4232c8a2',1,'ENetProtocolSendUnreliable::dataLength()'],['../structENetProtocolSendUnsequenced.html#a717e103d5af7ffdc90ce7133060f2de3',1,'ENetProtocolSendUnsequenced::dataLength()'],['../structENetProtocolSendFragment.html#a8ccc7ac4f33d38870ddd08ab4b86c1b6',1,'ENetProtocolSendFragment::dataLength()'],['../structENetBuffer.html#a6a518d5b20d16389e331f24521a1a1c9',1,'ENetBuffer::dataLength()']]], + ['decompress',['decompress',['../structENetCompressor.html#a1e335c65f9c9219227640061487d77c1',1,'ENetCompressor']]], + ['design_2edox',['design.dox',['../design_8dox.html',1,'']]], + ['destroy',['destroy',['../structENetCompressor.html#a561f91953554059321a3144361459b3a',1,'ENetCompressor']]], + ['disconnect',['disconnect',['../unionENetProtocol.html#a1a0cf3a5081baa2f8af4c09631164eeb',1,'ENetProtocol']]], + ['dispatchedcommands',['dispatchedCommands',['../structENetPeer.html#a83b5c0ff3365c87c37c3a91abf5cfb54',1,'ENetPeer']]], + ['dispatchlist',['dispatchList',['../structENetPeer.html#a6cc1b410a2ca95607a2f99c449b6476d',1,'ENetPeer']]], + ['dispatchqueue',['dispatchQueue',['../structENetHost.html#a8523b42840bfb5d4564ad04c747ec887',1,'ENetHost']]], + ['downloads',['Downloads',['../Downloads.html',1,'']]], + ['duplicatepeers',['duplicatePeers',['../structENetHost.html#a6f26c90c0f1c9d9e3b7d851432b71ac2',1,'ENetHost']]] +]; diff --git a/enet server test/enet2/docs/html/search/all_4.html b/enet server test/enet2/docs/html/search/all_4.html new file mode 100644 index 0000000..56eb97c --- /dev/null +++ b/enet server test/enet2/docs/html/search/all_4.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/enet server test/enet2/docs/html/search/all_4.js b/enet server test/enet2/docs/html/search/all_4.js new file mode 100644 index 0000000..1fe65ff --- /dev/null +++ b/enet server test/enet2/docs/html/search/all_4.js @@ -0,0 +1,290 @@ +var searchData= +[ + ['enet_20address_20functions',['ENet address functions',['../group__Address.html',1,'']]], + ['enet_20internal_20callbacks',['ENet internal callbacks',['../group__callbacks.html',1,'']]], + ['earliesttimeout',['earliestTimeout',['../structENetPeer.html#a06f1707071193b7d8bd2f8ed7f12510d',1,'ENetPeer']]], + ['enet_2eh',['enet.h',['../enet_8h.html',1,'']]], + ['enet_5faddress_5fget_5fhost',['enet_address_get_host',['../group__Address.html#ga5878cbeaae3e6272444a0c5ec1baac44',1,'enet_address_get_host(const ENetAddress *address, char *hostName, size_t nameLength): unix.c'],['../group__Address.html#ga5878cbeaae3e6272444a0c5ec1baac44',1,'enet_address_get_host(const ENetAddress *address, char *name, size_t nameLength): unix.c']]], + ['enet_5faddress_5fget_5fhost_5fip',['enet_address_get_host_ip',['../group__Address.html#ga1a82cf9908f39fea27f13eef5ad468b1',1,'enet_address_get_host_ip(const ENetAddress *address, char *hostName, size_t nameLength): unix.c'],['../group__Address.html#ga1a82cf9908f39fea27f13eef5ad468b1',1,'enet_address_get_host_ip(const ENetAddress *address, char *name, size_t nameLength): unix.c']]], + ['enet_5faddress_5fset_5fhost',['enet_address_set_host',['../group__Address.html#ga979aff1766944d841950c35b57705b49',1,'enet_address_set_host(ENetAddress *address, const char *hostName): unix.c'],['../group__Address.html#ga979aff1766944d841950c35b57705b49',1,'enet_address_set_host(ENetAddress *address, const char *name): unix.c']]], + ['enet_5fapi',['ENET_API',['../unix_8h.html#a687ffc6acf6d30c9ecde1b2ce209879c',1,'ENET_API(): unix.h'],['../win32_8h.html#a687ffc6acf6d30c9ecde1b2ce209879c',1,'ENET_API(): win32.h']]], + ['enet_5fbuffer_5fmaximum',['ENET_BUFFER_MAXIMUM',['../enet_8h.html#a4e71003e6043d745c1d69d0b35a76c1d',1,'enet.h']]], + ['enet_5fbuilding_5flib',['ENET_BUILDING_LIB',['../callbacks_8c.html#a0dc3ac14ddf12c81cb53d3e662ad277f',1,'ENET_BUILDING_LIB(): callbacks.c'],['../compress_8c.html#a0dc3ac14ddf12c81cb53d3e662ad277f',1,'ENET_BUILDING_LIB(): compress.c'],['../host_8c.html#a0dc3ac14ddf12c81cb53d3e662ad277f',1,'ENET_BUILDING_LIB(): host.c'],['../list_8c.html#a0dc3ac14ddf12c81cb53d3e662ad277f',1,'ENET_BUILDING_LIB(): list.c'],['../packet_8c.html#a0dc3ac14ddf12c81cb53d3e662ad277f',1,'ENET_BUILDING_LIB(): packet.c'],['../peer_8c.html#a0dc3ac14ddf12c81cb53d3e662ad277f',1,'ENET_BUILDING_LIB(): peer.c'],['../protocol_8c.html#a0dc3ac14ddf12c81cb53d3e662ad277f',1,'ENET_BUILDING_LIB(): protocol.c'],['../unix_8c.html#a0dc3ac14ddf12c81cb53d3e662ad277f',1,'ENET_BUILDING_LIB(): unix.c']]], + ['enet_5fcallback',['ENET_CALLBACK',['../unix_8h.html#a62eafc38d284aacbbd8f4104fdcd0cc2',1,'ENET_CALLBACK(): unix.h'],['../win32_8h.html#a62eafc38d284aacbbd8f4104fdcd0cc2',1,'ENET_CALLBACK(): win32.h']]], + ['enet_5fcontext_5fcreate',['ENET_CONTEXT_CREATE',['../compress_8c.html#ac93057a15bcc62c953f4a14bb51e36ab',1,'compress.c']]], + ['enet_5fcontext_5fdecode',['ENET_CONTEXT_DECODE',['../compress_8c.html#a0f6333d89acd57abfa3c6905bc8cd54f',1,'compress.c']]], + ['enet_5fcontext_5fencode',['ENET_CONTEXT_ENCODE',['../compress_8c.html#a5b69e49a77bdbc19af5e63d268bd97a6',1,'compress.c']]], + ['enet_5fcontext_5fescape_5fminimum',['ENET_CONTEXT_ESCAPE_MINIMUM',['../compress_8c.html#a06fc87d81c62e9abb8790b6e5713c55bae3b5f2df3031e1caae58f971febfe8c6',1,'compress.c']]], + ['enet_5fcontext_5fnot_5fexcluded',['ENET_CONTEXT_NOT_EXCLUDED',['../compress_8c.html#ae8d689be11d1c8150e42dff17d7b539d',1,'compress.c']]], + ['enet_5fcontext_5frescale',['ENET_CONTEXT_RESCALE',['../compress_8c.html#a6f0ac783cced7c798e7c8dff174a9216',1,'compress.c']]], + ['enet_5fcontext_5froot_5fdecode',['ENET_CONTEXT_ROOT_DECODE',['../compress_8c.html#ae652387df7e1bc6b8208b4a81a975b6b',1,'compress.c']]], + ['enet_5fcontext_5fsymbol_5fdelta',['ENET_CONTEXT_SYMBOL_DELTA',['../compress_8c.html#a06fc87d81c62e9abb8790b6e5713c55ba356a4ba43cd830d53e7bc4d5c8f47639',1,'compress.c']]], + ['enet_5fcontext_5fsymbol_5fminimum',['ENET_CONTEXT_SYMBOL_MINIMUM',['../compress_8c.html#a06fc87d81c62e9abb8790b6e5713c55ba577a1044e503e97e43bd2b6015276f7a',1,'compress.c']]], + ['enet_5fcontext_5ftry_5fdecode',['ENET_CONTEXT_TRY_DECODE',['../compress_8c.html#aeae00b4079592e90ba7183664b2b72cc',1,'compress.c']]], + ['enet_5fcrc32',['enet_crc32',['../group__Packet.html#ga015ce0307049901852c54dd2def532e2',1,'enet_crc32(const ENetBuffer *, size_t): packet.c'],['../group__Packet.html#ga015ce0307049901852c54dd2def532e2',1,'enet_crc32(const ENetBuffer *buffers, size_t bufferCount): packet.c']]], + ['enet_5fdeinitialize',['enet_deinitialize',['../group__global.html#ga928f5a127837d9926620a2427b48a6a3',1,'enet_deinitialize(void): unix.c'],['../group__global.html#ga928f5a127837d9926620a2427b48a6a3',1,'enet_deinitialize(void): unix.c']]], + ['enet_5fevent_5ftype_5fconnect',['ENET_EVENT_TYPE_CONNECT',['../enet_8h.html#adc5336f0698d4336b587f083d89df414aefd9fa36297e41ca4c1cbcfdeb7e4a9d',1,'enet.h']]], + ['enet_5fevent_5ftype_5fdisconnect',['ENET_EVENT_TYPE_DISCONNECT',['../enet_8h.html#adc5336f0698d4336b587f083d89df414a4fa47af84cf901810510aeba077a1c2f',1,'enet.h']]], + ['enet_5fevent_5ftype_5fnone',['ENET_EVENT_TYPE_NONE',['../enet_8h.html#adc5336f0698d4336b587f083d89df414ad76c1d9192a5c6ac60a3820e3d7379c5',1,'enet.h']]], + ['enet_5fevent_5ftype_5freceive',['ENET_EVENT_TYPE_RECEIVE',['../enet_8h.html#adc5336f0698d4336b587f083d89df414a67d928ca38b289db53ec9f56c91c5d9d',1,'enet.h']]], + ['enet_5ffree',['enet_free',['../group__callbacks.html#ga28f051737b1bbc8f64a4185dd41eb127',1,'enet_free(void *memory): callbacks.c'],['../group__callbacks.html#ga28f051737b1bbc8f64a4185dd41eb127',1,'enet_free(void *): callbacks.c']]], + ['enet_5fhost_5fany',['ENET_HOST_ANY',['../enet_8h.html#a8a8ff0155e0f7dabaaa466ff9b356d2c',1,'enet.h']]], + ['enet_5fhost_5fbandwidth_5flimit',['enet_host_bandwidth_limit',['../group__host.html#ga83c5fa02a3ba6ab829856302e54929fe',1,'enet_host_bandwidth_limit(ENetHost *host, enet_uint32 incomingBandwidth, enet_uint32 outgoingBandwidth): host.c'],['../group__host.html#ga83c5fa02a3ba6ab829856302e54929fe',1,'enet_host_bandwidth_limit(ENetHost *, enet_uint32, enet_uint32): host.c']]], + ['enet_5fhost_5fbandwidth_5fthrottle',['enet_host_bandwidth_throttle',['../group__host.html#gac76acd47fd07c27e5b85ecb63b192dd1',1,'enet_host_bandwidth_throttle(ENetHost *host): host.c'],['../group__host.html#gac76acd47fd07c27e5b85ecb63b192dd1',1,'enet_host_bandwidth_throttle(ENetHost *): host.c']]], + ['enet_5fhost_5fbandwidth_5fthrottle_5finterval',['ENET_HOST_BANDWIDTH_THROTTLE_INTERVAL',['../enet_8h.html#adf764cbdea00d65edcd07bb9953ad2b7adf3c219f758a082c1f4f6f59599b3ff3',1,'enet.h']]], + ['enet_5fhost_5fbroadcast',['enet_host_broadcast',['../group__host.html#ga5190a63f78eb0c15bd96cda44bf423c6',1,'enet_host_broadcast(ENetHost *host, enet_uint8 channelID, ENetPacket *packet): host.c'],['../group__host.html#ga5190a63f78eb0c15bd96cda44bf423c6',1,'enet_host_broadcast(ENetHost *, enet_uint8, ENetPacket *): host.c'],['../enet_8h.html#a18201db7744ba75106e92fe8bc31dff4',1,'ENET_HOST_BROADCAST(): enet.h']]], + ['enet_5fhost_5fchannel_5flimit',['enet_host_channel_limit',['../group__host.html#gaa3c04d1a1a41f46a2db274f29a8d0ffd',1,'enet_host_channel_limit(ENetHost *host, size_t channelLimit): host.c'],['../group__host.html#gaa3c04d1a1a41f46a2db274f29a8d0ffd',1,'enet_host_channel_limit(ENetHost *, size_t): host.c']]], + ['enet_5fhost_5fcheck_5fevents',['enet_host_check_events',['../group__host.html#gabf2383e4a5ed864c56a50dc67b901fe9',1,'enet_host_check_events(ENetHost *, ENetEvent *): protocol.c'],['../group__host.html#gabf2383e4a5ed864c56a50dc67b901fe9',1,'enet_host_check_events(ENetHost *host, ENetEvent *event): protocol.c']]], + ['enet_5fhost_5fcompress',['enet_host_compress',['../group__host.html#gae9e23efdfc718dedaa349891dddf529b',1,'enet_host_compress(ENetHost *host, const ENetCompressor *compressor): host.c'],['../group__host.html#gae9e23efdfc718dedaa349891dddf529b',1,'enet_host_compress(ENetHost *, const ENetCompressor *): host.c']]], + ['enet_5fhost_5fcompress_5fwith_5frange_5fcoder',['enet_host_compress_with_range_coder',['../group__host.html#ga444b74e7b70d97e2abd02328419be3f4',1,'enet_host_compress_with_range_coder(ENetHost *host): compress.c'],['../group__host.html#ga444b74e7b70d97e2abd02328419be3f4',1,'enet_host_compress_with_range_coder(ENetHost *host): compress.c']]], + ['enet_5fhost_5fconnect',['enet_host_connect',['../group__host.html#ga23b3ac206326b84f42fa91673f12fca9',1,'enet_host_connect(ENetHost *host, const ENetAddress *address, size_t channelCount, enet_uint32 data): host.c'],['../group__host.html#ga23b3ac206326b84f42fa91673f12fca9',1,'enet_host_connect(ENetHost *, const ENetAddress *, size_t, enet_uint32): host.c']]], + ['enet_5fhost_5fcreate',['enet_host_create',['../group__host.html#ga5567a95d7a45521dc9cba93a9066c940',1,'enet_host_create(const ENetAddress *address, size_t peerCount, size_t channelLimit, enet_uint32 incomingBandwidth, enet_uint32 outgoingBandwidth): host.c'],['../group__host.html#ga5567a95d7a45521dc9cba93a9066c940',1,'enet_host_create(const ENetAddress *, size_t, size_t, enet_uint32, enet_uint32): host.c']]], + ['enet_5fhost_5fdefault_5fmaximum_5fpacket_5fsize',['ENET_HOST_DEFAULT_MAXIMUM_PACKET_SIZE',['../enet_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a4bdf580ff95da2d605141f588a5bd970',1,'enet.h']]], + ['enet_5fhost_5fdefault_5fmaximum_5fwaiting_5fdata',['ENET_HOST_DEFAULT_MAXIMUM_WAITING_DATA',['../enet_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a4352693dd664b7e02a8cee993b263503',1,'enet.h']]], + ['enet_5fhost_5fdefault_5fmtu',['ENET_HOST_DEFAULT_MTU',['../enet_8h.html#adf764cbdea00d65edcd07bb9953ad2b7aae25936a3a499977d2c31eb79e8b07b5',1,'enet.h']]], + ['enet_5fhost_5fdestroy',['enet_host_destroy',['../group__host.html#gacec1e9a0b528c1f9ce30544d2d5b5b79',1,'enet_host_destroy(ENetHost *host): host.c'],['../group__host.html#gacec1e9a0b528c1f9ce30544d2d5b5b79',1,'enet_host_destroy(ENetHost *): host.c']]], + ['enet_5fhost_5fflush',['enet_host_flush',['../group__host.html#gac8f53bcdbd540043f87e7d59048559fa',1,'enet_host_flush(ENetHost *): protocol.c'],['../group__host.html#gac8f53bcdbd540043f87e7d59048559fa',1,'enet_host_flush(ENetHost *host): protocol.c']]], + ['enet_5fhost_5frandom_5fseed',['enet_host_random_seed',['../enet_8h.html#a8b5be48a94f07ca6884375910637edbb',1,'enet_host_random_seed(void): unix.c'],['../unix_8c.html#a8b5be48a94f07ca6884375910637edbb',1,'enet_host_random_seed(void): unix.c']]], + ['enet_5fhost_5freceive_5fbuffer_5fsize',['ENET_HOST_RECEIVE_BUFFER_SIZE',['../enet_8h.html#adf764cbdea00d65edcd07bb9953ad2b7acabb86f776302885be047cadeb8ca9c9',1,'enet.h']]], + ['enet_5fhost_5fsend_5fbuffer_5fsize',['ENET_HOST_SEND_BUFFER_SIZE',['../enet_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a3433cf1cb6e848fde8d0aeb1c4ba1d74',1,'enet.h']]], + ['enet_5fhost_5fservice',['enet_host_service',['../group__host.html#ga6ba501b3ee576e5578c8e6d1694ebd49',1,'enet_host_service(ENetHost *, ENetEvent *, enet_uint32): protocol.c'],['../group__host.html#ga6ba501b3ee576e5578c8e6d1694ebd49',1,'enet_host_service(ENetHost *host, ENetEvent *event, enet_uint32 timeout): protocol.c']]], + ['enet_5fhost_5fto_5fnet_5f16',['ENET_HOST_TO_NET_16',['../unix_8h.html#a4ede48cf4612d407ac6b6f064e3117bc',1,'ENET_HOST_TO_NET_16(): unix.h'],['../win32_8h.html#a4ede48cf4612d407ac6b6f064e3117bc',1,'ENET_HOST_TO_NET_16(): win32.h']]], + ['enet_5fhost_5fto_5fnet_5f32',['ENET_HOST_TO_NET_32',['../unix_8h.html#a7bbe3d7e47fd45dda29c0e4a94abe131',1,'ENET_HOST_TO_NET_32(): unix.h'],['../win32_8h.html#a7bbe3d7e47fd45dda29c0e4a94abe131',1,'ENET_HOST_TO_NET_32(): win32.h']]], + ['enet_5finitialize',['enet_initialize',['../group__global.html#ga233ea54f54602076e9faf26fae8561fa',1,'enet_initialize(void): unix.c'],['../group__global.html#ga233ea54f54602076e9faf26fae8561fa',1,'enet_initialize(void): unix.c']]], + ['enet_5finitialize_5fwith_5fcallbacks',['enet_initialize_with_callbacks',['../group__global.html#ga6a51880a140dc00db01e4cd19c3eb651',1,'enet_initialize_with_callbacks(ENetVersion version, const ENetCallbacks *inits): callbacks.c'],['../group__global.html#ga6a51880a140dc00db01e4cd19c3eb651',1,'enet_initialize_with_callbacks(ENetVersion version, const ENetCallbacks *inits): callbacks.c']]], + ['enet_5flinked_5fversion',['enet_linked_version',['../group__global.html#ga78be46f2ec102ae88378543c97302ca8',1,'enet_linked_version(void): callbacks.c'],['../group__global.html#ga78be46f2ec102ae88378543c97302ca8',1,'enet_linked_version(void): callbacks.c']]], + ['enet_5flist_5fback',['enet_list_back',['../list_8h.html#a710564cc88022346cff26449ba20471e',1,'list.h']]], + ['enet_5flist_5fbegin',['enet_list_begin',['../list_8h.html#a5402e9c3c144aa928ae853b7833f5c00',1,'list.h']]], + ['enet_5flist_5fclear',['enet_list_clear',['../group__list.html#ga94d06840adb246fbaba78abaaf172892',1,'enet_list_clear(ENetList *): list.c'],['../group__list.html#ga94d06840adb246fbaba78abaaf172892',1,'enet_list_clear(ENetList *list): list.c']]], + ['enet_5flist_5fempty',['enet_list_empty',['../list_8h.html#ac81f07b1ef0e2212b021b03ad33eb839',1,'list.h']]], + ['enet_5flist_5fend',['enet_list_end',['../list_8h.html#aded7080e181e32442a5e98da1c1affb9',1,'list.h']]], + ['enet_5flist_5ffront',['enet_list_front',['../list_8h.html#ab7cab38a52203fee140cc2e0604288e7',1,'list.h']]], + ['enet_5flist_5finsert',['enet_list_insert',['../group__list.html#ga79bd28f859be551e2019f8b8bec8bcd4',1,'enet_list_insert(ENetListIterator, void *): list.c'],['../group__list.html#ga79bd28f859be551e2019f8b8bec8bcd4',1,'enet_list_insert(ENetListIterator position, void *data): list.c']]], + ['enet_5flist_5fmove',['enet_list_move',['../group__list.html#ga5b1b766ddd29736099ea167729292ac1',1,'enet_list_move(ENetListIterator, void *, void *): list.c'],['../group__list.html#ga5b1b766ddd29736099ea167729292ac1',1,'enet_list_move(ENetListIterator position, void *dataFirst, void *dataLast): list.c']]], + ['enet_5flist_5fnext',['enet_list_next',['../list_8h.html#ae51acedd439dedee476c13194a407c22',1,'list.h']]], + ['enet_5flist_5fprevious',['enet_list_previous',['../list_8h.html#ab7c945078221dd5dd022c7b1fdc7c40b',1,'list.h']]], + ['enet_5flist_5fremove',['enet_list_remove',['../group__list.html#ga7ee82bbce4bbb8d5cf8a59a744e26f0d',1,'enet_list_remove(ENetListIterator): list.c'],['../group__list.html#ga7ee82bbce4bbb8d5cf8a59a744e26f0d',1,'enet_list_remove(ENetListIterator position): list.c']]], + ['enet_5flist_5fsize',['enet_list_size',['../group__list.html#ga9279ceeda719e5079aef1b35ff36ac6e',1,'enet_list_size(ENetList *): list.c'],['../group__list.html#ga9279ceeda719e5079aef1b35ff36ac6e',1,'enet_list_size(ENetList *list): list.c']]], + ['enet_5fmalloc',['enet_malloc',['../group__callbacks.html#ga2cca517973f284531345bb70c2eb08e4',1,'enet_malloc(size_t size): callbacks.c'],['../group__callbacks.html#ga2cca517973f284531345bb70c2eb08e4',1,'enet_malloc(size_t): callbacks.c']]], + ['enet_5fmax',['ENET_MAX',['../utility_8h.html#a33308de252f4ca21dda9d5f424c161a4',1,'utility.h']]], + ['enet_5fmin',['ENET_MIN',['../utility_8h.html#ac70cb927610f947d71c644bba7a6003f',1,'utility.h']]], + ['enet_5fnet_5fto_5fhost_5f16',['ENET_NET_TO_HOST_16',['../unix_8h.html#a75c464a36d2ebb47c6034a10c56eb4d1',1,'ENET_NET_TO_HOST_16(): unix.h'],['../win32_8h.html#a75c464a36d2ebb47c6034a10c56eb4d1',1,'ENET_NET_TO_HOST_16(): win32.h']]], + ['enet_5fnet_5fto_5fhost_5f32',['ENET_NET_TO_HOST_32',['../unix_8h.html#a6fdfe9a0019e06da5931f10263f14d59',1,'ENET_NET_TO_HOST_32(): unix.h'],['../win32_8h.html#a6fdfe9a0019e06da5931f10263f14d59',1,'ENET_NET_TO_HOST_32(): win32.h']]], + ['enet_5fpacked',['ENET_PACKED',['../protocol_8h.html#a63905653a9ae8e898ce2d81744a5432c',1,'protocol.h']]], + ['enet_5fpacket_5fcreate',['enet_packet_create',['../group__Packet.html#gaac61b251aebbf9f5e5e313eca51339ea',1,'enet_packet_create(const void *, size_t, enet_uint32): packet.c'],['../group__Packet.html#gaac61b251aebbf9f5e5e313eca51339ea',1,'enet_packet_create(const void *data, size_t dataLength, enet_uint32 flags): packet.c']]], + ['enet_5fpacket_5fdestroy',['enet_packet_destroy',['../group__Packet.html#gab58895376ee4ade8f4e13761a44ba263',1,'enet_packet_destroy(ENetPacket *): packet.c'],['../group__Packet.html#gab58895376ee4ade8f4e13761a44ba263',1,'enet_packet_destroy(ENetPacket *packet): packet.c']]], + ['enet_5fpacket_5fflag_5fno_5fallocate',['ENET_PACKET_FLAG_NO_ALLOCATE',['../enet_8h.html#a38c59a481ed607b07d63b7bc3e88ca98aa6ce462752c36aad22e68ebefac3df8c',1,'enet.h']]], + ['enet_5fpacket_5fflag_5freliable',['ENET_PACKET_FLAG_RELIABLE',['../enet_8h.html#a38c59a481ed607b07d63b7bc3e88ca98aab20e7088245ab2ddb7f11dcc9433738',1,'enet.h']]], + ['enet_5fpacket_5fflag_5fsent',['ENET_PACKET_FLAG_SENT',['../enet_8h.html#a38c59a481ed607b07d63b7bc3e88ca98a57b64ab5cfbeb1ecbcd7f10429c79771',1,'enet.h']]], + ['enet_5fpacket_5fflag_5funreliable_5ffragment',['ENET_PACKET_FLAG_UNRELIABLE_FRAGMENT',['../enet_8h.html#a38c59a481ed607b07d63b7bc3e88ca98a7f79cd86eacd2543d6cde2eeccea995e',1,'enet.h']]], + ['enet_5fpacket_5fflag_5funsequenced',['ENET_PACKET_FLAG_UNSEQUENCED',['../enet_8h.html#a38c59a481ed607b07d63b7bc3e88ca98ad230cc769ef9cc4c7c582b28f9c443fe',1,'enet.h']]], + ['enet_5fpacket_5fresize',['enet_packet_resize',['../group__Packet.html#ga0aee7f8c7e2d2c4b64f6d68d930155a8',1,'enet_packet_resize(ENetPacket *, size_t): packet.c'],['../group__Packet.html#ga0aee7f8c7e2d2c4b64f6d68d930155a8',1,'enet_packet_resize(ENetPacket *packet, size_t dataLength): packet.c']]], + ['enet_5fpeer_5fdefault_5fpacket_5fthrottle',['ENET_PEER_DEFAULT_PACKET_THROTTLE',['../enet_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a942706f6907036990879356c326b841b',1,'enet.h']]], + ['enet_5fpeer_5fdefault_5fround_5ftrip_5ftime',['ENET_PEER_DEFAULT_ROUND_TRIP_TIME',['../enet_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a40ce91234c8b5f5c3eefd46dbcff5500',1,'enet.h']]], + ['enet_5fpeer_5fdisconnect',['enet_peer_disconnect',['../group__peer.html#ga0e807704b6ecace5004c2cdcfbf813c2',1,'enet_peer_disconnect(ENetPeer *, enet_uint32): peer.c'],['../group__peer.html#ga0e807704b6ecace5004c2cdcfbf813c2',1,'enet_peer_disconnect(ENetPeer *peer, enet_uint32 data): peer.c']]], + ['enet_5fpeer_5fdisconnect_5flater',['enet_peer_disconnect_later',['../group__peer.html#ga759270d8cccec70f76274e93b49e5ac5',1,'enet_peer_disconnect_later(ENetPeer *, enet_uint32): peer.c'],['../group__peer.html#ga759270d8cccec70f76274e93b49e5ac5',1,'enet_peer_disconnect_later(ENetPeer *peer, enet_uint32 data): peer.c']]], + ['enet_5fpeer_5fdisconnect_5fnow',['enet_peer_disconnect_now',['../group__peer.html#ga636cc45f52461b567d6daffe4ab8f4e9',1,'enet_peer_disconnect_now(ENetPeer *, enet_uint32): peer.c'],['../group__peer.html#ga636cc45f52461b567d6daffe4ab8f4e9',1,'enet_peer_disconnect_now(ENetPeer *peer, enet_uint32 data): peer.c']]], + ['enet_5fpeer_5fdispatch_5fincoming_5freliable_5fcommands',['enet_peer_dispatch_incoming_reliable_commands',['../group__peer.html#ga8b260c7d620fa30772db1426daf15ad0',1,'enet_peer_dispatch_incoming_reliable_commands(ENetPeer *, ENetChannel *): peer.c'],['../group__peer.html#ga8b260c7d620fa30772db1426daf15ad0',1,'enet_peer_dispatch_incoming_reliable_commands(ENetPeer *peer, ENetChannel *channel): peer.c']]], + ['enet_5fpeer_5fdispatch_5fincoming_5funreliable_5fcommands',['enet_peer_dispatch_incoming_unreliable_commands',['../group__peer.html#ga9e5635d76d32276d211d655d6570bfd5',1,'enet_peer_dispatch_incoming_unreliable_commands(ENetPeer *, ENetChannel *): peer.c'],['../group__peer.html#ga9e5635d76d32276d211d655d6570bfd5',1,'enet_peer_dispatch_incoming_unreliable_commands(ENetPeer *peer, ENetChannel *channel): peer.c']]], + ['enet_5fpeer_5ffree_5freliable_5fwindows',['ENET_PEER_FREE_RELIABLE_WINDOWS',['../enet_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a7832df0715244d1e6bf8429947fc6c3c',1,'enet.h']]], + ['enet_5fpeer_5ffree_5funsequenced_5fwindows',['ENET_PEER_FREE_UNSEQUENCED_WINDOWS',['../enet_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a3f58eb302a31219463b1c245f6944ad5',1,'enet.h']]], + ['enet_5fpeer_5fon_5fconnect',['enet_peer_on_connect',['../group__peer.html#ga3a49d1a10c3ed07a9e8df6d8286046f6',1,'enet_peer_on_connect(ENetPeer *): peer.c'],['../group__peer.html#ga3a49d1a10c3ed07a9e8df6d8286046f6',1,'enet_peer_on_connect(ENetPeer *peer): peer.c']]], + ['enet_5fpeer_5fon_5fdisconnect',['enet_peer_on_disconnect',['../group__peer.html#ga4fe3e5490f9d604aef6b3151cda02193',1,'enet_peer_on_disconnect(ENetPeer *): peer.c'],['../group__peer.html#ga4fe3e5490f9d604aef6b3151cda02193',1,'enet_peer_on_disconnect(ENetPeer *peer): peer.c']]], + ['enet_5fpeer_5fpacket_5floss_5finterval',['ENET_PEER_PACKET_LOSS_INTERVAL',['../enet_8h.html#adf764cbdea00d65edcd07bb9953ad2b7aad134db9a75b39b255219d5f6a399810',1,'enet.h']]], + ['enet_5fpeer_5fpacket_5floss_5fscale',['ENET_PEER_PACKET_LOSS_SCALE',['../enet_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a5fc83d82939f51ebdcea0691447c6ed6',1,'enet.h']]], + ['enet_5fpeer_5fpacket_5fthrottle_5facceleration',['ENET_PEER_PACKET_THROTTLE_ACCELERATION',['../enet_8h.html#adf764cbdea00d65edcd07bb9953ad2b7abd626c31a232adc5978c19243aec3581',1,'enet.h']]], + ['enet_5fpeer_5fpacket_5fthrottle_5fcounter',['ENET_PEER_PACKET_THROTTLE_COUNTER',['../enet_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a1cdada89bb957eb737cff94292815d7e',1,'enet.h']]], + ['enet_5fpeer_5fpacket_5fthrottle_5fdeceleration',['ENET_PEER_PACKET_THROTTLE_DECELERATION',['../enet_8h.html#adf764cbdea00d65edcd07bb9953ad2b7aa37a8f89851cc3487ffd0ef57057f86f',1,'enet.h']]], + ['enet_5fpeer_5fpacket_5fthrottle_5finterval',['ENET_PEER_PACKET_THROTTLE_INTERVAL',['../enet_8h.html#adf764cbdea00d65edcd07bb9953ad2b7af0fe83f2a36d771f9145623931dd3a5b',1,'enet.h']]], + ['enet_5fpeer_5fpacket_5fthrottle_5fscale',['ENET_PEER_PACKET_THROTTLE_SCALE',['../enet_8h.html#adf764cbdea00d65edcd07bb9953ad2b7ac6fb03e1119b12dfa06be919183f7148',1,'enet.h']]], + ['enet_5fpeer_5fping',['enet_peer_ping',['../group__peer.html#ga5c0708ddaf340aa42e7754a91ce456b6',1,'enet_peer_ping(ENetPeer *): peer.c'],['../group__peer.html#ga5c0708ddaf340aa42e7754a91ce456b6',1,'enet_peer_ping(ENetPeer *peer): peer.c']]], + ['enet_5fpeer_5fping_5finterval',['ENET_PEER_PING_INTERVAL',['../enet_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a3c29ea256c292ab762cbbb28690d555f',1,'ENET_PEER_PING_INTERVAL(): enet.h'],['../group__peer.html#gacddc2107f6e6b9e39812c1dfecff335b',1,'enet_peer_ping_interval(ENetPeer *, enet_uint32): peer.c'],['../group__peer.html#gacddc2107f6e6b9e39812c1dfecff335b',1,'enet_peer_ping_interval(ENetPeer *peer, enet_uint32 pingInterval): peer.c']]], + ['enet_5fpeer_5fqueue_5facknowledgement',['enet_peer_queue_acknowledgement',['../group__peer.html#ga6f8ab6421d3455b7b12b14f477ea83aa',1,'enet_peer_queue_acknowledgement(ENetPeer *, const ENetProtocol *, enet_uint16): peer.c'],['../group__peer.html#ga6f8ab6421d3455b7b12b14f477ea83aa',1,'enet_peer_queue_acknowledgement(ENetPeer *peer, const ENetProtocol *command, enet_uint16 sentTime): peer.c']]], + ['enet_5fpeer_5fqueue_5fincoming_5fcommand',['enet_peer_queue_incoming_command',['../group__peer.html#gac73a1c498c303c40e8adf6a1ebf0b1b8',1,'enet_peer_queue_incoming_command(ENetPeer *, const ENetProtocol *, const void *, size_t, enet_uint32, enet_uint32): peer.c'],['../group__peer.html#gac73a1c498c303c40e8adf6a1ebf0b1b8',1,'enet_peer_queue_incoming_command(ENetPeer *peer, const ENetProtocol *command, const void *data, size_t dataLength, enet_uint32 flags, enet_uint32 fragmentCount): peer.c']]], + ['enet_5fpeer_5fqueue_5foutgoing_5fcommand',['enet_peer_queue_outgoing_command',['../group__peer.html#ga0dff073e7882de81bdf46ae8e1bc3883',1,'enet_peer_queue_outgoing_command(ENetPeer *, const ENetProtocol *, ENetPacket *, enet_uint32, enet_uint16): peer.c'],['../group__peer.html#ga0dff073e7882de81bdf46ae8e1bc3883',1,'enet_peer_queue_outgoing_command(ENetPeer *peer, const ENetProtocol *command, ENetPacket *packet, enet_uint32 offset, enet_uint16 length): peer.c']]], + ['enet_5fpeer_5freceive',['enet_peer_receive',['../group__peer.html#ga6493c7807f5381395305c9c48913a46c',1,'enet_peer_receive(ENetPeer *, enet_uint8 *channelID): peer.c'],['../group__peer.html#ga6493c7807f5381395305c9c48913a46c',1,'enet_peer_receive(ENetPeer *peer, enet_uint8 *channelID): peer.c']]], + ['enet_5fpeer_5freliable_5fwindow_5fsize',['ENET_PEER_RELIABLE_WINDOW_SIZE',['../enet_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a3e65d0c04c87cbf5c5ba8784d54dcf35',1,'enet.h']]], + ['enet_5fpeer_5freliable_5fwindows',['ENET_PEER_RELIABLE_WINDOWS',['../enet_8h.html#adf764cbdea00d65edcd07bb9953ad2b7aea487e7016a1ebc59e865c2033eb02a2',1,'enet.h']]], + ['enet_5fpeer_5freset',['enet_peer_reset',['../group__peer.html#ga9444dfff9574a7d21dbbdd34385a7d4d',1,'enet_peer_reset(ENetPeer *): peer.c'],['../group__peer.html#ga9444dfff9574a7d21dbbdd34385a7d4d',1,'enet_peer_reset(ENetPeer *peer): peer.c']]], + ['enet_5fpeer_5freset_5fqueues',['enet_peer_reset_queues',['../group__peer.html#ga9a8da1e258f10bbef173abd598534f09',1,'enet_peer_reset_queues(ENetPeer *): peer.c'],['../group__peer.html#ga9a8da1e258f10bbef173abd598534f09',1,'enet_peer_reset_queues(ENetPeer *peer): peer.c']]], + ['enet_5fpeer_5fsend',['enet_peer_send',['../group__peer.html#gaf082a0ae58d9c435bed75c7325cf7290',1,'enet_peer_send(ENetPeer *, enet_uint8, ENetPacket *): peer.c'],['../group__peer.html#gaf082a0ae58d9c435bed75c7325cf7290',1,'enet_peer_send(ENetPeer *peer, enet_uint8 channelID, ENetPacket *packet): peer.c']]], + ['enet_5fpeer_5fsetup_5foutgoing_5fcommand',['enet_peer_setup_outgoing_command',['../group__peer.html#ga67b9b1aceaffe1efe08c9a62de2a9be6',1,'enet_peer_setup_outgoing_command(ENetPeer *, ENetOutgoingCommand *): peer.c'],['../group__peer.html#ga67b9b1aceaffe1efe08c9a62de2a9be6',1,'enet_peer_setup_outgoing_command(ENetPeer *peer, ENetOutgoingCommand *outgoingCommand): peer.c']]], + ['enet_5fpeer_5fstate_5facknowledging_5fconnect',['ENET_PEER_STATE_ACKNOWLEDGING_CONNECT',['../enet_8h.html#a058bc368c507eb86cb47f3946f38d558a2d7c685fd03fd11f20d85ab70be09b71',1,'enet.h']]], + ['enet_5fpeer_5fstate_5facknowledging_5fdisconnect',['ENET_PEER_STATE_ACKNOWLEDGING_DISCONNECT',['../enet_8h.html#a058bc368c507eb86cb47f3946f38d558a7fb55550df829139f6d4221fec863200',1,'enet.h']]], + ['enet_5fpeer_5fstate_5fconnected',['ENET_PEER_STATE_CONNECTED',['../enet_8h.html#a058bc368c507eb86cb47f3946f38d558ab60108c026e0be94719f2a6dd976d837',1,'enet.h']]], + ['enet_5fpeer_5fstate_5fconnecting',['ENET_PEER_STATE_CONNECTING',['../enet_8h.html#a058bc368c507eb86cb47f3946f38d558ac1202673f6581f07b312e93e9ceb9f1c',1,'enet.h']]], + ['enet_5fpeer_5fstate_5fconnection_5fpending',['ENET_PEER_STATE_CONNECTION_PENDING',['../enet_8h.html#a058bc368c507eb86cb47f3946f38d558a9cb05986b3d5280450598fd5ea999bc9',1,'enet.h']]], + ['enet_5fpeer_5fstate_5fconnection_5fsucceeded',['ENET_PEER_STATE_CONNECTION_SUCCEEDED',['../enet_8h.html#a058bc368c507eb86cb47f3946f38d558aa06f79074cbacbbf28554b8fff5806b9',1,'enet.h']]], + ['enet_5fpeer_5fstate_5fdisconnect_5flater',['ENET_PEER_STATE_DISCONNECT_LATER',['../enet_8h.html#a058bc368c507eb86cb47f3946f38d558a4915aae46a24ba6f2d0b770464681d09',1,'enet.h']]], + ['enet_5fpeer_5fstate_5fdisconnected',['ENET_PEER_STATE_DISCONNECTED',['../enet_8h.html#a058bc368c507eb86cb47f3946f38d558a0c8fc79545935a94ce297543fa8ae072',1,'enet.h']]], + ['enet_5fpeer_5fstate_5fdisconnecting',['ENET_PEER_STATE_DISCONNECTING',['../enet_8h.html#a058bc368c507eb86cb47f3946f38d558ab64c1ace457d5539c0b06297c1f4d05d',1,'enet.h']]], + ['enet_5fpeer_5fstate_5fzombie',['ENET_PEER_STATE_ZOMBIE',['../enet_8h.html#a058bc368c507eb86cb47f3946f38d558a4e38a788b4c1b83f183e5f9524658a6c',1,'enet.h']]], + ['enet_5fpeer_5fthrottle',['enet_peer_throttle',['../group__peer.html#ga52c5c6b1bbd807466298b2d7ed12fdd6',1,'enet_peer_throttle(ENetPeer *, enet_uint32): peer.c'],['../group__peer.html#ga52c5c6b1bbd807466298b2d7ed12fdd6',1,'enet_peer_throttle(ENetPeer *peer, enet_uint32 rtt): peer.c']]], + ['enet_5fpeer_5fthrottle_5fconfigure',['enet_peer_throttle_configure',['../group__peer.html#gab35807c848b6c88af12ce8476dffbc84',1,'enet_peer_throttle_configure(ENetPeer *, enet_uint32, enet_uint32, enet_uint32): peer.c'],['../group__peer.html#gab35807c848b6c88af12ce8476dffbc84',1,'enet_peer_throttle_configure(ENetPeer *peer, enet_uint32 interval, enet_uint32 acceleration, enet_uint32 deceleration): peer.c']]], + ['enet_5fpeer_5ftimeout',['enet_peer_timeout',['../group__peer.html#gac48f35cdd39a89318a7b4fc19920b21b',1,'enet_peer_timeout(ENetPeer *, enet_uint32, enet_uint32, enet_uint32): peer.c'],['../group__peer.html#gac48f35cdd39a89318a7b4fc19920b21b',1,'enet_peer_timeout(ENetPeer *peer, enet_uint32 timeoutLimit, enet_uint32 timeoutMinimum, enet_uint32 timeoutMaximum): peer.c']]], + ['enet_5fpeer_5ftimeout_5flimit',['ENET_PEER_TIMEOUT_LIMIT',['../enet_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a9af311f55d4447c4db77307a29c6c1bb',1,'enet.h']]], + ['enet_5fpeer_5ftimeout_5fmaximum',['ENET_PEER_TIMEOUT_MAXIMUM',['../enet_8h.html#adf764cbdea00d65edcd07bb9953ad2b7aac59883919ef255fae349891e6095763',1,'enet.h']]], + ['enet_5fpeer_5ftimeout_5fminimum',['ENET_PEER_TIMEOUT_MINIMUM',['../enet_8h.html#adf764cbdea00d65edcd07bb9953ad2b7aaba0181e517ebd910e10f46c3cf4391c',1,'enet.h']]], + ['enet_5fpeer_5funsequenced_5fwindow_5fsize',['ENET_PEER_UNSEQUENCED_WINDOW_SIZE',['../enet_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a603d7c227b9ce57db00652d71bdf0d11',1,'enet.h']]], + ['enet_5fpeer_5funsequenced_5fwindows',['ENET_PEER_UNSEQUENCED_WINDOWS',['../enet_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a970159e111f9f3ada8b89a539ae101bb',1,'enet.h']]], + ['enet_5fpeer_5fwindow_5fsize_5fscale',['ENET_PEER_WINDOW_SIZE_SCALE',['../enet_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a89e252c3209a81929d8543749d3dbb48',1,'enet.h']]], + ['enet_5fport_5fany',['ENET_PORT_ANY',['../enet_8h.html#a40ac758f51b43b89c67fb30ab61a5d2c',1,'enet.h']]], + ['enet_5fprotocol_5fcommand_5facknowledge',['ENET_PROTOCOL_COMMAND_ACKNOWLEDGE',['../protocol_8h.html#aae6d1b7a85de28aa0c618952db07391aab2b88de4d1e9eacba43b8f0a1437372a',1,'protocol.h']]], + ['enet_5fprotocol_5fcommand_5fbandwidth_5flimit',['ENET_PROTOCOL_COMMAND_BANDWIDTH_LIMIT',['../protocol_8h.html#aae6d1b7a85de28aa0c618952db07391aa65d5b42df0e6e10888b27cb336beb9a3',1,'protocol.h']]], + ['enet_5fprotocol_5fcommand_5fconnect',['ENET_PROTOCOL_COMMAND_CONNECT',['../protocol_8h.html#aae6d1b7a85de28aa0c618952db07391aa2336781c45afea926c076d974917346f',1,'protocol.h']]], + ['enet_5fprotocol_5fcommand_5fcount',['ENET_PROTOCOL_COMMAND_COUNT',['../protocol_8h.html#aae6d1b7a85de28aa0c618952db07391aa70a573b3631949a5ca21acc2da33b5bf',1,'protocol.h']]], + ['enet_5fprotocol_5fcommand_5fdisconnect',['ENET_PROTOCOL_COMMAND_DISCONNECT',['../protocol_8h.html#aae6d1b7a85de28aa0c618952db07391aa4e7a040f62c5ab44ef689c2197fd9eb9',1,'protocol.h']]], + ['enet_5fprotocol_5fcommand_5fflag_5facknowledge',['ENET_PROTOCOL_COMMAND_FLAG_ACKNOWLEDGE',['../protocol_8h.html#a8dec42a2851e4465d585cfc93c1f9babae5e91563c251f0a197d31dcb684d1f74',1,'protocol.h']]], + ['enet_5fprotocol_5fcommand_5fflag_5funsequenced',['ENET_PROTOCOL_COMMAND_FLAG_UNSEQUENCED',['../protocol_8h.html#a8dec42a2851e4465d585cfc93c1f9babad8d96a89ef5f7d759d897aa96d1d035f',1,'protocol.h']]], + ['enet_5fprotocol_5fcommand_5fmask',['ENET_PROTOCOL_COMMAND_MASK',['../protocol_8h.html#aae6d1b7a85de28aa0c618952db07391aaa4a30460085f59f2dc2e1f21ef4ffd6e',1,'protocol.h']]], + ['enet_5fprotocol_5fcommand_5fnone',['ENET_PROTOCOL_COMMAND_NONE',['../protocol_8h.html#aae6d1b7a85de28aa0c618952db07391aa4dc71fe0cf188b510d196ab59c12e6da',1,'protocol.h']]], + ['enet_5fprotocol_5fcommand_5fping',['ENET_PROTOCOL_COMMAND_PING',['../protocol_8h.html#aae6d1b7a85de28aa0c618952db07391aa0bb31baca199c3896b5681f229ec6e52',1,'protocol.h']]], + ['enet_5fprotocol_5fcommand_5fsend_5ffragment',['ENET_PROTOCOL_COMMAND_SEND_FRAGMENT',['../protocol_8h.html#aae6d1b7a85de28aa0c618952db07391aaeb83c1aca4a19b441062b35d90cdca99',1,'protocol.h']]], + ['enet_5fprotocol_5fcommand_5fsend_5freliable',['ENET_PROTOCOL_COMMAND_SEND_RELIABLE',['../protocol_8h.html#aae6d1b7a85de28aa0c618952db07391aa4b9f350268e39bc8234fe271d399b0e9',1,'protocol.h']]], + ['enet_5fprotocol_5fcommand_5fsend_5funreliable',['ENET_PROTOCOL_COMMAND_SEND_UNRELIABLE',['../protocol_8h.html#aae6d1b7a85de28aa0c618952db07391aa5919b3715d5a266abf45082a64117559',1,'protocol.h']]], + ['enet_5fprotocol_5fcommand_5fsend_5funreliable_5ffragment',['ENET_PROTOCOL_COMMAND_SEND_UNRELIABLE_FRAGMENT',['../protocol_8h.html#aae6d1b7a85de28aa0c618952db07391aa429c339ff98d5f7e26dd9cb03aa92fa9',1,'protocol.h']]], + ['enet_5fprotocol_5fcommand_5fsend_5funsequenced',['ENET_PROTOCOL_COMMAND_SEND_UNSEQUENCED',['../protocol_8h.html#aae6d1b7a85de28aa0c618952db07391aa4032318ed3e26bb9d1df59744cfbc9fb',1,'protocol.h']]], + ['enet_5fprotocol_5fcommand_5fsize',['enet_protocol_command_size',['../enet_8h.html#aea0520a5cc4fc91f40690eebbdc1ff90',1,'enet_protocol_command_size(enet_uint8): protocol.c'],['../protocol_8c.html#af0a3820cd3fdc56487f0fe700d370c5f',1,'enet_protocol_command_size(enet_uint8 commandNumber): protocol.c']]], + ['enet_5fprotocol_5fcommand_5fthrottle_5fconfigure',['ENET_PROTOCOL_COMMAND_THROTTLE_CONFIGURE',['../protocol_8h.html#aae6d1b7a85de28aa0c618952db07391aab69ed3734e5050e0b6246e7cb28bb01a',1,'protocol.h']]], + ['enet_5fprotocol_5fcommand_5fverify_5fconnect',['ENET_PROTOCOL_COMMAND_VERIFY_CONNECT',['../protocol_8h.html#aae6d1b7a85de28aa0c618952db07391aa397412e0f0f71070a3f79d4204c7a3a8',1,'protocol.h']]], + ['enet_5fprotocol_5fheader_5fflag_5fcompressed',['ENET_PROTOCOL_HEADER_FLAG_COMPRESSED',['../protocol_8h.html#a8dec42a2851e4465d585cfc93c1f9baba227c09a85bbcba2c0813b1a5e2eb8870',1,'protocol.h']]], + ['enet_5fprotocol_5fheader_5fflag_5fmask',['ENET_PROTOCOL_HEADER_FLAG_MASK',['../protocol_8h.html#a8dec42a2851e4465d585cfc93c1f9babae00c09f44b712c4cf4a5b8af69d0c42c',1,'protocol.h']]], + ['enet_5fprotocol_5fheader_5fflag_5fsent_5ftime',['ENET_PROTOCOL_HEADER_FLAG_SENT_TIME',['../protocol_8h.html#a8dec42a2851e4465d585cfc93c1f9babab67fc70d486eab71a4dc87950b312c3c',1,'protocol.h']]], + ['enet_5fprotocol_5fheader_5fsession_5fmask',['ENET_PROTOCOL_HEADER_SESSION_MASK',['../protocol_8h.html#a8dec42a2851e4465d585cfc93c1f9baba3579038f4f89f4281104329f0f2279a6',1,'protocol.h']]], + ['enet_5fprotocol_5fheader_5fsession_5fshift',['ENET_PROTOCOL_HEADER_SESSION_SHIFT',['../protocol_8h.html#a8dec42a2851e4465d585cfc93c1f9baba6474ddbb75b8083170afdc5377f214c6',1,'protocol.h']]], + ['enet_5fprotocol_5fmaximum_5fchannel_5fcount',['ENET_PROTOCOL_MAXIMUM_CHANNEL_COUNT',['../protocol_8h.html#a99fb83031ce9923c84392b4e92f956b5ab5dbabc8177a41de59eef5fc41846f74',1,'protocol.h']]], + ['enet_5fprotocol_5fmaximum_5ffragment_5fcount',['ENET_PROTOCOL_MAXIMUM_FRAGMENT_COUNT',['../protocol_8h.html#a99fb83031ce9923c84392b4e92f956b5a95a4ea5ae46f122d281dd649e89ef867',1,'protocol.h']]], + ['enet_5fprotocol_5fmaximum_5fmtu',['ENET_PROTOCOL_MAXIMUM_MTU',['../protocol_8h.html#a99fb83031ce9923c84392b4e92f956b5abbb6bb2b32e543e21066147c4ff9bc29',1,'protocol.h']]], + ['enet_5fprotocol_5fmaximum_5fpacket_5fcommands',['ENET_PROTOCOL_MAXIMUM_PACKET_COMMANDS',['../protocol_8h.html#a99fb83031ce9923c84392b4e92f956b5ac6cff524487dc3564598fac9e93f08b9',1,'protocol.h']]], + ['enet_5fprotocol_5fmaximum_5fpeer_5fid',['ENET_PROTOCOL_MAXIMUM_PEER_ID',['../protocol_8h.html#a99fb83031ce9923c84392b4e92f956b5a34ddc9143699c74e171d19c590935ae2',1,'protocol.h']]], + ['enet_5fprotocol_5fmaximum_5fwindow_5fsize',['ENET_PROTOCOL_MAXIMUM_WINDOW_SIZE',['../protocol_8h.html#a99fb83031ce9923c84392b4e92f956b5a6daff8ed53d03340922c6ae816a16a8f',1,'protocol.h']]], + ['enet_5fprotocol_5fminimum_5fchannel_5fcount',['ENET_PROTOCOL_MINIMUM_CHANNEL_COUNT',['../protocol_8h.html#a99fb83031ce9923c84392b4e92f956b5a65618194fde673df13858a2f86fa655c',1,'protocol.h']]], + ['enet_5fprotocol_5fminimum_5fmtu',['ENET_PROTOCOL_MINIMUM_MTU',['../protocol_8h.html#a99fb83031ce9923c84392b4e92f956b5af7c12ab8b05f514e867e5c37b5d16a48',1,'protocol.h']]], + ['enet_5fprotocol_5fminimum_5fwindow_5fsize',['ENET_PROTOCOL_MINIMUM_WINDOW_SIZE',['../protocol_8h.html#a99fb83031ce9923c84392b4e92f956b5a9faf12056e4403844a25bab2ccda4dd2',1,'protocol.h']]], + ['enet_5frange_5fcoder_5fbottom',['ENET_RANGE_CODER_BOTTOM',['../compress_8c.html#a06fc87d81c62e9abb8790b6e5713c55babf48e05bfa4454931cbbfc9ec99e9eef',1,'compress.c']]], + ['enet_5frange_5fcoder_5fcompress',['enet_range_coder_compress',['../compress_8c.html#a074b73d16cf42e3997bbe7efd9fd1689',1,'enet_range_coder_compress(void *context, const ENetBuffer *inBuffers, size_t inBufferCount, size_t inLimit, enet_uint8 *outData, size_t outLimit): compress.c'],['../enet_8h.html#a979b6361ae44745e3edbd389815ef0a3',1,'enet_range_coder_compress(void *, const ENetBuffer *, size_t, size_t, enet_uint8 *, size_t): compress.c']]], + ['enet_5frange_5fcoder_5fcreate',['enet_range_coder_create',['../compress_8c.html#ae4c811e2bb7b322f90f5c8652d97af7c',1,'enet_range_coder_create(void): compress.c'],['../enet_8h.html#ae4c811e2bb7b322f90f5c8652d97af7c',1,'enet_range_coder_create(void): compress.c']]], + ['enet_5frange_5fcoder_5fdecode',['ENET_RANGE_CODER_DECODE',['../compress_8c.html#a5ac308df9a339045c5c38c30ae4d85c2',1,'compress.c']]], + ['enet_5frange_5fcoder_5fdecompress',['enet_range_coder_decompress',['../compress_8c.html#a08cd12b64ecb36ffbf6d3281ff2f3e75',1,'enet_range_coder_decompress(void *context, const enet_uint8 *inData, size_t inLimit, enet_uint8 *outData, size_t outLimit): compress.c'],['../enet_8h.html#a8a470a155f35dc9dbfc548a6ecabf563',1,'enet_range_coder_decompress(void *, const enet_uint8 *, size_t, enet_uint8 *, size_t): compress.c']]], + ['enet_5frange_5fcoder_5fdestroy',['enet_range_coder_destroy',['../compress_8c.html#a97f697e6793dda86d5a08337503a4a74',1,'enet_range_coder_destroy(void *context): compress.c'],['../enet_8h.html#aa10e7dcb82c1fc310cef161e91efafaf',1,'enet_range_coder_destroy(void *): compress.c']]], + ['enet_5frange_5fcoder_5fencode',['ENET_RANGE_CODER_ENCODE',['../compress_8c.html#a855aeedd7c5c454bdb555f215a951aa8',1,'compress.c']]], + ['enet_5frange_5fcoder_5fflush',['ENET_RANGE_CODER_FLUSH',['../compress_8c.html#af2239936c2029493fe2afa62c4053822',1,'compress.c']]], + ['enet_5frange_5fcoder_5ffree_5fsymbols',['ENET_RANGE_CODER_FREE_SYMBOLS',['../compress_8c.html#a2301e440c70ae35dfa29a6cf23e7acf3',1,'compress.c']]], + ['enet_5frange_5fcoder_5foutput',['ENET_RANGE_CODER_OUTPUT',['../compress_8c.html#a1124dee1efa3a8da8433a1ca6ee5907f',1,'compress.c']]], + ['enet_5frange_5fcoder_5fread',['ENET_RANGE_CODER_READ',['../compress_8c.html#a5948e10327214ba8bcdc7cc49b1cf761',1,'compress.c']]], + ['enet_5frange_5fcoder_5fseed',['ENET_RANGE_CODER_SEED',['../compress_8c.html#a04be80a8a2ad11320f683ffe98653afb',1,'compress.c']]], + ['enet_5frange_5fcoder_5ftop',['ENET_RANGE_CODER_TOP',['../compress_8c.html#a06fc87d81c62e9abb8790b6e5713c55ba72b69f7e7b9ba89cf6dc9de719109e0f',1,'compress.c']]], + ['enet_5fsocket_5faccept',['enet_socket_accept',['../group__socket.html#ga32a19b4cf4d9b685c1a1b2fa080c30b2',1,'enet_socket_accept(ENetSocket, ENetAddress *): unix.c'],['../group__socket.html#ga32a19b4cf4d9b685c1a1b2fa080c30b2',1,'enet_socket_accept(ENetSocket socket, ENetAddress *address): unix.c']]], + ['enet_5fsocket_5fbind',['enet_socket_bind',['../group__socket.html#ga142285ecaae9709be841a204427f533f',1,'enet_socket_bind(ENetSocket, const ENetAddress *): unix.c'],['../group__socket.html#ga142285ecaae9709be841a204427f533f',1,'enet_socket_bind(ENetSocket socket, const ENetAddress *address): unix.c']]], + ['enet_5fsocket_5fconnect',['enet_socket_connect',['../group__socket.html#gaac968eaf73e9a193eb24e5f1b761b0ce',1,'enet_socket_connect(ENetSocket, const ENetAddress *): unix.c'],['../group__socket.html#gaac968eaf73e9a193eb24e5f1b761b0ce',1,'enet_socket_connect(ENetSocket socket, const ENetAddress *address): unix.c']]], + ['enet_5fsocket_5fcreate',['enet_socket_create',['../group__socket.html#gaaa4bc720812b3736c60502bfa1180c26',1,'enet_socket_create(ENetSocketType): unix.c'],['../group__socket.html#gaaa4bc720812b3736c60502bfa1180c26',1,'enet_socket_create(ENetSocketType type): unix.c']]], + ['enet_5fsocket_5fdestroy',['enet_socket_destroy',['../group__socket.html#gaea9227c91eed2b38d2707e51afa33c6f',1,'enet_socket_destroy(ENetSocket): unix.c'],['../group__socket.html#gaea9227c91eed2b38d2707e51afa33c6f',1,'enet_socket_destroy(ENetSocket socket): unix.c']]], + ['enet_5fsocket_5fget_5faddress',['enet_socket_get_address',['../group__socket.html#ga62786757fd6b2bdd31eed76c3fdf9d77',1,'enet_socket_get_address(ENetSocket, ENetAddress *): unix.c'],['../group__socket.html#ga62786757fd6b2bdd31eed76c3fdf9d77',1,'enet_socket_get_address(ENetSocket socket, ENetAddress *address): unix.c']]], + ['enet_5fsocket_5fget_5foption',['enet_socket_get_option',['../group__socket.html#gaa3471d79efff60860086aa21623e1b8b',1,'enet_socket_get_option(ENetSocket, ENetSocketOption, int *): unix.c'],['../group__socket.html#gaa3471d79efff60860086aa21623e1b8b',1,'enet_socket_get_option(ENetSocket socket, ENetSocketOption option, int *value): unix.c']]], + ['enet_5fsocket_5flisten',['enet_socket_listen',['../group__socket.html#ga1b8b303fd69ee97500784f7916ab2b14',1,'enet_socket_listen(ENetSocket, int): unix.c'],['../group__socket.html#ga1b8b303fd69ee97500784f7916ab2b14',1,'enet_socket_listen(ENetSocket socket, int backlog): unix.c']]], + ['enet_5fsocket_5fnull',['ENET_SOCKET_NULL',['../unix_8h.html#ab58ff95893f709c6db12b7fdd8cf0a6d',1,'ENET_SOCKET_NULL(): unix.h'],['../win32_8h.html#ab58ff95893f709c6db12b7fdd8cf0a6d',1,'ENET_SOCKET_NULL(): win32.h']]], + ['enet_5fsocket_5freceive',['enet_socket_receive',['../group__socket.html#gab527761de677b6bf4d24363eaf03353d',1,'enet_socket_receive(ENetSocket, ENetAddress *, ENetBuffer *, size_t): unix.c'],['../group__socket.html#gab527761de677b6bf4d24363eaf03353d',1,'enet_socket_receive(ENetSocket socket, ENetAddress *address, ENetBuffer *buffers, size_t bufferCount): unix.c']]], + ['enet_5fsocket_5fsend',['enet_socket_send',['../group__socket.html#ga9c9c41352de9dda00b8197f550d14a2e',1,'enet_socket_send(ENetSocket, const ENetAddress *, const ENetBuffer *, size_t): unix.c'],['../group__socket.html#ga9c9c41352de9dda00b8197f550d14a2e',1,'enet_socket_send(ENetSocket socket, const ENetAddress *address, const ENetBuffer *buffers, size_t bufferCount): unix.c']]], + ['enet_5fsocket_5fset_5foption',['enet_socket_set_option',['../group__socket.html#ga28d673f1586a9c75146548611562b3af',1,'enet_socket_set_option(ENetSocket, ENetSocketOption, int): unix.c'],['../group__socket.html#ga28d673f1586a9c75146548611562b3af',1,'enet_socket_set_option(ENetSocket socket, ENetSocketOption option, int value): unix.c']]], + ['enet_5fsocket_5fshutdown',['enet_socket_shutdown',['../group__socket.html#ga33d37353265c8ea4ad32b1423ba73038',1,'enet_socket_shutdown(ENetSocket, ENetSocketShutdown): unix.c'],['../group__socket.html#ga33d37353265c8ea4ad32b1423ba73038',1,'enet_socket_shutdown(ENetSocket socket, ENetSocketShutdown how): unix.c']]], + ['enet_5fsocket_5fshutdown_5fread',['ENET_SOCKET_SHUTDOWN_READ',['../enet_8h.html#ae8d8283919ba7d336428cae4a97ce255aa6ead1077946d4d7c4faaf115200e0b0',1,'enet.h']]], + ['enet_5fsocket_5fshutdown_5fread_5fwrite',['ENET_SOCKET_SHUTDOWN_READ_WRITE',['../enet_8h.html#ae8d8283919ba7d336428cae4a97ce255ad2b55e1ae670f1dbcca38aef0965336a',1,'enet.h']]], + ['enet_5fsocket_5fshutdown_5fwrite',['ENET_SOCKET_SHUTDOWN_WRITE',['../enet_8h.html#ae8d8283919ba7d336428cae4a97ce255ac46ae711fba839e7591119518b58361d',1,'enet.h']]], + ['enet_5fsocket_5ftype_5fdatagram',['ENET_SOCKET_TYPE_DATAGRAM',['../enet_8h.html#a373a18cfd61d7857612d6870ce15031aa135a3b509fc7bd3dfb4e217f629ff62a',1,'enet.h']]], + ['enet_5fsocket_5ftype_5fstream',['ENET_SOCKET_TYPE_STREAM',['../enet_8h.html#a373a18cfd61d7857612d6870ce15031aa2302d51fcd8de353dd72e19f4f11533a',1,'enet.h']]], + ['enet_5fsocket_5fwait',['enet_socket_wait',['../group__socket.html#gad44bb89ae90092369293341dda2a035c',1,'enet_socket_wait(ENetSocket, enet_uint32 *, enet_uint32): unix.c'],['../group__socket.html#gad44bb89ae90092369293341dda2a035c',1,'enet_socket_wait(ENetSocket socket, enet_uint32 *condition, enet_uint32 timeout): unix.c']]], + ['enet_5fsocket_5fwait_5finterrupt',['ENET_SOCKET_WAIT_INTERRUPT',['../enet_8h.html#ad5d59a7fd69cb12c88e349b6a40b7957ab5f4d2fdce39ad6ab2003b08f8174667',1,'enet.h']]], + ['enet_5fsocket_5fwait_5fnone',['ENET_SOCKET_WAIT_NONE',['../enet_8h.html#ad5d59a7fd69cb12c88e349b6a40b7957af6e6fd0def303f2dc162b1ca45ffe194',1,'enet.h']]], + ['enet_5fsocket_5fwait_5freceive',['ENET_SOCKET_WAIT_RECEIVE',['../enet_8h.html#ad5d59a7fd69cb12c88e349b6a40b7957aed6d2ac96d04069a9d76181353086d87',1,'enet.h']]], + ['enet_5fsocket_5fwait_5fsend',['ENET_SOCKET_WAIT_SEND',['../enet_8h.html#ad5d59a7fd69cb12c88e349b6a40b7957ac8622c6886c2239461b2fd7f1a84cead',1,'enet.h']]], + ['enet_5fsocketset_5fadd',['ENET_SOCKETSET_ADD',['../unix_8h.html#ad5003a9b55c900605b6a81ea37d382ee',1,'ENET_SOCKETSET_ADD(): unix.h'],['../win32_8h.html#ad5003a9b55c900605b6a81ea37d382ee',1,'ENET_SOCKETSET_ADD(): win32.h']]], + ['enet_5fsocketset_5fcheck',['ENET_SOCKETSET_CHECK',['../unix_8h.html#a455101a0de016782efa63810d47ee898',1,'ENET_SOCKETSET_CHECK(): unix.h'],['../win32_8h.html#a455101a0de016782efa63810d47ee898',1,'ENET_SOCKETSET_CHECK(): win32.h']]], + ['enet_5fsocketset_5fempty',['ENET_SOCKETSET_EMPTY',['../unix_8h.html#ada38c37a943326446cb4ba8be0b27469',1,'ENET_SOCKETSET_EMPTY(): unix.h'],['../win32_8h.html#ada38c37a943326446cb4ba8be0b27469',1,'ENET_SOCKETSET_EMPTY(): win32.h']]], + ['enet_5fsocketset_5fremove',['ENET_SOCKETSET_REMOVE',['../unix_8h.html#a3316bc3b3db9371322a549d8f87bc30a',1,'ENET_SOCKETSET_REMOVE(): unix.h'],['../win32_8h.html#a3316bc3b3db9371322a549d8f87bc30a',1,'ENET_SOCKETSET_REMOVE(): win32.h']]], + ['enet_5fsocketset_5fselect',['enet_socketset_select',['../group__socket.html#ga9ebba8fc4c0c4d21aba510a6ffdd97bf',1,'enet_socketset_select(ENetSocket, ENetSocketSet *, ENetSocketSet *, enet_uint32): unix.c'],['../group__socket.html#ga9ebba8fc4c0c4d21aba510a6ffdd97bf',1,'enet_socketset_select(ENetSocket maxSocket, ENetSocketSet *readSet, ENetSocketSet *writeSet, enet_uint32 timeout): unix.c']]], + ['enet_5fsockopt_5fbroadcast',['ENET_SOCKOPT_BROADCAST',['../enet_8h.html#aeca7102ede4e9b902a7bb5cdd52e9952a55531de7a8c5ef2b2f51448a7741cd2d',1,'enet.h']]], + ['enet_5fsockopt_5ferror',['ENET_SOCKOPT_ERROR',['../enet_8h.html#aeca7102ede4e9b902a7bb5cdd52e9952a77b595080059599deadb6f1c7afefa09',1,'enet.h']]], + ['enet_5fsockopt_5fnodelay',['ENET_SOCKOPT_NODELAY',['../enet_8h.html#aeca7102ede4e9b902a7bb5cdd52e9952a1c3e428e0152f1c49156b0f6497b28a5',1,'enet.h']]], + ['enet_5fsockopt_5fnonblock',['ENET_SOCKOPT_NONBLOCK',['../enet_8h.html#aeca7102ede4e9b902a7bb5cdd52e9952ad396a78d066594e35821b30130ed720b',1,'enet.h']]], + ['enet_5fsockopt_5frcvbuf',['ENET_SOCKOPT_RCVBUF',['../enet_8h.html#aeca7102ede4e9b902a7bb5cdd52e9952a799e801287626218a7b4d49a827f21a5',1,'enet.h']]], + ['enet_5fsockopt_5frcvtimeo',['ENET_SOCKOPT_RCVTIMEO',['../enet_8h.html#aeca7102ede4e9b902a7bb5cdd52e9952acfc40bf7ecc8d7b1237c5a6c86706c29',1,'enet.h']]], + ['enet_5fsockopt_5freuseaddr',['ENET_SOCKOPT_REUSEADDR',['../enet_8h.html#aeca7102ede4e9b902a7bb5cdd52e9952a8aebd43abeafbef5670e8c6bb42cc3c3',1,'enet.h']]], + ['enet_5fsockopt_5fsndbuf',['ENET_SOCKOPT_SNDBUF',['../enet_8h.html#aeca7102ede4e9b902a7bb5cdd52e9952a4809273647a22c8315f5f70f21468897',1,'enet.h']]], + ['enet_5fsockopt_5fsndtimeo',['ENET_SOCKOPT_SNDTIMEO',['../enet_8h.html#aeca7102ede4e9b902a7bb5cdd52e9952a4b0e6f9fe1a75bb4d98fb665b2de3268',1,'enet.h']]], + ['enet_5fsubcontext_5fescape_5fdelta',['ENET_SUBCONTEXT_ESCAPE_DELTA',['../compress_8c.html#a06fc87d81c62e9abb8790b6e5713c55ba286fdf2dc8adedb1d8f6f14f1872ebe1',1,'compress.c']]], + ['enet_5fsubcontext_5forder',['ENET_SUBCONTEXT_ORDER',['../compress_8c.html#a06fc87d81c62e9abb8790b6e5713c55ba5d07c0167759d445b4a0543cfc3914cb',1,'compress.c']]], + ['enet_5fsubcontext_5fsymbol_5fdelta',['ENET_SUBCONTEXT_SYMBOL_DELTA',['../compress_8c.html#a06fc87d81c62e9abb8790b6e5713c55bab8f3ee4e02d6ebb64aea66a598284349',1,'compress.c']]], + ['enet_5fsymbol_5fcreate',['ENET_SYMBOL_CREATE',['../compress_8c.html#a61f061433eedabacffa7c43b038d3528',1,'compress.c']]], + ['enet_5ftime_5fdifference',['ENET_TIME_DIFFERENCE',['../time_8h.html#a3ab2d1368b4746a545c50f582c106c19',1,'time.h']]], + ['enet_5ftime_5fget',['enet_time_get',['../enet_8h.html#a26eeed004fe8fa39b0fb5b18efbd4d64',1,'enet_time_get(void): unix.c'],['../unix_8c.html#a26eeed004fe8fa39b0fb5b18efbd4d64',1,'enet_time_get(void): unix.c']]], + ['enet_5ftime_5fgreater',['ENET_TIME_GREATER',['../time_8h.html#a30674ee131356c50c395e15b9954abc2',1,'time.h']]], + ['enet_5ftime_5fgreater_5fequal',['ENET_TIME_GREATER_EQUAL',['../time_8h.html#ab88132d5a389d8497dc1f21d453a1f1f',1,'time.h']]], + ['enet_5ftime_5fless',['ENET_TIME_LESS',['../time_8h.html#aafabe4183d73975e757d5d3875e589b0',1,'time.h']]], + ['enet_5ftime_5fless_5fequal',['ENET_TIME_LESS_EQUAL',['../time_8h.html#abe1820f47efd2b138c4720a1a847ea04',1,'time.h']]], + ['enet_5ftime_5foverflow',['ENET_TIME_OVERFLOW',['../time_8h.html#af88e4a88dc80495600167014aa643714',1,'time.h']]], + ['enet_5ftime_5fset',['enet_time_set',['../enet_8h.html#a40fc3c9805a6842804e3d0be2ce8c31a',1,'enet_time_set(enet_uint32): unix.c'],['../unix_8c.html#af7346c361d30381752ac89475a5e1fd5',1,'enet_time_set(enet_uint32 newTimeBase): unix.c']]], + ['enet_5fuint16',['enet_uint16',['../types_8h.html#a245102585fdf31bdf208639ef47bec5d',1,'types.h']]], + ['enet_5fuint32',['enet_uint32',['../types_8h.html#a5273659ca3c664b8550452732e9e4ae3',1,'types.h']]], + ['enet_5fuint8',['enet_uint8',['../types_8h.html#a34ce80c65abc6389fe0121a83d757f07',1,'types.h']]], + ['enet_5fversion',['ENET_VERSION',['../enet_8h.html#aefb355eb62b5a7096faf91b3134e9016',1,'enet.h']]], + ['enet_5fversion_5fcreate',['ENET_VERSION_CREATE',['../enet_8h.html#ab3ebd57b901e14fa1ff745b0472ea786',1,'enet.h']]], + ['enet_5fversion_5fget_5fmajor',['ENET_VERSION_GET_MAJOR',['../enet_8h.html#a96ee2dd70919cda130284c640baeb3ba',1,'enet.h']]], + ['enet_5fversion_5fget_5fminor',['ENET_VERSION_GET_MINOR',['../enet_8h.html#aeb13b6da40a166446af5ab55dc8900b9',1,'enet.h']]], + ['enet_5fversion_5fget_5fpatch',['ENET_VERSION_GET_PATCH',['../enet_8h.html#a490e36f7af45f123cfa64d29209555ad',1,'enet.h']]], + ['enet_5fversion_5fmajor',['ENET_VERSION_MAJOR',['../enet_8h.html#ab7ed937c2db14ba2efb15c6a1626942a',1,'enet.h']]], + ['enet_5fversion_5fminor',['ENET_VERSION_MINOR',['../enet_8h.html#a7e3fba7774ffbf6f095c7c1c643db823',1,'enet.h']]], + ['enet_5fversion_5fpatch',['ENET_VERSION_PATCH',['../enet_8h.html#a7e08f37772431845fe118f9a87bebda2',1,'enet.h']]], + ['enetacknowledgement',['ENetAcknowledgement',['../structENetAcknowledgement.html',1,'']]], + ['enetaddress',['ENetAddress',['../structENetAddress.html',1,'']]], + ['enetbuffer',['ENetBuffer',['../structENetBuffer.html',1,'']]], + ['enetcallbacks',['ENetCallbacks',['../structENetCallbacks.html',1,'']]], + ['enetchannel',['ENetChannel',['../structENetChannel.html',1,'']]], + ['enetchecksumcallback',['ENetChecksumCallback',['../enet_8h.html#af4eaf23993845f97aa0ff223db7f53f0',1,'enet.h']]], + ['enetcompressor',['ENetCompressor',['../structENetCompressor.html',1,'']]], + ['enetevent',['ENetEvent',['../structENetEvent.html',1,'']]], + ['eneteventtype',['ENetEventType',['../enet_8h.html#adc5336f0698d4336b587f083d89df414',1,'enet.h']]], + ['enethost',['ENetHost',['../structENetHost.html',1,'']]], + ['enetincomingcommand',['ENetIncomingCommand',['../structENetIncomingCommand.html',1,'']]], + ['enetinterceptcallback',['ENetInterceptCallback',['../enet_8h.html#af131c9ddde1deed06e51499b6cff44bf',1,'enet.h']]], + ['enetlist',['ENetList',['../structENetList.html',1,'']]], + ['enetlistiterator',['ENetListIterator',['../list_8h.html#acb50c267c16b56058e231e2a82530d05',1,'list.h']]], + ['enetlistnode',['ENetListNode',['../structENetListNode.html',1,'']]], + ['enetoutgoingcommand',['ENetOutgoingCommand',['../structENetOutgoingCommand.html',1,'']]], + ['enetpacket',['ENetPacket',['../structENetPacket.html',1,'']]], + ['enetpacketflag',['ENetPacketFlag',['../enet_8h.html#a38c59a481ed607b07d63b7bc3e88ca98',1,'enet.h']]], + ['enetpacketfreecallback',['ENetPacketFreeCallback',['../enet_8h.html#a93c01a8aa9345f7b5043a7caf0633c0c',1,'enet.h']]], + ['enetpeer',['ENetPeer',['../structENetPeer.html',1,'']]], + ['enetpeerstate',['ENetPeerState',['../enet_8h.html#a058bc368c507eb86cb47f3946f38d558',1,'enet.h']]], + ['enetprotocol',['ENetProtocol',['../unionENetProtocol.html',1,'']]], + ['enetprotocolacknowledge',['ENetProtocolAcknowledge',['../structENetProtocolAcknowledge.html',1,'']]], + ['enetprotocolbandwidthlimit',['ENetProtocolBandwidthLimit',['../structENetProtocolBandwidthLimit.html',1,'']]], + ['enetprotocolcommand',['ENetProtocolCommand',['../protocol_8h.html#aae6d1b7a85de28aa0c618952db07391a',1,'protocol.h']]], + ['enetprotocolcommandheader',['ENetProtocolCommandHeader',['../structENetProtocolCommandHeader.html',1,'']]], + ['enetprotocolconnect',['ENetProtocolConnect',['../structENetProtocolConnect.html',1,'']]], + ['enetprotocoldisconnect',['ENetProtocolDisconnect',['../structENetProtocolDisconnect.html',1,'']]], + ['enetprotocolflag',['ENetProtocolFlag',['../protocol_8h.html#a8dec42a2851e4465d585cfc93c1f9bab',1,'protocol.h']]], + ['enetprotocolheader',['ENetProtocolHeader',['../structENetProtocolHeader.html',1,'']]], + ['enetprotocolping',['ENetProtocolPing',['../structENetProtocolPing.html',1,'']]], + ['enetprotocolsendfragment',['ENetProtocolSendFragment',['../structENetProtocolSendFragment.html',1,'']]], + ['enetprotocolsendreliable',['ENetProtocolSendReliable',['../structENetProtocolSendReliable.html',1,'']]], + ['enetprotocolsendunreliable',['ENetProtocolSendUnreliable',['../structENetProtocolSendUnreliable.html',1,'']]], + ['enetprotocolsendunsequenced',['ENetProtocolSendUnsequenced',['../structENetProtocolSendUnsequenced.html',1,'']]], + ['enetprotocolthrottleconfigure',['ENetProtocolThrottleConfigure',['../structENetProtocolThrottleConfigure.html',1,'']]], + ['enetprotocolverifyconnect',['ENetProtocolVerifyConnect',['../structENetProtocolVerifyConnect.html',1,'']]], + ['enetsocket',['ENetSocket',['../unix_8h.html#a22cf07f75b30cc43ecf9febbb244b537',1,'ENetSocket(): unix.h'],['../win32_8h.html#aaf990406be53b36b6700caff8c9193f2',1,'ENetSocket(): win32.h']]], + ['enetsocketoption',['ENetSocketOption',['../enet_8h.html#aeca7102ede4e9b902a7bb5cdd52e9952',1,'enet.h']]], + ['enetsocketset',['ENetSocketSet',['../unix_8h.html#ab8c03b0a5df283d329adf245e1f96622',1,'ENetSocketSet(): unix.h'],['../win32_8h.html#ab8c03b0a5df283d329adf245e1f96622',1,'ENetSocketSet(): win32.h']]], + ['enetsocketshutdown',['ENetSocketShutdown',['../enet_8h.html#ae8d8283919ba7d336428cae4a97ce255',1,'enet.h']]], + ['enetsockettype',['ENetSocketType',['../enet_8h.html#a373a18cfd61d7857612d6870ce15031a',1,'enet.h']]], + ['enetsocketwait',['ENetSocketWait',['../enet_8h.html#ad5d59a7fd69cb12c88e349b6a40b7957',1,'enet.h']]], + ['enetversion',['ENetVersion',['../enet_8h.html#a7e77c317884b9dc06ae73615f8da9a6f',1,'enet.h']]], + ['eventdata',['eventData',['../structENetPeer.html#a4869521e9b8aa67dccddd23a7955025b',1,'ENetPeer']]], + ['enet_20global_20functions',['ENet global functions',['../group__global.html',1,'']]], + ['enet_20host_20functions',['ENet host functions',['../group__host.html',1,'']]], + ['enet',['ENet',['../index.html',1,'']]], + ['enet_20linked_20list_20utility_20functions',['ENet linked list utility functions',['../group__list.html',1,'']]], + ['enet_20packet_20functions',['ENet packet functions',['../group__Packet.html',1,'']]], + ['enet_20peer_20functions',['ENet peer functions',['../group__peer.html',1,'']]], + ['enet_20private_20implementation_20functions',['ENet private implementation functions',['../group__private.html',1,'']]], + ['enet_20socket_20functions',['ENet socket functions',['../group__socket.html',1,'']]] +]; diff --git a/enet server test/enet2/docs/html/search/all_5.html b/enet server test/enet2/docs/html/search/all_5.html new file mode 100644 index 0000000..d085ca8 --- /dev/null +++ b/enet server test/enet2/docs/html/search/all_5.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/enet server test/enet2/docs/html/search/all_5.js b/enet server test/enet2/docs/html/search/all_5.js new file mode 100644 index 0000000..f1f019c --- /dev/null +++ b/enet server test/enet2/docs/html/search/all_5.js @@ -0,0 +1,15 @@ +var searchData= +[ + ['frequently_20answered_20questions',['Frequently Answered Questions',['../FAQ.html',1,'']]], + ['faq_2edox',['FAQ.dox',['../FAQ_8dox.html',1,'']]], + ['features_20and_20architecture',['Features and Architecture',['../Features.html',1,'']]], + ['flags',['flags',['../structENetPacket.html#afe56ea0c19dcbcdb3e48361a8b9ef190',1,'ENetPacket']]], + ['fragmentcount',['fragmentCount',['../structENetIncomingCommand.html#a045997566fdb38517b7a775355e5be95',1,'ENetIncomingCommand::fragmentCount()'],['../structENetProtocolSendFragment.html#a8b3afd14b9d2a30683ac404f533bcfa9',1,'ENetProtocolSendFragment::fragmentCount()']]], + ['fragmentlength',['fragmentLength',['../structENetOutgoingCommand.html#aff231b94d1bb07bc99f43041ea63cb3c',1,'ENetOutgoingCommand']]], + ['fragmentnumber',['fragmentNumber',['../structENetProtocolSendFragment.html#abff93e4f5f1f08ca1aadace7bdf5c437',1,'ENetProtocolSendFragment']]], + ['fragmentoffset',['fragmentOffset',['../structENetOutgoingCommand.html#a2e4ca8e0be684aef02086d4f1a778524',1,'ENetOutgoingCommand::fragmentOffset()'],['../structENetProtocolSendFragment.html#a242d3ad63ca86988e4a698cc4bb33c7e',1,'ENetProtocolSendFragment::fragmentOffset()']]], + ['fragments',['fragments',['../structENetIncomingCommand.html#ab6e89f5c93ffd70301e40920fa453ccd',1,'ENetIncomingCommand']]], + ['fragmentsremaining',['fragmentsRemaining',['../structENetIncomingCommand.html#a9a81258c1c0ec7fedfdc0d4ff20807b0',1,'ENetIncomingCommand']]], + ['free',['free',['../structENetCallbacks.html#af977cd405d99d1b13812af7e09462acb',1,'ENetCallbacks']]], + ['freecallback',['freeCallback',['../structENetPacket.html#ad602d6b6b35ef88b2b2e080fa5c9dc3d',1,'ENetPacket']]] +]; diff --git a/enet server test/enet2/docs/html/search/all_6.html b/enet server test/enet2/docs/html/search/all_6.html new file mode 100644 index 0000000..7a31022 --- /dev/null +++ b/enet server test/enet2/docs/html/search/all_6.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/enet server test/enet2/docs/html/search/all_6.js b/enet server test/enet2/docs/html/search/all_6.js new file mode 100644 index 0000000..5a764c0 --- /dev/null +++ b/enet server test/enet2/docs/html/search/all_6.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['header',['header',['../structENetProtocolAcknowledge.html#a2aeb97d2dac9db9d039afa3978a15794',1,'ENetProtocolAcknowledge::header()'],['../structENetProtocolConnect.html#ac4519caef688d50ba7192f97a13a3d15',1,'ENetProtocolConnect::header()'],['../structENetProtocolVerifyConnect.html#a6cb9f415fbfa1d80d2f8801345a23f50',1,'ENetProtocolVerifyConnect::header()'],['../structENetProtocolBandwidthLimit.html#a8e21c2e05c8283d2046e169741eca485',1,'ENetProtocolBandwidthLimit::header()'],['../structENetProtocolThrottleConfigure.html#a4faa94a0f97f39e2269199aef9527dd7',1,'ENetProtocolThrottleConfigure::header()'],['../structENetProtocolDisconnect.html#a93792d28d2749dde1d73d6c384c43f55',1,'ENetProtocolDisconnect::header()'],['../structENetProtocolPing.html#ac8c3ed7a37af977a82080c19d4cb45e0',1,'ENetProtocolPing::header()'],['../structENetProtocolSendReliable.html#adfe769ebe60e4776c6afedf8b5cf2da8',1,'ENetProtocolSendReliable::header()'],['../structENetProtocolSendUnreliable.html#a4abf781528429b0ca49192e66126e4f1',1,'ENetProtocolSendUnreliable::header()'],['../structENetProtocolSendUnsequenced.html#ae4ebee5be568c0a6a70f0e44866645c3',1,'ENetProtocolSendUnsequenced::header()'],['../structENetProtocolSendFragment.html#aaed193de3a9b832537b7cdc9a0ecd3a5',1,'ENetProtocolSendFragment::header()'],['../unionENetProtocol.html#a9858eacc1f6aafea63c29f1fa46b8d79',1,'ENetProtocol::header()']]], + ['headerflags',['headerFlags',['../structENetHost.html#a15cf66009846d9b052b3f4b4b9563f45',1,'ENetHost']]], + ['highestroundtriptimevariance',['highestRoundTripTimeVariance',['../structENetPeer.html#a4774e270290d487bef34a9319c7b9aaa',1,'ENetPeer']]], + ['host',['host',['../structENetAddress.html#ae9f8d524c982f22bdae56d6a71852d37',1,'ENetAddress::host()'],['../structENetPeer.html#a47bb47f607e767f708e06dbfde3ae82e',1,'ENetPeer::host()']]], + ['host_2ec',['host.c',['../host_8c.html',1,'']]] +]; diff --git a/enet server test/enet2/docs/html/search/all_7.html b/enet server test/enet2/docs/html/search/all_7.html new file mode 100644 index 0000000..f83a280 --- /dev/null +++ b/enet server test/enet2/docs/html/search/all_7.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/enet server test/enet2/docs/html/search/all_7.js b/enet server test/enet2/docs/html/search/all_7.js new file mode 100644 index 0000000..6ea873f --- /dev/null +++ b/enet server test/enet2/docs/html/search/all_7.js @@ -0,0 +1,18 @@ +var searchData= +[ + ['incomingbandwidth',['incomingBandwidth',['../structENetPeer.html#ac9266da9a8883b79355aabac6cbf4c82',1,'ENetPeer::incomingBandwidth()'],['../structENetHost.html#a663f01950084c01c49c060975bfe0d81',1,'ENetHost::incomingBandwidth()'],['../structENetProtocolConnect.html#a85524fe299a28645785b74b87f04ebfa',1,'ENetProtocolConnect::incomingBandwidth()'],['../structENetProtocolVerifyConnect.html#a9b02aaa6af235f4f627936ffd1b0522d',1,'ENetProtocolVerifyConnect::incomingBandwidth()'],['../structENetProtocolBandwidthLimit.html#af1d6486798dae522b021342a6997ffff',1,'ENetProtocolBandwidthLimit::incomingBandwidth()']]], + ['incomingbandwidththrottleepoch',['incomingBandwidthThrottleEpoch',['../structENetPeer.html#a665775c5c85bab4baa959846d38e5f2d',1,'ENetPeer']]], + ['incomingcommandlist',['incomingCommandList',['../structENetIncomingCommand.html#a2658b0ec3f27eee346684b73ccc56293',1,'ENetIncomingCommand']]], + ['incomingdatatotal',['incomingDataTotal',['../structENetPeer.html#a7f0ae4fdcbb86e3d6c1b5f5a0501132d',1,'ENetPeer']]], + ['incomingpeerid',['incomingPeerID',['../structENetPeer.html#ac539b6d67f3153cbad231544c7aaa4a6',1,'ENetPeer']]], + ['incomingreliablecommands',['incomingReliableCommands',['../structENetChannel.html#ac293e8e860f97dd646880bcdfcd382bf',1,'ENetChannel']]], + ['incomingreliablesequencenumber',['incomingReliableSequenceNumber',['../structENetChannel.html#a0f0d752172ec193c6a85aa0cf1d7b3f3',1,'ENetChannel']]], + ['incomingsessionid',['incomingSessionID',['../structENetPeer.html#a8af8481d72eb559b0fefe07c010ec739',1,'ENetPeer::incomingSessionID()'],['../structENetProtocolConnect.html#aed276648f472cf34ece49da2274a9502',1,'ENetProtocolConnect::incomingSessionID()'],['../structENetProtocolVerifyConnect.html#a83de75fcf76d9ee2e2afb59569ab4f80',1,'ENetProtocolVerifyConnect::incomingSessionID()']]], + ['incomingunreliablecommands',['incomingUnreliableCommands',['../structENetChannel.html#a37e137086515c59d398c44490e5dd04d',1,'ENetChannel']]], + ['incomingunreliablesequencenumber',['incomingUnreliableSequenceNumber',['../structENetChannel.html#a67eabe5e101ccd03b67f68f2a779e8d4',1,'ENetChannel']]], + ['incomingunsequencedgroup',['incomingUnsequencedGroup',['../structENetPeer.html#ae8692a201cca5a2e136e7aa4282b60c3',1,'ENetPeer']]], + ['install_2edox',['install.dox',['../install_8dox.html',1,'']]], + ['installation',['Installation',['../Installation.html',1,'']]], + ['intercept',['intercept',['../structENetHost.html#a425ea8ffaaf90e33888611c496be036a',1,'ENetHost']]], + ['irc_20channel',['IRC Channel',['../IRCChannel.html',1,'']]] +]; diff --git a/enet server test/enet2/docs/html/search/all_8.html b/enet server test/enet2/docs/html/search/all_8.html new file mode 100644 index 0000000..e0bfa82 --- /dev/null +++ b/enet server test/enet2/docs/html/search/all_8.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/enet server test/enet2/docs/html/search/all_8.js b/enet server test/enet2/docs/html/search/all_8.js new file mode 100644 index 0000000..a11d2a0 --- /dev/null +++ b/enet server test/enet2/docs/html/search/all_8.js @@ -0,0 +1,12 @@ +var searchData= +[ + ['lastreceivetime',['lastReceiveTime',['../structENetPeer.html#a164edfde779b855b63439c67c74ca7c6',1,'ENetPeer']]], + ['lastroundtriptime',['lastRoundTripTime',['../structENetPeer.html#a6e3e9030b2fe990f6538f355f81ae9b8',1,'ENetPeer']]], + ['lastroundtriptimevariance',['lastRoundTripTimeVariance',['../structENetPeer.html#ae36dbaed50a4d2cae3b11a7b897e16ae',1,'ENetPeer']]], + ['lastsendtime',['lastSendTime',['../structENetPeer.html#ad9bf776f502ec82fcd6ad81ec8c24ed2',1,'ENetPeer']]], + ['license',['License',['../License.html',1,'']]], + ['license_2edox',['license.dox',['../license_8dox.html',1,'']]], + ['list_2ec',['list.c',['../list_8c.html',1,'']]], + ['list_2eh',['list.h',['../list_8h.html',1,'']]], + ['lowestroundtriptime',['lowestRoundTripTime',['../structENetPeer.html#a540213fa154039c4d293feba7058ec06',1,'ENetPeer']]] +]; diff --git a/enet server test/enet2/docs/html/search/all_9.html b/enet server test/enet2/docs/html/search/all_9.html new file mode 100644 index 0000000..5cf41a6 --- /dev/null +++ b/enet server test/enet2/docs/html/search/all_9.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/enet server test/enet2/docs/html/search/all_9.js b/enet server test/enet2/docs/html/search/all_9.js new file mode 100644 index 0000000..cc4d829 --- /dev/null +++ b/enet server test/enet2/docs/html/search/all_9.js @@ -0,0 +1,10 @@ +var searchData= +[ + ['mailing_20list',['Mailing List',['../MailingList.html',1,'']]], + ['mainpage_2edox',['mainpage.dox',['../mainpage_8dox.html',1,'']]], + ['malloc',['malloc',['../structENetCallbacks.html#a69e38439cfc5c418bdd1d4a017932b71',1,'ENetCallbacks']]], + ['maximumpacketsize',['maximumPacketSize',['../structENetHost.html#aa22929bbc19e19ae4b01c7e9b3c0e540',1,'ENetHost']]], + ['maximumwaitingdata',['maximumWaitingData',['../structENetHost.html#a2b7d6895ab4ee6280ef951c1aacfea96',1,'ENetHost']]], + ['msg_5fnosignal',['MSG_NOSIGNAL',['../unix_8c.html#a9f55d0e90dc8cc6b2287312435cdde48',1,'unix.c']]], + ['mtu',['mtu',['../structENetPeer.html#a426fab3aa0784c3edced30f3fa624e13',1,'ENetPeer::mtu()'],['../structENetHost.html#a70419bc5f5f7cfcac76077db3fc7af22',1,'ENetHost::mtu()'],['../structENetProtocolConnect.html#a938e1df67fbc53281023aee6c552ac27',1,'ENetProtocolConnect::mtu()'],['../structENetProtocolVerifyConnect.html#a3e70e10fb1bf77648fc706c25d05fffa',1,'ENetProtocolVerifyConnect::mtu()']]] +]; diff --git a/enet server test/enet2/docs/html/search/all_a.html b/enet server test/enet2/docs/html/search/all_a.html new file mode 100644 index 0000000..37a0496 --- /dev/null +++ b/enet server test/enet2/docs/html/search/all_a.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/enet server test/enet2/docs/html/search/all_a.js b/enet server test/enet2/docs/html/search/all_a.js new file mode 100644 index 0000000..8ef029e --- /dev/null +++ b/enet server test/enet2/docs/html/search/all_a.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['needsdispatch',['needsDispatch',['../structENetPeer.html#a4c454ecc84bf1f7137761c9645f176b8',1,'ENetPeer']]], + ['next',['next',['../structENetListNode.html#a53956d514f5779987741dde30503fbac',1,'ENetListNode']]], + ['nexttimeout',['nextTimeout',['../structENetPeer.html#ae2ceeef4daea09bd5af6fda1db45052d',1,'ENetPeer']]], + ['no_5fmemory',['no_memory',['../structENetCallbacks.html#a91fe8797132f66fcedab53d87828069d',1,'ENetCallbacks']]] +]; diff --git a/enet server test/enet2/docs/html/search/all_b.html b/enet server test/enet2/docs/html/search/all_b.html new file mode 100644 index 0000000..75bc645 --- /dev/null +++ b/enet server test/enet2/docs/html/search/all_b.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/enet server test/enet2/docs/html/search/all_b.js b/enet server test/enet2/docs/html/search/all_b.js new file mode 100644 index 0000000..e45d175 --- /dev/null +++ b/enet server test/enet2/docs/html/search/all_b.js @@ -0,0 +1,14 @@ +var searchData= +[ + ['outgoingbandwidth',['outgoingBandwidth',['../structENetPeer.html#a38ca43b3ec9cd51b8120b7c50b03c5f0',1,'ENetPeer::outgoingBandwidth()'],['../structENetHost.html#ac72acde682f903beb2d9713538b6465c',1,'ENetHost::outgoingBandwidth()'],['../structENetProtocolConnect.html#a914f63aba14b68e1bb2dd91ad3b728b9',1,'ENetProtocolConnect::outgoingBandwidth()'],['../structENetProtocolVerifyConnect.html#aedeefa1a8476d74dc432dc8ced4a942e',1,'ENetProtocolVerifyConnect::outgoingBandwidth()'],['../structENetProtocolBandwidthLimit.html#a79205f196d170e6a6184c88d8dcbef76',1,'ENetProtocolBandwidthLimit::outgoingBandwidth()']]], + ['outgoingbandwidththrottleepoch',['outgoingBandwidthThrottleEpoch',['../structENetPeer.html#aa5497f3812d0f3199da559be1fdfefc0',1,'ENetPeer']]], + ['outgoingcommandlist',['outgoingCommandList',['../structENetOutgoingCommand.html#a599e31754d91aefbf6ca62abfb133828',1,'ENetOutgoingCommand']]], + ['outgoingdatatotal',['outgoingDataTotal',['../structENetPeer.html#ab692fa3146864313986cf655f507bcfb',1,'ENetPeer']]], + ['outgoingpeerid',['outgoingPeerID',['../structENetPeer.html#aa595b9bd1a22781cf7e03a41eac17e6b',1,'ENetPeer::outgoingPeerID()'],['../structENetProtocolConnect.html#a9aba2d69d08fd42efaa7e09fe5a8ca37',1,'ENetProtocolConnect::outgoingPeerID()'],['../structENetProtocolVerifyConnect.html#a45b9ebf11adbf8c73891de2279f6e4c4',1,'ENetProtocolVerifyConnect::outgoingPeerID()']]], + ['outgoingreliablecommands',['outgoingReliableCommands',['../structENetPeer.html#a5388ee4e9e723a2ffb0e72685e871cb8',1,'ENetPeer']]], + ['outgoingreliablesequencenumber',['outgoingReliableSequenceNumber',['../structENetChannel.html#a469becdcf5464583b06b62fb93adf156',1,'ENetChannel::outgoingReliableSequenceNumber()'],['../structENetPeer.html#a24013f6a2ca4708beedf9708d7f2841c',1,'ENetPeer::outgoingReliableSequenceNumber()']]], + ['outgoingsessionid',['outgoingSessionID',['../structENetPeer.html#a20da8fe27ea977e30428362c21425eb9',1,'ENetPeer::outgoingSessionID()'],['../structENetProtocolConnect.html#a425c602e41814a1fcea5b171ad4d33af',1,'ENetProtocolConnect::outgoingSessionID()'],['../structENetProtocolVerifyConnect.html#acf3d5ef09045248b0c065b4bf569f8f5',1,'ENetProtocolVerifyConnect::outgoingSessionID()']]], + ['outgoingunreliablecommands',['outgoingUnreliableCommands',['../structENetPeer.html#ab5f244330d752d4f8457da16626ffbf3',1,'ENetPeer']]], + ['outgoingunreliablesequencenumber',['outgoingUnreliableSequenceNumber',['../structENetChannel.html#a2d80cfad0ae9fe809aa58c9e3770dd2e',1,'ENetChannel']]], + ['outgoingunsequencedgroup',['outgoingUnsequencedGroup',['../structENetPeer.html#a623980756d5742862ff73c949a94a0a1',1,'ENetPeer']]] +]; diff --git a/enet server test/enet2/docs/html/search/all_c.html b/enet server test/enet2/docs/html/search/all_c.html new file mode 100644 index 0000000..0231081 --- /dev/null +++ b/enet server test/enet2/docs/html/search/all_c.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/enet server test/enet2/docs/html/search/all_c.js b/enet server test/enet2/docs/html/search/all_c.js new file mode 100644 index 0000000..63f9728 --- /dev/null +++ b/enet server test/enet2/docs/html/search/all_c.js @@ -0,0 +1,30 @@ +var searchData= +[ + ['packet',['packet',['../structENetOutgoingCommand.html#a040293cbea18bb96c63b4b38827b5248',1,'ENetOutgoingCommand::packet()'],['../structENetIncomingCommand.html#abed0f4c4a55c435e443d0ba971b5156c',1,'ENetIncomingCommand::packet()'],['../structENetEvent.html#a79056ddb1c72af77bc2a4949e102de6f',1,'ENetEvent::packet()']]], + ['packet_2ec',['packet.c',['../packet_8c.html',1,'']]], + ['packetdata',['packetData',['../structENetHost.html#a0a85c460bba4db9237b3beb64ac67f4b',1,'ENetHost']]], + ['packetloss',['packetLoss',['../structENetPeer.html#afc96187eec160a63528efb77caaac8f8',1,'ENetPeer']]], + ['packetlossepoch',['packetLossEpoch',['../structENetPeer.html#ac84d1c4b453b17197ad3b77b9b8a8826',1,'ENetPeer']]], + ['packetlossvariance',['packetLossVariance',['../structENetPeer.html#a15902fc8e2a3d5b89ca687eea3b39b4a',1,'ENetPeer']]], + ['packetsize',['packetSize',['../structENetHost.html#acb4f130412dd80a83a8ba89cf03384fa',1,'ENetHost']]], + ['packetslost',['packetsLost',['../structENetPeer.html#a52659ec03c512605c9bf654a6765a073',1,'ENetPeer']]], + ['packetssent',['packetsSent',['../structENetPeer.html#a07e7a1f9705f59992c589b862213aa98',1,'ENetPeer']]], + ['packetthrottle',['packetThrottle',['../structENetPeer.html#a22ba880b339bd469e1caabddaec37a0c',1,'ENetPeer']]], + ['packetthrottleacceleration',['packetThrottleAcceleration',['../structENetPeer.html#a9a3c446c77868c74ff765c101c7c3047',1,'ENetPeer::packetThrottleAcceleration()'],['../structENetProtocolConnect.html#af3da06ff27a96ca9f9bdde48102a0c85',1,'ENetProtocolConnect::packetThrottleAcceleration()'],['../structENetProtocolVerifyConnect.html#a2a0de24336b0dc3036af06d3b14dcb71',1,'ENetProtocolVerifyConnect::packetThrottleAcceleration()'],['../structENetProtocolThrottleConfigure.html#a1ef31bd28bc10c1d35a3e5d50dcf06ce',1,'ENetProtocolThrottleConfigure::packetThrottleAcceleration()']]], + ['packetthrottlecounter',['packetThrottleCounter',['../structENetPeer.html#aecdc66b04cf4ad13edacd363a5c82cb0',1,'ENetPeer']]], + ['packetthrottledeceleration',['packetThrottleDeceleration',['../structENetPeer.html#ae4b69e4b96ee6a4e21c4bca27bab6925',1,'ENetPeer::packetThrottleDeceleration()'],['../structENetProtocolConnect.html#a353c4acb61d25360190fbc4473bf2b59',1,'ENetProtocolConnect::packetThrottleDeceleration()'],['../structENetProtocolVerifyConnect.html#a971323a3df66f6160e5caffe87c9f874',1,'ENetProtocolVerifyConnect::packetThrottleDeceleration()'],['../structENetProtocolThrottleConfigure.html#a349abeca18f4711195a45e8e5156beb4',1,'ENetProtocolThrottleConfigure::packetThrottleDeceleration()']]], + ['packetthrottleepoch',['packetThrottleEpoch',['../structENetPeer.html#a065a50f31f4d54e0520371d2cfc0ec29',1,'ENetPeer']]], + ['packetthrottleinterval',['packetThrottleInterval',['../structENetPeer.html#ab8f36cf819168d7338fe991edc4e52b4',1,'ENetPeer::packetThrottleInterval()'],['../structENetProtocolConnect.html#af2e532c7491e2ad460e4cf0bdbe32cb5',1,'ENetProtocolConnect::packetThrottleInterval()'],['../structENetProtocolVerifyConnect.html#a9fe3b617861adb21aa4acb406859c10b',1,'ENetProtocolVerifyConnect::packetThrottleInterval()'],['../structENetProtocolThrottleConfigure.html#ab62b1b22576a8b68c0bb8b4d797eaf7c',1,'ENetProtocolThrottleConfigure::packetThrottleInterval()']]], + ['packetthrottlelimit',['packetThrottleLimit',['../structENetPeer.html#a107e1cb38566fa9c63ec57bae90ac0af',1,'ENetPeer']]], + ['peer',['peer',['../structENetEvent.html#a706a337b56e285825923d5b755f59b2d',1,'ENetEvent']]], + ['peer_2ec',['peer.c',['../peer_8c.html',1,'']]], + ['peercount',['peerCount',['../structENetHost.html#a7cb88cfe75cb49f48515a75d2f0fb229',1,'ENetHost']]], + ['peerid',['peerID',['../structENetProtocolHeader.html#a110eba85c372656c66be5e886a020056',1,'ENetProtocolHeader']]], + ['peers',['peers',['../structENetHost.html#a0be099c4d0f73090d4a39570e81d260c',1,'ENetHost']]], + ['ping',['ping',['../unionENetProtocol.html#a6c842dabc52deebce5a47e3ee921af8f',1,'ENetProtocol']]], + ['pinginterval',['pingInterval',['../structENetPeer.html#a1c00cd740b6493731607f0bf332bdeef',1,'ENetPeer']]], + ['port',['port',['../structENetAddress.html#afdbc3f833b9b3086401cfcfbd29b73e1',1,'ENetAddress']]], + ['previous',['previous',['../structENetListNode.html#addb71505730bc854435725d8f133b6e5',1,'ENetListNode']]], + ['protocol_2ec',['protocol.c',['../protocol_8c.html',1,'']]], + ['protocol_2eh',['protocol.h',['../protocol_8h.html',1,'']]] +]; diff --git a/enet server test/enet2/docs/html/search/all_d.html b/enet server test/enet2/docs/html/search/all_d.html new file mode 100644 index 0000000..97c55da --- /dev/null +++ b/enet server test/enet2/docs/html/search/all_d.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/enet server test/enet2/docs/html/search/all_d.js b/enet server test/enet2/docs/html/search/all_d.js new file mode 100644 index 0000000..757b9cb --- /dev/null +++ b/enet server test/enet2/docs/html/search/all_d.js @@ -0,0 +1,18 @@ +var searchData= +[ + ['randomseed',['randomSeed',['../structENetHost.html#aaacf0ed7ee6abc032af115ce451244ed',1,'ENetHost']]], + ['recalculatebandwidthlimits',['recalculateBandwidthLimits',['../structENetHost.html#abca5ad8b2fe208d0d4276a307d76274d',1,'ENetHost']]], + ['receivedaddress',['receivedAddress',['../structENetHost.html#a8cb3bbbb506d7bba7904e153f60d0652',1,'ENetHost']]], + ['receiveddata',['receivedData',['../structENetHost.html#a03f8068cd017b8b4c260008e7d4df814',1,'ENetHost']]], + ['receiveddatalength',['receivedDataLength',['../structENetHost.html#a394b5ea73e1706099e37b75448aa179e',1,'ENetHost']]], + ['receivedreliablesequencenumber',['receivedReliableSequenceNumber',['../structENetProtocolAcknowledge.html#a608f96836c614b75e15907405017919a',1,'ENetProtocolAcknowledge']]], + ['receivedsenttime',['receivedSentTime',['../structENetProtocolAcknowledge.html#a4c8955a168d4a105f77253ea925be3c0',1,'ENetProtocolAcknowledge']]], + ['referencecount',['referenceCount',['../structENetPacket.html#a1cf419779484e3df87a773a70d2799b5',1,'ENetPacket']]], + ['reliabledataintransit',['reliableDataInTransit',['../structENetPeer.html#a44527d582ff955199a60e0c86ba22083',1,'ENetPeer']]], + ['reliablesequencenumber',['reliableSequenceNumber',['../structENetOutgoingCommand.html#a9d96a527ebe1923495b57dcc98e75bdc',1,'ENetOutgoingCommand::reliableSequenceNumber()'],['../structENetIncomingCommand.html#a37143ef14d07f060455f9171e75d34b3',1,'ENetIncomingCommand::reliableSequenceNumber()'],['../structENetProtocolCommandHeader.html#a779c44d9f8b37cdc3e57ee10a807cb8d',1,'ENetProtocolCommandHeader::reliableSequenceNumber()']]], + ['reliablewindows',['reliableWindows',['../structENetChannel.html#a513b31028b7cfa6bc7a4457d4db16e1e',1,'ENetChannel']]], + ['roundtriptime',['roundTripTime',['../structENetPeer.html#a3b6841e4b9be13f9323a3c38ee9f2e6c',1,'ENetPeer']]], + ['roundtriptimeout',['roundTripTimeout',['../structENetOutgoingCommand.html#ad34b6b5da0ff9aea7e6f4f5260f9924d',1,'ENetOutgoingCommand']]], + ['roundtriptimeoutlimit',['roundTripTimeoutLimit',['../structENetOutgoingCommand.html#a6b213dacb4e8e58ca2d57d4f4352ceb2',1,'ENetOutgoingCommand']]], + ['roundtriptimevariance',['roundTripTimeVariance',['../structENetPeer.html#aa2599594c3b06b50a1338d20d837ef9c',1,'ENetPeer']]] +]; diff --git a/enet server test/enet2/docs/html/search/all_e.html b/enet server test/enet2/docs/html/search/all_e.html new file mode 100644 index 0000000..3afc519 --- /dev/null +++ b/enet server test/enet2/docs/html/search/all_e.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/enet server test/enet2/docs/html/search/all_e.js b/enet server test/enet2/docs/html/search/all_e.js new file mode 100644 index 0000000..36cea90 --- /dev/null +++ b/enet server test/enet2/docs/html/search/all_e.js @@ -0,0 +1,17 @@ +var searchData= +[ + ['sendattempts',['sendAttempts',['../structENetOutgoingCommand.html#adb428b139014687c745868b2a46aa770',1,'ENetOutgoingCommand']]], + ['sendfragment',['sendFragment',['../unionENetProtocol.html#a1be92704a9c17056c1640f8f1e103e8a',1,'ENetProtocol']]], + ['sendreliable',['sendReliable',['../unionENetProtocol.html#a2722ec166fe19d17b9fbaf94cd897045',1,'ENetProtocol']]], + ['sendunreliable',['sendUnreliable',['../unionENetProtocol.html#a874c8aa40663bcd3fd2fb36eaa2acbbc',1,'ENetProtocol']]], + ['sendunsequenced',['sendUnsequenced',['../unionENetProtocol.html#abe8585fb1b3fe8ee42c89040ef35163b',1,'ENetProtocol']]], + ['sentinel',['sentinel',['../structENetList.html#a937c404091ae544d6ad1cb90658e42f5',1,'ENetList']]], + ['sentreliablecommands',['sentReliableCommands',['../structENetPeer.html#a254aab87af572caf53276604ce38662b',1,'ENetPeer']]], + ['senttime',['sentTime',['../structENetAcknowledgement.html#aa6f84f5ac5ba50321caaeefbcde42bd5',1,'ENetAcknowledgement::sentTime()'],['../structENetOutgoingCommand.html#a2c44c1a53e3cc717bf441821fc6023e1',1,'ENetOutgoingCommand::sentTime()'],['../structENetProtocolHeader.html#a3d612f11fbf80d2054fdb057e49411a2',1,'ENetProtocolHeader::sentTime()']]], + ['sentunreliablecommands',['sentUnreliableCommands',['../structENetPeer.html#a3374032cb98420bc86a2e5d99b472945',1,'ENetPeer']]], + ['servicetime',['serviceTime',['../structENetHost.html#a1236e442f8574dae47f86d9856c7b1a5',1,'ENetHost']]], + ['socket',['socket',['../structENetHost.html#a98da7373531b664a5fe643840975235a',1,'ENetHost']]], + ['socklen_5ft',['socklen_t',['../unix_8c.html#a6b82106923cc13b3a9734520ecc29514',1,'unix.c']]], + ['startsequencenumber',['startSequenceNumber',['../structENetProtocolSendFragment.html#a35fa6de1d3f0ea9a21217185675a4423',1,'ENetProtocolSendFragment']]], + ['state',['state',['../structENetPeer.html#a10055b262695e80c6b2731294f08249e',1,'ENetPeer']]] +]; diff --git a/enet server test/enet2/docs/html/search/all_f.html b/enet server test/enet2/docs/html/search/all_f.html new file mode 100644 index 0000000..0e2f45e --- /dev/null +++ b/enet server test/enet2/docs/html/search/all_f.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/enet server test/enet2/docs/html/search/all_f.js b/enet server test/enet2/docs/html/search/all_f.js new file mode 100644 index 0000000..52038e3 --- /dev/null +++ b/enet server test/enet2/docs/html/search/all_f.js @@ -0,0 +1,18 @@ +var searchData= +[ + ['throttleconfigure',['throttleConfigure',['../unionENetProtocol.html#af441bb9c4bd62906414dbc0ed95a95af',1,'ENetProtocol']]], + ['time_2eh',['time.h',['../time_8h.html',1,'']]], + ['timeoutlimit',['timeoutLimit',['../structENetPeer.html#a0dffdc4600cfb98c43f698165eb24a85',1,'ENetPeer']]], + ['timeoutmaximum',['timeoutMaximum',['../structENetPeer.html#a01ac5a7c8a635609dfc50adde57e0971',1,'ENetPeer']]], + ['timeoutminimum',['timeoutMinimum',['../structENetPeer.html#a46079ab72717dd8f914a7329a4241ed8',1,'ENetPeer']]], + ['totallength',['totalLength',['../structENetProtocolSendFragment.html#a17a45b82152db01966fcabdd005c40b6',1,'ENetProtocolSendFragment']]], + ['totalreceiveddata',['totalReceivedData',['../structENetHost.html#aad1bc2d9190421e085610d2a096d36f6',1,'ENetHost']]], + ['totalreceivedpackets',['totalReceivedPackets',['../structENetHost.html#a285e93baae69adf885e4f9a8ed2a0aba',1,'ENetHost']]], + ['totalsentdata',['totalSentData',['../structENetHost.html#a48c842176994ebb4a10486ae780aed35',1,'ENetHost']]], + ['totalsentpackets',['totalSentPackets',['../structENetHost.html#abfd2ac9482c097b64417f21b7a40ccb1',1,'ENetHost']]], + ['totalwaitingdata',['totalWaitingData',['../structENetPeer.html#aa3cd5b8f33f63fe8b7ead5f692b49a11',1,'ENetPeer']]], + ['tutorial',['Tutorial',['../Tutorial.html',1,'']]], + ['tutorial_2edox',['tutorial.dox',['../tutorial_8dox.html',1,'']]], + ['type',['type',['../structENetEvent.html#ad54aa5e2f61ec1f6102cfe1d1d6883db',1,'ENetEvent']]], + ['types_2eh',['types.h',['../types_8h.html',1,'']]] +]; diff --git a/enet server test/enet2/docs/html/search/classes_0.html b/enet server test/enet2/docs/html/search/classes_0.html new file mode 100644 index 0000000..a7b6a28 --- /dev/null +++ b/enet server test/enet2/docs/html/search/classes_0.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/enet server test/enet2/docs/html/search/classes_0.js b/enet server test/enet2/docs/html/search/classes_0.js new file mode 100644 index 0000000..36ce90c --- /dev/null +++ b/enet server test/enet2/docs/html/search/classes_0.js @@ -0,0 +1,31 @@ +var searchData= +[ + ['enetacknowledgement',['ENetAcknowledgement',['../structENetAcknowledgement.html',1,'']]], + ['enetaddress',['ENetAddress',['../structENetAddress.html',1,'']]], + ['enetbuffer',['ENetBuffer',['../structENetBuffer.html',1,'']]], + ['enetcallbacks',['ENetCallbacks',['../structENetCallbacks.html',1,'']]], + ['enetchannel',['ENetChannel',['../structENetChannel.html',1,'']]], + ['enetcompressor',['ENetCompressor',['../structENetCompressor.html',1,'']]], + ['enetevent',['ENetEvent',['../structENetEvent.html',1,'']]], + ['enethost',['ENetHost',['../structENetHost.html',1,'']]], + ['enetincomingcommand',['ENetIncomingCommand',['../structENetIncomingCommand.html',1,'']]], + ['enetlist',['ENetList',['../structENetList.html',1,'']]], + ['enetlistnode',['ENetListNode',['../structENetListNode.html',1,'']]], + ['enetoutgoingcommand',['ENetOutgoingCommand',['../structENetOutgoingCommand.html',1,'']]], + ['enetpacket',['ENetPacket',['../structENetPacket.html',1,'']]], + ['enetpeer',['ENetPeer',['../structENetPeer.html',1,'']]], + ['enetprotocol',['ENetProtocol',['../unionENetProtocol.html',1,'']]], + ['enetprotocolacknowledge',['ENetProtocolAcknowledge',['../structENetProtocolAcknowledge.html',1,'']]], + ['enetprotocolbandwidthlimit',['ENetProtocolBandwidthLimit',['../structENetProtocolBandwidthLimit.html',1,'']]], + ['enetprotocolcommandheader',['ENetProtocolCommandHeader',['../structENetProtocolCommandHeader.html',1,'']]], + ['enetprotocolconnect',['ENetProtocolConnect',['../structENetProtocolConnect.html',1,'']]], + ['enetprotocoldisconnect',['ENetProtocolDisconnect',['../structENetProtocolDisconnect.html',1,'']]], + ['enetprotocolheader',['ENetProtocolHeader',['../structENetProtocolHeader.html',1,'']]], + ['enetprotocolping',['ENetProtocolPing',['../structENetProtocolPing.html',1,'']]], + ['enetprotocolsendfragment',['ENetProtocolSendFragment',['../structENetProtocolSendFragment.html',1,'']]], + ['enetprotocolsendreliable',['ENetProtocolSendReliable',['../structENetProtocolSendReliable.html',1,'']]], + ['enetprotocolsendunreliable',['ENetProtocolSendUnreliable',['../structENetProtocolSendUnreliable.html',1,'']]], + ['enetprotocolsendunsequenced',['ENetProtocolSendUnsequenced',['../structENetProtocolSendUnsequenced.html',1,'']]], + ['enetprotocolthrottleconfigure',['ENetProtocolThrottleConfigure',['../structENetProtocolThrottleConfigure.html',1,'']]], + ['enetprotocolverifyconnect',['ENetProtocolVerifyConnect',['../structENetProtocolVerifyConnect.html',1,'']]] +]; diff --git a/enet server test/enet2/docs/html/search/close.png b/enet server test/enet2/docs/html/search/close.png new file mode 100644 index 0000000000000000000000000000000000000000..9342d3dfeea7b7c4ee610987e717804b5a42ceb9 GIT binary patch literal 273 zcmV+s0q*{ZP)4(RlMby96)VwnbG{ zbe&}^BDn7x>$<{ck4zAK-=nT;=hHG)kmplIF${xqm8db3oX6wT3bvp`TE@m0cg;b) zBuSL}5?N7O(iZLdAlz@)b)Rd~DnSsSX&P5qC`XwuFwcAYLC+d2>+1(8on;wpt8QIC X2MT$R4iQDd00000NkvXXu0mjfia~GN literal 0 HcmV?d00001 diff --git a/enet server test/enet2/docs/html/search/defines_0.html b/enet server test/enet2/docs/html/search/defines_0.html new file mode 100644 index 0000000..a450861 --- /dev/null +++ b/enet server test/enet2/docs/html/search/defines_0.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/enet server test/enet2/docs/html/search/defines_0.js b/enet server test/enet2/docs/html/search/defines_0.js new file mode 100644 index 0000000..e2de54d --- /dev/null +++ b/enet server test/enet2/docs/html/search/defines_0.js @@ -0,0 +1,58 @@ +var searchData= +[ + ['enet_5fapi',['ENET_API',['../unix_8h.html#a687ffc6acf6d30c9ecde1b2ce209879c',1,'ENET_API(): unix.h'],['../win32_8h.html#a687ffc6acf6d30c9ecde1b2ce209879c',1,'ENET_API(): win32.h']]], + ['enet_5fbuffer_5fmaximum',['ENET_BUFFER_MAXIMUM',['../enet_8h.html#a4e71003e6043d745c1d69d0b35a76c1d',1,'enet.h']]], + ['enet_5fbuilding_5flib',['ENET_BUILDING_LIB',['../callbacks_8c.html#a0dc3ac14ddf12c81cb53d3e662ad277f',1,'ENET_BUILDING_LIB(): callbacks.c'],['../compress_8c.html#a0dc3ac14ddf12c81cb53d3e662ad277f',1,'ENET_BUILDING_LIB(): compress.c'],['../host_8c.html#a0dc3ac14ddf12c81cb53d3e662ad277f',1,'ENET_BUILDING_LIB(): host.c'],['../list_8c.html#a0dc3ac14ddf12c81cb53d3e662ad277f',1,'ENET_BUILDING_LIB(): list.c'],['../packet_8c.html#a0dc3ac14ddf12c81cb53d3e662ad277f',1,'ENET_BUILDING_LIB(): packet.c'],['../peer_8c.html#a0dc3ac14ddf12c81cb53d3e662ad277f',1,'ENET_BUILDING_LIB(): peer.c'],['../protocol_8c.html#a0dc3ac14ddf12c81cb53d3e662ad277f',1,'ENET_BUILDING_LIB(): protocol.c'],['../unix_8c.html#a0dc3ac14ddf12c81cb53d3e662ad277f',1,'ENET_BUILDING_LIB(): unix.c']]], + ['enet_5fcallback',['ENET_CALLBACK',['../unix_8h.html#a62eafc38d284aacbbd8f4104fdcd0cc2',1,'ENET_CALLBACK(): unix.h'],['../win32_8h.html#a62eafc38d284aacbbd8f4104fdcd0cc2',1,'ENET_CALLBACK(): win32.h']]], + ['enet_5fcontext_5fcreate',['ENET_CONTEXT_CREATE',['../compress_8c.html#ac93057a15bcc62c953f4a14bb51e36ab',1,'compress.c']]], + ['enet_5fcontext_5fdecode',['ENET_CONTEXT_DECODE',['../compress_8c.html#a0f6333d89acd57abfa3c6905bc8cd54f',1,'compress.c']]], + ['enet_5fcontext_5fencode',['ENET_CONTEXT_ENCODE',['../compress_8c.html#a5b69e49a77bdbc19af5e63d268bd97a6',1,'compress.c']]], + ['enet_5fcontext_5fnot_5fexcluded',['ENET_CONTEXT_NOT_EXCLUDED',['../compress_8c.html#ae8d689be11d1c8150e42dff17d7b539d',1,'compress.c']]], + ['enet_5fcontext_5frescale',['ENET_CONTEXT_RESCALE',['../compress_8c.html#a6f0ac783cced7c798e7c8dff174a9216',1,'compress.c']]], + ['enet_5fcontext_5froot_5fdecode',['ENET_CONTEXT_ROOT_DECODE',['../compress_8c.html#ae652387df7e1bc6b8208b4a81a975b6b',1,'compress.c']]], + ['enet_5fcontext_5ftry_5fdecode',['ENET_CONTEXT_TRY_DECODE',['../compress_8c.html#aeae00b4079592e90ba7183664b2b72cc',1,'compress.c']]], + ['enet_5fhost_5fany',['ENET_HOST_ANY',['../enet_8h.html#a8a8ff0155e0f7dabaaa466ff9b356d2c',1,'enet.h']]], + ['enet_5fhost_5fbroadcast',['ENET_HOST_BROADCAST',['../enet_8h.html#a18201db7744ba75106e92fe8bc31dff4',1,'enet.h']]], + ['enet_5fhost_5fto_5fnet_5f16',['ENET_HOST_TO_NET_16',['../unix_8h.html#a4ede48cf4612d407ac6b6f064e3117bc',1,'ENET_HOST_TO_NET_16(): unix.h'],['../win32_8h.html#a4ede48cf4612d407ac6b6f064e3117bc',1,'ENET_HOST_TO_NET_16(): win32.h']]], + ['enet_5fhost_5fto_5fnet_5f32',['ENET_HOST_TO_NET_32',['../unix_8h.html#a7bbe3d7e47fd45dda29c0e4a94abe131',1,'ENET_HOST_TO_NET_32(): unix.h'],['../win32_8h.html#a7bbe3d7e47fd45dda29c0e4a94abe131',1,'ENET_HOST_TO_NET_32(): win32.h']]], + ['enet_5flist_5fback',['enet_list_back',['../list_8h.html#a710564cc88022346cff26449ba20471e',1,'list.h']]], + ['enet_5flist_5fbegin',['enet_list_begin',['../list_8h.html#a5402e9c3c144aa928ae853b7833f5c00',1,'list.h']]], + ['enet_5flist_5fempty',['enet_list_empty',['../list_8h.html#ac81f07b1ef0e2212b021b03ad33eb839',1,'list.h']]], + ['enet_5flist_5fend',['enet_list_end',['../list_8h.html#aded7080e181e32442a5e98da1c1affb9',1,'list.h']]], + ['enet_5flist_5ffront',['enet_list_front',['../list_8h.html#ab7cab38a52203fee140cc2e0604288e7',1,'list.h']]], + ['enet_5flist_5fnext',['enet_list_next',['../list_8h.html#ae51acedd439dedee476c13194a407c22',1,'list.h']]], + ['enet_5flist_5fprevious',['enet_list_previous',['../list_8h.html#ab7c945078221dd5dd022c7b1fdc7c40b',1,'list.h']]], + ['enet_5fmax',['ENET_MAX',['../utility_8h.html#a33308de252f4ca21dda9d5f424c161a4',1,'utility.h']]], + ['enet_5fmin',['ENET_MIN',['../utility_8h.html#ac70cb927610f947d71c644bba7a6003f',1,'utility.h']]], + ['enet_5fnet_5fto_5fhost_5f16',['ENET_NET_TO_HOST_16',['../unix_8h.html#a75c464a36d2ebb47c6034a10c56eb4d1',1,'ENET_NET_TO_HOST_16(): unix.h'],['../win32_8h.html#a75c464a36d2ebb47c6034a10c56eb4d1',1,'ENET_NET_TO_HOST_16(): win32.h']]], + ['enet_5fnet_5fto_5fhost_5f32',['ENET_NET_TO_HOST_32',['../unix_8h.html#a6fdfe9a0019e06da5931f10263f14d59',1,'ENET_NET_TO_HOST_32(): unix.h'],['../win32_8h.html#a6fdfe9a0019e06da5931f10263f14d59',1,'ENET_NET_TO_HOST_32(): win32.h']]], + ['enet_5fpacked',['ENET_PACKED',['../protocol_8h.html#a63905653a9ae8e898ce2d81744a5432c',1,'protocol.h']]], + ['enet_5fport_5fany',['ENET_PORT_ANY',['../enet_8h.html#a40ac758f51b43b89c67fb30ab61a5d2c',1,'enet.h']]], + ['enet_5frange_5fcoder_5fdecode',['ENET_RANGE_CODER_DECODE',['../compress_8c.html#a5ac308df9a339045c5c38c30ae4d85c2',1,'compress.c']]], + ['enet_5frange_5fcoder_5fencode',['ENET_RANGE_CODER_ENCODE',['../compress_8c.html#a855aeedd7c5c454bdb555f215a951aa8',1,'compress.c']]], + ['enet_5frange_5fcoder_5fflush',['ENET_RANGE_CODER_FLUSH',['../compress_8c.html#af2239936c2029493fe2afa62c4053822',1,'compress.c']]], + ['enet_5frange_5fcoder_5ffree_5fsymbols',['ENET_RANGE_CODER_FREE_SYMBOLS',['../compress_8c.html#a2301e440c70ae35dfa29a6cf23e7acf3',1,'compress.c']]], + ['enet_5frange_5fcoder_5foutput',['ENET_RANGE_CODER_OUTPUT',['../compress_8c.html#a1124dee1efa3a8da8433a1ca6ee5907f',1,'compress.c']]], + ['enet_5frange_5fcoder_5fread',['ENET_RANGE_CODER_READ',['../compress_8c.html#a5948e10327214ba8bcdc7cc49b1cf761',1,'compress.c']]], + ['enet_5frange_5fcoder_5fseed',['ENET_RANGE_CODER_SEED',['../compress_8c.html#a04be80a8a2ad11320f683ffe98653afb',1,'compress.c']]], + ['enet_5fsocket_5fnull',['ENET_SOCKET_NULL',['../unix_8h.html#ab58ff95893f709c6db12b7fdd8cf0a6d',1,'ENET_SOCKET_NULL(): unix.h'],['../win32_8h.html#ab58ff95893f709c6db12b7fdd8cf0a6d',1,'ENET_SOCKET_NULL(): win32.h']]], + ['enet_5fsocketset_5fadd',['ENET_SOCKETSET_ADD',['../unix_8h.html#ad5003a9b55c900605b6a81ea37d382ee',1,'ENET_SOCKETSET_ADD(): unix.h'],['../win32_8h.html#ad5003a9b55c900605b6a81ea37d382ee',1,'ENET_SOCKETSET_ADD(): win32.h']]], + ['enet_5fsocketset_5fcheck',['ENET_SOCKETSET_CHECK',['../unix_8h.html#a455101a0de016782efa63810d47ee898',1,'ENET_SOCKETSET_CHECK(): unix.h'],['../win32_8h.html#a455101a0de016782efa63810d47ee898',1,'ENET_SOCKETSET_CHECK(): win32.h']]], + ['enet_5fsocketset_5fempty',['ENET_SOCKETSET_EMPTY',['../unix_8h.html#ada38c37a943326446cb4ba8be0b27469',1,'ENET_SOCKETSET_EMPTY(): unix.h'],['../win32_8h.html#ada38c37a943326446cb4ba8be0b27469',1,'ENET_SOCKETSET_EMPTY(): win32.h']]], + ['enet_5fsocketset_5fremove',['ENET_SOCKETSET_REMOVE',['../unix_8h.html#a3316bc3b3db9371322a549d8f87bc30a',1,'ENET_SOCKETSET_REMOVE(): unix.h'],['../win32_8h.html#a3316bc3b3db9371322a549d8f87bc30a',1,'ENET_SOCKETSET_REMOVE(): win32.h']]], + ['enet_5fsymbol_5fcreate',['ENET_SYMBOL_CREATE',['../compress_8c.html#a61f061433eedabacffa7c43b038d3528',1,'compress.c']]], + ['enet_5ftime_5fdifference',['ENET_TIME_DIFFERENCE',['../time_8h.html#a3ab2d1368b4746a545c50f582c106c19',1,'time.h']]], + ['enet_5ftime_5fgreater',['ENET_TIME_GREATER',['../time_8h.html#a30674ee131356c50c395e15b9954abc2',1,'time.h']]], + ['enet_5ftime_5fgreater_5fequal',['ENET_TIME_GREATER_EQUAL',['../time_8h.html#ab88132d5a389d8497dc1f21d453a1f1f',1,'time.h']]], + ['enet_5ftime_5fless',['ENET_TIME_LESS',['../time_8h.html#aafabe4183d73975e757d5d3875e589b0',1,'time.h']]], + ['enet_5ftime_5fless_5fequal',['ENET_TIME_LESS_EQUAL',['../time_8h.html#abe1820f47efd2b138c4720a1a847ea04',1,'time.h']]], + ['enet_5ftime_5foverflow',['ENET_TIME_OVERFLOW',['../time_8h.html#af88e4a88dc80495600167014aa643714',1,'time.h']]], + ['enet_5fversion',['ENET_VERSION',['../enet_8h.html#aefb355eb62b5a7096faf91b3134e9016',1,'enet.h']]], + ['enet_5fversion_5fcreate',['ENET_VERSION_CREATE',['../enet_8h.html#ab3ebd57b901e14fa1ff745b0472ea786',1,'enet.h']]], + ['enet_5fversion_5fget_5fmajor',['ENET_VERSION_GET_MAJOR',['../enet_8h.html#a96ee2dd70919cda130284c640baeb3ba',1,'enet.h']]], + ['enet_5fversion_5fget_5fminor',['ENET_VERSION_GET_MINOR',['../enet_8h.html#aeb13b6da40a166446af5ab55dc8900b9',1,'enet.h']]], + ['enet_5fversion_5fget_5fpatch',['ENET_VERSION_GET_PATCH',['../enet_8h.html#a490e36f7af45f123cfa64d29209555ad',1,'enet.h']]], + ['enet_5fversion_5fmajor',['ENET_VERSION_MAJOR',['../enet_8h.html#ab7ed937c2db14ba2efb15c6a1626942a',1,'enet.h']]], + ['enet_5fversion_5fminor',['ENET_VERSION_MINOR',['../enet_8h.html#a7e3fba7774ffbf6f095c7c1c643db823',1,'enet.h']]], + ['enet_5fversion_5fpatch',['ENET_VERSION_PATCH',['../enet_8h.html#a7e08f37772431845fe118f9a87bebda2',1,'enet.h']]] +]; diff --git a/enet server test/enet2/docs/html/search/defines_1.html b/enet server test/enet2/docs/html/search/defines_1.html new file mode 100644 index 0000000..31100f0 --- /dev/null +++ b/enet server test/enet2/docs/html/search/defines_1.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/enet server test/enet2/docs/html/search/defines_1.js b/enet server test/enet2/docs/html/search/defines_1.js new file mode 100644 index 0000000..98835a7 --- /dev/null +++ b/enet server test/enet2/docs/html/search/defines_1.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['msg_5fnosignal',['MSG_NOSIGNAL',['../unix_8c.html#a9f55d0e90dc8cc6b2287312435cdde48',1,'unix.c']]] +]; diff --git a/enet server test/enet2/docs/html/search/enums_0.html b/enet server test/enet2/docs/html/search/enums_0.html new file mode 100644 index 0000000..3242db7 --- /dev/null +++ b/enet server test/enet2/docs/html/search/enums_0.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/enet server test/enet2/docs/html/search/enums_0.js b/enet server test/enet2/docs/html/search/enums_0.js new file mode 100644 index 0000000..7408955 --- /dev/null +++ b/enet server test/enet2/docs/html/search/enums_0.js @@ -0,0 +1,12 @@ +var searchData= +[ + ['eneteventtype',['ENetEventType',['../enet_8h.html#adc5336f0698d4336b587f083d89df414',1,'enet.h']]], + ['enetpacketflag',['ENetPacketFlag',['../enet_8h.html#a38c59a481ed607b07d63b7bc3e88ca98',1,'enet.h']]], + ['enetpeerstate',['ENetPeerState',['../enet_8h.html#a058bc368c507eb86cb47f3946f38d558',1,'enet.h']]], + ['enetprotocolcommand',['ENetProtocolCommand',['../protocol_8h.html#aae6d1b7a85de28aa0c618952db07391a',1,'protocol.h']]], + ['enetprotocolflag',['ENetProtocolFlag',['../protocol_8h.html#a8dec42a2851e4465d585cfc93c1f9bab',1,'protocol.h']]], + ['enetsocketoption',['ENetSocketOption',['../enet_8h.html#aeca7102ede4e9b902a7bb5cdd52e9952',1,'enet.h']]], + ['enetsocketshutdown',['ENetSocketShutdown',['../enet_8h.html#ae8d8283919ba7d336428cae4a97ce255',1,'enet.h']]], + ['enetsockettype',['ENetSocketType',['../enet_8h.html#a373a18cfd61d7857612d6870ce15031a',1,'enet.h']]], + ['enetsocketwait',['ENetSocketWait',['../enet_8h.html#ad5d59a7fd69cb12c88e349b6a40b7957',1,'enet.h']]] +]; diff --git a/enet server test/enet2/docs/html/search/enumvalues_0.html b/enet server test/enet2/docs/html/search/enumvalues_0.html new file mode 100644 index 0000000..3e216ae --- /dev/null +++ b/enet server test/enet2/docs/html/search/enumvalues_0.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/enet server test/enet2/docs/html/search/enumvalues_0.js b/enet server test/enet2/docs/html/search/enumvalues_0.js new file mode 100644 index 0000000..6848784 --- /dev/null +++ b/enet server test/enet2/docs/html/search/enumvalues_0.js @@ -0,0 +1,105 @@ +var searchData= +[ + ['enet_5fcontext_5fescape_5fminimum',['ENET_CONTEXT_ESCAPE_MINIMUM',['../compress_8c.html#a06fc87d81c62e9abb8790b6e5713c55bae3b5f2df3031e1caae58f971febfe8c6',1,'compress.c']]], + ['enet_5fcontext_5fsymbol_5fdelta',['ENET_CONTEXT_SYMBOL_DELTA',['../compress_8c.html#a06fc87d81c62e9abb8790b6e5713c55ba356a4ba43cd830d53e7bc4d5c8f47639',1,'compress.c']]], + ['enet_5fcontext_5fsymbol_5fminimum',['ENET_CONTEXT_SYMBOL_MINIMUM',['../compress_8c.html#a06fc87d81c62e9abb8790b6e5713c55ba577a1044e503e97e43bd2b6015276f7a',1,'compress.c']]], + ['enet_5fevent_5ftype_5fconnect',['ENET_EVENT_TYPE_CONNECT',['../enet_8h.html#adc5336f0698d4336b587f083d89df414aefd9fa36297e41ca4c1cbcfdeb7e4a9d',1,'enet.h']]], + ['enet_5fevent_5ftype_5fdisconnect',['ENET_EVENT_TYPE_DISCONNECT',['../enet_8h.html#adc5336f0698d4336b587f083d89df414a4fa47af84cf901810510aeba077a1c2f',1,'enet.h']]], + ['enet_5fevent_5ftype_5fnone',['ENET_EVENT_TYPE_NONE',['../enet_8h.html#adc5336f0698d4336b587f083d89df414ad76c1d9192a5c6ac60a3820e3d7379c5',1,'enet.h']]], + ['enet_5fevent_5ftype_5freceive',['ENET_EVENT_TYPE_RECEIVE',['../enet_8h.html#adc5336f0698d4336b587f083d89df414a67d928ca38b289db53ec9f56c91c5d9d',1,'enet.h']]], + ['enet_5fhost_5fbandwidth_5fthrottle_5finterval',['ENET_HOST_BANDWIDTH_THROTTLE_INTERVAL',['../enet_8h.html#adf764cbdea00d65edcd07bb9953ad2b7adf3c219f758a082c1f4f6f59599b3ff3',1,'enet.h']]], + ['enet_5fhost_5fdefault_5fmaximum_5fpacket_5fsize',['ENET_HOST_DEFAULT_MAXIMUM_PACKET_SIZE',['../enet_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a4bdf580ff95da2d605141f588a5bd970',1,'enet.h']]], + ['enet_5fhost_5fdefault_5fmaximum_5fwaiting_5fdata',['ENET_HOST_DEFAULT_MAXIMUM_WAITING_DATA',['../enet_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a4352693dd664b7e02a8cee993b263503',1,'enet.h']]], + ['enet_5fhost_5fdefault_5fmtu',['ENET_HOST_DEFAULT_MTU',['../enet_8h.html#adf764cbdea00d65edcd07bb9953ad2b7aae25936a3a499977d2c31eb79e8b07b5',1,'enet.h']]], + ['enet_5fhost_5freceive_5fbuffer_5fsize',['ENET_HOST_RECEIVE_BUFFER_SIZE',['../enet_8h.html#adf764cbdea00d65edcd07bb9953ad2b7acabb86f776302885be047cadeb8ca9c9',1,'enet.h']]], + ['enet_5fhost_5fsend_5fbuffer_5fsize',['ENET_HOST_SEND_BUFFER_SIZE',['../enet_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a3433cf1cb6e848fde8d0aeb1c4ba1d74',1,'enet.h']]], + ['enet_5fpacket_5fflag_5fno_5fallocate',['ENET_PACKET_FLAG_NO_ALLOCATE',['../enet_8h.html#a38c59a481ed607b07d63b7bc3e88ca98aa6ce462752c36aad22e68ebefac3df8c',1,'enet.h']]], + ['enet_5fpacket_5fflag_5freliable',['ENET_PACKET_FLAG_RELIABLE',['../enet_8h.html#a38c59a481ed607b07d63b7bc3e88ca98aab20e7088245ab2ddb7f11dcc9433738',1,'enet.h']]], + ['enet_5fpacket_5fflag_5fsent',['ENET_PACKET_FLAG_SENT',['../enet_8h.html#a38c59a481ed607b07d63b7bc3e88ca98a57b64ab5cfbeb1ecbcd7f10429c79771',1,'enet.h']]], + ['enet_5fpacket_5fflag_5funreliable_5ffragment',['ENET_PACKET_FLAG_UNRELIABLE_FRAGMENT',['../enet_8h.html#a38c59a481ed607b07d63b7bc3e88ca98a7f79cd86eacd2543d6cde2eeccea995e',1,'enet.h']]], + ['enet_5fpacket_5fflag_5funsequenced',['ENET_PACKET_FLAG_UNSEQUENCED',['../enet_8h.html#a38c59a481ed607b07d63b7bc3e88ca98ad230cc769ef9cc4c7c582b28f9c443fe',1,'enet.h']]], + ['enet_5fpeer_5fdefault_5fpacket_5fthrottle',['ENET_PEER_DEFAULT_PACKET_THROTTLE',['../enet_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a942706f6907036990879356c326b841b',1,'enet.h']]], + ['enet_5fpeer_5fdefault_5fround_5ftrip_5ftime',['ENET_PEER_DEFAULT_ROUND_TRIP_TIME',['../enet_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a40ce91234c8b5f5c3eefd46dbcff5500',1,'enet.h']]], + ['enet_5fpeer_5ffree_5freliable_5fwindows',['ENET_PEER_FREE_RELIABLE_WINDOWS',['../enet_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a7832df0715244d1e6bf8429947fc6c3c',1,'enet.h']]], + ['enet_5fpeer_5ffree_5funsequenced_5fwindows',['ENET_PEER_FREE_UNSEQUENCED_WINDOWS',['../enet_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a3f58eb302a31219463b1c245f6944ad5',1,'enet.h']]], + ['enet_5fpeer_5fpacket_5floss_5finterval',['ENET_PEER_PACKET_LOSS_INTERVAL',['../enet_8h.html#adf764cbdea00d65edcd07bb9953ad2b7aad134db9a75b39b255219d5f6a399810',1,'enet.h']]], + ['enet_5fpeer_5fpacket_5floss_5fscale',['ENET_PEER_PACKET_LOSS_SCALE',['../enet_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a5fc83d82939f51ebdcea0691447c6ed6',1,'enet.h']]], + ['enet_5fpeer_5fpacket_5fthrottle_5facceleration',['ENET_PEER_PACKET_THROTTLE_ACCELERATION',['../enet_8h.html#adf764cbdea00d65edcd07bb9953ad2b7abd626c31a232adc5978c19243aec3581',1,'enet.h']]], + ['enet_5fpeer_5fpacket_5fthrottle_5fcounter',['ENET_PEER_PACKET_THROTTLE_COUNTER',['../enet_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a1cdada89bb957eb737cff94292815d7e',1,'enet.h']]], + ['enet_5fpeer_5fpacket_5fthrottle_5fdeceleration',['ENET_PEER_PACKET_THROTTLE_DECELERATION',['../enet_8h.html#adf764cbdea00d65edcd07bb9953ad2b7aa37a8f89851cc3487ffd0ef57057f86f',1,'enet.h']]], + ['enet_5fpeer_5fpacket_5fthrottle_5finterval',['ENET_PEER_PACKET_THROTTLE_INTERVAL',['../enet_8h.html#adf764cbdea00d65edcd07bb9953ad2b7af0fe83f2a36d771f9145623931dd3a5b',1,'enet.h']]], + ['enet_5fpeer_5fpacket_5fthrottle_5fscale',['ENET_PEER_PACKET_THROTTLE_SCALE',['../enet_8h.html#adf764cbdea00d65edcd07bb9953ad2b7ac6fb03e1119b12dfa06be919183f7148',1,'enet.h']]], + ['enet_5fpeer_5fping_5finterval',['ENET_PEER_PING_INTERVAL',['../enet_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a3c29ea256c292ab762cbbb28690d555f',1,'enet.h']]], + ['enet_5fpeer_5freliable_5fwindow_5fsize',['ENET_PEER_RELIABLE_WINDOW_SIZE',['../enet_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a3e65d0c04c87cbf5c5ba8784d54dcf35',1,'enet.h']]], + ['enet_5fpeer_5freliable_5fwindows',['ENET_PEER_RELIABLE_WINDOWS',['../enet_8h.html#adf764cbdea00d65edcd07bb9953ad2b7aea487e7016a1ebc59e865c2033eb02a2',1,'enet.h']]], + ['enet_5fpeer_5fstate_5facknowledging_5fconnect',['ENET_PEER_STATE_ACKNOWLEDGING_CONNECT',['../enet_8h.html#a058bc368c507eb86cb47f3946f38d558a2d7c685fd03fd11f20d85ab70be09b71',1,'enet.h']]], + ['enet_5fpeer_5fstate_5facknowledging_5fdisconnect',['ENET_PEER_STATE_ACKNOWLEDGING_DISCONNECT',['../enet_8h.html#a058bc368c507eb86cb47f3946f38d558a7fb55550df829139f6d4221fec863200',1,'enet.h']]], + ['enet_5fpeer_5fstate_5fconnected',['ENET_PEER_STATE_CONNECTED',['../enet_8h.html#a058bc368c507eb86cb47f3946f38d558ab60108c026e0be94719f2a6dd976d837',1,'enet.h']]], + ['enet_5fpeer_5fstate_5fconnecting',['ENET_PEER_STATE_CONNECTING',['../enet_8h.html#a058bc368c507eb86cb47f3946f38d558ac1202673f6581f07b312e93e9ceb9f1c',1,'enet.h']]], + ['enet_5fpeer_5fstate_5fconnection_5fpending',['ENET_PEER_STATE_CONNECTION_PENDING',['../enet_8h.html#a058bc368c507eb86cb47f3946f38d558a9cb05986b3d5280450598fd5ea999bc9',1,'enet.h']]], + ['enet_5fpeer_5fstate_5fconnection_5fsucceeded',['ENET_PEER_STATE_CONNECTION_SUCCEEDED',['../enet_8h.html#a058bc368c507eb86cb47f3946f38d558aa06f79074cbacbbf28554b8fff5806b9',1,'enet.h']]], + ['enet_5fpeer_5fstate_5fdisconnect_5flater',['ENET_PEER_STATE_DISCONNECT_LATER',['../enet_8h.html#a058bc368c507eb86cb47f3946f38d558a4915aae46a24ba6f2d0b770464681d09',1,'enet.h']]], + ['enet_5fpeer_5fstate_5fdisconnected',['ENET_PEER_STATE_DISCONNECTED',['../enet_8h.html#a058bc368c507eb86cb47f3946f38d558a0c8fc79545935a94ce297543fa8ae072',1,'enet.h']]], + ['enet_5fpeer_5fstate_5fdisconnecting',['ENET_PEER_STATE_DISCONNECTING',['../enet_8h.html#a058bc368c507eb86cb47f3946f38d558ab64c1ace457d5539c0b06297c1f4d05d',1,'enet.h']]], + ['enet_5fpeer_5fstate_5fzombie',['ENET_PEER_STATE_ZOMBIE',['../enet_8h.html#a058bc368c507eb86cb47f3946f38d558a4e38a788b4c1b83f183e5f9524658a6c',1,'enet.h']]], + ['enet_5fpeer_5ftimeout_5flimit',['ENET_PEER_TIMEOUT_LIMIT',['../enet_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a9af311f55d4447c4db77307a29c6c1bb',1,'enet.h']]], + ['enet_5fpeer_5ftimeout_5fmaximum',['ENET_PEER_TIMEOUT_MAXIMUM',['../enet_8h.html#adf764cbdea00d65edcd07bb9953ad2b7aac59883919ef255fae349891e6095763',1,'enet.h']]], + ['enet_5fpeer_5ftimeout_5fminimum',['ENET_PEER_TIMEOUT_MINIMUM',['../enet_8h.html#adf764cbdea00d65edcd07bb9953ad2b7aaba0181e517ebd910e10f46c3cf4391c',1,'enet.h']]], + ['enet_5fpeer_5funsequenced_5fwindow_5fsize',['ENET_PEER_UNSEQUENCED_WINDOW_SIZE',['../enet_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a603d7c227b9ce57db00652d71bdf0d11',1,'enet.h']]], + ['enet_5fpeer_5funsequenced_5fwindows',['ENET_PEER_UNSEQUENCED_WINDOWS',['../enet_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a970159e111f9f3ada8b89a539ae101bb',1,'enet.h']]], + ['enet_5fpeer_5fwindow_5fsize_5fscale',['ENET_PEER_WINDOW_SIZE_SCALE',['../enet_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a89e252c3209a81929d8543749d3dbb48',1,'enet.h']]], + ['enet_5fprotocol_5fcommand_5facknowledge',['ENET_PROTOCOL_COMMAND_ACKNOWLEDGE',['../protocol_8h.html#aae6d1b7a85de28aa0c618952db07391aab2b88de4d1e9eacba43b8f0a1437372a',1,'protocol.h']]], + ['enet_5fprotocol_5fcommand_5fbandwidth_5flimit',['ENET_PROTOCOL_COMMAND_BANDWIDTH_LIMIT',['../protocol_8h.html#aae6d1b7a85de28aa0c618952db07391aa65d5b42df0e6e10888b27cb336beb9a3',1,'protocol.h']]], + ['enet_5fprotocol_5fcommand_5fconnect',['ENET_PROTOCOL_COMMAND_CONNECT',['../protocol_8h.html#aae6d1b7a85de28aa0c618952db07391aa2336781c45afea926c076d974917346f',1,'protocol.h']]], + ['enet_5fprotocol_5fcommand_5fcount',['ENET_PROTOCOL_COMMAND_COUNT',['../protocol_8h.html#aae6d1b7a85de28aa0c618952db07391aa70a573b3631949a5ca21acc2da33b5bf',1,'protocol.h']]], + ['enet_5fprotocol_5fcommand_5fdisconnect',['ENET_PROTOCOL_COMMAND_DISCONNECT',['../protocol_8h.html#aae6d1b7a85de28aa0c618952db07391aa4e7a040f62c5ab44ef689c2197fd9eb9',1,'protocol.h']]], + ['enet_5fprotocol_5fcommand_5fflag_5facknowledge',['ENET_PROTOCOL_COMMAND_FLAG_ACKNOWLEDGE',['../protocol_8h.html#a8dec42a2851e4465d585cfc93c1f9babae5e91563c251f0a197d31dcb684d1f74',1,'protocol.h']]], + ['enet_5fprotocol_5fcommand_5fflag_5funsequenced',['ENET_PROTOCOL_COMMAND_FLAG_UNSEQUENCED',['../protocol_8h.html#a8dec42a2851e4465d585cfc93c1f9babad8d96a89ef5f7d759d897aa96d1d035f',1,'protocol.h']]], + ['enet_5fprotocol_5fcommand_5fmask',['ENET_PROTOCOL_COMMAND_MASK',['../protocol_8h.html#aae6d1b7a85de28aa0c618952db07391aaa4a30460085f59f2dc2e1f21ef4ffd6e',1,'protocol.h']]], + ['enet_5fprotocol_5fcommand_5fnone',['ENET_PROTOCOL_COMMAND_NONE',['../protocol_8h.html#aae6d1b7a85de28aa0c618952db07391aa4dc71fe0cf188b510d196ab59c12e6da',1,'protocol.h']]], + ['enet_5fprotocol_5fcommand_5fping',['ENET_PROTOCOL_COMMAND_PING',['../protocol_8h.html#aae6d1b7a85de28aa0c618952db07391aa0bb31baca199c3896b5681f229ec6e52',1,'protocol.h']]], + ['enet_5fprotocol_5fcommand_5fsend_5ffragment',['ENET_PROTOCOL_COMMAND_SEND_FRAGMENT',['../protocol_8h.html#aae6d1b7a85de28aa0c618952db07391aaeb83c1aca4a19b441062b35d90cdca99',1,'protocol.h']]], + ['enet_5fprotocol_5fcommand_5fsend_5freliable',['ENET_PROTOCOL_COMMAND_SEND_RELIABLE',['../protocol_8h.html#aae6d1b7a85de28aa0c618952db07391aa4b9f350268e39bc8234fe271d399b0e9',1,'protocol.h']]], + ['enet_5fprotocol_5fcommand_5fsend_5funreliable',['ENET_PROTOCOL_COMMAND_SEND_UNRELIABLE',['../protocol_8h.html#aae6d1b7a85de28aa0c618952db07391aa5919b3715d5a266abf45082a64117559',1,'protocol.h']]], + ['enet_5fprotocol_5fcommand_5fsend_5funreliable_5ffragment',['ENET_PROTOCOL_COMMAND_SEND_UNRELIABLE_FRAGMENT',['../protocol_8h.html#aae6d1b7a85de28aa0c618952db07391aa429c339ff98d5f7e26dd9cb03aa92fa9',1,'protocol.h']]], + ['enet_5fprotocol_5fcommand_5fsend_5funsequenced',['ENET_PROTOCOL_COMMAND_SEND_UNSEQUENCED',['../protocol_8h.html#aae6d1b7a85de28aa0c618952db07391aa4032318ed3e26bb9d1df59744cfbc9fb',1,'protocol.h']]], + ['enet_5fprotocol_5fcommand_5fthrottle_5fconfigure',['ENET_PROTOCOL_COMMAND_THROTTLE_CONFIGURE',['../protocol_8h.html#aae6d1b7a85de28aa0c618952db07391aab69ed3734e5050e0b6246e7cb28bb01a',1,'protocol.h']]], + ['enet_5fprotocol_5fcommand_5fverify_5fconnect',['ENET_PROTOCOL_COMMAND_VERIFY_CONNECT',['../protocol_8h.html#aae6d1b7a85de28aa0c618952db07391aa397412e0f0f71070a3f79d4204c7a3a8',1,'protocol.h']]], + ['enet_5fprotocol_5fheader_5fflag_5fcompressed',['ENET_PROTOCOL_HEADER_FLAG_COMPRESSED',['../protocol_8h.html#a8dec42a2851e4465d585cfc93c1f9baba227c09a85bbcba2c0813b1a5e2eb8870',1,'protocol.h']]], + ['enet_5fprotocol_5fheader_5fflag_5fmask',['ENET_PROTOCOL_HEADER_FLAG_MASK',['../protocol_8h.html#a8dec42a2851e4465d585cfc93c1f9babae00c09f44b712c4cf4a5b8af69d0c42c',1,'protocol.h']]], + ['enet_5fprotocol_5fheader_5fflag_5fsent_5ftime',['ENET_PROTOCOL_HEADER_FLAG_SENT_TIME',['../protocol_8h.html#a8dec42a2851e4465d585cfc93c1f9babab67fc70d486eab71a4dc87950b312c3c',1,'protocol.h']]], + ['enet_5fprotocol_5fheader_5fsession_5fmask',['ENET_PROTOCOL_HEADER_SESSION_MASK',['../protocol_8h.html#a8dec42a2851e4465d585cfc93c1f9baba3579038f4f89f4281104329f0f2279a6',1,'protocol.h']]], + ['enet_5fprotocol_5fheader_5fsession_5fshift',['ENET_PROTOCOL_HEADER_SESSION_SHIFT',['../protocol_8h.html#a8dec42a2851e4465d585cfc93c1f9baba6474ddbb75b8083170afdc5377f214c6',1,'protocol.h']]], + ['enet_5fprotocol_5fmaximum_5fchannel_5fcount',['ENET_PROTOCOL_MAXIMUM_CHANNEL_COUNT',['../protocol_8h.html#a99fb83031ce9923c84392b4e92f956b5ab5dbabc8177a41de59eef5fc41846f74',1,'protocol.h']]], + ['enet_5fprotocol_5fmaximum_5ffragment_5fcount',['ENET_PROTOCOL_MAXIMUM_FRAGMENT_COUNT',['../protocol_8h.html#a99fb83031ce9923c84392b4e92f956b5a95a4ea5ae46f122d281dd649e89ef867',1,'protocol.h']]], + ['enet_5fprotocol_5fmaximum_5fmtu',['ENET_PROTOCOL_MAXIMUM_MTU',['../protocol_8h.html#a99fb83031ce9923c84392b4e92f956b5abbb6bb2b32e543e21066147c4ff9bc29',1,'protocol.h']]], + ['enet_5fprotocol_5fmaximum_5fpacket_5fcommands',['ENET_PROTOCOL_MAXIMUM_PACKET_COMMANDS',['../protocol_8h.html#a99fb83031ce9923c84392b4e92f956b5ac6cff524487dc3564598fac9e93f08b9',1,'protocol.h']]], + ['enet_5fprotocol_5fmaximum_5fpeer_5fid',['ENET_PROTOCOL_MAXIMUM_PEER_ID',['../protocol_8h.html#a99fb83031ce9923c84392b4e92f956b5a34ddc9143699c74e171d19c590935ae2',1,'protocol.h']]], + ['enet_5fprotocol_5fmaximum_5fwindow_5fsize',['ENET_PROTOCOL_MAXIMUM_WINDOW_SIZE',['../protocol_8h.html#a99fb83031ce9923c84392b4e92f956b5a6daff8ed53d03340922c6ae816a16a8f',1,'protocol.h']]], + ['enet_5fprotocol_5fminimum_5fchannel_5fcount',['ENET_PROTOCOL_MINIMUM_CHANNEL_COUNT',['../protocol_8h.html#a99fb83031ce9923c84392b4e92f956b5a65618194fde673df13858a2f86fa655c',1,'protocol.h']]], + ['enet_5fprotocol_5fminimum_5fmtu',['ENET_PROTOCOL_MINIMUM_MTU',['../protocol_8h.html#a99fb83031ce9923c84392b4e92f956b5af7c12ab8b05f514e867e5c37b5d16a48',1,'protocol.h']]], + ['enet_5fprotocol_5fminimum_5fwindow_5fsize',['ENET_PROTOCOL_MINIMUM_WINDOW_SIZE',['../protocol_8h.html#a99fb83031ce9923c84392b4e92f956b5a9faf12056e4403844a25bab2ccda4dd2',1,'protocol.h']]], + ['enet_5frange_5fcoder_5fbottom',['ENET_RANGE_CODER_BOTTOM',['../compress_8c.html#a06fc87d81c62e9abb8790b6e5713c55babf48e05bfa4454931cbbfc9ec99e9eef',1,'compress.c']]], + ['enet_5frange_5fcoder_5ftop',['ENET_RANGE_CODER_TOP',['../compress_8c.html#a06fc87d81c62e9abb8790b6e5713c55ba72b69f7e7b9ba89cf6dc9de719109e0f',1,'compress.c']]], + ['enet_5fsocket_5fshutdown_5fread',['ENET_SOCKET_SHUTDOWN_READ',['../enet_8h.html#ae8d8283919ba7d336428cae4a97ce255aa6ead1077946d4d7c4faaf115200e0b0',1,'enet.h']]], + ['enet_5fsocket_5fshutdown_5fread_5fwrite',['ENET_SOCKET_SHUTDOWN_READ_WRITE',['../enet_8h.html#ae8d8283919ba7d336428cae4a97ce255ad2b55e1ae670f1dbcca38aef0965336a',1,'enet.h']]], + ['enet_5fsocket_5fshutdown_5fwrite',['ENET_SOCKET_SHUTDOWN_WRITE',['../enet_8h.html#ae8d8283919ba7d336428cae4a97ce255ac46ae711fba839e7591119518b58361d',1,'enet.h']]], + ['enet_5fsocket_5ftype_5fdatagram',['ENET_SOCKET_TYPE_DATAGRAM',['../enet_8h.html#a373a18cfd61d7857612d6870ce15031aa135a3b509fc7bd3dfb4e217f629ff62a',1,'enet.h']]], + ['enet_5fsocket_5ftype_5fstream',['ENET_SOCKET_TYPE_STREAM',['../enet_8h.html#a373a18cfd61d7857612d6870ce15031aa2302d51fcd8de353dd72e19f4f11533a',1,'enet.h']]], + ['enet_5fsocket_5fwait_5finterrupt',['ENET_SOCKET_WAIT_INTERRUPT',['../enet_8h.html#ad5d59a7fd69cb12c88e349b6a40b7957ab5f4d2fdce39ad6ab2003b08f8174667',1,'enet.h']]], + ['enet_5fsocket_5fwait_5fnone',['ENET_SOCKET_WAIT_NONE',['../enet_8h.html#ad5d59a7fd69cb12c88e349b6a40b7957af6e6fd0def303f2dc162b1ca45ffe194',1,'enet.h']]], + ['enet_5fsocket_5fwait_5freceive',['ENET_SOCKET_WAIT_RECEIVE',['../enet_8h.html#ad5d59a7fd69cb12c88e349b6a40b7957aed6d2ac96d04069a9d76181353086d87',1,'enet.h']]], + ['enet_5fsocket_5fwait_5fsend',['ENET_SOCKET_WAIT_SEND',['../enet_8h.html#ad5d59a7fd69cb12c88e349b6a40b7957ac8622c6886c2239461b2fd7f1a84cead',1,'enet.h']]], + ['enet_5fsockopt_5fbroadcast',['ENET_SOCKOPT_BROADCAST',['../enet_8h.html#aeca7102ede4e9b902a7bb5cdd52e9952a55531de7a8c5ef2b2f51448a7741cd2d',1,'enet.h']]], + ['enet_5fsockopt_5ferror',['ENET_SOCKOPT_ERROR',['../enet_8h.html#aeca7102ede4e9b902a7bb5cdd52e9952a77b595080059599deadb6f1c7afefa09',1,'enet.h']]], + ['enet_5fsockopt_5fnodelay',['ENET_SOCKOPT_NODELAY',['../enet_8h.html#aeca7102ede4e9b902a7bb5cdd52e9952a1c3e428e0152f1c49156b0f6497b28a5',1,'enet.h']]], + ['enet_5fsockopt_5fnonblock',['ENET_SOCKOPT_NONBLOCK',['../enet_8h.html#aeca7102ede4e9b902a7bb5cdd52e9952ad396a78d066594e35821b30130ed720b',1,'enet.h']]], + ['enet_5fsockopt_5frcvbuf',['ENET_SOCKOPT_RCVBUF',['../enet_8h.html#aeca7102ede4e9b902a7bb5cdd52e9952a799e801287626218a7b4d49a827f21a5',1,'enet.h']]], + ['enet_5fsockopt_5frcvtimeo',['ENET_SOCKOPT_RCVTIMEO',['../enet_8h.html#aeca7102ede4e9b902a7bb5cdd52e9952acfc40bf7ecc8d7b1237c5a6c86706c29',1,'enet.h']]], + ['enet_5fsockopt_5freuseaddr',['ENET_SOCKOPT_REUSEADDR',['../enet_8h.html#aeca7102ede4e9b902a7bb5cdd52e9952a8aebd43abeafbef5670e8c6bb42cc3c3',1,'enet.h']]], + ['enet_5fsockopt_5fsndbuf',['ENET_SOCKOPT_SNDBUF',['../enet_8h.html#aeca7102ede4e9b902a7bb5cdd52e9952a4809273647a22c8315f5f70f21468897',1,'enet.h']]], + ['enet_5fsockopt_5fsndtimeo',['ENET_SOCKOPT_SNDTIMEO',['../enet_8h.html#aeca7102ede4e9b902a7bb5cdd52e9952a4b0e6f9fe1a75bb4d98fb665b2de3268',1,'enet.h']]], + ['enet_5fsubcontext_5fescape_5fdelta',['ENET_SUBCONTEXT_ESCAPE_DELTA',['../compress_8c.html#a06fc87d81c62e9abb8790b6e5713c55ba286fdf2dc8adedb1d8f6f14f1872ebe1',1,'compress.c']]], + ['enet_5fsubcontext_5forder',['ENET_SUBCONTEXT_ORDER',['../compress_8c.html#a06fc87d81c62e9abb8790b6e5713c55ba5d07c0167759d445b4a0543cfc3914cb',1,'compress.c']]], + ['enet_5fsubcontext_5fsymbol_5fdelta',['ENET_SUBCONTEXT_SYMBOL_DELTA',['../compress_8c.html#a06fc87d81c62e9abb8790b6e5713c55bab8f3ee4e02d6ebb64aea66a598284349',1,'compress.c']]] +]; diff --git a/enet server test/enet2/docs/html/search/files_0.html b/enet server test/enet2/docs/html/search/files_0.html new file mode 100644 index 0000000..73e9ff2 --- /dev/null +++ b/enet server test/enet2/docs/html/search/files_0.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/enet server test/enet2/docs/html/search/files_0.js b/enet server test/enet2/docs/html/search/files_0.js new file mode 100644 index 0000000..80cb7ea --- /dev/null +++ b/enet server test/enet2/docs/html/search/files_0.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['callbacks_2ec',['callbacks.c',['../callbacks_8c.html',1,'']]], + ['callbacks_2eh',['callbacks.h',['../callbacks_8h.html',1,'']]], + ['compress_2ec',['compress.c',['../compress_8c.html',1,'']]] +]; diff --git a/enet server test/enet2/docs/html/search/files_1.html b/enet server test/enet2/docs/html/search/files_1.html new file mode 100644 index 0000000..f0007c8 --- /dev/null +++ b/enet server test/enet2/docs/html/search/files_1.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/enet server test/enet2/docs/html/search/files_1.js b/enet server test/enet2/docs/html/search/files_1.js new file mode 100644 index 0000000..990203b --- /dev/null +++ b/enet server test/enet2/docs/html/search/files_1.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['design_2edox',['design.dox',['../design_8dox.html',1,'']]] +]; diff --git a/enet server test/enet2/docs/html/search/files_2.html b/enet server test/enet2/docs/html/search/files_2.html new file mode 100644 index 0000000..5fd03fd --- /dev/null +++ b/enet server test/enet2/docs/html/search/files_2.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/enet server test/enet2/docs/html/search/files_2.js b/enet server test/enet2/docs/html/search/files_2.js new file mode 100644 index 0000000..3c57522 --- /dev/null +++ b/enet server test/enet2/docs/html/search/files_2.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['enet_2eh',['enet.h',['../enet_8h.html',1,'']]] +]; diff --git a/enet server test/enet2/docs/html/search/files_3.html b/enet server test/enet2/docs/html/search/files_3.html new file mode 100644 index 0000000..93ae815 --- /dev/null +++ b/enet server test/enet2/docs/html/search/files_3.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/enet server test/enet2/docs/html/search/files_3.js b/enet server test/enet2/docs/html/search/files_3.js new file mode 100644 index 0000000..b472a38 --- /dev/null +++ b/enet server test/enet2/docs/html/search/files_3.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['faq_2edox',['FAQ.dox',['../FAQ_8dox.html',1,'']]] +]; diff --git a/enet server test/enet2/docs/html/search/files_4.html b/enet server test/enet2/docs/html/search/files_4.html new file mode 100644 index 0000000..c2708fa --- /dev/null +++ b/enet server test/enet2/docs/html/search/files_4.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/enet server test/enet2/docs/html/search/files_4.js b/enet server test/enet2/docs/html/search/files_4.js new file mode 100644 index 0000000..2dc611a --- /dev/null +++ b/enet server test/enet2/docs/html/search/files_4.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['host_2ec',['host.c',['../host_8c.html',1,'']]] +]; diff --git a/enet server test/enet2/docs/html/search/files_5.html b/enet server test/enet2/docs/html/search/files_5.html new file mode 100644 index 0000000..3624fe4 --- /dev/null +++ b/enet server test/enet2/docs/html/search/files_5.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/enet server test/enet2/docs/html/search/files_5.js b/enet server test/enet2/docs/html/search/files_5.js new file mode 100644 index 0000000..02bf901 --- /dev/null +++ b/enet server test/enet2/docs/html/search/files_5.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['install_2edox',['install.dox',['../install_8dox.html',1,'']]] +]; diff --git a/enet server test/enet2/docs/html/search/files_6.html b/enet server test/enet2/docs/html/search/files_6.html new file mode 100644 index 0000000..7cda226 --- /dev/null +++ b/enet server test/enet2/docs/html/search/files_6.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/enet server test/enet2/docs/html/search/files_6.js b/enet server test/enet2/docs/html/search/files_6.js new file mode 100644 index 0000000..9643000 --- /dev/null +++ b/enet server test/enet2/docs/html/search/files_6.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['license_2edox',['license.dox',['../license_8dox.html',1,'']]], + ['list_2ec',['list.c',['../list_8c.html',1,'']]], + ['list_2eh',['list.h',['../list_8h.html',1,'']]] +]; diff --git a/enet server test/enet2/docs/html/search/files_7.html b/enet server test/enet2/docs/html/search/files_7.html new file mode 100644 index 0000000..5e90c36 --- /dev/null +++ b/enet server test/enet2/docs/html/search/files_7.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/enet server test/enet2/docs/html/search/files_7.js b/enet server test/enet2/docs/html/search/files_7.js new file mode 100644 index 0000000..a490ea9 --- /dev/null +++ b/enet server test/enet2/docs/html/search/files_7.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['mainpage_2edox',['mainpage.dox',['../mainpage_8dox.html',1,'']]] +]; diff --git a/enet server test/enet2/docs/html/search/files_8.html b/enet server test/enet2/docs/html/search/files_8.html new file mode 100644 index 0000000..5f21776 --- /dev/null +++ b/enet server test/enet2/docs/html/search/files_8.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/enet server test/enet2/docs/html/search/files_8.js b/enet server test/enet2/docs/html/search/files_8.js new file mode 100644 index 0000000..0000b44 --- /dev/null +++ b/enet server test/enet2/docs/html/search/files_8.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['packet_2ec',['packet.c',['../packet_8c.html',1,'']]], + ['peer_2ec',['peer.c',['../peer_8c.html',1,'']]], + ['protocol_2ec',['protocol.c',['../protocol_8c.html',1,'']]], + ['protocol_2eh',['protocol.h',['../protocol_8h.html',1,'']]] +]; diff --git a/enet server test/enet2/docs/html/search/files_9.html b/enet server test/enet2/docs/html/search/files_9.html new file mode 100644 index 0000000..73bf813 --- /dev/null +++ b/enet server test/enet2/docs/html/search/files_9.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/enet server test/enet2/docs/html/search/files_9.js b/enet server test/enet2/docs/html/search/files_9.js new file mode 100644 index 0000000..1457f1f --- /dev/null +++ b/enet server test/enet2/docs/html/search/files_9.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['time_2eh',['time.h',['../time_8h.html',1,'']]], + ['tutorial_2edox',['tutorial.dox',['../tutorial_8dox.html',1,'']]], + ['types_2eh',['types.h',['../types_8h.html',1,'']]] +]; diff --git a/enet server test/enet2/docs/html/search/files_a.html b/enet server test/enet2/docs/html/search/files_a.html new file mode 100644 index 0000000..2dcc665 --- /dev/null +++ b/enet server test/enet2/docs/html/search/files_a.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/enet server test/enet2/docs/html/search/files_a.js b/enet server test/enet2/docs/html/search/files_a.js new file mode 100644 index 0000000..8bfb3a4 --- /dev/null +++ b/enet server test/enet2/docs/html/search/files_a.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['unix_2ec',['unix.c',['../unix_8c.html',1,'']]], + ['unix_2eh',['unix.h',['../unix_8h.html',1,'']]], + ['utility_2eh',['utility.h',['../utility_8h.html',1,'']]] +]; diff --git a/enet server test/enet2/docs/html/search/files_b.html b/enet server test/enet2/docs/html/search/files_b.html new file mode 100644 index 0000000..d2e5208 --- /dev/null +++ b/enet server test/enet2/docs/html/search/files_b.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/enet server test/enet2/docs/html/search/files_b.js b/enet server test/enet2/docs/html/search/files_b.js new file mode 100644 index 0000000..9ce44c7 --- /dev/null +++ b/enet server test/enet2/docs/html/search/files_b.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['win32_2ec',['win32.c',['../win32_8c.html',1,'']]], + ['win32_2eh',['win32.h',['../win32_8h.html',1,'']]] +]; diff --git a/enet server test/enet2/docs/html/search/functions_0.html b/enet server test/enet2/docs/html/search/functions_0.html new file mode 100644 index 0000000..36aa6a6 --- /dev/null +++ b/enet server test/enet2/docs/html/search/functions_0.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/enet server test/enet2/docs/html/search/functions_0.js b/enet server test/enet2/docs/html/search/functions_0.js new file mode 100644 index 0000000..4def810 --- /dev/null +++ b/enet server test/enet2/docs/html/search/functions_0.js @@ -0,0 +1,75 @@ +var searchData= +[ + ['enet_5faddress_5fget_5fhost',['enet_address_get_host',['../group__Address.html#ga5878cbeaae3e6272444a0c5ec1baac44',1,'enet_address_get_host(const ENetAddress *address, char *hostName, size_t nameLength): unix.c'],['../group__Address.html#ga5878cbeaae3e6272444a0c5ec1baac44',1,'enet_address_get_host(const ENetAddress *address, char *name, size_t nameLength): unix.c']]], + ['enet_5faddress_5fget_5fhost_5fip',['enet_address_get_host_ip',['../group__Address.html#ga1a82cf9908f39fea27f13eef5ad468b1',1,'enet_address_get_host_ip(const ENetAddress *address, char *hostName, size_t nameLength): unix.c'],['../group__Address.html#ga1a82cf9908f39fea27f13eef5ad468b1',1,'enet_address_get_host_ip(const ENetAddress *address, char *name, size_t nameLength): unix.c']]], + ['enet_5faddress_5fset_5fhost',['enet_address_set_host',['../group__Address.html#ga979aff1766944d841950c35b57705b49',1,'enet_address_set_host(ENetAddress *address, const char *hostName): unix.c'],['../group__Address.html#ga979aff1766944d841950c35b57705b49',1,'enet_address_set_host(ENetAddress *address, const char *name): unix.c']]], + ['enet_5fcrc32',['enet_crc32',['../group__Packet.html#ga015ce0307049901852c54dd2def532e2',1,'enet_crc32(const ENetBuffer *, size_t): packet.c'],['../group__Packet.html#ga015ce0307049901852c54dd2def532e2',1,'enet_crc32(const ENetBuffer *buffers, size_t bufferCount): packet.c']]], + ['enet_5fdeinitialize',['enet_deinitialize',['../group__global.html#ga928f5a127837d9926620a2427b48a6a3',1,'enet_deinitialize(void): unix.c'],['../group__global.html#ga928f5a127837d9926620a2427b48a6a3',1,'enet_deinitialize(void): unix.c']]], + ['enet_5ffree',['enet_free',['../group__callbacks.html#ga28f051737b1bbc8f64a4185dd41eb127',1,'enet_free(void *memory): callbacks.c'],['../group__callbacks.html#ga28f051737b1bbc8f64a4185dd41eb127',1,'enet_free(void *): callbacks.c']]], + ['enet_5fhost_5fbandwidth_5flimit',['enet_host_bandwidth_limit',['../group__host.html#ga83c5fa02a3ba6ab829856302e54929fe',1,'enet_host_bandwidth_limit(ENetHost *host, enet_uint32 incomingBandwidth, enet_uint32 outgoingBandwidth): host.c'],['../group__host.html#ga83c5fa02a3ba6ab829856302e54929fe',1,'enet_host_bandwidth_limit(ENetHost *, enet_uint32, enet_uint32): host.c']]], + ['enet_5fhost_5fbandwidth_5fthrottle',['enet_host_bandwidth_throttle',['../group__host.html#gac76acd47fd07c27e5b85ecb63b192dd1',1,'enet_host_bandwidth_throttle(ENetHost *host): host.c'],['../group__host.html#gac76acd47fd07c27e5b85ecb63b192dd1',1,'enet_host_bandwidth_throttle(ENetHost *): host.c']]], + ['enet_5fhost_5fbroadcast',['enet_host_broadcast',['../group__host.html#ga5190a63f78eb0c15bd96cda44bf423c6',1,'enet_host_broadcast(ENetHost *host, enet_uint8 channelID, ENetPacket *packet): host.c'],['../group__host.html#ga5190a63f78eb0c15bd96cda44bf423c6',1,'enet_host_broadcast(ENetHost *, enet_uint8, ENetPacket *): host.c']]], + ['enet_5fhost_5fchannel_5flimit',['enet_host_channel_limit',['../group__host.html#gaa3c04d1a1a41f46a2db274f29a8d0ffd',1,'enet_host_channel_limit(ENetHost *host, size_t channelLimit): host.c'],['../group__host.html#gaa3c04d1a1a41f46a2db274f29a8d0ffd',1,'enet_host_channel_limit(ENetHost *, size_t): host.c']]], + ['enet_5fhost_5fcheck_5fevents',['enet_host_check_events',['../group__host.html#gabf2383e4a5ed864c56a50dc67b901fe9',1,'enet_host_check_events(ENetHost *, ENetEvent *): protocol.c'],['../group__host.html#gabf2383e4a5ed864c56a50dc67b901fe9',1,'enet_host_check_events(ENetHost *host, ENetEvent *event): protocol.c']]], + ['enet_5fhost_5fcompress',['enet_host_compress',['../group__host.html#gae9e23efdfc718dedaa349891dddf529b',1,'enet_host_compress(ENetHost *host, const ENetCompressor *compressor): host.c'],['../group__host.html#gae9e23efdfc718dedaa349891dddf529b',1,'enet_host_compress(ENetHost *, const ENetCompressor *): host.c']]], + ['enet_5fhost_5fcompress_5fwith_5frange_5fcoder',['enet_host_compress_with_range_coder',['../group__host.html#ga444b74e7b70d97e2abd02328419be3f4',1,'enet_host_compress_with_range_coder(ENetHost *host): compress.c'],['../group__host.html#ga444b74e7b70d97e2abd02328419be3f4',1,'enet_host_compress_with_range_coder(ENetHost *host): compress.c']]], + ['enet_5fhost_5fconnect',['enet_host_connect',['../group__host.html#ga23b3ac206326b84f42fa91673f12fca9',1,'enet_host_connect(ENetHost *host, const ENetAddress *address, size_t channelCount, enet_uint32 data): host.c'],['../group__host.html#ga23b3ac206326b84f42fa91673f12fca9',1,'enet_host_connect(ENetHost *, const ENetAddress *, size_t, enet_uint32): host.c']]], + ['enet_5fhost_5fcreate',['enet_host_create',['../group__host.html#ga5567a95d7a45521dc9cba93a9066c940',1,'enet_host_create(const ENetAddress *address, size_t peerCount, size_t channelLimit, enet_uint32 incomingBandwidth, enet_uint32 outgoingBandwidth): host.c'],['../group__host.html#ga5567a95d7a45521dc9cba93a9066c940',1,'enet_host_create(const ENetAddress *, size_t, size_t, enet_uint32, enet_uint32): host.c']]], + ['enet_5fhost_5fdestroy',['enet_host_destroy',['../group__host.html#gacec1e9a0b528c1f9ce30544d2d5b5b79',1,'enet_host_destroy(ENetHost *host): host.c'],['../group__host.html#gacec1e9a0b528c1f9ce30544d2d5b5b79',1,'enet_host_destroy(ENetHost *): host.c']]], + ['enet_5fhost_5fflush',['enet_host_flush',['../group__host.html#gac8f53bcdbd540043f87e7d59048559fa',1,'enet_host_flush(ENetHost *): protocol.c'],['../group__host.html#gac8f53bcdbd540043f87e7d59048559fa',1,'enet_host_flush(ENetHost *host): protocol.c']]], + ['enet_5fhost_5frandom_5fseed',['enet_host_random_seed',['../enet_8h.html#a8b5be48a94f07ca6884375910637edbb',1,'enet_host_random_seed(void): unix.c'],['../unix_8c.html#a8b5be48a94f07ca6884375910637edbb',1,'enet_host_random_seed(void): unix.c']]], + ['enet_5fhost_5fservice',['enet_host_service',['../group__host.html#ga6ba501b3ee576e5578c8e6d1694ebd49',1,'enet_host_service(ENetHost *, ENetEvent *, enet_uint32): protocol.c'],['../group__host.html#ga6ba501b3ee576e5578c8e6d1694ebd49',1,'enet_host_service(ENetHost *host, ENetEvent *event, enet_uint32 timeout): protocol.c']]], + ['enet_5finitialize',['enet_initialize',['../group__global.html#ga233ea54f54602076e9faf26fae8561fa',1,'enet_initialize(void): unix.c'],['../group__global.html#ga233ea54f54602076e9faf26fae8561fa',1,'enet_initialize(void): unix.c']]], + ['enet_5finitialize_5fwith_5fcallbacks',['enet_initialize_with_callbacks',['../group__global.html#ga6a51880a140dc00db01e4cd19c3eb651',1,'enet_initialize_with_callbacks(ENetVersion version, const ENetCallbacks *inits): callbacks.c'],['../group__global.html#ga6a51880a140dc00db01e4cd19c3eb651',1,'enet_initialize_with_callbacks(ENetVersion version, const ENetCallbacks *inits): callbacks.c']]], + ['enet_5flinked_5fversion',['enet_linked_version',['../group__global.html#ga78be46f2ec102ae88378543c97302ca8',1,'enet_linked_version(void): callbacks.c'],['../group__global.html#ga78be46f2ec102ae88378543c97302ca8',1,'enet_linked_version(void): callbacks.c']]], + ['enet_5flist_5fclear',['enet_list_clear',['../group__list.html#ga94d06840adb246fbaba78abaaf172892',1,'enet_list_clear(ENetList *): list.c'],['../group__list.html#ga94d06840adb246fbaba78abaaf172892',1,'enet_list_clear(ENetList *list): list.c']]], + ['enet_5flist_5finsert',['enet_list_insert',['../group__list.html#ga79bd28f859be551e2019f8b8bec8bcd4',1,'enet_list_insert(ENetListIterator, void *): list.c'],['../group__list.html#ga79bd28f859be551e2019f8b8bec8bcd4',1,'enet_list_insert(ENetListIterator position, void *data): list.c']]], + ['enet_5flist_5fmove',['enet_list_move',['../group__list.html#ga5b1b766ddd29736099ea167729292ac1',1,'enet_list_move(ENetListIterator, void *, void *): list.c'],['../group__list.html#ga5b1b766ddd29736099ea167729292ac1',1,'enet_list_move(ENetListIterator position, void *dataFirst, void *dataLast): list.c']]], + ['enet_5flist_5fremove',['enet_list_remove',['../group__list.html#ga7ee82bbce4bbb8d5cf8a59a744e26f0d',1,'enet_list_remove(ENetListIterator): list.c'],['../group__list.html#ga7ee82bbce4bbb8d5cf8a59a744e26f0d',1,'enet_list_remove(ENetListIterator position): list.c']]], + ['enet_5flist_5fsize',['enet_list_size',['../group__list.html#ga9279ceeda719e5079aef1b35ff36ac6e',1,'enet_list_size(ENetList *): list.c'],['../group__list.html#ga9279ceeda719e5079aef1b35ff36ac6e',1,'enet_list_size(ENetList *list): list.c']]], + ['enet_5fmalloc',['enet_malloc',['../group__callbacks.html#ga2cca517973f284531345bb70c2eb08e4',1,'enet_malloc(size_t size): callbacks.c'],['../group__callbacks.html#ga2cca517973f284531345bb70c2eb08e4',1,'enet_malloc(size_t): callbacks.c']]], + ['enet_5fpacket_5fcreate',['enet_packet_create',['../group__Packet.html#gaac61b251aebbf9f5e5e313eca51339ea',1,'enet_packet_create(const void *, size_t, enet_uint32): packet.c'],['../group__Packet.html#gaac61b251aebbf9f5e5e313eca51339ea',1,'enet_packet_create(const void *data, size_t dataLength, enet_uint32 flags): packet.c']]], + ['enet_5fpacket_5fdestroy',['enet_packet_destroy',['../group__Packet.html#gab58895376ee4ade8f4e13761a44ba263',1,'enet_packet_destroy(ENetPacket *): packet.c'],['../group__Packet.html#gab58895376ee4ade8f4e13761a44ba263',1,'enet_packet_destroy(ENetPacket *packet): packet.c']]], + ['enet_5fpacket_5fresize',['enet_packet_resize',['../group__Packet.html#ga0aee7f8c7e2d2c4b64f6d68d930155a8',1,'enet_packet_resize(ENetPacket *, size_t): packet.c'],['../group__Packet.html#ga0aee7f8c7e2d2c4b64f6d68d930155a8',1,'enet_packet_resize(ENetPacket *packet, size_t dataLength): packet.c']]], + ['enet_5fpeer_5fdisconnect',['enet_peer_disconnect',['../group__peer.html#ga0e807704b6ecace5004c2cdcfbf813c2',1,'enet_peer_disconnect(ENetPeer *, enet_uint32): peer.c'],['../group__peer.html#ga0e807704b6ecace5004c2cdcfbf813c2',1,'enet_peer_disconnect(ENetPeer *peer, enet_uint32 data): peer.c']]], + ['enet_5fpeer_5fdisconnect_5flater',['enet_peer_disconnect_later',['../group__peer.html#ga759270d8cccec70f76274e93b49e5ac5',1,'enet_peer_disconnect_later(ENetPeer *, enet_uint32): peer.c'],['../group__peer.html#ga759270d8cccec70f76274e93b49e5ac5',1,'enet_peer_disconnect_later(ENetPeer *peer, enet_uint32 data): peer.c']]], + ['enet_5fpeer_5fdisconnect_5fnow',['enet_peer_disconnect_now',['../group__peer.html#ga636cc45f52461b567d6daffe4ab8f4e9',1,'enet_peer_disconnect_now(ENetPeer *, enet_uint32): peer.c'],['../group__peer.html#ga636cc45f52461b567d6daffe4ab8f4e9',1,'enet_peer_disconnect_now(ENetPeer *peer, enet_uint32 data): peer.c']]], + ['enet_5fpeer_5fdispatch_5fincoming_5freliable_5fcommands',['enet_peer_dispatch_incoming_reliable_commands',['../group__peer.html#ga8b260c7d620fa30772db1426daf15ad0',1,'enet_peer_dispatch_incoming_reliable_commands(ENetPeer *, ENetChannel *): peer.c'],['../group__peer.html#ga8b260c7d620fa30772db1426daf15ad0',1,'enet_peer_dispatch_incoming_reliable_commands(ENetPeer *peer, ENetChannel *channel): peer.c']]], + ['enet_5fpeer_5fdispatch_5fincoming_5funreliable_5fcommands',['enet_peer_dispatch_incoming_unreliable_commands',['../group__peer.html#ga9e5635d76d32276d211d655d6570bfd5',1,'enet_peer_dispatch_incoming_unreliable_commands(ENetPeer *, ENetChannel *): peer.c'],['../group__peer.html#ga9e5635d76d32276d211d655d6570bfd5',1,'enet_peer_dispatch_incoming_unreliable_commands(ENetPeer *peer, ENetChannel *channel): peer.c']]], + ['enet_5fpeer_5fon_5fconnect',['enet_peer_on_connect',['../group__peer.html#ga3a49d1a10c3ed07a9e8df6d8286046f6',1,'enet_peer_on_connect(ENetPeer *): peer.c'],['../group__peer.html#ga3a49d1a10c3ed07a9e8df6d8286046f6',1,'enet_peer_on_connect(ENetPeer *peer): peer.c']]], + ['enet_5fpeer_5fon_5fdisconnect',['enet_peer_on_disconnect',['../group__peer.html#ga4fe3e5490f9d604aef6b3151cda02193',1,'enet_peer_on_disconnect(ENetPeer *): peer.c'],['../group__peer.html#ga4fe3e5490f9d604aef6b3151cda02193',1,'enet_peer_on_disconnect(ENetPeer *peer): peer.c']]], + ['enet_5fpeer_5fping',['enet_peer_ping',['../group__peer.html#ga5c0708ddaf340aa42e7754a91ce456b6',1,'enet_peer_ping(ENetPeer *): peer.c'],['../group__peer.html#ga5c0708ddaf340aa42e7754a91ce456b6',1,'enet_peer_ping(ENetPeer *peer): peer.c']]], + ['enet_5fpeer_5fping_5finterval',['enet_peer_ping_interval',['../group__peer.html#gacddc2107f6e6b9e39812c1dfecff335b',1,'enet_peer_ping_interval(ENetPeer *, enet_uint32): peer.c'],['../group__peer.html#gacddc2107f6e6b9e39812c1dfecff335b',1,'enet_peer_ping_interval(ENetPeer *peer, enet_uint32 pingInterval): peer.c']]], + ['enet_5fpeer_5fqueue_5facknowledgement',['enet_peer_queue_acknowledgement',['../group__peer.html#ga6f8ab6421d3455b7b12b14f477ea83aa',1,'enet_peer_queue_acknowledgement(ENetPeer *, const ENetProtocol *, enet_uint16): peer.c'],['../group__peer.html#ga6f8ab6421d3455b7b12b14f477ea83aa',1,'enet_peer_queue_acknowledgement(ENetPeer *peer, const ENetProtocol *command, enet_uint16 sentTime): peer.c']]], + ['enet_5fpeer_5fqueue_5fincoming_5fcommand',['enet_peer_queue_incoming_command',['../group__peer.html#gac73a1c498c303c40e8adf6a1ebf0b1b8',1,'enet_peer_queue_incoming_command(ENetPeer *, const ENetProtocol *, const void *, size_t, enet_uint32, enet_uint32): peer.c'],['../group__peer.html#gac73a1c498c303c40e8adf6a1ebf0b1b8',1,'enet_peer_queue_incoming_command(ENetPeer *peer, const ENetProtocol *command, const void *data, size_t dataLength, enet_uint32 flags, enet_uint32 fragmentCount): peer.c']]], + ['enet_5fpeer_5fqueue_5foutgoing_5fcommand',['enet_peer_queue_outgoing_command',['../group__peer.html#ga0dff073e7882de81bdf46ae8e1bc3883',1,'enet_peer_queue_outgoing_command(ENetPeer *, const ENetProtocol *, ENetPacket *, enet_uint32, enet_uint16): peer.c'],['../group__peer.html#ga0dff073e7882de81bdf46ae8e1bc3883',1,'enet_peer_queue_outgoing_command(ENetPeer *peer, const ENetProtocol *command, ENetPacket *packet, enet_uint32 offset, enet_uint16 length): peer.c']]], + ['enet_5fpeer_5freceive',['enet_peer_receive',['../group__peer.html#ga6493c7807f5381395305c9c48913a46c',1,'enet_peer_receive(ENetPeer *, enet_uint8 *channelID): peer.c'],['../group__peer.html#ga6493c7807f5381395305c9c48913a46c',1,'enet_peer_receive(ENetPeer *peer, enet_uint8 *channelID): peer.c']]], + ['enet_5fpeer_5freset',['enet_peer_reset',['../group__peer.html#ga9444dfff9574a7d21dbbdd34385a7d4d',1,'enet_peer_reset(ENetPeer *): peer.c'],['../group__peer.html#ga9444dfff9574a7d21dbbdd34385a7d4d',1,'enet_peer_reset(ENetPeer *peer): peer.c']]], + ['enet_5fpeer_5freset_5fqueues',['enet_peer_reset_queues',['../group__peer.html#ga9a8da1e258f10bbef173abd598534f09',1,'enet_peer_reset_queues(ENetPeer *): peer.c'],['../group__peer.html#ga9a8da1e258f10bbef173abd598534f09',1,'enet_peer_reset_queues(ENetPeer *peer): peer.c']]], + ['enet_5fpeer_5fsend',['enet_peer_send',['../group__peer.html#gaf082a0ae58d9c435bed75c7325cf7290',1,'enet_peer_send(ENetPeer *, enet_uint8, ENetPacket *): peer.c'],['../group__peer.html#gaf082a0ae58d9c435bed75c7325cf7290',1,'enet_peer_send(ENetPeer *peer, enet_uint8 channelID, ENetPacket *packet): peer.c']]], + ['enet_5fpeer_5fsetup_5foutgoing_5fcommand',['enet_peer_setup_outgoing_command',['../group__peer.html#ga67b9b1aceaffe1efe08c9a62de2a9be6',1,'enet_peer_setup_outgoing_command(ENetPeer *, ENetOutgoingCommand *): peer.c'],['../group__peer.html#ga67b9b1aceaffe1efe08c9a62de2a9be6',1,'enet_peer_setup_outgoing_command(ENetPeer *peer, ENetOutgoingCommand *outgoingCommand): peer.c']]], + ['enet_5fpeer_5fthrottle',['enet_peer_throttle',['../group__peer.html#ga52c5c6b1bbd807466298b2d7ed12fdd6',1,'enet_peer_throttle(ENetPeer *, enet_uint32): peer.c'],['../group__peer.html#ga52c5c6b1bbd807466298b2d7ed12fdd6',1,'enet_peer_throttle(ENetPeer *peer, enet_uint32 rtt): peer.c']]], + ['enet_5fpeer_5fthrottle_5fconfigure',['enet_peer_throttle_configure',['../group__peer.html#gab35807c848b6c88af12ce8476dffbc84',1,'enet_peer_throttle_configure(ENetPeer *, enet_uint32, enet_uint32, enet_uint32): peer.c'],['../group__peer.html#gab35807c848b6c88af12ce8476dffbc84',1,'enet_peer_throttle_configure(ENetPeer *peer, enet_uint32 interval, enet_uint32 acceleration, enet_uint32 deceleration): peer.c']]], + ['enet_5fpeer_5ftimeout',['enet_peer_timeout',['../group__peer.html#gac48f35cdd39a89318a7b4fc19920b21b',1,'enet_peer_timeout(ENetPeer *, enet_uint32, enet_uint32, enet_uint32): peer.c'],['../group__peer.html#gac48f35cdd39a89318a7b4fc19920b21b',1,'enet_peer_timeout(ENetPeer *peer, enet_uint32 timeoutLimit, enet_uint32 timeoutMinimum, enet_uint32 timeoutMaximum): peer.c']]], + ['enet_5fprotocol_5fcommand_5fsize',['enet_protocol_command_size',['../enet_8h.html#aea0520a5cc4fc91f40690eebbdc1ff90',1,'enet_protocol_command_size(enet_uint8): protocol.c'],['../protocol_8c.html#af0a3820cd3fdc56487f0fe700d370c5f',1,'enet_protocol_command_size(enet_uint8 commandNumber): protocol.c']]], + ['enet_5frange_5fcoder_5fcompress',['enet_range_coder_compress',['../compress_8c.html#a074b73d16cf42e3997bbe7efd9fd1689',1,'enet_range_coder_compress(void *context, const ENetBuffer *inBuffers, size_t inBufferCount, size_t inLimit, enet_uint8 *outData, size_t outLimit): compress.c'],['../enet_8h.html#a979b6361ae44745e3edbd389815ef0a3',1,'enet_range_coder_compress(void *, const ENetBuffer *, size_t, size_t, enet_uint8 *, size_t): compress.c']]], + ['enet_5frange_5fcoder_5fcreate',['enet_range_coder_create',['../compress_8c.html#ae4c811e2bb7b322f90f5c8652d97af7c',1,'enet_range_coder_create(void): compress.c'],['../enet_8h.html#ae4c811e2bb7b322f90f5c8652d97af7c',1,'enet_range_coder_create(void): compress.c']]], + ['enet_5frange_5fcoder_5fdecompress',['enet_range_coder_decompress',['../compress_8c.html#a08cd12b64ecb36ffbf6d3281ff2f3e75',1,'enet_range_coder_decompress(void *context, const enet_uint8 *inData, size_t inLimit, enet_uint8 *outData, size_t outLimit): compress.c'],['../enet_8h.html#a8a470a155f35dc9dbfc548a6ecabf563',1,'enet_range_coder_decompress(void *, const enet_uint8 *, size_t, enet_uint8 *, size_t): compress.c']]], + ['enet_5frange_5fcoder_5fdestroy',['enet_range_coder_destroy',['../compress_8c.html#a97f697e6793dda86d5a08337503a4a74',1,'enet_range_coder_destroy(void *context): compress.c'],['../enet_8h.html#aa10e7dcb82c1fc310cef161e91efafaf',1,'enet_range_coder_destroy(void *): compress.c']]], + ['enet_5fsocket_5faccept',['enet_socket_accept',['../group__socket.html#ga32a19b4cf4d9b685c1a1b2fa080c30b2',1,'enet_socket_accept(ENetSocket, ENetAddress *): unix.c'],['../group__socket.html#ga32a19b4cf4d9b685c1a1b2fa080c30b2',1,'enet_socket_accept(ENetSocket socket, ENetAddress *address): unix.c']]], + ['enet_5fsocket_5fbind',['enet_socket_bind',['../group__socket.html#ga142285ecaae9709be841a204427f533f',1,'enet_socket_bind(ENetSocket, const ENetAddress *): unix.c'],['../group__socket.html#ga142285ecaae9709be841a204427f533f',1,'enet_socket_bind(ENetSocket socket, const ENetAddress *address): unix.c']]], + ['enet_5fsocket_5fconnect',['enet_socket_connect',['../group__socket.html#gaac968eaf73e9a193eb24e5f1b761b0ce',1,'enet_socket_connect(ENetSocket, const ENetAddress *): unix.c'],['../group__socket.html#gaac968eaf73e9a193eb24e5f1b761b0ce',1,'enet_socket_connect(ENetSocket socket, const ENetAddress *address): unix.c']]], + ['enet_5fsocket_5fcreate',['enet_socket_create',['../group__socket.html#gaaa4bc720812b3736c60502bfa1180c26',1,'enet_socket_create(ENetSocketType): unix.c'],['../group__socket.html#gaaa4bc720812b3736c60502bfa1180c26',1,'enet_socket_create(ENetSocketType type): unix.c']]], + ['enet_5fsocket_5fdestroy',['enet_socket_destroy',['../group__socket.html#gaea9227c91eed2b38d2707e51afa33c6f',1,'enet_socket_destroy(ENetSocket): unix.c'],['../group__socket.html#gaea9227c91eed2b38d2707e51afa33c6f',1,'enet_socket_destroy(ENetSocket socket): unix.c']]], + ['enet_5fsocket_5fget_5faddress',['enet_socket_get_address',['../group__socket.html#ga62786757fd6b2bdd31eed76c3fdf9d77',1,'enet_socket_get_address(ENetSocket, ENetAddress *): unix.c'],['../group__socket.html#ga62786757fd6b2bdd31eed76c3fdf9d77',1,'enet_socket_get_address(ENetSocket socket, ENetAddress *address): unix.c']]], + ['enet_5fsocket_5fget_5foption',['enet_socket_get_option',['../group__socket.html#gaa3471d79efff60860086aa21623e1b8b',1,'enet_socket_get_option(ENetSocket, ENetSocketOption, int *): unix.c'],['../group__socket.html#gaa3471d79efff60860086aa21623e1b8b',1,'enet_socket_get_option(ENetSocket socket, ENetSocketOption option, int *value): unix.c']]], + ['enet_5fsocket_5flisten',['enet_socket_listen',['../group__socket.html#ga1b8b303fd69ee97500784f7916ab2b14',1,'enet_socket_listen(ENetSocket, int): unix.c'],['../group__socket.html#ga1b8b303fd69ee97500784f7916ab2b14',1,'enet_socket_listen(ENetSocket socket, int backlog): unix.c']]], + ['enet_5fsocket_5freceive',['enet_socket_receive',['../group__socket.html#gab527761de677b6bf4d24363eaf03353d',1,'enet_socket_receive(ENetSocket, ENetAddress *, ENetBuffer *, size_t): unix.c'],['../group__socket.html#gab527761de677b6bf4d24363eaf03353d',1,'enet_socket_receive(ENetSocket socket, ENetAddress *address, ENetBuffer *buffers, size_t bufferCount): unix.c']]], + ['enet_5fsocket_5fsend',['enet_socket_send',['../group__socket.html#ga9c9c41352de9dda00b8197f550d14a2e',1,'enet_socket_send(ENetSocket, const ENetAddress *, const ENetBuffer *, size_t): unix.c'],['../group__socket.html#ga9c9c41352de9dda00b8197f550d14a2e',1,'enet_socket_send(ENetSocket socket, const ENetAddress *address, const ENetBuffer *buffers, size_t bufferCount): unix.c']]], + ['enet_5fsocket_5fset_5foption',['enet_socket_set_option',['../group__socket.html#ga28d673f1586a9c75146548611562b3af',1,'enet_socket_set_option(ENetSocket, ENetSocketOption, int): unix.c'],['../group__socket.html#ga28d673f1586a9c75146548611562b3af',1,'enet_socket_set_option(ENetSocket socket, ENetSocketOption option, int value): unix.c']]], + ['enet_5fsocket_5fshutdown',['enet_socket_shutdown',['../group__socket.html#ga33d37353265c8ea4ad32b1423ba73038',1,'enet_socket_shutdown(ENetSocket, ENetSocketShutdown): unix.c'],['../group__socket.html#ga33d37353265c8ea4ad32b1423ba73038',1,'enet_socket_shutdown(ENetSocket socket, ENetSocketShutdown how): unix.c']]], + ['enet_5fsocket_5fwait',['enet_socket_wait',['../group__socket.html#gad44bb89ae90092369293341dda2a035c',1,'enet_socket_wait(ENetSocket, enet_uint32 *, enet_uint32): unix.c'],['../group__socket.html#gad44bb89ae90092369293341dda2a035c',1,'enet_socket_wait(ENetSocket socket, enet_uint32 *condition, enet_uint32 timeout): unix.c']]], + ['enet_5fsocketset_5fselect',['enet_socketset_select',['../group__socket.html#ga9ebba8fc4c0c4d21aba510a6ffdd97bf',1,'enet_socketset_select(ENetSocket, ENetSocketSet *, ENetSocketSet *, enet_uint32): unix.c'],['../group__socket.html#ga9ebba8fc4c0c4d21aba510a6ffdd97bf',1,'enet_socketset_select(ENetSocket maxSocket, ENetSocketSet *readSet, ENetSocketSet *writeSet, enet_uint32 timeout): unix.c']]], + ['enet_5ftime_5fget',['enet_time_get',['../enet_8h.html#a26eeed004fe8fa39b0fb5b18efbd4d64',1,'enet_time_get(void): unix.c'],['../unix_8c.html#a26eeed004fe8fa39b0fb5b18efbd4d64',1,'enet_time_get(void): unix.c']]], + ['enet_5ftime_5fset',['enet_time_set',['../enet_8h.html#a40fc3c9805a6842804e3d0be2ce8c31a',1,'enet_time_set(enet_uint32): unix.c'],['../unix_8c.html#af7346c361d30381752ac89475a5e1fd5',1,'enet_time_set(enet_uint32 newTimeBase): unix.c']]] +]; diff --git a/enet server test/enet2/docs/html/search/groups_0.html b/enet server test/enet2/docs/html/search/groups_0.html new file mode 100644 index 0000000..e38d582 --- /dev/null +++ b/enet server test/enet2/docs/html/search/groups_0.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/enet server test/enet2/docs/html/search/groups_0.js b/enet server test/enet2/docs/html/search/groups_0.js new file mode 100644 index 0000000..88c7d1f --- /dev/null +++ b/enet server test/enet2/docs/html/search/groups_0.js @@ -0,0 +1,12 @@ +var searchData= +[ + ['enet_20address_20functions',['ENet address functions',['../group__Address.html',1,'']]], + ['enet_20internal_20callbacks',['ENet internal callbacks',['../group__callbacks.html',1,'']]], + ['enet_20global_20functions',['ENet global functions',['../group__global.html',1,'']]], + ['enet_20host_20functions',['ENet host functions',['../group__host.html',1,'']]], + ['enet_20linked_20list_20utility_20functions',['ENet linked list utility functions',['../group__list.html',1,'']]], + ['enet_20packet_20functions',['ENet packet functions',['../group__Packet.html',1,'']]], + ['enet_20peer_20functions',['ENet peer functions',['../group__peer.html',1,'']]], + ['enet_20private_20implementation_20functions',['ENet private implementation functions',['../group__private.html',1,'']]], + ['enet_20socket_20functions',['ENet socket functions',['../group__socket.html',1,'']]] +]; diff --git a/enet server test/enet2/docs/html/search/mag_sel.png b/enet server test/enet2/docs/html/search/mag_sel.png new file mode 100644 index 0000000000000000000000000000000000000000..81f6040a2092402b4d98f9ffa8855d12a0d4ca17 GIT binary patch literal 563 zcmV-30?hr1P)zxx&tqG15pu7)IiiXFflOc2k;dXd>%13GZAy? zRz!q0=|E6a6vV)&ZBS~G9oe0kbqyw1*gvY`{Pop2oKq#FlzgXt@Xh-7fxh>}`Fxg> z$%N%{$!4=5nM{(;=c!aG1Ofr^Do{u%Ih{^&Fc@H2)+a-?TBXrw5DW&z%Nb6mQ!L9O zl}b@6mB?f=tX3;#vl)}ggh(Vpyh(IK z(Mb0D{l{U$FsRjP;!{($+bsaaVi8T#1c0V#qEIOCYa9@UVLV`f__E81L;?WEaRA;Y zUH;rZ;vb;mk7JX|$=i3O~&If0O@oZfLg8gfIjW=dcBsz;gI=!{-r4# z4%6v$&~;q^j7Fo67yJ(NJWuX+I~I!tj^nW3?}^9bq|<3^+vapS5sgM^x7!cs(+mMT z&y%j};&~po+YO)3hoUH4E*E;e9>?R6SS&`X)p`njycAVcg{rEb41T{~Hk(bl-7eSb zmFxA2uIqo#@R?lKm50ND`~6Nfn|-b1|L6O98vt3Tx@gKz#isxO002ovPDHLkV1kyW B_l^Jn literal 0 HcmV?d00001 diff --git a/enet server test/enet2/docs/html/search/nomatches.html b/enet server test/enet2/docs/html/search/nomatches.html new file mode 100644 index 0000000..b1ded27 --- /dev/null +++ b/enet server test/enet2/docs/html/search/nomatches.html @@ -0,0 +1,12 @@ + + + + + + + +
+
No Matches
+
+ + diff --git a/enet server test/enet2/docs/html/search/pages_0.html b/enet server test/enet2/docs/html/search/pages_0.html new file mode 100644 index 0000000..582ce94 --- /dev/null +++ b/enet server test/enet2/docs/html/search/pages_0.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/enet server test/enet2/docs/html/search/pages_0.js b/enet server test/enet2/docs/html/search/pages_0.js new file mode 100644 index 0000000..63667e0 --- /dev/null +++ b/enet server test/enet2/docs/html/search/pages_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['downloads',['Downloads',['../Downloads.html',1,'']]] +]; diff --git a/enet server test/enet2/docs/html/search/pages_1.html b/enet server test/enet2/docs/html/search/pages_1.html new file mode 100644 index 0000000..6b48950 --- /dev/null +++ b/enet server test/enet2/docs/html/search/pages_1.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/enet server test/enet2/docs/html/search/pages_1.js b/enet server test/enet2/docs/html/search/pages_1.js new file mode 100644 index 0000000..2df720c --- /dev/null +++ b/enet server test/enet2/docs/html/search/pages_1.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['enet',['ENet',['../index.html',1,'']]] +]; diff --git a/enet server test/enet2/docs/html/search/pages_2.html b/enet server test/enet2/docs/html/search/pages_2.html new file mode 100644 index 0000000..1efc5aa --- /dev/null +++ b/enet server test/enet2/docs/html/search/pages_2.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/enet server test/enet2/docs/html/search/pages_2.js b/enet server test/enet2/docs/html/search/pages_2.js new file mode 100644 index 0000000..c27f306 --- /dev/null +++ b/enet server test/enet2/docs/html/search/pages_2.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['frequently_20answered_20questions',['Frequently Answered Questions',['../FAQ.html',1,'']]], + ['features_20and_20architecture',['Features and Architecture',['../Features.html',1,'']]] +]; diff --git a/enet server test/enet2/docs/html/search/pages_3.html b/enet server test/enet2/docs/html/search/pages_3.html new file mode 100644 index 0000000..13b0572 --- /dev/null +++ b/enet server test/enet2/docs/html/search/pages_3.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/enet server test/enet2/docs/html/search/pages_3.js b/enet server test/enet2/docs/html/search/pages_3.js new file mode 100644 index 0000000..0628acd --- /dev/null +++ b/enet server test/enet2/docs/html/search/pages_3.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['installation',['Installation',['../Installation.html',1,'']]], + ['irc_20channel',['IRC Channel',['../IRCChannel.html',1,'']]] +]; diff --git a/enet server test/enet2/docs/html/search/pages_4.html b/enet server test/enet2/docs/html/search/pages_4.html new file mode 100644 index 0000000..a1de65e --- /dev/null +++ b/enet server test/enet2/docs/html/search/pages_4.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/enet server test/enet2/docs/html/search/pages_4.js b/enet server test/enet2/docs/html/search/pages_4.js new file mode 100644 index 0000000..7ca5ce3 --- /dev/null +++ b/enet server test/enet2/docs/html/search/pages_4.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['license',['License',['../License.html',1,'']]] +]; diff --git a/enet server test/enet2/docs/html/search/pages_5.html b/enet server test/enet2/docs/html/search/pages_5.html new file mode 100644 index 0000000..0b9d9eb --- /dev/null +++ b/enet server test/enet2/docs/html/search/pages_5.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/enet server test/enet2/docs/html/search/pages_5.js b/enet server test/enet2/docs/html/search/pages_5.js new file mode 100644 index 0000000..8265a81 --- /dev/null +++ b/enet server test/enet2/docs/html/search/pages_5.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['mailing_20list',['Mailing List',['../MailingList.html',1,'']]] +]; diff --git a/enet server test/enet2/docs/html/search/pages_6.html b/enet server test/enet2/docs/html/search/pages_6.html new file mode 100644 index 0000000..8ff2ef0 --- /dev/null +++ b/enet server test/enet2/docs/html/search/pages_6.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/enet server test/enet2/docs/html/search/pages_6.js b/enet server test/enet2/docs/html/search/pages_6.js new file mode 100644 index 0000000..53e1875 --- /dev/null +++ b/enet server test/enet2/docs/html/search/pages_6.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['tutorial',['Tutorial',['../Tutorial.html',1,'']]] +]; diff --git a/enet server test/enet2/docs/html/search/search.css b/enet server test/enet2/docs/html/search/search.css new file mode 100644 index 0000000..67406e7 --- /dev/null +++ b/enet server test/enet2/docs/html/search/search.css @@ -0,0 +1,271 @@ +/*---------------- Search Box */ + +#FSearchBox { + float: left; +} + +#MSearchBox { + white-space : nowrap; + position: absolute; + float: none; + display: inline; + margin-top: 8px; + right: 0px; + width: 170px; + z-index: 102; + background-color: white; +} + +#MSearchBox .left +{ + display:block; + position:absolute; + left:10px; + width:20px; + height:19px; + background:url('search_l.png') no-repeat; + background-position:right; +} + +#MSearchSelect { + display:block; + position:absolute; + width:20px; + height:19px; +} + +.left #MSearchSelect { + left:4px; +} + +.right #MSearchSelect { + right:5px; +} + +#MSearchField { + display:block; + position:absolute; + height:19px; + background:url('search_m.png') repeat-x; + border:none; + width:111px; + margin-left:20px; + padding-left:4px; + color: #909090; + outline: none; + font: 9pt Arial, Verdana, sans-serif; +} + +#FSearchBox #MSearchField { + margin-left:15px; +} + +#MSearchBox .right { + display:block; + position:absolute; + right:10px; + top:0px; + width:20px; + height:19px; + background:url('search_r.png') no-repeat; + background-position:left; +} + +#MSearchClose { + display: none; + position: absolute; + top: 4px; + background : none; + border: none; + margin: 0px 4px 0px 0px; + padding: 0px 0px; + outline: none; +} + +.left #MSearchClose { + left: 6px; +} + +.right #MSearchClose { + right: 2px; +} + +.MSearchBoxActive #MSearchField { + color: #000000; +} + +/*---------------- Search filter selection */ + +#MSearchSelectWindow { + display: none; + position: absolute; + left: 0; top: 0; + border: 1px solid #347332; + background-color: #EEF7EE; + z-index: 1; + padding-top: 4px; + padding-bottom: 4px; + -moz-border-radius: 4px; + -webkit-border-top-left-radius: 4px; + -webkit-border-top-right-radius: 4px; + -webkit-border-bottom-left-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); +} + +.SelectItem { + font: 8pt Arial, Verdana, sans-serif; + padding-left: 2px; + padding-right: 12px; + border: 0px; +} + +span.SelectionMark { + margin-right: 4px; + font-family: monospace; + outline-style: none; + text-decoration: none; +} + +a.SelectItem { + display: block; + outline-style: none; + color: #000000; + text-decoration: none; + padding-left: 6px; + padding-right: 12px; +} + +a.SelectItem:focus, +a.SelectItem:active { + color: #000000; + outline-style: none; + text-decoration: none; +} + +a.SelectItem:hover { + color: #FFFFFF; + background-color: #0A1509; + outline-style: none; + text-decoration: none; + cursor: pointer; + display: block; +} + +/*---------------- Search results window */ + +iframe#MSearchResults { + width: 60ex; + height: 15em; +} + +#MSearchResultsWindow { + display: none; + position: absolute; + left: 0; top: 0; + border: 1px solid #000; + background-color: #CFEACE; +} + +/* ----------------------------------- */ + + +#SRIndex { + clear:both; + padding-bottom: 15px; +} + +.SREntry { + font-size: 10pt; + padding-left: 1ex; +} + +.SRPage .SREntry { + font-size: 8pt; + padding: 1px 5px; +} + +body.SRPage { + margin: 5px 2px; +} + +.SRChildren { + padding-left: 3ex; padding-bottom: .5em +} + +.SRPage .SRChildren { + display: none; +} + +.SRSymbol { + font-weight: bold; + color: #0C1B0C; + font-family: Arial, Verdana, sans-serif; + text-decoration: none; + outline: none; +} + +a.SRScope { + display: block; + color: #0C1B0C; + font-family: Arial, Verdana, sans-serif; + text-decoration: none; + outline: none; +} + +a.SRSymbol:focus, a.SRSymbol:active, +a.SRScope:focus, a.SRScope:active { + text-decoration: underline; +} + +span.SRScope { + padding-left: 4px; +} + +.SRPage .SRStatus { + padding: 2px 5px; + font-size: 8pt; + font-style: italic; +} + +.SRResult { + display: none; +} + +DIV.searchresults { + margin-left: 10px; + margin-right: 10px; +} + +/*---------------- External search page results */ + +.searchresult { + background-color: #D5ECD5; +} + +.pages b { + color: white; + padding: 5px 5px 3px 5px; + background-image: url("../tab_a.png"); + background-repeat: repeat-x; + text-shadow: 0 1px 1px #000000; +} + +.pages { + line-height: 17px; + margin-left: 4px; + text-decoration: none; +} + +.hl { + font-weight: bold; +} + +#searchresults { + margin-bottom: 20px; +} + +.searchpages { + margin-top: 10px; +} + diff --git a/enet server test/enet2/docs/html/search/search.js b/enet server test/enet2/docs/html/search/search.js new file mode 100644 index 0000000..a5158ae --- /dev/null +++ b/enet server test/enet2/docs/html/search/search.js @@ -0,0 +1,813 @@ +// Search script generated by doxygen +// Copyright (C) 2009 by Dimitri van Heesch. + +// The code in this file is loosly based on main.js, part of Natural Docs, +// which is Copyright (C) 2003-2008 Greg Valure +// Natural Docs is licensed under the GPL. + +var indexSectionsWithContent = +{ + 0: "abcdefhilmnoprstuvw", + 1: "e", + 2: "cdefhilmptuw", + 3: "e", + 4: "abcdefhilmnoprstuvw", + 5: "es", + 6: "e", + 7: "e", + 8: "em", + 9: "e", + 10: "defilmt" +}; + +var indexSectionNames = +{ + 0: "all", + 1: "classes", + 2: "files", + 3: "functions", + 4: "variables", + 5: "typedefs", + 6: "enums", + 7: "enumvalues", + 8: "defines", + 9: "groups", + 10: "pages" +}; + +function convertToId(search) +{ + var result = ''; + for (i=0;i do a search + { + this.Search(); + } + } + + this.OnSearchSelectKey = function(evt) + { + var e = (evt) ? evt : window.event; // for IE + if (e.keyCode==40 && this.searchIndex0) // Up + { + this.searchIndex--; + this.OnSelectItem(this.searchIndex); + } + else if (e.keyCode==13 || e.keyCode==27) + { + this.OnSelectItem(this.searchIndex); + this.CloseSelectionWindow(); + this.DOMSearchField().focus(); + } + return false; + } + + // --------- Actions + + // Closes the results window. + this.CloseResultsWindow = function() + { + this.DOMPopupSearchResultsWindow().style.display = 'none'; + this.DOMSearchClose().style.display = 'none'; + this.Activate(false); + } + + this.CloseSelectionWindow = function() + { + this.DOMSearchSelectWindow().style.display = 'none'; + } + + // Performs a search. + this.Search = function() + { + this.keyTimeout = 0; + + // strip leading whitespace + var searchValue = this.DOMSearchField().value.replace(/^ +/, ""); + + var code = searchValue.toLowerCase().charCodeAt(0); + var idxChar = searchValue.substr(0, 1).toLowerCase(); + if ( 0xD800 <= code && code <= 0xDBFF && searchValue > 1) // surrogate pair + { + idxChar = searchValue.substr(0, 2); + } + + var resultsPage; + var resultsPageWithSearch; + var hasResultsPage; + + var idx = indexSectionsWithContent[this.searchIndex].indexOf(idxChar); + if (idx!=-1) + { + var hexCode=idx.toString(16); + resultsPage = this.resultsPath + '/' + indexSectionNames[this.searchIndex] + '_' + hexCode + '.html'; + resultsPageWithSearch = resultsPage+'?'+escape(searchValue); + hasResultsPage = true; + } + else // nothing available for this search term + { + resultsPage = this.resultsPath + '/nomatches.html'; + resultsPageWithSearch = resultsPage; + hasResultsPage = false; + } + + window.frames.MSearchResults.location = resultsPageWithSearch; + var domPopupSearchResultsWindow = this.DOMPopupSearchResultsWindow(); + + if (domPopupSearchResultsWindow.style.display!='block') + { + var domSearchBox = this.DOMSearchBox(); + this.DOMSearchClose().style.display = 'inline'; + if (this.insideFrame) + { + var domPopupSearchResults = this.DOMPopupSearchResults(); + domPopupSearchResultsWindow.style.position = 'relative'; + domPopupSearchResultsWindow.style.display = 'block'; + var width = document.body.clientWidth - 8; // the -8 is for IE :-( + domPopupSearchResultsWindow.style.width = width + 'px'; + domPopupSearchResults.style.width = width + 'px'; + } + else + { + var domPopupSearchResults = this.DOMPopupSearchResults(); + var left = getXPos(domSearchBox) + 150; // domSearchBox.offsetWidth; + var top = getYPos(domSearchBox) + 20; // domSearchBox.offsetHeight + 1; + domPopupSearchResultsWindow.style.display = 'block'; + left -= domPopupSearchResults.offsetWidth; + domPopupSearchResultsWindow.style.top = top + 'px'; + domPopupSearchResultsWindow.style.left = left + 'px'; + } + } + + this.lastSearchValue = searchValue; + this.lastResultsPage = resultsPage; + } + + // -------- Activation Functions + + // Activates or deactivates the search panel, resetting things to + // their default values if necessary. + this.Activate = function(isActive) + { + if (isActive || // open it + this.DOMPopupSearchResultsWindow().style.display == 'block' + ) + { + this.DOMSearchBox().className = 'MSearchBoxActive'; + + var searchField = this.DOMSearchField(); + + if (searchField.value == this.searchLabel) // clear "Search" term upon entry + { + searchField.value = ''; + this.searchActive = true; + } + } + else if (!isActive) // directly remove the panel + { + this.DOMSearchBox().className = 'MSearchBoxInactive'; + this.DOMSearchField().value = this.searchLabel; + this.searchActive = false; + this.lastSearchValue = '' + this.lastResultsPage = ''; + } + } +} + +// ----------------------------------------------------------------------- + +// The class that handles everything on the search results page. +function SearchResults(name) +{ + // The number of matches from the last run of . + this.lastMatchCount = 0; + this.lastKey = 0; + this.repeatOn = false; + + // Toggles the visibility of the passed element ID. + this.FindChildElement = function(id) + { + var parentElement = document.getElementById(id); + var element = parentElement.firstChild; + + while (element && element!=parentElement) + { + if (element.nodeName == 'DIV' && element.className == 'SRChildren') + { + return element; + } + + if (element.nodeName == 'DIV' && element.hasChildNodes()) + { + element = element.firstChild; + } + else if (element.nextSibling) + { + element = element.nextSibling; + } + else + { + do + { + element = element.parentNode; + } + while (element && element!=parentElement && !element.nextSibling); + + if (element && element!=parentElement) + { + element = element.nextSibling; + } + } + } + } + + this.Toggle = function(id) + { + var element = this.FindChildElement(id); + if (element) + { + if (element.style.display == 'block') + { + element.style.display = 'none'; + } + else + { + element.style.display = 'block'; + } + } + } + + // Searches for the passed string. If there is no parameter, + // it takes it from the URL query. + // + // Always returns true, since other documents may try to call it + // and that may or may not be possible. + this.Search = function(search) + { + if (!search) // get search word from URL + { + search = window.location.search; + search = search.substring(1); // Remove the leading '?' + search = unescape(search); + } + + search = search.replace(/^ +/, ""); // strip leading spaces + search = search.replace(/ +$/, ""); // strip trailing spaces + search = search.toLowerCase(); + search = convertToId(search); + + var resultRows = document.getElementsByTagName("div"); + var matches = 0; + + var i = 0; + while (i < resultRows.length) + { + var row = resultRows.item(i); + if (row.className == "SRResult") + { + var rowMatchName = row.id.toLowerCase(); + rowMatchName = rowMatchName.replace(/^sr\d*_/, ''); // strip 'sr123_' + + if (search.length<=rowMatchName.length && + rowMatchName.substr(0, search.length)==search) + { + row.style.display = 'block'; + matches++; + } + else + { + row.style.display = 'none'; + } + } + i++; + } + document.getElementById("Searching").style.display='none'; + if (matches == 0) // no results + { + document.getElementById("NoMatches").style.display='block'; + } + else // at least one result + { + document.getElementById("NoMatches").style.display='none'; + } + this.lastMatchCount = matches; + return true; + } + + // return the first item with index index or higher that is visible + this.NavNext = function(index) + { + var focusItem; + while (1) + { + var focusName = 'Item'+index; + focusItem = document.getElementById(focusName); + if (focusItem && focusItem.parentNode.parentNode.style.display=='block') + { + break; + } + else if (!focusItem) // last element + { + break; + } + focusItem=null; + index++; + } + return focusItem; + } + + this.NavPrev = function(index) + { + var focusItem; + while (1) + { + var focusName = 'Item'+index; + focusItem = document.getElementById(focusName); + if (focusItem && focusItem.parentNode.parentNode.style.display=='block') + { + break; + } + else if (!focusItem) // last element + { + break; + } + focusItem=null; + index--; + } + return focusItem; + } + + this.ProcessKeys = function(e) + { + if (e.type == "keydown") + { + this.repeatOn = false; + this.lastKey = e.keyCode; + } + else if (e.type == "keypress") + { + if (!this.repeatOn) + { + if (this.lastKey) this.repeatOn = true; + return false; // ignore first keypress after keydown + } + } + else if (e.type == "keyup") + { + this.lastKey = 0; + this.repeatOn = false; + } + return this.lastKey!=0; + } + + this.Nav = function(evt,itemIndex) + { + var e = (evt) ? evt : window.event; // for IE + if (e.keyCode==13) return true; + if (!this.ProcessKeys(e)) return false; + + if (this.lastKey==38) // Up + { + var newIndex = itemIndex-1; + var focusItem = this.NavPrev(newIndex); + if (focusItem) + { + var child = this.FindChildElement(focusItem.parentNode.parentNode.id); + if (child && child.style.display == 'block') // children visible + { + var n=0; + var tmpElem; + while (1) // search for last child + { + tmpElem = document.getElementById('Item'+newIndex+'_c'+n); + if (tmpElem) + { + focusItem = tmpElem; + } + else // found it! + { + break; + } + n++; + } + } + } + if (focusItem) + { + focusItem.focus(); + } + else // return focus to search field + { + parent.document.getElementById("MSearchField").focus(); + } + } + else if (this.lastKey==40) // Down + { + var newIndex = itemIndex+1; + var focusItem; + var item = document.getElementById('Item'+itemIndex); + var elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem && elem.style.display == 'block') // children visible + { + focusItem = document.getElementById('Item'+itemIndex+'_c0'); + } + if (!focusItem) focusItem = this.NavNext(newIndex); + if (focusItem) focusItem.focus(); + } + else if (this.lastKey==39) // Right + { + var item = document.getElementById('Item'+itemIndex); + var elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem) elem.style.display = 'block'; + } + else if (this.lastKey==37) // Left + { + var item = document.getElementById('Item'+itemIndex); + var elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem) elem.style.display = 'none'; + } + else if (this.lastKey==27) // Escape + { + parent.searchBox.CloseResultsWindow(); + parent.document.getElementById("MSearchField").focus(); + } + else if (this.lastKey==13) // Enter + { + return true; + } + return false; + } + + this.NavChild = function(evt,itemIndex,childIndex) + { + var e = (evt) ? evt : window.event; // for IE + if (e.keyCode==13) return true; + if (!this.ProcessKeys(e)) return false; + + if (this.lastKey==38) // Up + { + if (childIndex>0) + { + var newIndex = childIndex-1; + document.getElementById('Item'+itemIndex+'_c'+newIndex).focus(); + } + else // already at first child, jump to parent + { + document.getElementById('Item'+itemIndex).focus(); + } + } + else if (this.lastKey==40) // Down + { + var newIndex = childIndex+1; + var elem = document.getElementById('Item'+itemIndex+'_c'+newIndex); + if (!elem) // last child, jump to parent next parent + { + elem = this.NavNext(itemIndex+1); + } + if (elem) + { + elem.focus(); + } + } + else if (this.lastKey==27) // Escape + { + parent.searchBox.CloseResultsWindow(); + parent.document.getElementById("MSearchField").focus(); + } + else if (this.lastKey==13) // Enter + { + return true; + } + return false; + } +} + +function setKeyActions(elem,action) +{ + elem.setAttribute('onkeydown',action); + elem.setAttribute('onkeypress',action); + elem.setAttribute('onkeyup',action); +} + +function setClassAttr(elem,attr) +{ + elem.setAttribute('class',attr); + elem.setAttribute('className',attr); +} + +function createResults() +{ + var results = document.getElementById("SRResults"); + for (var e=0; ek7RCwB~R6VQOP#AvB$vH7i{6H{96zot$7cZT<7246EF5Np6N}+$IbiG6W zg#87A+NFaX+=_^xM1#gCtshC=E{%9^uQX_%?YwXvo{#q&MnpJ8uh(O?ZRc&~_1%^SsPxG@rfElJg-?U zm!Cz-IOn(qJP3kDp-^~qt+FGbl=5jNli^Wj_xIBG{Rc0en{!oFvyoNC7{V~T8}b>| z=jL2WIReZzX(YN(_9fV;BBD$VXQIxNasAL8ATvEu822WQ%mvv4FO#qs` BFGc_W literal 0 HcmV?d00001 diff --git a/enet server test/enet2/docs/html/search/search_r.png b/enet server test/enet2/docs/html/search/search_r.png new file mode 100644 index 0000000000000000000000000000000000000000..97ee8b439687084201b79c6f776a41f495c6392a GIT binary patch literal 612 zcmV-q0-ODbP)PbXFRCwB?)W514K@j&X?z2*SxFI6-@HT2E2K=9X9%Pb zEK*!TBw&g(DMC;|A)uGlRkOS9vd-?zNs%bR4d$w+ox_iFnE8fvIvv7^5<(>Te12Li z7C)9srCzmK{ZcNM{YIl9j{DePFgOWiS%xG@5CnnnJa4nvY<^glbz7^|-ZY!dUkAwd z{gaTC@_>b5h~;ug#R0wRL0>o5!hxm*s0VW?8dr}O#zXTRTnrQm_Z7z1Mrnx>&p zD4qifUjzLvbVVWi?l?rUzwt^sdb~d!f_LEhsRVIXZtQ=qSxuxqm zEX#tf>$?M_Y1-LSDT)HqG?`%-%ZpY!#{N!rcNIiL;G7F0`l?)mNGTD9;f9F5Up3Kg zw}a<-JylhG&;=!>B+fZaCX+?C+kHYrP%c?X2!Zu_olK|GcS4A70HEy;vn)I0>0kLH z`jc(WIaaHc7!HS@f*^R^Znx8W=_jIl2oWJoQ*h1^$FX!>*PqR1J8k|fw}w_y}TpE>7m8DqDO<3z`OzXt$ccSejbEZCg@0000 + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/enet server test/enet2/docs/html/search/typedefs_0.js b/enet server test/enet2/docs/html/search/typedefs_0.js new file mode 100644 index 0000000..2e3c839 --- /dev/null +++ b/enet server test/enet2/docs/html/search/typedefs_0.js @@ -0,0 +1,13 @@ +var searchData= +[ + ['enet_5fuint16',['enet_uint16',['../types_8h.html#a245102585fdf31bdf208639ef47bec5d',1,'types.h']]], + ['enet_5fuint32',['enet_uint32',['../types_8h.html#a5273659ca3c664b8550452732e9e4ae3',1,'types.h']]], + ['enet_5fuint8',['enet_uint8',['../types_8h.html#a34ce80c65abc6389fe0121a83d757f07',1,'types.h']]], + ['enetchecksumcallback',['ENetChecksumCallback',['../enet_8h.html#af4eaf23993845f97aa0ff223db7f53f0',1,'enet.h']]], + ['enetinterceptcallback',['ENetInterceptCallback',['../enet_8h.html#af131c9ddde1deed06e51499b6cff44bf',1,'enet.h']]], + ['enetlistiterator',['ENetListIterator',['../list_8h.html#acb50c267c16b56058e231e2a82530d05',1,'list.h']]], + ['enetpacketfreecallback',['ENetPacketFreeCallback',['../enet_8h.html#a93c01a8aa9345f7b5043a7caf0633c0c',1,'enet.h']]], + ['enetsocket',['ENetSocket',['../unix_8h.html#a22cf07f75b30cc43ecf9febbb244b537',1,'ENetSocket(): unix.h'],['../win32_8h.html#aaf990406be53b36b6700caff8c9193f2',1,'ENetSocket(): win32.h']]], + ['enetsocketset',['ENetSocketSet',['../unix_8h.html#ab8c03b0a5df283d329adf245e1f96622',1,'ENetSocketSet(): unix.h'],['../win32_8h.html#ab8c03b0a5df283d329adf245e1f96622',1,'ENetSocketSet(): win32.h']]], + ['enetversion',['ENetVersion',['../enet_8h.html#a7e77c317884b9dc06ae73615f8da9a6f',1,'enet.h']]] +]; diff --git a/enet server test/enet2/docs/html/search/typedefs_1.html b/enet server test/enet2/docs/html/search/typedefs_1.html new file mode 100644 index 0000000..ad5e647 --- /dev/null +++ b/enet server test/enet2/docs/html/search/typedefs_1.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/enet server test/enet2/docs/html/search/typedefs_1.js b/enet server test/enet2/docs/html/search/typedefs_1.js new file mode 100644 index 0000000..e09c290 --- /dev/null +++ b/enet server test/enet2/docs/html/search/typedefs_1.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['socklen_5ft',['socklen_t',['../unix_8c.html#a6b82106923cc13b3a9734520ecc29514',1,'unix.c']]] +]; diff --git a/enet server test/enet2/docs/html/search/variables_0.html b/enet server test/enet2/docs/html/search/variables_0.html new file mode 100644 index 0000000..571f394 --- /dev/null +++ b/enet server test/enet2/docs/html/search/variables_0.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/enet server test/enet2/docs/html/search/variables_0.js b/enet server test/enet2/docs/html/search/variables_0.js new file mode 100644 index 0000000..c6ad75d --- /dev/null +++ b/enet server test/enet2/docs/html/search/variables_0.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['acknowledge',['acknowledge',['../unionENetProtocol.html#a30482b928c5695a9b06b3c168f385605',1,'ENetProtocol']]], + ['acknowledgementlist',['acknowledgementList',['../structENetAcknowledgement.html#aaf33be5414673ff9bf830f871bcc0d65',1,'ENetAcknowledgement']]], + ['acknowledgements',['acknowledgements',['../structENetPeer.html#ad0e3bd1e4538ed15b2fd2d1cb85f663a',1,'ENetPeer']]], + ['address',['address',['../structENetPeer.html#a768b9ac6a9b3bfba0d36aa1c719359b9',1,'ENetPeer::address()'],['../structENetHost.html#aea7ae36e8589a52fe7322bcc26351e71',1,'ENetHost::address()']]] +]; diff --git a/enet server test/enet2/docs/html/search/variables_1.html b/enet server test/enet2/docs/html/search/variables_1.html new file mode 100644 index 0000000..cef7a9e --- /dev/null +++ b/enet server test/enet2/docs/html/search/variables_1.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/enet server test/enet2/docs/html/search/variables_1.js b/enet server test/enet2/docs/html/search/variables_1.js new file mode 100644 index 0000000..18cab3d --- /dev/null +++ b/enet server test/enet2/docs/html/search/variables_1.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['bandwidthlimit',['bandwidthLimit',['../unionENetProtocol.html#aafd0984623506e6a675fa94c268aa73d',1,'ENetProtocol']]], + ['bandwidthlimitedpeers',['bandwidthLimitedPeers',['../structENetHost.html#a62b9c59f5d05482bc1fc01e08af8c0c3',1,'ENetHost']]], + ['bandwidththrottleepoch',['bandwidthThrottleEpoch',['../structENetHost.html#a0d85f7ef4e6cf67b741745f164cf43f2',1,'ENetHost']]], + ['buffercount',['bufferCount',['../structENetHost.html#aed737c71970c018eb4b97c70732b1098',1,'ENetHost']]], + ['buffers',['buffers',['../structENetHost.html#a1eda9709ab5cf576a04d76b601a457c2',1,'ENetHost']]] +]; diff --git a/enet server test/enet2/docs/html/search/variables_10.html b/enet server test/enet2/docs/html/search/variables_10.html new file mode 100644 index 0000000..7c459b6 --- /dev/null +++ b/enet server test/enet2/docs/html/search/variables_10.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/enet server test/enet2/docs/html/search/variables_10.js b/enet server test/enet2/docs/html/search/variables_10.js new file mode 100644 index 0000000..d093397 --- /dev/null +++ b/enet server test/enet2/docs/html/search/variables_10.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['unreliablesequencenumber',['unreliableSequenceNumber',['../structENetOutgoingCommand.html#a8d7cf412de3b1ce53147becc1476d7da',1,'ENetOutgoingCommand::unreliableSequenceNumber()'],['../structENetIncomingCommand.html#a6e31e6e0ea7bf56f255d21b58285f003',1,'ENetIncomingCommand::unreliableSequenceNumber()'],['../structENetProtocolSendUnreliable.html#a0f03505c1afe4d4b7cc32229b6442c0b',1,'ENetProtocolSendUnreliable::unreliableSequenceNumber()']]], + ['unsequencedgroup',['unsequencedGroup',['../structENetProtocolSendUnsequenced.html#a099dfce39def998b61285ef9cb5e3f84',1,'ENetProtocolSendUnsequenced']]], + ['unsequencedwindow',['unsequencedWindow',['../structENetPeer.html#aadd45fdbc347e69b55820927d38197cd',1,'ENetPeer']]], + ['usedreliablewindows',['usedReliableWindows',['../structENetChannel.html#adf6ee9725fb99751f778a97d2473a204',1,'ENetChannel']]], + ['userdata',['userData',['../structENetPacket.html#a588f6c3be6263ecc7ed8d3412c3e47ea',1,'ENetPacket']]] +]; diff --git a/enet server test/enet2/docs/html/search/variables_11.html b/enet server test/enet2/docs/html/search/variables_11.html new file mode 100644 index 0000000..c45e3f1 --- /dev/null +++ b/enet server test/enet2/docs/html/search/variables_11.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/enet server test/enet2/docs/html/search/variables_11.js b/enet server test/enet2/docs/html/search/variables_11.js new file mode 100644 index 0000000..1e20db7 --- /dev/null +++ b/enet server test/enet2/docs/html/search/variables_11.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['verifyconnect',['verifyConnect',['../unionENetProtocol.html#af89fdeed1763f038c37286652f8a8605',1,'ENetProtocol']]] +]; diff --git a/enet server test/enet2/docs/html/search/variables_12.html b/enet server test/enet2/docs/html/search/variables_12.html new file mode 100644 index 0000000..1437912 --- /dev/null +++ b/enet server test/enet2/docs/html/search/variables_12.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/enet server test/enet2/docs/html/search/variables_12.js b/enet server test/enet2/docs/html/search/variables_12.js new file mode 100644 index 0000000..babc78b --- /dev/null +++ b/enet server test/enet2/docs/html/search/variables_12.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['windowsize',['windowSize',['../structENetPeer.html#aa900e45d419db8b7a692086ec867a883',1,'ENetPeer::windowSize()'],['../structENetProtocolConnect.html#ac42fa69f46a37c56ff32f9baf05c5dd5',1,'ENetProtocolConnect::windowSize()'],['../structENetProtocolVerifyConnect.html#aa5b48a1dbb9755c1fb7dbd32ac182e22',1,'ENetProtocolVerifyConnect::windowSize()']]] +]; diff --git a/enet server test/enet2/docs/html/search/variables_2.html b/enet server test/enet2/docs/html/search/variables_2.html new file mode 100644 index 0000000..b299c29 --- /dev/null +++ b/enet server test/enet2/docs/html/search/variables_2.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/enet server test/enet2/docs/html/search/variables_2.js b/enet server test/enet2/docs/html/search/variables_2.js new file mode 100644 index 0000000..a86b899 --- /dev/null +++ b/enet server test/enet2/docs/html/search/variables_2.js @@ -0,0 +1,18 @@ +var searchData= +[ + ['channelcount',['channelCount',['../structENetPeer.html#a10514f51617f947505d190be1068416e',1,'ENetPeer::channelCount()'],['../structENetProtocolConnect.html#a35fed3f08d03fd566780966ad9b96f6d',1,'ENetProtocolConnect::channelCount()'],['../structENetProtocolVerifyConnect.html#ac919178152ca3c5a7c651c447733d963',1,'ENetProtocolVerifyConnect::channelCount()']]], + ['channelid',['channelID',['../structENetEvent.html#acb5dbd1069138e561e310bc4a3e4d861',1,'ENetEvent::channelID()'],['../structENetProtocolCommandHeader.html#a2ec7e1f192df3a449db67f3528ef877d',1,'ENetProtocolCommandHeader::channelID()']]], + ['channellimit',['channelLimit',['../structENetHost.html#a1876000cbf52f8b8667e6d4882d23cb1',1,'ENetHost']]], + ['channels',['channels',['../structENetPeer.html#a099b261d578e2f096132214877e84385',1,'ENetPeer']]], + ['checksum',['checksum',['../structENetHost.html#acf22123cd131746367bc4111470fc596',1,'ENetHost']]], + ['command',['command',['../structENetAcknowledgement.html#adaedb41c2536f0e886bbbbeca9035731',1,'ENetAcknowledgement::command()'],['../structENetOutgoingCommand.html#ac29d1868027d963ebb23666f419eb982',1,'ENetOutgoingCommand::command()'],['../structENetIncomingCommand.html#ac20d496fa0e1f155b46bffe3a4d47365',1,'ENetIncomingCommand::command()'],['../structENetProtocolCommandHeader.html#a9ee2cae57bf786e03f9e3bba651467f1',1,'ENetProtocolCommandHeader::command()']]], + ['commandcount',['commandCount',['../structENetHost.html#a118c74489b3f7f75d77f469709fda24f',1,'ENetHost']]], + ['commands',['commands',['../structENetHost.html#ab7ca5451e9b1c0152ce4a02c2292a3c3',1,'ENetHost']]], + ['compress',['compress',['../structENetCompressor.html#a54c4b6e40e7f4fb1303d19c4e747e81c',1,'ENetCompressor']]], + ['compressor',['compressor',['../structENetHost.html#ab87717c9898c01920151df8152fbc0cb',1,'ENetHost']]], + ['connect',['connect',['../unionENetProtocol.html#a018e71efe7c4f1d697ae827f6329fcbd',1,'ENetProtocol']]], + ['connectedpeers',['connectedPeers',['../structENetHost.html#a83ecae43b7fb248f5403e6448f687572',1,'ENetHost']]], + ['connectid',['connectID',['../structENetPeer.html#a2a0fe042c431e3b6250e86b8774b3481',1,'ENetPeer::connectID()'],['../structENetProtocolConnect.html#a76ff292f727b86eb08c93d235b19322e',1,'ENetProtocolConnect::connectID()'],['../structENetProtocolVerifyConnect.html#ae2f2c11239b7c31ddb901aaec2e77915',1,'ENetProtocolVerifyConnect::connectID()']]], + ['context',['context',['../structENetCompressor.html#ae01e244e126a66702e489c9c6f68a4fc',1,'ENetCompressor']]], + ['continuesending',['continueSending',['../structENetHost.html#a8c9eef8e7c918c8bd5f8070b584c72b1',1,'ENetHost']]] +]; diff --git a/enet server test/enet2/docs/html/search/variables_3.html b/enet server test/enet2/docs/html/search/variables_3.html new file mode 100644 index 0000000..a7d2186 --- /dev/null +++ b/enet server test/enet2/docs/html/search/variables_3.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/enet server test/enet2/docs/html/search/variables_3.js b/enet server test/enet2/docs/html/search/variables_3.js new file mode 100644 index 0000000..e179d50 --- /dev/null +++ b/enet server test/enet2/docs/html/search/variables_3.js @@ -0,0 +1,12 @@ +var searchData= +[ + ['data',['data',['../structENetPacket.html#a6343ca4cac69351d1a29ab4239b0bb18',1,'ENetPacket::data()'],['../structENetPeer.html#a1873959810db7ac7a02da90469ee384e',1,'ENetPeer::data()'],['../structENetEvent.html#a78c116a5ab40ebfeca7032f1f15a41e9',1,'ENetEvent::data()'],['../structENetProtocolConnect.html#a8853ff683f023ef4e5dc8bb619294c06',1,'ENetProtocolConnect::data()'],['../structENetProtocolDisconnect.html#afa4e84666dfd7929f2f8a3bd50598f7a',1,'ENetProtocolDisconnect::data()'],['../structENetBuffer.html#a9195f47c4247dd4380df190933aca738',1,'ENetBuffer::data()']]], + ['datalength',['dataLength',['../structENetPacket.html#a8a0d8b423000898a46076a4a7ab2a38d',1,'ENetPacket::dataLength()'],['../structENetProtocolSendReliable.html#abb88deaa23f9a028c36201f776777f37',1,'ENetProtocolSendReliable::dataLength()'],['../structENetProtocolSendUnreliable.html#a3e4fdfba42935e1a384a4d1b4232c8a2',1,'ENetProtocolSendUnreliable::dataLength()'],['../structENetProtocolSendUnsequenced.html#a717e103d5af7ffdc90ce7133060f2de3',1,'ENetProtocolSendUnsequenced::dataLength()'],['../structENetProtocolSendFragment.html#a8ccc7ac4f33d38870ddd08ab4b86c1b6',1,'ENetProtocolSendFragment::dataLength()'],['../structENetBuffer.html#a6a518d5b20d16389e331f24521a1a1c9',1,'ENetBuffer::dataLength()']]], + ['decompress',['decompress',['../structENetCompressor.html#a1e335c65f9c9219227640061487d77c1',1,'ENetCompressor']]], + ['destroy',['destroy',['../structENetCompressor.html#a561f91953554059321a3144361459b3a',1,'ENetCompressor']]], + ['disconnect',['disconnect',['../unionENetProtocol.html#a1a0cf3a5081baa2f8af4c09631164eeb',1,'ENetProtocol']]], + ['dispatchedcommands',['dispatchedCommands',['../structENetPeer.html#a83b5c0ff3365c87c37c3a91abf5cfb54',1,'ENetPeer']]], + ['dispatchlist',['dispatchList',['../structENetPeer.html#a6cc1b410a2ca95607a2f99c449b6476d',1,'ENetPeer']]], + ['dispatchqueue',['dispatchQueue',['../structENetHost.html#a8523b42840bfb5d4564ad04c747ec887',1,'ENetHost']]], + ['duplicatepeers',['duplicatePeers',['../structENetHost.html#a6f26c90c0f1c9d9e3b7d851432b71ac2',1,'ENetHost']]] +]; diff --git a/enet server test/enet2/docs/html/search/variables_4.html b/enet server test/enet2/docs/html/search/variables_4.html new file mode 100644 index 0000000..2f6da69 --- /dev/null +++ b/enet server test/enet2/docs/html/search/variables_4.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/enet server test/enet2/docs/html/search/variables_4.js b/enet server test/enet2/docs/html/search/variables_4.js new file mode 100644 index 0000000..71e0b67 --- /dev/null +++ b/enet server test/enet2/docs/html/search/variables_4.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['earliesttimeout',['earliestTimeout',['../structENetPeer.html#a06f1707071193b7d8bd2f8ed7f12510d',1,'ENetPeer']]], + ['eventdata',['eventData',['../structENetPeer.html#a4869521e9b8aa67dccddd23a7955025b',1,'ENetPeer']]] +]; diff --git a/enet server test/enet2/docs/html/search/variables_5.html b/enet server test/enet2/docs/html/search/variables_5.html new file mode 100644 index 0000000..6deb056 --- /dev/null +++ b/enet server test/enet2/docs/html/search/variables_5.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/enet server test/enet2/docs/html/search/variables_5.js b/enet server test/enet2/docs/html/search/variables_5.js new file mode 100644 index 0000000..8347ce7 --- /dev/null +++ b/enet server test/enet2/docs/html/search/variables_5.js @@ -0,0 +1,12 @@ +var searchData= +[ + ['flags',['flags',['../structENetPacket.html#afe56ea0c19dcbcdb3e48361a8b9ef190',1,'ENetPacket']]], + ['fragmentcount',['fragmentCount',['../structENetIncomingCommand.html#a045997566fdb38517b7a775355e5be95',1,'ENetIncomingCommand::fragmentCount()'],['../structENetProtocolSendFragment.html#a8b3afd14b9d2a30683ac404f533bcfa9',1,'ENetProtocolSendFragment::fragmentCount()']]], + ['fragmentlength',['fragmentLength',['../structENetOutgoingCommand.html#aff231b94d1bb07bc99f43041ea63cb3c',1,'ENetOutgoingCommand']]], + ['fragmentnumber',['fragmentNumber',['../structENetProtocolSendFragment.html#abff93e4f5f1f08ca1aadace7bdf5c437',1,'ENetProtocolSendFragment']]], + ['fragmentoffset',['fragmentOffset',['../structENetOutgoingCommand.html#a2e4ca8e0be684aef02086d4f1a778524',1,'ENetOutgoingCommand::fragmentOffset()'],['../structENetProtocolSendFragment.html#a242d3ad63ca86988e4a698cc4bb33c7e',1,'ENetProtocolSendFragment::fragmentOffset()']]], + ['fragments',['fragments',['../structENetIncomingCommand.html#ab6e89f5c93ffd70301e40920fa453ccd',1,'ENetIncomingCommand']]], + ['fragmentsremaining',['fragmentsRemaining',['../structENetIncomingCommand.html#a9a81258c1c0ec7fedfdc0d4ff20807b0',1,'ENetIncomingCommand']]], + ['free',['free',['../structENetCallbacks.html#af977cd405d99d1b13812af7e09462acb',1,'ENetCallbacks']]], + ['freecallback',['freeCallback',['../structENetPacket.html#ad602d6b6b35ef88b2b2e080fa5c9dc3d',1,'ENetPacket']]] +]; diff --git a/enet server test/enet2/docs/html/search/variables_6.html b/enet server test/enet2/docs/html/search/variables_6.html new file mode 100644 index 0000000..43a19b6 --- /dev/null +++ b/enet server test/enet2/docs/html/search/variables_6.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/enet server test/enet2/docs/html/search/variables_6.js b/enet server test/enet2/docs/html/search/variables_6.js new file mode 100644 index 0000000..7d0fb50 --- /dev/null +++ b/enet server test/enet2/docs/html/search/variables_6.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['header',['header',['../structENetProtocolAcknowledge.html#a2aeb97d2dac9db9d039afa3978a15794',1,'ENetProtocolAcknowledge::header()'],['../structENetProtocolConnect.html#ac4519caef688d50ba7192f97a13a3d15',1,'ENetProtocolConnect::header()'],['../structENetProtocolVerifyConnect.html#a6cb9f415fbfa1d80d2f8801345a23f50',1,'ENetProtocolVerifyConnect::header()'],['../structENetProtocolBandwidthLimit.html#a8e21c2e05c8283d2046e169741eca485',1,'ENetProtocolBandwidthLimit::header()'],['../structENetProtocolThrottleConfigure.html#a4faa94a0f97f39e2269199aef9527dd7',1,'ENetProtocolThrottleConfigure::header()'],['../structENetProtocolDisconnect.html#a93792d28d2749dde1d73d6c384c43f55',1,'ENetProtocolDisconnect::header()'],['../structENetProtocolPing.html#ac8c3ed7a37af977a82080c19d4cb45e0',1,'ENetProtocolPing::header()'],['../structENetProtocolSendReliable.html#adfe769ebe60e4776c6afedf8b5cf2da8',1,'ENetProtocolSendReliable::header()'],['../structENetProtocolSendUnreliable.html#a4abf781528429b0ca49192e66126e4f1',1,'ENetProtocolSendUnreliable::header()'],['../structENetProtocolSendUnsequenced.html#ae4ebee5be568c0a6a70f0e44866645c3',1,'ENetProtocolSendUnsequenced::header()'],['../structENetProtocolSendFragment.html#aaed193de3a9b832537b7cdc9a0ecd3a5',1,'ENetProtocolSendFragment::header()'],['../unionENetProtocol.html#a9858eacc1f6aafea63c29f1fa46b8d79',1,'ENetProtocol::header()']]], + ['headerflags',['headerFlags',['../structENetHost.html#a15cf66009846d9b052b3f4b4b9563f45',1,'ENetHost']]], + ['highestroundtriptimevariance',['highestRoundTripTimeVariance',['../structENetPeer.html#a4774e270290d487bef34a9319c7b9aaa',1,'ENetPeer']]], + ['host',['host',['../structENetAddress.html#ae9f8d524c982f22bdae56d6a71852d37',1,'ENetAddress::host()'],['../structENetPeer.html#a47bb47f607e767f708e06dbfde3ae82e',1,'ENetPeer::host()']]] +]; diff --git a/enet server test/enet2/docs/html/search/variables_7.html b/enet server test/enet2/docs/html/search/variables_7.html new file mode 100644 index 0000000..22b439e --- /dev/null +++ b/enet server test/enet2/docs/html/search/variables_7.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/enet server test/enet2/docs/html/search/variables_7.js b/enet server test/enet2/docs/html/search/variables_7.js new file mode 100644 index 0000000..95c612a --- /dev/null +++ b/enet server test/enet2/docs/html/search/variables_7.js @@ -0,0 +1,15 @@ +var searchData= +[ + ['incomingbandwidth',['incomingBandwidth',['../structENetPeer.html#ac9266da9a8883b79355aabac6cbf4c82',1,'ENetPeer::incomingBandwidth()'],['../structENetHost.html#a663f01950084c01c49c060975bfe0d81',1,'ENetHost::incomingBandwidth()'],['../structENetProtocolConnect.html#a85524fe299a28645785b74b87f04ebfa',1,'ENetProtocolConnect::incomingBandwidth()'],['../structENetProtocolVerifyConnect.html#a9b02aaa6af235f4f627936ffd1b0522d',1,'ENetProtocolVerifyConnect::incomingBandwidth()'],['../structENetProtocolBandwidthLimit.html#af1d6486798dae522b021342a6997ffff',1,'ENetProtocolBandwidthLimit::incomingBandwidth()']]], + ['incomingbandwidththrottleepoch',['incomingBandwidthThrottleEpoch',['../structENetPeer.html#a665775c5c85bab4baa959846d38e5f2d',1,'ENetPeer']]], + ['incomingcommandlist',['incomingCommandList',['../structENetIncomingCommand.html#a2658b0ec3f27eee346684b73ccc56293',1,'ENetIncomingCommand']]], + ['incomingdatatotal',['incomingDataTotal',['../structENetPeer.html#a7f0ae4fdcbb86e3d6c1b5f5a0501132d',1,'ENetPeer']]], + ['incomingpeerid',['incomingPeerID',['../structENetPeer.html#ac539b6d67f3153cbad231544c7aaa4a6',1,'ENetPeer']]], + ['incomingreliablecommands',['incomingReliableCommands',['../structENetChannel.html#ac293e8e860f97dd646880bcdfcd382bf',1,'ENetChannel']]], + ['incomingreliablesequencenumber',['incomingReliableSequenceNumber',['../structENetChannel.html#a0f0d752172ec193c6a85aa0cf1d7b3f3',1,'ENetChannel']]], + ['incomingsessionid',['incomingSessionID',['../structENetPeer.html#a8af8481d72eb559b0fefe07c010ec739',1,'ENetPeer::incomingSessionID()'],['../structENetProtocolConnect.html#aed276648f472cf34ece49da2274a9502',1,'ENetProtocolConnect::incomingSessionID()'],['../structENetProtocolVerifyConnect.html#a83de75fcf76d9ee2e2afb59569ab4f80',1,'ENetProtocolVerifyConnect::incomingSessionID()']]], + ['incomingunreliablecommands',['incomingUnreliableCommands',['../structENetChannel.html#a37e137086515c59d398c44490e5dd04d',1,'ENetChannel']]], + ['incomingunreliablesequencenumber',['incomingUnreliableSequenceNumber',['../structENetChannel.html#a67eabe5e101ccd03b67f68f2a779e8d4',1,'ENetChannel']]], + ['incomingunsequencedgroup',['incomingUnsequencedGroup',['../structENetPeer.html#ae8692a201cca5a2e136e7aa4282b60c3',1,'ENetPeer']]], + ['intercept',['intercept',['../structENetHost.html#a425ea8ffaaf90e33888611c496be036a',1,'ENetHost']]] +]; diff --git a/enet server test/enet2/docs/html/search/variables_8.html b/enet server test/enet2/docs/html/search/variables_8.html new file mode 100644 index 0000000..cf7a26e --- /dev/null +++ b/enet server test/enet2/docs/html/search/variables_8.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/enet server test/enet2/docs/html/search/variables_8.js b/enet server test/enet2/docs/html/search/variables_8.js new file mode 100644 index 0000000..4d9412d --- /dev/null +++ b/enet server test/enet2/docs/html/search/variables_8.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['lastreceivetime',['lastReceiveTime',['../structENetPeer.html#a164edfde779b855b63439c67c74ca7c6',1,'ENetPeer']]], + ['lastroundtriptime',['lastRoundTripTime',['../structENetPeer.html#a6e3e9030b2fe990f6538f355f81ae9b8',1,'ENetPeer']]], + ['lastroundtriptimevariance',['lastRoundTripTimeVariance',['../structENetPeer.html#ae36dbaed50a4d2cae3b11a7b897e16ae',1,'ENetPeer']]], + ['lastsendtime',['lastSendTime',['../structENetPeer.html#ad9bf776f502ec82fcd6ad81ec8c24ed2',1,'ENetPeer']]], + ['lowestroundtriptime',['lowestRoundTripTime',['../structENetPeer.html#a540213fa154039c4d293feba7058ec06',1,'ENetPeer']]] +]; diff --git a/enet server test/enet2/docs/html/search/variables_9.html b/enet server test/enet2/docs/html/search/variables_9.html new file mode 100644 index 0000000..4efc5aa --- /dev/null +++ b/enet server test/enet2/docs/html/search/variables_9.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/enet server test/enet2/docs/html/search/variables_9.js b/enet server test/enet2/docs/html/search/variables_9.js new file mode 100644 index 0000000..8bf64d3 --- /dev/null +++ b/enet server test/enet2/docs/html/search/variables_9.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['malloc',['malloc',['../structENetCallbacks.html#a69e38439cfc5c418bdd1d4a017932b71',1,'ENetCallbacks']]], + ['maximumpacketsize',['maximumPacketSize',['../structENetHost.html#aa22929bbc19e19ae4b01c7e9b3c0e540',1,'ENetHost']]], + ['maximumwaitingdata',['maximumWaitingData',['../structENetHost.html#a2b7d6895ab4ee6280ef951c1aacfea96',1,'ENetHost']]], + ['mtu',['mtu',['../structENetPeer.html#a426fab3aa0784c3edced30f3fa624e13',1,'ENetPeer::mtu()'],['../structENetHost.html#a70419bc5f5f7cfcac76077db3fc7af22',1,'ENetHost::mtu()'],['../structENetProtocolConnect.html#a938e1df67fbc53281023aee6c552ac27',1,'ENetProtocolConnect::mtu()'],['../structENetProtocolVerifyConnect.html#a3e70e10fb1bf77648fc706c25d05fffa',1,'ENetProtocolVerifyConnect::mtu()']]] +]; diff --git a/enet server test/enet2/docs/html/search/variables_a.html b/enet server test/enet2/docs/html/search/variables_a.html new file mode 100644 index 0000000..04a9a32 --- /dev/null +++ b/enet server test/enet2/docs/html/search/variables_a.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/enet server test/enet2/docs/html/search/variables_a.js b/enet server test/enet2/docs/html/search/variables_a.js new file mode 100644 index 0000000..8ef029e --- /dev/null +++ b/enet server test/enet2/docs/html/search/variables_a.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['needsdispatch',['needsDispatch',['../structENetPeer.html#a4c454ecc84bf1f7137761c9645f176b8',1,'ENetPeer']]], + ['next',['next',['../structENetListNode.html#a53956d514f5779987741dde30503fbac',1,'ENetListNode']]], + ['nexttimeout',['nextTimeout',['../structENetPeer.html#ae2ceeef4daea09bd5af6fda1db45052d',1,'ENetPeer']]], + ['no_5fmemory',['no_memory',['../structENetCallbacks.html#a91fe8797132f66fcedab53d87828069d',1,'ENetCallbacks']]] +]; diff --git a/enet server test/enet2/docs/html/search/variables_b.html b/enet server test/enet2/docs/html/search/variables_b.html new file mode 100644 index 0000000..02bb87b --- /dev/null +++ b/enet server test/enet2/docs/html/search/variables_b.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/enet server test/enet2/docs/html/search/variables_b.js b/enet server test/enet2/docs/html/search/variables_b.js new file mode 100644 index 0000000..e45d175 --- /dev/null +++ b/enet server test/enet2/docs/html/search/variables_b.js @@ -0,0 +1,14 @@ +var searchData= +[ + ['outgoingbandwidth',['outgoingBandwidth',['../structENetPeer.html#a38ca43b3ec9cd51b8120b7c50b03c5f0',1,'ENetPeer::outgoingBandwidth()'],['../structENetHost.html#ac72acde682f903beb2d9713538b6465c',1,'ENetHost::outgoingBandwidth()'],['../structENetProtocolConnect.html#a914f63aba14b68e1bb2dd91ad3b728b9',1,'ENetProtocolConnect::outgoingBandwidth()'],['../structENetProtocolVerifyConnect.html#aedeefa1a8476d74dc432dc8ced4a942e',1,'ENetProtocolVerifyConnect::outgoingBandwidth()'],['../structENetProtocolBandwidthLimit.html#a79205f196d170e6a6184c88d8dcbef76',1,'ENetProtocolBandwidthLimit::outgoingBandwidth()']]], + ['outgoingbandwidththrottleepoch',['outgoingBandwidthThrottleEpoch',['../structENetPeer.html#aa5497f3812d0f3199da559be1fdfefc0',1,'ENetPeer']]], + ['outgoingcommandlist',['outgoingCommandList',['../structENetOutgoingCommand.html#a599e31754d91aefbf6ca62abfb133828',1,'ENetOutgoingCommand']]], + ['outgoingdatatotal',['outgoingDataTotal',['../structENetPeer.html#ab692fa3146864313986cf655f507bcfb',1,'ENetPeer']]], + ['outgoingpeerid',['outgoingPeerID',['../structENetPeer.html#aa595b9bd1a22781cf7e03a41eac17e6b',1,'ENetPeer::outgoingPeerID()'],['../structENetProtocolConnect.html#a9aba2d69d08fd42efaa7e09fe5a8ca37',1,'ENetProtocolConnect::outgoingPeerID()'],['../structENetProtocolVerifyConnect.html#a45b9ebf11adbf8c73891de2279f6e4c4',1,'ENetProtocolVerifyConnect::outgoingPeerID()']]], + ['outgoingreliablecommands',['outgoingReliableCommands',['../structENetPeer.html#a5388ee4e9e723a2ffb0e72685e871cb8',1,'ENetPeer']]], + ['outgoingreliablesequencenumber',['outgoingReliableSequenceNumber',['../structENetChannel.html#a469becdcf5464583b06b62fb93adf156',1,'ENetChannel::outgoingReliableSequenceNumber()'],['../structENetPeer.html#a24013f6a2ca4708beedf9708d7f2841c',1,'ENetPeer::outgoingReliableSequenceNumber()']]], + ['outgoingsessionid',['outgoingSessionID',['../structENetPeer.html#a20da8fe27ea977e30428362c21425eb9',1,'ENetPeer::outgoingSessionID()'],['../structENetProtocolConnect.html#a425c602e41814a1fcea5b171ad4d33af',1,'ENetProtocolConnect::outgoingSessionID()'],['../structENetProtocolVerifyConnect.html#acf3d5ef09045248b0c065b4bf569f8f5',1,'ENetProtocolVerifyConnect::outgoingSessionID()']]], + ['outgoingunreliablecommands',['outgoingUnreliableCommands',['../structENetPeer.html#ab5f244330d752d4f8457da16626ffbf3',1,'ENetPeer']]], + ['outgoingunreliablesequencenumber',['outgoingUnreliableSequenceNumber',['../structENetChannel.html#a2d80cfad0ae9fe809aa58c9e3770dd2e',1,'ENetChannel']]], + ['outgoingunsequencedgroup',['outgoingUnsequencedGroup',['../structENetPeer.html#a623980756d5742862ff73c949a94a0a1',1,'ENetPeer']]] +]; diff --git a/enet server test/enet2/docs/html/search/variables_c.html b/enet server test/enet2/docs/html/search/variables_c.html new file mode 100644 index 0000000..7118dd0 --- /dev/null +++ b/enet server test/enet2/docs/html/search/variables_c.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/enet server test/enet2/docs/html/search/variables_c.js b/enet server test/enet2/docs/html/search/variables_c.js new file mode 100644 index 0000000..243dcee --- /dev/null +++ b/enet server test/enet2/docs/html/search/variables_c.js @@ -0,0 +1,26 @@ +var searchData= +[ + ['packet',['packet',['../structENetOutgoingCommand.html#a040293cbea18bb96c63b4b38827b5248',1,'ENetOutgoingCommand::packet()'],['../structENetIncomingCommand.html#abed0f4c4a55c435e443d0ba971b5156c',1,'ENetIncomingCommand::packet()'],['../structENetEvent.html#a79056ddb1c72af77bc2a4949e102de6f',1,'ENetEvent::packet()']]], + ['packetdata',['packetData',['../structENetHost.html#a0a85c460bba4db9237b3beb64ac67f4b',1,'ENetHost']]], + ['packetloss',['packetLoss',['../structENetPeer.html#afc96187eec160a63528efb77caaac8f8',1,'ENetPeer']]], + ['packetlossepoch',['packetLossEpoch',['../structENetPeer.html#ac84d1c4b453b17197ad3b77b9b8a8826',1,'ENetPeer']]], + ['packetlossvariance',['packetLossVariance',['../structENetPeer.html#a15902fc8e2a3d5b89ca687eea3b39b4a',1,'ENetPeer']]], + ['packetsize',['packetSize',['../structENetHost.html#acb4f130412dd80a83a8ba89cf03384fa',1,'ENetHost']]], + ['packetslost',['packetsLost',['../structENetPeer.html#a52659ec03c512605c9bf654a6765a073',1,'ENetPeer']]], + ['packetssent',['packetsSent',['../structENetPeer.html#a07e7a1f9705f59992c589b862213aa98',1,'ENetPeer']]], + ['packetthrottle',['packetThrottle',['../structENetPeer.html#a22ba880b339bd469e1caabddaec37a0c',1,'ENetPeer']]], + ['packetthrottleacceleration',['packetThrottleAcceleration',['../structENetPeer.html#a9a3c446c77868c74ff765c101c7c3047',1,'ENetPeer::packetThrottleAcceleration()'],['../structENetProtocolConnect.html#af3da06ff27a96ca9f9bdde48102a0c85',1,'ENetProtocolConnect::packetThrottleAcceleration()'],['../structENetProtocolVerifyConnect.html#a2a0de24336b0dc3036af06d3b14dcb71',1,'ENetProtocolVerifyConnect::packetThrottleAcceleration()'],['../structENetProtocolThrottleConfigure.html#a1ef31bd28bc10c1d35a3e5d50dcf06ce',1,'ENetProtocolThrottleConfigure::packetThrottleAcceleration()']]], + ['packetthrottlecounter',['packetThrottleCounter',['../structENetPeer.html#aecdc66b04cf4ad13edacd363a5c82cb0',1,'ENetPeer']]], + ['packetthrottledeceleration',['packetThrottleDeceleration',['../structENetPeer.html#ae4b69e4b96ee6a4e21c4bca27bab6925',1,'ENetPeer::packetThrottleDeceleration()'],['../structENetProtocolConnect.html#a353c4acb61d25360190fbc4473bf2b59',1,'ENetProtocolConnect::packetThrottleDeceleration()'],['../structENetProtocolVerifyConnect.html#a971323a3df66f6160e5caffe87c9f874',1,'ENetProtocolVerifyConnect::packetThrottleDeceleration()'],['../structENetProtocolThrottleConfigure.html#a349abeca18f4711195a45e8e5156beb4',1,'ENetProtocolThrottleConfigure::packetThrottleDeceleration()']]], + ['packetthrottleepoch',['packetThrottleEpoch',['../structENetPeer.html#a065a50f31f4d54e0520371d2cfc0ec29',1,'ENetPeer']]], + ['packetthrottleinterval',['packetThrottleInterval',['../structENetPeer.html#ab8f36cf819168d7338fe991edc4e52b4',1,'ENetPeer::packetThrottleInterval()'],['../structENetProtocolConnect.html#af2e532c7491e2ad460e4cf0bdbe32cb5',1,'ENetProtocolConnect::packetThrottleInterval()'],['../structENetProtocolVerifyConnect.html#a9fe3b617861adb21aa4acb406859c10b',1,'ENetProtocolVerifyConnect::packetThrottleInterval()'],['../structENetProtocolThrottleConfigure.html#ab62b1b22576a8b68c0bb8b4d797eaf7c',1,'ENetProtocolThrottleConfigure::packetThrottleInterval()']]], + ['packetthrottlelimit',['packetThrottleLimit',['../structENetPeer.html#a107e1cb38566fa9c63ec57bae90ac0af',1,'ENetPeer']]], + ['peer',['peer',['../structENetEvent.html#a706a337b56e285825923d5b755f59b2d',1,'ENetEvent']]], + ['peercount',['peerCount',['../structENetHost.html#a7cb88cfe75cb49f48515a75d2f0fb229',1,'ENetHost']]], + ['peerid',['peerID',['../structENetProtocolHeader.html#a110eba85c372656c66be5e886a020056',1,'ENetProtocolHeader']]], + ['peers',['peers',['../structENetHost.html#a0be099c4d0f73090d4a39570e81d260c',1,'ENetHost']]], + ['ping',['ping',['../unionENetProtocol.html#a6c842dabc52deebce5a47e3ee921af8f',1,'ENetProtocol']]], + ['pinginterval',['pingInterval',['../structENetPeer.html#a1c00cd740b6493731607f0bf332bdeef',1,'ENetPeer']]], + ['port',['port',['../structENetAddress.html#afdbc3f833b9b3086401cfcfbd29b73e1',1,'ENetAddress']]], + ['previous',['previous',['../structENetListNode.html#addb71505730bc854435725d8f133b6e5',1,'ENetListNode']]] +]; diff --git a/enet server test/enet2/docs/html/search/variables_d.html b/enet server test/enet2/docs/html/search/variables_d.html new file mode 100644 index 0000000..03f9693 --- /dev/null +++ b/enet server test/enet2/docs/html/search/variables_d.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/enet server test/enet2/docs/html/search/variables_d.js b/enet server test/enet2/docs/html/search/variables_d.js new file mode 100644 index 0000000..757b9cb --- /dev/null +++ b/enet server test/enet2/docs/html/search/variables_d.js @@ -0,0 +1,18 @@ +var searchData= +[ + ['randomseed',['randomSeed',['../structENetHost.html#aaacf0ed7ee6abc032af115ce451244ed',1,'ENetHost']]], + ['recalculatebandwidthlimits',['recalculateBandwidthLimits',['../structENetHost.html#abca5ad8b2fe208d0d4276a307d76274d',1,'ENetHost']]], + ['receivedaddress',['receivedAddress',['../structENetHost.html#a8cb3bbbb506d7bba7904e153f60d0652',1,'ENetHost']]], + ['receiveddata',['receivedData',['../structENetHost.html#a03f8068cd017b8b4c260008e7d4df814',1,'ENetHost']]], + ['receiveddatalength',['receivedDataLength',['../structENetHost.html#a394b5ea73e1706099e37b75448aa179e',1,'ENetHost']]], + ['receivedreliablesequencenumber',['receivedReliableSequenceNumber',['../structENetProtocolAcknowledge.html#a608f96836c614b75e15907405017919a',1,'ENetProtocolAcknowledge']]], + ['receivedsenttime',['receivedSentTime',['../structENetProtocolAcknowledge.html#a4c8955a168d4a105f77253ea925be3c0',1,'ENetProtocolAcknowledge']]], + ['referencecount',['referenceCount',['../structENetPacket.html#a1cf419779484e3df87a773a70d2799b5',1,'ENetPacket']]], + ['reliabledataintransit',['reliableDataInTransit',['../structENetPeer.html#a44527d582ff955199a60e0c86ba22083',1,'ENetPeer']]], + ['reliablesequencenumber',['reliableSequenceNumber',['../structENetOutgoingCommand.html#a9d96a527ebe1923495b57dcc98e75bdc',1,'ENetOutgoingCommand::reliableSequenceNumber()'],['../structENetIncomingCommand.html#a37143ef14d07f060455f9171e75d34b3',1,'ENetIncomingCommand::reliableSequenceNumber()'],['../structENetProtocolCommandHeader.html#a779c44d9f8b37cdc3e57ee10a807cb8d',1,'ENetProtocolCommandHeader::reliableSequenceNumber()']]], + ['reliablewindows',['reliableWindows',['../structENetChannel.html#a513b31028b7cfa6bc7a4457d4db16e1e',1,'ENetChannel']]], + ['roundtriptime',['roundTripTime',['../structENetPeer.html#a3b6841e4b9be13f9323a3c38ee9f2e6c',1,'ENetPeer']]], + ['roundtriptimeout',['roundTripTimeout',['../structENetOutgoingCommand.html#ad34b6b5da0ff9aea7e6f4f5260f9924d',1,'ENetOutgoingCommand']]], + ['roundtriptimeoutlimit',['roundTripTimeoutLimit',['../structENetOutgoingCommand.html#a6b213dacb4e8e58ca2d57d4f4352ceb2',1,'ENetOutgoingCommand']]], + ['roundtriptimevariance',['roundTripTimeVariance',['../structENetPeer.html#aa2599594c3b06b50a1338d20d837ef9c',1,'ENetPeer']]] +]; diff --git a/enet server test/enet2/docs/html/search/variables_e.html b/enet server test/enet2/docs/html/search/variables_e.html new file mode 100644 index 0000000..0914196 --- /dev/null +++ b/enet server test/enet2/docs/html/search/variables_e.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/enet server test/enet2/docs/html/search/variables_e.js b/enet server test/enet2/docs/html/search/variables_e.js new file mode 100644 index 0000000..ace0ad5 --- /dev/null +++ b/enet server test/enet2/docs/html/search/variables_e.js @@ -0,0 +1,16 @@ +var searchData= +[ + ['sendattempts',['sendAttempts',['../structENetOutgoingCommand.html#adb428b139014687c745868b2a46aa770',1,'ENetOutgoingCommand']]], + ['sendfragment',['sendFragment',['../unionENetProtocol.html#a1be92704a9c17056c1640f8f1e103e8a',1,'ENetProtocol']]], + ['sendreliable',['sendReliable',['../unionENetProtocol.html#a2722ec166fe19d17b9fbaf94cd897045',1,'ENetProtocol']]], + ['sendunreliable',['sendUnreliable',['../unionENetProtocol.html#a874c8aa40663bcd3fd2fb36eaa2acbbc',1,'ENetProtocol']]], + ['sendunsequenced',['sendUnsequenced',['../unionENetProtocol.html#abe8585fb1b3fe8ee42c89040ef35163b',1,'ENetProtocol']]], + ['sentinel',['sentinel',['../structENetList.html#a937c404091ae544d6ad1cb90658e42f5',1,'ENetList']]], + ['sentreliablecommands',['sentReliableCommands',['../structENetPeer.html#a254aab87af572caf53276604ce38662b',1,'ENetPeer']]], + ['senttime',['sentTime',['../structENetAcknowledgement.html#aa6f84f5ac5ba50321caaeefbcde42bd5',1,'ENetAcknowledgement::sentTime()'],['../structENetOutgoingCommand.html#a2c44c1a53e3cc717bf441821fc6023e1',1,'ENetOutgoingCommand::sentTime()'],['../structENetProtocolHeader.html#a3d612f11fbf80d2054fdb057e49411a2',1,'ENetProtocolHeader::sentTime()']]], + ['sentunreliablecommands',['sentUnreliableCommands',['../structENetPeer.html#a3374032cb98420bc86a2e5d99b472945',1,'ENetPeer']]], + ['servicetime',['serviceTime',['../structENetHost.html#a1236e442f8574dae47f86d9856c7b1a5',1,'ENetHost']]], + ['socket',['socket',['../structENetHost.html#a98da7373531b664a5fe643840975235a',1,'ENetHost']]], + ['startsequencenumber',['startSequenceNumber',['../structENetProtocolSendFragment.html#a35fa6de1d3f0ea9a21217185675a4423',1,'ENetProtocolSendFragment']]], + ['state',['state',['../structENetPeer.html#a10055b262695e80c6b2731294f08249e',1,'ENetPeer']]] +]; diff --git a/enet server test/enet2/docs/html/search/variables_f.html b/enet server test/enet2/docs/html/search/variables_f.html new file mode 100644 index 0000000..fff3833 --- /dev/null +++ b/enet server test/enet2/docs/html/search/variables_f.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/enet server test/enet2/docs/html/search/variables_f.js b/enet server test/enet2/docs/html/search/variables_f.js new file mode 100644 index 0000000..0a380b6 --- /dev/null +++ b/enet server test/enet2/docs/html/search/variables_f.js @@ -0,0 +1,14 @@ +var searchData= +[ + ['throttleconfigure',['throttleConfigure',['../unionENetProtocol.html#af441bb9c4bd62906414dbc0ed95a95af',1,'ENetProtocol']]], + ['timeoutlimit',['timeoutLimit',['../structENetPeer.html#a0dffdc4600cfb98c43f698165eb24a85',1,'ENetPeer']]], + ['timeoutmaximum',['timeoutMaximum',['../structENetPeer.html#a01ac5a7c8a635609dfc50adde57e0971',1,'ENetPeer']]], + ['timeoutminimum',['timeoutMinimum',['../structENetPeer.html#a46079ab72717dd8f914a7329a4241ed8',1,'ENetPeer']]], + ['totallength',['totalLength',['../structENetProtocolSendFragment.html#a17a45b82152db01966fcabdd005c40b6',1,'ENetProtocolSendFragment']]], + ['totalreceiveddata',['totalReceivedData',['../structENetHost.html#aad1bc2d9190421e085610d2a096d36f6',1,'ENetHost']]], + ['totalreceivedpackets',['totalReceivedPackets',['../structENetHost.html#a285e93baae69adf885e4f9a8ed2a0aba',1,'ENetHost']]], + ['totalsentdata',['totalSentData',['../structENetHost.html#a48c842176994ebb4a10486ae780aed35',1,'ENetHost']]], + ['totalsentpackets',['totalSentPackets',['../structENetHost.html#abfd2ac9482c097b64417f21b7a40ccb1',1,'ENetHost']]], + ['totalwaitingdata',['totalWaitingData',['../structENetPeer.html#aa3cd5b8f33f63fe8b7ead5f692b49a11',1,'ENetPeer']]], + ['type',['type',['../structENetEvent.html#ad54aa5e2f61ec1f6102cfe1d1d6883db',1,'ENetEvent']]] +]; diff --git a/enet server test/enet2/docs/html/structENetAcknowledgement.html b/enet server test/enet2/docs/html/structENetAcknowledgement.html new file mode 100644 index 0000000..bcd83f5 --- /dev/null +++ b/enet server test/enet2/docs/html/structENetAcknowledgement.html @@ -0,0 +1,159 @@ + + + + + + +ENet: ENetAcknowledgement Struct Reference + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + + + + + + +
+ +
+ +
+
+ +
+
ENetAcknowledgement Struct Reference
+
+
+ +

#include <enet.h>

+ + + + + + + + +

+Data Fields

ENetListNode acknowledgementList
 
ENetProtocol command
 
enet_uint32 sentTime
 
+

Field Documentation

+ +
+
+ + + + +
ENetListNode ENetAcknowledgement::acknowledgementList
+
+ +
+
+ +
+
+ + + + +
ENetProtocol ENetAcknowledgement::command
+
+ +
+
+ +
+
+ + + + +
enet_uint32 ENetAcknowledgement::sentTime
+
+ +
+
+
The documentation for this struct was generated from the following file: +
+ + + + diff --git a/enet server test/enet2/docs/html/structENetAddress.html b/enet server test/enet2/docs/html/structENetAddress.html new file mode 100644 index 0000000..6fefb20 --- /dev/null +++ b/enet server test/enet2/docs/html/structENetAddress.html @@ -0,0 +1,151 @@ + + + + + + +ENet: ENetAddress Struct Reference + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + + + + + + +
+ +
+ +
+
+ +
+
ENetAddress Struct Reference
+
+
+ +

Portable internet address structure. + More...

+ +

#include <enet.h>

+ + + + + + +

+Data Fields

enet_uint32 host
 
enet_uint16 port
 
+

Detailed Description

+

Portable internet address structure.

+

The host must be specified in network byte-order, and the port must be in host byte-order. The constant ENET_HOST_ANY may be used to specify the default server host. The constant ENET_HOST_BROADCAST may be used to specify the broadcast address (255.255.255.255). This makes sense for enet_host_connect, but not for enet_host_create. Once a server responds to a broadcast, the address is updated from ENET_HOST_BROADCAST to the server's actual IP address.

+

Field Documentation

+ +
+
+ + + + +
enet_uint32 ENetAddress::host
+
+ +
+
+ +
+
+ + + + +
enet_uint16 ENetAddress::port
+
+ +
+
+
The documentation for this struct was generated from the following file: +
+ + + + diff --git a/enet server test/enet2/docs/html/structENetBuffer.html b/enet server test/enet2/docs/html/structENetBuffer.html new file mode 100644 index 0000000..9c654e4 --- /dev/null +++ b/enet server test/enet2/docs/html/structENetBuffer.html @@ -0,0 +1,146 @@ + + + + + + +ENet: ENetBuffer Struct Reference + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + + + + + + +
+ +
+ +
+
+ +
+
ENetBuffer Struct Reference
+
+
+ +

#include <win32.h>

+ + + + + + +

+Data Fields

void * data
 
size_t dataLength
 
+

Field Documentation

+ +
+
+ + + + +
void * ENetBuffer::data
+
+ +
+
+ +
+
+ + + + +
size_t ENetBuffer::dataLength
+
+ +
+
+
The documentation for this struct was generated from the following files: +
+ + + + diff --git a/enet server test/enet2/docs/html/structENetCallbacks.html b/enet server test/enet2/docs/html/structENetCallbacks.html new file mode 100644 index 0000000..4fbe36e --- /dev/null +++ b/enet server test/enet2/docs/html/structENetCallbacks.html @@ -0,0 +1,159 @@ + + + + + + +ENet: ENetCallbacks Struct Reference + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + + + + + + +
+ +
+ +
+
+ +
+
ENetCallbacks Struct Reference
+
+
+ +

#include <callbacks.h>

+ + + + + + + + +

+Data Fields

void(* free )(void *memory)
 
void *(* malloc )(size_t size)
 
void(* no_memory )(void)
 
+

Field Documentation

+ +
+
+ + + + +
void( * ENetCallbacks::free)(void *memory)
+
+ +
+
+ +
+
+ + + + +
void*( * ENetCallbacks::malloc)(size_t size)
+
+ +
+
+ +
+
+ + + + +
void( * ENetCallbacks::no_memory)(void)
+
+ +
+
+
The documentation for this struct was generated from the following file: +
+ + + + diff --git a/enet server test/enet2/docs/html/structENetChannel.html b/enet server test/enet2/docs/html/structENetChannel.html new file mode 100644 index 0000000..2364677 --- /dev/null +++ b/enet server test/enet2/docs/html/structENetChannel.html @@ -0,0 +1,229 @@ + + + + + + +ENet: ENetChannel Struct Reference + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + + + + + + +
+ +
+ +
+
+ +
+
ENetChannel Struct Reference
+
+
+ +

#include <enet.h>

+ + + + + + + + + + + + + + + + + + +

+Data Fields

ENetList incomingReliableCommands
 
enet_uint16 incomingReliableSequenceNumber
 
ENetList incomingUnreliableCommands
 
enet_uint16 incomingUnreliableSequenceNumber
 
enet_uint16 outgoingReliableSequenceNumber
 
enet_uint16 outgoingUnreliableSequenceNumber
 
enet_uint16 reliableWindows [ENET_PEER_RELIABLE_WINDOWS]
 
enet_uint16 usedReliableWindows
 
+

Field Documentation

+ +
+
+ + + + +
ENetList ENetChannel::incomingReliableCommands
+
+ +
+
+ +
+
+ + + + +
enet_uint16 ENetChannel::incomingReliableSequenceNumber
+
+ +
+
+ +
+
+ + + + +
ENetList ENetChannel::incomingUnreliableCommands
+
+ +
+
+ +
+
+ + + + +
enet_uint16 ENetChannel::incomingUnreliableSequenceNumber
+
+ +
+
+ +
+
+ + + + +
enet_uint16 ENetChannel::outgoingReliableSequenceNumber
+
+ +
+
+ +
+
+ + + + +
enet_uint16 ENetChannel::outgoingUnreliableSequenceNumber
+
+ +
+
+ +
+
+ + + + +
enet_uint16 ENetChannel::reliableWindows[ENET_PEER_RELIABLE_WINDOWS]
+
+ +
+
+ +
+
+ + + + +
enet_uint16 ENetChannel::usedReliableWindows
+
+ +
+
+
The documentation for this struct was generated from the following file: +
+ + + + diff --git a/enet server test/enet2/docs/html/structENetCompressor.html b/enet server test/enet2/docs/html/structENetCompressor.html new file mode 100644 index 0000000..aad398b --- /dev/null +++ b/enet server test/enet2/docs/html/structENetCompressor.html @@ -0,0 +1,194 @@ + + + + + + +ENet: ENetCompressor Struct Reference + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + + + + + + +
+ +
+ +
+
+ +
+
ENetCompressor Struct Reference
+
+
+ +

An ENet packet compressor for compressing UDP packets before socket sends or receives. + More...

+ +

#include <enet.h>

+ + + + + + + + + + + + + + +

+Data Fields

size_t(* compress )(void *context, const ENetBuffer *inBuffers, size_t inBufferCount, size_t inLimit, enet_uint8 *outData, size_t outLimit)
 Compresses from inBuffers[0:inBufferCount-1], containing inLimit bytes, to outData, outputting at most outLimit bytes. More...
 
void * context
 Context data for the compressor. More...
 
size_t(* decompress )(void *context, const enet_uint8 *inData, size_t inLimit, enet_uint8 *outData, size_t outLimit)
 Decompresses from inData, containing inLimit bytes, to outData, outputting at most outLimit bytes. More...
 
void(* destroy )(void *context)
 Destroys the context when compression is disabled or the host is destroyed. More...
 
+

Detailed Description

+

An ENet packet compressor for compressing UDP packets before socket sends or receives.

+

Field Documentation

+ +
+
+ + + + +
size_t( * ENetCompressor::compress)(void *context, const ENetBuffer *inBuffers, size_t inBufferCount, size_t inLimit, enet_uint8 *outData, size_t outLimit)
+
+ +

Compresses from inBuffers[0:inBufferCount-1], containing inLimit bytes, to outData, outputting at most outLimit bytes.

+

Should return 0 on failure.

+ +
+
+ +
+
+ + + + +
void* ENetCompressor::context
+
+ +

Context data for the compressor.

+

Must be non-NULL.

+ +
+
+ +
+
+ + + + +
size_t( * ENetCompressor::decompress)(void *context, const enet_uint8 *inData, size_t inLimit, enet_uint8 *outData, size_t outLimit)
+
+ +

Decompresses from inData, containing inLimit bytes, to outData, outputting at most outLimit bytes.

+

Should return 0 on failure.

+ +
+
+ +
+
+ + + + +
void( * ENetCompressor::destroy)(void *context)
+
+ +

Destroys the context when compression is disabled or the host is destroyed.

+

May be NULL.

+ +
+
+
The documentation for this struct was generated from the following file: +
+ + + + diff --git a/enet server test/enet2/docs/html/structENetEvent.html b/enet server test/enet2/docs/html/structENetEvent.html new file mode 100644 index 0000000..8658ca8 --- /dev/null +++ b/enet server test/enet2/docs/html/structENetEvent.html @@ -0,0 +1,208 @@ + + + + + + +ENet: ENetEvent Struct Reference + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + + + + + + +
+ +
+ +
+
+ +
+
ENetEvent Struct Reference
+
+
+ +

An ENet event as returned by enet_host_service(). + More...

+ +

#include <enet.h>

+ + + + + + + + + + + + + + + + + +

+Data Fields

enet_uint8 channelID
 channel on the peer that generated the event, if appropriate More...
 
enet_uint32 data
 data associated with the event, if appropriate More...
 
ENetPacketpacket
 packet associated with the event, if appropriate More...
 
ENetPeerpeer
 peer that generated a connect, disconnect or receive event More...
 
ENetEventType type
 type of the event More...
 
+

Detailed Description

+

An ENet event as returned by enet_host_service().

+
See also
enet_host_service
+

Field Documentation

+ +
+
+ + + + +
enet_uint8 ENetEvent::channelID
+
+ +

channel on the peer that generated the event, if appropriate

+ +
+
+ +
+
+ + + + +
enet_uint32 ENetEvent::data
+
+ +

data associated with the event, if appropriate

+ +
+
+ +
+
+ + + + +
ENetPacket* ENetEvent::packet
+
+ +

packet associated with the event, if appropriate

+ +
+
+ +
+
+ + + + +
ENetPeer* ENetEvent::peer
+
+ +

peer that generated a connect, disconnect or receive event

+ +
+
+ +
+
+ + + + +
ENetEventType ENetEvent::type
+
+ +

type of the event

+ +
+
+
The documentation for this struct was generated from the following file: +
+ + + + diff --git a/enet server test/enet2/docs/html/structENetHost.html b/enet server test/enet2/docs/html/structENetHost.html new file mode 100644 index 0000000..ae65281 --- /dev/null +++ b/enet server test/enet2/docs/html/structENetHost.html @@ -0,0 +1,693 @@ + + + + + + +ENet: ENetHost Struct Reference + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + + + + + + +
+ +
+ +
+
+ +
+
ENetHost Struct Reference
+
+
+ +

An ENet host for communicating with peers. + More...

+ +

#include <enet.h>

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Data Fields

ENetAddress address
 Internet address of the host. More...
 
size_t bandwidthLimitedPeers
 
enet_uint32 bandwidthThrottleEpoch
 
size_t bufferCount
 
ENetBuffer buffers [(1+2 *ENET_PROTOCOL_MAXIMUM_PACKET_COMMANDS)]
 
size_t channelLimit
 maximum number of channels allowed for connected peers More...
 
ENetChecksumCallback checksum
 callback the user can set to enable packet checksums for this host More...
 
size_t commandCount
 
ENetProtocol commands [ENET_PROTOCOL_MAXIMUM_PACKET_COMMANDS]
 
ENetCompressor compressor
 
size_t connectedPeers
 
int continueSending
 
ENetList dispatchQueue
 
size_t duplicatePeers
 optional number of allowed peers from duplicate IPs, defaults to ENET_PROTOCOL_MAXIMUM_PEER_ID More...
 
enet_uint16 headerFlags
 
enet_uint32 incomingBandwidth
 downstream bandwidth of the host More...
 
ENetInterceptCallback intercept
 callback the user can set to intercept received raw UDP packets More...
 
size_t maximumPacketSize
 the maximum allowable packet size that may be sent or received on a peer More...
 
size_t maximumWaitingData
 the maximum aggregate amount of buffer space a peer may use waiting for packets to be delivered More...
 
enet_uint32 mtu
 
enet_uint32 outgoingBandwidth
 upstream bandwidth of the host More...
 
enet_uint8 packetData [2][ENET_PROTOCOL_MAXIMUM_MTU]
 
size_t packetSize
 
size_t peerCount
 number of peers allocated for this host More...
 
ENetPeerpeers
 array of peers allocated for this host More...
 
enet_uint32 randomSeed
 
int recalculateBandwidthLimits
 
ENetAddress receivedAddress
 
enet_uint8receivedData
 
size_t receivedDataLength
 
enet_uint32 serviceTime
 
ENetSocket socket
 
enet_uint32 totalReceivedData
 total data received, user should reset to 0 as needed to prevent overflow More...
 
enet_uint32 totalReceivedPackets
 total UDP packets received, user should reset to 0 as needed to prevent overflow More...
 
enet_uint32 totalSentData
 total data sent, user should reset to 0 as needed to prevent overflow More...
 
enet_uint32 totalSentPackets
 total UDP packets sent, user should reset to 0 as needed to prevent overflow More...
 
+

Detailed Description

+

Field Documentation

+ +
+
+ + + + +
ENetAddress ENetHost::address
+
+ +

Internet address of the host.

+ +
+
+ +
+
+ + + + +
size_t ENetHost::bandwidthLimitedPeers
+
+ +
+
+ +
+
+ + + + +
enet_uint32 ENetHost::bandwidthThrottleEpoch
+
+ +
+
+ +
+
+ + + + +
size_t ENetHost::bufferCount
+
+ +
+
+ +
+
+ + + + +
ENetBuffer ENetHost::buffers[(1+2 *ENET_PROTOCOL_MAXIMUM_PACKET_COMMANDS)]
+
+ +
+
+ +
+
+ + + + +
size_t ENetHost::channelLimit
+
+ +

maximum number of channels allowed for connected peers

+ +
+
+ +
+
+ + + + +
ENetChecksumCallback ENetHost::checksum
+
+ +

callback the user can set to enable packet checksums for this host

+ +
+
+ +
+
+ + + + +
size_t ENetHost::commandCount
+
+ +
+
+ +
+
+ + + + +
ENetProtocol ENetHost::commands[ENET_PROTOCOL_MAXIMUM_PACKET_COMMANDS]
+
+ +
+
+ +
+
+ + + + +
ENetCompressor ENetHost::compressor
+
+ +
+
+ +
+
+ + + + +
size_t ENetHost::connectedPeers
+
+ +
+
+ +
+
+ + + + +
int ENetHost::continueSending
+
+ +
+
+ +
+
+ + + + +
ENetList ENetHost::dispatchQueue
+
+ +
+
+ +
+
+ + + + +
size_t ENetHost::duplicatePeers
+
+ +

optional number of allowed peers from duplicate IPs, defaults to ENET_PROTOCOL_MAXIMUM_PEER_ID

+ +
+
+ +
+
+ + + + +
enet_uint16 ENetHost::headerFlags
+
+ +
+
+ +
+
+ + + + +
enet_uint32 ENetHost::incomingBandwidth
+
+ +

downstream bandwidth of the host

+ +
+
+ +
+
+ + + + +
ENetInterceptCallback ENetHost::intercept
+
+ +

callback the user can set to intercept received raw UDP packets

+ +
+
+ +
+
+ + + + +
size_t ENetHost::maximumPacketSize
+
+ +

the maximum allowable packet size that may be sent or received on a peer

+ +
+
+ +
+
+ + + + +
size_t ENetHost::maximumWaitingData
+
+ +

the maximum aggregate amount of buffer space a peer may use waiting for packets to be delivered

+ +
+
+ +
+
+ + + + +
enet_uint32 ENetHost::mtu
+
+ +
+
+ +
+
+ + + + +
enet_uint32 ENetHost::outgoingBandwidth
+
+ +

upstream bandwidth of the host

+ +
+
+ +
+
+ + + + +
enet_uint8 ENetHost::packetData[2][ENET_PROTOCOL_MAXIMUM_MTU]
+
+ +
+
+ +
+
+ + + + +
size_t ENetHost::packetSize
+
+ +
+
+ +
+
+ + + + +
size_t ENetHost::peerCount
+
+ +

number of peers allocated for this host

+ +
+
+ +
+
+ + + + +
ENetPeer* ENetHost::peers
+
+ +

array of peers allocated for this host

+ +
+
+ +
+
+ + + + +
enet_uint32 ENetHost::randomSeed
+
+ +
+
+ +
+
+ + + + +
int ENetHost::recalculateBandwidthLimits
+
+ +
+
+ +
+
+ + + + +
ENetAddress ENetHost::receivedAddress
+
+ +
+
+ +
+
+ + + + +
enet_uint8* ENetHost::receivedData
+
+ +
+
+ +
+
+ + + + +
size_t ENetHost::receivedDataLength
+
+ +
+
+ +
+
+ + + + +
enet_uint32 ENetHost::serviceTime
+
+ +
+
+ +
+
+ + + + +
ENetSocket ENetHost::socket
+
+ +
+
+ +
+
+ + + + +
enet_uint32 ENetHost::totalReceivedData
+
+ +

total data received, user should reset to 0 as needed to prevent overflow

+ +
+
+ +
+
+ + + + +
enet_uint32 ENetHost::totalReceivedPackets
+
+ +

total UDP packets received, user should reset to 0 as needed to prevent overflow

+ +
+
+ +
+
+ + + + +
enet_uint32 ENetHost::totalSentData
+
+ +

total data sent, user should reset to 0 as needed to prevent overflow

+ +
+
+ +
+
+ + + + +
enet_uint32 ENetHost::totalSentPackets
+
+ +

total UDP packets sent, user should reset to 0 as needed to prevent overflow

+ +
+
+
The documentation for this struct was generated from the following file: +
+ + + + diff --git a/enet server test/enet2/docs/html/structENetIncomingCommand.html b/enet server test/enet2/docs/html/structENetIncomingCommand.html new file mode 100644 index 0000000..6678223 --- /dev/null +++ b/enet server test/enet2/docs/html/structENetIncomingCommand.html @@ -0,0 +1,229 @@ + + + + + + +ENet: ENetIncomingCommand Struct Reference + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + + + + + + +
+ +
+ +
+
+ +
+
ENetIncomingCommand Struct Reference
+
+
+ +

#include <enet.h>

+ + + + + + + + + + + + + + + + + + +

+Data Fields

ENetProtocol command
 
enet_uint32 fragmentCount
 
enet_uint32fragments
 
enet_uint32 fragmentsRemaining
 
ENetListNode incomingCommandList
 
ENetPacketpacket
 
enet_uint16 reliableSequenceNumber
 
enet_uint16 unreliableSequenceNumber
 
+

Field Documentation

+ +
+
+ + + + +
ENetProtocol ENetIncomingCommand::command
+
+ +
+
+ +
+
+ + + + +
enet_uint32 ENetIncomingCommand::fragmentCount
+
+ +
+
+ +
+
+ + + + +
enet_uint32* ENetIncomingCommand::fragments
+
+ +
+
+ +
+
+ + + + +
enet_uint32 ENetIncomingCommand::fragmentsRemaining
+
+ +
+
+ +
+
+ + + + +
ENetListNode ENetIncomingCommand::incomingCommandList
+
+ +
+
+ +
+
+ + + + +
ENetPacket* ENetIncomingCommand::packet
+
+ +
+
+ +
+
+ + + + +
enet_uint16 ENetIncomingCommand::reliableSequenceNumber
+
+ +
+
+ +
+
+ + + + +
enet_uint16 ENetIncomingCommand::unreliableSequenceNumber
+
+ +
+
+
The documentation for this struct was generated from the following file: +
+ + + + diff --git a/enet server test/enet2/docs/html/structENetList.html b/enet server test/enet2/docs/html/structENetList.html new file mode 100644 index 0000000..a499859 --- /dev/null +++ b/enet server test/enet2/docs/html/structENetList.html @@ -0,0 +1,131 @@ + + + + + + +ENet: ENetList Struct Reference + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + + + + + + +
+ +
+ +
+
+ +
+
ENetList Struct Reference
+
+
+ +

#include <list.h>

+ + + + +

+Data Fields

ENetListNode sentinel
 
+

Field Documentation

+ +
+
+ + + + +
ENetListNode ENetList::sentinel
+
+ +
+
+
The documentation for this struct was generated from the following file: +
+ + + + diff --git a/enet server test/enet2/docs/html/structENetListNode.html b/enet server test/enet2/docs/html/structENetListNode.html new file mode 100644 index 0000000..eb37b27 --- /dev/null +++ b/enet server test/enet2/docs/html/structENetListNode.html @@ -0,0 +1,145 @@ + + + + + + +ENet: ENetListNode Struct Reference + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + + + + + + +
+ +
+ +
+
+ +
+
ENetListNode Struct Reference
+
+
+ +

#include <list.h>

+ + + + + + +

+Data Fields

struct _ENetListNode * next
 
struct _ENetListNode * previous
 
+

Field Documentation

+ +
+
+ + + + +
struct _ENetListNode* ENetListNode::next
+
+ +
+
+ +
+
+ + + + +
struct _ENetListNode* ENetListNode::previous
+
+ +
+
+
The documentation for this struct was generated from the following file: +
+ + + + diff --git a/enet server test/enet2/docs/html/structENetOutgoingCommand.html b/enet server test/enet2/docs/html/structENetOutgoingCommand.html new file mode 100644 index 0000000..cfa75cb --- /dev/null +++ b/enet server test/enet2/docs/html/structENetOutgoingCommand.html @@ -0,0 +1,271 @@ + + + + + + +ENet: ENetOutgoingCommand Struct Reference + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + + + + + + +
+ +
+ +
+
+ +
+
ENetOutgoingCommand Struct Reference
+
+
+ +

#include <enet.h>

+ + + + + + + + + + + + + + + + + + + + + + + + +

+Data Fields

ENetProtocol command
 
enet_uint16 fragmentLength
 
enet_uint32 fragmentOffset
 
ENetListNode outgoingCommandList
 
ENetPacketpacket
 
enet_uint16 reliableSequenceNumber
 
enet_uint32 roundTripTimeout
 
enet_uint32 roundTripTimeoutLimit
 
enet_uint16 sendAttempts
 
enet_uint32 sentTime
 
enet_uint16 unreliableSequenceNumber
 
+

Field Documentation

+ +
+
+ + + + +
ENetProtocol ENetOutgoingCommand::command
+
+ +
+
+ +
+
+ + + + +
enet_uint16 ENetOutgoingCommand::fragmentLength
+
+ +
+
+ +
+
+ + + + +
enet_uint32 ENetOutgoingCommand::fragmentOffset
+
+ +
+
+ +
+
+ + + + +
ENetListNode ENetOutgoingCommand::outgoingCommandList
+
+ +
+
+ +
+
+ + + + +
ENetPacket* ENetOutgoingCommand::packet
+
+ +
+
+ +
+
+ + + + +
enet_uint16 ENetOutgoingCommand::reliableSequenceNumber
+
+ +
+
+ +
+
+ + + + +
enet_uint32 ENetOutgoingCommand::roundTripTimeout
+
+ +
+
+ +
+
+ + + + +
enet_uint32 ENetOutgoingCommand::roundTripTimeoutLimit
+
+ +
+
+ +
+
+ + + + +
enet_uint16 ENetOutgoingCommand::sendAttempts
+
+ +
+
+ +
+
+ + + + +
enet_uint32 ENetOutgoingCommand::sentTime
+
+ +
+
+ +
+
+ + + + +
enet_uint16 ENetOutgoingCommand::unreliableSequenceNumber
+
+ +
+
+
The documentation for this struct was generated from the following file: +
+ + + + diff --git a/enet server test/enet2/docs/html/structENetPacket.html b/enet server test/enet2/docs/html/structENetPacket.html new file mode 100644 index 0000000..6d2a002 --- /dev/null +++ b/enet server test/enet2/docs/html/structENetPacket.html @@ -0,0 +1,229 @@ + + + + + + +ENet: ENetPacket Struct Reference + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + + + + + + +
+ +
+ +
+
+ +
+
ENetPacket Struct Reference
+
+
+ +

ENet packet structure. + More...

+ +

#include <enet.h>

+ + + + + + + + + + + + + + + + + + + + +

+Data Fields

enet_uint8data
 allocated data for packet More...
 
size_t dataLength
 length of data More...
 
enet_uint32 flags
 bitwise-or of ENetPacketFlag constants More...
 
ENetPacketFreeCallback freeCallback
 function to be called when the packet is no longer in use More...
 
size_t referenceCount
 internal use only More...
 
void * userData
 application private data, may be freely modified More...
 
+

Detailed Description

+

ENet packet structure.

+

An ENet data packet that may be sent to or received from a peer. The shown fields should only be read and never modified. The data field contains the allocated data for the packet. The dataLength fields specifies the length of the allocated data. The flags field is either 0 (specifying no flags), or a bitwise-or of any combination of the following flags:

+

ENET_PACKET_FLAG_RELIABLE - packet must be received by the target peer and resend attempts should be made until the packet is delivered

+

ENET_PACKET_FLAG_UNSEQUENCED - packet will not be sequenced with other packets (not supported for reliable packets)

+

ENET_PACKET_FLAG_NO_ALLOCATE - packet will not allocate data, and user must supply it instead

+
See also
ENetPacketFlag
+

Field Documentation

+ +
+
+ + + + +
enet_uint8* ENetPacket::data
+
+ +

allocated data for packet

+ +
+
+ +
+
+ + + + +
size_t ENetPacket::dataLength
+
+ +

length of data

+ +
+
+ +
+
+ + + + +
enet_uint32 ENetPacket::flags
+
+ +

bitwise-or of ENetPacketFlag constants

+ +
+
+ +
+
+ + + + +
ENetPacketFreeCallback ENetPacket::freeCallback
+
+ +

function to be called when the packet is no longer in use

+ +
+
+ +
+
+ + + + +
size_t ENetPacket::referenceCount
+
+ +

internal use only

+ +
+
+ +
+
+ + + + +
void* ENetPacket::userData
+
+ +

application private data, may be freely modified

+ +
+
+
The documentation for this struct was generated from the following file: +
+ + + + diff --git a/enet server test/enet2/docs/html/structENetPeer.html b/enet server test/enet2/docs/html/structENetPeer.html new file mode 100644 index 0000000..80316f5 --- /dev/null +++ b/enet server test/enet2/docs/html/structENetPeer.html @@ -0,0 +1,984 @@ + + + + + + +ENet: ENetPeer Struct Reference + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + + + + + + +
+ +
+ +
+
+ +
+
ENetPeer Struct Reference
+
+
+ +

An ENet peer which data packets may be sent or received from. + More...

+ +

#include <enet.h>

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Data Fields

ENetList acknowledgements
 
ENetAddress address
 Internet address of the peer. More...
 
size_t channelCount
 Number of channels allocated for communication with peer. More...
 
ENetChannelchannels
 
enet_uint32 connectID
 
void * data
 Application private data, may be freely modified. More...
 
ENetList dispatchedCommands
 
ENetListNode dispatchList
 
enet_uint32 earliestTimeout
 
enet_uint32 eventData
 
enet_uint32 highestRoundTripTimeVariance
 
struct _ENetHost * host
 
enet_uint32 incomingBandwidth
 Downstream bandwidth of the client in bytes/second. More...
 
enet_uint32 incomingBandwidthThrottleEpoch
 
enet_uint32 incomingDataTotal
 
enet_uint16 incomingPeerID
 
enet_uint8 incomingSessionID
 
enet_uint16 incomingUnsequencedGroup
 
enet_uint32 lastReceiveTime
 
enet_uint32 lastRoundTripTime
 
enet_uint32 lastRoundTripTimeVariance
 
enet_uint32 lastSendTime
 
enet_uint32 lowestRoundTripTime
 
enet_uint32 mtu
 
int needsDispatch
 
enet_uint32 nextTimeout
 
enet_uint32 outgoingBandwidth
 Upstream bandwidth of the client in bytes/second. More...
 
enet_uint32 outgoingBandwidthThrottleEpoch
 
enet_uint32 outgoingDataTotal
 
enet_uint16 outgoingPeerID
 
ENetList outgoingReliableCommands
 
enet_uint16 outgoingReliableSequenceNumber
 
enet_uint8 outgoingSessionID
 
ENetList outgoingUnreliableCommands
 
enet_uint16 outgoingUnsequencedGroup
 
enet_uint32 packetLoss
 mean packet loss of reliable packets as a ratio with respect to the constant ENET_PEER_PACKET_LOSS_SCALE More...
 
enet_uint32 packetLossEpoch
 
enet_uint32 packetLossVariance
 
enet_uint32 packetsLost
 
enet_uint32 packetsSent
 
enet_uint32 packetThrottle
 
enet_uint32 packetThrottleAcceleration
 
enet_uint32 packetThrottleCounter
 
enet_uint32 packetThrottleDeceleration
 
enet_uint32 packetThrottleEpoch
 
enet_uint32 packetThrottleInterval
 
enet_uint32 packetThrottleLimit
 
enet_uint32 pingInterval
 
enet_uint32 reliableDataInTransit
 
enet_uint32 roundTripTime
 mean round trip time (RTT), in milliseconds, between sending a reliable packet and receiving its acknowledgement More...
 
enet_uint32 roundTripTimeVariance
 
ENetList sentReliableCommands
 
ENetList sentUnreliableCommands
 
ENetPeerState state
 
enet_uint32 timeoutLimit
 
enet_uint32 timeoutMaximum
 
enet_uint32 timeoutMinimum
 
size_t totalWaitingData
 
enet_uint32 unsequencedWindow [ENET_PEER_UNSEQUENCED_WINDOW_SIZE/32]
 
enet_uint32 windowSize
 
+

Detailed Description

+

An ENet peer which data packets may be sent or received from.

+

No fields should be modified unless otherwise specified.

+

Field Documentation

+ +
+
+ + + + +
ENetList ENetPeer::acknowledgements
+
+ +
+
+ +
+
+ + + + +
ENetAddress ENetPeer::address
+
+ +

Internet address of the peer.

+ +
+
+ +
+
+ + + + +
size_t ENetPeer::channelCount
+
+ +

Number of channels allocated for communication with peer.

+ +
+
+ +
+
+ + + + +
ENetChannel* ENetPeer::channels
+
+ +
+
+ +
+
+ + + + +
enet_uint32 ENetPeer::connectID
+
+ +
+
+ +
+
+ + + + +
void* ENetPeer::data
+
+ +

Application private data, may be freely modified.

+ +
+
+ +
+
+ + + + +
ENetList ENetPeer::dispatchedCommands
+
+ +
+
+ +
+
+ + + + +
ENetListNode ENetPeer::dispatchList
+
+ +
+
+ +
+
+ + + + +
enet_uint32 ENetPeer::earliestTimeout
+
+ +
+
+ +
+
+ + + + +
enet_uint32 ENetPeer::eventData
+
+ +
+
+ +
+
+ + + + +
enet_uint32 ENetPeer::highestRoundTripTimeVariance
+
+ +
+
+ +
+
+ + + + +
struct _ENetHost* ENetPeer::host
+
+ +
+
+ +
+
+ + + + +
enet_uint32 ENetPeer::incomingBandwidth
+
+ +

Downstream bandwidth of the client in bytes/second.

+ +
+
+ +
+
+ + + + +
enet_uint32 ENetPeer::incomingBandwidthThrottleEpoch
+
+ +
+
+ +
+
+ + + + +
enet_uint32 ENetPeer::incomingDataTotal
+
+ +
+
+ +
+
+ + + + +
enet_uint16 ENetPeer::incomingPeerID
+
+ +
+
+ +
+
+ + + + +
enet_uint8 ENetPeer::incomingSessionID
+
+ +
+
+ +
+
+ + + + +
enet_uint16 ENetPeer::incomingUnsequencedGroup
+
+ +
+
+ +
+
+ + + + +
enet_uint32 ENetPeer::lastReceiveTime
+
+ +
+
+ +
+
+ + + + +
enet_uint32 ENetPeer::lastRoundTripTime
+
+ +
+
+ +
+
+ + + + +
enet_uint32 ENetPeer::lastRoundTripTimeVariance
+
+ +
+
+ +
+
+ + + + +
enet_uint32 ENetPeer::lastSendTime
+
+ +
+
+ +
+
+ + + + +
enet_uint32 ENetPeer::lowestRoundTripTime
+
+ +
+
+ +
+
+ + + + +
enet_uint32 ENetPeer::mtu
+
+ +
+
+ +
+
+ + + + +
int ENetPeer::needsDispatch
+
+ +
+
+ +
+
+ + + + +
enet_uint32 ENetPeer::nextTimeout
+
+ +
+
+ +
+
+ + + + +
enet_uint32 ENetPeer::outgoingBandwidth
+
+ +

Upstream bandwidth of the client in bytes/second.

+ +
+
+ +
+
+ + + + +
enet_uint32 ENetPeer::outgoingBandwidthThrottleEpoch
+
+ +
+
+ +
+
+ + + + +
enet_uint32 ENetPeer::outgoingDataTotal
+
+ +
+
+ +
+
+ + + + +
enet_uint16 ENetPeer::outgoingPeerID
+
+ +
+
+ +
+
+ + + + +
ENetList ENetPeer::outgoingReliableCommands
+
+ +
+
+ +
+
+ + + + +
enet_uint16 ENetPeer::outgoingReliableSequenceNumber
+
+ +
+
+ +
+
+ + + + +
enet_uint8 ENetPeer::outgoingSessionID
+
+ +
+
+ +
+
+ + + + +
ENetList ENetPeer::outgoingUnreliableCommands
+
+ +
+
+ +
+
+ + + + +
enet_uint16 ENetPeer::outgoingUnsequencedGroup
+
+ +
+
+ +
+
+ + + + +
enet_uint32 ENetPeer::packetLoss
+
+ +

mean packet loss of reliable packets as a ratio with respect to the constant ENET_PEER_PACKET_LOSS_SCALE

+ +
+
+ +
+
+ + + + +
enet_uint32 ENetPeer::packetLossEpoch
+
+ +
+
+ +
+
+ + + + +
enet_uint32 ENetPeer::packetLossVariance
+
+ +
+
+ +
+
+ + + + +
enet_uint32 ENetPeer::packetsLost
+
+ +
+
+ +
+
+ + + + +
enet_uint32 ENetPeer::packetsSent
+
+ +
+
+ +
+
+ + + + +
enet_uint32 ENetPeer::packetThrottle
+
+ +
+
+ +
+
+ + + + +
enet_uint32 ENetPeer::packetThrottleAcceleration
+
+ +
+
+ +
+
+ + + + +
enet_uint32 ENetPeer::packetThrottleCounter
+
+ +
+
+ +
+
+ + + + +
enet_uint32 ENetPeer::packetThrottleDeceleration
+
+ +
+
+ +
+
+ + + + +
enet_uint32 ENetPeer::packetThrottleEpoch
+
+ +
+
+ +
+
+ + + + +
enet_uint32 ENetPeer::packetThrottleInterval
+
+ +
+
+ +
+
+ + + + +
enet_uint32 ENetPeer::packetThrottleLimit
+
+ +
+
+ +
+
+ + + + +
enet_uint32 ENetPeer::pingInterval
+
+ +
+
+ +
+
+ + + + +
enet_uint32 ENetPeer::reliableDataInTransit
+
+ +
+
+ +
+
+ + + + +
enet_uint32 ENetPeer::roundTripTime
+
+ +

mean round trip time (RTT), in milliseconds, between sending a reliable packet and receiving its acknowledgement

+ +
+
+ +
+
+ + + + +
enet_uint32 ENetPeer::roundTripTimeVariance
+
+ +
+
+ +
+
+ + + + +
ENetList ENetPeer::sentReliableCommands
+
+ +
+
+ +
+
+ + + + +
ENetList ENetPeer::sentUnreliableCommands
+
+ +
+
+ +
+
+ + + + +
ENetPeerState ENetPeer::state
+
+ +
+
+ +
+
+ + + + +
enet_uint32 ENetPeer::timeoutLimit
+
+ +
+
+ +
+
+ + + + +
enet_uint32 ENetPeer::timeoutMaximum
+
+ +
+
+ +
+
+ + + + +
enet_uint32 ENetPeer::timeoutMinimum
+
+ +
+
+ +
+
+ + + + +
size_t ENetPeer::totalWaitingData
+
+ +
+
+ +
+
+ + + + +
enet_uint32 ENetPeer::unsequencedWindow[ENET_PEER_UNSEQUENCED_WINDOW_SIZE/32]
+
+ +
+
+ +
+
+ + + + +
enet_uint32 ENetPeer::windowSize
+
+ +
+
+
The documentation for this struct was generated from the following file: +
+ + + + diff --git a/enet server test/enet2/docs/html/structENetProtocolAcknowledge.html b/enet server test/enet2/docs/html/structENetProtocolAcknowledge.html new file mode 100644 index 0000000..1d34cb7 --- /dev/null +++ b/enet server test/enet2/docs/html/structENetProtocolAcknowledge.html @@ -0,0 +1,159 @@ + + + + + + +ENet: ENetProtocolAcknowledge Struct Reference + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + + + + + + +
+ +
+ +
+
+ +
+
ENetProtocolAcknowledge Struct Reference
+
+
+ +

#include <protocol.h>

+ + + + + + + + +

+Data Fields

ENetProtocolCommandHeader header
 
enet_uint16 receivedReliableSequenceNumber
 
enet_uint16 receivedSentTime
 
+

Field Documentation

+ +
+
+ + + + +
ENetProtocolCommandHeader ENetProtocolAcknowledge::header
+
+ +
+
+ +
+
+ + + + +
enet_uint16 ENetProtocolAcknowledge::receivedReliableSequenceNumber
+
+ +
+
+ +
+
+ + + + +
enet_uint16 ENetProtocolAcknowledge::receivedSentTime
+
+ +
+
+
The documentation for this struct was generated from the following file: +
+ + + + diff --git a/enet server test/enet2/docs/html/structENetProtocolBandwidthLimit.html b/enet server test/enet2/docs/html/structENetProtocolBandwidthLimit.html new file mode 100644 index 0000000..7c42388 --- /dev/null +++ b/enet server test/enet2/docs/html/structENetProtocolBandwidthLimit.html @@ -0,0 +1,159 @@ + + + + + + +ENet: ENetProtocolBandwidthLimit Struct Reference + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + + + + + + +
+ +
+ +
+
+ +
+
ENetProtocolBandwidthLimit Struct Reference
+
+
+ +

#include <protocol.h>

+ + + + + + + + +

+Data Fields

ENetProtocolCommandHeader header
 
enet_uint32 incomingBandwidth
 
enet_uint32 outgoingBandwidth
 
+

Field Documentation

+ +
+
+ + + + +
ENetProtocolCommandHeader ENetProtocolBandwidthLimit::header
+
+ +
+
+ +
+
+ + + + +
enet_uint32 ENetProtocolBandwidthLimit::incomingBandwidth
+
+ +
+
+ +
+
+ + + + +
enet_uint32 ENetProtocolBandwidthLimit::outgoingBandwidth
+
+ +
+
+
The documentation for this struct was generated from the following file: +
+ + + + diff --git a/enet server test/enet2/docs/html/structENetProtocolCommandHeader.html b/enet server test/enet2/docs/html/structENetProtocolCommandHeader.html new file mode 100644 index 0000000..a4d1f0c --- /dev/null +++ b/enet server test/enet2/docs/html/structENetProtocolCommandHeader.html @@ -0,0 +1,159 @@ + + + + + + +ENet: ENetProtocolCommandHeader Struct Reference + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + + + + + + +
+ +
+ +
+
+ +
+
ENetProtocolCommandHeader Struct Reference
+
+
+ +

#include <protocol.h>

+ + + + + + + + +

+Data Fields

enet_uint8 channelID
 
enet_uint8 command
 
enet_uint16 reliableSequenceNumber
 
+

Field Documentation

+ +
+
+ + + + +
enet_uint8 ENetProtocolCommandHeader::channelID
+
+ +
+
+ +
+
+ + + + +
enet_uint8 ENetProtocolCommandHeader::command
+
+ +
+
+ +
+
+ + + + +
enet_uint16 ENetProtocolCommandHeader::reliableSequenceNumber
+
+ +
+
+
The documentation for this struct was generated from the following file: +
+ + + + diff --git a/enet server test/enet2/docs/html/structENetProtocolConnect.html b/enet server test/enet2/docs/html/structENetProtocolConnect.html new file mode 100644 index 0000000..9dbe345 --- /dev/null +++ b/enet server test/enet2/docs/html/structENetProtocolConnect.html @@ -0,0 +1,313 @@ + + + + + + +ENet: ENetProtocolConnect Struct Reference + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + + + + + + +
+ +
+ +
+
+ +
+
ENetProtocolConnect Struct Reference
+
+
+ +

#include <protocol.h>

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Data Fields

enet_uint32 channelCount
 
enet_uint32 connectID
 
enet_uint32 data
 
ENetProtocolCommandHeader header
 
enet_uint32 incomingBandwidth
 
enet_uint8 incomingSessionID
 
enet_uint32 mtu
 
enet_uint32 outgoingBandwidth
 
enet_uint16 outgoingPeerID
 
enet_uint8 outgoingSessionID
 
enet_uint32 packetThrottleAcceleration
 
enet_uint32 packetThrottleDeceleration
 
enet_uint32 packetThrottleInterval
 
enet_uint32 windowSize
 
+

Field Documentation

+ +
+
+ + + + +
enet_uint32 ENetProtocolConnect::channelCount
+
+ +
+
+ +
+
+ + + + +
enet_uint32 ENetProtocolConnect::connectID
+
+ +
+
+ +
+
+ + + + +
enet_uint32 ENetProtocolConnect::data
+
+ +
+
+ +
+
+ + + + +
ENetProtocolCommandHeader ENetProtocolConnect::header
+
+ +
+
+ +
+
+ + + + +
enet_uint32 ENetProtocolConnect::incomingBandwidth
+
+ +
+
+ +
+
+ + + + +
enet_uint8 ENetProtocolConnect::incomingSessionID
+
+ +
+
+ +
+
+ + + + +
enet_uint32 ENetProtocolConnect::mtu
+
+ +
+
+ +
+
+ + + + +
enet_uint32 ENetProtocolConnect::outgoingBandwidth
+
+ +
+
+ +
+
+ + + + +
enet_uint16 ENetProtocolConnect::outgoingPeerID
+
+ +
+
+ +
+
+ + + + +
enet_uint8 ENetProtocolConnect::outgoingSessionID
+
+ +
+
+ +
+
+ + + + +
enet_uint32 ENetProtocolConnect::packetThrottleAcceleration
+
+ +
+
+ +
+
+ + + + +
enet_uint32 ENetProtocolConnect::packetThrottleDeceleration
+
+ +
+
+ +
+
+ + + + +
enet_uint32 ENetProtocolConnect::packetThrottleInterval
+
+ +
+
+ +
+
+ + + + +
enet_uint32 ENetProtocolConnect::windowSize
+
+ +
+
+
The documentation for this struct was generated from the following file: +
+ + + + diff --git a/enet server test/enet2/docs/html/structENetProtocolDisconnect.html b/enet server test/enet2/docs/html/structENetProtocolDisconnect.html new file mode 100644 index 0000000..512f15c --- /dev/null +++ b/enet server test/enet2/docs/html/structENetProtocolDisconnect.html @@ -0,0 +1,145 @@ + + + + + + +ENet: ENetProtocolDisconnect Struct Reference + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + + + + + + +
+ +
+ +
+
+ +
+
ENetProtocolDisconnect Struct Reference
+
+
+ +

#include <protocol.h>

+ + + + + + +

+Data Fields

enet_uint32 data
 
ENetProtocolCommandHeader header
 
+

Field Documentation

+ +
+
+ + + + +
enet_uint32 ENetProtocolDisconnect::data
+
+ +
+
+ +
+
+ + + + +
ENetProtocolCommandHeader ENetProtocolDisconnect::header
+
+ +
+
+
The documentation for this struct was generated from the following file: +
+ + + + diff --git a/enet server test/enet2/docs/html/structENetProtocolHeader.html b/enet server test/enet2/docs/html/structENetProtocolHeader.html new file mode 100644 index 0000000..eca72e7 --- /dev/null +++ b/enet server test/enet2/docs/html/structENetProtocolHeader.html @@ -0,0 +1,145 @@ + + + + + + +ENet: ENetProtocolHeader Struct Reference + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + + + + + + +
+ +
+ +
+
+ +
+
ENetProtocolHeader Struct Reference
+
+
+ +

#include <protocol.h>

+ + + + + + +

+Data Fields

enet_uint16 peerID
 
enet_uint16 sentTime
 
+

Field Documentation

+ +
+
+ + + + +
enet_uint16 ENetProtocolHeader::peerID
+
+ +
+
+ +
+
+ + + + +
enet_uint16 ENetProtocolHeader::sentTime
+
+ +
+
+
The documentation for this struct was generated from the following file: +
+ + + + diff --git a/enet server test/enet2/docs/html/structENetProtocolPing.html b/enet server test/enet2/docs/html/structENetProtocolPing.html new file mode 100644 index 0000000..0b7730a --- /dev/null +++ b/enet server test/enet2/docs/html/structENetProtocolPing.html @@ -0,0 +1,131 @@ + + + + + + +ENet: ENetProtocolPing Struct Reference + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + + + + + + +
+ +
+ +
+
+ +
+
ENetProtocolPing Struct Reference
+
+
+ +

#include <protocol.h>

+ + + + +

+Data Fields

ENetProtocolCommandHeader header
 
+

Field Documentation

+ +
+
+ + + + +
ENetProtocolCommandHeader ENetProtocolPing::header
+
+ +
+
+
The documentation for this struct was generated from the following file: +
+ + + + diff --git a/enet server test/enet2/docs/html/structENetProtocolSendFragment.html b/enet server test/enet2/docs/html/structENetProtocolSendFragment.html new file mode 100644 index 0000000..bd2b2c1 --- /dev/null +++ b/enet server test/enet2/docs/html/structENetProtocolSendFragment.html @@ -0,0 +1,215 @@ + + + + + + +ENet: ENetProtocolSendFragment Struct Reference + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + + + + + + +
+ +
+ +
+
+ +
+
ENetProtocolSendFragment Struct Reference
+
+
+ +

#include <protocol.h>

+ + + + + + + + + + + + + + + + +

+Data Fields

enet_uint16 dataLength
 
enet_uint32 fragmentCount
 
enet_uint32 fragmentNumber
 
enet_uint32 fragmentOffset
 
ENetProtocolCommandHeader header
 
enet_uint16 startSequenceNumber
 
enet_uint32 totalLength
 
+

Field Documentation

+ +
+
+ + + + +
enet_uint16 ENetProtocolSendFragment::dataLength
+
+ +
+
+ +
+
+ + + + +
enet_uint32 ENetProtocolSendFragment::fragmentCount
+
+ +
+
+ +
+
+ + + + +
enet_uint32 ENetProtocolSendFragment::fragmentNumber
+
+ +
+
+ +
+
+ + + + +
enet_uint32 ENetProtocolSendFragment::fragmentOffset
+
+ +
+
+ +
+
+ + + + +
ENetProtocolCommandHeader ENetProtocolSendFragment::header
+
+ +
+
+ +
+
+ + + + +
enet_uint16 ENetProtocolSendFragment::startSequenceNumber
+
+ +
+
+ +
+
+ + + + +
enet_uint32 ENetProtocolSendFragment::totalLength
+
+ +
+
+
The documentation for this struct was generated from the following file: +
+ + + + diff --git a/enet server test/enet2/docs/html/structENetProtocolSendReliable.html b/enet server test/enet2/docs/html/structENetProtocolSendReliable.html new file mode 100644 index 0000000..8e6fefb --- /dev/null +++ b/enet server test/enet2/docs/html/structENetProtocolSendReliable.html @@ -0,0 +1,145 @@ + + + + + + +ENet: ENetProtocolSendReliable Struct Reference + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + + + + + + +
+ +
+ +
+
+ +
+
ENetProtocolSendReliable Struct Reference
+
+
+ +

#include <protocol.h>

+ + + + + + +

+Data Fields

enet_uint16 dataLength
 
ENetProtocolCommandHeader header
 
+

Field Documentation

+ +
+
+ + + + +
enet_uint16 ENetProtocolSendReliable::dataLength
+
+ +
+
+ +
+
+ + + + +
ENetProtocolCommandHeader ENetProtocolSendReliable::header
+
+ +
+
+
The documentation for this struct was generated from the following file: +
+ + + + diff --git a/enet server test/enet2/docs/html/structENetProtocolSendUnreliable.html b/enet server test/enet2/docs/html/structENetProtocolSendUnreliable.html new file mode 100644 index 0000000..29cbd2b --- /dev/null +++ b/enet server test/enet2/docs/html/structENetProtocolSendUnreliable.html @@ -0,0 +1,159 @@ + + + + + + +ENet: ENetProtocolSendUnreliable Struct Reference + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + + + + + + +
+ +
+ +
+
+ +
+
ENetProtocolSendUnreliable Struct Reference
+
+
+ +

#include <protocol.h>

+ + + + + + + + +

+Data Fields

enet_uint16 dataLength
 
ENetProtocolCommandHeader header
 
enet_uint16 unreliableSequenceNumber
 
+

Field Documentation

+ +
+
+ + + + +
enet_uint16 ENetProtocolSendUnreliable::dataLength
+
+ +
+
+ +
+
+ + + + +
ENetProtocolCommandHeader ENetProtocolSendUnreliable::header
+
+ +
+
+ +
+
+ + + + +
enet_uint16 ENetProtocolSendUnreliable::unreliableSequenceNumber
+
+ +
+
+
The documentation for this struct was generated from the following file: +
+ + + + diff --git a/enet server test/enet2/docs/html/structENetProtocolSendUnsequenced.html b/enet server test/enet2/docs/html/structENetProtocolSendUnsequenced.html new file mode 100644 index 0000000..ac53b3e --- /dev/null +++ b/enet server test/enet2/docs/html/structENetProtocolSendUnsequenced.html @@ -0,0 +1,159 @@ + + + + + + +ENet: ENetProtocolSendUnsequenced Struct Reference + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + + + + + + +
+ +
+ +
+
+ +
+
ENetProtocolSendUnsequenced Struct Reference
+
+
+ +

#include <protocol.h>

+ + + + + + + + +

+Data Fields

enet_uint16 dataLength
 
ENetProtocolCommandHeader header
 
enet_uint16 unsequencedGroup
 
+

Field Documentation

+ +
+
+ + + + +
enet_uint16 ENetProtocolSendUnsequenced::dataLength
+
+ +
+
+ +
+
+ + + + +
ENetProtocolCommandHeader ENetProtocolSendUnsequenced::header
+
+ +
+
+ +
+
+ + + + +
enet_uint16 ENetProtocolSendUnsequenced::unsequencedGroup
+
+ +
+
+
The documentation for this struct was generated from the following file: +
+ + + + diff --git a/enet server test/enet2/docs/html/structENetProtocolThrottleConfigure.html b/enet server test/enet2/docs/html/structENetProtocolThrottleConfigure.html new file mode 100644 index 0000000..76f235b --- /dev/null +++ b/enet server test/enet2/docs/html/structENetProtocolThrottleConfigure.html @@ -0,0 +1,173 @@ + + + + + + +ENet: ENetProtocolThrottleConfigure Struct Reference + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + + + + + + +
+ +
+ +
+
+ +
+
ENetProtocolThrottleConfigure Struct Reference
+
+
+ +

#include <protocol.h>

+ + + + + + + + + + +

+Data Fields

ENetProtocolCommandHeader header
 
enet_uint32 packetThrottleAcceleration
 
enet_uint32 packetThrottleDeceleration
 
enet_uint32 packetThrottleInterval
 
+

Field Documentation

+ +
+
+ + + + +
ENetProtocolCommandHeader ENetProtocolThrottleConfigure::header
+
+ +
+
+ +
+
+ + + + +
enet_uint32 ENetProtocolThrottleConfigure::packetThrottleAcceleration
+
+ +
+
+ +
+
+ + + + +
enet_uint32 ENetProtocolThrottleConfigure::packetThrottleDeceleration
+
+ +
+
+ +
+
+ + + + +
enet_uint32 ENetProtocolThrottleConfigure::packetThrottleInterval
+
+ +
+
+
The documentation for this struct was generated from the following file: +
+ + + + diff --git a/enet server test/enet2/docs/html/structENetProtocolVerifyConnect.html b/enet server test/enet2/docs/html/structENetProtocolVerifyConnect.html new file mode 100644 index 0000000..2a2333e --- /dev/null +++ b/enet server test/enet2/docs/html/structENetProtocolVerifyConnect.html @@ -0,0 +1,299 @@ + + + + + + +ENet: ENetProtocolVerifyConnect Struct Reference + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + + + + + + +
+ +
+ +
+
+ +
+
ENetProtocolVerifyConnect Struct Reference
+
+
+ +

#include <protocol.h>

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Data Fields

enet_uint32 channelCount
 
enet_uint32 connectID
 
ENetProtocolCommandHeader header
 
enet_uint32 incomingBandwidth
 
enet_uint8 incomingSessionID
 
enet_uint32 mtu
 
enet_uint32 outgoingBandwidth
 
enet_uint16 outgoingPeerID
 
enet_uint8 outgoingSessionID
 
enet_uint32 packetThrottleAcceleration
 
enet_uint32 packetThrottleDeceleration
 
enet_uint32 packetThrottleInterval
 
enet_uint32 windowSize
 
+

Field Documentation

+ +
+
+ + + + +
enet_uint32 ENetProtocolVerifyConnect::channelCount
+
+ +
+
+ +
+
+ + + + +
enet_uint32 ENetProtocolVerifyConnect::connectID
+
+ +
+
+ +
+
+ + + + +
ENetProtocolCommandHeader ENetProtocolVerifyConnect::header
+
+ +
+
+ +
+
+ + + + +
enet_uint32 ENetProtocolVerifyConnect::incomingBandwidth
+
+ +
+
+ +
+
+ + + + +
enet_uint8 ENetProtocolVerifyConnect::incomingSessionID
+
+ +
+
+ +
+
+ + + + +
enet_uint32 ENetProtocolVerifyConnect::mtu
+
+ +
+
+ +
+
+ + + + +
enet_uint32 ENetProtocolVerifyConnect::outgoingBandwidth
+
+ +
+
+ +
+
+ + + + +
enet_uint16 ENetProtocolVerifyConnect::outgoingPeerID
+
+ +
+
+ +
+
+ + + + +
enet_uint8 ENetProtocolVerifyConnect::outgoingSessionID
+
+ +
+
+ +
+
+ + + + +
enet_uint32 ENetProtocolVerifyConnect::packetThrottleAcceleration
+
+ +
+
+ +
+
+ + + + +
enet_uint32 ENetProtocolVerifyConnect::packetThrottleDeceleration
+
+ +
+
+ +
+
+ + + + +
enet_uint32 ENetProtocolVerifyConnect::packetThrottleInterval
+
+ +
+
+ +
+
+ + + + +
enet_uint32 ENetProtocolVerifyConnect::windowSize
+
+ +
+
+
The documentation for this struct was generated from the following file: +
+ + + + diff --git a/enet server test/enet2/docs/html/sync_off.png b/enet server test/enet2/docs/html/sync_off.png new file mode 100644 index 0000000000000000000000000000000000000000..0545c9feebfca776c3581d56547dcbfbf3168a91 GIT binary patch literal 848 zcmV-W1F!svP)x*oUgo5Jd4sA4-XdpGj>KO*BD#uvFY^iRY|)*?TW{DQ$S2%rBYQyE|v* z?#!H5SK6vnfJpS=8j&Y*#5~~^kHw(4Dtg6T04J^p0p^H3q9W7=h-5^Z7R};5V5!jn zHihClu>fES;>Au;B0d)<%nzdgbNxu1{SSki%WTmpc1H@ZS{#qCDuAi_T2vVww|9Zp zh^{kF1egXo*`LLbv4XuK4ZzMbGZw&++oKx_V1gNEPj2jAh(Xf60QDlifNaO8jHr*YXKj(jZ|(!=uPaLnzw z<>c4rvGR+8AfpuQUO{P9>3BagF_XT7{bcXRvTR)qFjrga8j9)lU1s*{x}n0QDyy24 z#iu!5)XC~Jy)|ByjHd?=IV^jBf0E_F7uF-k3gRWcQ8$eg0pI!LlJb*<_&nG&Ow?f^&^|Jd> z8fC^8Qu34O@}1%xZ+fs_+)>EQ6Sn~-NP0h!funkP7_cYeBO{>q@Ppx^w- zgZ_tXtlz-7`+Be;CN2iRk?~Adxu#*2eQ+)Px&nRqzlu1^kK<#g-Cx7y-}@N+{szDV zZ|2OUuCk89O)WehdJbUsfsqgNk{iFE#{VFXz+al a*u4a7!LILf8e5D20000?SM+J>8y<-X*Hnhb_(P(&MS5c*+;?xbhCu7~q@p6Bd5!^*EW*ALElp2L0J z_kHgBzP`HhDsusx=*udxR+Ncng-84;M#K-|vbY71h|3{ChBzp8Mn3~Mc_2O!9pVmP z3ok&NYVo1S2bhCo@rI}qEuzo*(hXQ+m-zY-I=8lTabC1JCD>5IB8oLZO`@go2mLg6zU4kyaf;~&(*QQ%zrq||bA;pF$4SZ7 z0R#NUPEAk_*dp!u5WS~+X)e=U2jHx3Sv{Y3f5D!I`lkBX_eH5i48A`^>FXtcEz)%XGtED3V@ow3RGtN}X)4)m z0C3{>__?&>TRICm=;`Pg3r{=@>7T7La2W@}5B_I~Ve_UsDY!r{N>0suc2w8zlYL?UjvDiDXhyG*V6Pb>fkM3!LPvt{{^@lm- z*<5J8$dcev<9qGL)%@J2>{q}RBRZrZz!tv^{m$mr zO?-1l4>$M%J^&l@na-~2?aD-*Ya7xT= z`{``&V)FhZKq4#6dZ3rw>;+}J4Lz>uq@dqBH8usr!WZxwYdsU5U2nh^SF~7}2^NbV z#WMi&ARIlw!{%joSG)-@PY!A4@fGcYSQx#}0Up-AgGGC`z3};8^v`;B-?iz>5C2S=CqDlN Z<4sGZ-lo^GM}WpLc)I$ztaD0e0s!09ENB1# literal 0 HcmV?d00001 diff --git a/enet server test/enet2/docs/html/tab_b.png b/enet server test/enet2/docs/html/tab_b.png new file mode 100644 index 0000000000000000000000000000000000000000..599fcd40ea3ffadf52583262d24e31ed570fd891 GIT binary patch literal 183 zcmeAS@N?(olHy`uVBq!ia0vp^j6kfy!2~3aiye;!Qgxm#jv*C{Z|B-_9deLhHNQW> zX_D8rZiTQ%l01sL|2^dTClb9PHpVI7;NlMP&pwmZ+8#FOKR(B)c3-~cr-?5bpZ(hP zVE(+zk54?@cf2&ZY;N*Zy_;LIa}0Evj<(GD6&Co_Of}V5e5r`Ay_lzp*P;3SOKgwy jreunpeq-ah`yqecCSiLe&zx;QmoRv``njxgN@xNAb{I&y literal 0 HcmV?d00001 diff --git a/enet server test/enet2/docs/html/tab_h.png b/enet server test/enet2/docs/html/tab_h.png new file mode 100644 index 0000000000000000000000000000000000000000..c8ad65538d2f2354760c268e46c800507aa08976 GIT binary patch literal 177 zcmeAS@N?(olHy`uVBq!ia0vp^j6kfy!2~3aiye;!QWc&qjv*C{Z|C}Q9WoGTRe#Uw zCGHh-BXzlz-n|=7}<_$JRzpK;s zt(%eG`BG-4-o%er{+5K4Eq-|+=)0F}R0oH+ssqpWqrQ1JKELPt@a)Kx4-DGUayez* c=SsgZmQCcYYbM-k2WrTfBYNPq#?pD^Zq4JS(R5 q@82>@Gw!LSQd9H}<=?rpPx2p97xK|upQ;6P5QC?ypUXO@geCy!q)r+D literal 0 HcmV?d00001 diff --git a/enet server test/enet2/docs/html/tabs.css b/enet server test/enet2/docs/html/tabs.css new file mode 100644 index 0000000..c7c786c --- /dev/null +++ b/enet server test/enet2/docs/html/tabs.css @@ -0,0 +1,60 @@ +.tabs, .tabs2, .tabs3 { + background-image: url('tab_b.png'); + width: 100%; + z-index: 101; + font-size: 13px; + font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; +} + +.tabs2 { + font-size: 10px; +} +.tabs3 { + font-size: 9px; +} + +.tablist { + margin: 0; + padding: 0; + display: table; +} + +.tablist li { + float: left; + display: table-cell; + background-image: url('tab_b.png'); + line-height: 36px; + list-style: none; +} + +.tablist a { + display: block; + padding: 0 20px; + font-weight: bold; + background-image:url('tab_s.png'); + background-repeat:no-repeat; + background-position:right; + color: #020602; + text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); + text-decoration: none; + outline: none; +} + +.tabs3 .tablist a { + padding: 0 10px; +} + +.tablist a:hover { + background-image: url('tab_h.png'); + background-repeat:repeat-x; + color: #fff; + text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); + text-decoration: none; +} + +.tablist li.current a { + background-image: url('tab_a.png'); + background-repeat:repeat-x; + color: #fff; + text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); +} diff --git a/enet server test/enet2/docs/html/time_8h.html b/enet server test/enet2/docs/html/time_8h.html new file mode 100644 index 0000000..2762739 --- /dev/null +++ b/enet server test/enet2/docs/html/time_8h.html @@ -0,0 +1,275 @@ + + + + + + +ENet: include/enet/time.h File Reference + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
time.h File Reference
+
+
+ +

ENet time constants and macros. +More...

+ + + + + + + + + + + + + + +

+Macros

#define ENET_TIME_DIFFERENCE(a, b)   ((a) - (b) >= ENET_TIME_OVERFLOW ? (b) - (a) : (a) - (b))
 
#define ENET_TIME_GREATER(a, b)   ((b) - (a) >= ENET_TIME_OVERFLOW)
 
#define ENET_TIME_GREATER_EQUAL(a, b)   (! ENET_TIME_LESS (a, b))
 
#define ENET_TIME_LESS(a, b)   ((a) - (b) >= ENET_TIME_OVERFLOW)
 
#define ENET_TIME_LESS_EQUAL(a, b)   (! ENET_TIME_GREATER (a, b))
 
#define ENET_TIME_OVERFLOW   86400000
 
+

Detailed Description

+

ENet time constants and macros.

+

Macro Definition Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
#define ENET_TIME_DIFFERENCE( a,
 
)   ((a) - (b) >= ENET_TIME_OVERFLOW ? (b) - (a) : (a) - (b))
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
#define ENET_TIME_GREATER( a,
 
)   ((b) - (a) >= ENET_TIME_OVERFLOW)
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
#define ENET_TIME_GREATER_EQUAL( a,
 
)   (! ENET_TIME_LESS (a, b))
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
#define ENET_TIME_LESS( a,
 
)   ((a) - (b) >= ENET_TIME_OVERFLOW)
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
#define ENET_TIME_LESS_EQUAL( a,
 
)   (! ENET_TIME_GREATER (a, b))
+
+ +
+
+ +
+
+ + + + +
#define ENET_TIME_OVERFLOW   86400000
+
+ +
+
+
+ + + + diff --git a/enet server test/enet2/docs/html/tutorial_8dox.html b/enet server test/enet2/docs/html/tutorial_8dox.html new file mode 100644 index 0000000..8089c3e --- /dev/null +++ b/enet server test/enet2/docs/html/tutorial_8dox.html @@ -0,0 +1,105 @@ + + + + + + +ENet: docs/tutorial.dox File Reference + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + + + + + + +
+ +
+ +
+
+
+
docs/tutorial.dox File Reference
+
+
+
+ + + + diff --git a/enet server test/enet2/docs/html/types_8h.html b/enet server test/enet2/docs/html/types_8h.html new file mode 100644 index 0000000..0e81a02 --- /dev/null +++ b/enet server test/enet2/docs/html/types_8h.html @@ -0,0 +1,172 @@ + + + + + + +ENet: include/enet/types.h File Reference + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
types.h File Reference
+
+
+ +

type definitions for ENet +More...

+ + + + + + + + + + + +

+Typedefs

typedef unsigned short enet_uint16
 unsigned 16-bit type More...
 
typedef unsigned int enet_uint32
 unsigned 32-bit type More...
 
typedef unsigned char enet_uint8
 unsigned 8-bit type More...
 
+

Detailed Description

+

type definitions for ENet

+

Typedef Documentation

+ +
+
+ + + + +
typedef unsigned short enet_uint16
+
+ +

unsigned 16-bit type

+ +
+
+ +
+
+ + + + +
typedef unsigned int enet_uint32
+
+ +

unsigned 32-bit type

+ +
+
+ +
+
+ + + + +
typedef unsigned char enet_uint8
+
+ +

unsigned 8-bit type

+ +
+
+
+ + + + diff --git a/enet server test/enet2/docs/html/unionENetProtocol.html b/enet server test/enet2/docs/html/unionENetProtocol.html new file mode 100644 index 0000000..8bcca69 --- /dev/null +++ b/enet server test/enet2/docs/html/unionENetProtocol.html @@ -0,0 +1,285 @@ + + + + + + +ENet: ENetProtocol Union Reference + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + + + + + + +
+ +
+ +
+
+ +
+
ENetProtocol Union Reference
+
+
+ +

#include <protocol.h>

+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+Data Fields

ENetProtocolAcknowledge acknowledge
 
ENetProtocolBandwidthLimit bandwidthLimit
 
ENetProtocolConnect connect
 
ENetProtocolDisconnect disconnect
 
ENetProtocolCommandHeader header
 
ENetProtocolPing ping
 
ENetProtocolSendFragment sendFragment
 
ENetProtocolSendReliable sendReliable
 
ENetProtocolSendUnreliable sendUnreliable
 
ENetProtocolSendUnsequenced sendUnsequenced
 
ENetProtocolThrottleConfigure throttleConfigure
 
ENetProtocolVerifyConnect verifyConnect
 
+

Field Documentation

+ +
+
+ + + + +
ENetProtocolAcknowledge ENetProtocol::acknowledge
+
+ +
+
+ +
+
+ + + + +
ENetProtocolBandwidthLimit ENetProtocol::bandwidthLimit
+
+ +
+
+ +
+
+ + + + +
ENetProtocolConnect ENetProtocol::connect
+
+ +
+
+ +
+
+ + + + +
ENetProtocolDisconnect ENetProtocol::disconnect
+
+ +
+
+ +
+
+ + + + +
ENetProtocolCommandHeader ENetProtocol::header
+
+ +
+
+ +
+
+ + + + +
ENetProtocolPing ENetProtocol::ping
+
+ +
+
+ +
+
+ + + + +
ENetProtocolSendFragment ENetProtocol::sendFragment
+
+ +
+
+ +
+
+ + + + +
ENetProtocolSendReliable ENetProtocol::sendReliable
+
+ +
+
+ +
+
+ + + + +
ENetProtocolSendUnreliable ENetProtocol::sendUnreliable
+
+ +
+
+ +
+
+ + + + +
ENetProtocolSendUnsequenced ENetProtocol::sendUnsequenced
+
+ +
+
+ +
+
+ + + + +
ENetProtocolThrottleConfigure ENetProtocol::throttleConfigure
+
+ +
+
+ +
+
+ + + + +
ENetProtocolVerifyConnect ENetProtocol::verifyConnect
+
+ +
+
+
The documentation for this union was generated from the following file: +
+ + + + diff --git a/enet server test/enet2/docs/html/unix_8c.html b/enet server test/enet2/docs/html/unix_8c.html new file mode 100644 index 0000000..49f0a57 --- /dev/null +++ b/enet server test/enet2/docs/html/unix_8c.html @@ -0,0 +1,285 @@ + + + + + + +ENet: unix.c File Reference + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + + + + + + +
+ +
+ +
+
+ +
+
unix.c File Reference
+
+
+ +

ENet Unix system specific functions. +More...

+
#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/ioctl.h>
+#include <sys/time.h>
+#include <arpa/inet.h>
+#include <netinet/tcp.h>
+#include <netdb.h>
+#include <unistd.h>
+#include <string.h>
+#include <errno.h>
+#include <time.h>
+#include "enet/enet.h"
+
+ + + + + +

+Macros

#define ENET_BUILDING_LIB   1
 
#define MSG_NOSIGNAL   0
 
+ + + +

+Typedefs

typedef int socklen_t
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

int enet_address_get_host (const ENetAddress *address, char *name, size_t nameLength)
 Attempts to do a reverse lookup of the host field in the address parameter. More...
 
int enet_address_get_host_ip (const ENetAddress *address, char *name, size_t nameLength)
 Gives the printable form of the IP address specified in the address parameter. More...
 
int enet_address_set_host (ENetAddress *address, const char *name)
 Attempts to resolve the host named by the parameter hostName and sets the host field in the address parameter if successful. More...
 
void enet_deinitialize (void)
 Shuts down ENet globally. More...
 
enet_uint32 enet_host_random_seed (void)
 
int enet_initialize (void)
 Initializes ENet globally. More...
 
ENetSocket enet_socket_accept (ENetSocket socket, ENetAddress *address)
 
int enet_socket_bind (ENetSocket socket, const ENetAddress *address)
 
int enet_socket_connect (ENetSocket socket, const ENetAddress *address)
 
ENetSocket enet_socket_create (ENetSocketType type)
 
void enet_socket_destroy (ENetSocket socket)
 
int enet_socket_get_address (ENetSocket socket, ENetAddress *address)
 
int enet_socket_get_option (ENetSocket socket, ENetSocketOption option, int *value)
 
int enet_socket_listen (ENetSocket socket, int backlog)
 
int enet_socket_receive (ENetSocket socket, ENetAddress *address, ENetBuffer *buffers, size_t bufferCount)
 
int enet_socket_send (ENetSocket socket, const ENetAddress *address, const ENetBuffer *buffers, size_t bufferCount)
 
int enet_socket_set_option (ENetSocket socket, ENetSocketOption option, int value)
 
int enet_socket_shutdown (ENetSocket socket, ENetSocketShutdown how)
 
int enet_socket_wait (ENetSocket socket, enet_uint32 *condition, enet_uint32 timeout)
 
int enet_socketset_select (ENetSocket maxSocket, ENetSocketSet *readSet, ENetSocketSet *writeSet, enet_uint32 timeout)
 
enet_uint32 enet_time_get (void)
 Returns the wall-time in milliseconds. More...
 
void enet_time_set (enet_uint32 newTimeBase)
 Sets the current wall-time in milliseconds. More...
 
+

Detailed Description

+

ENet Unix system specific functions.

+

Macro Definition Documentation

+ +
+
+ + + + +
#define ENET_BUILDING_LIB   1
+
+ +
+
+ +
+
+ + + + +
#define MSG_NOSIGNAL   0
+
+ +
+
+

Typedef Documentation

+ +
+
+ + + + +
typedef int socklen_t
+
+ +
+
+

Function Documentation

+ +
+
+ + + + + + + + +
enet_uint32 enet_host_random_seed (void )
+
+ +
+
+ +
+
+ + + + + + + + +
enet_uint32 enet_time_get (void )
+
+ +

Returns the wall-time in milliseconds.

+

Its initial value is unspecified unless otherwise set.

+ +
+
+ +
+
+ + + + + + + + +
void enet_time_set (enet_uint32 newTimeBase)
+
+ +

Sets the current wall-time in milliseconds.

+ +
+
+
+ + + + diff --git a/enet server test/enet2/docs/html/unix_8h.html b/enet server test/enet2/docs/html/unix_8h.html new file mode 100644 index 0000000..80067dd --- /dev/null +++ b/enet server test/enet2/docs/html/unix_8h.html @@ -0,0 +1,394 @@ + + + + + + +ENet: include/enet/unix.h File Reference + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
unix.h File Reference
+
+
+ +

ENet Unix header. +More...

+
#include <stdlib.h>
+#include <sys/time.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <unistd.h>
+
+ + + +

+Data Structures

struct  ENetBuffer
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Macros

#define ENET_API   extern
 
#define ENET_CALLBACK
 
#define ENET_HOST_TO_NET_16(value)   (htons (value))
 macro that converts host to net byte-order of a 16-bit value More...
 
#define ENET_HOST_TO_NET_32(value)   (htonl (value))
 macro that converts host to net byte-order of a 32-bit value More...
 
#define ENET_NET_TO_HOST_16(value)   (ntohs (value))
 macro that converts net to host byte-order of a 16-bit value More...
 
#define ENET_NET_TO_HOST_32(value)   (ntohl (value))
 macro that converts net to host byte-order of a 32-bit value More...
 
#define ENET_SOCKET_NULL   -1
 
#define ENET_SOCKETSET_ADD(sockset, socket)   FD_SET (socket, & (sockset))
 
#define ENET_SOCKETSET_CHECK(sockset, socket)   FD_ISSET (socket, & (sockset))
 
#define ENET_SOCKETSET_EMPTY(sockset)   FD_ZERO (& (sockset))
 
#define ENET_SOCKETSET_REMOVE(sockset, socket)   FD_CLR (socket, & (sockset))
 
+ + + + + +

+Typedefs

typedef int ENetSocket
 
typedef fd_set ENetSocketSet
 
+

Detailed Description

+

ENet Unix header.

+

Macro Definition Documentation

+ +
+
+ + + + +
#define ENET_API   extern
+
+ +
+
+ +
+
+ + + + +
#define ENET_CALLBACK
+
+ +
+
+ +
+
+ + + + + + + + +
#define ENET_HOST_TO_NET_16( value)   (htons (value))
+
+ +

macro that converts host to net byte-order of a 16-bit value

+ +
+
+ +
+
+ + + + + + + + +
#define ENET_HOST_TO_NET_32( value)   (htonl (value))
+
+ +

macro that converts host to net byte-order of a 32-bit value

+ +
+
+ +
+
+ + + + + + + + +
#define ENET_NET_TO_HOST_16( value)   (ntohs (value))
+
+ +

macro that converts net to host byte-order of a 16-bit value

+ +
+
+ +
+
+ + + + + + + + +
#define ENET_NET_TO_HOST_32( value)   (ntohl (value))
+
+ +

macro that converts net to host byte-order of a 32-bit value

+ +
+
+ +
+
+ + + + +
#define ENET_SOCKET_NULL   -1
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
#define ENET_SOCKETSET_ADD( sockset,
 socket 
)   FD_SET (socket, & (sockset))
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
#define ENET_SOCKETSET_CHECK( sockset,
 socket 
)   FD_ISSET (socket, & (sockset))
+
+ +
+
+ +
+
+ + + + + + + + +
#define ENET_SOCKETSET_EMPTY( sockset)   FD_ZERO (& (sockset))
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
#define ENET_SOCKETSET_REMOVE( sockset,
 socket 
)   FD_CLR (socket, & (sockset))
+
+ +
+
+

Typedef Documentation

+ +
+
+ + + + +
typedef int ENetSocket
+
+ +
+
+ +
+
+ + + + +
typedef fd_set ENetSocketSet
+
+ +
+
+
+ + + + diff --git a/enet server test/enet2/docs/html/usergroup0.html b/enet server test/enet2/docs/html/usergroup0.html new file mode 100644 index 0000000..92c8317 --- /dev/null +++ b/enet server test/enet2/docs/html/usergroup0.html @@ -0,0 +1,111 @@ + + + + + + +ENet: Documentation + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + + +
+ + + + +
+ +
+ +
+
+
Documentation
+
+ + + + + diff --git a/enet server test/enet2/docs/html/utility_8h.html b/enet server test/enet2/docs/html/utility_8h.html new file mode 100644 index 0000000..7dbe6a5 --- /dev/null +++ b/enet server test/enet2/docs/html/utility_8h.html @@ -0,0 +1,177 @@ + + + + + + +ENet: include/enet/utility.h File Reference + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
utility.h File Reference
+
+
+ +

ENet utility header. +More...

+ + + + + + +

+Macros

#define ENET_MAX(x, y)   ((x) > (y) ? (x) : (y))
 
#define ENET_MIN(x, y)   ((x) < (y) ? (x) : (y))
 
+

Detailed Description

+

ENet utility header.

+

Macro Definition Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
#define ENET_MAX( x,
 
)   ((x) > (y) ? (x) : (y))
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
#define ENET_MIN( x,
 
)   ((x) < (y) ? (x) : (y))
+
+ +
+
+
+ + + + diff --git a/enet server test/enet2/docs/html/win32_8c.html b/enet server test/enet2/docs/html/win32_8c.html new file mode 100644 index 0000000..b945ce9 --- /dev/null +++ b/enet server test/enet2/docs/html/win32_8c.html @@ -0,0 +1,110 @@ + + + + + + +ENet: win32.c File Reference + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + + + + + + +
+ +
+ +
+
+
+
win32.c File Reference
+
+
+ +

ENet Win32 system specific functions. +More...

+

Detailed Description

+

ENet Win32 system specific functions.

+
+ + + + diff --git a/enet server test/enet2/docs/html/win32_8h.html b/enet server test/enet2/docs/html/win32_8h.html new file mode 100644 index 0000000..f3830da --- /dev/null +++ b/enet server test/enet2/docs/html/win32_8h.html @@ -0,0 +1,378 @@ + + + + + + +ENet: include/enet/win32.h File Reference + + + + + + + + + +
+
+ + + + + + +
+
ENet +  v1.3.13 +
+
Reliable UDP networking library
+
+
+ + + + + + + + + +
+ +
+ + +
+
+ +
+
win32.h File Reference
+
+
+ +

ENet Win32 header. +More...

+
#include <stdlib.h>
+#include <winsock2.h>
+
+ + + +

+Data Structures

struct  ENetBuffer
 
+ + + + + + + + + + + + + + + + + + + + + + + +

+Macros

#define ENET_API   extern
 
#define ENET_CALLBACK   __cdecl
 
#define ENET_HOST_TO_NET_16(value)   (htons (value))
 
#define ENET_HOST_TO_NET_32(value)   (htonl (value))
 
#define ENET_NET_TO_HOST_16(value)   (ntohs (value))
 
#define ENET_NET_TO_HOST_32(value)   (ntohl (value))
 
#define ENET_SOCKET_NULL   INVALID_SOCKET
 
#define ENET_SOCKETSET_ADD(sockset, socket)   FD_SET (socket, & (sockset))
 
#define ENET_SOCKETSET_CHECK(sockset, socket)   FD_ISSET (socket, & (sockset))
 
#define ENET_SOCKETSET_EMPTY(sockset)   FD_ZERO (& (sockset))
 
#define ENET_SOCKETSET_REMOVE(sockset, socket)   FD_CLR (socket, & (sockset))
 
+ + + + + +

+Typedefs

typedef SOCKET ENetSocket
 
typedef fd_set ENetSocketSet
 
+

Detailed Description

+

ENet Win32 header.

+

Macro Definition Documentation

+ +
+
+ + + + +
#define ENET_API   extern
+
+ +
+
+ +
+
+ + + + +
#define ENET_CALLBACK   __cdecl
+
+ +
+
+ +
+
+ + + + + + + + +
#define ENET_HOST_TO_NET_16( value)   (htons (value))
+
+ +
+
+ +
+
+ + + + + + + + +
#define ENET_HOST_TO_NET_32( value)   (htonl (value))
+
+ +
+
+ +
+
+ + + + + + + + +
#define ENET_NET_TO_HOST_16( value)   (ntohs (value))
+
+ +
+
+ +
+
+ + + + + + + + +
#define ENET_NET_TO_HOST_32( value)   (ntohl (value))
+
+ +
+
+ +
+
+ + + + +
#define ENET_SOCKET_NULL   INVALID_SOCKET
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
#define ENET_SOCKETSET_ADD( sockset,
 socket 
)   FD_SET (socket, & (sockset))
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
#define ENET_SOCKETSET_CHECK( sockset,
 socket 
)   FD_ISSET (socket, & (sockset))
+
+ +
+
+ +
+
+ + + + + + + + +
#define ENET_SOCKETSET_EMPTY( sockset)   FD_ZERO (& (sockset))
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
#define ENET_SOCKETSET_REMOVE( sockset,
 socket 
)   FD_CLR (socket, & (sockset))
+
+ +
+
+

Typedef Documentation

+ +
+
+ + + + +
typedef SOCKET ENetSocket
+
+ +
+
+ +
+
+ + + + +
typedef fd_set ENetSocketSet
+
+ +
+
+
+ + + + diff --git a/enet server test/enet2/docs/install.dox b/enet server test/enet2/docs/install.dox new file mode 100644 index 0000000..b9730d7 --- /dev/null +++ b/enet server test/enet2/docs/install.dox @@ -0,0 +1,63 @@ +/** +@page Installation Installation + +ENet should be trivially simple to integrate with most applications. +First, make sure you download the latest source distribution at @ref Downloads. + +@section Unix Unix-like Operating Systems + +If you are using an ENet release, then you should simply be able to build it +by doing the following: + +./configure && make && make install + +If you obtained the package from github, you must have automake and autoconf +available to generate the build system first by doing the following command +before using the above mentioned build procedure: + +autoreconf -vfi + + +@subsection SolarisBSD Solaris and BSD + +When building ENet under Solaris, you must specify the -lsocket and +-lnsl parameters to your compiler to ensure that the sockets library +is linked in. + +@section Windows Microsoft Windows + +You may simply use the included "enet.lib" or "enet64.lib" static libraries. +However, if you wish to build the library yourself, then the following +instructions apply: + +There is an included MSVC 6 project (enet.dsp) which you may use to +build a suitable library file. Alternatively, you may simply drag all +the ENet source files into your main project. + +You will have to link to the Winsock2 libraries, so make sure to add +ws2_32.lib and winmm.lib to your library list (Project Settings | Link | +Object/library modules). + +@subsection enet.dsp Building with the included enet.dsp + +Load the included enet.dsp. MSVC may ask you to convert it if you +are on a newer version of MSVC - just allow the conversion and save +the resulting project as "enet" or similar. After you build this +project, it will output an "enet.lib" file to either the "Debug/" +or "Release/" directory, depending on which configuration you have +selected to build. By default, it should produce "Debug/enet.lib". + +You may then copy the resulting "enet.lib" file and the header files +found in the "include/" directory to your other projects and add it to +their library lists. Make sure to also link against "ws2_32.lib" and +"winmm.lib" as described above. + +@subsection DLL DLL + +If you wish to build ENet as a DLL you must first define ENET_DLL +within the project (Project Settings | C/C++ | Preprocessor | +Preprocessor definitions) or, more invasively, simply define ENET_DLL +at the top of enet.h. + +*/ + diff --git a/enet server test/enet2/docs/license.dox b/enet server test/enet2/docs/license.dox new file mode 100644 index 0000000..924393b --- /dev/null +++ b/enet server test/enet2/docs/license.dox @@ -0,0 +1,26 @@ +/** + @page License License + +Copyright (c) 2002-2015 Lee Salzman + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +*/ + diff --git a/enet server test/enet2/docs/mainpage.dox b/enet server test/enet2/docs/mainpage.dox new file mode 100644 index 0000000..7fbbee1 --- /dev/null +++ b/enet server test/enet2/docs/mainpage.dox @@ -0,0 +1,59 @@ +/** @mainpage ENet + +ENet's purpose is to provide a relatively thin, simple and robust +network communication layer on top of UDP (User Datagram Protocol). +The primary feature it provides is optional reliable, in-order +delivery of packets. + +ENet omits certain higher level networking features such as authentication, +lobbying, server discovery, encryption, or other similar tasks that are +particularly application specific so that the library remains flexible, +portable, and easily embeddable. + +@ref Features + +@ref Downloads + +@ref Installation + +@ref Tutorial + +@ref MailingList + +@ref IRCChannel + +@ref FAQ + +@ref License + +Documentation + + */ + +/** +@page Downloads Downloads + +You can retrieve the source to ENet by downloading it in either .tar.gz form +or accessing the github distribution directly. + +The most recent stable release (1.3.13) can be downloaded here. +The last release that is protocol compatible with the 1.2 series or earlier (1.2.5) can be downloaded here. + +You can find the most recent ENet source at the github repository. + +*/ + +/** +@page MailingList Mailing List + +The enet-discuss list is for discussion of ENet, including bug reports or feature requests. + +*/ + +/** +@page IRCChannel IRC Channel + +Join the \#enet channel on the freenode IRC network (irc.freenode.net) for real-time discussion about the ENet library. + +*/ + diff --git a/enet server test/enet2/docs/tutorial.dox b/enet server test/enet2/docs/tutorial.dox new file mode 100644 index 0000000..e91eae8 --- /dev/null +++ b/enet server test/enet2/docs/tutorial.dox @@ -0,0 +1,366 @@ +/** +@page Tutorial Tutorial + +@ref Initialization + +@ref CreateServer + +@ref CreateClient + +@ref ManageHost + +@ref SendingPacket + +@ref Disconnecting + +@ref Connecting + +@section Initialization Initialization + +You should include the file when using ENet. Do not +include without the directory prefix, as this may cause +file name conflicts on some systems. + +Before using ENet, you must call enet_initialize() to initialize the +library. Upon program exit, you should call enet_deinitialize() so +that the library may clean up any used resources. + +@code +#include + +int +main (int argc, char ** argv) +{ + if (enet_initialize () != 0) + { + fprintf (stderr, "An error occurred while initializing ENet.\n"); + return EXIT_FAILURE; + } + atexit (enet_deinitialize); + ... + ... + ... +} +@endcode + +@section CreateServer Creating an ENet server + +Servers in ENet are constructed with enet_host_create(). You must +specify an address on which to receive data and new connections, as +well as the maximum allowable numbers of connected peers. You may +optionally specify the incoming and outgoing bandwidth of the server +in bytes per second so that ENet may try to statically manage +bandwidth resources among connected peers in addition to its dynamic +throttling algorithm; specifying 0 for these two options will cause +ENet to rely entirely upon its dynamic throttling algorithm to manage +bandwidth. + +When done with a host, the host may be destroyed with +enet_host_destroy(). All connected peers to the host will be reset, +and the resources used by the host will be freed. + +@code + ENetAddress address; + ENetHost * server; + + /* Bind the server to the default localhost. */ + /* A specific host address can be specified by */ + /* enet_address_set_host (& address, "x.x.x.x"); */ + + address.host = ENET_HOST_ANY; + /* Bind the server to port 1234. */ + address.port = 1234; + + server = enet_host_create (& address /* the address to bind the server host to */, + 32 /* allow up to 32 clients and/or outgoing connections */, + 2 /* allow up to 2 channels to be used, 0 and 1 */, + 0 /* assume any amount of incoming bandwidth */, + 0 /* assume any amount of outgoing bandwidth */); + if (server == NULL) + { + fprintf (stderr, + "An error occurred while trying to create an ENet server host.\n"); + exit (EXIT_FAILURE); + } + ... + ... + ... + enet_host_destroy(server); +@endcode + +@section CreateClient Creating an ENet client + +Clients in ENet are similarly constructed with enet_host_create() when +no address is specified to bind the host to. Bandwidth may be +specified for the client host as in the above example. The peer count +controls the maximum number of connections to other server hosts that +may be simultaneously open. + +@code + ENetHost * client; + + client = enet_host_create (NULL /* create a client host */, + 1 /* only allow 1 outgoing connection */, + 2 /* allow up 2 channels to be used, 0 and 1 */, + 57600 / 8 /* 56K modem with 56 Kbps downstream bandwidth */, + 14400 / 8 /* 56K modem with 14 Kbps upstream bandwidth */); + + if (client == NULL) + { + fprintf (stderr, + "An error occurred while trying to create an ENet client host.\n"); + exit (EXIT_FAILURE); + } + ... + ... + ... + enet_host_destroy(client); +@endcode + +@section ManageHost Managing an ENet host + +ENet uses a polled event model to notify the programmer of significant +events. ENet hosts are polled for events with enet_host_service(), +where an optional timeout value in milliseconds may be specified to +control how long ENet will poll; if a timeout of 0 is specified, +enet_host_service() will return immediately if there are no events to +dispatch. enet_host_service() will return 1 if an event was dispatched +within the specified timeout. + +Beware that most processing of the network with the ENet stack is done +inside enet_host_service(). Both hosts that make up the sides of a connection +must regularly call this function to ensure packets are actually sent and +received. A common symptom of not actively calling enet_host_service() +on both ends is that one side receives events while the other does not. +The best way to schedule this activity to ensure adequate service is, for +example, to call enet_host_service() with a 0 timeout (meaning non-blocking) +at the beginning of every frame in a game loop. + +Currently there are only four types of significant events in ENet: + +An event of type ENET_EVENT_TYPE_NONE is returned if no event occurred +within the specified time limit. enet_host_service() will return 0 +with this event. + +An event of type ENET_EVENT_TYPE_CONNECT is returned when either a new client +host has connected to the server host or when an attempt to establish a +connection with a foreign host has succeeded. Only the "peer" field of the +event structure is valid for this event and contains the newly connected peer. + +An event of type ENET_EVENT_TYPE_RECEIVE is returned when a packet is received +from a connected peer. The "peer" field contains the peer the packet was +received from, "channelID" is the channel on which the packet was sent, and +"packet" is the packet that was sent. The packet contained in the "packet" +field must be destroyed with enet_packet_destroy() when you are done +inspecting its contents. + +An event of type ENET_EVENT_TYPE_DISCONNECT is returned when a connected peer +has either explicitly disconnected or timed out. Only the "peer" field of the +event structure is valid for this event and contains the peer that +disconnected. Only the "data" field of the peer is still valid on a +disconnect event and must be explicitly reset. + +@code + ENetEvent event; + + /* Wait up to 1000 milliseconds for an event. */ + while (enet_host_service (client, & event, 1000) > 0) + { + switch (event.type) + { + case ENET_EVENT_TYPE_CONNECT: + printf ("A new client connected from %x:%u.\n", + event.peer -> address.host, + event.peer -> address.port); + + /* Store any relevant client information here. */ + event.peer -> data = "Client information"; + + break; + + case ENET_EVENT_TYPE_RECEIVE: + printf ("A packet of length %u containing %s was received from %s on channel %u.\n", + event.packet -> dataLength, + event.packet -> data, + event.peer -> data, + event.channelID); + + /* Clean up the packet now that we're done using it. */ + enet_packet_destroy (event.packet); + + break; + + case ENET_EVENT_TYPE_DISCONNECT: + printf ("%s disconnected.\n", event.peer -> data); + + /* Reset the peer's client information. */ + + event.peer -> data = NULL; + } + } + ... + ... + ... +@endcode + +@section SendingPacket Sending a packet to an ENet peer + +Packets in ENet are created with enet_packet_create(), where the size +of the packet must be specified. Optionally, initial data may be +specified to copy into the packet. + +Certain flags may also be supplied to enet_packet_create() to control +various packet features: + +ENET_PACKET_FLAG_RELIABLE specifies that the packet must use reliable +delivery. A reliable packet is guaranteed to be delivered, and a +number of retry attempts will be made until an acknowledgement is +received from the foreign host the packet is sent to. If a certain +number of retry attempts is reached without any acknowledgement, ENet +will assume the peer has disconnected and forcefully reset the +connection. If this flag is not specified, the packet is assumed an +unreliable packet, and no retry attempts will be made nor +acknowledgements generated. + +A packet may be resized (extended or truncated) with +enet_packet_resize(). + +A packet is sent to a foreign host with +enet_peer_send(). enet_peer_send() accepts a channel id over which to +send the packet to a given peer. Once the packet is handed over to +ENet with enet_peer_send(), ENet will handle its deallocation and +enet_packet_destroy() should not be used upon it. + +One may also use enet_host_broadcast() to send a packet to all +connected peers on a given host over a specified channel id, as with +enet_peer_send(). + +Queued packets will be sent on a call to enet_host_service(). +Alternatively, enet_host_flush() will send out queued packets without +dispatching any events. + +@code + /* Create a reliable packet of size 7 containing "packet\0" */ + ENetPacket * packet = enet_packet_create ("packet", + strlen ("packet") + 1, + ENET_PACKET_FLAG_RELIABLE); + + /* Extend the packet so and append the string "foo", so it now */ + /* contains "packetfoo\0" */ + enet_packet_resize (packet, strlen ("packetfoo") + 1); + strcpy (& packet -> data [strlen ("packet")], "foo"); + + /* Send the packet to the peer over channel id 0. */ + /* One could also broadcast the packet by */ + /* enet_host_broadcast (host, 0, packet); */ + enet_peer_send (peer, 0, packet); + ... + ... + ... + /* One could just use enet_host_service() instead. */ + enet_host_flush (host); +@endcode + +@section Disconnecting Disconnecting an ENet peer + +Peers may be gently disconnected with enet_peer_disconnect(). A +disconnect request will be sent to the foreign host, and ENet will +wait for an acknowledgement from the foreign host before finally +disconnecting. An event of type ENET_EVENT_TYPE_DISCONNECT will be +generated once the disconnection succeeds. Normally timeouts apply to +the disconnect acknowledgement, and so if no acknowledgement is +received after a length of time the peer will be forcefully +disconnected. + +enet_peer_reset() will forcefully disconnect a peer. The foreign host +will get no notification of a disconnect and will time out on the +foreign host. No event is generated. + +@code + ENetEvent event; + + enet_peer_disconnect (peer, 0); + + /* Allow up to 3 seconds for the disconnect to succeed + * and drop any packets received packets. + */ + while (enet_host_service (client, & event, 3000) > 0) + { + switch (event.type) + { + case ENET_EVENT_TYPE_RECEIVE: + enet_packet_destroy (event.packet); + break; + + case ENET_EVENT_TYPE_DISCONNECT: + puts ("Disconnection succeeded."); + return; + ... + ... + ... + } + } + + /* We've arrived here, so the disconnect attempt didn't */ + /* succeed yet. Force the connection down. */ + enet_peer_reset (peer); + ... + ... + ... +@endcode + +@section Connecting Connecting to an ENet host + +A connection to a foreign host is initiated with enet_host_connect(). +It accepts the address of a foreign host to connect to, and the number +of channels that should be allocated for communication. If N channels +are allocated for use, their channel ids will be numbered 0 through +N-1. A peer representing the connection attempt is returned, or NULL +if there were no available peers over which to initiate the +connection. When the connection attempt succeeds, an event of type +ENET_EVENT_TYPE_CONNECT will be generated. If the connection attempt +times out or otherwise fails, an event of type +ENET_EVENT_TYPE_DISCONNECT will be generated. + +@code + ENetAddress address; + ENetEvent event; + ENetPeer *peer; + + /* Connect to some.server.net:1234. */ + enet_address_set_host (& address, "some.server.net"); + address.port = 1234; + + /* Initiate the connection, allocating the two channels 0 and 1. */ + peer = enet_host_connect (client, & address, 2, 0); + + if (peer == NULL) + { + fprintf (stderr, + "No available peers for initiating an ENet connection.\n"); + exit (EXIT_FAILURE); + } + + /* Wait up to 5 seconds for the connection attempt to succeed. */ + if (enet_host_service (client, & event, 5000) > 0 && + event.type == ENET_EVENT_TYPE_CONNECT) + { + puts ("Connection to some.server.net:1234 succeeded."); + ... + ... + ... + } + else + { + /* Either the 5 seconds are up or a disconnect event was */ + /* received. Reset the peer in the event the 5 seconds */ + /* had run out without any significant event. */ + enet_peer_reset (peer); + + puts ("Connection to some.server.net:1234 failed."); + } + ... + ... + ... +@endcode +*/ diff --git a/enet server test/enet2/enet.dsp b/enet server test/enet2/enet.dsp new file mode 100644 index 0000000..dce4537 --- /dev/null +++ b/enet server test/enet2/enet.dsp @@ -0,0 +1,168 @@ +# Microsoft Developer Studio Project File - Name="enet" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=enet - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "enet.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "enet.mak" CFG="enet - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "enet - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "enet - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "enet - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +MTL=midl.exe +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /W3 /O2 /I "include" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /FD /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "enet - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +MTL=midl.exe +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /G6 /MTd /W3 /ZI /Od /I "include" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /FR /FD /GZ /c +# SUBTRACT CPP /YX +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ENDIF + +# Begin Target + +# Name "enet - Win32 Release" +# Name "enet - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\host.c +# End Source File +# Begin Source File + +SOURCE=.\list.c +# End Source File +# Begin Source File + +SOURCE=.\callbacks.c +# End Source File +# Begin Source File + +SOURCE=.\compress.c +# End Source File +# Begin Source File + +SOURCE=.\packet.c +# End Source File +# Begin Source File + +SOURCE=.\peer.c +# End Source File +# Begin Source File + +SOURCE=.\protocol.c +# End Source File +# Begin Source File + +SOURCE=.\unix.c +# End Source File +# Begin Source File + +SOURCE=.\win32.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\include\enet\enet.h +# End Source File +# Begin Source File + +SOURCE=.\include\enet\list.h +# End Source File +# Begin Source File + +SOURCE=.\include\enet\callbacks.h +# End Source File +# Begin Source File + +SOURCE=.\include\enet\protocol.h +# End Source File +# Begin Source File + +SOURCE=.\include\enet\time.h +# End Source File +# Begin Source File + +SOURCE=.\include\enet\types.h +# End Source File +# Begin Source File + +SOURCE=.\include\enet\unix.h +# End Source File +# Begin Source File + +SOURCE=.\include\enet\utility.h +# End Source File +# Begin Source File + +SOURCE=.\include\enet\win32.h +# End Source File +# End Group +# End Target +# End Project diff --git a/enet server test/enet2/enet.lib b/enet server test/enet2/enet.lib new file mode 100644 index 0000000000000000000000000000000000000000..6ce8caad104d70dbfeb6ef990b83082043a5e2fa GIT binary patch literal 51152 zcmeFa3wTu3y*Iok8Nv`FJKAW|Hr3HiX`-o3G}=swcF5#bKn+)EMFB}hC=p^Z0jg*N zdnUe$`+96^FXz;^H$AN-XuV_-$snyYfC65Nw$+T0irPZJOWxmat-bfmkf5IS zeDCvp&-2dn%-;XK_PYMp|F+ipueHypTGqCF#YMSa@MiwXE6yvcC@U{7Ki}&uldsaR zUT?Yoyb6_KX|ASe4VpH2SLQ#jP}7e6f9@BW_Cf#YCu`cV|BE(gTKd2CF-`lQ{I6N4 zY3cv}a%gMp0m8(~VS1xN=d0q38bt}UwmMmY^(sI?Z<*V8?^}c20>Q&86 zOV&2GwXa;W+6ue|k=87?9zt!+%@)|UZ1vU6OO~%`YHnN7)Z89!Tl0+x-Yj2pO>0|o zyIn$Nq7Qhvysddz*e+_tn)WbCQaP!rr)6Z7sv?a`mRU6`r`4;Qmxt5SUDdW`S<~`m z?HPe~iRlrSuULk}ElXNfUb8YI@>R=LH?3RQ1gw6*tMH1pHQ{iJ-L96EY*$P3vNo#- z8L)D7dvlwew+v}(zGltZj6}yix1&$3JX+DA=<5swT49;EumaILsl?0MmY;X7ol!G- z)~+$ozdE$?>W((2nDn>lDcYKsH?MSR+sbGt0yVm}qq(EmCIlJ2W;L@->kB)yX=VEa zFJw09MYXP6eKm+W+}yTySxfqh@XBkN*L2u8l)1{%mjE}b*Q{%4Zo0bpn&#CR5m3dB z)+I=F^%`c2&c6m-nw~3*OMjlYma3o+%BQ_KGv8D`OHjFqOIXqZcCg7rHVCO&mxY(F z00K}~R=Hz!TXW0GWmmP3EoJR9usuG(2S!)za56szAE4tk%h$Bn1uaRVA<1K*mX7un zR#Ozyt!Q4pYDx22VBM~j3FzY-?LNcS0gPUz( zYDLaqPAiNxThkg&3Es4fCkoGG5G(Ss<;$B}?Z(*|ujmLjtyyeOSWkavyHbntB?H4FFuyKRWJ(lIt%o?9(t>4U#?h2Qh z4esdU;Zku5BZ?ED`86}(iS~sj{n!II$>7bg`={}4HoB2y|JE`524ZWqttV!?Gy<`Q zKF9aQ>!rxLOt^hxGCSmwXFOIqV5b)~zM`>Hm@T3e@r{+SmHvk;eQf_``^P-(Uwtt6 zC2w*4B@0Tt73cWRDQEbn@u%sPqkYDKzTiMD4%Fp9KXf3XHXncDO4CllKSyKnFuwq? zjvtfIIiZ!%mFoBYn5JFrN>SHxE1b8}EZBt}0g5O5U1WuVv^3I!rhNtfM*L+e2548} zzZCye$SOSD?S!P$B8$m({S;SHVCt7nhq5deDN&VZ$4aL`zClk;_*-j*k}I-Z#MAiS zMkfeu*Opk;nhKO5(qywE$&h7Nt$}@E{TT9ZfMwgx=~&&ea#eH7H?(uw$WOlOuDi~X zW+^c|&USP<#fth7&BzZZLW8!EW}_uUyp9w(FHL?ZSt6y#7o}w3h+t{1EkzDt1fVEv zycFsCxRN6GAr61XlOpPE=Jo%S6uHZ)n_W7k2zb{G&h|*r0Oo)D7%pCLS^2Jo^F+dU zy$THP3yJx@vqnCfk`f_TjqfbIw>~En?b9Q7g81V5-L8b#;PdHQ>RqCL=(Um|z4tPA zPrXau(ial-Ss{p>?Rsy2`2j=?i56d}YZQ5VMSP@aGxICeduOQpK5OL{7qfj{eaj3d zzd7!n87jXSsr<%dej9w}xVBR`iNwem=4@XPvpmPi@?P)|tH>;i#FHOX$$nPykjymf zE0&ckL?u7P42zu%8`3f?{Lnf+C$n4ZJ5|;(A9a-3o$8=)4_KG=BMS3BsCL`qFT2Yh zcO4C(AqD6bkJxMBufWNyDJ?V4hi2Bt%xZi&BWI-gSMROP3Ar}-RDZk)(qZNL^)1yd z5g$sHY}dDp_EftN4PAL1`l2uV2gE2JLyhucrCH){BdAVYj_VCcAQTMDU{K#uheTJp zRVJb6bNZIyo;p`Ztj-EQ8UM4p{DAB2k&{E4UEB2DAPWx%nQlPe5_E`Qp1UWgh#)A5 zU^n^;kz(%b;oA4c#zNV_EZ4S>2xeJXbUYl&UX2H(EQCHc}Y_z~?EL)>T zb-vx;^XR?6ODG$}i@q-)727zD-t|7B%tl`!N{9cc42bH6COQU0Y z4pz~6Aj{awi$Da~sF2v^Z}BaSAplkM=#i-?OZ;B%UEqNT(xWrj3{><% z+_hMP%T6^L#IR+y4^?W+l6A-elvBP7*WB`5Js#YrmOn1~Q4@E`Yphj+Cw>&X2p}&c z7I;Me+4Fr%fgz94HZAhGif9V&h})0_7FcKr*4jgr)lD# z5qHI3^~8q@~C@X?pjkVGD}GhySGaj`?@C{h_?icx<+0 zgV1KAA4p3doG|?(#DJB4ciSIE9!beZC4^s-i2PDkd#euC+~txu&r>t>j-i|sUQt>qm*J0 zmWx7Q&QsB6uKwgwV1aZ;`rB;8CmH>dL*inYJBS3Fb!uqiQEg1``aSXmxk(y`{4YE( z{qXRS!((H~@8Xg8{(qxIImsQ6Pq8g%h=v~bLK#GM0y!wlXSDddE_0FF=<^8hd-ful z3O;~^$s7tb=pi-%CdkYz@PCQKLP=b}z(A-g?!1i6$RbCEM0FNBtHkKbg5DBCXM^O7 z{;5=;pi;#%ApzY4MvGi5<>n4C3dVdBLBJu)+Ook{;@SaHBuOf2EVKqcABmodk!>11 zC07Bt;u)}OsY~yALNYysmSmj$lxW#g*{q8o1@hk0HEr!&U6Apdyvw${5i;3C0SQMnl^$27W*zTAVOWq|2Qf;T?$XAS}^99vfEcfeF8DT ztZXT7klGRscr9K717t(m^<-_OoEWTjWfR5aeYm>iHAh}O@|r8JdGb0{43+F7%0k}TH36UlvdHMm zrqFdC1%n3j*5!sSB!hg7S{zaJULZBPt79c3Rj$|<+BsY@Aoei>#LkUHvM}J236sT0 z0o0bdl3xZCJtUq8m-wj+A;H$2m~2CP{ZH$Wuj4KbLVy|DT##hZLp`-)9j}OC5NB)h zQX&N!0xHQ8!o#7zORE4vmDNdhki%gZ#Tvm3^Qi>qWr?RtwuM|R5D8mWxnkAmm0(t^ zHe2s)@zHEL8%ooLUTNOtivX530j-06&rUts z0@-TCRR(}-U->Seus9@E<~*#_`?Vm+Z@9}3JqolStCe}>2mAwrE^TlI_4^zU=(V8m zZ{+Hmu3>HwUnk-{h(>`cK;S+m!@UwW4VL9@WM7I{H{%gtMRvruS%FnRN2y<>*CU_C zz+ViCed6s@`}E%S+)(sTcpY$*7xM23i2`5y*NHT+c$imqzZfnV#gixG9~Aw1S26V= zg7w}#CPo7Kz5OGfvH5-U@IJk_FaB4L|IK!o*e5|9O?f)L-vgZ#E2u0#O7ub(y?7y2 z(OL|J=1m12J5gV7j%&AH!FqH#TMKn72CVk$y{&nu&A!8jLL%%dE#GC{FO%uLYjcI$ zC#zWD3;7S~n|{QG_FL&n-g5MK3C8)LO5Y=7&7S$bse>@pG_j9lq>w}#to%?wN5=-W#Lq7Zl2`kI-qGS1PcU;*e9() zrR`y#4nnYa^n2Yt{oW#9NL2WUO;=)MTB?77HIb3OoXx zf7%G9AU;9aR>kyQU;}Il!IP(V??sb4H=wn8^bY{_-mve=_$zML9zQxcR^z)8DAXgP z&@vcjd4c#cakHdujz?kW`m9c(B{((tE8tJ*Cow9`MLBjg5-!(13S1gPD{vI0tb$9Y}C=1HMQ}PxmnKHu*(H)+RY)Qkjf!hX%hvzI*Q}Ik?&*1Vb=%q$> z!xNCMP|=HAu00`imbV9LzYPPYMvMY?bp&a=wMgSl+JEdH482|~`8|dMWss2pJ!V3P z82zX<^671KBU$)ypg@-78XEZlU{+@;;P2>LJ|^O^pez1zp+7F3*1O)C1SC_I&dZAL z&!4gl#(LLZRajPRUN$&eh3!;f*~Wl-%C=+!$Whg&t5=d6M$J%KbN+`=o0I&5Wq+}U z`jcf)CW;>M+yk@5b#Qp@->3utC-)()Z69(X2AZ=JVxSCU?S-hO3^zgjKs@-q41%o! zd{_lRV*G&Ws?P;Wq|yb+i8nL?ruNi9`9&q|fO9N{N6C6`O^!58u7s}i(KOM!e!|=% zzE0f042O;t-|Q3!56D>x5jCu8^*llePi~>8QC7+!$4a4v0`5g^N|RnlQ!95z%AG_e zek(LdbA@)kRdlcQ3jqA6&DB?w3EPQkV$*x)N;$u(kt z>KCGmb_*mZjX+#5udwC3Sd~k>i5{35oBc)1MYOv@{vEVA^V>dd%{qj?ikw4I${cYG zj3mUH`j$6im%zdV{xR5N>_Ex;U|o-X%gG=f+8%1s0;G#cwLaiRA{(V5gD%(;m9FGX z=qlMckj$v4)vvLdeAii&y!|kSr=n|psb=-$%b^^x&tAyv0fazk$v%O|q9Q1H7BTar zXquOEw(3z!C|U@X+Jt%(ItwLH?8iskVB-9Av7dCK&ty%d8cM6IYbdM67dU=(DMVYz z#x}KJN&q3WY4adf56K!rGog-_<^ui9b0;sQ$a8vDH zEJ{M3x|6X{))J!$DH_?^e2T5e62szYj1)>9;svVD7nD{ z9&3;ek=$L2@T4CX%E2;y%Y1TM*mnv0eYW_8VnYZ-tLMaSDKGUc`8`n79Q2l1G7ORk z+#Bd=bXmQi%n%HD-KZu=sK$3m=xoyEy)VKPaSg$^gpD!?#ro;ZY5H_0?UN7Fr+TlO zS{dW5EH=pd4w_n*w{9vmE5b|luHOMs=U{Fl=`2LeFfS|`z|>Z7z9TUA^Dv_+9$y*vCqOp2m^-z z>lrvI^*D(OIH61{g9!t)dG$Mh8Co&Kdkt`A;hPzj5`W1ijBmw2GWrkPb|-JdjRRe0 z6|5-X_HhMg7`4%i$BG7&;C0@YTJIt0xCBK*RW1_XF6Y~EFJib%4{dlM3yt9~BSKX% zVm{V%?1*^J`4FzW$u!h>&f=O}uH&<{tTxd~+Syo(;L2Blw#tFN31|w!a8fL}2IoXbp{)V|`z9H{34TZtPZ`hF3n^-+{ojVo43b3{&j3KN+ zT=+hsW7LN_h;J6j7G&2Ki6zB}dL@kOy@;SC>I>I{dlTIaIea8E-(y3IEGXWWpXhEW zwu8eKB^J=pL-ReMh0%G@y`aDDrB)acXud))| zcRSExk6oFi79{HP%li`DP1a*bbhjdQtiB@Ay~2rnGlKXN7CD&p#pV)U%pHjDpX}P_ zAJC2O@$IviA-Uc&7(8XHWN0v0FqQ~-(@?u`9!_2XZH|vVcD{YLRyV{r7b55CvL$rl1a^YV>1LE0{$7uR2xJ*vev05#rn*Xyb ze&m^VA$uY8=$NM0jk1cX?Xrjc+uA;sbOTcxx3OFO+jQd)?&bm?2JR!P5>==KxVThS z0J3O6)E4WJ-HZ~E=CHV-G*K&O`{0~pYNEE#tSb@=ia3D;pf=yE%jbxQ!;AQEetbVF zBL|(|MZkqL6dvS7ukRPp`$++meFvx+Nw8sWB8p+IUwpqI&EkdIi?aYiY->l6?0gKQZH)p*+ z$PoA+ggXTyLCqT>UYYeEsbBFQ#tPs;pJ`akqnqE6%(E*ziCEhO<}3ko%GYL{TNsqZ zW}QbEl)~%_gYgwBC1fI*tN#$y{KBFuVnQxyF`U0eoXG=_UA@8x}%<-e^@Y(p|S{#4Kis6|AK_A0n+?I#@e zm0^ai6p4zxsNq^&94y}z-#_Uv0+FbgGW}9t`GHtbApYmcuHXBgX*+S`x0^S{JCWM| zO#9Ew89rlpk}>L9H)75xLnr-(UEsgAD*T*&FNJmg*4-Chm4EnURHInzG3V68|CWR4 z_xSK6|6qHsI4GW01^$C#;Z|a4Myr2D%i3%)qlGO_%m^S*ldE5e88w8B7GH&{1XUL^ zs&Fe!UW4|^(jK(Rs`tfT%i*9M)DtV3%c>9f_vuC>L|gfxktvg8_4l=Z+-&q2uT3(J zy4Jm(-CAP>w4vqg1F zqB?*~wM4aSw4J2w3A5fyT#a)2V@+N{*+uBx=tGFj4qHPmFJoGC8(5_jYyYUi2vl-c zKT?Tpn7fujEEe_!;J&mOsg%UGOp75({ySJet=+xPgVrDl12^F^L&`%-#5J&&{I!*O zwOD?p?yD0f+-Wf=3rIc!axiPDVr=nUlROQzMhi=c>*P&X6aIiP{bvw|Znyem_0|jMlQLd4pifC?K4_lP z7X{k)9O&l`L>C72HsL@|JJ6pU=uJQ*nF8(e5J;RcD9|baoi3q(14RI-x_sY(xUQ_i zb~#WsMh7aFvjC}_mjY7xy#z?%>RK54s(u?BXb&Le4g4oS93A9nz0mbuS(h42ADkhf zFF=@oMnXS2FYO>|o(iFNaVzSR3i&2N_Gg6Li4eL(r{equ0bVC${H)3mw3=h*)Ni~` za_XH8ebiZ%omK*L#&Ks=p0_i_9i)Wch`g$c3gJA8`f=uE$u-T_aI;1#gwSNrwffn! zGoKn4^7(Ng)O(q!xQ>Is9V0&{=Cc_oy|+RtkQpHmaVef+6bFA z%eEQxB^9wYY25yqyTJ(Q{7Js}|Jp3u28TabJIosU!x-ZPfroyo`EczN zE_g7d?T5iTx9P#aROFf-F~>bHa-zMpMcx4c2e72m_V%-{c{u4uQiKAx_)5$``t@{MCr8SqcnJ1Sr|2ND4oBN)1%xfsy3 zyE#9Zmk3G$lnBxi!>BqRLs*-WxWX6ojQr7_AG78Fk$cb+{w!G1i_zA7yki-jQ(+j~ zsribL?_xYv-ZyfuJ!b&;$C&pj#N<2tP{S2w5MyM_02KMgh7JYY?hf4yazmXn_lV_g zukl#n<#HxL4fFXpkhX@X+Rq&2=(attJ%?F^^F%vbA+4r})Es>xJk6Y!hjK8P$(2it zQdDgjWXals%bJ zen_tMV(UO+r3swUqG{{G$J3)_=T~AgIDXWl7!c!k*O_2v35{PD?!<%v zS1a$g2<{5R`&TU1PFYUo<-emxl?jnbUj#6Mx-CQ-_`~pBqaK}TXZYPV)5w@Ap3(=U zYLX5!>H#Q)2B@CdkXAL~h7IDkorodUrTQU0-Hngdjfjo+X&-6vXBuy1kl9=n|Ao3UJv)QL{P0dC{q9nIj33XfO$Tm z%9Rs1bO+C5o?JnR8!zddM<$1_>O3-~1O9k2M`|&~!v0hlE7AuQUK6`*A97fq6T59c zbDHl97>|{5mR#y}b5g>#)2TR9eZsJ6bdDGpv`nRv0H62@#)_&5Q*^)hTgPe&rzt-x1M$F_~`PW)t zujDn9_hD;7-rBd#>K5~+PL=L6CEGEXEX@bRxqli$HM6=EVOZUDJU+9FT_3xhSN~8r2>dH*dQK$5Ir^5si9Olok_NNB#yH!RVOd#boEgk3>EZ}Z z?6Yho7-|1Vv#)G=4};RX4x$(s0MREQGtI6(JjK4xtAAhk4BI}mZ76$Pyh}ysc*X46 zj;OKk^XlK%Q8-e=V(c2Lx5(%mC#0bfbnz#n#MSYv$m8mq@;xvCjBI!8t*#-NE3e44 zVB{hvy?lclOP!Dp%u&&o*+p87eV^B3^HX8t@-zLh%f_O+#7P}bjjLzB*|lHh$Lq2A zsjzYR9jC=s{l3o*j{S;P{|gJu-h(%%Vx#=JsvRuV35KyU73+x`G7$tWZJSl^KORm9d;$ovBTYJRKg zN~_?+TU2E(ESA+DLiIP*K`hvfPSh2nFNVqmv7RE~AsHgf3^Re`frww+GTv+@n(5BU4!Xei;&YoC5SN z&SE0}2e=krK9;D?XVtJ%F)vZ=BN)4B6xT#`86OhW73x;0ZdK|QP`4U&Yf!h@>ei@k z)I&(VNZl5z+fsFFQnwZA*5buIQQfL;VHLPu-8MijXo*doxGE?Ds0Ze5Vp9*GzoRXQ zO*aGb;-A>G8CUi8RzPJP47(GMig%X--3^Gp#HODp0MI>v7|#q~)9iy(39$#?m2rOI z#M$aV_e;p78Lz%8Hr`o8dX6E z3tMmB{y7JbOOnsPi`LomeZ1~Xeu)Z2u0MMoWW~W|HELm6;>MQ$3+FxJMM;?E%7=jG z8g&6!1R7GW`6FbEN$fp9r0F#~!MNWc4j&}ykee`wM^1u4uv+wLjbD)$HzIJG0(=1G zxu!2HZ9i|-uBz;X#nRcncjmNEd^j(*B46wX#b3kjty$RLu`4z+N3X^y0e$|se)C3T z4uhi#w_*HgvTO@qXVld|`;KiK>_d=P?=iDQEymYwdX!*DU0VPZLuZp!jEWdPQxi8T5(TGBa2#YB4KNDrzgSIO?`}QVbiGdqHTk(eLpO>E8;2 zp`oc>b^IHw_R;PzR~PGBu0O+;`f#Ezat*oaEW7AAR&x|Mz?m0)ka4cz$S%F-9|$#G zhKcko0Oe!Yeq(ewCermVkyd@6iF6@SNfT*rx{1_pysUQ~ogBWr^QbhDWR9rT7-MCa zNELbyyKdv)e&&OIvKpLbAbmw{-RTAI&r_CB3s4Y(GYo8_pJ&)NWQOts%B&&m*hi~! zlV6nfQA1X24veG5tdU>oy`J(hJjtEV@ZEtQ{XFz%KaIlV6vW;*xNm|wIrMJN=g>2O>1f=BQ^b0lA`QVO`IGT|;p98vxH6AgJX6aqO zK|-pgpR+bdv7DaeFr`mnjv|4Wuu83>rQbu=Ck`2}1dPENi&&v&-(*$J80%^9iuJzZ zSLPlruOmO{J+b!F=`%xeLWLj**lf>0rOt$)M@%Vr zy3wjESTX?CtifQS!7*~waNtjn6J}2IfB;d$D+VS%Tw;R7^oI$S(j_TaX4VymV1-#% zD1w!A=n7Vub(pXVm~}o8gxgZF2sS{ei&c#x$T7-n5tIjI6oD#=!fvBh!_FFHzXm+h zek{+_TRihBQGD=No^hdel4tJ3YYZ#EGu;l)a9HudJaax$jUQInJae_hGcrf=%(!8N zTkp9WIc!Yq$5mMNEX`Osw6Nu=8ePmjmU%d=koJt^pC6?2Pj?#sNI0E;&OU~Jeop>5 zG$H?BH1Zy(dSgQJk5xa^PVAEoLbks|Uveh$bofch>lU~-M9?g2`z1UCsXxUiJlTpV zy!uw{tIGabv2mSmk{&qZ^ zTq9|zDq^$YQiGlBwn58O$jAkUrY;^6RqbRZrUOr|1gW>c& zy2p;67z=Jp{-KV)!0k_s19{4fML)nHJEkkWs>%Tp+oqsN=!l+2YyrdE8N)3+Za5)! zG6-e0V7nerdutyu2VGr$c%RHXZM=;0f8Y?TM;buPAJ%Dk$vVWcJBVfoTIqG=u$^qL zwZ{!j{@k(SMGRXw6<<1PVMeuif6CQSnc-~gSCSo&(CYazNYnYSZk9q|lSCc>+Nm;L zeov472Cx$1dY8^2YY@8bL1{_DU3Fe+*~159Xo+B%x>cxKrMl7F!MlLE)u>y8y3JNM zsmT(-`RZwrx-C|>rRvtCZY$JH+0a2{LkGhuaJ{-I8`|i^leD1?$^mI58$E!eZEVmA z^x~f|Hsh+^(twaQv~edO74I$wx*HIG3F9XU0CW!^#*;Sm@BWUb*zexOH6+Z3_+XCW znlOHWD}OMa6UJ5rBlvy^xwMia!k~n~Y76aXBV|V$jvZ|{cC^7f`AZmK6wM#(Xz26r zyg`rj`Ij#l;8PS&Aebg}x3>nDGsZxyDb@o6gOU%PK9iD|%eP2OsdXJk zr|aEsN)Q3&(OIx0SycSvH6>EG4?udHV|3V42RYG%-WY^77QQ{NWC~Vi;Jz>35 zm4KY`>RopurLjE#$?p9qO?n7skCVmPYtvfC;vadFNL+Mz>I|ybclMzGzr2Qd5>XQ@ z6Hem_**h|F>^u8q99}z~k9}vmeB!m^kI9oEs*LTO$;)y7aC;|tBcp9WQZ4oA zeW+>V1S*Wd3jaa$P=Ov9An{>`t{B)DA4X*C)-8mUktgluDSG50zTe=h!PF*f(#xjt zbf?HC5h$L-KK=L`d7=0L3{`OC(`ONAB(Pue0LCK5wjBR^dW?F}Ji)&YxuPs4Gv~Rb z_``rouKn5C1h5f%?2;382QBUr)OT&BmFGvm?@e+a*F10VNcOKDhmy8p%T9Ojvqa%k?3TJC=B&Y z@+<=O&#FN5K!+cL9*h#;=lv-;C7QBtLjE^&<7o(K2Q$%E@Fcb;bCE%4Gv>>xJ_t=) zWh2MJX9GoxeFe#fH9q926E#Gcxu!I>j{ehy{(tBZa6K=w3Fr^A$}bE67{asUf?Bo1a$%I%6u!j;%iy@6@|goxw05Vjx{I(GS+b(K=0gllo!ge^F(1`?)kK(tL41A_67 z(`I(AEA;PG)@U2{fH&q&$J~nEwFZlkX26X;+$ZgoT94Vu-C_PHb(U@{0b8K-MwIHo zeKzit0S&@peK~uI`fy|oYmX)YB?D(i5|C|pLmk0M77z!d7#ag07wm&wX_zLdm(wKJ zUVv$mdO1yky>OT&srPc4q+U*wfT%D{0;?3$B=vHdq+U*wT-uPRmllbruSA{Zqs;m$ zQ6JDFbTXDExZd>!ipTH>{gf{&hDzm|SPamk5%P{T7mFUSwv_nyuJb7b!F|3!H!dNf zi6A}lCnQkF+|jmA3?`o>%c)n7*qU6Zl?sSD7(b3Ip&o|C4PO zu)iD7H#^pO5XoRwRbLE4l^5ViORhpfzT8(Uon}}Jj_gId)oyRRkF{1Lr?Vj7 zf^->cJU#x}r1;BOkfxB?g?7i(*PvR^34di=grhJw3qzk$wA*MZFkCKkMxIMj0_}Wk zQL%d6;+LH8rB$BrEY<-N-6W0S6OI6>qsg;qp(^{Agj-CxsCP|5XtE9$hadb;ib1`5 zDu^dJOfPjXDF~u8)?SL^k(eg(9vj{m;Hipl0mNy2(|EW`AS_JFa1ayXPPr+&uJ zixLxdlg;l*$@N@#4ik#e*t`n=yb3)M;DKvATuCAze>hiJ@cGHl;RSijE=P=Z+?qTY zfut+8dNbhUTNr>)R+_aq7|c;`iKwmGM!pSfK95MsA+YRInzj@!>%4y(|9ZguGi)MX zjVWlsnfT{u^Ks=8TY+{vuAh_8-*Np6{y7>qa`a+!6aoy)%iQe{ks`-p-j>-O7u4%7zd^D@6D z0IAaUJJ4GWl%22kx94b|0HpG(0;H&<36R273n0}W-vjg+KtehAgcy|&Xy@6fK*Kn15&xvVN;3< zYjdEgLi_EVfYjUbz$0{N$kAp4Dw5DjK%bS+iP)a<1zE;t0Vy0j0!Y>BDL|?QkAUmc z+rI)TlPR*1nJVKDAXTg7pSHs;fihBW*MK4vl#M=D5HiqEMbrwUYe60d0vT9gK)nS4 zkru>sD(wV*Q1oz${wUh$AC3;@X)J!i*1Qgj~;RRX=5DlQYvHGSF};gu5p01MQ_k3V|D**PaUbl0u~h z(TD$dudwStFIV7Q>i5rih0RW7U_t3VKoDKn2}9bSJT4wB9sbZk$K5USRVxnTDR9NO z5FXxO{}k9YF61^R#HKN7Aoa6D9vK%hG%n=jaUloBg=7)s@@MDFgDo;csNph0Dl$UG z@A+xK`w#VhOaJZ=KOgjeze=?F|9+KdNmIu)*L)+WzIt@d1!WgpQ29Zwj498?v|UN7 z!)sQ^T}kRKALZNeo0M8V;Oj>pWqU&U{-KF>1IgV=>0eNqcoRh0N5C?@Lhbt5UYQ@d zv*ChsD=WSHr93iud~1bd-|-%q2g{X5X3u$wzgOb+uXtptTr#hn|BY|(q)TJw(ux1y z;d=a|FY-zGItR3+6MAHZtv0Bb&}P<&J~-}T56{`}UkzwN_&jOhxYm3a3tI_|W- zGz?XW*I3wJ%>hUTu5Q>lFWnWUvk=m&odh3xJ@fvHqK1|Qe4jI>-rgf|d z{jV{d2OU2b3+kAD!C`ANa>n#^zO7@3`v47|l4r!W-S3HKcJCL-DRGX}Fqm{lg92bZ5QAB0bnM`g(5dE3denUxkxHY_btKHL`|(!q{Tj~0 zuWQNv{#HC;^Z)d&`xsm;Z~lR`Ix)wR%#%lM!$cyE?!yTkI;K}DOm{SZ7s$I%H*Q57 zRM3ml#NiKFg}_SP_$C8UDO2WVULL@arZ3=>{6f9E39nEcHF;FBFO)sADCFO+Z<@^{ zoTJE!K8{Sv(3I1{r}M$qI5)5Q?P1!KuwPbYat3L*j>e#AIL{_jscztWVfAcI?a02VH>(S?XLyVOEbYIGhGRW{)KwdBb+K>Jn)tz z#3+sxRwoe&gS-@Hennewr3;Lrsdr6UYr~8EE9liNrwoa`kq;M8W|gVR$-b zaS*LYB*Pb$A4tA~*(mVW#s)X6W@|30K-CX5lN0T!9e@`kc%*zq_B6t%2LHl#{5Z*OG)Slj}@*T377;gp`CsldQN!v2IHYmc?WY zahRNqszV6gk9tZ^Z-@h&`(lX$-FO_~v2`9CyIP5f;tJj1hyfJmGZzNLPLx}UW_!(F zQ_zUF5T&?e2Qc4FM*?#egp?lnPrTB5+lyR-{k(!&jtzh%-#u0s0ARZ1VZD(NE^kUnxX(nqdA`pC_Oj~ocrrf!h+ zSAmG^Mvq+cf+O8!?~3|S7YYN@Lr%CS4WaIKWsPlRM1pK+bT+6=ypQz|-$;d;F{F?K zp5%G@Xogb`1pLTj(nHrL-cJOia!68PWsLQ{9DdtQ zeG`Q8LnJ1VY5d*1cKlV0qVOXB*8P0iiblk+s*FvAPMvsXwEHLKXO0hPn`5z zW&XMkk?^L#q30rto)^37%#BjB{~~VDGvmrBRj(eoobJflN+96iH9wA4HBwiXjrpfEbFuG~JkkGDI@PpFB8c6boHI-j)g+T zvFLte>6cfl>|!_{nzysYJcd3&3aVXXUQ)(YolYbX7cUAKH`ZwIC}G`pl8*uOZLx8yCcVBSs{`>m66ZI_@7sOx6o3fqZ zQ~G0%uu5<^264er%WK|FZ#7BBXaUv;>rGi{I9%adQoybk3lC6>#oX-hrk!!ia? z<$nkJO9GHa!$hMB_rHT3D|SeIBYN;prYAOs`$6(Mo=WL*nPkK|fy|43>baN*riAS3 zEC#)~x_IKHc?onR#wT+(%47c2A#B_9P4y(Ux+?Jmd-&scFdkbh-3TF{W27Z0(Nf^0 zEV-3cyJ0@RC3Z3zD)yATzwv!ZdEHrjenuQEIa2cM#v|I|X_N59uHdu&@7;pmIRULqo_L8BJ9T&3cI2LYtw1-XG z^zVEhrQAKcE?|si>s^s`Zy3G~2Zs-}D*I!nYD@SBNW`z~hP9#mHPs)Gp;MIYriw3|RhL@>_V2@))oI z*s)hYnG5FY5q{<%`FGTH<58<>@?%z^&6(I-ij}wIqqG@p4`wMt^xnsX+>_;%UYkm! zP&jg+IWzfFq=KAf=NO||YbPh_ycDRw?K+-F*Rc$}T?JlgPbfLG!kys6G!SVYJcjqC zhjQpO)E&f53ldu!_<6l&OZtHg;0OS;3o(*RqK1qG+89%@(lWx3@ZRK)YjYTEvajRlsJXFM?#<)PiJkk*bk>0wbD2U1}M>1D40hY_xr;ObLD# zb!D+G>Mxu*3jCC2YAJbI?46(;@r+!-h37f-({hARw_J`pT=b1T)X^`mA#r2PMEWYF zpPq$&dg>4wVNf>s||%&hU#_j-IKs^~}2nH@Wpp#wdm-EtSnty^D3B#LLIsQ8xGnk*#cI zr7Igt%{=WWnbO^+}2`NqUJE=$JDNO_44zx&$O2?_d{JD$)LFs>^o~a@$ zNuJ0Cr&*Dan~W?=MM`UfgN=_^j4%B13Yy2X!KG*?sHhML$pA7PT$h5FB<22Xh=L*& zJ&_F?iKWQ=!#_?5VJVs|vn#zw^gs07I^^Q?_wVp9mgET_il68axAFCdkg@p--&4HZ zmwD{W+MB$I47LFp~k<)=vd4=>W z)gxa;TgmN+nvUOE;P)cFLL|S8j*KOOZ*c1oP9G<_528>>2He$9p_-RueyQ=3Y%)Id zLCq5TPAjw;KDa_WVmFd_0mvk5y!$=#l3E#G)-8bO;Pf)=;Q&&_0-dJWw7`F@`(q5rHFW z&JOYL-1XRo!gq9PDuw~Mff&J|#dhD(5}(P6MAjjqc^l7lcSR$(8d07u?-IWaGxsP@ zriXSYHY2LBigw3#$%=ZAgRJOobQBnc$x-jF{qj*}fN_l8%VK|s%CSa)u_5>}COF91 z_>$Ha+W6|2u0OhyUo)zrSLG#`uG%Sfn-6m+6hCr${QcA8@0=b#db;t_`^GEp8-LC+ zUe4MWe;@8F8wZc#Y7FGyt2WUwWKg5m;FFp-u~n~mHUzxudZYtY!55LH-+(EHuKVN74L#;&?;)@gx0t#CYbN}u$ALB#Ut` zz=P=IDrEI5yc_d9jH{O7r;SHaj1W0Y-C!yFBu!s>>Q1jMZC{%@?{^ilmp-z{9vQ17kSD&3T}2E`@8a&SbwTrXq90%7^=IEsEWic!3n08ap1F=G7FGlIe2H&x2pnT#aM8PqOIWEaXu7%dqot=5rZ#i*-sB2>B~*@Z?!|qvS1$sA5sc zzd{S!&G~7nId`EsG=YdMt2wti%|Ue+%O-778``+()!ZbT71uXiiKpyMvT1R>yAe;= z_=^dzU>43sSvAHrs7BZOG!ua^er!yYqW4}hjckY4^Qn9B!7K4c`Z?3jwBclQP9v7t z24N=}eL0|sn?DVr*Lx8gXLvL+RmaJsN6W8szTWjNX%Y^+_C(xeh}5L^W~iCDxmYjZ zN5J9OYsZ;`xm0{$lpCY%pt(5lyGb{?A?CEB zjn>!Ih#m00jTLN`DsK1wD7a%c;u)(0F66m*N|ssIfGRIF*XOx*mh7G0kcZ%B&AxTkk#*Bnqc&=#E9~ls)PkA9N(hMFrGuKtJ10yhl4xozCf)VB3k=QgDal zmz&jXF&MH_%D``vN|U#!aj~^2t^51n8S~;YENxA-5?Y&xS%>qHFZBg#Q461MrwZnR zGL~CgVI`qN`aOiLbpVAKz!In)c?=;S-Fh77&Tl!WZ#Gz8bXW*waUsM7=6r%^zx4?L zJgeh#l*G{ujkQbR=1tU{tO{ZZuv&Xj3(B4hW^F_dR!z5<^-;FgVb=e`Q;J!C%-m2C z_8{QP4j`-fl1ZI>M@=#(&S==+TY>Ed;*VgqY52}L&L$u`+=u4Ht_7Fk<7hYvCBiSbZp72?E?^mY5!+Qs|++c(`a+3du z-n9>qqRA#Q+9lkY(Dq8~Azvr@`vJ~^h!@}f4{GlfsAOJDsX$v$JIn_~2?hw^dy1Qo zge?Har!(RV)`;8%M%)=sPKs6aNJbPp!HSdhXai{7V#S&%lgWx3e2tiYb3I8!;RDj! zv0b7L5|q*-Hmgv64|#F+dJh`sL0N8L+uxEakC0l}XK6-#@-LYr^egzrCx;MbsR7-% z3n6JV7Q^Fs8arrFx(oVV(${@T87yI9$zJG>O>_99h%rTGRVqWtynA65{2jO=_arF% zA;9}$J!AxMN_9MTlhz5QiR)dTM-^$0;mde^dhe4Mfj&u#jC%?iG2Ia9L@%9aS=GvA(B@+Tz0TAYC}Dt8{&;*Rwyg^1mW6lRR+R4Ng>8?Y_RK@fBGEwf;g4Pjsx ze*t~700Ry9Z_Gxv#!-9*?M(^5Hs}Q_aP~dgjioT-A!%{i3N=NoSnh&Tvud>(iY3(i z1?u<|N=|^CQI{2NHD4iSWT00D&Y51jL61HqLwt6$PPRPyC3vD!RN|ig52-XN5_vsW5YMfZIkAhSU14V()#YZeZ zlHppAip1Z9yYY@2yUM`AShhM9BDUes06r{yQqOJ7RFD1+1tICfw9wQD-;8p!O^E_e znjjW^_(|GJG+n%nISJGpWB7nQv@qA4Yd*$sGu{CQZ}~$gp^J*z*!u0W%!?8W zio=)UiznDd*MOdr8HsU|P*~zd0qgSAMAQq(R+-n7jzN3wWW<^POWuMv@NENvDlk*a zS(>$rVqsrcJULReSsVfO-H^&*7%o~#+?vLzqaTkab0#IK0ZWGv(~ToT5Ls2MA0$?C zR4s?C`!5{cJC$u2H*3XjBLTz5&RTI+kW#_nwLzu6f%tO1IC_AFkREZN_bo~7zwb_F(e<~32nv)^ zSHn!G<4)AYVh|=QIsx!}nKOn#{PbEs;)2H^oT&b#<4?XV_&2jgW+ycXzQ6|0pEOB8 zK>+5YUZe0)?3sGPzRx1(Ny;Vo7dZhOoscM1(rBkFna7@30aWIcG6<;xb!EFDgZo^@ z{_HQwucXyLU187<;X@h37>{#e%ZkD8sR1uP<+MOYF$9%~Cc6&eV^RDB9NhBiu#-0= z@SW&7xfQyuIEI6VEb`=Xng!w$a0_!2^uFN~O`SVdmy@VFlTVm6EPuQNej{)&#V6n( zau61G`{VKxaP#>IxWOv_VB2O}HliI;JSypUqLhvhj%Z}vkcDhZI;v4oH~IqOCk~nX z0R8=X-2?-q?(g7T>ceVwuLa~8G~57Ujj0B0nd={%t9PFTyg*Z9Z1pH>uy!hk@Gd;y zqSw7YsO)$H_l;;4Xfw@m2klV9mXI|Y#zSmsdLq6qL?zq^xEpZlGj{NIrUj1pJF)ee9HgjX&eY=%(xiR zgER8e2eiqv7-e3u9}_mw8?fLh-b*%8m_gLT$?YT|1-&`{gm=aK>F=Hmf5ehET`wB1 zylcGg);GB@LIR9WRxOs>?;FjclYqQRQIv1s!-H?Ny#YUi8iX_^_dr*vsl?=OP(eQg zN3gamqbhwEPo;<^nS`VXK@V-(Pr36;REh^xY}&=ATGZOOp-k)OO&fdPCg&bx2SJI$ zW|*sY?EzvQAps@t#anC4-U1MICMGZ_h~$_K^DG$DMdWYhKUuBjNZd( zWl1K-R_zkDbt&{irrW|QoWqjtH>F3vDnquT7XB!&dbFNrwaD=esnVgtG6Z9JsS1-o zRo3)pqKkr)KVhwj7>^v}W1>#_4CvA4UPE3;5UZt_qr#N6O`XV)d;l@FQZOXjL8lz7 zMSp-G+vKv)YuQ`jc04O<7UG81>@ofk$(t-H$EVg$cpqQ4pZ^l9H z59II}>_VKTY5ULAw7bvHv=^~Mbp^s2Psi!wc)ss6O`C!LFA@LPp9cYD_?O~O7P=--%QHJq3{WsAr^BX}Pm_J1xbfRK`1=?kRiX=1@*{iTG1NyWK`x78k4)J0z zPgU9qs6-X73XqC-Eg%)|b?5DAlkJ@615)u`1B8Ynzwe?EDwiJtQg69W8{0EczY+(U z1;{H?gaN6VejYl+`4b%VJEJT7RgO4Mj zs@2*8y9T!bQfUh?qoLw`5zuF4&Nl&4b?FB*O@_S(NY&-WQ|%N#1f){D4M?Rp6WOX1 zR{&Bet_7s({3Vdh=VX5W1&A~R+=D`~-5Su>0jXC0+JT-1R4h}>K{ZPxv>Dl|6hCyJ z`yD9ZKvAGVrFa$4Su(8)s5o0f&j3=nob0ussX(JjaRVTg;toKiGQ}2jpL+WaAUg9D zXw_)8YWX7ERDS<(Afo3S8SfAvg{v;jy}cO_HnSn@M`+l&68fbB^`YvjrymCdWCG6vsQP&_-lZtsE1_=yQaQio zgv~-l6!%;UNX5Gokc#&vAl35AP`rA(5s-TOpHA4r4z$mKP^9(s4z~k=Ev+!Hkp<;D z5D3-^Bh`SZ&<>WQAg==vCn}6oqagO4f>31(nqX(VwIecfcRV?VKNngkT|v}i#`R)6 z1@NDQe>VQ`S-`&)piCu0x^eX)LMmh{LJmScr9xgn$o?tmAuO>INMM{Sna}A6*_;tl zhL9nkCl#jwA!Xo56*7KL`7runrOeH~{BwKC?bNAz`YuL^4ObX1iTlhSw;J%5gMYT` zBncmT30ZL%uG-!)E+jH8((?|0W|2cdL*8e#_Gtaad}OB4R*xE6yJmLO*Tw zv*Roq7qV$w$gSf-emE}V*BK#C;ps#7)7yKQ+nZN6Eop0RS;_CfEIIaLhVA%9jM`m2 z51*64liU?;Z!|_aZbn{$Ji@6wtOUo#l?8RI{-B~VGnWalPkQy5buGVSU$Xqy5ef?hiK5TD)McD<6hTl?rZHX3xrftVRS3={z z4=RI?xp=j*rRiGknAgr@0DJb+za#9tI0opPU~fNdl>3i~hx`H)jg7|J9}+9e)02oZco1@`-Ge^!8A=P85f^>Ac`a3{Rw$X+0_p@4N20>(aq>D_5U)Zd#W*J$gQR zw`}}(D9``m7xBjKQCb0-_BWUbGbA+rw1%bVYI?xkjgc6CFkqmY8vp4YRWu~CaxN3~ zsPi%n@RE|+nwEu^r2=VdHlc1eS*8vtlRZDt_p@%c+F++v@r zVxR1buRn@`j#-%0@a1@5u_Eksgc%pRfA_ah_{{PElS{!+EMM zCt&sV1>y&gA!q63UeBDhnhMfs_9LG@HJ}uVh!kmv!E)yw-J~k?TM@cZu8~^hVuCz;ky(gF4YMLR^RRO5 zX_#z8R1eCokY%TpTWq)G?@oC*7ZX$08SQx9uBy!Mk7x&1o<@G9+AlXG{OOYRU8IxSn)8)b4eG9Ur;K(S?Yn5a3JJYdzPN0iaw-t8#!{ zNnu|`=I$c!kIeR?a-E9rWwYhdjxBM>Tg(s5TLjEEahuP5C|~vlDivU5aIfK=T@fJ4 z5zt`0n9X}yZQT!o3}nn|DadL-CIR*V?p44J54rU+4enAH;vKoO<$rf}b)j)oQFu~y zE%w1sf-fp;A(aRUNsTeJsje|e6(R(8ODjm%$?n*$Y^jT zfJYr4I^+rEl~mby!i@9pBk?Y*7Z2r7ar*j)4=FCKpSN)tytFpRZyQL=(CDy z2U#!n!>pbU^1p{YlsTAc`Y_V-OvhfDjjo`H{FViu?^a#7P19iu&tblQ?@Zf=<=l_X zjfq)|ruwMN0-6|^T`utrCVkdq|9)xm*j#*w&5-^nYmM*TKLMj{e>1RZ^1OOZ?l-O^ z*E1Zym%o2ux*HeqNpyh@Kkw96n>WyWKJ}^&)-Qg|K|zdC0b{lAZsOh*F{+{P@VB*V zjPv9SbH{6v#y)#^GB|ih70*|iMsOO(Lr{mg`>40X-C{4_utdFmtoQ1>vXGN*!s$Dt z;=EL7D!RaTEqmjgrxx*Cf0Bvk^$Xiz!}3~9ALHml{_Ll!%(ExeB16(WYGe3%Y_heW^L`$0T(v;r;=FlN+f$7(zI-fyzK|V*@pTo&v(G z5YW>K{RH%gO1+t+-i2|KRC?Vc?=X<$<%$-MsvMVr=#|fTe8URvZlK*j{R$lc;{S`B zHxERAIy~k;d4>K0qVGKC4PfjB6?z>=xESO3xZ+lTq_$0HMT14znyZM)}k>tinP?+jFG|KQx-ahy~;(xdkNbDHp?6%jQ~YzZ+!%`g3ZdjgV;ufIgi*BEX~SX z0<(}|u2BZIWo1^uT+c9nf+?VCE5n<^nGEv)n1u{82&Nx)WOH#nxN{lCrwlB|%FtiF zlwnST*~l<+V7g&PHrFLEoa(g6i3g1|n9;n~>)fklULSHFGRk$K-?<{joU zhxyuJRvqRKhtY`8iF3oCKm5!DrDMYTDkO2kke z2;xb<6^}xKPBN36kr{~PVOmjwkdY{lm`n&N z+JrNcWcN6V)!N7HujSrrz4q2y?Y)-Zdy-%#_za+e&&GF#5e2OfP|5$h_C9lFCIM-C z@BM#%pU?k)KAG%w)_(83_F8N2z4kum&RW{EY{mETzHQHZ%4S?tI-|6#?85KZ?WNo+ z{lDE_R{q@!MU1*UNs=^4n)s8<--**DY3%QtwUYEzzwZYmY3$FvNRrZj{>75?Kl!_9 zswAcVqNvXQ{I7m>eQ-&`>V{y$(v=N2)-P#o2(DPNZ0X9CS1(<5U9-f!S2nD^u73HF zwe?NS4Qo~l+$scFvrNE&ruupTH7#9zP5qK(YnInHEm>aQ9Bf*1!+4KnYgRQj)i;}o zXGS@;-?FCqr9m^B6>FM<$VDV0iky~=$WeqD8!4kuW-_Z+*DnjEMY_6a&C=z|mNuv3 zl9{CiTee~;Vy;}WvSC$2deEzvu3p~SupG^JY@gtYrZvIfO0zmE8>l)f>z6i(gM_;GhL2os$aEcZF-C`ug&N_5x)^#hh9x@F%y+heG`YSuwpK2T6WQeW+L_I!(=(p z*sB8#*R(Vxb4d403*S_~tiB;x$VLi;)KQe{Tk2ct%?{`2HLEGfRKq8c%Nv@<<9Qls zximJcz6LZKtZ!PobY&Vo*s!X8O^exPJVl=G5;Vu^HLWY_mtRxAs(y94Kg!n9xCC*o zSwm@}msg?p(vnP-XUR&CpV>h?Z7Ri4Lmm~m1SLrGXs*x5MwIib%h9+rxNHTgjY3jc zTUIyKuWVR)^-3CVyx8gOi*k<%|5c$y_EyrF%>YVWvuw@EWG+im)WXM4U}a153Q;pL zo>tT^yKYJSS~Rp-AdUtxuWeXnl23}?h=|MU$6|OKjOpcTRxN3+uQ$7dI(W%7^=1$9 zH}s%LW9jnc#8ePExP)S7ViAdBmozjU-9uoT*YJ^ZbwjduOaw(YGsp-?1GC=bh-T3A zQD>s4NNXB{7Vk_;^eE^I`Zt3vUAC;g(X3K3(G@MhB0JSK@N+5o8U~7C8;J$yi*LjR8u#7`O@H0f#Uz|`2Q@z-ED?Ll9EfRiB7*7 zqU1PF8^V2i#&H6{o9DYOGvh+wKSaLik4q|bO>fK$S4sg;wuj8}<>QsYeY?z=9u;{= zQmGjx>4AE<+7FFp$b}0*<{IfwSXzS-;7iP7b=rv!>Nn0a0I4{*puu zA@lrC;}GS3I*0I&6G0O9jsRcxiW)LZTe3B2Sa@;dLZOjp|XUo*4nNRw7%Yj$6 zT#EnHADPef<|~ynTRth%(|lWRVbO+?smq!;!f=f?Bh1pP*FYOfJ{0Cwyzn-f-m-dS z!*%s5Z;+-p5le8~c;k&iN~EOPSiRcnS`qMX(y))6x&(>MRcez(+mFYiFP>3~`4c@U z9_{fseav*9Lb|97C5w8@HB&9MQk`q1`Y9NJC_PWL^eaI zz1N^EqQNJS`cPTa+w(3`cRQwfEt(g5@%-=Z83_r8;SHKiw17SB{~XTG3YBYiw>Rm|D^w@PzkzP%`)& z2zXGmV4t_=J)5WOfM5PHai&SHs@#txJw!giIU+5z)Mk$itluVRG7#RTc6m5Ws?3uW zME%}EGsTDh^2O+AK+X1KAr+Jwu9;NJp97xkR(eeqmX|;Y&xI<37^olo&}+P1M1_^` z+ehGuXjYq3gDT-JpnV2NvBz5f^Vt_yh#v3J)lR2*I7bA`7G(5Y*;oD|o8Z zYGL*z1zqnbr4nd?Yz#9DqPaBQC}$q#L^Dh|g_)ZSoaST6MS2pSoW2moptX7q~di~*T%3V=4w^s@G(cr*q z=n()u;|IAu;~~coI^4^i^JPEe7^c1l`ykY#AS>w!8UMkaJY}!>*r1l3)h|o^sw_QD zo?6W9aKVMnNlIa)qM&R?fL)eVwhawUt2^Ar0-f6kKQC(D}h+oz~ zhGkKoyjOh`7%9L!cy)Jq2+Apo_IuF=l>^bY}i*ar1gy0P)N5U zm%k62?-O};`M$`_lQ9^4j=X^C>}mcc#=^Fs10~&Ewu9|f4}PjD5A?9UxK2&R!-;r- zjjG-=L61&EC3$3IkdHPE%$Cp)&#nDtT5bLfWyk9RM;_ZA*d8x=8pXkj+{@j3%2Ek` zfk4P$xnpu#yM%{9tcdE##Yh|AO;Zf{i;Ad^qCwG#@A84a13CNTVNHKZc6X7usm-GP zakDy%;@1!=z-n^v>dIBOP$vV_^7>tJw)(L7TANRyC;Lix`)G{HwlEj}CZbSR<});h z(!I^ip5aZ>y)aLHT6thld0@Bva^iH(Z`eLfkI6mn=Pabk# zA~iQD-I^_+yRyJ`x3%14(bf*4t%r%W&`triFbBl$W`2;;!hDVGAsJrM3(S=yQT@5R zF(C;LL*RHMPJZyqBfrULVq5%|;07kYR5~`JuE;kB)TB|qLB%aUO&n2^2jT%5F(!%A zz?D!EF(#3BmM8{9*TP&5UYP?B1Z|cG<)8vkLCiwJR3vHb6^|45DvOrwAO;pilc}7k z5s|BGRleHq!DvIP2zEwkXHhQ11N=F}o`^4@yTF{N&A^c?mgm)b<@g*>D(b1p)NAgN zZ65ZFyj|(8$k5gPv(#jhZ-2L@>1JfArED+yc?W2W`AG~#|f{u1>P>7ODiJ&M}3ANrhHl5*}0 zq4*k$$D7GT6M`*Z04O?5Sx^f;2(qCqD&f7rfTGmL1SbJmzfIi2C+~50ne5~0EVNJs zu*6F)B@R-N?`4B%Yi|iPeSd|V?Ir%|W)-pdwATNf7}eo{J1XO|>#-0&e!I zhdt|wRLYPZ*`AWu_1$ACMmQzLy;)RE=14az3Sm{sYr>XkbuB(MZ*K7*EmQ^#JEVG&%>G z17$lv>)Q_Qhs(CIeI*dfe}%M;vRVriS*iR5=d*Gv-(@<{_$ke>NWXe&H1GgZbUGZL2dWvm+cT` z^XE|^sEKP)13MMvV9;R?xSa#ahVyc1fGx~*mq1Wsc%6pD3@};saWT9O2%_Ewi6VoG zM^P2@{IxW|nlQk?`ww(w5eX9lEbr1BR0MDZC*?e1O%y&K?c&eVO7_5Al~3#kB`M}| z0-DbPN2&S*?+&GVdp7z8Oxo^N9@wuuuwCAnI8SA7st4Z$fgKp%L@H2dBQ;WZw$(_l zsO=alXr_Kue~K9Vm(nOou?l?V2&xr=j(h+v%CgdN3(Xn4@?M|wV=b}(L>O|w3lkJO z3p$G3>>VHAT0eVHV=u>hK?^=MM9dqUl21*_pu|Kqd6)}9G_sbXu^wbro8>EsgIv3c zw4OsYC@sW=i50l0Wi+(RR%)3V8tt`{L8N{tdOcc6oPr0~WG&K2Y}o_))jfG!Wg~gR z1yl)n2$j>1a^TIMr!weg+xNIjwo_Vpat}HAXtPz&%yIOG0f05rZ9B2QQ(lljkFO#KFWJk6A!cbD`yktn5E zt3PR_?Wt_1y|7igZ=vQ#ua*R(|2 zllKT3F-(Vv@>eL`JJgbw+%s1q z)!UxKSVcUWs`nFny`Iz!CG^jn@sLUY^$r;)!lV>va{Ry0@SezWn~d4#skgyCxIE#6djMrZ=HQdPNExdb$i9T6 zN+Z|^$eUyel>`N%xgO90{_Y4@Y%Y^Ik8`s@Xrf&z)ZzhDj?b|@VQ}#rEpq*2C3F*2Ma&aOUp>tA zRS(1ndBhv>kNClJ;2aP%T+Idr*xg+#WYJW7J}_)U304pRg4^tKW9ZbD3_wb{<*4#N zFT~s@a$n+t{01Jv10DM=K!+ZzVpwlaqaRIZgH1<@xcq&}N{}w@}pO4twGx zFaq`9>%hFL_Pi^EuWd@QKp(2@Q1u~uUlA+;`X;Gd@dj$jNL6;5is?Ih8U3@;Q5#?? zmZaQhoszg(5)I5gOp6Io<>w%(I3{tlltZjP{tjkwUKWdAa)8`j@eARK^}>f~J1A{^ zo3CPP8heI&(D=6_d%iwYoCIhW1`9Qi8styAY!a0b%Tdwb_o<`oT4cgS;C|qG8heHF z4q(bYBMdRU$b{bw3%Hy|6<75IHuB9(ED6vXZ9)<^lM5zE1^<#?dO}@Z%-H^$(C|9WR=QwRANb@{Q!FG_^p8y!=KcMf45+p ziFWkb;J%6t!x?~w;O@cC2Y4Uc_1Gh+0erkY%wmK?aHPEy5dHwseirRW+NAg4C4BKJ zO~Oy?LkcJt?_lr1p&+Jjfd$c?nee5p5D|k)Eg-w)>#%UtiNbf9iVg|A_%h(j5G#HwXi6j;9_!>XQ_v9T@7F z6y}$}Q2z+b_+3rvHzb<&jNjEv^EAPKY*&-^sWPAOyP6sTBW^BG}J zbWAh9vHPJZGsJY`#Ee9wJbF#;lG^cDJEa$;*|7+l7H-Y*or^AXQn>V;(gF-Q8aYHa z>GVXHx)a1s>G~7t4OXT2*^gq)!ac|Q!w%#B`c7#h^1PLpN7{3=ozgn^e}Qmz8uoaI zqa16ebg@}i9*~Etai#5o7HgPpBN;DyR%1JTG|7KX>7+^f!vzq7V^hLZkST`u{d`jS2R{ttc0FK*s>jdHk=H>CsiVhJ_6yAqlA8nF#hnnO6XZi zm^5#Z7^Y)gD}d6B$zn~4E6O6Sg@V5+$_Pch%{9SPD2^iDkwj^cMY$ZN^qrJ`qT89)KH7kX6~S64M4`tYZt28yn4PhhEw3a6gUEqdKCdA^b(#dfVnB~7kL~@0XC(;`%>V8DRAhUBCKe~hN@B`0L{3n zSd({a&OSx|7x-)JRqe@7cmHJ5TlakQjK+3r5o3s>n+vp(!T!o~NBb-7n1PREYq3g_ zVv?pj5DT!%uZd(M#y;SZFyw&+7o@@VG`Q4)p|`a6QK80^a1ly4NG05G9nJn}Eq7~i za;Dt(Bvdyko=e)YFeR=mb+A_&oa}8MpR#6IB1MnbW}=aruS?Ek z%C^yVM}Wf;bN7Wkqic3_09*tV0&r8Xdqgme;9m>aNAM;A*NpB&$OT5#6gP_l zsvX@)i-@JkSqGneqs{ljZ?UK)A8&QZ@up(RV6_+RB&Pd-+aVjWGK~Kg1JZm&o5wfe zb)#vqgQ=Sr%P>F0Oz8z5drH~-iMOGL2*V5J!+BBDnThYx_!MZ9EBH7QXg*87seD4q zyIwZTr#ifhKI3vEIu(#-7m(#zzT=54(qxHA5Ez zB^t~c9n`RI@g2>;>|f`B3@{9)6T8)nssez-ZUGhnF>eS%J#zML49(k z|LOvl^0TMHdzH|8$R3F(q1OR852=sY;jYbRBV{{!h9(@`k2Q8*!+bvIeMV(5QjmN7 z&cUY1i5_ozl)4sg&3{%6SGhZ)eXi<<Rj7!V)_ynq0+}X4^`0mUNR35g0O4*#l_*<-^4sTMdf|n^3yQ$Zx zbP(sdic7IMrEX(>LD^o-xT!c+>7XdShHZR+$cMl$mGJL?@;VPG9p9n|?6A)`pNEQI zkuGtbH9ocE_=!ubb~e!{ttF{e-+eGvn{+}T>IglOB6 z#RX=DkL}Uep-e6z*n=^@STp97CVm>&2=gW-v>eULY2^w4w4pPo9{kMbd;tSp*MLHC zu^yjLXnZ8w@9E~PZsW#sPox^OfkM6SY^n{ug{`4zdP6YFvsC)C)YS>Veut!7k+)eL!Zt~B{S^GYYx zN$%)zqvxel{2~uu_tu(tXt5L2Q6CN!}bjDXvddIGnP!B?IVZ_oi2zRATSX0w{ z`~j$_cHkd`dl4q6v~J*n`=9u^0Y~BP#t&IaLvTOFZvo(aaIZQ+l4=1TZ`FkK$}{k@ zNptZZrmBDzS-3_EcO#%Px$i&W{}c|9BqZr&leSq9aSMU_*n&O>L@N_E=}a`mIUKqe zT*uC#+brl;7Id!#{ig*zVL?w@&?|t><*A&3w);AVz7FU-4t>*t)<v+F(IHv!MGd z=zTyUl@rkZB4rPt^LTo10upVtdP1`FH(5|0AhGJS6A(>0uo8uyb8u(^`s92L*>WZ6 z8yw1q5E0?p0Euw(t=zti7*lyT{FBg~SgnDl2_X@QY_P?OmGCXFdS;?YS(;VXpE)8TmuY^v=oNupT=7X^HX4G)TJ=@ z14Cm^VA5AGWcXyuG$tXV)1Lpm6)_sQna}tYu{s1G`pA4}EYpLE9MjJKMIJ)@!w|$X z#Q%$b0`sATp;fb0^{ePenfVZgo)Pn1q8{Y%3Di{lNn)mq!(22DGiMxT={U^w<1p>x zFh3iI`RzDNbR354?lQ~#P6lQ_-j1^xC|1+{Z$DL=wlcV6NyDnfB`bn!RyRv2*gQ3w zzD{T!c}rh^G*RPD1AfJMzKlbHys^d|VjO$gmmelgJK}2QnsJmbwX~Ubto197i>4hf z6=#7nQnQXx=22Pxp4HH@3rn$1N>A$C$PNsMLQYoWS3@@ePv=I`pZ}XyL#f&?D#V^H~p+0 z_Z+|yi^lRa10gPhcWQR%Clr!^oj1$Fix>VP!5YAnppPe*oULibNmw;-J{>GHwN2w> z*ni5vwEXqczEAt83C8}Y{3N~UA&H%o@g!|M_>mt;%2xdH@oU3x6Mhu-c-kC-@c934 zpRuE|Q@OLbjw&G16vXMh@$#IHkAFy>Pe-cM60($(58uZd<)6aT;EjGM%o4n{S(x#X zc@z9HpZ`6{EXH(tZsR30jSDPejd@m^@5hqNH^Bcma%L=(Y&@Bae{E9ZKYW&X z8d7?FOqxgIcSNU{EJ`1l^`P;6EPhvRhDjEZ_+4@}4GX6aQ(79^y{1Eg1RN|Ed z!Sl56-r$2?EPB$~fY|a$Y)XYMizfaHOUFD8;D4jTdUjf0`>tlFcC1~|qBPdm4pipa zTCnCe2S={AB^U3pvaN5mU%}VxOglJ^NaNq)_@7;KURKncb3o0tVd0KlR>YV2?O5Z& z+8=f>w!;cCRqR;s0u5^`Sfs*gohUM8Y?cwtf%UxRBAycx;Fb}I2hIE!%{L~19MR6t zpx_NyM)yT79aTdA1X>g}6vliAhCyF;HmwMK(-)yxX8LM+ugrQbtQhTy=i)G-dQrZP zaBQIEeXkye@mXJi7rPfN4<8(aRVA{*bH!EK=#ZHXw`fFGIENl0KUjhdy4iMpNXCkZ z=ZxsV-Ksv+c77Xt)b?nUoCC1(Q9Q7KjjH;99j~zSPrer56^C7tueo?FNWI$dYEQjp z;nhX2J%_N;MybhIBEh=+8q7N$Bj62Dc3zm3b?2;1RN9$nW z9kB^t@aY{E%&2R^bYjJ9%Cc>|F_F01zOVbN9$Vs9X>dmhj<2BwEGt-iLFTJ7^Yv`J znhC~p0HYzkL#fC2B5QG`Kly*$%Fu)?X~KnasXWmpO}sF>G^jel$~Sg!?b3t^@G#bOBn6I1N9WMAI$-Z3HCNDDDG9DcYpn7IXnp7vU-a ziEutMXQTp%Hl%IRzgo~=015k=goQg5LFQ5>L4CU0WFZi)B-`hmBR3hP-!#@ez*~60bMdf5d|h) z<{={H-qh2XTEIW1mDs4MGoJDH0+0mDe8y`fr3gS0EAt`hqUTsz3Hkk){+W+Z!~8Sej-%a}H!r2nHBD5;Jk7*mZaC(GrUvW2uH}_KsKkv; zX*$kVPICD?GLPnvDIF-y1_t-GSa-Rk*}#;QefPU%c6vw)%H_4)jOoC4I5b`h+BXI3 zyC98~b{;^w3eJB=3u+U|Wc>f{Xh9=L$(iX+cN3`Ne0a5UGd4S@#9l&0SVEd&F1?LcZYINtrb-=M$N|WeQLbss#*}55Jqy4U8qu*76Q#p0h9wuUDE3kFE z&JlCj@q%qY7jXdW5#HkB2`Jt3Vg5WQS1oV5sRSCt5ImL5mBl#b(RB#$ec0{36)rz` z7tlMZkdcgS=>pn_KACo@W0id75UVUgFj$pWPK{N9ASjR7($>@+73?) zu5LR#spTZ4`!-6A`%e>jYLVLtfLb>ZfE@stfROIR4@sK}m`gI|+m-Il|C}dD*s#yT zyf(o2o6>#zgFqs?lc|L9ItW2wl|Sd?R4$2MDBT^eqhQ$jiD-y>8@*5j95_O)t~fdV z4T{*^Nr~}IXgZ#8JLSj2o0%lT&p$bSkYu}6&OW1k3sQ6&?NM^DVYJ3Mxb_0$4r<5j zJE&u~pl%d^^rmreubHS$E*}L{4gJX<4HUW=R3QGn>7_Q~f_O~0G zcsvXO2;J{f6o3*I0n4I&N$nJ7+6F5{*1kv^cbq-J`OryW)?gCT0UXH+<|vz8r*`FN zMr*BR%&XD#>2kU@Y---L$y}lj@=hWv7_R1u@<7A>D1C3+qW4mx-Nhq3PaC`wAVxIf zwjmT%i~NQ=&R2qG1~!VqSURx?;e4g#1B9kAiqPBvswm+m+modFEWDA*bdiRk)l$*l z)C{K+-oMig`lQsN0D42ehya|a2ZlbD0bgpeE1sq{_ne;|FLYoyPe zW2bL={{!jUMf%*~>3fe>e$zWRZA|;!dVekwb$%HW%m%yyz78fRiO6Xl`V53UI3`_~_qL+xR zO`NM4(VW;L{)7iuQtFFbQ|fcRbBw$bJYApjJu~kMzB2D6E~Mt7)Xq()8;??zRB~VE zRr#vq5Ff=i=E52$R+B0{jGki3h6=C}QIuGf3pD`;uF|-xZ!HykO$@$RhYM{?Py7R% z0l*A5k!*iMHFwC@o@uDCQ^1_HAc)hcZDd)2*;*SJTF9STtBtAf69_3~M7qz6bRUld zZE_1xLeMh>3X1~Co^ z>JlhG#3}9EccTT}1&E&5hF=H(5b;~m?P41?S-CfD>mudvK}~hi`G%OR4CI@H4Z{p7qy0tRb6W{E|yf zOZ4jHxk~q5Epq!1uxv#Ex14%aW0i#%vRHJgoB|iiER_zpScR#a2GQd@17ZQoP7^mi)!@8QF02rR zdKKjAl^gnEcZPoThvVv3mvH@RT~_3Bs9!Z%iQg;T<(8tQWku!zjeOEHEIR3G$um=* z0oQUzT--`W=@>wR;q4G?cCwTXqCb)+G|oxCd1iPW&OovK!pM=ujLLGZMMr8r*AHi% zaX^3HrT4o85Du+A`m$(uiTRaD+%>Kt){0@l5Tb#>3YM^p11hJf|gx*4fMzllvTeuNm2yjv` zRzQrvrmNr)E*Qlm2OWs!hG3ju6sxQuP>Vdu1!Ls`dW%)ok^`Yvxmdi{k;CO;<#K^p zK@N$|%9R4qC=iGf6o_@gSGuKR@=m9*WXCV2KZyUr_aQ)BF6vtViExiuP!te7F@38501W^##)CYlKyCD`0Q!HY|R|JPm>v*xKr^F&=h9Y26EYhefzhX)J zI$YHuK+exW`ZxhQZFm9DIBhzOZ5MoE%tSl*EzB4(M%*+wz!Q?=gP+8$by!ntFor$+ z#HhKLZ_%sL`23>xcfK#$Hl3@1WB(5Ewqz-?hNu;4&jy zbVlc zcu792o_n1GeimzTLoU+&HJGVqgEK0j%RnOc$+%_>@o|~L4Ovjx*8>(Uq&`913r9;^ z$vZh;@l{cQQ@zGoy1?js zwF_s605|}Y(6QO6xZ|M;0v~gp(LuU1gWji)zQhi}EyWEYqb~uNVazQ8?iGOMZMr@> z%wIJty;K#E!kLivnzL8YKSoh-JcZMa*BSFE)g!}HMwHx(6HnnKkYse27;~9;a0=(o z!rz)?3cr?k+F{tVJK~_vC)>UQNwGejlh0UPl*}gB?}qSlb*+FRf-}gq)3E+C-N)WC z=@m`00xZ6 z(MHY3p63;gWJ!4wsZW7hF>AFjuR_ z-6Yo$kt{gl+cX`?gQu3A`vQ_NF>Y?0WY&tR>l$+Oy#ZiI?8%Pa%tsFCGe!?gOClP8lPaa`b~;HBuuT+KK+ z{y2gjJHx~u$u|Gk<>^6eudz^yuLY2lKN@bNLd%Ccc+yzwVIRdQVA9__+XjYh`~b^J zSAZ42s)YUv^>Z6PK*Qiv!@YPx<6zENLwAt;pg;-J&Ehb^N}RFLZD!9}oqK{+%I0jd5~LL(l(K=CG=$v`3IfjUt!EIbldS)n=)S0m zlikjJO2_F~nD)cg4oS4U$mtJq#Au_lu9~xxR8B?r@nIBlY(l|&bi0{#SlNr~YeL_G zH|<7OUB34I4;;<}d7K{gM`(s=b*4p<~?0_`W+7uf2ZcvYQS zTfdQB=kw5XW}TJL2`D`^2ij<$=|w+#DSilXtp2dVy#s8rq4vaI!W)+-pa?KFylFU8 ziN3)2+7mn<*rrQNc|$4pv`#`P6t3TM%SN>Jd$_$O9zjg*vze+wHjjw@z9>#l>w8}I zQerptFoj);ux4vu_J0oe`vh;#5Ue44e5u83YW*IxTa6N;ON4!-@|Er2J>%7F4%rI? z+I){D^Un1ee!-

d6VJvvPy8`E@3ThS!j4&xYfEDC!nHRu!u_NZLWid*U~d2JhU8 zVk(_P2JzE?KudtrTvh6I?i5Sj#*Z`{Vhg{5D$=Nez7=p*fXfU30mGfd=^mqoSW(MO z=m=MV8u22)K+7ti-H>E{L#m9pPXdqG;Z{5YerI3H^PsG`Q_Hsb4cz#{aO^g6yCrYj zMkjF?@ciIhoLL8p!H*3qp-#TkjC)!RX}DFXc=(PHDl6J2z6w5GCoM_r|XP z2Gs;PD4lV@@!1ra>sW_Ve1~U*yrjh4)J#(mM$XHT@-ECNols|M%&y6bl5d8k3HkqE zj6a2uWl3&?OECS$o@W~So^HKzG>aBGFLgC+S}0ArRc6EZb5BP-XLY=@SCrP(_x*rN;jV+}O%!k&+{PkFdJ!#$V=tPQ*mkE3q&>sB%28ZrKo6)?_CT#&UokLLzIv3nq_?7??z6&g< z-tz4P^lcvZA7Yn}ikTK7sU z1c=sM4~m(}eSZl^#CQV`QKe1#3Ft=PJ_01dop53jHxG~qcaM_veGrg{kpLuo`$1(Q zHw6c;1auJ~vS6}Fen2ASM*tOb+%`a>%=-a}^iIOHIihZ7021w20Z61*3rK{!-@?5G zNW{nnZHsVKfJC_80}`!qW?|B|7LdsIKP>2BjD-t%sg79CH({VAO7I;E@&XdMT?t6^ z;QfF^dd~q8shoxJByh7V=tPVw;adkt_pb6!FrqN%&{kD|N;tF&&_x{D3rN(c z9wSkdY8@a^g6l9cg>NUI89c^4fJ7dvk*vsfHz0v42lExs@AHxnqH#MtVbPC*!CEXA z|H;fo*vknVI@%0}<}-cCNBB}51Z1~-9TtvyUieb(B4wfF7Va(! z`i15DYYVr@g6^?=@3V0CThN1+??V=Div>Mq`9>|=Rtp-ie4n*&gBJ9n<-6O$y>3B6 zmhZb3ZrFl8w0r^ZUbTU?lTfY&W9+Bi&N9OmQVXP5&4vK2y2+ z|Nm0y|JS}$y1Zr8sv9cBXHchKJfrM87ahwaI%OW6JP*7&xMsyl^K3A|=2uJ8&jvRh z`x~goKbV$wc6TZNx@d-tH$Nks_6^me9(+rE={M7IJTFZjnmn|2Euu_>X>@a|@EPk&>JCxTNvl z=3EK?#}MvUP7x65t;EBPvE+^dUpxaloR^4j5Pk^PcvMU7VT4P6xFz?P@4snAdm{w8 zX8fuEG7!h4U|s8r{DfY#$Q{>`7kdsj*OXF1*v`cw%mUo}9l4vt3*XblJ63Mi%hw_) zy8I8vcCR51UnD4F3xN@iTMyIKzFMN0b~?ytitMGZ$-#FxwCqK$;Cfm-x-6jMlj1Fn zfrCAxN=pOQW`{hH#STT)-%$b;?dyM(Gpe*sRUaKi_76kO<8q?6a6OZ{^GjUprS5zO zW>+@Pq=XuNCOA#p6^`8kpYs_kq@hYMUMkUMF4B|@YiTtUtDE%QDB5H38CTT$VQr?; zz93f0w~0H$+{PaVk%{uaZMRZhO7}8{JNw?oZVr1qSmzIZJ%Ig?v#{1SV18PL_Jel56L3%Zku6Z6 zyDM^JTBE}%KGtUu^lanqXHh1jV*vjnwvEQ!_XEJaR`@~^n~&98ANtYB?U9wx1j>uO z;zO5}yV1ilh7lH2LSe8+N-u`T<;JG{3?Go?Fi`WdTXOyEdp`N*xsh15ptz#5wf zr&MFu--J~GT&yBv!+>Fb6I(iP?Qm=0Vh?jZtZuPO^-D^;((cv!?OHZg7-8@4WmO|y zwrHOwFRYXArsl`?8H`s;%c6SKdYSq+Ov|^htd1h()LMk0UW4toLnEY43`z7~%oytOjTH{L!~LN5~1Sy|BXk-NOIq-7XE zaepX~{Ms#i#USdNS*-Fsi7AZLqBdl)yiT5Ij-eBjf6L7zfnk z1Xpo#Bx?Y%(T1Hm+ywQmLWaI`r5s@(3-{SbE1#m_PF!ygF6D}*4Ppuz7z3V!AoxEj`Nw8yu>$n zrJo6&!^e8Ch}S#8>;0bQd?q-tY;QadZEPJz#rNj=kaMDQ%=cyR{YsO6`HV;GM6!{8 z=MHz zxL%A%h7IF74qvS9V_dIvxD@?W3T)ge>{g7+>wG2KH4NWQ8t;Ci8e9gOsDDO_g160c zc;z0SbDOf^9{75V)A^P9s&P5Y7nSfP1X7K=9CyKuTsl#I>l}6Ftqx*DD!!vbSfyh< zylALwqh9Cz4kE&q zKan4eA@U=)<+s$EWD7>7CS&pxDARmMV~)N$6f@KR1j~^r-?#wT8tHAxjngBp{8S4pRDtT8A&nY5L)bO2=VBM6O3k zuwO@c2OZ^!A13=BMnz!MrTAchI0v3IGV(d!S3>;=@0&^A4$&XtAbq4#|2;tCXCj}< zIxqXo%IbDXUyp)lS|mSf&Gp76<`Rlk)}i-@CDSK-qk&c73#g0u z$2|*hU<&U!@b+-C2AdMT3e=q3S~R##K+IE)bq6xF4Xfly!V4Q|yo1xM2F|Bp!A~kx z^8Usy_qBeu&(99wD_$w$qOXeiln0_(L>I!P$BWPT_?Rw)i(v{EEpwMR!*XbhKIRkl zVYKCrdp>=U@#j7OGaYUE?;Cb6%iMQ24_PZZNI7Lh=Qw!IS!x7ZOu03 zPcg$_bU$mhC9M4EQB7UUVW5^ zD*gaqvV?|VP!OBMN{GJ5sIoo}zCMgE5)u)1(u$Ou;S$X#eQv5`P-TO-@?i1Q32vnl zXB9b55}$H(&-6}dIuWP`DcKH+sOdMQEy_PgJC zu;p2+z8Ql^33t;DcILnj~fagHS`c>c6j+AF9tOtT}4}<9^7Z#*+r@1lGC2yEc6i|<4)>l z=b*Bolv8I9KGX#Bw`_cqv}BM%$x%MknNCp|4~^j;t0YATR@-gl;7PIq_8C6xMD_vr z@-aR_*pC~D1z(_%hkIT4IKueH0LJHS-{)U}n!BQGG(Hohg}et;2FTLa!%Md0SS@qb1*tLKw>xBNa%-4oadyLUgrwbUI8sKshYH2AY5TQ>42wTgT zP62osPK6ijb-oA3)Q?~ZA zCPiI!hNvT%h5~F%%DQ=YCnBqci$#nvvhH%oy3UlW>rBbI>U3FmX!vF_{>|vZpu*+W zq2b<-{!Y1dXm}pC+JDlNTcqNX+?vPbRyGRC<<^f$ZapC6)}2%<<8~ppxV{Pmyg%b| zYZLeFwB*)C{*D=j!7Jp8+)l&R6j)btfu%)$E`-=}l3Q<$4tkwi=`$AH^HwMwbrhc( z?Q#HIZUK8#xiwG7tDN#|HfriCw*=Lvg&fkDv)6E0_Y4`Wnj=_7H7(; zC3u6Z%2e<$)e!u%TkucbJ7{8ye|B>ISp;66!9Rx(B$Iyienc6< z=%7T^KpD7mU&wzHu1hL|VK=|qc6lE!vO%ZTURxXyz$Z8uWg+M_3^dh%5hUVUK zrx~T1iwdL@BW{rqife|1cM+qS?Ldd3@H* z4Fx(xrmPxGFC*6$9KGeS{D794~zExS5j1bPVOk7d8j!V zW+qiDIzv;9_P!W+GY}G^2B*X@sRBMFK+P!`Pidf=tCnIw3i+j#R{YO18Hj68c#wvL$VeEX9O^7M>1J z<;_8d5uoR(-Spue4GS7kDthFBEnwe%_92$NXAy7aO9+1U z8Cj~9dJV<=o;Eea{f+@d(PAR1RABZY2t+5v#u;EL;0j@a&0>C| zlcX4(uW0{3isI9WZ;dLN@+9tkS?^dYuDv5(&~xbfSS-TtbNmi}U(??@qUrA+(cj6^ z-_Fw7dyXh5QhWbla`ZkNRqf5f>Yk>!_v7~}eUWig!O3Wp46Ae7{4?ia^@BFW{o;cJ z{_J_hs&QGlpFOW1#(Z6c7qKMTe+S;7I)6^Bu7pO>LOQ-s6+Q<(NcI*?5L-`Wz3p$4 zbz0Bie6@Vhxk^}u?}4o@CH#%ayd8PNi6)^B&G_*t)1oi@;R8mQ5*mg@gvXeR51HTs z*Sq*)r4|v3mKqB=Xu`u6bJfv7*a?U4MIW23iw>fMkxp=mYTQmGRM}iQx^_E#qDhq( z)nOe5*1YC=k=#f034yuNQ3ndq*c%#q%(0PZ0&bh>{(`&f9qag!Mgu2w}aP6orS_cEtve8$6nGnkIh^K zcZvIT;sx*!@{df=cav~Vmi+#-l5axEbCTy2qMF?2o!LnR$GoXElq$QjfezBA%CB_N zXDcX0syRQM(e1%~2=Cjx*)1*>13h)2LLy-_N!3(#xaZ@1l^w#Ni~!Cy;ocxcFFhHv z^~gNz_t4R%Z8+KF#=`imXM(8RSU{x|5O;UWiAVs(>wQWGO^@8{*ACjpGW_`>eZ!xN z{O+^zqp$mjLk~&+0v0oig4Nhfl&n)Mt||Jj!RzqdS2B85I&Y^J7WIoZP&$8%ce>uC z6>iB0na_8w1n4921PgVqb9>NFm2(@SNM@mN)>Z#2a!E`jdYUO}(sW)c9p6w-ri$qQ zg~8}Iyt$MFJ_p~eCXX@n(B4}y9kd2fca*k9ei zx%$qbFbIDa{8YU`!^etk7yGbxK#e&m%WJ40rkWzQz2p!K=P}xf+)DL+ENWzH1s=9< z7@`FLbBqEWH1kznlGx_f2?jyBTA;>utKrzyJJtH(5rXy7&Kuz6*%yv z>R$1sER^L%l*RmD*5&Y=O%r0J<0@){822PZe6Bf8h-WDJbY7k$-$4Co%vvKblXoP0 zP3as#tOUoF{3qcb#0A|>)O4M~*@JZwj8!Q{h~GMx|G_30nL!gAAD7{=xp zYE?qBQ8c!X%N1k@I^FrUI_a)3B^tj7rARU*MLz{0)4MKPRO)EViKeri?_h;Ey-{}3 zds?IP;XTQqd^kSl1#|L)ISJZQx<>*g(@+_0G|in#HUT&_2Kxj6SmxH7P6Qc5YQUb* zEIagQ4qEZnTR6q$(~?XZ>Wfp^ocqx5O2-igA|{oND=@iI3g<>D6e`K>6#Yb$T5TT@ z>`0;)oTCx4MCsgzV?Az@gQ>(o|3V0*`%O1iI>A*sU%J{dInqH*CLN`o#5eoDmMG*)88rG=DJiwXbWyA zRK-bI1r7y{;D#c>D*&Fn3Gt{+cfjR*gr6wuC*DY2RB#Hagi26Klf__>_^9lw2;)Lu zjcvb(?Q4_p>3OUabFSqs*`8usui!dg!MAqv{PbIhUA+Oi!SVMbyNW+&(p98pge!@U zXFxcgEJJyX3vVJX6WqpqG6QpnWVVME7 z2s~*fXNXGpHIBA(46#Hdyp3ZV9J7gIx`9DGrZ_#tO8DRDg?}WC4?Qa7!oPqvX0~X} zHZN<@QtSeQ+EavqlB0Hc&V@S>uALW-_~PK~?_*d$;=;eR`Ljut4?H3jC{>_0zMn^5 z65{}*u~{RNCvH3eJP~K3%#R3G_Nq?K6)6S>Af}V`fv*L*7c4UM&5{Owe!93_BPDp zA1TAWG(Nl7Lp%2RZNP)F6Q>~&pW+@CU%=vCzeA?@0v0aBcn5S8d`~s_1j*UxXn6(0 zteZ69fU~h!2~8x?1VfxekDx2)`5H<_MCXE=;`f-Xxu7m$F`Nyumjh+EYI%rQ^dve5 zPQ06V!CQo(or3C~lK%E1VxMCKN8nVpa3vZeh>?^sX8|dzKKia*pM7v>D!D(b0Jo zO2zh<^kAh}9>7A${+@W2{4_e{F$6#-QY@lYIJ}EE+WE7scyFdoCO|bJMAjbc>_eiS z<)O8vZEh?-<3sdflVzL78My~RTFVfYlJKxFMM26UpU4(^Ga@`WGgTIe0+}L7x8U1@ z)bqc29W^x;mg|S{1 zg=hylHO5aj;&~(UG|YiTh_s#He}Z4SB)S1f$2)+eVhK4O04hDmBD|;iHB*i&o#pUN z7gfddo+he_@SZM6Q9`Whcyi+jT1^(5S_xf20*!O)-ljdyT}|&hcPX7!T*_7P-S1o_ z{5+3PRqLCn6)E8;-rO^*+)5~dVDUfU75f`rbG4bQFM5DN$?nSo%P0DzAT%glSeEc+ z|D0xhwEJ(z^qFQZzDWK#-jdz)jYk9yQD7pin*iva=dxE6-M}b0(1(3^-$cx8w*`wR zwG{_?vXsrI^Mt!jSHg|CB!DQFNMVsVGdHLEUiPHObR<3#>k^8T(F9!=?G=QrvaG5KLvmHouOEgWJjz11u zawUY;7lyAMB4Qf#v-gzH;9i2U7!m^jZs3h9(Y%qC0_?G)cVNDP1*%t+&<4D40>akt z*aa#j^eTK?ziloJib*6I5|kLLHhGu_3=+w)o58|7h4FEGzjn}gV@DFRReX??y^6&cLSXq;QcJ*SMu?F> z_wT{d4NnL?8ty@p9}od;O6X36|sz3vfDy)RAK_anE8ky7x_|Rc;4K416518r=#jsI&k~pgp z{s@~f@lWuN7s)JT78MM)w4x1As40jg_~ z>|+l(Hc_U~3X`k0qQEXC)J5STB#B*6gBzY=^v)Cv6k7T~r5q_<#lLjr7m0Fjr0~05=gZA2AkW0Tb+{Rd6vKdr<={6r3;z~P#lNe> z1rP9Z!LX->w{Kb08>`xkL?yViibBeN)kApcrx$!w8sPH;dSNe#?eC^v@M%<>+8xJVA4ipW(qEQh23j1S$zcong+ z!kIhID3qN~&t-)Zo8s|G1fb5OUN{B(LUmqV2n|N5tS-!$8pnrF4x^>m**HZB?}c6! zFC$K+-&`XF=c`T+tXC^NHJMT9tK=B*QDwvFh#c3!_0#%3o&{t8GqVkcK89~Uk~1gW z??cch1ER0vFN;aq=&sqLuo_=`GYA;ikAM|p%N#KAL7I+ZOr0BlfF>M#+`+F4Z5fXM z!xvOAZ{0bBc_DU|Ca7UCcg5_O3V1!rLGkTz4WY5{4y7u)WIzDWuHyfPtD*U$yI6mm zcFQbXHccUcDg*Y`Pm=f;3dwIxsVsWZIGvqlEKt5+3nqUN|1%UpS`b0PN>>gB5~qQ5 zeMcmJ4U$Owb_)%Qcr(-un&*T!B}lYcI+GHbPopwsa}d+xdNq<&L2ZS2H>v9uaA0pF zOcps_CwG+awE|}sIC7NmB7q}PMmTbma0PJCPl?|p8zMd(II_~B6;8g^smA!`8ReL? zU{&=eT!@3BRdJI9B|Nex*;=273a2)(;;+NcM0(0|5iNc#*B&qul(P;OGAa!UBIS z+#b6m{rfpMe~w@DY@CXmf=EYsh&<>i6^=B`bdz`#oj;^D(UZg%iC61A-+V{W`IGcF zU&lGeyJeyQPD!7RIS3n}%7l1@K zC#oXC-2q7W4geAPRZu?dhU%ad537G>EDNR;J6KqB9XScVs6834tJe5*lo!gmdz5}w{RK%xYn1A-EW zQqdg>q69sFM2zJv?J%HH zp2|5G+ZgspZz&+rre}f(MBJ@_M2n9C5~aEu9WH$L0J@OJ{p0`B+x5WKRaWu$+PAGT za1%Dc$e*W_*eQf|6gFT$JKFg$otbL`!&TeY_ioo0+SliM_iZ&U(yXI_Spn;?+ z(S}=JBBZ5%cU@GqmjE2 zlvvdTB{u&BzNC&9m3tWseznQ*RZvn}Eev^$!5WlGLMbpO+P4Z66bxz()G9-b!5Gqy zM?obG_IJf@f%2q%KL7>AA@8q1Nsd`ilH(tWH9*P2y;rFpF7ooC0JAfd#L_qiXA(;T z7Z501(w4haDO^x7;qq=MIoMaBlFDVBf>C!uaa2oQG|ytxv2a%_ca36AO0_6ArC6I% z8y3HWFqe z376Us%F_l`#rEc811#|Vb2=8=64!ON89;h))bNPI-sVLlISqYMJ55M1Hf+h`cBF2Q zCYM2W;d3$(L>>de`P`Q|3WT$|kNg`5=XN4hpz(_!9y2q%kJJI-Jnthn0pV;fNHp#O ze+86HY2L?&i@V_E_P?WX7Y_PNOGV=@^n=6e)IXwe7xsZk8-|asua zX^S9Vk08Ye!gVonu=e?POgj*gq4aD7`M6vj;Ca2cEP|LP%%(C=W>Z8a7eUGq6`lSZH_7X&+>*N#%ScdycI@D00}FWf4&>sx{w|c@`XyNTn3H$h zE)_Mkl=B}@&ph(!%pLi`ZT(Jmi!*>aDyuhTMjIS1$Tp|T-+`_&V1YT$^f{S3x}2?k zH3lv@#jUxFGk+|GVElz3?Zsl?p6zy@b`umq)Fq0EL|ypcAPZ*G^lYw#*dTc)<67l1 zY{+1~s}i^SuTwn%!9p&-C2$(puU&Uj7tPsHqg551jFa2yNFlb85N1@?lg?+i<+5&H zm)nOi=3?UU%l$^#DLY-cJgkD|Ak@jg0K@|V=u08(X8L@Yz@V|>-Z)@Gqw+e$=8-m? z?lO%C7V^Fgtr&ozo^MO%tQ~@ZHY%fEe9&(9<$P|)i+hp8ai-W8jSUj{B57h@V0y*z zGSXRwS`dmkWT1II{vWX~lBk#Seehsxi8K9=js8k88p;IAiO%mquF(Ih`JJULvBgu{ z^Ub;V%N4vi1h%oUHsro9&3?|Tt#FP{+iu@ zzOI8#c(7=Ws`>V)9JV?!f>y3Qwd2Gj>N*r>g?l<`lkzklE4HS}8}YEOHaUDMUamv* zgqmJB?aLP*f}njX5pTEem}c(Hy3+8Mcvs8D{SR>cH`fe*?iqda9Xqnr1xiefE@10Y zc()(hP{Y&e0jFo>O-#y53%{U}!9AzU9ylYv6Ok21M?9e;@q4 zTDgmQcMdJBaxa1ZOftiZ=_W=Nns5qOXkhnXOpP|d9~&Eu&An#I^Y+NW`@q<+;2Ft^ z@~~Zji>3Teyd@CuGv;mgy#Mh*dsy8uOCGw z>@3bI@IG>FvY8Q4V-vjo@Y;s88M|?1YV-on1(>?_nXOk=RA{=x4e4xuMi&R0T%I?i!Js`vc#6 zttcyrVkYR2u`-WV@T;J+Ab)QKKOW|rjmIlQ*z!OTZ?-{uzJ4l%7gm&a34|*|7F3A5 zM+cSa+l;q2-zH|RC)g`xu$`xBxK+n=YAQwLtRHy_<*s4lnh!2Qk-cammnYb<&t(n% zh)U^rve%CcU|#YsaFF`r7=_lMOx*gmV`mt@JUf8lP}iXgX052b;RtUIaM_`KaxH0p zJb@do!jq#V_dk8|m@h?pn(GOhU@~G9>NaECy^hyNaFk=UF*-NpuJlK`eTlOdu^Uom zRS{OtP4$jpY&IN`N|~v=D0O%eHn7Xmu3CP^GkN!3$+=&dK&FEibSvaNKk{_h!|7bEzRS3&uH}oY{z?67XEL%rd>}{ zG*O=Ge?YGm8fM|;(+MO=q;+H#_e?1XJwXViPWMuy+JdY_vi-q+L6dVo^T*fw*u%>- zX6!K}#^_+v+D4wnvdZ-%&!Xl{tl2HFAsrlr-5hWTX9Et`iw4^6HQcm0JS<_x>;BnN zd;4&?9R<6~VbUybUOgiLla6-Qb{eY=!K#=P(24IE`$+rEXmS_bunvQ&{Ktk@RCG+{ z(`mh5^ZIF?cxiplQp_v2jJ$-smYPq#$|hqrf-ax>>%x}YkvH&9n96S(Io7)3#n#+& z1X|FgM$|1;noF;D%_F zaB=I%DQV{2lS6HXQ9AUp3^TxvX||Lj!W-XQOeL%M5Y20uc|pcIbzj)IxN7dXor~jh zuX`&)Wd3_%%sb*Wct#sv9gElFSsE79B-ZkoT7X8#(*-Nz^>N0WUt3il?*=azpPux_ z>iVkgc)`dpE&x^5{RkKcDx#pV>yc##umr-#1i$@ z-BpG71~fmmjUPCMksdc+hXQ!hY{K{bNR6P! z@qK<3e|tg>-}fN3fgZ#65hPwpv-nQHR^6bN;`<6D-YU4lZa2)<4|)vWN0D66v&1mD zZUfVnugY*v4r-8L0m5?4r+78S+&h$@>daFZ%#}S`!Zh*QCpPx6>C_dq;0Jc}L zpMbjDV2>-sR*Ij3i?W1!TrvJkzXE58*e5}WpNCIC;j{pj2DR2u-vV{Bq3AZRH`Gz( zo=|QAHj%vTpzu%_rSRFGczhT!R{S?lgQA@iCjPN_UY0{Q;%{jMRcp9;P~uzpJ}BPI z6R`=!jwy9Ysf(ax$?+wn29%lxMQtWx%V2S7UjwM?47L%}^@iFDYK@`xgOZjWR_rgJ zZZO=BVSL2anI?nX2};WQF(~0K$0%wx+$WWK9aM|K=-Cwt zr!oE)7LSimV8)ULI~$*ZEmewRD2Y^Ut~}vhs9bWGs*SdVTZeO@I97y9dke;v3q@N9 zmwFPcNh!8BiBxTNmJn{6ayKZqLor^_BG;+hZpE@n^(nVsv4T>ra)%V#uGFw{cPVy{ zQr}hXm}2)S^?-68RBT+Shn2fevHeONQ0`-j9aQQ`pfHHK83o@*^PQA>;`lNi@Wlp~X4R`N%Ag*%0zJ5YBnN4Bs^4 z%;zH)0pa}TBaJ|2Lr4k;=R#j*Gi5?Z0SMjk1&8LXG$OWHFMQ? zNc0&a=TXiC{_)|SF`|PNN7RSN>n40eeTaN!wl*Xb^&!@QU-9@2$PBfC1D&1sc_w+U zSQ*kVEe_72-XTbpd>K&4^CHOSA_(74@(v-_N06^YkbwxYBZBOSAP+>4MyhBL-`tuG!xIWuE1gVQ4S4WVR2y$x#>5U*mA*AFM`<=X3H}5U;`!vHo z#Jwov3_iqMKIi7r{qPKmXC&)XBE} zwKuoB>7rXM*x2!AHgUG(@*A9DZZK<6h~3=pr1K%M)_gW3#H?R*+zx!%Y|skL*YnMM zTCp5m!qmT&G3SU_pRUXkkf9URbFLbDO5;&HI~OQiBHs(w+EY$M3APGoi081E*M`B2 z+aD6KMf)P2B~@+cX + + + + + diff --git a/enet server test/enet2/host.c b/enet server test/enet2/host.c new file mode 100644 index 0000000..3be6c09 --- /dev/null +++ b/enet server test/enet2/host.c @@ -0,0 +1,492 @@ +/** + @file host.c + @brief ENet host management functions +*/ +#define ENET_BUILDING_LIB 1 +#include +#include "enet/enet.h" + +/** @defgroup host ENet host functions + @{ +*/ + +/** Creates a host for communicating to peers. + + @param address the address at which other peers may connect to this host. If NULL, then no peers may connect to the host. + @param peerCount the maximum number of peers that should be allocated for the host. + @param channelLimit the maximum number of channels allowed; if 0, then this is equivalent to ENET_PROTOCOL_MAXIMUM_CHANNEL_COUNT + @param incomingBandwidth downstream bandwidth of the host in bytes/second; if 0, ENet will assume unlimited bandwidth. + @param outgoingBandwidth upstream bandwidth of the host in bytes/second; if 0, ENet will assume unlimited bandwidth. + + @returns the host on success and NULL on failure + + @remarks ENet will strategically drop packets on specific sides of a connection between hosts + to ensure the host's bandwidth is not overwhelmed. The bandwidth parameters also determine + the window size of a connection which limits the amount of reliable packets that may be in transit + at any given time. +*/ +ENetHost * +enet_host_create (const ENetAddress * address, size_t peerCount, size_t channelLimit, enet_uint32 incomingBandwidth, enet_uint32 outgoingBandwidth) +{ + ENetHost * host; + ENetPeer * currentPeer; + + if (peerCount > ENET_PROTOCOL_MAXIMUM_PEER_ID) + return NULL; + + host = (ENetHost *) enet_malloc (sizeof (ENetHost)); + if (host == NULL) + return NULL; + memset (host, 0, sizeof (ENetHost)); + + host -> peers = (ENetPeer *) enet_malloc (peerCount * sizeof (ENetPeer)); + if (host -> peers == NULL) + { + enet_free (host); + + return NULL; + } + memset (host -> peers, 0, peerCount * sizeof (ENetPeer)); + + host -> socket = enet_socket_create (ENET_SOCKET_TYPE_DATAGRAM); + if (host -> socket == ENET_SOCKET_NULL || (address != NULL && enet_socket_bind (host -> socket, address) < 0)) + { + if (host -> socket != ENET_SOCKET_NULL) + enet_socket_destroy (host -> socket); + + enet_free (host -> peers); + enet_free (host); + + return NULL; + } + + enet_socket_set_option (host -> socket, ENET_SOCKOPT_NONBLOCK, 1); + enet_socket_set_option (host -> socket, ENET_SOCKOPT_BROADCAST, 1); + enet_socket_set_option (host -> socket, ENET_SOCKOPT_RCVBUF, ENET_HOST_RECEIVE_BUFFER_SIZE); + enet_socket_set_option (host -> socket, ENET_SOCKOPT_SNDBUF, ENET_HOST_SEND_BUFFER_SIZE); + + if (address != NULL && enet_socket_get_address (host -> socket, & host -> address) < 0) + host -> address = * address; + + if (! channelLimit || channelLimit > ENET_PROTOCOL_MAXIMUM_CHANNEL_COUNT) + channelLimit = ENET_PROTOCOL_MAXIMUM_CHANNEL_COUNT; + else + if (channelLimit < ENET_PROTOCOL_MINIMUM_CHANNEL_COUNT) + channelLimit = ENET_PROTOCOL_MINIMUM_CHANNEL_COUNT; + + host -> randomSeed = (enet_uint32) (size_t) host; + host -> randomSeed += enet_host_random_seed (); + host -> randomSeed = (host -> randomSeed << 16) | (host -> randomSeed >> 16); + host -> channelLimit = channelLimit; + host -> incomingBandwidth = incomingBandwidth; + host -> outgoingBandwidth = outgoingBandwidth; + host -> bandwidthThrottleEpoch = 0; + host -> recalculateBandwidthLimits = 0; + host -> mtu = ENET_HOST_DEFAULT_MTU; + host -> peerCount = peerCount; + host -> commandCount = 0; + host -> bufferCount = 0; + host -> checksum = NULL; + host -> receivedAddress.host = ENET_HOST_ANY; + host -> receivedAddress.port = 0; + host -> receivedData = NULL; + host -> receivedDataLength = 0; + + host -> totalSentData = 0; + host -> totalSentPackets = 0; + host -> totalReceivedData = 0; + host -> totalReceivedPackets = 0; + + host -> connectedPeers = 0; + host -> bandwidthLimitedPeers = 0; + host -> duplicatePeers = ENET_PROTOCOL_MAXIMUM_PEER_ID; + host -> maximumPacketSize = ENET_HOST_DEFAULT_MAXIMUM_PACKET_SIZE; + host -> maximumWaitingData = ENET_HOST_DEFAULT_MAXIMUM_WAITING_DATA; + + host -> compressor.context = NULL; + host -> compressor.compress = NULL; + host -> compressor.decompress = NULL; + host -> compressor.destroy = NULL; + + host -> intercept = NULL; + + enet_list_clear (& host -> dispatchQueue); + + for (currentPeer = host -> peers; + currentPeer < & host -> peers [host -> peerCount]; + ++ currentPeer) + { + currentPeer -> host = host; + currentPeer -> incomingPeerID = currentPeer - host -> peers; + currentPeer -> outgoingSessionID = currentPeer -> incomingSessionID = 0xFF; + currentPeer -> data = NULL; + + enet_list_clear (& currentPeer -> acknowledgements); + enet_list_clear (& currentPeer -> sentReliableCommands); + enet_list_clear (& currentPeer -> sentUnreliableCommands); + enet_list_clear (& currentPeer -> outgoingReliableCommands); + enet_list_clear (& currentPeer -> outgoingUnreliableCommands); + enet_list_clear (& currentPeer -> dispatchedCommands); + + enet_peer_reset (currentPeer); + } + + return host; +} + +/** Destroys the host and all resources associated with it. + @param host pointer to the host to destroy +*/ +void +enet_host_destroy (ENetHost * host) +{ + ENetPeer * currentPeer; + + if (host == NULL) + return; + + enet_socket_destroy (host -> socket); + + for (currentPeer = host -> peers; + currentPeer < & host -> peers [host -> peerCount]; + ++ currentPeer) + { + enet_peer_reset (currentPeer); + } + + if (host -> compressor.context != NULL && host -> compressor.destroy) + (* host -> compressor.destroy) (host -> compressor.context); + + enet_free (host -> peers); + enet_free (host); +} + +/** Initiates a connection to a foreign host. + @param host host seeking the connection + @param address destination for the connection + @param channelCount number of channels to allocate + @param data user data supplied to the receiving host + @returns a peer representing the foreign host on success, NULL on failure + @remarks The peer returned will have not completed the connection until enet_host_service() + notifies of an ENET_EVENT_TYPE_CONNECT event for the peer. +*/ +ENetPeer * +enet_host_connect (ENetHost * host, const ENetAddress * address, size_t channelCount, enet_uint32 data) +{ + ENetPeer * currentPeer; + ENetChannel * channel; + ENetProtocol command; + + if (channelCount < ENET_PROTOCOL_MINIMUM_CHANNEL_COUNT) + channelCount = ENET_PROTOCOL_MINIMUM_CHANNEL_COUNT; + else + if (channelCount > ENET_PROTOCOL_MAXIMUM_CHANNEL_COUNT) + channelCount = ENET_PROTOCOL_MAXIMUM_CHANNEL_COUNT; + + for (currentPeer = host -> peers; + currentPeer < & host -> peers [host -> peerCount]; + ++ currentPeer) + { + if (currentPeer -> state == ENET_PEER_STATE_DISCONNECTED) + break; + } + + if (currentPeer >= & host -> peers [host -> peerCount]) + return NULL; + + currentPeer -> channels = (ENetChannel *) enet_malloc (channelCount * sizeof (ENetChannel)); + if (currentPeer -> channels == NULL) + return NULL; + currentPeer -> channelCount = channelCount; + currentPeer -> state = ENET_PEER_STATE_CONNECTING; + currentPeer -> address = * address; + currentPeer -> connectID = ++ host -> randomSeed; + + if (host -> outgoingBandwidth == 0) + currentPeer -> windowSize = ENET_PROTOCOL_MAXIMUM_WINDOW_SIZE; + else + currentPeer -> windowSize = (host -> outgoingBandwidth / + ENET_PEER_WINDOW_SIZE_SCALE) * + ENET_PROTOCOL_MINIMUM_WINDOW_SIZE; + + if (currentPeer -> windowSize < ENET_PROTOCOL_MINIMUM_WINDOW_SIZE) + currentPeer -> windowSize = ENET_PROTOCOL_MINIMUM_WINDOW_SIZE; + else + if (currentPeer -> windowSize > ENET_PROTOCOL_MAXIMUM_WINDOW_SIZE) + currentPeer -> windowSize = ENET_PROTOCOL_MAXIMUM_WINDOW_SIZE; + + for (channel = currentPeer -> channels; + channel < & currentPeer -> channels [channelCount]; + ++ channel) + { + channel -> outgoingReliableSequenceNumber = 0; + channel -> outgoingUnreliableSequenceNumber = 0; + channel -> incomingReliableSequenceNumber = 0; + channel -> incomingUnreliableSequenceNumber = 0; + + enet_list_clear (& channel -> incomingReliableCommands); + enet_list_clear (& channel -> incomingUnreliableCommands); + + channel -> usedReliableWindows = 0; + memset (channel -> reliableWindows, 0, sizeof (channel -> reliableWindows)); + } + + command.header.command = ENET_PROTOCOL_COMMAND_CONNECT | ENET_PROTOCOL_COMMAND_FLAG_ACKNOWLEDGE; + command.header.channelID = 0xFF; + command.connect.outgoingPeerID = ENET_HOST_TO_NET_16 (currentPeer -> incomingPeerID); + command.connect.incomingSessionID = currentPeer -> incomingSessionID; + command.connect.outgoingSessionID = currentPeer -> outgoingSessionID; + command.connect.mtu = ENET_HOST_TO_NET_32 (currentPeer -> mtu); + command.connect.windowSize = ENET_HOST_TO_NET_32 (currentPeer -> windowSize); + command.connect.channelCount = ENET_HOST_TO_NET_32 (channelCount); + command.connect.incomingBandwidth = ENET_HOST_TO_NET_32 (host -> incomingBandwidth); + command.connect.outgoingBandwidth = ENET_HOST_TO_NET_32 (host -> outgoingBandwidth); + command.connect.packetThrottleInterval = ENET_HOST_TO_NET_32 (currentPeer -> packetThrottleInterval); + command.connect.packetThrottleAcceleration = ENET_HOST_TO_NET_32 (currentPeer -> packetThrottleAcceleration); + command.connect.packetThrottleDeceleration = ENET_HOST_TO_NET_32 (currentPeer -> packetThrottleDeceleration); + command.connect.connectID = currentPeer -> connectID; + command.connect.data = ENET_HOST_TO_NET_32 (data); + + enet_peer_queue_outgoing_command (currentPeer, & command, NULL, 0, 0); + + return currentPeer; +} + +/** Queues a packet to be sent to all peers associated with the host. + @param host host on which to broadcast the packet + @param channelID channel on which to broadcast + @param packet packet to broadcast +*/ +void +enet_host_broadcast (ENetHost * host, enet_uint8 channelID, ENetPacket * packet) +{ + ENetPeer * currentPeer; + + for (currentPeer = host -> peers; + currentPeer < & host -> peers [host -> peerCount]; + ++ currentPeer) + { + if (currentPeer -> state != ENET_PEER_STATE_CONNECTED) + continue; + + enet_peer_send (currentPeer, channelID, packet); + } + + if (packet -> referenceCount == 0) + enet_packet_destroy (packet); +} + +/** Sets the packet compressor the host should use to compress and decompress packets. + @param host host to enable or disable compression for + @param compressor callbacks for for the packet compressor; if NULL, then compression is disabled +*/ +void +enet_host_compress (ENetHost * host, const ENetCompressor * compressor) +{ + if (host -> compressor.context != NULL && host -> compressor.destroy) + (* host -> compressor.destroy) (host -> compressor.context); + + if (compressor) + host -> compressor = * compressor; + else + host -> compressor.context = NULL; +} + +/** Limits the maximum allowed channels of future incoming connections. + @param host host to limit + @param channelLimit the maximum number of channels allowed; if 0, then this is equivalent to ENET_PROTOCOL_MAXIMUM_CHANNEL_COUNT +*/ +void +enet_host_channel_limit (ENetHost * host, size_t channelLimit) +{ + if (! channelLimit || channelLimit > ENET_PROTOCOL_MAXIMUM_CHANNEL_COUNT) + channelLimit = ENET_PROTOCOL_MAXIMUM_CHANNEL_COUNT; + else + if (channelLimit < ENET_PROTOCOL_MINIMUM_CHANNEL_COUNT) + channelLimit = ENET_PROTOCOL_MINIMUM_CHANNEL_COUNT; + + host -> channelLimit = channelLimit; +} + + +/** Adjusts the bandwidth limits of a host. + @param host host to adjust + @param incomingBandwidth new incoming bandwidth + @param outgoingBandwidth new outgoing bandwidth + @remarks the incoming and outgoing bandwidth parameters are identical in function to those + specified in enet_host_create(). +*/ +void +enet_host_bandwidth_limit (ENetHost * host, enet_uint32 incomingBandwidth, enet_uint32 outgoingBandwidth) +{ + host -> incomingBandwidth = incomingBandwidth; + host -> outgoingBandwidth = outgoingBandwidth; + host -> recalculateBandwidthLimits = 1; +} + +void +enet_host_bandwidth_throttle (ENetHost * host) +{ + enet_uint32 timeCurrent = enet_time_get (), + elapsedTime = timeCurrent - host -> bandwidthThrottleEpoch, + peersRemaining = (enet_uint32) host -> connectedPeers, + dataTotal = ~0, + bandwidth = ~0, + throttle = 0, + bandwidthLimit = 0; + int needsAdjustment = host -> bandwidthLimitedPeers > 0 ? 1 : 0; + ENetPeer * peer; + ENetProtocol command; + + if (elapsedTime < ENET_HOST_BANDWIDTH_THROTTLE_INTERVAL) + return; + + host -> bandwidthThrottleEpoch = timeCurrent; + + if (peersRemaining == 0) + return; + + if (host -> outgoingBandwidth != 0) + { + dataTotal = 0; + bandwidth = (host -> outgoingBandwidth * elapsedTime) / 1000; + + for (peer = host -> peers; + peer < & host -> peers [host -> peerCount]; + ++ peer) + { + if (peer -> state != ENET_PEER_STATE_CONNECTED && peer -> state != ENET_PEER_STATE_DISCONNECT_LATER) + continue; + + dataTotal += peer -> outgoingDataTotal; + } + } + + while (peersRemaining > 0 && needsAdjustment != 0) + { + needsAdjustment = 0; + + if (dataTotal <= bandwidth) + throttle = ENET_PEER_PACKET_THROTTLE_SCALE; + else + throttle = (bandwidth * ENET_PEER_PACKET_THROTTLE_SCALE) / dataTotal; + + for (peer = host -> peers; + peer < & host -> peers [host -> peerCount]; + ++ peer) + { + enet_uint32 peerBandwidth; + + if ((peer -> state != ENET_PEER_STATE_CONNECTED && peer -> state != ENET_PEER_STATE_DISCONNECT_LATER) || + peer -> incomingBandwidth == 0 || + peer -> outgoingBandwidthThrottleEpoch == timeCurrent) + continue; + + peerBandwidth = (peer -> incomingBandwidth * elapsedTime) / 1000; + if ((throttle * peer -> outgoingDataTotal) / ENET_PEER_PACKET_THROTTLE_SCALE <= peerBandwidth) + continue; + + peer -> packetThrottleLimit = (peerBandwidth * + ENET_PEER_PACKET_THROTTLE_SCALE) / peer -> outgoingDataTotal; + + if (peer -> packetThrottleLimit == 0) + peer -> packetThrottleLimit = 1; + + if (peer -> packetThrottle > peer -> packetThrottleLimit) + peer -> packetThrottle = peer -> packetThrottleLimit; + + peer -> outgoingBandwidthThrottleEpoch = timeCurrent; + + peer -> incomingDataTotal = 0; + peer -> outgoingDataTotal = 0; + + needsAdjustment = 1; + -- peersRemaining; + bandwidth -= peerBandwidth; + dataTotal -= peerBandwidth; + } + } + + if (peersRemaining > 0) + { + if (dataTotal <= bandwidth) + throttle = ENET_PEER_PACKET_THROTTLE_SCALE; + else + throttle = (bandwidth * ENET_PEER_PACKET_THROTTLE_SCALE) / dataTotal; + + for (peer = host -> peers; + peer < & host -> peers [host -> peerCount]; + ++ peer) + { + if ((peer -> state != ENET_PEER_STATE_CONNECTED && peer -> state != ENET_PEER_STATE_DISCONNECT_LATER) || + peer -> outgoingBandwidthThrottleEpoch == timeCurrent) + continue; + + peer -> packetThrottleLimit = throttle; + + if (peer -> packetThrottle > peer -> packetThrottleLimit) + peer -> packetThrottle = peer -> packetThrottleLimit; + + peer -> incomingDataTotal = 0; + peer -> outgoingDataTotal = 0; + } + } + + if (host -> recalculateBandwidthLimits) + { + host -> recalculateBandwidthLimits = 0; + + peersRemaining = (enet_uint32) host -> connectedPeers; + bandwidth = host -> incomingBandwidth; + needsAdjustment = 1; + + if (bandwidth == 0) + bandwidthLimit = 0; + else + while (peersRemaining > 0 && needsAdjustment != 0) + { + needsAdjustment = 0; + bandwidthLimit = bandwidth / peersRemaining; + + for (peer = host -> peers; + peer < & host -> peers [host -> peerCount]; + ++ peer) + { + if ((peer -> state != ENET_PEER_STATE_CONNECTED && peer -> state != ENET_PEER_STATE_DISCONNECT_LATER) || + peer -> incomingBandwidthThrottleEpoch == timeCurrent) + continue; + + if (peer -> outgoingBandwidth > 0 && + peer -> outgoingBandwidth >= bandwidthLimit) + continue; + + peer -> incomingBandwidthThrottleEpoch = timeCurrent; + + needsAdjustment = 1; + -- peersRemaining; + bandwidth -= peer -> outgoingBandwidth; + } + } + + for (peer = host -> peers; + peer < & host -> peers [host -> peerCount]; + ++ peer) + { + if (peer -> state != ENET_PEER_STATE_CONNECTED && peer -> state != ENET_PEER_STATE_DISCONNECT_LATER) + continue; + + command.header.command = ENET_PROTOCOL_COMMAND_BANDWIDTH_LIMIT | ENET_PROTOCOL_COMMAND_FLAG_ACKNOWLEDGE; + command.header.channelID = 0xFF; + command.bandwidthLimit.outgoingBandwidth = ENET_HOST_TO_NET_32 (host -> outgoingBandwidth); + + if (peer -> incomingBandwidthThrottleEpoch == timeCurrent) + command.bandwidthLimit.incomingBandwidth = ENET_HOST_TO_NET_32 (peer -> outgoingBandwidth); + else + command.bandwidthLimit.incomingBandwidth = ENET_HOST_TO_NET_32 (bandwidthLimit); + + enet_peer_queue_outgoing_command (peer, & command, NULL, 0, 0); + } + } +} + +/** @} */ diff --git a/enet server test/enet2/include/enet/callbacks.h b/enet server test/enet2/include/enet/callbacks.h new file mode 100644 index 0000000..340a4a9 --- /dev/null +++ b/enet server test/enet2/include/enet/callbacks.h @@ -0,0 +1,27 @@ +/** + @file callbacks.h + @brief ENet callbacks +*/ +#ifndef __ENET_CALLBACKS_H__ +#define __ENET_CALLBACKS_H__ + +#include + +typedef struct _ENetCallbacks +{ + void * (ENET_CALLBACK * malloc) (size_t size); + void (ENET_CALLBACK * free) (void * memory); + void (ENET_CALLBACK * no_memory) (void); +} ENetCallbacks; + +/** @defgroup callbacks ENet internal callbacks + @{ + @ingroup private +*/ +extern void * enet_malloc (size_t); +extern void enet_free (void *); + +/** @} */ + +#endif /* __ENET_CALLBACKS_H__ */ + diff --git a/enet server test/enet2/include/enet/enet.h b/enet server test/enet2/include/enet/enet.h new file mode 100644 index 0000000..5e21ee8 --- /dev/null +++ b/enet server test/enet2/include/enet/enet.h @@ -0,0 +1,592 @@ +/** + @file enet.h + @brief ENet public header file +*/ +#ifndef __ENET_ENET_H__ +#define __ENET_ENET_H__ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include + +#ifdef _WIN32 +#include "enet/win32.h" +#else +#include "enet/unix.h" +#endif + +#include "enet/types.h" +#include "enet/protocol.h" +#include "enet/list.h" +#include "enet/callbacks.h" + +#define ENET_VERSION_MAJOR 1 +#define ENET_VERSION_MINOR 3 +#define ENET_VERSION_PATCH 13 +#define ENET_VERSION_CREATE(major, minor, patch) (((major)<<16) | ((minor)<<8) | (patch)) +#define ENET_VERSION_GET_MAJOR(version) (((version)>>16)&0xFF) +#define ENET_VERSION_GET_MINOR(version) (((version)>>8)&0xFF) +#define ENET_VERSION_GET_PATCH(version) ((version)&0xFF) +#define ENET_VERSION ENET_VERSION_CREATE(ENET_VERSION_MAJOR, ENET_VERSION_MINOR, ENET_VERSION_PATCH) + +typedef enet_uint32 ENetVersion; + +struct _ENetHost; +struct _ENetEvent; +struct _ENetPacket; + +typedef enum _ENetSocketType +{ + ENET_SOCKET_TYPE_STREAM = 1, + ENET_SOCKET_TYPE_DATAGRAM = 2 +} ENetSocketType; + +typedef enum _ENetSocketWait +{ + ENET_SOCKET_WAIT_NONE = 0, + ENET_SOCKET_WAIT_SEND = (1 << 0), + ENET_SOCKET_WAIT_RECEIVE = (1 << 1), + ENET_SOCKET_WAIT_INTERRUPT = (1 << 2) +} ENetSocketWait; + +typedef enum _ENetSocketOption +{ + ENET_SOCKOPT_NONBLOCK = 1, + ENET_SOCKOPT_BROADCAST = 2, + ENET_SOCKOPT_RCVBUF = 3, + ENET_SOCKOPT_SNDBUF = 4, + ENET_SOCKOPT_REUSEADDR = 5, + ENET_SOCKOPT_RCVTIMEO = 6, + ENET_SOCKOPT_SNDTIMEO = 7, + ENET_SOCKOPT_ERROR = 8, + ENET_SOCKOPT_NODELAY = 9 +} ENetSocketOption; + +typedef enum _ENetSocketShutdown +{ + ENET_SOCKET_SHUTDOWN_READ = 0, + ENET_SOCKET_SHUTDOWN_WRITE = 1, + ENET_SOCKET_SHUTDOWN_READ_WRITE = 2 +} ENetSocketShutdown; + +#define ENET_HOST_ANY 0 +#define ENET_HOST_BROADCAST 0xFFFFFFFFU +#define ENET_PORT_ANY 0 + +/** + * Portable internet address structure. + * + * The host must be specified in network byte-order, and the port must be in host + * byte-order. The constant ENET_HOST_ANY may be used to specify the default + * server host. The constant ENET_HOST_BROADCAST may be used to specify the + * broadcast address (255.255.255.255). This makes sense for enet_host_connect, + * but not for enet_host_create. Once a server responds to a broadcast, the + * address is updated from ENET_HOST_BROADCAST to the server's actual IP address. + */ +typedef struct _ENetAddress +{ + enet_uint32 host; + enet_uint16 port; +} ENetAddress; + +/** + * Packet flag bit constants. + * + * The host must be specified in network byte-order, and the port must be in + * host byte-order. The constant ENET_HOST_ANY may be used to specify the + * default server host. + + @sa ENetPacket +*/ +typedef enum _ENetPacketFlag +{ + /** packet must be received by the target peer and resend attempts should be + * made until the packet is delivered */ + ENET_PACKET_FLAG_RELIABLE = (1 << 0), + /** packet will not be sequenced with other packets + * not supported for reliable packets + */ + ENET_PACKET_FLAG_UNSEQUENCED = (1 << 1), + /** packet will not allocate data, and user must supply it instead */ + ENET_PACKET_FLAG_NO_ALLOCATE = (1 << 2), + /** packet will be fragmented using unreliable (instead of reliable) sends + * if it exceeds the MTU */ + ENET_PACKET_FLAG_UNRELIABLE_FRAGMENT = (1 << 3), + + /** whether the packet has been sent from all queues it has been entered into */ + ENET_PACKET_FLAG_SENT = (1<<8) +} ENetPacketFlag; + +typedef void (ENET_CALLBACK * ENetPacketFreeCallback) (struct _ENetPacket *); + +/** + * ENet packet structure. + * + * An ENet data packet that may be sent to or received from a peer. The shown + * fields should only be read and never modified. The data field contains the + * allocated data for the packet. The dataLength fields specifies the length + * of the allocated data. The flags field is either 0 (specifying no flags), + * or a bitwise-or of any combination of the following flags: + * + * ENET_PACKET_FLAG_RELIABLE - packet must be received by the target peer + * and resend attempts should be made until the packet is delivered + * + * ENET_PACKET_FLAG_UNSEQUENCED - packet will not be sequenced with other packets + * (not supported for reliable packets) + * + * ENET_PACKET_FLAG_NO_ALLOCATE - packet will not allocate data, and user must supply it instead + + @sa ENetPacketFlag + */ +typedef struct _ENetPacket +{ + size_t referenceCount; /**< internal use only */ + enet_uint32 flags; /**< bitwise-or of ENetPacketFlag constants */ + enet_uint8 * data; /**< allocated data for packet */ + size_t dataLength; /**< length of data */ + ENetPacketFreeCallback freeCallback; /**< function to be called when the packet is no longer in use */ + void * userData; /**< application private data, may be freely modified */ +} ENetPacket; + +typedef struct _ENetAcknowledgement +{ + ENetListNode acknowledgementList; + enet_uint32 sentTime; + ENetProtocol command; +} ENetAcknowledgement; + +typedef struct _ENetOutgoingCommand +{ + ENetListNode outgoingCommandList; + enet_uint16 reliableSequenceNumber; + enet_uint16 unreliableSequenceNumber; + enet_uint32 sentTime; + enet_uint32 roundTripTimeout; + enet_uint32 roundTripTimeoutLimit; + enet_uint32 fragmentOffset; + enet_uint16 fragmentLength; + enet_uint16 sendAttempts; + ENetProtocol command; + ENetPacket * packet; +} ENetOutgoingCommand; + +typedef struct _ENetIncomingCommand +{ + ENetListNode incomingCommandList; + enet_uint16 reliableSequenceNumber; + enet_uint16 unreliableSequenceNumber; + ENetProtocol command; + enet_uint32 fragmentCount; + enet_uint32 fragmentsRemaining; + enet_uint32 * fragments; + ENetPacket * packet; +} ENetIncomingCommand; + +typedef enum _ENetPeerState +{ + ENET_PEER_STATE_DISCONNECTED = 0, + ENET_PEER_STATE_CONNECTING = 1, + ENET_PEER_STATE_ACKNOWLEDGING_CONNECT = 2, + ENET_PEER_STATE_CONNECTION_PENDING = 3, + ENET_PEER_STATE_CONNECTION_SUCCEEDED = 4, + ENET_PEER_STATE_CONNECTED = 5, + ENET_PEER_STATE_DISCONNECT_LATER = 6, + ENET_PEER_STATE_DISCONNECTING = 7, + ENET_PEER_STATE_ACKNOWLEDGING_DISCONNECT = 8, + ENET_PEER_STATE_ZOMBIE = 9 +} ENetPeerState; + +#ifndef ENET_BUFFER_MAXIMUM +#define ENET_BUFFER_MAXIMUM (1 + 2 * ENET_PROTOCOL_MAXIMUM_PACKET_COMMANDS) +#endif + +enum +{ + ENET_HOST_RECEIVE_BUFFER_SIZE = 256 * 1024, + ENET_HOST_SEND_BUFFER_SIZE = 256 * 1024, + ENET_HOST_BANDWIDTH_THROTTLE_INTERVAL = 1000, + ENET_HOST_DEFAULT_MTU = 1400, + ENET_HOST_DEFAULT_MAXIMUM_PACKET_SIZE = 32 * 1024 * 1024, + ENET_HOST_DEFAULT_MAXIMUM_WAITING_DATA = 32 * 1024 * 1024, + + ENET_PEER_DEFAULT_ROUND_TRIP_TIME = 500, + ENET_PEER_DEFAULT_PACKET_THROTTLE = 32, + ENET_PEER_PACKET_THROTTLE_SCALE = 32, + ENET_PEER_PACKET_THROTTLE_COUNTER = 7, + ENET_PEER_PACKET_THROTTLE_ACCELERATION = 2, + ENET_PEER_PACKET_THROTTLE_DECELERATION = 2, + ENET_PEER_PACKET_THROTTLE_INTERVAL = 5000, + ENET_PEER_PACKET_LOSS_SCALE = (1 << 16), + ENET_PEER_PACKET_LOSS_INTERVAL = 10000, + ENET_PEER_WINDOW_SIZE_SCALE = 64 * 1024, + ENET_PEER_TIMEOUT_LIMIT = 32, + ENET_PEER_TIMEOUT_MINIMUM = 5000, + ENET_PEER_TIMEOUT_MAXIMUM = 30000, + ENET_PEER_PING_INTERVAL = 500, + ENET_PEER_UNSEQUENCED_WINDOWS = 64, + ENET_PEER_UNSEQUENCED_WINDOW_SIZE = 1024, + ENET_PEER_FREE_UNSEQUENCED_WINDOWS = 32, + ENET_PEER_RELIABLE_WINDOWS = 16, + ENET_PEER_RELIABLE_WINDOW_SIZE = 0x1000, + ENET_PEER_FREE_RELIABLE_WINDOWS = 8 +}; + +typedef struct _ENetChannel +{ + enet_uint16 outgoingReliableSequenceNumber; + enet_uint16 outgoingUnreliableSequenceNumber; + enet_uint16 usedReliableWindows; + enet_uint16 reliableWindows [ENET_PEER_RELIABLE_WINDOWS]; + enet_uint16 incomingReliableSequenceNumber; + enet_uint16 incomingUnreliableSequenceNumber; + ENetList incomingReliableCommands; + ENetList incomingUnreliableCommands; +} ENetChannel; + +/** + * An ENet peer which data packets may be sent or received from. + * + * No fields should be modified unless otherwise specified. + */ +typedef struct _ENetPeer +{ + ENetListNode dispatchList; + struct _ENetHost * host; + enet_uint16 outgoingPeerID; + enet_uint16 incomingPeerID; + enet_uint32 connectID; + enet_uint8 outgoingSessionID; + enet_uint8 incomingSessionID; + ENetAddress address; /**< Internet address of the peer */ + void * data; /**< Application private data, may be freely modified */ + ENetPeerState state; + ENetChannel * channels; + size_t channelCount; /**< Number of channels allocated for communication with peer */ + enet_uint32 incomingBandwidth; /**< Downstream bandwidth of the client in bytes/second */ + enet_uint32 outgoingBandwidth; /**< Upstream bandwidth of the client in bytes/second */ + enet_uint32 incomingBandwidthThrottleEpoch; + enet_uint32 outgoingBandwidthThrottleEpoch; + enet_uint32 incomingDataTotal; + enet_uint32 outgoingDataTotal; + enet_uint32 lastSendTime; + enet_uint32 lastReceiveTime; + enet_uint32 nextTimeout; + enet_uint32 earliestTimeout; + enet_uint32 packetLossEpoch; + enet_uint32 packetsSent; + enet_uint32 packetsLost; + enet_uint32 packetLoss; /**< mean packet loss of reliable packets as a ratio with respect to the constant ENET_PEER_PACKET_LOSS_SCALE */ + enet_uint32 packetLossVariance; + enet_uint32 packetThrottle; + enet_uint32 packetThrottleLimit; + enet_uint32 packetThrottleCounter; + enet_uint32 packetThrottleEpoch; + enet_uint32 packetThrottleAcceleration; + enet_uint32 packetThrottleDeceleration; + enet_uint32 packetThrottleInterval; + enet_uint32 pingInterval; + enet_uint32 timeoutLimit; + enet_uint32 timeoutMinimum; + enet_uint32 timeoutMaximum; + enet_uint32 lastRoundTripTime; + enet_uint32 lowestRoundTripTime; + enet_uint32 lastRoundTripTimeVariance; + enet_uint32 highestRoundTripTimeVariance; + enet_uint32 roundTripTime; /**< mean round trip time (RTT), in milliseconds, between sending a reliable packet and receiving its acknowledgement */ + enet_uint32 roundTripTimeVariance; + enet_uint32 mtu; + enet_uint32 windowSize; + enet_uint32 reliableDataInTransit; + enet_uint16 outgoingReliableSequenceNumber; + ENetList acknowledgements; + ENetList sentReliableCommands; + ENetList sentUnreliableCommands; + ENetList outgoingReliableCommands; + ENetList outgoingUnreliableCommands; + ENetList dispatchedCommands; + int needsDispatch; + enet_uint16 incomingUnsequencedGroup; + enet_uint16 outgoingUnsequencedGroup; + enet_uint32 unsequencedWindow [ENET_PEER_UNSEQUENCED_WINDOW_SIZE / 32]; + enet_uint32 eventData; + size_t totalWaitingData; +} ENetPeer; + +/** An ENet packet compressor for compressing UDP packets before socket sends or receives. + */ +typedef struct _ENetCompressor +{ + /** Context data for the compressor. Must be non-NULL. */ + void * context; + /** Compresses from inBuffers[0:inBufferCount-1], containing inLimit bytes, to outData, outputting at most outLimit bytes. Should return 0 on failure. */ + size_t (ENET_CALLBACK * compress) (void * context, const ENetBuffer * inBuffers, size_t inBufferCount, size_t inLimit, enet_uint8 * outData, size_t outLimit); + /** Decompresses from inData, containing inLimit bytes, to outData, outputting at most outLimit bytes. Should return 0 on failure. */ + size_t (ENET_CALLBACK * decompress) (void * context, const enet_uint8 * inData, size_t inLimit, enet_uint8 * outData, size_t outLimit); + /** Destroys the context when compression is disabled or the host is destroyed. May be NULL. */ + void (ENET_CALLBACK * destroy) (void * context); +} ENetCompressor; + +/** Callback that computes the checksum of the data held in buffers[0:bufferCount-1] */ +typedef enet_uint32 (ENET_CALLBACK * ENetChecksumCallback) (const ENetBuffer * buffers, size_t bufferCount); + +/** Callback for intercepting received raw UDP packets. Should return 1 to intercept, 0 to ignore, or -1 to propagate an error. */ +typedef int (ENET_CALLBACK * ENetInterceptCallback) (struct _ENetHost * host, struct _ENetEvent * event); + +/** An ENet host for communicating with peers. + * + * No fields should be modified unless otherwise stated. + + @sa enet_host_create() + @sa enet_host_destroy() + @sa enet_host_connect() + @sa enet_host_service() + @sa enet_host_flush() + @sa enet_host_broadcast() + @sa enet_host_compress() + @sa enet_host_compress_with_range_coder() + @sa enet_host_channel_limit() + @sa enet_host_bandwidth_limit() + @sa enet_host_bandwidth_throttle() + */ +typedef struct _ENetHost +{ + ENetSocket socket; + ENetAddress address; /**< Internet address of the host */ + enet_uint32 incomingBandwidth; /**< downstream bandwidth of the host */ + enet_uint32 outgoingBandwidth; /**< upstream bandwidth of the host */ + enet_uint32 bandwidthThrottleEpoch; + enet_uint32 mtu; + enet_uint32 randomSeed; + int recalculateBandwidthLimits; + ENetPeer * peers; /**< array of peers allocated for this host */ + size_t peerCount; /**< number of peers allocated for this host */ + size_t channelLimit; /**< maximum number of channels allowed for connected peers */ + enet_uint32 serviceTime; + ENetList dispatchQueue; + int continueSending; + size_t packetSize; + enet_uint16 headerFlags; + ENetProtocol commands [ENET_PROTOCOL_MAXIMUM_PACKET_COMMANDS]; + size_t commandCount; + ENetBuffer buffers [ENET_BUFFER_MAXIMUM]; + size_t bufferCount; + ENetChecksumCallback checksum; /**< callback the user can set to enable packet checksums for this host */ + ENetCompressor compressor; + enet_uint8 packetData [2][ENET_PROTOCOL_MAXIMUM_MTU]; + ENetAddress receivedAddress; + enet_uint8 * receivedData; + size_t receivedDataLength; + enet_uint32 totalSentData; /**< total data sent, user should reset to 0 as needed to prevent overflow */ + enet_uint32 totalSentPackets; /**< total UDP packets sent, user should reset to 0 as needed to prevent overflow */ + enet_uint32 totalReceivedData; /**< total data received, user should reset to 0 as needed to prevent overflow */ + enet_uint32 totalReceivedPackets; /**< total UDP packets received, user should reset to 0 as needed to prevent overflow */ + ENetInterceptCallback intercept; /**< callback the user can set to intercept received raw UDP packets */ + size_t connectedPeers; + size_t bandwidthLimitedPeers; + size_t duplicatePeers; /**< optional number of allowed peers from duplicate IPs, defaults to ENET_PROTOCOL_MAXIMUM_PEER_ID */ + size_t maximumPacketSize; /**< the maximum allowable packet size that may be sent or received on a peer */ + size_t maximumWaitingData; /**< the maximum aggregate amount of buffer space a peer may use waiting for packets to be delivered */ +} ENetHost; + +/** + * An ENet event type, as specified in @ref ENetEvent. + */ +typedef enum _ENetEventType +{ + /** no event occurred within the specified time limit */ + ENET_EVENT_TYPE_NONE = 0, + + /** a connection request initiated by enet_host_connect has completed. + * The peer field contains the peer which successfully connected. + */ + ENET_EVENT_TYPE_CONNECT = 1, + + /** a peer has disconnected. This event is generated on a successful + * completion of a disconnect initiated by enet_pper_disconnect, if + * a peer has timed out, or if a connection request intialized by + * enet_host_connect has timed out. The peer field contains the peer + * which disconnected. The data field contains user supplied data + * describing the disconnection, or 0, if none is available. + */ + ENET_EVENT_TYPE_DISCONNECT = 2, + + /** a packet has been received from a peer. The peer field specifies the + * peer which sent the packet. The channelID field specifies the channel + * number upon which the packet was received. The packet field contains + * the packet that was received; this packet must be destroyed with + * enet_packet_destroy after use. + */ + ENET_EVENT_TYPE_RECEIVE = 3 +} ENetEventType; + +/** + * An ENet event as returned by enet_host_service(). + + @sa enet_host_service + */ +typedef struct _ENetEvent +{ + ENetEventType type; /**< type of the event */ + ENetPeer * peer; /**< peer that generated a connect, disconnect or receive event */ + enet_uint8 channelID; /**< channel on the peer that generated the event, if appropriate */ + enet_uint32 data; /**< data associated with the event, if appropriate */ + ENetPacket * packet; /**< packet associated with the event, if appropriate */ +} ENetEvent; + +/** @defgroup global ENet global functions + @{ +*/ + +/** + Initializes ENet globally. Must be called prior to using any functions in + ENet. + @returns 0 on success, < 0 on failure +*/ +ENET_API int enet_initialize (void); + +/** + Initializes ENet globally and supplies user-overridden callbacks. Must be called prior to using any functions in ENet. Do not use enet_initialize() if you use this variant. Make sure the ENetCallbacks structure is zeroed out so that any additional callbacks added in future versions will be properly ignored. + + @param version the constant ENET_VERSION should be supplied so ENet knows which version of ENetCallbacks struct to use + @param inits user-overridden callbacks where any NULL callbacks will use ENet's defaults + @returns 0 on success, < 0 on failure +*/ +ENET_API int enet_initialize_with_callbacks (ENetVersion version, const ENetCallbacks * inits); + +/** + Shuts down ENet globally. Should be called when a program that has + initialized ENet exits. +*/ +ENET_API void enet_deinitialize (void); + +/** + Gives the linked version of the ENet library. + @returns the version number +*/ +ENET_API ENetVersion enet_linked_version (void); + +/** @} */ + +/** @defgroup private ENet private implementation functions */ + +/** + Returns the wall-time in milliseconds. Its initial value is unspecified + unless otherwise set. + */ +ENET_API enet_uint32 enet_time_get (void); +/** + Sets the current wall-time in milliseconds. + */ +ENET_API void enet_time_set (enet_uint32); + +/** @defgroup socket ENet socket functions + @{ +*/ +ENET_API ENetSocket enet_socket_create (ENetSocketType); +ENET_API int enet_socket_bind (ENetSocket, const ENetAddress *); +ENET_API int enet_socket_get_address (ENetSocket, ENetAddress *); +ENET_API int enet_socket_listen (ENetSocket, int); +ENET_API ENetSocket enet_socket_accept (ENetSocket, ENetAddress *); +ENET_API int enet_socket_connect (ENetSocket, const ENetAddress *); +ENET_API int enet_socket_send (ENetSocket, const ENetAddress *, const ENetBuffer *, size_t); +ENET_API int enet_socket_receive (ENetSocket, ENetAddress *, ENetBuffer *, size_t); +ENET_API int enet_socket_wait (ENetSocket, enet_uint32 *, enet_uint32); +ENET_API int enet_socket_set_option (ENetSocket, ENetSocketOption, int); +ENET_API int enet_socket_get_option (ENetSocket, ENetSocketOption, int *); +ENET_API int enet_socket_shutdown (ENetSocket, ENetSocketShutdown); +ENET_API void enet_socket_destroy (ENetSocket); +ENET_API int enet_socketset_select (ENetSocket, ENetSocketSet *, ENetSocketSet *, enet_uint32); + +/** @} */ + +/** @defgroup Address ENet address functions + @{ +*/ +/** Attempts to resolve the host named by the parameter hostName and sets + the host field in the address parameter if successful. + @param address destination to store resolved address + @param hostName host name to lookup + @retval 0 on success + @retval < 0 on failure + @returns the address of the given hostName in address on success +*/ +ENET_API int enet_address_set_host (ENetAddress * address, const char * hostName); + +/** Gives the printable form of the IP address specified in the address parameter. + @param address address printed + @param hostName destination for name, must not be NULL + @param nameLength maximum length of hostName. + @returns the null-terminated name of the host in hostName on success + @retval 0 on success + @retval < 0 on failure +*/ +ENET_API int enet_address_get_host_ip (const ENetAddress * address, char * hostName, size_t nameLength); + +/** Attempts to do a reverse lookup of the host field in the address parameter. + @param address address used for reverse lookup + @param hostName destination for name, must not be NULL + @param nameLength maximum length of hostName. + @returns the null-terminated name of the host in hostName on success + @retval 0 on success + @retval < 0 on failure +*/ +ENET_API int enet_address_get_host (const ENetAddress * address, char * hostName, size_t nameLength); + +/** @} */ + +ENET_API ENetPacket * enet_packet_create (const void *, size_t, enet_uint32); +ENET_API void enet_packet_destroy (ENetPacket *); +ENET_API int enet_packet_resize (ENetPacket *, size_t); +ENET_API enet_uint32 enet_crc32 (const ENetBuffer *, size_t); + +ENET_API ENetHost * enet_host_create (const ENetAddress *, size_t, size_t, enet_uint32, enet_uint32); +ENET_API void enet_host_destroy (ENetHost *); +ENET_API ENetPeer * enet_host_connect (ENetHost *, const ENetAddress *, size_t, enet_uint32); +ENET_API int enet_host_check_events (ENetHost *, ENetEvent *); +ENET_API int enet_host_service (ENetHost *, ENetEvent *, enet_uint32); +ENET_API void enet_host_flush (ENetHost *); +ENET_API void enet_host_broadcast (ENetHost *, enet_uint8, ENetPacket *); +ENET_API void enet_host_compress (ENetHost *, const ENetCompressor *); +ENET_API int enet_host_compress_with_range_coder (ENetHost * host); +ENET_API void enet_host_channel_limit (ENetHost *, size_t); +ENET_API void enet_host_bandwidth_limit (ENetHost *, enet_uint32, enet_uint32); +extern void enet_host_bandwidth_throttle (ENetHost *); +extern enet_uint32 enet_host_random_seed (void); + +ENET_API int enet_peer_send (ENetPeer *, enet_uint8, ENetPacket *); +ENET_API ENetPacket * enet_peer_receive (ENetPeer *, enet_uint8 * channelID); +ENET_API void enet_peer_ping (ENetPeer *); +ENET_API void enet_peer_ping_interval (ENetPeer *, enet_uint32); +ENET_API void enet_peer_timeout (ENetPeer *, enet_uint32, enet_uint32, enet_uint32); +ENET_API void enet_peer_reset (ENetPeer *); +ENET_API void enet_peer_disconnect (ENetPeer *, enet_uint32); +ENET_API void enet_peer_disconnect_now (ENetPeer *, enet_uint32); +ENET_API void enet_peer_disconnect_later (ENetPeer *, enet_uint32); +ENET_API void enet_peer_throttle_configure (ENetPeer *, enet_uint32, enet_uint32, enet_uint32); +extern int enet_peer_throttle (ENetPeer *, enet_uint32); +extern void enet_peer_reset_queues (ENetPeer *); +extern void enet_peer_setup_outgoing_command (ENetPeer *, ENetOutgoingCommand *); +extern ENetOutgoingCommand * enet_peer_queue_outgoing_command (ENetPeer *, const ENetProtocol *, ENetPacket *, enet_uint32, enet_uint16); +extern ENetIncomingCommand * enet_peer_queue_incoming_command (ENetPeer *, const ENetProtocol *, const void *, size_t, enet_uint32, enet_uint32); +extern ENetAcknowledgement * enet_peer_queue_acknowledgement (ENetPeer *, const ENetProtocol *, enet_uint16); +extern void enet_peer_dispatch_incoming_unreliable_commands (ENetPeer *, ENetChannel *); +extern void enet_peer_dispatch_incoming_reliable_commands (ENetPeer *, ENetChannel *); +extern void enet_peer_on_connect (ENetPeer *); +extern void enet_peer_on_disconnect (ENetPeer *); + +ENET_API void * enet_range_coder_create (void); +ENET_API void enet_range_coder_destroy (void *); +ENET_API size_t enet_range_coder_compress (void *, const ENetBuffer *, size_t, size_t, enet_uint8 *, size_t); +ENET_API size_t enet_range_coder_decompress (void *, const enet_uint8 *, size_t, enet_uint8 *, size_t); + +extern size_t enet_protocol_command_size (enet_uint8); + +#ifdef __cplusplus +} +#endif + +#endif /* __ENET_ENET_H__ */ + diff --git a/enet server test/enet2/include/enet/list.h b/enet server test/enet2/include/enet/list.h new file mode 100644 index 0000000..d7b2600 --- /dev/null +++ b/enet server test/enet2/include/enet/list.h @@ -0,0 +1,43 @@ +/** + @file list.h + @brief ENet list management +*/ +#ifndef __ENET_LIST_H__ +#define __ENET_LIST_H__ + +#include + +typedef struct _ENetListNode +{ + struct _ENetListNode * next; + struct _ENetListNode * previous; +} ENetListNode; + +typedef ENetListNode * ENetListIterator; + +typedef struct _ENetList +{ + ENetListNode sentinel; +} ENetList; + +extern void enet_list_clear (ENetList *); + +extern ENetListIterator enet_list_insert (ENetListIterator, void *); +extern void * enet_list_remove (ENetListIterator); +extern ENetListIterator enet_list_move (ENetListIterator, void *, void *); + +extern size_t enet_list_size (ENetList *); + +#define enet_list_begin(list) ((list) -> sentinel.next) +#define enet_list_end(list) (& (list) -> sentinel) + +#define enet_list_empty(list) (enet_list_begin (list) == enet_list_end (list)) + +#define enet_list_next(iterator) ((iterator) -> next) +#define enet_list_previous(iterator) ((iterator) -> previous) + +#define enet_list_front(list) ((void *) (list) -> sentinel.next) +#define enet_list_back(list) ((void *) (list) -> sentinel.previous) + +#endif /* __ENET_LIST_H__ */ + diff --git a/enet server test/enet2/include/enet/protocol.h b/enet server test/enet2/include/enet/protocol.h new file mode 100644 index 0000000..f8c73d8 --- /dev/null +++ b/enet server test/enet2/include/enet/protocol.h @@ -0,0 +1,198 @@ +/** + @file protocol.h + @brief ENet protocol +*/ +#ifndef __ENET_PROTOCOL_H__ +#define __ENET_PROTOCOL_H__ + +#include "enet/types.h" + +enum +{ + ENET_PROTOCOL_MINIMUM_MTU = 576, + ENET_PROTOCOL_MAXIMUM_MTU = 4096, + ENET_PROTOCOL_MAXIMUM_PACKET_COMMANDS = 32, + ENET_PROTOCOL_MINIMUM_WINDOW_SIZE = 4096, + ENET_PROTOCOL_MAXIMUM_WINDOW_SIZE = 65536, + ENET_PROTOCOL_MINIMUM_CHANNEL_COUNT = 1, + ENET_PROTOCOL_MAXIMUM_CHANNEL_COUNT = 255, + ENET_PROTOCOL_MAXIMUM_PEER_ID = 0xFFF, + ENET_PROTOCOL_MAXIMUM_FRAGMENT_COUNT = 1024 * 1024 +}; + +typedef enum _ENetProtocolCommand +{ + ENET_PROTOCOL_COMMAND_NONE = 0, + ENET_PROTOCOL_COMMAND_ACKNOWLEDGE = 1, + ENET_PROTOCOL_COMMAND_CONNECT = 2, + ENET_PROTOCOL_COMMAND_VERIFY_CONNECT = 3, + ENET_PROTOCOL_COMMAND_DISCONNECT = 4, + ENET_PROTOCOL_COMMAND_PING = 5, + ENET_PROTOCOL_COMMAND_SEND_RELIABLE = 6, + ENET_PROTOCOL_COMMAND_SEND_UNRELIABLE = 7, + ENET_PROTOCOL_COMMAND_SEND_FRAGMENT = 8, + ENET_PROTOCOL_COMMAND_SEND_UNSEQUENCED = 9, + ENET_PROTOCOL_COMMAND_BANDWIDTH_LIMIT = 10, + ENET_PROTOCOL_COMMAND_THROTTLE_CONFIGURE = 11, + ENET_PROTOCOL_COMMAND_SEND_UNRELIABLE_FRAGMENT = 12, + ENET_PROTOCOL_COMMAND_COUNT = 13, + + ENET_PROTOCOL_COMMAND_MASK = 0x0F +} ENetProtocolCommand; + +typedef enum _ENetProtocolFlag +{ + ENET_PROTOCOL_COMMAND_FLAG_ACKNOWLEDGE = (1 << 7), + ENET_PROTOCOL_COMMAND_FLAG_UNSEQUENCED = (1 << 6), + + ENET_PROTOCOL_HEADER_FLAG_COMPRESSED = (1 << 14), + ENET_PROTOCOL_HEADER_FLAG_SENT_TIME = (1 << 15), + ENET_PROTOCOL_HEADER_FLAG_MASK = ENET_PROTOCOL_HEADER_FLAG_COMPRESSED | ENET_PROTOCOL_HEADER_FLAG_SENT_TIME, + + ENET_PROTOCOL_HEADER_SESSION_MASK = (3 << 12), + ENET_PROTOCOL_HEADER_SESSION_SHIFT = 12 +} ENetProtocolFlag; + +#ifdef _MSC_VER +#pragma pack(push, 1) +#define ENET_PACKED +#elif defined(__GNUC__) || defined(__clang__) +#define ENET_PACKED __attribute__ ((packed)) +#else +#define ENET_PACKED +#endif + +typedef struct _ENetProtocolHeader +{ + enet_uint16 peerID; + enet_uint16 sentTime; +} ENET_PACKED ENetProtocolHeader; + +typedef struct _ENetProtocolCommandHeader +{ + enet_uint8 command; + enet_uint8 channelID; + enet_uint16 reliableSequenceNumber; +} ENET_PACKED ENetProtocolCommandHeader; + +typedef struct _ENetProtocolAcknowledge +{ + ENetProtocolCommandHeader header; + enet_uint16 receivedReliableSequenceNumber; + enet_uint16 receivedSentTime; +} ENET_PACKED ENetProtocolAcknowledge; + +typedef struct _ENetProtocolConnect +{ + ENetProtocolCommandHeader header; + enet_uint16 outgoingPeerID; + enet_uint8 incomingSessionID; + enet_uint8 outgoingSessionID; + enet_uint32 mtu; + enet_uint32 windowSize; + enet_uint32 channelCount; + enet_uint32 incomingBandwidth; + enet_uint32 outgoingBandwidth; + enet_uint32 packetThrottleInterval; + enet_uint32 packetThrottleAcceleration; + enet_uint32 packetThrottleDeceleration; + enet_uint32 connectID; + enet_uint32 data; +} ENET_PACKED ENetProtocolConnect; + +typedef struct _ENetProtocolVerifyConnect +{ + ENetProtocolCommandHeader header; + enet_uint16 outgoingPeerID; + enet_uint8 incomingSessionID; + enet_uint8 outgoingSessionID; + enet_uint32 mtu; + enet_uint32 windowSize; + enet_uint32 channelCount; + enet_uint32 incomingBandwidth; + enet_uint32 outgoingBandwidth; + enet_uint32 packetThrottleInterval; + enet_uint32 packetThrottleAcceleration; + enet_uint32 packetThrottleDeceleration; + enet_uint32 connectID; +} ENET_PACKED ENetProtocolVerifyConnect; + +typedef struct _ENetProtocolBandwidthLimit +{ + ENetProtocolCommandHeader header; + enet_uint32 incomingBandwidth; + enet_uint32 outgoingBandwidth; +} ENET_PACKED ENetProtocolBandwidthLimit; + +typedef struct _ENetProtocolThrottleConfigure +{ + ENetProtocolCommandHeader header; + enet_uint32 packetThrottleInterval; + enet_uint32 packetThrottleAcceleration; + enet_uint32 packetThrottleDeceleration; +} ENET_PACKED ENetProtocolThrottleConfigure; + +typedef struct _ENetProtocolDisconnect +{ + ENetProtocolCommandHeader header; + enet_uint32 data; +} ENET_PACKED ENetProtocolDisconnect; + +typedef struct _ENetProtocolPing +{ + ENetProtocolCommandHeader header; +} ENET_PACKED ENetProtocolPing; + +typedef struct _ENetProtocolSendReliable +{ + ENetProtocolCommandHeader header; + enet_uint16 dataLength; +} ENET_PACKED ENetProtocolSendReliable; + +typedef struct _ENetProtocolSendUnreliable +{ + ENetProtocolCommandHeader header; + enet_uint16 unreliableSequenceNumber; + enet_uint16 dataLength; +} ENET_PACKED ENetProtocolSendUnreliable; + +typedef struct _ENetProtocolSendUnsequenced +{ + ENetProtocolCommandHeader header; + enet_uint16 unsequencedGroup; + enet_uint16 dataLength; +} ENET_PACKED ENetProtocolSendUnsequenced; + +typedef struct _ENetProtocolSendFragment +{ + ENetProtocolCommandHeader header; + enet_uint16 startSequenceNumber; + enet_uint16 dataLength; + enet_uint32 fragmentCount; + enet_uint32 fragmentNumber; + enet_uint32 totalLength; + enet_uint32 fragmentOffset; +} ENET_PACKED ENetProtocolSendFragment; + +typedef union _ENetProtocol +{ + ENetProtocolCommandHeader header; + ENetProtocolAcknowledge acknowledge; + ENetProtocolConnect connect; + ENetProtocolVerifyConnect verifyConnect; + ENetProtocolDisconnect disconnect; + ENetProtocolPing ping; + ENetProtocolSendReliable sendReliable; + ENetProtocolSendUnreliable sendUnreliable; + ENetProtocolSendUnsequenced sendUnsequenced; + ENetProtocolSendFragment sendFragment; + ENetProtocolBandwidthLimit bandwidthLimit; + ENetProtocolThrottleConfigure throttleConfigure; +} ENET_PACKED ENetProtocol; + +#ifdef _MSC_VER +#pragma pack(pop) +#endif + +#endif /* __ENET_PROTOCOL_H__ */ + diff --git a/enet server test/enet2/include/enet/time.h b/enet server test/enet2/include/enet/time.h new file mode 100644 index 0000000..c82a546 --- /dev/null +++ b/enet server test/enet2/include/enet/time.h @@ -0,0 +1,18 @@ +/** + @file time.h + @brief ENet time constants and macros +*/ +#ifndef __ENET_TIME_H__ +#define __ENET_TIME_H__ + +#define ENET_TIME_OVERFLOW 86400000 + +#define ENET_TIME_LESS(a, b) ((a) - (b) >= ENET_TIME_OVERFLOW) +#define ENET_TIME_GREATER(a, b) ((b) - (a) >= ENET_TIME_OVERFLOW) +#define ENET_TIME_LESS_EQUAL(a, b) (! ENET_TIME_GREATER (a, b)) +#define ENET_TIME_GREATER_EQUAL(a, b) (! ENET_TIME_LESS (a, b)) + +#define ENET_TIME_DIFFERENCE(a, b) ((a) - (b) >= ENET_TIME_OVERFLOW ? (b) - (a) : (a) - (b)) + +#endif /* __ENET_TIME_H__ */ + diff --git a/enet server test/enet2/include/enet/types.h b/enet server test/enet2/include/enet/types.h new file mode 100644 index 0000000..ab010a4 --- /dev/null +++ b/enet server test/enet2/include/enet/types.h @@ -0,0 +1,13 @@ +/** + @file types.h + @brief type definitions for ENet +*/ +#ifndef __ENET_TYPES_H__ +#define __ENET_TYPES_H__ + +typedef unsigned char enet_uint8; /**< unsigned 8-bit type */ +typedef unsigned short enet_uint16; /**< unsigned 16-bit type */ +typedef unsigned int enet_uint32; /**< unsigned 32-bit type */ + +#endif /* __ENET_TYPES_H__ */ + diff --git a/enet server test/enet2/include/enet/unix.h b/enet server test/enet2/include/enet/unix.h new file mode 100644 index 0000000..a59e340 --- /dev/null +++ b/enet server test/enet2/include/enet/unix.h @@ -0,0 +1,47 @@ +/** + @file unix.h + @brief ENet Unix header +*/ +#ifndef __ENET_UNIX_H__ +#define __ENET_UNIX_H__ + +#include +#include +#include +#include +#include +#include + +#ifdef MSG_MAXIOVLEN +#define ENET_BUFFER_MAXIMUM MSG_MAXIOVLEN +#endif + +typedef int ENetSocket; + +#define ENET_SOCKET_NULL -1 + +#define ENET_HOST_TO_NET_16(value) (htons (value)) /**< macro that converts host to net byte-order of a 16-bit value */ +#define ENET_HOST_TO_NET_32(value) (htonl (value)) /**< macro that converts host to net byte-order of a 32-bit value */ + +#define ENET_NET_TO_HOST_16(value) (ntohs (value)) /**< macro that converts net to host byte-order of a 16-bit value */ +#define ENET_NET_TO_HOST_32(value) (ntohl (value)) /**< macro that converts net to host byte-order of a 32-bit value */ + +typedef struct +{ + void * data; + size_t dataLength; +} ENetBuffer; + +#define ENET_CALLBACK + +#define ENET_API extern + +typedef fd_set ENetSocketSet; + +#define ENET_SOCKETSET_EMPTY(sockset) FD_ZERO (& (sockset)) +#define ENET_SOCKETSET_ADD(sockset, socket) FD_SET (socket, & (sockset)) +#define ENET_SOCKETSET_REMOVE(sockset, socket) FD_CLR (socket, & (sockset)) +#define ENET_SOCKETSET_CHECK(sockset, socket) FD_ISSET (socket, & (sockset)) + +#endif /* __ENET_UNIX_H__ */ + diff --git a/enet server test/enet2/include/enet/utility.h b/enet server test/enet2/include/enet/utility.h new file mode 100644 index 0000000..e48a476 --- /dev/null +++ b/enet server test/enet2/include/enet/utility.h @@ -0,0 +1,12 @@ +/** + @file utility.h + @brief ENet utility header +*/ +#ifndef __ENET_UTILITY_H__ +#define __ENET_UTILITY_H__ + +#define ENET_MAX(x, y) ((x) > (y) ? (x) : (y)) +#define ENET_MIN(x, y) ((x) < (y) ? (x) : (y)) + +#endif /* __ENET_UTILITY_H__ */ + diff --git a/enet server test/enet2/include/enet/win32.h b/enet server test/enet2/include/enet/win32.h new file mode 100644 index 0000000..e73ca9d --- /dev/null +++ b/enet server test/enet2/include/enet/win32.h @@ -0,0 +1,57 @@ +/** + @file win32.h + @brief ENet Win32 header +*/ +#ifndef __ENET_WIN32_H__ +#define __ENET_WIN32_H__ + +#ifdef _MSC_VER +#ifdef ENET_BUILDING_LIB +#pragma warning (disable: 4267) // size_t to int conversion +#pragma warning (disable: 4244) // 64bit to 32bit int +#pragma warning (disable: 4018) // signed/unsigned mismatch +#pragma warning (disable: 4146) // unary minus operator applied to unsigned type +#endif +#endif + +#include +#include + +typedef SOCKET ENetSocket; + +#define ENET_SOCKET_NULL INVALID_SOCKET + +#define ENET_HOST_TO_NET_16(value) (htons (value)) +#define ENET_HOST_TO_NET_32(value) (htonl (value)) + +#define ENET_NET_TO_HOST_16(value) (ntohs (value)) +#define ENET_NET_TO_HOST_32(value) (ntohl (value)) + +typedef struct +{ + size_t dataLength; + void * data; +} ENetBuffer; + +#define ENET_CALLBACK __cdecl + +#ifdef ENET_DLL +#ifdef ENET_BUILDING_LIB +#define ENET_API __declspec( dllexport ) +#else +#define ENET_API __declspec( dllimport ) +#endif /* ENET_BUILDING_LIB */ +#else /* !ENET_DLL */ +#define ENET_API extern +#endif /* ENET_DLL */ + +typedef fd_set ENetSocketSet; + +#define ENET_SOCKETSET_EMPTY(sockset) FD_ZERO (& (sockset)) +#define ENET_SOCKETSET_ADD(sockset, socket) FD_SET (socket, & (sockset)) +#define ENET_SOCKETSET_REMOVE(sockset, socket) FD_CLR (socket, & (sockset)) +#define ENET_SOCKETSET_CHECK(sockset, socket) FD_ISSET (socket, & (sockset)) + +#endif /* __ENET_WIN32_H__ */ + + diff --git a/enet server test/enet2/install-sh b/enet server test/enet2/install-sh new file mode 100644 index 0000000..377bb86 --- /dev/null +++ b/enet server test/enet2/install-sh @@ -0,0 +1,527 @@ +#!/bin/sh +# install - install a program, script, or datafile + +scriptversion=2011-11-20.07; # UTC + +# This originates from X11R5 (mit/util/scripts/install.sh), which was +# later released in X11R6 (xc/config/util/install.sh) with the +# following copyright and license. +# +# Copyright (C) 1994 X Consortium +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- +# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +# Except as contained in this notice, the name of the X Consortium shall not +# be used in advertising or otherwise to promote the sale, use or other deal- +# ings in this Software without prior written authorization from the X Consor- +# tium. +# +# +# FSF changes to this file are in the public domain. +# +# Calling this script install-sh is preferred over install.sh, to prevent +# 'make' implicit rules from creating a file called install from it +# when there is no Makefile. +# +# This script is compatible with the BSD install script, but was written +# from scratch. + +nl=' +' +IFS=" "" $nl" + +# set DOITPROG to echo to test this script + +# Don't use :- since 4.3BSD and earlier shells don't like it. +doit=${DOITPROG-} +if test -z "$doit"; then + doit_exec=exec +else + doit_exec=$doit +fi + +# Put in absolute file names if you don't have them in your path; +# or use environment vars. + +chgrpprog=${CHGRPPROG-chgrp} +chmodprog=${CHMODPROG-chmod} +chownprog=${CHOWNPROG-chown} +cmpprog=${CMPPROG-cmp} +cpprog=${CPPROG-cp} +mkdirprog=${MKDIRPROG-mkdir} +mvprog=${MVPROG-mv} +rmprog=${RMPROG-rm} +stripprog=${STRIPPROG-strip} + +posix_glob='?' +initialize_posix_glob=' + test "$posix_glob" != "?" || { + if (set -f) 2>/dev/null; then + posix_glob= + else + posix_glob=: + fi + } +' + +posix_mkdir= + +# Desired mode of installed file. +mode=0755 + +chgrpcmd= +chmodcmd=$chmodprog +chowncmd= +mvcmd=$mvprog +rmcmd="$rmprog -f" +stripcmd= + +src= +dst= +dir_arg= +dst_arg= + +copy_on_change=false +no_target_directory= + +usage="\ +Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE + or: $0 [OPTION]... SRCFILES... DIRECTORY + or: $0 [OPTION]... -t DIRECTORY SRCFILES... + or: $0 [OPTION]... -d DIRECTORIES... + +In the 1st form, copy SRCFILE to DSTFILE. +In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. +In the 4th, create DIRECTORIES. + +Options: + --help display this help and exit. + --version display version info and exit. + + -c (ignored) + -C install only if different (preserve the last data modification time) + -d create directories instead of installing files. + -g GROUP $chgrpprog installed files to GROUP. + -m MODE $chmodprog installed files to MODE. + -o USER $chownprog installed files to USER. + -s $stripprog installed files. + -t DIRECTORY install into DIRECTORY. + -T report an error if DSTFILE is a directory. + +Environment variables override the default commands: + CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG + RMPROG STRIPPROG +" + +while test $# -ne 0; do + case $1 in + -c) ;; + + -C) copy_on_change=true;; + + -d) dir_arg=true;; + + -g) chgrpcmd="$chgrpprog $2" + shift;; + + --help) echo "$usage"; exit $?;; + + -m) mode=$2 + case $mode in + *' '* | *' '* | *' +'* | *'*'* | *'?'* | *'['*) + echo "$0: invalid mode: $mode" >&2 + exit 1;; + esac + shift;; + + -o) chowncmd="$chownprog $2" + shift;; + + -s) stripcmd=$stripprog;; + + -t) dst_arg=$2 + # Protect names problematic for 'test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac + shift;; + + -T) no_target_directory=true;; + + --version) echo "$0 $scriptversion"; exit $?;; + + --) shift + break;; + + -*) echo "$0: invalid option: $1" >&2 + exit 1;; + + *) break;; + esac + shift +done + +if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then + # When -d is used, all remaining arguments are directories to create. + # When -t is used, the destination is already specified. + # Otherwise, the last argument is the destination. Remove it from $@. + for arg + do + if test -n "$dst_arg"; then + # $@ is not empty: it contains at least $arg. + set fnord "$@" "$dst_arg" + shift # fnord + fi + shift # arg + dst_arg=$arg + # Protect names problematic for 'test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac + done +fi + +if test $# -eq 0; then + if test -z "$dir_arg"; then + echo "$0: no input file specified." >&2 + exit 1 + fi + # It's OK to call 'install-sh -d' without argument. + # This can happen when creating conditional directories. + exit 0 +fi + +if test -z "$dir_arg"; then + do_exit='(exit $ret); exit $ret' + trap "ret=129; $do_exit" 1 + trap "ret=130; $do_exit" 2 + trap "ret=141; $do_exit" 13 + trap "ret=143; $do_exit" 15 + + # Set umask so as not to create temps with too-generous modes. + # However, 'strip' requires both read and write access to temps. + case $mode in + # Optimize common cases. + *644) cp_umask=133;; + *755) cp_umask=22;; + + *[0-7]) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw='% 200' + fi + cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; + *) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw=,u+rw + fi + cp_umask=$mode$u_plus_rw;; + esac +fi + +for src +do + # Protect names problematic for 'test' and other utilities. + case $src in + -* | [=\(\)!]) src=./$src;; + esac + + if test -n "$dir_arg"; then + dst=$src + dstdir=$dst + test -d "$dstdir" + dstdir_status=$? + else + + # Waiting for this to be detected by the "$cpprog $src $dsttmp" command + # might cause directories to be created, which would be especially bad + # if $src (and thus $dsttmp) contains '*'. + if test ! -f "$src" && test ! -d "$src"; then + echo "$0: $src does not exist." >&2 + exit 1 + fi + + if test -z "$dst_arg"; then + echo "$0: no destination specified." >&2 + exit 1 + fi + dst=$dst_arg + + # If destination is a directory, append the input filename; won't work + # if double slashes aren't ignored. + if test -d "$dst"; then + if test -n "$no_target_directory"; then + echo "$0: $dst_arg: Is a directory" >&2 + exit 1 + fi + dstdir=$dst + dst=$dstdir/`basename "$src"` + dstdir_status=0 + else + # Prefer dirname, but fall back on a substitute if dirname fails. + dstdir=` + (dirname "$dst") 2>/dev/null || + expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$dst" : 'X\(//\)[^/]' \| \ + X"$dst" : 'X\(//\)$' \| \ + X"$dst" : 'X\(/\)' \| . 2>/dev/null || + echo X"$dst" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q' + ` + + test -d "$dstdir" + dstdir_status=$? + fi + fi + + obsolete_mkdir_used=false + + if test $dstdir_status != 0; then + case $posix_mkdir in + '') + # Create intermediate dirs using mode 755 as modified by the umask. + # This is like FreeBSD 'install' as of 1997-10-28. + umask=`umask` + case $stripcmd.$umask in + # Optimize common cases. + *[2367][2367]) mkdir_umask=$umask;; + .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; + + *[0-7]) + mkdir_umask=`expr $umask + 22 \ + - $umask % 100 % 40 + $umask % 20 \ + - $umask % 10 % 4 + $umask % 2 + `;; + *) mkdir_umask=$umask,go-w;; + esac + + # With -d, create the new directory with the user-specified mode. + # Otherwise, rely on $mkdir_umask. + if test -n "$dir_arg"; then + mkdir_mode=-m$mode + else + mkdir_mode= + fi + + posix_mkdir=false + case $umask in + *[123567][0-7][0-7]) + # POSIX mkdir -p sets u+wx bits regardless of umask, which + # is incompatible with FreeBSD 'install' when (umask & 300) != 0. + ;; + *) + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 + + if (umask $mkdir_umask && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + ls_ld_tmpdir=`ls -ld "$tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/d" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null + fi + trap '' 0;; + esac;; + esac + + if + $posix_mkdir && ( + umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" + ) + then : + else + + # The umask is ridiculous, or mkdir does not conform to POSIX, + # or it failed possibly due to a race condition. Create the + # directory the slow way, step by step, checking for races as we go. + + case $dstdir in + /*) prefix='/';; + [-=\(\)!]*) prefix='./';; + *) prefix='';; + esac + + eval "$initialize_posix_glob" + + oIFS=$IFS + IFS=/ + $posix_glob set -f + set fnord $dstdir + shift + $posix_glob set +f + IFS=$oIFS + + prefixes= + + for d + do + test X"$d" = X && continue + + prefix=$prefix$d + if test -d "$prefix"; then + prefixes= + else + if $posix_mkdir; then + (umask=$mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break + # Don't fail if two instances are running concurrently. + test -d "$prefix" || exit 1 + else + case $prefix in + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; + *) qprefix=$prefix;; + esac + prefixes="$prefixes '$qprefix'" + fi + fi + prefix=$prefix/ + done + + if test -n "$prefixes"; then + # Don't fail if two instances are running concurrently. + (umask $mkdir_umask && + eval "\$doit_exec \$mkdirprog $prefixes") || + test -d "$dstdir" || exit 1 + obsolete_mkdir_used=true + fi + fi + fi + + if test -n "$dir_arg"; then + { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && + { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || + test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 + else + + # Make a couple of temp file names in the proper directory. + dsttmp=$dstdir/_inst.$$_ + rmtmp=$dstdir/_rm.$$_ + + # Trap to clean up those temp files at exit. + trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 + + # Copy the file name to the temp name. + (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && + + # and set any options; do chmod last to preserve setuid bits. + # + # If any of these fail, we abort the whole thing. If we want to + # ignore errors from any of these, just make sure not to ignore + # errors from the above "$doit $cpprog $src $dsttmp" command. + # + { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && + { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && + { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && + + # If -C, don't bother to copy if it wouldn't change the file. + if $copy_on_change && + old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && + new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && + + eval "$initialize_posix_glob" && + $posix_glob set -f && + set X $old && old=:$2:$4:$5:$6 && + set X $new && new=:$2:$4:$5:$6 && + $posix_glob set +f && + + test "$old" = "$new" && + $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 + then + rm -f "$dsttmp" + else + # Rename the file to the real destination. + $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || + + # The rename failed, perhaps because mv can't rename something else + # to itself, or perhaps because mv is so ancient that it does not + # support -f. + { + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + test ! -f "$dst" || + $doit $rmcmd -f "$dst" 2>/dev/null || + { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && + { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } + } || + { echo "$0: cannot unlink or rename $dst" >&2 + (exit 1); exit 1 + } + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" + } + fi || exit 1 + + trap '' 0 + fi +done + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/enet server test/enet2/libenet.pc.in b/enet server test/enet2/libenet.pc.in new file mode 100644 index 0000000..7af85ad --- /dev/null +++ b/enet server test/enet2/libenet.pc.in @@ -0,0 +1,10 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: @PACKAGE_NAME@ +Description: Low-latency UDP networking library supporting optional reliability +Version: @PACKAGE_VERSION@ +Cflags: -I${includedir} +Libs: -L${libdir} -lenet diff --git a/enet server test/enet2/list.c b/enet server test/enet2/list.c new file mode 100644 index 0000000..1c1a8df --- /dev/null +++ b/enet server test/enet2/list.c @@ -0,0 +1,75 @@ +/** + @file list.c + @brief ENet linked list functions +*/ +#define ENET_BUILDING_LIB 1 +#include "enet/enet.h" + +/** + @defgroup list ENet linked list utility functions + @ingroup private + @{ +*/ +void +enet_list_clear (ENetList * list) +{ + list -> sentinel.next = & list -> sentinel; + list -> sentinel.previous = & list -> sentinel; +} + +ENetListIterator +enet_list_insert (ENetListIterator position, void * data) +{ + ENetListIterator result = (ENetListIterator) data; + + result -> previous = position -> previous; + result -> next = position; + + result -> previous -> next = result; + position -> previous = result; + + return result; +} + +void * +enet_list_remove (ENetListIterator position) +{ + position -> previous -> next = position -> next; + position -> next -> previous = position -> previous; + + return position; +} + +ENetListIterator +enet_list_move (ENetListIterator position, void * dataFirst, void * dataLast) +{ + ENetListIterator first = (ENetListIterator) dataFirst, + last = (ENetListIterator) dataLast; + + first -> previous -> next = last -> next; + last -> next -> previous = first -> previous; + + first -> previous = position -> previous; + last -> next = position; + + first -> previous -> next = first; + position -> previous = last; + + return first; +} + +size_t +enet_list_size (ENetList * list) +{ + size_t size = 0; + ENetListIterator position; + + for (position = enet_list_begin (list); + position != enet_list_end (list); + position = enet_list_next (position)) + ++ size; + + return size; +} + +/** @} */ diff --git a/enet server test/enet2/ltmain.sh b/enet server test/enet2/ltmain.sh new file mode 100644 index 0000000..bffda54 --- /dev/null +++ b/enet server test/enet2/ltmain.sh @@ -0,0 +1,9661 @@ + +# libtool (GNU libtool) 2.4.2 +# Written by Gordon Matzigkeit , 1996 + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, +# 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. +# This is free software; see the source for copying conditions. There is NO +# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +# GNU Libtool is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# As a special exception to the GNU General Public License, +# if you distribute this file as part of a program or library that +# is built using GNU Libtool, you may include this file under the +# same distribution terms that you use for the rest of that program. +# +# GNU Libtool is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, +# or obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +# Usage: $progname [OPTION]... [MODE-ARG]... +# +# Provide generalized library-building support services. +# +# --config show all configuration variables +# --debug enable verbose shell tracing +# -n, --dry-run display commands without modifying any files +# --features display basic configuration information and exit +# --mode=MODE use operation mode MODE +# --preserve-dup-deps don't remove duplicate dependency libraries +# --quiet, --silent don't print informational messages +# --no-quiet, --no-silent +# print informational messages (default) +# --no-warn don't display warning messages +# --tag=TAG use configuration variables from tag TAG +# -v, --verbose print more informational messages than default +# --no-verbose don't print the extra informational messages +# --version print version information +# -h, --help, --help-all print short, long, or detailed help message +# +# MODE must be one of the following: +# +# clean remove files from the build directory +# compile compile a source file into a libtool object +# execute automatically set library path, then run a program +# finish complete the installation of libtool libraries +# install install libraries or executables +# link create a library or an executable +# uninstall remove libraries from an installed directory +# +# MODE-ARGS vary depending on the MODE. When passed as first option, +# `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that. +# Try `$progname --help --mode=MODE' for a more detailed description of MODE. +# +# When reporting a bug, please describe a test case to reproduce it and +# include the following information: +# +# host-triplet: $host +# shell: $SHELL +# compiler: $LTCC +# compiler flags: $LTCFLAGS +# linker: $LD (gnu? $with_gnu_ld) +# $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1.11 +# automake: $automake_version +# autoconf: $autoconf_version +# +# Report bugs to . +# GNU libtool home page: . +# General help using GNU software: . + +PROGRAM=libtool +PACKAGE=libtool +VERSION="2.4.2 Debian-2.4.2-1.11" +TIMESTAMP="" +package_revision=1.3337 + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +$1 +_LTECHO_EOF' +} + +# NLS nuisances: We save the old values to restore during execute mode. +lt_user_locale= +lt_safe_locale= +for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES +do + eval "if test \"\${$lt_var+set}\" = set; then + save_$lt_var=\$$lt_var + $lt_var=C + export $lt_var + lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" + lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" + fi" +done +LC_ALL=C +LANGUAGE=C +export LANGUAGE LC_ALL + +$lt_unset CDPATH + + +# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh +# is ksh but when the shell is invoked as "sh" and the current value of +# the _XPG environment variable is not equal to 1 (one), the special +# positional parameter $0, within a function call, is the name of the +# function. +progpath="$0" + + + +: ${CP="cp -f"} +test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} +: ${MAKE="make"} +: ${MKDIR="mkdir"} +: ${MV="mv -f"} +: ${RM="rm -f"} +: ${SHELL="${CONFIG_SHELL-/bin/sh}"} +: ${Xsed="$SED -e 1s/^X//"} + +# Global variables: +EXIT_SUCCESS=0 +EXIT_FAILURE=1 +EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. +EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. + +exit_status=$EXIT_SUCCESS + +# Make sure IFS has a sensible default +lt_nl=' +' +IFS=" $lt_nl" + +dirname="s,/[^/]*$,," +basename="s,^.*/,," + +# func_dirname file append nondir_replacement +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +func_dirname () +{ + func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` + if test "X$func_dirname_result" = "X${1}"; then + func_dirname_result="${3}" + else + func_dirname_result="$func_dirname_result${2}" + fi +} # func_dirname may be replaced by extended shell implementation + + +# func_basename file +func_basename () +{ + func_basename_result=`$ECHO "${1}" | $SED "$basename"` +} # func_basename may be replaced by extended shell implementation + + +# func_dirname_and_basename file append nondir_replacement +# perform func_basename and func_dirname in a single function +# call: +# dirname: Compute the dirname of FILE. If nonempty, +# add APPEND to the result, otherwise set result +# to NONDIR_REPLACEMENT. +# value returned in "$func_dirname_result" +# basename: Compute filename of FILE. +# value retuned in "$func_basename_result" +# Implementation must be kept synchronized with func_dirname +# and func_basename. For efficiency, we do not delegate to +# those functions but instead duplicate the functionality here. +func_dirname_and_basename () +{ + # Extract subdirectory from the argument. + func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` + if test "X$func_dirname_result" = "X${1}"; then + func_dirname_result="${3}" + else + func_dirname_result="$func_dirname_result${2}" + fi + func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` +} # func_dirname_and_basename may be replaced by extended shell implementation + + +# func_stripname prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +# func_strip_suffix prefix name +func_stripname () +{ + case ${2} in + .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; + *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; + esac +} # func_stripname may be replaced by extended shell implementation + + +# These SED scripts presuppose an absolute path with a trailing slash. +pathcar='s,^/\([^/]*\).*$,\1,' +pathcdr='s,^/[^/]*,,' +removedotparts=':dotsl + s@/\./@/@g + t dotsl + s,/\.$,/,' +collapseslashes='s@/\{1,\}@/@g' +finalslash='s,/*$,/,' + +# func_normal_abspath PATH +# Remove doubled-up and trailing slashes, "." path components, +# and cancel out any ".." path components in PATH after making +# it an absolute path. +# value returned in "$func_normal_abspath_result" +func_normal_abspath () +{ + # Start from root dir and reassemble the path. + func_normal_abspath_result= + func_normal_abspath_tpath=$1 + func_normal_abspath_altnamespace= + case $func_normal_abspath_tpath in + "") + # Empty path, that just means $cwd. + func_stripname '' '/' "`pwd`" + func_normal_abspath_result=$func_stripname_result + return + ;; + # The next three entries are used to spot a run of precisely + # two leading slashes without using negated character classes; + # we take advantage of case's first-match behaviour. + ///*) + # Unusual form of absolute path, do nothing. + ;; + //*) + # Not necessarily an ordinary path; POSIX reserves leading '//' + # and for example Cygwin uses it to access remote file shares + # over CIFS/SMB, so we conserve a leading double slash if found. + func_normal_abspath_altnamespace=/ + ;; + /*) + # Absolute path, do nothing. + ;; + *) + # Relative path, prepend $cwd. + func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath + ;; + esac + # Cancel out all the simple stuff to save iterations. We also want + # the path to end with a slash for ease of parsing, so make sure + # there is one (and only one) here. + func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"` + while :; do + # Processed it all yet? + if test "$func_normal_abspath_tpath" = / ; then + # If we ascended to the root using ".." the result may be empty now. + if test -z "$func_normal_abspath_result" ; then + func_normal_abspath_result=/ + fi + break + fi + func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$pathcar"` + func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$pathcdr"` + # Figure out what to do with it + case $func_normal_abspath_tcomponent in + "") + # Trailing empty path component, ignore it. + ;; + ..) + # Parent dir; strip last assembled component from result. + func_dirname "$func_normal_abspath_result" + func_normal_abspath_result=$func_dirname_result + ;; + *) + # Actual path component, append it. + func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent + ;; + esac + done + # Restore leading double-slash if one was found on entry. + func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result +} + +# func_relative_path SRCDIR DSTDIR +# generates a relative path from SRCDIR to DSTDIR, with a trailing +# slash if non-empty, suitable for immediately appending a filename +# without needing to append a separator. +# value returned in "$func_relative_path_result" +func_relative_path () +{ + func_relative_path_result= + func_normal_abspath "$1" + func_relative_path_tlibdir=$func_normal_abspath_result + func_normal_abspath "$2" + func_relative_path_tbindir=$func_normal_abspath_result + + # Ascend the tree starting from libdir + while :; do + # check if we have found a prefix of bindir + case $func_relative_path_tbindir in + $func_relative_path_tlibdir) + # found an exact match + func_relative_path_tcancelled= + break + ;; + $func_relative_path_tlibdir*) + # found a matching prefix + func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" + func_relative_path_tcancelled=$func_stripname_result + if test -z "$func_relative_path_result"; then + func_relative_path_result=. + fi + break + ;; + *) + func_dirname $func_relative_path_tlibdir + func_relative_path_tlibdir=${func_dirname_result} + if test "x$func_relative_path_tlibdir" = x ; then + # Have to descend all the way to the root! + func_relative_path_result=../$func_relative_path_result + func_relative_path_tcancelled=$func_relative_path_tbindir + break + fi + func_relative_path_result=../$func_relative_path_result + ;; + esac + done + + # Now calculate path; take care to avoid doubling-up slashes. + func_stripname '' '/' "$func_relative_path_result" + func_relative_path_result=$func_stripname_result + func_stripname '/' '/' "$func_relative_path_tcancelled" + if test "x$func_stripname_result" != x ; then + func_relative_path_result=${func_relative_path_result}/${func_stripname_result} + fi + + # Normalisation. If bindir is libdir, return empty string, + # else relative path ending with a slash; either way, target + # file name can be directly appended. + if test ! -z "$func_relative_path_result"; then + func_stripname './' '' "$func_relative_path_result/" + func_relative_path_result=$func_stripname_result + fi +} + +# The name of this program: +func_dirname_and_basename "$progpath" +progname=$func_basename_result + +# Make sure we have an absolute path for reexecution: +case $progpath in + [\\/]*|[A-Za-z]:\\*) ;; + *[\\/]*) + progdir=$func_dirname_result + progdir=`cd "$progdir" && pwd` + progpath="$progdir/$progname" + ;; + *) + save_IFS="$IFS" + IFS=${PATH_SEPARATOR-:} + for progdir in $PATH; do + IFS="$save_IFS" + test -x "$progdir/$progname" && break + done + IFS="$save_IFS" + test -n "$progdir" || progdir=`pwd` + progpath="$progdir/$progname" + ;; +esac + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +Xsed="${SED}"' -e 1s/^X//' +sed_quote_subst='s/\([`"$\\]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\(["`\\]\)/\\\1/g' + +# Sed substitution that turns a string into a regex matching for the +# string literally. +sed_make_literal_regex='s,[].[^$\\*\/],\\&,g' + +# Sed substitution that converts a w32 file name or path +# which contains forward slashes, into one that contains +# (escaped) backslashes. A very naive implementation. +lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' + +# Re-`\' parameter expansions in output of double_quote_subst that were +# `\'-ed in input to the same. If an odd number of `\' preceded a '$' +# in input to double_quote_subst, that '$' was protected from expansion. +# Since each input `\' is now two `\'s, look for any number of runs of +# four `\'s followed by two `\'s and then a '$'. `\' that '$'. +bs='\\' +bs2='\\\\' +bs4='\\\\\\\\' +dollar='\$' +sed_double_backslash="\ + s/$bs4/&\\ +/g + s/^$bs2$dollar/$bs&/ + s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g + s/\n//g" + +# Standard options: +opt_dry_run=false +opt_help=false +opt_quiet=false +opt_verbose=false +opt_warning=: + +# func_echo arg... +# Echo program name prefixed message, along with the current mode +# name if it has been set yet. +func_echo () +{ + $ECHO "$progname: ${opt_mode+$opt_mode: }$*" +} + +# func_verbose arg... +# Echo program name prefixed message in verbose mode only. +func_verbose () +{ + $opt_verbose && func_echo ${1+"$@"} + + # A bug in bash halts the script if the last line of a function + # fails when set -e is in force, so we need another command to + # work around that: + : +} + +# func_echo_all arg... +# Invoke $ECHO with all args, space-separated. +func_echo_all () +{ + $ECHO "$*" +} + +# func_error arg... +# Echo program name prefixed message to standard error. +func_error () +{ + $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 +} + +# func_warning arg... +# Echo program name prefixed warning message to standard error. +func_warning () +{ + $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 + + # bash bug again: + : +} + +# func_fatal_error arg... +# Echo program name prefixed message to standard error, and exit. +func_fatal_error () +{ + func_error ${1+"$@"} + exit $EXIT_FAILURE +} + +# func_fatal_help arg... +# Echo program name prefixed message to standard error, followed by +# a help hint, and exit. +func_fatal_help () +{ + func_error ${1+"$@"} + func_fatal_error "$help" +} +help="Try \`$progname --help' for more information." ## default + + +# func_grep expression filename +# Check whether EXPRESSION matches any line of FILENAME, without output. +func_grep () +{ + $GREP "$1" "$2" >/dev/null 2>&1 +} + + +# func_mkdir_p directory-path +# Make sure the entire path to DIRECTORY-PATH is available. +func_mkdir_p () +{ + my_directory_path="$1" + my_dir_list= + + if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then + + # Protect directory names starting with `-' + case $my_directory_path in + -*) my_directory_path="./$my_directory_path" ;; + esac + + # While some portion of DIR does not yet exist... + while test ! -d "$my_directory_path"; do + # ...make a list in topmost first order. Use a colon delimited + # list incase some portion of path contains whitespace. + my_dir_list="$my_directory_path:$my_dir_list" + + # If the last portion added has no slash in it, the list is done + case $my_directory_path in */*) ;; *) break ;; esac + + # ...otherwise throw away the child directory and loop + my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"` + done + my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'` + + save_mkdir_p_IFS="$IFS"; IFS=':' + for my_dir in $my_dir_list; do + IFS="$save_mkdir_p_IFS" + # mkdir can fail with a `File exist' error if two processes + # try to create one of the directories concurrently. Don't + # stop in that case! + $MKDIR "$my_dir" 2>/dev/null || : + done + IFS="$save_mkdir_p_IFS" + + # Bail out if we (or some other process) failed to create a directory. + test -d "$my_directory_path" || \ + func_fatal_error "Failed to create \`$1'" + fi +} + + +# func_mktempdir [string] +# Make a temporary directory that won't clash with other running +# libtool processes, and avoids race conditions if possible. If +# given, STRING is the basename for that directory. +func_mktempdir () +{ + my_template="${TMPDIR-/tmp}/${1-$progname}" + + if test "$opt_dry_run" = ":"; then + # Return a directory name, but don't create it in dry-run mode + my_tmpdir="${my_template}-$$" + else + + # If mktemp works, use that first and foremost + my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` + + if test ! -d "$my_tmpdir"; then + # Failing that, at least try and use $RANDOM to avoid a race + my_tmpdir="${my_template}-${RANDOM-0}$$" + + save_mktempdir_umask=`umask` + umask 0077 + $MKDIR "$my_tmpdir" + umask $save_mktempdir_umask + fi + + # If we're not in dry-run mode, bomb out on failure + test -d "$my_tmpdir" || \ + func_fatal_error "cannot create temporary directory \`$my_tmpdir'" + fi + + $ECHO "$my_tmpdir" +} + + +# func_quote_for_eval arg +# Aesthetically quote ARG to be evaled later. +# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT +# is double-quoted, suitable for a subsequent eval, whereas +# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters +# which are still active within double quotes backslashified. +func_quote_for_eval () +{ + case $1 in + *[\\\`\"\$]*) + func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;; + *) + func_quote_for_eval_unquoted_result="$1" ;; + esac + + case $func_quote_for_eval_unquoted_result in + # Double-quote args containing shell metacharacters to delay + # word splitting, command substitution and and variable + # expansion for a subsequent eval. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" + ;; + *) + func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" + esac +} + + +# func_quote_for_expand arg +# Aesthetically quote ARG to be evaled later; same as above, +# but do not quote variable references. +func_quote_for_expand () +{ + case $1 in + *[\\\`\"]*) + my_arg=`$ECHO "$1" | $SED \ + -e "$double_quote_subst" -e "$sed_double_backslash"` ;; + *) + my_arg="$1" ;; + esac + + case $my_arg in + # Double-quote args containing shell metacharacters to delay + # word splitting and command substitution for a subsequent eval. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + my_arg="\"$my_arg\"" + ;; + esac + + func_quote_for_expand_result="$my_arg" +} + + +# func_show_eval cmd [fail_exp] +# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is +# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP +# is given, then evaluate it. +func_show_eval () +{ + my_cmd="$1" + my_fail_exp="${2-:}" + + ${opt_silent-false} || { + func_quote_for_expand "$my_cmd" + eval "func_echo $func_quote_for_expand_result" + } + + if ${opt_dry_run-false}; then :; else + eval "$my_cmd" + my_status=$? + if test "$my_status" -eq 0; then :; else + eval "(exit $my_status); $my_fail_exp" + fi + fi +} + + +# func_show_eval_locale cmd [fail_exp] +# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is +# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP +# is given, then evaluate it. Use the saved locale for evaluation. +func_show_eval_locale () +{ + my_cmd="$1" + my_fail_exp="${2-:}" + + ${opt_silent-false} || { + func_quote_for_expand "$my_cmd" + eval "func_echo $func_quote_for_expand_result" + } + + if ${opt_dry_run-false}; then :; else + eval "$lt_user_locale + $my_cmd" + my_status=$? + eval "$lt_safe_locale" + if test "$my_status" -eq 0; then :; else + eval "(exit $my_status); $my_fail_exp" + fi + fi +} + +# func_tr_sh +# Turn $1 into a string suitable for a shell variable name. +# Result is stored in $func_tr_sh_result. All characters +# not in the set a-zA-Z0-9_ are replaced with '_'. Further, +# if $1 begins with a digit, a '_' is prepended as well. +func_tr_sh () +{ + case $1 in + [0-9]* | *[!a-zA-Z0-9_]*) + func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'` + ;; + * ) + func_tr_sh_result=$1 + ;; + esac +} + + +# func_version +# Echo version message to standard output and exit. +func_version () +{ + $opt_debug + + $SED -n '/(C)/!b go + :more + /\./!{ + N + s/\n# / / + b more + } + :go + /^# '$PROGRAM' (GNU /,/# warranty; / { + s/^# // + s/^# *$// + s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ + p + }' < "$progpath" + exit $? +} + +# func_usage +# Echo short help message to standard output and exit. +func_usage () +{ + $opt_debug + + $SED -n '/^# Usage:/,/^# *.*--help/ { + s/^# // + s/^# *$// + s/\$progname/'$progname'/ + p + }' < "$progpath" + echo + $ECHO "run \`$progname --help | more' for full usage" + exit $? +} + +# func_help [NOEXIT] +# Echo long help message to standard output and exit, +# unless 'noexit' is passed as argument. +func_help () +{ + $opt_debug + + $SED -n '/^# Usage:/,/# Report bugs to/ { + :print + s/^# // + s/^# *$// + s*\$progname*'$progname'* + s*\$host*'"$host"'* + s*\$SHELL*'"$SHELL"'* + s*\$LTCC*'"$LTCC"'* + s*\$LTCFLAGS*'"$LTCFLAGS"'* + s*\$LD*'"$LD"'* + s/\$with_gnu_ld/'"$with_gnu_ld"'/ + s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/ + s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/ + p + d + } + /^# .* home page:/b print + /^# General help using/b print + ' < "$progpath" + ret=$? + if test -z "$1"; then + exit $ret + fi +} + +# func_missing_arg argname +# Echo program name prefixed message to standard error and set global +# exit_cmd. +func_missing_arg () +{ + $opt_debug + + func_error "missing argument for $1." + exit_cmd=exit +} + + +# func_split_short_opt shortopt +# Set func_split_short_opt_name and func_split_short_opt_arg shell +# variables after splitting SHORTOPT after the 2nd character. +func_split_short_opt () +{ + my_sed_short_opt='1s/^\(..\).*$/\1/;q' + my_sed_short_rest='1s/^..\(.*\)$/\1/;q' + + func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"` + func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"` +} # func_split_short_opt may be replaced by extended shell implementation + + +# func_split_long_opt longopt +# Set func_split_long_opt_name and func_split_long_opt_arg shell +# variables after splitting LONGOPT at the `=' sign. +func_split_long_opt () +{ + my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q' + my_sed_long_arg='1s/^--[^=]*=//' + + func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"` + func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"` +} # func_split_long_opt may be replaced by extended shell implementation + +exit_cmd=: + + + + + +magic="%%%MAGIC variable%%%" +magic_exe="%%%MAGIC EXE variable%%%" + +# Global variables. +nonopt= +preserve_args= +lo2o="s/\\.lo\$/.${objext}/" +o2lo="s/\\.${objext}\$/.lo/" +extracted_archives= +extracted_serial=0 + +# If this variable is set in any of the actions, the command in it +# will be execed at the end. This prevents here-documents from being +# left over by shells. +exec_cmd= + +# func_append var value +# Append VALUE to the end of shell variable VAR. +func_append () +{ + eval "${1}=\$${1}\${2}" +} # func_append may be replaced by extended shell implementation + +# func_append_quoted var value +# Quote VALUE and append to the end of shell variable VAR, separated +# by a space. +func_append_quoted () +{ + func_quote_for_eval "${2}" + eval "${1}=\$${1}\\ \$func_quote_for_eval_result" +} # func_append_quoted may be replaced by extended shell implementation + + +# func_arith arithmetic-term... +func_arith () +{ + func_arith_result=`expr "${@}"` +} # func_arith may be replaced by extended shell implementation + + +# func_len string +# STRING may not start with a hyphen. +func_len () +{ + func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len` +} # func_len may be replaced by extended shell implementation + + +# func_lo2o object +func_lo2o () +{ + func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` +} # func_lo2o may be replaced by extended shell implementation + + +# func_xform libobj-or-source +func_xform () +{ + func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` +} # func_xform may be replaced by extended shell implementation + + +# func_fatal_configuration arg... +# Echo program name prefixed message to standard error, followed by +# a configuration failure hint, and exit. +func_fatal_configuration () +{ + func_error ${1+"$@"} + func_error "See the $PACKAGE documentation for more information." + func_fatal_error "Fatal configuration error." +} + + +# func_config +# Display the configuration for all the tags in this script. +func_config () +{ + re_begincf='^# ### BEGIN LIBTOOL' + re_endcf='^# ### END LIBTOOL' + + # Default configuration. + $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" + + # Now print the configurations for the tags. + for tagname in $taglist; do + $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" + done + + exit $? +} + +# func_features +# Display the features supported by this script. +func_features () +{ + echo "host: $host" + if test "$build_libtool_libs" = yes; then + echo "enable shared libraries" + else + echo "disable shared libraries" + fi + if test "$build_old_libs" = yes; then + echo "enable static libraries" + else + echo "disable static libraries" + fi + + exit $? +} + +# func_enable_tag tagname +# Verify that TAGNAME is valid, and either flag an error and exit, or +# enable the TAGNAME tag. We also add TAGNAME to the global $taglist +# variable here. +func_enable_tag () +{ + # Global variable: + tagname="$1" + + re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" + re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" + sed_extractcf="/$re_begincf/,/$re_endcf/p" + + # Validate tagname. + case $tagname in + *[!-_A-Za-z0-9,/]*) + func_fatal_error "invalid tag name: $tagname" + ;; + esac + + # Don't test for the "default" C tag, as we know it's + # there but not specially marked. + case $tagname in + CC) ;; + *) + if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then + taglist="$taglist $tagname" + + # Evaluate the configuration. Be careful to quote the path + # and the sed script, to avoid splitting on whitespace, but + # also don't use non-portable quotes within backquotes within + # quotes we have to do it in 2 steps: + extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` + eval "$extractedcf" + else + func_error "ignoring unknown tag $tagname" + fi + ;; + esac +} + +# func_check_version_match +# Ensure that we are using m4 macros, and libtool script from the same +# release of libtool. +func_check_version_match () +{ + if test "$package_revision" != "$macro_revision"; then + if test "$VERSION" != "$macro_version"; then + if test -z "$macro_version"; then + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, but the +$progname: definition of this LT_INIT comes from an older release. +$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION +$progname: and run autoconf again. +_LT_EOF + else + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, but the +$progname: definition of this LT_INIT comes from $PACKAGE $macro_version. +$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION +$progname: and run autoconf again. +_LT_EOF + fi + else + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, +$progname: but the definition of this LT_INIT comes from revision $macro_revision. +$progname: You should recreate aclocal.m4 with macros from revision $package_revision +$progname: of $PACKAGE $VERSION and run autoconf again. +_LT_EOF + fi + + exit $EXIT_MISMATCH + fi +} + + +# Shorthand for --mode=foo, only valid as the first argument +case $1 in +clean|clea|cle|cl) + shift; set dummy --mode clean ${1+"$@"}; shift + ;; +compile|compil|compi|comp|com|co|c) + shift; set dummy --mode compile ${1+"$@"}; shift + ;; +execute|execut|execu|exec|exe|ex|e) + shift; set dummy --mode execute ${1+"$@"}; shift + ;; +finish|finis|fini|fin|fi|f) + shift; set dummy --mode finish ${1+"$@"}; shift + ;; +install|instal|insta|inst|ins|in|i) + shift; set dummy --mode install ${1+"$@"}; shift + ;; +link|lin|li|l) + shift; set dummy --mode link ${1+"$@"}; shift + ;; +uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) + shift; set dummy --mode uninstall ${1+"$@"}; shift + ;; +esac + + + +# Option defaults: +opt_debug=: +opt_dry_run=false +opt_config=false +opt_preserve_dup_deps=false +opt_features=false +opt_finish=false +opt_help=false +opt_help_all=false +opt_silent=: +opt_warning=: +opt_verbose=: +opt_silent=false +opt_verbose=false + + +# Parse options once, thoroughly. This comes as soon as possible in the +# script to make things like `--version' happen as quickly as we can. +{ + # this just eases exit handling + while test $# -gt 0; do + opt="$1" + shift + case $opt in + --debug|-x) opt_debug='set -x' + func_echo "enabling shell trace mode" + $opt_debug + ;; + --dry-run|--dryrun|-n) + opt_dry_run=: + ;; + --config) + opt_config=: +func_config + ;; + --dlopen|-dlopen) + optarg="$1" + opt_dlopen="${opt_dlopen+$opt_dlopen +}$optarg" + shift + ;; + --preserve-dup-deps) + opt_preserve_dup_deps=: + ;; + --features) + opt_features=: +func_features + ;; + --finish) + opt_finish=: +set dummy --mode finish ${1+"$@"}; shift + ;; + --help) + opt_help=: + ;; + --help-all) + opt_help_all=: +opt_help=': help-all' + ;; + --mode) + test $# = 0 && func_missing_arg $opt && break + optarg="$1" + opt_mode="$optarg" +case $optarg in + # Valid mode arguments: + clean|compile|execute|finish|install|link|relink|uninstall) ;; + + # Catch anything else as an error + *) func_error "invalid argument for $opt" + exit_cmd=exit + break + ;; +esac + shift + ;; + --no-silent|--no-quiet) + opt_silent=false +func_append preserve_args " $opt" + ;; + --no-warning|--no-warn) + opt_warning=false +func_append preserve_args " $opt" + ;; + --no-verbose) + opt_verbose=false +func_append preserve_args " $opt" + ;; + --silent|--quiet) + opt_silent=: +func_append preserve_args " $opt" + opt_verbose=false + ;; + --verbose|-v) + opt_verbose=: +func_append preserve_args " $opt" +opt_silent=false + ;; + --tag) + test $# = 0 && func_missing_arg $opt && break + optarg="$1" + opt_tag="$optarg" +func_append preserve_args " $opt $optarg" +func_enable_tag "$optarg" + shift + ;; + + -\?|-h) func_usage ;; + --help) func_help ;; + --version) func_version ;; + + # Separate optargs to long options: + --*=*) + func_split_long_opt "$opt" + set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"} + shift + ;; + + # Separate non-argument short options: + -\?*|-h*|-n*|-v*) + func_split_short_opt "$opt" + set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"} + shift + ;; + + --) break ;; + -*) func_fatal_help "unrecognized option \`$opt'" ;; + *) set dummy "$opt" ${1+"$@"}; shift; break ;; + esac + done + + # Validate options: + + # save first non-option argument + if test "$#" -gt 0; then + nonopt="$opt" + shift + fi + + # preserve --debug + test "$opt_debug" = : || func_append preserve_args " --debug" + + case $host in + *cygwin* | *mingw* | *pw32* | *cegcc*) + # don't eliminate duplications in $postdeps and $predeps + opt_duplicate_compiler_generated_deps=: + ;; + *) + opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps + ;; + esac + + $opt_help || { + # Sanity checks first: + func_check_version_match + + if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then + func_fatal_configuration "not configured to build any kind of library" + fi + + # Darwin sucks + eval std_shrext=\"$shrext_cmds\" + + # Only execute mode is allowed to have -dlopen flags. + if test -n "$opt_dlopen" && test "$opt_mode" != execute; then + func_error "unrecognized option \`-dlopen'" + $ECHO "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # Change the help message to a mode-specific one. + generic_help="$help" + help="Try \`$progname --help --mode=$opt_mode' for more information." + } + + + # Bail if the options were screwed + $exit_cmd $EXIT_FAILURE +} + + + + +## ----------- ## +## Main. ## +## ----------- ## + +# func_lalib_p file +# True iff FILE is a libtool `.la' library or `.lo' object file. +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_lalib_p () +{ + test -f "$1" && + $SED -e 4q "$1" 2>/dev/null \ + | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 +} + +# func_lalib_unsafe_p file +# True iff FILE is a libtool `.la' library or `.lo' object file. +# This function implements the same check as func_lalib_p without +# resorting to external programs. To this end, it redirects stdin and +# closes it afterwards, without saving the original file descriptor. +# As a safety measure, use it only where a negative result would be +# fatal anyway. Works if `file' does not exist. +func_lalib_unsafe_p () +{ + lalib_p=no + if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then + for lalib_p_l in 1 2 3 4 + do + read lalib_p_line + case "$lalib_p_line" in + \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; + esac + done + exec 0<&5 5<&- + fi + test "$lalib_p" = yes +} + +# func_ltwrapper_script_p file +# True iff FILE is a libtool wrapper script +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_ltwrapper_script_p () +{ + func_lalib_p "$1" +} + +# func_ltwrapper_executable_p file +# True iff FILE is a libtool wrapper executable +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_ltwrapper_executable_p () +{ + func_ltwrapper_exec_suffix= + case $1 in + *.exe) ;; + *) func_ltwrapper_exec_suffix=.exe ;; + esac + $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 +} + +# func_ltwrapper_scriptname file +# Assumes file is an ltwrapper_executable +# uses $file to determine the appropriate filename for a +# temporary ltwrapper_script. +func_ltwrapper_scriptname () +{ + func_dirname_and_basename "$1" "" "." + func_stripname '' '.exe' "$func_basename_result" + func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" +} + +# func_ltwrapper_p file +# True iff FILE is a libtool wrapper script or wrapper executable +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_ltwrapper_p () +{ + func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" +} + + +# func_execute_cmds commands fail_cmd +# Execute tilde-delimited COMMANDS. +# If FAIL_CMD is given, eval that upon failure. +# FAIL_CMD may read-access the current command in variable CMD! +func_execute_cmds () +{ + $opt_debug + save_ifs=$IFS; IFS='~' + for cmd in $1; do + IFS=$save_ifs + eval cmd=\"$cmd\" + func_show_eval "$cmd" "${2-:}" + done + IFS=$save_ifs +} + + +# func_source file +# Source FILE, adding directory component if necessary. +# Note that it is not necessary on cygwin/mingw to append a dot to +# FILE even if both FILE and FILE.exe exist: automatic-append-.exe +# behavior happens only for exec(3), not for open(2)! Also, sourcing +# `FILE.' does not work on cygwin managed mounts. +func_source () +{ + $opt_debug + case $1 in + */* | *\\*) . "$1" ;; + *) . "./$1" ;; + esac +} + + +# func_resolve_sysroot PATH +# Replace a leading = in PATH with a sysroot. Store the result into +# func_resolve_sysroot_result +func_resolve_sysroot () +{ + func_resolve_sysroot_result=$1 + case $func_resolve_sysroot_result in + =*) + func_stripname '=' '' "$func_resolve_sysroot_result" + func_resolve_sysroot_result=$lt_sysroot$func_stripname_result + ;; + esac +} + +# func_replace_sysroot PATH +# If PATH begins with the sysroot, replace it with = and +# store the result into func_replace_sysroot_result. +func_replace_sysroot () +{ + case "$lt_sysroot:$1" in + ?*:"$lt_sysroot"*) + func_stripname "$lt_sysroot" '' "$1" + func_replace_sysroot_result="=$func_stripname_result" + ;; + *) + # Including no sysroot. + func_replace_sysroot_result=$1 + ;; + esac +} + +# func_infer_tag arg +# Infer tagged configuration to use if any are available and +# if one wasn't chosen via the "--tag" command line option. +# Only attempt this if the compiler in the base compile +# command doesn't match the default compiler. +# arg is usually of the form 'gcc ...' +func_infer_tag () +{ + $opt_debug + if test -n "$available_tags" && test -z "$tagname"; then + CC_quoted= + for arg in $CC; do + func_append_quoted CC_quoted "$arg" + done + CC_expanded=`func_echo_all $CC` + CC_quoted_expanded=`func_echo_all $CC_quoted` + case $@ in + # Blanks in the command may have been stripped by the calling shell, + # but not from the CC environment variable when configure was run. + " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ + " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; + # Blanks at the start of $base_compile will cause this to fail + # if we don't check for them as well. + *) + for z in $available_tags; do + if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then + # Evaluate the configuration. + eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" + CC_quoted= + for arg in $CC; do + # Double-quote args containing other shell metacharacters. + func_append_quoted CC_quoted "$arg" + done + CC_expanded=`func_echo_all $CC` + CC_quoted_expanded=`func_echo_all $CC_quoted` + case "$@ " in + " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ + " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) + # The compiler in the base compile command matches + # the one in the tagged configuration. + # Assume this is the tagged configuration we want. + tagname=$z + break + ;; + esac + fi + done + # If $tagname still isn't set, then no tagged configuration + # was found and let the user know that the "--tag" command + # line option must be used. + if test -z "$tagname"; then + func_echo "unable to infer tagged configuration" + func_fatal_error "specify a tag with \`--tag'" +# else +# func_verbose "using $tagname tagged configuration" + fi + ;; + esac + fi +} + + + +# func_write_libtool_object output_name pic_name nonpic_name +# Create a libtool object file (analogous to a ".la" file), +# but don't create it if we're doing a dry run. +func_write_libtool_object () +{ + write_libobj=${1} + if test "$build_libtool_libs" = yes; then + write_lobj=\'${2}\' + else + write_lobj=none + fi + + if test "$build_old_libs" = yes; then + write_oldobj=\'${3}\' + else + write_oldobj=none + fi + + $opt_dry_run || { + cat >${write_libobj}T </dev/null` + if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then + func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | + $SED -e "$lt_sed_naive_backslashify"` + else + func_convert_core_file_wine_to_w32_result= + fi + fi +} +# end: func_convert_core_file_wine_to_w32 + + +# func_convert_core_path_wine_to_w32 ARG +# Helper function used by path conversion functions when $build is *nix, and +# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly +# configured wine environment available, with the winepath program in $build's +# $PATH. Assumes ARG has no leading or trailing path separator characters. +# +# ARG is path to be converted from $build format to win32. +# Result is available in $func_convert_core_path_wine_to_w32_result. +# Unconvertible file (directory) names in ARG are skipped; if no directory names +# are convertible, then the result may be empty. +func_convert_core_path_wine_to_w32 () +{ + $opt_debug + # unfortunately, winepath doesn't convert paths, only file names + func_convert_core_path_wine_to_w32_result="" + if test -n "$1"; then + oldIFS=$IFS + IFS=: + for func_convert_core_path_wine_to_w32_f in $1; do + IFS=$oldIFS + func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" + if test -n "$func_convert_core_file_wine_to_w32_result" ; then + if test -z "$func_convert_core_path_wine_to_w32_result"; then + func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result" + else + func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" + fi + fi + done + IFS=$oldIFS + fi +} +# end: func_convert_core_path_wine_to_w32 + + +# func_cygpath ARGS... +# Wrapper around calling the cygpath program via LT_CYGPATH. This is used when +# when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) +# $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or +# (2), returns the Cygwin file name or path in func_cygpath_result (input +# file name or path is assumed to be in w32 format, as previously converted +# from $build's *nix or MSYS format). In case (3), returns the w32 file name +# or path in func_cygpath_result (input file name or path is assumed to be in +# Cygwin format). Returns an empty string on error. +# +# ARGS are passed to cygpath, with the last one being the file name or path to +# be converted. +# +# Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH +# environment variable; do not put it in $PATH. +func_cygpath () +{ + $opt_debug + if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then + func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` + if test "$?" -ne 0; then + # on failure, ensure result is empty + func_cygpath_result= + fi + else + func_cygpath_result= + func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'" + fi +} +#end: func_cygpath + + +# func_convert_core_msys_to_w32 ARG +# Convert file name or path ARG from MSYS format to w32 format. Return +# result in func_convert_core_msys_to_w32_result. +func_convert_core_msys_to_w32 () +{ + $opt_debug + # awkward: cmd appends spaces to result + func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | + $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` +} +#end: func_convert_core_msys_to_w32 + + +# func_convert_file_check ARG1 ARG2 +# Verify that ARG1 (a file name in $build format) was converted to $host +# format in ARG2. Otherwise, emit an error message, but continue (resetting +# func_to_host_file_result to ARG1). +func_convert_file_check () +{ + $opt_debug + if test -z "$2" && test -n "$1" ; then + func_error "Could not determine host file name corresponding to" + func_error " \`$1'" + func_error "Continuing, but uninstalled executables may not work." + # Fallback: + func_to_host_file_result="$1" + fi +} +# end func_convert_file_check + + +# func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH +# Verify that FROM_PATH (a path in $build format) was converted to $host +# format in TO_PATH. Otherwise, emit an error message, but continue, resetting +# func_to_host_file_result to a simplistic fallback value (see below). +func_convert_path_check () +{ + $opt_debug + if test -z "$4" && test -n "$3"; then + func_error "Could not determine the host path corresponding to" + func_error " \`$3'" + func_error "Continuing, but uninstalled executables may not work." + # Fallback. This is a deliberately simplistic "conversion" and + # should not be "improved". See libtool.info. + if test "x$1" != "x$2"; then + lt_replace_pathsep_chars="s|$1|$2|g" + func_to_host_path_result=`echo "$3" | + $SED -e "$lt_replace_pathsep_chars"` + else + func_to_host_path_result="$3" + fi + fi +} +# end func_convert_path_check + + +# func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG +# Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT +# and appending REPL if ORIG matches BACKPAT. +func_convert_path_front_back_pathsep () +{ + $opt_debug + case $4 in + $1 ) func_to_host_path_result="$3$func_to_host_path_result" + ;; + esac + case $4 in + $2 ) func_append func_to_host_path_result "$3" + ;; + esac +} +# end func_convert_path_front_back_pathsep + + +################################################## +# $build to $host FILE NAME CONVERSION FUNCTIONS # +################################################## +# invoked via `$to_host_file_cmd ARG' +# +# In each case, ARG is the path to be converted from $build to $host format. +# Result will be available in $func_to_host_file_result. + + +# func_to_host_file ARG +# Converts the file name ARG from $build format to $host format. Return result +# in func_to_host_file_result. +func_to_host_file () +{ + $opt_debug + $to_host_file_cmd "$1" +} +# end func_to_host_file + + +# func_to_tool_file ARG LAZY +# converts the file name ARG from $build format to toolchain format. Return +# result in func_to_tool_file_result. If the conversion in use is listed +# in (the comma separated) LAZY, no conversion takes place. +func_to_tool_file () +{ + $opt_debug + case ,$2, in + *,"$to_tool_file_cmd",*) + func_to_tool_file_result=$1 + ;; + *) + $to_tool_file_cmd "$1" + func_to_tool_file_result=$func_to_host_file_result + ;; + esac +} +# end func_to_tool_file + + +# func_convert_file_noop ARG +# Copy ARG to func_to_host_file_result. +func_convert_file_noop () +{ + func_to_host_file_result="$1" +} +# end func_convert_file_noop + + +# func_convert_file_msys_to_w32 ARG +# Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic +# conversion to w32 is not available inside the cwrapper. Returns result in +# func_to_host_file_result. +func_convert_file_msys_to_w32 () +{ + $opt_debug + func_to_host_file_result="$1" + if test -n "$1"; then + func_convert_core_msys_to_w32 "$1" + func_to_host_file_result="$func_convert_core_msys_to_w32_result" + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_msys_to_w32 + + +# func_convert_file_cygwin_to_w32 ARG +# Convert file name ARG from Cygwin to w32 format. Returns result in +# func_to_host_file_result. +func_convert_file_cygwin_to_w32 () +{ + $opt_debug + func_to_host_file_result="$1" + if test -n "$1"; then + # because $build is cygwin, we call "the" cygpath in $PATH; no need to use + # LT_CYGPATH in this case. + func_to_host_file_result=`cygpath -m "$1"` + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_cygwin_to_w32 + + +# func_convert_file_nix_to_w32 ARG +# Convert file name ARG from *nix to w32 format. Requires a wine environment +# and a working winepath. Returns result in func_to_host_file_result. +func_convert_file_nix_to_w32 () +{ + $opt_debug + func_to_host_file_result="$1" + if test -n "$1"; then + func_convert_core_file_wine_to_w32 "$1" + func_to_host_file_result="$func_convert_core_file_wine_to_w32_result" + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_nix_to_w32 + + +# func_convert_file_msys_to_cygwin ARG +# Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. +# Returns result in func_to_host_file_result. +func_convert_file_msys_to_cygwin () +{ + $opt_debug + func_to_host_file_result="$1" + if test -n "$1"; then + func_convert_core_msys_to_w32 "$1" + func_cygpath -u "$func_convert_core_msys_to_w32_result" + func_to_host_file_result="$func_cygpath_result" + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_msys_to_cygwin + + +# func_convert_file_nix_to_cygwin ARG +# Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed +# in a wine environment, working winepath, and LT_CYGPATH set. Returns result +# in func_to_host_file_result. +func_convert_file_nix_to_cygwin () +{ + $opt_debug + func_to_host_file_result="$1" + if test -n "$1"; then + # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. + func_convert_core_file_wine_to_w32 "$1" + func_cygpath -u "$func_convert_core_file_wine_to_w32_result" + func_to_host_file_result="$func_cygpath_result" + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_nix_to_cygwin + + +############################################# +# $build to $host PATH CONVERSION FUNCTIONS # +############################################# +# invoked via `$to_host_path_cmd ARG' +# +# In each case, ARG is the path to be converted from $build to $host format. +# The result will be available in $func_to_host_path_result. +# +# Path separators are also converted from $build format to $host format. If +# ARG begins or ends with a path separator character, it is preserved (but +# converted to $host format) on output. +# +# All path conversion functions are named using the following convention: +# file name conversion function : func_convert_file_X_to_Y () +# path conversion function : func_convert_path_X_to_Y () +# where, for any given $build/$host combination the 'X_to_Y' value is the +# same. If conversion functions are added for new $build/$host combinations, +# the two new functions must follow this pattern, or func_init_to_host_path_cmd +# will break. + + +# func_init_to_host_path_cmd +# Ensures that function "pointer" variable $to_host_path_cmd is set to the +# appropriate value, based on the value of $to_host_file_cmd. +to_host_path_cmd= +func_init_to_host_path_cmd () +{ + $opt_debug + if test -z "$to_host_path_cmd"; then + func_stripname 'func_convert_file_' '' "$to_host_file_cmd" + to_host_path_cmd="func_convert_path_${func_stripname_result}" + fi +} + + +# func_to_host_path ARG +# Converts the path ARG from $build format to $host format. Return result +# in func_to_host_path_result. +func_to_host_path () +{ + $opt_debug + func_init_to_host_path_cmd + $to_host_path_cmd "$1" +} +# end func_to_host_path + + +# func_convert_path_noop ARG +# Copy ARG to func_to_host_path_result. +func_convert_path_noop () +{ + func_to_host_path_result="$1" +} +# end func_convert_path_noop + + +# func_convert_path_msys_to_w32 ARG +# Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic +# conversion to w32 is not available inside the cwrapper. Returns result in +# func_to_host_path_result. +func_convert_path_msys_to_w32 () +{ + $opt_debug + func_to_host_path_result="$1" + if test -n "$1"; then + # Remove leading and trailing path separator characters from ARG. MSYS + # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; + # and winepath ignores them completely. + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" + func_to_host_path_result="$func_convert_core_msys_to_w32_result" + func_convert_path_check : ";" \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" + fi +} +# end func_convert_path_msys_to_w32 + + +# func_convert_path_cygwin_to_w32 ARG +# Convert path ARG from Cygwin to w32 format. Returns result in +# func_to_host_file_result. +func_convert_path_cygwin_to_w32 () +{ + $opt_debug + func_to_host_path_result="$1" + if test -n "$1"; then + # See func_convert_path_msys_to_w32: + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` + func_convert_path_check : ";" \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" + fi +} +# end func_convert_path_cygwin_to_w32 + + +# func_convert_path_nix_to_w32 ARG +# Convert path ARG from *nix to w32 format. Requires a wine environment and +# a working winepath. Returns result in func_to_host_file_result. +func_convert_path_nix_to_w32 () +{ + $opt_debug + func_to_host_path_result="$1" + if test -n "$1"; then + # See func_convert_path_msys_to_w32: + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" + func_to_host_path_result="$func_convert_core_path_wine_to_w32_result" + func_convert_path_check : ";" \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" + fi +} +# end func_convert_path_nix_to_w32 + + +# func_convert_path_msys_to_cygwin ARG +# Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. +# Returns result in func_to_host_file_result. +func_convert_path_msys_to_cygwin () +{ + $opt_debug + func_to_host_path_result="$1" + if test -n "$1"; then + # See func_convert_path_msys_to_w32: + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" + func_cygpath -u -p "$func_convert_core_msys_to_w32_result" + func_to_host_path_result="$func_cygpath_result" + func_convert_path_check : : \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" : "$1" + fi +} +# end func_convert_path_msys_to_cygwin + + +# func_convert_path_nix_to_cygwin ARG +# Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a +# a wine environment, working winepath, and LT_CYGPATH set. Returns result in +# func_to_host_file_result. +func_convert_path_nix_to_cygwin () +{ + $opt_debug + func_to_host_path_result="$1" + if test -n "$1"; then + # Remove leading and trailing path separator characters from + # ARG. msys behavior is inconsistent here, cygpath turns them + # into '.;' and ';.', and winepath ignores them completely. + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" + func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" + func_to_host_path_result="$func_cygpath_result" + func_convert_path_check : : \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" : "$1" + fi +} +# end func_convert_path_nix_to_cygwin + + +# func_mode_compile arg... +func_mode_compile () +{ + $opt_debug + # Get the compilation command and the source file. + base_compile= + srcfile="$nonopt" # always keep a non-empty value in "srcfile" + suppress_opt=yes + suppress_output= + arg_mode=normal + libobj= + later= + pie_flag= + + for arg + do + case $arg_mode in + arg ) + # do not "continue". Instead, add this to base_compile + lastarg="$arg" + arg_mode=normal + ;; + + target ) + libobj="$arg" + arg_mode=normal + continue + ;; + + normal ) + # Accept any command-line options. + case $arg in + -o) + test -n "$libobj" && \ + func_fatal_error "you cannot specify \`-o' more than once" + arg_mode=target + continue + ;; + + -pie | -fpie | -fPIE) + func_append pie_flag " $arg" + continue + ;; + + -shared | -static | -prefer-pic | -prefer-non-pic) + func_append later " $arg" + continue + ;; + + -no-suppress) + suppress_opt=no + continue + ;; + + -Xcompiler) + arg_mode=arg # the next one goes into the "base_compile" arg list + continue # The current "srcfile" will either be retained or + ;; # replaced later. I would guess that would be a bug. + + -Wc,*) + func_stripname '-Wc,' '' "$arg" + args=$func_stripname_result + lastarg= + save_ifs="$IFS"; IFS=',' + for arg in $args; do + IFS="$save_ifs" + func_append_quoted lastarg "$arg" + done + IFS="$save_ifs" + func_stripname ' ' '' "$lastarg" + lastarg=$func_stripname_result + + # Add the arguments to base_compile. + func_append base_compile " $lastarg" + continue + ;; + + *) + # Accept the current argument as the source file. + # The previous "srcfile" becomes the current argument. + # + lastarg="$srcfile" + srcfile="$arg" + ;; + esac # case $arg + ;; + esac # case $arg_mode + + # Aesthetically quote the previous argument. + func_append_quoted base_compile "$lastarg" + done # for arg + + case $arg_mode in + arg) + func_fatal_error "you must specify an argument for -Xcompile" + ;; + target) + func_fatal_error "you must specify a target with \`-o'" + ;; + *) + # Get the name of the library object. + test -z "$libobj" && { + func_basename "$srcfile" + libobj="$func_basename_result" + } + ;; + esac + + # Recognize several different file suffixes. + # If the user specifies -o file.o, it is replaced with file.lo + case $libobj in + *.[cCFSifmso] | \ + *.ada | *.adb | *.ads | *.asm | \ + *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ + *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) + func_xform "$libobj" + libobj=$func_xform_result + ;; + esac + + case $libobj in + *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; + *) + func_fatal_error "cannot determine name of library object from \`$libobj'" + ;; + esac + + func_infer_tag $base_compile + + for arg in $later; do + case $arg in + -shared) + test "$build_libtool_libs" != yes && \ + func_fatal_configuration "can not build a shared library" + build_old_libs=no + continue + ;; + + -static) + build_libtool_libs=no + build_old_libs=yes + continue + ;; + + -prefer-pic) + pic_mode=yes + continue + ;; + + -prefer-non-pic) + pic_mode=no + continue + ;; + esac + done + + func_quote_for_eval "$libobj" + test "X$libobj" != "X$func_quote_for_eval_result" \ + && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ + && func_warning "libobj name \`$libobj' may not contain shell special characters." + func_dirname_and_basename "$obj" "/" "" + objname="$func_basename_result" + xdir="$func_dirname_result" + lobj=${xdir}$objdir/$objname + + test -z "$base_compile" && \ + func_fatal_help "you must specify a compilation command" + + # Delete any leftover library objects. + if test "$build_old_libs" = yes; then + removelist="$obj $lobj $libobj ${libobj}T" + else + removelist="$lobj $libobj ${libobj}T" + fi + + # On Cygwin there's no "real" PIC flag so we must build both object types + case $host_os in + cygwin* | mingw* | pw32* | os2* | cegcc*) + pic_mode=default + ;; + esac + if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then + # non-PIC code in shared libraries is not supported + pic_mode=default + fi + + # Calculate the filename of the output object if compiler does + # not support -o with -c + if test "$compiler_c_o" = no; then + output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext} + lockfile="$output_obj.lock" + else + output_obj= + need_locks=no + lockfile= + fi + + # Lock this critical section if it is needed + # We use this script file to make the link, it avoids creating a new file + if test "$need_locks" = yes; then + until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do + func_echo "Waiting for $lockfile to be removed" + sleep 2 + done + elif test "$need_locks" = warn; then + if test -f "$lockfile"; then + $ECHO "\ +*** ERROR, $lockfile exists and contains: +`cat $lockfile 2>/dev/null` + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $opt_dry_run || $RM $removelist + exit $EXIT_FAILURE + fi + func_append removelist " $output_obj" + $ECHO "$srcfile" > "$lockfile" + fi + + $opt_dry_run || $RM $removelist + func_append removelist " $lockfile" + trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 + + func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 + srcfile=$func_to_tool_file_result + func_quote_for_eval "$srcfile" + qsrcfile=$func_quote_for_eval_result + + # Only build a PIC object if we are building libtool libraries. + if test "$build_libtool_libs" = yes; then + # Without this assignment, base_compile gets emptied. + fbsd_hideous_sh_bug=$base_compile + + if test "$pic_mode" != no; then + command="$base_compile $qsrcfile $pic_flag" + else + # Don't build PIC code + command="$base_compile $qsrcfile" + fi + + func_mkdir_p "$xdir$objdir" + + if test -z "$output_obj"; then + # Place PIC objects in $objdir + func_append command " -o $lobj" + fi + + func_show_eval_locale "$command" \ + 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' + + if test "$need_locks" = warn && + test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then + $ECHO "\ +*** ERROR, $lockfile contains: +`cat $lockfile 2>/dev/null` + +but it should contain: +$srcfile + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $opt_dry_run || $RM $removelist + exit $EXIT_FAILURE + fi + + # Just move the object if needed, then go on to compile the next one + if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then + func_show_eval '$MV "$output_obj" "$lobj"' \ + 'error=$?; $opt_dry_run || $RM $removelist; exit $error' + fi + + # Allow error messages only from the first compilation. + if test "$suppress_opt" = yes; then + suppress_output=' >/dev/null 2>&1' + fi + fi + + # Only build a position-dependent object if we build old libraries. + if test "$build_old_libs" = yes; then + if test "$pic_mode" != yes; then + # Don't build PIC code + command="$base_compile $qsrcfile$pie_flag" + else + command="$base_compile $qsrcfile $pic_flag" + fi + if test "$compiler_c_o" = yes; then + func_append command " -o $obj" + fi + + # Suppress compiler output if we already did a PIC compilation. + func_append command "$suppress_output" + func_show_eval_locale "$command" \ + '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' + + if test "$need_locks" = warn && + test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then + $ECHO "\ +*** ERROR, $lockfile contains: +`cat $lockfile 2>/dev/null` + +but it should contain: +$srcfile + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $opt_dry_run || $RM $removelist + exit $EXIT_FAILURE + fi + + # Just move the object if needed + if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then + func_show_eval '$MV "$output_obj" "$obj"' \ + 'error=$?; $opt_dry_run || $RM $removelist; exit $error' + fi + fi + + $opt_dry_run || { + func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" + + # Unlock the critical section if it was locked + if test "$need_locks" != no; then + removelist=$lockfile + $RM "$lockfile" + fi + } + + exit $EXIT_SUCCESS +} + +$opt_help || { + test "$opt_mode" = compile && func_mode_compile ${1+"$@"} +} + +func_mode_help () +{ + # We need to display help for each of the modes. + case $opt_mode in + "") + # Generic help is extracted from the usage comments + # at the start of this file. + func_help + ;; + + clean) + $ECHO \ +"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... + +Remove files from the build directory. + +RM is the name of the program to use to delete files associated with each FILE +(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed +to RM. + +If FILE is a libtool library, object or program, all the files associated +with it are deleted. Otherwise, only FILE itself is deleted using RM." + ;; + + compile) + $ECHO \ +"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE + +Compile a source file into a libtool library object. + +This mode accepts the following additional options: + + -o OUTPUT-FILE set the output file name to OUTPUT-FILE + -no-suppress do not suppress compiler output for multiple passes + -prefer-pic try to build PIC objects only + -prefer-non-pic try to build non-PIC objects only + -shared do not build a \`.o' file suitable for static linking + -static only build a \`.o' file suitable for static linking + -Wc,FLAG pass FLAG directly to the compiler + +COMPILE-COMMAND is a command to be used in creating a \`standard' object file +from the given SOURCEFILE. + +The output file name is determined by removing the directory component from +SOURCEFILE, then substituting the C source code suffix \`.c' with the +library object suffix, \`.lo'." + ;; + + execute) + $ECHO \ +"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... + +Automatically set library path, then run a program. + +This mode accepts the following additional options: + + -dlopen FILE add the directory containing FILE to the library path + +This mode sets the library path environment variable according to \`-dlopen' +flags. + +If any of the ARGS are libtool executable wrappers, then they are translated +into their corresponding uninstalled binary, and any of their required library +directories are added to the library path. + +Then, COMMAND is executed, with ARGS as arguments." + ;; + + finish) + $ECHO \ +"Usage: $progname [OPTION]... --mode=finish [LIBDIR]... + +Complete the installation of libtool libraries. + +Each LIBDIR is a directory that contains libtool libraries. + +The commands that this mode executes may require superuser privileges. Use +the \`--dry-run' option if you just want to see what would be executed." + ;; + + install) + $ECHO \ +"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... + +Install executables or libraries. + +INSTALL-COMMAND is the installation command. The first component should be +either the \`install' or \`cp' program. + +The following components of INSTALL-COMMAND are treated specially: + + -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation + +The rest of the components are interpreted as arguments to that command (only +BSD-compatible install options are recognized)." + ;; + + link) + $ECHO \ +"Usage: $progname [OPTION]... --mode=link LINK-COMMAND... + +Link object files or libraries together to form another library, or to +create an executable program. + +LINK-COMMAND is a command using the C compiler that you would use to create +a program from several object files. + +The following components of LINK-COMMAND are treated specially: + + -all-static do not do any dynamic linking at all + -avoid-version do not add a version suffix if possible + -bindir BINDIR specify path to binaries directory (for systems where + libraries must be found in the PATH setting at runtime) + -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime + -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols + -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) + -export-symbols SYMFILE + try to export only the symbols listed in SYMFILE + -export-symbols-regex REGEX + try to export only the symbols matching REGEX + -LLIBDIR search LIBDIR for required installed libraries + -lNAME OUTPUT-FILE requires the installed library libNAME + -module build a library that can dlopened + -no-fast-install disable the fast-install mode + -no-install link a not-installable executable + -no-undefined declare that a library does not refer to external symbols + -o OUTPUT-FILE create OUTPUT-FILE from the specified objects + -objectlist FILE Use a list of object files found in FILE to specify objects + -precious-files-regex REGEX + don't remove output files matching REGEX + -release RELEASE specify package release information + -rpath LIBDIR the created library will eventually be installed in LIBDIR + -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries + -shared only do dynamic linking of libtool libraries + -shrext SUFFIX override the standard shared library file extension + -static do not do any dynamic linking of uninstalled libtool libraries + -static-libtool-libs + do not do any dynamic linking of libtool libraries + -version-info CURRENT[:REVISION[:AGE]] + specify library version info [each variable defaults to 0] + -weak LIBNAME declare that the target provides the LIBNAME interface + -Wc,FLAG + -Xcompiler FLAG pass linker-specific FLAG directly to the compiler + -Wl,FLAG + -Xlinker FLAG pass linker-specific FLAG directly to the linker + -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) + +All other options (arguments beginning with \`-') are ignored. + +Every other argument is treated as a filename. Files ending in \`.la' are +treated as uninstalled libtool libraries, other files are standard or library +object files. + +If the OUTPUT-FILE ends in \`.la', then a libtool library is created, +only library objects (\`.lo' files) may be specified, and \`-rpath' is +required, except when creating a convenience library. + +If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created +using \`ar' and \`ranlib', or on Windows using \`lib'. + +If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file +is created, otherwise an executable program is created." + ;; + + uninstall) + $ECHO \ +"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... + +Remove libraries from an installation directory. + +RM is the name of the program to use to delete files associated with each FILE +(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed +to RM. + +If FILE is a libtool library, all the files associated with it are deleted. +Otherwise, only FILE itself is deleted using RM." + ;; + + *) + func_fatal_help "invalid operation mode \`$opt_mode'" + ;; + esac + + echo + $ECHO "Try \`$progname --help' for more information about other modes." +} + +# Now that we've collected a possible --mode arg, show help if necessary +if $opt_help; then + if test "$opt_help" = :; then + func_mode_help + else + { + func_help noexit + for opt_mode in compile link execute install finish uninstall clean; do + func_mode_help + done + } | sed -n '1p; 2,$s/^Usage:/ or: /p' + { + func_help noexit + for opt_mode in compile link execute install finish uninstall clean; do + echo + func_mode_help + done + } | + sed '1d + /^When reporting/,/^Report/{ + H + d + } + $x + /information about other modes/d + /more detailed .*MODE/d + s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' + fi + exit $? +fi + + +# func_mode_execute arg... +func_mode_execute () +{ + $opt_debug + # The first argument is the command name. + cmd="$nonopt" + test -z "$cmd" && \ + func_fatal_help "you must specify a COMMAND" + + # Handle -dlopen flags immediately. + for file in $opt_dlopen; do + test -f "$file" \ + || func_fatal_help "\`$file' is not a file" + + dir= + case $file in + *.la) + func_resolve_sysroot "$file" + file=$func_resolve_sysroot_result + + # Check to see that this really is a libtool archive. + func_lalib_unsafe_p "$file" \ + || func_fatal_help "\`$lib' is not a valid libtool archive" + + # Read the libtool library. + dlname= + library_names= + func_source "$file" + + # Skip this library if it cannot be dlopened. + if test -z "$dlname"; then + # Warn if it was a shared library. + test -n "$library_names" && \ + func_warning "\`$file' was not linked with \`-export-dynamic'" + continue + fi + + func_dirname "$file" "" "." + dir="$func_dirname_result" + + if test -f "$dir/$objdir/$dlname"; then + func_append dir "/$objdir" + else + if test ! -f "$dir/$dlname"; then + func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" + fi + fi + ;; + + *.lo) + # Just add the directory containing the .lo file. + func_dirname "$file" "" "." + dir="$func_dirname_result" + ;; + + *) + func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" + continue + ;; + esac + + # Get the absolute pathname. + absdir=`cd "$dir" && pwd` + test -n "$absdir" && dir="$absdir" + + # Now add the directory to shlibpath_var. + if eval "test -z \"\$$shlibpath_var\""; then + eval "$shlibpath_var=\"\$dir\"" + else + eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" + fi + done + + # This variable tells wrapper scripts just to set shlibpath_var + # rather than running their programs. + libtool_execute_magic="$magic" + + # Check if any of the arguments is a wrapper script. + args= + for file + do + case $file in + -* | *.la | *.lo ) ;; + *) + # Do a test to see if this is really a libtool program. + if func_ltwrapper_script_p "$file"; then + func_source "$file" + # Transform arg to wrapped name. + file="$progdir/$program" + elif func_ltwrapper_executable_p "$file"; then + func_ltwrapper_scriptname "$file" + func_source "$func_ltwrapper_scriptname_result" + # Transform arg to wrapped name. + file="$progdir/$program" + fi + ;; + esac + # Quote arguments (to preserve shell metacharacters). + func_append_quoted args "$file" + done + + if test "X$opt_dry_run" = Xfalse; then + if test -n "$shlibpath_var"; then + # Export the shlibpath_var. + eval "export $shlibpath_var" + fi + + # Restore saved environment variables + for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES + do + eval "if test \"\${save_$lt_var+set}\" = set; then + $lt_var=\$save_$lt_var; export $lt_var + else + $lt_unset $lt_var + fi" + done + + # Now prepare to actually exec the command. + exec_cmd="\$cmd$args" + else + # Display what would be done. + if test -n "$shlibpath_var"; then + eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" + echo "export $shlibpath_var" + fi + $ECHO "$cmd$args" + exit $EXIT_SUCCESS + fi +} + +test "$opt_mode" = execute && func_mode_execute ${1+"$@"} + + +# func_mode_finish arg... +func_mode_finish () +{ + $opt_debug + libs= + libdirs= + admincmds= + + for opt in "$nonopt" ${1+"$@"} + do + if test -d "$opt"; then + func_append libdirs " $opt" + + elif test -f "$opt"; then + if func_lalib_unsafe_p "$opt"; then + func_append libs " $opt" + else + func_warning "\`$opt' is not a valid libtool archive" + fi + + else + func_fatal_error "invalid argument \`$opt'" + fi + done + + if test -n "$libs"; then + if test -n "$lt_sysroot"; then + sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` + sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" + else + sysroot_cmd= + fi + + # Remove sysroot references + if $opt_dry_run; then + for lib in $libs; do + echo "removing references to $lt_sysroot and \`=' prefixes from $lib" + done + else + tmpdir=`func_mktempdir` + for lib in $libs; do + sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ + > $tmpdir/tmp-la + mv -f $tmpdir/tmp-la $lib + done + ${RM}r "$tmpdir" + fi + fi + + if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then + for libdir in $libdirs; do + if test -n "$finish_cmds"; then + # Do each command in the finish commands. + func_execute_cmds "$finish_cmds" 'admincmds="$admincmds +'"$cmd"'"' + fi + if test -n "$finish_eval"; then + # Do the single finish_eval. + eval cmds=\"$finish_eval\" + $opt_dry_run || eval "$cmds" || func_append admincmds " + $cmds" + fi + done + fi + + # Exit here if they wanted silent mode. + $opt_silent && exit $EXIT_SUCCESS + + if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then + echo "----------------------------------------------------------------------" + echo "Libraries have been installed in:" + for libdir in $libdirs; do + $ECHO " $libdir" + done + echo + echo "If you ever happen to want to link against installed libraries" + echo "in a given directory, LIBDIR, you must either use libtool, and" + echo "specify the full pathname of the library, or use the \`-LLIBDIR'" + echo "flag during linking and do at least one of the following:" + if test -n "$shlibpath_var"; then + echo " - add LIBDIR to the \`$shlibpath_var' environment variable" + echo " during execution" + fi + if test -n "$runpath_var"; then + echo " - add LIBDIR to the \`$runpath_var' environment variable" + echo " during linking" + fi + if test -n "$hardcode_libdir_flag_spec"; then + libdir=LIBDIR + eval flag=\"$hardcode_libdir_flag_spec\" + + $ECHO " - use the \`$flag' linker flag" + fi + if test -n "$admincmds"; then + $ECHO " - have your system administrator run these commands:$admincmds" + fi + if test -f /etc/ld.so.conf; then + echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" + fi + echo + + echo "See any operating system documentation about shared libraries for" + case $host in + solaris2.[6789]|solaris2.1[0-9]) + echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" + echo "pages." + ;; + *) + echo "more information, such as the ld(1) and ld.so(8) manual pages." + ;; + esac + echo "----------------------------------------------------------------------" + fi + exit $EXIT_SUCCESS +} + +test "$opt_mode" = finish && func_mode_finish ${1+"$@"} + + +# func_mode_install arg... +func_mode_install () +{ + $opt_debug + # There may be an optional sh(1) argument at the beginning of + # install_prog (especially on Windows NT). + if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || + # Allow the use of GNU shtool's install command. + case $nonopt in *shtool*) :;; *) false;; esac; then + # Aesthetically quote it. + func_quote_for_eval "$nonopt" + install_prog="$func_quote_for_eval_result " + arg=$1 + shift + else + install_prog= + arg=$nonopt + fi + + # The real first argument should be the name of the installation program. + # Aesthetically quote it. + func_quote_for_eval "$arg" + func_append install_prog "$func_quote_for_eval_result" + install_shared_prog=$install_prog + case " $install_prog " in + *[\\\ /]cp\ *) install_cp=: ;; + *) install_cp=false ;; + esac + + # We need to accept at least all the BSD install flags. + dest= + files= + opts= + prev= + install_type= + isdir=no + stripme= + no_mode=: + for arg + do + arg2= + if test -n "$dest"; then + func_append files " $dest" + dest=$arg + continue + fi + + case $arg in + -d) isdir=yes ;; + -f) + if $install_cp; then :; else + prev=$arg + fi + ;; + -g | -m | -o) + prev=$arg + ;; + -s) + stripme=" -s" + continue + ;; + -*) + ;; + *) + # If the previous option needed an argument, then skip it. + if test -n "$prev"; then + if test "x$prev" = x-m && test -n "$install_override_mode"; then + arg2=$install_override_mode + no_mode=false + fi + prev= + else + dest=$arg + continue + fi + ;; + esac + + # Aesthetically quote the argument. + func_quote_for_eval "$arg" + func_append install_prog " $func_quote_for_eval_result" + if test -n "$arg2"; then + func_quote_for_eval "$arg2" + fi + func_append install_shared_prog " $func_quote_for_eval_result" + done + + test -z "$install_prog" && \ + func_fatal_help "you must specify an install program" + + test -n "$prev" && \ + func_fatal_help "the \`$prev' option requires an argument" + + if test -n "$install_override_mode" && $no_mode; then + if $install_cp; then :; else + func_quote_for_eval "$install_override_mode" + func_append install_shared_prog " -m $func_quote_for_eval_result" + fi + fi + + if test -z "$files"; then + if test -z "$dest"; then + func_fatal_help "no file or destination specified" + else + func_fatal_help "you must specify a destination" + fi + fi + + # Strip any trailing slash from the destination. + func_stripname '' '/' "$dest" + dest=$func_stripname_result + + # Check to see that the destination is a directory. + test -d "$dest" && isdir=yes + if test "$isdir" = yes; then + destdir="$dest" + destname= + else + func_dirname_and_basename "$dest" "" "." + destdir="$func_dirname_result" + destname="$func_basename_result" + + # Not a directory, so check to see that there is only one file specified. + set dummy $files; shift + test "$#" -gt 1 && \ + func_fatal_help "\`$dest' is not a directory" + fi + case $destdir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + for file in $files; do + case $file in + *.lo) ;; + *) + func_fatal_help "\`$destdir' must be an absolute directory name" + ;; + esac + done + ;; + esac + + # This variable tells wrapper scripts just to set variables rather + # than running their programs. + libtool_install_magic="$magic" + + staticlibs= + future_libdirs= + current_libdirs= + for file in $files; do + + # Do each installation. + case $file in + *.$libext) + # Do the static libraries later. + func_append staticlibs " $file" + ;; + + *.la) + func_resolve_sysroot "$file" + file=$func_resolve_sysroot_result + + # Check to see that this really is a libtool archive. + func_lalib_unsafe_p "$file" \ + || func_fatal_help "\`$file' is not a valid libtool archive" + + library_names= + old_library= + relink_command= + func_source "$file" + + # Add the libdir to current_libdirs if it is the destination. + if test "X$destdir" = "X$libdir"; then + case "$current_libdirs " in + *" $libdir "*) ;; + *) func_append current_libdirs " $libdir" ;; + esac + else + # Note the libdir as a future libdir. + case "$future_libdirs " in + *" $libdir "*) ;; + *) func_append future_libdirs " $libdir" ;; + esac + fi + + func_dirname "$file" "/" "" + dir="$func_dirname_result" + func_append dir "$objdir" + + if test -n "$relink_command"; then + # Determine the prefix the user has applied to our future dir. + inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` + + # Don't allow the user to place us outside of our expected + # location b/c this prevents finding dependent libraries that + # are installed to the same prefix. + # At present, this check doesn't affect windows .dll's that + # are installed into $libdir/../bin (currently, that works fine) + # but it's something to keep an eye on. + test "$inst_prefix_dir" = "$destdir" && \ + func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" + + if test -n "$inst_prefix_dir"; then + # Stick the inst_prefix_dir data into the link command. + relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` + else + relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` + fi + + func_warning "relinking \`$file'" + func_show_eval "$relink_command" \ + 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' + fi + + # See the names of the shared library. + set dummy $library_names; shift + if test -n "$1"; then + realname="$1" + shift + + srcname="$realname" + test -n "$relink_command" && srcname="$realname"T + + # Install the shared library and build the symlinks. + func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ + 'exit $?' + tstripme="$stripme" + case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + case $realname in + *.dll.a) + tstripme="" + ;; + esac + ;; + esac + if test -n "$tstripme" && test -n "$striplib"; then + func_show_eval "$striplib $destdir/$realname" 'exit $?' + fi + + if test "$#" -gt 0; then + # Delete the old symlinks, and create new ones. + # Try `ln -sf' first, because the `ln' binary might depend on + # the symlink we replace! Solaris /bin/ln does not understand -f, + # so we also need to try rm && ln -s. + for linkname + do + test "$linkname" != "$realname" \ + && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" + done + fi + + # Do each command in the postinstall commands. + lib="$destdir/$realname" + func_execute_cmds "$postinstall_cmds" 'exit $?' + fi + + # Install the pseudo-library for information purposes. + func_basename "$file" + name="$func_basename_result" + instname="$dir/$name"i + func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' + + # Maybe install the static library, too. + test -n "$old_library" && func_append staticlibs " $dir/$old_library" + ;; + + *.lo) + # Install (i.e. copy) a libtool object. + + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile="$destdir/$destname" + else + func_basename "$file" + destfile="$func_basename_result" + destfile="$destdir/$destfile" + fi + + # Deduce the name of the destination old-style object file. + case $destfile in + *.lo) + func_lo2o "$destfile" + staticdest=$func_lo2o_result + ;; + *.$objext) + staticdest="$destfile" + destfile= + ;; + *) + func_fatal_help "cannot copy a libtool object to \`$destfile'" + ;; + esac + + # Install the libtool object if requested. + test -n "$destfile" && \ + func_show_eval "$install_prog $file $destfile" 'exit $?' + + # Install the old object if enabled. + if test "$build_old_libs" = yes; then + # Deduce the name of the old-style object file. + func_lo2o "$file" + staticobj=$func_lo2o_result + func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' + fi + exit $EXIT_SUCCESS + ;; + + *) + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile="$destdir/$destname" + else + func_basename "$file" + destfile="$func_basename_result" + destfile="$destdir/$destfile" + fi + + # If the file is missing, and there is a .exe on the end, strip it + # because it is most likely a libtool script we actually want to + # install + stripped_ext="" + case $file in + *.exe) + if test ! -f "$file"; then + func_stripname '' '.exe' "$file" + file=$func_stripname_result + stripped_ext=".exe" + fi + ;; + esac + + # Do a test to see if this is really a libtool program. + case $host in + *cygwin* | *mingw*) + if func_ltwrapper_executable_p "$file"; then + func_ltwrapper_scriptname "$file" + wrapper=$func_ltwrapper_scriptname_result + else + func_stripname '' '.exe' "$file" + wrapper=$func_stripname_result + fi + ;; + *) + wrapper=$file + ;; + esac + if func_ltwrapper_script_p "$wrapper"; then + notinst_deplibs= + relink_command= + + func_source "$wrapper" + + # Check the variables that should have been set. + test -z "$generated_by_libtool_version" && \ + func_fatal_error "invalid libtool wrapper script \`$wrapper'" + + finalize=yes + for lib in $notinst_deplibs; do + # Check to see that each library is installed. + libdir= + if test -f "$lib"; then + func_source "$lib" + fi + libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test + if test -n "$libdir" && test ! -f "$libfile"; then + func_warning "\`$lib' has not been installed in \`$libdir'" + finalize=no + fi + done + + relink_command= + func_source "$wrapper" + + outputname= + if test "$fast_install" = no && test -n "$relink_command"; then + $opt_dry_run || { + if test "$finalize" = yes; then + tmpdir=`func_mktempdir` + func_basename "$file$stripped_ext" + file="$func_basename_result" + outputname="$tmpdir/$file" + # Replace the output file specification. + relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` + + $opt_silent || { + func_quote_for_expand "$relink_command" + eval "func_echo $func_quote_for_expand_result" + } + if eval "$relink_command"; then : + else + func_error "error: relink \`$file' with the above command before installing it" + $opt_dry_run || ${RM}r "$tmpdir" + continue + fi + file="$outputname" + else + func_warning "cannot relink \`$file'" + fi + } + else + # Install the binary that we compiled earlier. + file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` + fi + fi + + # remove .exe since cygwin /usr/bin/install will append another + # one anyway + case $install_prog,$host in + */usr/bin/install*,*cygwin*) + case $file:$destfile in + *.exe:*.exe) + # this is ok + ;; + *.exe:*) + destfile=$destfile.exe + ;; + *:*.exe) + func_stripname '' '.exe' "$destfile" + destfile=$func_stripname_result + ;; + esac + ;; + esac + func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' + $opt_dry_run || if test -n "$outputname"; then + ${RM}r "$tmpdir" + fi + ;; + esac + done + + for file in $staticlibs; do + func_basename "$file" + name="$func_basename_result" + + # Set up the ranlib parameters. + oldlib="$destdir/$name" + func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 + tool_oldlib=$func_to_tool_file_result + + func_show_eval "$install_prog \$file \$oldlib" 'exit $?' + + if test -n "$stripme" && test -n "$old_striplib"; then + func_show_eval "$old_striplib $tool_oldlib" 'exit $?' + fi + + # Do each command in the postinstall commands. + func_execute_cmds "$old_postinstall_cmds" 'exit $?' + done + + test -n "$future_libdirs" && \ + func_warning "remember to run \`$progname --finish$future_libdirs'" + + if test -n "$current_libdirs"; then + # Maybe just do a dry run. + $opt_dry_run && current_libdirs=" -n$current_libdirs" + exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' + else + exit $EXIT_SUCCESS + fi +} + +test "$opt_mode" = install && func_mode_install ${1+"$@"} + + +# func_generate_dlsyms outputname originator pic_p +# Extract symbols from dlprefiles and create ${outputname}S.o with +# a dlpreopen symbol table. +func_generate_dlsyms () +{ + $opt_debug + my_outputname="$1" + my_originator="$2" + my_pic_p="${3-no}" + my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` + my_dlsyms= + + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + if test -n "$NM" && test -n "$global_symbol_pipe"; then + my_dlsyms="${my_outputname}S.c" + else + func_error "not configured to extract global symbols from dlpreopened files" + fi + fi + + if test -n "$my_dlsyms"; then + case $my_dlsyms in + "") ;; + *.c) + # Discover the nlist of each of the dlfiles. + nlist="$output_objdir/${my_outputname}.nm" + + func_show_eval "$RM $nlist ${nlist}S ${nlist}T" + + # Parse the name list into a source file. + func_verbose "creating $output_objdir/$my_dlsyms" + + $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ +/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ +/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ + +#ifdef __cplusplus +extern \"C\" { +#endif + +#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) +#pragma GCC diagnostic ignored \"-Wstrict-prototypes\" +#endif + +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) +/* DATA imports from DLLs on WIN32 con't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ +# define LT_DLSYM_CONST +#elif defined(__osf__) +/* This system does not cope well with relocations in const data. */ +# define LT_DLSYM_CONST +#else +# define LT_DLSYM_CONST const +#endif + +/* External symbol declarations for the compiler. */\ +" + + if test "$dlself" = yes; then + func_verbose "generating symbol list for \`$output'" + + $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" + + # Add our own program objects to the symbol list. + progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` + for progfile in $progfiles; do + func_to_tool_file "$progfile" func_convert_file_msys_to_w32 + func_verbose "extracting global C symbols from \`$func_to_tool_file_result'" + $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" + done + + if test -n "$exclude_expsyms"; then + $opt_dry_run || { + eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + } + fi + + if test -n "$export_symbols_regex"; then + $opt_dry_run || { + eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + } + fi + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + export_symbols="$output_objdir/$outputname.exp" + $opt_dry_run || { + $RM $export_symbols + eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' + case $host in + *cygwin* | *mingw* | *cegcc* ) + eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' + ;; + esac + } + else + $opt_dry_run || { + eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' + eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + case $host in + *cygwin* | *mingw* | *cegcc* ) + eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' + ;; + esac + } + fi + fi + + for dlprefile in $dlprefiles; do + func_verbose "extracting global C symbols from \`$dlprefile'" + func_basename "$dlprefile" + name="$func_basename_result" + case $host in + *cygwin* | *mingw* | *cegcc* ) + # if an import library, we need to obtain dlname + if func_win32_import_lib_p "$dlprefile"; then + func_tr_sh "$dlprefile" + eval "curr_lafile=\$libfile_$func_tr_sh_result" + dlprefile_dlbasename="" + if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then + # Use subshell, to avoid clobbering current variable values + dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` + if test -n "$dlprefile_dlname" ; then + func_basename "$dlprefile_dlname" + dlprefile_dlbasename="$func_basename_result" + else + # no lafile. user explicitly requested -dlpreopen . + $sharedlib_from_linklib_cmd "$dlprefile" + dlprefile_dlbasename=$sharedlib_from_linklib_result + fi + fi + $opt_dry_run || { + if test -n "$dlprefile_dlbasename" ; then + eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' + else + func_warning "Could not compute DLL name from $name" + eval '$ECHO ": $name " >> "$nlist"' + fi + func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 + eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | + $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" + } + else # not an import lib + $opt_dry_run || { + eval '$ECHO ": $name " >> "$nlist"' + func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 + eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" + } + fi + ;; + *) + $opt_dry_run || { + eval '$ECHO ": $name " >> "$nlist"' + func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 + eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" + } + ;; + esac + done + + $opt_dry_run || { + # Make sure we have at least an empty file. + test -f "$nlist" || : > "$nlist" + + if test -n "$exclude_expsyms"; then + $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T + $MV "$nlist"T "$nlist" + fi + + # Try sorting and uniquifying the output. + if $GREP -v "^: " < "$nlist" | + if sort -k 3 /dev/null 2>&1; then + sort -k 3 + else + sort +2 + fi | + uniq > "$nlist"S; then + : + else + $GREP -v "^: " < "$nlist" > "$nlist"S + fi + + if test -f "$nlist"S; then + eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' + else + echo '/* NONE */' >> "$output_objdir/$my_dlsyms" + fi + + echo >> "$output_objdir/$my_dlsyms" "\ + +/* The mapping between symbol names and symbols. */ +typedef struct { + const char *name; + void *address; +} lt_dlsymlist; +extern LT_DLSYM_CONST lt_dlsymlist +lt_${my_prefix}_LTX_preloaded_symbols[]; +LT_DLSYM_CONST lt_dlsymlist +lt_${my_prefix}_LTX_preloaded_symbols[] = +{\ + { \"$my_originator\", (void *) 0 }," + + case $need_lib_prefix in + no) + eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" + ;; + *) + eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" + ;; + esac + echo >> "$output_objdir/$my_dlsyms" "\ + {0, (void *) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt_${my_prefix}_LTX_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif\ +" + } # !$opt_dry_run + + pic_flag_for_symtable= + case "$compile_command " in + *" -static "*) ;; + *) + case $host in + # compiling the symbol table file with pic_flag works around + # a FreeBSD bug that causes programs to crash when -lm is + # linked before any other PIC object. But we must not use + # pic_flag when linking with -static. The problem exists in + # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. + *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) + pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; + *-*-hpux*) + pic_flag_for_symtable=" $pic_flag" ;; + *) + if test "X$my_pic_p" != Xno; then + pic_flag_for_symtable=" $pic_flag" + fi + ;; + esac + ;; + esac + symtab_cflags= + for arg in $LTCFLAGS; do + case $arg in + -pie | -fpie | -fPIE) ;; + *) func_append symtab_cflags " $arg" ;; + esac + done + + # Now compile the dynamic symbol file. + func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' + + # Clean up the generated files. + func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' + + # Transform the symbol file into the correct name. + symfileobj="$output_objdir/${my_outputname}S.$objext" + case $host in + *cygwin* | *mingw* | *cegcc* ) + if test -f "$output_objdir/$my_outputname.def"; then + compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` + else + compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` + fi + ;; + *) + compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` + ;; + esac + ;; + *) + func_fatal_error "unknown suffix for \`$my_dlsyms'" + ;; + esac + else + # We keep going just in case the user didn't refer to + # lt_preloaded_symbols. The linker will fail if global_symbol_pipe + # really was required. + + # Nullify the symbol file. + compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` + fi +} + +# func_win32_libid arg +# return the library type of file 'arg' +# +# Need a lot of goo to handle *both* DLLs and import libs +# Has to be a shell function in order to 'eat' the argument +# that is supplied when $file_magic_command is called. +# Despite the name, also deal with 64 bit binaries. +func_win32_libid () +{ + $opt_debug + win32_libid_type="unknown" + win32_fileres=`file -L $1 2>/dev/null` + case $win32_fileres in + *ar\ archive\ import\ library*) # definitely import + win32_libid_type="x86 archive import" + ;; + *ar\ archive*) # could be an import, or static + # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. + if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | + $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then + func_to_tool_file "$1" func_convert_file_msys_to_w32 + win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | + $SED -n -e ' + 1,100{ + / I /{ + s,.*,import, + p + q + } + }'` + case $win32_nmres in + import*) win32_libid_type="x86 archive import";; + *) win32_libid_type="x86 archive static";; + esac + fi + ;; + *DLL*) + win32_libid_type="x86 DLL" + ;; + *executable*) # but shell scripts are "executable" too... + case $win32_fileres in + *MS\ Windows\ PE\ Intel*) + win32_libid_type="x86 DLL" + ;; + esac + ;; + esac + $ECHO "$win32_libid_type" +} + +# func_cygming_dll_for_implib ARG +# +# Platform-specific function to extract the +# name of the DLL associated with the specified +# import library ARG. +# Invoked by eval'ing the libtool variable +# $sharedlib_from_linklib_cmd +# Result is available in the variable +# $sharedlib_from_linklib_result +func_cygming_dll_for_implib () +{ + $opt_debug + sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` +} + +# func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs +# +# The is the core of a fallback implementation of a +# platform-specific function to extract the name of the +# DLL associated with the specified import library LIBNAME. +# +# SECTION_NAME is either .idata$6 or .idata$7, depending +# on the platform and compiler that created the implib. +# +# Echos the name of the DLL associated with the +# specified import library. +func_cygming_dll_for_implib_fallback_core () +{ + $opt_debug + match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` + $OBJDUMP -s --section "$1" "$2" 2>/dev/null | + $SED '/^Contents of section '"$match_literal"':/{ + # Place marker at beginning of archive member dllname section + s/.*/====MARK====/ + p + d + } + # These lines can sometimes be longer than 43 characters, but + # are always uninteresting + /:[ ]*file format pe[i]\{,1\}-/d + /^In archive [^:]*:/d + # Ensure marker is printed + /^====MARK====/p + # Remove all lines with less than 43 characters + /^.\{43\}/!d + # From remaining lines, remove first 43 characters + s/^.\{43\}//' | + $SED -n ' + # Join marker and all lines until next marker into a single line + /^====MARK====/ b para + H + $ b para + b + :para + x + s/\n//g + # Remove the marker + s/^====MARK====// + # Remove trailing dots and whitespace + s/[\. \t]*$// + # Print + /./p' | + # we now have a list, one entry per line, of the stringified + # contents of the appropriate section of all members of the + # archive which possess that section. Heuristic: eliminate + # all those which have a first or second character that is + # a '.' (that is, objdump's representation of an unprintable + # character.) This should work for all archives with less than + # 0x302f exports -- but will fail for DLLs whose name actually + # begins with a literal '.' or a single character followed by + # a '.'. + # + # Of those that remain, print the first one. + $SED -e '/^\./d;/^.\./d;q' +} + +# func_cygming_gnu_implib_p ARG +# This predicate returns with zero status (TRUE) if +# ARG is a GNU/binutils-style import library. Returns +# with nonzero status (FALSE) otherwise. +func_cygming_gnu_implib_p () +{ + $opt_debug + func_to_tool_file "$1" func_convert_file_msys_to_w32 + func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` + test -n "$func_cygming_gnu_implib_tmp" +} + +# func_cygming_ms_implib_p ARG +# This predicate returns with zero status (TRUE) if +# ARG is an MS-style import library. Returns +# with nonzero status (FALSE) otherwise. +func_cygming_ms_implib_p () +{ + $opt_debug + func_to_tool_file "$1" func_convert_file_msys_to_w32 + func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` + test -n "$func_cygming_ms_implib_tmp" +} + +# func_cygming_dll_for_implib_fallback ARG +# Platform-specific function to extract the +# name of the DLL associated with the specified +# import library ARG. +# +# This fallback implementation is for use when $DLLTOOL +# does not support the --identify-strict option. +# Invoked by eval'ing the libtool variable +# $sharedlib_from_linklib_cmd +# Result is available in the variable +# $sharedlib_from_linklib_result +func_cygming_dll_for_implib_fallback () +{ + $opt_debug + if func_cygming_gnu_implib_p "$1" ; then + # binutils import library + sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` + elif func_cygming_ms_implib_p "$1" ; then + # ms-generated import library + sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` + else + # unknown + sharedlib_from_linklib_result="" + fi +} + + +# func_extract_an_archive dir oldlib +func_extract_an_archive () +{ + $opt_debug + f_ex_an_ar_dir="$1"; shift + f_ex_an_ar_oldlib="$1" + if test "$lock_old_archive_extraction" = yes; then + lockfile=$f_ex_an_ar_oldlib.lock + until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do + func_echo "Waiting for $lockfile to be removed" + sleep 2 + done + fi + func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ + 'stat=$?; rm -f "$lockfile"; exit $stat' + if test "$lock_old_archive_extraction" = yes; then + $opt_dry_run || rm -f "$lockfile" + fi + if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then + : + else + func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" + fi +} + + +# func_extract_archives gentop oldlib ... +func_extract_archives () +{ + $opt_debug + my_gentop="$1"; shift + my_oldlibs=${1+"$@"} + my_oldobjs="" + my_xlib="" + my_xabs="" + my_xdir="" + + for my_xlib in $my_oldlibs; do + # Extract the objects. + case $my_xlib in + [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; + *) my_xabs=`pwd`"/$my_xlib" ;; + esac + func_basename "$my_xlib" + my_xlib="$func_basename_result" + my_xlib_u=$my_xlib + while :; do + case " $extracted_archives " in + *" $my_xlib_u "*) + func_arith $extracted_serial + 1 + extracted_serial=$func_arith_result + my_xlib_u=lt$extracted_serial-$my_xlib ;; + *) break ;; + esac + done + extracted_archives="$extracted_archives $my_xlib_u" + my_xdir="$my_gentop/$my_xlib_u" + + func_mkdir_p "$my_xdir" + + case $host in + *-darwin*) + func_verbose "Extracting $my_xabs" + # Do not bother doing anything if just a dry run + $opt_dry_run || { + darwin_orig_dir=`pwd` + cd $my_xdir || exit $? + darwin_archive=$my_xabs + darwin_curdir=`pwd` + darwin_base_archive=`basename "$darwin_archive"` + darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` + if test -n "$darwin_arches"; then + darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` + darwin_arch= + func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" + for darwin_arch in $darwin_arches ; do + func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" + $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" + cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" + func_extract_an_archive "`pwd`" "${darwin_base_archive}" + cd "$darwin_curdir" + $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" + done # $darwin_arches + ## Okay now we've a bunch of thin objects, gotta fatten them up :) + darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` + darwin_file= + darwin_files= + for darwin_file in $darwin_filelist; do + darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` + $LIPO -create -output "$darwin_file" $darwin_files + done # $darwin_filelist + $RM -rf unfat-$$ + cd "$darwin_orig_dir" + else + cd $darwin_orig_dir + func_extract_an_archive "$my_xdir" "$my_xabs" + fi # $darwin_arches + } # !$opt_dry_run + ;; + *) + func_extract_an_archive "$my_xdir" "$my_xabs" + ;; + esac + my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` + done + + func_extract_archives_result="$my_oldobjs" +} + + +# func_emit_wrapper [arg=no] +# +# Emit a libtool wrapper script on stdout. +# Don't directly open a file because we may want to +# incorporate the script contents within a cygwin/mingw +# wrapper executable. Must ONLY be called from within +# func_mode_link because it depends on a number of variables +# set therein. +# +# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR +# variable will take. If 'yes', then the emitted script +# will assume that the directory in which it is stored is +# the $objdir directory. This is a cygwin/mingw-specific +# behavior. +func_emit_wrapper () +{ + func_emit_wrapper_arg1=${1-no} + + $ECHO "\ +#! $SHELL + +# $output - temporary wrapper script for $objdir/$outputname +# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION +# +# The $output program cannot be directly executed until all the libtool +# libraries that it depends on are installed. +# +# This wrapper script should never be moved out of the build directory. +# If it is, it will not operate correctly. + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +sed_quote_subst='$sed_quote_subst' + +# Be Bourne compatible +if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +relink_command=\"$relink_command\" + +# This environment variable determines our operation mode. +if test \"\$libtool_install_magic\" = \"$magic\"; then + # install mode needs the following variables: + generated_by_libtool_version='$macro_version' + notinst_deplibs='$notinst_deplibs' +else + # When we are sourced in execute mode, \$file and \$ECHO are already set. + if test \"\$libtool_execute_magic\" != \"$magic\"; then + file=\"\$0\"" + + qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` + $ECHO "\ + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +\$1 +_LTECHO_EOF' +} + ECHO=\"$qECHO\" + fi + +# Very basic option parsing. These options are (a) specific to +# the libtool wrapper, (b) are identical between the wrapper +# /script/ and the wrapper /executable/ which is used only on +# windows platforms, and (c) all begin with the string "--lt-" +# (application programs are unlikely to have options which match +# this pattern). +# +# There are only two supported options: --lt-debug and +# --lt-dump-script. There is, deliberately, no --lt-help. +# +# The first argument to this parsing function should be the +# script's $0 value, followed by "$@". +lt_option_debug= +func_parse_lt_options () +{ + lt_script_arg0=\$0 + shift + for lt_opt + do + case \"\$lt_opt\" in + --lt-debug) lt_option_debug=1 ;; + --lt-dump-script) + lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` + test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. + lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` + cat \"\$lt_dump_D/\$lt_dump_F\" + exit 0 + ;; + --lt-*) + \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 + exit 1 + ;; + esac + done + + # Print the debug banner immediately: + if test -n \"\$lt_option_debug\"; then + echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2 + fi +} + +# Used when --lt-debug. Prints its arguments to stdout +# (redirection is the responsibility of the caller) +func_lt_dump_args () +{ + lt_dump_args_N=1; + for lt_arg + do + \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\" + lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` + done +} + +# Core function for launching the target application +func_exec_program_core () +{ +" + case $host in + # Backslashes separate directories on plain windows + *-*-mingw | *-*-os2* | *-cegcc*) + $ECHO "\ + if test -n \"\$lt_option_debug\"; then + \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2 + func_lt_dump_args \${1+\"\$@\"} 1>&2 + fi + exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} +" + ;; + + *) + $ECHO "\ + if test -n \"\$lt_option_debug\"; then + \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2 + func_lt_dump_args \${1+\"\$@\"} 1>&2 + fi + exec \"\$progdir/\$program\" \${1+\"\$@\"} +" + ;; + esac + $ECHO "\ + \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 + exit 1 +} + +# A function to encapsulate launching the target application +# Strips options in the --lt-* namespace from \$@ and +# launches target application with the remaining arguments. +func_exec_program () +{ + case \" \$* \" in + *\\ --lt-*) + for lt_wr_arg + do + case \$lt_wr_arg in + --lt-*) ;; + *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; + esac + shift + done ;; + esac + func_exec_program_core \${1+\"\$@\"} +} + + # Parse options + func_parse_lt_options \"\$0\" \${1+\"\$@\"} + + # Find the directory that this script lives in. + thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` + test \"x\$thisdir\" = \"x\$file\" && thisdir=. + + # Follow symbolic links until we get to the real thisdir. + file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` + while test -n \"\$file\"; do + destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` + + # If there was a directory component, then change thisdir. + if test \"x\$destdir\" != \"x\$file\"; then + case \"\$destdir\" in + [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; + *) thisdir=\"\$thisdir/\$destdir\" ;; + esac + fi + + file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` + file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` + done + + # Usually 'no', except on cygwin/mingw when embedded into + # the cwrapper. + WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 + if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then + # special case for '.' + if test \"\$thisdir\" = \".\"; then + thisdir=\`pwd\` + fi + # remove .libs from thisdir + case \"\$thisdir\" in + *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; + $objdir ) thisdir=. ;; + esac + fi + + # Try to get the absolute directory name. + absdir=\`cd \"\$thisdir\" && pwd\` + test -n \"\$absdir\" && thisdir=\"\$absdir\" +" + + if test "$fast_install" = yes; then + $ECHO "\ + program=lt-'$outputname'$exeext + progdir=\"\$thisdir/$objdir\" + + if test ! -f \"\$progdir/\$program\" || + { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ + test \"X\$file\" != \"X\$progdir/\$program\"; }; then + + file=\"\$\$-\$program\" + + if test ! -d \"\$progdir\"; then + $MKDIR \"\$progdir\" + else + $RM \"\$progdir/\$file\" + fi" + + $ECHO "\ + + # relink executable if necessary + if test -n \"\$relink_command\"; then + if relink_command_output=\`eval \$relink_command 2>&1\`; then : + else + $ECHO \"\$relink_command_output\" >&2 + $RM \"\$progdir/\$file\" + exit 1 + fi + fi + + $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || + { $RM \"\$progdir/\$program\"; + $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } + $RM \"\$progdir/\$file\" + fi" + else + $ECHO "\ + program='$outputname' + progdir=\"\$thisdir/$objdir\" +" + fi + + $ECHO "\ + + if test -f \"\$progdir/\$program\"; then" + + # fixup the dll searchpath if we need to. + # + # Fix the DLL searchpath if we need to. Do this before prepending + # to shlibpath, because on Windows, both are PATH and uninstalled + # libraries must come first. + if test -n "$dllsearchpath"; then + $ECHO "\ + # Add the dll search path components to the executable PATH + PATH=$dllsearchpath:\$PATH +" + fi + + # Export our shlibpath_var if we have one. + if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then + $ECHO "\ + # Add our own library path to $shlibpath_var + $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" + + # Some systems cannot cope with colon-terminated $shlibpath_var + # The second colon is a workaround for a bug in BeOS R4 sed + $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` + + export $shlibpath_var +" + fi + + $ECHO "\ + if test \"\$libtool_execute_magic\" != \"$magic\"; then + # Run the actual program with our arguments. + func_exec_program \${1+\"\$@\"} + fi + else + # The program doesn't exist. + \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 + \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 + \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 + exit 1 + fi +fi\ +" +} + + +# func_emit_cwrapperexe_src +# emit the source code for a wrapper executable on stdout +# Must ONLY be called from within func_mode_link because +# it depends on a number of variable set therein. +func_emit_cwrapperexe_src () +{ + cat < +#include +#ifdef _MSC_VER +# include +# include +# include +#else +# include +# include +# ifdef __CYGWIN__ +# include +# endif +#endif +#include +#include +#include +#include +#include +#include +#include +#include + +/* declarations of non-ANSI functions */ +#if defined(__MINGW32__) +# ifdef __STRICT_ANSI__ +int _putenv (const char *); +# endif +#elif defined(__CYGWIN__) +# ifdef __STRICT_ANSI__ +char *realpath (const char *, char *); +int putenv (char *); +int setenv (const char *, const char *, int); +# endif +/* #elif defined (other platforms) ... */ +#endif + +/* portability defines, excluding path handling macros */ +#if defined(_MSC_VER) +# define setmode _setmode +# define stat _stat +# define chmod _chmod +# define getcwd _getcwd +# define putenv _putenv +# define S_IXUSR _S_IEXEC +# ifndef _INTPTR_T_DEFINED +# define _INTPTR_T_DEFINED +# define intptr_t int +# endif +#elif defined(__MINGW32__) +# define setmode _setmode +# define stat _stat +# define chmod _chmod +# define getcwd _getcwd +# define putenv _putenv +#elif defined(__CYGWIN__) +# define HAVE_SETENV +# define FOPEN_WB "wb" +/* #elif defined (other platforms) ... */ +#endif + +#if defined(PATH_MAX) +# define LT_PATHMAX PATH_MAX +#elif defined(MAXPATHLEN) +# define LT_PATHMAX MAXPATHLEN +#else +# define LT_PATHMAX 1024 +#endif + +#ifndef S_IXOTH +# define S_IXOTH 0 +#endif +#ifndef S_IXGRP +# define S_IXGRP 0 +#endif + +/* path handling portability macros */ +#ifndef DIR_SEPARATOR +# define DIR_SEPARATOR '/' +# define PATH_SEPARATOR ':' +#endif + +#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ + defined (__OS2__) +# define HAVE_DOS_BASED_FILE_SYSTEM +# define FOPEN_WB "wb" +# ifndef DIR_SEPARATOR_2 +# define DIR_SEPARATOR_2 '\\' +# endif +# ifndef PATH_SEPARATOR_2 +# define PATH_SEPARATOR_2 ';' +# endif +#endif + +#ifndef DIR_SEPARATOR_2 +# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) +#else /* DIR_SEPARATOR_2 */ +# define IS_DIR_SEPARATOR(ch) \ + (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) +#endif /* DIR_SEPARATOR_2 */ + +#ifndef PATH_SEPARATOR_2 +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) +#else /* PATH_SEPARATOR_2 */ +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) +#endif /* PATH_SEPARATOR_2 */ + +#ifndef FOPEN_WB +# define FOPEN_WB "w" +#endif +#ifndef _O_BINARY +# define _O_BINARY 0 +#endif + +#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) +#define XFREE(stale) do { \ + if (stale) { free ((void *) stale); stale = 0; } \ +} while (0) + +#if defined(LT_DEBUGWRAPPER) +static int lt_debug = 1; +#else +static int lt_debug = 0; +#endif + +const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ + +void *xmalloc (size_t num); +char *xstrdup (const char *string); +const char *base_name (const char *name); +char *find_executable (const char *wrapper); +char *chase_symlinks (const char *pathspec); +int make_executable (const char *path); +int check_executable (const char *path); +char *strendzap (char *str, const char *pat); +void lt_debugprintf (const char *file, int line, const char *fmt, ...); +void lt_fatal (const char *file, int line, const char *message, ...); +static const char *nonnull (const char *s); +static const char *nonempty (const char *s); +void lt_setenv (const char *name, const char *value); +char *lt_extend_str (const char *orig_value, const char *add, int to_end); +void lt_update_exe_path (const char *name, const char *value); +void lt_update_lib_path (const char *name, const char *value); +char **prepare_spawn (char **argv); +void lt_dump_script (FILE *f); +EOF + + cat <= 0) + && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) + return 1; + else + return 0; +} + +int +make_executable (const char *path) +{ + int rval = 0; + struct stat st; + + lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", + nonempty (path)); + if ((!path) || (!*path)) + return 0; + + if (stat (path, &st) >= 0) + { + rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); + } + return rval; +} + +/* Searches for the full path of the wrapper. Returns + newly allocated full path name if found, NULL otherwise + Does not chase symlinks, even on platforms that support them. +*/ +char * +find_executable (const char *wrapper) +{ + int has_slash = 0; + const char *p; + const char *p_next; + /* static buffer for getcwd */ + char tmp[LT_PATHMAX + 1]; + int tmp_len; + char *concat_name; + + lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", + nonempty (wrapper)); + + if ((wrapper == NULL) || (*wrapper == '\0')) + return NULL; + + /* Absolute path? */ +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') + { + concat_name = xstrdup (wrapper); + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + } + else + { +#endif + if (IS_DIR_SEPARATOR (wrapper[0])) + { + concat_name = xstrdup (wrapper); + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + } +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + } +#endif + + for (p = wrapper; *p; p++) + if (*p == '/') + { + has_slash = 1; + break; + } + if (!has_slash) + { + /* no slashes; search PATH */ + const char *path = getenv ("PATH"); + if (path != NULL) + { + for (p = path; *p; p = p_next) + { + const char *q; + size_t p_len; + for (q = p; *q; q++) + if (IS_PATH_SEPARATOR (*q)) + break; + p_len = q - p; + p_next = (*q == '\0' ? q : q + 1); + if (p_len == 0) + { + /* empty path: current directory */ + if (getcwd (tmp, LT_PATHMAX) == NULL) + lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", + nonnull (strerror (errno))); + tmp_len = strlen (tmp); + concat_name = + XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); + memcpy (concat_name, tmp, tmp_len); + concat_name[tmp_len] = '/'; + strcpy (concat_name + tmp_len + 1, wrapper); + } + else + { + concat_name = + XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); + memcpy (concat_name, p, p_len); + concat_name[p_len] = '/'; + strcpy (concat_name + p_len + 1, wrapper); + } + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + } + } + /* not found in PATH; assume curdir */ + } + /* Relative path | not found in path: prepend cwd */ + if (getcwd (tmp, LT_PATHMAX) == NULL) + lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", + nonnull (strerror (errno))); + tmp_len = strlen (tmp); + concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); + memcpy (concat_name, tmp, tmp_len); + concat_name[tmp_len] = '/'; + strcpy (concat_name + tmp_len + 1, wrapper); + + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + return NULL; +} + +char * +chase_symlinks (const char *pathspec) +{ +#ifndef S_ISLNK + return xstrdup (pathspec); +#else + char buf[LT_PATHMAX]; + struct stat s; + char *tmp_pathspec = xstrdup (pathspec); + char *p; + int has_symlinks = 0; + while (strlen (tmp_pathspec) && !has_symlinks) + { + lt_debugprintf (__FILE__, __LINE__, + "checking path component for symlinks: %s\n", + tmp_pathspec); + if (lstat (tmp_pathspec, &s) == 0) + { + if (S_ISLNK (s.st_mode) != 0) + { + has_symlinks = 1; + break; + } + + /* search backwards for last DIR_SEPARATOR */ + p = tmp_pathspec + strlen (tmp_pathspec) - 1; + while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) + p--; + if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) + { + /* no more DIR_SEPARATORS left */ + break; + } + *p = '\0'; + } + else + { + lt_fatal (__FILE__, __LINE__, + "error accessing file \"%s\": %s", + tmp_pathspec, nonnull (strerror (errno))); + } + } + XFREE (tmp_pathspec); + + if (!has_symlinks) + { + return xstrdup (pathspec); + } + + tmp_pathspec = realpath (pathspec, buf); + if (tmp_pathspec == 0) + { + lt_fatal (__FILE__, __LINE__, + "could not follow symlinks for %s", pathspec); + } + return xstrdup (tmp_pathspec); +#endif +} + +char * +strendzap (char *str, const char *pat) +{ + size_t len, patlen; + + assert (str != NULL); + assert (pat != NULL); + + len = strlen (str); + patlen = strlen (pat); + + if (patlen <= len) + { + str += len - patlen; + if (strcmp (str, pat) == 0) + *str = '\0'; + } + return str; +} + +void +lt_debugprintf (const char *file, int line, const char *fmt, ...) +{ + va_list args; + if (lt_debug) + { + (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); + va_start (args, fmt); + (void) vfprintf (stderr, fmt, args); + va_end (args); + } +} + +static void +lt_error_core (int exit_status, const char *file, + int line, const char *mode, + const char *message, va_list ap) +{ + fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); + vfprintf (stderr, message, ap); + fprintf (stderr, ".\n"); + + if (exit_status >= 0) + exit (exit_status); +} + +void +lt_fatal (const char *file, int line, const char *message, ...) +{ + va_list ap; + va_start (ap, message); + lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); + va_end (ap); +} + +static const char * +nonnull (const char *s) +{ + return s ? s : "(null)"; +} + +static const char * +nonempty (const char *s) +{ + return (s && !*s) ? "(empty)" : nonnull (s); +} + +void +lt_setenv (const char *name, const char *value) +{ + lt_debugprintf (__FILE__, __LINE__, + "(lt_setenv) setting '%s' to '%s'\n", + nonnull (name), nonnull (value)); + { +#ifdef HAVE_SETENV + /* always make a copy, for consistency with !HAVE_SETENV */ + char *str = xstrdup (value); + setenv (name, str, 1); +#else + int len = strlen (name) + 1 + strlen (value) + 1; + char *str = XMALLOC (char, len); + sprintf (str, "%s=%s", name, value); + if (putenv (str) != EXIT_SUCCESS) + { + XFREE (str); + } +#endif + } +} + +char * +lt_extend_str (const char *orig_value, const char *add, int to_end) +{ + char *new_value; + if (orig_value && *orig_value) + { + int orig_value_len = strlen (orig_value); + int add_len = strlen (add); + new_value = XMALLOC (char, add_len + orig_value_len + 1); + if (to_end) + { + strcpy (new_value, orig_value); + strcpy (new_value + orig_value_len, add); + } + else + { + strcpy (new_value, add); + strcpy (new_value + add_len, orig_value); + } + } + else + { + new_value = xstrdup (add); + } + return new_value; +} + +void +lt_update_exe_path (const char *name, const char *value) +{ + lt_debugprintf (__FILE__, __LINE__, + "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", + nonnull (name), nonnull (value)); + + if (name && *name && value && *value) + { + char *new_value = lt_extend_str (getenv (name), value, 0); + /* some systems can't cope with a ':'-terminated path #' */ + int len = strlen (new_value); + while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) + { + new_value[len-1] = '\0'; + } + lt_setenv (name, new_value); + XFREE (new_value); + } +} + +void +lt_update_lib_path (const char *name, const char *value) +{ + lt_debugprintf (__FILE__, __LINE__, + "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", + nonnull (name), nonnull (value)); + + if (name && *name && value && *value) + { + char *new_value = lt_extend_str (getenv (name), value, 0); + lt_setenv (name, new_value); + XFREE (new_value); + } +} + +EOF + case $host_os in + mingw*) + cat <<"EOF" + +/* Prepares an argument vector before calling spawn(). + Note that spawn() does not by itself call the command interpreter + (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : + ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); + GetVersionEx(&v); + v.dwPlatformId == VER_PLATFORM_WIN32_NT; + }) ? "cmd.exe" : "command.com"). + Instead it simply concatenates the arguments, separated by ' ', and calls + CreateProcess(). We must quote the arguments since Win32 CreateProcess() + interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a + special way: + - Space and tab are interpreted as delimiters. They are not treated as + delimiters if they are surrounded by double quotes: "...". + - Unescaped double quotes are removed from the input. Their only effect is + that within double quotes, space and tab are treated like normal + characters. + - Backslashes not followed by double quotes are not special. + - But 2*n+1 backslashes followed by a double quote become + n backslashes followed by a double quote (n >= 0): + \" -> " + \\\" -> \" + \\\\\" -> \\" + */ +#define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" +#define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" +char ** +prepare_spawn (char **argv) +{ + size_t argc; + char **new_argv; + size_t i; + + /* Count number of arguments. */ + for (argc = 0; argv[argc] != NULL; argc++) + ; + + /* Allocate new argument vector. */ + new_argv = XMALLOC (char *, argc + 1); + + /* Put quoted arguments into the new argument vector. */ + for (i = 0; i < argc; i++) + { + const char *string = argv[i]; + + if (string[0] == '\0') + new_argv[i] = xstrdup ("\"\""); + else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) + { + int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); + size_t length; + unsigned int backslashes; + const char *s; + char *quoted_string; + char *p; + + length = 0; + backslashes = 0; + if (quote_around) + length++; + for (s = string; *s != '\0'; s++) + { + char c = *s; + if (c == '"') + length += backslashes + 1; + length++; + if (c == '\\') + backslashes++; + else + backslashes = 0; + } + if (quote_around) + length += backslashes + 1; + + quoted_string = XMALLOC (char, length + 1); + + p = quoted_string; + backslashes = 0; + if (quote_around) + *p++ = '"'; + for (s = string; *s != '\0'; s++) + { + char c = *s; + if (c == '"') + { + unsigned int j; + for (j = backslashes + 1; j > 0; j--) + *p++ = '\\'; + } + *p++ = c; + if (c == '\\') + backslashes++; + else + backslashes = 0; + } + if (quote_around) + { + unsigned int j; + for (j = backslashes; j > 0; j--) + *p++ = '\\'; + *p++ = '"'; + } + *p = '\0'; + + new_argv[i] = quoted_string; + } + else + new_argv[i] = (char *) string; + } + new_argv[argc] = NULL; + + return new_argv; +} +EOF + ;; + esac + + cat <<"EOF" +void lt_dump_script (FILE* f) +{ +EOF + func_emit_wrapper yes | + $SED -n -e ' +s/^\(.\{79\}\)\(..*\)/\1\ +\2/ +h +s/\([\\"]\)/\\\1/g +s/$/\\n/ +s/\([^\n]*\).*/ fputs ("\1", f);/p +g +D' + cat <<"EOF" +} +EOF +} +# end: func_emit_cwrapperexe_src + +# func_win32_import_lib_p ARG +# True if ARG is an import lib, as indicated by $file_magic_cmd +func_win32_import_lib_p () +{ + $opt_debug + case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in + *import*) : ;; + *) false ;; + esac +} + +# func_mode_link arg... +func_mode_link () +{ + $opt_debug + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + # It is impossible to link a dll without this setting, and + # we shouldn't force the makefile maintainer to figure out + # which system we are compiling for in order to pass an extra + # flag for every libtool invocation. + # allow_undefined=no + + # FIXME: Unfortunately, there are problems with the above when trying + # to make a dll which has undefined symbols, in which case not + # even a static library is built. For now, we need to specify + # -no-undefined on the libtool link line when we can be certain + # that all symbols are satisfied, otherwise we get a static library. + allow_undefined=yes + ;; + *) + allow_undefined=yes + ;; + esac + libtool_args=$nonopt + base_compile="$nonopt $@" + compile_command=$nonopt + finalize_command=$nonopt + + compile_rpath= + finalize_rpath= + compile_shlibpath= + finalize_shlibpath= + convenience= + old_convenience= + deplibs= + old_deplibs= + compiler_flags= + linker_flags= + dllsearchpath= + lib_search_path=`pwd` + inst_prefix_dir= + new_inherited_linker_flags= + + avoid_version=no + bindir= + dlfiles= + dlprefiles= + dlself=no + export_dynamic=no + export_symbols= + export_symbols_regex= + generated= + libobjs= + ltlibs= + module=no + no_install=no + objs= + non_pic_objects= + precious_files_regex= + prefer_static_libs=no + preload=no + prev= + prevarg= + release= + rpath= + xrpath= + perm_rpath= + temp_rpath= + thread_safe=no + vinfo= + vinfo_number=no + weak_libs= + single_module="${wl}-single_module" + func_infer_tag $base_compile + + # We need to know -static, to get the right output filenames. + for arg + do + case $arg in + -shared) + test "$build_libtool_libs" != yes && \ + func_fatal_configuration "can not build a shared library" + build_old_libs=no + break + ;; + -all-static | -static | -static-libtool-libs) + case $arg in + -all-static) + if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then + func_warning "complete static linking is impossible in this configuration" + fi + if test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=yes + ;; + -static) + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=built + ;; + -static-libtool-libs) + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=yes + ;; + esac + build_libtool_libs=no + build_old_libs=yes + break + ;; + esac + done + + # See if our shared archives depend on static archives. + test -n "$old_archive_from_new_cmds" && build_old_libs=yes + + # Go through the arguments, transforming them on the way. + while test "$#" -gt 0; do + arg="$1" + shift + func_quote_for_eval "$arg" + qarg=$func_quote_for_eval_unquoted_result + func_append libtool_args " $func_quote_for_eval_result" + + # If the previous option needs an argument, assign it. + if test -n "$prev"; then + case $prev in + output) + func_append compile_command " @OUTPUT@" + func_append finalize_command " @OUTPUT@" + ;; + esac + + case $prev in + bindir) + bindir="$arg" + prev= + continue + ;; + dlfiles|dlprefiles) + if test "$preload" = no; then + # Add the symbol object into the linking commands. + func_append compile_command " @SYMFILE@" + func_append finalize_command " @SYMFILE@" + preload=yes + fi + case $arg in + *.la | *.lo) ;; # We handle these cases below. + force) + if test "$dlself" = no; then + dlself=needless + export_dynamic=yes + fi + prev= + continue + ;; + self) + if test "$prev" = dlprefiles; then + dlself=yes + elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then + dlself=yes + else + dlself=needless + export_dynamic=yes + fi + prev= + continue + ;; + *) + if test "$prev" = dlfiles; then + func_append dlfiles " $arg" + else + func_append dlprefiles " $arg" + fi + prev= + continue + ;; + esac + ;; + expsyms) + export_symbols="$arg" + test -f "$arg" \ + || func_fatal_error "symbol file \`$arg' does not exist" + prev= + continue + ;; + expsyms_regex) + export_symbols_regex="$arg" + prev= + continue + ;; + framework) + case $host in + *-*-darwin*) + case "$deplibs " in + *" $qarg.ltframework "*) ;; + *) func_append deplibs " $qarg.ltframework" # this is fixed later + ;; + esac + ;; + esac + prev= + continue + ;; + inst_prefix) + inst_prefix_dir="$arg" + prev= + continue + ;; + objectlist) + if test -f "$arg"; then + save_arg=$arg + moreargs= + for fil in `cat "$save_arg"` + do +# func_append moreargs " $fil" + arg=$fil + # A libtool-controlled object. + + # Check to see that this really is a libtool object. + if func_lalib_unsafe_p "$arg"; then + pic_object= + non_pic_object= + + # Read the .lo file + func_source "$arg" + + if test -z "$pic_object" || + test -z "$non_pic_object" || + test "$pic_object" = none && + test "$non_pic_object" = none; then + func_fatal_error "cannot find name of object for \`$arg'" + fi + + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir="$func_dirname_result" + + if test "$pic_object" != none; then + # Prepend the subdirectory the object is found in. + pic_object="$xdir$pic_object" + + if test "$prev" = dlfiles; then + if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then + func_append dlfiles " $pic_object" + prev= + continue + else + # If libtool objects are unsupported, then we need to preload. + prev=dlprefiles + fi + fi + + # CHECK ME: I think I busted this. -Ossama + if test "$prev" = dlprefiles; then + # Preload the old-style object. + func_append dlprefiles " $pic_object" + prev= + fi + + # A PIC object. + func_append libobjs " $pic_object" + arg="$pic_object" + fi + + # Non-PIC object. + if test "$non_pic_object" != none; then + # Prepend the subdirectory the object is found in. + non_pic_object="$xdir$non_pic_object" + + # A standard non-PIC object + func_append non_pic_objects " $non_pic_object" + if test -z "$pic_object" || test "$pic_object" = none ; then + arg="$non_pic_object" + fi + else + # If the PIC object exists, use it instead. + # $xdir was prepended to $pic_object above. + non_pic_object="$pic_object" + func_append non_pic_objects " $non_pic_object" + fi + else + # Only an error if not doing a dry-run. + if $opt_dry_run; then + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir="$func_dirname_result" + + func_lo2o "$arg" + pic_object=$xdir$objdir/$func_lo2o_result + non_pic_object=$xdir$func_lo2o_result + func_append libobjs " $pic_object" + func_append non_pic_objects " $non_pic_object" + else + func_fatal_error "\`$arg' is not a valid libtool object" + fi + fi + done + else + func_fatal_error "link input file \`$arg' does not exist" + fi + arg=$save_arg + prev= + continue + ;; + precious_regex) + precious_files_regex="$arg" + prev= + continue + ;; + release) + release="-$arg" + prev= + continue + ;; + rpath | xrpath) + # We need an absolute path. + case $arg in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + func_fatal_error "only absolute run-paths are allowed" + ;; + esac + if test "$prev" = rpath; then + case "$rpath " in + *" $arg "*) ;; + *) func_append rpath " $arg" ;; + esac + else + case "$xrpath " in + *" $arg "*) ;; + *) func_append xrpath " $arg" ;; + esac + fi + prev= + continue + ;; + shrext) + shrext_cmds="$arg" + prev= + continue + ;; + weak) + func_append weak_libs " $arg" + prev= + continue + ;; + xcclinker) + func_append linker_flags " $qarg" + func_append compiler_flags " $qarg" + prev= + func_append compile_command " $qarg" + func_append finalize_command " $qarg" + continue + ;; + xcompiler) + func_append compiler_flags " $qarg" + prev= + func_append compile_command " $qarg" + func_append finalize_command " $qarg" + continue + ;; + xlinker) + func_append linker_flags " $qarg" + func_append compiler_flags " $wl$qarg" + prev= + func_append compile_command " $wl$qarg" + func_append finalize_command " $wl$qarg" + continue + ;; + *) + eval "$prev=\"\$arg\"" + prev= + continue + ;; + esac + fi # test -n "$prev" + + prevarg="$arg" + + case $arg in + -all-static) + if test -n "$link_static_flag"; then + # See comment for -static flag below, for more details. + func_append compile_command " $link_static_flag" + func_append finalize_command " $link_static_flag" + fi + continue + ;; + + -allow-undefined) + # FIXME: remove this flag sometime in the future. + func_fatal_error "\`-allow-undefined' must not be used because it is the default" + ;; + + -avoid-version) + avoid_version=yes + continue + ;; + + -bindir) + prev=bindir + continue + ;; + + -dlopen) + prev=dlfiles + continue + ;; + + -dlpreopen) + prev=dlprefiles + continue + ;; + + -export-dynamic) + export_dynamic=yes + continue + ;; + + -export-symbols | -export-symbols-regex) + if test -n "$export_symbols" || test -n "$export_symbols_regex"; then + func_fatal_error "more than one -exported-symbols argument is not allowed" + fi + if test "X$arg" = "X-export-symbols"; then + prev=expsyms + else + prev=expsyms_regex + fi + continue + ;; + + -framework) + prev=framework + continue + ;; + + -inst-prefix-dir) + prev=inst_prefix + continue + ;; + + # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* + # so, if we see these flags be careful not to treat them like -L + -L[A-Z][A-Z]*:*) + case $with_gcc/$host in + no/*-*-irix* | /*-*-irix*) + func_append compile_command " $arg" + func_append finalize_command " $arg" + ;; + esac + continue + ;; + + -L*) + func_stripname "-L" '' "$arg" + if test -z "$func_stripname_result"; then + if test "$#" -gt 0; then + func_fatal_error "require no space between \`-L' and \`$1'" + else + func_fatal_error "need path for \`-L' option" + fi + fi + func_resolve_sysroot "$func_stripname_result" + dir=$func_resolve_sysroot_result + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + absdir=`cd "$dir" && pwd` + test -z "$absdir" && \ + func_fatal_error "cannot determine absolute directory name of \`$dir'" + dir="$absdir" + ;; + esac + case "$deplibs " in + *" -L$dir "* | *" $arg "*) + # Will only happen for absolute or sysroot arguments + ;; + *) + # Preserve sysroot, but never include relative directories + case $dir in + [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; + *) func_append deplibs " -L$dir" ;; + esac + func_append lib_search_path " $dir" + ;; + esac + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$dir:"*) ;; + ::) dllsearchpath=$dir;; + *) func_append dllsearchpath ":$dir";; + esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + ::) dllsearchpath=$testbindir;; + *) func_append dllsearchpath ":$testbindir";; + esac + ;; + esac + continue + ;; + + -l*) + if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) + # These systems don't actually have a C or math library (as such) + continue + ;; + *-*-os2*) + # These systems don't actually have a C library (as such) + test "X$arg" = "X-lc" && continue + ;; + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc due to us having libc/libc_r. + test "X$arg" = "X-lc" && continue + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C and math libraries are in the System framework + func_append deplibs " System.ltframework" + continue + ;; + *-*-sco3.2v5* | *-*-sco5v6*) + # Causes problems with __ctype + test "X$arg" = "X-lc" && continue + ;; + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) + # Compiler inserts libc in the correct place for threads to work + test "X$arg" = "X-lc" && continue + ;; + esac + elif test "X$arg" = "X-lc_r"; then + case $host in + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc_r directly, use -pthread flag. + continue + ;; + esac + fi + func_append deplibs " $arg" + continue + ;; + + -module) + module=yes + continue + ;; + + # Tru64 UNIX uses -model [arg] to determine the layout of C++ + # classes, name mangling, and exception handling. + # Darwin uses the -arch flag to determine output architecture. + -model|-arch|-isysroot|--sysroot) + func_append compiler_flags " $arg" + func_append compile_command " $arg" + func_append finalize_command " $arg" + prev=xcompiler + continue + ;; + + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ + |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) + func_append compiler_flags " $arg" + func_append compile_command " $arg" + func_append finalize_command " $arg" + case "$new_inherited_linker_flags " in + *" $arg "*) ;; + * ) func_append new_inherited_linker_flags " $arg" ;; + esac + continue + ;; + + -multi_module) + single_module="${wl}-multi_module" + continue + ;; + + -no-fast-install) + fast_install=no + continue + ;; + + -no-install) + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) + # The PATH hackery in wrapper scripts is required on Windows + # and Darwin in order for the loader to find any dlls it needs. + func_warning "\`-no-install' is ignored for $host" + func_warning "assuming \`-no-fast-install' instead" + fast_install=no + ;; + *) no_install=yes ;; + esac + continue + ;; + + -no-undefined) + allow_undefined=no + continue + ;; + + -objectlist) + prev=objectlist + continue + ;; + + -o) prev=output ;; + + -precious-files-regex) + prev=precious_regex + continue + ;; + + -release) + prev=release + continue + ;; + + -rpath) + prev=rpath + continue + ;; + + -R) + prev=xrpath + continue + ;; + + -R*) + func_stripname '-R' '' "$arg" + dir=$func_stripname_result + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + =*) + func_stripname '=' '' "$dir" + dir=$lt_sysroot$func_stripname_result + ;; + *) + func_fatal_error "only absolute run-paths are allowed" + ;; + esac + case "$xrpath " in + *" $dir "*) ;; + *) func_append xrpath " $dir" ;; + esac + continue + ;; + + -shared) + # The effects of -shared are defined in a previous loop. + continue + ;; + + -shrext) + prev=shrext + continue + ;; + + -static | -static-libtool-libs) + # The effects of -static are defined in a previous loop. + # We used to do the same as -all-static on platforms that + # didn't have a PIC flag, but the assumption that the effects + # would be equivalent was wrong. It would break on at least + # Digital Unix and AIX. + continue + ;; + + -thread-safe) + thread_safe=yes + continue + ;; + + -version-info) + prev=vinfo + continue + ;; + + -version-number) + prev=vinfo + vinfo_number=yes + continue + ;; + + -weak) + prev=weak + continue + ;; + + -Wc,*) + func_stripname '-Wc,' '' "$arg" + args=$func_stripname_result + arg= + save_ifs="$IFS"; IFS=',' + for flag in $args; do + IFS="$save_ifs" + func_quote_for_eval "$flag" + func_append arg " $func_quote_for_eval_result" + func_append compiler_flags " $func_quote_for_eval_result" + done + IFS="$save_ifs" + func_stripname ' ' '' "$arg" + arg=$func_stripname_result + ;; + + -Wl,*) + func_stripname '-Wl,' '' "$arg" + args=$func_stripname_result + arg= + save_ifs="$IFS"; IFS=',' + for flag in $args; do + IFS="$save_ifs" + func_quote_for_eval "$flag" + func_append arg " $wl$func_quote_for_eval_result" + func_append compiler_flags " $wl$func_quote_for_eval_result" + func_append linker_flags " $func_quote_for_eval_result" + done + IFS="$save_ifs" + func_stripname ' ' '' "$arg" + arg=$func_stripname_result + ;; + + -Xcompiler) + prev=xcompiler + continue + ;; + + -Xlinker) + prev=xlinker + continue + ;; + + -XCClinker) + prev=xcclinker + continue + ;; + + # -msg_* for osf cc + -msg_*) + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + ;; + + # Flags to be passed through unchanged, with rationale: + # -64, -mips[0-9] enable 64-bit mode for the SGI compiler + # -r[0-9][0-9]* specify processor for the SGI compiler + # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler + # +DA*, +DD* enable 64-bit mode for the HP compiler + # -q* compiler args for the IBM compiler + # -m*, -t[45]*, -txscale* architecture-specific flags for GCC + # -F/path path to uninstalled frameworks, gcc on darwin + # -p, -pg, --coverage, -fprofile-* profiling flags for GCC + # @file GCC response files + # -tp=* Portland pgcc target processor selection + # --sysroot=* for sysroot support + # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization + -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ + -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ + -O*|-flto*|-fwhopr*|-fuse-linker-plugin) + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + func_append compile_command " $arg" + func_append finalize_command " $arg" + func_append compiler_flags " $arg" + continue + ;; + + # Some other compiler flag. + -* | +*) + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + ;; + + *.$objext) + # A standard object. + func_append objs " $arg" + ;; + + *.lo) + # A libtool-controlled object. + + # Check to see that this really is a libtool object. + if func_lalib_unsafe_p "$arg"; then + pic_object= + non_pic_object= + + # Read the .lo file + func_source "$arg" + + if test -z "$pic_object" || + test -z "$non_pic_object" || + test "$pic_object" = none && + test "$non_pic_object" = none; then + func_fatal_error "cannot find name of object for \`$arg'" + fi + + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir="$func_dirname_result" + + if test "$pic_object" != none; then + # Prepend the subdirectory the object is found in. + pic_object="$xdir$pic_object" + + if test "$prev" = dlfiles; then + if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then + func_append dlfiles " $pic_object" + prev= + continue + else + # If libtool objects are unsupported, then we need to preload. + prev=dlprefiles + fi + fi + + # CHECK ME: I think I busted this. -Ossama + if test "$prev" = dlprefiles; then + # Preload the old-style object. + func_append dlprefiles " $pic_object" + prev= + fi + + # A PIC object. + func_append libobjs " $pic_object" + arg="$pic_object" + fi + + # Non-PIC object. + if test "$non_pic_object" != none; then + # Prepend the subdirectory the object is found in. + non_pic_object="$xdir$non_pic_object" + + # A standard non-PIC object + func_append non_pic_objects " $non_pic_object" + if test -z "$pic_object" || test "$pic_object" = none ; then + arg="$non_pic_object" + fi + else + # If the PIC object exists, use it instead. + # $xdir was prepended to $pic_object above. + non_pic_object="$pic_object" + func_append non_pic_objects " $non_pic_object" + fi + else + # Only an error if not doing a dry-run. + if $opt_dry_run; then + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir="$func_dirname_result" + + func_lo2o "$arg" + pic_object=$xdir$objdir/$func_lo2o_result + non_pic_object=$xdir$func_lo2o_result + func_append libobjs " $pic_object" + func_append non_pic_objects " $non_pic_object" + else + func_fatal_error "\`$arg' is not a valid libtool object" + fi + fi + ;; + + *.$libext) + # An archive. + func_append deplibs " $arg" + func_append old_deplibs " $arg" + continue + ;; + + *.la) + # A libtool-controlled library. + + func_resolve_sysroot "$arg" + if test "$prev" = dlfiles; then + # This library was specified with -dlopen. + func_append dlfiles " $func_resolve_sysroot_result" + prev= + elif test "$prev" = dlprefiles; then + # The library was specified with -dlpreopen. + func_append dlprefiles " $func_resolve_sysroot_result" + prev= + else + func_append deplibs " $func_resolve_sysroot_result" + fi + continue + ;; + + # Some other compiler argument. + *) + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + ;; + esac # arg + + # Now actually substitute the argument into the commands. + if test -n "$arg"; then + func_append compile_command " $arg" + func_append finalize_command " $arg" + fi + done # argument parsing loop + + test -n "$prev" && \ + func_fatal_help "the \`$prevarg' option requires an argument" + + if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then + eval arg=\"$export_dynamic_flag_spec\" + func_append compile_command " $arg" + func_append finalize_command " $arg" + fi + + oldlibs= + # calculate the name of the file, without its directory + func_basename "$output" + outputname="$func_basename_result" + libobjs_save="$libobjs" + + if test -n "$shlibpath_var"; then + # get the directories listed in $shlibpath_var + eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\` + else + shlib_search_path= + fi + eval sys_lib_search_path=\"$sys_lib_search_path_spec\" + eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" + + func_dirname "$output" "/" "" + output_objdir="$func_dirname_result$objdir" + func_to_tool_file "$output_objdir/" + tool_output_objdir=$func_to_tool_file_result + # Create the object directory. + func_mkdir_p "$output_objdir" + + # Determine the type of output + case $output in + "") + func_fatal_help "you must specify an output file" + ;; + *.$libext) linkmode=oldlib ;; + *.lo | *.$objext) linkmode=obj ;; + *.la) linkmode=lib ;; + *) linkmode=prog ;; # Anything else should be a program. + esac + + specialdeplibs= + + libs= + # Find all interdependent deplibs by searching for libraries + # that are linked more than once (e.g. -la -lb -la) + for deplib in $deplibs; do + if $opt_preserve_dup_deps ; then + case "$libs " in + *" $deplib "*) func_append specialdeplibs " $deplib" ;; + esac + fi + func_append libs " $deplib" + done + + if test "$linkmode" = lib; then + libs="$predeps $libs $compiler_lib_search_path $postdeps" + + # Compute libraries that are listed more than once in $predeps + # $postdeps and mark them as special (i.e., whose duplicates are + # not to be eliminated). + pre_post_deps= + if $opt_duplicate_compiler_generated_deps; then + for pre_post_dep in $predeps $postdeps; do + case "$pre_post_deps " in + *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; + esac + func_append pre_post_deps " $pre_post_dep" + done + fi + pre_post_deps= + fi + + deplibs= + newdependency_libs= + newlib_search_path= + need_relink=no # whether we're linking any uninstalled libtool libraries + notinst_deplibs= # not-installed libtool libraries + notinst_path= # paths that contain not-installed libtool libraries + + case $linkmode in + lib) + passes="conv dlpreopen link" + for file in $dlfiles $dlprefiles; do + case $file in + *.la) ;; + *) + func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" + ;; + esac + done + ;; + prog) + compile_deplibs= + finalize_deplibs= + alldeplibs=no + newdlfiles= + newdlprefiles= + passes="conv scan dlopen dlpreopen link" + ;; + *) passes="conv" + ;; + esac + + for pass in $passes; do + # The preopen pass in lib mode reverses $deplibs; put it back here + # so that -L comes before libs that need it for instance... + if test "$linkmode,$pass" = "lib,link"; then + ## FIXME: Find the place where the list is rebuilt in the wrong + ## order, and fix it there properly + tmp_deplibs= + for deplib in $deplibs; do + tmp_deplibs="$deplib $tmp_deplibs" + done + deplibs="$tmp_deplibs" + fi + + if test "$linkmode,$pass" = "lib,link" || + test "$linkmode,$pass" = "prog,scan"; then + libs="$deplibs" + deplibs= + fi + if test "$linkmode" = prog; then + case $pass in + dlopen) libs="$dlfiles" ;; + dlpreopen) libs="$dlprefiles" ;; + link) + libs="$deplibs %DEPLIBS%" + test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" + ;; + esac + fi + if test "$linkmode,$pass" = "lib,dlpreopen"; then + # Collect and forward deplibs of preopened libtool libs + for lib in $dlprefiles; do + # Ignore non-libtool-libs + dependency_libs= + func_resolve_sysroot "$lib" + case $lib in + *.la) func_source "$func_resolve_sysroot_result" ;; + esac + + # Collect preopened libtool deplibs, except any this library + # has declared as weak libs + for deplib in $dependency_libs; do + func_basename "$deplib" + deplib_base=$func_basename_result + case " $weak_libs " in + *" $deplib_base "*) ;; + *) func_append deplibs " $deplib" ;; + esac + done + done + libs="$dlprefiles" + fi + if test "$pass" = dlopen; then + # Collect dlpreopened libraries + save_deplibs="$deplibs" + deplibs= + fi + + for deplib in $libs; do + lib= + found=no + case $deplib in + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ + |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + func_append compiler_flags " $deplib" + if test "$linkmode" = lib ; then + case "$new_inherited_linker_flags " in + *" $deplib "*) ;; + * ) func_append new_inherited_linker_flags " $deplib" ;; + esac + fi + fi + continue + ;; + -l*) + if test "$linkmode" != lib && test "$linkmode" != prog; then + func_warning "\`-l' is ignored for archives/objects" + continue + fi + func_stripname '-l' '' "$deplib" + name=$func_stripname_result + if test "$linkmode" = lib; then + searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" + else + searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" + fi + for searchdir in $searchdirs; do + for search_ext in .la $std_shrext .so .a; do + # Search the libtool library + lib="$searchdir/lib${name}${search_ext}" + if test -f "$lib"; then + if test "$search_ext" = ".la"; then + found=yes + else + found=no + fi + break 2 + fi + done + done + if test "$found" != yes; then + # deplib doesn't seem to be a libtool library + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" + fi + continue + else # deplib is a libtool library + # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, + # We need to do some special things here, and not later. + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $deplib "*) + if func_lalib_p "$lib"; then + library_names= + old_library= + func_source "$lib" + for l in $old_library $library_names; do + ll="$l" + done + if test "X$ll" = "X$old_library" ; then # only static version available + found=no + func_dirname "$lib" "" "." + ladir="$func_dirname_result" + lib=$ladir/$old_library + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" + fi + continue + fi + fi + ;; + *) ;; + esac + fi + fi + ;; # -l + *.ltframework) + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + if test "$linkmode" = lib ; then + case "$new_inherited_linker_flags " in + *" $deplib "*) ;; + * ) func_append new_inherited_linker_flags " $deplib" ;; + esac + fi + fi + continue + ;; + -L*) + case $linkmode in + lib) + deplibs="$deplib $deplibs" + test "$pass" = conv && continue + newdependency_libs="$deplib $newdependency_libs" + func_stripname '-L' '' "$deplib" + func_resolve_sysroot "$func_stripname_result" + func_append newlib_search_path " $func_resolve_sysroot_result" + ;; + prog) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + continue + fi + if test "$pass" = scan; then + deplibs="$deplib $deplibs" + else + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + fi + func_stripname '-L' '' "$deplib" + func_resolve_sysroot "$func_stripname_result" + func_append newlib_search_path " $func_resolve_sysroot_result" + ;; + *) + func_warning "\`-L' is ignored for archives/objects" + ;; + esac # linkmode + continue + ;; # -L + -R*) + if test "$pass" = link; then + func_stripname '-R' '' "$deplib" + func_resolve_sysroot "$func_stripname_result" + dir=$func_resolve_sysroot_result + # Make sure the xrpath contains only unique directories. + case "$xrpath " in + *" $dir "*) ;; + *) func_append xrpath " $dir" ;; + esac + fi + deplibs="$deplib $deplibs" + continue + ;; + *.la) + func_resolve_sysroot "$deplib" + lib=$func_resolve_sysroot_result + ;; + *.$libext) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + continue + fi + case $linkmode in + lib) + # Linking convenience modules into shared libraries is allowed, + # but linking other static libraries is non-portable. + case " $dlpreconveniencelibs " in + *" $deplib "*) ;; + *) + valid_a_lib=no + case $deplibs_check_method in + match_pattern*) + set dummy $deplibs_check_method; shift + match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` + if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ + | $EGREP "$match_pattern_regex" > /dev/null; then + valid_a_lib=yes + fi + ;; + pass_all) + valid_a_lib=yes + ;; + esac + if test "$valid_a_lib" != yes; then + echo + $ECHO "*** Warning: Trying to link with static lib archive $deplib." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have" + echo "*** because the file extensions .$libext of this argument makes me believe" + echo "*** that it is just a static archive that I should not use here." + else + echo + $ECHO "*** Warning: Linking the shared library $output against the" + $ECHO "*** static library $deplib is not portable!" + deplibs="$deplib $deplibs" + fi + ;; + esac + continue + ;; + prog) + if test "$pass" != link; then + deplibs="$deplib $deplibs" + else + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + fi + continue + ;; + esac # linkmode + ;; # *.$libext + *.lo | *.$objext) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + elif test "$linkmode" = prog; then + if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then + # If there is no dlopen support or we're linking statically, + # we need to preload. + func_append newdlprefiles " $deplib" + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + func_append newdlfiles " $deplib" + fi + fi + continue + ;; + %DEPLIBS%) + alldeplibs=yes + continue + ;; + esac # case $deplib + + if test "$found" = yes || test -f "$lib"; then : + else + func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" + fi + + # Check to see that this really is a libtool archive. + func_lalib_unsafe_p "$lib" \ + || func_fatal_error "\`$lib' is not a valid libtool archive" + + func_dirname "$lib" "" "." + ladir="$func_dirname_result" + + dlname= + dlopen= + dlpreopen= + libdir= + library_names= + old_library= + inherited_linker_flags= + # If the library was installed with an old release of libtool, + # it will not redefine variables installed, or shouldnotlink + installed=yes + shouldnotlink=no + avoidtemprpath= + + + # Read the .la file + func_source "$lib" + + # Convert "-framework foo" to "foo.ltframework" + if test -n "$inherited_linker_flags"; then + tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` + for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do + case " $new_inherited_linker_flags " in + *" $tmp_inherited_linker_flag "*) ;; + *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; + esac + done + fi + dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + if test "$linkmode,$pass" = "lib,link" || + test "$linkmode,$pass" = "prog,scan" || + { test "$linkmode" != prog && test "$linkmode" != lib; }; then + test -n "$dlopen" && func_append dlfiles " $dlopen" + test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" + fi + + if test "$pass" = conv; then + # Only check for convenience libraries + deplibs="$lib $deplibs" + if test -z "$libdir"; then + if test -z "$old_library"; then + func_fatal_error "cannot find name of link library for \`$lib'" + fi + # It is a libtool convenience library, so add in its objects. + func_append convenience " $ladir/$objdir/$old_library" + func_append old_convenience " $ladir/$objdir/$old_library" + tmp_libs= + for deplib in $dependency_libs; do + deplibs="$deplib $deplibs" + if $opt_preserve_dup_deps ; then + case "$tmp_libs " in + *" $deplib "*) func_append specialdeplibs " $deplib" ;; + esac + fi + func_append tmp_libs " $deplib" + done + elif test "$linkmode" != prog && test "$linkmode" != lib; then + func_fatal_error "\`$lib' is not a convenience library" + fi + continue + fi # $pass = conv + + + # Get the name of the library we link against. + linklib= + if test -n "$old_library" && + { test "$prefer_static_libs" = yes || + test "$prefer_static_libs,$installed" = "built,no"; }; then + linklib=$old_library + else + for l in $old_library $library_names; do + linklib="$l" + done + fi + if test -z "$linklib"; then + func_fatal_error "cannot find name of link library for \`$lib'" + fi + + # This library was specified with -dlopen. + if test "$pass" = dlopen; then + if test -z "$libdir"; then + func_fatal_error "cannot -dlopen a convenience library: \`$lib'" + fi + if test -z "$dlname" || + test "$dlopen_support" != yes || + test "$build_libtool_libs" = no; then + # If there is no dlname, no dlopen support or we're linking + # statically, we need to preload. We also need to preload any + # dependent libraries so libltdl's deplib preloader doesn't + # bomb out in the load deplibs phase. + func_append dlprefiles " $lib $dependency_libs" + else + func_append newdlfiles " $lib" + fi + continue + fi # $pass = dlopen + + # We need an absolute path. + case $ladir in + [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; + *) + abs_ladir=`cd "$ladir" && pwd` + if test -z "$abs_ladir"; then + func_warning "cannot determine absolute directory name of \`$ladir'" + func_warning "passing it literally to the linker, although it might fail" + abs_ladir="$ladir" + fi + ;; + esac + func_basename "$lib" + laname="$func_basename_result" + + # Find the relevant object directory and library name. + if test "X$installed" = Xyes; then + if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then + func_warning "library \`$lib' was moved." + dir="$ladir" + absdir="$abs_ladir" + libdir="$abs_ladir" + else + dir="$lt_sysroot$libdir" + absdir="$lt_sysroot$libdir" + fi + test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes + else + if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then + dir="$ladir" + absdir="$abs_ladir" + # Remove this search path later + func_append notinst_path " $abs_ladir" + else + dir="$ladir/$objdir" + absdir="$abs_ladir/$objdir" + # Remove this search path later + func_append notinst_path " $abs_ladir" + fi + fi # $installed = yes + func_stripname 'lib' '.la' "$laname" + name=$func_stripname_result + + # This library was specified with -dlpreopen. + if test "$pass" = dlpreopen; then + if test -z "$libdir" && test "$linkmode" = prog; then + func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" + fi + case "$host" in + # special handling for platforms with PE-DLLs. + *cygwin* | *mingw* | *cegcc* ) + # Linker will automatically link against shared library if both + # static and shared are present. Therefore, ensure we extract + # symbols from the import library if a shared library is present + # (otherwise, the dlopen module name will be incorrect). We do + # this by putting the import library name into $newdlprefiles. + # We recover the dlopen module name by 'saving' the la file + # name in a special purpose variable, and (later) extracting the + # dlname from the la file. + if test -n "$dlname"; then + func_tr_sh "$dir/$linklib" + eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" + func_append newdlprefiles " $dir/$linklib" + else + func_append newdlprefiles " $dir/$old_library" + # Keep a list of preopened convenience libraries to check + # that they are being used correctly in the link pass. + test -z "$libdir" && \ + func_append dlpreconveniencelibs " $dir/$old_library" + fi + ;; + * ) + # Prefer using a static library (so that no silly _DYNAMIC symbols + # are required to link). + if test -n "$old_library"; then + func_append newdlprefiles " $dir/$old_library" + # Keep a list of preopened convenience libraries to check + # that they are being used correctly in the link pass. + test -z "$libdir" && \ + func_append dlpreconveniencelibs " $dir/$old_library" + # Otherwise, use the dlname, so that lt_dlopen finds it. + elif test -n "$dlname"; then + func_append newdlprefiles " $dir/$dlname" + else + func_append newdlprefiles " $dir/$linklib" + fi + ;; + esac + fi # $pass = dlpreopen + + if test -z "$libdir"; then + # Link the convenience library + if test "$linkmode" = lib; then + deplibs="$dir/$old_library $deplibs" + elif test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$dir/$old_library $compile_deplibs" + finalize_deplibs="$dir/$old_library $finalize_deplibs" + else + deplibs="$lib $deplibs" # used for prog,scan pass + fi + continue + fi + + + if test "$linkmode" = prog && test "$pass" != link; then + func_append newlib_search_path " $ladir" + deplibs="$lib $deplibs" + + linkalldeplibs=no + if test "$link_all_deplibs" != no || test -z "$library_names" || + test "$build_libtool_libs" = no; then + linkalldeplibs=yes + fi + + tmp_libs= + for deplib in $dependency_libs; do + case $deplib in + -L*) func_stripname '-L' '' "$deplib" + func_resolve_sysroot "$func_stripname_result" + func_append newlib_search_path " $func_resolve_sysroot_result" + ;; + esac + # Need to link against all dependency_libs? + if test "$linkalldeplibs" = yes; then + deplibs="$deplib $deplibs" + else + # Need to hardcode shared library paths + # or/and link against static libraries + newdependency_libs="$deplib $newdependency_libs" + fi + if $opt_preserve_dup_deps ; then + case "$tmp_libs " in + *" $deplib "*) func_append specialdeplibs " $deplib" ;; + esac + fi + func_append tmp_libs " $deplib" + done # for deplib + continue + fi # $linkmode = prog... + + if test "$linkmode,$pass" = "prog,link"; then + if test -n "$library_names" && + { { test "$prefer_static_libs" = no || + test "$prefer_static_libs,$installed" = "built,yes"; } || + test -z "$old_library"; }; then + # We need to hardcode the library path + if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then + # Make sure the rpath contains only unique directories. + case "$temp_rpath:" in + *"$absdir:"*) ;; + *) func_append temp_rpath "$absdir:" ;; + esac + fi + + # Hardcode the library path. + # Skip directories that are in the system default run-time + # search path. + case " $sys_lib_dlsearch_path " in + *" $absdir "*) ;; + *) + case "$compile_rpath " in + *" $absdir "*) ;; + *) func_append compile_rpath " $absdir" ;; + esac + ;; + esac + case " $sys_lib_dlsearch_path " in + *" $libdir "*) ;; + *) + case "$finalize_rpath " in + *" $libdir "*) ;; + *) func_append finalize_rpath " $libdir" ;; + esac + ;; + esac + fi # $linkmode,$pass = prog,link... + + if test "$alldeplibs" = yes && + { test "$deplibs_check_method" = pass_all || + { test "$build_libtool_libs" = yes && + test -n "$library_names"; }; }; then + # We only need to search for static libraries + continue + fi + fi + + link_static=no # Whether the deplib will be linked statically + use_static_libs=$prefer_static_libs + if test "$use_static_libs" = built && test "$installed" = yes; then + use_static_libs=no + fi + if test -n "$library_names" && + { test "$use_static_libs" = no || test -z "$old_library"; }; then + case $host in + *cygwin* | *mingw* | *cegcc*) + # No point in relinking DLLs because paths are not encoded + func_append notinst_deplibs " $lib" + need_relink=no + ;; + *) + if test "$installed" = no; then + func_append notinst_deplibs " $lib" + need_relink=yes + fi + ;; + esac + # This is a shared library + + # Warn about portability, can't link against -module's on some + # systems (darwin). Don't bleat about dlopened modules though! + dlopenmodule="" + for dlpremoduletest in $dlprefiles; do + if test "X$dlpremoduletest" = "X$lib"; then + dlopenmodule="$dlpremoduletest" + break + fi + done + if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then + echo + if test "$linkmode" = prog; then + $ECHO "*** Warning: Linking the executable $output against the loadable module" + else + $ECHO "*** Warning: Linking the shared library $output against the loadable module" + fi + $ECHO "*** $linklib is not portable!" + fi + if test "$linkmode" = lib && + test "$hardcode_into_libs" = yes; then + # Hardcode the library path. + # Skip directories that are in the system default run-time + # search path. + case " $sys_lib_dlsearch_path " in + *" $absdir "*) ;; + *) + case "$compile_rpath " in + *" $absdir "*) ;; + *) func_append compile_rpath " $absdir" ;; + esac + ;; + esac + case " $sys_lib_dlsearch_path " in + *" $libdir "*) ;; + *) + case "$finalize_rpath " in + *" $libdir "*) ;; + *) func_append finalize_rpath " $libdir" ;; + esac + ;; + esac + fi + + if test -n "$old_archive_from_expsyms_cmds"; then + # figure out the soname + set dummy $library_names + shift + realname="$1" + shift + libname=`eval "\\$ECHO \"$libname_spec\""` + # use dlname if we got it. it's perfectly good, no? + if test -n "$dlname"; then + soname="$dlname" + elif test -n "$soname_spec"; then + # bleh windows + case $host in + *cygwin* | mingw* | *cegcc*) + func_arith $current - $age + major=$func_arith_result + versuffix="-$major" + ;; + esac + eval soname=\"$soname_spec\" + else + soname="$realname" + fi + + # Make a new name for the extract_expsyms_cmds to use + soroot="$soname" + func_basename "$soroot" + soname="$func_basename_result" + func_stripname 'lib' '.dll' "$soname" + newlib=libimp-$func_stripname_result.a + + # If the library has no export list, then create one now + if test -f "$output_objdir/$soname-def"; then : + else + func_verbose "extracting exported symbol list from \`$soname'" + func_execute_cmds "$extract_expsyms_cmds" 'exit $?' + fi + + # Create $newlib + if test -f "$output_objdir/$newlib"; then :; else + func_verbose "generating import library for \`$soname'" + func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' + fi + # make sure the library variables are pointing to the new library + dir=$output_objdir + linklib=$newlib + fi # test -n "$old_archive_from_expsyms_cmds" + + if test "$linkmode" = prog || test "$opt_mode" != relink; then + add_shlibpath= + add_dir= + add= + lib_linked=yes + case $hardcode_action in + immediate | unsupported) + if test "$hardcode_direct" = no; then + add="$dir/$linklib" + case $host in + *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; + *-*-sysv4*uw2*) add_dir="-L$dir" ;; + *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ + *-*-unixware7*) add_dir="-L$dir" ;; + *-*-darwin* ) + # if the lib is a (non-dlopened) module then we can not + # link against it, someone is ignoring the earlier warnings + if /usr/bin/file -L $add 2> /dev/null | + $GREP ": [^:]* bundle" >/dev/null ; then + if test "X$dlopenmodule" != "X$lib"; then + $ECHO "*** Warning: lib $linklib is a module, not a shared library" + if test -z "$old_library" ; then + echo + echo "*** And there doesn't seem to be a static archive available" + echo "*** The link will probably fail, sorry" + else + add="$dir/$old_library" + fi + elif test -n "$old_library"; then + add="$dir/$old_library" + fi + fi + esac + elif test "$hardcode_minus_L" = no; then + case $host in + *-*-sunos*) add_shlibpath="$dir" ;; + esac + add_dir="-L$dir" + add="-l$name" + elif test "$hardcode_shlibpath_var" = no; then + add_shlibpath="$dir" + add="-l$name" + else + lib_linked=no + fi + ;; + relink) + if test "$hardcode_direct" = yes && + test "$hardcode_direct_absolute" = no; then + add="$dir/$linklib" + elif test "$hardcode_minus_L" = yes; then + add_dir="-L$absdir" + # Try looking first in the location we're being installed to. + if test -n "$inst_prefix_dir"; then + case $libdir in + [\\/]*) + func_append add_dir " -L$inst_prefix_dir$libdir" + ;; + esac + fi + add="-l$name" + elif test "$hardcode_shlibpath_var" = yes; then + add_shlibpath="$dir" + add="-l$name" + else + lib_linked=no + fi + ;; + *) lib_linked=no ;; + esac + + if test "$lib_linked" != yes; then + func_fatal_configuration "unsupported hardcode properties" + fi + + if test -n "$add_shlibpath"; then + case :$compile_shlibpath: in + *":$add_shlibpath:"*) ;; + *) func_append compile_shlibpath "$add_shlibpath:" ;; + esac + fi + if test "$linkmode" = prog; then + test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" + test -n "$add" && compile_deplibs="$add $compile_deplibs" + else + test -n "$add_dir" && deplibs="$add_dir $deplibs" + test -n "$add" && deplibs="$add $deplibs" + if test "$hardcode_direct" != yes && + test "$hardcode_minus_L" != yes && + test "$hardcode_shlibpath_var" = yes; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; + *) func_append finalize_shlibpath "$libdir:" ;; + esac + fi + fi + fi + + if test "$linkmode" = prog || test "$opt_mode" = relink; then + add_shlibpath= + add_dir= + add= + # Finalize command for both is simple: just hardcode it. + if test "$hardcode_direct" = yes && + test "$hardcode_direct_absolute" = no; then + add="$libdir/$linklib" + elif test "$hardcode_minus_L" = yes; then + add_dir="-L$libdir" + add="-l$name" + elif test "$hardcode_shlibpath_var" = yes; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; + *) func_append finalize_shlibpath "$libdir:" ;; + esac + add="-l$name" + elif test "$hardcode_automatic" = yes; then + if test -n "$inst_prefix_dir" && + test -f "$inst_prefix_dir$libdir/$linklib" ; then + add="$inst_prefix_dir$libdir/$linklib" + else + add="$libdir/$linklib" + fi + else + # We cannot seem to hardcode it, guess we'll fake it. + add_dir="-L$libdir" + # Try looking first in the location we're being installed to. + if test -n "$inst_prefix_dir"; then + case $libdir in + [\\/]*) + func_append add_dir " -L$inst_prefix_dir$libdir" + ;; + esac + fi + add="-l$name" + fi + + if test "$linkmode" = prog; then + test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" + test -n "$add" && finalize_deplibs="$add $finalize_deplibs" + else + test -n "$add_dir" && deplibs="$add_dir $deplibs" + test -n "$add" && deplibs="$add $deplibs" + fi + fi + elif test "$linkmode" = prog; then + # Here we assume that one of hardcode_direct or hardcode_minus_L + # is not unsupported. This is valid on all known static and + # shared platforms. + if test "$hardcode_direct" != unsupported; then + test -n "$old_library" && linklib="$old_library" + compile_deplibs="$dir/$linklib $compile_deplibs" + finalize_deplibs="$dir/$linklib $finalize_deplibs" + else + compile_deplibs="-l$name -L$dir $compile_deplibs" + finalize_deplibs="-l$name -L$dir $finalize_deplibs" + fi + elif test "$build_libtool_libs" = yes; then + # Not a shared library + if test "$deplibs_check_method" != pass_all; then + # We're trying link a shared library against a static one + # but the system doesn't support it. + + # Just print a warning and add the library to dependency_libs so + # that the program can be linked against the static library. + echo + $ECHO "*** Warning: This system can not link to static lib archive $lib." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have." + if test "$module" = yes; then + echo "*** But as you try to build a module library, libtool will still create " + echo "*** a static module, that should work as long as the dlopening application" + echo "*** is linked with the -dlopen flag to resolve symbols at runtime." + if test -z "$global_symbol_pipe"; then + echo + echo "*** However, this would only work if libtool was able to extract symbol" + echo "*** lists from a program, using \`nm' or equivalent, but libtool could" + echo "*** not find such a program. So, this module is probably useless." + echo "*** \`nm' from GNU binutils and a full rebuild may help." + fi + if test "$build_old_libs" = no; then + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + fi + else + deplibs="$dir/$old_library $deplibs" + link_static=yes + fi + fi # link shared/static library? + + if test "$linkmode" = lib; then + if test -n "$dependency_libs" && + { test "$hardcode_into_libs" != yes || + test "$build_old_libs" = yes || + test "$link_static" = yes; }; then + # Extract -R from dependency_libs + temp_deplibs= + for libdir in $dependency_libs; do + case $libdir in + -R*) func_stripname '-R' '' "$libdir" + temp_xrpath=$func_stripname_result + case " $xrpath " in + *" $temp_xrpath "*) ;; + *) func_append xrpath " $temp_xrpath";; + esac;; + *) func_append temp_deplibs " $libdir";; + esac + done + dependency_libs="$temp_deplibs" + fi + + func_append newlib_search_path " $absdir" + # Link against this library + test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" + # ... and its dependency_libs + tmp_libs= + for deplib in $dependency_libs; do + newdependency_libs="$deplib $newdependency_libs" + case $deplib in + -L*) func_stripname '-L' '' "$deplib" + func_resolve_sysroot "$func_stripname_result";; + *) func_resolve_sysroot "$deplib" ;; + esac + if $opt_preserve_dup_deps ; then + case "$tmp_libs " in + *" $func_resolve_sysroot_result "*) + func_append specialdeplibs " $func_resolve_sysroot_result" ;; + esac + fi + func_append tmp_libs " $func_resolve_sysroot_result" + done + + if test "$link_all_deplibs" != no; then + # Add the search paths of all dependency libraries + for deplib in $dependency_libs; do + path= + case $deplib in + -L*) path="$deplib" ;; + *.la) + func_resolve_sysroot "$deplib" + deplib=$func_resolve_sysroot_result + func_dirname "$deplib" "" "." + dir=$func_dirname_result + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; + *) + absdir=`cd "$dir" && pwd` + if test -z "$absdir"; then + func_warning "cannot determine absolute directory name of \`$dir'" + absdir="$dir" + fi + ;; + esac + if $GREP "^installed=no" $deplib > /dev/null; then + case $host in + *-*-darwin*) + depdepl= + eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` + if test -n "$deplibrary_names" ; then + for tmp in $deplibrary_names ; do + depdepl=$tmp + done + if test -f "$absdir/$objdir/$depdepl" ; then + depdepl="$absdir/$objdir/$depdepl" + darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` + if test -z "$darwin_install_name"; then + darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` + fi + func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" + func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}" + path= + fi + fi + ;; + *) + path="-L$absdir/$objdir" + ;; + esac + else + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + test -z "$libdir" && \ + func_fatal_error "\`$deplib' is not a valid libtool archive" + test "$absdir" != "$libdir" && \ + func_warning "\`$deplib' seems to be moved" + + path="-L$absdir" + fi + ;; + esac + case " $deplibs " in + *" $path "*) ;; + *) deplibs="$path $deplibs" ;; + esac + done + fi # link_all_deplibs != no + fi # linkmode = lib + done # for deplib in $libs + if test "$pass" = link; then + if test "$linkmode" = "prog"; then + compile_deplibs="$new_inherited_linker_flags $compile_deplibs" + finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" + else + compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + fi + fi + dependency_libs="$newdependency_libs" + if test "$pass" = dlpreopen; then + # Link the dlpreopened libraries before other libraries + for deplib in $save_deplibs; do + deplibs="$deplib $deplibs" + done + fi + if test "$pass" != dlopen; then + if test "$pass" != conv; then + # Make sure lib_search_path contains only unique directories. + lib_search_path= + for dir in $newlib_search_path; do + case "$lib_search_path " in + *" $dir "*) ;; + *) func_append lib_search_path " $dir" ;; + esac + done + newlib_search_path= + fi + + if test "$linkmode,$pass" != "prog,link"; then + vars="deplibs" + else + vars="compile_deplibs finalize_deplibs" + fi + for var in $vars dependency_libs; do + # Add libraries to $var in reverse order + eval tmp_libs=\"\$$var\" + new_libs= + for deplib in $tmp_libs; do + # FIXME: Pedantically, this is the right thing to do, so + # that some nasty dependency loop isn't accidentally + # broken: + #new_libs="$deplib $new_libs" + # Pragmatically, this seems to cause very few problems in + # practice: + case $deplib in + -L*) new_libs="$deplib $new_libs" ;; + -R*) ;; + *) + # And here is the reason: when a library appears more + # than once as an explicit dependence of a library, or + # is implicitly linked in more than once by the + # compiler, it is considered special, and multiple + # occurrences thereof are not removed. Compare this + # with having the same library being listed as a + # dependency of multiple other libraries: in this case, + # we know (pedantically, we assume) the library does not + # need to be listed more than once, so we keep only the + # last copy. This is not always right, but it is rare + # enough that we require users that really mean to play + # such unportable linking tricks to link the library + # using -Wl,-lname, so that libtool does not consider it + # for duplicate removal. + case " $specialdeplibs " in + *" $deplib "*) new_libs="$deplib $new_libs" ;; + *) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$deplib $new_libs" ;; + esac + ;; + esac + ;; + esac + done + tmp_libs= + for deplib in $new_libs; do + case $deplib in + -L*) + case " $tmp_libs " in + *" $deplib "*) ;; + *) func_append tmp_libs " $deplib" ;; + esac + ;; + *) func_append tmp_libs " $deplib" ;; + esac + done + eval $var=\"$tmp_libs\" + done # for var + fi + # Last step: remove runtime libs from dependency_libs + # (they stay in deplibs) + tmp_libs= + for i in $dependency_libs ; do + case " $predeps $postdeps $compiler_lib_search_path " in + *" $i "*) + i="" + ;; + esac + if test -n "$i" ; then + func_append tmp_libs " $i" + fi + done + dependency_libs=$tmp_libs + done # for pass + if test "$linkmode" = prog; then + dlfiles="$newdlfiles" + fi + if test "$linkmode" = prog || test "$linkmode" = lib; then + dlprefiles="$newdlprefiles" + fi + + case $linkmode in + oldlib) + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + func_warning "\`-dlopen' is ignored for archives" + fi + + case " $deplibs" in + *\ -l* | *\ -L*) + func_warning "\`-l' and \`-L' are ignored for archives" ;; + esac + + test -n "$rpath" && \ + func_warning "\`-rpath' is ignored for archives" + + test -n "$xrpath" && \ + func_warning "\`-R' is ignored for archives" + + test -n "$vinfo" && \ + func_warning "\`-version-info/-version-number' is ignored for archives" + + test -n "$release" && \ + func_warning "\`-release' is ignored for archives" + + test -n "$export_symbols$export_symbols_regex" && \ + func_warning "\`-export-symbols' is ignored for archives" + + # Now set the variables for building old libraries. + build_libtool_libs=no + oldlibs="$output" + func_append objs "$old_deplibs" + ;; + + lib) + # Make sure we only generate libraries of the form `libNAME.la'. + case $outputname in + lib*) + func_stripname 'lib' '.la' "$outputname" + name=$func_stripname_result + eval shared_ext=\"$shrext_cmds\" + eval libname=\"$libname_spec\" + ;; + *) + test "$module" = no && \ + func_fatal_help "libtool library \`$output' must begin with \`lib'" + + if test "$need_lib_prefix" != no; then + # Add the "lib" prefix for modules if required + func_stripname '' '.la' "$outputname" + name=$func_stripname_result + eval shared_ext=\"$shrext_cmds\" + eval libname=\"$libname_spec\" + else + func_stripname '' '.la' "$outputname" + libname=$func_stripname_result + fi + ;; + esac + + if test -n "$objs"; then + if test "$deplibs_check_method" != pass_all; then + func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" + else + echo + $ECHO "*** Warning: Linking the shared library $output against the non-libtool" + $ECHO "*** objects $objs is not portable!" + func_append libobjs " $objs" + fi + fi + + test "$dlself" != no && \ + func_warning "\`-dlopen self' is ignored for libtool libraries" + + set dummy $rpath + shift + test "$#" -gt 1 && \ + func_warning "ignoring multiple \`-rpath's for a libtool library" + + install_libdir="$1" + + oldlibs= + if test -z "$rpath"; then + if test "$build_libtool_libs" = yes; then + # Building a libtool convenience library. + # Some compilers have problems with a `.al' extension so + # convenience libraries should have the same extension an + # archive normally would. + oldlibs="$output_objdir/$libname.$libext $oldlibs" + build_libtool_libs=convenience + build_old_libs=yes + fi + + test -n "$vinfo" && \ + func_warning "\`-version-info/-version-number' is ignored for convenience libraries" + + test -n "$release" && \ + func_warning "\`-release' is ignored for convenience libraries" + else + + # Parse the version information argument. + save_ifs="$IFS"; IFS=':' + set dummy $vinfo 0 0 0 + shift + IFS="$save_ifs" + + test -n "$7" && \ + func_fatal_help "too many parameters to \`-version-info'" + + # convert absolute version numbers to libtool ages + # this retains compatibility with .la files and attempts + # to make the code below a bit more comprehensible + + case $vinfo_number in + yes) + number_major="$1" + number_minor="$2" + number_revision="$3" + # + # There are really only two kinds -- those that + # use the current revision as the major version + # and those that subtract age and use age as + # a minor version. But, then there is irix + # which has an extra 1 added just for fun + # + case $version_type in + # correct linux to gnu/linux during the next big refactor + darwin|linux|osf|windows|none) + func_arith $number_major + $number_minor + current=$func_arith_result + age="$number_minor" + revision="$number_revision" + ;; + freebsd-aout|freebsd-elf|qnx|sunos) + current="$number_major" + revision="$number_minor" + age="0" + ;; + irix|nonstopux) + func_arith $number_major + $number_minor + current=$func_arith_result + age="$number_minor" + revision="$number_minor" + lt_irix_increment=no + ;; + *) + func_fatal_configuration "$modename: unknown library version type \`$version_type'" + ;; + esac + ;; + no) + current="$1" + revision="$2" + age="$3" + ;; + esac + + # Check that each of the things are valid numbers. + case $current in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + func_error "CURRENT \`$current' must be a nonnegative integer" + func_fatal_error "\`$vinfo' is not valid version information" + ;; + esac + + case $revision in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + func_error "REVISION \`$revision' must be a nonnegative integer" + func_fatal_error "\`$vinfo' is not valid version information" + ;; + esac + + case $age in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + func_error "AGE \`$age' must be a nonnegative integer" + func_fatal_error "\`$vinfo' is not valid version information" + ;; + esac + + if test "$age" -gt "$current"; then + func_error "AGE \`$age' is greater than the current interface number \`$current'" + func_fatal_error "\`$vinfo' is not valid version information" + fi + + # Calculate the version variables. + major= + versuffix= + verstring= + case $version_type in + none) ;; + + darwin) + # Like Linux, but with the current version available in + # verstring for coding it into the library header + func_arith $current - $age + major=.$func_arith_result + versuffix="$major.$age.$revision" + # Darwin ld doesn't like 0 for these options... + func_arith $current + 1 + minor_current=$func_arith_result + xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" + verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" + ;; + + freebsd-aout) + major=".$current" + versuffix=".$current.$revision"; + ;; + + freebsd-elf) + major=".$current" + versuffix=".$current" + ;; + + irix | nonstopux) + if test "X$lt_irix_increment" = "Xno"; then + func_arith $current - $age + else + func_arith $current - $age + 1 + fi + major=$func_arith_result + + case $version_type in + nonstopux) verstring_prefix=nonstopux ;; + *) verstring_prefix=sgi ;; + esac + verstring="$verstring_prefix$major.$revision" + + # Add in all the interfaces that we are compatible with. + loop=$revision + while test "$loop" -ne 0; do + func_arith $revision - $loop + iface=$func_arith_result + func_arith $loop - 1 + loop=$func_arith_result + verstring="$verstring_prefix$major.$iface:$verstring" + done + + # Before this point, $major must not contain `.'. + major=.$major + versuffix="$major.$revision" + ;; + + linux) # correct to gnu/linux during the next big refactor + func_arith $current - $age + major=.$func_arith_result + versuffix="$major.$age.$revision" + ;; + + osf) + func_arith $current - $age + major=.$func_arith_result + versuffix=".$current.$age.$revision" + verstring="$current.$age.$revision" + + # Add in all the interfaces that we are compatible with. + loop=$age + while test "$loop" -ne 0; do + func_arith $current - $loop + iface=$func_arith_result + func_arith $loop - 1 + loop=$func_arith_result + verstring="$verstring:${iface}.0" + done + + # Make executables depend on our current version. + func_append verstring ":${current}.0" + ;; + + qnx) + major=".$current" + versuffix=".$current" + ;; + + sunos) + major=".$current" + versuffix=".$current.$revision" + ;; + + windows) + # Use '-' rather than '.', since we only want one + # extension on DOS 8.3 filesystems. + func_arith $current - $age + major=$func_arith_result + versuffix="-$major" + ;; + + *) + func_fatal_configuration "unknown library version type \`$version_type'" + ;; + esac + + # Clear the version info if we defaulted, and they specified a release. + if test -z "$vinfo" && test -n "$release"; then + major= + case $version_type in + darwin) + # we can't check for "0.0" in archive_cmds due to quoting + # problems, so we reset it completely + verstring= + ;; + *) + verstring="0.0" + ;; + esac + if test "$need_version" = no; then + versuffix= + else + versuffix=".0.0" + fi + fi + + # Remove version info from name if versioning should be avoided + if test "$avoid_version" = yes && test "$need_version" = no; then + major= + versuffix= + verstring="" + fi + + # Check to see if the archive will have undefined symbols. + if test "$allow_undefined" = yes; then + if test "$allow_undefined_flag" = unsupported; then + func_warning "undefined symbols not allowed in $host shared libraries" + build_libtool_libs=no + build_old_libs=yes + fi + else + # Don't allow undefined symbols. + allow_undefined_flag="$no_undefined_flag" + fi + + fi + + func_generate_dlsyms "$libname" "$libname" "yes" + func_append libobjs " $symfileobj" + test "X$libobjs" = "X " && libobjs= + + if test "$opt_mode" != relink; then + # Remove our outputs, but don't remove object files since they + # may have been created when compiling PIC objects. + removelist= + tempremovelist=`$ECHO "$output_objdir/*"` + for p in $tempremovelist; do + case $p in + *.$objext | *.gcno) + ;; + $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) + if test "X$precious_files_regex" != "X"; then + if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 + then + continue + fi + fi + func_append removelist " $p" + ;; + *) ;; + esac + done + test -n "$removelist" && \ + func_show_eval "${RM}r \$removelist" + fi + + # Now set the variables for building old libraries. + if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then + func_append oldlibs " $output_objdir/$libname.$libext" + + # Transform .lo files to .o files. + oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP` + fi + + # Eliminate all temporary directories. + #for path in $notinst_path; do + # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` + # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` + # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` + #done + + if test -n "$xrpath"; then + # If the user specified any rpath flags, then add them. + temp_xrpath= + for libdir in $xrpath; do + func_replace_sysroot "$libdir" + func_append temp_xrpath " -R$func_replace_sysroot_result" + case "$finalize_rpath " in + *" $libdir "*) ;; + *) func_append finalize_rpath " $libdir" ;; + esac + done + if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then + dependency_libs="$temp_xrpath $dependency_libs" + fi + fi + + # Make sure dlfiles contains only unique files that won't be dlpreopened + old_dlfiles="$dlfiles" + dlfiles= + for lib in $old_dlfiles; do + case " $dlprefiles $dlfiles " in + *" $lib "*) ;; + *) func_append dlfiles " $lib" ;; + esac + done + + # Make sure dlprefiles contains only unique files + old_dlprefiles="$dlprefiles" + dlprefiles= + for lib in $old_dlprefiles; do + case "$dlprefiles " in + *" $lib "*) ;; + *) func_append dlprefiles " $lib" ;; + esac + done + + if test "$build_libtool_libs" = yes; then + if test -n "$rpath"; then + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) + # these systems don't actually have a c library (as such)! + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C library is in the System framework + func_append deplibs " System.ltframework" + ;; + *-*-netbsd*) + # Don't link with libc until the a.out ld.so is fixed. + ;; + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc due to us having libc/libc_r. + ;; + *-*-sco3.2v5* | *-*-sco5v6*) + # Causes problems with __ctype + ;; + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) + # Compiler inserts libc in the correct place for threads to work + ;; + *) + # Add libc to deplibs on all other systems if necessary. + if test "$build_libtool_need_lc" = "yes"; then + func_append deplibs " -lc" + fi + ;; + esac + fi + + # Transform deplibs into only deplibs that can be linked in shared. + name_save=$name + libname_save=$libname + release_save=$release + versuffix_save=$versuffix + major_save=$major + # I'm not sure if I'm treating the release correctly. I think + # release should show up in the -l (ie -lgmp5) so we don't want to + # add it in twice. Is that correct? + release="" + versuffix="" + major="" + newdeplibs= + droppeddeps=no + case $deplibs_check_method in + pass_all) + # Don't check for shared/static. Everything works. + # This might be a little naive. We might want to check + # whether the library exists or not. But this is on + # osf3 & osf4 and I'm not really sure... Just + # implementing what was already the behavior. + newdeplibs=$deplibs + ;; + test_compile) + # This code stresses the "libraries are programs" paradigm to its + # limits. Maybe even breaks it. We compile a program, linking it + # against the deplibs as a proxy for the library. Then we can check + # whether they linked in statically or dynamically with ldd. + $opt_dry_run || $RM conftest.c + cat > conftest.c </dev/null` + $nocaseglob + else + potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` + fi + for potent_lib in $potential_libs; do + # Follow soft links. + if ls -lLd "$potent_lib" 2>/dev/null | + $GREP " -> " >/dev/null; then + continue + fi + # The statement above tries to avoid entering an + # endless loop below, in case of cyclic links. + # We might still enter an endless loop, since a link + # loop can be closed while we follow links, + # but so what? + potlib="$potent_lib" + while test -h "$potlib" 2>/dev/null; do + potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` + case $potliblink in + [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; + *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";; + esac + done + if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | + $SED -e 10q | + $EGREP "$file_magic_regex" > /dev/null; then + func_append newdeplibs " $a_deplib" + a_deplib="" + break 2 + fi + done + done + fi + if test -n "$a_deplib" ; then + droppeddeps=yes + echo + $ECHO "*** Warning: linker path does not have real file for library $a_deplib." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have" + echo "*** because I did check the linker path looking for a file starting" + if test -z "$potlib" ; then + $ECHO "*** with $libname but no candidates were found. (...for file magic test)" + else + $ECHO "*** with $libname and none of the candidates passed a file format test" + $ECHO "*** using a file magic. Last file checked: $potlib" + fi + fi + ;; + *) + # Add a -L argument. + func_append newdeplibs " $a_deplib" + ;; + esac + done # Gone through all deplibs. + ;; + match_pattern*) + set dummy $deplibs_check_method; shift + match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` + for a_deplib in $deplibs; do + case $a_deplib in + -l*) + func_stripname -l '' "$a_deplib" + name=$func_stripname_result + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $a_deplib "*) + func_append newdeplibs " $a_deplib" + a_deplib="" + ;; + esac + fi + if test -n "$a_deplib" ; then + libname=`eval "\\$ECHO \"$libname_spec\""` + for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do + potential_libs=`ls $i/$libname[.-]* 2>/dev/null` + for potent_lib in $potential_libs; do + potlib="$potent_lib" # see symlink-check above in file_magic test + if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ + $EGREP "$match_pattern_regex" > /dev/null; then + func_append newdeplibs " $a_deplib" + a_deplib="" + break 2 + fi + done + done + fi + if test -n "$a_deplib" ; then + droppeddeps=yes + echo + $ECHO "*** Warning: linker path does not have real file for library $a_deplib." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have" + echo "*** because I did check the linker path looking for a file starting" + if test -z "$potlib" ; then + $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" + else + $ECHO "*** with $libname and none of the candidates passed a file format test" + $ECHO "*** using a regex pattern. Last file checked: $potlib" + fi + fi + ;; + *) + # Add a -L argument. + func_append newdeplibs " $a_deplib" + ;; + esac + done # Gone through all deplibs. + ;; + none | unknown | *) + newdeplibs="" + tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + for i in $predeps $postdeps ; do + # can't use Xsed below, because $i might contain '/' + tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"` + done + fi + case $tmp_deplibs in + *[!\ \ ]*) + echo + if test "X$deplibs_check_method" = "Xnone"; then + echo "*** Warning: inter-library dependencies are not supported in this platform." + else + echo "*** Warning: inter-library dependencies are not known to be supported." + fi + echo "*** All declared inter-library dependencies are being dropped." + droppeddeps=yes + ;; + esac + ;; + esac + versuffix=$versuffix_save + major=$major_save + release=$release_save + libname=$libname_save + name=$name_save + + case $host in + *-*-rhapsody* | *-*-darwin1.[012]) + # On Rhapsody replace the C library with the System framework + newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` + ;; + esac + + if test "$droppeddeps" = yes; then + if test "$module" = yes; then + echo + echo "*** Warning: libtool could not satisfy all declared inter-library" + $ECHO "*** dependencies of module $libname. Therefore, libtool will create" + echo "*** a static module, that should work as long as the dlopening" + echo "*** application is linked with the -dlopen flag." + if test -z "$global_symbol_pipe"; then + echo + echo "*** However, this would only work if libtool was able to extract symbol" + echo "*** lists from a program, using \`nm' or equivalent, but libtool could" + echo "*** not find such a program. So, this module is probably useless." + echo "*** \`nm' from GNU binutils and a full rebuild may help." + fi + if test "$build_old_libs" = no; then + oldlibs="$output_objdir/$libname.$libext" + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + else + echo "*** The inter-library dependencies that have been dropped here will be" + echo "*** automatically added whenever a program is linked with this library" + echo "*** or is declared to -dlopen it." + + if test "$allow_undefined" = no; then + echo + echo "*** Since this library must not contain undefined symbols," + echo "*** because either the platform does not support them or" + echo "*** it was explicitly requested with -no-undefined," + echo "*** libtool will only create a static version of it." + if test "$build_old_libs" = no; then + oldlibs="$output_objdir/$libname.$libext" + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + fi + fi + fi + # Done checking deplibs! + deplibs=$newdeplibs + fi + # Time to change all our "foo.ltframework" stuff back to "-framework foo" + case $host in + *-*-darwin*) + newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + ;; + esac + + # move library search paths that coincide with paths to not yet + # installed libraries to the beginning of the library search list + new_libs= + for path in $notinst_path; do + case " $new_libs " in + *" -L$path/$objdir "*) ;; + *) + case " $deplibs " in + *" -L$path/$objdir "*) + func_append new_libs " -L$path/$objdir" ;; + esac + ;; + esac + done + for deplib in $deplibs; do + case $deplib in + -L*) + case " $new_libs " in + *" $deplib "*) ;; + *) func_append new_libs " $deplib" ;; + esac + ;; + *) func_append new_libs " $deplib" ;; + esac + done + deplibs="$new_libs" + + # All the library-specific variables (install_libdir is set above). + library_names= + old_library= + dlname= + + # Test again, we may have decided not to build it any more + if test "$build_libtool_libs" = yes; then + # Remove ${wl} instances when linking with ld. + # FIXME: should test the right _cmds variable. + case $archive_cmds in + *\$LD\ *) wl= ;; + esac + if test "$hardcode_into_libs" = yes; then + # Hardcode the library paths + hardcode_libdirs= + dep_rpath= + rpath="$finalize_rpath" + test "$opt_mode" != relink && rpath="$compile_rpath$rpath" + for libdir in $rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + func_replace_sysroot "$libdir" + libdir=$func_replace_sysroot_result + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + func_append dep_rpath " $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; + *) func_append perm_rpath " $libdir" ;; + esac + fi + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" + fi + if test -n "$runpath_var" && test -n "$perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do + func_append rpath "$dir:" + done + eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" + fi + test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" + fi + + shlibpath="$finalize_shlibpath" + test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath" + if test -n "$shlibpath"; then + eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" + fi + + # Get the real and link names of the library. + eval shared_ext=\"$shrext_cmds\" + eval library_names=\"$library_names_spec\" + set dummy $library_names + shift + realname="$1" + shift + + if test -n "$soname_spec"; then + eval soname=\"$soname_spec\" + else + soname="$realname" + fi + if test -z "$dlname"; then + dlname=$soname + fi + + lib="$output_objdir/$realname" + linknames= + for link + do + func_append linknames " $link" + done + + # Use standard objects if they are pic + test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` + test "X$libobjs" = "X " && libobjs= + + delfiles= + if test -n "$export_symbols" && test -n "$include_expsyms"; then + $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" + export_symbols="$output_objdir/$libname.uexp" + func_append delfiles " $export_symbols" + fi + + orig_export_symbols= + case $host_os in + cygwin* | mingw* | cegcc*) + if test -n "$export_symbols" && test -z "$export_symbols_regex"; then + # exporting using user supplied symfile + if test "x`$SED 1q $export_symbols`" != xEXPORTS; then + # and it's NOT already a .def file. Must figure out + # which of the given symbols are data symbols and tag + # them as such. So, trigger use of export_symbols_cmds. + # export_symbols gets reassigned inside the "prepare + # the list of exported symbols" if statement, so the + # include_expsyms logic still works. + orig_export_symbols="$export_symbols" + export_symbols= + always_export_symbols=yes + fi + fi + ;; + esac + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then + func_verbose "generating symbol list for \`$libname.la'" + export_symbols="$output_objdir/$libname.exp" + $opt_dry_run || $RM $export_symbols + cmds=$export_symbols_cmds + save_ifs="$IFS"; IFS='~' + for cmd1 in $cmds; do + IFS="$save_ifs" + # Take the normal branch if the nm_file_list_spec branch + # doesn't work or if tool conversion is not needed. + case $nm_file_list_spec~$to_tool_file_cmd in + *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) + try_normal_branch=yes + eval cmd=\"$cmd1\" + func_len " $cmd" + len=$func_len_result + ;; + *) + try_normal_branch=no + ;; + esac + if test "$try_normal_branch" = yes \ + && { test "$len" -lt "$max_cmd_len" \ + || test "$max_cmd_len" -le -1; } + then + func_show_eval "$cmd" 'exit $?' + skipped_export=false + elif test -n "$nm_file_list_spec"; then + func_basename "$output" + output_la=$func_basename_result + save_libobjs=$libobjs + save_output=$output + output=${output_objdir}/${output_la}.nm + func_to_tool_file "$output" + libobjs=$nm_file_list_spec$func_to_tool_file_result + func_append delfiles " $output" + func_verbose "creating $NM input file list: $output" + for obj in $save_libobjs; do + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" + done > "$output" + eval cmd=\"$cmd1\" + func_show_eval "$cmd" 'exit $?' + output=$save_output + libobjs=$save_libobjs + skipped_export=false + else + # The command line is too long to execute in one step. + func_verbose "using reloadable object file for export list..." + skipped_export=: + # Break out early, otherwise skipped_export may be + # set to false by a later but shorter cmd. + break + fi + done + IFS="$save_ifs" + if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then + func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' + func_show_eval '$MV "${export_symbols}T" "$export_symbols"' + fi + fi + fi + + if test -n "$export_symbols" && test -n "$include_expsyms"; then + tmp_export_symbols="$export_symbols" + test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" + $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' + fi + + if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then + # The given exports_symbols file has to be filtered, so filter it. + func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" + # FIXME: $output_objdir/$libname.filter potentially contains lots of + # 's' commands which not all seds can handle. GNU sed should be fine + # though. Also, the filter scales superlinearly with the number of + # global variables. join(1) would be nice here, but unfortunately + # isn't a blessed tool. + $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter + func_append delfiles " $export_symbols $output_objdir/$libname.filter" + export_symbols=$output_objdir/$libname.def + $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols + fi + + tmp_deplibs= + for test_deplib in $deplibs; do + case " $convenience " in + *" $test_deplib "*) ;; + *) + func_append tmp_deplibs " $test_deplib" + ;; + esac + done + deplibs="$tmp_deplibs" + + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec" && + test "$compiler_needs_object" = yes && + test -z "$libobjs"; then + # extract the archives, so we have objects to list. + # TODO: could optimize this to just extract one archive. + whole_archive_flag_spec= + fi + if test -n "$whole_archive_flag_spec"; then + save_libobjs=$libobjs + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + test "X$libobjs" = "X " && libobjs= + else + gentop="$output_objdir/${outputname}x" + func_append generated " $gentop" + + func_extract_archives $gentop $convenience + func_append libobjs " $func_extract_archives_result" + test "X$libobjs" = "X " && libobjs= + fi + fi + + if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then + eval flag=\"$thread_safe_flag_spec\" + func_append linker_flags " $flag" + fi + + # Make a backup of the uninstalled library when relinking + if test "$opt_mode" = relink; then + $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? + fi + + # Do each of the archive commands. + if test "$module" = yes && test -n "$module_cmds" ; then + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then + eval test_cmds=\"$module_expsym_cmds\" + cmds=$module_expsym_cmds + else + eval test_cmds=\"$module_cmds\" + cmds=$module_cmds + fi + else + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then + eval test_cmds=\"$archive_expsym_cmds\" + cmds=$archive_expsym_cmds + else + eval test_cmds=\"$archive_cmds\" + cmds=$archive_cmds + fi + fi + + if test "X$skipped_export" != "X:" && + func_len " $test_cmds" && + len=$func_len_result && + test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then + : + else + # The command line is too long to link in one step, link piecewise + # or, if using GNU ld and skipped_export is not :, use a linker + # script. + + # Save the value of $output and $libobjs because we want to + # use them later. If we have whole_archive_flag_spec, we + # want to use save_libobjs as it was before + # whole_archive_flag_spec was expanded, because we can't + # assume the linker understands whole_archive_flag_spec. + # This may have to be revisited, in case too many + # convenience libraries get linked in and end up exceeding + # the spec. + if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then + save_libobjs=$libobjs + fi + save_output=$output + func_basename "$output" + output_la=$func_basename_result + + # Clear the reloadable object creation command queue and + # initialize k to one. + test_cmds= + concat_cmds= + objlist= + last_robj= + k=1 + + if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then + output=${output_objdir}/${output_la}.lnkscript + func_verbose "creating GNU ld script: $output" + echo 'INPUT (' > $output + for obj in $save_libobjs + do + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" >> $output + done + echo ')' >> $output + func_append delfiles " $output" + func_to_tool_file "$output" + output=$func_to_tool_file_result + elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then + output=${output_objdir}/${output_la}.lnk + func_verbose "creating linker input file list: $output" + : > $output + set x $save_libobjs + shift + firstobj= + if test "$compiler_needs_object" = yes; then + firstobj="$1 " + shift + fi + for obj + do + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" >> $output + done + func_append delfiles " $output" + func_to_tool_file "$output" + output=$firstobj\"$file_list_spec$func_to_tool_file_result\" + else + if test -n "$save_libobjs"; then + func_verbose "creating reloadable object files..." + output=$output_objdir/$output_la-${k}.$objext + eval test_cmds=\"$reload_cmds\" + func_len " $test_cmds" + len0=$func_len_result + len=$len0 + + # Loop over the list of objects to be linked. + for obj in $save_libobjs + do + func_len " $obj" + func_arith $len + $func_len_result + len=$func_arith_result + if test "X$objlist" = X || + test "$len" -lt "$max_cmd_len"; then + func_append objlist " $obj" + else + # The command $test_cmds is almost too long, add a + # command to the queue. + if test "$k" -eq 1 ; then + # The first file doesn't have a previous command to add. + reload_objs=$objlist + eval concat_cmds=\"$reload_cmds\" + else + # All subsequent reloadable object files will link in + # the last one created. + reload_objs="$objlist $last_robj" + eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" + fi + last_robj=$output_objdir/$output_la-${k}.$objext + func_arith $k + 1 + k=$func_arith_result + output=$output_objdir/$output_la-${k}.$objext + objlist=" $obj" + func_len " $last_robj" + func_arith $len0 + $func_len_result + len=$func_arith_result + fi + done + # Handle the remaining objects by creating one last + # reloadable object file. All subsequent reloadable object + # files will link in the last one created. + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + reload_objs="$objlist $last_robj" + eval concat_cmds=\"\${concat_cmds}$reload_cmds\" + if test -n "$last_robj"; then + eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" + fi + func_append delfiles " $output" + + else + output= + fi + + if ${skipped_export-false}; then + func_verbose "generating symbol list for \`$libname.la'" + export_symbols="$output_objdir/$libname.exp" + $opt_dry_run || $RM $export_symbols + libobjs=$output + # Append the command to create the export file. + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" + if test -n "$last_robj"; then + eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" + fi + fi + + test -n "$save_libobjs" && + func_verbose "creating a temporary reloadable object file: $output" + + # Loop through the commands generated above and execute them. + save_ifs="$IFS"; IFS='~' + for cmd in $concat_cmds; do + IFS="$save_ifs" + $opt_silent || { + func_quote_for_expand "$cmd" + eval "func_echo $func_quote_for_expand_result" + } + $opt_dry_run || eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test "$opt_mode" = relink; then + ( cd "$output_objdir" && \ + $RM "${realname}T" && \ + $MV "${realname}U" "$realname" ) + fi + + exit $lt_exit + } + done + IFS="$save_ifs" + + if test -n "$export_symbols_regex" && ${skipped_export-false}; then + func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' + func_show_eval '$MV "${export_symbols}T" "$export_symbols"' + fi + fi + + if ${skipped_export-false}; then + if test -n "$export_symbols" && test -n "$include_expsyms"; then + tmp_export_symbols="$export_symbols" + test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" + $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' + fi + + if test -n "$orig_export_symbols"; then + # The given exports_symbols file has to be filtered, so filter it. + func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" + # FIXME: $output_objdir/$libname.filter potentially contains lots of + # 's' commands which not all seds can handle. GNU sed should be fine + # though. Also, the filter scales superlinearly with the number of + # global variables. join(1) would be nice here, but unfortunately + # isn't a blessed tool. + $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter + func_append delfiles " $export_symbols $output_objdir/$libname.filter" + export_symbols=$output_objdir/$libname.def + $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols + fi + fi + + libobjs=$output + # Restore the value of output. + output=$save_output + + if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + test "X$libobjs" = "X " && libobjs= + fi + # Expand the library linking commands again to reset the + # value of $libobjs for piecewise linking. + + # Do each of the archive commands. + if test "$module" = yes && test -n "$module_cmds" ; then + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then + cmds=$module_expsym_cmds + else + cmds=$module_cmds + fi + else + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then + cmds=$archive_expsym_cmds + else + cmds=$archive_cmds + fi + fi + fi + + if test -n "$delfiles"; then + # Append the command to remove temporary files to $cmds. + eval cmds=\"\$cmds~\$RM $delfiles\" + fi + + # Add any objects from preloaded convenience libraries + if test -n "$dlprefiles"; then + gentop="$output_objdir/${outputname}x" + func_append generated " $gentop" + + func_extract_archives $gentop $dlprefiles + func_append libobjs " $func_extract_archives_result" + test "X$libobjs" = "X " && libobjs= + fi + + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $opt_silent || { + func_quote_for_expand "$cmd" + eval "func_echo $func_quote_for_expand_result" + } + $opt_dry_run || eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test "$opt_mode" = relink; then + ( cd "$output_objdir" && \ + $RM "${realname}T" && \ + $MV "${realname}U" "$realname" ) + fi + + exit $lt_exit + } + done + IFS="$save_ifs" + + # Restore the uninstalled library and exit + if test "$opt_mode" = relink; then + $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? + + if test -n "$convenience"; then + if test -z "$whole_archive_flag_spec"; then + func_show_eval '${RM}r "$gentop"' + fi + fi + + exit $EXIT_SUCCESS + fi + + # Create links to the real library. + for linkname in $linknames; do + if test "$realname" != "$linkname"; then + func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' + fi + done + + # If -module or -export-dynamic was specified, set the dlname. + if test "$module" = yes || test "$export_dynamic" = yes; then + # On all known operating systems, these are identical. + dlname="$soname" + fi + fi + ;; + + obj) + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + func_warning "\`-dlopen' is ignored for objects" + fi + + case " $deplibs" in + *\ -l* | *\ -L*) + func_warning "\`-l' and \`-L' are ignored for objects" ;; + esac + + test -n "$rpath" && \ + func_warning "\`-rpath' is ignored for objects" + + test -n "$xrpath" && \ + func_warning "\`-R' is ignored for objects" + + test -n "$vinfo" && \ + func_warning "\`-version-info' is ignored for objects" + + test -n "$release" && \ + func_warning "\`-release' is ignored for objects" + + case $output in + *.lo) + test -n "$objs$old_deplibs" && \ + func_fatal_error "cannot build library object \`$output' from non-libtool objects" + + libobj=$output + func_lo2o "$libobj" + obj=$func_lo2o_result + ;; + *) + libobj= + obj="$output" + ;; + esac + + # Delete the old objects. + $opt_dry_run || $RM $obj $libobj + + # Objects from convenience libraries. This assumes + # single-version convenience libraries. Whenever we create + # different ones for PIC/non-PIC, this we'll have to duplicate + # the extraction. + reload_conv_objs= + gentop= + # reload_cmds runs $LD directly, so let us get rid of + # -Wl from whole_archive_flag_spec and hope we can get by with + # turning comma into space.. + wl= + + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec"; then + eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" + reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` + else + gentop="$output_objdir/${obj}x" + func_append generated " $gentop" + + func_extract_archives $gentop $convenience + reload_conv_objs="$reload_objs $func_extract_archives_result" + fi + fi + + # If we're not building shared, we need to use non_pic_objs + test "$build_libtool_libs" != yes && libobjs="$non_pic_objects" + + # Create the old-style object. + reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test + + output="$obj" + func_execute_cmds "$reload_cmds" 'exit $?' + + # Exit if we aren't doing a library object file. + if test -z "$libobj"; then + if test -n "$gentop"; then + func_show_eval '${RM}r "$gentop"' + fi + + exit $EXIT_SUCCESS + fi + + if test "$build_libtool_libs" != yes; then + if test -n "$gentop"; then + func_show_eval '${RM}r "$gentop"' + fi + + # Create an invalid libtool object if no PIC, so that we don't + # accidentally link it into a program. + # $show "echo timestamp > $libobj" + # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? + exit $EXIT_SUCCESS + fi + + if test -n "$pic_flag" || test "$pic_mode" != default; then + # Only do commands if we really have different PIC objects. + reload_objs="$libobjs $reload_conv_objs" + output="$libobj" + func_execute_cmds "$reload_cmds" 'exit $?' + fi + + if test -n "$gentop"; then + func_show_eval '${RM}r "$gentop"' + fi + + exit $EXIT_SUCCESS + ;; + + prog) + case $host in + *cygwin*) func_stripname '' '.exe' "$output" + output=$func_stripname_result.exe;; + esac + test -n "$vinfo" && \ + func_warning "\`-version-info' is ignored for programs" + + test -n "$release" && \ + func_warning "\`-release' is ignored for programs" + + test "$preload" = yes \ + && test "$dlopen_support" = unknown \ + && test "$dlopen_self" = unknown \ + && test "$dlopen_self_static" = unknown && \ + func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." + + case $host in + *-*-rhapsody* | *-*-darwin1.[012]) + # On Rhapsody replace the C library is the System framework + compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` + finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` + ;; + esac + + case $host in + *-*-darwin*) + # Don't allow lazy linking, it breaks C++ global constructors + # But is supposedly fixed on 10.4 or later (yay!). + if test "$tagname" = CXX ; then + case ${MACOSX_DEPLOYMENT_TARGET-10.0} in + 10.[0123]) + func_append compile_command " ${wl}-bind_at_load" + func_append finalize_command " ${wl}-bind_at_load" + ;; + esac + fi + # Time to change all our "foo.ltframework" stuff back to "-framework foo" + compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + ;; + esac + + + # move library search paths that coincide with paths to not yet + # installed libraries to the beginning of the library search list + new_libs= + for path in $notinst_path; do + case " $new_libs " in + *" -L$path/$objdir "*) ;; + *) + case " $compile_deplibs " in + *" -L$path/$objdir "*) + func_append new_libs " -L$path/$objdir" ;; + esac + ;; + esac + done + for deplib in $compile_deplibs; do + case $deplib in + -L*) + case " $new_libs " in + *" $deplib "*) ;; + *) func_append new_libs " $deplib" ;; + esac + ;; + *) func_append new_libs " $deplib" ;; + esac + done + compile_deplibs="$new_libs" + + + func_append compile_command " $compile_deplibs" + func_append finalize_command " $finalize_deplibs" + + if test -n "$rpath$xrpath"; then + # If the user specified any rpath flags, then add them. + for libdir in $rpath $xrpath; do + # This is the magic to use -rpath. + case "$finalize_rpath " in + *" $libdir "*) ;; + *) func_append finalize_rpath " $libdir" ;; + esac + done + fi + + # Now hardcode the library paths + rpath= + hardcode_libdirs= + for libdir in $compile_rpath $finalize_rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + func_append rpath " $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; + *) func_append perm_rpath " $libdir" ;; + esac + fi + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$libdir:"*) ;; + ::) dllsearchpath=$libdir;; + *) func_append dllsearchpath ":$libdir";; + esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + ::) dllsearchpath=$testbindir;; + *) func_append dllsearchpath ":$testbindir";; + esac + ;; + esac + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + eval rpath=\" $hardcode_libdir_flag_spec\" + fi + compile_rpath="$rpath" + + rpath= + hardcode_libdirs= + for libdir in $finalize_rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + func_append rpath " $flag" + fi + elif test -n "$runpath_var"; then + case "$finalize_perm_rpath " in + *" $libdir "*) ;; + *) func_append finalize_perm_rpath " $libdir" ;; + esac + fi + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + eval rpath=\" $hardcode_libdir_flag_spec\" + fi + finalize_rpath="$rpath" + + if test -n "$libobjs" && test "$build_old_libs" = yes; then + # Transform all the library objects into standard objects. + compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` + finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` + fi + + func_generate_dlsyms "$outputname" "@PROGRAM@" "no" + + # template prelinking step + if test -n "$prelink_cmds"; then + func_execute_cmds "$prelink_cmds" 'exit $?' + fi + + wrappers_required=yes + case $host in + *cegcc* | *mingw32ce*) + # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. + wrappers_required=no + ;; + *cygwin* | *mingw* ) + if test "$build_libtool_libs" != yes; then + wrappers_required=no + fi + ;; + *) + if test "$need_relink" = no || test "$build_libtool_libs" != yes; then + wrappers_required=no + fi + ;; + esac + if test "$wrappers_required" = no; then + # Replace the output file specification. + compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` + link_command="$compile_command$compile_rpath" + + # We have no uninstalled library dependencies, so finalize right now. + exit_status=0 + func_show_eval "$link_command" 'exit_status=$?' + + if test -n "$postlink_cmds"; then + func_to_tool_file "$output" + postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` + func_execute_cmds "$postlink_cmds" 'exit $?' + fi + + # Delete the generated files. + if test -f "$output_objdir/${outputname}S.${objext}"; then + func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' + fi + + exit $exit_status + fi + + if test -n "$compile_shlibpath$finalize_shlibpath"; then + compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" + fi + if test -n "$finalize_shlibpath"; then + finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" + fi + + compile_var= + finalize_var= + if test -n "$runpath_var"; then + if test -n "$perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do + func_append rpath "$dir:" + done + compile_var="$runpath_var=\"$rpath\$$runpath_var\" " + fi + if test -n "$finalize_perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $finalize_perm_rpath; do + func_append rpath "$dir:" + done + finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " + fi + fi + + if test "$no_install" = yes; then + # We don't need to create a wrapper script. + link_command="$compile_var$compile_command$compile_rpath" + # Replace the output file specification. + link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` + # Delete the old output file. + $opt_dry_run || $RM $output + # Link the executable and exit + func_show_eval "$link_command" 'exit $?' + + if test -n "$postlink_cmds"; then + func_to_tool_file "$output" + postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` + func_execute_cmds "$postlink_cmds" 'exit $?' + fi + + exit $EXIT_SUCCESS + fi + + if test "$hardcode_action" = relink; then + # Fast installation is not supported + link_command="$compile_var$compile_command$compile_rpath" + relink_command="$finalize_var$finalize_command$finalize_rpath" + + func_warning "this platform does not like uninstalled shared libraries" + func_warning "\`$output' will be relinked during installation" + else + if test "$fast_install" != no; then + link_command="$finalize_var$compile_command$finalize_rpath" + if test "$fast_install" = yes; then + relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` + else + # fast_install is set to needless + relink_command= + fi + else + link_command="$compile_var$compile_command$compile_rpath" + relink_command="$finalize_var$finalize_command$finalize_rpath" + fi + fi + + # Replace the output file specification. + link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` + + # Delete the old output files. + $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname + + func_show_eval "$link_command" 'exit $?' + + if test -n "$postlink_cmds"; then + func_to_tool_file "$output_objdir/$outputname" + postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` + func_execute_cmds "$postlink_cmds" 'exit $?' + fi + + # Now create the wrapper script. + func_verbose "creating $output" + + # Quote the relink command for shipping. + if test -n "$relink_command"; then + # Preserve any variables that may affect compiler behavior + for var in $variables_saved_for_relink; do + if eval test -z \"\${$var+set}\"; then + relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" + elif eval var_value=\$$var; test -z "$var_value"; then + relink_command="$var=; export $var; $relink_command" + else + func_quote_for_eval "$var_value" + relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" + fi + done + relink_command="(cd `pwd`; $relink_command)" + relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` + fi + + # Only actually do things if not in dry run mode. + $opt_dry_run || { + # win32 will think the script is a binary if it has + # a .exe suffix, so we strip it off here. + case $output in + *.exe) func_stripname '' '.exe' "$output" + output=$func_stripname_result ;; + esac + # test for cygwin because mv fails w/o .exe extensions + case $host in + *cygwin*) + exeext=.exe + func_stripname '' '.exe' "$outputname" + outputname=$func_stripname_result ;; + *) exeext= ;; + esac + case $host in + *cygwin* | *mingw* ) + func_dirname_and_basename "$output" "" "." + output_name=$func_basename_result + output_path=$func_dirname_result + cwrappersource="$output_path/$objdir/lt-$output_name.c" + cwrapper="$output_path/$output_name.exe" + $RM $cwrappersource $cwrapper + trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 + + func_emit_cwrapperexe_src > $cwrappersource + + # The wrapper executable is built using the $host compiler, + # because it contains $host paths and files. If cross- + # compiling, it, like the target executable, must be + # executed on the $host or under an emulation environment. + $opt_dry_run || { + $LTCC $LTCFLAGS -o $cwrapper $cwrappersource + $STRIP $cwrapper + } + + # Now, create the wrapper script for func_source use: + func_ltwrapper_scriptname $cwrapper + $RM $func_ltwrapper_scriptname_result + trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 + $opt_dry_run || { + # note: this script will not be executed, so do not chmod. + if test "x$build" = "x$host" ; then + $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result + else + func_emit_wrapper no > $func_ltwrapper_scriptname_result + fi + } + ;; + * ) + $RM $output + trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 + + func_emit_wrapper no > $output + chmod +x $output + ;; + esac + } + exit $EXIT_SUCCESS + ;; + esac + + # See if we need to build an old-fashioned archive. + for oldlib in $oldlibs; do + + if test "$build_libtool_libs" = convenience; then + oldobjs="$libobjs_save $symfileobj" + addlibs="$convenience" + build_libtool_libs=no + else + if test "$build_libtool_libs" = module; then + oldobjs="$libobjs_save" + build_libtool_libs=no + else + oldobjs="$old_deplibs $non_pic_objects" + if test "$preload" = yes && test -f "$symfileobj"; then + func_append oldobjs " $symfileobj" + fi + fi + addlibs="$old_convenience" + fi + + if test -n "$addlibs"; then + gentop="$output_objdir/${outputname}x" + func_append generated " $gentop" + + func_extract_archives $gentop $addlibs + func_append oldobjs " $func_extract_archives_result" + fi + + # Do each command in the archive commands. + if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then + cmds=$old_archive_from_new_cmds + else + + # Add any objects from preloaded convenience libraries + if test -n "$dlprefiles"; then + gentop="$output_objdir/${outputname}x" + func_append generated " $gentop" + + func_extract_archives $gentop $dlprefiles + func_append oldobjs " $func_extract_archives_result" + fi + + # POSIX demands no paths to be encoded in archives. We have + # to avoid creating archives with duplicate basenames if we + # might have to extract them afterwards, e.g., when creating a + # static archive out of a convenience library, or when linking + # the entirety of a libtool archive into another (currently + # not supported by libtool). + if (for obj in $oldobjs + do + func_basename "$obj" + $ECHO "$func_basename_result" + done | sort | sort -uc >/dev/null 2>&1); then + : + else + echo "copying selected object files to avoid basename conflicts..." + gentop="$output_objdir/${outputname}x" + func_append generated " $gentop" + func_mkdir_p "$gentop" + save_oldobjs=$oldobjs + oldobjs= + counter=1 + for obj in $save_oldobjs + do + func_basename "$obj" + objbase="$func_basename_result" + case " $oldobjs " in + " ") oldobjs=$obj ;; + *[\ /]"$objbase "*) + while :; do + # Make sure we don't pick an alternate name that also + # overlaps. + newobj=lt$counter-$objbase + func_arith $counter + 1 + counter=$func_arith_result + case " $oldobjs " in + *[\ /]"$newobj "*) ;; + *) if test ! -f "$gentop/$newobj"; then break; fi ;; + esac + done + func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" + func_append oldobjs " $gentop/$newobj" + ;; + *) func_append oldobjs " $obj" ;; + esac + done + fi + func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 + tool_oldlib=$func_to_tool_file_result + eval cmds=\"$old_archive_cmds\" + + func_len " $cmds" + len=$func_len_result + if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then + cmds=$old_archive_cmds + elif test -n "$archiver_list_spec"; then + func_verbose "using command file archive linking..." + for obj in $oldobjs + do + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" + done > $output_objdir/$libname.libcmd + func_to_tool_file "$output_objdir/$libname.libcmd" + oldobjs=" $archiver_list_spec$func_to_tool_file_result" + cmds=$old_archive_cmds + else + # the command line is too long to link in one step, link in parts + func_verbose "using piecewise archive linking..." + save_RANLIB=$RANLIB + RANLIB=: + objlist= + concat_cmds= + save_oldobjs=$oldobjs + oldobjs= + # Is there a better way of finding the last object in the list? + for obj in $save_oldobjs + do + last_oldobj=$obj + done + eval test_cmds=\"$old_archive_cmds\" + func_len " $test_cmds" + len0=$func_len_result + len=$len0 + for obj in $save_oldobjs + do + func_len " $obj" + func_arith $len + $func_len_result + len=$func_arith_result + func_append objlist " $obj" + if test "$len" -lt "$max_cmd_len"; then + : + else + # the above command should be used before it gets too long + oldobjs=$objlist + if test "$obj" = "$last_oldobj" ; then + RANLIB=$save_RANLIB + fi + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" + objlist= + len=$len0 + fi + done + RANLIB=$save_RANLIB + oldobjs=$objlist + if test "X$oldobjs" = "X" ; then + eval cmds=\"\$concat_cmds\" + else + eval cmds=\"\$concat_cmds~\$old_archive_cmds\" + fi + fi + fi + func_execute_cmds "$cmds" 'exit $?' + done + + test -n "$generated" && \ + func_show_eval "${RM}r$generated" + + # Now create the libtool archive. + case $output in + *.la) + old_library= + test "$build_old_libs" = yes && old_library="$libname.$libext" + func_verbose "creating $output" + + # Preserve any variables that may affect compiler behavior + for var in $variables_saved_for_relink; do + if eval test -z \"\${$var+set}\"; then + relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" + elif eval var_value=\$$var; test -z "$var_value"; then + relink_command="$var=; export $var; $relink_command" + else + func_quote_for_eval "$var_value" + relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" + fi + done + # Quote the link command for shipping. + relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" + relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` + if test "$hardcode_automatic" = yes ; then + relink_command= + fi + + # Only create the output if not a dry run. + $opt_dry_run || { + for installed in no yes; do + if test "$installed" = yes; then + if test -z "$install_libdir"; then + break + fi + output="$output_objdir/$outputname"i + # Replace all uninstalled libtool libraries with the installed ones + newdependency_libs= + for deplib in $dependency_libs; do + case $deplib in + *.la) + func_basename "$deplib" + name="$func_basename_result" + func_resolve_sysroot "$deplib" + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` + test -z "$libdir" && \ + func_fatal_error "\`$deplib' is not a valid libtool archive" + func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" + ;; + -L*) + func_stripname -L '' "$deplib" + func_replace_sysroot "$func_stripname_result" + func_append newdependency_libs " -L$func_replace_sysroot_result" + ;; + -R*) + func_stripname -R '' "$deplib" + func_replace_sysroot "$func_stripname_result" + func_append newdependency_libs " -R$func_replace_sysroot_result" + ;; + *) func_append newdependency_libs " $deplib" ;; + esac + done + dependency_libs="$newdependency_libs" + newdlfiles= + + for lib in $dlfiles; do + case $lib in + *.la) + func_basename "$lib" + name="$func_basename_result" + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + test -z "$libdir" && \ + func_fatal_error "\`$lib' is not a valid libtool archive" + func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" + ;; + *) func_append newdlfiles " $lib" ;; + esac + done + dlfiles="$newdlfiles" + newdlprefiles= + for lib in $dlprefiles; do + case $lib in + *.la) + # Only pass preopened files to the pseudo-archive (for + # eventual linking with the app. that links it) if we + # didn't already link the preopened objects directly into + # the library: + func_basename "$lib" + name="$func_basename_result" + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + test -z "$libdir" && \ + func_fatal_error "\`$lib' is not a valid libtool archive" + func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" + ;; + esac + done + dlprefiles="$newdlprefiles" + else + newdlfiles= + for lib in $dlfiles; do + case $lib in + [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + *) abs=`pwd`"/$lib" ;; + esac + func_append newdlfiles " $abs" + done + dlfiles="$newdlfiles" + newdlprefiles= + for lib in $dlprefiles; do + case $lib in + [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + *) abs=`pwd`"/$lib" ;; + esac + func_append newdlprefiles " $abs" + done + dlprefiles="$newdlprefiles" + fi + $RM $output + # place dlname in correct position for cygwin + # In fact, it would be nice if we could use this code for all target + # systems that can't hard-code library paths into their executables + # and that have no shared library path variable independent of PATH, + # but it turns out we can't easily determine that from inspecting + # libtool variables, so we have to hard-code the OSs to which it + # applies here; at the moment, that means platforms that use the PE + # object format with DLL files. See the long comment at the top of + # tests/bindir.at for full details. + tdlname=$dlname + case $host,$output,$installed,$module,$dlname in + *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) + # If a -bindir argument was supplied, place the dll there. + if test "x$bindir" != x ; + then + func_relative_path "$install_libdir" "$bindir" + tdlname=$func_relative_path_result$dlname + else + # Otherwise fall back on heuristic. + tdlname=../bin/$dlname + fi + ;; + esac + $ECHO > $output "\ +# $outputname - a libtool library file +# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# The name that we can dlopen(3). +dlname='$tdlname' + +# Names of this library. +library_names='$library_names' + +# The name of the static archive. +old_library='$old_library' + +# Linker flags that can not go in dependency_libs. +inherited_linker_flags='$new_inherited_linker_flags' + +# Libraries that this one depends upon. +dependency_libs='$dependency_libs' + +# Names of additional weak libraries provided by this library +weak_library_names='$weak_libs' + +# Version information for $libname. +current=$current +age=$age +revision=$revision + +# Is this an already installed library? +installed=$installed + +# Should we warn about portability when linking against -modules? +shouldnotlink=$module + +# Files to dlopen/dlpreopen +dlopen='$dlfiles' +dlpreopen='$dlprefiles' + +# Directory that this library needs to be installed in: +libdir='$install_libdir'" + if test "$installed" = no && test "$need_relink" = yes; then + $ECHO >> $output "\ +relink_command=\"$relink_command\"" + fi + done + } + + # Do a symbolic link so that the libtool archive can be found in + # LD_LIBRARY_PATH before the program is installed. + func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' + ;; + esac + exit $EXIT_SUCCESS +} + +{ test "$opt_mode" = link || test "$opt_mode" = relink; } && + func_mode_link ${1+"$@"} + + +# func_mode_uninstall arg... +func_mode_uninstall () +{ + $opt_debug + RM="$nonopt" + files= + rmforce= + exit_status=0 + + # This variable tells wrapper scripts just to set variables rather + # than running their programs. + libtool_install_magic="$magic" + + for arg + do + case $arg in + -f) func_append RM " $arg"; rmforce=yes ;; + -*) func_append RM " $arg" ;; + *) func_append files " $arg" ;; + esac + done + + test -z "$RM" && \ + func_fatal_help "you must specify an RM program" + + rmdirs= + + for file in $files; do + func_dirname "$file" "" "." + dir="$func_dirname_result" + if test "X$dir" = X.; then + odir="$objdir" + else + odir="$dir/$objdir" + fi + func_basename "$file" + name="$func_basename_result" + test "$opt_mode" = uninstall && odir="$dir" + + # Remember odir for removal later, being careful to avoid duplicates + if test "$opt_mode" = clean; then + case " $rmdirs " in + *" $odir "*) ;; + *) func_append rmdirs " $odir" ;; + esac + fi + + # Don't error if the file doesn't exist and rm -f was used. + if { test -L "$file"; } >/dev/null 2>&1 || + { test -h "$file"; } >/dev/null 2>&1 || + test -f "$file"; then + : + elif test -d "$file"; then + exit_status=1 + continue + elif test "$rmforce" = yes; then + continue + fi + + rmfiles="$file" + + case $name in + *.la) + # Possibly a libtool archive, so verify it. + if func_lalib_p "$file"; then + func_source $dir/$name + + # Delete the libtool libraries and symlinks. + for n in $library_names; do + func_append rmfiles " $odir/$n" + done + test -n "$old_library" && func_append rmfiles " $odir/$old_library" + + case "$opt_mode" in + clean) + case " $library_names " in + *" $dlname "*) ;; + *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; + esac + test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" + ;; + uninstall) + if test -n "$library_names"; then + # Do each command in the postuninstall commands. + func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' + fi + + if test -n "$old_library"; then + # Do each command in the old_postuninstall commands. + func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' + fi + # FIXME: should reinstall the best remaining shared library. + ;; + esac + fi + ;; + + *.lo) + # Possibly a libtool object, so verify it. + if func_lalib_p "$file"; then + + # Read the .lo file + func_source $dir/$name + + # Add PIC object to the list of files to remove. + if test -n "$pic_object" && + test "$pic_object" != none; then + func_append rmfiles " $dir/$pic_object" + fi + + # Add non-PIC object to the list of files to remove. + if test -n "$non_pic_object" && + test "$non_pic_object" != none; then + func_append rmfiles " $dir/$non_pic_object" + fi + fi + ;; + + *) + if test "$opt_mode" = clean ; then + noexename=$name + case $file in + *.exe) + func_stripname '' '.exe' "$file" + file=$func_stripname_result + func_stripname '' '.exe' "$name" + noexename=$func_stripname_result + # $file with .exe has already been added to rmfiles, + # add $file without .exe + func_append rmfiles " $file" + ;; + esac + # Do a test to see if this is a libtool program. + if func_ltwrapper_p "$file"; then + if func_ltwrapper_executable_p "$file"; then + func_ltwrapper_scriptname "$file" + relink_command= + func_source $func_ltwrapper_scriptname_result + func_append rmfiles " $func_ltwrapper_scriptname_result" + else + relink_command= + func_source $dir/$noexename + fi + + # note $name still contains .exe if it was in $file originally + # as does the version of $file that was added into $rmfiles + func_append rmfiles " $odir/$name $odir/${name}S.${objext}" + if test "$fast_install" = yes && test -n "$relink_command"; then + func_append rmfiles " $odir/lt-$name" + fi + if test "X$noexename" != "X$name" ; then + func_append rmfiles " $odir/lt-${noexename}.c" + fi + fi + fi + ;; + esac + func_show_eval "$RM $rmfiles" 'exit_status=1' + done + + # Try to remove the ${objdir}s in the directories where we deleted files + for dir in $rmdirs; do + if test -d "$dir"; then + func_show_eval "rmdir $dir >/dev/null 2>&1" + fi + done + + exit $exit_status +} + +{ test "$opt_mode" = uninstall || test "$opt_mode" = clean; } && + func_mode_uninstall ${1+"$@"} + +test -z "$opt_mode" && { + help="$generic_help" + func_fatal_help "you must specify a MODE" +} + +test -z "$exec_cmd" && \ + func_fatal_help "invalid operation mode \`$opt_mode'" + +if test -n "$exec_cmd"; then + eval exec "$exec_cmd" + exit $EXIT_FAILURE +fi + +exit $exit_status + + +# The TAGs below are defined such that we never get into a situation +# in which we disable both kinds of libraries. Given conflicting +# choices, we go for a static library, that is the most portable, +# since we can't tell whether shared libraries were disabled because +# the user asked for that or because the platform doesn't support +# them. This is particularly important on AIX, because we don't +# support having both static and shared libraries enabled at the same +# time on that platform, so we default to a shared-only configuration. +# If a disable-shared tag is given, we'll fallback to a static-only +# configuration. But we'll never go from static-only to shared-only. + +# ### BEGIN LIBTOOL TAG CONFIG: disable-shared +build_libtool_libs=no +build_old_libs=yes +# ### END LIBTOOL TAG CONFIG: disable-shared + +# ### BEGIN LIBTOOL TAG CONFIG: disable-static +build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` +# ### END LIBTOOL TAG CONFIG: disable-static + +# Local Variables: +# mode:shell-script +# sh-indentation:2 +# End: +# vi:sw=2 + diff --git a/enet server test/enet2/m4/.keep b/enet server test/enet2/m4/.keep new file mode 100644 index 0000000..e69de29 diff --git a/enet server test/enet2/m4/libtool.m4 b/enet server test/enet2/m4/libtool.m4 new file mode 100644 index 0000000..d7c043f --- /dev/null +++ b/enet server test/enet2/m4/libtool.m4 @@ -0,0 +1,7997 @@ +# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +m4_define([_LT_COPYING], [dnl +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file is part of GNU Libtool. +# +# GNU Libtool is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# As a special exception to the GNU General Public License, +# if you distribute this file as part of a program or library that +# is built using GNU Libtool, you may include this file under the +# same distribution terms that you use for the rest of that program. +# +# GNU Libtool is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, or +# obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +]) + +# serial 57 LT_INIT + + +# LT_PREREQ(VERSION) +# ------------------ +# Complain and exit if this libtool version is less that VERSION. +m4_defun([LT_PREREQ], +[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, + [m4_default([$3], + [m4_fatal([Libtool version $1 or higher is required], + 63)])], + [$2])]) + + +# _LT_CHECK_BUILDDIR +# ------------------ +# Complain if the absolute build directory name contains unusual characters +m4_defun([_LT_CHECK_BUILDDIR], +[case `pwd` in + *\ * | *\ *) + AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; +esac +]) + + +# LT_INIT([OPTIONS]) +# ------------------ +AC_DEFUN([LT_INIT], +[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT +AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl +AC_BEFORE([$0], [LT_LANG])dnl +AC_BEFORE([$0], [LT_OUTPUT])dnl +AC_BEFORE([$0], [LTDL_INIT])dnl +m4_require([_LT_CHECK_BUILDDIR])dnl + +dnl Autoconf doesn't catch unexpanded LT_ macros by default: +m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl +m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl +dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 +dnl unless we require an AC_DEFUNed macro: +AC_REQUIRE([LTOPTIONS_VERSION])dnl +AC_REQUIRE([LTSUGAR_VERSION])dnl +AC_REQUIRE([LTVERSION_VERSION])dnl +AC_REQUIRE([LTOBSOLETE_VERSION])dnl +m4_require([_LT_PROG_LTMAIN])dnl + +_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) + +dnl Parse OPTIONS +_LT_SET_OPTIONS([$0], [$1]) + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ltmain" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' +AC_SUBST(LIBTOOL)dnl + +_LT_SETUP + +# Only expand once: +m4_define([LT_INIT]) +])# LT_INIT + +# Old names: +AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) +AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_PROG_LIBTOOL], []) +dnl AC_DEFUN([AM_PROG_LIBTOOL], []) + + +# _LT_CC_BASENAME(CC) +# ------------------- +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +m4_defun([_LT_CC_BASENAME], +[for cc_temp in $1""; do + case $cc_temp in + compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; + distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` +]) + + +# _LT_FILEUTILS_DEFAULTS +# ---------------------- +# It is okay to use these file commands and assume they have been set +# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. +m4_defun([_LT_FILEUTILS_DEFAULTS], +[: ${CP="cp -f"} +: ${MV="mv -f"} +: ${RM="rm -f"} +])# _LT_FILEUTILS_DEFAULTS + + +# _LT_SETUP +# --------- +m4_defun([_LT_SETUP], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl +AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl + +_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl +dnl +_LT_DECL([], [host_alias], [0], [The host system])dnl +_LT_DECL([], [host], [0])dnl +_LT_DECL([], [host_os], [0])dnl +dnl +_LT_DECL([], [build_alias], [0], [The build system])dnl +_LT_DECL([], [build], [0])dnl +_LT_DECL([], [build_os], [0])dnl +dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([LT_PATH_LD])dnl +AC_REQUIRE([LT_PATH_NM])dnl +dnl +AC_REQUIRE([AC_PROG_LN_S])dnl +test -z "$LN_S" && LN_S="ln -s" +_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl +dnl +AC_REQUIRE([LT_CMD_MAX_LEN])dnl +_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl +_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl +dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_CHECK_SHELL_FEATURES])dnl +m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl +m4_require([_LT_CMD_RELOAD])dnl +m4_require([_LT_CHECK_MAGIC_METHOD])dnl +m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl +m4_require([_LT_CMD_OLD_ARCHIVE])dnl +m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl +m4_require([_LT_WITH_SYSROOT])dnl + +_LT_CONFIG_LIBTOOL_INIT([ +# See if we are running on zsh, and set the options which allow our +# commands through without removal of \ escapes INIT. +if test -n "\${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi +]) +if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi + +_LT_CHECK_OBJDIR + +m4_require([_LT_TAG_COMPILER])dnl + +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; +esac + +# Global variables: +ofile=libtool +can_build_shared=yes + +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a + +with_gnu_ld="$lt_cv_prog_gnu_ld" + +old_CC="$CC" +old_CFLAGS="$CFLAGS" + +# Set sane defaults for various variables +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$LD" && LD=ld +test -z "$ac_objext" && ac_objext=o + +_LT_CC_BASENAME([$compiler]) + +# Only perform the check for file, if the check method requires it +test -z "$MAGIC_CMD" && MAGIC_CMD=file +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + _LT_PATH_MAGIC + fi + ;; +esac + +# Use C for the default configuration in the libtool script +LT_SUPPORTED_TAG([CC]) +_LT_LANG_C_CONFIG +_LT_LANG_DEFAULT_CONFIG +_LT_CONFIG_COMMANDS +])# _LT_SETUP + + +# _LT_PREPARE_SED_QUOTE_VARS +# -------------------------- +# Define a few sed substitution that help us do robust quoting. +m4_defun([_LT_PREPARE_SED_QUOTE_VARS], +[# Backslashify metacharacters that are still active within +# double-quoted strings. +sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\([["`\\]]\)/\\\1/g' + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to delay expansion of an escaped single quote. +delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' +]) + +# _LT_PROG_LTMAIN +# --------------- +# Note that this code is called both from `configure', and `config.status' +# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, +# `config.status' has no value for ac_aux_dir unless we are using Automake, +# so we pass a copy along to make sure it has a sensible value anyway. +m4_defun([_LT_PROG_LTMAIN], +[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl +_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) +ltmain="$ac_aux_dir/ltmain.sh" +])# _LT_PROG_LTMAIN + + +## ------------------------------------- ## +## Accumulate code for creating libtool. ## +## ------------------------------------- ## + +# So that we can recreate a full libtool script including additional +# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS +# in macros and then make a single call at the end using the `libtool' +# label. + + +# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) +# ---------------------------------------- +# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. +m4_define([_LT_CONFIG_LIBTOOL_INIT], +[m4_ifval([$1], + [m4_append([_LT_OUTPUT_LIBTOOL_INIT], + [$1 +])])]) + +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_INIT]) + + +# _LT_CONFIG_LIBTOOL([COMMANDS]) +# ------------------------------ +# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. +m4_define([_LT_CONFIG_LIBTOOL], +[m4_ifval([$1], + [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], + [$1 +])])]) + +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) + + +# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) +# ----------------------------------------------------- +m4_defun([_LT_CONFIG_SAVE_COMMANDS], +[_LT_CONFIG_LIBTOOL([$1]) +_LT_CONFIG_LIBTOOL_INIT([$2]) +]) + + +# _LT_FORMAT_COMMENT([COMMENT]) +# ----------------------------- +# Add leading comment marks to the start of each line, and a trailing +# full-stop to the whole comment if one is not present already. +m4_define([_LT_FORMAT_COMMENT], +[m4_ifval([$1], [ +m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], + [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) +)]) + + + +## ------------------------ ## +## FIXME: Eliminate VARNAME ## +## ------------------------ ## + + +# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) +# ------------------------------------------------------------------- +# CONFIGNAME is the name given to the value in the libtool script. +# VARNAME is the (base) name used in the configure script. +# VALUE may be 0, 1 or 2 for a computed quote escaped value based on +# VARNAME. Any other value will be used directly. +m4_define([_LT_DECL], +[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], + [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], + [m4_ifval([$1], [$1], [$2])]) + lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) + m4_ifval([$4], + [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) + lt_dict_add_subkey([lt_decl_dict], [$2], + [tagged?], [m4_ifval([$5], [yes], [no])])]) +]) + + +# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) +# -------------------------------------------------------- +m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) + + +# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) +# ------------------------------------------------ +m4_define([lt_decl_tag_varnames], +[_lt_decl_filter([tagged?], [yes], $@)]) + + +# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) +# --------------------------------------------------------- +m4_define([_lt_decl_filter], +[m4_case([$#], + [0], [m4_fatal([$0: too few arguments: $#])], + [1], [m4_fatal([$0: too few arguments: $#: $1])], + [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], + [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], + [lt_dict_filter([lt_decl_dict], $@)])[]dnl +]) + + +# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) +# -------------------------------------------------- +m4_define([lt_decl_quote_varnames], +[_lt_decl_filter([value], [1], $@)]) + + +# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) +# --------------------------------------------------- +m4_define([lt_decl_dquote_varnames], +[_lt_decl_filter([value], [2], $@)]) + + +# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) +# --------------------------------------------------- +m4_define([lt_decl_varnames_tagged], +[m4_assert([$# <= 2])dnl +_$0(m4_quote(m4_default([$1], [[, ]])), + m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), + m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) +m4_define([_lt_decl_varnames_tagged], +[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) + + +# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) +# ------------------------------------------------ +m4_define([lt_decl_all_varnames], +[_$0(m4_quote(m4_default([$1], [[, ]])), + m4_if([$2], [], + m4_quote(lt_decl_varnames), + m4_quote(m4_shift($@))))[]dnl +]) +m4_define([_lt_decl_all_varnames], +[lt_join($@, lt_decl_varnames_tagged([$1], + lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl +]) + + +# _LT_CONFIG_STATUS_DECLARE([VARNAME]) +# ------------------------------------ +# Quote a variable value, and forward it to `config.status' so that its +# declaration there will have the same value as in `configure'. VARNAME +# must have a single quote delimited value for this to work. +m4_define([_LT_CONFIG_STATUS_DECLARE], +[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) + + +# _LT_CONFIG_STATUS_DECLARATIONS +# ------------------------------ +# We delimit libtool config variables with single quotes, so when +# we write them to config.status, we have to be sure to quote all +# embedded single quotes properly. In configure, this macro expands +# each variable declared with _LT_DECL (and _LT_TAGDECL) into: +# +# ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' +m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], +[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), + [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) + + +# _LT_LIBTOOL_TAGS +# ---------------- +# Output comment and list of tags supported by the script +m4_defun([_LT_LIBTOOL_TAGS], +[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl +available_tags="_LT_TAGS"dnl +]) + + +# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) +# ----------------------------------- +# Extract the dictionary values for VARNAME (optionally with TAG) and +# expand to a commented shell variable setting: +# +# # Some comment about what VAR is for. +# visible_name=$lt_internal_name +m4_define([_LT_LIBTOOL_DECLARE], +[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], + [description])))[]dnl +m4_pushdef([_libtool_name], + m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl +m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), + [0], [_libtool_name=[$]$1], + [1], [_libtool_name=$lt_[]$1], + [2], [_libtool_name=$lt_[]$1], + [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl +m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl +]) + + +# _LT_LIBTOOL_CONFIG_VARS +# ----------------------- +# Produce commented declarations of non-tagged libtool config variables +# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' +# script. Tagged libtool config variables (even for the LIBTOOL CONFIG +# section) are produced by _LT_LIBTOOL_TAG_VARS. +m4_defun([_LT_LIBTOOL_CONFIG_VARS], +[m4_foreach([_lt_var], + m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), + [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) + + +# _LT_LIBTOOL_TAG_VARS(TAG) +# ------------------------- +m4_define([_LT_LIBTOOL_TAG_VARS], +[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), + [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) + + +# _LT_TAGVAR(VARNAME, [TAGNAME]) +# ------------------------------ +m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) + + +# _LT_CONFIG_COMMANDS +# ------------------- +# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of +# variables for single and double quote escaping we saved from calls +# to _LT_DECL, we can put quote escaped variables declarations +# into `config.status', and then the shell code to quote escape them in +# for loops in `config.status'. Finally, any additional code accumulated +# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. +m4_defun([_LT_CONFIG_COMMANDS], +[AC_PROVIDE_IFELSE([LT_OUTPUT], + dnl If the libtool generation code has been placed in $CONFIG_LT, + dnl instead of duplicating it all over again into config.status, + dnl then we will have config.status run $CONFIG_LT later, so it + dnl needs to know what name is stored there: + [AC_CONFIG_COMMANDS([libtool], + [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], + dnl If the libtool generation code is destined for config.status, + dnl expand the accumulated commands and init code now: + [AC_CONFIG_COMMANDS([libtool], + [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) +])#_LT_CONFIG_COMMANDS + + +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], +[ + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +sed_quote_subst='$sed_quote_subst' +double_quote_subst='$double_quote_subst' +delay_variable_subst='$delay_variable_subst' +_LT_CONFIG_STATUS_DECLARATIONS +LTCC='$LTCC' +LTCFLAGS='$LTCFLAGS' +compiler='$compiler_DEFAULT' + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +\$[]1 +_LTECHO_EOF' +} + +# Quote evaled strings. +for var in lt_decl_all_varnames([[ \ +]], lt_decl_quote_varnames); do + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in + *[[\\\\\\\`\\"\\\$]]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +# Double-quote double-evaled strings. +for var in lt_decl_all_varnames([[ \ +]], lt_decl_dquote_varnames); do + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in + *[[\\\\\\\`\\"\\\$]]*) + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +_LT_OUTPUT_LIBTOOL_INIT +]) + +# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) +# ------------------------------------ +# Generate a child script FILE with all initialization necessary to +# reuse the environment learned by the parent script, and make the +# file executable. If COMMENT is supplied, it is inserted after the +# `#!' sequence but before initialization text begins. After this +# macro, additional text can be appended to FILE to form the body of +# the child script. The macro ends with non-zero status if the +# file could not be fully written (such as if the disk is full). +m4_ifdef([AS_INIT_GENERATED], +[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], +[m4_defun([_LT_GENERATED_FILE_INIT], +[m4_require([AS_PREPARE])]dnl +[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl +[lt_write_fail=0 +cat >$1 <<_ASEOF || lt_write_fail=1 +#! $SHELL +# Generated by $as_me. +$2 +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$1 <<\_ASEOF || lt_write_fail=1 +AS_SHELL_SANITIZE +_AS_PREPARE +exec AS_MESSAGE_FD>&1 +_ASEOF +test $lt_write_fail = 0 && chmod +x $1[]dnl +m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT + +# LT_OUTPUT +# --------- +# This macro allows early generation of the libtool script (before +# AC_OUTPUT is called), incase it is used in configure for compilation +# tests. +AC_DEFUN([LT_OUTPUT], +[: ${CONFIG_LT=./config.lt} +AC_MSG_NOTICE([creating $CONFIG_LT]) +_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], +[# Run this file to recreate a libtool stub with the current configuration.]) + +cat >>"$CONFIG_LT" <<\_LTEOF +lt_cl_silent=false +exec AS_MESSAGE_LOG_FD>>config.log +{ + echo + AS_BOX([Running $as_me.]) +} >&AS_MESSAGE_LOG_FD + +lt_cl_help="\ +\`$as_me' creates a local libtool stub from the current configuration, +for use in further configure time tests before the real libtool is +generated. + +Usage: $[0] [[OPTIONS]] + + -h, --help print this help, then exit + -V, --version print version number, then exit + -q, --quiet do not print progress messages + -d, --debug don't remove temporary files + +Report bugs to ." + +lt_cl_version="\ +m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl +m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) +configured by $[0], generated by m4_PACKAGE_STRING. + +Copyright (C) 2011 Free Software Foundation, Inc. +This config.lt script is free software; the Free Software Foundation +gives unlimited permision to copy, distribute and modify it." + +while test $[#] != 0 +do + case $[1] in + --version | --v* | -V ) + echo "$lt_cl_version"; exit 0 ;; + --help | --h* | -h ) + echo "$lt_cl_help"; exit 0 ;; + --debug | --d* | -d ) + debug=: ;; + --quiet | --q* | --silent | --s* | -q ) + lt_cl_silent=: ;; + + -*) AC_MSG_ERROR([unrecognized option: $[1] +Try \`$[0] --help' for more information.]) ;; + + *) AC_MSG_ERROR([unrecognized argument: $[1] +Try \`$[0] --help' for more information.]) ;; + esac + shift +done + +if $lt_cl_silent; then + exec AS_MESSAGE_FD>/dev/null +fi +_LTEOF + +cat >>"$CONFIG_LT" <<_LTEOF +_LT_OUTPUT_LIBTOOL_COMMANDS_INIT +_LTEOF + +cat >>"$CONFIG_LT" <<\_LTEOF +AC_MSG_NOTICE([creating $ofile]) +_LT_OUTPUT_LIBTOOL_COMMANDS +AS_EXIT(0) +_LTEOF +chmod +x "$CONFIG_LT" + +# configure is writing to config.log, but config.lt does its own redirection, +# appending to config.log, which fails on DOS, as config.log is still kept +# open by configure. Here we exec the FD to /dev/null, effectively closing +# config.log, so it can be properly (re)opened and appended to by config.lt. +lt_cl_success=: +test "$silent" = yes && + lt_config_lt_args="$lt_config_lt_args --quiet" +exec AS_MESSAGE_LOG_FD>/dev/null +$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false +exec AS_MESSAGE_LOG_FD>>config.log +$lt_cl_success || AS_EXIT(1) +])# LT_OUTPUT + + +# _LT_CONFIG(TAG) +# --------------- +# If TAG is the built-in tag, create an initial libtool script with a +# default configuration from the untagged config vars. Otherwise add code +# to config.status for appending the configuration named by TAG from the +# matching tagged config vars. +m4_defun([_LT_CONFIG], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +_LT_CONFIG_SAVE_COMMANDS([ + m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl + m4_if(_LT_TAG, [C], [ + # See if we are running on zsh, and set the options which allow our + # commands through without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + + cfgfile="${ofile}T" + trap "$RM \"$cfgfile\"; exit 1" 1 2 15 + $RM "$cfgfile" + + cat <<_LT_EOF >> "$cfgfile" +#! $SHELL + +# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +_LT_COPYING +_LT_LIBTOOL_TAGS + +# ### BEGIN LIBTOOL CONFIG +_LT_LIBTOOL_CONFIG_VARS +_LT_LIBTOOL_TAG_VARS +# ### END LIBTOOL CONFIG + +_LT_EOF + + case $host_os in + aix3*) + cat <<\_LT_EOF >> "$cfgfile" +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES +fi +_LT_EOF + ;; + esac + + _LT_PROG_LTMAIN + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '$q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + + _LT_PROG_REPLACE_SHELLFNS + + mv -f "$cfgfile" "$ofile" || + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" +], +[cat <<_LT_EOF >> "$ofile" + +dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded +dnl in a comment (ie after a #). +# ### BEGIN LIBTOOL TAG CONFIG: $1 +_LT_LIBTOOL_TAG_VARS(_LT_TAG) +# ### END LIBTOOL TAG CONFIG: $1 +_LT_EOF +])dnl /m4_if +], +[m4_if([$1], [], [ + PACKAGE='$PACKAGE' + VERSION='$VERSION' + TIMESTAMP='$TIMESTAMP' + RM='$RM' + ofile='$ofile'], []) +])dnl /_LT_CONFIG_SAVE_COMMANDS +])# _LT_CONFIG + + +# LT_SUPPORTED_TAG(TAG) +# --------------------- +# Trace this macro to discover what tags are supported by the libtool +# --tag option, using: +# autoconf --trace 'LT_SUPPORTED_TAG:$1' +AC_DEFUN([LT_SUPPORTED_TAG], []) + + +# C support is built-in for now +m4_define([_LT_LANG_C_enabled], []) +m4_define([_LT_TAGS], []) + + +# LT_LANG(LANG) +# ------------- +# Enable libtool support for the given language if not already enabled. +AC_DEFUN([LT_LANG], +[AC_BEFORE([$0], [LT_OUTPUT])dnl +m4_case([$1], + [C], [_LT_LANG(C)], + [C++], [_LT_LANG(CXX)], + [Go], [_LT_LANG(GO)], + [Java], [_LT_LANG(GCJ)], + [Fortran 77], [_LT_LANG(F77)], + [Fortran], [_LT_LANG(FC)], + [Windows Resource], [_LT_LANG(RC)], + [m4_ifdef([_LT_LANG_]$1[_CONFIG], + [_LT_LANG($1)], + [m4_fatal([$0: unsupported language: "$1"])])])dnl +])# LT_LANG + + +# _LT_LANG(LANGNAME) +# ------------------ +m4_defun([_LT_LANG], +[m4_ifdef([_LT_LANG_]$1[_enabled], [], + [LT_SUPPORTED_TAG([$1])dnl + m4_append([_LT_TAGS], [$1 ])dnl + m4_define([_LT_LANG_]$1[_enabled], [])dnl + _LT_LANG_$1_CONFIG($1)])dnl +])# _LT_LANG + + +m4_ifndef([AC_PROG_GO], [ +############################################################ +# NOTE: This macro has been submitted for inclusion into # +# GNU Autoconf as AC_PROG_GO. When it is available in # +# a released version of Autoconf we should remove this # +# macro and use it instead. # +############################################################ +m4_defun([AC_PROG_GO], +[AC_LANG_PUSH(Go)dnl +AC_ARG_VAR([GOC], [Go compiler command])dnl +AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl +_AC_ARG_VAR_LDFLAGS()dnl +AC_CHECK_TOOL(GOC, gccgo) +if test -z "$GOC"; then + if test -n "$ac_tool_prefix"; then + AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) + fi +fi +if test -z "$GOC"; then + AC_CHECK_PROG(GOC, gccgo, gccgo, false) +fi +])#m4_defun +])#m4_ifndef + + +# _LT_LANG_DEFAULT_CONFIG +# ----------------------- +m4_defun([_LT_LANG_DEFAULT_CONFIG], +[AC_PROVIDE_IFELSE([AC_PROG_CXX], + [LT_LANG(CXX)], + [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) + +AC_PROVIDE_IFELSE([AC_PROG_F77], + [LT_LANG(F77)], + [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) + +AC_PROVIDE_IFELSE([AC_PROG_FC], + [LT_LANG(FC)], + [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) + +dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal +dnl pulling things in needlessly. +AC_PROVIDE_IFELSE([AC_PROG_GCJ], + [LT_LANG(GCJ)], + [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], + [LT_LANG(GCJ)], + [AC_PROVIDE_IFELSE([LT_PROG_GCJ], + [LT_LANG(GCJ)], + [m4_ifdef([AC_PROG_GCJ], + [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) + m4_ifdef([A][M_PROG_GCJ], + [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) + m4_ifdef([LT_PROG_GCJ], + [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) + +AC_PROVIDE_IFELSE([AC_PROG_GO], + [LT_LANG(GO)], + [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) + +AC_PROVIDE_IFELSE([LT_PROG_RC], + [LT_LANG(RC)], + [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) +])# _LT_LANG_DEFAULT_CONFIG + +# Obsolete macros: +AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) +AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) +AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) +AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) +AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_CXX], []) +dnl AC_DEFUN([AC_LIBTOOL_F77], []) +dnl AC_DEFUN([AC_LIBTOOL_FC], []) +dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) +dnl AC_DEFUN([AC_LIBTOOL_RC], []) + + +# _LT_TAG_COMPILER +# ---------------- +m4_defun([_LT_TAG_COMPILER], +[AC_REQUIRE([AC_PROG_CC])dnl + +_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl +_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl +_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl +_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC +])# _LT_TAG_COMPILER + + +# _LT_COMPILER_BOILERPLATE +# ------------------------ +# Check for compiler boilerplate output or warnings with +# the simple compiler test code. +m4_defun([_LT_COMPILER_BOILERPLATE], +[m4_require([_LT_DECL_SED])dnl +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$RM conftest* +])# _LT_COMPILER_BOILERPLATE + + +# _LT_LINKER_BOILERPLATE +# ---------------------- +# Check for linker boilerplate output or warnings with +# the simple link test code. +m4_defun([_LT_LINKER_BOILERPLATE], +[m4_require([_LT_DECL_SED])dnl +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$RM -r conftest* +])# _LT_LINKER_BOILERPLATE + +# _LT_REQUIRED_DARWIN_CHECKS +# ------------------------- +m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ + case $host_os in + rhapsody* | darwin*) + AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) + AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) + AC_CHECK_TOOL([LIPO], [lipo], [:]) + AC_CHECK_TOOL([OTOOL], [otool], [:]) + AC_CHECK_TOOL([OTOOL64], [otool64], [:]) + _LT_DECL([], [DSYMUTIL], [1], + [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) + _LT_DECL([], [NMEDIT], [1], + [Tool to change global to local symbols on Mac OS X]) + _LT_DECL([], [LIPO], [1], + [Tool to manipulate fat objects and archives on Mac OS X]) + _LT_DECL([], [OTOOL], [1], + [ldd/readelf like tool for Mach-O binaries on Mac OS X]) + _LT_DECL([], [OTOOL64], [1], + [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) + + AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], + [lt_cv_apple_cc_single_mod=no + if test -z "${LT_MULTI_MODULE}"; then + # By default we will add the -single_module flag. You can override + # by either setting the environment variable LT_MULTI_MODULE + # non-empty at configure time, or by adding -multi_module to the + # link flags. + rm -rf libconftest.dylib* + echo "int foo(void){return 1;}" > conftest.c + echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ +-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD + $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ + -dynamiclib -Wl,-single_module conftest.c 2>conftest.err + _lt_result=$? + # If there is a non-empty error log, and "single_module" + # appears in it, assume the flag caused a linker warning + if test -s conftest.err && $GREP single_module conftest.err; then + cat conftest.err >&AS_MESSAGE_LOG_FD + # Otherwise, if the output was created with a 0 exit code from + # the compiler, it worked. + elif test -f libconftest.dylib && test $_lt_result -eq 0; then + lt_cv_apple_cc_single_mod=yes + else + cat conftest.err >&AS_MESSAGE_LOG_FD + fi + rm -rf libconftest.dylib* + rm -f conftest.* + fi]) + + AC_CACHE_CHECK([for -exported_symbols_list linker flag], + [lt_cv_ld_exported_symbols_list], + [lt_cv_ld_exported_symbols_list=no + save_LDFLAGS=$LDFLAGS + echo "_main" > conftest.sym + LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" + AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], + [lt_cv_ld_exported_symbols_list=yes], + [lt_cv_ld_exported_symbols_list=no]) + LDFLAGS="$save_LDFLAGS" + ]) + + AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], + [lt_cv_ld_force_load=no + cat > conftest.c << _LT_EOF +int forced_loaded() { return 2;} +_LT_EOF + echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD + $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD + echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD + $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD + echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD + $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD + cat > conftest.c << _LT_EOF +int main() { return 0;} +_LT_EOF + echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD + $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err + _lt_result=$? + if test -s conftest.err && $GREP force_load conftest.err; then + cat conftest.err >&AS_MESSAGE_LOG_FD + elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then + lt_cv_ld_force_load=yes + else + cat conftest.err >&AS_MESSAGE_LOG_FD + fi + rm -f conftest.err libconftest.a conftest conftest.c + rm -rf conftest.dSYM + ]) + case $host_os in + rhapsody* | darwin1.[[012]]) + _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; + darwin1.*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + darwin*) # darwin 5.x on + # if running on 10.5 or later, the deployment target defaults + # to the OS version, if on x86, and 10.4, the deployment + # target defaults to 10.4. Don't you love it? + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in + 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + 10.[[012]]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + 10.*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + esac + ;; + esac + if test "$lt_cv_apple_cc_single_mod" = "yes"; then + _lt_dar_single_mod='$single_module' + fi + if test "$lt_cv_ld_exported_symbols_list" = "yes"; then + _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' + else + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then + _lt_dsymutil='~$DSYMUTIL $lib || :' + else + _lt_dsymutil= + fi + ;; + esac +]) + + +# _LT_DARWIN_LINKER_FEATURES([TAG]) +# --------------------------------- +# Checks for linker and compiler features on darwin +m4_defun([_LT_DARWIN_LINKER_FEATURES], +[ + m4_require([_LT_REQUIRED_DARWIN_CHECKS]) + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_automatic, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + if test "$lt_cv_ld_force_load" = "yes"; then + _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], + [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) + else + _LT_TAGVAR(whole_archive_flag_spec, $1)='' + fi + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" + case $cc_basename in + ifort*) _lt_dar_can_shared=yes ;; + *) _lt_dar_can_shared=$GCC ;; + esac + if test "$_lt_dar_can_shared" = "yes"; then + output_verbose_link_cmd=func_echo_all + _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" + _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" + _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" + _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + m4_if([$1], [CXX], +[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then + _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" + _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" + fi +],[]) + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi +]) + +# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) +# ---------------------------------- +# Links a minimal program and checks the executable +# for the system default hardcoded library path. In most cases, +# this is /usr/lib:/lib, but when the MPI compilers are used +# the location of the communication and MPI libs are included too. +# If we don't find anything, use the default library path according +# to the aix ld manual. +# Store the results from the different compilers for each TAGNAME. +# Allow to override them for all tags through lt_cv_aix_libpath. +m4_defun([_LT_SYS_MODULE_PATH_AIX], +[m4_require([_LT_DECL_SED])dnl +if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], + [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ + lt_aix_libpath_sed='[ + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }]' + _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then + _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi],[]) + if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then + _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" + fi + ]) + aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) +fi +])# _LT_SYS_MODULE_PATH_AIX + + +# _LT_SHELL_INIT(ARG) +# ------------------- +m4_define([_LT_SHELL_INIT], +[m4_divert_text([M4SH-INIT], [$1 +])])# _LT_SHELL_INIT + + + +# _LT_PROG_ECHO_BACKSLASH +# ----------------------- +# Find how we can fake an echo command that does not interpret backslash. +# In particular, with Autoconf 2.60 or later we add some code to the start +# of the generated configure script which will find a shell with a builtin +# printf (which we can use as an echo command). +m4_defun([_LT_PROG_ECHO_BACKSLASH], +[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + +AC_MSG_CHECKING([how to print strings]) +# Test print first, because it will be a builtin if present. +if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ + test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='print -r --' +elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='printf %s\n' +else + # Use this function as a fallback that always works. + func_fallback_echo () + { + eval 'cat <<_LTECHO_EOF +$[]1 +_LTECHO_EOF' + } + ECHO='func_fallback_echo' +fi + +# func_echo_all arg... +# Invoke $ECHO with all args, space-separated. +func_echo_all () +{ + $ECHO "$*" +} + +case "$ECHO" in + printf*) AC_MSG_RESULT([printf]) ;; + print*) AC_MSG_RESULT([print -r]) ;; + *) AC_MSG_RESULT([cat]) ;; +esac + +m4_ifdef([_AS_DETECT_SUGGESTED], +[_AS_DETECT_SUGGESTED([ + test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( + ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' + ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO + ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + PATH=/empty FPATH=/empty; export PATH FPATH + test "X`printf %s $ECHO`" = "X$ECHO" \ + || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) + +_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) +_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) +])# _LT_PROG_ECHO_BACKSLASH + + +# _LT_WITH_SYSROOT +# ---------------- +AC_DEFUN([_LT_WITH_SYSROOT], +[AC_MSG_CHECKING([for sysroot]) +AC_ARG_WITH([sysroot], +[ --with-sysroot[=DIR] Search for dependent libraries within DIR + (or the compiler's sysroot if not specified).], +[], [with_sysroot=no]) + +dnl lt_sysroot will always be passed unquoted. We quote it here +dnl in case the user passed a directory name. +lt_sysroot= +case ${with_sysroot} in #( + yes) + if test "$GCC" = yes; then + lt_sysroot=`$CC --print-sysroot 2>/dev/null` + fi + ;; #( + /*) + lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` + ;; #( + no|'') + ;; #( + *) + AC_MSG_RESULT([${with_sysroot}]) + AC_MSG_ERROR([The sysroot must be an absolute path.]) + ;; +esac + + AC_MSG_RESULT([${lt_sysroot:-no}]) +_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl +[dependent libraries, and in which our libraries should be installed.])]) + +# _LT_ENABLE_LOCK +# --------------- +m4_defun([_LT_ENABLE_LOCK], +[AC_ARG_ENABLE([libtool-lock], + [AS_HELP_STRING([--disable-libtool-lock], + [avoid locking (might break parallel builds)])]) +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out which ABI we are using. + echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + if test "$lt_cv_prog_gnu_ld" = yes; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; + +x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ +s390*-*linux*|s390*-*tpf*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.o` in + *32-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_i386_fbsd" + ;; + x86_64-*linux*) + case `/usr/bin/file conftest.o` in + *x86-64*) + LD="${LD-ld} -m elf32_x86_64" + ;; + *) + LD="${LD-ld} -m elf_i386" + ;; + esac + ;; + powerpc64le-*) + LD="${LD-ld} -m elf32lppclinux" + ;; + powerpc64-*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_x86_64_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + powerpcle-*) + LD="${LD-ld} -m elf64lppc" + ;; + powerpc-*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*|s390*-*tpf*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" + AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, + [AC_LANG_PUSH(C) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) + AC_LANG_POP]) + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; +*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) + case $host in + i?86-*-solaris*) + LD="${LD-ld} -m elf_x86_64" + ;; + sparc*-*-solaris*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + # GNU ld 2.21 introduced _sol2 emulations. Use them if available. + if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then + LD="${LD-ld}_sol2" + fi + ;; + *) + if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then + LD="${LD-ld} -64" + fi + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; +esac + +need_locks="$enable_libtool_lock" +])# _LT_ENABLE_LOCK + + +# _LT_PROG_AR +# ----------- +m4_defun([_LT_PROG_AR], +[AC_CHECK_TOOLS(AR, [ar], false) +: ${AR=ar} +: ${AR_FLAGS=cru} +_LT_DECL([], [AR], [1], [The archiver]) +_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) + +AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], + [lt_cv_ar_at_file=no + AC_COMPILE_IFELSE([AC_LANG_PROGRAM], + [echo conftest.$ac_objext > conftest.lst + lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' + AC_TRY_EVAL([lt_ar_try]) + if test "$ac_status" -eq 0; then + # Ensure the archiver fails upon bogus file names. + rm -f conftest.$ac_objext libconftest.a + AC_TRY_EVAL([lt_ar_try]) + if test "$ac_status" -ne 0; then + lt_cv_ar_at_file=@ + fi + fi + rm -f conftest.* libconftest.a + ]) + ]) + +if test "x$lt_cv_ar_at_file" = xno; then + archiver_list_spec= +else + archiver_list_spec=$lt_cv_ar_at_file +fi +_LT_DECL([], [archiver_list_spec], [1], + [How to feed a file listing to the archiver]) +])# _LT_PROG_AR + + +# _LT_CMD_OLD_ARCHIVE +# ------------------- +m4_defun([_LT_CMD_OLD_ARCHIVE], +[_LT_PROG_AR + +AC_CHECK_TOOL(STRIP, strip, :) +test -z "$STRIP" && STRIP=: +_LT_DECL([], [STRIP], [1], [A symbol stripping program]) + +AC_CHECK_TOOL(RANLIB, ranlib, :) +test -z "$RANLIB" && RANLIB=: +_LT_DECL([], [RANLIB], [1], + [Commands used to install an old-style archive]) + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= + +if test -n "$RANLIB"; then + case $host_os in + openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" +fi + +case $host_os in + darwin*) + lock_old_archive_extraction=yes ;; + *) + lock_old_archive_extraction=no ;; +esac +_LT_DECL([], [old_postinstall_cmds], [2]) +_LT_DECL([], [old_postuninstall_cmds], [2]) +_LT_TAGDECL([], [old_archive_cmds], [2], + [Commands used to build an old-style archive]) +_LT_DECL([], [lock_old_archive_extraction], [0], + [Whether to use a lock for old archive extraction]) +])# _LT_CMD_OLD_ARCHIVE + + +# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) +# ---------------------------------------------------------------- +# Check whether the given compiler option works +AC_DEFUN([_LT_COMPILER_OPTION], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_SED])dnl +AC_CACHE_CHECK([$1], [$2], + [$2=no + m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$3" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + $2=yes + fi + fi + $RM conftest* +]) + +if test x"[$]$2" = xyes; then + m4_if([$5], , :, [$5]) +else + m4_if([$6], , :, [$6]) +fi +])# _LT_COMPILER_OPTION + +# Old name: +AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) + + +# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [ACTION-SUCCESS], [ACTION-FAILURE]) +# ---------------------------------------------------- +# Check whether the given linker option works +AC_DEFUN([_LT_LINKER_OPTION], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_SED])dnl +AC_CACHE_CHECK([$1], [$2], + [$2=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $3" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&AS_MESSAGE_LOG_FD + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + $2=yes + fi + else + $2=yes + fi + fi + $RM -r conftest* + LDFLAGS="$save_LDFLAGS" +]) + +if test x"[$]$2" = xyes; then + m4_if([$4], , :, [$4]) +else + m4_if([$5], , :, [$5]) +fi +])# _LT_LINKER_OPTION + +# Old name: +AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) + + +# LT_CMD_MAX_LEN +#--------------- +AC_DEFUN([LT_CMD_MAX_LEN], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +# find the maximum length of command line arguments +AC_MSG_CHECKING([the maximum length of command line arguments]) +AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl + i=0 + teststring="ABCD" + + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw* | cegcc*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + + mint*) + # On MiNT this can take a long time and run out of memory. + lt_cv_sys_max_cmd_len=8192; + ;; + + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; + + os2*) + # The test takes a long time on OS/2. + lt_cv_sys_max_cmd_len=8192 + ;; + + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) + lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` + if test -n "$lt_cv_sys_max_cmd_len" && \ + test undefined != "$lt_cv_sys_max_cmd_len"; then + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + else + # Make teststring a little bigger before we do anything with it. + # a 1K string should be a reasonable start. + for i in 1 2 3 4 5 6 7 8 ; do + teststring=$teststring$teststring + done + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + # If test is not a shell built-in, we'll probably end up computing a + # maximum length that is only half of the actual maximum length, but + # we can't tell. + while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ + = "X$teststring$teststring"; } >/dev/null 2>&1 && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + # Only check the string length outside the loop. + lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` + teststring= + # Add a significant safety factor because C++ compilers can tack on + # massive amounts of additional arguments before passing them to the + # linker. It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + fi + ;; + esac +]) +if test -n $lt_cv_sys_max_cmd_len ; then + AC_MSG_RESULT($lt_cv_sys_max_cmd_len) +else + AC_MSG_RESULT(none) +fi +max_cmd_len=$lt_cv_sys_max_cmd_len +_LT_DECL([], [max_cmd_len], [0], + [What is the maximum length of a command?]) +])# LT_CMD_MAX_LEN + +# Old name: +AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) + + +# _LT_HEADER_DLFCN +# ---------------- +m4_defun([_LT_HEADER_DLFCN], +[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl +])# _LT_HEADER_DLFCN + + +# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, +# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) +# ---------------------------------------------------------------- +m4_defun([_LT_TRY_DLOPEN_SELF], +[m4_require([_LT_HEADER_DLFCN])dnl +if test "$cross_compiling" = yes; then : + [$4] +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +[#line $LINENO "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +/* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ +#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +int fnord () __attribute__((visibility("default"))); +#endif + +int fnord () { return 42; } +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else + { + if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else puts (dlerror ()); + } + /* dlclose (self); */ + } + else + puts (dlerror ()); + + return status; +}] +_LT_EOF + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) $1 ;; + x$lt_dlneed_uscore) $2 ;; + x$lt_dlunknown|x*) $3 ;; + esac + else : + # compilation failed + $3 + fi +fi +rm -fr conftest* +])# _LT_TRY_DLOPEN_SELF + + +# LT_SYS_DLOPEN_SELF +# ------------------ +AC_DEFUN([LT_SYS_DLOPEN_SELF], +[m4_require([_LT_HEADER_DLFCN])dnl +if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32* | cegcc*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ]) + ;; + + *) + AC_CHECK_FUNC([shl_load], + [lt_cv_dlopen="shl_load"], + [AC_CHECK_LIB([dld], [shl_load], + [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], + [AC_CHECK_FUNC([dlopen], + [lt_cv_dlopen="dlopen"], + [AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], + [AC_CHECK_LIB([svld], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], + [AC_CHECK_LIB([dld], [dld_link], + [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) + ]) + ]) + ]) + ]) + ]) + ;; + esac + + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + else + enable_dlopen=no + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS="$LDFLAGS" + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" + + AC_CACHE_CHECK([whether a program can dlopen itself], + lt_cv_dlopen_self, [dnl + _LT_TRY_DLOPEN_SELF( + lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, + lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) + ]) + + if test "x$lt_cv_dlopen_self" = xyes; then + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" + AC_CACHE_CHECK([whether a statically linked program can dlopen itself], + lt_cv_dlopen_self_static, [dnl + _LT_TRY_DLOPEN_SELF( + lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, + lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) + ]) + fi + + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi +_LT_DECL([dlopen_support], [enable_dlopen], [0], + [Whether dlopen is supported]) +_LT_DECL([dlopen_self], [enable_dlopen_self], [0], + [Whether dlopen of programs is supported]) +_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], + [Whether dlopen of statically linked programs is supported]) +])# LT_SYS_DLOPEN_SELF + +# Old name: +AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) + + +# _LT_COMPILER_C_O([TAGNAME]) +# --------------------------- +# Check to see if options -c and -o are simultaneously supported by compiler. +# This macro does not hard code the compiler like AC_PROG_CC_C_O. +m4_defun([_LT_COMPILER_C_O], +[m4_require([_LT_DECL_SED])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_TAG_COMPILER])dnl +AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], + [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], + [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no + $RM -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes + fi + fi + chmod u+w . 2>&AS_MESSAGE_LOG_FD + $RM conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files + $RM out/* && rmdir out + cd .. + $RM -r conftest + $RM conftest* +]) +_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], + [Does compiler simultaneously support -c and -o options?]) +])# _LT_COMPILER_C_O + + +# _LT_COMPILER_FILE_LOCKS([TAGNAME]) +# ---------------------------------- +# Check to see if we can do hard links to lock some files if needed +m4_defun([_LT_COMPILER_FILE_LOCKS], +[m4_require([_LT_ENABLE_LOCK])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +_LT_COMPILER_C_O([$1]) + +hard_links="nottested" +if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + AC_MSG_CHECKING([if we can lock with hard links]) + hard_links=yes + $RM conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + AC_MSG_RESULT([$hard_links]) + if test "$hard_links" = no; then + AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) + need_locks=warn + fi +else + need_locks=no +fi +_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) +])# _LT_COMPILER_FILE_LOCKS + + +# _LT_CHECK_OBJDIR +# ---------------- +m4_defun([_LT_CHECK_OBJDIR], +[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], +[rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs +fi +rmdir .libs 2>/dev/null]) +objdir=$lt_cv_objdir +_LT_DECL([], [objdir], [0], + [The name of the directory that contains temporary libtool files])dnl +m4_pattern_allow([LT_OBJDIR])dnl +AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", + [Define to the sub-directory in which libtool stores uninstalled libraries.]) +])# _LT_CHECK_OBJDIR + + +# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) +# -------------------------------------- +# Check hardcoding attributes. +m4_defun([_LT_LINKER_HARDCODE_LIBPATH], +[AC_MSG_CHECKING([how to hardcode library paths into programs]) +_LT_TAGVAR(hardcode_action, $1)= +if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || + test -n "$_LT_TAGVAR(runpath_var, $1)" || + test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then + + # We can hardcode non-existent directories. + if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && + test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then + # Linking always hardcodes the temporary library directory. + _LT_TAGVAR(hardcode_action, $1)=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + _LT_TAGVAR(hardcode_action, $1)=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + _LT_TAGVAR(hardcode_action, $1)=unsupported +fi +AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) + +if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || + test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi +_LT_TAGDECL([], [hardcode_action], [0], + [How to hardcode a shared library path into an executable]) +])# _LT_LINKER_HARDCODE_LIBPATH + + +# _LT_CMD_STRIPLIB +# ---------------- +m4_defun([_LT_CMD_STRIPLIB], +[m4_require([_LT_DECL_EGREP]) +striplib= +old_striplib= +AC_MSG_CHECKING([whether stripping libraries is possible]) +if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + AC_MSG_RESULT([yes]) +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + old_striplib="$STRIP -S" + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + fi + ;; + *) + AC_MSG_RESULT([no]) + ;; + esac +fi +_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) +_LT_DECL([], [striplib], [1]) +])# _LT_CMD_STRIPLIB + + +# _LT_SYS_DYNAMIC_LINKER([TAG]) +# ----------------------------- +# PORTME Fill in your ld.so characteristics +m4_defun([_LT_SYS_DYNAMIC_LINKER], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_OBJDUMP])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_CHECK_SHELL_FEATURES])dnl +AC_MSG_CHECKING([dynamic linker characteristics]) +m4_if([$1], + [], [ +if test "$GCC" = yes; then + case $host_os in + darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; + *) lt_awk_arg="/^libraries:/" ;; + esac + case $host_os in + mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; + *) lt_sed_strip_eq="s,=/,/,g" ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` + case $lt_search_path_spec in + *\;*) + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` + ;; + *) + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` + ;; + esac + # Ok, now we have the path, separated by spaces, we can step through it + # and add multilib dir if necessary. + lt_tmp_lt_search_path_spec= + lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + for lt_sys_path in $lt_search_path_spec; do + if test -d "$lt_sys_path/$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" + else + test -d "$lt_sys_path" && \ + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" + fi + done + lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' +BEGIN {RS=" "; FS="/|\n";} { + lt_foo=""; + lt_count=0; + for (lt_i = NF; lt_i > 0; lt_i--) { + if ($lt_i != "" && $lt_i != ".") { + if ($lt_i == "..") { + lt_count++; + } else { + if (lt_count == 0) { + lt_foo="/" $lt_i lt_foo; + } else { + lt_count--; + } + } + } + } + if (lt_foo != "") { lt_freq[[lt_foo]]++; } + if (lt_freq[[lt_foo]] == 1) { print lt_foo; } +}'` + # AWK program above erroneously prepends '/' to C:/dos/paths + # for these hosts. + case $host_os in + mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ + $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; + esac + sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi]) +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix[[4-9]]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[[01]] | aix4.[[01]].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + case $host_cpu in + powerpc) + # Since July 2007 AmigaOS4 officially supports .so libraries. + # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + ;; + m68k) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + esac + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[[45]]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32* | cegcc*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$cc_basename in + yes,*) + # gcc + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' +m4_if([$1], [],[ + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) + ;; + mingw* | cegcc*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + ;; + esac + dynamic_linker='Win32 ld.exe' + ;; + + *,cl*) + # Native MSVC + libname_spec='$name' + soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + library_names_spec='${libname}.dll.lib' + + case $build_os in + mingw*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` + ;; + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + ;; + *) + sys_lib_search_path_spec="$LIB" + if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then + # It is most probably a Windows format PATH. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~1") + ;; + esac + + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + dynamic_linker='Win32 link.exe' + ;; + + *) + # Assume MSVC wrapper + library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' + dynamic_linker='Win32 ld.exe' + ;; + esac + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' +m4_if([$1], [],[ + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[[23]].*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2.*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[[01]]* | freebsdelf3.[[01]]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ + freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +haiku*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + dynamic_linker="$host_os runtime_loader" + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=yes + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555, ... + postinstall_cmds='chmod 555 $lib' + # or fails outright, so override atomically: + install_override_mode=555 + ;; + +interix[[3-9]]*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux # correct to gnu/linux during the next big refactor + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + + # Some binutils ld are patched to set DT_RUNPATH + AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], + [lt_cv_shlibpath_overrides_runpath=no + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ + LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" + AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], + [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], + [lt_cv_shlibpath_overrides_runpath=yes])]) + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + ]) + shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath + + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +*nto* | *qnx*) + version_type=qnx + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='ldqnx.so' + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[[89]] | openbsd2.[[89]].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +rdos*) + dynamic_linker=no + ;; + +solaris*) + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +tpf*) + # TPF is a cross-target only. Preferred cross-host = GNU/Linux. + version_type=linux # correct to gnu/linux during the next big refactor + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +uts4*) + version_type=linux # correct to gnu/linux during the next big refactor + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +AC_MSG_RESULT([$dynamic_linker]) +test "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then + sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +fi +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then + sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" +fi + +_LT_DECL([], [variables_saved_for_relink], [1], + [Variables whose values should be saved in libtool wrapper scripts and + restored at link time]) +_LT_DECL([], [need_lib_prefix], [0], + [Do we need the "lib" prefix for modules?]) +_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) +_LT_DECL([], [version_type], [0], [Library versioning type]) +_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) +_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) +_LT_DECL([], [shlibpath_overrides_runpath], [0], + [Is shlibpath searched before the hard-coded library search path?]) +_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) +_LT_DECL([], [library_names_spec], [1], + [[List of archive names. First name is the real one, the rest are links. + The last name is the one that the linker finds with -lNAME]]) +_LT_DECL([], [soname_spec], [1], + [[The coded name of the library, if different from the real name]]) +_LT_DECL([], [install_override_mode], [1], + [Permission mode override for installation of shared libraries]) +_LT_DECL([], [postinstall_cmds], [2], + [Command to use after installation of a shared archive]) +_LT_DECL([], [postuninstall_cmds], [2], + [Command to use after uninstallation of a shared archive]) +_LT_DECL([], [finish_cmds], [2], + [Commands used to finish a libtool library installation in a directory]) +_LT_DECL([], [finish_eval], [1], + [[As "finish_cmds", except a single script fragment to be evaled but + not shown]]) +_LT_DECL([], [hardcode_into_libs], [0], + [Whether we should hardcode library paths into libraries]) +_LT_DECL([], [sys_lib_search_path_spec], [2], + [Compile-time system search path for libraries]) +_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], + [Run-time system search path for libraries]) +])# _LT_SYS_DYNAMIC_LINKER + + +# _LT_PATH_TOOL_PREFIX(TOOL) +# -------------------------- +# find a file program which can recognize shared library +AC_DEFUN([_LT_PATH_TOOL_PREFIX], +[m4_require([_LT_DECL_EGREP])dnl +AC_MSG_CHECKING([for $1]) +AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, +[case $MAGIC_CMD in +[[\\/*] | ?:[\\/]*]) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR +dnl $ac_dummy forces splitting on constant user-supplied paths. +dnl POSIX.2 word splitting is done only on the output of word expansions, +dnl not every word. This closes a longstanding sh security hole. + ac_dummy="m4_if([$2], , $PATH, [$2])" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$1; then + lt_cv_path_MAGIC_CMD="$ac_dir/$1" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <<_LT_EOF 1>&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +_LT_EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac]) +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + AC_MSG_RESULT($MAGIC_CMD) +else + AC_MSG_RESULT(no) +fi +_LT_DECL([], [MAGIC_CMD], [0], + [Used to examine libraries when file_magic_cmd begins with "file"])dnl +])# _LT_PATH_TOOL_PREFIX + +# Old name: +AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) + + +# _LT_PATH_MAGIC +# -------------- +# find a file program which can recognize a shared library +m4_defun([_LT_PATH_MAGIC], +[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) + else + MAGIC_CMD=: + fi +fi +])# _LT_PATH_MAGIC + + +# LT_PATH_LD +# ---------- +# find the pathname to the GNU or non-GNU linker +AC_DEFUN([LT_PATH_LD], +[AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_PROG_ECHO_BACKSLASH])dnl + +AC_ARG_WITH([gnu-ld], + [AS_HELP_STRING([--with-gnu-ld], + [assume the C compiler uses GNU ld @<:@default=no@:>@])], + [test "$withval" = no || with_gnu_ld=yes], + [with_gnu_ld=no])dnl + +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + AC_MSG_CHECKING([for ld used by $CC]) + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [[\\/]]* | ?:[[\\/]]*) + re_direlt='/[[^/]][[^/]]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` + while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do + ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + AC_MSG_CHECKING([for GNU ld]) +else + AC_MSG_CHECKING([for non-GNU ld]) +fi +AC_CACHE_VAL(lt_cv_path_LD, +[if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else + # Keep this pattern in sync with the one in func_win32_libid. + lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; + +cegcc*) + # use the weaker test based on 'objdump'. See mingw*. + lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + ;; + +darwin* | rhapsody*) + lt_cv_deplibs_check_method=pass_all + ;; + +freebsd* | dragonfly*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +haiku*) + lt_cv_deplibs_check_method=pass_all + ;; + +hpux10.20* | hpux11*) + lt_cv_file_magic_cmd=/usr/bin/file + case $host_cpu in + ia64*) + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so + ;; + hppa*64*) + [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + ;; + *) + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; + +interix[[3-9]]*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' + ;; + +irix5* | irix6* | nonstopux*) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' + fi + ;; + +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; + +*nto* | *qnx*) + lt_cv_deplibs_check_method=pass_all + ;; + +openbsd*) + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' + fi + ;; + +osf3* | osf4* | osf5*) + lt_cv_deplibs_check_method=pass_all + ;; + +rdos*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv4 | sysv4.3*) + case $host_vendor in + motorola) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + sequent) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' + ;; + sni) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" + lt_cv_file_magic_test_file=/lib/libc.so + ;; + siemens) + lt_cv_deplibs_check_method=pass_all + ;; + pc) + lt_cv_deplibs_check_method=pass_all + ;; + esac + ;; + +tpf*) + lt_cv_deplibs_check_method=pass_all + ;; +esac +]) + +file_magic_glob= +want_nocaseglob=no +if test "$build" = "$host"; then + case $host_os in + mingw* | pw32*) + if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then + want_nocaseglob=yes + else + file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` + fi + ;; + esac +fi + +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown + +_LT_DECL([], [deplibs_check_method], [1], + [Method to check whether dependent libraries are shared objects]) +_LT_DECL([], [file_magic_cmd], [1], + [Command to use when deplibs_check_method = "file_magic"]) +_LT_DECL([], [file_magic_glob], [1], + [How to find potential files when deplibs_check_method = "file_magic"]) +_LT_DECL([], [want_nocaseglob], [1], + [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) +])# _LT_CHECK_MAGIC_METHOD + + +# LT_PATH_NM +# ---------- +# find the pathname to a BSD- or MS-compatible name lister +AC_DEFUN([LT_PATH_NM], +[AC_REQUIRE([AC_PROG_CC])dnl +AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, +[if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM="$NM" +else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/$lt_tmp_nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + : ${lt_cv_path_NM=no} +fi]) +if test "$lt_cv_path_NM" != "no"; then + NM="$lt_cv_path_NM" +else + # Didn't find any BSD compatible name lister, look for dumpbin. + if test -n "$DUMPBIN"; then : + # Let the user override the test. + else + AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) + case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in + *COFF*) + DUMPBIN="$DUMPBIN -symbols" + ;; + *) + DUMPBIN=: + ;; + esac + fi + AC_SUBST([DUMPBIN]) + if test "$DUMPBIN" != ":"; then + NM="$DUMPBIN" + fi +fi +test -z "$NM" && NM=nm +AC_SUBST([NM]) +_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl + +AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], + [lt_cv_nm_interface="BSD nm" + echo "int some_variable = 0;" > conftest.$ac_ext + (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$ac_compile" 2>conftest.err) + cat conftest.err >&AS_MESSAGE_LOG_FD + (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) + (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) + cat conftest.err >&AS_MESSAGE_LOG_FD + (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) + cat conftest.out >&AS_MESSAGE_LOG_FD + if $GREP 'External.*some_variable' conftest.out > /dev/null; then + lt_cv_nm_interface="MS dumpbin" + fi + rm -f conftest*]) +])# LT_PATH_NM + +# Old names: +AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) +AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_PROG_NM], []) +dnl AC_DEFUN([AC_PROG_NM], []) + +# _LT_CHECK_SHAREDLIB_FROM_LINKLIB +# -------------------------------- +# how to determine the name of the shared library +# associated with a specific link library. +# -- PORTME fill in with the dynamic library characteristics +m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], +[m4_require([_LT_DECL_EGREP]) +m4_require([_LT_DECL_OBJDUMP]) +m4_require([_LT_DECL_DLLTOOL]) +AC_CACHE_CHECK([how to associate runtime and link libraries], +lt_cv_sharedlib_from_linklib_cmd, +[lt_cv_sharedlib_from_linklib_cmd='unknown' + +case $host_os in +cygwin* | mingw* | pw32* | cegcc*) + # two different shell functions defined in ltmain.sh + # decide which to use based on capabilities of $DLLTOOL + case `$DLLTOOL --help 2>&1` in + *--identify-strict*) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib + ;; + *) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback + ;; + esac + ;; +*) + # fallback: assume linklib IS sharedlib + lt_cv_sharedlib_from_linklib_cmd="$ECHO" + ;; +esac +]) +sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd +test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO + +_LT_DECL([], [sharedlib_from_linklib_cmd], [1], + [Command to associate shared and link libraries]) +])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB + + +# _LT_PATH_MANIFEST_TOOL +# ---------------------- +# locate the manifest tool +m4_defun([_LT_PATH_MANIFEST_TOOL], +[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) +test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt +AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], + [lt_cv_path_mainfest_tool=no + echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD + $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out + cat conftest.err >&AS_MESSAGE_LOG_FD + if $GREP 'Manifest Tool' conftest.out > /dev/null; then + lt_cv_path_mainfest_tool=yes + fi + rm -f conftest*]) +if test "x$lt_cv_path_mainfest_tool" != xyes; then + MANIFEST_TOOL=: +fi +_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl +])# _LT_PATH_MANIFEST_TOOL + + +# LT_LIB_M +# -------- +# check for math library +AC_DEFUN([LT_LIB_M], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +LIBM= +case $host in +*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) + # These system don't have libm, or don't need it + ;; +*-ncr-sysv4.3*) + AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") + AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") + ;; +*) + AC_CHECK_LIB(m, cos, LIBM="-lm") + ;; +esac +AC_SUBST([LIBM]) +])# LT_LIB_M + +# Old name: +AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_CHECK_LIBM], []) + + +# _LT_COMPILER_NO_RTTI([TAGNAME]) +# ------------------------------- +m4_defun([_LT_COMPILER_NO_RTTI], +[m4_require([_LT_TAG_COMPILER])dnl + +_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= + +if test "$GCC" = yes; then + case $cc_basename in + nvcc*) + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; + *) + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; + esac + + _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], + lt_cv_prog_compiler_rtti_exceptions, + [-fno-rtti -fno-exceptions], [], + [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) +fi +_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], + [Compiler flag to turn off builtin functions]) +])# _LT_COMPILER_NO_RTTI + + +# _LT_CMD_GLOBAL_SYMBOLS +# ---------------------- +m4_defun([_LT_CMD_GLOBAL_SYMBOLS], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([LT_PATH_NM])dnl +AC_REQUIRE([LT_PATH_LD])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_TAG_COMPILER])dnl + +# Check for command to grab the raw symbol name followed by C symbol from nm. +AC_MSG_CHECKING([command to parse $NM output from $compiler object]) +AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], +[ +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] + +# Character class describing NM global symbol codes. +symcode='[[BCDEGRST]]' + +# Regexp to match symbols that can be accessed directly from C. +sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[[BCDT]]' + ;; +cygwin* | mingw* | pw32* | cegcc*) + symcode='[[ABCDGISTW]]' + ;; +hpux*) + if test "$host_cpu" = ia64; then + symcode='[[ABCDEGRST]]' + fi + ;; +irix* | nonstopux*) + symcode='[[BCDEGRST]]' + ;; +osf*) + symcode='[[BCDEGQRST]]' + ;; +solaris*) + symcode='[[BDRT]]' + ;; +sco3.2v5*) + symcode='[[DT]]' + ;; +sysv4.2uw2*) + symcode='[[DT]]' + ;; +sysv5* | sco5v6* | unixware* | OpenUNIX*) + symcode='[[ABDT]]' + ;; +sysv4) + symcode='[[DFNSTU]]' + ;; +esac + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[[ABCDGIRSTW]]' ;; +esac + +# Transform an extracted symbol line into a proper C declaration. +# Some systems (esp. on ia64) link data and code symbols differently, +# so use this general approach. +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + +# Transform an extracted symbol line into symbol name and symbol address +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" + +# Handle CRLF in mingw tool chain +opt_cr= +case $build_os in +mingw*) + opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp + ;; +esac + +# Try without a prefix underscore, then with it. +for ac_symprfx in "" "_"; do + + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" + + # Write the raw and C identifiers. + if test "$lt_cv_nm_interface" = "MS dumpbin"; then + # Fake it for dumpbin and say T for any non-static function + # and D for any global variable. + # Also find C++ and __fastcall symbols from MSVC++, + # which start with @ or ?. + lt_cv_sys_global_symbol_pipe="$AWK ['"\ +" {last_section=section; section=\$ 3};"\ +" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ +" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ +" \$ 0!~/External *\|/{next};"\ +" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ +" {if(hide[section]) next};"\ +" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ +" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ +" s[1]~/^[@?]/{print s[1], s[1]; next};"\ +" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ +" ' prfx=^$ac_symprfx]" + else + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + fi + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" + + # Check to see that the pipe works correctly. + pipe_works=no + + rm -f conftest* + cat > conftest.$ac_ext <<_LT_EOF +#ifdef __cplusplus +extern "C" { +#endif +char nm_test_var; +void nm_test_func(void); +void nm_test_func(void){} +#ifdef __cplusplus +} +#endif +int main(){nm_test_var='a';nm_test_func();return(0);} +_LT_EOF + + if AC_TRY_EVAL(ac_compile); then + # Now try to grab the symbols. + nlist=conftest.nm + if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi + + # Make sure that we snagged all the symbols we need. + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then + cat <<_LT_EOF > conftest.$ac_ext +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) +/* DATA imports from DLLs on WIN32 con't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ +# define LT@&t@_DLSYM_CONST +#elif defined(__osf__) +/* This system does not cope well with relocations in const data. */ +# define LT@&t@_DLSYM_CONST +#else +# define LT@&t@_DLSYM_CONST const +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +_LT_EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' + + cat <<_LT_EOF >> conftest.$ac_ext + +/* The mapping between symbol names and symbols. */ +LT@&t@_DLSYM_CONST struct { + const char *name; + void *address; +} +lt__PROGRAM__LTX_preloaded_symbols[[]] = +{ + { "@PROGRAM@", (void *) 0 }, +_LT_EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext + cat <<\_LT_EOF >> conftest.$ac_ext + {0, (void *) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt__PROGRAM__LTX_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif +_LT_EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_globsym_save_LIBS=$LIBS + lt_globsym_save_CFLAGS=$CFLAGS + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then + pipe_works=yes + fi + LIBS=$lt_globsym_save_LIBS + CFLAGS=$lt_globsym_save_CFLAGS + else + echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD + fi + else + echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD + fi + else + echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD + cat conftest.$ac_ext >&5 + fi + rm -rf conftest* conftst* + + # Do not use the global_symbol_pipe unless it works. + if test "$pipe_works" = yes; then + break + else + lt_cv_sys_global_symbol_pipe= + fi +done +]) +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + AC_MSG_RESULT(failed) +else + AC_MSG_RESULT(ok) +fi + +# Response file support. +if test "$lt_cv_nm_interface" = "MS dumpbin"; then + nm_file_list_spec='@' +elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then + nm_file_list_spec='@' +fi + +_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], + [Take the output of nm and produce a listing of raw symbols and C names]) +_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], + [Transform the output of nm in a proper C declaration]) +_LT_DECL([global_symbol_to_c_name_address], + [lt_cv_sys_global_symbol_to_c_name_address], [1], + [Transform the output of nm in a C name address pair]) +_LT_DECL([global_symbol_to_c_name_address_lib_prefix], + [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], + [Transform the output of nm in a C name address pair when lib prefix is needed]) +_LT_DECL([], [nm_file_list_spec], [1], + [Specify filename containing input files for $NM]) +]) # _LT_CMD_GLOBAL_SYMBOLS + + +# _LT_COMPILER_PIC([TAGNAME]) +# --------------------------- +m4_defun([_LT_COMPILER_PIC], +[m4_require([_LT_TAG_COMPILER])dnl +_LT_TAGVAR(lt_prog_compiler_wl, $1)= +_LT_TAGVAR(lt_prog_compiler_pic, $1)= +_LT_TAGVAR(lt_prog_compiler_static, $1)= + +m4_if([$1], [CXX], [ + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + mingw* | cygwin* | os2* | pw32* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + *djgpp*) + # DJGPP does not support shared libraries at all + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + _LT_TAGVAR(lt_prog_compiler_static, $1)= + ;; + interix[[3-9]]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + else + case $host_os in + aix[[4-9]]*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + chorus*) + case $cc_basename in + cxch68*) + # Green Hills C++ Compiler + # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" + ;; + esac + ;; + mingw* | cygwin* | os2* | pw32* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + dgux*) + case $cc_basename in + ec++*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + ghcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + freebsd* | dragonfly*) + # FreeBSD uses GNU C++ + ;; + hpux9* | hpux10* | hpux11*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + if test "$host_cpu" != ia64; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + fi + ;; + aCC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + ;; + *) + ;; + esac + ;; + interix*) + # This is c89, which is MS Visual C++ (no shared libs) + # Anyone wants to do a port? + ;; + irix5* | irix6* | nonstopux*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + # CC pic flag -KPIC is the default. + ;; + *) + ;; + esac + ;; + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + case $cc_basename in + KCC*) + # KAI C++ Compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + ecpc* ) + # old Intel C++ for x86_64 which still supported -KPIC. + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + icpc* ) + # Intel C++, used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + cxx*) + # Compaq C++ + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) + # IBM XL 8.0, 9.0 on PPC and BlueGene + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + esac + ;; + esac + ;; + lynxos*) + ;; + m88k*) + ;; + mvs*) + case $cc_basename in + cxx*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' + ;; + *) + ;; + esac + ;; + netbsd* | netbsdelf*-gnu) + ;; + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + ;; + RCC*) + # Rational C++ 2.4.1 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + cxx*) + # Digital/Compaq C++ + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + *) + ;; + esac + ;; + psos*) + ;; + solaris*) + case $cc_basename in + CC* | sunCC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + ;; + *) + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + lcc*) + # Lucid + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + case $cc_basename in + CC*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + *) + ;; + esac + ;; + vxworks*) + ;; + *) + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +], +[ + if test "$GCC" = yes; then + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + m68k) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + esac + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + _LT_TAGVAR(lt_prog_compiler_static, $1)= + ;; + + hpux*) + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag + # sets the default TLS model and affects inlining. + case $host_cpu in + hppa*64*) + # +Z the default + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + + interix[[3-9]]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + enable_shared=no + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + + case $cc_basename in + nvcc*) # Cuda Compiler Driver 2.2 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' + if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" + fi + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + + mingw* | cygwin* | pw32* | os2* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + + hpux9* | hpux10* | hpux11*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC (with -KPIC) is the default. + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + case $cc_basename in + # old Intel for x86_64 which still supported -KPIC. + ecc*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + # icc used to be incompatible with GCC. + # ICC 10 doesn't accept -KPIC any more. + icc* | ifort*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + # Lahey Fortran 8.1. + lf95*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' + _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' + ;; + nagfor*) + # NAG Fortran compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + ccc*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All Alpha code is PIC. + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + xl* | bgxl* | bgf* | mpixl*) + # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='' + ;; + *Sun\ F* | *Sun*Fortran*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + *Sun\ C*) + # Sun C 5.9 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + ;; + *Intel*\ [[CF]]*Compiler*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + *Portland\ Group*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + esac + ;; + esac + ;; + + newsos6) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + *nto* | *qnx*) + # QNX uses GNU C++, but need to define -shared option too, otherwise + # it will coredump. + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' + ;; + + osf3* | osf4* | osf5*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All OSF/1 code is PIC. + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + rdos*) + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + solaris*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + case $cc_basename in + f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; + *) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; + esac + ;; + + sunos4*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + unicos*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + + uts4*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + *) + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +]) +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + *) + _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" + ;; +esac + +AC_CACHE_CHECK([for $compiler option to produce PIC], + [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], + [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) +_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then + _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], + [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], + [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], + [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in + "" | " "*) ;; + *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; + esac], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) +fi +_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], + [Additional compiler flags for building library objects]) + +_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], + [How to pass a linker flag through the compiler]) +# +# Check to make sure the static flag actually works. +# +wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" +_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], + _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), + $lt_tmp_static_flag, + [], + [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) +_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], + [Compiler flag to prevent dynamic linking]) +])# _LT_COMPILER_PIC + + +# _LT_LINKER_SHLIBS([TAGNAME]) +# ---------------------------- +# See if the linker supports building shared libraries. +m4_defun([_LT_LINKER_SHLIBS], +[AC_REQUIRE([LT_PATH_LD])dnl +AC_REQUIRE([LT_PATH_NM])dnl +m4_require([_LT_PATH_MANIFEST_TOOL])dnl +m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_DECL_SED])dnl +m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl +m4_require([_LT_TAG_COMPILER])dnl +AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) +m4_if([$1], [CXX], [ + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] + case $host_os in + aix[[4-9]]*) + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + # Also, AIX nm treats weak defined symbols like other global defined + # symbols, whereas GNU nm marks them as "W". + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + ;; + pw32*) + _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" + ;; + cygwin* | mingw* | cegcc*) + case $cc_basename in + cl*) + _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' + ;; + *) + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] + ;; + esac + ;; + linux* | k*bsd*-gnu | gnu*) + _LT_TAGVAR(link_all_deplibs, $1)=no + ;; + *) + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; + esac +], [ + runpath_var= + _LT_TAGVAR(allow_undefined_flag, $1)= + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(archive_cmds, $1)= + _LT_TAGVAR(archive_expsym_cmds, $1)= + _LT_TAGVAR(compiler_needs_object, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + _LT_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(hardcode_automatic, $1)=no + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_TAGVAR(hardcode_libdir_separator, $1)= + _LT_TAGVAR(hardcode_minus_L, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_TAGVAR(inherit_rpath, $1)=no + _LT_TAGVAR(link_all_deplibs, $1)=unknown + _LT_TAGVAR(module_cmds, $1)= + _LT_TAGVAR(module_expsym_cmds, $1)= + _LT_TAGVAR(old_archive_from_new_cmds, $1)= + _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= + _LT_TAGVAR(thread_safe_flag_spec, $1)= + _LT_TAGVAR(whole_archive_flag_spec, $1)= + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + _LT_TAGVAR(include_expsyms, $1)= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + # Exclude shared library initialization/finalization symbols. +dnl Note also adjust exclude_expsyms for C++ above. + extract_expsyms_cmds= + + case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + linux* | k*bsd*-gnu | gnu*) + _LT_TAGVAR(link_all_deplibs, $1)=no + ;; + esac + + _LT_TAGVAR(ld_shlibs, $1)=yes + + # On some targets, GNU ld is compatible enough with the native linker + # that we're better off using the native interface for both. + lt_use_gnu_ld_interface=no + if test "$with_gnu_ld" = yes; then + case $host_os in + aix*) + # The AIX port of GNU ld has always aspired to compatibility + # with the native linker. However, as the warning in the GNU ld + # block says, versions before 2.19.5* couldn't really create working + # shared libraries, regardless of the interface used. + case `$LD -v 2>&1` in + *\ \(GNU\ Binutils\)\ 2.19.5*) ;; + *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; + *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + fi + + if test "$lt_use_gnu_ld_interface" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + supports_anon_versioning=no + case `$LD -v 2>&1` in + *GNU\ gold*) supports_anon_versioning=yes ;; + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix[[3-9]]*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: the GNU linker, at least up to release 2.19, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to install binutils +*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. +*** You will then need to restart the configuration process. + +_LT_EOF + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='' + ;; + m68k) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + haiku*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + + interix[[3-9]]*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) + tmp_diet=no + if test "$host_os" = linux-dietlibc; then + case $cc_basename in + diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) + esac + fi + if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ + && test "$tmp_diet" = no + then + tmp_addflag=' $pic_flag' + tmp_sharedflag='-shared' + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group f77 and f90 compilers + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + lf95*) # Lahey Fortran 8.1 + _LT_TAGVAR(whole_archive_flag_spec, $1)= + tmp_sharedflag='--shared' ;; + xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) + tmp_sharedflag='-qmkshrobj' + tmp_addflag= ;; + nvcc*) # Cuda Compiler Driver 2.2 + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(compiler_needs_object, $1)=yes + ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(compiler_needs_object, $1)=yes + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + esac + _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test "x$supports_anon_versioning" = xyes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + + case $cc_basename in + xlf* | bgf* | bgxlf* | mpixlf*) + # IBM XL Fortran 10.1 on PPC cannot create shared libs itself + _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + fi + ;; + esac + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) + _LT_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # DT_RUNPATH tag from executables and libraries. But doing so + # requires that you compile everything twice, which is a pain. + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + sunos4*) + _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + + if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then + runpath_var= + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=yes + _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + _LT_TAGVAR(hardcode_direct, $1)=unsupported + fi + ;; + + aix[[4-9]]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + # Also, AIX nm treats weak defined symbols like other global + # defined symbols, whereas GNU nm marks them as "W". + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + _LT_TAGVAR(archive_cmds, $1)='' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' + + if test "$GCC" = yes; then + case $host_os in aix4.[[012]]|aix4.[[012]].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + _LT_TAGVAR(hardcode_direct, $1)=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + _LT_TAGVAR(link_all_deplibs, $1)=no + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + _LT_TAGVAR(always_export_symbols, $1)=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an + # empty executable. + _LT_SYS_MODULE_PATH_AIX([$1]) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + _LT_SYS_MODULE_PATH_AIX([$1]) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + if test "$with_gnu_ld" = yes; then + # We only use this code for GNU lds that support --whole-archive. + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds its shared libraries. + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + case $host_cpu in + powerpc) + # see comment about AmigaOS4 .so support + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='' + ;; + m68k) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + ;; + + bsdi[[45]]*) + _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic + ;; + + cygwin* | mingw* | pw32* | cegcc*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + case $cc_basename in + cl*) + # Native MSVC + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' + # Don't use ranlib + _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' + _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # Assume MSVC wrapper + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' + # FIXME: Should let the user specify the lib program. + _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + ;; + esac + ;; + + darwin* | rhapsody*) + _LT_DARWIN_LINKER_FEATURES($1) + ;; + + dgux*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2.*) + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + hpux9*) + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_direct, $1)=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes && test "$with_gnu_ld" = no; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes && test "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + m4_if($1, [], [ + # Older versions of the 11.00 compiler do not understand -b yet + # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) + _LT_LINKER_OPTION([if $CC understands -b], + _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], + [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], + [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], + [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) + ;; + esac + fi + if test "$with_gnu_ld" = no; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + # Try to use the -exported_symbol ld option, if it does not + # work, assume that -exports_file does not work either and + # implicitly export all symbols. + # This should be the same for all languages, so no per-tag cache variable. + AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], + [lt_cv_irix_exported_symbol], + [save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + AC_LINK_IFELSE( + [AC_LANG_SOURCE( + [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], + [C++], [[int foo (void) { return 0; }]], + [Fortran 77], [[ + subroutine foo + end]], + [Fortran], [[ + subroutine foo + end]])])], + [lt_cv_irix_exported_symbol=yes], + [lt_cv_irix_exported_symbol=no]) + LDFLAGS="$save_LDFLAGS"]) + if test "$lt_cv_irix_exported_symbol" = yes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + fi + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(inherit_rpath, $1)=yes + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + + netbsd* | netbsdelf*-gnu) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + newsos6) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *nto* | *qnx*) + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + else + case $host_os in + openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + ;; + esac + fi + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + os2*) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + else + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ + $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' + + # Both c and cxx compiler support -rpath directly + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + solaris*) + _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' + if test "$GCC" = yes; then + wlarc='${wl}' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + else + case `$CC -V 2>&1` in + *"Compilers 5.0"*) + wlarc='' + _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' + ;; + *) + wlarc='${wl}' + _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + ;; + esac + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. GCC discards it without `$wl', + # but is careful enough not to reorder. + # Supported since Solaris 2.6 (maybe 2.5.1?) + if test "$GCC" = yes; then + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' + fi + ;; + esac + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4) + case $host_vendor in + sni) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' + _LT_TAGVAR(hardcode_direct, $1)=no + ;; + motorola) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4.3*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + _LT_TAGVAR(ld_shlibs, $1)=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + + if test x$host_vendor = xsni; then + case $host in + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' + ;; + esac + fi + fi +]) +AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) +test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + +_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld + +_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl +_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl +_LT_DECL([], [extract_expsyms_cmds], [2], + [The commands to extract the exported symbol list from a shared archive]) + +# +# Do we need to explicitly link libc? +# +case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in +x|xyes) + # Assume -lc should be added + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $_LT_TAGVAR(archive_cmds, $1) in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + AC_CACHE_CHECK([whether -lc should be explicitly linked in], + [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), + [$RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if AC_TRY_EVAL(ac_compile) 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) + pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) + _LT_TAGVAR(allow_undefined_flag, $1)= + if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) + then + lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no + else + lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes + fi + _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + ]) + _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) + ;; + esac + fi + ;; +esac + +_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], + [Whether or not to add -lc for building shared libraries]) +_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], + [enable_shared_with_static_runtimes], [0], + [Whether or not to disallow shared libs when runtime libs are static]) +_LT_TAGDECL([], [export_dynamic_flag_spec], [1], + [Compiler flag to allow reflexive dlopens]) +_LT_TAGDECL([], [whole_archive_flag_spec], [1], + [Compiler flag to generate shared objects directly from archives]) +_LT_TAGDECL([], [compiler_needs_object], [1], + [Whether the compiler copes with passing no objects directly]) +_LT_TAGDECL([], [old_archive_from_new_cmds], [2], + [Create an old-style archive from a shared archive]) +_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], + [Create a temporary old-style archive to link instead of a shared archive]) +_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) +_LT_TAGDECL([], [archive_expsym_cmds], [2]) +_LT_TAGDECL([], [module_cmds], [2], + [Commands used to build a loadable module if different from building + a shared archive.]) +_LT_TAGDECL([], [module_expsym_cmds], [2]) +_LT_TAGDECL([], [with_gnu_ld], [1], + [Whether we are building with GNU ld or not]) +_LT_TAGDECL([], [allow_undefined_flag], [1], + [Flag that allows shared libraries with undefined symbols to be built]) +_LT_TAGDECL([], [no_undefined_flag], [1], + [Flag that enforces no undefined symbols]) +_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], + [Flag to hardcode $libdir into a binary during linking. + This must work even if $libdir does not exist]) +_LT_TAGDECL([], [hardcode_libdir_separator], [1], + [Whether we need a single "-rpath" flag with a separated argument]) +_LT_TAGDECL([], [hardcode_direct], [0], + [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes + DIR into the resulting binary]) +_LT_TAGDECL([], [hardcode_direct_absolute], [0], + [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes + DIR into the resulting binary and the resulting library dependency is + "absolute", i.e impossible to change by setting ${shlibpath_var} if the + library is relocated]) +_LT_TAGDECL([], [hardcode_minus_L], [0], + [Set to "yes" if using the -LDIR flag during linking hardcodes DIR + into the resulting binary]) +_LT_TAGDECL([], [hardcode_shlibpath_var], [0], + [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR + into the resulting binary]) +_LT_TAGDECL([], [hardcode_automatic], [0], + [Set to "yes" if building a shared library automatically hardcodes DIR + into the library and all subsequent libraries and executables linked + against it]) +_LT_TAGDECL([], [inherit_rpath], [0], + [Set to yes if linker adds runtime paths of dependent libraries + to runtime path list]) +_LT_TAGDECL([], [link_all_deplibs], [0], + [Whether libtool must link a program against all its dependency libraries]) +_LT_TAGDECL([], [always_export_symbols], [0], + [Set to "yes" if exported symbols are required]) +_LT_TAGDECL([], [export_symbols_cmds], [2], + [The commands to list exported symbols]) +_LT_TAGDECL([], [exclude_expsyms], [1], + [Symbols that should not be listed in the preloaded symbols]) +_LT_TAGDECL([], [include_expsyms], [1], + [Symbols that must always be exported]) +_LT_TAGDECL([], [prelink_cmds], [2], + [Commands necessary for linking programs (against libraries) with templates]) +_LT_TAGDECL([], [postlink_cmds], [2], + [Commands necessary for finishing linking programs]) +_LT_TAGDECL([], [file_list_spec], [1], + [Specify filename containing input files]) +dnl FIXME: Not yet implemented +dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], +dnl [Compiler flag to generate thread safe objects]) +])# _LT_LINKER_SHLIBS + + +# _LT_LANG_C_CONFIG([TAG]) +# ------------------------ +# Ensure that the configuration variables for a C compiler are suitably +# defined. These variables are subsequently used by _LT_CONFIG to write +# the compiler configuration to `libtool'. +m4_defun([_LT_LANG_C_CONFIG], +[m4_require([_LT_DECL_EGREP])dnl +lt_save_CC="$CC" +AC_LANG_PUSH(C) + +# Source file extension for C test sources. +ac_ext=c + +# Object file extension for compiled C test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(){return(0);}' + +_LT_TAG_COMPILER +# Save the default compiler, since it gets overwritten when the other +# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. +compiler_DEFAULT=$CC + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... +if test -n "$compiler"; then + _LT_COMPILER_NO_RTTI($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + LT_SYS_DLOPEN_SELF + _LT_CMD_STRIPLIB + + # Report which library types will actually be built + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + + aix[[4-9]]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_CONFIG($1) +fi +AC_LANG_POP +CC="$lt_save_CC" +])# _LT_LANG_C_CONFIG + + +# _LT_LANG_CXX_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for a C++ compiler are suitably +# defined. These variables are subsequently used by _LT_CONFIG to write +# the compiler configuration to `libtool'. +m4_defun([_LT_LANG_CXX_CONFIG], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_PATH_MANIFEST_TOOL])dnl +if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + AC_PROG_CXXCPP +else + _lt_caught_CXX_error=yes +fi + +AC_LANG_PUSH(C++) +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_LT_TAGVAR(compiler_needs_object, $1)=no +_LT_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_TAGVAR(hardcode_direct, $1)=no +_LT_TAGVAR(hardcode_direct_absolute, $1)=no +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_TAGVAR(hardcode_libdir_separator, $1)= +_LT_TAGVAR(hardcode_minus_L, $1)=no +_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_LT_TAGVAR(module_cmds, $1)= +_LT_TAGVAR(module_expsym_cmds, $1)= +_LT_TAGVAR(link_all_deplibs, $1)=unknown +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds +_LT_TAGVAR(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for C++ test sources. +ac_ext=cpp + +# Object file extension for compiled C++ test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the CXX compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_caught_CXX_error" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="int some_variable = 0;" + + # Code to be used in simple link tests + lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + _LT_TAG_COMPILER + + # save warnings/boilerplate of simple test code + _LT_COMPILER_BOILERPLATE + _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. + lt_save_CC=$CC + lt_save_CFLAGS=$CFLAGS + lt_save_LD=$LD + lt_save_GCC=$GCC + GCC=$GXX + lt_save_with_gnu_ld=$with_gnu_ld + lt_save_path_LD=$lt_cv_path_LD + if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then + lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx + else + $as_unset lt_cv_prog_gnu_ld + fi + if test -n "${lt_cv_path_LDCXX+set}"; then + lt_cv_path_LD=$lt_cv_path_LDCXX + else + $as_unset lt_cv_path_LD + fi + test -z "${LDCXX+set}" || LD=$LDCXX + CC=${CXX-"c++"} + CFLAGS=$CXXFLAGS + compiler=$CC + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + + if test -n "$compiler"; then + # We don't want -fno-exception when compiling C++ code, so set the + # no_builtin_flag separately + if test "$GXX" = yes; then + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' + else + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= + fi + + if test "$GXX" = yes; then + # Set up default GNU C++ configuration + + LT_PATH_LD + + # Check if GNU C++ uses GNU ld as the underlying linker, since the + # archiving commands below assume that GNU ld is being used. + if test "$with_gnu_ld" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + + # If archive_cmds runs LD, not CC, wlarc should be empty + # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to + # investigate it a little bit more. (MM) + wlarc='${wl}' + + # ancient GNU ld didn't support --whole-archive et. al. + if eval "`$CC -print-prog-name=ld` --help 2>&1" | + $GREP 'no-whole-archive' > /dev/null; then + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)= + fi + else + with_gnu_ld=no + wlarc= + + # A generic and very simple default shared library creation + # command for GNU C++ for the case where it uses the native + # linker, instead of GNU ld. If possible, this setting should + # overridden to take advantage of the native linker features on + # the platform it is being used on. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + fi + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + + else + GXX=no + with_gnu_ld=no + wlarc= + fi + + # PORTME: fill in a description of your system's C++ link characteristics + AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) + _LT_TAGVAR(ld_shlibs, $1)=yes + case $host_os in + aix3*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aix[[4-9]]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) + for ld_flag in $LDFLAGS; do + case $ld_flag in + *-brtl*) + aix_use_runtimelinking=yes + break + ;; + esac + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + _LT_TAGVAR(archive_cmds, $1)='' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' + + if test "$GXX" = yes; then + case $host_os in aix4.[[012]]|aix4.[[012]].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && + strings "$collect2name" | $GREP resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + _LT_TAGVAR(hardcode_direct, $1)=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + _LT_TAGVAR(hardcode_minus_L, $1)=yes + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)= + fi + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to + # export. + _LT_TAGVAR(always_export_symbols, $1)=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an empty + # executable. + _LT_SYS_MODULE_PATH_AIX([$1]) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an + # empty executable. + _LT_SYS_MODULE_PATH_AIX([$1]) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + if test "$with_gnu_ld" = yes; then + # We only use this code for GNU lds that support --whole-archive. + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + fi + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds its shared + # libraries. + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + beos*) + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + chorus*) + case $cc_basename in + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + cygwin* | mingw* | pw32* | cegcc*) + case $GXX,$cc_basename in + ,cl* | no,cl*) + # Native MSVC + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + # Don't use ranlib + _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' + _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + func_to_tool_file "$lt_outputfile"~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # g++ + # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + darwin* | rhapsody*) + _LT_DARWIN_LINKER_FEATURES($1) + ;; + + dgux*) + case $cc_basename in + ec++*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + ghcx*) + # Green Hills C++ Compiler + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + freebsd2.*) + # C++ shared libraries reported to be fairly broken before + # switch to ELF + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + freebsd-elf*) + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + ;; + + freebsd* | dragonfly*) + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF + # conventions + _LT_TAGVAR(ld_shlibs, $1)=yes + ;; + + haiku*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + + hpux9*) + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + ;; + *) + if test "$GXX" = yes; then + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + hpux10*|hpux11*) + if test $with_gnu_ld = no; then + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) + ;; + *) + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + esac + fi + case $host_cpu in + hppa*64*|ia64*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + ;; + esac + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + ;; + *) + if test "$GXX" = yes; then + if test $with_gnu_ld = no; then + case $host_cpu in + hppa*64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + fi + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + interix[[3-9]]*) + _LT_TAGVAR(hardcode_direct, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + irix5* | irix6*) + case $cc_basename in + CC*) + # SGI C++ + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + + # Archives containing C++ object files must be created using + # "CC -ar", where "CC" is the IRIX C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' + ;; + *) + if test "$GXX" = yes; then + if test "$with_gnu_ld" = no; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' + fi + fi + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + esac + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_TAGVAR(inherit_rpath, $1)=yes + ;; + + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' + ;; + icpc* | ecpc* ) + # Intel C++ + with_gnu_ld=yes + # version 8.0 and above of icpc choke on multiply defined symbols + # if we add $predep_objects and $postdep_objects, however 7.1 and + # earlier do not add the objects themselves. + case `$CC -V 2>&1` in + *"Version 7."*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + *) # Version 8.0 or newer + tmp_idyn= + case $host_cpu in + ia64*) tmp_idyn=' -i_dynamic';; + esac + _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + esac + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + case `$CC -V` in + *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) + _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ + compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' + _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ + $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ + $RANLIB $oldlib' + _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + ;; + *) # Version 6 and above use weak symbols + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + ;; + esac + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + ;; + cxx*) + # Compaq C++ + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' + + runpath_var=LD_RUN_PATH + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' + ;; + xl* | mpixl* | bgxl*) + # IBM XL 8.0 on PPC, with GNU ld + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(compiler_needs_object, $1)=yes + + # Not sure whether something based on + # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 + # would be better. + output_verbose_link_cmd='func_echo_all' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + esac + ;; + esac + ;; + + lynxos*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + m88k*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + mvs*) + case $cc_basename in + cxx*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' + wlarc= + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + fi + # Workaround some broken pre-1.5 toolchains + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' + ;; + + *nto* | *qnx*) + _LT_TAGVAR(ld_shlibs, $1)=yes + ;; + + openbsd2*) + # C++ shared libraries are fairly broken + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + _LT_TAGVAR(hardcode_direct, $1)=yes + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + fi + output_verbose_link_cmd=func_echo_all + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Archives containing C++ object files must be created using + # the KAI C++ compiler. + case $host in + osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; + *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; + esac + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + cxx*) + case $host in + osf3*) + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + ;; + *) + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ + echo "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ + $RM $lib.exp' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + ;; + esac + + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + case $host in + osf3*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + ;; + esac + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + + else + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + psos*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + lcc*) + # Lucid + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + solaris*) + case $cc_basename in + CC* | sunCC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_TAGVAR(archive_cmds_need_lc,$1)=yes + _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. + # Supported since Solaris 2.6 (maybe 2.5.1?) + _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' + ;; + esac + _LT_TAGVAR(link_all_deplibs, $1)=yes + + output_verbose_link_cmd='func_echo_all' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + + # The C++ compiler must be used to create the archive. + _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' + ;; + *) + # GNU C++ compiler with Solaris linker + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' + if $CC --version | $GREP -v '^2\.7' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + else + # g++ 2.7 appears to require `-G' NOT `-shared' on this + # platform. + _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ + $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + fi + + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + ;; + esac + fi + ;; + esac + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_TAGVAR(link_all_deplibs, $1)=yes + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ + '"$_LT_TAGVAR(old_archive_cmds, $1)" + _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ + '"$_LT_TAGVAR(reload_cmds, $1)" + ;; + *) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + vxworks*) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + + *) + # FIXME: insert proper C++ library support + _LT_TAGVAR(ld_shlibs, $1)=no + ;; + esac + + AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) + test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + + _LT_TAGVAR(GCC, $1)="$GXX" + _LT_TAGVAR(LD, $1)="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_SYS_HIDDEN_LIBDEPS($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + CC=$lt_save_CC + CFLAGS=$lt_save_CFLAGS + LDCXX=$LD + LD=$lt_save_LD + GCC=$lt_save_GCC + with_gnu_ld=$lt_save_with_gnu_ld + lt_cv_path_LDCXX=$lt_cv_path_LD + lt_cv_path_LD=$lt_save_path_LD + lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld + lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld +fi # test "$_lt_caught_CXX_error" != yes + +AC_LANG_POP +])# _LT_LANG_CXX_CONFIG + + +# _LT_FUNC_STRIPNAME_CNF +# ---------------------- +# func_stripname_cnf prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +# +# This function is identical to the (non-XSI) version of func_stripname, +# except this one can be used by m4 code that may be executed by configure, +# rather than the libtool script. +m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl +AC_REQUIRE([_LT_DECL_SED]) +AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) +func_stripname_cnf () +{ + case ${2} in + .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; + *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; + esac +} # func_stripname_cnf +])# _LT_FUNC_STRIPNAME_CNF + +# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) +# --------------------------------- +# Figure out "hidden" library dependencies from verbose +# compiler output when linking a shared library. +# Parse the compiler output and extract the necessary +# objects, libraries and library flags. +m4_defun([_LT_SYS_HIDDEN_LIBDEPS], +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl +AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl +# Dependencies to place before and after the object being linked: +_LT_TAGVAR(predep_objects, $1)= +_LT_TAGVAR(postdep_objects, $1)= +_LT_TAGVAR(predeps, $1)= +_LT_TAGVAR(postdeps, $1)= +_LT_TAGVAR(compiler_lib_search_path, $1)= + +dnl we can't use the lt_simple_compile_test_code here, +dnl because it contains code intended for an executable, +dnl not a library. It's possible we should let each +dnl tag define a new lt_????_link_test_code variable, +dnl but it's only used here... +m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF +int a; +void foo (void) { a = 0; } +_LT_EOF +], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF +class Foo +{ +public: + Foo (void) { a = 0; } +private: + int a; +}; +_LT_EOF +], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF + subroutine foo + implicit none + integer*4 a + a=0 + return + end +_LT_EOF +], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF + subroutine foo + implicit none + integer a + a=0 + return + end +_LT_EOF +], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF +public class foo { + private int a; + public void bar (void) { + a = 0; + } +}; +_LT_EOF +], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF +package foo +func foo() { +} +_LT_EOF +]) + +_lt_libdeps_save_CFLAGS=$CFLAGS +case "$CC $CFLAGS " in #( +*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; +*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; +*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; +esac + +dnl Parse the compiler output and extract the necessary +dnl objects, libraries and library flags. +if AC_TRY_EVAL(ac_compile); then + # Parse the compiler output and extract the necessary + # objects, libraries and library flags. + + # Sentinel used to keep track of whether or not we are before + # the conftest object file. + pre_test_object_deps_done=no + + for p in `eval "$output_verbose_link_cmd"`; do + case ${prev}${p} in + + -L* | -R* | -l*) + # Some compilers place space between "-{L,R}" and the path. + # Remove the space. + if test $p = "-L" || + test $p = "-R"; then + prev=$p + continue + fi + + # Expand the sysroot to ease extracting the directories later. + if test -z "$prev"; then + case $p in + -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; + -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; + -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; + esac + fi + case $p in + =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; + esac + if test "$pre_test_object_deps_done" = no; then + case ${prev} in + -L | -R) + # Internal compiler library paths should come after those + # provided the user. The postdeps already come after the + # user supplied libs so there is no need to process them. + if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then + _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" + else + _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" + fi + ;; + # The "-l" case would never come before the object being + # linked, so don't bother handling this case. + esac + else + if test -z "$_LT_TAGVAR(postdeps, $1)"; then + _LT_TAGVAR(postdeps, $1)="${prev}${p}" + else + _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" + fi + fi + prev= + ;; + + *.lto.$objext) ;; # Ignore GCC LTO objects + *.$objext) + # This assumes that the test object file only shows up + # once in the compiler output. + if test "$p" = "conftest.$objext"; then + pre_test_object_deps_done=yes + continue + fi + + if test "$pre_test_object_deps_done" = no; then + if test -z "$_LT_TAGVAR(predep_objects, $1)"; then + _LT_TAGVAR(predep_objects, $1)="$p" + else + _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" + fi + else + if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then + _LT_TAGVAR(postdep_objects, $1)="$p" + else + _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" + fi + fi + ;; + + *) ;; # Ignore the rest. + + esac + done + + # Clean up. + rm -f a.out a.exe +else + echo "libtool.m4: error: problem compiling $1 test program" +fi + +$RM -f confest.$objext +CFLAGS=$_lt_libdeps_save_CFLAGS + +# PORTME: override above test on systems where it is broken +m4_if([$1], [CXX], +[case $host_os in +interix[[3-9]]*) + # Interix 3.5 installs completely hosed .la files for C++, so rather than + # hack all around it, let's just trust "g++" to DTRT. + _LT_TAGVAR(predep_objects,$1)= + _LT_TAGVAR(postdep_objects,$1)= + _LT_TAGVAR(postdeps,$1)= + ;; + +linux*) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + + if test "$solaris_use_stlport4" != yes; then + _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' + fi + ;; + esac + ;; + +solaris*) + case $cc_basename in + CC* | sunCC*) + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + + # Adding this requires a known-good setup of shared libraries for + # Sun compiler versions before 5.6, else PIC objects from an old + # archive will be linked into the output, leading to subtle bugs. + if test "$solaris_use_stlport4" != yes; then + _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' + fi + ;; + esac + ;; +esac +]) + +case " $_LT_TAGVAR(postdeps, $1) " in +*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; +esac + _LT_TAGVAR(compiler_lib_search_dirs, $1)= +if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then + _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` +fi +_LT_TAGDECL([], [compiler_lib_search_dirs], [1], + [The directories searched by this compiler when creating a shared library]) +_LT_TAGDECL([], [predep_objects], [1], + [Dependencies to place before and after the objects being linked to + create a shared library]) +_LT_TAGDECL([], [postdep_objects], [1]) +_LT_TAGDECL([], [predeps], [1]) +_LT_TAGDECL([], [postdeps], [1]) +_LT_TAGDECL([], [compiler_lib_search_path], [1], + [The library search path used internally by the compiler when linking + a shared library]) +])# _LT_SYS_HIDDEN_LIBDEPS + + +# _LT_LANG_F77_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for a Fortran 77 compiler are +# suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_F77_CONFIG], +[AC_LANG_PUSH(Fortran 77) +if test -z "$F77" || test "X$F77" = "Xno"; then + _lt_disable_F77=yes +fi + +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_LT_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_TAGVAR(hardcode_direct, $1)=no +_LT_TAGVAR(hardcode_direct_absolute, $1)=no +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_TAGVAR(hardcode_libdir_separator, $1)= +_LT_TAGVAR(hardcode_minus_L, $1)=no +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_LT_TAGVAR(module_cmds, $1)= +_LT_TAGVAR(module_expsym_cmds, $1)= +_LT_TAGVAR(link_all_deplibs, $1)=unknown +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds +_LT_TAGVAR(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for f77 test sources. +ac_ext=f + +# Object file extension for compiled f77 test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the F77 compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_disable_F77" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="\ + subroutine t + return + end +" + + # Code to be used in simple link tests + lt_simple_link_test_code="\ + program t + end +" + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + _LT_TAG_COMPILER + + # save warnings/boilerplate of simple test code + _LT_COMPILER_BOILERPLATE + _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. + lt_save_CC="$CC" + lt_save_GCC=$GCC + lt_save_CFLAGS=$CFLAGS + CC=${F77-"f77"} + CFLAGS=$FFLAGS + compiler=$CC + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + GCC=$G77 + if test -n "$compiler"; then + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + aix[[4-9]]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_TAGVAR(GCC, $1)="$G77" + _LT_TAGVAR(LD, $1)="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + GCC=$lt_save_GCC + CC="$lt_save_CC" + CFLAGS="$lt_save_CFLAGS" +fi # test "$_lt_disable_F77" != yes + +AC_LANG_POP +])# _LT_LANG_F77_CONFIG + + +# _LT_LANG_FC_CONFIG([TAG]) +# ------------------------- +# Ensure that the configuration variables for a Fortran compiler are +# suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_FC_CONFIG], +[AC_LANG_PUSH(Fortran) + +if test -z "$FC" || test "X$FC" = "Xno"; then + _lt_disable_FC=yes +fi + +_LT_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_TAGVAR(allow_undefined_flag, $1)= +_LT_TAGVAR(always_export_symbols, $1)=no +_LT_TAGVAR(archive_expsym_cmds, $1)= +_LT_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_TAGVAR(hardcode_direct, $1)=no +_LT_TAGVAR(hardcode_direct_absolute, $1)=no +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_TAGVAR(hardcode_libdir_separator, $1)= +_LT_TAGVAR(hardcode_minus_L, $1)=no +_LT_TAGVAR(hardcode_automatic, $1)=no +_LT_TAGVAR(inherit_rpath, $1)=no +_LT_TAGVAR(module_cmds, $1)= +_LT_TAGVAR(module_expsym_cmds, $1)= +_LT_TAGVAR(link_all_deplibs, $1)=unknown +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds +_LT_TAGVAR(no_undefined_flag, $1)= +_LT_TAGVAR(whole_archive_flag_spec, $1)= +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for fc test sources. +ac_ext=${ac_fc_srcext-f} + +# Object file extension for compiled fc test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# No sense in running all these tests if we already determined that +# the FC compiler isn't working. Some variables (like enable_shared) +# are currently assumed to apply to all compilers on this platform, +# and will be corrupted by setting them based on a non-working compiler. +if test "$_lt_disable_FC" != yes; then + # Code to be used in simple compile tests + lt_simple_compile_test_code="\ + subroutine t + return + end +" + + # Code to be used in simple link tests + lt_simple_link_test_code="\ + program t + end +" + + # ltmain only uses $CC for tagged configurations so make sure $CC is set. + _LT_TAG_COMPILER + + # save warnings/boilerplate of simple test code + _LT_COMPILER_BOILERPLATE + _LT_LINKER_BOILERPLATE + + # Allow CC to be a program name with arguments. + lt_save_CC="$CC" + lt_save_GCC=$GCC + lt_save_CFLAGS=$CFLAGS + CC=${FC-"f95"} + CFLAGS=$FCFLAGS + compiler=$CC + GCC=$ac_cv_fc_compiler_gnu + + _LT_TAGVAR(compiler, $1)=$CC + _LT_CC_BASENAME([$compiler]) + + if test -n "$compiler"; then + AC_MSG_CHECKING([if libtool supports shared libraries]) + AC_MSG_RESULT([$can_build_shared]) + + AC_MSG_CHECKING([whether to build shared libraries]) + test "$can_build_shared" = "no" && enable_shared=no + + # On AIX, shared libraries and static libraries use the same namespace, and + # are all built from PIC. + case $host_os in + aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + aix[[4-9]]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + esac + AC_MSG_RESULT([$enable_shared]) + + AC_MSG_CHECKING([whether to build static libraries]) + # Make sure either enable_shared or enable_static is yes. + test "$enable_shared" = yes || enable_static=yes + AC_MSG_RESULT([$enable_static]) + + _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" + _LT_TAGVAR(LD, $1)="$LD" + + ## CAVEAT EMPTOR: + ## There is no encapsulation within the following macros, do not change + ## the running order or otherwise move them around unless you know exactly + ## what you are doing... + _LT_SYS_HIDDEN_LIBDEPS($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_SYS_DYNAMIC_LINKER($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) + fi # test -n "$compiler" + + GCC=$lt_save_GCC + CC=$lt_save_CC + CFLAGS=$lt_save_CFLAGS +fi # test "$_lt_disable_FC" != yes + +AC_LANG_POP +])# _LT_LANG_FC_CONFIG + + +# _LT_LANG_GCJ_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for the GNU Java Compiler compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_GCJ_CONFIG], +[AC_REQUIRE([LT_PROG_GCJ])dnl +AC_LANG_SAVE + +# Source file extension for Java test sources. +ac_ext=java + +# Object file extension for compiled Java test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="class foo {}" + +# Code to be used in simple link tests +lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_TAG_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC=$CC +lt_save_CFLAGS=$CFLAGS +lt_save_GCC=$GCC +GCC=yes +CC=${GCJ-"gcj"} +CFLAGS=$GCJFLAGS +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_TAGVAR(LD, $1)="$LD" +_LT_CC_BASENAME([$compiler]) + +# GCJ did not exist at the time GCC didn't implicitly link libc in. +_LT_TAGVAR(archive_cmds_need_lc, $1)=no + +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... +if test -n "$compiler"; then + _LT_COMPILER_NO_RTTI($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) +fi + +AC_LANG_RESTORE + +GCC=$lt_save_GCC +CC=$lt_save_CC +CFLAGS=$lt_save_CFLAGS +])# _LT_LANG_GCJ_CONFIG + + +# _LT_LANG_GO_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for the GNU Go compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_GO_CONFIG], +[AC_REQUIRE([LT_PROG_GO])dnl +AC_LANG_SAVE + +# Source file extension for Go test sources. +ac_ext=go + +# Object file extension for compiled Go test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="package main; func main() { }" + +# Code to be used in simple link tests +lt_simple_link_test_code='package main; func main() { }' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_TAG_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC=$CC +lt_save_CFLAGS=$CFLAGS +lt_save_GCC=$GCC +GCC=yes +CC=${GOC-"gccgo"} +CFLAGS=$GOFLAGS +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_TAGVAR(LD, $1)="$LD" +_LT_CC_BASENAME([$compiler]) + +# Go did not exist at the time GCC didn't implicitly link libc in. +_LT_TAGVAR(archive_cmds_need_lc, $1)=no + +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... +if test -n "$compiler"; then + _LT_COMPILER_NO_RTTI($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) +fi + +AC_LANG_RESTORE + +GCC=$lt_save_GCC +CC=$lt_save_CC +CFLAGS=$lt_save_CFLAGS +])# _LT_LANG_GO_CONFIG + + +# _LT_LANG_RC_CONFIG([TAG]) +# ------------------------- +# Ensure that the configuration variables for the Windows resource compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_RC_CONFIG], +[AC_REQUIRE([LT_PROG_RC])dnl +AC_LANG_SAVE + +# Source file extension for RC test sources. +ac_ext=rc + +# Object file extension for compiled RC test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' + +# Code to be used in simple link tests +lt_simple_link_test_code="$lt_simple_compile_test_code" + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_TAG_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +lt_save_CFLAGS=$CFLAGS +lt_save_GCC=$GCC +GCC= +CC=${RC-"windres"} +CFLAGS= +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_CC_BASENAME([$compiler]) +_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes + +if test -n "$compiler"; then + : + _LT_CONFIG($1) +fi + +GCC=$lt_save_GCC +AC_LANG_RESTORE +CC=$lt_save_CC +CFLAGS=$lt_save_CFLAGS +])# _LT_LANG_RC_CONFIG + + +# LT_PROG_GCJ +# ----------- +AC_DEFUN([LT_PROG_GCJ], +[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], + [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], + [AC_CHECK_TOOL(GCJ, gcj,) + test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" + AC_SUBST(GCJFLAGS)])])[]dnl +]) + +# Old name: +AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_GCJ], []) + + +# LT_PROG_GO +# ---------- +AC_DEFUN([LT_PROG_GO], +[AC_CHECK_TOOL(GOC, gccgo,) +]) + + +# LT_PROG_RC +# ---------- +AC_DEFUN([LT_PROG_RC], +[AC_CHECK_TOOL(RC, windres,) +]) + +# Old name: +AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_RC], []) + + +# _LT_DECL_EGREP +# -------------- +# If we don't have a new enough Autoconf to choose the best grep +# available, choose the one first in the user's PATH. +m4_defun([_LT_DECL_EGREP], +[AC_REQUIRE([AC_PROG_EGREP])dnl +AC_REQUIRE([AC_PROG_FGREP])dnl +test -z "$GREP" && GREP=grep +_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) +_LT_DECL([], [EGREP], [1], [An ERE matcher]) +_LT_DECL([], [FGREP], [1], [A literal string matcher]) +dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too +AC_SUBST([GREP]) +]) + + +# _LT_DECL_OBJDUMP +# -------------- +# If we don't have a new enough Autoconf to choose the best objdump +# available, choose the one first in the user's PATH. +m4_defun([_LT_DECL_OBJDUMP], +[AC_CHECK_TOOL(OBJDUMP, objdump, false) +test -z "$OBJDUMP" && OBJDUMP=objdump +_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) +AC_SUBST([OBJDUMP]) +]) + +# _LT_DECL_DLLTOOL +# ---------------- +# Ensure DLLTOOL variable is set. +m4_defun([_LT_DECL_DLLTOOL], +[AC_CHECK_TOOL(DLLTOOL, dlltool, false) +test -z "$DLLTOOL" && DLLTOOL=dlltool +_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) +AC_SUBST([DLLTOOL]) +]) + +# _LT_DECL_SED +# ------------ +# Check for a fully-functional sed program, that truncates +# as few characters as possible. Prefer GNU sed if found. +m4_defun([_LT_DECL_SED], +[AC_PROG_SED +test -z "$SED" && SED=sed +Xsed="$SED -e 1s/^X//" +_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) +_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], + [Sed that helps us avoid accidentally triggering echo(1) options like -n]) +])# _LT_DECL_SED + +m4_ifndef([AC_PROG_SED], [ +############################################################ +# NOTE: This macro has been submitted for inclusion into # +# GNU Autoconf as AC_PROG_SED. When it is available in # +# a released version of Autoconf we should remove this # +# macro and use it instead. # +############################################################ + +m4_defun([AC_PROG_SED], +[AC_MSG_CHECKING([for a sed that does not truncate output]) +AC_CACHE_VAL(lt_cv_path_SED, +[# Loop through the user's path and test for sed and gsed. +# Then use that list of sed's as ones to test for truncation. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for lt_ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then + lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" + fi + done + done +done +IFS=$as_save_IFS +lt_ac_max=0 +lt_ac_count=0 +# Add /usr/xpg4/bin/sed as it is typically found on Solaris +# along with /bin/sed that truncates output. +for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do + test ! -f $lt_ac_sed && continue + cat /dev/null > conftest.in + lt_ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >conftest.in + # Check for GNU sed and select it if it is found. + if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then + lt_cv_path_SED=$lt_ac_sed + break + fi + while true; do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo >>conftest.nl + $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break + cmp -s conftest.out conftest.nl || break + # 10000 chars as input seems more than enough + test $lt_ac_count -gt 10 && break + lt_ac_count=`expr $lt_ac_count + 1` + if test $lt_ac_count -gt $lt_ac_max; then + lt_ac_max=$lt_ac_count + lt_cv_path_SED=$lt_ac_sed + fi + done +done +]) +SED=$lt_cv_path_SED +AC_SUBST([SED]) +AC_MSG_RESULT([$SED]) +])#AC_PROG_SED +])#m4_ifndef + +# Old name: +AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([LT_AC_PROG_SED], []) + + +# _LT_CHECK_SHELL_FEATURES +# ------------------------ +# Find out whether the shell is Bourne or XSI compatible, +# or has some other useful features. +m4_defun([_LT_CHECK_SHELL_FEATURES], +[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) +# Try some XSI features +xsi_shell=no +( _lt_dummy="a/b/c" + test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ + = c,a/b,b/c, \ + && eval 'test $(( 1 + 1 )) -eq 2 \ + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ + && xsi_shell=yes +AC_MSG_RESULT([$xsi_shell]) +_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) + +AC_MSG_CHECKING([whether the shell understands "+="]) +lt_shell_append=no +( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ + >/dev/null 2>&1 \ + && lt_shell_append=yes +AC_MSG_RESULT([$lt_shell_append]) +_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) + +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + lt_unset=unset +else + lt_unset=false +fi +_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl + +# test EBCDIC or ASCII +case `echo X|tr X '\101'` in + A) # ASCII based system + # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr + lt_SP2NL='tr \040 \012' + lt_NL2SP='tr \015\012 \040\040' + ;; + *) # EBCDIC based system + lt_SP2NL='tr \100 \n' + lt_NL2SP='tr \r\n \100\100' + ;; +esac +_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl +_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl +])# _LT_CHECK_SHELL_FEATURES + + +# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) +# ------------------------------------------------------ +# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and +# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. +m4_defun([_LT_PROG_FUNCTION_REPLACE], +[dnl { +sed -e '/^$1 ()$/,/^} # $1 /c\ +$1 ()\ +{\ +m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) +} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: +]) + + +# _LT_PROG_REPLACE_SHELLFNS +# ------------------------- +# Replace existing portable implementations of several shell functions with +# equivalent extended shell implementations where those features are available.. +m4_defun([_LT_PROG_REPLACE_SHELLFNS], +[if test x"$xsi_shell" = xyes; then + _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac]) + + _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl + func_basename_result="${1##*/}"]) + + _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac + func_basename_result="${1##*/}"]) + + _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl + # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are + # positional parameters, so assign one to ordinary parameter first. + func_stripname_result=${3} + func_stripname_result=${func_stripname_result#"${1}"} + func_stripname_result=${func_stripname_result%"${2}"}]) + + _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl + func_split_long_opt_name=${1%%=*} + func_split_long_opt_arg=${1#*=}]) + + _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl + func_split_short_opt_arg=${1#??} + func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) + + _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl + case ${1} in + *.lo) func_lo2o_result=${1%.lo}.${objext} ;; + *) func_lo2o_result=${1} ;; + esac]) + + _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) + + _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) + + _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) +fi + +if test x"$lt_shell_append" = xyes; then + _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) + + _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl + func_quote_for_eval "${2}" +dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ + eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) + + # Save a `func_append' function call where possible by direct use of '+=' + sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +else + # Save a `func_append' function call even when '+=' is not available + sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +fi + +if test x"$_lt_function_replace_fail" = x":"; then + AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) +fi +]) + +# _LT_PATH_CONVERSION_FUNCTIONS +# ----------------------------- +# Determine which file name conversion functions should be used by +# func_to_host_file (and, implicitly, by func_to_host_path). These are needed +# for certain cross-compile configurations and native mingw. +m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +AC_MSG_CHECKING([how to convert $build file names to $host format]) +AC_CACHE_VAL(lt_cv_to_host_file_cmd, +[case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 + ;; + esac + ;; + *-*-cygwin* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin + ;; + esac + ;; + * ) # unhandled hosts (and "normal" native builds) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; +esac +]) +to_host_file_cmd=$lt_cv_to_host_file_cmd +AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) +_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], + [0], [convert $build file names to $host format])dnl + +AC_MSG_CHECKING([how to convert $build file names to toolchain format]) +AC_CACHE_VAL(lt_cv_to_tool_file_cmd, +[#assume ordinary cross tools, or native build. +lt_cv_to_tool_file_cmd=func_convert_file_noop +case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 + ;; + esac + ;; +esac +]) +to_tool_file_cmd=$lt_cv_to_tool_file_cmd +AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) +_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], + [0], [convert $build files to toolchain format])dnl +])# _LT_PATH_CONVERSION_FUNCTIONS diff --git a/enet server test/enet2/m4/ltoptions.m4 b/enet server test/enet2/m4/ltoptions.m4 new file mode 100644 index 0000000..5d9acd8 --- /dev/null +++ b/enet server test/enet2/m4/ltoptions.m4 @@ -0,0 +1,384 @@ +# Helper functions for option handling. -*- Autoconf -*- +# +# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# Written by Gary V. Vaughan, 2004 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# serial 7 ltoptions.m4 + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) + + +# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) +# ------------------------------------------ +m4_define([_LT_MANGLE_OPTION], +[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) + + +# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) +# --------------------------------------- +# Set option OPTION-NAME for macro MACRO-NAME, and if there is a +# matching handler defined, dispatch to it. Other OPTION-NAMEs are +# saved as a flag. +m4_define([_LT_SET_OPTION], +[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl +m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), + _LT_MANGLE_DEFUN([$1], [$2]), + [m4_warning([Unknown $1 option `$2'])])[]dnl +]) + + +# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) +# ------------------------------------------------------------ +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +m4_define([_LT_IF_OPTION], +[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) + + +# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) +# ------------------------------------------------------- +# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME +# are set. +m4_define([_LT_UNLESS_OPTIONS], +[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), + [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), + [m4_define([$0_found])])])[]dnl +m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 +])[]dnl +]) + + +# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) +# ---------------------------------------- +# OPTION-LIST is a space-separated list of Libtool options associated +# with MACRO-NAME. If any OPTION has a matching handler declared with +# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about +# the unknown option and exit. +m4_defun([_LT_SET_OPTIONS], +[# Set options +m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), + [_LT_SET_OPTION([$1], _LT_Option)]) + +m4_if([$1],[LT_INIT],[ + dnl + dnl Simply set some default values (i.e off) if boolean options were not + dnl specified: + _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no + ]) + _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no + ]) + dnl + dnl If no reference was made to various pairs of opposing options, then + dnl we run the default mode handler for the pair. For example, if neither + dnl `shared' nor `disable-shared' was passed, we enable building of shared + dnl archives by default: + _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) + _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) + _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) + _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], + [_LT_ENABLE_FAST_INSTALL]) + ]) +])# _LT_SET_OPTIONS + + +## --------------------------------- ## +## Macros to handle LT_INIT options. ## +## --------------------------------- ## + +# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) +# ----------------------------------------- +m4_define([_LT_MANGLE_DEFUN], +[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) + + +# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) +# ----------------------------------------------- +m4_define([LT_OPTION_DEFINE], +[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl +])# LT_OPTION_DEFINE + + +# dlopen +# ------ +LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes +]) + +AU_DEFUN([AC_LIBTOOL_DLOPEN], +[_LT_SET_OPTION([LT_INIT], [dlopen]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the `dlopen' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) + + +# win32-dll +# --------- +# Declare package support for building win32 dll's. +LT_OPTION_DEFINE([LT_INIT], [win32-dll], +[enable_win32_dll=yes + +case $host in +*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) + AC_CHECK_TOOL(AS, as, false) + AC_CHECK_TOOL(DLLTOOL, dlltool, false) + AC_CHECK_TOOL(OBJDUMP, objdump, false) + ;; +esac + +test -z "$AS" && AS=as +_LT_DECL([], [AS], [1], [Assembler program])dnl + +test -z "$DLLTOOL" && DLLTOOL=dlltool +_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl + +test -z "$OBJDUMP" && OBJDUMP=objdump +_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl +])# win32-dll + +AU_DEFUN([AC_LIBTOOL_WIN32_DLL], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +_LT_SET_OPTION([LT_INIT], [win32-dll]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the `win32-dll' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) + + +# _LT_ENABLE_SHARED([DEFAULT]) +# ---------------------------- +# implement the --enable-shared flag, and supports the `shared' and +# `disable-shared' LT_INIT options. +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +m4_define([_LT_ENABLE_SHARED], +[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([shared], + [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], + [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) + + _LT_DECL([build_libtool_libs], [enable_shared], [0], + [Whether or not to build shared libraries]) +])# _LT_ENABLE_SHARED + +LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) + +# Old names: +AC_DEFUN([AC_ENABLE_SHARED], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) +]) + +AC_DEFUN([AC_DISABLE_SHARED], +[_LT_SET_OPTION([LT_INIT], [disable-shared]) +]) + +AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) +AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_ENABLE_SHARED], []) +dnl AC_DEFUN([AM_DISABLE_SHARED], []) + + + +# _LT_ENABLE_STATIC([DEFAULT]) +# ---------------------------- +# implement the --enable-static flag, and support the `static' and +# `disable-static' LT_INIT options. +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +m4_define([_LT_ENABLE_STATIC], +[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([static], + [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], + [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_static=]_LT_ENABLE_STATIC_DEFAULT) + + _LT_DECL([build_old_libs], [enable_static], [0], + [Whether or not to build static libraries]) +])# _LT_ENABLE_STATIC + +LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) + +# Old names: +AC_DEFUN([AC_ENABLE_STATIC], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) +]) + +AC_DEFUN([AC_DISABLE_STATIC], +[_LT_SET_OPTION([LT_INIT], [disable-static]) +]) + +AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) +AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AM_ENABLE_STATIC], []) +dnl AC_DEFUN([AM_DISABLE_STATIC], []) + + + +# _LT_ENABLE_FAST_INSTALL([DEFAULT]) +# ---------------------------------- +# implement the --enable-fast-install flag, and support the `fast-install' +# and `disable-fast-install' LT_INIT options. +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +m4_define([_LT_ENABLE_FAST_INSTALL], +[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl +AC_ARG_ENABLE([fast-install], + [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], + [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; + *) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) + +_LT_DECL([fast_install], [enable_fast_install], [0], + [Whether or not to optimize for fast installation])dnl +])# _LT_ENABLE_FAST_INSTALL + +LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) +LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) + +# Old names: +AU_DEFUN([AC_ENABLE_FAST_INSTALL], +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you put +the `fast-install' option into LT_INIT's first parameter.]) +]) + +AU_DEFUN([AC_DISABLE_FAST_INSTALL], +[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you put +the `disable-fast-install' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) +dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) + + +# _LT_WITH_PIC([MODE]) +# -------------------- +# implement the --with-pic flag, and support the `pic-only' and `no-pic' +# LT_INIT options. +# MODE is either `yes' or `no'. If omitted, it defaults to `both'. +m4_define([_LT_WITH_PIC], +[AC_ARG_WITH([pic], + [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], + [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], + [lt_p=${PACKAGE-default} + case $withval in + yes|no) pic_mode=$withval ;; + *) + pic_mode=default + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for lt_pkg in $withval; do + IFS="$lt_save_ifs" + if test "X$lt_pkg" = "X$lt_p"; then + pic_mode=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [pic_mode=default]) + +test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) + +_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl +])# _LT_WITH_PIC + +LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) +LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) + +# Old name: +AU_DEFUN([AC_LIBTOOL_PICMODE], +[_LT_SET_OPTION([LT_INIT], [pic-only]) +AC_DIAGNOSE([obsolete], +[$0: Remove this warning and the call to _LT_SET_OPTION when you +put the `pic-only' option into LT_INIT's first parameter.]) +]) + +dnl aclocal-1.4 backwards compatibility: +dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) + +## ----------------- ## +## LTDL_INIT Options ## +## ----------------- ## + +m4_define([_LTDL_MODE], []) +LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], + [m4_define([_LTDL_MODE], [nonrecursive])]) +LT_OPTION_DEFINE([LTDL_INIT], [recursive], + [m4_define([_LTDL_MODE], [recursive])]) +LT_OPTION_DEFINE([LTDL_INIT], [subproject], + [m4_define([_LTDL_MODE], [subproject])]) + +m4_define([_LTDL_TYPE], []) +LT_OPTION_DEFINE([LTDL_INIT], [installable], + [m4_define([_LTDL_TYPE], [installable])]) +LT_OPTION_DEFINE([LTDL_INIT], [convenience], + [m4_define([_LTDL_TYPE], [convenience])]) diff --git a/enet server test/enet2/m4/ltsugar.m4 b/enet server test/enet2/m4/ltsugar.m4 new file mode 100644 index 0000000..9000a05 --- /dev/null +++ b/enet server test/enet2/m4/ltsugar.m4 @@ -0,0 +1,123 @@ +# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- +# +# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. +# Written by Gary V. Vaughan, 2004 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# serial 6 ltsugar.m4 + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) + + +# lt_join(SEP, ARG1, [ARG2...]) +# ----------------------------- +# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their +# associated separator. +# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier +# versions in m4sugar had bugs. +m4_define([lt_join], +[m4_if([$#], [1], [], + [$#], [2], [[$2]], + [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) +m4_define([_lt_join], +[m4_if([$#$2], [2], [], + [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) + + +# lt_car(LIST) +# lt_cdr(LIST) +# ------------ +# Manipulate m4 lists. +# These macros are necessary as long as will still need to support +# Autoconf-2.59 which quotes differently. +m4_define([lt_car], [[$1]]) +m4_define([lt_cdr], +[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], + [$#], 1, [], + [m4_dquote(m4_shift($@))])]) +m4_define([lt_unquote], $1) + + +# lt_append(MACRO-NAME, STRING, [SEPARATOR]) +# ------------------------------------------ +# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. +# Note that neither SEPARATOR nor STRING are expanded; they are appended +# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). +# No SEPARATOR is output if MACRO-NAME was previously undefined (different +# than defined and empty). +# +# This macro is needed until we can rely on Autoconf 2.62, since earlier +# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. +m4_define([lt_append], +[m4_define([$1], + m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) + + + +# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) +# ---------------------------------------------------------- +# Produce a SEP delimited list of all paired combinations of elements of +# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list +# has the form PREFIXmINFIXSUFFIXn. +# Needed until we can rely on m4_combine added in Autoconf 2.62. +m4_define([lt_combine], +[m4_if(m4_eval([$# > 3]), [1], + [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl +[[m4_foreach([_Lt_prefix], [$2], + [m4_foreach([_Lt_suffix], + ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, + [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) + + +# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) +# ----------------------------------------------------------------------- +# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited +# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. +m4_define([lt_if_append_uniq], +[m4_ifdef([$1], + [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], + [lt_append([$1], [$2], [$3])$4], + [$5])], + [lt_append([$1], [$2], [$3])$4])]) + + +# lt_dict_add(DICT, KEY, VALUE) +# ----------------------------- +m4_define([lt_dict_add], +[m4_define([$1($2)], [$3])]) + + +# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) +# -------------------------------------------- +m4_define([lt_dict_add_subkey], +[m4_define([$1($2:$3)], [$4])]) + + +# lt_dict_fetch(DICT, KEY, [SUBKEY]) +# ---------------------------------- +m4_define([lt_dict_fetch], +[m4_ifval([$3], + m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), + m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) + + +# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) +# ----------------------------------------------------------------- +m4_define([lt_if_dict_fetch], +[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], + [$5], + [$6])]) + + +# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) +# -------------------------------------------------------------- +m4_define([lt_dict_filter], +[m4_if([$5], [], [], + [lt_join(m4_quote(m4_default([$4], [[, ]])), + lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), + [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl +]) diff --git a/enet server test/enet2/m4/ltversion.m4 b/enet server test/enet2/m4/ltversion.m4 new file mode 100644 index 0000000..07a8602 --- /dev/null +++ b/enet server test/enet2/m4/ltversion.m4 @@ -0,0 +1,23 @@ +# ltversion.m4 -- version numbers -*- Autoconf -*- +# +# Copyright (C) 2004 Free Software Foundation, Inc. +# Written by Scott James Remnant, 2004 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# @configure_input@ + +# serial 3337 ltversion.m4 +# This file is part of GNU Libtool + +m4_define([LT_PACKAGE_VERSION], [2.4.2]) +m4_define([LT_PACKAGE_REVISION], [1.3337]) + +AC_DEFUN([LTVERSION_VERSION], +[macro_version='2.4.2' +macro_revision='1.3337' +_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) +_LT_DECL(, macro_revision, 0) +]) diff --git a/enet server test/enet2/m4/lt~obsolete.m4 b/enet server test/enet2/m4/lt~obsolete.m4 new file mode 100644 index 0000000..c573da9 --- /dev/null +++ b/enet server test/enet2/m4/lt~obsolete.m4 @@ -0,0 +1,98 @@ +# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- +# +# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. +# Written by Scott James Remnant, 2004. +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +# serial 5 lt~obsolete.m4 + +# These exist entirely to fool aclocal when bootstrapping libtool. +# +# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) +# which have later been changed to m4_define as they aren't part of the +# exported API, or moved to Autoconf or Automake where they belong. +# +# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN +# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us +# using a macro with the same name in our local m4/libtool.m4 it'll +# pull the old libtool.m4 in (it doesn't see our shiny new m4_define +# and doesn't know about Autoconf macros at all.) +# +# So we provide this file, which has a silly filename so it's always +# included after everything else. This provides aclocal with the +# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything +# because those macros already exist, or will be overwritten later. +# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. +# +# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. +# Yes, that means every name once taken will need to remain here until +# we give up compatibility with versions before 1.7, at which point +# we need to keep only those names which we still refer to. + +# This is to help aclocal find these macros, as it can't see m4_define. +AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) + +m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) +m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) +m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) +m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) +m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) +m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) +m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) +m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) +m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) +m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) +m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) +m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) +m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) +m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) +m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) +m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) +m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) +m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) +m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) +m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) +m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) +m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) +m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) +m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) +m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) +m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) +m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) +m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) +m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) +m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) +m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) +m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) +m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) +m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) +m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) +m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) +m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) +m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) +m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) +m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) +m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) +m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) +m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) +m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) +m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) +m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) +m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) +m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) +m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) +m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) +m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) +m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) +m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) +m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) +m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) +m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) +m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) +m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) diff --git a/enet server test/enet2/missing b/enet server test/enet2/missing new file mode 100644 index 0000000..db98974 --- /dev/null +++ b/enet server test/enet2/missing @@ -0,0 +1,215 @@ +#! /bin/sh +# Common wrapper for a few potentially missing GNU programs. + +scriptversion=2013-10-28.13; # UTC + +# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Originally written by Fran,cois Pinard , 1996. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +if test $# -eq 0; then + echo 1>&2 "Try '$0 --help' for more information" + exit 1 +fi + +case $1 in + + --is-lightweight) + # Used by our autoconf macros to check whether the available missing + # script is modern enough. + exit 0 + ;; + + --run) + # Back-compat with the calling convention used by older automake. + shift + ;; + + -h|--h|--he|--hel|--help) + echo "\ +$0 [OPTION]... PROGRAM [ARGUMENT]... + +Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due +to PROGRAM being missing or too old. + +Options: + -h, --help display this help and exit + -v, --version output version information and exit + +Supported PROGRAM values: + aclocal autoconf autoheader autom4te automake makeinfo + bison yacc flex lex help2man + +Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and +'g' are ignored when checking the name. + +Send bug reports to ." + exit $? + ;; + + -v|--v|--ve|--ver|--vers|--versi|--versio|--version) + echo "missing $scriptversion (GNU Automake)" + exit $? + ;; + + -*) + echo 1>&2 "$0: unknown '$1' option" + echo 1>&2 "Try '$0 --help' for more information" + exit 1 + ;; + +esac + +# Run the given program, remember its exit status. +"$@"; st=$? + +# If it succeeded, we are done. +test $st -eq 0 && exit 0 + +# Also exit now if we it failed (or wasn't found), and '--version' was +# passed; such an option is passed most likely to detect whether the +# program is present and works. +case $2 in --version|--help) exit $st;; esac + +# Exit code 63 means version mismatch. This often happens when the user +# tries to use an ancient version of a tool on a file that requires a +# minimum version. +if test $st -eq 63; then + msg="probably too old" +elif test $st -eq 127; then + # Program was missing. + msg="missing on your system" +else + # Program was found and executed, but failed. Give up. + exit $st +fi + +perl_URL=http://www.perl.org/ +flex_URL=http://flex.sourceforge.net/ +gnu_software_URL=http://www.gnu.org/software + +program_details () +{ + case $1 in + aclocal|automake) + echo "The '$1' program is part of the GNU Automake package:" + echo "<$gnu_software_URL/automake>" + echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" + echo "<$gnu_software_URL/autoconf>" + echo "<$gnu_software_URL/m4/>" + echo "<$perl_URL>" + ;; + autoconf|autom4te|autoheader) + echo "The '$1' program is part of the GNU Autoconf package:" + echo "<$gnu_software_URL/autoconf/>" + echo "It also requires GNU m4 and Perl in order to run:" + echo "<$gnu_software_URL/m4/>" + echo "<$perl_URL>" + ;; + esac +} + +give_advice () +{ + # Normalize program name to check for. + normalized_program=`echo "$1" | sed ' + s/^gnu-//; t + s/^gnu//; t + s/^g//; t'` + + printf '%s\n' "'$1' is $msg." + + configure_deps="'configure.ac' or m4 files included by 'configure.ac'" + case $normalized_program in + autoconf*) + echo "You should only need it if you modified 'configure.ac'," + echo "or m4 files included by it." + program_details 'autoconf' + ;; + autoheader*) + echo "You should only need it if you modified 'acconfig.h' or" + echo "$configure_deps." + program_details 'autoheader' + ;; + automake*) + echo "You should only need it if you modified 'Makefile.am' or" + echo "$configure_deps." + program_details 'automake' + ;; + aclocal*) + echo "You should only need it if you modified 'acinclude.m4' or" + echo "$configure_deps." + program_details 'aclocal' + ;; + autom4te*) + echo "You might have modified some maintainer files that require" + echo "the 'autom4te' program to be rebuilt." + program_details 'autom4te' + ;; + bison*|yacc*) + echo "You should only need it if you modified a '.y' file." + echo "You may want to install the GNU Bison package:" + echo "<$gnu_software_URL/bison/>" + ;; + lex*|flex*) + echo "You should only need it if you modified a '.l' file." + echo "You may want to install the Fast Lexical Analyzer package:" + echo "<$flex_URL>" + ;; + help2man*) + echo "You should only need it if you modified a dependency" \ + "of a man page." + echo "You may want to install the GNU Help2man package:" + echo "<$gnu_software_URL/help2man/>" + ;; + makeinfo*) + echo "You should only need it if you modified a '.texi' file, or" + echo "any other file indirectly affecting the aspect of the manual." + echo "You might want to install the Texinfo package:" + echo "<$gnu_software_URL/texinfo/>" + echo "The spurious makeinfo call might also be the consequence of" + echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" + echo "want to install GNU make:" + echo "<$gnu_software_URL/make/>" + ;; + *) + echo "You might have modified some files without having the proper" + echo "tools for further handling them. Check the 'README' file, it" + echo "often tells you about the needed prerequisites for installing" + echo "this package. You may also peek at any GNU archive site, in" + echo "case some other package contains this missing '$1' program." + ;; + esac +} + +give_advice "$1" | sed -e '1s/^/WARNING: /' \ + -e '2,$s/^/ /' >&2 + +# Propagate the correct exit status (expected to be 127 for a program +# not found, 63 for a program that failed due to version mismatch). +exit $st + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/enet server test/enet2/packet.c b/enet server test/enet2/packet.c new file mode 100644 index 0000000..5fa78b2 --- /dev/null +++ b/enet server test/enet2/packet.c @@ -0,0 +1,165 @@ +/** + @file packet.c + @brief ENet packet management functions +*/ +#include +#define ENET_BUILDING_LIB 1 +#include "enet/enet.h" + +/** @defgroup Packet ENet packet functions + @{ +*/ + +/** Creates a packet that may be sent to a peer. + @param data initial contents of the packet's data; the packet's data will remain uninitialized if data is NULL. + @param dataLength size of the data allocated for this packet + @param flags flags for this packet as described for the ENetPacket structure. + @returns the packet on success, NULL on failure +*/ +ENetPacket * +enet_packet_create (const void * data, size_t dataLength, enet_uint32 flags) +{ + ENetPacket * packet = (ENetPacket *) enet_malloc (sizeof (ENetPacket)); + if (packet == NULL) + return NULL; + + if (flags & ENET_PACKET_FLAG_NO_ALLOCATE) + packet -> data = (enet_uint8 *) data; + else + if (dataLength <= 0) + packet -> data = NULL; + else + { + packet -> data = (enet_uint8 *) enet_malloc (dataLength); + if (packet -> data == NULL) + { + enet_free (packet); + return NULL; + } + + if (data != NULL) + memcpy (packet -> data, data, dataLength); + } + + packet -> referenceCount = 0; + packet -> flags = flags; + packet -> dataLength = dataLength; + packet -> freeCallback = NULL; + packet -> userData = NULL; + + return packet; +} + +/** Destroys the packet and deallocates its data. + @param packet packet to be destroyed +*/ +void +enet_packet_destroy (ENetPacket * packet) +{ + if (packet == NULL) + return; + + if (packet -> freeCallback != NULL) + (* packet -> freeCallback) (packet); + if (! (packet -> flags & ENET_PACKET_FLAG_NO_ALLOCATE) && + packet -> data != NULL) + enet_free (packet -> data); + enet_free (packet); +} + +/** Attempts to resize the data in the packet to length specified in the + dataLength parameter + @param packet packet to resize + @param dataLength new size for the packet data + @returns 0 on success, < 0 on failure +*/ +int +enet_packet_resize (ENetPacket * packet, size_t dataLength) +{ + enet_uint8 * newData; + + if (dataLength <= packet -> dataLength || (packet -> flags & ENET_PACKET_FLAG_NO_ALLOCATE)) + { + packet -> dataLength = dataLength; + + return 0; + } + + newData = (enet_uint8 *) enet_malloc (dataLength); + if (newData == NULL) + return -1; + + memcpy (newData, packet -> data, packet -> dataLength); + enet_free (packet -> data); + + packet -> data = newData; + packet -> dataLength = dataLength; + + return 0; +} + +static int initializedCRC32 = 0; +static enet_uint32 crcTable [256]; + +static enet_uint32 +reflect_crc (int val, int bits) +{ + int result = 0, bit; + + for (bit = 0; bit < bits; bit ++) + { + if(val & 1) result |= 1 << (bits - 1 - bit); + val >>= 1; + } + + return result; +} + +static void +initialize_crc32 (void) +{ + int byte; + + for (byte = 0; byte < 256; ++ byte) + { + enet_uint32 crc = reflect_crc (byte, 8) << 24; + int offset; + + for(offset = 0; offset < 8; ++ offset) + { + if (crc & 0x80000000) + crc = (crc << 1) ^ 0x04c11db7; + else + crc <<= 1; + } + + crcTable [byte] = reflect_crc (crc, 32); + } + + initializedCRC32 = 1; +} + +enet_uint32 +enet_crc32 (const ENetBuffer * buffers, size_t bufferCount) +{ + enet_uint32 crc = 0xFFFFFFFF; + + if (! initializedCRC32) initialize_crc32 (); + + while (bufferCount -- > 0) + { + const enet_uint8 * data = (const enet_uint8 *) buffers -> data, + * dataEnd = & data [buffers -> dataLength]; + + while (data < dataEnd) + { + crc = (crc >> 8) ^ crcTable [(crc & 0xFF) ^ *data++]; + } + + ++ buffers; + } + + return ENET_HOST_TO_NET_32 (~ crc); +} + +/** @} */ diff --git a/enet server test/enet2/peer.c b/enet server test/enet2/peer.c new file mode 100644 index 0000000..e2d0872 --- /dev/null +++ b/enet server test/enet2/peer.c @@ -0,0 +1,1004 @@ +/** + @file peer.c + @brief ENet peer management functions +*/ +#include +#define ENET_BUILDING_LIB 1 +#include "enet/enet.h" + +/** @defgroup peer ENet peer functions + @{ +*/ + +/** Configures throttle parameter for a peer. + + Unreliable packets are dropped by ENet in response to the varying conditions + of the Internet connection to the peer. The throttle represents a probability + that an unreliable packet should not be dropped and thus sent by ENet to the peer. + The lowest mean round trip time from the sending of a reliable packet to the + receipt of its acknowledgement is measured over an amount of time specified by + the interval parameter in milliseconds. If a measured round trip time happens to + be significantly less than the mean round trip time measured over the interval, + then the throttle probability is increased to allow more traffic by an amount + specified in the acceleration parameter, which is a ratio to the ENET_PEER_PACKET_THROTTLE_SCALE + constant. If a measured round trip time happens to be significantly greater than + the mean round trip time measured over the interval, then the throttle probability + is decreased to limit traffic by an amount specified in the deceleration parameter, which + is a ratio to the ENET_PEER_PACKET_THROTTLE_SCALE constant. When the throttle has + a value of ENET_PEER_PACKET_THROTTLE_SCALE, no unreliable packets are dropped by + ENet, and so 100% of all unreliable packets will be sent. When the throttle has a + value of 0, all unreliable packets are dropped by ENet, and so 0% of all unreliable + packets will be sent. Intermediate values for the throttle represent intermediate + probabilities between 0% and 100% of unreliable packets being sent. The bandwidth + limits of the local and foreign hosts are taken into account to determine a + sensible limit for the throttle probability above which it should not raise even in + the best of conditions. + + @param peer peer to configure + @param interval interval, in milliseconds, over which to measure lowest mean RTT; the default value is ENET_PEER_PACKET_THROTTLE_INTERVAL. + @param acceleration rate at which to increase the throttle probability as mean RTT declines + @param deceleration rate at which to decrease the throttle probability as mean RTT increases +*/ +void +enet_peer_throttle_configure (ENetPeer * peer, enet_uint32 interval, enet_uint32 acceleration, enet_uint32 deceleration) +{ + ENetProtocol command; + + peer -> packetThrottleInterval = interval; + peer -> packetThrottleAcceleration = acceleration; + peer -> packetThrottleDeceleration = deceleration; + + command.header.command = ENET_PROTOCOL_COMMAND_THROTTLE_CONFIGURE | ENET_PROTOCOL_COMMAND_FLAG_ACKNOWLEDGE; + command.header.channelID = 0xFF; + + command.throttleConfigure.packetThrottleInterval = ENET_HOST_TO_NET_32 (interval); + command.throttleConfigure.packetThrottleAcceleration = ENET_HOST_TO_NET_32 (acceleration); + command.throttleConfigure.packetThrottleDeceleration = ENET_HOST_TO_NET_32 (deceleration); + + enet_peer_queue_outgoing_command (peer, & command, NULL, 0, 0); +} + +int +enet_peer_throttle (ENetPeer * peer, enet_uint32 rtt) +{ + if (peer -> lastRoundTripTime <= peer -> lastRoundTripTimeVariance) + { + peer -> packetThrottle = peer -> packetThrottleLimit; + } + else + if (rtt < peer -> lastRoundTripTime) + { + peer -> packetThrottle += peer -> packetThrottleAcceleration; + + if (peer -> packetThrottle > peer -> packetThrottleLimit) + peer -> packetThrottle = peer -> packetThrottleLimit; + + return 1; + } + else + if (rtt > peer -> lastRoundTripTime + 2 * peer -> lastRoundTripTimeVariance) + { + if (peer -> packetThrottle > peer -> packetThrottleDeceleration) + peer -> packetThrottle -= peer -> packetThrottleDeceleration; + else + peer -> packetThrottle = 0; + + return -1; + } + + return 0; +} + +/** Queues a packet to be sent. + @param peer destination for the packet + @param channelID channel on which to send + @param packet packet to send + @retval 0 on success + @retval < 0 on failure +*/ +int +enet_peer_send (ENetPeer * peer, enet_uint8 channelID, ENetPacket * packet) +{ + ENetChannel * channel = & peer -> channels [channelID]; + ENetProtocol command; + size_t fragmentLength; + + if (peer -> state != ENET_PEER_STATE_CONNECTED || + channelID >= peer -> channelCount || + packet -> dataLength > peer -> host -> maximumPacketSize) + return -1; + + fragmentLength = peer -> mtu - sizeof (ENetProtocolHeader) - sizeof (ENetProtocolSendFragment); + if (peer -> host -> checksum != NULL) + fragmentLength -= sizeof(enet_uint32); + + if (packet -> dataLength > fragmentLength) + { + enet_uint32 fragmentCount = (packet -> dataLength + fragmentLength - 1) / fragmentLength, + fragmentNumber, + fragmentOffset; + enet_uint8 commandNumber; + enet_uint16 startSequenceNumber; + ENetList fragments; + ENetOutgoingCommand * fragment; + + if (fragmentCount > ENET_PROTOCOL_MAXIMUM_FRAGMENT_COUNT) + return -1; + + if ((packet -> flags & (ENET_PACKET_FLAG_RELIABLE | ENET_PACKET_FLAG_UNRELIABLE_FRAGMENT)) == ENET_PACKET_FLAG_UNRELIABLE_FRAGMENT && + channel -> outgoingUnreliableSequenceNumber < 0xFFFF) + { + commandNumber = ENET_PROTOCOL_COMMAND_SEND_UNRELIABLE_FRAGMENT; + startSequenceNumber = ENET_HOST_TO_NET_16 (channel -> outgoingUnreliableSequenceNumber + 1); + } + else + { + commandNumber = ENET_PROTOCOL_COMMAND_SEND_FRAGMENT | ENET_PROTOCOL_COMMAND_FLAG_ACKNOWLEDGE; + startSequenceNumber = ENET_HOST_TO_NET_16 (channel -> outgoingReliableSequenceNumber + 1); + } + + enet_list_clear (& fragments); + + for (fragmentNumber = 0, + fragmentOffset = 0; + fragmentOffset < packet -> dataLength; + ++ fragmentNumber, + fragmentOffset += fragmentLength) + { + if (packet -> dataLength - fragmentOffset < fragmentLength) + fragmentLength = packet -> dataLength - fragmentOffset; + + fragment = (ENetOutgoingCommand *) enet_malloc (sizeof (ENetOutgoingCommand)); + if (fragment == NULL) + { + while (! enet_list_empty (& fragments)) + { + fragment = (ENetOutgoingCommand *) enet_list_remove (enet_list_begin (& fragments)); + + enet_free (fragment); + } + + return -1; + } + + fragment -> fragmentOffset = fragmentOffset; + fragment -> fragmentLength = fragmentLength; + fragment -> packet = packet; + fragment -> command.header.command = commandNumber; + fragment -> command.header.channelID = channelID; + fragment -> command.sendFragment.startSequenceNumber = startSequenceNumber; + fragment -> command.sendFragment.dataLength = ENET_HOST_TO_NET_16 (fragmentLength); + fragment -> command.sendFragment.fragmentCount = ENET_HOST_TO_NET_32 (fragmentCount); + fragment -> command.sendFragment.fragmentNumber = ENET_HOST_TO_NET_32 (fragmentNumber); + fragment -> command.sendFragment.totalLength = ENET_HOST_TO_NET_32 (packet -> dataLength); + fragment -> command.sendFragment.fragmentOffset = ENET_NET_TO_HOST_32 (fragmentOffset); + + enet_list_insert (enet_list_end (& fragments), fragment); + } + + packet -> referenceCount += fragmentNumber; + + while (! enet_list_empty (& fragments)) + { + fragment = (ENetOutgoingCommand *) enet_list_remove (enet_list_begin (& fragments)); + + enet_peer_setup_outgoing_command (peer, fragment); + } + + return 0; + } + + command.header.channelID = channelID; + + if ((packet -> flags & (ENET_PACKET_FLAG_RELIABLE | ENET_PACKET_FLAG_UNSEQUENCED)) == ENET_PACKET_FLAG_UNSEQUENCED) + { + command.header.command = ENET_PROTOCOL_COMMAND_SEND_UNSEQUENCED | ENET_PROTOCOL_COMMAND_FLAG_UNSEQUENCED; + command.sendUnsequenced.dataLength = ENET_HOST_TO_NET_16 (packet -> dataLength); + } + else + if (packet -> flags & ENET_PACKET_FLAG_RELIABLE || channel -> outgoingUnreliableSequenceNumber >= 0xFFFF) + { + command.header.command = ENET_PROTOCOL_COMMAND_SEND_RELIABLE | ENET_PROTOCOL_COMMAND_FLAG_ACKNOWLEDGE; + command.sendReliable.dataLength = ENET_HOST_TO_NET_16 (packet -> dataLength); + } + else + { + command.header.command = ENET_PROTOCOL_COMMAND_SEND_UNRELIABLE; + command.sendUnreliable.dataLength = ENET_HOST_TO_NET_16 (packet -> dataLength); + } + + if (enet_peer_queue_outgoing_command (peer, & command, packet, 0, packet -> dataLength) == NULL) + return -1; + + return 0; +} + +/** Attempts to dequeue any incoming queued packet. + @param peer peer to dequeue packets from + @param channelID holds the channel ID of the channel the packet was received on success + @returns a pointer to the packet, or NULL if there are no available incoming queued packets +*/ +ENetPacket * +enet_peer_receive (ENetPeer * peer, enet_uint8 * channelID) +{ + ENetIncomingCommand * incomingCommand; + ENetPacket * packet; + + if (enet_list_empty (& peer -> dispatchedCommands)) + return NULL; + + incomingCommand = (ENetIncomingCommand *) enet_list_remove (enet_list_begin (& peer -> dispatchedCommands)); + + if (channelID != NULL) + * channelID = incomingCommand -> command.header.channelID; + + packet = incomingCommand -> packet; + + -- packet -> referenceCount; + + if (incomingCommand -> fragments != NULL) + enet_free (incomingCommand -> fragments); + + enet_free (incomingCommand); + + peer -> totalWaitingData -= packet -> dataLength; + + return packet; +} + +static void +enet_peer_reset_outgoing_commands (ENetList * queue) +{ + ENetOutgoingCommand * outgoingCommand; + + while (! enet_list_empty (queue)) + { + outgoingCommand = (ENetOutgoingCommand *) enet_list_remove (enet_list_begin (queue)); + + if (outgoingCommand -> packet != NULL) + { + -- outgoingCommand -> packet -> referenceCount; + + if (outgoingCommand -> packet -> referenceCount == 0) + enet_packet_destroy (outgoingCommand -> packet); + } + + enet_free (outgoingCommand); + } +} + +static void +enet_peer_remove_incoming_commands (ENetList * queue, ENetListIterator startCommand, ENetListIterator endCommand) +{ + ENetListIterator currentCommand; + + for (currentCommand = startCommand; currentCommand != endCommand; ) + { + ENetIncomingCommand * incomingCommand = (ENetIncomingCommand *) currentCommand; + + currentCommand = enet_list_next (currentCommand); + + enet_list_remove (& incomingCommand -> incomingCommandList); + + if (incomingCommand -> packet != NULL) + { + -- incomingCommand -> packet -> referenceCount; + + if (incomingCommand -> packet -> referenceCount == 0) + enet_packet_destroy (incomingCommand -> packet); + } + + if (incomingCommand -> fragments != NULL) + enet_free (incomingCommand -> fragments); + + enet_free (incomingCommand); + } +} + +static void +enet_peer_reset_incoming_commands (ENetList * queue) +{ + enet_peer_remove_incoming_commands(queue, enet_list_begin (queue), enet_list_end (queue)); +} + +void +enet_peer_reset_queues (ENetPeer * peer) +{ + ENetChannel * channel; + + if (peer -> needsDispatch) + { + enet_list_remove (& peer -> dispatchList); + + peer -> needsDispatch = 0; + } + + while (! enet_list_empty (& peer -> acknowledgements)) + enet_free (enet_list_remove (enet_list_begin (& peer -> acknowledgements))); + + enet_peer_reset_outgoing_commands (& peer -> sentReliableCommands); + enet_peer_reset_outgoing_commands (& peer -> sentUnreliableCommands); + enet_peer_reset_outgoing_commands (& peer -> outgoingReliableCommands); + enet_peer_reset_outgoing_commands (& peer -> outgoingUnreliableCommands); + enet_peer_reset_incoming_commands (& peer -> dispatchedCommands); + + if (peer -> channels != NULL && peer -> channelCount > 0) + { + for (channel = peer -> channels; + channel < & peer -> channels [peer -> channelCount]; + ++ channel) + { + enet_peer_reset_incoming_commands (& channel -> incomingReliableCommands); + enet_peer_reset_incoming_commands (& channel -> incomingUnreliableCommands); + } + + enet_free (peer -> channels); + } + + peer -> channels = NULL; + peer -> channelCount = 0; +} + +void +enet_peer_on_connect (ENetPeer * peer) +{ + if (peer -> state != ENET_PEER_STATE_CONNECTED && peer -> state != ENET_PEER_STATE_DISCONNECT_LATER) + { + if (peer -> incomingBandwidth != 0) + ++ peer -> host -> bandwidthLimitedPeers; + + ++ peer -> host -> connectedPeers; + } +} + +void +enet_peer_on_disconnect (ENetPeer * peer) +{ + if (peer -> state == ENET_PEER_STATE_CONNECTED || peer -> state == ENET_PEER_STATE_DISCONNECT_LATER) + { + if (peer -> incomingBandwidth != 0) + -- peer -> host -> bandwidthLimitedPeers; + + -- peer -> host -> connectedPeers; + } +} + +/** Forcefully disconnects a peer. + @param peer peer to forcefully disconnect + @remarks The foreign host represented by the peer is not notified of the disconnection and will timeout + on its connection to the local host. +*/ +void +enet_peer_reset (ENetPeer * peer) +{ + enet_peer_on_disconnect (peer); + + peer -> outgoingPeerID = ENET_PROTOCOL_MAXIMUM_PEER_ID; + peer -> connectID = 0; + + peer -> state = ENET_PEER_STATE_DISCONNECTED; + + peer -> incomingBandwidth = 0; + peer -> outgoingBandwidth = 0; + peer -> incomingBandwidthThrottleEpoch = 0; + peer -> outgoingBandwidthThrottleEpoch = 0; + peer -> incomingDataTotal = 0; + peer -> outgoingDataTotal = 0; + peer -> lastSendTime = 0; + peer -> lastReceiveTime = 0; + peer -> nextTimeout = 0; + peer -> earliestTimeout = 0; + peer -> packetLossEpoch = 0; + peer -> packetsSent = 0; + peer -> packetsLost = 0; + peer -> packetLoss = 0; + peer -> packetLossVariance = 0; + peer -> packetThrottle = ENET_PEER_DEFAULT_PACKET_THROTTLE; + peer -> packetThrottleLimit = ENET_PEER_PACKET_THROTTLE_SCALE; + peer -> packetThrottleCounter = 0; + peer -> packetThrottleEpoch = 0; + peer -> packetThrottleAcceleration = ENET_PEER_PACKET_THROTTLE_ACCELERATION; + peer -> packetThrottleDeceleration = ENET_PEER_PACKET_THROTTLE_DECELERATION; + peer -> packetThrottleInterval = ENET_PEER_PACKET_THROTTLE_INTERVAL; + peer -> pingInterval = ENET_PEER_PING_INTERVAL; + peer -> timeoutLimit = ENET_PEER_TIMEOUT_LIMIT; + peer -> timeoutMinimum = ENET_PEER_TIMEOUT_MINIMUM; + peer -> timeoutMaximum = ENET_PEER_TIMEOUT_MAXIMUM; + peer -> lastRoundTripTime = ENET_PEER_DEFAULT_ROUND_TRIP_TIME; + peer -> lowestRoundTripTime = ENET_PEER_DEFAULT_ROUND_TRIP_TIME; + peer -> lastRoundTripTimeVariance = 0; + peer -> highestRoundTripTimeVariance = 0; + peer -> roundTripTime = ENET_PEER_DEFAULT_ROUND_TRIP_TIME; + peer -> roundTripTimeVariance = 0; + peer -> mtu = peer -> host -> mtu; + peer -> reliableDataInTransit = 0; + peer -> outgoingReliableSequenceNumber = 0; + peer -> windowSize = ENET_PROTOCOL_MAXIMUM_WINDOW_SIZE; + peer -> incomingUnsequencedGroup = 0; + peer -> outgoingUnsequencedGroup = 0; + peer -> eventData = 0; + peer -> totalWaitingData = 0; + + memset (peer -> unsequencedWindow, 0, sizeof (peer -> unsequencedWindow)); + + enet_peer_reset_queues (peer); +} + +/** Sends a ping request to a peer. + @param peer destination for the ping request + @remarks ping requests factor into the mean round trip time as designated by the + roundTripTime field in the ENetPeer structure. ENet automatically pings all connected + peers at regular intervals, however, this function may be called to ensure more + frequent ping requests. +*/ +void +enet_peer_ping (ENetPeer * peer) +{ + ENetProtocol command; + + if (peer -> state != ENET_PEER_STATE_CONNECTED) + return; + + command.header.command = ENET_PROTOCOL_COMMAND_PING | ENET_PROTOCOL_COMMAND_FLAG_ACKNOWLEDGE; + command.header.channelID = 0xFF; + + enet_peer_queue_outgoing_command (peer, & command, NULL, 0, 0); +} + +/** Sets the interval at which pings will be sent to a peer. + + Pings are used both to monitor the liveness of the connection and also to dynamically + adjust the throttle during periods of low traffic so that the throttle has reasonable + responsiveness during traffic spikes. + + @param peer the peer to adjust + @param pingInterval the interval at which to send pings; defaults to ENET_PEER_PING_INTERVAL if 0 +*/ +void +enet_peer_ping_interval (ENetPeer * peer, enet_uint32 pingInterval) +{ + peer -> pingInterval = pingInterval ? pingInterval : ENET_PEER_PING_INTERVAL; +} + +/** Sets the timeout parameters for a peer. + + The timeout parameter control how and when a peer will timeout from a failure to acknowledge + reliable traffic. Timeout values use an exponential backoff mechanism, where if a reliable + packet is not acknowledge within some multiple of the average RTT plus a variance tolerance, + the timeout will be doubled until it reaches a set limit. If the timeout is thus at this + limit and reliable packets have been sent but not acknowledged within a certain minimum time + period, the peer will be disconnected. Alternatively, if reliable packets have been sent + but not acknowledged for a certain maximum time period, the peer will be disconnected regardless + of the current timeout limit value. + + @param peer the peer to adjust + @param timeoutLimit the timeout limit; defaults to ENET_PEER_TIMEOUT_LIMIT if 0 + @param timeoutMinimum the timeout minimum; defaults to ENET_PEER_TIMEOUT_MINIMUM if 0 + @param timeoutMaximum the timeout maximum; defaults to ENET_PEER_TIMEOUT_MAXIMUM if 0 +*/ + +void +enet_peer_timeout (ENetPeer * peer, enet_uint32 timeoutLimit, enet_uint32 timeoutMinimum, enet_uint32 timeoutMaximum) +{ + peer -> timeoutLimit = timeoutLimit ? timeoutLimit : ENET_PEER_TIMEOUT_LIMIT; + peer -> timeoutMinimum = timeoutMinimum ? timeoutMinimum : ENET_PEER_TIMEOUT_MINIMUM; + peer -> timeoutMaximum = timeoutMaximum ? timeoutMaximum : ENET_PEER_TIMEOUT_MAXIMUM; +} + +/** Force an immediate disconnection from a peer. + @param peer peer to disconnect + @param data data describing the disconnection + @remarks No ENET_EVENT_DISCONNECT event will be generated. The foreign peer is not + guaranteed to receive the disconnect notification, and is reset immediately upon + return from this function. +*/ +void +enet_peer_disconnect_now (ENetPeer * peer, enet_uint32 data) +{ + ENetProtocol command; + + if (peer -> state == ENET_PEER_STATE_DISCONNECTED) + return; + + if (peer -> state != ENET_PEER_STATE_ZOMBIE && + peer -> state != ENET_PEER_STATE_DISCONNECTING) + { + enet_peer_reset_queues (peer); + + command.header.command = ENET_PROTOCOL_COMMAND_DISCONNECT | ENET_PROTOCOL_COMMAND_FLAG_UNSEQUENCED; + command.header.channelID = 0xFF; + command.disconnect.data = ENET_HOST_TO_NET_32 (data); + + enet_peer_queue_outgoing_command (peer, & command, NULL, 0, 0); + + enet_host_flush (peer -> host); + } + + enet_peer_reset (peer); +} + +/** Request a disconnection from a peer. + @param peer peer to request a disconnection + @param data data describing the disconnection + @remarks An ENET_EVENT_DISCONNECT event will be generated by enet_host_service() + once the disconnection is complete. +*/ +void +enet_peer_disconnect (ENetPeer * peer, enet_uint32 data) +{ + ENetProtocol command; + + if (peer -> state == ENET_PEER_STATE_DISCONNECTING || + peer -> state == ENET_PEER_STATE_DISCONNECTED || + peer -> state == ENET_PEER_STATE_ACKNOWLEDGING_DISCONNECT || + peer -> state == ENET_PEER_STATE_ZOMBIE) + return; + + enet_peer_reset_queues (peer); + + command.header.command = ENET_PROTOCOL_COMMAND_DISCONNECT; + command.header.channelID = 0xFF; + command.disconnect.data = ENET_HOST_TO_NET_32 (data); + + if (peer -> state == ENET_PEER_STATE_CONNECTED || peer -> state == ENET_PEER_STATE_DISCONNECT_LATER) + command.header.command |= ENET_PROTOCOL_COMMAND_FLAG_ACKNOWLEDGE; + else + command.header.command |= ENET_PROTOCOL_COMMAND_FLAG_UNSEQUENCED; + + enet_peer_queue_outgoing_command (peer, & command, NULL, 0, 0); + + if (peer -> state == ENET_PEER_STATE_CONNECTED || peer -> state == ENET_PEER_STATE_DISCONNECT_LATER) + { + enet_peer_on_disconnect (peer); + + peer -> state = ENET_PEER_STATE_DISCONNECTING; + } + else + { + enet_host_flush (peer -> host); + enet_peer_reset (peer); + } +} + +/** Request a disconnection from a peer, but only after all queued outgoing packets are sent. + @param peer peer to request a disconnection + @param data data describing the disconnection + @remarks An ENET_EVENT_DISCONNECT event will be generated by enet_host_service() + once the disconnection is complete. +*/ +void +enet_peer_disconnect_later (ENetPeer * peer, enet_uint32 data) +{ + if ((peer -> state == ENET_PEER_STATE_CONNECTED || peer -> state == ENET_PEER_STATE_DISCONNECT_LATER) && + ! (enet_list_empty (& peer -> outgoingReliableCommands) && + enet_list_empty (& peer -> outgoingUnreliableCommands) && + enet_list_empty (& peer -> sentReliableCommands))) + { + peer -> state = ENET_PEER_STATE_DISCONNECT_LATER; + peer -> eventData = data; + } + else + enet_peer_disconnect (peer, data); +} + +ENetAcknowledgement * +enet_peer_queue_acknowledgement (ENetPeer * peer, const ENetProtocol * command, enet_uint16 sentTime) +{ + ENetAcknowledgement * acknowledgement; + + if (command -> header.channelID < peer -> channelCount) + { + ENetChannel * channel = & peer -> channels [command -> header.channelID]; + enet_uint16 reliableWindow = command -> header.reliableSequenceNumber / ENET_PEER_RELIABLE_WINDOW_SIZE, + currentWindow = channel -> incomingReliableSequenceNumber / ENET_PEER_RELIABLE_WINDOW_SIZE; + + if (command -> header.reliableSequenceNumber < channel -> incomingReliableSequenceNumber) + reliableWindow += ENET_PEER_RELIABLE_WINDOWS; + + if (reliableWindow >= currentWindow + ENET_PEER_FREE_RELIABLE_WINDOWS - 1 && reliableWindow <= currentWindow + ENET_PEER_FREE_RELIABLE_WINDOWS) + return NULL; + } + + acknowledgement = (ENetAcknowledgement *) enet_malloc (sizeof (ENetAcknowledgement)); + if (acknowledgement == NULL) + return NULL; + + peer -> outgoingDataTotal += sizeof (ENetProtocolAcknowledge); + + acknowledgement -> sentTime = sentTime; + acknowledgement -> command = * command; + + enet_list_insert (enet_list_end (& peer -> acknowledgements), acknowledgement); + + return acknowledgement; +} + +void +enet_peer_setup_outgoing_command (ENetPeer * peer, ENetOutgoingCommand * outgoingCommand) +{ + ENetChannel * channel = & peer -> channels [outgoingCommand -> command.header.channelID]; + + peer -> outgoingDataTotal += enet_protocol_command_size (outgoingCommand -> command.header.command) + outgoingCommand -> fragmentLength; + + if (outgoingCommand -> command.header.channelID == 0xFF) + { + ++ peer -> outgoingReliableSequenceNumber; + + outgoingCommand -> reliableSequenceNumber = peer -> outgoingReliableSequenceNumber; + outgoingCommand -> unreliableSequenceNumber = 0; + } + else + if (outgoingCommand -> command.header.command & ENET_PROTOCOL_COMMAND_FLAG_ACKNOWLEDGE) + { + ++ channel -> outgoingReliableSequenceNumber; + channel -> outgoingUnreliableSequenceNumber = 0; + + outgoingCommand -> reliableSequenceNumber = channel -> outgoingReliableSequenceNumber; + outgoingCommand -> unreliableSequenceNumber = 0; + } + else + if (outgoingCommand -> command.header.command & ENET_PROTOCOL_COMMAND_FLAG_UNSEQUENCED) + { + ++ peer -> outgoingUnsequencedGroup; + + outgoingCommand -> reliableSequenceNumber = 0; + outgoingCommand -> unreliableSequenceNumber = 0; + } + else + { + if (outgoingCommand -> fragmentOffset == 0) + ++ channel -> outgoingUnreliableSequenceNumber; + + outgoingCommand -> reliableSequenceNumber = channel -> outgoingReliableSequenceNumber; + outgoingCommand -> unreliableSequenceNumber = channel -> outgoingUnreliableSequenceNumber; + } + + outgoingCommand -> sendAttempts = 0; + outgoingCommand -> sentTime = 0; + outgoingCommand -> roundTripTimeout = 0; + outgoingCommand -> roundTripTimeoutLimit = 0; + outgoingCommand -> command.header.reliableSequenceNumber = ENET_HOST_TO_NET_16 (outgoingCommand -> reliableSequenceNumber); + + switch (outgoingCommand -> command.header.command & ENET_PROTOCOL_COMMAND_MASK) + { + case ENET_PROTOCOL_COMMAND_SEND_UNRELIABLE: + outgoingCommand -> command.sendUnreliable.unreliableSequenceNumber = ENET_HOST_TO_NET_16 (outgoingCommand -> unreliableSequenceNumber); + break; + + case ENET_PROTOCOL_COMMAND_SEND_UNSEQUENCED: + outgoingCommand -> command.sendUnsequenced.unsequencedGroup = ENET_HOST_TO_NET_16 (peer -> outgoingUnsequencedGroup); + break; + + default: + break; + } + + if (outgoingCommand -> command.header.command & ENET_PROTOCOL_COMMAND_FLAG_ACKNOWLEDGE) + enet_list_insert (enet_list_end (& peer -> outgoingReliableCommands), outgoingCommand); + else + enet_list_insert (enet_list_end (& peer -> outgoingUnreliableCommands), outgoingCommand); +} + +ENetOutgoingCommand * +enet_peer_queue_outgoing_command (ENetPeer * peer, const ENetProtocol * command, ENetPacket * packet, enet_uint32 offset, enet_uint16 length) +{ + ENetOutgoingCommand * outgoingCommand = (ENetOutgoingCommand *) enet_malloc (sizeof (ENetOutgoingCommand)); + if (outgoingCommand == NULL) + return NULL; + + outgoingCommand -> command = * command; + outgoingCommand -> fragmentOffset = offset; + outgoingCommand -> fragmentLength = length; + outgoingCommand -> packet = packet; + if (packet != NULL) + ++ packet -> referenceCount; + + enet_peer_setup_outgoing_command (peer, outgoingCommand); + + return outgoingCommand; +} + +void +enet_peer_dispatch_incoming_unreliable_commands (ENetPeer * peer, ENetChannel * channel) +{ + ENetListIterator droppedCommand, startCommand, currentCommand; + + for (droppedCommand = startCommand = currentCommand = enet_list_begin (& channel -> incomingUnreliableCommands); + currentCommand != enet_list_end (& channel -> incomingUnreliableCommands); + currentCommand = enet_list_next (currentCommand)) + { + ENetIncomingCommand * incomingCommand = (ENetIncomingCommand *) currentCommand; + + if ((incomingCommand -> command.header.command & ENET_PROTOCOL_COMMAND_MASK) == ENET_PROTOCOL_COMMAND_SEND_UNSEQUENCED) + continue; + + if (incomingCommand -> reliableSequenceNumber == channel -> incomingReliableSequenceNumber) + { + if (incomingCommand -> fragmentsRemaining <= 0) + { + channel -> incomingUnreliableSequenceNumber = incomingCommand -> unreliableSequenceNumber; + continue; + } + + if (startCommand != currentCommand) + { + enet_list_move (enet_list_end (& peer -> dispatchedCommands), startCommand, enet_list_previous (currentCommand)); + + if (! peer -> needsDispatch) + { + enet_list_insert (enet_list_end (& peer -> host -> dispatchQueue), & peer -> dispatchList); + + peer -> needsDispatch = 1; + } + + droppedCommand = currentCommand; + } + else + if (droppedCommand != currentCommand) + droppedCommand = enet_list_previous (currentCommand); + } + else + { + enet_uint16 reliableWindow = incomingCommand -> reliableSequenceNumber / ENET_PEER_RELIABLE_WINDOW_SIZE, + currentWindow = channel -> incomingReliableSequenceNumber / ENET_PEER_RELIABLE_WINDOW_SIZE; + if (incomingCommand -> reliableSequenceNumber < channel -> incomingReliableSequenceNumber) + reliableWindow += ENET_PEER_RELIABLE_WINDOWS; + if (reliableWindow >= currentWindow && reliableWindow < currentWindow + ENET_PEER_FREE_RELIABLE_WINDOWS - 1) + break; + + droppedCommand = enet_list_next (currentCommand); + + if (startCommand != currentCommand) + { + enet_list_move (enet_list_end (& peer -> dispatchedCommands), startCommand, enet_list_previous (currentCommand)); + + if (! peer -> needsDispatch) + { + enet_list_insert (enet_list_end (& peer -> host -> dispatchQueue), & peer -> dispatchList); + + peer -> needsDispatch = 1; + } + } + } + + startCommand = enet_list_next (currentCommand); + } + + if (startCommand != currentCommand) + { + enet_list_move (enet_list_end (& peer -> dispatchedCommands), startCommand, enet_list_previous (currentCommand)); + + if (! peer -> needsDispatch) + { + enet_list_insert (enet_list_end (& peer -> host -> dispatchQueue), & peer -> dispatchList); + + peer -> needsDispatch = 1; + } + + droppedCommand = currentCommand; + } + + enet_peer_remove_incoming_commands (& channel -> incomingUnreliableCommands, enet_list_begin (& channel -> incomingUnreliableCommands), droppedCommand); +} + +void +enet_peer_dispatch_incoming_reliable_commands (ENetPeer * peer, ENetChannel * channel) +{ + ENetListIterator currentCommand; + + for (currentCommand = enet_list_begin (& channel -> incomingReliableCommands); + currentCommand != enet_list_end (& channel -> incomingReliableCommands); + currentCommand = enet_list_next (currentCommand)) + { + ENetIncomingCommand * incomingCommand = (ENetIncomingCommand *) currentCommand; + + if (incomingCommand -> fragmentsRemaining > 0 || + incomingCommand -> reliableSequenceNumber != (enet_uint16) (channel -> incomingReliableSequenceNumber + 1)) + break; + + channel -> incomingReliableSequenceNumber = incomingCommand -> reliableSequenceNumber; + + if (incomingCommand -> fragmentCount > 0) + channel -> incomingReliableSequenceNumber += incomingCommand -> fragmentCount - 1; + } + + if (currentCommand == enet_list_begin (& channel -> incomingReliableCommands)) + return; + + channel -> incomingUnreliableSequenceNumber = 0; + + enet_list_move (enet_list_end (& peer -> dispatchedCommands), enet_list_begin (& channel -> incomingReliableCommands), enet_list_previous (currentCommand)); + + if (! peer -> needsDispatch) + { + enet_list_insert (enet_list_end (& peer -> host -> dispatchQueue), & peer -> dispatchList); + + peer -> needsDispatch = 1; + } + + if (! enet_list_empty (& channel -> incomingUnreliableCommands)) + enet_peer_dispatch_incoming_unreliable_commands (peer, channel); +} + +ENetIncomingCommand * +enet_peer_queue_incoming_command (ENetPeer * peer, const ENetProtocol * command, const void * data, size_t dataLength, enet_uint32 flags, enet_uint32 fragmentCount) +{ + static ENetIncomingCommand dummyCommand; + + ENetChannel * channel = & peer -> channels [command -> header.channelID]; + enet_uint32 unreliableSequenceNumber = 0, reliableSequenceNumber = 0; + enet_uint16 reliableWindow, currentWindow; + ENetIncomingCommand * incomingCommand; + ENetListIterator currentCommand; + ENetPacket * packet = NULL; + + if (peer -> state == ENET_PEER_STATE_DISCONNECT_LATER) + goto discardCommand; + + if ((command -> header.command & ENET_PROTOCOL_COMMAND_MASK) != ENET_PROTOCOL_COMMAND_SEND_UNSEQUENCED) + { + reliableSequenceNumber = command -> header.reliableSequenceNumber; + reliableWindow = reliableSequenceNumber / ENET_PEER_RELIABLE_WINDOW_SIZE; + currentWindow = channel -> incomingReliableSequenceNumber / ENET_PEER_RELIABLE_WINDOW_SIZE; + + if (reliableSequenceNumber < channel -> incomingReliableSequenceNumber) + reliableWindow += ENET_PEER_RELIABLE_WINDOWS; + + if (reliableWindow < currentWindow || reliableWindow >= currentWindow + ENET_PEER_FREE_RELIABLE_WINDOWS - 1) + goto discardCommand; + } + + switch (command -> header.command & ENET_PROTOCOL_COMMAND_MASK) + { + case ENET_PROTOCOL_COMMAND_SEND_FRAGMENT: + case ENET_PROTOCOL_COMMAND_SEND_RELIABLE: + if (reliableSequenceNumber == channel -> incomingReliableSequenceNumber) + goto discardCommand; + + for (currentCommand = enet_list_previous (enet_list_end (& channel -> incomingReliableCommands)); + currentCommand != enet_list_end (& channel -> incomingReliableCommands); + currentCommand = enet_list_previous (currentCommand)) + { + incomingCommand = (ENetIncomingCommand *) currentCommand; + + if (reliableSequenceNumber >= channel -> incomingReliableSequenceNumber) + { + if (incomingCommand -> reliableSequenceNumber < channel -> incomingReliableSequenceNumber) + continue; + } + else + if (incomingCommand -> reliableSequenceNumber >= channel -> incomingReliableSequenceNumber) + break; + + if (incomingCommand -> reliableSequenceNumber <= reliableSequenceNumber) + { + if (incomingCommand -> reliableSequenceNumber < reliableSequenceNumber) + break; + + goto discardCommand; + } + } + break; + + case ENET_PROTOCOL_COMMAND_SEND_UNRELIABLE: + case ENET_PROTOCOL_COMMAND_SEND_UNRELIABLE_FRAGMENT: + unreliableSequenceNumber = ENET_NET_TO_HOST_16 (command -> sendUnreliable.unreliableSequenceNumber); + + if (reliableSequenceNumber == channel -> incomingReliableSequenceNumber && + unreliableSequenceNumber <= channel -> incomingUnreliableSequenceNumber) + goto discardCommand; + + for (currentCommand = enet_list_previous (enet_list_end (& channel -> incomingUnreliableCommands)); + currentCommand != enet_list_end (& channel -> incomingUnreliableCommands); + currentCommand = enet_list_previous (currentCommand)) + { + incomingCommand = (ENetIncomingCommand *) currentCommand; + + if ((command -> header.command & ENET_PROTOCOL_COMMAND_MASK) == ENET_PROTOCOL_COMMAND_SEND_UNSEQUENCED) + continue; + + if (reliableSequenceNumber >= channel -> incomingReliableSequenceNumber) + { + if (incomingCommand -> reliableSequenceNumber < channel -> incomingReliableSequenceNumber) + continue; + } + else + if (incomingCommand -> reliableSequenceNumber >= channel -> incomingReliableSequenceNumber) + break; + + if (incomingCommand -> reliableSequenceNumber < reliableSequenceNumber) + break; + + if (incomingCommand -> reliableSequenceNumber > reliableSequenceNumber) + continue; + + if (incomingCommand -> unreliableSequenceNumber <= unreliableSequenceNumber) + { + if (incomingCommand -> unreliableSequenceNumber < unreliableSequenceNumber) + break; + + goto discardCommand; + } + } + break; + + case ENET_PROTOCOL_COMMAND_SEND_UNSEQUENCED: + currentCommand = enet_list_end (& channel -> incomingUnreliableCommands); + break; + + default: + goto discardCommand; + } + + if (peer -> totalWaitingData >= peer -> host -> maximumWaitingData) + goto notifyError; + + packet = enet_packet_create (data, dataLength, flags); + if (packet == NULL) + goto notifyError; + + incomingCommand = (ENetIncomingCommand *) enet_malloc (sizeof (ENetIncomingCommand)); + if (incomingCommand == NULL) + goto notifyError; + + incomingCommand -> reliableSequenceNumber = command -> header.reliableSequenceNumber; + incomingCommand -> unreliableSequenceNumber = unreliableSequenceNumber & 0xFFFF; + incomingCommand -> command = * command; + incomingCommand -> fragmentCount = fragmentCount; + incomingCommand -> fragmentsRemaining = fragmentCount; + incomingCommand -> packet = packet; + incomingCommand -> fragments = NULL; + + if (fragmentCount > 0) + { + if (fragmentCount <= ENET_PROTOCOL_MAXIMUM_FRAGMENT_COUNT) + incomingCommand -> fragments = (enet_uint32 *) enet_malloc ((fragmentCount + 31) / 32 * sizeof (enet_uint32)); + if (incomingCommand -> fragments == NULL) + { + enet_free (incomingCommand); + + goto notifyError; + } + memset (incomingCommand -> fragments, 0, (fragmentCount + 31) / 32 * sizeof (enet_uint32)); + } + + if (packet != NULL) + { + ++ packet -> referenceCount; + + peer -> totalWaitingData += packet -> dataLength; + } + + enet_list_insert (enet_list_next (currentCommand), incomingCommand); + + switch (command -> header.command & ENET_PROTOCOL_COMMAND_MASK) + { + case ENET_PROTOCOL_COMMAND_SEND_FRAGMENT: + case ENET_PROTOCOL_COMMAND_SEND_RELIABLE: + enet_peer_dispatch_incoming_reliable_commands (peer, channel); + break; + + default: + enet_peer_dispatch_incoming_unreliable_commands (peer, channel); + break; + } + + return incomingCommand; + +discardCommand: + if (fragmentCount > 0) + goto notifyError; + + if (packet != NULL && packet -> referenceCount == 0) + enet_packet_destroy (packet); + + return & dummyCommand; + +notifyError: + if (packet != NULL && packet -> referenceCount == 0) + enet_packet_destroy (packet); + + return NULL; +} + +/** @} */ diff --git a/enet server test/enet2/premake4.lua b/enet server test/enet2/premake4.lua new file mode 100644 index 0000000..0e6e7ad --- /dev/null +++ b/enet server test/enet2/premake4.lua @@ -0,0 +1,59 @@ +solution "enet" + configurations { "Debug", "Release" } + platforms { "x32", "x64" } + + project "enet_static" + kind "StaticLib" + language "C" + + files { "*.c" } + + includedirs { "include/" } + + configuration "Debug" + targetsuffix "d" + + defines({ "DEBUG" }) + + flags { "Symbols" } + + configuration "Release" + defines({ "NDEBUG" }) + + flags { "Optimize" } + + configuration { "Debug", "x64" } + targetsuffix "64d" + + configuration { "Release", "x64" } + targetsuffix "64" + + project "enet" + kind "SharedLib" + language "C" + + files { "*.c" } + + includedirs { "include/" } + + defines({"ENET_DLL=1" }) + + configuration "Debug" + targetsuffix "d" + + defines({ "DEBUG" }) + + flags { "Symbols" } + + configuration "Release" + defines({ "NDEBUG" }) + + flags { "Optimize" } + + configuration { "Debug", "x64" } + targetsuffix "64d" + + configuration { "Release", "x64" } + targetsuffix "64" + + \ No newline at end of file diff --git a/enet server test/enet2/protocol.c b/enet server test/enet2/protocol.c new file mode 100644 index 0000000..29d6487 --- /dev/null +++ b/enet server test/enet2/protocol.c @@ -0,0 +1,1913 @@ +/** + @file protocol.c + @brief ENet protocol functions +*/ +#include +#include +#define ENET_BUILDING_LIB 1 +#include "enet/utility.h" +#include "enet/time.h" +#include "enet/enet.h" + +static size_t commandSizes [ENET_PROTOCOL_COMMAND_COUNT] = +{ + 0, + sizeof (ENetProtocolAcknowledge), + sizeof (ENetProtocolConnect), + sizeof (ENetProtocolVerifyConnect), + sizeof (ENetProtocolDisconnect), + sizeof (ENetProtocolPing), + sizeof (ENetProtocolSendReliable), + sizeof (ENetProtocolSendUnreliable), + sizeof (ENetProtocolSendFragment), + sizeof (ENetProtocolSendUnsequenced), + sizeof (ENetProtocolBandwidthLimit), + sizeof (ENetProtocolThrottleConfigure), + sizeof (ENetProtocolSendFragment) +}; + +size_t +enet_protocol_command_size (enet_uint8 commandNumber) +{ + return commandSizes [commandNumber & ENET_PROTOCOL_COMMAND_MASK]; +} + +static void +enet_protocol_change_state (ENetHost * host, ENetPeer * peer, ENetPeerState state) +{ + if (state == ENET_PEER_STATE_CONNECTED || state == ENET_PEER_STATE_DISCONNECT_LATER) + enet_peer_on_connect (peer); + else + enet_peer_on_disconnect (peer); + + peer -> state = state; +} + +static void +enet_protocol_dispatch_state (ENetHost * host, ENetPeer * peer, ENetPeerState state) +{ + enet_protocol_change_state (host, peer, state); + + if (! peer -> needsDispatch) + { + enet_list_insert (enet_list_end (& host -> dispatchQueue), & peer -> dispatchList); + + peer -> needsDispatch = 1; + } +} + +static int +enet_protocol_dispatch_incoming_commands (ENetHost * host, ENetEvent * event) +{ + while (! enet_list_empty (& host -> dispatchQueue)) + { + ENetPeer * peer = (ENetPeer *) enet_list_remove (enet_list_begin (& host -> dispatchQueue)); + + peer -> needsDispatch = 0; + + switch (peer -> state) + { + case ENET_PEER_STATE_CONNECTION_PENDING: + case ENET_PEER_STATE_CONNECTION_SUCCEEDED: + enet_protocol_change_state (host, peer, ENET_PEER_STATE_CONNECTED); + + event -> type = ENET_EVENT_TYPE_CONNECT; + event -> peer = peer; + event -> data = peer -> eventData; + + return 1; + + case ENET_PEER_STATE_ZOMBIE: + host -> recalculateBandwidthLimits = 1; + + event -> type = ENET_EVENT_TYPE_DISCONNECT; + event -> peer = peer; + event -> data = peer -> eventData; + + enet_peer_reset (peer); + + return 1; + + case ENET_PEER_STATE_CONNECTED: + if (enet_list_empty (& peer -> dispatchedCommands)) + continue; + + event -> packet = enet_peer_receive (peer, & event -> channelID); + if (event -> packet == NULL) + continue; + + event -> type = ENET_EVENT_TYPE_RECEIVE; + event -> peer = peer; + + if (! enet_list_empty (& peer -> dispatchedCommands)) + { + peer -> needsDispatch = 1; + + enet_list_insert (enet_list_end (& host -> dispatchQueue), & peer -> dispatchList); + } + + return 1; + + default: + break; + } + } + + return 0; +} + +static void +enet_protocol_notify_connect (ENetHost * host, ENetPeer * peer, ENetEvent * event) +{ + host -> recalculateBandwidthLimits = 1; + + if (event != NULL) + { + enet_protocol_change_state (host, peer, ENET_PEER_STATE_CONNECTED); + + event -> type = ENET_EVENT_TYPE_CONNECT; + event -> peer = peer; + event -> data = peer -> eventData; + } + else + enet_protocol_dispatch_state (host, peer, peer -> state == ENET_PEER_STATE_CONNECTING ? ENET_PEER_STATE_CONNECTION_SUCCEEDED : ENET_PEER_STATE_CONNECTION_PENDING); +} + +static void +enet_protocol_notify_disconnect (ENetHost * host, ENetPeer * peer, ENetEvent * event) +{ + if (peer -> state >= ENET_PEER_STATE_CONNECTION_PENDING) + host -> recalculateBandwidthLimits = 1; + + if (peer -> state != ENET_PEER_STATE_CONNECTING && peer -> state < ENET_PEER_STATE_CONNECTION_SUCCEEDED) + enet_peer_reset (peer); + else + if (event != NULL) + { + event -> type = ENET_EVENT_TYPE_DISCONNECT; + event -> peer = peer; + event -> data = 0; + + enet_peer_reset (peer); + } + else + { + peer -> eventData = 0; + + enet_protocol_dispatch_state (host, peer, ENET_PEER_STATE_ZOMBIE); + } +} + +static void +enet_protocol_remove_sent_unreliable_commands (ENetPeer * peer) +{ + ENetOutgoingCommand * outgoingCommand; + + while (! enet_list_empty (& peer -> sentUnreliableCommands)) + { + outgoingCommand = (ENetOutgoingCommand *) enet_list_front (& peer -> sentUnreliableCommands); + + enet_list_remove (& outgoingCommand -> outgoingCommandList); + + if (outgoingCommand -> packet != NULL) + { + -- outgoingCommand -> packet -> referenceCount; + + if (outgoingCommand -> packet -> referenceCount == 0) + { + outgoingCommand -> packet -> flags |= ENET_PACKET_FLAG_SENT; + + enet_packet_destroy (outgoingCommand -> packet); + } + } + + enet_free (outgoingCommand); + } +} + +static ENetProtocolCommand +enet_protocol_remove_sent_reliable_command (ENetPeer * peer, enet_uint16 reliableSequenceNumber, enet_uint8 channelID) +{ + ENetOutgoingCommand * outgoingCommand = NULL; + ENetListIterator currentCommand; + ENetProtocolCommand commandNumber; + int wasSent = 1; + + for (currentCommand = enet_list_begin (& peer -> sentReliableCommands); + currentCommand != enet_list_end (& peer -> sentReliableCommands); + currentCommand = enet_list_next (currentCommand)) + { + outgoingCommand = (ENetOutgoingCommand *) currentCommand; + + if (outgoingCommand -> reliableSequenceNumber == reliableSequenceNumber && + outgoingCommand -> command.header.channelID == channelID) + break; + } + + if (currentCommand == enet_list_end (& peer -> sentReliableCommands)) + { + for (currentCommand = enet_list_begin (& peer -> outgoingReliableCommands); + currentCommand != enet_list_end (& peer -> outgoingReliableCommands); + currentCommand = enet_list_next (currentCommand)) + { + outgoingCommand = (ENetOutgoingCommand *) currentCommand; + + if (outgoingCommand -> sendAttempts < 1) return ENET_PROTOCOL_COMMAND_NONE; + + if (outgoingCommand -> reliableSequenceNumber == reliableSequenceNumber && + outgoingCommand -> command.header.channelID == channelID) + break; + } + + if (currentCommand == enet_list_end (& peer -> outgoingReliableCommands)) + return ENET_PROTOCOL_COMMAND_NONE; + + wasSent = 0; + } + + if (outgoingCommand == NULL) + return ENET_PROTOCOL_COMMAND_NONE; + + if (channelID < peer -> channelCount) + { + ENetChannel * channel = & peer -> channels [channelID]; + enet_uint16 reliableWindow = reliableSequenceNumber / ENET_PEER_RELIABLE_WINDOW_SIZE; + if (channel -> reliableWindows [reliableWindow] > 0) + { + -- channel -> reliableWindows [reliableWindow]; + if (! channel -> reliableWindows [reliableWindow]) + channel -> usedReliableWindows &= ~ (1 << reliableWindow); + } + } + + commandNumber = (ENetProtocolCommand) (outgoingCommand -> command.header.command & ENET_PROTOCOL_COMMAND_MASK); + + enet_list_remove (& outgoingCommand -> outgoingCommandList); + + if (outgoingCommand -> packet != NULL) + { + if (wasSent) + peer -> reliableDataInTransit -= outgoingCommand -> fragmentLength; + + -- outgoingCommand -> packet -> referenceCount; + + if (outgoingCommand -> packet -> referenceCount == 0) + { + outgoingCommand -> packet -> flags |= ENET_PACKET_FLAG_SENT; + + enet_packet_destroy (outgoingCommand -> packet); + } + } + + enet_free (outgoingCommand); + + if (enet_list_empty (& peer -> sentReliableCommands)) + return commandNumber; + + outgoingCommand = (ENetOutgoingCommand *) enet_list_front (& peer -> sentReliableCommands); + + peer -> nextTimeout = outgoingCommand -> sentTime + outgoingCommand -> roundTripTimeout; + + return commandNumber; +} + +static ENetPeer * +enet_protocol_handle_connect (ENetHost * host, ENetProtocolHeader * header, ENetProtocol * command) +{ + enet_uint8 incomingSessionID, outgoingSessionID; + enet_uint32 mtu, windowSize; + ENetChannel * channel; + size_t channelCount, duplicatePeers = 0; + ENetPeer * currentPeer, * peer = NULL; + ENetProtocol verifyCommand; + + channelCount = ENET_NET_TO_HOST_32 (command -> connect.channelCount); + + if (channelCount < ENET_PROTOCOL_MINIMUM_CHANNEL_COUNT || + channelCount > ENET_PROTOCOL_MAXIMUM_CHANNEL_COUNT) + return NULL; + + for (currentPeer = host -> peers; + currentPeer < & host -> peers [host -> peerCount]; + ++ currentPeer) + { + if (currentPeer -> state == ENET_PEER_STATE_DISCONNECTED) + { + if (peer == NULL) + peer = currentPeer; + } + else + if (currentPeer -> state != ENET_PEER_STATE_CONNECTING && + currentPeer -> address.host == host -> receivedAddress.host) + { + if (currentPeer -> address.port == host -> receivedAddress.port && + currentPeer -> connectID == command -> connect.connectID) + return NULL; + + ++ duplicatePeers; + } + } + + if (peer == NULL || duplicatePeers >= host -> duplicatePeers) + return NULL; + + if (channelCount > host -> channelLimit) + channelCount = host -> channelLimit; + peer -> channels = (ENetChannel *) enet_malloc (channelCount * sizeof (ENetChannel)); + if (peer -> channels == NULL) + return NULL; + peer -> channelCount = channelCount; + peer -> state = ENET_PEER_STATE_ACKNOWLEDGING_CONNECT; + peer -> connectID = command -> connect.connectID; + peer -> address = host -> receivedAddress; + peer -> outgoingPeerID = ENET_NET_TO_HOST_16 (command -> connect.outgoingPeerID); + peer -> incomingBandwidth = ENET_NET_TO_HOST_32 (command -> connect.incomingBandwidth); + peer -> outgoingBandwidth = ENET_NET_TO_HOST_32 (command -> connect.outgoingBandwidth); + peer -> packetThrottleInterval = ENET_NET_TO_HOST_32 (command -> connect.packetThrottleInterval); + peer -> packetThrottleAcceleration = ENET_NET_TO_HOST_32 (command -> connect.packetThrottleAcceleration); + peer -> packetThrottleDeceleration = ENET_NET_TO_HOST_32 (command -> connect.packetThrottleDeceleration); + peer -> eventData = ENET_NET_TO_HOST_32 (command -> connect.data); + + incomingSessionID = command -> connect.incomingSessionID == 0xFF ? peer -> outgoingSessionID : command -> connect.incomingSessionID; + incomingSessionID = (incomingSessionID + 1) & (ENET_PROTOCOL_HEADER_SESSION_MASK >> ENET_PROTOCOL_HEADER_SESSION_SHIFT); + if (incomingSessionID == peer -> outgoingSessionID) + incomingSessionID = (incomingSessionID + 1) & (ENET_PROTOCOL_HEADER_SESSION_MASK >> ENET_PROTOCOL_HEADER_SESSION_SHIFT); + peer -> outgoingSessionID = incomingSessionID; + + outgoingSessionID = command -> connect.outgoingSessionID == 0xFF ? peer -> incomingSessionID : command -> connect.outgoingSessionID; + outgoingSessionID = (outgoingSessionID + 1) & (ENET_PROTOCOL_HEADER_SESSION_MASK >> ENET_PROTOCOL_HEADER_SESSION_SHIFT); + if (outgoingSessionID == peer -> incomingSessionID) + outgoingSessionID = (outgoingSessionID + 1) & (ENET_PROTOCOL_HEADER_SESSION_MASK >> ENET_PROTOCOL_HEADER_SESSION_SHIFT); + peer -> incomingSessionID = outgoingSessionID; + + for (channel = peer -> channels; + channel < & peer -> channels [channelCount]; + ++ channel) + { + channel -> outgoingReliableSequenceNumber = 0; + channel -> outgoingUnreliableSequenceNumber = 0; + channel -> incomingReliableSequenceNumber = 0; + channel -> incomingUnreliableSequenceNumber = 0; + + enet_list_clear (& channel -> incomingReliableCommands); + enet_list_clear (& channel -> incomingUnreliableCommands); + + channel -> usedReliableWindows = 0; + memset (channel -> reliableWindows, 0, sizeof (channel -> reliableWindows)); + } + + mtu = ENET_NET_TO_HOST_32 (command -> connect.mtu); + + if (mtu < ENET_PROTOCOL_MINIMUM_MTU) + mtu = ENET_PROTOCOL_MINIMUM_MTU; + else + if (mtu > ENET_PROTOCOL_MAXIMUM_MTU) + mtu = ENET_PROTOCOL_MAXIMUM_MTU; + + peer -> mtu = mtu; + + if (host -> outgoingBandwidth == 0 && + peer -> incomingBandwidth == 0) + peer -> windowSize = ENET_PROTOCOL_MAXIMUM_WINDOW_SIZE; + else + if (host -> outgoingBandwidth == 0 || + peer -> incomingBandwidth == 0) + peer -> windowSize = (ENET_MAX (host -> outgoingBandwidth, peer -> incomingBandwidth) / + ENET_PEER_WINDOW_SIZE_SCALE) * + ENET_PROTOCOL_MINIMUM_WINDOW_SIZE; + else + peer -> windowSize = (ENET_MIN (host -> outgoingBandwidth, peer -> incomingBandwidth) / + ENET_PEER_WINDOW_SIZE_SCALE) * + ENET_PROTOCOL_MINIMUM_WINDOW_SIZE; + + if (peer -> windowSize < ENET_PROTOCOL_MINIMUM_WINDOW_SIZE) + peer -> windowSize = ENET_PROTOCOL_MINIMUM_WINDOW_SIZE; + else + if (peer -> windowSize > ENET_PROTOCOL_MAXIMUM_WINDOW_SIZE) + peer -> windowSize = ENET_PROTOCOL_MAXIMUM_WINDOW_SIZE; + + if (host -> incomingBandwidth == 0) + windowSize = ENET_PROTOCOL_MAXIMUM_WINDOW_SIZE; + else + windowSize = (host -> incomingBandwidth / ENET_PEER_WINDOW_SIZE_SCALE) * + ENET_PROTOCOL_MINIMUM_WINDOW_SIZE; + + if (windowSize > ENET_NET_TO_HOST_32 (command -> connect.windowSize)) + windowSize = ENET_NET_TO_HOST_32 (command -> connect.windowSize); + + if (windowSize < ENET_PROTOCOL_MINIMUM_WINDOW_SIZE) + windowSize = ENET_PROTOCOL_MINIMUM_WINDOW_SIZE; + else + if (windowSize > ENET_PROTOCOL_MAXIMUM_WINDOW_SIZE) + windowSize = ENET_PROTOCOL_MAXIMUM_WINDOW_SIZE; + + verifyCommand.header.command = ENET_PROTOCOL_COMMAND_VERIFY_CONNECT | ENET_PROTOCOL_COMMAND_FLAG_ACKNOWLEDGE; + verifyCommand.header.channelID = 0xFF; + verifyCommand.verifyConnect.outgoingPeerID = ENET_HOST_TO_NET_16 (peer -> incomingPeerID); + verifyCommand.verifyConnect.incomingSessionID = incomingSessionID; + verifyCommand.verifyConnect.outgoingSessionID = outgoingSessionID; + verifyCommand.verifyConnect.mtu = ENET_HOST_TO_NET_32 (peer -> mtu); + verifyCommand.verifyConnect.windowSize = ENET_HOST_TO_NET_32 (windowSize); + verifyCommand.verifyConnect.channelCount = ENET_HOST_TO_NET_32 (channelCount); + verifyCommand.verifyConnect.incomingBandwidth = ENET_HOST_TO_NET_32 (host -> incomingBandwidth); + verifyCommand.verifyConnect.outgoingBandwidth = ENET_HOST_TO_NET_32 (host -> outgoingBandwidth); + verifyCommand.verifyConnect.packetThrottleInterval = ENET_HOST_TO_NET_32 (peer -> packetThrottleInterval); + verifyCommand.verifyConnect.packetThrottleAcceleration = ENET_HOST_TO_NET_32 (peer -> packetThrottleAcceleration); + verifyCommand.verifyConnect.packetThrottleDeceleration = ENET_HOST_TO_NET_32 (peer -> packetThrottleDeceleration); + verifyCommand.verifyConnect.connectID = peer -> connectID; + + enet_peer_queue_outgoing_command (peer, & verifyCommand, NULL, 0, 0); + + return peer; +} + +static int +enet_protocol_handle_send_reliable (ENetHost * host, ENetPeer * peer, const ENetProtocol * command, enet_uint8 ** currentData) +{ + size_t dataLength; + + if (command -> header.channelID >= peer -> channelCount || + (peer -> state != ENET_PEER_STATE_CONNECTED && peer -> state != ENET_PEER_STATE_DISCONNECT_LATER)) + return -1; + + dataLength = ENET_NET_TO_HOST_16 (command -> sendReliable.dataLength); + * currentData += dataLength; + if (dataLength > host -> maximumPacketSize || + * currentData < host -> receivedData || + * currentData > & host -> receivedData [host -> receivedDataLength]) + return -1; + + if (enet_peer_queue_incoming_command (peer, command, (const enet_uint8 *) command + sizeof (ENetProtocolSendReliable), dataLength, ENET_PACKET_FLAG_RELIABLE, 0) == NULL) + return -1; + + return 0; +} + +static int +enet_protocol_handle_send_unsequenced (ENetHost * host, ENetPeer * peer, const ENetProtocol * command, enet_uint8 ** currentData) +{ + enet_uint32 unsequencedGroup, index; + size_t dataLength; + + if (command -> header.channelID >= peer -> channelCount || + (peer -> state != ENET_PEER_STATE_CONNECTED && peer -> state != ENET_PEER_STATE_DISCONNECT_LATER)) + return -1; + + dataLength = ENET_NET_TO_HOST_16 (command -> sendUnsequenced.dataLength); + * currentData += dataLength; + if (dataLength > host -> maximumPacketSize || + * currentData < host -> receivedData || + * currentData > & host -> receivedData [host -> receivedDataLength]) + return -1; + + unsequencedGroup = ENET_NET_TO_HOST_16 (command -> sendUnsequenced.unsequencedGroup); + index = unsequencedGroup % ENET_PEER_UNSEQUENCED_WINDOW_SIZE; + + if (unsequencedGroup < peer -> incomingUnsequencedGroup) + unsequencedGroup += 0x10000; + + if (unsequencedGroup >= (enet_uint32) peer -> incomingUnsequencedGroup + ENET_PEER_FREE_UNSEQUENCED_WINDOWS * ENET_PEER_UNSEQUENCED_WINDOW_SIZE) + return 0; + + unsequencedGroup &= 0xFFFF; + + if (unsequencedGroup - index != peer -> incomingUnsequencedGroup) + { + peer -> incomingUnsequencedGroup = unsequencedGroup - index; + + memset (peer -> unsequencedWindow, 0, sizeof (peer -> unsequencedWindow)); + } + else + if (peer -> unsequencedWindow [index / 32] & (1 << (index % 32))) + return 0; + + if (enet_peer_queue_incoming_command (peer, command, (const enet_uint8 *) command + sizeof (ENetProtocolSendUnsequenced), dataLength, ENET_PACKET_FLAG_UNSEQUENCED, 0) == NULL) + return -1; + + peer -> unsequencedWindow [index / 32] |= 1 << (index % 32); + + return 0; +} + +static int +enet_protocol_handle_send_unreliable (ENetHost * host, ENetPeer * peer, const ENetProtocol * command, enet_uint8 ** currentData) +{ + size_t dataLength; + + if (command -> header.channelID >= peer -> channelCount || + (peer -> state != ENET_PEER_STATE_CONNECTED && peer -> state != ENET_PEER_STATE_DISCONNECT_LATER)) + return -1; + + dataLength = ENET_NET_TO_HOST_16 (command -> sendUnreliable.dataLength); + * currentData += dataLength; + if (dataLength > host -> maximumPacketSize || + * currentData < host -> receivedData || + * currentData > & host -> receivedData [host -> receivedDataLength]) + return -1; + + if (enet_peer_queue_incoming_command (peer, command, (const enet_uint8 *) command + sizeof (ENetProtocolSendUnreliable), dataLength, 0, 0) == NULL) + return -1; + + return 0; +} + +static int +enet_protocol_handle_send_fragment (ENetHost * host, ENetPeer * peer, const ENetProtocol * command, enet_uint8 ** currentData) +{ + enet_uint32 fragmentNumber, + fragmentCount, + fragmentOffset, + fragmentLength, + startSequenceNumber, + totalLength; + ENetChannel * channel; + enet_uint16 startWindow, currentWindow; + ENetListIterator currentCommand; + ENetIncomingCommand * startCommand = NULL; + + if (command -> header.channelID >= peer -> channelCount || + (peer -> state != ENET_PEER_STATE_CONNECTED && peer -> state != ENET_PEER_STATE_DISCONNECT_LATER)) + return -1; + + fragmentLength = ENET_NET_TO_HOST_16 (command -> sendFragment.dataLength); + * currentData += fragmentLength; + if (fragmentLength > host -> maximumPacketSize || + * currentData < host -> receivedData || + * currentData > & host -> receivedData [host -> receivedDataLength]) + return -1; + + channel = & peer -> channels [command -> header.channelID]; + startSequenceNumber = ENET_NET_TO_HOST_16 (command -> sendFragment.startSequenceNumber); + startWindow = startSequenceNumber / ENET_PEER_RELIABLE_WINDOW_SIZE; + currentWindow = channel -> incomingReliableSequenceNumber / ENET_PEER_RELIABLE_WINDOW_SIZE; + + if (startSequenceNumber < channel -> incomingReliableSequenceNumber) + startWindow += ENET_PEER_RELIABLE_WINDOWS; + + if (startWindow < currentWindow || startWindow >= currentWindow + ENET_PEER_FREE_RELIABLE_WINDOWS - 1) + return 0; + + fragmentNumber = ENET_NET_TO_HOST_32 (command -> sendFragment.fragmentNumber); + fragmentCount = ENET_NET_TO_HOST_32 (command -> sendFragment.fragmentCount); + fragmentOffset = ENET_NET_TO_HOST_32 (command -> sendFragment.fragmentOffset); + totalLength = ENET_NET_TO_HOST_32 (command -> sendFragment.totalLength); + + if (fragmentCount > ENET_PROTOCOL_MAXIMUM_FRAGMENT_COUNT || + fragmentNumber >= fragmentCount || + totalLength > host -> maximumPacketSize || + fragmentOffset >= totalLength || + fragmentLength > totalLength - fragmentOffset) + return -1; + + for (currentCommand = enet_list_previous (enet_list_end (& channel -> incomingReliableCommands)); + currentCommand != enet_list_end (& channel -> incomingReliableCommands); + currentCommand = enet_list_previous (currentCommand)) + { + ENetIncomingCommand * incomingCommand = (ENetIncomingCommand *) currentCommand; + + if (startSequenceNumber >= channel -> incomingReliableSequenceNumber) + { + if (incomingCommand -> reliableSequenceNumber < channel -> incomingReliableSequenceNumber) + continue; + } + else + if (incomingCommand -> reliableSequenceNumber >= channel -> incomingReliableSequenceNumber) + break; + + if (incomingCommand -> reliableSequenceNumber <= startSequenceNumber) + { + if (incomingCommand -> reliableSequenceNumber < startSequenceNumber) + break; + + if ((incomingCommand -> command.header.command & ENET_PROTOCOL_COMMAND_MASK) != ENET_PROTOCOL_COMMAND_SEND_FRAGMENT || + totalLength != incomingCommand -> packet -> dataLength || + fragmentCount != incomingCommand -> fragmentCount) + return -1; + + startCommand = incomingCommand; + break; + } + } + + if (startCommand == NULL) + { + ENetProtocol hostCommand = * command; + + hostCommand.header.reliableSequenceNumber = startSequenceNumber; + + startCommand = enet_peer_queue_incoming_command (peer, & hostCommand, NULL, totalLength, ENET_PACKET_FLAG_RELIABLE, fragmentCount); + if (startCommand == NULL) + return -1; + } + + if ((startCommand -> fragments [fragmentNumber / 32] & (1 << (fragmentNumber % 32))) == 0) + { + -- startCommand -> fragmentsRemaining; + + startCommand -> fragments [fragmentNumber / 32] |= (1 << (fragmentNumber % 32)); + + if (fragmentOffset + fragmentLength > startCommand -> packet -> dataLength) + fragmentLength = startCommand -> packet -> dataLength - fragmentOffset; + + memcpy (startCommand -> packet -> data + fragmentOffset, + (enet_uint8 *) command + sizeof (ENetProtocolSendFragment), + fragmentLength); + + if (startCommand -> fragmentsRemaining <= 0) + enet_peer_dispatch_incoming_reliable_commands (peer, channel); + } + + return 0; +} + +static int +enet_protocol_handle_send_unreliable_fragment (ENetHost * host, ENetPeer * peer, const ENetProtocol * command, enet_uint8 ** currentData) +{ + enet_uint32 fragmentNumber, + fragmentCount, + fragmentOffset, + fragmentLength, + reliableSequenceNumber, + startSequenceNumber, + totalLength; + enet_uint16 reliableWindow, currentWindow; + ENetChannel * channel; + ENetListIterator currentCommand; + ENetIncomingCommand * startCommand = NULL; + + if (command -> header.channelID >= peer -> channelCount || + (peer -> state != ENET_PEER_STATE_CONNECTED && peer -> state != ENET_PEER_STATE_DISCONNECT_LATER)) + return -1; + + fragmentLength = ENET_NET_TO_HOST_16 (command -> sendFragment.dataLength); + * currentData += fragmentLength; + if (fragmentLength > host -> maximumPacketSize || + * currentData < host -> receivedData || + * currentData > & host -> receivedData [host -> receivedDataLength]) + return -1; + + channel = & peer -> channels [command -> header.channelID]; + reliableSequenceNumber = command -> header.reliableSequenceNumber; + startSequenceNumber = ENET_NET_TO_HOST_16 (command -> sendFragment.startSequenceNumber); + + reliableWindow = reliableSequenceNumber / ENET_PEER_RELIABLE_WINDOW_SIZE; + currentWindow = channel -> incomingReliableSequenceNumber / ENET_PEER_RELIABLE_WINDOW_SIZE; + + if (reliableSequenceNumber < channel -> incomingReliableSequenceNumber) + reliableWindow += ENET_PEER_RELIABLE_WINDOWS; + + if (reliableWindow < currentWindow || reliableWindow >= currentWindow + ENET_PEER_FREE_RELIABLE_WINDOWS - 1) + return 0; + + if (reliableSequenceNumber == channel -> incomingReliableSequenceNumber && + startSequenceNumber <= channel -> incomingUnreliableSequenceNumber) + return 0; + + fragmentNumber = ENET_NET_TO_HOST_32 (command -> sendFragment.fragmentNumber); + fragmentCount = ENET_NET_TO_HOST_32 (command -> sendFragment.fragmentCount); + fragmentOffset = ENET_NET_TO_HOST_32 (command -> sendFragment.fragmentOffset); + totalLength = ENET_NET_TO_HOST_32 (command -> sendFragment.totalLength); + + if (fragmentCount > ENET_PROTOCOL_MAXIMUM_FRAGMENT_COUNT || + fragmentNumber >= fragmentCount || + totalLength > host -> maximumPacketSize || + fragmentOffset >= totalLength || + fragmentLength > totalLength - fragmentOffset) + return -1; + + for (currentCommand = enet_list_previous (enet_list_end (& channel -> incomingUnreliableCommands)); + currentCommand != enet_list_end (& channel -> incomingUnreliableCommands); + currentCommand = enet_list_previous (currentCommand)) + { + ENetIncomingCommand * incomingCommand = (ENetIncomingCommand *) currentCommand; + + if (reliableSequenceNumber >= channel -> incomingReliableSequenceNumber) + { + if (incomingCommand -> reliableSequenceNumber < channel -> incomingReliableSequenceNumber) + continue; + } + else + if (incomingCommand -> reliableSequenceNumber >= channel -> incomingReliableSequenceNumber) + break; + + if (incomingCommand -> reliableSequenceNumber < reliableSequenceNumber) + break; + + if (incomingCommand -> reliableSequenceNumber > reliableSequenceNumber) + continue; + + if (incomingCommand -> unreliableSequenceNumber <= startSequenceNumber) + { + if (incomingCommand -> unreliableSequenceNumber < startSequenceNumber) + break; + + if ((incomingCommand -> command.header.command & ENET_PROTOCOL_COMMAND_MASK) != ENET_PROTOCOL_COMMAND_SEND_UNRELIABLE_FRAGMENT || + totalLength != incomingCommand -> packet -> dataLength || + fragmentCount != incomingCommand -> fragmentCount) + return -1; + + startCommand = incomingCommand; + break; + } + } + + if (startCommand == NULL) + { + startCommand = enet_peer_queue_incoming_command (peer, command, NULL, totalLength, ENET_PACKET_FLAG_UNRELIABLE_FRAGMENT, fragmentCount); + if (startCommand == NULL) + return -1; + } + + if ((startCommand -> fragments [fragmentNumber / 32] & (1 << (fragmentNumber % 32))) == 0) + { + -- startCommand -> fragmentsRemaining; + + startCommand -> fragments [fragmentNumber / 32] |= (1 << (fragmentNumber % 32)); + + if (fragmentOffset + fragmentLength > startCommand -> packet -> dataLength) + fragmentLength = startCommand -> packet -> dataLength - fragmentOffset; + + memcpy (startCommand -> packet -> data + fragmentOffset, + (enet_uint8 *) command + sizeof (ENetProtocolSendFragment), + fragmentLength); + + if (startCommand -> fragmentsRemaining <= 0) + enet_peer_dispatch_incoming_unreliable_commands (peer, channel); + } + + return 0; +} + +static int +enet_protocol_handle_ping (ENetHost * host, ENetPeer * peer, const ENetProtocol * command) +{ + if (peer -> state != ENET_PEER_STATE_CONNECTED && peer -> state != ENET_PEER_STATE_DISCONNECT_LATER) + return -1; + + return 0; +} + +static int +enet_protocol_handle_bandwidth_limit (ENetHost * host, ENetPeer * peer, const ENetProtocol * command) +{ + if (peer -> state != ENET_PEER_STATE_CONNECTED && peer -> state != ENET_PEER_STATE_DISCONNECT_LATER) + return -1; + + if (peer -> incomingBandwidth != 0) + -- host -> bandwidthLimitedPeers; + + peer -> incomingBandwidth = ENET_NET_TO_HOST_32 (command -> bandwidthLimit.incomingBandwidth); + peer -> outgoingBandwidth = ENET_NET_TO_HOST_32 (command -> bandwidthLimit.outgoingBandwidth); + + if (peer -> incomingBandwidth != 0) + ++ host -> bandwidthLimitedPeers; + + if (peer -> incomingBandwidth == 0 && host -> outgoingBandwidth == 0) + peer -> windowSize = ENET_PROTOCOL_MAXIMUM_WINDOW_SIZE; + else + if (peer -> incomingBandwidth == 0 || host -> outgoingBandwidth == 0) + peer -> windowSize = (ENET_MAX (peer -> incomingBandwidth, host -> outgoingBandwidth) / + ENET_PEER_WINDOW_SIZE_SCALE) * ENET_PROTOCOL_MINIMUM_WINDOW_SIZE; + else + peer -> windowSize = (ENET_MIN (peer -> incomingBandwidth, host -> outgoingBandwidth) / + ENET_PEER_WINDOW_SIZE_SCALE) * ENET_PROTOCOL_MINIMUM_WINDOW_SIZE; + + if (peer -> windowSize < ENET_PROTOCOL_MINIMUM_WINDOW_SIZE) + peer -> windowSize = ENET_PROTOCOL_MINIMUM_WINDOW_SIZE; + else + if (peer -> windowSize > ENET_PROTOCOL_MAXIMUM_WINDOW_SIZE) + peer -> windowSize = ENET_PROTOCOL_MAXIMUM_WINDOW_SIZE; + + return 0; +} + +static int +enet_protocol_handle_throttle_configure (ENetHost * host, ENetPeer * peer, const ENetProtocol * command) +{ + if (peer -> state != ENET_PEER_STATE_CONNECTED && peer -> state != ENET_PEER_STATE_DISCONNECT_LATER) + return -1; + + peer -> packetThrottleInterval = ENET_NET_TO_HOST_32 (command -> throttleConfigure.packetThrottleInterval); + peer -> packetThrottleAcceleration = ENET_NET_TO_HOST_32 (command -> throttleConfigure.packetThrottleAcceleration); + peer -> packetThrottleDeceleration = ENET_NET_TO_HOST_32 (command -> throttleConfigure.packetThrottleDeceleration); + + return 0; +} + +static int +enet_protocol_handle_disconnect (ENetHost * host, ENetPeer * peer, const ENetProtocol * command) +{ + if (peer -> state == ENET_PEER_STATE_DISCONNECTED || peer -> state == ENET_PEER_STATE_ZOMBIE || peer -> state == ENET_PEER_STATE_ACKNOWLEDGING_DISCONNECT) + return 0; + + enet_peer_reset_queues (peer); + + if (peer -> state == ENET_PEER_STATE_CONNECTION_SUCCEEDED || peer -> state == ENET_PEER_STATE_DISCONNECTING || peer -> state == ENET_PEER_STATE_CONNECTING) + enet_protocol_dispatch_state (host, peer, ENET_PEER_STATE_ZOMBIE); + else + if (peer -> state != ENET_PEER_STATE_CONNECTED && peer -> state != ENET_PEER_STATE_DISCONNECT_LATER) + { + if (peer -> state == ENET_PEER_STATE_CONNECTION_PENDING) host -> recalculateBandwidthLimits = 1; + + enet_peer_reset (peer); + } + else + if (command -> header.command & ENET_PROTOCOL_COMMAND_FLAG_ACKNOWLEDGE) + enet_protocol_change_state (host, peer, ENET_PEER_STATE_ACKNOWLEDGING_DISCONNECT); + else + enet_protocol_dispatch_state (host, peer, ENET_PEER_STATE_ZOMBIE); + + if (peer -> state != ENET_PEER_STATE_DISCONNECTED) + peer -> eventData = ENET_NET_TO_HOST_32 (command -> disconnect.data); + + return 0; +} + +static int +enet_protocol_handle_acknowledge (ENetHost * host, ENetEvent * event, ENetPeer * peer, const ENetProtocol * command) +{ + enet_uint32 roundTripTime, + receivedSentTime, + receivedReliableSequenceNumber; + ENetProtocolCommand commandNumber; + + if (peer -> state == ENET_PEER_STATE_DISCONNECTED || peer -> state == ENET_PEER_STATE_ZOMBIE) + return 0; + + receivedSentTime = ENET_NET_TO_HOST_16 (command -> acknowledge.receivedSentTime); + receivedSentTime |= host -> serviceTime & 0xFFFF0000; + if ((receivedSentTime & 0x8000) > (host -> serviceTime & 0x8000)) + receivedSentTime -= 0x10000; + + if (ENET_TIME_LESS (host -> serviceTime, receivedSentTime)) + return 0; + + peer -> lastReceiveTime = host -> serviceTime; + peer -> earliestTimeout = 0; + + roundTripTime = ENET_TIME_DIFFERENCE (host -> serviceTime, receivedSentTime); + + enet_peer_throttle (peer, roundTripTime); + + peer -> roundTripTimeVariance -= peer -> roundTripTimeVariance / 4; + + if (roundTripTime >= peer -> roundTripTime) + { + peer -> roundTripTime += (roundTripTime - peer -> roundTripTime) / 8; + peer -> roundTripTimeVariance += (roundTripTime - peer -> roundTripTime) / 4; + } + else + { + peer -> roundTripTime -= (peer -> roundTripTime - roundTripTime) / 8; + peer -> roundTripTimeVariance += (peer -> roundTripTime - roundTripTime) / 4; + } + + if (peer -> roundTripTime < peer -> lowestRoundTripTime) + peer -> lowestRoundTripTime = peer -> roundTripTime; + + if (peer -> roundTripTimeVariance > peer -> highestRoundTripTimeVariance) + peer -> highestRoundTripTimeVariance = peer -> roundTripTimeVariance; + + if (peer -> packetThrottleEpoch == 0 || + ENET_TIME_DIFFERENCE (host -> serviceTime, peer -> packetThrottleEpoch) >= peer -> packetThrottleInterval) + { + peer -> lastRoundTripTime = peer -> lowestRoundTripTime; + peer -> lastRoundTripTimeVariance = peer -> highestRoundTripTimeVariance; + peer -> lowestRoundTripTime = peer -> roundTripTime; + peer -> highestRoundTripTimeVariance = peer -> roundTripTimeVariance; + peer -> packetThrottleEpoch = host -> serviceTime; + } + + receivedReliableSequenceNumber = ENET_NET_TO_HOST_16 (command -> acknowledge.receivedReliableSequenceNumber); + + commandNumber = enet_protocol_remove_sent_reliable_command (peer, receivedReliableSequenceNumber, command -> header.channelID); + + switch (peer -> state) + { + case ENET_PEER_STATE_ACKNOWLEDGING_CONNECT: + if (commandNumber != ENET_PROTOCOL_COMMAND_VERIFY_CONNECT) + return -1; + + enet_protocol_notify_connect (host, peer, event); + break; + + case ENET_PEER_STATE_DISCONNECTING: + if (commandNumber != ENET_PROTOCOL_COMMAND_DISCONNECT) + return -1; + + enet_protocol_notify_disconnect (host, peer, event); + break; + + case ENET_PEER_STATE_DISCONNECT_LATER: + if (enet_list_empty (& peer -> outgoingReliableCommands) && + enet_list_empty (& peer -> outgoingUnreliableCommands) && + enet_list_empty (& peer -> sentReliableCommands)) + enet_peer_disconnect (peer, peer -> eventData); + break; + + default: + break; + } + + return 0; +} + +static int +enet_protocol_handle_verify_connect (ENetHost * host, ENetEvent * event, ENetPeer * peer, const ENetProtocol * command) +{ + enet_uint32 mtu, windowSize; + size_t channelCount; + + if (peer -> state != ENET_PEER_STATE_CONNECTING) + return 0; + + channelCount = ENET_NET_TO_HOST_32 (command -> verifyConnect.channelCount); + + if (channelCount < ENET_PROTOCOL_MINIMUM_CHANNEL_COUNT || channelCount > ENET_PROTOCOL_MAXIMUM_CHANNEL_COUNT || + ENET_NET_TO_HOST_32 (command -> verifyConnect.packetThrottleInterval) != peer -> packetThrottleInterval || + ENET_NET_TO_HOST_32 (command -> verifyConnect.packetThrottleAcceleration) != peer -> packetThrottleAcceleration || + ENET_NET_TO_HOST_32 (command -> verifyConnect.packetThrottleDeceleration) != peer -> packetThrottleDeceleration || + command -> verifyConnect.connectID != peer -> connectID) + { + peer -> eventData = 0; + + enet_protocol_dispatch_state (host, peer, ENET_PEER_STATE_ZOMBIE); + + return -1; + } + + enet_protocol_remove_sent_reliable_command (peer, 1, 0xFF); + + if (channelCount < peer -> channelCount) + peer -> channelCount = channelCount; + + peer -> outgoingPeerID = ENET_NET_TO_HOST_16 (command -> verifyConnect.outgoingPeerID); + peer -> incomingSessionID = command -> verifyConnect.incomingSessionID; + peer -> outgoingSessionID = command -> verifyConnect.outgoingSessionID; + + mtu = ENET_NET_TO_HOST_32 (command -> verifyConnect.mtu); + + if (mtu < ENET_PROTOCOL_MINIMUM_MTU) + mtu = ENET_PROTOCOL_MINIMUM_MTU; + else + if (mtu > ENET_PROTOCOL_MAXIMUM_MTU) + mtu = ENET_PROTOCOL_MAXIMUM_MTU; + + if (mtu < peer -> mtu) + peer -> mtu = mtu; + + windowSize = ENET_NET_TO_HOST_32 (command -> verifyConnect.windowSize); + + if (windowSize < ENET_PROTOCOL_MINIMUM_WINDOW_SIZE) + windowSize = ENET_PROTOCOL_MINIMUM_WINDOW_SIZE; + + if (windowSize > ENET_PROTOCOL_MAXIMUM_WINDOW_SIZE) + windowSize = ENET_PROTOCOL_MAXIMUM_WINDOW_SIZE; + + if (windowSize < peer -> windowSize) + peer -> windowSize = windowSize; + + peer -> incomingBandwidth = ENET_NET_TO_HOST_32 (command -> verifyConnect.incomingBandwidth); + peer -> outgoingBandwidth = ENET_NET_TO_HOST_32 (command -> verifyConnect.outgoingBandwidth); + + enet_protocol_notify_connect (host, peer, event); + return 0; +} + +static int +enet_protocol_handle_incoming_commands (ENetHost * host, ENetEvent * event) +{ + ENetProtocolHeader * header; + ENetProtocol * command; + ENetPeer * peer; + enet_uint8 * currentData; + size_t headerSize; + enet_uint16 peerID, flags; + enet_uint8 sessionID; + + if (host -> receivedDataLength < (size_t) & ((ENetProtocolHeader *) 0) -> sentTime) + return 0; + + header = (ENetProtocolHeader *) host -> receivedData; + + peerID = ENET_NET_TO_HOST_16 (header -> peerID); + sessionID = (peerID & ENET_PROTOCOL_HEADER_SESSION_MASK) >> ENET_PROTOCOL_HEADER_SESSION_SHIFT; + flags = peerID & ENET_PROTOCOL_HEADER_FLAG_MASK; + peerID &= ~ (ENET_PROTOCOL_HEADER_FLAG_MASK | ENET_PROTOCOL_HEADER_SESSION_MASK); + + headerSize = (flags & ENET_PROTOCOL_HEADER_FLAG_SENT_TIME ? sizeof (ENetProtocolHeader) : (size_t) & ((ENetProtocolHeader *) 0) -> sentTime); + if (host -> checksum != NULL) + headerSize += sizeof (enet_uint32); + + if (peerID == ENET_PROTOCOL_MAXIMUM_PEER_ID) + peer = NULL; + else + if (peerID >= host -> peerCount) + return 0; + else + { + peer = & host -> peers [peerID]; + + if (peer -> state == ENET_PEER_STATE_DISCONNECTED || + peer -> state == ENET_PEER_STATE_ZOMBIE || + ((host -> receivedAddress.host != peer -> address.host || + host -> receivedAddress.port != peer -> address.port) && + peer -> address.host != ENET_HOST_BROADCAST) || + (peer -> outgoingPeerID < ENET_PROTOCOL_MAXIMUM_PEER_ID && + sessionID != peer -> incomingSessionID)) + return 0; + } + + if (flags & ENET_PROTOCOL_HEADER_FLAG_COMPRESSED) + { + size_t originalSize; + if (host -> compressor.context == NULL || host -> compressor.decompress == NULL) + return 0; + + originalSize = host -> compressor.decompress (host -> compressor.context, + host -> receivedData + headerSize, + host -> receivedDataLength - headerSize, + host -> packetData [1] + headerSize, + sizeof (host -> packetData [1]) - headerSize); + if (originalSize <= 0 || originalSize > sizeof (host -> packetData [1]) - headerSize) + return 0; + + memcpy (host -> packetData [1], header, headerSize); + host -> receivedData = host -> packetData [1]; + host -> receivedDataLength = headerSize + originalSize; + } + + if (host -> checksum != NULL) + { + enet_uint32 * checksum = (enet_uint32 *) & host -> receivedData [headerSize - sizeof (enet_uint32)], + desiredChecksum = * checksum; + ENetBuffer buffer; + + * checksum = peer != NULL ? peer -> connectID : 0; + + buffer.data = host -> receivedData; + buffer.dataLength = host -> receivedDataLength; + + if (host -> checksum (& buffer, 1) != desiredChecksum) + return 0; + } + + if (peer != NULL) + { + peer -> address.host = host -> receivedAddress.host; + peer -> address.port = host -> receivedAddress.port; + peer -> incomingDataTotal += host -> receivedDataLength; + } + + currentData = host -> receivedData + headerSize; + + while (currentData < & host -> receivedData [host -> receivedDataLength]) + { + enet_uint8 commandNumber; + size_t commandSize; + + command = (ENetProtocol *) currentData; + + if (currentData + sizeof (ENetProtocolCommandHeader) > & host -> receivedData [host -> receivedDataLength]) + break; + + commandNumber = command -> header.command & ENET_PROTOCOL_COMMAND_MASK; + if (commandNumber >= ENET_PROTOCOL_COMMAND_COUNT) + break; + + commandSize = commandSizes [commandNumber]; + if (commandSize == 0 || currentData + commandSize > & host -> receivedData [host -> receivedDataLength]) + break; + + currentData += commandSize; + + if (peer == NULL && commandNumber != ENET_PROTOCOL_COMMAND_CONNECT) + break; + + command -> header.reliableSequenceNumber = ENET_NET_TO_HOST_16 (command -> header.reliableSequenceNumber); + + switch (commandNumber) + { + case ENET_PROTOCOL_COMMAND_ACKNOWLEDGE: + if (enet_protocol_handle_acknowledge (host, event, peer, command)) + goto commandError; + break; + + case ENET_PROTOCOL_COMMAND_CONNECT: + if (peer != NULL) + goto commandError; + peer = enet_protocol_handle_connect (host, header, command); + if (peer == NULL) + goto commandError; + break; + + case ENET_PROTOCOL_COMMAND_VERIFY_CONNECT: + if (enet_protocol_handle_verify_connect (host, event, peer, command)) + goto commandError; + break; + + case ENET_PROTOCOL_COMMAND_DISCONNECT: + if (enet_protocol_handle_disconnect (host, peer, command)) + goto commandError; + break; + + case ENET_PROTOCOL_COMMAND_PING: + if (enet_protocol_handle_ping (host, peer, command)) + goto commandError; + break; + + case ENET_PROTOCOL_COMMAND_SEND_RELIABLE: + if (enet_protocol_handle_send_reliable (host, peer, command, & currentData)) + goto commandError; + break; + + case ENET_PROTOCOL_COMMAND_SEND_UNRELIABLE: + if (enet_protocol_handle_send_unreliable (host, peer, command, & currentData)) + goto commandError; + break; + + case ENET_PROTOCOL_COMMAND_SEND_UNSEQUENCED: + if (enet_protocol_handle_send_unsequenced (host, peer, command, & currentData)) + goto commandError; + break; + + case ENET_PROTOCOL_COMMAND_SEND_FRAGMENT: + if (enet_protocol_handle_send_fragment (host, peer, command, & currentData)) + goto commandError; + break; + + case ENET_PROTOCOL_COMMAND_BANDWIDTH_LIMIT: + if (enet_protocol_handle_bandwidth_limit (host, peer, command)) + goto commandError; + break; + + case ENET_PROTOCOL_COMMAND_THROTTLE_CONFIGURE: + if (enet_protocol_handle_throttle_configure (host, peer, command)) + goto commandError; + break; + + case ENET_PROTOCOL_COMMAND_SEND_UNRELIABLE_FRAGMENT: + if (enet_protocol_handle_send_unreliable_fragment (host, peer, command, & currentData)) + goto commandError; + break; + + default: + goto commandError; + } + + if (peer != NULL && + (command -> header.command & ENET_PROTOCOL_COMMAND_FLAG_ACKNOWLEDGE) != 0) + { + enet_uint16 sentTime; + + if (! (flags & ENET_PROTOCOL_HEADER_FLAG_SENT_TIME)) + break; + + sentTime = ENET_NET_TO_HOST_16 (header -> sentTime); + + switch (peer -> state) + { + case ENET_PEER_STATE_DISCONNECTING: + case ENET_PEER_STATE_ACKNOWLEDGING_CONNECT: + case ENET_PEER_STATE_DISCONNECTED: + case ENET_PEER_STATE_ZOMBIE: + break; + + case ENET_PEER_STATE_ACKNOWLEDGING_DISCONNECT: + if ((command -> header.command & ENET_PROTOCOL_COMMAND_MASK) == ENET_PROTOCOL_COMMAND_DISCONNECT) + enet_peer_queue_acknowledgement (peer, command, sentTime); + break; + + default: + enet_peer_queue_acknowledgement (peer, command, sentTime); + break; + } + } + } + +commandError: + if (event != NULL && event -> type != ENET_EVENT_TYPE_NONE) + return 1; + + return 0; +} + +static int +enet_protocol_receive_incoming_commands (ENetHost * host, ENetEvent * event) +{ + int packets; + + for (packets = 0; packets < 256; ++ packets) + { + int receivedLength; + ENetBuffer buffer; + + buffer.data = host -> packetData [0]; + buffer.dataLength = sizeof (host -> packetData [0]); + + receivedLength = enet_socket_receive (host -> socket, + & host -> receivedAddress, + & buffer, + 1); + + if (receivedLength < 0) + return -1; + + if (receivedLength == 0) + return 0; + + host -> receivedData = host -> packetData [0]; + host -> receivedDataLength = receivedLength; + + host -> totalReceivedData += receivedLength; + host -> totalReceivedPackets ++; + + if (host -> intercept != NULL) + { + switch (host -> intercept (host, event)) + { + case 1: + if (event != NULL && event -> type != ENET_EVENT_TYPE_NONE) + return 1; + + continue; + + case -1: + return -1; + + default: + break; + } + } + + switch (enet_protocol_handle_incoming_commands (host, event)) + { + case 1: + return 1; + + case -1: + return -1; + + default: + break; + } + } + + return -1; +} + +static void +enet_protocol_send_acknowledgements (ENetHost * host, ENetPeer * peer) +{ + ENetProtocol * command = & host -> commands [host -> commandCount]; + ENetBuffer * buffer = & host -> buffers [host -> bufferCount]; + ENetAcknowledgement * acknowledgement; + ENetListIterator currentAcknowledgement; + enet_uint16 reliableSequenceNumber; + + currentAcknowledgement = enet_list_begin (& peer -> acknowledgements); + + while (currentAcknowledgement != enet_list_end (& peer -> acknowledgements)) + { + if (command >= & host -> commands [sizeof (host -> commands) / sizeof (ENetProtocol)] || + buffer >= & host -> buffers [sizeof (host -> buffers) / sizeof (ENetBuffer)] || + peer -> mtu - host -> packetSize < sizeof (ENetProtocolAcknowledge)) + { + host -> continueSending = 1; + + break; + } + + acknowledgement = (ENetAcknowledgement *) currentAcknowledgement; + + currentAcknowledgement = enet_list_next (currentAcknowledgement); + + buffer -> data = command; + buffer -> dataLength = sizeof (ENetProtocolAcknowledge); + + host -> packetSize += buffer -> dataLength; + + reliableSequenceNumber = ENET_HOST_TO_NET_16 (acknowledgement -> command.header.reliableSequenceNumber); + + command -> header.command = ENET_PROTOCOL_COMMAND_ACKNOWLEDGE; + command -> header.channelID = acknowledgement -> command.header.channelID; + command -> header.reliableSequenceNumber = reliableSequenceNumber; + command -> acknowledge.receivedReliableSequenceNumber = reliableSequenceNumber; + command -> acknowledge.receivedSentTime = ENET_HOST_TO_NET_16 (acknowledgement -> sentTime); + + if ((acknowledgement -> command.header.command & ENET_PROTOCOL_COMMAND_MASK) == ENET_PROTOCOL_COMMAND_DISCONNECT) + enet_protocol_dispatch_state (host, peer, ENET_PEER_STATE_ZOMBIE); + + enet_list_remove (& acknowledgement -> acknowledgementList); + enet_free (acknowledgement); + + ++ command; + ++ buffer; + } + + host -> commandCount = command - host -> commands; + host -> bufferCount = buffer - host -> buffers; +} + +static void +enet_protocol_send_unreliable_outgoing_commands (ENetHost * host, ENetPeer * peer) +{ + ENetProtocol * command = & host -> commands [host -> commandCount]; + ENetBuffer * buffer = & host -> buffers [host -> bufferCount]; + ENetOutgoingCommand * outgoingCommand; + ENetListIterator currentCommand; + + currentCommand = enet_list_begin (& peer -> outgoingUnreliableCommands); + + while (currentCommand != enet_list_end (& peer -> outgoingUnreliableCommands)) + { + size_t commandSize; + + outgoingCommand = (ENetOutgoingCommand *) currentCommand; + commandSize = commandSizes [outgoingCommand -> command.header.command & ENET_PROTOCOL_COMMAND_MASK]; + + if (command >= & host -> commands [sizeof (host -> commands) / sizeof (ENetProtocol)] || + buffer + 1 >= & host -> buffers [sizeof (host -> buffers) / sizeof (ENetBuffer)] || + peer -> mtu - host -> packetSize < commandSize || + (outgoingCommand -> packet != NULL && + peer -> mtu - host -> packetSize < commandSize + outgoingCommand -> fragmentLength)) + { + host -> continueSending = 1; + + break; + } + + currentCommand = enet_list_next (currentCommand); + + if (outgoingCommand -> packet != NULL && outgoingCommand -> fragmentOffset == 0) + { + peer -> packetThrottleCounter += ENET_PEER_PACKET_THROTTLE_COUNTER; + peer -> packetThrottleCounter %= ENET_PEER_PACKET_THROTTLE_SCALE; + + if (peer -> packetThrottleCounter > peer -> packetThrottle) + { + enet_uint16 reliableSequenceNumber = outgoingCommand -> reliableSequenceNumber, + unreliableSequenceNumber = outgoingCommand -> unreliableSequenceNumber; + for (;;) + { + -- outgoingCommand -> packet -> referenceCount; + + if (outgoingCommand -> packet -> referenceCount == 0) + enet_packet_destroy (outgoingCommand -> packet); + + enet_list_remove (& outgoingCommand -> outgoingCommandList); + enet_free (outgoingCommand); + + if (currentCommand == enet_list_end (& peer -> outgoingUnreliableCommands)) + break; + + outgoingCommand = (ENetOutgoingCommand *) currentCommand; + if (outgoingCommand -> reliableSequenceNumber != reliableSequenceNumber || + outgoingCommand -> unreliableSequenceNumber != unreliableSequenceNumber) + break; + + currentCommand = enet_list_next (currentCommand); + } + + continue; + } + } + + buffer -> data = command; + buffer -> dataLength = commandSize; + + host -> packetSize += buffer -> dataLength; + + * command = outgoingCommand -> command; + + enet_list_remove (& outgoingCommand -> outgoingCommandList); + + if (outgoingCommand -> packet != NULL) + { + ++ buffer; + + buffer -> data = outgoingCommand -> packet -> data + outgoingCommand -> fragmentOffset; + buffer -> dataLength = outgoingCommand -> fragmentLength; + + host -> packetSize += buffer -> dataLength; + + enet_list_insert (enet_list_end (& peer -> sentUnreliableCommands), outgoingCommand); + } + else + enet_free (outgoingCommand); + + ++ command; + ++ buffer; + } + + host -> commandCount = command - host -> commands; + host -> bufferCount = buffer - host -> buffers; + + if (peer -> state == ENET_PEER_STATE_DISCONNECT_LATER && + enet_list_empty (& peer -> outgoingReliableCommands) && + enet_list_empty (& peer -> outgoingUnreliableCommands) && + enet_list_empty (& peer -> sentReliableCommands)) + enet_peer_disconnect (peer, peer -> eventData); +} + +static int +enet_protocol_check_timeouts (ENetHost * host, ENetPeer * peer, ENetEvent * event) +{ + ENetOutgoingCommand * outgoingCommand; + ENetListIterator currentCommand, insertPosition; + + currentCommand = enet_list_begin (& peer -> sentReliableCommands); + insertPosition = enet_list_begin (& peer -> outgoingReliableCommands); + + while (currentCommand != enet_list_end (& peer -> sentReliableCommands)) + { + outgoingCommand = (ENetOutgoingCommand *) currentCommand; + + currentCommand = enet_list_next (currentCommand); + + if (ENET_TIME_DIFFERENCE (host -> serviceTime, outgoingCommand -> sentTime) < outgoingCommand -> roundTripTimeout) + continue; + + if (peer -> earliestTimeout == 0 || + ENET_TIME_LESS (outgoingCommand -> sentTime, peer -> earliestTimeout)) + peer -> earliestTimeout = outgoingCommand -> sentTime; + + if (peer -> earliestTimeout != 0 && + (ENET_TIME_DIFFERENCE (host -> serviceTime, peer -> earliestTimeout) >= peer -> timeoutMaximum || + (outgoingCommand -> roundTripTimeout >= outgoingCommand -> roundTripTimeoutLimit && + ENET_TIME_DIFFERENCE (host -> serviceTime, peer -> earliestTimeout) >= peer -> timeoutMinimum))) + { + enet_protocol_notify_disconnect (host, peer, event); + + return 1; + } + + if (outgoingCommand -> packet != NULL) + peer -> reliableDataInTransit -= outgoingCommand -> fragmentLength; + + ++ peer -> packetsLost; + + outgoingCommand -> roundTripTimeout *= 2; + + enet_list_insert (insertPosition, enet_list_remove (& outgoingCommand -> outgoingCommandList)); + + if (currentCommand == enet_list_begin (& peer -> sentReliableCommands) && + ! enet_list_empty (& peer -> sentReliableCommands)) + { + outgoingCommand = (ENetOutgoingCommand *) currentCommand; + + peer -> nextTimeout = outgoingCommand -> sentTime + outgoingCommand -> roundTripTimeout; + } + } + + return 0; +} + +static int +enet_protocol_send_reliable_outgoing_commands (ENetHost * host, ENetPeer * peer) +{ + ENetProtocol * command = & host -> commands [host -> commandCount]; + ENetBuffer * buffer = & host -> buffers [host -> bufferCount]; + ENetOutgoingCommand * outgoingCommand; + ENetListIterator currentCommand; + ENetChannel *channel; + enet_uint16 reliableWindow; + size_t commandSize; + int windowExceeded = 0, windowWrap = 0, canPing = 1; + + currentCommand = enet_list_begin (& peer -> outgoingReliableCommands); + + while (currentCommand != enet_list_end (& peer -> outgoingReliableCommands)) + { + outgoingCommand = (ENetOutgoingCommand *) currentCommand; + + channel = outgoingCommand -> command.header.channelID < peer -> channelCount ? & peer -> channels [outgoingCommand -> command.header.channelID] : NULL; + reliableWindow = outgoingCommand -> reliableSequenceNumber / ENET_PEER_RELIABLE_WINDOW_SIZE; + if (channel != NULL) + { + if (! windowWrap && + outgoingCommand -> sendAttempts < 1 && + ! (outgoingCommand -> reliableSequenceNumber % ENET_PEER_RELIABLE_WINDOW_SIZE) && + (channel -> reliableWindows [(reliableWindow + ENET_PEER_RELIABLE_WINDOWS - 1) % ENET_PEER_RELIABLE_WINDOWS] >= ENET_PEER_RELIABLE_WINDOW_SIZE || + channel -> usedReliableWindows & ((((1 << ENET_PEER_FREE_RELIABLE_WINDOWS) - 1) << reliableWindow) | + (((1 << ENET_PEER_FREE_RELIABLE_WINDOWS) - 1) >> (ENET_PEER_RELIABLE_WINDOWS - reliableWindow))))) + windowWrap = 1; + if (windowWrap) + { + currentCommand = enet_list_next (currentCommand); + + continue; + } + } + + if (outgoingCommand -> packet != NULL) + { + if (! windowExceeded) + { + enet_uint32 windowSize = (peer -> packetThrottle * peer -> windowSize) / ENET_PEER_PACKET_THROTTLE_SCALE; + + if (peer -> reliableDataInTransit + outgoingCommand -> fragmentLength > ENET_MAX (windowSize, peer -> mtu)) + windowExceeded = 1; + } + if (windowExceeded) + { + currentCommand = enet_list_next (currentCommand); + + continue; + } + } + + canPing = 0; + + commandSize = commandSizes [outgoingCommand -> command.header.command & ENET_PROTOCOL_COMMAND_MASK]; + if (command >= & host -> commands [sizeof (host -> commands) / sizeof (ENetProtocol)] || + buffer + 1 >= & host -> buffers [sizeof (host -> buffers) / sizeof (ENetBuffer)] || + peer -> mtu - host -> packetSize < commandSize || + (outgoingCommand -> packet != NULL && + (enet_uint16) (peer -> mtu - host -> packetSize) < (enet_uint16) (commandSize + outgoingCommand -> fragmentLength))) + { + host -> continueSending = 1; + + break; + } + + currentCommand = enet_list_next (currentCommand); + + if (channel != NULL && outgoingCommand -> sendAttempts < 1) + { + channel -> usedReliableWindows |= 1 << reliableWindow; + ++ channel -> reliableWindows [reliableWindow]; + } + + ++ outgoingCommand -> sendAttempts; + + if (outgoingCommand -> roundTripTimeout == 0) + { + outgoingCommand -> roundTripTimeout = peer -> roundTripTime + 4 * peer -> roundTripTimeVariance; + outgoingCommand -> roundTripTimeoutLimit = peer -> timeoutLimit * outgoingCommand -> roundTripTimeout; + } + + if (enet_list_empty (& peer -> sentReliableCommands)) + peer -> nextTimeout = host -> serviceTime + outgoingCommand -> roundTripTimeout; + + enet_list_insert (enet_list_end (& peer -> sentReliableCommands), + enet_list_remove (& outgoingCommand -> outgoingCommandList)); + + outgoingCommand -> sentTime = host -> serviceTime; + + buffer -> data = command; + buffer -> dataLength = commandSize; + + host -> packetSize += buffer -> dataLength; + host -> headerFlags |= ENET_PROTOCOL_HEADER_FLAG_SENT_TIME; + + * command = outgoingCommand -> command; + + if (outgoingCommand -> packet != NULL) + { + ++ buffer; + + buffer -> data = outgoingCommand -> packet -> data + outgoingCommand -> fragmentOffset; + buffer -> dataLength = outgoingCommand -> fragmentLength; + + host -> packetSize += outgoingCommand -> fragmentLength; + + peer -> reliableDataInTransit += outgoingCommand -> fragmentLength; + } + + ++ peer -> packetsSent; + + ++ command; + ++ buffer; + } + + host -> commandCount = command - host -> commands; + host -> bufferCount = buffer - host -> buffers; + + return canPing; +} + +static int +enet_protocol_send_outgoing_commands (ENetHost * host, ENetEvent * event, int checkForTimeouts) +{ + enet_uint8 headerData [sizeof (ENetProtocolHeader) + sizeof (enet_uint32)]; + ENetProtocolHeader * header = (ENetProtocolHeader *) headerData; + ENetPeer * currentPeer; + int sentLength; + size_t shouldCompress = 0; + + host -> continueSending = 1; + + while (host -> continueSending) + for (host -> continueSending = 0, + currentPeer = host -> peers; + currentPeer < & host -> peers [host -> peerCount]; + ++ currentPeer) + { + if (currentPeer -> state == ENET_PEER_STATE_DISCONNECTED || + currentPeer -> state == ENET_PEER_STATE_ZOMBIE) + continue; + + host -> headerFlags = 0; + host -> commandCount = 0; + host -> bufferCount = 1; + host -> packetSize = sizeof (ENetProtocolHeader); + + if (! enet_list_empty (& currentPeer -> acknowledgements)) + enet_protocol_send_acknowledgements (host, currentPeer); + + if (checkForTimeouts != 0 && + ! enet_list_empty (& currentPeer -> sentReliableCommands) && + ENET_TIME_GREATER_EQUAL (host -> serviceTime, currentPeer -> nextTimeout) && + enet_protocol_check_timeouts (host, currentPeer, event) == 1) + { + if (event != NULL && event -> type != ENET_EVENT_TYPE_NONE) + return 1; + else + continue; + } + + if ((enet_list_empty (& currentPeer -> outgoingReliableCommands) || + enet_protocol_send_reliable_outgoing_commands (host, currentPeer)) && + enet_list_empty (& currentPeer -> sentReliableCommands) && + ENET_TIME_DIFFERENCE (host -> serviceTime, currentPeer -> lastReceiveTime) >= currentPeer -> pingInterval && + currentPeer -> mtu - host -> packetSize >= sizeof (ENetProtocolPing)) + { + enet_peer_ping (currentPeer); + enet_protocol_send_reliable_outgoing_commands (host, currentPeer); + } + + if (! enet_list_empty (& currentPeer -> outgoingUnreliableCommands)) + enet_protocol_send_unreliable_outgoing_commands (host, currentPeer); + + if (host -> commandCount == 0) + continue; + + if (currentPeer -> packetLossEpoch == 0) + currentPeer -> packetLossEpoch = host -> serviceTime; + else + if (ENET_TIME_DIFFERENCE (host -> serviceTime, currentPeer -> packetLossEpoch) >= ENET_PEER_PACKET_LOSS_INTERVAL && + currentPeer -> packetsSent > 0) + { + enet_uint32 packetLoss = currentPeer -> packetsLost * ENET_PEER_PACKET_LOSS_SCALE / currentPeer -> packetsSent; + +#ifdef ENET_DEBUG + printf ("peer %u: %f%%+-%f%% packet loss, %u+-%u ms round trip time, %f%% throttle, %u/%u outgoing, %u/%u incoming\n", currentPeer -> incomingPeerID, currentPeer -> packetLoss / (float) ENET_PEER_PACKET_LOSS_SCALE, currentPeer -> packetLossVariance / (float) ENET_PEER_PACKET_LOSS_SCALE, currentPeer -> roundTripTime, currentPeer -> roundTripTimeVariance, currentPeer -> packetThrottle / (float) ENET_PEER_PACKET_THROTTLE_SCALE, enet_list_size (& currentPeer -> outgoingReliableCommands), enet_list_size (& currentPeer -> outgoingUnreliableCommands), currentPeer -> channels != NULL ? enet_list_size (& currentPeer -> channels -> incomingReliableCommands) : 0, currentPeer -> channels != NULL ? enet_list_size (& currentPeer -> channels -> incomingUnreliableCommands) : 0); +#endif + + currentPeer -> packetLossVariance -= currentPeer -> packetLossVariance / 4; + + if (packetLoss >= currentPeer -> packetLoss) + { + currentPeer -> packetLoss += (packetLoss - currentPeer -> packetLoss) / 8; + currentPeer -> packetLossVariance += (packetLoss - currentPeer -> packetLoss) / 4; + } + else + { + currentPeer -> packetLoss -= (currentPeer -> packetLoss - packetLoss) / 8; + currentPeer -> packetLossVariance += (currentPeer -> packetLoss - packetLoss) / 4; + } + + currentPeer -> packetLossEpoch = host -> serviceTime; + currentPeer -> packetsSent = 0; + currentPeer -> packetsLost = 0; + } + + host -> buffers -> data = headerData; + if (host -> headerFlags & ENET_PROTOCOL_HEADER_FLAG_SENT_TIME) + { + header -> sentTime = ENET_HOST_TO_NET_16 (host -> serviceTime & 0xFFFF); + + host -> buffers -> dataLength = sizeof (ENetProtocolHeader); + } + else + host -> buffers -> dataLength = (size_t) & ((ENetProtocolHeader *) 0) -> sentTime; + + shouldCompress = 0; + if (host -> compressor.context != NULL && host -> compressor.compress != NULL) + { + size_t originalSize = host -> packetSize - sizeof(ENetProtocolHeader), + compressedSize = host -> compressor.compress (host -> compressor.context, + & host -> buffers [1], host -> bufferCount - 1, + originalSize, + host -> packetData [1], + originalSize); + if (compressedSize > 0 && compressedSize < originalSize) + { + host -> headerFlags |= ENET_PROTOCOL_HEADER_FLAG_COMPRESSED; + shouldCompress = compressedSize; +#ifdef ENET_DEBUG_COMPRESS + printf ("peer %u: compressed %u -> %u (%u%%)\n", currentPeer -> incomingPeerID, originalSize, compressedSize, (compressedSize * 100) / originalSize); +#endif + } + } + + if (currentPeer -> outgoingPeerID < ENET_PROTOCOL_MAXIMUM_PEER_ID) + host -> headerFlags |= currentPeer -> outgoingSessionID << ENET_PROTOCOL_HEADER_SESSION_SHIFT; + header -> peerID = ENET_HOST_TO_NET_16 (currentPeer -> outgoingPeerID | host -> headerFlags); + if (host -> checksum != NULL) + { + enet_uint32 * checksum = (enet_uint32 *) & headerData [host -> buffers -> dataLength]; + * checksum = currentPeer -> outgoingPeerID < ENET_PROTOCOL_MAXIMUM_PEER_ID ? currentPeer -> connectID : 0; + host -> buffers -> dataLength += sizeof (enet_uint32); + * checksum = host -> checksum (host -> buffers, host -> bufferCount); + } + + if (shouldCompress > 0) + { + host -> buffers [1].data = host -> packetData [1]; + host -> buffers [1].dataLength = shouldCompress; + host -> bufferCount = 2; + } + + currentPeer -> lastSendTime = host -> serviceTime; + + sentLength = enet_socket_send (host -> socket, & currentPeer -> address, host -> buffers, host -> bufferCount); + + enet_protocol_remove_sent_unreliable_commands (currentPeer); + + if (sentLength < 0) + return -1; + + host -> totalSentData += sentLength; + host -> totalSentPackets ++; + } + + return 0; +} + +/** Sends any queued packets on the host specified to its designated peers. + + @param host host to flush + @remarks this function need only be used in circumstances where one wishes to send queued packets earlier than in a call to enet_host_service(). + @ingroup host +*/ +void +enet_host_flush (ENetHost * host) +{ + host -> serviceTime = enet_time_get (); + + enet_protocol_send_outgoing_commands (host, NULL, 0); +} + +/** Checks for any queued events on the host and dispatches one if available. + + @param host host to check for events + @param event an event structure where event details will be placed if available + @retval > 0 if an event was dispatched + @retval 0 if no events are available + @retval < 0 on failure + @ingroup host +*/ +int +enet_host_check_events (ENetHost * host, ENetEvent * event) +{ + if (event == NULL) return -1; + + event -> type = ENET_EVENT_TYPE_NONE; + event -> peer = NULL; + event -> packet = NULL; + + return enet_protocol_dispatch_incoming_commands (host, event); +} + +/** Waits for events on the host specified and shuttles packets between + the host and its peers. + + @param host host to service + @param event an event structure where event details will be placed if one occurs + if event == NULL then no events will be delivered + @param timeout number of milliseconds that ENet should wait for events + @retval > 0 if an event occurred within the specified time limit + @retval 0 if no event occurred + @retval < 0 on failure + @remarks enet_host_service should be called fairly regularly for adequate performance + @ingroup host +*/ +int +enet_host_service (ENetHost * host, ENetEvent * event, enet_uint32 timeout) +{ + enet_uint32 waitCondition; + + if (event != NULL) + { + event -> type = ENET_EVENT_TYPE_NONE; + event -> peer = NULL; + event -> packet = NULL; + + switch (enet_protocol_dispatch_incoming_commands (host, event)) + { + case 1: + return 1; + + case -1: +#ifdef ENET_DEBUG + perror ("Error dispatching incoming packets"); +#endif + + return -1; + + default: + break; + } + } + + host -> serviceTime = enet_time_get (); + + timeout += host -> serviceTime; + + do + { + if (ENET_TIME_DIFFERENCE (host -> serviceTime, host -> bandwidthThrottleEpoch) >= ENET_HOST_BANDWIDTH_THROTTLE_INTERVAL) + enet_host_bandwidth_throttle (host); + + switch (enet_protocol_send_outgoing_commands (host, event, 1)) + { + case 1: + return 1; + + case -1: +#ifdef ENET_DEBUG + perror ("Error sending outgoing packets"); +#endif + + return -1; + + default: + break; + } + + switch (enet_protocol_receive_incoming_commands (host, event)) + { + case 1: + return 1; + + case -1: +#ifdef ENET_DEBUG + perror ("Error receiving incoming packets"); +#endif + + return -1; + + default: + break; + } + + switch (enet_protocol_send_outgoing_commands (host, event, 1)) + { + case 1: + return 1; + + case -1: +#ifdef ENET_DEBUG + perror ("Error sending outgoing packets"); +#endif + + return -1; + + default: + break; + } + + if (event != NULL) + { + switch (enet_protocol_dispatch_incoming_commands (host, event)) + { + case 1: + return 1; + + case -1: +#ifdef ENET_DEBUG + perror ("Error dispatching incoming packets"); +#endif + + return -1; + + default: + break; + } + } + + if (ENET_TIME_GREATER_EQUAL (host -> serviceTime, timeout)) + return 0; + + do + { + host -> serviceTime = enet_time_get (); + + if (ENET_TIME_GREATER_EQUAL (host -> serviceTime, timeout)) + return 0; + + waitCondition = ENET_SOCKET_WAIT_RECEIVE | ENET_SOCKET_WAIT_INTERRUPT; + + if (enet_socket_wait (host -> socket, & waitCondition, ENET_TIME_DIFFERENCE (timeout, host -> serviceTime)) != 0) + return -1; + } + while (waitCondition & ENET_SOCKET_WAIT_INTERRUPT); + + host -> serviceTime = enet_time_get (); + } while (waitCondition & ENET_SOCKET_WAIT_RECEIVE); + + return 0; +} + diff --git a/enet server test/enet2/unix.c b/enet server test/enet2/unix.c new file mode 100644 index 0000000..19ee76f --- /dev/null +++ b/enet server test/enet2/unix.c @@ -0,0 +1,557 @@ +/** + @file unix.c + @brief ENet Unix system specific functions +*/ +#ifndef _WIN32 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define ENET_BUILDING_LIB 1 +#include "enet/enet.h" + +#ifdef __APPLE__ +#ifdef HAS_POLL +#undef HAS_POLL +#endif +#ifndef HAS_FCNTL +#define HAS_FCNTL 1 +#endif +#ifndef HAS_INET_PTON +#define HAS_INET_PTON 1 +#endif +#ifndef HAS_INET_NTOP +#define HAS_INET_NTOP 1 +#endif +#ifndef HAS_MSGHDR_FLAGS +#define HAS_MSGHDR_FLAGS 1 +#endif +#ifndef HAS_SOCKLEN_T +#define HAS_SOCKLEN_T 1 +#endif +#endif + +#ifdef HAS_FCNTL +#include +#endif + +#ifdef HAS_POLL +#include +#endif + +#ifndef HAS_SOCKLEN_T +typedef int socklen_t; +#endif + +#ifndef MSG_NOSIGNAL +#define MSG_NOSIGNAL 0 +#endif + +static enet_uint32 timeBase = 0; + +int +enet_initialize (void) +{ + return 0; +} + +void +enet_deinitialize (void) +{ +} + +enet_uint32 +enet_host_random_seed (void) +{ + return (enet_uint32) time (NULL); +} + +enet_uint32 +enet_time_get (void) +{ + struct timeval timeVal; + + gettimeofday (& timeVal, NULL); + + return timeVal.tv_sec * 1000 + timeVal.tv_usec / 1000 - timeBase; +} + +void +enet_time_set (enet_uint32 newTimeBase) +{ + struct timeval timeVal; + + gettimeofday (& timeVal, NULL); + + timeBase = timeVal.tv_sec * 1000 + timeVal.tv_usec / 1000 - newTimeBase; +} + +int +enet_address_set_host (ENetAddress * address, const char * name) +{ + struct hostent * hostEntry = NULL; +#ifdef HAS_GETHOSTBYNAME_R + struct hostent hostData; + char buffer [2048]; + int errnum; + +#if defined(linux) || defined(__linux) || defined(__linux__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) + gethostbyname_r (name, & hostData, buffer, sizeof (buffer), & hostEntry, & errnum); +#else + hostEntry = gethostbyname_r (name, & hostData, buffer, sizeof (buffer), & errnum); +#endif +#else + hostEntry = gethostbyname (name); +#endif + + if (hostEntry == NULL || + hostEntry -> h_addrtype != AF_INET) + { +#ifdef HAS_INET_PTON + if (! inet_pton (AF_INET, name, & address -> host)) +#else + if (! inet_aton (name, (struct in_addr *) & address -> host)) +#endif + return -1; + return 0; + } + + address -> host = * (enet_uint32 *) hostEntry -> h_addr_list [0]; + + return 0; +} + +int +enet_address_get_host_ip (const ENetAddress * address, char * name, size_t nameLength) +{ +#ifdef HAS_INET_NTOP + if (inet_ntop (AF_INET, & address -> host, name, nameLength) == NULL) +#else + char * addr = inet_ntoa (* (struct in_addr *) & address -> host); + if (addr != NULL) + { + size_t addrLen = strlen(addr); + if (addrLen >= nameLength) + return -1; + memcpy (name, addr, addrLen + 1); + } + else +#endif + return -1; + return 0; +} + +int +enet_address_get_host (const ENetAddress * address, char * name, size_t nameLength) +{ + struct in_addr in; + struct hostent * hostEntry = NULL; +#ifdef HAS_GETHOSTBYADDR_R + struct hostent hostData; + char buffer [2048]; + int errnum; + + in.s_addr = address -> host; + +#if defined(linux) || defined(__linux) || defined(__linux__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) + gethostbyaddr_r ((char *) & in, sizeof (struct in_addr), AF_INET, & hostData, buffer, sizeof (buffer), & hostEntry, & errnum); +#else + hostEntry = gethostbyaddr_r ((char *) & in, sizeof (struct in_addr), AF_INET, & hostData, buffer, sizeof (buffer), & errnum); +#endif +#else + in.s_addr = address -> host; + + hostEntry = gethostbyaddr ((char *) & in, sizeof (struct in_addr), AF_INET); +#endif + + if (hostEntry == NULL) + return enet_address_get_host_ip (address, name, nameLength); + else + { + size_t hostLen = strlen (hostEntry -> h_name); + if (hostLen >= nameLength) + return -1; + memcpy (name, hostEntry -> h_name, hostLen + 1); + } + + return 0; +} + +int +enet_socket_bind (ENetSocket socket, const ENetAddress * address) +{ + struct sockaddr_in sin; + + memset (& sin, 0, sizeof (struct sockaddr_in)); + + sin.sin_family = AF_INET; + + if (address != NULL) + { + sin.sin_port = ENET_HOST_TO_NET_16 (address -> port); + sin.sin_addr.s_addr = address -> host; + } + else + { + sin.sin_port = 0; + sin.sin_addr.s_addr = INADDR_ANY; + } + + return bind (socket, + (struct sockaddr *) & sin, + sizeof (struct sockaddr_in)); +} + +int +enet_socket_get_address (ENetSocket socket, ENetAddress * address) +{ + struct sockaddr_in sin; + socklen_t sinLength = sizeof (struct sockaddr_in); + + if (getsockname (socket, (struct sockaddr *) & sin, & sinLength) == -1) + return -1; + + address -> host = (enet_uint32) sin.sin_addr.s_addr; + address -> port = ENET_NET_TO_HOST_16 (sin.sin_port); + + return 0; +} + +int +enet_socket_listen (ENetSocket socket, int backlog) +{ + return listen (socket, backlog < 0 ? SOMAXCONN : backlog); +} + +ENetSocket +enet_socket_create (ENetSocketType type) +{ + return socket (PF_INET, type == ENET_SOCKET_TYPE_DATAGRAM ? SOCK_DGRAM : SOCK_STREAM, 0); +} + +int +enet_socket_set_option (ENetSocket socket, ENetSocketOption option, int value) +{ + int result = -1; + switch (option) + { + case ENET_SOCKOPT_NONBLOCK: +#ifdef HAS_FCNTL + result = fcntl (socket, F_SETFL, (value ? O_NONBLOCK : 0) | (fcntl (socket, F_GETFL) & ~O_NONBLOCK)); +#else + result = ioctl (socket, FIONBIO, & value); +#endif + break; + + case ENET_SOCKOPT_BROADCAST: + result = setsockopt (socket, SOL_SOCKET, SO_BROADCAST, (char *) & value, sizeof (int)); + break; + + case ENET_SOCKOPT_REUSEADDR: + result = setsockopt (socket, SOL_SOCKET, SO_REUSEADDR, (char *) & value, sizeof (int)); + break; + + case ENET_SOCKOPT_RCVBUF: + result = setsockopt (socket, SOL_SOCKET, SO_RCVBUF, (char *) & value, sizeof (int)); + break; + + case ENET_SOCKOPT_SNDBUF: + result = setsockopt (socket, SOL_SOCKET, SO_SNDBUF, (char *) & value, sizeof (int)); + break; + + case ENET_SOCKOPT_RCVTIMEO: + { + struct timeval timeVal; + timeVal.tv_sec = value / 1000; + timeVal.tv_usec = (value % 1000) * 1000; + result = setsockopt (socket, SOL_SOCKET, SO_RCVTIMEO, (char *) & timeVal, sizeof (struct timeval)); + break; + } + + case ENET_SOCKOPT_SNDTIMEO: + { + struct timeval timeVal; + timeVal.tv_sec = value / 1000; + timeVal.tv_usec = (value % 1000) * 1000; + result = setsockopt (socket, SOL_SOCKET, SO_SNDTIMEO, (char *) & timeVal, sizeof (struct timeval)); + break; + } + + case ENET_SOCKOPT_NODELAY: + result = setsockopt (socket, IPPROTO_TCP, TCP_NODELAY, (char *) & value, sizeof (int)); + break; + + default: + break; + } + return result == -1 ? -1 : 0; +} + +int +enet_socket_get_option (ENetSocket socket, ENetSocketOption option, int * value) +{ + int result = -1; + socklen_t len; + switch (option) + { + case ENET_SOCKOPT_ERROR: + len = sizeof (int); + result = getsockopt (socket, SOL_SOCKET, SO_ERROR, value, & len); + break; + + default: + break; + } + return result == -1 ? -1 : 0; +} + +int +enet_socket_connect (ENetSocket socket, const ENetAddress * address) +{ + struct sockaddr_in sin; + int result; + + memset (& sin, 0, sizeof (struct sockaddr_in)); + + sin.sin_family = AF_INET; + sin.sin_port = ENET_HOST_TO_NET_16 (address -> port); + sin.sin_addr.s_addr = address -> host; + + result = connect (socket, (struct sockaddr *) & sin, sizeof (struct sockaddr_in)); + if (result == -1 && errno == EINPROGRESS) + return 0; + + return result; +} + +ENetSocket +enet_socket_accept (ENetSocket socket, ENetAddress * address) +{ + int result; + struct sockaddr_in sin; + socklen_t sinLength = sizeof (struct sockaddr_in); + + result = accept (socket, + address != NULL ? (struct sockaddr *) & sin : NULL, + address != NULL ? & sinLength : NULL); + + if (result == -1) + return ENET_SOCKET_NULL; + + if (address != NULL) + { + address -> host = (enet_uint32) sin.sin_addr.s_addr; + address -> port = ENET_NET_TO_HOST_16 (sin.sin_port); + } + + return result; +} + +int +enet_socket_shutdown (ENetSocket socket, ENetSocketShutdown how) +{ + return shutdown (socket, (int) how); +} + +void +enet_socket_destroy (ENetSocket socket) +{ + if (socket != -1) + close (socket); +} + +int +enet_socket_send (ENetSocket socket, + const ENetAddress * address, + const ENetBuffer * buffers, + size_t bufferCount) +{ + struct msghdr msgHdr; + struct sockaddr_in sin; + int sentLength; + + memset (& msgHdr, 0, sizeof (struct msghdr)); + + if (address != NULL) + { + memset (& sin, 0, sizeof (struct sockaddr_in)); + + sin.sin_family = AF_INET; + sin.sin_port = ENET_HOST_TO_NET_16 (address -> port); + sin.sin_addr.s_addr = address -> host; + + msgHdr.msg_name = & sin; + msgHdr.msg_namelen = sizeof (struct sockaddr_in); + } + + msgHdr.msg_iov = (struct iovec *) buffers; + msgHdr.msg_iovlen = bufferCount; + + sentLength = sendmsg (socket, & msgHdr, MSG_NOSIGNAL); + + if (sentLength == -1) + { + if (errno == EWOULDBLOCK) + return 0; + + return -1; + } + + return sentLength; +} + +int +enet_socket_receive (ENetSocket socket, + ENetAddress * address, + ENetBuffer * buffers, + size_t bufferCount) +{ + struct msghdr msgHdr; + struct sockaddr_in sin; + int recvLength; + + memset (& msgHdr, 0, sizeof (struct msghdr)); + + if (address != NULL) + { + msgHdr.msg_name = & sin; + msgHdr.msg_namelen = sizeof (struct sockaddr_in); + } + + msgHdr.msg_iov = (struct iovec *) buffers; + msgHdr.msg_iovlen = bufferCount; + + recvLength = recvmsg (socket, & msgHdr, MSG_NOSIGNAL); + + if (recvLength == -1) + { + if (errno == EWOULDBLOCK) + return 0; + + return -1; + } + +#ifdef HAS_MSGHDR_FLAGS + if (msgHdr.msg_flags & MSG_TRUNC) + return -1; +#endif + + if (address != NULL) + { + address -> host = (enet_uint32) sin.sin_addr.s_addr; + address -> port = ENET_NET_TO_HOST_16 (sin.sin_port); + } + + return recvLength; +} + +int +enet_socketset_select (ENetSocket maxSocket, ENetSocketSet * readSet, ENetSocketSet * writeSet, enet_uint32 timeout) +{ + struct timeval timeVal; + + timeVal.tv_sec = timeout / 1000; + timeVal.tv_usec = (timeout % 1000) * 1000; + + return select (maxSocket + 1, readSet, writeSet, NULL, & timeVal); +} + +int +enet_socket_wait (ENetSocket socket, enet_uint32 * condition, enet_uint32 timeout) +{ +#ifdef HAS_POLL + struct pollfd pollSocket; + int pollCount; + + pollSocket.fd = socket; + pollSocket.events = 0; + + if (* condition & ENET_SOCKET_WAIT_SEND) + pollSocket.events |= POLLOUT; + + if (* condition & ENET_SOCKET_WAIT_RECEIVE) + pollSocket.events |= POLLIN; + + pollCount = poll (& pollSocket, 1, timeout); + + if (pollCount < 0) + { + if (errno == EINTR && * condition & ENET_SOCKET_WAIT_INTERRUPT) + { + * condition = ENET_SOCKET_WAIT_INTERRUPT; + + return 0; + } + + return -1; + } + + * condition = ENET_SOCKET_WAIT_NONE; + + if (pollCount == 0) + return 0; + + if (pollSocket.revents & POLLOUT) + * condition |= ENET_SOCKET_WAIT_SEND; + + if (pollSocket.revents & POLLIN) + * condition |= ENET_SOCKET_WAIT_RECEIVE; + + return 0; +#else + fd_set readSet, writeSet; + struct timeval timeVal; + int selectCount; + + timeVal.tv_sec = timeout / 1000; + timeVal.tv_usec = (timeout % 1000) * 1000; + + FD_ZERO (& readSet); + FD_ZERO (& writeSet); + + if (* condition & ENET_SOCKET_WAIT_SEND) + FD_SET (socket, & writeSet); + + if (* condition & ENET_SOCKET_WAIT_RECEIVE) + FD_SET (socket, & readSet); + + selectCount = select (socket + 1, & readSet, & writeSet, NULL, & timeVal); + + if (selectCount < 0) + { + if (errno == EINTR && * condition & ENET_SOCKET_WAIT_INTERRUPT) + { + * condition = ENET_SOCKET_WAIT_INTERRUPT; + + return 0; + } + + return -1; + } + + * condition = ENET_SOCKET_WAIT_NONE; + + if (selectCount == 0) + return 0; + + if (FD_ISSET (socket, & writeSet)) + * condition |= ENET_SOCKET_WAIT_SEND; + + if (FD_ISSET (socket, & readSet)) + * condition |= ENET_SOCKET_WAIT_RECEIVE; + + return 0; +#endif +} + +#endif + diff --git a/enet server test/enet2/win32.c b/enet server test/enet2/win32.c new file mode 100644 index 0000000..5cc1679 --- /dev/null +++ b/enet server test/enet2/win32.c @@ -0,0 +1,422 @@ +/** + @file win32.c + @brief ENet Win32 system specific functions +*/ +#ifdef _WIN32 + +#define ENET_BUILDING_LIB 1 +#include "enet/enet.h" +#include +#include + +static enet_uint32 timeBase = 0; + +int +enet_initialize (void) +{ + WORD versionRequested = MAKEWORD (1, 1); + WSADATA wsaData; + + if (WSAStartup (versionRequested, & wsaData)) + return -1; + + if (LOBYTE (wsaData.wVersion) != 1|| + HIBYTE (wsaData.wVersion) != 1) + { + WSACleanup (); + + return -1; + } + + timeBeginPeriod (1); + + return 0; +} + +void +enet_deinitialize (void) +{ + timeEndPeriod (1); + + WSACleanup (); +} + +enet_uint32 +enet_host_random_seed (void) +{ + return (enet_uint32) timeGetTime (); +} + +enet_uint32 +enet_time_get (void) +{ + return (enet_uint32) timeGetTime () - timeBase; +} + +void +enet_time_set (enet_uint32 newTimeBase) +{ + timeBase = (enet_uint32) timeGetTime () - newTimeBase; +} + +int +enet_address_set_host (ENetAddress * address, const char * name) +{ + struct hostent * hostEntry; + + hostEntry = gethostbyname (name); + if (hostEntry == NULL || + hostEntry -> h_addrtype != AF_INET) + { + unsigned long host = inet_addr (name); + if (host == INADDR_NONE) + return -1; + address -> host = host; + return 0; + } + + address -> host = * (enet_uint32 *) hostEntry -> h_addr_list [0]; + + return 0; +} + +int +enet_address_get_host_ip (const ENetAddress * address, char * name, size_t nameLength) +{ + char * addr = inet_ntoa (* (struct in_addr *) & address -> host); + if (addr == NULL) + return -1; + else + { + size_t addrLen = strlen(addr); + if (addrLen >= nameLength) + return -1; + memcpy (name, addr, addrLen + 1); + } + return 0; +} + +int +enet_address_get_host (const ENetAddress * address, char * name, size_t nameLength) +{ + struct in_addr in; + struct hostent * hostEntry; + + in.s_addr = address -> host; + + hostEntry = gethostbyaddr ((char *) & in, sizeof (struct in_addr), AF_INET); + if (hostEntry == NULL) + return enet_address_get_host_ip (address, name, nameLength); + else + { + size_t hostLen = strlen (hostEntry -> h_name); + if (hostLen >= nameLength) + return -1; + memcpy (name, hostEntry -> h_name, hostLen + 1); + } + + return 0; +} + +int +enet_socket_bind (ENetSocket socket, const ENetAddress * address) +{ + struct sockaddr_in sin; + + memset (& sin, 0, sizeof (struct sockaddr_in)); + + sin.sin_family = AF_INET; + + if (address != NULL) + { + sin.sin_port = ENET_HOST_TO_NET_16 (address -> port); + sin.sin_addr.s_addr = address -> host; + } + else + { + sin.sin_port = 0; + sin.sin_addr.s_addr = INADDR_ANY; + } + + return bind (socket, + (struct sockaddr *) & sin, + sizeof (struct sockaddr_in)) == SOCKET_ERROR ? -1 : 0; +} + +int +enet_socket_get_address (ENetSocket socket, ENetAddress * address) +{ + struct sockaddr_in sin; + int sinLength = sizeof (struct sockaddr_in); + + if (getsockname (socket, (struct sockaddr *) & sin, & sinLength) == -1) + return -1; + + address -> host = (enet_uint32) sin.sin_addr.s_addr; + address -> port = ENET_NET_TO_HOST_16 (sin.sin_port); + + return 0; +} + +int +enet_socket_listen (ENetSocket socket, int backlog) +{ + return listen (socket, backlog < 0 ? SOMAXCONN : backlog) == SOCKET_ERROR ? -1 : 0; +} + +ENetSocket +enet_socket_create (ENetSocketType type) +{ + return socket (PF_INET, type == ENET_SOCKET_TYPE_DATAGRAM ? SOCK_DGRAM : SOCK_STREAM, 0); +} + +int +enet_socket_set_option (ENetSocket socket, ENetSocketOption option, int value) +{ + int result = SOCKET_ERROR; + switch (option) + { + case ENET_SOCKOPT_NONBLOCK: + { + u_long nonBlocking = (u_long) value; + result = ioctlsocket (socket, FIONBIO, & nonBlocking); + break; + } + + case ENET_SOCKOPT_BROADCAST: + result = setsockopt (socket, SOL_SOCKET, SO_BROADCAST, (char *) & value, sizeof (int)); + break; + + case ENET_SOCKOPT_REUSEADDR: + result = setsockopt (socket, SOL_SOCKET, SO_REUSEADDR, (char *) & value, sizeof (int)); + break; + + case ENET_SOCKOPT_RCVBUF: + result = setsockopt (socket, SOL_SOCKET, SO_RCVBUF, (char *) & value, sizeof (int)); + break; + + case ENET_SOCKOPT_SNDBUF: + result = setsockopt (socket, SOL_SOCKET, SO_SNDBUF, (char *) & value, sizeof (int)); + break; + + case ENET_SOCKOPT_RCVTIMEO: + result = setsockopt (socket, SOL_SOCKET, SO_RCVTIMEO, (char *) & value, sizeof (int)); + break; + + case ENET_SOCKOPT_SNDTIMEO: + result = setsockopt (socket, SOL_SOCKET, SO_SNDTIMEO, (char *) & value, sizeof (int)); + break; + + case ENET_SOCKOPT_NODELAY: + result = setsockopt (socket, IPPROTO_TCP, TCP_NODELAY, (char *) & value, sizeof (int)); + break; + + default: + break; + } + return result == SOCKET_ERROR ? -1 : 0; +} + +int +enet_socket_get_option (ENetSocket socket, ENetSocketOption option, int * value) +{ + int result = SOCKET_ERROR, len; + switch (option) + { + case ENET_SOCKOPT_ERROR: + len = sizeof(int); + result = getsockopt (socket, SOL_SOCKET, SO_ERROR, (char *) value, & len); + break; + + default: + break; + } + return result == SOCKET_ERROR ? -1 : 0; +} + +int +enet_socket_connect (ENetSocket socket, const ENetAddress * address) +{ + struct sockaddr_in sin; + int result; + + memset (& sin, 0, sizeof (struct sockaddr_in)); + + sin.sin_family = AF_INET; + sin.sin_port = ENET_HOST_TO_NET_16 (address -> port); + sin.sin_addr.s_addr = address -> host; + + result = connect (socket, (struct sockaddr *) & sin, sizeof (struct sockaddr_in)); + if (result == SOCKET_ERROR && WSAGetLastError () != WSAEWOULDBLOCK) + return -1; + + return 0; +} + +ENetSocket +enet_socket_accept (ENetSocket socket, ENetAddress * address) +{ + SOCKET result; + struct sockaddr_in sin; + int sinLength = sizeof (struct sockaddr_in); + + result = accept (socket, + address != NULL ? (struct sockaddr *) & sin : NULL, + address != NULL ? & sinLength : NULL); + + if (result == INVALID_SOCKET) + return ENET_SOCKET_NULL; + + if (address != NULL) + { + address -> host = (enet_uint32) sin.sin_addr.s_addr; + address -> port = ENET_NET_TO_HOST_16 (sin.sin_port); + } + + return result; +} + +int +enet_socket_shutdown (ENetSocket socket, ENetSocketShutdown how) +{ + return shutdown (socket, (int) how) == SOCKET_ERROR ? -1 : 0; +} + +void +enet_socket_destroy (ENetSocket socket) +{ + if (socket != INVALID_SOCKET) + closesocket (socket); +} + +int +enet_socket_send (ENetSocket socket, + const ENetAddress * address, + const ENetBuffer * buffers, + size_t bufferCount) +{ + struct sockaddr_in sin; + DWORD sentLength; + + if (address != NULL) + { + memset (& sin, 0, sizeof (struct sockaddr_in)); + + sin.sin_family = AF_INET; + sin.sin_port = ENET_HOST_TO_NET_16 (address -> port); + sin.sin_addr.s_addr = address -> host; + } + + if (WSASendTo (socket, + (LPWSABUF) buffers, + (DWORD) bufferCount, + & sentLength, + 0, + address != NULL ? (struct sockaddr *) & sin : NULL, + address != NULL ? sizeof (struct sockaddr_in) : 0, + NULL, + NULL) == SOCKET_ERROR) + { + if (WSAGetLastError () == WSAEWOULDBLOCK) + return 0; + + return -1; + } + + return (int) sentLength; +} + +int +enet_socket_receive (ENetSocket socket, + ENetAddress * address, + ENetBuffer * buffers, + size_t bufferCount) +{ + INT sinLength = sizeof (struct sockaddr_in); + DWORD flags = 0, + recvLength; + struct sockaddr_in sin; + + if (WSARecvFrom (socket, + (LPWSABUF) buffers, + (DWORD) bufferCount, + & recvLength, + & flags, + address != NULL ? (struct sockaddr *) & sin : NULL, + address != NULL ? & sinLength : NULL, + NULL, + NULL) == SOCKET_ERROR) + { + switch (WSAGetLastError ()) + { + case WSAEWOULDBLOCK: + case WSAECONNRESET: + return 0; + } + + return -1; + } + + if (flags & MSG_PARTIAL) + return -1; + + if (address != NULL) + { + address -> host = (enet_uint32) sin.sin_addr.s_addr; + address -> port = ENET_NET_TO_HOST_16 (sin.sin_port); + } + + return (int) recvLength; +} + +int +enet_socketset_select (ENetSocket maxSocket, ENetSocketSet * readSet, ENetSocketSet * writeSet, enet_uint32 timeout) +{ + struct timeval timeVal; + + timeVal.tv_sec = timeout / 1000; + timeVal.tv_usec = (timeout % 1000) * 1000; + + return select (maxSocket + 1, readSet, writeSet, NULL, & timeVal); +} + +int +enet_socket_wait (ENetSocket socket, enet_uint32 * condition, enet_uint32 timeout) +{ + fd_set readSet, writeSet; + struct timeval timeVal; + int selectCount; + + timeVal.tv_sec = timeout / 1000; + timeVal.tv_usec = (timeout % 1000) * 1000; + + FD_ZERO (& readSet); + FD_ZERO (& writeSet); + + if (* condition & ENET_SOCKET_WAIT_SEND) + FD_SET (socket, & writeSet); + + if (* condition & ENET_SOCKET_WAIT_RECEIVE) + FD_SET (socket, & readSet); + + selectCount = select (socket + 1, & readSet, & writeSet, NULL, & timeVal); + + if (selectCount < 0) + return -1; + + * condition = ENET_SOCKET_WAIT_NONE; + + if (selectCount == 0) + return 0; + + if (FD_ISSET (socket, & writeSet)) + * condition |= ENET_SOCKET_WAIT_SEND; + + if (FD_ISSET (socket, & readSet)) + * condition |= ENET_SOCKET_WAIT_RECEIVE; + + return 0; +} + +#endif + diff --git a/enet server test/json.hpp b/enet server test/json.hpp new file mode 100644 index 0000000..b80386f --- /dev/null +++ b/enet server test/json.hpp @@ -0,0 +1,18912 @@ +/* + __ _____ _____ _____ + __| | __| | | | JSON for Modern C++ +| | |__ | | | | | | version 3.2.0 +|_____|_____|_____|_|___| https://github.com/nlohmann/json + +Licensed under the MIT License . +SPDX-License-Identifier: MIT +Copyright (c) 2013-2018 Niels Lohmann . + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +*/ + +#ifndef NLOHMANN_JSON_HPP +#define NLOHMANN_JSON_HPP + +#define NLOHMANN_JSON_VERSION_MAJOR 3 +#define NLOHMANN_JSON_VERSION_MINOR 2 +#define NLOHMANN_JSON_VERSION_PATCH 0 + +#include // all_of, find, for_each +#include // assert +#include // and, not, or +#include // nullptr_t, ptrdiff_t, size_t +#include // hash, less +#include // initializer_list +#include // istream, ostream +#include // iterator_traits, random_access_iterator_tag +#include // accumulate +#include // string, stoi, to_string +#include // declval, forward, move, pair, swap + +// #include +#ifndef NLOHMANN_JSON_FWD_HPP +#define NLOHMANN_JSON_FWD_HPP + +#include // int64_t, uint64_t +#include // map +#include // allocator +#include // string +#include // vector + +/*! +@brief namespace for Niels Lohmann +@see https://github.com/nlohmann +@since version 1.0.0 +*/ +namespace nlohmann +{ +/*! +@brief default JSONSerializer template argument + +This serializer ignores the template arguments and uses ADL +([argument-dependent lookup](https://en.cppreference.com/w/cpp/language/adl)) +for serialization. +*/ +template +struct adl_serializer; + +template class ObjectType = + std::map, + template class ArrayType = std::vector, + class StringType = std::string, class BooleanType = bool, + class NumberIntegerType = std::int64_t, + class NumberUnsignedType = std::uint64_t, + class NumberFloatType = double, + template class AllocatorType = std::allocator, + template class JSONSerializer = + adl_serializer> +class basic_json; + +/*! +@brief JSON Pointer + +A JSON pointer defines a string syntax for identifying a specific value +within a JSON document. It can be used with functions `at` and +`operator[]`. Furthermore, JSON pointers are the base for JSON patches. + +@sa [RFC 6901](https://tools.ietf.org/html/rfc6901) + +@since version 2.0.0 +*/ +template +class json_pointer; + +/*! +@brief default JSON class + +This type is the default specialization of the @ref basic_json class which +uses the standard template types. + +@since version 1.0.0 +*/ +using json = basic_json<>; +} + +#endif + +// #include + + +// This file contains all internal macro definitions +// You MUST include macro_unscope.hpp at the end of json.hpp to undef all of them + +// exclude unsupported compilers +#if !defined(JSON_SKIP_UNSUPPORTED_COMPILER_CHECK) + #if defined(__clang__) + #if (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__) < 30400 + #error "unsupported Clang version - see https://github.com/nlohmann/json#supported-compilers" + #endif + #elif defined(__GNUC__) && !(defined(__ICC) || defined(__INTEL_COMPILER)) + #if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) < 40900 + #error "unsupported GCC version - see https://github.com/nlohmann/json#supported-compilers" + #endif + #endif +#endif + +// disable float-equal warnings on GCC/clang +#if defined(__clang__) || defined(__GNUC__) || defined(__GNUG__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wfloat-equal" +#endif + +// disable documentation warnings on clang +#if defined(__clang__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wdocumentation" +#endif + +// allow for portable deprecation warnings +#if defined(__clang__) || defined(__GNUC__) || defined(__GNUG__) + #define JSON_DEPRECATED __attribute__((deprecated)) +#elif defined(_MSC_VER) + #define JSON_DEPRECATED __declspec(deprecated) +#else + #define JSON_DEPRECATED +#endif + +// allow to disable exceptions +#if (defined(__cpp_exceptions) || defined(__EXCEPTIONS) || defined(_CPPUNWIND)) && !defined(JSON_NOEXCEPTION) + #define JSON_THROW(exception) throw exception + #define JSON_TRY try + #define JSON_CATCH(exception) catch(exception) + #define JSON_INTERNAL_CATCH(exception) catch(exception) +#else + #define JSON_THROW(exception) std::abort() + #define JSON_TRY if(true) + #define JSON_CATCH(exception) if(false) + #define JSON_INTERNAL_CATCH(exception) if(false) +#endif + +// override exception macros +#if defined(JSON_THROW_USER) + #undef JSON_THROW + #define JSON_THROW JSON_THROW_USER +#endif +#if defined(JSON_TRY_USER) + #undef JSON_TRY + #define JSON_TRY JSON_TRY_USER +#endif +#if defined(JSON_CATCH_USER) + #undef JSON_CATCH + #define JSON_CATCH JSON_CATCH_USER + #define JSON_INTERNAL_CATCH JSON_CATCH_USER +#endif +#if defined(JSON_INTERNAL_CATCH_USER) + #undef JSON_INTERNAL_CATCH + #define JSON_INTERNAL_CATCH JSON_INTERNAL_CATCH_USER +#endif + +// manual branch prediction +#if defined(__clang__) || defined(__GNUC__) || defined(__GNUG__) + #define JSON_LIKELY(x) __builtin_expect(!!(x), 1) + #define JSON_UNLIKELY(x) __builtin_expect(!!(x), 0) +#else + #define JSON_LIKELY(x) x + #define JSON_UNLIKELY(x) x +#endif + +// C++ language standard detection +#if (defined(__cplusplus) && __cplusplus >= 201703L) || (defined(_HAS_CXX17) && _HAS_CXX17 == 1) // fix for issue #464 + #define JSON_HAS_CPP_17 + #define JSON_HAS_CPP_14 +#elif (defined(__cplusplus) && __cplusplus >= 201402L) || (defined(_HAS_CXX14) && _HAS_CXX14 == 1) + #define JSON_HAS_CPP_14 +#endif + +// Ugly macros to avoid uglier copy-paste when specializing basic_json. They +// may be removed in the future once the class is split. + +#define NLOHMANN_BASIC_JSON_TPL_DECLARATION \ + template class ObjectType, \ + template class ArrayType, \ + class StringType, class BooleanType, class NumberIntegerType, \ + class NumberUnsignedType, class NumberFloatType, \ + template class AllocatorType, \ + template class JSONSerializer> + +#define NLOHMANN_BASIC_JSON_TPL \ + basic_json + +/*! +@brief Helper to determine whether there's a key_type for T. + +This helper is used to tell associative containers apart from other containers +such as sequence containers. For instance, `std::map` passes the test as it +contains a `mapped_type`, whereas `std::vector` fails the test. + +@sa http://stackoverflow.com/a/7728728/266378 +@since version 1.0.0, overworked in version 2.0.6 +*/ +#define NLOHMANN_JSON_HAS_HELPER(type) \ + template struct has_##type { \ + private: \ + template \ + static int detect(U &&); \ + static void detect(...); \ + public: \ + static constexpr bool value = \ + std::is_integral()))>::value; \ + } + +// #include + + +#include // not +#include // size_t +#include // conditional, enable_if, false_type, integral_constant, is_constructible, is_integral, is_same, remove_cv, remove_reference, true_type + +namespace nlohmann +{ +namespace detail +{ +// alias templates to reduce boilerplate +template +using enable_if_t = typename std::enable_if::type; + +template +using uncvref_t = typename std::remove_cv::type>::type; + +// implementation of C++14 index_sequence and affiliates +// source: https://stackoverflow.com/a/32223343 +template +struct index_sequence +{ + using type = index_sequence; + using value_type = std::size_t; + static constexpr std::size_t size() noexcept + { + return sizeof...(Ints); + } +}; + +template +struct merge_and_renumber; + +template +struct merge_and_renumber, index_sequence> + : index_sequence < I1..., (sizeof...(I1) + I2)... > {}; + +template +struct make_index_sequence + : merge_and_renumber < typename make_index_sequence < N / 2 >::type, + typename make_index_sequence < N - N / 2 >::type > {}; + +template<> struct make_index_sequence<0> : index_sequence<> {}; +template<> struct make_index_sequence<1> : index_sequence<0> {}; + +template +using index_sequence_for = make_index_sequence; + +/* +Implementation of two C++17 constructs: conjunction, negation. This is needed +to avoid evaluating all the traits in a condition + +For example: not std::is_same::value and has_value_type::value +will not compile when T = void (on MSVC at least). Whereas +conjunction>, has_value_type>::value will +stop evaluating if negation<...>::value == false + +Please note that those constructs must be used with caution, since symbols can +become very long quickly (which can slow down compilation and cause MSVC +internal compiler errors). Only use it when you have to (see example ahead). +*/ +template struct conjunction : std::true_type {}; +template struct conjunction : B1 {}; +template +struct conjunction : std::conditional, B1>::type {}; + +template struct negation : std::integral_constant {}; + +// dispatch utility (taken from ranges-v3) +template struct priority_tag : priority_tag < N - 1 > {}; +template<> struct priority_tag<0> {}; + +// taken from ranges-v3 +template +struct static_const +{ + static constexpr T value{}; +}; + +template +constexpr T static_const::value; +} +} + +// #include + + +#include // not +#include // numeric_limits +#include // false_type, is_constructible, is_integral, is_same, true_type +#include // declval + +// #include + +// #include + +// #include + + +namespace nlohmann +{ +/*! +@brief detail namespace with internal helper functions + +This namespace collects functions that should not be exposed, +implementations of some @ref basic_json methods, and meta-programming helpers. + +@since version 2.1.0 +*/ +namespace detail +{ +///////////// +// helpers // +///////////// + +template struct is_basic_json : std::false_type {}; + +NLOHMANN_BASIC_JSON_TPL_DECLARATION +struct is_basic_json : std::true_type {}; + +//////////////////////// +// has_/is_ functions // +//////////////////////// + +// source: https://stackoverflow.com/a/37193089/4116453 + +template +struct is_complete_type : std::false_type {}; + +template +struct is_complete_type : std::true_type {}; + +NLOHMANN_JSON_HAS_HELPER(mapped_type); +NLOHMANN_JSON_HAS_HELPER(key_type); +NLOHMANN_JSON_HAS_HELPER(value_type); +NLOHMANN_JSON_HAS_HELPER(iterator); + +template +struct is_compatible_object_type_impl : std::false_type {}; + +template +struct is_compatible_object_type_impl +{ + static constexpr auto value = + std::is_constructible::value and + std::is_constructible::value; +}; + +template +struct is_compatible_string_type_impl : std::false_type {}; + +template +struct is_compatible_string_type_impl +{ + static constexpr auto value = + std::is_same::value and + std::is_constructible::value; +}; + +template +struct is_compatible_object_type +{ + static auto constexpr value = is_compatible_object_type_impl < + conjunction>, + has_mapped_type, + has_key_type>::value, + typename BasicJsonType::object_t, CompatibleObjectType >::value; +}; + +template +struct is_compatible_string_type +{ + static auto constexpr value = is_compatible_string_type_impl < + conjunction>, + has_value_type>::value, + typename BasicJsonType::string_t, CompatibleStringType >::value; +}; + +template +struct is_basic_json_nested_type +{ + static auto constexpr value = std::is_same::value or + std::is_same::value or + std::is_same::value or + std::is_same::value; +}; + +template +struct is_compatible_array_type +{ + static auto constexpr value = + conjunction>, + negation>, + negation>, + negation>, + has_value_type, + has_iterator>::value; +}; + +template +struct is_compatible_integer_type_impl : std::false_type {}; + +template +struct is_compatible_integer_type_impl +{ + // is there an assert somewhere on overflows? + using RealLimits = std::numeric_limits; + using CompatibleLimits = std::numeric_limits; + + static constexpr auto value = + std::is_constructible::value and + CompatibleLimits::is_integer and + RealLimits::is_signed == CompatibleLimits::is_signed; +}; + +template +struct is_compatible_integer_type +{ + static constexpr auto value = + is_compatible_integer_type_impl < + std::is_integral::value and + not std::is_same::value, + RealIntegerType, CompatibleNumberIntegerType > ::value; +}; + +// trait checking if JSONSerializer::from_json(json const&, udt&) exists +template +struct has_from_json +{ + private: + // also check the return type of from_json + template::from_json( + std::declval(), std::declval()))>::value>> + static int detect(U&&); + static void detect(...); + + public: + static constexpr bool value = std::is_integral>()))>::value; +}; + +// This trait checks if JSONSerializer::from_json(json const&) exists +// this overload is used for non-default-constructible user-defined-types +template +struct has_non_default_from_json +{ + private: + template < + typename U, + typename = enable_if_t::from_json(std::declval()))>::value >> + static int detect(U&&); + static void detect(...); + + public: + static constexpr bool value = std::is_integral>()))>::value; +}; + +// This trait checks if BasicJsonType::json_serializer::to_json exists +template +struct has_to_json +{ + private: + template::to_json( + std::declval(), std::declval()))> + static int detect(U&&); + static void detect(...); + + public: + static constexpr bool value = std::is_integral>()))>::value; +}; + +template +struct is_compatible_complete_type +{ + static constexpr bool value = + not std::is_base_of::value and + not is_basic_json::value and + not is_basic_json_nested_type::value and + has_to_json::value; +}; + +template +struct is_compatible_type + : conjunction, + is_compatible_complete_type> +{ +}; +} +} + +// #include + + +#include // exception +#include // runtime_error +#include // to_string + +namespace nlohmann +{ +namespace detail +{ +//////////////// +// exceptions // +//////////////// + +/*! +@brief general exception of the @ref basic_json class + +This class is an extension of `std::exception` objects with a member @a id for +exception ids. It is used as the base class for all exceptions thrown by the +@ref basic_json class. This class can hence be used as "wildcard" to catch +exceptions. + +Subclasses: +- @ref parse_error for exceptions indicating a parse error +- @ref invalid_iterator for exceptions indicating errors with iterators +- @ref type_error for exceptions indicating executing a member function with + a wrong type +- @ref out_of_range for exceptions indicating access out of the defined range +- @ref other_error for exceptions indicating other library errors + +@internal +@note To have nothrow-copy-constructible exceptions, we internally use + `std::runtime_error` which can cope with arbitrary-length error messages. + Intermediate strings are built with static functions and then passed to + the actual constructor. +@endinternal + +@liveexample{The following code shows how arbitrary library exceptions can be +caught.,exception} + +@since version 3.0.0 +*/ +class exception : public std::exception +{ + public: + /// returns the explanatory string + const char* what() const noexcept override + { + return m.what(); + } + + /// the id of the exception + const int id; + + protected: + exception(int id_, const char* what_arg) : id(id_), m(what_arg) {} + + static std::string name(const std::string& ename, int id_) + { + return "[json.exception." + ename + "." + std::to_string(id_) + "] "; + } + + private: + /// an exception object as storage for error messages + std::runtime_error m; +}; + +/*! +@brief exception indicating a parse error + +This exception is thrown by the library when a parse error occurs. Parse errors +can occur during the deserialization of JSON text, CBOR, MessagePack, as well +as when using JSON Patch. + +Member @a byte holds the byte index of the last read character in the input +file. + +Exceptions have ids 1xx. + +name / id | example message | description +------------------------------ | --------------- | ------------------------- +json.exception.parse_error.101 | parse error at 2: unexpected end of input; expected string literal | This error indicates a syntax error while deserializing a JSON text. The error message describes that an unexpected token (character) was encountered, and the member @a byte indicates the error position. +json.exception.parse_error.102 | parse error at 14: missing or wrong low surrogate | JSON uses the `\uxxxx` format to describe Unicode characters. Code points above above 0xFFFF are split into two `\uxxxx` entries ("surrogate pairs"). This error indicates that the surrogate pair is incomplete or contains an invalid code point. +json.exception.parse_error.103 | parse error: code points above 0x10FFFF are invalid | Unicode supports code points up to 0x10FFFF. Code points above 0x10FFFF are invalid. +json.exception.parse_error.104 | parse error: JSON patch must be an array of objects | [RFC 6902](https://tools.ietf.org/html/rfc6902) requires a JSON Patch document to be a JSON document that represents an array of objects. +json.exception.parse_error.105 | parse error: operation must have string member 'op' | An operation of a JSON Patch document must contain exactly one "op" member, whose value indicates the operation to perform. Its value must be one of "add", "remove", "replace", "move", "copy", or "test"; other values are errors. +json.exception.parse_error.106 | parse error: array index '01' must not begin with '0' | An array index in a JSON Pointer ([RFC 6901](https://tools.ietf.org/html/rfc6901)) may be `0` or any number without a leading `0`. +json.exception.parse_error.107 | parse error: JSON pointer must be empty or begin with '/' - was: 'foo' | A JSON Pointer must be a Unicode string containing a sequence of zero or more reference tokens, each prefixed by a `/` character. +json.exception.parse_error.108 | parse error: escape character '~' must be followed with '0' or '1' | In a JSON Pointer, only `~0` and `~1` are valid escape sequences. +json.exception.parse_error.109 | parse error: array index 'one' is not a number | A JSON Pointer array index must be a number. +json.exception.parse_error.110 | parse error at 1: cannot read 2 bytes from vector | When parsing CBOR or MessagePack, the byte vector ends before the complete value has been read. +json.exception.parse_error.112 | parse error at 1: error reading CBOR; last byte: 0xF8 | Not all types of CBOR or MessagePack are supported. This exception occurs if an unsupported byte was read. +json.exception.parse_error.113 | parse error at 2: expected a CBOR string; last byte: 0x98 | While parsing a map key, a value that is not a string has been read. + +@note For an input with n bytes, 1 is the index of the first character and n+1 + is the index of the terminating null byte or the end of file. This also + holds true when reading a byte vector (CBOR or MessagePack). + +@liveexample{The following code shows how a `parse_error` exception can be +caught.,parse_error} + +@sa @ref exception for the base class of the library exceptions +@sa @ref invalid_iterator for exceptions indicating errors with iterators +@sa @ref type_error for exceptions indicating executing a member function with + a wrong type +@sa @ref out_of_range for exceptions indicating access out of the defined range +@sa @ref other_error for exceptions indicating other library errors + +@since version 3.0.0 +*/ +class parse_error : public exception +{ + public: + /*! + @brief create a parse error exception + @param[in] id_ the id of the exception + @param[in] byte_ the byte index where the error occurred (or 0 if the + position cannot be determined) + @param[in] what_arg the explanatory string + @return parse_error object + */ + static parse_error create(int id_, std::size_t byte_, const std::string& what_arg) + { + std::string w = exception::name("parse_error", id_) + "parse error" + + (byte_ != 0 ? (" at " + std::to_string(byte_)) : "") + + ": " + what_arg; + return parse_error(id_, byte_, w.c_str()); + } + + /*! + @brief byte index of the parse error + + The byte index of the last read character in the input file. + + @note For an input with n bytes, 1 is the index of the first character and + n+1 is the index of the terminating null byte or the end of file. + This also holds true when reading a byte vector (CBOR or MessagePack). + */ + const std::size_t byte; + + private: + parse_error(int id_, std::size_t byte_, const char* what_arg) + : exception(id_, what_arg), byte(byte_) {} +}; + +/*! +@brief exception indicating errors with iterators + +This exception is thrown if iterators passed to a library function do not match +the expected semantics. + +Exceptions have ids 2xx. + +name / id | example message | description +----------------------------------- | --------------- | ------------------------- +json.exception.invalid_iterator.201 | iterators are not compatible | The iterators passed to constructor @ref basic_json(InputIT first, InputIT last) are not compatible, meaning they do not belong to the same container. Therefore, the range (@a first, @a last) is invalid. +json.exception.invalid_iterator.202 | iterator does not fit current value | In an erase or insert function, the passed iterator @a pos does not belong to the JSON value for which the function was called. It hence does not define a valid position for the deletion/insertion. +json.exception.invalid_iterator.203 | iterators do not fit current value | Either iterator passed to function @ref erase(IteratorType first, IteratorType last) does not belong to the JSON value from which values shall be erased. It hence does not define a valid range to delete values from. +json.exception.invalid_iterator.204 | iterators out of range | When an iterator range for a primitive type (number, boolean, or string) is passed to a constructor or an erase function, this range has to be exactly (@ref begin(), @ref end()), because this is the only way the single stored value is expressed. All other ranges are invalid. +json.exception.invalid_iterator.205 | iterator out of range | When an iterator for a primitive type (number, boolean, or string) is passed to an erase function, the iterator has to be the @ref begin() iterator, because it is the only way to address the stored value. All other iterators are invalid. +json.exception.invalid_iterator.206 | cannot construct with iterators from null | The iterators passed to constructor @ref basic_json(InputIT first, InputIT last) belong to a JSON null value and hence to not define a valid range. +json.exception.invalid_iterator.207 | cannot use key() for non-object iterators | The key() member function can only be used on iterators belonging to a JSON object, because other types do not have a concept of a key. +json.exception.invalid_iterator.208 | cannot use operator[] for object iterators | The operator[] to specify a concrete offset cannot be used on iterators belonging to a JSON object, because JSON objects are unordered. +json.exception.invalid_iterator.209 | cannot use offsets with object iterators | The offset operators (+, -, +=, -=) cannot be used on iterators belonging to a JSON object, because JSON objects are unordered. +json.exception.invalid_iterator.210 | iterators do not fit | The iterator range passed to the insert function are not compatible, meaning they do not belong to the same container. Therefore, the range (@a first, @a last) is invalid. +json.exception.invalid_iterator.211 | passed iterators may not belong to container | The iterator range passed to the insert function must not be a subrange of the container to insert to. +json.exception.invalid_iterator.212 | cannot compare iterators of different containers | When two iterators are compared, they must belong to the same container. +json.exception.invalid_iterator.213 | cannot compare order of object iterators | The order of object iterators cannot be compared, because JSON objects are unordered. +json.exception.invalid_iterator.214 | cannot get value | Cannot get value for iterator: Either the iterator belongs to a null value or it is an iterator to a primitive type (number, boolean, or string), but the iterator is different to @ref begin(). + +@liveexample{The following code shows how an `invalid_iterator` exception can be +caught.,invalid_iterator} + +@sa @ref exception for the base class of the library exceptions +@sa @ref parse_error for exceptions indicating a parse error +@sa @ref type_error for exceptions indicating executing a member function with + a wrong type +@sa @ref out_of_range for exceptions indicating access out of the defined range +@sa @ref other_error for exceptions indicating other library errors + +@since version 3.0.0 +*/ +class invalid_iterator : public exception +{ + public: + static invalid_iterator create(int id_, const std::string& what_arg) + { + std::string w = exception::name("invalid_iterator", id_) + what_arg; + return invalid_iterator(id_, w.c_str()); + } + + private: + invalid_iterator(int id_, const char* what_arg) + : exception(id_, what_arg) {} +}; + +/*! +@brief exception indicating executing a member function with a wrong type + +This exception is thrown in case of a type error; that is, a library function is +executed on a JSON value whose type does not match the expected semantics. + +Exceptions have ids 3xx. + +name / id | example message | description +----------------------------- | --------------- | ------------------------- +json.exception.type_error.301 | cannot create object from initializer list | To create an object from an initializer list, the initializer list must consist only of a list of pairs whose first element is a string. When this constraint is violated, an array is created instead. +json.exception.type_error.302 | type must be object, but is array | During implicit or explicit value conversion, the JSON type must be compatible to the target type. For instance, a JSON string can only be converted into string types, but not into numbers or boolean types. +json.exception.type_error.303 | incompatible ReferenceType for get_ref, actual type is object | To retrieve a reference to a value stored in a @ref basic_json object with @ref get_ref, the type of the reference must match the value type. For instance, for a JSON array, the @a ReferenceType must be @ref array_t&. +json.exception.type_error.304 | cannot use at() with string | The @ref at() member functions can only be executed for certain JSON types. +json.exception.type_error.305 | cannot use operator[] with string | The @ref operator[] member functions can only be executed for certain JSON types. +json.exception.type_error.306 | cannot use value() with string | The @ref value() member functions can only be executed for certain JSON types. +json.exception.type_error.307 | cannot use erase() with string | The @ref erase() member functions can only be executed for certain JSON types. +json.exception.type_error.308 | cannot use push_back() with string | The @ref push_back() and @ref operator+= member functions can only be executed for certain JSON types. +json.exception.type_error.309 | cannot use insert() with | The @ref insert() member functions can only be executed for certain JSON types. +json.exception.type_error.310 | cannot use swap() with number | The @ref swap() member functions can only be executed for certain JSON types. +json.exception.type_error.311 | cannot use emplace_back() with string | The @ref emplace_back() member function can only be executed for certain JSON types. +json.exception.type_error.312 | cannot use update() with string | The @ref update() member functions can only be executed for certain JSON types. +json.exception.type_error.313 | invalid value to unflatten | The @ref unflatten function converts an object whose keys are JSON Pointers back into an arbitrary nested JSON value. The JSON Pointers must not overlap, because then the resulting value would not be well defined. +json.exception.type_error.314 | only objects can be unflattened | The @ref unflatten function only works for an object whose keys are JSON Pointers. +json.exception.type_error.315 | values in object must be primitive | The @ref unflatten function only works for an object whose keys are JSON Pointers and whose values are primitive. +json.exception.type_error.316 | invalid UTF-8 byte at index 10: 0x7E | The @ref dump function only works with UTF-8 encoded strings; that is, if you assign a `std::string` to a JSON value, make sure it is UTF-8 encoded. | + +@liveexample{The following code shows how a `type_error` exception can be +caught.,type_error} + +@sa @ref exception for the base class of the library exceptions +@sa @ref parse_error for exceptions indicating a parse error +@sa @ref invalid_iterator for exceptions indicating errors with iterators +@sa @ref out_of_range for exceptions indicating access out of the defined range +@sa @ref other_error for exceptions indicating other library errors + +@since version 3.0.0 +*/ +class type_error : public exception +{ + public: + static type_error create(int id_, const std::string& what_arg) + { + std::string w = exception::name("type_error", id_) + what_arg; + return type_error(id_, w.c_str()); + } + + private: + type_error(int id_, const char* what_arg) : exception(id_, what_arg) {} +}; + +/*! +@brief exception indicating access out of the defined range + +This exception is thrown in case a library function is called on an input +parameter that exceeds the expected range, for instance in case of array +indices or nonexisting object keys. + +Exceptions have ids 4xx. + +name / id | example message | description +------------------------------- | --------------- | ------------------------- +json.exception.out_of_range.401 | array index 3 is out of range | The provided array index @a i is larger than @a size-1. +json.exception.out_of_range.402 | array index '-' (3) is out of range | The special array index `-` in a JSON Pointer never describes a valid element of the array, but the index past the end. That is, it can only be used to add elements at this position, but not to read it. +json.exception.out_of_range.403 | key 'foo' not found | The provided key was not found in the JSON object. +json.exception.out_of_range.404 | unresolved reference token 'foo' | A reference token in a JSON Pointer could not be resolved. +json.exception.out_of_range.405 | JSON pointer has no parent | The JSON Patch operations 'remove' and 'add' can not be applied to the root element of the JSON value. +json.exception.out_of_range.406 | number overflow parsing '10E1000' | A parsed number could not be stored as without changing it to NaN or INF. +json.exception.out_of_range.407 | number overflow serializing '9223372036854775808' | UBJSON only supports integers numbers up to 9223372036854775807. | +json.exception.out_of_range.408 | excessive array size: 8658170730974374167 | The size (following `#`) of an UBJSON array or object exceeds the maximal capacity. | + +@liveexample{The following code shows how an `out_of_range` exception can be +caught.,out_of_range} + +@sa @ref exception for the base class of the library exceptions +@sa @ref parse_error for exceptions indicating a parse error +@sa @ref invalid_iterator for exceptions indicating errors with iterators +@sa @ref type_error for exceptions indicating executing a member function with + a wrong type +@sa @ref other_error for exceptions indicating other library errors + +@since version 3.0.0 +*/ +class out_of_range : public exception +{ + public: + static out_of_range create(int id_, const std::string& what_arg) + { + std::string w = exception::name("out_of_range", id_) + what_arg; + return out_of_range(id_, w.c_str()); + } + + private: + out_of_range(int id_, const char* what_arg) : exception(id_, what_arg) {} +}; + +/*! +@brief exception indicating other library errors + +This exception is thrown in case of errors that cannot be classified with the +other exception types. + +Exceptions have ids 5xx. + +name / id | example message | description +------------------------------ | --------------- | ------------------------- +json.exception.other_error.501 | unsuccessful: {"op":"test","path":"/baz", "value":"bar"} | A JSON Patch operation 'test' failed. The unsuccessful operation is also printed. + +@sa @ref exception for the base class of the library exceptions +@sa @ref parse_error for exceptions indicating a parse error +@sa @ref invalid_iterator for exceptions indicating errors with iterators +@sa @ref type_error for exceptions indicating executing a member function with + a wrong type +@sa @ref out_of_range for exceptions indicating access out of the defined range + +@liveexample{The following code shows how an `other_error` exception can be +caught.,other_error} + +@since version 3.0.0 +*/ +class other_error : public exception +{ + public: + static other_error create(int id_, const std::string& what_arg) + { + std::string w = exception::name("other_error", id_) + what_arg; + return other_error(id_, w.c_str()); + } + + private: + other_error(int id_, const char* what_arg) : exception(id_, what_arg) {} +}; +} +} + +// #include + + +#include // array +#include // and +#include // size_t +#include // uint8_t + +namespace nlohmann +{ +namespace detail +{ +/////////////////////////// +// JSON type enumeration // +/////////////////////////// + +/*! +@brief the JSON type enumeration + +This enumeration collects the different JSON types. It is internally used to +distinguish the stored values, and the functions @ref basic_json::is_null(), +@ref basic_json::is_object(), @ref basic_json::is_array(), +@ref basic_json::is_string(), @ref basic_json::is_boolean(), +@ref basic_json::is_number() (with @ref basic_json::is_number_integer(), +@ref basic_json::is_number_unsigned(), and @ref basic_json::is_number_float()), +@ref basic_json::is_discarded(), @ref basic_json::is_primitive(), and +@ref basic_json::is_structured() rely on it. + +@note There are three enumeration entries (number_integer, number_unsigned, and +number_float), because the library distinguishes these three types for numbers: +@ref basic_json::number_unsigned_t is used for unsigned integers, +@ref basic_json::number_integer_t is used for signed integers, and +@ref basic_json::number_float_t is used for floating-point numbers or to +approximate integers which do not fit in the limits of their respective type. + +@sa @ref basic_json::basic_json(const value_t value_type) -- create a JSON +value with the default value for a given type + +@since version 1.0.0 +*/ +enum class value_t : std::uint8_t +{ + null, ///< null value + object, ///< object (unordered set of name/value pairs) + array, ///< array (ordered collection of values) + string, ///< string value + boolean, ///< boolean value + number_integer, ///< number value (signed integer) + number_unsigned, ///< number value (unsigned integer) + number_float, ///< number value (floating-point) + discarded ///< discarded by the the parser callback function +}; + +/*! +@brief comparison operator for JSON types + +Returns an ordering that is similar to Python: +- order: null < boolean < number < object < array < string +- furthermore, each type is not smaller than itself +- discarded values are not comparable + +@since version 1.0.0 +*/ +inline bool operator<(const value_t lhs, const value_t rhs) noexcept +{ + static constexpr std::array order = {{ + 0 /* null */, 3 /* object */, 4 /* array */, 5 /* string */, + 1 /* boolean */, 2 /* integer */, 2 /* unsigned */, 2 /* float */ + } + }; + + const auto l_index = static_cast(lhs); + const auto r_index = static_cast(rhs); + return l_index < order.size() and r_index < order.size() and order[l_index] < order[r_index]; +} +} +} + +// #include + + +#include // transform +#include // array +#include // and, not +#include // forward_list +#include // inserter, front_inserter, end +#include // map +#include // string +#include // tuple, make_tuple +#include // is_arithmetic, is_same, is_enum, underlying_type, is_convertible +#include // unordered_map +#include // pair, declval +#include // valarray + +// #include + +// #include + +// #include + +// #include + +// #include + + +namespace nlohmann +{ +namespace detail +{ +template +void from_json(const BasicJsonType& j, typename std::nullptr_t& n) +{ + if (JSON_UNLIKELY(not j.is_null())) + { + JSON_THROW(type_error::create(302, "type must be null, but is " + std::string(j.type_name()))); + } + n = nullptr; +} + +// overloads for basic_json template parameters +template::value and + not std::is_same::value, + int> = 0> +void get_arithmetic_value(const BasicJsonType& j, ArithmeticType& val) +{ + switch (static_cast(j)) + { + case value_t::number_unsigned: + { + val = static_cast(*j.template get_ptr()); + break; + } + case value_t::number_integer: + { + val = static_cast(*j.template get_ptr()); + break; + } + case value_t::number_float: + { + val = static_cast(*j.template get_ptr()); + break; + } + + default: + JSON_THROW(type_error::create(302, "type must be number, but is " + std::string(j.type_name()))); + } +} + +template +void from_json(const BasicJsonType& j, typename BasicJsonType::boolean_t& b) +{ + if (JSON_UNLIKELY(not j.is_boolean())) + { + JSON_THROW(type_error::create(302, "type must be boolean, but is " + std::string(j.type_name()))); + } + b = *j.template get_ptr(); +} + +template +void from_json(const BasicJsonType& j, typename BasicJsonType::string_t& s) +{ + if (JSON_UNLIKELY(not j.is_string())) + { + JSON_THROW(type_error::create(302, "type must be string, but is " + std::string(j.type_name()))); + } + s = *j.template get_ptr(); +} + +template < + typename BasicJsonType, typename CompatibleStringType, + enable_if_t < + is_compatible_string_type::value and + not std::is_same::value, + int > = 0 > +void from_json(const BasicJsonType& j, CompatibleStringType& s) +{ + if (JSON_UNLIKELY(not j.is_string())) + { + JSON_THROW(type_error::create(302, "type must be string, but is " + std::string(j.type_name()))); + } + + s = *j.template get_ptr(); +} + +template +void from_json(const BasicJsonType& j, typename BasicJsonType::number_float_t& val) +{ + get_arithmetic_value(j, val); +} + +template +void from_json(const BasicJsonType& j, typename BasicJsonType::number_unsigned_t& val) +{ + get_arithmetic_value(j, val); +} + +template +void from_json(const BasicJsonType& j, typename BasicJsonType::number_integer_t& val) +{ + get_arithmetic_value(j, val); +} + +template::value, int> = 0> +void from_json(const BasicJsonType& j, EnumType& e) +{ + typename std::underlying_type::type val; + get_arithmetic_value(j, val); + e = static_cast(val); +} + +template +void from_json(const BasicJsonType& j, typename BasicJsonType::array_t& arr) +{ + if (JSON_UNLIKELY(not j.is_array())) + { + JSON_THROW(type_error::create(302, "type must be array, but is " + std::string(j.type_name()))); + } + arr = *j.template get_ptr(); +} + +// forward_list doesn't have an insert method +template::value, int> = 0> +void from_json(const BasicJsonType& j, std::forward_list& l) +{ + if (JSON_UNLIKELY(not j.is_array())) + { + JSON_THROW(type_error::create(302, "type must be array, but is " + std::string(j.type_name()))); + } + std::transform(j.rbegin(), j.rend(), + std::front_inserter(l), [](const BasicJsonType & i) + { + return i.template get(); + }); +} + +// valarray doesn't have an insert method +template::value, int> = 0> +void from_json(const BasicJsonType& j, std::valarray& l) +{ + if (JSON_UNLIKELY(not j.is_array())) + { + JSON_THROW(type_error::create(302, "type must be array, but is " + std::string(j.type_name()))); + } + l.resize(j.size()); + std::copy(j.m_value.array->begin(), j.m_value.array->end(), std::begin(l)); +} + +template +void from_json_array_impl(const BasicJsonType& j, CompatibleArrayType& arr, priority_tag<0> /*unused*/) +{ + using std::end; + + std::transform(j.begin(), j.end(), + std::inserter(arr, end(arr)), [](const BasicJsonType & i) + { + // get() returns *this, this won't call a from_json + // method when value_type is BasicJsonType + return i.template get(); + }); +} + +template +auto from_json_array_impl(const BasicJsonType& j, CompatibleArrayType& arr, priority_tag<1> /*unused*/) +-> decltype( + arr.reserve(std::declval()), + void()) +{ + using std::end; + + arr.reserve(j.size()); + std::transform(j.begin(), j.end(), + std::inserter(arr, end(arr)), [](const BasicJsonType & i) + { + // get() returns *this, this won't call a from_json + // method when value_type is BasicJsonType + return i.template get(); + }); +} + +template +void from_json_array_impl(const BasicJsonType& j, std::array& arr, priority_tag<2> /*unused*/) +{ + for (std::size_t i = 0; i < N; ++i) + { + arr[i] = j.at(i).template get(); + } +} + +template < + typename BasicJsonType, typename CompatibleArrayType, + enable_if_t < + is_compatible_array_type::value and + not std::is_same::value and + std::is_constructible < + BasicJsonType, typename CompatibleArrayType::value_type >::value, + int > = 0 > +void from_json(const BasicJsonType& j, CompatibleArrayType& arr) +{ + if (JSON_UNLIKELY(not j.is_array())) + { + JSON_THROW(type_error::create(302, "type must be array, but is " + + std::string(j.type_name()))); + } + + from_json_array_impl(j, arr, priority_tag<2> {}); +} + +template::value, int> = 0> +void from_json(const BasicJsonType& j, CompatibleObjectType& obj) +{ + if (JSON_UNLIKELY(not j.is_object())) + { + JSON_THROW(type_error::create(302, "type must be object, but is " + std::string(j.type_name()))); + } + + auto inner_object = j.template get_ptr(); + using value_type = typename CompatibleObjectType::value_type; + std::transform( + inner_object->begin(), inner_object->end(), + std::inserter(obj, obj.begin()), + [](typename BasicJsonType::object_t::value_type const & p) + { + return value_type(p.first, p.second.template get()); + }); +} + +// overload for arithmetic types, not chosen for basic_json template arguments +// (BooleanType, etc..); note: Is it really necessary to provide explicit +// overloads for boolean_t etc. in case of a custom BooleanType which is not +// an arithmetic type? +template::value and + not std::is_same::value and + not std::is_same::value and + not std::is_same::value and + not std::is_same::value, + int> = 0> +void from_json(const BasicJsonType& j, ArithmeticType& val) +{ + switch (static_cast(j)) + { + case value_t::number_unsigned: + { + val = static_cast(*j.template get_ptr()); + break; + } + case value_t::number_integer: + { + val = static_cast(*j.template get_ptr()); + break; + } + case value_t::number_float: + { + val = static_cast(*j.template get_ptr()); + break; + } + case value_t::boolean: + { + val = static_cast(*j.template get_ptr()); + break; + } + + default: + JSON_THROW(type_error::create(302, "type must be number, but is " + std::string(j.type_name()))); + } +} + +template +void from_json(const BasicJsonType& j, std::pair& p) +{ + p = {j.at(0).template get(), j.at(1).template get()}; +} + +template +void from_json_tuple_impl(const BasicJsonType& j, Tuple& t, index_sequence) +{ + t = std::make_tuple(j.at(Idx).template get::type>()...); +} + +template +void from_json(const BasicJsonType& j, std::tuple& t) +{ + from_json_tuple_impl(j, t, index_sequence_for {}); +} + +template ::value>> +void from_json(const BasicJsonType& j, std::map& m) +{ + if (JSON_UNLIKELY(not j.is_array())) + { + JSON_THROW(type_error::create(302, "type must be array, but is " + std::string(j.type_name()))); + } + for (const auto& p : j) + { + if (JSON_UNLIKELY(not p.is_array())) + { + JSON_THROW(type_error::create(302, "type must be array, but is " + std::string(p.type_name()))); + } + m.emplace(p.at(0).template get(), p.at(1).template get()); + } +} + +template ::value>> +void from_json(const BasicJsonType& j, std::unordered_map& m) +{ + if (JSON_UNLIKELY(not j.is_array())) + { + JSON_THROW(type_error::create(302, "type must be array, but is " + std::string(j.type_name()))); + } + for (const auto& p : j) + { + if (JSON_UNLIKELY(not p.is_array())) + { + JSON_THROW(type_error::create(302, "type must be array, but is " + std::string(p.type_name()))); + } + m.emplace(p.at(0).template get(), p.at(1).template get()); + } +} + +struct from_json_fn +{ + private: + template + auto call(const BasicJsonType& j, T& val, priority_tag<1> /*unused*/) const + noexcept(noexcept(from_json(j, val))) + -> decltype(from_json(j, val), void()) + { + return from_json(j, val); + } + + template + void call(const BasicJsonType& /*unused*/, T& /*unused*/, priority_tag<0> /*unused*/) const noexcept + { + static_assert(sizeof(BasicJsonType) == 0, + "could not find from_json() method in T's namespace"); +#ifdef _MSC_VER + // MSVC does not show a stacktrace for the above assert + using decayed = uncvref_t; + static_assert(sizeof(typename decayed::force_msvc_stacktrace) == 0, + "forcing MSVC stacktrace to show which T we're talking about."); +#endif + } + + public: + template + void operator()(const BasicJsonType& j, T& val) const + noexcept(noexcept(std::declval().call(j, val, priority_tag<1> {}))) + { + return call(j, val, priority_tag<1> {}); + } +}; +} + +/// namespace to hold default `from_json` function +/// to see why this is required: +/// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4381.html +namespace +{ +constexpr const auto& from_json = detail::static_const::value; +} +} + +// #include + + +#include // or, and, not +#include // begin, end +#include // tuple, get +#include // is_same, is_constructible, is_floating_point, is_enum, underlying_type +#include // move, forward, declval, pair +#include // valarray +#include // vector + +// #include + +// #include + +// #include + +// #include + + +#include // size_t +#include // string, to_string +#include // input_iterator_tag + +// #include + + +namespace nlohmann +{ +namespace detail +{ +/// proxy class for the items() function +template class iteration_proxy +{ + private: + /// helper class for iteration + class iteration_proxy_internal + { + public: + using difference_type = std::ptrdiff_t; + using value_type = iteration_proxy_internal; + using pointer = iteration_proxy_internal*; + using reference = iteration_proxy_internal&; + using iterator_category = std::input_iterator_tag; + + private: + /// the iterator + IteratorType anchor; + /// an index for arrays (used to create key names) + std::size_t array_index = 0; + /// last stringified array index + mutable std::size_t array_index_last = 0; + /// a string representation of the array index + mutable std::string array_index_str = "0"; + /// an empty string (to return a reference for primitive values) + const std::string empty_str = ""; + + public: + explicit iteration_proxy_internal(IteratorType it) noexcept : anchor(it) {} + + iteration_proxy_internal(const iteration_proxy_internal&) = default; + iteration_proxy_internal& operator=(const iteration_proxy_internal&) = default; + + /// dereference operator (needed for range-based for) + iteration_proxy_internal& operator*() + { + return *this; + } + + /// increment operator (needed for range-based for) + iteration_proxy_internal& operator++() + { + ++anchor; + ++array_index; + + return *this; + } + + /// equality operator (needed for InputIterator) + bool operator==(const iteration_proxy_internal& o) const noexcept + { + return anchor == o.anchor; + } + + /// inequality operator (needed for range-based for) + bool operator!=(const iteration_proxy_internal& o) const noexcept + { + return anchor != o.anchor; + } + + /// return key of the iterator + const std::string& key() const + { + assert(anchor.m_object != nullptr); + + switch (anchor.m_object->type()) + { + // use integer array index as key + case value_t::array: + { + if (array_index != array_index_last) + { + array_index_str = std::to_string(array_index); + array_index_last = array_index; + } + return array_index_str; + } + + // use key from the object + case value_t::object: + return anchor.key(); + + // use an empty key for all primitive types + default: + return empty_str; + } + } + + /// return value of the iterator + typename IteratorType::reference value() const + { + return anchor.value(); + } + }; + + /// the container to iterate + typename IteratorType::reference container; + + public: + /// construct iteration proxy from a container + explicit iteration_proxy(typename IteratorType::reference cont) noexcept + : container(cont) {} + + /// return iterator begin (needed for range-based for) + iteration_proxy_internal begin() noexcept + { + return iteration_proxy_internal(container.begin()); + } + + /// return iterator end (needed for range-based for) + iteration_proxy_internal end() noexcept + { + return iteration_proxy_internal(container.end()); + } +}; +} +} + + +namespace nlohmann +{ +namespace detail +{ +////////////////// +// constructors // +////////////////// + +template struct external_constructor; + +template<> +struct external_constructor +{ + template + static void construct(BasicJsonType& j, typename BasicJsonType::boolean_t b) noexcept + { + j.m_type = value_t::boolean; + j.m_value = b; + j.assert_invariant(); + } +}; + +template<> +struct external_constructor +{ + template + static void construct(BasicJsonType& j, const typename BasicJsonType::string_t& s) + { + j.m_type = value_t::string; + j.m_value = s; + j.assert_invariant(); + } + + template + static void construct(BasicJsonType& j, typename BasicJsonType::string_t&& s) + { + j.m_type = value_t::string; + j.m_value = std::move(s); + j.assert_invariant(); + } + + template::value, + int> = 0> + static void construct(BasicJsonType& j, const CompatibleStringType& str) + { + j.m_type = value_t::string; + j.m_value.string = j.template create(str); + j.assert_invariant(); + } +}; + +template<> +struct external_constructor +{ + template + static void construct(BasicJsonType& j, typename BasicJsonType::number_float_t val) noexcept + { + j.m_type = value_t::number_float; + j.m_value = val; + j.assert_invariant(); + } +}; + +template<> +struct external_constructor +{ + template + static void construct(BasicJsonType& j, typename BasicJsonType::number_unsigned_t val) noexcept + { + j.m_type = value_t::number_unsigned; + j.m_value = val; + j.assert_invariant(); + } +}; + +template<> +struct external_constructor +{ + template + static void construct(BasicJsonType& j, typename BasicJsonType::number_integer_t val) noexcept + { + j.m_type = value_t::number_integer; + j.m_value = val; + j.assert_invariant(); + } +}; + +template<> +struct external_constructor +{ + template + static void construct(BasicJsonType& j, const typename BasicJsonType::array_t& arr) + { + j.m_type = value_t::array; + j.m_value = arr; + j.assert_invariant(); + } + + template + static void construct(BasicJsonType& j, typename BasicJsonType::array_t&& arr) + { + j.m_type = value_t::array; + j.m_value = std::move(arr); + j.assert_invariant(); + } + + template::value, + int> = 0> + static void construct(BasicJsonType& j, const CompatibleArrayType& arr) + { + using std::begin; + using std::end; + j.m_type = value_t::array; + j.m_value.array = j.template create(begin(arr), end(arr)); + j.assert_invariant(); + } + + template + static void construct(BasicJsonType& j, const std::vector& arr) + { + j.m_type = value_t::array; + j.m_value = value_t::array; + j.m_value.array->reserve(arr.size()); + for (const bool x : arr) + { + j.m_value.array->push_back(x); + } + j.assert_invariant(); + } + + template::value, int> = 0> + static void construct(BasicJsonType& j, const std::valarray& arr) + { + j.m_type = value_t::array; + j.m_value = value_t::array; + j.m_value.array->resize(arr.size()); + std::copy(std::begin(arr), std::end(arr), j.m_value.array->begin()); + j.assert_invariant(); + } +}; + +template<> +struct external_constructor +{ + template + static void construct(BasicJsonType& j, const typename BasicJsonType::object_t& obj) + { + j.m_type = value_t::object; + j.m_value = obj; + j.assert_invariant(); + } + + template + static void construct(BasicJsonType& j, typename BasicJsonType::object_t&& obj) + { + j.m_type = value_t::object; + j.m_value = std::move(obj); + j.assert_invariant(); + } + + template::value, int> = 0> + static void construct(BasicJsonType& j, const CompatibleObjectType& obj) + { + using std::begin; + using std::end; + + j.m_type = value_t::object; + j.m_value.object = j.template create(begin(obj), end(obj)); + j.assert_invariant(); + } +}; + +///////////// +// to_json // +///////////// + +template::value, int> = 0> +void to_json(BasicJsonType& j, T b) noexcept +{ + external_constructor::construct(j, b); +} + +template::value, int> = 0> +void to_json(BasicJsonType& j, const CompatibleString& s) +{ + external_constructor::construct(j, s); +} + +template +void to_json(BasicJsonType& j, typename BasicJsonType::string_t&& s) +{ + external_constructor::construct(j, std::move(s)); +} + +template::value, int> = 0> +void to_json(BasicJsonType& j, FloatType val) noexcept +{ + external_constructor::construct(j, static_cast(val)); +} + +template::value, int> = 0> +void to_json(BasicJsonType& j, CompatibleNumberUnsignedType val) noexcept +{ + external_constructor::construct(j, static_cast(val)); +} + +template::value, int> = 0> +void to_json(BasicJsonType& j, CompatibleNumberIntegerType val) noexcept +{ + external_constructor::construct(j, static_cast(val)); +} + +template::value, int> = 0> +void to_json(BasicJsonType& j, EnumType e) noexcept +{ + using underlying_type = typename std::underlying_type::type; + external_constructor::construct(j, static_cast(e)); +} + +template +void to_json(BasicJsonType& j, const std::vector& e) +{ + external_constructor::construct(j, e); +} + +template::value or + std::is_same::value, + int> = 0> +void to_json(BasicJsonType& j, const CompatibleArrayType& arr) +{ + external_constructor::construct(j, arr); +} + +template::value, int> = 0> +void to_json(BasicJsonType& j, const std::valarray& arr) +{ + external_constructor::construct(j, std::move(arr)); +} + +template +void to_json(BasicJsonType& j, typename BasicJsonType::array_t&& arr) +{ + external_constructor::construct(j, std::move(arr)); +} + +template::value, int> = 0> +void to_json(BasicJsonType& j, const CompatibleObjectType& obj) +{ + external_constructor::construct(j, obj); +} + +template +void to_json(BasicJsonType& j, typename BasicJsonType::object_t&& obj) +{ + external_constructor::construct(j, std::move(obj)); +} + +template::value, int> = 0> +void to_json(BasicJsonType& j, T (&arr)[N]) +{ + external_constructor::construct(j, arr); +} + +template +void to_json(BasicJsonType& j, const std::pair& p) +{ + j = {p.first, p.second}; +} + +// for https://github.com/nlohmann/json/pull/1134 +template::iteration_proxy_internal>::value, int> = 0> +void to_json(BasicJsonType& j, T b) noexcept +{ + j = {{b.key(), b.value()}}; +} + +template +void to_json_tuple_impl(BasicJsonType& j, const Tuple& t, index_sequence) +{ + j = {std::get(t)...}; +} + +template +void to_json(BasicJsonType& j, const std::tuple& t) +{ + to_json_tuple_impl(j, t, index_sequence_for {}); +} + +struct to_json_fn +{ + private: + template + auto call(BasicJsonType& j, T&& val, priority_tag<1> /*unused*/) const noexcept(noexcept(to_json(j, std::forward(val)))) + -> decltype(to_json(j, std::forward(val)), void()) + { + return to_json(j, std::forward(val)); + } + + template + void call(BasicJsonType& /*unused*/, T&& /*unused*/, priority_tag<0> /*unused*/) const noexcept + { + static_assert(sizeof(BasicJsonType) == 0, + "could not find to_json() method in T's namespace"); + +#ifdef _MSC_VER + // MSVC does not show a stacktrace for the above assert + using decayed = uncvref_t; + static_assert(sizeof(typename decayed::force_msvc_stacktrace) == 0, + "forcing MSVC stacktrace to show which T we're talking about."); +#endif + } + + public: + template + void operator()(BasicJsonType& j, T&& val) const + noexcept(noexcept(std::declval().call(j, std::forward(val), priority_tag<1> {}))) + { + return call(j, std::forward(val), priority_tag<1> {}); + } +}; +} + +/// namespace to hold default `to_json` function +namespace +{ +constexpr const auto& to_json = detail::static_const::value; +} +} + +// #include + + +#include // assert +#include // size_t +#include // strlen +#include // istream +#include // begin, end, iterator_traits, random_access_iterator_tag, distance, next +#include // shared_ptr, make_shared, addressof +#include // accumulate +#include // string, char_traits +#include // enable_if, is_base_of, is_pointer, is_integral, remove_pointer +#include // pair, declval + +// #include + + +namespace nlohmann +{ +namespace detail +{ +/// the supported input formats +enum class input_format_t { json, cbor, msgpack, ubjson }; + +//////////////////// +// input adapters // +//////////////////// + +/*! +@brief abstract input adapter interface + +Produces a stream of std::char_traits::int_type characters from a +std::istream, a buffer, or some other input type. Accepts the return of +exactly one non-EOF character for future input. The int_type characters +returned consist of all valid char values as positive values (typically +unsigned char), plus an EOF value outside that range, specified by the value +of the function std::char_traits::eof(). This value is typically -1, but +could be any arbitrary value which is not a valid char value. +*/ +struct input_adapter_protocol +{ + /// get a character [0,255] or std::char_traits::eof(). + virtual std::char_traits::int_type get_character() = 0; + virtual ~input_adapter_protocol() = default; +}; + +/// a type to simplify interfaces +using input_adapter_t = std::shared_ptr; + +/*! +Input adapter for a (caching) istream. Ignores a UFT Byte Order Mark at +beginning of input. Does not support changing the underlying std::streambuf +in mid-input. Maintains underlying std::istream and std::streambuf to support +subsequent use of standard std::istream operations to process any input +characters following those used in parsing the JSON input. Clears the +std::istream flags; any input errors (e.g., EOF) will be detected by the first +subsequent call for input from the std::istream. +*/ +class input_stream_adapter : public input_adapter_protocol +{ + public: + ~input_stream_adapter() override + { + // clear stream flags; we use underlying streambuf I/O, do not + // maintain ifstream flags + is.clear(); + } + + explicit input_stream_adapter(std::istream& i) + : is(i), sb(*i.rdbuf()) + {} + + // delete because of pointer members + input_stream_adapter(const input_stream_adapter&) = delete; + input_stream_adapter& operator=(input_stream_adapter&) = delete; + + // std::istream/std::streambuf use std::char_traits::to_int_type, to + // ensure that std::char_traits::eof() and the character 0xFF do not + // end up as the same value, eg. 0xFFFFFFFF. + std::char_traits::int_type get_character() override + { + return sb.sbumpc(); + } + + private: + /// the associated input stream + std::istream& is; + std::streambuf& sb; +}; + +/// input adapter for buffer input +class input_buffer_adapter : public input_adapter_protocol +{ + public: + input_buffer_adapter(const char* b, const std::size_t l) + : cursor(b), limit(b + l) + {} + + // delete because of pointer members + input_buffer_adapter(const input_buffer_adapter&) = delete; + input_buffer_adapter& operator=(input_buffer_adapter&) = delete; + + std::char_traits::int_type get_character() noexcept override + { + if (JSON_LIKELY(cursor < limit)) + { + return std::char_traits::to_int_type(*(cursor++)); + } + + return std::char_traits::eof(); + } + + private: + /// pointer to the current character + const char* cursor; + /// pointer past the last character + const char* const limit; +}; + +template +class wide_string_input_adapter : public input_adapter_protocol +{ + public: + explicit wide_string_input_adapter(const WideStringType& w) : str(w) {} + + std::char_traits::int_type get_character() noexcept override + { + // check if buffer needs to be filled + if (utf8_bytes_index == utf8_bytes_filled) + { + if (sizeof(typename WideStringType::value_type) == 2) + { + fill_buffer_utf16(); + } + else + { + fill_buffer_utf32(); + } + + assert(utf8_bytes_filled > 0); + assert(utf8_bytes_index == 0); + } + + // use buffer + assert(utf8_bytes_filled > 0); + assert(utf8_bytes_index < utf8_bytes_filled); + return utf8_bytes[utf8_bytes_index++]; + } + + private: + void fill_buffer_utf16() + { + utf8_bytes_index = 0; + + if (current_wchar == str.size()) + { + utf8_bytes[0] = std::char_traits::eof(); + utf8_bytes_filled = 1; + } + else + { + // get the current character + const int wc = static_cast(str[current_wchar++]); + + // UTF-16 to UTF-8 encoding + if (wc < 0x80) + { + utf8_bytes[0] = wc; + utf8_bytes_filled = 1; + } + else if (wc <= 0x7FF) + { + utf8_bytes[0] = 0xC0 | ((wc >> 6)); + utf8_bytes[1] = 0x80 | (wc & 0x3F); + utf8_bytes_filled = 2; + } + else if (0xD800 > wc or wc >= 0xE000) + { + utf8_bytes[0] = 0xE0 | ((wc >> 12)); + utf8_bytes[1] = 0x80 | ((wc >> 6) & 0x3F); + utf8_bytes[2] = 0x80 | (wc & 0x3F); + utf8_bytes_filled = 3; + } + else + { + if (current_wchar < str.size()) + { + const int wc2 = static_cast(str[current_wchar++]); + const int charcode = 0x10000 + (((wc & 0x3FF) << 10) | (wc2 & 0x3FF)); + utf8_bytes[0] = 0xf0 | (charcode >> 18); + utf8_bytes[1] = 0x80 | ((charcode >> 12) & 0x3F); + utf8_bytes[2] = 0x80 | ((charcode >> 6) & 0x3F); + utf8_bytes[3] = 0x80 | (charcode & 0x3F); + utf8_bytes_filled = 4; + } + else + { + // unknown character + ++current_wchar; + utf8_bytes[0] = wc; + utf8_bytes_filled = 1; + } + } + } + } + + void fill_buffer_utf32() + { + utf8_bytes_index = 0; + + if (current_wchar == str.size()) + { + utf8_bytes[0] = std::char_traits::eof(); + utf8_bytes_filled = 1; + } + else + { + // get the current character + const int wc = static_cast(str[current_wchar++]); + + // UTF-32 to UTF-8 encoding + if (wc < 0x80) + { + utf8_bytes[0] = wc; + utf8_bytes_filled = 1; + } + else if (wc <= 0x7FF) + { + utf8_bytes[0] = 0xC0 | ((wc >> 6) & 0x1F); + utf8_bytes[1] = 0x80 | (wc & 0x3F); + utf8_bytes_filled = 2; + } + else if (wc <= 0xFFFF) + { + utf8_bytes[0] = 0xE0 | ((wc >> 12) & 0x0F); + utf8_bytes[1] = 0x80 | ((wc >> 6) & 0x3F); + utf8_bytes[2] = 0x80 | (wc & 0x3F); + utf8_bytes_filled = 3; + } + else if (wc <= 0x10FFFF) + { + utf8_bytes[0] = 0xF0 | ((wc >> 18 ) & 0x07); + utf8_bytes[1] = 0x80 | ((wc >> 12) & 0x3F); + utf8_bytes[2] = 0x80 | ((wc >> 6) & 0x3F); + utf8_bytes[3] = 0x80 | (wc & 0x3F); + utf8_bytes_filled = 4; + } + else + { + // unknown character + utf8_bytes[0] = wc; + utf8_bytes_filled = 1; + } + } + } + + private: + /// the wstring to process + const WideStringType& str; + + /// index of the current wchar in str + std::size_t current_wchar = 0; + + /// a buffer for UTF-8 bytes + std::array::int_type, 4> utf8_bytes = {{0, 0, 0, 0}}; + + /// index to the utf8_codes array for the next valid byte + std::size_t utf8_bytes_index = 0; + /// number of valid bytes in the utf8_codes array + std::size_t utf8_bytes_filled = 0; +}; + +class input_adapter +{ + public: + // native support + + /// input adapter for input stream + input_adapter(std::istream& i) + : ia(std::make_shared(i)) {} + + /// input adapter for input stream + input_adapter(std::istream&& i) + : ia(std::make_shared(i)) {} + + input_adapter(const std::wstring& ws) + : ia(std::make_shared>(ws)) {} + + input_adapter(const std::u16string& ws) + : ia(std::make_shared>(ws)) {} + + input_adapter(const std::u32string& ws) + : ia(std::make_shared>(ws)) {} + + /// input adapter for buffer + template::value and + std::is_integral::type>::value and + sizeof(typename std::remove_pointer::type) == 1, + int>::type = 0> + input_adapter(CharT b, std::size_t l) + : ia(std::make_shared(reinterpret_cast(b), l)) {} + + // derived support + + /// input adapter for string literal + template::value and + std::is_integral::type>::value and + sizeof(typename std::remove_pointer::type) == 1, + int>::type = 0> + input_adapter(CharT b) + : input_adapter(reinterpret_cast(b), + std::strlen(reinterpret_cast(b))) {} + + /// input adapter for iterator range with contiguous storage + template::iterator_category, std::random_access_iterator_tag>::value, + int>::type = 0> + input_adapter(IteratorType first, IteratorType last) + { + // assertion to check that the iterator range is indeed contiguous, + // see http://stackoverflow.com/a/35008842/266378 for more discussion + assert(std::accumulate( + first, last, std::pair(true, 0), + [&first](std::pair res, decltype(*first) val) + { + res.first &= (val == *(std::next(std::addressof(*first), res.second++))); + return res; + }).first); + + // assertion to check that each element is 1 byte long + static_assert( + sizeof(typename std::iterator_traits::value_type) == 1, + "each element in the iterator range must have the size of 1 byte"); + + const auto len = static_cast(std::distance(first, last)); + if (JSON_LIKELY(len > 0)) + { + // there is at least one element: use the address of first + ia = std::make_shared(reinterpret_cast(&(*first)), len); + } + else + { + // the address of first cannot be used: use nullptr + ia = std::make_shared(nullptr, len); + } + } + + /// input adapter for array + template + input_adapter(T (&array)[N]) + : input_adapter(std::begin(array), std::end(array)) {} + + /// input adapter for contiguous container + template::value and + std::is_base_of()))>::iterator_category>::value, + int>::type = 0> + input_adapter(const ContiguousContainer& c) + : input_adapter(std::begin(c), std::end(c)) {} + + operator input_adapter_t() + { + return ia; + } + + private: + /// the actual adapter + input_adapter_t ia = nullptr; +}; +} +} + +// #include + + +#include // localeconv +#include // size_t +#include // strtof, strtod, strtold, strtoll, strtoull +#include // snprintf +#include // initializer_list +#include // char_traits, string +#include // vector + +// #include + +// #include + + +namespace nlohmann +{ +namespace detail +{ +/////////// +// lexer // +/////////// + +/*! +@brief lexical analysis + +This class organizes the lexical analysis during JSON deserialization. +*/ +template +class lexer +{ + using number_integer_t = typename BasicJsonType::number_integer_t; + using number_unsigned_t = typename BasicJsonType::number_unsigned_t; + using number_float_t = typename BasicJsonType::number_float_t; + using string_t = typename BasicJsonType::string_t; + + public: + /// token types for the parser + enum class token_type + { + uninitialized, ///< indicating the scanner is uninitialized + literal_true, ///< the `true` literal + literal_false, ///< the `false` literal + literal_null, ///< the `null` literal + value_string, ///< a string -- use get_string() for actual value + value_unsigned, ///< an unsigned integer -- use get_number_unsigned() for actual value + value_integer, ///< a signed integer -- use get_number_integer() for actual value + value_float, ///< an floating point number -- use get_number_float() for actual value + begin_array, ///< the character for array begin `[` + begin_object, ///< the character for object begin `{` + end_array, ///< the character for array end `]` + end_object, ///< the character for object end `}` + name_separator, ///< the name separator `:` + value_separator, ///< the value separator `,` + parse_error, ///< indicating a parse error + end_of_input, ///< indicating the end of the input buffer + literal_or_value ///< a literal or the begin of a value (only for diagnostics) + }; + + /// return name of values of type token_type (only used for errors) + static const char* token_type_name(const token_type t) noexcept + { + switch (t) + { + case token_type::uninitialized: + return ""; + case token_type::literal_true: + return "true literal"; + case token_type::literal_false: + return "false literal"; + case token_type::literal_null: + return "null literal"; + case token_type::value_string: + return "string literal"; + case lexer::token_type::value_unsigned: + case lexer::token_type::value_integer: + case lexer::token_type::value_float: + return "number literal"; + case token_type::begin_array: + return "'['"; + case token_type::begin_object: + return "'{'"; + case token_type::end_array: + return "']'"; + case token_type::end_object: + return "'}'"; + case token_type::name_separator: + return "':'"; + case token_type::value_separator: + return "','"; + case token_type::parse_error: + return ""; + case token_type::end_of_input: + return "end of input"; + case token_type::literal_or_value: + return "'[', '{', or a literal"; + // LCOV_EXCL_START + default: // catch non-enum values + return "unknown token"; + // LCOV_EXCL_STOP + } + } + + explicit lexer(detail::input_adapter_t&& adapter) + : ia(std::move(adapter)), decimal_point_char(get_decimal_point()) {} + + // delete because of pointer members + lexer(const lexer&) = delete; + lexer& operator=(lexer&) = delete; + + private: + ///////////////////// + // locales + ///////////////////// + + /// return the locale-dependent decimal point + static char get_decimal_point() noexcept + { + const auto loc = localeconv(); + assert(loc != nullptr); + return (loc->decimal_point == nullptr) ? '.' : *(loc->decimal_point); + } + + ///////////////////// + // scan functions + ///////////////////// + + /*! + @brief get codepoint from 4 hex characters following `\u` + + For input "\u c1 c2 c3 c4" the codepoint is: + (c1 * 0x1000) + (c2 * 0x0100) + (c3 * 0x0010) + c4 + = (c1 << 12) + (c2 << 8) + (c3 << 4) + (c4 << 0) + + Furthermore, the possible characters '0'..'9', 'A'..'F', and 'a'..'f' + must be converted to the integers 0x0..0x9, 0xA..0xF, 0xA..0xF, resp. The + conversion is done by subtracting the offset (0x30, 0x37, and 0x57) + between the ASCII value of the character and the desired integer value. + + @return codepoint (0x0000..0xFFFF) or -1 in case of an error (e.g. EOF or + non-hex character) + */ + int get_codepoint() + { + // this function only makes sense after reading `\u` + assert(current == 'u'); + int codepoint = 0; + + const auto factors = { 12, 8, 4, 0 }; + for (const auto factor : factors) + { + get(); + + if (current >= '0' and current <= '9') + { + codepoint += ((current - 0x30) << factor); + } + else if (current >= 'A' and current <= 'F') + { + codepoint += ((current - 0x37) << factor); + } + else if (current >= 'a' and current <= 'f') + { + codepoint += ((current - 0x57) << factor); + } + else + { + return -1; + } + } + + assert(0x0000 <= codepoint and codepoint <= 0xFFFF); + return codepoint; + } + + /*! + @brief check if the next byte(s) are inside a given range + + Adds the current byte and, for each passed range, reads a new byte and + checks if it is inside the range. If a violation was detected, set up an + error message and return false. Otherwise, return true. + + @param[in] ranges list of integers; interpreted as list of pairs of + inclusive lower and upper bound, respectively + + @pre The passed list @a ranges must have 2, 4, or 6 elements; that is, + 1, 2, or 3 pairs. This precondition is enforced by an assertion. + + @return true if and only if no range violation was detected + */ + bool next_byte_in_range(std::initializer_list ranges) + { + assert(ranges.size() == 2 or ranges.size() == 4 or ranges.size() == 6); + add(current); + + for (auto range = ranges.begin(); range != ranges.end(); ++range) + { + get(); + if (JSON_LIKELY(*range <= current and current <= *(++range))) + { + add(current); + } + else + { + error_message = "invalid string: ill-formed UTF-8 byte"; + return false; + } + } + + return true; + } + + /*! + @brief scan a string literal + + This function scans a string according to Sect. 7 of RFC 7159. While + scanning, bytes are escaped and copied into buffer token_buffer. Then the + function returns successfully, token_buffer is *not* null-terminated (as it + may contain \0 bytes), and token_buffer.size() is the number of bytes in the + string. + + @return token_type::value_string if string could be successfully scanned, + token_type::parse_error otherwise + + @note In case of errors, variable error_message contains a textual + description. + */ + token_type scan_string() + { + // reset token_buffer (ignore opening quote) + reset(); + + // we entered the function by reading an open quote + assert(current == '\"'); + + while (true) + { + // get next character + switch (get()) + { + // end of file while parsing string + case std::char_traits::eof(): + { + error_message = "invalid string: missing closing quote"; + return token_type::parse_error; + } + + // closing quote + case '\"': + { + return token_type::value_string; + } + + // escapes + case '\\': + { + switch (get()) + { + // quotation mark + case '\"': + add('\"'); + break; + // reverse solidus + case '\\': + add('\\'); + break; + // solidus + case '/': + add('/'); + break; + // backspace + case 'b': + add('\b'); + break; + // form feed + case 'f': + add('\f'); + break; + // line feed + case 'n': + add('\n'); + break; + // carriage return + case 'r': + add('\r'); + break; + // tab + case 't': + add('\t'); + break; + + // unicode escapes + case 'u': + { + const int codepoint1 = get_codepoint(); + int codepoint = codepoint1; // start with codepoint1 + + if (JSON_UNLIKELY(codepoint1 == -1)) + { + error_message = "invalid string: '\\u' must be followed by 4 hex digits"; + return token_type::parse_error; + } + + // check if code point is a high surrogate + if (0xD800 <= codepoint1 and codepoint1 <= 0xDBFF) + { + // expect next \uxxxx entry + if (JSON_LIKELY(get() == '\\' and get() == 'u')) + { + const int codepoint2 = get_codepoint(); + + if (JSON_UNLIKELY(codepoint2 == -1)) + { + error_message = "invalid string: '\\u' must be followed by 4 hex digits"; + return token_type::parse_error; + } + + // check if codepoint2 is a low surrogate + if (JSON_LIKELY(0xDC00 <= codepoint2 and codepoint2 <= 0xDFFF)) + { + // overwrite codepoint + codepoint = + // high surrogate occupies the most significant 22 bits + (codepoint1 << 10) + // low surrogate occupies the least significant 15 bits + + codepoint2 + // there is still the 0xD800, 0xDC00 and 0x10000 noise + // in the result so we have to subtract with: + // (0xD800 << 10) + DC00 - 0x10000 = 0x35FDC00 + - 0x35FDC00; + } + else + { + error_message = "invalid string: surrogate U+DC00..U+DFFF must be followed by U+DC00..U+DFFF"; + return token_type::parse_error; + } + } + else + { + error_message = "invalid string: surrogate U+DC00..U+DFFF must be followed by U+DC00..U+DFFF"; + return token_type::parse_error; + } + } + else + { + if (JSON_UNLIKELY(0xDC00 <= codepoint1 and codepoint1 <= 0xDFFF)) + { + error_message = "invalid string: surrogate U+DC00..U+DFFF must follow U+D800..U+DBFF"; + return token_type::parse_error; + } + } + + // result of the above calculation yields a proper codepoint + assert(0x00 <= codepoint and codepoint <= 0x10FFFF); + + // translate codepoint into bytes + if (codepoint < 0x80) + { + // 1-byte characters: 0xxxxxxx (ASCII) + add(codepoint); + } + else if (codepoint <= 0x7FF) + { + // 2-byte characters: 110xxxxx 10xxxxxx + add(0xC0 | (codepoint >> 6)); + add(0x80 | (codepoint & 0x3F)); + } + else if (codepoint <= 0xFFFF) + { + // 3-byte characters: 1110xxxx 10xxxxxx 10xxxxxx + add(0xE0 | (codepoint >> 12)); + add(0x80 | ((codepoint >> 6) & 0x3F)); + add(0x80 | (codepoint & 0x3F)); + } + else + { + // 4-byte characters: 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx + add(0xF0 | (codepoint >> 18)); + add(0x80 | ((codepoint >> 12) & 0x3F)); + add(0x80 | ((codepoint >> 6) & 0x3F)); + add(0x80 | (codepoint & 0x3F)); + } + + break; + } + + // other characters after escape + default: + error_message = "invalid string: forbidden character after backslash"; + return token_type::parse_error; + } + + break; + } + + // invalid control characters + case 0x00: + case 0x01: + case 0x02: + case 0x03: + case 0x04: + case 0x05: + case 0x06: + case 0x07: + case 0x08: + case 0x09: + case 0x0A: + case 0x0B: + case 0x0C: + case 0x0D: + case 0x0E: + case 0x0F: + case 0x10: + case 0x11: + case 0x12: + case 0x13: + case 0x14: + case 0x15: + case 0x16: + case 0x17: + case 0x18: + case 0x19: + case 0x1A: + case 0x1B: + case 0x1C: + case 0x1D: + case 0x1E: + case 0x1F: + { + error_message = "invalid string: control character must be escaped"; + return token_type::parse_error; + } + + // U+0020..U+007F (except U+0022 (quote) and U+005C (backspace)) + case 0x20: + case 0x21: + case 0x23: + case 0x24: + case 0x25: + case 0x26: + case 0x27: + case 0x28: + case 0x29: + case 0x2A: + case 0x2B: + case 0x2C: + case 0x2D: + case 0x2E: + case 0x2F: + case 0x30: + case 0x31: + case 0x32: + case 0x33: + case 0x34: + case 0x35: + case 0x36: + case 0x37: + case 0x38: + case 0x39: + case 0x3A: + case 0x3B: + case 0x3C: + case 0x3D: + case 0x3E: + case 0x3F: + case 0x40: + case 0x41: + case 0x42: + case 0x43: + case 0x44: + case 0x45: + case 0x46: + case 0x47: + case 0x48: + case 0x49: + case 0x4A: + case 0x4B: + case 0x4C: + case 0x4D: + case 0x4E: + case 0x4F: + case 0x50: + case 0x51: + case 0x52: + case 0x53: + case 0x54: + case 0x55: + case 0x56: + case 0x57: + case 0x58: + case 0x59: + case 0x5A: + case 0x5B: + case 0x5D: + case 0x5E: + case 0x5F: + case 0x60: + case 0x61: + case 0x62: + case 0x63: + case 0x64: + case 0x65: + case 0x66: + case 0x67: + case 0x68: + case 0x69: + case 0x6A: + case 0x6B: + case 0x6C: + case 0x6D: + case 0x6E: + case 0x6F: + case 0x70: + case 0x71: + case 0x72: + case 0x73: + case 0x74: + case 0x75: + case 0x76: + case 0x77: + case 0x78: + case 0x79: + case 0x7A: + case 0x7B: + case 0x7C: + case 0x7D: + case 0x7E: + case 0x7F: + { + add(current); + break; + } + + // U+0080..U+07FF: bytes C2..DF 80..BF + case 0xC2: + case 0xC3: + case 0xC4: + case 0xC5: + case 0xC6: + case 0xC7: + case 0xC8: + case 0xC9: + case 0xCA: + case 0xCB: + case 0xCC: + case 0xCD: + case 0xCE: + case 0xCF: + case 0xD0: + case 0xD1: + case 0xD2: + case 0xD3: + case 0xD4: + case 0xD5: + case 0xD6: + case 0xD7: + case 0xD8: + case 0xD9: + case 0xDA: + case 0xDB: + case 0xDC: + case 0xDD: + case 0xDE: + case 0xDF: + { + if (JSON_UNLIKELY(not next_byte_in_range({0x80, 0xBF}))) + { + return token_type::parse_error; + } + break; + } + + // U+0800..U+0FFF: bytes E0 A0..BF 80..BF + case 0xE0: + { + if (JSON_UNLIKELY(not (next_byte_in_range({0xA0, 0xBF, 0x80, 0xBF})))) + { + return token_type::parse_error; + } + break; + } + + // U+1000..U+CFFF: bytes E1..EC 80..BF 80..BF + // U+E000..U+FFFF: bytes EE..EF 80..BF 80..BF + case 0xE1: + case 0xE2: + case 0xE3: + case 0xE4: + case 0xE5: + case 0xE6: + case 0xE7: + case 0xE8: + case 0xE9: + case 0xEA: + case 0xEB: + case 0xEC: + case 0xEE: + case 0xEF: + { + if (JSON_UNLIKELY(not (next_byte_in_range({0x80, 0xBF, 0x80, 0xBF})))) + { + return token_type::parse_error; + } + break; + } + + // U+D000..U+D7FF: bytes ED 80..9F 80..BF + case 0xED: + { + if (JSON_UNLIKELY(not (next_byte_in_range({0x80, 0x9F, 0x80, 0xBF})))) + { + return token_type::parse_error; + } + break; + } + + // U+10000..U+3FFFF F0 90..BF 80..BF 80..BF + case 0xF0: + { + if (JSON_UNLIKELY(not (next_byte_in_range({0x90, 0xBF, 0x80, 0xBF, 0x80, 0xBF})))) + { + return token_type::parse_error; + } + break; + } + + // U+40000..U+FFFFF F1..F3 80..BF 80..BF 80..BF + case 0xF1: + case 0xF2: + case 0xF3: + { + if (JSON_UNLIKELY(not (next_byte_in_range({0x80, 0xBF, 0x80, 0xBF, 0x80, 0xBF})))) + { + return token_type::parse_error; + } + break; + } + + // U+100000..U+10FFFF F4 80..8F 80..BF 80..BF + case 0xF4: + { + if (JSON_UNLIKELY(not (next_byte_in_range({0x80, 0x8F, 0x80, 0xBF, 0x80, 0xBF})))) + { + return token_type::parse_error; + } + break; + } + + // remaining bytes (80..C1 and F5..FF) are ill-formed + default: + { + error_message = "invalid string: ill-formed UTF-8 byte"; + return token_type::parse_error; + } + } + } + } + + static void strtof(float& f, const char* str, char** endptr) noexcept + { + f = std::strtof(str, endptr); + } + + static void strtof(double& f, const char* str, char** endptr) noexcept + { + f = std::strtod(str, endptr); + } + + static void strtof(long double& f, const char* str, char** endptr) noexcept + { + f = std::strtold(str, endptr); + } + + /*! + @brief scan a number literal + + This function scans a string according to Sect. 6 of RFC 7159. + + The function is realized with a deterministic finite state machine derived + from the grammar described in RFC 7159. Starting in state "init", the + input is read and used to determined the next state. Only state "done" + accepts the number. State "error" is a trap state to model errors. In the + table below, "anything" means any character but the ones listed before. + + state | 0 | 1-9 | e E | + | - | . | anything + ---------|----------|----------|----------|---------|---------|----------|----------- + init | zero | any1 | [error] | [error] | minus | [error] | [error] + minus | zero | any1 | [error] | [error] | [error] | [error] | [error] + zero | done | done | exponent | done | done | decimal1 | done + any1 | any1 | any1 | exponent | done | done | decimal1 | done + decimal1 | decimal2 | [error] | [error] | [error] | [error] | [error] | [error] + decimal2 | decimal2 | decimal2 | exponent | done | done | done | done + exponent | any2 | any2 | [error] | sign | sign | [error] | [error] + sign | any2 | any2 | [error] | [error] | [error] | [error] | [error] + any2 | any2 | any2 | done | done | done | done | done + + The state machine is realized with one label per state (prefixed with + "scan_number_") and `goto` statements between them. The state machine + contains cycles, but any cycle can be left when EOF is read. Therefore, + the function is guaranteed to terminate. + + During scanning, the read bytes are stored in token_buffer. This string is + then converted to a signed integer, an unsigned integer, or a + floating-point number. + + @return token_type::value_unsigned, token_type::value_integer, or + token_type::value_float if number could be successfully scanned, + token_type::parse_error otherwise + + @note The scanner is independent of the current locale. Internally, the + locale's decimal point is used instead of `.` to work with the + locale-dependent converters. + */ + token_type scan_number() + { + // reset token_buffer to store the number's bytes + reset(); + + // the type of the parsed number; initially set to unsigned; will be + // changed if minus sign, decimal point or exponent is read + token_type number_type = token_type::value_unsigned; + + // state (init): we just found out we need to scan a number + switch (current) + { + case '-': + { + add(current); + goto scan_number_minus; + } + + case '0': + { + add(current); + goto scan_number_zero; + } + + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + { + add(current); + goto scan_number_any1; + } + + // LCOV_EXCL_START + default: + { + // all other characters are rejected outside scan_number() + assert(false); + } + // LCOV_EXCL_STOP + } + +scan_number_minus: + // state: we just parsed a leading minus sign + number_type = token_type::value_integer; + switch (get()) + { + case '0': + { + add(current); + goto scan_number_zero; + } + + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + { + add(current); + goto scan_number_any1; + } + + default: + { + error_message = "invalid number; expected digit after '-'"; + return token_type::parse_error; + } + } + +scan_number_zero: + // state: we just parse a zero (maybe with a leading minus sign) + switch (get()) + { + case '.': + { + add(decimal_point_char); + goto scan_number_decimal1; + } + + case 'e': + case 'E': + { + add(current); + goto scan_number_exponent; + } + + default: + goto scan_number_done; + } + +scan_number_any1: + // state: we just parsed a number 0-9 (maybe with a leading minus sign) + switch (get()) + { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + { + add(current); + goto scan_number_any1; + } + + case '.': + { + add(decimal_point_char); + goto scan_number_decimal1; + } + + case 'e': + case 'E': + { + add(current); + goto scan_number_exponent; + } + + default: + goto scan_number_done; + } + +scan_number_decimal1: + // state: we just parsed a decimal point + number_type = token_type::value_float; + switch (get()) + { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + { + add(current); + goto scan_number_decimal2; + } + + default: + { + error_message = "invalid number; expected digit after '.'"; + return token_type::parse_error; + } + } + +scan_number_decimal2: + // we just parsed at least one number after a decimal point + switch (get()) + { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + { + add(current); + goto scan_number_decimal2; + } + + case 'e': + case 'E': + { + add(current); + goto scan_number_exponent; + } + + default: + goto scan_number_done; + } + +scan_number_exponent: + // we just parsed an exponent + number_type = token_type::value_float; + switch (get()) + { + case '+': + case '-': + { + add(current); + goto scan_number_sign; + } + + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + { + add(current); + goto scan_number_any2; + } + + default: + { + error_message = + "invalid number; expected '+', '-', or digit after exponent"; + return token_type::parse_error; + } + } + +scan_number_sign: + // we just parsed an exponent sign + switch (get()) + { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + { + add(current); + goto scan_number_any2; + } + + default: + { + error_message = "invalid number; expected digit after exponent sign"; + return token_type::parse_error; + } + } + +scan_number_any2: + // we just parsed a number after the exponent or exponent sign + switch (get()) + { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + { + add(current); + goto scan_number_any2; + } + + default: + goto scan_number_done; + } + +scan_number_done: + // unget the character after the number (we only read it to know that + // we are done scanning a number) + unget(); + + char* endptr = nullptr; + errno = 0; + + // try to parse integers first and fall back to floats + if (number_type == token_type::value_unsigned) + { + const auto x = std::strtoull(token_buffer.data(), &endptr, 10); + + // we checked the number format before + assert(endptr == token_buffer.data() + token_buffer.size()); + + if (errno == 0) + { + value_unsigned = static_cast(x); + if (value_unsigned == x) + { + return token_type::value_unsigned; + } + } + } + else if (number_type == token_type::value_integer) + { + const auto x = std::strtoll(token_buffer.data(), &endptr, 10); + + // we checked the number format before + assert(endptr == token_buffer.data() + token_buffer.size()); + + if (errno == 0) + { + value_integer = static_cast(x); + if (value_integer == x) + { + return token_type::value_integer; + } + } + } + + // this code is reached if we parse a floating-point number or if an + // integer conversion above failed + strtof(value_float, token_buffer.data(), &endptr); + + // we checked the number format before + assert(endptr == token_buffer.data() + token_buffer.size()); + + return token_type::value_float; + } + + /*! + @param[in] literal_text the literal text to expect + @param[in] length the length of the passed literal text + @param[in] return_type the token type to return on success + */ + token_type scan_literal(const char* literal_text, const std::size_t length, + token_type return_type) + { + assert(current == literal_text[0]); + for (std::size_t i = 1; i < length; ++i) + { + if (JSON_UNLIKELY(get() != literal_text[i])) + { + error_message = "invalid literal"; + return token_type::parse_error; + } + } + return return_type; + } + + ///////////////////// + // input management + ///////////////////// + + /// reset token_buffer; current character is beginning of token + void reset() noexcept + { + token_buffer.clear(); + token_string.clear(); + token_string.push_back(std::char_traits::to_char_type(current)); + } + + /* + @brief get next character from the input + + This function provides the interface to the used input adapter. It does + not throw in case the input reached EOF, but returns a + `std::char_traits::eof()` in that case. Stores the scanned characters + for use in error messages. + + @return character read from the input + */ + std::char_traits::int_type get() + { + ++chars_read; + if (next_unget) + { + // just reset the next_unget variable and work with current + next_unget = false; + } + else + { + current = ia->get_character(); + } + + if (JSON_LIKELY(current != std::char_traits::eof())) + { + token_string.push_back(std::char_traits::to_char_type(current)); + } + return current; + } + + /*! + @brief unget current character (read it again on next get) + + We implement unget by setting variable next_unget to true. The input is not + changed - we just simulate ungetting by modifying chars_read and + token_string. The next call to get() will behave as if the unget character + is read again. + */ + void unget() + { + next_unget = true; + --chars_read; + if (JSON_LIKELY(current != std::char_traits::eof())) + { + assert(token_string.size() != 0); + token_string.pop_back(); + } + } + + /// add a character to token_buffer + void add(int c) + { + token_buffer.push_back(std::char_traits::to_char_type(c)); + } + + public: + ///////////////////// + // value getters + ///////////////////// + + /// return integer value + constexpr number_integer_t get_number_integer() const noexcept + { + return value_integer; + } + + /// return unsigned integer value + constexpr number_unsigned_t get_number_unsigned() const noexcept + { + return value_unsigned; + } + + /// return floating-point value + constexpr number_float_t get_number_float() const noexcept + { + return value_float; + } + + /// return current string value (implicitly resets the token; useful only once) + string_t& get_string() + { + return token_buffer; + } + + ///////////////////// + // diagnostics + ///////////////////// + + /// return position of last read token + constexpr std::size_t get_position() const noexcept + { + return chars_read; + } + + /// return the last read token (for errors only). Will never contain EOF + /// (an arbitrary value that is not a valid char value, often -1), because + /// 255 may legitimately occur. May contain NUL, which should be escaped. + std::string get_token_string() const + { + // escape control characters + std::string result; + for (const auto c : token_string) + { + if ('\x00' <= c and c <= '\x1F') + { + // escape control characters + char cs[9]; + snprintf(cs, 9, "", static_cast(c)); + result += cs; + } + else + { + // add character as is + result.push_back(c); + } + } + + return result; + } + + /// return syntax error message + constexpr const char* get_error_message() const noexcept + { + return error_message; + } + + ///////////////////// + // actual scanner + ///////////////////// + + /*! + @brief skip the UTF-8 byte order mark + @return true iff there is no BOM or the correct BOM has been skipped + */ + bool skip_bom() + { + if (get() == 0xEF) + { + if (get() == 0xBB and get() == 0xBF) + { + // we completely parsed the BOM + return true; + } + else + { + // after reading 0xEF, an unexpected character followed + return false; + } + } + else + { + // the first character is not the beginning of the BOM; unget it to + // process is later + unget(); + return true; + } + } + + token_type scan() + { + // initially, skip the BOM + if (chars_read == 0 and not skip_bom()) + { + error_message = "invalid BOM; must be 0xEF 0xBB 0xBF if given"; + return token_type::parse_error; + } + + // read next character and ignore whitespace + do + { + get(); + } + while (current == ' ' or current == '\t' or current == '\n' or current == '\r'); + + switch (current) + { + // structural characters + case '[': + return token_type::begin_array; + case ']': + return token_type::end_array; + case '{': + return token_type::begin_object; + case '}': + return token_type::end_object; + case ':': + return token_type::name_separator; + case ',': + return token_type::value_separator; + + // literals + case 't': + return scan_literal("true", 4, token_type::literal_true); + case 'f': + return scan_literal("false", 5, token_type::literal_false); + case 'n': + return scan_literal("null", 4, token_type::literal_null); + + // string + case '\"': + return scan_string(); + + // number + case '-': + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + return scan_number(); + + // end of input (the null byte is needed when parsing from + // string literals) + case '\0': + case std::char_traits::eof(): + return token_type::end_of_input; + + // error + default: + error_message = "invalid literal"; + return token_type::parse_error; + } + } + + private: + /// input adapter + detail::input_adapter_t ia = nullptr; + + /// the current character + std::char_traits::int_type current = std::char_traits::eof(); + + /// whether the next get() call should just return current + bool next_unget = false; + + /// the number of characters read + std::size_t chars_read = 0; + + /// raw input token string (for error messages) + std::vector token_string {}; + + /// buffer for variable-length tokens (numbers, strings) + string_t token_buffer {}; + + /// a description of occurred lexer errors + const char* error_message = ""; + + // number values + number_integer_t value_integer = 0; + number_unsigned_t value_unsigned = 0; + number_float_t value_float = 0; + + /// the decimal point + const char decimal_point_char = '.'; +}; +} +} + +// #include + + +#include // assert +#include // isfinite +#include // uint8_t +#include // function +#include // string +#include // move + +// #include + +// #include + +// #include + + +#include // size_t +#include // declval + +// #include + + +#include + +// #include + + +namespace nlohmann +{ +namespace detail +{ +template +using void_t = void; +} +} + + +// http://en.cppreference.com/w/cpp/experimental/is_detected +namespace nlohmann +{ +namespace detail +{ +struct nonesuch +{ + nonesuch() = delete; + ~nonesuch() = delete; + nonesuch(nonesuch const&) = delete; + void operator=(nonesuch const&) = delete; +}; + +template class Op, + class... Args> +struct detector +{ + using value_t = std::false_type; + using type = Default; +}; + +template class Op, class... Args> +struct detector>, Op, Args...> +{ + using value_t = std::true_type; + using type = Op; +}; + +template