tua-4.3.orig/0040755000175100001440000000000007103123744011435 5ustar mduserstua-4.3.orig/README0100644000175100001440000000763706105403754012332 0ustar mdusersThis is TUA - "The Uucp Analyzer". Its purpose is to collect all the information that the Honey Dan Ber or the Taylor versions of the UUCP package put in their various logs, typically located in a few subdirectories on /usr/spool/uucp. It then builds up a clear report, showing data from several different points of view. It may even become an interactive customizable application by linking in the TCL (Tool Command Language) support. It is fast, because all the data are maintained in binary trees; and it has no arbitrary restriction on the size of the logs it can eat. Very large sites can use the SoftChip Btree Library for faster searches. It can maintain an history of the connections with the various sites your machine is connected to, and a last-year summary of the amount of data you received and transmitted, month-by-month. You can get, in a chart form, the status of the usage of all your serial port, so you can easily say when your modem is available for a new link. I developed it because the other analyzer I looked at didn't satisfy my needs. So I picked up their best features, and put all that stuff together. I took care of portability and correctness (I hope ;-). It uses the GNU Autoconf facility, so it is easily configured for your machine. No, you don't need GNU Autoconf: I need it to build a Bourne Shell Script called ``configure'', the "real" autoconfig tool, distributed with the package. TUA is known to work on NeXTs, SCOs, Linuxes, Xenixes, ... Give it a try, and feel free to modify it. The only thing I ask you is to send me all your enhancements, or bug fixes, so I can include them in some future releases. PLEASE, do not post or spread yourself patches... I don't like the "dialects" proliferation. Include in your message (suggestions, bug reports, patches...) the machine and OS type you are using, so I can eventually customize TUA for your environment. BTW, "TUA" in italian means "yours": "questa cosa e' TUA" can be translated with "this stuff is yours". So even in the name this package reflects the spirit which inspired me in writing it. I chose to cover TUA with the GNU General Public License right to protect this intention. * COMPILATION To compile it, first of all you must run "configure". More info about `configure' and its options are contained in the file `INSTALL'. `configure' will check your machine and operating system to extract some information. These additional option are recogized by configure (defaults are marked with an asterisk): `--with-glob' * `--without-glob' Add/Remove Glob Aliases feature `--with-readline' `--without-readline' * Add/Remove GNU Readline support `--with-softchip' `--without-softchip' * Add/Remove SoftChip BTree support `--with-tcl' `--without-tcl' * Add/Remove TCL support `--enable-taylor' * `--disable-taylor' Enable/Disable Taylor Uucp support `--enable-hdb' `--disable-hdb' * Enable/Disable HDB Uucp support When it is done, give a look to the `Makefile' and edit it to satisfy your needs, then edit `src/customize.h' following its directives. Then give a look at `lib/TUA.pcd'. It contains the hourly telephone costs division applied in several coutries. If you find your country already there, simply change the default = "name_of_your_country"; line near the top of the file as needed. Otherwise, add it yourself, and remember to send back to me your change; remember to change the "default" line as above. Refer to the manual for further information about this file. Just to let you know, TUA (release 3.3, the first released on usenet) ate and digested a 178-days-long logs, 4641Kb of /usr/spool/uucp/.Log and 1650Kb of /usr/spool/uucp/.Admin/xferstats with this timing: real 4:13.9 user 2:33.0 sys 11.8 on my poor 16Mhz 386 running Xenix 2.3.1, producing 217Kb of reports, with --command-lists as the only command line option. Thanks a lot, Emanuele (Lele for everyday use) Gaifas (Gaifax on the net) lele@eclipse.it tua-4.3.orig/NEWS0100644000175100001440000000140506111146753012134 0ustar mdusersVersion 4.3 - 16 February 1996 * As usual, bug fixes. * The PCD cost is now calculated per unit of time, not per second: saying 123/115 means the cost is 123 for each unit of 115 seconds, no matter if shorter than that. Before TUA applied fractional costs, but modern telephone companies are smarter than that :-! Version 4.2 - February 1996 * International! by the use of the GNU gettext 0.10 package. * Support for fixed phone cost: you can now specify both the cost per call and the cost per second in your PCD country definition. * Several bug fixed. * Better (but not perfect, I guess) support for Taylor Uucp configured with HDB logs (with TUA, there are ever less reasons to do it ;-) * The TCL initialization file is searched in the library directory. tua-4.3.orig/COPYING0100644000175100001440000004311106105405161012462 0ustar mdusers 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) 19yy 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) 19yy 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. tua-4.3.orig/ChangeLog0100644000175100001440000000263506111147201013202 0ustar mdusersFri Feb 16 17:12:02 1996 Lele Gaifax * configure.in (VERSION): Release 4.3. * Makefile.in (dist): Use lowercase chars for the name of the tarfile. * Repristinated some ChangeLogs, screwed up by an improper use of CVS... Mon Feb 5 12:02:07 1996 Lele Gaifax * configure.in (VERSION): Updated copyright. Release 4.2. * Makefile.in (DISTFILES): Distribute NEWS. * Updated copyright strings and FSF's address in all sources. * acconfig.h: likewise. * configure.in: Define USE_GLOB_ALIASES, not GLOB_ALIASES. Mon Feb 5 11:56:08 1996 Andreas Jaeger * README: Corrected various typos. Sun Jan 14 14:36:00 1996 Lele Gaifax * Makefile.in (TAR): Defined. (dist): Use it. (DISTFILES): Distribuite ChangeLog.O and stamp-h.in Sat Jan 13 15:59:11 1996 Lele Gaifax * Makefile.in (distdir): Corrected: use VERSION, not RELEASE. (DISTFILES): MANIFEST dropped. * INSTALL: NLS configure options added. * Makefile.in (DISTFILES): Distribute ABOUT-NLS. * aclocal.m4: Updated with gettext-0.10 version. Thu Jul 27 20:25:57 1995 Lele Gaifax * Going International! For this reason the location of many files has changed, and I started a new ChangeLog. * configure.in: Adapted to use gettext. Bump VERSION to 4.1. * patchlevel.h: dropped. tua-4.3.orig/ChangeLog.O0100644000175100001440000007606606076003722013421 0ustar mdusersFri Mar 3 12:16:48 1995 Lele Gaifax * Release 4.02. * configure.in: updated for Autoconf 2 * Updated copyright and my e-mail address. * patchlevel.h: bump up patch level. Fri Nov 4 10:37:45 1994 Lele Gaifax (lele@nautilus.eclipse.inet.it) * tua.pcd ("switzerland"): submitted by David Frey Wed Sep 28 09:49:48 1994 Lele Gaifax (lele@nautilus.sublink.org) * tua.pcd ("spain"): corrected. Thanx Ramon Martinez Wed Jun 15 18:50:54 1994 Lele Gaifax (lele@nautilus.sublink.org) * tua.pcd (spain): added. Thanx Jacques Bulchand Gidumal Sun May 29 17:16:01 1994 Lele Gaifax (lele@nautilus.sublink.org) * Release 4.01. * configure.in (--enable-hdb): check for presence of Taylor Uucp. Sat May 28 12:37:19 1994 Lele Gaifax (lele@nautilus.sublink.org) * configure.in: added AC_CHECKING actions. Tue May 24 12:00:54 1994 Lele Gaifax (lele@nautilus.sublink.org) * INSTALL: updated with a newer one from autoconf 1.11 * README: recall the additional options to configure, as GNU Standards suggest. * reports.c (print_the_system_summary): use float for the average calls a day. * tua.pcd (germany): updated. Thanx Frank Bartels * Makefile.in (patch): produce unidiff patches. * tmparse.c (parse_date): moved declaration of lt. * INSTALL: integrated with the new options. * configure.in: added -enable-{taylor|hdb} options. Sun May 22 16:11:02 1994 Lele Gaifax (lele@nautilus.sublink.org) * configure.in: added -with-{glob|tcl|readline|softchip} options. * Configure: updated to autoconf 1.11. * reports.c (print_the_command): corrected a typo. Tue Jan 25 11:53:59 1994 Lele Gaifax (lele@nautilus.sublink.org) * Makefile.in (DOCS): moved README at the top of the list, so the netters won't complain again about understanding what the shar package contains as soon as possible. My apologies for any trouble my last post on alt.sources caused you. Tue Jan 25 11:51:56 1994 Michel Cerdini (cerdini@zen.gatelink.fr.net) * tua.pcd (france): updated (+100%!!) Wed Dec 22 15:40:30 1993 Lele Gaifax (lele@nautilus.sublink.org) * Release 4.0. Mon Dec 20 12:20:03 1993 Dr Eberhard W Lisse (el@lisse.NA) * tua.pcd (namibia): updated. Mon Dec 13 21:09:27 1993 Michel Cerdini (cerdini@zen.gatelink.fr.net) * tua.pcd (france): updated. Mon Dec 13 10:40:48 1993 Lele Gaifax (lele@nautilus.sublink.org) * Release 3.20. I'm too busy with my real work to spend time "assembling" release 4.0. I'll do it probably before january. Fri Dec 10 16:28:32 1993 Lele Gaifax (lele@nautilus.sublink.org) * tua.h: added decls for rint() and modf(). * pcdl.[ch]: Added a "decimals" field to the country info. I will use it to print the cost in the report. * pcdl_gram.y: Accept a "decimals = 4;" statement. * reports.c (print_the_system_summary): print more decimal digits if the country info say this. Wed Dec 1 09:25:32 1993 Lele Gaifax (lele@nautilus.sublink.org) * Release 3.19. Sun Nov 28 17:10:11 1993 Lele Gaifax (lele@nautilus.sublink.org) * pcdl_gram.y: accept also floats in the cost statement, eg "cost 1 = 12.32;", "cost 1 = 200 / 11.5;". Fri Nov 26 09:54:16 1993 Lele Gaifax (lele@nautilus.sublink.org) * Release 3.18. Wed Nov 24 16:06:23 1993 Lele Gaifax (lele@nautilus.sublink.org) * phonesw.c: renamed get_phone_price to get_phone_timeband. * PCD stuff: each timeband now may have a real cost, expressed in term of units per second. Each country has a currency. With these info TUA will calculate an approx of the real cost of all your calls. Thanx to Michel Cerdini for this suggestion. He suggested me a way to handle those situation where you pay a fixed amount for each call, indipendently from how long it last. The PCD stuff is able to handle this, specifying a cost in the form cost LOW = 150/0; but TUA doesn't handle it correctly yet, and I think it will be hard... * tua.h: added PHONECALLS to the system info struct. Tue Nov 23 10:54:52 1993 Michel Cerdini (cerdini@zen.gatelink.fr.net) * tua.pcd: FRANCE new entry. Sun Nov 14 19:34:10 1993 Lele Gaifax (lele@nautilus.sublink.org) * Release 3.17. * Makefile.in: use makeinfo --no-split to build tua.info. * tua.c: new option --list-countries. List the countries and exit. * pcdl_gram.y: if --list-countries, print the names of the countries while parsing, without stopping if the right country is found. Sat Nov 13 16:35:53 1993 Lele Gaifax (lele@nautilus.sublink.org) * pcdl.c: substantially improved. Now check for overlapping region too. * pcdl_gram.y: do not declare yyerror static. * tua.c: new option --print-country that calls pcdl_print_country and exits. * pcdl.c (pcdl_print_country): new function. Print in human form the country information. * pcdl stuff: changes to the parser to allow the specification of the time slots as a list of values, separated by commas. Wed Nov 10 14:21:39 1993 Lele Gaifax (lele@nautilus.sublink.org) * Release 3.16. * tua.c (interactive_mode): changes for Tcl 7.0 compatibility. * tua.pcd (namibia): new entry Wed Nov 3 09:14:54 1993 Lele Gaifax (lele@nautilus.sublink.org) * Release 3.15. Mon Nov 1 11:57:43 1993 Lele Gaifax (lele@nautilus.sublink.org) * All sources: removed the use of fstrcmp(). Use the standard strcmp() function to avoid problems using non GNU-C compilers. * reports.c: corrected an off by one in the monthly activity tables. Wed Oct 27 09:44:30 1993 Lele Gaifax (lele@nautilus.sublink.org) * portalias.c (alias_new): added a cast to the return. * trees.c (_btree_insert): makenew was missing in the K&R decl of the function. Tue Oct 26 13:56:16 1993 Lele Gaifax (lele@nautilus.sublink.org) * Release 3.14. Mon Oct 25 16:59:02 1993 Lele Gaifax (lele@nautilus.sublink.org) * tua.c (process_command_line_option): if the user wants to reset the history (with --reset-history) and does not specify also '--update-history' then show a message. * reports.c (print_the_system_summary): do not print received/sent numbers if nothing has been exchanged. Also, if a system has not been contacted due errors, just print the number of failed calls. * reports.c: replaced %d with %u where appropriate, to avoid warnings from gcc with -Wall. * reports.c (monthly_history_table): corrected the test to avoid numbers larger that 4 digits. Mon Oct 25 16:23:38 1993 Larry Rosenman * tua.pcd: config for USA. Fri Oct 15 16:07:52 1993 Lele Gaifax (lele@nautilus.sublink.org) * Release 3.13. * Makefile.in: added alloca.c to the distribution. * reports.c: accomodate ATP outputs for 5 digits... I want a bigger screen !-) * process.c (process_new): set Status to TUUS_NONE on creation. * tmparse.c (parse_date): corrected the Year when using HDB. Fri Oct 15 14:32:13 1993 Atze W. Herder (awherder@wabe.csir.co.za) * pcdl_gram.y (strequ): corrected a typo on the ansidecl of the function. Fri Oct 15 10:44:43 1993 Lele Gaifax (lele@nautilus.sublink.org) * Release 3.12. Wed Oct 13 17:48:52 1993 Lele Gaifax (lele@nautilus.sublink.org) * alloca.c: here is is again. The GNU getopt package uses it. * tua.c (DisplayUsage): corrected a typo. Wed Oct 13 17:46:16 1993 Atze W. Herder (awherder@wabe.csir.co.za) * tua.pcd: configuration for South Africa. Tue Oct 12 14:33:23 1993 Lele Gaifax (lele@nautilus.sublink.org) * Makefile.in (C_FLAGS): use the configure' variable MORE_CFLAGS instead of directly -Wall * configure.in: check to see if the compiler accepts -Wall. * pcdl_gram.y (strequ): moved "inline" inside an #ifdef __GNUC__. Sat Oct 9 11:40:19 1993 Lele Gaifax (lele@nautilus.sublink.org) * Release 3.11. Wed Oct 6 14:29:17 1993 Lele Gaifax (lele@nautilus.sublink.org) * all sources: renamed strdup() to savestring(). This will allow me to install some sort of memory save eliminating duplicates * systree.c (system_new): do not initialize phone costs unless you have country info. If you don't, postpone this operation until you do. For this reason use the new function system_alloc_phone_costs(). * reports.c (print_the_system_summary): do not print phone costs if you don't have them. Wed Oct 6 14:22:42 1993 Samuel Druker (samuel@telmar.com) * reports.c (print_the_system_summary): do not print "dead time" if the connection time is zero. Thu Sep 30 18:11:25 1993 Lele Gaifax (lele@nautilus.sublink.org) * tua.c: parse the pcd file before read history because we need pcd_names_count to initialize new systems. Wed Sep 29 12:04:22 1993 Lele Gaifax (lele@nautilus.sublink.org) * Release 3.10. * reports.c (SummBySys): added various percentages. * process.c (process_new): reset StartTime and EndTime if HDB_UUCP. * tua.c: strbegcmp() moved to compat.c. Tue Sep 28 17:51:48 1993 Lele Gaifax (lele@nautilus.sublink.org) * Since I started using CVS on other projects, and found it very useful, from now on use it for TUA too. * To allow the use of a debug malloc library, I removed mem.c and mem.h, and changed the sources to use xmalloc instead. I seem to remember that mem.c and mem.h were there since TUA 0.1... time is changing... Mon Sep 27 11:00:01 1993 Lele Gaifax (lele@nautilus.sublink.org) * Release 3.9h. * configure.in: check for __FUNCTION__ macro; check for size_t. * Release 3.9g. Sat Sep 25 22:05:46 1993 Lele Gaifax (lele@nautilus.sublink.org) * pcdl.h, pcdl.c, pcdl_gram.y: added symbolic rate name, to improve readability. Now it handles 'name PEAK = "pippo";' and 'rate PEAK = { ... };'. Wed Sep 22 00:56:14 1993 Lele Gaifax (lele@nautilus.sublink.org) * Release 3.9f. * tua.c: new option '--country'. After option processing, read the pcdl file. Tue Sep 21 21:05:23 1993 Lele Gaifax (lele@nautilus.sublink.org) * pcdl.h, pcdl.c, pcdl_gram.y, country.pcdl: new files. * Following Kim's hints, replaced the phonesw.c code with an interpreter of what I call Phone Category Definition Language. This allow the end user to change these settings without having to recompile TUA. Wed Sep 15 17:05:30 1993 Kim Chr. Madsen (kimcm@ic.dk) * process.c (insert_process): don't set StartTime and EndTime if not HDB_UUCP. * customize.h, phonesw.c: support for Denmark phone charges. Wed Sep 1 10:57:07 1993 Lele Gaifax (lele@nautilus.sublink.org) * Release 3.9e. Mon Aug 30 15:18:29 1993 Lele Gaifax (lele@nautilus.sublink.org) * tua.h: use unsigned ints for File counts. Mon Aug 30 15:09:38 1993 John Plate (plate@infotek.dk) * Makefile (mandir): removed a blank. * reports.c: "Ago" is italian! Use "Aug"!. Fri Jul 30 18:52:27 1993 Lele Gaifax (lele@nautilus.sublink.org) * Release 3.9d. * Spain I'm coming... Thu Jul 29 18:19:26 1993 Lele Gaifax (lele@nautilus.sublink.org) * prochist.c: read_history -> read_system_history, write_history -> write_system_history, to avoid name conflict with existing GNU ReadLine functions. * acconfig.h: new file, containing local #undefs for autoheader. Tue Jul 27 19:52:54 1993 Lele Gaifax (lele@nautilus.sublink.org) * All sources: End Of Rename Phase, sources now are closer to GNU Coding Standards. * globalias.c: new name for queue.c. Mon Jul 26 12:15:50 1993 Lele Gaifax (lele@nautilus.sublink.org) * Makefile.in (distclean): don't remove `configure'. Tue Jul 20 14:47:08 1993 Lele Gaifax (lele@nautilus.sublink.org) * Release 3.9c. * Makefile.in: new rules for dist, patch and MANIFEST. Mon Jul 19 19:37:26 1993 Lele Gaifax (lele@nautilus.sublink.org) * Makefile.in (shar): use -L instead of -l, to avoid files larger that 50k. * all: lots of changes to eliminate warnings and errors with non-gnu C compilers. Sat Jul 17 16:08:08 1993 Lele Gaifax (lele@nautilus.sublink.org) * Release 3.9b. * INSTALL (1a): talk about customize.h Fri Jul 16 19:04:08 1993 Lele Gaifax (lele@nautilus.sublink.org) * Makefile.in: updated with new rules for building config.h.in. * customize.h: new file. User editable definitions are here instead of config.h.in, that now is built automatically by autoheader. * debug.h (dbg_printf): added checks for NeXT cc compiler. * Renamed process_t to process_status_t. * Renamed get_date to parse_date. Thu Jul 15 11:08:19 1993 Lele Gaifax (lele@nautilus.sublink.org) * Release 3.9a. * Makefile.in: follow GNU directives for Makefiles * All sources: renamed some data types and function names, for consistency. * configure.in: checks for "modf" and "rint". * compat.c: new file, containing replacements for missing function. * Use bitfields for Date_t and Time_t, saving respectively 10 and 12 bytes. Probably the access to internal fields will be slower, but there will be a speed gain in function calls. * tmparse.c: updated for bitfields. Wed Jul 14 02:07:18 1993 Lele Gaifax (lele@nautilus.sublink.org) * process.c: new file, moved from taylor/ * reports.c (SummBySys): corrected indentation. Tue Jul 13 19:33:16 1993 Lele Gaifax (lele@nautilus.sublink.org) * Makefile (TAYLOR_O): new file process.o. Fri May 14 12:05:34 1993 Lele Gaifax (lele@nautilus.sublink.org) * debug.c: new file. Functions used while debugging. Mon Apr 19 11:12:12 1993 Lele Gaifax (lele@nautilus.sublink.org) * tua.h, tua.c, prochist.c: eliminated the global string CurrentTime. Use StatEndingTime instead. * tua.h, tua.c: Declare and define StatEndingTime as the counterpart of StatStartingTime. Sun Apr 18 19:54:47 1993 Lele Gaifax (lele@nautilus.sublink.org) * commtree.c: made the search case insensitive. * tua.c: new function strcasecmp. * config.h.in, configure.in: added check for presence of strcasecmp. Thu Apr 15 14:58:41 1993 Lele Gaifax (lele@nautilus.sublink.org) * MANIFEST: updated. Wed Apr 14 15:26:15 1993 Lele Gaifax (lele@nautilus.sublink.org) * second set of tests on the SoftChip Btree support functions. * *tree.c *alias.c: inverted the order of the parameters to the compare functions. * Back from Amsterdam... ;-) ! Fri Apr 9 15:47:04 1993 Lele Gaifax (lele@nautilus.sublink.org) * *alias.c: use the new generic binary tree package. * xferstats.c: corrected a bug in parsing the date. Thu Apr 8 17:25:23 1993 Lele Gaifax (lele@nautilus.sublink.org) * *tree.c: use the new generic binary tree package. * reports.c: little edit for Taylor support. * Makefile.in: new support for the SoftChip Btree library. * trees.h, trees.c: new files, implementing a generic binary tree management. * tua.h: get rid of all those short and float. BTW, the main reason is that my gcc (2.3.3 on a NeXT (Yeah!! I'm one of 'em!!... :'-() fails in optimizing tmparse.c where it adjusts the date for the specified time: it seems that adding shorts and longs confuses gcc optimizer. I'll try to isolate the bug and I will send a bug report.... Sun Jan 24 16:12:56 1993 Lele Gaifax (lele@nautilus.sublink.org) * tua.c: added support for Taylor Uucp. Sat Jan 23 18:16:43 1993 Lele Gaifax (lele@nautilus.sublink.org) * tua.c: show the new syntax for the long options ('--' instead of '+') Thu Jan 14 02:41:53 1993 Lele Gaifax (lele@nautilus.sublink.org) * getopt.c, getopt.h: new version from somewhere. * getopt1.c: dropped. Tue Jan 12 11:58:13 1993 Lele Gaifax (lele@nautilus.sublink.org) * Moved HDB specific sources in the hdb subdir * hdb, taylor: new subdirs Mon Jan 11 16:26:59 1993 Lele Gaifax (lele@nautilus.sublink.org) * procdaily.c: dropped. * daytree.c: new file. Because Taylor Uucp puts a complete datestamp in its log (ie, there is year, month and day!!!), the previous method for storing the dailyrep was not enough. * tua.h, xferentry.c, ...: changed the rappresentation of a date and a time, with a struct. * tmparse.c: added support for Taylor Uucp. Tue Dec 29 14:38:04 1992 Lele Gaifax (lele@nautilus.sublink.org) * config.h.in, Makefile.in: new files. * Do not use RCS anymore: i was spending more time getting the right version number out of it than programming... * Use ansidecl.h, just to learn it... nein! mostly because i dont remember TUA anymore :-( * Maybe too slow??? Tue Nov 3 12:31:12 1992 Lele Gaifax (lele@nautilus.sublink.org) * Slowly restarting working on this. My first goal is to make an autoconf script for TUA... * procuucico.c, procuux.c, procuucp.c, procuuxqt.c: make use of the GNU standards to detect and use the directory package. Fri Mar 6 21:30:24 1992 Lele Gaifax (piggy at idea.sublink.org) * tua.c (interactive_mode): corrected the interaction between readline and Tcl. Fri Feb 28 01:16:12 1992 Lele Gaifax (piggy at idea.sublink.org) * wildmat.c: new file, from Rich $alz (really from the net! (really really from venta@otello.sublink.org)). * Corrected all the definition of TCL_*() functions, since they accept a ClientData type, not a "ClientData *". Thanx GCC. * Makefile: munch is not needed; added tcl_supp.c and readl_supp.c. tua_init.c now contains just the compilation date. * Lots of changes in the TCL Support, to simplify and enhance the Readline stuff. * queue.c: use wildmat() by Rich $alz, instead of glob(). Wed Feb 19 12:55:20 1992 Lele Gaifax (piggy at idea.sublink.org) * usertree.c, porttree.c: added some function to check the existence of a user (port). Tue Feb 18 09:51:31 1992 Lele Gaifax (piggy at idea.sublink.org) * tua.c, reports.c: new TCL commands to allow an interactive mode. * tua.c: one more option, -I, to implement an interactive mode using TCL capabilities (thanx to venta@otello.sublink.org for the suggestion). * tmparse.c: removed the include of , done in tua.h. * 3.6 [beta] released on Sublink Network. Sat Feb 15 15:05:20 1992 Lele Gaifax (piggy at idea.sublink.org) * TUA_init.ex, useralias.c sysalias.c portalias.c tua.texinfo: changed the name of the three TCL commands to from xxx_glob_alias to glob_xxx_alias for consistency with the related options name. Sat Feb 8 12:53:30 1992 Lele Gaifax (piggy at idea.sublink.org) * procuu*.c, xferentry.c: generalized with a macro in config.h the size of the various line buffers. * procuuxqt.c (ProcUuxqtEntry): corrected a bug, noted by Larry Rosenman , that caused a crash while parsing a line containing just "XQT DENIED (command-name)". Tue Feb 4 21:29:22 1992 Lele Gaifax (piggy at idea.sublink.org) * procuu*.c, xferentry.c: increased the buffer size for fgets(), since Larry Rosenman (thanx!) told me that at least on his system TUA crashed for that reason. Sun Jan 26 18:43:34 1992 Lele Gaifax (piggy at idea.sublink.org) * Makefile: Now includes a Texinfo file that replaces the groff version. It my first approach to Texinfo (and TeX as well): consider that I do not have any TeX available, so I cannot try to get a printed version of it. Wed Jan 22 18:54:00 1992 Lele Gaifax (piggy at idea.sublink.org) * reports.c: changed the string BREAKED to STOPPED. Fri Jan 17 19:58:09 1992 Lele Gaifax (piggy at idea.sublink.org) * Ian Taylor gave me an idea about the meaning of the second field in the xferstats file. It is either 'M' or 'S': the former means that the local host is paying the call, the latter means that the bill will go to the remote machine. Now TUA can subdivide the cost of a connection between the two sides. Sat Jan 11 12:46:44 1992 Lele Gaifax (piggy at idea.sublink.org) * Lot of mods to allow TUA execute a TCL script upon startup and just before exiting. Since in these dark days I prefer by far to do programming than documenting, this ChangeLog misses a lot of details about what I did. Sorry. * I'm developing TUA on a ISC 2.2.1, using gcc 1.40. Well, to use TCL I had to recompile TUA with the -posix option of gcc; for a currently unknown bug in the cposix library, it core dumped. After long hours of debugging with gdb, I switched to use another library, supplied with Dmake 3.71 by Dennis Vadura, which is a replacement for malloc/free, string, and so one. With that library TUA is shining again. Fri Dec 13 19:48:47 1991 Lele Gaifax (piggy at idea.sublink.org) * Makefile, getopt.c: now if you define ALLOCA_MISSING, getopt.c will use the malloc/free way to get a temporary swap space, instead of using alloca. Wed Nov 20 19:14:15 1991 Lele Gaifax (piggy at idea.sublink.org) * phonesw.c, MANIFEST, config.h: timebands is the right way to say what I called "timebelts"... Sat Nov 16 12:43:12 1991 Lele Gaifax (piggy at idea.sublink.org) * Renamed hdbstat.h to tua.h. * queue.c: new file. Dynamic linked queue management. * glob.c: new file. Performs strings comparison with meta-chars, like sh(1). Fri Nov 15 22:29:34 1991 Lele Gaifax (piggy at idea.sublink.org) * hdbstat.h: added prototypes for the new functions in *alias.c * tua.c: new options (+user-alias, +system-alias, +port-alias) for the aliases system. * usertree.c, systree.c, porttree.c: check for a possible alias whenever an insertion or an extraction occurs. * useralias.c, sysalias.c, portalias.c: new files. Implemented an aliases system for users, systems and ports. Tue Nov 12 19:46:38 1991 Lele Gaifax (piggy at idea.sublink.org) * phonesw.c: corrected a typo for Italy timing. Sat Nov 9 17:31:53 1991 Lele Gaifax (piggy at idea.sublink.org) * phonesw.c, config.h: added the customization for Canada. Thanx to Bill Irwin . Wed Oct 23 12:07:28 1991 Lele Gaifax (piggy at idea.sublink.org) * Moved #include to hdbstat.h and removed it from the sources. * alloca.c: new file for systems that lacks this function. Added a simple xmalloc. Tue Oct 8 21:06:09 1991 Ron Heiby (heiby at chg.mcd.mot.com) * procuucico.c: do not report anything when the call failed because it was invoked at the wrong time. * prochist.c: skip spurious empty lines in tua.history. Thu Sep 26 19:41:12 1991 Lele Gaifax (piggy at ideaisc.sublink.org) * phonesw.c, config.h: applied a patch from Andreas Godzina about Germany Phone Pricing. * tmparse.c: applied a patch from Mauro Mozzarelli for BSD support. Sun Sep 1 15:59:01 1991 PG Programs Generator (piggy at idea.sublink.org) * TUA 3.3 released to the world. * tua.man: updated the version. * Makefile: few rules added for an easier version update. Sat Jul 20 10:19:20 1991 PG Programs Generator (piggy at idea.sublink.org) * reports.c: reformatted some of the comments. * hdbstat.h, systree.c, procuucico.c, reports.c: Added the knowledge of a "breaked off" talk. It is different from the "failed" one: the former get interrupted in the middle by a signal, or by a protocol error, while the latter do not reach the login phase. Wed Jul 17 19:36:43 1991 PG Programs Generator (piggy at idea.sublink.org) * tmparse.c: added a single space between '=' and '-1' in "static long now=-1L;", to avoid warnings with some compilers. Thanx John Kalucki . Sun Jul 14 15:43:25 1991 PG Programs Generator (piggy at idea.sublink.org) * README: a few comments added. * procuucico.c: an fclose() was missing, so with a great numbers of systems TUA ran out of file descriptors. Thanx to Marc R. Sheldon . Sat Jul 13 11:46:58 1991 PG Programs Generator (piggy at idea.sublink.org) * config.h: swapped the definition order of the Country and PHONE_PRICING_TB, so the last can be computed automatically. * phonesw.c, config.h: added support for UK phone timing. Thanx to Chris Davies . Thu Jul 11 19:36:35 1991 Marc Boucher (marc at altitude.cam.org) * reports.c: Corrected a typo. * tua.c: Corrected a little bug related to a particular combination of some options. Sat Jul 6 21:30:52 1991 PG Programs Generator (piggy at idea.sublink.org) * Makefile: corrected a typo in the checkin targets. * reports.c: Swapped the order of "RECEIVED" and "SENT" here and there, for congruency with the following... Thu Jul 4 20:01:43 1991 PG Programs Generator (piggy at idea.sublink.org) * Made TUA 3.2.1 (with little enhancements) available to the world via FTP, putting it on itnsg1.cineca.it. Thanx a lot to stefano@angmar.sublink.org!. Wed Jun 26 18:02:40 1991 PG Programs Generator (piggy at idea.sublink.org) * Added a MANIFEST to the package, in view of a future posting on Usenet... Sun Jun 2 12:55:35 1991 PG Programs Generator (piggy at idea.sublink.org) * Posted (Sublink Network Only) patches to 3.2.1. * Makefile: added the targets checkin and diffs, the first for doing automatically the checkin phase with the right options, the latter to build the diffs between the last released version and the new sources. Mon May 27 08:27:04 1991 PG Programs Generator (piggy at idea.sublink.org) * reports.c: someone told that a KBytes is 1024 bytes, not just 1000. The same for MBytes. Corrected. Sat Apr 6 15:48:56 1991 PG Programs Generator (piggy at idea.sublink.org) * Released TUA 3.2. * Switched from parsedate.y to tmparse.c by Mike Stefanik: much simpler and smaller and faster. I had to modify it a little for compatibility with the rest of TUA. Thanx alot to "..!uunet!bria!mike" (what about an @ address in your .signature Mike? ;-). Another reason that suggested me this change: I probably badly simplified the original getdate.y by Steven Bellovin, and it was failing to compute the right value now we are in the Daylight Saving Time :-( Wed Mar 27 00:16:55 1991 PG Programs Generator (piggy at idea.sublink.org) * Makefile: tired enough to update the veryclean rule, I changed it to rely on a macro instead of the list of files (ChangeLog was missing ;-) Mon Mar 25 21:58:12 1991 PG Programs Generator (piggy at idea.sublink.org) * Makefile: added COPYING to the veryclean rule. Sat Mar 23 16:14:36 1991 PG Programs Generator (piggy at idea.sublink.org) * tua.man, patchlevel.h: updated the version number * parsedate.y: removed the GPL header: I don't know how much it would be correct to cover with this licence that source that is not enterely developed by me. * tua.man: slightly changed * parsedate.y: check for "previous year" dates; made static all non public functions; do not call time() at each invocation, just once the first time. * procuucico.c: found another message: "FAILED (CAN'T READ...". Added to the switch. Thu Mar 21 22:23:48 1991 PG Programs Generator (piggy at idea.sublink.org) * procuucico.c: discovered and treated another uucico message: "REQUEST (remote access to file/path denied)". This a different case from "..remote sys can't create temp file", since conversation can go on. Sun Mar 17 19:59:10 1991 PG Programs Generator (piggy at idea.sublink.org) * tua.c: reformatted some comments. * procuucico.c: little weightness changes Tue Mar 12 00:25:08 1991 PG Programs Generator (piggy at idea.sublink.org) * tua.man, README: little changes, just to let Peter Gabriel reach the end of San Jacinto ;-) * phonesw.c: corrected some values in the switch. Thanx to stefano@angmar.sublink.org. Sun Mar 10 22:07:13 1991 PG Programs Generator (piggy at idea.sublink.org) * reports.c: in the Summary By System, print the costs only if <> 0. * tua.c: print the number of days since last clean up in the header. * tua.c (main): UNKNOW -> UNKNOWN... what a bad spell checker! Thanx to wally@lpds.sublink.org. Sat Mar 9 19:45:03 1991 PG Programs Generator (piggy at idea.sublink.org) * reports.c: little changes to TimeToString, to catch times with more than 999 hours. Tue Mar 5 07:55:18 1991 PG Programs Generator (piggy at idea.sublink.org) * reports.c: show the summary of those systems that called without transmit anything also. Sat Mar 2 11:39:10 1991 PG Programs Generator (piggy at idea.sublink.org) * Released 3.1 on Sublink Network * tua.c: added {-O,+only-system} option to handle this feature. * hdbstat.h, tua.c, procuuxqt.c, procxfer.c, procuux.c, procuucp.c, procuucico.c, prochist.c, tua.man: added the just-one-system-report feature. Wed Feb 20 20:09:26 1991 PG Programs Generator (piggy at idea.sublink.org) * config.h, tua.c: added STRDUP_MISSING, for compatibility with those systems which lack that function. * reports.c: bsd don't have , ifdef'd it. Sun Feb 17 19:33:50 1991 PG Programs Generator (piggy at idea.sublink.org) * Makefile, tua.c, hdbstat.h: updated to use gethostname interface instead of uname, for portability between USG and BSD. * gethostname.c: new file from Cnews: a bsd-like interface to get the system name. Sun Feb 10 12:22:33 1991 PG Programs Generator (piggy at idea.sublink.org) * reports.c: print only one activity chart if there is just one port. Sun Feb 3 11:48:42 1991 PG Programs Generator (piggy at idea.sublink.org) * reports.c: use CallsOK instead of Calls to compute the links per day. * xferentry.c: extract the day of week from the timestamp in xferstats Sat Feb 2 19:09:25 1991 PG Programs Generator (piggy at idea.sublink.org) * config.h, phonesw.c, procxfer.c, reports.c: implemented a better way to compute the phone prices. * phonesw.c: new file: compute the right timebelt given day of week, hour and minute. * parsedate.y, procuucico.c, hdbstat.h: changed from "getdate" to "get_date" to avoid conflict with a function call on sysv r4. Thanks to Peter Komanns (peter@cucciolo.sublink.org) Sat Jan 26 00:30:12 1991 PG Programs Generator (piggy at idea.sublink.org) * tua.c, reports.c: corrected the computation of the average number of calls per day. Fri Jan 25 22:33:33 1991 PG Programs Generator (piggy at idea.sublink.org) * procdaily.c (insert_day): corrected a typo * hdbstat.h,procuucico.c,reports.c: added the computation of the last connection time. * hdbstat.h: Added a smarter way to specify the prototype of all the functions. * tua.man: updated for release 3.1 * reports.c: corrected the hourly chart: a '=' was missing. Thu Jan 24 22:03:42 1991 Walter Pelissero (wally at lpds.sublink.org) * tua.c (main): Added the cognition of SYSTEMID, a file which contains the name of the node on some system, like Xenix. * config.h: Added the SYSTEMID definition. Sun Jan 20 23:34:17 1991 PG Programs Generator (piggy at idea.sublink.org) * Released 3.0 in beta test (Sublink Network only) * Don't ask for the previous log... simply it doesn't exist ;-) tua-4.3.orig/INSTALL0100644000175100001440000001423306075755375012510 0ustar mdusers The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation, and creates the Makefile(s) (one in each subdirectory of the source directory). In some packages it creates a C header file containing system-dependent definitions. It also creates a file `config.status' that you can run in the future to recreate the current configuration. To compile this package: 1. Configure the package for your system. Normally, you just `cd' to the directory containing the package's source code and type `./configure'. 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 it is running, it prints some messages that tell what it is doing. If you don't want to see any messages, run `configure' with its standard output redirected to `/dev/null'; for example, `./configure >/dev/null'. To compile the package in a different directory from the one containing the source code, 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 for some reason `configure' is not in the source code directory that you are configuring, then it will report that it can't find the source code. In that case, run `configure' with the option `--srcdir=DIR', where DIR is the directory that contains the source code. 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'. Alternately, you can do so by consistently giving a value for the `prefix' variable when you run `make', e.g., make prefix=/usr/gnu make prefix=/usr/gnu install You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you give `configure' the option `--exec-prefix=PATH' or set the `make' variable `exec_prefix' to PATH, the package will use PATH as the prefix for installing programs and libraries. Data files and documentation will still use the regular prefix. Normally, all files are installed using the same prefix. `configure' also recognizes the following options: `--help' Print a summary of the options to `configure', and exit. `--quiet' `--silent' Do not print messages saying which checks are being made. `--verbose' Print the results of the checks. `--version' Print the version of Autoconf used to generate the `configure' script, and exit. `--x-includes=DIR' X include files are in DIR. `--x-libraries=DIR' X library files are in DIR. `configure' recognizes these TUA specific options (defaults are marked with an asterisk): `--with-glob' * `--without-glob' Add/Remove Glob Aliases feature `--with-readline' `--without-readline' * Add/Remove GNU Readline support `--with-softchip' `--without-softchip' * Add/Remove SoftChip BTree support `--with-tcl' `--without-tcl' * Add/Remove TCL support `--enable-taylor' * `--disable-taylor' Enable/Disable Taylor Uucp support `--enable-hdb' `--disable-hdb' * Enable/Disable HDB Uucp support `--disable-nls' Do not use Native Language Support `--with-gnu-gettext' Use the GNU gettext library `configure' also accepts and ignores some other options; see the output of `configure --help' for a complete list of the recognized options. On systems that require unusual options for compilation or linking that the package's `configure' script does not know about, you can give `configure' initial values for variables by setting them in the environment. In Bourne-compatible shells, you can do that on the command line like this: CC='gcc -traditional' LIBS=-lposix ./configure On systems that have the `env' program, you can do it like this: env CC='gcc -traditional' LIBS=-lposix ./configure Here are the `make' variables that you might want to override with environment variables when running `configure'. For these variables, any value given in the environment overrides the value that `configure' would choose: - Variable: CC C compiler program. The default is `cc'. - Variable: INSTALL Program to use to install files. The default is `install' if you have it, `cp' otherwise. For these variables, any value given in the environment is added to the value that `configure' chooses: - Variable: DEFS Configuration options, in the form `-Dfoo -Dbar...'. Do not use this variable in packages that create a configuration header file. - Variable: LIBS Libraries to link with, in the form `-lfoo -lbar...'. If you need to do unusual things to compile the package, we encourage you to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the README so we can include them in the next release. 1a. Read and eventually edit `customize.h' and Makefile. 2. Type `make' to compile the package. If you want, you can override the `make' variables CFLAGS and LDFLAGS like this: make CFLAGS=-O2 LDFLAGS=-s 3. If the package comes with self-tests and you want to run them, type `make check'. If you're not sure whether there are any, try it; if `make' responds with something like make: *** No way to make target `check'. Stop. then the package does not come with self-tests. 4. Type `make install' to install programs, data files, and documentation. 5. You can remove the program binaries and object files from the source directory by typing `make clean'. To also remove the Makefile(s), the header file containing system-dependent definitions (if the package uses one), and `config.status' (all the files that `configure' created), type `make distclean'. The file `configure.in' is used to create `configure' by a program called `autoconf'. You only need it if you want to regenerate `configure' using a newer version of `autoconf'. tua-4.3.orig/PROJECTS0100644000175100001440000000133205506060240012601 0ustar mdusers# -*- indented -*- # This is a list of what I think *NOW* about TUA future. # * Patch Taylor Uucp to make possible a one-to-one assoc between Stats and Logs entries. This is needed to know for example how much e-mail one user *received*. * Think about eliminating duplicated string in the trees. a) by providing a mechanism similar to NXUniqueString that can be found on NeXTstep (wow!), and teaching strdup() its use. b) ... * Modify the hourly activity chart. Instead of counting the bytes that pass through, take care simply how many times, in a period, that port was busy or not. With this info, you can say "Hmmmm..., at 3:35am, tty2a is free at 100%" (ie everyday)... * Interface with GNUPLOT. tua-4.3.orig/TUA.tiff0100644000175100001440000000706405506060244012744 0ustar mdusersMM* ˆÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿõUÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿðUUUUUUUUUUPÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿðUUUUUUUUUUUUUUUUUUUÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿUUUUUUU_ÿÿÿÿÿÿÿÿÿÿUUUUPÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿðUUUUUUÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿõUÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿUUUUÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿðÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿðUUUU_ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿUÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿðUUUÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿðU_ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿUUUUÿÿÿÿÿÿÿÿÿÿõUª¥UUUUUUUUUUª¥UÿÿÿÿðUÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿUU_ÿÿÿÿÿÿÿÿúªUUUUUUUUUUUUUUUUUUU_ÿÿÿÿUÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿõUUU_ÿÿÿÿªªªªªªUUUUUUUUUUUUUUUUUUUUUU_ÿUÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿðUUUU_ÿÿÿÿªªªªªªUUUUUUUUUUUUUUUUUUUUUUUUUPU_ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿðUUUÿÿÿª¤%BZªªªªUUURbUUUUR15UUUUUUUBT%UPUUUÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿðUUUÿÿÿUT%2ZªªªªUUU!3ÿÿÿÿó!?ÿUUUUUU3T%UPUUUÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿðUUUÿõUUS%BZªªªªUUU12ÿÿÿÿò1?ÿª¥Uª¥UBS%UPUR12#1?ÿ12#121?ÿÿÿÿÿÿÿÿÿÿÿðUUUUUUUT%!:ªÿÿÿÿÿÿ"3ÿÿÿÿó!?ÿÿÿÿÿÿÿ"4%UP!#ÿÿÿ!#13ÿÿÿ13ÿÿÿÿÿÿÿÿÿÿðUUUUUUUR1?ÿÿÿÿÿÿÿ12ÿÿÿÿò1?ÿÿÿÿÿÿÿ1215Uÿÿÿÿò12ÿÿÿ12ÿÿÿÿÿÿÿÿÿÿðUUUUUUUS!?ÿÿÿÿÿÿÿ!3ÿÿÿÿó!?ÿÿÿÿÿÿÿ!3US!5Uÿÿÿÿÿÿ!#ÿÿÿ!#ÿÿÿÿÿÿÿÿÿÿõUUUUUUR1?ÿÿÿÿÿÿÿ12ÿÿÿÿò1?ÿÿÿÿÿÿÿ12#15UU_ÿÿÿÿ12#121?ÿÿÿÿÿÿÿÿÿÿÿÿÿUUUUUS!?ÿÿÿÿÿÿÿ"3ÿÿÿÿó!?ÿÿÿÿÿÿÿ"3!%UU_ÿÿó13ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿUUUUª¢1?ÿÿÿÿÿÿÿ12ÿÿÿÿò1?ÿÿÿÿÿÿÿ12U12U_ÿ1212ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿðUUUÿÿÿ!3ÿÿÿÿó!?ÿÿÿÿÿÿÿ!3ÿÿÿÿó!0UUUUS!#!?ÿ!#ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿõUUÿÿÿÿò1212ÿÿÿÿÿÿÿÿÿÿò1212UUª¥UUUUÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿUÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿUUUÿõUU_ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿUPUUUª¯ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿUU_ÿUUUU_ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿõUU_ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿð ªUPÿÿÿUUUÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿõUUPUÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿõUUª¥UÿUUUÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿUUUUUUÿÿÿÿõUUPUUZªUPUUUÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿõUUPUPUPUUUUPUª¥UÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿõUUUUUUUUUUUUUUU_ÿÿÿÿU_ÿª¥UÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿõUUUUUUUUUUUUUUUUUUUUUUUUUUUUUZªÿúªU_ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿõUUUUU_ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿUUUUUUUª¯ÿª¥UÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿõUUUUUUUUUUÿÿÿÿõUUUUUUUUUUUUUUPUZªÿúªU_ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿõUUUUUUUUUUUUUUUUUUUUUUUUUUUUUª¯ÿª¥UÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿUUUUUUUUUUUUU_ÿÿÿÿÿõUUUUUPUZªÿúªU_ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿUUUUUUUª¯ÿª¥UÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿõUUUUUPUZªÿúªU_ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿUUUUUUUª¯ÿª¥Uÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ðß ðß ðß ðß ÿÿ ðß ðßÿÿÿ ðß ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿõUUUUUPUZªÿúªU_ÿÿÿÿÿÿÿÿÿÿÿÿ ÿÿ ðßÿðßÿðß ÿÿÿðß ÿÿÿÿÿ ðß ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿUUUUUUUªªªÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ðßÿÿÿÿðß ÿÿÿðß ÿÿÿðßÿðß ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿõUUUUUPUPÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ðßÿÿÿÿðß ÿÿÿðß ÿÿÿðßÿðß ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿUUUUUUUÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿðß ÿÿÿÿÿ ðßÿÿÿ ðßÿÿÿ ÿÿÿðß ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿõUUUUUUUU_ÿÿÿÿÿÿÿÿÿÿÿÿÿðß ÿÿÿÿÿ ðßÿÿÿ ðßÿÿÿ ðß ðß ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿUUUUUUUUUÿÿÿÿÿÿÿÿÿÿÿÿðß ÿÿÿÿÿ ðßÿÿÿ ðßÿðßÿÿÿÿðß ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿõUUUUUUUÿÿÿÿÿÿÿÿÿÿÿ ðß ðßÿÿÿÿðß ðß ÿÿ ðß ÿÿ ðß ðßÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿUUUU_ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿõUÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ 00 €$,( ü€' ü€'tua-4.3.orig/configure0100755000175100001440000027303306111127222013342 0ustar mdusers#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated automatically using autoconf version 2.7 # Copyright (C) 1992, 1993, 1994 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-nls do not use Native Language Support" ac_help="$ac_help --with-gnu-gettext use the GNU gettext library" ac_help="$ac_help --with-glob add support for Glob Aliases" ac_help="$ac_help --with-readline add support for GNU ReadLine library" ac_help="$ac_help --with-tcl add support for TCL" ac_help="$ac_help --with-softchip add support for SoftChip BTree library" ac_help="$ac_help --enable-taylor include Taylor Uucp support" ac_help="$ac_help --enable-hdb include HDB Uucp support" # 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= 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.7" 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 LANG and LC_ALL to C if already set. # These must not be set unconditionally because not all systems understand # e.g. LANG=C (notably SCO). if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi if test "${LANG+set}" = set; then LANG=C; export LANG; 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=TUA.tiff # 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='echo $CPP $CPPFLAGS 1>&5; $CPP $CPPFLAGS' ac_compile='echo ${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5; ${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5' ac_link='echo ${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5; ${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5' 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 if test "x$prefix" = xNONE; then echo $ac_n "checking for prefix by ""... $ac_c" 1>&6 # Extract the first word of "tua", so it can be a program name with args. set dummy tua; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 if eval "test \"`echo '$''{'ac_cv_path_TUA'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else case "$TUA" in /*) ac_cv_path_TUA="$TUA" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_TUA="$ac_dir/$ac_word" break fi done IFS="$ac_save_ifs" ;; esac fi TUA="$ac_cv_path_TUA" if test -n "$TUA"; then echo "$ac_t""$TUA" 1>&6 else echo "$ac_t""no" 1>&6 fi if test -n "$ac_cv_path_TUA"; then prefix=`echo $ac_cv_path_TUA|sed 's%/[^/][^/]*//*[^/][^/]*$%%'` fi fi PACKAGE=TUA VERSION=4.3 cat >> confdefs.h <> confdefs.h <&6 set dummy ${MAKE-make}; ac_make=$2 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 # 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 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="${IFS}:" for ac_dir in $PATH; 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" test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc" 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 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.c <&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 if test "${CFLAGS+set}" != set; then echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 if eval "test \"`echo '$''{'ac_cv_prog_gcc_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_gcc_g=yes else ac_cv_prog_gcc_g=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6 if test $ac_cv_prog_gcc_g = yes; then CFLAGS="-g -O" else CFLAGS="-O" fi fi else GCC= test "${CFLAGS+set}" = set || CFLAGS="-g" fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 # 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 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : else echo "$ac_err" >&5 rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : else echo "$ac_err" >&5 rm -rf conftest* CPP=/lib/cpp 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 for ac_prog in 'bison -y' byacc do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$YACC"; then ac_cv_prog_YACC="$YACC" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_YACC="$ac_prog" break fi done IFS="$ac_save_ifs" fi fi YACC="$ac_cv_prog_YACC" if test -n "$YACC"; then echo "$ac_t""$YACC" 1>&6 else echo "$ac_t""no" 1>&6 fi test -n "$YACC" && break done test -n "$YACC" || YACC="yacc" if test $ac_cv_prog_gcc = yes; then echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6 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 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 # 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 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="${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. for ac_prog in ginstall installbsd 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. # OSF/1 installbsd also uses dspmsg, but is usable. : 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_DATA" && INSTALL_DATA='${INSTALL} -m 644' # 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 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="${IFS}:" for ac_dir in $PATH; 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 # Extract the first word of "perl", so it can be a program name with args. set dummy perl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else case "$PERL" in /*) ac_cv_path_PERL="$PERL" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_PERL="$ac_dir/$ac_word" break fi done IFS="$ac_save_ifs" test -z "$ac_cv_path_PERL" && ac_cv_path_PERL="/usr/local/bin/perl" ;; esac fi PERL="$ac_cv_path_PERL" if test -n "$PERL"; then echo "$ac_t""$PERL" 1>&6 else echo "$ac_t""no" 1>&6 fi # If we cannot run a trivial program, we must be cross compiling. echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6 if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then ac_cv_c_cross=yes else cat > conftest.$ac_ext </dev/null; then ac_cv_c_cross=no else ac_cv_c_cross=yes fi fi rm -fr conftest* fi echo "$ac_t""$ac_cv_c_cross" 1>&6 cross_compiling=$ac_cv_c_cross echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 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 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* ac_cv_header_stdc=yes else echo "$ac_err" >&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 eval $ac_link if test -s conftest && (./conftest; exit) 2>/dev/null; then : else ac_cv_header_stdc=no fi fi rm -fr conftest* 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 ac_header_dirent=no for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h do ac_safe=`echo "$ac_hdr" | tr './\055' '___'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 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() { return 0; } int t() { DIR *dirp = 0; ; return 0; } EOF if eval $ac_compile; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else 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 | tr 'abcdedfghijklmnopqrstuvwxyz./\055' 'ABCDEDFGHIJKLMNOPQRSTUVWXYZ___'` 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 -ldir""... $ac_c" 1>&6 ac_lib_var=`echo dir | tr '.-/+' '___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 <&6 LIBS="$LIBS -ldir" else echo "$ac_t""no" 1>&6 fi else echo $ac_n "checking for -lx""... $ac_c" 1>&6 ac_lib_var=`echo x | tr '.-/+' '___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 <&6 LIBS="$LIBS -lx" else echo "$ac_t""no" 1>&6 fi fi echo $ac_n "checking for -lm""... $ac_c" 1>&6 ac_lib_var=`echo m | tr '.-/+' '___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 <&6 ac_tr_lib=HAVE_LIB`echo m | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 fi for ac_func in gethostname getdomainname do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 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. */ char $ac_func(); int main() { return 0; } int t() { /* 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 $ac_link; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else 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 for ac_func in stpcpy strbegcmp strcasecmp modf rint do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 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. */ char $ac_func(); int main() { return 0; } int t() { /* 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 $ac_link; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else 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 : else echo "$ac_t""no" 1>&6 LIBOBJS="$LIBOBJS ${ac_func}.o" fi done for ac_hdr in sys/param.h stddef.h sys/types.h do ac_safe=`echo "$ac_hdr" | tr './\055' '___'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 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 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&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 | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'` cat >> confdefs.h <&6 fi done for ac_hdr in string.h memory.h time.h do ac_safe=`echo "$ac_hdr" | tr './\055' '___'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 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 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&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 | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'` cat >> confdefs.h <&6 fi done echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6 if eval "test \"`echo '$''{'tua_cv_function_macro'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { return 0; } int t() { printf ("This function is %s\n", __FUNCTION__); ; return 0; } EOF if eval $ac_compile; then rm -rf conftest* tua_cv_function_macro=yes else rm -rf conftest* tua_cv_function_macro=no fi rm -f conftest* fi echo "$ac_t""$tua_cv_function_macro" 1>&6 if test $tua_cv_function_macro = yes; then cat >> confdefs.h <<\EOF #define HAVE_FUNCTION_MACRO 1 EOF fi if test $ac_cv_header_stddef_h = yes; then echo $ac_n "checking size_t in stddef.h""... $ac_c" 1>&6 cat > conftest.$ac_ext < int main() { return 0; } int t() { size_t x; ; return 0; } EOF if eval $ac_compile; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_SIZE_T_IN_STDDEF_H 1 EOF echo "$ac_t""yes" 1>&6 else rm -rf conftest* echo "$ac_t""no" 1>&6 fi rm -f conftest* fi if test $ac_cv_header_sys_types_h = yes; then echo $ac_n "checking size_t in sys/types.h""... $ac_c" 1>&6 cat > conftest.$ac_ext < int main() { return 0; } int t() { size_t x; ; return 0; } EOF if eval $ac_compile; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_SIZE_T_IN_TYPES_H 1 EOF echo "$ac_t""yes" 1>&6 else rm -rf conftest* echo "$ac_t""no" 1>&6 fi rm -f conftest* fi if test $ac_cv_header_time_h; then echo $ac_n "checking time_t in time.h""... $ac_c" 1>&6 cat > conftest.$ac_ext < int main() { return 0; } int t() { time_t i; ; return 0; } EOF if eval $ac_compile; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_TIME_T_IN_TIME_H 1 EOF echo "$ac_t""yes" 1>&6 else rm -rf conftest* echo "$ac_t""no" 1>&6 fi rm -f conftest* fi if test $ac_cv_header_sys_types_h = yes; then echo $ac_n "checking time_t in sys/types.h""... $ac_c" 1>&6 cat > conftest.$ac_ext < int main() { return 0; } int t() { time_t i; ; return 0; } EOF if eval $ac_compile; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_TIME_T_IN_TYPES_H 1 EOF echo "$ac_t""yes" 1>&6 else rm -rf conftest* echo "$ac_t""no" 1>&6 fi rm -f conftest* fi # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { return 0; } int t() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF if eval $ac_link; then rm -rf conftest* ac_cv_header_alloca_h=yes else rm -rf conftest* ac_cv_header_alloca_h=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 if test $ac_cv_header_alloca_h = yes; then cat >> confdefs.h <<\EOF #define HAVE_ALLOCA_H 1 EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 if eval "test \"`echo '$''{'ac_cv_func_alloca'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < # else # ifdef _AIX #pragma alloca # else # ifndef alloca /* predefined by HP cc +Olibcalls */ char *alloca (); # endif # endif # endif #endif int main() { return 0; } int t() { char *p = (char *) alloca(1); ; return 0; } EOF if eval $ac_link; then rm -rf conftest* ac_cv_func_alloca=yes else rm -rf conftest* ac_cv_func_alloca=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_func_alloca" 1>&6 if test $ac_cv_func_alloca = yes; then cat >> confdefs.h <<\EOF #define HAVE_ALLOCA 1 EOF fi if test $ac_cv_func_alloca = no; then # The SVR3 libPW and SVR4 libucb both contain incompatible functions # that cause trouble. Some versions do not even contain alloca or # contain a buggy version. If you still want to use their alloca, # use ar to extract alloca.o from them instead of compiling alloca.c. ALLOCA=alloca.o cat >> confdefs.h <<\EOF #define C_ALLOCA 1 EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5 | egrep "webecray" >/dev/null 2>&1; then rm -rf conftest* ac_cv_os_cray=yes else rm -rf conftest* ac_cv_os_cray=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_os_cray" 1>&6 if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 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. */ char $ac_func(); int main() { return 0; } int t() { /* 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 $ac_link; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else 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 cat >> confdefs.h <&6 fi done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext < addr) ? 1 : -1; } main () { exit (find_stack_direction() < 0); } EOF eval $ac_link if test -s conftest && (./conftest; exit) 2>/dev/null; then ac_cv_c_stack_direction=1 else ac_cv_c_stack_direction=-1 fi fi rm -fr conftest* fi echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 cat >> confdefs.h <&6 if test $ac_cv_prog_gcc = yes; then CFLAGS="$CFLAGS -Wall" echo "$ac_t""yes" 1>&6 else echo "$ac_t""no" 1>&6 fi echo $ac_n "checking for working const""... $ac_c" 1>&6 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 $ac_compile; then rm -rf conftest* ac_cv_c_const=yes else 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 inline""... $ac_c" 1>&6 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <&6 case "$ac_cv_c_inline" in inline | yes) ;; no) cat >> confdefs.h <<\EOF #define inline EOF ;; *) cat >> confdefs.h <&6 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS #include #endif EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "off_t" >/dev/null 2>&1; then rm -rf conftest* ac_cv_type_off_t=yes else rm -rf conftest* ac_cv_type_off_t=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_type_off_t" 1>&6 if test $ac_cv_type_off_t = no; then cat >> confdefs.h <<\EOF #define off_t long EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 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 #endif EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "size_t" >/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 for ac_func in valloc getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 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. */ char $ac_func(); int main() { return 0; } int t() { /* 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 $ac_link; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else 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 if eval "test \"`echo '$''{'ac_cv_func_mmap'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then ac_cv_func_mmap=no else cat > conftest.$ac_ext < #include #include #ifndef HAVE_GETPAGESIZE # include # ifdef EXEC_PAGESIZE # define getpagesize() EXEC_PAGESIZE # else # ifdef NBPG # define getpagesize() NBPG * CLSIZE # ifndef CLSIZE # define CLSIZE 1 # endif # else # ifdef NBPC # define getpagesize() NBPC # else # define getpagesize() PAGESIZE /* SVR4 */ # endif # endif # endif #endif #ifndef HAVE_VALLOC # define valloc malloc #endif #ifdef __cplusplus extern "C" { void *valloc(unsigned), *malloc(unsigned); } #else char *valloc(), *malloc(); #endif int main() { char *buf1, *buf2, *buf3; int i = getpagesize(), j; int i2 = i * 2; int fd; buf1 = (char *)valloc(i2); buf2 = (char *)valloc(i); buf3 = (char *)malloc(i2); for (j = 0; j < i2; ++j) *(buf1 + j) = rand(); fd = open("conftestmmap", O_CREAT | O_RDWR, 0666); write(fd, buf1, i2); mmap(buf2, i, PROT_READ | PROT_WRITE, MAP_FIXED | MAP_PRIVATE, fd, 0); for (j = 0; j < i; ++j) if (*(buf1 + j) != *(buf2 + j)) exit(1); lseek(fd, (long)i, 0); read(fd, buf2, i); /* read into mapped memory -- file should not change */ /* (it does in i386 SVR4.0 - Jim Avera, jima@netcom.com) */ lseek(fd, (long)0, 0); read(fd, buf3, i2); for (j = 0; j < i2; ++j) if (*(buf1 + j) != *(buf3 + j)) exit(1); exit(0); } EOF eval $ac_link if test -s conftest && (./conftest; exit) 2>/dev/null; then ac_cv_func_mmap=yes else ac_cv_func_mmap=no fi fi rm -fr conftest* fi echo "$ac_t""$ac_cv_func_mmap" 1>&6 if test $ac_cv_func_mmap = yes; then cat >> confdefs.h <<\EOF #define HAVE_MMAP 1 EOF fi for ac_hdr in limits.h locale.h nl_types.h malloc.h string.h unistd.h values.h do ac_safe=`echo "$ac_hdr" | tr './\055' '___'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 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 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&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 | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'` cat >> confdefs.h <&6 fi done for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 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. */ char $ac_func(); int main() { return 0; } int t() { /* 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 $ac_link; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else 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 if test "${ac_cv_func_stpcpy+set}" != "set"; then for ac_func in stpcpy do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 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. */ char $ac_func(); int main() { return 0; } int t() { /* 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 $ac_link; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else 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 if test "${ac_cv_func_stpcpy}" = "yes"; then cat >> confdefs.h <<\EOF #define HAVE_STPCPY 1 EOF fi if test $ac_cv_header_locale_h = yes; then echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 if eval "test \"`echo '$''{'ud_cv_val_LC_MESSAGES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { return 0; } int t() { return LC_MESSAGES ; return 0; } EOF if eval $ac_link; then rm -rf conftest* ud_cv_val_LC_MESSAGES=yes else rm -rf conftest* ud_cv_val_LC_MESSAGES=no fi rm -f conftest* fi echo "$ac_t""$ud_cv_val_LC_MESSAGES" 1>&6 if test $ud_cv_val_LC_MESSAGES = yes; then cat >> confdefs.h <<\EOF #define HAVE_LC_MESSAGES 1 EOF fi fi echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 # Check whether --enable-nls or --disable-nls was given. if test "${enable_nls+set}" = set; then enableval="$enable_nls" nls_cv_use_nls=$enableval else nls_cv_use_nls=yes fi echo "$ac_t""$nls_cv_use_nls" 1>&6 if test "$nls_cv_use_nls" = "yes"; then cat >> confdefs.h <<\EOF #define ENABLE_NLS 1 EOF echo $ac_n "checking for explicitly using GNU gettext""... $ac_c" 1>&6 # Check whether --with-gnu-gettext or --without-gnu-gettext was given. if test "${with_gnu_gettext+set}" = set; then withval="$with_gnu_gettext" nls_cv_force_use_gnu_gettext=$withval else nls_cv_force_use_gnu_gettext=no fi echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6 if test "$nls_cv_force_use_gnu_gettext" = "yes"; then nls_cv_use_gnu_gettext=yes else echo $ac_n "checking for -lintl""... $ac_c" 1>&6 ac_lib_var=`echo intl | tr '.-/+' '___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="-lintl $LIBS" cat > conftest.$ac_ext <&6 ac_tr_lib=HAVE_LIB`echo intl | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 fi echo $ac_n "checking for -li""... $ac_c" 1>&6 ac_lib_var=`echo i | tr '.-/+' '___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="-li $LIBS" cat > conftest.$ac_ext <&6 ac_tr_lib=HAVE_LIB`echo i | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 fi CATOBJEXT=NONE echo $ac_n "checking for gettext""... $ac_c" 1>&6 if eval "test \"`echo '$''{'ac_cv_func_gettext'+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. */ char gettext(); int main() { return 0; } int t() { /* 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_gettext) || defined (__stub___gettext) choke me #else gettext(); #endif ; return 0; } EOF if eval $ac_link; then rm -rf conftest* eval "ac_cv_func_gettext=yes" else rm -rf conftest* eval "ac_cv_func_gettext=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'gettext`\" = yes"; then echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF #define HAVE_GETTEXT 1 EOF # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else case "$MSGFMT" in /*) ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_MSGFMT="$ac_dir/$ac_word" break fi done IFS="$ac_save_ifs" test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no" ;; esac fi MSGFMT="$ac_cv_path_MSGFMT" if test -n "$MSGFMT"; then echo "$ac_t""$MSGFMT" 1>&6 else echo "$ac_t""no" 1>&6 fi if echo $MSGFMT | grep openwin > /dev/null; then echo "WARNING: Do not use OpenWin's msgfmt. (Better remove it.) >&6" ac_cv_path_MSGFMT=msgfmt MSGFMT=msgfmt fi if test "$MSGFMT" != "no"; then for ac_func in dcgettext do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 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. */ char $ac_func(); int main() { return 0; } int t() { /* 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 $ac_link; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else 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 # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else case "$GMSGFMT" in /*) ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_GMSGFMT="$ac_dir/$ac_word" break fi done IFS="$ac_save_ifs" test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" ;; esac fi GMSGFMT="$ac_cv_path_GMSGFMT" if test -n "$GMSGFMT"; then echo "$ac_t""$GMSGFMT" 1>&6 else echo "$ac_t""no" 1>&6 fi if echo $GMSGFMT | grep openwin > /dev/null; then echo "WARNING: Do not use OpenWin's gmsgfmt. (Better remove it.) >&6" ac_cv_path_GMSGFMT=gmsgfmt GMSGFMT=gmsgfmt fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else case "$XGETTEXT" in /*) ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_XGETTEXT="$ac_dir/$ac_word" break fi done IFS="$ac_save_ifs" test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT="xgettext" ;; esac fi XGETTEXT="$ac_cv_path_XGETTEXT" if test -n "$XGETTEXT"; then echo "$ac_t""$XGETTEXT" 1>&6 else echo "$ac_t""no" 1>&6 fi if echo $XGETTEXT | grep openwin > /dev/null; then echo "WARNING: Do not use OpenWin's xgettext. (Better remove it.) >&6" ac_cv_path_XGETTEXT=xgettext XGETTEXT=xgettext fi CATOBJEXT=.mo INSTOBJEXT=.mo DATADIRNAME=lib fi else echo "$ac_t""no" 1>&6 fi if test "$CATOBJEXT" = "NONE"; then echo $ac_n "checking for catgets""... $ac_c" 1>&6 if eval "test \"`echo '$''{'ac_cv_func_catgets'+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. */ char catgets(); int main() { return 0; } int t() { /* 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_catgets) || defined (__stub___catgets) choke me #else catgets(); #endif ; return 0; } EOF if eval $ac_link; then rm -rf conftest* eval "ac_cv_func_catgets=yes" else rm -rf conftest* eval "ac_cv_func_catgets=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'catgets`\" = yes"; then echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF #define HAVE_CATGETS 1 EOF INTLOBJS="\$(CATOBJS)" # Extract the first word of "gencat", so it can be a program name with args. set dummy gencat; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 if eval "test \"`echo '$''{'ac_cv_path_GENCAT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else case "$GENCAT" in /*) ac_cv_path_GENCAT="$GENCAT" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_GENCAT="$ac_dir/$ac_word" break fi done IFS="$ac_save_ifs" test -z "$ac_cv_path_GENCAT" && ac_cv_path_GENCAT="no" ;; esac fi GENCAT="$ac_cv_path_GENCAT" if test -n "$GENCAT"; then echo "$ac_t""$GENCAT" 1>&6 else echo "$ac_t""no" 1>&6 fi if test "$GENCAT" != "no"; then for ac_prog in gmsgfmt msgfmt do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else case "$GMSGFMT" in /*) ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_GMSGFMT="$ac_dir/$ac_word" break fi done IFS="$ac_save_ifs" ;; esac fi GMSGFMT="$ac_cv_path_GMSGFMT" if test -n "$GMSGFMT"; then echo "$ac_t""$GMSGFMT" 1>&6 else echo "$ac_t""no" 1>&6 fi test -n "$GMSGFMT" && break done test -n "$GMSGFMT" || GMSGFMT="msgfmt" # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else case "$XGETTEXT" in /*) ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_XGETTEXT="$ac_dir/$ac_word" break fi done IFS="$ac_save_ifs" test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT="xgettext" ;; esac fi XGETTEXT="$ac_cv_path_XGETTEXT" if test -n "$XGETTEXT"; then echo "$ac_t""$XGETTEXT" 1>&6 else echo "$ac_t""no" 1>&6 fi if echo $XGETTEXT | grep openwin > /dev/null; then echo "WARNING: Do not use OpenWin's xgettext. (Better remove it.) >&6" ac_cv_path_XGETTEXT=xgettext XGETTEXT=xgettext fi CATOBJEXT=.cat INSTOBJEXT=.cat DATADIRNAME=lib INTLDEPS="../intl/libintl.a" INTLLIBS=$INTLDEPS LIBS=`echo $LIBS | sed -e 's/-lintl//'` nls_cv_header_intl=intl/libintl.h nls_cv_header_libgt=intl/libgettext.h fi else echo "$ac_t""no" 1>&6 fi fi if test "$CATOBJEXT" = "NONE"; then nls_cv_use_gnu_gettext=yes fi fi if test "$nls_cv_use_gnu_gettext" = "yes"; then INTLOBJS="\$(GETTOBJS)" # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else case "$MSGFMT" in /*) ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_MSGFMT="$ac_dir/$ac_word" break fi done IFS="$ac_save_ifs" test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt" ;; esac fi MSGFMT="$ac_cv_path_MSGFMT" if test -n "$MSGFMT"; then echo "$ac_t""$MSGFMT" 1>&6 else echo "$ac_t""no" 1>&6 fi if echo $MSGFMT | grep openwin > /dev/null; then echo "WARNING: Do not use OpenWin's msgfmt. (Better remove it.) >&6" ac_cv_path_MSGFMT=msgfmt MSGFMT=msgfmt fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else case "$GMSGFMT" in /*) ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_GMSGFMT="$ac_dir/$ac_word" break fi done IFS="$ac_save_ifs" test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" ;; esac fi GMSGFMT="$ac_cv_path_GMSGFMT" if test -n "$GMSGFMT"; then echo "$ac_t""$GMSGFMT" 1>&6 else echo "$ac_t""no" 1>&6 fi if echo $GMSGFMT | grep openwin > /dev/null; then echo "WARNING: Do not use OpenWin's gmsgfmt. (Better remove it.) >&6" ac_cv_path_GMSGFMT=gmsgfmt GMSGFMT=gmsgfmt fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else case "$XGETTEXT" in /*) ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_XGETTEXT="$ac_dir/$ac_word" break fi done IFS="$ac_save_ifs" test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT="xgettext" ;; esac fi XGETTEXT="$ac_cv_path_XGETTEXT" if test -n "$XGETTEXT"; then echo "$ac_t""$XGETTEXT" 1>&6 else echo "$ac_t""no" 1>&6 fi if echo $XGETTEXT | grep openwin > /dev/null; then echo "WARNING: Do not use OpenWin's xgettext. (Better remove it.) >&6" ac_cv_path_XGETTEXT=xgettext XGETTEXT=xgettext fi CATOBJEXT=.gmo INSTOBJEXT=.mo DATADIRNAME=share INTLDEPS="../intl/libintl.a" INTLLIBS=$INTLDEPS LIBS=`echo $LIBS | sed -e 's/-lintl//'` nls_cv_header_intl=intl/libintl.h nls_cv_header_libgt=intl/libgettext.h fi # We need to process the intl/ and po/ directory. INTLSUB=intl POSUB=po else DATADIRNAME=share nls_cv_header_intl=intl/libintl.h nls_cv_header_libgt=intl/libgettext.h fi for lang in $ALL_LINGUAS; do GMOFILES="$GMOFILES $lang.gmo" POFILES="$POFILES $lang.po" done if test "x$CATOBJEXT" != "x"; then if test "x$ALL_LINGUAS" = "x"; then LINGUAS= else echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 NEW_LINGUAS= for lang in ${LINGUAS=$ALL_LINGUAS}; do case "$ALL_LINGUAS" in *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;; esac done LINGUAS=$NEW_LINGUAS echo "$ac_t""$LINGUAS" 1>&6 fi if test -n "$LINGUAS"; then for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done fi fi test -d intl || mkdir intl if test "$CATOBJEXT" = ".cat"; then ac_safe=`echo "linux/version.h" | tr './\055' '___'` echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6 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 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&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 msgformat=linux else echo "$ac_t""no" 1>&6 msgformat=xopen fi sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed fi sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \ $srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed test -d po || mkdir po if test "x$srcdir" != "x."; then if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then posrcprefix="$srcdir/" else posrcprefix="../$srcdir/" fi else posrcprefix="../" fi sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ < $srcdir/po/POTFILES.in > po/POTFILES echo $ac_n "checking for --with-glob""... $ac_c" 1>&6 tua_with_glob=yes # Check whether --with-glob or --without-glob was given. if test "${with_glob+set}" = set; then withval="$with_glob" if test "$withval" = "no"; then tua_with_glob=no fi fi if test $tua_with_glob = yes; then echo "$ac_t""adding Glob Aliases support" 1>&6 SUPPORT_OBJECTS="$SUPPORT_OBJECTS globalias.o wildmat.o" cat >> confdefs.h <<\EOF #define USE_GLOB_ALIASES 1 EOF else echo "$ac_t""removing Glob Aliases support" 1>&6 cat >> confdefs.h <<\EOF #define USE_GLOB_ALIASES 0 EOF fi echo $ac_n "checking for --with-readline""... $ac_c" 1>&6 tua_with_readline=no # Check whether --with-readline or --without-readline was given. if test "${with_readline+set}" = set; then withval="$with_readline" if test "$withval" = "yes" then tua_with_readline=yes fi fi if test $tua_with_readline = yes; then echo "$ac_t""adding GNU ReadLine support" 1>&6 SUPPORT_OBJECTS="$SUPPORT_OBJECTS readl_supp.o" cat >> confdefs.h <<\EOF #define USE_READLINE 1 EOF echo $ac_n "checking for -lreadline ncurses curses termcap""... $ac_c" 1>&6 ac_lib_var=`echo readline ncurses curses termcap | tr '.-/+' '___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="-lreadline ncurses curses termcap $LIBS" cat > conftest.$ac_ext <&6 ac_tr_lib=HAVE_LIB`echo readline ncurses curses termcap | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 fi else echo "$ac_t""removing GNU ReadLine support" 1>&6 cat >> confdefs.h <<\EOF #define USE_READLINE 0 EOF fi echo $ac_n "checking for --with-tcl""... $ac_c" 1>&6 tua_with_tcl=no # Check whether --with-tcl or --without-tcl was given. if test "${with_tcl+set}" = set; then withval="$with_tcl" if test "$withval" = "yes"; then tua_with_tcl=yes fi fi if test $tua_with_tcl = yes; then echo "$ac_t""adding TCL support" 1>&6 SUPPORT_OBJECTS="$SUPPORT_OBJECTS tcl_supp.o" cat >> confdefs.h <<\EOF #define USE_TCL 1 EOF echo $ac_n "checking for -ltcl""... $ac_c" 1>&6 ac_lib_var=`echo tcl | tr '.-/+' '___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="-ltcl $LIBS" cat > conftest.$ac_ext <&6 ac_tr_lib=HAVE_LIB`echo tcl | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 fi else echo "$ac_t""removing TCL support" 1>&6 cat >> confdefs.h <<\EOF #define USE_TCL 0 EOF fi echo $ac_n "checking for --with-softchip""... $ac_c" 1>&6 tua_with_softchip=no # Check whether --with-softchip or --without-softchip was given. if test "${with_softchip+set}" = set; then withval="$with_softchip" if test "$withval" = "yes"; then tua_with_softchip=yes fi fi if test $tua_with_softchip = yes; then echo "$ac_t""adding SoftChip BTree support" 1>&6 cat >> confdefs.h <<\EOF #define USE_SOFTCHIP_BTREE 1 EOF echo $ac_n "checking for -lbtree""... $ac_c" 1>&6 ac_lib_var=`echo btree | tr '.-/+' '___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="-lbtree $LIBS" cat > conftest.$ac_ext <&6 ac_tr_lib=HAVE_LIB`echo btree | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 fi else echo "$ac_t""removing SoftChip BTree support" 1>&6 cat >> confdefs.h <<\EOF #define USE_SOFTCHIP_BTREE 0 EOF fi echo $ac_n "checking for --enable-taylor""... $ac_c" 1>&6 # Check whether --enable-taylor or --disable-taylor was given. if test "${enable_taylor+set}" = set; then enableval="$enable_taylor" if test "$enableval" = "yes" ; then echo "$ac_t""enabled" 1>&6 cat >> confdefs.h <<\EOF #define TAYLOR_UUCP 1 EOF else echo "$ac_t""disabled" 1>&6 cat >> confdefs.h <<\EOF #define TAYLOR_UUCP 0 EOF fi else echo "$ac_t""enabled" 1>&6 cat >> confdefs.h <<\EOF #define TAYLOR_UUCP 1 EOF fi echo $ac_n "checking for --enable-hdb""... $ac_c" 1>&6 # Check whether --enable-hdb or --disable-hdb was given. if test "${enable_hdb+set}" = set; then enableval="$enable_hdb" if test "$enableval" = "yes" ; then cat >> confdefs.h <<\EOF #define HDB_UUCP 1 EOF taylor_version=`uucp --version 2>/dev/null` if expr "$taylor_version" : ".*Taylor UUCP" >/dev/null 2>&1; then echo "$ac_t""enabled (Taylor Uucp HDB-like)" 1>&6 cat >> confdefs.h <<\EOF #define TAYLOR_HDB 1 EOF else echo "$ac_t""enabled" 1>&6 fi else echo "$ac_t""disabled" 1>&6 cat >> confdefs.h <<\EOF #define HDB_UUCP 0 EOF fi else echo "$ac_t""disabled" 1>&6 cat >> confdefs.h <<\EOF #define HDB_UUCP 0 EOF fi 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 # 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 | sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \ >> 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.7" 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 src/Makefile src/hdb/Makefile src/taylor/Makefile \ src/lib/Makefile doc/Makefile lib/Makefile \ intl/Makefile po/Makefile.in config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 EOF cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF $ac_vpsub $extrasub s%@CFLAGS@%$CFLAGS%g s%@CPPFLAGS@%$CPPFLAGS%g s%@CXXFLAGS@%$CXXFLAGS%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%@TUA@%$TUA%g s%@PACKAGE@%$PACKAGE%g s%@VERSION@%$VERSION%g s%@SUPPORT_OBJECTS@%$SUPPORT_OBJECTS%g s%@TAYLOR_UUCP@%$TAYLOR_UUCP%g s%@HDB_UUCP@%$HDB_UUCP%g s%@TAYLOR_HDB@%$TAYLOR_HDB%g s%@USE_GLOB_ALIASES@%$USE_GLOB_ALIASES%g s%@USE_READLINE@%$USE_READLINE%g s%@USE_TCL@%$USE_TCL%g s%@USE_SOFTCHIP_BTREE@%$USE_SOFTCHIP_BTREE%g s%@SET_MAKE@%$SET_MAKE%g s%@CC@%$CC%g s%@CPP@%$CPP%g s%@YACC@%$YACC%g s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g s%@INSTALL_DATA@%$INSTALL_DATA%g s%@RANLIB@%$RANLIB%g s%@PERL@%$PERL%g s%@LIBOBJS@%$LIBOBJS%g s%@ALLOCA@%$ALLOCA%g s%@MSGFMT@%$MSGFMT%g s%@GMSGFMT@%$GMSGFMT%g s%@XGETTEXT@%$XGETTEXT%g s%@GENCAT@%$GENCAT%g s%@CATALOGS@%$CATALOGS%g s%@CATOBJEXT@%$CATOBJEXT%g s%@DATADIRNAME@%$DATADIRNAME%g s%@GMOFILES@%$GMOFILES%g s%@INSTOBJEXT@%$INSTOBJEXT%g s%@INTLDEPS@%$INTLDEPS%g s%@INTLLIBS@%$INTLLIBS%g s%@INTLOBJS@%$INTLOBJS%g s%@INTLSUB@%$INTLSUB%g s%@POFILES@%$POFILES%g s%@POSUB@%$POSUB%g CEOF EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then # Support "outfile[: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 relative srcdir, etc. 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 sed -e "$ac_comsub s%@configure_input@%$configure_input%g s%@srcdir@%$srcdir%g s%@top_srcdir@%$top_srcdir%g s%@INSTALL@%$INSTALL%g " -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file fi; done rm -f conftest.subs # 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' CONFIG_HEADERS=${CONFIG_HEADERS-"config.h"} for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then # Support "outfile[: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 cp $ac_given_srcdir/$ac_file_in 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. # Maximum number of lines to put in a single here document. ac_max_here_lines=12 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 rm -f $ac_file mv conftest.h $ac_file fi fi; done EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF srcdir=$ac_given_srcdir while test -n "$ac_sources"; do set $ac_dests; ac_dest=$1; shift; ac_dests=$* set $ac_sources; ac_source=$1; shift; ac_sources=$* echo "linking $srcdir/$ac_source to $ac_dest" if test ! -r $srcdir/$ac_source; then { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; } fi rm -f $ac_dest # Make relative symlinks. # Remove last slash and all that follows it. Not all systems have dirname. ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'` if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then # The dest file is in a subdirectory. test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir" ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`" # A "../" for each directory in $ac_dest_dir_suffix. ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'` else ac_dest_dir_suffix= ac_dots= fi case "$srcdir" in [/$]*) ac_rel_source="$srcdir/$ac_source" ;; *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;; esac # Make a symlink if possible; otherwise try a hard link. if ln -s $ac_rel_source $ac_dest 2>/dev/null || ln $srcdir/$ac_source $ac_dest; then : else { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; } fi done sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile; 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 tua-4.3.orig/Makefile.in0100644000175100001440000000643406110073163013502 0ustar mdusers# Makefile for "The Uucp Analyzer" # # This file is part of TUA. # # Copyright (C) 1991,96 Lele Gaifax # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # PACKAGE = @PACKAGE@ VERSION = @VERSION@ SHELL = /bin/sh @SET_MAKE@ TAR = /usr/local/bin/gtar srcdir=@srcdir@ VPATH=@srcdir@ DISTFILES = README NEWS COPYING ChangeLog ChangeLog.O INSTALL PROJECTS \ TUA.tiff configure Makefile.in configure.in acconfig.h \ aclocal.m4 install.sh config.h.in mkinstalldirs ABOUT-NLS \ stamp-h.in SUBDIRS = @INTLSUB@ @POSUB@ src lib doc default: all all install install-exec install-data uninstall TAGS \ mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive dist-recursive: config.h Makefile for subdir in $(SUBDIRS); do \ target=`echo $@|sed 's/-recursive//'`; \ echo making $$target in $$subdir; \ (cd $$subdir && $(MAKE) $$target) || exit 1; \ done distdir = $(PACKAGE)-$(VERSION) dist-local: Makefile rm -fr $(distdir) mkdir $(distdir) chmod 777 $(distdir) for file in $(DISTFILES); do \ ln $$file $(distdir) \ || { echo copying $$file instead; cp -p $$file $(distdir);}; \ done for subdir in $(SUBDIRS); do \ mkdir $(distdir)/$$subdir || exit 1; \ chmod 777 $(distdir)/$$subdir; \ done dist: dist-local dist-recursive $(TAR) --gzip -chvf `echo $(distdir) | tr A-Z a-z`.tar.gz $(distdir) rm -fr $(distdir) mostlyclean: mostlyclean-recursive mostlyclean-local mostlyclean-local: clean: clean-recursive clean-local clean-local: mostlyclean-local rm -f *~ distclean: distclean-recursive distclean-local distclean-local: clean-local rm -f Makefile config.cache config.h config.log stamp-h rm -f config.status maintainer-clean: maintainer-clean-recursive maintainer-clean-local maintainer-clean-local: distclean-local @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." rm -f configure check: all src/tua dvi info docs: cd doc && $(MAKE) $@ # For understanding the following see the autoconf manual. configure: configure.in aclocal.m4 cd $(srcdir) && autoconf # autoheader might not change config.h.in config.h.in: stamp-h.in stamp-h.in: configure.in acconfig.h cd $(srcdir) && autoheader rm -f $(srcdir)/stamp-h.in && echo timestamp > $(srcdir)/stamp-h.in #config.status might not change config.h # Don't rerun config.status if we just configured. config.h: stamp-h stamp-h: config.h.in config.status test ! -f stamp-h || ./config.status rm -f stamp-h && echo timestamp > stamp-h Makefile: Makefile.in config.status ./config.status config.status: configure config.h.in ./config.status --recheck tags: TAGS tua-4.3.orig/configure.in0100644000175100001440000001247706111126600013746 0ustar mdusersdnl dnl TUA - The Uucp Analyzer configuration file dnl Process this file with autoconf to produce a configure script. dnl Copyright (C) 1992,96 Lele Gaifax dnl AC_INIT(TUA.tiff) AC_PREFIX_PROGRAM(tua) PACKAGE=TUA VERSION=4.3 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE") AC_DEFINE_UNQUOTED(VERSION, "$VERSION") AC_SUBST(PACKAGE) AC_SUBST(VERSION) dnl Set of available languages. ALL_LINGUAS="it" AC_SUBST(SUPPORT_OBJECTS)dnl AC_SUBST(TAYLOR_UUCP)dnl AC_SUBST(HDB_UUCP)dnl AC_SUBST(TAYLOR_HDB)dnl AC_SUBST(USE_GLOB_ALIASES)dnl AC_SUBST(USE_READLINE)dnl AC_SUBST(USE_TCL)dnl AC_SUBST(USE_SOFTCHIP_BTREE)dnl AC_CONFIG_HEADER(config.h) AC_PROG_MAKE_SET AC_PROG_CC AC_PROG_CPP AC_PROG_YACC AC_PROG_GCC_TRADITIONAL AC_PROG_INSTALL AC_PROG_RANLIB AC_PATH_PROG(PERL, perl, /usr/local/bin/perl) AC_HEADER_STDC AC_HEADER_DIRENT AC_CHECK_LIB(m) AC_CHECK_FUNCS(gethostname getdomainname) AC_REPLACE_FUNCS(stpcpy strbegcmp strcasecmp modf rint) AC_CHECK_HEADERS(sys/param.h stddef.h sys/types.h) AC_CHECK_HEADERS(string.h memory.h time.h) AC_MSG_CHECKING([for __FUNCTION__ macro]) AC_CACHE_VAL(tua_cv_function_macro, [AC_TRY_COMPILE([#include ], [printf ("This function is %s\n", __FUNCTION__);], tua_cv_function_macro=yes, tua_cv_function_macro=no)]) AC_MSG_RESULT($tua_cv_function_macro) if test $tua_cv_function_macro = yes; then AC_DEFINE([HAVE_FUNCTION_MACRO]) fi dnl if test $ac_cv_header_stddef_h = yes; then AC_MSG_CHECKING([size_t in stddef.h]) AC_TRY_COMPILE([#include ], [size_t x;], [AC_DEFINE([HAVE_SIZE_T_IN_STDDEF_H]) AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no)]) fi dnl if test $ac_cv_header_sys_types_h = yes; then AC_MSG_CHECKING([size_t in sys/types.h]) AC_TRY_COMPILE([#include ], [size_t x;], [AC_DEFINE([HAVE_SIZE_T_IN_TYPES_H]) AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no)]) fi if test $ac_cv_header_time_h; then AC_MSG_CHECKING([time_t in time.h]) AC_TRY_COMPILE([#include ], [time_t i;], [AC_DEFINE([HAVE_TIME_T_IN_TIME_H]) AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no)]) fi dnl if test $ac_cv_header_sys_types_h = yes; then AC_MSG_CHECKING([time_t in sys/types.h]) AC_TRY_COMPILE([#include ], [time_t i;], [AC_DEFINE([HAVE_TIME_T_IN_TYPES_H]) AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no)]) fi dnl AC_FUNC_ALLOCA dnl AC_MSG_CHECKING(whether the compiler accepts '-Wall') if test $ac_cv_prog_gcc = yes; then CFLAGS="$CFLAGS -Wall" AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) fi dnl ud_GNU_GETTEXT AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl) dnl AC_MSG_CHECKING([for --with-glob]) tua_with_glob=yes AC_ARG_WITH(glob, [ --with-glob add support for Glob Aliases], [dnl if test "$withval" = "no"; then tua_with_glob=no fi]) if test $tua_with_glob = yes; then AC_MSG_RESULT(adding Glob Aliases support) SUPPORT_OBJECTS="$SUPPORT_OBJECTS globalias.o wildmat.o" AC_DEFINE([USE_GLOB_ALIASES],1) else AC_MSG_RESULT(removing Glob Aliases support) AC_DEFINE([USE_GLOB_ALIASES],0) fi dnl AC_MSG_CHECKING(for --with-readline) tua_with_readline=no AC_ARG_WITH(readline, [ --with-readline add support for GNU ReadLine library], [dnl if test "$withval" = "yes" then tua_with_readline=yes fi]) if test $tua_with_readline = yes; then AC_MSG_RESULT(adding GNU ReadLine support) SUPPORT_OBJECTS="$SUPPORT_OBJECTS readl_supp.o" AC_DEFINE([USE_READLINE],1) AC_CHECK_LIB(readline ncurses curses termcap) else AC_MSG_RESULT(removing GNU ReadLine support) AC_DEFINE([USE_READLINE],0) fi dnl AC_MSG_CHECKING(for --with-tcl) tua_with_tcl=no AC_ARG_WITH(tcl, [ --with-tcl add support for TCL], [dnl if test "$withval" = "yes"; then tua_with_tcl=yes fi]) if test $tua_with_tcl = yes; then AC_MSG_RESULT(adding TCL support) SUPPORT_OBJECTS="$SUPPORT_OBJECTS tcl_supp.o" AC_DEFINE([USE_TCL],1) AC_CHECK_LIB(tcl) else AC_MSG_RESULT(removing TCL support) AC_DEFINE([USE_TCL],0) fi dnl AC_MSG_CHECKING(for --with-softchip) tua_with_softchip=no AC_ARG_WITH(softchip, [ --with-softchip add support for SoftChip BTree library], [dnl if test "$withval" = "yes"; then tua_with_softchip=yes fi]) if test $tua_with_softchip = yes; then AC_MSG_RESULT(adding SoftChip BTree support) AC_DEFINE([USE_SOFTCHIP_BTREE],1) AC_CHECK_LIB(btree) else AC_MSG_RESULT(removing SoftChip BTree support) AC_DEFINE([USE_SOFTCHIP_BTREE],0) fi dnl AC_MSG_CHECKING(for --enable-taylor) AC_ARG_ENABLE(taylor, [ --enable-taylor include Taylor Uucp support], [dnl if test "$enableval" = "yes" ; then AC_MSG_RESULT(enabled) AC_DEFINE([TAYLOR_UUCP], 1) else AC_MSG_RESULT(disabled) AC_DEFINE([TAYLOR_UUCP], 0) fi], [dnl AC_MSG_RESULT(enabled) AC_DEFINE([TAYLOR_UUCP], 1)]) dnl AC_MSG_CHECKING(for --enable-hdb) AC_ARG_ENABLE(hdb, [ --enable-hdb include HDB Uucp support], [dnl if test "$enableval" = "yes" ; then AC_DEFINE([HDB_UUCP], 1) taylor_version=`uucp --version 2>/dev/null` if expr "$taylor_version" : ".*Taylor UUCP" >/dev/null 2>&1; then AC_MSG_RESULT(enabled (Taylor Uucp HDB-like)) AC_DEFINE(TAYLOR_HDB) else AC_MSG_RESULT(enabled) fi else AC_MSG_RESULT(disabled) AC_DEFINE([HDB_UUCP], 0) fi], [dnl AC_MSG_RESULT(disabled) AC_DEFINE([HDB_UUCP], 0)]) dnl AC_OUTPUT([Makefile src/Makefile src/hdb/Makefile src/taylor/Makefile \ src/lib/Makefile doc/Makefile lib/Makefile \ intl/Makefile po/Makefile.in], [sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile;]) tua-4.3.orig/acconfig.h0100644000175100001440000000376706105362125013370 0ustar mdusers/* this symbol was not defined in autoconf 1.5 standard acconfig.h. */ #undef CRAY_STACKSEG_END /* define if your compiler handles __FUNCTION__ macro (gcc v2.xx) */ #undef HAVE_FUNCTION_MACRO /* define if size_t is defined in stddef.h */ #undef HAVE_SIZE_T_IN_STDDEF_H /* define if size_t is defined in sys/types.h */ #undef HAVE_SIZE_T_IN_TYPES_H /* define if time_t is defined in time.h */ #undef HAVE_TIME_T_IN_TIME_H /* define if time_t is defined in sys/types.h */ #undef HAVE_TIME_T_IN_TYPES_H /* * UUCP SUPPORT: * Define TAYLOR_UUCP if you are using Taylor Uucp on your * machine. * Define HDB_UUCP if you are using HDB (aka BNU) Uucp on * your machine. * You can define 'em both, so you will choose the mode * with a command line option (--taylor-uucp || --hdb-uucp) */ #undef TAYLOR_UUCP #undef HDB_UUCP /* * If you are using Taylor Uucp compiled with SPOOLDIR_HDB=1, then define * TAYLOR_HDB, otherwise comment it out. */ #undef TAYLOR_HDB /* Define to the name of the distribution. */ #undef PACKAGE /* Define to the version of the distribution. */ #undef VERSION /* Define if you have obstacks. */ #undef HAVE_OBSTACK /* Define if defines ptrdiff_t. */ #undef HAVE_PTRDIFF_T /* Define if your locale.h file contains LC_MESSAGES. */ #undef HAVE_LC_MESSAGES /* Define if you have the parse_printf_format function. */ #undef HAVE_PARSE_PRINTF_FORMAT /* Define to 1 if NLS is requested. */ #undef ENABLE_NLS /* Define as 1 if you have catgets and don't want to use GNU gettext. */ #undef HAVE_CATGETS /* Define as 1 if you have gettext and don't want to use GNU gettext. */ #undef HAVE_GETTEXT /* Define as 1 if you have the stpcpy function. */ #undef HAVE_STPCPY /* Define as 1 if you want TCL support compiled in. */ #undef USE_TCL /* Define as 1 if you want SoftChip BTree support compiled in. */ #undef USE_SOFTCHIP_BTREE /* Define as 1 if you want GNU Readline support compiled in. */ #undef USE_READLINE /* Define as 1 if you want Glob Aliases. */ #undef USE_GLOB_ALIASES tua-4.3.orig/aclocal.m40100644000175100001440000002027606075744341013312 0ustar mdusersAC_PREREQ(2.5) AC_DEFUN(md_TYPE_PTRDIFF_T, [AC_CACHE_CHECK([for ptrdiff_t], ac_cv_type_ptrdiff_t, [AC_TRY_COMPILE(stddef.h, [ptrdiff_t p], ac_cv_type_ptrdiff_t=yes, ac_cv_type_ptrdiff_t=no)]) if test $ac_cv_type_ptrdiff_t = yes; then AC_DEFINE(HAVE_PTRDIFF_T) fi ]) AC_DEFUN(md_PATH_PROG, [AC_PATH_PROG($1,$2,$3)dnl if echo $$1 | grep openwin > /dev/null; then echo "WARNING: Do not use OpenWin's $2. (Better remove it.) >&AC_FD_MSG" ac_cv_path_$1=$2 $1=$2 fi ]) dnl ------------------------ dnl Emacs LISP file handling dnl ------------------------ AC_DEFUN(ud_PATH_LISPDIR, [AC_PATH_PROG(EMACS, emacs, no) if test $EMACS != "no"; then AC_MSG_CHECKING([where .elc files should go]) dnl Set default value LISPDIR="\$(datadir)/emacs/site-lisp" if test "x$prefix" = "xNONE"; then if test -d $ac_default_prefix/share/emacs/site-lisp; then LISPDIR="\$(prefix)/share/emacs/site-lisp" else if test -d $ac_default_prefix/lib/emacs/site-lisp; then LISPDIR="\$(prefix)/lib/emacs/site-lisp" fi fi else if test -d $prefix/share/emacs/site-lisp; then LISPDIR="\$(prefix)/share/emacs/site-lisp" else if test -d $prefix/lib/emacs/site-lisp; then LISPDIR="\$(prefix)/lib/emacs/site-lisp" fi fi fi AC_MSG_RESULT($LISPDIR) ELCFILES="\$(ELCFILES)" fi AC_SUBST(LISPDIR) AC_SUBST(ELCFILES)]) dnl --------------------------------------------------------- ## dnl Use AC_PROG_INSTALL, supplementing it with INSTALL_SCRIPT ## dnl substitution. ## dnl --------------------------------------------------------- ## AC_DEFUN(fp_PROG_INSTALL, [AC_PROG_INSTALL test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL} -m 755' AC_SUBST(INSTALL_SCRIPT)dnl ]) dnl Check NLS options AC_DEFUN(ud_LC_MESSAGES, [if test $ac_cv_header_locale_h = yes; then AC_CACHE_CHECK([for LC_MESSAGES], ud_cv_val_LC_MESSAGES, [AC_TRY_LINK([#include ], [return LC_MESSAGES], ud_cv_val_LC_MESSAGES=yes, ud_cv_val_LC_MESSAGES=no)]) if test $ud_cv_val_LC_MESSAGES = yes; then AC_DEFINE(HAVE_LC_MESSAGES) fi fi]) AC_DEFUN(ud_WITH_NLS, [AC_MSG_CHECKING([whether NLS is requested]) dnl Default is enabled NLS AC_ARG_ENABLE(nls, [ --disable-nls do not use Native Language Support], nls_cv_use_nls=$enableval, nls_cv_use_nls=yes) AC_MSG_RESULT($nls_cv_use_nls) dnl If we use NLS figure out what method if test "$nls_cv_use_nls" = "yes"; then AC_DEFINE(ENABLE_NLS) AC_MSG_CHECKING([for explicitly using GNU gettext]) AC_ARG_WITH(gnu-gettext, [ --with-gnu-gettext use the GNU gettext library], nls_cv_force_use_gnu_gettext=$withval, nls_cv_force_use_gnu_gettext=no) AC_MSG_RESULT($nls_cv_force_use_gnu_gettext) if test "$nls_cv_force_use_gnu_gettext" = "yes"; then nls_cv_use_gnu_gettext=yes else dnl User does not insist on using GNU NLS library. Figure out what dnl to use. If gettext or catgets are available (in this order) we dnl use this. Else we have to fall back to GNU NLS library. AC_CHECK_LIB(intl, main) AC_CHECK_LIB(i, main) CATOBJEXT=NONE AC_CHECK_FUNC(gettext, [AC_DEFINE(HAVE_GETTEXT) md_PATH_PROG(MSGFMT, msgfmt, no)dnl if test "$MSGFMT" != "no"; then AC_CHECK_FUNCS(dcgettext) md_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) md_PATH_PROG(XGETTEXT, xgettext, xgettext) CATOBJEXT=.mo INSTOBJEXT=.mo DATADIRNAME=lib fi]) if test "$CATOBJEXT" = "NONE"; then dnl No gettext in C library. Try catgets next. AC_CHECK_FUNC(catgets, [AC_DEFINE(HAVE_CATGETS) INTLOBJS="\$(CATOBJS)" AC_PATH_PROG(GENCAT, gencat, no)dnl if test "$GENCAT" != "no"; then AC_PATH_PROGS(GMSGFMT, [gmsgfmt msgfmt], msgfmt) md_PATH_PROG(XGETTEXT, xgettext, xgettext) CATOBJEXT=.cat INSTOBJEXT=.cat DATADIRNAME=lib INTLDEPS="../intl/libintl.a" INTLLIBS=$INTLDEPS LIBS=`echo $LIBS | sed -e 's/-lintl//'` nls_cv_header_intl=intl/libintl.h nls_cv_header_libgt=intl/libgettext.h fi]) fi if test "$CATOBJEXT" = "NONE"; then dnl Neither gettext nor catgets in included in the C library. dnl Fall back on GNU gettext library. nls_cv_use_gnu_gettext=yes fi fi if test "$nls_cv_use_gnu_gettext" = "yes"; then dnl Mark actions used to generate GNU NLS library. INTLOBJS="\$(GETTOBJS)" md_PATH_PROG(MSGFMT, msgfmt, msgfmt) md_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) md_PATH_PROG(XGETTEXT, xgettext, xgettext) AC_SUBST(MSGFMT) CATOBJEXT=.gmo INSTOBJEXT=.mo DATADIRNAME=share INTLDEPS="../intl/libintl.a" INTLLIBS=$INTLDEPS LIBS=`echo $LIBS | sed -e 's/-lintl//'` nls_cv_header_intl=intl/libintl.h nls_cv_header_libgt=intl/libgettext.h fi # We need to process the intl/ and po/ directory. INTLSUB=intl POSUB=po else DATADIRNAME=share nls_cv_header_intl=intl/libintl.h nls_cv_header_libgt=intl/libgettext.h fi dnl These rules are solely for the distribution goal. While doing this dnl we only have to keep exactly one list of the available catalogs dnl in configure.in. for lang in $ALL_LINGUAS; do GMOFILES="$GMOFILES $lang.gmo" POFILES="$POFILES $lang.po" done dnl Make all variables we use known to autoconf. AC_SUBST(CATALOGS) AC_SUBST(CATOBJEXT) AC_SUBST(DATADIRNAME) AC_SUBST(GMOFILES) AC_SUBST(INSTOBJEXT) AC_SUBST(INTLDEPS) AC_SUBST(INTLLIBS) AC_SUBST(INTLOBJS) AC_SUBST(INTLSUB) AC_SUBST(POFILES) AC_SUBST(POSUB) ]) AC_DEFUN(ud_GNU_GETTEXT, [AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_RANLIB])dnl AC_REQUIRE([AC_HEADER_STDC])dnl AC_REQUIRE([AC_C_CONST])dnl AC_REQUIRE([AC_C_INLINE])dnl AC_REQUIRE([AC_TYPE_OFF_T])dnl AC_REQUIRE([AC_TYPE_SIZE_T])dnl AC_REQUIRE([AC_FUNC_ALLOCA])dnl AC_REQUIRE([AC_FUNC_MMAP])dnl AC_CHECK_HEADERS([limits.h locale.h nl_types.h malloc.h string.h unistd.h values.h]) AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp]) if test "${ac_cv_func_stpcpy+set}" != "set"; then AC_CHECK_FUNCS(stpcpy) fi if test "${ac_cv_func_stpcpy}" = "yes"; then AC_DEFINE(HAVE_STPCPY) fi ud_LC_MESSAGES ud_WITH_NLS if test "x$CATOBJEXT" != "x"; then if test "x$ALL_LINGUAS" = "x"; then LINGUAS= else AC_MSG_CHECKING(for catalogs to be installed) NEW_LINGUAS= for lang in ${LINGUAS=$ALL_LINGUAS}; do case "$ALL_LINGUAS" in *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;; esac done LINGUAS=$NEW_LINGUAS AC_MSG_RESULT($LINGUAS) fi dnl Construct list of names of catalog files to be constructed. if test -n "$LINGUAS"; then for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done fi fi dnl Determine which catalog format we have (if any is needed) dnl For now we know about two different formats: dnl Linux and the normal X/Open format test -d intl || mkdir intl if test "$CATOBJEXT" = ".cat"; then AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen) dnl Transform the SED scripts while copying because some dumb SEDs dnl cannot handle comments. sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed fi dnl po2tbl.sed is always needed. sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \ $srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed dnl Generate list of files to be processed by xgettext which will dnl be included in po/Makefile. test -d po || mkdir po if test "x$srcdir" != "x."; then if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then posrcprefix="$srcdir/" else posrcprefix="../$srcdir/" fi else posrcprefix="../" fi sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ < $srcdir/po/POTFILES.in > po/POTFILES ]) tua-4.3.orig/install.sh0100755000175100001440000001106505725624032013446 0ustar mdusers#!/bin/sh # # install - install a program, script, or datafile # This comes from X11R5. # # $XConsortium: install.sh,v 1.2 89/12/18 14:47:22 jim Exp $ # # This script is compatible with the BSD install script, but was written # from scratch. # # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" # put in absolute paths if you don't have them in your path; or use env. vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" tranformbasename="" transform_arg="" instcmd="$mvprog" chmodcmd="$chmodprog 0755" chowncmd="" chgrpcmd="" stripcmd="" rmcmd="$rmprog -f" mvcmd="$mvprog" src="" dst="" dir_arg="" while [ x"$1" != x ]; do case $1 in -c) instcmd="$cpprog" shift continue;; -d) dir_arg=true shift continue;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; -s) stripcmd="$stripprog" shift continue;; -t=*) transformarg=`echo $1 | sed 's/-t=//'` shift continue;; -b=*) transformbasename=`echo $1 | sed 's/-b=//'` shift continue;; *) if [ x"$src" = x ] then src=$1 else # this colon is to work around a 386BSD /bin/sh bug : dst=$1 fi shift continue;; esac done if [ x"$src" = x ] then echo "install: no input file specified" exit 1 else true fi if [ x"$dir_arg" != x ]; then dst=$src src="" if [ -d $dst ]; then instcmd=: else instcmd=mkdir fi else # Waiting for this to be detected by the "$instcmd $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if [ -f $src -o -d $src ] then true else echo "install: $src does not exist" exit 1 fi if [ x"$dst" = x ] then echo "install: no destination specified" exit 1 else true fi # If destination is a directory, append the input filename; if your system # does not like double slashes in filenames, you may need to add some logic if [ -d $dst ] then dst="$dst"/`basename $src` else true fi fi ## this sed command emulates the dirname command dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` # Make sure that the destination directory exists. # this part is taken from Noah Friedman's mkinstalldirs script # Skip lots of stat calls in the usual case. if [ ! -d "$dstdir" ]; then defaultIFS=' ' IFS="${IFS-${defaultIFS}}" oIFS="${IFS}" # Some sh's can't handle IFS=/ for some reason. IFS='%' set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` IFS="${oIFS}" pathcomp='' while [ $# -ne 0 ] ; do pathcomp="${pathcomp}${1}" shift if [ ! -d "${pathcomp}" ] ; then $mkdirprog "${pathcomp}" else true fi pathcomp="${pathcomp}/" done fi if [ x"$dir_arg" != x ] then $doit $instcmd $dst && if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi else # If we're going to rename the final executable, determine the name now. if [ x"$transformarg" = x ] then dstfile=`basename $dst` else dstfile=`basename $dst $transformbasename | sed $transformarg`$transformbasename fi # don't allow the sed command to completely eliminate the filename if [ x"$dstfile" = x ] then dstfile=`basename $dst` else true fi # Make a temp file name in the proper directory. dsttmp=$dstdir/#inst.$$# # Move or copy the file name to the temp name $doit $instcmd $src $dsttmp && trap "rm -f ${dsttmp}" 0 && # and set any options; do chmod last to preserve setuid bits # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $instcmd $src $dsttmp" command. if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && # Now rename the file to the real destination. $doit $rmcmd -f $dstdir/$dstfile && $doit $mvcmd $dsttmp $dstdir/$dstfile fi && exit 0 tua-4.3.orig/config.h.in0100644000175100001440000001346206105362161013462 0ustar mdusers/* config.h.in. Generated automatically from configure.in by autoheader. */ /* Define if using alloca.c. */ #undef C_ALLOCA /* Define to empty if the keyword does not work. */ #undef const /* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems. This function is required for alloca.c support on those systems. */ #undef CRAY_STACKSEG_END /* Define if you have alloca, as a function or macro. */ #undef HAVE_ALLOCA /* Define if you have and it should be used (not on Ultrix). */ #undef HAVE_ALLOCA_H /* Define if you have a working `mmap' system call. */ #undef HAVE_MMAP /* Define as __inline if that's what the C compiler calls it. */ #undef inline /* Define to `long' if doesn't define. */ #undef off_t /* Define to `unsigned' if doesn't define. */ #undef size_t /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at run-time. STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses STACK_DIRECTION = 0 => direction of growth unknown */ #undef STACK_DIRECTION /* Define if you have the ANSI C header files. */ #undef STDC_HEADERS /* this symbol was not defined in autoconf 1.5 standard acconfig.h. */ #undef CRAY_STACKSEG_END /* define if your compiler handles __FUNCTION__ macro (gcc v2.xx) */ #undef HAVE_FUNCTION_MACRO /* define if size_t is defined in stddef.h */ #undef HAVE_SIZE_T_IN_STDDEF_H /* define if size_t is defined in sys/types.h */ #undef HAVE_SIZE_T_IN_TYPES_H /* define if time_t is defined in time.h */ #undef HAVE_TIME_T_IN_TIME_H /* define if time_t is defined in sys/types.h */ #undef HAVE_TIME_T_IN_TYPES_H /* * UUCP SUPPORT: * Define TAYLOR_UUCP if you are using Taylor Uucp on your * machine. * Define HDB_UUCP if you are using HDB (aka BNU) Uucp on * your machine. * You can define 'em both, so you will choose the mode * with a command line option (--taylor-uucp || --hdb-uucp) */ #undef TAYLOR_UUCP #undef HDB_UUCP /* * If you are using Taylor Uucp compiled with SPOOLDIR_HDB=1, then define * TAYLOR_HDB, otherwise comment it out. */ #undef TAYLOR_HDB /* Define to the name of the distribution. */ #undef PACKAGE /* Define to the version of the distribution. */ #undef VERSION /* Define if your locale.h file contains LC_MESSAGES. */ #undef HAVE_LC_MESSAGES /* Define to 1 if NLS is requested. */ #undef ENABLE_NLS /* Define as 1 if you have catgets and don't want to use GNU gettext. */ #undef HAVE_CATGETS /* Define as 1 if you have gettext and don't want to use GNU gettext. */ #undef HAVE_GETTEXT /* Define as 1 if you have the stpcpy function. */ #undef HAVE_STPCPY /* Define as 1 if you want TCL support compiled in. */ #undef USE_TCL /* Define as 1 if you want SoftChip BTree support compiled in. */ #undef USE_SOFTCHIP_BTREE /* Define as 1 if you want GNU Readline support compiled in. */ #undef USE_READLINE /* Define as 1 if you want Glob Aliases. */ #undef USE_GLOB_ALIASES /* Define if you have the dcgettext function. */ #undef HAVE_DCGETTEXT /* Define if you have the getcwd function. */ #undef HAVE_GETCWD /* Define if you have the getdomainname function. */ #undef HAVE_GETDOMAINNAME /* Define if you have the gethostname function. */ #undef HAVE_GETHOSTNAME /* Define if you have the getpagesize function. */ #undef HAVE_GETPAGESIZE /* Define if you have the munmap function. */ #undef HAVE_MUNMAP /* Define if you have the putenv function. */ #undef HAVE_PUTENV /* Define if you have the setenv function. */ #undef HAVE_SETENV /* Define if you have the setlocale function. */ #undef HAVE_SETLOCALE /* Define if you have the stpcpy function. */ #undef HAVE_STPCPY /* Define if you have the strcasecmp function. */ #undef HAVE_STRCASECMP /* Define if you have the strchr function. */ #undef HAVE_STRCHR /* Define if you have the valloc function. */ #undef HAVE_VALLOC /* Define if you have the header file. */ #undef HAVE_DIRENT_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_MALLOC_H /* Define if you have the header file. */ #undef HAVE_MEMORY_H /* Define if you have the header file. */ #undef HAVE_NDIR_H /* Define if you have the header file. */ #undef HAVE_NL_TYPES_H /* Define if you have the header file. */ #undef HAVE_STDDEF_H /* Define if you have the header file. */ #undef HAVE_STRING_H /* Define if you have the header file. */ #undef HAVE_SYS_DIR_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_TYPES_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 header file. */ #undef HAVE_VALUES_H /* Define if you have the btree library (-lbtree). */ #undef HAVE_LIBBTREE /* Define if you have the curses library (-lcurses). */ #undef HAVE_LIBCURSES /* Define if you have the i library (-li). */ #undef HAVE_LIBI /* Define if you have the intl library (-lintl). */ #undef HAVE_LIBINTL /* Define if you have the m library (-lm). */ #undef HAVE_LIBM /* Define if you have the ncurses library (-lncurses). */ #undef HAVE_LIBNCURSES /* Define if you have the readline library (-lreadline). */ #undef HAVE_LIBREADLINE /* Define if you have the tcl library (-ltcl). */ #undef HAVE_LIBTCL /* Define if you have the termcap library (-ltermcap). */ #undef HAVE_LIBTERMCAP tua-4.3.orig/mkinstalldirs0100755000175100001440000000121106007672441014240 0ustar mdusers#!/bin/sh # mkinstalldirs --- make directory hierarchy # Author: Noah Friedman # Created: 1993-05-16 # Last modified: 1994-03-25 # Public domain errstatus=0 for file in ${1+"$@"} ; do set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` shift pathcomp= for d in ${1+"$@"} ; do pathcomp="$pathcomp$d" case "$pathcomp" in -* ) pathcomp=./$pathcomp ;; esac if test ! -d "$pathcomp"; then echo "mkdir $pathcomp" 1>&2 mkdir "$pathcomp" || errstatus=$? fi pathcomp="$pathcomp/" done done exit $errstatus # mkinstalldirs ends here tua-4.3.orig/ABOUT-NLS0100644000175100001440000002134706075527227012703 0ustar mdusersNotes on the GNU Translation Project ************************************ GNU is going international! The GNU Translation Project is a way to get maintainers, translators and users all together, so GNU will gradually become able to speak many native languages. A few packages already provide native language translation for their messages. If you found this `ABOUT-NLS' file inside a GNU distribution, you may assume that the distributed package does use GNU `gettext' internally, itself available at your nearest GNU archive site. But you do not need to install GNU `gettext' prior to configuring, installing or using this package with messages translated. Installers will find here some useful hints. These notes also explain how users should proceed for getting the programs to use the available translations. They tell how people wanting to contribute and work at translations should contact the appropriate team. When reporting bugs in the `intl/' directory or bugs which may be related to internationalization, you should tell about the version of `gettext' which is used. The information can be found in the `intl/VERSION' file, in internationalized packages. One advise in advance ===================== If you want to exploit the full power of the GNU `gettext' package you should configure it using --with-gnu-gettext. No existing implementation at this point provides so many useful features (such as locale alias or message inheritance). It is also not possible to provide this additional functionality on top of a catgets implementation. Future versions of GNU `gettext' will very likely provide even more functionality. So it might be a good idea to change to GNU `gettext' as soon as possible. INSTALL Matters =============== Some GNU packages are "localizable" when properly installed; the programs they contain can be made to speak your own native language. Most such packages use GNU `gettext'. Other packages have their own ways to internationalization, predating GNU `gettext'. By default, this package will be installed to allow translation of messages. It will automatically detect whether the system provides usable `catgets' or `gettext' functions. If neither is available, the GNU `gettext' own library will be used. However, installers may use special options at configuration time for changing this behaviour. The commands: ./configure --with-gnu-gettext ./configure --disable-nls will respectively bypass system `catgets' or `gettext' to use GNU `gettext', or else, totally disable translation of messages. When you already have GNU `gettext' installed on your system and run configure without an option for your new package, configure will probably detect the previously built and installed `libintl.a' file and will decide to use this. This might be not what is desirable. You should use the more recent version of the GNU `gettext' library. I.e. if the file `intl/VERSION' shows that the library which comes with this package is more recent, you should use ./configure --with-gnu-gettext to prevent auto-detection. Internationalized packages have usually many `po/LL.po' files, where LL gives an ISO 639 two-letter code identifying the language. Unless translations are disabled, all those available are installed together with the package. However, the environment variable `LINGUAS' may be set, prior to configuration, to limit the installed set. `LINGUAS' should then contain a space separated list of two-letter codes, stating which languages are allowed. Using This Package ================== As a user, if your language has been installed for this package, you only have to set the `LANG' environment variable to the appropriate ISO 639 `LL' two-letter code prior to using the programs in the package. For example, let's suppose that you speak German. At the shell prompt, merely execute `setenv LANG de' (in `csh') or `export LANG; LANG=de' (in `sh'). This can be done from your `.login' or `.profile' file, once and for all. Packages which are not internationalized will merely ignore the setting of this variable. Translating Teams ================= The GNU `gettext' tool set contains *everything* maintainers need for internationalizing their packages for messages. It also contains quite useful tools for helping translators at localizing messages to their native language, once a package has already been internationalized. To achieve the GNU Translation Project, we need many interested people who like their own language and write it well, and who are also able to synergize with other translators speaking the same language. Each translating team has its own mailing list, courtesy of Linux International. You may reach your translating team at the address `LL@li.org', replacing LL by the two-letter ISO 639 code for your language. Language codes are *not* the same as country codes given in ISO 3166. The following translating teams exist, as of November 1995: Chinese `zh', Czech `cs', Danish `da', Dutch `nl', English `en', Esperanto `eo', Finnish `fi', French `fr', Irish `ga', German `de', Greek `el', Italian `it', Japanese `ja', Indonesian `in', Norwegian `no', Persian `fa', Polish `pl', Portuguese `pt', Russian `ru', Spanish `es', Swedish `sv', Telugu `te' and Turkish `tr'. For example, you may reach the Chinese translating team by writing to `zh@li.org'. If you'd like to volunteer to *work* at translating messages, you should become a member of the translating team for your own language. The subscribing address is *not* the same as the list itself, it has `-request' appended. For example, Swedish people can send a message to `sv-request@li.org', having this message body: subscribe Keep in mind that team members should be interested in *working* at translations, or at solving translational difficulties, rather than merely lurking around. If your team does not exist yet and you want to start one, please write to `gnu-translation@prep.ai.mit.edu'; you will then reach the GNU coordinator for all translator teams. The English team is special. It works at improving and uniformizing the terminology used in GNU. Proven linguistic skill are praised more than programming skill, here. For the time being, please avoid subscribing to the English team unless explicitely invited to do so. Available Packages ================== Languages are not equally supported in all GNU packages. The following matrix shows the current state of GNU internationalization, as of November 1995. Listed are: internationalized packages, and languages for which work is in progress, or about to start. See note cs de en fr it ja nl no pt sv \ .-------------------------------. chess (1) | X / X | clisp | X X X | diffutils (2) | / . | fileutils | . / | flex (3) | / . | m4 | - / - - . - | gettext | X / X X X | ptx | - / - - | recode | - / - - - | sh-utils | . / . | sharutils | X / X X X X X | tar | X / X - X X | textutils | . / . | wdiff | - - / - - | `-------------------------------' cs de en fr it ja nl no pt sv The interpretation legend and notes are: `/' There is no PO file, this package merely defaults to this language. `.' The effort of localizing this package has been undertaken by someone, or by a translating team, and work is, or should be in progress. `-' A PO file for this package and this language is completed and is currently available in a pretest release, or is all ready for inclusion in the next release of this package. `X' The localization of this package to this particular language is fully completed, and now distributed through an official release. (1) This package is translated to specific languages by methods predating GNU `gettext'. Translations are all kept on disk files, and sources contain numbers where one normally expects strings. (2) This package is planned to switch to GNU `gettext'. For the time being, it uses temporary means for internationalization. (3) This package has its translatable strings marked, but does not use GNU `gettext'. A convenience patch may be available separately. If November 1995 seems to be old, you may fetch a more recent copy of this `ABOUT-NLS' file on most GNU archive sites. tua-4.3.orig/stamp-h.in0100644000175100001440000000001206111127214013316 0ustar mduserstimestamp tua-4.3.orig/po/0040755000175100001440000000000006111151457012053 5ustar mduserstua-4.3.orig/po/ChangeLog0100644000175100001440000000016606111151135013616 0ustar mdusersFri Feb 16 19:51:56 1996 Lele Gaifax * it.po: Updated. Previous ChangeLogs are lost\! tua-4.3.orig/po/Makefile.in.in0100644000175100001440000001364206105423454014532 0ustar mdusers# Makefile for program source directory in GNU NLS utilities package. # Copyright (C) 1995 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. PACKAGE = @PACKAGE@ VERSION = @VERSION@ SHELL = /bin/sh @SET_MAKE@ # This subdirectory name subdir = po #### Start of system configuration section. #### srcdir=@srcdir@ top_srcdir = @top_srcdir@ VPATH=@srcdir@ INSTALL=@INSTALL@ INSTALL_PROGRAM=@INSTALL_PROGRAM@ INSTALL_DATA=@INSTALL_DATA@ prefix = @prefix@ exec_prefix = @exec_prefix@ transform = @program_transform_name@ # Where to install executables. bindir = @bindir@ # Where to install library files. libdir = @libdir@ # Where to install locale stuff datadir = @datadir@ localedir = $(datadir)/locale gnulocaledir = $(datadir)/locale gettextsrcdir = $(datadir)/gettext CC = @CC@ GENCAT = @GENCAT@ GMSGFMT = @GMSGFMT@ MSGFMT = @MSGFMT@ XGETTEXT = @XGETTEXT@ TUPDATE = tupdate DEFS = @DEFS@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ INCLUDES = -I.. -I$(top_srcdir)/intl COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) SOURCES = cat-id-tbl.c POFILES = @POFILES@ GMOFILES = @GMOFILES@ DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(PACKAGE).pot \ stamp-cat-id $(POFILES) $(GMOFILES) $(SOURCES) POTFILES = \ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ INSTOBJEXT = @INSTOBJEXT@ .SUFFIXES: .SUFFIXES: .c .o .po .pox .gmo .mo .msg .cat .c.o: $(COMPILE) $< .po.pox: $(MAKE) $(PACKAGE).pot $(TUPDATE) $(srcdir)/$(PACKAGE).pot $< > $*.pox .po.mo: $(MSGFMT) -o $@ $< .po.gmo: file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \ && rm -f $$file && $(GMSGFMT) -o $$file $< .po.cat: sed -f ../intl/po2msg.sed < $< > $*.msg \ && rm -f $@ && $(GENCAT) $@ $*.msg all: cat-id-tbl.c $(CATALOGS) $(PACKAGE).pot: $(POTFILES) $(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(top_srcdir) \ --add-comments --keyword=_ --keyword=N_ \ --files-from=$(srcdir)/POTFILES.in if cmp -s $(PACKAGE).po $(srcdir)/$(PACKAGE).pot; then \ rm -f $(PACKAGE).po; \ else \ rm -f $(srcdir)/$(PACKAGE).pot \ && mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot; \ fi cat-id-tbl.c: stamp-cat-id stamp-cat-id: $(PACKAGE).pot rm -f cat-id-tbl.tmp.c sed -f ../intl/po2tbl.sed $(srcdir)/$(PACKAGE).pot \ | sed -e "s/@PACKAGE NAME@/$(PACKAGE)/" > cat-id-tbl.tmp.c if cmp -s cat-id-tbl.tmp.c $(srcdir)/cat-id-tbl.c; then \ rm cat-id-tbl.tmp.c; \ else \ echo cat-id-tbl.c changed; \ rm -f $(srcdir)/cat-id-tbl.c; \ mv cat-id-tbl.tmp.c $(srcdir)/cat-id-tbl.c; \ fi cd $(srcdir) && rm -f stamp-cat-id && echo timestamp > stamp-cat-id install: install-exec install-data install-exec: install-data: all $(top_srcdir)/mkinstalldirs $(datadir) catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ if test "`echo $$cat | sed 's/.*\(\..*\)/\1/'`" = ".gmo"; then \ destdir=$(gnulocaledir); \ else \ destdir=$(localedir); \ fi; \ lang=`echo $$cat | sed 's/$(CATOBJEXT)$$//'`; \ dir=$$destdir/$$lang/LC_MESSAGES; \ $(top_srcdir)/mkinstalldirs $$dir; \ if test -r $$cat; then \ $(INSTALL_DATA) $$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \ else \ $(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \ fi; \ done # This installation goal is only used in GNU gettext. Packages which # only use the library should use install instead. install-src: install $(top_srcdir)/mkinstalldirs $(gettextsrcdir) cd $(srcdir) && \ $(INSTALL_DATA) Makefile.in.in $(gettextsrcdir)/po-Makefile.in.in uninstall: catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ lang=`echo $$cat | sed 's/$(CATOBJEXT)$$//'`; \ rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \ rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \ done rm -f $(gettextsrcdir)/po-Makefile.in.in check: all cat-id-tbl.o: ../intl/libgettext.h TAGS ID: mostlyclean: rm -f core core.* *.pox $(PACKAGE).po *.old.po cat-id-tbl.tmp.c clean: mostlyclean rm -f *~ distclean: clean rm -f Makefile Makefile.in POTFILES *.mo *.msg *.cat maintainer-clean: distclean @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." distdir = ../$(PACKAGE)-$(VERSION)/$(subdir) dist dist-gettext: update-po $(DISTFILES) for file in $(DISTFILES); do \ ln $(srcdir)/$$file $(distdir) 2> /dev/null \ || cp -p $(srcdir)/$$file $(distdir); \ done update-po: Makefile $(MAKE) $(PACKAGE).pot cd $(srcdir); \ catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ lang=`echo $$cat | sed 's/$(CATOBJEXT)$$//'`; \ mv $$lang.po $$lang.old.po; \ if $(TUPDATE) $(PACKAGE).pot $$lang.old.po > $$lang.po; then \ rm -f $$lang.old.po; \ else \ echo "tupdate for $$cat failed!"; \ rm -f $$lang.po; \ mv $$lang.old.po $$lang.po; \ fi; \ done POTFILES: POTFILES.in ( if test 'x$(srcdir)' != 'x.'; then \ posrcprefix='$(top_srcdir)/'; \ else \ posrcprefix="../"; \ fi; \ sed -e '/^#/d' -e '/^[ ]*$$/d' \ -e "s@.*@ $$posrcprefix& \\\\@" \ -e '$$s/\(.*\) \\/\1/' < $(srcdir)/POTFILES.in > POTFILES ) Makefile: Makefile.in.in ../config.status POTFILES cd .. && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= ./config.status # Tell versions [3.59,3.63) of GNU make not to export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: tua-4.3.orig/po/POTFILES.in0100644000175100001440000000032206075755143013635 0ustar mduserssrc/usertree.c src/tua.c src/pcdl.c src/pcdl_gram.y src/portalias.c src/porttree.c src/prochist.c src/sysalias.c src/systree.c src/reports.c src/useralias.c src/compat.c src/hdb/procuucp.c src/hdb/procuucico.c tua-4.3.orig/po/TUA.pot0100644000175100001440000001611106111147750013226 0ustar mdusersmsgid "" msgstr "" "Date: 1996-02-16 19:41:42+0100\n" "From: Lele Gai \n" "Content-Type: text/plain; charset=\n" "Xgettext-Options: --default-domain=TUA --directory=.. --add-comments --keyword=_ --keyword=N_ --files-from=./POTFILES.in\n" "Files: src/usertree.c src/tua.c src/pcdl.c src/pcdl_gram.y src/portalias.c src/porttree.c src/prochist.c src/sysalias.c src/systree.c src/reports.c src/useralias.c src/compat.c src/hdb/procuucp.c src/hdb/procuucico.c\n" #: src/usertree.c:123 msgid "Wrong number of Parameters: %s needs just one UserName" msgstr "" #: src/tua.c:39 msgid "Error in processing %s\n" msgstr "" #: src/tua.c:365 msgid "Bad -f argument. Error factor fixed to %.1f\n" msgstr "" #: src/tua.c:558 src/tua.c:574 src/tua.c:580 msgid "UNKNOWN" msgstr "" #: src/tua.c:664 msgid "" "There is an error in %s...\n" "\t%s\n" msgstr "" #: src/tua.c:675 msgid "" "\n" "Countries I know about:\n" msgstr "" #: src/tua.c:678 msgid "Cannot parse pcd file '%s'. Ignoring.\n" msgstr "" #: src/tua.c:680 msgid "Country '%s' not found. I will omit phone costs.\n" msgstr "" #: src/tua.c:737 msgid "" "%s UUCP Analysis for ``%s'',\n" " since %s to %s (%d day(s))\n" "\n" msgstr "" #: src/tua.c:762 msgid "whistory: probably you need uucp's write permission" msgstr "" #: src/tua.c:766 msgid "" "%s UUCP Analysis for ``%s''\n" "\n" msgstr "" #: src/tua.c:803 msgid "Wrong number of Parameters: %s needs a LongOption name" msgstr "" #: src/tua.c:829 msgid "%s: option '%s' not found!" msgstr "" #: src/tua.c:864 src/tua.c:867 msgid "More> " msgstr "" #: src/tua.c:929 msgid "TclError" msgstr "" #: src/tua.c:931 msgid "TclError %d" msgstr "" #: src/pcdl.c:123 src/pcdl.c:133 msgid "overlapping slots: " msgstr "" #: src/pcdl.c:124 src/pcdl.c:134 msgid "{ rate %d, %s at line %d } and " msgstr "" #: src/pcdl.c:126 src/pcdl.c:136 msgid "{ rate %d, %s at line %d }\n" msgstr "" #: src/pcdl.c:214 msgid "overlapping costs!" msgstr "" #: src/pcdl.c:320 msgid "Rate symbol " msgstr "" #: src/pcdl.c:321 msgid "%s not yet defined!\n" msgstr "" #: src/pcdl_gram.y:415 msgid "error: symbol %.30s... too long!\n" msgstr "" #: src/portalias.c:132 msgid "Wrong number of Parameters: %s needs an PortName and its Alias" msgstr "" #: src/portalias.c:151 msgid "Wrong number of Parameters: %s needs an PortName and its GlobAlias" msgstr "" #: src/porttree.c:138 msgid "Wrong number of Parameters: %s needs just one PortName" msgstr "" #: src/sysalias.c:131 msgid "Wrong number of Parameters: %s needs an SystemName and its Alias" msgstr "" #: src/sysalias.c:150 msgid "Wrong number of Parameters: %s needs an SystemName and its GlobAlias" msgstr "" #: src/systree.c:161 msgid "Wrong number of Parameters: %s needs just one SystemName" msgstr "" #: src/reports.c:87 src/reports.c:142 src/reports.c:217 msgid "" "\tCommands:\n" "\t=========" msgstr "" #: src/reports.c:109 msgid "" "By System:\n" "==========" msgstr "" #: src/reports.c:110 msgid " R E C E I V E D S E N T" msgstr "" #: src/reports.c:111 msgid "System Files KBytes Time ATP Files KBytes Time ATP\n" msgstr "" #: src/reports.c:126 msgid "" "\n" "Commands By System:\n" "===================" msgstr "" #: src/reports.c:163 src/reports.c:180 msgid "" "\n" "By User:\n" "========" msgstr "" #: src/reports.c:164 msgid " S E N T" msgstr "" #: src/reports.c:165 msgid "User Files KBytes Time\n" msgstr "" #: src/reports.c:238 src/reports.c:269 msgid "" "\n" "By Day:\n" "=======" msgstr "" #: src/reports.c:246 msgid "Date R E C E I V E D S E N T" msgstr "" #: src/reports.c:247 msgid "Mo/Dy Files KBytes Time Files KBytes Time\n" msgstr "" #. HDB_UUCP #: src/reports.c:256 msgid " Date R E C E I V E D S E N T" msgstr "" #: src/reports.c:257 msgid "Year/Mo/Dy Files KBytes Time Files KBytes Time\n" msgstr "" #: src/reports.c:287 msgid "\tReceived %10.0f (%4u Files) in %s: %4d cps\n" msgstr "" #: src/reports.c:290 msgid "\tSent %10.0f (%4u Files) in %s: %4d cps\n" msgstr "" #: src/reports.c:294 msgid "\tReceived %10.0f bytes more than sent.\n" msgstr "" #: src/reports.c:297 msgid "\tSent %10.0f bytes more than received.\n" msgstr "" #: src/reports.c:302 msgid "\tThe system has been connected for %s" msgstr "" #: src/reports.c:306 msgid " (%3.1f%% of dead time)\n" msgstr "" #: src/reports.c:317 msgid "\t\tentirely payed by the local system.\n" msgstr "" #: src/reports.c:320 msgid "\t\tof which %s (%5.1f%%) are payed by the local system\n" msgstr "" #: src/reports.c:324 msgid "\t\t and %s (%5.1f%%) by this system.\n" msgstr "" #: src/reports.c:330 msgid "\t\tentirely payed by this system.\n" msgstr "" #: src/reports.c:348 msgid "Spent " msgstr "" #: src/reports.c:369 msgid " in %s\n" msgstr "" #: src/reports.c:378 msgid "\tLast connection: %s\n" msgstr "" #: src/reports.c:380 msgid "" "\tThere have been %u call(s) (with an average of %.1f Ok/day):\n" "\t\t\t\t\t" msgstr "" #: src/reports.c:386 msgid "" "%3u OK (%3u IN, %3u OUT, %3u STOPPED)\n" "\t\t\t\t\t" msgstr "" #: src/reports.c:390 msgid "" "%3u OK (%3u IN, %3u OUT)\n" "\t\t\t\t\t" msgstr "" #: src/reports.c:394 msgid "%3u FAILED\n" msgstr "" #: src/reports.c:400 msgid "\tThere have been %u failed calls\n" msgstr "" #: src/reports.c:408 msgid "" "\n" "SUMMARY by System:\n" "==================" msgstr "" #: src/reports.c:462 src/reports.c:515 msgid "| | R E C E I V E D | S E N T | |" msgstr "" #: src/reports.c:463 src/reports.c:516 msgid "| SYSTEM | KiloBytes : Time : Files | KiloBytes : Time : Files | ATP |" msgstr "" #: src/reports.c:473 src/reports.c:520 msgid "| TOTALS | %s :%10.10s: %5u | %s :%10.10s: %5u | ####|\n" msgstr "" #: src/reports.c:513 msgid "" "\n" "...and since %s\n" msgstr "" #: src/reports.c:575 msgid "" "\n" "\n" "Last 12 Months Activity\n" "=======================\n" msgstr "" #: src/reports.c:577 msgid "System" msgstr "" #: src/reports.c:587 msgid "TOTALS" msgstr "" #: src/reports.c:633 msgid "" "\n" "\n" "Global Hourly Activity (on a 20 minutes basis)\n" "==============================================" msgstr "" #: src/reports.c:637 msgid "" "\n" "\n" "Hourly Activity (on a 20 minutes basis) on %s\n" "======================================================\n" msgstr "" #: src/reports.c:639 msgid "" "Max Value : %.0f bytes\n" "Scale : '#'= %.0f bytes\n" "\n" msgstr "" #: src/reports.c:833 src/reports.c:867 src/reports.c:901 msgid "%s: system %s is unknown to me" msgstr "" #: src/reports.c:935 msgid "%s: user %s is unknown to me" msgstr "" #: src/reports.c:961 msgid "%s: port %s is unknown to me" msgstr "" #: src/reports.c:978 msgid "%s: Unknown report requested: I know about 'systems', 'users', 'ports' and 'daily' only" msgstr "" #: src/useralias.c:130 msgid "Wrong number of Parameters: %s needs an UserName and its Alias" msgstr "" #: src/useralias.c:149 msgid "Wrong number of Parameters: %s needs an UserName and its GlobAlias" msgstr "" #: src/compat.c:38 msgid "Out of memory!\n" msgstr "" tua-4.3.orig/po/stamp-cat-id0100644000175100001440000000001206111147752014252 0ustar mduserstimestamp tua-4.3.orig/po/it.po0100644000175100001440000002525006111151455013026 0ustar mdusersmsgid "" msgstr "" "Date: 1995-08-02 15:46:03+0200\n" "From: Lele Gai \n" "Xgettext-Options: --default-domain=TUA --output-dir=. --add-comments --keyword=_\n" "Files: ../src/usertree.c ../src/tua.c ../src/pcdl.c ../src/pcdl_gram.y\n" " ../src/portalias.c ../src/porttree.c ../src/prochist.c\n" " ../src/sysalias.c ../src/systree.c ../src/reports.c\n" " ../src/useralias.c ../src/compat.c ../src/hdb/procuucp.c\n" " ../src/hdb/procuucico.c\n" #: src/usertree.c:123 msgid "Wrong number of Parameters: %s needs just one UserName" msgstr "Errato numero di parametri: %s richiede solo in NomeUtente" #: src/tua.c:39 msgid "Error in processing %s\n" msgstr "Errore nell'esecuzione di %s\n" #: src/tua.c:365 msgid "Bad -f argument. Error factor fixed to %.1f\n" msgstr "Argomento sbagliato all'opzione -f. Fattore di correzione fissato a %.1f\n" #: src/tua.c:558 src/tua.c:574 src/tua.c:580 msgid "UNKNOWN" msgstr "SCONOSCIUTO" #: src/tua.c:664 msgid "" "There is an error in %s...\n" "\t%s\n" msgstr "" "C'e` un errore in %s...\n" "\t%s\n" #: src/tua.c:675 msgid "" "\n" "Countries I know about:\n" msgstr "\nNazioni che conosco:\n" #: src/tua.c:678 msgid "Cannot parse pcd file '%s'. Ignoring.\n" msgstr "Non riesco a comprendere il contenuto di '%s'. Lo ignoro.\n" #: src/tua.c:680 msgid "Country '%s' not found. I will omit phone costs.\n" msgstr "Non ho trovato la nazione '%s'. Omettero' i costi telefonici.\n" #: src/tua.c:737 msgid "" "%s UUCP Analysis for ``%s'',\n" " since %s to %s (%d day(s))\n" "\n" msgstr "" "Analisi %s UUCP del nodo ``%s'',\n" " da %s fino a %s (%d giorni)\n" "\n" #: src/tua.c:762 msgid "whistory: probably you need uucp's write permission" msgstr "whistory: probabilmente non hai i permessi necessari." #: src/tua.c:766 msgid "" "%s UUCP Analysis for ``%s''\n" "\n" msgstr "Analisi %s UUCP del nodo ``%s''\n\n" #: src/tua.c:803 msgid "Wrong number of Parameters: %s needs a LongOption name" msgstr "Errato numero di parametri: %s richiede solo un nome di opzione" #: src/tua.c:829 msgid "%s: option '%s' not found!" msgstr "%s: opzione '%s' non trovata!" #: src/tua.c:864 src/tua.c:867 msgid "More> " msgstr "...> " #: src/tua.c:929 msgid "TclError" msgstr "Errore TCL" #: src/tua.c:931 msgid "TclError %d" msgstr "Errore TCL %d" #: src/pcdl.c:123 src/pcdl.c:133 msgid "overlapping slots: " msgstr "Ci sono slots sovrapposti: " #: src/pcdl.c:124 src/pcdl.c:134 msgid "{ rate %d, %s at line %d } and " msgstr "{ costo %d, %s alla linea %d } e \n" #: src/pcdl.c:126 src/pcdl.c:136 msgid "{ rate %d, %s at line %d }\n" msgstr "{ costo %d, %s alla linea %d }\n" #: src/pcdl.c:214 msgid "overlapping costs!" msgstr "Ci sono costi sovrapposti!" #: src/pcdl.c:320 msgid "Rate symbol " msgstr "Valuta " #: src/pcdl.c:321 msgid "%s not yet defined!\n" msgstr "%s non ancora definito!\n" #: src/pcdl_gram.y:415 msgid "error: symbol %.30s... too long!\n" msgstr "Errore: il simbolo %.30s... e' troppo lungo!\n" #: src/portalias.c:132 msgid "Wrong number of Parameters: %s needs an PortName and its Alias" msgstr "Errato numero di parametri: %s richiede NomePorta e il suo Alias" #: src/portalias.c:151 msgid "Wrong number of Parameters: %s needs an PortName and its GlobAlias" msgstr "Errato numero di parametri: %s richiede NomePorta e il suo GlobAlias" #: src/porttree.c:138 msgid "Wrong number of Parameters: %s needs just one PortName" msgstr "Errato numero di parametri: %s richiede NomePorta" #: src/sysalias.c:131 msgid "Wrong number of Parameters: %s needs an SystemName and its Alias" msgstr "Errato numero di parametri: %s richiede NomeSistema e il suo Alias " #: src/sysalias.c:150 msgid "Wrong number of Parameters: %s needs an SystemName and its GlobAlias" msgstr "Errato numero di parametri: %s richiede NomeSistema e il suo GlobAlias" #: src/systree.c:161 msgid "Wrong number of Parameters: %s needs just one SystemName" msgstr "Errato numero di parametri: %s richiede NomeSistema" #: src/reports.c:87 src/reports.c:142 src/reports.c:217 msgid "" "\tCommands:\n" "\t=========" msgstr "" "\tComandi:\n" "\t========" #: src/reports.c:109 msgid "" "By System:\n" "==========" msgstr "" "Per Sistema:\n" "============" #: src/reports.c:110 msgid " R E C E I V E D S E N T" msgstr " R I C E V U T O S P E D I T O" #: src/reports.c:111 msgid "System Files KBytes Time ATP Files KBytes Time ATP\n" msgstr "Sistema Files KBytes Tempo ATP Files KBytes Tempo ATP\n" #: src/reports.c:126 msgid "" "\n" "Commands By System:\n" "===================" msgstr "" "\n" "Comandi Per Sistema:\n" "====================" #: src/reports.c:163 src/reports.c:180 msgid "" "\n" "By User:\n" "========" msgstr "" "\n" "Per Utente:\n" "===========" #: src/reports.c:164 msgid " S E N T" msgstr " S P E D I T O" #: src/reports.c:165 msgid "User Files KBytes Time\n" msgstr "Utente Files KBytes Tempo\n" #: src/reports.c:238 src/reports.c:269 msgid "" "\n" "By Day:\n" "=======" msgstr "" "\n" "Cronologicamente:\n" "=================" #: src/reports.c:246 msgid "Date R E C E I V E D S E N T" msgstr "Data R I C E V U T O S P E D I T O" #: src/reports.c:247 msgid "Mo/Dy Files KBytes Time Files KBytes Time\n" msgstr "Me/Gi Files KBytes Tempo Files KBytes Tempo\n" #. HDB_UUCP #: src/reports.c:256 msgid " Date R E C E I V E D S E N T" msgstr " Data R I C E V U T O S P E D I T O" #: src/reports.c:257 msgid "Year/Mo/Dy Files KBytes Time Files KBytes Time\n" msgstr "Anno/Me/Gi Files KBytes Tempo Files KBytes Tempo\n" #: src/reports.c:287 msgid "\tReceived %10.0f (%4u Files) in %s: %4d cps\n" msgstr "\tRicevuti %10.0f (%4u Files) in %s: %4d cps\n" #: src/reports.c:290 msgid "\tSent %10.0f (%4u Files) in %s: %4d cps\n" msgstr "\tSpediti %10.0f (%4u Files) in %s: %4d cps\n" #: src/reports.c:294 msgid "\tReceived %10.0f bytes more than sent.\n" msgstr "\tRicevuti %10.0f bytes in piu' di quelli spediti.\n" #: src/reports.c:297 msgid "\tSent %10.0f bytes more than received.\n" msgstr "\tSpediti %10.0f bytes in piu' di quelli ricevuti.\n" #: src/reports.c:302 msgid "\tThe system has been connected for %s" msgstr "\tIl sistema e' stato connesso per %s" #: src/reports.c:306 msgid " (%3.1f%% of dead time)\n" msgstr " (%3.1f%% di tempi morti)\n" #: src/reports.c:317 msgid "\t\tentirely payed by the local system.\n" msgstr "\t\tinteramente pagati dal sistema locale.\n" #: src/reports.c:320 msgid "\t\tof which %s (%5.1f%%) are payed by the local system\n" msgstr "\t\tdei quali %s (%5.1f%%) sono pagati dal sistema locale\n" #: src/reports.c:324 msgid "\t\t and %s (%5.1f%%) by this system.\n" msgstr "\t\t e %s (%5.1f%%) da questo sistema.\n" #: src/reports.c:330 msgid "\t\tentirely payed by this system.\n" msgstr "\t\tinteramente pagati da questo sistema.\n" #: src/reports.c:348 msgid "Spent " msgstr "Impiegato " #: src/reports.c:369 msgid " in %s\n" msgstr "" #: src/reports.c:378 msgid "\tLast connection: %s\n" msgstr "\tUltima connessione: %s\n" #: src/reports.c:380 msgid "" "\tThere have been %u call(s) (with an average of %.1f Ok/day):\n" "\t\t\t\t\t" msgstr "" "\tCi sono state %u chiamate (con una media di %.1f Ok/giorno):\n" "\t\t\t\t\t" #: src/reports.c:386 msgid "" "%3u OK (%3u IN, %3u OUT, %3u STOPPED)\n" "\t\t\t\t\t" msgstr "" "%3u OK (%3u in entrata, %3u in uscita,\n" "\t\t\t\t\t %3u malriuscite)\n" "\t\t\t\t\t" #: src/reports.c:390 msgid "" "%3u OK (%3u IN, %3u OUT)\n" "\t\t\t\t\t" msgstr "" "%3u OK (%3u in entrata, %3u in uscita)\n" "\t\t\t\t\t" #: src/reports.c:394 msgid "%3u FAILED\n" msgstr "%3u fallite\n" #: src/reports.c:400 msgid "\tThere have been %u failed calls\n" msgstr "Ci sono state %u chiamate fallite\n" #: src/reports.c:408 msgid "" "\n" "SUMMARY by System:\n" "==================" msgstr "" "\n" "SOMMARIO per Sistema:\n" "=====================" #: src/reports.c:462 src/reports.c:515 msgid "| | R E C E I V E D | S E N T | |" msgstr "| | R I C E V U T O | S P E D I T O | |" #: src/reports.c:463 src/reports.c:516 msgid "| SYSTEM | KiloBytes : Time : Files | KiloBytes : Time : Files | ATP |" msgstr "| SISTEMA| KiloBytes : Tempo : Files | KiloBytes : Tempo : Files | ATP |" #: src/reports.c:473 src/reports.c:520 msgid "| TOTALS | %s :%10.10s: %5u | %s :%10.10s: %5u | ####|\n" msgstr "| TOTALI | %s :%10.10s: %5u | %s :%10.10s: %5u | ####|\n" #: src/reports.c:513 msgid "" "\n" "...and since %s\n" msgstr "\n...e dal %s\n" #: src/reports.c:575 msgid "" "\n" "\n" "Last 12 Months Activity\n" "=======================\n" msgstr "" "\n" "\n" "Attivita' negli ultimi 12 mesi\n" "==============================\n" #: src/reports.c:577 msgid "System" msgstr "Sistema" #: src/reports.c:587 msgid "TOTALS" msgstr "TOTALI" #: src/reports.c:633 msgid "" "\n" "\n" "Global Hourly Activity (on a 20 minutes basis)\n" "==============================================" msgstr "" "\n" "\n" "Attivita' oraria globale (su periodo di 20 minuti)\n" "==================================================" #: src/reports.c:637 msgid "" "\n" "\n" "Hourly Activity (on a 20 minutes basis) on %s\n" "======================================================\n" msgstr "" "\n" "\n" "Attivita' oraria (su periodo di 20 minuti) sulla porta %s\n" "=================================================================\n" #: src/reports.c:639 msgid "" "Max Value : %.0f bytes\n" "Scale : '#'= %.0f bytes\n" "\n" msgstr "" "Picco massimo : %.0f bytes\n" "Scala : '#'=%.0f bytes\n" "\n" #: src/reports.c:833 src/reports.c:867 src/reports.c:901 msgid "%s: system %s is unknown to me" msgstr "%s: sistema %s sconosciuto" #: src/reports.c:935 msgid "%s: user %s is unknown to me" msgstr "%s: utente %s sconosciuto" #: src/reports.c:961 msgid "%s: port %s is unknown to me" msgstr "%s: porta %s sconosciuta" #: src/reports.c:978 msgid "%s: Unknown report requested: I know about 'systems', 'users', 'ports' and 'daily' only" msgstr "%s: richiesta di report sconosciuta; conosco: 'systems', 'users', 'ports' and 'daily'." #: src/useralias.c:130 msgid "Wrong number of Parameters: %s needs an UserName and its Alias" msgstr "Errato numero di parametri: %s richiede un NomeUtente ed il suo Alias" #: src/useralias.c:149 msgid "Wrong number of Parameters: %s needs an UserName and its GlobAlias" msgstr "Errato numero di parametri: %s richiede un NomeUtente ed il suo GlobAlias" #: src/compat.c:38 msgid "Out of memory!\n" msgstr "La memoria e' finita!\n" # # tua-4.3.orig/po/it.gmo0100644000175100001440000002122306111151456013167 0ustar mdusers•ÞNŒkü¨(©&Ò!ù6Rh,~'«,Ó+%,CR!–_¸g 2 € ³ Å Ö( é & , SB s; ¶ ò  + 6 b; € ¼W Ñ ) D a €,  Ê& à1 6 9 p8 ˆ@ Á &-P4…Œ •¡Á&É6ð>'Bf@©Dê>/Bn6±8è6!EX!žÀÓ3ç7NWN¦7õš-,È)õ(8H•,®2Û,3;$oC”"Øgû~c@â #$1V*oš,±"ÞE>G† ¡,®JÛ!&@H‰V¢ù0KIe¯:É>9C}>›AÚ"9 ALPT¥ ¬ ·Å â'î?@VD—CÜF EgI­1÷3 ): ]F ˜- ß! !(5!D!z"!šN!½N" 7"[@L%93+H=(7 !?41>,<'M$.K/N-E #CBD *560 ):8 & JFIGA2"; and %s (%5.1f%%) by this system. entirely payed by the local system. entirely payed by this system. of which %s (%5.1f%%) are payed by the local system Commands: ========= Last connection: %s Received %10.0f (%4u Files) in %s: %4d cps Received %10.0f bytes more than sent. Sent %10.0f (%4u Files) in %s: %4d cps Sent %10.0f bytes more than received. The system has been connected for %s There have been %u call(s) (with an average of %.1f Ok/day): There have been %u failed calls Global Hourly Activity (on a 20 minutes basis) ============================================== Hourly Activity (on a 20 minutes basis) on %s ====================================================== Last 12 Months Activity ======================= ...and since %s By Day: ======= By User: ======== Commands By System: =================== Countries I know about: SUMMARY by System: ================== S E N T R E C E I V E D S E N T Date R E C E I V E D S E N T (%3.1f%% of dead time) %3u FAILED %3u OK (%3u IN, %3u OUT) %3u OK (%3u IN, %3u OUT, %3u STOPPED) %s UUCP Analysis for ``%s'' %s UUCP Analysis for ``%s'', since %s to %s (%d day(s)) %s not yet defined! %s: Unknown report requested: I know about 'systems', 'users', 'ports' and 'daily' only%s: option '%s' not found!%s: port %s is unknown to me%s: system %s is unknown to me%s: user %s is unknown to meBad -f argument. Error factor fixed to %.1f By System: ==========Cannot parse pcd file '%s'. Ignoring. Country '%s' not found. I will omit phone costs. Date R E C E I V E D S E N TError in processing %s Max Value : %.0f bytes Scale : '#'= %.0f bytes Mo/Dy Files KBytes Time Files KBytes Time More> Out of memory! Rate symbol Spent SystemSystem Files KBytes Time ATP Files KBytes Time ATP TOTALSTclErrorTclError %dThere is an error in %s... %s UNKNOWNUser Files KBytes Time Wrong number of Parameters: %s needs a LongOption nameWrong number of Parameters: %s needs an PortName and its AliasWrong number of Parameters: %s needs an PortName and its GlobAliasWrong number of Parameters: %s needs an SystemName and its AliasWrong number of Parameters: %s needs an SystemName and its GlobAliasWrong number of Parameters: %s needs an UserName and its AliasWrong number of Parameters: %s needs an UserName and its GlobAliasWrong number of Parameters: %s needs just one PortNameWrong number of Parameters: %s needs just one SystemNameWrong number of Parameters: %s needs just one UserNameYear/Mo/Dy Files KBytes Time Files KBytes Time error: symbol %.30s... too long! overlapping costs!overlapping slots: whistory: probably you need uucp's write permission{ rate %d, %s at line %d } { rate %d, %s at line %d } and | | R E C E I V E D | S E N T | || SYSTEM | KiloBytes : Time : Files | KiloBytes : Time : Files | ATP || TOTALS | %s :%10.10s: %5u | %s :%10.10s: %5u | ####| Date: 1995-08-02 15:46:03+0200 From: Lele Gai Xgettext-Options: --default-domain=TUA --output-dir=. --add-comments --keyword=_ Files: ../src/usertree.c ../src/tua.c ../src/pcdl.c ../src/pcdl_gram.y ../src/portalias.c ../src/porttree.c ../src/prochist.c ../src/sysalias.c ../src/systree.c ../src/reports.c ../src/useralias.c ../src/compat.c ../src/hdb/procuucp.c ../src/hdb/procuucico.c e %s (%5.1f%%) da questo sistema. interamente pagati dal sistema locale. interamente pagati da questo sistema. dei quali %s (%5.1f%%) sono pagati dal sistema locale Comandi: ======== Ultima connessione: %s Ricevuti %10.0f (%4u Files) in %s: %4d cps Ricevuti %10.0f bytes in piu' di quelli spediti. Spediti %10.0f (%4u Files) in %s: %4d cps Spediti %10.0f bytes in piu' di quelli ricevuti. Il sistema e' stato connesso per %s Ci sono state %u chiamate (con una media di %.1f Ok/giorno): Ci sono state %u chiamate fallite Attivita' oraria globale (su periodo di 20 minuti) ================================================== Attivita' oraria (su periodo di 20 minuti) sulla porta %s ================================================================= Attivita' negli ultimi 12 mesi ============================== ...e dal %s Cronologicamente: ================= Per Utente: =========== Comandi Per Sistema: ==================== Nazioni che conosco: SOMMARIO per Sistema: ===================== S P E D I T O R I C E V U T O S P E D I T O Data R I C E V U T O S P E D I T O (%3.1f%% di tempi morti) %3u fallite %3u OK (%3u in entrata, %3u in uscita) %3u OK (%3u in entrata, %3u in uscita, %3u malriuscite) Analisi %s UUCP del nodo ``%s'' Analisi %s UUCP del nodo ``%s'', da %s fino a %s (%d giorni) %s non ancora definito! %s: richiesta di report sconosciuta; conosco: 'systems', 'users', 'ports' and 'daily'.%s: opzione '%s' non trovata!%s: porta %s sconosciuta%s: sistema %s sconosciuto%s: utente %s sconosciutoArgomento sbagliato all'opzione -f. Fattore di correzione fissato a %.1f Per Sistema: ============Non riesco a comprendere il contenuto di '%s'. Lo ignoro. Non ho trovato la nazione '%s'. Omettero' i costi telefonici. Data R I C E V U T O S P E D I T OErrore nell'esecuzione di %s Picco massimo : %.0f bytes Scala : '#'=%.0f bytes Me/Gi Files KBytes Tempo Files KBytes Tempo ...> La memoria e' finita! Valuta Impiegato SistemaSistema Files KBytes Tempo ATP Files KBytes Tempo ATP TOTALIErrore TCLErrore TCL %dC'e` un errore in %s... %s SCONOSCIUTOUtente Files KBytes Tempo Errato numero di parametri: %s richiede solo un nome di opzioneErrato numero di parametri: %s richiede NomePorta e il suo AliasErrato numero di parametri: %s richiede NomePorta e il suo GlobAliasErrato numero di parametri: %s richiede NomeSistema e il suo Alias Errato numero di parametri: %s richiede NomeSistema e il suo GlobAliasErrato numero di parametri: %s richiede un NomeUtente ed il suo AliasErrato numero di parametri: %s richiede un NomeUtente ed il suo GlobAliasErrato numero di parametri: %s richiede NomePortaErrato numero di parametri: %s richiede NomeSistemaErrato numero di parametri: %s richiede solo in NomeUtenteAnno/Me/Gi Files KBytes Tempo Files KBytes Tempo Errore: il simbolo %.30s... e' troppo lungo! Ci sono costi sovrapposti!Ci sono slots sovrapposti: whistory: probabilmente non hai i permessi necessari.{ costo %d, %s alla linea %d } { costo %d, %s alla linea %d } e | | R I C E V U T O | S P E D I T O | || SISTEMA| KiloBytes : Tempo : Files | KiloBytes : Tempo : Files | ATP || TOTALI | %s :%10.10s: %5u | %s :%10.10s: %5u | ####| tua-4.3.orig/po/cat-id-tbl.c0100644000175100001440000001056206111147752014143 0ustar mdusers/* Automatically generated by po2tbl.sed from TUA.pot. */ #if HAVE_CONFIG_H # include #endif #include "libgettext.h" const struct _msg_ent _msg_tbl[] = { {"", 1}, {"Wrong number of Parameters: %s needs just one UserName", 2}, {"Error in processing %s\n", 3}, {"Bad -f argument. Error factor fixed to %.1f\n", 4}, {"UNKNOWN", 5}, {"\ There is an error in %s...\n\ \t%s\n", 6}, {"\ \n\ Countries I know about:\n", 7}, {"Cannot parse pcd file '%s'. Ignoring.\n", 8}, {"Country '%s' not found. I will omit phone costs.\n", 9}, {"\ %s UUCP Analysis for ``%s'',\n\ since %s to %s (%d day(s))\n\ \n", 10}, {"whistory: probably you need uucp's write permission", 11}, {"\ %s UUCP Analysis for ``%s''\n\ \n", 12}, {"Wrong number of Parameters: %s needs a LongOption name", 13}, {"%s: option '%s' not found!", 14}, {"More> ", 15}, {"TclError", 16}, {"TclError %d", 17}, {"overlapping slots: ", 18}, {"{ rate %d, %s at line %d } and ", 19}, {"{ rate %d, %s at line %d }\n", 20}, {"overlapping costs!", 21}, {"Rate symbol ", 22}, {"%s not yet defined!\n", 23}, {"error: symbol %.30s... too long!\n", 24}, {"Wrong number of Parameters: %s needs an PortName and its Alias", 25}, {"Wrong number of Parameters: %s needs an PortName and its GlobAlias", 26}, {"Wrong number of Parameters: %s needs just one PortName", 27}, {"Wrong number of Parameters: %s needs an SystemName and its Alias", 28}, {"Wrong number of Parameters: %s needs an SystemName and its GlobAlias", 29}, {"Wrong number of Parameters: %s needs just one SystemName", 30}, {"\ \tCommands:\n\ \t=========", 31}, {"\ By System:\n\ ==========", 32}, {" R E C E I V E D S E N T", 33}, {"System Files KBytes Time ATP Files KBytes Time ATP\n", 34}, {"\ \n\ Commands By System:\n\ ===================", 35}, {"\ \n\ By User:\n\ ========", 36}, {" S E N T", 37}, {"User Files KBytes Time\n", 38}, {"\ \n\ By Day:\n\ =======", 39}, {"Date R E C E I V E D S E N T", 40}, {"Mo/Dy Files KBytes Time Files KBytes Time\n", 41}, {" Date R E C E I V E D S E N T", 42}, {"Year/Mo/Dy Files KBytes Time Files KBytes Time\n", 43}, {"\tReceived %10.0f (%4u Files) in %s: %4d cps\n", 44}, {"\tSent %10.0f (%4u Files) in %s: %4d cps\n", 45}, {"\tReceived %10.0f bytes more than sent.\n", 46}, {"\tSent %10.0f bytes more than received.\n", 47}, {"\tThe system has been connected for %s", 48}, {" (%3.1f%% of dead time)\n", 49}, {"\t\tentirely payed by the local system.\n", 50}, {"\t\tof which %s (%5.1f%%) are payed by the local system\n", 51}, {"\t\t and %s (%5.1f%%) by this system.\n", 52}, {"\t\tentirely payed by this system.\n", 53}, {"Spent ", 54}, {" in %s\n", 55}, {"\tLast connection: %s\n", 56}, {"\ \tThere have been %u call(s) (with an average of %.1f Ok/day):\n\ \t\t\t\t\t", 57}, {"\ %3u OK (%3u IN, %3u OUT, %3u STOPPED)\n\ \t\t\t\t\t", 58}, {"\ %3u OK (%3u IN, %3u OUT)\n\ \t\t\t\t\t", 59}, {"%3u FAILED\n", 60}, {"\tThere have been %u failed calls\n", 61}, {"\ \n\ SUMMARY by System:\n\ ==================", 62}, {"| | R E C E I V E D | S E N T | |", 63}, {"| SYSTEM | KiloBytes : Time : Files | KiloBytes : Time : Files | ATP |", 64}, {"| TOTALS | %s :%10.10s: %5u | %s :%10.10s: %5u | ####|\n", 65}, {"\ \n\ ...and since %s\n", 66}, {"\ \n\ \n\ Last 12 Months Activity\n\ =======================\n", 67}, {"System", 68}, {"TOTALS", 69}, {"\ \n\ \n\ Global Hourly Activity (on a 20 minutes basis)\n\ ==============================================", 70}, {"\ \n\ \n\ Hourly Activity (on a 20 minutes basis) on %s\n\ ======================================================\n", 71}, {"\ Max Value : %.0f bytes\n\ Scale : '#'= %.0f bytes\n\ \n", 72}, {"%s: system %s is unknown to me", 73}, {"%s: user %s is unknown to me", 74}, {"%s: port %s is unknown to me", 75}, {"%s: Unknown report requested: I know about 'systems', 'users', 'ports' and 'daily' only", 76}, {"Wrong number of Parameters: %s needs an UserName and its Alias", 77}, {"Wrong number of Parameters: %s needs an UserName and its GlobAlias", 78}, {"Out of memory!\n", 79}, }; int _msg_tbl_length = 79; tua-4.3.orig/src/0040755000175100001440000000000007103113674012225 5ustar mduserstua-4.3.orig/src/ChangeLog0100644000175100001440000000263406110061351013770 0ustar mdusersTue Feb 13 11:06:48 1996 Lele Gaifax * pcdl.c (pcdl_print_country): Print names as letters instead of numbers. Handle the call_cost field too. Mon Feb 5 10:50:39 1996 Lele Gaifax * tua.c (main): look in LIBDIR for the TCL init file if its pathname is not absolute. * customize.h (TUA_INIT_SCRIPT): Stripped the path: look in LIBDIR for the file. * pcdl.h (pcd_rate_call_cost): declare. * pcdl_gram.y (hour): Permit to specify '.' as the separator between hours and minutes. * tua.c (DisplayUsage): Print as my email address, not the real-but-not-working . * reports.c (print_the_system_summary): Add the fixed cost of the call to the total, if given. * pcdl.c (pcd_rate_call_cost): new function. Sun Feb 4 12:06:35 1996 Lele Gaifax * pcdl_gram.y: simplified by removing the obsolete way of using numbers instead of band names. (cost): the statement may have the form cost H=fix-cost,norm-cost; to specify a fixed cost just for the call. Sat Feb 3 16:43:37 1996 Lele Gaifax * pcdl.h (struct pcdl_names): Added a float to keep the cost of the call. * Makefile.in: Corrected some variable autoconf value. Sat Jan 13 20:32:26 1996 Lele Gaifax * Makefile.in (DISTFILES): Distribuite ChangeLog and Makefile.in tua-4.3.orig/src/Makefile.in0100644000175100001440000001123606110060320014254 0ustar mdusers# Makefile for "The Uucp Analyzer" sources # # This file is part of TUA. # # Copyright (C) 1991,96 Lele Gaifax # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # PACKAGE = @PACKAGE@ VERSION = @VERSION@ SHELL = /bin/sh @SET_MAKE@ # This subdirectory name subdir = src #### Start of system configuration section. #### srcdir=@srcdir@ top_srcdir = @top_srcdir@ VPATH=@srcdir@ INSTALL=@INSTALL@ INSTALL_PROGRAM=@INSTALL_PROGRAM@ INSTALL_DATA=@INSTALL_DATA@ prefix = @prefix@ exec_prefix = @exec_prefix@ transform = @program_transform_name@ # Where to install executables. bindir = @bindir@ # Where to install library files. libdir = @libdir@ # Where to install locale stuff datadir = @datadir@ localedir = $(datadir)/locale CC=@CC@ YACC=@YACC@ DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@ -DLIBDIR=\"$(libdir)\" LIBS = @INTLLIBS@ libtua.a @LIBS@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ LDFLAGS = @LDFLAGS@ COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) LINK = $(CC) $(LDFLAGS) -o $@ .SUFFIXES: .SUFFIXES: .c .o .c.o: $(COMPILE) $< INCLUDES = -I$(srcdir) -I.. -I../intl -I$(top_srcdir)/intl OBJECTS = @ALLOCA@ @SUPPORT_OBJECTS@ \ commtree.o compat.o daytree.o debug.o getopt.o julian.o \ pcdl.o pcdl_gram.o phonesw.o portalias.o porttree.o process.o \ prochist.o reports.o sysalias.o systree.o tmparse.o trees.o \ tua.o useralias.o usertree.o HEADERS = ansidecl.h customize.h debug.h pcdl.h trees.h tua.h SOURCES = commtree.c compat.c daytree.c \ debug.c getopt.c getopt.h globalias.h julian.c alloca.c \ pcdl.c pcdl_gram.y pcdl_gram.c phonesw.c \ portalias.c porttree.c process.c prochist.c \ globalias.c readl_supp.c reports.c sysalias.c systree.c tcl_supp.c \ tmparse.c trees.c tua.c useralias.c usertree.c wildmat.c DISTFILES = ChangeLog Makefile.in $(HEADERS) $(SOURCES) SUBDIRS = hdb taylor lib default: all TAGS-recursive all-recursive distclean-recursive maintainer-clean-recursive \ dist-recursive clean-recursive mostlyclean-recursive: Makefile for subdir in $(SUBDIRS); do \ target=`echo $@|sed 's/-recursive//'`; \ echo making $$target in $$subdir; \ (cd $$subdir && $(MAKE) $$target) || exit 1; \ done all: libtua.a tua libtua.a: all-recursive tua: $(OBJECTS) libtua.a @INTLLIBS@ $(LINK) $(OBJECTS) $(LIBS) .PHONY: check check: all ./tua $(OBJECTS): tua.h $(top_srcdir)/config.h customize.h commtree.o daytree.o portalias.o porttree.o: trees.h process.o sysalias.o systree.o trees.o useralias.o usertree.o: trees.h portalias.o useralias.o sysalias.o globalias.o: globalias.h distdir = $(top_srcdir)/$(PACKAGE)-$(VERSION)/$(subdir) dist-local: Makefile $(DISTFILES) for file in $(DISTFILES); do \ ln $$file $(distdir) \ || { echo copying $$file instead; cp -p $$file $(distdir);}; \ done for subdir in $(SUBDIRS); do \ mkdir $(distdir)/$$subdir || exit 1; \ chmod 777 $(distdir)/$$subdir; \ done dist: dist-local dist-recursive install: install-exec install-data install-exec: all $(top_srcdir)/mkinstalldirs $(bindir) $(INSTALL_PROGRAM) tua $(bindir)/`echo tua | sed '$(transform)'` install-data: uninstall: rm -f $(bindir)/`echo tua | sed '$(transform)'` tags: TAGS TAGS: TAGS-recursive TAGS-local TAGS-local: $(SOURCES) $(HEADERS) here=`pwd`; \ cd $(srcdir) && etags -o $$here/TAGS $(HEADERS) $(SOURCES) Makefile: Makefile.in $(top_srcdir)/config.status cd $(top_srcdir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status mostlyclean: mostlyclean-recursive mostlyclean-local mostlyclean-local: rm -f *.o core libtua.a clean: clean-recursive clean-local clean-local: mostlyclean-local rm -f tua *~ distclean: distclean-recursive distclean-local distclean-local: clean-local rm -f Makefile TAGS maintainer-clean: maintainer-clean-recursive maintainer-clean-local maintainer-clean-local: distclean-local @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." rm -f pcdl_gram.c pcdl_gram.c: pcdl_gram.y ${YACC} pcdl_gram.y mv y.tab.c pcdl_gram.c pcdl_gram.o: pcdl_gram.c tua-4.3.orig/src/ansidecl.h0100644000175100001440000000705406105404363014162 0ustar mdusers/* ANSI and traditional C compatability macros Copyright 1991 Free Software Foundation, Inc. This file is part of the GNU C Library. 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. */ /* ANSI and traditional C compatibility macros ANSI C is assumed if __STDC__ is #defined. Macro ANSI C definition Traditional C definition ----- ---- - ---------- ----------- - ---------- PTR `void *' `char *' LONG_DOUBLE `long double' `double' CONST `const' `' VOLATILE `volatile' `' SIGNED `signed' `' PTRCONST `void *const' `char *' DEFUN(name, arglist, args) Defines function NAME. ARGLIST lists the arguments, separated by commas and enclosed in parentheses. ARGLIST becomes the argument list in traditional C. ARGS list the arguments with their types. It becomes a prototype in ANSI C, and the type declarations in traditional C. Arguments should be separated with `AND'. For functions with a variable number of arguments, the last thing listed should be `DOTS'. DEFUN_VOID(name) Defines a function NAME, which takes no arguments. EXFUN(name, prototype) Is used in an external function declaration. In ANSI C it is `NAMEPROTOTYPE' (so PROTOTYPE should be enclosed in parentheses). In traditional C it is `NAME()'. For a function that takes no arguments, PROTOTYPE should be `(NOARGS)'. For example: extern int EXFUN(printf, (CONST char *format DOTS)); int DEFUN(fprintf, (stream, format), FILE *stream AND CONST char *format DOTS) { ... } void DEFUN_VOID(abort) { ... } */ #ifndef _ANSIDECL_H #define _ANSIDECL_H 1 /* Every source file includes this file, so they will all get the switch for lint. */ /* LINTLIBRARY */ #ifdef __STDC__ #define PTR void * #define PTRCONST void *CONST #define LONG_DOUBLE long double #define AND , #define NOARGS void #define CONST const #define VOLATILE volatile #define SIGNED signed #define DOTS , ... #define EXFUN(name, proto) name proto #define DEFUN(name, arglist, args) name(args) #define DEFUN_VOID(name) name(NOARGS) #define PROTO(type, name, arglist) type name arglist /* We could use the EXFUN macro to handle prototypes, but the name is misleading and the result is ugly. So just define a simple macro to handle the parameter lists, as in: static int foo PARAMS ((int, char)); EXFUN would do it like this: static int EXFUN (foo, (int, char)); but the function is not external... EXFUN should be considered obsolete, and new code written to use PARAMS. */ #define PARAMS(paramlist) paramlist #else /* Not ANSI C. */ #define PTR char * #define PTRCONST PTR #define LONG_DOUBLE double #define AND ; #define NOARGS #define CONST #define VOLATILE #define SIGNED #define DOTS #define EXFUN(name, proto) name() #define DEFUN(name, arglist, args) name arglist args; #define DEFUN_VOID(name) name() #define PROTO(type, name, arglist) type name () #define PARAMS(paramlist) () #endif /* ANSI C. */ #endif /* ansidecl.h */ tua-4.3.orig/src/customize.h0100644000175100001440000001157306105411520014414 0ustar mdusers/* Customizations of the TUA package * Follow the comments to adjust the configuration. * * This file is part of TUA. * * Copyright (C) 1991,96 Lele Gaifax * * 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. * */ /* * MAX PATHNAME LENGTH: * Do not define anything for Xenix boxes * This is a constant to specify the maximum length of a pathname. */ #define LPNMAX 128 /* For all the other but Xenix */ /* * HDB-Uucp CORRECTION FACTOR: * HDB-Uucp, as implemented by SCO, has a bug: it fails calculating the * connection and tranfer time. Experimentally, I found in 2.5 the right * factor to correct these values. * If your HDB is ok, do not define anything. Otherwise uncomment the next * line; I hope 2.5 is ok for you. However, if you define this constant, there * will be an option ('+hdb-factor') that lets you modify the value at * runtime. * PS: For the xenix 386 boxes, there is a SLS that corrects this bug. * It was told me that ODT 1.1 and SCO Unix 3.2.2 are ok... at least in * this! */ /* #define HDB_ERR_FACT 2.5 */ /* For broken hdb */ /* * NET_DOMAIN: * Write here your exact domain. If your gethostname(2) returns your * FQDN (Fully Qualified Domain Name) then it will be ignored. */ #define NET_DOMAIN ".sublink.org" /* * PCD Pathname: * This is the pathname of the file containing the settings needed to subdivide * the phone costs. * LIBDIR is defined in the Makefile. */ #define PCD_FILENAME LIBDIR "/TUA.pcd" #if TAYLOR_UUCP && HDB_UUCP #define BOTH_OF_THEM 1 /* Set this to FALSE if you want HDB Uucp be the default choice. */ #define DEFAULT_MODE_IS_TAYLOR TRUE #else #define BOTH_OF_THEM 0 #endif /* * DEFAULT SPOOL DIR * Default path for the uucp spool directory * */ #if TAYLOR_UUCP #define DEFAULT_TAYLOR_SPOOL_DIR "/usr/local/spool/uucp" #endif #if HDB_UUCP #define DEFAULT_HDB_SPOOL_DIR "/usr/spool/uucp" #endif /* * HDB-UUCP LOGS FILENAMES: * These are the pathname of the various logs TUA reads. * They are no absolute, because tua has a flag, for debugging, that * sets the root dir for them. If you do not specify that flag, * DEFAULT_HDB_SPOOL_DIR is used as a prefix path. */ #define XFER_NAME ".Admin/xferstats" #define UUCICO_DIR ".Log/uucico" #define UUXQT_DIR ".Log/uuxqt" #define UUX_DIR ".Log/uux" #define UUCP_DIR ".Log/uucp" /* * TAYLOR UUCP LOGS FILENAMES: * They are in DEFAULT_TAYLOR_SPOOL_DIR */ #define STATS_NAME "Stats" #define LOG_NAME "Log" /* * HISTORY FILENAME * The pathname of the history file. * It will be placed under DEFAULT_SPOOL_DIR, unless it * begins with a '/' */ #define TAYLOR_HISTORY "tua.history" #define HDB_HISTORY ".Admin/tua.history" /* * SYSTEM NAME DETERMINATION: * Specify in SYSTEMID the file that contain the name of your system if * your os uses this way to get it; Xenix can use both /etc/systemid and * uname(), but in the latter manner you have to relink the kernel to * put it in. * Leave it undefined if you want use uname() instead of a filename. */ /* #define SYSTEMID "/etc/systemid" */ /* For xenix box (if you want!) */ /* * TUA INITIALIZATION SCRIPT: * This is the pathname of a TCL script that TUA tries to load once the * command line options are evaluated. * If you didn't define USE_TCL (See Makefile), it will be completely * ignored. * If it is not absolute (doesn't begin with '/'), TUA will look for it * in the LIBDIR directory. */ #define TUA_INIT_SCRIPT "TUA_init.tcl" /* * TCL INIT COMMAND: * This is the TCL command to load and execute the Initialization Script * %s will be replaced with TUA_INIT_SCRIPT on startup. */ #define TCL_CMD "if [file exists %s] {source %s}" /* * LINE BUFFER SIZE: * This is the size for the buffers when TUA reads a single line from the * logs. */ #define LINE_BUFFER_SIZE 512 /* TAYLOR LOGS PATCH APPLIED: * Define this if you want TUA be able to extract port info from the Stats * file. In order to do to this, you must first apply the patch contained * in the file taylor/TaylorLogsPatch.diff to Taylor Uucp sources, and * recompile it. I sent this patch to Ian on 93/7/20, but I do not know * what Ian will do of it. * You can let this defined, since TUA is smart enough to recognize * non-patched logs. */ #define TAYLOR_LOGS_PATCH tua-4.3.orig/src/debug.h0100644000175100001440000000456506105405030013462 0ustar mdusers/* debug.h * Debugging declarations * * This file is part of TUA. * * Copyright (C) 1991,96 Lele Gaifax * * 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. * */ extern void EXFUN(dbg_set_current_file_name, (CONST char * filename)); extern void EXFUN(dbg_message, (CONST char * messg)); extern void EXFUN(dbg_print_new_line_number, (void)); extern void EXFUN(dbg_printf, (CONST char * fmt DOTS)); extern void EXFUN(dbg_end, (void)); #ifdef DEBUG #define debug_filename(filename) dbg_set_current_file_name(filename) #define debug_message(msg) dbg_message(msg) #define debug_newline() dbg_print_new_line_number() #define debug_end() dbg_end() /* * Here I use a gcc 2.x feature: varargs macros. In Standard C I merely * #define a name, not a macro. Unfortunately this means that a function * call will occur also if the code is compiled without -DDEBUG, since in * no way a Standard C precompiler will skip this statement... Use gcc! * * NeXTstep 3.0 uses GCC 1.93, that do not support variable arguments to * macros. Too bad that it defines __GNUC__=2!. Fortunately, I can * isolate this by checking for __NeXT that is defined only by the FSF * GCC 2.x (at least 2.4.3). * */ #if defined(__GNUC__) && (__GNUC__ >= 2) && (!defined(__NeXT__) || defined(__NeXT)) #define debug_printf(msg, args...) dbg_printf(msg, ## args) #else #define debug_printf dbg_printf #endif #else /* NO DEBUG */ #define debug_message(msg) #define debug_filename(filename) #define debug_newline() #define debug_end() #if defined(__GNUC__) && (__GNUC__ >= 2) && (!defined(__NeXT__) || defined(__NeXT)) #define debug_printf(msg, args...) #else #define debug_printf dbg_printf #endif #endif tua-4.3.orig/src/pcdl.h0100644000175100001440000000672706110071755013331 0ustar mdusers/* pcdl.h - Definitions for parsing a Phone Category Definition Language * * This file is part of TUA. * * Copyright (C) 1991,96 Lele Gaifax * * 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. * */ #ifndef _PCDL_H #define _PCDL_H /* The time table is described by a linked list of structures of this kind. */ typedef struct pcdl_slots { /* The seconds in the day when this slot starts. */ short from; /* The seconds in the day when this slot stops. */ short to; /* The cost ID of this slot. */ short cost; /* The location in the PCDL file of this object. */ short definition_line; /* The next slot in the table. */ struct pcdl_slots * next; } pcdl_slots; /* Each cost is described by a structure of this kind. */ typedef struct pcdl_names { /* The ID for this cost */ short cost; /* Its name. */ char * name; /* Number of seconds per unit of time. */ float seconds_per_unit; /* The cost of one call. */ float call_cost; /* The cost per unit of time. */ float cost_per_unit; /* The location in the PCDL file of this object. */ short definition_line; /* The next cost. */ struct pcdl_names * next; } pcdl_names; /* Each country is described by a structure of this kind. */ typedef struct pcdl_country { /* The name of the country. */ char * name; /* The name of the currency. */ char * currency; /* # of dec digits. It is really funny to think at a fraction of an Italian Lira ;-) */ short decimals; /* The linked list containing the single costs. */ pcdl_names * names; /* The phone time table. */ pcdl_slots * slots[7]; /* slots[0] = sunday, ... */ } pcdl_country; extern pcdl_slots * EXFUN(pcdl_create_new_slot, (NOARGS)); extern pcdl_slots * EXFUN(pcdl_insert_slot, (pcdl_slots * slot, pcdl_slots * slot_list)); extern pcdl_slots * EXFUN(pcdl_merge_slots, (pcdl_slots * slot_list1, pcdl_slots * slot_list2)); extern pcdl_names * EXFUN(pcdl_create_new_name, (NOARGS)); extern pcdl_names * EXFUN(pcdl_insert_name, (pcdl_names * name, pcdl_names * name_list)); extern int EXFUN(pcdl_lookup_rate_symbol, (CONST char * symbol, int ins_flag)); extern void EXFUN(pcdl_destroy_symbol_list, (NOARGS)); extern void EXFUN(pcdl_print_country, (CONST pcdl_country * CONST country)); extern CONST char * EXFUN(pcd_rate_name, (int rate)); extern float EXFUN(pcd_rate_call_cost, (int rate)); extern float EXFUN(pcd_calculate_cost, (int rate, float secs)); /* The name of the country to search in the PCD file */ extern CONST char * default_country_name; /* Current country time rates info */ extern pcdl_country current_country; /* The number of different time rates in the current country */ extern int pcd_names_count; /* TRUE if we want the list of the countries in the PCD file. */ extern int pcd_list_countries; #endif /* ifdef _PCDL_H */ tua-4.3.orig/src/trees.h0100644000175100001440000000535006105405027013515 0ustar mdusers/* trees.h - generic binary tree management * * This file is part of TUA. * * Copyright (C) 1991,96 Lele Gaifax * * 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. * */ #ifndef _TREES_H #define _TREES_H #if HAVE_SIZE_T_IN_STDDEF_H #include #else #if HAVE_SIZE_T_IN_TYPES_H #include #else #if HAVE_SIZE_T_IN_STDTYPES_H #include #endif /* HAVE_SIZE_T_IN_STDTYPES_H */ #endif /* HAVE_SIZE_T_IN_TYPES_H */ #endif /* HAVE_SIZE_T_IN_STDDEF_H */ typedef int EXFUN((*compare_func_t), (CONST PTR, CONST PTR)); typedef PTR EXFUN((*makenew_func_t), (CONST PTR)); typedef void EXFUN((*traverse_func_t), (CONST PTR)); #if USE_SOFTCHIP_BTREE #include #else /* don't use SoftChip */ typedef struct _btree_node { struct _btree_node * leftTree; struct _btree_node * rightTree; PTR nodeData; } * BTREE_NODE; typedef struct _btree_root { compare_func_t compare; /* function used to compare two nodes */ makenew_func_t makenew; /* function used to allocate a new node */ BTREE_NODE rootNode; } *BTREE; #endif /* if USE_SOFTCHIP_BTREE */ /* Create a new btree. COMPARE will be used for comparison, and it adopt the protocol used in str?cmp(), ie returns 0 for equal data, -1 if the first parm is less the the second, 1 otherwise. MAKENEW will be used when inserting new nodes in the tree. It takes an address of a node as the only parameter, containing the key field. makenew() should use it to alloc a copy of it, maybe initializing the other fields. */ extern BTREE EXFUN(btree_new, (compare_func_t compare, makenew_func_t makenew)); /* Insert some data in the tree */ extern PTR EXFUN(btree_insert, (BTREE, PTR)); /* * Call the function for each node in the tree, passing the * node data as the only argument */ extern void EXFUN(btree_traverse, (BTREE, traverse_func_t func)); /* Search for some data in the tree */ extern PTR EXFUN(btree_search, (BTREE, CONST PTR)); /* Returns the number of items stored in the tree */ extern size_t EXFUN(btree_count, (BTREE)); #endif /* _TREES_H */ tua-4.3.orig/src/tua.h0100644000175100001440000003164306105405027013170 0ustar mdusers/* tua.h -- Constants and structs definition, functions prototype. * * This file is part of TUA. * * Copyright (C) 1991,96 Lele Gaifax * * 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. * */ #ifndef _TUA_H #define _TUA_H /* * Check if the user defined the right things */ #if USE_READLINE && !USE_TCL #error It is silly to link in the Readline stuff without TCL #endif #include "config.h" #if !TAYLOR_UUCP && !HDB_UUCP #error At least one of these must be defined! #endif #if STDC_HEADERS || HAVE_STRING_H #include /* An ANSI string.h and pre-ANSI memory.h might conflict. */ #if !STDC_HEADERS && HAVE_MEMORY_H #include #endif /* not STDC_HEADERS and HAVE_MEMORY_H */ #ifndef NeXT /* NeXT already does the same */ #define index strchr #define rindex strrchr #define bcopy(s, d, n) memcpy ((d), (s), (n)) #define bcmp(s1, s2, n) memcmp ((s1), (s2), (n)) #define bzero(s, n) memset ((s), 0, (n)) #endif /* NeXT */ #else /* not STDC_HEADERS and not HAVE_STRING_H */ #include /* memory.h and strings.h conflict on some systems. */ #endif /* not STDC_HEADERS and not HAVE_STRING_H */ #if HAVE_SIZE_T_IN_STDDEF_H #include #else #if HAVE_SIZE_T_IN_TYPES_H #include #if HAVE_TIME_T_IN_TYPES_H #define _SYS_TYPES_H #endif #else typedef unsigned int size_t; #endif #endif #if HAVE_TIME_T_IN_TIME_H #include #else #if HAVE_TIME_T_IN_TYPES_H && !defined(_SYS_TYPES_H) #include #else typedef long time_t; #endif #endif #include #include "ansidecl.h" #include "customize.h" #include "trees.h" #include "debug.h" #include "libgettext.h" #define _(str) gettext(str) typedef unsigned char BOOLEAN; #if USE_TCL #include "tcl.h" typedef struct tcl_command_def { char *name; Tcl_CmdProc *function; char *help; } tcl_command_def_t; #endif #define OK 0 #define ERROR 1 #if !defined (TRUE) #define FALSE 0 #define TRUE 1 #endif #define TIMESLICES ((60 / 3) * 24) /* A sample every 20 mins */ typedef double HourlyAct_t[TIMESLICES]; typedef struct port_rec /* Port's activity */ { char *Port; /* Port's name */ BOOLEAN Killed; HourlyAct_t Activity; } port_rec_t; typedef enum { LOCAL_SYSTEM, REMOTE_SYSTEM } payer_t; typedef enum { SENT, RECEIVED } direction_t; typedef struct Date { unsigned int Year:11; unsigned int Month:4; unsigned int Day:5; unsigned int DayOfWeek:3; } Date_t; typedef struct Time { unsigned int Hour:5; unsigned int Min:6; unsigned int Sec:6; #if TAYLOR_UUCP unsigned int Cent:7; #endif } Time_t; typedef double Julian_t; typedef struct moved_stuff { unsigned int Files; double Bytes; double Time; } moved_stuff_t; typedef struct system_history /* System's history info */ { moved_stuff_t In; moved_stuff_t Out; double MonthlyActivity[12]; /* Last 12 months activity */ int LastMonthProcessed; } system_history_t; typedef struct command_rec /* Command's tree node */ { char *Command; /* Command's name */ unsigned int Number; /* # of invocation */ } command_rec_t; typedef struct day_rec /* Daily table */ { Date_t Date; moved_stuff_t In; moved_stuff_t Out; BTREE Commands; /* This day commands */ } day_rec_t; typedef struct system_rec { char *System; /* System's name */ BOOLEAN Killed; /* TRUE: do not print this system */ moved_stuff_t In; moved_stuff_t Out; double TimeConnect; /* Total connection time in seconds */ double * PhoneCost; /* Time spent at the phone, subdivided per */ /* timeband */ unsigned int * PhoneCall; /* # of calls, subdivided per timeband */ double TimePayedBy[2]; unsigned int Calls; /* # of calls */ unsigned int CallsIn; /* # of inbound calls */ unsigned int CallsOut; /* # of outboud calls */ unsigned int CallsOK; /* Correctly finished ones */ unsigned int CallsFAIL; /* * # of calls that did not reached the * login phase. */ unsigned int CallsSTOPPED; /* Uncorrectly finished ones */ Julian_t LastConnection; system_history_t History; /* System's historical datas */ BTREE Commands; } system_rec_t; typedef struct user_rec { char *User; /* User's name */ BOOLEAN Killed; /* TRUE: do not print this * user */ moved_stuff_t Out; #if TAYLOR_UUCP moved_stuff_t In; #endif BTREE Commands; } user_rec_t; enum uucico_status { TUUS_NONE, TUUS_OK, TUUS_INCOMING, TUUS_CALLING, TUUS_HANDSHAKE, TUUS_LOGIN, TUUS_SENDING, TUUS_ERROR }; typedef struct process_status { int ProcessId; BOOLEAN Killed; system_rec_t * System; unsigned int WhoIsPaying:1; unsigned int LoginPassed:1; unsigned int Status:3; #if HDB_UUCP Julian_t StartTime, EndTime; #endif } process_status_t; #if defined(HDB_ERR_FACT) extern double ERRFACT; /* Correction factor for * buggy HDB */ #endif /* #define CMO Command Line Option ;-) */ #if BOTH_OF_THEM /* CMO: TRUE iff we are parsing a Taylor Uucp Log */ extern int is_taylor_uucp; #endif /* CMO: Show also a report for every command called */ extern int do_command_report_opt; /* CMO: Build a separated command report */ extern int separated_command_report_opt; /* CMO: Show just some system in the reports */ extern int just_some_system_opt; /* CMO: Use the Uucp Logs under this directory */ extern char *logs_prefix_path_opt; /* Name of the host where TUA is running */ extern char SystemName[]; extern char TheEpoc[]; /* A string representing the oldest time TUA's found in the logs */ extern char *Since; /* The current month, extracted from CurrentTime */ extern int CurrentMonth; /* CMO: Vertical Size of the Charts */ extern int chart_size_opt; /* CMO: TRUE when the user wants to see the progress of the parsing */ #ifdef DEBUG extern int be_verbose; #endif /* When really the log began... */ extern Julian_t StatStartingTime; /* ...and ended */ extern Julian_t StatEndingTime; /* Difference in days between StatStartingTime and StatEndingTime */ extern int DaysSinceLastClean; /* Compilation time */ extern char compilation_date[]; /* Julian Date&Time */ extern Julian_t EXFUN(d_to_julian, (Date_t date, Julian_t * julian)); extern Julian_t EXFUN(dt_to_julian, (Date_t date, Time_t time, Julian_t * julian)); extern Date_t EXFUN(julian_to_d, (Julian_t julian, Date_t * date)); extern void EXFUN(julian_to_dt, (Julian_t julian, Date_t * date, Time_t * time)); extern CONST char * EXFUN(julian_to_asc, (Julian_t julian)); extern int EXFUN(julian_dow, (Julian_t julian)); extern Julian_t EXFUN(julian_current_date, (NOARGS)); #if USE_TCL /* The TCL Interpreter for TUA */ extern Tcl_Interp *TUA_interp; #endif /* Killing */ extern void EXFUN (kill_system, (CONST char *)); extern void EXFUN (kill_user, (CONST char *)); extern void EXFUN (kill_port, (CONST char *)); extern void EXFUN (kill_process, (int procId)); /* Inserting... */ extern command_rec_t *EXFUN (insert_command, (BTREE *, CONST char *)); extern user_rec_t *EXFUN (insert_user, (CONST char *)); extern system_rec_t *EXFUN (insert_system, (CONST char *)); extern day_rec_t *EXFUN (insert_day, (Date_t)); extern port_rec_t *EXFUN (insert_port, (CONST char *)); extern process_status_t * EXFUN (insert_process, (int procId)); /* ... Aliases... */ extern CONST char *EXFUN (insert_user_alias, (CONST char *, CONST char *)); extern CONST char *EXFUN (insert_system_alias, (CONST char *, CONST char *)); extern CONST char *EXFUN (insert_port_alias, (CONST char *, CONST char *)); /* ... Glob aliases */ extern void EXFUN (insert_user_glob_alias, (CONST char *, CONST char *)); extern void EXFUN (insert_system_glob_alias, (CONST char *, CONST char *)); extern void EXFUN (insert_port_glob_alias, (CONST char *, CONST char *)); /* Enquiring... */ extern void EXFUN (enquire_systems, (traverse_func_t funct)); extern void EXFUN (enquire_users, (traverse_func_t funct)); extern void EXFUN (enquire_commands, (BTREE, traverse_func_t funct)); extern void EXFUN (enquire_days, (traverse_func_t funct)); extern void EXFUN (enquire_ports, (traverse_func_t funct)); extern void EXFUN (enquire_processes, (traverse_func_t funct)); /* ... Aliases... */ extern CONST char *EXFUN (get_possible_user_alias, (CONST char *)); extern CONST char *EXFUN (get_possible_system_alias, (CONST char *)); extern CONST char *EXFUN (get_possible_port_alias, (CONST char *)); /* ... Glob aliases */ extern CONST char *EXFUN (get_possible_user_glob_alias, (CONST char *)); extern CONST char *EXFUN (get_possible_system_glob_alias, (CONST char *)); extern CONST char *EXFUN (get_possible_port_glob_alias, (CONST char *)); /* Searching */ extern system_rec_t *EXFUN (search_system, (CONST char *)); extern user_rec_t *EXFUN (search_user, (CONST char *)); extern port_rec_t *EXFUN (search_port, (CONST char *)); extern size_t EXFUN (number_of_ports, (NOARGS)); /* Processing HDB Uucp */ extern int EXFUN (read_xferstats_log, (void)); extern int EXFUN (read_uucico_log, (void)); extern int EXFUN (read_uuxqt_log, (void)); extern int EXFUN (read_uucp_log, (void)); extern int EXFUN (read_uux_log, (void)); /* Processing Taylor Uucp */ extern int EXFUN (read_stats_log, (void)); extern int EXFUN (read_log_log, (void)); /* Reporting */ extern void EXFUN (systems_report, (void)); extern void EXFUN (users_report, (void)); extern void EXFUN (daily_report, (void)); extern void EXFUN (systems_command_report, (void)); extern void EXFUN (users_command_report, (void)); extern void EXFUN (daily_command_report, (void)); extern void EXFUN (systems_summary, (void)); extern void EXFUN (systems_summary_table, (void)); extern void EXFUN (system_history_table, (void)); extern void EXFUN (hourly_activity_charts, (void)); extern void EXFUN (global_hourly_activity_chart, (void)); extern void EXFUN (monthly_history_table, (void)); extern void EXFUN (print_the_report, (void)); /* Remembering */ extern int EXFUN (read_system_history, (void)); extern int EXFUN (write_system_history, (int)); /* Other(ing) */ extern Julian_t EXFUN (parse_date, (CONST char *)); extern int EXFUN (get_phone_timeband, (int, int, int)); extern int EXFUN (gethostname, (char *, int)); extern void EXFUN (system_alloc_phone_costs, (system_rec_t * sys)); #if USE_GLOB_ALIASES extern int EXFUN (wildmat, (CONST char *, CONST char *)); #endif #if USE_READLINE extern void EXFUN (initialize_readline, (CONST char *)); extern char *EXFUN (readline_gets, (char *)); #endif #if USE_TCL extern void EXFUN (initialize_TCL, (NOARGS)); extern Tcl_CmdProc tcl_insert_port_alias; extern Tcl_CmdProc tcl_insert_port_glob_alias; extern Tcl_CmdProc tcl_kill_port; extern Tcl_CmdProc tcl_systems_report; extern Tcl_CmdProc tcl_users_report; extern Tcl_CmdProc tcl_daily_report; extern Tcl_CmdProc tcl_system_summary; extern Tcl_CmdProc tcl_system_summary_table; extern Tcl_CmdProc tcl_report; extern Tcl_CmdProc tcl_insert_system_alias; extern Tcl_CmdProc tcl_insert_system_glob_alias; extern Tcl_CmdProc tcl_kill_system; extern Tcl_CmdProc tcl_do_option; extern Tcl_CmdProc interactive; extern Tcl_CmdProc tcl_insert_user_alias; extern Tcl_CmdProc tcl_insert_user_glob_alias; extern Tcl_CmdProc tcl_kill_user; extern Tcl_CmdProc tcl_show_help; extern Tcl_CmdProc interactive_mode; #endif /* Useful macros & funcs */ extern int EXFUN (strbegcmp, (CONST char *, CONST char *)); extern int EXFUN (strcasecmp, (CONST char *, CONST char *)); extern int EXFUN (getdomainname, (char * buf, int size)); extern int EXFUN (gethostname, (char * buf, int size)); extern char * EXFUN (savestring, (CONST char *)); extern PTR EXFUN (xmalloc, (size_t size)); extern void EXFUN (xfree, (PTR ptr)); #if HAVE_STDLIB_H #include #else extern #if defined (__GNUC__) && !defined(__STRICT_ANSI__) __volatile__ #endif void EXFUN (exit, (int status)); #endif /* Phone Category Definition */ extern int EXFUN (parse_pcd_file, (CONST char * pathname)); #if HAVE_FUNCTION_MACRO #define LOG(fmt, arg) fprintf(stderr, "TUA (" __FUNCTION__ "): " fmt "\n", arg) #else #ifdef __STDC__ #define LOG(fmt, arg) fprintf(stderr, "TUA: " fmt "\n", arg) #else #define LOG(fmt, arg) fprintf(stderr, fmt, arg); fprintf(stderr, "\n"); #endif #endif /* HAVE_FUNCTION_MACRO */ extern double EXFUN(rint, (double)); extern double EXFUN(modf, (double, double *)); #endif /* !_TUA_H */ tua-4.3.orig/src/commtree.c0100644000175100001440000000346306105405022014177 0ustar mdusers/* commtree.c -- Handle the command trees. * * This file is part of TUA. * * Copyright (C) 1991,96 Lele Gaifax * * 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. * */ #include "tua.h" #define TNULL (Tcommrep_t) NULL static int DEFUN (command_compare, (comm1, comm2), CONST command_rec_t * comm1 AND CONST command_rec_t * comm2) { int ret = strcasecmp (comm1->Command, comm2->Command); return ret; } static PTR DEFUN (command_new, (data), CONST PTR data) { command_rec_t * cr; cr = (command_rec_t *) xmalloc (sizeof (command_rec_t)); cr->Command = savestring (((CONST command_rec_t *) data)->Command); cr->Number = 0; return (PTR) cr; } command_rec_t * DEFUN (insert_command, (treep, comm), BTREE * treep AND CONST char *comm) { command_rec_t cr; if (*treep == NULL) *treep = btree_new ((compare_func_t) command_compare, (makenew_func_t) command_new); cr.Command = (char *) comm; return (command_rec_t *) btree_insert (*treep, &cr); } void DEFUN (enquire_commands, (tree, funct), BTREE tree AND traverse_func_t funct) { btree_traverse (tree, funct); } tua-4.3.orig/src/compat.c0100644000175100001440000000456106105405022013647 0ustar mdusers/* compat.c -- Missing functions replacements and others. * * This file is part of TUA. * * Copyright (C) 1991,96 Lele Gaifax * * 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. * */ #include "tua.h" #if !HAVE_STDLIB_H extern PTR EXFUN (malloc, (size_t size)); extern void EXFUN (free, (PTR ptr)); #endif PTR DEFUN (xmalloc, (size), size_t size) { PTR ptr = malloc (size); if (ptr == 0) { fputs (_("Out of memory!\n"), stderr); exit (1); } return ptr; } void DEFUN (xfree, (ptr), PTR ptr) { if (ptr) free (ptr); } char * DEFUN (savestring, (string), CONST char *string) { char *tmp = (char *) xmalloc (strlen (string) + 1); return strcpy (tmp, string); } /* these are needed by libintl.a stuff... */ char * DEFUN (xstrdup, (string), CONST char *string) { char *tmp = (char *) xmalloc (strlen (string) + 1); return strcpy (tmp, string); } void DEFUN (error, (fatal, errnum, errmsg), int fatal AND int errnum AND CONST char * errmsg) { LOG("%s", errmsg); if (fatal) exit (errnum); } #if !HAVE_GETHOSTNAME /* * From Cnews as of 1 Jan 91 * * Uglix gethostname simulation */ #include #include #define min(a, b) ((a) < (b)? (a): (b)) int DEFUN (gethostname, (buf, size), char *buf AND int size) { struct utsname ugnm; char *strncpy (); if (uname (&ugnm) < 0) return -1; (void) strncpy (buf, ugnm.nodename, min (sizeof ugnm.nodename, size)); return 0; } #endif /* !HAVE_GETHOSTNAME */ #if !HAVE_GETDOMAINNAME int DEFUN (getdomainname, (buf, size), char * buf AND int size) { strcpy (buf, NET_DOMAIN); return 0; } #endif /* !HAVE_GETDOMAINNAME */ tua-4.3.orig/src/daytree.c0100644000175100001440000000415506105405022014020 0ustar mdusers/* daytree.c -- Day tree management. * * This file is part of TUA. * * Copyright (C) 1991,96 Lele Gaifax * * 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. * */ #include "tua.h" static BTREE Root = NULL; static int DEFUN(day_compare, (d1, d2), CONST day_rec_t * d1 AND CONST day_rec_t * d2) { int ret = 0; #if TAYLOR_UUCP #if BOTH_OF_THEM if (is_taylor_uucp) #endif if (d1->Date.Year < d2->Date.Year) ret = -1; else if (d1->Date.Year > d2->Date.Year) ret = 1; #endif if (ret == 0) if (d1->Date.Month < d2->Date.Month) ret = -1; else if (d1->Date.Month > d2->Date.Month) ret = 1; else if (d1->Date.Day < d2->Date.Day) ret = -1; else if (d1->Date.Day > d2->Date.Day) ret = 1; return ret; } static PTR DEFUN(day_new, (data), CONST PTR data) { day_rec_t * dr; dr = (day_rec_t *) xmalloc (sizeof (day_rec_t)); dr->Date = ((day_rec_t *) data)->Date; dr->Out.Files = dr->In.Files = 0; dr->Out.Bytes = dr->In.Bytes = 0.0; dr->Out.Time = dr->In.Time = 0.0; dr->Commands = NULL; return (PTR) dr; } day_rec_t * DEFUN (insert_day, (day), Date_t day) { day_rec_t dr; if (Root == NULL) Root = (BTREE) btree_new ((compare_func_t) day_compare, (makenew_func_t) day_new); dr.Date = day; return (day_rec_t *) btree_insert (Root, &dr); } void DEFUN (enquire_days, (funct), traverse_func_t funct) { btree_traverse (Root, funct); } tua-4.3.orig/src/debug.c0100644000175100001440000000426606105405022013454 0ustar mdusers/* debug.c * Debugging functions * * This file is part of TUA. * * Copyright (C) 1991,96 Lele Gaifax * * 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. * */ #include "tua.h" #ifdef DEBUG #include static CONST char * current_file_name; static int current_line_number; void DEFUN (dbg_set_current_file_name, (filename), CONST char * filename) { current_file_name = filename; current_line_number = 0; } void DEFUN (dbg_message, (msg), CONST char * msg) { if (current_line_number) fprintf (stderr, "%s:%d: %s\n", current_file_name, current_line_number, msg); else fprintf (stderr, "%s: %s\n", current_file_name, msg); } void DEFUN_VOID (dbg_print_new_line_number) { if ((++current_line_number % 50)==0 && be_verbose) fprintf (stderr, "\r%6d", current_line_number); } void DEFUN_VOID (dbg_end) { if (be_verbose) fprintf (stderr, "\r%6d", current_line_number); } void DEFUN (dbg_printf, (fmt), CONST char * fmt DOTS) { va_list ap; if (current_line_number) fprintf (stderr, "%s:%d: ", current_file_name, current_line_number); else fprintf (stderr, "%s: ", current_file_name); va_start (ap, fmt); vfprintf (stderr, fmt, ap); fprintf (stderr, "\n"); } #endif /* DEBUG */ #if !defined(__GNUC__) || (__GNUC__ < 2) || (defined (__NeXT__) && !defined (__NeXT)) void DEFUN (dbg_printf, (msg), CONST char * msg DOTS) { /* * no op function. This is necessary to handle the varargs macros if we * are not using GCC 2.x */ } #endif tua-4.3.orig/src/globalias.h0100644000175100001440000000257506105405027014336 0ustar mdusers/* globalias.h - GlobAlias Queues Building Functions Header. * * This file is part of TUA. * * Copyright (C) 1991,96 Lele Gaifax * * 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. * */ typedef struct glob_aliases_queue { CONST char * Name; CONST char * Alias; struct glob_aliases_queue * Next; } glob_aliases_queue_t; #define QNULL (glob_aliases_queue_t *) NULL /* Insert a new globalias in the list. */ extern void EXFUN (globalias_insert, (glob_aliases_queue_t **, CONST char *, CONST char *)); /* Search for an alias for a name. Returns the alias if it was there, otherwise the name itself. */ extern CONST char * EXFUN (globalias_search, (CONST glob_aliases_queue_t *, CONST char *)); tua-4.3.orig/src/julian.c0100644000175100001440000001164706105405023013652 0ustar mdusers/* julian.c -- functions to handle julian dates * * This file is part of TUA. * * Copyright (C) 1991,96 Lele Gaifax * * 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. * * NOTE: * The original package is a public domain ObjC class, Julian, written * by Charles G. Bennett. I simply extracted from there the functions I need * and translated them in C. * The complete sources, with an example app and manual page, are available * at any NeXT archive site (cs.orst.edu or sonata.cc.purdue.edu are the most * popular) . */ #include "tua.h" extern double EXFUN(modf, (double, double *)); Julian_t DEFUN (d_to_julian, (date, julian), Date_t date AND Julian_t * julian) { int a,b; double retVal; float yearCorr; int year = date.Year; int month = date.Month; int day = date.Day; /* Correct for negative year */ yearCorr = (year > 0? 0.0 : 0.75); if (month <= 2) { year--; month += 12; } b = 0; /* Deal with Gregorian reform */ if(((year * 10000.0) + (month * 100.0) + day) >= 15821015.0) { a = year / 100; b = (2-a)+(a/4); } retVal = (long) ( (365.25 * year) - yearCorr); retVal += (long) (30.6001 * (month+1)); retVal += (long) day; retVal += 1720994L; retVal += (long) b; if (julian) *julian = retVal; return (retVal); } Julian_t DEFUN (dt_to_julian, (date, time, julian), Date_t date AND Time_t time AND Julian_t * julian) { double retVal; double retFraction; int hour = time.Hour; int min = time.Min; int sec = time.Sec; retVal = d_to_julian (date, 0); retFraction = (double) ((double) hour/24.0) + (double) ((double) min/1440.0) + (double) ((double) sec/86400.0); if (julian) *julian = retVal + retFraction; return (retVal + retFraction); } Date_t DEFUN (julian_to_d, (julian, date), Julian_t julian AND Date_t * date) { long a,b,c,d,e,z, alpha; Date_t dat; z = (long) (julian + 1); /* Deal with Gregorian reform */ if( z < 2299161L) a = z; else { alpha = (long) (( z - 1867216.25) / 36524.25); a = z + 1 + alpha - alpha / 4; } b = a + 1524; c = (long) (( b - 122.1) / 365.25); d = (long) (365.25 * c); e = (long) (( b - d ) / 30.6001); dat.Day = (int) b - d - (long) (30.6001 * e); dat.Month = (int) ( e < 13.5) ? e - 1 : e - 13; dat.Year = (int) (dat.Month > 2.5) ? (c - 4716) : c - 4715; dat.DayOfWeek = julian_dow (julian); if (date) *date = dat; return dat; } void DEFUN (julian_to_dt, (julian, date, time), Julian_t julian AND Date_t * date AND Time_t * time) { double fractionalPart; double tmpResult; double integerPart; julian_to_d (julian, date); /* days.fractionalDays */ fractionalPart = modf ((double)julian, &integerPart); tmpResult = fractionalPart * 24.0; fractionalPart = modf (tmpResult, &integerPart); time->Hour = (int) integerPart; tmpResult = fractionalPart * 60.0; fractionalPart = modf (tmpResult, &integerPart); time->Min = (int) integerPart; tmpResult = fractionalPart * 60.0; fractionalPart = modf (tmpResult, &integerPart); /* * lelegaifax: adjust seconds rounding the fractional part * otherwise you'll sometime get a "one-second-less" time. */ if (fractionalPart > 0.5) integerPart++; time->Sec = (int) integerPart; } CONST char * DEFUN (julian_to_asc, (julian), Julian_t julian) { static char buffer[sizeof "18 Mar 1968 - 10:14:00"]; Date_t date; CONST char *mnames[] = { "ERR", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" }; Time_t time; julian_to_dt (julian, &date, &time); sprintf (buffer, "%02d %s %04d - %02d:%02d:%02d", date.Day, mnames[date.Month], date.Year, time.Hour, time.Min, time.Sec); return buffer; } int DEFUN (julian_dow, (julian), Julian_t julian) { return (int) (((long) (julian + 2) % 7)); } #include double DEFUN_VOID (julian_current_date) { Date_t dat; Time_t tim; time_t now = time(0); struct tm *theTime; theTime = localtime(&now); dat.Year = theTime->tm_year+1900; dat.Month = theTime->tm_mon+1; dat.Day = theTime->tm_mday; tim.Hour = theTime->tm_hour; tim.Min = theTime->tm_min; tim.Sec = theTime->tm_sec; return dt_to_julian (dat, tim, 0); } tua-4.3.orig/src/pcdl.c0100644000175100001440000001666106110072032013307 0ustar mdusers/* pcdl.c - Function dealing with the Phone Category Language * * This file is part of TUA. * * Copyright (C) 1991,96 Lele Gaifax * * 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. * */ #include "tua.h" #include "pcdl.h" extern void EXFUN(yyerror, (CONST char * s)); static CONST char * DEFUN(slot_to_string, (slot), CONST pcdl_slots * CONST slot) { static char buffer[sizeof "10:30-12:11"]; int h1, m1; int h2, m2; h1 = slot->from / 60; m1 = slot->from % 60; h2 = slot->to / 60; m2 = slot->to % 60; sprintf (buffer, "%02d:%02d-%02d:%02d", h1, m1, h2, m2); return buffer; } static CONST char * CONST days[] = { "sun", "mon", "tue", "wed", "thu", "fri", "sat" }; /* Print COUNTRY in format compatible with ourself. */ void DEFUN(pcdl_print_country, (country), CONST pcdl_country * CONST country) { CONST pcdl_names * nl = country->names; CONST pcdl_slots * sl; int day; printf ("country \"%s\" = {\n", country->name); if (country->currency) printf ("\tcurrency = \"%s\";\n", country->currency); printf ("\tdecimals = %hd;\n", country->decimals); while (nl) { printf ("\tname %c = \"%s\";\n", nl->cost+'@', nl->name); if (nl->cost_per_unit) { if (nl->call_cost) printf ("\tconst %c = %g,%g/%g;\n", nl->cost+'@', nl->call_cost, nl->cost_per_unit, nl->seconds_per_unit); else printf ("\tcost %c = %g/%g;\n", nl->cost+'@', nl->cost_per_unit, nl->seconds_per_unit); } nl = nl->next; } for (day=0; day<7; day++) { printf ("\t%s = {\n", days[day]); sl = country->slots[day]; while (sl) { printf ("\t rate %c = %s;\n", sl->cost+'@', slot_to_string (sl)); sl = sl->next; } printf ("\t};\n"); } printf ("}\n"); } /* Returns TRUE if SLOT1 overlaps SLOT2 */ static int DEFUN(slots_overlaps, (slot1, slot2), CONST pcdl_slots * CONST slot1 AND CONST pcdl_slots * CONST slot2) { if ((slot1->from >= slot2->from && slot1->from <= slot2->to) || (slot1->to >= slot2->from && slot1->to <= slot2->to)) return TRUE; else return FALSE; } /* Insert a copy of SLOT in SLOT_LIST, checking for possible overlapping * slots. If such slots exist, do not insert them in the list. */ pcdl_slots * DEFUN(pcdl_insert_slot, (slot, slot_list), pcdl_slots * slot AND pcdl_slots * slot_list) { if (slot_list) { pcdl_slots * node = slot_list; pcdl_slots * prev = 0; while (node->from < slot->from && node->next) { prev = node; node = node->next; } if (slots_overlaps (node, slot)) { yyerror (_("overlapping slots: ")); fprintf (stderr, _("{ rate %d, %s at line %d } and "), node->cost, slot_to_string (node), node->definition_line); fprintf (stderr, _("{ rate %d, %s at line %d }\n"), slot->cost, slot_to_string (slot), slot->definition_line); } else if (prev && slots_overlaps (prev, slot)) { extern void EXFUN(yyerror, (CONST char * s)); yyerror (_("overlapping slots: ")); fprintf (stderr, _("{ rate %d, %s at line %d } and "), prev->cost, slot_to_string (prev), prev->definition_line); fprintf (stderr, _("{ rate %d, %s at line %d }\n"), slot->cost, slot_to_string (slot), slot->definition_line); } else { pcdl_slots * new = pcdl_create_new_slot(); *new = *slot; new->next = 0; if (node->from < new->from) { new->next = node->next; node->next = new; } else { new->next = node; if (prev) prev->next = new; else slot_list = new; } } } else { pcdl_slots * new = pcdl_create_new_slot(); *new = *slot; new->next = 0; slot_list = new; } return slot_list; } pcdl_slots * DEFUN_VOID (pcdl_create_new_slot) { pcdl_slots * new = (pcdl_slots *) xmalloc (sizeof (pcdl_slots)); new->next = 0; return new; } pcdl_slots * DEFUN(pcdl_merge_slots, (list1, list2), pcdl_slots * list1 AND pcdl_slots * list2) { pcdl_slots * result = list1; while (list2) { result = pcdl_insert_slot (list2, result); list2 = list2->next; } return result; } pcdl_names * DEFUN(pcdl_insert_name, (name, name_list), pcdl_names * name AND pcdl_names * name_list) { if (name_list) { pcdl_names * node = name_list; while (node->cost < name->cost && node->next) node = node->next; if (node->cost == name->cost) { extern void EXFUN(yyerror, (CONST char * s)); yyerror (_("overlapping costs!")); } else if (node->cost < name->cost) { node->next = name; } else { name->next = name_list; name_list = name; } } else name_list = name; return name_list; } pcdl_names * DEFUN_VOID (pcdl_create_new_name) { pcdl_names * new = (pcdl_names *) xmalloc (sizeof (pcdl_names)); new->seconds_per_unit = new->call_cost = new->cost_per_unit = 0.0; new->next = 0; return new; } CONST char * default_country_name = 0; CONST char * DEFUN (pcd_rate_name, (rate), int rate) { pcdl_names * nl = current_country.names; for (nl = current_country.names; nl && nl->cost != rate; nl = nl->next) ; return nl->name; } float DEFUN (pcd_rate_call_cost, (rate), int rate) { pcdl_names * nl = current_country.names; for (nl = current_country.names; nl && nl->cost != rate; nl = nl->next) ; return nl->call_cost; } float DEFUN (pcd_calculate_cost, (rate, secs), int rate AND float secs) { pcdl_names * nl = current_country.names; for (nl = current_country.names; nl && nl->cost != rate; nl = nl->next) ; if (nl && nl->seconds_per_unit) { int units = secs / nl->seconds_per_unit + 1; return units * nl->cost_per_unit; } else return 0.0; } static pcdl_names * symbol_list = 0; int DEFUN (pcdl_lookup_rate_symbol, (symbol, ins_flag), CONST char * symbol AND int ins_flag) { if (symbol_list) { pcdl_names * sl = symbol_list; while (1) { if (strcmp (symbol, sl->name) == 0) return sl->cost; if (sl->next == 0) break; else sl = sl->next; } if (ins_flag) { pcdl_names * n = pcdl_create_new_name (); n->name = savestring (symbol); n->cost = sl->cost+1; n->next = 0; sl->next = n; return n->cost; } else { yyerror(_("Rate symbol ")); fprintf (stderr, _("%s not yet defined!\n"), symbol); exit(1); } } else { pcdl_names * n = pcdl_create_new_name(); n->name = savestring (symbol); n->cost = 1; n->next = 0; symbol_list = n; return 1; } } void DEFUN_VOID (pcdl_destroy_symbol_list) { while (symbol_list) { pcdl_names * n = symbol_list; pcdl_names * next = n->next; xfree (n->name); xfree (n); symbol_list = next; } } tua-4.3.orig/src/pcdl_gram.y0100644000175100001440000002411606110071755014350 0ustar mdusers/* pcdl_gram.y - Phone Category Definition Language Grammar * * This file is part of TUA. * * Copyright (C) 1991,96 Lele Gaifax * * 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. * */ %{ #include "tua.h" #include "pcdl.h" pcdl_country current_country; void EXFUN(yyerror, (CONST char * s)); static int EXFUN(yylex, (NOARGS)); static CONST char * pcd_filename; static FILE * pcd_file; static int pcd_current_line = 0; int pcd_names_count = 0; int pcd_list_countries = FALSE; %} %union { int ival; float fval; char * string; pcdl_slots * slots; } %token PCKW_COUNTRY %token PCKW_INT %token PCKW_STRING %token PCKW_DAY %token PCKW_RATE %token PCKW_NAME %token PCKW_DEFAULT %token PCKW_CURRENCY %token PCKW_DECIMALS %token PCKW_COST %type hour %type default_country %type slots slot rates rate day_block %type float_number %% input : | input country { /* Ok, we have a complete country definition. First of all destroy the * symbol table, since we are not going to use it anymore. Then, if the * country name matches the default one (specificated by either --country * option or with the "default" clause), store it and return. * Otherwise go on with the next */ pcdl_destroy_symbol_list (); if (default_country_name && !pcd_list_countries && strcmp (default_country_name, current_country.name) == 0) { YYACCEPT; } #ifdef TEST else { printf ("Found a country:\n"); pcdl_print_country (¤t_country); } #endif } | input default_country { /* if the country is not yet set (via --country option) */ if (default_country_name == 0) default_country_name = $2; } ; /* default = "country_name"; */ default_country : PCKW_DEFAULT '=' PCKW_STRING ';' { $$ = $3; } ; /* country "italy" = */ country : PCKW_COUNTRY reset_country PCKW_STRING '=' defn_block { current_country.name = $3; if (pcd_list_countries) printf ("%s\n", $3); } ; /* whenever a "country" stmt is found, reset the current_country info */ reset_country : /* empty */ { bzero (¤t_country, sizeof (current_country)); } ; defn_block : '{' defn_stmts '}' ; defn_stmts : defn_stmt1 | defn_stmts defn_stmt1 ; defn_stmt1 : name | day | currency | decimals | cost ; /* name 1 = "name_1"; * or * name FOO = "fooname"; */ name : PCKW_NAME PCKW_STRING '=' PCKW_STRING ';' { int cost = pcdl_lookup_rate_symbol ($2, TRUE); pcdl_names * new = pcdl_create_new_name(); new->cost = cost; new->name = $4; new->next = 0; current_country.names = pcdl_insert_name (new, current_country.names); } ; cost : PCKW_COST PCKW_STRING '=' float_number ';' { int cost = pcdl_lookup_rate_symbol ($2, FALSE); pcdl_names * names = current_country.names; while (names && names->cost != cost) names = names->next; if (names) { names->cost_per_unit = 0.0; names->seconds_per_unit = 0.0; names->call_cost = $4; } } | PCKW_COST PCKW_STRING '=' float_number '/' float_number ';' { int cost = pcdl_lookup_rate_symbol ($2, FALSE); pcdl_names * names = current_country.names; while (names && names->cost != cost) names = names->next; if (names) { names->cost_per_unit = (float) $4; names->seconds_per_unit = $6; names->call_cost = 0.0; } } | PCKW_COST PCKW_STRING '=' float_number ',' float_number '/' float_number ';' { int cost = pcdl_lookup_rate_symbol ($2, FALSE); pcdl_names * names = current_country.names; while (names && names->cost != cost) names = names->next; if (names) { names->cost_per_unit = (float) $6; names->seconds_per_unit = $8; names->call_cost = (float) $4; } } ; float_number : PCKW_INT { $$ = (float) $1; } | PCKW_INT '.' PCKW_INT { extern double EXFUN(atof, (char *)); char buffer[50]; sprintf (buffer, "%d.%d", $1, $3); $$ = atof (buffer); } ; /* sunday = ; * or * monday-friday = ; */ day : PCKW_DAY '=' day_block ';' { current_country.slots[$1] = pcdl_merge_slots (current_country.slots[$1], $3); } | PCKW_DAY '-' PCKW_DAY '=' day_block ';' { int day; if ($1 > $3) { int swap = $1; $1 = $3; $3 = swap; } for (day=$1; day<=$3; day++) current_country.slots[day] = pcdl_merge_slots (current_country.slots[day], $5); } ; day_block : '{' rates '}' {$$ = $2; } ; rates : rate | rates rate { $$ = pcdl_merge_slots ($1, $2); } ; /* rate 1 = * or * rate FOO = */ rate : PCKW_RATE PCKW_STRING '=' slots ';' { int cost = pcdl_lookup_rate_symbol ($2, FALSE); pcdl_slots * sl = $4; while (sl) { sl->cost = cost; sl = sl->next; } $$ = $4; } ; slots : slot { $$ = $1; } | slots ',' slot { $$ = pcdl_insert_slot ($3, $1); } ; slot : hour '-' hour { $$ = pcdl_create_new_slot(); if ($1 > $3) { /* 19:01-07:00 case: trasform in 19:01-24:00, 00:01-07:00 */ pcdl_slots * other; $$->from = $1; $$->to = 24*60; $$->cost = 0; $$->definition_line = pcd_current_line+1; $$->next = other = pcdl_create_new_slot(); other->from = 1; other->to = $3; other->cost = 0; other->definition_line = pcd_current_line+1; other->next = 0; } else { $$->from = $1; $$->to = $3; $$->cost = 0; $$->definition_line = pcd_current_line+1; $$->next = 0; } } ; hour : PCKW_INT ':' PCKW_INT { $$ = $1*60 + $3; } | PCKW_INT '.' PCKW_INT { $$ = $1*60 + $3; } ; currency : PCKW_CURRENCY '=' PCKW_STRING ';' { current_country.currency = savestring ($3); } ; decimals : PCKW_DECIMALS '=' PCKW_INT ';' { current_country.decimals = $3; } ; %% #include #define SYM_LENGTH 30 #if defined (__GNUC__) && !defined(__STRICT_ANSI__) __inline__ #endif int DEFUN (strequ, (s1, s2), char * s1 AND char * s2) { return (strcasecmp (s1, s2) == 0); } void DEFUN(yyerror, (s), CONST char * s) { fprintf (stderr, "TUA:%s:%d: %s\n", pcd_filename, pcd_current_line, s); } int DEFUN(parse_pcd_file, (pathname), CONST char * pathname) { pcd_filename = pathname; if ((pcd_file = fopen (pathname, "r")) && yyparse() == 0) { pcdl_names * nl = current_country.names; pcd_names_count = 0; while (nl) { pcd_names_count++; nl = nl->next; } fclose (pcd_file); return OK; } else return ERROR; } static int DEFUN_VOID(yylex) { int c; read_again: while ((c = getc(pcd_file)) == ' ' || c == '\t' || c == '\n') if (c == '\n') pcd_current_line++; if (c == '#') { do { c = getc(pcd_file); } while (c != EOF && c != '\n'); pcd_current_line++; if (c != EOF) goto read_again; } if (c == EOF) return 0; if (isdigit (c)) { ungetc (c, pcd_file); fscanf (pcd_file, "%d", &yylval.ival); return PCKW_INT; } if (isalpha (c)) { char symbol[SYM_LENGTH]; int i = 0; do { symbol[i++] = c; if (i == SYM_LENGTH) { fprintf (stderr, _("error: symbol %.30s... too long!\n"), symbol); exit (1); } c = getc(pcd_file); } while (c != EOF && isalnum (c)); ungetc (c, pcd_file); symbol[i] = 0; if (strequ (symbol, "COUNTRY")) return PCKW_COUNTRY; else if (strequ (symbol, "NAME")) return PCKW_NAME; else if (strequ (symbol, "RATE")) return PCKW_RATE; else if (strequ (symbol, "DEFAULT")) return PCKW_DEFAULT; else if (strequ (symbol, "CURRENCY")) return PCKW_CURRENCY; else if (strequ (symbol, "DECIMALS")) return PCKW_DECIMALS; else if (strequ (symbol, "COST")) return PCKW_COST; else if (strequ (symbol, "SUN") || strequ (symbol, "SUNDAY")) { yylval.ival = 0; return PCKW_DAY; } else if (strequ (symbol, "MON") || strequ (symbol, "MONDAY")) { yylval.ival = 1; return PCKW_DAY; } else if (strequ (symbol, "TUE") || strequ (symbol, "TUESDAY")) { yylval.ival = 2; return PCKW_DAY; } else if (strequ (symbol, "WED") || strequ (symbol, "WEDNESDAY")) { yylval.ival = 3; return PCKW_DAY; } else if (strequ (symbol, "THU") || strequ (symbol, "THURSDAY")) { yylval.ival = 4; return PCKW_DAY; } else if (strequ (symbol, "FRI") || strequ (symbol, "FRIDAY")) { yylval.ival = 5; return PCKW_DAY; } else if (strequ (symbol, "SAT") || strequ (symbol, "SATURDAY")) { yylval.ival = 6; return PCKW_DAY; } else { yylval.string = savestring (symbol); return PCKW_STRING; } } if (c == '"') { char string[SYM_LENGTH]; int i; for (i=0, c = getc(pcd_file); c != EOF && c != '"'; i++, c = getc(pcd_file)) string[i] = c; string[i] = 0; yylval.string = savestring (string); return PCKW_STRING; } return c; } #if TEST main() { pcd_file = stdin; if (yyparse() == 0) { printf ("But this is the right one!\n"); pcdl_print_country (¤t_country); } exit (0); } #endif /* TEST */ tua-4.3.orig/src/phonesw.c0100644000175100001440000000234006105405023014041 0ustar mdusers/* phonesw.c -- Return an index based on the day, hour and minute we are working * * This file is part of TUA. * * Copyright (C) 1991,96 Lele Gaifax * * 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. * */ #include "tua.h" #include "pcdl.h" int DEFUN(get_phone_timeband, (dow, hour, min), int dow AND int hour AND int min) { pcdl_slots * sl = current_country.slots[dow]; short minutes = hour*60 + min; while (sl) { if (sl->from <= minutes && minutes < sl->to) return sl->cost-1; sl = sl->next; } return 0; } tua-4.3.orig/src/portalias.c0100644000175100001440000000702706105405023014363 0ustar mdusers/* portalias.c -- Port Aliases tree management * * This file is part of TUA. * * Copyright (C) 1991,96 Lele Gaifax * * 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. * */ #include "tua.h" typedef struct port_aliases { char *Port; char *Alias; } port_aliases_t; static BTREE Root = NULL; static int DEFUN (alias_compare, (port1, port2), CONST port_aliases_t * port1 AND CONST port_aliases_t * port2) { int ret = strcmp (port1->Port, port2->Port); return ret; } static PTR DEFUN (alias_new, (data), CONST PTR * data) { port_aliases_t * sa; sa = (port_aliases_t *) xmalloc (sizeof (port_aliases_t)); sa->Port = savestring (((CONST port_aliases_t *) data)->Port); sa->Alias = NULL; return (PTR) sa; } CONST char * DEFUN (insert_port_alias, (port, alias), CONST char *port AND CONST char *alias) { port_aliases_t * newpa, pa; if (Root == NULL) Root = btree_new ((compare_func_t) alias_compare, (makenew_func_t) alias_new); pa.Port = (char *) port; newpa = (port_aliases_t *) btree_insert (Root, &pa); if (! newpa->Alias) newpa->Alias = savestring (alias); return newpa->Alias; } CONST char * DEFUN (get_possible_port_alias, (port), CONST char *port) { port_aliases_t * pa, pa_key; if (Root == NULL) return port; pa_key.Port = (char *) port; pa = (port_aliases_t *) btree_search (Root, &pa_key); #if USE_GLOB_ALIASES if (pa == NULL) return get_possible_port_glob_alias (port); #endif if (pa == NULL) return port; else return pa->Alias; } #if USE_GLOB_ALIASES #include "globalias.h" static glob_aliases_queue_t *PortGlobQueue = QNULL; void DEFUN (insert_port_glob_alias, (port, alias), CONST char *port AND CONST char *alias) { globalias_insert (&PortGlobQueue, port, alias); } CONST char * DEFUN (get_possible_port_glob_alias, (port), CONST char *port) { return globalias_search (PortGlobQueue, port); } #endif /* if USE_GLOB_ALIASES */ #if USE_TCL int DEFUN (tcl_insert_port_alias, (clientData, interp, argc, argv), ClientData clientData AND Tcl_Interp * interp AND int argc AND char *argv[]) { if (argc != 3) { sprintf (interp->result, _("Wrong number of Parameters: %s needs an PortName and its Alias"), argv[0]); return TCL_ERROR; } insert_port_alias (argv[1], argv[2]); return TCL_OK; } #if USE_GLOB_ALIASES int DEFUN (tcl_insert_port_glob_alias, (clientData, interp, argc, argv), ClientData clientData AND Tcl_Interp * interp AND int argc AND char *argv[]) { if (argc != 3) { sprintf (interp->result, _("Wrong number of Parameters: %s needs an PortName and its GlobAlias"), argv[0]); return TCL_ERROR; } insert_port_glob_alias (argv[1], argv[2]); return TCL_OK; } #endif /* if USE_GLOB_ALIASES */ #endif /* if USE_TCL */ tua-4.3.orig/src/porttree.c0100644000175100001440000000661006105405023014226 0ustar mdusers/* porttree.c -- Port tree management * * This file is part of TUA. * * Copyright (C) 1991,96 Lele Gaifax * * 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. * */ #include "tua.h" static BTREE Root = NULL; static size_t ports_count = 0; static int DEFUN (port_compare, (port1, port2), CONST port_rec_t * port1 AND CONST port_rec_t * port2) { int ret = strcmp (port1->Port, port2->Port); return ret; } static PTR DEFUN (port_new, (data), CONST PTR data) { port_rec_t *pa; int idx; pa = (port_rec_t *) xmalloc (sizeof (port_rec_t)); pa->Port = savestring (((CONST port_rec_t *) data)->Port); pa->Killed = FALSE; for (idx = 0; idx < TIMESLICES; idx++) pa->Activity[idx] = 0.0; return (PTR) pa; } port_rec_t * DEFUN (insert_port, (port), CONST char *port) { port_rec_t pa; if (Root == NULL) Root = btree_new ((compare_func_t) port_compare, (makenew_func_t) port_new); /* * Reset the number of ports, so the next call to number_of_ports() will * recalculate it. * * Since number_of_ports() is called at report time, it is very probable * that no more ports will be added to the tree... but just to be sure ;-) */ ports_count = 0; pa.Port = (char *) get_possible_port_alias (port); return (port_rec_t *) btree_insert (Root, &pa); } void DEFUN (kill_port, (port), CONST char *port) { port_rec_t pa; if (Root == NULL) Root = btree_new ((compare_func_t) port_compare, (makenew_func_t) port_new); pa.Port = (char *) get_possible_port_alias (port); ((port_rec_t *) (btree_insert (Root, &pa)))->Killed = TRUE; } static traverse_func_t originalTraverseFunction; static void DEFUN (FilteredEnquiry, (port), CONST port_rec_t * port) { if (! port->Killed) (*originalTraverseFunction) (port); } void DEFUN (enquire_ports, (funct), traverse_func_t funct) { originalTraverseFunction = funct; btree_traverse (Root, (traverse_func_t) FilteredEnquiry); } port_rec_t * DEFUN (search_port, (port), CONST char *port) { port_rec_t pa; pa.Port = (char *) get_possible_port_alias (port); return (port_rec_t *) btree_search (Root, &pa); } size_t DEFUN_VOID (number_of_ports) { /* 0 means some ports has been added to the tree since last call */ if (! ports_count) ports_count = btree_count (Root); return ports_count; } #if USE_TCL int DEFUN (tcl_kill_port, (clientData, interp, argc, argv), ClientData clientData AND Tcl_Interp * interp AND int argc AND char *argv[]) { if (argc != 2) { sprintf (interp->result, _("Wrong number of Parameters: %s needs just one PortName"), argv[0]); return TCL_ERROR; } kill_port (argv[1]); return TCL_OK; } #endif /* if USE_TCL */ tua-4.3.orig/src/process.c0100644000175100001440000000564306105405023014045 0ustar mdusers/* process.c -- Keep status of a process * * This file is part of TUA. * * Copyright (C) 1991,96 Lele Gaifax * * 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. * */ /* I keep track of a per process info, storing such info in a tree keyed on * the process id. Although this is not unique, it should be enough because * at a single time (and probably in a day) this number will be unique. */ #include "tua.h" static BTREE Root = NULL; static int DEFUN (process_compare, (proc1, proc2), CONST process_status_t * proc1 AND CONST process_status_t * proc2) { int ret; if (proc1->ProcessId < proc2->ProcessId) ret = -1; else if (proc1->ProcessId == proc2->ProcessId) ret = 0; else ret = 1; return ret; } static PTR DEFUN (process_new, (data), CONST PTR data) { process_status_t *p; p = (process_status_t *) xmalloc (sizeof (process_status_t)); p->ProcessId = ((CONST process_status_t *) data)->ProcessId; p->Killed = FALSE; p->System = 0; p->Status = TUUS_NONE; p->LoginPassed = FALSE; #if HDB_UUCP p->StartTime = p->EndTime = 0; #endif return (PTR) p; } process_status_t * DEFUN (insert_process, (procId), int procId) { process_status_t p, *new_proc; if (Root == NULL) Root = btree_new ((compare_func_t) process_compare, (makenew_func_t) process_new); p.ProcessId = procId; new_proc = (process_status_t *) btree_insert (Root, &p); if (new_proc->Killed) { new_proc->Killed = FALSE; new_proc->System = 0; new_proc->Status = TUUS_NONE; #if HDB_UUCP new_proc->StartTime = new_proc->EndTime = 0.0; #endif } return new_proc; } void DEFUN (kill_process, (procId), int procId) { process_status_t p; p.ProcessId = procId; if (Root != NULL) { process_status_t * found = (process_status_t *) btree_search (Root, &p); if (found) found->Killed = TRUE; } } static traverse_func_t originalTraverseFunction; static void DEFUN (FilteredEnquiry, (proc), CONST process_status_t * proc) { if (! proc->Killed) (*originalTraverseFunction) (proc); } void DEFUN (enquire_processes, (funct), traverse_func_t funct) { originalTraverseFunction = funct; btree_traverse (Root, (traverse_func_t) FilteredEnquiry); } tua-4.3.orig/src/prochist.c0100644000175100001440000001672206105405023014222 0ustar mdusers/* prochist.c -- Process the history file, where it keeps the old summary * from "The Epoc". * * This file is part of TUA. * * Copyright (C) 1991,96 Lele Gaifax * * 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. * */ #include "tua.h" #define NotZero(rec) \ ((rec).Out.Files || (rec).In.Files || (rec).Out.Bytes || (rec).In.Bytes || \ (rec).Out.Time || (rec).In.Time) char TheEpoc[30] = {0}; static char TheLastOne[30] = {0}; /* * The history file is kept in ascii form, so anybody can easily alter * it. The first line is the date we began to play, the second one the * date of the last update. Then, in alphabetic order, the systems and * all the field of the system_history structure. */ /* * Read a line from file, skipping comments, that begins with a '#' */ static char * DEFUN (ReadALine, (file, where, lenght), FILE * file AND char where[] AND int lenght) { char *status; char buffer[256]; do { status = fgets (buffer, sizeof (buffer), file); } while (status != NULL && (buffer[0] == '#' || buffer[0] == '\n')); strncpy (where, buffer, lenght); return status; } int DEFUN_VOID (read_system_history) { extern int EXFUN(access, (CONST char *, int)); char pathname[LPNMAX]; char buffer[256]; FILE *FileHist; CONST char * history_filename; #if BOTH_OF_THEM history_filename = (is_taylor_uucp ? TAYLOR_HISTORY : HDB_HISTORY); #else #if TAYLOR_UUCP history_filename = TAYLOR_HISTORY; #else history_filename = HDB_HISTORY; #endif /* TAYLOR_UUCP */ #endif /* BOTH_OF_THEM */ sprintf (pathname, "%s/%s", logs_prefix_path_opt, history_filename); if (access (pathname, 0)) return (OK); if ((FileHist = fopen (pathname, "r")) == (FILE *) NULL) { LOG ("cannot open %s", pathname); return ERROR; } if (ReadALine (FileHist, TheEpoc, sizeof (TheEpoc)) == NULL || ReadALine (FileHist, TheLastOne, sizeof (TheLastOne)) == NULL) { LOG ("%s is not a valid history file", pathname); return ERROR; } while (ReadALine (FileHist, buffer, sizeof (buffer)) != NULL && *buffer != '%') { system_rec_t *sr; moved_stuff_t ms_in, ms_out; char sys[20]; if (sscanf (buffer, "%s %u %u %lf %lf %lf %lf", sys, &ms_out.Files, &ms_in.Files, &ms_out.Bytes, &ms_in.Bytes, &ms_out.Time, &ms_in.Time) != 7) { LOG ("%s is not a valid history file", pathname); return ERROR; } if (just_some_system_opt && (search_system (sys) == (system_rec_t *) NULL)) continue; sr = insert_system (sys); sr->History.Out = ms_out; sr->History.In = ms_in; } if (*buffer == '%') /* If there is a line beginning with '%' * then there is the monthly data too */ { while (ReadALine (FileHist, buffer, sizeof (buffer)) != NULL) { system_rec_t *sr; char sys[20]; double monthly_data[12]; int idx, last_month; if (sscanf (buffer, "%s %lf %lf %lf %lf %lf %lf %lf %lf %lf %lf %lf %lf %d", sys, &monthly_data[0], &monthly_data[1], &monthly_data[2], &monthly_data[3], &monthly_data[4], &monthly_data[5], &monthly_data[6], &monthly_data[7], &monthly_data[8], &monthly_data[9], &monthly_data[10], &monthly_data[11], &last_month) != 14) { LOG ("%s is not a valid history file", pathname); return ERROR; } if (just_some_system_opt && (search_system (sys) == (system_rec_t *) NULL)) continue; sr = insert_system (sys); for (idx = 0; idx <= 11; idx++) sr->History.MonthlyActivity[idx] = monthly_data[idx]; sr->History.LastMonthProcessed = last_month; } } else return ERROR; fclose (FileHist); return (OK); } static FILE *FileHist; static void DEFUN (WriteSysHist, (sys), CONST system_rec_t * sys) { if (NotZero (*sys) || NotZero (sys->History)) { fprintf (FileHist, "%s %u %u %f %f %f %f\n", sys->System, sys->History.Out.Files + sys->Out.Files, sys->History.In.Files + sys->In.Files, sys->History.Out.Bytes + sys->Out.Bytes, sys->History.In.Bytes + sys->In.Bytes, sys->History.Out.Time + sys->Out.Time, sys->History.In.Time + sys->In.Time); } } static void DEFUN (WriteSysHistResetting, (sys), CONST system_rec_t * sys) { if (NotZero (*sys)) fprintf (FileHist, "%s %u %u %f %f %f %f\n", sys->System, sys->Out.Files, sys->In.Files, sys->Out.Bytes, sys->In.Bytes, sys->Out.Time, sys->In.Time); } static void DEFUN (WriteMonthlyData, (sys), CONST system_rec_t * sys) { if (NotZero (*sys) || NotZero (sys->History)) { int idx; fprintf (FileHist, "%s", sys->System); for (idx = 0; idx <= 11; idx++) fprintf (FileHist, " %.2f", sys->History.MonthlyActivity[idx]); fprintf (FileHist, " %d\n", sys->History.LastMonthProcessed); } } int DEFUN (write_system_history, (reset), int reset) { char pathname[LPNMAX]; traverse_func_t write_funct; CONST char * history_filename; #if BOTH_OF_THEM history_filename = (is_taylor_uucp ? TAYLOR_HISTORY : HDB_HISTORY); #else #if TAYLOR_UUCP history_filename = TAYLOR_HISTORY; #else history_filename = HDB_HISTORY; #endif /* TAYLOR_UUCP */ #endif /* BOTH_OF_THEM */ sprintf (pathname, "%s/%s", logs_prefix_path_opt, history_filename); if ((FileHist = fopen (pathname, "w")) == (FILE *) NULL) { LOG ("cannot open %s", pathname); return ERROR; } /* * If I have to reset the history, the initial date become the * date of the last update, while this one become the current * date. Otherwise update only the last one. */ fputs ("#\n\ # This is the history file for TUA, created automatically.\n\ # It should't be edited by hand. Anyway (;-)), there must be no empty lines,\n\ # and the number of fields must be 7 for the historical section, 14 for the\n\ # monthly one, separated with blanks.\n\ # After the historical data, there is a line with a single '%' char at the\n\ # beginning, and next the monthly summary, system by system.\n\ #\n\ # system-name fileout filein byteout bytein Out.Time In.Time\n\ #\n", FileHist); if (reset) { fprintf (FileHist, "%s", (*TheLastOne ? TheLastOne : Since)); if (!*TheLastOne) fprintf (FileHist, "\n"); fprintf (FileHist, "%s\n", julian_to_asc (StatEndingTime)); } else { fprintf (FileHist, "%s", (*TheEpoc ? TheEpoc : Since)); if (!*TheEpoc) fprintf (FileHist, "\n"); fprintf (FileHist, "%s\n", julian_to_asc (StatEndingTime)); } if (reset) write_funct = (traverse_func_t) WriteSysHistResetting; else write_funct = (traverse_func_t) WriteSysHist; enquire_systems (write_funct); fputs ("%\n", FileHist); enquire_systems ((traverse_func_t) WriteMonthlyData); fclose (FileHist); return OK; } tua-4.3.orig/src/globalias.c0100644000175100001440000000524306105405023014320 0ustar mdusers/* globalias.c -- GlobAlias Queues Building Functions. * * This file is part of TUA. * * Copyright (C) 1991,96 Lele Gaifax * * 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. * */ #include "tua.h" #if USE_GLOB_ALIASES #include "globalias.h" void DEFUN (globalias_insert, (queue, glob_name, alias), glob_aliases_queue_t ** queue AND CONST char *glob_name AND CONST char *alias) { if (*queue == QNULL) { *queue = (glob_aliases_queue_t *) xmalloc (sizeof (glob_aliases_queue_t)); (*queue)->Name = savestring (glob_name); (*queue)->Alias = savestring (alias); (*queue)->Next = QNULL; } else { glob_aliases_queue_t *temp, *tail; temp = tail = *queue; while (temp != QNULL && strcmp (temp->Name, glob_name) != 0) { tail = temp; temp = temp->Next; } if (temp == QNULL) { temp = (glob_aliases_queue_t *) xmalloc (sizeof (glob_aliases_queue_t)); temp->Next = QNULL; temp->Name = savestring (glob_name); temp->Alias = savestring (alias); tail->Next = temp; } } return; } CONST char * DEFUN (globalias_search, (queue, name), CONST glob_aliases_queue_t * queue AND CONST char *name) { while (queue != QNULL && !wildmat (name, queue->Name)) queue = queue->Next; if (queue == QNULL) return name; else return queue->Alias; } #ifdef TEST static glob_aliases_queue_t *Root = QNULL; main () { globalias_insert (&Root, "*ele", "Emanuele"); globalias_insert (&Root, "ipo*[abc]", "secondo"); printf ("gabriele -> %s\n", globalias_search (Root, "gabriele")); printf ("ipoKJHKJHa -> %s\n", globalias_search (Root, "ipoKJHKJHa")); printf ("ipoKJHKJHY -> %s\n", globalias_search (Root, "ipoKJHKJHY")); printf ("gabriele -> %s\n", globalias_search (Root, "gabriele")); printf ("ipoKJHKJHa -> %s\n", globalias_search (Root, "ipoKJHKJHa")); printf ("ipoKJHKJHY -> %s\n", globalias_search (Root, "ipoKJHKJHY")); } #endif /* TEST */ #endif /* if USE_GLOB_ALIASES */ tua-4.3.orig/src/readl_supp.c0100644000175100001440000000245506105405023014523 0ustar mdusers/* readl_supp.c -- GNU Readline Support Functions * * This file is part of TUA. * * Copyright (C) 1991,96 Lele Gaifax * * 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. * */ #include "tua.h" #include #include static char *line_read = NULL; char * DEFUN (readline_gets, (prompt), char *prompt) { xfree (line_read); line_read = NULL; line_read = readline (prompt); if (line_read && *line_read) add_history (line_read); return line_read; } void DEFUN (initialize_readline, (progname), CONST char *progname) { rl_readline_name = (char *) progname; } tua-4.3.orig/src/reports.c0100644000175100001440000006177006110070745014075 0ustar mdusers/* reports.c -- Use this module to check all the others! ;-) * * This file is part of TUA. * * Copyright (C) 1991,96 Lele Gaifax * * 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. * */ #include "tua.h" #include "pcdl.h" extern PTR EXFUN(malloc, (size_t)); static void EXFUN (systems_summary_header, (NOARGS)); static void EXFUN (systems_summary_table_header, (NOARGS)); #define BYTES_PER_KBYTE 1024.0 #define BYTES_PER_MBYTE (BYTES_PER_KBYTE*1000.0) #define BYTES_PER_GBYTE (BYTES_PER_MBYTE*1000.0) #define NotZero(rec) \ ((rec).Out.Files || (rec).In.Files || (rec).Out.Bytes || (rec).In.Bytes || \ (rec).Out.Time || (rec).In.Time) static char * /* Transforms seconds to "hh:mm:ss" */ DEFUN (time_to_string, (tim), double tim) { char *str; int hh, mm, ss; register time_t ltim = (time_t) tim; ltim = (time_t) tim; hh = (int) (ltim / 3600L); ltim %= 3600L; mm = (int) (ltim / 60L); ss = (int) (ltim % 60L); str = (char *) malloc (sizeof "HHHH:MM:SS.hh"); sprintf (str, "%4d:%02d:%02d.%02d", hh, mm, ss, (int) ((tim - (int) (tim)) * 100)); return (str); } static void DEFUN (print_the_command, (comm), CONST command_rec_t * comm) { if (comm->Number > 1) printf ("\t(%4u) ", comm->Number); else printf ("\t "); printf ("%s\n", comm->Command); } static void DEFUN (print_the_system, (system), CONST system_rec_t * system) { if (NotZero (*system)) { printf ("%-11.11s %4u %8.0f%s %5d %4u %8.0f%s %5d\n", system->System, system->In.Files, system->In.Bytes / BYTES_PER_KBYTE, time_to_string (system->In.Time), (system->In.Time ? (int) (system->In.Bytes / system->In.Time) : 0), system->Out.Files, system->Out.Bytes / BYTES_PER_KBYTE, time_to_string (system->Out.Time), (system->Out.Time ? (int) (system->Out.Bytes / system->Out.Time) : 0)); if (do_command_report_opt && !separated_command_report_opt && system->Commands) { puts (_("\tCommands:\n\t=========")); enquire_commands (system->Commands, (traverse_func_t) print_the_command); puts (""); } } } static void DEFUN (print_the_system_commands, (system), CONST system_rec_t * system) { if (system->Commands) { printf (" %s:\n", system->System); enquire_commands (system->Commands, (traverse_func_t) print_the_command); puts (""); } } static void DEFUN_VOID (systems_report_header) { puts (_("By System:\n==========")); puts (_(" R E C E I V E D S E N T")); puts (_("System Files KBytes Time ATP Files KBytes Time ATP\n")); } void DEFUN_VOID (systems_report) { systems_report_header (); enquire_systems ((traverse_func_t) print_the_system); } void DEFUN_VOID (systems_command_report) { if (do_command_report_opt) { puts (_("\nCommands By System:\n===================")); enquire_systems ((traverse_func_t) print_the_system_commands); puts (""); } } static void DEFUN (print_the_user, (user), CONST user_rec_t * user) { printf ("%-11.11s %4u %8.0f %s\n", user->User, user->Out.Files, user->Out.Bytes / BYTES_PER_KBYTE, time_to_string (user->Out.Time)); if (do_command_report_opt && !separated_command_report_opt && user->Commands) { puts (_("\tCommands:\n\t=========")); enquire_commands (user->Commands, (traverse_func_t) print_the_command); puts (""); } } static void DEFUN (print_the_user_commands, (user), CONST user_rec_t * user) { if (user->Commands) { printf (" %s:\n", user->User); enquire_commands (user->Commands, (traverse_func_t) print_the_command); puts (""); } } static void DEFUN_VOID (users_report_header) { puts (_("\nBy User:\n========")); puts (_(" S E N T")); puts (_("User Files KBytes Time\n")); } void DEFUN_VOID (users_report) { users_report_header (); enquire_users ((traverse_func_t) print_the_user); } void DEFUN_VOID (users_command_report) { if (do_command_report_opt) { puts (_("\nBy User:\n========")); enquire_users ((traverse_func_t) print_the_user_commands); } } static void DEFUN (print_the_day, (day), CONST day_rec_t * day) { #if HDB_UUCP #if TAYLOR_UUCP if (!is_taylor_uucp) #endif printf ("%02hd/%02hd %4u %8.0f %s %4u %8.0f %s\n", day->Date.Month, day->Date.Day, day->In.Files, day->In.Bytes / BYTES_PER_KBYTE, time_to_string (day->In.Time), day->Out.Files, day->Out.Bytes / BYTES_PER_KBYTE, time_to_string (day->Out.Time)); #if TAYLOR_UUCP else #endif #endif /* HDB_UUCP */ #ifdef TAYLOR_UUCP printf ("%04hd/%02hd/%02hd %4u %8.0f %s %4u %8.0f %s\n", day->Date.Year, day->Date.Month, day->Date.Day, day->In.Files, day->In.Bytes / BYTES_PER_KBYTE, time_to_string (day->In.Time), day->Out.Files, day->Out.Bytes / BYTES_PER_KBYTE, time_to_string (day->Out.Time)); #endif if (do_command_report_opt && !separated_command_report_opt && day->Commands) { puts (_("\tCommands:\n\t=========")); enquire_commands (day->Commands, (traverse_func_t) print_the_command); puts (""); } } static void DEFUN (print_the_day_commands, (day), CONST day_rec_t * day) { if (day->Commands) { printf (" %02d/%02d:\n", day->Date.Month, day->Date.Day); enquire_commands (day->Commands, (traverse_func_t) print_the_command); puts (""); } } void DEFUN_VOID (daily_report) { puts (_("\nBy Day:\n=======")); #if HDB_UUCP #if TAYLOR_UUCP if (! is_taylor_uucp) #endif { puts (_("Date R E C E I V E D S E N T")); puts (_("Mo/Dy Files KBytes Time Files KBytes Time\n")); } #if TAYLOR_UUCP else #endif #endif /* HDB_UUCP */ #if TAYLOR_UUCP { puts (_(" Date R E C E I V E D S E N T")); puts (_("Year/Mo/Dy Files KBytes Time Files KBytes Time\n")); } #endif enquire_days ((traverse_func_t) print_the_day); } void DEFUN_VOID (daily_command_report) { if (do_command_report_opt) { puts (_("\nBy Day:\n=======")); enquire_days ((traverse_func_t) print_the_day_commands); } } static void DEFUN (print_the_system_summary, (system), CONST system_rec_t * system) { if (NotZero (*system) || system->Calls) { printf ("\n%s:\n", system->System); if (NotZero (*system)) { register idx; double sum_of_times, dead_time; int first_rate; printf (_("\tReceived %10.0f (%4u Files) in %s: %4d cps\n"), system->In.Bytes, system->In.Files, time_to_string (system->In.Time), (system->In.Time ? (int) (system->In.Bytes / system->In.Time) : 0)); printf (_("\tSent %10.0f (%4u Files) in %s: %4d cps\n"), system->Out.Bytes, system->Out.Files, time_to_string (system->Out.Time), (system->Out.Time ? (int) (system->Out.Bytes / system->Out.Time) : 0)); if (system->In.Bytes > system->Out.Bytes) printf (_("\tReceived %10.0f bytes more than sent.\n"), system->In.Bytes - system->Out.Bytes); else if (system->In.Bytes < system->Out.Bytes) printf (_("\tSent %10.0f bytes more than received.\n"), system->Out.Bytes - system->In.Bytes); sum_of_times = system->In.Time + system->Out.Time; dead_time = system->TimeConnect - sum_of_times; printf (_("\tThe system has been connected for %s"), time_to_string (system->TimeConnect)); if (dead_time && (system->TimeConnect != 0.0)) printf (_(" (%3.1f%% of dead time)\n"), (dead_time / system->TimeConnect * 100.0)); else puts (""); if (system->TimePayedBy[LOCAL_SYSTEM] != 0.0 || system->TimePayedBy[REMOTE_SYSTEM] != 0.0) { if (system->TimePayedBy[LOCAL_SYSTEM] != 0.0) { if (system->TimePayedBy[REMOTE_SYSTEM] == 0.0) printf (_("\t\tentirely payed by the local system.\n")); else { printf (_("\t\tof which %s (%5.1f%%) are payed by the local system\n"), time_to_string (system->TimePayedBy[LOCAL_SYSTEM]), system->TimePayedBy[LOCAL_SYSTEM] / system->TimeConnect * 100.0); printf (_("\t\t and %s (%5.1f%%) by this system.\n"), time_to_string (system->TimePayedBy[REMOTE_SYSTEM]), system->TimePayedBy[REMOTE_SYSTEM] / system->TimeConnect * 100.0); } } else printf (_("\t\tentirely payed by this system.\n")); } if (pcd_names_count) { for (sum_of_times=0, idx = 0, first_rate=1; idx < pcd_names_count; idx++) sum_of_times += system->PhoneCost[idx]; for (idx = 0, first_rate=1; idx < pcd_names_count; idx++) { if (system->PhoneCost[idx] != .0) { float cost; static const char * spent_text; static int spent_text_len; if (! spent_text) { spent_text = _("Spent "); spent_text_len = strlen (spent_text); } cost = (pcd_rate_call_cost (idx+1) * system->PhoneCall[idx] + pcd_calculate_cost (idx+1, system->PhoneCost[idx])); printf ("\t%*s%s (%5.1f%%", spent_text_len, (first_rate ? spent_text : ""), time_to_string (system->PhoneCost[idx]), (system->PhoneCost[idx]/sum_of_times * 100.0)); if (cost) { printf (", %*.*f %s)", 7+current_country.decimals, current_country.decimals, cost, current_country.currency); } else putchar (')'); printf (_(" in %s\n"), pcd_rate_name (idx+1)); first_rate = 0; } } } } /* if (NotZero (*system)) */ if (system->LastConnection) { printf (_("\tLast connection: %s\n"), julian_to_asc (system->LastConnection)); printf (_("\tThere have been %u call(s) (with an average of %.1f Ok/day):\n\t\t\t\t\t"), system->Calls, ((float) system->CallsOK / (float) DaysSinceLastClean)); if (system->CallsOK) { if (system->CallsSTOPPED) printf (_("%3u OK (%3u IN, %3u OUT, %3u STOPPED)\n\t\t\t\t\t"), system->CallsOK, system->CallsIn, system->CallsOut, system->CallsSTOPPED); else printf (_("%3u OK (%3u IN, %3u OUT)\n\t\t\t\t\t"), system->CallsOK, system->CallsIn, system->CallsOut); } if (system->CallsFAIL) printf (_("%3u FAILED\n"), system->CallsFAIL); } else /* system->LastConnection == 0 */ { /* This means that the system has not been contacted, due to errors * so there are only failed calls */ printf (_("\tThere have been %u failed calls\n"), system->CallsFAIL); } } } static void DEFUN_VOID (systems_summary_header) { puts (_("\nSUMMARY by System:\n==================")); } void DEFUN_VOID (systems_summary) { systems_summary_header (); enquire_systems ((traverse_func_t) print_the_system_summary); puts (""); } static moved_stuff_t TotIn, TotOut; static char * DEFUN (bytes_to_string, (byt), double byt) { char *stringa = (char *) malloc (11); sprintf (stringa, "%9.0f", byt / BYTES_PER_KBYTE); return stringa; } static void DEFUN (print_the_system_summary_table, (sys), CONST system_rec_t * sys) { double TotTime = sys->In.Time + sys->Out.Time; double TotBytes = sys->Out.Bytes + sys->In.Bytes; if (NotZero (*sys)) { TotIn.Time += sys->In.Time; TotOut.Time += sys->Out.Time; TotIn.Bytes += sys->In.Bytes; TotOut.Bytes += sys->Out.Bytes; TotIn.Files += sys->In.Files; TotOut.Files += sys->Out.Files; printf ("|%-8.8s| %s :%10.10s: %5u | %s :%10.10s: %5u |%5d|\n", sys->System, bytes_to_string (sys->In.Bytes), time_to_string (sys->In.Time), sys->In.Files, bytes_to_string (sys->Out.Bytes), time_to_string (sys->Out.Time), sys->Out.Files, (TotTime ? (int) (TotBytes / TotTime) : 0)); } } static void DEFUN_VOID (systems_summary_table_header) { puts ("+--------+------------------------------+------------------------------+-----+"); puts (_("| | R E C E I V E D | S E N T | |")); puts (_("| SYSTEM | KiloBytes : Time : Files | KiloBytes : Time : Files | ATP |")); puts ("+--------+-----------:----------:-------+-----------:----------:-------+-----|"); } void DEFUN_VOID (systems_summary_table) { systems_summary_table_header (); enquire_systems ((traverse_func_t) print_the_system_summary_table); puts ("+--------+-----------:----------:-------+-----------:----------:-------+-----|"); printf (_("| TOTALS | %s :%10.10s: %5u | %s :%10.10s: %5u | ####|\n"), bytes_to_string (TotIn.Bytes), time_to_string (TotIn.Time), TotIn.Files, bytes_to_string (TotOut.Bytes), time_to_string (TotOut.Time), TotOut.Files); puts ("+--------+-----------:----------:-------+-----------:----------:-------+-----|"); } static void DEFUN (print_the_system_history_table, (sys), CONST system_rec_t * sys) { double TotTime = sys->History.In.Time + sys->History.Out.Time + sys->In.Time + sys->Out.Time; double TotBytes = sys->History.Out.Bytes + sys->History.In.Bytes + sys->In.Bytes + sys->Out.Bytes; if (NotZero (*sys) || NotZero (sys->History)) { TotIn.Time += sys->History.In.Time; TotOut.Time += sys->History.Out.Time; TotIn.Bytes += sys->History.In.Bytes; TotOut.Bytes += sys->History.Out.Bytes; TotIn.Files += sys->History.In.Files; TotOut.Files += sys->History.Out.Files; printf ("|%-8.8s| %s :%10.10s: %5u | %s :%10.10s: %5u |%5d|\n", sys->System, bytes_to_string (sys->History.In.Bytes + sys->In.Bytes), time_to_string (sys->History.In.Time + sys->In.Time), sys->History.In.Files + sys->In.Files, bytes_to_string (sys->History.Out.Bytes + sys->Out.Bytes), time_to_string (sys->History.Out.Time + sys->Out.Time), sys->History.Out.Files + sys->Out.Files, (TotTime ? (int) (TotBytes / TotTime) : 0)); } } void DEFUN_VOID (system_history_table) { printf (_("\n...and since %s\n"), TheEpoc); puts ("+--------+------------------------------+------------------------------+-----+"); puts (_("| | R E C E I V E D | S E N T | |")); puts (_("| SYSTEM | KiloBytes : Time : Files | KiloBytes : Time : Files | ATP |")); puts ("+--------+-----------:----------:-------+-----------:----------:-------+-----|"); enquire_systems ((traverse_func_t) print_the_system_history_table); puts ("+--------+-----------:----------:-------+-----------:----------:-------+-----|"); printf (_("| TOTALS | %s :%10.10s: %5u | %s :%10.10s: %5u | ####|\n"), bytes_to_string (TotIn.Bytes), time_to_string (TotIn.Time), TotIn.Files, bytes_to_string (TotOut.Bytes), time_to_string (TotOut.Time), TotOut.Files); puts ("+--------+-----------:----------:-------+-----------:----------:-------+-----|"); } static double MonthlyActivityTotals[12]; static void DEFUN (print_the_system_monthly_activity, (sys), CONST system_rec_t * sys) { int idx; double sum = .0; for (idx = 0; idx <= 11; idx++) sum += sys->History.MonthlyActivity[idx]; if (sum > 0.0) { printf ("\n%-6.6s", sys->System); for (idx = 0; idx <= 11; idx++) { double bytes = sys->History.MonthlyActivity[(idx + CurrentMonth) % 12]; MonthlyActivityTotals[(idx + CurrentMonth) % 12] += bytes; if (bytes == -1.0) printf ("| *** "); else if (bytes < 10000.0) printf ("|%4.0f ", bytes); else if ((bytes/BYTES_PER_KBYTE) < 10000.0) printf ("|%4.0fK", bytes / BYTES_PER_KBYTE); else if ((bytes/BYTES_PER_MBYTE) < 10000.0) printf ("|%4.0fM", bytes / BYTES_PER_MBYTE); else printf ("|%4.0fG", bytes / BYTES_PER_GBYTE); } } } void DEFUN_VOID (monthly_history_table) { static char *MonthName[] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" }; int idx; puts (_("\n\nLast 12 Months Activity\n=======================\n")); printf ("------+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----\n"); printf (_("System")); for (idx = 0; idx <= 11; idx++) { printf ("| %s", MonthName[(idx + CurrentMonth) % 12]); if (idx != 11) putchar (' '); } printf ("\n------+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----"); enquire_systems ((traverse_func_t) print_the_system_monthly_activity); printf ("\n------+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----\n"); printf (_("TOTALS")); for (idx = 0; idx <= 11; idx++) { double bytes = MonthlyActivityTotals[(idx + CurrentMonth) % 12]; if (bytes < 0.0) printf ("| *** "); else if (bytes < 10000.0) printf ("|%4.0f ", bytes); else if ((bytes/BYTES_PER_KBYTE) < 10000.0) printf ("|%4.0fK", bytes / BYTES_PER_KBYTE); else if ((bytes/BYTES_PER_MBYTE) < 10000.0) printf ("|%4.0fM", bytes / BYTES_PER_MBYTE); else printf ("|%4.0fG", bytes / BYTES_PER_GBYTE); } printf ("\n------+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----\n"); } static double PortActivityTotals[TIMESLICES] = {0}; static void DEFUN (print_the_port_activity_chart, (port), CONST port_rec_t * port) { int row, slice; double maxval = 0.0; double scale; BOOLEAN IsGlobalActivityChart = (port == NULL ? TRUE : FALSE); for (slice = 0; slice < TIMESLICES; slice++) { double curval; if (!IsGlobalActivityChart) PortActivityTotals[slice] += (curval = port->Activity[slice]); else curval = PortActivityTotals[slice]; if (curval > maxval) maxval = curval; } scale = maxval / chart_size_opt; if (IsGlobalActivityChart || number_of_ports() == 1) { puts (_("\n\nGlobal Hourly Activity (on a 20 minutes basis)\n==============================================")); } else { printf (_("\n\nHourly Activity (on a 20 minutes basis) on %s\n======================================================\n"), port->Port); } printf (_("Max Value : %.0f bytes\nScale : '#'= %.0f bytes\n\n"), maxval, scale); for (row = chart_size_opt; row > 0; row--) { double current_value = row * scale; printf (" "); for (slice = 0; slice < 72; slice++) { double curval = (IsGlobalActivityChart ? PortActivityTotals[slice] : port->Activity[slice]); if (curval >= current_value) putchar ('#'); else putchar (' '); } puts (""); } puts (" ========================================================================"); puts (" 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23"); } void DEFUN_VOID (hourly_activity_charts) { enquire_ports ((traverse_func_t) print_the_port_activity_chart); if (number_of_ports() > 1) print_the_port_activity_chart (0); /* 0 means "do the global activity chart" */ } #if USE_TCL static char error_msg[] = "Wrong number of Parameters: %s doesn't accept any!"; int DEFUN (tcl_systems_report, (clientData, interp, argc, argv), ClientData clientData AND Tcl_Interp * interp AND int argc AND char *argv[]) { if (argc > 1) { sprintf (interp->result, _(error_msg), argv[0]); return TCL_ERROR; } systems_report (); return TCL_OK; } int DEFUN (tcl_users_report, (clientData, interp, argc, argv), ClientData clientData AND Tcl_Interp * interp AND int argc AND char *argv[]) { if (argc > 1) { sprintf (interp->result, _(error_msg), argv[0]); return TCL_ERROR; } users_report (); return TCL_OK; } int DEFUN (tcl_daily_report, (clientData, interp, argc, argv), ClientData clientData AND Tcl_Interp * interp AND int argc AND char *argv[]) { if (argc > 1) { sprintf (interp->result, error_msg, argv[0]); return TCL_ERROR; } daily_report (); return TCL_OK; } int DEFUN (tcl_system_summary, (clientData, interp, argc, argv), ClientData clientData AND Tcl_Interp * interp AND int argc AND char *argv[]) { if (argc > 1) { sprintf (interp->result, error_msg, argv[0]); return TCL_ERROR; } systems_summary (); return TCL_OK; } int DEFUN (tcl_system_summary_table, (clientData, interp, argc, argv), ClientData clientData AND Tcl_Interp * interp AND int argc AND char *argv[]) { if (argc > 1) { sprintf (interp->result, error_msg, argv[0]); return TCL_ERROR; } systems_summary_table (); return TCL_OK; } typedef enum { I_DONT_KNOW = -1, DAILY, PORTS, SUMMARY, SYSTEMS, TABLE, USERS } report_id_t; #define NUMELEM(array) (sizeof(array) / sizeof(array[0])) static report_id_t DEFUN (decode_report, (report), char *report) { register idx; static struct { char *report_name; report_id_t rep_id; } HandledRep[] = { { "daily", DAILY }, { "ports", PORTS, }, { "summary", SUMMARY }, { "systems", SYSTEMS }, { "table", TABLE }, { "users", USERS }}; for (idx = 0; idx < NUMELEM (HandledRep) && *report >= *(HandledRep[idx].report_name); idx++) { if (*report == *(HandledRep[idx].report_name) && strncmp (report, HandledRep[idx].report_name, strlen (report)) == 0) return HandledRep[idx].rep_id; } return I_DONT_KNOW; } int DEFUN (tcl_report, (clientData, interp, argc, argv), ClientData clientData AND Tcl_Interp * interp AND int argc AND char *argv[]) { if (argc == 1) print_the_report (); else { report_id_t which_one; switch (which_one = decode_report (argv[1])) { case SUMMARY: { if (argc > 2) { int idx; int first_time = TRUE; for (idx = 2; idx < argc; idx++) { system_rec_t *sr = search_system (argv[idx]); if (sr != (system_rec_t *) NULL) { if (first_time) { systems_summary_header (); first_time = FALSE; } print_the_system_summary (sr); } else { sprintf (interp->result, _("%s: system %s is unknown to me"), argv[0], argv[idx]); return TCL_ERROR; } } } else systems_summary (); } break; case TABLE: { if (argc > 2) { int idx; int first_time = TRUE; for (idx = 2; idx < argc; idx++) { system_rec_t *sr = search_system (argv[idx]); if (sr != (system_rec_t *) NULL) { if (first_time) { systems_summary_table_header (); first_time = FALSE; } print_the_system_summary_table (sr); } else { sprintf (interp->result, _("%s: system %s is unknown to me"), argv[0], argv[idx]); return TCL_ERROR; } } } else systems_summary_table (); } break; case SYSTEMS: { if (argc > 2) { int idx; int first_time = TRUE; for (idx = 2; idx < argc; idx++) { system_rec_t *sr = search_system (argv[idx]); if (sr != (system_rec_t *) NULL) { if (first_time) { systems_report_header (); first_time = FALSE; } print_the_system (sr); } else { sprintf (interp->result, _("%s: system %s is unknown to me"), argv[0], argv[idx]); return TCL_ERROR; } } } else systems_report (); } break; case USERS: { if (argc > 2) { int idx; int first_time = TRUE; for (idx = 2; idx < argc; idx++) { user_rec_t *ur = search_user (argv[idx]); if (ur != (user_rec_t *) NULL) { if (first_time) { users_report_header (); first_time = FALSE; } print_the_user (ur); } else { sprintf (interp->result, _("%s: user %s is unknown to me"), argv[0], argv[idx]); return TCL_ERROR; } } } else users_report (); } break; case PORTS: { if (argc > 2) { int idx; for (idx = 2; idx < argc; idx++) { port_rec_t *pa = search_port (argv[idx]); if (pa != (port_rec_t *) NULL) print_the_port_activity_chart (pa); else { sprintf (interp->result, _("%s: port %s is unknown to me"), argv[0], argv[idx]); return TCL_ERROR; } } } else hourly_activity_charts (); } break; case DAILY: daily_report (); break; case I_DONT_KNOW: sprintf (interp->result, _("%s: Unknown report requested: I know about 'systems', 'users', 'ports' and 'daily' only"), argv[0]); return TCL_ERROR; } } return TCL_OK; } #endif /* if USE_TCL */ tua-4.3.orig/src/sysalias.c0100644000175100001440000000711406105405024014213 0ustar mdusers/* sysalias.c -- Systems Aliases tree management. * * This file is part of TUA. * * Copyright (C) 1991,96 Lele Gaifax * * 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. * */ #include "tua.h" typedef struct system_aliases { char *System; char *Alias; } system_aliases_t; static BTREE Root = NULL; static int DEFUN (alias_compare, (sys1, sys2), CONST system_aliases_t * sys1 AND CONST system_aliases_t * sys2) { int ret = strcmp (sys1->System, sys2->System); return ret; } static PTR DEFUN (alias_new, (data), CONST PTR * data) { system_aliases_t * sa; sa = (system_aliases_t *) xmalloc (sizeof (system_aliases_t)); sa->System = savestring (((CONST system_aliases_t *) data)->System); sa->Alias = NULL; return (PTR) sa; } CONST char * DEFUN (insert_system_alias, (sys, alias), CONST char *sys AND CONST char *alias) { system_aliases_t * sr_new, sr; if (Root == NULL) Root = btree_new ((compare_func_t) alias_compare, (makenew_func_t) alias_new); sr.System = (char *) sys; sr_new = (system_aliases_t *) btree_insert (Root, &sr); if (! sr_new->Alias) sr_new->Alias = savestring (alias); return sr_new->Alias; } CONST char * DEFUN (get_possible_system_alias, (sys), CONST char *sys) { system_aliases_t * sa, sa_key; if (Root == NULL) return sys; sa_key.System = (char *) sys; sa = (system_aliases_t *) btree_search (Root, &sa_key); #if USE_GLOB_ALIASES if (sa == NULL) return get_possible_system_glob_alias (sys); #endif if (sa == NULL) return sys; else return sa->Alias; } #if USE_GLOB_ALIASES #include "globalias.h" static glob_aliases_queue_t *SystemGlobQueue = QNULL; void DEFUN (insert_system_glob_alias, (sys, alias), CONST char *sys AND CONST char *alias) { globalias_insert (&SystemGlobQueue, sys, alias); } CONST char * DEFUN (get_possible_system_glob_alias, (sys), CONST char *sys) { return globalias_search (SystemGlobQueue, sys); } #endif /* if USE_GLOB_ALIASES */ #if USE_TCL int DEFUN (tcl_insert_system_alias, (clientData, interp, argc, argv), ClientData clientData AND Tcl_Interp * interp AND int argc AND char *argv[]) { if (argc != 3) { sprintf (interp->result, _("Wrong number of Parameters: %s needs an SystemName and its Alias"), argv[0]); return TCL_ERROR; } insert_system_alias (argv[1], argv[2]); return TCL_OK; } #if USE_GLOB_ALIASES int DEFUN (tcl_insert_system_glob_alias, (clientData, interp, argc, argv), ClientData clientData AND Tcl_Interp * interp AND int argc AND char *argv[]) { if (argc != 3) { sprintf (interp->result, _("Wrong number of Parameters: %s needs an SystemName and its GlobAlias"), argv[0]); return TCL_ERROR; } insert_system_glob_alias (argv[1], argv[2]); return TCL_OK; } #endif /* if USE_GLOB_ALIASES */ #endif /* if USE_TCL */ tua-4.3.orig/src/systree.c0100644000175100001440000001002306105405024014052 0ustar mdusers/* systree.c -- Systems tree management. * * This file is part of TUA. * * Copyright (C) 1991,96 Lele Gaifax * * 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. * */ #include "tua.h" #include "pcdl.h" static BTREE Root = NULL; static int DEFUN (system_compare, (sys1, sys2), CONST system_rec_t * sys1 AND CONST system_rec_t * sys2) { int ret = strcmp (sys1->System, sys2->System); return ret; } void DEFUN (system_alloc_phone_costs, (sys), system_rec_t * sys) { int idx; sys->PhoneCost = (double *) xmalloc (sizeof(double) * pcd_names_count); sys->PhoneCall = (unsigned int *) xmalloc (sizeof(unsigned int) * pcd_names_count); for (idx = 0; idx < pcd_names_count; idx++) { sys->PhoneCost[idx] = 0.0; sys->PhoneCall[idx] = 0; } } static PTR DEFUN (system_new, (data), CONST PTR data) { system_rec_t *sr; int idx; sr = (system_rec_t *) xmalloc (sizeof (system_rec_t)); sr->System = savestring (((system_rec_t *) data)->System); sr->Killed = FALSE; sr->Out.Files = sr->In.Files = 0; sr->Out.Bytes = sr->In.Bytes = 0.0; sr->Out.Time = sr->In.Time = sr->TimeConnect = 0.0; if (pcd_names_count) system_alloc_phone_costs (sr); else { sr->PhoneCall = 0; sr->PhoneCost = 0; } sr->TimePayedBy[LOCAL_SYSTEM] = sr->TimePayedBy[REMOTE_SYSTEM] = 0.0; sr->Calls = sr->CallsOK = sr->CallsFAIL = sr->CallsSTOPPED = 0; sr->CallsIn = sr->CallsOut = 0; sr->LastConnection = 0; sr->History.Out.Files = sr->History.In.Files = 0; sr->History.Out.Bytes = sr->History.In.Bytes = 0.0; sr->History.Out.Time = sr->History.In.Time = 0.0; for (idx = 0; idx <= 11; idx++) sr->History.MonthlyActivity[idx] = -1.0; sr->Commands = NULL; sr->History.LastMonthProcessed = -1; return (PTR) sr; } system_rec_t * DEFUN (insert_system, (sys), CONST char *sys) { system_rec_t sr; if (Root == NULL) Root = btree_new ((compare_func_t) system_compare, (makenew_func_t) system_new); sr.System = (char *) get_possible_system_alias (sys); return (system_rec_t *) btree_insert (Root, &sr); } void DEFUN (kill_system, (sys), CONST char *sys) { system_rec_t sr; if (Root == NULL) Root = btree_new ((compare_func_t) system_compare, (makenew_func_t) system_new); sr.System = (char *) get_possible_system_alias (sys); ((system_rec_t *) (btree_insert (Root, &sr)))->Killed = TRUE; } static traverse_func_t originalTraverseFunction; static void DEFUN (FilteredEnquiry, (sys), CONST system_rec_t * sys) { if (! sys->Killed) (*originalTraverseFunction) (sys); } void DEFUN (enquire_systems, (funct), traverse_func_t funct) { originalTraverseFunction = funct; btree_traverse (Root, (traverse_func_t) FilteredEnquiry); } system_rec_t * DEFUN (search_system, (sys), CONST char *sys) { system_rec_t sr; sr.System = (char *) get_possible_system_alias (sys); return (system_rec_t *) btree_search (Root, &sr); } #if USE_TCL int DEFUN (tcl_kill_system, (clientData, interp, argc, argv), ClientData clientData AND Tcl_Interp * interp AND int argc AND char *argv[]) { if (argc != 2) { sprintf (interp->result, _("Wrong number of Parameters: %s needs just one SystemName"), argv[0]); return TCL_ERROR; } kill_system (argv[1]); return TCL_OK; } #endif /* if USE_TCL */ tua-4.3.orig/src/tcl_supp.c0100644000175100001440000000712206105405024014213 0ustar mdusers/* tcl_supp.c -- TCL Support Functions * * This file is part of TUA. * * Copyright (C) 1991,96 Lele Gaifax * * 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. * */ #include "tua.h" static tcl_command_def_t tcl_commands[] = { /* from portalias.c */ {"port_alias", tcl_insert_port_alias, "Inserts ALIAS as the new name for PORT"}, #if USE_GLOB_ALIASES {"glob_port_alias", tcl_insert_port_glob_alias, "Inserts ALIAS as the new meta-name for ports that match PATTERN"}, #endif /* from porttree.c */ {"kill_port", tcl_kill_port, "PORT will never appear in the report"}, /* from reports.c */ {"systems_report", tcl_systems_report, "Shows the Per System Report"}, {"users_report", tcl_users_report, "Shows the Per User Report"}, {"daily_report", tcl_daily_report, "Shows the Daily Report"}, {"system_summary", tcl_system_summary, "Shows the Systems Summary"}, {"system_summary_table", tcl_system_summary_table, "Shows the Systems Summary in Table format"}, {"report", tcl_report, "Shows various reports:\n\ daily shows the daily report.\n\ ports [portname] shows the ports report. If PORTNAME is specified, shows\n\ the report for just that port.\n\ summary [sysname] shows the systems summary. If SYSNAME is specified, just\n\ that system is reported.\n\ systems [sysname] shows the systems report.\n\ table not yet implemented.\n\ users [username] shows the users report."}, {"sys_alias", tcl_insert_system_alias, "Inserts ALIAS as the new name for SYSTEM"}, #if USE_GLOB_ALIASES {"glob_sys_alias", tcl_insert_system_glob_alias, "Inserts ALIAS as the new meta-name for systems that match PATTERN"}, #endif /* from systree.c */ {"kill_sys", tcl_kill_system, "SYSTEM will never appear in the report"}, /* from tua.c */ {"do_option", tcl_do_option, "Behaves as if OPTION was on the command line"}, {"interactive", interactive_mode, "Starts interactive mode"}, /* from useralias.c */ {"user_alias", tcl_insert_user_alias, "Inserts ALIAS as the new name for USER"}, #if USE_GLOB_ALIASES {"glob_user_alias", tcl_insert_user_glob_alias, "Inserts ALIAS as the new meta-name for users that match PATTERN"}, #endif /* from usertree.c */ {"kill_user", tcl_kill_user, "USER will never appear in the report"}, {"help", tcl_show_help, "Prints a short explanation of COMMAND"}, {0, 0, 0} }; int DEFUN (tcl_show_help, (clientData, interp, argc, argv), ClientData clientData AND Tcl_Interp * interp AND int argc AND char *argv[]) { return TCL_OK; } void DEFUN_VOID (initialize_TCL) { int cmd_index; TUA_interp = Tcl_CreateInterp (); cmd_index = 0; while (tcl_commands[cmd_index].name) { Tcl_CreateCommand (TUA_interp, tcl_commands[cmd_index].name, tcl_commands[cmd_index].function, (ClientData) 0, (Tcl_CmdDeleteProc *) NULL); cmd_index++; } } tua-4.3.orig/src/tmparse.c0100644000175100001440000000675206007141244014047 0ustar mdusers/* * Written by Mike Stefanik * * Since it would be rather ridiculous to copyright (or copyleft) this * little snippit of code, it is released into the public domain. Use * as you will. * * tmparse(3) will parse a date specification, and return the time in * natural format (the number of seconds since Jan 1, 1970 00:00) * * The buffer can contain the date portion (ie: 3/29/91), the time portion * (ie: 14:00:34), or both. If no time is entered, the default is the * current time; if no date is entered, the default is the current date. * */ /* * Modified to deal with fixed format as the uucico's one: mm/dd-hh:mm:ss * Since those silly logs are missing the year, I have to compare the * month and the day with the current one: if they are greater, clearly * they refer to the last year... * * Changed tmparse(buf,when) to get_date(buf) for compatibility with the * rest of TUA. * * piggy@idea.sublink.org - 6 Apr 1991 */ #include "tua.h" #include Julian_t DEFUN (parse_date, (buf), CONST char *buf) { Julian_t julian; Date_t Date; Time_t Time; #if HDB_UUCP static int current_year, current_month, current_day; #if TAYLOR_UUCP if (! is_taylor_uucp) #endif { static long now = -1L; if (now == -1L) /* Is it the first time that they call you? */ { extern time_t EXFUN (time, (long *)); struct tm *lt; time (&now); lt = localtime (&now); current_year = lt->tm_year + 1900; current_month = lt->tm_mon + 1; current_day = lt->tm_mday; } } #endif /* HDB_UUCP */ #if 0 debug_printf ("Converting %s...", buf); #endif #if BOTH_OF_THEM if (is_taylor_uucp) #endif #if TAYLOR_UUCP { unsigned int year, month, day; unsigned int hour, min, sec, cent; #ifdef __STDC__ sscanf ((char *) buf, "%u-%u-%u %u:%u:%u.%u", &year, &month, &day, &hour, &min, &sec, ¢); #else sscanf ((char *) buf, "%d-%d-%d %d:%d:%d.%d", &year, &month, &day, &hour, &min, &sec, ¢); #endif Date.Year = year; Date.Month = month; Date.Day = day; Time.Hour = hour; Time.Min = min; Time.Sec = sec; Time.Cent = cent; } #endif #if BOTH_OF_THEM else #endif #if HDB_UUCP { unsigned int month, day; unsigned int hour, min, sec; #ifdef __STDC__ sscanf ((char *) buf, "%u/%u-%u:%u:%u", &month, &day, &hour, &min, &sec); #else sscanf ((char *) buf, "%d/%d-%d:%d:%d", &month, &day, &hour, &min, &sec); #endif Date.Month = month; Date.Day = day; Time.Hour = hour; Time.Min = min; Time.Sec = sec; } #endif #if HDB_UUCP #if TAYLOR_UUCP if (! is_taylor_uucp) #endif /* * Check the day vs current_day and month vs current_month to if their * year was last year or the current one. * Thanx to all uucico engineers! */ if (current_month < Date.Month || (current_month == Date.Month && current_day < Date.Day)) Date.Year = current_year - 1; else Date.Year = current_year; #endif /* HDB_UUCP */ #if 0 debug_printf ("... obtaining %u/%u-%u:%u:%u ...", Date.Month, Date.Day, Time.Hour, Time.Min, Time.Sec); #endif dt_to_julian (Date, Time, &julian); #if 0 debug_printf ("... and %f as julian value", julian); #endif return (julian); } #ifdef MAIN int is_taylor_uucp = 1; main () { char buf[64]; size_t when; while (gets (buf) != NULL) { when = parse_date (buf); printf ("%lu - %s", when, ctime (&when)); } } #endif tua-4.3.orig/src/trees.c0100644000175100001440000001102306105405025013500 0ustar mdusers/* trees.c - generic binary tree management * * This file is part of TUA. * * Copyright (C) 1991,96 Lele Gaifax * * 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. * */ #include #include "tua.h" #if USE_SOFTCHIP_BTREE /* * Simple interface with SoftChip Btree Library. */ BTREE DEFUN (btree_new, (comp), compare_func_t comp AND makenew_func_t makenew) { BT_SETUP setup = bt_setup (5, (int (*)(void *, void *))comp, 0); BTREE tree = bt_new (setup); /* the function responsible of the creation of new instances is kept * in the private data field of the tree */ bt_setData (tree, makenew); bt_freeSetup (setup); return tree; } PTR DEFUN (btree_insert, (btree, data), BTREE btree AND PTR data) { PTR node = bt_search (btree, data, 0); if (node == NULL) { makenew_func_t makenew = bt_data (btree); node = (*makenew) (data); if (bt_insert (btree, node, 0) == 0) return NULL; } return node; } void DEFUN (btree_traverse, (btree, func), BTREE btree AND traverse_func_t func) { /* bt_traverse will three parameters to the function. My enquiry functions * will use (and accept) only the first one. */ bt_traverse (btree, (void (*)(void *, void *, void *)) func, 0); } PTR DEFUN (btree_search, (btree, data), BTREE btree AND CONST PTR data) { return bt_search (btree, (PTR)data, 0); } #else /* !USE_SOFTCHIP_BTREE */ BTREE DEFUN (btree_new, (comp), int EXFUN ((*comp), (CONST PTR, CONST PTR)) AND PTR EXFUN ((*makenew), (CONST PTR))) { BTREE tree; tree = (BTREE) xmalloc (sizeof (struct _btree_root)); tree->compare = comp; tree->makenew = makenew; tree->rootNode = NULL; return tree; } static PTR DEFUN (_btree_insert, (tree, compare, makenew, data), BTREE_NODE * tree AND compare_func_t compare AND makenew_func_t makenew AND PTR data) { if (*tree == NULL) { *tree = (BTREE_NODE) xmalloc (sizeof (struct _btree_node)); (*tree)->leftTree = (*tree)->rightTree = NULL; (*tree)->nodeData = (*makenew)(data); return (*tree)->nodeData; } else { int cmpres = (*compare)(data, (*tree)->nodeData); if (cmpres == 0) return (*tree)->nodeData; else if (cmpres < 0) return _btree_insert (&((*tree)->leftTree), compare, makenew, data); else return _btree_insert (&((*tree)->rightTree), compare, makenew, data); } } PTR DEFUN (btree_insert, (btree, data), BTREE btree AND PTR data) { return (btree ? _btree_insert (&(btree->rootNode), btree->compare, btree->makenew, data) : 0); } static void DEFUN (_btree_traverse, (tree, func), BTREE_NODE tree AND traverse_func_t func) { if (tree) { _btree_traverse (tree->leftTree, func); (*func) (tree->nodeData); _btree_traverse (tree->rightTree, func); } } void DEFUN (btree_traverse, (btree, func), BTREE btree AND traverse_func_t func) { if (btree) _btree_traverse (btree->rootNode, func); } static PTR DEFUN (_btree_search, (tree, compare, data), BTREE_NODE tree AND compare_func_t compare AND CONST PTR data) { if (tree == NULL) return NULL; else { int cmpres = (*compare)(data, tree->nodeData); if (cmpres == 0) return tree->nodeData; else if (cmpres < 0) return _btree_search (tree->leftTree, compare, data); else return _btree_search (tree->rightTree, compare, data); } } PTR DEFUN (btree_search, (btree, data), BTREE btree AND CONST PTR data) { return (btree ? _btree_search (btree->rootNode, btree->compare, data) : 0); } #endif /* if USE_SOFTCHIP_BTREE */ static size_t count; static void DEFUN (btree_counter, (data), CONST PTR data) { count++; } size_t DEFUN (btree_count, (btree), BTREE btree) { count = 0; btree_traverse (btree, btree_counter); return count; } tua-4.3.orig/src/tua.c0100644000175100001440000005236406105411520013161 0ustar mdusers/* tua.c * HDB-uucp Activity Analyzer. Eats all the uucp logs and extracts per system, * user and daily stats. * * This file is part of TUA. * * Copyright (C) 1991,96 Lele Gaifax * * 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. * */ #include "tua.h" #include #include "getopt.h" #include #include "pcdl.h" #ifdef __GNUC__ static #ifndef __STRICT_ANSI__ __volatile__ #endif /* __STRICT_ANSI__ */ void error (char *str) { fprintf (stderr, _("Error in processing %s\n"), str); exit (1); } #else /* not __GNUC__ */ #define error(str) { \ fprintf(stderr, _("Error in processing %s\n"), str); \ exit(1); \ } #endif /* __GNUC__ */ /* GLOBALS */ #if BOTH_OF_THEM int is_taylor_uucp = DEFAULT_MODE_IS_TAYLOR; #endif #ifdef DEBUG int be_verbose = FALSE; #endif /* TRUE if we want a separated commands list */ int separated_command_report_opt = FALSE; /* TRUE if we want the command report printed */ int do_command_report_opt = FALSE; /* TRUE if at least one '--only-system' option is given */ int just_some_system_opt = FALSE; /* Size in row of each port activity chart */ int chart_size_opt = 10; /* The prefix path for the logs file. This is set by default to DEFAULT_TAYLOR_SPOOL_DIR or DEFAULT_HDB_SPOOL_DIR depending on which Uucp we are using */ char *logs_prefix_path_opt; static int do_system_report_opt = TRUE; static int do_user_report_opt = TRUE; static int do_daily_report_opt = TRUE; static int save_history_opt = FALSE; static int do_history_report = TRUE; static int reset_history_opt = FALSE; static int do_monthly_activity_report_opt = TRUE; static int do_hourly_activity_chart_opt = TRUE; static int do_chart_only_opt = FALSE; static int print_country_and_exit = FALSE; #if USE_TCL static int load_tcl_rc = TRUE; Tcl_Interp *TUA_interp; static char *TUA_init_script = TUA_INIT_SCRIPT; static int interactive_session_opt = FALSE; static int interactive_session_done = FALSE; #endif int CurrentMonth; char *Since; int DaysSinceLastClean; Julian_t StatStartingTime = 0.0; Julian_t StatEndingTime = 0.0; static struct option long_options[] = /* !! KEEP IT IN ALPHAB ORDER !! */ { {"chart-only", 0, &do_chart_only_opt, 'o'}, /* -o */ {"chart-size", 1, 0, 'z'}, /* -z */ {"country", 1, 0, 'a'}, /* -a */ {"command-lists", 0, &do_command_report_opt, 'C'}, /* -C */ #if USE_GLOB_ALIASES {"glob-port-alias", 1, 0, 'R'}, /* -R */ {"glob-system-alias", 1, 0, 'M'}, /* -M */ {"glob-user-alias", 1, 0, 'E'}, /* -E */ #endif #if defined (HDB_ERR_FACT) && HDB_UUCP {"hdb-factor", 1, 0, 'f'}, /* -f */ #endif #if BOTH_OF_THEM {"hdb-uucp", 0, &is_taylor_uucp, 'B'}, /* -B */ #endif {"help", 0, 0, 'i'}, /* -i */ #if USE_TCL {"interactive", 0, &interactive_session_opt, 'I'}, /* -I */ #endif {"kill-system", 1, 0, 'k'}, /* -k */ {"kill-user", 1, 0, 'K'}, /* -K */ {"list-countries", 0, &pcd_list_countries, 1}, {"no-daily-rep", 0, &do_daily_report_opt, 'D'}, /* -D */ {"no-history", 0, &do_history_report, 'h'}, /* -h */ {"no-hourly-chart", 0, &do_hourly_activity_chart_opt, 'y'}, /* -y */ {"no-monthly-act", 0, &do_monthly_activity_report_opt, 'm'}, /* -m */ {"no-system-rep", 0, &do_system_report_opt, 'S'}, /* -S */ #if USE_TCL {"no-tua-rc", 0, &load_tcl_rc, 't'}, /* -t */ #endif {"no-user-rep", 0, &do_user_report_opt, 'U'}, /* -U */ {"only-system", 1, 0, 'O'}, /* -O */ {"port-alias", 1, 0, 'r'}, /* -r */ {"prefix-path", 1, 0, 'p'}, /* -p */ {"print-country", 0, &print_country_and_exit, 1}, #if USE_TCL {"rc-file", 1, 0, 'T'}, /* -T */ #endif {"reset-history", 0, &reset_history_opt, '0'}, /* -0 */ {"separate-command-report", 0, &separated_command_report_opt, 'c'}, /* -c */ {"system-alias", 1, 0, 's'}, /* -s */ #if BOTH_OF_THEM {"taylor-uucp", 0, &is_taylor_uucp, 'Y'}, /* -Y */ #endif {"update-history", 0, &save_history_opt, 'H'}, /* -H */ {"user-alias", 1, 0, 'u'}, /* -u */ #ifdef DEBUG {"verbose", 0, &be_verbose, 'v'}, /* -v */ #endif {"version", 0, 0, 'V'}, /* -V */ {0, 0, 0, 0} }; /* Build a getopt string from the structure above */ static char * DEFUN(build_getopt_string, (long_options), CONST struct option long_options[]) { if (long_options && long_options[0].name) { extern PTR EXFUN(malloc, (size_t)); extern PTR EXFUN(realloc, (PTR, size_t)); int curr_size = 10; char * getopt_string = (char *)malloc (curr_size); int gs_index, lo_index; for (gs_index=lo_index=0; long_options[lo_index].name; lo_index++) { CONST struct option * option = &long_options[lo_index]; if (isalnum (option->val)) { if (gs_index >= curr_size-2) { curr_size += 10; getopt_string = (char *) realloc (getopt_string, curr_size); } getopt_string[gs_index++] = option->val; if (option->has_arg) getopt_string[gs_index++] = ':'; } } getopt_string[gs_index] = 0; return getopt_string; } else return 0; } static char VersionFormatString[] = "The Uucp Analyzer (TUA) rel. %s by lele@nautilus.eclipse.it (Lele Gaifax)\n"; static char CopyleftInfo[] = "TUA may be copied only under the terms of the GNU General Public License,\n\ a copy of which can be found with the TUA distribution package\n"; static void DEFUN_VOID (DisplayVersion) { fprintf (stderr, VersionFormatString, VERSION); } static void DEFUN_VOID (DisplayUsage) { DisplayVersion (); fputs ("Options:\n\ -S, --no-system-rep Do not show the report for the Systems\n\ -U, --no-user-rep Do not show the report for the Users\n\ -D, --no-daily-rep Do not show the day-by-day report\n\ -m, --no-monthly-act Do not show the monthly activity report\n\ -h, --no-history Do not show the history\n\ -y, --no-hourly-chart Do not show the hourly activity chart\n\ -C, --command-lists Show the various command lists\n\ -O, --only-system=SYS Consider only SYS in the reports\n", stderr); fputs ("\ -c, --separate-command-report Build a separate log for the commands\n\ -k, --kill-system=SYS Do not show anything about system SYS\n\ -K, --kill-user=USER Do not show anything about user USER\n\ -H, --update-history Update the history file\n\ -0, --reset-history Reset the history file\n\ -p, --prefix-path=DIR Read log files in directory DIR\n\ -z, --chart-size=SIZE Set the size of the hourly chart to SIZE rows\n", stderr); fputs ("\ -o, --chart-only Print only the hourly activity chart\n", stderr); #ifdef DEBUG fputs ("\ -v, --verbose Print infos while processing\n", stderr); #endif fputs ("\ -u, --user-alias USER=ALIAS Replace every user named USER with ALIAS\n\ -r, --port-alias PORT=ALIAS Replace every port named PORT with ALIAS\n\ -s, --system-alias SYS=ALIAS Replace every system named SYS with ALIAS\n\ ", stderr); #if USE_GLOB_ALIASES fputs ("\ -E, --glob-user-alias GLOB=ALIAS Like --user-alias but with globbing search\n\ -R, --glob-port-alias GLOB=ALIAS Like --port-alias but with globbing search\n\ -M, --glob-system-alias GLOB=ALIAS Like --sys-alias but with globbing search\n\ ", stderr); #endif #if defined (HDB_ERR_FACT) && HDB_UUCP fputs ("\ -f, --hdb-factor F Set the Correction Factor for HDB to F (by default. 2.5)\n\ ", stderr); #endif #if USE_TCL fputs ("\ -t, --no-tua-rc Do not load the TCL Initialization script\n\ -T, --rc-file=FILE Load FILE instead of the standard init script\n\ -I, --interactive Put TUA in interactive mode\n\ ", stderr); #endif #if BOTH_OF_THEM #if DEFAULT_MODE_IS_TAYLOR fputs ("\ -Y, --taylor-uucp Force Taylor Uucp Mode (default)\n\ -B, --hdb-uucp Force HDB Mode\n\ ", stderr); #else fputs ("\ -Y, --taylor-uucp Force Taylor Uucp Mode\n\ -B, --hdb-uucp Force HDB Mode (default)\n\ ", stderr); #endif #endif fputs ("\ -i, --help Get this help\n\ -V, --version Print the version number of TUA and exit\n\ -a, --country NAME Override the name of your country\n\ --print-country Print the country configuration and exit\n\ --list-countries List the countries in the PCD file and exit\n\n\ Please report bugs and problems to:\n\ lele@eclipse.it\n\n", stderr); fputs (CopyleftInfo, stderr); } static void DEFUN (process_command_line_option, (argc, argv), int argc AND char *argv[]) { extern int EXFUN (atoi, (char *)); extern double EXFUN (atof, (char *)); extern char *optarg; extern int opterr; int opt; int optidx; opterr = FALSE; while ((opt = getopt_long (argc, argv, build_getopt_string (long_options), long_options, &optidx)) != EOF) { if (opt == 0 && long_options[optidx].flag == 0) opt = long_options[optidx].val; switch (opt) { case 0: break; case 'a': default_country_name = optarg; break; case 'S': do_system_report_opt = FALSE; break; case 'U': do_user_report_opt = FALSE; break; case 'D': do_daily_report_opt = FALSE; break; case 'C': do_command_report_opt = TRUE; break; case 'm': do_monthly_activity_report_opt = FALSE; break; case 'h': do_history_report = FALSE; break; case 'c': do_command_report_opt = TRUE; separated_command_report_opt = TRUE; break; case 'k': kill_system (optarg); break; case 'K': kill_user (optarg); break; case 'H': save_history_opt = TRUE; break; case '0': reset_history_opt = TRUE; break; #ifdef HDB_ERR_FACT case 'f': ERRFACT = atof (optarg); if (ERRFACT <= 0.0) { fprintf (stderr, _("Bad -f argument. Error factor fixed to %.1f\n"), HDB_ERR_FACT); ERRFACT = HDB_ERR_FACT; } break; #endif case 'p': logs_prefix_path_opt = optarg; break; case 'z': chart_size_opt = atoi (optarg); break; case 'y': do_hourly_activity_chart_opt = FALSE; break; case 'o': do_chart_only_opt = TRUE; break; #ifdef DEBUG case 'v': be_verbose = TRUE; break; #endif case 'O': (void) insert_system (optarg); just_some_system_opt = TRUE; break; case 'u': /* User Alias */ case 'r': /* Port Alias */ case 's': /* System Alias */ #if USE_GLOB_ALIASES case 'E': case 'R': case 'M': #endif { char *name = optarg; char *alias; for (alias = name; *alias && *alias != '='; alias++) /* do nothing */ ; if (*alias == '=') { *alias = '\0'; alias++; switch (opt) { case 'u': insert_user_alias (name, alias); break; case 'r': insert_port_alias (name, alias); break; case 's': insert_system_alias (name, alias); break; #if USE_GLOB_ALIASES case 'E': insert_user_glob_alias (name, alias); break; case 'R': insert_port_glob_alias (name, alias); break; case 'M': insert_system_glob_alias (name, alias); break; #endif } } else { DisplayUsage (); exit (1); } } break; case 'V': DisplayVersion (); fputs (CopyleftInfo, stdout); exit (0); break; #if USE_TCL case 't': load_tcl_rc = FALSE; break; case 'T': TUA_init_script = optarg; break; case 'I': interactive_session_opt = TRUE; break; #endif #if BOTH_OF_THEM case 'B': is_taylor_uucp = 'B'; break; case 'Y': is_taylor_uucp = 'Y'; break; #endif case '?': case 'i': DisplayUsage (); exit (opt == 'i' ? 0 : 1); break; } } #if BOTH_OF_THEM is_taylor_uucp = (is_taylor_uucp == 'Y' || is_taylor_uucp == TRUE ? TRUE : FALSE); #endif if (reset_history_opt && !save_history_opt) LOG ("Warning: You must specify also option %s to reset it.\n", "`--update-history'"); } void DEFUN_VOID (print_the_report) { if (do_system_report_opt) systems_report (); if (do_user_report_opt) users_report (); if (do_daily_report_opt) daily_report (); if (separated_command_report_opt) { if (do_system_report_opt) systems_command_report (); if (do_user_report_opt) users_command_report (); if (do_daily_report_opt) daily_command_report (); } systems_summary (); systems_summary_table (); if (*TheEpoc && do_history_report) { system_history_table (); if (do_monthly_activity_report_opt) monthly_history_table (); } if (do_hourly_activity_chart_opt) hourly_activity_charts (); } /* void get_complete_host_name (char * name) Attempt to get the system name by calling gethostname. If this does not work and this machine has a SYSTEMID file, try to use that. */ #if HAVE_SYS_PARAM_H #include #endif #ifndef MAXDOMNAMELEN #define MAXDOMNAMELEN 255 #endif #ifndef MAXHOSTNAMELEN #define MAXHOSTNAMELEN 255 #endif static void DEFUN(get_complete_host_name, (name), char name[MAXHOSTNAMELEN]) { #ifdef SYSTEMID if ((gethostname (name, MAXHOSTNAMELEN) == -1) || *name == '\0') { FILE *fd; if ((fd = fopen (SYSTEMID, "r")) == NULL) strcpy (name, _("UNKNOWN")); else { int last; fgets (name, MAXHOSTNAMELEN, fd); name[sizeof name - 1] = 0; last = strlen (name) - 1; if (last > 0) { if (name[last] == '\n') name[last] = '\0'; } else strcpy (name, _("UNKNOWN")); fclose (fd); } } #else if ((gethostname (name, MAXHOSTNAMELEN) == -1) || *name == '\0') strcpy (name, _("UNKNOWN")); #endif /* if gethostname doesn't return a Fully Qualified Domain Name */ if (strchr (name, '.') == 0) { char domain[MAXDOMNAMELEN]; if (getdomainname (domain, MAXDOMNAMELEN) == -1 || *domain == 0 || strcmp (domain, ".(none)") == 0) strcat (name, NET_DOMAIN); else if (*domain == '.') strcat (name, domain); else { strcat (name, "."); strcat (name, domain); } } } int DEFUN (main, (argc, argv), int argc AND char *argv[]) { extern time_t EXFUN (time, (long *)); char SystemName[MAXHOSTNAMELEN]; Julian_t Now = julian_current_date(); #if defined(DEBUG) && defined(NeXT) malloc_debug (8); #endif setlocale (LC_ALL, ""); bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); #if USE_READLINE initialize_readline (argv[0]); #endif CurrentMonth = (julian_to_d (Now, 0)).Month; get_complete_host_name (SystemName); #if BOTH_OF_THEM logs_prefix_path_opt = (is_taylor_uucp ? DEFAULT_TAYLOR_SPOOL_DIR : DEFAULT_HDB_SPOOL_DIR); #else #if TAYLOR_UUCP logs_prefix_path_opt = DEFAULT_TAYLOR_SPOOL_DIR; #else logs_prefix_path_opt = DEFAULT_HDB_SPOOL_DIR; #endif /* TAYLOR_UUCP */ #endif /* BOTH_OF_THEM */ process_command_line_option (argc, argv); #if USE_TCL initialize_TCL (); if (load_tcl_rc) { char init_cmd[1024]; int result; if (TUA_init_script[0] == '/') sprintf (init_cmd, TCL_CMD, TUA_init_script, TUA_init_script); else { char script[1024]; sprintf (script, "%s/%s", LIBDIR, TUA_init_script); sprintf (init_cmd, TCL_CMD, script, script); } #if TCL_MAJOR_VERSION<7 result = Tcl_Eval (TUA_interp, init_cmd, 0, (char **) NULL); #else result = Tcl_Eval (TUA_interp, init_cmd); #endif if (result != TCL_OK) { fprintf (stderr, _("There is an error in %s...\n\t%s\n"), TUA_init_script, TUA_interp->result); exit (1); } } #endif printf (VersionFormatString, VERSION); if (pcd_list_countries) printf (_("\nCountries I know about:\n")); if (parse_pcd_file (PCD_FILENAME) == ERROR && !pcd_list_countries) fprintf (stderr, _("Cannot parse pcd file '%s'. Ignoring.\n"), PCD_FILENAME); else if (pcd_names_count == 0 && default_country_name && !pcd_list_countries) fprintf (stderr, _("Country '%s' not found. I will omit phone costs.\n"), default_country_name); if (pcd_list_countries) exit (0); if (print_country_and_exit) { pcdl_print_country (¤t_country); exit (0); } if (read_system_history () == ERROR) error ("rhistory"); #if BOTH_OF_THEM if (!is_taylor_uucp) #endif #if HDB_UUCP { if (read_xferstats_log () == ERROR) error ("xferstats"); if (!do_chart_only_opt) { if (read_uucico_log () == ERROR) error ("uucico log"); if (read_uuxqt_log () == ERROR) error ("uuxqt log"); if (read_uucp_log () == ERROR) error ("uucp log"); if (read_uux_log () == ERROR) error ("uux log"); } } #endif /* if HDB_UUCP */ #if BOTH_OF_THEM if (is_taylor_uucp) #endif #if TAYLOR_UUCP { if (read_stats_log () == ERROR) error ("stats"); if (!do_chart_only_opt) if (read_log_log () == ERROR) error ("log"); } #endif /* TAYLOR_UUCP */ Since = savestring (julian_to_asc (StatStartingTime)); DaysSinceLastClean = (int)(StatEndingTime - StatStartingTime)+1; printf (_("%s UUCP Analysis for ``%s'',\n since %s to %s (%d day(s))\n\n"), #if BOTH_OF_THEM (is_taylor_uucp ? "Taylor" : "HoneyDanBer"), #else #if TAYLOR_UUCP "Taylor", #else /* !TAYLOR_UUCP */ "HoneyDanBer", #endif /* TAYLOR_UUCP */ #endif /* BOTH_OF_THEM */ SystemName, Since, julian_to_asc (StatEndingTime), DaysSinceLastClean); #if USE_TCL if (interactive_session_opt) { if (!interactive_session_done) interactive_mode (0, TUA_interp, 0, 0); } else #endif if (!do_chart_only_opt) { print_the_report (); if (save_history_opt) if (write_system_history (reset_history_opt) == ERROR) error (_("whistory: probably you need uucp's write permission")); } else { printf (_("%s UUCP Analysis for ``%s''\n\n"), #if TAYLOR_UUCP #if HDB_UUCP (is_taylor_uucp ? "Taylor" : "HoneyDanBer"), #else "Taylor", #endif /* HDB_UUCP */ #else /* !TAYLOR_UUCP */ "HoneyDanBer", #endif /* TAYLOR_UUCP */ SystemName); hourly_activity_charts (); } exit (0); /* * Dummy return to stop gcc from complaining about non-void funct without * return */ return (0); } #if USE_TCL int DEFUN (tcl_do_option, (clientdata, interp, argc, argv), ClientData clientdata AND Tcl_Interp * interp AND int argc AND char *argv[]) { if (argc != 2) { sprintf (interp->result, _("Wrong number of Parameters: %s needs a LongOption name"), argv[0]); return TCL_ERROR; } else { struct option *cur_opt = &long_options[0]; for (; cur_opt->name; cur_opt++) { int result; if ((result = strcmp (cur_opt->name, argv[1])) == 0) { if (cur_opt->flag) *(cur_opt->flag) = cur_opt->val; return TCL_OK; } /* * The options are kept in order, so we know when to stop searching */ else if (result > 0) break; } } sprintf (interp->result, _("%s: option '%s' not found!"), argv[0], argv[1]); return TCL_ERROR; } int DEFUN (interactive_mode, (clientData, interp, argc, argv), ClientData clientData AND Tcl_Interp * interp AND int argc AND char *argv[]) { char *line; #if !USE_READLINE char line_buffer[1000]; #endif char *cmd; int result, gotPartial; #if TCL_MAJOR_VERSION<7 Tcl_CmdBuf buffer = Tcl_CreateCmdBuf (); #else Tcl_DString buffer; Tcl_DStringInit (&buffer); #endif interactive_session_opt = TRUE; interactive_session_done = TRUE; gotPartial = 0; fputs ("\ You are now in Interactive Mode. You can enter any valid Tcl statement, or\n\ (usually C-d) to exit.\n\n", stderr); for (;;) { #if USE_READLINE line = readline_gets (gotPartial ? _("More> ") : "TUA % "); #else clearerr (stdin); fputs (gotPartial ? _("More> ") : "TUA % ", stdout); fflush (stdout); line = fgets (line_buffer, 1000, stdin); #endif if (line == NULL) { puts ("\n"); if (!gotPartial) return TCL_OK; else continue; } if (!*line) continue; #if TCL_MAJOR_VERSION<7 cmd = Tcl_AssembleCmd (buffer, line); #if USE_READLINE /* * readline() strips the ending new-line character, and TCL * complains about that, so I add this char to the just evaluated * command. */ cmd = Tcl_AssembleCmd (buffer, "\n"); #endif if (cmd == NULL) { gotPartial = 1; continue; } #else /* TCL_MAJOR_VERSION >= 7 */ cmd = Tcl_DStringAppend (&buffer, line, -1); #if USE_READLINE cmd = Tcl_DStringAppend (&buffer, "\n", -1); #endif if (!Tcl_CommandComplete (cmd)) { gotPartial = 1; continue; } #endif /* TCL_MAJOR_VERSION<7 */ gotPartial = 0; result = Tcl_RecordAndEval (interp, cmd, 0); #if TCL_MAJOR_VERSION>=7 Tcl_DStringFree(&buffer); #endif if (result == TCL_OK) { if (*interp->result != 0) fprintf (stderr, "%s\n", interp->result); } else { if (result == TCL_ERROR) puts (_("TclError")); else printf (_("TclError %d"), result); if (*interp->result != 0) printf (": %s", interp->result); puts ("\n"); } } return TCL_OK; } #endif /* if USE_TCL */ tua-4.3.orig/src/useralias.c0100644000175100001440000000701606105405025014355 0ustar mdusers/* useralias.c -- Users aliases maintenance. Users are kept in a binary tree. * * This file is part of TUA. * * Copyright (C) 1991,96 Lele Gaifax * * 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. * */ #include "tua.h" typedef struct user_aliases { char *User; char *Alias; } user_aliases_t; static BTREE Root = NULL; static int DEFUN (alias_compare, (user1, user2), CONST user_aliases_t * user1 AND CONST user_aliases_t * user2) { int ret = strcmp (user1->User, user2->User); return ret; } static PTR DEFUN (alias_new, (data), CONST PTR * data) { user_aliases_t * sa; sa = (user_aliases_t *) xmalloc (sizeof (user_aliases_t)); sa->User = savestring (((CONST user_aliases_t *) data)->User); sa->Alias = NULL; return (PTR) sa; } CONST char * DEFUN (insert_user_alias, (user, alias), CONST char *user AND CONST char *alias) { user_aliases_t * ua; if (Root == NULL) Root = btree_new ((compare_func_t) alias_compare, (makenew_func_t) alias_new); ua = (user_aliases_t *) btree_insert (Root, (PTR)user); if (! ua->Alias) ua->Alias = savestring (alias); return ua->Alias; } CONST char * DEFUN (get_possible_user_alias, (user), CONST char *user) { user_aliases_t * ua, ua_key; if (Root == NULL) return user; ua_key.User = (char *) user; ua = (user_aliases_t *) btree_search (Root, &ua_key); #if USE_GLOB_ALIASES if (ua == NULL) return get_possible_user_glob_alias (user); #endif if (ua == NULL) return user; else return ua->Alias; } #if USE_GLOB_ALIASES #include "globalias.h" static glob_aliases_queue_t *UserGlobQueue = QNULL; void DEFUN (insert_user_glob_alias, (user, alias), CONST char *user AND CONST char *alias) { globalias_insert (&UserGlobQueue, user, alias); } CONST char * DEFUN (get_possible_user_glob_alias, (user), CONST char *user) { return globalias_search (UserGlobQueue, user); } #endif /* if USE_GLOB_ALIASES */ #if USE_TCL int DEFUN (tcl_insert_user_alias, (clientData, interp, argc, argv), ClientData clientData AND Tcl_Interp * interp AND int argc AND char *argv[]) { if (argc != 3) { sprintf (interp->result, _("Wrong number of Parameters: %s needs an UserName and its Alias"), argv[0]); return TCL_ERROR; } insert_user_alias (argv[1], argv[2]); return TCL_OK; } #if USE_GLOB_ALIASES int DEFUN (tcl_insert_user_glob_alias, (clientData, interp, argc, argv), ClientData clientData AND Tcl_Interp * interp AND int argc AND char *argv[]) { if (argc != 3) { sprintf (interp->result, _("Wrong number of Parameters: %s needs an UserName and its GlobAlias"), argv[0]); return TCL_ERROR; } insert_user_glob_alias (argv[1], argv[2]); return TCL_OK; } #endif /* if USE_GLOB_ALIASES */ #endif /* if USE_TCL */ tua-4.3.orig/src/usertree.c0100644000175100001440000000602306105405025014220 0ustar mdusers/* usertree.c -- Users list maintenance. Users are kept in a binary tree. * * This file is part of TUA. * * Copyright (C) 1991,96 Lele Gaifax * * 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. * */ #include "tua.h" #include "trees.h" static BTREE Root = NULL; static int DEFUN (user_compare, (user1, user2), CONST user_rec_t * user1 AND CONST user_rec_t * user2) { int ret = strcmp (user1->User, user2->User); return ret; } static PTR DEFUN (user_new, (data), CONST PTR data) { user_rec_t *ur; ur = (user_rec_t *) xmalloc (sizeof (user_rec_t)); ur->User = savestring (((CONST user_rec_t *) data)->User); ur->Killed = FALSE; ur->Commands = NULL; ur->Out.Files = 0; ur->Out.Bytes = ur->Out.Time = 0.0; #if TAYLOR_UUCP ur->In.Files = 0; ur->In.Bytes = ur->In.Time = 0.0; #endif return (PTR) ur; } user_rec_t * DEFUN (insert_user, (user), CONST char *user) { user_rec_t ur; if (Root == NULL) Root = btree_new ((compare_func_t) user_compare, (makenew_func_t) user_new); ur.User = (char *) get_possible_user_alias (user); return (user_rec_t *) btree_insert (Root, &ur); } void DEFUN (kill_user, (user), CONST char *user) { user_rec_t ur; if (Root == NULL) Root = btree_new ((compare_func_t) user_compare, (makenew_func_t) user_new); ur.User = (char *) get_possible_user_alias (user); ((user_rec_t *) (btree_insert (Root, &ur)))->Killed = TRUE; } static traverse_func_t originalTraverseFunction; static void DEFUN (FilteredEnquiry, (user), CONST user_rec_t * user) { if (! user->Killed) (*originalTraverseFunction) (user); } void DEFUN (enquire_users, (funct), traverse_func_t funct) { originalTraverseFunction = funct; btree_traverse (Root, (traverse_func_t) FilteredEnquiry); } user_rec_t * DEFUN (search_user, (user), CONST char *user) { user_rec_t ur; ur.User = (char *) get_possible_user_alias (user); return (user_rec_t *) btree_search (Root, &ur); } #if USE_TCL int DEFUN (tcl_kill_user, (clientData, interp, argc, argv), ClientData clientData AND Tcl_Interp * interp AND int argc AND char *argv[]) { if (argc != 2) { sprintf (interp->result, _("Wrong number of Parameters: %s needs just one UserName"), argv[0]); return TCL_ERROR; } kill_user (argv[1]); return TCL_OK; } #endif /* if USE_TCL */ tua-4.3.orig/src/wildmat.c0100644000175100001440000001113105506060377014032 0ustar mdusers/* ** Do shell-style pattern matching for ?, \, [], and * characters. ** Might not be robust in face of malformed patterns; e.g., "foo[a-" ** could cause a segmentation violation. It is 8bit clean. ** ** Written by Rich $alz, mirror!rs, Wed Nov 26 19:03:17 EST 1986. ** Rich $alz is now . ** April, 1991: Replaced mutually-recursive calls with in-line code ** for the star character. ** ** Special thanks to Lars Mathiesen for the ABORT code. ** This can greatly speed up failing wildcard patterns. For example: ** pattern: -*-*-*-*-*-*-12-*-*-*-m-*-*-* ** text 1: -adobe-courier-bold-o-normal--12-120-75-75-m-70-iso8859-1 ** text 2: -adobe-courier-bold-o-normal--12-120-75-75-X-70-iso8859-1 ** Text 1 matches with 51 calls, while text 2 fails with 54 calls. Without ** the ABORT, then it takes 22310 calls to fail. Ugh. The following ** explanation is from Lars: ** The precondition that must be fulfilled is that DoMatch will consume ** at least one character in text. This is true if *p is neither '*' nor ** '\0'.) The last return has ABORT instead of FALSE to avoid quadratic ** behaviour in cases like pattern "*a*b*c*d" with text "abcxxxxx". With ** FALSE, each star-loop has to run to the end of the text; with ABORT ** only the last one does. ** ** Once the control of one instance of DoMatch enters the star-loop, that ** instance will return either TRUE or ABORT, and any calling instance ** will therefore return immediately after (without calling recursively ** again). In effect, only one star-loop is ever active. It would be ** possible to modify the code to maintain this context explicitly, ** eliminating all recursive calls at the cost of some complication and ** loss of clarity (and the ABORT stuff seems to be unclear enough by ** itself). I think it would be unwise to try to get this into a ** released version unless you have a good test data base to try it out ** on. */ #define TRUE 1 #define FALSE 0 #define ABORT -1 #include "ansidecl.h" /* What character marks an inverted character class? */ #define NEGATE_CLASS '^' /* Is "*" a common pattern? */ #define OPTIMIZE_JUST_STAR /* Do tar(1) matching rules, which ignore a trailing slash? */ #undef MATCH_TAR_PATTERN /* ** Match text and p, return TRUE, FALSE, or ABORT. */ static int DEFUN (DoMatch, (text, p), register CONST char *text AND register CONST char *p) { register int last; register int matched; register int reverse; for (; *p; text++, p++) { if (*text == '\0' && *p != '*') return ABORT; switch (*p) { case '\\': /* Literal match with following character. */ p++; /* FALLTHROUGH */ default: if (*text != *p) return FALSE; continue; case '?': /* Match anything. */ continue; case '*': while (*++p == '*') /* Consecutive stars act just like one. */ continue; if (*p == '\0') /* Trailing star matches everything. */ return TRUE; while (*text) if ((matched = DoMatch (text++, p)) != FALSE) return matched; return ABORT; case '[': reverse = p[1] == NEGATE_CLASS ? TRUE : FALSE; if (reverse) /* Inverted character class. */ p++; for (last = 0400, matched = FALSE; *++p && *p != ']'; last = *p) /* This next line requires a good C compiler. */ if (*p == '-' ? *text <= *++p && *text >= last : *text == *p) matched = TRUE; if (matched == reverse) return FALSE; continue; } } #ifdef MATCH_TAR_PATTERN if (*text == '/') return TRUE; #endif /* MATCH_TAR_ATTERN */ return *text == '\0'; } /* ** User-level routine. Returns TRUE or FALSE. */ int DEFUN (wildmat, (text, p), char *text AND char *p) { #ifdef OPTIMIZE_JUST_STAR if (p[0] == '*' && p[1] == '\0') return TRUE; #endif /* OPTIMIZE_JUST_STAR */ return DoMatch (text, p) == TRUE; } #ifdef TEST #include /* Yes, we use gets not fgets. Sue me. */ extern char *gets (); main () { char p[80]; char text[80]; printf ("Wildmat tester. Enter pattern, then strings to test.\n"); printf ("A blank line gets prompts for a new pattern; a blank pattern\n"); printf ("exits the program.\n"); for (;;) { printf ("\nEnter pattern: "); (void) fflush (stdout); if (gets (p) == NULL || p[0] == '\0') break; for (;;) { printf ("Enter text: "); (void) fflush (stdout); if (gets (text) == NULL) exit (0); if (text[0] == '\0') /* Blank line; go back and get a new pattern. */ break; printf (" %s\n", wildmat (text, p) ? "YES" : "NO"); } } exit (0); /* NOTREACHED */ } #endif /* TEST */ tua-4.3.orig/src/hdb/0040755000175100001440000000000006111151466012761 5ustar mduserstua-4.3.orig/src/hdb/ChangeLog0100644000175100001440000000460406107705633014542 0ustar mdusersMon Feb 12 19:48:22 1996 Lele Gaifax * procuucico.c (read_uucico_log): Do not use intl messages with the LOG macro. Fri Mar 3 12:34:39 1995 Lele Gaifax * Updated copyright and my e-mail address. Sun May 29 16:58:35 1994 Lele Gaifax (lele@nautilus.sublink.org) * procuucp.c (ProcUucpEntry): taylor's uucp hdb mode use a different log format. Parse that if using Taylor Uucp. Fri Oct 15 16:34:30 1993 Lele Gaifax (lele@nautilus.sublink.org) * procuuxqt.c: see below. * procuucico.c: substantially improved support for Taylor Uucp in HDB_LOGGING mode. Thanx to Atze W. Herder for sending me a copy of the logs. Wed Oct 6 14:37:56 1993 Lele Gaifax (lele@nautilus.sublink.org) * procxfer.c: set phone costs only if we have country info. Wed Sep 29 16:46:00 1993 Lele Gaifax (lele@nautilus.sublink.org) * procuuxqt (ProcUuxqtEntry): handle more uuxqt errors. Fri Sep 24 20:24:33 1993 Lele Gaifax (lele@nautilus.sublink.org) * procuucico.c (ProcUucicoEntry): reset the log structure, otherwise it will be wrongly freed by GetUucicoLog. Mon Aug 30 15:12:32 1993 John Plate (plate@infotek.dk) * Makefile: added customize.h to the dependecies list. Wed Jul 14 14:53:42 1993 Lele Gaifax (lele@nautilus.sublink.org) * procuucico.c: use GetUucicoLog and processes. * uucicolog.c: new file. Read an entry from a uucico log. * procuucico.c (ProcUucicoEntry): handle several other mesgs. * proc*.c: use new debug macros. Mon Apr 19 11:16:02 1993 Lele Gaifax (lele@nautilus.sublink.org) * procuucico.c: update StatEndingTime with the timestamp of the last uucico log line. Wed Apr 14 15:24:27 1993 Lele Gaifax (lele@nautilus.sublink.org) * Makefile: added ../tua.h as a global dependecie. Sat Jan 23 17:20:39 1993 Lele Gaifax (lele@nautilus.sublink.org) * tua_4_hdb.h, xferentry.c, procxfer.c: removed the fixed length strings in the xferentry struct. Wed Jan 13 12:33:48 1993 Lele Gaifax (lele@nautilus.sublink.org) * everybody: use tua_4_hdb.h instead of tua.h * tua_4_hdb.h: new file containing hdb specific stuff, coming from tua.h. Tue Jan 12 12:04:36 1993 Lele Gaifax (lele@nautilus.sublink.org) * Control the file op in ProcXferstat, passing a file pointer to getXferEntry, instead of within getXferEntry itself. * Make use of the CONST macro on every "char *" passed in and out. tua-4.3.orig/src/hdb/Makefile.in0100644000175100001440000000472006110060321015012 0ustar mdusers# Makefile for "The Uucp Analyzer" HDB-specific sources # # This file is part of TUA. # # Copyright (C) 1991,96 Lele Gaifax # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # PACKAGE = @PACKAGE@ VERSION = @VERSION@ SHELL = /bin/sh @SET_MAKE@ # This subdirectory name subdir = src/hdb #### Start of system configuration section. #### srcdir=@srcdir@ top_srcdir = @top_srcdir@ VPATH=@srcdir@ AR=ar RANLIB=@RANLIB@ CC=@CC@ DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@ -DLIBDIR=\"$(libdir)\" CFLAGS = @CFLAGS@ COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) .SUFFIXES: .SUFFIXES: .c .o .c.o: $(COMPILE) $< -o $@ INCLUDES = -I$(srcdir) -I.. -I$(top_srcdir) -I../intl -I$(top_srcdir)/intl HEADERS = tua_4_hdb.h SOURCES = procuucico.c procuucp.c procuux.c procuuxqt.c \ procxfer.c uucicolog.c xferentry.c OBJECTS = procuucico.o procuucp.o procuux.o procuuxqt.o \ procxfer.o uucicolog.o xferentry.o DISTFILES = ChangeLog Makefile.in $(HEADERS) $(SOURCES) LIBRARY = ../libtua.a default: all all: Makefile $(OBJECTS) $(AR) cr $(LIBRARY) $(OBJECTS) -$(RANLIB) $(LIBRARY) distdir = $(top_srcdir)/$(PACKAGE)-$(VERSION)/$(subdir) dist: Makefile for file in $(DISTFILES); do \ ln $$file $(distdir) \ || { echo copying $$file instead; cp -p $$file $(distdir);}; \ done tags: TAGS TAGS: $(HEADERS) $(SOURCES) here=`pwd`; \ cd $(srcdir) && etags -o $$here/TAGS $(HEADERS) $(SOURCES) Makefile: Makefile.in $(top_srcdir)/config.status cd $(top_srcdir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status mostlyclean: rm -f *.o clean: mostlyclean rm -f *~ distclean: clean rm -f TAGS maintainer-clean: distclean @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." $(OBJECTS): tua_4_hdb.h ../tua.h $(top_srcdir)/config.h tua-4.3.orig/src/hdb/tua_4_hdb.h0100644000175100001440000000271206105405026014757 0ustar mdusers/* tua_4_hdb.h -- Constants and structs definition, functions prototype for HDB-Uucp. * * This file is part of TUA. * * Copyright (C) 1991,96 Lele Gaifax * * 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. * */ #ifndef _TUA_4_HDB_H #define _TUA_4_HDB_H #include "tua.h" struct xferentry /* xferstats entry */ { char * System; /* System's name */ char * User; /* User's name */ Julian_t TimeStamp; char * PortName; direction_t Direction; double Bytes; /* Bytes moved */ double Time; /* Time it takes * (corrected) */ }; struct uucico_log { Julian_t TimeStamp; int ProcessId; char * Command; }; extern int EXFUN (GetXferEntry, (FILE *, struct xferentry *)); extern int EXFUN (GetUucicoLog, (FILE *, struct uucico_log *)); #endif /* _TUA_4_HDB_H */ tua-4.3.orig/src/hdb/procuucico.c0100644000175100001440000002320206111147740015274 0ustar mdusers/* procuucico.c -- Process .Log/uucico/ * * This file is part of TUA. * * Copyright (C) 1991,96 Lele Gaifax * * 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. * */ #include "tua_4_hdb.h" #if HDB_UUCP #include /* for rint() */ #if defined(DIRENT) || defined(_POSIX_VERSION) #include #define NLENGTH(dirent) (strlen((dirent)->d_name)) #else /* not (DIRENT or _POSIX_VERSION) */ #define dirent direct #define NLENGTH(dirent) ((dirent)->d_namlen) #ifdef USG #ifdef SYSNDIR #include #else /* not SYSNDIR */ #include #endif /* not SYSNDIR */ #else /* not USG */ #include /* Assume SYSDIR, or not if you want. */ #endif /* not USG */ #endif /* not (DIRENT or _POSIX_VERSION) */ #define strequ(str1, str2) (strcmp((str1), (str2)) == 0) static void DEFUN (UpdateProcess, (pr), process_status_t * pr) { system_rec_t * sr = pr->System; if (sr && pr->Status != TUUS_NONE) { if (pr->StartTime != 0.0 && pr->StartTime < pr->EndTime) { double jdiff = pr->EndTime - pr->StartTime; double diff; diff = rint (jdiff * 24.0 * 60.0 * 60.0); sr->TimeConnect += diff; sr->TimePayedBy[pr->WhoIsPaying] += diff; } sr->Calls++; if (pr->Status == TUUS_CALLING) { pr->System->CallsFAIL++; } else if (pr->Status != TUUS_ERROR) { sr->CallsOK++; if (pr->WhoIsPaying == LOCAL_SYSTEM) sr->CallsOut++; else sr->CallsIn++; } else { if (pr->LoginPassed) sr->CallsSTOPPED++; else sr->CallsFAIL++; } } pr->Killed = TRUE; } #define NUMELEM(array) (sizeof(array) / sizeof(array[0])) typedef enum mesg_ids { I_DONT_KNOW = -1, MSG_CAN_NOT_CALL, MSG_CONN_FAILED, MSG_FAILED, MSG_INPUT_FAILURE, MSG_LOGIN_FAILED, MSG_OK, MSG_SUCCEEDED, MSG_CAUGHT, MSG_REQUEST, MSG_REMOTE_REQUESTED, MSG_LOCKED, MSG_BAD_READ, MSG_HANDSHAKE_FAILED, MSG_NO_CALL, MSG_LOST_LINE, MSG_TAYLOR_HANDSHAKE_SUCCESSFUL, MSG_TAYLOR_CALLING_SYSTEM, MSG_TAYLOR_CALL_COMPLETE, MSG_TAYLOR_ERROR, MSG_TAYLOR_SENDING, MSG_TAYLOR_RECEIVING } mesg_id_t; static mesg_id_t DEFUN (DecodeMsg, (msg), char *msg) { register idx; static struct { char *mesg; mesg_id_t mesg_id; } HandledMsg[] = { { "BAD READ ", MSG_BAD_READ }, { "CAN NOT CALL ", MSG_CAN_NOT_CALL }, { "CAUGHT ", MSG_CAUGHT }, { "CONN FAILED ", MSG_CONN_FAILED }, { "Calling system ", MSG_TAYLOR_CALLING_SYSTEM }, { "Call complete ", MSG_TAYLOR_CALL_COMPLETE }, { "ERROR: ", MSG_TAYLOR_ERROR }, { "FAILED ", MSG_FAILED }, { "HANDSHAKE FAILED ", MSG_HANDSHAKE_FAILED }, { "Handshake successful ", MSG_TAYLOR_HANDSHAKE_SUCCESSFUL }, { "IN SEND/SLAVE MODE ", MSG_INPUT_FAILURE }, { "LOGIN FAILED ", MSG_LOGIN_FAILED }, { "LOCKED ", MSG_LOCKED }, { "LOST LINE ", MSG_LOST_LINE }, { "NO CALL ", MSG_NO_CALL }, { "OK ", MSG_OK }, { "REQUEST ", MSG_REQUEST }, { "Receiving ", MSG_TAYLOR_RECEIVING }, { "REMOTE REQUESTED ", MSG_REMOTE_REQUESTED }, { "SUCCEEDED ", MSG_SUCCEEDED }, { "Sending ", MSG_TAYLOR_SENDING } }; for (idx = 0; idx < NUMELEM (HandledMsg) && *msg >= *(HandledMsg[idx].mesg); idx++) { if (*msg == *(HandledMsg[idx].mesg) && strbegcmp (msg, HandledMsg[idx].mesg) == 0) return HandledMsg[idx].mesg_id; } return I_DONT_KNOW; } /* * This function is a little bit intricated: in my opinion it is the weak * point of TUA; it tries to be smart in calculating the timings of the * connections, and to keep track of the errors, but is seems that * sometimes some garbage is put in by uucico, and that fools the * "algorithm". * In a few words, it reads a line at a time from a uucico log, an tries * to understand what's going on, computing the time spent "speaking" * with the remote, until an error is found or the end of the * conversation is reached. */ static void DEFUN (ProcUucicoEntry, (fp, sys), FILE * fp AND char *sys) { system_rec_t *sr = insert_system (sys); struct uucico_log lentry; Julian_t first_line_timestamp = 0.0, last_timestamp = 0.0; lentry.Command = 0; #ifdef DEBUG if (be_verbose) fprintf (stderr, "\n%s:\n", sys); #endif while (GetUucicoLog (fp, &lentry) == OK) { process_status_t * pr = insert_process (lentry.ProcessId); char * command; pr->System = sr; pr->EndTime = lentry.TimeStamp; if (first_line_timestamp == 0.0) first_line_timestamp = lentry.TimeStamp; if (lentry.TimeStamp > last_timestamp) last_timestamp = lentry.TimeStamp; command = strtok (lentry.Command, "("); switch (DecodeMsg (command)) { case MSG_SUCCEEDED: pr->Status = TUUS_HANDSHAKE; pr->StartTime = lentry.TimeStamp; pr->WhoIsPaying = LOCAL_SYSTEM; break; case MSG_OK: if (strequ (strtok (NULL, ") "), "startup")) { sr->LastConnection = lentry.TimeStamp; pr->LoginPassed = TRUE; if (pr->StartTime == 0.0) { /* It is an inbound calls (it didn't find a SUCCEEDED yet) */ pr->WhoIsPaying = REMOTE_SYSTEM; pr->StartTime = lentry.TimeStamp; } } else { /* This is a line like "OK (convers..complete PORTNAME ...)" */ pr->Status = TUUS_OK; UpdateProcess (pr); } break; case MSG_CAN_NOT_CALL: case MSG_CONN_FAILED: pr->LoginPassed = FALSE; pr->Status = TUUS_ERROR; break; case MSG_HANDSHAKE_FAILED: case MSG_INPUT_FAILURE: pr->LoginPassed = TRUE; pr->Status = TUUS_ERROR; break; case MSG_FAILED: /* * It can be either "FAILED (conversation complete)" or "FAILED * (CAN'T READ...)" In the latter case, it's not a fatal * error, and so the conversation keeps going. */ if (strequ (strtok (NULL, ")"), "conversation complete")) { pr->Status = TUUS_ERROR; UpdateProcess (pr); } break; case MSG_LOGIN_FAILED: pr->LoginPassed = FALSE; pr->Status = TUUS_ERROR; break; case MSG_CAUGHT: pr->Status = TUUS_ERROR; UpdateProcess (pr); break; case MSG_REQUEST: case MSG_REMOTE_REQUESTED: pr->Status = TUUS_SENDING; break; case MSG_LOST_LINE: case MSG_NO_CALL: case MSG_BAD_READ: case MSG_LOCKED: break; case MSG_TAYLOR_HANDSHAKE_SUCCESSFUL: { /* Line of type: * Handshake successful (login proxima port tty1A protocol 'g' packet size 64 window 3) */ pr->LoginPassed = TRUE; pr->Status = TUUS_HANDSHAKE; if (pr->StartTime == 0.0) { /* It is an inbound calls (it didn't find a Calling System yet) */ pr->WhoIsPaying = REMOTE_SYSTEM; pr->StartTime = lentry.TimeStamp; sr->LastConnection = lentry.TimeStamp; } } break; case MSG_TAYLOR_CALL_COMPLETE: UpdateProcess (pr); break; case MSG_TAYLOR_CALLING_SYSTEM: pr->Status = TUUS_CALLING; pr->StartTime = lentry.TimeStamp; pr->WhoIsPaying = LOCAL_SYSTEM; sr->LastConnection = lentry.TimeStamp; break; case MSG_TAYLOR_ERROR: if (pr->Status != TUUS_NONE) pr->Status = TUUS_ERROR; break; case MSG_TAYLOR_RECEIVING: case MSG_TAYLOR_SENDING: pr->Status = TUUS_SENDING; break; case I_DONT_KNOW: #ifdef DEBUG debug_printf ("Warning: unknown command '%s'", command); #endif break; } /* * TO DO: COMPLETE THE MESSAGE LIST * ================================ * * Through a short analysis of various uucico logs, I * think I taked care of all the foundamental ones, but I * cannot be sure, because I couldn't find a complete list of * them. */ } xfree (lentry.Command); if (StatStartingTime > first_line_timestamp || StatStartingTime == 0.0) StatStartingTime = first_line_timestamp; if (StatEndingTime < last_timestamp) StatEndingTime = last_timestamp; } int DEFUN_VOID (read_uucico_log) { DIR *dirfp; struct dirent *direntry; char dirname[LPNMAX]; int ret_value = OK; sprintf (dirname, "%s/%s", logs_prefix_path_opt, UUCICO_DIR); if ((dirfp = opendir (dirname)) == (DIR *) NULL) { LOG("cannot read %s", dirname); ret_value = ERROR; } else { #ifdef DEBUG if (be_verbose) fputs ("\nProcessing uucico logs:", stderr); #endif while ((direntry = readdir (dirfp)) != NULL) { FILE *CicoFp; char PathName[LPNMAX]; char System[15]; if (*direntry->d_name == '.') continue; sprintf (System, "%.*s", (int) NLENGTH (direntry), direntry->d_name); if (just_some_system_opt && (search_system (System) == (system_rec_t *) NULL)) continue; sprintf (PathName, "%s/%s/%s", logs_prefix_path_opt, UUCICO_DIR, System); if ((CicoFp = fopen (PathName, "r")) == (FILE *) NULL) { LOG ("cannot open %s", PathName); ret_value = ERROR; break; } debug_filename (PathName); ProcUucicoEntry (CicoFp, System); enquire_processes ((traverse_func_t) UpdateProcess); debug_end(); fclose (CicoFp); } } if (dirfp) closedir (dirfp); return ret_value; } #endif /* HDB_UUCP */ tua-4.3.orig/src/hdb/procuucp.c0100644000175100001440000000746006111147426014772 0ustar mdusers/* procuucp.c -- Read and process .Log/uucp/ * * This file is part of TUA. * * Copyright (C) 1991,96 Lele Gaifax * * 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. * */ #include "tua_4_hdb.h" #if HDB_UUCP #if defined(DIRENT) || defined(_POSIX_VERSION) #include #define NLENGTH(dirent) (strlen((dirent)->d_name)) #else /* not (DIRENT or _POSIX_VERSION) */ #define dirent direct #define NLENGTH(dirent) ((dirent)->d_namlen) #ifdef USG #ifdef SYSNDIR #include #else /* not SYSNDIR */ #include #endif /* not SYSNDIR */ #else /* not USG */ #include /* Assume SYSDIR, or not if you want. */ #endif /* not USG */ #endif /* not (DIRENT or _POSIX_VERSION) */ static void DEFUN (ProcUucpEntry, (fp, sys), FILE * fp AND char *sys) { char line[LINE_BUFFER_SIZE]; system_rec_t *sr = insert_system (sys); if (!sr->Killed) { #ifdef DEBUG if (be_verbose) fprintf (stderr, "%s:\n", sys); #endif while (fgets (line, LINE_BUFFER_SIZE, fp) != NULL) { command_rec_t *cr; user_rec_t *ur; char *User; char commandline[128]; char *file1, *file2; char * lptr = line; debug_newline(); #ifdef TAYLOR_HDB (void) strtok (lptr, " "); /* skip "uucp" */ lptr = NULL; #endif User = strtok (lptr, " "); ur = insert_user (User); (void) strtok (NULL, ")"); /* skip date and pid */ #ifdef TAYLOR_HDB (void) strtok (NULL, " "); /* skip "Queuing" */ (void) strtok (NULL, " "); /* skip "send" */ (void) strtok (NULL, " "); /* skip "of" */ #else (void) strtok (NULL, "("); /* skip "QUEUED (" */ #endif file1 = strtok (NULL, " "); (void) strtok (NULL, " "); #ifdef TAYLOR_HDB file2 = strtok (NULL, " "); #else file2 = strtok (NULL, ")"); #endif sprintf (commandline, "uucp %s %s", file1, file2); if (!ur->Killed) { cr = insert_command (&ur->Commands, commandline); cr->Number++; } cr = insert_command (&sr->Commands, commandline); cr->Number++; } } } int DEFUN_VOID (read_uucp_log) { DIR *dirfp; struct dirent *direntry; char dirname[LPNMAX]; int ret_value = OK; sprintf (dirname, "%s/%s", logs_prefix_path_opt, UUCP_DIR); if ((dirfp = opendir (dirname)) == NULL) { LOG ("cannot read %s", dirname); ret_value = ERROR; } else { #ifdef DEBUG if (be_verbose) fputs ("\nProcessing uucp logs:", stderr); #endif while ((direntry = readdir (dirfp)) != NULL) { FILE *UucpFp; char PathName[LPNMAX]; char System[15]; if (*direntry->d_name == '.') continue; sprintf (System, "%.*s", (int) NLENGTH (direntry), direntry->d_name); if (just_some_system_opt && (search_system (System) == (system_rec_t *) NULL)) continue; sprintf (PathName, "%s/%s/%s", logs_prefix_path_opt, UUCP_DIR, System); debug_filename (PathName); if ((UucpFp = fopen (PathName, "r")) == (FILE *) NULL) { LOG ("cannot open %s", PathName); ret_value = ERROR; break; } ProcUucpEntry (UucpFp, System); debug_end(); fclose (UucpFp); } } if (dirfp) closedir (dirfp); return ret_value; } #endif /* HDB_UUCP */ tua-4.3.orig/src/hdb/procuux.c0100644000175100001440000000757706105405026014644 0ustar mdusers/* procuux.c -- Read and process .Log/uux/ * * This file is part of TUA. * * Copyright (C) 1991,96 Lele Gaifax * * 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. * */ #include "tua_4_hdb.h" #if HDB_UUCP #if defined(DIRENT) || defined(_POSIX_VERSION) #include #define NLENGTH(dirent) (strlen((dirent)->d_name)) #else /* not (DIRENT or _POSIX_VERSION) */ #define dirent direct #define NLENGTH(dirent) ((dirent)->d_namlen) #ifdef USG #ifdef SYSNDIR #include #else /* not SYSNDIR */ #include #endif /* not SYSNDIR */ #else /* not USG */ #include /* Assume SYSDIR, or not if you want. */ #endif /* not USG */ #endif /* not (DIRENT or _POSIX_VERSION) */ static void DEFUN (ProcUuxEntry, (fp, sys), FILE * fp AND char *sys) { char line[LINE_BUFFER_SIZE]; system_rec_t *sr = insert_system (sys); if (!sr->Killed) { #ifdef DEBUG if (be_verbose) fprintf (stderr, "\n%s:\n", sys); #endif while (fgets (line, LINE_BUFFER_SIZE, fp) != NULL) { command_rec_t *cr; user_rec_t *ur; day_rec_t *dr; char *User; Date_t Date; extern int EXFUN(atoi, (CONST char *)); char commandline[LINE_BUFFER_SIZE]; char *argument, *command; debug_newline(); User = strtok (line, " "); ur = insert_user (User); (void) strtok (NULL, "("); Date.Month = atoi (strtok (NULL, "/")); Date.Day = atoi (strtok (NULL, "-")); dr = insert_day (Date); (void) strtok (NULL, "("); sprintf (commandline, "(%s) %s ", sys, (command = strtok (NULL, " "))); argument = strtok (NULL, ")\n"); if (argument != NULL) strcat (commandline, argument); if (!ur->Killed) { cr = insert_command (&ur->Commands, commandline); cr->Number++; } cr = insert_command (&dr->Commands, commandline); cr->Number++; sprintf (commandline, "%s ", command); if (argument != NULL) strcat (commandline, argument); cr = insert_command (&sr->Commands, commandline); cr->Number++; } } } int DEFUN_VOID (read_uux_log) { DIR *dirfp = NULL; struct dirent *direntry; char dirname[LPNMAX]; int ret_value = OK; if (do_command_report_opt) { sprintf (dirname, "%s/%s", logs_prefix_path_opt, UUX_DIR); if ((dirfp = opendir (dirname)) == NULL) { LOG ("cannot read %s", dirname); ret_value = ERROR; } else { #ifdef DEBUG if (be_verbose) fputs ("\nProcessing uux logs:", stderr); #endif while ((direntry = readdir (dirfp)) != NULL) { FILE *UuxFp; char PathName[LPNMAX]; char System[15]; if (*direntry->d_name == '.') continue; sprintf (System, "%.*s", (int) NLENGTH (direntry), direntry->d_name); if (just_some_system_opt && (search_system (System) == (system_rec_t *) NULL)) continue; sprintf (PathName, "%s/%s/%s", logs_prefix_path_opt, UUX_DIR, System); debug_filename (PathName); if ((UuxFp = fopen (PathName, "r")) == (FILE *) NULL) { LOG ("cannot open %s", PathName); ret_value = ERROR; break; } ProcUuxEntry (UuxFp, System); debug_end(); fclose (UuxFp); } } } if (dirfp) closedir (dirfp); return ret_value; } #endif /* HDB_UUCP */ tua-4.3.orig/src/hdb/procuuxqt.c0100644000175100001440000001427106105405026015176 0ustar mdusers/* procuuxqt.c -- Read an process .Log/uuxqt/ * * This file is part of TUA. * * Copyright (C) 1991,96 Lele Gaifax * * 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. * */ #include "tua_4_hdb.h" #if HDB_UUCP #if defined(DIRENT) || defined(_POSIX_VERSION) #include #define NLENGTH(dirent) (strlen((dirent)->d_name)) #else /* not (DIRENT or _POSIX_VERSION) */ #define dirent direct #define NLENGTH(dirent) ((dirent)->d_namlen) #ifdef USG #ifdef SYSNDIR #include #else /* not SYSNDIR */ #include #endif /* not SYSNDIR */ #else /* not USG */ #include /* Assume SYSDIR, or not if you want. */ #endif /* not USG */ #endif /* not (DIRENT or _POSIX_VERSION) */ static void DEFUN (ProcUuxqtEntry, (fp, sys), FILE * fp AND char *sys) { char line[LINE_BUFFER_SIZE]; system_rec_t *sr = insert_system (sys); if (!sr->Killed) { while (fgets (line, LINE_BUFFER_SIZE, fp) != NULL) { /* uucp cci (11/21-7:15:02,24502,0) croot */ command_rec_t *cr; day_rec_t *dr; Date_t Date; extern int EXFUN(atoi, (CONST char *)); char *command; debug_newline (); (void) strtok (line, "("); Date.Month = atoi (strtok (NULL, "/")); Date.Day = atoi (strtok (NULL, "-")); dr = insert_day (Date); (void) strtok (NULL, ") "); /* The stuff in the brakets */ command = strtok (NULL, " "); /* now if we are parsing a standard HDB log, in command we have * the name of the user, or the word "COMMAND" if we are looking * at an error. * With an HDB_LOGGING Taylor we have one of "Executing", "ERROR:" * or "Execution" */ if (strcmp (command, "COMMAND") == 0) { /* uucp iconet (3/6-2:06:23,24578,0) COMMAND FAIL (rnews ... */ char buffer[LINE_BUFFER_SIZE]; (void) strtok (NULL, "("); /* skil "FAIL" */ command = strtok (NULL, ")"); sprintf (buffer, "%s [COMMAND FAIL]", command); cr = insert_command (&sr->Commands, buffer); cr->Number++; cr = insert_command (&dr->Commands, buffer); cr->Number++; } else if (strcmp (command, "Executing") == 0) { /* Taylor Uucp: * news grimski (10/13-09:17:08,18771,0) Executing X.tantaluX2457 (relay rnews frcs) */ strtok (NULL, "("); command = strtok (NULL, ")"); cr = insert_command (&sr->Commands, command); cr->Number++; cr = insert_command (&dr->Commands, command); cr->Number++; } else if (strcmp (command, "ERROR:") == 0) { /* Taylor Uucp: * news grimski (10/13-02:20:52,12161,0) ERROR: open (grimski/D.tantaluN213d): No such file or directory */ cr = insert_command (&sr->Commands, command+sizeof ("ERROR:")); cr->Number++; cr = insert_command (&dr->Commands, command+sizeof ("ERROR:")); cr->Number++; } else if (strcmp (command, "Execution") == 0) { /* Taylor Uucp: * news grimski (10/13-02:20:52,12161,0) Execution failed (X.tantaluX213c) */ } else { command = strtok (NULL, "("); if (strcmp (command, "XQT DENIED ") == 0) { /* XQT DENIED (rnews ) */ char buffer[LINE_BUFFER_SIZE]; command = strtok (NULL, ")"); sprintf (buffer, "%s [EXECUTION DENIED ON LOCAL HOST]", command); cr = insert_command (&sr->Commands, buffer); cr->Number++; cr = insert_command (&dr->Commands, buffer); cr->Number++; } else if (strbegcmp (command, "XQT- ") == 0) { /* XQT- STDIN/STDOUT/FILE ACCESS DENIED (uucp -C ~algol/x* cci!/user/algol ) */ char buffer[LINE_BUFFER_SIZE]; char * message = command+sizeof ("XQT- "); command = strtok (NULL, ")"); sprintf (buffer, "%s [%s]", command, message); cr = insert_command (&sr->Commands, buffer); cr->Number++; cr = insert_command (&dr->Commands, buffer); cr->Number++; } else { /* (PATH=/bin:/usr/bin:/usr/lbin LOGNAME=uucp UU_MACHINE=cci UU_USER=croot export UU_MACHINE UU_USER PATH; rmail algol ) */ (void) strtok (NULL, ";"); if ((command = strtok (NULL, ")"))) { command++; /* Skip the initial space */ cr = insert_command (&sr->Commands, command); cr->Number++; cr = insert_command (&dr->Commands, command); cr->Number++; } } } } } } int DEFUN_VOID (read_uuxqt_log) { DIR *dirfp = NULL; struct dirent *direntry; char dirname[LPNMAX]; int ret_value = OK; if (do_command_report_opt) { sprintf (dirname, "%s/%s", logs_prefix_path_opt, UUXQT_DIR); if ((dirfp = opendir (dirname)) == NULL) { LOG ("cannot read %s", dirname); ret_value = ERROR; } else { #ifdef DEBUG if (be_verbose) fputs ("\nProcessing uuxqt logs:", stderr); #endif while ((direntry = readdir (dirfp)) != NULL) { FILE *XqtFp; char PathName[LPNMAX]; char System[15]; if (*direntry->d_name == '.') continue; sprintf (System, "%.*s", (int) NLENGTH (direntry), direntry->d_name); if (just_some_system_opt && (search_system (System) == (system_rec_t *) NULL)) continue; sprintf (PathName, "%s/%s/%s", logs_prefix_path_opt, UUXQT_DIR, System); debug_filename (PathName); if ((XqtFp = fopen (PathName, "r")) == (FILE *) NULL) { LOG ("cannot open %s", PathName); ret_value = ERROR; break; } ProcUuxqtEntry (XqtFp, System); debug_end(); fclose (XqtFp); } } } if (dirfp) closedir (dirfp); return ret_value; } #endif /* HDB_UUCP */ tua-4.3.orig/src/hdb/procxfer.c0100644000175100001440000000674306105405026014761 0ustar mdusers/* procxfer.c -- Eat .Admin/xferstats and update the systems tables. * * This file is part of TUA. * * Copyright (C) 1991,96 Lele Gaifax * * 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. * */ #include "tua_4_hdb.h" #include "../pcdl.h" #if HDB_UUCP int DEFUN_VOID (read_xferstats_log) { struct xferentry xfe; int xfer_status; char FileName[LPNMAX]; FILE * fp; BOOLEAN first_line = TRUE; #ifdef DEBUG if (be_verbose) fputs ("\nProcessing xferstats:\n", stderr); #endif xfe.System = xfe.User = xfe.PortName = 0; debug_filename (FileName); sprintf (FileName, "%s/%s", logs_prefix_path_opt, XFER_NAME); if ((fp = fopen (FileName, "r")) == (FILE *) NULL) { LOG ("cannot open %s", FileName); return (ERROR); } while ((xfer_status = GetXferEntry (fp, &xfe)) == OK) { Date_t date; Time_t time; system_rec_t *sr; day_rec_t *dr; port_rec_t *pa; debug_newline (); if (just_some_system_opt) { if ((sr = search_system (xfe.System)) == (system_rec_t *) NULL) continue; } else sr = insert_system (xfe.System); if (first_line && (xfe.TimeStamp < StatStartingTime || StatStartingTime == 0.0)) { StatStartingTime = xfe.TimeStamp; first_line = FALSE; } julian_to_dt (xfe.TimeStamp, &date, &time); dr = insert_day (date); pa = insert_port (xfe.PortName); pa->Activity[time.Hour * 3 + (time.Min / 20)] += xfe.Bytes; if (!sr->Killed) { if (pcd_names_count) { int phone_tb = get_phone_timeband (date.DayOfWeek, time.Hour, time.Min); if (sr->PhoneCost == 0) system_alloc_phone_costs (sr); sr->PhoneCost[phone_tb] += xfe.Time; } if (date.Month == sr->History.LastMonthProcessed) sr->History.MonthlyActivity[date.Month - 1] += xfe.Bytes; else { sr->History.MonthlyActivity[date.Month - 1] = xfe.Bytes; sr->History.LastMonthProcessed = date.Month; } if (xfe.Direction == SENT) { user_rec_t *ur = insert_user (xfe.User); sr->Out.Time += xfe.Time; sr->Out.Bytes += xfe.Bytes; sr->Out.Files++; dr->Out.Bytes += xfe.Bytes; dr->Out.Time += xfe.Time; dr->Out.Files++; if (!ur->Killed) { ur->Out.Files++; ur->Out.Bytes += xfe.Bytes; ur->Out.Time += xfe.Time; } } else { sr->In.Time += xfe.Time; sr->In.Bytes += xfe.Bytes; sr->In.Files++; dr->In.Time += xfe.Time; dr->In.Bytes += xfe.Bytes; dr->In.Files++; } } } if (StatEndingTime < xfe.TimeStamp) StatEndingTime = xfe.TimeStamp; fclose (fp); debug_end(); xfree (xfe.System); xfree (xfe.User); xfree (xfe.PortName); return (xfer_status == EOF ? OK : ERROR); } #endif /* HDB_UUCP */ tua-4.3.orig/src/hdb/uucicolog.c0100644000175100001440000000273606105405026015120 0ustar mdusers/* uucicolog.c -- Eat uucico/... a line at a time. * * This file is part of TUA. * * Copyright (C) 1991,96 Lele Gaifax * * 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. * */ #include "tua_4_hdb.h" #if HDB_UUCP int DEFUN (GetUucicoLog, (fp, lentry), FILE * fp AND struct uucico_log * lentry) { char line[LINE_BUFFER_SIZE]; extern int EXFUN(atoi, (CONST char *)); debug_newline(); if (fgets (line, LINE_BUFFER_SIZE, fp) == NULL) return (EOF); xfree (lentry->Command); lentry->Command = 0; strtok (line, "("); /* skip user and system */ lentry->TimeStamp = parse_date (strtok (NULL, ",")); lentry->ProcessId = atoi (strtok (NULL, ",")); strtok (NULL, ")"); lentry->Command = savestring (strtok (NULL, "\n")+1); return OK; } #endif /* TAYLOR_UUCP */ tua-4.3.orig/src/hdb/xferentry.c0100644000175100001440000000400506105405026015144 0ustar mdusers/* xferentry.c -- Process .Admin/xferstat: reads each line, parses it * and returns the values in it. * * This file is part of TUA. * * Copyright (C) 1991,96 Lele Gaifax * * 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. * */ #include "tua_4_hdb.h" #if HDB_UUCP #ifdef HDB_ERR_FACT double ERRFACT = HDB_ERR_FACT; #endif int DEFUN (GetXferEntry, (fp, entry), FILE * fp AND struct xferentry *entry) { char line[LINE_BUFFER_SIZE], * datebuffer; extern int atoi (); extern double EXFUN(atof, (CONST char *)); xfree (entry->System); xfree (entry->User); xfree (entry->PortName); entry->System = entry->User = entry->PortName = 0; if (fgets (line, LINE_BUFFER_SIZE, fp) == NULL) return (EOF); entry->System = savestring (strtok (line, "!")); entry->User = savestring (strtok (NULL, " ")); strtok (NULL, "("); datebuffer = strtok (NULL, ")"); entry->TimeStamp = parse_date (datebuffer); (void) strtok (NULL, "["); entry->PortName = savestring (strtok (NULL, "]")); if (strcmp ("<-", strtok (NULL, " "))) entry->Direction = SENT; else entry->Direction = RECEIVED; entry->Bytes = atof (strtok (NULL, " ")); #ifdef HDB_ERR_FACT entry->Time = atof (strtok (NULL, " /")) / ERRFACT; #else entry->Time = atof (strtok (NULL, " /")); #endif return OK; } #endif /* HDB_UUCP */ tua-4.3.orig/src/taylor/0040755000175100001440000000000006111151470013531 5ustar mduserstua-4.3.orig/src/taylor/ChangeLog0100644000175100001440000000511606107705442015314 0ustar mdusersSun Jan 14 15:01:39 1996 Lele Gaifax * Makefile.in (DISTFILES): Distribuite TaylorLogsPatch.diff. Fri Mar 3 12:33:55 1995 Lele Gaifax * Updated copyright and my e-mail address. Wed Oct 6 14:39:09 1993 Lele Gaifax (lele@nautilus.sublink.org) * procstats.c: set phone costs only if we have country info. Wed Sep 29 16:56:41 1993 Lele Gaifax (lele@nautilus.sublink.org) * log.c (GetLog): remove the ending newline from the command. Mon Aug 30 15:13:31 1993 John Plate (plate@infotek.dk) * taylor/Makefile: added customize.h to the dependecies list. Sat Jul 24 14:04:04 1993 Lele Gaifax (lele@nautilus.sublink.org) * stats.c (GetStats): check if we are using a patched Taylor or not. * procstats.c (read_stats_log): if Stats contains port info, such a patched Taylor produce, record it. Wed Jul 14 00:40:00 1993 Lele Gaifax (lele@nautilus.sublink.org) * process.c: moved to root dir, since I will use it for hdb too. * proclog.c (proc_uucico): rewritten to use a per process status. Tue Jul 13 18:52:49 1993 Lele Gaifax (lele@nautilus.sublink.org) * process.c: new file. Keep the status of a single uucico process. * log.c (GetLog): skip continuation lines (check for "uu" at beginning of line). Mon Apr 19 11:15:11 1993 Lele Gaifax (lele@nautilus.sublink.org) * proclog.c: update StatEndingTime with the timestamp of the last Log line. Sun Apr 18 17:01:16 1993 Lele Gaifax (lele@nautilus.sublink.org) * Use Julian dates instead of time_t. Thu Apr 15 17:59:32 1993 Lele Gaifax (lele@nautilus.sublink.org) * TaylorLogsPatch.diff: new file containing the little change to log.c (as of version 1.04) to include the port name in the Stats file. * tua_4_taylor.h, stats.c, procstats.c: mods to support the patch to the Stats format to include the port name. Since I cannot try it now (I do not have taylor uucp installed), I #ifdef all the changes, that will be included if you define TAYLOR_LOGS_PATCH. Wed Apr 14 15:25:15 1993 Lele Gaifax (lele@nautilus.sublink.org) * Makefile: added ../tua.h as a global dependecie. Sat Jan 23 17:23:16 1993 Lele Gaifax (lele@nautilus.sublink.org) * log.c, proclog.c: new files. Read entries from Log. Wed Jan 13 12:31:59 1993 Lele Gaifax (lele@nautilus.sublink.org) * anyone: use the new tua_4_taylor.h instead of tua.h * tua_4_taylor.h: new file, containing taylor specific stuff coming from tua.h Tue Jan 12 12:04:09 1993 Lele Gaifax (lele@nautilus.sublink.org) * procstats.c, statsentry.c: new files. Read entries from Stats tua-4.3.orig/src/taylor/Makefile.in0100644000175100001440000000462206110060321015570 0ustar mdusers# Makefile for "The Uucp Analyzer" Taylor-specific sources # # This file is part of TUA. # # Copyright (C) 1991,96 Lele Gaifax # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # PACKAGE = @PACKAGE@ VERSION = @VERSION@ SHELL = /bin/sh @SET_MAKE@ # This subdirectory name subdir = src/taylor #### Start of system configuration section. #### srcdir=@srcdir@ top_srcdir = @top_srcdir@ VPATH=@srcdir@ AR=ar RANLIB=@RANLIB@ CC=@CC@ DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@ -DLIBDIR=\"$(libdir)\" CFLAGS = @CFLAGS@ COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) .SUFFIXES: .SUFFIXES: .c .o .c.o: $(COMPILE) $< -o $@ INCLUDES = -I$(srcdir) -I.. -I$(top_srcdir) -I../intl -I$(top_srcdir)/intl HEADERS = tua_4_taylor.h SOURCES = log.c proclog.c stats.c procstats.c OBJECTS = log.o proclog.o stats.o procstats.o DISTFILES = ChangeLog Makefile.in $(HEADERS) $(SOURCES) TaylorLogsPatch.diff LIBRARY = ../libtua.a default: all all: Makefile $(OBJECTS) $(AR) cr $(LIBRARY) $(OBJECTS) -$(RANLIB) $(LIBRARY) distdir = $(top_srcdir)/$(PACKAGE)-$(VERSION)/$(subdir) dist: Makefile for file in $(DISTFILES); do \ ln $$file $(distdir) \ || { echo copying $$file instead; cp -p $$file $(distdir);}; \ done tags: TAGS TAGS: $(HEADERS) $(SOURCES) here=`pwd`; \ cd $(srcdir) && etags -o $$here/TAGS $(HEADERS) $(SOURCES) Makefile: Makefile.in $(top_srcdir)/config.status cd $(top_srcdir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status mostlyclean: rm -f *.o clean: mostlyclean rm -f *~ distclean: clean rm -f TAGS maintainer-clean: distclean @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." $(OBJECTS): tua_4_taylor.h ../tua.h $(top_srcdir)/config.h tua-4.3.orig/src/taylor/tua_4_taylor.h0100644000175100001440000000270706105405027016316 0ustar mdusers/* tua_4_taylor.h -- Constants and structs definition, * functions prototype for Taylor Uucp. * * This file is part of TUA. * * Copyright (C) 1991,96 Lele Gaifax * * 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. * */ #ifndef _TUA_4_TAYLOR_H #define _TUA_4_TAYLOR_H #include "tua.h" struct stats { char * User; char * System; Julian_t TimeStamp; direction_t Direction; float Bytes; float Time; #ifdef TAYLOR_LOGS_PATCH char * PortName; #endif BOOLEAN failed; }; struct log { char * Owner; char * System; char * User; Julian_t TimeStamp; int ProcessId; char * PortName; char * Command; }; extern int EXFUN (GetStats, (FILE *, struct stats *)); extern int EXFUN (GetLog, (FILE *, struct log *)); #endif /* _TUA_4_TAYLOR_H */ tua-4.3.orig/src/taylor/log.c0100644000175100001440000000555706105405027014472 0ustar mdusers/* log.c -- Eat Log a line at a time. * * This file is part of TUA. * * Copyright (C) 1991,96 Lele Gaifax * * 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. * */ #include "tua_4_taylor.h" #if TAYLOR_UUCP int DEFUN (GetLog, (fp, lentry), FILE * fp AND struct log * lentry) { char line[LINE_BUFFER_SIZE], * datebuffer; extern int EXFUN(atoi, (CONST char *)); extern double EXFUN (atof, (CONST char *)); CONST char * command; CONST char * process_id; char * new_line_char; read_line: debug_newline(); if (fgets (line, LINE_BUFFER_SIZE, fp) == NULL) return (EOF); /* Each line in the Log file begins with the owner, i.e. "uux", "uucico", ... if this doesn't, it's a continued line. */ if (line[0] != 'u' || line[1] != 'u') { debug_printf ("skipping continued line '%15.15s...'", line); goto read_line; } xfree (lentry->Owner); xfree (lentry->System); xfree (lentry->User); xfree (lentry->PortName); xfree (lentry->Command); lentry->PortName = lentry->Command = 0; lentry->Owner = savestring (strtok (line, " ")); lentry->System = savestring (strtok (NULL, " ")); lentry->User = savestring (strtok (NULL, " ")); datebuffer = strtok (NULL, ")") + 1; lentry->TimeStamp = parse_date (datebuffer); process_id = strrchr (datebuffer, ' '); lentry->ProcessId = atoi (process_id); command = strrchr (datebuffer, 0) + 2; /* ie two char after the ')' */ if (strbegcmp (command, "Queuing") == 0) command += sizeof ("Queuing"); if ((new_line_char = strrchr (command, '\n'))) *new_line_char = 0; lentry->Command = savestring (command); if (strbegcmp (command, "Calling system") == 0) { strtok (NULL, "("); if (strcmp ("alternate", strtok (NULL, " ")) == 0) { strtok (NULL, ", "); strtok (NULL, " "); } lentry->PortName = savestring (strtok (NULL, ")")); } else if (strbegcmp (command, "Incoming call") == 0) { strtok (NULL, "("); strtok (NULL, " "); /* "login" */ strtok (NULL, " "); /* login name */ strtok (NULL, " "); /* "port" */ lentry->PortName = savestring (strtok (NULL, ")")); } return OK; } #endif /* TAYLOR_UUCP */ tua-4.3.orig/src/taylor/proclog.c0100644000175100001440000001420106105405027015340 0ustar mdusers/* proclog.c -- Eat Log and update the systems tables. * * This file is part of TUA. * * Copyright (C) 1991,96 Lele Gaifax * * 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. * */ #include "tua_4_taylor.h" #if TAYLOR_UUCP static void EXFUN (proc_uux, (struct log *)); static void EXFUN (proc_uuxqt, (struct log *)); static void EXFUN (proc_uucico, (struct log *)); static void adjust_failed_calls (process_status_t * p) { if (p->Status == TUUS_CALLING) { p->System->Calls++; p->System->CallsFAIL++; } else if (p->Status != TUUS_NONE && p->System) { p->System->Calls++; p->System->CallsSTOPPED++; } } int DEFUN_VOID (read_log_log) { int log_status; FILE * fp; char FileName[LPNMAX]; struct log entry; int first_line = TRUE; debug_filename(FileName); #ifdef DEBUG if (be_verbose) fputs ("\nProcessing Log:\n", stderr); #endif sprintf (FileName, "%s/%s", logs_prefix_path_opt, LOG_NAME); if ((fp = fopen (FileName, "r")) == (FILE *) NULL) { LOG ("cannot open %s", FileName); return ERROR; } entry.Owner = entry.System = entry.User = entry.PortName = entry.Command = 0; while ((log_status = GetLog (fp, &entry)) != EOF) { if (just_some_system_opt) { system_rec_t * sr; if ((sr = search_system (entry.System)) == (system_rec_t *) NULL || sr->Killed) continue; } if (strcmp (entry.Owner, "uux") == 0) proc_uux (&entry); else if (strcmp (entry.Owner, "uuxqt") == 0) proc_uuxqt (&entry); else if (strcmp (entry.Owner, "uucico") == 0) proc_uucico (&entry); if (first_line && (StatStartingTime > entry.TimeStamp || StatStartingTime == 0.0)) StatStartingTime = entry.TimeStamp; first_line = FALSE; } enquire_processes ((traverse_func_t) adjust_failed_calls); if (StatEndingTime < entry.TimeStamp) StatEndingTime = entry.TimeStamp; debug_end(); fclose (fp); xfree (entry.Owner); xfree (entry.System); xfree (entry.User); xfree (entry.PortName); xfree (entry.Command); entry.Owner = entry.System = entry.User = entry.PortName = entry.Command = 0; return (log_status == EOF ? OK : ERROR); } static void DEFUN (proc_uux, (entry), struct log * entry) { if (do_command_report_opt) { char commandline[LINE_BUFFER_SIZE]; user_rec_t *ur = insert_user (entry->User); day_rec_t *dr = insert_day (julian_to_d (entry->TimeStamp, 0)); system_rec_t *sr = insert_system (entry->System); command_rec_t *cr; sprintf (commandline, "(%s) %s", entry->System, entry->Command); if (!ur->Killed) { cr = insert_command (&ur->Commands, commandline); cr->Number++; } cr = insert_command (&dr->Commands, commandline); cr->Number++; if (!sr->Killed) { cr = insert_command (&sr->Commands, entry->Command); cr->Number++; } } } static void DEFUN (proc_uuxqt, (entry), struct log * entry) { char * command; if (strbegcmp (entry->Command, "Executing ") == 0) { strtok (entry->Command, "("); command = savestring (strtok (NULL, ")")); xfree (entry->Command); entry->Command = command; proc_uux (entry); } } static void DEFUN (proc_uucico, (entry), struct log * entry) { system_rec_t * sr = NULL; /* just to stop gcc complaining about uninitialized vars */ process_status_t * pr = insert_process (entry->ProcessId); if (strbegcmp (entry->Command, "Incoming call") == 0) { pr->LoginPassed = TRUE; pr->WhoIsPaying = REMOTE_SYSTEM; pr->Status = TUUS_INCOMING; return; } if (strcmp (entry->System, "-")) { sr = insert_system (entry->System); pr->System = sr; } else { debug_message ("Bad system name: '-'"); return; } if (strbegcmp (entry->Command, "Calling system") == 0) { Date_t d; Time_t t; int phone_tb; julian_to_dt (entry->TimeStamp, &d, &t); phone_tb = get_phone_timeband (d.DayOfWeek, t.Hour, t.Min); sr->LastConnection = entry->TimeStamp; if (sr->PhoneCall == 0) system_alloc_phone_costs (sr); sr->PhoneCall[phone_tb]++; pr->LoginPassed = FALSE; pr->WhoIsPaying = LOCAL_SYSTEM; pr->Status = TUUS_CALLING; } else if (strbegcmp (entry->Command, "Errors:") == 0) { pr->Status = TUUS_ERROR; } else if (strbegcmp (entry->Command, "Handshake successful") == 0) { if (pr->Status == TUUS_INCOMING) { pr->LoginPassed = TRUE; pr->Status = TUUS_HANDSHAKE; sr->LastConnection = entry->TimeStamp; } } else if (strbegcmp (entry->Command, "Login successful") == 0) { pr->LoginPassed = TRUE; pr->Status = TUUS_LOGIN; } else if (strbegcmp (entry->Command, "Call complete") == 0) { char * secs; long seconds; extern long EXFUN(atol, (CONST char *)); strtok (entry->Command, "("); secs = strtok (NULL, " "); seconds = atol (secs); sr->TimeConnect += seconds; sr->TimePayedBy[pr->WhoIsPaying] += seconds; sr->Calls++; if (pr->Status != TUUS_ERROR) { sr->CallsOK++; if (pr->WhoIsPaying == LOCAL_SYSTEM) sr->CallsOut++; else sr->CallsIn++; } else { if (pr->LoginPassed) sr->CallsSTOPPED++; else sr->CallsFAIL++; } kill_process (pr->ProcessId); } else if (strbegcmp (entry->Command, "Sending") == 0) { pr->Status = TUUS_SENDING; } } #endif /* TAYLOR_UUCP */ tua-4.3.orig/src/taylor/stats.c0100644000175100001440000000623106105405027015035 0ustar mdusers/* stats.c -- Read and parse one line of Stats * * This file is part of TUA. * * Copyright (C) 1991,96 Lele Gaifax * * 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. * */ #include "tua_4_taylor.h" #if TAYLOR_UUCP #include /* * Standard Taylor Uucp Stats format * USER SYSTEM (1992-11-07 00:29:53.89) received BYTES bytes in TIME seconds (213 bytes/sec) * USER SYSTEM (1992-11-07 00:29:53.89) failed after received BYTES bytes in TIME seconds (213 bytes/sec) * * As modified by me: * USER SYSTEM (1992-11-07 00:29:53.89) received BYTES bytes in TIME seconds (213 bytes/sec) on port PORTNAME * USER SYSTEM (1992-11-07 00:29:53.89) failed after received BYTES bytes in TIME seconds (213 bytes/sec) on port PORTNAME */ int DEFUN (GetStats, (fp, sentry), FILE * fp AND struct stats * sentry) { char line[LINE_BUFFER_SIZE], * datebuffer; extern int atoi (); extern double EXFUN(atof, (CONST char *)); Julian_t timestamp; CONST char * current_token; debug_newline(); if (fgets (line, LINE_BUFFER_SIZE, fp) == NULL) return (EOF); xfree (sentry->User); xfree (sentry->System); #ifdef TAYLOR_LOGS_PATCH xfree (sentry->PortName); sentry->PortName = 0; #endif sentry->User = savestring (strtok (line, " ")); sentry->System = savestring (strtok (NULL, " ")); datebuffer = strtok (NULL, ")") + 1; sentry->TimeStamp = timestamp = parse_date (datebuffer); if (strcmp (current_token = strtok (NULL, " "), "failed") == 0) { /* this is an entry of this type: * lele nautilus (1992-11-07 00:15:31.19) failed after... */ strtok (NULL, " "); /* skip "after" */ current_token = strtok (NULL, " "); /* take the direction string */ sentry->failed = TRUE; } else sentry->failed = FALSE; if (strcmp (current_token, "sent") == 0) sentry->Direction = SENT; else sentry->Direction = RECEIVED; sentry->Bytes = atof (strtok (NULL, " ")); strtok (NULL, " "); /* skip "bytes" */ strtok (NULL, " "); /* skip "in" */ sentry->Time = atof (strtok (NULL, " ")); #ifdef DEBUG if (sentry->Time > 2*60*60) debug_printf ("Strange time: %f", sentry->Time); #endif #ifdef TAYLOR_LOGS_PATCH if (strtok (NULL, ")")==NULL || /* skip (xxx bytes/sec) */ strtok (NULL, " ")==NULL || /* skip "on" */ strtok (NULL, " ")==NULL) /* skip "port" */ sentry->PortName = 0; else sentry->PortName = savestring (strtok (NULL, "\n")); #endif return OK; } #endif /* TAYLOR_UUCP */ tua-4.3.orig/src/taylor/procstats.c0100644000175100001440000000737206105405027015730 0ustar mdusers/* procstats.c -- Eat Stats and update the systems tables. * * This file is part of TUA. * * Copyright (C) 1991,96 Lele Gaifax * * 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. * */ #include "tua_4_taylor.h" #include "../pcdl.h" #if TAYLOR_UUCP int DEFUN_VOID (read_stats_log) { int stat_status; FILE * fp; char FileName[LPNMAX]; struct stats entry; BOOLEAN first_line = TRUE; debug_filename (FileName); #ifdef DEBUG if (be_verbose) fputs ("\nProcessing Stats:\n", stderr); #endif sprintf (FileName, "%s/%s", logs_prefix_path_opt, STATS_NAME); if ((fp = fopen (FileName, "r")) == (FILE *) NULL) { LOG ("cannot open %s", FileName); return ERROR; } entry.System = entry.User = 0; #ifdef TAYLOR_LOGS_PATCH entry.PortName = 0; #endif while ((stat_status = GetStats (fp, &entry)) != EOF) { Date_t date; Time_t time; system_rec_t * sr; day_rec_t * dr; user_rec_t * ur; if (just_some_system_opt) { if ((sr = search_system (entry.System)) == (system_rec_t *) NULL || sr->Killed) continue; } else sr = insert_system (entry.System); if (first_line && (StatStartingTime > entry.TimeStamp || StatStartingTime == 0.0)) { StatStartingTime = entry.TimeStamp; first_line = FALSE; } julian_to_dt (entry.TimeStamp, &date, &time); ur = insert_user (entry.User); dr = insert_day (date); #ifdef TAYLOR_LOGS_PATCH if (entry.PortName) { port_rec_t * pa = insert_port (entry.PortName); pa->Activity[time.Hour * 3 + (time.Min / 20)] += entry.Bytes; } #endif if (!sr->Killed) { if (pcd_names_count) { int phone_tb = get_phone_timeband (date.DayOfWeek, time.Hour, time.Min); if (sr->PhoneCost == 0) system_alloc_phone_costs (sr); sr->PhoneCost[phone_tb] += entry.Time; } if (date.Month == sr->History.LastMonthProcessed) sr->History.MonthlyActivity[date.Month - 1] += entry.Bytes; else { sr->History.MonthlyActivity[date.Month - 1] = entry.Bytes; sr->History.LastMonthProcessed = date.Month; } if (entry.Direction == SENT) { sr->Out.Time += entry.Time; sr->Out.Bytes += entry.Bytes; sr->Out.Files++; dr->Out.Bytes += entry.Bytes; dr->Out.Time += entry.Time; dr->Out.Files++; if (!ur->Killed) { ur->Out.Files++; ur->Out.Bytes += entry.Bytes; ur->Out.Time += entry.Time; } } else { sr->In.Time += entry.Time; sr->In.Bytes += entry.Bytes; sr->In.Files++; dr->In.Time += entry.Time; dr->In.Bytes += entry.Bytes; dr->In.Files++; if (!ur->Killed) { ur->In.Files++; ur->In.Bytes += entry.Bytes; ur->In.Time += entry.Time; } } } } fclose (fp); if (StatEndingTime < entry.TimeStamp) StatEndingTime = entry.TimeStamp; xfree (entry.User); xfree (entry.System); #ifdef TAYLOR_LOGS_PATCH xfree (entry.PortName); #endif return (stat_status == EOF ? OK : ERROR); } #endif /* TAYLOR_UUCP */ tua-4.3.orig/src/taylor/TaylorLogsPatch.diff0100644000175100001440000000172105506060453017447 0ustar mdusers*** log-org.c Sun Sep 26 11:52:38 1993 --- log.c Sun Sep 26 11:54:29 1993 *************** *** 602,612 **** #if HAVE_TAYLOR_LOGGING fprintf (eLstats, ! "%s %s (%s) %s%s %ld bytes in %ld.%03ld seconds (%ld bytes/sec)\n", zuser, zsystem, zldate_and_time (), fsucceeded ? "" : "failed after ", fsent ? "sent" : "received", ! cbytes, csecs, cmicros / 1000, cbps); #endif /* HAVE_TAYLOR_LOGGING */ #if HAVE_V2_LOGGING fprintf (eLstats, --- 602,613 ---- #if HAVE_TAYLOR_LOGGING fprintf (eLstats, ! "%s %s (%s) %s%s %ld bytes in %ld.%03ld seconds (%ld bytes/sec) on port %s\n", zuser, zsystem, zldate_and_time (), fsucceeded ? "" : "failed after ", fsent ? "sent" : "received", ! cbytes, csecs, cmicros / 1000, cbps, ! zLdevice == NULL ? "unknown" : zLdevice); #endif /* HAVE_TAYLOR_LOGGING */ #if HAVE_V2_LOGGING fprintf (eLstats, tua-4.3.orig/src/lib/0040755000175100001440000000000006111151471012766 5ustar mduserstua-4.3.orig/src/lib/ChangeLog0100644000175100001440000000016706111151376014545 0ustar mdusersSat Jan 13 20:33:19 1996 Lele Gaifax * Makefile.in (DISTFILES): Distribuite ChangeLog. tua-4.3.orig/src/lib/Makefile.in0100644000175100001440000000512206110060321015020 0ustar mdusers# Makefile for "The Uucp Analyzer" missing functions sources # # This file is part of TUA. # # Copyright (C) 1991,96 Lele Gaifax # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # PACKAGE = @PACKAGE@ VERSION = @VERSION@ SHELL = /bin/sh @SET_MAKE@ # This subdirectory name subdir = src/lib #### Start of system configuration section. #### srcdir=@srcdir@ top_srcdir = @top_srcdir@ VPATH=@srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ transform = @program_transform_name@ # Where to install executables. bindir = @bindir@ # Where to install library files. libdir = @libdir@ # Where to install locale stuff datadir = @datadir@ localedir = $(datadir)/locale AR=ar RANLIB=@RANLIB@ CC=@CC@ DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@ -DLIBDIR=\"$(libdir)\" CFLAGS = @CFLAGS@ COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) .SUFFIXES: .SUFFIXES: .c .o .c.o: $(COMPILE) $< -o $@ INCLUDES = -I$(srcdir) -I.. -I$(top_srcdir) -I../intl -I$(top_srcdir)/intl SOURCES = stpcpy.c rint.c modf.c strbegcmp.c strcasecmp.c OBJECTS = @LIBOBJS@ DISTFILES = ChangeLog Makefile.in $(SOURCES) LIBRARY = ../libtua.a default: all all: Makefile $(OBJECTS) $(AR) cr $(LIBRARY) $(OBJECTS) -$(RANLIB) $(LIBRARY) distdir = $(top_srcdir)/$(PACKAGE)-$(VERSION)/$(subdir) dist: Makefile for file in $(DISTFILES); do \ ln $$file $(distdir) \ || { echo copying $$file instead; cp -p $$file $(distdir);}; \ done tags: TAGS TAGS: $(HEADERS) $(SOURCES) here=`pwd`; \ cd $(srcdir) && etags -o $$here/TAGS $(HEADERS) $(SOURCES) Makefile: Makefile.in $(top_srcdir)/config.status cd $(top_srcdir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status mostlyclean: rm -f *.o clean: mostlyclean rm -f *~ distclean: clean rm -f Makefile TAGS maintainer-clean: distclean @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." $(OBJECTS): ../tua.h $(top_srcdir)/config.h tua-4.3.orig/src/lib/stpcpy.c0100444000175100001440000000205606020616325014455 0ustar mdusers/* stpcpy.c -- copy a string and return pointer to end of new string Copyright (C) 1989, 1990 Free Software Foundation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H # include #endif /* Copy SRC to DEST, returning the address of the terminating '\0' in DEST. */ char * stpcpy (dest, src) char *dest; const char *src; { while ((*dest++ = *src++) != '\0') /* Do nothing. */ ; return dest - 1; } tua-4.3.orig/src/lib/rint.c0100644000175100001440000000212406105405030014076 0ustar mdusers/* rint.c * * This file is part of TUA. * * Copyright (C) 1991,96 Lele Gaifax * * 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. * */ #include "tua.h" /* WARNING!! THIS FUNCTION DOES NOT CHECK FOR OVERFLOW * on double to int casts. TUA does not use big float * numbers, so this should be safe */ double DEFUN (rint, (x), double x) { double rinted = (double) ((int) (x+0.5)); return rinted; } tua-4.3.orig/src/lib/modf.c0100644000175100001440000000216006105405030014047 0ustar mdusers/* modf.c * * This file is part of TUA. * * Copyright (C) 1991,96 Lele Gaifax * * 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. * */ #include "tua.h" /* WARNING!! THIS FUNCTION DOES NOT CHECK FOR OVERFLOW * on double to int casts. TUA does not use big float * numbers, so this should be safe */ double DEFUN (modf, (value, iptr), double value AND double *iptr) { *iptr = (double) ((int) value); return (value - *iptr); } tua-4.3.orig/src/lib/strbegcmp.c0100644000175100001440000000232406105405030015112 0ustar mdusers/* strbegcmp.c * * This file is part of TUA. * * Copyright (C) 1991,96 Lele Gaifax * * 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. * */ #include "tua.h" /* * int strbegcmp (const char * s1, const char * s2) * * Returns non zero if the strings are different. Otherwise returns 0 if * they are equal or one is a prefix substring of the other */ int DEFUN (strbegcmp, (s1, s2), CONST char * s1 AND CONST char * s2) { while (*s1 && *s2) if (*s1 != *s2) return *s1 - *s2; else s1++, s2++; return 0; } tua-4.3.orig/src/lib/strcasecmp.c0100644000175100001440000000250106105405030015265 0ustar mdusers/* strcasecmp.c * * This file is part of TUA. * * Copyright (C) 1991,96 Lele Gaifax * * 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. * */ #include "tua.h" /* Thanx again Jan! */ int DEFUN (strcasecmp, (s1, s2), CONST char * s1 AND CONST char * s2) { char b1, b2; while ((b1 = *s1++) != '\0') { b2 = *s2++; if (b2 == '\0') return 1; if (b1 != b2) { if (isupper (b1)) b1 = tolower (b1); if (isupper (b2)) b2 = tolower (b2); if (b1 != b2) return b1 - b2; } } if (*s2 == '\0') return 0; else return -1; } tua-4.3.orig/lib/0040755000175100001440000000000006111151472012200 5ustar mduserstua-4.3.orig/lib/ChangeLog0100644000175100001440000000130706105353117013753 0ustar mdusersMon Feb 5 11:00:29 1996 Lele Gaifax * TUA.pcd (italy): Updated and added the fixed call cost. (italy-city): added, with timings set for city calls. Sat Feb 3 16:46:03 1996 Lele Gaifax * Makefile.in: Corrected some variable autoconf value. Sun Jan 14 14:43:12 1996 Lele Gaifax * Makefile.in (DISTFILES): Distribuite ChangeLog. Sat Jan 13 20:29:03 1996 Lele Gaifax * TUA.pcd (italy): Use Italian Names. Fri Jan 12 12:06:06 1996 Lele Gaifax * TUA.pcd: Updated Germany configuration: new entries submitted by Andreas Klemm . tua-4.3.orig/lib/Makefile.in0100644000175100001440000000306606104662242014253 0ustar mdusers# Hey! Emacs, let's edit this file in -*- makefile -*- mode! # # This file is part of TUA. # # Makefile for installing support files # lele@nautilus.eclipse.it # PACKAGE = @PACKAGE@ VERSION = @VERSION@ SHELL = /bin/sh @SET_MAKE@ # This subdirectory name subdir = lib #### Start of system configuration section. #### srcdir=@srcdir@ top_srcdir = @top_srcdir@ VPATH=@srcdir@ INSTALL=@INSTALL@ INSTALL_PROGRAM=@INSTALL_PROGRAM@ INSTALL_DATA=@INSTALL_DATA@ prefix = @prefix@ exec_prefix = @exec_prefix@ transform = @program_transform_name@ # Where to install executables. bindir = @bindir@ # Where to install library files. libdir = @libdir@ #### End of system configuration section. #### DISTFILES = ChangeLog Makefile.in TUA.pcd TUA_init.ex all: Makefile install: install-exec install-data install-exec: install-data: $(top_srcdir)/mkinstalldirs $(libdir) if test -f $(libdir)/TUA.pcd; then mv $(libdir)/TUA.pcd $(libdir)/TUA.pcd.old; fi $(INSTALL_DATA) TUA.pcd $(libdir) uninstall: rm -f $(libdir)/TUA.pcd tags: TAGS TAGS: mostlyclean: clean: mostlyclean rm -f *~ distclean: clean rm -f Makefile maintainer-clean: distclean @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." distdir = ../$(PACKAGE)-$(VERSION)/$(subdir) dist: Makefile $(DISTFILES) for file in $(DISTFILES); do \ ln $$file $(distdir) \ || { echo copying $$file instead; cp -p $$file $(distdir);}; \ done Makefile: Makefile.in ../config.status cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status tua-4.3.orig/lib/TUA.pcd0100644000175100001440000002553606110061352013325 0ustar mdusers# -*- c -*- # # This file contains a country specific description of how your telephone # company calculate the cost of the call thru each day of the week. # The language used is simple: see the configuration for "italy" for an example; # it does contain all the allowed statements. # # Overlapping slots will be detected and ignored by TUA. There will be a message # printed on stderr that shows exactly the location of the slots. # # PLEASE, forward to me (lele@eclipse.it) any new country you insert. # # DEFAULT COUNTRY: # This statement defines the default country, i.e. the country that will # be in effect if no --country option is used. default = "italy-city"; # Pizza & Spaghetti country #default = "uk"; #default = "germany"; # Sauerkraut und Bier #default = "Germany-96-City"; #default = "canada"; #default = "denmark"; # Little Mermaid & H.C. Andersen #default = "rsa"; # Springbok and Protea Flowers #default = "usa"; #default = "namibia"; # Biltong and Boereworst country (dried meat and a nice sausage) #default = "france"; #default = "spain"; # ITALY - Pizza & Spaghetti country country "italy" = { currency = "Lit"; decimals = 0; # Do not print fractions of Lits # COSTS: # - assuming that 1 unit costs 127 Lit... # - timings are for distances > 120km name PEAK = "Orario di Punta"; # 8:30am to 1pm cost PEAK = 127,127/13.1; # 1 unit for the call, then one # every 13.1sec name NORMAL = "Orario Diurno"; # 8am to 8:30am, 1pm to 6:30pm cost NORMAL = 127,127/20; name EVENING = "Orario Serale"; # 6:30pm to 10pm cost EVENING = 127,127/32; name NIGHT = "Orario Notturno"; # 10pm to 8 am cost NIGHT = 127,127/40; monday-friday = { rate PEAK = 8:31-13:00; rate NORMAL = 8:01-8:30, 13:01-18:30; rate EVENING = 18:31-22:00; rate NIGHT = 22:01-08:00; # sc for 22:01-24:00, 0:01-8:00 }; saturday = { rate NORMAL = 08:01-13:00; rate EVENING = 13:01-22:00; rate NIGHT = 22:01-08:00; }; sunday = { rate EVENING = 8:01-22:00; rate NIGHT = 22:01-08:00; }; } country "italy-city" = { currency = "Lit"; decimals = 0; # Do not print fractions of Lits # COSTS: # - assuming that 1 unit costs 127 Lit... # - timings are for city calls name PEAK = "Orario di Punta"; # 8:30am to 1pm cost PEAK = 127,127/170; # 1 unit for the call, then one # every 170sec name NORMAL = "Orario Diurno"; # 8am to 8:30am, 1pm to 6:30pm cost NORMAL = 127,127/220; name EVENING = "Orario Serale"; # 6:30pm to 10pm cost EVENING = 127,127/300; name NIGHT = "Orario Notturno"; # 10pm to 8 am cost NIGHT = 127,127/400; monday-friday = { rate PEAK = 8:31-13:00; rate NORMAL = 8:01-8:30, 13:01-18:30; rate EVENING = 18:31-22:00; rate NIGHT= 22:01-08:00; # sc for 22:01-24:00, 0:01-8:00 }; saturday = { rate NORMAL = 08:01-13:00; rate EVENING = 13:01-22:00; rate NIGHT = 22:01-08:00; }; sunday = { rate EVENING = 8:01-22:00; rate NIGHT = 22:01-08:00; }; } # UNITED KINGDOM country "uk" = { name PEAK = "Peak Rate"; # 9:00am to 1pm name NORMAL = "Normal Rate"; # 8am to 9.00am, 1pm to 6:00pm name CHEAP = "Cheap Rate"; # 6pm to 8 am sunday = { rate CHEAP = 00:00-24:00; }; saturday = { rate CHEAP = 00:00-24:00; }; monday-friday = { rate PEAK = 9:01-13:00; rate NORMAL = 8:01-9:00, 13:01-18:00; rate CHEAP = 18:01-8:00; }; } # GERMANY - Sauerkraut und Bier country "germany" = { currency = "DM"; decimals = 2; name DAY = "Day Time"; # 8:00am to 6pm cost DAY = 0.23/360; # 0.23 DM per 6 minutes name NIGHT = "Night Time"; # 6pm to 8.00am cost NIGHT = 0.23/720; # 0.23 DM per 12 minutes sunday = { rate NIGHT = 00:00-24:00; }; saturday = { rate NIGHT = 00:00-24:00; }; mon-fri = { rate DAY = 8:01-18:00; rate NIGHT = 18:01-8:00; }; } country "Germany-96-City" = { currency = "DM"; decimals = 2; name MONDSCHEINTARIF = "City Mondscheintarif"; cost MONDSCHEINTARIF = 0.12/240; name FREIZEITTARIF = "City Freizeittarif"; cost FREIZEITTARIF = 0.12/150; name VORMITTAGTARIF = "City Vormittagtarif"; cost VORMITTAGTARIF = 0.12/90; monday-friday = { rate MONDSCHEINTARIF = 00:01-05:00, 21:01-24:00; rate FREIZEITTARIF = 05:01-09:00, 18:01-21:00; rate VORMITTAGTARIF = 09:01-18:00; }; saturday = { rate MONDSCHEINTARIF = 00:01-05:00, 21:01-24:00; rate FREIZEITTARIF = 05:01-21:00; }; sunday = { rate MONDSCHEINTARIF = 00:01-05:00, 21:01-24:00; rate FREIZEITTARIF = 05:01-21:00; }; } country "Germany-96-Region50" = { currency = "DM"; decimals = 2; name NACHTTARIF = "Region50 Nachttarif"; cost NACHTTARIF = 0.12/120; name MONDSCHEINTARIF = "Region50 Mondscheintarif"; cost MONDSCHEINTARIF = 0.12/60; name FREIZEITTARIF = "Region50 Freizeittarif"; cost FREIZEITTARIF = 0.12/45; name NACHMITTAGTARIF = "Region50 Nachmittagtarif"; cost NACHMITTAGTARIF = 0.12/30; name VORMITTAGTARIF = "Region50 Vormittagtarif"; cost VORMITTAGTARIF = 0.12/26; monday-friday = { rate MONDSCHEINTARIF = 00:01-02:00, 21:01-24:00; rate NACHTTARIF = 02:01-05:00; rate FREIZEITTARIF = 05:01-09:00, 18:01-21:00; rate VORMITTAGTARIF = 09:01-12:00; rate NACHMITTAGTARIF = 12:01-18:00; }; saturday = { rate MONDSCHEINTARIF = 00:01-05:00, 21:01-24:00; rate FREIZEITTARIF = 05:01-21:00; }; sunday = { rate MONDSCHEINTARIF = 00:01-05:00, 21:01-24:00; rate FREIZEITTARIF = 05:01-21:00; }; } country "Germany-96-Region200" = { currency = "DM"; decimals = 2; name NACHTTARIF = "Region200 Nachttarif"; cost NACHTTARIF = 0.12/120; name MONDSCHEINTARIF = "Region200 Mondscheintarif"; cost MONDSCHEINTARIF = 0.12/30; name FREIZEITTARIF = "Region200 Freizeittarif"; cost FREIZEITTARIF = 0.12/21.5; name NACHMITTAGTARIF = "Region200 Nachmittagtarif"; cost NACHMITTAGTARIF = 0.12/13.5; name VORMITTAGTARIF = "Region200 Vormittagtarif"; cost VORMITTAGTARIF = 0.12/12; monday-friday = { rate MONDSCHEINTARIF = 00:01-02:00, 21:01-24:00; rate NACHTTARIF = 02:01-05:00; rate FREIZEITTARIF = 05:01-09:00, 18:01-21:00; rate VORMITTAGTARIF = 09:01-12:00; rate NACHMITTAGTARIF = 12:01-18:00; }; saturday = { rate MONDSCHEINTARIF = 00:01-05:00, 21:01-24:00; rate FREIZEITTARIF = 05:01-21:00; }; sunday = { rate MONDSCHEINTARIF = 00:01-05:00, 21:01-24:00; rate FREIZEITTARIF = 05:01-21:00; }; } country "Germany-96-Fern" = { currency = "DM"; decimals = 2; name NACHTTARIF = "Fern Nachttarif"; cost NACHTTARIF = 0.12/120; name MONDSCHEINTARIF = "Fern Mondscheintarif"; cost MONDSCHEINTARIF = 0.12/25; name FREIZEITTARIF = "Fern Freizeittarif"; cost FREIZEITTARIF = 0.12/20; name NACHMITTAGTARIF = "Fern Nachmittagtarif"; cost NACHMITTAGTARIF = 0.12/12.5; name VORMITTAGTARIF = "Fern Vormittagtarif"; cost VORMITTAGTARIF = 0.12/11.5; monday-friday = { rate MONDSCHEINTARIF = 00:01-02:00, 21:01-24:00; rate NACHTTARIF = 02:01-05:00; rate FREIZEITTARIF = 05:01-09:00, 18:01-21:00; rate VORMITTAGTARIF = 09:01-12:00; rate NACHMITTAGTARIF = 12:01-18:00; }; saturday = { rate MONDSCHEINTARIF = 00:01-05:00, 21:01-24:00; rate FREIZEITTARIF = 05:01-21:00; }; sunday = { rate MONDSCHEINTARIF = 00:01-05:00, 21:01-24:00; rate FREIZEITTARIF = 05:01-21:00; }; } # CANADA country "canada" = { name PEAK = "Peak Rate"; # 8:00am to 6:00pm name EVENING = "Evening Rate"; # 6:00pm to 11:00pm name NIGHT = "Night/Weekend Rate"; # 11:00pm to 8:00am sunday = { rate NIGHT = 00:00-24:00; }; saturday = { rate NIGHT = 00:00-24:00; }; mon-fri = { rate PEAK = 8:01-18:00; rate EVENING = 18:01-23:00; rate NIGHT = 23:01-8:00; }; } # DENMARK - Little Mermaid & H.C. Andersen country "denmark" = { name DAY = "Day Time"; # 0800 to 1930 name NIGHT = "Night Time"; # 1930 to 0800 sunday = { rate NIGHT = 0:00-24:00; }; mon-sat = { rate DAY = 8:01-19:30; rate NIGHT = 19:31-8:00; }; } # South Africa - Springbok and Protea Flowers country "rsa" = { name RATE1 = "Rate group 1"; # weekdays 0700 to 1800, saturday 0700-1300 name RATE2 = "Rate group 2"; # weekdays 1800 to 2000 name RATE3 = "Rate group 3"; # all other hours mon-fri = { rate RATE1 = 7:00-18:00; rate RATE2 = 18:01-20:00; rate RATE3 = 20:01-6:59; }; sat = { rate RATE1 = 7:00-13:00; rate RATE3 = 13:01-6:59; }; sun = { rate RATE3 = 0:00-24:00; }; } # USA country "usa" = { name PEAK = "Peak Rate"; # 8:00am to 5:00pm name EVENING = "Evening Rate"; # 5:00pm to 11:00pm name NIGHT = "Night/Weekend Rate"; # 11:00pm to 8:00am sunday = { rate NIGHT = 23:01-17:00; rate EVENING = 17:01-23:00; }; saturday = { rate NIGHT = 00:00-24:00; }; mon-fri = { rate PEAK = 8:01-17:00; rate EVENING = 17:01-23:00; rate NIGHT = 23:01-8:00; }; } # NAMIBIA - Biltong and Boereworst country (dried meat and a nice sausage) country "namibia" = { currency = "$NA"; decimals = 2; name NORMAL = "Normal Time"; cost NORMAL = 0.185/8; name CHEAP = "Cheap Time"; cost CHEAP = 0.185/23; monday-friday = { rate NORMAL = 7:01-19:00; rate CHEAP = 19:01-7:00; }; saturday = { rate NORMAL = 07:01-13:00; rate CHEAP = 13:01-7:00; }; sunday = { rate CHEAP = 0:01-24:00; }; } # FRANCE country "france" = { currency = "Francs"; decimals = 2; name NORMAL = "Plein Tarif"; cost NORMAL = 0.73 / 180; name PEAK = "-30% Tarif reduit"; cost PEAK = 0.73 / 270; name EVENING = "-50% Tarif reduit"; cost EVENING = 0.73 / 360; name NIGHT = "-65% Tarif de nuit"; cost EVENING = 0.73 / 540; mon-fri = { rate NORMAL = 08:00-12:29, 13:30-17:59; rate PEAK = 12:30-13:29, 18:00-21:29; rate EVENING = 06:00-07:59, 21:30-22:29; rate NIGHT = 22:30-05:59; }; sat = { rate NORMAL = 08:00-12:29; rate PEAK = 12:30-13:29; rate EVENING = 06:00-07:59, 13:30-22:29; rate NIGHT = 22:30-05:59; }; sun = { rate EVENING = 06:00-22:29; rate NIGHT = 22:30-05:59; }; } # SPAIN country "spain-old" = { currency = "Pesetas"; decimals = 0; name NORMAL = "Normal"; name PEAK = "Punta"; name NIGHT = "Reducida"; mon-fri = { rate NORMAL = 17:01-22.00; rate PEAK = 08:01-17.00; rate NIGHT = 22:01-08:00; }; sat = { rate PEAK = 08:01-14:00; rate NIGHT = 14:01-08:00; }; sun = { rate NIGHT = 00:01-24:00; }; } # SWITZERLAND country "switzerland" = { name NORMAL = "Normal Rate"; # 8am to 5pm, 7pm to 9pm name CHEAP = "Cheap Rate"; # 5pm to 7pm, 9pm to 8am sunday = { rate CHEAP = 00:00-24:00; }; saturday = { rate CHEAP = 00:00-24:00; }; monday-friday = { rate NORMAL = 8:00-17:00, 19:00-21:00; rate CHEAP = 17:01-18:59, 21:01- 7:59; }; } tua-4.3.orig/lib/TUA_init.ex0100644000175100001440000000274606105417105014221 0ustar mdusers# This file shows which TUA specific commands are available # # do_option "long-option-name" # This command is the same as putting "--long-option-name" on the # command line. # It is valid only for those options that do not require an argument # # port_alias "port-name" "its-alias" # Like --port-alias port-name=its-alias # # glob_port_alias "port-name" "its-globbing-alias" # Like --port-glob-alias port-name=its-globbing-alias # # kill_port "port-name" # Like --kill-port port-name # # sys_alias "sys-name" "its-alias" # Like --sys-alias sys-name=its-alias # # glob_sys_alias "sys-name" "its-globbing-alias" # Like --sys-glob-alias sys-name=its-globbing-alias # # kill_sys "sys-name" # Like --kill-sys sys-name # # user_alias "user-name" "its-alias" # Like --user-alias user-name=its-alias # # glob_user_alias "user-name" "its-globbing-alias" # Like --user-glob-alias user-name=its-globbing-alias # # kill_user "user-name" # Like --kill-user user-name # # I do not wanna see my name in the report kill_user "lele" # I'd like to group all the @sc{uucp} login names into one meta-user glob_user_alias "uu*" "U_USERS" # I don't wanna see a separate entry for each of my machines sys_alias "calypso" "nautilus" sys_alias "titanic" "nautilus" sys_alias "doria" "nautilus" # Collect the various ports into one meta-port glob_port_alias "ttya?" "LOCAL LINKS" port_alias "tty00" "MODEM" # Always show me the command report do_option "command-lists" do_option "separate-command-report" tua-4.3.orig/doc/0040755000175100001440000000000007103116437012203 5ustar mduserstua-4.3.orig/doc/ChangeLog0100644000175100001440000000356406105420047013756 0ustar mdusersMon Feb 5 16:19:31 1996 Lele Gaifax * tua.texinfo: Edition 1.02. Sun Feb 4 12:23:28 1996 Lele Gaifax * tua.texinfo (PCD File): Document new syntax for fixed cost of the calls. Sat Feb 3 16:44:38 1996 Lele Gaifax * Makefile.in: Corrected some variable autoconf value. Sun Jan 14 14:41:16 1996 Lele Gaifax * tua.texinfo: Edition 1.0. * Makefile.in (DISTFILES): Distribuite Makefile.in, not Makefile. Sat Jan 13 19:49:30 1996 Lele Gaifax * tua.texinfo: Say something about NLS. Fri Mar 3 12:32:03 1995 Lele Gaifax * tua.texinfo: Edition 0.6. * Updated copyright and my e-mail address. Wed Dec 22 15:37:11 1993 Lele Gaifax (lele@nautilus.sublink.org) * tua.texinfo: little changes for 4.0 release. Fri Dec 10 16:56:50 1993 Lele Gaifax (lele@nautilus.sublink.org) * tua.texinfo: added doc for the new "decimals" PCD command. Sat Nov 13 23:13:54 1993 Lele Gaifax (lele@nautilus.sublink.org) * tua.texinfo: updated the PCD section. Sun Sep 26 12:42:09 1993 Lele Gaifax (lele@nautilus.sublink.org) * tua.texinfo: updated with new output examples. Added a section on Phone Categories Definition. Mon Aug 30 15:14:12 1993 John Plate (plate@infotek.dk) * tua.texinfo: corrected a typo. Sat Jul 17 16:07:38 1993 Lele Gaifax (lele@nautilus.sublink.org) * tua.texinfo: new section on compiling and installing tua. Tue Jul 13 17:32:00 1993 Lele Gaifax (lele@nautilus.sublink.org) * Makefile (clean): don't rely on GNU rm. Thu Apr 15 17:07:27 1993 Lele Gaifax (lele@nautilus.sublink.org) * tua.texinfo: changes for Taylor Uucp support. Sat Jan 23 18:23:27 1993 Lele Gaifax (lele@nautilus.sublink.org) * tua.texinfo: changed the syntax for the long options from '+' to '--' tua-4.3.orig/doc/Makefile.in0100644000175100001440000000555006105403753014253 0ustar mdusers# Makefile for building the documentation # # This file is part of TUA. # # Copyright (C) 1991,96 Lele Gaifax # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # PACKAGE = @PACKAGE@ VERSION = @VERSION@ SHELL = /bin/sh @SET_MAKE@ # This subdirectory name subdir = doc #### Start of system configuration section. #### srcdir=@srcdir@ top_srcdir = @top_srcdir@ VPATH=@srcdir@ INSTALL=@INSTALL@ INSTALL_PROGRAM=@INSTALL_PROGRAM@ INSTALL_DATA=@INSTALL_DATA@ prefix = @prefix@ exec_prefix = @exec_prefix@ transform = @program_transform_name@ # Where to install executables. bindir = @bindir@ # Where to install library files. libdir = @libdir@ # Where to install locale stuff datadir = @datadir@ localedir = $(datadir)/locale # Extension for man pages. manext=1 # Where to install man pages. mandir=@mandir@ # Where to install info file infodir=@infodir@ #### End of system configuration section. #### ROFF = groff -Tascii TEXTEMPFILES = tua.aux tua.cp tua.cps tua.dvi \ tua.fn tua.ky tua.log tua.pg tua.toc tua.tp tua.vr DISTFILES = ChangeLog Makefile.in README gpl.texinfo \ rluser.texinfo tua.1l tua.info tua.man tua.texinfo \ wildmat.3 all: tua.1l tua.info tua.dvi install: install-exec install-data install-exec: install-data: all $(top_srcdir)/mkinstalldirs $(infodir) $(mandir)/man${manext} $(INSTALL_DATA) tua.info $(infodir) $(INSTALL_DATA) tua.1l $(mandir)/man${manext} uninstall: rm -f $(infodir)/tua.info rm -f $(mandir)/man${manext}/tua.1l tags: TAGS TAGS: tua.1l: tua.man ${ROFF} -man tua.man > tua.1l tua.info: tua.texinfo makeinfo --no-split tua.texinfo tua.dvi: tua.texinfo texi2dvi tua.texinfo mostlyclean: rm -f ${TEXTEMPFILES} clean: mostlyclean rm -f *~ distclean: clean rm -f Makefile tua.dvi maintainer-clean: distclean @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." rm -f tua.1l tua.info distdir = $(top_srcdir)/$(PACKAGE)-$(VERSION)/$(subdir) dist: Makefile $(DISTFILES) for file in $(DISTFILES); do \ ln $$file $(distdir) \ || { echo copying $$file instead; cp -p $$file $(distdir);}; \ done Makefile: Makefile.in ../config.status cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status tua-4.3.orig/doc/README0100644000175100001440000000053505506060407013063 0ustar mdusersThis directory contains the TUA documentation. tua.man is here, evenif it is obsolete, since from release 4.0 the manual is in Texinfo format. If you do not have texinfo, available on prep.ai.mit.edu, you can try texi2roff, a package that tries to translate a texinfo file in nroff format. If even that fails, tua.info is almost human readable... tua-4.3.orig/doc/gpl.texinfo0100644000175100001440000004363506105421530014365 0ustar mdusers@c @unnumbered GNU GENERAL PUBLIC LICENSE @center Version 2, June 1991 @display Copyright @copyright{} 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. @end display @unnumberedsec 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. @iftex @unnumberedsec TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION @end iftex @ifinfo @center TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION @end ifinfo @enumerate @item 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. @item 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. @item 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: @enumerate a @item You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. @item 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. @item 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.) @end enumerate 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. @item 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: @enumerate a @item 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, @item 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, @item 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.) @end enumerate 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. @item 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. @item 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. @item 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. @item 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. @item 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. @item 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. @item 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. @iftex @heading NO WARRANTY @end iftex @ifinfo @center NO WARRANTY @end ifinfo @item 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. @item 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 enumerate @iftex @heading END OF TERMS AND CONDITIONS @end iftex @ifinfo @center END OF TERMS AND CONDITIONS @end ifinfo @page @unnumberedsec 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. @smallexample @var{one line to give the program's name and a brief idea of what it does.} Copyright (C) 19@var{yy} @var{name of author} This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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. @end smallexample 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: @smallexample Gnomovision version 69, Copyright (C) 19@var{yy} @var{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. @end smallexample The hypothetical commands @samp{show w} and @samp{show c} should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than @samp{show w} and @samp{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: @example Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. @var{signature of Ty Coon}, 1 April 1989 Ty Coon, President of Vice @end example 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. tua-4.3.orig/doc/rluser.texinfo0100644000175100001440000004125305506060414015115 0ustar mdusers@comment %**start of header (This is for running Texinfo on a region.) @setfilename rluser.info @synindex fn vr @comment %**end of header (This is for running Texinfo on a region.) @setchapternewpage odd @ignore This file documents the end user interface to the GNU command line editing feautres. It is to be an appendix to manuals for programs which use these features. There is a document entitled "readline.texinfo" which contains both end-user and programmer documentation for the GNU Readline Library. Copyright (C) 1988 Free Software Foundation, Inc. Authored by Brian Fox. Permission is granted to process this file through Tex and print the results, provided the printed document carries copying permission notice identical to this one except for the removal of this paragraph (this paragraph not being relevant to the printed manual). Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies. Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided also that the GNU Copyright statement is available to the distributee, and provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one. Permission is granted to copy and distribute translations of this manual into another language, under the above conditions for modified versions. @end ignore @node Command Line Editing @chapter Command Line Editing This text describes GNU's command line editing interface. @menu * Introduction and Notation:: Notation used in this text. * Readline Interaction:: The minimum set of commands for editing a line. * Readline Init File:: Customizing Readline from a user's view. @end menu @node Introduction and Notation @section Introduction to Line Editing In this tex a the following notation is used to describe keystrokes. The text @key{C-k} is read as `Control-K' and describes the character produced when the Control key is depressed and the @key{k} key is struck. The text @key{M-k} is read as `Meta-K' and describes the character produced when the meta key (if you have one) is depressed, and the @key{k} key is struck. If you do not have a meta key, the identical keystroke can be generated by typing @key{ESC} @i{first}, and then typing @key{k}. Either process is known as @dfn{metafying} the @key{k} key. The text @key{M-C-k} is read as `Meta-Control-k' and describes the character produced by @dfn{metafying} @key{C-k}. In addition, several keys have their own names. Specifically, @key{DEL}, @key{ESC}, @key{LFD}, @key{SPC}, @key{RET}, and @key{TAB} all stand for themselves when seen in this text, or in an init file (@pxref{Readline Init File}, for more info). @node Readline Interaction @section Readline Interaction @cindex interaction, readline Often during an interactive session you type in a long line of text, only to notice that the first word on the line is misspelled. The Readline library gives you a set of commands for manipulating the text as you type it in, allowing you to just fix your typo, and not forcing you to retype the majority of the line. Using these editing commands, you move the cursor to the place that needs correction, and delete or insert the text of the corrections. Then, when you are satisfied with the line, you simply press @key{RETURN}. You do not have to be at the end of the line to press @key{RETURN}; the entire line is accepted regardless of the location of the cursor within the line. @menu * Readline Bare Essentials:: The least you need to know about Readline. * Readline Movement Commands:: Moving about the input line. * Readline Killing Commands:: How to delete text, and how to get it back! * Readline Arguments:: Giving numeric arguments to commands. @end menu @node Readline Bare Essentials @subsection Readline Bare Essentials In order to enter characters into the line, simply type them. The typed character appears where the cursor was, and then the cursor moves one space to the right. If you mistype a character, you can use @key{DEL} to back up, and delete the mistyped character. Sometimes you may miss typing a character that you wanted to type, and not notice your error until you have typed several other characters. In that case, you can type @key{C-b} to move the cursor to the left, and then correct your mistake. Aftwerwards, you can move the cursor to the right with @key{C-f}. When you add text in the middle of a line, you will notice that characters to the right of the cursor get `pushed over' to make room for the text that you have inserted. Likewise, when you delete text behind the cursor, characters to the right of the cursor get `pulled back' to fill in the blank space created by the removal of the text. A list of the basic bare essentials for editing the text of an input line follows. @table @asis @item @key{C-b} Move back one character. @item @key{C-f} Move forward one character. @item @key{DEL} Delete the character to the left of the cursor. @item @key{C-d} Delete the character underneath the cursor. @item @w{Printing characters} Insert itself into the line at the cursor. @item @key{C-_} Undo the last thing that you did. You can undo all the way back to an empty line. @end table @node Readline Movement Commands @subsection Readline Movement Commands The above table describes the most basic possible keystrokes that you need in order to do editing of the input line. For your convenience, many other commands have been added in addition to @key{C-b}, @key{C-f}, @key{C-d}, and @key{DEL}. Here are some commands for moving more rapidly about the line. @table @key @item C-a Move to the start of the line. @item C-e Move to the end of the line. @item M-f Move forward a word. @item M-b Move backward a word. @item C-l Clear the screen, reprinting the current line at the top. @end table Notice how @key{C-f} moves forward a character, while @key{M-f} moves forward a word. It is a loose convention that control keystrokes operate on characters while meta keystrokes operate on words. @node Readline Killing Commands @subsection Readline Killing Commands The act of @dfn{cutting} text means to delete the text from the line, and to save away the deleted text for later use, just as if you had cut the text out of the line with a pair of scissors. There is a @dfn{Killing} text means to delete the text from the line, but to save it away for later use, usually by @dfn{yanking} it back into the line. If the description for a command says that it `kills' text, then you can be sure that you can get the text back in a different (or the same) place later. Here is the list of commands for killing text. @table @key @item C-k Kill the text from the current cursor position to the end of the line. @item M-d Kill from the cursor to the end of the current word, or if between words, to the end of the next word. @item M-DEL Kill fromthe cursor the start ofthe previous word, or if between words, to the start of the previous word. @item C-w Kill from the cursor to the previous whitespace. This is different than @key{M-DEL} because the word boundaries differ. @end table And, here is how to @dfn{yank} the text back into the line. Yanking is @table @key @item C-y Yank the most recently killed text back into the buffer at the cursor. @item M-y Rotate the kill-ring, and yank the new top. You can only do this if the prior command is @key{C-y} or @key{M-y}. @end table When you use a kill command, the text is saved in a @dfn{kill-ring}. Any number of consecutive kills save all of the killed text together, so that when you yank it back, you get it in one clean sweep. The kill ring is not line specific; the text that you killed on a previously typed line is available to be yanked back later, when you are typing another line. @node Readline Arguments @subsection Readline Arguments You can pass numeric arguments to Readline commands. Sometimes the argument acts as a repeat count, other times it is the @i{sign} of the argument that is significant. If you pass a negative argument to a command which normally acts in a forward direction, that command will act in a backward direction. For example, to kill text back to the start of the line, you might type @key{M--} @key{C-k}. The general way to pass numeric arguments to a command is to type meta digits before the command. If the first `digit' you type is a minus sign (@key{-}), then the sign of the argument will be negative. Once you have typed one meta digit to get the argument started, you can type the remainder of the digits, and then the command. For example, to give the @key{C-d} command an argument of 10, you could type @key{M-1 0 C-d}. @node Readline Init File @section Readline Init File Although the Readline library comes with a set of Emacs-like keybindings, it is possible that you would like to use a different set of keybindings. You can customize programs that use Readline by putting commands in an @dfn{init} file in your home directory. The name of this file is @file{~/.inputrc}. When a program which uses the Readline library starts up, the @file{~/.inputrc} file is read, and the keybindings are set. @menu * Readline Init Syntax:: Syntax for the commands in @file{~/.inputrc}. * Readline Vi Mode:: Switching to @code{vi} mode in Readline. @end menu @node Readline Init Syntax @subsection Readline Init Syntax You can start up with a vi-like editing mode by placing @example @code{set editing-mode vi} @end example in your @file{~/.inputrc} file. You can have Readline use a single line for display, scrolling the input between the two edges of the screen by placing @example @code{set horizontal-scroll-mode On} @end example in your @file{~/.inputrc} file. The syntax for controlling keybindings in the @file{~/.inputrc} file is simple. First you have to know the @i{name} of the command that you want to change. The following pages contain tables of the command name, the default keybinding, and a short description of what the command does. Once you know the name of the command, simply place the name of the key you wish to bind the command to, a colon, and then the name of the command on a line in the @file{~/.inputrc} file. Here is an example: @example # This is a comment line. Meta-Rubout: backward-kill-word Control-u: universal-argument @end example @menu * Commands For Moving:: Moving about the line. * Commands For History:: Getting at previous lines. * Commands For Text:: Commands for changing text. * Commands For Killing:: Commands for killing and yanking. * Numeric Arguments:: Specifying numeric arguments, repeat counts. * Commands For Completion:: Getting Readline to do the typing for you. * Miscellaneous Commands:: Other miscillaneous commands. @end menu @node Commands For Moving @subsubsection Commands For Moving @table @code @item beginning-of-line (C-a) Move to the start of the current line. @item end-of-line (C-e) Move to the end of the line. @item forward-char (C-f) Move forward a character. @item backward-char (C-b) Move back a character. @item forward-word (M-f) Move forward to the end of the next word. @item backward-word (M-b) Move back to the start of this, or the previous, word. @item clear-screen (C-l) Clear the screen leaving the current line at the top of the screen. @end table @node Commands For History @subsubsection Commands For Manipulating The History @table @code @item accept-line (Newline, Return) Accept the line regardless of where the cursor is. If this line is non-empty, add it too the history list. If this line was a history line, then restore the history line to its original state. @item previous-history (C-p) Move `up' through the history list. @item next-history (C-n) Move `down' through the history list. @item beginning-of-history (M-<) Move to the first line in the history. @item end-of-history (M->) Move to the end of the input history, i.e., the line you are entering! @item reverse-search-history (C-r) Search backward starting at the current line and moving `up' through the history as necessary. This is an incremental search. @item forward-search-history (C-s) Search forward starting at the current line and moving `down' through the the history as neccessary. @end table @node Commands For Text @subsubsection Commands For Changing Text @table @code @item delete-char (C-d) Delete the character under the cursor. If the cursor is at the beginning of the line, and there are no characters in the line, and the last character typed was not C-d, then return EOF. @item backward-delete-char (Rubout) Delete the character behind the cursor. A numeric arg says to kill the characters instead of deleting them. @item quoted-insert (C-q, C-v) Add the next character that you type to the line verbatim. This is how to insert things like C-q for example. @item tab-insert (M-TAB) Insert a tab character. @item self-insert (a, b, A, 1, !, ...) Insert yourself. @item transpose-chars (C-t) Drag the character before point forward over the character at point. Point moves forward as well. If point is at the end of the line, then transpose the two characters before point. Negative args don't work. @item transpose-words (M-t) Drag the word behind the cursor past the word in front of the cursor moving the cursor over that word as well. @item upcase-word (M-u) Uppercase the current (or following) word. With a negative argument, do the previous word, but do not move point. @item downcase-word (M-l) Lowercase the current (or following) word. With a negative argument, do the previous word, but do not move point. @item capitalize-word (M-c) Uppercase the current (or following) word. With a negative argument, do the previous word, but do not move point. @end table @node Commands For Killing @subsubsection Killing And Yanking @table @code @item kill-line (C-k) Kill the text from the current cursor position to the end of the line. @item backward-kill-line () Kill backward to the beginning of the line. This is normally unbound. @item kill-word (M-d) Kill from the cursor to the end of the current word, or if between words, to the end of the next word. @item backward-kill-word (M-DEL) Kill the word behind the cursor. @item unix-line-discard (C-u) Do what C-u used to do in Unix line input. We save the killed text on the kill-ring, though. @item unix-word-rubout (C-w) Do what C-w used to do in Unix line input. The killed text is saved on the kill-ring. This is different than backward-kill-word because the word boundaries differ. @item yank (C-y) Yank the top of the kill ring into the buffer at point. @item yank-pop (M-y) Rotate the kill-ring, and yank the new top. You can only do this if the prior command is yank or yank-pop. @end table @node Numeric Arguments @subsubsection Specifying Numeric Arguments @table @code @item digit-argument (M-0, M-1, ... M--) Add this digit to the argument already accumulating, or start a new argument. M-- starts a negative argument. @item universal-argument () Do what C-u does in emacs. By default, this is not bound. @end table @node Commands For Completion @subsubsection Letting Readline Type For You @table @code @item complete (TAB) Attempt to do completion on the text before point. This is implementation defined. Generally, if you are typing a filename argument, you can do filename completion; if you are typing a command, you can do command completion, if you are typing in a symbol to GDB, you can do symbol name completion, if you are typing in a variable to Bash, you can do variable name completion... @item possible-completions (M-?) List the possible completions of the text before point. @end table @node Miscellaneous Commands @subsubsection Some Miscellaneous Commands @table @code @item abort (C-g) Ding! Stops things. @item do-uppercase-version (M-a, M-b, ...) Run the command that is bound to your uppercase brother. @item prefix-meta (ESC) Make the next character that you type be metafied. This is for people without a meta key. @key{ESC-f} is equivalent to @key{M-f}. @item undo (C-_) Incremental undo, separately remembered for each line. @item revert-line (M-r) Undo all changes made to this line. This is like typing the `undo' command enough times to get back to the beginning. @end table @node Readline Vi Mode @subsection Readline Vi Mode While the Readline library does not have a full set of Vi editing functions, it does contain enough to allow simple editing of the line. In order to switch interactively between Emacs and Vi editing modes, use the command M-C-j (toggle-editing-mode). When you enter a line in Vi mode, you are already placed in `insertion' mode, as if you had typed an `i'. Pressing @key{ESC} switches you into `edit' mode, where you can edit the text of the line with the standard Vi movement keys, move to previous history lines with `k', and following lines with `j', and so forth. tua-4.3.orig/doc/tua.info0100644000175100001440000022354206111147505013654 0ustar mdusersThis is Info file tua.info, produced by Makeinfo-1.63 from the input file tua.texinfo. This file documents TUA, The Uucp Analyzer, a tool that analyze the BNU Uucp connections of your machine. Copyright (C) 1991,96 Emanuele Gaifas. This is the the first edition of this manual in Texinfo and replaces the previous document in NROFF text format. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies. Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one. Permission is granted to copy and distribute translations of this manual into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by the Foundation.  File: tua.info, Node: Top, Next: Copying, Prev: (dir), Up: (dir) TUA - The Uucp Analyzer *********************** TUA is a tool that extract as much info as it can from the logs produced by the various BNU Uucp programs, and build a complete report of what is going on with your links. * Menu: * Copying:: TUA Copying Conditions * Overview:: Overview of TUA * Options:: Descriptions of all the Options * Output:: Detailed explanation of what you will see * History:: How TUA maintains the historical data * TCL:: TCL Interface * GNU General Public License:: * Bugs:: Known deficiencies * Author:: Who wrote it, and why * Acknowledgment:: I wanna thanks... * Disclaimer:: I'm not the guilty * Compilation and Installation:: * Files:: Files used by TUA * Taylor Uucp Patch:: * Concept Index:: Concept Index -- The Detailed Node Listing -- Detailed report description * By System:: The system per system report * By User:: A report from a per user point of view * Daily:: What happened on Aug, 16th? * Summary by System:: Details on each system * Summary by System (table format):: The same in a tabular form * Since:: The historical report * Last 12 months Activity:: A summary of the last 12 months activity * Hourly Activity:: Charts showing the per port activity TCL Interface * More about TCL:: Where you can get more info * Available TCL commands:: List of the available commands * Adding new TCL commands:: How to add your own commands Available TCL commands * Command List:: List of available TCL commands * Examples:: A sample Initialization Script Bugs * Bugs Report:: Bugs Report Files * HDB Uucp Files:: Files used in HDB mode * Taylor Uucp Files:: Files used in Taylor mode * PCD File:: Phone Category Description * TCL Files:: * NLS Files:: National Language Support files  File: tua.info, Node: Copying, Next: Overview, Prev: Top, Up: Top TUA Copying Conditions ********************** TUA is "free"; this means that everyone is free to use it and free to redistribute it on a free basis. It is NOT in the public domain; TUA is copyrighted and there are restrictions on its distribution, but these restrictions are designed to permit everything that a good cooperating citizen would want to do. What is not allowed is to try to prevent others from further sharing any version of this programs that they might get from you. *Note GNU General Public License:: for more details on the distribution policy.  File: tua.info, Node: Overview, Next: Options, Prev: Copying, Up: Top Overview of TUA *************** TUA is NOT simply a "Yet Another Uucp Analyzer": its purpose is to produce a readable and complete analysis of the `UUCP' connections. TUA is able to extract a report from both `HoneyDanBer UUCP'(1) and `Taylor Uucp'. The report shows, from several points of view, what exactly is going on at your site. For a detailed description of the output, see *Note Output::. This is done by reading the various logs UUCP produces(2) , as well as `.../tua.history', that is where TUA records the historical data. The exact pathnames of these files are defined in the customization file `src/customize.h'. TUA has several command line options that change its behavior, for example to restrict the range of the systems analyzed. For a list of all the options, see *Note Options::. TUA 4.0 is backward compatible with the previous released version, TUA 3.3, at both the command line option level and the format of the `tua.history'. If you have compiled in both Taylor Uucp and HDB Uucp support, Taylor Uucp will be the default mode. To specify a different Uucp use the options '-hdb-uucp' or '-taylor-uucp' (this can be changed editing `src/customize.h'). TUA 4.1 and higher may even be configured to print out its messages in whatever national language you want (other than english, of course), taking advantage of the `GNU gettext' package. Actually, only *italian* translation of the messages is provided within the distribution package, but you can very easily add your own. As usual, if you do it, I'll be happy to include your translated `.po' files in the distribution, although surely I cannot check their exactness. ---------- Footnotes ---------- (1) Also known as `BNU Uucp' or `HDB Uucp' (2) `.../.Admin/xferstats' and the `.../.Log/' directory hierarchy for HDB Uucp, `.../Stats' and `.../Log' for Taylor Uucp  File: tua.info, Node: Options, Next: Output, Prev: Overview, Up: Top Command line options ******************** To specify any of the options, you can use either the short form or the more mnemonic long form. In the latter case, you can abbreviate the name as long as it is unique. For more information on the long format, please refer to the `GNU getopt' package description. `-a NAME' `--country NAME' After option processing, TUA reads the Phone Categories Definition file (*note PCD File::.). This file may contain a default value for your country, near the top of the file. You may however override that value using this option. If the pcd file does not contain a definition for the country you specified (either with -country or with the "default" directive inside the pcd file itself), TUA will print a message on the standard error stating that it will not print the phone costs in the report. `--print-country' Print the current country information and exit. The definition is printed in the same format you specified it in the PCD file. This is mainly used to check the content of this file. `--list-countries' Print a list of the countries present in the PCD file, and exit. `-S' `--no-system-rep' Do not print the "per System report" (*note By System::.). The default is to print it out. `-U' `--no-user-rep' Do not print the "per User report" (*note By User::.). The default is to print it out. `-D' `--no-daily-rep' Do not print the "Daily report" (*note Daily::.). The default is to print it out. `-C' `--command-lists' Show also the command lists. It is off by default because TUA becomes very hungry of memory since it needs to store in memory all the commands executed. Anyway, it is a nice way to see where is going all those megs of e-mail everyday! `-O SYSTEM' `--only-system SYSTEM' Consider just system SYSTEM in the reports. You can specify more than one of this option, so you can have TUA consider just those systems. `-m' `--no-monthly-act' Do not output the last 12 months activity summary. `-h' `--no-history' Do not output the history at the end of the reports. `-c' `--separate-command-report' Separate command lists from the other data. So there will be two tables with the header "By System" (*note By System::.), the first containing only the amounts and the timing of each transfer, the second with all the commands invoked by each System. This option implies `--command-lists'. `-k SYSTEM' `--kill-system SYSTEM' Eliminate each reference to SYSTEM from the reports. Neither the transfer table nor the SYSTEM command list will be printed. `-K USER' `--kill-user USER' Like `--kill-system', but it applies to the user called USER. `-H' `--update-history' Update the `history' database (*note History::.) with the new values. Warning: since this option will cause TUA to write the historical data on your disk, you must have write permission on the history file `tua.history', usually located inside the spool directory of your UUCP. So if `tua.history' does not exist, TUA needs write permission on that directory to create it. `-0' `--reset-history' Reset the history database, thus clearing the non-volatile memory of TUA. This option must be used with `--update-history'. `-y' `--no-hourly-chart' Do not display the hourly activity chart. `-z SIZE' `--chart-size SIZE' Set the size of the hourly activity chart to SIZE rows. The greater this number is, the smaller is the scale. By default it is set to 10. `-o' `--chart-only' Display only the hourly activity chart. Since with this options TUA reads only the statistical data produced by UUCP(1), it is faster. `-v' `--verbose' Print, on standard error, what is going on. While TUA reads the various logs, it displays a counter of the loaded lines. This option is enabled only specifying -DDEBUG at compile time. `-p PATH' `--prefix-path PATH' By default, TUA looks for uucp logs in the directory specified in `src/customize.h' at compile time. This option lets you change this directory, so that TUA looks for the data in the specified PATH. This is mainly for debugging purposes, but nothing stops you to use it for example to keep your old logs archived somewhere, so that you can examine them whenever you want instead of keeping everything on-line. `-u USER=ALIAS' `--user-alias USER=ALIAS' Inserts ALIAS as the new name for USER. Where ever appears USER it will be replaced with ALIAS. Since this occurs at the lowest level, if happens that ALIAS is another user name, this will cause that all the data that belongs to USER will be added to the ALIAS user. In this way you can create groups of users: for example you may want a report on your development stuff as a whole. $ tua --user-alias piggy=lele --user-alias gnu=lele This will merge data from users PIGGY and GNU with that of user LELE. `-r PORT=ALIAS' `--port-alias PORT=ALIAS' Like `--user-alias', but it applies to the serial port names. This can be useful on those OS where a single serial port has two names, one for normal use and the other with modem control (eg. `tty1a' and `tty1A'). `-s SYS=ALIAS' `--system-alias SYS=ALIAS' Like `--user-alias', but it applies to the systems names. `-E GLOB=ALIAS' `--glob-user-alias GLOB=ALIAS' `-R GLOB=ALIAS' `--glob-port-alias GLOB=ALIAS' `-M GLOB=ALIAS' `--glob-system-alias GLOB=ALIAS' These are the counterpart respectively of `--user-alias', `--port-alias' and `--system-alias' with `meta-characters' searches. You can use for example tua --glob-user-alias uu*=UUCPUSERS and every user name that begins with `uu' will be mapped in a meta user called `UUCPUSERS'. See the manual page for `bash(1)' or `wildmat(3)', distribuited in the `doc' directory of the distribution package, for a description of `meta-characters'. `-t' `--no-tua-rc' When the TCL extensions (*note TCL::.) are enabled, TUA loads a TCL script upon startup. This option prevents this to occur. `-T FILENAME' `--rc-file FILENAME' Specify an alternate initializing TCL script, ie TUA will load FILENAME at startup instead of the standard `TUA_init.tcl'. `-I' `--interactive' Enter in interactive mode. After TUA finished to collect the data it needs, it will prompt you for TCL commands, in particular those that print some report. *Note Command List::. `-V' `--version' Print just the version, without any further processing. `-i' `--help' Show a summary and a description of all the options. `-Y' `--taylor-uucp' This option is available only if TUA was compiled with both TAYLOR_UUCP and HDB_UUCP defined. It forces TUA to read the Taylor UUCP logs, the default behaviour. `-B' `--hdb-uucp' This option is available only if TUA was compiled with both TAYLOR_UUCP and HDB_UUCP defined. It forces TUA to read the HDB Uucp logs. It will digest Taylor Uucp logs in HDB mode too, but this feature is not completely tested yet. If international support has been compiled in, TUA will use the environment variable LANG if any to select the national language used in the report. The only national language supported as of release 4.1 is *italian*. You are invited to send me translations of the messages for other languages, I will add them for the next release. Consult `ABOUT-NLS' in the distribution package for other details on how do it. ---------- Footnotes ---------- (1) `.Admin/xferstats' for HDB Uucp, `Stats' for Taylor Uucp  File: tua.info, Node: Output, Next: History, Prev: Options, Up: Top Detailed report description *************************** The generated report is divided in several section, and it is printed on the standard output, so you can easily redirect it wherever you like. Assuming, unless otherwise stated, that you do not explicitly request to disable some of the reports (eg. when you do not specify any command line option), here is a short description of what you get. * Menu: * By System:: The system per system report * By User:: A report from a per user point of view * Daily:: What happened on Aug, 16th? * Summary by System:: Details on each system * Summary by System (table format):: The same in a tabular form * Since:: The historical report * Last 12 months Activity:: A summary of the last 12 months activity * Hourly Activity:: Charts showing the per port activity  File: tua.info, Node: By System, Next: By User, Prev: Output, Up: Output By System Section ================= With this report, you get all the information relative to all the nodes that talk with your machine but those which didn't sent or received something. The data are divided in `inbound' and `outbound'. For each system, displayed in alphabetical order, you have the total count of the files transferred, with the relative bytes and times, as well as an average transfer rate (ATP). If `--commands-lists' was specified, next there is the list of the commands invoked by that node, or directed to it. If a command is preceded by a number between brackets, that number indicates how many times that command was invoked. By System: ========== R E C E I V E D S E N T System Files KBytes Time ATP Files KBytes Time ATP angmar 106 16 0:03:09.30 86 116 381 0:29:07.25 223 argo 4 4 0:00:10.62 419 22 188 0:03:38.30 879  File: tua.info, Node: By User, Next: Daily, Prev: By System, Up: Output By User Section =============== This report is similar to the previous one, but it shows, in alphabetical order for each local user, all the commands the user invoked, and the transfers he caused. By User: ======== S E N T User Files KBytes Time gnu 18 13 0:00:24.99 news 118 2585 0:54:33.65  File: tua.info, Node: Daily, Next: Summary by System, Prev: By User, Up: Output Daily Section ============= This report summarize the per day activity on the local machine. It doesn't depend on the destinations and on the users. As for the By System section, this table contains By Day: ======= Date R E C E I V E D S E N T Mo/Dy Files KBytes Time Files KBytes Time 01/20 14 20 0:00:45.25 20 205 0:05:02.68 01/21 104 1511 0:32:36.31 67 715 0:18:41.43 01/22 134 1145 0:26:12.08 102 638 0:20:51.58  File: tua.info, Node: Summary by System, Next: Summary by System (table format), Prev: Daily, Up: Output Summary by System ================= It shows a summary of the activity of each system, and the number of calls (inbound and outbound) for it. Please note that sometimes TUA fails in calculating the exact number of calls, because of the misleading log of HDB uucico. Note also that the "total connection time" always differs from the sum of the transmissions times, because it takes care also of the various uucp dead time. In fact, it is calculated from the difference between the time in which the nodes are really connected (ie. at the end of dial phase, when the modem answers) and the time in which the link is dropped, due to the end of the conversation as well as to any error. (1) TUA specifies the amount of this time paid by the two connected systems. The subdivision in timebands of the connection time is currently approximated, ie it is merely the sum of the pure file transfer times, as reported in `xferstats' if reading HDB logs, or in `Stats' with Taylor logs. So the various dead time, such as the login phase, inter-file delays and so on are not included. It is possible to customize the timeband divisions and names, by changing an external file. See *Note PCD File:: for details. Then comes the time of the last connection with that system. Finally, the total number of connections, a count of failed (i.e. that did not reach even the dial phase) and stopped (i.e. interrupted in the middle of the transfer, for any reason) calls. SUMMARY by System: ================== itnnext4: Received 148594425 (2177 Files) in 24:09:34.61: 1708 cps Sent 5986874 ( 105 Files) in 0:56:16.32: 1773 cps Received 142607551 bytes more than sent. The system has been connected for 26:05:03.00 (3.8% of dead time) of which 18:04:44.00 ( 69.3%) are payed by the local system and 8:00:19.00 ( 30.7%) by this system. Spent 0:12:23.72 ( 0.8%, 12934 Lit) in Peak Time 2:47:52.38 ( 11.1%, 108890 Lit) in Normal Time 4:07:32.35 ( 16.4%, 99680 Lit) in Evening Time 17:58:02.47 ( 71.6%, 349635 Lit) in Night Time Last connection: 13 Jul 1993 - 15:53:01 There have been 168 calls (with an average of 2 Ok/day): 139 OK ( 34 IN, 105 OUT, 7 STOPPED) 22 FAILED ---------- Footnotes ---------- (1) In some cases it may even be smaller than the sum. This is currently a bug, not a feature.  File: tua.info, Node: Summary by System (table format), Next: Since, Prev: Summary by System, Up: Output Summary by System - Table Format ================================ Substancially, this report summarizes some of the previous information in a tabular form. Nothing new... +--------+--------------------------+--------------------------+----+ | | R E C E I V E D | S E N T | | | SYSTEM | KiloBytes: Time :Files| KiloBytes: Time :Files| ATP| +--------+----------:---------:-----+----------:---------:-----+----| |angmar | 16: 0:03:09: 106| 381: 0:29:07: 116| 209| |argo | 4: 0:00:10: 4| 188: 0:03:38: 22| 858| |gear | 9: 0:00:35: 8| 1826: 0:37:00: 88| 832| |ideahb | 2: 0:00:03: 2| 1: 0:00:00: 2| 703| |itnsg1 | 5084: 1:46:14: 246| 22: 0:00:20: 90| 817| |lpds | 1: 0:00:03: 2| 616: 0:12:20: 13| 848| |otello | 132: 0:04:04: 48| 30: 0:00:33: 36| 600| |usixth | 0: 0:00:00: 0| 587: 0:12:20: 50| 811| +--------+----------:---------:-----+----------:---------:-----+----| | TOTALS | 5248: 1:54:21: 416| 3651: 1:35:21: 417|####| +--------+----------:---------:-----+----------:---------:-----+----|  File: tua.info, Node: Since, Next: Last 12 months Activity, Prev: Summary by System (table format), Up: Output Historical data - Since... ========================== This is the historical data maintained by TUA. It looks like the previous table, but it includes the history of the system, incrementally since the last `history reset' operation. ...and since Fri Oct 11 01:26:02 1991 +--------+--------------------------+--------------------------+----+ | | R E C E I V E D | S E N T | | | SYSTEM | KiloBytes: Time :Files| KiloBytes: Time :Files| ATP| +--------+----------:---------:-----+----------:---------:-----+----| |angmar | 75: 0:12:52: 396| 2146: 2:44:11: 679| 214| |argo | 46: 0:02:21: 60| 2566: 0:50:48: 280| 838| |gear | 596: 0:13:56: 29| 18279: 6:11:05: 735| 836| |ideahb | 4937: 1:25:53: 259| 16974: 3:20:11: 141|1307| |itnsg1 | 58552: 20:00:30: 2063| 172: 0:02:53: 388| 832| |lpds | 8: 0:00:37: 18| 3341: 1:37:02: 131| 585| |otello | 1812: 1:02:23: 938| 1176: 0:23:33: 577| 593| |usixth | 0: 0:00:00: 0| 587: 0:12:20: 50| 811| +--------+----------:---------:-----+----------:---------:-----+----| | TOTALS | 66025: 22:58:35: 3763| 45241: 15:22:06: 2981|####| +--------+----------:---------:-----+----------:---------:-----+----|  File: tua.info, Node: Last 12 months Activity, Next: Hourly Activity, Prev: Since, Up: Output Last 12 months Activity ======================= This table shows the activity of the local machine during the last 12 months. Only the transferred amounts are computed. The months are displayed in a manner so that the last column contains the current one, so it is very readable (of course, it is a matter of opinions!) Last 12 Months Activity ======================= ------+---+---+---+---+---+---+---+---+-----+-----+-----+----- System|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep| Oct | Nov | Dic | Jan ------+---+---+---+---+---+---+---+---+-----+-----+-----+----- angmar|***|***|***|***|***|***|***|***| *** | 381K| 932K| 907K argo |***|***|***|***|***|***|***|***| 193K| 486K|1552K| 380K gear |***|***|***|***|***|***|***|***|2599K|3241K|6223K|6813K ideahb|***|***|***|***|***|***|***|***|9201K|6460K|5893K| 356K itnsg1|***|***|***|***|***|***|***|***|6852K| 16M| 15M| 20M lpds |***|***|***|***|***|***|***|***| *** |1251 | 836K|2511K otello|***|***|***|***|***|***|***|***| 480K| 924K| 947K| 637K usixth|***|***|***|***|***|***|***|***| *** | *** | *** | 587K ------+---+---+---+---+---+---+---+---+-----+-----+-----+----- TOTALS|***|***|***|***|***|***|***|***| 19M| 28M| 32M| 32M ------+---+---+---+---+---+---+---+---+-----+-----+-----+-----  File: tua.info, Node: Hourly Activity, Prev: Last 12 months Activity, Up: Output Hourly Activity =============== NOTE: Taylor Uucp 1.04 needs a patch to print the name of the port used for the connection in the `Stats' logfile. See *Note Taylor Uucp Patch:: for details. These charts shows the uucp hourly load for each used communication port. Each hour is divided in 20 minutes slices. The final one is the sums of all the preceding, i.e. it displays the uucp load of the machine. Hourly Activity (on a 20 minutes basis) on tty00 ====================================================== Max Value : 2217788 bytes Scale : '#'= 221779 bytes # ## ## # ## # ## # ## # ## # # ## # # ### # ## ### # # ### ======================================================================== 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23  File: tua.info, Node: History, Next: TCL, Prev: Output, Up: Top History ******* TUA maintains a database with the history of each system and of the activity in each of the last 12 months activities. It is usually located in `.../tua.history' and it is actually an ASCII file. It is up to you to update it or not, because probably most of the time you will like to run TUA simply to have a notion of what is going on. To make it working correctly, you have to run TUA with the option `--update-history' just before you run uuclean. So probably you will have to modify that script including in it a line like $ tua --update-history [whatever options you like] | mail lele before it cleans up the uucp logs. There is a commented header at the top of that file that explains its content. There is no needs for you to view and/or modify it, since everything is made by TUA, but I can understand your curiosity!.  File: tua.info, Node: TCL, Next: GNU General Public License, Prev: History, Up: Top TCL Interface ************* "TCL" means "Tool Command Language", and it was designed by John Ousterhout(1) to make it easier to add an embedded command language to the programs that need this feature. This chapter talks about the relationship between TUA and TCL. You need TCL version 6.1 or higher, and compile TUA with the option `USE_TCL' in order to get these functionalities. Using this facility, you can configure TUA at runtime. Currently this is just a different way to specify command line options (*note Options::.), but adding others of them is very simple. TUA, at startup just before beginning to parse the input files, look for a TCL script (see the content of the macro TUA_INIT_SCRIPT, defined in `src/customize.h' for exact pathname. I set it to `TUA_init.tcl' by default). If its name does not begin with a slash "/", it is considered relative to the library directory, usually `/usr/local/lib'. TUA doesn't really need TCL, but I wanted to give it a try, to learn what TCL can be useful for. I cannot really think of a good use for TUA; for this reason, I do not plan to spend time on this functionality. But if you have good examples of how (and why ;-) use this feature, please let me know! However, I think that eventually a large site, with many more users and links than mine, could use profitably this feature, first of all the alias-related commands. The following sections explain what you can do, and how to add other TCL command to TUA. * Menu: * More about TCL:: Where you can get more info * Available TCL commands:: List of the available commands * Adding new TCL commands:: How to add your own commands ---------- Footnotes ---------- (1) His e-mail address is ouster@sprite.berkeley.edu  File: tua.info, Node: More about TCL, Next: Available TCL commands, Prev: TCL, Up: TCL More information about TCL ========================== You can obtain a copy of TCL by `ftp' from `sprite.berkeley.edu'. In its distribution package, you can found several documents that provide both an introduction to the language and a technical reference of it. There is a dedicated and very trafficated newsgroup on `USENET': comp.lang.tcl. There is also a mailing list that collects the people interested with TCL. Send a request to `tcl-request@sprite.berkeley.edu' to join in.  File: tua.info, Node: Available TCL commands, Next: Adding new TCL commands, Prev: More about TCL, Up: TCL Available TCL commands ====================== * Menu: * Command List:: List of available TCL commands * Examples:: A sample Initialization Script  File: tua.info, Node: Command List, Next: Examples, Prev: Available TCL commands, Up: Available TCL commands List of the TCL commands ------------------------ - TCL Command: kill_user USERNAME The user USERNAME will never appear in the report. - TCL Command: user_alias USERNAME ALIAS Insert ALIAS as the new name for the user USERNAME. - TCL Command: glob_user_alias USERNAME ALIAS Insert ALIAS as the new name for the group of users whose name matches USERNAME. USERNAME may contains "meta-characters", with rules very similar to those supported by the `shell'. - TCL Command: kill_sys SYSNAME The system SYSNAME will never appear in the report. - TCL Command: sys_alias SYSNAME ALIAS Insert ALIAS as the new name for the system SYSNAME. - TCL Command: glob_sys_alias SYSNAME ALIAS Insert ALIAS as the new name for the group of systems whose name matches SYSNAME. - TCL Command: kill_port PORTNAME The communication port PORTNAME will never appear in the report. - TCL Command: port_alias USERNAME ALIAS Insert ALIAS as the new name for the communication port PORTNAME. - TCL Command: glob_port_alias USERNAME ALIAS Insert ALIAS as the new name for the group of ports whose name matches PORTNAME. - TCL Command: do_option OPTIONNAME Simulates the invocation of TUA with the option -OPTIONNAME, that needs to a long option name. Currently with this command you can specify just those option that doesn't need any further argument, because it doesn't do any parsing on the OPTIONNAME passed as the argument. - TCL Command: interactive Enter in interactive mode. TUA will prompt you for some TCL commands, and it will print the result on *stdout*, unless any redirection of the standard output was specified on the command line. - TCL Command: systems_report Prints out the Per System Report; *Note By System::. - TCL Command: users_report Prints out the Per User Report; *Note By User::. - TCL Command: daily_report Prints out the Daily Activity; *Note Daily::. - TCL Command: system_summary Prints out the Per System Summary; *Note Summary by System::. - TCL Command: system_summary_table Prints out the Tabled System Summary; *Note Summary by System (table format)::.  File: tua.info, Node: Examples, Prev: Command List, Up: Available TCL commands A sample Initialization Script ------------------------------ What follows is just an example of what you can put in your `TUA_init.tcl'. # This file shows which TUA specific commands are available # # do_option "long-option-name" # This command is the same as putting "--long-option-name" on the # command line. # It is valid only for those options that do not require an argument # # port_alias "port-name" "its-alias" # Like --port-alias port-name=its-alias # # glob_port_alias "port-name" "its-globbing-alias" # Like --port-glob-alias port-name=its-globbing-alias # # kill_port "port-name" # Like --kill-port port-name # # sys_alias "sys-name" "its-alias" # Like --sys-alias sys-name=its-alias # # glob_sys_alias "sys-name" "its-globbing-alias" # Like --sys-glob-alias sys-name=its-globbing-alias # # kill_sys "sys-name" # Like --kill-sys sys-name # # user_alias "user-name" "its-alias" # Like --user-alias user-name=its-alias # # glob_user_alias "user-name" "its-globbing-alias" # Like --user-glob-alias user-name=its-globbing-alias # # kill_user "user-name" # Like --kill-user user-name # # I do not wanna see my name in the report kill_user "lele" # I'd like to group all the UUCP login names into one meta-user glob_user_alias "uu*" "U_USERS" # I don't wanna see a separate entry for each of my machines sys_alias "calypso" "nautilus" sys_alias "titanic" "nautilus" sys_alias "doria" "nautilus" # Collect the various ports into one meta-port glob_port_alias "ttya?" "LOCAL LINKS" port_alias "tty00" "MODEM" # Always show me the command report do_option "command-lists" do_option "separate-command-report"  File: tua.info, Node: Adding new TCL commands, Prev: Available TCL commands, Up: TCL Adding new TCL commands ======================= Embedding a new TCL command into TUA is a simple operation, once you know how TCL works, and this is not the scope of this manual. In few words, you must build a function that accepts four parameter from the calling TCL command and performs some operation on them, and returns a status to TCL, tipically TCL_OK when it ends correctly, or TCL_ERROR to signal an incorrect situation. The called C function gets its arguments in the same way the function `main' in a C program accepts arguments from the invoking environment, i.e. with two variables, generally called ARGC and ARGV, where the former carries the number of arguments passed, the latter is an array of pointer to char containing, one per slot, the arguments. This is possible since TCL supports just one data type: `string', that is a null-terminated array of chars, like in C. Once you have this function, you must tell TCL its name and address, invoking the TCL command `Tcl_CreateCommand'. Look at the table in `tcl_supp.c', and add and appropriate entry for your function. You can see examples of this operation in `useralias.c', `portalias.c', `sysalias.c', `tua.c'..., i.e. in every C source file that create a new TCL command. Please refer to the TCL manual pages for further information about the language and its interface with C.  File: tua.info, Node: GNU General Public License, Next: Bugs, Prev: TCL, Up: Top 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. TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 1. 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. 2. 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. 3. 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. 4. 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. 5. 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. 6. 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. 7. 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. 8. 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. 9. 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. 10. 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. 11. 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 12. 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. 13. 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. ONE LINE TO GIVE THE PROGRAM'S NAME AND A BRIEF IDEA OF WHAT IT DOES. Copyright (C) 19YY NAME OF AUTHOR This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 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) 19YY 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. SIGNATURE OF TY COON, 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.  File: tua.info, Node: Bugs, Next: Author, Prev: GNU General Public License, Up: Top Bugs **** Since `BNU' Uucp doesn't put a complete datestamp in its logs, but omits the year, it may be possible that TUA fails to compute the various times in the first analysis of the year. This is in my opinion its major weakness. For this silliness, TUA cannot correctly handle logs that cover several years. There is little that I can do to correct the situation; I tried to adjust the year when the to-be-parsed date refers obviously to the previous year, but this is just a work\-around.... If this is serious for you, I suggest switching to Taylor Uucp. `BNU' logs get garbaged sometime, for a reason that is unknown to me. This may cause TUA to fails. This is the second weakness: eventually I'll try to implement a better parser in a future release. It should recognise this situation and print out a log, indicating where exacly the error occured. If this happens, you have to find out the garbage inside your logs, and eliminate it. If compiled with the "-DDEBUG" flag, TUA may help you a little givinig it the flag "-verbose". There is a limit: if your system spent more than 9999 hours linked with someone (or the sum exceed that value), the reports will be garbaged... Ohhh well... * Menu: * Bugs Report:: Bugs Report  File: tua.info, Node: Bugs Report, Prev: Bugs, Up: Bugs Bugs Report =========== If you have any problem building or using TUA, please do not hesitate to contact me as lele@eclipse.it. Give it a try, and feel free to modify it. The only thing I ask you is to send me all your enhancements, or bug fixes, so I can include them in some future releases. PLEASE if you can resist, and I know you can, do not post or spread yourself patches without e-mailing me a copy. I do not receive all USENET groups, and it'd be difficult for me to collect them. Include in your message (suggestions, bug reports, patches, flames...), as usual, the machine and OS type you are using, so I can eventually customize TUA for your environment.  File: tua.info, Node: Author, Next: Acknowledgment, Prev: Bugs, Up: Top Author ****** Lele Gaifax, Rovereto (TN) - Italy lele@eclipse.it I developed it because the other analyzers I looked at didn't satisfy my needs. So I picked up their best features, and put all that stuff together. I had a lot of fun doing it, and I learnt even more. I used `nroff' for the first manual page, and then `Texinfo' for this one: this forced me to compile TeX on my old machine, `GCC' since the native compiler wasn't able to do it, and to find a `dvilj' for my silly LJ compatible laser printer; `Bison' for the first approach to parse the date inside the `uucico' logs; `TCL' as a configuration tool; `GDB' to debug the binary tree management... And yes, I know that supporting `TCL', `ReadLine', `SoftChip Btree' is of no use for the larger part of you out there, but this is an interesting way to learn from other's sources. With a few changes to `src/customize.h' and maybe `Makefile' you can exclude these experiments. I took care of portability and correctness (I hope ;-). I wrote the preceeding versions on PC clones, running derivatives of Un*x System V. Then I grew up, bought a wonderful NeXTStation, where I have everything I need: `GNU Emacs', `GCC', `GDB', TeX and `dvips' are there since the Big Bang. I added `Taylor Uucp', restarted the development there and, at last, TUA run on a BSD system (at least mine!). BTW, "TUA" in italian means "yours": "questa cosa e' TUA" can be translated with "this stuff is yours". So even in the name this package reflects the spirit which inspired me in writing it. I chose to cover TUA with the GNU General Public License right to protect this intention.  File: tua.info, Node: Acknowledgment, Next: Disclaimer, Prev: Author, Up: Top Acknowledgement *************** I want to thank especially Marco Lorenzini (marlor@gear.sublink.org) for his help in debugging the previous releases of TUA on the SCO Unix architecture, and for his suggestions on the layout of the reports. To Paolo Ventafridda (venta@i2ack.sublink.org) for his support and interest, and several other people that encouraged me to add more and more functionality, or that let me scan their huge logs. John Plate (plate@infotek.dk) convinced me to complete the Taylor Uucp support, and also helped me with suggestion and feedback. Michel Cerdini (cerdini@zen.gatelink.fr.net) contributed several nice ideas, like cost support in the PCD file. Eberhard W. Lisse (el@lisse.na) tested TUA on Linux... ...And many others, who sent me logs, ideas, flowers... Thanks also to all the people that, with their PD or GPL software, helped me indirectly with ideas or examples.  File: tua.info, Node: Disclaimer, Next: Compilation and Installation, Prev: Acknowledgment, Up: Top Disclaimer ********** I reject any responsibility about this program. It is simple and safe; unless you explicity give the option to update the history database TUA doesn't write anything on your disks. I did not try it under all the possible conditions and environments, so if it causes you some trouble, I'll be sad for a while, but that's it. However, I will try to correct any bug you will tell me. And *please*, forgive my poor english, but I put my soul in it...  File: tua.info, Node: Compilation and Installation, Next: Files, Prev: Disclaimer, Up: Top How to compile and install TUA ****************************** To compile TUA, you must first of all you configure it for your system. This is done semiautomatically by running `configure', a shell script that attempts to guess correct values for various system-dependent variables used during compilation. More info about `configure' and its usage can be found in the file `INSTALL'. `configure' will check your machine and operating system to extract some information, and will update `Makefile' and `config.h'. When this is done, give a look to the `Makefile' and edit it to satisfy your needs, then check and edit `src/customize.h' following its directives. This file contains settings that will alter the behaviour of the program: you can decide what kind of `UUCP' logs TUA will read (Taylor Uucp or HDB Uucp, or both), where the various files TUA accesses live, and so on. A simpler way to change some of these settings is by giving some command-line options to the `configure' procedure: `--with-glob' `--without-glob' Enable / Disable the support for the "glob" pattern matching: enabling it will let you use a notation similar to that used by `bash' to indicate a class of users, or systems. The "glob" library is included in the package. `--with-readline' `--without-readline' This option cause the TCL support routines to use the GNU Readline library for the interaction with the user, instead of a simpler (and smaller) `fgets()'. You can get the GNU ReadLine library from your nearest GNU/FSF archive. `--with-tcl' `--without-tcl' Long time ago I was learning `TCL', and I interfaced `tua' with it. If you know what `TCL' is, you may be interested. If not, surely you don't ;-). This needs `TCL' already installed on your machine. `--with-softchip' `--without-softchip' The `SoftChip Btree Library' is a freely available balanced trees implementation. `tua' internally uses a simple binary trees library, included in the `tua' package, that is good enough for me. As for `TCL', I added the support for this library years ago (don't ask: while I was trying the library... I'm a very curious boy ;-); I did not tried it extensively, and I don't know/care if using balanced trees instead of the simpler binary makes TUA fly... However, if your machine have thousends `UUCP' neighbours... `--enable-taylor' `--disable-taylor' Include or exclude the compilation and the linkage of the `Taylor Uucp' specific code. The support for it is included by default, but if you are using another UUCP implementation you can reduce (a little) the size of the executable while reducing (a lot) TUA capabilities... `--enable-hdb' `--disable-hdb' TUA was born to parse `HDB Uucp' logs: at that time I was learning to program in "C" on UNIX, working on '286 running Xenix... Now I usually program in "Objective C" on NeXTSTEP, working on a NeXTStation, and with `Taylor Uucp'. The support for HDB is there, but is disable by default. If your are not using Taylor Uucp, or configured it in HDB mode, give this option to configure. TUA 4.1 has been internationalized by using the `GNU gettext' package, and `configure' accepts two related options: `--with-gnu-gettext' Bypass the system `catgets' or `gettext' to use GNU `gettext'. `--disable-nls' Totally disable translation of messages. See `ABOUT-NLS' in the distribuition package for other details. Last run the compilation executing `make'.  File: tua.info, Node: Files, Next: Taylor Uucp Patch, Prev: Compilation and Installation, Up: Top Files ***** Here is a list of all the files involved in the analisys. Their exact location is defined in `src/customize.h'. * Menu: * HDB Uucp Files:: Files used in HDB mode * Taylor Uucp Files:: Files used in Taylor mode * PCD File:: Phone Category Description * TCL Files:: * NLS Files:: National Language Support files  File: tua.info, Node: HDB Uucp Files, Next: Taylor Uucp Files, Prev: Files, Up: Files HDB Uucp Files ============== Files TUA reads when in HDB mode. The default prefix directory is `/usr/spool/uucp'. `.../.Log/uucico/*' Directory that contains uucico's logs `.../.Log/uucp/*' Directory that contains uucp's logs `.../.Log/uux/*' Directory that contains uux's logs `.../.Log/uuxqt/*' Directory that contains uuxqt's logs `.../.Admin/xferstat' File containing transfer stats `.../.Admin/tua.history' This file contains the history maintened by TUA. `.../TUA_init.tcl' This file is usually located in the library directory `/usr/local/lib' and if exists it gets loaded at startup by TUA. It may contain a TCL script used for customize some behavior of the program.  File: tua.info, Node: Taylor Uucp Files, Next: PCD File, Prev: HDB Uucp Files, Up: Files Taylor Uucp Files ================= Files TUA reads when in Taylor mode. The default prefix directory is `/usr/local/spool/uucp'. `.../Log' Main Taylor Uucp log file. `.../Stats' Transfers statistics. `.../tua.history' This file contains the history maintened by TUA.  File: tua.info, Node: PCD File, Next: TCL Files, Prev: Taylor Uucp Files, Up: Files PCD File: Phone Categories configuration ======================================== In order to subdivide the time your system spends talking at the phone in each of cost rates used in your country, TUA needs a table of how your telephone company rates your calls at some time in the day. To make it simpler than in previous versions, now TUA is able to read this information from an external file, using the Phone Categories Definition Language. In this language, spaces, tabs, new lines are ignored, as well as the comments, introduced by a pound sign # thru the following end of line. This file contains, at its beginning, the default name of the country, likely the name of your country. The statement that do this is "`default = "'YOUR_COUNTRY_NAME`"'". Each country is defined in a way similar to the following example: # ITALY - Pizza & Spaghetti country country "italy" = { currency = "Lit"; decimals = 0; # Do not print fractions of Lits # COSTS: # - assuming that 1 unit costs 127 Lit... # - timings are for distances > 120km name PEAK = "Orario di Punta"; # 8:30am to 1pm cost PEAK = 127,127/13.1; # 1 unit for the call, then one # every 13.1sec name NORMAL = "Orario Diurno"; # 8am to 8:30am, 1pm to 6:30pm cost NORMAL = 127,127/20; name EVENING = "Orario Serale"; # 6:30pm to 10pm cost EVENING = 127,127/32; name NIGHT = "Orario Notturno"; # 10pm to 8 am cost NIGHT = 127,127/40; monday-friday = { rate PEAK = 8:31-13:00; rate NORMAL = 8:01-8:30, 13:01-18:30; rate EVENING = 18:31-22:00; rate NIGHT = 22:01-08:00; # sc for 22:01-24:00, 0:01-8:00 }; saturday = { rate NORMAL = 08:01-13:00; rate EVENING = 13:01-22:00; rate NIGHT = 22:01-08:00; }; sunday = { rate EVENING = 8:01-22:00; rate NIGHT = 22:01-08:00; }; } You write the names of your timebands, and then, day by day, specify the bands themself. You can abbreviate the names of the days to the first three letters. A timeband is defined as a list of comma separated ranges in the form of `H1:M1-H2:M2', like "18:00-22:00". You can use the form "22:00-08:00" with the same meaning of the longer "22:00-24:00, 0:00-08:00". The format "HH.MM", with a point as separator instead of the colon, is accepted as well. To set the country's currency name use the statement currency = "Lit"; You may specify with how many decimal digits TUA will print money amounts: decimals = 4; It is possible to assign a cost to each timeband with a statement like cost HIGH = 123.2/60.3; that means you will pay 123.2 units of CURRENCY every 60.3 seconds. TUA, and UUCP as well, knows nothing about different kind of calls, i.e. long-distance vs. intercontinental etc. For this reason, whatever cost you will set, the final amount will be an approximation, unless all your calls are of a single type. If your telephone company applies a fixed cost for the call, thus ignoring the time it takes, use the simpler form cost LOW = 127; to mean that in the "LOW" band each call costs *127*. More probably, the cost will be a mix of the two: a fixed amount for the call, then another quid calculated on the time the call takes to terminate. In this case the form to use is cost MEDIUM = 254,127/66; to specify a fixed cost of 254, applied to all calls, plus a cost of 127 per unit of time of 66 seconds (or less: a 10-secs-long call costs one unit). This file is located inside your local library directory, usually `/usr/local/lib', and named `TUA.pcd'.  File: tua.info, Node: TCL Files, Next: NLS Files, Prev: PCD File, Up: Files TCL Initialization file ======================= When TUA is configured to support TCL, you may create a file called `TUA_init.tcl' in the library directory (usually `/usr/local/lib'). This file, if exists, gets loaded at startup by TUA, and may contain a TCL script used for customize some behavior of the program. *Note Examples::.  File: tua.info, Node: NLS Files, Prev: TCL Files, Up: Files National Language Support files =============================== Files TUA accesses when NLS is needed. `.../LANG/LC_MESSAGES/TUA.mo' Where LANG is the selected national language, contains the translations of all the messages TUA will put in the generated reports.  File: tua.info, Node: Taylor Uucp Patch, Next: Concept Index, Prev: Files, Up: Top Taylor Uucp Patch ***************** If you are using Taylor Uucp version 1.04 and want the Hourly Activity Chart, you have to patch its source, adding the port name in each line of the `Stats' log file. TUA automatically recognize patched logs, and will produce the chart without any other intervention by you. Here below is the patch you may want apply. To simplify your work, I included it in `src/taylor/TaylorLogsPatch.diff' in the TUA package. To install it, go to the Taylor Uucp source directory and execute the command "`patch < .../taylor/TaylorLogsPatch.diff'", where the dots represent the name of the directory where you keep TUA sources. Taylor Uucp 1.05 and greater do not need this patch. *** log-org.c Sun Sep 26 11:52:38 1993 --- log.c Sun Sep 26 11:54:29 1993 *************** *** 602,612 **** #if HAVE_TAYLOR_LOGGING fprintf (eLstats, ! "%s %s (%s) %s%s %ld bytes in %ld.%03ld seconds (%ld bytes/sec)\n", zuser, zsystem, zldate_and_time (), fsucceeded ? "" : "failed after ", fsent ? "sent" : "received", ! cbytes, csecs, cmicros / 1000, cbps); #endif /* HAVE_TAYLOR_LOGGING */ #if HAVE_V2_LOGGING fprintf (eLstats, --- 602,613 ---- #if HAVE_TAYLOR_LOGGING fprintf (eLstats, ! "%s %s (%s) %s%s %ld bytes in %ld.%03ld seconds (%ld bytes/sec) on port %s\n", zuser, zsystem, zldate_and_time (), fsucceeded ? "" : "failed after ", fsent ? "sent" : "received", ! cbytes, csecs, cmicros / 1000, cbps, ! zLdevice == NULL ? "unknown" : zLdevice); #endif /* HAVE_TAYLOR_LOGGING */ #if HAVE_V2_LOGGING fprintf (eLstats,  File: tua.info, Node: Concept Index, Prev: Taylor Uucp Patch, Up: Top Concept and Function Index ************************** * Menu: * TUA_init.tcl example: Examples. * Acknowledgement: Acknowledgment. * Author: Author. * Available TCL commands: Command List. * Bug Report: Bugs Report. * Bugs: Bugs. * Command line options: Options. * Communication port Activity: Hourly Activity. * Compilation: Compilation and Installation. * Conditions for copying TUA: Copying. * Configuration: Compilation and Installation. * Configuring TUA with TCL: TCL. * Copying conditions: Copying. * country configuration: PCD File. * Customization: Compilation and Installation. * Daily Activity: Daily. * daily_report: Command List. * do_option: Command List. * Getting TCL: More about TCL. * glob_port_alias: Command List. * glob_sys_alias: Command List. * glob_user_alias: Command List. * Historical data <1>: History. * Historical data: Since. * History: History. * Hourly Activity: Hourly Activity. * How to send a Bug Report: Bugs Report. * Installation: Compilation and Installation. * interactive: Command List. * Internationalization: NLS Files. * Invocation: Options. * kill_port: Command List. * kill_sys: Command List. * kill_user: Command List. * Known deficiencies: Bugs. * Last 12 months Activity: Last 12 months Activity. * New TCL Commands: Adding new TCL commands. * Options: Options. * Output: Output. * Overview of TUA: Overview. * Patch for Taylor Uucp: Taylor Uucp Patch. * PCD File: PCD File. * Per System Summary: Summary by System. * Per System Tabled Summary: Summary by System (table format). * Phone Categories: PCD File. * port_alias: Command List. * Reporting a Bug: Bugs Report. * Runtime configuration with TCL: TCL. * Since...: Since. * Summary by System (Table format): Summary by System (table format). * Summary by System (Verbose): Summary by System. * Summary of the last year Activity: Last 12 months Activity. * sys_alias: Command List. * system_summary: Command List. * system_summary_table: Command List. * systems_report: Command List. * TCL: TCL Files. * TCL Mailing List: More about TCL. * Thanks: Acknowledgment. * user_alias: Command List. * users_report: Command List. * What TUA is: Overview. * Who wrote it and why: Author.  Tag Table: Node: Top1012 Node: Copying3295 Node: Overview3939 Node: Options5889 Node: Output13737 Node: By System14737 Node: By User15814 Node: Daily16304 Node: Summary by System16977 Node: Summary by System (table format)19738 Node: Since21150 Node: Last 12 months Activity22681 Node: Hourly Activity24125 Node: History25133 Node: TCL26069 Node: More about TCL27934 Node: Available TCL commands28516 Node: Command List28813 Node: Examples31163 Node: Adding new TCL commands33160 Node: GNU General Public License34619 Node: Bugs53792 Node: Bugs Report55145 Node: Author55886 Node: Acknowledgment57607 Node: Disclaimer58612 Node: Compilation and Installation59198 Node: Files62878 Node: HDB Uucp Files63371 Node: Taylor Uucp Files64202 Node: PCD File64588 Node: TCL Files68451 Node: NLS Files68874 Node: Taylor Uucp Patch69224 Node: Concept Index71145  End Tag Table tua-4.3.orig/doc/tua.man0100644000175100001440000002745006105405021013465 0ustar mdusers''' ''' Copyright (C) 1991,96 Lele Gaifax ''' ''' 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. ''' ''' The next definitions are from Larry Wall's perl manual pages. .de Sh .br .ne 5 .PP \fB\\$1\fR .PP .. .de Sp .if t .sp .5v .if n .sp .. .de Ip .br .ie \\n.$>=3 .ne \\$3 .el .ne 3 .IP "\\$1" \\$2 .. ''' ''' Set up \*(-- to give an unbreakable dash; ''' string Tr holds user defined translation string. ''' Bell System Logo is used as a dummy character. ''' .tr \(*W-|\(bv\*(Tr .ie n \{\ .ds -- \(*W- .if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch .if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch .ds L" "" .ds R" "" .ds L' ' .ds R' ' 'br\} .el\{\ .ds -- \(em\| .tr \*(Tr .ds L" `` .ds R" '' .ds L' ` .ds R' ' 'br\} .TH TUA 1L "16 November 1991" "Release 3.4" "LOCAL USER COMMANDS" .SH NAME TUA \- The Uucp Analyzer .SH SYNOPSIS .B tua [ option ] .SH NOTE This manual page is no longer supported. See .IR tua.texinfo for up-to-dated information. .SH DESCRIPTION .LP The purpose of the .I TUA utility is to produce a readable and complete analysis of the .IR HoneyDanBer UUCP connections. This manual page describes the .I TUA command line options and shortly explains its output. .SH OPTIONS To specify any of the options, you can use either the short form or the more mnemonic long form. In the latter case, you can abbreviate the name as long as it is unique. For more information on the long format, please refer to the .IR "GNU getopt" package description. .sp 1 .TP 0.5i .B \-S, +no-sys-rep Do not print the .BR "per System report" . The default is to print it out. .TP 0.5i .B \-U, +no-user-rep Do not print the .BR "per User report" . The default is to print it out. .TP 0.5i .B \-D, +no-daily-rep Do not print the .BR "Daily report" . The default is to print it out. .TP 0.5i .B \-C, +command-lists Show also the command lists. It is off by default because it makes .I TUA very hungry of memory. .TP 0.5i .BI "\-O, +only-system " SYSTEM Consider just system .I SYSTEM in the reports. You can specify more than one of this option, so you can have .I TUA consider just those systems. .TP 0.5i .B \-m, +no-monthly-act Do not output the last 12 months activity summary. .TP 0.5i .B \-h, +no-history Do not output the history at the end of the reports. .TP 0.5i .B \-c, +separate-com Separate command lists from the other data. So there will be two tables with the header .I "By System" , the first containing only the amounts and the timing of each transfer, the second with all the commands invoked by each System. You must specify also the .B \-C option to make it works. .TP 0.5i .BI "\-k, +kill-system " SYSTEM Eliminate each reference to .I SYSTEM from the reports. Neither the transfer table nor the .I SYSTEM command list will be printed. .TP 0.5i .BI "\-K, +kill-user " USER Like .B \-k , but it applies to the user called .I USER . .TP 0.5i .B \-H, +update-hist Update the .I history database (see the FILES section below) with the new values. You must have the .B uucp write permission. .TP 0.5i .B \-0, +reset-hist Reset the .I history database, deleting any systems in it. Then put in the database the analysis since the last .I uuclean . You have to specify also .B \-H to make this option do his job. .TP 0.5i .B \-y, +no-hourly-chart Do not display the hourly activity chart. .TP 0.5i .BI "-z, +chart-size " SIZE Set the size of the hourly activity chart to .I SIZE rows. The greater is this number, the smaller is the scale. By default it is set to 10. .TP 0.5i .B \-o, +chart-only Display only the hourly activity chart. Since with this options .I TUA reads only .BR .Admin/xferstats , it is faster. .TP 0.5i .B \-v, +verbose Print, on standard error, what is going on. While .I TUA reads the various logs, it displays a counter of the loaded lines. .TP 0.5i .BI "\-p, +prefix-path " PATH By default, .I TUA looks for uucp data in .BR "/usr/spool/uucp/" and in the relative subdirectory. For debugging purpose, this option lets you change this directory, so that .I TUA looks for the data in the specified .I PATH. Below this point .I TUA needs a hierarchy like the standard one (see FILES below). .TP 0.5i .BI "\-u, +user-alias " USER=ALIAS Inserts ALIAS as the new name for USER. Where ever appears USER it will be replaced with ALIAS. Since this occurs at the lowest level, if happens that ALIAS is another user name, this will cause that all the data that belongs to USER will be added to the ALIAS user. .TP 0.5i .BI "\-r, +port-alias " PORT=ALIAS Like .B \-u , but it applies to the serial port names. This can be useful on those OS where a single serial port has two names, one for normal use and the other with modem control (eg. .BR tty1a and .BR tty1A ). .TP 0.5i .BI "\-s, +sys-alias " SYS=ALIAS Like .B \-u , but it applies to the systems names. .TP 0.5i .BI "\-E, +glob-user-alias " GLOB=ALIAS .TP 0.5i .BI "\-R, +glob-port-alias " GLOB=ALIAS .TP 0.5i .BI "\-M, +glob-sys-alias " GLOB=ALIAS These are the counterpart respectively of .B \-u , .B \-r and .B \-s with .BR meta-characters searches. You can use for example .nf tua +glob-user-alias uu*=UUCPUSERS .fi and every user name that begins with .B "uu" will be mapped in a meta user called .B "UUCPUSERS" \. See the manual page for .I sh(1) for a description of .BR meta-characters \. .TP 0.5i .B \-i, +help Show a summary and a description of all the options. .SH OUTPUT All reports are printed on the standard output, so you can easily redirect them wherever you want. Assuming, unless otherwise stated, that you do not explicity request to disable some of the reports (eg. when you do not specify any command line option), here is a short description of what you get. .Sh "By System" With this report, you get all the information relative to all the nodes that talk with your machine but those which didn't sent or received something. The data are divided in .I inbound and .I outbound. For each system, displayed in alphabetical order, you have the total count of the files transferred, with the relative bytes and times, as well as an average transfer rate (ATP). If .B \+commands-lists was specified, next there is the list of the commands invoked by that node, or directed to it. If a command is preceeded by a number between brackets, that number indicates how many times that command was invoked. .Sh "By User" This report is similar to the previous one, but it shows, in alphabetical order for each local user, all the commands the user invoked, and the transfers he caused. .Sh "By Day" This report summarize the per day activity on the local machine. It doesn't depend on the destinations and on the users. .Sh "SUMMARY by System" It shows a summary of the activity of each system, and the number of calls (inbound and outbound) for it. Please note that sometimes .I TUA fails in calculating the exact number of calls, because of the misleading log of uucico. Note also that the "total connection time" always differs from the sum of the trasmissions times, because it takes care also of the various uucp dead time. In fact, it is calculated from the difference between the time in which the nodes are really connected (ie. at the end of dial phase, when the modem answers) and the time in which the link is dropped, due to the the end of the conversation as well as to any error. Then comes the time of the last connection with that system. There is also the subdivision of the connection time based on the phone costs, ie "day", "evening", "night". This is completely configurable, so if your telephone company uses a different hourly division you can adjust it (see .BR config.h and .BR phonesw.c .) .Sh "SUMMARY by System (table format)" Substancially, this report summarizes some of the previous informations in a tabular form. Nothing new... .Sh "and since ..." This is the historical data maintained by .I TUA. It looks like the previous table, but it includes the history of the system, incrementally. .Sh "Last 12 Months Activity" This table shows the activity of the local machine during the last 12 months. Only the transferred amounts are computed. .br The months are displayed in a manner so that the last column contains the current one, so it is very readable (of course, it is a matter of opinions!) .Sh "Hourly Activity (per communication port)" This chart shows the uucp hourly load for each used communication port. Each hour is divided in 20 minutes slices. .Sh "Global Hourly Activity" The same as the previous chart, but it reports the sums of all the ports. .SH HISTORY .I TUA maintains a database with the history of each system and of the activity in each of the last 12 months activities. It is usually located in .BR /usr/spool/uucp/.Admin/tua.history and it is actually an ASCII file. It is up to you to update it or not, because probably you will like to run .I TUA simply to have a notion of what is going on. To make it working correctly, you have to run .I TUA with the option .BR +update-hist just before you run uuclean. So probably you will have to modify that script including in it a line like .nf tua +update-hist {whatever options you like} | mail lele .fi before it cleans up the uucp logs. .SH BUGS Since HDB\-Uucp doesn't put a complete datestamp in its logs, but omits the year, it may be possible that .IR TUA fails to compute the various times in the first analysis of the year. This is in my opinion its major weakness. For this silliness, .IR TUA cannot correctly handle logs that cover several years. There is little that I can do to correct the situation; I tried to adjust the year when the to\-be\-parsed date refers obviously to the previous year, but this is just a work\-around... .PP There is a limit: if your system spent more than 9999 hours linked with someone (or the sum exceed that value), the reports will be garbaged... .SH DISCLAIMER .I TUA is .BR free , and it is redistribuitable under the terms of the GNU General Public License. You can find a copy of it in the file .BR COPYING in the distribution package. I reject any responsability about it. It is simple and safe, but I did not try it under all the possible conditions and environments, so if it causes you some trouble, I'll be sad for a while, but that's it. However, I will try to correct any bugs you will tell me. .PP And .BR please, forgive my poor english, but I put my soul in it... .SH AUTHOR Lele Gaifas, Idea Informatica, Rovereto (TN) - Italy .br ( piggy@idea.sublink.org ) .SH FILES .../.Log/uucico/* uucico's logs .../.Log/uucp/* uucp's logs .../.Log/uux/* uux's logs .../.Log/uuxqt/* uuxqt's logs .../.Admin/xferstat Transfer stats .../.Admin/tua.history TUA's system history .SH BUGS REPORT TO Lele Gaifas, piggy@idea.sublink.org .SH ACKNOLEDGMENT I want to thank expecially Marco Lorenzini (marlor@gear.sublink.org) for his help in debugging the previous releases of .I TUA on the SCO Unix architecture, and for his suggestions on the layout of the reports. And to the "omnipresent" Paolo Ventafridda (venta@i2ack.sublink.org) for his support and interest, and several other people that encouraged me to add more and more functionality, or that let me scan their huge logs. .br Thanks also to all the people that, with their PD or GPL software, helped me indirectly with ideas or examples. tua-4.3.orig/doc/tua.texinfo0100644000175100001440000015027006111146600014365 0ustar mdusers\input texinfo @c -*- texinfo -*- @c %**start of header @setfilename tua.info @settitle @sc{tua} - The Uucp Analyzer @syncodeindex fn cp @paragraphindent 2 @c %**end of header @ifinfo This file documents @sc{tua}, The Uucp Analyzer, a tool that analyze the BNU Uucp connections of your machine. Copyright @copyright{} 1991,96 Emanuele Gaifas. This is the the first edition of this manual in Texinfo and replaces the previous document in NROFF text format. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies. @ignore Permission is granted to process this file through TeX and print the results, provided the printed document carries copying permission notice identical to this one except for the removal of this paragraph (this paragraph not being relevant to the printed manual). @end ignore Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one. Permission is granted to copy and distribute translations of this manual into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by the Foundation. @end ifinfo @setchapternewpage on @titlepage @title TUA @subtitle The Uucp Analyzer @subtitle Edition 1.02, for @sc{tua} Version 4.3 @subtitle February 1996 @author by Lele Gaifax @page @vskip 0pt plus 1filll Copyright @copyright{} 1991,96 Emanuele Gaifas @sp 2 This is the First Edition of the @sc{tua} documentation in Texinfo, and covers @sc{tua} version 4.2. @sp 2 Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies. Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one. Permission is granted to copy and distribute translations of this manual into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by the Foundation. @end titlepage @ifinfo @node top, Copying, (dir), (dir) @top @sc{tua} - The Uucp Analyzer @sc{tua} is a tool that extract as much info as it can from the logs produced by the various BNU Uucp programs, and build a complete report of what is going on with your links. @end ifinfo @menu * Copying:: @sc{tua} Copying Conditions * Overview:: Overview of @sc{tua} * Options:: Descriptions of all the Options * Output:: Detailed explanation of what you will see * History:: How @sc{tua} maintains the historical data * TCL:: TCL Interface * GNU General Public License:: * Bugs:: Known deficiencies * Author:: Who wrote it, and why * Acknowledgment:: I wanna thanks... * Disclaimer:: I'm not the guilty * Compilation and Installation:: * Files:: Files used by @sc{tua} * Taylor Uucp Patch:: * Concept Index:: Concept Index --- The Detailed Node Listing --- Detailed report description * By System:: The system per system report * By User:: A report from a per user point of view * Daily:: What happened on Aug, 16th? * Summary by System:: Details on each system * Summary by System (table format):: The same in a tabular form * Since:: The historical report * Last 12 months Activity:: A summary of the last 12 months activity * Hourly Activity:: Charts showing the per port activity TCL Interface * More about TCL:: Where you can get more info * Available TCL commands:: List of the available commands * Adding new TCL commands:: How to add your own commands Available TCL commands * Command List:: List of available TCL commands * Examples:: A sample Initialization Script Bugs * Bugs Report:: Bugs Report Files * HDB Uucp Files:: Files used in HDB mode * Taylor Uucp Files:: Files used in Taylor mode * PCD File:: Phone Category Description * TCL Files:: * NLS Files:: National Language Support files @end menu @node Copying, Overview, top, top @comment node-name, next, previous, up @unnumbered @sc{tua} Copying Conditions @cindex Copying conditions @cindex Conditions for copying @sc{tua} @sc{tua} is @dfn{free}; this means that everyone is free to use it and free to redistribute it on a free basis. It is @sc{not} in the public domain; @sc{tua} is copyrighted and there are restrictions on its distribution, but these restrictions are designed to permit everything that a good cooperating citizen would want to do. What is not allowed is to try to prevent others from further sharing any version of this programs that they might get from you.@refill @xref{GNU General Public License} for more details on the distribution policy. @node Overview, Options, Copying, top @comment node-name, next, previous, up @chapter Overview of @sc{tua} @cindex Overview of @sc{tua} @cindex What @sc{tua} is @sc{tua} is @sc{not} simply a ``Yet Another Uucp Analyzer'': its purpose is to produce a readable and complete analysis of the @cite{UUCP} connections. @sc{tua} is able to extract a report from both @cite{HoneyDanBer UUCP}@footnote{Also known as @cite{BNU Uucp} or @cite{HDB Uucp}} and @cite{Taylor Uucp}. @refill The report shows, from several points of view, what exactly is going on at your site. For a detailed description of the output, see @ref{Output}. This is done by reading the various logs UUCP produces@footnote{@file{@dots{}/.Admin/xferstats} and the @file{@dots{}/.Log/} directory hierarchy for HDB Uucp, @file{@dots{}/Stats} and @file{@dots{}/Log} for Taylor Uucp} , as well as @file{@dots{}/tua.history}, that is where @sc{tua} records the historical data. The exact pathnames of these files are defined in the customization file @file{src/customize.h}.@refill @sc{tua} has several command line options that change its behavior, for example to restrict the range of the systems analyzed. For a list of all the options, see @ref{Options}. @sc{tua} 4.0 is backward compatible with the previous released version, @sc{tua} 3.3, at both the command line option level and the format of the @file{tua.history}. If you have compiled in both Taylor Uucp and HDB Uucp support, Taylor Uucp will be the default mode. To specify a different Uucp use the options '--hdb-uucp' or '--taylor-uucp' (this can be changed editing @file{src/customize.h}).@refill @sc{tua} 4.1 and higher may even be configured to print out its messages in whatever national language you want (other than english, of course), taking advantage of the @cite{GNU gettext} package. Actually, only @emph{italian} translation of the messages is provided within the distribution package, but you can very easily add your own. As usual, if you do it, I'll be happy to include your translated @file{.po} files in the distribution, although surely I cannot check their exactness. @node Options, Output, Overview, top @comment node-name, next, previous, up @chapter Command line options @cindex Command line options @cindex Options @cindex Invocation To specify any of the options, you can use either the short form or the more mnemonic long form. In the latter case, you can abbreviate the name as long as it is unique. For more information on the long format, please refer to the @cite{GNU getopt} package description. @table @code @item -a @var{name} @itemx --country @var{name} After option processing, @sc{tua} reads the Phone Categories Definition file (@pxref{PCD File}). This file may contain a default value for your country, near the top of the file. You may however override that value using this option. If the pcd file does not contain a definition for the country you specified (either with --country or with the "default" directive inside the pcd file itself), @sc{tua} will print a message on the standard error stating that it will not print the phone costs in the report.@refill @item --print-country Print the current country information and exit. The definition is printed in the same format you specified it in the PCD file. This is mainly used to check the content of this file. @item --list-countries Print a list of the countries present in the PCD file, and exit. @item -S @itemx --no-system-rep Do not print the "per System report" (@pxref{By System}). The default is to print it out.@refill @item -U @itemx --no-user-rep Do not print the "per User report" (@pxref{By User}). The default is to print it out.@refill @item -D @itemx --no-daily-rep Do not print the "Daily report" (@pxref{Daily}). The default is to print it out. @item -C @itemx --command-lists Show also the command lists. It is off by default because @sc{tua} becomes very hungry of memory since it needs to store in memory all the commands executed. Anyway, it is a nice way to see where is going all those megs of e-mail everyday! @refill @item -O @var{system} @itemx --only-system @var{system} Consider just system @var{system} in the reports. You can specify more than one of this option, so you can have @sc{tua} consider just those systems. @refill @item -m @itemx --no-monthly-act Do not output the last 12 months activity summary. @item -h @itemx --no-history Do not output the history at the end of the reports. @item -c @itemx --separate-command-report Separate command lists from the other data. So there will be two tables with the header "By System" (@pxref{By System}), the first containing only the amounts and the timing of each transfer, the second with all the commands invoked by each System. This option implies @code{--command-lists}. @refill @item -k @var{system} @itemx --kill-system @var{system} Eliminate each reference to @var{system} from the reports. Neither the transfer table nor the @var{system} command list will be printed. @item -K @var{user} @itemx --kill-user @var{user} Like @code{--kill-system}, but it applies to the user called @var{user}. @item -H @itemx --update-history Update the @file{history} database (@pxref{History}) with the new values. Warning: since this option will cause @sc{tua} to write the historical data on your disk, you must have write permission on the history file @file{tua.history}, usually located inside the spool directory of your UUCP. So if @file{tua.history} does not exist, @sc{tua} needs write permission on that directory to create it. @refill @item -0 @itemx --reset-history Reset the history database, thus clearing the non-volatile memory of @sc{tua}. This option must be used with @code{--update-history}. @item -y @itemx --no-hourly-chart Do not display the hourly activity chart. @item -z @var{size} @itemx --chart-size @var{size} Set the size of the hourly activity chart to @var{size} rows. The greater this number is, the smaller is the scale. By default it is set to 10. @item -o @itemx --chart-only Display only the hourly activity chart. Since with this options @sc{tua} reads only the statistical data produced by UUCP@footnote{@file{.Admin/xferstats} for HDB Uucp, @file{Stats} for Taylor Uucp}, it is faster. @refill @item -v @itemx --verbose Print, on standard error, what is going on. While @sc{tua} reads the various logs, it displays a counter of the loaded lines. This option is enabled only specifying -DDEBUG at compile time. @item -p @var{path} @itemx --prefix-path @var{path} By default, @sc{tua} looks for uucp logs in the directory specified in @file{src/customize.h} at compile time. This option lets you change this directory, so that @sc{tua} looks for the data in the specified @var{path}. This is mainly for debugging purposes, but nothing stops you to use it for example to keep your old logs archived somewhere, so that you can examine them whenever you want instead of keeping everything on-line. @refill @item -u @var{user=alias} @itemx --user-alias @var{user=alias} Inserts @var{alias} as the new name for @var{user}. Where ever appears @var{user} it will be replaced with @var{alias}. Since this occurs at the lowest level, if happens that @var{alias} is another user name, this will cause that all the data that belongs to @var{user} will be added to the @var{alias} user. In this way you can create groups of users: for example you may want a report on your development stuff as a whole.@refill @example $ tua --user-alias piggy=lele --user-alias gnu=lele @end example This will merge data from users @var{piggy} and @var{gnu} with that of user @var{lele}. @item -r @var{port=alias} @itemx --port-alias @var{port=alias} Like @code{--user-alias}, but it applies to the serial port names. This can be useful on those OS where a single serial port has two names, one for normal use and the other with modem control (eg. @samp{tty1a} and @samp{tty1A}).@refill @item -s @var{sys=alias} @itemx --system-alias @var{sys=alias} Like @code{--user-alias}, but it applies to the systems names. @item -E @var{glob=alias} @itemx --glob-user-alias @var{glob=alias} @itemx -R @var{glob=alias} @itemx --glob-port-alias @var{glob=alias} @itemx -M @var{glob=alias} @itemx --glob-system-alias @var{glob=alias} These are the counterpart respectively of @code{--user-alias}, @code{--port-alias} and @code{--system-alias} with @samp{meta-characters} searches. You can use for example @refill @example tua --glob-user-alias uu*=UUCPUSERS @end example and every user name that begins with @samp{uu} will be mapped in a meta user called @samp{UUCPUSERS}. See the manual page for @code{bash(1)} or @code{wildmat(3)}, distribuited in the @file{doc} directory of the distribution package, for a description of @samp{meta-characters}.@refill @item -t @itemx --no-tua-rc When the TCL extensions (@pxref{TCL}) are enabled, @sc{tua} loads a TCL script upon startup. This option prevents this to occur. @item -T @var{filename} @itemx --rc-file @var{filename} Specify an alternate initializing TCL script, ie @sc{tua} will load @var{filename} at startup instead of the standard @file{TUA_init.tcl}. @item -I @itemx --interactive Enter in interactive mode. After @sc{tua} finished to collect the data it needs, it will prompt you for TCL commands, in particular those that print some report. @xref{Command List}.@refill @item -V @itemx --version Print just the version, without any further processing. @item -i @itemx --help Show a summary and a description of all the options. @item -Y @itemx --taylor-uucp This option is available only if @sc{tua} was compiled with both TAYLOR_UUCP and HDB_UUCP defined. It forces @sc{tua} to read the Taylor UUCP logs, the default behaviour. @item -B @itemx --hdb-uucp This option is available only if @sc{tua} was compiled with both TAYLOR_UUCP and HDB_UUCP defined. It forces @sc{tua} to read the HDB Uucp logs. It will digest Taylor Uucp logs in HDB mode too, but this feature is not completely tested yet. @end table If international support has been compiled in, @sc{tua} will use the environment variable @var{LANG} if any to select the national language used in the report. The only national language supported as of release 4.1 is @emph{italian}. You are invited to send me translations of the messages for other languages, I will add them for the next release. Consult @file{ABOUT-NLS} in the distribution package for other details on how do it. @node Output, History, Options, top @comment node-name, next, previous, up @chapter Detailed report description @cindex Output The generated report is divided in several section, and it is printed on the standard output, so you can easily redirect it wherever you like. Assuming, unless otherwise stated, that you do not explicitly request to disable some of the reports (eg. when you do not specify any command line option), here is a short description of what you get. @menu * By System:: The system per system report * By User:: A report from a per user point of view * Daily:: What happened on Aug, 16th? * Summary by System:: Details on each system * Summary by System (table format):: The same in a tabular form * Since:: The historical report * Last 12 months Activity:: A summary of the last 12 months activity * Hourly Activity:: Charts showing the per port activity @end menu @node By System, By User, Output, Output @comment node-name, next, previous, up @section By System Section With this report, you get all the information relative to all the nodes that talk with your machine but those which didn't sent or received something. The data are divided in @samp{inbound} and @samp{outbound}. For each system, displayed in alphabetical order, you have the total count of the files transferred, with the relative bytes and times, as well as an average transfer rate (ATP). If @code{--commands-lists} was specified, next there is the list of the commands invoked by that node, or directed to it. If a command is preceded by a number between brackets, that number indicates how many times that command was invoked. @example By System: ========== R E C E I V E D S E N T System Files KBytes Time ATP Files KBytes Time ATP angmar 106 16 0:03:09.30 86 116 381 0:29:07.25 223 argo 4 4 0:00:10.62 419 22 188 0:03:38.30 879 @end example @node By User, Daily, By System, Output @comment node-name, next, previous, up @section By User Section This report is similar to the previous one, but it shows, in alphabetical order for each local user, all the commands the user invoked, and the transfers he caused. @example By User: ======== S E N T User Files KBytes Time gnu 18 13 0:00:24.99 news 118 2585 0:54:33.65 @end example @node Daily, Summary by System, By User, Output @comment node-name, next, previous, up @section Daily Section @cindex Daily Activity This report summarize the per day activity on the local machine. It doesn't depend on the destinations and on the users. As for the By System section, this table contains @example By Day: ======= Date R E C E I V E D S E N T Mo/Dy Files KBytes Time Files KBytes Time 01/20 14 20 0:00:45.25 20 205 0:05:02.68 01/21 104 1511 0:32:36.31 67 715 0:18:41.43 01/22 134 1145 0:26:12.08 102 638 0:20:51.58 @end example @node Summary by System, Summary by System (table format), Daily, Output @comment node-name, next, previous, up @section Summary by System @cindex Summary by System (Verbose) @cindex Per System Summary It shows a summary of the activity of each system, and the number of calls (inbound and outbound) for it. Please note that sometimes @sc{tua} fails in calculating the exact number of calls, because of the misleading log of HDB uucico. Note also that the "total connection time" always differs from the sum of the transmissions times, because it takes care also of the various uucp dead time. In fact, it is calculated from the difference between the time in which the nodes are really connected (ie. at the end of dial phase, when the modem answers) and the time in which the link is dropped, due to the end of the conversation as well as to any error. @footnote{In some cases it may even be smaller than the sum. This is currently a bug, not a feature.} @sc{tua} specifies the amount of this time paid by the two connected systems. The subdivision in timebands of the connection time is currently approximated, ie it is merely the sum of the pure file transfer times, as reported in @file{xferstats} if reading HDB logs, or in @file{Stats} with Taylor logs. So the various dead time, such as the login phase, inter-file delays and so on are not included. It is possible to customize the timeband divisions and names, by changing an external file. See @ref{PCD File} for details. Then comes the time of the last connection with that system. Finally, the total number of connections, a count of failed (i.e. that did not reach even the dial phase) and stopped (i.e. interrupted in the middle of the transfer, for any reason) calls. @example SUMMARY by System: ================== itnnext4: Received 148594425 (2177 Files) in 24:09:34.61: 1708 cps Sent 5986874 ( 105 Files) in 0:56:16.32: 1773 cps Received 142607551 bytes more than sent. The system has been connected for 26:05:03.00 (3.8% of dead time) of which 18:04:44.00 ( 69.3%) are payed by the local system and 8:00:19.00 ( 30.7%) by this system. Spent 0:12:23.72 ( 0.8%, 12934 Lit) in Peak Time 2:47:52.38 ( 11.1%, 108890 Lit) in Normal Time 4:07:32.35 ( 16.4%, 99680 Lit) in Evening Time 17:58:02.47 ( 71.6%, 349635 Lit) in Night Time Last connection: 13 Jul 1993 - 15:53:01 There have been 168 calls (with an average of 2 Ok/day): 139 OK ( 34 IN, 105 OUT, 7 STOPPED) 22 FAILED @end example @node Summary by System (table format), Since, Summary by System, Output @comment node-name, next, previous, up @section Summary by System - Table Format @cindex Summary by System (Table format) @cindex Per System Tabled Summary Substancially, this report summarizes some of the previous information in a tabular form. Nothing new@dots{} @example +--------+--------------------------+--------------------------+----+ | | R E C E I V E D | S E N T | | | SYSTEM | KiloBytes: Time :Files| KiloBytes: Time :Files| ATP| +--------+----------:---------:-----+----------:---------:-----+----| |angmar | 16: 0:03:09: 106| 381: 0:29:07: 116| 209| |argo | 4: 0:00:10: 4| 188: 0:03:38: 22| 858| |gear | 9: 0:00:35: 8| 1826: 0:37:00: 88| 832| |ideahb | 2: 0:00:03: 2| 1: 0:00:00: 2| 703| |itnsg1 | 5084: 1:46:14: 246| 22: 0:00:20: 90| 817| |lpds | 1: 0:00:03: 2| 616: 0:12:20: 13| 848| |otello | 132: 0:04:04: 48| 30: 0:00:33: 36| 600| |usixth | 0: 0:00:00: 0| 587: 0:12:20: 50| 811| +--------+----------:---------:-----+----------:---------:-----+----| | TOTALS | 5248: 1:54:21: 416| 3651: 1:35:21: 417|####| +--------+----------:---------:-----+----------:---------:-----+----| @end example @node Since, Last 12 months Activity, Summary by System (table format), Output @comment node-name, next, previous, up @section Historical data - Since@dots{} @cindex Since@dots{} @cindex Historical data This is the historical data maintained by @sc{tua}. It looks like the previous table, but it includes the history of the system, incrementally since the last @samp{history reset} operation. @example ...and since Fri Oct 11 01:26:02 1991 +--------+--------------------------+--------------------------+----+ | | R E C E I V E D | S E N T | | | SYSTEM | KiloBytes: Time :Files| KiloBytes: Time :Files| ATP| +--------+----------:---------:-----+----------:---------:-----+----| |angmar | 75: 0:12:52: 396| 2146: 2:44:11: 679| 214| |argo | 46: 0:02:21: 60| 2566: 0:50:48: 280| 838| |gear | 596: 0:13:56: 29| 18279: 6:11:05: 735| 836| |ideahb | 4937: 1:25:53: 259| 16974: 3:20:11: 141|1307| |itnsg1 | 58552: 20:00:30: 2063| 172: 0:02:53: 388| 832| |lpds | 8: 0:00:37: 18| 3341: 1:37:02: 131| 585| |otello | 1812: 1:02:23: 938| 1176: 0:23:33: 577| 593| |usixth | 0: 0:00:00: 0| 587: 0:12:20: 50| 811| +--------+----------:---------:-----+----------:---------:-----+----| | TOTALS | 66025: 22:58:35: 3763| 45241: 15:22:06: 2981|####| +--------+----------:---------:-----+----------:---------:-----+----| @end example @node Last 12 months Activity, Hourly Activity, Since, Output @comment node-name, next, previous, up @section Last 12 months Activity @cindex Last 12 months Activity @cindex Summary of the last year Activity This table shows the activity of the local machine during the last 12 months. Only the transferred amounts are computed. The months are displayed in a manner so that the last column contains the current one, so it is very readable (of course, it is a matter of opinions!) @example Last 12 Months Activity ======================= ------+---+---+---+---+---+---+---+---+-----+-----+-----+----- System|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep| Oct | Nov | Dic | Jan ------+---+---+---+---+---+---+---+---+-----+-----+-----+----- angmar|***|***|***|***|***|***|***|***| *** | 381K| 932K| 907K argo |***|***|***|***|***|***|***|***| 193K| 486K|1552K| 380K gear |***|***|***|***|***|***|***|***|2599K|3241K|6223K|6813K ideahb|***|***|***|***|***|***|***|***|9201K|6460K|5893K| 356K itnsg1|***|***|***|***|***|***|***|***|6852K| 16M| 15M| 20M lpds |***|***|***|***|***|***|***|***| *** |1251 | 836K|2511K otello|***|***|***|***|***|***|***|***| 480K| 924K| 947K| 637K usixth|***|***|***|***|***|***|***|***| *** | *** | *** | 587K ------+---+---+---+---+---+---+---+---+-----+-----+-----+----- TOTALS|***|***|***|***|***|***|***|***| 19M| 28M| 32M| 32M ------+---+---+---+---+---+---+---+---+-----+-----+-----+----- @end example @node Hourly Activity, , Last 12 months Activity, Output @comment node-name, next, previous, up @section Hourly Activity @cindex Hourly Activity @cindex Communication port Activity @b{NOTE:} Taylor Uucp 1.04 needs a patch to print the name of the port used for the connection in the @file{Stats} logfile. See @ref{Taylor Uucp Patch} for details. These charts shows the uucp hourly load for each used communication port. Each hour is divided in 20 minutes slices. The final one is the sums of all the preceding, i.e. it displays the uucp load of the machine. @example Hourly Activity (on a 20 minutes basis) on tty00 ====================================================== Max Value : 2217788 bytes Scale : '#'= 221779 bytes # ## ## # ## # ## # ## # ## # # ## # # ### # ## ### # # ### ======================================================================== 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 @end example @node History, TCL, Output, top @comment node-name, next, previous, up @chapter History @cindex History @cindex Historical data @sc{tua} maintains a database with the history of each system and of the activity in each of the last 12 months activities. It is usually located in @file{@dots{}/tua.history} and it is actually an ASCII file. It is up to you to update it or not, because probably most of the time you will like to run @sc{tua} simply to have a notion of what is going on. To make it working correctly, you have to run @sc{tua} with the option @code{--update-history} just before you run uuclean. So probably you will have to modify that script including in it a line like @example $ tua --update-history [whatever options you like] | mail lele @end example before it cleans up the uucp logs. There is a commented header at the top of that file that explains its content. There is no needs for you to view and/or modify it, since everything is made by @sc{tua}, but I can understand your curiosity!. @node TCL, GNU General Public License, History, top @comment node-name, next, previous, up @chapter TCL Interface @cindex Configuring @sc{tua} with TCL @cindex Runtime configuration with TCL @dfn{TCL} means ``Tool Command Language'', and it was designed by John Ousterhout@footnote{His e-mail address is ouster@@sprite.berkeley.edu} to make it easier to add an embedded command language to the programs that need this feature. This chapter talks about the relationship between @sc{tua} and TCL. You need TCL version 6.1 or higher, and compile @sc{tua} with the option @code{USE_TCL} in order to get these functionalities. Using this facility, you can configure @sc{tua} at runtime. Currently this is just a different way to specify command line options (@pxref{Options}), but adding others of them is very simple. @sc{tua}, at startup just before beginning to parse the input files, look for a TCL script (see the content of the macro @var{TUA_INIT_SCRIPT}, defined in @file{src/customize.h} for exact pathname. I set it to @file{TUA_init.tcl} by default). If its name does not begin with a slash ``/'', it is considered relative to the library directory, usually @file{/usr/local/lib}. @sc{tua} doesn't really need TCL, but I wanted to give it a try, to learn what TCL can be useful for. I cannot really think of a good use for @sc{tua}; for this reason, I do not plan to spend time on this functionality. But if you have good examples of how (and why ;-) use this feature, please let me know! However, I think that eventually a large site, with many more users and links than mine, could use profitably this feature, first of all the alias-related commands. The following sections explain what you can do, and how to add other TCL command to @sc{tua}. @menu * More about TCL:: Where you can get more info * Available TCL commands:: List of the available commands * Adding new TCL commands:: How to add your own commands @end menu @node More about TCL, Available TCL commands, TCL, TCL @comment node-name, next, previous, up @section More information about TCL @cindex Getting TCL @cindex TCL Mailing List You can obtain a copy of TCL by @code{ftp} from @cite{sprite.berkeley.edu}. In its distribution package, you can found several documents that provide both an introduction to the language and a technical reference of it. There is a dedicated and very trafficated newsgroup on @cite{USENET}: @b{comp.lang.tcl}. There is also a mailing list that collects the people interested with TCL. Send a request to @code{tcl-request@@sprite.berkeley.edu} to join in. @node Available TCL commands, Adding new TCL commands, More about TCL, TCL @comment node-name, next, previous, up @section Available TCL commands @menu * Command List:: List of available TCL commands * Examples:: A sample Initialization Script @end menu @node Command List, Examples, Available TCL commands, Available TCL commands @comment node-name, next, previous, up @subsection List of the TCL commands @cindex Available TCL commands @deffn {TCL Command} kill_user username The user @var{username} will never appear in the report. @end deffn @deffn {TCL Command} user_alias username alias Insert @var{alias} as the new name for the user @var{username}. @end deffn @deffn {TCL Command} glob_user_alias username alias Insert @var{alias} as the new name for the group of users whose name matches @var{username}. @var{username} may contains ``meta-characters'', with rules very similar to those supported by the @code{shell}. @end deffn @deffn {TCL Command} kill_sys sysname The system @var{sysname} will never appear in the report. @end deffn @deffn {TCL Command} sys_alias sysname alias Insert @var{alias} as the new name for the system @var{sysname}. @end deffn @deffn {TCL Command} glob_sys_alias sysname alias Insert @var{alias} as the new name for the group of systems whose name matches @var{sysname}. @end deffn @deffn {TCL Command} kill_port portname The communication port @var{portname} will never appear in the report. @end deffn @deffn {TCL Command} port_alias username alias Insert @var{alias} as the new name for the communication port @var{portname}. @end deffn @deffn {TCL Command} glob_port_alias username alias Insert @var{alias} as the new name for the group of ports whose name matches @var{portname}. @end deffn @deffn {TCL Command} do_option optionname Simulates the invocation of @sc{tua} with the option @var{--optionname}, that needs to a long option name. Currently with this command you can specify just those option that doesn't need any further argument, because it doesn't do any parsing on the @var{optionname} passed as the argument. @end deffn @deffn {TCL Command} interactive Enter in interactive mode. @sc{tua} will prompt you for some TCL commands, and it will print the result on @emph{stdout}, unless any redirection of the standard output was specified on the command line. @end deffn @deffn {TCL Command} systems_report Prints out the Per System Report; @xref{By System}. @end deffn @deffn {TCL Command} users_report Prints out the Per User Report; @xref{By User}. @end deffn @deffn {TCL Command} daily_report Prints out the Daily Activity; @xref{Daily}. @end deffn @deffn {TCL Command} system_summary Prints out the Per System Summary; @xref{Summary by System}. @end deffn @deffn {TCL Command} system_summary_table Prints out the Tabled System Summary; @xref{Summary by System (table format)}. @end deffn @node Examples, , Command List, Available TCL commands @comment node-name, next, previous, up @subsection A sample Initialization Script @cindex @file{TUA_init.tcl} example What follows is just an example of what you can put in your @file{TUA_init.tcl}. @example @include ../lib/TUA_init.ex @end example @node Adding new TCL commands, , Available TCL commands, TCL @comment node-name, next, previous, up @section Adding new TCL commands @cindex New TCL Commands Embedding a new TCL command into @sc{tua} is a simple operation, once you know how TCL works, and this is not the scope of this manual. In few words, you must build a function that accepts four parameter from the calling TCL command and performs some operation on them, and returns a status to TCL, tipically @var{TCL_OK} when it ends correctly, or @var{TCL_ERROR} to signal an incorrect situation. The called C function gets its arguments in the same way the function @code{main} in a C program accepts arguments from the invoking environment, i.e. with two variables, generally called @var{argc} and @var{argv}, where the former carries the number of arguments passed, the latter is an array of pointer to char containing, one per slot, the arguments. This is possible since TCL supports just one data type: @code{string}, that is a null-terminated array of chars, like in C. Once you have this function, you must tell TCL its name and address, invoking the TCL command @code{Tcl_CreateCommand}. Look at the table in @file{tcl_supp.c}, and add and appropriate entry for your function. You can see examples of this operation in @file{useralias.c}, @file{portalias.c}, @file{sysalias.c}, @file{tua.c}@dots{}, i.e. in every C source file that create a new TCL command. Please refer to the TCL manual pages for further information about the language and its interface with C. @node GNU General Public License, Bugs, TCL, top @comment node-name, next, previous, up @appendix GNU General Public License @include gpl.texinfo @node Bugs, Author, GNU General Public License, top @comment node-name, next, previous, up @appendix Bugs @cindex Known deficiencies @cindex Bugs Since @samp{BNU} Uucp doesn't put a complete datestamp in its logs, but omits the year, it may be possible that @sc{tua} fails to compute the various times in the first analysis of the year. This is in my opinion its major weakness. For this silliness, @sc{tua} cannot correctly handle logs that cover several years. There is little that I can do to correct the situation; I tried to adjust the year when the to-be-parsed date refers obviously to the previous year, but this is just a work\-around@dots{}. If this is serious for you, I suggest switching to Taylor Uucp. @samp{BNU} logs get garbaged sometime, for a reason that is unknown to me. This may cause @sc{tua} to fails. This is the second weakness: eventually I'll try to implement a better parser in a future release. It should recognise this situation and print out a log, indicating where exacly the error occured. If this happens, you have to find out the garbage inside your logs, and eliminate it. If compiled with the ``-DDEBUG'' flag, @sc{tua} may help you a little givinig it the flag ``--verbose''. There is a limit: if your system spent more than 9999 hours linked with someone (or the sum exceed that value), the reports will be garbaged@dots{} Ohhh well@dots{} @menu * Bugs Report:: Bugs Report @end menu @node Bugs Report, , Bugs, Bugs @comment node-name, next, previous, up @appendixsec Bugs Report @cindex How to send a Bug Report @cindex Reporting a Bug @cindex Bug Report If you have any problem building or using @sc{tua}, please do not hesitate to contact me as lele@@eclipse.it. Give it a try, and feel free to modify it. The only thing I ask you is to send me all your enhancements, or bug fixes, so I can include them in some future releases. @sc{please} if you can resist, and I know you can, do not post or spread yourself patches without e-mailing me a copy. I do not receive all @sc{usenet} groups, and it'd be difficult for me to collect them. Include in your message (suggestions, bug reports, patches, flames@dots{}), as usual, the machine and OS type you are using, so I can eventually customize @sc{tua} for your environment. @node Author, Acknowledgment, Bugs, top @comment node-name, next, previous, up @appendix Author @cindex Author @cindex Who wrote it and why Lele Gaifax, Rovereto (TN) - Italy lele@@eclipse.it I developed it because the other analyzers I looked at didn't satisfy my needs. So I picked up their best features, and put all that stuff together. I had a lot of fun doing it, and I learnt even more. I used @code{nroff} for the first manual page, and then @code{Texinfo} for this one: this forced me to compile @TeX{} on my old machine, @code{GCC} since the native compiler wasn't able to do it, and to find a @code{dvilj} for my silly LJ compatible laser printer; @code{Bison} for the first approach to parse the date inside the @code{uucico} logs; @code{TCL} as a configuration tool; @code{GDB} to debug the binary tree management@dots{} And yes, I know that supporting @code{TCL}, @code{ReadLine}, @code{SoftChip Btree} is of no use for the larger part of you out there, but this is an interesting way to learn from other's sources. With a few changes to @file{src/customize.h} and maybe @file{Makefile} you can exclude these experiments. I took care of portability and correctness (I hope ;-). I wrote the preceeding versions on PC clones, running derivatives of Un*x System V. Then I grew up, bought a wonderful NeXTStation, where I have everything I need: @code{GNU Emacs}, @code{GCC}, @code{GDB}, @TeX{} and @code{dvips} are there since the Big Bang. I added @code{Taylor Uucp}, restarted the development there and, at last, @sc{tua} run on a BSD system (at least mine!). @ifinfo BTW, ``@sc{tua}'' in italian means ``yours'': ``questa cosa e' @sc{tua}'' can be @end ifinfo @tex BTW, ``@sc{tua}'' in italian means ``yours'': ``questa cosa \'e @sc{tua}'' can be @end tex translated with "this stuff is yours". So even in the name this package reflects the spirit which inspired me in writing it. I chose to cover @sc{tua} with the GNU General Public License right to protect this intention. @node Acknowledgment, Disclaimer, Author, top @comment node-name, next, previous, up @appendix Acknowledgement @cindex Acknowledgement @cindex Thanks I want to thank especially Marco Lorenzini (marlor@@gear.sublink.org) for his help in debugging the previous releases of @sc{tua} on the SCO Unix architecture, and for his suggestions on the layout of the reports. To Paolo Ventafridda (venta@@i2ack.sublink.org) for his support and interest, and several other people that encouraged me to add more and more functionality, or that let me scan their huge logs. John Plate (plate@@infotek.dk) convinced me to complete the Taylor Uucp support, and also helped me with suggestion and feedback. Michel Cerdini (cerdini@@zen.gatelink.fr.net) contributed several nice ideas, like cost support in the PCD file. Eberhard W. Lisse (el@@lisse.na) tested @sc{tua} on Linux@dots{} @dots{}And many others, who sent me logs, ideas, flowers@dots{} Thanks also to all the people that, with their PD or GPL software, helped me indirectly with ideas or examples. @node Disclaimer, Compilation and Installation, Acknowledgment, top @comment node-name, next, previous, up @appendix Disclaimer I reject any responsibility about this program. It is simple and safe; unless you explicity give the option to update the history database @sc{tua} doesn't write anything on your disks. I did not try it under all the possible conditions and environments, so if it causes you some trouble, I'll be sad for a while, but that's it. However, I will try to correct any bug you will tell me. And @emph{please}, forgive my poor english, but I put my soul in it@dots{} @node Compilation and Installation, Files, Disclaimer, top @comment node-name, next, previous, up @appendix How to compile and install @sc{tua} @cindex Compilation @cindex Installation @cindex Configuration @cindex Customization To compile @sc{tua}, you must first of all you configure it for your system. This is done semiautomatically by running @code{configure}, a shell script that attempts to guess correct values for various system-dependent variables used during compilation. More info about @code{configure} and its usage can be found in the file @file{INSTALL}. @code{configure} will check your machine and operating system to extract some information, and will update @file{Makefile} and @file{config.h}. When this is done, give a look to the @file{Makefile} and edit it to satisfy your needs, then check and edit @file{src/customize.h} following its directives. This file contains settings that will alter the behaviour of the program: you can decide what kind of @code{UUCP} logs @sc{tua} will read (Taylor Uucp or HDB Uucp, or both), where the various files @sc{tua} accesses live, and so on. A simpler way to change some of these settings is by giving some command-line options to the @code{configure} procedure: @table @code @item --with-glob @itemx --without-glob Enable / Disable the support for the ''glob'' pattern matching: enabling it will let you use a notation similar to that used by @code{bash} to indicate a class of users, or systems. The ''glob'' library is included in the package. @item --with-readline @itemx --without-readline This option cause the TCL support routines to use the GNU Readline library for the interaction with the user, instead of a simpler (and smaller) @code{fgets()}. You can get the GNU ReadLine library from your nearest GNU/FSF archive. @item --with-tcl @itemx --without-tcl Long time ago I was learning @code{TCL}, and I interfaced @code{tua} with it. If you know what @code{TCL} is, you may be interested. If not, surely you don't ;-). This needs @code{TCL} already installed on your machine. @item --with-softchip @itemx --without-softchip The @cite{SoftChip Btree Library} is a freely available balanced trees implementation. @code{tua} internally uses a simple binary trees library, included in the @code{tua} package, that is good enough for me. As for @code{TCL}, I added the support for this library years ago (don't ask: while I was trying the library... I'm a very curious boy ;-); I did not tried it extensively, and I don't know/care if using balanced trees instead of the simpler binary makes @sc{tua} fly... However, if your machine have thousends @code{UUCP} neighbours... @item --enable-taylor @itemx --disable-taylor Include or exclude the compilation and the linkage of the @cite{Taylor Uucp} specific code. The support for it is included by default, but if you are using another UUCP implementation you can reduce (a little) the size of the executable while reducing (a lot) @sc{tua} capabilities... @item --enable-hdb @itemx --disable-hdb @sc{tua} was born to parse @cite{HDB Uucp} logs: at that time I was learning to program in ''C'' on UNIX, working on '286 running Xenix... Now I usually program in ''Objective C'' on NeXTSTEP, working on a NeXTStation, and with @cite{Taylor Uucp}. The support for HDB is there, but is disable by default. If your are not using Taylor Uucp, or configured it in HDB mode, give this option to configure. @end table @sc{tua} 4.1 has been internationalized by using the @cite{GNU gettext} package, and @code{configure} accepts two related options: @table @code @item --with-gnu-gettext Bypass the system @code{catgets} or @code{gettext} to use GNU @code{gettext}. @item --disable-nls Totally disable translation of messages. @end table See @file{ABOUT-NLS} in the distribuition package for other details. Last run the compilation executing @code{make}. @node Files, Taylor Uucp Patch, Compilation and Installation, top @comment node-name, next, previous, up @appendix Files Here is a list of all the files involved in the analisys. Their exact location is defined in @file{src/customize.h}. @menu * HDB Uucp Files:: Files used in HDB mode * Taylor Uucp Files:: Files used in Taylor mode * PCD File:: Phone Category Description * TCL Files:: * NLS Files:: National Language Support files @end menu @node HDB Uucp Files, Taylor Uucp Files, Files, Files @comment node-name, next, previous, up @appendixsec HDB Uucp Files Files @sc{tua} reads when in HDB mode. The default prefix directory is @file{/usr/spool/uucp}. @table @file @item @dots{}/.Log/uucico/* Directory that contains uucico's logs @item @dots{}/.Log/uucp/* Directory that contains uucp's logs @item @dots{}/.Log/uux/* Directory that contains uux's logs @item @dots{}/.Log/uuxqt/* Directory that contains uuxqt's logs @item @dots{}/.Admin/xferstat File containing transfer stats @item @dots{}/.Admin/tua.history This file contains the history maintened by @sc{tua}. @item @dots{}/TUA_init.tcl This file is usually located in the library directory @file{/usr/local/lib} and if exists it gets loaded at startup by @sc{tua}. It may contain a TCL script used for customize some behavior of the program. @end table @node Taylor Uucp Files, PCD File, HDB Uucp Files, Files @comment node-name, next, previous, up @appendixsec Taylor Uucp Files Files @sc{tua} reads when in Taylor mode. The default prefix directory is @file{/usr/local/spool/uucp}. @table @file @item @dots{}/Log Main Taylor Uucp log file. @item @dots{}/Stats Transfers statistics. @item @dots{}/tua.history This file contains the history maintened by @sc{tua}. @end table @node PCD File, TCL Files, Taylor Uucp Files, Files @comment node-name, next, previous, up @appendixsec PCD File: Phone Categories configuration @cindex Phone Categories @cindex PCD File @cindex country configuration In order to subdivide the time your system spends talking at the phone in each of cost rates used in your country, @sc{tua} needs a table of how your telephone company rates your calls at some time in the day. To make it simpler than in previous versions, now @sc{tua} is able to read this information from an external file, using the @b{Phone Categories Definition Language}. In this language, spaces, tabs, new lines are ignored, as well as the comments, introduced by a pound sign @key{#} thru the following end of line. This file contains, at its beginning, the default name of the country, likely the name of your country. The statement that do this is ``@code{default = "}@var{your_country_name}@code{"}''. Each country is defined in a way similar to the following example: @example # ITALY - Pizza & Spaghetti country country "italy" = @{ currency = "Lit"; decimals = 0; # Do not print fractions of Lits # COSTS: # - assuming that 1 unit costs 127 Lit... # - timings are for distances > 120km name PEAK = "Orario di Punta"; # 8:30am to 1pm cost PEAK = 127,127/13.1; # 1 unit for the call, then one # every 13.1sec name NORMAL = "Orario Diurno"; # 8am to 8:30am, 1pm to 6:30pm cost NORMAL = 127,127/20; name EVENING = "Orario Serale"; # 6:30pm to 10pm cost EVENING = 127,127/32; name NIGHT = "Orario Notturno"; # 10pm to 8 am cost NIGHT = 127,127/40; monday-friday = @{ rate PEAK = 8:31-13:00; rate NORMAL = 8:01-8:30, 13:01-18:30; rate EVENING = 18:31-22:00; rate NIGHT = 22:01-08:00; # sc for 22:01-24:00, 0:01-8:00 @}; saturday = @{ rate NORMAL = 08:01-13:00; rate EVENING = 13:01-22:00; rate NIGHT = 22:01-08:00; @}; sunday = @{ rate EVENING = 8:01-22:00; rate NIGHT = 22:01-08:00; @}; @} @end example You write the names of your timebands, and then, day by day, specify the bands themself. You can abbreviate the names of the days to the first three letters. A timeband is defined as a list of comma separated ranges in the form of @code{H1:M1-H2:M2}, like "18:00-22:00". You can use the form "22:00-08:00" with the same meaning of the longer "22:00-24:00, 0:00-08:00". The format ``HH.MM'', with a point as separator instead of the colon, is accepted as well. To set the country's currency name use the statement @example currency = "Lit"; @end example You may specify with how many decimal digits @sc{tua} will print money amounts: @example decimals = 4; @end example It is possible to assign a @i{cost} to each timeband with a statement like @example cost HIGH = 123.2/60.3; @end example that means you will pay 123.2 units of @var{currency} every 60.3 seconds. @sc{tua}, and UUCP as well, knows nothing about different kind of calls, i.e. long-distance vs. intercontinental etc. For this reason, whatever cost you will set, the final amount will be an approximation, unless all your calls are of a single type. If your telephone company applies a fixed cost for the call, thus ignoring the time it takes, use the simpler form @example cost LOW = 127; @end example to mean that in the ``LOW'' band each call costs @emph{127}. More probably, the cost will be a mix of the two: a fixed amount for the call, then another quid calculated on the time the call takes to terminate. In this case the form to use is @example cost MEDIUM = 254,127/66; @end example to specify a fixed cost of 254, applied to all calls, plus a cost of 127 per unit of time of 66 seconds (or less: a 10-secs-long call costs one unit). This file is located inside your local library directory, usually @file{/usr/local/lib}, and named @file{TUA.pcd}. @node TCL Files, NLS Files, PCD File, Files @comment node-name, next, previous, up @appendixsec TCL Initialization file @cindex TCL When @sc{tua} is configured to support TCL, you may create a file called @file{TUA_init.tcl} in the library directory (usually @file{/usr/local/lib}). This file, if exists, gets loaded at startup by @sc{tua}, and may contain a TCL script used for customize some behavior of the program. @xref{Examples}. @node NLS Files, , TCL Files, Files @comment node-name, next, previous, up @appendixsec National Language Support files @cindex Internationalization Files @sc{tua} accesses when NLS is needed. @table @file @item @dots{}/@var{LANG}/LC_MESSAGES/TUA.mo Where @var{LANG} is the selected national language, contains the translations of all the messages @sc{tua} will put in the generated reports. @end table @node Taylor Uucp Patch, Concept Index, Files, top @comment node-name, next, previous, up @appendix Taylor Uucp Patch @cindex Patch for Taylor Uucp If you are using Taylor Uucp version 1.04 and want the Hourly Activity Chart, you have to patch its source, adding the port name in each line of the @file{Stats} log file. @refill @sc{tua} automatically recognize patched logs, and will produce the chart without any other intervention by you. @refill Here below is the patch you may want apply. To simplify your work, I included it in @file{src/taylor/TaylorLogsPatch.diff} in the @sc{tua} package. To install it, go to the Taylor Uucp source directory and execute the command ``@code{patch < @dots{}/taylor/TaylorLogsPatch.diff}'', where the dots represent the name of the directory where you keep @sc{tua} sources. @refill Taylor Uucp 1.05 and greater do not need this patch. @example @include ../src/taylor/TaylorLogsPatch.diff @end example @node Concept Index, , Taylor Uucp Patch, top @comment node-name, next, previous, up @unnumbered Concept and Function Index @printindex cp @contents @bye tua-4.3.orig/doc/wildmat.30100644000175100001440000000365605506060423013735 0ustar mdusers.TH WILDMAT 3 .SH NAME wildmat \- perform shell-style wildcard matching .SH SYNOPSIS .nf .B "int" .B "wildmat(text, pattern)" .B " char *text;" .B " char *pattern;" .fi .SH DESCRIPTION .I Wildmat compares the .I text against the .I pattern and returns non-zero if the pattern matches the text. The pattern is interpreted similar to shell filename wildcards, and not as a full regular expression such as those handled by the .IR grep (1) family of programs or the .IR regex (3) or .IR regexp (3) set of routines. .PP The pattern is interpreted according to the following rules: .TP .BI \e x Turns off the special meaning of .I x and matches it directly; this is used mostly before a question mark or asterisk, and is not valid inside square brackets. .TP .B ? Matches any single character. .TP .B * Matches any sequence of zero or more characters. .TP .BI [ x...y ] Matches any single character specified by the set .IR x...y , where any character other than minus sign or close bracket may appear in the set. A minus sign may be used to indicate a range of characters. That is, .I [0\-5abc] is a shorthand for .IR [012345abc] . More than one range may appear inside a character set; .I [0-9a-zA-Z._] matches almost all of the legal characters for a host name. .TP .BI [^ x...y ] This matches any character .I not in the set .IR x...y , which is interpreted as described above. .SH "BUGS" There is no way to specify a minus sign in a character range. .SH HISTORY Written by Rich $alz in 1986, and posted to Usenet several times since then, most notably in comp.sources.misc in March, 1991. .PP Lars Mathiesen enhanced the multi-asterisk failure mode in early 1991. .PP Rich and Lars increased the efficiency of star patterns and reposted it to comp.sources.misc in April, 1991. .PP .de R$ This is revision \\$3, dated \\$4. .. .R$ Id: wildmat.3,v 1.4 91/03/25 17:17:19 rsalz Exp .SH "SEE ALSO" grep(1), regex(3), regexp(3).