home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume44 / rocat / part05 < prev    next >
Internet Message Format  |  1994-08-01  |  98KB

  1. From: shaw@stortek.stortek.com (Greg Shaw)
  2. Newsgroups: comp.sources.misc
  3. Subject: v44i005:  rocat - Roman Catacombs BBS System v.0.75, Part05/09
  4. Date: 1 Aug 1994 12:08:56 -0500
  5. Organization: Sterling Software
  6. Sender: kent@sparky.sterling.com
  7. Approved: kent@sparky.sterling.com
  8. Message-ID: <31ja78$b0r@sparky.sterling.com>
  9. X-Md4-Signature: 803814ac49b73f1a436370d8f0e9bfbc
  10.  
  11. Submitted-by: shaw@stortek.stortek.com (Greg Shaw)
  12. Posting-number: Volume 44, Issue 5
  13. Archive-name: rocat/part05
  14. Environment: Linux, GNU C++/libg++
  15.  
  16. #! /bin/sh
  17. # This is a shell archive.  Remove anything before this line, then feed it
  18. # into a shell via "sh file" or similar.  To overwrite existing files,
  19. # type "sh file -c".
  20. # Contents:  rocat-0.75/examples/menus/logoff rocat-0.75/src/COPYING
  21. #   rocat-0.75/src/Makefile.orig rocat-0.75/src/bbsinfo.C
  22. #   rocat-0.75/src/dllist.C rocat-0.75/src/fileutil.C
  23. # Wrapped by kent@sparky on Mon Jul 11 22:22:52 1994
  24. PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin:$PATH ; export PATH
  25. echo If this archive is complete, you will see the following message:
  26. echo '          "shar: End of archive 5 (of 9)."'
  27. if test -f 'rocat-0.75/examples/menus/logoff' -a "${1}" != "-c" ; then 
  28.   echo shar: Will not clobber existing file \"'rocat-0.75/examples/menus/logoff'\"
  29. else
  30.   echo shar: Extracting \"'rocat-0.75/examples/menus/logoff'\" \(1195 characters\)
  31.   sed "s/^X//" >'rocat-0.75/examples/menus/logoff' <<'END_OF_FILE'
  32. X0||||||| Roman Catacombs                                                Street Level
  33. X0||||||| ---------------------------------------------------------------------------
  34. X0||||||| 
  35. X0|||||||                                   Exit
  36. X0|||||||                                     
  37. X0|||||||                                      <N>
  38. X0|||||||                        ----------------------------
  39. X0|||||||                        B>BS List                  
  40. X0|||||||                        I>nformation about BBS     
  41. X0|||||||                                                   
  42. X0|||||||                                                   
  43. X0|||||||                                                   
  44. X0|||||||                        ----------------------------
  45. X0|||||||                                      <S>
  46. X0|||||||                                     
  47. X0|||||||                                Entry Vault
  48. X0||||||| 
  49. X0||||||| ---------------------------------------------------------------------------
  50. X0||||||| <-> Previous Menu     <F> Feedback to SysOp   <G> Quick Logout
  51. X1|g||||||
  52. X3|-||||||
  53. X1|n|||||logoff|
  54. X10|i|||||bbsinfo|
  55. X10|b|||||bbslist|
  56. X3|s|||||main|
  57. X21|f|||||elm -s feedback shaw|
  58. X2|h|||||helptop|
  59. END_OF_FILE
  60.   if test 1195 -ne `wc -c <'rocat-0.75/examples/menus/logoff'`; then
  61.     echo shar: \"'rocat-0.75/examples/menus/logoff'\" unpacked with wrong size!
  62.   fi
  63.   # end of 'rocat-0.75/examples/menus/logoff'
  64. fi
  65. if test -f 'rocat-0.75/src/COPYING' -a "${1}" != "-c" ; then 
  66.   echo shar: Will not clobber existing file \"'rocat-0.75/src/COPYING'\"
  67. else
  68.   echo shar: Extracting \"'rocat-0.75/src/COPYING'\" \(17982 characters\)
  69.   sed "s/^X//" >'rocat-0.75/src/COPYING' <<'END_OF_FILE'
  70. X            GNU GENERAL PUBLIC LICENSE
  71. X               Version 2, June 1991
  72. X
  73. X Copyright (C) 1989, 1991 Free Software Foundation, Inc.
  74. X                          675 Mass Ave, Cambridge, MA 02139, USA
  75. X Everyone is permitted to copy and distribute verbatim copies
  76. X of this license document, but changing it is not allowed.
  77. X
  78. X                Preamble
  79. X
  80. X  The licenses for most software are designed to take away your
  81. Xfreedom to share and change it.  By contrast, the GNU General Public
  82. XLicense is intended to guarantee your freedom to share and change free
  83. Xsoftware--to make sure the software is free for all its users.  This
  84. XGeneral Public License applies to most of the Free Software
  85. XFoundation's software and to any other program whose authors commit to
  86. Xusing it.  (Some other Free Software Foundation software is covered by
  87. Xthe GNU Library General Public License instead.)  You can apply it to
  88. Xyour programs, too.
  89. X
  90. X  When we speak of free software, we are referring to freedom, not
  91. Xprice.  Our General Public Licenses are designed to make sure that you
  92. Xhave the freedom to distribute copies of free software (and charge for
  93. Xthis service if you wish), that you receive source code or can get it
  94. Xif you want it, that you can change the software or use pieces of it
  95. Xin new free programs; and that you know you can do these things.
  96. X
  97. X  To protect your rights, we need to make restrictions that forbid
  98. Xanyone to deny you these rights or to ask you to surrender the rights.
  99. XThese restrictions translate to certain responsibilities for you if you
  100. Xdistribute copies of the software, or if you modify it.
  101. X
  102. X  For example, if you distribute copies of such a program, whether
  103. Xgratis or for a fee, you must give the recipients all the rights that
  104. Xyou have.  You must make sure that they, too, receive or can get the
  105. Xsource code.  And you must show them these terms so they know their
  106. Xrights.
  107. X
  108. X  We protect your rights with two steps: (1) copyright the software, and
  109. X(2) offer you this license which gives you legal permission to copy,
  110. Xdistribute and/or modify the software.
  111. X
  112. X  Also, for each author's protection and ours, we want to make certain
  113. Xthat everyone understands that there is no warranty for this free
  114. Xsoftware.  If the software is modified by someone else and passed on, we
  115. Xwant its recipients to know that what they have is not the original, so
  116. Xthat any problems introduced by others will not reflect on the original
  117. Xauthors' reputations.
  118. X
  119. X  Finally, any free program is threatened constantly by software
  120. Xpatents.  We wish to avoid the danger that redistributors of a free
  121. Xprogram will individually obtain patent licenses, in effect making the
  122. Xprogram proprietary.  To prevent this, we have made it clear that any
  123. Xpatent must be licensed for everyone's free use or not licensed at all.
  124. X
  125. X  The precise terms and conditions for copying, distribution and
  126. Xmodification follow.
  127. X
  128. X            GNU GENERAL PUBLIC LICENSE
  129. X   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
  130. X
  131. X  0. This License applies to any program or other work which contains
  132. Xa notice placed by the copyright holder saying it may be distributed
  133. Xunder the terms of this General Public License.  The "Program", below,
  134. Xrefers to any such program or work, and a "work based on the Program"
  135. Xmeans either the Program or any derivative work under copyright law:
  136. Xthat is to say, a work containing the Program or a portion of it,
  137. Xeither verbatim or with modifications and/or translated into another
  138. Xlanguage.  (Hereinafter, translation is included without limitation in
  139. Xthe term "modification".)  Each licensee is addressed as "you".
  140. X
  141. XActivities other than copying, distribution and modification are not
  142. Xcovered by this License; they are outside its scope.  The act of
  143. Xrunning the Program is not restricted, and the output from the Program
  144. Xis covered only if its contents constitute a work based on the
  145. XProgram (independent of having been made by running the Program).
  146. XWhether that is true depends on what the Program does.
  147. X
  148. X  1. You may copy and distribute verbatim copies of the Program's
  149. Xsource code as you receive it, in any medium, provided that you
  150. Xconspicuously and appropriately publish on each copy an appropriate
  151. Xcopyright notice and disclaimer of warranty; keep intact all the
  152. Xnotices that refer to this License and to the absence of any warranty;
  153. Xand give any other recipients of the Program a copy of this License
  154. Xalong with the Program.
  155. X
  156. XYou may charge a fee for the physical act of transferring a copy, and
  157. Xyou may at your option offer warranty protection in exchange for a fee.
  158. X
  159. X  2. You may modify your copy or copies of the Program or any portion
  160. Xof it, thus forming a work based on the Program, and copy and
  161. Xdistribute such modifications or work under the terms of Section 1
  162. Xabove, provided that you also meet all of these conditions:
  163. X
  164. X    a) You must cause the modified files to carry prominent notices
  165. X    stating that you changed the files and the date of any change.
  166. X
  167. X    b) You must cause any work that you distribute or publish, that in
  168. X    whole or in part contains or is derived from the Program or any
  169. X    part thereof, to be licensed as a whole at no charge to all third
  170. X    parties under the terms of this License.
  171. X
  172. X    c) If the modified program normally reads commands interactively
  173. X    when run, you must cause it, when started running for such
  174. X    interactive use in the most ordinary way, to print or display an
  175. X    announcement including an appropriate copyright notice and a
  176. X    notice that there is no warranty (or else, saying that you provide
  177. X    a warranty) and that users may redistribute the program under
  178. X    these conditions, and telling the user how to view a copy of this
  179. X    License.  (Exception: if the Program itself is interactive but
  180. X    does not normally print such an announcement, your work based on
  181. X    the Program is not required to print an announcement.)
  182. X
  183. XThese requirements apply to the modified work as a whole.  If
  184. Xidentifiable sections of that work are not derived from the Program,
  185. Xand can be reasonably considered independent and separate works in
  186. Xthemselves, then this License, and its terms, do not apply to those
  187. Xsections when you distribute them as separate works.  But when you
  188. Xdistribute the same sections as part of a whole which is a work based
  189. Xon the Program, the distribution of the whole must be on the terms of
  190. Xthis License, whose permissions for other licensees extend to the
  191. Xentire whole, and thus to each and every part regardless of who wrote it.
  192. X
  193. XThus, it is not the intent of this section to claim rights or contest
  194. Xyour rights to work written entirely by you; rather, the intent is to
  195. Xexercise the right to control the distribution of derivative or
  196. Xcollective works based on the Program.
  197. X
  198. XIn addition, mere aggregation of another work not based on the Program
  199. Xwith the Program (or with a work based on the Program) on a volume of
  200. Xa storage or distribution medium does not bring the other work under
  201. Xthe scope of this License.
  202. X
  203. X  3. You may copy and distribute the Program (or a work based on it,
  204. Xunder Section 2) in object code or executable form under the terms of
  205. XSections 1 and 2 above provided that you also do one of the following:
  206. X
  207. X    a) Accompany it with the complete corresponding machine-readable
  208. X    source code, which must be distributed under the terms of Sections
  209. X    1 and 2 above on a medium customarily used for software interchange; or,
  210. X
  211. X    b) Accompany it with a written offer, valid for at least three
  212. X    years, to give any third party, for a charge no more than your
  213. X    cost of physically performing source distribution, a complete
  214. X    machine-readable copy of the corresponding source code, to be
  215. X    distributed under the terms of Sections 1 and 2 above on a medium
  216. X    customarily used for software interchange; or,
  217. X
  218. X    c) Accompany it with the information you received as to the offer
  219. X    to distribute corresponding source code.  (This alternative is
  220. X    allowed only for noncommercial distribution and only if you
  221. X    received the program in object code or executable form with such
  222. X    an offer, in accord with Subsection b above.)
  223. X
  224. XThe source code for a work means the preferred form of the work for
  225. Xmaking modifications to it.  For an executable work, complete source
  226. Xcode means all the source code for all modules it contains, plus any
  227. Xassociated interface definition files, plus the scripts used to
  228. Xcontrol compilation and installation of the executable.  However, as a
  229. Xspecial exception, the source code distributed need not include
  230. Xanything that is normally distributed (in either source or binary
  231. Xform) with the major components (compiler, kernel, and so on) of the
  232. Xoperating system on which the executable runs, unless that component
  233. Xitself accompanies the executable.
  234. X
  235. XIf distribution of executable or object code is made by offering
  236. Xaccess to copy from a designated place, then offering equivalent
  237. Xaccess to copy the source code from the same place counts as
  238. Xdistribution of the source code, even though third parties are not
  239. Xcompelled to copy the source along with the object code.
  240. X
  241. X  4. You may not copy, modify, sublicense, or distribute the Program
  242. Xexcept as expressly provided under this License.  Any attempt
  243. Xotherwise to copy, modify, sublicense or distribute the Program is
  244. Xvoid, and will automatically terminate your rights under this License.
  245. XHowever, parties who have received copies, or rights, from you under
  246. Xthis License will not have their licenses terminated so long as such
  247. Xparties remain in full compliance.
  248. X
  249. X  5. You are not required to accept this License, since you have not
  250. Xsigned it.  However, nothing else grants you permission to modify or
  251. Xdistribute the Program or its derivative works.  These actions are
  252. Xprohibited by law if you do not accept this License.  Therefore, by
  253. Xmodifying or distributing the Program (or any work based on the
  254. XProgram), you indicate your acceptance of this License to do so, and
  255. Xall its terms and conditions for copying, distributing or modifying
  256. Xthe Program or works based on it.
  257. X
  258. X  6. Each time you redistribute the Program (or any work based on the
  259. XProgram), the recipient automatically receives a license from the
  260. Xoriginal licensor to copy, distribute or modify the Program subject to
  261. Xthese terms and conditions.  You may not impose any further
  262. Xrestrictions on the recipients' exercise of the rights granted herein.
  263. XYou are not responsible for enforcing compliance by third parties to
  264. Xthis License.
  265. X
  266. X  7. If, as a consequence of a court judgment or allegation of patent
  267. Xinfringement or for any other reason (not limited to patent issues),
  268. Xconditions are imposed on you (whether by court order, agreement or
  269. Xotherwise) that contradict the conditions of this License, they do not
  270. Xexcuse you from the conditions of this License.  If you cannot
  271. Xdistribute so as to satisfy simultaneously your obligations under this
  272. XLicense and any other pertinent obligations, then as a consequence you
  273. Xmay not distribute the Program at all.  For example, if a patent
  274. Xlicense would not permit royalty-free redistribution of the Program by
  275. Xall those who receive copies directly or indirectly through you, then
  276. Xthe only way you could satisfy both it and this License would be to
  277. Xrefrain entirely from distribution of the Program.
  278. X
  279. XIf any portion of this section is held invalid or unenforceable under
  280. Xany particular circumstance, the balance of the section is intended to
  281. Xapply and the section as a whole is intended to apply in other
  282. Xcircumstances.
  283. X
  284. XIt is not the purpose of this section to induce you to infringe any
  285. Xpatents or other property right claims or to contest validity of any
  286. Xsuch claims; this section has the sole purpose of protecting the
  287. Xintegrity of the free software distribution system, which is
  288. Ximplemented by public license practices.  Many people have made
  289. Xgenerous contributions to the wide range of software distributed
  290. Xthrough that system in reliance on consistent application of that
  291. Xsystem; it is up to the author/donor to decide if he or she is willing
  292. Xto distribute software through any other system and a licensee cannot
  293. Ximpose that choice.
  294. X
  295. XThis section is intended to make thoroughly clear what is believed to
  296. Xbe a consequence of the rest of this License.
  297. X
  298. X  8. If the distribution and/or use of the Program is restricted in
  299. Xcertain countries either by patents or by copyrighted interfaces, the
  300. Xoriginal copyright holder who places the Program under this License
  301. Xmay add an explicit geographical distribution limitation excluding
  302. Xthose countries, so that distribution is permitted only in or among
  303. Xcountries not thus excluded.  In such case, this License incorporates
  304. Xthe limitation as if written in the body of this License.
  305. X
  306. X  9. The Free Software Foundation may publish revised and/or new versions
  307. Xof the General Public License from time to time.  Such new versions will
  308. Xbe similar in spirit to the present version, but may differ in detail to
  309. Xaddress new problems or concerns.
  310. X
  311. XEach version is given a distinguishing version number.  If the Program
  312. Xspecifies a version number of this License which applies to it and "any
  313. Xlater version", you have the option of following the terms and conditions
  314. Xeither of that version or of any later version published by the Free
  315. XSoftware Foundation.  If the Program does not specify a version number of
  316. Xthis License, you may choose any version ever published by the Free Software
  317. XFoundation.
  318. X
  319. X  10. If you wish to incorporate parts of the Program into other free
  320. Xprograms whose distribution conditions are different, write to the author
  321. Xto ask for permission.  For software which is copyrighted by the Free
  322. XSoftware Foundation, write to the Free Software Foundation; we sometimes
  323. Xmake exceptions for this.  Our decision will be guided by the two goals
  324. Xof preserving the free status of all derivatives of our free software and
  325. Xof promoting the sharing and reuse of software generally.
  326. X
  327. X                NO WARRANTY
  328. X
  329. X  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
  330. XFOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
  331. XOTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
  332. XPROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
  333. XOR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  334. XMERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
  335. XTO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
  336. XPROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
  337. XREPAIR OR CORRECTION.
  338. X
  339. X  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
  340. XWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
  341. XREDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
  342. XINCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
  343. XOUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
  344. XTO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
  345. XYOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
  346. XPROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
  347. XPOSSIBILITY OF SUCH DAMAGES.
  348. X
  349. X             END OF TERMS AND CONDITIONS
  350. X
  351. X    Appendix: How to Apply These Terms to Your New Programs
  352. X
  353. X  If you develop a new program, and you want it to be of the greatest
  354. Xpossible use to the public, the best way to achieve this is to make it
  355. Xfree software which everyone can redistribute and change under these terms.
  356. X
  357. X  To do so, attach the following notices to the program.  It is safest
  358. Xto attach them to the start of each source file to most effectively
  359. Xconvey the exclusion of warranty; and each file should have at least
  360. Xthe "copyright" line and a pointer to where the full notice is found.
  361. X
  362. X    <one line to give the program's name and a brief idea of what it does.>
  363. X    Copyright (C) 19yy  <name of author>
  364. X
  365. X    This program is free software; you can redistribute it and/or modify
  366. X    it under the terms of the GNU General Public License as published by
  367. X    the Free Software Foundation; either version 2 of the License, or
  368. X    (at your option) any later version.
  369. X
  370. X    This program is distributed in the hope that it will be useful,
  371. X    but WITHOUT ANY WARRANTY; without even the implied warranty of
  372. X    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  373. X    GNU General Public License for more details.
  374. X
  375. X    You should have received a copy of the GNU General Public License
  376. X    along with this program; if not, write to the Free Software
  377. X    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  378. X
  379. XAlso add information on how to contact you by electronic and paper mail.
  380. X
  381. XIf the program is interactive, make it output a short notice like this
  382. Xwhen it starts in an interactive mode:
  383. X
  384. X    Gnomovision version 69, Copyright (C) 19yy name of author
  385. X    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
  386. X    This is free software, and you are welcome to redistribute it
  387. X    under certain conditions; type `show c' for details.
  388. X
  389. XThe hypothetical commands `show w' and `show c' should show the appropriate
  390. Xparts of the General Public License.  Of course, the commands you use may
  391. Xbe called something other than `show w' and `show c'; they could even be
  392. Xmouse-clicks or menu items--whatever suits your program.
  393. X
  394. XYou should also get your employer (if you work as a programmer) or your
  395. Xschool, if any, to sign a "copyright disclaimer" for the program, if
  396. Xnecessary.  Here is a sample; alter the names:
  397. X
  398. X  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
  399. X  `Gnomovision' (which makes passes at compilers) written by James Hacker.
  400. X
  401. X  <signature of Ty Coon>, 1 April 1989
  402. X  Ty Coon, President of Vice
  403. X
  404. XThis General Public License does not permit incorporating your program into
  405. Xproprietary programs.  If your program is a subroutine library, you may
  406. Xconsider it more useful to permit linking proprietary applications with the
  407. Xlibrary.  If this is what you want to do, use the GNU Library General
  408. XPublic License instead of this License.
  409. END_OF_FILE
  410.   if test 17982 -ne `wc -c <'rocat-0.75/src/COPYING'`; then
  411.     echo shar: \"'rocat-0.75/src/COPYING'\" unpacked with wrong size!
  412.   fi
  413.   chmod +x 'rocat-0.75/src/COPYING'
  414.   # end of 'rocat-0.75/src/COPYING'
  415. fi
  416. if test -f 'rocat-0.75/src/Makefile.orig' -a "${1}" != "-c" ; then 
  417.   echo shar: Will not clobber existing file \"'rocat-0.75/src/Makefile.orig'\"
  418. else
  419.   echo shar: Extracting \"'rocat-0.75/src/Makefile.orig'\" \(33621 characters\)
  420.   sed "s/^X//" >'rocat-0.75/src/Makefile.orig' <<'END_OF_FILE'
  421. X# 
  422. X#  Makefile for the rocat BBS System
  423. X#  Copyright C 1994 by Gregory Shaw
  424. X# 
  425. X#  Don't look here!  The docs are in the doc directory.
  426. X#
  427. X
  428. XCC=gcc
  429. XCFLAGS= -g -D_POSIX_SOURCE -Wall
  430. XLIBS=-lm
  431. X
  432. X
  433. 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
  434. X
  435. X.SUFFIXES: .C .o
  436. X
  437. X.C.o:
  438. X    $(CC) -c $(CFLAGS) $<
  439. X
  440. X
  441. X
  442. X
  443. Xall: fileutil
  444. X
  445. Xbackup:    clean
  446. X    cd ../..;tar cvf /dev/fd0H1440 rocat
  447. X    @echo Backup complete!
  448. X
  449. Xbbs:    bbs.o user.o bbsint.o bbsipc.o bbsinfo.o errlog.o filelock.o \
  450. X    menu.o files.o dllist.o moncon.o sysexec.o
  451. X    $(CC) -g -o bbs bbs.o user.o filelock.o bbsint.o bbsipc.o menu.o \
  452. X    bbsinfo.o errlog.o dllist.o files.o moncon.o sysexec.o $(LIBS)
  453. X
  454. Xbbsipc: bbsipc.o
  455. X
  456. Xclean:
  457. X    rm -f *.o
  458. X    rm -f core
  459. X    rm -f bbs
  460. X    rm -f *test
  461. X    rm -f errlogd
  462. X    rm -f monitor
  463. X    rm -f fileutil
  464. X
  465. Xchsh: chsh.o
  466. X    $(CC) -g -o chsh chsh.c
  467. X
  468. Xdepend:    
  469. X    makedepend *.C
  470. X
  471. Xdltest:    dltest.o dllist.o
  472. X    $(CC) -o dltest dltest.o dllist.o
  473. X
  474. Xerrlogd:  errlogd.o
  475. X    $(CC) -c $(CFLAGS) -D_SERVER_ errlogd.C
  476. X    $(CC) -c $(CFLAGS) -D_SERVER_ bbsipc.C
  477. X    $(CC) -o errlogd errlogd.o bbsipc.o $(LIBS)
  478. X
  479. 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
  480. 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)
  481. X
  482. Xfilesupdate:    filesupdate.o
  483. X    $(CC) -o filesupdate filesupdate.o
  484. X
  485. Xinstall-manwe: bbs errlogd fileutil monitor
  486. X    strip bbs errlogd fileutil monitor
  487. X    cp fileutil /bbs/bin
  488. X    chmod 775 bbs
  489. X    rm -f /bbs/rocat
  490. X    cp bbs /bbs/rocat
  491. X    chgrp bbs /bbs/rocat
  492. X    chmod g+s /bbs/rocat
  493. X    chmod 775 monitor
  494. X    chgrp bbs monitor
  495. X    cp monitor /bbs/bin
  496. X    chmod 775 errlogd
  497. X    chgrp bbs errlogd
  498. X    chmod g+s errlogd
  499. X    cp errlogd /bbs/bin
  500. X
  501. Xinstall: bbs errlogd fileutil monitor
  502. X    strip bbs errlogd fileutil monitor
  503. X    cp fileutil $(BBSDIR)/bin
  504. X    chmod 775 bbs
  505. X    rm -f $(BBSDIR)/rocat
  506. X    cp bbs $(BBSDIR)/rocat
  507. X    chgrp bbs $(BBSDIR)/rocat
  508. X    chmod g+s $(BBSDIR)/rocat
  509. X    chmod 775 monitor
  510. X    chgrp bbs monitor
  511. X    cp monitor $(BBSDIR)/bin
  512. X    chmod 775 errlogd
  513. X    chgrp bbs errlogd
  514. X    chmod g+s errlogd
  515. X    cp errlogd $(BBSDIR)/bin
  516. X
  517. Xmenutest:    menutest.o user.o bbsint.o bbsipc.o bbsinfo.o errlog.o filelock.o menu.o
  518. X    $(CC) -g -o menutest menutest.o user.o filelock.o bbsint.o bbsipc.o menu.o bbsinfo.o errlog.o $(LIBS)
  519. X
  520. Xmonitor: bbsint.o monitor.o
  521. X    $(CC) -c $(CFLAGS) -D_SERVER_ bbsipc.C
  522. X    $(CC) -c $(CFLAGS) -D_SERVER_ monitor.C
  523. X    $(CC) -g -o monitor monitor.o bbsipc.o $(LIBS)
  524. X
  525. Xtest:    test.o user.o bbsint.o bbsipc.o bbsinfo.o errlog.o filelock.o 
  526. X    $(CC) -g -o test test.o menu.o user.o filelock.o bbsint.o bbsipc.o bbsinfo.o errlog.o $(LIBS)
  527. X
  528. Xtestipc: testipc.o bbsipc
  529. X    $(CC) -g -o testipc testipc.o bbsipc.o $(LIBS)
  530. X
  531. Xtestinfo:    testinfo.o    bbsinfo.o
  532. X    $(CC) -g -o testinfo testinfo.o bbsinfo.o $(LIBS)
  533. X
  534. Xuser: user.o bbsint.o 
  535. X
  536. Xusertest:    usertest.o user.o bbsint.o bbsipc.o bbsinfo.o errlog.o filelock.o 
  537. X    $(CC) -g -o usertest usertest.o user.o filelock.o bbsint.o bbsipc.o bbsinfo.o errlog.o $(LIBS)
  538. X
  539. X# dependancies
  540. X
  541. X# DO NOT DELETE THIS LINE -- make depend depends on it.
  542. X
  543. Xbbs.o: bbshdr.h /usr/include/stdio.h /usr/include/libio.h
  544. Xbbs.o: /usr/include/sys/cdefs.h /usr/include/ctype.h /usr/include/features.h
  545. Xbbs.o: /usr/include/fcntl.h /usr/include/sys/types.h
  546. Xbbs.o: /usr/include/linux/types.h /usr/include/linux/fcntl.h
  547. Xbbs.o: /usr/include/assert.h /usr/include/termio.h /usr/include/termios.h
  548. Xbbs.o: /usr/include/linux/termios.h /usr/include/string.h
  549. Xbbs.o: /usr/include/limits.h /usr/include/sys/time.h
  550. Xbbs.o: /usr/include/linux/time.h /usr/include/sys/time.h
  551. Xbbs.o: /usr/include/rpc/types.h /usr/include/sys/stat.h
  552. Xbbs.o: /usr/include/linux/stat.h /usr/include/errno.h
  553. Xbbs.o: /usr/include/linux/errno.h /usr/include/signal.h
  554. Xbbs.o: /usr/include/linux/signal.h /usr/include/sys/socket.h
  555. Xbbs.o: /usr/include/linux/socket.h /usr/include/linux/sockios.h
  556. Xbbs.o: /usr/include/stdlib.h /usr/include/sys/wait.h /usr/include/gnu/types.h
  557. Xbbs.o: /usr/include/waitflags.h /usr/include/waitstatus.h
  558. Xbbs.o: /usr/include/netinet/in.h /usr/include/linux/in.h /usr/include/netdb.h
  559. Xbbs.o: /usr/include/paths.h /usr/include/unistd.h /usr/include/posix_opt.h
  560. Xbbs.o: /usr/include/pwd.h /usr/include/dirent.h /usr/include/linux/limits.h
  561. Xbbs.o: /usr/include/linux/dirent.h /usr/include/math.h
  562. Xbbs.o: /usr/include/huge_val.h /usr/include/endian.h /usr/include/bytesex.h
  563. Xbbs.o: /usr/include/values.h bbsipc.h bbsinfo.h ports.h errlog.h filelock.h
  564. Xbbs.o: sysexec.h bbsint.h user.h menu.h bbs.h dllist.h files.h moncon.h
  565. Xbbsinfo.o: bbshdr.h /usr/include/stdio.h /usr/include/libio.h
  566. Xbbsinfo.o: /usr/include/sys/cdefs.h /usr/include/ctype.h
  567. Xbbsinfo.o: /usr/include/features.h /usr/include/fcntl.h
  568. Xbbsinfo.o: /usr/include/sys/types.h /usr/include/linux/types.h
  569. Xbbsinfo.o: /usr/include/linux/fcntl.h /usr/include/assert.h
  570. Xbbsinfo.o: /usr/include/termio.h /usr/include/termios.h
  571. Xbbsinfo.o: /usr/include/linux/termios.h /usr/include/string.h
  572. Xbbsinfo.o: /usr/include/limits.h /usr/include/sys/time.h
  573. Xbbsinfo.o: /usr/include/linux/time.h /usr/include/sys/time.h
  574. Xbbsinfo.o: /usr/include/rpc/types.h /usr/include/sys/stat.h
  575. Xbbsinfo.o: /usr/include/linux/stat.h /usr/include/errno.h
  576. Xbbsinfo.o: /usr/include/linux/errno.h /usr/include/signal.h
  577. Xbbsinfo.o: /usr/include/linux/signal.h /usr/include/sys/socket.h
  578. Xbbsinfo.o: /usr/include/linux/socket.h /usr/include/linux/sockios.h
  579. Xbbsinfo.o: /usr/include/stdlib.h /usr/include/sys/wait.h
  580. Xbbsinfo.o: /usr/include/gnu/types.h /usr/include/waitflags.h
  581. Xbbsinfo.o: /usr/include/waitstatus.h /usr/include/netinet/in.h
  582. Xbbsinfo.o: /usr/include/linux/in.h /usr/include/netdb.h /usr/include/paths.h
  583. Xbbsinfo.o: /usr/include/unistd.h /usr/include/posix_opt.h /usr/include/pwd.h
  584. Xbbsinfo.o: /usr/include/dirent.h /usr/include/linux/limits.h
  585. Xbbsinfo.o: /usr/include/linux/dirent.h /usr/include/math.h
  586. Xbbsinfo.o: /usr/include/huge_val.h /usr/include/endian.h
  587. Xbbsinfo.o: /usr/include/bytesex.h /usr/include/values.h bbsipc.h bbsinfo.h
  588. Xbbsinfo.o: ports.h errlog.h filelock.h sysexec.h bbsint.h user.h menu.h bbs.h
  589. Xbbsinfo.o: dllist.h files.h moncon.h
  590. Xbbsint.o: bbshdr.h /usr/include/stdio.h /usr/include/libio.h
  591. Xbbsint.o: /usr/include/sys/cdefs.h /usr/include/ctype.h
  592. Xbbsint.o: /usr/include/features.h /usr/include/fcntl.h
  593. Xbbsint.o: /usr/include/sys/types.h /usr/include/linux/types.h
  594. Xbbsint.o: /usr/include/linux/fcntl.h /usr/include/assert.h
  595. Xbbsint.o: /usr/include/termio.h /usr/include/termios.h
  596. Xbbsint.o: /usr/include/linux/termios.h /usr/include/string.h
  597. Xbbsint.o: /usr/include/limits.h /usr/include/sys/time.h
  598. Xbbsint.o: /usr/include/linux/time.h /usr/include/sys/time.h
  599. Xbbsint.o: /usr/include/rpc/types.h /usr/include/sys/stat.h
  600. Xbbsint.o: /usr/include/linux/stat.h /usr/include/errno.h
  601. Xbbsint.o: /usr/include/linux/errno.h /usr/include/signal.h
  602. Xbbsint.o: /usr/include/linux/signal.h /usr/include/sys/socket.h
  603. Xbbsint.o: /usr/include/linux/socket.h /usr/include/linux/sockios.h
  604. Xbbsint.o: /usr/include/stdlib.h /usr/include/sys/wait.h
  605. Xbbsint.o: /usr/include/gnu/types.h /usr/include/waitflags.h
  606. Xbbsint.o: /usr/include/waitstatus.h /usr/include/netinet/in.h
  607. Xbbsint.o: /usr/include/linux/in.h /usr/include/netdb.h /usr/include/paths.h
  608. Xbbsint.o: /usr/include/unistd.h /usr/include/posix_opt.h /usr/include/pwd.h
  609. Xbbsint.o: /usr/include/dirent.h /usr/include/linux/limits.h
  610. Xbbsint.o: /usr/include/linux/dirent.h /usr/include/math.h
  611. Xbbsint.o: /usr/include/huge_val.h /usr/include/endian.h
  612. Xbbsint.o: /usr/include/bytesex.h /usr/include/values.h bbsipc.h bbsinfo.h
  613. Xbbsint.o: ports.h errlog.h filelock.h sysexec.h bbsint.h user.h menu.h bbs.h
  614. Xbbsint.o: dllist.h files.h moncon.h
  615. Xbbsipc.o: bbshdr.h /usr/include/stdio.h /usr/include/libio.h
  616. Xbbsipc.o: /usr/include/sys/cdefs.h /usr/include/ctype.h
  617. Xbbsipc.o: /usr/include/features.h /usr/include/fcntl.h
  618. Xbbsipc.o: /usr/include/sys/types.h /usr/include/linux/types.h
  619. Xbbsipc.o: /usr/include/linux/fcntl.h /usr/include/assert.h
  620. Xbbsipc.o: /usr/include/termio.h /usr/include/termios.h
  621. Xbbsipc.o: /usr/include/linux/termios.h /usr/include/string.h
  622. Xbbsipc.o: /usr/include/limits.h /usr/include/sys/time.h
  623. Xbbsipc.o: /usr/include/linux/time.h /usr/include/sys/time.h
  624. Xbbsipc.o: /usr/include/rpc/types.h /usr/include/sys/stat.h
  625. Xbbsipc.o: /usr/include/linux/stat.h /usr/include/errno.h
  626. Xbbsipc.o: /usr/include/linux/errno.h /usr/include/signal.h
  627. Xbbsipc.o: /usr/include/linux/signal.h /usr/include/sys/socket.h
  628. Xbbsipc.o: /usr/include/linux/socket.h /usr/include/linux/sockios.h
  629. Xbbsipc.o: /usr/include/stdlib.h /usr/include/sys/wait.h
  630. Xbbsipc.o: /usr/include/gnu/types.h /usr/include/waitflags.h
  631. Xbbsipc.o: /usr/include/waitstatus.h /usr/include/netinet/in.h
  632. Xbbsipc.o: /usr/include/linux/in.h /usr/include/netdb.h /usr/include/paths.h
  633. Xbbsipc.o: /usr/include/unistd.h /usr/include/posix_opt.h /usr/include/pwd.h
  634. Xbbsipc.o: /usr/include/dirent.h /usr/include/linux/limits.h
  635. Xbbsipc.o: /usr/include/linux/dirent.h /usr/include/math.h
  636. Xbbsipc.o: /usr/include/huge_val.h /usr/include/endian.h
  637. Xbbsipc.o: /usr/include/bytesex.h /usr/include/values.h bbsipc.h bbsinfo.h
  638. Xbbsipc.o: ports.h errlog.h filelock.h sysexec.h bbsint.h user.h menu.h bbs.h
  639. Xbbsipc.o: dllist.h files.h moncon.h
  640. Xdllist.o: bbshdr.h /usr/include/stdio.h /usr/include/libio.h
  641. Xdllist.o: /usr/include/sys/cdefs.h /usr/include/ctype.h
  642. Xdllist.o: /usr/include/features.h /usr/include/fcntl.h
  643. Xdllist.o: /usr/include/sys/types.h /usr/include/linux/types.h
  644. Xdllist.o: /usr/include/linux/fcntl.h /usr/include/assert.h
  645. Xdllist.o: /usr/include/termio.h /usr/include/termios.h
  646. Xdllist.o: /usr/include/linux/termios.h /usr/include/string.h
  647. Xdllist.o: /usr/include/limits.h /usr/include/sys/time.h
  648. Xdllist.o: /usr/include/linux/time.h /usr/include/sys/time.h
  649. Xdllist.o: /usr/include/rpc/types.h /usr/include/sys/stat.h
  650. Xdllist.o: /usr/include/linux/stat.h /usr/include/errno.h
  651. Xdllist.o: /usr/include/linux/errno.h /usr/include/signal.h
  652. Xdllist.o: /usr/include/linux/signal.h /usr/include/sys/socket.h
  653. Xdllist.o: /usr/include/linux/socket.h /usr/include/linux/sockios.h
  654. Xdllist.o: /usr/include/stdlib.h /usr/include/sys/wait.h
  655. Xdllist.o: /usr/include/gnu/types.h /usr/include/waitflags.h
  656. Xdllist.o: /usr/include/waitstatus.h /usr/include/netinet/in.h
  657. Xdllist.o: /usr/include/linux/in.h /usr/include/netdb.h /usr/include/paths.h
  658. Xdllist.o: /usr/include/unistd.h /usr/include/posix_opt.h /usr/include/pwd.h
  659. Xdllist.o: /usr/include/dirent.h /usr/include/linux/limits.h
  660. Xdllist.o: /usr/include/linux/dirent.h /usr/include/math.h
  661. Xdllist.o: /usr/include/huge_val.h /usr/include/endian.h
  662. Xdllist.o: /usr/include/bytesex.h /usr/include/values.h bbsipc.h bbsinfo.h
  663. Xdllist.o: ports.h errlog.h filelock.h sysexec.h bbsint.h user.h menu.h bbs.h
  664. Xdllist.o: dllist.h files.h moncon.h
  665. Xdltest.o: /usr/include/stdio.h /usr/include/libio.h /usr/include/sys/cdefs.h
  666. Xdltest.o: dllist.h bbshdr.h /usr/include/ctype.h /usr/include/features.h
  667. Xdltest.o: /usr/include/fcntl.h /usr/include/sys/types.h
  668. Xdltest.o: /usr/include/linux/types.h /usr/include/linux/fcntl.h
  669. Xdltest.o: /usr/include/assert.h /usr/include/termio.h /usr/include/termios.h
  670. Xdltest.o: /usr/include/linux/termios.h /usr/include/string.h
  671. Xdltest.o: /usr/include/limits.h /usr/include/sys/time.h
  672. Xdltest.o: /usr/include/linux/time.h /usr/include/sys/time.h
  673. Xdltest.o: /usr/include/rpc/types.h /usr/include/sys/stat.h
  674. Xdltest.o: /usr/include/linux/stat.h /usr/include/errno.h
  675. Xdltest.o: /usr/include/linux/errno.h /usr/include/signal.h
  676. Xdltest.o: /usr/include/linux/signal.h /usr/include/sys/socket.h
  677. Xdltest.o: /usr/include/linux/socket.h /usr/include/linux/sockios.h
  678. Xdltest.o: /usr/include/stdlib.h /usr/include/sys/wait.h
  679. Xdltest.o: /usr/include/gnu/types.h /usr/include/waitflags.h
  680. Xdltest.o: /usr/include/waitstatus.h /usr/include/netinet/in.h
  681. Xdltest.o: /usr/include/linux/in.h /usr/include/netdb.h /usr/include/paths.h
  682. Xdltest.o: /usr/include/unistd.h /usr/include/posix_opt.h /usr/include/pwd.h
  683. Xdltest.o: /usr/include/dirent.h /usr/include/linux/limits.h
  684. Xdltest.o: /usr/include/linux/dirent.h /usr/include/math.h
  685. Xdltest.o: /usr/include/huge_val.h /usr/include/endian.h
  686. Xdltest.o: /usr/include/bytesex.h /usr/include/values.h bbsipc.h bbsinfo.h
  687. Xdltest.o: ports.h errlog.h filelock.h sysexec.h bbsint.h user.h menu.h bbs.h
  688. Xdltest.o: files.h moncon.h
  689. Xerrlog.o: bbshdr.h /usr/include/stdio.h /usr/include/libio.h
  690. Xerrlog.o: /usr/include/sys/cdefs.h /usr/include/ctype.h
  691. Xerrlog.o: /usr/include/features.h /usr/include/fcntl.h
  692. Xerrlog.o: /usr/include/sys/types.h /usr/include/linux/types.h
  693. Xerrlog.o: /usr/include/linux/fcntl.h /usr/include/assert.h
  694. Xerrlog.o: /usr/include/termio.h /usr/include/termios.h
  695. Xerrlog.o: /usr/include/linux/termios.h /usr/include/string.h
  696. Xerrlog.o: /usr/include/limits.h /usr/include/sys/time.h
  697. Xerrlog.o: /usr/include/linux/time.h /usr/include/sys/time.h
  698. Xerrlog.o: /usr/include/rpc/types.h /usr/include/sys/stat.h
  699. Xerrlog.o: /usr/include/linux/stat.h /usr/include/errno.h
  700. Xerrlog.o: /usr/include/linux/errno.h /usr/include/signal.h
  701. Xerrlog.o: /usr/include/linux/signal.h /usr/include/sys/socket.h
  702. Xerrlog.o: /usr/include/linux/socket.h /usr/include/linux/sockios.h
  703. Xerrlog.o: /usr/include/stdlib.h /usr/include/sys/wait.h
  704. Xerrlog.o: /usr/include/gnu/types.h /usr/include/waitflags.h
  705. Xerrlog.o: /usr/include/waitstatus.h /usr/include/netinet/in.h
  706. Xerrlog.o: /usr/include/linux/in.h /usr/include/netdb.h /usr/include/paths.h
  707. Xerrlog.o: /usr/include/unistd.h /usr/include/posix_opt.h /usr/include/pwd.h
  708. Xerrlog.o: /usr/include/dirent.h /usr/include/linux/limits.h
  709. Xerrlog.o: /usr/include/linux/dirent.h /usr/include/math.h
  710. Xerrlog.o: /usr/include/huge_val.h /usr/include/endian.h
  711. Xerrlog.o: /usr/include/bytesex.h /usr/include/values.h bbsipc.h bbsinfo.h
  712. Xerrlog.o: ports.h errlog.h filelock.h sysexec.h bbsint.h user.h menu.h bbs.h
  713. Xerrlog.o: dllist.h files.h moncon.h
  714. Xerrlogd.o: bbshdr.h /usr/include/stdio.h /usr/include/libio.h
  715. Xerrlogd.o: /usr/include/sys/cdefs.h /usr/include/ctype.h
  716. Xerrlogd.o: /usr/include/features.h /usr/include/fcntl.h
  717. Xerrlogd.o: /usr/include/sys/types.h /usr/include/linux/types.h
  718. Xerrlogd.o: /usr/include/linux/fcntl.h /usr/include/assert.h
  719. Xerrlogd.o: /usr/include/termio.h /usr/include/termios.h
  720. Xerrlogd.o: /usr/include/linux/termios.h /usr/include/string.h
  721. Xerrlogd.o: /usr/include/limits.h /usr/include/sys/time.h
  722. Xerrlogd.o: /usr/include/linux/time.h /usr/include/sys/time.h
  723. Xerrlogd.o: /usr/include/rpc/types.h /usr/include/sys/stat.h
  724. Xerrlogd.o: /usr/include/linux/stat.h /usr/include/errno.h
  725. Xerrlogd.o: /usr/include/linux/errno.h /usr/include/signal.h
  726. Xerrlogd.o: /usr/include/linux/signal.h /usr/include/sys/socket.h
  727. Xerrlogd.o: /usr/include/linux/socket.h /usr/include/linux/sockios.h
  728. Xerrlogd.o: /usr/include/stdlib.h /usr/include/sys/wait.h
  729. Xerrlogd.o: /usr/include/gnu/types.h /usr/include/waitflags.h
  730. Xerrlogd.o: /usr/include/waitstatus.h /usr/include/netinet/in.h
  731. Xerrlogd.o: /usr/include/linux/in.h /usr/include/netdb.h /usr/include/paths.h
  732. Xerrlogd.o: /usr/include/unistd.h /usr/include/posix_opt.h /usr/include/pwd.h
  733. Xerrlogd.o: /usr/include/dirent.h /usr/include/linux/limits.h
  734. Xerrlogd.o: /usr/include/linux/dirent.h /usr/include/math.h
  735. Xerrlogd.o: /usr/include/huge_val.h /usr/include/endian.h
  736. Xerrlogd.o: /usr/include/bytesex.h /usr/include/values.h bbsipc.h bbsinfo.h
  737. Xerrlogd.o: ports.h errlog.h filelock.h sysexec.h bbsint.h user.h menu.h bbs.h
  738. Xerrlogd.o: dllist.h files.h moncon.h
  739. Xfilelock.o: bbshdr.h /usr/include/stdio.h /usr/include/libio.h
  740. Xfilelock.o: /usr/include/sys/cdefs.h /usr/include/ctype.h
  741. Xfilelock.o: /usr/include/features.h /usr/include/fcntl.h
  742. Xfilelock.o: /usr/include/sys/types.h /usr/include/linux/types.h
  743. Xfilelock.o: /usr/include/linux/fcntl.h /usr/include/assert.h
  744. Xfilelock.o: /usr/include/termio.h /usr/include/termios.h
  745. Xfilelock.o: /usr/include/linux/termios.h /usr/include/string.h
  746. Xfilelock.o: /usr/include/limits.h /usr/include/sys/time.h
  747. Xfilelock.o: /usr/include/linux/time.h /usr/include/sys/time.h
  748. Xfilelock.o: /usr/include/rpc/types.h /usr/include/sys/stat.h
  749. Xfilelock.o: /usr/include/linux/stat.h /usr/include/errno.h
  750. Xfilelock.o: /usr/include/linux/errno.h /usr/include/signal.h
  751. Xfilelock.o: /usr/include/linux/signal.h /usr/include/sys/socket.h
  752. Xfilelock.o: /usr/include/linux/socket.h /usr/include/linux/sockios.h
  753. Xfilelock.o: /usr/include/stdlib.h /usr/include/sys/wait.h
  754. Xfilelock.o: /usr/include/gnu/types.h /usr/include/waitflags.h
  755. Xfilelock.o: /usr/include/waitstatus.h /usr/include/netinet/in.h
  756. Xfilelock.o: /usr/include/linux/in.h /usr/include/netdb.h /usr/include/paths.h
  757. Xfilelock.o: /usr/include/unistd.h /usr/include/posix_opt.h /usr/include/pwd.h
  758. Xfilelock.o: /usr/include/dirent.h /usr/include/linux/limits.h
  759. Xfilelock.o: /usr/include/linux/dirent.h /usr/include/math.h
  760. Xfilelock.o: /usr/include/huge_val.h /usr/include/endian.h
  761. Xfilelock.o: /usr/include/bytesex.h /usr/include/values.h bbsipc.h bbsinfo.h
  762. Xfilelock.o: ports.h errlog.h filelock.h sysexec.h bbsint.h user.h menu.h bbs.h
  763. Xfilelock.o: dllist.h files.h moncon.h
  764. Xfiles.o: bbshdr.h /usr/include/stdio.h /usr/include/libio.h
  765. Xfiles.o: /usr/include/sys/cdefs.h /usr/include/ctype.h
  766. Xfiles.o: /usr/include/features.h /usr/include/fcntl.h
  767. Xfiles.o: /usr/include/sys/types.h /usr/include/linux/types.h
  768. Xfiles.o: /usr/include/linux/fcntl.h /usr/include/assert.h
  769. Xfiles.o: /usr/include/termio.h /usr/include/termios.h
  770. Xfiles.o: /usr/include/linux/termios.h /usr/include/string.h
  771. Xfiles.o: /usr/include/limits.h /usr/include/sys/time.h
  772. Xfiles.o: /usr/include/linux/time.h /usr/include/sys/time.h
  773. Xfiles.o: /usr/include/rpc/types.h /usr/include/sys/stat.h
  774. Xfiles.o: /usr/include/linux/stat.h /usr/include/errno.h
  775. Xfiles.o: /usr/include/linux/errno.h /usr/include/signal.h
  776. Xfiles.o: /usr/include/linux/signal.h /usr/include/sys/socket.h
  777. Xfiles.o: /usr/include/linux/socket.h /usr/include/linux/sockios.h
  778. Xfiles.o: /usr/include/stdlib.h /usr/include/sys/wait.h
  779. Xfiles.o: /usr/include/gnu/types.h /usr/include/waitflags.h
  780. Xfiles.o: /usr/include/waitstatus.h /usr/include/netinet/in.h
  781. Xfiles.o: /usr/include/linux/in.h /usr/include/netdb.h /usr/include/paths.h
  782. Xfiles.o: /usr/include/unistd.h /usr/include/posix_opt.h /usr/include/pwd.h
  783. Xfiles.o: /usr/include/dirent.h /usr/include/linux/limits.h
  784. Xfiles.o: /usr/include/linux/dirent.h /usr/include/math.h
  785. Xfiles.o: /usr/include/huge_val.h /usr/include/endian.h /usr/include/bytesex.h
  786. Xfiles.o: /usr/include/values.h bbsipc.h bbsinfo.h ports.h errlog.h filelock.h
  787. Xfiles.o: sysexec.h bbsint.h user.h menu.h bbs.h dllist.h files.h moncon.h
  788. Xfiletest.o: bbshdr.h /usr/include/stdio.h /usr/include/libio.h
  789. Xfiletest.o: /usr/include/sys/cdefs.h /usr/include/ctype.h
  790. Xfiletest.o: /usr/include/features.h /usr/include/fcntl.h
  791. Xfiletest.o: /usr/include/sys/types.h /usr/include/linux/types.h
  792. Xfiletest.o: /usr/include/linux/fcntl.h /usr/include/assert.h
  793. Xfiletest.o: /usr/include/termio.h /usr/include/termios.h
  794. Xfiletest.o: /usr/include/linux/termios.h /usr/include/string.h
  795. Xfiletest.o: /usr/include/limits.h /usr/include/sys/time.h
  796. Xfiletest.o: /usr/include/linux/time.h /usr/include/sys/time.h
  797. Xfiletest.o: /usr/include/rpc/types.h /usr/include/sys/stat.h
  798. Xfiletest.o: /usr/include/linux/stat.h /usr/include/errno.h
  799. Xfiletest.o: /usr/include/linux/errno.h /usr/include/signal.h
  800. Xfiletest.o: /usr/include/linux/signal.h /usr/include/sys/socket.h
  801. Xfiletest.o: /usr/include/linux/socket.h /usr/include/linux/sockios.h
  802. Xfiletest.o: /usr/include/stdlib.h /usr/include/sys/wait.h
  803. Xfiletest.o: /usr/include/gnu/types.h /usr/include/waitflags.h
  804. Xfiletest.o: /usr/include/waitstatus.h /usr/include/netinet/in.h
  805. Xfiletest.o: /usr/include/linux/in.h /usr/include/netdb.h /usr/include/paths.h
  806. Xfiletest.o: /usr/include/unistd.h /usr/include/posix_opt.h /usr/include/pwd.h
  807. Xfiletest.o: /usr/include/dirent.h /usr/include/linux/limits.h
  808. Xfiletest.o: /usr/include/linux/dirent.h /usr/include/math.h
  809. Xfiletest.o: /usr/include/huge_val.h /usr/include/endian.h
  810. Xfiletest.o: /usr/include/bytesex.h /usr/include/values.h bbsipc.h bbsinfo.h
  811. Xfiletest.o: ports.h errlog.h filelock.h sysexec.h bbsint.h user.h menu.h bbs.h
  812. Xfiletest.o: dllist.h files.h moncon.h
  813. Xfileutil.o: bbshdr.h /usr/include/stdio.h /usr/include/libio.h
  814. Xfileutil.o: /usr/include/sys/cdefs.h /usr/include/ctype.h
  815. Xfileutil.o: /usr/include/features.h /usr/include/fcntl.h
  816. Xfileutil.o: /usr/include/sys/types.h /usr/include/linux/types.h
  817. Xfileutil.o: /usr/include/linux/fcntl.h /usr/include/assert.h
  818. Xfileutil.o: /usr/include/termio.h /usr/include/termios.h
  819. Xfileutil.o: /usr/include/linux/termios.h /usr/include/string.h
  820. Xfileutil.o: /usr/include/limits.h /usr/include/sys/time.h
  821. Xfileutil.o: /usr/include/linux/time.h /usr/include/sys/time.h
  822. Xfileutil.o: /usr/include/rpc/types.h /usr/include/sys/stat.h
  823. Xfileutil.o: /usr/include/linux/stat.h /usr/include/errno.h
  824. Xfileutil.o: /usr/include/linux/errno.h /usr/include/signal.h
  825. Xfileutil.o: /usr/include/linux/signal.h /usr/include/sys/socket.h
  826. Xfileutil.o: /usr/include/linux/socket.h /usr/include/linux/sockios.h
  827. Xfileutil.o: /usr/include/stdlib.h /usr/include/sys/wait.h
  828. Xfileutil.o: /usr/include/gnu/types.h /usr/include/waitflags.h
  829. Xfileutil.o: /usr/include/waitstatus.h /usr/include/netinet/in.h
  830. Xfileutil.o: /usr/include/linux/in.h /usr/include/netdb.h /usr/include/paths.h
  831. Xfileutil.o: /usr/include/unistd.h /usr/include/posix_opt.h /usr/include/pwd.h
  832. Xfileutil.o: /usr/include/dirent.h /usr/include/linux/limits.h
  833. Xfileutil.o: /usr/include/linux/dirent.h /usr/include/math.h
  834. Xfileutil.o: /usr/include/huge_val.h /usr/include/endian.h
  835. Xfileutil.o: /usr/include/bytesex.h /usr/include/values.h bbsipc.h bbsinfo.h
  836. Xfileutil.o: ports.h errlog.h filelock.h sysexec.h bbsint.h user.h menu.h bbs.h
  837. Xfileutil.o: dllist.h files.h moncon.h fileutil.h
  838. Xmenu.o: bbshdr.h /usr/include/stdio.h /usr/include/libio.h
  839. Xmenu.o: /usr/include/sys/cdefs.h /usr/include/ctype.h /usr/include/features.h
  840. Xmenu.o: /usr/include/fcntl.h /usr/include/sys/types.h
  841. Xmenu.o: /usr/include/linux/types.h /usr/include/linux/fcntl.h
  842. Xmenu.o: /usr/include/assert.h /usr/include/termio.h /usr/include/termios.h
  843. Xmenu.o: /usr/include/linux/termios.h /usr/include/string.h
  844. Xmenu.o: /usr/include/limits.h /usr/include/sys/time.h
  845. Xmenu.o: /usr/include/linux/time.h /usr/include/sys/time.h
  846. Xmenu.o: /usr/include/rpc/types.h /usr/include/sys/stat.h
  847. Xmenu.o: /usr/include/linux/stat.h /usr/include/errno.h
  848. Xmenu.o: /usr/include/linux/errno.h /usr/include/signal.h
  849. Xmenu.o: /usr/include/linux/signal.h /usr/include/sys/socket.h
  850. Xmenu.o: /usr/include/linux/socket.h /usr/include/linux/sockios.h
  851. Xmenu.o: /usr/include/stdlib.h /usr/include/sys/wait.h
  852. Xmenu.o: /usr/include/gnu/types.h /usr/include/waitflags.h
  853. Xmenu.o: /usr/include/waitstatus.h /usr/include/netinet/in.h
  854. Xmenu.o: /usr/include/linux/in.h /usr/include/netdb.h /usr/include/paths.h
  855. Xmenu.o: /usr/include/unistd.h /usr/include/posix_opt.h /usr/include/pwd.h
  856. Xmenu.o: /usr/include/dirent.h /usr/include/linux/limits.h
  857. Xmenu.o: /usr/include/linux/dirent.h /usr/include/math.h
  858. Xmenu.o: /usr/include/huge_val.h /usr/include/endian.h /usr/include/bytesex.h
  859. Xmenu.o: /usr/include/values.h bbsipc.h bbsinfo.h ports.h errlog.h filelock.h
  860. Xmenu.o: sysexec.h bbsint.h user.h menu.h bbs.h dllist.h files.h moncon.h
  861. Xmenutest.o: /usr/include/stdio.h /usr/include/libio.h
  862. Xmenutest.o: /usr/include/sys/cdefs.h bbshdr.h /usr/include/ctype.h
  863. Xmenutest.o: /usr/include/features.h /usr/include/fcntl.h
  864. Xmenutest.o: /usr/include/sys/types.h /usr/include/linux/types.h
  865. Xmenutest.o: /usr/include/linux/fcntl.h /usr/include/assert.h
  866. Xmenutest.o: /usr/include/termio.h /usr/include/termios.h
  867. Xmenutest.o: /usr/include/linux/termios.h /usr/include/string.h
  868. Xmenutest.o: /usr/include/limits.h /usr/include/sys/time.h
  869. Xmenutest.o: /usr/include/linux/time.h /usr/include/sys/time.h
  870. Xmenutest.o: /usr/include/rpc/types.h /usr/include/sys/stat.h
  871. Xmenutest.o: /usr/include/linux/stat.h /usr/include/errno.h
  872. Xmenutest.o: /usr/include/linux/errno.h /usr/include/signal.h
  873. Xmenutest.o: /usr/include/linux/signal.h /usr/include/sys/socket.h
  874. Xmenutest.o: /usr/include/linux/socket.h /usr/include/linux/sockios.h
  875. Xmenutest.o: /usr/include/stdlib.h /usr/include/sys/wait.h
  876. Xmenutest.o: /usr/include/gnu/types.h /usr/include/waitflags.h
  877. Xmenutest.o: /usr/include/waitstatus.h /usr/include/netinet/in.h
  878. Xmenutest.o: /usr/include/linux/in.h /usr/include/netdb.h /usr/include/paths.h
  879. Xmenutest.o: /usr/include/unistd.h /usr/include/posix_opt.h /usr/include/pwd.h
  880. Xmenutest.o: /usr/include/dirent.h /usr/include/linux/limits.h
  881. Xmenutest.o: /usr/include/linux/dirent.h /usr/include/math.h
  882. Xmenutest.o: /usr/include/huge_val.h /usr/include/endian.h
  883. Xmenutest.o: /usr/include/bytesex.h /usr/include/values.h bbsipc.h bbsinfo.h
  884. Xmenutest.o: ports.h errlog.h filelock.h sysexec.h bbsint.h user.h menu.h bbs.h
  885. Xmenutest.o: dllist.h files.h moncon.h
  886. Xmoncon.o: bbshdr.h /usr/include/stdio.h /usr/include/libio.h
  887. Xmoncon.o: /usr/include/sys/cdefs.h /usr/include/ctype.h
  888. Xmoncon.o: /usr/include/features.h /usr/include/fcntl.h
  889. Xmoncon.o: /usr/include/sys/types.h /usr/include/linux/types.h
  890. Xmoncon.o: /usr/include/linux/fcntl.h /usr/include/assert.h
  891. Xmoncon.o: /usr/include/termio.h /usr/include/termios.h
  892. Xmoncon.o: /usr/include/linux/termios.h /usr/include/string.h
  893. Xmoncon.o: /usr/include/limits.h /usr/include/sys/time.h
  894. Xmoncon.o: /usr/include/linux/time.h /usr/include/sys/time.h
  895. Xmoncon.o: /usr/include/rpc/types.h /usr/include/sys/stat.h
  896. Xmoncon.o: /usr/include/linux/stat.h /usr/include/errno.h
  897. Xmoncon.o: /usr/include/linux/errno.h /usr/include/signal.h
  898. Xmoncon.o: /usr/include/linux/signal.h /usr/include/sys/socket.h
  899. Xmoncon.o: /usr/include/linux/socket.h /usr/include/linux/sockios.h
  900. Xmoncon.o: /usr/include/stdlib.h /usr/include/sys/wait.h
  901. Xmoncon.o: /usr/include/gnu/types.h /usr/include/waitflags.h
  902. Xmoncon.o: /usr/include/waitstatus.h /usr/include/netinet/in.h
  903. Xmoncon.o: /usr/include/linux/in.h /usr/include/netdb.h /usr/include/paths.h
  904. Xmoncon.o: /usr/include/unistd.h /usr/include/posix_opt.h /usr/include/pwd.h
  905. Xmoncon.o: /usr/include/dirent.h /usr/include/linux/limits.h
  906. Xmoncon.o: /usr/include/linux/dirent.h /usr/include/math.h
  907. Xmoncon.o: /usr/include/huge_val.h /usr/include/endian.h
  908. Xmoncon.o: /usr/include/bytesex.h /usr/include/values.h bbsipc.h bbsinfo.h
  909. Xmoncon.o: ports.h errlog.h filelock.h sysexec.h bbsint.h user.h menu.h bbs.h
  910. Xmoncon.o: dllist.h files.h moncon.h
  911. Xmonitor.o: bbshdr.h /usr/include/stdio.h /usr/include/libio.h
  912. Xmonitor.o: /usr/include/sys/cdefs.h /usr/include/ctype.h
  913. Xmonitor.o: /usr/include/features.h /usr/include/fcntl.h
  914. Xmonitor.o: /usr/include/sys/types.h /usr/include/linux/types.h
  915. Xmonitor.o: /usr/include/linux/fcntl.h /usr/include/assert.h
  916. Xmonitor.o: /usr/include/termio.h /usr/include/termios.h
  917. Xmonitor.o: /usr/include/linux/termios.h /usr/include/string.h
  918. Xmonitor.o: /usr/include/limits.h /usr/include/sys/time.h
  919. Xmonitor.o: /usr/include/linux/time.h /usr/include/sys/time.h
  920. Xmonitor.o: /usr/include/rpc/types.h /usr/include/sys/stat.h
  921. Xmonitor.o: /usr/include/linux/stat.h /usr/include/errno.h
  922. Xmonitor.o: /usr/include/linux/errno.h /usr/include/signal.h
  923. Xmonitor.o: /usr/include/linux/signal.h /usr/include/sys/socket.h
  924. Xmonitor.o: /usr/include/linux/socket.h /usr/include/linux/sockios.h
  925. Xmonitor.o: /usr/include/stdlib.h /usr/include/sys/wait.h
  926. Xmonitor.o: /usr/include/gnu/types.h /usr/include/waitflags.h
  927. Xmonitor.o: /usr/include/waitstatus.h /usr/include/netinet/in.h
  928. Xmonitor.o: /usr/include/linux/in.h /usr/include/netdb.h /usr/include/paths.h
  929. Xmonitor.o: /usr/include/unistd.h /usr/include/posix_opt.h /usr/include/pwd.h
  930. Xmonitor.o: /usr/include/dirent.h /usr/include/linux/limits.h
  931. Xmonitor.o: /usr/include/linux/dirent.h /usr/include/math.h
  932. Xmonitor.o: /usr/include/huge_val.h /usr/include/endian.h
  933. Xmonitor.o: /usr/include/bytesex.h /usr/include/values.h bbsipc.h bbsinfo.h
  934. Xmonitor.o: ports.h errlog.h filelock.h sysexec.h bbsint.h user.h menu.h bbs.h
  935. Xmonitor.o: dllist.h files.h moncon.h
  936. Xtestinfo.o: bbshdr.h /usr/include/stdio.h /usr/include/libio.h
  937. Xtestinfo.o: /usr/include/sys/cdefs.h /usr/include/ctype.h
  938. Xtestinfo.o: /usr/include/features.h /usr/include/fcntl.h
  939. Xtestinfo.o: /usr/include/sys/types.h /usr/include/linux/types.h
  940. Xtestinfo.o: /usr/include/linux/fcntl.h /usr/include/assert.h
  941. Xtestinfo.o: /usr/include/termio.h /usr/include/termios.h
  942. Xtestinfo.o: /usr/include/linux/termios.h /usr/include/string.h
  943. Xtestinfo.o: /usr/include/limits.h /usr/include/sys/time.h
  944. Xtestinfo.o: /usr/include/linux/time.h /usr/include/sys/time.h
  945. Xtestinfo.o: /usr/include/rpc/types.h /usr/include/sys/stat.h
  946. Xtestinfo.o: /usr/include/linux/stat.h /usr/include/errno.h
  947. Xtestinfo.o: /usr/include/linux/errno.h /usr/include/signal.h
  948. Xtestinfo.o: /usr/include/linux/signal.h /usr/include/sys/socket.h
  949. Xtestinfo.o: /usr/include/linux/socket.h /usr/include/linux/sockios.h
  950. Xtestinfo.o: /usr/include/stdlib.h /usr/include/sys/wait.h
  951. Xtestinfo.o: /usr/include/gnu/types.h /usr/include/waitflags.h
  952. Xtestinfo.o: /usr/include/waitstatus.h /usr/include/netinet/in.h
  953. Xtestinfo.o: /usr/include/linux/in.h /usr/include/netdb.h /usr/include/paths.h
  954. Xtestinfo.o: /usr/include/unistd.h /usr/include/posix_opt.h /usr/include/pwd.h
  955. Xtestinfo.o: /usr/include/dirent.h /usr/include/linux/limits.h
  956. Xtestinfo.o: /usr/include/linux/dirent.h /usr/include/math.h
  957. Xtestinfo.o: /usr/include/huge_val.h /usr/include/endian.h
  958. Xtestinfo.o: /usr/include/bytesex.h /usr/include/values.h bbsipc.h bbsinfo.h
  959. Xtestinfo.o: ports.h errlog.h filelock.h sysexec.h bbsint.h user.h menu.h bbs.h
  960. Xtestinfo.o: dllist.h files.h moncon.h
  961. Xtestipc.o: bbshdr.h /usr/include/stdio.h /usr/include/libio.h
  962. Xtestipc.o: /usr/include/sys/cdefs.h /usr/include/ctype.h
  963. Xtestipc.o: /usr/include/features.h /usr/include/fcntl.h
  964. Xtestipc.o: /usr/include/sys/types.h /usr/include/linux/types.h
  965. Xtestipc.o: /usr/include/linux/fcntl.h /usr/include/assert.h
  966. Xtestipc.o: /usr/include/termio.h /usr/include/termios.h
  967. Xtestipc.o: /usr/include/linux/termios.h /usr/include/string.h
  968. Xtestipc.o: /usr/include/limits.h /usr/include/sys/time.h
  969. Xtestipc.o: /usr/include/linux/time.h /usr/include/sys/time.h
  970. Xtestipc.o: /usr/include/rpc/types.h /usr/include/sys/stat.h
  971. Xtestipc.o: /usr/include/linux/stat.h /usr/include/errno.h
  972. Xtestipc.o: /usr/include/linux/errno.h /usr/include/signal.h
  973. Xtestipc.o: /usr/include/linux/signal.h /usr/include/sys/socket.h
  974. Xtestipc.o: /usr/include/linux/socket.h /usr/include/linux/sockios.h
  975. Xtestipc.o: /usr/include/stdlib.h /usr/include/sys/wait.h
  976. Xtestipc.o: /usr/include/gnu/types.h /usr/include/waitflags.h
  977. Xtestipc.o: /usr/include/waitstatus.h /usr/include/netinet/in.h
  978. Xtestipc.o: /usr/include/linux/in.h /usr/include/netdb.h /usr/include/paths.h
  979. Xtestipc.o: /usr/include/unistd.h /usr/include/posix_opt.h /usr/include/pwd.h
  980. Xtestipc.o: /usr/include/dirent.h /usr/include/linux/limits.h
  981. Xtestipc.o: /usr/include/linux/dirent.h /usr/include/math.h
  982. Xtestipc.o: /usr/include/huge_val.h /usr/include/endian.h
  983. Xtestipc.o: /usr/include/bytesex.h /usr/include/values.h bbsipc.h bbsinfo.h
  984. Xtestipc.o: ports.h errlog.h filelock.h sysexec.h bbsint.h user.h menu.h bbs.h
  985. Xtestipc.o: dllist.h files.h moncon.h
  986. Xuser.o: bbshdr.h /usr/include/stdio.h /usr/include/libio.h
  987. Xuser.o: /usr/include/sys/cdefs.h /usr/include/ctype.h /usr/include/features.h
  988. Xuser.o: /usr/include/fcntl.h /usr/include/sys/types.h
  989. Xuser.o: /usr/include/linux/types.h /usr/include/linux/fcntl.h
  990. Xuser.o: /usr/include/assert.h /usr/include/termio.h /usr/include/termios.h
  991. Xuser.o: /usr/include/linux/termios.h /usr/include/string.h
  992. Xuser.o: /usr/include/limits.h /usr/include/sys/time.h
  993. Xuser.o: /usr/include/linux/time.h /usr/include/sys/time.h
  994. Xuser.o: /usr/include/rpc/types.h /usr/include/sys/stat.h
  995. Xuser.o: /usr/include/linux/stat.h /usr/include/errno.h
  996. Xuser.o: /usr/include/linux/errno.h /usr/include/signal.h
  997. Xuser.o: /usr/include/linux/signal.h /usr/include/sys/socket.h
  998. Xuser.o: /usr/include/linux/socket.h /usr/include/linux/sockios.h
  999. Xuser.o: /usr/include/stdlib.h /usr/include/sys/wait.h
  1000. Xuser.o: /usr/include/gnu/types.h /usr/include/waitflags.h
  1001. Xuser.o: /usr/include/waitstatus.h /usr/include/netinet/in.h
  1002. Xuser.o: /usr/include/linux/in.h /usr/include/netdb.h /usr/include/paths.h
  1003. Xuser.o: /usr/include/unistd.h /usr/include/posix_opt.h /usr/include/pwd.h
  1004. Xuser.o: /usr/include/dirent.h /usr/include/linux/limits.h
  1005. Xuser.o: /usr/include/linux/dirent.h /usr/include/math.h
  1006. Xuser.o: /usr/include/huge_val.h /usr/include/endian.h /usr/include/bytesex.h
  1007. Xuser.o: /usr/include/values.h bbsipc.h bbsinfo.h ports.h errlog.h filelock.h
  1008. Xuser.o: sysexec.h bbsint.h user.h menu.h bbs.h dllist.h files.h moncon.h
  1009. Xusertest.o: bbshdr.h /usr/include/stdio.h /usr/include/libio.h
  1010. Xusertest.o: /usr/include/sys/cdefs.h /usr/include/ctype.h
  1011. Xusertest.o: /usr/include/features.h /usr/include/fcntl.h
  1012. Xusertest.o: /usr/include/sys/types.h /usr/include/linux/types.h
  1013. Xusertest.o: /usr/include/linux/fcntl.h /usr/include/assert.h
  1014. Xusertest.o: /usr/include/termio.h /usr/include/termios.h
  1015. Xusertest.o: /usr/include/linux/termios.h /usr/include/string.h
  1016. Xusertest.o: /usr/include/limits.h /usr/include/sys/time.h
  1017. Xusertest.o: /usr/include/linux/time.h /usr/include/sys/time.h
  1018. Xusertest.o: /usr/include/rpc/types.h /usr/include/sys/stat.h
  1019. Xusertest.o: /usr/include/linux/stat.h /usr/include/errno.h
  1020. Xusertest.o: /usr/include/linux/errno.h /usr/include/signal.h
  1021. Xusertest.o: /usr/include/linux/signal.h /usr/include/sys/socket.h
  1022. Xusertest.o: /usr/include/linux/socket.h /usr/include/linux/sockios.h
  1023. Xusertest.o: /usr/include/stdlib.h /usr/include/sys/wait.h
  1024. Xusertest.o: /usr/include/gnu/types.h /usr/include/waitflags.h
  1025. Xusertest.o: /usr/include/waitstatus.h /usr/include/netinet/in.h
  1026. Xusertest.o: /usr/include/linux/in.h /usr/include/netdb.h /usr/include/paths.h
  1027. Xusertest.o: /usr/include/unistd.h /usr/include/posix_opt.h /usr/include/pwd.h
  1028. Xusertest.o: /usr/include/dirent.h /usr/include/linux/limits.h
  1029. Xusertest.o: /usr/include/linux/dirent.h /usr/include/math.h
  1030. Xusertest.o: /usr/include/huge_val.h /usr/include/endian.h
  1031. Xusertest.o: /usr/include/bytesex.h /usr/include/values.h bbsipc.h bbsinfo.h
  1032. Xusertest.o: ports.h errlog.h filelock.h sysexec.h bbsint.h user.h menu.h bbs.h
  1033. Xusertest.o: dllist.h files.h moncon.h
  1034. END_OF_FILE
  1035.   if test 33621 -ne `wc -c <'rocat-0.75/src/Makefile.orig'`; then
  1036.     echo shar: \"'rocat-0.75/src/Makefile.orig'\" unpacked with wrong size!
  1037.   fi
  1038.   chmod +x 'rocat-0.75/src/Makefile.orig'
  1039.   # end of 'rocat-0.75/src/Makefile.orig'
  1040. fi
  1041. if test -f 'rocat-0.75/src/bbsinfo.C' -a "${1}" != "-c" ; then 
  1042.   echo shar: Will not clobber existing file \"'rocat-0.75/src/bbsinfo.C'\"
  1043. else
  1044.   echo shar: Extracting \"'rocat-0.75/src/bbsinfo.C'\" \(16718 characters\)
  1045.   sed "s/^X//" >'rocat-0.75/src/bbsinfo.C' <<'END_OF_FILE'
  1046. X// Filename:    bbsinfo.C
  1047. X// Contents:    the methods for the bbsinfo object
  1048. X// Author:        Greg Shaw
  1049. X// Created:        7/11/93
  1050. X
  1051. X/*
  1052. XThis file is free software; you can redistribute it and/or modify it
  1053. Xunder the terms of the GNU General Public License as published by the
  1054. XFree Software Foundation; either version 2, or (at your option) any
  1055. Xlater version.
  1056. X
  1057. XIn addition to the permissions in the GNU General Public License, the
  1058. XFree Software Foundation gives you unlimited permission to link the
  1059. Xcompiled version of this file with other programs, and to distribute
  1060. Xthose programs without any restriction coming from the use of this
  1061. Xfile.  (The General Public License restrictions do apply in other
  1062. Xrespects; for example, they cover modification of the file, and
  1063. Xdistribution when not linked into another program.)
  1064. X
  1065. XThis file is distributed in the hope that it will be useful, but
  1066. XWITHOUT ANY WARRANTY; without even the implied warranty of
  1067. XMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1068. XGeneral Public License for more details.
  1069. X
  1070. XYou should have received a copy of the GNU General Public License
  1071. Xalong with this program; see the file COPYING.  If not, write to
  1072. Xthe Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  1073. X
  1074. X#ifndef _BBSINFO_C_
  1075. X#define _BBSINFO_C_
  1076. X
  1077. X#include "bbshdr.h"
  1078. X
  1079. X// Function:    findline
  1080. X// Purpose:        find a line containing a particular word from the bbsinfo
  1081. X//                file.
  1082. X// Input:        word - a string containing the word to look for
  1083. X// Output:        line - the line (if found)
  1084. X// Author:        Greg Shaw
  1085. X// Created:        7/11/93
  1086. X
  1087. Xint bbsinfo::findline(char *line, char *word)
  1088. X{
  1089. X    FILE    *infile;        // bbs info file
  1090. X    int        cnt;            // line byte counter
  1091. X    char    c;                // char
  1092. X    char    in_line[255];    // a line from the file
  1093. X    char    found;            // loop boolean
  1094. X    char    *bbsdir;        // bbsdir string (from environment)
  1095. X    char    tmpstr[255];        // temporary string
  1096. X
  1097. X    if (bbsdir = getenv("BBSDIR"), bbsdir == NULL)    // get bbs dir 
  1098. X        return(-1);
  1099. X    strcpy(tmpstr,bbsdir);
  1100. X    strcat(tmpstr,"/config/bbsinfo");        // get filename
  1101. X    if (infile = fopen(tmpstr,"r"), infile == NULL)
  1102. X        return(-1);
  1103. X    // now look for word in file
  1104. X    found = 0;
  1105. X    while (!found && !feof(infile))
  1106. X    {
  1107. X        cnt = 0;
  1108. X        while (c = fgetc(infile), c != '\n' && c != '\r' && !feof(infile))
  1109. X            in_line[cnt++] = c;        
  1110. X        in_line[cnt] = 0;
  1111. X        if (in_line[0] == '#' || strlen(in_line) < 5)
  1112. X            continue;
  1113. X        if (strstr(in_line,word) != NULL)    // gotcha!
  1114. X        {
  1115. X            strcpy(line,in_line);
  1116. X            found++;
  1117. X        }
  1118. X    }
  1119. X    fclose(infile);
  1120. X    if (!found)
  1121. X        return(-1);
  1122. X    else
  1123. X        return(0);
  1124. X};
  1125. X
  1126. X// Function:    cardinfo
  1127. X// Purpose:        return the card information relating to a particular card
  1128. X// Input:        type - the type of card:
  1129. X//                0 - red
  1130. X//                1 - blue
  1131. X//                2 - green
  1132. X//                3 - white
  1133. X//                4 - grey
  1134. X//                5 - pink
  1135. X//                6 - yellow
  1136. X//                7 - black
  1137. X// Output:        a CardRec structure pointer filled in with information from
  1138. X//                bbsinfo file.  (or NULL for error)
  1139. X// Author:        Greg Shaw
  1140. X// Created:        7/27/93
  1141. X
  1142. XCardRec *bbsinfo::cardinfo(int type)
  1143. X{
  1144. X    char    line[255];
  1145. X    char    dumy[25];
  1146. X    CardRec    *card;
  1147. X
  1148. X    if (card = (CardRec *)malloc(sizeof(CardRec)), card == NULL)
  1149. X        return(NULL);
  1150. X    switch(type)
  1151. X    {
  1152. X    case 0:
  1153. X        if (findline(line,"REDCARD") != 0)
  1154. X            return(NULL);
  1155. X        if (sscanf(line,"%s %d %d %x %d",dumy,&card->acl, &card->tl,
  1156. X            &card->flags, &card->kbytes) != 5)
  1157. X            return(NULL);
  1158. X        strcpy(card->colr,"red");
  1159. X        return(card);
  1160. X        break;
  1161. X    case 1:
  1162. X        if (findline(line,"BLUECARD") != 0)
  1163. X            return(NULL);
  1164. X        if (sscanf(line,"%s %d %d %x %d",dumy,&card->acl, &card->tl,
  1165. X            &card->flags, &card->kbytes) != 5)
  1166. X            return(NULL);
  1167. X        strcpy(card->colr,"blue");
  1168. X        return(card);
  1169. X        break;
  1170. X    case 2:
  1171. X        if (findline(line,"GREENCARD") != 0)
  1172. X            return(NULL);
  1173. X        if (sscanf(line,"%s %d %d %x %d",dumy,&card->acl, &card->tl,
  1174. X            &card->flags, &card->kbytes) != 5)
  1175. X            return(NULL);
  1176. X        strcpy(card->colr,"green");
  1177. X        return(card);
  1178. X        break;
  1179. X    case 3:
  1180. X        if (findline(line,"WHITECARD") != 0)
  1181. X            return(NULL);
  1182. X        if (sscanf(line,"%s %d %d %x %d",dumy,&card->acl, &card->tl,
  1183. X            &card->flags, &card->kbytes) != 5)
  1184. X            return(NULL);
  1185. X        strcpy(card->colr,"white");
  1186. X        return(card);
  1187. X        break;
  1188. X    case 4:
  1189. X        if (findline(line,"GREYCARD") != 0)
  1190. X            return(NULL);
  1191. X        if (sscanf(line,"%s %d %d %x %d",dumy,&card->acl, &card->tl,
  1192. X            &card->flags, &card->kbytes) != 5)
  1193. X            return(NULL);
  1194. X        strcpy(card->colr,"grey");
  1195. X        return(card);
  1196. X        break;
  1197. X    case 5:
  1198. X        if (findline(line,"PINKCARD") != 0)
  1199. X            return(NULL);
  1200. X        if (sscanf(line,"%s %d %d %x %d",dumy,&card->acl, &card->tl,
  1201. X            &card->flags, &card->kbytes) != 5)
  1202. X            return(NULL);
  1203. X        strcpy(card->colr,"pink");
  1204. X        return(card);
  1205. X        break;
  1206. X    case 6:
  1207. X        if (findline(line,"YELLOWCARD") != 0)
  1208. X            return(NULL);
  1209. X        if (sscanf(line,"%s %d %d %x %d",dumy,&card->acl, &card->tl,
  1210. X            &card->flags, &card->kbytes) != 5)
  1211. X            return(NULL);
  1212. X        strcpy(card->colr,"yellow");
  1213. X        return(card);
  1214. X        break;
  1215. X    case 7:
  1216. X        if (findline(line,"BLACKCARD") != 0)
  1217. X            return(NULL);
  1218. X        if (sscanf(line,"%s %d %d %x %d",dumy,&card->acl, &card->tl,
  1219. X            &card->flags, &card->kbytes) != 5)
  1220. X            return(NULL);
  1221. X        strcpy(card->colr,"black");
  1222. X        return(card);
  1223. X        break;
  1224. X    default:    
  1225. X        return(NULL);
  1226. X    }
  1227. X};
  1228. X// Function:    sysop
  1229. X// Purpose:        return the name of the BBS main sysop
  1230. X// Input:        none
  1231. X// Output:        a string that contains the 'pager' program
  1232. X// Notes:        it should be possible to pass in some variable to tell
  1233. X//                which sysop the user 'wants' in a multiple sysop system
  1234. X// Author:        Greg Shaw
  1235. X// Created:        7/11/93
  1236. X
  1237. Xchar *bbsinfo::sysop(void)
  1238. X{
  1239. X    char line[255];
  1240. X    char dummy[255];        // dummy string
  1241. X    char *sysopn;
  1242. X
  1243. X    if (findline(line,"SYSOP") != 0)
  1244. X        return(NULL);
  1245. X    if (sysopn = (char *) malloc(20), sysopn == NULL)
  1246. X        return(NULL);
  1247. X    if (sscanf(line,"%s%s",dummy,sysopn) != 2)
  1248. X        return(NULL);
  1249. X    return(sysopn);
  1250. X};
  1251. X
  1252. X// Function:    bbs_uid
  1253. X// Purpose:    return the uid of the bbs administrator 
  1254. X// Input:    none
  1255. X// Output:    the bbs administrator's uid
  1256. X// Author:    Greg Shaw
  1257. X// Created:    4/25/94
  1258. X
  1259. Xuid_t bbsinfo::bbs_uid(void)
  1260. X{
  1261. X    struct passwd *bbspw;
  1262. X
  1263. X    if (bbspw = getpwnam("bbs"), bbspw == NULL)
  1264. X        return(1);
  1265. X    return(bbspw->pw_uid);
  1266. X};
  1267. X
  1268. X// Function:    bbs_gid
  1269. X// Purpose:    return the gid of the bbs administrator 
  1270. X// Input:    none
  1271. X// Output:    the bbs administrator's gid
  1272. X// Author:    Greg Shaw
  1273. X// Created:    4/25/94
  1274. X
  1275. Xgid_t bbsinfo::bbs_gid(void)
  1276. X{
  1277. X    struct passwd *bbspw;
  1278. X
  1279. X    if (bbspw = getpwnam("bbs"), bbspw == NULL)
  1280. X        return(1);
  1281. X    return(bbspw->pw_gid);
  1282. X};
  1283. X
  1284. X// Function:    mailspool
  1285. X// Purpose:    return the mail spool file directory for the system
  1286. X// Input:        none
  1287. X// Output:        a string that contains the mail spool dir 
  1288. X// Author:        Greg Shaw
  1289. X// Created:        8/10/93
  1290. X
  1291. Xchar *bbsinfo::mailspool(void)
  1292. X{
  1293. X    char line[255];
  1294. X    char dummy[255];        // dummy string
  1295. X    char *mspool;
  1296. X
  1297. X    if (findline(line,"MAILSPOOL") != 0)
  1298. X        return(NULL);
  1299. X    if (mspool = (char *) malloc(20), mspool == NULL)
  1300. X        return(NULL);
  1301. X    if (sscanf(line,"%s%s",dummy,mspool) != 2)
  1302. X        return(NULL);
  1303. X    return(mspool);
  1304. X};
  1305. X
  1306. X// Function:    mailchecktime
  1307. X// Purpose:    return the number of seconds that should elapse between 
  1308. X//        mail checks
  1309. X// Input:    none
  1310. X// Output:    a string that contains the mail spool dir 
  1311. X// Author:    Greg Shaw
  1312. X// Created:    4/24/94
  1313. X
  1314. Xint bbsinfo::mailchecktime(void)
  1315. X{
  1316. X    char line[255];
  1317. X    char dummy[255];        // dummy string
  1318. X    int  msgonce;
  1319. X
  1320. X    if (findline(line,"MAILCHECK") != 0)
  1321. X        return(-1);
  1322. X    if (sscanf(line,"%s%d",dummy,&msgonce) != 2)
  1323. X        return(0);
  1324. X    return(msgonce);
  1325. X};
  1326. X
  1327. X// Function:    sys_pager
  1328. X// Purpose:        return the default 'pager' program to be used by the
  1329. X//                bbs to display files to the user
  1330. X// Input:        none
  1331. X// Output:        a string that contains the 'pager' program
  1332. X// Author:        Greg Shaw
  1333. X// Created:        7/11/93
  1334. X
  1335. Xchar *bbsinfo::sys_pager(void)
  1336. X{
  1337. X    char line[255];
  1338. X    char dummy[255];        // dummy string
  1339. X    char *pager;
  1340. X
  1341. X    if (findline(line,"SYSTEMPAGER") != 0)
  1342. X        return(NULL);
  1343. X    if (pager = (char *) malloc(20), pager == NULL)
  1344. X        return(NULL);
  1345. X    if (sscanf(line,"%s%s",dummy,pager) != 2)
  1346. X        return(NULL);
  1347. X    return(pager);
  1348. X};
  1349. X
  1350. X// Function:    loghost
  1351. X// Purpose:        return the host where the error logger is running
  1352. X// Input:        none
  1353. X// Output:        a string that contains the loghost is returned
  1354. X//                note: it should be freed on exit.
  1355. X// Author:        Greg Shaw
  1356. X// Created:        7/11/93
  1357. X
  1358. Xchar *bbsinfo::loghost(void)
  1359. X{
  1360. X    char line[255];
  1361. X    char dummy[255];        // dummy string
  1362. X    char *loghst;
  1363. X
  1364. X    if (findline(line,"LOGHOST") != 0)
  1365. X        return(NULL);
  1366. X    if (loghst = (char *) malloc(30), loghst == NULL)
  1367. X        return(NULL);
  1368. X    if (sscanf(line,"%s%s",dummy,loghst) != 2)
  1369. X        return(NULL);
  1370. X    return(loghst);
  1371. X};
  1372. X
  1373. X// Function:    talkprog
  1374. X// Purpose:    return the 'talk' program for the system
  1375. X// Input:    none
  1376. X// Output:    a string that contains the talkprog is returned
  1377. X//            note: it should be freed on exit.
  1378. X// Author:    Greg Shaw
  1379. X// Created:    7/11/93
  1380. X
  1381. Xchar *bbsinfo::talkprog(void)
  1382. X{
  1383. X    char line[255];
  1384. X    char dummy[255];        // dummy string
  1385. X    char *talkprog;
  1386. X
  1387. X    if (findline(line,"TALKPROG") != 0)
  1388. X        return(NULL);
  1389. X    if (talkprog  = (char *) malloc(30), talkprog == NULL)
  1390. X        return(NULL);
  1391. X    if (sscanf(line,"%s%s",dummy,talkprog) != 2)
  1392. X        return(NULL);
  1393. X    return(talkprog);
  1394. X};
  1395. X
  1396. X// Function:    watchost
  1397. X// Purpose:        return the host where the sysop 'watch' program runs
  1398. X// Input:        none
  1399. X// Output:        a string that contains the watchhost is returned
  1400. X//                note: it should be freed on exit.
  1401. X// Author:        Greg Shaw
  1402. X// Created:        7/11/93
  1403. X
  1404. Xchar *bbsinfo::watchhost(void)
  1405. X{
  1406. X    char line[255];
  1407. X    char dummy[255];        // dummy string
  1408. X    char *wathst;
  1409. X
  1410. X    if (findline(line,"WATCHHOST") != 0)
  1411. X        return(NULL);
  1412. X    if (wathst = (char *) malloc(30), wathst == NULL)
  1413. X        return(NULL);
  1414. X    if (sscanf(line,"%s%s",dummy,wathst) != 2)
  1415. X        return(NULL);
  1416. X    return(wathst);
  1417. X};
  1418. X
  1419. X// Function:    ratio
  1420. X// Purpose:        return the upload to download ratio
  1421. X// Input:        none
  1422. X// Output:        a string that contains the loghost is returned
  1423. X// Author:        Greg Shaw
  1424. X// Created:        7/11/93
  1425. X
  1426. Xfloat bbsinfo::ratio(void)
  1427. X{
  1428. X    char line[255];
  1429. X    char dummy[255];        // dummy string
  1430. X    float rato;
  1431. X
  1432. X    if (findline(line,"RATIO") != 0)
  1433. X        return(0.0);
  1434. X    if (sscanf(line,"%s%f",dummy,&rato) != 2)
  1435. X        return(0.0);
  1436. X    return(rato);
  1437. X};
  1438. X
  1439. X// Function:    sys_msg_once
  1440. X// Purpose:        return true if the system message in question is only to be
  1441. X//                displayed once
  1442. X// Input:        num - the number of the file to check
  1443. X// Output:        true if message to be shown once only
  1444. X// Author:        Greg Shaw
  1445. X// Created:        7/24/93
  1446. X
  1447. Xint bbsinfo::sys_msg_once(int num)
  1448. X{
  1449. X    char line[255];
  1450. X    char dummy[255];        // dummy string
  1451. X    int    msgonce;
  1452. X
  1453. X    switch(num)
  1454. X    {
  1455. X    case 1:        // first one
  1456. X        if (findline(line,"SYSTEM1MSGONCE") != 0)
  1457. X            return(0);
  1458. X        break;
  1459. X    case 2:        // second one
  1460. X        if (findline(line,"SYSTEM2MSGONCE") != 0)
  1461. X            return(0);
  1462. X        break;
  1463. X    case 3:        // second one
  1464. X        if (findline(line,"SYSTEM3MSGONCE") != 0)
  1465. X            return(0);
  1466. X        break;
  1467. X    default:
  1468. X        return(0);
  1469. X    }
  1470. X    if (sscanf(line,"%s%d",dummy,&msgonce) != 2)
  1471. X        return(0);
  1472. X    return(msgonce);
  1473. X};
  1474. X
  1475. X// Function:    chat_avail
  1476. X// Purpose:        return true if sysop is available for chat
  1477. X// Inputs:        tim - the hour and time currently
  1478. X// Outputs:        true if available
  1479. X// Author:        Greg Shaw
  1480. X// Created:        7/25/93
  1481. X
  1482. Xint bbsinfo::chat_avail(int tim)
  1483. X{
  1484. X    char line[255];
  1485. X    char dummy[255];        // dummy string
  1486. X    int    start;
  1487. X    int end;
  1488. X
  1489. X    if (findline(line,"CHATON") != 0)
  1490. X        return(0);
  1491. X    if (sscanf(line,"%s%d",dummy,&start) != 2)
  1492. X        return(0);
  1493. X    if (findline(line,"CHATOFF") != 0)
  1494. X        return(0);
  1495. X    if (sscanf(line,"%s%d",dummy,&end) != 2)
  1496. X        return(0);
  1497. X    if (tim > start && tim < end)
  1498. X        return(1);
  1499. X    else
  1500. X        return(0);
  1501. X};
  1502. X
  1503. X// Function:    def_card
  1504. X// Purpose:        return the default card color for the user
  1505. X// Input:        none
  1506. X// Output:        the default acl
  1507. X// Author:        Greg Shaw
  1508. X// Created:        7/11/93
  1509. X
  1510. Xint bbsinfo::def_card(void)
  1511. X{
  1512. X    char line[255];
  1513. X
  1514. X    if (findline(line,"DEFCARD") != 0)
  1515. X        return(0);
  1516. X    if (strstr(line,"red") != NULL)    // gotcha!
  1517. X        return(0);
  1518. X    if (strstr(line,"blue") != NULL)    // gotcha!
  1519. X        return(1);
  1520. X    if (strstr(line,"green") != NULL)    // gotcha!
  1521. X        return(2);
  1522. X    if (strstr(line,"white") != NULL)    // gotcha!
  1523. X        return(3);
  1524. X    if (strstr(line,"grey") != NULL)    // gotcha!
  1525. X        return(4);
  1526. X    if (strstr(line,"pink") != NULL)    // gotcha!
  1527. X        return(5);
  1528. X    if (strstr(line,"yellow") != NULL)    // gotcha!
  1529. X        return(6);
  1530. X    if (strstr(line,"black") != NULL)    // gotcha!
  1531. X        return(7);
  1532. X    return(-1);
  1533. X};
  1534. X
  1535. X// Function:    def_termtype
  1536. X// Purpose:        return the default terminal type of a new user
  1537. X// Input:        none
  1538. X// Output:        a string that contains the default termtype is returned
  1539. X//                note: it should be freed on exit.
  1540. X// Author:        Greg Shaw
  1541. X// Created:        7/11/93
  1542. X
  1543. Xchar *bbsinfo::def_termtype(void)
  1544. X{
  1545. X    char line[255];
  1546. X    char dummy[255];        // dummy string
  1547. X    char *dt;
  1548. X
  1549. X    if (findline(line,"DEFTERM") != 0)
  1550. X        return(NULL);
  1551. X    if (dt = (char *) malloc(30), dt == NULL)
  1552. X        return(NULL);
  1553. X    if (sscanf(line,"%s%s",dummy,dt) != 2)
  1554. X        return(NULL);
  1555. X    return(dt);
  1556. X};
  1557. X
  1558. X// Function:    maxk
  1559. X// Purpose:    return the maximum number of Kbytes the user can download at
  1560. X//        one time.
  1561. X// Input:    none
  1562. X// Output:    true/false
  1563. X// Author:    Greg Shaw
  1564. X// Created:    8/24/93
  1565. X
  1566. Xint bbsinfo::maxk(void)
  1567. X{
  1568. X    char line[255];
  1569. X    char dummy[255];        // dummy string
  1570. X    int    dt;
  1571. X
  1572. X    if (findline(line,"MAXK") != 0)
  1573. X        return(-1);
  1574. X    if (sscanf(line,"%s%d",dummy,&dt) != 2)
  1575. X        return(-1);
  1576. X    return(dt);
  1577. X};
  1578. X
  1579. X// Function:    inactivity_timeout
  1580. X// Purpose:    return the time to wait before logging out an inactive user
  1581. X// Input:    none
  1582. X// Output:    true/false
  1583. X// Author:    Greg Shaw
  1584. X// Created:    8/24/93
  1585. X
  1586. Xint bbsinfo::inactivity_timeout(void)
  1587. X{
  1588. X    char line[255];
  1589. X    char dummy[255];        // dummy string
  1590. X    int    dt;
  1591. X
  1592. X    if (findline(line,"INACTIVITY") != 0)
  1593. X        return(-1);
  1594. X    if (sscanf(line,"%s%d",dummy,&dt) != 2)
  1595. X        return(-1);
  1596. X    return(dt);
  1597. X};
  1598. X
  1599. X// Function:    creditchat
  1600. X// Purpose:        return true if chat time with sysop is credited
  1601. X// Input:        none
  1602. X// Output:        true/false
  1603. X// Author:        Greg Shaw
  1604. X// Created:        7/11/93
  1605. X
  1606. Xint bbsinfo::creditchat(void)
  1607. X{
  1608. X    char line[255];
  1609. X    char dummy[255];        // dummy string
  1610. X    int    dt;
  1611. X
  1612. X    if (findline(line,"CREDITCHAT") != 0)
  1613. X        return(-1);
  1614. X    if (sscanf(line,"%s%d",dummy,&dt) != 2)
  1615. X        return(-1);
  1616. X    return(dt);
  1617. X};
  1618. X
  1619. X
  1620. X// Function:    credituploads
  1621. X// Purpose:        return true if upload time is credited
  1622. X// Input:        none
  1623. X// Output:        true/false
  1624. X// Author:        Greg Shaw
  1625. X// Created:        7/13/93
  1626. X
  1627. Xint bbsinfo::credituploads(void)
  1628. X{
  1629. X    char line[255];
  1630. X    char dummy[255];        // dummy string
  1631. X    int    dt;
  1632. X
  1633. X    if (findline(line,"CREDITUPLOADS") != 0)
  1634. X        return(-1);
  1635. X    if (sscanf(line,"%s%d",dummy,&dt) != 2)
  1636. X        return(-1);
  1637. X    return(dt);
  1638. X};
  1639. X
  1640. X
  1641. X// Function:    userprompt
  1642. X// Purpose:        return the amount of time between calls allowed (hours)
  1643. X// Input:        none
  1644. X// Output:        true/false
  1645. X// Author:        Greg Shaw
  1646. X// Created:        7/13/93
  1647. X
  1648. Xchar *bbsinfo::userprompt(void)
  1649. X{
  1650. X    char line[255];
  1651. X    char dum0[25];        // dummy string
  1652. X    char dum1[25];        // dummy string
  1653. X    char dum2[25];        // dummy string
  1654. X    char dum3[25];        // dummy string
  1655. X    char *dt;            // return string
  1656. X
  1657. X    dum0[0] = dum1[0] = dum2[0] = dum3[0] = 0;
  1658. X    if (findline(line,"USERPROMPT") != 0)
  1659. X        return(NULL);
  1660. X    sscanf(line,"%s%s%s%s",dum0,dum1,dum2,dum3);
  1661. X    strcpy(line,dum1);
  1662. X    strcat(line,dum2);
  1663. X    strcat(line,dum3);
  1664. X    strcat(line," ");
  1665. X    if (dt = (char *) malloc(strlen(line)), dt == NULL)
  1666. X        return(NULL);
  1667. X    strcpy(dt,line);
  1668. X    return(dt);
  1669. X};
  1670. X
  1671. X
  1672. X// Function:    showtime
  1673. X// Purpose:        return true if command prompt should show the amount of
  1674. X//                time user has left.
  1675. X// Input:        none
  1676. X// Output:        true/false
  1677. X// Author:        Greg Shaw
  1678. X// Created:        7/27/93
  1679. X
  1680. Xint bbsinfo::showtime(void)
  1681. X{
  1682. X    char line[255];
  1683. X    char dummy[255];        // dummy string
  1684. X    int    dt;
  1685. X
  1686. X    if (findline(line,"SHOWTIMELEFT") != 0)
  1687. X        return(0);
  1688. X    if (sscanf(line,"%s%d",dummy,&dt) != 2)
  1689. X        return(0);
  1690. X    return(dt);
  1691. X};
  1692. X
  1693. X
  1694. X// Function:    showfortune
  1695. X// Purpose:    return true if the bbs should give the user a 'fortune cookie'
  1696. X// Input:    none
  1697. X// Output:    true/false
  1698. X// Author:    Greg Shaw
  1699. X// Created:    8/22/93
  1700. X
  1701. Xint bbsinfo::showfortune(void)
  1702. X{
  1703. X    char line[255];
  1704. X    char dummy[255];        // dummy string
  1705. X    int    dt;
  1706. X
  1707. X    if (findline(line,"SHOWFORTUNE") != 0)
  1708. X        return(0);
  1709. X    if (sscanf(line,"%s%d",dummy,&dt) != 2)
  1710. X        return(0);
  1711. X    return(dt);
  1712. X};
  1713. X
  1714. X// Function:    showcoms
  1715. X// Purpose:        return true if command prompt should show the keys for
  1716. X//                the valid commands
  1717. X// Input:        none
  1718. X// Output:        true/false
  1719. X// Author:        Greg Shaw
  1720. X// Created:        7/27/93
  1721. X
  1722. Xint bbsinfo::showcoms(void)
  1723. X{
  1724. X    char line[255];
  1725. X    char dummy[255];        // dummy string
  1726. X    int    dt;
  1727. X
  1728. X    if (findline(line,"SHOWVALIDKEYS") != 0)
  1729. X        return(0);
  1730. X    if (sscanf(line,"%s%d",dummy,&dt) != 2)
  1731. X        return(0);
  1732. X    return(dt);
  1733. X};
  1734. X
  1735. X// Function:    waittime
  1736. X// Purpose:        return the amount of time between calls allowed (hours)
  1737. X// Input:        none
  1738. X// Output:        true/false
  1739. X// Author:        Greg Shaw
  1740. X// Created:        7/13/93
  1741. X
  1742. Xint bbsinfo::waittime(void)
  1743. X{
  1744. X    char line[255];
  1745. X    char dummy[255];        // dummy string
  1746. X    int    dt;
  1747. X
  1748. X    if (findline(line,"WAITTIME") != 0)
  1749. X        return(-1);
  1750. X    if (sscanf(line,"%s%d",dummy,&dt) != 2)
  1751. X        return(-1);
  1752. X    if (dt<0) 
  1753. X        dt=0;
  1754. X    return(dt);
  1755. X};
  1756. X
  1757. X
  1758. X
  1759. X// Function:    username
  1760. X// Purpose:    return the login name of the current user
  1761. X// Input:    none
  1762. X// Output:    true/false
  1763. X// Author:    Greg Shaw
  1764. X// Created:    7/13/93
  1765. X
  1766. Xchar *bbsinfo::username(void)
  1767. X{
  1768. X    struct passwd *thisuser;
  1769. X
  1770. X    if (thisuser = getpwuid(geteuid()), thisuser == NULL)
  1771. X        return(NULL);
  1772. X    else
  1773. X        return(thisuser->pw_name);
  1774. X};
  1775. X
  1776. X
  1777. X
  1778. X#endif // _BBSINFO_C_
  1779. X
  1780. END_OF_FILE
  1781.   if test 16718 -ne `wc -c <'rocat-0.75/src/bbsinfo.C'`; then
  1782.     echo shar: \"'rocat-0.75/src/bbsinfo.C'\" unpacked with wrong size!
  1783.   fi
  1784.   chmod +x 'rocat-0.75/src/bbsinfo.C'
  1785.   # end of 'rocat-0.75/src/bbsinfo.C'
  1786. fi
  1787. if test -f 'rocat-0.75/src/dllist.C' -a "${1}" != "-c" ; then 
  1788.   echo shar: Will not clobber existing file \"'rocat-0.75/src/dllist.C'\"
  1789. else
  1790.   echo shar: Extracting \"'rocat-0.75/src/dllist.C'\" \(6139 characters\)
  1791.   sed "s/^X//" >'rocat-0.75/src/dllist.C' <<'END_OF_FILE'
  1792. X// Filename:    dllist.C
  1793. X// Contents:    the doubly linked list object methods
  1794. X// Author:    Greg Shaw
  1795. X// Created:    8/2/93
  1796. X
  1797. X/*
  1798. XThis file is free software; you can redistribute it and/or modify it
  1799. Xunder the terms of the GNU General Public License as published by the
  1800. XFree Software Foundation; either version 2, or (at your option) any
  1801. Xlater version.
  1802. X
  1803. XIn addition to the permissions in the GNU General Public License, the
  1804. XFree Software Foundation gives you unlimited permission to link the
  1805. Xcompiled version of this file with other programs, and to distribute
  1806. Xthose programs without any restriction coming from the use of this
  1807. Xfile.  (The General Public License restrictions do apply in other
  1808. Xrespects; for example, they cover modification of the file, and
  1809. Xdistribution when not linked into another program.)
  1810. X
  1811. XThis file is distributed in the hope that it will be useful, but
  1812. XWITHOUT ANY WARRANTY; without even the implied warranty of
  1813. XMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1814. XGeneral Public License for more details.
  1815. X
  1816. XYou should have received a copy of the GNU General Public License
  1817. Xalong with this program; see the file COPYING.  If not, write to
  1818. Xthe Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  1819. X
  1820. X#ifndef _DLLIST_C_
  1821. X#define _DLLIST_C_
  1822. X
  1823. X#include "bbshdr.h"
  1824. X
  1825. X// Method:    constructor
  1826. X// Purpose:    initialize the object to a known state
  1827. X// Input:    none
  1828. X// Output:    none
  1829. X// Author:    Greg Shaw
  1830. X// Created:    8/2/93
  1831. X
  1832. Xdllist::dllist()
  1833. X{
  1834. X    head=tail=NULL;
  1835. X    numrec = 0;
  1836. X    sortstate = 0;
  1837. X    here = NULL;
  1838. X};
  1839. X
  1840. X// Method:    destructor
  1841. X// Purpose:    clean up after the object
  1842. X// Input:    none
  1843. X// Output:    none
  1844. X// Author:    Greg Shaw
  1845. X// Created:    8/2/93
  1846. X
  1847. Xdllist::~dllist()
  1848. X{
  1849. X    clear_list();
  1850. X};
  1851. X
  1852. X// Method:    add
  1853. X// Purpose:    add a record to the object
  1854. X// Input:    rec - the record to add to the object
  1855. X// Output:    none
  1856. X// Author:    Greg Shaw
  1857. X// Created:    8/2/93
  1858. X
  1859. Xint dllist::add(FInfo *rec)
  1860. X{
  1861. X    FInfo    *newrec;
  1862. X
  1863. X    if (newrec = (FInfo *)malloc(sizeof(FInfo)), newrec == NULL)
  1864. X    {
  1865. X        ap_log("dllist: Unable to malloc new FInfo record.");
  1866. X        return(-1);
  1867. X    }
  1868. X    strcpy(newrec->name,rec->name);
  1869. X    strcpy(newrec->sdesc,rec->sdesc);
  1870. X    strcpy(newrec->uploader,rec->uploader);
  1871. X    newrec->avail = rec->avail;
  1872. X    newrec->date = rec->date;
  1873. X    newrec->filepos = rec->filepos;
  1874. X    newrec->numdls = rec->numdls;
  1875. X    newrec->size = rec->size;
  1876. X    newrec->previous = NULL;
  1877. X    newrec->next = NULL;
  1878. X    if (head == NULL)
  1879. X    {
  1880. X        head = newrec;
  1881. X        tail=newrec;
  1882. X    }
  1883. X    else
  1884. X    {
  1885. X        newrec->previous = tail;
  1886. X        tail->next = newrec;
  1887. X        tail = newrec;
  1888. X    }
  1889. X    numrec++;
  1890. X    return(0);
  1891. X};
  1892. X
  1893. X// Function:    clear
  1894. X// Purpose:    add a record to the object
  1895. X// Input:    rec - the record to add to the object
  1896. X// Output:    none
  1897. X// Author:    Greg Shaw
  1898. X// Created:    8/2/93
  1899. X
  1900. Xint dllist::clear_list(void)
  1901. X{
  1902. X    FInfo    *tmprec, *tmprec2;
  1903. X
  1904. X    tmprec = head;
  1905. X    while (tmprec != NULL)
  1906. X    {
  1907. X        tmprec2 = tmprec;
  1908. X        tmprec = tmprec->next;
  1909. X        free(tmprec2);
  1910. X    }
  1911. X    numrec = 0;
  1912. X    head = tail = NULL;
  1913. X    return(0);
  1914. X};
  1915. X
  1916. X// Function:    find
  1917. X// Purpose:    find a file name in list
  1918. X// Input:    str - file name to look for
  1919. X// Output:    none
  1920. X// Author:    Greg Shaw
  1921. X// Created:    8/2/93
  1922. X
  1923. XFInfo *dllist::find(char *str)
  1924. X{
  1925. X    FInfo *rec;
  1926. X    int    found;
  1927. X
  1928. X    found = 0;
  1929. X    rec = head;
  1930. X    while (!found && rec != NULL)
  1931. X    {
  1932. X        if (strcmp(rec->name,str) == 0)
  1933. X            found++;
  1934. X        else
  1935. X            rec = rec->next;
  1936. X    }
  1937. X    return(rec);
  1938. X};
  1939. X
  1940. X
  1941. X// Function:    sort
  1942. X// Purpose:    sort the list by a key
  1943. X// Input:    type - the type of sorting to do:
  1944. X//            1 - sort by date
  1945. X//            2 - sort by name
  1946. X// Output:    none
  1947. X// Author:    Greg Shaw
  1948. X// Created:    8/2/93
  1949. X
  1950. Xint dllist::sort(int type)
  1951. X{
  1952. X
  1953. X    switch(type)
  1954. X    {
  1955. X    case 0:    
  1956. X        return(-1);
  1957. X    case 1:    // numeric by date
  1958. X        sel_sort(0,head);
  1959. X        break;
  1960. X    case 2: // alpha by name
  1961. X        sel_sort(1,head);
  1962. X        
  1963. X    }
  1964. X    return(0);
  1965. X};
  1966. X
  1967. X// Function:    sort
  1968. X// Purpose:    sort the list by a key
  1969. X// Input:    head - the start of the list
  1970. X// Output:    none
  1971. X// Author:    Greg Shaw
  1972. X// Created:    8/2/93
  1973. X// Notes:    this uses a selection sort method
  1974. X
  1975. Xint dllist::sel_sort(int type, FInfo *list)
  1976. X{
  1977. X    FInfo    *loop1, *loop2, *smallest, *tmp, *listnext;
  1978. X
  1979. X    loop1 = head;    // start of list
  1980. X    while (loop1->next != NULL) // until end - 1
  1981. X    {
  1982. X        smallest = loop1;
  1983. X        loop2 = loop1->next;
  1984. X        while (loop2 != NULL)
  1985. X        {
  1986. X            if (type)
  1987. X            {
  1988. X                if (strcmp(loop2->name,smallest->name) < 0)
  1989. X                    smallest = loop2;    
  1990. X            }
  1991. X            else
  1992. X            {
  1993. X                if (loop2->date < smallest->date)
  1994. X                    smallest = loop2;
  1995. X            }
  1996. X            loop2 = loop2->next;
  1997. X        }
  1998. X        listnext = loop1->next;
  1999. X        if (smallest != loop1)
  2000. X        {
  2001. X            // now swap
  2002. X            // left side (previous)
  2003. X            if (loop1->previous != NULL)
  2004. X            {
  2005. X                tmp = loop1->previous;
  2006. X                loop1->previous->next = smallest;
  2007. X            }
  2008. X            else
  2009. X                head = smallest;
  2010. X            if (smallest->previous != NULL)
  2011. X            {
  2012. X                tmp = smallest->previous;
  2013. X                tmp->next = loop1;
  2014. X            }
  2015. X            tmp = loop1->previous;
  2016. X            loop1->previous = smallest->previous;
  2017. X            smallest->previous = tmp;
  2018. X            if (loop1->next != NULL)
  2019. X            {
  2020. X                tmp = loop1->next;
  2021. X                tmp->previous = smallest;
  2022. X            }
  2023. X            if (smallest->next != NULL)
  2024. X            {
  2025. X                tmp = smallest->next;
  2026. X                tmp->previous = loop1;
  2027. X            }
  2028. X            else
  2029. X                tail = loop1;
  2030. X            tmp = loop1->next;
  2031. X            loop1->next = smallest->next;
  2032. X            smallest->next = tmp;
  2033. X        }
  2034. X        loop1 = listnext;
  2035. X    }
  2036. X    if (type)
  2037. X        sortstate = 2;    // alphabetically sorted
  2038. X    else
  2039. X        sortstate = 1;    // numerically sorted
  2040. X    tmp = head;
  2041. X    while (tmp != NULL)
  2042. X    {
  2043. X        tmp = tmp->next;
  2044. X    }
  2045. X    return(0);
  2046. X};
  2047. X
  2048. X// Function:    next
  2049. X// Purpose:    return the 'next' record in the array
  2050. X// Input:    none
  2051. X// Output:    none
  2052. X// Author:    Greg Shaw
  2053. X// Created:    8/2/93
  2054. X
  2055. XFInfo *dllist::next(void)
  2056. X{
  2057. X    if (here == NULL)
  2058. X    {
  2059. X        here = head;
  2060. X        return(head);
  2061. X    }
  2062. X    here = here->next;
  2063. X    return(here);
  2064. X};
  2065. X
  2066. X// Function:    previous
  2067. X// Purpose:    return the previous record in the list
  2068. X// Input:    none
  2069. X// Output:    none
  2070. X// Author:    Greg Shaw
  2071. X// Created:    8/2/93
  2072. X
  2073. XFInfo *dllist::previous(void)
  2074. X{
  2075. X    if (here == NULL)
  2076. X    {
  2077. X        here = tail;
  2078. X        return(tail);
  2079. X    }
  2080. X    here = here->previous;
  2081. X    return(here);
  2082. X};
  2083. X
  2084. X// Function:    head
  2085. X// Purpose:    set 'here' to top of the list
  2086. X// Input:    none
  2087. X// Output:    none
  2088. X// Author:    Greg Shaw
  2089. X// Created:    8/2/93
  2090. X
  2091. Xint dllist::top(void)
  2092. X{
  2093. X    here = NULL;
  2094. X    return(0);
  2095. X};
  2096. X
  2097. X// Function:    tail
  2098. X// Purpose:    set 'here' to end of the list
  2099. X// Input:    none
  2100. X// Output:    none
  2101. X// Author:    Greg Shaw
  2102. X// Created:    8/2/93
  2103. X
  2104. Xint dllist::bottom(void)
  2105. X{
  2106. X    here = NULL;
  2107. X    return(0);
  2108. X};
  2109. X
  2110. X#endif //_DLLIST_C_
  2111. END_OF_FILE
  2112.   if test 6139 -ne `wc -c <'rocat-0.75/src/dllist.C'`; then
  2113.     echo shar: \"'rocat-0.75/src/dllist.C'\" unpacked with wrong size!
  2114.   fi
  2115.   chmod +x 'rocat-0.75/src/dllist.C'
  2116.   # end of 'rocat-0.75/src/dllist.C'
  2117. fi
  2118. if test -f 'rocat-0.75/src/fileutil.C' -a "${1}" != "-c" ; then 
  2119.   echo shar: Will not clobber existing file \"'rocat-0.75/src/fileutil.C'\"
  2120. else
  2121.   echo shar: Extracting \"'rocat-0.75/src/fileutil.C'\" \(14910 characters\)
  2122.   sed "s/^X//" >'rocat-0.75/src/fileutil.C' <<'END_OF_FILE'
  2123. X// Filename:    fileutil.C
  2124. X// Contents:    a files area utility program 
  2125. X// Author:    Greg Shaw
  2126. X// Created:    8/24/93
  2127. X
  2128. X/*
  2129. XThis file is free software; you can redistribute it and/or modify it
  2130. Xunder the terms of the GNU General Public License as published by the
  2131. XFree Software Foundation; either version 2, or (at your option) any
  2132. Xlater version.
  2133. X
  2134. XIn addition to the permissions in the GNU General Public License, the
  2135. XFree Software Foundation gives you unlimited permission to link the
  2136. Xcompiled version of this file with other programs, and to distribute
  2137. Xthose programs without any restriction coming from the use of this
  2138. Xfile.  (The General Public License restrictions do apply in other
  2139. Xrespects; for example, they cover modification of the file, and
  2140. Xdistribution when not linked into another program.)
  2141. X
  2142. XThis file is distributed in the hope that it will be useful, but
  2143. XWITHOUT ANY WARRANTY; without even the implied warranty of
  2144. XMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2145. XGeneral Public License for more details.
  2146. X
  2147. XYou should have received a copy of the GNU General Public License
  2148. Xalong with this program; see the file COPYING.  If not, write to
  2149. Xthe Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  2150. X
  2151. X#ifndef _FILEUTIL_C_
  2152. X#define _FILEUTIL_C_
  2153. X
  2154. X#include "bbshdr.h"
  2155. X#include "fileutil.h"
  2156. X
  2157. XUser user;        // defined here for extern references elsewhere
  2158. Xmoncon mon_obj;        // monitor connection object (not used)
  2159. X
  2160. X// Method:    constructor
  2161. X// Purpose:    initialize the list
  2162. X// Input:    none
  2163. X// Output:    none
  2164. X// Author:    Greg Shaw
  2165. X// Created:    8/24/93
  2166. X
  2167. Xfileutil::fileutil()
  2168. X{
  2169. X    numrecs = 0;
  2170. X};
  2171. X
  2172. X// Method:    delete_missing
  2173. X// Purpose:    scan all files sections to delete all missing files
  2174. X// Input:    sname - long name of file section
  2175. X// Output:    stdout - list of deleted files
  2176. X// Author:    Greg Shaw
  2177. X// Created:    9/2/93
  2178. X
  2179. Xint fileutil::delete_missing(char *sname,char *secname)
  2180. X{
  2181. X    FInfo    *rec;
  2182. X    int    deleted;
  2183. X    int    offset;
  2184. X    FILE    *recfile;
  2185. X    FILE    *outfile;
  2186. X    char    fname[MAX_FILENAMELENGTH+1];
  2187. X    char    tmpstr[255];
  2188. X    char    c;
  2189. X    char    line[150];
  2190. X
  2191. X    deleted = 0;
  2192. X    
  2193. X    sprintf(tmpstr,"%s/filehdr/%s",getenv("BBSDIR"),secname);
  2194. X    if (recfile = bopen(tmpstr,"r"), recfile == NULL)
  2195. X    {
  2196. X        sprintf(tmpstr,"fileutil: Unable to open %s",secname);
  2197. X        ap_log(tmpstr);
  2198. X        return(-1);
  2199. X    }
  2200. X    sprintf(tmpstr,"%s/filehdr/%s.new",getenv("BBSDIR"),secname);
  2201. X    if (outfile = bopen(tmpstr,"w"), outfile == NULL)
  2202. X    {
  2203. X        sprintf(tmpstr,"fileutil: Unable to open %s.new",secname);
  2204. X        ap_log(tmpstr);
  2205. X        return(-1);
  2206. X    }
  2207. X    while (!feof(recfile))
  2208. X    {
  2209. X        offset = 0;
  2210. X        while (c = fgetc(recfile), c != '\n' && c != '\r' && !feof(recfile))
  2211. X            line[offset++] = c;
  2212. X        line[offset] = 0;
  2213. X        if (line[0] == '[' && line[1] == 'A')
  2214. X        {
  2215. X            sscanf(&line[2],"%*s %*d %s",fname);    
  2216. X            if (rec = list_obj.find(fname), rec != NULL && rec->avail != 'Y' || rec->size == 0)
  2217. X            {    // delete next 5 more lines
  2218. X                deleted++;
  2219. X                offset = 0;
  2220. X                while (offset < 5 && !feof(recfile))
  2221. X                {
  2222. X                    while (c = fgetc(recfile), c != '\n' && c != '\r' && !feof(recfile));
  2223. X                    offset++;
  2224. X                }
  2225. X            }
  2226. X            else
  2227. X                fprintf(outfile,"%s\n",line);
  2228. X        }
  2229. X        else
  2230. X            fprintf(outfile,"%s\n",line);
  2231. X    }
  2232. X    bclose(outfile);
  2233. X    bclose(recfile);
  2234. X    if (deleted)    // some deleted? 
  2235. X    { // now move things back to where they should be
  2236. X        sprintf(tmpstr,"%s/filehdr/%s",getenv("BBSDIR"),secname);
  2237. X        sprintf(line,"%s/filehdr/%s.old",getenv("BBSDIR"),secname);
  2238. X        rename(tmpstr,line);
  2239. X        sprintf(line,"%s/filehdr/%s.new",getenv("BBSDIR"),secname);
  2240. X        sprintf(tmpstr,"%s/filehdr/%s",getenv("BBSDIR"),secname);
  2241. X        rename(line,tmpstr);
  2242. X    } else
  2243. X    {
  2244. X        sprintf(tmpstr,"%s/filehdr/%s.new",getenv("BBSDIR"),secname);
  2245. X        remove(tmpstr);
  2246. X    }
  2247. X    printf("%-25.25s %6d\n",sname,deleted);
  2248. X    return(0);
  2249. X};
  2250. X
  2251. X// Method:    newfiles
  2252. X// Purpose:    scan all files sections to build a 'new files' list.
  2253. X// Input:    section - name of section to build the 'new' list for
  2254. X//        fname - the file name (+path) for the output file
  2255. X// Output:    a file that contains the new files list
  2256. X// Author:    Greg Shaw
  2257. X// Created:    8/24/93
  2258. X
  2259. Xint fileutil::newfiles(char *section, FILE *outfile)
  2260. X{
  2261. X    FInfo    *rec;
  2262. X    char    datestr[12];
  2263. X    struct tm *tmrec;
  2264. X    time_t    now;
  2265. X
  2266. X    time(&now);
  2267. X    list_obj.top();    // top of list
  2268. X    while (rec = list_obj.next(), rec != NULL)
  2269. X    {
  2270. X        if (now - rec->date < (DAYS*24*60*60))
  2271. X        {
  2272. X                tmrec = localtime(&rec->date);
  2273. X                strftime(datestr,11,"%x",tmrec);
  2274. X
  2275. X            fprintf(outfile,"%-14.14s %-25.25s %s %-8.8s %2d\n",rec->name,
  2276. X                section,datestr,rec->uploader,rec->numdls);
  2277. X        }
  2278. X    }
  2279. X    return(0);
  2280. X};
  2281. X
  2282. X// Method:    most
  2283. X// Purpose:    scan the files section for the most popular files.  Compare
  2284. X//        against existing list and add as appropriate
  2285. X// Input:    section - name of section to build the 'most' list for
  2286. X//        fname - the file name (+path) for the output file
  2287. X// Output:    a file that contains the most popular files
  2288. X// Author:    Greg Shaw
  2289. X// Created:    8/24/93
  2290. X
  2291. Xint fileutil::most(char *section)
  2292. X{
  2293. X    FInfo    *rec;
  2294. X    int     num;
  2295. X    int    x;
  2296. X        struct stat fistat;     // file status record
  2297. X    char    tmpstr[255];
  2298. X
  2299. X    list_obj.top();    // top of list
  2300. X    while (rec = list_obj.next(), rec != NULL)
  2301. X    {
  2302. X        sprintf(tmpstr,"%s/files/%s/%s",getenv("BBSDIR"),dn_path,rec->name);
  2303. X        if (stat(tmpstr,&fistat) == 0 && S_ISREG (fistat.st_mode))
  2304. X        {
  2305. X            rec->size = fistat.st_size;
  2306. X            rec->date = fistat.st_ctime;
  2307. X            rec->avail = 'Y';
  2308. X        }
  2309. X        if (rec->numdls > 0)
  2310. X        {
  2311. X            num = -1;
  2312. X            for (x=0; x<numrecs; x++)
  2313. X            {
  2314. X                if (rec->numdls > recs[x].numdls)
  2315. X                {
  2316. X                    num = x;    // found where we need to put guy
  2317. X                    x = numrecs;
  2318. X                }
  2319. X            }
  2320. X            if (num != -1 )    // found where we need to put him
  2321. X            {
  2322. X                // move everybody down
  2323. X                for (x=numrecs-2; x >= num; --x)
  2324. X                {
  2325. X                    memcpy(&recs[x+1], &recs[x], sizeof(FInfo));
  2326. X                    strcpy(sec[x+1], sec[x]);
  2327. X                }
  2328. X                memcpy(&recs[num], rec, sizeof(FInfo));
  2329. X                strcpy(sec[num], section);
  2330. X
  2331. X            }
  2332. X            else if (x < MAX_RECS)    // hit end before found lesser one
  2333. X            {
  2334. X                memcpy(&recs[numrecs],rec,sizeof(FInfo));
  2335. X                strcpy(sec[numrecs], section);
  2336. X                numrecs++;
  2337. X            }
  2338. X        }
  2339. X    }
  2340. X    return(0);
  2341. X};
  2342. X
  2343. X// Method:    update
  2344. X// Purpose:    update the section passed in
  2345. X//            - check for new files added to directory
  2346. X//            - delete files with zero length in description
  2347. X// Input:    section - name of section to update
  2348. X// Output:    a file that contains the most popular files
  2349. X// Author:    Greg Shaw
  2350. X// Created:    8/24/93
  2351. X
  2352. Xint fileutil::update(char *section)
  2353. X{
  2354. X    FILE    *outfile;    // output file
  2355. X    DIR    *fdir;        // directory file descriptor
  2356. X    FInfo    *rec;
  2357. X    struct dirent *dentry;    // directory entry
  2358. X    struct stat fistat;    // file status record
  2359. X    time_t    now;        // date of file added (today)
  2360. X    char    bbsdir[255];    // bbs directory
  2361. X    char    tmpstr[255];    // tmpstr
  2362. X    int    newfiles;    // new files in section
  2363. X    int    missing;    // missing files in section
  2364. X    int    deleted;    // missing files in section
  2365. X    int    totfiles;    // total files in section
  2366. X    unsigned long totsize;    // total size of section
  2367. X
  2368. X    time(&now);
  2369. X    newfiles = deleted = missing = totfiles = 0;
  2370. X    totsize = 0;
  2371. X    strcpy(bbsdir,getenv("BBSDIR"));     // not checking error
  2372. X    strcpy(tmpstr,bbsdir);
  2373. X    strcat(tmpstr,"/filehdr/");    // tack on files header
  2374. X    strcat(tmpstr,section);
  2375. X    if (outfile = bopen(tmpstr,"a"), outfile == NULL)
  2376. X    {
  2377. X        printf("fileutil: Unable to open files section header %s",section);
  2378. X        return(0);
  2379. X    }
  2380. X    strcpy(tmpstr,bbsdir);
  2381. X    strcat(tmpstr,"/files/");
  2382. X    strcat(tmpstr,dn_path);
  2383. X    if (fdir = opendir(tmpstr), fdir == NULL)
  2384. X    {
  2385. X        printf("fileutil: Unable to open directory %s for reading.\n",tmpstr);
  2386. X        bclose(outfile);
  2387. X        exit(0);
  2388. X    }
  2389. X    // ok.  output file is open. directory is open.  doit.
  2390. X    while (dentry = readdir(fdir), dentry != NULL)
  2391. X    {
  2392. X        sprintf(tmpstr,"%s/files/%s/%s",bbsdir,dn_path,dentry->d_name);
  2393. X        if (stat(tmpstr,&fistat) == 0 && S_ISREG(fistat.st_mode))
  2394. X        {    // not found, add to area
  2395. X            if (rec = list_obj.find(dentry->d_name), rec == NULL)
  2396. X            {
  2397. X                newfiles++;
  2398. X                totsize += fistat.st_size/1024;
  2399. X                fprintf(outfile,"[A sysop 0 %s ]\n",dentry->d_name, 
  2400. X                fistat.st_size,fistat.st_ctime);
  2401. X                fprintf(outfile,"[B ]\n");
  2402. X                fprintf(outfile,"[C ]\n");
  2403. X                fprintf(outfile,"[D ]\n");
  2404. X                fprintf(outfile,"[E ]\n");
  2405. X                fprintf(outfile,"[F ]\n");
  2406. X            }
  2407. X        }
  2408. X    }
  2409. X    closedir(fdir);
  2410. X    bclose(outfile);    
  2411. X    // Ok.  Got new files added to section.  Now delete no-good files
  2412. X    list_obj.top();    // start at top
  2413. X    while (rec = list_obj.next(), rec != NULL)
  2414. X    {
  2415. X        if (rec != NULL && rec->size == 0)    // file size 0?  Kill!
  2416. X        {
  2417. X            deleted++;
  2418. X            sprintf(tmpstr,"%s/files/%s/%s",bbsdir,dn_path,rec->name);
  2419. X            remove(tmpstr);
  2420. X        }
  2421. X    }
  2422. X    // now go through section file to delete record descriptions
  2423. X    // now check for missing files
  2424. X    list_obj.top();    // start at top
  2425. X    while (rec = list_obj.next(), rec != NULL)
  2426. X    {
  2427. X        sprintf(tmpstr,"%s/files/%s/%s",getenv("BBSDIR"),dn_path,rec->name);
  2428. X        if (stat(tmpstr,&fistat) == 0 && S_ISREG (fistat.st_mode))
  2429. X        {
  2430. X            rec->size = fistat.st_size;
  2431. X            rec->date = fistat.st_ctime;
  2432. X            rec->avail = 'Y';
  2433. X            totsize += rec->size/1024;
  2434. X            totfiles++;
  2435. X        }
  2436. X    }
  2437. X    // now add statistics to file
  2438. X    totfiles += newfiles;
  2439. X    totfiles -= deleted;
  2440. X    printf("%-25.25s %6ld    %5d    %3d    %3d    %3d\n",section,totsize,
  2441. X        totfiles,missing,newfiles,deleted);
  2442. X    sprintf(tmpstr,"%s/filehdr/%s",bbsdir,section);
  2443. X    chmod(tmpstr,0775);
  2444. X    return(0);
  2445. X};
  2446. X
  2447. X// Method:    cycle_sections
  2448. X// Purpose:    scan all files sections and do a command on each in turn
  2449. X// Input:    fname - the output filename
  2450. X// Output:    a file that contains the 
  2451. X// Author:    Greg Shaw
  2452. X// Created:    8/24/93
  2453. X
  2454. Xint fileutil::cycle_sections(int type, char *fname)
  2455. X{
  2456. X    CardRec    user;        // dummy for files object 'open'
  2457. X    FILE    *infile;    // for reading bbs files master header
  2458. X    FILE    *outfile;    // output text file for some functions
  2459. X    time_t    now;        // current time
  2460. X    int    x;
  2461. X    char    c;        // char
  2462. X    char    *u;        // simple char pointer
  2463. X    char    *bbsdir;    // home of BBS
  2464. X    char    word[25];    // word
  2465. X    char    datestr[12];    // date string storage
  2466. X    char    tmpstr[255];    // temp str
  2467. X    char    name[MAX_FILENAMELENGTH];    // section name
  2468. X    char    dn_path[255];    // download path
  2469. X    char    long_desc[255];    // long description
  2470. X    struct tm     *tmrec;
  2471. X
  2472. X    bbsdir = getenv("BBSDIR");
  2473. X    if (bbsdir == NULL)
  2474. X    {
  2475. X        printf("Unable to get BBSDIR environment variable.");
  2476. X        exit(0);
  2477. X    }
  2478. X    list_obj.clear_list();        // nuke old values
  2479. X    sprintf(tmpstr,"%s/filehdr/bbs_files_hdr",bbsdir);// tack on files header
  2480. X    if (infile = bopen(tmpstr,"r"), infile == NULL)
  2481. X    {
  2482. X        sprintf(tmpstr,"fileutil: Unable to open main files section header (bbs_files_hdr)",name);
  2483. X        ap_log(tmpstr);
  2484. X        return(-1);
  2485. X    }
  2486. X    // ok.  got file.  let's loop through list for each section
  2487. X    if ((type == 0 || type == 1) && (outfile = bopen(fname,"w"), outfile == NULL))
  2488. X    {
  2489. X        sprintf(tmpstr,"fileutil: Unable to open output file %s",fname);
  2490. X        ap_log(tmpstr);
  2491. X        return(-1);
  2492. X    }
  2493. X    switch(type)
  2494. X    {
  2495. X    case 0:    // new files
  2496. X        time(&now);
  2497. X        tmrec = localtime(&now);
  2498. X        strftime(datestr,11,"%x",tmrec);
  2499. X        fprintf(outfile,"New files in the last %d days.  (%s)\n",DAYS,datestr);
  2500. X        fprintf(outfile,"Name           Section                     Date   by    Downloads\n");
  2501. X        break;
  2502. X    case 1:    // most popular files
  2503. X        time(&now);
  2504. X        tmrec = localtime(&now);
  2505. X        strftime(datestr,11,"%x",tmrec);
  2506. X        fprintf(outfile,"Most popular files on BBS by downloads: (%s)\n",datestr);
  2507. X        fprintf(outfile,"Name            Section                  Dls  Date   Uploaded by\n");
  2508. X        break;
  2509. X    case 2:    // update sections
  2510. X        time(&now);
  2511. X        tmrec = localtime(&now);
  2512. X        strftime(datestr,11,"%x",tmrec);
  2513. X        printf("SysOp Report for BBS: (%s)\n",datestr);
  2514. X        printf("Section                     Size      Files  Missing New  Deleted\n");
  2515. X        break;
  2516. X    case 3:    // delete missing files from bbs and headers
  2517. X        time(&now);
  2518. X        tmrec = localtime(&now);
  2519. X        strftime(datestr,11,"%x",tmrec);
  2520. X        printf("Deleted Files Report for BBS: (%s)\n",datestr);
  2521. X        printf("Section                     Deleted\n");
  2522. X        break;
  2523. X    }
  2524. X    while (!feof(infile))
  2525. X    {
  2526. X        // look for left bracket
  2527. X        while (c = fgetc(infile), c != '[' && !feof(infile));
  2528. X        // now get the rest of the line
  2529. X        if (feof(infile))
  2530. X            continue;
  2531. X        if (x = fscanf(infile,"%s %*s %*d %s %*s %*d%50s",name,dn_path, long_desc), x != 3)
  2532. X        {
  2533. X            sprintf(tmpstr,"Error in bbs main files header.");
  2534. X            ap_log(tmpstr);
  2535. X            return(-1);
  2536. X        }
  2537. X                while (fscanf(infile,"%s",word) == 1 && strchr(word,']') == NULL)
  2538. X        {
  2539. X             strcat(long_desc," ");
  2540. X             strcat(long_desc,word);
  2541. X        }
  2542. X        if (u = strchr(long_desc,']'), u != NULL)
  2543. X            u[0] = 0;    // turn into null
  2544. X        // open section
  2545. X        if (open(name,&user) != 0)
  2546. X        {
  2547. X            sprintf(tmpstr,"fileutil: error opening %s",name);
  2548. X            ap_log(tmpstr);
  2549. X            bclose(infile);
  2550. X            bclose(outfile);
  2551. X            return(-1);
  2552. X        }
  2553. X        // now pass to appropriate function
  2554. X        switch(type)
  2555. X        {
  2556. X        case 0:    // generate new files list
  2557. X            newfiles(long_desc,outfile);    
  2558. X            break;
  2559. X        case 1:    // generate most popular files list
  2560. X            most(long_desc);    
  2561. X            break;
  2562. X        case 2:    // update files section
  2563. X            update(name);    
  2564. X            break;
  2565. X        case 3:    // delete missing files
  2566. X            delete_missing(long_desc,name);    
  2567. X            break;
  2568. X        default:
  2569. X            return(0);
  2570. X        }
  2571. X    }
  2572. X    if (type == 1)    // most popular files?
  2573. X    {    // then generate list from 20 files 
  2574. X        for (x=0; x<numrecs; x++)
  2575. X        {
  2576. X            tmrec = localtime(&recs[x].date);
  2577. X            strftime(datestr,11,"%x",tmrec);
  2578. X            fprintf(outfile,"%-14.14s     %-25.25s %d %s %-8.8s\n",
  2579. X                recs[x].name,sec[x],recs[x].numdls,
  2580. X                datestr, recs[x].uploader);
  2581. X        }
  2582. X    }
  2583. X    bclose(infile);    
  2584. X    if (type == 0 || type == 1)
  2585. X        bclose(outfile);    
  2586. X    return(0);
  2587. X};
  2588. X
  2589. X
  2590. X// Function:    usage
  2591. X// Purpose:    give the user some clue as to how to execute program
  2592. X// Input:    none
  2593. X// Output:    a (hopefully) useful display of what the program should do
  2594. X// Author:    Greg Shaw
  2595. X// Created:    8/25/93
  2596. X
  2597. Xvoid usage(void)
  2598. X{
  2599. X        printf("Usage: fileutil -c section_name\n");
  2600. X        printf("       fileutil -n output_filename\n");
  2601. X        printf("       fileutil -m output_filename\n");
  2602. X        printf("       fileutil -u\n");
  2603. X        printf("       fileutil -d\n");
  2604. X};
  2605. X
  2606. X
  2607. Xmain(int argc,char *argv[])
  2608. X{
  2609. X    fileutil fileobj;    // files object for utilities
  2610. X    char    c;        // character sent back by getopt
  2611. X    CardRec    user;        // dummy for files object 'open'
  2612. X
  2613. X
  2614. X
  2615. X    c = getopt(argc,argv,"cnmud");    // all options are mutually exclusive
  2616. X                // so one only should be present
  2617. X    if (c == -1)
  2618. X        usage();
  2619. X    else
  2620. X    {
  2621. X        switch(c)
  2622. X        {
  2623. X        case 'c':    // create section from directory
  2624. X            // NOTE: this is the most dangerous one
  2625. X            // should only be done ONCE
  2626. X            if (argc != 3)         
  2627. X            {
  2628. X                usage();
  2629. X                return(0);
  2630. X            }
  2631. X            if (fileobj.open(argv[2],&user) != -1)
  2632. X            {
  2633. X                fileobj.create();
  2634. X            }
  2635. X            break;
  2636. X        case 'd':    // delete missing files
  2637. X            if (argc != 2)         
  2638. X            {
  2639. X                usage();
  2640. X                return(0);
  2641. X            }
  2642. X            fileobj.cycle_sections(3,argv[2]); // most downloaded
  2643. X            break;
  2644. X        case 'm':    // create list of most popular files
  2645. X            if (argc != 3)         
  2646. X            {
  2647. X                usage();
  2648. X                return(0);
  2649. X            }
  2650. X            fileobj.cycle_sections(1,argv[2]); // most downloaded
  2651. X            break;
  2652. X        case 'n':    // create list of new files
  2653. X            if (argc != 3)         
  2654. X            {
  2655. X                usage();
  2656. X                return(0);
  2657. X            }
  2658. X            fileobj.cycle_sections(0,argv[2]); // new files
  2659. X            break;
  2660. X        case 'u':    // update sections for new files without overwrite
  2661. X            if (argc != 2)         
  2662. X            {
  2663. X                usage();
  2664. X                return(0);
  2665. X            }
  2666. X            fileobj.cycle_sections(2,NULL); // update
  2667. X            break;
  2668. X        default:
  2669. X            usage();
  2670. X        }
  2671. X    }
  2672. X    return(0);
  2673. X};
  2674. X
  2675. X#endif // _FILEUTIL_C_
  2676. END_OF_FILE
  2677.   if test 14910 -ne `wc -c <'rocat-0.75/src/fileutil.C'`; then
  2678.     echo shar: \"'rocat-0.75/src/fileutil.C'\" unpacked with wrong size!
  2679.   fi
  2680.   chmod +x 'rocat-0.75/src/fileutil.C'
  2681.   # end of 'rocat-0.75/src/fileutil.C'
  2682. fi
  2683. echo shar: End of archive 5 \(of 9\).
  2684. cp /dev/null ark5isdone
  2685. MISSING=""
  2686. for I in 1 2 3 4 5 6 7 8 9 ; do
  2687.     if test ! -f ark${I}isdone ; then
  2688.     MISSING="${MISSING} ${I}"
  2689.     fi
  2690. done
  2691. if test "${MISSING}" = "" ; then
  2692.     echo You have unpacked all 9 archives.
  2693.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  2694. else
  2695.     echo You still must unpack the following archives:
  2696.     echo "        " ${MISSING}
  2697. fi
  2698. exit 0
  2699. exit 0 # Just in case...
  2700.