home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / misc / volume41 / casu / part02 < prev    next >
Encoding:
Text File  |  1994-01-09  |  54.4 KB  |  1,657 lines

  1. Newsgroups: comp.sources.misc
  2. From: lm@rmit.edu.au (Luke Mewburn)
  3. Subject: v41i077:  casu - comms. & status utils, v3.3, Part02/04
  4. Message-ID: <1994Jan10.025537.3829@sparky.sterling.com>
  5. X-Md4-Signature: bfeef26666718500897d92f0a15fc4d5
  6. Sender: kent@sparky.sterling.com (Kent Landfield)
  7. Organization: Sterling Software
  8. Date: Mon, 10 Jan 1994 02:55:37 GMT
  9. Approved: kent@sparky.sterling.com
  10.  
  11. Submitted-by: lm@rmit.edu.au (Luke Mewburn)
  12. Posting-number: Volume 41, Issue 77
  13. Archive-name: casu/part02
  14. Environment: UNIX, ANSI-C
  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:  casu-3.3/COPYING casu-3.3/ChangeLog casu-3.3/Makefile.in
  21. #   casu-3.3/init.c
  22. # Wrapped by kent@sparky on Sun Jan  9 20:46:38 1994
  23. PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin:$PATH ; export PATH
  24. echo If this archive is complete, you will see the following message:
  25. echo '          "shar: End of archive 2 (of 4)."'
  26. if test -f 'casu-3.3/COPYING' -a "${1}" != "-c" ; then 
  27.   echo shar: Will not clobber existing file \"'casu-3.3/COPYING'\"
  28. else
  29.   echo shar: Extracting \"'casu-3.3/COPYING'\" \(17982 characters\)
  30.   sed "s/^X//" >'casu-3.3/COPYING' <<'END_OF_FILE'
  31. X            GNU GENERAL PUBLIC LICENSE
  32. X               Version 2, June 1991
  33. X
  34. X Copyright (C) 1989, 1991 Free Software Foundation, Inc.
  35. X                          675 Mass Ave, Cambridge, MA 02139, USA
  36. X Everyone is permitted to copy and distribute verbatim copies
  37. X of this license document, but changing it is not allowed.
  38. X
  39. X                Preamble
  40. X
  41. X  The licenses for most software are designed to take away your
  42. Xfreedom to share and change it.  By contrast, the GNU General Public
  43. XLicense is intended to guarantee your freedom to share and change free
  44. Xsoftware--to make sure the software is free for all its users.  This
  45. XGeneral Public License applies to most of the Free Software
  46. XFoundation's software and to any other program whose authors commit to
  47. Xusing it.  (Some other Free Software Foundation software is covered by
  48. Xthe GNU Library General Public License instead.)  You can apply it to
  49. Xyour programs, too.
  50. X
  51. X  When we speak of free software, we are referring to freedom, not
  52. Xprice.  Our General Public Licenses are designed to make sure that you
  53. Xhave the freedom to distribute copies of free software (and charge for
  54. Xthis service if you wish), that you receive source code or can get it
  55. Xif you want it, that you can change the software or use pieces of it
  56. Xin new free programs; and that you know you can do these things.
  57. X
  58. X  To protect your rights, we need to make restrictions that forbid
  59. Xanyone to deny you these rights or to ask you to surrender the rights.
  60. XThese restrictions translate to certain responsibilities for you if you
  61. Xdistribute copies of the software, or if you modify it.
  62. X
  63. X  For example, if you distribute copies of such a program, whether
  64. Xgratis or for a fee, you must give the recipients all the rights that
  65. Xyou have.  You must make sure that they, too, receive or can get the
  66. Xsource code.  And you must show them these terms so they know their
  67. Xrights.
  68. X
  69. X  We protect your rights with two steps: (1) copyright the software, and
  70. X(2) offer you this license which gives you legal permission to copy,
  71. Xdistribute and/or modify the software.
  72. X
  73. X  Also, for each author's protection and ours, we want to make certain
  74. Xthat everyone understands that there is no warranty for this free
  75. Xsoftware.  If the software is modified by someone else and passed on, we
  76. Xwant its recipients to know that what they have is not the original, so
  77. Xthat any problems introduced by others will not reflect on the original
  78. Xauthors' reputations.
  79. X
  80. X  Finally, any free program is threatened constantly by software
  81. Xpatents.  We wish to avoid the danger that redistributors of a free
  82. Xprogram will individually obtain patent licenses, in effect making the
  83. Xprogram proprietary.  To prevent this, we have made it clear that any
  84. Xpatent must be licensed for everyone's free use or not licensed at all.
  85. X
  86. X  The precise terms and conditions for copying, distribution and
  87. Xmodification follow.
  88. X
  89. X            GNU GENERAL PUBLIC LICENSE
  90. X   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
  91. X
  92. X  0. This License applies to any program or other work which contains
  93. Xa notice placed by the copyright holder saying it may be distributed
  94. Xunder the terms of this General Public License.  The "Program", below,
  95. Xrefers to any such program or work, and a "work based on the Program"
  96. Xmeans either the Program or any derivative work under copyright law:
  97. Xthat is to say, a work containing the Program or a portion of it,
  98. Xeither verbatim or with modifications and/or translated into another
  99. Xlanguage.  (Hereinafter, translation is included without limitation in
  100. Xthe term "modification".)  Each licensee is addressed as "you".
  101. X
  102. XActivities other than copying, distribution and modification are not
  103. Xcovered by this License; they are outside its scope.  The act of
  104. Xrunning the Program is not restricted, and the output from the Program
  105. Xis covered only if its contents constitute a work based on the
  106. XProgram (independent of having been made by running the Program).
  107. XWhether that is true depends on what the Program does.
  108. X
  109. X  1. You may copy and distribute verbatim copies of the Program's
  110. Xsource code as you receive it, in any medium, provided that you
  111. Xconspicuously and appropriately publish on each copy an appropriate
  112. Xcopyright notice and disclaimer of warranty; keep intact all the
  113. Xnotices that refer to this License and to the absence of any warranty;
  114. Xand give any other recipients of the Program a copy of this License
  115. Xalong with the Program.
  116. X
  117. XYou may charge a fee for the physical act of transferring a copy, and
  118. Xyou may at your option offer warranty protection in exchange for a fee.
  119. X
  120. X  2. You may modify your copy or copies of the Program or any portion
  121. Xof it, thus forming a work based on the Program, and copy and
  122. Xdistribute such modifications or work under the terms of Section 1
  123. Xabove, provided that you also meet all of these conditions:
  124. X
  125. X    a) You must cause the modified files to carry prominent notices
  126. X    stating that you changed the files and the date of any change.
  127. X
  128. X    b) You must cause any work that you distribute or publish, that in
  129. X    whole or in part contains or is derived from the Program or any
  130. X    part thereof, to be licensed as a whole at no charge to all third
  131. X    parties under the terms of this License.
  132. X
  133. X    c) If the modified program normally reads commands interactively
  134. X    when run, you must cause it, when started running for such
  135. X    interactive use in the most ordinary way, to print or display an
  136. X    announcement including an appropriate copyright notice and a
  137. X    notice that there is no warranty (or else, saying that you provide
  138. X    a warranty) and that users may redistribute the program under
  139. X    these conditions, and telling the user how to view a copy of this
  140. X    License.  (Exception: if the Program itself is interactive but
  141. X    does not normally print such an announcement, your work based on
  142. X    the Program is not required to print an announcement.)
  143. X
  144. XThese requirements apply to the modified work as a whole.  If
  145. Xidentifiable sections of that work are not derived from the Program,
  146. Xand can be reasonably considered independent and separate works in
  147. Xthemselves, then this License, and its terms, do not apply to those
  148. Xsections when you distribute them as separate works.  But when you
  149. Xdistribute the same sections as part of a whole which is a work based
  150. Xon the Program, the distribution of the whole must be on the terms of
  151. Xthis License, whose permissions for other licensees extend to the
  152. Xentire whole, and thus to each and every part regardless of who wrote it.
  153. X
  154. XThus, it is not the intent of this section to claim rights or contest
  155. Xyour rights to work written entirely by you; rather, the intent is to
  156. Xexercise the right to control the distribution of derivative or
  157. Xcollective works based on the Program.
  158. X
  159. XIn addition, mere aggregation of another work not based on the Program
  160. Xwith the Program (or with a work based on the Program) on a volume of
  161. Xa storage or distribution medium does not bring the other work under
  162. Xthe scope of this License.
  163. X
  164. X  3. You may copy and distribute the Program (or a work based on it,
  165. Xunder Section 2) in object code or executable form under the terms of
  166. XSections 1 and 2 above provided that you also do one of the following:
  167. X
  168. X    a) Accompany it with the complete corresponding machine-readable
  169. X    source code, which must be distributed under the terms of Sections
  170. X    1 and 2 above on a medium customarily used for software interchange; or,
  171. X
  172. X    b) Accompany it with a written offer, valid for at least three
  173. X    years, to give any third party, for a charge no more than your
  174. X    cost of physically performing source distribution, a complete
  175. X    machine-readable copy of the corresponding source code, to be
  176. X    distributed under the terms of Sections 1 and 2 above on a medium
  177. X    customarily used for software interchange; or,
  178. X
  179. X    c) Accompany it with the information you received as to the offer
  180. X    to distribute corresponding source code.  (This alternative is
  181. X    allowed only for noncommercial distribution and only if you
  182. X    received the program in object code or executable form with such
  183. X    an offer, in accord with Subsection b above.)
  184. X
  185. XThe source code for a work means the preferred form of the work for
  186. Xmaking modifications to it.  For an executable work, complete source
  187. Xcode means all the source code for all modules it contains, plus any
  188. Xassociated interface definition files, plus the scripts used to
  189. Xcontrol compilation and installation of the executable.  However, as a
  190. Xspecial exception, the source code distributed need not include
  191. Xanything that is normally distributed (in either source or binary
  192. Xform) with the major components (compiler, kernel, and so on) of the
  193. Xoperating system on which the executable runs, unless that component
  194. Xitself accompanies the executable.
  195. X
  196. XIf distribution of executable or object code is made by offering
  197. Xaccess to copy from a designated place, then offering equivalent
  198. Xaccess to copy the source code from the same place counts as
  199. Xdistribution of the source code, even though third parties are not
  200. Xcompelled to copy the source along with the object code.
  201. X
  202. X  4. You may not copy, modify, sublicense, or distribute the Program
  203. Xexcept as expressly provided under this License.  Any attempt
  204. Xotherwise to copy, modify, sublicense or distribute the Program is
  205. Xvoid, and will automatically terminate your rights under this License.
  206. XHowever, parties who have received copies, or rights, from you under
  207. Xthis License will not have their licenses terminated so long as such
  208. Xparties remain in full compliance.
  209. X
  210. X  5. You are not required to accept this License, since you have not
  211. Xsigned it.  However, nothing else grants you permission to modify or
  212. Xdistribute the Program or its derivative works.  These actions are
  213. Xprohibited by law if you do not accept this License.  Therefore, by
  214. Xmodifying or distributing the Program (or any work based on the
  215. XProgram), you indicate your acceptance of this License to do so, and
  216. Xall its terms and conditions for copying, distributing or modifying
  217. Xthe Program or works based on it.
  218. X
  219. X  6. Each time you redistribute the Program (or any work based on the
  220. XProgram), the recipient automatically receives a license from the
  221. Xoriginal licensor to copy, distribute or modify the Program subject to
  222. Xthese terms and conditions.  You may not impose any further
  223. Xrestrictions on the recipients' exercise of the rights granted herein.
  224. XYou are not responsible for enforcing compliance by third parties to
  225. Xthis License.
  226. X
  227. X  7. If, as a consequence of a court judgment or allegation of patent
  228. Xinfringement or for any other reason (not limited to patent issues),
  229. Xconditions are imposed on you (whether by court order, agreement or
  230. Xotherwise) that contradict the conditions of this License, they do not
  231. Xexcuse you from the conditions of this License.  If you cannot
  232. Xdistribute so as to satisfy simultaneously your obligations under this
  233. XLicense and any other pertinent obligations, then as a consequence you
  234. Xmay not distribute the Program at all.  For example, if a patent
  235. Xlicense would not permit royalty-free redistribution of the Program by
  236. Xall those who receive copies directly or indirectly through you, then
  237. Xthe only way you could satisfy both it and this License would be to
  238. Xrefrain entirely from distribution of the Program.
  239. X
  240. XIf any portion of this section is held invalid or unenforceable under
  241. Xany particular circumstance, the balance of the section is intended to
  242. Xapply and the section as a whole is intended to apply in other
  243. Xcircumstances.
  244. X
  245. XIt is not the purpose of this section to induce you to infringe any
  246. Xpatents or other property right claims or to contest validity of any
  247. Xsuch claims; this section has the sole purpose of protecting the
  248. Xintegrity of the free software distribution system, which is
  249. Ximplemented by public license practices.  Many people have made
  250. Xgenerous contributions to the wide range of software distributed
  251. Xthrough that system in reliance on consistent application of that
  252. Xsystem; it is up to the author/donor to decide if he or she is willing
  253. Xto distribute software through any other system and a licensee cannot
  254. Ximpose that choice.
  255. X
  256. XThis section is intended to make thoroughly clear what is believed to
  257. Xbe a consequence of the rest of this License.
  258. X
  259. X  8. If the distribution and/or use of the Program is restricted in
  260. Xcertain countries either by patents or by copyrighted interfaces, the
  261. Xoriginal copyright holder who places the Program under this License
  262. Xmay add an explicit geographical distribution limitation excluding
  263. Xthose countries, so that distribution is permitted only in or among
  264. Xcountries not thus excluded.  In such case, this License incorporates
  265. Xthe limitation as if written in the body of this License.
  266. X
  267. X  9. The Free Software Foundation may publish revised and/or new versions
  268. Xof the General Public License from time to time.  Such new versions will
  269. Xbe similar in spirit to the present version, but may differ in detail to
  270. Xaddress new problems or concerns.
  271. X
  272. XEach version is given a distinguishing version number.  If the Program
  273. Xspecifies a version number of this License which applies to it and "any
  274. Xlater version", you have the option of following the terms and conditions
  275. Xeither of that version or of any later version published by the Free
  276. XSoftware Foundation.  If the Program does not specify a version number of
  277. Xthis License, you may choose any version ever published by the Free Software
  278. XFoundation.
  279. X
  280. X  10. If you wish to incorporate parts of the Program into other free
  281. Xprograms whose distribution conditions are different, write to the author
  282. Xto ask for permission.  For software which is copyrighted by the Free
  283. XSoftware Foundation, write to the Free Software Foundation; we sometimes
  284. Xmake exceptions for this.  Our decision will be guided by the two goals
  285. Xof preserving the free status of all derivatives of our free software and
  286. Xof promoting the sharing and reuse of software generally.
  287. X
  288. X                NO WARRANTY
  289. X
  290. X  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
  291. XFOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
  292. XOTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
  293. XPROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
  294. XOR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  295. XMERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
  296. XTO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
  297. XPROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
  298. XREPAIR OR CORRECTION.
  299. X
  300. X  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
  301. XWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
  302. XREDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
  303. XINCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
  304. XOUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
  305. XTO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
  306. XYOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
  307. XPROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
  308. XPOSSIBILITY OF SUCH DAMAGES.
  309. X
  310. X             END OF TERMS AND CONDITIONS
  311. X
  312. X    Appendix: How to Apply These Terms to Your New Programs
  313. X
  314. X  If you develop a new program, and you want it to be of the greatest
  315. Xpossible use to the public, the best way to achieve this is to make it
  316. Xfree software which everyone can redistribute and change under these terms.
  317. X
  318. X  To do so, attach the following notices to the program.  It is safest
  319. Xto attach them to the start of each source file to most effectively
  320. Xconvey the exclusion of warranty; and each file should have at least
  321. Xthe "copyright" line and a pointer to where the full notice is found.
  322. X
  323. X    <one line to give the program's name and a brief idea of what it does.>
  324. X    Copyright (C) 19yy  <name of author>
  325. X
  326. X    This program is free software; you can redistribute it and/or modify
  327. X    it under the terms of the GNU General Public License as published by
  328. X    the Free Software Foundation; either version 2 of the License, or
  329. X    (at your option) any later version.
  330. X
  331. X    This program is distributed in the hope that it will be useful,
  332. X    but WITHOUT ANY WARRANTY; without even the implied warranty of
  333. X    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  334. X    GNU General Public License for more details.
  335. X
  336. X    You should have received a copy of the GNU General Public License
  337. X    along with this program; if not, write to the Free Software
  338. X    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  339. X
  340. XAlso add information on how to contact you by electronic and paper mail.
  341. X
  342. XIf the program is interactive, make it output a short notice like this
  343. Xwhen it starts in an interactive mode:
  344. X
  345. X    Gnomovision version 69, Copyright (C) 19yy name of author
  346. X    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
  347. X    This is free software, and you are welcome to redistribute it
  348. X    under certain conditions; type `show c' for details.
  349. X
  350. XThe hypothetical commands `show w' and `show c' should show the appropriate
  351. Xparts of the General Public License.  Of course, the commands you use may
  352. Xbe called something other than `show w' and `show c'; they could even be
  353. Xmouse-clicks or menu items--whatever suits your program.
  354. X
  355. XYou should also get your employer (if you work as a programmer) or your
  356. Xschool, if any, to sign a "copyright disclaimer" for the program, if
  357. Xnecessary.  Here is a sample; alter the names:
  358. X
  359. X  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
  360. X  `Gnomovision' (which makes passes at compilers) written by James Hacker.
  361. X
  362. X  <signature of Ty Coon>, 1 April 1989
  363. X  Ty Coon, President of Vice
  364. X
  365. XThis General Public License does not permit incorporating your program into
  366. Xproprietary programs.  If your program is a subroutine library, you may
  367. Xconsider it more useful to permit linking proprietary applications with the
  368. Xlibrary.  If this is what you want to do, use the GNU Library General
  369. XPublic License instead of this License.
  370. END_OF_FILE
  371.   if test 17982 -ne `wc -c <'casu-3.3/COPYING'`; then
  372.     echo shar: \"'casu-3.3/COPYING'\" unpacked with wrong size!
  373.   fi
  374.   # end of 'casu-3.3/COPYING'
  375. fi
  376. if test -f 'casu-3.3/ChangeLog' -a "${1}" != "-c" ; then 
  377.   echo shar: Will not clobber existing file \"'casu-3.3/ChangeLog'\"
  378. else
  379.   echo shar: Extracting \"'casu-3.3/ChangeLog'\" \(16463 characters\)
  380.   sed "s/^X//" >'casu-3.3/ChangeLog' <<'END_OF_FILE'
  381. XThu Dec 23 12:36:26 EST 1993    Luke Mewburn (lm@yallara)
  382. X
  383. X    * increased to version 3.3.1, 931223 and prepared
  384. X    for patch01 generation and release.
  385. X
  386. X    * touched up README a bit.
  387. X
  388. X    * separated installation of manuals from programs, and
  389. X    provided installation directives for unformatted (install.man)
  390. X    and formatted (install.catman) manual pages.
  391. X
  392. X    * changed bitmask from 0x077 to 077 in source for
  393. X    determining tty permissions in configure.in. (Bug
  394. X    found by Michael Schroeder <screen@uni-erlangen.de>)
  395. X
  396. X
  397. XWed Dec 22 16:22:16 EST 1993    Luke Mewburn (lm@yallara)
  398. X
  399. X    * added patchlevel.h as a header that source should be
  400. X    dependant upon.
  401. X
  402. X    * terminated an echo in Makefile.in with a `;' so that
  403. X    the multiline statement that makes _to_ setgid tty
  404. X    work correctly.
  405. X
  406. X    * split VERSION into VERSION and RELDATE, updated
  407. X    usage statements in source accordingly.
  408. X
  409. X
  410. XTue Dec 21 17:04:46 EST 1993    Luke Mewburn (lm@yallara)
  411. X
  412. X    * prepared for comp.sources.misc submission, created patchlevel.h
  413. X
  414. X    * increased to version 3.3
  415. X
  416. X
  417. XTue Dec 21 14:42:42 EST 1993    Luke Mewburn (lm@yallara)
  418. X
  419. X    * added %b (host in brackets) to flon.
  420. X
  421. X    * rename bsearch.c::bsearch to nbsearch, and always use it.
  422. X
  423. X    * determine if YP/NIS is running, and define USE_GETPWENT
  424. X    if that is the case.
  425. X
  426. X    * updated email address to <lm@rmit.edu.au>
  427. X
  428. X
  429. XSun Nov  7 00:07:00 EST 1993    Luke Mewburn (root@ironbark)
  430. X
  431. X    * Added <paths.h> inclusion (if it exists), for definition
  432. X    of _PATH_DEV
  433. X    
  434. X    * If _to_ is running setgid(tty), then ensure that .torc
  435. X    is written with the user's group by first doing
  436. X    setgid(getgid()).
  437. X
  438. X    * Slightly re-word the ``you're not logged in'' message.
  439. X
  440. X
  441. XTue Sep  7 13:55:32 EST 1993    Luke Mewburn (lm@yallara)
  442. X   
  443. X    * Released as v 3.2.2 to alt.sources
  444. X
  445. X
  446. XWed Aug 25 15:24:45 EST 1993    Luke Mewburn (lm@yallara)
  447. X
  448. X    * check if bsearch() is declared in <stdlib.h> and don't
  449. X    define if that's the case.
  450. X
  451. X
  452. XSun Aug 15 23:22:25 EST 1993    Luke Mewburn (nroot@icosahedron)
  453. X
  454. X    * upgraded to version 3.2.2
  455. X
  456. X    * touched up manual pages & other documentation for new version
  457. X
  458. X    * added LN_S checks to configure.in
  459. X
  460. X    * re-ordered output of -r and -l for to (-r is now first.)
  461. X    * if you->tty == NULL, and no message got through, but you're
  462. X    on (and the message was to yourself), there are two entries
  463. X    in the passwd file for your uid (root/croot/nroot is usual case
  464. X    :). So, print `you are only logged on once.' This may not be
  465. X    correct for all situations like this, but I'm pretty sure it is.
  466. X
  467. X    * determine if malloc(), read(), open(), and gethostname()
  468. X    are declared in <*.h> and don't prototype if that's the case.
  469. X
  470. X    * re-ordered & touched up configure.in & Makefile.in
  471. X
  472. X
  473. XSat Aug 14 12:08:06 EST 1993    Luke Mewburn (lm@yallara)
  474. X
  475. X    * removed formatted manual pages from distribution (because
  476. X    'make -f Makefile.in dist' relies upon @ROFF@ & @TBL@ from
  477. X    configure, and configure hasn't been run yet...)
  478. X
  479. X    * all strings which are modifiable by a user (pseudonym,
  480. X    autoreplies, and the message) are now passed through
  481. X    filter_buf() to remove `illegal' characters. Just make this
  482. X    a dummy function if you don't like this behaviour.
  483. X
  484. X    * changed u_char to unsigned char in qsort.c
  485. X
  486. X    * added Steve Riehm's patchs (with minor changes) for
  487. X    a dottty (remember user AND tty), with relevant changes
  488. X    to manual.
  489. X
  490. X
  491. XFri Aug  6 18:05:25 EST 1993    Luke Mewburn (lm@yallara)
  492. X    
  493. X    * added  '\" t  as the first line of the *.rof files so that
  494. X    Solaris 2's man(1) would preprocess the pages through tbl.
  495. X
  496. X    * added `remove exclude entry'.
  497. X
  498. X    * ignore multiple additions of an exclude entry for a user.
  499. X
  500. X    * renamed add_alias & remove_alias to add_alist_ent &
  501. X    remove_alist_ent, which better describes their function
  502. X
  503. X    * fixed a couple of linked list bugs when adding an exclude
  504. X    entry to the alist (experienced when an exclude & an alias
  505. X    had the same userid).
  506. X
  507. X    * changed argv & argc globals in to.c to be explicitly
  508. X    static
  509. X
  510. X
  511. XSun Aug  1 00:49:49 EST 1993    Luke Mewburn (nroot@icosahedron)
  512. X
  513. X    * changed version to 3.2.1, and released to alt.sources
  514. X
  515. X    * check for <sys/utsname.h> & uname() if gethostname()
  516. X    is not available. If neither is available, print no
  517. X    host information in the _to_ header. Store `@' in host[]
  518. X    if we need it (in to.c:send_message)
  519. X
  520. X    * ensured man page, option parsing, and usage were all
  521. X    consistant with each other (WRT command line options.)
  522. X    Updated the manual pages for the new features.
  523. X
  524. X    * added some important porting information to `README'
  525. X    Included a `NEWS' file.
  526. X
  527. X    * distribution now supplied with preformatted manuals
  528. X    for those without nroff.
  529. X
  530. X    * reset default width for %h back to 16
  531. X
  532. X    * casu.h will only proto malloc/calloc/etc if stdlib.h
  533. X    isn't included.
  534. X
  535. X    * added -lsocket if found (for gethostname() on SCO)
  536. X
  537. X
  538. XSat Jul 31 00:28:56 EST 1993    Luke Mewburn (s902113@minyos)
  539. X    
  540. X    * added (non extern) definition of Kludge to to.c
  541. X    for SCO
  542. X
  543. X    * added the ability to exclude users in _to_, and an
  544. X    appropriate auto-reply message.
  545. X
  546. X    * fixed Makefile.in so object files were correctly rebuilt
  547. X    if casu.h was modified
  548. X
  549. X    * limit message to LINESIZ (256) chars, and replace all
  550. X    non-ascii & control codes with `?'.
  551. X
  552. X
  553. XWed Jul 28 16:21:06 EST 1993    Luke Mewburn (s902113@minyos)
  554. X
  555. X    * added 3rd arg (of 0) to open() in getutent.c
  556. X
  557. X    * added reading of message from stdin in _to_, but only
  558. X    if stdin is a terminal.
  559. X
  560. X    * renamed qsort in qsort.c to nqsort to avoid conflicts
  561. X    with partially ANSI compilers/headers (This version of
  562. X    qsort is always used over the libc version because it
  563. X    is guaranteed to have O(NlgN) worst case, unlike a lot
  564. X    of versions shipped with older systems.)
  565. X    
  566. X    * changed all use of buffers using MAXPATHLEN, MAXHOSTNAMELEN,
  567. X    BUFSIZ, etc to have an extra char (for NUL), and to strnc0py
  568. X    values using sizeof(buffer).
  569. X
  570. X
  571. XTue Jul 27 01:13:10 EST 1993    Luke Mewburn (s902113@minyos)
  572. X
  573. X    * RELEASE of CaSU 3.2 to alt.sources!
  574. X
  575. X    * used autoconf 1.5 to generate configure script
  576. X
  577. X    * cleaned up a couple of warnings generated by the
  578. X    Solaris 2 compiler.
  579. X
  580. X
  581. XMon Jul 26 02:04:49 EST 1993    Luke Mewburn (nroot@icosahedron)
  582. X
  583. X    * allowed _to_ to recognize `.user' or `. user' in .torc.
  584. X
  585. X    * cleaned up the docs, added the format of the .torc to
  586. X    TO.rof.
  587. X
  588. X
  589. XWed Jul 21 22:49:16 EST 1993    Luke Mewburn (nroot@icosahedron)
  590. X
  591. X    * fixed error messages for _to_ to correctly indicate
  592. X    why the transmission failed.
  593. X
  594. X    * _to_ now sends the message to the least idle tty (if
  595. X    one exists.)
  596. X
  597. X
  598. XWed Jul 21 05:03:51 EST 1993    Luke Mewburn (nroot@icosahedron)
  599. X
  600. X    * fixed minor definition problems with utmp & utmpx
  601. X    formats. NULL_UTMP_ENTRY for checks ut_name[0] as well
  602. X    as ut_type - necessary for SVR4 & possibly IRIX.
  603. X
  604. X    * changed default width for %h to 32
  605. X
  606. X    * doc fixes (added standard INSTALL file, moved old
  607. X    INSTALL & Notes to README, made __TODO__)
  608. X
  609. X    * fixed a couple of typos in Makefile.in which prevented
  610. X    the installation from working correctly.
  611. X
  612. X    * re-introduced system call/library prototypes to casu.h.
  613. X    Should be ok for most systems. If problems occur, just hack
  614. X    the definition of __PROT.
  615. X
  616. X
  617. XTue Jul 20 20:18:52 EST 1993    Luke Mewburn (s902113@yallara)
  618. X
  619. X    * include -lnsl so Solaris 2 can find gethostname()
  620. X
  621. X    * include <netdb.h> if MAXHOSTNAMELEN defined there
  622. X    (for Solaris 2)
  623. X
  624. X
  625. XTue Jul 20 13:25:24 EST 1993    Luke Mewburn (nroot@icosahedron)
  626. X    
  627. X    * autodetect if _to_ must be setgid tty (because terminals
  628. X    are owned by tty, and there is no global write perms to
  629. X    them.) Set TTY_RESTRICTED if this is the case, and TO_GRP
  630. X    to the numeric GID to install _to_ setgid.
  631. X
  632. X    * autodetect /etc/passwd.dir || /etc/pwd.db and set
  633. X    USE_GETPWENT if either exists. Otherwise, _flon_ will use
  634. X    custom /etc/passwd reading code.
  635. X
  636. X    * added support for SVR4's <utmpx.h>. Assumes that ut_host
  637. X    field exists, and ut_time is actually ut_tv.tv_sec.
  638. X
  639. X    * checked for potential overrun of buffer in convert_realname
  640. X
  641. X    * doc fixes (to .rof sources)
  642. X
  643. X    * depreciated the NO_GETLOGIN define (since the machine
  644. X    that it was a hack for has been replaced)
  645. X
  646. X    * began implementation of the GNU auto-configuration package.
  647. X
  648. X    * upgraded the version to 3.2 in light of the changes made.
  649. X
  650. X
  651. XTue Jul 20 01:30:38 EST 1993    Luke Mewburn (s902113@minyos)
  652. X
  653. X    * placed _flon_ & _to_ changelogs into this file at this point,
  654. X    for easier reference.
  655. X
  656. X
  657. X*
  658. X* CHANGELOG for _flon_ v3.1 and before:
  659. X*
  660. X
  661. X    3.1, 930715
  662. X    - added -P (minimum time before it prints time instead of
  663. X      `...' in %i)
  664. X    - added seconds & minutes suffixes (s & m) for -p & -P
  665. X    - added -e & -E back in, with a different meaning. (Because
  666. X      it's Not Good to make an option, even a useless one, illegal
  667. X      in a newer version). This pair of options toggles the
  668. X      Exclusion of people in your friends file (implicit -a).
  669. X    930621
  670. X    - compare_utmp now returns 0 for 2 NULL entries, not -1.
  671. X      (just an optimization)
  672. X    930619
  673. X    - hostname info is now from least idle tty.
  674. X    - `flon -w ...' is synonymous with `who ...'.
  675. X    - fixed `not clearing cur_ent' with no duplicates & a user who
  676. X      was `totally idled out'
  677. X    930613
  678. X    - deprecieated 'no errors' (-e & -E) options (it wasn't _that_ useful).
  679. X    - cleaned up version info, etc.
  680. X    - cur_ent.on now is #times_on - 1.
  681. X    930610
  682. X    - fixed yet another quote bug. should be robust now!
  683. X    - upped to v 3.1 and added to casu package.
  684. X
  685. X    3.0.4c, 930530
  686. X    - improved quote and backslash parsing of $FLON
  687. X    930529
  688. X    - %h handling not correct on machines which didn't support UT_HOST
  689. X    - finally got varient width and truncation working (I hope!)
  690. X    - number parsing (for -p and %<num><specifier>) improved.
  691. X    - moved misc routines from init.c & main.c to various.c
  692. X
  693. X    3.0.4b, 930528
  694. X    - wasn't null-terminating outbuf, so varient records overlapped stuff.
  695. X    930526
  696. X    - fixed bug in C_COUNT printing for duplicates.
  697. X    930525
  698. X    - version upped to 3.0.4, and released for general
  699. X      beta-testing.
  700. X
  701. X    3.0.3d, 930525
  702. X    - dumped heapsort() - trashes data created by malloc() on cc on minyos.
  703. X      Back to Net/2's qsort().
  704. X    930524:
  705. X    - moved putstr code directly into loop - makes debugging
  706. X      easier and speeds up the code a bit.
  707. X    930523
  708. X    - finished varient records
  709. X    930522
  710. X    - began implementing varient records.
  711. X    - rewrote outbuf handling code - doesn't rely upon chars
  712. X      being signed 8bit values.
  713. X
  714. X    3.0.3b, 930520
  715. X    - cleaned up printing code, and code in general (WRT
  716. X      localizing variable use, etc)
  717. X    - totally rewrote ' parsing in add_envopt. Should work with
  718. X      any number of ' pairs/word (a la csh) instead of only
  719. X      allowing 1 pair of 's per word.
  720. X    - using NET/2 bsearch() and heapsort() routines. (instead
  721. X      of qsort())
  722. X    - moved all printbuf stuff into 1 struct.
  723. X
  724. X    3.0.3a, 930519
  725. X    - %c and %x will print spaces if -d not given
  726. X    - -v is synonym for -V
  727. X    - added %a (availability). %m is always correct for
  728. X      the current tty. %a is as %[cx] when -d not given.
  729. X    930518
  730. X    - Moved all #define stuff from Makefile into lon.h
  731. X    - Removed BSEARCH define and associated qsort() stuff for
  732. X      passwd file.
  733. X
  734. X    3.0.2, 930504
  735. X    - Fixed definition of struct utmp Kludge for SCO boxes
  736. X    930503
  737. X    - Cleaned up parsing of output format.
  738. X    - Fixed bug with get_username() when getlogin() fails.
  739. X
  740. X    3.0.1, 930414
  741. X    - Fixed up who am I (it was not checking `I' correctly, only `i')
  742. X
  743. X    3.0, 930328
  744. X    - Entirely redesigned method of parsing format string. Only
  745. X      limitation is 1 %X (X == any specifier type) field can't
  746. X      exceed 127 bytes.
  747. X    - Cleaned up manual.
  748. X
  749. X    2.7, 930316
  750. X    - Enhanced $FLON parsing. Use modified code from gzip 1.0.6
  751. X      (which in itself was code modified from stuff I wrote &
  752. X      donated :), so $FLON format is now like:
  753. X        setenv FLON "-ht -o'%-u %p' -p30"
  754. X
  755. X    2.6.4b, 930125
  756. X    - Prototyped lon.h with __PROT() technique.
  757. X
  758. X    2.6.4a, 930123
  759. X    - Added optional use of getpw*() routines (for BSD boxes with
  760. X      cached entries).
  761. X    - Fixed error reporting for $FLON (got progname and varname
  762. X      mixed somehow between 2.6.2 and 2.6.4...)
  763. X
  764. X    2.6.3, 921019
  765. X    - Put options -O, -N, and -Y which reset the -o, -y, and -n
  766. X      options respectively to their compiled in defaults.
  767. X
  768. X    2.6.2, 920916
  769. X    - Default idle cutoff was 0 seconds instead of 5 minutes (an
  770. X      accidental change caused this...) Found by Albert Zvara, who,
  771. X      unlike the author, hadn't changed the default...
  772. X
  773. X    2.6.1, 920912
  774. X    - Fixed 'who am I <anyfile' so that it acts like 386BSD who(1).
  775. X      (I.e, outputs something like: "nroot    tty??    current_time")
  776. X    - Talk status when duplicates are removed is calculated
  777. X      differently, depending upon whether the idle time/tty for
  778. X      the least idle terminal is required or not.
  779. X    - Rewrote print.c so that flags that needed to be reset
  780. X      between lines of different users were being reset.
  781. X    - Put the global variables as a conditional extern in lon.h
  782. X
  783. X    2.6, 920905
  784. X    - Finally put flon under the GNU Public License, Version 2.
  785. X
  786. X    2.5.2, 920903
  787. X    - Modified Makefile to generate tarfile based on current
  788. X      version number in header file.
  789. X    - Fixed a fatal bug in the passwd file routine (which was
  790. X      only discovered after a kernel upgrade - I suspected the
  791. X      upgrade at first :) where I was overrunning the end of
  792. X      malloc region.
  793. X
  794. X    2.5.1, 920831
  795. X    - Fixed mix-ups with ttys. Caused when you a) wanted psuedonums,
  796. X      b) only wanted friends. I was resetting a flag (li_valid)
  797. X      which indicates the idle data is invalid. Thanx to W. Kasdorp
  798. X      for notifying me of the bug.
  799. X
  800. X    2.5rel, 920826
  801. X    - Entries for duplicates are printed with the most useful
  802. X      bit of info. The login/idle time and tty from the tty
  803. X      which has been idle the least is used.
  804. X    920825
  805. X    - By default, entries with ttys which can't be statted are 
  806. X      printed, but without idle time or mesg status displayed.
  807. X      -e now just doesn't print those entries.
  808. X
  809. X    2.5b, 920824
  810. X    - Really cleaned up Makefile: now you just edit the defines
  811. X    - Fixed up some of the compile options (WANTPROTO, etc)
  812. X    - 'who am I </dev/null' returns "Must be attached to tty.."
  813. X      (a la Sys V.).
  814. X
  815. X    2.5a, 920823
  816. X    - Made output compatible with 386BSD who(1). (Acts like who(1)
  817. X      when argv[0] is found to be 'who'). Doesn't do the (...) of
  818. X      hostname properly though...
  819. X      BUG: Can't handle 'who am I < anyfile' - acts as 'who'.
  820. X    - Fixed ampersand handling in passwd file. (Expands & in
  821. X      gcos field to username.)
  822. X    
  823. X    2.4.4 (internal beta version), 920822
  824. X    - Cleaned up detection of different utmp/passwd defines.
  825. X    - decided to create a changelog/notes file (This is that
  826. X      file...)
  827. X
  828. X    2.4.3, 920820
  829. X    - Fixed the tolower() problem in init.c (where uppercase
  830. X      formats were recogised, but were not being stored as lowercase)
  831. X    - Ported to 386BSD. (Added <stdlib.h> and <unistd.h>)
  832. X
  833. X    2.4.2
  834. X    - Friends files specified on the cmd line or in $FLON are
  835. X      taken to be relative to $cwd - let the OS decide (instead
  836. X      of assuming everything was relative to $HOME)
  837. X
  838. X    2.4.1
  839. X    - Fixed some of the passwd file stuff.
  840. X    - Added -e (ignore errors when statting /dev).
  841. X
  842. X    2.4
  843. X    - Added '%r' (real name of user).
  844. X    - Added -b. (%p acts as %r if no pseudonym found).
  845. X
  846. X    2.1->2.3
  847. X    - Undocumented bug fixes and featuritis adding.
  848. X
  849. X    2.0
  850. X    - First release to alt.sources.
  851. X
  852. X    1.0 -> 1.2
  853. X    - Undocumented original internal (to RMIT) version.
  854. X
  855. X
  856. X*
  857. X* CHANGELOG for _to_ v3.1 and before.
  858. X*
  859. X
  860. X    3.1, 930715
  861. X    - changed a couple of global variable names to reflect changes in
  862. X      casu.h
  863. X    930619
  864. X    - fixed bug when stdin redirected away from tty.
  865. X    930615
  866. X    - cleaned up error messages.
  867. X    930613
  868. X    - Improved code consistancy.
  869. X    - Removed assumption that alias & name in .torc were going to be
  870. X      16 & 8 chars long respectively.
  871. X    930609
  872. X    - Moved the code around, reduced the # of global variables.
  873. X    930608
  874. X    - Updated the version, included as part as CaSU package.
  875. X    - Hacked to code to work as part of CaSU.
  876. X
  877. X    3.0.6, 930503
  878. X    - Fixed up minor bugs with confusion between idle & gone auto-reply.
  879. X      (I.e, I cut & pasted a lot of lines :)
  880. X     930425
  881. X    - Fixed up pseudo handling. (Only writes pseudo from $NAME or
  882. X      $PSEUDONYM _if_ no pseudo currently defined in .torc)
  883. X     930423
  884. X    - Give a warning if your messages are off.
  885. X    - Fixed up usage message (and basenamed progname)
  886. X     930421
  887. X    - Added idle auto-reply.
  888. X    - Added unalias
  889. X    - Give warning if no arguments are given at all.
  890. X
  891. X    3.0.5, 930419
  892. X    - Cleaned up userid/name display.
  893. X
  894. X    3.0.4, 930415 
  895. X    - Added name/pseudonym storage in the .torc (only if it's from
  896. X    - -P, $PSEUDONYM, or $NAME)
  897. X    - Improved name handling.
  898. X    - Cleaned up code & argument passing, global variables, external
  899. X      function definitions.
  900. X
  901. X    3.0.3, 930408
  902. X    - Added -t tty option.
  903. X
  904. X    3.0.2, 930407
  905. X    - Fixed up inconsistancies with the dotuser (moved the variable
  906. X      to the user_t struct.)
  907. X    - Made all function passing of user_t with pointers.
  908. X
  909. X    3.0.1, 930406
  910. X    - Cleaned up messages to destinations.
  911. X
  912. X    3.0, 930327
  913. X    - First release of version by Luke Mewburn.
  914. END_OF_FILE
  915.   if test 16463 -ne `wc -c <'casu-3.3/ChangeLog'`; then
  916.     echo shar: \"'casu-3.3/ChangeLog'\" unpacked with wrong size!
  917.   fi
  918.   # end of 'casu-3.3/ChangeLog'
  919. fi
  920. if test -f 'casu-3.3/Makefile.in' -a "${1}" != "-c" ; then 
  921.   echo shar: Will not clobber existing file \"'casu-3.3/Makefile.in'\"
  922. else
  923.   echo shar: Extracting \"'casu-3.3/Makefile.in'\" \(5317 characters\)
  924.   sed "s/^X//" >'casu-3.3/Makefile.in' <<'END_OF_FILE'
  925. X#
  926. X# CaSU Makefile
  927. X#
  928. X# Version: 3.3.1
  929. X# Written 931223 by Luke Mewburn <lm@rmit.edu.au>
  930. X#
  931. X
  932. X
  933. X#### Start of system configuration section. ####
  934. X
  935. Xsrcdir = @srcdir@
  936. XVPATH = @srcdir@
  937. X
  938. X# Compiler related directives. If necessary, change to suit.
  939. X
  940. XCC = @CC@
  941. X
  942. XINSTALL = @INSTALL@
  943. XINSTALL_PROGRAM = @INSTALL_PROGRAM@
  944. XINSTALL_DATA = @INSTALL_DATA@
  945. XLN = @LN_S@
  946. X
  947. X#
  948. X# Defines currently available. Add to DEFS if necessary (if configure
  949. X# doesn't get it right)
  950. X#
  951. X# STDC_HEADERS=1    if the system's got full ANSI headers.
  952. X# const=        if the compiler doesn't grok `const'.
  953. X# uid_t=int        if <sys/types.h> doesn't have uid_t.
  954. X# gid_t=int        if <sys/types.h> doesn't have gid_t.
  955. X# mode_t=int        if <sys/types.h> doesn't have mode_t.
  956. X# size_t=int        if <sys/types.h> doesn't have size_t.
  957. X# HAVE_UNISTD_H=1    if <unistd.h> exists.
  958. X# HAVE_STDLIB_H=1    if <stdlib.h> exists.
  959. X# HAVE_PATHS_H=1    if <paths.h> exists.
  960. X# HAVE_UT_TYPE=1    struct utmp has ut_type (usually a SysV system.)
  961. X# HAVE_UT_HOST=1    struct utmp has ut_host (usually a BSD system.)
  962. X#            Note that SVR4 does, but in struct utmpx.
  963. X# HAVE_UTMPX_H=1    if <utmpx.h> & related getutx() funcs exist
  964. X#            (SVR4 does).
  965. X# HAVE_STRERROR=1    if strerror() exists.
  966. X# TTY_RESTRICTED=1    if there are no world write permissions to ttys,
  967. X#            so `to' must be setgid, and mask is 020 not 022.
  968. X# USE_GETPWENT=1    flon has 2 ways of getting passwd information:
  969. X#            a) use getpwent(), or b) use custom code.
  970. X#            The former is faster when /etc/passwd has some
  971. X#            form of database caching, otherwise the custom
  972. X#            code is usually faster.
  973. X# NEED_NETDB_H=1    if MAXHOSTNAMELEN is defined in <netdb.h>.
  974. X# MALLOC_DECL=1        if malloc() is declared in <stdlib.h>.
  975. X# OPEN_DECL=1        if open() is declared in <fcntl.h>.
  976. X# READ_DECL=1        if read() is declared in <unistd.h>.
  977. X# HAVE_GETHOSTNAME=1    if gethostname() exists (check -lnsl & -lsocket.)
  978. X# GETHOSTNAME_DECL=1    if gethostname() is declared in <unistd.h>.
  979. X# HAVE_UNAME=1        if uname() exists, but NOT gethostname().
  980. X# HAVE_SYS_UTSNAME_H=1    if <sys/utsname.h> exists, and using uname().
  981. X#
  982. X
  983. XDEFS = @DEFS@
  984. XLIBS = @LIBS@
  985. X
  986. XCFLAGS = -O
  987. X#CFLAGS = -pipe -Wall -O        # gcc <2.0
  988. X#CFLAGS = -pipe -Wall -O2        # gcc 2.0+
  989. X
  990. XLDFLAGS =
  991. X
  992. X
  993. X# Manual formatting directives - if necessary, change to suit.
  994. XROFF = @ROFF@
  995. XTBL = @TBL@
  996. X
  997. X
  998. X# Destination directories & files
  999. X
  1000. Xprefix = /usr/local
  1001. Xexec_prefix = $(prefix)
  1002. Xbinprefix =
  1003. Xmanprefix =
  1004. Xcatprefix =
  1005. X
  1006. Xbindir = $(exec_prefix)/bin
  1007. Xlibdir = /etc
  1008. Xmandir = $(prefix)/man/man1
  1009. Xmanext = 1
  1010. Xcatdir = $(prefix)/cat/cat1
  1011. Xcatext = 0
  1012. X
  1013. X# Set who_prog to empty if you don't want flon linked to who
  1014. Xwho_prog = who
  1015. X#who_prog =
  1016. X
  1017. X# Group to install `to' setgid to - if empty, don't setgid.
  1018. Xto_group = @TO_GRP@
  1019. X
  1020. X
  1021. X#### End of system configuration section. ####
  1022. X
  1023. X
  1024. XSHELL = /bin/sh
  1025. X
  1026. XLSRCS =    various.c getutent.c
  1027. XFSRCS =    fileio.c main.c init.c print.c qsort.c bsearch.c
  1028. XTSRCS =    to.c
  1029. XLOBJS =    various.o @LIBOBJS@
  1030. XFOBJS =    fileio.o main.o init.o print.o qsort.o bsearch.o $(LOBJS)
  1031. XTOBJS =    to.o $(LOBJS)
  1032. XSRCS =    $(FSRCS) $(TSRCS) $(LSRCS)
  1033. XOBJS =    $(FOBJS) $(TOBJS) $(LOBJS)
  1034. X
  1035. XHDRS = casu.h patchlevel.h
  1036. X
  1037. XDISTFILES = $(SRCS) $(HDRS) COPYING ChangeLog Makefile.in \
  1038. X        INSTALL README __TODO__ TO.rof FLON.rof \
  1039. X        eg.friends eg.torc tags configure.in configure NEWS
  1040. X
  1041. X
  1042. Xall: @PROGS@
  1043. X
  1044. X$(OBJS):    $(HDRS)
  1045. X
  1046. X.c.o:
  1047. X    $(CC) -c $(CFLAGS) $(CPPFLAGS) $(DEFS) -I$(srcdir) $<
  1048. X
  1049. Xinstall: all
  1050. X    $(INSTALL_PROGRAM) flon $(bindir)/$(binprefix)flon
  1051. X    if test -n "$(who_prog)"; then \
  1052. X        rm -f $(bindir)/$(binprefix)$(who_prog); \
  1053. X        $(LN) $(bindir)/$(binprefix)flon $(bindir)/$(binprefix)$(who_prog);\
  1054. X    fi
  1055. X    $(INSTALL_PROGRAM) to $(bindir)/$(binprefix)to
  1056. X    if test -n "$(to_group)"; then \
  1057. X        echo "Installing _to_ setgid to group $(to_group)"; \
  1058. X        chgrp $(to_group) $(bindir)/$(binprefix)to; \
  1059. X        chmod g+s $(bindir)/$(binprefix)to; \
  1060. X    fi
  1061. X
  1062. Xinstall.man:
  1063. X    $(INSTALL_DATA) $(srcdir)/FLON.rof $(mandir)/$(manprefix)flon.$(manext)
  1064. X    $(INSTALL_DATA) $(srcdir)/TO.rof $(mandir)/$(manprefix)to.$(manext)
  1065. X
  1066. Xinstall.catman:    catman
  1067. X    $(INSTALL_DATA) $(srcdir)/flon.0 $(catdir)/$(catprefix)flon.$(catext)
  1068. X    $(INSTALL_DATA) $(srcdir)/to.0 $(catdir)/$(catprefix)to.$(catext)
  1069. X
  1070. X
  1071. Xflon: $(FOBJS)
  1072. X    $(CC) $(LDFLAGS) $(FOBJS) $(LIBS) -o $@
  1073. X    if test -n "$(who_prog)"; then \
  1074. X        rm -f $(who_prog); \
  1075. X        $(LN) $@ $(who_prog); \
  1076. X    fi
  1077. X
  1078. Xto: $(TOBJS)
  1079. X    $(CC) $(LDFLAGS) $(TOBJS) $(LIBS) -o $@
  1080. X
  1081. X
  1082. Xcatman:    flon.0 to.0
  1083. X
  1084. Xflon.0: FLON.rof
  1085. X    if test -n "$(ROFF)"; then \
  1086. X        $(TBL) FLON.rof | $(ROFF) > $@; \
  1087. X    else \
  1088. X        cp FLON.rof $@; \
  1089. X    fi
  1090. X
  1091. Xto.0: TO.rof
  1092. X    if test -n "$(ROFF)"; then \
  1093. X        $(TBL) TO.rof | $(ROFF) > $@; \
  1094. X    else \
  1095. X        cp TO.rof $@; \
  1096. X    fi
  1097. X
  1098. Xinctree:
  1099. X    inctree $(DEFS) $(SRCS)
  1100. X
  1101. XTAGS: $(SRCS)
  1102. X    ctags $(SRCS)
  1103. X
  1104. Xclean:
  1105. X    rm -f $(TOBJS) $(FOBJS) core* mon.out gmon.out
  1106. X
  1107. Xmostlyclean: clean
  1108. X
  1109. Xdistclean: clean
  1110. X    rm -f Makefile config.status @PROGS@ $(who_prog)
  1111. X
  1112. Xrealclean: distclean
  1113. X    rm -f tags flon.0 to.0
  1114. X
  1115. Xdist:    $(DISTFILES)
  1116. X    echo `pwd` | sed 's|.*/||' > .fname
  1117. X    rm -rf `cat .fname`
  1118. X    mkdir `cat .fname`
  1119. X    ln $(DISTFILES) `cat .fname`
  1120. X    tar -zcf `cat .fname`.tar.gz `cat .fname`
  1121. X    rm -rf `cat .fname` .fname
  1122. X
  1123. Xdistshar: $(DISTFILES)
  1124. X    echo `pwd` | sed 's|.*/||' > .fname
  1125. X    rm -rf `cat .fname`
  1126. X    mkdir `cat .fname`
  1127. X    ln $(DISTFILES) `cat .fname`
  1128. X    shar -a -n `cat .fname` -s 'lm@rmit.edu.au (Luke Mewburn)' -c \
  1129. X        -L 30 -o `cat .fname`.sha `cat .fname`
  1130. X    rm -rf `cat .fname` .fname
  1131. X
  1132. X
  1133. X# Prevent GNU make v3 from overflowing arg limit on SysV.
  1134. X.NOEXPORT:
  1135. END_OF_FILE
  1136.   if test 5317 -ne `wc -c <'casu-3.3/Makefile.in'`; then
  1137.     echo shar: \"'casu-3.3/Makefile.in'\" unpacked with wrong size!
  1138.   fi
  1139.   # end of 'casu-3.3/Makefile.in'
  1140. fi
  1141. if test -f 'casu-3.3/init.c' -a "${1}" != "-c" ; then 
  1142.   echo shar: Will not clobber existing file \"'casu-3.3/init.c'\"
  1143. else
  1144.   echo shar: Extracting \"'casu-3.3/init.c'\" \(11248 characters\)
  1145.   sed "s/^X//" >'casu-3.3/init.c' <<'END_OF_FILE'
  1146. X/*
  1147. X *  CaSU - communications & status utilities.
  1148. X *  Copyright (C) 1992, 1993 Luke Mewburn <lm@rmit.edu.au>
  1149. X *    incorporating:
  1150. X *       flon - lists your friends who are logged on.
  1151. X *       to - send a short message to a friend
  1152. X *
  1153. X *  This program is free software; you can redistribute it and/or modify
  1154. X *  it under the terms of the GNU General Public License as published by
  1155. X *  the Free Software Foundation; either version 2 of the License, or
  1156. X *  (at your option) any later version.
  1157. X *  
  1158. X *  This program is distributed in the hope that it will be useful,
  1159. X *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  1160. X *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  1161. X *  GNU General Public License for more details.
  1162. X *  
  1163. X *  You should have received a copy of the GNU General Public License
  1164. X *  along with this program; if not, write to the Free Software
  1165. X *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  1166. X *
  1167. X */
  1168. X
  1169. X#include "casu.h"
  1170. X
  1171. X/* 
  1172. X *    getenvopts
  1173. X *
  1174. X *    argcp    - pointer to original argc
  1175. X *    argvp    - pointer to original argv
  1176. X *    env    - name of env var to check.
  1177. X *
  1178. X * This function is partially derived from code in gzip 1.0.6,
  1179. X * Copyright (C) 1992-1993 Jean-loup Gailly, (which itself was
  1180. X * derived from a function that I donated to Jean-loup :)
  1181. X */
  1182. X
  1183. X    /* to assist in compatibility with previous versions */
  1184. Xstatic int dodgy_env = 0;
  1185. X
  1186. Xvoid add_envopt(argcp, argvp, name)
  1187. X    int        *argcp;        /* pointer to argc */
  1188. X    char    ***argvp;    /* pointer to argv */
  1189. X    char    *name;        /* name of environment variable */
  1190. X{
  1191. X    char    *p, *env, **oargv, **nargv;
  1192. X    int        oargc = *argcp;    /* old argc */
  1193. X    int        nargc = 0;    /* number of arguments in env variable */
  1194. X    int        op, tp;        /* pos in origenv, pos in tmp buf */
  1195. X    int        quote;        /* # of single quotes in var. */
  1196. X
  1197. X    env = getenv(name);
  1198. X    if (env == NULL)
  1199. X    return;
  1200. X    p = (char *) malloc(strlen(env)+1);
  1201. X    if (!p)
  1202. X    errexit(strerror(errno), NULL);
  1203. X
  1204. X    if (!strchr(env, '-'))    /* no `-' options in environment variable */
  1205. X    dodgy_env++;
  1206. X    for (op = tp = 0; env[op]; nargc++ )
  1207. X    {                        /* move through env */
  1208. X    quote = 0;
  1209. X    while (env[op] == ' ' || env[op] == '\t')
  1210. X        op++;                /* skip leading whitespace */
  1211. X    if (!env[op])
  1212. X        break;
  1213. X    
  1214. X    while (env[op])
  1215. X    {
  1216. X        if (env[op] == '\'')
  1217. X        {
  1218. X        quote++;            /* single quote */
  1219. X        op++;
  1220. X        continue;
  1221. X        }
  1222. X        if ( !(quote % 2) && (env[op] == ' ' || env[op] == '\t') )
  1223. X        break;                /* nonquoted whitespace */
  1224. X        if (env[op] == '\\')
  1225. X        {
  1226. X        op++;                /* backslashed char */
  1227. X        if (!env[op])
  1228. X            errexit("Unterminated \\", name);
  1229. X        }
  1230. X        p[tp++] = env[op++];
  1231. X    }
  1232. X    if (quote % 2)                /* uneven # of 's */
  1233. X        errexit("Unmatched '", name);
  1234. X    p[tp++] = '\0';
  1235. X    }
  1236. X    if (nargc == 0)
  1237. X    return;
  1238. X    *argcp += nargc;
  1239. X    /*
  1240. X     * Allocate the new argv array, with an extra element just in case
  1241. X     * the original arg list did not end with a NULL.
  1242. X     */
  1243. X    nargv = (char**) calloc(*argcp+1, sizeof(char *));
  1244. X    if (nargv == NULL)
  1245. X    errexit(strerror(errno), NULL);
  1246. X    oargv  = *argvp;
  1247. X    *argvp = nargv;
  1248. X
  1249. X                    /* Copy the program name first */
  1250. X    if (oargc-- < 0)
  1251. X    errexit("Argc<=0", NULL);
  1252. X    *(nargv++) = *(oargv++);
  1253. X
  1254. X                    /* Then copy the environment args */
  1255. X    for (tp = 0; nargc > 0; nargc--)
  1256. X    {
  1257. X    *(nargv++) = &p[tp];        /* store start */
  1258. X    while (p[tp++])
  1259. X        ;                /* skip over word */
  1260. X    }
  1261. X
  1262. X                    /* Finally copy the old args */
  1263. X    while (oargc--)
  1264. X    *(nargv++) = *(oargv++);
  1265. X    return;
  1266. X} /* add_envopt */
  1267. X
  1268. X
  1269. X/*
  1270. X *    parse_options
  1271. X *
  1272. X * get all the options parsed...
  1273. X */
  1274. X
  1275. Xvoid
  1276. Xparse_options(origargc, myArgc, myArgv, frfile, format, yes_str, no_str)
  1277. X    int  origargc, myArgc;
  1278. X    char *myArgv[], **frfile, **format, **yes_str, **no_str;
  1279. X{
  1280. X    int        ch;
  1281. X
  1282. X    opterr=1;
  1283. X    while ((ch= getopt(myArgc, myArgv, "aAbBeEhHiIp:P:tTdDf:o:Oy:Yn:NvVU:w")) != -1)
  1284. X    switch (ch)
  1285. X    {
  1286. X    case 'a':
  1287. X        flags |= ALL_ON;
  1288. X        break;
  1289. X    case 'A':
  1290. X        flags &= ~ALL_ON;
  1291. X        break;
  1292. X    case 'b':
  1293. X        flags |= BEST_NAME;
  1294. X        break;
  1295. X    case 'B':
  1296. X        flags &= ~BEST_NAME;
  1297. X        break;
  1298. X    case 'e':
  1299. X        flags |= NO_MATES;
  1300. X        break;
  1301. X    case 'E':
  1302. X        flags &= ~NO_MATES;
  1303. X        break;
  1304. X    case 'h':
  1305. X        flags |= NO_HEADER;
  1306. X        break;
  1307. X    case 'H':
  1308. X        flags &= ~NO_HEADER;
  1309. X        break;
  1310. X    case 'i':
  1311. X        flags |= NO_IDLE;
  1312. X        break;
  1313. X    case 'I':
  1314. X        flags &= ~NO_IDLE;
  1315. X        break;
  1316. X    case 'p':
  1317. X    case 'P':
  1318. X        {
  1319. X            int p=0, v=0;
  1320. X            /* loop whilst this is a number < MAXIDLE */
  1321. X            while (optarg[p] && (v <= MAXIDLE) && isdigit(optarg[p]))
  1322. X            {
  1323. X            v *= 10;
  1324. X            v += optarg[p] - '0';
  1325. X            p++;
  1326. X            }
  1327. X            if (   (!optarg[p])
  1328. X            || ((strchr("sSmM", optarg[p]) && !optarg[p+1])))
  1329. X            {
  1330. X            if (strchr("mM", optarg[p]))    /* not in seconds */
  1331. X                v *= IDLE_MULTIPLY;
  1332. X            if (ch == 'P')
  1333. X                min_idle = v;
  1334. X            else
  1335. X                max_idle = v;
  1336. X            }
  1337. X            else
  1338. X            {
  1339. X            flags |= ERROR_OPT;    /* not a full number */
  1340. X            errmesg("illegal idle limit", optarg);
  1341. X            }
  1342. X        }
  1343. X        break;
  1344. X    case 't':
  1345. X        flags |= NO_TAILER;
  1346. X        break;
  1347. X    case 'T':
  1348. X        flags &= ~NO_TAILER;
  1349. X        break;
  1350. X    case 'd':
  1351. X        flags |= ONE_ONLY;
  1352. X        break;
  1353. X    case 'D':
  1354. X        flags &= ~ONE_ONLY;
  1355. X        break;
  1356. X    case 'f':
  1357. X        *frfile=optarg;
  1358. X        break;
  1359. X    case 'o':
  1360. X        *format=optarg;
  1361. X        break;
  1362. X    case 'O':
  1363. X        *format = STRformat;
  1364. X        break;
  1365. X    case 'y':
  1366. X        *yes_str=optarg;
  1367. X        break;
  1368. X    case 'Y':
  1369. X        *yes_str=STRyes;
  1370. X        break;
  1371. X    case 'n':
  1372. X        *no_str=optarg;
  1373. X        break;
  1374. X    case 'N':
  1375. X        *no_str=STRno;
  1376. X        break;
  1377. X    case 'U':
  1378. X        utmp_file=optarg;
  1379. X        break;
  1380. X    case 'w':
  1381. X        progname = WHO_PROG;
  1382. X        optind--;
  1383. X        who_main(myArgc - optind, &myArgv[optind]);
  1384. X        exit(0);
  1385. X            /* NOT REACHED */
  1386. X    case 'v':
  1387. X    case 'V':
  1388. X        flags |= COPYLEFT;
  1389. X    case '?':
  1390. X        flags |= ERROR_OPT;
  1391. X        break;
  1392. X    }
  1393. X    if (optind != myArgc)
  1394. X    flags |= ERROR_OPT;
  1395. X
  1396. X    if (flags >= ERROR_OPT)
  1397. X    {
  1398. X    if (dodgy_env || origargc == 1)
  1399. X        fprintf(stderr, "\
  1400. XWarning: Your $%s environment variable is of, or has, an older, incorrect,\n\
  1401. Xformat. Please check this, referring to the manual for further help.\n",
  1402. XSTRflon);
  1403. X    fprintf(stderr, "\
  1404. XUsage: %s [-aAbBeEhHiItTdD] [-f friendsfile] [-o format] [-O] [-U utmpfile]\n\
  1405. X\t\t[-y ys] [-Y] [-n ns] [-N] [-p max] [-P min] [-vV]\n", progname);
  1406. X
  1407. X    if (flags & COPYLEFT)
  1408. X    {
  1409. X        fprintf(stderr, "\
  1410. X\n\
  1411. X%s version %s, %s.\n\
  1412. XCopyright (C) 1992, 1993 Luke Mewburn.\n\
  1413. XEmail: <lm@rmit.edu.au>\n\
  1414. XThis is free software, and you are welcome to redistribute it under certain\n\
  1415. Xconditions. See version 2 of the GNU Public License for more details.\n\
  1416. X", progname, VERSION, RELDATE);
  1417. X        exit(0);
  1418. X    }
  1419. X    exit(1);
  1420. X    }
  1421. X    if (*format == NULL)
  1422. X    *format = STRformat;
  1423. X    if (*yes_str == NULL)
  1424. X    *yes_str = STRyes;
  1425. X    if (*no_str == NULL)
  1426. X    *no_str = STRno;
  1427. X} /* parse_options */
  1428. X
  1429. X
  1430. X/*
  1431. X *    parse_format
  1432. X *
  1433. X * parse the format string, and generate the outbuffer, template buffer,
  1434. X * and command buffer.
  1435. X * The following structures are created inside printdat:
  1436. X * buf -    has the template copied to each for each line output
  1437. X *        (used in print.c, but allocated here).
  1438. X * form -    contains the text which is static in each output line.
  1439. X * cmds -    contains 16bit entries of the form:
  1440. X *          | RA | VW | 13..8 CMD | 7..0 WIDTH |
  1441. X *        RA - right align
  1442. X *        VW - variant width
  1443. X *        CMD - 6 bit command
  1444. X *        WIDTH - 8 bit width (unsigned) 255 maxwidth limit
  1445. X *
  1446. X * note that these strings are all one continuous chunk of memory, in
  1447. X * this format:
  1448. X *    cmds    x ints long
  1449. X *    form    x chars long, starts at command + x
  1450. X *    buf    x chars long, starts at template + y
  1451. X */
  1452. X
  1453. Xvoid
  1454. Xparse_format(format)
  1455. X    char    *format;
  1456. X{
  1457. X    char    *clp;
  1458. X    int        cpos, fpos;
  1459. X    int        width, lp;
  1460. X
  1461. X    static struct
  1462. X    {
  1463. X    char    spec [NUM_SPECIFIERS];
  1464. X    int    wid  [NUM_SPECIFIERS];
  1465. X    int    cmd  [NUM_SPECIFIERS];
  1466. X    int    flags[NUM_SPECIFIERS];
  1467. X    } defwids =
  1468. X    {
  1469. X    { 'u',        'p',        'r',        'c',        'x',
  1470. X      'l',        'i',        't',        'm',        'h',
  1471. X      'b',        'a' },
  1472. X    {  8,        20,        20,        2,        1,
  1473. X       15,        5,        8,        3,        16,
  1474. X       18,        3 },
  1475. X    {  C_USER,    C_PSEUDO,    C_REAL,        C_COUNT,    C_X,
  1476. X       C_LOGIN,    C_IDLE,        C_TTY,        C_MESG,        C_HOST,
  1477. X       C_HOSTBRK,    C_AVAIL },
  1478. X    {  0,        NEED_FFILE,    NEED_PASSWD,    BLANKF,        BLANKF,
  1479. X       0,        NEED_STAT,    0,        NEED_STAT,    0,
  1480. X       0,        NEED_STAT | BLANKF }
  1481. X    };
  1482. X
  1483. X    if (flags & NO_IDLE)    /* stat is needed to remove idle entries */
  1484. X    flags |= NEED_STAT;
  1485. X    if (!(flags & ALL_ON))    /* don't need friends file with -a */
  1486. X    flags |= NEED_FFILE;
  1487. X    if (flags & NO_MATES)    /* need .friends & all people for no mates */
  1488. X    flags |= (ALL_ON + NEED_FFILE);
  1489. X
  1490. X    width = 0;
  1491. X    for (clp=format; *clp; clp++)
  1492. X    {
  1493. X    int newwid = 0;
  1494. X    while (*clp)
  1495. X    {
  1496. X        if (*clp == '%')
  1497. X        if (clp[1] == '\0')
  1498. X            errexit("No specifier after %", NULL);
  1499. X        else
  1500. X            if (clp[1] == '%')
  1501. X            clp++;
  1502. X            else
  1503. X            break;
  1504. X        newwid++;
  1505. X        clp++;
  1506. X    }
  1507. X    width += newwid;
  1508. X    if (! *clp)
  1509. X        break;
  1510. X    clp++;
  1511. X    if (*clp == '-' || *clp == '.')
  1512. X        clp++;
  1513. X    if (! *clp)
  1514. X        errexit("No specifier after %", NULL);
  1515. X
  1516. X    newwid=0;
  1517. X    while ((*clp) && isdigit(*clp) && (newwid <= MAX_WIDTH))
  1518. X    {
  1519. X        newwid = newwid*10 + *clp - '0';
  1520. X        clp++;
  1521. X    }
  1522. X    if (! *clp)
  1523. X        errexit("No specifier after %", NULL);
  1524. X    if (newwid > MAX_WIDTH)
  1525. X    {
  1526. X        clp[1] = '\0';    /* so the fprintf in errexit doesn't die */
  1527. X        errexit("Field width is too large", clp);
  1528. X    }
  1529. X    width += newwid;
  1530. X    if (isupper(*clp))
  1531. X        *clp = tolower(*clp);
  1532. X    for ( lp = 0; lp < NUM_SPECIFIERS; lp++ )
  1533. X        if ( defwids.spec[lp] == *clp )
  1534. X        break;
  1535. X    if (lp == NUM_SPECIFIERS)
  1536. X    {
  1537. X        clp[1] = '\0';    /* so printf in errexit doesn't die */
  1538. X        errexit("Invalid format char", clp);
  1539. X    }
  1540. X    if (!newwid)
  1541. X        width += defwids.wid[lp];
  1542. X    } /* for */
  1543. X
  1544. X    printdat.cmds = (int *) malloc((width + 1) * sizeof(int));
  1545. X    if (printdat.cmds == NULL)
  1546. X    errexit(strerror(errno), NULL);
  1547. X    printdat.form = (char *) malloc((width + 1) * 2 * sizeof(char));
  1548. X    if (printdat.form == NULL)
  1549. X    errexit(strerror(errno), NULL);
  1550. X    printdat.buf = &printdat.form[width+1];
  1551. X
  1552. X    for (lp=0; lp<width;lp++)
  1553. X    printdat.form[lp]=' ';
  1554. X    
  1555. X    cpos = fpos = 0;
  1556. X    for (clp=format; *clp; clp++)
  1557. X    {
  1558. X    width = 0;
  1559. X    while (*clp)
  1560. X    {
  1561. X        if (*clp == '%')
  1562. X        if (clp[1] == '%')
  1563. X            clp++;
  1564. X        else
  1565. X            break;
  1566. X        printdat.form[fpos++] = *clp;
  1567. X        width++;
  1568. X        clp++;
  1569. X    }
  1570. X    while (width > MAX_WIDTH)    /* mark in 'static' slots */
  1571. X    {
  1572. X        printdat.cmds[cpos++] = C_NULL + MAX_WIDTH;
  1573. X        width -= MAX_WIDTH;
  1574. X    }
  1575. X    if (width > 0)
  1576. X        printdat.cmds[cpos++] = C_NULL + (width & C_WIDMASK);
  1577. X    if (!*clp)
  1578. X        break;
  1579. X    clp++;
  1580. X    printdat.cmds[cpos] = 0;
  1581. X    if (*clp == '-')
  1582. X    {
  1583. X        clp++;
  1584. X        printdat.cmds[cpos] |= C_RIGHT;
  1585. X    }
  1586. X    if (*clp == '.')
  1587. X    {
  1588. X        clp++;
  1589. X        printdat.cmds[cpos] |= C_VARIENT;
  1590. X    }
  1591. X    width=0;
  1592. X    while ((*clp) && isdigit(*clp))
  1593. X    {
  1594. X        width = width*10 + *clp - '0';
  1595. X        clp++;
  1596. X    }
  1597. X    if (isupper(*clp))
  1598. X        *clp = tolower(*clp);
  1599. X    for (lp = 0; lp < NUM_SPECIFIERS; lp++)
  1600. X        if (defwids.spec[lp] == *clp)
  1601. X        break;
  1602. X    flags |= defwids.flags[lp];
  1603. X    if (!width)
  1604. X        width = defwids.wid[lp];
  1605. X    printdat.cmds[cpos] |= width + defwids.cmd[lp];
  1606. X    if (flags & BLANKF)
  1607. X    {
  1608. X        if (!(flags & ONE_ONLY))
  1609. X        {
  1610. X            /* don't print this field if not using -d */
  1611. X        printdat.cmds[cpos] &= C_WIDMASK;
  1612. X        printdat.cmds[cpos] |= C_NULL;
  1613. X        }
  1614. X        flags &= ~BLANKF;
  1615. X    }
  1616. X    cpos++;
  1617. X    fpos += width;
  1618. X    }
  1619. X    printdat.form[fpos] = '\0';
  1620. X    printdat.cmds[cpos] = 0;
  1621. X#if 0    /* debugging... */
  1622. X    {
  1623. X    int l = -1;
  1624. X    while (printdat.cmds[++l])
  1625. X    printf("%.3d  %4.4x  %d\n", l, printdat.cmds[l],
  1626. X            printdat.cmds[l] & C_WIDMASK);
  1627. X    l = -1;
  1628. X    while (printdat.form[++l])
  1629. X        printf("%c", printdat.form[l] == ' '? '_' : printdat.form[l]);
  1630. X    printf("\n");
  1631. X    }
  1632. X#endif
  1633. X} /* parse_format */
  1634. END_OF_FILE
  1635.   if test 11248 -ne `wc -c <'casu-3.3/init.c'`; then
  1636.     echo shar: \"'casu-3.3/init.c'\" unpacked with wrong size!
  1637.   fi
  1638.   # end of 'casu-3.3/init.c'
  1639. fi
  1640. echo shar: End of archive 2 \(of 4\).
  1641. cp /dev/null ark2isdone
  1642. MISSING=""
  1643. for I in 1 2 3 4 ; do
  1644.     if test ! -f ark${I}isdone ; then
  1645.     MISSING="${MISSING} ${I}"
  1646.     fi
  1647. done
  1648. if test "${MISSING}" = "" ; then
  1649.     echo You have unpacked all 4 archives.
  1650.     rm -f ark[1-9]isdone
  1651. else
  1652.     echo You still must unpack the following archives:
  1653.     echo "        " ${MISSING}
  1654. fi
  1655. exit 0
  1656. exit 0 # Just in case...
  1657.