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

  1. Newsgroups: comp.sources.unix
  2. From: sir-alan!ispin!lbartz@iuvax.cs.indiana.edu (Larry Bartz)
  3. Subject: v25i117: Indianapolis Standard Printer Interface for Networked printers, Part06/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 117
  9. Archive-Name: ispin/part06
  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 6 (of 15)."
  18. # Contents:  ISPIN/src/IQUEUER.c.ab
  19. #   ISPIN/install/lib_rtab/CPU_SW_PTR/ADDR_SPEC/C351_PLAIN
  20. #   ISPIN/install/lib_rtab/CPU_SW_PTR/ADDR_SPEC/PLAIN
  21. #   ISPIN/install/lib_rtab/CPU_SW_PTR/ADDR_SPEC/QUME_NOSHT
  22. #   ISPIN/install/lib_rtab/CPU_SW_PTR/ADDR_SPEC/QUME_SHT
  23. #   ISPIN/install/lib_rtab/CPU_SW_PTR/USER_ADDR/C351_PLAIN
  24. #   ISPIN/install/lib_rtab/CPU_SW_PTR/USER_ADDR/PLAIN
  25. #   ISPIN/install/lib_rtab/CPU_SW_PTR/USER_ADDR/QUME_NOSHT
  26. #   ISPIN/install/lib_rtab/CPU_SW_PTR/USER_ADDR/QUME_SHT
  27. #   ISPIN/install/Makefile ISPIN/install/install.sh
  28. #   ISPIN/install/split_it.sh ISPIN/doc/future.doc
  29. #   ISPIN/misc/ISPIT.dr/eot_trap.c
  30. # Wrapped by socrates@indy6 on Tue Jan 28 15:26:43 1992
  31. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  32. if test -f 'ISPIN/src/IQUEUER.c.ab' -a "${1}" != "-c" ; then 
  33.   echo shar: Will not clobber existing file \"'ISPIN/src/IQUEUER.c.ab'\"
  34. else
  35. echo shar: Extracting \"'ISPIN/src/IQUEUER.c.ab'\" \(30223 characters\)
  36. sed "s/^X//" >'ISPIN/src/IQUEUER.c.ab' <<'END_OF_FILE'
  37. X  while(count1 < intsize)
  38. X  {
  39. X    msg_buf[count2++] = out_msg.pad1.chr[count1++];
  40. X  }
  41. X  count1 = 0;
  42. X
  43. X
  44. X  /* send the message to the ISPIN's FIFO */
  45. X
  46. X  if((kill(c_curr_dsptch->job_id.my_pid.intgr, 0)) == -1)
  47. X  {
  48. X    /* the ISPIN died or was killed before we could help him */
  49. X    ret_val = clean_out(c_curr_dsptch->job_id.my_pid.intgr);
  50. X    close(outfifo);
  51. X    return(0);
  52. X  }
  53. X
  54. X  write(outfifo,msg_buf,to_ispinsiz);
  55. X
  56. X  close(outfifo);
  57. X}
  58. X
  59. X
  60. Xqueue_it()
  61. X{
  62. X
  63. X  struct wait_queue *c_head_wait;
  64. X  struct wait_queue *c_curr_wait;
  65. X  struct wait_queue *c_list_wait;
  66. X  struct wait_queue *c_hold_wait;
  67. X
  68. X  /* set the local pointers to aim at the true head of the list */
  69. X  c_head_wait = c_curr_wait = c_list_wait = c_hold_wait = head_wait;
  70. X
  71. X  /* walk the list */
  72. X
  73. X/* what if at very beginning of list */
  74. X
  75. X  while(c_curr_wait->next != NULL)
  76. X    c_curr_wait = c_curr_wait->next;
  77. X
  78. X  /* create a new list member */
  79. X  /* allocate memory for the new member of the list */
  80. X  c_curr_wait->next = (struct wait_queue *) calloc(1,sizeof(struct wait_queue));
  81. X      
  82. X  /* point the new one back at the current one */
  83. X  c_curr_wait->next->prev = c_curr_wait;
  84. X
  85. X  /* change our notion of "current" to the new one */
  86. X  c_curr_wait = c_curr_wait->next;
  87. X
  88. X  /* terminate the list */
  89. X  c_curr_wait->next = NULL;
  90. X
  91. X  /* fill the new structure */
  92. X
  93. X  c_curr_wait->job_id.typ.intgr        =  WAITING;
  94. X  c_curr_wait->job_id.my_pid.intgr     =  incoming.my_pid.intgr;
  95. X  c_curr_wait->job_id.my_fifo.intgr    =  incoming.my_fifo.intgr;
  96. X  c_curr_wait->devinod[0] = c_curr_wait->job_id.dev1_inod.intgr  
  97. X    =  incoming.dev1_inod.intgr;
  98. X  c_curr_wait->devinod[1] = c_curr_wait->job_id.dev2_inod.intgr  
  99. X    =  incoming.dev2_inod.intgr;
  100. X  c_curr_wait->devinod[2] = c_curr_wait->job_id.dev3_inod.intgr  
  101. X    =  incoming.dev3_inod.intgr;
  102. X  c_curr_wait->devinod[3] = c_curr_wait->job_id.dev4_inod.intgr  
  103. X    =  incoming.dev4_inod.intgr;
  104. X  c_curr_wait->devinod[4] = c_curr_wait->job_id.dev5_inod.intgr  
  105. X    =  incoming.dev5_inod.intgr;
  106. X  c_curr_wait->devinod[5] = c_curr_wait->job_id.dev6_inod.intgr  
  107. X    =  incoming.dev6_inod.intgr;
  108. X  c_curr_wait->devinod[6] = c_curr_wait->job_id.dev7_inod.intgr  
  109. X    =  incoming.dev7_inod.intgr;
  110. X  c_curr_wait->devinod[7] = c_curr_wait->job_id.dev8_inod.intgr  
  111. X    =  incoming.dev8_inod.intgr;
  112. X  c_curr_wait->devinod[8] = c_curr_wait->job_id.dev9_inod.intgr  
  113. X    =  incoming.dev9_inod.intgr;
  114. X  c_curr_wait->devinod[9] = c_curr_wait->job_id.dev10_inod.intgr  
  115. X    =  incoming.dev10_inod.intgr;
  116. X  c_curr_wait->devinod[10] = c_curr_wait->job_id.dev11_inod.intgr  
  117. X    =  incoming.dev11_inod.intgr;
  118. X  c_curr_wait->job_id.uid.intgr        =  incoming.uid.intgr;
  119. X  c_curr_wait->job_id.loop.intgr       =  incoming.loop.intgr;
  120. X  /* tloc was set in switch case HERE of main() */
  121. X  c_curr_wait->time_in           =  tloc;
  122. X
  123. X}
  124. X
  125. X
  126. Xcheck_queue()
  127. X{
  128. X  int in_use, ivar;
  129. X
  130. X  struct go_list *c_head_dsptch;
  131. X  struct go_list *c_curr_dsptch;
  132. X  struct go_list *c_list_dsptch;
  133. X  struct go_list *c_hold_dsptch;
  134. X
  135. X  struct wait_queue *c_head_wait;
  136. X  struct wait_queue *c_curr_wait;
  137. X  struct wait_queue *c_list_wait;
  138. X  struct wait_queue *c_hold_wait;
  139. X
  140. X  /* set the local pointers to aim at the true head of the list */
  141. X  c_head_wait = c_curr_wait = c_list_wait = c_hold_wait = head_wait;
  142. X
  143. X  /* Are any of the devices (upon which jobs are waiting) available now? */
  144. X  /* If so, get them going and re-org the wait list.                     */
  145. X
  146. X  /* who is waiting? */
  147. X  while(c_curr_wait->next != NULL)
  148. X  {
  149. X      c_curr_wait = c_curr_wait->next;
  150. X
  151. X      /* check the go_list to see if the device is in use */
  152. X
  153. X      /* check for the availability of each device(tty) which the job can */
  154. X      /* be sent through.                                                 */
  155. X      for (ivar = 0; ivar < 11 && c_curr_wait->devinod[ivar] > 0; ivar++)
  156. X        {
  157. X          in_use = 0;
  158. X
  159. X          /* set the local pointers to aim at the true head of the list */
  160. X          c_head_dsptch = c_curr_dsptch = c_list_dsptch = c_hold_dsptch 
  161. X            = head_dsptch;
  162. X          while(c_curr_dsptch->next != NULL)
  163. X            {
  164. X              c_curr_dsptch = c_curr_dsptch->next;
  165. X              if(c_curr_dsptch->devinod == c_curr_wait->devinod[ivar])
  166. X                {
  167. X                  in_use = 1;
  168. X                  break;
  169. X                }
  170. X            }
  171. X          if (in_use == 0)  /* if the device in devinod[ivar] is not being used */
  172. X          {
  173. X            strcpy(lil_buf,myncheck(c_curr_wait->devinod[ivar],"/dev"));
  174. X            /* we'll try to create a lockfile for the tty we want */
  175. X            in_use = lockit(lil_buf);
  176. X            if(in_use == 0)
  177. X            {
  178. X              break;
  179. X            }
  180. X          }
  181. X        }
  182. X
  183. X
  184. X      if(in_use == 0)
  185. X      {
  186. X        /* The device is not in use, so the waiting job may be issued.       */
  187. X        /* If we got this far, we also know we have the lockfile controlled. */
  188. X
  189. X        ret_val = go_for_it(&c_curr_wait->job_id,c_curr_wait->devinod[ivar],c_curr_wait->time_in);
  190. X
  191. X        /* now re-arrange the wait list to delete the one we just issued */
  192. X        
  193. X        /* cut our guy out from between his neighbors */
  194. X
  195. X        if(c_curr_wait->next != NULL)
  196. X        {
  197. X          /* if we're not at the end of the list */
  198. X          c_curr_wait->prev->next = c_curr_wait->next;
  199. X          c_curr_wait->next->prev = c_curr_wait->prev;
  200. X        }
  201. X        else
  202. X        {
  203. X          /* if we are at the end of the list */
  204. X          c_curr_wait->prev->next = NULL;
  205. X        }
  206. X
  207. X        /* hold onto the memory location we're about to free */
  208. X
  209. X        c_hold_wait = c_curr_wait;
  210. X
  211. X        /* Shortly, the local curr_wait will be pointing at thin air. */
  212. X        /* Aim it at a valid memory location.                         */
  213. X
  214. X        c_curr_wait = c_curr_wait->prev;
  215. X
  216. X        /* if you love someone, set them free */
  217. X
  218. X        free(c_hold_wait);
  219. X      }
  220. X  }
  221. X
  222. X}
  223. X
  224. X
  225. Xwrite_status()
  226. X{
  227. X
  228. X  int chars;
  229. X
  230. X  /* read go_list and wait list, gather up all the info, write to statFIFO */
  231. X
  232. X  /* We don't have to worry about competing writers to the status fifo.    */
  233. X  /* We are the only writer, and only one of us will ever exist at any     */
  234. X  /* given time. So, we can write one record at a time, indicating the     */
  235. X  /* last record by all zeros. If we have nothing to report, the first     */
  236. X  /* record will be all zeros.                                             */
  237. X  /*                                                                       */
  238. X  /* We do, however, have to worry about competing readers of statFIFO.    */
  239. X  /* Multiple near-simultaneous invocations of IQ (the status inquirer)   */
  240. X  /* may result in interleaved reads from statFIFO. NG (no good).          */
  241. X  /*                                                                       */
  242. X  /* To prevent this unhappy occurance, IQUEUER will retain (as a global   */
  243. X  /* variable) the pid of the last previous IQ. If that process still      */
  244. X  /* exists, the newer IQ's request will not be satisfied. We'll send a    */
  245. X  /* SIGNAL (SIGTERM) back to the new guy, upon receipt of which he (the   */
  246. X  /* unsatisfied IQ) will report to the invoker (user) that another        */
  247. X  /* inquiry is currently being served. The unsatisfied user of IQ will    */
  248. X  /* will then be welcome to try again or go into a dark corner and cry.   */
  249. X  /* This singular (for this application) usage of signals is the main     */
  250. X  /* reason IQUEUER must, must, MUST be invoked by the superuser.          */
  251. X  /* Otherwise, we could not guarantee that the signal we send will get    */
  252. X  /* through to the interrupting IQ process.                               */
  253. X  /*                                                                       */
  254. X  /* If the last previous IQ does not exist, it would behoove us to make   */
  255. X  /* darned sure the statFIFO is completely empty before we write into it. */
  256. X  /* What if the last-served IQ didn't read everything we sent down the    */
  257. X  /* pipe? Just another golden opportunity for one IQ picking up what we   */
  258. X  /* meant to send to another. NG.                                         */
  259. X
  260. X  if(iq_pid != 31999)
  261. X  {
  262. X    /* this is not the first time down here during this invocation */
  263. X
  264. X    /* does the last request we satisfied still exist? */
  265. X    if(kill(iq_pid, 0) == 0)
  266. X    {
  267. X      /* tell the new requester we can't help him right now */
  268. X      kill(incoming.my_pid.intgr, SIGTERM);
  269. X      return(0);
  270. X    }
  271. X  }
  272. X
  273. X
  274. X  iq_pid = incoming.my_pid.intgr;
  275. X
  276. X  /* is the status fifo empty? */
  277. X
  278. X  if((statdump = open(statFIFO,O_RDONLY | O_NDELAY)) != -1)
  279. X  {
  280. X    /* if the open does not fail */
  281. X    /* read from the fifo until it is empty */
  282. X    chars = 1;
  283. X    while(chars > 0)
  284. X    {
  285. X      /* if there are any chars in there, just throw them away */
  286. X      chars = read(statdump,"/dev/null", BUFSIZ);
  287. X    }
  288. X
  289. X    close(statdump);
  290. X  }
  291. X  /* check both of our lists, write any valid records to the statFIFO */
  292. X
  293. X  /* check the go_list first */
  294. X
  295. X  /* walk the list */
  296. X
  297. X  while(curr_dsptch->next != NULL)
  298. X  {
  299. X    curr_dsptch = curr_dsptch->next;
  300. X    /* fill the to_iq struct and write it */
  301. X    count1 = count2 = 0;
  302. X
  303. X    to_IQ.typ.lng      = (long)curr_dsptch->job_id.typ.intgr;
  304. X    while(count1 < longsize)
  305. X    {
  306. X      msg_buf[count2++] = to_IQ.typ.chr[count1++];
  307. X    }
  308. X    count1 = 0;
  309. X
  310. X    to_IQ.devinod.lng    = (long)curr_dsptch->devinod;
  311. X    while(count1 < longsize)
  312. X    {
  313. X      msg_buf[count2++] = to_IQ.devinod.chr[count1++];
  314. X    }
  315. X    count1 = 0;
  316. X
  317. X    to_IQ.my_fifo.lng  = (long)curr_dsptch->job_id.my_fifo.intgr;
  318. X    while(count1 < longsize)
  319. X    {
  320. X      msg_buf[count2++] = to_IQ.my_fifo.chr[count1++];
  321. X    }
  322. X    count1 = 0;
  323. X
  324. X    to_IQ.pid.lng      = (long)curr_dsptch->job_id.my_pid.intgr;
  325. X    while(count1 < longsize)
  326. X    {
  327. X      msg_buf[count2++] = to_IQ.pid.chr[count1++];
  328. X    }
  329. X    count1 = 0;
  330. X
  331. X    to_IQ.time_in.lng  = (long)curr_dsptch->time_in;
  332. X    while(count1 < longsize)
  333. X    {
  334. X      msg_buf[count2++] = to_IQ.time_in.chr[count1++];
  335. X    }
  336. X    count1 = 0;
  337. X
  338. X    to_IQ.time_out.lng = (long)curr_dsptch->time_out;
  339. X    while(count1 < longsize)
  340. X    {
  341. X      msg_buf[count2++] = to_IQ.time_out.chr[count1++];
  342. X    }
  343. X    count1 = 0;
  344. X
  345. X    to_IQ.uid.lng      = (long)curr_dsptch->job_id.uid.intgr;
  346. X    while(count1 < longsize)
  347. X    {
  348. X      msg_buf[count2++] = to_IQ.uid.chr[count1++];
  349. X    }
  350. X    count1 = 0;
  351. X
  352. X    to_IQ.loop.lng     = (long)curr_dsptch->job_id.loop.intgr;
  353. X    while(count1 < longsize)
  354. X    {
  355. X      msg_buf[count2++] = to_IQ.loop.chr[count1++];
  356. X    }
  357. X    count1 = 0;
  358. X
  359. X
  360. X    write(statfifo,msg_buf,to_iq_siz);
  361. X  }
  362. X
  363. X  /* check the wait_queue next */
  364. X
  365. X  /* walk the list */
  366. X
  367. X  while(curr_wait->next != NULL)
  368. X  {
  369. X    curr_wait = curr_wait->next;
  370. X
  371. X      /* fill the to_iq struct and write it */
  372. X    count1 = count2 = 0;
  373. X
  374. X    to_IQ.typ.lng      = (long)curr_wait->job_id.typ.intgr;
  375. X    while(count1 < longsize)
  376. X    {
  377. X      msg_buf[count2++] = to_IQ.typ.chr[count1++];
  378. X    }
  379. X    count1 = 0;
  380. X
  381. X    /* Use -1 for device inode number since this job is waiting and has */
  382. X    /* not yet been assigned a device. "iq" will know that -1 signifies */
  383. X    /* unassigned.                                                      */
  384. X
  385. X    to_IQ.devinod.lng    = (long) -1;
  386. X    /* to_IQ.devinod.lng    = (long)curr_wait->devinod; - old logic */
  387. X    while(count1 < longsize)
  388. X    {
  389. X      msg_buf[count2++] = to_IQ.devinod.chr[count1++];
  390. X    }
  391. X    count1 = 0;
  392. X
  393. X    to_IQ.my_fifo.lng  = (long)curr_wait->job_id.my_fifo.intgr;
  394. X    while(count1 < longsize)
  395. X    {
  396. X      msg_buf[count2++] = to_IQ.my_fifo.chr[count1++];
  397. X    }
  398. X    count1 = 0;
  399. X
  400. X    to_IQ.pid.lng      = (long)curr_wait->job_id.my_pid.intgr;
  401. X    while(count1 < longsize)
  402. X    {
  403. X      msg_buf[count2++] = to_IQ.pid.chr[count1++];
  404. X    }
  405. X    count1 = 0;
  406. X
  407. X    to_IQ.time_in.lng  = (long)curr_wait->time_in;
  408. X    while(count1 < longsize)
  409. X    {
  410. X      msg_buf[count2++] = to_IQ.time_in.chr[count1++];
  411. X    }
  412. X    count1 = 0;
  413. X
  414. X    to_IQ.time_out.lng = 0L;
  415. X    while(count1 < longsize)
  416. X    {
  417. X      msg_buf[count2++] = to_IQ.time_out.chr[count1++];
  418. X    }
  419. X    count1 = 0;
  420. X
  421. X    to_IQ.uid.lng      = (long)curr_wait->job_id.uid.intgr;
  422. X    while(count1 < longsize)
  423. X    {
  424. X      msg_buf[count2++] = to_IQ.uid.chr[count1++];
  425. X    }
  426. X    count1 = 0;
  427. X
  428. X    to_IQ.loop.lng     = (long)curr_wait->job_id.loop.intgr;
  429. X    while(count1 < longsize)
  430. X    {
  431. X      msg_buf[count2++] = to_IQ.loop.chr[count1++];
  432. X    }
  433. X    count1 = 0;
  434. X
  435. X
  436. X    write(statfifo,msg_buf,to_iq_siz);
  437. X  }
  438. X      /* fill the to_iq struct with zeroes and write it */
  439. X    count1 = count2 = 0;
  440. X
  441. X    to_IQ.typ.lng      = 0L; 
  442. X    while(count1 < longsize)
  443. X    {
  444. X      msg_buf[count2++] = to_IQ.typ.chr[count1++];
  445. X    }
  446. X    count1 = 0;
  447. X
  448. X    to_IQ.devinod.lng    = 0L;
  449. X    while(count1 < longsize)
  450. X    {
  451. X      msg_buf[count2++] = to_IQ.devinod.chr[count1++];
  452. X    }
  453. X    count1 = 0;
  454. X
  455. X    to_IQ.my_fifo.lng  = 0L;
  456. X    while(count1 < longsize)
  457. X    {
  458. X      msg_buf[count2++] = to_IQ.my_fifo.chr[count1++];
  459. X    }
  460. X    count1 = 0;
  461. X
  462. X    to_IQ.pid.lng      = 0L;
  463. X    while(count1 < longsize)
  464. X    {
  465. X      msg_buf[count2++] = to_IQ.pid.chr[count1++];
  466. X    }
  467. X    count1 = 0;
  468. X
  469. X    to_IQ.time_in.lng  = 0L;
  470. X    while(count1 < longsize)
  471. X    {
  472. X      msg_buf[count2++] = to_IQ.time_in.chr[count1++];
  473. X    }
  474. X    count1 = 0;
  475. X
  476. X    to_IQ.time_out.lng = 0L;
  477. X    while(count1 < longsize)
  478. X    {
  479. X      msg_buf[count2++] = to_IQ.time_out.chr[count1++];
  480. X    }
  481. X    count1 = 0;
  482. X
  483. X    to_IQ.uid.lng      = 0L;
  484. X    while(count1 < longsize)
  485. X    {
  486. X      msg_buf[count2++] = to_IQ.uid.chr[count1++];
  487. X    }
  488. X    count1 = 0;
  489. X
  490. X    to_IQ.loop.lng     = 0L;
  491. X    while(count1 < longsize)
  492. X    {
  493. X      msg_buf[count2++] = to_IQ.loop.chr[count1++];
  494. X    }
  495. X    count1 = 0;
  496. X
  497. X
  498. X    count1 = write(statfifo,msg_buf,to_iq_siz);
  499. X    count1 = 0;
  500. X}
  501. X
  502. X
  503. Xmy_error(reason)
  504. Xint reason;
  505. X{
  506. X  switch(reason)
  507. X  {
  508. X    case NO_EXIT:
  509. X         if((logfile = fopen(LOGFILE,"a+")) != NULL)
  510. X         {
  511. X            fprintf(logfile,errmsg);
  512. X            fclose(logfile);
  513. X         }
  514. X            return(0);
  515. X      break;
  516. X    case SIGTERM:
  517. X  /************************************************************************/
  518. X  /* Reset traps on all signals!                                          */
  519. X  /* We don't want to be interrupted when we already know we're           */
  520. X  /* on our way out!                                                      */
  521. X  /************************************************************************/
  522. X
  523. X/* take care of the signals */
  524. X        signal(SIGINT, SIG_IGN);    /* ignore "interrupt" signal <DEL> */
  525. X        signal(SIGHUP, SIG_IGN);    /* ignore "hang up" signal */
  526. X        signal(SIGQUIT, SIG_IGN);   /* ignore "quit" signal */
  527. X        signal(SIGALRM, SIG_IGN);   /* ignore "alarm" signal */
  528. X        signal(SIGTERM, SIG_IGN);   /* ignore "term" signal */
  529. X#ifdef NQ
  530. X        signal(SIGRES, SIG_IGN);     /* ignore "restart" signal */
  531. X        signal(SIGBACK, SIG_IGN);   /* ignore "back-up" signal */
  532. X        signal(SIGSTOP, SIG_IGN);   /* ignore "stop" signal */
  533. X#endif
  534. X            /* format an error message */
  535. X            time(&tloc);
  536. X            nowtime = (struct tm *)localtime(&tloc);
  537. X            time_str = asctime(nowtime);
  538. X            strcpy(errmsg,"IQUEUER: received SIGTERM. time:\n");
  539. X            strcat(errmsg,"                            ");
  540. X            strcat(errmsg,time_str);
  541. X            strcat(errmsg,"\n");
  542. X         if((logfile = fopen(LOGFILE,"a+")) != NULL)
  543. X         {
  544. X            fprintf(logfile,errmsg);
  545. X            fclose(logfile);
  546. X         }
  547. X            my_exit(reason);
  548. X      break;
  549. X    case SIGHUP:
  550. X  /************************************************************************/
  551. X  /* Reset traps on all signals!                                          */
  552. X  /* We don't want to be interrupted when we already know we're           */
  553. X  /* on our way out!                                                      */
  554. X  /************************************************************************/
  555. X
  556. X/* take care of the signals */
  557. X        signal(SIGINT, SIG_IGN);    /* ignore "interrupt" signal <DEL> */
  558. X        signal(SIGHUP, SIG_IGN);    /* ignore "hang up" signal */
  559. X        signal(SIGQUIT, SIG_IGN);   /* ignore "quit" signal */
  560. X        signal(SIGALRM, SIG_IGN);   /* ignore "alarm" signal */
  561. X        signal(SIGTERM, SIG_IGN);   /* ignore "term" signal */
  562. X#ifdef NQ
  563. X        signal(SIGRES, SIG_IGN);     /* ignore "restart" signal */
  564. X        signal(SIGBACK, SIG_IGN);   /* ignore "back-up" signal */
  565. X        signal(SIGSTOP, SIG_IGN);   /* ignore "stop" signal */
  566. X#endif
  567. X            /* format an error message */
  568. X            time(&tloc);
  569. X            nowtime = (struct tm *)localtime(&tloc);
  570. X            time_str = asctime(nowtime);
  571. X            strcpy(errmsg,"IQUEUER: received SIGHUP. time:\n");
  572. X            strcat(errmsg,"                            ");
  573. X            strcat(errmsg,time_str);
  574. X            strcat(errmsg,"\n");
  575. X         if((logfile = fopen(LOGFILE,"a+")) != NULL)
  576. X         {
  577. X            fprintf(logfile,errmsg);
  578. X            fclose(logfile);
  579. X         }
  580. X            my_exit(reason);
  581. X      break;
  582. X#ifdef NQ
  583. X    case SIGSTOP:
  584. X  /************************************************************************/
  585. X  /* Reset traps on all signals!                                          */
  586. X  /* We don't want to be interrupted when we already know we're           */
  587. X  /* on our way out!                                                      */
  588. X  /************************************************************************/
  589. X
  590. X/* take care of the signals */
  591. X        signal(SIGINT, SIG_IGN);    /* ignore "interrupt" signal <DEL> */
  592. X        signal(SIGHUP, SIG_IGN);    /* ignore "hang up" signal */
  593. X        signal(SIGQUIT, SIG_IGN);   /* ignore "quit" signal */
  594. X        signal(SIGALRM, SIG_IGN);   /* ignore "alarm" signal */
  595. X        signal(SIGTERM, SIG_IGN);   /* ignore "term" signal */
  596. X        signal(SIGRES, SIG_IGN);     /* ignore "restart" signal */
  597. X        signal(SIGBACK, SIG_IGN);   /* ignore "back-up" signal */
  598. X        signal(SIGSTOP, SIG_IGN);   /* ignore "stop" signal */
  599. X
  600. X            /* format an error message */
  601. X            time(&tloc);
  602. X            nowtime = (struct tm *)localtime(&tloc);
  603. X            time_str = asctime(nowtime);
  604. X            strcpy(errmsg,"IQUEUER: received SIGSTOP. time:\n");
  605. X            strcat(errmsg,"                            ");
  606. X            strcat(errmsg,time_str);
  607. X            strcat(errmsg,"\n");
  608. X         if((logfile = fopen(LOGFILE,"a+")) != NULL)
  609. X         {
  610. X            fprintf(logfile,errmsg);
  611. X            fclose(logfile);
  612. X         }
  613. X            my_exit(reason);
  614. X      break;
  615. X#endif
  616. X    default:
  617. X  /************************************************************************/
  618. X  /* Reset traps on all signals!                                          */
  619. X  /* We don't want to be interrupted when we already know we're           */
  620. X  /* on our way out!                                                      */
  621. X  /************************************************************************/
  622. X
  623. X/* take care of the signals */
  624. X        signal(SIGINT, SIG_IGN);    /* ignore "interrupt" signal <DEL> */
  625. X        signal(SIGHUP, SIG_IGN);    /* ignore "hang up" signal */
  626. X        signal(SIGQUIT, SIG_IGN);   /* ignore "quit" signal */
  627. X        signal(SIGALRM, SIG_IGN);   /* ignore "alarm" signal */
  628. X        signal(SIGTERM, SIG_IGN);   /* ignore "term" signal */
  629. X#ifdef NQ
  630. X        signal(SIGRES, SIG_IGN);     /* ignore "restart" signal */
  631. X        signal(SIGBACK, SIG_IGN);   /* ignore "back-up" signal */
  632. X        signal(SIGSTOP, SIG_IGN);   /* ignore "stop" signal */
  633. X#endif
  634. X         if((logfile = fopen(LOGFILE,"a+")) != NULL)
  635. X         {
  636. X            fprintf(logfile,errmsg);
  637. X            fclose(logfile);
  638. X         }
  639. X            my_exit(reason);
  640. X      break;
  641. X  }
  642. X}
  643. X
  644. X
  645. Xmy_exit(reason)
  646. Xint reason;
  647. X{
  648. X  switch(reason)
  649. X  {
  650. X    case 0:
  651. X      exit(0);
  652. X      break;
  653. X
  654. X    case SIGTERM:
  655. X    case SIGHUP:
  656. X      exit(1);
  657. X      break;
  658. X
  659. X    case NONOTIFY:
  660. X      exit(1);
  661. X      break;
  662. X
  663. X#ifdef NQ
  664. X    case SIGSTOP:
  665. X      exit(1);
  666. X      break;
  667. X#endif
  668. X
  669. X    default:
  670. X      exit(1);
  671. X      break;
  672. X  }
  673. X}
  674. X
  675. X
  676. Xtimeout(sig)
  677. Xint sig;
  678. X{
  679. X  signal (SIGALRM, timeout);    /* set up the signal call again */
  680. X  time_out = 1;
  681. X  return;
  682. X}
  683. X
  684. X
  685. Xnewstate(pid,state)
  686. Xint pid, state;
  687. X{
  688. X  /* we are given the pid and new state of the job from whichever list */
  689. X
  690. X  /* some strictly local pointers which mimic the global ones */
  691. X
  692. X  struct wait_queue *c_head_wait;
  693. X  struct wait_queue *c_curr_wait;
  694. X  struct wait_queue *c_list_wait;
  695. X  struct wait_queue *c_hold_wait;
  696. X
  697. X  struct go_list *c_head_dsptch;
  698. X  struct go_list *c_curr_dsptch;
  699. X  struct go_list *c_list_dsptch;
  700. X  struct go_list *c_hold_dsptch;
  701. X
  702. X  /* set the local pointers to aim at the true heads of the lists */
  703. X  c_head_wait = c_curr_wait = c_list_wait = c_hold_wait = head_wait;
  704. X  c_head_dsptch = c_curr_dsptch = c_list_dsptch = c_hold_dsptch = head_dsptch;
  705. X
  706. X  /* check the go_list first */
  707. X
  708. X  /* walk the list */
  709. X
  710. X  while(c_curr_dsptch->next != NULL)
  711. X  {
  712. X    c_curr_dsptch = c_curr_dsptch->next;
  713. X
  714. X    if(c_curr_dsptch->job_id.my_pid.intgr == pid)
  715. X    {
  716. X      /* update the status */
  717. X      c_curr_dsptch->job_id.typ.intgr = state;
  718. X      time(&tloc);
  719. X      c_curr_dsptch->time_out         =  tloc;
  720. X      return(0);
  721. X    }
  722. X  }
  723. X
  724. X  /* check the wait_queue next */
  725. X
  726. X  /* walk the list */
  727. X
  728. X  while(c_curr_wait->next != NULL)
  729. X  {
  730. X    c_curr_wait = c_curr_wait->next;
  731. X
  732. X    if(c_curr_wait->job_id.my_pid.intgr == pid)
  733. X      {
  734. X        /* update the status */
  735. X        c_curr_wait->job_id.typ.intgr = state;
  736. X        return(0);
  737. X      }
  738. X  }
  739. X}
  740. X
  741. X
  742. X
  743. Xfirstime(pid)
  744. Xint pid;
  745. X{
  746. X  /* we are given the pid of the job from whichever list */
  747. X
  748. X  /* some strictly local pointers which mimic the global ones */
  749. X
  750. X  struct wait_queue *c_head_wait;
  751. X  struct wait_queue *c_curr_wait;
  752. X  struct wait_queue *c_list_wait;
  753. X  struct wait_queue *c_hold_wait;
  754. X
  755. X  struct go_list *c_head_dsptch;
  756. X  struct go_list *c_curr_dsptch;
  757. X  struct go_list *c_list_dsptch;
  758. X  struct go_list *c_hold_dsptch;
  759. X
  760. X  /* set the local pointers to aim at the true heads of the lists */
  761. X  c_head_wait = c_curr_wait = c_list_wait = c_hold_wait = head_wait;
  762. X  c_head_dsptch = c_curr_dsptch = c_list_dsptch = c_hold_dsptch = head_dsptch;
  763. X
  764. X  /* check the go_list first */
  765. X
  766. X  /* walk the list */
  767. X
  768. X  while(c_curr_dsptch->next != NULL)
  769. X  {
  770. X    c_curr_dsptch = c_curr_dsptch->next;
  771. X
  772. X    if(c_curr_dsptch->job_id.my_pid.intgr == pid)
  773. X    {
  774. X      /* save the old time */
  775. X      oldtime = c_curr_dsptch->time_in;
  776. X      return(0);
  777. X    }
  778. X  }
  779. X
  780. X  /* check the wait_queue next */
  781. X
  782. X  /* walk the list */
  783. X
  784. X  while(c_curr_wait->next != NULL)
  785. X  {
  786. X    c_curr_wait = c_curr_wait->next;
  787. X
  788. X
  789. X    if(c_curr_wait->job_id.my_pid.intgr == pid)
  790. X      {
  791. X        /* save the old time */
  792. X        oldtime = c_curr_wait->time_in;
  793. X        return(0);
  794. X      }
  795. X  }
  796. X}
  797. X
  798. X/**************************************************************************/
  799. X/*                                                                        */
  800. X/* MYNCHECK                                                               */
  801. X/*                                                                        */
  802. X/* 04/20/89 L. Bartz, Internal Revenue Service, Indianapolis              */
  803. X/*                                                                        */
  804. X/* This function is given an inode number and (pointer to) directory      */
  805. X/* name. It returns (pointer to) file name associated with the inode      */
  806. X/* number on success, null character pointer on failure.                  */
  807. X/*                                                                        */
  808. X/* Must have been declared in the calling function like so:               */
  809. X/*                                                                        */
  810. X/*                        char *myncheck();                               */
  811. X/* Called like so:                                                        */
  812. X/*                                                                        */
  813. X/*                  strcpy(fylname,myncheck(inode,dirname));              */
  814. X/*                                                                        */
  815. X/* Where variables have been declared in the calling function like so:    */
  816. X/*                                                                        */
  817. X/*                  int inode;                                            */
  818. X/*                  char *dirname;                                        */
  819. X/*                  char fylname[DIRSIZ + 1];                             */
  820. X/*                                                                        */
  821. X/* DIRSIZ is #defined in sys/dir.h                                        */
  822. X/*                                                                        */
  823. X/*                                                                        */
  824. X/*                                                                        */
  825. X/* 05/11/90  LSB  - Modified for enhanced portability to accomodate the   */
  826. X/*                  more modern "dirent" directory structure and related  */
  827. X/*                  family of directory access routines.                  */
  828. X/*                  Presently only good for those dirent-style systems    */
  829. X/*                  which support a vestigal sys/dir.h file and a         */
  830. X/*                  struct dirent which is named "direct" for backwards   */
  831. X/*                  compatibility.                                        */
  832. X/*                                                                        */
  833. X/*                                                                        */
  834. X/**************************************************************************/
  835. Xchar *myncheck(inode,dirname)
  836. Xint inode;
  837. Xchar *dirname;
  838. X{
  839. X/* uncomment the following if not elsewhere included */
  840. X/* #include <stdio.h> */
  841. X
  842. X/* uncomment the following if not elsewhere included */
  843. X/* #include <sys/types.h> */
  844. X
  845. X/* uncomment the following if not elsewhere included */
  846. X/* #include <sys/dir.h> */
  847. X
  848. X
  849. X  int rtrnval = 1;
  850. X
  851. X#ifdef MODERN_DIRS
  852. X/* uncomment the following if not elsewhere included */
  853. X/* #include <strings.h> */
  854. X
  855. X  DIR *file1;
  856. X  struct direct *dp;
  857. X  char dir_name[MAXNAMLEN+1];
  858. X#else
  859. X/* uncomment the following if not elsewhere included */
  860. X/* #include <string.h> */
  861. X/* uncomment the following if not elsewhere included */
  862. X/* #include <fcntl.h> */
  863. X  FILE *file1;
  864. X  struct direct dir1;
  865. X#endif
  866. X
  867. X
  868. X
  869. X#ifdef MODERN_DIRS
  870. X
  871. X        file1 = opendir(dirname);
  872. X
  873. X        while((dp = readdir(file1)) != NULL )
  874. X        {
  875. X          if((int)dp->d_ino == inode)
  876. X          {
  877. X            strcpy(&dir_name[0], dp->d_name);
  878. X        closedir(file1);
  879. X            return((char *) &dir_name[0]);
  880. X          }
  881. X        }
  882. X        closedir(file1);
  883. X        
  884. X#else
  885. X        file1 = fopen(dirname,"r");
  886. X
  887. X        while(rtrnval > 0)
  888. X        {
  889. X          rtrnval = fread(&dir1,sizeof(struct direct),1,file1);
  890. X          if((int)dir1.d_ino == inode)
  891. X          {
  892. X        fclose(file1);
  893. X            return((char *) &dir1.d_name[0]);
  894. X          }
  895. X        }
  896. X        fclose(file1);
  897. X#endif
  898. X
  899. X        /* we didn't find it */
  900. X        return((char *) 0);
  901. X}
  902. X
  903. X/**************************************************************************/
  904. X/*                                                                        */
  905. X/* LOCKIT                                                                 */
  906. X/*                                                                        */
  907. X/* 05/11/90 L. Bartz, Internal Revenue Service, Indianapolis              */
  908. X/*                                                                        */
  909. X/* This function is given a (pointer to) a tty name for which a lock      */
  910. X/* file is to be created. It returns zero on success, else non-zero.      */
  911. X/*                                                                        */
  912. X/* LOCKIT honors all "foreign" lockfiles.                                 */
  913. X/*                                                                        */
  914. X/* The lockfile LOCKIT creates is meant to be unassailable by competing   */
  915. X/* processes.                                                             */
  916. X/*                                                                        */
  917. X/*                                                                        */
  918. X/**************************************************************************/
  919. Xlockit(lck_tty)
  920. Xchar *lck_tty;
  921. X{
  922. X
  923. X  /* uncomment this if these are not included or def'd elsewhere
  924. X
  925. X  #include <stdio.h>
  926. X  #include <sys/types.h>
  927. X  #include <sys/stat.h>
  928. X  #include <signal.h>
  929. X  #include <fcntl.h>
  930. X  #include <termio.h>
  931. X  #include <sys/errno.h>
  932. X
  933. X  char *strcpy();
  934. X  char *strcat();
  935. X  unsigned sleep();
  936. X  unsigned alarm();
  937. X  void exit();
  938. X
  939. X
  940. X  end of commented-out section */
  941. X
  942. X  int rtrnval;
  943. X
  944. X  /* create a lock file name */
  945. X
  946. X  strcpy(tty_lock,LCK_DIR);
  947. X  strcat(tty_lock,"LCK..");
  948. X  strcat(tty_lock,lck_tty);
  949. X
  950. X  oumask = umask(077);
  951. X
  952. X  /* My lockfile is a directory file with completely closed permissions, so */
  953. X  /* no competing process can trash it without my permission.               */
  954. X
  955. X#ifdef MKDIR
  956. X
  957. X  /* for Berzerkeley systems and others */
  958. X  if(mkdir(tty_lock,0) != SUCCESS)
  959. X  {
  960. X    sprintf(errmsg,"IQUEUER: mkdir %s: %s. time:\n",tty_lock,sys_errlist[errno]);
  961. X    /* need to send out an error msg */
  962. X    /* format an error message */
  963. X    time(&tloc);
  964. X    nowtime = (struct tm *)localtime(&tloc);
  965. X    time_str = asctime(nowtime);
  966. X    strcat(errmsg,time_str);
  967. X    strcat(errmsg,"\n");
  968. X
  969. X   /* call the error routine, don't exit */
  970. X   rtrnval = my_error(NO_EXIT);
  971. X
  972. X   umask(oumask);
  973. X   return(1);
  974. X
  975. X  }
  976. X
  977. X#else
  978. X
  979. X  if(mknod(tty_lock,0040777,1) != SUCCESS)
  980. X  {
  981. X    sprintf(errmsg,"IQUEUER: mknod %s: %s. time:\n",tty_lock,sys_errlist[errno]);
  982. X    /* need to send out an error msg */
  983. X    /* format an error message */
  984. X    time(&tloc);
  985. X    nowtime = (struct tm *)localtime(&tloc);
  986. X    time_str = asctime(nowtime);
  987. X    strcat(errmsg,time_str);
  988. X    strcat(errmsg,"\n");
  989. X
  990. X   /* call the error routine, don't exit */
  991. X   rtrnval = my_error(NO_EXIT);
  992. X
  993. X   umask(oumask);
  994. X   return(1);
  995. X
  996. X  }
  997. X
  998. X
  999. X#endif
  1000. X
  1001. X
  1002. X  /* A "known" DYNIX bug requires this.                 */
  1003. X  /* The unlink(2) of the directory will fail unless    */
  1004. X  /* the directory contains valid "." and ".." entries. */
  1005. X  /*                                      05/15/90  LSB */
  1006. X#ifdef DYNIX
  1007. X  /* dot */
  1008. X  strcpy(lil_buf,tty_lock);
  1009. X  strcat(lil_buf,"/.");
  1010. X  link(tty_lock,lil_buf);
  1011. X  /* dot-dot */
  1012. X  strcat(lil_buf,".");
  1013. X  link(LCK_DIR,lil_buf);
  1014. X#endif
  1015. X  return(0);
  1016. X}
  1017. END_OF_FILE
  1018. if test 30223 -ne `wc -c <'ISPIN/src/IQUEUER.c.ab'`; then
  1019.     echo shar: \"'ISPIN/src/IQUEUER.c.ab'\" unpacked with wrong size!
  1020. fi
  1021. # end of 'ISPIN/src/IQUEUER.c.ab'
  1022. fi
  1023. if test -f 'ISPIN/install/lib_rtab/CPU_SW_PTR/ADDR_SPEC/C351_PLAIN' -a "${1}" != "-c" ; then 
  1024.   echo shar: Will not clobber existing file \"'ISPIN/install/lib_rtab/CPU_SW_PTR/ADDR_SPEC/C351_PLAIN'\"
  1025. else
  1026. echo shar: Extracting \"'ISPIN/install/lib_rtab/CPU_SW_PTR/ADDR_SPEC/C351_PLAIN'\" \(548 characters\)
  1027. sed "s/^X//" >'ISPIN/install/lib_rtab/CPU_SW_PTR/ADDR_SPEC/C351_PLAIN' <<'END_OF_FILE'
  1028. X# You'll need to adjust this to suit your switch's login herald and break
  1029. X# sequence. In this example, the login herald contains the string "System?",
  1030. X# and the switch's break sequence is defined as "<BREAK>bye". The switch's
  1031. X# info messages (Tellabs) are "on" in order to allow ISPIN to detect error
  1032. X# conditions.
  1033. X# substitute your node/link.channel for 999/1.11.
  1034. X#
  1035. Xnetind1;/dev/contty,/dev/tty22;9600;-L;-Busy;-Bfound;-DSystem?;-Q\w\K\d;-Q\pbye\d;System?-\p\K\pbye\r\p-System?;\d999/1.11\r\d;connect-\p\K\dbye\r\d\d999/1.11\r\w-connect;\d\n\f;;;
  1036. END_OF_FILE
  1037. if test 548 -ne `wc -c <'ISPIN/install/lib_rtab/CPU_SW_PTR/ADDR_SPEC/C351_PLAIN'`; then
  1038.     echo shar: \"'ISPIN/install/lib_rtab/CPU_SW_PTR/ADDR_SPEC/C351_PLAIN'\" unpacked with wrong size!
  1039. fi
  1040. # end of 'ISPIN/install/lib_rtab/CPU_SW_PTR/ADDR_SPEC/C351_PLAIN'
  1041. fi
  1042. if test -f 'ISPIN/install/lib_rtab/CPU_SW_PTR/ADDR_SPEC/PLAIN' -a "${1}" != "-c" ; then 
  1043.   echo shar: Will not clobber existing file \"'ISPIN/install/lib_rtab/CPU_SW_PTR/ADDR_SPEC/PLAIN'\"
  1044. else
  1045. echo shar: Extracting \"'ISPIN/install/lib_rtab/CPU_SW_PTR/ADDR_SPEC/PLAIN'\" \(544 characters\)
  1046. sed "s/^X//" >'ISPIN/install/lib_rtab/CPU_SW_PTR/ADDR_SPEC/PLAIN' <<'END_OF_FILE'
  1047. X# You'll need to adjust this to suit your switch's login herald and break
  1048. X# sequence. In this example, the login herald contains the string "System?",
  1049. X# and the switch's break sequence is defined as "<BREAK>bye". The switch's
  1050. X# info messages (Tellabs) are "on" in order to allow ISPIN to detect error
  1051. X# conditions.
  1052. X# substitute your node/link.channel for 999/1.11.
  1053. X#
  1054. Xnetind1;/dev/contty,/dev/tty22;9600;-L;-Busy;-Bfound;-DSystem?;-Q\w\K\d;-Q\pbye\d;System?-\p\K\pbye\r\p-System?;\d999/1.11\r\d;connect-\p\K\dbye\r\d\d999/1.11\r\w-connect;\d;;;
  1055. END_OF_FILE
  1056. if test 544 -ne `wc -c <'ISPIN/install/lib_rtab/CPU_SW_PTR/ADDR_SPEC/PLAIN'`; then
  1057.     echo shar: \"'ISPIN/install/lib_rtab/CPU_SW_PTR/ADDR_SPEC/PLAIN'\" unpacked with wrong size!
  1058. fi
  1059. # end of 'ISPIN/install/lib_rtab/CPU_SW_PTR/ADDR_SPEC/PLAIN'
  1060. fi
  1061. if test -f 'ISPIN/install/lib_rtab/CPU_SW_PTR/ADDR_SPEC/QUME_NOSHT' -a "${1}" != "-c" ; then 
  1062.   echo shar: Will not clobber existing file \"'ISPIN/install/lib_rtab/CPU_SW_PTR/ADDR_SPEC/QUME_NOSHT'\"
  1063. else
  1064. echo shar: Extracting \"'ISPIN/install/lib_rtab/CPU_SW_PTR/ADDR_SPEC/QUME_NOSHT'\" \(579 characters\)
  1065. sed "s/^X//" >'ISPIN/install/lib_rtab/CPU_SW_PTR/ADDR_SPEC/QUME_NOSHT' <<'END_OF_FILE'
  1066. X# You'll need to adjust this to suit your switch's login herald and break
  1067. X# sequence. In this example, the login herald contains the string "System?",
  1068. X# and the switch's break sequence is defined as "<BREAK>bye". The switch's
  1069. X# info messages (Tellabs) are "on" in order to allow ISPIN to detect error
  1070. X# conditions.
  1071. X# substitute your node/link.channel for 999/1.11.
  1072. X#
  1073. Xnetind1;/dev/contty,/dev/tty22;9600;-L;-Busy;-Bfound;-DSystem?;-Q\L\L\K\d;-Q\pbye\d;System?-\p\K\pbye\r\p-System?;\d999/1.11\r\d;connect-\p\K\dbye\r\d\d999/1.11\r\w-connect;\033S\033F66\033C00\0339\015\033T\E;;;
  1074. END_OF_FILE
  1075. if test 579 -ne `wc -c <'ISPIN/install/lib_rtab/CPU_SW_PTR/ADDR_SPEC/QUME_NOSHT'`; then
  1076.     echo shar: \"'ISPIN/install/lib_rtab/CPU_SW_PTR/ADDR_SPEC/QUME_NOSHT'\" unpacked with wrong size!
  1077. fi
  1078. # end of 'ISPIN/install/lib_rtab/CPU_SW_PTR/ADDR_SPEC/QUME_NOSHT'
  1079. fi
  1080. if test -f 'ISPIN/install/lib_rtab/CPU_SW_PTR/ADDR_SPEC/QUME_SHT' -a "${1}" != "-c" ; then 
  1081.   echo shar: Will not clobber existing file \"'ISPIN/install/lib_rtab/CPU_SW_PTR/ADDR_SPEC/QUME_SHT'\"
  1082. else
  1083. echo shar: Extracting \"'ISPIN/install/lib_rtab/CPU_SW_PTR/ADDR_SPEC/QUME_SHT'\" \(579 characters\)
  1084. sed "s/^X//" >'ISPIN/install/lib_rtab/CPU_SW_PTR/ADDR_SPEC/QUME_SHT' <<'END_OF_FILE'
  1085. X# You'll need to adjust this to suit your switch's login herald and break
  1086. X# sequence. In this example, the login herald contains the string "System?",
  1087. X# and the switch's break sequence is defined as "<BREAK>bye". The switch's
  1088. X# info messages (Tellabs) are "on" in order to allow ISPIN to detect error
  1089. X# conditions.
  1090. X# substitute your node/link.channel for 999/1.11.
  1091. X#
  1092. Xnetind1;/dev/contty,/dev/tty22;9600;-L;-Busy;-Bfound;-DSystem?;-Q\L\L\K\d;-Q\pbye\d;System?-\p\K\pbye\r\p-System?;\d999/1.11\r\d;connect-\p\K\dbye\r\d\d999/1.11\r\w-connect;\033S\033F90\033C28\0339\015\033T\E;;;
  1093. END_OF_FILE
  1094. if test 579 -ne `wc -c <'ISPIN/install/lib_rtab/CPU_SW_PTR/ADDR_SPEC/QUME_SHT'`; then
  1095.     echo shar: \"'ISPIN/install/lib_rtab/CPU_SW_PTR/ADDR_SPEC/QUME_SHT'\" unpacked with wrong size!
  1096. fi
  1097. # end of 'ISPIN/install/lib_rtab/CPU_SW_PTR/ADDR_SPEC/QUME_SHT'
  1098. fi
  1099. if test -f 'ISPIN/install/lib_rtab/CPU_SW_PTR/USER_ADDR/C351_PLAIN' -a "${1}" != "-c" ; then 
  1100.   echo shar: Will not clobber existing file \"'ISPIN/install/lib_rtab/CPU_SW_PTR/USER_ADDR/C351_PLAIN'\"
  1101. else
  1102. echo shar: Extracting \"'ISPIN/install/lib_rtab/CPU_SW_PTR/USER_ADDR/C351_PLAIN'\" \(581 characters\)
  1103. sed "s/^X//" >'ISPIN/install/lib_rtab/CPU_SW_PTR/USER_ADDR/C351_PLAIN' <<'END_OF_FILE'
  1104. X# You'll need to adjust this to suit your switch's login herald and break
  1105. X# sequence. In this example, the login herald contains the string "System?",
  1106. X# and the switch's break sequence is defined as "<BREAK>bye". The switch's
  1107. X# info messages (Tellabs) are "on" in order to allow ISPIN to detect error
  1108. X# conditions.
  1109. X#
  1110. X# user will be required to type node/link.channel as the address of the
  1111. X# printer, like so: 135/0.14
  1112. X#
  1113. Xnetind1;/dev/contty,/dev/tty22;9600;-L;-Busy;-DSystem?;-Q\w\K\d;-Q\pbye\d;System?-\p\K\pbye\r\p-System?;\d\U\r\d;connect-\p\K\dbye\r\d\d\U\r\w-connect;\d\n\f;;;
  1114. END_OF_FILE
  1115. if test 581 -ne `wc -c <'ISPIN/install/lib_rtab/CPU_SW_PTR/USER_ADDR/C351_PLAIN'`; then
  1116.     echo shar: \"'ISPIN/install/lib_rtab/CPU_SW_PTR/USER_ADDR/C351_PLAIN'\" unpacked with wrong size!
  1117. fi
  1118. # end of 'ISPIN/install/lib_rtab/CPU_SW_PTR/USER_ADDR/C351_PLAIN'
  1119. fi
  1120. if test -f 'ISPIN/install/lib_rtab/CPU_SW_PTR/USER_ADDR/PLAIN' -a "${1}" != "-c" ; then 
  1121.   echo shar: Will not clobber existing file \"'ISPIN/install/lib_rtab/CPU_SW_PTR/USER_ADDR/PLAIN'\"
  1122. else
  1123. echo shar: Extracting \"'ISPIN/install/lib_rtab/CPU_SW_PTR/USER_ADDR/PLAIN'\" \(577 characters\)
  1124. sed "s/^X//" >'ISPIN/install/lib_rtab/CPU_SW_PTR/USER_ADDR/PLAIN' <<'END_OF_FILE'
  1125. X# You'll need to adjust this to suit your switch's login herald and break
  1126. X# sequence. In this example, the login herald contains the string "System?",
  1127. X# and the switch's break sequence is defined as "<BREAK>bye". The switch's
  1128. X# info messages (Tellabs) are "on" in order to allow ISPIN to detect error
  1129. X# conditions.
  1130. X#
  1131. X# user will be required to type node/link.channel as the address of the
  1132. X# printer, like so: 135/0.14
  1133. X#
  1134. Xnetind1;/dev/contty,/dev/tty22;9600;-L;-Busy;-DSystem?;-Q\w\K\d;-Q\pbye\d;System?-\p\K\pbye\r\p-System?;\d\U\r\d;connect-\p\K\dbye\r\d\d\U\r\w-connect;\d;;;
  1135. END_OF_FILE
  1136. if test 577 -ne `wc -c <'ISPIN/install/lib_rtab/CPU_SW_PTR/USER_ADDR/PLAIN'`; then
  1137.     echo shar: \"'ISPIN/install/lib_rtab/CPU_SW_PTR/USER_ADDR/PLAIN'\" unpacked with wrong size!
  1138. fi
  1139. # end of 'ISPIN/install/lib_rtab/CPU_SW_PTR/USER_ADDR/PLAIN'
  1140. fi
  1141. if test -f 'ISPIN/install/lib_rtab/CPU_SW_PTR/USER_ADDR/QUME_NOSHT' -a "${1}" != "-c" ; then 
  1142.   echo shar: Will not clobber existing file \"'ISPIN/install/lib_rtab/CPU_SW_PTR/USER_ADDR/QUME_NOSHT'\"
  1143. else
  1144. echo shar: Extracting \"'ISPIN/install/lib_rtab/CPU_SW_PTR/USER_ADDR/QUME_NOSHT'\" \(612 characters\)
  1145. sed "s/^X//" >'ISPIN/install/lib_rtab/CPU_SW_PTR/USER_ADDR/QUME_NOSHT' <<'END_OF_FILE'
  1146. X# You'll need to adjust this to suit your switch's login herald and break
  1147. X# sequence. In this example, the login herald contains the string "System?",
  1148. X# and the switch's break sequence is defined as "<BREAK>bye". The switch's
  1149. X# info messages (Tellabs) are "on" in order to allow ISPIN to detect error
  1150. X# conditions.
  1151. X#
  1152. X# user will be required to type node/link.channel as the address of the
  1153. X# printer, like so: 135/0.14
  1154. X#
  1155. Xnetind1;/dev/contty,/dev/tty22;9600;-L;-Busy;-DSystem?;-Q\L\L\K\d;-Q\pbye\d;System?-\p\K\pbye\r\p-System?;\d\U\r\d;connect-\p\K\dbye\r\d\d\U\r\w-connect;\033S\033F66\033C00\0339\015\033T\E;;;
  1156. END_OF_FILE
  1157. if test 612 -ne `wc -c <'ISPIN/install/lib_rtab/CPU_SW_PTR/USER_ADDR/QUME_NOSHT'`; then
  1158.     echo shar: \"'ISPIN/install/lib_rtab/CPU_SW_PTR/USER_ADDR/QUME_NOSHT'\" unpacked with wrong size!
  1159. fi
  1160. # end of 'ISPIN/install/lib_rtab/CPU_SW_PTR/USER_ADDR/QUME_NOSHT'
  1161. fi
  1162. if test -f 'ISPIN/install/lib_rtab/CPU_SW_PTR/USER_ADDR/QUME_SHT' -a "${1}" != "-c" ; then 
  1163.   echo shar: Will not clobber existing file \"'ISPIN/install/lib_rtab/CPU_SW_PTR/USER_ADDR/QUME_SHT'\"
  1164. else
  1165. echo shar: Extracting \"'ISPIN/install/lib_rtab/CPU_SW_PTR/USER_ADDR/QUME_SHT'\" \(612 characters\)
  1166. sed "s/^X//" >'ISPIN/install/lib_rtab/CPU_SW_PTR/USER_ADDR/QUME_SHT' <<'END_OF_FILE'
  1167. X# You'll need to adjust this to suit your switch's login herald and break
  1168. X# sequence. In this example, the login herald contains the string "System?",
  1169. X# and the switch's break sequence is defined as "<BREAK>bye". The switch's
  1170. X# info messages (Tellabs) are "on" in order to allow ISPIN to detect error
  1171. X# conditions.
  1172. X#
  1173. X# user will be required to type node/link.channel as the address of the
  1174. X# printer, like so: 135/0.14
  1175. X#
  1176. Xnetind1;/dev/contty,/dev/tty22;9600;-L;-Busy;-DSystem?;-Q\L\L\K\d;-Q\pbye\d;System?-\p\K\pbye\r\p-System?;\d\U\r\d;connect-\p\K\dbye\r\d\d\U\r\w-connect;\033S\033F90\033C28\0339\015\033T\E;;;
  1177. END_OF_FILE
  1178. if test 612 -ne `wc -c <'ISPIN/install/lib_rtab/CPU_SW_PTR/USER_ADDR/QUME_SHT'`; then
  1179.     echo shar: \"'ISPIN/install/lib_rtab/CPU_SW_PTR/USER_ADDR/QUME_SHT'\" unpacked with wrong size!
  1180. fi
  1181. # end of 'ISPIN/install/lib_rtab/CPU_SW_PTR/USER_ADDR/QUME_SHT'
  1182. fi
  1183. if test -f 'ISPIN/install/Makefile' -a "${1}" != "-c" ; then 
  1184.   echo shar: Will not clobber existing file \"'ISPIN/install/Makefile'\"
  1185. else
  1186. echo shar: Extracting \"'ISPIN/install/Makefile'\" \(4318 characters\)
  1187. sed "s/^X//" >'ISPIN/install/Makefile' <<'END_OF_FILE'
  1188. X# Makefile for compiling ISPIN C programs and doing installation
  1189. X#
  1190. X# ** IMPORTANT ** YOU MUST SET THE VARIABLE SPOOLER TO ONE OF THE FOLLOWING:
  1191. X#                      3B1, ZILOGNQ, ZILOGLP, DYNIX, CCI, UNISYS, OR LP
  1192. X#
  1193. X# Setting SPOOLER to LP is fine for most systems. Others are weird in some way:
  1194. X#
  1195. X# 3B1     - The only one of the Sys V's which puts lock files in /usr/spool/uucp
  1196. X# ZILOGNQ - For Zilog's Zeus 3.21 nq/xq/dqueuer queuer subsystem
  1197. X# ZILOGLP - Requires the "-Kfpe" flag on the compile line
  1198. X# DYNIX   - Conditional compile for ISPIN.c for jerking the ioctl around when
  1199. X#           doing the raw read after each burst of chars. Otherwise, we had 
  1200. X#           flow control probs. The UNISYS 5000 required this too.
  1201. X#         - Conditional compile for IQUEUER.c for special handling of the
  1202. X#           lockfiles we make. I talked to Sequent tech support about this.
  1203. X#           This is what they refer to as a "known bug".
  1204. X# CCI     - CCI's file system implements "dirent" style directory structure
  1205. X#           and routines. As POSIX-compliant boxes come along, this should
  1206. X#           come up more frequently. 
  1207. X# UNISYS  - As described above, the Unisys 5000 needed to have its ioctl
  1208. X#           tickled in a manner similar to the DYNIX (Sequent) machine.
  1209. X#          
  1210. X#
  1211. XSPOOLER = GIZMO
  1212. X
  1213. XSHELL=/bin/sh
  1214. X.PRECIOUS: *.h *.c
  1215. X
  1216. Xdefault: cprogs
  1217. X
  1218. Xcprogs: ckspooler unsplit ../obj/ispin ../obj/iq ../obj/iqueuer ../obj/ispintrfce 
  1219. X
  1220. Xunsplit:
  1221. X    cat ../src/IQUEUER.c.?? > ../src/IQUEUER.c
  1222. X    cat ../src/ISPIN.c.?? > ../src/ISPIN.c
  1223. X
  1224. Xinstall: ckspooler
  1225. X    /bin/sh install.sh $(SPOOLER)
  1226. X
  1227. Xckspooler:
  1228. X    @if [ $(SPOOLER) != "ZILOGNQ" -a $(SPOOLER) != "ZILOGLP" -a $(SPOOLER) != "DYNIX" -a $(SPOOLER) != "LP" -a $(SPOOLER) != "CCI" -a $(SPOOLER) != "3B1" -a $(SPOOLER) != "UNISYS" ] ; \
  1229. X       then \
  1230. X         echo "SPOOLER MUST BE SET TO ZILOGNQ, ZILOGLP, DYNIX, CCI, 3B1, UNISYS, OR LP - MAKE ABORTED" ; \
  1231. X         exit 1 ; \
  1232. X     fi
  1233. X
  1234. X../obj/ispin: ../src/ISPIN.c ../h/ispin.h ../h/localcnfg.h ../h/common.h ../h/nqspool.h
  1235. X    if [ $(SPOOLER) = "ZILOGNQ" ] ; \
  1236. X      then scc -DNQ -o ../obj/ispin ../src/ISPIN.c -s ; \
  1237. X    fi
  1238. X
  1239. X    if [ $(SPOOLER) = "ZILOGLP" ] ; \
  1240. X      then cc -Kfpe -o ../obj/ispin ../src/ISPIN.c -s ; \
  1241. X    fi
  1242. X
  1243. X    if [ $(SPOOLER) = "DYNIX" -o $(SPOOLER) = "UNISYS" ] ; \
  1244. X      then cc -DDYNIX -o ../obj/ispin ../src/ISPIN.c -s ; \
  1245. X    fi
  1246. X
  1247. X    if [ $(SPOOLER) = "LP" -o $(SPOOLER) = "CCI" -o $(SPOOLER) = "3B1" ] ; \
  1248. X      then cc -o ../obj/ispin ../src/ISPIN.c -s ; \
  1249. X    fi
  1250. X
  1251. X    chmod 711 ../obj/ispin
  1252. X
  1253. X../obj/iq: ../src/IQ.c ../h/iqueuer.h ../h/common.h
  1254. X    if [ $(SPOOLER) = "ZILOGNQ" ] ; \
  1255. X      then scc -DNQ -o ../obj/iq ../src/IQ.c -s ; \
  1256. X    fi
  1257. X
  1258. X    if [ $(SPOOLER) = "ZILOGLP" ] ; \
  1259. X      then cc -Kfpe -o ../obj/iq ../src/IQ.c -s ; \
  1260. X    fi
  1261. X
  1262. X    if [ $(SPOOLER) = "UNISYS" ] ; \
  1263. X      then cc -o ../obj/iq ../src/IQ.c -s ; \
  1264. X    fi
  1265. X
  1266. X    if [ $(SPOOLER) = "DYNIX" -o $(SPOOLER) = "LP" -o $(SPOOLER) = "3B1" ] ; \
  1267. X      then cc -o ../obj/iq ../src/IQ.c -s ; \
  1268. X    fi
  1269. X
  1270. X    if [ $(SPOOLER) = "CCI" ] ; \
  1271. X      then cc -DMODERN_DIRS -o ../obj/iq ../src/IQ.c -s ; \
  1272. X    fi
  1273. X
  1274. X    chmod 711 ../obj/iq
  1275. X
  1276. X../obj/iqueuer: ../src/IQUEUER.c ../h/iqueuer.h ../h/common.h
  1277. X    if [ $(SPOOLER) = "ZILOGNQ" ] ; \
  1278. X      then scc -DNQ -o ../obj/iqueuer ../src/IQUEUER.c -s ; \
  1279. X    fi
  1280. X
  1281. X    if [ $(SPOOLER) = "ZILOGLP" ] ; \
  1282. X      then cc -DLCK_DIR=\"/usr/spool/locks/\" -Kfpe -o ../obj/iqueuer ../src/IQUEUER.c -s ; \
  1283. X    fi
  1284. X
  1285. X    if [ $(SPOOLER) = "DYNIX" ] ; \
  1286. X      then cc -DDYNIX -DLCK_DIR=\"/usr/spool/uucp/LCK/\" -o ../obj/iqueuer ../src/IQUEUER.c -s ; \
  1287. X    fi
  1288. X
  1289. X    if [ $(SPOOLER) = "LP" -o $(SPOOLER) = "UNISYS" ] ; \
  1290. X      then cc -DLCK_DIR=\"/usr/spool/locks/\" -o ../obj/iqueuer ../src/IQUEUER.c -s ; \
  1291. X    fi
  1292. X
  1293. X    if [ $(SPOOLER) = "CCI" ] ; \
  1294. X      then cc -DMODERN_DIRS -DLCK_DIR=\"/usr/spool/locks/\" -o ../obj/iqueuer ../src/IQUEUER.c -s ; \
  1295. X    fi
  1296. X
  1297. X    if [ $(SPOOLER) = "3B1" ] ; \
  1298. X      then cc -o ../obj/iqueuer ../src/IQUEUER.c -s ; \
  1299. X    fi
  1300. X
  1301. X    chmod 700 ../obj/iqueuer
  1302. X
  1303. X../obj/ispintrfce: ../src/ISPINTRFCE.c ../h/localcnfg.h
  1304. X    if [ $(SPOOLER) = "ZILOGLP" ] ; \
  1305. X      then cc -Kfpe -o ../obj/ispintrfce ../src/ISPINTRFCE.c -s ; \
  1306. X    fi
  1307. X
  1308. X    if [ $(SPOOLER) = "DYNIX" -o $(SPOOLER) = "LP" -o $(SPOOLER) = "CCI" -o $(SPOOLER) = "3B1" -o $(SPOOLER) = "UNISYS" ] ; \
  1309. X      then cc -o ../obj/ispintrfce ../src/ISPINTRFCE.c -s   ; \
  1310. X    fi
  1311. X
  1312. X    if [ $(SPOOLER) != "ZILOGNQ" ] ; \
  1313. X      then chmod 755 ../obj/ispintrfce ; \
  1314. X    fi
  1315. X
  1316. Xclean: 
  1317. X    /bin/rm -f ../obj/*
  1318. X    /bin/sh ./split_it.sh
  1319. X
  1320. END_OF_FILE
  1321. if test 4318 -ne `wc -c <'ISPIN/install/Makefile'`; then
  1322.     echo shar: \"'ISPIN/install/Makefile'\" unpacked with wrong size!
  1323. fi
  1324. # end of 'ISPIN/install/Makefile'
  1325. fi
  1326. if test -f 'ISPIN/install/install.sh' -a "${1}" != "-c" ; then 
  1327.   echo shar: Will not clobber existing file \"'ISPIN/install/install.sh'\"
  1328. else
  1329. echo shar: Extracting \"'ISPIN/install/install.sh'\" \(3478 characters\)
  1330. sed "s/^X//" >'ISPIN/install/install.sh' <<'END_OF_FILE'
  1331. X#!/bin/sh
  1332. X# install.sh - called by make when command "make install" is executed
  1333. X
  1334. Xspooler=$1
  1335. Xif [ $spooler != "ZILOGNQ" ] && [ $spooler != "ZILOGLP" ] && [ $spooler != "DYNIX" ] && [ $spooler != "LP" ] && [ $spooler != "CCI" ] && [ $spooler != "3B1" ] && [ $spooler != "UNISYS" ]
  1336. Xthen
  1337. X  echo " ERROR : install.sh must be called with an argument specifying spooler"
  1338. X  echo "         (i.e. install.sh ZILOGLP) "
  1339. X  exit 1
  1340. Xfi
  1341. X
  1342. Xif [ $spooler = "ZILOGNQ" ]
  1343. Xthen
  1344. X  dirname="queuer"
  1345. Xelse
  1346. X  dirname="lp"
  1347. Xfi
  1348. X
  1349. Xif [ ! -d /usr/spool/$dirname/ISPIN ]
  1350. Xthen
  1351. X  echo "making new directories"
  1352. X  echo "mkdir /usr/spool/$dirname/ISPIN"
  1353. X  mkdir /usr/spool/$dirname/ISPIN
  1354. X  chmod 777 /usr/spool/$dirname/ISPIN
  1355. Xfi
  1356. X
  1357. Xif [ ! -d /usr/spool/$dirname/ISPIN/FIFO ]
  1358. Xthen
  1359. X  echo "mkdir /usr/spool/$dirname/ISPIN/FIFO"
  1360. X  mkdir /usr/spool/$dirname/ISPIN/FIFO
  1361. X  chmod 777 /usr/spool/$dirname/ISPIN/FIFO
  1362. Xfi
  1363. X
  1364. Xif [ ! -r /usr/spool/$dirname/ISPIN/FIFO/IQUEUER ]
  1365. Xthen
  1366. X  echo "creating named pipes"
  1367. X  echo "/etc/mknod /usr/spool/$dirname/ISPIN/FIFO/IQUEUER p"
  1368. X  /etc/mknod /usr/spool/$dirname/ISPIN/FIFO/IQUEUER p
  1369. X  chmod 666 /usr/spool/$dirname/ISPIN/FIFO/IQUEUER
  1370. Xfi
  1371. X
  1372. Xif [ ! -r /usr/spool/$dirname/ISPIN/FIFO/STATUS ]
  1373. Xthen
  1374. X  echo "/etc/mknod /usr/spool/$dirname/ISPIN/FIFO/STATUS p"
  1375. X  /etc/mknod /usr/spool/$dirname/ISPIN/FIFO/STATUS p
  1376. X  chmod 666 /usr/spool/$dirname/ISPIN/FIFO/STATUS
  1377. Xfi
  1378. X
  1379. Xif [ ! -f /usr/spool/$dirname/ISPIN/rtab ]
  1380. Xthen
  1381. X  echo "copy <<empty>> rtab to /usr/spool/$dirname/ISPIN directory"
  1382. X  echo "cp rtab /usr/spool/$dirname/ISPIN"
  1383. X  cp rtab /usr/spool/$dirname/ISPIN
  1384. X  chmod 744 /usr/spool/$dirname/ISPIN/rtab
  1385. Xfi
  1386. X
  1387. Xecho "copy executable iqueuer to /usr/spool/$dirname/ISPIN directory"
  1388. Xecho "cp ../obj/iqueuer /usr/spool/$dirname/ISPIN"
  1389. Xcp ../obj/iqueuer /usr/spool/$dirname/ISPIN
  1390. X
  1391. Xecho "copy executable ispin to /usr/spool/$dirname/ISPIN directory"
  1392. Xecho "cp ../obj/ispin /usr/spool/$dirname/ISPIN"
  1393. Xcp ../obj/ispin /usr/spool/$dirname/ISPIN
  1394. X
  1395. Xif [ $spooler != "ZILOGNQ" ]
  1396. Xthen
  1397. X  echo "copy ispintrfce to /usr/spool/$dirname/ISPIN directory"
  1398. X  echo "cp ../obj/ispintrfce /usr/spool/$dirname/ISPIN"
  1399. X  cp ../obj/ispintrfce /usr/spool/$dirname/ISPIN
  1400. Xfi
  1401. X
  1402. Xecho "What's left?"
  1403. Xecho
  1404. Xecho "1. Copy iq to a directory to which your users have a path for"
  1405. Xecho "   execution ( such as, generally, /z/bin, or /usr/local/bin )."
  1406. Xecho "2. Make provision in your system start-up script(s) to invoke"
  1407. Xecho "   /usr/spool/$dirname/ISPIN/iqueuer (the daemon) every start-up"
  1408. Xecho "   Execute it now, just for the first start-up."
  1409. Xecho "3. Choose the tty(s) through which ISPIN will contact printer(s)"
  1410. Xecho "4. Connect tty(s) to network"
  1411. Xecho "5. Edit the /usr/spool/$dirname/ISPIN/rtab to add a line for"
  1412. Xecho "   connect info for each remote printer"
  1413. Xif [ $spooler =  "ZILOGNQ" ]
  1414. Xthen
  1415. X  echo "6. Add each remote printer as a member of the native queuer by"
  1416. X  echo "   editing the /usr/spool/queuer/config file"
  1417. X  echo "7. Force the dqueuer (native queueing daemon) to read the config file"
  1418. X  echo "    by executing:     dqueuer -r"
  1419. X  echo "   The dqueuer will thus re-read the config file and learn of the"
  1420. X  echo "   new printer(s)."
  1421. Xelse
  1422. X  echo "6. Shut down lpsched by executing lpshut."
  1423. X  echo "7. Add each remote printer as a member of the native queuer by"
  1424. X  echo "   executing     lpadmin -pyour_printer_name -iispintrfce -v/dev/null"
  1425. X  echo "8. Re-start the lp scheduler by executing lpsched."
  1426. X  echo "9. Use the lp-family commands << enable >> and << accept >> to"
  1427. X  echo "    bring each new printer on-line."
  1428. Xfi
  1429. END_OF_FILE
  1430. if test 3478 -ne `wc -c <'ISPIN/install/install.sh'`; then
  1431.     echo shar: \"'ISPIN/install/install.sh'\" unpacked with wrong size!
  1432. fi
  1433. chmod +x 'ISPIN/install/install.sh'
  1434. # end of 'ISPIN/install/install.sh'
  1435. fi
  1436. if test -f 'ISPIN/install/split_it.sh' -a "${1}" != "-c" ; then 
  1437.   echo shar: Will not clobber existing file \"'ISPIN/install/split_it.sh'\"
  1438. else
  1439. echo shar: Extracting \"'ISPIN/install/split_it.sh'\" \(307 characters\)
  1440. sed "s/^X//" >'ISPIN/install/split_it.sh' <<'END_OF_FILE'
  1441. X#!/bin/sh
  1442. X# split_it.sh - called by make when command "make clean" is executed
  1443. X
  1444. Xif [ -f ../src/IQUEUER.c ]
  1445. Xthen
  1446. X    cd ../src
  1447. X    /usr/bin/split IQUEUER.c IQUEUER.c.
  1448. X    /bin/rm IQUEUER.c
  1449. X    cd ../install
  1450. Xfi
  1451. X
  1452. Xif [ -f ../src/ISPIN.c ]
  1453. Xthen
  1454. X    cd ../src
  1455. X    /usr/bin/split ISPIN.c ISPIN.c.
  1456. X    /bin/rm ISPIN.c
  1457. X    cd ../install
  1458. Xfi
  1459. END_OF_FILE
  1460. if test 307 -ne `wc -c <'ISPIN/install/split_it.sh'`; then
  1461.     echo shar: \"'ISPIN/install/split_it.sh'\" unpacked with wrong size!
  1462. fi
  1463. chmod +x 'ISPIN/install/split_it.sh'
  1464. # end of 'ISPIN/install/split_it.sh'
  1465. fi
  1466. if test -f 'ISPIN/doc/future.doc' -a "${1}" != "-c" ; then 
  1467.   echo shar: Will not clobber existing file \"'ISPIN/doc/future.doc'\"
  1468. else
  1469. echo shar: Extracting \"'ISPIN/doc/future.doc'\" \(6419 characters\)
  1470. sed "s/^X//" >'ISPIN/doc/future.doc' <<'END_OF_FILE'
  1471. X
  1472. X
  1473. XIRS National Office has allocated a full staff year to Central Region in
  1474. Xfiscal year 92 for ISPIN support. How much of that year trickles down
  1475. Xto Indy remains to be seen. I've heard it may be anywhere from one half
  1476. Xstaff year (most likely) to the whole thing (when pigs fly).
  1477. X
  1478. XA whole staff year (2088 hours) is a lot. By my reckoning, that's a lot
  1479. Xmore than the total number of hours I've spent on ISPIN analysis, develop-
  1480. Xment, testing, and customer support since August, 1988. Even if we only
  1481. Xsee a half staff year, that's still a pretty big chunk.
  1482. X
  1483. XWhat are we going to do with all that FY 92 time on our hands? Glad you
  1484. Xasked.
  1485. X
  1486. XJust as I did about a year and a half ago, before I start laying fingers
  1487. Xon the keyboard, I'm soliciting your input. Last time we worked together
  1488. Xthis way we produced ISPIN_2.1. It worked out so well that I wouldn't
  1489. Xconsider doing this by myself.
  1490. X
  1491. XBelow is a list of proposals for the next ISPIN release. I think I've
  1492. Xincluded all the items you have suggested along the way, but I want to be
  1493. Xsure.
  1494. X
  1495. XLook this listing over. Think it over. Are there any more features or
  1496. Xadditional functionality you want? Are there any bugs, glitches, or
  1497. Xdeficiencies which should be addressed?
  1498. X
  1499. XI won't guarantee that everything on this listing will be included in
  1500. Xthe next release. Some of it (like ISPIX and printing to LAN printers)
  1501. Xdepends on whether I can secure a proper development platform. Support
  1502. Xfor Berkeley lpr spooler might never happen. I will guarantee that any
  1503. Xnew ISPIN release will contain enough additional value to make its 
  1504. Xinstallation worth your while.
  1505. X
  1506. XI'd like to start shortly after the new FY begins, so let me hear from
  1507. Xyou by the end of September. E-mail responses are best for me but I'll
  1508. Xtake notes from phone calls too.
  1509. X
  1510. X
  1511. XSep  4 15:26 1991  future.doc Page 1
  1512. X
  1513. X
  1514. XFUTURE DIRECTIONS
  1515. X
  1516. X   Here, in no particular order of importance, are planned features,
  1517. X   fixes, dreams, etc.
  1518. X
  1519. X
  1520. X   ISPIN
  1521. X
  1522. X         - Support variable level debug on execution, similar to
  1523. X           uucico. This would be available to the sysadmin via
  1524. X           an rtab flag and argument.
  1525. X
  1526. X         - Alternative log file for debug, error, and event logging
  1527. X           specified in rtab
  1528. X
  1529. X         - variable output packet size
  1530. X
  1531. X         - TCP/IP interface for ISPIN to support printers on the LAN.
  1532. X           GOSIP later. I'm not talking about printers which are attached
  1533. X           to systems which are on the LAN. That's easy, and it's been
  1534. X           done. I'm thinking about printers which are on a LAN-attached
  1535. X           terminal server; or maybe going through a LAN-attached terminal
  1536. X           server, to get to an X.25 apad, then across the X.25 to 
  1537. X           printers on another apad.
  1538. X
  1539. X         - add capability to specify in rtab when speed of tty should
  1540. X           change - we go out at an initial speed, tell the net or modem
  1541. X           to change its speed, then immediately change ours to adjust
  1542. X
  1543. X         - add capability to specify in rtab to set up the tty at other
  1544. X           than the current generic 8 data bits, 1 stop bit, no parity.
  1545. X
  1546. X         - Support additional flags and arguments which can be passed
  1547. X           from the lp command line. The string passed as the arg to
  1548. X           the "-o" flag could be parsed by ISPIN for all sorts of
  1549. X           additional functionality. Right now, ISPIN assumes that any
  1550. X           argument to "-o" is a string which will be substituted
  1551. X           for "\U" in the rtab entry. Possibilities  include:
  1552. X
  1553. X             * variable level debug
  1554. X             * alternative log file for debug, error, and event logging
  1555. X             * specification of filters through which data could be
  1556. X               piped before it is sent out by ISPIN
  1557. X             * multiple substitution strings for rtab entry, such as:
  1558. X               \U, \U1, \U2...\Un
  1559. X             * remove file(s) after printing - some lp/lpscheds already
  1560. X               support this, some don't
  1561. X             * optional/alternative file name for banner page
  1562. X             * read data from a named pipe - lp/lpsched won't permit
  1563. X               queueing a file of null length, so giving a named pipe's
  1564. X               file name to lp doesn't work. Under this option, an
  1565. X               existing non-null "dummy" file would be given to lp as
  1566. X               the file arg, but ISPIN would actually read from the
  1567. X               named pipe specified by this optional flag and arg.
  1568. X             * variable dark/light level for toaster interface
  1569. X
  1570. X         - Support Berkeley lpr - this is on the cold, cold back burner
  1571. X           since IRS doesn't own many pure Berzerkeley Boxes.
  1572. X
  1573. X         - On dual universe boxes, switch to att if called from ucb
  1574. X
  1575. X         - man pages (yeah, sure)
  1576. X
  1577. X
  1578. X
  1579. X
  1580. X
  1581. X
  1582. X
  1583. X
  1584. XSep  4 15:26 1991  future.doc Page 2
  1585. X
  1586. X
  1587. X
  1588. X
  1589. X
  1590. X   ISPI
  1591. X
  1592. X         - Read external table and/or termcap/terminfo to retrieve the
  1593. X           string which turns on the terminal's auxiliary port instead
  1594. X           of relying solely on the internal hard-coded table.
  1595. X
  1596. X         - Clear the screen internally (curses or call up from termcap/
  1597. X           terminfo) instead of system call to "clear".
  1598. X
  1599. X         - allow ISPI to accept standard input as the print job, like:
  1600. X
  1601. X                 pr bigfile|ispi -B
  1602. X
  1603. X         - X-windows face (ISPIX?)
  1604. X
  1605. X         - Support Berkeley lpr - this is on the cold, cold back burner
  1606. X           since IRS doesn't own many pure Berzerkeley Boxes.
  1607. X
  1608. X         - On dual universe boxes, switch to att if called from ucb
  1609. X
  1610. X         - man pages (get real)
  1611. X
  1612. X
  1613. X   SUPPORT
  1614. X
  1615. X           09/11/91
  1616. X         - implement an automated e-mail response/software-distribution
  1617. X           routine with logging capabilities.
  1618. X
  1619. X-- 
  1620. X|::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::|
  1621. X|  Larry Bartz                                                               |
  1622. X|                                                                            |
  1623. X|   UNIX/uucp e-mail:                                                        |
  1624. X|   {pharaoh, MWR, INDY_3, BUFFALO, ARC_CO, BSC05, arlva1,                   |
  1625. X|      clt2, TEPS!indy6, ln3, pscs27!indy6, uunet!sir-alan}!ispin!lbartz     |
  1626. X|                                                                            |
  1627. X|   IRS-private MMDF:                                                        |
  1628. X|   lbartz@indy6                                                             |
  1629. X|::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::|
  1630. END_OF_FILE
  1631. if test 6419 -ne `wc -c <'ISPIN/doc/future.doc'`; then
  1632.     echo shar: \"'ISPIN/doc/future.doc'\" unpacked with wrong size!
  1633. fi
  1634. # end of 'ISPIN/doc/future.doc'
  1635. fi
  1636. if test -f 'ISPIN/misc/ISPIT.dr/eot_trap.c' -a "${1}" != "-c" ; then 
  1637.   echo shar: Will not clobber existing file \"'ISPIN/misc/ISPIT.dr/eot_trap.c'\"
  1638. else
  1639. echo shar: Extracting \"'ISPIN/misc/ISPIT.dr/eot_trap.c'\" \(147 characters\)
  1640. sed "s/^X//" >'ISPIN/misc/ISPIT.dr/eot_trap.c' <<'END_OF_FILE'
  1641. X#include <stdio.h>
  1642. X
  1643. Xmain()
  1644. X{
  1645. X  int c;
  1646. X
  1647. X  while ((c = getc(stdin)) != EOF)
  1648. X  {
  1649. X    if(c == 4)
  1650. X    {
  1651. X      exit(0);
  1652. X    }
  1653. X
  1654. X    putc(c,stdout);
  1655. X  }
  1656. X}
  1657. END_OF_FILE
  1658. if test 147 -ne `wc -c <'ISPIN/misc/ISPIT.dr/eot_trap.c'`; then
  1659.     echo shar: \"'ISPIN/misc/ISPIT.dr/eot_trap.c'\" unpacked with wrong size!
  1660. fi
  1661. # end of 'ISPIN/misc/ISPIT.dr/eot_trap.c'
  1662. fi
  1663. echo shar: End of archive 6 \(of 15\).
  1664. cp /dev/null ark6isdone
  1665. MISSING=""
  1666. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ; do
  1667.     if test ! -f ark${I}isdone ; then
  1668.     MISSING="${MISSING} ${I}"
  1669.     fi
  1670. done
  1671. if test "${MISSING}" = "" ; then
  1672.     echo You have unpacked all 15 archives.
  1673.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1674. else
  1675.     echo You still need to unpack the following archives:
  1676.     echo "        " ${MISSING}
  1677. fi
  1678. ##  End of shell archive.
  1679. exit 0
  1680.  
  1681.