pax_global_header00006660000000000000000000000064151274710110014511gustar00rootroot0000000000000052 comment=ffe3cf06d4b54c7d6d1808d04e4dba253cba270e gnu-octave-octave-zeromq-ffe3cf0/000077500000000000000000000000001512747101100171315ustar00rootroot00000000000000gnu-octave-octave-zeromq-ffe3cf0/.gitignore000066400000000000000000000004571512747101100211270ustar00rootroot00000000000000# compiled files src/*.oct src/*.o src/*/*.o # for testing *.log # emacs backup files *~ # vi backup *.swp *.swo # autoconf and autoconf generated files src/configure src/config.log src/config.status src/aclocal.m4 src/autom4te.cache src/Makefile src/config.h* src/oct-alt-includes.h # dist target gnu-octave-octave-zeromq-ffe3cf0/.hgignore000066400000000000000000000013241512747101100207340ustar00rootroot00000000000000syntax: regexp # The recurrent (^|/) idiom in the regexps below should be understood # to mean "at any directory" while the ^ idiom means "from the # project's top-level directory". (^|/).*\.dvi$ (^|/).*\.pdf$ (^|/).*\.o$ (^|/).*\.oct$ (^|/).*\.octlink$ (^|/)octave-core$ (^|/)octave-workspace$ (^|/).*\.tar\.gz$ (^|/)aclocal\.m4$ (^|/)configure$ (^|/)autom4te\.cache($|/) (^|/)config\.h$ (^|/)config\.log$ (^|/)config\.status$ (^|/)Makefile$ # e.g. doc/faq/OctaveFAQ.info # doc/interpreter/octave.info-4 ^doc/.*\.info(-\d)?$ ^doc/\w*/stamp-vti$ ^doc/\w*/version\.texi$ # Emacs tools create these (^|/)TAGS$ (^|/)semantic.cache$ # Other text editors often create these (^|/)~.* gnu-octave-octave-zeromq-ffe3cf0/COPYING000066400000000000000000001045131512747101100201700ustar00rootroot00000000000000 GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 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 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 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 . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . gnu-octave-octave-zeromq-ffe3cf0/DESCRIPTION000066400000000000000000000007321512747101100206410ustar00rootroot00000000000000Name: zeromq Version: 1.5.7 Date: 2026-01-07 Author: John Donoghue Maintainer: John Donoghue Title: ZeroMQ Toolbox Description: ZeroMQ bindings for GNU Octave Categories: Zeromq Depends: octave (>= 4.0.0) SystemRequirements: zmq Autoload: no License: GPLv3+ Url: https://gnu-octave.github.io/octave-zeromq/ Repository: https://github.com/gnu-octave/octave-zeromq/ Tracker: https://github.com/gnu-octave/octave-zeromq/issues gnu-octave-octave-zeromq-ffe3cf0/INDEX000066400000000000000000000022541512747101100177260ustar00rootroot00000000000000zeromq >> Octave ZeroMQ bindings ZeroMQ overview zeromq ZeroMQ functions iszmq zmq_bind zmq_close zmq_connect zmq_curve_keypair zmq_curve_public zmq_disconnect zmq_errno zmq_getsockopt zmq_has zmq_poll zmq_recv zmq_send zmq_setsockopt zmq_socket zmq_strerror zmq_unbind zmq_version zmq_z85_decode zmq_z85_encode ZeroMQ socket type constants ZMQ_DEALER ZMQ_PAIR ZMQ_PUB ZMQ_PULL ZMQ_PUSH ZMQ_REP ZMQ_REQ ZMQ_ROUTER ZMQ_STREAM ZMQ_SUB ZMQ_XPUB ZMQ_XSUB ZeroMQ get/setsockopt constants ZMQ_EVENTS ZMQ_SUBSCRIBE ZMQ_UNSUBSCRIBE ZMQ_RCVMORE ZMQ_TYPE ZMQ_IDENTITY ZMQ_LAST_ENDPOINT ZMQ_CONNECT_TIMEOUT ZMQ_CURVE_PUBLICKEY ZMQ_CURVE_SECRETKEY ZMQ_CURVE_SERVERKEY ZMQ_CURVE_SERVER ZMQ_PLAIN_SERVER ZMQ_PLAIN_USERNAME ZMQ_PLAIN_PASSWORD ZMQ_MECHANISM ZMQ_SOCKS_PROXY ZMQ_GSSAPI_PLAINTEXT ZMQ_GSSAPI_PRINCIPAL ZMQ_GSSAPI_SERVER ZMQ_GSSAPI_SERVICE_PRINCIPAL ZMQ_PRIORITY ZMQ_RATE ZMQ_ROUTING_ID ZMQ_BACKLOG ZeroMQ ZMQ_EVENTS flags ZMQ_POLLIN ZMQ_POLLOUT ZeroMQ receive send options ZMQ_DONTWAIT ZMQ_SNDMORE ZeroMQ ZMQ_MECHANISM values ZMQ_NULL ZMQ_PLAIN ZMQ_CURVE ZMQ_GSSAPI gnu-octave-octave-zeromq-ffe3cf0/Makefile000066400000000000000000000273571512747101100206070ustar00rootroot00000000000000## Copyright 2015-2016 Carnë Draug ## Copyright 2015-2016 Oliver Heimlich ## Copyright 2017 Julien Bect ## Copyright 2017 Olaf Till ## Copyright 2018-2023 John Donoghue ## ## Copying and distribution of this file, with or without modification, ## are permitted in any medium without royalty provided the copyright ## notice and this notice are preserved. This file is offered as-is, ## without any warranty. TOPDIR := $(shell pwd) PACKAGE_REPO_DIR ?= $(TOPDIR) ## Some basic tools (can be overriden using environment variables) SED ?= sed TAR ?= tar GREP ?= grep CUT ?= cut TR ?= tr TEXI2PDF ?= texi2pdf -q MAKEINFO ?= makeinfo MAKEINFO_HTML_OPTIONS := --no-headers --set-customization-variable 'COPIABLE_LINKS 0' --set-customization-variable 'COPIABLE_ANCHORS 0' --no-split # work out a possible help generator ifeq ($(strip $(QHELPGENERATOR)),) ifneq ($(shell qhelpgenerator-qt5 -v 2>/dev/null),) QHELPGENERATOR = qhelpgenerator-qt5 else ifneq ($(shell qcollectiongenerator-qt5 -v 2>/dev/null),) QHELPGENERATOR = qcollectiongenerator-qt5 #else ifneq ($(shell qhelpgenerator -qt5 -v 2>/dev/null),) # v4 doesnt work # QHELPGENERATOR = qhelpgenerator -qt5 else ifneq ($(shell qcollectiongenerator -qt5 -v 2>/dev/null),) QHELPGENERATOR = qcollectiongenerator -qt5 else QHELPGENERATOR = true endif endif ## Note the use of ':=' (immediate set) and not just '=' (lazy set). ## http://stackoverflow.com/a/448939/1609556 package := $(shell $(GREP) "^Name: " DESCRIPTION | $(CUT) -f2 -d" " | \ $(TR) '[:upper:]' '[:lower:]') version := $(shell $(GREP) "^Version: " DESCRIPTION | $(CUT) -f2 -d" ") pkg_date := $(shell $(GREP) "^Date: " DESCRIPTION | $(CUT) -f2 -d" ") ## These are the paths that will be created for the releases. target_dir := target release_dir := $(target_dir)/$(package)-$(version) release_tarball := $(target_dir)/$(package)-$(version).tar.gz html_dir := $(target_dir)/$(package)-html html_tarball := $(target_dir)/$(package)-html.tar.gz ## Using $(realpath ...) avoids problems with symlinks due to bug ## #50994 in Octaves scripts/pkg/private/install.m. But at least the ## release directory above is needed in the relative form, for 'git ## archive --format=tar --prefix=$(release_dir). real_target_dir := $(realpath $(PACKAGE_REPO_DIR))/$(target_dir) installation_dir := $(real_target_dir)/.installation package_list := $(installation_dir)/.octave_packages install_stamp := $(installation_dir)/.install_stamp ## These can be set by environment variables which allow to easily ## test with different Octave versions. ifndef OCTAVE OCTAVE := octave endif OCTAVE := $(OCTAVE) --no-gui --silent --norc MKOCTFILE ?= mkoctfile ## Command used to set permissions before creating tarballs FIX_PERMISSIONS ?= chmod -R a+rX,u+w,go-w,ug-s ## Detect which VCS is used vcs := $(if $(wildcard $(PACKAGE_REPO_DIR)/.hg),hg,$(if $(wildcard $(PACKAGE_REPO_DIR)/.git),git,unknown)) ifeq ($(vcs),hg) release_dir_dep := $(PACKAGE_REPO_DIR)/.hg/dirstate HG := hg HG_CMD = $(HG) --config alias.$(1)=$(1) --config defaults.$(1)= $(1) HG_ID := $(shell $(call HG_CMD,identify) --id | sed -e 's/+//' ) REPO_TIMESTAMP := $(firstword $(shell $(call HG_CMD,log) --rev $(HG_ID) --template '{date|hgdate}')) endif ifeq ($(vcs),git) release_dir_dep := $(PACKAGE_REPO_DIR)/.git/index GIT := git REPO_TIMESTAMP := $(firstword $(shell $(GIT) log -n1 --date=unix --format="%ad")) endif TAR_REPRODUCIBLE_OPTIONS := --sort=name --mtime="@$(REPO_TIMESTAMP)" --owner=0 --group=0 --numeric-owner TAR_OPTIONS := --format=ustar $(TAR_REPRODUCIBLE_OPTIONS) ## .PHONY indicates targets that are not filenames ## (https://www.gnu.org/software/make/manual/html_node/Phony-Targets.html) .PHONY: help ## make will display the command before runnning them. Use @command ## to not display it (makes specially sense for echo). help: @echo "Targets:" @echo " dist - Create $(release_tarball) for release." @echo " html - Create $(html_tarball) for release." @echo " release - Create both of the above and show md5sums." @echo " install - Install the package in $(installation_dir), where it is not visible in a normal Octave session." @echo " check - Execute package tests." @echo " doctest - Test the help texts with the doctest package." @echo " run - Run Octave with the package installed in $(installation_dir) in the path." @echo " clean - Remove everything made with this Makefile." ## ## Recipes for release tarballs (package + html) ## .PHONY: release dist html clean-tarballs clean-unpacked-release ## To make a release, build the distribution and html tarballs. release: dist html md5sum $(release_tarball) $(html_tarball) @echo "Upload @ https://sourceforge.net/p/octave/package-releases/new/" @echo " and note the changeset the release corresponds to" ## dist and html targets are only PHONY/alias targets to the release ## and html tarballs. dist: $(release_tarball) html: $(html_tarball) ## An implicit rule with a recipe to build the tarballs correctly. %.tar.gz: % $(TAR) -cf - $(TAR_OPTIONS) -C "$(target_dir)/" "$(notdir $<)" | gzip -9n > "$@" clean-tarballs: @echo "## Cleaning release tarballs (package + html)..." -$(RM) $(release_tarball) $(html_tarball) @echo ## Create the unpacked package. ## ## Notes: ## * having ".hg/dirstate" (or ".git/index") as a prerequesite means it is ## only rebuilt if we are at a different commit. ## * the variable RM usually defaults to "rm -f" ## * having this recipe separate from the one that makes the tarball ## makes it easy to have packages in alternative formats (such as zip) ## * note that if a commands needs to be run in a specific directory, ## the command to "cd" needs to be on the same line. Each line restores ## the original working directory. $(release_dir): $(release_dir_dep) -$(RM) -r "$@" ifeq (${vcs},hg) $(HG) archive --exclude ".hg*" --type files "$@" endif ifeq (${vcs},git) $(GIT) archive --format=tar --prefix="$@/" HEAD | $(TAR) -x $(RM) "$@/.gitignore" endif ## Don't fall back to run the supposed necessary contents of ## 'bootstrap' here. Users are better off if they provide ## 'bootstrap'. Administrators, checking build reproducibility, can ## put in the missing 'bootstrap' file if they feel they know its ## necessary contents. ifneq (,$(wildcard src/bootstrap)) cd "$@/src" && ./bootstrap && $(RM) -r "autom4te.cache" endif ifneq (,$(wildcard src/configure)) cd "$@/src" && ./configure && $(MAKE) prebuild && \ $(MAKE) PACKAGE_REPO_DIR=$(PACKAGE_REPO_DIR) distclean && $(RM) Makefile endif ifneq (,$(wildcard doc/mkfuncdocs.py)) $(MAKE) PACKAGE_REPO_DIR=$(PACKAGE_REPO_DIR) -C "$@" docs cd "$@" && $(RM) -f doc/mkfuncdocs.py doc/mkqhcp.py endif # remove dev stuff cd "$@" && $(RM) -rf "devel" ${FIX_PERMISSIONS} "$@" # ensure target dir date is now updated touch "$@" run_in_place = $(OCTAVE) --eval ' pkg ("local_list", "$(package_list)"); ' \ --eval ' pkg ("load", "$(package)"); ' .PHONY: docs docs: doc/$(package).pdf doc/$(package).qhc doc/$(package).html .PHONY: clean-docs clean-docs: $(RM) -f doc/$(package).info $(RM) -f doc/$(package).pdf $(RM) -f doc/$(package).html $(RM) -f doc/$(package).qhc $(RM) -f doc/$(package).qch $(RM) -f doc/functions.texi $(RM) -f doc/version.texi doc/version.texi: $(release_dir_dep) @echo Generating $@ @echo "@c autogenerated from Makefile" > $@ @echo "@set VERSION $(version)" >> $@ @echo "@set PACKAGE $(package)" >> $@ @echo "@set DATE $(pkg_date)" >> $@ doc/$(package).pdf: doc/$(package).texi doc/functions.texi doc/version.texi cd doc && SOURCE_DATE_EPOCH=$(REPO_TIMESTAMP) $(TEXI2PDF) $(package).texi # remove temp files cd doc && $(RM) -f $(package).aux $(package).cp $(package).cps $(package).fn $(package).fns $(package).log $(package).toc doc/$(package).html: doc/$(package).texi doc/functions.texi doc/version.texi cd doc && SOURCE_DATE_EPOCH=$(REPO_TIMESTAMP) $(MAKEINFO) --html --css-ref=$(package).css $(MAKEINFO_HTML_OPTIONS) $(package).texi doc/$(package).qhc: doc/$(package).html # try also create qch file if can cd doc && ./mkqhcp.py $(package) && $(QHELPGENERATOR) $(package).qhcp -o $(package).qhc cd doc && $(RM) -f $(package).qhcp $(package).qhp doc/$(package).info: doc/$(package).texi doc/functions.texi doc/version.texi cd doc && $(MAKEINFO) $(package).texi doc/functions.texi: $(release_dir_dep) cd doc && ./mkfuncdocs.py --src-dir=../inst/ --src-dir=../src/ --func-prefix=zmq_ --ignore=zeromq ../INDEX | $(SED) 's/@seealso/@xseealso/g' > functions.texi # html_options = --eval 'options = get_html_options ("octave-forge");' ## Uncomment this for package documentation. html_options = --eval 'options = get_html_options ("octave-forge");' \ --eval 'options.package_doc = "$(package).texi";' \ --eval 'options.package_doc_options = [options.package_doc_options " --css-include=$(package).css"];' $(html_dir): $(install_stamp) $(RM) -r "$@"; $(run_in_place) \ --eval ' pkg load generate_html; ' \ $(html_options) \ --eval ' generate_package_html ("$(package)", "$@", options); '; $(FIX_PERMISSIONS) "$@"; clean-unpacked-release: @echo "## Cleaning unpacked release tarballs (package + html)..." -$(RM) -r $(release_dir) $(html_dir) @echo ## ## Recipes for installing the package. ## .PHONY: install clean-install octave_install_commands = \ ' llist_path = pkg ("local_list"); \ mkdir ("$(installation_dir)"); \ load (llist_path); \ local_packages(cellfun (@ (x) strcmp ("$(package)", x.name), local_packages)) = []; \ save ("$(package_list)", "local_packages"); \ pkg ("local_list", "$(package_list)"); \ pkg ("prefix", "$(installation_dir)", "$(installation_dir)"); \ pkg ("install", "-local", "-verbose", "$(release_tarball)"); ' ## Install unconditionally. Maybe useful for testing installation with ## different versions of Octave. install: $(release_tarball) @echo "Installing package under $(installation_dir) ..." $(OCTAVE) --eval $(octave_install_commands) touch $(install_stamp) ## Install only if installation (under target/...) is not current. $(install_stamp): $(release_tarball) @echo "Installing package under $(installation_dir) ..." $(OCTAVE) --eval $(octave_install_commands) touch $(install_stamp) clean-install: @echo "## Cleaning installation under $(installation_dir) ..." -$(RM) -r $(installation_dir) @echo ## ## Recipes for testing purposes ## .PHONY: run doctest check ## Start an Octave session with the package directories on the path for ## interactice test of development sources. run: $(install_stamp) $(run_in_place) --persist ## Test example blocks in the documentation. Needs doctest package ## https://octave.sourceforge.io/doctest/index.html doctest: $(install_stamp) $(run_in_place) --eval 'pkg load doctest;' \ --eval "targets = pkg('list', 'zeromq'){1}.dir;" \ --eval "doctest (targets);" ## Test package. octave_test_commands = \ ' pkgs = pkg("list", "$(package)"); \ dirs = {pkgs{1}.dir}; \ __run_test_suite__ (dirs, {}); ' ## the following works, too, but provides no overall summary output as ## __run_test_suite__ does: ## ## else cellfun (@runtests, horzcat (cellfun (@ (dir) ostrsplit (([~, dirs] = system (sprintf ("find %s -type d", dir))), "\n\r", true), dirs, "UniformOutput", false){:})); endif ' check: $(install_stamp) $(run_in_place) --eval $(octave_test_commands) ## ## CLEAN ## .PHONY: clean clean: clean-tarballs clean-unpacked-release clean-install clean-docs test -e $(target_dir)/fntests.log && rm -f $(target_dir)/fntests.log || true @echo "## Removing target directory (if empty)..." test -e $(target_dir) && rmdir $(target_dir) || true @echo @echo "## Cleaning done" @echo gnu-octave-octave-zeromq-ffe3cf0/NEWS000066400000000000000000000075521512747101100176410ustar00rootroot00000000000000Summary of important user-visible changes for octave zeromq 1.5.7: ------------------------------------------------------------------- *** minor doc updates *** Space in path support for windows. Summary of important user-visible changes for octave zeromq 1.5.6: ------------------------------------------------------------------- *** minor updates for Octave 8+ compatibility *** minor doc updates Summary of important user-visible changes for octave zeromq 1.5.5: ------------------------------------------------------------------- *** added ZMQ_PRIORITY, ZMQ_RATE, ZMQ_ROUTING_ID, ZMQ_BACKLOG constants *** added Qt5 help documents *** minor doc updates Summary of important user-visible changes for octave zeromq 1.5.4: ------------------------------------------------------------------- *** use octave_base_dld_value class if available *** allow libzmq fallback detection Summary of important user-visible changes for octave zeromq 1.5.3: ------------------------------------------------------------------- *** bugfix use pkg-config in configure (Bug #60419) Summary of important user-visible changes for octave zeromq 1.5.2: ------------------------------------------------------------------- *** bugfix ref count used by unique_clone *** minor doc updates Summary of important user-visible changes for octave zeromq 1.5.1: ------------------------------------------------------------------- *** minor updates for octave depreciated features *** minor doc updates Summary of important user-visible changes for octave zeromq 1.5.0: ------------------------------------------------------------------- *** use OCTAVE_LOCAL_BUFFER for temp mem usage *** minor doc updates *** bugfix octave_zeromq_socket subsasgn access *** add initial curve functions and authentication *** add plain authentication options *** add gssapi authentication options *** added security mechanism get option *** added socks5 support Summary of important user-visible changes for octave zeromq 1.4.0: ------------------------------------------------------------------- *** additional spelling checks *** added new functions zmq_has *** added ZMQ_LAST_ENDPOINT, ZMQ_CONNECT_TIMEOUT to getsockopts *** added ZMQ_XSUB, ZMQ_XPUB, ZMQ_STREAM constants for zmq_socket *** added zmq_example5.m for STREAM type example *** added package documentation *** lock oct file on pkg load Summary of important user-visible changes for octave zeromq 1.3.0: ------------------------------------------------------------------- *** spelling check in docs *** add generation and install of oct file tests *** updated configuration for use of depreciated symbols *** added new functions iszmq, get, set *** added dot notation for access of get/set of properties *** corrected display of socket type for dealer, pair, push, pull types Summary of important user-visible changes for octave zeromq 1.2.1: ------------------------------------------------------------------- *** updated zmq_test for using pause and uint8 typecast for identity set Summary of important user-visible changes for octave zeromq 1.2.0: ------------------------------------------------------------------- *** added pub/sub example code *** added new function zmq_disconnect *** add ZMQ_EVENTS, ZMQ_POLLIN, ZMQ_POLLOUT to INDEX, update events documentation *** added ZMQ_IDENTITY to get/setsockopts Summary of important user-visible changes for octave zeromq 1.1.0: ------------------------------------------------------------------- *** added new functions zmq_unbind, zmq_errno. *** added getsockopt ZMQ_TYPE, ZMQ_EVENTS processing. *** added help zeromq implementation *** added new examples folder/files Summary of important user-visible changes for octave zeromq 1.0.0: ------------------------------------------------------------------- *** Initial release gnu-octave-octave-zeromq-ffe3cf0/README.md000066400000000000000000000021131512747101100204050ustar00rootroot00000000000000Introduction ============ The Octave Zeromq package provides ZeroMQ bindings for GNU Octave Requirements ============ * Octave >= 4.0.0 * [zeromq](https://zeromq.org) library and include files Installing ========== To install, run the octave package manager: 1. If running Windows, the package may already be installed: type pkg list, to view the installed packages. 2. To install from source forge: pkg install -forge zeromq 3. To install from a local tarball. pkg install zeromq-XXXXXXX.tar.gz Where XXXXXXX is the version of the the downloaded tarball. Usage: ====== 1. Load the package. pkg load zeromq (Required each time Octave is started) 2. Type help zeromq at the octave prompt to display a list of functions Documentation ============== Documentation for using the toolkit is available on [octave-zeromq github](https://gnu-octave.github.io/octave-zeromq/functions).. Read the Octave [Octave zeromq package wiki](https://wiki.octave.org/Zeromq_package) for install tips and examples. Known limitations and bugs ========================== None provided gnu-octave-octave-zeromq-ffe3cf0/doc/000077500000000000000000000000001512747101100176765ustar00rootroot00000000000000gnu-octave-octave-zeromq-ffe3cf0/doc/README000066400000000000000000000010021512747101100205470ustar00rootroot00000000000000This package is an octave binding for the zeromq library. Dependancies ------------ zmq library and include files http://zeromq.org/ for fedora: yum install zeromq-devel for ubuntu: apt install libzmq-dev Installing ---------- From octave: * Local file: pkg install zeromq-{VERSION}.tar.gz * Octave forge: pkg install -forge zermoq Using ------ * Load the package prior to using the functions: pkg load zermoq * functions are close to the C API for the zermoq library. gnu-octave-octave-zeromq-ffe3cf0/doc/gpl.texi000066400000000000000000001043301512747101100213540ustar00rootroot00000000000000@node Copying @appendix GNU General Public License @cindex warranty @cindex copyright @center Version 3, 29 June 2007 @display Copyright @copyright{} 2007 Free Software Foundation, Inc. @url{http://fsf.org/} Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. @end display @heading Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program---to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. @heading TERMS AND CONDITIONS @enumerate 0 @item Definitions. ``This License'' refers to version 3 of the GNU General Public License. ``Copyright'' also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. ``The Program'' refers to any copyrightable work licensed under this License. Each licensee is addressed as ``you''. ``Licensees'' and ``recipients'' may be individuals or organizations. To ``modify'' a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a ``modified version'' of the earlier work or a work ``based on'' the earlier work. A ``covered work'' means either the unmodified Program or a work based on the Program. To ``propagate'' a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To ``convey'' a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays ``Appropriate Legal Notices'' to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. @item Source Code. The ``source code'' for a work means the preferred form of the work for making modifications to it. ``Object code'' means any non-source form of a work. A ``Standard Interface'' means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The ``System Libraries'' of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A ``Major Component'', in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The ``Corresponding Source'' for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. @item Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. @item Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. @item Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. @item Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: @enumerate a @item The work must carry prominent notices stating that you modified it, and giving a relevant date. @item The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to ``keep intact all notices''. @item You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. @item If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. @end enumerate A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an ``aggregate'' if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. @item Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: @enumerate a @item Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. @item Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. @item Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. @item Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. @item Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. @end enumerate A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A ``User Product'' is either (1) a ``consumer product'', which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, ``normally used'' refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. ``Installation Information'' for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. @item Additional Terms. ``Additional permissions'' are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: @enumerate a @item Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or @item Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or @item Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or @item Limiting the use for publicity purposes of names of licensors or authors of the material; or @item Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or @item Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. @end enumerate All other non-permissive additional terms are considered ``further restrictions'' within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. @item Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. @item Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. @item Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An ``entity transaction'' is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. @item Patents. A ``contributor'' is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's ``contributor version''. A contributor's ``essential patent claims'' are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, ``control'' includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a ``patent license'' is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To ``grant'' such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. ``Knowingly relying'' means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is ``discriminatory'' if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. @item No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. @item Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. @item Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License ``or any later version'' applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. @item Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM ``AS IS'' WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. @item Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. @item Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. @end enumerate @heading END OF TERMS AND CONDITIONS @heading How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the ``copyright'' line and a pointer to where the full notice is found. @smallexample @var{one line to give the program's name and a brief idea of what it does.} Copyright (C) @var{year} @var{name of author} 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 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 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 @url{http://www.gnu.org/licenses/}. @end smallexample Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: @smallexample @var{program} Copyright (C) @var{year} @var{name of author} This program comes with ABSOLUTELY NO WARRANTY; for details type @samp{show w}. This is free software, and you are welcome to redistribute it under certain conditions; type @samp{show c} for details. @end smallexample The hypothetical commands @samp{show w} and @samp{show c} should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an ``about box''. You should also get your employer (if you work as a programmer) or school, if any, to sign a ``copyright disclaimer'' for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see @url{http://www.gnu.org/licenses/}. The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read @url{http://www.gnu.org/philosophy/why-not-lgpl.html}. gnu-octave-octave-zeromq-ffe3cf0/doc/macros.texi000066400000000000000000000062411512747101100220600ustar00rootroot00000000000000@c Copyright (C) 2012-2019 John W. Eaton @c @c This file is part of Octave. @c @c Octave is free software: you can redistribute it and/or modify it @c under the terms of the GNU General Public License as published by @c the Free Software Foundation, either version 3 of the License, or @c (at your option) any later version. @c @c Octave is distributed in the hope that it will be useful, but @c WITHOUT ANY WARRANTY; without even the implied warranty of @c MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @c GNU General Public License for more details. @c @c You should have received a copy of the GNU General Public License @c along with Octave; see the file COPYING. If not, see @c . @c The following macro marks words that aspell should ignore during @c spellchecking. Within Texinfo it has no effect as it merely replaces @c the macro call with the argument itself. @macro nospell {arg} \arg\ @end macro @c The following macro works around the Info/plain text expansion of @code{XXX} @c which is `XXX'. This looks particularly bad when the macro body is @c single or double-quoted text, such as a property value `"position"' @ifinfo @macro qcode{arg} \arg\ @end macro @end ifinfo @ifnotinfo @macro qcode{arg} @code{\arg\} @end macro @end ifnotinfo @c The following macro is used for the on-line help system, but we don't @c want lots of `See also: foo, bar, and baz' strings cluttering the @c printed manual (that information should be in the supporting text for @c each group of functions and variables). @c @c Implementation Note: @c For TeX, @vskip produces a nice separation. @c For Texinfo, '@sp 1' should work, but in practice produces ugly results @c for HTML. We use a simple blank line to produce the correct @c behavior. @c @c We use @xseealso now because Texinfo introduced its own @seealso @c command. But instead of modifying all source files, we'll have the @c munge-texi script convert @seealso to @xseealso. @macro xseealso {args} @iftex @vskip 2pt @end iftex @ifnottex @end ifnottex @ifnotinfo @noindent @strong{See also:} \args\. @end ifnotinfo @ifinfo @noindent See also: \args\. @end ifinfo @end macro @c The following macro works around a situation where the Info/plain text @c expansion of the @code{XXX} macro is `XXX'. The use of the apostrophe @c can be confusing if the code segment itself ends with a transpose operator. @ifinfo @macro tcode{arg} \arg\ @end macro @end ifinfo @ifnotinfo @macro tcode{arg} @code{\arg\} @end macro @end ifnotinfo @c FIXME: someday, when Texinfo 5.X is standard, we might replace this with @c @backslashchar, which is a new addition to Texinfo. @macro xbackslashchar \\ @end macro @c These may be useful for all, not just for octave.texi. @tex \ifx\rgbDarkRed\thisisundefined \def\rgbDarkRed{0.50 0.09 0.12} \fi \ifx\linkcolor\thisisundefined \relax \else \global\def\linkcolor{\rgbDarkRed} \fi \ifx\urlcolor\thisisundefined \relax \else \global\def\urlcolor{\rgbDarkRed} \fi \ifx\urefurlonlylinktrue\thisisundefined \relax \else \global\urefurlonlylinktrue \fi @end tex @c Make the apostrophe in code examples cut-and-paste friendly. @codequoteundirected on gnu-octave-octave-zeromq-ffe3cf0/doc/mkfuncdocs.py000077500000000000000000000330421512747101100224110ustar00rootroot00000000000000#!/usr/bin/env python3 ## Copyright 2018-2025 John Donoghue ## ## 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 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 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 ## . ## mkfuncdocs v1.0.9 ## mkfuncdocs.py will attempt to extract the help texts from functions in src ## dirs, extracting only those that are in the specifed INDEX file and output them ## to stdout in texi format ## ## It will extract from both .m and the help text for DEFUN_DLD help in .cc/.cpp ## files. ## ## It attempts to find the help text for each function in a file within the src search ## folders that match in order: [ functionname.m functionname.cc functionname.cpp ## functionname_withoutprefix.cc functionname_withoutprefix.cpp ] ## ## The INDEX file can contain additional subgroups in the form of: ## #! Subgroup Name ## ## Usage: ## mkfundocs.py options INDEXfile ## Options can be 0 or more of: ## --verbose : Turn on verbose mode ## --src-dir=xxxxx : Add dir xxxxx to the dirs searched for the function file. ## If no directories are provided, it will default to looking in the ## 'inst' directory. ## --ignore=xxxxx : dont attempt to generate help for function xxxxx. ## --funcprefix=xxxxx : remove xxxxx from the function name when searching for matching ## source file. ## --allowscan : if can not find function, attemp to scan .cc,cpp,cxx files for match ## ## --standalone : generate a texinfo file expected to be used with being included in ## another document file. import sys import os import re import tempfile import shutil import fnmatch import subprocess import glob import calendar; import time; class SubGroup: name = "" functions = [] def __init__ (self, name): if name: self.name = name self.functions = [] class Group: name = "Functions" functions = [] subgroups = [] def __init__ (self, name=""): if name: self.name = name self.functions = [] self.subgroups = [] def add_function(self, f): if len(self.subgroups) == 0: self.functions.append(f); else: functions = self.subgroups[-1].functions functions.append(f) self.subgroups[-1].functions = functions def add_subgroup(self, f): self.subgroups.append(SubGroup(f)) def isempty(self): if len(self.functions): return False for sg in self.subgroups: if len(sg.functions): return False return True def dump(self): print(f"Group {self.name}") for f in self.functions: print(f" {f}") for sg in self.subgroups: print(f" *{sg.name}") for f in sg.functions: print(f" {f}") class Index: name = "" groups = [] def texify_line(line): # convert any special chars in a line to texinfo format # currently just used for group formatting ? line = line.replace("@", "@@") line = line.replace("{", "@{") line = line.replace("}", "@}") line = line.replace(",", "@comma{}") return line def find_defun_line_in_file(filename, fnname): linecnt = 0 defun_line=re.compile(r"^DEFUN_DLD\s*\(\s*{}".format(fnname)) with open(filename, 'rt') as f: for line in f: if re.match(defun_line, line): return linecnt linecnt = linecnt + 1 return -1 def find_function_line_in_file(filename, fnname): linecnt = 0 func = False defun_line=re.compile(r"^\s*function \s*") with open(filename, 'rt') as f: for line in f: if func == True: x = line.strip() if x.startswith("## -*- texinfo -*-"): return linecnt else: func = False if re.match(defun_line, line): if line.find("=") != -1: x = line.split("=") x = x[-1] else: x = line.replace("function ", "") x = x.split("(") x = x[0].strip() if x == fnname: func = True linecnt = linecnt + 1 return -1 def read_m_file(filename, skip=0): help = [] inhelp = False havehelp = False; with open(filename, 'rt') as f: for line in f: line = line.lstrip() if skip > 0: skip = skip - 1 elif not havehelp: if havehelp == False and inhelp == False and line.startswith('##'): if "texinfo" in line: inhelp = True elif inhelp == True: if not line.startswith('##'): inhelp = False havehelp = True else: if line.startswith("## @"): line = line[3:] else: line = line[2:] help.append (line.rstrip()); return help def read_cc_file(filename, skip=0): help = [] inhelp = False havehelp = False; with open(filename, 'rt') as f: for line in f: line = line.lstrip() if skip > 0: skip = skip - 1 elif not havehelp: if havehelp == False and inhelp == False: if "texinfo" in line: inhelp = True elif inhelp == True: line = line.rstrip() if len(line) > 0 and line[-1] == '\\': line = line[:-1] line = line.rstrip() line = line.replace("\\n", "\n") line = line.replace("\\\"", "\"") if len(line) > 0 and line[-1] == '\n': line = line[:-1] # endif a texinfo line elif line.endswith('")'): line = line[:-2] if line.startswith('{'): inhelp = False havehelp = True else: help.append (line); return help def read_help (filename, skip=0): help = [] if filename[-2:] == ".m": help = read_m_file(filename, skip) else: help = read_cc_file(filename, skip) return help def read_index (filename, ignore): index = Index () with open(filename, 'rt') as f: lines = f.read().splitlines() #print ("read", lines) first = True category = Group() for l in lines: if l.startswith("#!"): l = l[2:].strip() category.add_subgroup(l) elif l.startswith("#"): pass elif first: index.name = l; first = False elif l.startswith(" "): l = l.strip() # may be multiple functions here funcs = l.split() for f in funcs: if f not in ignore: category.add_function(l) else: # new category name if not category.isempty(): index.groups.append(category) category = Group(l.strip()) # left over category ? if not category.isempty(): index.groups.append(category) return index; def find_class_file(fname, paths): for f in paths: # class constructor ? name = f + "/@" + fname + "/" + fname + ".m" if os.path.isfile(name): return name, 0 # perhaps classname.func format ? x = fname.split(".") if len(x) > 0: zname = x.pop() cname = ".".join(x) name = f + "/" + cname + ".m" if os.path.isfile(name): idx = find_function_line_in_file(name, zname) if idx >= 0: return name, idx name = f + "/@" + cname + "/" + zname + ".m" if os.path.isfile(name): return name, 0 return None, -1 def find_func_file(fname, paths, prefix, scanfiles=False): for f in paths: name = f + "/" + fname + ".m" if os.path.isfile(name): return name, 0 # class constructor ? name = f + "/@" + fname + "/" + fname + ".m" if os.path.isfile(name): return name, 0 name = f + "/" + fname + ".cc" if os.path.isfile(name): return name, 0 name = f + "/" + fname + ".cpp" if os.path.isfile(name): return name, 0 # if have a prefix, remove and try if prefix and fname.startswith(prefix): fname = fname[len(prefix):] name = f + "/" + fname + ".cc" if os.path.isfile(name): return name, 0 name = f + "/" + fname + ".cpp" if os.path.isfile(name): return name, 0 # if here, we still dont have a file match # if allowed to scan files, do that if scanfiles: #sys.stderr.write("Warning: Scaning for {}\n".format(fname)) for f in paths: files = list(f + "/" + a for a in os.listdir(f)) cc_files = fnmatch.filter(files, "*.cc") cpp_files = fnmatch.filter(files, "*.cpp") cxx_files = fnmatch.filter(files, "*.cxx") for fn in cc_files + cpp_files + cxx_files: line = find_defun_line_in_file(fn, fname) if line >= 0: #sys.stderr.write("Warning: Found function for {} in {} at {}\n".format(fname, fn, line)) return fn, line return None, -1 def display_standalone_header(): # make a file that doesnt need to be included in a texinfo file to # be valid print("@c mkfuncdocs output for a standalone function list") print("@include macros.texi") print("@ifnottex") print("@node Top") print("@top Function Documentation") print("Function documentation extracted from texinfo source in octave source files.") print("@contents") print("@end ifnottex") print("@node Function Reference") print("@chapter Function Reference") print("@cindex Function Reference") def display_standalone_footer(): print("@bye") def display_func(name, ref, help, is_subgroup): print ("@c -----------------------------------------") if is_subgroup: print ("@subsubsection {}".format(name)) else: print ("@subsection {}".format(name)) print ("@cindex {}".format(ref)) for l in help: print ("{}".format(l)) def process_function_help(g_name, f, options, is_subgroup=False): if True: print ("@c {} {}".format(g_name, f)) h = "" filename = "" path = "" if "@" in f: #print ("class func") path = f name = "@" + f ref = f.split("/")[-1] filename, lineno = find_func_file(path, options["srcdir"], options["funcprefix"]) elif "." in f: path = f ref = f.split(".")[-1] name = f.split(".")[-1] filename, lineno = find_class_file(path, options["srcdir"]) if not filename: parts = f.split('.') cnt = 0 path = "" for p in parts: if cnt < len(parts)-1: path = path + "/+" else: path = path + "/" path = path + p cnt = cnt + 1 name = f; ref = parts[-1] filename, lineno = find_func_file(path, options["srcdir"], options["funcprefix"]) elif "/" in f: path = f name = f ref = f.split("/")[-1] filename, lineno = find_func_file(path, options["srcdir"], options["funcprefix"]) else: path = f name = f ref = f filename, lineno = find_func_file(path, options["srcdir"], options["funcprefix"], options['allowscan']) if not filename: sys.stderr.write("Warning: Cant find source file for {}\n".format(f)) else: h = read_help (filename, lineno) if h: display_func (name, ref, h, is_subgroup) def process (args): options = { "verbose": False, "srcdir": [], "funcprefix": "", "ignore": [], "standalone": False, "allowscan": False } indexfile = "" for a in args: #print ("{}".format(a)) c=a.split("=") key=c[0] if len(c) > 1: val=c[1] else: val="" if key == "--verbose": options["verbose"] = True; if key == "--standalone": options["standalone"] = True; elif key == "--allowscan": options["allowscan"] = True; elif key == "--src-dir": if val: options["srcdir"].append(val); elif key == "--ignore": if val: options["ignore"].append(val); elif key == "--func-prefix": if val: options["funcprefix"] = val; elif val == "": if indexfile == "": indexfile = key if indexfile == "": raise Exception("No index filename") if len(options["srcdir"]) == 0: options["srcdir"].append("inst") #print "options=", options if options['standalone']: display_standalone_header() idx = read_index(indexfile, options["ignore"]) for g in idx.groups: #print ("************ {}".format(g.name)) g_name = texify_line(g.name) print ("@c ---------------------------------------------------") print ("@node {}".format(g_name)) print ("@section {}".format(g_name)) print ("@cindex {}".format(g_name)) for f in sorted(g.functions): process_function_help(g_name, f, options) for sg in g.subgroups: sg_name = texify_line(sg.name) print ("@c ---------------------------------------------------") print ("@node {}".format(g_name + " - " + sg_name)) print ("@subsection {}".format(sg_name)) print ("@cindex {}".format(g_name + " - " + sg_name)) for f in sorted(sg.functions): process_function_help(g_name + sg_name, f, options, True) if options['standalone']: display_standalone_footer() def show_usage(): print (sys.argv[0], "[options] indexfile") if __name__ == "__main__": if len(sys.argv) > 1: status = process(sys.argv[1:]) sys.exit(status) else: show_usage() gnu-octave-octave-zeromq-ffe3cf0/doc/mkqhcp.py000077500000000000000000000152171512747101100215440ustar00rootroot00000000000000#!/usr/bin/env python3 ## mkqhcp.py ## Version 1.0.6 ## Copyright 2022-2025 John Donoghue ## ## 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 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 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 ## . import sys import os import re def process(name): with open(name + ".qhcp", 'wt') as f: f.write ('\n') f.write ('\n') f.write (' \n') f.write (' \n') f.write (' \n') f.write (' {0}.qhp\n'.format(name)) f.write (' {0}.qch\n'.format(name)) f.write (' \n') f.write (' \n') f.write (' \n') f.write (' {0}.qch\n'.format(name)) f.write (' \n') f.write (' \n') f.write ('\n') title = name pat_match = re.compile(r".*(?P<title>[^<]+).*") with open(name + ".html", 'rt') as fin: # find html for line in fin: line = line.strip() e = pat_match.match(line) if e: title = e.group("title") break # section h2_match = re.compile(r'.*

]*>(?P[^<]+)</h2>.*') # appendix h2a_match = re.compile(r'.*<h2 class="appendix"[^>]*>(?P<title>[^<]+)</h2>.*') # index h2i_match = re.compile(r'.*<h2 class="unnumbered"[^>]*>(?P<title>[^<]+)</h2>.*') h3_match = re.compile(r'.*<h3 class="section"[^>]*>(?P<title>[^<]+)</h3>.*') h4_match = re.compile(r'.*<h4 class="subsection"[^>]*>(?P<title>[^<]+)</h4>.*') h5_match = re.compile(r'.*<h4 class="subsubsection"[^>]*>(?P<title>[^<]+)</h4>.*') tag_match1 = re.compile(r'.*<span id="(?P<tag>[^"]+)"[^>]*></span>.*') #tag_match2 = re.compile(r'.*<div class="[sub]*section" id="(?P<tag>[^"]+)"[^>]*>.*') tag_match2 = re.compile(r'.*<div class="[sub]*section[^"]*" id="(?P<tag>[^"]+)"[^>]*>.*') tag_match3 = re.compile(r'.*<div class="chapter-level-extent" id="(?P<tag>[^"]+)"[^>]*>.*') tag_match4 = re.compile(r'.*<div class="appendix-level-extent" id="(?P<tag>[^"]+)"[^>]*>.*') tag_match5 = re.compile(r'.*<div class="unnumbered-level-extent" id="(?P<tag>[^"]+)"[^>]*>.*') index_match = re.compile(r'.*<h4 class="[sub]+section"[^>]*>[\d\.\s]*(?P<name>[^<]+)</h4>.*') index_match2 = re.compile(r'.*<h4 class="[sub]+section"[^>]*><span>[\d\.\s]*(?P<name>[^<]+)<.*') tag = "top" has_h2 = False has_h3 = False has_h4 = False #pat_match = re.compile(r'.*<span id="(?P<tag>[^"])"></span>(?P<title>[.]+)$') with open(name + ".html", 'rt') as fin: with open(name + ".qhp", 'wt') as f: f.write('<?xml version="1.0" encoding="UTF-8"?>\n') f.write('<QtHelpProject version="1.0">\n') f.write(' <namespace>octave.community.{}</namespace>\n'.format(name)) f.write(' <virtualFolder>doc</virtualFolder>\n') f.write(' <filterSection>\n') f.write(' <toc>\n') f.write(' <section title="{} Manual" ref="{}.html">\n'.format(title, name)) # chapters here for line in fin: line = line.strip() e = tag_match1.match(line) if not e: e = tag_match2.match(line) if not e: e = tag_match3.match(line) if not e: e = tag_match4.match(line) if not e: e = tag_match5.match(line) if e: tag = e.group("tag") e = h2_match.match(line) if not e: e = h2a_match.match(line) if not e: e = h2i_match.match(line) if e: if has_h4: f.write(' </section>\n') has_h4 = False if has_h3: f.write(' </section>\n') has_h3 = False if has_h2: f.write(' </section>\n') has_h2 = True f.write(' <section title="{}" ref="{}.html#{}">\n'.format(e.group("title"), name, tag)) e = h3_match.match(line) if e: if has_h4: f.write(' </section>\n') has_h4 = False if has_h3: f.write(' </section>\n') has_h3 = True f.write(' <section title="{}" ref="{}.html#{}">\n'.format(e.group("title"), name, tag)) e = h4_match.match(line) if e: if has_h4: f.write(' </section>\n') has_h4 = True #f.write(' <section title="{}" ref="{}.html#{}"></section>\n'.format(e.group("title"), name, tag)) f.write(' <section title="{}" ref="{}.html#{}">\n'.format(e.group("title"), name, tag)) e = h5_match.match(line) if e: f.write(' <section title="{}" ref="{}.html#{}"></section>\n'.format(e.group("title"), name, tag)) if has_h4: f.write(' </section>\n') if has_h3: f.write(' </section>\n') if has_h2: f.write(' </section>\n') f.write(' </section>\n') f.write(' </toc>\n') f.write(' <keywords>\n') fin.seek(0) for line in fin: line = line.strip() e = tag_match1.match(line) if not e: e = tag_match2.match(line) if e: tag = e.group("tag") e = index_match.match(line) if not e: e = index_match2.match(line) if e: f.write(' <keyword name="{}" ref="{}.html#{}"></keyword>\n'.format(e.group("name"), name, tag)) f.write(' </keywords>\n') f.write(' <files>\n') f.write(' <file>{}.html</file>\n'.format(name)) f.write(' <file>{}.css</file>\n'.format(name)) f.write(' </files>\n') f.write(' </filterSection>\n') f.write('</QtHelpProject>\n') def show_usage(): print (sys.argv[0], "projname") if __name__ == "__main__": if len(sys.argv) > 1: status = process(sys.argv[1]) sys.exit(status) else: show_usage() ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnu-octave-octave-zeromq-ffe3cf0/doc/zeromq.css�����������������������������������������������������0000664�0000000�0000000�00000001337�15127471011�0021731�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������pre.example, .header, .float-caption, hr { /* base00 ~ body text in light solarized theme */ color: #657b83; border-color: #657b83; } pre.example { /* base3 ~ background color in light solarized theme */ background-color: #fdf6e3; padding: 0.5em; } table.cartouche { border: 1px solid #948473; background-color: #FFE3C6; width: 100%; } table.cartouche td, table.cartouche th { border: 1px solid #948473; padding: 4px 4px; } /* newer texinfo generation styles */ div.example { /* base00 ~ body text in light solarized theme */ color: #657b83; border-color: #657b83; } pre.example-preformatted { /* base3 ~ background color in light solarized theme */ background-color: #fdf6e3; padding: 0.5em; } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnu-octave-octave-zeromq-ffe3cf0/doc/zeromq.texi����������������������������������������������������0000664�0000000�0000000�00000016226�15127471011�0022115�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������\input texinfo @c -*-texinfo-*- @c Copyright (c) 2019-2026, John Donoghue <john.donoghue@ieee.org> @c Octave ZeroMQ - ZeroMQ bindings for GNU octave. @c For manually generating the documentation use @c LANGUAGE=en makeinfo --html --no-split zeromq.texi @c %*** Start of HEADER @setfilename zeromq.info @settitle Octave ZeroMQ - ZeroMQ bindings for GNU octave @afourpaper @paragraphindent 0 @finalout @c @afourwide @c %*** End of the HEADER @include version.texi @include macros.texi @c %*** Start of TITLEPAGE @titlepage @title ZeroMQ Toolkit @value{VERSION} @subtitle ZeroMQ bindings for @acronym{GNU} Octave. @author John Donoghue @page @vskip 0pt plus 1filll Copyright @copyright{} 2019-2026 John Donoghue Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies. Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one. Permission is granted to copy and distribute translations of this manual into another language, under the same conditions as for modified versions. @page @heading Distribution The @acronym{GNU} Octave ZeroMQ package is @dfn{free} software. Free software is a matter of the users' freedom to run, copy, distribute, study, change and improve the software. This means that everyone is free to use it and free to redistribute it on certain conditions. The @acronym{GNU} Octave ZeroMQ package is not, however, in the public domain. It is copyrighted and there are restrictions on its distribution, but the restrictions are designed to ensure that others will have the same freedom to use and redistribute Octave that you have. The precise conditions can be found in the @acronym{GNU} General Public License that comes with the @acronym{GNU} Octave ZeroMQ package and that also appears in @ref{Copying}. To download a copy of the @acronym{GNU} Octave zeromq package, please visit @url{https://gnu-octave.github.io/octave-zeromq/}. @end titlepage @c %*** End of TITLEPAGE @dircategory Math @direntry * Octave ZeroMQ: (zeromq). ZeroMQ Toolkit for Octave @end direntry @c %*** Start of BODY @contents @ifnottex @node Top @top Introduction The ZeroMQ toolkit is a set of ZeroMQ bindings for GNU Octave @end ifnottex @menu * Installing and loading:: Installing and loading the ZeroMQ toolkit * Basic Usage Overview:: Basic Usage Overview * Examples:: Examples using the ZeroMQ toolkit * Function Reference:: ZeroMQ toolkit functions * Copying:: Copying * Index:: Index @end menu @c ------------------------------------------------------------------------- @node Installing and loading @chapter Installing and loading @cindex Installing and loading The ZeroMQ toolkit must be installed and then loaded to be used. It can be installed in @acronym{GNU} Octave directly from octave-forge, or can be installed in an off-line mode via a downloaded tarball. The toolkit has a dependency on the zeromq library (@url{https://zeromq.org}), so it must be installed in order to successfully install the ZeroMQ toolkit. For Fedora: @code{yum install zeromq-devel} For Ubuntu: @code{apt install libzmq-dev} The toolkit must be then be loaded once per each @acronym{GNU} Octave session in order to use its functionality. @section Online Direct install @cindex Online install With an internet connection available, the ZeroMQ package can be installed from octave-forge using the following command within @acronym{GNU} Octave: @example pkg install -forge zeromq @end example The latest released version of the toolkit will be downloaded and installed. @section Off-line install @cindex Off-line install With the ZeroMQ toolkit package already downloaded, and in the current directory when running @acronym{GNU} Octave, the package can be installed using the following command within @acronym{GNU} Octave: @example pkg install zeromq-@value{VERSION}.tar.gz @end example @section Loading @cindex Loading Regardless of the method of installing the ZeroMQ toolkit, in order to use its functions, the toolkit must be loaded using the pkg load command: @example pkg load zeromq @end example The toolkit must be loaded on each @acronym{GNU} Octave session. @c ------------------------------------------------------------------------- @node Basic Usage Overview @chapter Basic Usage Overview @cindex Basic Usage Overview The usage is very close to the ZeroMQ library C language bindings for the socket creation and manipulation with the exception of creating a zeromq context, which is automatically done in the bindings internals. For example, a basic client that does a request / reply from a server on port local port 5555 (available as zmq_example1.m): @example %% Create socket and connect to server requester = zmq_socket (ZMQ_REQ); zmq_connect (requester, "tcp://localhost:5555"); %% send some data zmq_send (requester, uint8("Hello"), 5, 0); %% try to read up to 10 bytes of reply data. received = zmq_recv (requester, 10, 0); zmq_close (requester); @end example An overview of the package can be displayed by running @code{help zeromq} Help for each function can be displayed by @code{help thefunctionname} ie: @example help iszmq @end example @c ------------------------------------------------------------------------- @node Examples @chapter Examples @cindex Examples There are several examples that come with the toolkit. View example code using @code{edit examples/example_name} ie: @example edit examples/zmq_example1 @end example @section Example1 @cindex Example1 Simple client REQ socket example that attempts to connect to a server and send a hello command and get back the response. @example edit examples/zmq_example1 @end example @section Example2 @cindex Example2 Simple server REP socket example that creates the server that the client from example 1 will connect to and responds back to client 'requests' @example edit examples/zmq_example2 @end example @section Example3 @cindex Example3 Simple server PUB socket example that creates 'weather' server sends weather updates for random zip codes. @example edit examples/zmq_example3 @end example @section Example4 @cindex Example4 Simple client SUB socket example that creates client that connects to the 'weather' server and subscribes for weather updates from zip-code 10001. @example edit examples/zmq_example4 @end example @section Example5 @cindex Example5 Simple client STREAM socket example that creates client that connects to octave.org and posts HEAD request. @example edit examples/zmq_example5 @end example @c ------------------------------------------------------------------------- @node Function Reference @chapter Function Reference @cindex Function Reference The functions currently available in the ZeroMQ toolkit are described below; @include functions.texi @c ------------------------------------------------------------------------- @include gpl.texi @c ------------------------------------------------------------------------- @node Index @unnumbered Index @printindex cp @bye ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnu-octave-octave-zeromq-ffe3cf0/inst/��������������������������������������������������������������0000775�0000000�0000000�00000000000�15127471011�0020106�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnu-octave-octave-zeromq-ffe3cf0/inst/@octave_zeromq_socket/����������������������������������������0000775�0000000�0000000�00000000000�15127471011�0024434�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnu-octave-octave-zeromq-ffe3cf0/inst/@octave_zeromq_socket/close.m���������������������������������0000664�0000000�0000000�00000002051�15127471011�0025715�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������## Copyright (C) 2016-2018 John Donoghue ## ## This file is part of Octave. ## ## Octave 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 3 of the License, or (at ## your option) any later version. ## ## Octave 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 Octave; see the file COPYING. If not, see ## <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn {} {} close (@var{s}) ## Close the ZeroMQ socket represented by the object @var{s}. ## ## @var{s} is an ZeroMQ socket object returned by the @code{zmq_socket} ## function. ## @end deftypefn function close (s) zmq_close(s); endfunction %!test %! server = zmq_socket(ZMQ_PUB); %! close (server); ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnu-octave-octave-zeromq-ffe3cf0/inst/@octave_zeromq_socket/get.m�����������������������������������0000664�0000000�0000000�00000002674�15127471011�0025402�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������## Copyright (C) 2017-2018 John Donoghue ## ## This file is part of Octave. ## ## Octave 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 3 of the License, or (at ## your option) any later version. ## ## Octave 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 Octave; see the file COPYING. If not, see ## <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn {} {@var{value} =} get (@var{s}, @var{prop}) ## @deftypefnx {} {} get (@var{s}) ## get property @var{prop} from a ZeroMQ socket represented by the object @var{s}. ## ## @var{s} is an ZeroMQ socket object returned by the @code{zmq_socket} ## @var{prop} is a valid ZeroMQ socket property name. If prop is not provided, it ## will get all properties of @var{s} ## @end deftypefn function output = get (varargin) if (nargin < 1 || nargin > 2) print_usage (); endif output = __zmq_properties__ (varargin{:}); endfunction %!test %! server = zmq_socket(ZMQ_PUB); %! props = get(server); %! assert(props.type, "ZMQ_PUB") %! %! assert(get(server, "type"), "ZMQ_PUB") %! %! zmq_close (server); ��������������������������������������������������������������������gnu-octave-octave-zeromq-ffe3cf0/inst/@octave_zeromq_socket/set.m�����������������������������������0000664�0000000�0000000�00000003304�15127471011�0025405�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������## Copyright (C) 2017-2018 John Donoghue ## ## This file is part of Octave. ## ## Octave 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 3 of the License, or (at ## your option) any later version. ## ## Octave 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 Octave; see the file COPYING. If not, see ## <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn {} {} get (@var{s}, @var{prop}, @var{value} [, ...]) ## set property @var{prop} to @var{value} from a ZeroMQ socket represented by ## the object @var{s}. ## ## @var{s} is an ZeroMQ socket object returned by the @code{zmq_socket} ## @var{prop} is a valid ZeroMQ socket property name. ## @var{value} is the value to set the property to. ## ## Multiple @var{prop} @var{value} pairs can be provided at a time. ## @end deftypefn function output = set (s, varargin) if (nargin < 3) print_usage (); endif if ( rem (numel (varargin), 2) != 0) error ("@octave_zeromq_socket/set: expecting PROPERTY/VALUE pairs"); endif output = s; while (numel (varargin) > 1) prop = varargin{1}; val = varargin{2}; varargin(1:2) = []; __zmq_properties__ (s, prop, val); endwhile endfunction %!test %! a = zmq_socket(); %! id = uint8([ 1, 2, 3 ]); %! set(a, "identity", id); %! assert(__zmq_properties__(a, "identity"), id); %! zmq_close(a); ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnu-octave-octave-zeromq-ffe3cf0/inst/ZMQ_BACKLOG.m�������������������������������������������������0000664�0000000�0000000�00000002061�15127471011�0022054�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������## Copyright (C) 2022 John Donoghue ## ## This file is part of Octave. ## ## Octave 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 3 of the License, or (at ## your option) any later version. ## ## Octave 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 Octave; see the file COPYING. If not, see ## <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn {} {} ZMQ_BACKLOG ## ## Constant for getsockopt and setsockopt to set backlog for pending connections ## ## @seealso{zmq_getsockopt, zmq_setsockopt} ## @end deftypefn function v = ZMQ_BACKLOG () v = __ZMQ_OPT_BACKLOG; endfunction %!assert (ZMQ_BACKLOG, __ZMQ_OPT_BACKLOG) �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnu-octave-octave-zeromq-ffe3cf0/inst/ZMQ_CONNECT_TIMEOUT.m�����������������������������������������0000664�0000000�0000000�00000002071�15127471011�0023312�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������## Copyright (C) 2018 John Donoghue ## ## This file is part of Octave. ## ## Octave 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 3 of the License, or (at ## your option) any later version. ## ## Octave 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 Octave; see the file COPYING. If not, see ## <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn {} {} ZMQ_CONNECT_TIMEOUT ## ## Constant for get/setsockopt connect timeout value ## ## @seealso{zmq_getsockopt, zmq_setsockopt} ## @end deftypefn function v = ZMQ_CONNECT_TIMEOUT () v = __ZMQ_OPT_CONNECT_TIMEOUT; endfunction %!assert (ZMQ_CONNECT_TIMEOUT, __ZMQ_OPT_CONNECT_TIMEOUT) �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnu-octave-octave-zeromq-ffe3cf0/inst/ZMQ_CURVE.m���������������������������������������������������0000664�0000000�0000000�00000002012�15127471011�0021672�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������## Copyright (C) 2019 John Donoghue ## ## This file is part of Octave. ## ## Octave 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 3 of the License, or (at ## your option) any later version. ## ## Octave 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 Octave; see the file COPYING. If not, see ## <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn {} {} ZMQ_CURVE ## ## Constant value for getsockopt MECHANISM value option ## ## @seealso{zmq_getsockopt} ## @end deftypefn function v = ZMQ_CURVE () v = __ZMQ_MECHANISM_CURVE; endfunction %!assert (ZMQ_CURVE, __ZMQ_MECHANISM_CURVE) ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnu-octave-octave-zeromq-ffe3cf0/inst/ZMQ_CURVE_PUBLICKEY.m�����������������������������������������0000664�0000000�0000000�00000002117�15127471011�0023307�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������## Copyright (C) 2019 John Donoghue ## ## This file is part of Octave. ## ## Octave 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 3 of the License, or (at ## your option) any later version. ## ## Octave 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 Octave; see the file COPYING. If not, see ## <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn {} {} ZMQ_CURVE_PUBLICKEY ## ## Constant for getsockopt and setsockopt CURVE_PUBLICKEY value option ## ## @seealso{zmq_getsockopt, zmq_setsockopt} ## @end deftypefn function v = ZMQ_CURVE_PUBLICKEY () v = __ZMQ_OPT_CURVE_PUBLICKEY; endfunction %!assert (ZMQ_CURVE_PUBLICKEY, __ZMQ_OPT_CURVE_PUBLICKEY) �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnu-octave-octave-zeromq-ffe3cf0/inst/ZMQ_CURVE_SECRETKEY.m�����������������������������������������0000664�0000000�0000000�00000002121�15127471011�0023311�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������## Copyright (C) 2019 John Donoghue ## ## This file is part of Octave. ## ## Octave 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 3 of the License, or (at ## your option) any later version. ## ## Octave 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 Octave; see the file COPYING. If not, see ## <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn {} {} ZMQ_CURVE_PRIVATEKEY ## ## Constant for getsockopt and setsockopt CURVE_PRIVATEKEY value option ## ## @seealso{zmq_getsockopt, zmq_setsockopt} ## @end deftypefn function v = ZMQ_CURVE_SECRETKEY () v = __ZMQ_OPT_CURVE_SECRETKEY; endfunction %!assert (ZMQ_CURVE_SECRETKEY, __ZMQ_OPT_CURVE_SECRETKEY) �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnu-octave-octave-zeromq-ffe3cf0/inst/ZMQ_CURVE_SERVER.m��������������������������������������������0000664�0000000�0000000�00000002075�15127471011�0022771�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������## Copyright (C) 2019 John Donoghue ## ## This file is part of Octave. ## ## Octave 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 3 of the License, or (at ## your option) any later version. ## ## Octave 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 Octave; see the file COPYING. If not, see ## <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn {} {} ZMQ_CURVE_SERVER ## ## Constant for getsockopt and setsockopt CURVE_SERVER value option ## ## @seealso{zmq_getsockopt, zmq_setsockopt} ## @end deftypefn function v = ZMQ_CURVE_SERVER () v = __ZMQ_OPT_CURVE_SERVER; endfunction %!assert (ZMQ_CURVE_SERVER, __ZMQ_OPT_CURVE_SERVER) �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnu-octave-octave-zeromq-ffe3cf0/inst/ZMQ_CURVE_SERVERKEY.m�����������������������������������������0000664�0000000�0000000�00000002117�15127471011�0023337�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������## Copyright (C) 2019 John Donoghue ## ## This file is part of Octave. ## ## Octave 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 3 of the License, or (at ## your option) any later version. ## ## Octave 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 Octave; see the file COPYING. If not, see ## <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn {} {} ZMQ_CURVE_SERVERKEY ## ## Constant for getsockopt and setsockopt CURVE_SERVERKEY value option ## ## @seealso{zmq_getsockopt, zmq_setsockopt} ## @end deftypefn function v = ZMQ_CURVE_SERVERKEY () v = __ZMQ_OPT_CURVE_SERVERKEY; endfunction %!assert (ZMQ_CURVE_SERVERKEY, __ZMQ_OPT_CURVE_SERVERKEY) �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnu-octave-octave-zeromq-ffe3cf0/inst/ZMQ_DEALER.m��������������������������������������������������0000664�0000000�0000000�00000001762�15127471011�0021755�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������## Copyright (C) 2016-2018 John Donoghue ## ## This file is part of Octave. ## ## Octave 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 3 of the License, or (at ## your option) any later version. ## ## Octave 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 Octave; see the file COPYING. If not, see ## <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn {} {} ZMQ_DEALER ## ## Constant for dealer socket type. ## ## @seealso{zmq_socket} ## @end deftypefn function v = ZMQ_DEALER () v = __ZMQ_SOCK_DEALER; endfunction %!assert (ZMQ_DEALER, __ZMQ_SOCK_DEALER) ��������������gnu-octave-octave-zeromq-ffe3cf0/inst/ZMQ_DONTWAIT.m������������������������������������������������0000664�0000000�0000000�00000001771�15127471011�0022252�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������## Copyright (C) 2016-2018 John Donoghue ## ## This file is part of Octave. ## ## Octave 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 3 of the License, or (at ## your option) any later version. ## ## Octave 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 Octave; see the file COPYING. If not, see ## <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn {} {} ZMQ_DONTWAIT ## ## Constant for recv flag DONTWAIT ## ## @seealso{zmq_recv} ## @end deftypefn function v = ZMQ_DONTWAIT () v = __ZMQ_FLAG_DONTWAIT; endfunction %!assert (ZMQ_DONTWAIT, __ZMQ_FLAG_DONTWAIT) �������gnu-octave-octave-zeromq-ffe3cf0/inst/ZMQ_EVENTS.m��������������������������������������������������0000664�0000000�0000000�00000001777�15127471011�0022033�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������## Copyright (C) 2016-2018 John Donoghue ## ## This file is part of Octave. ## ## Octave 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 3 of the License, or (at ## your option) any later version. ## ## Octave 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 Octave; see the file COPYING. If not, see ## <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn {} {} ZMQ_EVENTS ## ## Constant for getsockopt EVENTS value option ## ## @seealso{zmq_getsockopt} ## @end deftypefn function v = ZMQ_EVENTS () v = __ZMQ_OPT_EVENTS; endfunction %!assert (ZMQ_EVENTS, __ZMQ_OPT_EVENTS) �gnu-octave-octave-zeromq-ffe3cf0/inst/ZMQ_GSSAPI.m��������������������������������������������������0000664�0000000�0000000�00000002017�15127471011�0022001�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������## Copyright (C) 2019 John Donoghue ## ## This file is part of Octave. ## ## Octave 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 3 of the License, or (at ## your option) any later version. ## ## Octave 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 Octave; see the file COPYING. If not, see ## <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn {} {} ZMQ_GSSAPI ## ## Constant value for getsockopt MECHANISM value option ## ## @seealso{zmq_getsockopt} ## @end deftypefn function v = ZMQ_GSSAPI () v = __ZMQ_MECHANISM_GSSAPI; endfunction %!assert (ZMQ_GSSAPI, __ZMQ_MECHANISM_GSSAPI) �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnu-octave-octave-zeromq-ffe3cf0/inst/ZMQ_GSSAPI_PLAINTEXT.m����������������������������������������0000664�0000000�0000000�00000002125�15127471011�0023431�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������## Copyright (C) 2019 John Donoghue ## ## This file is part of Octave. ## ## Octave 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 3 of the License, or (at ## your option) any later version. ## ## Octave 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 Octave; see the file COPYING. If not, see ## <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn {} {} ZMQ_GSSAPI_PLAINTEXT ## ## Constant for getsockopt and setsockopt GSSAPI_PLAINTEXT value option ## ## @seealso{zmq_getsockopt, zmq_setsockopt} ## @end deftypefn function v = ZMQ_GSSAPI_PLAINTEXT () v = __ZMQ_OPT_GSSAPI_PLAINTEXT; endfunction %!assert (ZMQ_GSSAPI_PLAINTEXT, __ZMQ_OPT_GSSAPI_PLAINTEXT) �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnu-octave-octave-zeromq-ffe3cf0/inst/ZMQ_GSSAPI_PRINCIPAL.m����������������������������������������0000664�0000000�0000000�00000002125�15127471011�0023402�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������## Copyright (C) 2019 John Donoghue ## ## This file is part of Octave. ## ## Octave 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 3 of the License, or (at ## your option) any later version. ## ## Octave 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 Octave; see the file COPYING. If not, see ## <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn {} {} ZMQ_GSSAPI_PRINCIPAL ## ## Constant for getsockopt and setsockopt GSSAPI_PRINCIPAL value option ## ## @seealso{zmq_getsockopt, zmq_setsockopt} ## @end deftypefn function v = ZMQ_GSSAPI_PRINCIPAL () v = __ZMQ_OPT_GSSAPI_PRINCIPAL; endfunction %!assert (ZMQ_GSSAPI_PRINCIPAL, __ZMQ_OPT_GSSAPI_PRINCIPAL) �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnu-octave-octave-zeromq-ffe3cf0/inst/ZMQ_GSSAPI_SERVER.m�������������������������������������������0000664�0000000�0000000�00000002103�15127471011�0023063�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������## Copyright (C) 2019 John Donoghue ## ## This file is part of Octave. ## ## Octave 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 3 of the License, or (at ## your option) any later version. ## ## Octave 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 Octave; see the file COPYING. If not, see ## <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn {} {} ZMQ_GSSAPI_SERVER ## ## Constant for getsockopt and setsockopt GSSAPI_SERVER value option ## ## @seealso{zmq_getsockopt, zmq_setsockopt} ## @end deftypefn function v = ZMQ_GSSAPI_SERVER () v = __ZMQ_OPT_GSSAPI_SERVER; endfunction %!assert (ZMQ_GSSAPI_SERVER, __ZMQ_OPT_GSSAPI_SERVER) �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnu-octave-octave-zeromq-ffe3cf0/inst/ZMQ_GSSAPI_SERVICE_PRINCIPAL.m��������������������������������0000664�0000000�0000000�00000002205�15127471011�0024561�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������## Copyright (C) 2019 John Donoghue ## ## This file is part of Octave. ## ## Octave 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 3 of the License, or (at ## your option) any later version. ## ## Octave 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 Octave; see the file COPYING. If not, see ## <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn {} {} ZMQ_GSSAPI_SERVICE_PRINCIPAL ## ## Constant for getsockopt and setsockopt GSSAPI_SERVICE_PRINCIPAL value option ## ## @seealso{zmq_getsockopt, zmq_setsockopt} ## @end deftypefn function v = ZMQ_GSSAPI_SERVICE_PRINCIPAL () v = __ZMQ_OPT_GSSAPI_SERVICE_PRINCIPAL; endfunction %!assert (ZMQ_GSSAPI_SERVICE_PRINCIPAL, __ZMQ_OPT_GSSAPI_SERVICE_PRINCIPAL) �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnu-octave-octave-zeromq-ffe3cf0/inst/ZMQ_IDENTITY.m������������������������������������������������0000664�0000000�0000000�00000002051�15127471011�0022242�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������## Copyright (C) 2016-2018 John Donoghue ## ## This file is part of Octave. ## ## Octave 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 3 of the License, or (at ## your option) any later version. ## ## Octave 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 Octave; see the file COPYING. If not, see ## <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn {} {} ZMQ_IDENITY ## ## Constant for getsockopt and setsockopt IDENTITY value option ## ## @seealso{zmq_getsockopt, zmq_setsockopt} ## @end deftypefn function v = ZMQ_IDENTITY () v = __ZMQ_OPT_IDENTITY; endfunction %!assert (ZMQ_IDENTITY, __ZMQ_OPT_IDENTITY) ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnu-octave-octave-zeromq-ffe3cf0/inst/ZMQ_LAST_ENDPOINT.m�������������������������������������������0000664�0000000�0000000�00000002040�15127471011�0023052�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������## Copyright (C) 2018 John Donoghue ## ## This file is part of Octave. ## ## Octave 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 3 of the License, or (at ## your option) any later version. ## ## Octave 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 Octave; see the file COPYING. If not, see ## <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn {} {} ZMQ_LAST_ENDPOINT ## ## Constant for getsockopt last endpoint value option ## ## @seealso{zmq_getsockopt} ## @end deftypefn function v = ZMQ_LAST_ENDPOINT () v = __ZMQ_OPT_LAST_ENDPOINT; endfunction %!assert (ZMQ_LAST_ENDPOINT, __ZMQ_OPT_LAST_ENDPOINT) ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnu-octave-octave-zeromq-ffe3cf0/inst/ZMQ_MECHANISM.m�����������������������������������������������0000664�0000000�0000000�00000002053�15127471011�0022317�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������## Copyright (C) 2019 John Donoghue ## ## This file is part of Octave. ## ## Octave 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 3 of the License, or (at ## your option) any later version. ## ## Octave 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 Octave; see the file COPYING. If not, see ## <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn {} {} ZMQ_MECHANISM ## ## Constant for getsockopt and setsockopt MECHANISM value option ## ## @seealso{zmq_getsockopt, zmq_setsockopt} ## @end deftypefn function v = ZMQ_MECHANISM () v = __ZMQ_OPT_MECHANISM; endfunction %!assert (ZMQ_MECHANISM, __ZMQ_OPT_MECHANISM) �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnu-octave-octave-zeromq-ffe3cf0/inst/ZMQ_NULL.m����������������������������������������������������0000664�0000000�0000000�00000002005�15127471011�0021562�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������## Copyright (C) 2019 John Donoghue ## ## This file is part of Octave. ## ## Octave 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 3 of the License, or (at ## your option) any later version. ## ## Octave 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 Octave; see the file COPYING. If not, see ## <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn {} {} ZMQ_NULL ## ## Constant value for getsockopt MECHANISM value option ## ## @seealso{zmq_getsockopt} ## @end deftypefn function v = ZMQ_NULL () v = __ZMQ_MECHANISM_NULL; endfunction %!assert (ZMQ_NULL, __ZMQ_MECHANISM_NULL) ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnu-octave-octave-zeromq-ffe3cf0/inst/ZMQ_PAIR.m����������������������������������������������������0000664�0000000�0000000�00000001746�15127471011�0021556�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������## Copyright (C) 2016-2018 John Donoghue ## ## This file is part of Octave. ## ## Octave 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 3 of the License, or (at ## your option) any later version. ## ## Octave 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 Octave; see the file COPYING. If not, see ## <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn {} {} ZMQ_PAIR ## ## Constant for pair socket type. ## ## @seealso{zmq_socket} ## @end deftypefn function v = ZMQ_PAIR () v = __ZMQ_SOCK_PAIR; endfunction %!assert (ZMQ_PAIR, __ZMQ_SOCK_PAIR) ��������������������������gnu-octave-octave-zeromq-ffe3cf0/inst/ZMQ_PLAIN.m���������������������������������������������������0000664�0000000�0000000�00000002012�15127471011�0021651�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������## Copyright (C) 2019 John Donoghue ## ## This file is part of Octave. ## ## Octave 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 3 of the License, or (at ## your option) any later version. ## ## Octave 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 Octave; see the file COPYING. If not, see ## <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn {} {} ZMQ_PLAIN ## ## Constant value for getsockopt MECHANISM value option ## ## @seealso{zmq_getsockopt} ## @end deftypefn function v = ZMQ_PLAIN () v = __ZMQ_MECHANISM_PLAIN; endfunction %!assert (ZMQ_PLAIN, __ZMQ_MECHANISM_PLAIN) ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnu-octave-octave-zeromq-ffe3cf0/inst/ZMQ_PLAIN_PASSWORD.m������������������������������������������0000664�0000000�0000000�00000002111�15127471011�0023173�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������## Copyright (C) 2019 John Donoghue ## ## This file is part of Octave. ## ## Octave 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 3 of the License, or (at ## your option) any later version. ## ## Octave 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 Octave; see the file COPYING. If not, see ## <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn {} {} ZMQ_PLAIN_PASSWORD ## ## Constant for getsockopt and setsockopt PLAIN_PASSWORD value option ## ## @seealso{zmq_getsockopt, zmq_setsockopt} ## @end deftypefn function v = ZMQ_PLAIN_PASSWORD () v = __ZMQ_OPT_PLAIN_PASSWORD; endfunction %!assert (ZMQ_PLAIN_PASSWORD, __ZMQ_OPT_PLAIN_PASSWORD) �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnu-octave-octave-zeromq-ffe3cf0/inst/ZMQ_PLAIN_SERVER.m��������������������������������������������0000664�0000000�0000000�00000002075�15127471011�0022750�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������## Copyright (C) 2019 John Donoghue ## ## This file is part of Octave. ## ## Octave 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 3 of the License, or (at ## your option) any later version. ## ## Octave 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 Octave; see the file COPYING. If not, see ## <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn {} {} ZMQ_PLAIN_SERVER ## ## Constant for getsockopt and setsockopt PLAIN_SERVER value option ## ## @seealso{zmq_getsockopt, zmq_setsockopt} ## @end deftypefn function v = ZMQ_PLAIN_SERVER () v = __ZMQ_OPT_PLAIN_SERVER; endfunction %!assert (ZMQ_PLAIN_SERVER, __ZMQ_OPT_PLAIN_SERVER) �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnu-octave-octave-zeromq-ffe3cf0/inst/ZMQ_PLAIN_USERNAME.m������������������������������������������0000664�0000000�0000000�00000002111�15127471011�0023150�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������## Copyright (C) 2019 John Donoghue ## ## This file is part of Octave. ## ## Octave 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 3 of the License, or (at ## your option) any later version. ## ## Octave 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 Octave; see the file COPYING. If not, see ## <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn {} {} ZMQ_PLAIN_USERNAME ## ## Constant for getsockopt and setsockopt PLAIN_USERNAME value option ## ## @seealso{zmq_getsockopt, zmq_setsockopt} ## @end deftypefn function v = ZMQ_PLAIN_USERNAME () v = __ZMQ_OPT_PLAIN_USERNAME; endfunction %!assert (ZMQ_PLAIN_USERNAME, __ZMQ_OPT_PLAIN_USERNAME) �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnu-octave-octave-zeromq-ffe3cf0/inst/ZMQ_POLLIN.m��������������������������������������������������0000664�0000000�0000000�00000002021�15127471011�0022003�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������## Copyright (C) 2016-2018 John Donoghue ## ## This file is part of Octave. ## ## Octave 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 3 of the License, or (at ## your option) any later version. ## ## Octave 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 Octave; see the file COPYING. If not, see ## <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn {} {} ZMQ_POLLIN ## ## Constant bitmask value for getsockopt EVENTS value option ## ## @seealso{zmq_getsockopt} ## @end deftypefn function v = ZMQ_POLLIN () v = __ZMQ_EVENT_POLLIN; endfunction %!assert (ZMQ_POLLIN, __ZMQ_EVENT_POLLIN) ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnu-octave-octave-zeromq-ffe3cf0/inst/ZMQ_POLLOUT.m�������������������������������������������������0000664�0000000�0000000�00000002026�15127471011�0022151�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������## Copyright (C) 2016-2018 John Donoghue ## ## This file is part of Octave. ## ## Octave 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 3 of the License, or (at ## your option) any later version. ## ## Octave 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 Octave; see the file COPYING. If not, see ## <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn {} {} ZMQ_POLLOUT ## ## Constant bitmask value for getsockopt EVENTS value option ## ## @seealso{zmq_getsockopt} ## @end deftypefn function v = ZMQ_POLLOUT () v = __ZMQ_EVENT_POLLOUT; endfunction %!assert (ZMQ_POLLOUT, __ZMQ_EVENT_POLLOUT) ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnu-octave-octave-zeromq-ffe3cf0/inst/ZMQ_PRIORITY.m������������������������������������������������0000664�0000000�0000000�00000002073�15127471011�0022276�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������## Copyright (C) 2022 John Donoghue ## ## This file is part of Octave. ## ## Octave 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 3 of the License, or (at ## your option) any later version. ## ## Octave 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 Octave; see the file COPYING. If not, see ## <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn {} {} ZMQ_PRIORITY ## ## Constant for getsockopt and setsockopt SO_PRIORITY value option ## in linux only. ## ## @seealso{zmq_getsockopt, zmq_setsockopt} ## @end deftypefn function v = ZMQ_PRIORITY () v = __ZMQ_OPT_PRIORITY; endfunction %!assert (ZMQ_PRIORITY, __ZMQ_OPT_PRIORITY) ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnu-octave-octave-zeromq-ffe3cf0/inst/ZMQ_PUB.m�����������������������������������������������������0000664�0000000�0000000�00000001737�15127471011�0021451�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������## Copyright (C) 2016-2018 John Donoghue ## ## This file is part of Octave. ## ## Octave 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 3 of the License, or (at ## your option) any later version. ## ## Octave 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 Octave; see the file COPYING. If not, see ## <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn {} {} ZMQ_PUB ## ## Constant for publisher type. ## ## @seealso{zmq_socket} ## @end deftypefn function v = ZMQ_PUB () v = __ZMQ_SOCK_PUB; endfunction %!assert (ZMQ_PUB, __ZMQ_SOCK_PUB) ���������������������������������gnu-octave-octave-zeromq-ffe3cf0/inst/ZMQ_PULL.m����������������������������������������������������0000664�0000000�0000000�00000001746�15127471011�0021577�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������## Copyright (C) 2016-2018 John Donoghue ## ## This file is part of Octave. ## ## Octave 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 3 of the License, or (at ## your option) any later version. ## ## Octave 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 Octave; see the file COPYING. If not, see ## <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn {} {} ZMQ_PULL ## ## Constant for pull socket type. ## ## @seealso{zmq_socket} ## @end deftypefn function v = ZMQ_PULL () v = __ZMQ_SOCK_PULL; endfunction %!assert (ZMQ_PULL, __ZMQ_SOCK_PULL) ��������������������������gnu-octave-octave-zeromq-ffe3cf0/inst/ZMQ_PUSH.m����������������������������������������������������0000664�0000000�0000000�00000001746�15127471011�0021602�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������## Copyright (C) 2016-2018 John Donoghue ## ## This file is part of Octave. ## ## Octave 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 3 of the License, or (at ## your option) any later version. ## ## Octave 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 Octave; see the file COPYING. If not, see ## <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn {} {} ZMQ_PUSH ## ## Constant for push socket type. ## ## @seealso{zmq_socket} ## @end deftypefn function v = ZMQ_PUSH () v = __ZMQ_SOCK_PUSH; endfunction %!assert (ZMQ_PUSH, __ZMQ_SOCK_PUSH) ��������������������������gnu-octave-octave-zeromq-ffe3cf0/inst/ZMQ_RATE.m����������������������������������������������������0000664�0000000�0000000�00000002104�15127471011�0021543�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������## Copyright (C) 2022 John Donoghue ## ## This file is part of Octave. ## ## Octave 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 3 of the License, or (at ## your option) any later version. ## ## Octave 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 Octave; see the file COPYING. If not, see ## <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn {} {} ZMQ_RATE ## ## Constant for getsockopt and setsockopt value option ## ## Sets the data rate of multicast sockets in kilobits ## ## @seealso{zmq_getsockopt, zmq_setsockopt} ## @end deftypefn function v = ZMQ_RATE () v = __ZMQ_OPT_RATE; endfunction %!assert (ZMQ_RATE, __ZMQ_OPT_RATE) ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnu-octave-octave-zeromq-ffe3cf0/inst/ZMQ_RCVMORE.m�������������������������������������������������0000664�0000000�0000000�00000002005�15127471011�0022125�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������## Copyright (C) 2016-2018 John Donoghue ## ## This file is part of Octave. ## ## Octave 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 3 of the License, or (at ## your option) any later version. ## ## Octave 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 Octave; see the file COPYING. If not, see ## <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn {} {} ZMQ_RCVMORE ## ## Constant for getsockopt RCVMORE value option ## ## @seealso{zmq_getsockopt} ## @end deftypefn function v = ZMQ_RCVMORE () v = __ZMQ_OPT_RCVMORE; endfunction %!assert (ZMQ_RCVMORE, __ZMQ_OPT_RCVMORE) ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnu-octave-octave-zeromq-ffe3cf0/inst/ZMQ_REP.m�����������������������������������������������������0000664�0000000�0000000�00000001742�15127471011�0021445�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������## Copyright (C) 2016-2018 John Donoghue ## ## This file is part of Octave. ## ## Octave 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 3 of the License, or (at ## your option) any later version. ## ## Octave 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 Octave; see the file COPYING. If not, see ## <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn {} {} ZMQ_REP ## ## Constant for reply socket type. ## ## @seealso{zmq_socket} ## @end deftypefn function v = ZMQ_REP () v = __ZMQ_SOCK_REP; endfunction %!assert (ZMQ_REP, __ZMQ_SOCK_REP) ������������������������������gnu-octave-octave-zeromq-ffe3cf0/inst/ZMQ_REQ.m�����������������������������������������������������0000664�0000000�0000000�00000001744�15127471011�0021450�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������## Copyright (C) 2016-2018 John Donoghue ## ## This file is part of Octave. ## ## Octave 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 3 of the License, or (at ## your option) any later version. ## ## Octave 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 Octave; see the file COPYING. If not, see ## <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn {} {} ZMQ_REQ ## ## Constant for request socket type. ## ## @seealso{zmq_socket} ## @end deftypefn function v = ZMQ_REQ () v = __ZMQ_SOCK_REQ; endfunction %!assert (ZMQ_REQ, __ZMQ_SOCK_REQ) ����������������������������gnu-octave-octave-zeromq-ffe3cf0/inst/ZMQ_ROUTER.m��������������������������������������������������0000664�0000000�0000000�00000001762�15127471011�0022041�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������## Copyright (C) 2016-2018 John Donoghue ## ## This file is part of Octave. ## ## Octave 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 3 of the License, or (at ## your option) any later version. ## ## Octave 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 Octave; see the file COPYING. If not, see ## <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn {} {} ZMQ_ROUTER ## ## Constant for router socket type. ## ## @seealso{zmq_socket} ## @end deftypefn function v = ZMQ_ROUTER () v = __ZMQ_SOCK_ROUTER; endfunction %!assert (ZMQ_ROUTER, __ZMQ_SOCK_ROUTER) ��������������gnu-octave-octave-zeromq-ffe3cf0/inst/ZMQ_ROUTING_ID.m����������������������������������������������0000664�0000000�0000000�00000002057�15127471011�0022522�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������## Copyright (C) 2022 John Donoghue ## ## This file is part of Octave. ## ## Octave 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 3 of the License, or (at ## your option) any later version. ## ## Octave 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 Octave; see the file COPYING. If not, see ## <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn {} {} ZMQ_ROUTING_ID ## ## Constant for getsockopt and setsockopt IDENTITY value option ## ## @seealso{zmq_getsockopt, zmq_setsockopt} ## @end deftypefn function v = ZMQ_ROUTING_ID () v = __ZMQ_OPT_ROUTING_ID; endfunction %!assert (ZMQ_ROUTING_ID, __ZMQ_OPT_ROUTING_ID) ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnu-octave-octave-zeromq-ffe3cf0/inst/ZMQ_SNDMORE.m�������������������������������������������������0000664�0000000�0000000�00000001763�15127471011�0022131�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������## Copyright (C) 2016-2018 John Donoghue ## ## This file is part of Octave. ## ## Octave 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 3 of the License, or (at ## your option) any later version. ## ## Octave 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 Octave; see the file COPYING. If not, see ## <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn {} {} ZMQ_SNDMORE ## ## Constant for send flag SNDMORE ## ## @seealso{zmq_send} ## @end deftypefn function v = ZMQ_SNDMORE () v = __ZMQ_FLAG_SNDMORE; endfunction %!assert (ZMQ_SNDMORE, __ZMQ_FLAG_SNDMORE) �������������gnu-octave-octave-zeromq-ffe3cf0/inst/ZMQ_SOCKS_PROXY.m���������������������������������������������0000664�0000000�0000000�00000002067�15127471011�0022703�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������## Copyright (C) 2019 John Donoghue ## ## This file is part of Octave. ## ## Octave 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 3 of the License, or (at ## your option) any later version. ## ## Octave 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 Octave; see the file COPYING. If not, see ## <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn {} {} ZMQ_SOCKS_PROXY ## ## Constant for getsockopt and setsockopt SOCKS_PROXY value option ## ## @seealso{zmq_getsockopt, zmq_setsockopt} ## @end deftypefn function v = ZMQ_SOCKS_PROXY () v = __ZMQ_OPT_SOCKS_PROXY; endfunction %!assert (ZMQ_SOCKS_PROXY, __ZMQ_OPT_SOCKS_PROXY) �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnu-octave-octave-zeromq-ffe3cf0/inst/ZMQ_STREAM.m��������������������������������������������������0000664�0000000�0000000�00000001755�15127471011�0022016�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������## Copyright (C) 2018 John Donoghue ## ## This file is part of Octave. ## ## Octave 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 3 of the License, or (at ## your option) any later version. ## ## Octave 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 Octave; see the file COPYING. If not, see ## <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn {} {} ZMQ_STREAM ## ## Constant for stream socket type. ## ## @seealso{zmq_socket} ## @end deftypefn function v = ZMQ_STREAM () v = __ZMQ_SOCK_STREAM; endfunction %!assert (ZMQ_STREAM, __ZMQ_SOCK_STREAM) �������������������gnu-octave-octave-zeromq-ffe3cf0/inst/ZMQ_SUB.m�����������������������������������������������������0000664�0000000�0000000�00000001740�15127471011�0021446�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������## Copyright (C) 2016-2018 John Donoghue ## ## This file is part of Octave. ## ## Octave 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 3 of the License, or (at ## your option) any later version. ## ## Octave 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 Octave; see the file COPYING. If not, see ## <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn {} {} ZMQ_SUB ## ## Constant for subscriber type. ## ## @seealso{zmq_socket} ## @end deftypefn function v = ZMQ_SUB () v = __ZMQ_SOCK_SUB; endfunction %!assert (ZMQ_SUB, __ZMQ_SOCK_SUB) ��������������������������������gnu-octave-octave-zeromq-ffe3cf0/inst/ZMQ_SUBSCRIBE.m�����������������������������������������������0000664�0000000�0000000�00000002034�15127471011�0022333�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������## Copyright (C) 2016-2018 John Donoghue ## ## This file is part of Octave. ## ## Octave 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 3 of the License, or (at ## your option) any later version. ## ## Octave 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 Octave; see the file COPYING. If not, see ## <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn {} {} ZMQ_SUBSCRIBE ## ## Constant for setsockopt subscribe option ## ## @seealso{zmq_setsockopt, ZMQ_UNSUBSCRIBE} ## @end deftypefn function v = ZMQ_SUBSCRIBE () v = __ZMQ_OPT_SUBSCRIBE; endfunction %!assert (ZMQ_SUBSCRIBE, __ZMQ_OPT_SUBSCRIBE) ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnu-octave-octave-zeromq-ffe3cf0/inst/ZMQ_TYPE.m����������������������������������������������������0000664�0000000�0000000�00000002132�15127471011�0021572�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������## Copyright (C) 2016-2018 John Donoghue ## ## This file is part of Octave. ## ## Octave 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 3 of the License, or (at ## your option) any later version. ## ## Octave 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 Octave; see the file COPYING. If not, see ## <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn {} {} ZMQ_TYPE ## ## Constant for getsockopt TYPE value option ## ## @seealso{zmq_getsockopt} ## @end deftypefn function v = ZMQ_TYPE () v = __ZMQ_OPT_TYPE; endfunction %!assert (ZMQ_TYPE, __ZMQ_OPT_TYPE) %!test % s = zmq_socket(ZMQ_SUB); % assert(zmq_getsockopt(s, ZMQ_TYPE), ZMQ_SUB) % zmq_close(s); ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnu-octave-octave-zeromq-ffe3cf0/inst/ZMQ_UNSUBSCRIBE.m���������������������������������������������0000664�0000000�0000000�00000002046�15127471011�0022601�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������## Copyright (C) 2016-2018 John Donoghue ## ## This file is part of Octave. ## ## Octave 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 3 of the License, or (at ## your option) any later version. ## ## Octave 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 Octave; see the file COPYING. If not, see ## <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn {} {} ZMQ_UNSUBSCRIBE ## ## Constant for setsockopt unsubscribe option ## ## @seealso{zmq_setsockopt, ZMQ_SUBSCRIBE} ## @end deftypefn function v = ZMQ_UNSUBSCRIBE () v = __ZMQ_OPT_UNSUBSCRIBE; endfunction %!assert (ZMQ_UNSUBSCRIBE, __ZMQ_OPT_UNSUBSCRIBE) ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnu-octave-octave-zeromq-ffe3cf0/inst/ZMQ_XPUB.m����������������������������������������������������0000664�0000000�0000000�00000001744�15127471011�0021577�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������## Copyright (C) 2016-2018 John Donoghue ## ## This file is part of Octave. ## ## Octave 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 3 of the License, or (at ## your option) any later version. ## ## Octave 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 Octave; see the file COPYING. If not, see ## <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn {} {} ZMQ_XPUB ## ## Constant for publisher type. ## ## @seealso{zmq_socket} ## @end deftypefn function v = ZMQ_XPUB () v = __ZMQ_SOCK_XPUB; endfunction %!assert (ZMQ_XPUB, __ZMQ_SOCK_XPUB) ����������������������������gnu-octave-octave-zeromq-ffe3cf0/inst/ZMQ_XSUB.m����������������������������������������������������0000664�0000000�0000000�00000001745�15127471011�0021603�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������## Copyright (C) 2016-2018 John Donoghue ## ## This file is part of Octave. ## ## Octave 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 3 of the License, or (at ## your option) any later version. ## ## Octave 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 Octave; see the file COPYING. If not, see ## <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn {} {} ZMQ_XSUB ## ## Constant for subscriber type. ## ## @seealso{zmq_socket} ## @end deftypefn function v = ZMQ_XSUB () v = __ZMQ_SOCK_XSUB; endfunction %!assert (ZMQ_XSUB, __ZMQ_SOCK_XSUB) ���������������������������gnu-octave-octave-zeromq-ffe3cf0/inst/__load_zeromq__.m���������������������������������������������0000664�0000000�0000000�00000002650�15127471011�0023377�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������## Copyright (C) 2023 John Donoghue ## ## 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 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 ## 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 ## <http:##www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn {} {} __load_zeromq__ () ## Undocumented internal function of zeromq package. ## @end deftypefn ## PKG_ADD: __load_zeromq__ () function __load_zeromq__ () # on package load, attempt to load docs try pkg_dir = fileparts (fullfile (mfilename ("fullpath"))); doc_file = fullfile (pkg_dir, "doc", "zeromq.qch"); doc_file = strrep (doc_file, '\', '/'); if exist(doc_file, "file") if exist("__event_manager_register_documentation__") __event_manager_register_documentation__ (doc_file); elseif exist("__event_manager_register_doc__") __event_manager_register_doc__ (doc_file); endif endif catch # do nothing end_try_catch endfunction ����������������������������������������������������������������������������������������gnu-octave-octave-zeromq-ffe3cf0/inst/__unload_zeromq__.m�������������������������������������������0000664�0000000�0000000�00000002672�15127471011�0023746�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������## Copyright (C) 2023 John Donoghue ## ## 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 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 ## 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 ## <http:##www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn {} {} __unload_zeromq__ () ## Undocumented internal function of zeromq package. ## @end deftypefn ## PKG_DEL: __unload_zeromq__ () function __unload_zeromq__ () # on package unload, attempt to unload docs try pkg_dir = fileparts (fullfile (mfilename ("fullpath"))); doc_file = fullfile (pkg_dir, "doc", "zeromq.qch"); doc_file = strrep (doc_file, '\', '/'); if exist(doc_file, "file") if exist("__event_manager_unregister_documentation__") __event_manager_unregister_documentation__ (doc_file); elseif exist("__event_manager_unregister_doc__") __event_manager_unregister_doc__ (doc_file); endif endif catch # do nothing end_try_catch endfunction ����������������������������������������������������������������������gnu-octave-octave-zeromq-ffe3cf0/inst/examples/�����������������������������������������������������0000775�0000000�0000000�00000000000�15127471011�0021724�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnu-octave-octave-zeromq-ffe3cf0/inst/examples/zmq_example1.m���������������������������������������0000664�0000000�0000000�00000004217�15127471011�0024511�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������## Copyright (C) 2016-2018 john donoghue ## ## 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 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 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 <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## Example code for a REQ socket connected to a server and sending and ## receiving responses. ## ## The example contains comments on the differences between the C API, and the ## Octave bindings. % zeromq package must be installed and loaded to work % don't buffer output more off printf ("Connecting to hello world server...\n"); % don't need to create context in octave binding % % ZeroMQ API: context = zmq_ctx_new (); % Create socket and connect to server % since context in internal, a function that requires a context is used % without specifying the context. % ZeroMQ API: requester = zmq_socket (context, ZMQ_REQ); requester = zmq_socket (ZMQ_REQ); zmq_connect (requester, "tcp://localhost:5555"); for request_nbr = [1:10] printf ("Sending Hello %d...\n", request_nbr); zmq_send (requester, uint8("Hello"), 5, 0); % try to read up to 10 bytes of reply data. printf ("Waiting for server response %d... (Ctrl-C to exit)\n", request_nbr); % The ZeroMQ API fills a buffer and returns a count of bytes % Octave binding returns a buffer of the size received. % ZeroMQ API: zmq_recv (requester, buffer, 10, 0); received = zmq_recv (requester, 10, 0); printf ("Received World %d\n", request_nbr); endfor zmq_close (requester); % Binding handles context, so don't need to destroy it % ZeroMQ API: zmq_ctx_destroy (context); %!test % % interactive script - nothing to do ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnu-octave-octave-zeromq-ffe3cf0/inst/examples/zmq_example2.m���������������������������������������0000664�0000000�0000000�00000002607�15127471011�0024513�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������## Copyright (C) 2016-2018 john donoghue ## ## 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 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 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 <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## Example code for a REP socket server which waits for client commands and sends ## back a response. % zeromq package must be installed and loaded to work % don't buffer output more off printf ("Connecting to hello world server...\n"); % create reply socket, and bind it to port 5555 responder = zmq_socket (ZMQ_REP); zmq_bind (responder, "tcp://*:5555"); printf ("Waiting for clients ...\n"); % loop forever, waiting for client requests and responding back while (true) recievedata = zmq_recv (responder, 10, 0); printf ("Received Hello\n"); zmq_send (responder, "World", 5, 0); endwhile %!test % % interactive script - nothing to do �������������������������������������������������������������������������������������������������������������������������gnu-octave-octave-zeromq-ffe3cf0/inst/examples/zmq_example3.m���������������������������������������0000664�0000000�0000000�00000002560�15127471011�0024512�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������## Copyright (C) 2016-2018 john donoghue ## ## 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 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 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 <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## Example code for a PUB socket server which sends 'weather' updates from random ## zipcodes. % zeromq package must be installed and loaded to work % don't buffer output more off publisher = zmq_socket (ZMQ_PUB); rc = zmq_bind (publisher, "tcp://*:5556"); assert (rc); while (true) % make up some random values zipcode = 10000 + randi (20); temperature = randi (215) - 80; relhumidity = randi (50) + 10; % Send message to all subscribers update = sprintf ("%05d %d %d", zipcode, temperature, relhumidity); fprintf("%s\n", update); zmq_send (publisher, update); endwhile zmq_close (publisher); %!test % % interactive script - nothing to do ������������������������������������������������������������������������������������������������������������������������������������������������gnu-octave-octave-zeromq-ffe3cf0/inst/examples/zmq_example4.m���������������������������������������0000664�0000000�0000000�00000003150�15127471011�0024507�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������## Copyright (C) 2016-2018 john donoghue ## ## 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 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 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 <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## Example code for a SUB socket client which subscribes to a 'weather' server ## for weather updates for zipcode 10001. % don't buffer output more off subscriber = zmq_socket (ZMQ_SUB); rc = zmq_connect (subscriber, "tcp://localhost:5556"); assert (rc); % Subscribe to zipcode, default is NYC, 10001 zipfilter = "10001 "; rc = zmq_setsockopt (subscriber, ZMQ_SUBSCRIBE, zipfilter); assert (rc); % Process 100 updates update_nbr = 0; total_temp = 0; for update_nbr = 1:100 string = char( zmq_recv(subscriber, 128) ); [zipcode, temperature, relhumidity, count, errmsg] = sscanf (string, "%d %d %d", "C"); fprintf ("received a temp for zipcode '%s' of %dF\n", ... zipfilter, temperature); total_temp += temperature; endfor fprintf ("Average temperature for zipcode '%s' was %dF\n", ... zipfilter, (total_temp / update_nbr)); zmq_close (subscriber); %!test % % interactive script - nothing to do ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnu-octave-octave-zeromq-ffe3cf0/inst/examples/zmq_example5.m���������������������������������������0000664�0000000�0000000�00000004273�15127471011�0024517�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������## Copyright (C) 2018 john donoghue ## ## 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 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 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 <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## Example code for a STREAM socket connecting to a HTTP server ## and making a HTTP request % zeromq package must be installed and loaded to work % don't buffer output more off printf ("Connecting to octave.org ...\n"); % Create socket sock = zmq_socket (ZMQ_STREAM); % connect to gnu.org zmq_connect (sock, "tcp://octave.org:80"); % get socket identity % NOTE: we MUST get it as zmq uses the identity for the % first frame to know where to route to % ZeroMQ API: zmq_socket (sock, ZMQ_IDENTITY, id, idsize); id = zmq_getsockopt (sock, ZMQ_IDENTITY); % send request for getting the home page info % in HTTP would be HEAD / HTTP/1.1\r\n\r\n printf ("Requesting HEAD / ...\n"); % send id frame first zmq_send (sock, id, ZMQ_SNDMORE); % now the content zmq_send(sock, "HEAD / HTTP/1.1\r\n\r\n"); printf ("Waiting for server response...\n"); % zmq will add an identity as the 1st frame back identity = zmq_recv (sock, 255, 0); % http request blank line received = zmq_recv (sock, 255, 0); % the actual content identity = zmq_recv (sock, 255, 0); readmore = zmq_getsockopt (sock, ZMQ_RCVMORE); while (readmore) received = zmq_recv (sock, 1024, 0); readmore = zmq_getsockopt (sock, ZMQ_RCVMORE); printf ("%s", char(received)) endwhile printf ("\n"); printf("Closing socket ...\n"); % if was a server, send id frame following by an empty zero frame to % close the socket zmq_close (sock); %!test % % interactive script - nothing to do �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnu-octave-octave-zeromq-ffe3cf0/inst/iszmq.m�������������������������������������������������������0000664�0000000�0000000�00000002514�15127471011�0021431�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������## Copyright (C) 2017-2019 John Donoghue <john.donoghue@ieee.org> ## ## This file is part of Octave. ## ## Octave 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 3 of the License, or (at ## your option) any later version. ## ## Octave 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 Octave; see the file COPYING. If not, see ## <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn {} {@var{tf} =} iszmq (@var{h}) ## ## Determine whether @var{h} is a zeromq socket object. ## ## @subsubheading Inputs ## @var{h} - a potential zeromq socket object to check ## @subsubheading Outputs ## @var{tf} - true if @var{h} is a zeromq socket object, otherwise false. ## ## @seealso{zmq_socket} ## @end deftypefn function tf = iszmq (h) if (nargin == 0) print_usage (); endif tf = strcmp(typeinfo(h), "octave_zeromq_socket"); endfunction %!test assert(iszmq(1), false) %!test %! a = zmq_socket (ZMQ_SUB); %! assert (iszmq (a)); %! zmq_close(a); ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnu-octave-octave-zeromq-ffe3cf0/inst/zmq_test.m����������������������������������������������������0000664�0000000�0000000�00000003700�15127471011�0022132�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������## Copyright (C) 2016-2018 John Donoghue ## ## This file is part of Octave. ## ## Octave 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 3 of the License, or (at ## your option) any later version. ## ## Octave 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 Octave; see the file COPYING. If not, see ## <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn {} {} zmq_test ## ## Perform zeromq Octave tests to exercise the oct file functionality. ## ## @end deftypefn function zmq_test () test ( "zmq_test", "verbose" ); endfunction %!assert(!isempty(ZMQ_SUB)) %!assert(!isempty(ZMQ_PUB)) %!assert(!isempty(ZMQ_PULL)) %!assert(!isempty(ZMQ_PUSH)) %!assert(!isempty(ZMQ_REQ)) %!assert(!isempty(ZMQ_REP)) %!test %! server = zmq_socket(ZMQ_PUB); %! assert (!isempty(server)); %! zmq_close (server); %!xtest %! server = zmq_socket(ZMQ_PUB); %! assert (!isempty(server)); %! assert(zmq_bind( server, "tcp://*:8071")) %! client = zmq_socket(ZMQ_SUB); %! assert (!isempty(client)); %! assert(zmq_connect( client, "tcp://127.0.0.1:8071")) %! zmq_setsockopt(client, ZMQ_SUBSCRIBE, ""); %! pause (2) %! assert(zmq_send (server, uint8([104 101 108 108 111])), 5); %! assert(zmq_recv (client, 10), uint8([104 101 108 108 111])) %! zmq_close (client); %! zmq_close (server); %!test %! server = zmq_socket(ZMQ_PUB); %! assert (!isempty(server)); %! zmq_setsockopt(server, ZMQ_IDENTITY, uint8([104 101 108 108 111])); %! assert(zmq_getsockopt (server, ZMQ_IDENTITY), uint8([104 101 108 108 111])) %! zmq_close (server); ����������������������������������������������������������������gnu-octave-octave-zeromq-ffe3cf0/octave-zeromq.metainfo.xml�����������������������������������������0000664�0000000�0000000�00000002075�15127471011�0024254�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<?xml version="1.0" encoding="UTF-8"?> <!-- Copyright 2016 Colin B. Macdonald Copyright 2018 John Donoghue Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without any warranty. --> <component type="addon"> <id>octave-zeromq</id> <extends>www.octave.org-octave.desktop</extends> <name>ZeroMQ Toolkit</name> <summary>Octave ZeroMQ interface toolkit</summary> <description> <p>Interface toolkit for using zeromq sockets.</p> </description> <keywords> <keyword>zeromq</keyword> <keyword>communication</keyword> </keywords> <url type="homepage">http://octave.sourceforge.net/zeromq</url> <url type="bugtracker">https://savannah.gnu.org/bugs/?func=additem&group=octave</url> <project_license>GPL-3.0+</project_license> <developer_name>Octave-Forge Community</developer_name> <update_contact>octave-maintainers@gnu.org</update_contact> <metadata_license>FSFAP</metadata_license> </component> �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnu-octave-octave-zeromq-ffe3cf0/src/���������������������������������������������������������������0000775�0000000�0000000�00000000000�15127471011�0017720�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnu-octave-octave-zeromq-ffe3cf0/src/Makefile.in����������������������������������������������������0000664�0000000�0000000�00000002772�15127471011�0021775�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������MKOCTFILE := @MKOCTFILE@ OCTAVE_CONFIG := @OCTAVE_CONFIG@ GREP ?= @GREP@ CXXFLAGS := @CXXFLAGS@ @DEFS@ LIBS := @LIBS@ LDFLAGS := @LDFLAGS@ ARCHDIR := "$(shell $(OCTAVE_CONFIG) -p CANONICAL_HOST_TYPE)-$(shell $(OCTAVE_CONFIG) -p API_VERSION)" SRC := socket_class.cc bind.cc close.cc connect.cc disconnect.cc errno.cc \ getsockopt.cc globals.cc poll.cc recv.cc send.cc setsockopt.cc \ socket.cc strerror.cc unbind.cc version.cc properties.cc zeromq.cc \ has.cc z85_encode.cc z85_decode.cc curve_keypair.cc curve_public.cc pkglock.cc OBJ := $(SRC:.cc=.o) .PHONY: all all: @TARGETS@ %.o: %.cc $(MKOCTFILE) -c $< $(CXXFLAGS) CC_TST_SOURCES := $(shell $(GREP) --files-with-matches '^%!' $(SRC)) TST_SOURCES := $(patsubst %.cc,../inst/$(ARCHDIR)/%.cc-tst,$(CC_TST_SOURCES)) .PHONY: archtests archtests: $(TST_SOURCES) ../inst/$(ARCHDIR): @mkdir -p "$@" ../inst/$(ARCHDIR)/%.cc-tst: %.cc | ../inst/$(ARCHDIR) @echo "Extracting tests from $< ..." @$(RM) -f "$@" "$@-t" @( echo "## Generated from $<"; \ $(GREP) '^%!' "$<") > "$@" zeromq.oct: $(OBJ) $(MKOCTFILE) -o zeromq.oct $(OBJ) $(LDFLAGS) $(LIBS) .PHONY: prebuild prebuild: # nothing to do .PHONY: clean .PHONY: distclean clean: rm -f *.o rm -f *.oct test -e ../inst/$(ARCHDIR) && rm -f $(TST_SOURCES) || true test -e ../inst/$(ARCHDIR) && rmdir ../inst/$(ARCHDIR) || true distclean: clean $(RM) -rf autom4te.cache $(RM) -f config.status config.log config.h $(RM) -f oct-alt-includes.h $(RM) -f Makefile ������gnu-octave-octave-zeromq-ffe3cf0/src/bind.cc��������������������������������������������������������0000664�0000000�0000000�00000003610�15127471011�0021143�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// Copyright (C) 2016-2018 John Donoghue <john.donoghue@ieee.org> // // 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 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 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 <http://www.gnu.org/licenses/>. // Octave Includes #include <octave/oct.h> #include <octave/defun-dld.h> #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "socket_class.h" // PKG_ADD: autoload ("zmq_bind", "zeromq.oct"); DEFUN_DLD (zmq_bind, args, nargout, "-*- texinfo -*-\n\ @deftypefn {} {status =} zmq_bind (@var{sock}, @var{endpoint})\n \ \n\ Bind a zeromq socket to a endpoint.\n \ \n \ @subsubheading Inputs\n \ @var{sock} - the socket to bind.\n \ \n \ @var{endpoint} - the endpoint string.\n \ \n \ @subsubheading Outputs\n \ @var{status} - status for bind.\n \ On success, bind will return a @var{status} of true \n \ \n \ @seealso { zmq_socket }\n \ @end deftypefn") { init_types (); if (args.length () != 2 || args(0).type_id () != octave_zeromq_socket::static_type_id () || ! args(1).is_string ()) { print_usage (); return octave_value (false); } octave_zeromq_socket * sock = NULL; const octave_base_value& rep = args (0).get_rep (); sock = &((octave_zeromq_socket &)rep); bool ret = sock->bind (args (1).string_value ()); return octave_value (ret); } #if 0 %!error <Invalid call to zmq_bind> zmq_bind() %!error <Invalid call to zmq_bind> zmq_bind(1) #endif ������������������������������������������������������������������������������������������������������������������������gnu-octave-octave-zeromq-ffe3cf0/src/bootstrap������������������������������������������������������0000775�0000000�0000000�00000000344�15127471011�0021664�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/bash ## Octave-Forge: video package bootstrap script ## Run this to generate the configure script set -e # halt if unhandled error aclocal autoconf # generate configure script autoheader -f rm -rf autom4te.cache ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnu-octave-octave-zeromq-ffe3cf0/src/close.cc�������������������������������������������������������0000664�0000000�0000000�00000003320�15127471011�0021332�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// Copyright (C) 2016-2018 John Donoghue <john.donoghue@ieee.org> // // 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 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 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 <http://www.gnu.org/licenses/>. // Octave Includes #include <octave/oct.h> #include <octave/defun-dld.h> #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "socket_class.h" // PKG_ADD: autoload ("zmq_close", "zeromq.oct"); DEFUN_DLD (zmq_close, args, nargout, "-*- texinfo -*-\n\ @deftypefn {} {} zmq_close (@var{sock})\n \ \n\ Close a zeromq socket.\n \ \n \ @subsubheading Inputs\n \ @var{sock} - the socket type to close.\n \ @subsubheading Outputs\n \ None\n \ \n \ @seealso { zmq_socket }\n \ @end deftypefn") { init_types(); if (args.length () != 1 || args (0).type_id () != octave_zeromq_socket::static_type_id ()) { print_usage (); return octave_value (-1); } octave_zeromq_socket * sock = NULL; const octave_base_value& rep = args (0).get_rep (); sock = &((octave_zeromq_socket &)rep); sock->close (); return octave_value (); } #if 0 %!error <Invalid call to zmq_close> zmq_close() %!error <Invalid call to zmq_close> zmq_close(10) %!test %! a = zmq_socket(); %! zmq_close(a); #endif ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnu-octave-octave-zeromq-ffe3cf0/src/config.guess���������������������������������������������������0000775�0000000�0000000�00000123672�15127471011�0022253�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#! /bin/sh # Attempt to guess a canonical system name. # Copyright 1992-2015 Free Software Foundation, Inc. timestamp='2015-01-01' # This file 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 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 # 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 <http://www.gnu.org/licenses/>. # # 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. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD # # Please send patches to <config-patches@gnu.org>. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to <config-patches@gnu.org>." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright 1992-2015 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." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown case "${UNAME_SYSTEM}" in Linux|GNU|GNU/*) # If the system lacks a compiler, then just pick glibc. # We could probably try harder. LIBC=gnu eval $set_cc_for_build cat <<-EOF > $dummy.c #include <features.h> #if defined(__UCLIBC__) LIBC=uclibc #elif defined(__dietlibc__) LIBC=dietlibc #else LIBC=gnu #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` ;; esac # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 exit $exitcode ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) echo i386-pc-auroraux${UNAME_RELEASE} exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH="x86_64" fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include <stdio.h> /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include <sys/systemcfg.h> main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/lslpp ] ; then IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include <stdlib.h> #include <unistd.h> int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include <unistd.h> int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` case ${UNAME_PROCESSOR} in amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW64*:*) echo ${UNAME_MACHINE}-pc-mingw64 exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; *:MSYS*:*) echo ${UNAME_MACHINE}-pc-msys exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; 8664:Windows_NT:*) echo x86_64-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; aarch64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC="gnulibc1" ; fi echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arc:Linux:*:* | arceb:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-${LIBC} else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi else echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf fi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; cris:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; crisv32:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; frv:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; hexagon:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:Linux:*:*) echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; openrisc*:Linux:*:*) echo or1k-unknown-linux-${LIBC} exit ;; or32:Linux:*:* | or1k*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; padre:Linux:*:*) echo sparc-unknown-linux-${LIBC} exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; *) echo hppa-unknown-linux-${LIBC} ;; esac exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-${LIBC} exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-${LIBC} exit ;; ppc64le:Linux:*:*) echo powerpc64le-unknown-linux-${LIBC} exit ;; ppcle:Linux:*:*) echo powerpcle-unknown-linux-${LIBC} exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux-${LIBC} exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; tile*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-${LIBC} exit ;; x86_64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` echo ${UNAME_MACHINE}-pc-isc$UNAME_REL elif /bin/uname -X 2>/dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says <Richard.M.Bartel@ccMail.Census.GOV> echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes <hewes@openmarket.com>. # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; x86_64:Haiku:*:*) echo x86_64-unknown-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown eval $set_cc_for_build if test "$UNAME_PROCESSOR" = unknown ; then UNAME_PROCESSOR=powerpc fi if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then case $UNAME_PROCESSOR in i386) UNAME_PROCESSOR=x86_64 ;; powerpc) UNAME_PROCESSOR=powerpc64 ;; esac fi fi elif test "$UNAME_PROCESSOR" = i386 ; then # Avoid executing cc on OS X 10.9, as it ships with a stub # that puts up a graphical alert prompting to install # developer tools. Any system running Mac OS X 10.7 or # later (Darwin 11 and later) is required to have a 64-bit # processor. This is not true of the ARM version of Darwin # that Apple uses in portable devices. UNAME_PROCESSOR=x86_64 fi echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NEO-?:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; NSE-*:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; x86_64:VMkernel:*:*) echo ${UNAME_MACHINE}-unknown-esx exit ;; esac cat >&2 <<EOF $0: unable to guess system type This script, last modified $timestamp, has failed to recognize the operating system you are using. It is advised that you download the most up to date version of the config scripts from http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD and http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD If the version you run ($0) is already up to date, please send the following data and any information you think might be pertinent to <config-patches@gnu.org> in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: ����������������������������������������������������������������������gnu-octave-octave-zeromq-ffe3cf0/src/config.sub�����������������������������������������������������0000775�0000000�0000000�00000106246�15127471011�0021714�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#! /bin/sh # Configuration validation subroutine script. # Copyright 1992-2015 Free Software Foundation, Inc. timestamp='2015-01-01' # This file 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 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 # 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 <http://www.gnu.org/licenses/>. # # 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. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # Please send patches to <config-patches@gnu.org>. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to <config-patches@gnu.org>." version="\ GNU config.sub ($timestamp) Copyright 1992-2015 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." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; android-linux) os=-linux-android basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray | -microblaze*) os= basic_machine=$1 ;; -bluegene*) os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*178) os=-lynxos178 ;; -lynx*5) os=-lynxos5 ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | aarch64 | aarch64_be \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arceb \ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ | avr | avr32 \ | be32 | be64 \ | bfin \ | c4x | c8051 | clipper \ | d10v | d30v | dlx | dsp16xx \ | epiphany \ | fido | fr30 | frv | ft32 \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | k1om \ | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa32r6 | mipsisa32r6el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64r6 | mipsisa64r6el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipsr5900 | mipsr5900el \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ | open8 | or1k | or1knd | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ | riscv32 | riscv64 \ | rl78 | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu \ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | visium \ | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; c54x) basic_machine=tic54x-unknown ;; c55x) basic_machine=tic55x-unknown ;; c6x) basic_machine=tic6x-unknown ;; leon|leon[3-9]) basic_machine=sparc-$basic_machine ;; m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; strongarm | thumb | xscale) basic_machine=arm-unknown ;; xgate) basic_machine=$basic_machine-unknown os=-none ;; xscaleeb) basic_machine=armeb-unknown ;; xscaleel) basic_machine=armel-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ | c8051-* | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | k1om-* \ | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ | microblaze-* | microblazeel-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa32r6-* | mipsisa32r6el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64r6-* | mipsisa64r6el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipsr5900-* | mipsr5900el-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ | nios-* | nios2-* | nios2eb-* | nios2el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ | or1k*-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tile*-* \ | tron-* \ | ubicom32-* \ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | vax-* \ | visium-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aros) basic_machine=i386-pc os=-aros ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) basic_machine=powerpc-ibm os=-cnk ;; c54x-*) basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c55x-*) basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c6x-*) basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c90) basic_machine=c90-cray os=-unicos ;; cegcc) basic_machine=arm-unknown os=-cegcc ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16 | cr16-*) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dicos) basic_machine=i686-pc os=-dicos ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; leon-*|leon[3-9]-*) basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'` ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; microblaze*) basic_machine=microblaze-xilinx ;; mingw64) basic_machine=x86_64-pc os=-mingw64 ;; mingw32) basic_machine=i686-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; moxiebox) basic_machine=moxie-unknown os=-moxiebox ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; msys) basic_machine=i686-pc os=-msys ;; mvs) basic_machine=i370-ibm os=-mvs ;; nacl) basic_machine=le32-unknown os=-nacl ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; neo-tandem) basic_machine=neo-tandem ;; nse-tandem) basic_machine=nse-tandem ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc | ppcbe) basic_machine=powerpc-unknown ;; ppc-* | ppcbe-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-* | ppc64p7-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos | rdos64) basic_machine=x86_64-pc os=-rdos ;; rdos32) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; strongarm-* | thumb-*) basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tile*) basic_machine=$basic_machine-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; xscale-* | xscalee[bl]-*) basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; z80-*-coff) basic_machine=z80-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -auroraux) os=-auroraux ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -bitrig* | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; -nacl*) ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; c8051-*) os=-elf ;; hexagon-*) os=-elf ;; tic54x-*) os=-coff ;; tic55x-*) os=-coff ;; tic6x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -cnk*|-aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnu-octave-octave-zeromq-ffe3cf0/src/configure.ac���������������������������������������������������0000664�0000000�0000000�00000013646�15127471011�0022220�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# -*- Autoconf -*- # Process this file with autoconf to produce a configure script. # ### Copyright (C) 2016-2026 John Donoghue <john.donoghue@ieee.org> ### ### 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 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 ### 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 ### <http://www.gnu.org/licenses/>. AC_PREREQ([2.67]) AC_INIT([octave zeromq package], [1.5.7]) AC_CONFIG_HEADERS([config.h]) # Avoid warnings for redefining AH-generated preprocessor symbols of # Octave. AH_TOP([#include "undef-ah-octave.h"]) AC_CONFIG_MACRO_DIRS([m4]) AC_CANONICAL_HOST AC_CANONICAL_TARGET # Checks for programs. AC_PROG_CXX AC_PROG_CXXCPP AC_PROG_GREP AC_PROG_SED AC_LANG(C++) # check can access std c files AC_CHECK_HEADERS([string.h]) AC_CHECK_TOOL([MKOCTFILE], [mkoctfile], [none]) if [ test "$MKOCTFILE" = "none" ]; then AC_MSG_ERROR([mkoctfile required to install $PACKAGE_NAME]) fi AC_CHECK_TOOL([OCTAVE_CONFIG], [octave-config], [none]) if [ test "$OCTAVE_CONFIG" = "none" ]; then AC_MSG_ERROR([octave-config required to install $PACKAGE_NAME]) fi # try get around possible spaces in the path if test "X${IGNORE_MINGW_PATH_MODIFICATION}" == "X"; then case $host_os in mingw*) # try demangle spaces in escaped input strings MKOCTFILE=`echo $MKOCTFILE | $SED "s,\\\\\ ,?,g"` OCTAVE_CONFIG=`echo $OCTAVE_CONFIG | $SED "s,\\\\\ ,?,g"` ;; *) ;; esac fi save_CPPFLAGS="$CPPFLAGS" PKG_CHECK_MODULES([libzmq], [libzmq], [], [] ) if test "$libzmq_CFLAGS$libzmq_LIBS" != "" ; then CPPFLAGS="$libzmq_CFLAGS $save_CPPFLAGS" AC_CHECK_HEADERS([zmq.h], , [libzmq_CFLAGS=""; libzmq_LIBS=""], ) fi if test "$libzmq_CFLAGS$libzmq_LIBS" == "" ; then AC_MSG_NOTICE([Trying fallback libzmq detection]) # find headers first AC_MSG_CHECKING([for zmq headers path]) found_header= for p in [ /usr/include /usr/local/include /opt/include /mingw32/include /mingw64/include ]; do for v in [ '' zmq ]; do file_name="$p/$v/zmq.h" if test -f $file_name; then CPPFLAGS="-I$p/$v $save_CPPFLAGS" AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([ #include <zmq.h> ], [ int i=0; ])], [found_header="$p/$v"], []) fi done done if test "$found_header" == "" ; then AC_MSG_RESULT([not found]) AC_MSG_ERROR([Unable to find zmq headers]), else AC_MSG_RESULT([$found_header]) libzmq_CXXFLAGS="-I$found_header" libzmq_LIBS=-lzmq fi fi CPPFLAGS=$save_CPPFLAGS # save lib / inc path flags CXXFLAGS="$CXXFLAGS $libzmq_CFLAGS" LIBS="$LIBS $libzmq_LIBS" # Checks for octave depreciated symbols ## Simple symbol alternatives of different Octave versions. save_altsyms_CXX="$CXX" save_altsyms_CXXFLAGS="$CXXFLAGS" save_altsyms_LDFLAGS="$LDFLAGS" save_altsyms_LIBS="$LIBS" OCTINCLUDEDIR="${OCTINCLUDEDIR:-`$MKOCTFILE -p OCTINCLUDEDIR`}/.." OCTLIBDIR=${OCTLIBDIR:-`$MKOCTFILE -p OCTLIBDIR`} CXX=`${MKOCTFILE} -p CXX` if test "X${IGNORE_MINGW_PATH_MODIFICATION}" == "X"; then MSYSTEM="${MSYSTEM}" else MSYSTEM="none" fi case X$MSYSTEM in XMINGW64*) OCTAVE_HOME=`${MKOCTFILE} -p OCTAVE_HOME | $SED 's,\\\\,/,g'` # change \ to / and replace octave home part with mingw part OCTINCLUDEDIR=`echo $OCTINCLUDEDIR | $SED -e 's,\\\\,/,g' -e "s,${OCTAVE_HOME},/mingw64,g"` OCTLIBDIR=`echo $OCTLIBDIR | $SED -e 's,\\\\,/,g' -e "s,${OCTAVE_HOME},/mingw64,g"` ;; XMINGW32*) OCTAVE_HOME=`${MKOCTFILE} -p OCTAVE_HOME | $SED 's,\\\\,/,g'` # change \ to / and replace octave home part with mingw part OCTINCLUDEDIR=`echo $OCTINCLUDEDIR | $SED -e 's,\\\\,/,g' -e "s,${OCTAVE_HOME},/mingw32,g"` OCTLIBDIR=`echo $OCTLIBDIR | $SED -e 's,\\\\,/,g -e "s,${OCTAVE_HOME},/mingw32,g"'` ;; *) ;; esac CXXFLAGS="-I$OCTINCLUDEDIR $CXXFLAGS" LDFLAGS="-L$OCTLIBDIR $LDFLAGS" LIBS="-loctinterp $LIBS" OF_OCTAVE_LIST_ALT_SYMS([ [dnl [feval], [octave::feval], [[octave::feval ("date");]], [OCTAVE__FEVAL], [[#include <octave/parse.h>]], [[#include <octave/parse.h>]] ], [dnl [is_float_type], [isfloat], [[octave_value ().isfloat ();]], [OV_ISFLOAT], [], [] ], [dnl [is_integer_type], [isinteger], [[octave_value ().isinteger ();]], [OV_ISINTEGER], [], [] ], [dnl [is_cell], [iscell], [[octave_value ().iscell ();]], [OV_ISCELL], [], [] ], [dnl [octave_base_value], [octave_base_dld_value], [[octave_base_dld_value tmp();]], [OCTAVE_BASE_CLASS], [], [] ] ],[oct-alt-includes.h]) AC_MSG_CHECKING([for octave_base_value count field]) octave_count_field=count AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <octave/oct.h> #ifdef HAVE_CONFIG_H # include "config.h" #endif class test_base_class : public octave_base_value { public: test_base_class() {} ~test_base_class() {} void test() { m_count ++; } bool is_object (void) const { return true; } }; ]], [ test_base_class t; t.is_object(); ])], [octave_count_field=m_count], [octave_count_field=count] ) AC_MSG_RESULT([$octave_count_field]) AC_DEFINE_UNQUOTED([OV_COUNT],$octave_count_field,[octave_base_value ref count field]) CXX=$save_altsyms_CXX CXXFLAGS=$save_altsyms_CXXFLAGS LDFLAGS=$save_altsyms_LDFLAGS LIBS=$save_altsyms_LIBS TARGETS="zeromq.oct archtests" AC_SUBST(TARGETS) AC_CONFIG_FILES([Makefile]) AC_OUTPUT AC_MSG_NOTICE([ $PACKAGE_NAME is configured with: LIBS: $LIBS CXXFLAGS: $CXXFLAGS $DEFS TARGETS: $TARGETS ]) ������������������������������������������������������������������������������������������gnu-octave-octave-zeromq-ffe3cf0/src/connect.cc�����������������������������������������������������0000664�0000000�0000000�00000003572�15127471011�0021667�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// Copyright (C) 2016-2018 John Donoghue <john.donoghue@ieee.org> // // 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 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 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 <http://www.gnu.org/licenses/>. // Octave Includes #include <octave/oct.h> #include <octave/defun-dld.h> #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "socket_class.h" // PKG_ADD: autoload ("zmq_connect", "zeromq.oct"); DEFUN_DLD (zmq_connect, args, nargout, "-*- texinfo -*-\n\ @deftypefn {} {@var{status} =} zmq_connect (@var{sock}, @var{endpoint})\n \ \n\ Connect a zeromq socket to a endpoint.\n \ @subsubheading Inputs\n \ \n \ @var{sock} - the socket to connect.\n \ \n \ @var{endpoint} - the endpoint string.\n \ \n \ @subsubheading Outputs\n \ @var{status} - status for connect.\n \ On success, connect will return a @var{status} of true \n \ \n \ @seealso{zmq_socket}\n \ @end deftypefn") { init_types (); if (args.length () != 2 || args(0).type_id () != octave_zeromq_socket::static_type_id () || ! args(1).is_string ()) { print_usage (); return octave_value (false); } octave_zeromq_socket * sock = NULL; const octave_base_value& rep = args (0).get_rep (); sock = &((octave_zeromq_socket &)rep); bool ret = sock->connect (args (1).string_value ()); return octave_value (ret); } #if 0 %!error <Invalid call to zmq_connect> zmq_connect() #endif ��������������������������������������������������������������������������������������������������������������������������������������gnu-octave-octave-zeromq-ffe3cf0/src/curve_keypair.cc�����������������������������������������������0000664�0000000�0000000�00000004146�15127471011�0023104�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// Copyright (C) 2019 John Donoghue <john.donoghue@ieee.org> // // 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 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 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 <http://www.gnu.org/licenses/>. // Octave Includes #include <octave/oct.h> #include <octave/defun-dld.h> #ifdef HAVE_CONFIG_H # include "config.h" #endif // zeromq includes #include <zmq.h> // PKG_ADD: autoload ("zmq_curve_keypair", "zeromq.oct"); DEFUN_DLD (zmq_curve_keypair, args, nargout, "-*- texinfo -*-\n \ @deftypefn {} {[ @var{publickey}, @var{privatekey} ] =} zmq_curve_keypair ()\n \ \n\ Generate a random private/public keypair\n \ \n \ @subsubheading Inputs\n \ None\n \ @subsubheading Outputs\n \ @var{publickey} is a string that is the encoded public key\n \ \n \ @var{privatekey} is a string that is the encoded private key\n \ \n \ @seealso { zmq_z85_encode }\n \ @end deftypefn") { octave_value_list retval; if (args.length () != 0) { print_usage (); return retval; } #ifdef ZMQ_CURVE char privatekey[41]; char publickey[41]; int rc = zmq_curve_keypair(publickey, privatekey); if (rc != 0) { error ("zeromq: couldn't encode data"); return retval; } retval(0) = octave_value (std::string (publickey)); retval(1) = octave_value (std::string (privatekey)); #else error ("zeromq: curve functions not implemented by this version of libzmq"); #endif return retval; } #if 0 %!error <Invalid call to zmq_curve_keypair()> zmq_curve_keypair(1) %!test %! if zmq_has ('curve') %! [pub, priv] = zmq_curve_keypair(); %! assert(!isempty(pub)) %! assert(!isempty(priv)) %! endif #endif ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnu-octave-octave-zeromq-ffe3cf0/src/curve_public.cc������������������������������������������������0000664�0000000�0000000�00000005136�15127471011�0022716�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// Copyright (C) 2019 John Donoghue <john.donoghue@ieee.org> // // 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 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 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 <http://www.gnu.org/licenses/>. // Octave Includes #include <octave/oct.h> #include <octave/defun-dld.h> #ifdef HAVE_CONFIG_H # include "config.h" #endif // zeromq includes #include <zmq.h> // PKG_ADD: autoload ("zmq_curve_public", "zeromq.oct"); DEFUN_DLD (zmq_curve_public, args, nargout, "-*- texinfo -*-\n \ @deftypefn {} {@var{publickey} =} zmq_curve_public (@var{privatekey})\n \ \n\ Derive the public key from a private key\n \ \n \ @subsubheading Inputs\n \ @var{privatekey} is a string that is the encoded private key. It must be 40 characters in length\n \ \n \ @subsubheading Outputs\n \ @var{publickey} is a string that is the encoded public key\n \ \n \ @seealso{zmq_curve_keypair}\n \ @end deftypefn") { octave_value retval; if (args.length () != 1) { print_usage (); return octave_value (); } if(!args(0).is_string ()) { error ("zeromq: expected input to be a string"); return octave_value (); } std::string in = args (0).string_value (); int len = in.length (); if (len != 40) { error ("zeromq: input string key size must be 40"); return octave_value (); } #if ZMQ_VERSION >= ZMQ_MAKE_VERSION(4,2,0) char publickey[41]; int rc = zmq_curve_public(publickey, in.c_str()); if (rc != 0) { error ("zeromq: couldn't create public key"); } else { retval = octave_value (std::string (publickey)); } #else error ("zeromq: curve_public function not implemented by this version of libzmq"); #endif return retval; } #if 0 %!error <Invalid call to zmq_curve_public()> zmq_curve_public() %!error <zeromq: expected input to be a string> zmq_curve_public(1) %!error <zeromq: input string key size must be 40> zmq_curve_public("12345") %!test %! if zmq_has ('curve') %! [pub, priv] = zmq_curve_keypair(); %! assert(!isempty(pub)) %! assert(!isempty(priv)) %! check = zmq_curve_public(priv); %! assert(check, pub) %! endif #endif ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnu-octave-octave-zeromq-ffe3cf0/src/disconnect.cc��������������������������������������������������0000664�0000000�0000000�00000004235�15127471011�0022364�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// Copyright (C) 2016-2022 John Donoghue <john.donoghue@ieee.org> // // 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 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 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 <http://www.gnu.org/licenses/>. // Octave Includes #include <octave/oct.h> #include <octave/defun-dld.h> #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "socket_class.h" // PKG_ADD: autoload ("zmq_disconnect", "zeromq.oct"); DEFUN_DLD (zmq_disconnect, args, nargout, "-*- texinfo -*-\n\ @deftypefn {} {@var{status} =} zmq_disconnect (@var{sock}, @var{endpoint})\n \ \n\ Disconnect a zeromq socket from an endpoint.\n \ \n \ @subsubheading Inputs\n \ @var{sock} - the socket to disconnect from.\n \ \n \ @var{endpoint} - a previously connected endpoint string to disconnect.\n \ \n \ @subsubheading Outputs\n \ @var{status} - status for disconnect.\n \ On success, disconnect will return a @var{status} of true \n \ \n \ @seealso{zmq_socket, zmq_connect}\n \ @end deftypefn") { init_types (); if (args.length () != 2 || args(0).type_id () != octave_zeromq_socket::static_type_id () || ! args(1).is_string ()) { print_usage (); return octave_value (false); } octave_zeromq_socket * sock = NULL; const octave_base_value& rep = args (0).get_rep (); sock = &((octave_zeromq_socket &)rep); bool ret = sock->disconnect (args (1).string_value ()); return octave_value (ret); } #if 0 %!error <Invalid call to zmq_disconnect> zmq_disconnect() %!error <Invalid call to zmq_disconnect> zmq_disconnect(1) %!test %! s = zmq_socket("ZMQ_SUB"); %! zmq_connect(s, "tcp://127.0.0.1:10000"); %! zmq_disconnect(s, "tcp://127.0.0.1:10000"); %! zmq_close(s); #endif �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnu-octave-octave-zeromq-ffe3cf0/src/errno.cc�������������������������������������������������������0000664�0000000�0000000�00000002565�15127471011�0021364�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// Copyright (C) 2014-2018 John Donoghue <john.donoghue@ieee.org> // // 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 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 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 <http://www.gnu.org/licenses/>. // Octave Includes #include <octave/oct.h> #include <octave/defun-dld.h> #ifdef HAVE_CONFIG_H # include "config.h" #endif // zeromq includes #include <zmq.h> // PKG_ADD: autoload ("zmq_errno", "zeromq.oct"); DEFUN_DLD (zmq_errno, args, nargout, "-*- texinfo -*-\n \ @deftypefn {} @var{errornum} = zmq_errno ()\n \ \n\ Get the value of errno from zeromq.\n \ \n \ @subsubheading Inputs\n \ None\n \ @subsubheading Outputs\n \ @var{errornum} is the errno value of the calling thread.\n \ \n \ @end deftypefn") { if (args.length () > 0) { print_usage (); return octave_value (-1); } int err = zmq_errno (); return octave_value (err); } �������������������������������������������������������������������������������������������������������������������������������������������gnu-octave-octave-zeromq-ffe3cf0/src/getsockopt.cc��������������������������������������������������0000664�0000000�0000000�00000031045�15127471011�0022414�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// Copyright (C) 2016-2020 John Donoghue <john.donoghue@ieee.org> // // 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 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 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 <http://www.gnu.org/licenses/>. // Octave Includes #include <octave/oct.h> #include <octave/defun-dld.h> #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "socket_class.h" #include <zmq.h> // PKG_ADD: autoload ("zmq_getsockopt", "zeromq.oct"); DEFUN_DLD (zmq_getsockopt, args, nargout, "-*- texinfo -*-\n\ @deftypefn {} {@var{value} =} zmq_getsockopt (@var{sock}, @var{optionid})\n \ \n\ Get the current value of an option.\n \ \n \ @subsubheading Inputs\n \ @var{sock} - the socket to connect.\n \ \n \ @var{optionid} - the setsockopt option to set.\n \ \n \ Valid @var{optionid}s are:\n \ @table @asis\n \ @item @code{ZMQ_RCVMORE}\n \ Flag for whether a message has been split into multiple messages. The return value will be either 0 or 1.\n \ @item @code{ZMQ_TYPE}\n \ Socket type for zeromq socket created with zmq_socket.\n \ Valid types are the same as the socket type value specified with zmq_socket. \n \ @item @code{ZMQ_EVENTS}\n \ Get the event state of zeromq socket.\n \ The returned value is a bit mask that may contain the following set values:\n \ @itemize\n \ @item @code{ZMQ_POLLIN} set when at least one message is available to read and zmq_recv will not block.\n \ @item @code{ZMQ_POLLOUT} set when at least one message can be written without zmq_send blocking.\n \ @end itemize\n \ @item @code{ZMQ_IDENTITY} or @code{ZMQ_ROUTING_ID}\n \ Get the socket identity value\n \ @item @code{ZMQ_RATE}\n \ Get the multicast data rate\n \ @item @code{ZMQ_PRIORITY}\n \ Get socket priority (linux only)\n \ @item @code{ZMQ_BACKLOG}\n \ Get length of queue for pending connections\n \ @item @code{ZMQ_LAST_ENDPOINT}\n \ Get the last endpoint the socket was connected to\n \ @item @code{ZMQ_CONNECT_TIMEOUT}\n \ Get the connect timeout value\n \ @item @code{ZMQ_SOCKS_PROXY}\n \ Get the SOCKS5 proxy value (string)\n \ @item @code{ZMQ_CURVE_SERVER}\n \ Get whether socket is a curve server (1) or not (0)\n \ @item @code{ZMQ_CURVE_PRIVATEKEY}\n \ Get a the curve socket private key (string)\n \ @item @code{ZMQ_CURVE_PUBLICKEY}\n \ Get a the curve socket public key (string)\n \ @item @code{ZMQ_CURVE_SERVERKEY}\n \ Get a the curve socket public key (string)\n \ @item @code{ZMQ_PLAIN_SERVER}\n \ Get whether socket server will use plain authentication (1) or not (0)\n \ @item @code{ZMQ_PLAIN_USERNAME}\n \ Get the plain socket username (string)\n \ @item @code{ZMQ_PLAIN_PASSWORD}\n \ Get the plain socket password (string)\n \ @item @code{ZMQ_GSSAPI_SERVER}\n \ Get whether socket server will use gssapi authentication (1) or not (0)\n \ @item @code{ZMQ_GSSAPI_PLAINTEXT}\n \ Get whether socket will encrypt gssapi authentication (1) or not (0)\n \ @item @code{ZMQ_GSSAPI_PRINCIPAL}\n \ Get the name of the gssapi principal (string)\n \ @item @code{ZMQ_GSSAPI_SERVICE_PRINCIPAL}\n \ Get the name of the gssapi service principal (string)\n \ @item @code{ZMQ_MECHANISM}\n \ Get the security mechanism (ZMQ_NULL, ZMQ_PLAIN, ZMQ_CURVE, ZMQ_GSSAPI)\n \ @end table\n \ \n \ @subsubheading Outputs\n \ @var{value} - the value set for the option, or [].\n \ \n \ @seealso{zmq_socket, zmq_setsockopt}\n \ @end deftypefn") { init_types (); if (args.length () != 2 || args(0).type_id () != octave_zeromq_socket::static_type_id ()) { print_usage (); return octave_value (); } if (args (1).OV_ISINTEGER () && !args (1).OV_ISFLOAT ()) { print_usage (); return octave_value (); } octave_zeromq_socket * sock = NULL; const octave_base_value& rep = args (0).get_rep (); sock = &((octave_zeromq_socket &)rep); int opt = args (1).int_value (); std::string strvalue; octave_value ret; switch(opt) { case ZMQ_RCVMORE: { #if ZMQ_VERSION < ZMQ_MAKE_VERSION(3,0,0) int64_t flag = 0; #else int flag = 0; #endif size_t sz = sizeof (flag); if (! sock->getsockopt (opt, &flag, &sz)) error ("zeromq: failed getsockopt"); ret = octave_value (flag); } break; #if ZMQ_VERSION < ZMQ_MAKE_VERSION(3,0,0) case ZMQ_HWM: { uint64_t value = 0; size_t sz = sizeof (value); if (! sock->getsockopt (opt, &value, &sz)) error ("zeromq: failed getsockopt"); ret = octave_value (value); } break; #endif #if ZMQ_VERSION >= ZMQ_MAKE_VERSION(3,0,0) case ZMQ_SNDHWM: { int value = 0; size_t sz = sizeof (value); if ( !sock->getsockopt (opt, &value, &sz)) error ("zeromq: failed getsockopt"); ret = octave_value (value); } break; #endif #if ZMQ_VERSION >= ZMQ_MAKE_VERSION(3,0,0) case ZMQ_RCVHWM: { int value = 0; size_t sz = sizeof (value); if (! sock->getsockopt (opt, &value, &sz)) error ("zeromq: failed getsockopt"); ret = octave_value (value); } break; #endif #if ZMQ_VERSION >= ZMQ_MAKE_VERSION(2,1,0) case ZMQ_TYPE: { ret = octave_value (sock->socktype ()); } break; #endif case ZMQ_EVENTS: { #if ZMQ_VERSION < ZMQ_MAKE_VERSION(3,0,0) uint32_t value = 0; #else int value = 0; #endif size_t sz = sizeof (value); if (! sock->getsockopt (opt, &value, &sz)) error ("zeromq: ZMQ_EVENTS failed getsockopt"); ret = octave_value (value); } break; #ifdef ZMQ_ROUTING_ID case ZMQ_ROUTING_ID: #else case ZMQ_IDENTITY: #endif { uint8_t value[256]; size_t sz = sizeof (value); if (! sock->getsockopt (opt, value, &sz)) error ("zeromq: failed getsockopt"); if (sz > 0) { uint8NDArray data( dim_vector (1,sz) ); for (size_t i=0;i<sz;i++) { data(i) = value[i]; } ret = data; } else ret = uint8NDArray (dim_vector (1,0)); } break; #if ZMQ_VERSION >= ZMQ_MAKE_VERSION(3,2,0) case ZMQ_LAST_ENDPOINT: { char value[1024]; size_t sz = sizeof (value); if (! sock->getsockopt (opt, value, &sz)) error ("zeromq: failed getsockopt"); if (sz > 0) { strvalue = std::string(value, sz-1); } else strvalue = ""; ret = octave_value(strvalue); } break; #endif #if ZMQ_VERSION >= ZMQ_MAKE_VERSION(4,2,0) case ZMQ_CONNECT_TIMEOUT: { int value; size_t sz = sizeof (value); if (! sock->getsockopt (opt, &value, &sz)) error ("zeromq: failed getsockopt"); ret = octave_value (value); } break; #endif #ifdef ZMQ_SOCKS_PROXY case ZMQ_SOCKS_PROXY: { char value[1024]; size_t sz = sizeof(value); if (! sock->getsockopt (opt, value, &sz)) error ("zeromq: failed getsockopt"); if (sz > 0) { strvalue = std::string(value, sz-1); } else strvalue = ""; ret = octave_value(strvalue); } break; #endif #ifdef ZMQ_CURVE_SERVER case ZMQ_CURVE_SERVER: { int value; size_t sz = sizeof (value); if (! sock->getsockopt (opt, &value, &sz)) error ("zeromq: failed getsockopt"); ret = octave_value (value); } break; #endif #ifdef ZMQ_CURVE_PUBLICKEY case ZMQ_CURVE_PUBLICKEY: { char value[1024]; size_t sz = 41; if (! sock->getsockopt (opt, value, &sz)) error ("zeromq: failed getsockopt"); if (sz > 0) { strvalue = std::string(value, sz-1); } else strvalue = ""; ret = octave_value(strvalue); } break; #endif #ifdef ZMQ_CURVE_SERVERKEY case ZMQ_CURVE_SERVERKEY: { char value[1024]; size_t sz = 41; if (! sock->getsockopt (opt, value, &sz)) error ("zeromq: failed getsockopt"); if (sz > 0) { strvalue = std::string(value, sz-1); } else strvalue = ""; ret = octave_value(strvalue); } break; #endif #ifdef ZMQ_CURVE_SECRETKEY case ZMQ_CURVE_SECRETKEY: { char value[1024]; size_t sz = 41; if (! sock->getsockopt (opt, value, &sz)) error ("zeromq: failed getsockopt"); if (sz > 0) { strvalue = std::string(value, sz-1); } else strvalue = ""; ret = octave_value(strvalue); } break; #endif #ifdef ZMQ_PLAIN_SERVER case ZMQ_PLAIN_SERVER: { int value; size_t sz = sizeof (value); if (! sock->getsockopt (opt, &value, &sz)) error ("zeromq: failed getsockopt"); ret = octave_value (value); } break; #endif #ifdef ZMQ_PLAIN_USERNAME case ZMQ_PLAIN_USERNAME: { char value[1024]; size_t sz = sizeof (value); if (! sock->getsockopt (opt, value, &sz)) error ("zeromq: failed getsockopt"); if (sz > 0) { strvalue = std::string(value, sz-1); } else strvalue = ""; ret = octave_value(strvalue); } break; #endif #ifdef ZMQ_PLAIN_PASSWORD case ZMQ_PLAIN_PASSWORD: { char value[1024]; size_t sz = sizeof (value); if (! sock->getsockopt (opt, value, &sz)) error ("zeromq: failed getsockopt"); if (sz > 0) { strvalue = std::string(value, sz-1); } else strvalue = ""; ret = octave_value(strvalue); } break; #endif #ifdef ZMQ_GSSAPI_SERVER case ZMQ_GSSAPI_SERVER: { int value; size_t sz = sizeof (value); if (! sock->getsockopt (opt, &value, &sz)) error ("zeromq: failed getsockopt"); ret = octave_value (value); } break; #endif #ifdef ZMQ_GSSAPI_PLAINTEXT case ZMQ_GSSAPI_PLAINTEXT: { int value; size_t sz = sizeof (value); if (! sock->getsockopt (opt, &value, &sz)) error ("zeromq: failed getsockopt"); ret = octave_value (value); } break; #endif #ifdef ZMQ_GSSAPI_PRINCIPAL case ZMQ_GSSAPI_PRINCIPAL: { char value[1024]; size_t sz = sizeof (value); if (! sock->getsockopt (opt, value, &sz)) error ("zeromq: failed getsockopt"); if (sz > 0) { strvalue = std::string(value, sz-1); } else strvalue = ""; ret = octave_value(strvalue); } break; #endif #ifdef ZMQ_GSSAPI_SERVICE_PRINCIPAL case ZMQ_GSSAPI_SERVICE_PRINCIPAL: { char value[1024]; size_t sz = sizeof (value); if (! sock->getsockopt (opt, value, &sz)) error ("zeromq: failed getsockopt"); if (sz > 0) { strvalue = std::string(value, sz-1); } else strvalue = ""; ret = octave_value(strvalue); } break; #endif #ifdef ZMQ_MECHANISM case ZMQ_MECHANISM: { int value; size_t sz = sizeof (value); if (! sock->getsockopt (opt, &value, &sz)) error ("zeromq: failed getsockopt"); ret = octave_value (value); } break; #endif #ifdef ZMQ_PRIORITY case ZMQ_PRIORITY: { int value; size_t sz = sizeof (value); if (! sock->getsockopt (opt, &value, &sz)) error ("zeromq: failed getsockopt"); ret = octave_value (value); } break; #endif #ifdef ZMQ_RATE case ZMQ_RATE: { int value; size_t sz = sizeof (value); if (! sock->getsockopt (opt, &value, &sz)) error ("zeromq: failed getsockopt"); ret = octave_value (value); } break; #endif #ifdef ZMQ_BACKLOG case ZMQ_BACKLOG: { int value; size_t sz = sizeof (value); if (! sock->getsockopt (opt, &value, &sz)) error ("zeromq: failed getsockopt"); ret = octave_value (value); } break; #endif default: error ("zeromq: invalid getsockopt value %d", opt); break; } return ret; } #if 0 %!error <Invalid call to zmq_getsockopt> zmq_getsockopt %!error <Invalid call to zmq_getsockopt> zmq_getsockopt(10) %!test %! s = zmq_socket(ZMQ_SUB); %! assert(zmq_getsockopt(s, ZMQ_TYPE), ZMQ_SUB); %! zmq_setsockopt(s, ZMQ_IDENTITY, uint8([104 101 108 108 111])); %! assert(zmq_getsockopt(s, ZMQ_IDENTITY), uint8([104 101 108 108 111])); %! zmq_close(s); #endif �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnu-octave-octave-zeromq-ffe3cf0/src/globals.cc�����������������������������������������������������0000664�0000000�0000000�00000026757�15127471011�0021673�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// Copyright (C) 2014-2022 John Donoghue <john.donoghue@ieee.org> // // 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 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 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 <http://www.gnu.org/licenses/>. // Octave Includes #include <octave/oct.h> #include <octave/defun-dld.h> #ifdef HAVE_CONFIG_H # include "config.h" #endif // zeromq includes #include <zmq.h> // socket types ...... // PKG_ADD: autoload ("__ZMQ_SOCK_PUB", "zeromq.oct"); DEFUN_DLD (__ZMQ_SOCK_PUB, args, nargout,"zeromq constant") { return octave_value(ZMQ_PUB); } // PKG_ADD: autoload ("__ZMQ_SOCK_SUB", "zeromq.oct"); DEFUN_DLD (__ZMQ_SOCK_SUB, args, nargout,"zeromq socket type constant") { return octave_value(ZMQ_SUB); } // PKG_ADD: autoload ("__ZMQ_SOCK_REQ", "zeromq.oct"); DEFUN_DLD (__ZMQ_SOCK_REQ, args, nargout,"zeromq socket type constant") { return octave_value(ZMQ_REQ); } // PKG_ADD: autoload ("__ZMQ_SOCK_REP", "zeromq.oct"); DEFUN_DLD (__ZMQ_SOCK_REP, args, nargout,"zeromq socket type constant") { return octave_value(ZMQ_REP); } // PKG_ADD: autoload ("__ZMQ_SOCK_PUSH", "zeromq.oct"); DEFUN_DLD (__ZMQ_SOCK_PUSH, args, nargout,"zeromq socket type constant") { return octave_value(ZMQ_PUSH); } // PKG_ADD: autoload ("__ZMQ_SOCK_PULL", "zeromq.oct"); DEFUN_DLD (__ZMQ_SOCK_PULL, args, nargout,"zeromq socket type constant") { return octave_value(ZMQ_PULL); } // PKG_ADD: autoload ("__ZMQ_SOCK_DEALER", "zeromq.oct"); DEFUN_DLD (__ZMQ_SOCK_DEALER, args, nargout,"zeromq socket type constant") { return octave_value(ZMQ_DEALER); } // PKG_ADD: autoload ("__ZMQ_SOCK_ROUTER", "zeromq.oct"); DEFUN_DLD (__ZMQ_SOCK_ROUTER, args, nargout,"zeromq socket type constant") { return octave_value(ZMQ_ROUTER); } // PKG_ADD: autoload ("__ZMQ_SOCK_PAIR", "zeromq.oct"); DEFUN_DLD (__ZMQ_SOCK_PAIR, args, nargout,"zeromq socket type constant") { return octave_value(ZMQ_PAIR); } // PKG_ADD: autoload ("__ZMQ_SOCK_STREAM", "zeromq.oct"); DEFUN_DLD (__ZMQ_SOCK_STREAM, args, nargout,"zeromq constant") { #if defined(ZMQ_STREAM) return octave_value(ZMQ_STREAM); #else return octave_value(-1); #endif } // PKG_ADD: autoload ("__ZMQ_SOCK_XPUB", "zeromq.oct"); DEFUN_DLD (__ZMQ_SOCK_XPUB, args, nargout,"zeromq constant") { return octave_value(ZMQ_XPUB); } // PKG_ADD: autoload ("__ZMQ_SOCK_XSUB", "zeromq.oct"); DEFUN_DLD (__ZMQ_SOCK_XSUB, args, nargout,"zeromq socket type constant") { return octave_value(ZMQ_XSUB); } // socket send/recv flags -------------------- // PKG_ADD: autoload ("__ZMQ_FLAG_SNDMORE", "zeromq.oct"); DEFUN_DLD (__ZMQ_FLAG_SNDMORE, args, nargout,"zeromq flag constant") { return octave_value(ZMQ_SNDMORE); } // PKG_ADD: autoload ("__ZMQ_FLAG_DONTWAIT", "zeromq.oct"); DEFUN_DLD (__ZMQ_FLAG_DONTWAIT, args, nargout,"zeromq flag constant") { // return octave_value(ZMQ_DONTWAIT); return octave_value(ZMQ_NOBLOCK); } // set/get socket options ---------------------------- // PKG_ADD: autoload ("__ZMQ_OPT_SUBSCRIBE", "zeromq.oct"); DEFUN_DLD (__ZMQ_OPT_SUBSCRIBE, args, nargout,"zeromq option constant") { return octave_value(ZMQ_SUBSCRIBE); } // PKG_ADD: autoload ("__ZMQ_OPT_UNSUBSCRIBE", "zeromq.oct"); DEFUN_DLD (__ZMQ_OPT_UNSUBSCRIBE, args, nargout,"zeromq option constant") { return octave_value(ZMQ_UNSUBSCRIBE); } // PKG_ADD: autoload ("__ZMQ_OPT_RCVMORE", "zeromq.oct"); DEFUN_DLD (__ZMQ_OPT_RCVMORE, args, nargout,"zeromq option constant") { return octave_value(ZMQ_RCVMORE); } // PKG_ADD: autoload ("__ZMQ_OPT_IDENTITY", "zeromq.oct"); DEFUN_DLD (__ZMQ_OPT_IDENTITY, args, nargout,"zeromq option constant") { #ifdef ZMQ_IDENTITY return octave_value(ZMQ_IDENTITY); #else return octave_value(ZMQ_ROUTING_ID); #endif } // PKG_ADD: autoload ("__ZMQ_OPT_ROUTING_ID", "zeromq.oct"); DEFUN_DLD (__ZMQ_OPT_ROUTING_ID, args, nargout,"zeromq option constant") { #ifdef ZMQ_ROUTING_ID return octave_value(ZMQ_ROUTING_ID); #else return octave_value(ZMQ_IDENTITY); #endif } // PKG_ADD: autoload ("__ZMQ_OPT_TYPE", "zeromq.oct"); DEFUN_DLD (__ZMQ_OPT_TYPE, args, nargout,"zeromq option constant") { #if ZMQ_VERSION >= ZMQ_MAKE_VERSION(2,1,0) return octave_value(ZMQ_TYPE); #else return octave_value(-1); #endif } // PKG_ADD: autoload ("__ZMQ_OPT_LAST_ENDPOINT", "zeromq.oct"); DEFUN_DLD (__ZMQ_OPT_LAST_ENDPOINT, args, nargout,"zeromq option constant") { #if ZMQ_VERSION >= ZMQ_MAKE_VERSION(3,2,0) return octave_value(ZMQ_LAST_ENDPOINT); #else return octave_value(-1); #endif } // PKG_ADD: autoload ("__ZMQ_OPT_CONNECT_TIMEOUT", "zeromq.oct"); DEFUN_DLD (__ZMQ_OPT_CONNECT_TIMEOUT, args, nargout,"zeromq option constant") { #if ZMQ_VERSION >= ZMQ_MAKE_VERSION(4,2,0) return octave_value(ZMQ_CONNECT_TIMEOUT); #else return octave_value(-1); #endif } // PKG_ADD: autoload ("__ZMQ_OPT_SOCKS_PROXY", "zeromq.oct"); DEFUN_DLD (__ZMQ_OPT_SOCKS_PROXY, args, nargout,"zeromq option constant") { #ifdef ZMQ_SOCKS_PROXY return octave_value(ZMQ_SOCKS_PROXY); #else return octave_value(-1); #endif } // PKG_ADD: autoload ("__ZMQ_OPT_CURVE_SERVER", "zeromq.oct"); DEFUN_DLD (__ZMQ_OPT_CURVE_SERVER, args, nargout,"zeromq option constant") { #ifdef ZMQ_CURVE return octave_value(ZMQ_CURVE_SERVER); #else return octave_value(-1); #endif } // PKG_ADD: autoload ("__ZMQ_OPT_CURVE_SECRETKEY", "zeromq.oct"); DEFUN_DLD (__ZMQ_OPT_CURVE_SECRETKEY, args, nargout,"zeromq option constant") { #ifdef ZMQ_CURVE return octave_value(ZMQ_CURVE_SECRETKEY); #else return octave_value(-1); #endif } // PKG_ADD: autoload ("__ZMQ_OPT_CURVE_PUBLICKEY", "zeromq.oct"); DEFUN_DLD (__ZMQ_OPT_CURVE_PUBLICKEY, args, nargout,"zeromq option constant") { #ifdef ZMQ_CURVE return octave_value(ZMQ_CURVE_PUBLICKEY); #else return octave_value(-1); #endif } // PKG_ADD: autoload ("__ZMQ_OPT_CURVE_SERVERKEY", "zeromq.oct"); DEFUN_DLD (__ZMQ_OPT_CURVE_SERVERKEY, args, nargout,"zeromq option constant") { #ifdef ZMQ_CURVE return octave_value(ZMQ_CURVE_SERVERKEY); #else return octave_value(-1); #endif } // PKG_ADD: autoload ("__ZMQ_OPT_PLAIN_SERVER", "zeromq.oct"); DEFUN_DLD (__ZMQ_OPT_PLAIN_SERVER, args, nargout,"zeromq option constant") { #ifdef ZMQ_PLAIN_SERVER return octave_value(ZMQ_PLAIN_SERVER); #else return octave_value(-1); #endif } // PKG_ADD: autoload ("__ZMQ_OPT_PLAIN_USERNAME", "zeromq.oct"); DEFUN_DLD (__ZMQ_OPT_PLAIN_USERNAME, args, nargout,"zeromq option constant") { #ifdef ZMQ_PLAIN_USERNAME return octave_value(ZMQ_PLAIN_USERNAME); #else return octave_value(-1); #endif } // PKG_ADD: autoload ("__ZMQ_OPT_PLAIN_PASSWORD", "zeromq.oct"); DEFUN_DLD (__ZMQ_OPT_PLAIN_PASSWORD, args, nargout,"zeromq option constant") { #ifdef ZMQ_PLAIN_PASSWORD return octave_value(ZMQ_PLAIN_PASSWORD); #else return octave_value(-1); #endif } // PKG_ADD: autoload ("__ZMQ_OPT_GSSAPI_SERVER", "zeromq.oct"); DEFUN_DLD (__ZMQ_OPT_GSSAPI_SERVER, args, nargout,"zeromq option constant") { #ifdef ZMQ_GSSAPI_SERVER return octave_value(ZMQ_GSSAPI_SERVER); #else return octave_value(-1); #endif } // PKG_ADD: autoload ("__ZMQ_OPT_GSSAPI_PLAINTEXT", "zeromq.oct"); DEFUN_DLD (__ZMQ_OPT_GSSAPI_PLAINTEXT, args, nargout,"zeromq option constant") { #ifdef ZMQ_GSSAPI_PLAINTEXT return octave_value(ZMQ_GSSAPI_PLAINTEXT); #else return octave_value(-1); #endif } // PKG_ADD: autoload ("__ZMQ_OPT_GSSAPI_PRINCIPAL", "zeromq.oct"); DEFUN_DLD (__ZMQ_OPT_GSSAPI_PRINCIPAL, args, nargout,"zeromq option constant") { #ifdef ZMQ_GSSAPI_PRINCIPAL return octave_value(ZMQ_GSSAPI_PRINCIPAL); #else return octave_value(-1); #endif } // PKG_ADD: autoload ("__ZMQ_OPT_GSSAPI_SERVICE_PRINCIPAL", "zeromq.oct"); DEFUN_DLD (__ZMQ_OPT_GSSAPI_SERVICE_PRINCIPAL, args, nargout,"zeromq option constant") { #ifdef ZMQ_GSSAPI_SERVICE_PRINCIPAL return octave_value(ZMQ_GSSAPI_SERVICE_PRINCIPAL); #else return octave_value(-1); #endif } // PKG_ADD: autoload ("__ZMQ_OPT_MECHANISM", "zeromq.oct"); DEFUN_DLD (__ZMQ_OPT_MECHANISM, args, nargout,"zeromq option constant") { #ifdef ZMQ_MECHANISM return octave_value(ZMQ_MECHANISM); #else return octave_value(-1); #endif } // PKG_ADD: autoload ("__ZMQ_OPT_EVENTS", "zeromq.oct"); DEFUN_DLD (__ZMQ_OPT_EVENTS, args, nargout,"zeromq option constant") { return octave_value(ZMQ_EVENTS); } // ZMQ_EVENT constants // PKG_ADD: autoload ("__ZMQ_EVENT_POLLIN", "zeromq.oct"); DEFUN_DLD (__ZMQ_EVENT_POLLIN, args, nargout,"zeromq option event constant") { return octave_value(ZMQ_POLLIN); } // PKG_ADD: autoload ("__ZMQ_EVENT_POLLOUT", "zeromq.oct"); DEFUN_DLD (__ZMQ_EVENT_POLLOUT, args, nargout,"zeromq option event constant") { return octave_value(ZMQ_POLLOUT); } // ZMQ_MECHANISM constants // PKG_ADD: autoload ("__ZMQ_MECHANISM_NULL", "zeromq.oct"); DEFUN_DLD (__ZMQ_MECHANISM_NULL, args, nargout,"zeromq option mechanism constant") { #ifdef ZMQ_NULL return octave_value(ZMQ_NULL); #else return octave_value(-1); #endif } // PKG_ADD: autoload ("__ZMQ_MECHANISM_PLAIN", "zeromq.oct"); DEFUN_DLD (__ZMQ_MECHANISM_PLAIN, args, nargout,"zeromq option mechanism constant") { #ifdef ZMQ_PLAIN return octave_value(ZMQ_PLAIN); #else return octave_value(-1); #endif } // PKG_ADD: autoload ("__ZMQ_MECHANISM_CURVE", "zeromq.oct"); DEFUN_DLD (__ZMQ_MECHANISM_CURVE, args, nargout,"zeromq option mechanism constant") { #ifdef ZMQ_CURVE return octave_value(ZMQ_CURVE); #else return octave_value(-1); #endif } // PKG_ADD: autoload ("__ZMQ_MECHANISM_GSSAPI", "zeromq.oct"); DEFUN_DLD (__ZMQ_MECHANISM_GSSAPI, args, nargout,"zeromq option mechanism constant") { #ifdef ZMQ_GSSAPI return octave_value(ZMQ_GSSAPI); #else return octave_value(-1); #endif } // PKG_ADD: autoload ("__ZMQ_OPT_PRIORITY", "zeromq.oct"); DEFUN_DLD (__ZMQ_OPT_PRIORITY, args, nargout,"zeromq socket constant") { // NOTE: currently draft so may change #ifdef ZMQ_PRIORITY return octave_value(ZMQ_PRIORITY); #else return octave_value(-1); #endif } // PKG_ADD: autoload ("__ZMQ_OPT_RATE", "zeromq.oct"); DEFUN_DLD (__ZMQ_OPT_RATE, args, nargout,"zeromq socket constant") { #ifdef ZMQ_RATE return octave_value(ZMQ_RATE); #else return octave_value(-1); #endif } // PKG_ADD: autoload ("__ZMQ_OPT_BACKLOG", "zeromq.oct"); DEFUN_DLD (__ZMQ_OPT_BACKLOG, args, nargout,"zeromq socket constant") { #ifdef ZMQ_BACKLOG return octave_value(ZMQ_BACKLOG); #else return octave_value(-1); #endif } #if 0 %! % check that all the values exist %!assert (exist('__ZMQ_EVENT_POLLOUT')) %!assert (exist('__ZMQ_EVENT_POLLIN')) %!assert (exist('__ZMQ_OPT_EVENTS')) %!assert (exist('__ZMQ_OPT_TYPE')) %!assert (exist('__ZMQ_OPT_IDENTITY')) %!assert (exist('__ZMQ_OPT_RCVMORE')) %!assert (exist('__ZMQ_OPT_SUBSCRIBE')) %!assert (exist('__ZMQ_OPT_UNSUBSCRIBE')) %!assert (exist('__ZMQ_OPT_LAST_ENDPOINT')) %!assert (exist('__ZMQ_OPT_CONNECT_TIMEOUT')) %!assert (exist('__ZMQ_FLAG_DONTWAIT')) %!assert (exist('__ZMQ_FLAG_SNDMORE')) %!assert (exist('__ZMQ_SOCK_PUB')) %!assert (exist('__ZMQ_SOCK_SUB')) %!assert (exist('__ZMQ_SOCK_REQ')) %!assert (exist('__ZMQ_SOCK_REP')) %!assert (exist('__ZMQ_SOCK_PUSH')) %!assert (exist('__ZMQ_SOCK_PULL')) %!assert (exist('__ZMQ_SOCK_DEALER')) %!assert (exist('__ZMQ_SOCK_ROUTER')) %!assert (exist('__ZMQ_SOCK_PAIR')) %!assert (exist('__ZMQ_SOCK_XPUB')) %!assert (exist('__ZMQ_SOCK_XSUB')) %!assert (exist('__ZMQ_SOCK_STREAM')) #endif �����������������gnu-octave-octave-zeromq-ffe3cf0/src/has.cc���������������������������������������������������������0000664�0000000�0000000�00000005055�15127471011�0021007�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// Copyright (C) 2018-2020 John Donoghue <john.donoghue@ieee.org> // // 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 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 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 <http://www.gnu.org/licenses/>. // Octave Includes #include <octave/oct.h> #include <octave/defun-dld.h> #ifdef HAVE_CONFIG_H # include "config.h" #endif // zeromq includes #include <zmq.h> // PKG_ADD: autoload ("zmq_has", "zeromq.oct"); DEFUN_DLD (zmq_has, args, nargout, "-*- texinfo -*-\n \ @deftypefn {} {@var{yesno} =} zmq_has (@var{feature})\n \ \n\ Check if the zmq library supports a given feature.\n \ \n \ @subsubheading Inputs\n \ @var{feature} is the name of feature to check.\n \ \n \ Currently known features are:\n \ @table @asis\n \ @item 'ipc'\n \ library supports the ipc:// protocol\n \ @item 'pgm'\n \ library supports the pgm:// protocol\n \ @item 'tipc'\n \ library supports the tipc:// protocol\n \ @item 'norm'\n \ library supports the norm:// protocol\n \ @item 'curve'\n \ library supports the CURVE security mechanism\n \ @item 'gssapi'\n \ library supports the GSSAPI security mechanism\n \ @item 'draft'\n \ library was built with the draft API.\n \ @end table\n \ \n \ @subsubheading Outputs\n \ @var{yesno} - set to true if the feature is available, otherwise false. \ \n \ @end deftypefn") { if (args.length () != 1 || ! args(0).is_string ()) { print_usage (); return octave_value (-1); } // get feature to check in lower case std::string feature = args (0).string_value (); std::transform (feature.begin (), feature.end (), feature.begin (), ::tolower); octave_value yesno; #if defined(ZMQ_HAS_CAPABILITIES) int has = zmq_has (feature.c_str ()); if (has == 1) yesno = true; else yesno = false; #else // assuming if dont have caps, that we dont have the feature yesno = false; #endif return yesno; } #if 0 %!test %! ipc = zmq_has ("ipc"); %! assert (~isempty (ipc)); %!error <Invalid call to zmq_has> zmq_has() %!error <Invalid call to zmq_has> zmq_has(1) %!error <Invalid call to zmq_has> zmq_has("ipc", "ipc") #endif �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnu-octave-octave-zeromq-ffe3cf0/src/m4/������������������������������������������������������������0000775�0000000�0000000�00000000000�15127471011�0020240�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnu-octave-octave-zeromq-ffe3cf0/src/m4/octave-forge.m4���������������������������������������������0000664�0000000�0000000�00000005760�15127471011�0023073�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Copyright (C) 2017-2018 Olaf Till <i7tiol@t-online.de> # Modifications to print what is searching for by JohnD # # 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 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 # 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 <http://www.gnu.org/licenses/>. # arguments of OF_OCTAVE_ALT_SYMS (see also description of # OF_OCTAVE_LIST_ALT_SYMS below): # # $1: symbol version 1 # $2: symbol version 2 # $3: test for symbol version 2 # $4: macro name to access alternative symbols # $5: include directives for symbol version 1 # $6: include directives for symbol version 2 # (a list of lists of args 1--6 is $1 of OF_OCTAVE_LIST_ALT_SYMS) # $7: name of generated include file with alternatives of Octave headers # (arg7 is $2 of OF_OCTAVE_LIST_ALT_SYMS) AC_DEFUN([OF_OCTAVE_ALT_SYMS], [ AC_MSG_CHECKING([$1 or $2]) AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[#include <octave/oct.h>] $6], [$3])], [AC_DEFINE($4, [[$2]], [macro for alternative Octave symbols]) AC_MSG_RESULT([$2]) echo '$6' >> $7], [AC_DEFINE($4, [[$1]], [macro for alternative Octave symbols]) AC_MSG_RESULT([$1]) echo '$5' >> $7] ) ]) # OF_OCTAVE_LIST_ALT_SYMS is called in the following way: # # OF_OCTAVE_LIST_ALT_SYMS([ # [dnl # [old_octave_symbol], # [new_octave_symbol], # [[compilation test] # [for new_octave_symbol]], # [NAME_OF_GENERATED_MACRO____WILL_EXPAND_TO_OLD_OR_NEW_SYMBOL], # [[include directives] # [except #include <octave/oct.h>] # [necessary to compile with old_octave_symbol]], # [[include directives] # [except #include <octave/oct.h>] # [nessary to compile with new_octave_symbol] # [and to compile the test]] # ], # # ... further such lists as the above # # ], # # [name-of-header-file-for-alternative-octave-iclude-directives.h]) # # # This file should be put into src/m4/, and the line # # AC_CONFIG_MACRO_DIRS([m4]) # # should be put into src/configure.ac. The package should use # autoheader to generate config.h.in (src/bootstrap should contain the # lines 'aclocal', 'autoconf', and 'autoheader -f'). Package code # should include config.h and use the generated macros to access the # alternative symbols of Octave. An example of a call to # OF_OCTAVE_LIST_ALT_SYMS in src/configure.ac is available together # with this file. AC_DEFUN([OF_OCTAVE_LIST_ALT_SYMS], [ echo '/* generated by configure */' > $2 m4_foreach([it], [$1], [m4_apply([OF_OCTAVE_ALT_SYMS], [it, $2])]) AH_BOTTOM([#include "$2"]) ]) ����������������gnu-octave-octave-zeromq-ffe3cf0/src/pkglock.cc�����������������������������������������������������0000664�0000000�0000000�00000002667�15127471011�0021674�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// Copyright (C) 2019 John Donoghue <john.donoghue@ieee.org> // // 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 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 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 <http://www.gnu.org/licenses/>. #include <octave/oct.h> #include <octave/ov.h> #include <octave/defun-dld.h> #ifdef HAVE_CONFIG_H # include "config.h" #endif // PKG_ADD: autoload ("__zeromq_pkg_lock__", which ("zeromq")); // PKG_ADD: __zeromq_pkg_lock__(1); // PKG_DEL: __zeromq_pkg_lock__(0); #ifdef DEFMETHOD_DLD DEFMETHOD_DLD (__zeromq_pkg_lock__, interp, args, , "internal function") { octave_value retval; if (args.length () >= 1) { if (args(0).int_value () == 1) interp.mlock(); else if (args(0).int_value () == 0 && interp.mislocked("__zeromq_pkg_lock__")) interp.munlock("__zeromq_pkg_lock__"); } return retval; } #else DEFUN_DLD(__zeromq_pkg_lock__, args, , "internal function") { octave_value retval; return retval; } #endif �������������������������������������������������������������������������gnu-octave-octave-zeromq-ffe3cf0/src/poll.cc��������������������������������������������������������0000664�0000000�0000000�00000011532�15127471011�0021177�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// Copyright (C) 2016-2018 John Donoghue <john.donoghue@ieee.org> // // 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 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 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 <http://www.gnu.org/licenses/>. // Octave Includes #include <octave/oct.h> #include <octave/defun-dld.h> #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "socket_class.h" // zeromq includes #include <zmq.h> #if ZMQ_VERSION < ZMQ_MAKE_VERSION(3,0,0) #define TIMESCALE 1000 #else #define TIMESCALE 1 #endif // PKG_ADD: autoload ("zmq_poll", "zeromq.oct"); DEFUN_DLD (zmq_poll, args, nargout, "-*- texinfo -*-\n \ @deftypefn {} {@var{havedata} =} zmq_poll (@var{sock}, @var{timeout})\n \ @deftypefnx {} {@var{indexlist} =} zmq_poll (@var{socklist}, @var{timeout})\n \ \n\ Wait up to timeout time for received data on socket.\n \ \n \ @subsubheading Inputs\n \ @var{sock} - the socket to wait on.\n \ \n \ @var{socklist} - the array of sockets to wait on.\n \ \n \ @var{timeout} - timeout time in milliseconds.\n \ A value of 0 will return without waiting. A value of -1 will wait until there is data.\n \ \n \ @subsubheading Outputs\n \ @var{havedata} - value of 1 if have data.\n \ \n \ @var{indexlist} - cell array of indexes to sockets that have data.\n \ \n \ @seealso {zmq_socket}\n \ \n \ @end deftypefn") { if (args.length () < 2) { print_usage (); return octave_value (); } if(!args (1).OV_ISINTEGER () && !args (1).OV_ISFLOAT ()) { error ("zeromq: expected time as integer or float type"); } int time = args (1).int_value (); if (time < -1) { error ("zeromq: unexpected negative time"); } octave_value_list return_list; int sockcount = 0; if(args (0).type_id () == octave_zeromq_socket::static_type_id ()) { sockcount = 1; } else if(args (0).OV_ISCELL ()) { sockcount = args (0).cell_value ().numel (); } else { error ("zeromq: expected argument of octave_zeromq_socket or array of octave_zeromq_socket"); } //zmq_pollitem_t * pitem = new zmq_pollitem_t[sockcount]; OCTAVE_LOCAL_BUFFER (zmq_pollitem_t, pitem, sockcount); if (pitem == NULL) { error ("zeromq: couldnt allocate poll item memory"); } if(args (0).type_id () == octave_zeromq_socket::static_type_id ()) { octave_zeromq_socket * sock = NULL; sock = dynamic_cast<octave_zeromq_socket*>(args (0).internal_rep ()); pitem[0].socket = sock->socket (); pitem[0].events = ZMQ_POLLIN; pitem[0].fd = 0; } else { int usedcount = 0; octave_zeromq_socket * sock = NULL; Cell cell = args (0).cell_value (); for(int i=0;i<sockcount;i++) { if(cell(i).type_id () == octave_zeromq_socket::static_type_id ()) { sock = dynamic_cast<octave_zeromq_socket*>(cell (i).internal_rep ()); pitem[usedcount].socket = sock->socket (); pitem[usedcount].events = ZMQ_POLLIN; pitem[usedcount].fd = 0; ++ usedcount; } } sockcount = usedcount; } if (sockcount == 0) { error ("zeromq: expected argument of octave_zeromq_socket or array of octave_zeromq_socket"); } int have_data = 0; int waittime; do { if(time > 1000 || time == -1) waittime = 1000; else waittime = time; have_data = zmq_poll (pitem, sockcount, waittime*TIMESCALE); if(waittime != -1) time -= waittime; OCTAVE_QUIT; } while (have_data == 0 && time > 0); if(have_data > 0) { if(args (0).type_id () == octave_zeromq_socket::static_type_id ()) { return_list (0) = 1; } else { Cell cells (dim_vector (1, have_data)); int cell_pos = 0; for (int i=0;i<sockcount;i++) { if ((pitem[i].revents & ZMQ_POLLIN) && (cell_pos < have_data)) { cells (cell_pos) = (i+1); ++ cell_pos; } } return_list (0) = cells; } } else { if(args (0).type_id () == octave_zeromq_socket::static_type_id ()) { return_list (0) = octave_value(0); } else { return_list (0) = Cell (dim_vector (0,0)); } } return return_list; } #if 0 %!error <Invalid call to zmq_poll> zmq_poll() %!error <Invalid call to zmq_poll> zmq_poll(1) %!test %! s = zmq_socket("ZMQ_SUB"); %! zmq_poll(s, 0); %! zmq_close(s); #endif ����������������������������������������������������������������������������������������������������������������������������������������������������������������������gnu-octave-octave-zeromq-ffe3cf0/src/properties.cc��������������������������������������������������0000664�0000000�0000000�00000010765�15127471011�0022434�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// Copyright (C) 2017-2018 John Donoghue <john.donoghue@ieee.org> // // 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 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 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 <http://www.gnu.org/licenses/>. // Octave Includes #include <octave/oct.h> #include <octave/defun-dld.h> #include <octave/oct-map.h> #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "socket_class.h" #include <zmq.h> // PKG_ADD: autoload ("__zmq_properties__", "zeromq.oct"); DEFUN_DLD (__zmq_properties__, args, nargout, "-*- texinfo -*-\n\ @deftypefn {} {} __zmq_properties__ (@var{sock} ...)\n \ \n\ Internal function to get properties from a zmq socket\ @end deftypefn") { octave_value_list ret; init_types (); if (args.length () < 1 || args.length() > 3 || args (0).type_id () != octave_zeromq_socket::static_type_id ()) { print_usage (); return octave_value (-1); } octave_zeromq_socket * sock = NULL; const octave_base_value& rep = args (0).get_rep (); sock = &((octave_zeromq_socket &)rep); if (args.length () == 1) { // get all octave_map props; props.assign ("endpoint", octave_value (sock->getendpoint ())); props.assign ("type", octave_value (sock->gettypestr ())); octave_value_list ovl; ovl (0) = args (0); ovl (1) = ZMQ_IDENTITY; props.assign ("identity", OCTAVE__FEVAL (std::string ("zmq_getsockopt"), ovl, 1)); ovl (0) = args (0); ovl (1) = ZMQ_RCVMORE; props.assign ("recvmore", OCTAVE__FEVAL (std::string ("zmq_getsockopt"), ovl, 1)); ovl (0) = args (0); ovl (1) = ZMQ_EVENTS; props.assign ("events", OCTAVE__FEVAL (std::string ("zmq_getsockopt"), ovl, 1)); ret = octave_value (props); } else if (args.length() == 2) { // get std::string prop = args (1).string_value (); std::transform (prop.begin (), prop.end (), prop.begin (), ::tolower); if (prop == "endpoint") ret = octave_value (sock->getendpoint ()); else if(prop == "type") ret = octave_value (sock->gettypestr ()); else if(prop == "identity") { octave_value_list ovl; ovl (0) = args (0); ovl (1) = ZMQ_IDENTITY; ret = OCTAVE__FEVAL (std::string ("zmq_getsockopt"), ovl, 1); } else if (prop == "recvmore") { octave_value_list ovl; ovl (0) = args (0); ovl (1) = ZMQ_RCVMORE; ret = OCTAVE__FEVAL (std::string ("zmq_getsockopt"), ovl, 1); } else if (prop == "events") { octave_value_list ovl; ovl (0) = args (0); ovl (1) = ZMQ_EVENTS; ret = OCTAVE__FEVAL (std::string ("zmq_getsockopt"), ovl, 1); } else error ("__zmq_properties__ unknown property '%s'", prop.c_str ()); } else if (args.length () == 3) { // set std::string prop = args (1).string_value (); std::transform (prop.begin (), prop.end (), prop.begin (), ::tolower); if(prop == "identity") { octave_value_list ovl; ovl (0) = args (0); ovl (1) = ZMQ_IDENTITY; ovl (2) = args (2); ret = OCTAVE__FEVAL (std::string ("zmq_setsockopt"), ovl, 1); } else error ("__zmq_properties__ unknown/unsettable property '%s'", prop.c_str ()); } return ret; } #if 0 %!test %! a = zmq_socket(); %! %! props = __zmq_properties__(a); %! assert(props.type, "ZMQ_PUB") %! %! assert(__zmq_properties__(a, "type"), "ZMQ_PUB") %! assert(__zmq_properties__(a, "recvmore"), 0) %! %! fail ("__zmq_properties__ (a,'invalid')", "unknown property"); %! %! id = uint8([ 1, 2, 3 ]); %! __zmq_properties__(a, "identity", id); %! assert(__zmq_properties__(a, "identity"), id); %! id = uint8([ 1, 2, 3, 4 ]); %! a.identity = id; %! assert(__zmq_properties__(a, "identity"), id); %! assert (isa (a, 'octave_zeromq_socket')) %! zmq_close(a); %!error <Invalid call to __zmq_properties__> __zmq_properties__ () %!error <Invalid call to __zmq_properties__> __zmq_properties__ () #endif �����������gnu-octave-octave-zeromq-ffe3cf0/src/recv.cc��������������������������������������������������������0000664�0000000�0000000�00000006076�15127471011�0021177�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// Copyright (C) 2016-2018 John Donoghue <john.donoghue@ieee.org> // // 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 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 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 <http://www.gnu.org/licenses/>. // Octave Includes #include <octave/oct.h> #include <octave/Array.h> #include <octave/defun-dld.h> #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "socket_class.h" // PKG_ADD: autoload ("zmq_recv", "zeromq.oct"); DEFUN_DLD (zmq_recv, args, nargout, "-*- texinfo -*-\n \ @deftypefn {} {@var{data} =} zmq_recv (@var{sock}, @var{len})\n \ @deftypefnx {} {@var{data} =} zmq_recv (@var{sock}, @var{len}, @var{flags})\n \ \n\ Attempt to receive up to @var{len} bytes of data from zeromq socket.\n \ \n \ @subsubheading Inputs\n \ @var{sock} - the socket to receive from.\n \ \n \ @var{len} - number of bytes to read.\n \ \n \ @var{flags} - optional flags to pass to recv\n \ \n \ @subsubheading Outputs\n \ @var{data} - the read data in an uint8 array. \ \n \ @seealso{zmq_socket}\n \ @end deftypefn") { init_types (); if (args.length () < 2 || args (0).type_id () != octave_zeromq_socket::static_type_id () || (!args (1).OV_ISINTEGER () && !args (1).OV_ISFLOAT ())) { print_usage (); return octave_value (-1); } int len = args (1).int_value (); if (len <= 0) { error ("zeromq: unexpected zero or negative length"); return octave_value (-1); } int flags = 0; if (args.length () > 2) { if (args (2).OV_ISINTEGER () && !args(2).OV_ISFLOAT ()) { print_usage (); return octave_value (-1); } flags = args (2).int_value (); } //unsigned char* buf = new unsigned char[ len ]; OCTAVE_LOCAL_BUFFER(unsigned char, buf, len); if (buf == 0) { error ("zeromq: error allocating buffer for recv\n"); return octave_value (-1); } octave_zeromq_socket * sock = NULL; const octave_base_value& rep = args (0).get_rep (); sock = &((octave_zeromq_socket &)rep); int read = sock->recv (buf,len,flags); octave_value return_value; if (read >= 0) { uint8NDArray data( dim_vector (1,read) ); for (int i=0; i<read; i++) data (i) = buf[i]; return_value = data; } else { return_value = uint8NDArray (dim_vector (1,0)); } return return_value; } #if 0 %!error <Invalid call to zmq_recv> zmq_recv() %!error <Invalid call to zmq_recv> zmq_recv(1) %!test %! s = zmq_socket("ZMQ_SUB"); %! assert(!isempty(s)) %! data = zmq_recv(s, 10, ZMQ_DONTWAIT); %! assert(length(data), 0) %! zmq_close(s); #endif ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnu-octave-octave-zeromq-ffe3cf0/src/send.cc��������������������������������������������������������0000664�0000000�0000000�00000005713�15127471011�0021166�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// Copyright (C) 2016-2018 John Donoghue <john.donoghue@ieee.org> // // 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 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 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 <http://www.gnu.org/licenses/>. // Octave Includes #include <octave/oct.h> #include <octave/Array.h> #include <octave/defun-dld.h> #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "socket_class.h" // PKG_ADD: autoload ("zmq_send", "zeromq.oct"); DEFUN_DLD (zmq_send, args, nargout, "-*- texinfo -*-\n \ @deftypefn {} {@var{count} =} zmq_send (@var{sock}, @var{data})\n \ @deftypefnx {} {@var{count} =} zmq_send (@var{sock}, @var{data}, @var{flags})\n \ \n\ Attempt to send to @var{data} bytes of data to zeromq socket.\n \ \n \ @subsubheading Inputs\n \ @var{sock} - the socket to receive from.\n \ \n \ @var{data} - data to send - either string or uint8 type.\n \ \n \ @var{flags} - optional flags to pass to send\n \ \n \ @subsubheading Outputs\n \ @var{count} - number of bytes written to socket, or -1 on error.\n \ \n \ @seealso {zmq_socket}\n \ @end deftypefn") { init_types (); if (args.length () < 2 || args(0).type_id () != octave_zeromq_socket::static_type_id ()) { print_usage (); return octave_value (-1); } int flags = 0; if (args.length () > 2) { if (args(2).OV_ISINTEGER () && !args(2).OV_ISFLOAT ()) { print_usage (); return octave_value (-1); } flags = args(2).int_value (); } octave_zeromq_socket * sock = NULL; const octave_base_value& rep = args (0).get_rep (); sock = &((octave_zeromq_socket &)rep); int retval = -1; if (args (1).is_string ()) { retval = sock->send (args (1).string_value (), flags); } else if(args(1).is_uint8_type ()) { NDArray data = args (1).array_value (); //uint8_t * buf = new uint8_t[data.numel ()]; OCTAVE_LOCAL_BUFFER (uint8_t, buf, data.numel ()); if (!buf) error ("zeromq: could allocate memory for send message.\n"); else { for(int i=0; i<data.numel (); i++) buf[i] = data(i); retval = sock->send (buf, data.numel (), flags); } } else { error ("zeromq: invalid data type. Must be a string or uint8 data"); } return octave_value (retval); } #if 0 %!error <Invalid call to zmq_send> zmq_send() %!error <Invalid call to zmq_send> zmq_send(1) %!test %! s = zmq_socket("ZMQ_PUB"); %! assert(!isempty(s)) %! assert(zmq_send(s, "test"), 4); %! zmq_close(s); #endif �����������������������������������������������������gnu-octave-octave-zeromq-ffe3cf0/src/setsockopt.cc��������������������������������������������������0000664�0000000�0000000�00000025745�15127471011�0022442�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// Copyright (C) 2016-2020 John Donoghue <john.donoghue@ieee.org> // // 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 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 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 <http://www.gnu.org/licenses/>. // Octave Includes #include <octave/oct.h> #include <octave/defun-dld.h> #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "socket_class.h" #include <zmq.h> // PKG_ADD: autoload ("zmq_setsockopt", "zeromq.oct"); DEFUN_DLD (zmq_setsockopt, args, nargout, "-*- texinfo -*-\n\ @deftypefn {} {@var{status} =} zmq_setsockopt (@var{sock}, @var{optionid}, @var{value})\n \ \n\ Set a socket option on a zeromq socket.\n \ \n \ @subsubheading Inputs\n \ @var{sock} - the socket to connect.\n \ \n\ @var{optionid} - the setsockopt option to set.\n \ \n\ @var{value} - the value to set.\n \ \n \ Known valid @var{optionid}s are:\n \ @table @asis\n \ @item @code{ZMQ_SUBSCRIBE}\n \ Subscribe to incoming messages matching the value. The value is either a string or a uint8 array that\n \ must match the start of any incoming message\n \ @item @code{ZMQ_UNSUBSCRIBE}\n \ Unsubscribe from incoming messages\n \ @item @code{ZMQ_CONNECT_TIMEOUT}\n \ Set timeout for connect calls\n \ @item @code{ZMQ_IDENTITY} or @code{ZMQ_ROUTING_ID}\n \ Set the identity of a socket (string or uint8 data)\n \ @item @code{ZMQ_RATE}\n \ Set the multicast data rate\n \ @item @code{ZMQ_PRIORITY}\n \ Set the socket priority (linux only)\n \ @item @code{ZMQ_BACKLOG}\n \ Set the queue length for incoming connections\n \ @item @code{ZMQ_SOCKS_PROXY}\n \ Set the socks5 proxy value (string)\n \ @item @code{ZMQ_CURVE_SERVER}\n \ Set whether socket is a curve server (1) or not (0)\n \ @item @code{ZMQ_CURVE_PRIVATEKEY}\n \ Set the curve socket private key (string)\n \ @item @code{ZMQ_CURVE_PUBLICKEY}\n \ Set the curve socket public key (string)\n \ @item @code{ZMQ_CURVE_SERVERKEY}\n \ Set the curve socket public key (string)\n \ @item @code{ZMQ_PLAIN_SERVER}\n \ Set whether socket server will use plain authentication (1) or not (0)\n \ @item @code{ZMQ_PLAIN_USERNAME}\n \ Set the plain socket username (string)\n \ @item @code{ZMQ_PLAIN_PASSWORD}\n \ Set the plain socket password (string)\n \ @item @code{ZMQ_GSSAPI_SERVER}\n \ Set whether socket server will use gssapi authentication (1) or not (0)\n \ @item @code{ZMQ_GSSAPI_PLAINTEXT}\n \ Set whether socket will encrypt gssapi authentication (1) or not (0)\n \ @item @code{ZMQ_GSSAPI_PRINCIPAL}\n \ Set the name of the gssapi principal (string)\n \ @item @code{ZMQ_GSSAPI_SERVICE_PRINCIPAL}\n \ Set the name of the gssapi service principal (string)\n \ @end table\n \ \n \ @subsubheading Outputs\n \ @var{status} - status for setsockopt.\n \ On success, setsockopt will return @var{status} of true \n \ \n \ @seealso {zmq_getsockopt, ZMQ_SUBSCRIBE, ZMQ_UNSUBSCRIBE, ZMQ_CONNECT_TIMEOUT}\n \ @end deftypefn") { init_types (); if (args.length () != 3 || args (0).type_id () != octave_zeromq_socket::static_type_id ()) { print_usage (); return octave_value (false); } if (args (1).OV_ISINTEGER () && !args (1).OV_ISFLOAT ()) { print_usage (); return octave_value (false); } octave_zeromq_socket * sock = NULL; const octave_base_value& rep = args (0).get_rep (); sock = &((octave_zeromq_socket &)rep); int opt = args (1).int_value (); bool ret = false; std::string strvalue; uint8_t binvalue[256]; size_t binsize; switch(opt) { case ZMQ_SUBSCRIBE: if( !args (2).is_string ()) { error("zeromq: expected string for option value"); return octave_value (false); } strvalue = args (2).string_value (); ret = sock->setsockopt (opt, strvalue.c_str (), strvalue.length ()); break; case ZMQ_UNSUBSCRIBE: ret = sock->setsockopt (opt, 0,0); break; #if ZMQ_VERSION >= ZMQ_MAKE_VERSION(4,2,0) case ZMQ_CONNECT_TIMEOUT: if (args (2).OV_ISINTEGER () && !args (2).OV_ISFLOAT ()) { error("zeromq: expected integer parameter"); return octave_value (false); } else { int value = args (2).int_value (); ret = sock->setsockopt (opt, &value, sizeof(value)); } break; #endif #ifdef ZMQ_SOCKS_PROXY case ZMQ_SOCKS_PROXY: if (args (2).is_string ()) { strvalue = args (2).string_value (); } else { error("zeromq: expected string option value"); return octave_value (false); } ret = sock->setsockopt (opt, strvalue.c_str(), strvalue.length()); break; #endif #ifdef ZMQ_CURVE_SERVER case ZMQ_CURVE_SERVER: if (args (2).OV_ISINTEGER () && !args (2).OV_ISFLOAT ()) { error("zeromq: expected integer parameter"); return octave_value (false); } else { int value = args (2).int_value (); ret = sock->setsockopt (opt, &value, sizeof(value)); } break; #endif #ifdef ZMQ_CURVE_PUBLICKEY case ZMQ_CURVE_PUBLICKEY: if (args (2).is_string ()) { strvalue = args (2).string_value (); } else { error("zeromq: expected string for option value"); return octave_value (false); } ret = sock->setsockopt (opt, strvalue.c_str(), strvalue.length()); break; #endif #ifdef ZMQ_CURVE_SECRETKEY case ZMQ_CURVE_SECRETKEY: if (args (2).is_string ()) { strvalue = args (2).string_value (); } else { error("zeromq: expected string option value"); return octave_value (false); } ret = sock->setsockopt (opt, strvalue.c_str(), strvalue.length()); break; #endif #ifdef ZMQ_CURVE_SERVERKEY case ZMQ_CURVE_SERVERKEY: if (args (2).is_string ()) { strvalue = args (2).string_value (); } else { error("zeromq: expected string option value"); return octave_value (false); } ret = sock->setsockopt (opt, strvalue.c_str(), strvalue.length()); break; #endif #ifdef ZMQ_PLAIN_SERVER case ZMQ_PLAIN_SERVER: if (args (2).OV_ISINTEGER () && !args (2).OV_ISFLOAT ()) { error("zeromq: expected integer parameter"); return octave_value (false); } else { int value = args (2).int_value (); ret = sock->setsockopt (opt, &value, sizeof(value)); } break; #endif #ifdef ZMQ_PLAIN_USERNAME case ZMQ_PLAIN_USERNAME: if (args (2).is_string ()) { strvalue = args (2).string_value (); } else { error("zeromq: expected string for option value"); return octave_value (false); } ret = sock->setsockopt (opt, strvalue.c_str(), strvalue.length()); break; #endif #ifdef ZMQ_PLAIN_PASSWORD case ZMQ_PLAIN_PASSWORD: if (args (2).is_string ()) { strvalue = args (2).string_value (); } else { error("zeromq: expected string for option value"); return octave_value (false); } ret = sock->setsockopt (opt, strvalue.c_str(), strvalue.length()); break; #endif #ifdef ZMQ_GSSAPI_SERVER case ZMQ_GSSAPI_SERVER: if (args (2).OV_ISINTEGER () && !args (2).OV_ISFLOAT ()) { error("zeromq: expected integer parameter"); return octave_value (false); } else { int value = args (2).int_value (); ret = sock->setsockopt (opt, &value, sizeof(value)); } break; #endif #ifdef ZMQ_GSSAPI_PLAINTEXT case ZMQ_GSSAPI_PLAINTEXT: if (args (2).OV_ISINTEGER () && !args (2).OV_ISFLOAT ()) { error("zeromq: expected integer parameter"); return octave_value (false); } else { int value = args (2).int_value (); ret = sock->setsockopt (opt, &value, sizeof(value)); } break; #endif #ifdef ZMQ_GSSAPI_PRINCIPAL case ZMQ_GSSAPI_PRINCIPAL: if (args (2).is_string ()) { strvalue = args (2).string_value (); } else { error("zeromq: expected string for option value"); return octave_value (false); } ret = sock->setsockopt (opt, strvalue.c_str(), strvalue.length()); break; #endif #ifdef ZMQ_GSSAPI_SERVICE_PRINCIPAL case ZMQ_GSSAPI_SERVICE_PRINCIPAL: if (args (2).is_string ()) { strvalue = args (2).string_value (); } else { error("zeromq: expected string for option value"); return octave_value (false); } ret = sock->setsockopt (opt, strvalue.c_str(), strvalue.length()); break; #endif #ifdef ZMQ_PRIORITY case ZMQ_PRIORITY: if (args (2).OV_ISINTEGER () && !args (2).OV_ISFLOAT ()) { error("zeromq: expected integer parameter"); return octave_value (false); } else { int value = args (2).int_value (); ret = sock->setsockopt (opt, &value, sizeof(value)); } break; #endif #ifdef ZMQ_RATE case ZMQ_RATE: if (args (2).OV_ISINTEGER () && !args (2).OV_ISFLOAT ()) { error("zeromq: expected integer parameter"); return octave_value (false); } else { int value = args (2).int_value (); ret = sock->setsockopt (opt, &value, sizeof(value)); } break; #endif #ifdef ZMQ_BACKLOG case ZMQ_BACKLOG: if (args (2).OV_ISINTEGER () && !args (2).OV_ISFLOAT ()) { error("zeromq: expected integer parameter"); return octave_value (false); } else { int value = args (2).int_value (); ret = sock->setsockopt (opt, &value, sizeof(value)); } break; #endif #ifdef ZMQ_ROUING_ID case ZMQ_ROUTING_ID: #else case ZMQ_IDENTITY: #endif if (args (2).is_string ()) { strvalue = args (2).string_value (); binsize = strvalue.length (); if (binsize > 255) binsize = 255; for (size_t i=0; i<binsize; i++) { binvalue[i] = strvalue[i]; } } else if (args(2).is_uint8_type ()) { NDArray data = args (2).array_value (); binsize = data.numel (); if (binsize > 255) binsize = 255; for (size_t i=0; i<binsize; i++) { binvalue[i] = data (i); } } else { error("zeromq: expected string or uint8 for option value"); return octave_value (false); } ret = sock->setsockopt (opt, binvalue, binsize); break; default: error ("zeromq: invalid setsockopt value %d", opt); break; } return octave_value (ret); } #if 0 %!error <Invalid call to zmq_setsockopt> zmq_setsockopt() %!error <Invalid call to zmq_setsockopt> zmq_setsockopt(1) // valid test of setsockopt in getsockopt #endif ���������������������������gnu-octave-octave-zeromq-ffe3cf0/src/socket.cc������������������������������������������������������0000664�0000000�0000000�00000006250�15127471011�0021522�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// Copyright (C) 2014-2018 John Donoghue <john.donoghue@ieee.org> // // 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 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 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 <http://www.gnu.org/licenses/>. // Octave Includes #include <octave/oct.h> #include <octave/defun-dld.h> #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "socket_class.h" // zeromq includes #include <zmq.h> // PKG_ADD: autoload ("zmq_socket", "zeromq.oct"); DEFUN_DLD (zmq_socket, args, nargout, "-*- texinfo -*-\n\ @deftypefn {} {@var{sock} =} zmq_socket (@var{type})\n \ \n\ Create a zeromq socket.\n \ \n \ @subsubheading Inputs\n \ @var{type} - the socket type to create.\n \ \n \ Supported socket types are:\n \ @table @asis\n \ @item @code{ZMQ_PUB} \n \ Publish socket\n \ @item @code{ZMQ_SUB} \n \ Subscribe socket\n \ @item @code{ZMQ_REQ} \n \ Request socket\n \ @item @code{ZMQ_REP} \n \ Reply socket\n \ @item @code{ZMQ_PULL} \n \ Pull socket\n \ @item @code{ZMQ_PUSH} \n \ Push socket\n \ @item @code{ZMQ_PAIR} \n \ Pair socket\n \ @item @code{ZMQ_DEALER}\n \ Dealer socket\n \ @item @code{ZMQ_ROUTER}\n \ Router socket\n \ @item @code{ZMQ_XPUB} \n \ Publish socket\n \ @item @code{ZMQ_XSUB} \n \ Subscribe socket\n \ @item @code{ZMQ_STREAM} \n \ Stream socket\n \ @end table\n \ \n \ @subsubheading Outputs\n \ @var{sock} - an instance of @var{octave_zeromq_socket} class.\n \ \n \ @seealso {ZMQ_PUB, ZMQ_SUB, ZMQ_PUSH, ZMQ_PULL, ZMQ_REQ, ZMQ_REP, ZMQ_PAIR, ZMQ_DEALER, ZMQ_ROUTER, ZMQ_XPUB, ZMQ_XSUB, ZMQ_STREAM}\n \ @end deftypefn") { if (nargout != 1) { print_usage (); return octave_value (); } int socktype = ZMQ_PUB; if (args.length () > 0) { if (args (0).OV_ISINTEGER () || args (0).OV_ISFLOAT ()) { socktype = args (0).int_value (); } else if (args (0).is_string ()) { socktype = octave_zeromq_socket::gettypeval(args (0).string_value ()); } else { print_usage (); return octave_value (); } } init_types (); octave_zeromq_socket * retvalue = new octave_zeromq_socket (); if ( retvalue->create (socktype) == false ) { delete retvalue; return octave_value (); } return octave_value (retvalue); } #if 0 %!error <Invalid call to zmq_socket> zmq_socket() %!test %! s = zmq_socket(); %! assert(!isempty(s)) %! zmq_close(s); %!test %! s = zmq_socket(ZMQ_SUB); %! assert(!isempty(s)) %! zmq_close(s); %!test %! s = zmq_socket(ZMQ_SUB); %! assert(isa(s, 'octave_zeromq_socket')) %! zmq_close(s); %!test %! s = zmq_socket("ZMQ_SUB"); %! assert(!isempty(s)) %! zmq_close(s); %!error <unknown socktype> a = zmq_socket("invalid"); #endif ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnu-octave-octave-zeromq-ffe3cf0/src/socket_class.cc������������������������������������������������0000664�0000000�0000000�00000026626�15127471011�0022720�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// Copyright (C) 2014-2018 John Donoghue <john.donoghue@ieee.org> // // 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 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 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 <http://www.gnu.org/licenses/>. // Octave Includes #include <octave/oct.h> #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "socket_class.h" // zeromq includes #include <zmq.h> #if ZMQ_VERSION < ZMQ_MAKE_VERSION(3,0,0) #define RECV_POLL_TIME 1000 #else #define RECV_POLL_TIME 100 #endif static void * global_context = NULL; #ifdef DEFINE_OCTAVE_ALLOCATOR DEFINE_OCTAVE_ALLOCATOR (octave_zeromq_socket); #endif DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_zeromq_socket, "octave_zeromq_socket", "octave_zeromq_socket"); octave_zeromq_socket::octave_zeromq_socket (void) : fieldnames(5) { sock = 0; type = -1; fieldnames[0] = "type"; fieldnames[1] = "endpoint"; fieldnames[2] = "identity"; fieldnames[3] = "recvmore"; fieldnames[4] = "events"; } octave_zeromq_socket::octave_zeromq_socket (const octave_zeromq_socket &s) { // should never be called sock = 0; type = s.type; fieldnames = s.fieldnames; } octave_zeromq_socket::~octave_zeromq_socket(void) { close (); } octave_base_value * octave_zeromq_socket::empty_clone (void) const { return new octave_zeromq_socket(); } octave_base_value * octave_zeromq_socket::clone (void) const { return new octave_zeromq_socket (*this); } octave_base_value * octave_zeromq_socket::unique_clone (void) { OV_COUNT++; return this; } void * octave_zeromq_socket::socket (void) { return sock; } const void * octave_zeromq_socket::socket (void) const { return sock; } int octave_zeromq_socket::socktype (void) const { return type; } bool octave_zeromq_socket::create (int socket_type) { if (sock) { error ("zeromq: Already created\n"); return false; } sock = zmq_socket (global_context, socket_type); if (sock == 0) { error ("zeromq: failed to create socket - %s\n", zmq_strerror (errno)); return false; } type = socket_type; return true; } void octave_zeromq_socket::close (void) { if (sock) zmq_close (sock); sock = 0; type = -1; endpoint = ""; } bool octave_zeromq_socket::connect (const std::string &inendpoint) { if (sock == 0) { error ("zeromq: must create socket before calling connect\n"); return false; } if (zmq_connect (sock, inendpoint.c_str ()) != 0) { error ("zeromq: failed to connect socket - %s\n", zmq_strerror (errno)); return false; } endpoint = inendpoint; return true; } bool octave_zeromq_socket::disconnect (const std::string &inendpoint) { #if ZMQ_VERSION < ZMQ_MAKE_VERSION(3,0,0) warning ("zeromq: this version of the zmq library does not support disconnect"); #else if (sock == 0) { error ("zeromq: must create socket before calling disconnect\n"); return false; } if (zmq_disconnect (sock, inendpoint.c_str ()) != 0) { error ("zeromq: failed to disconnect socket - %s\n", zmq_strerror (errno)); return false; } #endif return true; } bool octave_zeromq_socket::bind (const std::string &inendpoint) { if (sock == 0) { error ("zeromq: must create socket before calling bind\n"); return false; } if (zmq_bind (sock, inendpoint.c_str ())) { error ("zeromq: failed to bind socket - %s\n", zmq_strerror (errno)); return false; } endpoint = inendpoint; return true; } bool octave_zeromq_socket::unbind (const std::string &inendpoint) { #if ZMQ_VERSION < ZMQ_MAKE_VERSION(3,0,0) warning ("zeromq: this version of the zmq library does not support unbind"); #else if (sock == 0) { error ("zeromq: must create socket before calling unbind\n"); return false; } if (zmq_unbind (sock, inendpoint.c_str ())) { error ("zeromq: failed to unbind socket - %s\n", zmq_strerror (errno)); return false; } endpoint = ""; #endif return true; } bool octave_zeromq_socket::setsockopt (int opt, const void * val, size_t len) { if (sock == 0) { error ("zeromq: invalid socket\n"); return false; } if (zmq_setsockopt (sock, opt, val, len)) { error ("zeromq: failed to setsockopt - %s\n", zmq_strerror (errno)); return false; } return true; } bool octave_zeromq_socket::getsockopt (int opt, void * val, size_t *len) { if (sock == 0) { error ("zeromq: invalid socket\n"); return false; } if (zmq_getsockopt (sock, opt, val, len)) { error ("zeromq: failed to getsockopt - %s\n", zmq_strerror (errno)); return false; } return true; } int octave_zeromq_socket::send (const std::string &str, int flags) { return send ((const uint8_t *)str.c_str (), str.length (), flags) ; } int octave_zeromq_socket::send (const uint8_t *data, size_t sz, int flags) { if (sock == 0) { error ("zeromq: must create socket before calling send\n"); return -1; } #if ZMQ_VERSION < ZMQ_MAKE_VERSION(3,0,0) zmq_msg_t msg; if(zmq_msg_init_size(&msg,sz)) { error ("zeromq: failed to create msg\n"); return -1; } memcpy(zmq_msg_data(&msg), data, sz); int len = zmq_send (sock, &msg, flags); // zmq 2.2 returns 0 if sent ok, we want bytes written if (len == 0) len = sz; zmq_msg_close(&msg); #else // new versions of zmq have a zmq_send for data int len = zmq_send (sock, data, sz, flags); #endif return len; } int octave_zeromq_socket::recv (uint8_t *data, size_t sz, int flags) { if (sock == 0) { error ("zeromq: must create socket before calling recv\n"); return -1; } // if want to wait for data if ((flags & ZMQ_NOBLOCK) == 0) { int have_data = 0; do { zmq_pollitem_t pitem; pitem.socket = sock; pitem.events = ZMQ_POLLIN; pitem.fd = 0; have_data = zmq_poll (&pitem, 1, RECV_POLL_TIME); OCTAVE_QUIT; } while (have_data == 0); if (have_data == -1) { error ("zeromq: error waiting for data in recv\n"); } } int len = -1; #if ZMQ_VERSION < ZMQ_MAKE_VERSION(3,0,0) zmq_msg_t msg; if (zmq_msg_init (&msg)) { error ("zeromq: failed to create msg\n"); return -1; } len = zmq_recv (sock, &msg, flags); if (len == 0) { len = static_cast<int>(zmq_msg_size(&msg)); if (len > sz) len = sz; memcpy (data, zmq_msg_data (&msg), len); } zmq_msg_close (&msg); #else len = zmq_recv (sock, data, sz, flags); if (len >= 0 && static_cast<size_t>(len) > sz) len = sz; #endif return len; } int octave_zeromq_socket::gettypeval (const std::string &str) { if(str == "ZMQ_PUB") return ZMQ_PUB; if(str == "ZMQ_SUB") return ZMQ_SUB; if(str == "ZMQ_XPUB") return ZMQ_XPUB; if(str == "ZMQ_XSUB") return ZMQ_XSUB; if(str == "ZMQ_REQ") return ZMQ_REQ; if(str == "ZMQ_REP") return ZMQ_REP; if(str == "ZMQ_DEALER") return ZMQ_DEALER; if(str == "ZMQ_PAIR") return ZMQ_PAIR; if(str == "ZMQ_ROUTER") return ZMQ_ROUTER; if(str == "ZMQ_PUSH") return ZMQ_PUSH; if(str == "ZMQ_PULL") return ZMQ_PULL; #ifdef ZMQ_STREAM if(str == "ZMQ_STREAM") return ZMQ_STREAM; #endif error ("octave_zeromq_socket: unknown socktype '%s'", str.c_str ()); return -1; } std::string octave_zeromq_socket::gettypestr (int intype) const { std::string s = ""; if(intype == -1) intype = type; switch(intype) { case ZMQ_PUB: s = "ZMQ_PUB"; break; case ZMQ_SUB: s = "ZMQ_SUB"; break; case ZMQ_XPUB: s = "ZMQ_XPUB"; break; case ZMQ_XSUB: s = "ZMQ_XSUB"; break; case ZMQ_REQ: s = "ZMQ_REQ"; break; case ZMQ_REP: s = "ZMQ_REP"; break; case ZMQ_PUSH: s = "ZMQ_PUSH"; break; case ZMQ_PULL: s = "ZMQ_PULL"; break; case ZMQ_DEALER: s = "ZMQ_DEALER"; break; case ZMQ_PAIR: s = "ZMQ_PAIR"; break; case ZMQ_ROUTER: s = "ZMQ_ROUTER"; break; #ifdef ZMQ_STREAM case ZMQ_STREAM: s = "ZMQ_STREAM"; break; #endif default: s = "NONE"; break; } return s; } void octave_zeromq_socket::print (std::ostream& os, bool pr_as_read_syntax) const { print_raw (os, pr_as_read_syntax); newline (os); } void octave_zeromq_socket::print (std::ostream& os, bool pr_as_read_syntax) { print_raw (os, pr_as_read_syntax); newline (os); } void octave_zeromq_socket::print_raw (std::ostream& os, bool pr_as_read_syntax) const { os << " ZeroMQ socket"; newline (os); if(sock) { os << " type: " << gettypestr(); newline(os); os << " endpoint: " << endpoint; newline(os); } else { os << " Invalid"; newline(os); } } octave_value_list octave_zeromq_socket::subsref (const std::string& type, const std::list<octave_value_list>& idx, int nargout) { octave_value_list retval; int skip = 1; switch (type[0]) { default: error ("octave_zeromq_socket object cannot be indexed with %c", type[0]); break; case '.': { octave_value_list ovl; // inc ref count as assign this to octave_value OV_COUNT++; ovl (0) = octave_value (this); ovl (1) = (idx.front ()) (0); retval = OCTAVE__FEVAL (std::string ("__zmq_properties__"), ovl, 1); } break; } if (idx.size () > 1 && type.length () > 1) retval = retval (0).next_subsref (nargout, type, idx, skip); return retval; } octave_value octave_zeromq_socket::subsasgn (const std::string& type, const std::list<octave_value_list>& idx, const octave_value& rhs) { octave_value retval; switch (type[0]) { default: error ("octave_zeromq_socket object cannot be indexed with %c", type[0]); break; case '.': if (type.length () == 1) { octave_value_list ovl; // inc ref count as assign this to octave_value OV_COUNT++; ovl (0) = octave_value (this); ovl (1) = (idx.front ()) (0); ovl (2) = rhs; OCTAVE__FEVAL (std::string ("__zmq_properties__"), ovl, 0); OV_COUNT++; retval = octave_value (this); } else if (type.length () > 1 && type[1] == '.') { // pass along any further assignments octave_value_list u = subsref (type.substr (0, 1), idx, 1); if (u.length() > 0) { std::list<octave_value_list> next_idx (idx); next_idx.erase (next_idx.begin ()); u (0).subsasgn(type.substr (1), next_idx, rhs); OV_COUNT++; retval = octave_value (this); } } else { error ("octave_zeromq_socket invalid index"); } } return retval; } static bool type_loaded = false; void init_types(void) { if (!type_loaded) { octave_zeromq_socket::register_type (); type_loaded = true; } if (!global_context) { #if ZMQ_VERSION < ZMQ_MAKE_VERSION(3,0,0) global_context = zmq_init (1); #else global_context = zmq_ctx_new (); #endif } } ����������������������������������������������������������������������������������������������������������gnu-octave-octave-zeromq-ffe3cf0/src/socket_class.h�������������������������������������������������0000664�0000000�0000000�00000007535�15127471011�0022560�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// Copyright (C) 2014-2018 John Donoghue <john.donoghue@ieee.org> // // 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 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 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 <http://www.gnu.org/licenses/>. #ifndef ZEROMQ_SOCKET_CLASS_H #define ZEROMQ_SOCKET_CLASS_H // Octave Includes #include <octave/oct.h> #ifdef HAVE_CONFIG_H # include "config.h" #endif // string #include <string> #include <iostream> #include <errno.h> void init_types(void); class octave_zeromq_socket : public OCTAVE_BASE_CLASS { public: /** * default constructor */ octave_zeromq_socket (void); /** * deconstructor */ ~octave_zeromq_socket (void); /** * access to the zeromq socket */ const void * socket (void) const; void * socket (void); std::string getendpoint(void) const { return endpoint; } int socktype (void) const; // convert sock type std::string gettypestr(int intype=-1) const; static int gettypeval(const std::string &str); /** * create socket */ bool create (int socket_type); /** * close created socket */ void close (void); /** * connect socket */ bool connect (const std::string &endpoint); /** * disconnect socket */ bool disconnect (const std::string &endpoint); /** * bind socket */ bool bind (const std::string &endpoint); /** * unbind socket */ bool unbind (const std::string &endpoint); /** * send data of size sz bytes */ int send (const uint8_t * data, size_t sz, int flags); /** * send data string */ int send (const std::string &data, int flags); /** * read data of up to sz bytes in size */ int recv (uint8_t * data, size_t sz, int flags); /** * get/setsock option */ bool setsockopt (int opt, const void * val, size_t len); bool getsockopt (int opt, void *value, size_t *len); /** * Various properties of the octave_base_value datatype. */ bool is_constant (void) const { return true;} bool is_defined (void) const { return true;} bool is_object (void) const { return true; } // required to use subsasn string_vector map_keys (void) const { return fieldnames; } dim_vector dims (void) const { static dim_vector dv(1, 1); return dv; } octave_base_value * clone (void) const; octave_base_value * empty_clone (void) const; octave_base_value * unique_clone (void); /** * Overloaded methods to print sock as the zeromq id */ void print (std::ostream& os, bool pr_as_read_syntax = false) const; void print (std::ostream& os, bool pr_as_read_syntax = false); void print_raw (std::ostream& os, bool pr_as_read_syntax) const; /** * overloaded methods to get properties */ octave_value_list subsref (const std::string& type, const std::list<octave_value_list>& idx, int nargout); octave_value subsref (const std::string& type, const std::list<octave_value_list>& idx) { octave_value_list retval = subsref (type, idx, 1); return (retval.length () > 0 ? retval(0) : octave_value ()); } octave_value subsasgn (const std::string& type, const std::list<octave_value_list>& idx, const octave_value& rhs); private: octave_zeromq_socket (const octave_zeromq_socket &); void * sock; int type; std::string endpoint; string_vector fieldnames; #ifdef DECLARE_OCTAVE_ALLOCATOR DECLARE_OCTAVE_ALLOCATOR #endif DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA }; #endif // ZEROMQ_SOCKET_CLASS_H �������������������������������������������������������������������������������������������������������������������������������������������������������������������gnu-octave-octave-zeromq-ffe3cf0/src/strerror.cc����������������������������������������������������0000664�0000000�0000000�00000002613�15127471011�0022113�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// Copyright (C) 2014-2018 John Donoghue <john.donoghue@ieee.org> // // 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 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 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 <http://www.gnu.org/licenses/>. // Octave Includes #include <octave/oct.h> #include <octave/defun-dld.h> #ifdef HAVE_CONFIG_H # include "config.h" #endif // zeromq includes #include <zmq.h> // PKG_ADD: autoload ("zmq_strerror", "zeromq.oct"); DEFUN_DLD (zmq_strerror, args, nargout, "-*- texinfo -*-\n \ @deftypefn {} {@var{errorstr} =} zmq_strerror ()\n \ \n\ Get the last error from zeromq.\n \ \n \ @subsubheading Inputs\n \ None\n \ @subsubheading Outputs\n \ @var{errorstr} - a string representation of the last error \ \n \ @end deftypefn") { if (args.length () > 0) { print_usage (); return octave_value (-1); } std::string str = zmq_strerror (errno); return octave_value (str); } ���������������������������������������������������������������������������������������������������������������������gnu-octave-octave-zeromq-ffe3cf0/src/unbind.cc������������������������������������������������������0000664�0000000�0000000�00000004132�15127471011�0021506�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// Copyright (C) 2016-2018 John Donoghue <john.donoghue@ieee.org> // // 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 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 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 <http://www.gnu.org/licenses/>. // Octave Includes #include <octave/oct.h> #include <octave/defun-dld.h> #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "socket_class.h" // PKG_ADD: autoload ("zmq_unbind", "zeromq.oct"); DEFUN_DLD (zmq_unbind, args, nargout, "-*- texinfo -*-\n\ @deftypefn {} {@var{status} =} zmq_unbind (@var{sock}, @var{endpoint})\n \ \n\ Unbind a previously bound zeromq socket from a endpoint.\n \ \n \ @subsubheading Inputs\n \ @var{sock} - the socket to unbind.\n \ \n \ @var{endpoint} - the endpoint string to unbind.\n \ \n \ @subsubheading Outputs\n \ @var{status} - status for unbind.\n \ On success, unbind will return a @var{status} of true \n \ \n \ @seealso { zmq_socket, zmq_bind }\n \ @end deftypefn") { init_types (); if (args.length () != 2 || args (0).type_id () != octave_zeromq_socket::static_type_id () || ! args (1).is_string ()) { print_usage (); return octave_value (false); } octave_zeromq_socket * sock = NULL; const octave_base_value& rep = args (0).get_rep (); sock = &((octave_zeromq_socket &)rep); bool ret = sock->unbind (args (1).string_value ()); return octave_value (ret); } #if 0 %!error <Invalid call to zmq_unbind> zmq_unbind() %!error <Invalid call to zmq_unbind> zmq_unbind(1) %!test %! s = zmq_socket("ZMQ_PUB"); %! zmq_bind(s, "tcp://127.0.0.1:10000"); %! zmq_unbind(s, "tcp://127.0.0.1:10000"); %! zmq_close(s); #endif ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnu-octave-octave-zeromq-ffe3cf0/src/undef-ah-octave.h����������������������������������������������0000664�0000000�0000000�00000000706�15127471011�0023042�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* To be included at the top of config.h (by autoheader). Avoid warnings for redefining AH-generated preprocessor symbols of Octave. */ #ifdef PACKAGE_BUGREPORT #undef PACKAGE_BUGREPORT #endif #ifdef PACKAGE_NAME #undef PACKAGE_NAME #endif #ifdef PACKAGE_STRING #undef PACKAGE_STRING #endif #ifdef PACKAGE_TARNAME #undef PACKAGE_TARNAME #endif #ifdef PACKAGE_URL #undef PACKAGE_URL #endif #ifdef PACKAGE_VERSION #undef PACKAGE_VERSION #endif ����������������������������������������������������������gnu-octave-octave-zeromq-ffe3cf0/src/version.cc�����������������������������������������������������0000664�0000000�0000000�00000003306�15127471011�0021716�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// Copyright (C) 2014-2018 John Donoghue <john.donoghue@ieee.org> // // 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 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 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 <http://www.gnu.org/licenses/>. // Octave Includes #include <octave/oct.h> #include <octave/defun-dld.h> #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "socket_class.h" // zeromq includes #include <zmq.h> // PKG_ADD: autoload ("zmq_version", "zeromq.oct"); DEFUN_DLD (zmq_version, args, nargout, "-*- texinfo -*-\n \ @deftypefn {} {[@var{major}, @var{minor}, @var{patch}] =} zmq_version ()\n \ \n\ Get the ZeroMQ library version.\n \ \n \ @subsubheading Inputs\n \ None\n \ @subsubheading Outputs\n \ @var{major}, @var{minor} @var{patch} - version of the ZeroMQ library. \ \n \ @end deftypefn") { if (args.length () > 0) { print_usage (); return octave_value (-1); } int major, minor, patch; zmq_version (&major, &minor, &patch); octave_value_list return_list; return_list (0) = major; return_list (1) = minor; return_list (2) = patch; return return_list; } #if 0 %!test %! [a,b,c] = zmq_version (); %! assert(~isempty(a)); %! assert(~isempty(b)); %! assert(~isempty(c)); #endif ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnu-octave-octave-zeromq-ffe3cf0/src/z85_decode.cc��������������������������������������������������0000664�0000000�0000000�00000005265�15127471011�0022170�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// Copyright (C) 2019 John Donoghue <john.donoghue@ieee.org> // // 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 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 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 <http://www.gnu.org/licenses/>. // Octave Includes #include <octave/oct.h> #include <octave/defun-dld.h> #ifdef HAVE_CONFIG_H # include "config.h" #endif // zeromq includes #include <zmq.h> // PKG_ADD: autoload ("zmq_z85_decode", "zeromq.oct"); DEFUN_DLD (zmq_z85_decode, args, nargout, "-*- texinfo -*-\n \ @deftypefn {} {@var{data} =} zmq_z85_decode (@var{instr})\n \ \n\ Decode a z85 encoded string to a binary key.\n \ \n \ @subsubheading Inputs\n \ @var{instr} - a string encoded data\n \ \n \ @subsubheading Outputs\n \ @var{data} - uint8 decoded data\n \ \n \ @end deftypefn") { octave_value retval; if (args.length () != 1) { print_usage (); return octave_value (); } if(!args(0).is_string ()) { error ("zeromq: expected input to be a string"); return octave_value (); } std::string in = args (0).string_value (); int len = in.length (); if (len % 5 != 0 || len == 0) { error ("zeromq: input string size must be divisible by 5"); return octave_value (); } #ifdef ZMQ_CURVE len = (len/5)*4; OCTAVE_LOCAL_BUFFER (uint8_t, outbuf, len); if (!outbuf) { error ("zeromq: could allocate memory for decoding.\n"); return octave_value (); } else { uint8_t * out = zmq_z85_decode(outbuf, in.c_str()); if (!out) { error ("zeromq: couldn't decode data"); return octave_value (); } uint8NDArray data( dim_vector (1,len) ); for (int i=0; i<len; i++) data (i) = outbuf[i]; retval = data; } #else error ("zeromq: curve functions not implemented by this version of libzmq"); #endif return retval; } #if 0 %!error <Invalid call to zmq_z85_decode()> zmq_z85_decode() %!error <Invalid call to zmq_z85_decode()> zmq_z85_decode("1234", 2) %!error <zeromq: expected input to be a string> zmq_z85_decode(1) %!error <zeromq: input string size must be divisible by 5> zmq_z85_decode("123") %!assert (zmq_z85_decode("0rJua"), uint8([1 2 3 4])) #endif �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnu-octave-octave-zeromq-ffe3cf0/src/z85_encode.cc��������������������������������������������������0000664�0000000�0000000�00000005477�15127471011�0022207�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// Copyright (C) 2019 John Donoghue <john.donoghue@ieee.org> // // 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 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 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 <http://www.gnu.org/licenses/>. // Octave Includes #include <octave/oct.h> #include <octave/defun-dld.h> #ifdef HAVE_CONFIG_H # include "config.h" #endif // zeromq includes #include <zmq.h> // PKG_ADD: autoload ("zmq_z85_encode", "zeromq.oct"); DEFUN_DLD (zmq_z85_encode, args, nargout, "-*- texinfo -*-\n \ @deftypefn {} {@var{dest} =} zmq_z85_encode (@var{data})\n \ \n\ Encode a binary key as Z85 printable text.\n \ \n \ @subsubheading Inputs\n \ @var{data} - uint8 data that must have a size divisible by 4.\n \ \n \ @subsubheading Outputs\n \ @var{dest} - string encoded data\ \n \ @end deftypefn") { octave_value retval; if (args.length () != 1) { print_usage (); return octave_value (); } if(!args(0).is_uint8_type ()) { error ("zeromq: expected input to be uint8 type data"); return octave_value (); } NDArray data = args (0).array_value (); if (data.numel() % 4 != 0 || data.numel() == 0) { error ("zeromq: input data size must be divisible by 4"); return octave_value (); } #ifdef ZMQ_CURVE OCTAVE_LOCAL_BUFFER (uint8_t, inbuf, data.numel ()); OCTAVE_LOCAL_BUFFER (char, outbuf, (data.numel () + (data.numel ()/4) + 1)); if (!inbuf || !outbuf) error ("zeromq: could allocate memory for encoding.\n"); else { for(int i=0; i<data.numel (); i++) inbuf[i] = data(i); char * out = zmq_z85_encode(outbuf, inbuf, data.numel()); if (out) { retval = octave_value (std::string (out)); } else { error ("zeromq: couldn't encode data"); } } #else error ("zeromq: curve functions not implemented by this version of libzmq"); #endif return retval; } #if 0 %!error <Invalid call to zmq_z85_encode()> zmq_z85_encode() %!error <Invalid call to zmq_z85_encode()> zmq_z85_encode(1, 2) %!error <zeromq: expected input to be uint8 type data> zmq_z85_encode(1) %!error <zeromq: input data size must be divisible by 4> zmq_z85_encode(uint8([1 2 4])) %!error <zeromq: expected input to be uint8 type data> zmq_z85_encode([1 2 3 4]) %!assert (zmq_z85_encode(uint8([1 2 3 4])), "0rJua") #endif �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gnu-octave-octave-zeromq-ffe3cf0/src/zeromq.cc������������������������������������������������������0000664�0000000�0000000�00000010767�15127471011�0021557�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������// Copyright (C) 2016-2018 John Donoghue <john.donoghue@ieee.org> // // 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 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 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 <http://www.gnu.org/licenses/>. // Octave Includes #include <octave/oct.h> #include <octave/defun-dld.h> #ifdef HAVE_CONFIG_H # include "config.h" #endif // PKG_ADD: autoload ("zeromq", "zeromq.oct"); DEFUN_DLD (zeromq, args, nargout, "-*- texinfo -*-\n\ @deftypefn {Package} {} zeromq\n \ The zeromq package provides GNU Octave bindings to the ZeroMQ library to provide\n \ fast distributed messaging options using IPC, TCP, TIPC and multi-casting.\n \ \n \ The usage is very close to the ZeroMQ library C language bindings for the socket \n \ creation and manipulation with the exception of creating a zeromq context, \n \ which is automatically done in the bindings internals.\n \ \n \ For example, a basic client that does a request / reply from a server on port\n \ local port 5555 (available as zmq_example1.m):\n \ \n \ @example\n \ \n \ %% Create socket and connect to server\n \ requester = zmq_socket (ZMQ_REQ);\n \ zmq_connect (requester, \"tcp://localhost:5555\");\n \ \n \ %% send some data\n \ zmq_send (requester, uint8(\"Hello\"), 5, 0); \n \ %% try to read up to 10 bytes of reply data.\n \ received = zmq_recv (requester, 10, 0);\n \ \n \ zmq_close (requester);\n \ @end example\n \ \n \ Implemented functions are:\n \ \n \ @table @asis\n \ @item zmq_bind\n \ Bind a zeromq socket to an endpoint.\n \ @item zmq_close\n \ Close a zeromq socket.\n \ @item zmq_connect\n \ Connect a zeromq socket to an endpoint\n \ @item zmq_disconnect\n \ Disconnect a zeromq socket from an endpoint\n \ @item zmq_errno\n \ Get system errno value.\n \ @item zmq_getsockopt\n \ Get current value of a zeromq socket option.\n \ @item zmq_has\n \ Check zmq for a given feature. \n \ @item zmq_poll\n \ Poll a socket or sockets for a timeout or incoming data available.\n \ @item zmq_recv\n \ Attempt to read data from a zeromq socket.\n \ @item zmq_send\n \ Attempt to send data from a zeromq socket.\n \ @item zmq_setsockopt\n \ Set a zeromq socket option.\n \ @item zmq_strerror\n \ Get the last zmq error string.\n \ @item zmq_unbind\n \ Unbind a previously bound zeromq socket.\n \ @item zmq_version\n \ Get the zeromq library version numbers.\n \ @end table\n \ \n \ Implemented functions depending on version of libzmq are:\n \ @table @asis\n \ @item zmq_curve_keypair\n \ Generate a random private/public keypair.\n \ @item zmq_curve_public\n \ Derive the public key from a private key.\n \ @item zmq_z85_decode\n \ decode a z85 encoded string to a binary key.\n \ @item zmq_z85_encode\n \ encode a binary key as Z85 printable text.\n \ @end table\n \ \n \ In addition, a iszmq function is provided to verify whether a object is a zeromq socket\n \ \n \ Example code files for zeromq usage:\n \ \n \ @table @asis\n \ @item zmq_example1\n \ Simple client REQ socket example that attempts to connect to a server and\n \ send a hello command and get back the response.\n \ @item zmq_example2\n \ Simple server REP socket example that creates the server that the client \n \ from example 1 will connect to and responds back to client 'requests'\n \ @item zmq_example3\n \ Simple server PUB socket example that creates 'weather' server sends\n \ weather updates for random zip codes.\n \ @item zmq_example4\n \ Simple client SUB socket example that creates client that connects to the 'weather' \n \ server and subscribes for weather updates from zip-code 10001.\n \ @item zmq_example5\n \ Simple client STREAM socket example that creates client that connects to octave.org \n \ and posts HEAD request.\n \ @end table\n \ \n \ View example code using @code{edit examples/example_name}\n \ \n \ ie: \n \ @example\n \ edit examples/zmq_example1\n \ @end example\n \ \n \ \n \ @seealso{http://zeromq.org, examples/zmq_example1.m, examples/zmq_example2.m, examples/zmq_example3.m, examples/zmq_example4.m, examples/zmq_example5.m}\n \ @end deftypefn") { return octave_value(); } #if 0 %!test zeromq() #endif �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������