home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso
/
misc
/
volume44
/
rocat
/
part05
< prev
next >
Wrap
Internet Message Format
|
1994-08-01
|
98KB
From: shaw@stortek.stortek.com (Greg Shaw)
Newsgroups: comp.sources.misc
Subject: v44i005: rocat - Roman Catacombs BBS System v.0.75, Part05/09
Date: 1 Aug 1994 12:08:56 -0500
Organization: Sterling Software
Sender: kent@sparky.sterling.com
Approved: kent@sparky.sterling.com
Message-ID: <31ja78$b0r@sparky.sterling.com>
X-Md4-Signature: 803814ac49b73f1a436370d8f0e9bfbc
Submitted-by: shaw@stortek.stortek.com (Greg Shaw)
Posting-number: Volume 44, Issue 5
Archive-name: rocat/part05
Environment: Linux, GNU C++/libg++
#! /bin/sh
# This is a shell archive. Remove anything before this line, then feed it
# into a shell via "sh file" or similar. To overwrite existing files,
# type "sh file -c".
# Contents: rocat-0.75/examples/menus/logoff rocat-0.75/src/COPYING
# rocat-0.75/src/Makefile.orig rocat-0.75/src/bbsinfo.C
# rocat-0.75/src/dllist.C rocat-0.75/src/fileutil.C
# Wrapped by kent@sparky on Mon Jul 11 22:22:52 1994
PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin:$PATH ; export PATH
echo If this archive is complete, you will see the following message:
echo ' "shar: End of archive 5 (of 9)."'
if test -f 'rocat-0.75/examples/menus/logoff' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'rocat-0.75/examples/menus/logoff'\"
else
echo shar: Extracting \"'rocat-0.75/examples/menus/logoff'\" \(1195 characters\)
sed "s/^X//" >'rocat-0.75/examples/menus/logoff' <<'END_OF_FILE'
X0||||||| Roman Catacombs Street Level
X0||||||| ---------------------------------------------------------------------------
X0|||||||
X0||||||| Exit
X0|||||||
X0||||||| <N>
X0||||||| ----------------------------
X0||||||| B>BS List
X0||||||| I>nformation about BBS
X0|||||||
X0|||||||
X0|||||||
X0||||||| ----------------------------
X0||||||| <S>
X0|||||||
X0||||||| Entry Vault
X0|||||||
X0||||||| ---------------------------------------------------------------------------
X0||||||| <-> Previous Menu <F> Feedback to SysOp <G> Quick Logout
X1|g||||||
X3|-||||||
X1|n|||||logoff|
X10|i|||||bbsinfo|
X10|b|||||bbslist|
X3|s|||||main|
X21|f|||||elm -s feedback shaw|
X2|h|||||helptop|
END_OF_FILE
if test 1195 -ne `wc -c <'rocat-0.75/examples/menus/logoff'`; then
echo shar: \"'rocat-0.75/examples/menus/logoff'\" unpacked with wrong size!
fi
# end of 'rocat-0.75/examples/menus/logoff'
fi
if test -f 'rocat-0.75/src/COPYING' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'rocat-0.75/src/COPYING'\"
else
echo shar: Extracting \"'rocat-0.75/src/COPYING'\" \(17982 characters\)
sed "s/^X//" >'rocat-0.75/src/COPYING' <<'END_OF_FILE'
X GNU GENERAL PUBLIC LICENSE
X Version 2, June 1991
X
X Copyright (C) 1989, 1991 Free Software Foundation, Inc.
X 675 Mass Ave, Cambridge, MA 02139, USA
X Everyone is permitted to copy and distribute verbatim copies
X of this license document, but changing it is not allowed.
X
X Preamble
X
X The licenses for most software are designed to take away your
Xfreedom to share and change it. By contrast, the GNU General Public
XLicense is intended to guarantee your freedom to share and change free
Xsoftware--to make sure the software is free for all its users. This
XGeneral Public License applies to most of the Free Software
XFoundation's software and to any other program whose authors commit to
Xusing it. (Some other Free Software Foundation software is covered by
Xthe GNU Library General Public License instead.) You can apply it to
Xyour programs, too.
X
X When we speak of free software, we are referring to freedom, not
Xprice. Our General Public Licenses are designed to make sure that you
Xhave the freedom to distribute copies of free software (and charge for
Xthis service if you wish), that you receive source code or can get it
Xif you want it, that you can change the software or use pieces of it
Xin new free programs; and that you know you can do these things.
X
X To protect your rights, we need to make restrictions that forbid
Xanyone to deny you these rights or to ask you to surrender the rights.
XThese restrictions translate to certain responsibilities for you if you
Xdistribute copies of the software, or if you modify it.
X
X For example, if you distribute copies of such a program, whether
Xgratis or for a fee, you must give the recipients all the rights that
Xyou have. You must make sure that they, too, receive or can get the
Xsource code. And you must show them these terms so they know their
Xrights.
X
X We protect your rights with two steps: (1) copyright the software, and
X(2) offer you this license which gives you legal permission to copy,
Xdistribute and/or modify the software.
X
X Also, for each author's protection and ours, we want to make certain
Xthat everyone understands that there is no warranty for this free
Xsoftware. If the software is modified by someone else and passed on, we
Xwant its recipients to know that what they have is not the original, so
Xthat any problems introduced by others will not reflect on the original
Xauthors' reputations.
X
X Finally, any free program is threatened constantly by software
Xpatents. We wish to avoid the danger that redistributors of a free
Xprogram will individually obtain patent licenses, in effect making the
Xprogram proprietary. To prevent this, we have made it clear that any
Xpatent must be licensed for everyone's free use or not licensed at all.
X
X The precise terms and conditions for copying, distribution and
Xmodification follow.
X
X GNU GENERAL PUBLIC LICENSE
X TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
X
X 0. This License applies to any program or other work which contains
Xa notice placed by the copyright holder saying it may be distributed
Xunder the terms of this General Public License. The "Program", below,
Xrefers to any such program or work, and a "work based on the Program"
Xmeans either the Program or any derivative work under copyright law:
Xthat is to say, a work containing the Program or a portion of it,
Xeither verbatim or with modifications and/or translated into another
Xlanguage. (Hereinafter, translation is included without limitation in
Xthe term "modification".) Each licensee is addressed as "you".
X
XActivities other than copying, distribution and modification are not
Xcovered by this License; they are outside its scope. The act of
Xrunning the Program is not restricted, and the output from the Program
Xis covered only if its contents constitute a work based on the
XProgram (independent of having been made by running the Program).
XWhether that is true depends on what the Program does.
X
X 1. You may copy and distribute verbatim copies of the Program's
Xsource code as you receive it, in any medium, provided that you
Xconspicuously and appropriately publish on each copy an appropriate
Xcopyright notice and disclaimer of warranty; keep intact all the
Xnotices that refer to this License and to the absence of any warranty;
Xand give any other recipients of the Program a copy of this License
Xalong with the Program.
X
XYou may charge a fee for the physical act of transferring a copy, and
Xyou may at your option offer warranty protection in exchange for a fee.
X
X 2. You may modify your copy or copies of the Program or any portion
Xof it, thus forming a work based on the Program, and copy and
Xdistribute such modifications or work under the terms of Section 1
Xabove, provided that you also meet all of these conditions:
X
X a) You must cause the modified files to carry prominent notices
X stating that you changed the files and the date of any change.
X
X b) You must cause any work that you distribute or publish, that in
X whole or in part contains or is derived from the Program or any
X part thereof, to be licensed as a whole at no charge to all third
X parties under the terms of this License.
X
X c) If the modified program normally reads commands interactively
X when run, you must cause it, when started running for such
X interactive use in the most ordinary way, to print or display an
X announcement including an appropriate copyright notice and a
X notice that there is no warranty (or else, saying that you provide
X a warranty) and that users may redistribute the program under
X these conditions, and telling the user how to view a copy of this
X License. (Exception: if the Program itself is interactive but
X does not normally print such an announcement, your work based on
X the Program is not required to print an announcement.)
X
XThese requirements apply to the modified work as a whole. If
Xidentifiable sections of that work are not derived from the Program,
Xand can be reasonably considered independent and separate works in
Xthemselves, then this License, and its terms, do not apply to those
Xsections when you distribute them as separate works. But when you
Xdistribute the same sections as part of a whole which is a work based
Xon the Program, the distribution of the whole must be on the terms of
Xthis License, whose permissions for other licensees extend to the
Xentire whole, and thus to each and every part regardless of who wrote it.
X
XThus, it is not the intent of this section to claim rights or contest
Xyour rights to work written entirely by you; rather, the intent is to
Xexercise the right to control the distribution of derivative or
Xcollective works based on the Program.
X
XIn addition, mere aggregation of another work not based on the Program
Xwith the Program (or with a work based on the Program) on a volume of
Xa storage or distribution medium does not bring the other work under
Xthe scope of this License.
X
X 3. You may copy and distribute the Program (or a work based on it,
Xunder Section 2) in object code or executable form under the terms of
XSections 1 and 2 above provided that you also do one of the following:
X
X a) Accompany it with the complete corresponding machine-readable
X source code, which must be distributed under the terms of Sections
X 1 and 2 above on a medium customarily used for software interchange; or,
X
X b) Accompany it with a written offer, valid for at least three
X years, to give any third party, for a charge no more than your
X cost of physically performing source distribution, a complete
X machine-readable copy of the corresponding source code, to be
X distributed under the terms of Sections 1 and 2 above on a medium
X customarily used for software interchange; or,
X
X c) Accompany it with the information you received as to the offer
X to distribute corresponding source code. (This alternative is
X allowed only for noncommercial distribution and only if you
X received the program in object code or executable form with such
X an offer, in accord with Subsection b above.)
X
XThe source code for a work means the preferred form of the work for
Xmaking modifications to it. For an executable work, complete source
Xcode means all the source code for all modules it contains, plus any
Xassociated interface definition files, plus the scripts used to
Xcontrol compilation and installation of the executable. However, as a
Xspecial exception, the source code distributed need not include
Xanything that is normally distributed (in either source or binary
Xform) with the major components (compiler, kernel, and so on) of the
Xoperating system on which the executable runs, unless that component
Xitself accompanies the executable.
X
XIf distribution of executable or object code is made by offering
Xaccess to copy from a designated place, then offering equivalent
Xaccess to copy the source code from the same place counts as
Xdistribution of the source code, even though third parties are not
Xcompelled to copy the source along with the object code.
X
X 4. You may not copy, modify, sublicense, or distribute the Program
Xexcept as expressly provided under this License. Any attempt
Xotherwise to copy, modify, sublicense or distribute the Program is
Xvoid, and will automatically terminate your rights under this License.
XHowever, parties who have received copies, or rights, from you under
Xthis License will not have their licenses terminated so long as such
Xparties remain in full compliance.
X
X 5. You are not required to accept this License, since you have not
Xsigned it. However, nothing else grants you permission to modify or
Xdistribute the Program or its derivative works. These actions are
Xprohibited by law if you do not accept this License. Therefore, by
Xmodifying or distributing the Program (or any work based on the
XProgram), you indicate your acceptance of this License to do so, and
Xall its terms and conditions for copying, distributing or modifying
Xthe Program or works based on it.
X
X 6. Each time you redistribute the Program (or any work based on the
XProgram), the recipient automatically receives a license from the
Xoriginal licensor to copy, distribute or modify the Program subject to
Xthese terms and conditions. You may not impose any further
Xrestrictions on the recipients' exercise of the rights granted herein.
XYou are not responsible for enforcing compliance by third parties to
Xthis License.
X
X 7. If, as a consequence of a court judgment or allegation of patent
Xinfringement or for any other reason (not limited to patent issues),
Xconditions are imposed on you (whether by court order, agreement or
Xotherwise) that contradict the conditions of this License, they do not
Xexcuse you from the conditions of this License. If you cannot
Xdistribute so as to satisfy simultaneously your obligations under this
XLicense and any other pertinent obligations, then as a consequence you
Xmay not distribute the Program at all. For example, if a patent
Xlicense would not permit royalty-free redistribution of the Program by
Xall those who receive copies directly or indirectly through you, then
Xthe only way you could satisfy both it and this License would be to
Xrefrain entirely from distribution of the Program.
X
XIf any portion of this section is held invalid or unenforceable under
Xany particular circumstance, the balance of the section is intended to
Xapply and the section as a whole is intended to apply in other
Xcircumstances.
X
XIt is not the purpose of this section to induce you to infringe any
Xpatents or other property right claims or to contest validity of any
Xsuch claims; this section has the sole purpose of protecting the
Xintegrity of the free software distribution system, which is
Ximplemented by public license practices. Many people have made
Xgenerous contributions to the wide range of software distributed
Xthrough that system in reliance on consistent application of that
Xsystem; it is up to the author/donor to decide if he or she is willing
Xto distribute software through any other system and a licensee cannot
Ximpose that choice.
X
XThis section is intended to make thoroughly clear what is believed to
Xbe a consequence of the rest of this License.
X
X 8. If the distribution and/or use of the Program is restricted in
Xcertain countries either by patents or by copyrighted interfaces, the
Xoriginal copyright holder who places the Program under this License
Xmay add an explicit geographical distribution limitation excluding
Xthose countries, so that distribution is permitted only in or among
Xcountries not thus excluded. In such case, this License incorporates
Xthe limitation as if written in the body of this License.
X
X 9. The Free Software Foundation may publish revised and/or new versions
Xof the General Public License from time to time. Such new versions will
Xbe similar in spirit to the present version, but may differ in detail to
Xaddress new problems or concerns.
X
XEach version is given a distinguishing version number. If the Program
Xspecifies a version number of this License which applies to it and "any
Xlater version", you have the option of following the terms and conditions
Xeither of that version or of any later version published by the Free
XSoftware Foundation. If the Program does not specify a version number of
Xthis License, you may choose any version ever published by the Free Software
XFoundation.
X
X 10. If you wish to incorporate parts of the Program into other free
Xprograms whose distribution conditions are different, write to the author
Xto ask for permission. For software which is copyrighted by the Free
XSoftware Foundation, write to the Free Software Foundation; we sometimes
Xmake exceptions for this. Our decision will be guided by the two goals
Xof preserving the free status of all derivatives of our free software and
Xof promoting the sharing and reuse of software generally.
X
X NO WARRANTY
X
X 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
XFOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
XOTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
XPROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
XOR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
XMERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
XTO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
XPROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
XREPAIR OR CORRECTION.
X
X 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
XWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
XREDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
XINCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
XOUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
XTO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
XYOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
XPROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
XPOSSIBILITY OF SUCH DAMAGES.
X
X END OF TERMS AND CONDITIONS
X
X Appendix: How to Apply These Terms to Your New Programs
X
X If you develop a new program, and you want it to be of the greatest
Xpossible use to the public, the best way to achieve this is to make it
Xfree software which everyone can redistribute and change under these terms.
X
X To do so, attach the following notices to the program. It is safest
Xto attach them to the start of each source file to most effectively
Xconvey the exclusion of warranty; and each file should have at least
Xthe "copyright" line and a pointer to where the full notice is found.
X
X <one line to give the program's name and a brief idea of what it does.>
X Copyright (C) 19yy <name of author>
X
X This program is free software; you can redistribute it and/or modify
X it under the terms of the GNU General Public License as published by
X the Free Software Foundation; either version 2 of the License, or
X (at your option) any later version.
X
X This program is distributed in the hope that it will be useful,
X but WITHOUT ANY WARRANTY; without even the implied warranty of
X MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
X GNU General Public License for more details.
X
X You should have received a copy of the GNU General Public License
X along with this program; if not, write to the Free Software
X Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X
XAlso add information on how to contact you by electronic and paper mail.
X
XIf the program is interactive, make it output a short notice like this
Xwhen it starts in an interactive mode:
X
X Gnomovision version 69, Copyright (C) 19yy name of author
X Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
X This is free software, and you are welcome to redistribute it
X under certain conditions; type `show c' for details.
X
XThe hypothetical commands `show w' and `show c' should show the appropriate
Xparts of the General Public License. Of course, the commands you use may
Xbe called something other than `show w' and `show c'; they could even be
Xmouse-clicks or menu items--whatever suits your program.
X
XYou should also get your employer (if you work as a programmer) or your
Xschool, if any, to sign a "copyright disclaimer" for the program, if
Xnecessary. Here is a sample; alter the names:
X
X Yoyodyne, Inc., hereby disclaims all copyright interest in the program
X `Gnomovision' (which makes passes at compilers) written by James Hacker.
X
X <signature of Ty Coon>, 1 April 1989
X Ty Coon, President of Vice
X
XThis General Public License does not permit incorporating your program into
Xproprietary programs. If your program is a subroutine library, you may
Xconsider it more useful to permit linking proprietary applications with the
Xlibrary. If this is what you want to do, use the GNU Library General
XPublic License instead of this License.
END_OF_FILE
if test 17982 -ne `wc -c <'rocat-0.75/src/COPYING'`; then
echo shar: \"'rocat-0.75/src/COPYING'\" unpacked with wrong size!
fi
chmod +x 'rocat-0.75/src/COPYING'
# end of 'rocat-0.75/src/COPYING'
fi
if test -f 'rocat-0.75/src/Makefile.orig' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'rocat-0.75/src/Makefile.orig'\"
else
echo shar: Extracting \"'rocat-0.75/src/Makefile.orig'\" \(33621 characters\)
sed "s/^X//" >'rocat-0.75/src/Makefile.orig' <<'END_OF_FILE'
X#
X# Makefile for the rocat BBS System
X# Copyright C 1994 by Gregory Shaw
X#
X# Don't look here! The docs are in the doc directory.
X#
X
XCC=gcc
XCFLAGS= -g -D_POSIX_SOURCE -Wall
XLIBS=-lm
X
X
XHDRS= bbs.h bbsint.h errlog.h menu.h user.h bbshdr.h bbsipc.h filelock.h ports.h bbsinfo.h socket.h sysexec.h
X
X.SUFFIXES: .C .o
X
X.C.o:
X $(CC) -c $(CFLAGS) $<
X
X
X
X
Xall: fileutil
X
Xbackup: clean
X cd ../..;tar cvf /dev/fd0H1440 rocat
X @echo Backup complete!
X
Xbbs: bbs.o user.o bbsint.o bbsipc.o bbsinfo.o errlog.o filelock.o \
X menu.o files.o dllist.o moncon.o sysexec.o
X $(CC) -g -o bbs bbs.o user.o filelock.o bbsint.o bbsipc.o menu.o \
X bbsinfo.o errlog.o dllist.o files.o moncon.o sysexec.o $(LIBS)
X
Xbbsipc: bbsipc.o
X
Xclean:
X rm -f *.o
X rm -f core
X rm -f bbs
X rm -f *test
X rm -f errlogd
X rm -f monitor
X rm -f fileutil
X
Xchsh: chsh.o
X $(CC) -g -o chsh chsh.c
X
Xdepend:
X makedepend *.C
X
Xdltest: dltest.o dllist.o
X $(CC) -o dltest dltest.o dllist.o
X
Xerrlogd: errlogd.o
X $(CC) -c $(CFLAGS) -D_SERVER_ errlogd.C
X $(CC) -c $(CFLAGS) -D_SERVER_ bbsipc.C
X $(CC) -o errlogd errlogd.o bbsipc.o $(LIBS)
X
Xfileutil: files.o dllist.o fileutil.o user.o bbsint.o bbsipc.o bbsinfo.o errlog.o filelock.o menu.o moncon.o sysexec.o
X $(CC) -o fileutil files.o fileutil.o dllist.o user.o filelock.o bbsint.o bbsipc.o menu.o bbsinfo.o errlog.o moncon.o sysexec.o $(LIBS)
X
Xfilesupdate: filesupdate.o
X $(CC) -o filesupdate filesupdate.o
X
Xinstall-manwe: bbs errlogd fileutil monitor
X strip bbs errlogd fileutil monitor
X cp fileutil /bbs/bin
X chmod 775 bbs
X rm -f /bbs/rocat
X cp bbs /bbs/rocat
X chgrp bbs /bbs/rocat
X chmod g+s /bbs/rocat
X chmod 775 monitor
X chgrp bbs monitor
X cp monitor /bbs/bin
X chmod 775 errlogd
X chgrp bbs errlogd
X chmod g+s errlogd
X cp errlogd /bbs/bin
X
Xinstall: bbs errlogd fileutil monitor
X strip bbs errlogd fileutil monitor
X cp fileutil $(BBSDIR)/bin
X chmod 775 bbs
X rm -f $(BBSDIR)/rocat
X cp bbs $(BBSDIR)/rocat
X chgrp bbs $(BBSDIR)/rocat
X chmod g+s $(BBSDIR)/rocat
X chmod 775 monitor
X chgrp bbs monitor
X cp monitor $(BBSDIR)/bin
X chmod 775 errlogd
X chgrp bbs errlogd
X chmod g+s errlogd
X cp errlogd $(BBSDIR)/bin
X
Xmenutest: menutest.o user.o bbsint.o bbsipc.o bbsinfo.o errlog.o filelock.o menu.o
X $(CC) -g -o menutest menutest.o user.o filelock.o bbsint.o bbsipc.o menu.o bbsinfo.o errlog.o $(LIBS)
X
Xmonitor: bbsint.o monitor.o
X $(CC) -c $(CFLAGS) -D_SERVER_ bbsipc.C
X $(CC) -c $(CFLAGS) -D_SERVER_ monitor.C
X $(CC) -g -o monitor monitor.o bbsipc.o $(LIBS)
X
Xtest: test.o user.o bbsint.o bbsipc.o bbsinfo.o errlog.o filelock.o
X $(CC) -g -o test test.o menu.o user.o filelock.o bbsint.o bbsipc.o bbsinfo.o errlog.o $(LIBS)
X
Xtestipc: testipc.o bbsipc
X $(CC) -g -o testipc testipc.o bbsipc.o $(LIBS)
X
Xtestinfo: testinfo.o bbsinfo.o
X $(CC) -g -o testinfo testinfo.o bbsinfo.o $(LIBS)
X
Xuser: user.o bbsint.o
X
Xusertest: usertest.o user.o bbsint.o bbsipc.o bbsinfo.o errlog.o filelock.o
X $(CC) -g -o usertest usertest.o user.o filelock.o bbsint.o bbsipc.o bbsinfo.o errlog.o $(LIBS)
X
X# dependancies
X
X# DO NOT DELETE THIS LINE -- make depend depends on it.
X
Xbbs.o: bbshdr.h /usr/include/stdio.h /usr/include/libio.h
Xbbs.o: /usr/include/sys/cdefs.h /usr/include/ctype.h /usr/include/features.h
Xbbs.o: /usr/include/fcntl.h /usr/include/sys/types.h
Xbbs.o: /usr/include/linux/types.h /usr/include/linux/fcntl.h
Xbbs.o: /usr/include/assert.h /usr/include/termio.h /usr/include/termios.h
Xbbs.o: /usr/include/linux/termios.h /usr/include/string.h
Xbbs.o: /usr/include/limits.h /usr/include/sys/time.h
Xbbs.o: /usr/include/linux/time.h /usr/include/sys/time.h
Xbbs.o: /usr/include/rpc/types.h /usr/include/sys/stat.h
Xbbs.o: /usr/include/linux/stat.h /usr/include/errno.h
Xbbs.o: /usr/include/linux/errno.h /usr/include/signal.h
Xbbs.o: /usr/include/linux/signal.h /usr/include/sys/socket.h
Xbbs.o: /usr/include/linux/socket.h /usr/include/linux/sockios.h
Xbbs.o: /usr/include/stdlib.h /usr/include/sys/wait.h /usr/include/gnu/types.h
Xbbs.o: /usr/include/waitflags.h /usr/include/waitstatus.h
Xbbs.o: /usr/include/netinet/in.h /usr/include/linux/in.h /usr/include/netdb.h
Xbbs.o: /usr/include/paths.h /usr/include/unistd.h /usr/include/posix_opt.h
Xbbs.o: /usr/include/pwd.h /usr/include/dirent.h /usr/include/linux/limits.h
Xbbs.o: /usr/include/linux/dirent.h /usr/include/math.h
Xbbs.o: /usr/include/huge_val.h /usr/include/endian.h /usr/include/bytesex.h
Xbbs.o: /usr/include/values.h bbsipc.h bbsinfo.h ports.h errlog.h filelock.h
Xbbs.o: sysexec.h bbsint.h user.h menu.h bbs.h dllist.h files.h moncon.h
Xbbsinfo.o: bbshdr.h /usr/include/stdio.h /usr/include/libio.h
Xbbsinfo.o: /usr/include/sys/cdefs.h /usr/include/ctype.h
Xbbsinfo.o: /usr/include/features.h /usr/include/fcntl.h
Xbbsinfo.o: /usr/include/sys/types.h /usr/include/linux/types.h
Xbbsinfo.o: /usr/include/linux/fcntl.h /usr/include/assert.h
Xbbsinfo.o: /usr/include/termio.h /usr/include/termios.h
Xbbsinfo.o: /usr/include/linux/termios.h /usr/include/string.h
Xbbsinfo.o: /usr/include/limits.h /usr/include/sys/time.h
Xbbsinfo.o: /usr/include/linux/time.h /usr/include/sys/time.h
Xbbsinfo.o: /usr/include/rpc/types.h /usr/include/sys/stat.h
Xbbsinfo.o: /usr/include/linux/stat.h /usr/include/errno.h
Xbbsinfo.o: /usr/include/linux/errno.h /usr/include/signal.h
Xbbsinfo.o: /usr/include/linux/signal.h /usr/include/sys/socket.h
Xbbsinfo.o: /usr/include/linux/socket.h /usr/include/linux/sockios.h
Xbbsinfo.o: /usr/include/stdlib.h /usr/include/sys/wait.h
Xbbsinfo.o: /usr/include/gnu/types.h /usr/include/waitflags.h
Xbbsinfo.o: /usr/include/waitstatus.h /usr/include/netinet/in.h
Xbbsinfo.o: /usr/include/linux/in.h /usr/include/netdb.h /usr/include/paths.h
Xbbsinfo.o: /usr/include/unistd.h /usr/include/posix_opt.h /usr/include/pwd.h
Xbbsinfo.o: /usr/include/dirent.h /usr/include/linux/limits.h
Xbbsinfo.o: /usr/include/linux/dirent.h /usr/include/math.h
Xbbsinfo.o: /usr/include/huge_val.h /usr/include/endian.h
Xbbsinfo.o: /usr/include/bytesex.h /usr/include/values.h bbsipc.h bbsinfo.h
Xbbsinfo.o: ports.h errlog.h filelock.h sysexec.h bbsint.h user.h menu.h bbs.h
Xbbsinfo.o: dllist.h files.h moncon.h
Xbbsint.o: bbshdr.h /usr/include/stdio.h /usr/include/libio.h
Xbbsint.o: /usr/include/sys/cdefs.h /usr/include/ctype.h
Xbbsint.o: /usr/include/features.h /usr/include/fcntl.h
Xbbsint.o: /usr/include/sys/types.h /usr/include/linux/types.h
Xbbsint.o: /usr/include/linux/fcntl.h /usr/include/assert.h
Xbbsint.o: /usr/include/termio.h /usr/include/termios.h
Xbbsint.o: /usr/include/linux/termios.h /usr/include/string.h
Xbbsint.o: /usr/include/limits.h /usr/include/sys/time.h
Xbbsint.o: /usr/include/linux/time.h /usr/include/sys/time.h
Xbbsint.o: /usr/include/rpc/types.h /usr/include/sys/stat.h
Xbbsint.o: /usr/include/linux/stat.h /usr/include/errno.h
Xbbsint.o: /usr/include/linux/errno.h /usr/include/signal.h
Xbbsint.o: /usr/include/linux/signal.h /usr/include/sys/socket.h
Xbbsint.o: /usr/include/linux/socket.h /usr/include/linux/sockios.h
Xbbsint.o: /usr/include/stdlib.h /usr/include/sys/wait.h
Xbbsint.o: /usr/include/gnu/types.h /usr/include/waitflags.h
Xbbsint.o: /usr/include/waitstatus.h /usr/include/netinet/in.h
Xbbsint.o: /usr/include/linux/in.h /usr/include/netdb.h /usr/include/paths.h
Xbbsint.o: /usr/include/unistd.h /usr/include/posix_opt.h /usr/include/pwd.h
Xbbsint.o: /usr/include/dirent.h /usr/include/linux/limits.h
Xbbsint.o: /usr/include/linux/dirent.h /usr/include/math.h
Xbbsint.o: /usr/include/huge_val.h /usr/include/endian.h
Xbbsint.o: /usr/include/bytesex.h /usr/include/values.h bbsipc.h bbsinfo.h
Xbbsint.o: ports.h errlog.h filelock.h sysexec.h bbsint.h user.h menu.h bbs.h
Xbbsint.o: dllist.h files.h moncon.h
Xbbsipc.o: bbshdr.h /usr/include/stdio.h /usr/include/libio.h
Xbbsipc.o: /usr/include/sys/cdefs.h /usr/include/ctype.h
Xbbsipc.o: /usr/include/features.h /usr/include/fcntl.h
Xbbsipc.o: /usr/include/sys/types.h /usr/include/linux/types.h
Xbbsipc.o: /usr/include/linux/fcntl.h /usr/include/assert.h
Xbbsipc.o: /usr/include/termio.h /usr/include/termios.h
Xbbsipc.o: /usr/include/linux/termios.h /usr/include/string.h
Xbbsipc.o: /usr/include/limits.h /usr/include/sys/time.h
Xbbsipc.o: /usr/include/linux/time.h /usr/include/sys/time.h
Xbbsipc.o: /usr/include/rpc/types.h /usr/include/sys/stat.h
Xbbsipc.o: /usr/include/linux/stat.h /usr/include/errno.h
Xbbsipc.o: /usr/include/linux/errno.h /usr/include/signal.h
Xbbsipc.o: /usr/include/linux/signal.h /usr/include/sys/socket.h
Xbbsipc.o: /usr/include/linux/socket.h /usr/include/linux/sockios.h
Xbbsipc.o: /usr/include/stdlib.h /usr/include/sys/wait.h
Xbbsipc.o: /usr/include/gnu/types.h /usr/include/waitflags.h
Xbbsipc.o: /usr/include/waitstatus.h /usr/include/netinet/in.h
Xbbsipc.o: /usr/include/linux/in.h /usr/include/netdb.h /usr/include/paths.h
Xbbsipc.o: /usr/include/unistd.h /usr/include/posix_opt.h /usr/include/pwd.h
Xbbsipc.o: /usr/include/dirent.h /usr/include/linux/limits.h
Xbbsipc.o: /usr/include/linux/dirent.h /usr/include/math.h
Xbbsipc.o: /usr/include/huge_val.h /usr/include/endian.h
Xbbsipc.o: /usr/include/bytesex.h /usr/include/values.h bbsipc.h bbsinfo.h
Xbbsipc.o: ports.h errlog.h filelock.h sysexec.h bbsint.h user.h menu.h bbs.h
Xbbsipc.o: dllist.h files.h moncon.h
Xdllist.o: bbshdr.h /usr/include/stdio.h /usr/include/libio.h
Xdllist.o: /usr/include/sys/cdefs.h /usr/include/ctype.h
Xdllist.o: /usr/include/features.h /usr/include/fcntl.h
Xdllist.o: /usr/include/sys/types.h /usr/include/linux/types.h
Xdllist.o: /usr/include/linux/fcntl.h /usr/include/assert.h
Xdllist.o: /usr/include/termio.h /usr/include/termios.h
Xdllist.o: /usr/include/linux/termios.h /usr/include/string.h
Xdllist.o: /usr/include/limits.h /usr/include/sys/time.h
Xdllist.o: /usr/include/linux/time.h /usr/include/sys/time.h
Xdllist.o: /usr/include/rpc/types.h /usr/include/sys/stat.h
Xdllist.o: /usr/include/linux/stat.h /usr/include/errno.h
Xdllist.o: /usr/include/linux/errno.h /usr/include/signal.h
Xdllist.o: /usr/include/linux/signal.h /usr/include/sys/socket.h
Xdllist.o: /usr/include/linux/socket.h /usr/include/linux/sockios.h
Xdllist.o: /usr/include/stdlib.h /usr/include/sys/wait.h
Xdllist.o: /usr/include/gnu/types.h /usr/include/waitflags.h
Xdllist.o: /usr/include/waitstatus.h /usr/include/netinet/in.h
Xdllist.o: /usr/include/linux/in.h /usr/include/netdb.h /usr/include/paths.h
Xdllist.o: /usr/include/unistd.h /usr/include/posix_opt.h /usr/include/pwd.h
Xdllist.o: /usr/include/dirent.h /usr/include/linux/limits.h
Xdllist.o: /usr/include/linux/dirent.h /usr/include/math.h
Xdllist.o: /usr/include/huge_val.h /usr/include/endian.h
Xdllist.o: /usr/include/bytesex.h /usr/include/values.h bbsipc.h bbsinfo.h
Xdllist.o: ports.h errlog.h filelock.h sysexec.h bbsint.h user.h menu.h bbs.h
Xdllist.o: dllist.h files.h moncon.h
Xdltest.o: /usr/include/stdio.h /usr/include/libio.h /usr/include/sys/cdefs.h
Xdltest.o: dllist.h bbshdr.h /usr/include/ctype.h /usr/include/features.h
Xdltest.o: /usr/include/fcntl.h /usr/include/sys/types.h
Xdltest.o: /usr/include/linux/types.h /usr/include/linux/fcntl.h
Xdltest.o: /usr/include/assert.h /usr/include/termio.h /usr/include/termios.h
Xdltest.o: /usr/include/linux/termios.h /usr/include/string.h
Xdltest.o: /usr/include/limits.h /usr/include/sys/time.h
Xdltest.o: /usr/include/linux/time.h /usr/include/sys/time.h
Xdltest.o: /usr/include/rpc/types.h /usr/include/sys/stat.h
Xdltest.o: /usr/include/linux/stat.h /usr/include/errno.h
Xdltest.o: /usr/include/linux/errno.h /usr/include/signal.h
Xdltest.o: /usr/include/linux/signal.h /usr/include/sys/socket.h
Xdltest.o: /usr/include/linux/socket.h /usr/include/linux/sockios.h
Xdltest.o: /usr/include/stdlib.h /usr/include/sys/wait.h
Xdltest.o: /usr/include/gnu/types.h /usr/include/waitflags.h
Xdltest.o: /usr/include/waitstatus.h /usr/include/netinet/in.h
Xdltest.o: /usr/include/linux/in.h /usr/include/netdb.h /usr/include/paths.h
Xdltest.o: /usr/include/unistd.h /usr/include/posix_opt.h /usr/include/pwd.h
Xdltest.o: /usr/include/dirent.h /usr/include/linux/limits.h
Xdltest.o: /usr/include/linux/dirent.h /usr/include/math.h
Xdltest.o: /usr/include/huge_val.h /usr/include/endian.h
Xdltest.o: /usr/include/bytesex.h /usr/include/values.h bbsipc.h bbsinfo.h
Xdltest.o: ports.h errlog.h filelock.h sysexec.h bbsint.h user.h menu.h bbs.h
Xdltest.o: files.h moncon.h
Xerrlog.o: bbshdr.h /usr/include/stdio.h /usr/include/libio.h
Xerrlog.o: /usr/include/sys/cdefs.h /usr/include/ctype.h
Xerrlog.o: /usr/include/features.h /usr/include/fcntl.h
Xerrlog.o: /usr/include/sys/types.h /usr/include/linux/types.h
Xerrlog.o: /usr/include/linux/fcntl.h /usr/include/assert.h
Xerrlog.o: /usr/include/termio.h /usr/include/termios.h
Xerrlog.o: /usr/include/linux/termios.h /usr/include/string.h
Xerrlog.o: /usr/include/limits.h /usr/include/sys/time.h
Xerrlog.o: /usr/include/linux/time.h /usr/include/sys/time.h
Xerrlog.o: /usr/include/rpc/types.h /usr/include/sys/stat.h
Xerrlog.o: /usr/include/linux/stat.h /usr/include/errno.h
Xerrlog.o: /usr/include/linux/errno.h /usr/include/signal.h
Xerrlog.o: /usr/include/linux/signal.h /usr/include/sys/socket.h
Xerrlog.o: /usr/include/linux/socket.h /usr/include/linux/sockios.h
Xerrlog.o: /usr/include/stdlib.h /usr/include/sys/wait.h
Xerrlog.o: /usr/include/gnu/types.h /usr/include/waitflags.h
Xerrlog.o: /usr/include/waitstatus.h /usr/include/netinet/in.h
Xerrlog.o: /usr/include/linux/in.h /usr/include/netdb.h /usr/include/paths.h
Xerrlog.o: /usr/include/unistd.h /usr/include/posix_opt.h /usr/include/pwd.h
Xerrlog.o: /usr/include/dirent.h /usr/include/linux/limits.h
Xerrlog.o: /usr/include/linux/dirent.h /usr/include/math.h
Xerrlog.o: /usr/include/huge_val.h /usr/include/endian.h
Xerrlog.o: /usr/include/bytesex.h /usr/include/values.h bbsipc.h bbsinfo.h
Xerrlog.o: ports.h errlog.h filelock.h sysexec.h bbsint.h user.h menu.h bbs.h
Xerrlog.o: dllist.h files.h moncon.h
Xerrlogd.o: bbshdr.h /usr/include/stdio.h /usr/include/libio.h
Xerrlogd.o: /usr/include/sys/cdefs.h /usr/include/ctype.h
Xerrlogd.o: /usr/include/features.h /usr/include/fcntl.h
Xerrlogd.o: /usr/include/sys/types.h /usr/include/linux/types.h
Xerrlogd.o: /usr/include/linux/fcntl.h /usr/include/assert.h
Xerrlogd.o: /usr/include/termio.h /usr/include/termios.h
Xerrlogd.o: /usr/include/linux/termios.h /usr/include/string.h
Xerrlogd.o: /usr/include/limits.h /usr/include/sys/time.h
Xerrlogd.o: /usr/include/linux/time.h /usr/include/sys/time.h
Xerrlogd.o: /usr/include/rpc/types.h /usr/include/sys/stat.h
Xerrlogd.o: /usr/include/linux/stat.h /usr/include/errno.h
Xerrlogd.o: /usr/include/linux/errno.h /usr/include/signal.h
Xerrlogd.o: /usr/include/linux/signal.h /usr/include/sys/socket.h
Xerrlogd.o: /usr/include/linux/socket.h /usr/include/linux/sockios.h
Xerrlogd.o: /usr/include/stdlib.h /usr/include/sys/wait.h
Xerrlogd.o: /usr/include/gnu/types.h /usr/include/waitflags.h
Xerrlogd.o: /usr/include/waitstatus.h /usr/include/netinet/in.h
Xerrlogd.o: /usr/include/linux/in.h /usr/include/netdb.h /usr/include/paths.h
Xerrlogd.o: /usr/include/unistd.h /usr/include/posix_opt.h /usr/include/pwd.h
Xerrlogd.o: /usr/include/dirent.h /usr/include/linux/limits.h
Xerrlogd.o: /usr/include/linux/dirent.h /usr/include/math.h
Xerrlogd.o: /usr/include/huge_val.h /usr/include/endian.h
Xerrlogd.o: /usr/include/bytesex.h /usr/include/values.h bbsipc.h bbsinfo.h
Xerrlogd.o: ports.h errlog.h filelock.h sysexec.h bbsint.h user.h menu.h bbs.h
Xerrlogd.o: dllist.h files.h moncon.h
Xfilelock.o: bbshdr.h /usr/include/stdio.h /usr/include/libio.h
Xfilelock.o: /usr/include/sys/cdefs.h /usr/include/ctype.h
Xfilelock.o: /usr/include/features.h /usr/include/fcntl.h
Xfilelock.o: /usr/include/sys/types.h /usr/include/linux/types.h
Xfilelock.o: /usr/include/linux/fcntl.h /usr/include/assert.h
Xfilelock.o: /usr/include/termio.h /usr/include/termios.h
Xfilelock.o: /usr/include/linux/termios.h /usr/include/string.h
Xfilelock.o: /usr/include/limits.h /usr/include/sys/time.h
Xfilelock.o: /usr/include/linux/time.h /usr/include/sys/time.h
Xfilelock.o: /usr/include/rpc/types.h /usr/include/sys/stat.h
Xfilelock.o: /usr/include/linux/stat.h /usr/include/errno.h
Xfilelock.o: /usr/include/linux/errno.h /usr/include/signal.h
Xfilelock.o: /usr/include/linux/signal.h /usr/include/sys/socket.h
Xfilelock.o: /usr/include/linux/socket.h /usr/include/linux/sockios.h
Xfilelock.o: /usr/include/stdlib.h /usr/include/sys/wait.h
Xfilelock.o: /usr/include/gnu/types.h /usr/include/waitflags.h
Xfilelock.o: /usr/include/waitstatus.h /usr/include/netinet/in.h
Xfilelock.o: /usr/include/linux/in.h /usr/include/netdb.h /usr/include/paths.h
Xfilelock.o: /usr/include/unistd.h /usr/include/posix_opt.h /usr/include/pwd.h
Xfilelock.o: /usr/include/dirent.h /usr/include/linux/limits.h
Xfilelock.o: /usr/include/linux/dirent.h /usr/include/math.h
Xfilelock.o: /usr/include/huge_val.h /usr/include/endian.h
Xfilelock.o: /usr/include/bytesex.h /usr/include/values.h bbsipc.h bbsinfo.h
Xfilelock.o: ports.h errlog.h filelock.h sysexec.h bbsint.h user.h menu.h bbs.h
Xfilelock.o: dllist.h files.h moncon.h
Xfiles.o: bbshdr.h /usr/include/stdio.h /usr/include/libio.h
Xfiles.o: /usr/include/sys/cdefs.h /usr/include/ctype.h
Xfiles.o: /usr/include/features.h /usr/include/fcntl.h
Xfiles.o: /usr/include/sys/types.h /usr/include/linux/types.h
Xfiles.o: /usr/include/linux/fcntl.h /usr/include/assert.h
Xfiles.o: /usr/include/termio.h /usr/include/termios.h
Xfiles.o: /usr/include/linux/termios.h /usr/include/string.h
Xfiles.o: /usr/include/limits.h /usr/include/sys/time.h
Xfiles.o: /usr/include/linux/time.h /usr/include/sys/time.h
Xfiles.o: /usr/include/rpc/types.h /usr/include/sys/stat.h
Xfiles.o: /usr/include/linux/stat.h /usr/include/errno.h
Xfiles.o: /usr/include/linux/errno.h /usr/include/signal.h
Xfiles.o: /usr/include/linux/signal.h /usr/include/sys/socket.h
Xfiles.o: /usr/include/linux/socket.h /usr/include/linux/sockios.h
Xfiles.o: /usr/include/stdlib.h /usr/include/sys/wait.h
Xfiles.o: /usr/include/gnu/types.h /usr/include/waitflags.h
Xfiles.o: /usr/include/waitstatus.h /usr/include/netinet/in.h
Xfiles.o: /usr/include/linux/in.h /usr/include/netdb.h /usr/include/paths.h
Xfiles.o: /usr/include/unistd.h /usr/include/posix_opt.h /usr/include/pwd.h
Xfiles.o: /usr/include/dirent.h /usr/include/linux/limits.h
Xfiles.o: /usr/include/linux/dirent.h /usr/include/math.h
Xfiles.o: /usr/include/huge_val.h /usr/include/endian.h /usr/include/bytesex.h
Xfiles.o: /usr/include/values.h bbsipc.h bbsinfo.h ports.h errlog.h filelock.h
Xfiles.o: sysexec.h bbsint.h user.h menu.h bbs.h dllist.h files.h moncon.h
Xfiletest.o: bbshdr.h /usr/include/stdio.h /usr/include/libio.h
Xfiletest.o: /usr/include/sys/cdefs.h /usr/include/ctype.h
Xfiletest.o: /usr/include/features.h /usr/include/fcntl.h
Xfiletest.o: /usr/include/sys/types.h /usr/include/linux/types.h
Xfiletest.o: /usr/include/linux/fcntl.h /usr/include/assert.h
Xfiletest.o: /usr/include/termio.h /usr/include/termios.h
Xfiletest.o: /usr/include/linux/termios.h /usr/include/string.h
Xfiletest.o: /usr/include/limits.h /usr/include/sys/time.h
Xfiletest.o: /usr/include/linux/time.h /usr/include/sys/time.h
Xfiletest.o: /usr/include/rpc/types.h /usr/include/sys/stat.h
Xfiletest.o: /usr/include/linux/stat.h /usr/include/errno.h
Xfiletest.o: /usr/include/linux/errno.h /usr/include/signal.h
Xfiletest.o: /usr/include/linux/signal.h /usr/include/sys/socket.h
Xfiletest.o: /usr/include/linux/socket.h /usr/include/linux/sockios.h
Xfiletest.o: /usr/include/stdlib.h /usr/include/sys/wait.h
Xfiletest.o: /usr/include/gnu/types.h /usr/include/waitflags.h
Xfiletest.o: /usr/include/waitstatus.h /usr/include/netinet/in.h
Xfiletest.o: /usr/include/linux/in.h /usr/include/netdb.h /usr/include/paths.h
Xfiletest.o: /usr/include/unistd.h /usr/include/posix_opt.h /usr/include/pwd.h
Xfiletest.o: /usr/include/dirent.h /usr/include/linux/limits.h
Xfiletest.o: /usr/include/linux/dirent.h /usr/include/math.h
Xfiletest.o: /usr/include/huge_val.h /usr/include/endian.h
Xfiletest.o: /usr/include/bytesex.h /usr/include/values.h bbsipc.h bbsinfo.h
Xfiletest.o: ports.h errlog.h filelock.h sysexec.h bbsint.h user.h menu.h bbs.h
Xfiletest.o: dllist.h files.h moncon.h
Xfileutil.o: bbshdr.h /usr/include/stdio.h /usr/include/libio.h
Xfileutil.o: /usr/include/sys/cdefs.h /usr/include/ctype.h
Xfileutil.o: /usr/include/features.h /usr/include/fcntl.h
Xfileutil.o: /usr/include/sys/types.h /usr/include/linux/types.h
Xfileutil.o: /usr/include/linux/fcntl.h /usr/include/assert.h
Xfileutil.o: /usr/include/termio.h /usr/include/termios.h
Xfileutil.o: /usr/include/linux/termios.h /usr/include/string.h
Xfileutil.o: /usr/include/limits.h /usr/include/sys/time.h
Xfileutil.o: /usr/include/linux/time.h /usr/include/sys/time.h
Xfileutil.o: /usr/include/rpc/types.h /usr/include/sys/stat.h
Xfileutil.o: /usr/include/linux/stat.h /usr/include/errno.h
Xfileutil.o: /usr/include/linux/errno.h /usr/include/signal.h
Xfileutil.o: /usr/include/linux/signal.h /usr/include/sys/socket.h
Xfileutil.o: /usr/include/linux/socket.h /usr/include/linux/sockios.h
Xfileutil.o: /usr/include/stdlib.h /usr/include/sys/wait.h
Xfileutil.o: /usr/include/gnu/types.h /usr/include/waitflags.h
Xfileutil.o: /usr/include/waitstatus.h /usr/include/netinet/in.h
Xfileutil.o: /usr/include/linux/in.h /usr/include/netdb.h /usr/include/paths.h
Xfileutil.o: /usr/include/unistd.h /usr/include/posix_opt.h /usr/include/pwd.h
Xfileutil.o: /usr/include/dirent.h /usr/include/linux/limits.h
Xfileutil.o: /usr/include/linux/dirent.h /usr/include/math.h
Xfileutil.o: /usr/include/huge_val.h /usr/include/endian.h
Xfileutil.o: /usr/include/bytesex.h /usr/include/values.h bbsipc.h bbsinfo.h
Xfileutil.o: ports.h errlog.h filelock.h sysexec.h bbsint.h user.h menu.h bbs.h
Xfileutil.o: dllist.h files.h moncon.h fileutil.h
Xmenu.o: bbshdr.h /usr/include/stdio.h /usr/include/libio.h
Xmenu.o: /usr/include/sys/cdefs.h /usr/include/ctype.h /usr/include/features.h
Xmenu.o: /usr/include/fcntl.h /usr/include/sys/types.h
Xmenu.o: /usr/include/linux/types.h /usr/include/linux/fcntl.h
Xmenu.o: /usr/include/assert.h /usr/include/termio.h /usr/include/termios.h
Xmenu.o: /usr/include/linux/termios.h /usr/include/string.h
Xmenu.o: /usr/include/limits.h /usr/include/sys/time.h
Xmenu.o: /usr/include/linux/time.h /usr/include/sys/time.h
Xmenu.o: /usr/include/rpc/types.h /usr/include/sys/stat.h
Xmenu.o: /usr/include/linux/stat.h /usr/include/errno.h
Xmenu.o: /usr/include/linux/errno.h /usr/include/signal.h
Xmenu.o: /usr/include/linux/signal.h /usr/include/sys/socket.h
Xmenu.o: /usr/include/linux/socket.h /usr/include/linux/sockios.h
Xmenu.o: /usr/include/stdlib.h /usr/include/sys/wait.h
Xmenu.o: /usr/include/gnu/types.h /usr/include/waitflags.h
Xmenu.o: /usr/include/waitstatus.h /usr/include/netinet/in.h
Xmenu.o: /usr/include/linux/in.h /usr/include/netdb.h /usr/include/paths.h
Xmenu.o: /usr/include/unistd.h /usr/include/posix_opt.h /usr/include/pwd.h
Xmenu.o: /usr/include/dirent.h /usr/include/linux/limits.h
Xmenu.o: /usr/include/linux/dirent.h /usr/include/math.h
Xmenu.o: /usr/include/huge_val.h /usr/include/endian.h /usr/include/bytesex.h
Xmenu.o: /usr/include/values.h bbsipc.h bbsinfo.h ports.h errlog.h filelock.h
Xmenu.o: sysexec.h bbsint.h user.h menu.h bbs.h dllist.h files.h moncon.h
Xmenutest.o: /usr/include/stdio.h /usr/include/libio.h
Xmenutest.o: /usr/include/sys/cdefs.h bbshdr.h /usr/include/ctype.h
Xmenutest.o: /usr/include/features.h /usr/include/fcntl.h
Xmenutest.o: /usr/include/sys/types.h /usr/include/linux/types.h
Xmenutest.o: /usr/include/linux/fcntl.h /usr/include/assert.h
Xmenutest.o: /usr/include/termio.h /usr/include/termios.h
Xmenutest.o: /usr/include/linux/termios.h /usr/include/string.h
Xmenutest.o: /usr/include/limits.h /usr/include/sys/time.h
Xmenutest.o: /usr/include/linux/time.h /usr/include/sys/time.h
Xmenutest.o: /usr/include/rpc/types.h /usr/include/sys/stat.h
Xmenutest.o: /usr/include/linux/stat.h /usr/include/errno.h
Xmenutest.o: /usr/include/linux/errno.h /usr/include/signal.h
Xmenutest.o: /usr/include/linux/signal.h /usr/include/sys/socket.h
Xmenutest.o: /usr/include/linux/socket.h /usr/include/linux/sockios.h
Xmenutest.o: /usr/include/stdlib.h /usr/include/sys/wait.h
Xmenutest.o: /usr/include/gnu/types.h /usr/include/waitflags.h
Xmenutest.o: /usr/include/waitstatus.h /usr/include/netinet/in.h
Xmenutest.o: /usr/include/linux/in.h /usr/include/netdb.h /usr/include/paths.h
Xmenutest.o: /usr/include/unistd.h /usr/include/posix_opt.h /usr/include/pwd.h
Xmenutest.o: /usr/include/dirent.h /usr/include/linux/limits.h
Xmenutest.o: /usr/include/linux/dirent.h /usr/include/math.h
Xmenutest.o: /usr/include/huge_val.h /usr/include/endian.h
Xmenutest.o: /usr/include/bytesex.h /usr/include/values.h bbsipc.h bbsinfo.h
Xmenutest.o: ports.h errlog.h filelock.h sysexec.h bbsint.h user.h menu.h bbs.h
Xmenutest.o: dllist.h files.h moncon.h
Xmoncon.o: bbshdr.h /usr/include/stdio.h /usr/include/libio.h
Xmoncon.o: /usr/include/sys/cdefs.h /usr/include/ctype.h
Xmoncon.o: /usr/include/features.h /usr/include/fcntl.h
Xmoncon.o: /usr/include/sys/types.h /usr/include/linux/types.h
Xmoncon.o: /usr/include/linux/fcntl.h /usr/include/assert.h
Xmoncon.o: /usr/include/termio.h /usr/include/termios.h
Xmoncon.o: /usr/include/linux/termios.h /usr/include/string.h
Xmoncon.o: /usr/include/limits.h /usr/include/sys/time.h
Xmoncon.o: /usr/include/linux/time.h /usr/include/sys/time.h
Xmoncon.o: /usr/include/rpc/types.h /usr/include/sys/stat.h
Xmoncon.o: /usr/include/linux/stat.h /usr/include/errno.h
Xmoncon.o: /usr/include/linux/errno.h /usr/include/signal.h
Xmoncon.o: /usr/include/linux/signal.h /usr/include/sys/socket.h
Xmoncon.o: /usr/include/linux/socket.h /usr/include/linux/sockios.h
Xmoncon.o: /usr/include/stdlib.h /usr/include/sys/wait.h
Xmoncon.o: /usr/include/gnu/types.h /usr/include/waitflags.h
Xmoncon.o: /usr/include/waitstatus.h /usr/include/netinet/in.h
Xmoncon.o: /usr/include/linux/in.h /usr/include/netdb.h /usr/include/paths.h
Xmoncon.o: /usr/include/unistd.h /usr/include/posix_opt.h /usr/include/pwd.h
Xmoncon.o: /usr/include/dirent.h /usr/include/linux/limits.h
Xmoncon.o: /usr/include/linux/dirent.h /usr/include/math.h
Xmoncon.o: /usr/include/huge_val.h /usr/include/endian.h
Xmoncon.o: /usr/include/bytesex.h /usr/include/values.h bbsipc.h bbsinfo.h
Xmoncon.o: ports.h errlog.h filelock.h sysexec.h bbsint.h user.h menu.h bbs.h
Xmoncon.o: dllist.h files.h moncon.h
Xmonitor.o: bbshdr.h /usr/include/stdio.h /usr/include/libio.h
Xmonitor.o: /usr/include/sys/cdefs.h /usr/include/ctype.h
Xmonitor.o: /usr/include/features.h /usr/include/fcntl.h
Xmonitor.o: /usr/include/sys/types.h /usr/include/linux/types.h
Xmonitor.o: /usr/include/linux/fcntl.h /usr/include/assert.h
Xmonitor.o: /usr/include/termio.h /usr/include/termios.h
Xmonitor.o: /usr/include/linux/termios.h /usr/include/string.h
Xmonitor.o: /usr/include/limits.h /usr/include/sys/time.h
Xmonitor.o: /usr/include/linux/time.h /usr/include/sys/time.h
Xmonitor.o: /usr/include/rpc/types.h /usr/include/sys/stat.h
Xmonitor.o: /usr/include/linux/stat.h /usr/include/errno.h
Xmonitor.o: /usr/include/linux/errno.h /usr/include/signal.h
Xmonitor.o: /usr/include/linux/signal.h /usr/include/sys/socket.h
Xmonitor.o: /usr/include/linux/socket.h /usr/include/linux/sockios.h
Xmonitor.o: /usr/include/stdlib.h /usr/include/sys/wait.h
Xmonitor.o: /usr/include/gnu/types.h /usr/include/waitflags.h
Xmonitor.o: /usr/include/waitstatus.h /usr/include/netinet/in.h
Xmonitor.o: /usr/include/linux/in.h /usr/include/netdb.h /usr/include/paths.h
Xmonitor.o: /usr/include/unistd.h /usr/include/posix_opt.h /usr/include/pwd.h
Xmonitor.o: /usr/include/dirent.h /usr/include/linux/limits.h
Xmonitor.o: /usr/include/linux/dirent.h /usr/include/math.h
Xmonitor.o: /usr/include/huge_val.h /usr/include/endian.h
Xmonitor.o: /usr/include/bytesex.h /usr/include/values.h bbsipc.h bbsinfo.h
Xmonitor.o: ports.h errlog.h filelock.h sysexec.h bbsint.h user.h menu.h bbs.h
Xmonitor.o: dllist.h files.h moncon.h
Xtestinfo.o: bbshdr.h /usr/include/stdio.h /usr/include/libio.h
Xtestinfo.o: /usr/include/sys/cdefs.h /usr/include/ctype.h
Xtestinfo.o: /usr/include/features.h /usr/include/fcntl.h
Xtestinfo.o: /usr/include/sys/types.h /usr/include/linux/types.h
Xtestinfo.o: /usr/include/linux/fcntl.h /usr/include/assert.h
Xtestinfo.o: /usr/include/termio.h /usr/include/termios.h
Xtestinfo.o: /usr/include/linux/termios.h /usr/include/string.h
Xtestinfo.o: /usr/include/limits.h /usr/include/sys/time.h
Xtestinfo.o: /usr/include/linux/time.h /usr/include/sys/time.h
Xtestinfo.o: /usr/include/rpc/types.h /usr/include/sys/stat.h
Xtestinfo.o: /usr/include/linux/stat.h /usr/include/errno.h
Xtestinfo.o: /usr/include/linux/errno.h /usr/include/signal.h
Xtestinfo.o: /usr/include/linux/signal.h /usr/include/sys/socket.h
Xtestinfo.o: /usr/include/linux/socket.h /usr/include/linux/sockios.h
Xtestinfo.o: /usr/include/stdlib.h /usr/include/sys/wait.h
Xtestinfo.o: /usr/include/gnu/types.h /usr/include/waitflags.h
Xtestinfo.o: /usr/include/waitstatus.h /usr/include/netinet/in.h
Xtestinfo.o: /usr/include/linux/in.h /usr/include/netdb.h /usr/include/paths.h
Xtestinfo.o: /usr/include/unistd.h /usr/include/posix_opt.h /usr/include/pwd.h
Xtestinfo.o: /usr/include/dirent.h /usr/include/linux/limits.h
Xtestinfo.o: /usr/include/linux/dirent.h /usr/include/math.h
Xtestinfo.o: /usr/include/huge_val.h /usr/include/endian.h
Xtestinfo.o: /usr/include/bytesex.h /usr/include/values.h bbsipc.h bbsinfo.h
Xtestinfo.o: ports.h errlog.h filelock.h sysexec.h bbsint.h user.h menu.h bbs.h
Xtestinfo.o: dllist.h files.h moncon.h
Xtestipc.o: bbshdr.h /usr/include/stdio.h /usr/include/libio.h
Xtestipc.o: /usr/include/sys/cdefs.h /usr/include/ctype.h
Xtestipc.o: /usr/include/features.h /usr/include/fcntl.h
Xtestipc.o: /usr/include/sys/types.h /usr/include/linux/types.h
Xtestipc.o: /usr/include/linux/fcntl.h /usr/include/assert.h
Xtestipc.o: /usr/include/termio.h /usr/include/termios.h
Xtestipc.o: /usr/include/linux/termios.h /usr/include/string.h
Xtestipc.o: /usr/include/limits.h /usr/include/sys/time.h
Xtestipc.o: /usr/include/linux/time.h /usr/include/sys/time.h
Xtestipc.o: /usr/include/rpc/types.h /usr/include/sys/stat.h
Xtestipc.o: /usr/include/linux/stat.h /usr/include/errno.h
Xtestipc.o: /usr/include/linux/errno.h /usr/include/signal.h
Xtestipc.o: /usr/include/linux/signal.h /usr/include/sys/socket.h
Xtestipc.o: /usr/include/linux/socket.h /usr/include/linux/sockios.h
Xtestipc.o: /usr/include/stdlib.h /usr/include/sys/wait.h
Xtestipc.o: /usr/include/gnu/types.h /usr/include/waitflags.h
Xtestipc.o: /usr/include/waitstatus.h /usr/include/netinet/in.h
Xtestipc.o: /usr/include/linux/in.h /usr/include/netdb.h /usr/include/paths.h
Xtestipc.o: /usr/include/unistd.h /usr/include/posix_opt.h /usr/include/pwd.h
Xtestipc.o: /usr/include/dirent.h /usr/include/linux/limits.h
Xtestipc.o: /usr/include/linux/dirent.h /usr/include/math.h
Xtestipc.o: /usr/include/huge_val.h /usr/include/endian.h
Xtestipc.o: /usr/include/bytesex.h /usr/include/values.h bbsipc.h bbsinfo.h
Xtestipc.o: ports.h errlog.h filelock.h sysexec.h bbsint.h user.h menu.h bbs.h
Xtestipc.o: dllist.h files.h moncon.h
Xuser.o: bbshdr.h /usr/include/stdio.h /usr/include/libio.h
Xuser.o: /usr/include/sys/cdefs.h /usr/include/ctype.h /usr/include/features.h
Xuser.o: /usr/include/fcntl.h /usr/include/sys/types.h
Xuser.o: /usr/include/linux/types.h /usr/include/linux/fcntl.h
Xuser.o: /usr/include/assert.h /usr/include/termio.h /usr/include/termios.h
Xuser.o: /usr/include/linux/termios.h /usr/include/string.h
Xuser.o: /usr/include/limits.h /usr/include/sys/time.h
Xuser.o: /usr/include/linux/time.h /usr/include/sys/time.h
Xuser.o: /usr/include/rpc/types.h /usr/include/sys/stat.h
Xuser.o: /usr/include/linux/stat.h /usr/include/errno.h
Xuser.o: /usr/include/linux/errno.h /usr/include/signal.h
Xuser.o: /usr/include/linux/signal.h /usr/include/sys/socket.h
Xuser.o: /usr/include/linux/socket.h /usr/include/linux/sockios.h
Xuser.o: /usr/include/stdlib.h /usr/include/sys/wait.h
Xuser.o: /usr/include/gnu/types.h /usr/include/waitflags.h
Xuser.o: /usr/include/waitstatus.h /usr/include/netinet/in.h
Xuser.o: /usr/include/linux/in.h /usr/include/netdb.h /usr/include/paths.h
Xuser.o: /usr/include/unistd.h /usr/include/posix_opt.h /usr/include/pwd.h
Xuser.o: /usr/include/dirent.h /usr/include/linux/limits.h
Xuser.o: /usr/include/linux/dirent.h /usr/include/math.h
Xuser.o: /usr/include/huge_val.h /usr/include/endian.h /usr/include/bytesex.h
Xuser.o: /usr/include/values.h bbsipc.h bbsinfo.h ports.h errlog.h filelock.h
Xuser.o: sysexec.h bbsint.h user.h menu.h bbs.h dllist.h files.h moncon.h
Xusertest.o: bbshdr.h /usr/include/stdio.h /usr/include/libio.h
Xusertest.o: /usr/include/sys/cdefs.h /usr/include/ctype.h
Xusertest.o: /usr/include/features.h /usr/include/fcntl.h
Xusertest.o: /usr/include/sys/types.h /usr/include/linux/types.h
Xusertest.o: /usr/include/linux/fcntl.h /usr/include/assert.h
Xusertest.o: /usr/include/termio.h /usr/include/termios.h
Xusertest.o: /usr/include/linux/termios.h /usr/include/string.h
Xusertest.o: /usr/include/limits.h /usr/include/sys/time.h
Xusertest.o: /usr/include/linux/time.h /usr/include/sys/time.h
Xusertest.o: /usr/include/rpc/types.h /usr/include/sys/stat.h
Xusertest.o: /usr/include/linux/stat.h /usr/include/errno.h
Xusertest.o: /usr/include/linux/errno.h /usr/include/signal.h
Xusertest.o: /usr/include/linux/signal.h /usr/include/sys/socket.h
Xusertest.o: /usr/include/linux/socket.h /usr/include/linux/sockios.h
Xusertest.o: /usr/include/stdlib.h /usr/include/sys/wait.h
Xusertest.o: /usr/include/gnu/types.h /usr/include/waitflags.h
Xusertest.o: /usr/include/waitstatus.h /usr/include/netinet/in.h
Xusertest.o: /usr/include/linux/in.h /usr/include/netdb.h /usr/include/paths.h
Xusertest.o: /usr/include/unistd.h /usr/include/posix_opt.h /usr/include/pwd.h
Xusertest.o: /usr/include/dirent.h /usr/include/linux/limits.h
Xusertest.o: /usr/include/linux/dirent.h /usr/include/math.h
Xusertest.o: /usr/include/huge_val.h /usr/include/endian.h
Xusertest.o: /usr/include/bytesex.h /usr/include/values.h bbsipc.h bbsinfo.h
Xusertest.o: ports.h errlog.h filelock.h sysexec.h bbsint.h user.h menu.h bbs.h
Xusertest.o: dllist.h files.h moncon.h
END_OF_FILE
if test 33621 -ne `wc -c <'rocat-0.75/src/Makefile.orig'`; then
echo shar: \"'rocat-0.75/src/Makefile.orig'\" unpacked with wrong size!
fi
chmod +x 'rocat-0.75/src/Makefile.orig'
# end of 'rocat-0.75/src/Makefile.orig'
fi
if test -f 'rocat-0.75/src/bbsinfo.C' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'rocat-0.75/src/bbsinfo.C'\"
else
echo shar: Extracting \"'rocat-0.75/src/bbsinfo.C'\" \(16718 characters\)
sed "s/^X//" >'rocat-0.75/src/bbsinfo.C' <<'END_OF_FILE'
X// Filename: bbsinfo.C
X// Contents: the methods for the bbsinfo object
X// Author: Greg Shaw
X// Created: 7/11/93
X
X/*
XThis file is free software; you can redistribute it and/or modify it
Xunder the terms of the GNU General Public License as published by the
XFree Software Foundation; either version 2, or (at your option) any
Xlater version.
X
XIn addition to the permissions in the GNU General Public License, the
XFree Software Foundation gives you unlimited permission to link the
Xcompiled version of this file with other programs, and to distribute
Xthose programs without any restriction coming from the use of this
Xfile. (The General Public License restrictions do apply in other
Xrespects; for example, they cover modification of the file, and
Xdistribution when not linked into another program.)
X
XThis file is distributed in the hope that it will be useful, but
XWITHOUT ANY WARRANTY; without even the implied warranty of
XMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
XGeneral Public License for more details.
X
XYou should have received a copy of the GNU General Public License
Xalong with this program; see the file COPYING. If not, write to
Xthe Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
X
X#ifndef _BBSINFO_C_
X#define _BBSINFO_C_
X
X#include "bbshdr.h"
X
X// Function: findline
X// Purpose: find a line containing a particular word from the bbsinfo
X// file.
X// Input: word - a string containing the word to look for
X// Output: line - the line (if found)
X// Author: Greg Shaw
X// Created: 7/11/93
X
Xint bbsinfo::findline(char *line, char *word)
X{
X FILE *infile; // bbs info file
X int cnt; // line byte counter
X char c; // char
X char in_line[255]; // a line from the file
X char found; // loop boolean
X char *bbsdir; // bbsdir string (from environment)
X char tmpstr[255]; // temporary string
X
X if (bbsdir = getenv("BBSDIR"), bbsdir == NULL) // get bbs dir
X return(-1);
X strcpy(tmpstr,bbsdir);
X strcat(tmpstr,"/config/bbsinfo"); // get filename
X if (infile = fopen(tmpstr,"r"), infile == NULL)
X return(-1);
X // now look for word in file
X found = 0;
X while (!found && !feof(infile))
X {
X cnt = 0;
X while (c = fgetc(infile), c != '\n' && c != '\r' && !feof(infile))
X in_line[cnt++] = c;
X in_line[cnt] = 0;
X if (in_line[0] == '#' || strlen(in_line) < 5)
X continue;
X if (strstr(in_line,word) != NULL) // gotcha!
X {
X strcpy(line,in_line);
X found++;
X }
X }
X fclose(infile);
X if (!found)
X return(-1);
X else
X return(0);
X};
X
X// Function: cardinfo
X// Purpose: return the card information relating to a particular card
X// Input: type - the type of card:
X// 0 - red
X// 1 - blue
X// 2 - green
X// 3 - white
X// 4 - grey
X// 5 - pink
X// 6 - yellow
X// 7 - black
X// Output: a CardRec structure pointer filled in with information from
X// bbsinfo file. (or NULL for error)
X// Author: Greg Shaw
X// Created: 7/27/93
X
XCardRec *bbsinfo::cardinfo(int type)
X{
X char line[255];
X char dumy[25];
X CardRec *card;
X
X if (card = (CardRec *)malloc(sizeof(CardRec)), card == NULL)
X return(NULL);
X switch(type)
X {
X case 0:
X if (findline(line,"REDCARD") != 0)
X return(NULL);
X if (sscanf(line,"%s %d %d %x %d",dumy,&card->acl, &card->tl,
X &card->flags, &card->kbytes) != 5)
X return(NULL);
X strcpy(card->colr,"red");
X return(card);
X break;
X case 1:
X if (findline(line,"BLUECARD") != 0)
X return(NULL);
X if (sscanf(line,"%s %d %d %x %d",dumy,&card->acl, &card->tl,
X &card->flags, &card->kbytes) != 5)
X return(NULL);
X strcpy(card->colr,"blue");
X return(card);
X break;
X case 2:
X if (findline(line,"GREENCARD") != 0)
X return(NULL);
X if (sscanf(line,"%s %d %d %x %d",dumy,&card->acl, &card->tl,
X &card->flags, &card->kbytes) != 5)
X return(NULL);
X strcpy(card->colr,"green");
X return(card);
X break;
X case 3:
X if (findline(line,"WHITECARD") != 0)
X return(NULL);
X if (sscanf(line,"%s %d %d %x %d",dumy,&card->acl, &card->tl,
X &card->flags, &card->kbytes) != 5)
X return(NULL);
X strcpy(card->colr,"white");
X return(card);
X break;
X case 4:
X if (findline(line,"GREYCARD") != 0)
X return(NULL);
X if (sscanf(line,"%s %d %d %x %d",dumy,&card->acl, &card->tl,
X &card->flags, &card->kbytes) != 5)
X return(NULL);
X strcpy(card->colr,"grey");
X return(card);
X break;
X case 5:
X if (findline(line,"PINKCARD") != 0)
X return(NULL);
X if (sscanf(line,"%s %d %d %x %d",dumy,&card->acl, &card->tl,
X &card->flags, &card->kbytes) != 5)
X return(NULL);
X strcpy(card->colr,"pink");
X return(card);
X break;
X case 6:
X if (findline(line,"YELLOWCARD") != 0)
X return(NULL);
X if (sscanf(line,"%s %d %d %x %d",dumy,&card->acl, &card->tl,
X &card->flags, &card->kbytes) != 5)
X return(NULL);
X strcpy(card->colr,"yellow");
X return(card);
X break;
X case 7:
X if (findline(line,"BLACKCARD") != 0)
X return(NULL);
X if (sscanf(line,"%s %d %d %x %d",dumy,&card->acl, &card->tl,
X &card->flags, &card->kbytes) != 5)
X return(NULL);
X strcpy(card->colr,"black");
X return(card);
X break;
X default:
X return(NULL);
X }
X};
X// Function: sysop
X// Purpose: return the name of the BBS main sysop
X// Input: none
X// Output: a string that contains the 'pager' program
X// Notes: it should be possible to pass in some variable to tell
X// which sysop the user 'wants' in a multiple sysop system
X// Author: Greg Shaw
X// Created: 7/11/93
X
Xchar *bbsinfo::sysop(void)
X{
X char line[255];
X char dummy[255]; // dummy string
X char *sysopn;
X
X if (findline(line,"SYSOP") != 0)
X return(NULL);
X if (sysopn = (char *) malloc(20), sysopn == NULL)
X return(NULL);
X if (sscanf(line,"%s%s",dummy,sysopn) != 2)
X return(NULL);
X return(sysopn);
X};
X
X// Function: bbs_uid
X// Purpose: return the uid of the bbs administrator
X// Input: none
X// Output: the bbs administrator's uid
X// Author: Greg Shaw
X// Created: 4/25/94
X
Xuid_t bbsinfo::bbs_uid(void)
X{
X struct passwd *bbspw;
X
X if (bbspw = getpwnam("bbs"), bbspw == NULL)
X return(1);
X return(bbspw->pw_uid);
X};
X
X// Function: bbs_gid
X// Purpose: return the gid of the bbs administrator
X// Input: none
X// Output: the bbs administrator's gid
X// Author: Greg Shaw
X// Created: 4/25/94
X
Xgid_t bbsinfo::bbs_gid(void)
X{
X struct passwd *bbspw;
X
X if (bbspw = getpwnam("bbs"), bbspw == NULL)
X return(1);
X return(bbspw->pw_gid);
X};
X
X// Function: mailspool
X// Purpose: return the mail spool file directory for the system
X// Input: none
X// Output: a string that contains the mail spool dir
X// Author: Greg Shaw
X// Created: 8/10/93
X
Xchar *bbsinfo::mailspool(void)
X{
X char line[255];
X char dummy[255]; // dummy string
X char *mspool;
X
X if (findline(line,"MAILSPOOL") != 0)
X return(NULL);
X if (mspool = (char *) malloc(20), mspool == NULL)
X return(NULL);
X if (sscanf(line,"%s%s",dummy,mspool) != 2)
X return(NULL);
X return(mspool);
X};
X
X// Function: mailchecktime
X// Purpose: return the number of seconds that should elapse between
X// mail checks
X// Input: none
X// Output: a string that contains the mail spool dir
X// Author: Greg Shaw
X// Created: 4/24/94
X
Xint bbsinfo::mailchecktime(void)
X{
X char line[255];
X char dummy[255]; // dummy string
X int msgonce;
X
X if (findline(line,"MAILCHECK") != 0)
X return(-1);
X if (sscanf(line,"%s%d",dummy,&msgonce) != 2)
X return(0);
X return(msgonce);
X};
X
X// Function: sys_pager
X// Purpose: return the default 'pager' program to be used by the
X// bbs to display files to the user
X// Input: none
X// Output: a string that contains the 'pager' program
X// Author: Greg Shaw
X// Created: 7/11/93
X
Xchar *bbsinfo::sys_pager(void)
X{
X char line[255];
X char dummy[255]; // dummy string
X char *pager;
X
X if (findline(line,"SYSTEMPAGER") != 0)
X return(NULL);
X if (pager = (char *) malloc(20), pager == NULL)
X return(NULL);
X if (sscanf(line,"%s%s",dummy,pager) != 2)
X return(NULL);
X return(pager);
X};
X
X// Function: loghost
X// Purpose: return the host where the error logger is running
X// Input: none
X// Output: a string that contains the loghost is returned
X// note: it should be freed on exit.
X// Author: Greg Shaw
X// Created: 7/11/93
X
Xchar *bbsinfo::loghost(void)
X{
X char line[255];
X char dummy[255]; // dummy string
X char *loghst;
X
X if (findline(line,"LOGHOST") != 0)
X return(NULL);
X if (loghst = (char *) malloc(30), loghst == NULL)
X return(NULL);
X if (sscanf(line,"%s%s",dummy,loghst) != 2)
X return(NULL);
X return(loghst);
X};
X
X// Function: talkprog
X// Purpose: return the 'talk' program for the system
X// Input: none
X// Output: a string that contains the talkprog is returned
X// note: it should be freed on exit.
X// Author: Greg Shaw
X// Created: 7/11/93
X
Xchar *bbsinfo::talkprog(void)
X{
X char line[255];
X char dummy[255]; // dummy string
X char *talkprog;
X
X if (findline(line,"TALKPROG") != 0)
X return(NULL);
X if (talkprog = (char *) malloc(30), talkprog == NULL)
X return(NULL);
X if (sscanf(line,"%s%s",dummy,talkprog) != 2)
X return(NULL);
X return(talkprog);
X};
X
X// Function: watchost
X// Purpose: return the host where the sysop 'watch' program runs
X// Input: none
X// Output: a string that contains the watchhost is returned
X// note: it should be freed on exit.
X// Author: Greg Shaw
X// Created: 7/11/93
X
Xchar *bbsinfo::watchhost(void)
X{
X char line[255];
X char dummy[255]; // dummy string
X char *wathst;
X
X if (findline(line,"WATCHHOST") != 0)
X return(NULL);
X if (wathst = (char *) malloc(30), wathst == NULL)
X return(NULL);
X if (sscanf(line,"%s%s",dummy,wathst) != 2)
X return(NULL);
X return(wathst);
X};
X
X// Function: ratio
X// Purpose: return the upload to download ratio
X// Input: none
X// Output: a string that contains the loghost is returned
X// Author: Greg Shaw
X// Created: 7/11/93
X
Xfloat bbsinfo::ratio(void)
X{
X char line[255];
X char dummy[255]; // dummy string
X float rato;
X
X if (findline(line,"RATIO") != 0)
X return(0.0);
X if (sscanf(line,"%s%f",dummy,&rato) != 2)
X return(0.0);
X return(rato);
X};
X
X// Function: sys_msg_once
X// Purpose: return true if the system message in question is only to be
X// displayed once
X// Input: num - the number of the file to check
X// Output: true if message to be shown once only
X// Author: Greg Shaw
X// Created: 7/24/93
X
Xint bbsinfo::sys_msg_once(int num)
X{
X char line[255];
X char dummy[255]; // dummy string
X int msgonce;
X
X switch(num)
X {
X case 1: // first one
X if (findline(line,"SYSTEM1MSGONCE") != 0)
X return(0);
X break;
X case 2: // second one
X if (findline(line,"SYSTEM2MSGONCE") != 0)
X return(0);
X break;
X case 3: // second one
X if (findline(line,"SYSTEM3MSGONCE") != 0)
X return(0);
X break;
X default:
X return(0);
X }
X if (sscanf(line,"%s%d",dummy,&msgonce) != 2)
X return(0);
X return(msgonce);
X};
X
X// Function: chat_avail
X// Purpose: return true if sysop is available for chat
X// Inputs: tim - the hour and time currently
X// Outputs: true if available
X// Author: Greg Shaw
X// Created: 7/25/93
X
Xint bbsinfo::chat_avail(int tim)
X{
X char line[255];
X char dummy[255]; // dummy string
X int start;
X int end;
X
X if (findline(line,"CHATON") != 0)
X return(0);
X if (sscanf(line,"%s%d",dummy,&start) != 2)
X return(0);
X if (findline(line,"CHATOFF") != 0)
X return(0);
X if (sscanf(line,"%s%d",dummy,&end) != 2)
X return(0);
X if (tim > start && tim < end)
X return(1);
X else
X return(0);
X};
X
X// Function: def_card
X// Purpose: return the default card color for the user
X// Input: none
X// Output: the default acl
X// Author: Greg Shaw
X// Created: 7/11/93
X
Xint bbsinfo::def_card(void)
X{
X char line[255];
X
X if (findline(line,"DEFCARD") != 0)
X return(0);
X if (strstr(line,"red") != NULL) // gotcha!
X return(0);
X if (strstr(line,"blue") != NULL) // gotcha!
X return(1);
X if (strstr(line,"green") != NULL) // gotcha!
X return(2);
X if (strstr(line,"white") != NULL) // gotcha!
X return(3);
X if (strstr(line,"grey") != NULL) // gotcha!
X return(4);
X if (strstr(line,"pink") != NULL) // gotcha!
X return(5);
X if (strstr(line,"yellow") != NULL) // gotcha!
X return(6);
X if (strstr(line,"black") != NULL) // gotcha!
X return(7);
X return(-1);
X};
X
X// Function: def_termtype
X// Purpose: return the default terminal type of a new user
X// Input: none
X// Output: a string that contains the default termtype is returned
X// note: it should be freed on exit.
X// Author: Greg Shaw
X// Created: 7/11/93
X
Xchar *bbsinfo::def_termtype(void)
X{
X char line[255];
X char dummy[255]; // dummy string
X char *dt;
X
X if (findline(line,"DEFTERM") != 0)
X return(NULL);
X if (dt = (char *) malloc(30), dt == NULL)
X return(NULL);
X if (sscanf(line,"%s%s",dummy,dt) != 2)
X return(NULL);
X return(dt);
X};
X
X// Function: maxk
X// Purpose: return the maximum number of Kbytes the user can download at
X// one time.
X// Input: none
X// Output: true/false
X// Author: Greg Shaw
X// Created: 8/24/93
X
Xint bbsinfo::maxk(void)
X{
X char line[255];
X char dummy[255]; // dummy string
X int dt;
X
X if (findline(line,"MAXK") != 0)
X return(-1);
X if (sscanf(line,"%s%d",dummy,&dt) != 2)
X return(-1);
X return(dt);
X};
X
X// Function: inactivity_timeout
X// Purpose: return the time to wait before logging out an inactive user
X// Input: none
X// Output: true/false
X// Author: Greg Shaw
X// Created: 8/24/93
X
Xint bbsinfo::inactivity_timeout(void)
X{
X char line[255];
X char dummy[255]; // dummy string
X int dt;
X
X if (findline(line,"INACTIVITY") != 0)
X return(-1);
X if (sscanf(line,"%s%d",dummy,&dt) != 2)
X return(-1);
X return(dt);
X};
X
X// Function: creditchat
X// Purpose: return true if chat time with sysop is credited
X// Input: none
X// Output: true/false
X// Author: Greg Shaw
X// Created: 7/11/93
X
Xint bbsinfo::creditchat(void)
X{
X char line[255];
X char dummy[255]; // dummy string
X int dt;
X
X if (findline(line,"CREDITCHAT") != 0)
X return(-1);
X if (sscanf(line,"%s%d",dummy,&dt) != 2)
X return(-1);
X return(dt);
X};
X
X
X// Function: credituploads
X// Purpose: return true if upload time is credited
X// Input: none
X// Output: true/false
X// Author: Greg Shaw
X// Created: 7/13/93
X
Xint bbsinfo::credituploads(void)
X{
X char line[255];
X char dummy[255]; // dummy string
X int dt;
X
X if (findline(line,"CREDITUPLOADS") != 0)
X return(-1);
X if (sscanf(line,"%s%d",dummy,&dt) != 2)
X return(-1);
X return(dt);
X};
X
X
X// Function: userprompt
X// Purpose: return the amount of time between calls allowed (hours)
X// Input: none
X// Output: true/false
X// Author: Greg Shaw
X// Created: 7/13/93
X
Xchar *bbsinfo::userprompt(void)
X{
X char line[255];
X char dum0[25]; // dummy string
X char dum1[25]; // dummy string
X char dum2[25]; // dummy string
X char dum3[25]; // dummy string
X char *dt; // return string
X
X dum0[0] = dum1[0] = dum2[0] = dum3[0] = 0;
X if (findline(line,"USERPROMPT") != 0)
X return(NULL);
X sscanf(line,"%s%s%s%s",dum0,dum1,dum2,dum3);
X strcpy(line,dum1);
X strcat(line,dum2);
X strcat(line,dum3);
X strcat(line," ");
X if (dt = (char *) malloc(strlen(line)), dt == NULL)
X return(NULL);
X strcpy(dt,line);
X return(dt);
X};
X
X
X// Function: showtime
X// Purpose: return true if command prompt should show the amount of
X// time user has left.
X// Input: none
X// Output: true/false
X// Author: Greg Shaw
X// Created: 7/27/93
X
Xint bbsinfo::showtime(void)
X{
X char line[255];
X char dummy[255]; // dummy string
X int dt;
X
X if (findline(line,"SHOWTIMELEFT") != 0)
X return(0);
X if (sscanf(line,"%s%d",dummy,&dt) != 2)
X return(0);
X return(dt);
X};
X
X
X// Function: showfortune
X// Purpose: return true if the bbs should give the user a 'fortune cookie'
X// Input: none
X// Output: true/false
X// Author: Greg Shaw
X// Created: 8/22/93
X
Xint bbsinfo::showfortune(void)
X{
X char line[255];
X char dummy[255]; // dummy string
X int dt;
X
X if (findline(line,"SHOWFORTUNE") != 0)
X return(0);
X if (sscanf(line,"%s%d",dummy,&dt) != 2)
X return(0);
X return(dt);
X};
X
X// Function: showcoms
X// Purpose: return true if command prompt should show the keys for
X// the valid commands
X// Input: none
X// Output: true/false
X// Author: Greg Shaw
X// Created: 7/27/93
X
Xint bbsinfo::showcoms(void)
X{
X char line[255];
X char dummy[255]; // dummy string
X int dt;
X
X if (findline(line,"SHOWVALIDKEYS") != 0)
X return(0);
X if (sscanf(line,"%s%d",dummy,&dt) != 2)
X return(0);
X return(dt);
X};
X
X// Function: waittime
X// Purpose: return the amount of time between calls allowed (hours)
X// Input: none
X// Output: true/false
X// Author: Greg Shaw
X// Created: 7/13/93
X
Xint bbsinfo::waittime(void)
X{
X char line[255];
X char dummy[255]; // dummy string
X int dt;
X
X if (findline(line,"WAITTIME") != 0)
X return(-1);
X if (sscanf(line,"%s%d",dummy,&dt) != 2)
X return(-1);
X if (dt<0)
X dt=0;
X return(dt);
X};
X
X
X
X// Function: username
X// Purpose: return the login name of the current user
X// Input: none
X// Output: true/false
X// Author: Greg Shaw
X// Created: 7/13/93
X
Xchar *bbsinfo::username(void)
X{
X struct passwd *thisuser;
X
X if (thisuser = getpwuid(geteuid()), thisuser == NULL)
X return(NULL);
X else
X return(thisuser->pw_name);
X};
X
X
X
X#endif // _BBSINFO_C_
X
END_OF_FILE
if test 16718 -ne `wc -c <'rocat-0.75/src/bbsinfo.C'`; then
echo shar: \"'rocat-0.75/src/bbsinfo.C'\" unpacked with wrong size!
fi
chmod +x 'rocat-0.75/src/bbsinfo.C'
# end of 'rocat-0.75/src/bbsinfo.C'
fi
if test -f 'rocat-0.75/src/dllist.C' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'rocat-0.75/src/dllist.C'\"
else
echo shar: Extracting \"'rocat-0.75/src/dllist.C'\" \(6139 characters\)
sed "s/^X//" >'rocat-0.75/src/dllist.C' <<'END_OF_FILE'
X// Filename: dllist.C
X// Contents: the doubly linked list object methods
X// Author: Greg Shaw
X// Created: 8/2/93
X
X/*
XThis file is free software; you can redistribute it and/or modify it
Xunder the terms of the GNU General Public License as published by the
XFree Software Foundation; either version 2, or (at your option) any
Xlater version.
X
XIn addition to the permissions in the GNU General Public License, the
XFree Software Foundation gives you unlimited permission to link the
Xcompiled version of this file with other programs, and to distribute
Xthose programs without any restriction coming from the use of this
Xfile. (The General Public License restrictions do apply in other
Xrespects; for example, they cover modification of the file, and
Xdistribution when not linked into another program.)
X
XThis file is distributed in the hope that it will be useful, but
XWITHOUT ANY WARRANTY; without even the implied warranty of
XMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
XGeneral Public License for more details.
X
XYou should have received a copy of the GNU General Public License
Xalong with this program; see the file COPYING. If not, write to
Xthe Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
X
X#ifndef _DLLIST_C_
X#define _DLLIST_C_
X
X#include "bbshdr.h"
X
X// Method: constructor
X// Purpose: initialize the object to a known state
X// Input: none
X// Output: none
X// Author: Greg Shaw
X// Created: 8/2/93
X
Xdllist::dllist()
X{
X head=tail=NULL;
X numrec = 0;
X sortstate = 0;
X here = NULL;
X};
X
X// Method: destructor
X// Purpose: clean up after the object
X// Input: none
X// Output: none
X// Author: Greg Shaw
X// Created: 8/2/93
X
Xdllist::~dllist()
X{
X clear_list();
X};
X
X// Method: add
X// Purpose: add a record to the object
X// Input: rec - the record to add to the object
X// Output: none
X// Author: Greg Shaw
X// Created: 8/2/93
X
Xint dllist::add(FInfo *rec)
X{
X FInfo *newrec;
X
X if (newrec = (FInfo *)malloc(sizeof(FInfo)), newrec == NULL)
X {
X ap_log("dllist: Unable to malloc new FInfo record.");
X return(-1);
X }
X strcpy(newrec->name,rec->name);
X strcpy(newrec->sdesc,rec->sdesc);
X strcpy(newrec->uploader,rec->uploader);
X newrec->avail = rec->avail;
X newrec->date = rec->date;
X newrec->filepos = rec->filepos;
X newrec->numdls = rec->numdls;
X newrec->size = rec->size;
X newrec->previous = NULL;
X newrec->next = NULL;
X if (head == NULL)
X {
X head = newrec;
X tail=newrec;
X }
X else
X {
X newrec->previous = tail;
X tail->next = newrec;
X tail = newrec;
X }
X numrec++;
X return(0);
X};
X
X// Function: clear
X// Purpose: add a record to the object
X// Input: rec - the record to add to the object
X// Output: none
X// Author: Greg Shaw
X// Created: 8/2/93
X
Xint dllist::clear_list(void)
X{
X FInfo *tmprec, *tmprec2;
X
X tmprec = head;
X while (tmprec != NULL)
X {
X tmprec2 = tmprec;
X tmprec = tmprec->next;
X free(tmprec2);
X }
X numrec = 0;
X head = tail = NULL;
X return(0);
X};
X
X// Function: find
X// Purpose: find a file name in list
X// Input: str - file name to look for
X// Output: none
X// Author: Greg Shaw
X// Created: 8/2/93
X
XFInfo *dllist::find(char *str)
X{
X FInfo *rec;
X int found;
X
X found = 0;
X rec = head;
X while (!found && rec != NULL)
X {
X if (strcmp(rec->name,str) == 0)
X found++;
X else
X rec = rec->next;
X }
X return(rec);
X};
X
X
X// Function: sort
X// Purpose: sort the list by a key
X// Input: type - the type of sorting to do:
X// 1 - sort by date
X// 2 - sort by name
X// Output: none
X// Author: Greg Shaw
X// Created: 8/2/93
X
Xint dllist::sort(int type)
X{
X
X switch(type)
X {
X case 0:
X return(-1);
X case 1: // numeric by date
X sel_sort(0,head);
X break;
X case 2: // alpha by name
X sel_sort(1,head);
X
X }
X return(0);
X};
X
X// Function: sort
X// Purpose: sort the list by a key
X// Input: head - the start of the list
X// Output: none
X// Author: Greg Shaw
X// Created: 8/2/93
X// Notes: this uses a selection sort method
X
Xint dllist::sel_sort(int type, FInfo *list)
X{
X FInfo *loop1, *loop2, *smallest, *tmp, *listnext;
X
X loop1 = head; // start of list
X while (loop1->next != NULL) // until end - 1
X {
X smallest = loop1;
X loop2 = loop1->next;
X while (loop2 != NULL)
X {
X if (type)
X {
X if (strcmp(loop2->name,smallest->name) < 0)
X smallest = loop2;
X }
X else
X {
X if (loop2->date < smallest->date)
X smallest = loop2;
X }
X loop2 = loop2->next;
X }
X listnext = loop1->next;
X if (smallest != loop1)
X {
X // now swap
X // left side (previous)
X if (loop1->previous != NULL)
X {
X tmp = loop1->previous;
X loop1->previous->next = smallest;
X }
X else
X head = smallest;
X if (smallest->previous != NULL)
X {
X tmp = smallest->previous;
X tmp->next = loop1;
X }
X tmp = loop1->previous;
X loop1->previous = smallest->previous;
X smallest->previous = tmp;
X if (loop1->next != NULL)
X {
X tmp = loop1->next;
X tmp->previous = smallest;
X }
X if (smallest->next != NULL)
X {
X tmp = smallest->next;
X tmp->previous = loop1;
X }
X else
X tail = loop1;
X tmp = loop1->next;
X loop1->next = smallest->next;
X smallest->next = tmp;
X }
X loop1 = listnext;
X }
X if (type)
X sortstate = 2; // alphabetically sorted
X else
X sortstate = 1; // numerically sorted
X tmp = head;
X while (tmp != NULL)
X {
X tmp = tmp->next;
X }
X return(0);
X};
X
X// Function: next
X// Purpose: return the 'next' record in the array
X// Input: none
X// Output: none
X// Author: Greg Shaw
X// Created: 8/2/93
X
XFInfo *dllist::next(void)
X{
X if (here == NULL)
X {
X here = head;
X return(head);
X }
X here = here->next;
X return(here);
X};
X
X// Function: previous
X// Purpose: return the previous record in the list
X// Input: none
X// Output: none
X// Author: Greg Shaw
X// Created: 8/2/93
X
XFInfo *dllist::previous(void)
X{
X if (here == NULL)
X {
X here = tail;
X return(tail);
X }
X here = here->previous;
X return(here);
X};
X
X// Function: head
X// Purpose: set 'here' to top of the list
X// Input: none
X// Output: none
X// Author: Greg Shaw
X// Created: 8/2/93
X
Xint dllist::top(void)
X{
X here = NULL;
X return(0);
X};
X
X// Function: tail
X// Purpose: set 'here' to end of the list
X// Input: none
X// Output: none
X// Author: Greg Shaw
X// Created: 8/2/93
X
Xint dllist::bottom(void)
X{
X here = NULL;
X return(0);
X};
X
X#endif //_DLLIST_C_
END_OF_FILE
if test 6139 -ne `wc -c <'rocat-0.75/src/dllist.C'`; then
echo shar: \"'rocat-0.75/src/dllist.C'\" unpacked with wrong size!
fi
chmod +x 'rocat-0.75/src/dllist.C'
# end of 'rocat-0.75/src/dllist.C'
fi
if test -f 'rocat-0.75/src/fileutil.C' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'rocat-0.75/src/fileutil.C'\"
else
echo shar: Extracting \"'rocat-0.75/src/fileutil.C'\" \(14910 characters\)
sed "s/^X//" >'rocat-0.75/src/fileutil.C' <<'END_OF_FILE'
X// Filename: fileutil.C
X// Contents: a files area utility program
X// Author: Greg Shaw
X// Created: 8/24/93
X
X/*
XThis file is free software; you can redistribute it and/or modify it
Xunder the terms of the GNU General Public License as published by the
XFree Software Foundation; either version 2, or (at your option) any
Xlater version.
X
XIn addition to the permissions in the GNU General Public License, the
XFree Software Foundation gives you unlimited permission to link the
Xcompiled version of this file with other programs, and to distribute
Xthose programs without any restriction coming from the use of this
Xfile. (The General Public License restrictions do apply in other
Xrespects; for example, they cover modification of the file, and
Xdistribution when not linked into another program.)
X
XThis file is distributed in the hope that it will be useful, but
XWITHOUT ANY WARRANTY; without even the implied warranty of
XMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
XGeneral Public License for more details.
X
XYou should have received a copy of the GNU General Public License
Xalong with this program; see the file COPYING. If not, write to
Xthe Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
X
X#ifndef _FILEUTIL_C_
X#define _FILEUTIL_C_
X
X#include "bbshdr.h"
X#include "fileutil.h"
X
XUser user; // defined here for extern references elsewhere
Xmoncon mon_obj; // monitor connection object (not used)
X
X// Method: constructor
X// Purpose: initialize the list
X// Input: none
X// Output: none
X// Author: Greg Shaw
X// Created: 8/24/93
X
Xfileutil::fileutil()
X{
X numrecs = 0;
X};
X
X// Method: delete_missing
X// Purpose: scan all files sections to delete all missing files
X// Input: sname - long name of file section
X// Output: stdout - list of deleted files
X// Author: Greg Shaw
X// Created: 9/2/93
X
Xint fileutil::delete_missing(char *sname,char *secname)
X{
X FInfo *rec;
X int deleted;
X int offset;
X FILE *recfile;
X FILE *outfile;
X char fname[MAX_FILENAMELENGTH+1];
X char tmpstr[255];
X char c;
X char line[150];
X
X deleted = 0;
X
X sprintf(tmpstr,"%s/filehdr/%s",getenv("BBSDIR"),secname);
X if (recfile = bopen(tmpstr,"r"), recfile == NULL)
X {
X sprintf(tmpstr,"fileutil: Unable to open %s",secname);
X ap_log(tmpstr);
X return(-1);
X }
X sprintf(tmpstr,"%s/filehdr/%s.new",getenv("BBSDIR"),secname);
X if (outfile = bopen(tmpstr,"w"), outfile == NULL)
X {
X sprintf(tmpstr,"fileutil: Unable to open %s.new",secname);
X ap_log(tmpstr);
X return(-1);
X }
X while (!feof(recfile))
X {
X offset = 0;
X while (c = fgetc(recfile), c != '\n' && c != '\r' && !feof(recfile))
X line[offset++] = c;
X line[offset] = 0;
X if (line[0] == '[' && line[1] == 'A')
X {
X sscanf(&line[2],"%*s %*d %s",fname);
X if (rec = list_obj.find(fname), rec != NULL && rec->avail != 'Y' || rec->size == 0)
X { // delete next 5 more lines
X deleted++;
X offset = 0;
X while (offset < 5 && !feof(recfile))
X {
X while (c = fgetc(recfile), c != '\n' && c != '\r' && !feof(recfile));
X offset++;
X }
X }
X else
X fprintf(outfile,"%s\n",line);
X }
X else
X fprintf(outfile,"%s\n",line);
X }
X bclose(outfile);
X bclose(recfile);
X if (deleted) // some deleted?
X { // now move things back to where they should be
X sprintf(tmpstr,"%s/filehdr/%s",getenv("BBSDIR"),secname);
X sprintf(line,"%s/filehdr/%s.old",getenv("BBSDIR"),secname);
X rename(tmpstr,line);
X sprintf(line,"%s/filehdr/%s.new",getenv("BBSDIR"),secname);
X sprintf(tmpstr,"%s/filehdr/%s",getenv("BBSDIR"),secname);
X rename(line,tmpstr);
X } else
X {
X sprintf(tmpstr,"%s/filehdr/%s.new",getenv("BBSDIR"),secname);
X remove(tmpstr);
X }
X printf("%-25.25s %6d\n",sname,deleted);
X return(0);
X};
X
X// Method: newfiles
X// Purpose: scan all files sections to build a 'new files' list.
X// Input: section - name of section to build the 'new' list for
X// fname - the file name (+path) for the output file
X// Output: a file that contains the new files list
X// Author: Greg Shaw
X// Created: 8/24/93
X
Xint fileutil::newfiles(char *section, FILE *outfile)
X{
X FInfo *rec;
X char datestr[12];
X struct tm *tmrec;
X time_t now;
X
X time(&now);
X list_obj.top(); // top of list
X while (rec = list_obj.next(), rec != NULL)
X {
X if (now - rec->date < (DAYS*24*60*60))
X {
X tmrec = localtime(&rec->date);
X strftime(datestr,11,"%x",tmrec);
X
X fprintf(outfile,"%-14.14s %-25.25s %s %-8.8s %2d\n",rec->name,
X section,datestr,rec->uploader,rec->numdls);
X }
X }
X return(0);
X};
X
X// Method: most
X// Purpose: scan the files section for the most popular files. Compare
X// against existing list and add as appropriate
X// Input: section - name of section to build the 'most' list for
X// fname - the file name (+path) for the output file
X// Output: a file that contains the most popular files
X// Author: Greg Shaw
X// Created: 8/24/93
X
Xint fileutil::most(char *section)
X{
X FInfo *rec;
X int num;
X int x;
X struct stat fistat; // file status record
X char tmpstr[255];
X
X list_obj.top(); // top of list
X while (rec = list_obj.next(), rec != NULL)
X {
X sprintf(tmpstr,"%s/files/%s/%s",getenv("BBSDIR"),dn_path,rec->name);
X if (stat(tmpstr,&fistat) == 0 && S_ISREG (fistat.st_mode))
X {
X rec->size = fistat.st_size;
X rec->date = fistat.st_ctime;
X rec->avail = 'Y';
X }
X if (rec->numdls > 0)
X {
X num = -1;
X for (x=0; x<numrecs; x++)
X {
X if (rec->numdls > recs[x].numdls)
X {
X num = x; // found where we need to put guy
X x = numrecs;
X }
X }
X if (num != -1 ) // found where we need to put him
X {
X // move everybody down
X for (x=numrecs-2; x >= num; --x)
X {
X memcpy(&recs[x+1], &recs[x], sizeof(FInfo));
X strcpy(sec[x+1], sec[x]);
X }
X memcpy(&recs[num], rec, sizeof(FInfo));
X strcpy(sec[num], section);
X
X }
X else if (x < MAX_RECS) // hit end before found lesser one
X {
X memcpy(&recs[numrecs],rec,sizeof(FInfo));
X strcpy(sec[numrecs], section);
X numrecs++;
X }
X }
X }
X return(0);
X};
X
X// Method: update
X// Purpose: update the section passed in
X// - check for new files added to directory
X// - delete files with zero length in description
X// Input: section - name of section to update
X// Output: a file that contains the most popular files
X// Author: Greg Shaw
X// Created: 8/24/93
X
Xint fileutil::update(char *section)
X{
X FILE *outfile; // output file
X DIR *fdir; // directory file descriptor
X FInfo *rec;
X struct dirent *dentry; // directory entry
X struct stat fistat; // file status record
X time_t now; // date of file added (today)
X char bbsdir[255]; // bbs directory
X char tmpstr[255]; // tmpstr
X int newfiles; // new files in section
X int missing; // missing files in section
X int deleted; // missing files in section
X int totfiles; // total files in section
X unsigned long totsize; // total size of section
X
X time(&now);
X newfiles = deleted = missing = totfiles = 0;
X totsize = 0;
X strcpy(bbsdir,getenv("BBSDIR")); // not checking error
X strcpy(tmpstr,bbsdir);
X strcat(tmpstr,"/filehdr/"); // tack on files header
X strcat(tmpstr,section);
X if (outfile = bopen(tmpstr,"a"), outfile == NULL)
X {
X printf("fileutil: Unable to open files section header %s",section);
X return(0);
X }
X strcpy(tmpstr,bbsdir);
X strcat(tmpstr,"/files/");
X strcat(tmpstr,dn_path);
X if (fdir = opendir(tmpstr), fdir == NULL)
X {
X printf("fileutil: Unable to open directory %s for reading.\n",tmpstr);
X bclose(outfile);
X exit(0);
X }
X // ok. output file is open. directory is open. doit.
X while (dentry = readdir(fdir), dentry != NULL)
X {
X sprintf(tmpstr,"%s/files/%s/%s",bbsdir,dn_path,dentry->d_name);
X if (stat(tmpstr,&fistat) == 0 && S_ISREG(fistat.st_mode))
X { // not found, add to area
X if (rec = list_obj.find(dentry->d_name), rec == NULL)
X {
X newfiles++;
X totsize += fistat.st_size/1024;
X fprintf(outfile,"[A sysop 0 %s ]\n",dentry->d_name,
X fistat.st_size,fistat.st_ctime);
X fprintf(outfile,"[B ]\n");
X fprintf(outfile,"[C ]\n");
X fprintf(outfile,"[D ]\n");
X fprintf(outfile,"[E ]\n");
X fprintf(outfile,"[F ]\n");
X }
X }
X }
X closedir(fdir);
X bclose(outfile);
X // Ok. Got new files added to section. Now delete no-good files
X list_obj.top(); // start at top
X while (rec = list_obj.next(), rec != NULL)
X {
X if (rec != NULL && rec->size == 0) // file size 0? Kill!
X {
X deleted++;
X sprintf(tmpstr,"%s/files/%s/%s",bbsdir,dn_path,rec->name);
X remove(tmpstr);
X }
X }
X // now go through section file to delete record descriptions
X // now check for missing files
X list_obj.top(); // start at top
X while (rec = list_obj.next(), rec != NULL)
X {
X sprintf(tmpstr,"%s/files/%s/%s",getenv("BBSDIR"),dn_path,rec->name);
X if (stat(tmpstr,&fistat) == 0 && S_ISREG (fistat.st_mode))
X {
X rec->size = fistat.st_size;
X rec->date = fistat.st_ctime;
X rec->avail = 'Y';
X totsize += rec->size/1024;
X totfiles++;
X }
X }
X // now add statistics to file
X totfiles += newfiles;
X totfiles -= deleted;
X printf("%-25.25s %6ld %5d %3d %3d %3d\n",section,totsize,
X totfiles,missing,newfiles,deleted);
X sprintf(tmpstr,"%s/filehdr/%s",bbsdir,section);
X chmod(tmpstr,0775);
X return(0);
X};
X
X// Method: cycle_sections
X// Purpose: scan all files sections and do a command on each in turn
X// Input: fname - the output filename
X// Output: a file that contains the
X// Author: Greg Shaw
X// Created: 8/24/93
X
Xint fileutil::cycle_sections(int type, char *fname)
X{
X CardRec user; // dummy for files object 'open'
X FILE *infile; // for reading bbs files master header
X FILE *outfile; // output text file for some functions
X time_t now; // current time
X int x;
X char c; // char
X char *u; // simple char pointer
X char *bbsdir; // home of BBS
X char word[25]; // word
X char datestr[12]; // date string storage
X char tmpstr[255]; // temp str
X char name[MAX_FILENAMELENGTH]; // section name
X char dn_path[255]; // download path
X char long_desc[255]; // long description
X struct tm *tmrec;
X
X bbsdir = getenv("BBSDIR");
X if (bbsdir == NULL)
X {
X printf("Unable to get BBSDIR environment variable.");
X exit(0);
X }
X list_obj.clear_list(); // nuke old values
X sprintf(tmpstr,"%s/filehdr/bbs_files_hdr",bbsdir);// tack on files header
X if (infile = bopen(tmpstr,"r"), infile == NULL)
X {
X sprintf(tmpstr,"fileutil: Unable to open main files section header (bbs_files_hdr)",name);
X ap_log(tmpstr);
X return(-1);
X }
X // ok. got file. let's loop through list for each section
X if ((type == 0 || type == 1) && (outfile = bopen(fname,"w"), outfile == NULL))
X {
X sprintf(tmpstr,"fileutil: Unable to open output file %s",fname);
X ap_log(tmpstr);
X return(-1);
X }
X switch(type)
X {
X case 0: // new files
X time(&now);
X tmrec = localtime(&now);
X strftime(datestr,11,"%x",tmrec);
X fprintf(outfile,"New files in the last %d days. (%s)\n",DAYS,datestr);
X fprintf(outfile,"Name Section Date by Downloads\n");
X break;
X case 1: // most popular files
X time(&now);
X tmrec = localtime(&now);
X strftime(datestr,11,"%x",tmrec);
X fprintf(outfile,"Most popular files on BBS by downloads: (%s)\n",datestr);
X fprintf(outfile,"Name Section Dls Date Uploaded by\n");
X break;
X case 2: // update sections
X time(&now);
X tmrec = localtime(&now);
X strftime(datestr,11,"%x",tmrec);
X printf("SysOp Report for BBS: (%s)\n",datestr);
X printf("Section Size Files Missing New Deleted\n");
X break;
X case 3: // delete missing files from bbs and headers
X time(&now);
X tmrec = localtime(&now);
X strftime(datestr,11,"%x",tmrec);
X printf("Deleted Files Report for BBS: (%s)\n",datestr);
X printf("Section Deleted\n");
X break;
X }
X while (!feof(infile))
X {
X // look for left bracket
X while (c = fgetc(infile), c != '[' && !feof(infile));
X // now get the rest of the line
X if (feof(infile))
X continue;
X if (x = fscanf(infile,"%s %*s %*d %s %*s %*d%50s",name,dn_path, long_desc), x != 3)
X {
X sprintf(tmpstr,"Error in bbs main files header.");
X ap_log(tmpstr);
X return(-1);
X }
X while (fscanf(infile,"%s",word) == 1 && strchr(word,']') == NULL)
X {
X strcat(long_desc," ");
X strcat(long_desc,word);
X }
X if (u = strchr(long_desc,']'), u != NULL)
X u[0] = 0; // turn into null
X // open section
X if (open(name,&user) != 0)
X {
X sprintf(tmpstr,"fileutil: error opening %s",name);
X ap_log(tmpstr);
X bclose(infile);
X bclose(outfile);
X return(-1);
X }
X // now pass to appropriate function
X switch(type)
X {
X case 0: // generate new files list
X newfiles(long_desc,outfile);
X break;
X case 1: // generate most popular files list
X most(long_desc);
X break;
X case 2: // update files section
X update(name);
X break;
X case 3: // delete missing files
X delete_missing(long_desc,name);
X break;
X default:
X return(0);
X }
X }
X if (type == 1) // most popular files?
X { // then generate list from 20 files
X for (x=0; x<numrecs; x++)
X {
X tmrec = localtime(&recs[x].date);
X strftime(datestr,11,"%x",tmrec);
X fprintf(outfile,"%-14.14s %-25.25s %d %s %-8.8s\n",
X recs[x].name,sec[x],recs[x].numdls,
X datestr, recs[x].uploader);
X }
X }
X bclose(infile);
X if (type == 0 || type == 1)
X bclose(outfile);
X return(0);
X};
X
X
X// Function: usage
X// Purpose: give the user some clue as to how to execute program
X// Input: none
X// Output: a (hopefully) useful display of what the program should do
X// Author: Greg Shaw
X// Created: 8/25/93
X
Xvoid usage(void)
X{
X printf("Usage: fileutil -c section_name\n");
X printf(" fileutil -n output_filename\n");
X printf(" fileutil -m output_filename\n");
X printf(" fileutil -u\n");
X printf(" fileutil -d\n");
X};
X
X
Xmain(int argc,char *argv[])
X{
X fileutil fileobj; // files object for utilities
X char c; // character sent back by getopt
X CardRec user; // dummy for files object 'open'
X
X
X
X c = getopt(argc,argv,"cnmud"); // all options are mutually exclusive
X // so one only should be present
X if (c == -1)
X usage();
X else
X {
X switch(c)
X {
X case 'c': // create section from directory
X // NOTE: this is the most dangerous one
X // should only be done ONCE
X if (argc != 3)
X {
X usage();
X return(0);
X }
X if (fileobj.open(argv[2],&user) != -1)
X {
X fileobj.create();
X }
X break;
X case 'd': // delete missing files
X if (argc != 2)
X {
X usage();
X return(0);
X }
X fileobj.cycle_sections(3,argv[2]); // most downloaded
X break;
X case 'm': // create list of most popular files
X if (argc != 3)
X {
X usage();
X return(0);
X }
X fileobj.cycle_sections(1,argv[2]); // most downloaded
X break;
X case 'n': // create list of new files
X if (argc != 3)
X {
X usage();
X return(0);
X }
X fileobj.cycle_sections(0,argv[2]); // new files
X break;
X case 'u': // update sections for new files without overwrite
X if (argc != 2)
X {
X usage();
X return(0);
X }
X fileobj.cycle_sections(2,NULL); // update
X break;
X default:
X usage();
X }
X }
X return(0);
X};
X
X#endif // _FILEUTIL_C_
END_OF_FILE
if test 14910 -ne `wc -c <'rocat-0.75/src/fileutil.C'`; then
echo shar: \"'rocat-0.75/src/fileutil.C'\" unpacked with wrong size!
fi
chmod +x 'rocat-0.75/src/fileutil.C'
# end of 'rocat-0.75/src/fileutil.C'
fi
echo shar: End of archive 5 \(of 9\).
cp /dev/null ark5isdone
MISSING=""
for I in 1 2 3 4 5 6 7 8 9 ; do
if test ! -f ark${I}isdone ; then
MISSING="${MISSING} ${I}"
fi
done
if test "${MISSING}" = "" ; then
echo You have unpacked all 9 archives.
rm -f ark[1-9]isdone ark[1-9][0-9]isdone
else
echo You still must unpack the following archives:
echo " " ${MISSING}
fi
exit 0
exit 0 # Just in case...