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

  1. Newsgroups: comp.sources.unix
  2. From: sir-alan!ispin!lbartz@iuvax.cs.indiana.edu (Larry Bartz)
  3. Subject: v25i115: Indianapolis Standard Printer Interface for Networked printers, Part04/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 115
  9. Archive-Name: ispin/part04
  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 4 (of 15)."
  18. # Contents:  ISPIN/h/nqspool.h ISPIN/h/localcnfg.h ISPIN/src/IQ.c
  19. #   ISPIN/src/ISPINTRFCE.c
  20. #   ISPIN/install/lib_rtab/CPU_SW_CDN_PTR/USER_ADDR/PLAIN
  21. #   ISPIN/install/lib_rtab/CPU_SW_CDN_PTR/USER_ADDR/C351_PLAIN
  22. #   ISPIN/install/lib_rtab/CPU_SW_CDN_PTR/USER_ADDR/QUME_NOSHT
  23. #   ISPIN/install/lib_rtab/CPU_SW_CDN_PTR/USER_ADDR/QUME_SHT
  24. #   ISPIN/install/lib_rtab/CPU_CDN_PTR/ADDR_SPEC/C351_PLAIN
  25. #   ISPIN/install/lib_rtab/CPU_CDN_PTR/ADDR_SPEC/QUME_NOSHT
  26. #   ISPIN/install/lib_rtab/CPU_CDN_PTR/ADDR_SPEC/QUME_SHT
  27. #   ISPIN/install/lib_rtab/CPU_CDN_PTR/USER_ADDR/PLAIN
  28. #   ISPIN/install/lib_rtab/CPU_CDN_PTR/USER_ADDR/C351_PLAIN
  29. # Wrapped by socrates@indy6 on Tue Jan 28 15:26:34 1992
  30. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  31. if test -f 'ISPIN/h/nqspool.h' -a "${1}" != "-c" ; then 
  32.   echo shar: Will not clobber existing file \"'ISPIN/h/nqspool.h'\"
  33. else
  34. echo shar: Extracting \"'ISPIN/h/nqspool.h'\" \(7069 characters\)
  35. sed "s/^X//" >'ISPIN/h/nqspool.h' <<'END_OF_FILE'
  36. X/* @[$]spool.h  2.3  10/26/82 16:54:01 - Zilog Inc */
  37. X/* include file for spooler routines ... especially backends */
  38. X
  39. X/***************************************************************
  40. X**
  41. X** Instructions for writing backends for the Zeus printer spooler
  42. X**
  43. X**
  44. X** The purpose of a backend is to do the actual printing for the
  45. X** spooling system.  The simplest backend would merely copy input
  46. X** from file descriptor RFFD to file descriptor SFFD.  Many devices
  47. X** require modification of their input in order to work properly.
  48. X** In many cases, they require the addition or deletion of control
  49. X** sequences for proper operation.  A familiar example is the line
  50. X** printer which generally cannot handle backspace characters.
  51. X** 
  52. X** In addition to filtering, backends can be used to generate banner
  53. X** pages and burst pages for easy separation and identification of
  54. X** print requests.
  55. X** 
  56. X** Backends for the Zeus printer spooler are expected to copy input
  57. X** from RFFD to SFFD while doing any filtering required. Other
  58. X** than copying input to output, there is only one other condition
  59. X** backends must handle.  If they receive a '-B' on the command
  60. X** line, they must not read RFFD.  The '-B' flag is generated by
  61. X** the dqueuer when it cannot find the file to be printed.  It
  62. X** is used by the dqueuer to cause system supplied backends to indicate
  63. X** 'file not found' on a banner page by itself.  A backend
  64. X** may handle flags and status that the dqueuer passes to it.
  65. X** 
  66. X** Backends may expect the following flags to be passed as arguments 
  67. X** when they are invoked.  They are used for banner page information
  68. X** by the system backends.
  69. X** 
  70. X**      -B              File not found.
  71. X**      -c x            Print file x number of times.
  72. X**      -d dest         Destination string
  73. X**      -f file         File name being printed.
  74. X**      -F from         'from' is the user making the request.
  75. X**      -s time         String with time that file was spooled
  76. X**      -t title        Title requested
  77. X** 
  78. X** In addition to these flags, any extra options included in the 
  79. X** options field of a device line in the configuration file will
  80. X** be passed directory to the backend.  For instance, the text(M)
  81. X** backend recognizes '-T command' in the configuration file as
  82. X** and will pass the 'command' to stty.
  83. X** 
  84. X** The spooling system also allows the backend to return certain
  85. X** statuses so that xq(1) can monitor its progress.  This is done
  86. X** through the file on STATUSFD.  The contents of this file is the
  87. X** structure 'Dstat' whose definition is included in this file.
  88. X** the only fields that the backend may access are the 'Dpgsdone'
  89. X** (number of pages printed) and the 'Dpercentd' (percentage of file
  90. X** printed) fields.  Modification of the other fields may
  91. X** cause unpredictable results.  Use the OFFSET macro included in
  92. X** this file to access these fields.  An example of its use 
  93. X** follows:
  94. X** 
  95. X**      int pages;
  96. X**      struct Dstat dummy;
  97. X** 
  98. X**      lseek(STATUSFD, OFFSET(dummy,Dpgsdone),0);
  99. X**      write(STATUSFD, &pages,  sizeof(pages));
  100. X** 
  101. X** The fields Dpgsdone and Dpercentd are printed by xq(1).  They
  102. X** are originally set to -1 indicating to xq that the backend does
  103. X** not support these counters.  Thus, no problems will be caused 
  104. X** by not including this support.  Again, do not try to read or 
  105. X** write any other fields of the Dstat structure.  The spooler
  106. X** uses recording locking extensively, and even reading a field 
  107. X** may cause a deadlock situation.
  108. X** 
  109. X** Upon completion of processing, the backend exits.  If the exit
  110. X** returns a non-zero value, the spooler will assume an error has
  111. X** occured and try to recover.  If error logging is enabled it will
  112. X** write a message and the return the code into the error file.  It
  113. X** will then try to repeat the request.  If the error reoccures more
  114. X** than two times, the dqueuer will set the device status to DOWN.
  115. X** The Device may be reenabled by using the command
  116. X** 
  117. X**      xq -q q:dev -Ud
  118. X** 
  119. X** where 'q:dev' is replaced with the que name and device number.  SEe
  120. X** xq(M) for more details.
  121. X**
  122. X****************************************************************/
  123. X
  124. X/* special types */
  125. X
  126. X/* for purposes of ISPIN: */
  127. X/* comment these out because we already have them specified in another .h */
  128. X/* #include <sys/types.h> */
  129. X/* #include <signal.h> */
  130. X
  131. X/* spooler logs errors ... they are classified as: */
  132. X#define FATAL   0
  133. X#define WARNING 1
  134. X
  135. X/* for purposes of ISPIN: */
  136. X/* we are using STATUS for our own purposes */
  137. X/* #define STATUS       2 */
  138. X
  139. X#define FORML    9      /* max length of form names     */
  140. X
  141. X/* Macro definition to find the offset (in bytes) of a certain element in a
  142. X** structure
  143. X*/
  144. X#define OFFSET(struct,item) (off_t)((char *)&(struct.item) - (char *)&struct)
  145. X
  146. X/* interprocess communication sometimes uses double record locking
  147. X** the following structure is used in those cases
  148. X*/
  149. Xtypedef struct ippid {
  150. X                        int     pide;   /* pid element */
  151. X                        int     accesse;/* access element */
  152. X                        } ippid;
  153. X
  154. X/* entries in device status directory */
  155. Xstruct Dstat    {       
  156. X                                int             Dstatus;
  157. X                                int             Duid;
  158. X                                char    Dform[FORML];
  159. X                                time_t  last_dispatched;/* last time we were
  160. X                                                                                ** dispatched
  161. X                                                                                */
  162. X                                int     retrys;         /* number of dispatch retrys */
  163. X                                ippid Dpid;             /* pid of backend active on
  164. X                                                                ** this device
  165. X                                                                */
  166. X                                int Dpgsdone;
  167. X                                int     Dseqn;
  168. X                                int     Dpercentd;
  169. X                                };
  170. X
  171. X/* redefinition of signals used between backends and the spooler programs */
  172. X#define SIGBACK         SIGTRAP
  173. X#define SIGSTOP         SIGIOT
  174. X#define SIGRES          SIGFPE
  175. X
  176. X/* these defines identify which fds go with what during invocation of
  177. X** backends, logerr and other stuff
  178. X*/
  179. X#define LOGERRFD        0               /* fileds of logerr/error file */
  180. X#define SFFD            1               /* fileds of special file being used
  181. X                                                        ** NOTE: this constant should not be changed.
  182. X                                                        ** The text(M) backend exec's stty(1) and will
  183. X                                                        ** come up with megaproblems if fileds 1 is not
  184. X                                                        ** the special file
  185. X                                                        */
  186. X#define STATUSFD        2               /* fileds of status file for device */
  187. X#define RFFD            3               /* fileds of request file to be printed */
  188. END_OF_FILE
  189. if test 7069 -ne `wc -c <'ISPIN/h/nqspool.h'`; then
  190.     echo shar: \"'ISPIN/h/nqspool.h'\" unpacked with wrong size!
  191. fi
  192. # end of 'ISPIN/h/nqspool.h'
  193. fi
  194. if test -f 'ISPIN/h/localcnfg.h' -a "${1}" != "-c" ; then 
  195.   echo shar: Will not clobber existing file \"'ISPIN/h/localcnfg.h'\"
  196. else
  197. echo shar: Extracting \"'ISPIN/h/localcnfg.h'\" \(6540 characters\)
  198. sed "s/^X//" >'ISPIN/h/localcnfg.h' <<'END_OF_FILE'
  199. X/****************************************************************************/
  200. X/*                                                                          */
  201. X/* 1988, SOWSEAR ENGINEERING, SOFTWARE GROUP    Indianapolis, IN            */
  202. X/*                                                                          */
  203. X/*               our motto: "Who says you can't...?"                        */
  204. X/*                                                                          */
  205. X/****************************************************************************/
  206. X/*                                                                          */
  207. X/* LOCALCNFG.H                                                              */
  208. X/*                                                                          */
  209. X/* localcnfg.h is a header file which is shared by ISPIN, IQUEUER, and IQ.  */
  210. X/*                                                                          */
  211. X/* The items and constants described in this header file are those which    */
  212. X/* are likely to be adjusted at install time to suit local needs and        */
  213. X/* preferences.                                                             */
  214. X/*                                                                          */
  215. X/*                                                                          */
  216. X/****************************************************************************/
  217. X/*                                                                          */
  218. X/* COMMENTS                                                                 */
  219. X/*                                                                          */
  220. X/* read common.h for the BIG PICTURE                                        */
  221. X/*                                                                          */
  222. X/****************************************************************************/
  223. X/*                                                                          */
  224. X/* DEFINES                                                                  */
  225. X/*                                                                          */
  226. X/*                                                                          */
  227. X/* SITELINE is the opportunity for you to tailor the banner page to reflect */
  228. X/* the name of your site.                                                   */
  229. X/* Please only modify what is between the first and last asterisk.          */
  230. X/* Leave it just this width, so it matches the rest of the banner.          */
  231. X/*                                                                          */
  232. X#define SITELINE "* *****        INDIANAPOLIS DISTRICT OFFICE        ***** *\n"
  233. X/*                                                                          */
  234. X/*                                                                          */
  235. X/*                                                                          */
  236. X/* These path-specific #defined variables seemed to me like logical places  */
  237. X/* to put things. If you don't agree, change 'em!                           */
  238. X/*                                                                          */
  239. X/* If you do change the locations, adjust your applicable install script    */
  240. X/* accordingly.                                                             */
  241. X/*                                                                          */
  242. X/* The file where we'll write event msgs and error msgs.                    */
  243. X#ifdef NQ
  244. X#define LOGFILE "/usr/spool/queuer/ISPIN/log"
  245. X#else
  246. X#define LOGFILE "/usr/spool/lp/ISPIN/log"
  247. X#endif
  248. X/*                                                                          */
  249. X/*                                                                          */
  250. X/* Directory location FIFOs. Again, the location is merely a suggestion.    */
  251. X#ifdef NQ
  252. X#define FIFOdir "/usr/spool/queuer/ISPIN/FIFO/"
  253. X#else
  254. X#define FIFOdir "/usr/spool/lp/ISPIN/FIFO/"
  255. X#endif
  256. X/*                                                                          */
  257. X/*                                                                          */
  258. X/* Name of ISPIN's table of remote printer information. Again, the location */
  259. X/* is merely a suggestion.                                                  */
  260. X#ifdef NQ
  261. X#define RTAB "/usr/spool/queuer/ISPIN/rtab"
  262. X#else
  263. X#define RTAB "/usr/spool/lp/ISPIN/rtab"
  264. X#endif
  265. X/*                                                                          */
  266. X/*                                                                          */
  267. X/* Location of the ISPIN executable. This constant is used by the small     */
  268. X/* executable which serves as the "interface" in the LP situation, thereby  */
  269. X/* requiring only one centrally located copy of the ISPIN executable.       */
  270. X/* INTRFCE execs the ISPIN. This saves considerable disk space, as opposed  */
  271. X/* to having a complete, separate ISPIN as the interface for each queue     */
  272. X/* member.                                                                  */
  273. X#define INTRFCE "/usr/spool/lp/ISPIN/ispin"
  274. X/*                                                                          */
  275. X/*                                                                          */
  276. X/****************************************************************************/
  277. X/*                                                                          */
  278. X/* INCLUDES                                                                 */
  279. X/*                                                                          */
  280. X/* Refer to common.h                                                        */
  281. X/*                                                                          */
  282. X/*                                                                          */
  283. X/*                                                                          */
  284. X/****************************************************************************/
  285. X/*                                                                          */
  286. X/* DATA TYPES, VARIABLES, ETC                                               */
  287. X/*                                                                          */
  288. X/* Refer to common.h                                                        */
  289. X/*                                                                          */
  290. X/*                                                                          */
  291. X/*                                                                          */
  292. X/****************************************************************************/
  293. END_OF_FILE
  294. if test 6540 -ne `wc -c <'ISPIN/h/localcnfg.h'`; then
  295.     echo shar: \"'ISPIN/h/localcnfg.h'\" unpacked with wrong size!
  296. fi
  297. # end of 'ISPIN/h/localcnfg.h'
  298. fi
  299. if test -f 'ISPIN/src/IQ.c' -a "${1}" != "-c" ; then 
  300.   echo shar: Will not clobber existing file \"'ISPIN/src/IQ.c'\"
  301. else
  302. echo shar: Extracting \"'ISPIN/src/IQ.c'\" \(24478 characters\)
  303. sed "s/^X//" >'ISPIN/src/IQ.c' <<'END_OF_FILE'
  304. X/****************************************************************************/
  305. X/*                                                                          */
  306. X/* IQ - IQUEUER query program. An executable to check current status of:    */
  307. X/*                                                                          */
  308. X/*                                                                          */
  309. X/*                                                                          */
  310. X/* IQUEUER - the secondary queueing daemon for:                             */
  311. X/*                                                                          */
  312. X/* ISPIN                                                                    */
  313. X/*                                                                          */
  314. X/* Indianapolis Standard Printer Interface (for Network printers)           */
  315. X/****************************************************************************/
  316. X/*                                                                          */
  317. X/*  Copyright (C) 1991                                                      */
  318. X/*  Larry Bartz                                                             */
  319. X/*  Internal Revenue Service                                                */
  320. X/*  Indianapolis District Office                                            */
  321. X/*                                                                          */
  322. X/*  This program is free software; you can redistribute it and/or modify    */
  323. X/*  it under the terms of the GNU General Public License as published by    */
  324. X/*  the Free Software Foundation, version 1.                                */
  325. X/*                                                                          */
  326. X/*  This program is distributed in the hope that it will be useful,         */
  327. X/*  but WITHOUT ANY WARRANTY; without even the implied warranty of          */
  328. X/*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the           */
  329. X/*  GNU General Public License for more details.                            */
  330. X/*                                                                          */
  331. X/*  You should have received a copy of the GNU General Public License       */
  332. X/*  along with this program; if not, write to the Free Software             */
  333. X/*  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.               */
  334. X/*                                                                          */
  335. X/****************************************************************************/
  336. X/*                                                                          */
  337. X/* COMMENTS                                                                 */
  338. X/*                                                                          */
  339. X/* Read comments in common.h for the BIG PICTURE.                           */
  340. X/*                                                                          */
  341. X/****************************************************************************/
  342. X/*                                                                          */
  343. X/* DEFINES                                                                  */
  344. X/*                                                                          */
  345. X/* Refer to common.h and iqueuer.h                                          */
  346. X/*                                                                          */
  347. X/* #define DEBUG                                                            */
  348. X/*                                                                          */
  349. X/****************************************************************************/
  350. X/*                                                                          */
  351. X/* INCLUDES                                                                 */
  352. X/*                                                                          */
  353. X/* Refer to common.h and iqueuer.h                                          */
  354. X/*                                                                          */
  355. X#include "../h/iqueuer.h"
  356. X/*                                                                          */
  357. X/*                                                                          */
  358. X/****************************************************************************/
  359. X/*                                                                          */
  360. X/* DATA TYPES, VARIABLES, ETC                                               */
  361. X/*                                                                          */
  362. X/* Refer to common.h and iqueuer.h                                          */
  363. X/*                                                                          */
  364. X/*                                                                          */
  365. X/*                                                                         */
  366. X/****************************************************************************/
  367. X/*                                                                          */
  368. X/* MODIFICATIONS                                                            */
  369. X/*                                                                          */
  370. X/* 10/13/89 Kevin Fannin - Modified program to print "unassigned" for port  */
  371. X/*                         when iq reports on a waiting job. Waiting jobs   */
  372. X/*                         now have the port inode number set to -1 to      */
  373. X/*                         indicate that no device has been chosen yet.     */
  374. X/****************************************************************************/
  375. X
  376. Xmain(argc,argv)
  377. Xint argc;
  378. Xchar *argv[];
  379. X{
  380. X  int gotstats = 0;
  381. X
  382. X  int check_char, keep_char;
  383. X
  384. X  int not_now();
  385. X
  386. X  char out_buf[BUFSIZ];
  387. X
  388. X  char *myncheck();
  389. X
  390. X
  391. X  count1 = count2 = 0;
  392. X  
  393. X  /* take care of the signals */
  394. X  signal(SIGINT, SIG_DFL);    /* default for "interrupt" signal <DEL> */
  395. X  signal(SIGHUP, SIG_DFL);    /* default for "hang up" signal */
  396. X  signal(SIGQUIT, SIG_DFL);   /* default for "quit" signal */
  397. X  signal(SIGALRM, SIG_DFL);   /* default for "alarm" signal */
  398. X  signal(SIGTERM, not_now);   /* trap "term" signal */
  399. X
  400. X  /* allocate storage for our file status buffer */
  401. X  stat_buf = (struct stat *) calloc(1,sizeof(struct stat));
  402. X
  403. X
  404. X  /* what is the name of the FIFO I talk through?   */
  405. X  strcpy(outFIFO,FIFOdir);
  406. X  strcat(outFIFO,"IQUEUER");
  407. X  /* does it exist? */
  408. X  if(stat(outFIFO,stat_buf))
  409. X  {
  410. X    /* if not,      */
  411. X    /* die horribly */
  412. X    /* need to send out an error msg */
  413. X          /* format an error message */
  414. X          time(&tloc);
  415. X          nowtime = (struct tm *)localtime(&tloc);
  416. X          time_str = asctime(nowtime);
  417. X          sprintf(errmsg,"IQ: stat outFIFO: %s. time:\n",sys_errlist[errno]);
  418. X          strcat(errmsg,"                            ");
  419. X          strcat(errmsg,time_str);
  420. X          strcat(errmsg,"\n");
  421. X
  422. X    fprintf(stderr,errmsg);
  423. X    exit(1);
  424. X
  425. X  }
  426. X
  427. X
  428. X  /* An open for writing will block unless a process (IQUEUER) has the file   */
  429. X  /* open for reading.                                                        */
  430. X
  431. X
  432. X  signal(SIGALRM, not_now);
  433. X  alarm(5);
  434. X  /* this open of the FIFO is the one we'll use for our write           */
  435. X  if((outfifo = open(outFIFO,O_WRONLY)) == -1)
  436. X  {
  437. X    /* need to send out an error msg */
  438. X          /* format an error message */
  439. X          time(&tloc);
  440. X          nowtime = (struct tm *)localtime(&tloc);
  441. X          time_str = asctime(nowtime);
  442. X          sprintf(errmsg,"IQ: open %s: %s. time:\n",outFIFO,sys_errlist[errno]);
  443. X          strcat(errmsg,"                            ");
  444. X          strcat(errmsg,time_str);
  445. X          strcat(errmsg,"\n");
  446. X
  447. X         fprintf(stderr,errmsg);
  448. X         exit(1);
  449. X
  450. X  }
  451. X  alarm(0);
  452. X  signal(SIGALRM, SIG_IGN);
  453. X
  454. X
  455. X  /* open the status fifo */
  456. X
  457. X  /* what is the name of the status FIFO ? */
  458. X  strcpy(statFIFO,FIFOdir);
  459. X  strcat(statFIFO,"STATUS");
  460. X  /* does it exist? */
  461. X  if(stat(statFIFO,stat_buf))
  462. X  {
  463. X    /* if not,      */
  464. X    /* create it if we can */
  465. X    if(mknod(statFIFO,0010666,1) != SUCCESS)
  466. X    {
  467. X      /* It didn't exist and we couldn't create it either. */
  468. X      /* All hope is lost.                                 */
  469. X      /* need to send out an error msg */
  470. X          /* format an error message */
  471. X          time(&tloc);
  472. X          nowtime = (struct tm *)localtime(&tloc);
  473. X          time_str = asctime(nowtime);
  474. X          sprintf(errmsg,"IQ: mknod statFIFO: %s. time:\n",sys_errlist[errno]);
  475. X          strcat(errmsg,"                            ");
  476. X          strcat(errmsg,time_str);
  477. X          strcat(errmsg,"\n");
  478. X
  479. X          /* We can still write to stderr at this point. */
  480. X          fprintf(stderr,errmsg);
  481. X
  482. X          exit(1);
  483. X    }
  484. X  }
  485. X
  486. X
  487. X  /* An open for reading will block unless a process (IQUEUER) has the file   */
  488. X  /* open for writing.                                                        */
  489. X
  490. X  signal(SIGALRM, not_now);
  491. X  alarm(5);
  492. X  if((statropn = open(statFIFO,O_RDONLY)) == -1)
  493. X  {
  494. X    /* need to send out an error msg */
  495. X          /* format an error message */
  496. X          time(&tloc);
  497. X          nowtime = (struct tm *)localtime(&tloc);
  498. X          time_str = asctime(nowtime);
  499. X          sprintf(errmsg,"IQ: IQUEUER does not exist. time:\n");
  500. X          strcat(errmsg,"                            ");
  501. X          strcat(errmsg,time_str);
  502. X          strcat(errmsg,"\n");
  503. X
  504. X          /* We can still write to stderr at this point. */
  505. X          fprintf(stderr,errmsg);
  506. X
  507. X          exit(1);
  508. X  }
  509. X  alarm(0);
  510. X  signal(SIGALRM, SIG_IGN);
  511. X
  512. X  free(stat_buf);
  513. X
  514. X  /* format our message to the almighty IQUEUER */
  515. X
  516. X      /* what type of message? */
  517. X      req_msg.typ.intgr = STATUS;
  518. X      while(count1 < intsize)
  519. X      {
  520. X        msg_buf[count2++] = req_msg.typ.chr[count1++];
  521. X      }
  522. X      count1 = 0;
  523. X
  524. X      /* what is my pid? */
  525. X      req_msg.my_pid.intgr = getpid();
  526. X      while(count1 < intsize)
  527. X      {
  528. X        msg_buf[count2++] = req_msg.my_pid.chr[count1++];
  529. X      }
  530. X      count1 = 0;
  531. X
  532. X      req_msg.my_fifo.intgr = 0;
  533. X      while(count1 < intsize)
  534. X      {
  535. X        msg_buf[count2++] = req_msg.my_fifo.chr[count1++];
  536. X      }
  537. X      count1 = 0;
  538. X
  539. X      req_msg.dev1_inod.intgr = 0;
  540. X      while(count1 < intsize)
  541. X      {
  542. X        msg_buf[count2++] = req_msg.dev1_inod.chr[count1++];
  543. X      }
  544. X      count1 = 0;
  545. X
  546. X      req_msg.dev2_inod.intgr = 0;
  547. X      while(count1 < intsize)
  548. X      {
  549. X        msg_buf[count2++] = req_msg.dev2_inod.chr[count1++];
  550. X      }
  551. X      count1 = 0;
  552. X
  553. X      req_msg.dev3_inod.intgr = 0;
  554. X      while(count1 < intsize)
  555. X      {
  556. X        msg_buf[count2++] = req_msg.dev3_inod.chr[count1++];
  557. X      }
  558. X      count1 = 0;
  559. X
  560. X      req_msg.dev4_inod.intgr = 0;
  561. X      while(count1 < intsize)
  562. X      {
  563. X        msg_buf[count2++] = req_msg.dev4_inod.chr[count1++];
  564. X      }
  565. X      count1 = 0;
  566. X
  567. X      req_msg.dev5_inod.intgr = 0;
  568. X      while(count1 < intsize)
  569. X      {
  570. X        msg_buf[count2++] = req_msg.dev5_inod.chr[count1++];
  571. X      }
  572. X      count1 = 0;
  573. X
  574. X      req_msg.dev6_inod.intgr = 0;
  575. X      while(count1 < intsize)
  576. X      {
  577. X        msg_buf[count2++] = req_msg.dev6_inod.chr[count1++];
  578. X      }
  579. X      count1 = 0;
  580. X
  581. X      req_msg.dev7_inod.intgr = 0;
  582. X      while(count1 < intsize)
  583. X      {
  584. X        msg_buf[count2++] = req_msg.dev7_inod.chr[count1++];
  585. X      }
  586. X      count1 = 0;
  587. X
  588. X      req_msg.dev8_inod.intgr = 0;
  589. X      while(count1 < intsize)
  590. X      {
  591. X        msg_buf[count2++] = req_msg.dev8_inod.chr[count1++];
  592. X      }
  593. X      count1 = 0;
  594. X
  595. X      req_msg.dev9_inod.intgr = 0;
  596. X      while(count1 < intsize)
  597. X      {
  598. X        msg_buf[count2++] = req_msg.dev9_inod.chr[count1++];
  599. X      }
  600. X      count1 = 0;
  601. X
  602. X      req_msg.dev10_inod.intgr = 0;
  603. X      while(count1 < intsize)
  604. X      {
  605. X        msg_buf[count2++] = req_msg.dev10_inod.chr[count1++];
  606. X      }
  607. X      count1 = 0;
  608. X
  609. X      req_msg.dev11_inod.intgr = 0;
  610. X      while(count1 < intsize)
  611. X      {
  612. X        msg_buf[count2++] = req_msg.dev11_inod.chr[count1++];
  613. X      }
  614. X      count1 = 0;
  615. X
  616. X      /* identify the requesting user */
  617. X      req_msg.uid.intgr = (int)getuid();
  618. X      while(count1 < intsize)
  619. X      {
  620. X        msg_buf[count2++] = req_msg.uid.chr[count1++];
  621. X      }
  622. X      count1 = 0;
  623. X
  624. X      req_msg.loop.intgr = 0;
  625. X      while(count1 < intsize)
  626. X      {
  627. X        msg_buf[count2++] = req_msg.loop.chr[count1++];
  628. X      }
  629. X      count1 = 0;
  630. X      count2 = 0;
  631. X
  632. X  /* send our message to the almighty IQUEUER */
  633. X
  634. X      count1 = write(outfifo,msg_buf,to_iqrsiz);
  635. X      close(outfifo);
  636. X
  637. X#ifdef DEBUG
  638. X      printf("wrote %d chars\n",count1);
  639. X#endif
  640. X
  641. X      count1 = 0;
  642. X
  643. X  /* read until we get a message of all zeroes */
  644. X
  645. X
  646. X  to_IQ.typ.lng = 1L;
  647. X
  648. X  while(to_IQ.typ.lng != 0L)
  649. X  {
  650. X    chars_got = read(statropn,msg_buf, to_iq_siz);
  651. X
  652. X#ifdef DEBUG
  653. X      printf("first read %d chars\n",chars_got);
  654. X#endif
  655. X
  656. X    if(chars_got < 1)
  657. X    {
  658. X      close(statropn);
  659. X      if((statropn = open(statFIFO,O_RDONLY)) == -1)
  660. X      {
  661. X        /* need to send out an error msg */
  662. X              /* format an error message */
  663. X              time(&tloc);
  664. X              nowtime = (struct tm *)localtime(&tloc);
  665. X              time_str = asctime(nowtime);
  666. X              sprintf(errmsg,"IQ: IQUEUER does not exist. time:\n");
  667. X              strcat(errmsg,"                            ");
  668. X              strcat(errmsg,time_str);
  669. X              strcat(errmsg,"\n");
  670. X
  671. X              /* We can still write to stderr at this point. */
  672. X              fprintf(stderr,errmsg);
  673. X
  674. X              exit(1);
  675. X      }
  676. X      chars_got = read(statropn,msg_buf, to_iq_siz);
  677. X
  678. X#ifdef DEBUG
  679. X      printf("second read %d chars\n",chars_got);
  680. X#endif
  681. X
  682. X      
  683. X    }
  684. X
  685. X    /* fill our structure of unions from the msg_buf */
  686. X    count1 = count2 = 0;
  687. X
  688. X    while(count1 < longsize)
  689. X    {
  690. X      to_IQ.typ.chr[count1++] = msg_buf[count2++];
  691. X    }
  692. X    count1 = 0;
  693. X
  694. X    while(count1 < longsize)
  695. X    {
  696. X      to_IQ.devinod.chr[count1++] = msg_buf[count2++];
  697. X    }
  698. X    count1 = 0;
  699. X
  700. X    while(count1 < longsize)
  701. X    {
  702. X      to_IQ.my_fifo.chr[count1++] = msg_buf[count2++];
  703. X    }
  704. X    count1 = 0;
  705. X
  706. X    while(count1 < longsize)
  707. X    {
  708. X      to_IQ.pid.chr[count1++] = msg_buf[count2++];
  709. X    }
  710. X    count1 = 0;
  711. X
  712. X    while(count1 < longsize)
  713. X    {
  714. X      to_IQ.time_in.chr[count1++] = msg_buf[count2++];
  715. X    }
  716. X    count1 = 0;
  717. X
  718. X    while(count1 < longsize)
  719. X    {
  720. X      to_IQ.time_out.chr[count1++] = msg_buf[count2++];
  721. X    }
  722. X    count1 = 0;
  723. X
  724. X    while(count1 < longsize)
  725. X    {
  726. X      to_IQ.uid.chr[count1++] = msg_buf[count2++];
  727. X    }
  728. X    count1 = 0;
  729. X
  730. X    while(count1 < longsize)
  731. X    {
  732. X      to_IQ.loop.chr[count1++] = msg_buf[count2++];
  733. X    }
  734. X    count1 = 0;
  735. X    count2 = 0;
  736. X
  737. X    /* now see what we got */
  738. X    if(to_IQ.typ.lng != 0L)
  739. X    {
  740. X      ++gotstats;
  741. X
  742. X      if(gotstats == 1)
  743. X      {
  744. X          /* do a header for jobs which are running */
  745. X          sprintf(out_buf,"PORT           ");     /* 14 positions, plus space */
  746. X          strcat(out_buf,"PRINTER        ");     /* 14 positions, plus space */
  747. X          strcat(out_buf,"PID    ");             /*  6 positions, plus space */
  748. X          strcat(out_buf,"TIME-IN  ");           /*  8 positions, plus space */
  749. X          strcat(out_buf,"STATE-TIME ");         /*  8 positions, plus space */
  750. X                                                 /*  STATE TIME header over- */
  751. X                                                 /*  -runs following field   */
  752. X          strcat(out_buf,"USER   ");             /*  8 positions, plus space */
  753. X          strcat(out_buf," LOOP ");              /*  5 positions, plus space */
  754. X          strcat(out_buf,"STATE\n\n");           /* 10 positions, plus \n's  */
  755. X
  756. X          printf(out_buf);
  757. X      }
  758. X
  759. X      /* make some sense of what we got */
  760. X
  761. X     /**********************************************************************/
  762. X
  763. X      /* If -1 was passed as inode number, this signifies that the job   */
  764. X      /* is waiting to be assigned a device once one becomes available.  */
  765. X
  766. X      if (to_IQ.devinod.lng == -1)     
  767. X        strcpy(lil_buf,"unassigned");
  768. X      else
  769. X        /* get cpu port's name from inode number */
  770. X        strcpy(lil_buf,myncheck((int)to_IQ.devinod.lng,"/dev"));
  771. X
  772. X      if(strlen(lil_buf) == 0)
  773. X      {
  774. X        /* need to send out an error msg */
  775. X        /* format an error message */
  776. X        time(&tloc);
  777. X        nowtime = (struct tm *)localtime(&tloc);
  778. X        time_str = asctime(nowtime);
  779. X        sprintf(errmsg,"IQ: can't find port used by ISPIN pid = %d.  time:\n",(int)to_IQ.pid.lng);
  780. X        strcat(errmsg,"                            ");
  781. X        strcat(errmsg,time_str);
  782. X        strcat(errmsg,"\n");
  783. X    
  784. X        fprintf(stderr,errmsg);
  785. X       /* don't exit */
  786. X     }
  787. X
  788. X/*****************************************************************************/
  789. X     sprintf(out_buf,"%-*s",15, lil_buf);
  790. X/*****************************************************************************/
  791. X      /* get printer's fifo's name from inode number */
  792. X      /* where's his FIFO? */
  793. X
  794. X      strcpy(lil_buf,myncheck((int)to_IQ.my_fifo.lng,FIFOdir));
  795. X
  796. X      if(strlen(lil_buf) == 0)
  797. X      {
  798. X        /* need to send out an error msg */
  799. X        /* format an error message */
  800. X        time(&tloc);
  801. X        nowtime = (struct tm *)localtime(&tloc);
  802. X        time_str = asctime(nowtime);
  803. X        sprintf(errmsg,"IQ: can't find FIFO of ISPIN pid = %d.  time:\n",(int)to_IQ.pid.lng);
  804. X        strcat(errmsg,"                            ");
  805. X        strcat(errmsg,time_str);
  806. X        strcat(errmsg,"\n");
  807. X    
  808. X       fprintf(stderr,errmsg);
  809. X       /* don't exit */
  810. X     }
  811. X
  812. X
  813. X/*****************************************************************************/
  814. X     sprintf(build_cmd,"%-*s",15,lil_buf);
  815. X     strcat(out_buf, build_cmd);
  816. X/*****************************************************************************/
  817. X
  818. X     sprintf(build_cmd,"%-*ld",7,to_IQ.pid.lng);
  819. X     strcat(out_buf, build_cmd);
  820. X     
  821. X     /* create something from the time */
  822. X     tloc = to_IQ.time_in.lng;
  823. X     nowtime = (struct tm *)localtime(&tloc);
  824. X     sprintf(build_cmd,"%2.2d:",nowtime->tm_hour);
  825. X     strcat(out_buf, build_cmd);
  826. X     sprintf(build_cmd,"%2.2d:",nowtime->tm_min);
  827. X     strcat(out_buf, build_cmd);
  828. X     sprintf(build_cmd,"%2.2d ",nowtime->tm_sec);
  829. X     strcat(out_buf, build_cmd);
  830. X
  831. X     if((int)to_IQ.typ.lng == WAITING)
  832. X     {
  833. X       strcat(out_buf,"          ");
  834. X     }
  835. X     else
  836. X     {
  837. X       /* create something from the time */
  838. X       tloc = to_IQ.time_out.lng;
  839. X       nowtime = (struct tm *)localtime(&tloc);
  840. X       sprintf(build_cmd,"%2.2d:",nowtime->tm_hour);
  841. X       strcat(out_buf, build_cmd);
  842. X       sprintf(build_cmd,"%2.2d:",nowtime->tm_min);
  843. X       strcat(out_buf, build_cmd);
  844. X       sprintf(build_cmd,"%2.2d  ",nowtime->tm_sec);
  845. X       strcat(out_buf, build_cmd);
  846. X     }
  847. X
  848. X     /* get logname from uid */
  849. X     pass = getpwuid((int)to_IQ.uid.lng);
  850. X     sprintf(build_cmd,"%-*s",8,pass->pw_name);
  851. X     strcat(out_buf, build_cmd);
  852. X
  853. X     /* which loop are we on? */
  854. X     sprintf(build_cmd,"%*d",5,(int)to_IQ.loop.lng);
  855. X     strcat(out_buf, build_cmd);
  856. X
  857. X     strcat(out_buf, " ");
  858. X
  859. X     switch((int)to_IQ.typ.lng)
  860. X     {
  861. X       case STARTUP:
  862. X           strcat(out_buf,"STARTUP");
  863. X       break;
  864. X       case CONNECTING:
  865. X           strcat(out_buf,"CONNECT");
  866. X       break;
  867. X       case PRINTING:
  868. X           strcat(out_buf,"PRINTING");
  869. X       break;
  870. X       case LOOPING:
  871. X           strcat(out_buf,"LOOPING");
  872. X       break;
  873. X       case WAITING:
  874. X           strcat(out_buf,"WAIT port");
  875. X       break;
  876. X       case DISCONNECTING:
  877. X         strcat(out_buf,"DISCONNECT");
  878. X       break;
  879. X       case QUITTING:
  880. X         strcat(out_buf,"QUITTING");
  881. X       break;
  882. X       default:
  883. X         strcat(out_buf,"NOTIFY SYS ADMIN");
  884. X       break;
  885. X     }
  886. X
  887. X     
  888. X     strcat(out_buf, "\n");
  889. X
  890. X
  891. X     printf(out_buf);
  892. X    }
  893. X  }
  894. X  if(gotstats == 0)
  895. X  {
  896. X    fprintf(stderr,"all quiet\n");
  897. X  }
  898. X}
  899. X
  900. X
  901. Xnot_now(sig)
  902. Xint sig;
  903. X{
  904. X  /* take care of the signals */
  905. X  signal(SIGINT, SIG_IGN);    /* ignore "interrupt" signal <DEL> */
  906. X  signal(SIGHUP, SIG_IGN);    /* ignore "hang up" signal */
  907. X  signal(SIGQUIT, SIG_IGN);   /* ignore "quit" signal */
  908. X  signal(SIGALRM, SIG_IGN);   /* ignore "alarm" signal */
  909. X  signal(SIGTERM, SIG_IGN);   /* ignore "term" signal */
  910. X
  911. X  switch(sig)
  912. X  {
  913. X    case SIGTERM:
  914. X       fprintf(stderr, "IQ: IQUEUER status not available now.\n"); 
  915. X    break;
  916. X    case SIGALRM:
  917. X       fprintf(stderr, "IQ: IQUEUER not running now.\n"); 
  918. X    break;
  919. X    default:
  920. X       fprintf(stderr, "IQ: IQ bombed off.\n"); 
  921. X    break;
  922. X  }
  923. X
  924. X  exit(1);
  925. X}
  926. X
  927. X/**************************************************************************/
  928. X/*                                                                        */
  929. X/* MYNCHECK                                                               */
  930. X/*                                                                        */
  931. X/* 04/20/89 L. Bartz, Internal Revenue Service, Indianapolis              */
  932. X/*                                                                        */
  933. X/* This function is given an inode number and (pointer to) directory      */
  934. X/* name. It returns (pointer to) file name associated with the inode      */
  935. X/* number on success, null character pointer on failure.                  */
  936. X/*                                                                        */
  937. X/* Must have been declared in the calling function like so:               */
  938. X/*                                                                        */
  939. X/*                        char *myncheck();                               */
  940. X/* Called like so:                                                        */
  941. X/*                                                                        */
  942. X/*                  strcpy(fylname,myncheck(inode,dirname));              */
  943. X/*                                                                        */
  944. X/* Where variables have been declared in the calling function like so:    */
  945. X/*                                                                        */
  946. X/*                  int inode;                                            */
  947. X/*                  char *dirname;                                        */
  948. X/*                  char fylname[DIRSIZ + 1];                             */
  949. X/*                                                                        */
  950. X/* DIRSIZ is #defined in sys/dir.h                                        */
  951. X/*                                                                        */
  952. X/*                                                                        */
  953. X/*                                                                        */
  954. X/* 05/11/90  LSB  - Modified for enhanced portability to accomodate the   */
  955. X/*                  more modern "dirent" directory structure and related  */
  956. X/*                  family of directory access routines.                  */
  957. X/*                  Presently only good for those dirent-style systems    */
  958. X/*                  which support a vestigal sys/dir.h file and a         */
  959. X/*                  struct dirent which is named "direct" for backwards   */
  960. X/*                  compatibility.                                        */
  961. X/*                                                                        */
  962. X/*                                                                        */
  963. X/**************************************************************************/
  964. Xchar *myncheck(inode,dirname)
  965. Xint inode;
  966. Xchar *dirname;
  967. X{
  968. X/* uncomment the following if not elsewhere included */
  969. X/* #include <stdio.h> */
  970. X
  971. X/* uncomment the following if not elsewhere included */
  972. X/* #include <sys/types.h> */
  973. X
  974. X/* uncomment the following if not elsewhere included */
  975. X/* #include <sys/dir.h> */
  976. X
  977. X
  978. X  int ret_val = 1;
  979. X
  980. X#ifdef MODERN_DIRS
  981. X/* uncomment the following if not elsewhere included */
  982. X/* #include <strings.h> */
  983. X
  984. X  DIR *file1;
  985. X  struct direct *dp;
  986. X  char dir_name[MAXNAMLEN+1];
  987. X#else
  988. X/* uncomment the following if not elsewhere included */
  989. X/* #include <string.h> */
  990. X/* uncomment the following if not elsewhere included */
  991. X/* #include <fcntl.h> */
  992. X  FILE *file1;
  993. X  struct direct dir1;
  994. X#endif
  995. X
  996. X
  997. X
  998. X#ifdef MODERN_DIRS
  999. X
  1000. X        file1 = opendir(dirname);
  1001. X
  1002. X        while((dp = readdir(file1)) != NULL )
  1003. X        {
  1004. X          if((int)dp->d_ino == inode)
  1005. X          {
  1006. X            strcpy(&dir_name[0], dp->d_name);
  1007. X        closedir(file1);
  1008. X            return((char *) &dir_name[0]);
  1009. X          }
  1010. X        }
  1011. X        closedir(file1);
  1012. X        
  1013. X#else
  1014. X        file1 = fopen(dirname,"r");
  1015. X
  1016. X        while(ret_val > 0)
  1017. X        {
  1018. X          ret_val = fread(&dir1,sizeof(struct direct),1,file1);
  1019. X          if((int)dir1.d_ino == inode)
  1020. X          {
  1021. X        fclose(file1);
  1022. X            return((char *) &dir1.d_name[0]);
  1023. X          }
  1024. X        }
  1025. X        fclose(file1);
  1026. X#endif
  1027. X
  1028. X        /* we didn't find it */
  1029. X        return((char *) 0);
  1030. X}
  1031. END_OF_FILE
  1032. if test 24478 -ne `wc -c <'ISPIN/src/IQ.c'`; then
  1033.     echo shar: \"'ISPIN/src/IQ.c'\" unpacked with wrong size!
  1034. fi
  1035. # end of 'ISPIN/src/IQ.c'
  1036. fi
  1037. if test -f 'ISPIN/src/ISPINTRFCE.c' -a "${1}" != "-c" ; then 
  1038.   echo shar: Will not clobber existing file \"'ISPIN/src/ISPINTRFCE.c'\"
  1039. else
  1040. echo shar: Extracting \"'ISPIN/src/ISPINTRFCE.c'\" \(5601 characters\)
  1041. sed "s/^X//" >'ISPIN/src/ISPINTRFCE.c' <<'END_OF_FILE'
  1042. X/****************************************************************************/
  1043. X/*                                                                          */
  1044. X/* ISPINTRFCE - serves as the "interface" program under the lp(1) spooler.  */
  1045. X/*              determines spool member name, then passes name and all      */
  1046. X/*              other arguments to ISPIN for execution.                     */
  1047. X/*                                                                          */
  1048. X/*                                                                          */
  1049. X/*                                                                          */
  1050. X/*                                                                          */
  1051. X/* ISPIN                                                                    */
  1052. X/*                                                                          */
  1053. X/* Indianapolis Standard Printer Interface (for Network printers)           */
  1054. X/****************************************************************************/
  1055. X/*                                                                          */
  1056. X/*  Copyright (C) 1991                                                      */
  1057. X/*  Larry Bartz                                                             */
  1058. X/*  Internal Revenue Service                                                */
  1059. X/*  Indianapolis District Office                                            */
  1060. X/*                                                                          */
  1061. X/*  This program is free software; you can redistribute it and/or modify    */
  1062. X/*  it under the terms of the GNU General Public License as published by    */
  1063. X/*  the Free Software Foundation, version 1.                                */
  1064. X/*                                                                          */
  1065. X/*  This program is distributed in the hope that it will be useful,         */
  1066. X/*  but WITHOUT ANY WARRANTY; without even the implied warranty of          */
  1067. X/*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the           */
  1068. X/*  GNU General Public License for more details.                            */
  1069. X/*                                                                          */
  1070. X/*  You should have received a copy of the GNU General Public License       */
  1071. X/*  along with this program; if not, write to the Free Software             */
  1072. X/*  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.               */
  1073. X/*                                                                          */
  1074. X/****************************************************************************/
  1075. X/*                                                                          */
  1076. X/* COMMENTS                                                                 */
  1077. X/*                                                                          */
  1078. X/* Read comments in common.h for the BIG PICTURE.                           */
  1079. X/*                                                                          */
  1080. X/* This small executable adds one argument to the argument vector, then     */
  1081. X/* execs a centralized ISPIN executable.                                    */
  1082. X/*                                                                          */
  1083. X/****************************************************************************/
  1084. X/*                                                                          */
  1085. X/* DEFINES                                                                  */
  1086. X/*                                                                          */
  1087. X/* Nothing defined locally in this program                                  */
  1088. X/*                                                                          */
  1089. X/*                                                                          */
  1090. X/****************************************************************************/
  1091. X/*                                                                          */
  1092. X/* INCLUDES                                                                 */
  1093. X/*                                                                          */
  1094. X/*                                                                          */
  1095. X#include <stdio.h>
  1096. X#include <string.h>
  1097. X#include "../h/localcnfg.h"
  1098. X/*                                                                          */
  1099. X/*                                                                          */
  1100. X/****************************************************************************/
  1101. X/*                                                                          */
  1102. X/* DATA TYPES, VARIABLES, ETC                                               */
  1103. X/*                                                                          */
  1104. X/* All local to this program only.                                          */
  1105. X/*                                                                          */
  1106. X/*                                                                          */
  1107. X/*                                                                          */
  1108. X/****************************************************************************/
  1109. X
  1110. X
  1111. Xmain(argc,argv)
  1112. Xint argc;
  1113. Xchar *argv[];
  1114. X{
  1115. X  int args, myargs, lp_args;
  1116. X  char *base, intrfce[BUFSIZ];
  1117. X  char **myargv;
  1118. X
  1119. X  myargv = (char **) calloc(argc + 1, sizeof(char *));
  1120. X
  1121. X  base = strrchr(argv[0],'/');
  1122. X  ++base;
  1123. X  
  1124. X  /* INTRFCE is defined in localcnfg.h */
  1125. X  strcpy(intrfce,INTRFCE);
  1126. X  myargv[0] = &intrfce[0];
  1127. X
  1128. X  myargv[1] = base;
  1129. X
  1130. X  myargs = 2;
  1131. X  lp_args = 1;
  1132. X
  1133. X  while(lp_args <= argc)
  1134. X  {
  1135. X    myargv[myargs++] = argv[lp_args++];
  1136. X  }
  1137. X
  1138. X
  1139. X
  1140. X  execv(INTRFCE, myargv);
  1141. X  
  1142. X
  1143. X}
  1144. END_OF_FILE
  1145. if test 5601 -ne `wc -c <'ISPIN/src/ISPINTRFCE.c'`; then
  1146.     echo shar: \"'ISPIN/src/ISPINTRFCE.c'\" unpacked with wrong size!
  1147. fi
  1148. # end of 'ISPIN/src/ISPINTRFCE.c'
  1149. fi
  1150. if test -f 'ISPIN/install/lib_rtab/CPU_SW_CDN_PTR/USER_ADDR/PLAIN' -a "${1}" != "-c" ; then 
  1151.   echo shar: Will not clobber existing file \"'ISPIN/install/lib_rtab/CPU_SW_CDN_PTR/USER_ADDR/PLAIN'\"
  1152. else
  1153. echo shar: Extracting \"'ISPIN/install/lib_rtab/CPU_SW_CDN_PTR/USER_ADDR/PLAIN'\" \(945 characters\)
  1154. sed "s/^X//" >'ISPIN/install/lib_rtab/CPU_SW_CDN_PTR/USER_ADDR/PLAIN' <<'END_OF_FILE'
  1155. X# You'll need to adjust this to suit your switch's login herald and break
  1156. X# sequence. In this example, the login herald contains the string "System?",
  1157. X# and the switch's break sequence is defined as "<BREAK>bye". The switch's
  1158. X# info messages (Tellabs) are "on" in order to allow ISPIN to detect error
  1159. X# conditions.
  1160. X#
  1161. X# The address entered by the user must be the last 8 (eight) digits of the
  1162. X# fourteen digit X.25 address of the printer.
  1163. X# If you use the ISPI application as the frontend for your users, the comment
  1164. X# line following this entry will be used in ISPI's menu.
  1165. X#
  1166. Xnetind1;/dev/tty22,/dev/contty;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\p-pad>;\p\r\d;pad>-\p\K\dclr\r\w-pad>;set recall=26\r\dconnect\s000000\U\r\d;pened-\p\K\dclr\r\dset recall=26\r\dconnect\s000000\U\r\w-pened;\d;;;
  1167. X# user addressable PLAIN
  1168. END_OF_FILE
  1169. if test 945 -ne `wc -c <'ISPIN/install/lib_rtab/CPU_SW_CDN_PTR/USER_ADDR/PLAIN'`; then
  1170.     echo shar: \"'ISPIN/install/lib_rtab/CPU_SW_CDN_PTR/USER_ADDR/PLAIN'\" unpacked with wrong size!
  1171. fi
  1172. # end of 'ISPIN/install/lib_rtab/CPU_SW_CDN_PTR/USER_ADDR/PLAIN'
  1173. fi
  1174. if test -f 'ISPIN/install/lib_rtab/CPU_SW_CDN_PTR/USER_ADDR/C351_PLAIN' -a "${1}" != "-c" ; then 
  1175.   echo shar: Will not clobber existing file \"'ISPIN/install/lib_rtab/CPU_SW_CDN_PTR/USER_ADDR/C351_PLAIN'\"
  1176. else
  1177. echo shar: Extracting \"'ISPIN/install/lib_rtab/CPU_SW_CDN_PTR/USER_ADDR/C351_PLAIN'\" \(947 characters\)
  1178. sed "s/^X//" >'ISPIN/install/lib_rtab/CPU_SW_CDN_PTR/USER_ADDR/C351_PLAIN' <<'END_OF_FILE'
  1179. X# You'll need to adjust this to suit your switch's login herald and break
  1180. X# sequence. In this example, the login herald contains the string "System?",
  1181. X# and the switch's break sequence is defined as "<BREAK>bye". The switch's
  1182. X# info messages (Tellabs) are "on" in order to allow ISPIN to detect error
  1183. X# conditions.
  1184. X#
  1185. X# The address entered by the user must be the last 8 (eight) digits of the
  1186. X# fourteen digit X.25 address of the printer.
  1187. X# If you use the ISPI application as the frontend for your users, the comment
  1188. X# line following this entry will be used in ISPI's menu.
  1189. X#
  1190. 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\s000000\U\r\d;pened-\p\K\dclr\r\dset recall=26\r\dconnect\s000000\U\r\w-pened;\d\n\f;;;
  1191. X# user addressable C351
  1192. END_OF_FILE
  1193. if test 947 -ne `wc -c <'ISPIN/install/lib_rtab/CPU_SW_CDN_PTR/USER_ADDR/C351_PLAIN'`; then
  1194.     echo shar: \"'ISPIN/install/lib_rtab/CPU_SW_CDN_PTR/USER_ADDR/C351_PLAIN'\" unpacked with wrong size!
  1195. fi
  1196. # end of 'ISPIN/install/lib_rtab/CPU_SW_CDN_PTR/USER_ADDR/C351_PLAIN'
  1197. fi
  1198. if test -f 'ISPIN/install/lib_rtab/CPU_SW_CDN_PTR/USER_ADDR/QUME_NOSHT' -a "${1}" != "-c" ; then 
  1199.   echo shar: Will not clobber existing file \"'ISPIN/install/lib_rtab/CPU_SW_CDN_PTR/USER_ADDR/QUME_NOSHT'\"
  1200. else
  1201. echo shar: Extracting \"'ISPIN/install/lib_rtab/CPU_SW_CDN_PTR/USER_ADDR/QUME_NOSHT'\" \(980 characters\)
  1202. sed "s/^X//" >'ISPIN/install/lib_rtab/CPU_SW_CDN_PTR/USER_ADDR/QUME_NOSHT' <<'END_OF_FILE'
  1203. X# You'll need to adjust this to suit your switch's login herald and break
  1204. X# sequence. In this example, the login herald contains the string "System?",
  1205. X# and the switch's break sequence is defined as "<BREAK>bye". The switch's
  1206. X# info messages (Tellabs) are "on" in order to allow ISPIN to detect error
  1207. X# conditions.
  1208. X#
  1209. X# The address entered by the user must be the last 8 (eight) digits of the
  1210. X# fourteen digit X.25 address of the printer.
  1211. X# If you use the ISPI application as the frontend for your users, the comment
  1212. X# line following this entry will be used in ISPI's menu.
  1213. X#
  1214. 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\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\s000000\U\r\d;pened-\p\K\dclr\r\dset recall=26\r\dconnect\s000000\U\r\w-pened;\033S\033F66\033C00\0339\015\033T\E;;;
  1215. X# user addressable QUME
  1216. X
  1217. END_OF_FILE
  1218. if test 980 -ne `wc -c <'ISPIN/install/lib_rtab/CPU_SW_CDN_PTR/USER_ADDR/QUME_NOSHT'`; then
  1219.     echo shar: \"'ISPIN/install/lib_rtab/CPU_SW_CDN_PTR/USER_ADDR/QUME_NOSHT'\" unpacked with wrong size!
  1220. fi
  1221. # end of 'ISPIN/install/lib_rtab/CPU_SW_CDN_PTR/USER_ADDR/QUME_NOSHT'
  1222. fi
  1223. if test -f 'ISPIN/install/lib_rtab/CPU_SW_CDN_PTR/USER_ADDR/QUME_SHT' -a "${1}" != "-c" ; then 
  1224.   echo shar: Will not clobber existing file \"'ISPIN/install/lib_rtab/CPU_SW_CDN_PTR/USER_ADDR/QUME_SHT'\"
  1225. else
  1226. echo shar: Extracting \"'ISPIN/install/lib_rtab/CPU_SW_CDN_PTR/USER_ADDR/QUME_SHT'\" \(980 characters\)
  1227. sed "s/^X//" >'ISPIN/install/lib_rtab/CPU_SW_CDN_PTR/USER_ADDR/QUME_SHT' <<'END_OF_FILE'
  1228. X# You'll need to adjust this to suit your switch's login herald and break
  1229. X# sequence. In this example, the login herald contains the string "System?",
  1230. X# and the switch's break sequence is defined as "<BREAK>bye". The switch's
  1231. X# info messages (Tellabs) are "on" in order to allow ISPIN to detect error
  1232. X# conditions.
  1233. X#
  1234. X# The address entered by the user must be the last 8 (eight) digits of the
  1235. X# fourteen digit X.25 address of the printer.
  1236. X# If you use the ISPI application as the frontend for your users, the comment
  1237. X# line following this entry will be used in ISPI's menu.
  1238. X#
  1239. 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\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\s000000\U\r\d;pened-\p\K\dclr\r\dset recall=26\r\dconnect\s000000\U\r\w-pened;\033S\033F90\033C28\0339\015\033T\E;;;
  1240. X# user addressable QUME
  1241. X
  1242. END_OF_FILE
  1243. if test 980 -ne `wc -c <'ISPIN/install/lib_rtab/CPU_SW_CDN_PTR/USER_ADDR/QUME_SHT'`; then
  1244.     echo shar: \"'ISPIN/install/lib_rtab/CPU_SW_CDN_PTR/USER_ADDR/QUME_SHT'\" unpacked with wrong size!
  1245. fi
  1246. # end of 'ISPIN/install/lib_rtab/CPU_SW_CDN_PTR/USER_ADDR/QUME_SHT'
  1247. fi
  1248. if test -f 'ISPIN/install/lib_rtab/CPU_CDN_PTR/ADDR_SPEC/C351_PLAIN' -a "${1}" != "-c" ; then 
  1249.   echo shar: Will not clobber existing file \"'ISPIN/install/lib_rtab/CPU_CDN_PTR/ADDR_SPEC/C351_PLAIN'\"
  1250. else
  1251. echo shar: Extracting \"'ISPIN/install/lib_rtab/CPU_CDN_PTR/ADDR_SPEC/C351_PLAIN'\" \(330 characters\)
  1252. sed "s/^X//" >'ISPIN/install/lib_rtab/CPU_CDN_PTR/ADDR_SPEC/C351_PLAIN' <<'END_OF_FILE'
  1253. X#
  1254. X#
  1255. 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\n\f;;;
  1256. X#
  1257. X#
  1258. END_OF_FILE
  1259. if test 330 -ne `wc -c <'ISPIN/install/lib_rtab/CPU_CDN_PTR/ADDR_SPEC/C351_PLAIN'`; then
  1260.     echo shar: \"'ISPIN/install/lib_rtab/CPU_CDN_PTR/ADDR_SPEC/C351_PLAIN'\" unpacked with wrong size!
  1261. fi
  1262. # end of 'ISPIN/install/lib_rtab/CPU_CDN_PTR/ADDR_SPEC/C351_PLAIN'
  1263. fi
  1264. if test -f 'ISPIN/install/lib_rtab/CPU_CDN_PTR/ADDR_SPEC/QUME_NOSHT' -a "${1}" != "-c" ; then 
  1265.   echo shar: Will not clobber existing file \"'ISPIN/install/lib_rtab/CPU_CDN_PTR/ADDR_SPEC/QUME_NOSHT'\"
  1266. else
  1267. echo shar: Extracting \"'ISPIN/install/lib_rtab/CPU_CDN_PTR/ADDR_SPEC/QUME_NOSHT'\" \(349 characters\)
  1268. sed "s/^X//" >'ISPIN/install/lib_rtab/CPU_CDN_PTR/ADDR_SPEC/QUME_NOSHT' <<'END_OF_FILE'
  1269. X#
  1270. X#
  1271. X#
  1272. 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\033F66\033C00\0339\d;;;
  1273. X#
  1274. X#
  1275. END_OF_FILE
  1276. if test 349 -ne `wc -c <'ISPIN/install/lib_rtab/CPU_CDN_PTR/ADDR_SPEC/QUME_NOSHT'`; then
  1277.     echo shar: \"'ISPIN/install/lib_rtab/CPU_CDN_PTR/ADDR_SPEC/QUME_NOSHT'\" unpacked with wrong size!
  1278. fi
  1279. # end of 'ISPIN/install/lib_rtab/CPU_CDN_PTR/ADDR_SPEC/QUME_NOSHT'
  1280. fi
  1281. if test -f 'ISPIN/install/lib_rtab/CPU_CDN_PTR/ADDR_SPEC/QUME_SHT' -a "${1}" != "-c" ; then 
  1282.   echo shar: Will not clobber existing file \"'ISPIN/install/lib_rtab/CPU_CDN_PTR/ADDR_SPEC/QUME_SHT'\"
  1283. else
  1284. echo shar: Extracting \"'ISPIN/install/lib_rtab/CPU_CDN_PTR/ADDR_SPEC/QUME_SHT'\" \(349 characters\)
  1285. sed "s/^X//" >'ISPIN/install/lib_rtab/CPU_CDN_PTR/ADDR_SPEC/QUME_SHT' <<'END_OF_FILE'
  1286. X#
  1287. X#
  1288. X#
  1289. 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\033F90\033C28\0339\d;;;
  1290. X#
  1291. X#
  1292. END_OF_FILE
  1293. if test 349 -ne `wc -c <'ISPIN/install/lib_rtab/CPU_CDN_PTR/ADDR_SPEC/QUME_SHT'`; then
  1294.     echo shar: \"'ISPIN/install/lib_rtab/CPU_CDN_PTR/ADDR_SPEC/QUME_SHT'\" unpacked with wrong size!
  1295. fi
  1296. # end of 'ISPIN/install/lib_rtab/CPU_CDN_PTR/ADDR_SPEC/QUME_SHT'
  1297. fi
  1298. if test -f 'ISPIN/install/lib_rtab/CPU_CDN_PTR/USER_ADDR/PLAIN' -a "${1}" != "-c" ; then 
  1299.   echo shar: Will not clobber existing file \"'ISPIN/install/lib_rtab/CPU_CDN_PTR/USER_ADDR/PLAIN'\"
  1300. else
  1301. echo shar: Extracting \"'ISPIN/install/lib_rtab/CPU_CDN_PTR/USER_ADDR/PLAIN'\" \(578 characters\)
  1302. sed "s/^X//" >'ISPIN/install/lib_rtab/CPU_CDN_PTR/USER_ADDR/PLAIN' <<'END_OF_FILE'
  1303. X# The address entered by the user must be the last 8 (eight) digits of the
  1304. X# fourteen digit X.25 address of the printer.
  1305. X# If you use the ISPI application as the frontend for your users, the comment
  1306. X# line following this entry will be used in ISPI's menu.
  1307. X#
  1308. X#
  1309. X#
  1310. Xextplain;/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\s000000\U\r\d;pened-\p\K\pclr\r\dset recall=26\r\p\pconnect\s000000\U\r\d-pened;\d;;;
  1311. X#Plain
  1312. X#
  1313. END_OF_FILE
  1314. if test 578 -ne `wc -c <'ISPIN/install/lib_rtab/CPU_CDN_PTR/USER_ADDR/PLAIN'`; then
  1315.     echo shar: \"'ISPIN/install/lib_rtab/CPU_CDN_PTR/USER_ADDR/PLAIN'\" unpacked with wrong size!
  1316. fi
  1317. # end of 'ISPIN/install/lib_rtab/CPU_CDN_PTR/USER_ADDR/PLAIN'
  1318. fi
  1319. if test -f 'ISPIN/install/lib_rtab/CPU_CDN_PTR/USER_ADDR/C351_PLAIN' -a "${1}" != "-c" ; then 
  1320.   echo shar: Will not clobber existing file \"'ISPIN/install/lib_rtab/CPU_CDN_PTR/USER_ADDR/C351_PLAIN'\"
  1321. else
  1322. echo shar: Extracting \"'ISPIN/install/lib_rtab/CPU_CDN_PTR/USER_ADDR/C351_PLAIN'\" \(592 characters\)
  1323. sed "s/^X//" >'ISPIN/install/lib_rtab/CPU_CDN_PTR/USER_ADDR/C351_PLAIN' <<'END_OF_FILE'
  1324. X# The address entered by the user must be the last 8 (eight) digits of the
  1325. X# fourteen digit X.25 address of the printer.
  1326. X# If you use the ISPI application as the frontend for your users, the comment
  1327. X# line following this entry will be used in ISPI's menu.
  1328. X#
  1329. X#
  1330. X#
  1331. Xextcent;/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\s000000\U\r\d;pened-\p\K\pclr\r\dset recall=26\r\p\pconnect\s000000\U\r\d-pened;\d\n\f;;;
  1332. X#Centronics
  1333. X#
  1334. X#
  1335. X#
  1336. X#
  1337. END_OF_FILE
  1338. if test 592 -ne `wc -c <'ISPIN/install/lib_rtab/CPU_CDN_PTR/USER_ADDR/C351_PLAIN'`; then
  1339.     echo shar: \"'ISPIN/install/lib_rtab/CPU_CDN_PTR/USER_ADDR/C351_PLAIN'\" unpacked with wrong size!
  1340. fi
  1341. # end of 'ISPIN/install/lib_rtab/CPU_CDN_PTR/USER_ADDR/C351_PLAIN'
  1342. fi
  1343. echo shar: End of archive 4 \(of 15\).
  1344. cp /dev/null ark4isdone
  1345. MISSING=""
  1346. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ; do
  1347.     if test ! -f ark${I}isdone ; then
  1348.     MISSING="${MISSING} ${I}"
  1349.     fi
  1350. done
  1351. if test "${MISSING}" = "" ; then
  1352.     echo You have unpacked all 15 archives.
  1353.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1354. else
  1355.     echo You still need to unpack the following archives:
  1356.     echo "        " ${MISSING}
  1357. fi
  1358. ##  End of shell archive.
  1359. exit 0
  1360.  
  1361.