gopher/0000755000000000000000000000000013550124443007231 5ustar gopher/COPYING0000644000000000000000000004311010762617110010263 0ustar GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) 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 this service 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 make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. 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. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute 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 and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), 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 distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the 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 a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, 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. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE 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. 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 convey 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 2 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, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision 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, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This 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 Library General Public License instead of this License. gopher/MANIFEST0000644000000000000000000002434210762617110010367 0ustar gopher-3.0.5/MANIFEST gopher-3.0.5/COPYING gopher-3.0.5/announcements/3.0.0.html gopher-3.0.5/announcements/3.0.0.txt gopher-3.0.5/announcements/3.0.4.html gopher-3.0.5/Makefile.config.in gopher-3.0.5/Makefile.in gopher-3.0.5/README gopher-3.0.5/conf.h gopher-3.0.5/config.guess gopher-3.0.5/config.h.in gopher-3.0.5/config.sub gopher-3.0.5/configure gopher-3.0.5/configure.in gopher-3.0.5/copyright gopher-3.0.5/install-sh gopher-3.0.5/make.com gopher-3.0.5/patchlevel.h gopher-3.0.5/debian/changelog gopher-3.0.5/debian/conffiles gopher-3.0.5/debian/control gopher-3.0.5/debian/copyright gopher-3.0.5/debian/cron.d.ex gopher-3.0.5/debian/dirs gopher-3.0.5/debian/docs gopher-3.0.5/debian/emacsen-install.ex gopher-3.0.5/debian/emacsen-remove.ex gopher-3.0.5/debian/emacsen-startup.ex gopher-3.0.5/debian/ex.doc-base.package gopher-3.0.5/debian/gopherd.README.Debian gopher-3.0.5/debian/gopherd.conffiles gopher-3.0.5/debian/gopherd.dirs gopher-3.0.5/debian/gopherd.docs gopher-3.0.5/debian/gopherd.files gopher-3.0.5/debian/gopherd.init.d gopher-3.0.5/debian/gopherd.logrotate gopher-3.0.5/debian/gopherd.postinst gopher-3.0.5/debian/init.d.ex gopher-3.0.5/debian/manpage.1.ex gopher-3.0.5/debian/manpage.sgml.ex gopher-3.0.5/debian/menu.ex gopher-3.0.5/debian/postrm.ex gopher-3.0.5/debian/preinst.ex gopher-3.0.5/debian/prerm.ex gopher-3.0.5/debian/rules gopher-3.0.5/debian/startopts gopher-3.0.5/debian/watch.ex gopher-3.0.5/doc/INSTALL gopher-3.0.5/doc/FAQ gopher-3.0.5/doc/Makefile.in gopher-3.0.5/doc/PLATFORMS gopher-3.0.5/doc/TODO gopher-3.0.5/doc/client.changes gopher-3.0.5/doc/clientlogging.vms gopher-3.0.5/doc/gindexd.changes gopher-3.0.5/doc/gindexd.doc gopher-3.0.5/doc/gopher.1 gopher-3.0.5/doc/gopherd.8 gopher-3.0.5/doc/gopherd.conf.5 gopher-3.0.5/doc/gopherindex.8 gopher-3.0.5/doc/gopherrc.5 gopher-3.0.5/doc/gophfilt.1 gopher-3.0.5/doc/object.changes gopher-3.0.5/doc/server.changes gopher-3.0.5/doc/server.doc gopher-3.0.5/gopher/locales/De_DE.msg gopher-3.0.5/gopher/locales/Dk.msg gopher-3.0.5/gopher/locales/En_US.msg gopher-3.0.5/gopher/locales/Es_ES.msg gopher-3.0.5/gopher/locales/Es_MX.msg gopher-3.0.5/gopher/locales/Fr.msg gopher-3.0.5/gopher/locales/It.msg gopher-3.0.5/gopher/locales/Makefile.in gopher-3.0.5/gopher/locales/README gopher-3.0.5/gopher/locales/README.VMS gopher-3.0.5/gopher/locales/Sv.msg gopher-3.0.5/gopher/locales/gopher.hlp.Dk gopher-3.0.5/gopher/locales/gopher.hlp.Es gopher-3.0.5/gopher/locales/gopher.hlp.Fr gopher-3.0.5/gopher/locales/gopher.hlp.It gopher-3.0.5/gopher/locales/klingon.msg gopher-3.0.5/gopher/locales/make.com gopher-3.0.5/gopher/locales/message.tpu gopher-3.0.5/gopher/locales/piglatin.msg gopher-3.0.5/gopher/CURcurses.c gopher-3.0.5/gopher/CURcurses.h gopher-3.0.5/gopher/Makefile.in gopher-3.0.5/gopher/compile.com gopher-3.0.5/gopher/cso.c gopher-3.0.5/gopher/cso.h gopher-3.0.5/gopher/download.c gopher-3.0.5/gopher/download.h gopher-3.0.5/gopher/form.c gopher-3.0.5/gopher/form.h gopher-3.0.5/gopher/globals.c gopher-3.0.5/gopher/globals.h gopher-3.0.5/gopher/gopher.c gopher-3.0.5/gopher/gopher.h gopher-3.0.5/gopher/gopher.hlp gopher-3.0.5/gopher/gopher.rc gopher-3.0.5/gopher/gopher.tpu gopher-3.0.5/gopher/gopherrc.c gopher-3.0.5/gopher/gopherrc.h gopher-3.0.5/gopher/gopherremote.rc gopher-3.0.5/gopher/html2.c gopher-3.0.5/gopher/html2.h gopher-3.0.5/gopher/link.com gopher-3.0.5/gopher/makefile.vms gopher-3.0.5/gopher/manager.c gopher-3.0.5/gopher/manager.h gopher-3.0.5/gopher/ourutils.c gopher-3.0.5/gopher/ourutils.h gopher-3.0.5/gopher/pager.c gopher-3.0.5/gopher/pager.h gopher-3.0.5/gopher/subprocs.c gopher-3.0.5/gopher/upload.c gopher-3.0.5/gopher/upload.h gopher-3.0.5/gopher/version.h gopher-3.0.5/gopher/vmsopts/cmuip_decc.opt gopher-3.0.5/gopher/vmsopts/cmuip_vaxc.opt gopher-3.0.5/gopher/vmsopts/multinet_decc.opt gopher-3.0.5/gopher/vmsopts/multinet_vaxc.opt gopher-3.0.5/gopher/vmsopts/netlib_decc.opt gopher-3.0.5/gopher/vmsopts/netlib_vaxc.opt gopher-3.0.5/gopher/vmsopts/tcpware_decc.opt gopher-3.0.5/gopher/vmsopts/tcpware_vaxc.opt gopher-3.0.5/gopher/vmsopts/ucx_decc.opt gopher-3.0.5/gopher/vmsopts/ucx_vaxc.opt gopher-3.0.5/gopher/vmsopts/wollongong_decc.opt gopher-3.0.5/gopher/vmsopts/wollongong_vaxc.opt gopher-3.0.5/gopherd/GGroup.c gopher-3.0.5/gopherd/AUTH.c gopher-3.0.5/gopherd/AUTH.h gopher-3.0.5/gopherd/icons/Makefile gopher-3.0.5/gopherd/icons/htmlicon.0 gopher-3.0.5/gopherd/icons/htmlicon.1 gopher-3.0.5/gopherd/icons/htmlicon.2 gopher-3.0.5/gopherd/icons/htmlicon.5 gopher-3.0.5/gopherd/icons/htmlicon.6 gopher-3.0.5/gopherd/icons/htmlicon.7 gopher-3.0.5/gopherd/icons/htmlicon.8 gopher-3.0.5/gopherd/icons/htmlicon.9 gopher-3.0.5/gopherd/icons/htmlicon.: gopher-3.0.5/gopherd/icons/htmlicon.I gopher-3.0.5/gopherd/icons/htmlicon.P gopher-3.0.5/gopherd/icons/htmlicon.g gopher-3.0.5/gopherd/icons/htmlicon.h gopher-3.0.5/gopherd/icons/htmlicon.s gopher-3.0.5/gopherd/GGroup.h gopher-3.0.5/gopherd/Makefile.in gopher-3.0.5/gopherd/NeXTindex.c gopher-3.0.5/gopherd/Waisindex.c gopher-3.0.5/gopherd/authenticate.c gopher-3.0.5/gopherd/authenticate.h gopher-3.0.5/gopherd/command.c gopher-3.0.5/gopherd/command.h gopher-3.0.5/gopherd/daemon.c gopher-3.0.5/gopherd/daemon.h gopher-3.0.5/gopherd/dedot.c gopher-3.0.5/gopherd/dedot.h gopher-3.0.5/gopherd/error.c gopher-3.0.5/gopherd/error.h gopher-3.0.5/gopherd/ext.c gopher-3.0.5/gopherd/ext.h gopher-3.0.5/gopherd/ftp.c gopher-3.0.5/gopherd/ftp.h gopher-3.0.5/gopherd/globals.c gopher-3.0.5/gopherd/globals.h gopher-3.0.5/gopherd/gopherd.c gopher-3.0.5/gopherd/gopherd.conf.in gopher-3.0.5/gopherd/gopherd.h gopher-3.0.5/gopherd/gopherdconf.c gopher-3.0.5/gopherd/gopherdconf.h gopher-3.0.5/gopherd/gopherdlocal.conf gopher-3.0.5/gopherd/gopherindex.raw gopher-3.0.5/gopherd/gopherusers gopher-3.0.5/gopherd/index.c gopher-3.0.5/gopherd/index.h gopher-3.0.5/gopherd/kernutils.c gopher-3.0.5/gopherd/kernutils.h gopher-3.0.5/gopherd/makegopherindex gopher-3.0.5/gopherd/mindexd.c gopher-3.0.5/gopherd/openers.c gopher-3.0.5/gopherd/openers.h gopher-3.0.5/gopherd/pid.c gopher-3.0.5/gopherd/pid.h gopher-3.0.5/gopherd/serverutil.c gopher-3.0.5/gopherd/serverutil.h gopher-3.0.5/gopherd/site.c gopher-3.0.5/gopherd/site.h gopher-3.0.5/gopherd/special.c gopher-3.0.5/gopherd/special.h gopher-3.0.5/gopherd/wais.h gopher-3.0.5/gopherd/waisgopher.c gopher-3.0.5/gopherd/scripts/gateways/g2archie.ask gopher-3.0.5/gopherd/scripts/gateways/.names gopher-3.0.5/gopherd/scripts/gateways/g2archie.abstract gopher-3.0.5/gopherd/scripts/gateways/g2archie.gd gopher-3.0.5/gopherd/scripts/gateways/g2areacode gopher-3.0.5/gopherd/scripts/gateways/g2areacode.abstract gopher-3.0.5/gopherd/scripts/gateways/g2areacode.ask gopher-3.0.5/gopherd/scripts/gateways/g2finger.abstract gopher-3.0.5/gopherd/scripts/gateways/g2finger.ask gopher-3.0.5/gopherd/scripts/gateways/g2finger.gd gopher-3.0.5/gopherd/scripts/gateways/g2ftphack.abstract gopher-3.0.5/gopherd/scripts/gateways/g2ftphack.ask gopher-3.0.5/gopherd/scripts/gateways/g2ftphack.gd gopher-3.0.5/gopherd/scripts/gateways/g2geo.abstract gopher-3.0.5/gopherd/scripts/gateways/g2geo.ask gopher-3.0.5/gopherd/scripts/gateways/g2geo.gd gopher-3.0.5/gopherd/scripts/gateways/g2netfind gopher-3.0.5/gopherd/scripts/gateways/g2netfind.abstract gopher-3.0.5/gopherd/scripts/gateways/g2netfind.ask gopher-3.0.5/gopherd/scripts/gateways/g2netfind.gd gopher-3.0.5/gopherd/scripts/gateways/g2nntp.abstract gopher-3.0.5/gopherd/scripts/gateways/g2nntp.gd gopher-3.0.5/gopherd/scripts/gateways/g2webster.abstract gopher-3.0.5/gopherd/scripts/gateways/g2webster.ask gopher-3.0.5/gopherd/scripts/gateways/g2webster.gd gopher-3.0.5/gopherd/scripts/gateways/g2whois.abstract gopher-3.0.5/gopherd/scripts/gateways/g2whois.ask gopher-3.0.5/gopherd/scripts/gateways/g2whois.gd gopher-3.0.5/gopherd/scripts/Makefile gopher-3.0.5/gopherd/scripts/add-account gopher-3.0.5/gopherd/scripts/add-account.ask gopher-3.0.5/gopherd/scripts/autoabstract gopher-3.0.5/gopherd/scripts/autokeywords gopher-3.0.5/gophfilt/Makefile.in gopher-3.0.5/gophfilt/gophfilt.c gopher-3.0.5/gophfilt/make_gophfilt.com gopher-3.0.5/gophfilt/tryit.com gopher-3.0.5/object/BLblock.c gopher-3.0.5/object/BLblock.h gopher-3.0.5/object/DAarray.c gopher-3.0.5/object/DAarray.h gopher-3.0.5/object/Debug.c gopher-3.0.5/object/Debug.h gopher-3.0.5/object/Dirent.h gopher-3.0.5/object/GDgopherdir.c gopher-3.0.5/object/GDgopherdir.h gopher-3.0.5/object/GSgopherobj.c gopher-3.0.5/object/GSgopherobj.h gopher-3.0.5/object/Locale.c gopher-3.0.5/object/Locale.h gopher-3.0.5/object/Makefile.in gopher-3.0.5/object/Malloc.h gopher-3.0.5/object/RBTree.c gopher-3.0.5/object/RBTree.h gopher-3.0.5/object/Regex.c gopher-3.0.5/object/Regex.h gopher-3.0.5/object/STAarray.h gopher-3.0.5/object/STRstring.c gopher-3.0.5/object/STRstring.h gopher-3.0.5/object/Sockets.c gopher-3.0.5/object/Sockets.h gopher-3.0.5/object/Stat.h gopher-3.0.5/object/Stdlib.h gopher-3.0.5/object/String.h gopher-3.0.5/object/VIews.c gopher-3.0.5/object/VIews.h gopher-3.0.5/object/Wait.h gopher-3.0.5/object/boolean.h gopher-3.0.5/object/compatible.c gopher-3.0.5/object/compatible.h gopher-3.0.5/object/compile.com gopher-3.0.5/object/fileio.c gopher-3.0.5/object/fileio.h gopher-3.0.5/object/getopt.c gopher-3.0.5/object/link.com gopher-3.0.5/object/ranlib gopher-3.0.5/object/url.c gopher-3.0.5/object/url.h gopher-3.0.5/object/util.c gopher-3.0.5/object/util.h gopher-3.0.5/test/data/auxconf/testfile gopher-3.0.5/test/data/.names gopher-3.0.5/test/data/About gopher-3.0.5/test/data/decode-n-scripts/shell-script gopher-3.0.5/test/data/decode-n-scripts/shell-script.abstract gopher-3.0.5/test/data/decode-n-scripts/shell-script.tar gopher-3.0.5/test/data/ftp-horrors/.Links gopher-3.0.5/test/data/links/.Links gopher-3.0.5/test/data/views/t-shirt.gif gopher-3.0.5/test/data/views/t-shirt gopher-3.0.5/test/data/views/t-shirt.abstract gopher-3.0.5/test/Makefile gopher-3.0.5/test/otheradmin.conf gopher-3.0.5/test/test.raw gopher-3.0.5/test/good-results/aux-info gopher-3.0.5/test/good-results/aux gopher-3.0.5/test/good-results/aux-long gopher-3.0.5/test/good-results/links gopher-3.0.5/test/good-results/links-info gopher-3.0.5/test/good-results/links-long gopher-3.0.5/test/good-results/root gopher-3.0.5/test/good-results/root-info gopher-3.0.5/test/good-results/root-long gopher-3.0.5/test/good-results/views gopher-3.0.5/test/good-results/views-info gopher-3.0.5/test/good-results/views-long gopher-3.0.5/test/good-results/views-txt gopher/Makefile.config.in0000644000000000000000000002161111363667255012560 0ustar #------------------------------------------------ # This is where most of the configuration parameters are defined # also see conf.h # #******************************************************************** # $Author: jgoerzen $ # $Revision: 1.10 $ # $Date: 2002/04/26 13:33:33 $ # $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/Makefile.config.in,v $ # $State: Exp $ # # Paul Lindner, University of Minnesota CIS. # # Copyright 1991, 1992 by the Regents of the University of Minnesota # see the file "Copyright" in the distribution for conditions of use. #******************************************************************** # MODULE: Makefile.config.dist # Parameters for the gopher distribution #********************************************************************* # Revision History: # $Log: Makefile.config.in,v $ # Revision 1.10 2002/04/26 13:33:33 jgoerzen # Removed glib MIME stuff. We'll move to Pygopherd first. # # Revision 1.8 2002/03/19 20:42:48 jgoerzen # * Removed the DOMAIN configure support, DOMAIN_NAME in gopherd, # backupdomain in Socket.c, etc. This should prevent the no.domain.name # problem that people have been seeing. Regenerated configure stuff. # # Revision 1.7 2002/01/11 15:55:59 jgoerzen # * Using $(INSTALL) from subdirectories broke on systems # where install-sh was used because $(INSTALL) would always # resolve to ./install-sh. Replaced all instances of # $(INSTALL) with @INSTALL@ (autoconf would provide the correct # path) and removed INSTALL from Makefile.config. Reported # by Don Fike on Solaris 2.6. # * Updated our copy of install-sh with the one from # a current automake. # # Revision 1.6 2002/01/09 16:29:26 jgoerzen # More tweaks. # # Revision 1.5 2002/01/09 16:25:35 jgoerzen # Updated. # # Revision 1.4 2002/01/09 15:54:48 jgoerzen # Modifications to assist with installations # # Revision 1.3 2000/08/23 00:20:25 jgoerzen # Use -Wall # # Revision 1.2 2000/08/19 01:40:26 jgoerzen # Fix some pathnames # # Revision 1.1.1.1 2000/08/19 00:28:56 jgoerzen # Import from UMN Gopher 2.3.1 after GPLization # # Revision 3.1 1996/01/04 18:52:31 lindner # Updates for autoconf # # Revision 3.22 1995/01/25 23:10:56 lindner # Modifications to use SOCKS # # Revision 3.21 1994/12/11 18:44:04 lindner # make /gopher-data the gopher-data directory # # Revision 3.20 1994/11/30 00:05:40 lindner # Use cp to do installs, much more portable # # Revision 3.19 1994/11/18 23:01:56 lindner # Add location of freewais-sf # # Revision 3.18 1994/11/18 22:45:24 lindner # don't make freewais-sf the default # # Revision 3.17 1994/11/18 22:08:46 lindner # Add better FreeWAIS code # # Revision 3.16 1994/11/07 20:00:48 lindner # Modifications to use FreeWAIS-sf package # # Revision 3.15 1994/08/19 17:02:48 lindner # Add message about NO_MKTIME # # Revision 3.14 1994/08/03 19:34:51 lindner # Better docs.. # # Revision 3.13 1994/05/27 04:56:29 lindner # Use -O # # Revision 3.12 1994/03/08 15:54:06 lindner # Add item for VFORK # # Revision 3.11 1994/01/20 06:43:07 lindner # support for systems that have flock() instead of fcntl()-locking # # Revision 3.10 1994/01/12 22:23:46 lindner # Fixes for Data General # # Revision 3.9 1994/01/06 06:58:40 lindner # Additions for client logging # # Revision 3.8 1993/11/03 15:02:26 lindner # pl10 # # Revision 3.7 1993/09/22 04:32:32 lindner # Doc fixes # # Revision 3.6 1993/09/03 03:26:12 lindner # Make sun shared libraries optional # # Revision 3.5 1993/07/30 14:21:42 lindner # A/UX mods, and Mitra autoexit mods # # Revision 3.4 1993/07/27 05:33:51 lindner # Mitra mondo debug overhaul # # Revision 3.3 1993/04/15 22:02:32 lindner # CLIENTOPTS added # # Revision 3.2 1993/03/19 19:41:46 lindner # updates for sco # # Revision 3.1.1.1 1993/02/11 18:02:49 lindner # Gopher+1.2beta release # # Revision 1.7 1993/02/09 21:34:03 lindner # New MAN5DIR line, changed install to install -c # # Revision 1.6 1993/01/19 04:52:22 lindner # Renamed Makefile.config to Makefile.config.dist # # Revision 1.5 1993/01/13 16:19:58 lindner # Changes for SVR4 (add -lnsl to libs line..) # # Revision 1.4 1992/12/28 21:45:48 lindner # Removed trailing slash on CLIENTLIB # # Revision 1.3 1992/12/21 20:38:05 lindner # Added warning about -DBIO (from dgg) # # Revision 1.2 1992/12/13 06:10:26 lindner # Fixed SVR4LIBS line (didn't need bsd stuff anymore) also removed HPLIBS # # Revision 1.1 1992/12/10 22:57:05 lindner # Initial revision # # #********************************************************************/ #------------------------------------------------ # Your favorite C compiler.. # CC = @CC@ #------------------------------------------------ # Optimization level. # #OPT=-g #OPT=-g -Wunused -W OPT=@OPT@ -Wall #------------------------------------------------ # The ranlib command on your system. Systems without it should still survive RANLIB = @RANLIB@ #------------------------------------------------ # The install command on your system. cp works in most cases... #------------------------------------------------- # Where shall we install stuff? # PREFIX = $(DESTDIR)@prefix@ prefix = $(DESTDIR)@prefix@ SYSCONFDIR = $(DESTDIR)@sysconfdir@ CLIENTDIR = $(PREFIX)/bin CLIENTLIB = $(SYSCONFDIR) SERVERDIR = $(PREFIX)/sbin # On SCO manuals are in /usr/man but its easiest to do a # symbolic link from /usr/local/man to /usr/man for this and other packages MAN1DIR = @mandir@/man1 MAN5DIR = @mandir@/man5 MAN8DIR = @mandir@/man8 #----------------------------------------------------------------- # DEBUGGING control... # # Comment this to make a slimmer executable... DEBUGGING = @DEBUGGING@ #------------------------------------------------ # Uncomment out the following lines to use SOCKS SOCKSFLAGS=@SOCKSFLAGS@ SOCKSLIBS=@SOCKSLIBS@ #----------------------------------------------------------------- # Optional server features. # # Add -DADD_DATE_AND_TIME to add dates and times to the gopher titles # # Add -DLOADRESTRICT if you want to restrict access based on load avg. # (Note you'll need to add -lkvm in SERVERLIBS) Note also that this has # only been tested under SunOS 4.1.1 # # Add -DBIO if you're using the biology portion of Don Gilbert's modified # wais8b5 that supports boolean and phrase searching. # PLEASE NOTE: the -DBIO option is NOT needed nor recommended for use # of the boolean and phrase searching portion of this modified wais, # just the symbol searching. But, you must compile wais and gopher with # the same option setting (-DBIO or NOT). # The source can be gotten from: # # ftp.bio.indiana.edu # # Add -DDL and define DLPATH and DLOBJS if you want to include support # for Tim Cook's 'dl' databases You will also have to have a # working copy the program with source code in the DLPATH # directory. The files getdesc.o and enddesc.o must be there. # Source for dl can be gotten from: # # ftp.deakin.edu.au # pub/describe/describe-1.8.tar.Z or higher... # # Add -DCAPFILES if you want compatibility with the older .cap directory # # Add -DSETPROCTITLE if you want to set the process title displayed # by the 'ps' command (only works on bsdish systems...) # # Add -DFREEWAIS_0_4 to WAISTYPE to use FreeWAIS version 0.4, this release # had a number of changes to the base release. # #SERVEROPTS = -DSETPROCTITLE -DCAPFILES #-DBIO -DDL -DLOADRESTRICT SERVEROPTS = @SERVEROPTS@ WAISTYPE = @WAISTYPE@ DLPATH = @DLPATH@ DLOBJS = @DLOBJS@ #----------------------------------------------------------------- # Optional client features. # # Add -DNOMAIL if you don't want remote users mailing documents # # Add -DAUTOEXITONU if you want to treat q and u as the same, and automatically # exit from the top menu - usefull if Gopher called from another app. # # Add -DNOBANNER if you don't want the banner across the top. # CLIENTOPTS = -DNOBANNER -DCTRLCPROMPTS -DCONTROLX #-DNOMAIL -DREMOTEUSER -D #----------------------------------------------------------------- # Optional localization and internationalization features # # Add -DGINTERNATIONAL if you want localized messages in the client. # You may need to check the settings of -DNO_LOCALE and -DNO_XPGCAT # if your system does not have ANSI C or X/Open libraries respectively. # You will also need to follow the directions in gopher/locales/README # to generate and install the localized messages. INTLOPTS = @GINTERNATIONAL@ # # Uncomment out this line to use shared libraries on Sun systems # #SHAREDLIB = sun #================================================================= #================================================================= # Stuff that follows shouldn't be changed # OBJINCLUDES = -I@top_srcdir@/object OTHERINCLUDES = -I@top_srcdir@ WAISINCLUDES = -I@top_srcdir@/wais -I../ui INCLUDES = -I@top_srcdir@ -I@top_srcdir@/object LDFLAGS = -L../object SHELL = /bin/sh gopher/Makefile.in0000644000000000000000000001365010762617110011303 0ustar #******************************************************************** # $Author: jgoerzen $ # $Revision: 1.10 $ # $Date: 2002/04/26 13:33:33 $ # $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/Makefile.in,v $ # $State: Exp $ # # Paul Lindner, University of Minnesota CIS. # # Copyright 1991, 1992 by the Regents of the University of Minnesota # see the file "Copyright" in the distribution for conditions of use. #******************************************************************** # MODULE: Makefile # Makefile for entire gopher distribution. #********************************************************************* # Revision History: # $Log: Makefile.in,v $ # Revision 1.10 2002/04/26 13:33:33 jgoerzen # Removed glib MIME stuff. We'll move to Pygopherd first. # # Revision 1.8 2002/01/28 03:38:58 jgoerzen # Patches for FreeBSD: # * Test in configure for stdlib.h # * Include stdlib.h if it's available in Malloc.h # * Don't include malloc.h if it's missing in Malloc.h # * Don't include strcasestr if it's present in util.c and util.h # # Revision 1.7 2002/01/09 02:56:09 jgoerzen # Updated archive target again # # Revision 1.6 2002/01/09 02:53:12 jgoerzen # Fixed over-zealous Makefile.in problem. # # Revision 1.5 2002/01/09 00:47:05 jgoerzen # Fixed archive target in Makefile.in # MANIFEST updated by make archive # # Revision 1.4 2002/01/09 00:43:30 jgoerzen # Updated # # Revision 1.3 2002/01/08 16:49:42 jgoerzen # Modified distclean to be better behaved. # # Revision 1.2 2002/01/08 16:44:19 jgoerzen # configure.in: Modified to check for crypt.h # Reran autoconf & autoheader # Makefile.in: Modified to be better with distclean # # Revision 1.1.1.1 2000/08/19 00:28:56 jgoerzen # Import from UMN Gopher 2.3.1 after GPLization # # Revision 3.1 1996/01/04 18:52:02 lindner # Updates for autoconf # # Revision 3.15 1994/12/07 23:58:19 lindner # Fix for VMS zip builder # # Revision 3.14 1994/11/18 22:25:39 lindner # Fix for quicktar # # Revision 3.13 1994/08/19 17:02:06 lindner # Remove ZIP file before creating it.. # # Revision 3.12 1994/01/07 20:52:01 lindner # pl11 # # Revision 3.11 1993/08/19 20:31:54 lindner # minor fixes for quicktar # # Revision 3.10 1993/08/17 21:58:11 lindner # Fix for dependencies, all # # Revision 3.9 1993/08/12 06:34:23 lindner # Added quicktar.. # # Revision 3.8 1993/08/05 22:22:40 lindner # warning message for archive # # Revision 3.7 1993/07/27 05:32:28 lindner # added gophfilt and zip stuff # # Revision 3.6 1993/07/21 16:15:58 lindner # Added tags target, install for shared libraries # # Revision 3.5 1993/04/15 22:00:52 lindner # Move to looking for ui for WAIS stuff # # Revision 3.4 1993/03/18 23:11:15 lindner # 1.2b3 release # # Revision 3.3 1993/02/19 21:41:58 lindner # Fix to automatically copy Makefile.config.dist when making a distribution. # # Revision 3.2 1993/02/19 21:24:24 lindner # Mods for CVS # # Revision 3.1.1.1 1993/02/11 18:02:49 lindner # Gopher+1.2beta release # # Revision 1.3 1992/12/29 23:30:22 lindner # Removed all references to fanout and mindexd, it's in gopherd now.. # # Revision 1.2 1992/12/11 19:32:00 lindner # make tar now uses gnu tar, ignores RCS directorys and symbolic links # # Revision 1.1 1992/12/11 19:01:43 lindner # Gopher1.1 Release # #********************************************************************/ SHELL = /bin/sh @SET_MAKE@ all: objects client gopherfilter @echo "Welcome to Gopher" #### Start of system configuration section. #### srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ ${srcdir}/configure: configure.in cd ${srcdir} && autoconf # autoheader might not change config.h.in, so touch a stamp file. ${srcdir}/config.h.in: stamp-h.in ${srcdir}/stamp-h.in: configure.in cd ${srcdir} && autoheader echo timestamp > ${srcdir}/stamp-h.in config.h: stamp-h stamp-h: config.h.in config.status ./config.status Makefile: Makefile.in config.status ./config.status config.status: configure ./config.status --recheck include Makefile.config client: gopher/gopher gopherfilter: gophfilt/gophfilt objects: object/libgopher.a # gopher is dependant on conf.h - (as are other things) gopher/gopher: object/libgopher.a conf.h $(srcdir)/gopher/*c $(srcdir)/gopher/*h @echo "Making client" (cd gopher; $(MAKE) $(MFLAGS) all) gophfilt/gophfilt: object/libgopher.a conf.h $(srcdir)/gophfilt/*c @echo "Making gophfilt" (cd gophfilt; $(MAKE) $(MFLAGS) all) object/libgopher.a: $(srcdir)/object/*c $(srcdir)/object/*h @echo "Making Objects" (cd object; $(MAKE) $(MFLAGS) all) install: (cd object; $(MAKE) $(MFLAGS) install); (cd gopher; $(MAKE) $(MFLAGS) install); (cd gophfilt; $(MAKE) $(MFLAGS) install); (cd doc; $(MAKE) $(MFLAGS) install) clean: (cd gopher; $(MAKE) $(MFLAGS) clean) (cd object; $(MAKE) $(MFLAGS) clean) (cd gophfilt; $(MAKE) $(MFLAGS) clean) (cd doc; $(MAKE) $(MFLAGS) clean) -rm -f "examples/Sample Directory/wais-index/index."* distclean: spotless -rm -f Makefile Makefile.config spotless: clean -rm -f config.log config.cache config.h config.status -rm -f object/Makefile gopher/Makefile -rm -f gopher/locales/Makefile doc/Makefile gophfilt/Makefile -rm -rf debian/stamp* -rm -rf debian/tmp -rm -f *~ archive: distclean -rm -f ir ui bin MANIFEST touch MANIFEST HERE=`basename $$PWD`; \ echo $$HERE ; \ cd .. ; \ find $$HERE -type f -print |grep -v '\.o$$' |grep -v '~$$' |grep -v 'CVS' >$$HERE/MANIFEST ; \ tar -T $$HERE/MANIFEST -czvf $$HERE.tar.gz ;\ rm -f $$HERE.zip ; \ egrep -v '^test' <$$HERE/MANIFEST | zip -@ $$HERE.zip @echo Built $$HERE.tar.gz and $$HERE.zip @echo "Did you remember to update the patchlevel.h Paul?..." @echo "Hmmm... Hmmmm...." quicktar: HERE=`basename $$PWD`; \ touch MANIFEST ; \ cd .. ; \ find $$HERE -type f -print |grep -v '.o$$' |grep -v '~$$' |grep -v 'CVS' >$$HERE/MANIFEST ; \ /usr/gnu/bin/tar -T $$HERE/MANIFEST -cZvf $$HERE.tar.Z ; tags: etags `find . -print | egrep '\.[ch]$$'` gopher/README0000644000000000000000000000505610762617110010117 0ustar $Id: README,v 1.5 2002/02/12 21:30:03 jgoerzen Exp $ This is the Gopher+ distribution based on the University of Minnesota's Internet Gopher+ distribution for UNIX machines. University of Minnesota actively developed this software until 1995. In 2000, they released it to the public under the GNU General Public License. This represents the latest version of their tree, as adopted by a group of programmers. A client for VMS is included but is not currently supported. Here's a breakdown by directory: announcements: Release notes, public announcements about Gopher, etc. Preserved here for posterity. coders: Files of note to Gopher developers. debian: Files to build gopher on Debian. Also, debian/changelog is the place to look for all recent changes. doc: The documentation for all parts of the distribution. Look here *first*. Important files: INSTALL -- Installation instructions *.changes -- Stuff that's changed from version to version man pages, etc. PLATFORMS -- Info on support of different platforms LOOK HERE IF YOU HAVE PROBLEMS COMPILING! gopher: The Internet Gopher+ Curses client. gophfilt: A Gopher "filter" program. test: A regression testing package, include sample data. Please look in the directory "doc" for more information about installing the various portions of the Internet Gopher. Specifically refer to the file INSTALL. This software is Copyright 1991-2000 by the Regents of the University of Minnesota. This software is Copyright (C) 2000-2002 by John Goerzen and the gopher developers. Please refer to the file "Copyright" for more information on restrictions of use. Bug reports, patches and comments may be sent to gopher@complete.org. The UMN team wishes recognize the help and code from the following people: UNIX network Programming W. Richard Stevens (For socket functions and error routines, now unrecognizeable :-) ) elm Copyrighted by the USENET trust. (For UI cloning) WAIS Brewster and co. at Thinking Machines (er, now WAIS Inc.) (For our UNIX generic indexing stuff) and all of our users for their great suggestions and patches! See the files doc/*.changes for a long list of people who have submitted patches and code. gopher/announcements/0000755000000000000000000000000010762617110012106 5ustar gopher/announcements/3.0.0.html0000644000000000000000000002335110762617110013436 0ustar Gopher Turns 10 / Gopher 3.0 (Furry Terror) Released

Gopher Turns 10 / Gopher 3.0 (Furry Terror) Released

January 8, 2002

The Internet Gopher Server and Curses Client is 10 years old!* Since its announcement in late 1991, Gopher quickly sprang up to be one of the most innovative technologies of its time. Gopher today still provides features not found on Web servers -- namely, its idea that the entire planet is just one big filesystem. Modern browsers such as Konqueror and Mozilla show it to us that way, even with drag-and-drop integration with the desktop.

Today we release the Internet Gopher Server and Client version 3.0.

After having been totally unmodified for five years, the Internet Gopher has kicked back to life. The University of Minnesota placed the code under the GNU General Public License and an interested group of hackers set to work on it. A year later, we have this release.

About Gopher

To learn about Gopher, please visit The Gopher Project [gopher/web], A Brief Introduction to Gopherspace [gopher/web], or The Gopher Manifesto [gopher/web].

Obtaining Gopher/Gopherd 3.0

Debian sid users may run "apt-get install gopher gopherd" beginning on approximately January 11.

The source distribution may be downloaded from:

Release Notes

  • You are encouraged to use ./configure --disable-auth to build.
  • BSD users should use "gmake" to build.

Changes since UMN Gopher release 2.3.1

In Brief:
  • Many security and buffer overrun fixes
  • New security features in gopherd
  • Improved handling of MIME types
  • Modified to work on modern operating systems. Verified to work in Linux for multiple platforms and NetBSD/i386. Should also work for HURD.
  • Many other modifications, see below.
A more detailed listing is below -- but it is still abbreviated. The most current is available from CVS.
gopher (3.0.0-1) unstable; urgency=low

  * Patched to work with Hurd.  Closes: #115511.  Uses
    suggestions from James Morrison 
    but not his patch.
    * gopher.c, gopherd/error.c, gopher/download.c:
      Modified to use HAVE_STRERROR
    * configure.in: Modified with checks for sys/param.h, HURD header files,
      get_current_dir_name, etc.
    * configure.h.in, configure: rebuilt.
  * Moved the current UMN Copyright notice in "COPYING" into "copyright"
  * Updated copyright files, etc. with current info.
  * Updated the locales with semi-current copyright stuff.
  * Updated greeting in gopher and gopherd.
  * This is Gopher 3.0.0, the Furry Terror release.  

 -- John Goerzen   Tue,  8 Jan 2002 15:31:00 -0500

gopher (2.3.1-15) unstable; urgency=low

  * NetBSD port effort began.
  * Added crypt.h to configure.in's list of headers to look for.
    Reran autoconf/autoheader.
  * Modified gopherd/AUTH.h to include crypt.h only if it's available
    and to include unistd.h if it's available.  (NetBSD)
  * Integrated patches from David Allen 
    (may have been done earlier anyway)
  * config.h.in: rebuilt by autoheader
  * configure: rebuilt by autoconf
  * configure.in:
    * Added REGEXLIBS test for NetBSD -- look for re_comp in -lcompat
    * Added checkes for term.h, re_comp.h, regex.h
  * gopher/ourutils.c, gopher/CURcurses.c: Use term.h check
  * gopher/Makefile.in, gopherd/Makefile.in, gophfilt/Makefile.in:
    * Use REGEXLIBS
  * gopher/globals.h, gopher/gopher.c: Remove sys_errlist
  * object/GSgopherobj.c: Removed  #include, now use
    "Regex.h" that has proper regex determining logic
  * object/Regex.h: Moved regex.h include to here.  Make it conditional
    based on configure test.  Add conditional re_comp.h include.
  * gopherd/gopherd.c: Add init of view and filter after setjmp
    to eliminate clobbering due to longjmp and a warning.  Cast
    parameters to *printf to long as appropriate.
  * AUTH.h: Add missing AUTHITEMSprocessLine prototype
  * AUTH.h: Add a check to prevent including twice.
  * gopherdconf.c: Add a missing prototype.
  * AUTH.c: add missing include of GGroup.h
  * download.c: Added cast to long for some *printf's
  * Now compiles with only one warning on NetBSD.
  * This is Gopher 20020108-01.cvs
  * object/Regex.h: now conditionally includes sys/types.h for regex.h
  * This is Gopher 20020108-02.cvs

 -- John Goerzen   Tue,  8 Jan 2002 13:11:00 -0500

gopher (2.3.1-14) unstable; urgency=low

  * Added build-depends on autoconf.  Closes: #113255.

 -- John Goerzen   Thu,  1 Nov 2001 12:49:00 -0500

gopher (2.3.1-13) unstable; urgency=low

  * Added Build-Depends.  Closes: #94237.

 -- John Goerzen   Mon, 23 Apr 2001 11:00:04 -0500

gopher (2.3.1-12) unstable; urgency=low

  * Only chown /var/gopher if it's just created.  Closes: #89557.

 -- John Goerzen   Fri,  6 Apr 2001 15:35:16 -0500

gopher (2.3.1-11) unstable; urgency=low

  * Many sprintf -> snprintf changes.

 -- John Goerzen   Wed, 17 Jan 2001 15:22:09 -0500

gopher (2.3.1-10) unstable; urgency=low

  * Added mp3 MIME type.  Closes: #81529.
  * Now logs about chroot status on server startup.

 -- John Goerzen   Wed, 17 Jan 2001 13:11:25 -0500

gopher (2.3.1-9) unstable; urgency=low

  * Fixed potential buffer overflows.  Closes: #82602.

 -- John Goerzen   Wed, 17 Jan 2001 12:12:51 -0500

gopher (2.3.1-8) unstable; urgency=low

  * Update to latest code in CVS, much from
    David Allen 
  * Fixed dh_testversion to 2.0.103.  Closes: #79883.

 -- John Goerzen   Sat,  6 Jan 2001 20:06:01 -0500

gopher (2.3.1-7) unstable; urgency=low

  * A new debian rev to fix the access: problem in the gopherdlocal.conf.

 -- John Goerzen   Tue, 19 Dec 2000 23:40:09 -0500

gopher (2.3.1-6) unstable; urgency=low

  * Added many excellent code patches and cleanups from
    David Allen .

 -- John Goerzen   Tue, 19 Dec 2000 20:18:09 -0500

gopher (2.3.1-5) unstable; urgency=low

  * Additional code modifications and fixes.

 -- John Goerzen   Mon, 18 Dec 2000 17:03:56 -0500

gopher (2.3.1-4) unstable; urgency=low

  * Disable authentication for the moment due to security concerns.

 -- John Goerzen   Tue, 17 Oct 2000 23:49:20 -0500

gopher (2.3.1-3) unstable; urgency=low

  * Added startopts as a gopherd conffile.

 -- John Goerzen   Tue, 22 Aug 2000 22:25:25 -0500

gopher (2.3.1-2) unstable; urgency=low

  * Modify postinst to be easier for people to use if they already have
    a gopher user.
  * Fixed a bug in the restart option for the init script.
  * Made debian/copyright more verbose.

 -- John Goerzen   Tue, 22 Aug 2000 21:57:26 -0500

gopher (2.3.1-1) unstable; urgency=low

  * Initial re-release.  Package had been yanked after 1995 due to licensing.
  * UMN has just GPL'd gopher.
  * This package contains the security fix from bugtraq.
  * I have patched it to chroot() and setuid() earlier for better
    security.
    SIDE EFFECT: logging will not work if chroot() is used.
  * The extension chopping code was buggy, so I have removed it.
  * Made many fixes to eliminate compiler warnings and errors.
  * Removed redefinitions of sys_errlist
  * Included more header files to bring in relevant prototypes
  * Modified to use Debian paths
  * Modified configure.in to look for -lcrypt
  * Modified Makefile.config.in to use -Wall
  * Removed -DSETPROCTITLE from configure.in to make start-stop-daemon
    work better.
  * Added logrotate
  * Wrote Debian support from scratch.
  * AUTH.h includes crypt.h
  * gopherd/Makefile.in uses separate conffile dir (Debian path)
  * STRstring.h had a paren problem; gcc on alpha brought it out.  Fixed.
  * String.h was missing some header files.
  * Other fixes.

 -- John Goerzen   Thu, 17 Aug 2000 15:16:07 -0500
* The exact date of version 1.0 of UMN gopher's release is not logged, but this is about the right time.
$Id: 3.0.0.html,v 1.4 2002/01/08 22:14:44 jgoerzen Exp $ gopher/announcements/3.0.0.txt0000644000000000000000000002172510762617110013314 0ustar Gopher Turns 10 / Gopher 3.0 (Furry Terror) Released January 8, 2002 The Internet Gopher Server and Curses Client is 10 years old!* Since its [1]announcement in late 1991, Gopher quickly sprang up to be one of the most innovative technologies of its time. Gopher today still provides features not found on Web servers -- namely, its idea that the entire planet is just one big filesystem. Modern browsers such as Konqueror and Mozilla show it to us that way, even with drag-and-drop integration with the desktop. Today we release the Internet Gopher Server and Client version 3.0. After having been totally unmodified for five years, the Internet Gopher has kicked back to life. The University of Minnesota placed the code under the GNU General Public License and an interested group of hackers set to work on it. A year later, we have this release. About Gopher To learn about Gopher, please visit The Gopher Project [[2]gopher/[3]web], A Brief Introduction to Gopherspace [[4]gopher/[5]web], or The Gopher Manifesto [[6]gopher/[7]web]. Obtaining Gopher/Gopherd 3.0 Debian sid users may run "apt-get install gopher gopherd" beginning on approximately January 11. The source distribution may be downloaded from: * [8]gopher://gopher.quux.org/1/devel/gopher * [9]Quux.Org's Web-To-Gopher Interface to the Above * [10]http://www.quux.org/give-me-gopher/ for people that want a more conventional HTTP presentation. Release Notes * You are encouraged to use ./configure --disable-auth to build. * BSD users should use "gmake" to build. Changes since UMN Gopher release 2.3.1 In Brief: * Many security and buffer overrun fixes * New security features in gopherd * Improved handling of MIME types * Modified to work on modern operating systems. Verified to work in Linux for multiple platforms and NetBSD/i386. Should also work for HURD. * Many other modifications, see below. A more detailed listing is below -- but it is still abbreviated. The most current is available from CVS. gopher (3.0.0-1) unstable; urgency=low * Patched to work with Hurd. Closes: #115511. Uses suggestions from James Morrison but not his patch. * gopher.c, gopherd/error.c, gopher/download.c: Modified to use HAVE_STRERROR * configure.in: Modified with checks for sys/param.h, HURD header files, get_current_dir_name, etc. * configure.h.in, configure: rebuilt. * Moved the current UMN Copyright notice in "COPYING" into "copyright" * Updated copyright files, etc. with current info. * Updated the locales with semi-current copyright stuff. * Updated greeting in gopher and gopherd. * This is Gopher 3.0.0, the Furry Terror release. -- John Goerzen Tue, 8 Jan 2002 15:31:00 -0500 gopher (2.3.1-15) unstable; urgency=low * NetBSD port effort began. * Added crypt.h to configure.in's list of headers to look for. Reran autoconf/autoheader. * Modified gopherd/AUTH.h to include crypt.h only if it's available and to include unistd.h if it's available. (NetBSD) * Integrated patches from David Allen (may have been done earlier anyway) * config.h.in: rebuilt by autoheader * configure: rebuilt by autoconf * configure.in: * Added REGEXLIBS test for NetBSD -- look for re_comp in -lcompat * Added checkes for term.h, re_comp.h, regex.h * gopher/ourutils.c, gopher/CURcurses.c: Use term.h check * gopher/Makefile.in, gopherd/Makefile.in, gophfilt/Makefile.in: * Use REGEXLIBS * gopher/globals.h, gopher/gopher.c: Remove sys_errlist * object/GSgopherobj.c: Removed #include, now use "Regex.h" that has proper regex determining logic * object/Regex.h: Moved regex.h include to here. Make it conditional based on configure test. Add conditional re_comp.h include. * gopherd/gopherd.c: Add init of view and filter after setjmp to eliminate clobbering due to longjmp and a warning. Cast parameters to *printf to long as appropriate. * AUTH.h: Add missing AUTHITEMSprocessLine prototype * AUTH.h: Add a check to prevent including twice. * gopherdconf.c: Add a missing prototype. * AUTH.c: add missing include of GGroup.h * download.c: Added cast to long for some *printf's * Now compiles with only one warning on NetBSD. * This is Gopher 20020108-01.cvs * object/Regex.h: now conditionally includes sys/types.h for regex.h * This is Gopher 20020108-02.cvs -- John Goerzen Tue, 8 Jan 2002 13:11:00 -0500 gopher (2.3.1-14) unstable; urgency=low * Added build-depends on autoconf. Closes: #113255. -- John Goerzen Thu, 1 Nov 2001 12:49:00 -0500 gopher (2.3.1-13) unstable; urgency=low * Added Build-Depends. Closes: #94237. -- John Goerzen Mon, 23 Apr 2001 11:00:04 -0500 gopher (2.3.1-12) unstable; urgency=low * Only chown /var/gopher if it's just created. Closes: #89557. -- John Goerzen Fri, 6 Apr 2001 15:35:16 -0500 gopher (2.3.1-11) unstable; urgency=low * Many sprintf -> snprintf changes. -- John Goerzen Wed, 17 Jan 2001 15:22:09 -0500 gopher (2.3.1-10) unstable; urgency=low * Added mp3 MIME type. Closes: #81529. * Now logs about chroot status on server startup. -- John Goerzen Wed, 17 Jan 2001 13:11:25 -0500 gopher (2.3.1-9) unstable; urgency=low * Fixed potential buffer overflows. Closes: #82602. -- John Goerzen Wed, 17 Jan 2001 12:12:51 -0500 gopher (2.3.1-8) unstable; urgency=low * Update to latest code in CVS, much from David Allen * Fixed dh_testversion to 2.0.103. Closes: #79883. -- John Goerzen Sat, 6 Jan 2001 20:06:01 -0500 gopher (2.3.1-7) unstable; urgency=low * A new debian rev to fix the access: problem in the gopherdlocal.conf. -- John Goerzen Tue, 19 Dec 2000 23:40:09 -0500 gopher (2.3.1-6) unstable; urgency=low * Added many excellent code patches and cleanups from David Allen . -- John Goerzen Tue, 19 Dec 2000 20:18:09 -0500 gopher (2.3.1-5) unstable; urgency=low * Additional code modifications and fixes. -- John Goerzen Mon, 18 Dec 2000 17:03:56 -0500 gopher (2.3.1-4) unstable; urgency=low * Disable authentication for the moment due to security concerns. -- John Goerzen Tue, 17 Oct 2000 23:49:20 -0500 gopher (2.3.1-3) unstable; urgency=low * Added startopts as a gopherd conffile. -- John Goerzen Tue, 22 Aug 2000 22:25:25 -0500 gopher (2.3.1-2) unstable; urgency=low * Modify postinst to be easier for people to use if they already have a gopher user. * Fixed a bug in the restart option for the init script. * Made debian/copyright more verbose. -- John Goerzen Tue, 22 Aug 2000 21:57:26 -0500 gopher (2.3.1-1) unstable; urgency=low * Initial re-release. Package had been yanked after 1995 due to licensing. * UMN has just GPL'd gopher. * This package contains the security fix from bugtraq. * I have patched it to chroot() and setuid() earlier for better security. SIDE EFFECT: logging will not work if chroot() is used. * The extension chopping code was buggy, so I have removed it. * Made many fixes to eliminate compiler warnings and errors. * Removed redefinitions of sys_errlist * Included more header files to bring in relevant prototypes * Modified to use Debian paths * Modified configure.in to look for -lcrypt * Modified Makefile.config.in to use -Wall * Removed -DSETPROCTITLE from configure.in to make start-stop-daemon work better. * Added logrotate * Wrote Debian support from scratch. * AUTH.h includes crypt.h * gopherd/Makefile.in uses separate conffile dir (Debian path) * STRstring.h had a paren problem; gcc on alpha brought it out. Fixed. * String.h was missing some header files. * Other fixes. -- John Goerzen Thu, 17 Aug 2000 15:16:07 -0500 * The exact date of version 1.0 of UMN gopher's release is not logged, but this is about the right time. _________________________________________________________________ $Id: 3.0.0.html,v 1.4 2002/01/08 22:14:44 jgoerzen Exp $ References Visible links 1. http://groups.google.com/groups?selm=1991Sep10.020238.4751%40cs.umn.edu 2. gopher://gopherproject.org/1/Software/Gopher/ 3. http://gopherproject.org/ 4. gopher://gopher.floodgap.com/0/gopher/welcome 5. http://quux.org/hurg/hurg?selector=%2Fgopher%2Fwelcome&port=70&type=0&host=gopher.floodgap.com&username=A+Brief+Introduction+to+Gopherspace 6. gopher://gopher.quux.org/0/Software/Gopher/whygopher/gopher-manifesto.txt 7. http://quux.org/hurg/hurg?selector=0%2FSoftware%2FGopher%2Fwhygopher%2Fgopher-manifesto.txt&port=70&type=0&host=gopher.quux.org&username=Gopher+Manifesto 8. gopher://gopher.quux.org/1/devel/gopher 9. http://quux.org/hurg/hurg?selector=1%2Fdevel%2Fgopher&port=70&type=1&host=gopher.quux.org&username=Gopher 10. http://www.quux.org/give-me-gopher/ Hidden links: 11. mailto:jgoerzen@complete.org gopher/announcements/3.0.4.html0000644000000000000000000000570110762617110013441 0ustar Gopher (FurryTerror) 3.0.4 Released

Gopher FurryTerror Released

March 20, 2002

Today we release the Internet Gopher Server and Client version 3.0.4, two months after the release of our 10th anniversary 3.0 edition.

Since version 3.0, the following major changes have occured:

  • [portability] Builds on MacOS X natively
  • [portability] Builds on Solaris natively
  • [portability] Fixes to make install target
  • [portability] Many autoconf fixes
  • [bugfix] Proper gopher URL handling
  • [features] Out-of-box support for .ogg and .mp2 files
  • [features] Generate useful gopherd.conf as part of build
  • [portability] Major rewrite of regex system resulting in more portable code
  • [bugfix] Don't prematurely stop reading some documents
  • [portability] Builds on FreeBSD natively
  • [features] New FAQ

About Gopher

To learn about Gopher, please visit The Gopher Project [gopher/web], A Brief Introduction to Gopherspace [gopher/web], or The Gopher Manifesto [gopher/web].

Obtaining Gopher/Gopherd 3.0.4

Debian sid users may run "apt-get install gopher gopherd" beginning on approximately March 22.

The source distribution may be downloaded from:

Release Notes

  • You are encouraged to use ./configure --disable-auth to build.
  • BSD users should use "gmake" to build.
  • MacOS X (and in fact, all) users should read doc/PLATFORMS.

$Id: 3.0.4.html,v 1.3 2002/03/20 03:08:06 jgoerzen Exp $ gopher/conf.h0000644000000000000000000004331510762617110010335 0ustar /******************************************************************** * $Author: jgoerzen $ * $Revision: 1.3 $ * $Date: 2002/01/08 21:35:49 $ * $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/conf.h,v $ * $State: Exp $ * * Paul Lindner, University of Minnesota CIS. * * Copyright 1991, 1992 by the Regents of the University of Minnesota * see the file "Copyright" in the distribution for conditions of use. ********************************************************************* * MODULE: conf.h * More configuration parameters. ********************************************************************* * Revision History: * $Log: conf.h,v $ * Revision 1.3 2002/01/08 21:35:49 jgoerzen * Many changes: * Revved the version number * updated greeting * updated copyright notices * * Revision 1.2 2000/12/20 01:19:15 jgoerzen * Added patches from David Allen * * Revision 1.1.1.2 2000/12/18 11:05:07 mdallen * Removed ~50 instances of nested comments for commented out #define's * * Revision 1.1.1.1 2000/08/19 00:28:56 jgoerzen * Import from UMN Gopher 2.3.1 after GPLization * * Revision 3.23 1995/02/25 06:45:33 lindner * Add write time out * * Revision 3.22 1995/01/04 18:35:18 lindner * Added Danish as a default, more hlp and hlp_secure comments * * Revision 3.21 1994/12/07 23:54:20 lindner * mods for default language behavior on VMS * * Revision 3.20 1994/08/19 17:01:44 lindner * Fixes from Alan * * Revision 3.19 1994/07/18 19:04:40 lindner * Features from Alan and JL for Language Definitions and Gripes * * Revision 3.18 1994/06/09 04:06:28 lindner * F.Macrides 27-May-1994 Added option to allow 'd'elete only for * bookmarks via a DELETE_BOOKMARKS_ONLY compilation symbol. * * Added option to not read maps from the user rc file (i.e., only from * the system rc file) in SecureMode or NoShellMode, via the compilation * symbol SECURE_MAPS_GLOBALRC_ONLY. * * Added info about the NOMAIL compilation symbol in the VMS section. * * Put back -force_html %s for the lynx command in the VMS section * (really *is* needed with the current text/html code when foo.html * files are supplied by a gopher+ server from it's own data tree; other * Web browsers don't have that switch, and won't work right with gopher+ * servers until they can use the gopher+ extra stuff to determine the * mime type. * * Revision 3.17 1994/05/11 02:48:16 lindner * fix for VMS gopherprint defines * * Revision 3.16 1994/04/14 17:03:02 lindner * fix for html command * * Revision 3.15 1994/01/20 06:43:51 lindner * text/html viewer support for lynx 2.1 & CERN's www-linemode client * * Revision 3.14 1994/01/14 16:24:22 lindner * Added anonymous ftp type 'f' option * * Revision 3.13 1993/11/03 03:36:35 lindner * Mod for variable records * * Revision 3.12 1993/10/13 16:46:51 lindner * Updates for %s on defaults, vms mods * * Revision 3.11 1993/09/22 04:30:31 lindner * Add option to conf.h for Max WAIS documents * * Revision 3.10 1993/09/11 07:08:50 lindner * Mucho stuff for VMS, callable HTML stuff * * Revision 3.9 1993/08/28 04:59:03 lindner * Moved GLOBALRC definition to conf.h for VMS * * Revision 3.8 1993/08/19 20:32:59 lindner * add default remoterc, change read timeout to 1 minute * * Revision 3.7 1993/08/12 06:35:08 lindner * Don't override CONF_FILE definition, use mail instead of /bin/mail for VMS * * Revision 3.6 1993/08/04 22:07:42 lindner * Use /bin/mail instead of ucbmail * * Revision 3.5 1993/07/27 05:35:30 lindner * reading material for VMS, dead code removal * * Revision 3.4 1993/04/15 22:08:51 lindner * Remote user mods (Mitra) * * Revision 3.3 1993/03/18 23:11:16 lindner * 1.2b3 release * * Revision 3.2 1993/02/19 21:25:03 lindner * Updated pager command for gopher+ stuff. * * Revision 3.1.1.1 1993/02/11 18:02:49 lindner * Gopher+1.2beta release * * Revision 1.7 1993/02/09 22:49:34 lindner * Fixes for new mapping thing * * Revision 1.6 1993/01/08 23:04:48 lindner * Changed TN3270_COMMAND for Multinet * * Revision 1.5 1992/12/31 05:32:43 lindner * Added mods for VMS * * Revision 1.4 1992/12/22 21:45:26 lindner * Fixed bug with that zcat code I just added... * * Revision 1.3 1992/12/21 20:27:25 lindner * Added #ifdef to make zcat changable.. * * Revision 1.2 1992/12/13 05:56:32 lindner * Added options for connection time-out code in the server (mtm) * * Revision 1.1 1992/12/11 19:01:58 lindner * Gopher1.1 Release * *********************************************************************/ /* * Defaults for the client program * On startup the client will contact either the gopher server * CLIENT1_HOST or CLIENT2_HOST randomly. * * Set CLIENT2_PORT to 0 if you only want one root machine */ #define CLIENT1_HOST "gopherproject.org" #define CLIENT1_PATH "/Software/Gopher" #define CLIENT1_PORT 70 #define CLIENT2_HOST "nonexistant" #define CLIENT2_PATH "nonexistant" #define CLIENT2_PORT 0 /* define CLIENT1_HOST "gopher.tc.umn.edu" define CLIENT2_HOST "gopher2.tc.umn.edu" define CLIENT1_PORT 70 define CLIENT2_PORT 70 */ /* * Defaults for the client's Gopher server aFTP gateway. * * On command 'f' the client will prompt for an aFTP Host * and create a directory for it via the gateway. * You can optionally enter a selector for a particular * directory on the aFTP Host, and the gateway will return * that instead of the Host's root directory. * * Set AFTP_HOST to your Gopher server with the gateway implemented * * Set AFTP_PORT to its port number */ #define AFTP_HOST "gopher-gw.micro.umn.edu" #define AFTP_PORT 70 /* * Default language for client when multiple language views are available * * (This is a gopher+ language code - see object/VIews.c for more examples) */ #define DEFAULT_LANG "En_US" /* English (US) */ /* #define DEFAULT_LANG "Da_DK" Danish */ /* #define DEFAULT_LANG "De_DE" German */ /* #define DEFAULT_LANG "En_GB" English (UK) */ /* #define DEFAULT_LANG "Es_ES" Spanish */ /* #define DEFAULT_LANG "Fr_FR" French */ /* #define DEFAULT_LANG "It_IT" Italian */ /* #define DEFAULT_LANG "Jp_JP" Japanese */ /* #define DEFAULT_LANG "No_NO" Norwegian */ /* #define DEFAULT_LANG "Sv_SE" Swedish */ /* * Define this if you want the 'd'elete command restricted to bookmarks */ /* #define DELETE_BOOKMARKS_ONLY */ /* * Define this if you want only the system rc file read for maps when * the client is invoked in SecureMode or NoShellMode (bookmarks in the * user account's gopherrc will still be read. */ /* #define SECURE_MAPS_GLOBALRC_ONLY */ /* * Define this if you want the spawn to shell command disabled regardless * of whether SecureMode or NoShellMode are set. */ /* #define NEVERSPAWN */ /* * Define this if you want to disable access to the Options menus under all * circumstances. */ /* #define NEVERSETOPTIONS */ /* * Define this if you want the link's tuple and URL decription (as created * by decribe_gopher() for the '=' command) inserted at the tops of gripe * messages. */ #define DESCRIBE_GOPHER_GRIPE /* */ /* * Define this if you want a To: prompt containing the administrator's * address included for the gripe command. If included, the user can * modify it to have the gripe sent to a different address. */ /* #define MODIFIABLE_GRIPE_TO */ /* * Define this if you want gripes disabled in SecureMode and NoShellMode */ /* #define NOGRIPE_SECURE */ /* Define LOCAL_GRIPE_ADMINISTRATOR and use your site's Gopher Administrator * address if you want gripes sent there for Gopher0 servers (or Gopher+ * servers without Admin info for the link). If DOMAIN_FOR_LOCAL_GRIPES is * also defined, only items on hosts with domain names containing that string * will generate mail to your LOCAL_GRIPE_ADMINISTRATOR. If * LOCAL_GRIPE_ADMINISTRATOR is not defined, or the item being griped about * isn't on a server in the DOMAIN_FOR_LOCAL_GRIPES, the user will get a * screen message that the link's administrator is unknown (unless * MODIFIABLE_GRIPE_TO is on, in which case the address field is set to ""). */ /* #define LOCAL_GRIPE_ADMINISTRATOR "" */ /* #define DOMAIN_FOR_LOCAL_GRIPES "host.domain" */ /* #define DOMAIN_FOR_LOCAL_GRIPES CLIENT1_HOST */ /* * Override some defaults for various platforms */ #if defined(sun) #define PLAY_COMMAND "play -v 40 -" #endif #if defined(NeXT) #define NO_VPRINTF #define PLAY_COMMAND "play -v 40 -" #endif #if defined(_SEQUENT_) #define PRINTER_COMMAND "lp" #endif #if defined(VMS) /* * VMS systems use VARIABLE length records for text files and * FIXED 512 records for binary files that are saved or cached. * Comment this out if you want to use stream_LF format instead. * The Bookmark (sys$login:gopherrc.) and configuration * (GopherP_Dir:gopher.rc and GopherP_Dir:gopherremote.rc, see * below) files are stream_LF regardless of how this program * logical is set. */ #define VMSRecords /* */ /* * Define this if you have an old version of VAXC/OpenVMS * which lacks the mktime() function. */ /* #define NO_MKTIME */ /* * The "builtin" pager is the default VMS utility for displaying text. * Alternatively, define "TPU" for invoking callable TPU. Its /READ_ONLY * and /NOJOURNAL qualifiers are added internally by the software. * A still better alternative is to acquire MOST, optimized for Gopher and * C SWING, via anonymous FTP from narnia.memst.edu. Define it with the -n * and +s switches. */ #define PAGER_COMMAND "builtin" /* */ /* #define PAGER_COMMAND "TPU/NOINI/COM=GopherP_Dir:GOPHER.TPU %s" */ /* #define PAGER_COMMAND "most -n +s %s" */ /* * MAIL_COMMAND is the program logical for the mail verb. * MAIL_ADRS is the argument for an sprintf() command that can add * "prefix%""ADDRESS""" to the Internet mail address given by the * user. It is structured for PMDF's IN%"INTERNET_ADDRESS" * scheme. The %s is replaced with the address given by the * user. No conversion will be done if a DECNET or simple * VMS MAIL address is given. The default definition of "%s" for * MAIL_ADRS does not provide translation. If you want to use * PMDF's prefix of IN%, Message Exchange's (MX's) prefix of MX%, * MultiNet's prefix of SMTP%, or Wollongong's prefix of WINS%, * comment out the default definition of MAIL_ADRS and uncomment * the appropriate line below to your selected system. */ #define MAIL_COMMAND "mail" #define MAIL_ADRS "%s" /* */ /* #define MAIL_ADRS "\"IN%%\"\"%s\"\"\"" */ /* #define MAIL_ADRS "\"MX%%\"\"%s\"\"\"" */ /* #define MAIL_ADRS "\"WINS%%\"\"%s\"\"\"" */ /* #define MAIL_ADRS "\"SMTP%%\"\"%s\"\"\"" */ /* * Use MultiNet's command verb for telnet and tn3270, so that it can * co-exist with other TCPIP transports on VMS systems. */ #if defined(MULTINET) # define TELNET_COMMAND "multinet telnet" # define TN3270_COMMAND "multinet telnet/tn3270" #else # define TELNET_COMMAND "telnet" # define TN3270_COMMAND "tn3270" #endif /* * The Printer Command may be setup to use a command procedure to save the * file before printing it. This avoids the problem of Gopher removing the * temporary file before it can be printed. For example set up a command * procedure in a public place (e.g., GopherP_Dir:GOPHERPRINT.COM) containing: * $ file="sys$scratch:gopher_"+f$extract(21,2,f$time())+".tmp" * $ copy 'p1' 'file' * $ print 'f$trnlnm("GOPHERQUEUE")' /delete/noidentify 'file' * (Note that the logical GOPHERQUEUE can be used to set options like * default queue name or form type eg DEFINE/JOB GOPHERQUEUE "/queue=que1") * and then define the Printer Command appropriately */ #define PRINTER_COMMAND "print %s" /* */ /* #define PRINTER_COMMAND "@GopherP_Dir:GOPHERPRINT %s" */ /* * Sounds are not implemented on VMS. * They can only be 's'aved or 'D'ownloaded. */ #define PLAY_COMMAND "- none -" /* * If IMAGE_COMMAND is defined as "- none -" * a print command is not added to its default map, * and images can only be 's'aved or 'D'ownloaded. */ #define IMAGE_COMMAND "xv %s" /* */ /* #define IMAGE_COMMAND "- none -" */ /* * The builtin HTML browser is not yet functional. * * Lynx is a Curses-based HTML browser, available from ftp2.cc.ukans.edu, * which was initially designed to use Gopher as its server and still works * well with this software (on both VMS and Unix platforms). * * The WWW Line-Mode browser is avaialble from info.cern.ch * */ #define HTML_COMMAND "- none -" /* #define HTML_COMMAND "lynx -force_html %s" lynx 2.2 or greater */ /* #define HTML_COMMAND "www" WWW Line-Mode client */ /* * Point these to the default configuration files for view command maps: * $ define/system "GopherP_Dir" "device:[directory]" * Make sure the files have commands mapped appropriately for VMS, * and have any maps which don't apply commented out. * */ #define GLOBALRC "GopherP_Dir:gopher.rc" #define REMOTERC "GopherP_Dir:gopherremote.rc" /* * Define the *device* where shared images of message files will be * found. Since these are architecture-specific, __ALPHA versions * need to be different than VAX versions, so if you have both on your * cluster and need a client for each of them, you'll need to compile * code for each, with a different directory for each one. The ":.EXE" * *must* be present; the device specification may be changed (no directory * allowed). */ #ifdef __ALPHA #define GOPHERMSGS_DEV "GopherP_Dir:.EXE" /* */ #else #define GOPHERMSGS_DEV "GopherP_Dir:.EXE" /* */ #endif /* * Define the default language to use when LC_MESSAGES selects multiple * message files. If the default language is one of the multiple message * files selected, then no choice is offered to start the client (as in * the case when no message files or only one is detected), but the list * of possible languages is retained and can be invoked with the L keystroke. * * If multiple message files are selected but no default language is defined, * a menu of available languages always will be displayed at startup of the * gopher client. * * Note this is the language code imbedded in the default message file's * *filename* -- it is not necessarily a gopher+ language code as in the * DEFAULT_LANG definition above. * * See [.GOPHER.LOCALES]README.VMS for more information. */ #define GOPHERMSGS_DEFAULT "EN_US" /* English_US */ /* #define GOPHERMSGS_DEFAULT "DE_DE" German_DE */ /* #define GOPHERMSGS_DEFAULT "DK" Danish */ /* #define GOPHERMSGS_DEFAULT "ES_ES" Spanish_ES */ /* #define GOPHERMSGS_DEFAULT "ES_MX" Spanish_MX */ /* #define GOPHERMSGS_DEFAULT "IT" Italian */ /* #define GOPHERMSGS_DEFAULT "FR" French */ /* #define GOPHERMSGS_DEFAULT "PIGLATIN" Oy-vay */ /* #define GOPHERMSGS_DEFAULT "SV" Swedish */ /* * Point this to the on-line Gopher+ help file. It will be used if * a message catalog is not implemented, or if the implemented message * catalog does not yet have a help file for the corresponding language. */ #define GOPHERHELP "GopherP_Dir:gopher.hlp" /* * Define this and point it to an edited version of the gopher.hlp file * which has the commands disabled in SecureMode deleted. Otherwise, the * file pointed to by GOPHERHELP will be used. If any message catalogs are * to be implemented and they have help files for the corresponding language, * edit those, and make sure each message number 224 (226 for Unix) points to * the correct help file location and name, so that it will be used instead. */ /* #define GOPHERHELP_SECURE "GopherP_Dir:gopher.hlp_secure" */ /* * Define this if you want to disable mailing of documents in SecurMode (-s) * and NoShellMode (-S). Printing and saving to disk are always disabled for * those ("remote user") modes. */ /* #define NOMAIL */ /* * Client logging via syslog() code has been ported to VMS systems * with MULTINET. See [.doc]clientlogging.vms for more information. * Check out the code in [.gopher]ourutils.c if you think you might * be able to port it to other TCPIP packages. * * Define CLIENT_LOGGER to log client requests issued to servers. * Define TELNET_TRACE to trace and log telnet connections by the client. */ /* #define CLIENT_LOGGER */ /* #define TELNET_TRACE */ #endif /* VMS (Have you noticed how verbose VMSers tend to be?!?!?) */ /* * Now set the parameters, only if not set above... */ #ifndef PAGER_COMMAND #define PAGER_COMMAND "builtin" #endif #ifndef MAIL_COMMAND #define MAIL_COMMAND "/bin/mail" #endif #ifndef TELNET_COMMAND #define TELNET_COMMAND "telnet" #endif #ifndef TN3270_COMMAND #define TN3270_COMMAND "tn3270" #endif #ifndef PRINTER_COMMAND #define PRINTER_COMMAND "lpr" #endif #ifndef PLAY_COMMAND #define PLAY_COMMAND "/bin/false" #endif #ifndef MIME_COMMAND #define MIME_COMMAND "metamail -P" #endif #ifndef IMAGE_COMMAND /* #define IMAGE_COMMAND "xloadimage -fork %s"*/ #define IMAGE_COMMAND "xv %s" #endif #ifndef HTML_COMMAND /*** See the VMS HTML section for info on obtaining lynx or www ***/ #define HTML_COMMAND "- none -" /* */ /* #define HTML_COMMAND "lynx -force_html %s" lynx 2.1 or greater */ /* #define HTML_COMMAND "www" WWW Line-Mode client */ #endif #ifndef REMOTERC #define REMOTERC "/usr/local/lib/gopherrc.remote" #endif /****************** gopherd configuration ***********************/ /* * The maximum number of hits to return from a query to a * WAIS index. */ #define WAISMAXHITS 40 /* * The load average at which to restrict connections */ #define MAXLOAD 10.0 /* * Return type for signal() */ #define SIGRETTYPE void /* * Timeout for network reads (1 minute) */ #define READTIMEOUT (1 * 60) /* * Timeout for network writes (3 minute) */ #define WRITETIMEOUT (3 * 60) /* We need to define this since inetd.conf can only have a few arguments, and we need lots of them */ #if !defined(CONF_FILE) # define CONF_FILE "/usr/local/etc/gopherd.conf" #endif gopher/config.guess0000644000000000000000000003736110762617110011560 0ustar #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc. # # 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 2 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, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # 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. # Written by Per Bothner . # The master version of this file is at the FSF in /home/gd/gnu/lib. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you # don't specify an explicit system type (host/target name). # # Only a few systems have been added to this list; please add others # (but try to keep the structure clean). # # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 8/24/94.) 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 trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15 # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in alpha:OSF1:V*:*) # After 1.2, OSF1 uses "V1.3" for uname -r. echo alpha-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^V//'` exit 0 ;; alpha:OSF1:*:*) # 1.2 uses "1.2" for uname -r. echo alpha-dec-osf${UNAME_RELEASE} exit 0 ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit 0 ;; amiga:NetBSD:*:*) echo m68k-cbm-netbsd${UNAME_RELEASE} exit 0 ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit 0;; Pyramid*:OSx*:*:*) if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit 0 ;; sun4*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; i86pc:SunOS:5.*:*) echo i386-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; 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 0 ;; 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 0 ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit 0 ;; atari*:NetBSD:*:*) echo m68k-atari-netbsd${UNAME_RELEASE} exit 0 ;; sun3*:NetBSD:*:*) echo m68k-sun-netbsd${UNAME_RELEASE} exit 0 ;; mac68k:NetBSD:*:*) echo m68k-apple-netbsd${UNAME_RELEASE} exit 0 ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit 0 ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit 0 ;; mips:*:4*:UMIPS) echo mips-mips-riscos4sysv exit 0 ;; mips:*:5*:RISCos) echo mips-mips-riscos${UNAME_RELEASE} exit 0 ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit 0 ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit 0 ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit 0 ;; AViiON:dgux:*:*) if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \ -o ${TARGET_BINARY_INTERFACE}x = x ] ; then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi exit 0 ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit 0 ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit 0 ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit 0 ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit 0 ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit 0 ;; ????????: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 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i[34]86:AIX:*:*) echo i386-ibm-aix exit 0 ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then sed 's/^ //' << EOF >dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0 rm -f dummy.c dummy echo rs6000-ibm-aix3.2.5 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 0 ;; *:AIX:*:4) if /usr/sbin/lsattr -EHl proc0 | grep POWER >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=4.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit 0 ;; *:AIX:*:*) echo rs6000-ibm-aix exit 0 ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit 0 ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit 0 ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit 0 ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit 0 ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit 0 ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit 0 ;; 9000/[3478]??:HP-UX:*:*) case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/7?? | 9000/8?[79] ) HP_ARCH=hppa1.1 ;; 9000/8?? ) HP_ARCH=hppa1.0 ;; esac HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit 0 ;; 3050*:HI-UX:*:*) sed 's/^ //' << EOF >dummy.c #include 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-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0 rm -f dummy.c dummy echo unknown-hitachi-hiuxwe2 exit 0 ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit 0 ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit 0 ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit 0 ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit 0 ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit 0 ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit 0 ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit 0 ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit 0 ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit 0 ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit 0 ;; CRAY*X-MP:*:*:*) echo xmp-cray-unicos exit 0 ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} exit 0 ;; CRAY*C90:*:*:*) echo c90-cray-unicos${UNAME_RELEASE} exit 0 ;; CRAY-2:*:*:*) echo cray2-cray-unicos exit 0 ;; hp3[0-9][05]:NetBSD:*:*) echo m68k-hp-netbsd${UNAME_RELEASE} exit 0 ;; i[34]86:BSD/386:*:* | *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:FreeBSD:*:*) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit 0 ;; *:NetBSD:*:*) echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` exit 0 ;; *:GNU:*:*) echo `echo ${UNAME_MACHINE}|sed -e 's,/.*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit 0 ;; *:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. ld_help_string=`ld --help 2>&1` if echo $ld_help_string | grep >/dev/null 2>&1 "supported emulations: elf_i[345]86"; then echo "${UNAME_MACHINE}-unknown-linux" ; exit 0 elif echo $ld_help_string | grep >/dev/null 2>&1 "supported emulations: i[345]86linux"; then echo "${UNAME_MACHINE}-unknown-linuxaout" ; exit 0 elif echo $ld_help_string | grep >/dev/null 2>&1 "supported emulations: i[345]86coff"; then echo "${UNAME_MACHINE}-unknown-linuxcoff" ; exit 0 elif test "${UNAME_MACHINE}" = "alpha" ; then echo alpha-unknown-linux ; exit 0 else # Either a pre-BFD a.out linker (linuxoldld) or one that does not give us # useful --help. Gcc wants to distinguish between linuxoldld and linuxaout. test ! -d /usr/lib/ldscripts/. \ && echo "${UNAME_MACHINE}-unknown-linuxoldld" && exit 0 # Determine whether the default compiler is a.out or elf cat >dummy.c </dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0 rm -f dummy.c dummy fi ;; # 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. i[34]86:DYNIX/ptx:4*:*) echo i386-sequent-sysv4 exit 0 ;; i[34]86:*:4.*:* | i[34]86:SYSTEM_V:4.*:*) if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE} else echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE} fi exit 0 ;; i[34]86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 echo ${UNAME_MACHINE}-unknown-sco$UNAME_REL else echo ${UNAME_MACHINE}-unknown-sysv32 fi exit 0 ;; Intel:Mach:3*:*) echo i386-unknown-mach3 exit 0 ;; paragon:*:*:*) echo i860-intel-osf1 exit 0 ;; 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 0 ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit 0 ;; M680[234]0:*:R3V[567]*:*) test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; 3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0) uname -p 2>/dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4.3 && exit 0 ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) uname -p 2>/dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4 && exit 0 ;; m680[234]0:LynxOS:2.[23]*:*) echo m68k-lynx-lynxos${UNAME_RELEASE} exit 0 ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit 0 ;; i[34]86:LynxOS:2.[23]*:*) echo i386-lynx-lynxos${UNAME_RELEASE} exit 0 ;; TSUNAMI:LynxOS:2.[23]*:*) echo sparc-lynx-lynxos${UNAME_RELEASE} exit 0 ;; rs6000:LynxOS:2.[23]*:*) echo rs6000-lynx-lynxos${UNAME_RELEASE} exit 0 ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit 0 ;; *: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 0 ;; *:A/UX:3.*:*) echo "${UNAME_MACHINE}-apple-aux${UNAME_RELEASE}" exit 0 ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 cat >dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; printf ("%s-next-nextstep%s\n", __ARCHITECTURE__, version==2 ? "2" : "3"); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-unknown-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) #if !defined (ultrix) printf ("vax-dec-bsd\n"); exit (0); #else printf ("vax-dec-ultrix\n"); exit (0); #endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy && rm dummy.c dummy && exit 0 rm -f dummy.c dummy # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit 0 ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit 0 ;; c34*) echo c34-convex-bsd exit 0 ;; c38*) echo c38-convex-bsd exit 0 ;; c4*) echo c4-convex-bsd exit 0 ;; esac fi #echo '(Unable to guess system type)' 1>&2 exit 1 gopher/config.h.in0000644000000000000000000001646213550124443011265 0ustar /* config.h.in. Generated automatically from configure.in by autoheader 2.13. */ /* Define to empty if the keyword does not work. */ #undef const /* Define for DGUX with . */ #undef DGUX /* Define if the `getloadavg' function needs to be run setuid or setgid. */ #undef GETLOADAVG_PRIVILEGED /* Define to `int' if doesn't define. */ #undef gid_t /* Define if you don't have vprintf but do have _doprnt. */ #undef HAVE_DOPRNT /* Define if your system has its own `getloadavg' function. */ #undef HAVE_GETLOADAVG /* Define if you have a working `mmap' system call. */ #undef HAVE_MMAP /* Define if you have the strcoll function and it is properly defined. */ #undef HAVE_STRCOLL /* Define if you have that is POSIX.1 compatible. */ #undef HAVE_SYS_WAIT_H /* Define if you have . */ #undef HAVE_VFORK_H /* Define if you have the vprintf function. */ #undef HAVE_VPRINTF /* Define if your struct nlist has an n_un member. */ #undef NLIST_NAME_UNION /* Define if you have . */ #undef NLIST_STRUCT /* Define to `int' if doesn't define. */ #undef pid_t /* Define as the return type of signal handlers (int or void). */ #undef RETSIGTYPE /* Define to `unsigned' if doesn't define. */ #undef size_t /* Define if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define on System V Release 4. */ #undef SVR4 /* Define if you can safely include both and . */ #undef TIME_WITH_SYS_TIME /* Define if your declares struct tm. */ #undef TM_IN_SYS_TIME /* Define to `int' if doesn't define. */ #undef uid_t /* Define for Encore UMAX. */ #undef UMAX /* Define for Encore UMAX 4.3 that has instead of . */ #undef UMAX4_3 /* Define vfork as fork if vfork does not work. */ #undef vfork /* Define if you have the bzero function. */ #undef HAVE_BZERO /* Define if you have the connect function. */ #undef HAVE_CONNECT /* Define if you have the fgetpwent function. */ #undef HAVE_FGETPWENT /* Define if you have the get_current_dir_name function. */ #undef HAVE_GET_CURRENT_DIR_NAME /* Define if you have the getcwd function. */ #undef HAVE_GETCWD /* Define if you have the gethostname function. */ #undef HAVE_GETHOSTNAME /* Define if you have the getloadavg function. */ #undef HAVE_GETLOADAVG /* Define if you have the getpagesize function. */ #undef HAVE_GETPAGESIZE /* Define if you have the getwd function. */ #undef HAVE_GETWD /* Define if you have the madvise function. */ #undef HAVE_MADVISE /* Define if you have the mkdir function. */ #undef HAVE_MKDIR /* Define if you have the mkstemp function. */ #undef HAVE_MKSTEMP /* Define if you have the mktime function. */ #undef HAVE_MKTIME /* Define if you have the putenv function. */ #undef HAVE_PUTENV /* Define if you have the re_comp function. */ #undef HAVE_RE_COMP /* Define if you have the regcomp function. */ #undef HAVE_REGCOMP /* Define if you have the regfree function. */ #undef HAVE_REGFREE /* Define if you have the select function. */ #undef HAVE_SELECT /* Define if you have the seteuid function. */ #undef HAVE_SETEUID /* Define if you have the setsid function. */ #undef HAVE_SETSID /* Define if you have the socket function. */ #undef HAVE_SOCKET /* Define if you have the strcasecmp function. */ #undef HAVE_STRCASECMP /* Define if you have the strcasestr function. */ #undef HAVE_STRCASESTR /* Define if you have the strcspn function. */ #undef HAVE_STRCSPN /* Define if you have the strdup function. */ #undef HAVE_STRDUP /* Define if you have the strerror function. */ #undef HAVE_STRERROR /* Define if you have the strftime function. */ #undef HAVE_STRFTIME /* Define if you have the strspn function. */ #undef HAVE_STRSPN /* Define if you have the strstr function. */ #undef HAVE_STRSTR /* Define if you have the strtol function. */ #undef HAVE_STRTOL /* Define if you have the sysconf function. */ #undef HAVE_SYSCONF /* Define if you have the tempnam function. */ #undef HAVE_TEMPNAM /* Define if you have the tzset function. */ #undef HAVE_TZSET /* Define if you have the wait3 function. */ #undef HAVE_WAIT3 /* Define if you have the waitpid function. */ #undef HAVE_WAITPID /* Define if you have the wattroff function. */ #undef HAVE_WATTROFF /* Define if you have the wattron function. */ #undef HAVE_WATTRON /* Define if you have the wstandend function. */ #undef HAVE_WSTANDEND /* Define if you have the wstandout function. */ #undef HAVE_WSTANDOUT /* Define if you have the header file. */ #undef HAVE_CRYPT_H /* Define if you have the header file. */ #undef HAVE_CTYPE_H /* Define if you have the header file. */ #undef HAVE_DIRENT_H /* Define if you have the header file. */ #undef HAVE_FCNTL_H /* Define if you have the header file. */ #undef HAVE_LIBGEN_H /* Define if you have the header file. */ #undef HAVE_LIMITS_H /* Define if you have the header file. */ #undef HAVE_LOCALE_H /* Define if you have the header file. */ #undef HAVE_MACH_MACH_H /* Define if you have the header file. */ #undef HAVE_MALLOC_H /* Define if you have the header file. */ #undef HAVE_NDIR_H /* Define if you have the header file. */ #undef HAVE_RE_COMP_H /* Define if you have the header file. */ #undef HAVE_REGEX_H /* Define if you have the header file. */ #undef HAVE_REGEXP_H /* Define if you have the header file. */ #undef HAVE_STDLIB_H /* Define if you have the header file. */ #undef HAVE_STRING_H /* Define if you have the header file. */ #undef HAVE_STRINGS_H /* Define if you have the header file. */ #undef HAVE_SYS_DIR_H /* Define if you have the header file. */ #undef HAVE_SYS_FILE_H /* Define if you have the header file. */ #undef HAVE_SYS_IOCTL_H /* Define if you have the header file. */ #undef HAVE_SYS_NDIR_H /* Define if you have the header file. */ #undef HAVE_SYS_PARAM_H /* Define if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define if you have the header file. */ #undef HAVE_SYS_TIME_H /* Define if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define if you have the header file. */ #undef HAVE_SYSLOG_H /* Define if you have the header file. */ #undef HAVE_TERM_H /* Define if you have the header file. */ #undef HAVE_TIME_H /* Define if you have the header file. */ #undef HAVE_UNISTD_H /* Define if you have the curses library (-lcurses). */ #undef HAVE_LIBCURSES /* Define if you have the dgc library (-ldgc). */ #undef HAVE_LIBDGC /* Define if you have the inet library (-linet). */ #undef HAVE_LIBINET /* Define if you have the m library (-lm). */ #undef HAVE_LIBM /* Define if you have the malloc library (-lmalloc). */ #undef HAVE_LIBMALLOC /* Define if you have the nsl library (-lnsl). */ #undef HAVE_LIBNSL /* Define if you have the nsl_s library (-lnsl_s). */ #undef HAVE_LIBNSL_S /* Define if you have the socket library (-lsocket). */ #undef HAVE_LIBSOCKET /* Define if you have the termcap library (-ltermcap). */ #undef HAVE_LIBTERMCAP gopher/config.sub0000644000000000000000000004311310762617110011213 0ustar #! /bin/sh # Configuration validation subroutine script, version 1.1. # Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # 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 2 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, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. # 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. # 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. # 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 # It is wrong to echo any other type of specification. if [ x$1 = x ] then echo Configuration name missing. 1>&2 echo "Usage: $0 CPU-MFR-OPSYS" 1>&2 echo "or $0 ALIAS" 1>&2 echo where ALIAS is a recognized configuration type. 1>&2 exit 1 fi # First pass through any local machine types. case $1 in *local*) echo $1 exit 0 ;; *) ;; esac # Separate what the user gave into CPU-COMPANY and OS (if any). basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ### 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 ) os= basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; 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. tahoe | i[345]86 | i860 | m68k | m68000 | m88k | ns32k | arm \ | arme[lb] | pyramid \ | tron | a29k | 580 | i960 | h8300 | hppa1.0 | hppa1.1 \ | alpha | we32k | ns16k | clipper | sparclite | i370 | sh \ | powerpc | powerpcle | sparc64 | 1750a | dsp16xx | mips64 | mipsel \ | pdp11 | mips64el | mips64orion | mips64orionel \ | sparc) basic_machine=$basic_machine-unknown ;; # 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. vax-* | tahoe-* | i[345]86-* | i860-* | m68k-* | m68000-* | m88k-* \ | sparc-* | ns32k-* | fx80-* | arm-* | c[123]* \ | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* | power-* \ | none-* | 580-* | cray2-* | h8300-* | i960-* | xmp-* | ymp-* \ | hppa1.0-* | hppa1.1-* | alpha-* | we32k-* | cydra-* | ns16k-* \ | pn-* | np1-* | xps100-* | clipper-* | orion-* | sparclite-* \ | pdp11-* | sh-* | powerpc-* | powerpcle-* | sparc64-* | mips64-* | mipsel-* \ | mips64el-* | mips64orion-* | mips64orionel-*) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-cbm ;; amigados) basic_machine=m68k-cbm os=-amigados ;; amigaunix | amix) basic_machine=m68k-cbm os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; balance) basic_machine=ns32k-sequent os=-dynix ;; 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 | ymp) basic_machine=ymp-cray os=-unicos ;; cray2) basic_machine=cray2-cray os=-unicos ;; crds | unos) basic_machine=m68k-crds ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; 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 ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-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 ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; i370-ibm* | ibm*) basic_machine=i370-ibm os=-mvs ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i[345]86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'` os=-sysv32 ;; i[345]86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'` os=-sysv4 ;; i[345]86v) basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'` os=-sysv ;; i[345]86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'` os=-solaris2 ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; miniframe) basic_machine=m68000-convergent ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; 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 ;; 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 ;; np1) basic_machine=np1-gould ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pentium | p5 | p6) # We don't have specific support for the Intel Pentium (p6) followon yet, so just call it a Pentium basic_machine=i586-intel ;; pentium-* | p5-* | p6-*) # We don't have specific support for the Intel Pentium (p6) followon yet, so just call it a Pentium basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; k5) # We don't have specific support for AMD's K5 yet, so just call it a Pentium basic_machine=i586-amd ;; nexen) # We don't have specific support for Nexgen yet, so just call it a Pentium basic_machine=i586-nexgen ;; pn) basic_machine=pn-gould ;; power) basic_machine=rs6000-ibm ;; ppc) basic_machine=powerpc-unknown ;; ppc-*) 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/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; 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 ;; symmetry) basic_machine=i386-sequent os=-dynix ;; tower | tower-32) basic_machine=m68k-ncr ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; xmp) basic_machine=xmp-cray os=-unicos ;; xps | xps100) basic_machine=xps100-honeywell ;; 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. mips) basic_machine=mips-mips ;; romp) basic_machine=romp-ibm ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sparc) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; *) 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 # -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -unixware* | svr4*) os=-sysv4 ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux|'` ;; # 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* | -sunos | -sunos[345]* \ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -amigados* | -msdos* | -newsos* | -unicos* | -aos* \ | -nindy* | -vxworks* | -ebmon* | -hms* | -mvs* | -clix* \ | -riscos* | -linux* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -netbsd* | -freebsd* | -riscix* \ | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* ) # Remember, each alternative MUST END IN *, to match a version number. ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -ctix* | -uts*) os=-sysv ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -xenix) os=-xenix ;; -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 *-acorn) os=-riscix1.2 ;; arm*-semi) os=-aout ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-ibm) os=-aix ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigados ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-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 ;; *) 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 ;; -lynxos*) vendor=lynx ;; -aix*) vendor=ibm ;; -hpux*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs*) vendor=ibm ;; -ptx*) vendor=sequent ;; -vxworks*) vendor=wrs ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os gopher/configure0000755000000000000000000035401013550124443011143 0ustar #! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated automatically using autoconf version 2.13 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. # Defaults: ac_help= ac_default_prefix=/usr/local # Any additions from configure.in: ac_help="$ac_help --disable-debug controls whether debug text is compilied in" ac_help="$ac_help --enable-socks use socks library, requires -lsocks" ac_help="$ac_help --enable-locale use international localized msgs for the client" ac_help="$ac_help --enable-datadir=dir enable custom datadir (/gopher-data)" ac_help="$ac_help --enable-port=portnum enable custom port (70)" ac_help="$ac_help --enable-dl=dlpathname use Tim Cook's dl databases" ac_help="$ac_help --enable-opt=args Special optimization flags to pass to the compiler" ac_help="$ac_help --without-wais Don't try using WAIS (default: try)" # Initialize some variables set by options. # The variables have the same names as the options, with # dashes changed to underlines. build=NONE cache_file=./config.cache exec_prefix=NONE host=NONE no_create= nonopt=NONE no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= target=NONE verbose= x_includes=NONE x_libraries=NONE bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datadir='${prefix}/share' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' infodir='${prefix}/info' mandir='${prefix}/man' # Initialize some other variables. subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Maximum number of lines to put in a shell here document. ac_max_here_lines=12 ac_prev= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval "$ac_prev=\$ac_option" ac_prev= continue fi case "$ac_option" in -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; *) ac_optarg= ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case "$ac_option" in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir="$ac_optarg" ;; -build | --build | --buil | --bui | --bu) ac_prev=build ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build="$ac_optarg" ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file="$ac_optarg" ;; -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | --da=*) datadir="$ac_optarg" ;; -disable-* | --disable-*) ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` # Reject names that are not valid shell variable names. if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } fi ac_feature=`echo $ac_feature| sed 's/-/_/g'` eval "enable_${ac_feature}=no" ;; -enable-* | --enable-*) ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` # Reject names that are not valid shell variable names. if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } fi ac_feature=`echo $ac_feature| sed 's/-/_/g'` case "$ac_option" in *=*) ;; *) ac_optarg=yes ;; esac eval "enable_${ac_feature}='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix="$ac_optarg" ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he) # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat << EOF Usage: configure [options] [host] Options: [defaults in brackets after descriptions] Configuration: --cache-file=FILE cache test results in FILE --help print this message --no-create do not create output files --quiet, --silent do not print \`checking...' messages --version print the version of autoconf that created configure Directory and file names: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [same as prefix] --bindir=DIR user executables in DIR [EPREFIX/bin] --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] --libexecdir=DIR program executables in DIR [EPREFIX/libexec] --datadir=DIR read-only architecture-independent data in DIR [PREFIX/share] --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data in DIR [PREFIX/com] --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] --libdir=DIR object code libraries in DIR [EPREFIX/lib] --includedir=DIR C header files in DIR [PREFIX/include] --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] --infodir=DIR info documentation in DIR [PREFIX/info] --mandir=DIR man documentation in DIR [PREFIX/man] --srcdir=DIR find the sources in DIR [configure dir or ..] --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names EOF cat << EOF Host type: --build=BUILD configure for building on BUILD [BUILD=HOST] --host=HOST configure for HOST [guessed] --target=TARGET configure for TARGET [TARGET=HOST] Features and packages: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --x-includes=DIR X include files are in DIR --x-libraries=DIR X library files are in DIR EOF if test -n "$ac_help"; then echo "--enable and --with options recognized:$ac_help" fi exit 0 ;; -host | --host | --hos | --ho) ac_prev=host ;; -host=* | --host=* | --hos=* | --ho=*) host="$ac_optarg" ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir="$ac_optarg" ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir="$ac_optarg" ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir="$ac_optarg" ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir="$ac_optarg" ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst \ | --locals | --local | --loca | --loc | --lo) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) localstatedir="$ac_optarg" ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir="$ac_optarg" ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir="$ac_optarg" ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix="$ac_optarg" ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix="$ac_optarg" ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix="$ac_optarg" ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name="$ac_optarg" ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir="$ac_optarg" ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir="$ac_optarg" ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site="$ac_optarg" ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir="$ac_optarg" ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir="$ac_optarg" ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target="$ac_optarg" ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers) echo "configure generated by autoconf version 2.13" exit 0 ;; -with-* | --with-*) ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` # Reject names that are not valid shell variable names. if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } fi ac_package=`echo $ac_package| sed 's/-/_/g'` case "$ac_option" in *=*) ;; *) ac_optarg=yes ;; esac eval "with_${ac_package}='$ac_optarg'" ;; -without-* | --without-*) ac_package=`echo $ac_option|sed -e 's/-*without-//'` # Reject names that are not valid shell variable names. if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } fi ac_package=`echo $ac_package| sed 's/-/_/g'` eval "with_${ac_package}=no" ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes="$ac_optarg" ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries="$ac_optarg" ;; -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } ;; *) if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then echo "configure: warning: $ac_option: invalid host type" 1>&2 fi if test "x$nonopt" != xNONE; then { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } fi nonopt="$ac_option" ;; esac done if test -n "$ac_prev"; then { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } fi trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 # File descriptor usage: # 0 standard input # 1 file creation # 2 errors and warnings # 3 some systems may open it to /dev/tty # 4 used on the Kubota Titan # 6 checking for... messages and results # 5 compiler messages saved in config.log if test "$silent" = yes; then exec 6>/dev/null else exec 6>&1 fi exec 5>./config.log echo "\ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. " 1>&5 # Strip out --no-create and --no-recursion so they do not pile up. # Also quote any args containing shell metacharacters. ac_configure_args= for ac_arg do case "$ac_arg" in -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c) ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) ac_configure_args="$ac_configure_args '$ac_arg'" ;; *) ac_configure_args="$ac_configure_args $ac_arg" ;; esac done # NLS nuisances. # Only set these to C if already set. These must not be set unconditionally # because not all systems understand e.g. LANG=C (notably SCO). # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! # Non-C LC_CTYPE values break the ctype check. if test "${LANG+set}" = set; then LANG=C; export LANG; fi if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -rf conftest* confdefs.h # AIX cpp loses on an empty file, so make sure it contains at least a newline. echo > confdefs.h # A filename unique to this package, relative to the directory that # configure is in, which we can look for to find out if srcdir is correct. ac_unique_file=gopher/gopher.c # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then its parent. ac_prog=$0 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } else { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } fi fi srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` # Prefer explicitly selected file to automatically selected ones. if test -z "$CONFIG_SITE"; then if test "x$prefix" != xNONE; then CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" else CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then echo "loading site script $ac_site_file" . "$ac_site_file" fi done if test -r "$cache_file"; then echo "loading cache $cache_file" . $cache_file else echo "creating cache $cache_file" > $cache_file fi ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' cross_compiling=$ac_cv_prog_cc_cross ac_exeext= ac_objext=o if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then ac_n= ac_c=' ' ac_t=' ' else ac_n=-n ac_c= ac_t= fi else ac_n= ac_c='\c' ac_t= fi echo "----------------------------------------------------------------------" echo "You are about to build the Gopher system for Unix" echo "Please read the file doc/INSTALL for full information on" echo "building Gopher" echo " " echo "Gopher is copyrighted software, see the file Copyright in" echo "the distribution for more information and limitations." echo "----------------------------------------------------------------------" echo " " # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:556: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_CC="gcc" break fi done IFS="$ac_save_ifs" fi fi CC="$ac_cv_prog_CC" if test -n "$CC"; then echo "$ac_t""$CC" 1>&6 else echo "$ac_t""no" 1>&6 fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:586: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_prog_rejected=no ac_dummy="$PATH" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" break fi done IFS="$ac_save_ifs" if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# -gt 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift set dummy "$ac_dir/$ac_word" "$@" shift ac_cv_prog_CC="$@" fi fi fi fi CC="$ac_cv_prog_CC" if test -n "$CC"; then echo "$ac_t""$CC" 1>&6 else echo "$ac_t""no" 1>&6 fi if test -z "$CC"; then case "`uname -s`" in *win32* | *WIN32*) # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:637: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_CC="cl" break fi done IFS="$ac_save_ifs" fi fi CC="$ac_cv_prog_CC" if test -n "$CC"; then echo "$ac_t""$CC" 1>&6 else echo "$ac_t""no" 1>&6 fi ;; esac fi test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 echo "configure:669: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF #line 680 "configure" #include "confdefs.h" main(){return(0);} EOF if { (eval echo configure:685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then ac_cv_prog_cc_cross=no else ac_cv_prog_cc_cross=yes fi else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 ac_cv_prog_cc_works=no fi rm -fr conftest* ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' cross_compiling=$ac_cv_prog_cc_cross echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 echo "configure:711: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 echo "configure:716: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no fi fi echo "$ac_t""$ac_cv_prog_gcc" 1>&6 if test $ac_cv_prog_gcc = yes; then GCC=yes else GCC= fi ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 echo "configure:744: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then ac_cv_prog_cc_g=yes else ac_cv_prog_cc_g=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 if test "$ac_test_CFLAGS" = set; then CFLAGS="$ac_save_CFLAGS" elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do if test -f $ac_dir/install-sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f $ac_dir/install.sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break fi done if test -z "$ac_aux_dir"; then { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } fi ac_config_guess=$ac_aux_dir/config.guess ac_config_sub=$ac_aux_dir/config.sub ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 echo "configure:806: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" for ac_dir in $PATH; do # Account for people who put trailing slashes in PATH elements. case "$ac_dir/" in /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do if test -f $ac_dir/$ac_prog; then if test $ac_prog = install && grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : else ac_cv_path_install="$ac_dir/$ac_prog -c" break 2 fi fi done ;; esac done IFS="$ac_save_IFS" fi if test "${ac_cv_path_install+set}" = set; then INSTALL="$ac_cv_path_install" else # As a last resort, use the slow shell script. We don't cache a # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the path is relative. INSTALL="$ac_install_sh" fi fi echo "$ac_t""$INSTALL" 1>&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 echo "configure:859: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else rm -f conftestdata if ln -s X conftestdata 2>/dev/null then rm -f conftestdata ac_cv_prog_LN_S="ln -s" else ac_cv_prog_LN_S=ln fi fi LN_S="$ac_cv_prog_LN_S" if test "$ac_cv_prog_LN_S" = "ln -s"; then echo "$ac_t""yes" 1>&6 else echo "$ac_t""no" 1>&6 fi # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:882: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_RANLIB="ranlib" break fi done IFS="$ac_save_ifs" test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" fi fi RANLIB="$ac_cv_prog_RANLIB" if test -n "$RANLIB"; then echo "$ac_t""$RANLIB" 1>&6 else echo "$ac_t""no" 1>&6 fi echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 echo "configure:910: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftestmake <<\EOF all: @echo 'ac_maketemp="${MAKE}"' EOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` if test -n "$ac_maketemp"; then eval ac_cv_prog_make_${ac_make}_set=yes else eval ac_cv_prog_make_${ac_make}_set=no fi rm -f conftestmake fi if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then echo "$ac_t""yes" 1>&6 SET_MAKE= else echo "$ac_t""no" 1>&6 SET_MAKE="MAKE=${MAKE-make}" fi echo $ac_n "checking for main in -lm""... $ac_c" 1>&6 echo "configure:938: checking for main in -lm" >&5 ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 fi ###################################################################### # Check whether --enable-debug or --disable-debug was given. if test "${enable_debug+set}" = set; then enableval="$enable_debug" DEBUGGING=$enableval else DEBUGGING="" fi if test "$DEBUGGING" = yes; then DEBUGGING="-DDEBUGGING" fi ###################################################################### HAVE_SOCKS=0 # Check whether --enable-socks or --disable-socks was given. if test "${enable_socks+set}" = set; then enableval="$enable_socks" HAVE_SOCKS=1 else HAVE_SOCKS=0 fi if test "$HAVE_SOCKS" = 1; then echo $ac_n "checking for main in -lsocks""... $ac_c" 1>&6 echo "configure:1011: checking for main in -lsocks" >&5 ac_lib_var=`echo socks'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lsocks $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 SOCKSLIBS="-lsocks"; SOCKSFLAGS="-Dconnect=Rconnect -Dgetsockname=Rgetsockname -Dbind=Rbind -Daccept=Raccept -Dlisten=Rlisten -Dselect=Rselect" else echo "$ac_t""no" 1>&6 fi fi ###################################################################### GINTERNATIONAL="" # Check whether --enable-locale or --disable-locale was given. if test "${enable_locale+set}" = set; then enableval="$enable_locale" GINTERNATIONAL="-DGINTERNATIONAL" else GINTERNATIONAL="" fi ###################################################################### GOPHER_DATA="/gopher-data" # Check whether --enable-datadir or --disable-datadir was given. if test "${enable_datadir+set}" = set; then enableval="$enable_datadir" GOPHER_DATA="$enableval" else GOPHER_DATA="/gopher-data" fi ###################################################################### GOPHER_PORT=70 # Check whether --enable-port or --disable-port was given. if test "${enable_port+set}" = set; then enableval="$enable_port" GOPHER_PORT="$enableval" else GOPHER_PORT=70 fi ###################################################################### # Check whether --enable-dl or --disable-dl was given. if test "${enable_dl+set}" = set; then enableval="$enable_dl" DLPATH="$enableval";DLOBJS="$enableval/getdesc.o $enableval/enddesc.o";SERVEROPTS="$SERVEROPTS -DDL" else : fi ###################################################################### # Check whether --enable-opt or --disable-opt was given. if test "${enable_opt+set}" = set; then enableval="$enable_opt" OPT="$enableval" else OPT="$CFLAGS" fi ###################################################################### # If we can't find connect, try looking in -lsocket, -lnsl, and -linet. # The Irix 5 libc.so has connect and gethostbyname, but Irix 5 also has # libsocket.so which has a bad implementation of gethostbyname (it # only looks in /etc/hosts), so we only look for -lsocket if we need # it. unset ac_cv_func_connect echo $ac_n "checking for connect""... $ac_c" 1>&6 echo "configure:1118: checking for connect" >&5 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char connect(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_connect) || defined (__stub___connect) choke me #else connect(); #endif ; return 0; } EOF if { (eval echo configure:1146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_connect=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_connect=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then echo "$ac_t""yes" 1>&6 : else echo "$ac_t""no" 1>&6 case $LIBS in *-lnsl*) ;; *) echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6 echo "configure:1166: checking for main in -lnsl_s" >&5 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lnsl_s $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 fi ;; esac case $LIBS in *-lnsl*) ;; *) echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6 echo "configure:1212: checking for main in -lnsl" >&5 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 fi ;; esac case $LIBS in *-lsocket*) ;; *) echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 echo "configure:1258: checking for connect in -lsocket" >&5 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 fi ;; esac case $LIBS in *-linet*) ;; *) echo $ac_n "checking for connect in -linet""... $ac_c" 1>&6 echo "configure:1308: checking for connect in -linet" >&5 ac_lib_var=`echo inet'_'connect | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-linet $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 fi ;; esac unset ac_cv_func_connect for ac_func in connect do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 echo "configure:1360: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else $ac_func(); #endif ; return 0; } EOF if { (eval echo configure:1388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_$ac_func=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 fi done fi echo $ac_n "checking for gethostname""... $ac_c" 1>&6 echo "configure:1416: checking for gethostname" >&5 if eval "test \"`echo '$''{'ac_cv_func_gethostname'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char gethostname(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_gethostname) || defined (__stub___gethostname) choke me #else gethostname(); #endif ; return 0; } EOF if { (eval echo configure:1444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_gethostname=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_gethostname=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'gethostname`\" = yes"; then echo "$ac_t""yes" 1>&6 : else echo "$ac_t""no" 1>&6 LIBOBJS="$LIBOBJS hostname.o" fi ###################################################################### with_wais=1 # Check whether --with-wais or --without-wais was given. if test "${with_wais+set}" = set; then withval="$with_wais" with_wais=1 else with_wais=0 fi LDFLAGS=$OLDLDFLAGS echo $ac_n "checking for re_comp in -lcompat""... $ac_c" 1>&6 echo "configure:1483: checking for re_comp in -lcompat" >&5 ac_lib_var=`echo compat'_'re_comp | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lcompat $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 REGEXLIBS="$REGEXLIBS -lcompat" else echo "$ac_t""no" 1>&6 fi ###################################################################### echo $ac_n "checking for main in -lmalloc""... $ac_c" 1>&6 echo "configure:1525: checking for main in -lmalloc" >&5 ac_lib_var=`echo malloc'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lmalloc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_lib=HAVE_LIB`echo malloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 fi echo $ac_n "checking for main in -lcurses""... $ac_c" 1>&6 echo "configure:1570: checking for main in -lcurses" >&5 ac_lib_var=`echo curses'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lcurses $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 CLIENTLIBS="$CLIENTLIBS -lcurses" else echo "$ac_t""no" 1>&6 fi echo $ac_n "checking for main in -ltermcap""... $ac_c" 1>&6 echo "configure:1606: checking for main in -ltermcap" >&5 ac_lib_var=`echo termcap'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-ltermcap $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 CLIENTLIBS="$CLIENTLIBS -ltermcap" else echo "$ac_t""no" 1>&6 fi ac_header_dirent=no for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 echo "configure:1647: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> int main() { DIR *dirp = 0; ; return 0; } EOF if { (eval echo configure:1660: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 fi done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 echo "configure:1685: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 LIBS="$LIBS -ldir" else echo "$ac_t""no" 1>&6 fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 echo "configure:1726: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 LIBS="$LIBS -lx" else echo "$ac_t""no" 1>&6 fi fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 echo "configure:1768: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # This must be in double quotes, not single quotes, because CPP may get # substituted into the Makefile and "${CC-cc}" will confuse make. CPP="${CC-cc} -E" # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1789: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1806: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1823: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* CPP=/lib/cpp fi rm -f conftest* fi rm -f conftest* fi rm -f conftest* ac_cv_prog_CPP="$CPP" fi CPP="$ac_cv_prog_CPP" else ac_cv_prog_CPP="$CPP" fi echo "$ac_t""$CPP" 1>&6 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 echo "configure:1848: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include #include #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1861: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* ac_cv_header_stdc=yes else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_header_stdc=no fi rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "memchr" >/dev/null 2>&1; then : else rm -rf conftest* ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "free" >/dev/null 2>&1; then : else rm -rf conftest* ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF if { (eval echo configure:1928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* ac_cv_header_stdc=no fi rm -fr conftest* fi fi fi echo "$ac_t""$ac_cv_header_stdc" 1>&6 if test $ac_cv_header_stdc = yes; then cat >> confdefs.h <<\EOF #define STDC_HEADERS 1 EOF fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 echo "configure:1952: checking for sys/wait.h that is POSIX.1 compatible" >&5 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include #ifndef WEXITSTATUS #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) #endif #ifndef WIFEXITED #define WIFEXITED(stat_val) (((stat_val) & 255) == 0) #endif int main() { int s; wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF if { (eval echo configure:1973: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_header_sys_wait_h=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6 if test $ac_cv_header_sys_wait_h = yes; then cat >> confdefs.h <<\EOF #define HAVE_SYS_WAIT_H 1 EOF fi for ac_hdr in strings.h string.h sys/param.h term.h re_comp.h regex.h crypt.h fcntl.h time.h ctype.h limits.h locale.h sys/types.h sys/stat.h sys/file.h sys/ioctl.h sys/time.h syslog.h unistd.h malloc.h stdlib.h libgen.h regexp.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo "configure:1997: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:2007: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 fi done echo $ac_n "checking for working const""... $ac_c" 1>&6 echo "configure:2035: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; } ; return 0; } EOF if { (eval echo configure:2089: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_c_const=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_c_const" 1>&6 if test $ac_cv_c_const = no; then cat >> confdefs.h <<\EOF #define const EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 echo "configure:2110: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "uid_t" >/dev/null 2>&1; then rm -rf conftest* ac_cv_type_uid_t=yes else rm -rf conftest* ac_cv_type_uid_t=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_type_uid_t" 1>&6 if test $ac_cv_type_uid_t = no; then cat >> confdefs.h <<\EOF #define uid_t int EOF cat >> confdefs.h <<\EOF #define gid_t int EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 echo "configure:2144: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS #include #include #endif EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* ac_cv_type_pid_t=yes else rm -rf conftest* ac_cv_type_pid_t=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_type_pid_t" 1>&6 if test $ac_cv_type_pid_t = no; then cat >> confdefs.h <<\EOF #define pid_t int EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 echo "configure:2177: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS #include #include #endif EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* ac_cv_type_size_t=yes else rm -rf conftest* ac_cv_type_size_t=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_type_size_t" 1>&6 if test $ac_cv_type_size_t = no; then cat >> confdefs.h <<\EOF #define size_t unsigned EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 echo "configure:2210: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include #include int main() { struct tm *tp; ; return 0; } EOF if { (eval echo configure:2224: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_header_time=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_header_time" 1>&6 if test $ac_cv_header_time = yes; then cat >> confdefs.h <<\EOF #define TIME_WITH_SYS_TIME 1 EOF fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 echo "configure:2245: checking whether struct tm is in sys/time.h or time.h" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF if { (eval echo configure:2258: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_struct_tm=sys/time.h fi rm -f conftest* fi echo "$ac_t""$ac_cv_struct_tm" 1>&6 if test $ac_cv_struct_tm = sys/time.h; then cat >> confdefs.h <<\EOF #define TM_IN_SYS_TIME 1 EOF fi if test $ac_cv_prog_gcc = yes; then echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6 echo "configure:2281: checking whether ${CC-cc} needs -traditional" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_pattern="Autoconf.*'x'" cat > conftest.$ac_ext < Autoconf TIOCGETP EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "$ac_pattern" >/dev/null 2>&1; then rm -rf conftest* ac_cv_prog_gcc_traditional=yes else rm -rf conftest* ac_cv_prog_gcc_traditional=no fi rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then cat > conftest.$ac_ext < Autoconf TCGETA EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "$ac_pattern" >/dev/null 2>&1; then rm -rf conftest* ac_cv_prog_gcc_traditional=yes fi rm -f conftest* fi fi echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6 if test $ac_cv_prog_gcc_traditional = yes; then CC="$CC -traditional" fi fi for ac_hdr in unistd.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo "configure:2330: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:2340: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 fi done for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 echo "configure:2369: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else $ac_func(); #endif ; return 0; } EOF if { (eval echo configure:2397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_$ac_func=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 fi done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 echo "configure:2422: checking for working mmap" >&5 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then ac_cv_func_mmap_fixed_mapped=no else cat > conftest.$ac_ext < #include #include /* This mess was copied from the GNU getpagesize.h. */ #ifndef HAVE_GETPAGESIZE # ifdef HAVE_UNISTD_H # include # endif /* Assume that all systems that can run configure have sys/param.h. */ # ifndef HAVE_SYS_PARAM_H # define HAVE_SYS_PARAM_H 1 # endif # ifdef _SC_PAGESIZE # define getpagesize() sysconf(_SC_PAGESIZE) # else /* no _SC_PAGESIZE */ # ifdef HAVE_SYS_PARAM_H # include # ifdef EXEC_PAGESIZE # define getpagesize() EXEC_PAGESIZE # else /* no EXEC_PAGESIZE */ # ifdef NBPG # define getpagesize() NBPG * CLSIZE # ifndef CLSIZE # define CLSIZE 1 # endif /* no CLSIZE */ # else /* no NBPG */ # ifdef NBPC # define getpagesize() NBPC # else /* no NBPC */ # ifdef PAGESIZE # define getpagesize() PAGESIZE # endif /* PAGESIZE */ # endif /* no NBPC */ # endif /* no NBPG */ # endif /* no EXEC_PAGESIZE */ # else /* no HAVE_SYS_PARAM_H */ # define getpagesize() 8192 /* punt totally */ # endif /* no HAVE_SYS_PARAM_H */ # endif /* no _SC_PAGESIZE */ #endif /* no HAVE_GETPAGESIZE */ #ifdef __cplusplus extern "C" { void *malloc(unsigned); } #else char *malloc(); #endif int main() { char *data, *data2, *data3; int i, pagesize; int fd; pagesize = getpagesize(); /* * First, make a file with some known garbage in it. */ data = malloc(pagesize); if (!data) exit(1); for (i = 0; i < pagesize; ++i) *(data + i) = rand(); umask(0); fd = creat("conftestmmap", 0600); if (fd < 0) exit(1); if (write(fd, data, pagesize) != pagesize) exit(1); close(fd); /* * Next, try to mmap the file at a fixed address which * already has something else allocated at it. If we can, * also make sure that we see the same garbage. */ fd = open("conftestmmap", O_RDWR); if (fd < 0) exit(1); data2 = malloc(2 * pagesize); if (!data2) exit(1); data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_FIXED, fd, 0L)) exit(1); for (i = 0; i < pagesize; ++i) if (*(data + i) != *(data2 + i)) exit(1); /* * Finally, make sure that changes to the mapped area * do not percolate back to the file as seen by read(). * (This is a bug on some variants of i386 svr4.0.) */ for (i = 0; i < pagesize; ++i) *(data2 + i) = *(data2 + i) + 1; data3 = malloc(pagesize); if (!data3) exit(1); if (read(fd, data3, pagesize) != pagesize) exit(1); for (i = 0; i < pagesize; ++i) if (*(data + i) != *(data3 + i)) exit(1); close(fd); unlink("conftestmmap"); exit(0); } EOF if { (eval echo configure:2570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_mmap_fixed_mapped=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* ac_cv_func_mmap_fixed_mapped=no fi rm -fr conftest* fi fi echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 if test $ac_cv_func_mmap_fixed_mapped = yes; then cat >> confdefs.h <<\EOF #define HAVE_MMAP 1 EOF fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 echo "configure:2593: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include #ifdef signal #undef signal #endif #ifdef __cplusplus extern "C" void (*signal (int, void (*)(int)))(int); #else void (*signal ()) (); #endif int main() { int i; ; return 0; } EOF if { (eval echo configure:2615: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_type_signal=int fi rm -f conftest* fi echo "$ac_t""$ac_cv_type_signal" 1>&6 cat >> confdefs.h <&6 echo "configure:2634: checking for working strcoll" >&5 if eval "test \"`echo '$''{'ac_cv_func_strcoll_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then ac_cv_func_strcoll_works=no else cat > conftest.$ac_ext < main () { exit (strcoll ("abc", "def") >= 0 || strcoll ("ABC", "DEF") >= 0 || strcoll ("123", "456") >= 0); } EOF if { (eval echo configure:2652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_strcoll_works=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* ac_cv_func_strcoll_works=no fi rm -fr conftest* fi fi echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6 if test $ac_cv_func_strcoll_works = yes; then cat >> confdefs.h <<\EOF #define HAVE_STRCOLL 1 EOF fi ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for vfork.h""... $ac_c" 1>&6 echo "configure:2676: checking for vfork.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:2686: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF #define HAVE_VFORK_H 1 EOF else echo "$ac_t""no" 1>&6 fi echo $ac_n "checking for working vfork""... $ac_c" 1>&6 echo "configure:2711: checking for working vfork" >&5 if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then echo $ac_n "checking for vfork""... $ac_c" 1>&6 echo "configure:2717: checking for vfork" >&5 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char vfork(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_vfork) || defined (__stub___vfork) choke me #else vfork(); #endif ; return 0; } EOF if { (eval echo configure:2745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_vfork=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_vfork=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then echo "$ac_t""yes" 1>&6 : else echo "$ac_t""no" 1>&6 fi ac_cv_func_vfork_works=$ac_cv_func_vfork else cat > conftest.$ac_ext < #include #include #ifdef HAVE_UNISTD_H #include #endif #ifdef HAVE_VFORK_H #include #endif /* On some sparc systems, changes by the child to local and incoming argument registers are propagated back to the parent. The compiler is told about this with #include , but some compilers (e.g. gcc -O) don't grok . Test for this by using a static variable whose address is put into a register that is clobbered by the vfork. */ static #ifdef __cplusplus sparc_address_test (int arg) #else sparc_address_test (arg) int arg; #endif { static pid_t child; if (!child) { child = vfork (); if (child < 0) { perror ("vfork"); _exit(2); } if (!child) { arg = getpid(); write(-1, "", 0); _exit (arg); } } } main() { pid_t parent = getpid (); pid_t child; sparc_address_test (); child = vfork (); if (child == 0) { /* Here is another test for sparc vfork register problems. This test uses lots of local variables, at least as many local variables as main has allocated so far including compiler temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should reuse the register of parent for one of the local variables, since it will think that parent can't possibly be used any more in this routine. Assigning to the local variable will thus munge parent in the parent process. */ pid_t p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); /* Convince the compiler that p..p7 are live; otherwise, it might use the same hardware register for all 8 local variables. */ if (p != p1 || p != p2 || p != p3 || p != p4 || p != p5 || p != p6 || p != p7) _exit(1); /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent from child file descriptors. If the child closes a descriptor before it execs or exits, this munges the parent's descriptor as well. Test for this by closing stdout in the child. */ _exit(close(fileno(stdout)) != 0); } else { int status; struct stat st; while (wait(&status) != child) ; exit( /* Was there some problem with vforking? */ child < 0 /* Did the child fail? (This shouldn't happen.) */ || status /* Did the vfork/compiler bug occur? */ || parent != getpid() /* Did the file descriptor bug occur? */ || fstat(fileno(stdout), &st) != 0 ); } } EOF if { (eval echo configure:2862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_vfork_works=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* ac_cv_func_vfork_works=no fi rm -fr conftest* fi fi echo "$ac_t""$ac_cv_func_vfork_works" 1>&6 if test $ac_cv_func_vfork_works = no; then cat >> confdefs.h <<\EOF #define vfork fork EOF fi echo $ac_n "checking for vprintf""... $ac_c" 1>&6 echo "configure:2885: checking for vprintf" >&5 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char vprintf(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_vprintf) || defined (__stub___vprintf) choke me #else vprintf(); #endif ; return 0; } EOF if { (eval echo configure:2913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_vprintf=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF #define HAVE_VPRINTF 1 EOF else echo "$ac_t""no" 1>&6 fi if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 echo "configure:2937: checking for _doprnt" >&5 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char _doprnt(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub__doprnt) || defined (__stub____doprnt) choke me #else _doprnt(); #endif ; return 0; } EOF if { (eval echo configure:2965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func__doprnt=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF #define HAVE_DOPRNT 1 EOF else echo "$ac_t""no" 1>&6 fi fi ac_have_func=no # yes means we've found a way to get the load average. # Some systems have getloadavg without any extra libraries. echo $ac_n "checking for getloadavg""... $ac_c" 1>&6 echo "configure:2993: checking for getloadavg" >&5 if eval "test \"`echo '$''{'ac_cv_func_getloadavg'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char getloadavg(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_getloadavg) || defined (__stub___getloadavg) choke me #else getloadavg(); #endif ; return 0; } EOF if { (eval echo configure:3021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_getloadavg=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_getloadavg=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'getloadavg`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_have_func=yes else echo "$ac_t""no" 1>&6 fi if test $ac_have_func = no; then # Some systems with -lutil have (and need) -lkvm as well, some do not. # On Solaris, -lkvm requires nlist from -lelf, so check that first # to get the right answer into the cache. echo $ac_n "checking for elf_begin in -lelf""... $ac_c" 1>&6 echo "configure:3046: checking for elf_begin in -lelf" >&5 ac_lib_var=`echo elf'_'elf_begin | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lelf $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 LIBS="-lelf $LIBS" else echo "$ac_t""no" 1>&6 fi echo $ac_n "checking for kvm_open in -lkvm""... $ac_c" 1>&6 echo "configure:3086: checking for kvm_open in -lkvm" >&5 ac_lib_var=`echo kvm'_'kvm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lkvm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 LIBS="-lkvm $LIBS" else echo "$ac_t""no" 1>&6 fi # Check for the 4.4BSD definition of getloadavg. echo $ac_n "checking for getloadavg in -lutil""... $ac_c" 1>&6 echo "configure:3127: checking for getloadavg in -lutil" >&5 ac_lib_var=`echo util'_'getloadavg | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lutil $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes else echo "$ac_t""no" 1>&6 fi fi if test $ac_have_func = no; then # There is a commonly available library for RS/6000 AIX. # Since it is not a standard part of AIX, it might be installed locally. ac_getloadavg_LIBS="$LIBS"; LIBS="-L/usr/local/lib $LIBS" echo $ac_n "checking for getloadavg in -lgetloadavg""... $ac_c" 1>&6 echo "configure:3173: checking for getloadavg in -lgetloadavg" >&5 ac_lib_var=`echo getloadavg'_'getloadavg | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lgetloadavg $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 LIBS="-lgetloadavg $LIBS" else echo "$ac_t""no" 1>&6 LIBS="$ac_getloadavg_LIBS" fi fi # Make sure it is really in the library, if we think we found it. for ac_func in getloadavg do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 echo "configure:3219: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else $ac_func(); #endif ; return 0; } EOF if { (eval echo configure:3247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_$ac_func=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}" fi done if test $ac_cv_func_getloadavg = yes; then cat >> confdefs.h <<\EOF #define HAVE_GETLOADAVG 1 EOF ac_have_func=yes else # Figure out what our getloadavg.c needs. ac_have_func=no ac_safe=`echo "sys/dg_sys_info.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for sys/dg_sys_info.h""... $ac_c" 1>&6 echo "configure:3285: checking for sys/dg_sys_info.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:3295: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_have_func=yes; cat >> confdefs.h <<\EOF #define DGUX 1 EOF echo $ac_n "checking for dg_sys_info in -ldgc""... $ac_c" 1>&6 echo "configure:3316: checking for dg_sys_info in -ldgc" >&5 ac_lib_var=`echo dgc'_'dg_sys_info | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-ldgc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_lib=HAVE_LIB`echo dgc | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 fi else echo "$ac_t""no" 1>&6 fi # We cannot check for , because Solaris 2 does not use dwarf (it # uses stabs), but it is still SVR4. We cannot check for because # Irix 4.0.5F has the header but not the library. if test $ac_have_func = no && test $ac_cv_lib_elf_elf_begin = yes; then ac_have_func=yes; cat >> confdefs.h <<\EOF #define SVR4 1 EOF fi if test $ac_have_func = no; then ac_safe=`echo "inq_stats/cpustats.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for inq_stats/cpustats.h""... $ac_c" 1>&6 echo "configure:3380: checking for inq_stats/cpustats.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:3390: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_have_func=yes; cat >> confdefs.h <<\EOF #define UMAX 1 EOF cat >> confdefs.h <<\EOF #define UMAX4_3 1 EOF else echo "$ac_t""no" 1>&6 fi fi if test $ac_have_func = no; then ac_safe=`echo "sys/cpustats.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for sys/cpustats.h""... $ac_c" 1>&6 echo "configure:3423: checking for sys/cpustats.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:3433: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_have_func=yes; cat >> confdefs.h <<\EOF #define UMAX 1 EOF else echo "$ac_t""no" 1>&6 fi fi if test $ac_have_func = no; then for ac_hdr in mach/mach.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo "configure:3464: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:3474: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 fi done fi ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for nlist.h""... $ac_c" 1>&6 echo "configure:3504: checking for nlist.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:3514: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF #define NLIST_STRUCT 1 EOF echo $ac_n "checking for n_un in struct nlist""... $ac_c" 1>&6 echo "configure:3535: checking for n_un in struct nlist" >&5 if eval "test \"`echo '$''{'ac_cv_struct_nlist_n_un'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { struct nlist n; n.n_un.n_name = 0; ; return 0; } EOF if { (eval echo configure:3547: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_nlist_n_un=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_struct_nlist_n_un=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_struct_nlist_n_un" 1>&6 if test $ac_cv_struct_nlist_n_un = yes; then cat >> confdefs.h <<\EOF #define NLIST_NAME_UNION 1 EOF fi else echo "$ac_t""no" 1>&6 fi fi # Do not have getloadavg in system libraries. # Some definitions of getloadavg require that the program be installed setgid. echo $ac_n "checking whether getloadavg requires setgid""... $ac_c" 1>&6 echo "configure:3574: checking whether getloadavg requires setgid" >&5 if eval "test \"`echo '$''{'ac_cv_func_getloadavg_setgid'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5 | egrep "Yowza Am I SETGID yet" >/dev/null 2>&1; then rm -rf conftest* ac_cv_func_getloadavg_setgid=yes else rm -rf conftest* ac_cv_func_getloadavg_setgid=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_func_getloadavg_setgid" 1>&6 if test $ac_cv_func_getloadavg_setgid = yes; then NEED_SETGID=true; cat >> confdefs.h <<\EOF #define GETLOADAVG_PRIVILEGED 1 EOF else NEED_SETGID=false fi if test $ac_cv_func_getloadavg_setgid = yes; then echo $ac_n "checking group of /dev/kmem""... $ac_c" 1>&6 echo "configure:3610: checking group of /dev/kmem" >&5 if eval "test \"`echo '$''{'ac_cv_group_kmem'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # On Solaris, /dev/kmem is a symlink. Get info on the real file. ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null` # If we got an error (system does not support symlinks), try without -L. test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem` ac_cv_group_kmem=`echo $ac_ls_output \ | sed -ne 's/[ ][ ]*/ /g; s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/; / /s/.* //;p;'` fi echo "$ac_t""$ac_cv_group_kmem" 1>&6 KMEM_GROUP=$ac_cv_group_kmem fi echo $ac_n "checking for main in -lcurses""... $ac_c" 1>&6 echo "configure:3632: checking for main in -lcurses" >&5 ac_lib_var=`echo curses'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lcurses $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_lib=HAVE_LIB`echo curses | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 fi echo $ac_n "checking for main in -ltermcap""... $ac_c" 1>&6 echo "configure:3675: checking for main in -ltermcap" >&5 ac_lib_var=`echo termcap'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-ltermcap $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_lib=HAVE_LIB`echo termcap | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 fi for ac_func in bzero gethostname fgetpwent get_current_dir_name getcwd getwd madvise mkdir mkstemp mktime putenv re_comp select seteuid setsid socket strcasecmp strcspn strdup strerror strftime strspn strstr strtol sysconf tempnam tzset wait3 waitpid strcasestr regcomp regfree wattron wattroff wstandout wstandend do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 echo "configure:3720: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else $ac_func(); #endif ; return 0; } EOF if { (eval echo configure:3748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_$ac_func=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 fi done cat > conftest.$ac_ext < int main() { getdtablesize(); ; return 0; } EOF if { (eval echo configure:3781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then : else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -f conftest* trap '' 1 2 15 cat > confcache <<\EOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs. It is not useful on other systems. # If it contains results you don't want to keep, you may remove or edit it. # # By default, configure uses ./config.cache as the cache file, # creating it if it does not exist already. You can give configure # the --cache-file=FILE option to use a different cache file; that is # what configure does when it calls configure scripts in # subdirectories, so they share the cache. # Giving --cache-file=/dev/null disables caching, for debugging configure. # config.status only pays attention to the cache file if you give it the # --recheck option to rerun configure. # EOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. (set) 2>&1 | case `(ac_space=' '; set | grep ac_space) 2>&1` in *ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote substitution # turns \\\\ into \\, and sed turns \\ into \). sed -n \ -e "s/'/'\\\\''/g" \ -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" ;; *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' ;; esac >> confcache if cmp -s $cache_file confcache; then : else if test -w $cache_file; then echo "updating cache $cache_file" cat confcache > $cache_file else echo "not updating unwritable cache $cache_file" fi fi rm -f confcache trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # Any assignment to VPATH causes Sun make to only execute # the first set of double-colon rules, so remove it if not needed. # If there is a colon in the path, we need to keep it. if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' fi trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 DEFS=-DHAVE_CONFIG_H # Without the "./", some shells look in PATH for config.status. : ${CONFIG_STATUS=./config.status} echo creating $CONFIG_STATUS rm -f $CONFIG_STATUS cat > $CONFIG_STATUS </dev/null | sed 1q`: # # $0 $ac_configure_args # # Compiler output produced by configure, useful for debugging # configure, is in ./config.log if it exists. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" for ac_option do case "\$ac_option" in -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) echo "$CONFIG_STATUS generated by autoconf version 2.13" exit 0 ;; -help | --help | --hel | --he | --h) echo "\$ac_cs_usage"; exit 0 ;; *) echo "\$ac_cs_usage"; exit 1 ;; esac done ac_given_srcdir=$srcdir ac_given_INSTALL="$INSTALL" trap 'rm -fr `echo "Makefile Makefile.config object/Makefile gopher/Makefile gopher/locales/Makefile doc/Makefile gophfilt/Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 EOF cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF $ac_vpsub $extrasub s%@SHELL@%$SHELL%g s%@CFLAGS@%$CFLAGS%g s%@CPPFLAGS@%$CPPFLAGS%g s%@CXXFLAGS@%$CXXFLAGS%g s%@FFLAGS@%$FFLAGS%g s%@DEFS@%$DEFS%g s%@LDFLAGS@%$LDFLAGS%g s%@LIBS@%$LIBS%g s%@exec_prefix@%$exec_prefix%g s%@prefix@%$prefix%g s%@program_transform_name@%$program_transform_name%g s%@bindir@%$bindir%g s%@sbindir@%$sbindir%g s%@libexecdir@%$libexecdir%g s%@datadir@%$datadir%g s%@sysconfdir@%$sysconfdir%g s%@sharedstatedir@%$sharedstatedir%g s%@localstatedir@%$localstatedir%g s%@libdir@%$libdir%g s%@includedir@%$includedir%g s%@oldincludedir@%$oldincludedir%g s%@infodir@%$infodir%g s%@mandir@%$mandir%g s%@CC@%$CC%g s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g s%@INSTALL_DATA@%$INSTALL_DATA%g s%@LN_S@%$LN_S%g s%@RANLIB@%$RANLIB%g s%@SET_MAKE@%$SET_MAKE%g s%@DEBUGGING@%$DEBUGGING%g s%@SOCKSLIBS@%$SOCKSLIBS%g s%@SOCKSFLAGS@%$SOCKSFLAGS%g s%@GINTERNATIONAL@%$GINTERNATIONAL%g s%@GOPHER_DATA@%$GOPHER_DATA%g s%@GOPHER_PORT@%$GOPHER_PORT%g s%@DLPATH@%$DLPATH%g s%@DLOBJS@%$DLOBJS%g s%@OPT@%$OPT%g s%@REGEXLIBS@%$REGEXLIBS%g s%@WAISTYPE@%$WAISTYPE%g s%@SEARCH@%$SEARCH%g s%@CLIENTLIBS@%$CLIENTLIBS%g s%@CPP@%$CPP%g s%@LIBOBJS@%$LIBOBJS%g s%@NEED_SETGID@%$NEED_SETGID%g s%@KMEM_GROUP@%$KMEM_GROUP%g CEOF EOF cat >> $CONFIG_STATUS <<\EOF # Split the substitutions into bite-sized pieces for seds with # small command number limits, like on Digital OSF/1 and HP-UX. ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. ac_file=1 # Number of current file. ac_beg=1 # First line for current file. ac_end=$ac_max_sed_cmds # Line after last line for current file. ac_more_lines=: ac_sed_cmds="" while $ac_more_lines; do if test $ac_beg -gt 1; then sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file else sed "${ac_end}q" conftest.subs > conftest.s$ac_file fi if test ! -s conftest.s$ac_file; then ac_more_lines=false rm -f conftest.s$ac_file else if test -z "$ac_sed_cmds"; then ac_sed_cmds="sed -f conftest.s$ac_file" else ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" fi ac_file=`expr $ac_file + 1` ac_beg=$ac_end ac_end=`expr $ac_end + $ac_max_sed_cmds` fi done if test -z "$ac_sed_cmds"; then ac_sed_cmds=cat fi EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case "$ac_file" in *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; *) ac_file_in="${ac_file}.in" ;; esac # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. # Remove last slash and all that follows it. Not all systems have dirname. ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then # The file is in a subdirectory. test ! -d "$ac_dir" && mkdir "$ac_dir" ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" # A "../" for each directory in $ac_dir_suffix. ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` else ac_dir_suffix= ac_dots= fi case "$ac_given_srcdir" in .) srcdir=. if test -z "$ac_dots"; then top_srcdir=. else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; *) # Relative path. srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" top_srcdir="$ac_dots$ac_given_srcdir" ;; esac case "$ac_given_INSTALL" in [/$]*) INSTALL="$ac_given_INSTALL" ;; *) INSTALL="$ac_dots$ac_given_INSTALL" ;; esac echo creating "$ac_file" rm -f "$ac_file" configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." case "$ac_file" in *Makefile*) ac_comsub="1i\\ # $configure_input" ;; *) ac_comsub= ;; esac ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` sed -e "$ac_comsub s%@configure_input@%$configure_input%g s%@srcdir@%$srcdir%g s%@top_srcdir@%$top_srcdir%g s%@INSTALL@%$INSTALL%g " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file fi; done rm -f conftest.s* # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where # NAME is the cpp macro being defined and VALUE is the value it is being given. # # ac_d sets the value in "#define NAME VALUE" lines. ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' ac_dC='\3' ac_dD='%g' # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ac_uB='\([ ]\)%\1#\2define\3' ac_uC=' ' ac_uD='\4%g' # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ac_eB='$%\1#\2define\3' ac_eC=' ' ac_eD='%g' if test "${CONFIG_HEADERS+set}" != set; then EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF fi for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case "$ac_file" in *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; *) ac_file_in="${ac_file}.in" ;; esac echo creating $ac_file rm -f conftest.frag conftest.in conftest.out ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` cat $ac_file_inputs > conftest.in EOF # Transform confdefs.h into a sed script conftest.vals that substitutes # the proper values into config.h.in to produce config.h. And first: # Protect against being on the right side of a sed subst in config.status. # Protect against being in an unquoted here document in config.status. rm -f conftest.vals cat > conftest.hdr <<\EOF s/[\\&%]/\\&/g s%[\\$`]%\\&%g s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp s%ac_d%ac_u%gp s%ac_u%ac_e%gp EOF sed -n -f conftest.hdr confdefs.h > conftest.vals rm -f conftest.hdr # This sed command replaces #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. cat >> conftest.vals <<\EOF s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% EOF # Break up conftest.vals because some shells have a limit on # the size of here documents, and old seds have small limits too. rm -f conftest.tail while : do ac_lines=`grep -c . conftest.vals` # grep -c gives empty output for an empty file on some AIX systems. if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi # Write a limited-size here document to conftest.frag. echo ' cat > conftest.frag <> $CONFIG_STATUS sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS echo 'CEOF sed -f conftest.frag conftest.in > conftest.out rm -f conftest.in mv conftest.out conftest.in ' >> $CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail rm -f conftest.vals mv conftest.tail conftest.vals done rm -f conftest.vals cat >> $CONFIG_STATUS <<\EOF rm -f conftest.frag conftest.h echo "/* $ac_file. Generated automatically by configure. */" > conftest.h cat conftest.in >> conftest.h rm -f conftest.in if cmp -s $ac_file conftest.h 2>/dev/null; then echo "$ac_file is unchanged" rm -f conftest.h else # Remove last slash and all that follows it. Not all systems have dirname. ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then # The file is in a subdirectory. test ! -d "$ac_dir" && mkdir "$ac_dir" fi rm -f $ac_file mv conftest.h $ac_file fi fi; done EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF exit 0 EOF chmod +x $CONFIG_STATUS rm -fr confdefs* $ac_clean_files test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 gopher/configure.in0000644000000000000000000001264610762617110011553 0ustar # configure.in for gopher # Process this file with autoconf to produce a configure script. dnl dnl MACROS dnl define(UP_ASK_FOR, [echo "$2 ($3)?"; read $1; if test "$$1" = "" ; then $1="$3"; fi])dnl AC_INIT(gopher/gopher.c) echo "----------------------------------------------------------------------" echo "You are about to build the Gopher system for Unix" echo "Please read the file doc/INSTALL for full information on" echo "building Gopher" echo " " echo "Gopher is copyrighted software, see the file Copyright in" echo "the distribution for more information and limitations." echo "----------------------------------------------------------------------" echo " " dnl AC_CANONICAL_HOST AC_CONFIG_HEADER(config.h) dnl Checks for programs. AC_PROG_CC AC_PROG_INSTALL AC_PROG_LN_S AC_PROG_RANLIB AC_PROG_MAKE_SET dnl Checks for libraries. AC_CHECK_LIB(m, main) ###################################################################### AC_SUBST(DEBUGGING) AC_ARG_ENABLE(debug, [ --disable-debug controls whether debug text is compilied in], DEBUGGING=$enableval, DEBUGGING="") if test "$DEBUGGING" = yes; then DEBUGGING="-DDEBUGGING" fi ###################################################################### AC_SUBST(SOCKSLIBS) AC_SUBST(SOCKSFLAGS) HAVE_SOCKS=0 AC_ARG_ENABLE(socks, [ --enable-socks use socks library, requires -lsocks], HAVE_SOCKS=1, HAVE_SOCKS=0) if test "$HAVE_SOCKS" = 1; then AC_CHECK_LIB(socks, main, SOCKSLIBS="-lsocks"; SOCKSFLAGS="-Dconnect=Rconnect -Dgetsockname=Rgetsockname -Dbind=Rbind -Daccept=Raccept -Dlisten=Rlisten -Dselect=Rselect") fi ###################################################################### AC_SUBST(GINTERNATIONAL) GINTERNATIONAL="" AC_ARG_ENABLE(locale, [ --enable-locale use international localized msgs for the client], GINTERNATIONAL="-DGINTERNATIONAL", GINTERNATIONAL="") ###################################################################### AC_SUBST(GOPHER_DATA) GOPHER_DATA="/gopher-data" AC_ARG_ENABLE(datadir, [ --enable-datadir=dir enable custom datadir (/gopher-data)], GOPHER_DATA="$enableval", GOPHER_DATA="/gopher-data") ###################################################################### AC_SUBST(GOPHER_PORT) GOPHER_PORT=70 AC_ARG_ENABLE(port, [ --enable-port=portnum enable custom port (70)], GOPHER_PORT="$enableval", GOPHER_PORT=70) ###################################################################### AC_SUBST(DLPATH) AC_SUBST(DLOBJS) AC_ARG_ENABLE(dl, [ --enable-dl=dlpathname use Tim Cook's dl databases], DLPATH="$enableval";DLOBJS="$enableval/getdesc.o $enableval/enddesc.o";SERVEROPTS="$SERVEROPTS -DDL",:) ###################################################################### AC_SUBST(OPT) AC_ARG_ENABLE(opt, [ --enable-opt=args Special optimization flags to pass to the compiler], OPT="$enableval",OPT="$CFLAGS") ###################################################################### dnl dnl LIBRARIES dnl # If we can't find connect, try looking in -lsocket, -lnsl, and -linet. # The Irix 5 libc.so has connect and gethostbyname, but Irix 5 also has # libsocket.so which has a bad implementation of gethostbyname (it # only looks in /etc/hosts), so we only look for -lsocket if we need # it. unset ac_cv_func_connect AC_CHECK_FUNC(connect, :, [case $LIBS in *-lnsl*) ;; *) AC_CHECK_LIB(nsl_s, main) ;; esac case $LIBS in *-lnsl*) ;; *) AC_CHECK_LIB(nsl, main) ;; esac case $LIBS in *-lsocket*) ;; *) AC_CHECK_LIB(socket, connect) ;; esac case $LIBS in *-linet*) ;; *) AC_CHECK_LIB(inet, connect) ;; esac unset ac_cv_func_connect AC_CHECK_FUNCS(connect)]) AC_CHECK_FUNC(gethostname, :, LIBOBJS="$LIBOBJS hostname.o") ###################################################################### dnl Check for WAIS with_wais=1 AC_ARG_WITH(wais,[ --without-wais Don't try using WAIS (default: try)], with_wais=1, with_wais=0) AC_SUBST(REGEXLIBS) AC_SUBST(WAISTYPE) AC_SUBST(SEARCH) LDFLAGS=$OLDLDFLAGS AC_CHECK_LIB(compat, re_comp, REGEXLIBS="$REGEXLIBS -lcompat") ###################################################################### AC_CHECK_LIB(malloc, main) AC_SUBST(CLIENTLIBS) AC_CHECK_LIB(curses, main, CLIENTLIBS="$CLIENTLIBS -lcurses") AC_CHECK_LIB(termcap, main, CLIENTLIBS="$CLIENTLIBS -ltermcap") dnl Checks for header files. AC_HEADER_DIRENT AC_HEADER_STDC AC_HEADER_SYS_WAIT AC_CHECK_HEADERS(strings.h string.h sys/param.h term.h re_comp.h regex.h crypt.h fcntl.h time.h ctype.h limits.h locale.h sys/types.h sys/stat.h sys/file.h sys/ioctl.h sys/time.h syslog.h unistd.h malloc.h stdlib.h libgen.h regexp.h) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_TYPE_UID_T AC_TYPE_PID_T AC_TYPE_SIZE_T AC_HEADER_TIME AC_STRUCT_TM dnl Checks for library functions. AC_PROG_GCC_TRADITIONAL AC_FUNC_MMAP dnl AC_FUNC_SETVBUF_REVERSED AC_TYPE_SIGNAL AC_FUNC_STRCOLL AC_FUNC_VFORK AC_FUNC_VPRINTF AC_FUNC_GETLOADAVG dnl Do this again so the AC_CHECK_FUNCS works. AC_CHECK_LIB(curses, main) AC_CHECK_LIB(termcap, main) AC_CHECK_FUNCS(bzero gethostname fgetpwent get_current_dir_name getcwd getwd madvise mkdir mkstemp mktime putenv re_comp select seteuid setsid socket strcasecmp strcspn strdup strerror strftime strspn strstr strtol sysconf tempnam tzset wait3 waitpid strcasestr regcomp regfree wattron wattroff wstandout wstandend) AC_TRY_LINK([#include ], [getdtablesize();]) AC_OUTPUT(Makefile Makefile.config object/Makefile gopher/Makefile gopher/locales/Makefile doc/Makefile gophfilt/Makefile) gopher/copyright0000644000000000000000000000170110762617110011163 0ustar Gopher software distribution for UNIX Copyright (C) 1991-2000 University of Minnesota Copyright (C) 2000-2005 John Goerzen and other developers This package (Gopher software distribution for UNIX) originally had different copying restrictions. It is now distributed under the GPL. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 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, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA gopher/debian/0000755000000000000000000000000013550124456010457 5ustar gopher/debian/changelog0000644000000000000000000003667713550124456012354 0ustar gopher (3.0.17.3) unstable; urgency=medium * Remove empty directories. Closes: #942181. -- John Goerzen Fri, 11 Oct 2019 11:09:18 -0500 gopher (3.0.17.2) unstable; urgency=low * Really fix it this time. -- John Goerzen Fri, 04 Oct 2019 00:27:15 -0500 gopher (3.0.17.1) unstable; urgency=medium * Correct a mistake in debian/changelog -- John Goerzen Fri, 04 Oct 2019 00:24:19 -0500 gopher (3.0.17) unstable; urgency=medium * dh_clean -k -> dh_prep (debhelper) * Bump standards-version * Fix alignment issue in gopher directories. Closes: #789892. -- John Goerzen Thu, 03 Oct 2019 23:13:11 -0500 gopher (3.0.16) unstable; urgency=low * Bump compat to 9. Closes: #817485. -- John Goerzen Sun, 29 May 2016 21:18:52 -0500 gopher (3.0.15) unstable; urgency=medium * Correct possible segfault in option parsing. Closes #715977, #715978. -- John Goerzen Thu, 12 Nov 2015 19:00:08 -0600 gopher (3.0.14) unstable; urgency=medium * Fix Debian (Closes: #798758) thanks to patch from Axel Beckert + Use autoconf and gnulib instead of autoconf2.13. + debian/rules: configure-stamp is a dependency of build-stamp, not build. + debian/rules: Add symlink to /usr/share/gnulib/lib/getloadavg.c and remove it again in the clean target. -- John Goerzen Thu, 12 Nov 2015 11:47:19 -0600 gopher (3.0.13) unstable; urgency=low * More changes to download.c to prefer getcwd() to get_current_dir_name(). Closes: #366560. -- John Goerzen Sat, 17 Jun 2006 11:10:31 -0500 gopher (3.0.12) unstable; urgency=low * Applied patch to make it build for Hurd. Closes: #346447. -- John Goerzen Tue, 9 May 2006 10:37:49 -0500 gopher (3.0.11) unstable; urgency=high * [security] Fix for client buffer overflows [CAN-2005-2772]. -- John Goerzen Thu, 22 Sep 2005 05:24:02 -0500 gopher (3.0.10) unstable; urgency=low * Version 3.0.8 fixed the security bug that was later submitted as CAN-2005-1853 and DSA-770-1. * The upload for this changelog notice was requested by the Debian testing-security team. -- John Goerzen Sat, 30 Jul 2005 16:16:07 -0500 gopher (3.0.9) unstable; urgency=low * Updated version number in patchlevel.h. (Oops, it still says 3.0.5) -- John Goerzen Wed, 20 Jul 2005 05:55:50 -0500 gopher (3.0.8) unstable; urgency=low * Fix compile error with gcc 3.4. Closes: #258752. * Fixed warnings relating to prototypes. In download.c, prefer getcwd() to get_current_dir_name(). Closes: #226552. * No longer crash on problems piping to external programs. Thanks, Goeran Weinholt, for the patch. Closes: #128990. * Install makes dirs for manpages if they don't already exist. Combined with other fixes in this version and prior versions, all bugs in 142913 are resolved. Closes: #142913. * [debian] Removed build-deps on build-essential packages. Closes: #262423. * [debian] Updated standards-version and to new debhelper. * Fixed a small memory leak in download.c. * Fix potential insecure /tmp usage in gopher.c. * Use socklen_t instead of int for socket length operations, avoiding warnings about incorrect signedness. * Updated copyright files. -- John Goerzen Wed, 20 Jul 2005 05:41:40 -0500 gopher (3.0.7) unstable; urgency=low * Use Autoconf 2.13 on Debian systems. Closes: #206183. -- John Goerzen Mon, 25 Aug 2003 12:59:02 -0500 gopher (3.0.6) unstable; urgency=low * Deprecated gopherd in favor of PyGopherd. -- John Goerzen Mon, 18 Aug 2003 12:11:17 -0500 gopher (3.0.5) unstable; urgency=low * Integrated my patch to 3.0.4 for Solaris compilation. * Logging with chroot has long since been fixed; added a note to startopts about other chroot stuff. Closes: #82590, #82591. * Gopherd sometimes sent "+INFO " instead of "+INFO: ". Fixed. Closes: #142912. * doc/Makefile.in: Install manpages 0644 instead of 0755. -- John Goerzen Fri, 26 Apr 2002 09:09:55 -0500 gopher (3.0.4) unstable; urgency=low * MAJOR rewrite of regex support. This should make gopher compile and work better on several platforms. * Added regcomp and regree func checks to configure.in and regenerated configure and config.h * Removed the DOMAIN configure support, DOMAIN_NAME in gopherd, backupdomain in Socket.c, etc. This should prevent the no.domain.name problem that people have been seeing. Regenerated configure stuff. * Added line for .png to gopherd.conf.in * Added note about UFS builds on MacOS X to doc/PLATFORMS * Added FAQ and modified debian/docs * Updated gopherd.8 with information about type 'i' * Fixed gopher's URL handling -- it was missing the type character. Closes: #138337. * Another regex change. Let's hope this fixes things for Solaris. * Fixed to properly calculated first arg to select in gopherd.c -- John Goerzen Tue, 19 Mar 2002 13:08:39 -0500 gopher (3.0.3) unstable; urgency=low * Patches for FreeBSD: * Test in configure for stdlib.h * Include stdlib.h if it's available in Malloc.h * Don't include malloc.h if it's missing in Malloc.h * Don't include strcasestr if it's present in util.c and util.h * Actually use our configure.in test for malloc.h in object/* files. * New configure.in tests for regexp.h and libgen.h * Regex.c: define __GOPHER_REGEX_C__ for extern support in Regex.h * Regex.c: For __APPLE__, REGEX_param is regexp *. * Regex.h: Move the lengthy SYSV regex test to top of file * Regex.h: Wrap libgen.h include in HAVE_LIBGEN_H * Regex.h: Enclose REGEX_param=regcomp in parens to avoid warnings * Regex.h: Add extern for REGEX_param. * Regex.h: Darwin is unlike anything else. Support it with __APPLE__. * STRstring.h: Include malloc.h only if actually here. * Ditto for Stdlib.h. * Added /etc/logrotate.d/gopherd to gopherd.conffiles. Closes: #132804. -- John Goerzen Tue, 12 Feb 2002 07:45:00 -0500 gopher (3.0.2) unstable; urgency=low * gopher: Removed processing of . at end of text files. It would stop downloading when it would see ".\n" in a file. Will need to modify gopher/ourutils.c:937 area to deal with this properly -- ignore .\n if it's at the end of the file, otherwise preserve it. Reported by Ashok Aiyar * Did the modification as described above. * Updated README. * Global change gopher@boombox.micro.umn.edu -> gopher@complete.org * Removed ./GPL. This info is now in the file COPYING. * Changes to work with Solaris: * configure.in: Now looks for strings.h and string.h * object/Regex.h: Now include re_comp.h if available. Include regex.h only if re_comp.h is unavailable. Define the SYSVREGEX stuff only if HAVE_RE_COMP_H is not defined * object/String.h: Include string.h and strings.h based on configure test. Reports from Don Fike * Added doc/PLATFORMS and updated debian/docs * gopherd.conf's include of gopherdlocal.conf was hardcoded to /etc. Now use configure's sysconfdir to generate it. Moved gopherd.conf to gopherd.conf.in, modified Makefile.in to support this, removed gopherd.conf from source tree. Reported by Kevin Griffin * Added lines to gopherd.conf.in for .ogg and .mp2 files. Suggestion from Kevin Griffin * Using $(INSTALL) from subdirectories broke on systems where install-sh was used because $(INSTALL) would always resolve to ./install-sh. Replaced all instances of $(INSTALL) with @INSTALL@ (autoconf would provide the correct path) and removed INSTALL from Makefile.config. Reported by Don Fike on Solaris 2.6. * Updated our copy of install-sh with the one from a current automake. * Updated patchlevel.h for release of 3.0.2. -- John Goerzen Fri, 11 Jan 2002 07:45:00 -0500 gopher (3.0.1) unstable; urgency=low * Installation routines modified -- pass -d to install to create config dirs. This should fix installation problems. * Use sysconfigdir rather that $(DESTDIR)/etc for config files. * Fix a bug with specifying the gopher host on the command line. -- John Goerzen Thu, 10 Jan 2002 07:30:00 -0500 gopher (3.0.0-1) unstable; urgency=low * Patched to work with Hurd. Closes: #115511. Uses suggestions from James Morrison but not his patch. * gopher.c, gopherd/error.c, gopher/download.c: Modified to use HAVE_STRERROR * configure.in: Modified with checks for sys/param.h, HURD header files, get_current_dir_name, etc. * configure.h.in, configure: rebuilt. * Moved the current UMN Copyright notice in "COPYING" into "copyright" * Updated copyright files, etc. with current info. * Updated the locales with semi-current copyright stuff. * Updated greeting in gopher and gopherd. * This is Gopher 3.0.0, the Furry Terror release. -- John Goerzen Tue, 8 Jan 2002 15:31:00 -0500 gopher (2.3.1-15) unstable; urgency=low * NetBSD port effort began. * Added crypt.h to configure.in's list of headers to look for. Reran autoconf/autoheader. * Modified gopherd/AUTH.h to include crypt.h only if it's available and to include unistd.h if it's available. (NetBSD) * Integrated patches from David Allen (may have been done earlier anyway) * config.h.in: rebuilt by autoheader * configure: rebuilt by autoconf * configure.in: * Added REGEXLIBS test for NetBSD -- look for re_comp in -lcompat * Added checkes for term.h, re_comp.h, regex.h * gopher/ourutils.c, gopher/CURcurses.c: Use term.h check * gopher/Makefile.in, gopherd/Makefile.in, gophfilt/Makefile.in: * Use REGEXLIBS * gopher/globals.h, gopher/gopher.c: Remove sys_errlist * object/GSgopherobj.c: Removed #include, now use "Regex.h" that has proper regex determining logic * object/Regex.h: Moved regex.h include to here. Make it conditional based on configure test. Add conditional re_comp.h include. * gopherd/gopherd.c: Add init of view and filter after setjmp to eliminate clobbering due to longjmp and a warning. Cast parameters to *printf to long as appropriate. * AUTH.h: Add missing AUTHITEMSprocessLine prototype * AUTH.h: Add a check to prevent including twice. * gopherdconf.c: Add a missing prototype. * AUTH.c: add missing include of GGroup.h * download.c: Added cast to long for some *printf's * Now compiles with only one warning on NetBSD. * This is Gopher 20020108-01.cvs * object/Regex.h: now conditionally includes sys/types.h for regex.h * This is Gopher 20020108-02.cvs -- John Goerzen Tue, 8 Jan 2002 13:11:00 -0500 gopher (2.3.1-14) unstable; urgency=low * Added build-depends on autoconf. Closes: #113255. -- John Goerzen Thu, 1 Nov 2001 12:49:00 -0500 gopher (2.3.1-13) unstable; urgency=low * Added Build-Depends. Closes: #94237. -- John Goerzen Mon, 23 Apr 2001 11:00:04 -0500 gopher (2.3.1-12) unstable; urgency=low * Only chown /var/gopher if it's just created. Closes: #89557. -- John Goerzen Fri, 6 Apr 2001 15:35:16 -0500 gopher (2.3.1-11) unstable; urgency=low * Many sprintf -> snprintf changes. -- John Goerzen Wed, 17 Jan 2001 15:22:09 -0500 gopher (2.3.1-10) unstable; urgency=low * Added mp3 MIME type. Closes: #81529. * Now logs about chroot status on server startup. -- John Goerzen Wed, 17 Jan 2001 13:11:25 -0500 gopher (2.3.1-9) unstable; urgency=low * Fixed potential buffer overflows. Closes: #82602. -- John Goerzen Wed, 17 Jan 2001 12:12:51 -0500 gopher (2.3.1-8) unstable; urgency=low * Update to latest code in CVS, much from David Allen * Fixed dh_testversion to 2.0.103. Closes: #79883. -- John Goerzen Sat, 6 Jan 2001 20:06:01 -0500 gopher (2.3.1-7) unstable; urgency=low * A new debian rev to fix the access: problem in the gopherdlocal.conf. -- John Goerzen Tue, 19 Dec 2000 23:40:09 -0500 gopher (2.3.1-6) unstable; urgency=low * Added many excellent code patches and cleanups from David Allen . -- John Goerzen Tue, 19 Dec 2000 20:18:09 -0500 gopher (2.3.1-5) unstable; urgency=low * Additional code modifications and fixes. -- John Goerzen Mon, 18 Dec 2000 17:03:56 -0500 gopher (2.3.1-4) unstable; urgency=low * Disable authentication for the moment due to security concerns. -- John Goerzen Tue, 17 Oct 2000 23:49:20 -0500 gopher (2.3.1-3) unstable; urgency=low * Added startopts as a gopherd conffile. -- John Goerzen Tue, 22 Aug 2000 22:25:25 -0500 gopher (2.3.1-2) unstable; urgency=low * Modify postinst to be easier for people to use if they already have a gopher user. * Fixed a bug in the restart option for the init script. * Made debian/copyright more verbose. -- John Goerzen Tue, 22 Aug 2000 21:57:26 -0500 gopher (2.3.1-1) unstable; urgency=low * Initial re-release. Package had been yanked after 1995 due to licensing. * UMN has just GPL'd gopher. * This package contains the security fix from bugtraq. * I have patched it to chroot() and setuid() earlier for better security. SIDE EFFECT: logging will not work if chroot() is used. * The extension chopping code was buggy, so I have removed it. * Made many fixes to eliminate compiler warnings and errors. * Removed redefinitions of sys_errlist * Included more header files to bring in relevant prototypes * Modified to use Debian paths * Modified configure.in to look for -lcrypt * Modified Makefile.config.in to use -Wall * Removed -DSETPROCTITLE from configure.in to make start-stop-daemon work better. * Added logrotate * Wrote Debian support from scratch. * AUTH.h includes crypt.h * gopherd/Makefile.in uses separate conffile dir (Debian path) * STRstring.h had a paren problem; gcc on alpha brought it out. Fixed. * String.h was missing some header files. * Other fixes. -- John Goerzen Thu, 17 Aug 2000 15:16:07 -0500 Thu Feb 9 21:32:43 1995 Ted Hajek * gopherd/Makefile (install): Fixed syntax error in the installation of gopherdlocal.conf. * gopher/CURcurses.h: Changed inclusion of curses.h to inclusion of "ncurses/curses.h". Hopefully this will solve strange problems with terminal features. Wed Jul 31 17:31:11 MET DST 1996 Michael Meskes * Renamed function ustat in g_ustat to get gopherd compile with ELF libc * Corrected version number (Bugs #1718, #1851, #3965) * Added Architecture, Priority and Section field (Bug#3933) * Changed debian.rules file for new naming scheme * Removed 'RECOMMENDS: freeWAIS' line (Bug #1717) * Corrected extended description (Bug #3668, #3683) * Changed weekly cron script (Bug #3262) * Compress manpages Local variables: mode: debian-changelog End: gopher/debian/compat0000644000000000000000000000000212722721406011653 0ustar 9 gopher/debian/conffiles0000644000000000000000000000000010762617110012334 0ustar gopher/debian/control0000644000000000000000000000116613545543564012077 0ustar Source: gopher Section: net Priority: optional Maintainer: John Goerzen Standards-Version: 4.3.0 Build-Depends: debhelper (>= 9), ncurses-dev, autoconf, gnulib Package: gopher Provides: gopher-client Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: Distributed Hypertext Client, Gopher protocol This package contains the client for the distributed global directory and hypertext system known as gopher. This is a text-based (ncurses) client from the University of Minnesota. It also supports the gopher+ protocol, as well as links to ftp, http, and other external viewers. gopher/debian/copyright0000644000000000000000000000245613545543607012430 0ustar This package was debianized by John Goerzen on Thu, 17 Aug 2000 15:16:07 -0500. It was downloaded from gopher://quux.org/1/devel/gopher Old Upstream Author(s): University of Minnesota Current Upstream Authors: John Goerzen and the gopher team Copyright: Gopher software distribution for UNIX Copyright (C) 1991-2000 University of Minnesota Copyright (C) 2000-2005 John Goerzen and the gopher developers This package (Gopher software distribution for UNIX) originally had different copying restrictions. It is now distributed under the GPL. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 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, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Debian GNU/Linux users can find the GPL in /usr/share/common-licenses/GPL. gopher/debian/dirs0000644000000000000000000000007113550124451011334 0ustar usr/bin usr/share/man/man1 usr/share/man/man5 etc/gopher gopher/debian/docs0000644000000000000000000000015610762617110011330 0ustar README doc/INSTALL doc/TODO doc/client.changes doc/clientlogging.vms doc/object.changes doc/PLATFORMS doc/FAQ gopher/debian/rules0000755000000000000000000000573313550124443011543 0ustar #!/usr/bin/make -f # Sample debian/rules that uses debhelper. # GNU copyright 1997 by Joey Hess. # # This version is for a hypothetical package that builds an # architecture-dependant package, as well as an architecture-independent # package. # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 # This has to be exported to make some magic below work. export DH_OPTIONS configure: configure-stamp configure-stamp: dh_testdir # Add here commands to configure the package. autoconf autoheader ln -vs /usr/share/gnulib/lib/getloadavg.c . ./configure --prefix=/usr --mandir=\$${prefix}/share/man \ --infodir=\$${prefix}/share/info --disable-auth \ --sysconfdir=/etc touch configure-stamp build: build-stamp build-stamp: configure-stamp dh_testdir # Add here commands to compile the package. $(MAKE) touch build-stamp clean: dh_testdir dh_testroot rm -f build-stamp configure-stamp # Add here commands to clean up after the build process. -$(MAKE) distclean -$(MAKE) clean -rm -f `find . -name "config.cache"` -rm -f config.status -rm -f `find . -name "config.log"` -rm -f Makefile.config gopher/Makefile gopher/locales/Makefile \ Makefile config.h doc/Makefile \ gophfilt/Makefile object/Makefile getloadavg.c dh_clean install: DH_OPTIONS= install: build dh_testdir dh_testroot dh_prep dh_installdirs # Add here commands to install the package into debian/gopher. $(MAKE) install prefix=`pwd`/debian/gopher/usr \ PREFIX=`pwd`/debian/gopher/usr \ DESTDIR=`pwd`/debian/gopher chmod -R a-x debian/gopher/etc #dh_movefiles chmod u+x debian/gopher/etc/gopher debian/gopher/etc # Build architecture-independent files here. # Pass -i to all debhelper commands in this target to reduce clutter. binary-indep: DH_OPTIONS=-i binary-indep: build install # Need this version of debhelper for DH_OPTIONS to work. dh_testdir dh_testroot # dh_installdebconf dh_installdocs dh_installexamples dh_installmenu # dh_installemacsen # dh_installpam dh_installinit dh_installcron dh_installlogrotate # dh_installmanpages dh_installinfo # dh_undocumented dh_installchangelogs dh_link dh_compress dh_fixperms # You may want to make some executables suid here. dh_installdeb # dh_perl dh_gencontrol dh_md5sums dh_builddeb # Build architecture-dependent files here. # Pass -a to all debhelper commands in this target to reduce clutter. binary-arch: DH_OPTIONS=-a binary-arch: build install # Need this version of debhelper for DH_OPTIONS to work. dh_testdir dh_testroot # dh_installdebconf dh_installdocs dh_installexamples dh_installmenu # dh_installemacsen # dh_installpam dh_installinit dh_installlogrotate dh_installcron # dh_installmanpages dh_installinfo # dh_undocumented dh_installchangelogs dh_strip dh_link dh_compress dh_fixperms # You may want to make some executables suid here. dh_installdeb # dh_makeshlibs # dh_perl dh_shlibdeps dh_gencontrol dh_md5sums dh_builddeb binary: binary-arch .PHONY: build clean binary-arch binary install gopher/debian/startopts0000644000000000000000000000141410762617110012441 0ustar # Put options for gopherd in here. Set options to "" to not set # or follow the comments. If chroot is enabled, you wiill not be able # to use decoders unless you copy them under your gopher root. The # same goes for calling other scripts, and there may be logging # difficulties. # Set DONTCHROOT to -c if you don't want to use chroot. # DONTCHROOT="-c" DONTCHROOT="" # The username that you run gopher as. Leave blank to run as root. # USEUID="" USEUID="-u gopher" # The option file for gopher. OPTIONFILE="-o /etc/gopherd/gopherd.conf" # Logging. Set to the empty string to disable. #LOGGING="" LOGGING="-l /var/log/gopherd.log" # The home for gopher. GOPHERHOME="/var/gopher" # Gopher's port. GOPHERPORT="70" # Any other options to pass along. OTHEROPTS="" gopher/doc/0000755000000000000000000000000013550124357010002 5ustar gopher/doc/FAQ0000644000000000000000000000511410762617110010331 0ustar ---------------------------------------------- Gopher/Gopherd FAQ $Id: FAQ,v 1.5 2002/03/19 17:51:18 jgoerzen Exp $ This is the FAQ for gopher and UMN gopher. The latest version may be found at: gopher://quux.org/1m/devel/gopher/Downloads/LiveSource/gopher/doc/FAQ ---------------------------------------------- What is Gopher? Well, it's a bit complicated. Gopher is all of these: 1. A protocol for an Internet world-wide hierarchial filesystem; 2. A client for using that protocol; 3. A site containing information in that protocol. Let's elaborate: #1. Gopher is a way to exchange information, similar to HTTP that is used for the web. Unlike HTTP, Gopher is simple and flexible yet rigid. Gopher mandates a hierarchial view of things -- just like you get on your own system with files and folders. Gopher extends your desktop file/folder concept to include the entire Internet. You could have a folder whose contents come from 20 different countries, and it would all be transparent. Modern gopher browsers such as Nautilus support this very feature. #2. The "UMN Gopher" client was developed at the University of Minnesota, the home of gopher. Currently, the UMN Gopher client and UMN Gopherd server are maintained by John Goerzen and the Gopher Project; see gopher://quux.org/ for details. #3. When you publish information with Gopher, you're said to run a "gopher site" similar to running a "web site". ---------------------------------------------- Where can I find gopher software? gopher://gopher.quux.org/11/Software/Gopher/Downloads If you do not already have Gopher, try: http://quux.org/hurg/hurg?selector=1%2FSoftware%2FGopher%2FDownloads&port=70&type=1&host=gopher.quux.org&username=Clients%2C+Servers%2C+and+Downloads Downloads of UMN gopher and other gopher projects hosted at quux.org are available at: gopher://gopher.quux.org/11/devel/gopher/Downloads http://quux.org/give-me-gopher/ ---------------------------------------------- Is there a mailing list? Yes. See gopher://gopher.quux.org/00/devel/gopher/Mailing%20List.txt for details. Or: To subscribe, send the text "Subscribe" in the subject of a mail to gopher-request@complete.org. To post, send the message to gopher@complete.org. Archives are at http://www.complete.org/mailinglist/archives/ and at gopher://gopher.quux.org/1/Archives/Mailing%20Lists/gopher. ---------------------------------------------- [UMN] I'm having trouble compiling gopher(d) Where's gopherd? As of version 3.0.6, gopherd is deprecated. Please use PyGopherd instead. Information about PyGopherd is at http://quux.org/devel/gopher/pygopherd gopher/doc/INSTALL0000644000000000000000000002070010762617110011026 0ustar $Id: INSTALL,v 1.4 2002/04/26 13:33:33 jgoerzen Exp $ Installation Instructions for Unix Gopher. ------------------------------------------ PLEASE NOTE: If you have any problems, please read the PLATFORMS file! In fact, you should read it for hints BEFORE reading this file. Almost all configuration is now done using the 'configure' shell script at the top level of the distribution. To get a list of options that configure supports, type the following command configure --help Parameters that used to be hand edited into Makefile.config can now be set with command line switches. For full text indexing consult the section at the end of this document. Basic Installation ================== The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, a file `config.cache' that saves the results of its tests to speed up reconfiguring, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.in' is used to create `configure' by a program called `autoconf'. You only need `configure.in' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. If you're using `csh' on an old version of System V, you might need to type `sh ./configure' instead to prevent `csh' from trying to execute `configure' itself. Running `configure' takes awhile. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package. 4. Type `make install' to install the programs and any data files and documentation. 5. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. You can give `configure' initial values for variables by setting them in the environment. Using a Bourne-compatible shell, you can do that on the command line like this: CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure Or on systems that have the `env' program, you can do it like this: env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you must use a version of `make' that supports the `VPATH' variable, such as GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. If you have to use a `make' that does not supports the `VPATH' variable, you have to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. Installation Names ================== By default, `make install' will install the package's files in `/usr/local/bin', `/usr/local/man', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PATH'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you give `configure' the option `--exec-prefix=PATH', the package will use PATH as the prefix for installing programs and libraries. Documentation and other data files will still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=PATH' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Optional Features ================= Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. ---------------------------------------------------------------------- Setting up a multi-lingual gopher client ---------------------------------------- If you have any users who don't speak English fluently, you may want to check out the gopher client's multiple language support. To do this you need to turn on the -DGINTERNATIONAL option in the Makefile.config before compiling, and then follow the directions in the gopher/locales/README to install the language data files for the client. Installing external programs for the gopher client -------------------------------------------------- The gopher client depends on certain external programs for some functionality. Most of these will be present on any good unix system. However you may need to install the following: For tn3270 connections you'll need tn3270 or a version of telnet that understands tn3270 control streams. For downloading in the client you'll need two distributions, kermit and zmodem. The binaries are "kermit", "sz", "sb", and "sx". To view metamail documents you'll need mm.tar.Z available from thumper.bellcore.com. To view graphics you'll X windows and xloadimage or xv or any other generic graphics program. To listen to sounds you can use the "play" command on SunOS or the play command in the misc directory for the NeXT Full Text Indexing Setup for NeXTs (NeXTos 2.0, 2.1, 2.2) --------------------------------------------------------- First get the libtext and btree libraries. (Available as a separate tar file called NeXTtext.tar.Z). The files libbtree.a and libtext.a are in this tar file, along with two directories "btree" and "text". Copy the library (.a) files to /usr/local/lib and type ranlib /usr/local/lib/libbtree.a ranlib /usr/local/lib/libtext.a Then copy the directories btree and text into /usr/include Full Text Indexing Setup for WAIS --------------------------------- First get the wais distribution. If you don't have wais, ftp to "gopher.boombox.micro.umn.edu" and get /pub/gopher/Unix/freeWAIS-sf-2.0.tar.gz Untar this and edit the makefiles appropriate for your system. After you untar the distribution, go into the top level WAIS directory and make the distribution. Refer to the instructions in the WAIS distribution. Now go to the top level of the gopher distribution and do the following: % cd {GopherSrc} % ln -s {WaisTop} wais If you've compiled an older version of gopherd, make sure to type "make clean" first. gopher/doc/Makefile.in0000644000000000000000000000065410762617110012050 0ustar include ../Makefile.config TARGET = gopher.1 \ gophfilt.1 gopherrc.5 install: $(TARGET) @INSTALL@ -d -m 0755 $(MAN1DIR) @INSTALL@ -d -m 0755 $(MAN5DIR) @INSTALL@ -m 0644 gopher.1 $(MAN1DIR) @INSTALL@ -m 0644 gophfilt.1 $(MAN1DIR) @INSTALL@ -m 0644 gopherrc.5 $(MAN5DIR) all: $(NROFF) gopher.1 >gopher.cat $(NROFF) gophfilt.1 >gophfilt.cat $(NROFF) gopherrc.5 >gopherrc.cat clean: -rm -f *~ gopher/doc/PLATFORMS0000644000000000000000000000445410762617110011277 0ustar $Id: PLATFORMS,v 1.13 2002/03/20 02:44:51 jgoerzen Exp $ These are the platforms on which gopher is known to work. Gopher should also work on any Unix/Posix platform (Solaris, SunOS, *BSD, Linux, MacOS X, etc). Please let us know if you have troubles compiling or running gopher on your platform by e-mailing gopher@complete.org. The second column in the list below indicates the latest version of gopher that someone has reported about. Thanks! jgoerzen@complete.org Platform Gopher Notes --------------------------- ------ ----------------------------------- FreeBSD/i386 ?.? 3.0.1 requires gmake FreeBSD/i386 4.4 3.0.3 OK -- Kevin Griffin Linux/alpha 2.2 (Debian sid) 3.0.3 verified for each release by jgoerzen Linux/i386 2.2 (Debian sid) 3.0.3 OK -- John Goerzen Linux/ppc 2.4 (Debian sid) 3.0.3 OK -- John Goerzen Linux/i386 ?.? (Slackware) 3.0.1 MacOSX/ppc 10.1 (Darwin) 3.0.4 use gnumake instead of gmake Build on UFS partition SEE NOTES BELOW OK -- John Goerzen NetBSD/i386 1.5ZA (-current) 3.0.4 verified for each release by jgoerzen requires gmake Solaris/i386 2. 3.0.2 OK -- Don Fike ----------- If you want to use gopher on older platforms (VMS, Ultrix, etc), please check out the UMN gopher 2.3.1 distribution. Gopher 3 is not currently supporting VMS, though we have not removed the VMS support from the tree. (VMS hackers: help us out!) ** Special notes for Mac OS X / Darwin: Darwin appears to have some compatibility problems. Note that you must have the developer pack installed to build gopher. You must also use gnumake instead of make. Now here's the kicker -- If you are building on a HFS+ partition rather than a UFS one, the case-insensitivity in the operating system can cause problems. Build instead on a UFS partition. You can try this by using the Disk Copy tool to create a UFS playground within your HFS partition. Untar the gopher source tree on this UFS volume and build it there. Clint Paden reports that this will work. gopher/doc/TODO0000644000000000000000000000131610762617110010467 0ustar --docs Make better documentation and man pages. Add docs about the hazards of chroot(). --client Option for append, rather than overwriting saved files.. Figure out exactly how to get line drawing characters on hpux and Ultrix... Add support for cursor keys for non vt100 on non System V curses machines Fix the telnet option so that it says Control-T on the RS/6k. Add 'L'anguage choice menu to non-VMS versions. Finish ANSI printing options --server Try to eliminate more lookups. Make SIGHUP reread the gopherd.conf file. Fix problems with .cap for -t para files. Fix problems with a viewext .doc and WAIS searches. Add caching and proxy code --index server Allow search on dates and date ranges. gopher/doc/client.changes0000644000000000000000000011520510762617110012612 0ustar $Id: client.changes,v 1.1 2000/08/19 00:28:56 jgoerzen Exp $ Gopher 2.3 patchlevel 0 ----------------------- * Entire source tree modified to use GNU autoconf. Gopher 2.2 patchlevel 0 ----------------------- * Entire source tree converted to ANSI C. * New interrupt routines. * Prevent sending "gripe" messages that might have just been accidental typing of 'g', by requiring a minimum size message * Added an environment variable GOPHERMENUSTYLE for sites that might want to display the menu differently than as "[%d] title..." * Klingon messages, for folks who get into that sort of thing.. Gopher 2.1 Client patchlevel 3 ------------------------------ * Replaced Gopher Object Initializer routines. This fixes some problems on some systems (VMS in particular) Gopher 2.1 Client patchlevel 2 ------------------------------ * *IMPORTANT* Fix for binary file retrievals on certain machines. * Word wrapping now works in ASK forms. Thanks go to Pacific Bell Knowledge Network for these patches. * Client can now use SOCKS for sites behind firewalls. See Makefile.config for more configuration information * Added Danish Gopher Messages and Help file. * New Espanol Help file * Added Danish as a default choice for VMS clients, more hlp and hlp_secure comments for folks customizing their message files. * Use VARIABLE length records for text on VMS * Don't add the default gopher server when using the -b option. * Fixes for jpeg, tiff display in the default gopher.rc file. * Remove hard limit of 5 AskL items per form. Patch provided by Pacific Bell Knowledge Network. * Dynamic screen position code, long title fix from Allan L. Bazinet * Fix for VMS language build procedures. * Fix memory leaks. * Fix for UCX menu ordering Gopher 2.1 Client patchlevel 1 ------------------------------ * Fixed a major problem with launching telnet in the fileio routines. Some operating systems would get hung in FIOwaitpid forever. * Added VMS code from F. Macrides for specifying the default language via the GOPHERMSGS_DEFAULT definition in conf.h, for when a series of languages have been made available by setting the DCL logical LC_MESSAGES to the * wildcard. * Added code for specifying the device where shared images of message files will be found, via the GOPHERMSGS_DEV definition in conf.h. * Better VMS TPU language build script. * Indicate 'D'ownload as an option on exit from the pager in SecureMode and NoShellMode. * Don't auto exit paging at the end of the file * Fixes for French messages from Eddy Beliveau * JL Wilkinson 16-Jul-1994 Merged in TGV's syslog() functions to allow the CLIENT_LOGGER and TELNET_TRACE functionality to work with Multinet. * Fix for folks with non gopher port of 70 in conf.h * DEBUG compile option for VMS * Fix prototype for DCLspawn_exception * Better VMS make, compile and link com files. Gopher 2.1 Client patchlevel 0 ------------------------------ * New Language files for Italian, German and piglatin. * Added support for Adobe Portable Document Format, PDF. * Bug fix: adding a text file to the bookmark list doesn't make the file inaccessable. * Start to support the IETF URL format partially. * Client can now print to ANSI attached printers in the built in pager. * Features from Alan and JL for Language Definitions and Gripes F.Macrides 27-May-1994 Added option to allow 'd'elete only for bookmarks via a DELETE_BOOKMARKS_ONLY compilation symbol. * Add INTLOPTS, add locales dir target for clean * Add parenenthesis to illegal chars * Add internal upload and download options to code (no docs yet..) * Skip over type 'i' items. * Added code from J. Lance and Alan C. to do better internationalization * Pause after telnet/tn3270 to permit reading of any error messages. * Added telnet and tn3270 to prompt for a URL via the 'w' command. * Gopher can use some URLs on the command line (without the -w flag..) * NEVERSETOPTIONS compilation symbol disables ability to set options via SetOptions() and issues an appropriate message. * NEVERSPAWN compilation symbol disables the spawn command and issues an appropriate message. * On VMS, the NEVERSETOPTIONS and NEVERSPAWN symbols can be used to create a gopher image for CAPTIVE accounts which still permits functions that would be disabled by the -s or -S switch, but issues an appropriate message (rather than a DCL error message) on spawn attempt and precludes "creative" modifications of the display software and print command mappings. * make searchbolding the default, add note for vms admins * Fix problem with NO_MAPS.. define, add code to check for new config file * Allow 'home' gopher server in gopherrc files. * Define, add code to check for new config file in the global gopher.rc. The user can choose whether to merge the new definitions in. * Define Gopher type '!' as an application. Applications are launched based on the gopher+ view type. Documents aren't tranferred and there isn't any prompting. * (F.Macrides) Fixed PagerNextPage() and PagerSearch() to not add extra blank lines following lines that are exactly equal to the screen width on VMS. Added code to disallow 'm'ail if SecureMode or NoShellMode and the NOMAIL symbol was defined on compilation. * New message base for Latin American Spanish. * French Gopher Help file Gopher+2.0 patchlevel 16 ------------------------ * F.Macrides 27-May-1994 Added option to allow 'd'elete only for bookmarks via a DELETE_BOOKMARKS_ONLY compilation symbol. * Added option to not read maps from the user rc file (i.e., only from the system rc file) in SecureMode or NoShellMode, via the compilation symbol SECURE_MAPS_GLOBALRC_ONLY. * Put back -force_html %s for the lynx command in the VMS section (really *is* needed with the current text/html code when foo.html files are supplied by a gopher+ server from it's own data tree; other Web browsers don't have that switch, and won't work right with gopher+ servers until they can use the gopher+ extra stuff to determine the mime type. * Better Man pages * Remove hymoo.c from VMS compilation script * Added option to allow 'd'elete only for bookmarks via a DELETE_BOOKMARKS_ONLY compilation symbol. * Fix for SetOptions() on VMS * better gopher help file * make searchbolding the default, add note for vms admins * (F.Macrides) Added option for not reading maps from a Bookmark file when the client is running in SecureMode or NoShellMode, implemenented via the compilation symbol SECURE_MAPS_GLOBALRC_ONLY * Fix for VMS linking problem * Added Gerd.Boehm@physik.uni-regensburg.de patch for off-by-one line counts in AskL blocks. * Fix for CSO dashes mania.. * (F.Macrides) Fixed PagerNextPage() and PagerSearch() to not add extra blank lines following lines that are exactly equal to the screen width on VMS. Added code to disallow 'm'ail if SecureMode or NoShellMode and the NOMAIL symbol was defined on compilation. Fix for redisplay after using help * Add Swedish messages from Johan Svensson * Fix for NO_FREEWAIS switch Gopher+2.0 patchlevel 15 ------------------------ * Many modifications for internationalization. Gopher can now use message catalogs for French and Spanish. Adding other languages is fairly easy. * Fix for Forms with multiple AskL items, or AskL items not as the last item. * Don't allow users with rsh to specify a shell as an display or print application. * Added documentation on the new URL= option in .link file from Alan Coopersmith * New manual page for gopherrc. * Fix for bad free() in CURrequest() * Fixed ^_ mislabel of the ^- help command. * Added prompt for RETURN in VMSExit(), to enable reading of ACCVIO tracebacks * Changed return values of DCLSystem() to be compatible with the for-Unix code. * Fixed spawns to work with OpenVMS/AXP v6.1 (still doesn't have the TRUSTED flag). * Modifications for Debug() and mismatched NULL arguments, added Debugmsg * Fix for last line without newline * Mods for TCPWARE on VMS * Use fast malloc routines on VMS VAXC. * Fix for binhex downloads on vms and use dump command for binary files * Fix for bad free() in SetOptions() * Added code for mapping telnet and/or tn3270 commands to "- none -" for disabling them and having the client issue "Sorry, not implemented" messages on efforts to use Type 8 or T tuples. * Added FIOsystem() failure messages for both VMS and Unix. (all from F.Macrides) * Allow VMS environment variable reading routines to be used on Unix systems. * eliminate redefinition of open to open_vmsopt() for ALPHA (Macrides) * Fixed break of open() for Alpha. (all From F.Macrides) Gopher+2.0 patchlevel 14 ------------------------ * Fix for the problem of vanishing bookmarks Gopher+2.0 patchlevel 13 ------------------------ * Fix for bug when mailing items that caused a most certain crash.. * Fixed definitions for HTML browsers. * Added support for AskL: items in ASK forms. Currently you're limited to a maximum of ten lines. * All remaining dangerous system calls were replaced with FIOsystem() calls. (i.e. the secure system call) * Fixed a few rare bugs with ASK blocks where whatever you typed was wiped out. * Should compile on more systems probably pyramids.. Gopher+2.0 patchlevel 12 ------------------------ * Fix for big bad telnet security whole, plus many more additions for secure process i/o * Forms now use new screen management functions. Any size form can be scrolled through, this includes other forms, like the CSO search screen. * Boxes and alternate character sets are used in a much more sane manner. The problem of garbage on OSF/1 systems and others should be remedied * The Help file has been improved. * Improved Gripe command, improved signal handling * Client now compiles correctly for Data General * text/html viewer support for lynx 2.1 & CERN's www-linemode client * Added anonymous ftp type 'f' option * Better sanity checks for box drawing characters * Fix bug in gcc for Solaris 2.x for curses routines * New memory management routines for strings improves performance quite a bit for large directories * More robust routines that deal with malformed VIEWS blocks * Better GDdeleteGS method, allow ignoring of items by doing a Type=X in a .names file * Allow bangs in Domain= lines, to negate classes of hosts * Portions of the code now use the new non sh routines for starting processes. More will follow. * Much better URL handling from Alan Coopersmith Gopher+2.0 patchlevel 11 ------------------------ * Better method of drawing box characters dependent on terminal type. Terminal types supported: vt100, z29, others. * Don't allow downloads of type 'i' items. * 'v' no longer does anything if user is already viewing bookmarks. * Fix the 'm' command so that it deletes the current menu's cache files. Also prevent 'm' from destroying bookmarks. (Beckett) * In describe_gopher(), add TRUE argument to GStoLink() so that the Admin and ModDate information are displayed ('=' and '^'). (Macrides) * Prevent describe_gopher() from destroying the cache file for the current item. (Beckett, Wolfe) * More stable file caching, subject line chopping in Gripe * Fix improper include of sys/fcntl.h in gopherrc.c * Prettier Info items in gopher directories, removed dot from the end of files In DisplayTitle(), menu items now fit properly when the line is too long for the screen. (Beckett) * filter out more characters when saving files for VMS * In Save_file(), disallow saving of type since this is fetched as a set of indexed fields instead of as a savable file. Also disallow saving of info and error types since there's nothing to save. (Wolfe, Beckett, Macrides) * Clarified help/messages, mods for box display In PagerInitGlobal(), initialize 'currentpage' to 0 in order to correct problems with the page-up command ('b') that are due to the static nature of 'currentpage' and 'positions[]'. Remove static initialization of 'currentpage' since it may be misleading. (Wolfe) * In PagerBuiltin(), fix page-up ('b') command to not execute if the currently displayed page is the first page of the text. (Wolfe) * In PagerBuiltin(), fix search command ('/') to begin searching at the top of the currently displayed page. This allows search to successfully find and highlight text on this page. (Wolfe) * In PagerBuiltin(), modify search command ('/') to not search for a null string. (Wolfe) * In PagerBuiltin(), modify repeat search ('n') to display an error message when attempted without a defined search string. This is consistent with the behavior of 'n' at the menu level. (Wolfe) * In PagerBuiltin(), clean up deleted subwindows when doing searches. This affects AIX, Ultrix, and perhaps others. (Beckett) * Add q to exit out of pager for completeness Gopher+2.0 patchlevel 10 ------------------------ * Fix for segmentation fault when saving or downloading * Fix for osf curses line drawing characters * Fix for people trying to download the help file * Move screen refresh stuff to CURwgetch() * Add optional client logging * Cleanup on a SIGHUP signal * Use $HOME instead of password routines to read .gopherrc * Allow saving to variable length record VMS files (see conf.h) * Add Movie (;) and Info (i) type support * Add q to exit out of pager for completeness * Now possible to print via builtin pager. Gopher+2.0 patchlevel 9 ----------------------- * Add early searching.. tag for CSO, better ui * Fixed spawned process error checking on Unix, add third arg to Save_File * Cleanup on a SIGHUP signal * Fixes for empty bookmark addition problem * Fix for segvs when exiting early * In the 'o' command, allocate memory for the form based on screen width. * Don't redraw the screen if we attempt to go up a directory level from the root level. * In Gripe(), allocate memory for the form based on screen width. Fix email parsing under VMS. Fix problem where gopher did not delete mail temp files under VMS. (Becket) * In process_request(), make the status "Receiving xxxx..." a bit more descriptive for images, MIME files, and other files. (Becket) * In Save_file(), choose a view BEFORE opening the file -- user may change mind and cancel, which left a zero-length file previously. * In Save_file(), check to see if a view has already been chosen. * Redraw the screen after e-mailing a document. User may be emailing to himself or get an error message. * Backing past the top of document no longer brings up help. Text screen no longer redraws after the help screen disappears. * The gopher: url shouldn't have that extra slash Gopher+2.0 patchlevel 8 ----------------------- * The built in pager can now mail/save/download. * Add [space to cycle] prompt *before* you entered a choice item in an ask block. * Bolding of searched words in the pager is now a changeable option. * Pressing the DEC HELP key/KEY_HELP will get help * Fixed lots of memory allocation errors in AskBlocks code. Shouldn't dump core no more.. * Client will clean up transfered files on more abnormal occasions. * Last bookmark can now be deleted. Gopher+2.0 patchlevel 7 ----------------------- * Make sun shared libraries optional * Add support for DEC HELP key/KEY_HELP * Exit on error reading from terminal (kills spinning processes) * Implement all remaining ASK block items (Select, Choose). * Some Spelling corrections * Modified CURGetOneOption() to have a Title field. Serveral other routines modified for improved line editing and to show all available commands while answering prompts. If dialog box has only one prompt, as for search query entries, start user entry on new line so more of the screen is available for the entry (useful for search terms with booleans). * Add Funky cool builtin pager (also changed defaults to use builtin pager.) * Fix core dumps when exiting from bookmark screen. * Add support for tn3270 on oddball ports.. * Add command-line searching * Fix for caching of alternate view items. * Don't allow null applications to be added with the options code. * Getting info displays the URL of the item. * Inform user about mal-configuration if view has Unix piping on VMS. * Added code for mailing gripes from VMS systems, and fixed memory leak in the Unix code. * Added v1.12b 'S' command for saving titles in a directory. * Added titles to CURGetOneOption() calls. * Don't connect if nothing typed in 'o' * Add a sample TPU file/pager for VMS * Add Environment variable processing for VMS, plus add support for HTML * Moved GLOBALRC definition to conf.h for VMS * Use and external browser for html * Add support for HTML and MIME on the menu displays * Fix for compiler error on Alpha Gopher+2.0 patchlevel 6 ----------------------- * Fix for problems when retrieving empty directories. * Fix for arrow updating. * Don't connect if nothing typed in 'o' * Selecting an Ask item more than once doesn't crash the client. * Many fixes for DEC Alpha AXPs running OpenVMS from F.Macrides: Added temporary code to work around DECC/AXP's problems with screen clearing and cursor homing (we'll get rid of that code if the problem goes away in the next version of DECC/AXP). It's bolding via standout() or wstandout(win) still doesn't work, but that's not a serious functional problem for gopher users on Alphas. Added exit block to ensure that the terminal characteristics are retored and cleanups are done on VMS. Added code for getting terminal characteristics from the terminal table on VMS. Replaced/modified Cruft for VMS with routines which handle both Control C and Control Y, enable use of ReallyQuit(), and restore all original terminal characteristics for spawns and intentional or unintentional exits. Did it in a way that should stay transparent to the otherwise "for-Unix" code, and should hold up with future mods or enhancements of that code. Standout() doesn't work at all and endwin() and delwin() are unreliable on Alphas (due to bugs in the Alpha's Curses library). Andrew Heyler is looking into workarounds, should DEC not fix the bugs soon. Code compiles with DECC on Alphas without warnings or error messages, but still get lots of "informational" messages due to incomplete prototyping (no problems or compiler messages with VAXC). * REMOTEUSER is now compiled in by default.. * More debugging output from Mitra. * secure patch from mitra. * Moved vms opt files into their own directory. Gopher+2.0 patchlevel 5 ----------------------- * Fix for really long strings in some menus * Get rid of the beep during a ^G in CURwgetstr(). * Make CURChoice() delete its window when it exits. * Fixes for CMULIB and NETLIB for VMS * Mods for VMS for telnet dialog, argv[0] * use x-troff instead of troff in gopher.rc Gopher+2.0 patchlevel 3 ----------------------- * Additional checking for mail address syntax from Wolfgang Ley. Gopher+2.0 patchlevel 3 ----------------------- * Should compile for CMUIP and NETLIB on VMS (not tested) * Fix for control-c on startup * Added warning comments in mail_file() Gopher+2.0 patchlevel 2 ----------------------- * Use /bin/mail instead of ucbmail * Rebuild client if patchlevel.h changes * Fix for problems with '=' and '?' and /bin/mail Gripe mods Gopher+2.0 patchlevel 1 ----------------------- * Bigger Better Badder Options, inspired by jqj * Audio file fix from jqj * Don't allow securemode types to use o * Bigger Better Badder Options, inspired by jqj * Fix for VMS unresolved variables * Change audio/mulaw to audio/basic for MIME Gopher+2.0 ---------- * Client supports AskL: and AskP: * Mitra mods.. More secure downloads. Optional Autoexit feature. * Mods from Dirk Herr-Hoyman: Add default to gopher client view selection. This includes making Text/plain the default view. Make view types "pretty" in view selection. Fixed a nasty bug view selection. When you choose an item that does not have a viewer, a previous view type was used. Don't EVER use static again :-) Various error checks. Mostly adding error checking. * Interrupts are now handled cleanly. Pressing control-c and then selecting "n' for no will leave you back where you started.. * Client now compiles on VMS cleanly. * ASK blocks now work for all Gopher items, not just documents.. * Fixed problems with CSO caching of search results. Also changed the way CSO searches are done, you return to the search dialog after each search instead of returning to the directory view. * Kermit binary downloads now work. * Fixed problem in gripe with messed displays.. * Fixed VMS telnet's using Multinet so they work correctly for ports other than 23. * CleanupandExit() now works better with some signal() implementations. * Added ^R and ^W as aliases for redraw for VMS * Added the 'o' command to open a new gopher session to any host/port * Fixed problem with 'A' command, it was adding the wrong directory. * Added '!' to do a shell escape. (or '$' on VMS..) * Ctrl-Z does an unconditional quit on VMS. * Fixed bug with '=' on systems without a tempnam() (i.e. NeXTs etc.) Changes from 1.2b3 to 1.2b4 --------------------------- * Fixed problem with signals in subprocs.c * Fixed bug in Ask routines * Made having m to mail an option for CLIENTOPTS * Removed extraneous wattron/wattroff in CURBox() * Added mods for REMOTEUSER from Mitra. * Added better error messages for non-connecting sockets (jqj). * Added client option for not including MAILing for a secure client. Changes from 1.2b2 to 1.2b3 --------------------------- * Added support for Note: block in ASK blocks. * Default ASK values now appear in the ASK form. * Removed many memory leaks. Thanks purify! * Enhanced caching of retrieved files. The client saves any file that is viewed just in case you want to see it later. Destroys them when you're finished with a directory. * Mail Save and print are now available again, but bolding is being reworked. * Screen doesn't blink when you choose an item by number (Mitra). * Memory leaks are gone, plus many more bug fixes. Changes from 1.12 to 1.2b2 -------------------------- * Client now works with Gopher+ servers. * Fixed problems with freeing memory on NeXT systems (and any systems that have tmpnam() instead of tempnam() * Fixed problems with Gopher+ bookmarks. * Options screen is still broken, in the process of replacing it with something much better. * Can now directly pipe into commands. Can even set the pager to "|more" for instantaneous viewing of big files. * Global gopher.rc file installed in CLIENTLIB * Long filenames are now truncated. Changes from 1.11b to 1.12 -------------------------- * Added ^R to redisplay keys for those VMS types. * Fixed window-memory leak in CURChoice(); * Fixed problem with pagers that don't leave the cursor at the beginning of the line. * Now compiles cleanly under UCX. * Save_file now generates "pretty" VMS default file names. * Fixed bug with one item directories not showing up correctly. Changes from 1.11 to 1.11b -------------------------- * Save_file now filters for directories and searches. * Removed \n from system() calls for VMS. * Reverted to old behavior in readfield() This is especially important for sites that stuff \n's in their titles/paths. * Bugs!!! Fixed problem with 's' for saving at a menu. Also fixed function calling to Save_file. * Secure mode now actually lets people view documents. * VMS users can now see the bytes per second on their transfers. Changes from 1.1 to 1.11 ------------------------ * Added file downloading command 'D'. Right now it's hard coded for kermit, sz, sb, and sx download commands. This can be customized easily by editing download.c. * Client no longer trys to display images when in secure mode. An error message is displayed instead. * Added command line option -T to set the initial type of object being displayed. * Improved behaviour when executing an item by typing it's number The arrow and screen are updated to reflect the item being retrieved. * Fixed display problems with directory title searching. * Client now compiles underneath VMS. See README.VMS in the top level for more information. (Thanks Earl and JQ!) * Should compile on UNICOS now. (Hal Peterson, hrp@cray.com) * CSO searches now gather fields that have the "Lookup" attribute instead of the "Indexed" attribute. * Name of the CSO popup is now the name of the gopher item being searched. * CSO dialog cancels automatically if no search data is entered. * Saving a file after a search doesn't save the highlighting codes now at the expense of retransferring the file. * Fixed initial display message to "Press RETURN to continue". Initial gopherrc file now has sane file permissions. Changes from 1.03 to 1.1 ------------------------ * Processing of overly long titles is now better dealt with. * By popular demand, typing a number "enter's" the item, instead of just moving you there. * Copyright notice is displayed when you enter gopher for the first time. * Added support for GIF files. * Fixed bug where you can't change the Mail command. * Now can save direct from the menu, press 's', doesn't put icky bolding characters into your data... * You can now save into pipes, i.e. "| uncompress| xloadimage -" will do the right thing... Can't do it in securemode though.. * Can now save in ~/ and ~username. * Removed dead code, blew away error.c. * Fixed error processing for cso queries. (JQ Johnson) jqj@ns.uoregon.edu * Changed prompt for mailing a document to "Mail current document to:" Mod from dhgo@midway.uchicago.edu (donald goldhamer) * Some of the error messages are more descriptive (unknown host etc.) * Client distinguishes between 3270 and Telnet types. Marie-Christine * Fixed problem with line positioning when a failure to connect occurs. * Fixed bug when deleting last bookmark in a directory. Also fixed screen updating problem when deleting last bookmark in a list. * Added additional input processing, ^u now kills the entire line. Cursor keys can move within any entry dialog. * Fixed problem with backspace key on certain system V systems. * Cursor keys now wrap around the main gopher menu. * Added snazzy dialog boxes everywhere. Experimented with Character graphics. Should be much easier to use. * File/socket I/O is greatly improved. read() system calls reduced 1000 times or more. * Fixed problems with leftover files in /tmp. * The client now allows you to specify more than one server on the command line. Do it like this: gopher gopher 70 gopher2 70 It will randomly choose either server, this is useful for duplicated servers. Changes from v1.02 to v1.03 --------------------------- The client can now interrupt searches using Control-c. However this can be buggy. The current position on the screen isn't quite updated properly, and things will probably break if you're reading a long directory.... Gopher now looks in the "Name" instead of the "path" to find a default name to save in.. Works for WAIS docid things. Client can now view images. There is a new environment variable GOPHER_IMAGE. It's a little different than the patch that's already out there. Searches in a menu (the / command) are now case insensitive. PagerCommand is now saved. PAGER still takes precedence, though. Fixed bogus out of memory error when mailing a file. Added casts to each and every malloc(); Changed name of PC binary files to PCBIN instead of HQX, confusing at best... Changes from v1.01 to v1.02 --------------------------- Fixed problems with input handling and core dumps on Ultrix machines. Added a new option -b, it starts the client on the bookmark page. Fixed problem with 'm' key. It didn't update the current cursor line. Caused core dumps too. Fixed problem with getting moved to the first item of a directory when choosing not to search a search type. Fixed problem with cbreak redefinition on some Sequent systems. (Sellens) Changed o to O in the gopher help file. Fixed problems with input handling in Ultrix. keypad() was the culprit. Client now deals with MIME stuff correctly. (Mark Whidby) Client now deals with window size change signals and suspend signals better. Client now also doesn't update screen size if it receives a window size change signal and the screen size hasn't actually changed. (which can happen in a Sun cmdtool window) (jqj@duff.uoregon.edu) Added searching functionality in menus, press '/' to search for a string, 'n' afterwards will search for more items of that name. (David Datta) Changes from v1.0 to v1.01 -------------------------- Fixed problem with compilation on NeXTs. Fixed problem with telnet and port 0 error messages. Changes from v0.9 to v1.0 ------------------------- Experimental MIME type is now supported. (Type 'M'). TN3270 type is now supported (Type 'T'). User can now escape from the Telnet/TN3270 connection screen. Ctrl-g will abort you out of all prompts, ala emacs. Added bookmark support and gopherrc file support. Bookmarks can be defined with the 'a' or 'A' key. The first marks the item under the cursor, the other marks the current directory. Bookmarks are stored in ~/.gopherrc, along with other configuration parameters. Client now does nifty twirl output to let you know it's up to something. It currently does this for directorys (one twirl per entry) and textfiles/cso searches (one twirl per 25 lines) This stuff is adapted from the panda code. Added more information on connections. It displays "connecting..." before it displays "retrieving directory..." Client beeps at you if you press the wrong keys now. The client doesn't redisplay the menu when an invalid key is pressed. Nice for people dialing in on 2400 bps lines. Now linking in the new swanky gopher library. I got tired of having many different versions of the same code lying around. Added fix from John Sellens that allows the user to escape from a CSO query. Fixed problem with titles not being updated when moving back a level. The client checks for environment variables for its configuration information. The following variables can be used: GOPHER_MAIL The program to send mail with (must understad -s option) GOPHER_TELNET The program to contact telnet services with. GOPHER_PLAY The program to play sound from a pipe. GOPHER_PRINTER The program to print from a pipe. This was all suggested and coded by Timothy M. Sigmon. Fixed typos in error.c relating to vprintf and err_init, patch from Jim Meyering. Cleaned up the SYSVCURSES stuff. You no longer need to specify whether or not you're using System V curses. Also fixed a problem relating to Newline and KEY_ENTER confusion. All in all the curses code is cleaned up quite a bit. Made the interface more consistent. Pressing 'l' will let you enter into and item (just like return and the right arrow..) (Glenn F. Leavell) Changes from v0.8 to v0.9 ------------------------- Gopher the Cache!! This version of the client caches the previous directories indefinitely.... Perhaps should add timeouts. Reduced memory usage ~4 times. Implemented data structures in pseudo C++ fashion. All memory for character strings is dynamically allocated. No more hard limits! Directories can be as large as your available memory! Cool! Removed bogus calls to strstr in gopher.c relating to bolding of output words. (Pointed out by Tim Perala) Fixed conf.h so that it doesn't bogusly set IS_BSD for an Encore Multimax. (Pointed out by Tim Perala) Bug: The prompt when viewing a file allows for mailing in secure mode. The actual code however doesn't let you do this. Fixed it. (Pointed out by Ed Symanzik) Fixed security hole. Don't allow people to change options using the O command when secure mode is active. (Fix from Rickard Schoultz) Also disabled saving hqxs and binaries.. Fixed annoyance. If you selected a directory and it couldn't connect, the cursor would jump to the first item. (Fix from Edward Symanzik) Fixed -t option parsing. Pointed out by Andreas Haug & John Sellens. Added Binhex and PChex compatibility. (Tweaks from John Sellens) Fixed problem with page up, it didn't go up all the way. It was 12 lines off. (Fix from Edward Symanzik) Changes from v0.7 to v0.8 ------------------------- Added fix from John Sellens: The client was opening a connection at the beginning of every session and not doing anything with it. A simple fix was all that was needed. Added enhancement from John Sellens: client now supports "Type 9" binary files. Fixed typo in help file, thanks to Nelson Beebe. The client can now send files using mail, in addition to printing and saving. (This was originally suggested by Julio Perez) Added the -p option (for "path"). This will let you point the gopher Client at a specific selector string on the server. Suggested by Prentiss Riddle. Also added -t option to override the "Root Directory" title that's normally displayed. (These flags will mostly be used for special purpose uses of gopher). Added key bindings for left and right arrow keys. The Left arrow key moves you "up" a directory (just like 'u'), the right arrow key moves you "into" an item (just like ). (from William Roberts). Fixed problem with char definitions/SYSVCURSES in manager.c. (from William Roberts.) Allowed ESC 0 [abcd] as well as ESC [ [abcd] when VTKEYS are defined. (Also from William Roberts). Changed default pager from more to more -d. (Suggested by Julio Perez) Upped the sizes of the structures for the selector string, title, etc. Should work better with those nasty WAIS docids... Changed almost all of the code to the GS{set,get}Type calls. Look in gopherstruct.[hc] if you plan on modifying the client... Changes from v0.6 to v0.7 ------------------------- Fixed problem with mysterious 2s appearing when bolding words. I did things the correct way with tputs() instead of the hackish method. Fixed problems with phonebook database searches that return more than ten hits. Dash insertion will now work correctly in this case. Fixed problems with large directories causing core dumps. Added fixes from John Sellens Fix for race condition when trying to retrieve a non-existant item. Added fixes from Craig Rice Client checks to see if the root server is up before starting. If it's down it exits and prints an error message. Fixed improper prompting when saving files. Added fix from Mic ... Removed the EOF that gets written out to files when you save them. Changes from v0.5 to v0.6 ------------------------- Fixes for the undocumented + next_page command. I changed the keystrokes to ">" for page down and "<" for pageup. Thanks go to Pekka Kytolaakso for the patch. Client now cleans up files in /tmp when control-c is typed, patch courtesy of Craig Rice . A whole slew of changes from Mic Kaczmarczik: Some versions of make have a predefined macro called ``MACHINE'', changed it to ``MACHDEFS'' to avoid conflicts. Provide a way to override the default host in the Makefile. Make clean deletes the executable program as well as object files. Allow definitions of DEFAULT_HOST & GOPHER_PORT in the Makefile. Try to guess the IS_A_ Machine type automatically. Added the '=' command to show information about the current item in the .Link format. Fixed #include file ordering problem in gopher.h. Don't include if on a NeXT system. Disabled the keypad call for Ultrix machines. (Fails under Ultrix 4.0) Changes from v0.4 to v0.5 ------------------------- The client now remembers the path you took through the menus. It sticks the pointer of the directory you were in when you move up a level or when you view a file. Fixed problem with the getopt variables in being in the wrong place. This caused problems with strict C compilers. Fixed type problem with getopt() (c should have been an int) Thanks go to BugStomper Russell Fulton . Spiffed up the makefile. Typing "make install" now installs the helpfile in the right place. Added changes from Craig Rice The key 'm' or 'M' now takes you back to the root level. A lowercase 'q' now quits the program too. A "Searching Text..." Message is displayed when searching text. I modified his idea of stripping off long titles. Instead of removing all directory information I strip off just enough directories to fit the tile the screen. (This really isn't very portable though, not all long titles will have slashes necessarily...) Changes from v0.32 to v0.4 -------------------------- Client now handles control-c gracefully (no more raw terminals.) Added signal handler for window size changes. (Thanks to Rick Watson r.watson@utexas.edu for the hints and tips) Option setup no longer uses full paths for commands. conf.h is now much simpler VT100 cursor keys now work on all platforms, not just System V curses machines. (Thanks go to Pekka Kytolaakso ) Now compiles on Convex OS 9.1 using -DIS_BSD (Pekka again...) Now compiles using System V curses on Ultrix machines. (Thanks go to Earl Fogel ) Now using getopt() command line parsing. Added option -s that disables saving and printing, very useful for public access terminals. Changes from v0.31 to v0.32 --------------------------- Fixed stupid refrest() typo. (That'll teach me to do hack and burn jobs!) Changes from v0.3 to v0.31 -------------------------- Added more messages that tell you when the client is doing stuff. (receiving directory, receiving sound, etc...) Fixed definition problem of SIGCLD/SIGCHLD. Changes from v0.2 to v0.3 ------------------------- Fixed undefined PLAY_COMMAND on machines that don't have a sound player. Added an option for compiling gopher for people that are using ANET from a VM/CMS system (STUPID_TERM). Niggly Makefile changes. Fixed problems with long lines. The client shows the end part of the title (which is probably the most interesting) instead of the first part. The titles are also lined up properly now. Changes from v0.1 (original unversioned release) to v0.2 -------------------------------------------------------------- Added highlighting of text in index retrievals. Fixed strange memory allocation problems. Added support for sounds on Sun Sparcstations and Nexts. Fixed problem with really long lines. Client prompts the user with an error message if an empty directory is found. Screen title is now intact when the user scrolls up a page. gopher/doc/clientlogging.vms0000644000000000000000000002261410762617110013357 0ustar README for VMS Client Logging using Multinet 16 July 1994 VMS Gopher Client 2.016 - J.Lance Wilkinson TGV's MULTINET_SERVER internally implements a syslogd daemon, but the multinet user runtime library does not include the syslog(), openlog() closelog() and setlogmask() functions normally used by applications to communicate with it. Discussion with TGV technical support yielded the functions provided in the [.GOPHER]OURUTILS.C source file which are compiled when either CLIENT_LOGGING or TELNET_TRACE are defined in CONF.H. These functions are not currently supported by TGV and you should *NOT* request support from TGV for their use. There did seem to be an intent to make the syslog()/syslogd facility a supported part of the product, but not in the immediate future. Inclusion of this facility for Multinet is intended to allow TGV customers using the VMS version of the Gopher Client to make use of the CLIENT logging facilities. It is also intended to be a guide for users of other TCP/IP agents in making use of the CLIENT logging facilities. Pre-Compilation SYSLOG setup ---------------------------- At compilation time you must decide if you're going to want to use either the standard Unix-style client logging or telnet/tn3270 connection tracing or both. The standard logging tends to be a debugging tool more than anything else, while telnet/tn3270 connection tracing is more a management/security tool. In CONF.H, define CLIENT_LOGGER to activate the standard Unix-style logging; define TELNET_TRACE to activate telnet/tn3270 connection tracing. Edit CONF.H to remove the prefixing comment tokens as appropriate: /* * Client logging via syslog() code has been ported to VMS systems * with MULTINET. See [.doc]clientlogging.vms for more information. * Check out the code in [.gopher]ourutils.c if you think you might * be able to port it to other TCPIP packages. * * Define CLIENT_LOGGER to log client requests issued to servers. * Define TELNET_TRACE to trace and log telnet connections by the client. */ /* #define CLIENT_LOGGER /* */ /* #define TELNET_TRACE /* */ If either definition is un-commented, and your compilation is for Multinet, the syslog() code in OURUTILS.C will be compiled, as well as code appropriate to the feature(s) selected which will use the syslog() code. TGV Multinet SYSLOG configuration --------------------------------- If you define CLIENT_LOGGER, then calls to logrequest() throughout the gopher client will cause messages to be sent to syslogd under the facility DAEMON. If you define TELNET_TRACE, then *actual attempts* to connect to *specific* telnet/tn3270 hosts will cause messages to be sent to syslogd under the facility LOCAL7. All use the keyword INFO. For example: local7.* /gopher$root:[log]_telnet.log daemon.info /gopher$root:[log]_client_debug.log Understand that other applications which use syslog at your site may already have these specific items directed to other files. At present it is not possible to define new facilities within the TGV Multinet implementation of syslog()/syslogd, or it would be fairly simple to code other values and select other facilities and/or keywords. Read the documentation for SYSLOG in the TGV Multinet Administrator's Guide (section 4.6 in the version for Multinet v3.3). First provide entries in your system's MULTINET:SYSLOG.CONFIGURATION file for the selectors "daemon.info" and/or "local7.info" to direct the log entries to appropriate destinations. Define a logical on the system where you'll be running the client that will be subject to logging, as follows: $ DEFINE/SYSTEM/EXEC/NOLOG MULTINET_SYSLOG_DESTINATION 1 This may or may not appear in the version of the TGV documentation for v3.3. It *does not* appear in the bookreader version of the TGV documentation for v3.3, but was provided through a tech service call and indeed seems to be required. Finally, enable the syslog service using the Multinet SCU: $ MULTINET CONFIGURE /SERVER SERVER-CONFIG> ENABLE SYSLOG SERVER-CONFIG> RESTART SERVER-CONFIG> EXIT If you change the content of your MULTINET:SYSLOG.CONFIGURATION file, make sure you restart your MULTINET_SERVER to have the changes take effect. CLIENT_LOGGER to the daemon.info selector ------------------------------------------ If the CLIENT_LOGGER definition is provided in CONF.H, the logrequest() function calls throughout the client will include code which write an event log. This is useful for debugging purposes. The output log entries for daemon.info will appear as individual lines containing a date/time stamp, the host of the client's user, the text "gopher" and the PID of the user, and the event being logged. Some events will include a URL for the relevant item. For example: Jul 14 16:44:41 PONGO.PSU.EDU gopher[Pid 0x40a00269]: EXIT Jul 14 18:20:00 psulias.psu.edu gopher[Pid 0x2060f10d]: ARRIVED AT TELNET_TRACE to the local7.info selector ---------------------------------------- If the TELNET_TRACE definition is provided in CONF.H, the Telnet_Trace() function will be called immediately prior to attempting any telnet/tn3270 connection. The Telnet_Trace() function, compiled only if TELNET_TRACE is defined, tests the host string in the link tuple being used for the telnet or tn3270 connection to see if it appears in the logical GOPHER_TELNET_LOG. If, and only if, the string appears (there is no IP number/host name translation attempted) in the logical, the URL for the telnet/tn3270 connection is logged, and then the chain of current entries in the current gopher directory, back through to the root directory, is displayed as well. This allows the path used by the user, through GopherSpace, which culminated in the telnet/tn3270 offering they are now attempting, to be recorded. The output log entries for local7.info will appear as sets of lines as follows; the intent is to provide a list representation of the path used through GopherSpace to reach the telnet/tn3270 host in question. Each line contains the same timestamp, client host, "gopher" text and PID fields as the standard Unix CLIENT_LOGGER entries discussed above, followed by a "GopherSpace depth indicator" (the length of the arrow indicates how deep within the gopher menus the user was), the URL for the telnet/tn3270 link, and the title by which the host where that link was found named the link: *----------> telnet://any name not in use@marble.bu.edu:2010 "Foothills" +---------> gopher://spinaltap.micro.umn.edu:70/11/fun/Games/MUDs/Links/Talker "Talker" +--------> gopher://spinaltap.micro.umn.edu:70/11/fun/Games/MUDs/Links "Links to MUDs via Telnet" +------->gopher://spinaltap.micro.umn.edu:70/11/fun/Games/MUDs "MUDs" +------>gopher://spinaltap.micro.umn.edu:70/11/fun/Games "Games - University of Minnesota" +-----> gopher://cwis.usc.edu.:70/11/Other_Gophers_and_Information_Resources /Gophers_by_Subject/Gopher_Jewels/Fun_Stuff_Multimedia "Fun stuff and multimedia" +----> gopher://gopher.princeton.edu:70/11/.explore "Explore the Internet (from Princeton Gopher)" +---> gopher://genesis.ait.psu.edu:70/11/netinfo/internet "Information about the Internet" +--> gopher://genesis.ait.psu.edu:70/11/netinfo "About Gophers and the Internet" +-> gopher://info.psu.edu:70/1 "Penn State University Gopher (The University's Gateway Gopher)" Define the GOPHER_TELNET_LOG logical with the host names and/or ip numbers (since no translation is done, if you know both you should probably include both) of the telnet/tn3270 hosts to which you wish to track Gopher client access: $ DEFINE/SYSTEM/EXEC/NOLOG GOPHER_TLENT_LOG "marble.bu.edu",- "muscle.rai.kcl.ac.uk", "freenet.hsc.colorado.edu",- ... The logical is consulted dynamically whenever a telnet/tn3270 connection is about to be attempted, so you can change it as new hosts become of interest and old hosts are no longer of any concern. Why trace Telnet/TN3270 connections? ------------------------------------ This facility was developed to allow us to determine which hosts were of legitimate use to our library patrons here @psulias.psu.edu, and which hosts were simply play areas (MUDDs, etc.) to which we should block telnet access from our host. We identify the hosts we'll add to the logical by consulting our monthly telnet connection logs (generated by MULTINET using a USER_ACCESS sharable image). Hosts we aren't yet familiar with, which have significant connection levels, are added to the logical in the belief that users may be finding them in their travels through GopherSpace. Once the resource is understood, those which the Libraries deem beneficial are discarded from the list; those which the Libraries do not deem beneficial may be added to the list of hosts to which our USER_ACCESS sharable image denies outgoing access. [A note to the more "open" sites reading this -- our specific host, psulias.psu.edu, is for LIBRARY patrons requiring LIBRARY resources. Denying access to MUDDs from our host is not considered a serious hampering of the open nature of the network; there are other, unrestricted hosts (even a laboratory within our walls) where users who are so inclined may access these resources via gopher and/or telnet subject to no restrictions except those imposed by the owners of those facilities. We have people waiting in line to find books at our terminals, so we frown on people tying them up for recreational usage.] gopher/doc/gopher.10000644000000000000000000001642010762617110011347 0ustar .TH GOPHER 1 .SH NAME gopher \- connect to gopher document server .SH SYNOPSIS .B gopher .RI [ -sSbDr ] .RI [ "-t title" ] .RI [ "-p path" ] .RI [ "-T type" ] .RI [ "-i search term" ] .RI [ hostname or url ] .RI [ port ] .SH DESCRIPTION The gopher client is used to talk to gopher servers. Once you have started the gopher client, help on using it is available by pressing the .B "?" key. .PP The Internet Gopher is a distributed document delivery service. It allows a neophyte user to access various types of data residing on multiple hosts in a seamless fashion. This is accomplished by presenting the user a hierarchical arrangement of documents and by using a client-server communications model. The Internet Gopher Server accepts simple queries, and responds by sending the client a document. .PP The [hostname] of a gopher server may be specified at startup; if omitted, the default server for your site is used. You may also specify a URL (Uniform Resource Locator) for this argument. .PP The [Port_number] of the server host may be specified at startup; if omitted you will use the default port specified at your site. The more or less standard and accepted Gopher port number on the Internet is 70. .PP .SH OPTIONS .TP -b starts the client on the bookmark page. .PP The next few options are for more advanced users who want to start at a location other than the default, or to set up special aliases or shell-scripts to point the gopher client to seperate places. .TP .BI -p " path" specify a specific selector string to send to the gopher server on startup. .TP .BI -T " type" let the client know what type of object the .I -p option is pointing at. .TP .BI -i " search term" tell the client what to search for in the object defined by the .IR "-p " and " -T 7" options. .TP .BI -t " title" set the title of the initial screen for the gopher client. .PP The last few options aren't really of interest to regular users, but are provided for system administrators who waht to provide a secure client, or who need to debug a client. .TP .BR -s " or " -S "secure mode" which means that you can't save or print the files that you browse. -s is for users without an account, while -S assumes the user has an account on this machine. One security feature is forced on, regardless of the state of these options, if the name of the user's shell ends in rsh; the 'O' (options) command is disabled so the user cannot select a shell as an application. .TP .B -r tells the client that its user is remote. .TP .B -D turns on the copius debugging output .SH In-Session Options .PP Press return or the right arrow key on the mini keypad to view a document or enter a directory. .PP Press Control/W, Control/R, or Control/L to repaint your menu at any time. .PP At any time, you may press ? to see a help file of commands available. .SH BOOKMARKS Bookmarks allow users to create their own personallized menus from those available on the variety of Gopher servers available worldwide. The following list of keystrokes aids in developing and maintaining the bookmarks. .IP a : Add current item to the bookmark list. A : Add current directory/search to bookmark list. v : View bookmark list. d : Delete a bookmark/directory entry. .EP .SH MOVING AROUND .PP Use the arrow keys to move around. .IP Use the Arrow Keys to move around. Up, k ...............: Move to previous line. Down, j .............: Move to next line. Right, Return .......: "Enter"/Display current item. Left, u ............: "Exit" current item/Go up a level. >, +, Pgdwn, space ..: View next page. <, -, Pgup, b .......: View previous page. 0-9 .................: Go to a specific line. m .................: Go back to the main menu. .EP .SH OTHER COMMANDS .IP s : Save current item to a file. S : Save current list of items to a file. D : Download a file. q : Quit with prompt. Q : Quit unconditionally (also Control/Z). r : goto root menu of current item. R : goto root menu of current menu. = : Display Technical information about current item. ^ : Display technical information about current directory. o : Open a new gopher server w : Open a new gopher server or item by URL O : Change options. f : Connect to an anonymous FTP host / : Search for an item in the menu. g : "Gripe" via email to administrator of current item. n : Find next search item. $, ! : Spawn to subprocess (use "logout" to return to session) Ctrl-T : Show host's local date and time. .EP .SH GOPHER OBJECTS .PP Menu entries ending with "/" are directories; additional characteristics for files (such as binary, sound, image, and others) are identified within angle brackets. .IP Item tag Type Description -------------------------------------------- (none) 0 file / 1 directory <) s sound file I,g image file ; movie file 4 BinHexed Macintosh file 9 binary file 5 DOS binary file 2 CSO (ph/qi) phone-book server 8 telnet connection <3270> T telnet connection (IBM 3270 emulation) M Multi-purpose Internet Mail Extensions file h HyperText Markup Language file 7 index-search item (none) ASK form .EP .SH EXAMPLES .TP gopher gopher.tc.umn.edu Connect to the gopher server running on the computer .I gopher.tc.umn.edu .TP gopher -p "1/Information About Gopher" gopher.tc.umn.edu 70 Connect to the gopher server running on port 70 of the computer .I gopher.tc.umn.edu and start at the menu retrieved with the selector string .I "1/Information About Gopher" .TP gopher -p 7/indexes/Gopher-index/index -T 7 -i FAQ mudhoney.micro.umn.edu Connect to the gopher server running on the computer .I mudhoney.micro.umn.edu and start at the menu of items matching the string .I FAQ in the index specified by the selector string .I "7/indexes/Gopher-index/index" .SH CONFIGURATION FILE FORMAT The client gets configuration data from the system gopher.rc file and the user's .gopherrc files. The options in these files may be set by using the .B O key in the client. .PP See the manual page for gopherrc for more information about these options. .SH ENVIRONMENT VARIABLES The client also checks for environment variables for its configuration information. The following variables can be used: .TP GOPHER_TELNET: The program used to connect to telnet services .TP GOPHER_TN3270: The program used to connect to TN3270 services .TP GOPHER_HTML: The program used to read HyperText Markup Language documents. .TP GOPHER_PRINTER: The program used to print from a pipe. .SH FILES .TP $HOME/.gopherrc user bookmarks and configuration information .TP /usr/local/lib/gopher.rc system default configuration information (default location - may be somewhere else on your system) .TP /usr/local/lib/gopher.hlp client help file displayed by the '?' command (default location - may be somewhere else on your system) .SH COPYRIGHT .PP The Internet Gopher(tm) software and documentation is copyright (c) 1991, 1992, 1993, 1994 by the University of Minnesota. Gopher has limitations on its use and comes without a warranty. Please refer to the file 'Copyright' included in the distribution. gopher/doc/gopherrc.50000644000000000000000000000521410762617110011677 0ustar .TH GOPHERRC 5 .SH NAME gopherrc \- configuration file for gopher(1) .SH DESCRIPTION .LP The .B gopherrc file contains a list of directives that alter the behaviour of the .BR gopher(1) client. It is composed of lines of the form: .IP .I Token:\ Value .LP Tokens are case insensitive and the value field will change, depending on the token. A pound sign ("#") at the beginning of a line signifies a comment line. Gopherrc files are used in a number of places. There is a global gopherrc file (called gopherrc). This is usually placed in a systemwide directory. A file with the same format called remotegopher.rc is also used by the gopher client when using the -r switch. Also, an individual has their own customized version of this file in their home directory in the file .gopherrc. On VMS this file is called GOPHERRC. All of these files use the format described below. Most people will set the values in this file by pressing the 'O' key to set options in the curses gopher client, rather than editing this file directly. People considering editing this file on VMS should make sure their editor preserves the Stream_LF format of the file. .I Quick pseudo grammar .IP .nf map: ,, SearchBolding: Bookmarks: .fi .LP The following tokens are recognized .TP 12 .I map: .LP maps a content type (such as text/plain, or image/gif) to commands to execute for displaying the document or printing the document, i.e. 'more -d %s' or 'lpr %s'. The content type, display command, and printing command are separated by commas. The sequence of %s is replaced with the filename of a temporary file containing the document to be printed or viewed. If the command starts with the vertical bar (|) the command will be executed immediately and the document will be sent to the commands standard input. Note this feature does not work on VMS. If the display command is set to 'builtin', then the text file pager inside the gopher client will be used to display the item. .TP 12 .I SearchBolding: .LP controls the clients display of search terms. If the value is 'yes', then search words will be bolded. Otherwise they'll be left alone. .TP 12 .I Bookmarks: .LP The bookmarks in .link format follow. For more information on the format of a .link file, consult the gopherd(8) manual page. .I Sample gopherrc file: map: text/plain,builtin,lpr %s map: image/gif,xv %s, Bookmarks: Type=1 Name=Bookmark #1 Host=gopher.tc.umn.edu Port=70 Path= # Type=0+ Name=textfile Host=foo.com Path=0/readme Port=70 . .SH "SEE ALSO" .IR "Media Type Registration Procedure" ", March 1994, RFC 1590" .IR gopher(1), gopherd(8) gopher/doc/gophfilt.10000644000000000000000000000674110762617110011704 0ustar .TH GOPHFILT 1 .SH NAME gophfilt \- oneshot connection to gopher document server .SH SYNOPSIS .B gophfilt .RI [ -t .IR type] .RI [ -p .IR path] .RI [ -h .IR host] .RI [ -s .IR port] .RI [ -i .IR item] .SH DESCRIPTION The gophfilt program is a oneshot command line driven version of a gopher client, suitable for use in shell- or awk-scripts. .PP The Internet Gopher is a distributed document delivery service. It allows a neophyte user to access various types of data residing on multiple hosts in a seamless fashion. This is accomplished by presenting the user a hierarchical arrangement of documents and by using a client-server communications model. The Internet Gopher Server accepts simple queries, and responds by sending the client a document. .PP Gophfilt can operate in either of two modes. The first one is in the spirit of unix filters, in that it accepts requests on stdin and writes results to stdout. The request is in the form of a tab-delimited .cache item. For example: .PP .RS 3 1Master Gopher at UMN 1/ gopher.tc.umn.edu 70 .RE .PP (Or in string notation) .PP .RS 3 "1Master Gopher at UMN\\t1/\\tgopher.tc.umn.edu\\t70\\n" .RE .PP This example would result in the retrieval of the root directory from the Master Gopher. .PP Gophfilt's other mode permits the construction of a gopher request from arguments provided on the command line. In this "manual" mode, at least the path and type items must be provided. The default host and port are taken from the file conf.h at module build time. .PP -p specifies the path to the requested data. From our "filter" example above, the field "1/" is the path. .PP -t specifies the type of the requested data. From our example above, the leading "1" character is the type (directory, in this case). .PP -h specifies the name of the host where the server is to be found. The default host (CLIENT1_HOST from file conf.h) is used if not provided. .PP -s specifies the service (port) that the server is monitoring. The default port (CLIENT1_PORT from file conf.h) is used if not provided. .PP -i specifies a search item. This field immediately follows the path field in the transmitted request. .PP -T specifies a receiver timeout in seconds. This is the maximum time that gophfilt will wait for more data. If the "timeout" return value is noticed by the calling program, any data received to that point should be considered suspect. .PP To recreate using manual operation the request from our example, one would execute the following command. .PP gophfilt -t 1 -p 1/ -h gopher.tc.umn.edu -s 70 .PP .SH MORE EXAMPLES .PP Here is an example that demonstrates the usefulness of the gophfilt. This specific example only works on the Rutgers campus, but illustrates the point .PP gophfilt -t 0 -p "webster default SPELL" -i flatulence .RS 2 -h hangout.rutgers.edu -s 770 | gophfilt .RE .PP This example requests a selector item from the Webster's Dictionary, and then pipes that item to gophfilt for subsequent retrieval of the actual definition. The result is available on stdout for use. .SH RETURNS Gophfilt returns the following completion codes on exit: .RS 4 .PP 0 Successful completion. .RE .RS 3 .PP -1 Error in parsing command line arguments. .PP -2 Manual operation and insufficient parameters were provided. .PP -3 Piped operation and unable to read selector from stdin. .PP -4 Unsupported item type requested. .PP -5 Unable to connect to specified host and port combination. .PP -6 Error encountered writing to stdout. .PP -7 Timeout occurred while waiting for more data. .RE gopher/doc/object.changes0000644000000000000000000000345010762617110012600 0ustar Changes from 1.2b2 to 1.2b5 --------------------------- * libgopher can now be built as Sun Shared Libraries. Changes from 1.2b1 to 1.2b2 --------------------------- * Fixed problems with tmpnam() and warning for VIprettyLang() Changes from 1.03 to 1.1 ------------------------ * Made a new object DynArray. It's a neato dynamic array. I'll be using it more in other objects soon. Right now it's used in GopherDirObjs and the new site and ext code. * Fixed GDfromLink() It wasn't re-initializing after each GSfromLink(). * GDsort() now does the comparisions for numbered entries. Much faster and cleaner looking code. * #undef boolean first in case we're building with WAIS (which has already #defined it). * Filenames are now less than 14 characters for those sysvr3 people. * Really revamped the way compatible.h and compatible.c work. Changes from 1.01 to 1.03 ------------------------- In accordance with the new Gopher+ the server doesn't tack scores on the end of directory listings resulting from searches. Changes from 1.0 to 1.01 ------------------------ Fixed problem with GDfromNet not returning the right number of items. Changes to 1.0 -------------- Fixed problem in GDfromNet() and GSfromNet() that didn't deal with directories that don't have objects of any known type. Fix from David Woodgate. Fixed problem in STRset() that could potentially cause crashes. The stored length was one greater than the actual length. Fix from Alan Tuchman. Fixed problem in sreadword() that compared a character with NULL, naughty naughty, it should have been '\0'. GDfromNet now takes an optional function parameter. Used by the nifty twirl code. Fixed problem in STRset() freeing blocks leftover from realloc is bad bongos. Removed most, if not all memory leaks. Yeah to support@purify.com!!gopher/gopher/0000755000000000000000000000000013550124357010521 5ustar gopher/gopher/CURcurses.c0000644000000000000000000020133010762617110012536 0ustar /******************************************************************** * $Author: jgoerzen $ * $Revision: 1.5 $ * $Date: 2002/01/08 17:36:14 $ * $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/gopher/CURcurses.c,v $ * $State: Exp $ * * Paul Lindner, University of Minnesota CIS. * * Copyright 1991, 1992 by the Regents of the University of Minnesota * see the file "Copyright" in the distribution for conditions of use. ********************************************************************* * MODULE: CURcurses.c * Abstraction of all Curses Functions ********************************************************************* * Revision History: * $Log: CURcurses.c,v $ * Revision 1.5 2002/01/08 17:36:14 jgoerzen * Finally builds! * * Changes: * * * config.h.in: rebuilt by autoheader * * * configure: rebuilt by autoconf * * * configure.in: * * Added REGEXLIBS test for NetBSD -- look for re_comp in -lcompat * * Added checkes for term.h, re_comp.h, regex.h * * * gopher/ourutils.c, gopher/CURcurses.c: Use term.h check * * * gopher/Makefile.in, gopherd/Makefile.in, gophfilt/Makefile.in: * * Use REGEXLIBS * * * gopher/globals.h, gopher/gopher.c: Remove sys_errlist * * * object/GSgopherobj.c: Removed #include, now use * "Regex.h" that has proper regex determining logic * * * object/Regex.h: Moved regex.h include to here. Make it conditional * based on configure test. Add conditional re_comp.h include. * * Revision 1.4 2001/01/17 21:48:05 jgoerzen * Many fixes and tune-ups. Now compiles cleanly with -Wall -Werror! * * Revision 1.3 2001/01/03 22:25:57 s2mdalle * Code cleanups, fixes for copious compiler warnings. * * Revision 1.2 2000/12/27 21:25:01 s2mdalle * Added #include "gopher.h" * * Revision 1.1.1.1 2000/08/19 00:28:56 jgoerzen * Import from UMN Gopher 2.3.1 after GPLization * * Revision 3.61 1996/01/04 18:28:51 lindner * Updates for autoconf * * Revision 3.60 1995/11/03 21:18:15 lindner * ANSIfication * * Revision 3.59 1995/11/03 20:50:47 lindner * Coen: fixes.. * * Revision 3.58 1995/05/02 06:06:57 lindner * Fix for message str.. * * Revision 3.57 1995/04/15 07:09:46 lindner * New funky C-x stuff * * Revision 3.56 1995/03/09 05:24:39 lindner * F.Macrides 01-Mar-1995 Removed the CURsetScreen(cur, initscr()) that * someone #ifdef'ed for VMS in CURresize(). * * Revision 3.55 1995/02/27 17:44:51 lindner * New pacbell fcn CURrightline * * Revision 3.54 1995/02/07 19:34:41 lindner * Fix for unix systems without SIGTSTP * * Revision 3.53 1995/01/25 23:09:24 lindner * Word wrapping in gopher forms, provided by Pacific Bell Knowledge Net * * Revision 3.52 1994/12/03 01:51:39 lindner * Fix prototype for DCLspawn_exception * * Revision 3.51 1994/10/21 04:41:07 lindner * Add ANSI attached printer code.. * * Revision 3.50 1994/06/29 07:06:59 lindner * moved gcatd to Locale.[ch] (Coopersmith) * * Revision 3.49 1994/06/29 05:11:07 lindner * None.. * * Revision 3.48 1994/06/12 05:28:17 lindner * Fix for locales * * Revision 3.47 1994/06/09 22:13:35 lindner * More language conversions * * Revision 3.46 1994/05/24 05:49:54 lindner * Fix for bad free() in CURrequest() * * Revision 3.45 1994/04/25 20:43:29 lindner * Remove ugly pointer debug statement * * Revision 3.44 1994/04/25 03:49:41 lindner * Fixed ^_ mislabel of the ^- help command. * * Added prompt for RETURN in VMSExit(), to enable reading of ACCVIO tracebacks. * * Changed return values of DCLSystem() to be compatible with the * for-Unix code. * * Fixed spawns to work with OpenVMS/AXP v6.1 (still doesn't have the * TRUSTED flag). * * Revision 3.43 1994/04/25 03:37:35 lindner * Modifications for Debug() and mismatched NULL arguments, added Debugmsg * * Revision 3.42 1994/04/13 19:13:20 lindner * AskL modifications * * Revision 3.41 1994/04/01 02:24:41 lindner * Remove debugging stuff * * Revision 3.40 1994/03/31 21:26:43 lindner * Mitra's debug routine * * Revision 3.39 1994/03/08 15:55:02 lindner * gcc -Wall fixes * * Revision 3.38 1994/03/04 23:39:45 lindner * Fix for log entries * * Revision 3.37 1994/03/04 23:36:28 lindner * Many, many fixes and enhancements for Beckett and Co. * * Revision 3.36 1994/02/21 15:47:34 lindner * Remove conditional compilation for DEC ALPHAS trusted flag on VMS * * Revision 3.35 1994/02/20 21:45:18 lindner * Better sanity checks for box drawing characters * * Revision 3.34 1994/01/20 06:46:15 lindner * Fix boundary condition * * Revision 3.33 1994/01/14 16:40:04 lindner * Added VMSVersion() for getting the VMS version number, and modified * spawn_DCLprocess() so that it includes the TRUSTED flag for VAX v6+ * and AXP v2+. If DEC changes AXP v2.0 to v6.1 (I've heard rumors to * that affect), remove the __ALPHA conditional compilation in * spawn_DCLprocess() so it just checks for v6+. * * Revision 3.32 1993/12/28 17:29:09 lindner * Better method of drawing box characters * * Revision 3.31 1993/11/04 02:06:50 lindner * Add Ben's AIS hack * * Revision 3.30 1993/10/26 18:24:31 lindner * Make sure we cleanup before exiting * * Revision 3.29 1993/10/26 18:12:56 lindner * Fixes for Input routines, screen redrawing, ASK fixes * * Revision 3.28 1993/10/22 20:22:12 lindner * Range checks for lots of things * * Revision 3.27 1993/10/07 05:10:12 lindner * Make TrimmedTitle[] (twice) a larger array (256 elements). Makes * 132-column terminals and huge xterm windows happier. * * In CURwgetch(), fix vt100 "Help" escape sequence. Add vt100 "Enter", * vt200 "Help", and vt200 "Do" escape sequences. * * Revision 3.26 1993/09/30 22:41:57 lindner * Add option for bolding of searched words * * Revision 3.25 1993/09/29 22:47:17 lindner * Fix for AskBlock memory cruft * * Revision 3.24 1993/09/29 20:52:47 lindner * Add [space to cycle] prompt earlier * * Revision 3.23 1993/09/26 09:19:19 lindner * Add bold #defines * * Revision 3.22 1993/09/22 19:58:15 lindner * Fix for extra cruft on screen from Select/Choose * * Revision 3.21 1993/09/22 04:13:44 lindner * none * * Revision 3.20 1993/09/22 01:15:44 lindner * Add support for DEC HELP key/KEY_HELP * * Revision 3.19 1993/09/21 02:42:18 lindner * Exit on error reading from terminal (kills spinning processes) * * Revision 3.18 1993/09/21 01:46:06 lindner * Implement all remaining ASK block items.. * * Revision 3.17 1993/09/11 06:31:33 lindner * spelling correction * * Revision 3.16 1993/09/11 04:51:00 lindner * Fix to skip labels in CURrequest() * * Revision 3.15 1993/09/03 03:28:59 lindner * Modified CURGetOneOption() to have a Title field. Serveral other * routines modified for improved line editing and to show all available * commands while answering prompts. If dialog box has only one prompt, * as for search query entries, start user entry on new line so more of * the screen is available for the entry (useful for search terms with * booleans). * * Revision 3.14 1993/08/19 20:22:45 lindner * Mitra's Debug patch * * Revision 3.13 1993/08/16 18:17:01 lindner * Fixes from F.Macrides: * * Added temporary code to work around DECC/AXP's problems with screen * clearing and cursor homing (we'll get rid of that code if the problem * goes away in the next version of DECC/AXP). It's bolding via * standout() or wstandout(win) still doesn't work, but that's not a * serious functional problem for gopher users on Alphas. * * Added exit block to ensure that the terminal characteristics are * retored and cleanups are done on VMS. * * Added code for getting terminal characteristics * from the terminal table on VMS. * * Replaced/modified Cruft for VMS with routines which handle both * Control C and Control Y, enable use of ReallyQuit(), and restore all * original terminal characteristics for spawns and intentional or * unintentional exits. Did it in a way that should stay transparent to * the otherwise "for-Unix" code, and should hold up with future mods or * enhancements of that code. Standout() doesn't work at all and * endwin() and delwin() are unreliable on Alphas (due to bugs in the * Alpha's Curses library). Andrew Heyler is looking into workarounds, * should DEC not fix the bugs soon. Code compiles with DECC on Alphas * without warnings or error messages, but still get lots of * "informational" messages due to incomplete prototyping (no problems or * compiler messages with VAXC). * * Revision 3.12 1993/08/12 06:32:06 lindner * Add needed variable * * Revision 3.11 1993/08/09 20:44:48 lindner * Fix for really long strings * * Revision 3.10 1993/08/09 20:29:50 lindner * Get rid of the beep during a ^G in CURwgetstr(). * * Make CURChoice() delete its window when it exits. * * Revision 3.9 1993/07/30 17:31:34 lindner * Mods to support AskP: * * Revision 3.8 1993/07/27 02:02:47 lindner * More comments * * Revision 3.7 1993/07/23 04:33:48 lindner * Mods to curchoice for default * * Revision 3.6 1993/07/20 23:10:17 lindner * none * * Revision 3.5 1993/04/15 21:23:36 lindner * Removed extraneous wattron/wattroff * * Revision 3.4 1993/03/26 19:42:32 lindner * Fix for skip by two problem in CURrequest * * Revision 3.3 1993/03/18 23:15:24 lindner * Mods to support titles inside of a CURrequest. * * Revision 3.2 1993/02/16 23:26:02 lindner * Fixes for SIG_ERR (for Crays) * * Revision 3.1.1.1 1993/02/11 18:02:56 lindner * Gopher+1.2beta release * * Revision 1.8 1993/01/11 20:25:31 lindner * Fixed weird wprintw error on EP/IX. * * Revision 1.8 1993/01/11 20:25:31 lindner * Fixed weird wprintw error on EP/IX. * * Revision 1.7 1993/01/09 02:16:21 lindner * Changed (void*)-1 constructs to SIG_ERR * * Revision 1.6 1993/01/09 01:28:11 lindner * Replaced hosed Log messages (Ooops!) * * Revision 1.5 1993/01/09 01:24:42 lindner * Added CURchoice(), let's you choose one option from [2-9] items. * * Revision 1.4 1993/01/09 00:49:16 lindner * More mods for VMS from jqj. Looks like better ctrl-y and ctrl-c * processing. * * Revision 1.3 1993/01/06 17:05:46 lindner * Added nl() to CURexit() for EP/IX machines. * * Revision 1.2 1992/12/31 05:55:44 lindner * Mods for VMS * * Revision 1.1 1992/12/10 06:16:51 lindner * Initial revision * * *********************************************************************/ #include "CURcurses.h" #include "gopher.h" #include "Malloc.h" #include #ifndef SIG_ERR #define SIG_ERR ((void *) -1) #endif #include "Stdlib.h" #include "compatible.h" #include "Debug.h" #include "String.h" #include "util.h" #ifdef VMS static int w_getch(); #undef wgetch #define wgetch w_getch void setterm_pas(); void resetterm(); void VMSCURinit(/* CursesObj* */); void VMSinit(); int VMSVersion(/* char *, int */); void VMSexit(); int spawn_DCLprocess(); unsigned int DCLspawn_exception(); #endif /* VMS */ #include #ifdef HAVE_TERM_H #include #endif #ifdef CTRLCPROMPTS # define DIALOGCANCELSTR "Cancel - ^C" # define HELPCANCEL "^C : Cancel" # define HELP2CANCEL "^C : Cancel" # define FORMCANCEL "[Help: ^-] [Cancel: ^C] " #else # define DIALOGCANCELSTR "Cancel - ^G" # define HELPCANCEL "^G : Cancel" # define HELP2CANCEL "^G : Cancel" # define FORMCANCEL "[Help: ^-] [Cancel: ^G] " #endif /*NEWCTRLC*/ #ifdef CONTROLX # define CXPROMPT1 "^X : Accept" #else # define CXPROMPT1 "Enter : Accept" #endif /* * Do we use wordwrap? */ boolean wordwrap = 0; /* * Initialize data space for various screen information */ CursesObj * CURnew(void) { CursesObj *cur; cur = (CursesObj *) malloc(sizeof(CursesObj)); cur->Screen = NULL; cur->Termtype = STRnew(); cur->Clearscreen = STRnew(); cur->AudibleBell = STRnew(); cur->Highlighton = STRnew(); cur->Highlightoff = STRnew(); cur->canUseACS = FALSE; cur->inCurses = FALSE; cur->sigtstp = SIG_ERR; cur->sigwinch = SIG_ERR; CURinit(cur); return(cur); } /* * Initialize various strings and such. */ void CURinit(CursesObj *cur) { #ifdef VMS VMSCURinit(cur); #else int err; static char terminal[1024]; static char capabilities[1024]; /* String for cursor motion */ static char *ptr = capabilities; /* for buffering */ char *cp; /*** Set the terminal type ***/ if (getenv("TERM") != NULL) CURsetTerm(cur, getenv("TERM")); else CURsetTerm(cur, "unknown"); err = tgetent(terminal, CURgetTerm(cur)); if (err !=1) CURsetTerm(cur, "unknown"); /*** Get the clearscreen code ***/ if ((cp = (char *)tgetstr("cl", &ptr)) != NULL) CURsetCLS(cur, cp); else CURsetCLS(cur, ""); /*** Set the bell ***/ if ((cp = (char *) tgetstr("bl", &ptr)) != NULL) CURsetBell(cur, cp); else CURsetBell(cur, "\007"); /*** Set the highlight codes ***/ if ((cp = (char *) tgetstr("so", &ptr)) != NULL) { CURsetHighon(cur, cp); if ((cp = (char *) tgetstr("se", &ptr)) != NULL) CURsetHighoff(cur, cp); } else { CURsetHighon(cur, ""); CURsetHighoff(cur, ""); } /*** Does terminal support alternate character set? ***/ if ((char *) tgetstr("as", &ptr) != NULL) cur->canUseACS = TRUE; CURsetScreen(cur,initscr()); #endif cur->inCurses = FALSE; CURsetGraphicsChars(cur, CURgetTerm(cur)); } /* * Set the characters to output depending on the terminal type... * * Most systems don't do it right.. */ static char *CURgraphicChars[] = { "vtxxx", "qxlkmjwvtun", "xterm", "qxlkmjwvtun", "z29", "aqfcedsuvtb", "wyse50", "zvrsqupwtyx", "isc", "D3Z?@Y+++++", "sun-cmd","-|+++++++++", NULL, NULL }; void CURsetGraphicsChars(CursesObj *cur, char *termtype) { cur->Box_hline = '-'; cur->Box_vline = '|'; cur->Box_ul = '+'; cur->Box_ur = '+'; cur->Box_ll = '+'; cur->Box_lr = '+'; cur->Box_tt = '+'; cur->Box_bt = '+'; cur->Box_lt = '+'; cur->Box_rt = '+'; cur->Box_ct = '+'; #if defined(A_ALTCHARSET) && !defined(ultrix) && !defined(__osf__) /** use ALTCHARSET if termcap or terminfo knows how **/ if (cur->canUseACS) { char *term, *chars; char termname[20]; int count=0; strcpy(termname, termtype); /** VT100 terminals and above support alternate character set **/ if (strncasecmp(termname, "vt1", 3) == 0 || strncasecmp(termname, "vt2", 3) == 0 || strncasecmp(termname, "vt3", 3) == 0) strcpy(termname, "vtxxx"); /* name in CURgraphicChars[] */ while ((term = CURgraphicChars[count++]) != NULL) { chars = CURgraphicChars[count++]; if (strcmp(termname, term) == 0) { #ifdef ACS_BSSB cur->Box_hline = ACS_HLINE; cur->Box_vline = ACS_VLINE; cur->Box_ul = ACS_BSSB; cur->Box_ur = ACS_BBSS; cur->Box_ll = ACS_SSBB; cur->Box_lr = ACS_SBBS; cur->Box_tt = ACS_TTEE; cur->Box_bt = ACS_BTEE; cur->Box_lt = ACS_LTEE; cur->Box_rt = ACS_RTEE; cur->Box_ct = ACS_PLUS; #else /* ACS_BSSB */ cur->Box_hline = A_ALTCHARSET|chars[0]; cur->Box_vline = A_ALTCHARSET|chars[1]; cur->Box_ul = A_ALTCHARSET|chars[2]; cur->Box_ur = A_ALTCHARSET|chars[3]; cur->Box_ll = A_ALTCHARSET|chars[4]; cur->Box_lr = A_ALTCHARSET|chars[5]; cur->Box_tt = A_ALTCHARSET|chars[6]; cur->Box_bt = A_ALTCHARSET|chars[7]; cur->Box_lt = A_ALTCHARSET|chars[8]; cur->Box_rt = A_ALTCHARSET|chars[9]; cur->Box_ct = A_ALTCHARSET|chars[10]; #endif /* ACS_BSSB */ } } } #endif } /* * Given a properly "CURnew" cursesobj, initialize the screen.. */ void CURenter(CursesObj *cur) { /* for safety */ if (cur->inCurses == TRUE) return; #ifdef VMS (void)setterm_pas(); CURsetScreen(cur,initscr()); #else tputs(CURgetCLS(cur),1,CURoutchar); fflush(stdout); #endif cur->inCurses = TRUE; CURwenter(cur,stdscr); #ifdef SIGWINCH if (cur->sigwinch != SIG_ERR) signal(SIGWINCH, cur->sigwinch); #endif #ifdef SIGTSTP if (cur->sigtstp != SIG_ERR) signal(SIGTSTP, cur->sigtstp); #endif } /* * Set up processing for the window (especially for system V curses! */ void CURwenter(CursesObj *cur, WINDOW *win) { cbreak(); noecho(); nonl(); #ifdef SYSVCURSES intrflush(win, FALSE); nodelay(win, FALSE); #ifndef ultrix /** Causes wgetch to dump core in ultrix **/ #ifndef _SEQUENT_ keypad(win, TRUE); #endif #endif #endif } /* * Exit curses system. */ void CURexit(CursesObj *cur) { if (!cur->inCurses) return; cur->inCurses = FALSE; echo(); nl(); endwin(); #ifdef SYSVCURSES #ifndef _SEQUENT_ keypad(stdscr, FALSE); #endif #endif #ifdef VMS (void)resetterm(); #endif #ifdef SIGTSTP tputs(CURgetCLS(cur),1,CURoutchar); fflush(stdout); cur->sigtstp = signal(SIGTSTP, SIG_DFL); #endif #ifdef SIGWINCH cur->sigwinch = signal(SIGWINCH, SIG_DFL); #endif } /* * send a character to stdout, not really curses, but we do use it... */ int CURoutchar(int c) { /** output the given character. From tputs... **/ /** Note: this CANNOT be a macro! **/ putc(c, stdout); return(c); } /* * Rightline, uses curses routines to center a line. */ void CURrightline(CursesObj *cur, char *theline, int yval) { mvaddstr(yval, (COLS - strlen(theline) -1), theline); } /* * Centerline, uses curses routines to center a line. */ void CURcenterline(CursesObj *cur, WINDOW *win, char *theline, int yval, int windowidth, boolean bright) { char TrimmedLine[256]; strcpy(TrimmedLine, theline); /** Make sure theline fits in the window **/ if (strlen(theline) > windowidth) { TrimmedLine[windowidth-3] = '.'; TrimmedLine[windowidth-2] = '.'; TrimmedLine[windowidth-1] = '.'; TrimmedLine[windowidth] = '\0'; } wmove(win, yval, (windowidth - strlen(TrimmedLine))/2); if (bright) wstandout(win); waddstr(win, TrimmedLine); if (bright) wstandend(win); } /* * CURwgetstr is a replacement of getstr that allows editing of the string * if the user types control codes we don't recognize, it's returned instead * We assume that the incoming string is shorter than the max.. */ int CURwgetstr(CursesObj *cur, WINDOW *win, char *inputline, int maxlength, boolean hidden) { int pointer = 0; int curpointer = 0; int ch; int y,x; wstandout(win); /*** Check to see if there's something in the inputline already ***/ while (inputline[pointer] != '\0') { if (hidden) waddch(win, '*'); else waddch(win, inputline[pointer]); pointer ++; curpointer ++; } wrefresh(win); for (;;) { ch = CURwgetch(cur,win); switch (ch) { case '\n': #ifdef CONTROLX case '\030': #endif inputline[pointer] = '\0'; wstandend(win); return(ch); break; case '\b': /*** backspace and delete ***/ if (curpointer > 0) { char *cp; getyx(win, y, x); wmove(win, y, x-1); /* Update the string */ for (cp = inputline + curpointer - 1; *cp != '\0'; cp++) { *cp = *(cp + sizeof(char)); if (*cp != '\0') { if (hidden) waddch(win, '*'); else waddch(win, *cp); } } *cp = '\0'; waddch(win, ' '); pointer--; curpointer--; wmove(win, y, x-1); wrefresh(win); } break; case '\001': /*** ^A go to beginning of line ***/ getyx(win, y, x); wmove(win, y, x-curpointer); curpointer = 0; wrefresh(win); break; case '\005': /*** ^E go to end of line ***/ getyx(win, y, x); wmove(win, y, x+pointer-curpointer); curpointer = pointer; wrefresh(win); break; case '\007': /*** ^G cancel... ***/ wstandend(win); return(-1); break; case '\013': /*** ^K delete to end of line ***/ getyx(win, y, x); while (curpointer < pointer) { waddch(win, ' '); pointer--; } inputline[pointer] = '\0'; wmove(win, y, x); wrefresh(win); break; case '\025': /*** ^U erase whole line ***/ getyx(win, y, x); wmove(win, y, x-curpointer); while (pointer > 0) { waddch(win, ' '); pointer--; } inputline[pointer] = '\0'; wmove(win, y, x-curpointer); curpointer = 0; wrefresh(win); break; case KEY_LEFT: if (curpointer > 0) { curpointer--; getyx(win, y, x); wmove(win, y, x-1); wrefresh(win); } break; case KEY_RIGHT: if (curpointer < pointer) { curpointer++; getyx(win, y, x); wmove(win, y, x+1); wrefresh(win); } break; default: if (ch < 256 && isprint(ch) && curpointer >= maxlength) { /* Return at the end for word wrapping */ if (wordwrap) { /*inputline[curpointer] = ch;*/ inputline[curpointer] = '\0'; wstandend(win); wrefresh(win); return(ch); } else CURBeep(cur); } else if (ch < 256 && isprint(ch)) { inputline[curpointer++] = ch; if (curpointer > pointer) { pointer = curpointer; inputline[curpointer+1] = '\0'; } if (hidden) waddch(win, '*'); else waddch(win, ch); wrefresh(win); } else { wstandend(win); return(ch); } } /* switch */ } /* for */ } /* * This stuff is stolen and modified from hytelnet Thanks Earl! */ int CURwgetch(CursesObj *cur, WINDOW *window) { int a, b, c; if (ControlCpressed) { return ('\007'); /** Control-C cancels us **/ } if (signal(SIGINT, controlcJmp) == SIG_ERR) perror("signal died:\n"), exit(-1); if (setjmp(Jmpenv)) { /* Note controlcJmp will reprime controlc and set flag*/ Debug("interruptable_wgetch triggered\r\n",NULL); ControlCpressed = FALSE; /* Deal with return code, not flag*/ return('\007'); } while (1) { c = wgetch(window); reprimeControlc(); switch (c) { case -1: /* error usually means connection was closed.. */ CleanupandExit(-1); break; case 12: /* ^L */ case 18: /* ^R */ case 23: /* ^W */ /* redraw the screen */ #ifdef VMS clearok(curscr, TRUE); wrefresh(window); #else wrefresh(curscr); #endif /* don't return yet, get another keystroke */ break; case 27: /* handle escape sequence */ b = wgetch(window); if (b == '[' || b == 'O') a = wgetch(window); else a = b; switch (a) { case 'A': c = KEY_UP; break; case 'B': c = KEY_DOWN; break; case 'C': c = KEY_RIGHT; break; case 'D': c = KEY_LEFT; break; case 'M': /* vt100 enter */ if (b == 'O') c = KEY_ENTER; break; case 'Q': /* vt100 Help */ if (b == 'O') c = KEY_HELP; break; case '2': if (b == '[') b = wgetch(window); switch(b) { case '8': /* vt200 Help */ if (wgetch(window) == '~') c = KEY_HELP; break; case '9': /* vt200 Do */ if (wgetch(window) == '~') c = KEY_ENTER; break; } case '5': /* vt 200 prev. screen */ if (b == '[' && wgetch(window) == '~') c = KEY_PPAGE; break; case '6': /* vt 200 next screen */ if (b == '[' && wgetch(window) == '~') c = KEY_NPAGE; break; } /* fall through to default to reassign certain keys */ default: /* The many forms of the return key... */ if ((c == KEY_ENTER)|| (c=='\r')) c = '\n'; /** SYSV curses Gack! **/ /* The many forms of backspace */ if (c == '\010' || c == '\177' || c == KEY_BACKSPACE) return('\b'); return(c); break; } /* switch(c) */ } /* while(1) */ } int CURgetch(CursesObj *cur) { return(CURwgetch(cur, stdscr)); } /* * Resets the screen when a size change has happened */ void CURresize(CursesObj *cur) { if (cur->inCurses) { CURexit(cur); CURenter(cur); } } /* * Get one option displays a message, and gets a response * * If the Response has something in it, it is displayed and editable * * If the user wants to abort, GetOneOption returns a -1, otherwise it * returns a 0 */ int CURGetOneOption(CursesObj *cur, char *Title, char *OptionName, char *Response) { int i; Requestitem *items[2], item; items[0] = &item; items[1] = NULL; item.prompt = OptionName; item.stowage = Response; item.thing = CUR_PROMPT; i = CURrequester(cur, Title, items); refresh(); return(i); } /* * This is the old version of GetOneOption, for those times when the * garsh darn terminal is just too gadblam slow :-) */ int CUROldGetOneOption(CursesObj *cur, char *OptionName, char *Response) { int i; mvaddstr(LINES-1, 0, OptionName); standout(); addstr(" "); standend(); clrtoeol(); move(LINES-1, strlen(OptionName)); refresh(); i = CURwgetstr(cur, stdscr, Response, 4, FALSE); return(i); } /* * Fills in the Response with either a lowercase 'y' or 'n' */ void CURgetYesorNo(CursesObj *cur, char *OptionName, char *Response) { int c; int posx, posy; mvaddstr(LINES-1, 0, OptionName); clrtoeol(); getyx(cur->Screen, posy, posx); addch(' '); if (*Response == 'y') mvaddstr(posy, posx+1, "y"); else { *Response = 'n'; mvaddstr(posy, posx+1, "n "); } move(posy, posx+1); refresh(); while (1) { c = CURgetch(cur); if (c == 'y') { mvaddstr(posy, posx+1, Gtxt("Yes",180)); move(posy, posx+1); refresh(); *Response = 'y'; *(Response +1) = '\0'; return; } else if (c == 'n') { mvaddstr(posy, posx+1, Gtxt("No ",111)); move(posy, posx+1); refresh(); *Response = 'n'; *(Response +1) = '\0'; return; } else if ((c == '\n')||(c=='\r')) { return; } #ifdef VMS else if ( c == '\032' ) { /* control-Z */ return; } #endif else { Debugmsg("CURgetYesorNo beep\r\n") CURBeep(cur); } } } void CURBeep(CursesObj *cur) { Debugmsg("CURBeep\r\n") #ifdef SYSVCURSES beep(); #else /* CURcenterline(cur, stdscr, CURgetBell(cur), 1, COLS, FALSE); */ tputs(CURgetBell(cur), 1, CURoutchar); fflush(stdout); #endif } void CURbox(CursesObj *cur, WINDOW *win, int height, int width) { int i; wmove(win, 0, 0); waddch(win, CURgetBox_ul(cur)); for (i=0; i messlength) messlength = strlen(Message[messheight]); messheight++; } winwidth = max(31, messlength+6); winwidth = max(winwidth, strlen(Wintitle)+6); winwidth = min(winwidth, COLS-2); tempwin = newwin(5+messheight, winwidth, (LINES-(5+messheight))/2, (COLS-winwidth)/2); if (tempwin == (WINDOW *)0) return(-1); CURwenter(cur,tempwin); CURbox(cur, tempwin, 5+messheight, winwidth); /** Add the message **/ for (i=0; i messlength) { for (j=0; j < messlength; j++) waddch(tempwin, Message[i][j]); } else waddstr(tempwin, Message[i]); } /** Add the window title, centered **/ if (Wintitle != NULL) CURcenterline(cur, tempwin, Wintitle, 0, winwidth, TRUE); /** Add the keyboard labels **/ wmove(tempwin, 3+messheight, winwidth - 28); CURbutton(cur, tempwin, Gtxt(DIALOGCANCELSTR,211), FALSE); waddch(tempwin, ' '); CURbutton(cur, tempwin, Gtxt("OK: Enter",191), FALSE); wrefresh(tempwin); switch(CURwgetch(cur, tempwin)) { case -1: case '\007': delwin(tempwin); return(-1); default: delwin(tempwin); return(0); } } int CURRequest(CursesObj *cur, char *Wintitle, char **Prompts, char **Stowages) { Requestitem **items; int i, choice, numprompts = 0; while (Prompts[numprompts] != NULL) numprompts++; items = (Requestitem **) malloc(sizeof(Requestitem *) * (numprompts+1)); for (i = 0; i < numprompts; i++) { items[i] = (Requestitem*) malloc(sizeof(Requestitem)); items[i]->prompt = Prompts[i]; items[i]->stowage = Stowages[i]; if (Stowages[i] == NULL) items[i]->thing = CUR_LABEL; else items[i]->thing = CUR_PROMPT; } items[i] = NULL; choice = CURrequester(cur, Wintitle, items); /** Free memory **/ for (i=0; i <= numprompts; i++) if (items[i]) free(items[i]); free(items); return(choice); } /* * CURrequester takes an array of requestitems and does the right * things with it.. */ int CURrequester(CursesObj *cur, char *Wintitle, Requestitem **items) { int BottomField; int ch; Requestitem *curitem; int currentfield = 0; int FieldsPerPage; boolean Found; int i,j,k; int maxlength; int maxpromptwidth = 0; int numprompts = 0; WINDOW *tempwin; int TopField; int WinLines; int WinWidth = COLS - 1; static char **RequestHelp = NULL; if (RequestHelp == NULL) { RequestHelp = (char**) malloc(sizeof(char*) * 8); RequestHelp[0] = Gtxt(HELPCANCEL,190); RequestHelp[1] = Gtxt("Tab, ^N : Move to next field",192); RequestHelp[2] = Gtxt("^P : Move to previous field",193); RequestHelp[3] = Gtxt("^F : Display next page",194); RequestHelp[4] = Gtxt("^B : Display previous page",195); RequestHelp[5] = Gtxt("^- : Help (^/ or ^7 may work)",196); RequestHelp[6] = Gtxt(CXPROMPT1,197); RequestHelp[7] = NULL; } /*** Find the number of prompts... and the max width ***/ while ((curitem = items[numprompts++]) != NULL) { /*** Skip non editable prompts ***/ if (curitem->thing != CUR_LABEL) { if (curitem->prompt && strlen(curitem->prompt) > maxpromptwidth) maxpromptwidth = strlen(curitem->prompt); } else { if (currentfield == numprompts-1) currentfield++; } } numprompts--; if (numprompts == 0) return(-1); TopField = 0; FieldsPerPage = min(numprompts, LINES - 5); BottomField = min(TopField + FieldsPerPage, numprompts) - 1; /** If only one prompt, offer an entire line for input **/ if (numprompts == 1 && items[0]->thing == CUR_PROMPT) { WinLines = 8; maxlength = WinWidth - 4; } else { WinLines = FieldsPerPage + 5; maxlength = WinWidth - maxpromptwidth - 6; } /*** Create the new window ***/ tempwin = newwin(WinLines, WinWidth, (LINES - WinLines) / 2, 0); CURwenter(cur, tempwin); CURbox(cur, tempwin, WinLines, WinWidth); /*** Add the window title, centered ***/ if (Wintitle != NULL) CURcenterline(cur, tempwin, Wintitle, 0, WinWidth, TRUE); /*** Display the form and allow the user to update it ***/ while (1) { /*** Add the labels ***/ wmove(tempwin, WinLines - 2, 2); waddstr(tempwin, Gtxt(FORMCANCEL,198)); if (items[currentfield]->thing == CUR_CHOICE) waddstr(tempwin, Gtxt(" [Cycle Values: Space] [List Values: l]",199)); else { #ifdef CONTROLX waddstr(tempwin, " [Accept: ^X] "); #else waddstr(tempwin, " [Accept: Enter] "); #endif waddstr(tempwin, " [Next field: TAB] "); waddstr(tempwin, " "); } /** Add the prompts and typing area **/ if (numprompts == 1 && items[0]->thing == CUR_PROMPT) { wmove(tempwin, 2, 2); waddstr(tempwin, items[0]->prompt); /** Trim the stowage if necessary **/ if ((j = strlen(items[0]->stowage)) > maxlength) while (j > maxlength) (items[0])->stowage[--j] = '\0'; /** Add the stowage if it exists and its black space **/ wmove(tempwin, 4, 2); wstandout(tempwin); waddstr(tempwin, items[0]->stowage); for (j=strlen(items[0]->stowage)+2; j < WinWidth-2; j++) waddch(tempwin, ' '); wstandend(tempwin); } else { i = 0; for (k = TopField; k <= BottomField ; k++) { wmove(tempwin, 2 + i, 2); if (items[k]->prompt) { waddstr(tempwin, items[k]->prompt); for (j = WinWidth-strlen(items[k]->prompt)-4; j>0;j--) waddch(tempwin, ' '); } switch (items[k]->thing) { case CUR_LABEL: break; case CUR_CHOICE: /** Add the default **/ wmove(tempwin, 2 + i, maxpromptwidth + 4); waddstr(tempwin, items[k]->choices[items[k]->chooseitem]); break; case CUR_ASKL: wordwrap = TRUE; wmove(tempwin, 2 + i, 2); wstandout(tempwin); waddstr(tempwin, items[k]->stowage); for (j = WinWidth - strlen(items[k]->stowage) - 4 ; j > 0; j--) waddch(tempwin, ' '); wstandend(tempwin); break; default: /** Add the black space for the stowage, **/ /** and the stowage, if it exists **/ wordwrap = FALSE; wmove(tempwin, 2 + i, maxpromptwidth + 4); wstandout(tempwin); if (items[k]->thing == CUR_PASSWD) for (j = strlen(items[k]->stowage); j > 0; j--) waddch(tempwin, '*'); else if (items[k]->stowage) waddstr(tempwin, items[k]->stowage); for (j = WinWidth - (items[k]->stowage ? strlen(items[k]->stowage):0) - maxpromptwidth - 6; j > 0; j--) waddch(tempwin, ' '); wstandend(tempwin); } i++; } } if (numprompts == 1) wmove(tempwin, 4, 2); else wmove(tempwin, 2 + currentfield - TopField, maxpromptwidth + 4); if (items[currentfield]->thing == CUR_ASKL) wmove(tempwin, 2 + currentfield - TopField, 2); wrefresh(tempwin); if (items[currentfield]->thing == CUR_CHOICE) { int choice = items[currentfield]->chooseitem; boolean done = FALSE; wmove(tempwin, 2 + currentfield - TopField, maxpromptwidth + strlen(items[currentfield]->choices[choice]) + 4); wrefresh(tempwin); while (!done) { ch = CURwgetch(cur, tempwin); wmove(tempwin, 2 + currentfield - TopField, maxpromptwidth + 4); for (i=strlen(items[currentfield]->choices[choice]); i>0; i--) waddch(tempwin, ' '); if (ch == ' ') { choice++; } else if (ch == 'l') { int tempx; tempx = CURChoice(cur, items[currentfield]->prompt, items[currentfield]->choices, Gtxt("Select an item",200), items[currentfield]->chooseitem); touchwin(tempwin); if (tempx != -1) choice = tempx; } else done = TRUE; if (items[currentfield]->choices[choice] == NULL) choice = 0; wmove(tempwin, 2 + currentfield - TopField, maxpromptwidth + 4); waddstr(tempwin, items[currentfield]->choices[choice]); items[currentfield]->chooseitem = choice; wrefresh(tempwin); } } else { int zemax = maxlength; if (items[currentfield]->thing == CUR_ASKL) zemax = COLS - 6; ch = CURwgetstr(cur,tempwin,items[currentfield]->stowage, zemax, items[currentfield]->thing == CUR_PASSWD); } #ifdef CONTROLX if (ch == '\n') { if (numprompts > 1) { ch = '\t'; /* Treat as tab, next field */ } else { ch = '\030'; /* Treat as control-X, accept */ } } #endif switch (ch) { case '\016': case '\t': /*** Move to next non-label field (tab) ***/ do { currentfield++; if (currentfield > numprompts - 1) { TopField = 0; BottomField = min(TopField + FieldsPerPage, numprompts) - 1; currentfield = TopField; } else if (currentfield > BottomField) { TopField++; BottomField++; } } while (items[currentfield]->thing == CUR_LABEL); break; case '\020': /*** Move to the previous non-label field (back tab) ***/ do { currentfield--; if (currentfield < 0) { currentfield = numprompts - 1; TopField = max(0, numprompts - FieldsPerPage); BottomField = currentfield; } else if (currentfield < TopField) { TopField--; BottomField--; } } while (items[currentfield]->thing == CUR_LABEL); break; case KEY_DOWN: /* * Move to the next non-label field on the current * screen. If there is no such field, scroll down * one line. If a non-label field is found, move * to it, otherwise don't move. (Line down) */ if (currentfield == BottomField) { TopField++; BottomField++; if (BottomField > numprompts - 1) { TopField = 0; BottomField = min(TopField + FieldsPerPage, numprompts) - 1; currentfield = TopField; while (items[currentfield]->thing == CUR_LABEL) currentfield++; } else if (items[BottomField]->thing != CUR_LABEL) currentfield = BottomField; } else { Found = FALSE; for (i = currentfield + 1; i <= BottomField; i++) if (items[i]->thing != CUR_LABEL) { currentfield = i; Found = TRUE; break; } if (!Found) { TopField++; BottomField++; if (BottomField > numprompts - 1) { TopField = 0; BottomField = min(TopField + FieldsPerPage, numprompts) - 1; currentfield = TopField; while (items[currentfield]->thing == CUR_LABEL) currentfield++; } else if (items[BottomField]->thing != CUR_LABEL) currentfield = BottomField; } } break; case KEY_UP: /* * Move to the previous non-label field on the current * screen. If there is no such field, scroll up * one line. If a non-label field is found, move * to it, otherwise don't move. (Line up) */ if (currentfield == TopField) { TopField--; BottomField--; if (TopField < 0) { TopField = max(0, numprompts - FieldsPerPage); BottomField = numprompts - 1; currentfield = BottomField; while (items[currentfield]->thing == CUR_LABEL) currentfield--; } else if (items[TopField]->thing != CUR_LABEL) currentfield = TopField; } else { Found = FALSE; for (i = currentfield - 1; i >= TopField; i--) if (items[i]->thing != CUR_LABEL) { currentfield = i; Found = TRUE; break; } if (!Found) { TopField--; BottomField--; if (TopField < 0) { TopField = max(0, numprompts - FieldsPerPage); BottomField = numprompts - 1; currentfield = BottomField; while (items[currentfield]->thing == CUR_LABEL) currentfield--; } else if (items[TopField]->thing != CUR_LABEL) currentfield = TopField; } } break; case '\006': case KEY_NPAGE: /*** Move down a page ***/ if (BottomField == numprompts - 1) { currentfield = BottomField; while (items[currentfield]->thing == CUR_LABEL) currentfield--; } else { BottomField = min(BottomField + FieldsPerPage, numprompts) - 1; TopField = max(0, BottomField - FieldsPerPage + 1); if (currentfield < TopField) { currentfield = TopField; while (items[currentfield]->thing == CUR_LABEL) currentfield++; } } break; case '\002': case KEY_PPAGE: /*** Move up a page ***/ if (TopField == 0) { currentfield = 0; while (items[currentfield]->thing == CUR_LABEL) currentfield++; } else { TopField = max(0, TopField - FieldsPerPage + 1); BottomField = min(TopField + FieldsPerPage, numprompts) - 1; if (currentfield > BottomField) { currentfield = BottomField; while (items[currentfield]->thing == CUR_LABEL) currentfield--; } } break; case '\037': case KEY_HELP: CURDialog(cur, "Form Help", RequestHelp); touchwin(tempwin); break; case '\007': case -1: /*** Cancel ***/ delwin(tempwin); return(-1); #ifdef CONTROLX case '\030': #else case '\n': #endif delwin(tempwin); return(0); default: if (wordwrap) { char *p; if ( currentfield == numprompts-1){ CURBeep(cur); continue; } if (items[currentfield+1]->thing != CUR_ASKL ) { CURBeep(cur); continue; } /* we must go and find the last space in stowage and move to next line */ p=strrchr(items[currentfield]->stowage,' '); /* copy rest of string to next line */ if ( p != NULL ) { char addit[2]; *addit = ch; *(addit+1) = '\0'; strcat(p+1, addit); strcpy(items[currentfield+1]->stowage,p+1); /* now blank out those characters */ *p='\0'; wmove(tempwin, 2 + currentfield - TopField, 2); wstandout(tempwin); waddstr(tempwin, items[currentfield]->stowage); for (j=strlen(items[currentfield]->stowage)+ maxpromptwidth+4; j < COLS-6; j++) waddch(tempwin, ' '); wstandend(tempwin); } currentfield++; /* go to next ASKL field */ if (currentfield > BottomField) { TopField++; BottomField++; } } } } } /* * CURChoice takes a bunch of titles, throws them on the screen, * and asks the user to choose one. * * Returns the number chosen, or -1 if the user cancels. * * Limitation: The number of choices must be less than 100. */ int CURChoice(CursesObj *cur, char *WinTitle, char **Choices, char *Prompt, int DefaultChoice) { int BottomChoice; int ch; int ChoicesPerPage; int CurrentChoice = 0; int CurrentLine; int CurrentPage; int i; char InBuf[3]; int j; int k; int MaxChoiceWidth = 0; int NumChoices = 0; int NumPages; WINDOW *TempWin; int TopChoice; int WinLines; int WinWidth; static char ** ChoiceHelp = NULL; if (ChoiceHelp == NULL) { ChoiceHelp = (char**) malloc(sizeof(char*) * 10); ChoiceHelp[0] = Gtxt(HELP2CANCEL,202); ChoiceHelp[1] = Gtxt("Down, ^N : Move to next choice",203); ChoiceHelp[2] = Gtxt("Up, ^P : Move to previous choice",204); ChoiceHelp[3] = Gtxt("Space, ^F : Display next page",205); ChoiceHelp[4] = Gtxt("b, ^B : Display previous page",206); ChoiceHelp[5] = Gtxt("^ : Display first page",207); ChoiceHelp[6] = Gtxt("$ : Display last page",208); ChoiceHelp[7] = Gtxt("0-9 : Select a specific choice",209); ChoiceHelp[8] = Gtxt("Enter : Select current choice",210); ChoiceHelp[9] = NULL; } /*** Determine number of choices and verify it's within limits ***/ while (Choices[NumChoices] != NULL) NumChoices++; if (NumChoices == 0) return(-1); if (NumChoices > 99) { CursesErrorMsg("More than 99 choices! Please gripe."); return(-1); } ChoicesPerPage = min(NumChoices, LINES - 6); NumPages = NumChoices / ChoicesPerPage + 1; WinLines = ChoicesPerPage + 6; CurrentChoice = (DefaultChoice > -1) ? DefaultChoice : 0; CurrentPage = CurrentChoice / ChoicesPerPage; BottomChoice = min(CurrentPage * ChoicesPerPage + ChoicesPerPage, NumChoices) - 1; TopChoice = max(0, BottomChoice - ChoicesPerPage + 1); CurrentLine = CurrentChoice - TopChoice + 2; /*** Determine dialog box width ***/ for (i = 0; i < NumChoices; i++) if (i == DefaultChoice) MaxChoiceWidth = max(strlen(Choices[i]) + 10, MaxChoiceWidth); else MaxChoiceWidth = max(strlen(Choices[i]), MaxChoiceWidth); WinWidth = max(strlen(Prompt) + 17, MaxChoiceWidth + 15); WinWidth = max(strlen(WinTitle) + 8, WinWidth); WinWidth = max(29, WinWidth); WinWidth = min(COLS - 2, WinWidth); /*** Create the new window ***/ TempWin = newwin(WinLines, WinWidth, (LINES - WinLines) / 2, (COLS - WinWidth) / 2); CURwenter(cur, TempWin); CURbox(cur, TempWin, WinLines, WinWidth); /*** Add the window title, centered ***/ if (WinTitle != NULL) CURcenterline(cur, TempWin, WinTitle, 0, WinWidth, TRUE); /*** Add the prompt ***/ wmove(TempWin, ChoicesPerPage + 3, 3); wprintw(TempWin, "%s (1-%d): ", Prompt, NumChoices); /*** Add the labels ***/ wmove(TempWin, ChoicesPerPage + 4, 3); CURbutton(cur, TempWin, Gtxt("Help: ?",96), FALSE); waddstr(TempWin, " "); CURbutton(cur, TempWin, Gtxt(DIALOGCANCELSTR,211), FALSE); /*** Display the dialog box and allow the user to make a choice ***/ while (1) { /*** Add the current page of choices ***/ i = 0; for (j = TopChoice; j <= BottomChoice; j++) { wmove(TempWin, 2 + i, 8); for (k = 0; k < WinWidth - 10; k++) waddch(TempWin, ' '); wmove(TempWin, 2 + i, 8); wprintw(TempWin, "%2d.", j + 1); wmove(TempWin, 2 + i, 12); wprintw(TempWin, "%s", Choices[j]); if (j == DefaultChoice) waddstr(TempWin, Gtxt(" (default)",212)); i++; } /*** Add the cursor ***/ wmove(TempWin, CurrentLine, 3); waddstr(TempWin, "-->"); /*** Update the screen ***/ wrefresh(TempWin); /*** Let the user choose ***/ ch = CURwgetch(cur, TempWin); switch(ch) { case '\016': case KEY_DOWN: /*** Move down a line ***/ if (CurrentChoice == BottomChoice) { TopChoice++; BottomChoice++; if (BottomChoice > NumChoices - 1) { CurrentChoice = 0; TopChoice = 0; BottomChoice = min(TopChoice + ChoicesPerPage, NumChoices) - 1; } else CurrentChoice++; } else CurrentChoice++; break; case '\020': case KEY_UP: /*** Move up a line ***/ if (CurrentChoice == TopChoice) { TopChoice--; BottomChoice--; if (TopChoice < 0) { CurrentChoice = NumChoices - 1; TopChoice = max(0, NumChoices - ChoicesPerPage); BottomChoice = CurrentChoice; } else CurrentChoice--; } else CurrentChoice--; break; case '\006': case ' ': case '+': case KEY_NPAGE: /*** Move down a page ***/ if (BottomChoice == NumChoices - 1) CurrentChoice = BottomChoice; else { BottomChoice = min(BottomChoice + ChoicesPerPage, NumChoices) - 1; TopChoice = max(0, BottomChoice - ChoicesPerPage + 1); CurrentChoice = max(TopChoice, CurrentChoice); } break; case '\002': case 'b': case '-': case KEY_PPAGE: /*** Move up a page ***/ if (TopChoice == 0) CurrentChoice = TopChoice; else { TopChoice = max(0, TopChoice - ChoicesPerPage + 1); BottomChoice = min(TopChoice + ChoicesPerPage, NumChoices) - 1; CurrentChoice = min(CurrentChoice, BottomChoice); } break; case '^': /*** Move to top ***/ TopChoice = 0; BottomChoice = min(TopChoice + ChoicesPerPage, NumChoices) - 1; CurrentChoice = TopChoice; break; case '$': /*** Move to bottom ***/ BottomChoice = NumChoices - 1; TopChoice = max(0, BottomChoice - ChoicesPerPage + 1); CurrentChoice = BottomChoice; break; case '\037': case KEY_HELP: case 'h': case '?': /*** Help ***/ CURDialog(cur, Gtxt("Choice Dialog Help",213), ChoiceHelp); touchwin(TempWin); break; case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': case '0': /*** Literal ***/ InBuf[0] = ch; InBuf[1] = '\0'; InBuf[2] = '\0'; i = strlen(Prompt) + (NumChoices < 10 ? 11 : 12); j = ChoicesPerPage + 3; wmove(TempWin, j, i); ch = CURwgetstr(cur, TempWin, InBuf, (NumChoices < 10 ? 1 : 2), FALSE); k = atoi(InBuf); if ((ch == '\n') && (0 < k) && (k <= NumChoices)) { delwin(TempWin); return (k - 1); } else { wmove(TempWin, j, i); waddstr(TempWin, " "); if (ch != -1) CURBeep(cur); break; } case '\007': /*** Cancel ***/ delwin(TempWin); return (-1); case '\n': case '\030': /* Control X */ /*** Accept ***/ delwin(TempWin); return (CurrentChoice); default: CURBeep(cur); break; } wmove(TempWin, CurrentLine, 3); waddstr(TempWin, " "); CurrentPage = CurrentChoice / ChoicesPerPage; CurrentLine = CurrentChoice - TopChoice + 2; } } /********************** Cruft for VMS follows ****************************/ #ifdef VMS #include #include #include #include #include #include #include #include #include #include #include #ifdef signal #undef signal #endif #include #ifdef system #undef system #endif #include #ifndef CLI$M_TRUSTED #define CLI$M_TRUSTED 64 /* May not be in the compiler's clidef.h */ #endif #define EFN 0 /* Event flag */ static int mask = LIB$M_CLI_CTRLY|LIB$M_CLI_CTRLT; /* ^Y and ^T */ static int old_msk; /* Saved control mask */ static short trap_flag = FALSE; /* TRUE if AST is set */ static $DESCRIPTOR (term_name, "SYS$INPUT:"); /* For channel assigns */ short term_chan; /* The channel */ static short first = TRUE; /* Terminal initialization flag */ struct char_buffer_type { /* Terminal characteristics */ char class; char type; unsigned short size; unsigned long tchars; unsigned long tchars2; } oldbuf; static int in_pos, in_len; /* For escape sequence */ static unsigned char buffer[20]; /* handling in w_getch */ boolean DidCleanup = FALSE; /* Exit handler flag */ static char VersionVMS[20]; /* Version of VMS */ /* * Define local replacement for wgetch that returns the characters without * having to set the terminal /pasthru, which screws up control-Y processing. */ static int w_getch(win) int win; { int status; unsigned short iosb[4]; if (in_pos < in_len) return(buffer[in_pos++]); status = sys$qiow (0, term_chan, IO$_READVBLK|IO$M_NOECHO|IO$M_NOFILTR, &iosb, 0, 0, &buffer, 1, 0, 0, 0, 0); if ((status&1) == 1) status = iosb[0]; if (status == SS$_PARTESCAPE) { /* escape sequence in progress, fake a successful read */ status = 1; } if ((status&1) != 1) exit(status); in_pos = 1; in_len = iosb[1] + iosb[3]; return (buffer[0]); } void setterm_pas() { int status; short iosb[4]; if(first) VMSinit(); else status = lib$disable_ctrl(&mask); in_pos = 0; in_len = 0; } void resetterm() { int status; status = sys$qiow(0,term_chan,IO$_SETMODE,0,0,0, &oldbuf,12,0,0,0,0); status = lib$enable_ctrl(&old_msk); } /* VMS doesn't have termcap. Unfortunately, the code in this */ /* module uses termcap just a little bit (it really shouldn't) */ /* rather than doing everything through curses */ /* The following simulates tputs, but does not support padding */ int tputs(register char *cp, int affcnt, int (*outc)()) { while (*cp) outc(*(cp++)); return(0); } /* * VMSsignal -- F.Macrides 31-Jul-1993 (modification of my LYNX routine) * Sets up AST for both Ctrl-C and Ctrl-Y, with system response to Ctrl-T * disabled. If called with a sig other than SIGINT, it will use the C * library's signal(sig, func). * VMSsignal(SIGINT, SIG_DFL) is treated as a call to resetterm(). * Call VMSsignal(SIGINT, SIG_IGN) before system() calls to enable Ctrl-C * and Ctrl-Y in the subprocess, and then call VMSsignal(SIG_INT, func) * on return from the subprocess. * For func's which do not invoke an exit, the func should reassert itself. * The VMS C signal() calls do not fully emulate the Unix calls, and * VMSsignal() is just a "helper", also not a full emulation. */ void (*VMSsignal (sig, func)) (int) int sig; void (*func)(); { int status; short iosb[4]; static int SIG_IGN_flag; /* pass all signals other than SIGINT to signal() */ if (sig != SIGINT) { return(signal(sig, func)); } /* if func is SIG_DFL, treat it as resetterm() */ if (func == SIG_DFL) { resetterm(); return(SIG_DFL); } /* Clear any previous AST */ if (trap_flag) { status = sys$dassgn (term_chan); status = lib$enable_ctrl(&old_msk); trap_flag = FALSE; } /* if func is SIG_IGN, leave the TT channel closed and the */ /* system response to interrupts enabled for system() calls */ if (func == SIG_IGN) return(SIG_IGN); /* if we get to here, we have a SIGINT func, so set the AST */ if(first) VMSinit(); else { status = sys$assign (&term_name, &term_chan, 0, 0); status = lib$disable_ctrl(&mask); } status = sys$qiow (EFN, term_chan, IO$_SETMODE|IO$M_CTRLCAST|IO$M_CTRLYAST, &iosb, 0, 0, func, SIGINT, 0, 0, 0, 0); trap_flag = TRUE; return(func); } /* * VMSCURinit, VMSinit, VMSexit -- F.Macrides 12-Aug-1993 * Save termial characteristics at the time when gopher.c's Initialize() * is called. Make sure they're retored and that cleanup is done if we * exit via exit(-1)'s or ACCVIO's. */ void VMSCURinit(cur) CursesObj *cur; { int status, i; short Type = 0; long buf_siz = 20, len; unsigned long Addr; char ch, Name[20], cl[20], bl[20], so[20], se[20]; /** Keep DECC from complaining **/ struct dsc$descriptor_s Name_desc; Name_desc.dsc$w_length = 20; Name_desc.dsc$b_class = DSC$K_CLASS_S; Name_desc.dsc$b_dtype = DSC$K_DTYPE_T; Name_desc.dsc$a_pointer = Name; /*** Initialize the terminal, if we haven't already ***/ if(first) VMSinit(); /*** Can't handle "unknown" terminal type ***/ if (oldbuf.type == 0) { CURsetTerm(cur, "unknown"); return; } /*** Get the terminal table ready ***/ Type = (short) oldbuf.type; status = smg$init_term_table_by_type (&Type, &Addr, &Name_desc); if (!(status&1)) { CURsetTerm(cur, "unknown"); return; } /*** Set the terminal name ***/ i = 0; while ((Name[i++] != ' ') && i <= 20) ; Name[--i] = '\0'; if (strlen(Name)) CURsetTerm(cur, Name); else CURsetTerm(cur, "VMS"); /*** Get the clearscreen code ***/ status = smg$get_term_data(&Addr, &SMG$K_ERASE_WHOLE_DISPLAY, &buf_siz, &len, cl); if (status&1) { cl[len] = '\0'; CURsetCLS(cur, cl); } else /*** Assume 7-bit ***/ CURsetCLS(cur, "\033[2J"); /*** Set the bell ***/ CURsetBell(cur, "\007"); /*** Set the highlight codes ***/ status = smg$get_term_data (&Addr, &SMG$K_BEGIN_BOLD, &buf_siz, &len, so); if (status&1) { so[len] = '\0'; CURsetHighon(cur, so); } else CURsetHighon(cur, "\033[1m"); status = smg$get_term_data (&Addr, &SMG$K_BEGIN_NORMAL_RENDITION, &buf_siz, &len, se); if (status&1) { se[len] = '\0'; CURsetHighoff(cur, se); } else CURsetHighoff(cur, "\033[m"); } void VMSinit() { int status; static unsigned long condition; static struct _exit_block { unsigned long forward; unsigned long address; unsigned long zero; unsigned long condition; } exit_handler_block; if(first) { /* get a channel and save terminal parms if we haven't already */ status = sys$assign (&term_name, &term_chan, 0, 0 ); status = sys$qiow(0,term_chan,IO$_SENSEMODE,0,0,0, &oldbuf,12,0,0,0,0); first = FALSE; status = lib$disable_ctrl(&mask, &old_msk); exit_handler_block.forward = 0; exit_handler_block.address = (unsigned long) &VMSexit; exit_handler_block.zero = 0; exit_handler_block.condition = (unsigned long) &condition; /* declare the exit handler block */ status = sys$dclexh(&exit_handler_block); if (status != SS$_NORMAL) { printf("exit_status: %d", status); } /* Get the version of VMS */ if (VMSVersion(VersionVMS, 20) < 3) /* Load zeros on error */ strcpy(VersionVMS, "V0.0-0"); } } void VMSexit() { /* * If we didn't get here via CleanupandExit(), it was via an * exit(-1) or ACCVIO, so make *sure* we reset the terminal, * then attempt a cleanup. */ if (!DidCleanup) { fprintf(stderr,"\nPress RETURN to clean up and exit: "); (void) getchar(); resetterm(); CleanupandExit(-1); } } /* * VMSVersion -- F.Macrides 09-Jan-1994 * Modification of UNZIP routine for getting VMS Version. */ int VMSVersion(VerString, VerLen) char *VerString; int VerLen; { int status, i = SYI$_VERSION, verlen = 0; struct dsc$descriptor version; char *m; version.dsc$a_pointer = VerString; version.dsc$w_length = VerLen - 1; version.dsc$b_dtype = DSC$K_DTYPE_B; version.dsc$b_class = DSC$K_CLASS_S; status = lib$getsyi(&i, 0, &version, &verlen, 0, 0); if (!(status&1) || verlen == 0) return 0; /* Cut out trailing spaces */ for (m=VerString+verlen, i=verlen-1; i > 0 && VerString[i] == ' '; --i) *(--m) = '\0'; return strlen(VerString)+1; /* Transmit ending 0 too */ } /* * DCLsystem, spawn_DCLprocess, DCLspawn_exception -- F.Macrides 31-Jul-1993 * Exception-handler routines for enabling interrupts and Control-T * during spawns when setjmp() has been established, and the parent * passes a DCL CLI. * F.Macrides 09-Jan-1994 -- spawn_DCLprocess includes TRUSTED flag for * spawns with a command (but not spawns to DCL) if the version of * OpenVMS/VAX requires it in captive accounts. */ int DCLsystem(command) char *command; { int status; extern void controlc(); VMSsignal(SIGINT, SIG_IGN); status = spawn_DCLprocess(command); VMSsignal(SIGINT, controlc); if ((status&1) != 1) return(-1); else return(0); } int spawn_DCLprocess(command) char *command; { int status; /** Keep DECC from complaining **/ struct dsc$descriptor_s command_desc; command_desc.dsc$w_length = strlen(command); command_desc.dsc$b_class = DSC$K_CLASS_S; command_desc.dsc$b_dtype = DSC$K_DTYPE_T; command_desc.dsc$a_pointer = command; VAXC$ESTABLISH(DCLspawn_exception); if (command == "") status = lib$spawn(0); else { #ifndef __ALPHA /* OpenVMS/AXP v6.1 still doesn't have the TRUSTED flag ;( */ if(VersionVMS[1] >= '6') /** Include TRUSTED flag **/ status = lib$spawn(&command_desc,0,0,&CLI$M_TRUSTED); else #endif status = lib$spawn(&command_desc); } return(status); } unsigned int DCLspawn_exception(sigarr, mecharr) void *sigarr, *mecharr; { int status; status = lib$sig_to_ret(sigarr, mecharr); return(SS$_UNWIND); } #endif /* VMS */ gopher/gopher/CURcurses.h0000644000000000000000000002212510762617110012546 0ustar /******************************************************************** * $Author: jgoerzen $ * $Revision: 1.6 $ * $Date: 2002/04/26 13:33:33 $ * $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/gopher/CURcurses.h,v $ * $State: Exp $ * * Paul Lindner, University of Minnesota CIS. * * Copyright 1991, 1992 by the Regents of the University of Minnesota * see the file "Copyright" in the distribution for conditions of use. ********************************************************************* * MODULE: CURcurses.h * Header file access methods for CURcurses.c ********************************************************************* * Revision History: * $Log: CURcurses.h,v $ * Revision 1.6 2002/04/26 13:33:33 jgoerzen * Removed glib MIME stuff. We'll move to Pygopherd first. * * Revision 1.4.2.1 2002/03/21 15:24:56 jgoerzen * Fixes for Solaris. Also commited on main branch. * * Revision 1.4 2001/01/17 21:48:05 jgoerzen * Many fixes and tune-ups. Now compiles cleanly with -Wall -Werror! * * Revision 1.3 2001/01/03 22:26:27 s2mdalle * Code cleanups, addition of a few prototypes from CURcurses.c * * Revision 1.2 2000/12/27 21:24:04 s2mdalle * Added many function prototypes from CURcurses.c * * Revision 1.1.1.1 2000/08/19 00:28:56 jgoerzen * Import from UMN Gopher 2.3.1 after GPLization * * Revision 3.24 1996/01/04 18:28:52 lindner * Updates for autoconf * * Revision 3.23 1995/11/03 21:18:15 lindner * ANSIfication * * Revision 3.22 1995/05/01 05:41:29 lindner * compatibility fixes * * Revision 3.21 1995/02/27 17:44:25 lindner * Change code to use enums * * Revision 3.20 1995/02/17 18:31:08 lindner * Fix for solaris curses routines * * Revision 3.19 1994/06/29 05:21:12 lindner * Start of AskF: * * Revision 3.18 1994/05/02 07:40:16 lindner * Mods to use setlocale() * * Revision 3.17 1994/04/13 19:14:31 lindner * AskL modifications * * Revision 3.16 1994/04/07 17:25:54 lindner * Fix for pyramids * * Revision 3.15 1994/03/04 23:39:48 lindner * Fix for log entries * * Revision 3.14 1994/03/04 23:36:30 lindner * figure out whether the terminal can do alternate character set. * * Revision 3.13 1994/02/20 21:45:20 lindner * Better sanity checks for box drawing characters * * Revision 3.12 1994/02/20 16:49:20 lindner * Fix bug in gcc for Solaris 2.x for curses routines * * Revision 3.11 1993/12/28 17:28:52 lindner * Better method of drawing box characters * * Revision 3.10 1993/11/29 01:09:46 lindner * Don't use the alternate character set for character graphics under AIX. * They don't work very well in xterms or aixterms. [However, it does work * if I use Mac NCSA Telnet to connect to our RS/6000....] (Beckett) * * Revision 3.9 1993/11/02 06:21:30 lindner * Fix for osf curses * * Revision 3.8 1993/09/26 09:19:21 lindner * Add bold #defines * * Revision 3.7 1993/09/22 15:44:36 lindner * Fix for sysv systems without KEY_HELP * * Revision 3.6 1993/09/22 01:15:47 lindner * Add support for DEC HELP key/KEY_HELP * * Revision 3.5 1993/09/21 01:46:08 lindner * Implement all remaining ASK block items.. * * Revision 3.4 1993/09/08 05:20:02 lindner * Fix for multiple CURcurses.h includes * * Revision 3.3 1993/07/30 17:31:39 lindner * Mods to support AskP: * * Revision 3.2 1993/04/15 21:25:20 lindner * Fixes for CURbox() definitions * * Revision 3.1.1.1 1993/02/11 18:02:56 lindner * Gopher+1.2beta release * * Revision 1.2 1992/12/31 05:57:38 lindner * Mods for VMS * * Revision 1.1 1992/12/10 23:32:16 lindner * gopher 1.1 release * * Revision 1.1 1992/12/10 06:16:51 lindner * Initial revision * * *********************************************************************/ #ifndef CURCURSES_H #define CURCURSES_H #include "Locale.h" #include #ifdef __svr4__ /* Fix bug in gcc for Solaris 2.x */ # define SYSV #endif #if defined(ultrix) # include #else # include #endif #include "boolean.h" #include "STRstring.h" #ifdef KEY_RIGHT # define SYSVCURSES #endif struct CursesStruct { WINDOW *Screen; String *Termtype; /** Termcap/terminfo stuff **/ String *Clearscreen; String *AudibleBell; String *Highlighton; String *Highlightoff; boolean canUseACS; boolean inCurses; int COLS; int ROWS; int Box_ul; int Box_ur; int Box_ll; int Box_lr; int Box_vline; int Box_hline; int Box_tt; int Box_bt; int Box_lt; int Box_rt; int Box_ct; void (*sigtstp)(); void (*sigwinch)(); }; typedef struct CursesStruct CursesObj; typedef struct CursesStruct *CursesObjp; #ifndef SYSVCURSES # define KEY_DOWN 0402 /* The four arrow keys ...*/ # define KEY_UP 0403 # define KEY_LEFT 0404 # define KEY_RIGHT 0405 # define KEY_NPAGE 0522 /* Next page */ # define KEY_PPAGE 0523 /* Previous page */ # define KEY_ENTER 0527 # define KEY_BACKSPACE 0407 # define KEY_HELP 0553 /* help key */ #endif /* * Definitions for character graphics */ #if defined(SYSVCURSES) && !defined(ultrix) && !defined(hpux) && !defined(_AUX_SOURCE) && !defined(__osf__) && !defined(_AIX) # define CUR_FANCY_BOXES #endif #if defined(VMS) || defined(__convex__) || defined(sequent) || defined(pyr) #if !defined(cbreak) #define cbreak crmode #endif #endif #if defined(__svr4__) # define CURS_MACROS #endif #ifndef KEY_HELP #define KEY_HELP 0553 /* help key */ #endif /* * Request types.... More to be added later.. */ enum curtype { CUR_LABEL =1, CUR_PROMPT =2, CUR_PASSWD =3, CUR_CHOICE =4, CUR_ASKL =5, CUR_FNAME =6 }; typedef enum curtype Curreqtype; struct Requestitem_struct { char *prompt; char *stowage; Curreqtype thing; int chooseitem; char **choices; }; typedef struct Requestitem_struct Requestitem; #define max(A, B) ((A) > (B) ? (A) : (B)) #define min(A, B) ((A) < (B) ? (A) : (B)) /* * access functions */ #define CURgetScreen(a) ((a)->Screen) #define CURgetTerm(a) (STRget((a)->Termtype)) #define CURgetCLS(a) (STRget((a)->Clearscreen)) #define CURgetBell(a) (STRget((a)->AudibleBell)) #define CURgetHighon(a) (STRget((a)->Highlighton)) #define CURgetHighoff(a) (STRget((a)->Highlightoff)) #ifdef VMS #define CURsetScreen(a,b) ((b),(a)->Screen=stdscr) #else #define CURsetScreen(a,b) ((a)->Screen=(b)) #endif #define CURsetTerm(a,b) (STRset((a)->Termtype, (b))) #define CURsetCLS(a,b) (STRset((a)->Clearscreen,(b))) #define CURsetBell(a,b) (STRset((a)->AudibleBell,(b))) #define CURsetHighon(a,b) (STRset((a)->Highlighton,(b))) #define CURsetHighoff(a,b) (STRset((a)->Highlightoff,(b))) #define CURsetSIGTSTP(a,b) ((a)->sigtstp=(b)) #define CURsetSIGWINCH(a,b) ((a)->sigwinch=(b)) #ifdef HAVE_WSTANDOUT #define wboldout(win) (wstandout(win)) #define wboldend(win) (wstandend(win)) #else #define wboldout(win) (wattron(win, A_BOLD)) #define wboldend(win) (wattroff(win, A_BOLD)) #endif #define CURgetBox_ul(a) ((a)->Box_ul) #define CURgetBox_ur(a) ((a)->Box_ur) #define CURgetBox_ll(a) ((a)->Box_ll) #define CURgetBox_lr(a) ((a)->Box_lr) #define CURgetBox_vline(a) ((a)->Box_vline) #define CURgetBox_hline(a) ((a)->Box_hline) #define CURgetBox_tt(a) ((a)->Box_tt) #define CURgetBox_bt(a) ((a)->Box_bt) #define CURgetBox_lt(a) ((a)->Box_lt) #define CURgetBox_rt(a) ((a)->Box_rt) #define CURgetBox_ct(a) ((a)->Box_cr) CursesObj *CURnew(void); void CURinit(CursesObj *cur); void CURcenterline(CursesObj *cur, WINDOW *win, char *theline, int yval, int windowidth, boolean bright); void CURrightline(CursesObj *cur, char *theline, int yval); void CURenter(CursesObj *cur); void CURexit(CursesObj *cur); int CURgetstr(); int CURgetch(CursesObj *cur); void CURresize(CursesObj *cur); int CURoutchar(int c); int CURGetOneOption(CursesObj *cur, char *Title, char *OptionName, char *Response); void CURBeep(CursesObj *cur); void CURwenter(CursesObj *cur, WINDOW *win); void CURsetGraphicsChars(CursesObj *cur, char *termtype); int CUROldGetOneOption(CursesObj *cur, char *OptionName, char *Response); int CURwgetch(CursesObj *cur, WINDOW *window); int CURrequester(CursesObj *cur, char *Wintitle, Requestitem **items); int CURDialog(CursesObj *cur, char *Wintitle, char **Message); void CURgetYesorNo(CursesObj *cur, char *OptionName, char *Response); int CURRequest(CursesObj *cur, char *Wintitle, char **Prompts, char **Stowages); int CURChoice(CursesObj *cur, char *WinTitle, char **Choices, char *Prompt, int DefaultChoice); void CURbutton(CursesObj *cur, WINDOW *win, char *Label, boolean bright); void CURbox(CursesObj *cur, WINDOW *win, int height, int width); int CURwgetstr(CursesObj *cur, WINDOW *win, char *inputline, int maxlength, boolean hidden); #endif /* CURCURSES_H */ gopher/gopher/Makefile.in0000644000000000000000000001211710762617110012564 0ustar #******************************************************************** # $Author: jgoerzen $ # $Revision: 1.5 $ # $Date: 2002/01/11 15:55:59 $ # $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/gopher/Makefile.in,v $ # $State: Exp $ # # Paul Lindner, University of Minnesota CIS. # # Copyright 1991, 1992 by the Regents of the University of Minnesota # see the file "Copyright" in the distribution for conditions of use. #******************************************************************** # MODULE: Makefile # Makefile for gopher client #********************************************************************* # Revision History: # $Log: Makefile.in,v $ # Revision 1.5 2002/01/11 15:55:59 jgoerzen # * Using $(INSTALL) from subdirectories broke on systems # where install-sh was used because $(INSTALL) would always # resolve to ./install-sh. Replaced all instances of # $(INSTALL) with @INSTALL@ (autoconf would provide the correct # path) and removed INSTALL from Makefile.config. Reported # by Don Fike on Solaris 2.6. # * Updated our copy of install-sh with the one from # a current automake. # # Revision 1.4 2002/01/09 16:35:25 jgoerzen # More bugfixing. # # Revision 1.3 2002/01/09 15:54:48 jgoerzen # Modifications to assist with installations # # Revision 1.2 2002/01/08 17:36:14 jgoerzen # Finally builds! # # Changes: # # * config.h.in: rebuilt by autoheader # # * configure: rebuilt by autoconf # # * configure.in: # * Added REGEXLIBS test for NetBSD -- look for re_comp in -lcompat # * Added checkes for term.h, re_comp.h, regex.h # # * gopher/ourutils.c, gopher/CURcurses.c: Use term.h check # # * gopher/Makefile.in, gopherd/Makefile.in, gophfilt/Makefile.in: # * Use REGEXLIBS # # * gopher/globals.h, gopher/gopher.c: Remove sys_errlist # # * object/GSgopherobj.c: Removed #include, now use # "Regex.h" that has proper regex determining logic # # * object/Regex.h: Moved regex.h include to here. Make it conditional # based on configure test. Add conditional re_comp.h include. # # Revision 1.1.1.1 2000/08/19 00:28:56 jgoerzen # Import from UMN Gopher 2.3.1 after GPLization # # Revision 3.1 1996/01/04 18:29:18 lindner # Updates for autoconf # # Revision 3.14 1994/09/29 19:23:50 lindner # Make sure directories are made before installing # # Revision 3.13 1994/08/19 16:52:07 lindner # Make sure that gopher.o gets recompiled when patchlevel changes # # Revision 3.12 1994/07/19 19:29:40 lindner # Add INTLOPTS, add locales dir target for clean # # Revision 3.11 1994/07/03 21:35:42 lindner # Add upload option to code # # Revision 3.10 1994/05/26 19:41:14 lindner # Add yet another definition # # Revision 3.9 1994/04/25 20:47:22 lindner # Remove html stuff from menu # # Revision 3.8 1994/04/25 02:16:50 lindner # Fix for last line without newline # # Revision 3.7 1994/02/20 16:17:43 lindner # Add form object file # # Revision 3.6 1993/09/08 05:21:22 lindner # Add pager.c # # Revision 3.5 1993/08/04 22:06:35 lindner # Rebuild client if patchlevel.h changes # # Revision 3.4 1993/07/27 05:28:45 lindner # Mondo Debug overhaul from Mitra # # Revision 3.3 1993/04/15 21:28:25 lindner # Mods for remote access # # Revision 3.2 1993/02/19 21:03:13 lindner # Added stuff for global RC file. # # Revision 3.1.1.1 1993/02/11 18:02:57 lindner # Gopher+1.2beta release # # Revision 1.4 1993/02/09 21:34:47 lindner # Fixed install target # # Revision 1.3 1993/01/07 22:51:44 lindner # Added download.o to list of objects # # Revision 1.2 1992/12/31 04:01:06 lindner # moved html.c to html2.c for VMS # # Revision 1.1 1992/12/10 23:32:16 lindner # gopher 1.1 release # #********************************************************************/ include ../Makefile.config srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ OBJS = manager.o gopher.o globals.o ourutils.o cso.o \ subprocs.o html2.o CURcurses.o gopherrc.o \ download.o pager.o form.o upload.o CCFLAGS = $(OPT) $(DEBUGGING) -I.. -I$(top_srcdir) -I$(top_srcdir)/object \ $(INTLOPTS) $(CLIENTOPTS) -DGOPHERLIB=\"$(CLIENTLIB)\" \ -DGOPHERHELP=\"$(CLIENTLIB)/gopher.hlp\" \ -DGLOBALRC=\"$(CLIENTLIB)/gopher.rc\" \ -DREMOTERC=\"$(CLIENTLIB)/gopherremote.rc\" TARGET = gopher all: $(TARGET) .c.o: $(CC) $(CCFLAGS) -c $< globals.o : $(srcdir)/globals.h $(srcdir)/version.h ../object/libgopher.a: (cd ..; $(MAKE) $(MFLAGS) objects) $(TARGET) : $(OBJS) ../object/libgopher.a $(CC) $(LDFLAGS) -o $@ $(OBJS) ../object/libgopher.a @CLIENTLIBS@ @REGEXLIBS@ @LIBS@ install : all -mv $(CLIENTDIR)/$(TARGET) $(CLIENTDIR)/$(TARGET).old -mkdir $(CLIENTDIR) -mkdir $(CLIENTLIB) @INSTALL@ $(TARGET) $(CLIENTDIR) @INSTALL@ -d $(CLIENTLIB) @INSTALL@ gopher.rc $(CLIENTLIB) @INSTALL@ gopherremote.rc $(CLIENTLIB) @INSTALL@ gopher.hlp $(CLIENTLIB) clean: -rm -f $(TARGET) $(OBJS) *.out *~ core (cd locales; $(MAKE) $(MFLAGS) clean) $(OBJS): $(srcdir)/gopher.h $(top_srcdir)/conf.h globals.o: $(srcdir)/globals.h gopherrc.o: $(top_srcdir)/patchlevel.h manager.o: $(top_srcdir)/patchlevel.h gopher.o: $(top_srcdir)/patchlevel.h gopher/gopher/compile.com0000644000000000000000000000660710762617110012656 0ustar $ vg = 'f$verify(0)' $!******************************************************************** $! lindner $! 3.9 $! 1993/09/21 01:48:04 $! /home/mudhoney/GopherSrc/CVS/gopher+/gopher/compile.com,v $! Exp $! $! Paul Lindner, University of Minnesota CIS. $! $! Copyright 1991, 1992 by the Regents of the University of Minnesota $! see the file "Copyright" in the distribution for conditions of use. $!******************************************************************** $! MODULE: compile.com $! compiling script for VMS gopher client $!********************************************************************* $! Revision History: $! compile.com,v $! Revision 3.9 1993/09/21 01:48:04 lindner $! Fix for alpha and curses $! $! Revision 3.8 1993/09/08 05:21:24 lindner $! Add pager.c $! $! Revision 3.7 1993/08/25 02:58:53 lindner $! Fix from Fote for vms make procedures $! $! Revision 3.6 1993/08/19 20:22:21 lindner $! mods for openvms $! $! Revision 3.5 1993/08/16 18:48:33 lindner $! Alpha and DECC mods $! $! Revision 3.4 1993/08/05 03:24:37 lindner $! Changes for CMUIP and NETLIB $! $! Revision 3.3 1993/06/22 06:12:53 lindner $! mods for DEC C $! $! Revision 3.2 1993/05/20 06:02:51 lindner $! updates for VMS compatibility $! $! Revision 3.1.1.1 1993/02/11 18:02:56 lindner $! Gopher+1.2beta release $! $! Revision 1.2 1993/01/07 22:51:06 lindner $! Added download.c $! $! Revision 1.1 1992/12/31 06:08:20 lindner $! Initial revision $! $! $!********************************************************************/ $! $ IF P1 .EQS. "" $ THEN $ type/nopage sys$input: Usage: @compile UCX @compile WOLLONGONG @compile MULTINET @compile CMUIP @compile NETLIB @compile TCPWARE $ exit $ ENDIF $ IF P2 .EQS. "DEBUG" $ THEN $ write sys$output "Compiling client with DEBUG..." $ debug := "/debug/noopt" $ ELSE $ debug := "" $ ENDIF $! $ ON CONTROL_Y THEN GOTO CLEANUP $ ON ERROR THEN GOTO CLEANUP $! $ IF P1 .eqs. "TCPWARE" $ THEN $ write sys$output "Compiling client with UCX emulation..." $ transport := "UCX" $ ELSE $ transport := "''P1'" $ ENDIF $! $ IF f$trnlnm("VAXCMSG") .eqs. "DECC$MSG" .or. - f$trnlnm("DECC$CC_DEFAULT") .eqs. "/DECC" $ THEN $ vg1 = f$verify(1) $! DECC: $ define/nolog C$USER_INCLUDE [-],[-.object] $ define/nolog DECC$USER_INCLUDE [-],[-.object] $ vg1 = 'f$verify(0)' $ IF transport .eqs. "UCX" $ THEN $ vg1 = f$verify(1) $ cc := cc/prefix=(all,except=(setlocale))- /warning=(disable=implicitfunc)- /define=('transport'=1,__VMS_CURSES)'debug' $ vg1 = 'f$verify(0)' $ ELSE $ vg1 = f$verify(1) cc := cc/prefix=(all,except=(connect,gethostbyname,htons,inet_addr,- setsockopt,socket,setlocale))- /warning=(disable=implicitfunc)- /define=('transport'=1,__VMS_CURSES)'debug' $ vg1 = 'f$verify(0)' $ ENDIF $ ELSE $ vg1 = f$verify(1) $! VAXC: $ cc := cc/include=([-],[-.object])- /define=('transport'=1)'debug' $ vg1 = 'f$verify(0)' $ ENDIF $ vg1 = f$verify(1) $! $ cc cso.c $ cc curcurses.c $ cc globals.c $ cc gopher.c $ cc gopherrc.c $ cc html2.c $ cc manager.c $ cc ourutils.c $ cc subprocs.c $ cc download.c $ cc pager.c $ cc form.c $ cc upload.c $! $ vg1 = 'f$verify(0)' $ IF P2 .eqs. "DEBUG" $ THEN $ vg1 = f$verify(1) $ rename/nolog/noconf *.obj; *.objd $ vg1 = 'f$verify(0)' $ ENDIF $! $ CLEANUP: $ vg1 = f$verify(vg) $exit gopher/gopher/cso.c0000644000000000000000000001250210762617110011445 0ustar /******************************************************************** * $Author: s2mdalle $ * $Revision: 1.2 $ * $Date: 2001/01/03 22:27:10 $ * $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/gopher/cso.c,v $ * $State: Exp $ * * Paul Lindner, University of Minnesota CIS. * * Copyright 1991, 1992 by the Regents of the University of Minnesota * see the file "Copyright" in the distribution for conditions of use. ********************************************************************* * MODULE: cso.c * Functions to support CSO qi/ph servers ********************************************************************* * Revision History: * $Log: cso.c,v $ * Revision 1.2 2001/01/03 22:27:10 s2mdalle * Inclusion of the new header cso.h that holds prototypes for this module. * * Revision 1.1.1.1 2000/08/19 00:28:56 jgoerzen * Import from UMN Gopher 2.3.1 after GPLization * * Revision 3.14 1995/11/03 21:18:16 lindner * ANSIfication * * Revision 3.13 1994/05/19 14:07:22 lindner * use fast malloc on VMS VAXC * * Revision 3.12 1994/05/17 05:47:53 lindner * Massive internationalization change * * Revision 3.11 1994/05/14 04:13:38 lindner * Internationalization... * * Revision 3.10 1994/03/04 23:35:17 lindner * fix cso requester to be nice and big * * Revision 3.9 1994/02/20 16:30:36 lindner * Use FileIO routines for fetching fields * * Revision 3.8 1994/01/20 06:47:01 lindner * Fix params for showfile * * Revision 3.7 1993/10/22 20:21:02 lindner * misc fixes * * Revision 3.6 1993/10/11 04:44:09 lindner * Add early searching.. tag for CSO, better ui * * Revision 3.5 1993/10/07 05:11:22 lindner * Better memory management * * Revision 3.4 1993/07/07 19:42:15 lindner * fix for cancel from cso screen * * Revision 3.3 1993/06/08 06:31:01 lindner * Fixed infamous cached cso search, added fishing mode * * Revision 3.2 1993/05/20 06:00:38 lindner * Better cso support, fixed bug with unchangable search * * Revision 3.1.1.1 1993/02/11 18:02:57 lindner * Gopher+1.2beta release * * Revision 1.4 1993/01/08 19:43:01 lindner * dialog box cancels automatically if the user doesn't enter anything. * * Revision 1.3 1992/12/31 05:53:01 lindner * Mods for VMS * * Revision 1.2 1992/12/28 19:02:58 lindner * Changed field selection criteria to be based on "Lookup" * not "Indexed". Removed old dead static variables. * Changed the name of the popup box from "Ph Query" to the * name of the gopher item. * * Revision 1.1 1992/12/10 23:32:16 lindner * gopher 1.1 release * *********************************************************************/ #include "gopher.h" #include "fileio.h" #include "Malloc.h" #include "cso.h" void do_cso(GopherStruct *ZeGopher) { char inputline[1024], *cp; int sockfd, len, numfields=0; char *Fields[50]; char *Responses[50]; char query[512]; int i; FileIO *sock; Draw_Status(Gtxt("Fetching Fields...",87)); refresh(); /*** Fetch the indexed fields from the server ***/ if ((sockfd = GSconnect(ZeGopher)) <0) { check_sock(sockfd, GSgetHost(ZeGopher), GSgetPort(ZeGopher)); return; } sock = FIOopenfd(sockfd, TRUE); FIOwritestring(sock, "fields\r\n"); while (1) { len = FIOreadline(sock, inputline, 1024); twirl(); if ((len <= 0) || (strncmp(inputline, "200", 3)==0)) break; cp = inputline; if (strstr(inputline, "Lookup") == NULL) continue; cp = strrchr(inputline,':'); *cp = '\0'; cp--; cp = strrchr(inputline, ':') + 1; /*** Put name at the top ***/ if (strcmp(cp, "name") == 0 && numfields != 0) { Fields[numfields] = Fields[0]; Fields[0] = strdup(cp); } else Fields[numfields] = strdup(cp); Responses[numfields] = (char *) malloc(sizeof(char) * COLS); *Responses[numfields] = '\0'; *(Responses[numfields]+1) = '\0'; numfields++; } Fields[numfields] = NULL; Responses[numfields] = NULL; FIOwritestring(sock, "quit\r\n"); /** Read the stupid bye message **/ FIOreadline(sock, inputline, 1024); FIOclose(sock); /*** Do cso stuff until user presses CTRL-G ***/ while (1) { clear(); Draw_Status("..."); refresh(); if (CURRequest(CursesScreen, GSgetTitle(ZeGopher), Fields, Responses) < 0) { /*** Free the memory that we just allocated ***/ for (i=0; i 6) GSsetPath(ZeGopher, query); else { for (i=0; i * Simple prototypes for functions in cso.c */ #define CSO_H 1 void do_cso(GopherStruct *ZeGopher); gopher/gopher/download.c0000644000000000000000000002531713545542211012501 0ustar /******************************************************************** * $Author: jgoerzen $ * $Revision: 1.5 $ * $Date: 2002/01/08 20:57:49 $ * $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/gopher/download.c,v $ * $State: Exp $ * * Paul Lindner, University of Minnesota CIS. * * Copyright 1991, 1992 by the Regents of the University of Minnesota * see the file "Copyright" in the distribution for conditions of use. ********************************************************************* * MODULE: download.c * Functions relating to downloading data ********************************************************************* * Revision History: * $Log: download.c,v $ * Revision 1.5 2002/01/08 20:57:49 jgoerzen * Modified to use HAVE_STRERROR * * Revision 1.4 2002/01/08 18:05:33 jgoerzen * * download.c: Added cast to long for some *printf's * * Revision 1.3 2001/01/03 22:27:44 s2mdalle * Several compiler warning fixes. * * Revision 1.2 2000/12/27 21:23:31 s2mdalle * Added a few #include's for compilation warnings, and changed a few * long args within sprintf's %d => %ld * * Revision 1.1.1.1 2000/08/19 00:28:56 jgoerzen * Import from UMN Gopher 2.3.1 after GPLization * * Revision 3.26 1995/11/03 21:18:16 lindner * ANSIfication * * Revision 3.25 1994/11/17 18:05:52 lindner * Update text string numbers * * Revision 3.24 1994/11/17 18:02:28 lindner * Add estimates for download time * * Revision 3.23 1994/10/13 05:29:38 lindner * Compiler complaint fixes * * Revision 3.22 1994/07/25 15:01:23 lindner * Add parens to illegal chars * * Revision 3.21 1994/07/25 02:54:18 lindner * VMS updates * * Revision 3.20 1994/07/03 23:11:23 lindner * Add internal download feature * * Revision 3.19 1994/05/17 05:47:54 lindner * Massive internationalization change * * Revision 3.18 1994/05/14 04:13:39 lindner * Internationalization... * * Revision 3.17 1994/05/06 02:26:31 lindner * Fix for binhex downloads on vms and use dump command for binary files * * Revision 3.16 1994/04/25 20:48:19 lindner * Proper casts * * Revision 3.15 1994/04/01 04:48:10 lindner * Use FIOsystem() for downloading * * Revision 3.14 1993/11/29 01:10:26 lindner * Do not let user attempt to download an 'i' (Info) menu item. (Beckett) * * Revision 3.13 1993/10/26 18:44:12 lindner * Fix for people trying to download the help file * * Revision 3.12 1993/10/07 05:11:00 lindner * Fixed spawned process error checking on Unix, add third arg to Save_File * * Revision 3.11 1993/09/21 03:38:50 lindner * change getcwd to getwd * * Revision 3.10 1993/09/03 03:30:40 lindner * The test for spawn success should be !system(). Restore initial * default directory, and related mods, to circumvent problems in the * logic of this module. These are preliminary mods, simply to make it * actually work. They do not yet cache temporary files under every * circumstance in which the 'D' command might be used, but do for the * typical patterns of use. (F.Macrides) * * Revision 3.9 1993/08/16 17:57:58 lindner * Fix for sys$scratch for VMS * * Revision 3.8 1993/08/09 20:39:55 lindner * fix for VMS * * Revision 3.7 1993/07/30 17:36:54 lindner * More secure download in /tmp * * Revision 3.6 1993/07/29 17:21:05 lindner * eliminate non-used variables * * Revision 3.5 1993/07/23 04:36:03 lindner * LocalFile mods * * Revision 3.4 1993/07/20 23:11:25 lindner * downloading now caches the downloaded file too * * Revision 3.3 1993/04/30 16:01:19 lindner * kermit binary mods * * Revision 3.2 1993/03/24 16:57:37 lindner * Fixes for new SaveFile() * * Revision 3.1.1.1 1993/02/11 18:02:57 lindner * Gopher+1.2beta release * * Revision 1.4 1993/01/14 21:59:30 lindner * Filenames generated for zmodem now are a bit better.. should work better * on VMS * * Revision 1.3 1993/01/12 20:42:04 lindner * Added stuff for VMS, also changed text download for VMS from * cat to type * * Revision 1.2 1993/01/11 19:26:56 lindner * Mods to make it work under VMS * * Revision 1.1 1993/01/07 22:47:20 lindner * Initial revision * * *********************************************************************/ #include "gopher.h" #include "Stat.h" #include "download.h" #ifdef HAVE_TIME_H # include #endif /* HAVE_TIME_H */ #ifdef HAVE_UNISTD_H # include #endif /* HAVE_UNISTD_H */ #ifdef HAVE_SYS_PARAM_H # include #endif #include "fileio.h" /* For FIOsystem() */ static char *DLnames[] = { "Zmodem", "Ymodem", "Xmodem-1K", "Xmodem-CRC", "Kermit", "Text", NULL }; static char *DLcmds[] = { /* Cmds for ascii files: FILE */ "sz ", "sb ", "sx -k ", "sx ", "kermit -q -s ", #ifdef VMS "type ", #else "cat -v ", #endif NULL }; static char *DLcmdB[] = { /* Cmds for binary files */ "sz ", "sb ", "sx -k ", "sx ", "kermit -q -i -s ", #ifdef VMS "dump ", #else "cat -v ", #endif NULL }; void Download_file(GopherObj *gs) { int choice; char tmpfilename[512], *cp; char command[512]; char *curcwd; int start, end; struct stat buf; #if defined(HAVE_GETCWD) && !defined(HAVE_GET_CURRENT_DIR_NAME) curcwd = (char *) malloc(MAXPATHLEN + 2); if (!curcwd) { CursesErrorMsg("Out of memory."); return; } #endif switch (GSgetType(gs)) { case A_DIRECTORY: case A_CSO: case A_ERROR: case A_INDEX: case A_TELNET: case A_TN3270: case A_INFO: case A_APP: CursesErrorMsg(Gtxt("Sorry, can't download that!",150)); return; } choice = CURChoice(CursesScreen, GSgetTitle(gs), DLnames, Gtxt("Choose a download method",74), -1); if (choice == -1) return; /*** Get a reasonable tmp file name ***/ cp = GSgetPath(gs); if (cp != NULL) { if ((cp = strrchr(cp,'/')) != NULL) strcpy(tmpfilename, cp+1); else strcpy(tmpfilename,GSgetTitle(gs)); } else { strcpy(tmpfilename,GSgetTitle(gs)); } #ifdef VMS VMSfile(tmpfilename); #else UNIXfile(tmpfilename); #endif for (cp=tmpfilename; *cp != '\0'; cp++) { switch (*cp) { case ' ': case '\"': case '\'': case '(': case ')': *cp = '_'; } } #ifdef HAVE_GETCWD getcwd(curcwd, MAXPATHLEN); #else #ifdef HAVE_GET_CURRENT_DIR_NAME curcwd = get_current_dir_name(); #else getwd(curcwd); #endif #endif /* HAVE_GET_CURRENT_DIR_NAME */ #ifdef VMS if (chdir("SYS$SCRATCH")!=0) { CursesErrorMsg(Gtxt("Can't write to SYS$SCRATCH!",69)); return; } #else if (chdir("/tmp")!=0) { CursesErrorMsg(Gtxt("Can't write to the /tmp directory!",70)); return; } #endif /** Make sure we don't overwrite an existing file ... **/ while (stat(tmpfilename, &buf) == 0) { int len = strlen(tmpfilename); if (tmpfilename[len-1] == '-') { tmpfilename[len] = tmpfilename[len] + 1; } else strcat(tmpfilename, "-1"); } /*** Retrieve the file ***/ Save_file(gs, tmpfilename, NULL); /*** Check to see which method they're using to download ***/ if (stat(tmpfilename, &buf) < 0) { CursesErrorMsg(Gtxt("File didn't transfer successfully",88)); return; } /*** Now start the download ... ***/ if (GSisText(gs, NULL)) strcpy(command, DLcmds[choice]); else strcpy(command, DLcmdB[choice]); strcat(command, tmpfilename); CURexit(CursesScreen); printf(Gtxt(" Downloading %d bytes",233), (int)buf.st_size); printf(Gtxt(" 1200bps: %ld minutes\n",234), (long) (buf.st_size/(120*60))); printf(Gtxt(" 2400bps: %ld minutes\n",235), (long) (buf.st_size/(240*60))); printf(Gtxt(" 14400bps: %ld minutes\n\n",236), (long) (buf.st_size/(1440*60))); if (choice == 5) { printf(Gtxt("Start your capture now...\n\n",171)); printf(Gtxt("Press when you're ready\n",121)); fflush(stdout); getchar(); } else { printf(Gtxt("Start your download now...\n",172)); fflush(stdout); } start = time(NULL); if (FIOsystem(command)) printf(Gtxt("\nDownload could not be completed, sorry... \n",183)); else { end = time(NULL); if (end == start) end++; printf(Gtxt("\nDownload Complete. %d total bytes, %d bytes/sec\n",182), (int)buf.st_size, ((int)buf.st_size)/(end-start)); } unlink(tmpfilename); chdir(curcwd); printf(Gtxt("Press to continue",121)); fflush(stdout); getchar(); CURenter(CursesScreen); #if defined(HAVE_GETCWD) || !defined(HAVE_GET_CURRENT_DIR_NAME) free(curcwd); #endif } #ifndef VMS #include "Dirent.h" void BuiltinDownload(char *dirname) { char *names[99]; DIR *thedir; struct dirent *entry = NULL; struct stat buf; int fcount=0, choice; char *tmppath; GopherObj *gs; #if defined(HAVE_GETCWD) && !defined(HAVE_GET_CURRENT_DIR_NAME) tmppath = (char*)malloc(MAXPATHLEN * 3 + 2); if ( !tmppath ) { CursesErrorMsg("Cannot allocate memory"); return; } #endif thedir = opendir(dirname); chdir(dirname); if (thedir == NULL) { CursesErrorMsg("Cannot Open the directory"); return; } for (entry = readdir(thedir); entry != NULL; entry = readdir(thedir)) { stat(entry->d_name, &buf); if (*(entry->d_name) != '.' && !S_ISDIR(buf.st_mode)) names[fcount++] = strdup(entry->d_name); } names[fcount] = NULL; choice = CURChoice(CursesScreen, "Choose a File to Download", names, "Choose a File to Download", 0); if (choice ==-1) return; gs = GSnew(); GSplusnew(gs); GSsetPath(gs, names[choice]); #ifdef HAVE_GETCWD getcwd(tmppath,MAXPATHLEN); #else #ifdef HAVE_GET_CURRENT_DIR_NAME tmppath = get_current_dir_name(); if ( sizeof(tmppath) <= (strlen(tmppath) + strlen(names[choice]) + 1) ) tmppath = realloc(tmppath,sizeof(tmppath) + strlen(names[choice] + 1)); if ( !tmppath ) { CursesErrorMsg("Out of memory"); return; } #else getwd(tmppath); #endif #endif strcat(tmppath, "/"); strcat(tmppath, names[choice]); GSsetLocalFile(gs, tmppath); GSsetLocalView(gs, "application/octet-stream"); GSsetTitle(gs, names[choice]); GSsetType(gs, '9'); GSaddView(gs, "application/octet-stream", "", 0); Download_file(gs); for (fcount = 0; names[fcount] != NULL;) { free(names[fcount++]); } #if defined(HAVE_GETCWD) || !defined(HAVE_GET_CURRENT_DIR_NAME) free(tmppath); #endif } #else void BuiltinDownload() { ; } #endif gopher/gopher/download.h0000644000000000000000000000043110762617110012473 0ustar /* download.h * Written by David Allen * Simple prototypes for functions in download.c */ #define DOWNLOAD_H 1 #ifndef OURUTILS_H # include "ourutils.h" #endif /* OURUTILS_H */ void Download_file(GopherObj *gs); void BuiltinDownload(char *dirname); gopher/gopher/form.c0000644000000000000000000003607210762617110011634 0ustar /******************************************************************** * $Author: jgoerzen $ * $Revision: 1.3 $ * $Date: 2001/01/17 21:48:05 $ * $Source: /home/jgoerzen/tmp/gopher-umn/gopher/head/gopher/form.c,v $ * $State: Exp $ * * Paul Lindner, University of Minnesota CIS. * * Copyright 1991, 92, 93, 94 by the Regents of the University of Minnesota * see the file "Copyright" in the distribution for conditions of use. ********************************************************************* * MODULE: form.c * Form definition and management functions ********************************************************************* * Revision History: * $Log: form.c,v $ * Revision 1.3 2001/01/17 21:48:05 jgoerzen * Many fixes and tune-ups. Now compiles cleanly with -Wall -Werror! * * Revision 1.2 2001/01/03 22:28:24 s2mdalle * Code cleanups, compiler warning fixes * * Revision 1.1.1.1 2000/08/19 00:28:56 jgoerzen * Import from UMN Gopher 2.3.1 after GPLization * * Revision 3.9 1995/11/03 21:18:17 lindner * ANSIfication * * Revision 3.8 1995/05/01 03:42:48 lindner * Fixes for NetBSD * * Revision 3.7 1994/07/03 23:10:57 lindner * fix forms.. * * Revision 3.6 1994/05/19 14:07:24 lindner * use fast malloc on VMS VAXC * * Revision 3.5 1994/04/01 02:24:56 lindner * Fix return types * * Revision 3.4 1994/03/08 15:55:05 lindner * gcc -Wall fixes * * Revision 3.3 1994/03/04 23:39:50 lindner * Fix for log entries * * Revision 3.2 1994/03/04 23:36:32 lindner * bug fixes. * * Revision 3.1 1994/02/20 16:15:44 lindner * New form definition and management functions * * *********************************************************************/ #include "form.h" #include "String.h" #include "GSgopherobj.h" #include "BLblock.h" #include "Malloc.h" #include "CURcurses.h" #include "gopher.h" /** Make a new item... **/ ITEM * ITEMnew(void) { ITEM *temp; temp = (ITEM*) malloc(sizeof(ITEM)); temp->type = ITEM_UNINIT; temp->label = STRnew(); temp->response = STRnew(); temp->chooseitem = -1; temp->choices = STAnew(3); return(temp); } /* * Clear out a specific item */ void ITEMinit(ITEM *item) { item->type = ITEM_UNINIT; STRinit(item->label); STRinit(item->response); STAinit(item->choices); item->chooseitem=0; } /* * Copy an item */ ITEM* ITEMcpy(ITEM *dest, ITEM *orig) { dest->type = orig->type; STRset(dest->label, STRget(orig->label)); STRset(dest->response, STRget(orig->response)); dest->chooseitem = orig->chooseitem; STAcpy(dest->choices, orig->choices); return(dest); } /* * Nuke a defined ITEM */ void ITEMdestroy(ITEM *item) { STRdestroy(item->label); STRdestroy(item->response); STAdestroy(item->choices); free(item); } /* * Add an item to the list of choices.. */ void ITEMpushChoice(ITEM *item, char *choice) { String *str; str = STRnew(); STRset(str, choice); STApush(item->choices, str); STRdestroy(str); } /************************************************************************* * Form definition routines.. Pretty swanky.. */ FORM* FORMfromASK(GopherObj *gs) { int Asknum; Blockobj *bl; char askline[256]; char *defaultval; #if 0 int i; char ** responses = NULL; ITEM *item; #endif /* 0 */ FORM *form; GSgetginfo(gs, TRUE); bl = GSfindBlock(gs, "ASK"); if (bl == NULL) return(NULL); form = FORMnew(BLgetNumLines(bl)); for (Asknum=0; Asknum maxpromptwidth) maxpromptwidth = strlen(ITEMgetPrompt(item)); } if (totalprompts != 0 && (totalprompts % pagesize) == 0) numforms ++; } if (numforms > 1) numprompts = pagesize; else numprompts = totalprompts; if (numprompts == 0) { return(-1); } maxlength -= (maxpromptwidth+1); tempwin = newwin(6 + numprompts, COLS-2, (LINES-(6+numprompts))/2,1); CURwenter(cur,tempwin); while (currentform < numforms) { if (currentform == (numforms-1)) { numprompts = totalprompts - (pagesize * currentform); } else { numprompts = pagesize ; } wstandend(tempwin); CURbox(cur,tempwin, 6+numprompts, COLS-2); currentfield = 0; /*** Add the window title, centered ***/ if (Wintitle != NULL) { /** Trim window title to fit in the window **/ if (strlen(Wintitle) > COLS-2) { strncpy(TrimmedTitle, Wintitle, COLS-2); TrimmedTitle[COLS-5] = '.'; TrimmedTitle[COLS-4] = '.'; TrimmedTitle[COLS-3] = '.'; TrimmedTitle[COLS-2] = '\0'; } else strcpy(TrimmedTitle, Wintitle); /** Put the title, bold **/ wmove(tempwin, 0,(COLS -2 - strlen(TrimmedTitle))/2); wstandout(tempwin); waddstr(tempwin, TrimmedTitle); wstandend(tempwin); } /** Add the prompts and typing area **/ for (i=0; i