home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume25 / ispin / part03 < prev    next >
Encoding:
Text File  |  1992-02-01  |  57.2 KB  |  1,116 lines

  1. Newsgroups: comp.sources.unix
  2. From: sir-alan!ispin!lbartz@iuvax.cs.indiana.edu (Larry Bartz)
  3. Subject: v25i114: Indianapolis Standard Printer Interface for Networked printers, Part03/15
  4. Sender: sources-moderator@pa.dec.com
  5. Approved: vixie@pa.dec.com
  6.  
  7. Submitted-By: sir-alan!ispin!lbartz@iuvax.cs.indiana.edu (Larry Bartz)
  8. Posting-Number: Volume 25, Issue 114
  9. Archive-Name: ispin/part03
  10.  
  11. #! /bin/sh
  12. # This is a shell archive.  Remove anything before this line, then unpack
  13. # it by saving it into a file and typing "sh file".  To overwrite existing
  14. # files, type "sh file -c".  You can also feed this as standard input via
  15. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  16. # will see the following message at the end:
  17. #        "End of archive 3 (of 15)."
  18. # Contents:  ISPI/COPY+WARR.doc ISPIN/h/common.h ISPIN/h/iqueuer.h
  19. #   ISPIN/h/ispin.h
  20. #   ISPIN/install/lib_rtab/CPU_SW_CDN_PTR/ADDR_SPEC/C351_PLAIN
  21. #   ISPIN/install/lib_rtab/CPU_SW_CDN_PTR/ADDR_SPEC/QUME_SHT
  22. #   ISPIN/install/lib_rtab/CPU_CDN_PTR/ADDR_SPEC/PLAIN
  23. #   ISPIN/install/lib_rtab/CPU_PTR/PLAIN
  24. # Wrapped by socrates@indy6 on Tue Jan 28 15:26:29 1992
  25. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  26. if test -f 'ISPI/COPY+WARR.doc' -a "${1}" != "-c" ; then 
  27.   echo shar: Will not clobber existing file \"'ISPI/COPY+WARR.doc'\"
  28. else
  29. echo shar: Extracting \"'ISPI/COPY+WARR.doc'\" \(9934 characters\)
  30. sed "s/^X//" >'ISPI/COPY+WARR.doc' <<'END_OF_FILE'
  31. X
  32. X
  33. X            GNU GENERAL PUBLIC LICENSE
  34. X             Version 1, February 1989
  35. X
  36. X Copyright (C) 1989 Free Software Foundation, Inc.
  37. X                    675 Mass Ave, Cambridge, MA 02139, USA
  38. X Everyone is permitted to copy and distribute verbatim copies
  39. X of this license document, but changing it is not allowed.
  40. X
  41. X                Preamble
  42. X
  43. X  The license agreements of most software companies try to keep users
  44. Xat the mercy of those companies.  By contrast, our General Public
  45. XLicense is intended to guarantee your freedom to share and change free
  46. Xsoftware--to make sure the software is free for all its users.  The
  47. XGeneral Public License applies to the Free Software Foundation's
  48. Xsoftware and to any other program whose authors commit to using it.
  49. XYou can use it for your programs, too.
  50. X
  51. X  When we speak of free software, we are referring to freedom, not
  52. Xprice.  Specifically, the General Public License is designed to make
  53. Xsure that you have the freedom to give away or sell copies of free
  54. Xsoftware, that you receive source code or can get it if you want it,
  55. Xthat you can change the software or use pieces of it in new free
  56. Xprograms; 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 a 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 tell them their rights.
  67. X
  68. X  We protect your rights with two steps: (1) copyright the software, and
  69. X(2) offer you this license which gives you legal permission to copy,
  70. Xdistribute and/or modify the software.
  71. X
  72. X  Also, for each author's protection and ours, we want to make certain
  73. Xthat everyone understands that there is no warranty for this free
  74. Xsoftware.  If the software is modified by someone else and passed on, we
  75. Xwant its recipients to know that what they have is not the original, so
  76. Xthat any problems introduced by others will not reflect on the original
  77. Xauthors' reputations.
  78. X
  79. X  The precise terms and conditions for copying, distribution and
  80. Xmodification follow.
  81. X
  82. X            GNU GENERAL PUBLIC LICENSE
  83. X   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
  84. X
  85. X  0. This License Agreement applies to any program or other work which
  86. Xcontains a notice placed by the copyright holder saying it may be
  87. Xdistributed under the terms of this General Public License.  The
  88. X"Program", below, refers to any such program or work, and a "work based
  89. Xon the Program" means either the Program or any work containing the
  90. XProgram or a portion of it, either verbatim or with modifications.  Each
  91. Xlicensee is addressed as "you".
  92. X
  93. X  1. You may copy and distribute verbatim copies of the Program's source
  94. Xcode as you receive it, in any medium, provided that you conspicuously and
  95. Xappropriately publish on each copy an appropriate copyright notice and
  96. Xdisclaimer of warranty; keep intact all the notices that refer to this
  97. XGeneral Public License and to the absence of any warranty; and give any
  98. Xother recipients of the Program a copy of this General Public License
  99. Xalong with the Program.  You may charge a fee for the physical act of
  100. Xtransferring a copy.
  101. X
  102. X  2. You may modify your copy or copies of the Program or any portion of
  103. Xit, and copy and distribute such modifications under the terms of Paragraph
  104. X1 above, provided that you also do the following:
  105. X
  106. X    a) cause the modified files to carry prominent notices stating that
  107. X    you changed the files and the date of any change; and
  108. X
  109. X    b) cause the whole of any work that you distribute or publish, that
  110. X    in whole or in part contains the Program or any part thereof, either
  111. X    with or without modifications, to be licensed at no charge to all
  112. X    third parties under the terms of this General Public License (except
  113. X    that you may choose to grant warranty protection to some or all
  114. X    third parties, at your option).
  115. X
  116. X    c) If the modified program normally reads commands interactively when
  117. X    run, you must cause it, when started running for such interactive use
  118. X    in the simplest and most usual way, to print or display an
  119. X    announcement including an appropriate copyright notice and a notice
  120. X    that there is no warranty (or else, saying that you provide a
  121. X    warranty) and that users may redistribute the program under these
  122. X    conditions, and telling the user how to view a copy of this General
  123. X    Public License.
  124. X
  125. X    d) You may charge a fee for the physical act of transferring a
  126. X    copy, and you may at your option offer warranty protection in
  127. X    exchange for a fee.
  128. X
  129. XMere aggregation of another independent work with the Program (or its
  130. Xderivative) on a volume of a storage or distribution medium does not bring
  131. Xthe other work under the scope of these terms.
  132. X
  133. X  3. You may copy and distribute the Program (or a portion or derivative of
  134. Xit, under Paragraph 2) in object code or executable form under the terms of
  135. XParagraphs 1 and 2 above provided that you also do one of the following:
  136. X
  137. X    a) accompany it with the complete corresponding machine-readable
  138. X    source code, which must be distributed under the terms of
  139. X    Paragraphs 1 and 2 above; or,
  140. X
  141. X    b) accompany it with a written offer, valid for at least three
  142. X    years, to give any third party free (except for a nominal charge
  143. X    for the cost of distribution) a complete machine-readable copy of the
  144. X    corresponding source code, to be distributed under the terms of
  145. X    Paragraphs 1 and 2 above; or,
  146. X
  147. X    c) accompany it with the information you received as to where the
  148. X    corresponding source code may be obtained.  (This alternative is
  149. X    allowed only for noncommercial distribution and only if you
  150. X    received the program in object code or executable form alone.)
  151. X
  152. XSource code for a work means the preferred form of the work for making
  153. Xmodifications to it.  For an executable file, complete source code means
  154. Xall the source code for all modules it contains; but, as a special
  155. Xexception, it need not include source code for modules which are standard
  156. Xlibraries that accompany the operating system on which the executable
  157. Xfile runs, or for standard header files or definitions files that
  158. Xaccompany that operating system.
  159. X
  160. X  4. You may not copy, modify, sublicense, distribute or transfer the
  161. XProgram except as expressly provided under this General Public License.
  162. XAny attempt otherwise to copy, modify, sublicense, distribute or transfer
  163. Xthe Program is void, and will automatically terminate your rights to use
  164. Xthe Program under this License.  However, parties who have received
  165. Xcopies, or rights to use copies, from you under this General Public
  166. XLicense will not have their licenses terminated so long as such parties
  167. Xremain in full compliance.
  168. X
  169. X  5. By copying, distributing or modifying the Program (or any work based
  170. Xon the Program) you indicate your acceptance of this license to do so,
  171. Xand all its terms and conditions.
  172. X
  173. X  6. Each time you redistribute the Program (or any work based on the
  174. XProgram), the recipient automatically receives a license from the original
  175. Xlicensor to copy, distribute or modify the Program subject to these
  176. Xterms and conditions.  You may not impose any further restrictions on the
  177. Xrecipients' exercise of the rights granted herein.
  178. X
  179. X  7. The Free Software Foundation may publish revised and/or new versions
  180. Xof the General Public License from time to time.  Such new versions will
  181. Xbe similar in spirit to the present version, but may differ in detail to
  182. Xaddress new problems or concerns.
  183. X
  184. XEach version is given a distinguishing version number.  If the Program
  185. Xspecifies a version number of the license which applies to it and "any
  186. Xlater version", you have the option of following the terms and conditions
  187. Xeither of that version or of any later version published by the Free
  188. XSoftware Foundation.  If the Program does not specify a version number of
  189. Xthe license, you may choose any version ever published by the Free Software
  190. XFoundation.
  191. X
  192. X  8. If you wish to incorporate parts of the Program into other free
  193. Xprograms whose distribution conditions are different, write to the author
  194. Xto ask for permission.  For software which is copyrighted by the Free
  195. XSoftware Foundation, write to the Free Software Foundation; we sometimes
  196. Xmake exceptions for this.  Our decision will be guided by the two goals
  197. Xof preserving the free status of all derivatives of our free software and
  198. Xof promoting the sharing and reuse of software generally.
  199. X
  200. X                NO WARRANTY
  201. X
  202. X  9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
  203. XFOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
  204. XOTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
  205. XPROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
  206. XOR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  207. XMERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
  208. XTO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
  209. XPROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
  210. XREPAIR OR CORRECTION.
  211. X
  212. X  10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
  213. XWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
  214. XREDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
  215. XINCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
  216. XOUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
  217. XTO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
  218. XYOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
  219. XPROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
  220. XPOSSIBILITY OF SUCH DAMAGES.
  221. X
  222. X             END OF TERMS AND CONDITIONS
  223. X
  224. END_OF_FILE
  225. if test 9934 -ne `wc -c <'ISPI/COPY+WARR.doc'`; then
  226.     echo shar: \"'ISPI/COPY+WARR.doc'\" unpacked with wrong size!
  227. fi
  228. # end of 'ISPI/COPY+WARR.doc'
  229. fi
  230. if test -f 'ISPIN/h/common.h' -a "${1}" != "-c" ; then 
  231.   echo shar: Will not clobber existing file \"'ISPIN/h/common.h'\"
  232. else
  233. echo shar: Extracting \"'ISPIN/h/common.h'\" \(16935 characters\)
  234. sed "s/^X//" >'ISPIN/h/common.h' <<'END_OF_FILE'
  235. X/****************************************************************************/
  236. X/*                                                                          */
  237. X/* 1988, SOWSEAR ENGINEERING, SOFTWARE GROUP    Indianapolis, IN            */
  238. X/*                                                                          */
  239. X/*               our motto: "Who says you can't...?"                        */
  240. X/*                                                                          */
  241. X/****************************************************************************/
  242. X/* COMMON.H                                                                 */
  243. X/*                                                                          */
  244. X/* This is the header file which is shared by ISPIN, IQUEUER, and IQ.       */
  245. X/* Any defines, includes, or variables which may be peculiar to a           */
  246. X/* particular program is in ispin.h, iqueuer.h, or iq.h, resectively.       */
  247. X/*                                                                          */
  248. X/* ISPIN                                                                    */
  249. X/*                                                                          */
  250. X/* Indianapolis Standard Printer Interface (for Network printers)           */
  251. X/****************************************************************************/
  252. X/*                                                                          */
  253. X/* COMMENTS                                                                 */
  254. X/*                                                                          */
  255. X/* This program services printers which are not directly connected to       */
  256. X/* the cpu, but which are accessible from the cpu via network facilities.   */
  257. X/* ISPIN is conditionally compiled to support either one of two spooler/    */
  258. X/* queuer environments. ISPIN is able to provide this service by capital-   */
  259. X/* -izing upon the spooler/queuer facilities which are native to the        */
  260. X/* system. Each of these native spooler/queuers was designed to permit the  */
  261. X/* user (System Administrator and/or system programmer) the ability to      */
  262. X/* create and implement customized programs ("backend" for NQ, "interface"  */
  263. X/* for LP) such as this. Check the documentation. It's all there.           */
  264. X/* It's no big deal.                                                        */
  265. X/*                                                                          */
  266. X/* NQ is for the older, System III Zilogs of which IRS had approximately    */
  267. X/* 500 in service. These machines run under Zilog's ZEUS 3.21 UNIX. The     */
  268. X/* spooler/queuer is comprised of the family nq(1), xq(1), dqueuer(M).      */
  269. X/* In this environment, ISPIN will function as the "backend" program, so    */
  270. X/* must be so specified in the /usr/spool/queuer/config file.               */
  271. X/*                                                                          */
  272. X/* LP is for the System V UNIX spooler, as implemented by AT&T and those    */
  273. X/* which are similarly implemented. In this environment, ISPIN will         */
  274. X/* function as the "interface" program.                                     */
  275. X/*                                                                          */
  276. X/* EXTERNAL ENTITIES                                                        */
  277. X/*                                                                          */
  278. X/* In addition to the native queueing system and its utilities, ISPIN       */
  279. X/* depends on the existence and functionality of four entities which        */
  280. X/* are external to ISPIN but which exist solely to support ISPIN.           */
  281. X/*                                                                          */
  282. X/*   RTAB - The first such entity is an ascii file which is a table of data */
  283. X/* which is required to contact the remote printer. Each remote printer     */
  284. X/* which is supported will have an entry in this table. The construction    */
  285. X/* and usage of this table is roughly analogous to uucp's L.sys file (or    */
  286. X/* the Systems file under HoneyDanBer uucp). See further comments in the    */
  287. X/* quoted-out comments of the rtab file supplied with this release.         */
  288. X/*                                                                          */
  289. X/*   IQUEUER - The second of the external entities is the daemon IQUEUER.   */
  290. X/* The sole function of IQUEUER is to manage a fair FIFO competition        */
  291. X/* among multiple simultaneous invocations of ISPIN which may compete with  */
  292. X/* each other for access to a cpu port. IQUEUER has no control over the     */
  293. X/* life or death of the process ISPIN. Such control remains the exclusive   */
  294. X/* domain of the native queuer.                                             */
  295. X/*   This method (a secondary queuer) was chosen over the relatively        */
  296. X/* arcane method of using LOCKFILEs for several reasons. LOCKFILE-controlled*/
  297. X/* resource management naturally results in randomly sequenced servicing    */
  298. X/* of those processes which are competing for resources. Under a LOCKFILE   */
  299. X/* regime, there is no queueing. Race conditions and/or wasteful looping    */
  300. X/* and checking determine access sequence. Also, LOCKFILEs may be aban-     */
  301. X/* doned by dead processes (dead because they bombed, or were killed, or    */
  302. X/* because the system crashed). Abandoned LOCKFILEs generally require the   */
  303. X/* intervention of the Systems Administrator, who must expunge them in      */
  304. X/* order to return the system to functionality.                             */
  305. X/*                                                                          */
  306. X/*   PIPES - ISPIN and IQUEUER communicate via named pipes. This communi-   */
  307. X/* cation method is more robust than SIGNAL communication while being       */
  308. X/* more efficient than communication which relies upon intermediate         */
  309. X/* status files. The "blocking read" permitted under this approach allows   */
  310. X/* ISPIN and IQUEUER to merely sleep while waiting for work orders, as      */
  311. X/* opposed to wasteful looping and checking of an intermediate status file  */
  312. X/* to see whether there is work to be done.                                 */
  313. X/*                                                                          */
  314. X/*   IQ - the status enquirer. This program is a command to be executed by  */
  315. X/* those users who wish to know the current status of requests which have   */
  316. X/* been released by the native queuer but are now being monitored and/or    */
  317. X/* queued by IQUEUER. All such jobs will be shown as "running" or "now      */
  318. X/* printing" by the native queuer, since (as far as the native queuer knows)*/
  319. X/* once the backend (NQ) or interface (LP) program has been invoked, the    */
  320. X/* request is being satisfied. IQ exercises no control whatsoever over the  */
  321. X/* IQUEUER, the ISPIN, or the native queuer. Again, all control over the    */
  322. X/* backend/interface (ISPIN) is retained by the native queuer and its       */
  323. X/* utilities.                                                               */
  324. X/*                                                                          */
  325. X/*                                                                          */
  326. X/* CHOICES                                                                  */
  327. X/*                                                                          */
  328. X/* We have chosen not to support certain "features" of the NQ/DQUEUER       */
  329. X/* environment. These include, reporting print job progress to the status   */
  330. X/* file (STATUSFD), and ignoring the restart and backup commands of the     */
  331. X/* xq command. We have many good reasons for this, but system performance   */
  332. X/* and robustness of the backend are paramount.                             */
  333. X/*                                                                          */
  334. X/*                                                                          */
  335. X/****************************************************************************/
  336. X/*                                                                          */
  337. X/* DEFINES                                                                  */
  338. X/*                                                                          */
  339. X/* Which spooler are we compiling for?                                      */
  340. X/* Define one or the other, never both.                                     */
  341. X/*                                                                          */
  342. X/* If we want to compile for NQ, we'll define it in the compile line.       */
  343. X/*                                                                          */
  344. X/* #define NQ                                                               */
  345. X/* or #define LP                                                            */
  346. X#ifndef NQ
  347. X#define LP
  348. X#endif
  349. X/*                                                                          */
  350. X/*  NQ is for the older System III Zilogs, which use nq, xq, and dqueuer.   */
  351. X/*  LP is for System V lp spoolers.                                         */
  352. X/*                                                                          */
  353. X/*                                                                          */
  354. X/*                                                                          */
  355. X/*                                                                          */
  356. X/*                                                                          */
  357. X/*                                                                          */
  358. X#define SUCCESS 0
  359. X/*                                                                          */
  360. X/* Flags for use with notify() function                                     */
  361. X#define HERE 1
  362. X#define WORKING 2
  363. X#define DONE 3
  364. X#define TROUBLE 4
  365. X#define WAIT 5
  366. X#define GO 6
  367. X#define BUSY 7
  368. X#define STATUS 8
  369. X/* status, or current state of the ISPIN                                    */
  370. X#define STARTUP 22
  371. X#define CONNECTING 33
  372. X#define PRINTING 44
  373. X#define LOOPING 55
  374. X#define WAITING 66
  375. X#define DISCONNECTING 77
  376. X#define QUITTING 88
  377. X#define NET_TIME 90
  378. X#define TIMEOUT 99
  379. X/* error types for use with my_error() function                             */
  380. X/* keep these less than 127, or lpsched will have a fit!                    */
  381. X#define NO_EXIT 115
  382. X#define NONOTIFY 116
  383. X#define MYERR 117
  384. X#define SYSERR 118
  385. X/*                                                                          */
  386. X/****************************************************************************/
  387. X/*                                                                          */
  388. X/* INCLUDES                                                                 */
  389. X/*                                                                          */
  390. X/*                                                                          */
  391. X/*                                                                          */
  392. X/* Same for everybody.                                                      */
  393. X#include <stdio.h>
  394. X#include <ctype.h>
  395. X#include <time.h>
  396. X#include <fcntl.h>
  397. X#include <errno.h>
  398. X#include <pwd.h>
  399. X#include <sys/types.h>
  400. X#include <sys/stat.h>
  401. X/*                                                                          */
  402. X/*                                                                          */
  403. X/* Some conditional includes, assuming Zeus 3.21 for NQ                     */
  404. X/* and System V UNIX for LP.                                                */
  405. X/*                                                                          */
  406. X#ifdef NQ
  407. X#include <ssignal.h>
  408. X#include "../h/nqspool.h"
  409. X#else
  410. X#include <signal.h>
  411. X#include <string.h>
  412. X#include <malloc.h>
  413. X#endif
  414. X/*                                                                          */
  415. X/* Allow for local configuration adjustments                                */
  416. X/*                                                                          */
  417. X#include "../h/localcnfg.h"
  418. X/*                                                                          */
  419. X/****************************************************************************/
  420. X/*                                                                          */
  421. X/* DATA TYPES, VARIABLES, ETC                                               */
  422. X/*                                                                          */
  423. X/*                                                                          */
  424. XFILE *fopen(),
  425. X     *logfile;    /* the error file stream            */
  426. X
  427. X
  428. X/* a union used to treat integers as arrays of characters                   */
  429. Xunion chr_int
  430. X{
  431. X  char chr[sizeof(int)];
  432. X  int  intgr;
  433. X};
  434. X
  435. Xint intsize;
  436. Xintsize = sizeof(int);
  437. X
  438. X/* a union used to treat longs as arrays of characters                      */
  439. Xunion chr_lng
  440. X{
  441. X  char chr[sizeof(long)];
  442. X  long lng;
  443. X};
  444. X
  445. Xint longsize;
  446. Xlongsize = sizeof(long);
  447. X
  448. X/* for use with reads: how many characters did we get?                      */
  449. Xint chars_got;
  450. X/*                                                                          */
  451. X
  452. Xchar errmsg[BUFSIZ];     /* a place to format an error msg */
  453. Xchar errmsg2[BUFSIZ];     /* a place to format an error msg */
  454. Xchar msg_buf[BUFSIZ];    /* a place to format msg between procs via FIFOs */
  455. X
  456. Xlong tloc;
  457. Xchar *time_str;
  458. Xchar *asctime();
  459. Xstruct tm *localtime();
  460. Xstruct tm *nowtime;
  461. X
  462. Xstruct passwd *getpwnam(), *getpwuid(), *pass;
  463. X
  464. Xextern char **environ;
  465. X
  466. Xextern int  errno;           /*\            */
  467. X#ifdef NQ
  468. Xextern int  deverr;          /* \ see       */
  469. X#endif
  470. Xextern int  sys_nerr;        /* / perror(3) */
  471. Xextern char *sys_errlist[];  /*/            */
  472. X
  473. Xchar *calloc();
  474. X
  475. X/* the structures used for communication with IQUEUER  */
  476. X
  477. X  struct to_iqueuer
  478. X  {
  479. X    union chr_int typ;              /* what kind of message is this? */
  480. X    union chr_int my_pid;           /* the pid of this process       */
  481. X    union chr_int my_fifo;          /* the inode number of my FIFO   */
  482. X    union chr_int dev1_inod;        /* the inode number of the primary device */
  483. X    union chr_int dev2_inod;        /* the inode number of secondary device */
  484. X    union chr_int dev3_inod;        /* the inode number of tertiary device */
  485. X    union chr_int dev4_inod;        /* the inode number of 4th device */
  486. X    union chr_int dev5_inod;        /* the inode number of 5th device */
  487. X    union chr_int dev6_inod;        /* the inode number of 6th device */
  488. X    union chr_int dev7_inod;        /* the inode number of 7th device */
  489. X    union chr_int dev8_inod;        /* the inode number of 8th device */
  490. X    union chr_int dev9_inod;        /* the inode number of 9th device */
  491. X    union chr_int dev10_inod;       /* the inode number of 10th device */
  492. X    union chr_int dev11_inod;       /* the inode number of 11th device */
  493. X                                    /* devX_inode == 0 if no Xth dev */
  494. X    union chr_int  uid;             /* uid of the requesting user                   */
  495. X    union chr_int loop;             /* counter for number of BUSY loops             */
  496. X                                    /* Make sure we can go evenly into 512.  */
  497. X  } req_msg;
  498. X
  499. Xint to_iqrsiz;
  500. Xto_iqrsiz = sizeof(struct to_iqueuer);
  501. X
  502. X  struct to_ispin
  503. X  {
  504. X    union chr_int orders;           /* wait or go?                   */
  505. X    union chr_int iq_pid;           /* the pid of the daemon         */
  506. X    union chr_int dev_use_ino;      /* the inode number of the device to use */
  507. X    union chr_int pad1;             /* Padding, FIFO either has enough room, */
  508. X                                    /* or is full.                           */
  509. X                                    /* Make sure we can go evenly into 512.  */
  510. X  } cmd_msg;
  511. X
  512. Xint to_ispinsiz;
  513. Xto_ispinsiz = sizeof(struct to_ispin);
  514. X
  515. X  struct dev_info
  516. X  {
  517. X    int inode;                      /* the inode number of the device */
  518. X    char name[80];                  /* the name of the device         */
  519. X    int so_many;                    /* how many requests for this dev */
  520. X   } devinfo;
  521. X
  522. X  /* we'll handle up to eleven potential devices */
  523. X  /* used by both IQUEUER and ISPIN              */
  524. X  struct dev_info dev_ray[11];
  525. X
  526. X/* counters for use when moving chars to/from the FIFO read/write buffer      */
  527. Xint count1, count2;
  528. X/*                                                                            */
  529. X/*                                                                            */
  530. X/*                                                                            */
  531. X/*                                                                            */
  532. X/*                                                                            */
  533. X/*                                                                            */
  534. X/*                                                                            */
  535. X/*                                                                            */
  536. Xint    time_out = 0;        /* variable for knowing whether we timed out */
  537. Xint    ret_val  = 0;        /* variable for return values of functions   */
  538. Xint    my_error();
  539. END_OF_FILE
  540. if test 16935 -ne `wc -c <'ISPIN/h/common.h'`; then
  541.     echo shar: \"'ISPIN/h/common.h'\" unpacked with wrong size!
  542. fi
  543. # end of 'ISPIN/h/common.h'
  544. fi
  545. if test -f 'ISPIN/h/iqueuer.h' -a "${1}" != "-c" ; then 
  546.   echo shar: Will not clobber existing file \"'ISPIN/h/iqueuer.h'\"
  547. else
  548. echo shar: Extracting \"'ISPIN/h/iqueuer.h'\" \(7698 characters\)
  549. sed "s/^X//" >'ISPIN/h/iqueuer.h' <<'END_OF_FILE'
  550. X/****************************************************************************/
  551. X/*                                                                          */
  552. X/* 1988, SOWSEAR ENGINEERING, SOFTWARE GROUP    Indianapolis, IN            */
  553. X/*                                                                          */
  554. X/*               our motto: "Who says you can't...?"                        */
  555. X/*                                                                          */
  556. X/****************************************************************************/
  557. X/*                                                                          */
  558. X/* IQUEUER.H                                                                */
  559. X/*                                                                          */
  560. X/* common.h is the header file which is shared by ISPIN, IQUEUER, and IQ.   */
  561. X/*                                                                          */
  562. X/* Any defines, includes, or variables which may be peculiar to a           */
  563. X/* particular program is in ispin.h, iqueuer.h, or iq.h, resectively.       */
  564. X/*                                                                          */
  565. X/*                                                                          */
  566. X/* IQUEUER - the secondary queueing daemon for:                             */
  567. X/*                                                                          */
  568. X/* ISPIN                                                                    */
  569. X/*                                                                          */
  570. X/* Indianapolis Standard Printer Interface (for Network printers)           */
  571. X/****************************************************************************/
  572. X/*                                                                          */
  573. X/* COMMENTS                                                                 */
  574. X/*                                                                          */
  575. X/* Read comments in common.h for the BIG PICTURE.                           */
  576. X/*                                                                          */
  577. X/****************************************************************************/
  578. X/*                                                                          */
  579. X/* DEFINES                                                                  */
  580. X/*                                                                          */
  581. X/* Refer to common.h                                                        */
  582. X/*                                                                          */
  583. X/*                                                                          */
  584. X/****************************************************************************/
  585. X/*                                                                          */
  586. X/* INCLUDES                                                                 */
  587. X/*                                                                          */
  588. X/* Refer to common.h                                                        */
  589. X/*                                                                          */
  590. X#include "../h/common.h"
  591. X#include <sys/dir.h>
  592. X/*                                                                          */
  593. X/*                                                                          */
  594. X/****************************************************************************/
  595. X/*                                                                          */
  596. X/* DATA TYPES, VARIABLES, ETC                                               */
  597. X/*                                                                          */
  598. X/* Refer to common.h                                                        */
  599. X/*                                                                          */
  600. X/*                                                                          */
  601. X/****************************************************************************/
  602. X/*                                                                          */
  603. X/* MODIFICATIONS                                                            */
  604. X/*                                                                          */
  605. X/* Kevin Fannin 10/13/89 - Modified the wait_que structure drastically.     */
  606. X/*                         Eliminated the job structure. See modification   */
  607. X/*                         comments in IQUEUER.c for details.               */
  608. X/*                                                                          */
  609. X/*                                                                          */
  610. X/****************************************************************************/
  611. X
  612. X/* a struct to receive incoming messages                                    */
  613. X
  614. X  struct to_iqueuer incoming;
  615. X
  616. X/* a struct to build out-going messages to the ISPIN                        */
  617. X
  618. X  struct to_ispin out_msg;
  619. X
  620. X/* a struct to build out-going messages to the status inquirer              */
  621. X
  622. X  struct to_iq
  623. X  {
  624. X    union chr_lng typ;                  /* the current state */
  625. X    union chr_lng devinod;              /* the dev's inode number    */
  626. X    union chr_lng my_fifo;              /* so iq can figure printer's name */
  627. X    union chr_lng pid;                  /* pid of the print job */
  628. X    union chr_lng time_in;              /* when IQUEUER rec'd the request */
  629. X    union chr_lng time_out;             /* when IQUEUER rec'd last status  */
  630. X                                           /* report from the ISPIN process */
  631. X    union chr_lng uid;                  /* uid of user requesting print job */
  632. X    union chr_lng loop;                 /* if looping (BUSY), what iteration? */
  633. X  } to_IQ;
  634. X
  635. Xint to_iq_siz;
  636. Xto_iq_siz = sizeof(struct to_iq);
  637. X
  638. X/* Hold onto pid of last previous IQ (status inquiry). A tool to prevent    */
  639. X/* interleaved reads of the status FIFO. See write_status().                */
  640. X
  641. Xint iq_pid;
  642. X
  643. X/* structures for linked lists (queues)                                     */
  644. X
  645. X/* the list of waiting requests                                             */
  646. X
  647. X  struct wait_queue
  648. X  {
  649. X    struct to_iqueuer job_id;   /* the info ISPIN gave in request for service */
  650. X    int    devinod[11];         /* the possible devices for this job */
  651. X    long   time_in;             /* when did we receive this request?       */
  652. X    struct wait_queue *next;    /* the next job in this list               */
  653. X    struct wait_queue *prev;    /* points backwards in the list            */
  654. X  };
  655. X  struct wait_queue *head_wait;
  656. X  struct wait_queue *curr_wait;
  657. X  struct wait_queue *list_wait;
  658. X  struct wait_queue *hold_wait;
  659. X
  660. X
  661. X/* the list of jobs running right now                                       */
  662. X
  663. X  struct go_list
  664. X  {
  665. X    int devinod;                /* the inode number for the tty     */
  666. X    struct to_iqueuer job_id;   /* the info ISPIN gave in request for service */
  667. X    long   time_in;             /* when did we receive this request?       */
  668. X    long   time_out;            /* when was status last updated?           */
  669. X    struct go_list *next;       /* the next job in the list                */
  670. X    struct go_list *prev;       /* points backwards in the list            */
  671. X  };
  672. X  struct go_list *head_dsptch;
  673. X  struct go_list *curr_dsptch;
  674. X  struct go_list *list_dsptch;
  675. X  struct go_list *hold_dsptch;
  676. X
  677. X  char inFIFO[160];
  678. X  char statFIFO[160];
  679. X  char outFIFO[160];
  680. X  char build_cmd[240];
  681. X  char lil_buf[BUFSIZ];
  682. X
  683. X  int outfifo,infifo,statfifo;
  684. X  int outropn,inropn,inwopn,statropn,statdump;
  685. X
  686. X  struct stat *stat_buf;
  687. X
  688. X  int d, e;
  689. X  long oldtime;
  690. X
  691. X
  692. X  char tty_lock[100];
  693. X  int oumask;
  694. X
  695. X#ifndef LCK_DIR
  696. X#define LCK_DIR "/usr/spool/uucp/"
  697. X#endif
  698. X
  699. X  char *myncheck();
  700. END_OF_FILE
  701. if test 7698 -ne `wc -c <'ISPIN/h/iqueuer.h'`; then
  702.     echo shar: \"'ISPIN/h/iqueuer.h'\" unpacked with wrong size!
  703. fi
  704. # end of 'ISPIN/h/iqueuer.h'
  705. fi
  706. if test -f 'ISPIN/h/ispin.h' -a "${1}" != "-c" ; then 
  707.   echo shar: Will not clobber existing file \"'ISPIN/h/ispin.h'\"
  708. else
  709. echo shar: Extracting \"'ISPIN/h/ispin.h'\" \(15417 characters\)
  710. sed "s/^X//" >'ISPIN/h/ispin.h' <<'END_OF_FILE'
  711. X/****************************************************************************/
  712. X/*                                                                          */
  713. X/* 1988, SOWSEAR ENGINEERING, SOFTWARE GROUP    Indianapolis, IN            */
  714. X/*                                                                          */
  715. X/*               our motto: "Who says you can't...?"                        */
  716. X/*                                                                          */
  717. X/****************************************************************************/
  718. X/* ISPIN.H                                                                  */
  719. X/*                                                                          */
  720. X/* common.h is the header file which is shared by ISPIN, IQUEUER, and IQ.   */
  721. X/*                                                                          */
  722. X/* Any defines, includes, or variables which may be peculiar to a           */
  723. X/* particular program is in ispin.h, iqueuer.h, or iq.h, resectively.       */
  724. X/*                                                                          */
  725. X/* ISPIN                                                                    */
  726. X/*                                                                          */
  727. X/* Indianapolis Standard Printer Interface (for Network printers)           */
  728. X/****************************************************************************/
  729. X/*                                                                          */
  730. X/* COMMENTS                                                                 */
  731. X/*                                                                          */
  732. X/* Read comments in common.h for the BIG PICTURE.                           */
  733. X/*                                                                          */
  734. X/****************************************************************************/
  735. X/*                                                                          */
  736. X/* DEFINES                                                                  */
  737. X/*                                                                          */
  738. X/* Refer to common.h                                                        */
  739. X/*                                                                          */
  740. X/* number of seconds to wait before looping on network re-try               */
  741. X#define NETSLEEP 30
  742. X/*                                                                          */
  743. X/* maximum number of attempts at network negotiation                        */
  744. X#define MAXNET_TRY 10000
  745. X/*                                                                          */
  746. X/* number of seconds to wait between bursts of chars sent out to printer    */
  747. X#define BURSTWAIT 0
  748. X/*                                                                          */
  749. X/* number of seconds to allow for any write operation, such as bursts of    */
  750. X/* chars sent to printer. Setting the alarm clock for WRITEWAIT seconds     */
  751. X/* makes sure we won't wait forever when/if output is blocked.              */
  752. X/* If you modify this constant, make sure you leave enough time for the     */
  753. X/* user to change the ribbon, clear the paper jam, or replenish the paper   */
  754. X/* supply.                                                                  */
  755. X#define WRITEWAIT 300
  756. X/*                                                                          */
  757. X/* number of seconds to allow for the write_net() function to send          */
  758. X/* (usually) single chars during negotiate() and quit_net().                */
  759. X/* We used to wait WRITEWAIT seconds in write_net(), but that was too long. */
  760. X/* 07/26/90    LSB                                                          */
  761. X#define NETWAIT 5
  762. X/*                                                                          */
  763. X/* Number of characters sent as a burst. Sized for our X.25 packet size     */
  764. X/* optimization. UNIX cblocks are 64 bytes, of which there are four, so     */
  765. X/* keep the BURSTSIZ below 256, so we never overflow the output buffer.     */
  766. X#define BURSTSIZ 128
  767. X/*                                                                          */
  768. X/*                                                                          */
  769. X/*                                                                          */
  770. X#define NULLCHARPTR (char *) 0
  771. X/*                                                                          */
  772. X/*                                                                          */
  773. X/****************************************************************************/
  774. X/*                                                                          */
  775. X/* INCLUDES                                                                 */
  776. X/*                                                                          */
  777. X/* Refer to common.h                                                        */
  778. X/*                                                                          */
  779. X/*                                                                          */
  780. X/*                                                                          */
  781. X/*                                                                          */
  782. X/* Same for everybody.                                                      */
  783. X#include <termio.h>
  784. X#include <sys/utsname.h>
  785. X/*                                                                          */
  786. X/*                                                                          */
  787. X/****************************************************************************/
  788. X/* DATA TYPES, VARIABLES, ETC                                               */
  789. X/*                                                                          */
  790. X/* Refer to common.h                                                        */
  791. X/*                                                                          */
  792. X/*                                                                          */
  793. X/*                                                                          */
  794. XFILE *fdopen(),
  795. X     *i_stream,   /* the input file stream            */
  796. X     *rtab;       /* the file stream for the external table of connect info */
  797. X
  798. Xchar line_buf[BUFSIZ];          /* a place to put connect info */
  799. X
  800. Xchar in_buf[BUFSIZ];            /* read into in_buf from out_file */
  801. X
  802. Xchar *cpnd_send, *cpnd_expt;  /* pointers for compound EXPECT-SEND-EXPECT */
  803. Xchar *expt1, *c_send, *expt2; /* pointers to storage for EXPECT-SEND-EXPECT */
  804. X
  805. X
  806. X
  807. Xstruct termio T;        /* defined in termio.h */
  808. Xstruct termio Tsav;        /* defined in termio.h */
  809. Xstruct termio T_COOK;
  810. Xstruct termio T_RAW;
  811. X
  812. X/****************************************************************************/
  813. X/*                                                                          */
  814. X/*                                                                          */
  815. X/* vars and structs for common resolution of invocation flags and args      */
  816. X
  817. X  /* a couple just for the NQ crowd */
  818. X
  819. X  int   no_input = 0;     /* indicates no input file was passed */
  820. X  char  *sptime;          /* time that file was spooled */
  821. X
  822. X  /* two just for the LP crowd */
  823. X
  824. X  char *lp_id;             /* request id from lp */
  825. X  int numfiles;            /* howmany files are we asked to print ? */
  826. X  int num_ofile;            /* howmany files are we asked to print ? */
  827. X
  828. X  /* the rest are same for either */
  829. X
  830. X  int   banner = 0;       /* indicates a banner should be printed */
  831. X  int   prtimes = 1;      /* number of times to print the file(s) */
  832. X
  833. X  char  *from;            /* the user making the request */
  834. X  char  *title;           /* title requested */
  835. X  char  *dest;            /* destination string (printer name) */
  836. X  char  *usr_strng;       /* string specified on the lp or nq command line */
  837. X
  838. X  /**************************************************************/
  839. X  /* file descriptors and streams */
  840. X  /* dqueuer will only pass one file name, while */
  841. X  /* lp will pass additional args for add'l files */
  842. X
  843. X#ifdef NQ
  844. X  char *fyle;   /* in the NQ case, this points merely to the base filename */
  845. X#else
  846. X  char **fyles;
  847. X#endif
  848. X
  849. X  int out_file;/* file descriptor of output file     */
  850. X                          /* necessary as argument to ioctl calls */
  851. X/*                                                                          */
  852. X/*                                                                          */
  853. X/****************************************************************************/
  854. X/*                                                                          */
  855. X/*                                                                          */
  856. X/*                                                                          */
  857. X/* variables and structures for data gathered from read of rtab             */
  858. X
  859. X
  860. X    
  861. X
  862. X    /* speed */
  863. X    int speed;
  864. X
  865. X    /* a linked list for network "busy" strings */ 
  866. X    struct busy_list
  867. X        {
  868. X          char *busy_strg;                        /* NULL terminated */
  869. X          struct busy_list *next;                 /* pointer to next one */
  870. X                                                  /* last has value NULL */
  871. X        };
  872. X    struct busy_list *busy_head;/* head of the list of "busy" strings         */
  873. X    struct busy_list *busy_curr;/* current member of list of "busy" strings   */
  874. X    struct busy_list *busy_list;/* movable pointer for list of "busy" strings */
  875. X
  876. X
  877. X    /* a linked list for network "inactive" strings */ 
  878. X    struct dead_list
  879. X        {
  880. X          char *dead_strg;                        /* NULL terminated */
  881. X          struct dead_list *next;                 /* pointer to next one */
  882. X                                                  /* last has value NULL */
  883. X        };
  884. X    struct dead_list *dead_head;/* head of the list of "dead" strings         */
  885. X                                /* any other Dead Heads out there ?     LSB   */
  886. X    struct dead_list *dead_curr;/* current member of list of "dead" strings   */
  887. X    struct dead_list *dead_list;/* movable pointer for list of "dead" strings */
  888. X
  889. X    /* a linked list for network "quit" strings */ 
  890. X    struct quit_list
  891. X        {
  892. X          char *quit_strg;                        /* NULL terminated */
  893. X          struct quit_list *next;                 /* pointer to next one */
  894. X                                                  /* last has value NULL */
  895. X        };
  896. X    struct quit_list *quit_head;/* head of the list of "quit" strings         */
  897. X    struct quit_list *quit_curr;/* current member of list of "quit" strings   */
  898. X    struct quit_list *quit_list;/* movable pointer for list of "quit" strings */
  899. X
  900. X
  901. X    /* a linked list for network "disconnect" strings */ 
  902. X    struct disc_list
  903. X        {
  904. X          char *disc_strg;                        /* NULL terminated */
  905. X          struct disc_list *next;                 /* pointer to next one */
  906. X                                                  /* last has value NULL */
  907. X        };
  908. X    struct disc_list *disc_head;/* head of the list of "disc" strings         */
  909. X    struct disc_list *disc_curr;/* current member of list of "disc" strings   */
  910. X    struct disc_list *disc_list;/* movable pointer for list of "disc" strings */
  911. X
  912. X
  913. X    /* a linked list for network "expect" strings */ 
  914. X    struct expt_list
  915. X        {
  916. X          char *expt_strg;                        /* NULL terminated */
  917. X          struct expt_list *prev;                 /* pointer to prev one */
  918. X                                                  /* first has value NULL */
  919. X          struct expt_list *next;                 /* pointer to next one */
  920. X                                                  /* last has value NULL */
  921. X        };
  922. X    struct expt_list *expt_head;/* head of the list of "expt" strings         */
  923. X    struct expt_list *expt_curr;/* current member of list of "expt" strings   */
  924. X    struct expt_list *expt_list;/* movable pointer for list of "expt" strings */
  925. X
  926. X    /* a linked list for network "send" strings */ 
  927. X    struct send_list
  928. X        {
  929. X          char *send_strg;                        /* NULL terminated */
  930. X          struct send_list *prev;                 /* pointer to prev one */
  931. X                                                  /* first has value NULL */
  932. X          struct send_list *next;                 /* pointer to next one */
  933. X                                                  /* last has value NULL */
  934. X        };
  935. X    struct send_list *send_head;/* head of the list of "send" strings         */
  936. X    struct send_list *send_curr;/* current member of list of "send" strings   */
  937. X    struct send_list *send_list;/* movable pointer for list of "send" strings */
  938. X
  939. X
  940. X/****************************************************************************/
  941. X/*                                                                          */
  942. X/*                                                                          */
  943. X/* some general purpose stuff                                               */
  944. X/*                                                                          */
  945. X
  946. X/* for supporting setjmp and longjmp */
  947. X#ifdef NQ
  948. X#include <setret.h>
  949. X#define SETJMP(p) setret(p)
  950. X#define LONGJMP(s,n) longret(s,n)
  951. Xret_buf agayn, kwit;
  952. X#else
  953. X#include <setjmp.h>
  954. X#define SETJMP(p) setjmp(p)
  955. X#define LONGJMP(s,n) longjmp(s,n)
  956. Xjmp_buf agayn, kwit;
  957. X#endif
  958. X
  959. Xchar outFIFO[80];
  960. Xchar inFIFO[80];
  961. X
  962. X#ifdef NQ
  963. Xchar *strtok();
  964. Xchar *strchr();
  965. Xchar *strrchr();
  966. X#endif
  967. X
  968. Xint outfifo,infifo;
  969. Xint outropn,inropn,inwopn;
  970. Xint check_char, keep_char;
  971. Xint port_open = 0;
  972. Xint quit_once = 0;
  973. Xint savd_errno = 0;
  974. X
  975. Xint flgs_delay;
  976. Xint flgs_ndelay;
  977. X
  978. Xstruct stat *stat_buf;
  979. X
  980. X
  981. Xstruct utsname sysnam;
  982. X
  983. X
  984. Xint    netloop;             /* counter for num of loops on network busy  */
  985. Xint    status;              /* variable for return status of subroutines */
  986. Xint    logging = 0;         /* flag to determine if event logging is on  */
  987. Xint    raw = 0;             /* flag to determine if RAW output is desired*/
  988. Xint    tab_expand = 0;      /* flag to determine if tab expansion desired*/
  989. Xint    usr_addr = 0;        /* flag to determine if user-specified addr  */
  990. Xint    stayt;               /* variable for current state of execution */
  991. X
  992. X
  993. X/* THE output device chosen by IQUEUER, NULL terminated */
  994. Xchar GO_dev[80];
  995. X
  996. X/* the control terminal, chosen by ISPIN, NULL terminated */
  997. X/* string */
  998. Xchar ctrl_tty[80];
  999. X/* file descriptor */
  1000. Xint ctrltty;
  1001. X
  1002. X
  1003. X/* DEFINES required by regexp(5), used in matcher()                   */
  1004. X#define INIT            register char *sp = instring;
  1005. X#define GETC()          (*sp++)
  1006. X#define PEEKC()         (*sp)
  1007. X#define UNGETC(c)       (--sp)
  1008. X#define RETURN(c)       return;
  1009. X#define ERROR(c)        {\
  1010. X                         time(&tloc);\
  1011. X                         nowtime = (struct tm *)localtime(&tloc);\
  1012. X                         time_str = asctime(nowtime);\
  1013. X                         sprintf(errmsg,"ISPIN: REGEXP ERROR: %d. time:\n",c);\
  1014. X                         strcat(errmsg,"                            ");\
  1015. X                         strcat(errmsg,time_str);\
  1016. X                         strcat(errmsg,"\n");\
  1017. X                         my_error(SYSERR);\
  1018. X                        }
  1019. X
  1020. X/* INCLUDE required by regexp(5), used in matcher()   */
  1021. X#include <regexp.h>
  1022. X/*                                                                            */
  1023. X/*                                                                            */
  1024. X/******************************************************************************/
  1025. END_OF_FILE
  1026. if test 15417 -ne `wc -c <'ISPIN/h/ispin.h'`; then
  1027.     echo shar: \"'ISPIN/h/ispin.h'\" unpacked with wrong size!
  1028. fi
  1029. # end of 'ISPIN/h/ispin.h'
  1030. fi
  1031. if test -f 'ISPIN/install/lib_rtab/CPU_SW_CDN_PTR/ADDR_SPEC/C351_PLAIN' -a "${1}" != "-c" ; then 
  1032.   echo shar: Will not clobber existing file \"'ISPIN/install/lib_rtab/CPU_SW_CDN_PTR/ADDR_SPEC/C351_PLAIN'\"
  1033. else
  1034. echo shar: Extracting \"'ISPIN/install/lib_rtab/CPU_SW_CDN_PTR/ADDR_SPEC/C351_PLAIN'\" \(677 characters\)
  1035. sed "s/^X//" >'ISPIN/install/lib_rtab/CPU_SW_CDN_PTR/ADDR_SPEC/C351_PLAIN' <<'END_OF_FILE'
  1036. X# You'll need to adjust this to suit your switch's login herald and break
  1037. X# sequence. In this example, the login herald contains the string "System?",
  1038. X# and the switch's break sequence is defined as "<BREAK>bye". The switch's
  1039. X# info messages (Tellabs) are "on" in order to allow ISPIN to detect error
  1040. X# conditions.
  1041. X#
  1042. Xnetind1;/dev/contty,/dev/tty22;9600;-L;-Busy;-Bcongestion;-Bremote dte;-Bfound;-Dcleared;-Dpad>;-DSystem;-Q\w\032\dclr\r\d;-Q\d\K\pbye\d;System?-\p\K\pbye\r\p-System?;\ppacout\r\d\r\d;connect-\p\r\d-pad>;\p\r\d;pad>-\p\K\dclr\r\w-pad>;set recall=26\r\dconnect\s00000099999999\r\d;pened-\p\K\dclr\r\dset recall=26\r\dconnect\s00000099999999\r\w-pened;\d\n\f;;;
  1043. END_OF_FILE
  1044. if test 677 -ne `wc -c <'ISPIN/install/lib_rtab/CPU_SW_CDN_PTR/ADDR_SPEC/C351_PLAIN'`; then
  1045.     echo shar: \"'ISPIN/install/lib_rtab/CPU_SW_CDN_PTR/ADDR_SPEC/C351_PLAIN'\" unpacked with wrong size!
  1046. fi
  1047. # end of 'ISPIN/install/lib_rtab/CPU_SW_CDN_PTR/ADDR_SPEC/C351_PLAIN'
  1048. fi
  1049. if test -f 'ISPIN/install/lib_rtab/CPU_SW_CDN_PTR/ADDR_SPEC/QUME_SHT' -a "${1}" != "-c" ; then 
  1050.   echo shar: Will not clobber existing file \"'ISPIN/install/lib_rtab/CPU_SW_CDN_PTR/ADDR_SPEC/QUME_SHT'\"
  1051. else
  1052. echo shar: Extracting \"'ISPIN/install/lib_rtab/CPU_SW_CDN_PTR/ADDR_SPEC/QUME_SHT'\" \(708 characters\)
  1053. sed "s/^X//" >'ISPIN/install/lib_rtab/CPU_SW_CDN_PTR/ADDR_SPEC/QUME_SHT' <<'END_OF_FILE'
  1054. X# You'll need to adjust this to suit your switch's login herald and break
  1055. X# sequence. In this example, the login herald contains the string "System?",
  1056. X# and the switch's break sequence is defined as "<BREAK>bye". The switch's
  1057. X# info messages (Tellabs) are "on" in order to allow ISPIN to detect error
  1058. X# conditions.
  1059. X#
  1060. Xnetind1;/dev/contty,/dev/tty22;9600;-L;-Busy;-Bcongestion;-Bremote dte;-Bfound;-Dcleared;-Dpad>;-DSystem;-Q\L\L\032\dclr\r\d;-Q\d\K\dbye\d;System?-\p\K\pbye\r\p-System?;\ppacout\r\d\r\d;connect-\p\r\d-pad>;\p\r\d;pad>-\p\K\dclr\r\w-pad>;set recall=26\r\dconnect\s00000099999999\r\d;pened-\p\K\dclr\r\dset recall=26\r\dconnect\s00000099999999\r\w-pened;\033S\033F90\033C28\0339\015\033T\E;;;
  1061. END_OF_FILE
  1062. if test 708 -ne `wc -c <'ISPIN/install/lib_rtab/CPU_SW_CDN_PTR/ADDR_SPEC/QUME_SHT'`; then
  1063.     echo shar: \"'ISPIN/install/lib_rtab/CPU_SW_CDN_PTR/ADDR_SPEC/QUME_SHT'\" unpacked with wrong size!
  1064. fi
  1065. # end of 'ISPIN/install/lib_rtab/CPU_SW_CDN_PTR/ADDR_SPEC/QUME_SHT'
  1066. fi
  1067. if test -f 'ISPIN/install/lib_rtab/CPU_CDN_PTR/ADDR_SPEC/PLAIN' -a "${1}" != "-c" ; then 
  1068.   echo shar: Will not clobber existing file \"'ISPIN/install/lib_rtab/CPU_CDN_PTR/ADDR_SPEC/PLAIN'\"
  1069. else
  1070. echo shar: Extracting \"'ISPIN/install/lib_rtab/CPU_CDN_PTR/ADDR_SPEC/PLAIN'\" \(328 characters\)
  1071. sed "s/^X//" >'ISPIN/install/lib_rtab/CPU_CDN_PTR/ADDR_SPEC/PLAIN' <<'END_OF_FILE'
  1072. X#
  1073. X#
  1074. X#
  1075. Xnetind1;/dev/ttyi07,/dev/ttyi31,/dev/ttyi15;9600;-L;-Bcongestion;-Bremote dte;-Q\L\L\032\dclr\r\d;-DConnection cleared;-Dpad>;ad>-\p\K\pclr\r\d-ad>;\r\p;pad>-\p\K\pclr\r\d-pad>;set recall=26\r\p;pad>-\r\d-pad>;\pconnect\s00000099999999\r\d;pened-\p\K\pclr\r\dset recall=26\r\p\pconnect\s00000099999999\r\d-pened;\d;;;
  1076. X#
  1077. X#
  1078. END_OF_FILE
  1079. if test 328 -ne `wc -c <'ISPIN/install/lib_rtab/CPU_CDN_PTR/ADDR_SPEC/PLAIN'`; then
  1080.     echo shar: \"'ISPIN/install/lib_rtab/CPU_CDN_PTR/ADDR_SPEC/PLAIN'\" unpacked with wrong size!
  1081. fi
  1082. # end of 'ISPIN/install/lib_rtab/CPU_CDN_PTR/ADDR_SPEC/PLAIN'
  1083. fi
  1084. if test -f 'ISPIN/install/lib_rtab/CPU_PTR/PLAIN' -a "${1}" != "-c" ; then 
  1085.   echo shar: Will not clobber existing file \"'ISPIN/install/lib_rtab/CPU_PTR/PLAIN'\"
  1086. else
  1087. echo shar: Extracting \"'ISPIN/install/lib_rtab/CPU_PTR/PLAIN'\" \(35 characters\)
  1088. sed "s/^X//" >'ISPIN/install/lib_rtab/CPU_PTR/PLAIN' <<'END_OF_FILE'
  1089. X#
  1090. Xnetind1;/dev/ttyi07;9600;-L;;;
  1091. X#
  1092. END_OF_FILE
  1093. if test 35 -ne `wc -c <'ISPIN/install/lib_rtab/CPU_PTR/PLAIN'`; then
  1094.     echo shar: \"'ISPIN/install/lib_rtab/CPU_PTR/PLAIN'\" unpacked with wrong size!
  1095. fi
  1096. # end of 'ISPIN/install/lib_rtab/CPU_PTR/PLAIN'
  1097. fi
  1098. echo shar: End of archive 3 \(of 15\).
  1099. cp /dev/null ark3isdone
  1100. MISSING=""
  1101. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ; do
  1102.     if test ! -f ark${I}isdone ; then
  1103.     MISSING="${MISSING} ${I}"
  1104.     fi
  1105. done
  1106. if test "${MISSING}" = "" ; then
  1107.     echo You have unpacked all 15 archives.
  1108.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1109. else
  1110.     echo You still need to unpack the following archives:
  1111.     echo "        " ${MISSING}
  1112. fi
  1113. ##  End of shell archive.
  1114. exit 0
  1115.  
  1116.